@highcharts/grid-pro 2.0.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 (442) hide show
  1. package/README.md +35 -0
  2. package/css/grid-pro.css +1756 -0
  3. package/es-modules/Accessibility/A11yI18n.d.ts +95 -0
  4. package/es-modules/Accessibility/A11yI18n.js +290 -0
  5. package/es-modules/Accessibility/Accessibility.d.ts +116 -0
  6. package/es-modules/Accessibility/Accessibility.js +402 -0
  7. package/es-modules/Accessibility/AccessibilityComponent.d.ts +97 -0
  8. package/es-modules/Accessibility/AccessibilityComponent.js +147 -0
  9. package/es-modules/Accessibility/Components/AnnotationsA11y.d.ts +43 -0
  10. package/es-modules/Accessibility/Components/AnnotationsA11y.js +160 -0
  11. package/es-modules/Accessibility/Components/ContainerComponent.d.ts +48 -0
  12. package/es-modules/Accessibility/Components/ContainerComponent.js +142 -0
  13. package/es-modules/Accessibility/Components/InfoRegionsComponent.d.ts +144 -0
  14. package/es-modules/Accessibility/Components/InfoRegionsComponent.js +555 -0
  15. package/es-modules/Accessibility/Components/LegendComponent.d.ts +124 -0
  16. package/es-modules/Accessibility/Components/LegendComponent.js +474 -0
  17. package/es-modules/Accessibility/Components/MenuComponent.d.ts +93 -0
  18. package/es-modules/Accessibility/Components/MenuComponent.js +430 -0
  19. package/es-modules/Accessibility/Components/NavigatorComponent.d.ts +57 -0
  20. package/es-modules/Accessibility/Components/NavigatorComponent.js +235 -0
  21. package/es-modules/Accessibility/Components/RangeSelectorComponent.d.ts +126 -0
  22. package/es-modules/Accessibility/Components/RangeSelectorComponent.js +473 -0
  23. package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.d.ts +18 -0
  24. package/es-modules/Accessibility/Components/SeriesComponent/ForcedMarkers.js +234 -0
  25. package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.d.ts +87 -0
  26. package/es-modules/Accessibility/Components/SeriesComponent/NewDataAnnouncer.js +309 -0
  27. package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.d.ts +53 -0
  28. package/es-modules/Accessibility/Components/SeriesComponent/SeriesComponent.js +130 -0
  29. package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.d.ts +28 -0
  30. package/es-modules/Accessibility/Components/SeriesComponent/SeriesDescriber.js +415 -0
  31. package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.d.ts +114 -0
  32. package/es-modules/Accessibility/Components/SeriesComponent/SeriesKeyboardNavigation.js +721 -0
  33. package/es-modules/Accessibility/Components/ZoomComponent.d.ts +96 -0
  34. package/es-modules/Accessibility/Components/ZoomComponent.js +314 -0
  35. package/es-modules/Accessibility/FocusBorder.d.ts +40 -0
  36. package/es-modules/Accessibility/FocusBorder.js +301 -0
  37. package/es-modules/Accessibility/HighContrastMode.d.ts +35 -0
  38. package/es-modules/Accessibility/HighContrastMode.js +100 -0
  39. package/es-modules/Accessibility/HighContrastTheme.d.ts +11 -0
  40. package/es-modules/Accessibility/HighContrastTheme.js +212 -0
  41. package/es-modules/Accessibility/KeyboardNavigation.d.ts +133 -0
  42. package/es-modules/Accessibility/KeyboardNavigation.js +450 -0
  43. package/es-modules/Accessibility/KeyboardNavigationHandler.d.ts +48 -0
  44. package/es-modules/Accessibility/KeyboardNavigationHandler.js +126 -0
  45. package/es-modules/Accessibility/Options/A11yDefaults.d.ts +68 -0
  46. package/es-modules/Accessibility/Options/A11yDefaults.js +971 -0
  47. package/es-modules/Accessibility/Options/DeprecatedOptions.d.ts +22 -0
  48. package/es-modules/Accessibility/Options/DeprecatedOptions.js +265 -0
  49. package/es-modules/Accessibility/Options/LangDefaults.d.ts +4 -0
  50. package/es-modules/Accessibility/Options/LangDefaults.js +440 -0
  51. package/es-modules/Accessibility/ProxyElement.d.ts +78 -0
  52. package/es-modules/Accessibility/ProxyElement.js +223 -0
  53. package/es-modules/Accessibility/ProxyProvider.d.ts +90 -0
  54. package/es-modules/Accessibility/ProxyProvider.js +315 -0
  55. package/es-modules/Accessibility/Utils/Announcer.d.ts +26 -0
  56. package/es-modules/Accessibility/Utils/Announcer.js +90 -0
  57. package/es-modules/Accessibility/Utils/ChartUtilities.d.ts +90 -0
  58. package/es-modules/Accessibility/Utils/ChartUtilities.js +298 -0
  59. package/es-modules/Accessibility/Utils/DOMElementProvider.d.ts +20 -0
  60. package/es-modules/Accessibility/Utils/DOMElementProvider.js +69 -0
  61. package/es-modules/Accessibility/Utils/EventProvider.d.ts +26 -0
  62. package/es-modules/Accessibility/Utils/EventProvider.js +65 -0
  63. package/es-modules/Accessibility/Utils/HTMLUtilities.d.ts +108 -0
  64. package/es-modules/Accessibility/Utils/HTMLUtilities.js +319 -0
  65. package/es-modules/Core/Animation/AnimationUtilities.d.ts +107 -0
  66. package/es-modules/Core/Animation/AnimationUtilities.js +200 -0
  67. package/es-modules/Core/Animation/Fx.d.ts +130 -0
  68. package/es-modules/Core/Animation/Fx.js +388 -0
  69. package/es-modules/Core/Chart/Chart.d.ts +1009 -0
  70. package/es-modules/Core/Chart/Chart.js +3008 -0
  71. package/es-modules/Core/Chart/Chart3D.d.ts +276 -0
  72. package/es-modules/Core/Chart/Chart3D.js +1686 -0
  73. package/es-modules/Core/Chart/ChartDefaults.d.ts +8 -0
  74. package/es-modules/Core/Chart/ChartDefaults.js +1304 -0
  75. package/es-modules/Core/Chart/ChartNavigationComposition.d.ts +55 -0
  76. package/es-modules/Core/Chart/ChartNavigationComposition.js +90 -0
  77. package/es-modules/Core/Chart/GanttChart.d.ts +74 -0
  78. package/es-modules/Core/Chart/GanttChart.js +189 -0
  79. package/es-modules/Core/Chart/MapChart.d.ts +132 -0
  80. package/es-modules/Core/Chart/MapChart.js +232 -0
  81. package/es-modules/Core/Chart/StockChart.d.ts +117 -0
  82. package/es-modules/Core/Chart/StockChart.js +641 -0
  83. package/es-modules/Core/Color/Color.d.ts +112 -0
  84. package/es-modules/Core/Color/Color.js +418 -0
  85. package/es-modules/Core/Color/Palettes.d.ts +84 -0
  86. package/es-modules/Core/Color/Palettes.js +23 -0
  87. package/es-modules/Core/Defaults.d.ts +42 -0
  88. package/es-modules/Core/Defaults.js +2977 -0
  89. package/es-modules/Core/Foundation.d.ts +19 -0
  90. package/es-modules/Core/Foundation.js +63 -0
  91. package/es-modules/Core/Geometry/CircleUtilities.d.ts +189 -0
  92. package/es-modules/Core/Geometry/CircleUtilities.js +388 -0
  93. package/es-modules/Core/Geometry/GeometryUtilities.d.ts +48 -0
  94. package/es-modules/Core/Geometry/GeometryUtilities.js +105 -0
  95. package/es-modules/Core/Geometry/PolygonClip.d.ts +19 -0
  96. package/es-modules/Core/Geometry/PolygonClip.js +96 -0
  97. package/es-modules/Core/Globals.d.ts +110 -0
  98. package/es-modules/Core/Globals.js +127 -0
  99. package/es-modules/Core/HttpUtilities.d.ts +61 -0
  100. package/es-modules/Core/HttpUtilities.js +214 -0
  101. package/es-modules/Core/MSPointer.d.ts +74 -0
  102. package/es-modules/Core/MSPointer.js +218 -0
  103. package/es-modules/Core/Math3D.d.ts +117 -0
  104. package/es-modules/Core/Math3D.js +250 -0
  105. package/es-modules/Core/Pointer.d.ts +590 -0
  106. package/es-modules/Core/Pointer.js +1631 -0
  107. package/es-modules/Core/Renderer/HTML/AST.d.ts +163 -0
  108. package/es-modules/Core/Renderer/HTML/AST.js +562 -0
  109. package/es-modules/Core/Renderer/HTML/HTMLElement.d.ts +76 -0
  110. package/es-modules/Core/Renderer/HTML/HTMLElement.js +471 -0
  111. package/es-modules/Core/Renderer/RendererRegistry.d.ts +29 -0
  112. package/es-modules/Core/Renderer/RendererRegistry.js +76 -0
  113. package/es-modules/Core/Renderer/RendererUtilities.d.ts +26 -0
  114. package/es-modules/Core/Renderer/RendererUtilities.js +172 -0
  115. package/es-modules/Core/Responsive.d.ts +55 -0
  116. package/es-modules/Core/Responsive.js +260 -0
  117. package/es-modules/Core/Templating.d.ts +125 -0
  118. package/es-modules/Core/Templating.js +428 -0
  119. package/es-modules/Core/Time.d.ts +69 -0
  120. package/es-modules/Core/Time.js +172 -0
  121. package/es-modules/Core/Tooltip.d.ts +297 -0
  122. package/es-modules/Core/Tooltip.js +1377 -0
  123. package/es-modules/Core/Utilities.d.ts +770 -0
  124. package/es-modules/Core/Utilities.js +1989 -0
  125. package/es-modules/Data/ColumnUtils.d.ts +87 -0
  126. package/es-modules/Data/ColumnUtils.js +140 -0
  127. package/es-modules/Data/Connectors/CSVConnector.d.ts +63 -0
  128. package/es-modules/Data/Connectors/CSVConnector.js +149 -0
  129. package/es-modules/Data/Connectors/CSVConnectorOptions.d.ts +149 -0
  130. package/es-modules/Data/Connectors/DataConnector.d.ts +204 -0
  131. package/es-modules/Data/Connectors/DataConnector.js +345 -0
  132. package/es-modules/Data/Connectors/DataConnectorOptions.d.ts +87 -0
  133. package/es-modules/Data/Connectors/DataConnectorType.d.ts +45 -0
  134. package/es-modules/Data/Connectors/GoogleSheetsConnector.d.ts +65 -0
  135. package/es-modules/Data/Connectors/GoogleSheetsConnector.js +226 -0
  136. package/es-modules/Data/Connectors/GoogleSheetsConnectorOptions.d.ts +167 -0
  137. package/es-modules/Data/Connectors/HTMLTableConnector.d.ts +77 -0
  138. package/es-modules/Data/Connectors/HTMLTableConnector.js +119 -0
  139. package/es-modules/Data/Connectors/HTMLTableConnectorOptions.d.ts +49 -0
  140. package/es-modules/Data/Connectors/JSONConnector.d.ts +64 -0
  141. package/es-modules/Data/Connectors/JSONConnector.js +156 -0
  142. package/es-modules/Data/Connectors/JSONConnectorOptions.d.ts +185 -0
  143. package/es-modules/Data/Converters/CSVConverter.d.ts +64 -0
  144. package/es-modules/Data/Converters/CSVConverter.js +374 -0
  145. package/es-modules/Data/Converters/CSVConverterOptions.d.ts +53 -0
  146. package/es-modules/Data/Converters/DataConverter.d.ts +168 -0
  147. package/es-modules/Data/Converters/DataConverter.js +387 -0
  148. package/es-modules/Data/Converters/DataConverterType.d.ts +40 -0
  149. package/es-modules/Data/Converters/DataConverterUtils.d.ts +82 -0
  150. package/es-modules/Data/Converters/DataConverterUtils.js +216 -0
  151. package/es-modules/Data/Converters/GoogleSheetsConverter.d.ts +46 -0
  152. package/es-modules/Data/Converters/GoogleSheetsConverter.js +135 -0
  153. package/es-modules/Data/Converters/GoogleSheetsConverterOptions.d.ts +52 -0
  154. package/es-modules/Data/Converters/HTMLTableConverter.d.ts +72 -0
  155. package/es-modules/Data/Converters/HTMLTableConverter.js +362 -0
  156. package/es-modules/Data/Converters/HTMLTableConverterOptions.d.ts +51 -0
  157. package/es-modules/Data/Converters/JSONConverter.d.ts +99 -0
  158. package/es-modules/Data/Converters/JSONConverter.js +239 -0
  159. package/es-modules/Data/Converters/JSONConverterOptions.d.ts +52 -0
  160. package/es-modules/Data/DataCursor.d.ts +176 -0
  161. package/es-modules/Data/DataCursor.js +379 -0
  162. package/es-modules/Data/DataEvent.d.ts +81 -0
  163. package/es-modules/Data/DataEvent.js +14 -0
  164. package/es-modules/Data/DataPool.d.ts +130 -0
  165. package/es-modules/Data/DataPool.js +257 -0
  166. package/es-modules/Data/DataPoolOptions.d.ts +66 -0
  167. package/es-modules/Data/DataTable.d.ts +563 -0
  168. package/es-modules/Data/DataTable.js +930 -0
  169. package/es-modules/Data/DataTableCore.d.ts +165 -0
  170. package/es-modules/Data/DataTableCore.js +316 -0
  171. package/es-modules/Data/DataTableOptions.d.ts +25 -0
  172. package/es-modules/Data/DataTableOptions.js +15 -0
  173. package/es-modules/Data/Formula/Formula.d.ts +21 -0
  174. package/es-modules/Data/Formula/Formula.js +54 -0
  175. package/es-modules/Data/Formula/FormulaParser.d.ts +31 -0
  176. package/es-modules/Data/Formula/FormulaParser.js +488 -0
  177. package/es-modules/Data/Formula/FormulaProcessor.d.ts +155 -0
  178. package/es-modules/Data/Formula/FormulaProcessor.js +529 -0
  179. package/es-modules/Data/Formula/FormulaTypes.d.ts +138 -0
  180. package/es-modules/Data/Formula/FormulaTypes.js +135 -0
  181. package/es-modules/Data/Formula/Functions/ABS.d.ts +19 -0
  182. package/es-modules/Data/Formula/Functions/ABS.js +67 -0
  183. package/es-modules/Data/Formula/Functions/AND.d.ts +20 -0
  184. package/es-modules/Data/Formula/Functions/AND.js +59 -0
  185. package/es-modules/Data/Formula/Functions/AVERAGE.d.ts +20 -0
  186. package/es-modules/Data/Formula/Functions/AVERAGE.js +74 -0
  187. package/es-modules/Data/Formula/Functions/AVERAGEA.d.ts +20 -0
  188. package/es-modules/Data/Formula/Functions/AVERAGEA.js +90 -0
  189. package/es-modules/Data/Formula/Functions/COUNT.d.ts +20 -0
  190. package/es-modules/Data/Formula/Functions/COUNT.js +65 -0
  191. package/es-modules/Data/Formula/Functions/COUNTA.d.ts +20 -0
  192. package/es-modules/Data/Formula/Functions/COUNTA.js +71 -0
  193. package/es-modules/Data/Formula/Functions/IF.d.ts +21 -0
  194. package/es-modules/Data/Formula/Functions/IF.js +54 -0
  195. package/es-modules/Data/Formula/Functions/ISNA.d.ts +20 -0
  196. package/es-modules/Data/Formula/Functions/ISNA.js +52 -0
  197. package/es-modules/Data/Formula/Functions/MAX.d.ts +20 -0
  198. package/es-modules/Data/Formula/Functions/MAX.js +69 -0
  199. package/es-modules/Data/Formula/Functions/MEDIAN.d.ts +20 -0
  200. package/es-modules/Data/Formula/Functions/MEDIAN.js +78 -0
  201. package/es-modules/Data/Formula/Functions/MIN.d.ts +20 -0
  202. package/es-modules/Data/Formula/Functions/MIN.js +69 -0
  203. package/es-modules/Data/Formula/Functions/MOD.d.ts +20 -0
  204. package/es-modules/Data/Formula/Functions/MOD.js +63 -0
  205. package/es-modules/Data/Formula/Functions/MODE.d.ts +41 -0
  206. package/es-modules/Data/Formula/Functions/MODE.js +149 -0
  207. package/es-modules/Data/Formula/Functions/NOT.d.ts +20 -0
  208. package/es-modules/Data/Formula/Functions/NOT.js +60 -0
  209. package/es-modules/Data/Formula/Functions/OR.d.ts +20 -0
  210. package/es-modules/Data/Formula/Functions/OR.js +62 -0
  211. package/es-modules/Data/Formula/Functions/PRODUCT.d.ts +20 -0
  212. package/es-modules/Data/Formula/Functions/PRODUCT.js +68 -0
  213. package/es-modules/Data/Formula/Functions/SUM.d.ts +20 -0
  214. package/es-modules/Data/Formula/Functions/SUM.js +65 -0
  215. package/es-modules/Data/Formula/Functions/XOR.d.ts +20 -0
  216. package/es-modules/Data/Formula/Functions/XOR.js +81 -0
  217. package/es-modules/Data/Modifiers/ChainModifier.d.ts +128 -0
  218. package/es-modules/Data/Modifiers/ChainModifier.js +231 -0
  219. package/es-modules/Data/Modifiers/ChainModifierOptions.d.ts +20 -0
  220. package/es-modules/Data/Modifiers/ChainModifierOptions.js +14 -0
  221. package/es-modules/Data/Modifiers/DataModifier.d.ts +117 -0
  222. package/es-modules/Data/Modifiers/DataModifier.js +202 -0
  223. package/es-modules/Data/Modifiers/DataModifierEvent.d.ts +28 -0
  224. package/es-modules/Data/Modifiers/DataModifierEvent.js +15 -0
  225. package/es-modules/Data/Modifiers/DataModifierOptions.d.ts +11 -0
  226. package/es-modules/Data/Modifiers/DataModifierOptions.js +15 -0
  227. package/es-modules/Data/Modifiers/DataModifierType.d.ts +44 -0
  228. package/es-modules/Data/Modifiers/FilterModifier.d.ts +53 -0
  229. package/es-modules/Data/Modifiers/FilterModifier.js +172 -0
  230. package/es-modules/Data/Modifiers/FilterModifierOptions.d.ts +110 -0
  231. package/es-modules/Data/Modifiers/FilterModifierOptions.js +14 -0
  232. package/es-modules/Data/Modifiers/InvertModifier.d.ts +48 -0
  233. package/es-modules/Data/Modifiers/InvertModifier.js +116 -0
  234. package/es-modules/Data/Modifiers/InvertModifierOptions.d.ts +11 -0
  235. package/es-modules/Data/Modifiers/InvertModifierOptions.js +15 -0
  236. package/es-modules/Data/Modifiers/MathModifier.d.ts +68 -0
  237. package/es-modules/Data/Modifiers/MathModifier.js +165 -0
  238. package/es-modules/Data/Modifiers/MathModifierOptions.d.ts +50 -0
  239. package/es-modules/Data/Modifiers/MathModifierOptions.js +14 -0
  240. package/es-modules/Data/Modifiers/RangeModifier.d.ts +46 -0
  241. package/es-modules/Data/Modifiers/RangeModifier.js +96 -0
  242. package/es-modules/Data/Modifiers/RangeModifierOptions.d.ts +22 -0
  243. package/es-modules/Data/Modifiers/RangeModifierOptions.js +15 -0
  244. package/es-modules/Data/Modifiers/SortModifier.d.ts +54 -0
  245. package/es-modules/Data/Modifiers/SortModifier.js +144 -0
  246. package/es-modules/Data/Modifiers/SortModifierOptions.d.ts +44 -0
  247. package/es-modules/Data/Modifiers/SortModifierOptions.js +14 -0
  248. package/es-modules/Grid/Core/Accessibility/A11yOptions.d.ts +148 -0
  249. package/es-modules/Grid/Core/Accessibility/A11yOptions.js +17 -0
  250. package/es-modules/Grid/Core/Accessibility/Accessibility.d.ts +115 -0
  251. package/es-modules/Grid/Core/Accessibility/Accessibility.js +231 -0
  252. package/es-modules/Grid/Core/Credits.d.ts +57 -0
  253. package/es-modules/Grid/Core/Credits.js +125 -0
  254. package/es-modules/Grid/Core/Defaults.d.ts +20 -0
  255. package/es-modules/Grid/Core/Defaults.js +148 -0
  256. package/es-modules/Grid/Core/Globals.d.ts +103 -0
  257. package/es-modules/Grid/Core/Globals.js +134 -0
  258. package/es-modules/Grid/Core/Grid.d.ts +295 -0
  259. package/es-modules/Grid/Core/Grid.js +730 -0
  260. package/es-modules/Grid/Core/GridUtils.d.ts +110 -0
  261. package/es-modules/Grid/Core/GridUtils.js +191 -0
  262. package/es-modules/Grid/Core/Options.d.ts +599 -0
  263. package/es-modules/Grid/Core/Options.js +16 -0
  264. package/es-modules/Grid/Core/Pagination/Icons.d.ts +7 -0
  265. package/es-modules/Grid/Core/Pagination/Icons.js +7 -0
  266. package/es-modules/Grid/Core/Pagination/Pagination.d.ts +278 -0
  267. package/es-modules/Grid/Core/Pagination/Pagination.js +842 -0
  268. package/es-modules/Grid/Core/Pagination/PaginationOptions.d.ts +228 -0
  269. package/es-modules/Grid/Core/Querying/FilteringController.d.ts +66 -0
  270. package/es-modules/Grid/Core/Querying/FilteringController.js +256 -0
  271. package/es-modules/Grid/Core/Querying/PaginationController.d.ts +50 -0
  272. package/es-modules/Grid/Core/Querying/PaginationController.js +101 -0
  273. package/es-modules/Grid/Core/Querying/QueryingController.d.ts +58 -0
  274. package/es-modules/Grid/Core/Querying/QueryingController.js +127 -0
  275. package/es-modules/Grid/Core/Querying/SortingController.d.ts +67 -0
  276. package/es-modules/Grid/Core/Querying/SortingController.js +136 -0
  277. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/ColumnFiltering.d.ts +114 -0
  278. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/ColumnFiltering.js +351 -0
  279. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.d.ts +14 -0
  280. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.js +86 -0
  281. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.d.ts +19 -0
  282. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.js +80 -0
  283. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilteringTypes.d.ts +52 -0
  284. package/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilteringTypes.js +81 -0
  285. package/es-modules/Grid/Core/Table/Actions/ColumnSorting.d.ts +56 -0
  286. package/es-modules/Grid/Core/Table/Actions/ColumnSorting.js +170 -0
  287. package/es-modules/Grid/Core/Table/Actions/ColumnsResizer.d.ts +55 -0
  288. package/es-modules/Grid/Core/Table/Actions/ColumnsResizer.js +182 -0
  289. package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.d.ts +87 -0
  290. package/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.js +346 -0
  291. package/es-modules/Grid/Core/Table/Body/TableCell.d.ts +88 -0
  292. package/es-modules/Grid/Core/Table/Body/TableCell.js +231 -0
  293. package/es-modules/Grid/Core/Table/Body/TableRow.d.ts +79 -0
  294. package/es-modules/Grid/Core/Table/Body/TableRow.js +177 -0
  295. package/es-modules/Grid/Core/Table/Cell.d.ts +92 -0
  296. package/es-modules/Grid/Core/Table/Cell.js +223 -0
  297. package/es-modules/Grid/Core/Table/CellContent/CellContent.d.ts +30 -0
  298. package/es-modules/Grid/Core/Table/CellContent/CellContent.js +40 -0
  299. package/es-modules/Grid/Core/Table/CellContent/TextContent.d.ts +19 -0
  300. package/es-modules/Grid/Core/Table/CellContent/TextContent.js +98 -0
  301. package/es-modules/Grid/Core/Table/Column.d.ts +136 -0
  302. package/es-modules/Grid/Core/Table/Column.js +230 -0
  303. package/es-modules/Grid/Core/Table/ColumnResizing/AdjacentResizingMode.d.ts +7 -0
  304. package/es-modules/Grid/Core/Table/ColumnResizing/AdjacentResizingMode.js +62 -0
  305. package/es-modules/Grid/Core/Table/ColumnResizing/ColumnResizing.d.ts +32 -0
  306. package/es-modules/Grid/Core/Table/ColumnResizing/ColumnResizing.js +68 -0
  307. package/es-modules/Grid/Core/Table/ColumnResizing/DistributedResizingMode.d.ts +7 -0
  308. package/es-modules/Grid/Core/Table/ColumnResizing/DistributedResizingMode.js +53 -0
  309. package/es-modules/Grid/Core/Table/ColumnResizing/IndependentResizingMode.d.ts +7 -0
  310. package/es-modules/Grid/Core/Table/ColumnResizing/IndependentResizingMode.js +63 -0
  311. package/es-modules/Grid/Core/Table/ColumnResizing/ResizingMode.d.ts +92 -0
  312. package/es-modules/Grid/Core/Table/ColumnResizing/ResizingMode.js +194 -0
  313. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.d.ts +68 -0
  314. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.js +187 -0
  315. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/FilterPopup.d.ts +29 -0
  316. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/FilterPopup.js +77 -0
  317. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/FilterMenuButton.d.ts +13 -0
  318. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/FilterMenuButton.js +79 -0
  319. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/SortMenuButton.d.ts +12 -0
  320. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/SortMenuButton.js +71 -0
  321. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuPopup.d.ts +12 -0
  322. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuPopup.js +66 -0
  323. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/StateHelpers.d.ts +25 -0
  324. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/StateHelpers.js +65 -0
  325. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/FilterToolbarButton.d.ts +12 -0
  326. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/FilterToolbarButton.js +81 -0
  327. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/MenuToolbarButton.d.ts +12 -0
  328. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/MenuToolbarButton.js +80 -0
  329. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.d.ts +11 -0
  330. package/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.js +81 -0
  331. package/es-modules/Grid/Core/Table/Header/HeaderCell.d.ts +70 -0
  332. package/es-modules/Grid/Core/Table/Header/HeaderCell.js +225 -0
  333. package/es-modules/Grid/Core/Table/Header/HeaderRow.d.ts +53 -0
  334. package/es-modules/Grid/Core/Table/Header/HeaderRow.js +182 -0
  335. package/es-modules/Grid/Core/Table/Header/TableHeader.d.ts +65 -0
  336. package/es-modules/Grid/Core/Table/Header/TableHeader.js +159 -0
  337. package/es-modules/Grid/Core/Table/Row.d.ts +76 -0
  338. package/es-modules/Grid/Core/Table/Row.js +131 -0
  339. package/es-modules/Grid/Core/Table/Table.d.ts +181 -0
  340. package/es-modules/Grid/Core/Table/Table.js +399 -0
  341. package/es-modules/Grid/Core/UI/Button.d.ts +31 -0
  342. package/es-modules/Grid/Core/UI/Button.js +16 -0
  343. package/es-modules/Grid/Core/UI/ContextMenu.d.ts +38 -0
  344. package/es-modules/Grid/Core/UI/ContextMenu.js +132 -0
  345. package/es-modules/Grid/Core/UI/ContextMenuButton.d.ts +126 -0
  346. package/es-modules/Grid/Core/UI/ContextMenuButton.js +183 -0
  347. package/es-modules/Grid/Core/UI/Popup.d.ts +149 -0
  348. package/es-modules/Grid/Core/UI/Popup.js +271 -0
  349. package/es-modules/Grid/Core/UI/SvgIcons.d.ts +53 -0
  350. package/es-modules/Grid/Core/UI/SvgIcons.js +158 -0
  351. package/es-modules/Grid/Core/UI/Toolbar.d.ts +16 -0
  352. package/es-modules/Grid/Core/UI/Toolbar.js +16 -0
  353. package/es-modules/Grid/Core/UI/ToolbarButton.d.ts +135 -0
  354. package/es-modules/Grid/Core/UI/ToolbarButton.js +191 -0
  355. package/es-modules/Grid/Pro/CellEditing/CellEditMode.d.ts +112 -0
  356. package/es-modules/Grid/Pro/CellEditing/CellEditing.d.ts +80 -0
  357. package/es-modules/Grid/Pro/CellEditing/CellEditing.js +211 -0
  358. package/es-modules/Grid/Pro/CellEditing/CellEditingComposition.d.ts +123 -0
  359. package/es-modules/Grid/Pro/CellEditing/CellEditingComposition.js +198 -0
  360. package/es-modules/Grid/Pro/CellRendering/CellContentPro.d.ts +23 -0
  361. package/es-modules/Grid/Pro/CellRendering/CellContentPro.js +45 -0
  362. package/es-modules/Grid/Pro/CellRendering/CellRenderer.d.ts +50 -0
  363. package/es-modules/Grid/Pro/CellRendering/CellRenderer.js +41 -0
  364. package/es-modules/Grid/Pro/CellRendering/CellRendererRegistry.d.ts +18 -0
  365. package/es-modules/Grid/Pro/CellRendering/CellRendererRegistry.js +58 -0
  366. package/es-modules/Grid/Pro/CellRendering/CellRendererType.d.ts +48 -0
  367. package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.d.ts +18 -0
  368. package/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.js +79 -0
  369. package/es-modules/Grid/Pro/CellRendering/ContentTypes/CheckboxContent.d.ts +30 -0
  370. package/es-modules/Grid/Pro/CellRendering/ContentTypes/CheckboxContent.js +122 -0
  371. package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContent.d.ts +12 -0
  372. package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContent.js +39 -0
  373. package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContentBase.d.ts +66 -0
  374. package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContentBase.js +145 -0
  375. package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateTimeInputContent.d.ts +12 -0
  376. package/es-modules/Grid/Pro/CellRendering/ContentTypes/DateTimeInputContent.js +38 -0
  377. package/es-modules/Grid/Pro/CellRendering/ContentTypes/NumberInputContent.d.ts +58 -0
  378. package/es-modules/Grid/Pro/CellRendering/ContentTypes/NumberInputContent.js +158 -0
  379. package/es-modules/Grid/Pro/CellRendering/ContentTypes/SelectContent.d.ts +58 -0
  380. package/es-modules/Grid/Pro/CellRendering/ContentTypes/SelectContent.js +173 -0
  381. package/es-modules/Grid/Pro/CellRendering/ContentTypes/SparklineContent.d.ts +28 -0
  382. package/es-modules/Grid/Pro/CellRendering/ContentTypes/SparklineContent.js +157 -0
  383. package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.d.ts +58 -0
  384. package/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.js +168 -0
  385. package/es-modules/Grid/Pro/CellRendering/ContentTypes/TimeInputContent.d.ts +13 -0
  386. package/es-modules/Grid/Pro/CellRendering/ContentTypes/TimeInputContent.js +41 -0
  387. package/es-modules/Grid/Pro/CellRendering/Renderers/CheckboxRenderer.d.ts +50 -0
  388. package/es-modules/Grid/Pro/CellRendering/Renderers/CheckboxRenderer.js +65 -0
  389. package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRenderer.d.ts +37 -0
  390. package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRenderer.js +65 -0
  391. package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRendererBase.d.ts +26 -0
  392. package/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRendererBase.js +16 -0
  393. package/es-modules/Grid/Pro/CellRendering/Renderers/DateTimeInputRenderer.d.ts +37 -0
  394. package/es-modules/Grid/Pro/CellRendering/Renderers/DateTimeInputRenderer.js +64 -0
  395. package/es-modules/Grid/Pro/CellRendering/Renderers/NumberInputRenderer.d.ts +52 -0
  396. package/es-modules/Grid/Pro/CellRendering/Renderers/NumberInputRenderer.js +64 -0
  397. package/es-modules/Grid/Pro/CellRendering/Renderers/SelectRenderer.d.ts +74 -0
  398. package/es-modules/Grid/Pro/CellRendering/Renderers/SelectRenderer.js +66 -0
  399. package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.d.ts +45 -0
  400. package/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.js +89 -0
  401. package/es-modules/Grid/Pro/CellRendering/Renderers/TextInputRenderer.d.ts +54 -0
  402. package/es-modules/Grid/Pro/CellRendering/Renderers/TextInputRenderer.js +65 -0
  403. package/es-modules/Grid/Pro/CellRendering/Renderers/TextRenderer.d.ts +43 -0
  404. package/es-modules/Grid/Pro/CellRendering/Renderers/TextRenderer.js +74 -0
  405. package/es-modules/Grid/Pro/CellRendering/Renderers/TimeInputRenderer.d.ts +37 -0
  406. package/es-modules/Grid/Pro/CellRendering/Renderers/TimeInputRenderer.js +64 -0
  407. package/es-modules/Grid/Pro/ColumnTypes/ColumnDataType.d.ts +29 -0
  408. package/es-modules/Grid/Pro/ColumnTypes/Validator.d.ts +118 -0
  409. package/es-modules/Grid/Pro/ColumnTypes/Validator.js +270 -0
  410. package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.d.ts +32 -0
  411. package/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.js +63 -0
  412. package/es-modules/Grid/Pro/Credits/CreditsPro.d.ts +35 -0
  413. package/es-modules/Grid/Pro/Credits/CreditsPro.js +112 -0
  414. package/es-modules/Grid/Pro/Credits/CreditsProComposition.d.ts +28 -0
  415. package/es-modules/Grid/Pro/Credits/CreditsProComposition.js +61 -0
  416. package/es-modules/Grid/Pro/Export/Exporting.d.ts +68 -0
  417. package/es-modules/Grid/Pro/Export/Exporting.js +202 -0
  418. package/es-modules/Grid/Pro/Export/ExportingComposition.d.ts +68 -0
  419. package/es-modules/Grid/Pro/Export/ExportingComposition.js +55 -0
  420. package/es-modules/Grid/Pro/GridEvents.d.ts +119 -0
  421. package/es-modules/Grid/Pro/GridEvents.js +107 -0
  422. package/es-modules/Grid/Pro/Pagination/PaginationComposition.d.ts +75 -0
  423. package/es-modules/Grid/Pro/Pagination/PaginationComposition.js +76 -0
  424. package/es-modules/Grid/Pro/highcharts.d.ts +7 -0
  425. package/es-modules/Grid/index.d.ts +5 -0
  426. package/es-modules/Grid/index.js +19 -0
  427. package/es-modules/Shared/BaseForm.d.ts +49 -0
  428. package/es-modules/Shared/BaseForm.js +126 -0
  429. package/es-modules/Shared/DownloadURL.d.ts +85 -0
  430. package/es-modules/Shared/DownloadURL.js +198 -0
  431. package/es-modules/Shared/LangOptionsCore.d.ts +27 -0
  432. package/es-modules/Shared/TimeBase.d.ts +353 -0
  433. package/es-modules/Shared/TimeBase.js +830 -0
  434. package/es-modules/Shared/Types.d.ts +48 -0
  435. package/es-modules/masters/grid-pro.src.d.ts +99 -0
  436. package/es-modules/masters/grid-pro.src.js +129 -0
  437. package/grid-pro.d.ts +50 -0
  438. package/grid-pro.js +12 -0
  439. package/grid-pro.js.map +1 -0
  440. package/grid-pro.src.d.ts +50 -0
  441. package/grid-pro.src.js +26623 -0
  442. package/package.json +21 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["<anon>"],"sourcesContent":["/**\n * @license Highcharts Grid Pro v2.0.0 (2025-10-28)\n * @module grid/grid-pro\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\t(root[\"_Grid\"] = factory(),module.exports = root[\"_Grid\"]);\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"grid/grid-pro\", [], factory);\n\telse if(typeof exports === 'object')\n\t\t(root[\"_Grid\"] = factory(),exports[\"grid/grid-pro\"] = root[\"_Grid\"]);\n\telse\n\t\t((root[\"Grid\"] && root[\"Grid\"].error(16, true)), root[\"Grid\"] = factory());\n})(typeof window === 'undefined' ? this : window, () => {\nreturn /******/ (() => { // webpackBootstrap\n/******/ \t\"use strict\";\n/******/ \t// The require scope\n/******/ \tvar __webpack_require__ = {};\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t(() => {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__webpack_require__.d = (exports, definition) => {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t})();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t(() => {\n/******/ \t\t__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))\n/******/ \t})();\n/******/ \t\n/************************************************************************/\nvar __webpack_exports__ = {};\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (/* binding */ grid_pro_src)\n});\n\n;// ./code/grid/es-modules/Core/Globals.js\n/* *\n *\n * (c) 2010-2025 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n\n/* *\n *\n * Namespace\n *\n * */\n/**\n * Shared Highcharts properties.\n * @private\n */\nvar Globals;\n(function (Globals) {\n /* *\n *\n * Constants\n *\n * */\n Globals.SVG_NS = 'http://www.w3.org/2000/svg', Globals.product = 'Highcharts', Globals.version = '2.0.0', Globals.win = (typeof window !== 'undefined' ?\n window :\n {}), // eslint-disable-line node/no-unsupported-features/es-builtins\n Globals.doc = Globals.win.document, Globals.svg = !!Globals.doc?.createElementNS?.(Globals.SVG_NS, 'svg')?.createSVGRect, Globals.pageLang = Globals.doc?.documentElement?.closest('[lang]')?.lang, Globals.userAgent = Globals.win.navigator?.userAgent || '', Globals.isChrome = Globals.win.chrome, Globals.isFirefox = Globals.userAgent.indexOf('Firefox') !== -1, Globals.isMS = /(edge|msie|trident)/i.test(Globals.userAgent) && !Globals.win.opera, Globals.isSafari = !Globals.isChrome && Globals.userAgent.indexOf('Safari') !== -1, Globals.isTouchDevice = /(Mobile|Android|Windows Phone)/.test(Globals.userAgent), Globals.isWebKit = Globals.userAgent.indexOf('AppleWebKit') !== -1, Globals.deg2rad = Math.PI * 2 / 360, Globals.marginNames = [\n 'plotTop',\n 'marginRight',\n 'marginBottom',\n 'plotLeft'\n ], Globals.noop = function () { }, Globals.supportsPassiveEvents = (function () {\n // Checks whether the browser supports passive events, (#11353).\n let supportsPassive = false;\n // Object.defineProperty doesn't work on IE as well as passive\n // events - instead of using polyfill, we can exclude IE totally.\n if (!Globals.isMS) {\n const opts = Object.defineProperty({}, 'passive', {\n get: function () {\n supportsPassive = true;\n }\n });\n if (Globals.win.addEventListener && Globals.win.removeEventListener) {\n Globals.win.addEventListener('testPassive', Globals.noop, opts);\n Globals.win.removeEventListener('testPassive', Globals.noop, opts);\n }\n }\n return supportsPassive;\n }());\n /**\n * An array containing the current chart objects in the page. A chart's\n * position in the array is preserved throughout the page's lifetime. When\n * a chart is destroyed, the array item becomes `undefined`.\n *\n * @name Highcharts.charts\n * @type {Array<Highcharts.Chart|undefined>}\n */\n Globals.charts = [];\n /**\n * A shared registry between all bundles to keep track of applied\n * compositions.\n * @private\n */\n Globals.composed = [];\n /**\n * A hook for defining additional date format specifiers. New\n * specifiers are defined as key-value pairs by using the\n * specifier as key, and a function which takes the timestamp as\n * value. This function returns the formatted portion of the\n * date.\n *\n * Using `dateFormats` is also a convenient way to define new keys for\n * complex locale-aware date formats compatible with the\n * [Intl.DateTimeFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat)\n * browser API, whenever the built-in formats are not sufficient.\n *\n * @sample highcharts/global/dateformats/\n * Adding support for week number\n * @sample highcharts/global/dateformats-object/\n * A locale-aware date format using `Intl.DateTimeFormat`\n *\n * @name Highcharts.dateFormats\n * @type {Record<string, Highcharts.TimeFormatCallbackFunction>}\n */\n Globals.dateFormats = {};\n /**\n * @private\n * @deprecated\n * @todo Use only `Core/Series/SeriesRegistry.seriesTypes`\n */\n Globals.seriesTypes = {};\n /**\n * @private\n */\n Globals.symbolSizes = {};\n /* *\n *\n * Properties\n *\n * */\n // eslint-disable-next-line prefer-const\n Globals.chartCount = 0;\n})(Globals || (Globals = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Core_Globals = (Globals);\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * Theme options that should get applied to the chart. In module mode it\n * might not be possible to change this property because of read-only\n * restrictions, instead use {@link Highcharts.setOptions}.\n *\n * @deprecated\n * @name Highcharts.theme\n * @type {Highcharts.Options}\n */\n(''); // Keeps doclets above in JS file\n\n;// ./code/grid/es-modules/Core/Utilities.js\n/* *\n *\n * (c) 2010-2025 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n\n\nconst { charts, doc, win } = Core_Globals;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Provide error messages for debugging, with links to online explanation. This\n * function can be overridden to provide custom error handling.\n *\n * @sample highcharts/chart/highcharts-error/\n * Custom error handler\n *\n * @function Highcharts.error\n *\n * @param {number|string} code\n * The error code. See\n * [errors.xml](https://github.com/highcharts/highcharts/blob/master/errors/errors.xml)\n * for available codes. If it is a string, the error message is printed\n * directly in the console.\n *\n * @param {boolean} [stop=false]\n * Whether to throw an error or just log a warning in the console.\n *\n * @param {Highcharts.Chart} [chart]\n * Reference to the chart that causes the error. Used in 'debugger'\n * module to display errors directly on the chart.\n * Important note: This argument is undefined for errors that lack\n * access to the Chart instance. In such case, the error will be\n * displayed on the last created chart.\n *\n * @param {Highcharts.Dictionary<string>} [params]\n * Additional parameters for the generated message.\n *\n * @return {void}\n */\nfunction error(code, stop, chart, params) {\n const severity = stop ? 'Highcharts error' : 'Highcharts warning';\n if (code === 32) {\n code = `${severity}: Deprecated member`;\n }\n const isCode = isNumber(code);\n let message = isCode ?\n `${severity} #${code}: www.highcharts.com/errors/${code}/` :\n code.toString();\n const defaultHandler = function () {\n if (stop) {\n throw new Error(message);\n }\n // Else ...\n if (win.console &&\n error.messages.indexOf(message) === -1 // Prevent console flooting\n ) {\n console.warn(message); // eslint-disable-line no-console\n }\n };\n if (typeof params !== 'undefined') {\n let additionalMessages = '';\n if (isCode) {\n message += '?';\n }\n objectEach(params, function (value, key) {\n additionalMessages += `\\n - ${key}: ${value}`;\n if (isCode) {\n message += encodeURI(key) + '=' + encodeURI(value);\n }\n });\n message += additionalMessages;\n }\n fireEvent(Core_Globals, 'displayError', { chart, code, message, params }, defaultHandler);\n error.messages.push(message);\n}\n(function (error) {\n error.messages = [];\n})(error || (error = {}));\n/**\n * Utility function to deep merge two or more objects and return a third object.\n * If the first argument is true, the contents of the second object is copied\n * into the first object. The merge function can also be used with a single\n * object argument to create a deep copy of an object.\n *\n * @function Highcharts.merge<T>\n *\n * @param {true | T} extendOrSource\n * Whether to extend the left-side object,\n * or the first object to merge as a deep copy.\n *\n * @param {...Array<object|undefined>} [sources]\n * Object(s) to merge into the previous one.\n *\n * @return {T}\n * The merged object. If the first argument is true, the return is the\n * same as the second argument.\n */\nfunction merge(extendOrSource, ...sources) {\n let i, args = [extendOrSource, ...sources], ret = {};\n const doCopy = function (copy, original) {\n // An object is replacing a primitive\n if (typeof copy !== 'object') {\n copy = {};\n }\n objectEach(original, function (value, key) {\n // Prototype pollution (#14883)\n if (key === '__proto__' || key === 'constructor') {\n return;\n }\n // Copy the contents of objects, but not arrays or DOM nodes\n if (isObject(value, true) &&\n !isClass(value) &&\n !isDOMElement(value)) {\n copy[key] = doCopy(copy[key] || {}, value);\n // Primitives and arrays are copied over directly\n }\n else {\n copy[key] = original[key];\n }\n });\n return copy;\n };\n // If first argument is true, copy into the existing object. Used in\n // setOptions.\n if (extendOrSource === true) {\n ret = args[1];\n args = Array.prototype.slice.call(args, 2);\n }\n // For each argument, extend the return\n const len = args.length;\n for (i = 0; i < len; i++) {\n ret = doCopy(ret, args[i]);\n }\n return ret;\n}\n/**\n * Constrain a value to within a lower and upper threshold.\n *\n * @private\n * @param {number} value The initial value\n * @param {number} min The lower threshold\n * @param {number} max The upper threshold\n * @return {number} Returns a number value within min and max.\n */\nfunction clamp(value, min, max) {\n return value > min ? value < max ? value : max : min;\n}\n/**\n * Utility for crisping a line position to the nearest full pixel depening on\n * the line width\n * @param {number} value The raw pixel position\n * @param {number} lineWidth The line width\n * @param {boolean} [inverted] Whether the containing group is inverted.\n * Crisping round numbers on the y-scale need to go\n * to the other side because the coordinate system\n * is flipped (scaleY is -1)\n * @return {number} The pixel position to use for a crisp display\n */\nfunction crisp(value, lineWidth = 0, inverted) {\n const mod = lineWidth % 2 / 2, inverter = inverted ? -1 : 1;\n return (Math.round(value * inverter - mod) + mod) * inverter;\n}\n// eslint-disable-next-line valid-jsdoc\n/**\n * Return the deep difference between two objects. It can either return the new\n * properties, or optionally return the old values of new properties.\n * @private\n */\nfunction diffObjects(newer, older, keepOlder, collectionsWithUpdate) {\n const ret = {};\n /**\n * Recurse over a set of options and its current values, and store the\n * current values in the ret object.\n */\n function diff(newer, older, ret, depth) {\n const keeper = keepOlder ? older : newer;\n objectEach(newer, function (newerVal, key) {\n if (!depth &&\n collectionsWithUpdate &&\n collectionsWithUpdate.indexOf(key) > -1 &&\n older[key]) {\n newerVal = splat(newerVal);\n ret[key] = [];\n // Iterate over collections like series, xAxis or yAxis and map\n // the items by index.\n for (let i = 0; i < Math.max(newerVal.length, older[key].length); i++) {\n // Item exists in current data (#6347)\n if (older[key][i]) {\n // If the item is missing from the new data, we need to\n // save the whole config structure. Like when\n // responsively updating from a dual axis layout to a\n // single axis and back (#13544).\n if (newerVal[i] === void 0) {\n ret[key][i] = older[key][i];\n // Otherwise, proceed\n }\n else {\n ret[key][i] = {};\n diff(newerVal[i], older[key][i], ret[key][i], depth + 1);\n }\n }\n }\n }\n else if (isObject(newerVal, true) &&\n !newerVal.nodeType // #10044\n ) {\n ret[key] = isArray(newerVal) ? [] : {};\n diff(newerVal, older[key] || {}, ret[key], depth + 1);\n // Delete empty nested objects\n if (Object.keys(ret[key]).length === 0 &&\n // Except colorAxis which is a special case where the empty\n // object means it is enabled. Which is unfortunate and we\n // should try to find a better way.\n !(key === 'colorAxis' && depth === 0)) {\n delete ret[key];\n }\n }\n else if (newer[key] !== older[key] ||\n // If the newer key is explicitly undefined, keep it (#10525)\n (key in newer && !(key in older))) {\n if (key !== '__proto__' && key !== 'constructor') {\n ret[key] = keeper[key];\n }\n }\n });\n }\n diff(newer, older, ret, 0);\n return ret;\n}\n/**\n * Shortcut for parseInt\n *\n * @private\n * @function Highcharts.pInt\n *\n * @param {*} s\n * any\n *\n * @param {number} [mag]\n * Magnitude\n *\n * @return {number}\n * number\n */\nfunction pInt(s, mag) {\n return parseInt(s, mag || 10);\n}\n/**\n * Utility function to check for string type.\n *\n * @function Highcharts.isString\n *\n * @param {*} s\n * The item to check.\n *\n * @return {boolean}\n * True if the argument is a string.\n */\nfunction isString(s) {\n return typeof s === 'string';\n}\n/**\n * Utility function to check if an item is an array.\n *\n * @function Highcharts.isArray\n *\n * @param {*} obj\n * The item to check.\n *\n * @return {boolean}\n * True if the argument is an array.\n */\nfunction isArray(obj) {\n const str = Object.prototype.toString.call(obj);\n return str === '[object Array]' || str === '[object Array Iterator]';\n}\n/**\n * Utility function to check if an item is of type object.\n *\n * @function Highcharts.isObject\n *\n * @param {*} obj\n * The item to check.\n *\n * @param {boolean} [strict=false]\n * Also checks that the object is not an array.\n *\n * @return {boolean}\n * True if the argument is an object.\n */\nfunction isObject(obj, strict) {\n return (!!obj &&\n typeof obj === 'object' &&\n (!strict || !isArray(obj))); // eslint-disable-line @typescript-eslint/no-explicit-any\n}\n/**\n * Utility function to check if an Object is a HTML Element.\n *\n * @function Highcharts.isDOMElement\n *\n * @param {*} obj\n * The item to check.\n *\n * @return {boolean}\n * True if the argument is a HTML Element.\n */\nfunction isDOMElement(obj) {\n return isObject(obj) && typeof obj.nodeType === 'number';\n}\n/**\n * Utility function to check if an Object is a class.\n *\n * @function Highcharts.isClass\n *\n * @param {object|undefined} obj\n * The item to check.\n *\n * @return {boolean}\n * True if the argument is a class.\n */\nfunction isClass(obj) {\n const c = obj?.constructor;\n return !!(isObject(obj, true) &&\n !isDOMElement(obj) &&\n (c?.name && c.name !== 'Object'));\n}\n/**\n * Utility function to check if an item is a number and it is finite (not NaN,\n * Infinity or -Infinity).\n *\n * @function Highcharts.isNumber\n *\n * @param {*} n\n * The item to check.\n *\n * @return {boolean}\n * True if the item is a finite number\n */\nfunction isNumber(n) {\n return typeof n === 'number' && !isNaN(n) && n < Infinity && n > -Infinity;\n}\n/**\n * Remove the last occurence of an item from an array.\n *\n * @function Highcharts.erase\n *\n * @param {Array<*>} arr\n * The array.\n *\n * @param {*} item\n * The item to remove.\n *\n * @return {void}\n */\nfunction erase(arr, item) {\n let i = arr.length;\n while (i--) {\n if (arr[i] === item) {\n arr.splice(i, 1);\n break;\n }\n }\n}\n/**\n * Insert a series or an axis in a collection with other items, either the\n * chart series or yAxis series or axis collections, in the correct order\n * according to the index option and whether it is internal. Used internally\n * when adding series and axes.\n *\n * @private\n * @function Highcharts.Chart#insertItem\n * @param {Highcharts.Series|Highcharts.Axis} item\n * The item to insert\n * @param {Array<Highcharts.Series>|Array<Highcharts.Axis>} collection\n * A collection of items, like `chart.series` or `xAxis.series`.\n * @return {number} The index of the series in the collection.\n */\nfunction insertItem(item, collection) {\n const indexOption = item.options.index, length = collection.length;\n let i;\n for (\n // Internal item (navigator) should always be pushed to the end\n i = item.options.isInternal ? length : 0; i < length + 1; i++) {\n if (\n // No index option, reached the end of the collection,\n // equivalent to pushing\n !collection[i] ||\n // Handle index option, the element to insert has lower index\n (isNumber(indexOption) &&\n indexOption < pick(collection[i].options.index, collection[i]._i)) ||\n // Insert the new item before other internal items\n // (navigator)\n collection[i].options.isInternal) {\n collection.splice(i, 0, item);\n break;\n }\n }\n return i;\n}\n/**\n * Adds an item to an array, if it is not present in the array.\n *\n * @function Highcharts.pushUnique\n *\n * @param {Array<unknown>} array\n * The array to add the item to.\n *\n * @param {unknown} item\n * The item to add.\n *\n * @return {boolean}\n * Returns true, if the item was not present and has been added.\n */\nfunction pushUnique(array, item) {\n return array.indexOf(item) < 0 && !!array.push(item);\n}\n/**\n * Check if an object is null or undefined.\n *\n * @function Highcharts.defined\n *\n * @param {*} obj\n * The object to check.\n *\n * @return {boolean}\n * False if the object is null or undefined, otherwise true.\n */\nfunction defined(obj) {\n return typeof obj !== 'undefined' && obj !== null;\n}\n/**\n * Set or get an attribute or an object of attributes.\n *\n * To use as a setter, pass a key and a value, or let the second argument be a\n * collection of keys and values. When using a collection, passing a value of\n * `null` or `undefined` will remove the attribute.\n *\n * To use as a getter, pass only a string as the second argument.\n *\n * @function Highcharts.attr\n *\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} elem\n * The DOM element to receive the attribute(s).\n *\n * @param {string|Highcharts.HTMLAttributes|Highcharts.SVGAttributes} [keyOrAttribs]\n * The property or an object of key-value pairs.\n *\n * @param {number|string} [value]\n * The value if a single property is set.\n *\n * @return {string|null|undefined}\n * When used as a getter, return the value.\n */\nfunction attr(elem, keyOrAttribs, value) {\n const isGetter = isString(keyOrAttribs) && !defined(value);\n let ret;\n const attrSingle = (value, key) => {\n // Set the value\n if (defined(value)) {\n elem.setAttribute(key, value);\n // Get the value\n }\n else if (isGetter) {\n ret = elem.getAttribute(key);\n // IE7 and below cannot get class through getAttribute (#7850)\n if (!ret && key === 'class') {\n ret = elem.getAttribute(key + 'Name');\n }\n // Remove the value\n }\n else {\n elem.removeAttribute(key);\n }\n };\n // If keyOrAttribs is a string\n if (isString(keyOrAttribs)) {\n attrSingle(value, keyOrAttribs);\n // Else if keyOrAttribs is defined, it is a hash of key/value pairs\n }\n else {\n objectEach(keyOrAttribs, attrSingle);\n }\n return ret;\n}\n/**\n * Check if an element is an array, and if not, make it into an array.\n *\n * @function Highcharts.splat\n *\n * @param {*} obj\n * The object to splat.\n *\n * @return {Array}\n * The produced or original array.\n */\nfunction splat(obj) {\n return isArray(obj) ? obj : [obj];\n}\n/**\n * Set a timeout if the delay is given, otherwise perform the function\n * synchronously.\n *\n * @function Highcharts.syncTimeout\n *\n * @param {Function} fn\n * The function callback.\n *\n * @param {number} delay\n * Delay in milliseconds.\n *\n * @param {*} [context]\n * An optional context to send to the function callback.\n *\n * @return {number}\n * An identifier for the timeout that can later be cleared with\n * Highcharts.clearTimeout. Returns -1 if there is no timeout.\n */\nfunction syncTimeout(fn, delay, context) {\n if (delay > 0) {\n return setTimeout(fn, delay, context);\n }\n fn.call(0, context);\n return -1;\n}\n/**\n * Internal clear timeout. The function checks that the `id` was not removed\n * (e.g. by `chart.destroy()`). For the details see\n * [issue #7901](https://github.com/highcharts/highcharts/issues/7901).\n *\n * @function Highcharts.clearTimeout\n *\n * @param {number|undefined} id\n * Id of a timeout.\n */\nfunction internalClearTimeout(id) {\n if (defined(id)) {\n clearTimeout(id);\n }\n}\n/* eslint-disable valid-jsdoc */\n/**\n * Utility function to extend an object with the members of another.\n *\n * @function Highcharts.extend<T>\n *\n * @param {T|undefined} a\n * The object to be extended.\n *\n * @param {Partial<T>} b\n * The object to add to the first one.\n *\n * @return {T}\n * Object a, the original object.\n */\nfunction extend(a, b) {\n /* eslint-enable valid-jsdoc */\n let n;\n if (!a) {\n a = {};\n }\n for (n in b) { // eslint-disable-line guard-for-in\n a[n] = b[n];\n }\n return a;\n}\n/* eslint-disable valid-jsdoc */\n/**\n * Return the first value that is not null or undefined.\n *\n * @function Highcharts.pick<T>\n *\n * @param {...Array<T|null|undefined>} items\n * Variable number of arguments to inspect.\n *\n * @return {T}\n * The value of the first argument that is not null or undefined.\n */\nfunction pick() {\n const args = arguments;\n const length = args.length;\n for (let i = 0; i < length; i++) {\n const arg = args[i];\n if (typeof arg !== 'undefined' && arg !== null) {\n return arg;\n }\n }\n}\n/**\n * Set CSS on a given element.\n *\n * @function Highcharts.css\n *\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} el\n * An HTML DOM element.\n *\n * @param {Highcharts.CSSObject} styles\n * Style object with camel case property names.\n *\n * @return {void}\n */\nfunction css(el, styles) {\n extend(el.style, styles);\n}\n/**\n * Utility function to create an HTML element with attributes and styles.\n *\n * @function Highcharts.createElement\n *\n * @param {string} tag\n * The HTML tag.\n *\n * @param {Highcharts.HTMLAttributes} [attribs]\n * Attributes as an object of key-value pairs.\n *\n * @param {Highcharts.CSSObject} [styles]\n * Styles as an object of key-value pairs.\n *\n * @param {Highcharts.HTMLDOMElement} [parent]\n * The parent HTML object.\n *\n * @param {boolean} [nopad=false]\n * If true, remove all padding, border and margin.\n *\n * @return {Highcharts.HTMLDOMElement}\n * The created DOM element.\n */\nfunction createElement(tag, attribs, styles, parent, nopad) {\n const el = doc.createElement(tag);\n if (attribs) {\n extend(el, attribs);\n }\n if (nopad) {\n css(el, { padding: '0', border: 'none', margin: '0' });\n }\n if (styles) {\n css(el, styles);\n }\n if (parent) {\n parent.appendChild(el);\n }\n return el;\n}\n// eslint-disable-next-line valid-jsdoc\n/**\n * Extend a prototyped class by new members.\n *\n * @deprecated\n * @function Highcharts.extendClass<T>\n *\n * @param {Highcharts.Class<T>} parent\n * The parent prototype to inherit.\n *\n * @param {Highcharts.Dictionary<*>} members\n * A collection of prototype members to add or override compared to the\n * parent prototype.\n *\n * @return {Highcharts.Class<T>}\n * A new prototype.\n */\nfunction extendClass(parent, members) {\n const obj = (function () { });\n obj.prototype = new parent(); // eslint-disable-line new-cap\n extend(obj.prototype, members);\n return obj;\n}\n/**\n * Left-pad a string to a given length by adding a character repetitively.\n *\n * @function Highcharts.pad\n *\n * @param {number} number\n * The input string or number.\n *\n * @param {number} [length]\n * The desired string length.\n *\n * @param {string} [padder=0]\n * The character to pad with.\n *\n * @return {string}\n * The padded string.\n */\nfunction pad(number, length, padder) {\n return new Array((length || 2) +\n 1 -\n String(number)\n .replace('-', '')\n .length).join(padder || '0') + number;\n}\n/**\n * Return a length based on either the integer value, or a percentage of a base.\n *\n * @function Highcharts.relativeLength\n *\n * @param {Highcharts.RelativeSize} value\n * A percentage string or a number.\n *\n * @param {number} base\n * The full length that represents 100%.\n *\n * @param {number} [offset=0]\n * A pixel offset to apply for percentage values. Used internally in\n * axis positioning.\n *\n * @return {number}\n * The computed length.\n */\nfunction relativeLength(value, base, offset) {\n return (/%$/).test(value) ?\n (base * parseFloat(value) / 100) + (offset || 0) :\n parseFloat(value);\n}\n/**\n * Replaces text in a string with a given replacement in a loop to catch nested\n * matches after previous replacements.\n *\n * @function Highcharts.replaceNested\n *\n * @param {string} text\n * Text to search and modify.\n *\n * @param {...Array<(RegExp|string)>} replacements\n * One or multiple tuples with search pattern (`[0]: (string|RegExp)`) and\n * replacement (`[1]: string`) for matching text.\n *\n * @return {string}\n * Text with replacements.\n */\nfunction replaceNested(text, ...replacements) {\n let previous, replacement;\n do {\n previous = text;\n for (replacement of replacements) {\n text = text.replace(replacement[0], replacement[1]);\n }\n } while (text !== previous);\n return text;\n}\n/**\n * Wrap a method with extended functionality, preserving the original function.\n *\n * @function Highcharts.wrap\n *\n * @param {*} obj\n * The context object that the method belongs to. In real cases, this is\n * often a prototype.\n *\n * @param {string} method\n * The name of the method to extend.\n *\n * @param {Highcharts.WrapProceedFunction} func\n * A wrapper function callback. This function is called with the same\n * arguments as the original function, except that the original function\n * is unshifted and passed as the first argument.\n */\nfunction wrap(obj, method, func) {\n const proceed = obj[method];\n obj[method] = function () {\n const outerArgs = arguments, scope = this;\n return func.apply(this, [\n function () {\n return proceed.apply(scope, arguments.length ? arguments : outerArgs);\n }\n ].concat([].slice.call(arguments)));\n };\n}\n/**\n * Get the magnitude of a number.\n *\n * @function Highcharts.getMagnitude\n *\n * @param {number} num\n * The number.\n *\n * @return {number}\n * The magnitude, where 1-9 are magnitude 1, 10-99 magnitude 2 etc.\n */\nfunction getMagnitude(num) {\n return Math.pow(10, Math.floor(Math.log(num) / Math.LN10));\n}\n/**\n * Take an interval and normalize it to multiples of round numbers.\n *\n * @deprecated\n * @function Highcharts.normalizeTickInterval\n *\n * @param {number} interval\n * The raw, un-rounded interval.\n *\n * @param {Array<*>} [multiples]\n * Allowed multiples.\n *\n * @param {number} [magnitude]\n * The magnitude of the number.\n *\n * @param {boolean} [allowDecimals]\n * Whether to allow decimals.\n *\n * @param {boolean} [hasTickAmount]\n * If it has tickAmount, avoid landing on tick intervals lower than\n * original.\n *\n * @return {number}\n * The normalized interval.\n *\n * @todo\n * Move this function to the Axis prototype. It is here only for historical\n * reasons.\n */\nfunction normalizeTickInterval(interval, multiples, magnitude, allowDecimals, hasTickAmount) {\n let i, retInterval = interval;\n // Round to a tenfold of 1, 2, 2.5 or 5\n magnitude = pick(magnitude, getMagnitude(interval));\n const normalized = interval / magnitude;\n // Multiples for a linear scale\n if (!multiples) {\n multiples = hasTickAmount ?\n // Finer grained ticks when the tick amount is hard set, including\n // when alignTicks is true on multiple axes (#4580).\n [1, 1.2, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10] :\n // Else, let ticks fall on rounder numbers\n [1, 2, 2.5, 5, 10];\n // The allowDecimals option\n if (allowDecimals === false) {\n if (magnitude === 1) {\n multiples = multiples.filter(function (num) {\n return num % 1 === 0;\n });\n }\n else if (magnitude <= 0.1) {\n multiples = [1 / magnitude];\n }\n }\n }\n // Normalize the interval to the nearest multiple\n for (i = 0; i < multiples.length; i++) {\n retInterval = multiples[i];\n // Only allow tick amounts smaller than natural\n if ((hasTickAmount &&\n retInterval * magnitude >= interval) ||\n (!hasTickAmount &&\n (normalized <=\n (multiples[i] +\n (multiples[i + 1] || multiples[i])) / 2))) {\n break;\n }\n }\n // Multiply back to the correct magnitude. Correct floats to appropriate\n // precision (#6085).\n retInterval = correctFloat(retInterval * magnitude, -Math.round(Math.log(0.001) / Math.LN10));\n return retInterval;\n}\n/**\n * Sort an object array and keep the order of equal items. The ECMAScript\n * standard does not specify the behaviour when items are equal.\n *\n * @function Highcharts.stableSort\n *\n * @param {Array<*>} arr\n * The array to sort.\n *\n * @param {Function} sortFunction\n * The function to sort it with, like with regular Array.prototype.sort.\n */\nfunction stableSort(arr, sortFunction) {\n // @todo It seems like Chrome since v70 sorts in a stable way internally,\n // plus all other browsers do it, so over time we may be able to remove this\n // function\n const length = arr.length;\n let sortValue, i;\n // Add index to each item\n for (i = 0; i < length; i++) {\n arr[i].safeI = i; // Stable sort index\n }\n arr.sort(function (a, b) {\n sortValue = sortFunction(a, b);\n return sortValue === 0 ? a.safeI - b.safeI : sortValue;\n });\n // Remove index from items\n for (i = 0; i < length; i++) {\n delete arr[i].safeI; // Stable sort index\n }\n}\n/**\n * Non-recursive method to find the lowest member of an array. `Math.min` raises\n * a maximum call stack size exceeded error in Chrome when trying to apply more\n * than 150.000 points. This method is slightly slower, but safe.\n *\n * @function Highcharts.arrayMin\n *\n * @param {Array<*>} data\n * An array of numbers.\n *\n * @return {number}\n * The lowest number.\n */\nfunction arrayMin(data) {\n let i = data.length, min = data[0];\n while (i--) {\n if (data[i] < min) {\n min = data[i];\n }\n }\n return min;\n}\n/**\n * Non-recursive method to find the lowest member of an array. `Math.max` raises\n * a maximum call stack size exceeded error in Chrome when trying to apply more\n * than 150.000 points. This method is slightly slower, but safe.\n *\n * @function Highcharts.arrayMax\n *\n * @param {Array<*>} data\n * An array of numbers.\n *\n * @return {number}\n * The highest number.\n */\nfunction arrayMax(data) {\n let i = data.length, max = data[0];\n while (i--) {\n if (data[i] > max) {\n max = data[i];\n }\n }\n return max;\n}\n/**\n * Utility method that destroys any SVGElement instances that are properties on\n * the given object. It loops all properties and invokes destroy if there is a\n * destroy method. The property is then delete.\n *\n * @function Highcharts.destroyObjectProperties\n *\n * @param {*} obj\n * The object to destroy properties on.\n *\n * @param {*} [except]\n * Exception, do not destroy this property, only delete it.\n */\nfunction destroyObjectProperties(obj, except, destructablesOnly) {\n objectEach(obj, function (val, n) {\n // If the object is non-null and destroy is defined\n if (val !== except && val?.destroy) {\n // Invoke the destroy\n val.destroy();\n }\n // Delete the property from the object\n if (val?.destroy || !destructablesOnly) {\n delete obj[n];\n }\n });\n}\n/**\n * Discard a HTML element\n *\n * @function Highcharts.discardElement\n *\n * @param {Highcharts.HTMLDOMElement} element\n * The HTML node to discard.\n */\nfunction discardElement(element) {\n element?.parentElement?.removeChild(element);\n}\n/**\n * Fix JS round off float errors.\n *\n * @function Highcharts.correctFloat\n *\n * @param {number} num\n * A float number to fix.\n *\n * @param {number} [prec=14]\n * The precision.\n *\n * @return {number}\n * The corrected float number.\n */\nfunction correctFloat(num, prec) {\n // When the number is higher than 1e14 use the number (#16275)\n return num > 1e14 ? num : parseFloat(num.toPrecision(prec || 14));\n}\n/**\n * The time unit lookup\n *\n * @ignore\n */\nconst timeUnits = {\n millisecond: 1,\n second: 1000,\n minute: 60000,\n hour: 3600000,\n day: 24 * 3600000,\n week: 7 * 24 * 3600000,\n month: 28 * 24 * 3600000,\n year: 364 * 24 * 3600000\n};\n/**\n * Easing definition\n *\n * @private\n * @function Math.easeInOutSine\n *\n * @param {number} pos\n * Current position, ranging from 0 to 1.\n *\n * @return {number}\n * Ease result\n */\nMath.easeInOutSine = function (pos) {\n return -0.5 * (Math.cos(Math.PI * pos) - 1);\n};\n/**\n * Convenience function to get the align factor, used several places for\n * computing positions\n * @private\n */\nconst getAlignFactor = (align = '') => ({\n center: 0.5,\n right: 1,\n middle: 0.5,\n bottom: 1\n}[align] || 0);\n/**\n * Find the closest distance between two values of a two-dimensional array\n * @private\n * @function Highcharts.getClosestDistance\n *\n * @param {Array<Array<number>>} arrays\n * An array of arrays of numbers\n *\n * @return {number | undefined}\n * The closest distance between values\n */\nfunction getClosestDistance(arrays, onError) {\n const allowNegative = !onError;\n let closest, loopLength, distance, i;\n arrays.forEach((xData) => {\n if (xData.length > 1) {\n loopLength = xData.length - 1;\n for (i = loopLength; i > 0; i--) {\n distance = xData[i] - xData[i - 1];\n if (distance < 0 && !allowNegative) {\n onError?.();\n // Only one call\n onError = void 0;\n }\n else if (distance && (typeof closest === 'undefined' || distance < closest)) {\n closest = distance;\n }\n }\n }\n });\n return closest;\n}\n/**\n * Returns the value of a property path on a given object.\n *\n * @private\n * @function getNestedProperty\n *\n * @param {string} path\n * Path to the property, for example `custom.myValue`.\n *\n * @param {unknown} obj\n * Instance containing the property on the specific path.\n *\n * @return {unknown}\n * The unknown property value.\n */\nfunction getNestedProperty(path, parent) {\n const pathElements = path.split('.');\n while (pathElements.length && defined(parent)) {\n const pathElement = pathElements.shift();\n // Filter on the key\n if (typeof pathElement === 'undefined' ||\n pathElement === '__proto__') {\n return; // Undefined\n }\n if (pathElement === 'this') {\n let thisProp;\n if (isObject(parent)) {\n thisProp = parent['@this'];\n }\n return thisProp ?? parent;\n }\n const child = parent[pathElement.replace(/[\\\\'\"]/g, '')];\n // Filter on the child\n if (!defined(child) ||\n typeof child === 'function' ||\n typeof child.nodeType === 'number' ||\n child === win) {\n return; // Undefined\n }\n // Else, proceed\n parent = child;\n }\n return parent;\n}\n/**\n * Get the computed CSS value for given element and property, only for numerical\n * properties. For width and height, the dimension of the inner box (excluding\n * padding) is returned. Used for fitting the chart within the container.\n *\n * @function Highcharts.getStyle\n *\n * @param {Highcharts.HTMLDOMElement} el\n * An HTML element.\n *\n * @param {string} prop\n * The property name.\n *\n * @param {boolean} [toInt=true]\n * Parse to integer.\n *\n * @return {number|string|undefined}\n * The style value.\n */\nfunction getStyle(el, prop, toInt) {\n let style;\n // For width and height, return the actual inner pixel size (#4913)\n if (prop === 'width') {\n let offsetWidth = Math.min(el.offsetWidth, el.scrollWidth);\n // In flex boxes, we need to use getBoundingClientRect and floor it,\n // because scrollWidth doesn't support subpixel precision (#6427) ...\n const boundingClientRectWidth = el.getBoundingClientRect?.().width;\n // ...unless if the containing div or its parents are transform-scaled\n // down, in which case the boundingClientRect can't be used as it is\n // also scaled down (#9871, #10498).\n if (boundingClientRectWidth < offsetWidth &&\n boundingClientRectWidth >= offsetWidth - 1) {\n offsetWidth = Math.floor(boundingClientRectWidth);\n }\n return Math.max(0, // #8377\n (offsetWidth -\n (getStyle(el, 'padding-left', true) || 0) -\n (getStyle(el, 'padding-right', true) || 0)));\n }\n if (prop === 'height') {\n return Math.max(0, // #8377\n (Math.min(el.offsetHeight, el.scrollHeight) -\n (getStyle(el, 'padding-top', true) || 0) -\n (getStyle(el, 'padding-bottom', true) || 0)));\n }\n // Otherwise, get the computed style\n const css = win.getComputedStyle(el, void 0); // eslint-disable-line no-undefined\n if (css) {\n style = css.getPropertyValue(prop);\n if (pick(toInt, prop !== 'opacity')) {\n style = pInt(style);\n }\n }\n return style;\n}\n/**\n * Return the value of the first element in the array that satisfies the\n * provided testing function.\n *\n * @function Highcharts.find<T>\n *\n * @param {Array<T>} arr\n * The array to test.\n *\n * @param {Function} callback\n * The callback function. The function receives the item as the first\n * argument. Return `true` if this item satisfies the condition.\n *\n * @return {T|undefined}\n * The value of the element.\n */\nconst find = Array.prototype.find ?\n function (arr, callback) {\n return arr.find(callback);\n } :\n // Legacy implementation. PhantomJS, IE <= 11 etc. #7223.\n function (arr, callback) {\n let i;\n const length = arr.length;\n for (i = 0; i < length; i++) {\n if (callback(arr[i], i)) { // eslint-disable-line node/callback-return\n return arr[i];\n }\n }\n };\n/**\n * Get the element's offset position, corrected for `overflow: auto`.\n *\n * @function Highcharts.offset\n *\n * @param {global.Element} el\n * The DOM element.\n *\n * @return {Highcharts.OffsetObject}\n * An object containing `left` and `top` properties for the position in\n * the page.\n */\nfunction offset(el) {\n const docElem = doc.documentElement, box = (el.parentElement || el.parentNode) ?\n el.getBoundingClientRect() :\n { top: 0, left: 0, width: 0, height: 0 };\n return {\n top: box.top + (win.pageYOffset || docElem.scrollTop) -\n (docElem.clientTop || 0),\n left: box.left + (win.pageXOffset || docElem.scrollLeft) -\n (docElem.clientLeft || 0),\n width: box.width,\n height: box.height\n };\n}\n/* eslint-disable valid-jsdoc */\n/**\n * Iterate over object key pairs in an object.\n *\n * @function Highcharts.objectEach<T>\n *\n * @param {*} obj\n * The object to iterate over.\n *\n * @param {Highcharts.ObjectEachCallbackFunction<T>} fn\n * The iterator callback. It passes three arguments:\n * * value - The property value.\n * * key - The property key.\n * * obj - The object that objectEach is being applied to.\n *\n * @param {T} [ctx]\n * The context.\n */\nfunction objectEach(obj, fn, ctx) {\n /* eslint-enable valid-jsdoc */\n for (const key in obj) {\n if (Object.hasOwnProperty.call(obj, key)) {\n fn.call(ctx || obj[key], obj[key], key, obj);\n }\n }\n}\n/* eslint-disable valid-jsdoc */\n/**\n * Add an event listener.\n *\n * @function Highcharts.addEvent<T>\n *\n * @param {Highcharts.Class<T>|T} el\n * The element or object to add a listener to. It can be a\n * {@link HTMLDOMElement}, an {@link SVGElement} or any other object.\n *\n * @param {string} type\n * The event type.\n *\n * @param {Highcharts.EventCallbackFunction<T>|Function} fn\n * The function callback to execute when the event is fired.\n *\n * @param {Highcharts.EventOptionsObject} [options]\n * Options for adding the event.\n *\n * @sample highcharts/members/addevent\n * Use a general `render` event to draw shapes on a chart\n *\n * @return {Function}\n * A callback function to remove the added event.\n */\nfunction addEvent(el, type, fn, options = {}) {\n /* eslint-enable valid-jsdoc */\n // Add hcEvents to either the prototype (in case we're running addEvent on a\n // class) or the instance. If hasOwnProperty('hcEvents') is false, it is\n // inherited down the prototype chain, in which case we need to set the\n // property on this instance (which may itself be a prototype).\n const owner = typeof el === 'function' && el.prototype || el;\n if (!Object.hasOwnProperty.call(owner, 'hcEvents')) {\n owner.hcEvents = {};\n }\n const events = owner.hcEvents;\n // Allow click events added to points, otherwise they will be prevented by\n // the TouchPointer.pinch function after a pinch zoom operation (#7091).\n if (Core_Globals.Point && // Without H a dependency loop occurs\n el instanceof Core_Globals.Point &&\n el.series &&\n el.series.chart) {\n el.series.chart.runTrackerClick = true;\n }\n // Handle DOM events\n // If the browser supports passive events, add it to improve performance\n // on touch events (#11353).\n const addEventListener = el.addEventListener;\n if (addEventListener) {\n addEventListener.call(el, type, fn, Core_Globals.supportsPassiveEvents ? {\n passive: options.passive === void 0 ?\n type.indexOf('touch') !== -1 : options.passive,\n capture: false\n } : false);\n }\n if (!events[type]) {\n events[type] = [];\n }\n const eventObject = {\n fn,\n order: typeof options.order === 'number' ? options.order : Infinity\n };\n events[type].push(eventObject);\n // Order the calls\n events[type].sort((a, b) => a.order - b.order);\n // Return a function that can be called to remove this event.\n return function () {\n removeEvent(el, type, fn);\n };\n}\n/* eslint-disable valid-jsdoc */\n/**\n * Remove an event that was added with {@link Highcharts#addEvent}.\n *\n * @function Highcharts.removeEvent<T>\n *\n * @param {Highcharts.Class<T>|T} el\n * The element to remove events on.\n *\n * @param {string} [type]\n * The type of events to remove. If undefined, all events are removed\n * from the element.\n *\n * @param {Highcharts.EventCallbackFunction<T>} [fn]\n * The specific callback to remove. If undefined, all events that match\n * the element and optionally the type are removed.\n *\n * @return {void}\n */\nfunction removeEvent(el, type, fn) {\n /* eslint-enable valid-jsdoc */\n /**\n * @private\n */\n function removeOneEvent(type, fn) {\n const removeEventListener = el.removeEventListener;\n if (removeEventListener) {\n removeEventListener.call(el, type, fn, false);\n }\n }\n /**\n * @private\n */\n function removeAllEvents(eventCollection) {\n let types, len;\n if (!el.nodeName) {\n return; // Break on non-DOM events\n }\n if (type) {\n types = {};\n types[type] = true;\n }\n else {\n types = eventCollection;\n }\n objectEach(types, function (_val, n) {\n if (eventCollection[n]) {\n len = eventCollection[n].length;\n while (len--) {\n removeOneEvent(n, eventCollection[n][len].fn);\n }\n }\n });\n }\n const owner = typeof el === 'function' && el.prototype || el;\n if (Object.hasOwnProperty.call(owner, 'hcEvents')) {\n const events = owner.hcEvents;\n if (type) {\n const typeEvents = (events[type] || []);\n if (fn) {\n events[type] = typeEvents.filter(function (obj) {\n return fn !== obj.fn;\n });\n removeOneEvent(type, fn);\n }\n else {\n removeAllEvents(events);\n events[type] = [];\n }\n }\n else {\n removeAllEvents(events);\n delete owner.hcEvents;\n }\n }\n}\n/* eslint-disable valid-jsdoc */\n/**\n * Fire an event that was registered with {@link Highcharts#addEvent}.\n *\n * @function Highcharts.fireEvent<T>\n *\n * @param {T} el\n * The object to fire the event on. It can be a {@link HTMLDOMElement},\n * an {@link SVGElement} or any other object.\n *\n * @param {string} type\n * The type of event.\n *\n * @param {Highcharts.Dictionary<*>|Event} [eventArguments]\n * Custom event arguments that are passed on as an argument to the event\n * handler.\n *\n * @param {Highcharts.EventCallbackFunction<T>|Function} [defaultFunction]\n * The default function to execute if the other listeners haven't\n * returned false.\n *\n * @return {void}\n */\nfunction fireEvent(el, type, eventArguments, defaultFunction) {\n /* eslint-enable valid-jsdoc */\n eventArguments = eventArguments || {};\n if (doc?.createEvent &&\n (el.dispatchEvent ||\n (el.fireEvent &&\n // Enable firing events on Highcharts instance.\n el !== Core_Globals))) {\n const e = doc.createEvent('Events');\n e.initEvent(type, true, true);\n eventArguments = extend(e, eventArguments);\n if (el.dispatchEvent) {\n el.dispatchEvent(eventArguments);\n }\n else {\n el.fireEvent(type, eventArguments);\n }\n }\n else if (el.hcEvents) {\n if (!eventArguments.target) {\n // We're running a custom event\n extend(eventArguments, {\n // Attach a simple preventDefault function to skip\n // default handler if called. The built-in\n // defaultPrevented property is not overwritable (#5112)\n preventDefault: function () {\n eventArguments.defaultPrevented = true;\n },\n // Setting target to native events fails with clicking\n // the zoom-out button in Chrome.\n target: el,\n // If the type is not set, we're running a custom event\n // (#2297). If it is set, we're running a browser event.\n type: type\n });\n }\n const events = [];\n let object = el;\n let multilevel = false;\n // Recurse up the inheritance chain and collect hcEvents set as own\n // objects on the prototypes.\n while (object.hcEvents) {\n if (Object.hasOwnProperty.call(object, 'hcEvents') &&\n object.hcEvents[type]) {\n if (events.length) {\n multilevel = true;\n }\n events.unshift.apply(events, object.hcEvents[type]);\n }\n object = Object.getPrototypeOf(object);\n }\n // For performance reasons, only sort the event handlers in case we are\n // dealing with multiple levels in the prototype chain. Otherwise, the\n // events are already sorted in the addEvent function.\n if (multilevel) {\n // Order the calls\n events.sort((a, b) => a.order - b.order);\n }\n // Call the collected event handlers\n events.forEach((obj) => {\n // If the event handler returns false, prevent the default handler\n // from executing\n if (obj.fn.call(el, eventArguments) === false) {\n eventArguments.preventDefault();\n }\n });\n }\n // Run the default if not prevented\n if (defaultFunction && !eventArguments.defaultPrevented) {\n defaultFunction.call(el, eventArguments);\n }\n}\nlet serialMode;\n/**\n * Get a unique key for using in internal element id's and pointers. The key is\n * composed of a random hash specific to this Highcharts instance, and a\n * counter.\n *\n * @example\n * let id = uniqueKey(); // => 'highcharts-x45f6hp-0'\n *\n * @function Highcharts.uniqueKey\n *\n * @return {string}\n * A unique key.\n */\nconst uniqueKey = (function () {\n const hash = Math.random().toString(36).substring(2, 9) + '-';\n let id = 0;\n return function () {\n return 'highcharts-' + (serialMode ? '' : hash) + id++;\n };\n}());\n/**\n * Activates a serial mode for element IDs provided by\n * {@link Highcharts.uniqueKey}. This mode can be used in automated tests, where\n * a simple comparison of two rendered SVG graphics is needed.\n *\n * **Note:** This is only for testing purposes and will break functionality in\n * webpages with multiple charts.\n *\n * @example\n * if (\n * process &&\n * process.env.NODE_ENV === 'development'\n * ) {\n * Highcharts.useSerialIds(true);\n * }\n *\n * @function Highcharts.useSerialIds\n *\n * @param {boolean} [mode]\n * Changes the state of serial mode.\n *\n * @return {boolean|undefined}\n * State of the serial mode.\n */\nfunction useSerialIds(mode) {\n return (serialMode = pick(mode, serialMode));\n}\nfunction isFunction(obj) {\n return typeof obj === 'function';\n}\nfunction ucfirst(s) {\n return ((isString(s) ?\n s.substring(0, 1).toUpperCase() + s.substring(1) :\n String(s)));\n}\n/* *\n *\n * External\n *\n * */\n// Register Highcharts as a plugin in jQuery\nif (win.jQuery) {\n /**\n * Highcharts-extended JQuery.\n *\n * @external JQuery\n */\n /**\n * Helper function to return the chart of the current JQuery selector\n * element.\n *\n * @function external:JQuery#highcharts\n *\n * @return {Highcharts.Chart}\n * The chart that is linked to the JQuery selector element.\n */ /**\n * Factory function to create a chart in the current JQuery selector\n * element.\n *\n * @function external:JQuery#highcharts\n *\n * @param {'Chart'|'Map'|'StockChart'|string} [className]\n * Name of the factory class in the Highcharts namespace.\n *\n * @param {Highcharts.Options} [options]\n * The chart options structure.\n *\n * @param {Highcharts.ChartCallbackFunction} [callback]\n * Function to run when the chart has loaded and all external\n * images are loaded. Defining a\n * [chart.events.load](https://api.highcharts.com/highcharts/chart.events.load)\n * handler is equivalent.\n *\n * @return {JQuery}\n * The current JQuery selector.\n */\n win.jQuery.fn.highcharts = function () {\n const args = [].slice.call(arguments);\n if (this[0]) { // `this[0]` is the renderTo div\n // Create the chart\n if (args[0]) {\n new Core_Globals[ // eslint-disable-line computed-property-spacing, no-new\n // Constructor defaults to Chart\n isString(args[0]) ? args.shift() : 'Chart'](this[0], args[0], args[1]);\n return this;\n }\n // When called without parameters or with the return argument,\n // return an existing chart\n return charts[attr(this[0], 'data-highcharts-chart')];\n }\n };\n}\n/* *\n *\n * Default Export\n *\n * */\n// TODO use named exports when supported.\nconst Utilities = {\n addEvent,\n arrayMax,\n arrayMin,\n attr,\n clamp,\n clearTimeout: internalClearTimeout,\n correctFloat,\n createElement,\n crisp,\n css,\n defined,\n destroyObjectProperties,\n diffObjects,\n discardElement,\n erase,\n error,\n extend,\n extendClass,\n find,\n fireEvent,\n getAlignFactor,\n getClosestDistance,\n getMagnitude,\n getNestedProperty,\n getStyle,\n insertItem,\n isArray,\n isClass,\n isDOMElement,\n isFunction,\n isNumber,\n isObject,\n isString,\n merge,\n normalizeTickInterval,\n objectEach,\n offset,\n pad,\n pick,\n pInt,\n pushUnique,\n relativeLength,\n removeEvent,\n replaceNested,\n splat,\n stableSort,\n syncTimeout,\n timeUnits,\n ucfirst,\n uniqueKey,\n useSerialIds,\n wrap\n};\n/* harmony default export */ const Core_Utilities = (Utilities);\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * An animation configuration. Animation configurations can also be defined as\n * booleans, where `false` turns off animation and `true` defaults to a duration\n * of 500ms and defer of 0ms.\n *\n * @interface Highcharts.AnimationOptionsObject\n */ /**\n* A callback function to execute when the animation finishes.\n* @name Highcharts.AnimationOptionsObject#complete\n* @type {Function|undefined}\n*/ /**\n* The animation defer in milliseconds.\n* @name Highcharts.AnimationOptionsObject#defer\n* @type {number|undefined}\n*/ /**\n* The animation duration in milliseconds.\n* @name Highcharts.AnimationOptionsObject#duration\n* @type {number|undefined}\n*/ /**\n* The name of an easing function as defined on the `Math` object.\n* @name Highcharts.AnimationOptionsObject#easing\n* @type {string|Function|undefined}\n*/ /**\n* A callback function to execute on each step of each attribute or CSS property\n* that's being animated. The first argument contains information about the\n* animation and progress.\n* @name Highcharts.AnimationOptionsObject#step\n* @type {Function|undefined}\n*/\n/**\n * Creates a frame for the animated SVG element.\n *\n * @callback Highcharts.AnimationStepCallbackFunction\n *\n * @param {Highcharts.SVGElement} this\n * The SVG element to animate.\n *\n * @return {void}\n */\n/**\n * Interface description for a class.\n *\n * @interface Highcharts.Class<T>\n * @extends Function\n */ /**\n* Class constructor.\n* @function Highcharts.Class<T>#new\n* @param {...Array<*>} args\n* Constructor arguments.\n* @return {T}\n* Class instance.\n*/\n/**\n * A style object with camel case property names to define visual appearance of\n * a SVG element or HTML element. The properties can be whatever styles are\n * supported on the given SVG or HTML element.\n *\n * @example\n * {\n * fontFamily: 'monospace',\n * fontSize: '1.2em'\n * }\n *\n * @interface Highcharts.CSSObject\n */ /**\n* @name Highcharts.CSSObject#[key:string]\n* @type {boolean|number|string|undefined}\n*/ /**\n* Background style for the element.\n* @name Highcharts.CSSObject#background\n* @type {string|undefined}\n*/ /**\n* Background color of the element.\n* @name Highcharts.CSSObject#backgroundColor\n* @type {Highcharts.ColorString|undefined}\n*/ /**\n* Border style for the element.\n* @name Highcharts.CSSObject#border\n* @type {string|undefined}\n*/ /**\n* Radius of the element border.\n* @name Highcharts.CSSObject#borderRadius\n* @type {number|undefined}\n*/ /**\n* Color used in the element. The 'contrast' option is a Highcharts custom\n* property that results in black or white, depending on the background of the\n* element.\n* @name Highcharts.CSSObject#color\n* @type {'contrast'|Highcharts.ColorString|undefined}\n*/ /**\n* Style of the mouse cursor when resting over the element.\n* @name Highcharts.CSSObject#cursor\n* @type {Highcharts.CursorValue|undefined}\n*/ /**\n* Font family of the element text. Multiple values have to be in decreasing\n* preference order and separated by comma.\n* @name Highcharts.CSSObject#fontFamily\n* @type {string|undefined}\n*/ /**\n* Font size of the element text.\n* @name Highcharts.CSSObject#fontSize\n* @type {string|undefined}\n*/ /**\n* Font weight of the element text.\n* @name Highcharts.CSSObject#fontWeight\n* @type {string|undefined}\n*/ /**\n* Height of the element.\n* @name Highcharts.CSSObject#height\n* @type {number|undefined}\n*/ /**\n* The maximum number of lines. If lines are cropped away, an ellipsis will be\n* added.\n* @name Highcharts.CSSObject#lineClamp\n* @type {number|undefined}\n*/ /**\n* Width of the element border.\n* @name Highcharts.CSSObject#lineWidth\n* @type {number|undefined}\n*/ /**\n* Opacity of the element.\n* @name Highcharts.CSSObject#opacity\n* @type {number|undefined}\n*/ /**\n* Space around the element content.\n* @name Highcharts.CSSObject#padding\n* @type {string|undefined}\n*/ /**\n* Behaviour of the element when the mouse cursor rests over it.\n* @name Highcharts.CSSObject#pointerEvents\n* @type {string|undefined}\n*/ /**\n* Positioning of the element.\n* @name Highcharts.CSSObject#position\n* @type {string|undefined}\n*/ /**\n* Alignment of the element text.\n* @name Highcharts.CSSObject#textAlign\n* @type {string|undefined}\n*/ /**\n* Additional decoration of the element text.\n* @name Highcharts.CSSObject#textDecoration\n* @type {string|undefined}\n*/ /**\n* Outline style of the element text.\n* @name Highcharts.CSSObject#textOutline\n* @type {string|undefined}\n*/ /**\n* Line break style of the element text. Highcharts SVG elements support\n* `ellipsis` when a `width` is set.\n* @name Highcharts.CSSObject#textOverflow\n* @type {string|undefined}\n*/ /**\n* Top spacing of the element relative to the parent element.\n* @name Highcharts.CSSObject#top\n* @type {string|undefined}\n*/ /**\n* Animated transition of selected element properties.\n* @name Highcharts.CSSObject#transition\n* @type {string|undefined}\n*/ /**\n* Line break style of the element text.\n* @name Highcharts.CSSObject#whiteSpace\n* @type {string|undefined}\n*/ /**\n* Width of the element.\n* @name Highcharts.CSSObject#width\n* @type {number|undefined}\n*/\n/**\n * All possible cursor styles.\n *\n * @typedef {'alias'|'all-scroll'|'auto'|'cell'|'col-resize'|'context-menu'|'copy'|'crosshair'|'default'|'e-resize'|'ew-resize'|'grab'|'grabbing'|'help'|'move'|'n-resize'|'ne-resize'|'nesw-resize'|'no-drop'|'none'|'not-allowed'|'ns-resize'|'nw-resize'|'nwse-resize'|'pointer'|'progress'|'row-resize'|'s-resize'|'se-resize'|'sw-resize'|'text'|'vertical-text'|'w-resize'|'wait'|'zoom-in'|'zoom-out'} Highcharts.CursorValue\n */\n/**\n * All possible dash styles.\n *\n * @typedef {'Dash'|'DashDot'|'Dot'|'LongDash'|'LongDashDot'|'LongDashDotDot'|'ShortDash'|'ShortDashDot'|'ShortDashDotDot'|'ShortDot'|'Solid'} Highcharts.DashStyleValue\n */\n/**\n * Generic dictionary in TypeScript notation.\n * Use the native `AnyRecord` instead.\n *\n * @deprecated\n * @interface Highcharts.Dictionary<T>\n */ /**\n* @name Highcharts.Dictionary<T>#[key:string]\n* @type {T}\n*/\n/**\n * The function callback to execute when the event is fired. The `this` context\n * contains the instance, that fired the event.\n *\n * @callback Highcharts.EventCallbackFunction<T>\n *\n * @param {T} this\n *\n * @param {Highcharts.Dictionary<*>|Event} [eventArguments]\n * Event arguments.\n *\n * @return {boolean|void}\n */\n/**\n * The event options for adding function callback.\n *\n * @interface Highcharts.EventOptionsObject\n */ /**\n* The order the event handler should be called. This opens for having one\n* handler be called before another, independent of in which order they were\n* added.\n* @name Highcharts.EventOptionsObject#order\n* @type {number}\n*/ /**\n* Whether an event should be passive or not.\n* When set to `true`, the function specified by listener will never call\n* `preventDefault()`.\n* @name Highcharts.EventOptionsObject#passive\n* @type boolean\n*/\n/**\n * Formats data as a string. Usually the data is accessible through the `this`\n * keyword.\n *\n * @callback Highcharts.FormatterCallbackFunction<T>\n *\n * @param {T} this\n * Context to format\n *\n * @return {string}\n * Formatted text\n */\n/**\n * An object of key-value pairs for HTML attributes.\n *\n * @typedef {Highcharts.Dictionary<boolean|number|string|Function>} Highcharts.HTMLAttributes\n */\n/**\n * An HTML DOM element. The type is a reference to the regular HTMLElement in\n * the global scope.\n *\n * @typedef {global.HTMLElement} Highcharts.HTMLDOMElement\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement\n */\n/**\n * The iterator callback.\n *\n * @callback Highcharts.ObjectEachCallbackFunction<T>\n *\n * @param {T} this\n * The context.\n *\n * @param {*} value\n * The property value.\n *\n * @param {string} key\n * The property key.\n *\n * @param {*} obj\n * The object that objectEach is being applied to.\n */\n/**\n * An object containing `left` and `top` properties for the position in the\n * page.\n *\n * @interface Highcharts.OffsetObject\n */ /**\n* Left distance to the page border.\n* @name Highcharts.OffsetObject#left\n* @type {number}\n*/ /**\n* Top distance to the page border.\n* @name Highcharts.OffsetObject#top\n* @type {number}\n*/\n/**\n * Describes a range.\n *\n * @interface Highcharts.RangeObject\n */ /**\n* Maximum number of the range.\n* @name Highcharts.RangeObject#max\n* @type {number}\n*/ /**\n* Minimum number of the range.\n* @name Highcharts.RangeObject#min\n* @type {number}\n*/\n/**\n * If a number is given, it defines the pixel length. If a percentage string is\n * given, like for example `'50%'`, the setting defines a length relative to a\n * base size, for example the size of a container.\n *\n * @typedef {number|string} Highcharts.RelativeSize\n */\n/**\n * Proceed function to call original (wrapped) function.\n *\n * @callback Highcharts.WrapProceedFunction\n *\n * @param {*} [arg1]\n * Optional argument. Without any arguments defaults to first argument of\n * the wrapping function.\n *\n * @param {*} [arg2]\n * Optional argument. Without any arguments defaults to second argument\n * of the wrapping function.\n *\n * @param {*} [arg3]\n * Optional argument. Without any arguments defaults to third argument of\n * the wrapping function.\n *\n * @return {*}\n * Return value of the original function.\n */\n/**\n * The Highcharts object is the placeholder for all other members, and various\n * utility functions. The most important member of the namespace would be the\n * chart constructor.\n *\n * @example\n * let chart = Highcharts.chart('container', { ... });\n *\n * @namespace Highcharts\n */\n''; // Detach doclets above\n\n;// ./code/grid/es-modules/Core/Renderer/HTML/AST.js\n/* *\n *\n * (c) 2010-2025 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n\n\nconst { SVG_NS, win: AST_win } = Core_Globals;\n\nconst { attr: AST_attr, createElement: AST_createElement, css: AST_css, error: AST_error, isFunction: AST_isFunction, isString: AST_isString, objectEach: AST_objectEach, splat: AST_splat } = Core_Utilities;\nconst { trustedTypes } = AST_win;\n/* *\n *\n * Constants\n *\n * */\n// Create the trusted type policy. This should not be exposed.\nconst trustedTypesPolicy = (trustedTypes &&\n AST_isFunction(trustedTypes.createPolicy) &&\n trustedTypes.createPolicy('highcharts', {\n createHTML: (s) => s\n }));\nconst emptyHTML = trustedTypesPolicy ?\n trustedTypesPolicy.createHTML('') :\n '';\n/* *\n *\n * Class\n *\n * */\n/**\n * The AST class represents an abstract syntax tree of HTML or SVG content. It\n * can take HTML as an argument, parse it, optionally transform it to SVG, then\n * perform sanitation before inserting it into the DOM.\n *\n * @class\n * @name Highcharts.AST\n *\n * @param {string|Array<Highcharts.ASTNode>} source\n * Either an HTML string or an ASTNode list to populate the tree.\n */\nclass AST {\n /* *\n *\n * Static Functions\n *\n * */\n /**\n * Filter an object of SVG or HTML attributes against the allow list.\n *\n * @static\n *\n * @function Highcharts.AST#filterUserAttributes\n *\n * @param {Highcharts.SVGAttributes} attributes The attributes to filter\n *\n * @return {Highcharts.SVGAttributes}\n * The filtered attributes\n */\n static filterUserAttributes(attributes) {\n AST_objectEach(attributes, (val, key) => {\n let valid = true;\n if (AST.allowedAttributes.indexOf(key) === -1) {\n valid = false;\n }\n if (['background', 'dynsrc', 'href', 'lowsrc', 'src']\n .indexOf(key) !== -1) {\n valid = AST_isString(val) && AST.allowedReferences.some((ref) => val.indexOf(ref) === 0);\n }\n if (!valid) {\n AST_error(33, false, void 0, {\n 'Invalid attribute in config': `${key}`\n });\n delete attributes[key];\n }\n // #17753, < is not allowed in SVG attributes\n if (AST_isString(val) && attributes[key]) {\n attributes[key] = val.replace(/</g, '&lt;');\n }\n });\n return attributes;\n }\n static parseStyle(style) {\n return style\n .split(';')\n .reduce((styles, line) => {\n const pair = line.split(':').map((s) => s.trim()), key = pair.shift();\n if (key && pair.length) {\n styles[key.replace(/-([a-z])/g, (g) => g[1].toUpperCase())] = pair.join(':'); // #17146\n }\n return styles;\n }, {});\n }\n /**\n * Utility function to set html content for an element by passing in a\n * markup string. The markup is safely parsed by the AST class to avoid\n * XSS vulnerabilities. This function should be used instead of setting\n * `innerHTML` in all cases where the content is not fully trusted.\n *\n * @static\n * @function Highcharts.AST#setElementHTML\n *\n * @param {SVGDOMElement|HTMLDOMElement} el\n * Node to set content of.\n *\n * @param {string} html\n * Markup string\n */\n static setElementHTML(el, html) {\n el.innerHTML = AST.emptyHTML; // Clear previous\n if (html) {\n const ast = new AST(html);\n ast.addToDOM(el);\n }\n }\n /* *\n *\n * Constructor\n *\n * */\n // Construct an AST from HTML markup, or wrap an array of existing AST nodes\n constructor(source) {\n this.nodes = typeof source === 'string' ?\n this.parseMarkup(source) : source;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Add the tree defined as a hierarchical JS structure to the DOM\n *\n * @function Highcharts.AST#addToDOM\n *\n * @param {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement} parent\n * The node where it should be added\n *\n * @return {Highcharts.HTMLDOMElement|Highcharts.SVGDOMElement}\n * The inserted node.\n */\n addToDOM(parent) {\n /**\n * @private\n * @param {Highcharts.ASTNode} subtree\n * HTML/SVG definition\n * @param {Element} [subParent]\n * parent node\n * @return {Highcharts.SVGDOMElement|Highcharts.HTMLDOMElement}\n * The inserted node.\n */\n function recurse(subtree, subParent) {\n let ret;\n AST_splat(subtree).forEach(function (item) {\n const tagName = item.tagName;\n const textNode = item.textContent ?\n Core_Globals.doc.createTextNode(item.textContent) :\n void 0;\n // Whether to ignore the AST filtering totally, #15345\n const bypassHTMLFiltering = AST.bypassHTMLFiltering;\n let node;\n if (tagName) {\n if (tagName === '#text') {\n node = textNode;\n }\n else if (AST.allowedTags.indexOf(tagName) !== -1 ||\n bypassHTMLFiltering) {\n const NS = tagName === 'svg' ?\n SVG_NS :\n (subParent.namespaceURI || SVG_NS);\n const element = Core_Globals.doc.createElementNS(NS, tagName);\n const attributes = item.attributes || {};\n // Apply attributes from root of AST node, legacy from\n // from before TextBuilder\n AST_objectEach(item, function (val, key) {\n if (key !== 'tagName' &&\n key !== 'attributes' &&\n key !== 'children' &&\n key !== 'style' &&\n key !== 'textContent') {\n attributes[key] = val;\n }\n });\n AST_attr(element, bypassHTMLFiltering ?\n attributes :\n AST.filterUserAttributes(attributes));\n if (item.style) {\n AST_css(element, item.style);\n }\n // Add text content\n if (textNode) {\n element.appendChild(textNode);\n }\n // Recurse\n recurse(item.children || [], element);\n node = element;\n }\n else {\n AST_error(33, false, void 0, {\n 'Invalid tagName in config': tagName\n });\n }\n }\n // Add to the tree\n if (node) {\n subParent.appendChild(node);\n }\n ret = node;\n });\n // Return last node added (on top level it's the only one)\n return ret;\n }\n return recurse(this.nodes, parent);\n }\n /**\n * Parse HTML/SVG markup into AST Node objects. Used internally from the\n * constructor.\n *\n * @private\n *\n * @function Highcharts.AST#getNodesFromMarkup\n *\n * @param {string} markup The markup string.\n *\n * @return {Array<Highcharts.ASTNode>} The parsed nodes.\n */\n parseMarkup(markup) {\n const nodes = [];\n markup = markup\n .trim()\n // The style attribute throws a warning when parsing when CSP is\n // enabled (#6884), so use an alias and pick it up below\n // Make all quotation marks parse correctly to DOM (#17627)\n .replace(/ style=([\"'])/g, ' data-style=$1');\n let doc;\n try {\n doc = new DOMParser().parseFromString(trustedTypesPolicy ?\n trustedTypesPolicy.createHTML(markup) :\n markup, 'text/html');\n }\n catch {\n // There are two cases where this fails:\n // 1. IE9 and PhantomJS, where the DOMParser only supports parsing\n // XML\n // 2. Due to a Chromium issue where chart redraws are triggered by\n // a `beforeprint` event (#16931),\n // https://issues.chromium.org/issues/40222135\n }\n if (!doc) {\n const body = AST_createElement('div');\n body.innerHTML = markup;\n doc = { body };\n }\n const appendChildNodes = (node, addTo) => {\n const tagName = node.nodeName.toLowerCase();\n // Add allowed tags\n const astNode = {\n tagName\n };\n if (tagName === '#text') {\n astNode.textContent = node.textContent || '';\n }\n const parsedAttributes = node.attributes;\n // Add attributes\n if (parsedAttributes) {\n const attributes = {};\n [].forEach.call(parsedAttributes, (attrib) => {\n if (attrib.name === 'data-style') {\n astNode.style = AST.parseStyle(attrib.value);\n }\n else {\n attributes[attrib.name] = attrib.value;\n }\n });\n astNode.attributes = attributes;\n }\n // Handle children\n if (node.childNodes.length) {\n const children = [];\n [].forEach.call(node.childNodes, (childNode) => {\n appendChildNodes(childNode, children);\n });\n if (children.length) {\n astNode.children = children;\n }\n }\n addTo.push(astNode);\n };\n [].forEach.call(doc.body.childNodes, (childNode) => appendChildNodes(childNode, nodes));\n return nodes;\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * The list of allowed SVG or HTML attributes, used for sanitizing\n * potentially harmful content from the chart configuration before adding to\n * the DOM.\n *\n * @see [Source code with default values](\n * https://github.com/highcharts/highcharts/blob/master/ts/Core/Renderer/HTML/AST.ts#:~:text=public%20static%20allowedAttributes)\n *\n * @example\n * // Allow a custom, trusted attribute\n * Highcharts.AST.allowedAttributes.push('data-value');\n *\n * @name Highcharts.AST.allowedAttributes\n * @type {Array<string>}\n */\nAST.allowedAttributes = [\n 'alt',\n 'aria-controls',\n 'aria-describedby',\n 'aria-expanded',\n 'aria-haspopup',\n 'aria-hidden',\n 'aria-label',\n 'aria-labelledby',\n 'aria-live',\n 'aria-pressed',\n 'aria-readonly',\n 'aria-roledescription',\n 'aria-selected',\n 'class',\n 'clip-path',\n 'color',\n 'colspan',\n 'cx',\n 'cy',\n 'd',\n 'disabled',\n 'dx',\n 'dy',\n 'fill',\n 'filterUnits',\n 'flood-color',\n 'flood-opacity',\n 'height',\n 'href',\n 'id',\n 'in',\n 'in2',\n 'markerHeight',\n 'markerWidth',\n 'offset',\n 'opacity',\n 'operator',\n 'orient',\n 'padding',\n 'paddingLeft',\n 'paddingRight',\n 'patternUnits',\n 'r',\n 'radius',\n 'refX',\n 'refY',\n 'result',\n 'role',\n 'rowspan',\n 'scope',\n 'slope',\n 'src',\n 'startOffset',\n 'stdDeviation',\n 'stroke-linecap',\n 'stroke-width',\n 'stroke',\n 'style',\n 'summary',\n 'tabindex',\n 'tableValues',\n 'target',\n 'text-align',\n 'text-anchor',\n 'textAnchor',\n 'textLength',\n 'title',\n 'type',\n 'valign',\n 'width',\n 'x',\n 'x1',\n 'x2',\n 'xlink:href',\n 'y',\n 'y1',\n 'y2',\n 'zIndex'\n];\n/**\n * The list of allowed references for referring attributes like `href` and\n * `src`. Attribute values will only be allowed if they start with one of\n * these strings.\n *\n * @see [Source code with default values](\n * https://github.com/highcharts/highcharts/blob/master/ts/Core/Renderer/HTML/AST.ts#:~:text=public%20static%20allowedReferences)\n *\n * @example\n * // Allow tel:\n * Highcharts.AST.allowedReferences.push('tel:');\n *\n * @name Highcharts.AST.allowedReferences\n * @type {Array<string>}\n */\nAST.allowedReferences = [\n 'https://',\n 'http://',\n 'mailto:',\n '/',\n '../',\n './',\n '#'\n];\n/**\n * The list of allowed SVG or HTML tags, used for sanitizing potentially\n * harmful content from the chart configuration before adding to the DOM.\n *\n * @see [Source code with default values](\n * https://github.com/highcharts/highcharts/blob/master/ts/Core/Renderer/HTML/AST.ts#:~:text=public%20static%20allowedTags)\n *\n * @example\n * // Allow a custom, trusted tag\n * Highcharts.AST.allowedTags.push('blink'); // ;)\n *\n * @name Highcharts.AST.allowedTags\n * @type {Array<string>}\n */\nAST.allowedTags = [\n '#text',\n 'a',\n 'abbr',\n 'b',\n 'br',\n 'button',\n 'caption',\n 'circle',\n 'clipPath',\n 'code',\n 'dd',\n 'defs',\n 'div',\n 'dl',\n 'dt',\n 'em',\n 'feComponentTransfer',\n 'feComposite',\n 'feDropShadow',\n 'feFlood',\n 'feFuncA',\n 'feFuncB',\n 'feFuncG',\n 'feFuncR',\n 'feGaussianBlur',\n 'feMerge',\n 'feMergeNode',\n 'feMorphology',\n 'feOffset',\n 'filter',\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'hr',\n 'i',\n 'img',\n 'li',\n 'linearGradient',\n 'marker',\n 'ol',\n 'p',\n 'path',\n 'pattern',\n 'pre',\n 'rect',\n 'small',\n 'span',\n 'stop',\n 'strong',\n 'style',\n 'sub',\n 'sup',\n 'svg',\n 'table',\n 'tbody',\n 'td',\n 'text',\n 'textPath',\n 'th',\n 'thead',\n 'title',\n 'tr',\n 'tspan',\n 'u',\n 'ul'\n];\nAST.emptyHTML = emptyHTML;\n/**\n * Allow all custom SVG and HTML attributes, references and tags (together\n * with potentially harmful ones) to be added to the DOM from the chart\n * configuration. In other words, disable the allow-listing which is the\n * primary functionality of the AST.\n *\n * WARNING: Setting this property to `true` while allowing untrusted user\n * data in the chart configuration will expose your application to XSS\n * security risks!\n *\n * Note that in case you want to allow a known set of tags or attributes,\n * you should allow-list them instead of disabling the filtering totally.\n * See [allowedAttributes](Highcharts.AST#.allowedAttributes),\n * [allowedReferences](Highcharts.AST#.allowedReferences) and\n * [allowedTags](Highcharts.AST#.allowedTags). The `bypassHTMLFiltering`\n * setting is intended only for those cases where allow-listing is not\n * practical, and the chart configuration already comes from a secure\n * source.\n *\n * @example\n * // Allow all custom attributes, references and tags (disable DOM XSS\n * // filtering)\n * Highcharts.AST.bypassHTMLFiltering = true;\n *\n * @name Highcharts.AST.bypassHTMLFiltering\n * @static\n */\nAST.bypassHTMLFiltering = false;\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const HTML_AST = (AST);\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * Serialized form of an SVG/HTML definition, including children.\n *\n * @interface Highcharts.ASTNode\n */ /**\n* @name Highcharts.ASTNode#attributes\n* @type {Highcharts.SVGAttributes|undefined}\n*/ /**\n* @name Highcharts.ASTNode#children\n* @type {Array<Highcharts.ASTNode>|undefined}\n*/ /**\n* @name Highcharts.ASTNode#tagName\n* @type {string|undefined}\n*/ /**\n* @name Highcharts.ASTNode#textContent\n* @type {string|undefined}\n*/\n(''); // Keeps doclets above in file\n\n;// ./code/grid/es-modules/Core/Chart/ChartDefaults.js\n/* *\n *\n * (c) 2010-2025 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n\n/* *\n *\n * API Options\n *\n * */\n/**\n * General options for the chart.\n *\n * @optionparent chart\n */\nconst ChartDefaults = {\n /**\n * Default `mapData` for all series, in terms of a GeoJSON or TopoJSON\n * object. If set to a string, it functions as an index into the\n * `Highcharts.maps` array.\n *\n * For picking out individual shapes and geometries to use for each series\n * of the map, see [series.mapData](#series.map.mapData).\n *\n * @sample maps/demo/geojson\n * Loading GeoJSON data\n * @sample maps/chart/topojson\n * Loading TopoJSON data\n *\n * @type {string|Array<*>|Highcharts.GeoJSON|Highcharts.TopoJSON}\n * @since 5.0.0\n * @product highmaps\n * @apioption chart.map\n */\n /**\n * Set lat/lon transformation definitions for the chart. If not defined,\n * these are extracted from the map data.\n *\n * @type {*}\n * @since 5.0.0\n * @product highmaps\n * @apioption chart.mapTransforms\n */\n /**\n * When using multiple axes, the ticks of two or more opposite axes\n * will automatically be aligned by adding ticks to the axis or axes\n * with the least ticks, as if `tickAmount` were specified.\n *\n * This can be prevented by setting `alignTicks` to false. If the grid\n * lines look messy, it's a good idea to hide them for the secondary\n * axis by setting `gridLineWidth` to 0.\n *\n * If `startOnTick` or `endOnTick` in the axis options are set to false,\n * then the `alignTicks ` will be disabled for the axis.\n *\n * Disabled for logarithmic axes.\n *\n * @sample {highcharts} highcharts/chart/alignticks-true/\n * True by default\n * @sample {highcharts} highcharts/chart/alignticks-false/\n * False\n * @sample {highstock} stock/chart/alignticks-true/\n * True by default\n * @sample {highstock} stock/chart/alignticks-false/\n * False\n *\n * @type {boolean}\n * @default true\n * @product highcharts highstock gantt\n * @apioption chart.alignTicks\n */\n /**\n * When using multiple axes, align the thresholds. When this is true, other\n * ticks will also be aligned.\n *\n * Note that for line series and some other series types, the `threshold`\n * option is set to `null` by default. This will in turn cause their y-axis\n * to not have a threshold. In order to avoid that, set the series\n * `threshold` to 0 or another number.\n *\n * If `startOnTick` or `endOnTick` in the axis options are set to false, or\n * if the axis is logarithmic, the threshold will not be aligned.\n *\n * @sample {highcharts} highcharts/chart/alignthresholds/ Set to true\n *\n * @since 10.0.0\n * @product highcharts highstock gantt\n * @apioption chart.alignThresholds\n */\n alignThresholds: false,\n /**\n * Set the overall animation for all chart updating. Animation can be\n * disabled throughout the chart by setting it to false here. It can\n * be overridden for each individual API method as a function parameter.\n * The only animation not affected by this option is the initial series\n * animation, see [plotOptions.series.animation](\n * #plotOptions.series.animation).\n *\n * The animation can either be set as a boolean or a configuration\n * object. If `true`, it will use the 'swing' jQuery easing and a\n * duration of 500 ms. If used as a configuration object, the following\n * properties are supported:\n *\n * - `defer`: The animation delay time in milliseconds.\n *\n * - `duration`: The duration of the animation in milliseconds.\n *\n * - `easing`: A string reference to an easing function set on the\n * `Math` object. See\n * [the easing demo](https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/plotoptions/series-animation-easing/).\n *\n * When zooming on a series with less than 100 points, the chart redraw\n * will be done with animation, but in case of more data points, it is\n * necessary to set this option to ensure animation on zoom.\n *\n * @sample {highcharts} highcharts/chart/animation-none/\n * Updating with no animation\n * @sample {highcharts} highcharts/chart/animation-duration/\n * With a longer duration\n * @sample {highcharts} highcharts/chart/animation-easing/\n * With a jQuery UI easing\n * @sample {highmaps} maps/chart/animation-none/\n * Updating with no animation\n * @sample {highmaps} maps/chart/animation-duration/\n * With a longer duration\n *\n * @type {boolean|Partial<Highcharts.AnimationOptionsObject>}\n * @default true\n * @apioption chart.animation\n */\n /**\n * A CSS class name to apply to the charts container `div`, allowing\n * unique CSS styling for each chart.\n *\n * @type {string}\n * @apioption chart.className\n */\n /**\n * Event listeners for the chart.\n *\n * @apioption chart.events\n */\n /**\n * Fires when a series is added to the chart after load time, using the\n * `addSeries` method. One parameter, `event`, is passed to the\n * function, containing common event information. Through\n * `event.options` you can access the series options that were passed to\n * the `addSeries` method. Returning false prevents the series from\n * being added.\n *\n * @sample {highcharts} highcharts/chart/events-addseries/\n * Alert on add series\n * @sample {highstock} stock/chart/events-addseries/\n * Alert on add series\n *\n * @type {Highcharts.ChartAddSeriesCallbackFunction}\n * @since 1.2.0\n * @context Highcharts.Chart\n * @apioption chart.events.addSeries\n */\n /**\n * Fires when clicking on the plot background. One parameter, `event`,\n * is passed to the function, containing common event information.\n *\n * Information on the clicked spot can be found through `event.xAxis`\n * and `event.yAxis`, which are arrays containing the axes of each\n * dimension and each axis' value at the clicked spot. The primary axes\n * are `event.xAxis[0]` and `event.yAxis[0]`. Remember the unit of a\n * datetime axis is milliseconds since 1970-01-01 00:00:00.\n *\n * ```js\n * click: function(e) {\n * console.log(\n * Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', e.xAxis[0].value),\n * e.yAxis[0].value\n * )\n * }\n * ```\n *\n * @sample {highcharts} highcharts/chart/events-click/\n * Alert coordinates on click\n * @sample {highcharts} highcharts/chart/events-container/\n * Alternatively, attach event to container\n * @sample {highstock} stock/chart/events-click/\n * Alert coordinates on click\n * @sample {highstock} highcharts/chart/events-container/\n * Alternatively, attach event to container\n * @sample {highmaps} maps/chart/events-click/\n * Record coordinates on click\n * @sample {highmaps} highcharts/chart/events-container/\n * Alternatively, attach event to container\n *\n * @type {Highcharts.ChartClickCallbackFunction}\n * @since 1.2.0\n * @context Highcharts.Chart\n * @apioption chart.events.click\n */\n /**\n * Fires when the chart is finished loading. Since v4.2.2, it also waits\n * for images to be loaded, for example from point markers. One\n * parameter, `event`, is passed to the function, containing common\n * event information.\n *\n * There is also a second parameter to the chart constructor where a\n * callback function can be passed to be executed on chart.load.\n *\n * @sample {highcharts} highcharts/chart/events-load/\n * Alert on chart load\n * @sample {highcharts} highcharts/chart/events-render/\n * Load vs Redraw vs Render\n * @sample {highstock} stock/chart/events-load/\n * Alert on chart load\n * @sample {highmaps} maps/chart/events-load/\n * Add series on chart load\n *\n * @type {Highcharts.ChartLoadCallbackFunction}\n * @context Highcharts.Chart\n * @apioption chart.events.load\n */\n /**\n * Fires when the chart is redrawn, either after a call to\n * `chart.redraw()` or after an axis, series or point is modified with\n * the `redraw` option set to `true`. One parameter, `event`, is passed\n * to the function, containing common event information.\n *\n * @sample {highcharts} highcharts/chart/events-redraw/\n * Alert on chart redraw\n * @sample {highcharts} highcharts/chart/events-render/\n * Load vs Redraw vs Render\n * @sample {highstock} stock/chart/events-redraw/\n * Alert on chart redraw when adding a series or moving the\n * zoomed range\n * @sample {highmaps} maps/chart/events-redraw/\n * Set subtitle on chart redraw\n *\n * @type {Highcharts.ChartRedrawCallbackFunction}\n * @since 1.2.0\n * @context Highcharts.Chart\n * @apioption chart.events.redraw\n */\n /**\n * Fires after initial load of the chart (directly after the `load`\n * event), and after each redraw (directly after the `redraw` event).\n *\n * @sample {highcharts} highcharts/chart/events-render/\n * Load vs Redraw vs Render\n *\n * @type {Highcharts.ChartRenderCallbackFunction}\n * @since 5.0.7\n * @context Highcharts.Chart\n * @apioption chart.events.render\n */\n /**\n * Fires when an area of the chart has been selected. Selection is\n * enabled by setting the chart's zoomType. One parameter, `event`, is\n * passed to the function, containing common event information. The\n * default action for the selection event is to zoom the chart to the\n * selected area. It can be prevented by calling\n * `event.preventDefault()` or return false.\n *\n * Information on the selected area can be found through `event.xAxis`\n * and `event.yAxis`, which are arrays containing the axes of each\n * dimension and each axis' min and max values. The primary axes are\n * `event.xAxis[0]` and `event.yAxis[0]`. Remember the unit of a\n * datetime axis is milliseconds since 1970-01-01 00:00:00.\n *\n * ```js\n * selection: function(event) {\n * // log the min and max of the primary, datetime x-axis\n * console.log(\n * Highcharts.dateFormat(\n * '%Y-%m-%d %H:%M:%S',\n * event.xAxis[0].min\n * ),\n * Highcharts.dateFormat(\n * '%Y-%m-%d %H:%M:%S',\n * event.xAxis[0].max\n * )\n * );\n * // log the min and max of the y axis\n * console.log(event.yAxis[0].min, event.yAxis[0].max);\n * }\n * ```\n *\n * @sample {highcharts} highcharts/chart/events-selection/\n * Report on selection and reset\n * @sample {highcharts} highcharts/chart/events-selection-points/\n * Select a range of points through a drag selection\n * @sample {highstock} stock/chart/events-selection/\n * Report on selection and reset\n * @sample {highstock} highcharts/chart/events-selection-points/\n * Select a range of points through a drag selection\n * (Highcharts)\n *\n * @type {Highcharts.ChartSelectionCallbackFunction}\n * @apioption chart.events.selection\n */\n /**\n * The margin between the outer edge of the chart and the plot area.\n * The numbers in the array designate top, right, bottom and left\n * respectively. Use the options `marginTop`, `marginRight`,\n * `marginBottom` and `marginLeft` for shorthand setting of one option.\n *\n * By default there is no margin. The actual space is dynamically\n * calculated from the offset of axis labels, axis title, title,\n * subtitle and legend in addition to the `spacingTop`, `spacingRight`,\n * `spacingBottom` and `spacingLeft` options.\n *\n * @sample {highcharts} highcharts/chart/margins-zero/\n * Zero margins\n * @sample {highstock} stock/chart/margin-zero/\n * Zero margins\n *\n * @type {number|Array<number>}\n * @apioption chart.margin\n */\n /**\n * The margin between the bottom outer edge of the chart and the plot\n * area. Use this to set a fixed pixel value for the margin as opposed\n * to the default dynamic margin. See also `spacingBottom`.\n *\n * @sample {highcharts} highcharts/chart/marginbottom/\n * 100px bottom margin\n * @sample {highstock} stock/chart/marginbottom/\n * 100px bottom margin\n * @sample {highmaps} maps/chart/margin/\n * 100px margins\n *\n * @type {number}\n * @since 2.0\n * @apioption chart.marginBottom\n */\n /**\n * The margin between the left outer edge of the chart and the plot\n * area. Use this to set a fixed pixel value for the margin as opposed\n * to the default dynamic margin. See also `spacingLeft`.\n *\n * @sample {highcharts} highcharts/chart/marginleft/\n * 150px left margin\n * @sample {highstock} stock/chart/marginleft/\n * 150px left margin\n * @sample {highmaps} maps/chart/margin/\n * 100px margins\n *\n * @type {number}\n * @since 2.0\n * @apioption chart.marginLeft\n */\n /**\n * The margin between the right outer edge of the chart and the plot\n * area. Use this to set a fixed pixel value for the margin as opposed\n * to the default dynamic margin. See also `spacingRight`.\n *\n * @sample {highcharts} highcharts/chart/marginright/\n * 100px right margin\n * @sample {highstock} stock/chart/marginright/\n * 100px right margin\n * @sample {highmaps} maps/chart/margin/\n * 100px margins\n *\n * @type {number}\n * @since 2.0\n * @apioption chart.marginRight\n */\n /**\n * The margin between the top outer edge of the chart and the plot area.\n * Use this to set a fixed pixel value for the margin as opposed to\n * the default dynamic margin. See also `spacingTop`.\n *\n * @sample {highcharts} highcharts/chart/margintop/ 100px top margin\n * @sample {highstock} stock/chart/margintop/\n * 100px top margin\n * @sample {highmaps} maps/chart/margin/\n * 100px margins\n *\n * @type {number}\n * @since 2.0\n * @apioption chart.marginTop\n */\n /**\n * Callback function to override the default function that formats all\n * the numbers in the chart. Returns a string with the formatted number.\n *\n * @sample highcharts/members/highcharts-numberformat\n * Arabic digits in Highcharts\n * @type {Highcharts.NumberFormatterCallbackFunction}\n * @since 8.0.0\n * @apioption chart.numberFormatter\n */\n /**\n * When a chart with an x and a y-axis is rendered, we first pre-render the\n * labels of both in order to measure them. Then, if either of the axis\n * labels take up so much space that it significantly affects the length of\n * the other axis, we repeat the process.\n *\n * By default we stop at two axis layout runs, but it may be that the second\n * run also alter the space required by either axis, for example if it\n * causes the labels to rotate. In this situation, a subsequent redraw of\n * the chart may cause the tick and label placement to change for apparently\n * no reason.\n *\n * Use the `axisLayoutRuns` option to set the maximum allowed number of\n * repetitions. But keep in mind that the default value of 2 is set because\n * every run costs performance time.\n *\n * **Note:** Changing that option to higher than the default might decrease\n * performance significantly, especially with bigger sets of data.\n *\n * @type {number}\n * @default 2\n * @since 11.3.0\n * @apioption chart.axisLayoutRuns\n */\n /**\n * Allows setting a key to switch between zooming and panning. Can be\n * one of `alt`, `ctrl`, `meta` (the command key on Mac and Windows\n * key on Windows) or `shift`. The keys are mapped directly to the key\n * properties of the click event argument (`event.altKey`,\n * `event.ctrlKey`, `event.metaKey` and `event.shiftKey`).\n *\n * @type {string}\n * @since 4.0.3\n * @product highcharts gantt\n * @validvalue [\"alt\", \"ctrl\", \"meta\", \"shift\"]\n * @apioption chart.panKey\n */\n /**\n * Allow panning in a chart. Best used with [panKey](#chart.panKey)\n * to combine zooming and panning.\n *\n * On touch devices, when the [tooltip.followTouchMove](\n * #tooltip.followTouchMove) option is `true` (default), panning\n * requires two fingers. To allow panning with one finger, set\n * `followTouchMove` to `false`.\n *\n * @sample {highcharts} highcharts/chart/pankey/ Zooming and panning\n * @sample {highstock} stock/chart/panning/ Zooming and xy panning\n */\n panning: {\n /**\n * Enable or disable chart panning.\n *\n * @type {boolean}\n * @default {highcharts} false\n * @default {highstock|highmaps} true\n */\n enabled: false,\n /**\n * Decides in what dimensions the user can pan the chart. Can be\n * one of `x`, `y`, or `xy`.\n *\n * During panning, all axes will behave as if\n * [`startOnTick`](#yAxis.startOnTick) and\n * [`endOnTick`](#yAxis.endOnTick) were set to `false`. After the\n * panning action is finished, the axes will adjust to their actual\n * settings.\n *\n * **Note:** For non-cartesian series, the only supported panning type\n * is `xy`, as zooming in a single direction is not applicable due to\n * the radial nature of the coordinate system.\n *\n * @sample {highcharts} highcharts/chart/panning-type\n * Zooming and xy panning\n *\n * @declare Highcharts.OptionsChartPanningTypeValue\n * @type {string}\n * @validvalue [\"x\", \"y\", \"xy\"]\n * @product highcharts highstock gantt\n */\n type: 'x'\n },\n /**\n * Equivalent to [zoomType](#chart.zoomType), but for multitouch\n * gestures only. By default, the `pinchType` is the same as the\n * `zoomType` setting. However, pinching can be enabled separately in\n * some cases, for example in stock charts where a mouse drag pans the\n * chart, while pinching is enabled. When [tooltip.followTouchMove](\n * #tooltip.followTouchMove) is true, pinchType only applies to\n * two-finger touches.\n *\n * @type {string}\n * @default {highcharts} undefined\n * @default {highstock} undefined\n * @since 3.0\n * @product highcharts highstock gantt\n * @deprecated\n * @validvalue [\"x\", \"y\", \"xy\"]\n * @apioption chart.pinchType\n */\n /**\n * Whether to apply styled mode. When in styled mode, no presentational\n * attributes or CSS are applied to the chart SVG. Instead, CSS rules\n * are required to style the chart. The default style sheet is\n * available from `https://code.highcharts.com/css/highcharts.css`.\n *\n * [Read more in the docs](https://www.highcharts.com/docs/chart-design-and-style/style-by-css)\n * on what classes and variables are available.\n *\n * @sample highcharts/css/colors\n * Color theming with CSS\n * @sample highcharts/css/prefers-color-scheme\n * Dynamic theme based on system settings\n * @type {boolean}\n * @default false\n * @since 7.0\n * @apioption chart.styledMode\n */\n styledMode: false,\n /**\n * The corner radius of the outer chart border.\n *\n * @sample {highcharts} highcharts/chart/borderradius/\n * 20px radius\n * @sample {highstock} stock/chart/border/\n * 10px radius\n * @sample {highmaps} maps/chart/border/\n * Border options\n *\n */\n borderRadius: 0,\n /**\n * In styled mode, this sets how many colors the class names\n * should rotate between. With ten colors, series (or points) are\n * given class names like `highcharts-color-0`, `highcharts-color-1`\n * [...] `highcharts-color-9`. The equivalent in non-styled mode\n * is to set colors using the [colors](#colors) setting.\n *\n * @since 5.0.0\n */\n colorCount: 10,\n /**\n * By default, (because of memory and performance reasons) the chart does\n * not copy the data but keeps it as a reference. In some cases, this might\n * result in mutating the original data source. In order to prevent that,\n * set that property to false. Please note that changing that might decrease\n * performance, especially with bigger sets of data.\n *\n * @type {boolean}\n * @since 10.1.0\n */\n allowMutatingData: true,\n /**\n * If true, the axes will scale to the remaining visible series once\n * one series is hidden. If false, hiding and showing a series will\n * not affect the axes or the other series. For stacks, once one series\n * within the stack is hidden, the rest of the stack will close in\n * around it even if the axis is not affected.\n *\n * @sample {highcharts} highcharts/chart/ignorehiddenseries-true/\n * True by default\n * @sample {highcharts} highcharts/chart/ignorehiddenseries-false/\n * False\n * @sample {highcharts} highcharts/chart/ignorehiddenseries-true-stacked/\n * True with stack\n * @sample {highstock} stock/chart/ignorehiddenseries-true/\n * True by default\n * @sample {highstock} stock/chart/ignorehiddenseries-false/\n * False\n *\n * @since 1.2.0\n * @product highcharts highstock gantt\n */\n ignoreHiddenSeries: true,\n /**\n * Whether to invert the axes so that the x axis is vertical and y axis\n * is horizontal. When `true`, the x axis is [reversed](#xAxis.reversed)\n * by default.\n *\n * @productdesc {highcharts}\n * If a bar series is present in the chart, it will be inverted\n * automatically. Inverting the chart doesn't have an effect if there\n * are no cartesian series in the chart.\n *\n * @sample {highcharts} highcharts/chart/inverted/\n * Inverted line\n * @sample {highstock} stock/navigator/inverted/\n * Inverted stock chart\n *\n * @type {boolean}\n * @default false\n * @product highcharts highstock gantt\n * @apioption chart.inverted\n */\n /**\n * The distance between the outer edge of the chart and the content,\n * like title or legend, or axis title and labels if present. The\n * numbers in the array designate top, right, bottom and left\n * respectively. Use the options spacingTop, spacingRight, spacingBottom\n * and spacingLeft options for shorthand setting of one option.\n *\n * @type {Array<number>}\n * @see [chart.margin](#chart.margin)\n * @default [10, 10, 15, 10]\n * @since 3.0.6\n */\n spacing: [10, 10, 15, 10],\n /**\n * The button that appears after a selection zoom, allowing the user\n * to reset zoom. This option is deprecated in favor of\n * [zooming](#chart.zooming).\n *\n * @since 2.2\n * @deprecated 10.2.1\n */\n resetZoomButton: {\n /**\n * What frame the button placement should be related to. Can be\n * either `plotBox` or `spacingBox`.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-relativeto/\n * Relative to the chart\n * @sample {highstock} highcharts/chart/resetzoombutton-relativeto/\n * Relative to the chart\n *\n * @type {Highcharts.ButtonRelativeToValue}\n * @apioption chart.resetZoomButton.relativeTo\n */\n /**\n * A collection of attributes for the button. The object takes SVG\n * attributes like `fill`, `stroke`, `stroke-width` or `r`, the\n * border radius. The theme also supports `style`, a collection of\n * CSS properties for the text. Equivalent attributes for the hover\n * state are given in `theme.states.hover`.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-theme/\n * Theming the button\n * @sample {highstock} highcharts/chart/resetzoombutton-theme/\n * Theming the button\n *\n * @type {Highcharts.SVGAttributes}\n */\n theme: {\n /**\n * The z-index of the button.\n *\n * @type {number}\n * @apioption chart.resetZoomButton.theme.zIndex\n */\n },\n /**\n * The position of the button.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n * @sample {highstock} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n * @sample {highmaps} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n *\n * @type {Highcharts.AlignObject}\n */\n position: {\n /**\n * The horizontal alignment of the button.\n *\n * @type {number}\n * @apioption chart.resetZoomButton.position.align\n */\n /**\n * The horizontal offset of the button.\n *\n * @type {number}\n * @apioption chart.resetZoomButton.position.x\n */\n /**\n * The vertical alignment of the button.\n *\n * @type {Highcharts.VerticalAlignValue}\n * @apioption chart.resetZoomButton.position.verticalAlign\n */\n /**\n * The vertical offset of the button.\n *\n * @type {number}\n * @apioption chart.resetZoomButton.position.y\n */\n }\n },\n /**\n * The pixel width of the plot area border.\n *\n * @sample {highcharts} highcharts/chart/plotborderwidth/\n * 1px border\n * @sample {highstock} stock/chart/plotborder/\n * 2px border\n * @sample {highmaps} maps/chart/plotborder/\n * Plot border options\n *\n * @type {number}\n * @default 0\n * @apioption chart.plotBorderWidth\n */\n /**\n * Whether to apply a drop shadow to the plot area. Requires that\n * plotBackgroundColor be set. The shadow can be an object configuration\n * containing `color`, `offsetX`, `offsetY`, `opacity` and `width`.\n *\n * @sample {highcharts} highcharts/chart/plotshadow/\n * Plot shadow\n * @sample {highstock} stock/chart/plotshadow/\n * Plot shadow\n * @sample {highmaps} maps/chart/plotborder/\n * Plot border options\n *\n * @type {boolean|Highcharts.ShadowOptionsObject}\n * @default false\n * @apioption chart.plotShadow\n */\n /**\n * When true, cartesian charts like line, spline, area and column are\n * transformed into the polar coordinate system. This produces _polar\n * charts_, also known as _radar charts_.\n *\n * @sample {highcharts} highcharts/demo/polar/\n * Polar chart\n * @sample {highcharts} highcharts/demo/polar-wind-rose/\n * Wind rose, stacked polar column chart\n * @sample {highcharts} highcharts/demo/polar-spider/\n * Spider web chart\n * @sample {highcharts} highcharts/parallel-coordinates/polar/\n * Star plot, multivariate data in a polar chart\n *\n * @type {boolean}\n * @default false\n * @since 2.3.0\n * @product highcharts\n * @requires highcharts-more\n * @apioption chart.polar\n */\n /**\n * Whether to reflow the chart to fit the width of the container div\n * on resizing the window.\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * True by default\n * @sample {highcharts} highcharts/chart/reflow-false/\n * False\n * @sample {highstock} stock/chart/reflow-true/\n * True by default\n * @sample {highstock} stock/chart/reflow-false/\n * False\n * @sample {highmaps} maps/chart/reflow-true/\n * True by default\n * @sample {highmaps} maps/chart/reflow-false/\n * False\n *\n * @since 2.1\n */\n reflow: true,\n /**\n * The HTML element where the chart will be rendered. If it is a string,\n * the element by that id is used. The HTML element can also be passed\n * by direct reference, or as the first argument of the chart\n * constructor, in which case the option is not needed.\n *\n * @sample {highcharts} highcharts/chart/reflow-true/\n * String\n * @sample {highcharts} highcharts/chart/renderto-object/\n * Object reference\n * @sample {highstock} stock/chart/renderto-string/\n * String\n * @sample {highstock} stock/chart/renderto-object/\n * Object reference\n *\n * @type {string|Highcharts.HTMLDOMElement}\n * @apioption chart.renderTo\n */\n /**\n * The background color of the marker square when selecting (zooming\n * in on) an area of the chart.\n *\n * @see In styled mode, the selection marker fill is set with the\n * `.highcharts-selection-marker` class.\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @default rgba(51,92,173,0.25)\n * @since 2.1.7\n * @apioption chart.selectionMarkerFill\n */\n /**\n * Whether to apply a drop shadow to the global series group. This causes\n * all the series to have the same shadow. Contrary to the `series.shadow`\n * option, this prevents items from casting shadows on each other, like for\n * others series in a stack. The shadow can be an object configuration\n * containing `color`, `offsetX`, `offsetY`, `opacity` and `width`.\n *\n * @sample highcharts/chart/seriesgroupshadow/\n * Shadow\n *\n * @type {boolean|Highcharts.ShadowOptionsObject}\n * @default false\n * @apioption chart.seriesGroupShadow\n */\n /**\n * Whether to apply a drop shadow to the outer chart area. Requires\n * that backgroundColor be set. The shadow can be an object\n * configuration containing `color`, `offsetX`, `offsetY`, `opacity` and\n * `width`.\n *\n * @sample {highcharts} highcharts/chart/shadow/\n * Shadow\n * @sample {highstock} stock/chart/shadow/\n * Shadow\n * @sample {highmaps} maps/chart/border/\n * Chart border and shadow\n *\n * @type {boolean|Highcharts.ShadowOptionsObject}\n * @default false\n * @apioption chart.shadow\n */\n /**\n * Whether to show the axes initially. This only applies to empty charts\n * where series are added dynamically, as axes are automatically added\n * to cartesian series.\n *\n * @sample {highcharts} highcharts/chart/showaxes-false/\n * False by default\n * @sample {highcharts} highcharts/chart/showaxes-true/\n * True\n *\n * @type {boolean}\n * @since 1.2.5\n * @product highcharts gantt\n * @apioption chart.showAxes\n */\n /**\n * The space between the bottom edge of the chart and the content (plot\n * area, axis title and labels, title, subtitle or legend in top\n * position).\n *\n * @sample {highcharts} highcharts/chart/spacingbottom/\n * Spacing bottom set to 100\n * @sample {highstock} stock/chart/spacingbottom/\n * Spacing bottom set to 100\n * @sample {highmaps} maps/chart/spacing/\n * Spacing 100 all around\n *\n * @type {number}\n * @default 15\n * @since 2.1\n * @apioption chart.spacingBottom\n */\n /**\n * The space between the left edge of the chart and the content (plot\n * area, axis title and labels, title, subtitle or legend in top\n * position).\n *\n * @sample {highcharts} highcharts/chart/spacingleft/\n * Spacing left set to 100\n * @sample {highstock} stock/chart/spacingleft/\n * Spacing left set to 100\n * @sample {highmaps} maps/chart/spacing/\n * Spacing 100 all around\n *\n * @type {number}\n * @default 10\n * @since 2.1\n * @apioption chart.spacingLeft\n */\n /**\n * The space between the right edge of the chart and the content (plot\n * area, axis title and labels, title, subtitle or legend in top\n * position).\n *\n * @sample {highcharts} highcharts/chart/spacingright-100/\n * Spacing set to 100\n * @sample {highcharts} highcharts/chart/spacingright-legend/\n * Legend in right position with default spacing\n * @sample {highstock} stock/chart/spacingright/\n * Spacing set to 100\n * @sample {highmaps} maps/chart/spacing/\n * Spacing 100 all around\n *\n * @type {number}\n * @default 10\n * @since 2.1\n * @apioption chart.spacingRight\n */\n /**\n * The space between the top edge of the chart and the content (plot\n * area, axis title and labels, title, subtitle or legend in top\n * position).\n *\n * @sample {highcharts} highcharts/chart/spacingtop-100/\n * A top spacing of 100\n * @sample {highcharts} highcharts/chart/spacingtop-10/\n * Floating chart title makes the plot area align to the default\n * spacingTop of 10.\n * @sample {highstock} stock/chart/spacingtop/\n * A top spacing of 100\n * @sample {highmaps} maps/chart/spacing/\n * Spacing 100 all around\n *\n * @type {number}\n * @default 10\n * @since 2.1\n * @apioption chart.spacingTop\n */\n /**\n * Additional CSS styles to apply inline to the container `div` and the root\n * SVG.\n *\n * According to the CSS syntax documentation, it is recommended to quote\n * font family names that contain white space, digits, or punctuation\n * characters other than hyphens. In such cases, wrap the fontFamily\n * name as follows: `fontFamily: '\"Font name\"'`.\n *\n * Since v11, the root font size is 1rem by default, and all child element\n * are given a relative `em` font size by default. This allows implementers\n * to control all the chart's font sizes by only setting the root level.\n *\n * @see In styled mode, general chart styles can be set with the\n * `.highcharts-root` class.\n * @sample {highcharts} highcharts/chart/style-serif-font/\n * Using a serif type font\n * @sample {highcharts} highcharts/chart/style-special-font/\n * Using a font with special character in name\n * @sample {highcharts} highcharts/members/relative-font-size/\n * Relative font sizes\n * @sample {highcharts} highcharts/css/em/\n * Styled mode with relative font sizes\n * @sample {highstock} stock/chart/style/\n * Using a serif type font\n * @sample {highmaps} maps/chart/style-serif-font/\n * Using a serif type font\n *\n * @type {Highcharts.CSSObject}\n * @default {\"fontFamily\": \"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif\", \"fontSize\":\"1rem\"}\n * @apioption chart.style\n */\n /**\n * The default series type for the chart. Can be any of the chart types\n * listed under [plotOptions](#plotOptions) and [series](#series) or can\n * be a series provided by an additional module.\n *\n * In TypeScript this option has no effect in sense of typing and\n * instead the `type` option must always be set in the series.\n *\n * @sample {highcharts} highcharts/chart/type-bar/\n * Bar\n * @sample {highstock} stock/chart/type/\n * Areaspline\n * @sample {highmaps} maps/chart/type-mapline/\n * Mapline\n *\n * @type {string}\n * @default {highcharts} line\n * @default {highstock} line\n * @default {highmaps} map\n * @since 2.1.0\n * @apioption chart.type\n */\n type: 'line',\n /**\n * Decides in what dimensions the user can zoom by dragging the mouse.\n * Can be one of `x`, `y` or `xy`.\n *\n * @see [panKey](#chart.panKey)\n *\n * @sample {highcharts} highcharts/chart/zoomtype-none/\n * None by default\n * @sample {highcharts} highcharts/chart/zoomtype-x/\n * X\n * @sample {highcharts} highcharts/chart/zoomtype-y/\n * Y\n * @sample {highcharts} highcharts/chart/zoomtype-xy/\n * Xy\n * @sample {highcharts} highcharts/chart/zoomtype-polar/\n * Zoom on polar chart\n * @sample {highstock} stock/demo/basic-line/\n * None by default\n * @sample {highstock} stock/chart/zoomtype-x/\n * X\n * @sample {highstock} stock/chart/zoomtype-y/\n * Y\n * @sample {highstock} stock/chart/zoomtype-xy/\n * Xy\n * @sample {highmaps} maps/chart/zoomtype-xy/\n * Map with selection zoom\n *\n * @type {string}\n * @validvalue [\"x\", \"y\", \"xy\"]\n * @deprecated\n * @apioption chart.zoomType\n */\n /**\n * Enables zooming by a single touch, in combination with\n * [chart.zoomType](#chart.zoomType). When enabled, two-finger pinch\n * will still work as set up by [chart.pinchType](#chart.pinchType).\n * However, `zoomBySingleTouch` will interfere with touch-dragging the\n * chart to read the tooltip. And especially when vertical zooming is\n * enabled, it will make it hard to scroll vertically on the page.\n * @since 9.0.0\n * @sample highcharts/chart/zoombysingletouch\n * Zoom by single touch enabled, with buttons to toggle\n * @product highcharts highstock gantt\n * @deprecated\n */\n /**\n * Chart zooming options.\n * @since 10.2.1\n *\n * @sample highcharts/plotoptions/sankey-node-color\n * Zooming in sankey series\n * @sample highcharts/series-treegraph/link-types\n * Zooming in treegraph series\n */\n zooming: {\n /**\n * Equivalent to [type](#chart.zooming.type), but for multitouch\n * gestures only. By default, the `pinchType` is the same as the\n * `type` setting. However, pinching can be enabled separately in\n * some cases, for example in stock charts where a mouse drag pans the\n * chart, while pinching is enabled. When [tooltip.followTouchMove](\n * #tooltip.followTouchMove) is true, pinchType only applies to\n * two-finger touches.\n *\n * @type {string}\n * @default {highcharts} undefined\n * @default {highstock} x\n * @product highcharts highstock gantt\n * @validvalue [\"x\", \"y\", \"xy\"]\n * @apioption chart.zooming.pinchType\n */\n /**\n * Decides in what dimensions the user can zoom by dragging the mouse.\n * Can be one of `x`, `y` or `xy`.\n *\n * **Note:** For non-cartesian series, the only supported zooming type\n * is `xy`, as zooming in a single direction is not applicable due to\n * the radial nature of the coordinate system.\n *\n * @declare Highcharts.OptionsChartZoomingTypeValue\n * @type {string}\n * @default {highcharts} undefined\n * @product highcharts highstock gantt\n * @validvalue [\"x\", \"y\", \"xy\"]\n * @apioption chart.zooming.type\n */\n /**\n * Set a key to hold when dragging to zoom the chart. This is useful to\n * avoid zooming while moving points. Should be set different than\n * [chart.panKey](#chart.panKey).\n *\n * @type {string}\n * @default {highcharts} undefined\n * @validvalue [\"alt\", \"ctrl\", \"meta\", \"shift\"]\n * @requires modules/draggable-points\n * @apioption chart.zooming.key\n */\n /**\n * Enables zooming by a single touch, in combination with\n * [chart.zooming.type](#chart.zooming.type). When enabled, two-finger\n * pinch will still work as set up by [chart.zooming.pinchType]\n * (#chart.zooming.pinchType). However, `singleTouch` will interfere\n * with touch-dragging the chart to read the tooltip. And especially\n * when vertical zooming is enabled, it will make it hard to scroll\n * vertically on the page.\n *\n * @sample highcharts/chart/zoombysingletouch\n * Zoom by single touch enabled, with buttons to toggle\n *\n * @product highcharts highstock gantt\n */\n singleTouch: false,\n /**\n * The button that appears after a selection zoom, allowing the user\n * to reset zoom.\n */\n resetButton: {\n /**\n * What frame the button placement should be related to. Can be\n * either `plotBox` or `spacingBox`.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-relativeto/\n * Relative to the chart\n * @sample {highstock} highcharts/chart/resetzoombutton-relativeto/\n * Relative to the chart\n *\n * @type {Highcharts.ButtonRelativeToValue}\n * @default plot\n * @apioption chart.zooming.resetButton.relativeTo\n */\n /**\n * A collection of attributes for the button. The object takes SVG\n * attributes like `fill`, `stroke`, `stroke-width` or `r`, the\n * border radius. The theme also supports `style`, a collection of\n * CSS properties for the text. Equivalent attributes for the hover\n * state are given in `theme.states.hover`.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-theme/\n * Theming the button\n * @sample {highstock} highcharts/chart/resetzoombutton-theme/\n * Theming the button\n *\n * @type {Highcharts.SVGAttributes}\n * @since 10.2.1\n */\n theme: {\n /** @internal */\n zIndex: 6\n },\n /**\n * The position of the button.\n *\n * Note: Adjusting position values might cause overlap with chart\n * elements. Ensure coordinates do not obstruct other components or\n * data visibility.\n *\n * @sample {highcharts} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n * @sample {highstock} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n * @sample {highmaps} highcharts/chart/resetzoombutton-position/\n * Above the plot area\n *\n * @type {Highcharts.AlignObject}\n * @since 10.2.1\n */\n position: {\n /**\n * The horizontal alignment of the button.\n */\n align: 'right',\n /**\n * The horizontal offset of the button.\n */\n x: -10,\n /**\n * The vertical alignment of the button.\n *\n * @type {Highcharts.VerticalAlignValue}\n * @default top\n * @apioption chart.zooming.resetButton.position.verticalAlign\n */\n /**\n * The vertical offset of the button.\n */\n y: 10\n }\n }\n },\n /**\n * An explicit width for the chart. By default (when `null`) the width\n * is calculated from the offset width of the containing element.\n *\n * @sample {highcharts} highcharts/chart/width/\n * 800px wide\n * @sample {highstock} stock/chart/width/\n * 800px wide\n * @sample {highmaps} maps/chart/size/\n * Chart with explicit size\n *\n * @type {null|number|string}\n */\n width: null,\n /**\n * An explicit height for the chart. If a _number_, the height is\n * given in pixels. If given a _percentage string_ (for example\n * `'56%'`), the height is given as the percentage of the actual chart\n * width. This allows for preserving the aspect ratio across responsive\n * sizes.\n *\n * By default (when `null`) the height is calculated from the offset\n * height of the containing element, or 400 pixels if the containing\n * element's height is 0.\n *\n * @sample {highcharts} highcharts/chart/height/\n * Forced 200px height\n * @sample {highstock} stock/chart/height/\n * 300px height\n * @sample {highmaps} maps/chart/size/\n * Chart with explicit size\n * @sample highcharts/chart/height-percent/\n * Highcharts with percentage height\n * @sample highcharts/chart/height-inherited/\n * Chart with inherited height\n *\n * @type {null|number|string}\n */\n height: null,\n /**\n * The color of the outer chart border.\n *\n * @see In styled mode, the stroke is set with the\n * `.highcharts-background` class.\n *\n * @sample {highcharts} highcharts/chart/bordercolor/\n * Brown border\n * @sample {highstock} stock/chart/border/\n * Brown border\n * @sample {highmaps} maps/chart/border/\n * Border options\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n borderColor: \"#334eff\" /* Palette.highlightColor80 */,\n /**\n * The pixel width of the outer chart border.\n *\n * @see In styled mode, the stroke is set with the\n * `.highcharts-background` class.\n *\n * @sample {highcharts} highcharts/chart/borderwidth/\n * 5px border\n * @sample {highstock} stock/chart/border/\n * 2px border\n * @sample {highmaps} maps/chart/border/\n * Border options\n *\n * @type {number}\n * @default 0\n * @apioption chart.borderWidth\n */\n /**\n * The background color or gradient for the outer chart area.\n *\n * @see In styled mode, the background is set with the\n * `.highcharts-background` class.\n *\n * @sample {highcharts} highcharts/chart/backgroundcolor-color/\n * Color\n * @sample {highcharts} highcharts/chart/backgroundcolor-gradient/\n * Gradient\n * @sample {highstock} stock/chart/backgroundcolor-color/\n * Color\n * @sample {highstock} stock/chart/backgroundcolor-gradient/\n * Gradient\n * @sample {highmaps} maps/chart/backgroundcolor-color/\n * Color\n * @sample {highmaps} maps/chart/backgroundcolor-gradient/\n * Gradient\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n backgroundColor: \"#ffffff\" /* Palette.backgroundColor */,\n /**\n * The background color or gradient for the plot area.\n *\n * @see In styled mode, the plot background is set with the\n * `.highcharts-plot-background` class.\n *\n * @sample {highcharts} highcharts/chart/plotbackgroundcolor-color/\n * Color\n * @sample {highcharts} highcharts/chart/plotbackgroundcolor-gradient/\n * Gradient\n * @sample {highstock} stock/chart/plotbackgroundcolor-color/\n * Color\n * @sample {highstock} stock/chart/plotbackgroundcolor-gradient/\n * Gradient\n * @sample {highmaps} maps/chart/plotbackgroundcolor-color/\n * Color\n * @sample {highmaps} maps/chart/plotbackgroundcolor-gradient/\n * Gradient\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @apioption chart.plotBackgroundColor\n */\n /**\n * The URL for an image to use as the plot background. To set an image\n * as the background for the entire chart, set a CSS background image\n * to the container element. Note that for the image to be applied to\n * exported charts, its URL needs to be accessible by the export server.\n *\n * @see In styled mode, a plot background image can be set with the\n * `.highcharts-plot-background` class and a [custom pattern](\n * https://www.highcharts.com/docs/chart-design-and-style/gradients-shadows-and-patterns).\n *\n * @sample {highcharts} highcharts/chart/plotbackgroundimage/\n * Skies\n * @sample {highstock} stock/chart/plotbackgroundimage/\n * Skies\n *\n * @type {string}\n * @apioption chart.plotBackgroundImage\n */\n /**\n * The color of the inner chart or plot area border.\n *\n * @see In styled mode, a plot border stroke can be set with the\n * `.highcharts-plot-border` class.\n *\n * @sample {highcharts} highcharts/chart/plotbordercolor/\n * Blue border\n * @sample {highstock} stock/chart/plotborder/\n * Blue border\n * @sample {highmaps} maps/chart/plotborder/\n * Plot border options\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n plotBorderColor: \"#cccccc\" /* Palette.neutralColor20 */\n};\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Chart_ChartDefaults = (ChartDefaults);\n\n;// ./code/grid/es-modules/Core/Color/Palettes.js\n/**\n * Series palettes for Highcharts. Series colors are defined in highcharts.css.\n * **Do not edit this file!** This file is generated using the 'gulp palette' task.\n * @private\n */\nconst SeriesPalettes = {\n /**\n * Colors for data series and points\n */\n colors: [\n '#2caffe',\n '#544fc5',\n '#00e272',\n '#fe6a35',\n '#6b8abc',\n '#d568fb',\n '#2ee0ca',\n '#fa4b42',\n '#feb56a',\n '#91e8e1'\n ],\n};\n/* harmony default export */ const Palettes = (SeriesPalettes);\n\n;// ./code/grid/es-modules/Shared/TimeBase.js\n/* *\n *\n * (c) 2010-2025 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n\n\nconst { pageLang, win: TimeBase_win } = Core_Globals;\n\nconst { defined: TimeBase_defined, error: TimeBase_error, extend: TimeBase_extend, isNumber: TimeBase_isNumber, isObject: TimeBase_isObject, isString: TimeBase_isString, merge: TimeBase_merge, objectEach: TimeBase_objectEach, pad: TimeBase_pad, splat: TimeBase_splat, timeUnits: TimeBase_timeUnits, ucfirst: TimeBase_ucfirst } = Core_Utilities;\n/* *\n *\n * Constants\n *\n * */\n// To do: Remove this when we no longer need support for Safari < v14.1\nconst hasOldSafariBug = Core_Globals.isSafari &&\n TimeBase_win.Intl &&\n !TimeBase_win.Intl.DateTimeFormat.prototype.formatRange;\nconst isDateTimeFormatOptions = (obj) => obj.main === void 0;\n/* *\n *\n * Class\n *\n * */\n/* eslint-disable no-invalid-this, valid-jsdoc */\n/**\n * The Time class. Time settings are applied in general for each page using\n * `Highcharts.setOptions`, or individually for each Chart item through the\n * [time](https://api.highcharts.com/highcharts/time) options set.\n *\n * The Time object is available from {@link Highcharts.Chart#time}, which refers\n * to `Highcharts.time` unless individual time settings are applied for each\n * chart.\n *\n * When configuring time settings for individual chart instances, be aware that\n * using `Highcharts.dateFormat` or `Highcharts.time.dateFormat` within\n * formatter callbacks relies on the global time object, which applies the\n * global language and time zone settings. To ensure charts with local time\n * settings function correctly, use `chart.time.dateFormat? instead. However,\n * the recommended best practice is to use `setOptions` to define global time\n * settings unless specific configurations are needed for each chart.\n *\n * @example\n * // Apply time settings globally\n * Highcharts.setOptions({\n * time: {\n * timezone: 'Europe/London'\n * }\n * });\n *\n * // Apply time settings by instance\n * const chart = Highcharts.chart('container', {\n * time: {\n * timezone: 'America/New_York'\n * },\n * series: [{\n * data: [1, 4, 3, 5]\n * }]\n * });\n *\n * // Use the Time object of a chart instance\n * console.log(\n * 'Current time in New York',\n * chart.time.dateFormat('%Y-%m-%d %H:%M:%S', Date.now())\n * );\n *\n * // Standalone use\n * const time = new Highcharts.Time({\n * timezone: 'America/New_York'\n * });\n * const s = time.dateFormat('%Y-%m-%d %H:%M:%S', Date.UTC(2020, 0, 1));\n * console.log(s); // => 2019-12-31 19:00:00\n *\n * @since 6.0.5\n *\n * @class\n * @name Highcharts.Time\n *\n * @param {Highcharts.TimeOptions} [options] Time options as defined in\n * [chart.options.time](/highcharts/time).\n */\nclass TimeBase {\n /* *\n *\n * Constructors\n *\n * */\n constructor(options, lang) {\n /* *\n *\n * Properties\n *\n * */\n this.options = {\n timezone: 'UTC'\n };\n this.variableTimezone = false;\n this.Date = TimeBase_win.Date;\n this.update(options);\n this.lang = lang;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Update the Time object with current options. It is called internally on\n * initializing Highcharts, after running `Highcharts.setOptions` and on\n * `Chart.update`.\n *\n * @private\n * @function Highcharts.Time#update\n *\n * @param {Highcharts.TimeOptions} [options]\n *\n */\n update(options = {}) {\n this.dTLCache = {};\n this.options = options = TimeBase_merge(true, this.options, options);\n const { timezoneOffset, useUTC, locale } = options;\n // Allow using a different Date class\n this.Date = options.Date || TimeBase_win.Date || Date;\n // Assign the time zone. Handle the legacy, deprecated `useUTC` option.\n let timezone = options.timezone;\n if (TimeBase_defined(useUTC)) {\n timezone = useUTC ? 'UTC' : void 0;\n }\n // The Etc/GMT time zones do not support offsets with half-hour\n // resolutions\n if (timezoneOffset && timezoneOffset % 60 === 0) {\n timezone = 'Etc/GMT' + ((timezoneOffset > 0 ? '+' : '')) + timezoneOffset / 60;\n }\n /*\n * The time object has options allowing for variable time zones, meaning\n * the axis ticks or series data needs to consider this.\n */\n this.variableTimezone = timezone !== 'UTC' &&\n timezone?.indexOf('Etc/GMT') !== 0;\n this.timezone = timezone;\n // Update locale.\n if (this.lang && locale) {\n this.lang.locale = locale;\n }\n // Assign default time formats from locale strings\n ['months', 'shortMonths', 'weekdays', 'shortWeekdays'].forEach((name) => {\n const isMonth = /months/i.test(name), isShort = /short/.test(name), options = {\n timeZone: 'UTC'\n };\n options[isMonth ? 'month' : 'weekday'] = isShort ? 'short' : 'long';\n this[name] = (isMonth ?\n [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] :\n [3, 4, 5, 6, 7, 8, 9]).map((position) => this.dateFormat(options, (isMonth ? 31 : 1) * 24 * 36e5 * position));\n });\n }\n /**\n * Get a date in terms of numbers (year, month, day etc) for further\n * processing. Takes the current `timezone` setting into account. Inverse of\n * `makeTime` and the native `Date` constructor and `Date.UTC`.\n *\n * The date is returned in array format with the following indices:\n *\n * 0: year,\n * 1: month (zero based),\n * 2: day,\n * 3: hours,\n * 4: minutes,\n * 5: seconds,\n * 6: milliseconds,\n * 7: weekday (Sunday as 0)\n *\n * @function Highcharts.Time#toParts\n *\n * @param {number|Date} [timestamp]\n * The timestamp in milliseconds since January 1st 1970.\n * A Date object is also accepted.\n *\n * @return {Array<number>} The date parts in array format.\n */\n toParts(timestamp) {\n const [weekday, dayOfMonth, month, year, hours, minutes, seconds] = this.dateTimeFormat({\n weekday: 'narrow',\n day: 'numeric',\n month: 'numeric',\n year: 'numeric',\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric'\n }, timestamp, 'es')\n // The ', ' splitter is for all modern browsers:\n // L, 6/3/2023, 14:30:00\n // The ' ' splitter is for legacy Safari with no comma between date\n // and time (#22445):\n // L, 6/3/2023 14:30:00\n .split(/(?:, | |\\/|:)/g);\n return [\n year,\n +month - 1,\n dayOfMonth,\n hours,\n minutes,\n seconds,\n // Milliseconds\n Math.floor(Number(timestamp) || 0) % 1000,\n // Spanish weekday index\n 'DLMXJVS'.indexOf(weekday)\n ].map(Number);\n }\n /**\n * Shorthand to get a cached `Intl.DateTimeFormat` instance.\n */\n dateTimeFormat(options, timestamp, locale = this.options.locale || pageLang) {\n const cacheKey = JSON.stringify(options) + locale;\n if (TimeBase_isString(options)) {\n options = this.str2dtf(options);\n }\n let dTL = this.dTLCache[cacheKey];\n if (!dTL) {\n options.timeZone ?? (options.timeZone = this.timezone);\n try {\n dTL = new Intl.DateTimeFormat(locale, options);\n }\n catch (e) {\n if (/Invalid time zone/i.test(e.message)) {\n TimeBase_error(34);\n options.timeZone = 'UTC';\n dTL = new Intl.DateTimeFormat(locale, options);\n }\n else {\n TimeBase_error(e.message, false);\n }\n }\n }\n this.dTLCache[cacheKey] = dTL;\n return dTL?.format(timestamp) || '';\n }\n /**\n * Take a locale-aware string format and return a full DateTimeFormat in\n * object form.\n */\n str2dtf(s, dtf = {}) {\n const mapping = {\n L: { fractionalSecondDigits: 3 },\n S: { second: '2-digit' },\n M: { minute: 'numeric' },\n H: { hour: '2-digit' },\n k: { hour: 'numeric' },\n E: { weekday: 'narrow' },\n a: { weekday: 'short' },\n A: { weekday: 'long' },\n d: { day: '2-digit' },\n e: { day: 'numeric' },\n b: { month: 'short' },\n B: { month: 'long' },\n m: { month: '2-digit' },\n o: { month: 'numeric' },\n y: { year: '2-digit' },\n Y: { year: 'numeric' }\n };\n Object.keys(mapping).forEach((key) => {\n if (s.indexOf(key) !== -1) {\n TimeBase_extend(dtf, mapping[key]);\n }\n });\n return dtf;\n }\n /**\n * Make a time and returns milliseconds. Similar to `Date.UTC`, but takes\n * the current `timezone` setting into account.\n *\n * @function Highcharts.Time#makeTime\n *\n * @param {number} year\n * The year\n *\n * @param {number} month\n * The month. Zero-based, so January is 0.\n *\n * @param {number} [date=1]\n * The day of the month\n *\n * @param {number} [hours=0]\n * The hour of the day, 0-23.\n *\n * @param {number} [minutes=0]\n * The minutes\n *\n * @param {number} [seconds=0]\n * The seconds\n *\n * @return {number}\n * The time in milliseconds since January 1st 1970.\n */\n makeTime(year, month, date = 1, hours = 0, minutes, seconds, milliseconds) {\n // eslint-disable-next-line new-cap\n let d = this.Date.UTC(year, month, date, hours, minutes || 0, seconds || 0, milliseconds || 0);\n if (this.timezone !== 'UTC') {\n const offset = this.getTimezoneOffset(d);\n d += offset;\n // Adjustments close to DST transitions\n if (\n // Optimize for speed by limiting the number of calls to\n // `getTimezoneOffset`. According to\n // https://en.wikipedia.org/wiki/Daylight_saving_time_by_country,\n // DST change may only occur in these months.\n [2, 3, 8, 9, 10, 11].indexOf(month) !== -1 &&\n // DST transitions occur only in the night-time\n (hours < 5 || hours > 20)) {\n const newOffset = this.getTimezoneOffset(d);\n if (offset !== newOffset) {\n d += newOffset - offset;\n // A special case for transitioning from summer time to winter\n // time. When the clock is set back, the same time is repeated\n // twice, i.e. 02:30 am is repeated since the clock is set back\n // from 3 am to 2 am. We need to make the same time as local\n // Date does.\n }\n else if (offset - 36e5 === this.getTimezoneOffset(d - 36e5) &&\n !hasOldSafariBug) {\n d -= 36e5;\n }\n }\n }\n return d;\n }\n /**\n * Parse a datetime string. Unless the string contains time zone\n * information, apply the current `timezone` from options. If the argument\n * is a number, return it.\n *\n * @function Highcharts.Time#parse\n * @param {string|number|undefined} s The datetime string to parse\n * @return {number|undefined} Parsed JavaScript timestamp\n */\n parse(s) {\n if (!TimeBase_isString(s)) {\n return s ?? void 0;\n }\n s = s\n // Firefox fails on YYYY/MM/DD\n .replace(/\\//g, '-')\n // Replace some non-standard notations\n .replace(/(GMT|UTC)/, '');\n // Extend shorthand hour timezone offset like +02\n // .replace(/([+-][0-9]{2})$/, '$1:00');\n // Check if the string has time zone information\n const hasTimezone = s.indexOf('Z') > -1 ||\n /([+-][0-9]{2}):?[0-9]{2}$/.test(s), \n // YYYY-MM-DD and YYYY-MM are always UTC\n isYYYYMMDD = /^[0-9]{4}-[0-9]{2}(-[0-9]{2}|)$/.test(s);\n if (!hasTimezone && !isYYYYMMDD) {\n s += 'Z';\n }\n const ts = Date.parse(s);\n if (TimeBase_isNumber(ts)) {\n // Unless the string contains time zone information, convert from\n // the local time result of `Date.parse` via UTC into the current\n // timezone of the time object.\n return ts + ((!hasTimezone || isYYYYMMDD) ?\n this.getTimezoneOffset(ts) :\n 0);\n }\n }\n /**\n * Get the time zone offset based on the current timezone information as\n * set in the global options.\n *\n * @function Highcharts.Time#getTimezoneOffset\n *\n * @param {number} timestamp\n * The JavaScript timestamp to inspect.\n *\n * @return {number}\n * The timezone offset in minutes compared to UTC.\n */\n getTimezoneOffset(timestamp) {\n if (this.timezone !== 'UTC') {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [date, gmt, hours, colon, minutes = 0] = this.dateTimeFormat({ timeZoneName: 'shortOffset' }, timestamp, 'en')\n .split(/(GMT|:)/)\n .map(Number), offset = -(hours + minutes / 60) * 60 * 60000;\n // Possible future NaNs stop here\n if (TimeBase_isNumber(offset)) {\n return offset;\n }\n }\n return 0;\n }\n /**\n * Formats a JavaScript date timestamp (milliseconds since January 1 1970)\n * into a human readable date string.\n *\n * The `format` parameter accepts two types of values:\n * - An object containing settings that are passed directly on to\n * [Intl.DateTimeFormat.prototype.format](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/format).\n * - A format string containing either individual or locale-aware format\n * keys. **Individual keys**, for example `%Y-%m-%d`, are listed below.\n * **Locale-aware keys** are grouped by square brackets, for example\n * `%[Ymd]`. The order of keys within the square bracket doesn't affect\n * the output, which is determined by the locale. See example below.\n * Internally, the locale-aware format keys are just a shorthand for the\n * full object formats, but are particularly practical in\n * [templating](https://www.highcharts.com/docs/chart-concepts/templating)\n * where full object definitions are not an option.\n *\n * The available string format keys are listed below. Additional formats can\n * be given in the {@link Highcharts.dateFormats} hook.\n *\n * Supported format keys:\n * | Key | Description | Notes on locale-aware format |\n * -------|----------------------------------------------|-------|\n * | `%A` | Long weekday, like 'Monday' | |\n * | `%a` | Short weekday, like 'Mon' | |\n * | `%E` | Narrow weekday, single character | |\n * | `%d` | Two digit day of the month, 01 to 31 | |\n * | `%e` | Day of the month, 1 through 31 | |\n * | `%w` | Day of the week, 0 through 6 | N/A |\n * | `%v` | The prefix \"week from\", read from `lang.weekFrom` | N/A |\n * | `%b` | Short month, like 'Jan' | |\n * | `%B` | Long month, like 'January' | |\n * | `%m` | Two digit month number, 01 through 12 | |\n * | `%o` | Month number, 1 through 12 | |\n * | `%y` | Two digits year, like 24 for 2024 | |\n * | `%Y` | Four digits year, like 2024 | |\n * | `%H` | Two digits hours in 24h format, 00 through 23 | Depending on the locale, 12h format may be instered. |\n * | `%k` | Hours in 24h format, 0 through 23 | Depending on the locale, 12h format may be instered. |\n * | `%I` | Two digits hours in 12h format, 00 through 11 | N/A. The locale determines the hour format. |\n * | `%l` | Hours in 12h format, 1 through 12 | N/A. The locale determines the hour format. |\n * | `%M` | Two digits minutes, 00 through 59 | |\n * | `%p` | Upper case AM or PM | N/A. The locale determines whether to add AM and PM. |\n * | `%P` | Lower case AM or PM | N/A. The locale determines whether to add AM and PM. |\n * | `%S` | Two digits seconds, 00 through 59 | |\n * | `%L` | Milliseconds (naming from Ruby) | |\n *\n * @example\n * // Object format, US English\n * const time1 = new Highcharts.Time({ locale: 'en-US' });\n * console.log(\n * time1.dateFormat({\n * day: 'numeric',\n * month: 'short',\n * year: 'numeric',\n * hour: 'numeric',\n * minute: 'numeric'\n * }, Date.UTC(2024, 11, 31))\n * ); // => Dec 31, 2024, 12:00 AM\n *\n * // Object format, British English\n * const time2 = new Highcharts.Time({ locale: 'en-GB' });\n * console.log(\n * time2.dateFormat({\n * day: 'numeric',\n * month: 'short',\n * year: 'numeric',\n * hour: 'numeric',\n * minute: 'numeric'\n * }, Date.UTC(2024, 11, 31))\n * ); // => 31 Dec 2024, 00:00\n *\n * // Individual key string replacement\n * const time3 = new Highcharts.Time();\n * console.log(\n * time3.dateFormat('%Y-%m-%d %H:%M:%S', Date.UTC(2024, 11, 31))\n * ); // => 2024-12-31 00:00:00\n *\n * // Locale-aware keys, US English\n * const time4 = new Highcharts.Time({ locale: 'en-US' });\n * console.log(\n * time4.dateFormat('%[YebHM]', Date.UTC(2024, 11, 31))\n * ); // => Dec 31, 2024, 12:00 AM\n *\n * // Locale-aware keys, British English\n * const time5 = new Highcharts.Time({ locale: 'en-GB' });\n * console.log(\n * time5.dateFormat('%[YebHM]', Date.UTC(2024, 11, 31))\n * ); // => 31 Dec 2024, 00:00\n *\n * // Mixed locale-aware and individual keys\n * console.log(\n * time5.dateFormat('%[Yeb], %H:%M', Date.UTC(2024, 11, 31))\n * ); // => 31 Dec 2024, 00:00\n *\n * @function Highcharts.Time#dateFormat\n *\n * @param {string|Highcharts.DateTimeFormatOptions} format\n * The desired string format where various time representations are\n * prefixed with %, or an object representing the locale-aware format\n * options.\n *\n * @param {number} [timestamp]\n * The JavaScript timestamp.\n *\n * @param {boolean} [upperCaseFirst=false]\n * Upper case first letter in the return.\n *\n * @return {string}\n * The formatted date.\n */\n dateFormat(format, timestamp, upperCaseFirst) {\n const lang = this.lang;\n if (!TimeBase_defined(timestamp) || isNaN(timestamp)) {\n return lang?.invalidDate || '';\n }\n format = format ?? '%Y-%m-%d %H:%M:%S';\n // First, identify and replace locale-aware formats like %[Ymd]\n if (TimeBase_isString(format)) {\n const localeAwareRegex = /%\\[([a-zA-Z]+)\\]/g;\n let match;\n while ((match = localeAwareRegex.exec(format))) {\n format = format.replace(match[0], this.dateTimeFormat(match[1], timestamp, lang?.locale));\n }\n }\n // Then, replace static formats like %Y, %m, %d etc.\n if (TimeBase_isString(format) && format.indexOf('%') !== -1) {\n const time = this, [fullYear, month, dayOfMonth, hours, minutes, seconds, milliseconds, weekday] = this.toParts(timestamp), langWeekdays = lang?.weekdays || this.weekdays, shortWeekdays = lang?.shortWeekdays || this.shortWeekdays, months = lang?.months || this.months, shortMonths = lang?.shortMonths || this.shortMonths, \n // List all format keys. Custom formats can be added from the\n // outside.\n replacements = TimeBase_extend({\n // Day\n // Short weekday, like 'Mon'\n a: shortWeekdays ?\n shortWeekdays[weekday] :\n langWeekdays[weekday].substr(0, 3),\n // Long weekday, like 'Monday'\n A: langWeekdays[weekday],\n // Two digit day of the month, 01 to 31\n d: TimeBase_pad(dayOfMonth),\n // Day of the month, 1 through 31\n e: TimeBase_pad(dayOfMonth, 2, ' '),\n // Day of the week, 0 through 6\n w: weekday,\n // Week (none implemented)\n // 'W': weekNumber(),\n v: lang?.weekFrom ?? '',\n // Month\n // Short month, like 'Jan'\n b: shortMonths[month],\n // Long month, like 'January'\n B: months[month],\n // Two digit month number, 01 through 12\n m: TimeBase_pad(month + 1),\n // Month number, 1 through 12 (#8150)\n o: month + 1,\n // Year\n // Two digits year, like 09 for 2009\n y: fullYear.toString().substr(2, 2),\n // Four digits year, like 2009\n Y: fullYear,\n // Time\n // Two digits hours in 24h format, 00 through 23\n H: TimeBase_pad(hours),\n // Hours in 24h format, 0 through 23\n k: hours,\n // Two digits hours in 12h format, 00 through 11\n I: TimeBase_pad((hours % 12) || 12),\n // Hours in 12h format, 1 through 12\n l: (hours % 12) || 12,\n // Two digits minutes, 00 through 59\n M: TimeBase_pad(minutes),\n // Upper case AM or PM\n p: hours < 12 ? 'AM' : 'PM',\n // Lower case AM or PM\n P: hours < 12 ? 'am' : 'pm',\n // Two digits seconds, 00 through 59\n S: TimeBase_pad(seconds),\n // Milliseconds (naming from Ruby)\n L: TimeBase_pad(milliseconds, 3)\n }, Core_Globals.dateFormats);\n // Do the replaces\n TimeBase_objectEach(replacements, function (val, key) {\n if (TimeBase_isString(format)) {\n // Regex would do it in one line, but this is faster\n while (format.indexOf('%' + key) !== -1) {\n format = format.replace('%' + key, typeof val === 'function' ?\n val.call(time, timestamp) :\n val);\n }\n }\n });\n }\n else if (TimeBase_isObject(format)) {\n const tzHours = (this.getTimezoneOffset(timestamp) || 0) /\n (60000 * 60), timeZone = this.timezone || ('Etc/GMT' + (tzHours >= 0 ? '+' : '') + tzHours), { prefix = '', suffix = '' } = format;\n format = prefix + this.dateTimeFormat(TimeBase_extend({ timeZone }, format), timestamp) + suffix;\n }\n // Optionally sentence-case the string and return\n return upperCaseFirst ? TimeBase_ucfirst(format) : format;\n }\n /**\n * Resolve legacy formats of dateTimeLabelFormats (strings and arrays) into\n * an object.\n * @private\n * @param {string|Array<T>|Highcharts.Dictionary<T>} f\n * General format description\n * @return {Highcharts.Dictionary<T>}\n * The object definition\n */\n resolveDTLFormat(f) {\n if (!TimeBase_isObject(f, true)) { // Check for string or array\n f = TimeBase_splat(f);\n return {\n main: f[0],\n from: f[1],\n to: f[2]\n };\n }\n // Type-check DateTimeFormatOptions against DateTimeLabelFormatObject\n if (TimeBase_isObject(f, true) && isDateTimeFormatOptions(f)) {\n return { main: f };\n }\n return f;\n }\n /**\n * Get the optimal date format for a point, based on a range.\n *\n * @private\n * @function Highcharts.Time#getDateFormat\n *\n * @param {number} range\n * The time range\n *\n * @param {number} timestamp\n * The timestamp of the date\n *\n * @param {number} startOfWeek\n * An integer representing the first day of the week, where 0 is\n * Sunday.\n *\n * @param {Highcharts.Dictionary<string>} dateTimeLabelFormats\n * A map of time units to formats.\n *\n * @return {string}\n * The optimal date format for a point.\n */\n getDateFormat(range, timestamp, startOfWeek, dateTimeLabelFormats) {\n const dateStr = this.dateFormat('%m-%d %H:%M:%S.%L', timestamp), blank = '01-01 00:00:00.000', strpos = {\n millisecond: 15,\n second: 12,\n minute: 9,\n hour: 6,\n day: 3\n };\n let n = 'millisecond', \n // For sub-millisecond data, #4223\n lastN = n;\n for (n in TimeBase_timeUnits) { // eslint-disable-line guard-for-in\n // If the range is exactly one week and we're looking at a\n // Sunday/Monday, go for the week format\n if (range &&\n range === TimeBase_timeUnits.week &&\n +this.dateFormat('%w', timestamp) === startOfWeek &&\n dateStr.substr(6) === blank.substr(6)) {\n n = 'week';\n break;\n }\n // The first format that is too great for the range\n if (range && TimeBase_timeUnits[n] > range) {\n n = lastN;\n break;\n }\n // If the point is placed every day at 23:59, we need to show\n // the minutes as well. #2637.\n if (strpos[n] &&\n dateStr.substr(strpos[n]) !== blank.substr(strpos[n])) {\n break;\n }\n // Weeks are outside the hierarchy, only apply them on\n // Mondays/Sundays like in the first condition\n if (n !== 'week') {\n lastN = n;\n }\n }\n return this.resolveDTLFormat(dateTimeLabelFormats[n]).main;\n }\n}\n/* *\n *\n * Default export\n *\n * */\n/* harmony default export */ const Shared_TimeBase = (TimeBase);\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * Normalized interval.\n *\n * @interface Highcharts.TimeNormalizedObject\n */ /**\n* The count.\n*\n* @name Highcharts.TimeNormalizedObject#count\n* @type {number|undefined}\n*/ /**\n* The interval in axis values (ms).\n*\n* @name Highcharts.TimeNormalizedObject#unitRange\n* @type {number}\n*/\n/**\n * Function of an additional date format specifier.\n *\n * @callback Highcharts.TimeFormatCallbackFunction\n *\n * @param {number} timestamp\n * The time to format.\n *\n * @return {string}\n * The formatted portion of the date.\n */\n/**\n * Time ticks.\n *\n * @interface Highcharts.AxisTickPositionsArray\n * @extends global.Array<number>\n */ /**\n* @name Highcharts.AxisTickPositionsArray#info\n* @type {Highcharts.TimeTicksInfoObject|undefined}\n*/\n/**\n * A callback to return the time zone offset for a given datetime. It\n * takes the timestamp in terms of milliseconds since January 1 1970,\n * and returns the timezone offset in minutes. This provides a hook\n * for drawing time based charts in specific time zones using their\n * local DST crossover dates, with the help of external libraries.\n *\n * @callback Highcharts.TimezoneOffsetCallbackFunction\n *\n * @param {number} timestamp\n * Timestamp in terms of milliseconds since January 1 1970.\n *\n * @return {number}\n * Timezone offset in minutes.\n */\n/**\n * Options for formatting dates and times using the [Intl.DateTimeFormat](\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat\n * ) API, and extended with some custom options for Highcharts.\n *\n * @interface Highcharts.DateTimeFormatOptions\n */ /**\n* The locale matching algorithm to use.\n*\n* @name Highcharts.DateTimeFormatOptions#localeMatcher\n* @type {string|undefined}\n*/ /**\n* The time zone to use. The default is the browser's default time zone.\n*\n* @name Highcharts.DateTimeFormatOptions#timeZone\n* @type {string|undefined}\n*/ /**\n* Whether to use 12-hour time (as opposed to 24-hour time).\n*\n* @name Highcharts.DateTimeFormatOptions#hour12\n* @type {'auto'|'always'|'never'|undefined}\n*/ /**\n* The format matching algorithm to use.\n*\n* @name Highcharts.DateTimeFormatOptions#formatMatcher\n* @type {string|undefined}\n*/ /**\n* The representation of the weekday.\n*\n* @name Highcharts.DateTimeFormatOptions#weekday\n* @type {'narrow'|'short'|'long'|undefined}\n*/ /**\n* The representation of the era.\n*\n* @name Highcharts.DateTimeFormatOptions#era\n* @type {'narrow'|'short'|'long'|undefined}\n*/ /**\n* The representation of the year.\n*\n* @name Highcharts.DateTimeFormatOptions#year\n* @type {'numeric'|'2-digit'|undefined}\n*/ /**\n* The representation of the month.\n* \"narrow\", \"short\", \"long\".\n*\n* @name Highcharts.DateTimeFormatOptions#month\n* @type {'numeric'|'2-digit'|'narrow'|'short'|'long'|undefined}\n*/ /**\n* The representation of the day.\n*\n* @name Highcharts.DateTimeFormatOptions#day\n* @type {'numeric'|'2-digit'|undefined}\n*/ /**\n* The representation of the hour.\n*\n* @name Highcharts.DateTimeFormatOptions#hour\n* @type {'numeric'|'2-digit'|undefined}\n*/ /**\n* The representation of the minute.\n*\n* @name Highcharts.DateTimeFormatOptions#minute\n* @type {'numeric'|'2-digit'|undefined}\n*/ /**\n* The representation of the second.\n*\n* @name Highcharts.DateTimeFormatOptions#second\n* @type {'numeric'|'2-digit'|undefined}\n*/ /**\n* The number of fractional digits to use. 3 means milliseconds.\n*\n* @name Highcharts.DateTimeFormatOptions#fractionalSecondDigits\n* @type {number|undefined}\n*/ /**\n* The representation of the time zone name.\n*\n* @name Highcharts.DateTimeFormatOptions#timeZoneName\n* @type {'short'|'long'|undefined}\n*/ /**\n* A prefix for the time string. Custom Highcharts option.\n*\n* @name Highcharts.DateTimeFormatOptions#prefix\n* @type {'string'|undefined}\n*/ /**\n* A suffix for the time string. Custom Highcharts option.\n*\n* @name Highcharts.DateTimeFormatOptions#suffix\n* @type {'string'|undefined}\n*/\n''; // Keeps doclets above in JS file\n\n;// ./code/grid/es-modules/Core/Time.js\n/* *\n *\n * (c) 2010-2025 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n\n\n\nconst { defined: Time_defined, extend: Time_extend, timeUnits: Time_timeUnits } = Core_Utilities;\n/* *\n *\n * Constants\n *\n * */\nclass Time extends Shared_TimeBase {\n /**\n * Return an array with time positions distributed on round time values\n * right and right after min and max. Used in datetime axes as well as for\n * grouping data on a datetime axis.\n *\n * @function Highcharts.Time#getTimeTicks\n *\n * @param {Highcharts.TimeNormalizedObject} normalizedInterval\n * The interval in axis values (ms) and the count\n *\n * @param {number} [min]\n * The minimum in axis values\n *\n * @param {number} [max]\n * The maximum in axis values\n *\n * @param {number} [startOfWeek=1]\n *\n * @return {Highcharts.AxisTickPositionsArray}\n * Time positions\n */\n getTimeTicks(normalizedInterval, min, max, startOfWeek) {\n const time = this, tickPositions = [], higherRanks = {}, { count = 1, unitRange } = normalizedInterval;\n let [year, month, dayOfMonth, hours, minutes, seconds] = time.toParts(min), milliseconds = (min || 0) % 1000, variableDayLength;\n startOfWeek ?? (startOfWeek = 1);\n if (Time_defined(min)) { // #1300\n milliseconds = unitRange >= Time_timeUnits.second ?\n 0 : // #3935\n count * Math.floor(milliseconds / count);\n if (unitRange >= Time_timeUnits.second) { // Second\n seconds = unitRange >= Time_timeUnits.minute ?\n 0 : // #3935\n count * Math.floor(seconds / count);\n }\n if (unitRange >= Time_timeUnits.minute) { // Minute\n minutes = unitRange >= Time_timeUnits.hour ?\n 0 :\n count * Math.floor(minutes / count);\n }\n if (unitRange >= Time_timeUnits.hour) { // Hour\n hours = unitRange >= Time_timeUnits.day ?\n 0 :\n count * Math.floor(hours / count);\n }\n if (unitRange >= Time_timeUnits.day) { // Day\n dayOfMonth = unitRange >= Time_timeUnits.month ?\n 1 :\n Math.max(1, count * Math.floor(dayOfMonth / count));\n }\n if (unitRange >= Time_timeUnits.month) { // Month\n month = unitRange >= Time_timeUnits.year ? 0 :\n count * Math.floor(month / count);\n }\n if (unitRange >= Time_timeUnits.year) { // Year\n year -= year % count;\n }\n // Week is a special case that runs outside the hierarchy\n if (unitRange === Time_timeUnits.week) {\n if (count) {\n min = time.makeTime(year, month, dayOfMonth, hours, minutes, seconds, milliseconds);\n }\n // Get start of current week, independent of count\n const weekday = this.dateTimeFormat({\n timeZone: this.timezone,\n weekday: 'narrow'\n }, min, 'es'), \n // Spanish weekday index\n weekdayNo = 'DLMXJVS'.indexOf(weekday);\n dayOfMonth += -weekdayNo + startOfWeek +\n // We don't want to skip days that are before\n // startOfWeek (#7051)\n (weekdayNo < startOfWeek ? -7 : 0);\n }\n min = time.makeTime(year, month, dayOfMonth, hours, minutes, seconds, milliseconds);\n // Handle local timezone offset\n if (time.variableTimezone && Time_defined(max)) {\n // Detect whether we need to take the DST crossover into\n // consideration. If we're crossing over DST, the day length may\n // be 23h or 25h and we need to compute the exact clock time for\n // each tick instead of just adding hours. This comes at a cost,\n // so first we find out if it is needed (#4951).\n variableDayLength = (\n // Long range, assume we're crossing over.\n max - min > 4 * Time_timeUnits.month ||\n // Short range, check if min and max are in different time\n // zones.\n time.getTimezoneOffset(min) !==\n time.getTimezoneOffset(max));\n }\n // Iterate and add tick positions at appropriate values\n let t = min, i = 1;\n while (t < max) {\n tickPositions.push(t);\n // Increase the years\n if (unitRange === Time_timeUnits.year) {\n t = time.makeTime(year + i * count, 0);\n // Increase the months\n }\n else if (unitRange === Time_timeUnits.month) {\n t = time.makeTime(year, month + i * count);\n // If we're using local time, the interval is not fixed as it\n // jumps one hour at the DST crossover\n }\n else if (variableDayLength && (unitRange === Time_timeUnits.day ||\n unitRange === Time_timeUnits.week)) {\n t = time.makeTime(year, month, dayOfMonth +\n i * count * (unitRange === Time_timeUnits.day ? 1 : 7));\n }\n else if (variableDayLength &&\n unitRange === Time_timeUnits.hour &&\n count > 1) {\n // Make sure higher ranks are preserved across DST (#6797,\n // #7621)\n t = time.makeTime(year, month, dayOfMonth, hours + i * count);\n // Else, the interval is fixed and we use simple addition\n }\n else {\n t += unitRange * count;\n }\n i++;\n }\n // Push the last time\n tickPositions.push(t);\n // Handle higher ranks. Mark new days if the time is on midnight\n // (#950, #1649, #1760, #3349). Use a reasonable dropout threshold\n // to prevent looping over dense data grouping (#6156).\n if (unitRange <= Time_timeUnits.hour && tickPositions.length < 10000) {\n tickPositions.forEach((t) => {\n if (\n // Speed optimization, no need to run dateFormat unless\n // we're on a full or half hour\n t % 1800000 === 0 &&\n // Check for local or global midnight\n time.dateFormat('%H%M%S%L', t) === '000000000') {\n higherRanks[t] = 'day';\n }\n });\n }\n }\n // Record information on the chosen unit - for dynamic label formatter\n tickPositions.info = Time_extend(normalizedInterval, {\n higherRanks,\n totalRange: unitRange * count\n });\n return tickPositions;\n }\n}\n/* *\n *\n * Default export\n *\n * */\n/* harmony default export */ const Core_Time = (Time);\n\n;// ./code/grid/es-modules/Core/Defaults.js\n/* *\n *\n * (c) 2010-2025 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n\n\n\nconst { isTouchDevice } = Core_Globals;\n\n\n\nconst { fireEvent: Defaults_fireEvent, merge: Defaults_merge } = Core_Utilities;\n/* *\n *\n * API Options\n *\n * */\n/**\n * Global default settings.\n *\n * @name Highcharts.defaultOptions\n * @type {Highcharts.Options}\n */ /**\n* @optionparent\n* @private\n*/\nconst defaultOptions = {\n /**\n * An array containing the default colors for the chart's series. When\n * all colors are used, new colors are pulled from the start again.\n *\n * Default colors can also be set on a series or series.type basis,\n * see [column.colors](#plotOptions.column.colors),\n * [pie.colors](#plotOptions.pie.colors).\n *\n * In styled mode, the colors option doesn't exist. Instead, colors\n * are defined in CSS and applied either through series or point class\n * names, or through the [chart.colorCount](#chart.colorCount) option.\n *\n * @sample {highcharts} highcharts/chart/colors/\n * Assign a global color theme\n * @sample highcharts/members/theme-v10/\n * Latest release styled like version 10\n *\n * @type {Array<(Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject)>}\n * @default [\n * \"#2caffe\",\n * \"#544fc5\",\n * \"#00e272\",\n * \"#fe6a35\",\n * \"#6b8abc\",\n * \"#d568fb\",\n * \"#2ee0ca\",\n * \"#fa4b42\",\n * \"#feb56a\",\n * \"#91e8e1\"\n * ]\n */\n colors: Palettes.colors,\n /**\n * Styled mode only. Configuration object for adding SVG definitions for\n * reusable elements. See [gradients, shadows and\n * patterns](https://www.highcharts.com/docs/chart-design-and-style/gradients-shadows-and-patterns)\n * for more information and code examples.\n *\n * @type {*}\n * @since 5.0.0\n * @apioption defs\n */\n /**\n * @ignore-option\n */\n symbols: ['circle', 'diamond', 'square', 'triangle', 'triangle-down'],\n /**\n * An object containing language-related strings and settings. A typical\n * setup uses `Highcharts.setOptions` to make the options apply to all\n * charts in the same page.\n *\n * Some language options, like `months` and `weekdays`, are only used\n * with non-locale-aware date formats.\n *\n * ```js\n * Highcharts.setOptions({\n * lang: {\n * locale: 'fr'\n * }\n * });\n * ```\n *\n * @optionparent lang\n */\n lang: {\n weekFrom: 'week from',\n /**\n * The default chart title.\n *\n * @since 12.2.0\n */\n chartTitle: 'Chart title',\n /**\n * The browser locale to use for date and number formatting. The actual\n * locale used for each chart is determined in three steps:\n * 1. If this `lang.locale` option is specified, it is used.\n * 2. Else, look for the closest ancestor HTML element with a `lang`\n * attribute, typically the `<html>` element.\n * 3. If no 'lang' attribute is found, use the default browser locale.\n *\n * Use `en-GB`, British English, for approximate consistency with\n * Highcharts v < 12.\n *\n * @sample highcharts/lang/locale/\n * Set the locale using the `lang.locale` option\n * @sample highcharts/lang/locale-attribute/\n * Pick up the locale from the HTML `lang` attribute\n * @sample highcharts/members/highcharts-numberformat\n * Arabic locale with digits and dates *\n *\n * @since 12.0.0\n * @type {string|Array<string>}\n */\n locale: void 0,\n /**\n * The loading text that appears when the chart is set into the loading\n * state following a call to `chart.showLoading`.\n */\n loading: 'Loading...',\n /**\n * An array containing the months names. Corresponds to the `%B` format\n * in `Highcharts.dateFormat()`. Defaults to 'undefined',\n * meaning the default month names are used according to the\n * `lang.locale` or browser settings.\n *\n * @type {Array<string>}\n */\n months: void 0,\n /**\n * [Format string](https://www.highcharts.com/docs/chart-concepts/templating) for the default series name.\n *\n * @since 12.2.0\n */\n seriesName: 'Series {add index 1}',\n /**\n * An array containing the months names in abbreviated form. Corresponds\n * to the `%b` format in `Highcharts.dateFormat()`. Defaults to\n * 'undefined', meaning the default short month names are used according\n * to the `lang.locale` or browser settings.\n *\n * @type {Array<string>}\n */\n shortMonths: void 0,\n /**\n * An array containing the weekday names. Corresponds\n * to the `%A` format in `Highcharts.dateFormat()`. Defaults to\n * 'undefined', meaning the default weekday names are used according to\n * the `lang.locale` or browser settings.\n *\n * @type {Array<string>}\n */\n weekdays: void 0,\n /**\n * Short week days, starting Sunday. Corresponds to the `%a` format in\n * `Highcharts.dateFormat()`. Defaults to 'undefined', meaning\n * the default short weekday names are used according to the\n * `lang.locale` or browser settings.\n *\n * @sample highcharts/lang/shortweekdays/\n * Finnish two-letter abbreviations\n *\n * @type {Array<string>}\n * @since 4.2.4\n * @apioption lang.shortWeekdays\n */\n /**\n * What to show in a date field for invalid dates. Defaults to an empty\n * string.\n *\n * @type {string}\n * @since 4.1.8\n * @product highcharts highstock\n * @apioption lang.invalidDate\n */\n /**\n * The title appearing on hovering the zoom in button. The text itself\n * defaults to \"+\" and can be changed in the button options.\n *\n * @type {string}\n * @default Zoom in\n * @product highmaps\n * @apioption lang.zoomIn\n */\n /**\n * The title appearing on hovering the zoom out button. The text itself\n * defaults to \"-\" and can be changed in the button options.\n *\n * @type {string}\n * @default Zoom out\n * @product highmaps\n * @apioption lang.zoomOut\n */\n /**\n * The default decimal point used in the `Highcharts.numberFormat`\n * method unless otherwise specified in the function arguments. Defaults\n * to the locale decimal point as determined by `lang.locale`.\n *\n * @type {string}\n * @default undefined\n * @since 1.2.2\n * @apioption lang.decimalPoint\n */\n /**\n * [Metric prefixes](https://en.wikipedia.org/wiki/Metric_prefix) used\n * to shorten high numbers in axis labels. Replacing any of the\n * positions with `null` causes the full number to be written. Setting\n * `numericSymbols` to `undefined` disables shortening altogether.\n *\n * @sample {highcharts} highcharts/lang/numericsymbols/\n * Replacing the symbols with text\n * @sample {highstock} highcharts/lang/numericsymbols/\n * Replacing the symbols with text\n *\n * @type {Array<string>}\n * @default [\"k\", \"M\", \"G\", \"T\", \"P\", \"E\"]\n * @since 2.3.0\n */\n numericSymbols: ['k', 'M', 'G', 'T', 'P', 'E'],\n /**\n * The default name for a pie slice (point).\n * @since 12.2.0\n */\n pieSliceName: 'Slice',\n /**\n * The magnitude of [numericSymbols](#lang.numericSymbol) replacements.\n * Use 10000 for Japanese, Korean and various Chinese locales, which\n * use symbols for 10^4, 10^8 and 10^12.\n *\n * @sample highcharts/lang/numericsymbolmagnitude/\n * 10000 magnitude for Japanese\n *\n * @type {number}\n * @default 1000\n * @since 5.0.3\n * @apioption lang.numericSymbolMagnitude\n */\n /**\n * The default thousands separator used in the `Highcharts.numberFormat`\n * method unless otherwise specified in the function arguments. Defaults\n * to the locale thousands separator as determined by `lang.locale`.\n *\n * @type {string}\n * @default undefined\n * @since 1.2.2\n * @apioption lang.thousandsSep\n */\n /**\n * The text for the label appearing when a chart is zoomed.\n *\n * @since 1.2.4\n */\n resetZoom: 'Reset zoom',\n /**\n * The tooltip title for the label appearing when a chart is zoomed.\n *\n * @since 1.2.4\n */\n /**\n * The default title of the Y axis\n *\n * @since 12.2.0\n */\n yAxisTitle: 'Values',\n resetZoomTitle: 'Reset zoom level 1:1'\n },\n /**\n * Global options that don't apply to each chart. These options must be set\n * using the `Highcharts.setOptions` method.\n *\n * ```js\n * Highcharts.setOptions({\n * global: {\n * buttonTheme: {\n * fill: '#d0d0d0'\n * }\n * }\n * });\n * ```\n */\n global: {\n /**\n * General theme for buttons. This applies to the zoom button, exporting\n * context menu, map navigation, range selector buttons and custom\n * buttons generated using the `SVGRenderer.button` function. However,\n * each of these may be overridden with more specific options.\n *\n * @sample highcharts/global/buttontheme\n * General button theme\n * @since 11.4.2\n */\n buttonTheme: {\n /**\n * The fill color for buttons\n */\n fill: \"#f7f7f7\" /* Palette.neutralColor3 */,\n /**\n * The padding of buttons\n */\n padding: 8,\n /**\n * The border radius for buttons\n */\n r: 2,\n /**\n * The stroke color for buttons\n */\n stroke: \"#cccccc\" /* Palette.neutralColor20 */,\n /**\n * The stroke width for buttons\n */\n 'stroke-width': 1,\n /**\n * CSS styling for the buttons' text\n */\n style: {\n color: \"#333333\" /* Palette.neutralColor80 */,\n cursor: 'pointer',\n fontSize: '0.8em',\n fontWeight: 'normal'\n },\n /**\n * State overrides for the buttons\n */\n states: {\n /**\n * Hover state overrides for the buttons are applied in addition\n * to the normal state options\n */\n hover: {\n fill: \"#e6e6e6\" /* Palette.neutralColor10 */\n },\n /**\n * Select state overrides for the buttons are applied in\n * addition to the normal state options\n */\n select: {\n fill: \"#e6e9ff\" /* Palette.highlightColor10 */,\n style: {\n color: \"#000000\" /* Palette.neutralColor100 */,\n fontWeight: 'bold'\n }\n },\n /**\n * Disabled state overrides for the buttons are applied in\n * addition to the normal state options\n */\n disabled: {\n /**\n * Disabled state CSS style overrides for the buttons' text\n */\n style: {\n color: \"#cccccc\" /* Palette.neutralColor20 */\n }\n }\n }\n }\n },\n /**\n * Time options that can apply globally or to individual charts. These\n * settings affect how `datetime` axes are laid out, how tooltips are\n * formatted, how series\n * [pointIntervalUnit](#plotOptions.series.pointIntervalUnit) works and how\n * the Highcharts Stock range selector handles time.\n *\n * The common use case is that all charts in the same Highcharts object\n * share the same time settings, in which case the global settings are set\n * using `setOptions`.\n *\n * ```js\n * // Apply time settings globally\n * Highcharts.setOptions({\n * time: {\n * timezone: 'Europe/London'\n * }\n * });\n * // Apply time settings by instance\n * const chart = Highcharts.chart('container', {\n * time: {\n * timezone: 'America/New_York'\n * },\n * series: [{\n * data: [1, 4, 3, 5]\n * }]\n * });\n *\n * // Use the Time object\n * console.log(\n * 'Current time in New York',\n * chart.time.dateFormat('%Y-%m-%d %H:%M:%S', Date.now())\n * );\n * ```\n *\n * Since v6.0.5, the time options were moved from the `global` object to the\n * `time` object, and time options can be set on each individual chart.\n *\n * @sample {highcharts|highstock}\n * highcharts/time/timezone/\n * Set the timezone globally\n * @sample {highcharts}\n * highcharts/time/individual/\n * Set the timezone per chart instance\n * @sample {highstock}\n * stock/time/individual/\n * Set the timezone per chart instance\n *\n * @since 6.0.5\n * @optionparent time\n */\n time: {\n /**\n * A custom `Date` class for advanced date handling. For example,\n * [JDate](https://github.com/tahajahangir/jdate) can be hooked in to\n * handle Jalali dates.\n *\n * @type {*}\n * @since 4.0.4\n * @product highcharts highstock gantt\n */\n Date: void 0,\n /**\n * A named time zone. Supported time zone names rely on the browser\n * implementations, as described in the [mdn\n * docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#timezone).\n * If the given time zone is not recognized by the browser, Highcharts\n * provides a warning and falls back to returning a 0 offset,\n * corresponding to the UTC time zone.\n *\n * The time zone affects axis scaling, tickmark placement and\n * time display in `Highcharts.dateFormat`.\n *\n * Setting `timezone` to `undefined` falls back to the default browser\n * timezone setting.\n *\n * Until v11.2.0, this option depended on moment.js.\n *\n * @sample {highcharts|highstock} highcharts/time/timezone/ Europe/Oslo\n *\n * @type {string}\n * @since 5.0.7\n * @product highcharts highstock gantt\n */\n timezone: 'UTC',\n /**\n * The timezone offset in minutes. Positive values are west, negative\n * values are east of UTC, as in the ECMAScript\n * [getTimezoneOffset](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTimezoneOffset)\n * method. Use this to display UTC based data in a predefined time zone.\n *\n * This option is deprecated as of v11.4.1 and will be removed in a\n * future release. Use the [time.timezone](#time.timezone) option\n * instead.\n *\n * @see [time.getTimezoneOffset](#time.getTimezoneOffset)\n *\n * @sample {highcharts|highstock} highcharts/time/timezoneoffset/\n * Timezone offset\n *\n * @since 3.0.8\n * @deprecated 11.4.2\n * @product highcharts highstock gantt\n */\n timezoneOffset: 0,\n /**\n * Whether to use UTC time for axis scaling, tickmark placement and\n * time display in `Highcharts.dateFormat`. Advantages of using UTC\n * is that the time displays equally regardless of the user agent's\n * time zone settings. Local time can be used when the data is loaded\n * in real time or when correct Daylight Saving Time transitions are\n * required.\n *\n * Setting `useUTC` to true is equivalent to setting `time.timezone` to\n * `\"UTC\"`. Setting `useUTC` to false is equivalent to setting\n * `time.timezone` to `undefined`.\n *\n * @see [time.timezone](#timezone)\n *\n * @sample {highcharts} highcharts/time/useutc-true/\n * True by default\n * @sample {highcharts} highcharts/time/useutc-false/\n * False\n *\n * @deprecated\n */\n useUTC: void 0\n },\n chart: Chart_ChartDefaults,\n /**\n * The chart's main title.\n *\n * @sample {highmaps} maps/title/title/\n * Title options demonstrated\n * @sample {highcharts} highcharts/title/align-auto/\n * Default title alignment\n */\n title: {\n /**\n * When the title is floating, the plot area will not move to make space\n * for it.\n *\n * @sample {highcharts} highcharts/chart/zoomtype-none/\n * False by default\n * @sample {highcharts} highcharts/title/floating/\n * True - title on top of the plot area\n * @sample {highstock} stock/chart/title-floating/\n * True - title on top of the plot area\n *\n * @type {boolean}\n * @default false\n * @since 2.1\n * @apioption title.floating\n */\n /**\n * Whether to\n * [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the text.\n *\n * @type {boolean}\n * @default false\n * @apioption title.useHTML\n */\n /**\n * The vertical alignment of the title. Can be one of `\"top\"`,\n * `\"middle\"` and `\"bottom\"`. When a value is given, the title behaves\n * as if [floating](#title.floating) were `true`.\n *\n * @sample {highcharts} highcharts/title/verticalalign/\n * Chart title in bottom right corner\n * @sample {highstock} stock/chart/title-verticalalign/\n * Chart title in bottom right corner\n *\n * @type {Highcharts.VerticalAlignValue}\n * @since 2.1\n * @apioption title.verticalAlign\n */\n /**\n * The x position of the title relative to the alignment within\n * `chart.spacingLeft` and `chart.spacingRight`.\n *\n * @sample {highcharts} highcharts/title/align/\n * Aligned to the plot area (x = 70px = margin left - spacing\n * left)\n * @sample {highstock} stock/chart/title-align/\n * Aligned to the plot area (x = 50px = margin left - spacing\n * left)\n *\n * @type {number}\n * @default 0\n * @since 2.0\n * @apioption title.x\n */\n /**\n * The y position of the title relative to the alignment within\n * [chart.spacingTop](#chart.spacingTop) and [chart.spacingBottom](\n * #chart.spacingBottom). By default it depends on the font size.\n *\n * @sample {highcharts} highcharts/title/y/\n * Title inside the plot area\n * @sample {highstock} stock/chart/title-verticalalign/\n * Chart title in bottom right corner\n *\n * @type {number}\n * @since 2.0\n * @apioption title.y\n */\n /**\n * CSS styles for the title. Use this for font styling, but use `align`,\n * `x` and `y` for text alignment.\n *\n * Note that the default [title.minScale](#title.minScale) option also\n * affects the rendered font size. In order to keep the font size fixed\n * regardless of title length, set `minScale` to 1.\n *\n * In styled mode, the title style is given in the `.highcharts-title`\n * class.\n *\n * @sample {highcharts} highcharts/title/style/\n * Custom color and weight\n * @sample {highstock} stock/chart/title-style/\n * Custom color and weight\n * @sample highcharts/css/titles/\n * Styled mode\n *\n * @type {Highcharts.CSSObject}\n * @default {highcharts|highmaps} { \"color\": \"#333333\", \"fontSize\": \"18px\" }\n * @default {highstock} { \"color\": \"#333333\", \"fontSize\": \"16px\" }\n */\n style: {\n color: \"#333333\" /* Palette.neutralColor80 */,\n fontWeight: 'bold'\n },\n /**\n * The title of the chart. To disable the title, set the `text` to\n * `undefined`.\n *\n * @sample {highcharts} highcharts/title/text/\n * Custom title\n * @sample {highstock} stock/chart/title-text/\n * Custom title\n *\n * @default {highcharts|highmaps} Chart title\n * @default {highstock} undefined\n */\n text: 'Chart title',\n /**\n * The horizontal alignment of the title. Can be one of \"left\", \"center\"\n * and \"right\".\n *\n * Since v12 it defaults to `undefined`, meaning the alignment is\n * computed for best fit. If the text fits in one line, it aligned to\n * the center, but if it is wrapped into multiple lines, it is aligned\n * to the left.\n *\n * @sample {highcharts} highcharts/title/align-auto/\n * Default alignment, dynamic\n * @sample {highcharts} highcharts/title/align/\n * Aligned to the plot area (x = 70px = margin left - spacing\n * left)\n * @sample {highstock} stock/chart/title-align/\n * Aligned to the plot area (x = 50px = margin left - spacing\n * left)\n *\n * @type {Highcharts.AlignValue}\n * @default undefined\n * @since 2.0\n * @apioption title.align\n */\n /**\n * The margin between the title and the plot area, or if a subtitle\n * is present, the margin between the subtitle and the plot area.\n *\n * @sample {highcharts} highcharts/title/margin-50/\n * A chart title margin of 50\n * @sample {highcharts} highcharts/title/margin-subtitle/\n * The same margin applied with a subtitle\n * @sample {highstock} stock/chart/title-margin/\n * A chart title margin of 50\n *\n * @since 2.1\n */\n margin: 15,\n /**\n * When the title is too wide to fit in the chart, the default behavior\n * is to scale it down to fit, or apply word wrap if it is scaled down\n * to `minScale` and still doesn't fit.\n *\n * The default value reflects the scale, when using default font sizes,\n * when the title font size matches that of the subtitle. The title\n * still stands out as it is bold by default.\n *\n * Set `minScale` to 1 to avoid downscaling.\n *\n * @sample {highcharts} highcharts/title/align-auto/\n * Downscaling demonstrated\n *\n * @since 12.0.0\n */\n minScale: 0.67\n },\n /**\n * The chart's subtitle. This can be used both to display a subtitle below\n * the main title, and to display random text anywhere in the chart. The\n * subtitle can be updated after chart initialization through the\n * `Chart.setTitle` method.\n *\n * @sample {highcharts} highcharts/title/align-auto/\n * Default title alignment\n * @sample {highmaps} maps/title/subtitle/\n * Subtitle options demonstrated\n */\n subtitle: {\n /**\n * The horizontal alignment of the subtitle. Can be one of \"left\",\n * \"center\" and \"right\". Since v12, it defaults to `undefined`, meaning\n * the actual alignment is inherited from the alignment of the main\n * title.\n *\n * @sample {highcharts} highcharts/title/align-auto/\n * Default title and subtitle alignment, dynamic\n * @sample {highcharts} highcharts/subtitle/align/\n * Footnote at right of plot area\n * @sample {highstock} stock/chart/subtitle-footnote\n * Footnote at bottom right of plot area\n *\n * @type {Highcharts.AlignValue}\n * @default undefined\n * @since 2.0\n * @apioption subtitle.align\n */\n /**\n * When the subtitle is floating, the plot area will not move to make\n * space for it.\n *\n * @sample {highcharts} highcharts/subtitle/floating/\n * Floating title and subtitle\n * @sample {highstock} stock/chart/subtitle-footnote\n * Footnote floating at bottom right of plot area\n *\n * @type {boolean}\n * @default false\n * @since 2.1\n * @apioption subtitle.floating\n */\n /**\n * CSS styles for the title.\n *\n * In styled mode, the subtitle style is given in the\n * `.highcharts-subtitle` class.\n *\n * @sample {highcharts} highcharts/subtitle/style/\n * Custom color and weight\n * @sample {highcharts} highcharts/css/titles/\n * Styled mode\n * @sample {highstock} stock/chart/subtitle-style\n * Custom color and weight\n * @sample {highstock} highcharts/css/titles/\n * Styled mode\n * @sample {highmaps} highcharts/css/titles/\n * Styled mode\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#666666\"}\n * @apioption subtitle.style\n */\n /**\n * Whether to\n * [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the text.\n *\n * @type {boolean}\n * @default false\n * @apioption subtitle.useHTML\n */\n /**\n * The vertical alignment of the title. Can be one of `\"top\"`,\n * `\"middle\"` and `\"bottom\"`. When middle, the subtitle behaves as\n * floating.\n *\n * @sample {highcharts} highcharts/subtitle/verticalalign/\n * Footnote at the bottom right of plot area\n * @sample {highstock} stock/chart/subtitle-footnote\n * Footnote at the bottom right of plot area\n *\n * @type {Highcharts.VerticalAlignValue}\n * @since 2.1\n * @apioption subtitle.verticalAlign\n */\n /**\n * The x position of the subtitle relative to the alignment within\n * `chart.spacingLeft` and `chart.spacingRight`.\n *\n * @sample {highcharts} highcharts/subtitle/align/\n * Footnote at right of plot area\n * @sample {highstock} stock/chart/subtitle-footnote\n * Footnote at the bottom right of plot area\n *\n * @type {number}\n * @default 0\n * @since 2.0\n * @apioption subtitle.x\n */\n /**\n * The y position of the subtitle relative to the alignment within\n * `chart.spacingTop` and `chart.spacingBottom`. By default the subtitle\n * is laid out below the title unless the title is floating.\n *\n * @sample {highcharts} highcharts/subtitle/verticalalign/\n * Footnote at the bottom right of plot area\n * @sample {highstock} stock/chart/subtitle-footnote\n * Footnote at the bottom right of plot area\n *\n * @type {number}\n * @since 2.0\n * @apioption subtitle.y\n */\n /**\n * CSS styles for the title.\n *\n * In styled mode, the subtitle style is given in the\n * `.highcharts-subtitle` class.\n *\n * @sample {highcharts} highcharts/subtitle/style/\n * Custom color and weight\n * @sample {highcharts} highcharts/css/titles/\n * Styled mode\n * @sample {highstock} stock/chart/subtitle-style\n * Custom color and weight\n * @sample {highstock} highcharts/css/titles/\n * Styled mode\n * @sample {highmaps} highcharts/css/titles/\n * Styled mode\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#666666\"}\n */\n style: {\n color: \"#666666\" /* Palette.neutralColor60 */,\n /**\n * @type {number|string}\n */\n fontSize: '0.8em'\n },\n /**\n * The subtitle of the chart.\n *\n * @sample {highcharts|highstock} highcharts/subtitle/text/\n * Custom subtitle\n * @sample {highcharts|highstock} highcharts/subtitle/text-formatted/\n * Formatted and linked text.\n */\n text: ''\n },\n /**\n * The chart's caption, which will render below the chart and will be part\n * of exported charts. The caption can be updated after chart initialization\n * through the `Chart.update` or `Chart.caption.update` methods.\n *\n * @sample highcharts/caption/text/\n * A chart with a caption\n * @since 7.2.0\n */\n caption: {\n /**\n * When the caption is floating, the plot area will not move to make\n * space for it.\n *\n * @type {boolean}\n * @default false\n * @apioption caption.floating\n */\n /**\n * The margin between the caption and the plot area.\n */\n margin: 15,\n /**\n * Whether to\n * [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the text.\n *\n * @type {boolean}\n * @default false\n * @apioption caption.useHTML\n */\n /**\n * The x position of the caption relative to the alignment within\n * `chart.spacingLeft` and `chart.spacingRight`.\n *\n * @type {number}\n * @default 0\n * @apioption caption.x\n */\n /**\n * The y position of the caption relative to the alignment within\n * `chart.spacingTop` and `chart.spacingBottom`.\n *\n * @type {number}\n * @apioption caption.y\n */\n /**\n * CSS styles for the caption.\n *\n * In styled mode, the caption style is given in the\n * `.highcharts-caption` class.\n *\n * @sample {highcharts} highcharts/css/titles/\n * Styled mode\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#666666\"}\n */\n style: {\n color: \"#666666\" /* Palette.neutralColor60 */,\n /**\n * @type {number|string}\n */\n fontSize: '0.8em'\n },\n /**\n * The caption text of the chart.\n *\n * @sample {highcharts} highcharts/caption/text/\n * Custom caption\n */\n text: '',\n /**\n * The horizontal alignment of the caption. Can be one of \"left\",\n * \"center\" and \"right\".\n *\n * @type {Highcharts.AlignValue}\n */\n align: 'left',\n /**\n * The vertical alignment of the caption. Can be one of `\"top\"`,\n * `\"middle\"` and `\"bottom\"`. When middle, the caption behaves as\n * floating.\n *\n * @type {Highcharts.VerticalAlignValue}\n */\n verticalAlign: 'bottom'\n },\n /**\n * The plotOptions is a wrapper object for config objects for each series\n * type. The config objects for each series can also be overridden for\n * each series item as given in the series array.\n *\n * Configuration options for the series are given in three levels. Options\n * for all series in a chart are given in the [plotOptions.series](\n * #plotOptions.series) object. Then options for all series of a specific\n * type are given in the plotOptions of that type, for example\n * `plotOptions.line`. Next, options for one single series are given in\n * [the series array](#series).\n */\n plotOptions: {},\n /**\n * The legend is a box containing a symbol and name for each series\n * item or point item in the chart. Each series (or points in case\n * of pie charts) is represented by a symbol and its name in the legend.\n *\n * It is possible to override the symbol creator function and create\n * [custom legend symbols](https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/studies/legend-custom-symbol/).\n *\n * @productdesc {highmaps}\n * A Highmaps legend by default contains one legend item per series, but if\n * a `colorAxis` is defined, the axis will be displayed in the legend.\n * Either as a gradient, or as multiple legend items for `dataClasses`.\n */\n legend: {\n /**\n * The background color of the legend.\n *\n * @see In styled mode, the legend background fill can be applied with\n * the `.highcharts-legend-box` class.\n *\n * @sample {highcharts} highcharts/legend/backgroundcolor/\n * Yellowish background\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/border-background/\n * Border and background options\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @apioption legend.backgroundColor\n */\n /**\n * The width of the drawn border around the legend.\n *\n * @see In styled mode, the legend border stroke width can be applied\n * with the `.highcharts-legend-box` class.\n *\n * @sample {highcharts} highcharts/legend/borderwidth/\n * 2px border width\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/border-background/\n * Border and background options\n *\n * @type {number}\n * @default 0\n * @apioption legend.borderWidth\n */\n /**\n * Enable or disable the legend. There is also a series-specific option,\n * [showInLegend](#plotOptions.series.showInLegend), that can hide the\n * series from the legend. In some series types this is `false` by\n * default, so it must set to `true` in order to show the legend for the\n * series.\n *\n * @sample {highcharts} highcharts/legend/enabled-false/ Legend disabled\n * @sample {highstock} stock/legend/align/ Various legend options\n * @sample {highmaps} maps/legend/enabled-false/ Legend disabled\n *\n * @default {highstock} false\n * @default {highmaps} true\n * @default {gantt} false\n */\n enabled: true,\n /**\n * The horizontal alignment of the legend box within the chart area.\n * Valid values are `left`, `center` and `right`.\n *\n * In the case that the legend is aligned in a corner position, the\n * `layout` option will determine whether to place it above/below\n * or on the side of the plot area.\n *\n * @sample {highcharts} highcharts/legend/align/\n * Legend at the right of the chart\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/alignment/\n * Legend alignment\n *\n * @type {Highcharts.AlignValue}\n * @since 2.0\n */\n align: 'center',\n /**\n * If the [layout](legend.layout) is `horizontal` and the legend items\n * span over two lines or more, whether to align the items into vertical\n * columns. Setting this to `false` makes room for more items, but will\n * look more messy.\n *\n * @since 6.1.0\n */\n alignColumns: true,\n /**\n * A CSS class name to apply to the legend group.\n */\n className: 'highcharts-no-tooltip',\n /**\n * General event handlers for the legend. These event hooks can\n * also be attached to the legend at run time using the\n * `Highcharts.addEvent` function.\n *\n * @declare Highcharts.LegendEventsOptionsObject\n *\n * @private\n */\n events: {},\n /**\n * Fires when the legend item belonging to the series is clicked. One\n * parameter, `event`, is passed to the function. The default action\n * is to toggle the visibility of the series, point or data class. This\n * can be prevented by returning `false` or calling\n * `event.preventDefault()`.\n *\n * @sample {highcharts} highcharts/legend/itemclick/\n * Confirm hiding and showing\n * @sample {highcharts} highcharts/legend/pie-legend-itemclick/\n * Confirm toggle visibility of pie slices\n *\n * @type {Highcharts.LegendItemClickCallbackFunction}\n * @context Highcharts.Legend\n * @apioption legend.events.itemClick\n */\n /**\n * When the legend is floating, the plot area ignores it and is allowed\n * to be placed below it.\n *\n * @sample {highcharts} highcharts/legend/floating-false/\n * False by default\n * @sample {highcharts} highcharts/legend/floating-true/\n * True\n * @sample {highmaps} maps/legend/alignment/\n * Floating legend\n *\n * @type {boolean}\n * @default false\n * @since 2.1\n * @apioption legend.floating\n */\n /**\n * The layout of the legend items. Can be one of `horizontal` or\n * `vertical` or `proximate`. When `proximate`, the legend items will be\n * placed as close as possible to the graphs they're representing,\n * except in inverted charts or when the legend position doesn't allow\n * it.\n *\n * @sample {highcharts} highcharts/legend/layout-horizontal/\n * Horizontal by default\n * @sample {highcharts} highcharts/legend/layout-vertical/\n * Vertical\n * @sample highcharts/legend/layout-proximate\n * Labels proximate to the data\n * @sample {highstock} stock/legend/layout-horizontal/\n * Horizontal by default\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * Vertical with data classes\n * @sample {highmaps} maps/legend/layout-vertical/\n * Vertical with color axis gradient\n *\n * @validvalue [\"horizontal\", \"vertical\", \"proximate\"]\n */\n layout: 'horizontal',\n /**\n * In a legend with horizontal layout, the itemDistance defines the\n * pixel distance between each item.\n *\n * @sample {highcharts} highcharts/legend/layout-horizontal/\n * 50px item distance\n * @sample {highstock} highcharts/legend/layout-horizontal/\n * 50px item distance\n *\n * @type {number}\n * @default {highcharts} 20\n * @default {highstock} 20\n * @default {highmaps} 8\n * @since 3.0.3\n * @apioption legend.itemDistance\n */\n /**\n * The pixel bottom margin for each legend item.\n *\n * @sample {highcharts|highstock} highcharts/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n *\n * @since 2.2.0\n */\n itemMarginBottom: 2,\n /**\n * The pixel top margin for each legend item.\n *\n * @sample {highcharts|highstock} highcharts/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n *\n * @since 2.2.0\n */\n itemMarginTop: 2,\n /**\n * The width for each legend item. By default the items are laid out\n * successively. In a [horizontal layout](legend.layout), if the items\n * are laid out across two rows or more, they will be vertically aligned\n * depending on the [legend.alignColumns](legend.alignColumns) option.\n *\n * @sample {highcharts} highcharts/legend/itemwidth-default/\n * Undefined by default\n * @sample {highcharts} highcharts/legend/itemwidth-80/\n * 80 for aligned legend items\n *\n * @type {number}\n * @since 2.0\n * @apioption legend.itemWidth\n */\n /**\n * A [format string](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)\n * for each legend label. Available variables relates to properties on\n * the series, or the point in case of pies.\n *\n * @type {string}\n * @default {name}\n * @since 1.3\n * @apioption legend.labelFormat\n */\n /* eslint-disable valid-jsdoc */\n /**\n * Callback function to format each of the series' labels. The `this`\n * keyword refers to the series object, or the point object in case of\n * pie charts. By default the series or point name is printed.\n *\n * @productdesc {highmaps}\n * In Highmaps the context can also be a data class in case of a\n * `colorAxis`.\n *\n * @sample {highcharts} highcharts/legend/labelformatter/\n * Add text\n * @sample {highmaps} maps/legend/labelformatter/\n * Data classes with label formatter\n *\n * @type {Highcharts.FormatterCallbackFunction<Point|Series>}\n */\n labelFormatter: function () {\n // eslint-enable valid-jsdoc\n return this.name;\n },\n /**\n * Line height for the legend items. Deprecated as of 2.1\\. Instead,\n * the line height for each item can be set using\n * `itemStyle.lineHeight`, and the padding between items using\n * `itemMarginTop` and `itemMarginBottom`.\n *\n * @sample {highcharts} highcharts/legend/lineheight/\n * Setting padding\n *\n * @deprecated\n *\n * @type {number}\n * @default 16\n * @since 2.0\n * @product highcharts gantt\n * @apioption legend.lineHeight\n */\n /**\n * If the plot area sized is calculated automatically and the legend is\n * not floating, the legend margin is the space between the legend and\n * the axis labels or plot area.\n *\n * @sample {highcharts} highcharts/legend/margin-default/\n * 12 pixels by default\n * @sample {highcharts} highcharts/legend/margin-30/\n * 30 pixels\n *\n * @type {number}\n * @default 12\n * @since 2.1\n * @apioption legend.margin\n */\n /**\n * Maximum width for the legend. Can be a percentage of the chart width,\n * or an integer representing how many pixels wide the legend can be.\n *\n * @sample {highcharts} highcharts/legend/maxwidth/\n * Max width set to 7%\n *\n * @type {number|string}\n * @apioption legend.maxWidth\n */\n /**\n * Maximum pixel height for the legend. When the maximum height is\n * extended, navigation will show.\n *\n * @type {number}\n * @since 2.3.0\n * @apioption legend.maxHeight\n */\n /**\n * The color of the drawn border around the legend.\n *\n * @see In styled mode, the legend border stroke can be applied with the\n * `.highcharts-legend-box` class.\n *\n * @sample {highcharts} highcharts/legend/bordercolor/\n * Brown border\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/border-background/\n * Border and background options\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n borderColor: \"#999999\" /* Palette.neutralColor40 */,\n /**\n * The border corner radius of the legend.\n *\n * @sample {highcharts} highcharts/legend/borderradius-default/\n * Square by default\n * @sample {highcharts} highcharts/legend/borderradius-round/\n * 5px rounded\n * @sample {highmaps} maps/legend/border-background/\n * Border and background options\n */\n borderRadius: 0,\n /**\n * Options for the paging or navigation appearing when the legend is\n * overflown. Navigation works well on screen, but not in static\n * exported images. One way of working around that is to\n * [increase the chart height in\n * export](https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/legend/navigation-enabled-false/).\n *\n * @sample highcharts/legend/scrollable-vertical/\n * Legend with vertical scrollable extension\n * @sample highcharts/legend/scrollable-horizontal/\n * Legend with horizontal scrollable extension\n *\n */\n navigation: {\n /**\n * How to animate the pages when navigating up or down. A value of\n * `true` applies the default navigation given in the\n * `chart.animation` option. Additional options can be given as an\n * object containing values for easing and duration.\n *\n * @sample {highcharts} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n * @sample {highstock} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n *\n * @type {boolean|Partial<Highcharts.AnimationOptionsObject>}\n * @default true\n * @since 2.2.4\n * @apioption legend.navigation.animation\n */\n /**\n * The pixel size of the up and down arrows in the legend paging\n * navigation.\n *\n * @sample {highcharts} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n * @sample {highstock} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n *\n * @type {number}\n * @default 12\n * @since 2.2.4\n * @apioption legend.navigation.arrowSize\n */\n /**\n * Whether to enable the legend navigation. In most cases, disabling\n * the navigation results in an unwanted overflow.\n *\n * See also the\n * [adapt chart to legend](https://github.com/highcharts/adapt-chart-to-legend)\n * plugin for a solution to extend the chart height to make room for\n * the legend, optionally in exported charts only.\n *\n * @type {boolean}\n * @default true\n * @since 4.2.4\n * @apioption legend.navigation.enabled\n */\n /**\n * Text styles for the legend page navigation.\n *\n * @see In styled mode, the navigation items are styled with the\n * `.highcharts-legend-navigation` class.\n *\n * @sample {highcharts} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n * @sample {highstock} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n *\n * @type {Highcharts.CSSObject}\n * @since 2.2.4\n * @apioption legend.navigation.style\n */\n style: {\n /**\n * @type {number|string}\n */\n fontSize: '0.8em'\n },\n /**\n * The color for the active up or down arrow in the legend page\n * navigation.\n *\n * @see In styled mode, the active arrow be styled with the\n * `.highcharts-legend-nav-active` class.\n *\n * @sample {highcharts} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n * @sample {highstock} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @since 2.2.4\n */\n activeColor: \"#0022ff\" /* Palette.highlightColor100 */,\n /**\n * The color of the inactive up or down arrow in the legend page\n * navigation. .\n *\n * @see In styled mode, the inactive arrow be styled with the\n * `.highcharts-legend-nav-inactive` class.\n *\n * @sample {highcharts} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n * @sample {highstock} highcharts/legend/navigation/\n * Legend page navigation demonstrated\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @since 2.2.4\n */\n inactiveColor: \"#cccccc\" /* Palette.neutralColor20 */\n },\n /**\n * The inner padding of the legend box.\n *\n * @sample {highcharts|highstock} highcharts/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n *\n * @type {number}\n * @default 8\n * @since 2.2.0\n * @apioption legend.padding\n */\n /**\n * Whether to reverse the order of the legend items compared to the\n * order of the series or points as defined in the configuration object.\n *\n * @see [yAxis.reversedStacks](#yAxis.reversedStacks),\n * [series.legendIndex](#series.legendIndex)\n *\n * @sample {highcharts} highcharts/legend/reversed/\n * Stacked bar with reversed legend\n *\n * @type {boolean}\n * @default false\n * @since 1.2.5\n * @apioption legend.reversed\n */\n /**\n * Whether to show the symbol on the right side of the text rather than\n * the left side. This is common in Arabic and Hebrew.\n *\n * @sample {highcharts} highcharts/legend/rtl/\n * Symbol to the right\n *\n * @type {boolean}\n * @default false\n * @since 2.2\n * @apioption legend.rtl\n */\n /**\n * CSS styles for the legend area. In the 1.x versions the position\n * of the legend area was determined by CSS. In 2.x, the position is\n * determined by properties like `align`, `verticalAlign`, `x` and `y`,\n * but the styles are still parsed for backwards compatibility.\n *\n * @deprecated\n *\n * @type {Highcharts.CSSObject}\n * @product highcharts highstock\n * @apioption legend.style\n */\n /**\n * CSS styles for each legend item. Only a subset of CSS is supported,\n * notably those options related to text. The default `textOverflow`\n * property makes long texts truncate. Set it to `undefined` to wrap\n * text instead. A `width` property can be added to control the text\n * width.\n *\n * @see In styled mode, the legend items can be styled with the\n * `.highcharts-legend-item` class.\n *\n * @sample {highcharts} highcharts/legend/itemstyle/\n * Bold black text\n * @sample {highmaps} maps/legend/itemstyle/\n * Item text styles\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#333333\", \"cursor\": \"pointer\", \"fontSize\": \"0.8em\", \"fontWeight\": \"bold\", \"textOverflow\": \"ellipsis\"}\n */\n itemStyle: {\n /**\n * @ignore\n */\n color: \"#333333\" /* Palette.neutralColor80 */,\n /**\n * @ignore\n */\n cursor: 'pointer',\n /**\n * @ignore\n */\n fontSize: '0.8em',\n /**\n * @ignore\n */\n textDecoration: 'none',\n /**\n * @ignore\n */\n textOverflow: 'ellipsis'\n },\n /**\n * CSS styles for each legend item in hover mode. Only a subset of\n * CSS is supported, notably those options related to text. Properties\n * are inherited from `style` unless overridden here.\n *\n * @see In styled mode, the hovered legend items can be styled with\n * the `.highcharts-legend-item:hover` pseudo-class.\n *\n * @sample {highcharts} highcharts/legend/itemhoverstyle/\n * Red on hover\n * @sample {highmaps} maps/legend/itemstyle/\n * Item text styles\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#000000\"}\n */\n itemHoverStyle: {\n /**\n * @ignore\n */\n color: \"#000000\" /* Palette.neutralColor100 */\n },\n /**\n * CSS styles for each legend item when the corresponding series or\n * point is hidden. Only a subset of CSS is supported, notably those\n * options related to text. Properties are inherited from `style`\n * unless overridden here.\n *\n * @see In styled mode, the hidden legend items can be styled with\n * the `.highcharts-legend-item-hidden` class.\n *\n * @sample {highcharts} highcharts/legend/itemhiddenstyle/\n * Darker gray color\n *\n * @type {Highcharts.CSSObject}\n * @default {\"color\": \"#cccccc\"}\n */\n itemHiddenStyle: {\n /**\n * @ignore\n */\n color: \"#666666\" /* Palette.neutralColor60 */,\n /**\n * @ignore\n */\n textDecoration: 'line-through'\n },\n /**\n * Whether to apply a drop shadow to the legend. A `backgroundColor`\n * also needs to be applied for this to take effect. The shadow can be\n * an object configuration containing `color`, `offsetX`, `offsetY`,\n * `opacity` and `width`.\n *\n * @sample {highcharts} highcharts/legend/shadow/\n * White background and drop shadow\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/border-background/\n * Border and background options\n *\n * @type {boolean|Highcharts.CSSObject}\n */\n shadow: false,\n /**\n * Default styling for the checkbox next to a legend item when\n * `showCheckbox` is true.\n *\n * @type {Highcharts.CSSObject}\n * @default {\"width\": \"13px\", \"height\": \"13px\", \"position\":\"absolute\"}\n */\n itemCheckboxStyle: {\n /**\n * @ignore\n */\n position: 'absolute',\n /**\n * @ignore\n */\n width: '13px', // For IE precision\n /**\n * @ignore\n */\n height: '13px'\n },\n /// itemWidth: undefined,\n /**\n * When this is true, the legend symbol width will be the same as\n * the symbol height, which in turn defaults to the font size of the\n * legend items.\n *\n * @since 5.0.0\n */\n squareSymbol: true,\n /**\n * The pixel height of the symbol for series types that use a rectangle\n * in the legend. Defaults to the font size of legend items.\n *\n * Note: This option is a default source of color axis height, if the\n * [colorAxis.height](https://api.highcharts.com/highcharts/colorAxis.height)\n * option is not set.\n *\n * @productdesc {highmaps}\n * In Highmaps, when the symbol is the gradient of a vertical color\n * axis, the height defaults to 200.\n *\n * @sample {highmaps} maps/legend/layout-vertical-sized/\n * Sized vertical gradient\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * No distance between data classes\n *\n * @type {number}\n * @since 3.0.8\n * @apioption legend.symbolHeight\n */\n /**\n * The border radius of the symbol for series types that use a rectangle\n * in the legend. Defaults to half the `symbolHeight`, effectively\n * creating a circle.\n *\n * For color axis scales, it defaults to 3.\n *\n * @sample {highcharts} highcharts/legend/symbolradius/\n * Round symbols\n * @sample {highstock} highcharts/legend/symbolradius/\n * Round symbols\n * @sample {highmaps} highcharts/legend/symbolradius/\n * Round symbols\n *\n * @type {number}\n * @since 3.0.8\n * @apioption legend.symbolRadius\n */\n /**\n * The pixel width of the legend item symbol. When the `squareSymbol`\n * option is set, this defaults to the `symbolHeight`, otherwise 16.\n *\n * Note: This option is a default source of color axis width, if the\n * [colorAxis.width](https://api.highcharts.com/highcharts/colorAxis.width)\n * option is not set.\n *\n * @productdesc {highmaps}\n * In Highmaps, when the symbol is the gradient of a horizontal color\n * axis, the width defaults to 200.\n *\n * @sample {highcharts} highcharts/legend/symbolwidth/\n * Greater symbol width and padding\n * @sample {highmaps} maps/legend/padding-itemmargin/\n * Padding and item margins demonstrated\n * @sample {highmaps} maps/legend/layout-vertical-sized/\n * Sized vertical gradient\n *\n * @type {number}\n * @apioption legend.symbolWidth\n */\n /**\n * Whether to [use HTML](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting#html)\n * to render the legend item texts.\n *\n * Prior to 4.1.7, when using HTML, [legend.navigation](\n * #legend.navigation) was disabled.\n *\n * @sample highcharts/legend/scrollable-vertical/\n * Legend with vertical scrollable extension\n * @sample highcharts/legend/scrollable-horizontal/\n * Legend with horizontal scrollable extension\n *\n * @type {boolean}\n * @default false\n * @apioption legend.useHTML\n */\n /**\n * For a color axis with data classes, how many decimals to render in\n * the legend. The default preserves the decimals of the range numbers.\n *\n * @type {number}\n * @default -1\n * @product highcharts highmaps\n * @apioption legend.valueDecimals\n */\n /**\n * For a color axis with data classes, a suffix for the range numbers in\n * the legend.\n *\n * @type {string}\n * @default ''\n * @product highcharts highmaps\n * @apioption legend.valueSuffix\n */\n /**\n * The width of the legend box. If a number is set, it translates to\n * pixels. Since v7.0.2 it allows setting a percent string of the full\n * chart width, for example `40%`.\n *\n * Defaults to the full chart width for legends below or above the\n * chart, half the chart width for legends to the left and right.\n *\n * @sample {highcharts} highcharts/legend/width/\n * Aligned to the plot area\n * @sample {highcharts} highcharts/legend/width-percent/\n * A percent of the chart width\n *\n * @type {number|string}\n * @since 2.0\n * @apioption legend.width\n */\n /**\n * The pixel padding between the legend item symbol and the legend\n * item text.\n *\n * @sample {highcharts} highcharts/legend/symbolpadding/\n * Greater symbol width and padding\n */\n symbolPadding: 5,\n /**\n * The vertical alignment of the legend box. Can be one of `top`,\n * `middle` or `bottom`. Vertical position can be further determined\n * by the `y` option.\n *\n * In the case that the legend is aligned in a corner position, the\n * `layout` option will determine whether to place it above/below\n * or on the side of the plot area.\n *\n * When the [layout](#legend.layout) option is `proximate`, the\n * `verticalAlign` option doesn't apply.\n *\n * @sample {highcharts} highcharts/legend/verticalalign/\n * Legend 100px from the top of the chart\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/alignment/\n * Legend alignment\n *\n * @type {Highcharts.VerticalAlignValue}\n * @since 2.0\n */\n verticalAlign: 'bottom',\n // Width: undefined,\n /**\n * The x offset of the legend relative to its horizontal alignment\n * `align` within chart.spacingLeft and chart.spacingRight. Negative\n * x moves it to the left, positive x moves it to the right.\n *\n * @sample {highcharts} highcharts/legend/width/\n * Aligned to the plot area\n *\n * @since 2.0\n */\n x: 0,\n /**\n * The vertical offset of the legend relative to it's vertical alignment\n * `verticalAlign` within chart.spacingTop and chart.spacingBottom.\n * Negative y moves it up, positive y moves it down.\n *\n * @sample {highcharts} highcharts/legend/verticalalign/\n * Legend 100px from the top of the chart\n * @sample {highstock} stock/legend/align/\n * Various legend options\n * @sample {highmaps} maps/legend/alignment/\n * Legend alignment\n *\n * @since 2.0\n */\n y: 0,\n /**\n * A title to be added on top of the legend.\n *\n * @sample {highcharts} highcharts/legend/title/\n * Legend title\n * @sample {highmaps} maps/legend/alignment/\n * Legend with title\n *\n * @since 3.0\n */\n title: {\n /**\n * A text or HTML string for the title.\n *\n * @type {string}\n * @since 3.0\n * @apioption legend.title.text\n */\n /**\n * Generic CSS styles for the legend title.\n *\n * @see In styled mode, the legend title is styled with the\n * `.highcharts-legend-title` class.\n *\n * @type {Highcharts.CSSObject}\n * @default {\"fontSize\": \"0.8em\", \"fontWeight\": \"bold\"}\n * @since 3.0\n */\n style: {\n /**\n * @ignore\n */\n color: \"#333333\" /* Palette.neutralColor80 */,\n /**\n * @ignore\n */\n fontSize: '0.8em',\n /**\n * @ignore\n */\n fontWeight: 'bold'\n }\n }\n },\n /**\n * The loading options control the appearance of the loading screen\n * that covers the plot area on chart operations. This screen only\n * appears after an explicit call to `chart.showLoading()`. It is a\n * utility for developers to communicate to the end user that something\n * is going on, for example while retrieving new data via an XHR connection.\n * The \"Loading...\" text itself is not part of this configuration\n * object, but part of the `lang` object.\n */\n loading: {\n /**\n * The duration in milliseconds of the fade out effect.\n *\n * @sample highcharts/loading/hideduration/\n * Fade in and out over a second\n *\n * @type {number}\n * @default 100\n * @since 1.2.0\n * @apioption loading.hideDuration\n */\n /**\n * The duration in milliseconds of the fade in effect.\n *\n * @sample highcharts/loading/hideduration/\n * Fade in and out over a second\n *\n * @type {number}\n * @default 100\n * @since 1.2.0\n * @apioption loading.showDuration\n */\n /**\n * CSS styles for the loading label `span`.\n *\n * @see In styled mode, the loading label is styled with the\n * `.highcharts-loading-inner` class.\n *\n * @sample {highcharts|highmaps} highcharts/loading/labelstyle/\n * Vertically centered\n * @sample {highstock} stock/loading/general/\n * Label styles\n *\n * @type {Highcharts.CSSObject}\n * @default {\"fontWeight\": \"bold\", \"position\": \"relative\", \"top\": \"45%\"}\n * @since 1.2.0\n */\n labelStyle: {\n /**\n * @ignore\n */\n fontWeight: 'bold',\n /**\n * @ignore\n */\n position: 'relative',\n /**\n * @ignore\n */\n top: '45%'\n },\n /**\n * CSS styles for the loading screen that covers the plot area.\n *\n * In styled mode, the loading label is styled with the\n * `.highcharts-loading` class.\n *\n * @sample {highcharts|highmaps} highcharts/loading/style/\n * Gray plot area, white text\n * @sample {highstock} stock/loading/general/\n * Gray plot area, white text\n *\n * @type {Highcharts.CSSObject}\n * @default {\"position\": \"absolute\", \"backgroundColor\": \"#ffffff\", \"opacity\": 0.5, \"textAlign\": \"center\"}\n * @since 1.2.0\n */\n style: {\n /**\n * @ignore\n */\n position: 'absolute',\n /**\n * @ignore\n */\n backgroundColor: \"#ffffff\" /* Palette.backgroundColor */,\n /**\n * @ignore\n */\n opacity: 0.5,\n /**\n * @ignore\n */\n textAlign: 'center'\n }\n },\n /**\n * Options for the tooltip that appears when the user hovers over a\n * series or point.\n *\n * @declare Highcharts.TooltipOptions\n */\n tooltip: {\n /**\n * The color of the tooltip border. When `undefined`, the border takes\n * the color of the corresponding series or point.\n *\n * Note that the [borderWidth](#tooltip.borderWidth) is usually 0 by\n * default, so the border color may not be visible until a border width\n * is set.\n *\n * @sample {highcharts} highcharts/tooltip/bordercolor-default/ Follow\n * series by default\n * @sample {highcharts} highcharts/tooltip/bordercolor-black/ Black\n * border\n * @sample {highstock} stock/tooltip/general/ Styled tooltip\n * @sample {highmaps} maps/tooltip/background-border/ Background and\n * border demo\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n * @apioption tooltip.borderColor\n */\n /**\n * A CSS class name to apply to the tooltip's container div,\n * allowing unique CSS styling for each chart.\n *\n * @type {string}\n * @apioption tooltip.className\n */\n /**\n * Since 4.1, the crosshair definitions are moved to the Axis object\n * in order for a better separation from the tooltip. See\n * [xAxis.crosshair](#xAxis.crosshair).\n *\n * @sample {highcharts} highcharts/tooltip/crosshairs-x/\n * Enable a crosshair for the x value\n *\n * @deprecated\n *\n * @type {*}\n * @default true\n * @apioption tooltip.crosshairs\n */\n /**\n * Distance from point to tooltip in pixels.\n *\n * @type {number}\n * @default 16\n * @apioption tooltip.distance\n */\n /**\n * Whether the tooltip should be fixed to one position in the chart, or\n * located next to the point or mouse. When the tooltip is fixed, the\n * position can be further specified with the\n * [tooltip.position](#tooltip.position) options set.\n *\n * @sample highcharts/tooltip/fixed/\n * Fixed tooltip and position options\n * @sample {highstock} stock/tooltip/fixed/\n * Stock chart with fixed tooltip\n * @sample {highmaps} maps/tooltip/fixed/\n * Map with fixed tooltip\n *\n * @type {boolean}\n * @default false\n * @since 12.2.0\n * @apioption tooltip.fixed\n */\n /**\n * Whether the tooltip should follow the mouse as it moves across\n * columns, pie slices and other point types with an extent.\n * By default it behaves this way for pie, polygon, map, sankey\n * and wordcloud series by override in the `plotOptions`\n * for those series types.\n *\n * Does not apply if [split](#tooltip.split) is `true`.\n *\n * For touch moves to behave the same way, [followTouchMove](\n * #tooltip.followTouchMove) must be `true` also.\n *\n * @sample highcharts/tooltip/followpointer/\n * Tooltip follow pointer comparison\n *\n * @type {boolean}\n * @default {highcharts} false\n * @default {highstock} false\n * @default {highmaps} true\n * @since 3.0\n * @apioption tooltip.followPointer\n */\n /**\n * Whether the tooltip should update as the finger moves on a touch\n * device. If this is `true` and [chart.panning](#chart.panning) is\n * set,`followTouchMove` will take over one-finger touches, so the user\n * needs to use two fingers for zooming and panning.\n *\n * Note the difference to [followPointer](#tooltip.followPointer) that\n * only defines the _position_ of the tooltip. If `followPointer` is\n * false in for example a column series, the tooltip will show above or\n * below the column, but as `followTouchMove` is true, the tooltip will\n * jump from column to column as the user swipes across the plot area.\n *\n * @type {boolean}\n * @default {highcharts} true\n * @default {highstock} true\n * @default {highmaps} false\n * @since 3.0.1\n * @apioption tooltip.followTouchMove\n */\n /**\n * A [format string](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)\n * for the whole shared tooltip. When format strings are a requirement,\n * it is usually more convenient to use `headerFormat`, `pointFormat`\n * and `footerFormat`, but the `format` option allows combining them\n * into one setting.\n *\n * The context of the format string is the same as that of the\n * `tooltip.formatter` callback.\n *\n * @sample {highcharts} highcharts/tooltip/format-shared/\n * Format for shared tooltip\n *\n * @type {string}\n * @default undefined\n * @since 11.1.0\n * @apioption tooltip.format\n */\n /**\n * Callback function to format the text of the tooltip from scratch. In\n * case of single or [shared](#tooltip.shared) tooltips, a string should\n * be returned. In case of [split](#tooltip.split) tooltips, it should\n * return an array where the first item is the header, and subsequent\n * items are mapped to the points. Return `false` to disable tooltip for\n * a specific point on series.\n *\n * A subset of HTML is supported. Unless `useHTML` is true, the HTML of\n * the tooltip is parsed and converted to SVG, therefore this isn't a\n * complete HTML renderer. The following HTML tags are supported: `b`,\n * `br`, `em`, `i`, `span`, `strong`. Spans can be styled with a `style`\n * attribute, but only text-related CSS, that is shared with SVG, is\n * handled.\n *\n * The context of the formatter (since v12) is the\n * [Point](https://api.highcharts.com/class-reference/Highcharts.Point)\n * instance. If the tooltip is shared or split, an array `this.points`\n * contains all points of the hovered x-value.\n *\n * Common properties from the Point to use in the formatter include:\n *\n * - **Point.percentage**:\n * Stacked series and pies only. The point's percentage of the total.\n *\n * - **Point.points**:\n * In a shared or split tooltip, this is an array containing all the\n * hovered points.\n *\n * - **this.series**:\n * The series object. The series name is available through\n * `this.series.name`.\n *\n * - **this.total**:\n * The total value at this point's x value in a stacked series, or the\n * sum of all slices in a pie series.\n *\n * - **this.x**:\n * The x value.\n *\n * - **this.y**:\n * The y value.\n *\n * @sample {highcharts} highcharts/tooltip/formatter-simple/\n * Simple string formatting\n * @sample {highcharts} highcharts/tooltip/formatter-shared/\n * Formatting with shared tooltip\n * @sample {highcharts|highstock} highcharts/tooltip/formatter-split/\n * Formatting with split tooltip\n * @sample highcharts/tooltip/formatter-conditional-default/\n * Extending default formatter\n * @sample {highstock} stock/tooltip/formatter/\n * Formatting with shared tooltip\n * @sample {highmaps} maps/tooltip/formatter/\n * String formatting\n *\n * @type {Highcharts.TooltipFormatterCallbackFunction}\n * @apioption tooltip.formatter\n */\n /**\n * Callback function to format the text of the tooltip for\n * visible null points.\n * Works analogously to [formatter](#tooltip.formatter).\n *\n * @sample highcharts/plotoptions/series-nullformat\n * Format data label and tooltip for null point.\n *\n * @type {Highcharts.TooltipFormatterCallbackFunction}\n * @apioption tooltip.nullFormatter\n */\n /**\n * Whether to allow the tooltip to render outside the chart's SVG\n * element box. By default (`false`), the tooltip is rendered within the\n * chart's SVG element, which results in the tooltip being aligned\n * inside the chart area. For small charts, this may result in clipping\n * or overlapping. When `true`, a separate SVG element is created and\n * overlaid on the page, allowing the tooltip to be aligned inside the\n * page itself. Beware that with this option active, CSS classes on the\n * chart's target container, with classnames matching the pattern\n * 'highcharts-*', will be set on the tooltip as well. This is done to\n * support theming for tooltips with this option.\n *\n * Defaults to `true` if `chart.scrollablePlotArea` is activated,\n * otherwise `false`.\n *\n * @sample highcharts/tooltip/outside\n * Small charts with tooltips outside\n *\n * @type {boolean|undefined}\n * @default undefined\n * @since 6.1.1\n * @apioption tooltip.outside\n */\n /**\n * A callback function for formatting the HTML output for a single point\n * in the tooltip. Like the `pointFormat` string, but with more\n * flexibility.\n *\n * @type {Highcharts.FormatterCallbackFunction<Highcharts.Point>}\n * @since 4.1.0\n * @context Highcharts.Point\n * @apioption tooltip.pointFormatter\n */\n /**\n * A callback function to place the tooltip in a custom position. The\n * callback receives three parameters: `labelWidth`, `labelHeight` and\n * `point`, where point contains values for `plotX` and `plotY` telling\n * where the reference point is in the plot area. Add `chart.plotLeft`\n * and `chart.plotTop` to get the full coordinates.\n *\n * To find the actual hovered `Point` instance, use\n * `this.chart.hoverPoint`. For shared or split tooltips, all the hover\n * points are available in `this.chart.hoverPoints`.\n *\n * Since v7, when [tooltip.split](#tooltip.split) option is enabled,\n * positioner is called for each of the boxes separately, including\n * xAxis header. xAxis header is not a point, instead `point` argument\n * contains info: `{ plotX: Number, plotY: Number, isHeader: Boolean }`\n *\n * Since v12.2, the [tooltip.fixed](#tooltip.fixed) option combined with\n * [tooltip.position](#tooltip.position) covers most of the use cases\n * for custom tooltip positioning.\n *\n * The return should be an object containing x and y values, for example\n * `{ x: 100, y: 100 }`.\n *\n * @sample {highcharts} highcharts/tooltip/positioner/\n * A fixed tooltip position\n * @sample {highstock} stock/tooltip/positioner/\n * A fixed tooltip position on top of the chart\n * @sample {highmaps} maps/tooltip/positioner/\n * A fixed tooltip position\n * @sample {highstock} stock/tooltip/split-positioner/\n * Split tooltip with fixed positions\n * @sample {highstock} stock/tooltip/positioner-scrollable-plotarea/\n * Scrollable plot area combined with tooltip positioner\n *\n * @see [position](#tooltip.position)\n *\n * @type {Highcharts.TooltipPositionerCallbackFunction}\n * @since 2.2.4\n * @apioption tooltip.positioner\n */\n /**\n * Shows tooltip for all points with the same X value. Splits the\n * tooltip into one label per series, with the header close to the axis.\n * This is recommended over [shared](#tooltip.shared)\n * tooltips for charts with multiple line series, generally making them\n * easier to read. This option takes precedence over `tooltip.shared`.\n *\n * Not supported for [polar](#chart.polar) and [inverted](#chart.inverted) charts.\n *\n * @productdesc {highstock} In Highcharts Stock, tooltips are split\n * by default since v6.0.0. Stock charts typically contain\n * multi-dimension points and multiple panes, making split tooltips\n * the preferred layout over\n * the previous `shared` tooltip.\n *\n * @sample highcharts/tooltip/split/\n * Split tooltip\n * @sample {highcharts|highstock} highcharts/tooltip/formatter-split/\n * Split tooltip and custom formatter callback\n *\n * @type {boolean}\n * @default {highcharts} false\n * @default {highstock} true\n * @since 5.0.0\n * @product highcharts highstock\n * @apioption tooltip.split\n */\n /**\n * Prevents the tooltip from switching or closing, when touched or\n * pointed.\n *\n * @sample highcharts/tooltip/stickoncontact/\n * Tooltip sticks on pointer contact\n *\n * @type {boolean}\n * @since 8.0.1\n * @apioption tooltip.stickOnContact\n */\n /**\n * Use HTML to render the contents of the tooltip instead of SVG. Using\n * HTML allows advanced formatting like tables and images in the\n * tooltip. It is also recommended for rtl languages as it works around\n * rtl bugs in early Firefox.\n *\n * @sample {highcharts|highstock} highcharts/tooltip/footerformat/\n * A table for value alignment\n * @sample {highcharts|highstock} highcharts/tooltip/fullhtml/\n * Full HTML tooltip\n * @sample {highmaps} maps/tooltip/usehtml/\n * Pure HTML tooltip\n *\n * @type {boolean}\n * @default false\n * @since 2.2\n * @apioption tooltip.useHTML\n */\n /**\n * How many decimals to show in each series' y value. This is\n * overridable in each series' tooltip options object. The default is to\n * preserve all decimals.\n *\n * @sample {highcharts|highstock} highcharts/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n * @sample {highmaps} maps/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n *\n * @type {number|undefined}\n * @since 2.2\n * @apioption tooltip.valueDecimals\n */\n /**\n * A string to prepend to each series' y value. Overridable in each\n * series' tooltip options object.\n *\n * @sample {highcharts|highstock} highcharts/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n * @sample {highmaps} maps/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n *\n * @type {string}\n * @since 2.2\n * @apioption tooltip.valuePrefix\n */\n /**\n * A string to append to each series' y value. Overridable in each\n * series' tooltip options object.\n *\n * @sample {highcharts|highstock} highcharts/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n * @sample {highmaps} maps/tooltip/valuedecimals/\n * Set decimals, prefix and suffix for the value\n *\n * @type {string}\n * @since 2.2\n * @apioption tooltip.valueSuffix\n */\n /**\n * The format for the date in the tooltip header if the X axis is a\n * datetime axis. The default is a best guess based on the smallest\n * distance between points in the chart.\n *\n * @sample {highcharts} highcharts/tooltip/xdateformat/\n * A different format\n *\n * @type {string|Highcharts.DateTimeFormatOptions}\n * @product highcharts highstock gantt\n * @apioption tooltip.xDateFormat\n */\n /**\n * How many decimals to show for the `point.change`\n * or the `point.cumulativeSum` value when the `series.compare`\n * or the `series.cumulative` option is set.\n * This is overridable in each series' tooltip options object.\n *\n * @type {number}\n * @default 2\n * @since 1.0.1\n * @product highstock\n * @apioption tooltip.changeDecimals\n */\n /**\n * Enable or disable the tooltip.\n *\n * @sample {highcharts} highcharts/tooltip/enabled/\n * Disabled\n * @sample {highcharts} highcharts/plotoptions/series-point-events-mouseover/\n * Disable tooltip and show values on chart instead\n */\n enabled: true,\n /**\n * Enable or disable animation of the tooltip.\n *\n * @type {boolean|Partial<Highcharts.AnimationOptionsObject>}\n * @since 2.3.0\n */\n animation: {\n duration: 300,\n // EaseOutCirc\n easing: (x) => Math.sqrt(1 - Math.pow(x - 1, 2))\n },\n /**\n * The radius of the rounded border corners.\n *\n * @sample {highcharts} highcharts/tooltip/bordercolor-default/\n * Default border radius\n * @sample {highcharts} highcharts/tooltip/borderradius-0/\n * Square borders\n * @sample {highmaps} maps/tooltip/background-border/\n * Background and border demo\n */\n borderRadius: 3,\n /**\n * For series on datetime axes, the date format in the tooltip's\n * header will by default be guessed based on the closest data points.\n * This member gives the default string representations used for\n * each unit. For an overview of the string or object configuration, see\n * [dateFormat](/class-reference/Highcharts.Time#dateFormat).\n *\n * @see [xAxis.dateTimeLabelFormats](#xAxis.dateTimeLabelFormats)\n *\n * @type {Highcharts.Dictionary<string|Highcharts.DateTimeFormatOptions>}\n * @product highcharts highstock gantt\n */\n dateTimeLabelFormats: {\n /** @internal */\n millisecond: '%[AebHMSL]',\n /** @internal */\n second: '%[AebHMS]',\n /** @internal */\n minute: '%[AebHM]',\n /** @internal */\n hour: '%[AebHM]',\n /** @internal */\n day: '%[AebY]',\n /** @internal */\n week: '%v %[AebY]',\n /** @internal */\n month: '%[BY]',\n /** @internal */\n year: '%Y'\n },\n /**\n * A string to append to the tooltip format.\n *\n * @sample {highcharts} highcharts/tooltip/footerformat/\n * A table for value alignment\n * @sample {highmaps} maps/tooltip/format/\n * Format demo\n *\n * @since 2.2\n */\n footerFormat: '',\n /**\n * The name of a symbol to use for the border around the tooltip\n * header. Applies only when [tooltip.split](#tooltip.split) is\n * enabled.\n *\n * Custom callbacks for symbol path generation can also be added to\n * `Highcharts.SVGRenderer.prototype.symbols` the same way as for\n * [series.marker.symbol](plotOptions.line.marker.symbol).\n *\n * @see [tooltip.shape](#tooltip.shape)\n *\n * @sample {highstock} stock/tooltip/split-positioner/\n * Different shapes for header and split boxes\n *\n * @type {Highcharts.TooltipShapeValue}\n * @validvalue [\"callout\", \"rect\"]\n * @since 7.0\n */\n headerShape: 'callout',\n /**\n * The number of milliseconds to wait until the tooltip is hidden when\n * mouse out from a point or chart.\n *\n * @since 3.0\n */\n hideDelay: 500,\n /**\n * Padding inside the tooltip, in pixels.\n *\n * @since 5.0.0\n */\n padding: 8,\n /**\n * Positioning options for fixed tooltip, taking effect only when\n * [tooltip.fixed](#tooltip.fixed) is `true`.\n *\n * @sample {highcharts} highcharts/tooltip/fixed/\n * Fixed tooltip and position options\n * @sample {highstock} stock/tooltip/fixed/\n * Stock chart with fixed tooltip\n * @sample {highmaps} maps/tooltip/fixed/\n * Map with fixed tooltip\n *\n * @since 12.2.0\n */\n position: {\n /**\n * The horizontal alignment of the fixed tooltip.\n *\n * @sample highcharts/tooltip/fixed/\n * Fixed tooltip\n * @sample {highstock} stock/tooltip/fixed/\n * Stock chart with fixed tooltip\n *\n * @type {Highcharts.AlignValue}\n * @default left\n * @apioption tooltip.position.align\n */\n /**\n * The vertical alignment of the fixed tooltip.\n *\n * @sample highcharts/tooltip/fixed/\n * Fixed tooltip\n * @sample {highstock} stock/tooltip/fixed/\n * Stock chart with fixed tooltip\n *\n * @type {Highcharts.VerticalAlignValue}\n * @default top\n * @apioption tooltip.position.verticalAlign\n */\n /**\n * What the fixed tooltip alignment should be relative to.\n *\n * The default, `pane`, means that it is aligned within the plot\n * area for that given series. If the tooltip is split (as default\n * in Stock charts), each partial tooltip is aligned within the\n * series' pane.\n *\n * @sample highcharts/tooltip/fixed/\n * Fixed tooltip\n * @sample {highstock} stock/tooltip/fixed/\n * Stock chart with fixed tooltip\n *\n * @type {string}\n * @default pane\n * @validvalue [\"pane\", \"chart\", \"plotBox\", \"spacingBox\"]\n * @apioption tooltip.position.relativeTo\n */\n /**\n * X pixel offset from the given position. Can be used to shy away\n * from axis lines, grid lines etc to avoid the tooltip overlapping\n * other elements.\n *\n * @sample highcharts/tooltip/fixed/\n * Fixed tooltip\n * @sample {highstock} stock/tooltip/fixed/\n * Stock chart with fixed tooltip\n */\n x: 0,\n /**\n * Y pixel offset from the given position. Can be used to shy away\n * from axis lines, grid lines etc to avoid the tooltip overlapping\n * other elements.\n *\n * @sample highcharts/tooltip/fixed/\n * Fixed tooltip\n * @sample {highstock} stock/tooltip/fixed/\n * Stock chart with fixed tooltip\n */\n y: 3\n },\n /**\n * The name of a symbol to use for the border around the tooltip. Can\n * be one of: `\"callout\"`, `\"circle\"` or `\"rect\"`. When\n * [tooltip.split](#tooltip.split)\n * option is enabled, shape is applied to all boxes except header, which\n * is controlled by\n * [tooltip.headerShape](#tooltip.headerShape).\n *\n * Custom callbacks for symbol path generation can also be added to\n * `Highcharts.SVGRenderer.prototype.symbols` the same way as for\n * [series.marker.symbol](plotOptions.line.marker.symbol).\n *\n * Defaults to `callout` for floating tooltip, `rect` for\n * [fixed](#tooltip.fixed) tooltip.\n *\n * @type {Highcharts.TooltipShapeValue}\n * @since 4.0\n * @default undefined\n * @apioption tooltip.shape\n */\n /**\n * Shows information in the tooltip for all points with the same X\n * value. When the tooltip is shared, the entire plot area will capture\n * mouse movement or touch events. Tooltip texts for series types with\n * ordered data (not pie, scatter, flags etc) will be shown in a single\n * bubble. This is recommended for single series charts and for\n * tablet/mobile optimized charts.\n *\n * See also [tooltip.split](#tooltip.split), that is better suited for\n * charts with many series, especially line-type series. The\n * `tooltip.split` option takes precedence over `tooltip.shared`.\n *\n * @sample {highcharts} highcharts/tooltip/shared-false/\n * False by default\n * @sample {highcharts} highcharts/tooltip/shared-true/\n * True\n * @sample {highcharts} highcharts/tooltip/shared-x-crosshair/\n * True with x axis crosshair\n * @sample {highcharts} highcharts/tooltip/shared-true-mixed-types/\n * True with mixed series types\n *\n * @since 2.1\n * @product highcharts highstock\n */\n shared: false,\n /**\n * Proximity snap for graphs or single points. It defaults to 10 for\n * mouse-powered devices and 25 for touch devices.\n *\n * Note that in most cases the whole plot area captures the mouse\n * movement, and in these cases `tooltip.snap` doesn't make sense. This\n * applies when [stickyTracking](#plotOptions.series.stickyTracking)\n * is `true` (default) and when the tooltip is [shared](#tooltip.shared)\n * or [split](#tooltip.split).\n *\n * @sample {highcharts} highcharts/tooltip/bordercolor-default/\n * 10 px by default\n * @sample {highcharts} highcharts/tooltip/snap-50/\n * 50 px on graph\n *\n * @type {number}\n * @default 10/25\n * @since 1.2.0\n * @product highcharts highstock\n */\n snap: isTouchDevice ? 25 : 10,\n /**\n * The HTML of the tooltip header line. The context is the\n * [Point class](https://api.highcharts.com/class-reference/Highcharts.Point).\n * Variables are enclosed in curly brackets. Examples of common\n * variables to include are `x`, `y`, `series.name` and `series.color`\n * and other properties on the same form. The `point.key` variable\n * contains the category name, x value or datetime string depending on\n * the type of axis. For datetime axes, the `point.key` date format can\n * be set using `tooltip.xDateFormat`.\n *\n * @sample {highcharts} highcharts/tooltip/footerformat/\n * An HTML table in the tooltip\n * @sample {highstock} highcharts/tooltip/footerformat/\n * An HTML table in the tooltip\n * @sample {highmaps} maps/tooltip/format/\n * Format demo\n *\n * @type {string}\n * @apioption tooltip.headerFormat\n */\n headerFormat: '<span style=\"font-size: 0.8em\">{ucfirst point.key}</span><br/>',\n /**\n * The HTML of the null point's line in the tooltip. Works analogously\n * to [pointFormat](#tooltip.pointFormat).\n *\n * @sample {highcharts} highcharts/series/null-interaction\n * Line chart with null interaction\n * @sample {highcharts} highcharts/plotoptions/series-nullformat\n * Heatmap with null interaction\n *\n * @type {string}\n * @apioption tooltip.nullFormat\n */\n /**\n * The HTML of the point's line in the tooltip. The context is the\n * [Point class](https://api.highcharts.com/class-reference/Highcharts.Point).\n * Variables are enclosed in curly brackets. Examples of common\n * variables to include are `x`, `y`, `series.name` and `series.color`\n * and other properties on the same form. Furthermore, `y` can be\n * extended by the `tooltip.valuePrefix` and `tooltip.valueSuffix`\n * variables. This can also be overridden for each series, which makes\n * it a good hook for displaying units.\n *\n * In styled mode, the dot is colored by a class name rather than the\n * point color.\n *\n * @sample {highcharts} highcharts/tooltip/pointformat/\n * A different point format with value suffix\n * @sample {highcharts|highstock} highcharts/tooltip/pointformat-extra-information/\n * Show extra information about points in the tooltip\n * @sample {highmaps} maps/tooltip/format/\n * Format demo\n *\n * @type {string}\n * @since 2.2\n * @apioption tooltip.pointFormat\n */\n pointFormat: '<span style=\"color:{point.color}\">\\u25CF</span> {series.name}: <b>{point.y}</b><br/>',\n /**\n * The background color or gradient for the tooltip.\n *\n * In styled mode, the stroke width is set in the\n * `.highcharts-tooltip-box` class.\n *\n * @sample {highcharts} highcharts/tooltip/backgroundcolor-solid/\n * Yellowish background\n * @sample {highcharts} highcharts/tooltip/backgroundcolor-gradient/\n * Gradient\n * @sample {highcharts} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n * @sample {highstock} stock/tooltip/general/\n * Custom tooltip\n * @sample {highstock} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n * @sample {highmaps} maps/tooltip/background-border/\n * Background and border demo\n * @sample {highmaps} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n *\n * @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}\n */\n backgroundColor: \"#ffffff\" /* Palette.backgroundColor */,\n /**\n * The pixel width of the tooltip border. Defaults to 0 for single\n * tooltips and fixed tooltips, otherwise 1 for split tooltips.\n *\n * In styled mode, the stroke width is set in the\n * `.highcharts-tooltip-box` class.\n *\n * @sample {highcharts} highcharts/tooltip/bordercolor-default/\n * 2 pixels\n * @sample {highcharts} highcharts/tooltip/borderwidth/\n * No border (shadow only)\n * @sample {highcharts} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n * @sample {highstock} stock/tooltip/general/\n * Custom tooltip\n * @sample {highstock} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n * @sample {highmaps} maps/tooltip/background-border/\n * Background and border demo\n * @sample {highmaps} highcharts/css/tooltip-border-background/\n * Tooltip in styled mode\n *\n * @type {number}\n */\n borderWidth: void 0,\n /**\n * Whether to apply a drop shadow to the tooltip. Defaults to true,\n * unless the tooltip is [fixed](#tooltip.fixed).\n *\n * @sample {highcharts} highcharts/tooltip/bordercolor-default/\n * True by default\n * @sample {highcharts} highcharts/tooltip/shadow/\n * False\n * @sample {highmaps} maps/tooltip/positioner/\n * Fixed tooltip position, border and shadow disabled\n *\n * @type {boolean|Highcharts.ShadowOptionsObject}\n * @default undefined\n * @apioption tooltip.shadow\n */\n /**\n * Prevents the tooltip from switching or closing when touched or\n * pointed.\n *\n * @sample highcharts/tooltip/stickoncontact/\n * Tooltip sticks on pointer contact\n *\n * @since 8.0.1\n */\n stickOnContact: false,\n /**\n * CSS styles for the tooltip. The tooltip can also be styled through\n * the CSS class `.highcharts-tooltip`.\n *\n * Note that the default `pointerEvents` style makes the tooltip ignore\n * mouse events, so in order to use clickable tooltips, this value must\n * be set to `auto`.\n *\n * @sample {highcharts} highcharts/tooltip/style/\n * Greater padding, bold text\n *\n * @type {Highcharts.CSSObject}\n */\n style: {\n /** @internal */\n color: \"#333333\" /* Palette.neutralColor80 */,\n /** @internal */\n cursor: 'default',\n /**\n * @type {number|string}\n */\n fontSize: '0.8em'\n },\n /**\n * Use HTML to render the contents of the tooltip instead of SVG. Using\n * HTML allows advanced formatting like tables and images in the\n * tooltip. It is also recommended for rtl languages as it works around\n * rtl bugs in early Firefox.\n *\n * @sample {highcharts|highstock} highcharts/tooltip/footerformat/\n * A table for value alignment\n * @sample {highcharts|highstock} highcharts/tooltip/fullhtml/\n * Full HTML tooltip\n * @sample {highmaps} maps/tooltip/usehtml/\n * Pure HTML tooltip\n *\n * @since 2.2\n */\n useHTML: false\n },\n /**\n * Highchart by default puts a credits label in the lower right corner\n * of the chart. This can be changed using these options.\n */\n credits: {\n /**\n * Credits for map source to be concatenated with conventional credit\n * text. By default this is a format string that collects copyright\n * information from the map if available.\n *\n * @see [mapTextFull](#credits.mapTextFull)\n * @see [text](#credits.text)\n *\n * @type {string}\n * @default \\u00a9 <a href=\"{geojson.copyrightUrl}\">{geojson.copyrightShort}</a>\n * @since 4.2.2\n * @product highmaps\n * @apioption credits.mapText\n */\n /**\n * Detailed credits for map source to be displayed on hover of credits\n * text. By default this is a format string that collects copyright\n * information from the map if available.\n *\n * @see [mapText](#credits.mapText)\n * @see [text](#credits.text)\n *\n * @type {string}\n * @default {geojson.copyright}\n * @since 4.2.2\n * @product highmaps\n * @apioption credits.mapTextFull\n */\n /**\n * Whether to show the credits text.\n *\n * @sample {highcharts} highcharts/credits/enabled-false/\n * Credits disabled\n * @sample {highstock} stock/credits/enabled/\n * Credits disabled\n * @sample {highmaps} maps/credits/enabled-false/\n * Credits disabled\n */\n enabled: true,\n /**\n * The URL for the credits label.\n *\n * @sample {highcharts} highcharts/credits/href/\n * Custom URL and text\n * @sample {highmaps} maps/credits/customized/\n * Custom URL and text\n */\n href: 'https://www.highcharts.com?credits',\n /**\n * Position configuration for the credits label.\n *\n * @sample {highcharts} highcharts/credits/position-left/\n * Left aligned\n * @sample {highcharts} highcharts/credits/position-left/\n * Left aligned\n * @sample {highmaps} maps/credits/customized/\n * Left aligned\n * @sample {highmaps} maps/credits/customized/\n * Left aligned\n *\n * @type {Highcharts.AlignObject}\n * @since 2.1\n */\n position: {\n /** @internal */\n align: 'right',\n /** @internal */\n x: -10,\n /** @internal */\n verticalAlign: 'bottom',\n /** @internal */\n y: -5\n },\n /**\n * CSS styles for the credits label.\n *\n * @see In styled mode, credits styles can be set with the\n * `.highcharts-credits` class.\n *\n * @type {Highcharts.CSSObject}\n */\n style: {\n /** @internal */\n cursor: 'pointer',\n /** @internal */\n color: \"#999999\" /* Palette.neutralColor40 */,\n /**\n * @type {number|string}\n */\n fontSize: '0.6em'\n },\n /**\n * The text for the credits label.\n *\n * @productdesc {highmaps}\n * If a map is loaded as GeoJSON, the text defaults to\n * `Highcharts @ {map-credits}`. Otherwise, it defaults to\n * `Highcharts.com`.\n *\n * @sample {highcharts} highcharts/credits/href/\n * Custom URL and text\n * @sample {highmaps} maps/credits/customized/\n * Custom URL and text\n */\n text: 'Highcharts.com'\n }\n};\nconst defaultTime = new Core_Time(defaultOptions.time, defaultOptions.lang);\n/**\n * Get the updated default options. Until 3.0.7, merely exposing defaultOptions\n * for outside modules wasn't enough because the setOptions method created a new\n * object.\n *\n * @function Highcharts.getOptions\n *\n * @return {Highcharts.Options}\n * Default options.\n */\nfunction getOptions() {\n return defaultOptions;\n}\n/**\n * Merge the default options with custom options and return the new options\n * structure. Commonly used for defining reusable templates.\n *\n * @sample highcharts/members/setoptions Applying a global theme\n *\n * @function Highcharts.setOptions\n *\n * @param {Highcharts.Options} options\n * The new custom chart options.\n *\n * @return {Highcharts.Options}\n * Updated options.\n */\nfunction setOptions(options) {\n Defaults_fireEvent(Core_Globals, 'setOptions', { options });\n // Copy in the default options\n Defaults_merge(true, defaultOptions, options);\n // Update the time object\n if (options.time) {\n defaultTime.update(defaultOptions.time);\n }\n if (options.lang && 'locale' in options.lang) {\n defaultTime.update({\n locale: options.lang.locale\n });\n }\n if (options.lang?.chartTitle) {\n defaultOptions.title = {\n ...defaultOptions.title,\n text: options.lang.chartTitle\n };\n }\n return defaultOptions;\n}\n/* *\n *\n * Default Export\n *\n * */\nconst DefaultOptions = {\n defaultOptions,\n defaultTime,\n getOptions,\n setOptions\n};\n/* harmony default export */ const Defaults = (DefaultOptions);\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * @typedef {\"plotBox\"|\"spacingBox\"} Highcharts.ButtonRelativeToValue\n */\n/**\n * Gets fired when a series is added to the chart after load time, using the\n * `addSeries` method. Returning `false` prevents the series from being added.\n *\n * @callback Highcharts.ChartAddSeriesCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occurred.\n *\n * @param {Highcharts.ChartAddSeriesEventObject} event\n * The event that occurred.\n */\n/**\n * Contains common event information. Through the `options` property you can\n * access the series options that were passed to the `addSeries` method.\n *\n * @interface Highcharts.ChartAddSeriesEventObject\n */ /**\n* The series options that were passed to the `addSeries` method.\n* @name Highcharts.ChartAddSeriesEventObject#options\n* @type {Highcharts.SeriesOptionsType}\n*/ /**\n* Prevents the default behaviour of the event.\n* @name Highcharts.ChartAddSeriesEventObject#preventDefault\n* @type {Function}\n*/ /**\n* The event target.\n* @name Highcharts.ChartAddSeriesEventObject#target\n* @type {Highcharts.Chart}\n*/ /**\n* The event type.\n* @name Highcharts.ChartAddSeriesEventObject#type\n* @type {\"addSeries\"}\n*/\n/**\n * Gets fired when clicking on the plot background.\n *\n * @callback Highcharts.ChartClickCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occurred.\n *\n * @param {Highcharts.PointerEventObject} event\n * The event that occurred.\n */\n/**\n * Contains an axes of the clicked spot.\n *\n * @interface Highcharts.ChartClickEventAxisObject\n */ /**\n* Axis at the clicked spot.\n* @name Highcharts.ChartClickEventAxisObject#axis\n* @type {Highcharts.Axis}\n*/ /**\n* Axis value at the clicked spot.\n* @name Highcharts.ChartClickEventAxisObject#value\n* @type {number}\n*/\n/**\n * Contains information about the clicked spot on the chart. Remember the unit\n * of a datetime axis is milliseconds since 1970-01-01 00:00:00.\n *\n * @interface Highcharts.ChartClickEventObject\n * @extends Highcharts.PointerEventObject\n */ /**\n* Information about the x-axis on the clicked spot.\n* @name Highcharts.ChartClickEventObject#xAxis\n* @type {Array<Highcharts.ChartClickEventAxisObject>}\n*/ /**\n* Information about the y-axis on the clicked spot.\n* @name Highcharts.ChartClickEventObject#yAxis\n* @type {Array<Highcharts.ChartClickEventAxisObject>}\n*/ /**\n* Information about the z-axis on the clicked spot.\n* @name Highcharts.ChartClickEventObject#zAxis\n* @type {Array<Highcharts.ChartClickEventAxisObject>|undefined}\n*/\n/**\n * Gets fired when the chart is finished loading.\n *\n * @callback Highcharts.ChartLoadCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occurred.\n *\n * @param {global.Event} event\n * The event that occurred.\n */\n/**\n * Fires when the chart is redrawn, either after a call to `chart.redraw()` or\n * after an axis, series or point is modified with the `redraw` option set to\n * `true`.\n *\n * @callback Highcharts.ChartRedrawCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occurred.\n *\n * @param {global.Event} event\n * The event that occurred.\n */\n/**\n * Gets fired after initial load of the chart (directly after the `load` event),\n * and after each redraw (directly after the `redraw` event).\n *\n * @callback Highcharts.ChartRenderCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occurred.\n *\n * @param {global.Event} event\n * The event that occurred.\n */\n/**\n * Gets fired when an area of the chart has been selected. The default action\n * for the selection event is to zoom the chart to the selected area. It can be\n * prevented by calling `event.preventDefault()` or return false.\n *\n * @callback Highcharts.ChartSelectionCallbackFunction\n *\n * @param {Highcharts.Chart} this\n * The chart on which the event occurred.\n *\n * @param {Highcharts.SelectEventObject} event\n * Event informations\n *\n * @return {boolean|undefined}\n * Return false to prevent the default action, usually zoom.\n */\n(''); // Detach doclets above\n\n;// ./code/grid/es-modules/Core/Templating.js\n/* *\n *\n * (c) 2010-2025 Torstein Honsi\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n\n\nconst { defaultOptions: Templating_defaultOptions, defaultTime: Templating_defaultTime } = Defaults;\n\nconst { pageLang: Templating_pageLang } = Core_Globals;\n\nconst { extend: Templating_extend, getNestedProperty: Templating_getNestedProperty, isArray: Templating_isArray, isNumber: Templating_isNumber, isObject: Templating_isObject, isString: Templating_isString, pick: Templating_pick, ucfirst: Templating_ucfirst } = Core_Utilities;\nconst helpers = {\n // Built-in helpers\n add: (a, b) => a + b,\n divide: (a, b) => (b !== 0 ? a / b : ''),\n // eslint-disable-next-line eqeqeq\n eq: (a, b) => a == b,\n each: function (arr) {\n const match = arguments[arguments.length - 1];\n return Templating_isArray(arr) ?\n arr.map((item, i) => format(match.body, Templating_extend(Templating_isObject(item) ? item : { '@this': item }, {\n '@index': i,\n '@first': i === 0,\n '@last': i === arr.length - 1\n }))).join('') :\n false;\n },\n ge: (a, b) => a >= b,\n gt: (a, b) => a > b,\n 'if': (condition) => !!condition,\n le: (a, b) => a <= b,\n lt: (a, b) => a < b,\n multiply: (a, b) => a * b,\n // eslint-disable-next-line eqeqeq\n ne: (a, b) => a != b,\n subtract: (a, b) => a - b,\n ucfirst: Templating_ucfirst,\n unless: (condition) => !condition\n};\nconst numberFormatCache = {};\n/* *\n *\n * Functions\n *\n * */\n// Internal convenience function\nconst isQuotedString = (str) => /^[\"'].+[\"']$/.test(str);\n/**\n * Formats a JavaScript date timestamp (milliseconds since Jan 1st 1970) into a\n * human readable date string. The format is a subset of the formats for PHP's\n * [strftime](https://www.php.net/manual/en/function.strftime.php) function.\n * Additional formats can be given in the {@link Highcharts.dateFormats} hook.\n *\n * Since v6.0.5, all internal dates are formatted through the\n * {@link Highcharts.Chart#time} instance to respect chart-level time settings.\n * The `Highcharts.dateFormat` function only reflects global time settings set\n * with `setOptions`.\n *\n * Supported format keys:\n * - `%a`: Short weekday, like 'Mon'\n * - `%A`: Long weekday, like 'Monday'\n * - `%d`: Two digit day of the month, 01 to 31\n * - `%e`: Day of the month, 1 through 31\n * - `%w`: Day of the week, 0 through 6\n * - `%b`: Short month, like 'Jan'\n * - `%B`: Long month, like 'January'\n * - `%m`: Two digit month number, 01 through 12\n * - `%y`: Two digits year, like 09 for 2009\n * - `%Y`: Four digits year, like 2009\n * - `%H`: Two digits hours in 24h format, 00 through 23\n * - `%k`: Hours in 24h format, 0 through 23\n * - `%I`: Two digits hours in 12h format, 00 through 11\n * - `%l`: Hours in 12h format, 1 through 12\n * - `%M`: Two digits minutes, 00 through 59\n * - `%p`: Upper case AM or PM\n * - `%P`: Lower case AM or PM\n * - `%S`: Two digits seconds, 00 through 59\n * - `%L`: Milliseconds (naming from Ruby)\n *\n * @function Highcharts.dateFormat\n *\n * @param {string} format\n * The desired format where various time representations are prefixed\n * with `%`.\n *\n * @param {number} timestamp\n * The JavaScript timestamp.\n *\n * @param {boolean} [upperCaseFirst=false]\n * Upper case first letter in the return.\n *\n * @return {string}\n * The formatted date.\n */\nfunction dateFormat(format, timestamp, upperCaseFirst) {\n return Templating_defaultTime.dateFormat(format, timestamp, upperCaseFirst);\n}\n/**\n * Format a string according to a subset of the rules of Python's String.format\n * method.\n *\n * @example\n * let s = Highcharts.format(\n * 'The {color} fox was {len:.2f} feet long',\n * { color: 'red', len: Math.PI }\n * );\n * // => The red fox was 3.14 feet long\n *\n * @function Highcharts.format\n *\n * @param {string} str\n * The string to format.\n *\n * @param {Record<string, *>} ctx\n * The context, a collection of key-value pairs where each key is\n * replaced by its value.\n *\n * @param {Highcharts.Chart} [owner]\n * A `Chart` or `Grid` instance used to get numberFormatter and time.\n *\n * @return {string}\n * The formatted string.\n */\nfunction format(str = '', ctx, owner) {\n // Notice: using u flag will require a refactor for ES5 (#22450).\n const regex = /\\{([a-zA-Z\\u00C0-\\u017F\\d:\\.,;\\-\\/<>\\[\\]%_@+\"'’= #\\(\\)]+)\\}/g, // eslint-disable-line max-len\n // The sub expression regex is the same as the top expression regex,\n // but except parens and block helpers (#), and surrounded by parens\n // instead of curly brackets.\n subRegex = /\\(([a-zA-Z\\u00C0-\\u017F\\d:\\.,;\\-\\/<>\\[\\]%_@+\"'= ]+)\\)/g, matches = [], floatRegex = /f$/, decRegex = /\\.(\\d)/, lang = owner?.options?.lang || Templating_defaultOptions.lang, time = owner?.time || Templating_defaultTime, numberFormatter = owner?.numberFormatter || numberFormat.bind(owner);\n /*\n * Get a literal or variable value inside a template expression. May be\n * extended with other types like string or null if needed, but keep it\n * small for now.\n */\n const resolveProperty = (key = '') => {\n let n;\n // Literals\n if (key === 'true') {\n return true;\n }\n if (key === 'false') {\n return false;\n }\n if ((n = Number(key)).toString() === key) {\n return n;\n }\n if (isQuotedString(key)) {\n return key.slice(1, -1);\n }\n // Variables and constants\n return Templating_getNestedProperty(key, ctx);\n };\n let match, currentMatch, depth = 0, hasSub;\n // Parse and create tree\n while ((match = regex.exec(str)) !== null) {\n // When a sub expression is found, it is evaluated first, and the\n // results recursively evaluated until no subexpression exists.\n const mainMatch = match, subMatch = subRegex.exec(match[1]);\n if (subMatch) {\n match = subMatch;\n hasSub = true;\n }\n if (!currentMatch?.isBlock) {\n currentMatch = {\n ctx,\n expression: match[1],\n find: match[0],\n isBlock: match[1].charAt(0) === '#',\n start: match.index,\n startInner: match.index + match[0].length,\n length: match[0].length\n };\n }\n // Identify helpers\n const fn = (currentMatch.isBlock ? mainMatch : match)[1].split(' ')[0].replace('#', '');\n if (helpers[fn]) {\n // Block helper, only 0 level is handled\n if (currentMatch.isBlock && fn === currentMatch.fn) {\n depth++;\n }\n if (!currentMatch.fn) {\n currentMatch.fn = fn;\n }\n }\n // Closing a block helper\n const startingElseSection = match[1] === 'else';\n if (currentMatch.isBlock &&\n currentMatch.fn && (match[1] === `/${currentMatch.fn}` ||\n startingElseSection)) {\n if (!depth) { // === 0\n const start = currentMatch.startInner, body = str.substr(start, match.index - start);\n // Either closing without an else section, or when encountering\n // an else section\n if (currentMatch.body === void 0) {\n currentMatch.body = body;\n currentMatch.startInner = match.index + match[0].length;\n // The body exists already, so this is the else section\n }\n else {\n currentMatch.elseBody = body;\n }\n currentMatch.find += body + match[0];\n if (!startingElseSection) {\n matches.push(currentMatch);\n currentMatch = void 0;\n }\n }\n else if (!startingElseSection) {\n depth--;\n }\n // Common expression\n }\n else if (!currentMatch.isBlock) {\n matches.push(currentMatch);\n }\n // Evaluate sub-matches one by one to prevent orphaned block closers\n if (subMatch && !currentMatch?.isBlock) {\n break;\n }\n }\n // Execute\n matches.forEach((match) => {\n const { body, elseBody, expression, fn } = match;\n let replacement, i;\n // Helper function\n if (fn) {\n // Pass the helpers the amount of arguments defined by the function,\n // then the match as the last argument.\n const args = [match], parts = [], len = expression.length;\n let start = 0, startChar;\n for (i = 0; i <= len; i++) {\n const char = expression.charAt(i);\n // Start of string\n if (!startChar && (char === '\"' || char === '\\'')) {\n startChar = char;\n // End of string\n }\n else if (startChar === char) {\n startChar = '';\n }\n if (!startChar &&\n (char === ' ' || i === len)) {\n parts.push(expression.substr(start, i - start));\n start = i + 1;\n }\n }\n i = helpers[fn].length;\n while (i--) {\n args.unshift(resolveProperty(parts[i + 1]));\n }\n replacement = helpers[fn].apply(ctx, args);\n // Block helpers may return true or false. They may also return a\n // string, like the `each` helper.\n if (match.isBlock && typeof replacement === 'boolean') {\n replacement = format(replacement ? body : elseBody, ctx, owner);\n }\n // Simple variable replacement\n }\n else {\n const valueAndFormat = isQuotedString(expression) ?\n [expression] : expression.split(':');\n replacement = resolveProperty(valueAndFormat.shift() || '');\n // Format the replacement\n const isFloat = replacement % 1 !== 0;\n if (typeof replacement === 'number' &&\n (valueAndFormat.length || isFloat)) {\n const segment = valueAndFormat.join(':');\n if (floatRegex.test(segment) || isFloat) { // Float\n const decimals = parseInt((segment.match(decRegex) || ['', '-1'])[1], 10);\n if (replacement !== null) {\n replacement = numberFormatter(replacement, decimals, lang.decimalPoint, segment.indexOf(',') > -1 ? lang.thousandsSep : '');\n }\n }\n else {\n replacement = time.dateFormat(segment, replacement);\n }\n }\n // Use string literal in order to be preserved in the outer\n // expression\n subRegex.lastIndex = 0;\n if (subRegex.test(match.find) && Templating_isString(replacement)) {\n replacement = `\"${replacement}\"`;\n }\n }\n str = str.replace(match.find, Templating_pick(replacement, ''));\n });\n return hasSub ? format(str, ctx, owner) : str;\n}\n/**\n * Format a number and return a string based on input settings.\n *\n * @sample highcharts/members/highcharts-numberformat/\n * Custom number format\n *\n * @function Highcharts.numberFormat\n *\n * @param {number} number\n * The input number to format.\n *\n * @param {number} decimals\n * The amount of decimals. A value of -1 preserves the amount in the\n * input number.\n *\n * @param {string} [decimalPoint]\n * The decimal point, defaults to the one given in the lang options, or\n * a dot.\n *\n * @param {string} [thousandsSep]\n * The thousands separator, defaults to the one given in the lang\n * options, or a space character.\n *\n * @return {string}\n * The formatted number.\n */\nfunction numberFormat(number, decimals, decimalPoint, thousandsSep) {\n number = +number || 0;\n decimals = +decimals;\n let ret, fractionDigits, [mantissa, exp] = number.toString().split('e').map(Number);\n const lang = this?.options?.lang || Templating_defaultOptions.lang, origDec = (number.toString().split('.')[1] || '').split('e')[0].length, firstDecimals = decimals, options = {};\n decimalPoint ?? (decimalPoint = lang.decimalPoint);\n thousandsSep ?? (thousandsSep = lang.thousandsSep);\n if (decimals === -1) {\n // Preserve decimals. Not huge numbers (#3793).\n decimals = Math.min(origDec, 20);\n }\n else if (!Templating_isNumber(decimals)) {\n decimals = 2;\n }\n else if (decimals && exp < 0) {\n // Expose decimals from exponential notation (#7042)\n fractionDigits = decimals + exp;\n if (fractionDigits >= 0) {\n // Remove too small part of the number while keeping the notation\n mantissa = +mantissa.toExponential(fractionDigits).split('e')[0];\n decimals = fractionDigits;\n }\n else {\n // `fractionDigits < 0`\n mantissa = Math.floor(mantissa);\n if (decimals < 20) {\n // Use number instead of exponential notation (#7405)\n number = +(mantissa * Math.pow(10, exp)).toFixed(decimals);\n }\n else {\n // Or zero\n number = 0;\n }\n exp = 0;\n }\n }\n if (exp) {\n decimals ?? (decimals = 2);\n number = mantissa;\n }\n if (Templating_isNumber(decimals) && decimals >= 0) {\n options.minimumFractionDigits = decimals;\n options.maximumFractionDigits = decimals;\n }\n if (thousandsSep === '') {\n options.useGrouping = false;\n }\n const hasSeparators = thousandsSep || decimalPoint, locale = hasSeparators ?\n 'en' : (this?.locale || lang.locale || Templating_pageLang), cacheKey = JSON.stringify(options) + locale, nf = numberFormatCache[cacheKey] ?? (numberFormatCache[cacheKey] = new Intl.NumberFormat(locale, options));\n ret = nf.format(number);\n // If thousandsSep or decimalPoint are set, fall back to using English\n // format with string replacement for the separators.\n if (hasSeparators) {\n ret = ret\n // Preliminary step to avoid re-swapping (#22402)\n .replace(/([,\\.])/g, '_$1')\n .replace(/_\\,/g, thousandsSep ?? ',')\n .replace('_.', decimalPoint ?? '.');\n }\n if (\n // Remove signed zero (#20564)\n (!decimals && +ret === 0) ||\n // Small numbers, no decimals (#14023)\n (exp < 0 && !firstDecimals)) {\n ret = '0';\n }\n if (exp && +ret !== 0) {\n ret += 'e' + (exp < 0 ? '' : '+') + exp;\n }\n return ret;\n}\n/* *\n *\n * Default Export\n *\n * */\nconst Templating = {\n dateFormat,\n format,\n helpers,\n numberFormat\n};\n/* harmony default export */ const Core_Templating = (Templating);\n/* *\n * API Declarations\n * */\n/**\n * @interface Highcharts.Templating\n *\n * The Highcharts.Templating interface provides a structure for defining\n * helpers. Helpers can be used as conditional blocks or functions within\n * expressions. Highcharts includes several built-in helpers and supports\n * the addition of custom helpers.\n *\n * @see [More information](\n * https://www.highcharts.com/docs/chart-concepts/templating#helpers)\n *\n * @example\n * // Define a custom helper to return the absolute value of a number\n * Highcharts.Templating.helpers.abs = value => Math.abs(value);\n *\n * // Usage in a format string\n * format: 'Absolute value: {abs point.y}'\n *\n * @name Highcharts.Templating#helpers\n * @type {Record<string, Function>}\n */\n(''); // Keeps doclets above in file\n\n;// ./code/grid/es-modules/Grid/Core/Table/ColumnResizing/ResizingMode.js\n/* *\n *\n * Resizing Mode abstract class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\nconst { getStyle: ResizingMode_getStyle, defined: ResizingMode_defined } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a column distribution strategy.\n */\nclass ResizingMode {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Creates a new column distribution strategy.\n *\n * @param viewport\n * The table that the column distribution strategy is applied to.\n */\n constructor(viewport) {\n /**\n * The current widths values of the columns.\n */\n this.columnWidths = {};\n /**\n * Array of units for each column width value. Codified as:\n * - `0` - px\n * - `1` - %\n */\n this.columnWidthUnits = {};\n this.viewport = viewport;\n }\n /**\n * Returns the column's current width in pixels.\n *\n * @param column\n * The column to get the width for.\n *\n * @returns\n * The column's current width in pixels.\n */\n getColumnWidth(column) {\n const vp = this.viewport;\n const widthValue = this.columnWidths[column.id];\n const minWidth = ResizingMode.getMinWidth(column);\n if (!ResizingMode_defined(widthValue)) {\n const tbody = vp.tbodyElement;\n const freeWidth = tbody.getBoundingClientRect().width -\n this.calculateOccupiedWidth() -\n tbody.offsetWidth + tbody.clientWidth;\n const freeColumns = (vp.grid.enabledColumns?.length || 0) -\n Object.keys(this.columnWidths).length;\n // If undefined width:\n return Math.max(freeWidth / freeColumns, minWidth);\n }\n if (this.columnWidthUnits[column.id] === 0) {\n // If px:\n return widthValue;\n }\n // If %:\n return Math.max(vp.getWidthFromRatio(widthValue / 100), minWidth);\n }\n /**\n * Performs important calculations when the column is loaded.\n *\n * @param column\n * The column that is loaded.\n */\n loadColumn(column) {\n const rawWidth = column.options.width;\n if (!rawWidth) {\n return;\n }\n let value;\n let unitCode = 0;\n if (typeof rawWidth === 'number') {\n value = rawWidth;\n unitCode = 0;\n }\n else {\n value = parseFloat(rawWidth);\n unitCode = rawWidth.charAt(rawWidth.length - 1) === '%' ? 1 : 0;\n }\n this.columnWidthUnits[column.id] = unitCode;\n this.columnWidths[column.id] = value;\n }\n /**\n * Loads the column to the distribution strategy. Should be called before\n * the table is rendered.\n */\n loadColumns() {\n const { columns } = this.viewport;\n for (let i = 0, iEnd = columns.length; i < iEnd; ++i) {\n this.loadColumn(columns[i]);\n }\n }\n /**\n * Recaulculates the changing dimentions of the table.\n */\n reflow() {\n const vp = this.viewport;\n let rowsWidth = 0;\n for (let i = 0, iEnd = vp.columns.length; i < iEnd; ++i) {\n rowsWidth += this.getColumnWidth(vp.columns[i]);\n }\n vp.rowsWidth = rowsWidth;\n }\n /* *\n *\n * Static Methods\n *\n * */\n /**\n * Returns the minimum width of the column.\n *\n * @param column\n * The column to get the minimum width for.\n *\n * @returns\n * The minimum width in pixels.\n */\n static getMinWidth(column) {\n const tableColumnEl = column.cells[0]?.htmlElement;\n const headerColumnEl = column.header?.htmlElement;\n const getElPaddings = (el) => ((ResizingMode_getStyle(el, 'padding-left', true) || 0) +\n (ResizingMode_getStyle(el, 'padding-right', true) || 0) +\n (ResizingMode_getStyle(el, 'border-left', true) || 0) +\n (ResizingMode_getStyle(el, 'border-right', true) || 0));\n let result = ResizingMode.MIN_COLUMN_WIDTH;\n if (tableColumnEl) {\n result = Math.max(result, getElPaddings(tableColumnEl));\n }\n if (headerColumnEl) {\n result = Math.max(result, getElPaddings(headerColumnEl));\n }\n return result;\n }\n /**\n * Calculates defined (px and %) widths of all columns with non-undefined\n * widths in the grid. Total in px.\n */\n calculateOccupiedWidth() {\n const vp = this.viewport;\n let occupiedWidth = 0;\n let unit, width;\n const columnIds = Object.keys(this.columnWidths);\n let columnId;\n for (let i = 0, iEnd = columnIds.length; i < iEnd; ++i) {\n columnId = columnIds[i];\n unit = this.columnWidthUnits[columnId];\n if (unit === 0) {\n occupiedWidth += this.columnWidths[columnId];\n continue;\n }\n width = this.columnWidths[columnId];\n occupiedWidth += vp.getWidthFromRatio(width / 100);\n }\n return occupiedWidth;\n }\n}\n/* *\n*\n* Static Properties\n*\n* */\n/**\n * The minimum width of a column.\n * @internal\n */\nResizingMode.MIN_COLUMN_WIDTH = 20;\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ColumnResizing_ResizingMode = (ResizingMode);\n\n;// ./code/grid/es-modules/Grid/Core/Table/ColumnResizing/AdjacentResizingMode.js\n/* *\n *\n * Adjacent Resizing Mode class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n/* *\n *\n * Class\n *\n * */\nclass AdjacentResizingMode extends ColumnResizing_ResizingMode {\n constructor() {\n /* *\n *\n * Properties\n *\n * */\n super(...arguments);\n this.type = 'adjacent';\n }\n /* *\n *\n * Methods\n *\n * */\n resize(resizer, diff) {\n const vp = this.viewport;\n const column = resizer.draggedColumn;\n if (!column) {\n return;\n }\n const colW = resizer.columnStartWidth ?? 0;\n const minWidth = ColumnResizing_ResizingMode.getMinWidth(column);\n const nextCol = vp.columns[column.index + 1];\n const newW = Math.round(Math.max(colW + diff, minWidth) * 10) / 10;\n this.columnWidths[column.id] = newW;\n this.columnWidthUnits[column.id] = 0; // Always save in px\n column.update({ width: newW }, false);\n if (nextCol) {\n const newNextW = this.columnWidths[nextCol.id] = Math.round(Math.max((resizer.nextColumnStartWidth ?? 0) + colW - newW, minWidth) * 10) / 10;\n this.columnWidthUnits[nextCol.id] = 0; // Always save in px\n nextCol.update({ width: newNextW }, false);\n }\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ColumnResizing_AdjacentResizingMode = (AdjacentResizingMode);\n\n;// ./code/grid/es-modules/Grid/Core/Table/ColumnResizing/IndependentResizingMode.js\n/* *\n *\n * Independent Resizing Mode class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n/* *\n *\n * Class\n *\n * */\nclass IndependentResizingMode extends ColumnResizing_ResizingMode {\n constructor() {\n /* *\n *\n * Properties\n *\n * */\n super(...arguments);\n this.type = 'independent';\n }\n /* *\n *\n * Methods\n *\n * */\n resize(resizer, diff) {\n const column = resizer.draggedColumn;\n if (!column) {\n return;\n }\n // Set the width of the resized column.\n const width = this.columnWidths[column.id] = Math.round(Math.max((resizer.columnStartWidth || 0) + diff, ColumnResizing_ResizingMode.getMinWidth(column)) * 10) / 10;\n this.columnWidthUnits[column.id] = 0; // Set to px\n // Change width units of all columns on the right to px.\n const vp = this.viewport;\n const colIndex = column.index;\n for (let i = colIndex; i < vp.columns.length; ++i) {\n const rightCol = vp.columns[i];\n const rcWidth = this.columnWidths[rightCol.id] =\n rightCol.getWidth();\n this.columnWidthUnits[rightCol.id] = 0; // Set to px\n rightCol.update({ width: rcWidth }, false);\n }\n column.update({ width }, false);\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ColumnResizing_IndependentResizingMode = (IndependentResizingMode);\n\n;// ./code/grid/es-modules/Grid/Core/Table/ColumnResizing/DistributedResizingMode.js\n/* *\n *\n * Distributed Resizing Mode class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n/* *\n *\n * Class\n *\n * */\nclass DistributedResizingMode extends ColumnResizing_ResizingMode {\n constructor() {\n /* *\n *\n * Properties\n *\n * */\n super(...arguments);\n this.type = 'distributed';\n }\n /* *\n *\n * Methods\n *\n * */\n resize(resizer, diff) {\n const column = resizer.draggedColumn;\n if (!column) {\n return;\n }\n // Set the width of the resized column.\n const width = this.columnWidths[column.id] = Math.round(Math.max((resizer.columnStartWidth || 0) + diff, ColumnResizing_ResizingMode.getMinWidth(column)) * 10) / 10;\n this.columnWidthUnits[column.id] = 0; // Set to px\n column.update({ width }, false);\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ColumnResizing_DistributedResizingMode = (DistributedResizingMode);\n\n;// ./code/grid/es-modules/Grid/Core/Table/ColumnResizing/ColumnResizing.js\n/* *\n *\n * Column Resizing namespace\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\n\n\n/* *\n *\n * Namespace\n *\n * */\nvar ColumnResizing;\n(function (ColumnResizing) {\n /**\n * Abstract class representing a column resizing mode.\n */\n ColumnResizing.AbstractStrategy = ColumnResizing_ResizingMode;\n /**\n * Registry of column resizing modes.\n */\n ColumnResizing.types = {\n adjacent: ColumnResizing_AdjacentResizingMode,\n distributed: ColumnResizing_DistributedResizingMode,\n independent: ColumnResizing_IndependentResizingMode\n };\n /**\n * Creates a new column resizing mode instance based on the\n * viewport's options.\n *\n * @param viewport\n * The table that the column resizing mode is applied to.\n *\n * @returns\n * The proper column resizing mode.\n */\n function initMode(viewport) {\n const modeName = viewport.grid.options?.rendering?.columns?.resizing?.mode ||\n 'adjacent';\n let ModeConstructor = ColumnResizing.types[modeName];\n if (!ModeConstructor) {\n // eslint-disable-next-line no-console\n console.warn(`Unknown column resizing mode: '${modeName}'. Applied ` +\n 'default \\'adjacent\\' mode.');\n ModeConstructor = ColumnResizing.types.adjacent;\n }\n return new ModeConstructor(viewport);\n }\n ColumnResizing.initMode = initMode;\n})(ColumnResizing || (ColumnResizing = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ColumnResizing_ColumnResizing = (ColumnResizing);\n\n;// ./code/grid/es-modules/Data/Modifiers/DataModifier.js\n/* *\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Gøran Slettemark\n * - Dawid Dragula\n *\n * */\n\n\nconst { addEvent: DataModifier_addEvent, fireEvent: DataModifier_fireEvent, merge: DataModifier_merge } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Abstract class to provide an interface for modifying a table.\n */\nclass DataModifier {\n /* *\n *\n * Functions\n *\n * */\n /**\n * Runs a timed execution of the modifier on the given datatable.\n * Can be configured to run multiple times.\n *\n * @param {DataTable} dataTable\n * The datatable to execute\n *\n * @param {DataModifier.BenchmarkOptions} options\n * Options. Currently supports `iterations` for number of iterations.\n *\n * @return {Array<number>}\n * An array of times in milliseconds\n *\n */\n benchmark(dataTable, options) {\n const results = [];\n const modifier = this;\n const execute = () => {\n modifier.modifyTable(dataTable);\n modifier.emit({\n type: 'afterBenchmarkIteration'\n });\n };\n const defaultOptions = {\n iterations: 1\n };\n const { iterations } = DataModifier_merge(defaultOptions, options);\n modifier.on('afterBenchmarkIteration', () => {\n if (results.length === iterations) {\n modifier.emit({\n type: 'afterBenchmark',\n results\n });\n return;\n }\n // Run again\n execute();\n });\n const times = {\n startTime: 0,\n endTime: 0\n };\n // Add timers\n modifier.on('modify', () => {\n times.startTime = window.performance.now();\n });\n modifier.on('afterModify', () => {\n times.endTime = window.performance.now();\n results.push(times.endTime - times.startTime);\n });\n // Initial run\n execute();\n return results;\n }\n /**\n * Emits an event on the modifier to all registered callbacks of this event.\n *\n * @param {DataModifier.Event} [e]\n * Event object containing additonal event information.\n */\n emit(e) {\n DataModifier_fireEvent(this, e.type, e);\n }\n /**\n * Modifies the given table and sets its `modified` property as a reference\n * to the modified table. If `modified` property does not exist on the\n * original table, it's always created.\n *\n * @param {Highcharts.DataTable} table\n * Table to modify.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Promise<Highcharts.DataTable>}\n * Table with `modified` property as a reference.\n */\n modify(table, eventDetail) {\n const modifier = this;\n return new Promise((resolve, reject) => {\n if (!table.modified) {\n table.modified = table.clone(false, eventDetail);\n }\n try {\n resolve(modifier.modifyTable(table, eventDetail));\n }\n catch (e) {\n modifier.emit({\n type: 'error',\n detail: eventDetail,\n table\n });\n reject(e instanceof Error ? e : new Error('' + e));\n }\n });\n }\n /**\n * Registers a callback for a specific modifier event.\n *\n * @param {string} type\n * Event type as a string.\n *\n * @param {DataEventEmitter.Callback} callback\n * Function to register for an modifier callback.\n *\n * @return {Function}\n * Function to unregister callback from the modifier event.\n */\n on(type, callback) {\n return DataModifier_addEvent(this, type, callback);\n }\n}\n/* *\n *\n * Class Namespace\n *\n * */\n/**\n * Additionally provided types for modifier events and options.\n */\n(function (DataModifier) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n /**\n * Registry as a record object with modifier names and their class\n * constructor.\n */\n DataModifier.types = {};\n /* *\n *\n * Functions\n *\n * */\n /**\n * Adds a modifier class to the registry. The modifier class has to provide\n * the `DataModifier.options` property and the `DataModifier.modifyTable`\n * method to modify the table.\n *\n * @private\n *\n * @param {string} key\n * Registry key of the modifier class.\n *\n * @param {DataModifierType} DataModifierClass\n * Modifier class (aka class constructor) to register.\n *\n * @return {boolean}\n * Returns true, if the registration was successful. False is returned, if\n * their is already a modifier registered with this key.\n */\n function registerType(key, DataModifierClass) {\n return (!!key &&\n !DataModifier.types[key] &&\n !!(DataModifier.types[key] = DataModifierClass));\n }\n DataModifier.registerType = registerType;\n})(DataModifier || (DataModifier = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Modifiers_DataModifier = (DataModifier);\n\n;// ./code/grid/es-modules/Data/ColumnUtils.js\n/* *\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n/**\n * Utility functions for columns that can be either arrays or typed arrays.\n * @private\n */\nvar ColumnUtils;\n(function (ColumnUtils) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * Sets the length of the column array.\n *\n * @param {DataTable.Column} column\n * Column to be modified.\n *\n * @param {number} length\n * New length of the column.\n *\n * @param {boolean} asSubarray\n * If column is a typed array, return a subarray instead of a new array. It\n * is faster `O(1)`, but the entire buffer will be kept in memory until all\n * views of it are destroyed. Default is `false`.\n *\n * @return {DataTable.Column}\n * Modified column.\n *\n * @private\n */\n function setLength(column, length, asSubarray) {\n if (Array.isArray(column)) {\n column.length = length;\n return column;\n }\n return column[asSubarray ? 'subarray' : 'slice'](0, length);\n }\n ColumnUtils.setLength = setLength;\n /**\n * Splices a column array.\n *\n * @param {DataTable.Column} column\n * Column to be modified.\n *\n * @param {number} start\n * Index at which to start changing the array.\n *\n * @param {number} deleteCount\n * An integer indicating the number of old array elements to remove.\n *\n * @param {boolean} removedAsSubarray\n * If column is a typed array, return a subarray instead of a new array. It\n * is faster `O(1)`, but the entire buffer will be kept in memory until all\n * views to it are destroyed. Default is `true`.\n *\n * @param {Array<number>|TypedArray} items\n * The elements to add to the array, beginning at the start index. If you\n * don't specify any elements, `splice()` will only remove elements from the\n * array.\n *\n * @return {SpliceResult}\n * Object containing removed elements and the modified column.\n *\n * @private\n */\n function splice(column, start, deleteCount, removedAsSubarray, items = []) {\n if (Array.isArray(column)) {\n if (!Array.isArray(items)) {\n items = Array.from(items);\n }\n return {\n removed: column.splice(start, deleteCount, ...items),\n array: column\n };\n }\n const Constructor = Object.getPrototypeOf(column)\n .constructor;\n const removed = column[removedAsSubarray ? 'subarray' : 'slice'](start, start + deleteCount);\n const newLength = column.length - deleteCount + items.length;\n const result = new Constructor(newLength);\n result.set(column.subarray(0, start), 0);\n result.set(items, start);\n result.set(column.subarray(start + deleteCount), start + items.length);\n return {\n removed: removed,\n array: result\n };\n }\n ColumnUtils.splice = splice;\n /**\n * Converts a cell value to a number.\n *\n * @param {DataTable.CellType} value\n * Cell value to convert to a number.\n *\n * @param {boolean} useNaN\n * If `true`, returns `NaN` for non-numeric values; if `false`,\n * returns `null` instead.\n *\n * @return {number | null}\n * Number or `null` if the value is not a number.\n *\n * @private\n */\n function convertToNumber(value, useNaN) {\n switch (typeof value) {\n case 'boolean':\n return (value ? 1 : 0);\n case 'number':\n return (isNaN(value) && !useNaN ? null : value);\n default:\n value = parseFloat(`${value ?? ''}`);\n return (isNaN(value) && !useNaN ? null : value);\n }\n }\n ColumnUtils.convertToNumber = convertToNumber;\n})(ColumnUtils || (ColumnUtils = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Data_ColumnUtils = (ColumnUtils);\n\n;// ./code/grid/es-modules/Data/DataTableCore.js\n/* *\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Gøran Slettemark\n * - Torstein Hønsi\n *\n * */\n\n\nconst { setLength, splice } = Data_ColumnUtils;\n\nconst { fireEvent: DataTableCore_fireEvent, objectEach: DataTableCore_objectEach, uniqueKey: DataTableCore_uniqueKey } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Class to manage columns and rows in a table structure. It provides methods\n * to add, remove, and manipulate columns and rows, as well as to retrieve data\n * from specific cells.\n *\n * @class\n * @name Highcharts.DataTable\n *\n * @param {Highcharts.DataTableOptions} [options]\n * Options to initialize the new DataTable instance.\n */\nclass DataTableCore {\n /**\n * Constructs an instance of the DataTable class.\n *\n * @example\n * const dataTable = new Highcharts.DataTableCore({\n * columns: {\n * year: [2020, 2021, 2022, 2023],\n * cost: [11, 13, 12, 14],\n * revenue: [12, 15, 14, 18]\n * }\n * });\n\n *\n * @param {Highcharts.DataTableOptions} [options]\n * Options to initialize the new DataTable instance.\n */\n constructor(options = {}) {\n /**\n * Whether the ID was automatic generated or given in the constructor.\n *\n * @name Highcharts.DataTable#autoId\n * @type {boolean}\n */\n this.autoId = !options.id;\n this.columns = {};\n /**\n * ID of the table for identification purposes.\n *\n * @name Highcharts.DataTable#id\n * @type {string}\n */\n this.id = (options.id || DataTableCore_uniqueKey());\n this.rowCount = 0;\n this.versionTag = DataTableCore_uniqueKey();\n let rowCount = 0;\n DataTableCore_objectEach(options.columns || {}, (column, columnId) => {\n this.columns[columnId] = column.slice();\n rowCount = Math.max(rowCount, column.length);\n });\n this.applyRowCount(rowCount);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Applies a row count to the table by setting the `rowCount` property and\n * adjusting the length of all columns.\n *\n * @private\n * @param {number} rowCount The new row count.\n */\n applyRowCount(rowCount) {\n this.rowCount = rowCount;\n DataTableCore_objectEach(this.columns, (column, columnId) => {\n if (column.length !== rowCount) {\n this.columns[columnId] = setLength(column, rowCount);\n }\n });\n }\n /**\n * Delete rows. Simplified version of the full\n * `DataTable.deleteRows` method.\n *\n * @param {number} rowIndex\n * The start row index\n *\n * @param {number} [rowCount=1]\n * The number of rows to delete\n *\n * @return {void}\n *\n * @emits #afterDeleteRows\n */\n deleteRows(rowIndex, rowCount = 1) {\n if (rowCount > 0 && rowIndex < this.rowCount) {\n let length = 0;\n DataTableCore_objectEach(this.columns, (column, columnId) => {\n this.columns[columnId] =\n splice(column, rowIndex, rowCount).array;\n length = column.length;\n });\n this.rowCount = length;\n }\n DataTableCore_fireEvent(this, 'afterDeleteRows', { rowIndex, rowCount });\n this.versionTag = DataTableCore_uniqueKey();\n }\n /**\n * Fetches the given column by the canonical column name. Simplified version\n * of the full `DataTable.getRow` method, always returning by reference.\n *\n * @param {string} columnId\n * Name of the column to get.\n *\n * @return {Highcharts.DataTableColumn|undefined}\n * A copy of the column, or `undefined` if not found.\n */\n getColumn(columnId, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n asReference) {\n return this.columns[columnId];\n }\n /**\n * Retrieves all or the given columns. Simplified version of the full\n * `DataTable.getColumns` method, always returning by reference.\n *\n * @param {Array<string>} [columnIds]\n * Column ids to retrieve.\n *\n * @return {Highcharts.DataTableColumnCollection}\n * Collection of columns. If a requested column was not found, it is\n * `undefined`.\n */\n getColumns(columnIds, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n asReference) {\n return (columnIds || Object.keys(this.columns)).reduce((columns, columnId) => {\n columns[columnId] = this.columns[columnId];\n return columns;\n }, {});\n }\n /**\n * Retrieves the row at a given index.\n *\n * @param {number} rowIndex\n * Row index to retrieve. First row has index 0.\n *\n * @param {Array<string>} [columnIds]\n * Column names to retrieve.\n *\n * @return {Record<string, number|string|undefined>|undefined}\n * Returns the row values, or `undefined` if not found.\n */\n getRow(rowIndex, columnIds) {\n return (columnIds || Object.keys(this.columns)).map((key) => this.columns[key]?.[rowIndex]);\n }\n /**\n * Sets cell values for a column. Will insert a new column, if not found.\n *\n * @param {string} columnId\n * Column name to set.\n *\n * @param {Highcharts.DataTableColumn} [column]\n * Values to set in the column.\n *\n * @param {number} [rowIndex]\n * Index of the first row to change. (Default: 0)\n *\n * @param {Record<string, (boolean|number|string|null|undefined)>} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #setColumns\n * @emits #afterSetColumns\n */\n setColumn(columnId, column = [], rowIndex = 0, eventDetail) {\n this.setColumns({ [columnId]: column }, rowIndex, eventDetail);\n }\n /**\n * Sets cell values for multiple columns. Will insert new columns, if not\n * found. Simplified version of the full `DataTableCore.setColumns`, limited\n * to full replacement of the columns (undefined `rowIndex`).\n *\n * @param {Highcharts.DataTableColumnCollection} columns\n * Columns as a collection, where the keys are the column names.\n *\n * @param {number} [rowIndex]\n * Index of the first row to change. Ignored in the `DataTableCore`, as it\n * always replaces the full column.\n *\n * @param {Record<string, (boolean|number|string|null|undefined)>} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #setColumns\n * @emits #afterSetColumns\n */\n setColumns(columns, rowIndex, eventDetail) {\n let rowCount = this.rowCount;\n DataTableCore_objectEach(columns, (column, columnId) => {\n this.columns[columnId] = column.slice();\n rowCount = column.length;\n });\n this.applyRowCount(rowCount);\n if (!eventDetail?.silent) {\n DataTableCore_fireEvent(this, 'afterSetColumns');\n this.versionTag = DataTableCore_uniqueKey();\n }\n }\n /**\n * Sets cell values of a row. Will insert a new row if no index was\n * provided, or if the index is higher than the total number of table rows.\n * A simplified version of the full `DateTable.setRow`, limited to objects.\n *\n * @param {Record<string, number|string|undefined>} row\n * Cell values to set.\n *\n * @param {number} [rowIndex]\n * Index of the row to set. Leave `undefined` to add as a new row.\n *\n * @param {boolean} [insert]\n * Whether to insert the row at the given index, or to overwrite the row.\n *\n * @param {Record<string, (boolean|number|string|null|undefined)>} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #afterSetRows\n */\n setRow(row, rowIndex = this.rowCount, insert, eventDetail) {\n const { columns } = this, indexRowCount = insert ? this.rowCount + 1 : rowIndex + 1;\n DataTableCore_objectEach(row, (cellValue, columnId) => {\n let column = columns[columnId] ||\n eventDetail?.addColumns !== false && new Array(indexRowCount);\n if (column) {\n if (insert) {\n column = splice(column, rowIndex, 0, true, [cellValue]).array;\n }\n else {\n column[rowIndex] = cellValue;\n }\n columns[columnId] = column;\n }\n });\n if (indexRowCount > this.rowCount) {\n this.applyRowCount(indexRowCount);\n }\n if (!eventDetail?.silent) {\n DataTableCore_fireEvent(this, 'afterSetRows');\n this.versionTag = DataTableCore_uniqueKey();\n }\n }\n /**\n * Returns the medified (clone) or the original data table if the modified\n * one does not exist.\n *\n * @return {Highcharts.DataTableCore}\n * The medified (clone) or the original data table.\n */\n getModified() {\n return this.modified || this;\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Data_DataTableCore = (DataTableCore);\n/* *\n *\n * API Declarations\n *\n * */\n/**\n * A typed array.\n * @typedef {Int8Array|Uint8Array|Uint8ClampedArray|Int16Array|Uint16Array|Int32Array|Uint32Array|Float32Array|Float64Array} Highcharts.TypedArray\n * //**\n * A column of values in a data table.\n * @typedef {Array<boolean|null|number|string|undefined>|Highcharts.TypedArray} Highcharts.DataTableColumn\n */ /**\n* A collection of data table columns defined by a object where the key is the\n* column name and the value is an array of the column values.\n* @typedef {Record<string, Highcharts.DataTableColumn>} Highcharts.DataTableColumnCollection\n*/\n/**\n * Options for the `DataTable` or `DataTableCore` classes.\n * @interface Highcharts.DataTableOptions\n */ /**\n* The column options for the data table. The columns are defined by an object\n* where the key is the column ID and the value is an array of the column\n* values.\n*\n* @name Highcharts.DataTableOptions.columns\n* @type {Highcharts.DataTableColumnCollection|undefined}\n*/ /**\n* Custom ID to identify the new DataTable instance.\n*\n* @name Highcharts.DataTableOptions.id\n* @type {string|undefined}\n*/\n(''); // Keeps doclets above in JS file\n\n;// ./code/grid/es-modules/Data/DataTable.js\n/* *\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Gøran Slettemark\n * - Jomar Hønsi\n * - Dawid Dragula\n *\n * */\n\n\n\nconst { splice: DataTable_splice, setLength: DataTable_setLength } = Data_ColumnUtils;\n\nconst { addEvent: DataTable_addEvent, defined: DataTable_defined, extend: DataTable_extend, fireEvent: DataTable_fireEvent, isNumber: DataTable_isNumber, uniqueKey: DataTable_uniqueKey } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Class to manage columns and rows in a table structure. It provides methods\n * to add, remove, and manipulate columns and rows, as well as to retrieve data\n * from specific cells.\n *\n * @class\n * @name Highcharts.DataTable\n *\n * @param {Highcharts.DataTableOptions} [options]\n * Options to initialize the new DataTable instance.\n */\nclass DataTable extends Data_DataTableCore {\n /* *\n *\n * Constructor\n *\n * */\n constructor(options = {}) {\n super(options);\n this.metadata = options.metadata;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Returns a clone of this table. The cloned table is completely independent\n * of the original, and any changes made to the clone will not affect\n * the original table.\n *\n * @function Highcharts.DataTable#clone\n *\n * @param {boolean} [skipColumns]\n * Whether to clone columns or not.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTable}\n * Clone of this data table.\n *\n * @emits #cloneTable\n * @emits #afterCloneTable\n */\n clone(skipColumns, eventDetail) {\n const table = this, tableOptions = {};\n table.emit({ type: 'cloneTable', detail: eventDetail });\n if (!skipColumns) {\n tableOptions.columns = table.columns;\n }\n if (!table.autoId) {\n tableOptions.id = table.id;\n }\n const tableClone = new DataTable(tableOptions);\n if (!skipColumns) {\n tableClone.versionTag = table.versionTag;\n tableClone.originalRowIndexes = table.originalRowIndexes;\n tableClone.localRowIndexes = table.localRowIndexes;\n }\n table.emit({\n type: 'afterCloneTable',\n detail: eventDetail,\n tableClone\n });\n return tableClone;\n }\n /**\n * Deletes columns from the table.\n *\n * @function Highcharts.DataTable#deleteColumns\n *\n * @param {Array<string>} [columnIds]\n * Names of columns to delete. If no array is provided, all\n * columns will be deleted.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Highcharts.DataTableColumnCollection|undefined}\n * Returns the deleted columns, if found.\n *\n * @emits #deleteColumns\n * @emits #afterDeleteColumns\n */\n deleteColumns(columnIds, eventDetail) {\n const table = this, columns = table.columns, deletedColumns = {}, modifiedColumns = {}, modifier = table.modifier, rowCount = table.rowCount;\n columnIds = (columnIds || Object.keys(columns));\n if (columnIds.length) {\n table.emit({\n type: 'deleteColumns',\n columnIds,\n detail: eventDetail\n });\n for (let i = 0, iEnd = columnIds.length, column, columnId; i < iEnd; ++i) {\n columnId = columnIds[i];\n column = columns[columnId];\n if (column) {\n deletedColumns[columnId] = column;\n modifiedColumns[columnId] = new Array(rowCount);\n }\n delete columns[columnId];\n }\n if (!Object.keys(columns).length) {\n table.rowCount = 0;\n this.deleteRowIndexReferences();\n }\n if (modifier) {\n modifier.modifyTable(table);\n }\n table.emit({\n type: 'afterDeleteColumns',\n columns: deletedColumns,\n columnIds,\n detail: eventDetail\n });\n return deletedColumns;\n }\n }\n /**\n * Deletes the row index references. This is useful when the original table\n * is deleted, and the references are no longer needed. This table is\n * then considered an original table or a table that has the same rows\n * order as the original table.\n */\n deleteRowIndexReferences() {\n delete this.originalRowIndexes;\n delete this.localRowIndexes;\n }\n /**\n * Deletes rows in this table.\n *\n * @function Highcharts.DataTable#deleteRows\n *\n * @param {number} [rowIndex]\n * Index to start delete of rows. If not specified, all rows will be\n * deleted.\n *\n * @param {number} [rowCount=1]\n * Number of rows to delete.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Array<Highcharts.DataTableRow>}\n * Returns the deleted rows, if found.\n *\n * @emits #deleteRows\n * @emits #afterDeleteRows\n */\n deleteRows(rowIndex, rowCount = 1, eventDetail) {\n const table = this, deletedRows = [], modifiedRows = [], modifier = table.modifier;\n table.emit({\n type: 'deleteRows',\n detail: eventDetail,\n rowCount,\n rowIndex: (rowIndex || 0)\n });\n if (typeof rowIndex === 'undefined') {\n rowIndex = 0;\n rowCount = table.rowCount;\n }\n if (rowCount > 0 && rowIndex < table.rowCount) {\n const columns = table.columns, columnIds = Object.keys(columns);\n for (let i = 0, iEnd = columnIds.length, column, deletedCells, columnId; i < iEnd; ++i) {\n columnId = columnIds[i];\n column = columns[columnId];\n const result = DataTable_splice(column, rowIndex, rowCount);\n deletedCells = result.removed;\n columns[columnId] = column = result.array;\n if (!i) {\n table.rowCount = column.length;\n }\n for (let j = 0, jEnd = deletedCells.length; j < jEnd; ++j) {\n deletedRows[j] = (deletedRows[j] || []);\n deletedRows[j][i] = deletedCells[j];\n }\n modifiedRows.push(new Array(iEnd));\n }\n }\n if (modifier) {\n modifier.modifyTable(table);\n }\n table.emit({\n type: 'afterDeleteRows',\n detail: eventDetail,\n rowCount,\n rowIndex: (rowIndex || 0),\n rows: deletedRows\n });\n return deletedRows;\n }\n /**\n * Emits an event on this table to all registered callbacks of the given\n * event.\n * @private\n *\n * @param {DataTable.Event} e\n * Event object with event information.\n */\n emit(e) {\n if ([\n 'afterDeleteColumns',\n 'afterDeleteRows',\n 'afterSetCell',\n 'afterSetColumns',\n 'afterSetRows'\n ].includes(e.type)) {\n this.versionTag = DataTable_uniqueKey();\n }\n DataTable_fireEvent(this, e.type, e);\n }\n /**\n * Fetches a single cell value.\n *\n * @function Highcharts.DataTable#getCell\n *\n * @param {string} columnId\n * Column name of the cell to retrieve.\n *\n * @param {number} rowIndex\n * Row index of the cell to retrieve.\n *\n * @return {Highcharts.DataTableCellType|undefined}\n * Returns the cell value or `undefined`.\n */\n getCell(columnId, rowIndex) {\n const table = this;\n const column = table.columns[columnId];\n if (column) {\n return column[rowIndex];\n }\n }\n /**\n * Fetches the given column by the canonical column name.\n * This function is a simplified wrap of {@link getColumns}.\n *\n * @function Highcharts.DataTable#getColumn\n *\n * @param {string} columnId\n * Name of the column to get.\n *\n * @param {boolean} [asReference]\n * Whether to return the column as a readonly reference.\n *\n * @return {Highcharts.DataTableColumn|undefined}\n * A copy of the column, or `undefined` if not found.\n */\n getColumn(columnId, asReference) {\n return this.getColumns([columnId], asReference)[columnId];\n }\n /**\n * Fetches all column IDs.\n *\n * @function Highcharts.DataTable#getColumnIds\n *\n * @return {Array<string>}\n * Returns all column IDs.\n */\n getColumnIds() {\n return Object.keys(this.columns);\n }\n /**\n * Retrieves all or the given columns.\n *\n * @function Highcharts.DataTable#getColumns\n *\n * @param {Array<string>} [columnIds]\n * Column names to retrieve.\n *\n * @param {boolean} [asReference]\n * Whether to return columns as a readonly reference.\n *\n * @param {boolean} [asBasicColumns]\n * Whether to transform all typed array columns to normal arrays.\n *\n * @return {Highcharts.DataTableColumnCollection}\n * Collection of columns. If a requested column was not found, it is\n * `undefined`.\n */\n getColumns(columnIds, asReference, asBasicColumns) {\n const table = this, tableColumns = table.columns, columns = {};\n columnIds = (columnIds || Object.keys(tableColumns));\n for (let i = 0, iEnd = columnIds.length, column, columnId; i < iEnd; ++i) {\n columnId = columnIds[i];\n column = tableColumns[columnId];\n if (column) {\n if (asReference) {\n columns[columnId] = column;\n }\n else if (asBasicColumns && !Array.isArray(column)) {\n columns[columnId] = Array.from(column);\n }\n else {\n columns[columnId] = column.slice();\n }\n }\n }\n return columns;\n }\n /**\n * Takes the original row index and returns the local row index in the\n * modified table for which this function is called.\n *\n * @param {number} originalRowIndex\n * Original row index to get the local row index for.\n *\n * @return {number|undefined}\n * Returns the local row index or `undefined` if not found.\n */\n getLocalRowIndex(originalRowIndex) {\n const { localRowIndexes } = this;\n if (localRowIndexes) {\n return localRowIndexes[originalRowIndex];\n }\n return originalRowIndex;\n }\n /**\n * Returns the modifier associated with this table, if any.\n *\n * @return {Highcharts.DataModifier|undefined}\n * Returns the modifier or `undefined`.\n *\n * @private\n */\n getModifier() {\n return this.modifier;\n }\n /**\n * Takes the local row index and returns the index of the corresponding row\n * in the original table.\n *\n * @param {number} rowIndex\n * Local row index to get the original row index for.\n *\n * @return {number|undefined}\n * Returns the original row index or `undefined` if not found.\n */\n getOriginalRowIndex(rowIndex) {\n const { originalRowIndexes } = this;\n if (originalRowIndexes) {\n return originalRowIndexes[rowIndex];\n }\n return rowIndex;\n }\n /**\n * Retrieves the row at a given index. This function is a simplified wrap of\n * {@link getRows}.\n *\n * @function Highcharts.DataTable#getRow\n *\n * @param {number} rowIndex\n * Row index to retrieve. First row has index 0.\n *\n * @param {Array<string>} [columnIds]\n * Column names in order to retrieve.\n *\n * @return {Highcharts.DataTableRow}\n * Returns the row values, or `undefined` if not found.\n */\n getRow(rowIndex, columnIds) {\n return this.getRows(rowIndex, 1, columnIds)[0];\n }\n /**\n * Returns the number of rows in this table.\n *\n * @function Highcharts.DataTable#getRowCount\n *\n * @return {number}\n * Number of rows in this table.\n */\n getRowCount() {\n // @todo Implement via property getter `.length` browsers supported\n return this.rowCount;\n }\n /**\n * Retrieves the index of the first row matching a specific cell value.\n *\n * @function Highcharts.DataTable#getRowIndexBy\n *\n * @param {string} columnId\n * Column to search in.\n *\n * @param {Highcharts.DataTableCellType} cellValue\n * Cell value to search for. `NaN` and `undefined` are not supported.\n *\n * @param {number} [rowIndexOffset]\n * Index offset to start searching.\n *\n * @return {number|undefined}\n * Index of the first row matching the cell value.\n */\n getRowIndexBy(columnId, cellValue, rowIndexOffset) {\n const table = this;\n const column = table.columns[columnId];\n if (column) {\n let rowIndex = -1;\n if (Array.isArray(column)) {\n // Normal array\n rowIndex = column.indexOf(cellValue, rowIndexOffset);\n }\n else if (DataTable_isNumber(cellValue)) {\n // Typed array\n rowIndex = column.indexOf(cellValue, rowIndexOffset);\n }\n if (rowIndex !== -1) {\n return rowIndex;\n }\n }\n }\n /**\n * Retrieves the row at a given index. This function is a simplified wrap of\n * {@link getRowObjects}.\n *\n * @function Highcharts.DataTable#getRowObject\n *\n * @param {number} rowIndex\n * Row index.\n *\n * @param {Array<string>} [columnIds]\n * Column names and their order to retrieve.\n *\n * @return {Highcharts.DataTableRowObject}\n * Returns the row values, or `undefined` if not found.\n */\n getRowObject(rowIndex, columnIds) {\n return this.getRowObjects(rowIndex, 1, columnIds)[0];\n }\n /**\n * Fetches all or a number of rows as an object.\n *\n * @function Highcharts.DataTable#getRowObjects\n *\n * @param {number} [rowIndex]\n * Index of the first row to fetch. Defaults to first row at index `0`.\n *\n * @param {number} [rowCount]\n * Number of rows to fetch. Defaults to maximal number of rows.\n *\n * @param {Array<string>} [columnIds]\n * Column names and their order to retrieve.\n *\n * @return {Highcharts.DataTableRowObject}\n * Returns retrieved rows.\n */\n getRowObjects(rowIndex = 0, rowCount = (this.rowCount - rowIndex), columnIds) {\n const table = this, columns = table.columns, rows = new Array(rowCount);\n columnIds = (columnIds || Object.keys(columns));\n for (let i = rowIndex, i2 = 0, iEnd = Math.min(table.rowCount, (rowIndex + rowCount)), column, row; i < iEnd; ++i, ++i2) {\n row = rows[i2] = {};\n for (const columnId of columnIds) {\n column = columns[columnId];\n row[columnId] = (column ? column[i] : void 0);\n }\n }\n return rows;\n }\n /**\n * Fetches all or a number of rows as an array.\n *\n * @function Highcharts.DataTable#getRows\n *\n * @param {number} [rowIndex]\n * Index of the first row to fetch. Defaults to first row at index `0`.\n *\n * @param {number} [rowCount]\n * Number of rows to fetch. Defaults to maximal number of rows.\n *\n * @param {Array<string>} [columnIds]\n * Column names and their order to retrieve.\n *\n * @return {Highcharts.DataTableRow}\n * Returns retrieved rows.\n */\n getRows(rowIndex = 0, rowCount = (this.rowCount - rowIndex), columnIds) {\n const table = this, columns = table.columns, rows = new Array(rowCount);\n columnIds = (columnIds || Object.keys(columns));\n for (let i = rowIndex, i2 = 0, iEnd = Math.min(table.rowCount, (rowIndex + rowCount)), column, row; i < iEnd; ++i, ++i2) {\n row = rows[i2] = [];\n for (const columnId of columnIds) {\n column = columns[columnId];\n row.push(column ? column[i] : void 0);\n }\n }\n return rows;\n }\n /**\n * Returns the unique version tag of the current state of the table.\n *\n * @function Highcharts.DataTable#getVersionTag\n *\n * @return {string}\n * Unique version tag.\n */\n getVersionTag() {\n return this.versionTag;\n }\n /**\n * Determines whether all specified column names exist in the table.\n *\n * @function Highcharts.DataTable#hasColumns\n *\n * @param {Array<string>} columnIds\n * Column names to check.\n *\n * @return {boolean}\n * Returns `true` if all columns have been found, otherwise `false`.\n */\n hasColumns(columnIds) {\n const table = this, columns = table.columns;\n for (let i = 0, iEnd = columnIds.length, columnId; i < iEnd; ++i) {\n columnId = columnIds[i];\n if (!columns[columnId]) {\n return false;\n }\n }\n return true;\n }\n /**\n * Checks if any row in the specified column contains the given cell value.\n *\n * @function Highcharts.DataTable#hasRowWith\n *\n * @param {string} columnId\n * Column to search in.\n *\n * @param {Highcharts.DataTableCellType} cellValue\n * Cell value to search for. `NaN` and `undefined` are not supported.\n *\n * @return {boolean}\n * True, if a row has been found, otherwise false.\n */\n hasRowWith(columnId, cellValue) {\n const table = this;\n const column = table.columns[columnId];\n // Normal array\n if (Array.isArray(column)) {\n return (column.indexOf(cellValue) !== -1);\n }\n // Typed array\n if (DataTable_defined(cellValue) && Number.isFinite(cellValue)) {\n return (column.indexOf(+cellValue) !== -1);\n }\n return false;\n }\n /**\n * Registers a callback function to be executed when a specific event is\n * emitted. To stop listening to the event, call the function returned by\n * this method.\n *\n * @function Highcharts.DataTable#on\n *\n * @param {string} type\n * Event type as a string.\n *\n * @param {Highcharts.EventCallbackFunction<Highcharts.DataTable>} callback\n * Function to register for an event callback.\n *\n * @return {Function}\n * Function to unregister callback from the event.\n */\n on(type, callback) {\n return DataTable_addEvent(this, type, callback);\n }\n /**\n * Changes the ID of an existing column to a new ID, effectively renaming\n * the column.\n *\n * @function Highcharts.DataTable#changeColumnId\n *\n * @param {string} columnId\n * Id of the column to be changed.\n *\n * @param {string} newColumnId\n * New id of the column.\n *\n * @return {boolean}\n * Returns `true` if successful, `false` if the column was not found.\n */\n changeColumnId(columnId, newColumnId) {\n const table = this, columns = table.columns;\n if (columns[columnId]) {\n if (columnId !== newColumnId) {\n columns[newColumnId] = columns[columnId];\n delete columns[columnId];\n }\n return true;\n }\n return false;\n }\n /**\n * Sets the value of a specific cell identified by column ID and row index.\n * If the column does not exist, it will be created. If the row index is\n * beyond the current row count, the table will be expanded to accommodate\n * the new cell.\n *\n * @function Highcharts.DataTable#setCell\n *\n * @param {string} columnId\n * Column name to set.\n *\n * @param {number|undefined} rowIndex\n * Row index to set.\n *\n * @param {Highcharts.DataTableCellType} cellValue\n * Cell value to set.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #setCell\n * @emits #afterSetCell\n */\n setCell(columnId, rowIndex, cellValue, eventDetail) {\n const table = this, columns = table.columns, modifier = table.modifier;\n let column = columns[columnId];\n if (column && column[rowIndex] === cellValue) {\n return;\n }\n table.emit({\n type: 'setCell',\n cellValue,\n columnId: columnId,\n detail: eventDetail,\n rowIndex\n });\n if (!column) {\n column = columns[columnId] = new Array(table.rowCount);\n }\n if (rowIndex >= table.rowCount) {\n table.rowCount = (rowIndex + 1);\n }\n column[rowIndex] = cellValue;\n if (modifier) {\n modifier.modifyTable(table);\n }\n table.emit({\n type: 'afterSetCell',\n cellValue,\n columnId: columnId,\n detail: eventDetail,\n rowIndex\n });\n }\n /**\n * Replaces or updates multiple columns in the table with new data. If a\n * column does not exist, it will be created and added to the table.\n *\n * @function Highcharts.DataTable#setColumns\n *\n * @param {Highcharts.DataTableColumnCollection} columns\n * Columns as a collection, where the keys are the column names.\n *\n * @param {number} [rowIndex]\n * Index of the first row to change. Keep undefined to reset.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @param {boolean} [typeAsOriginal=false]\n * Determines whether the original column retains its type when data\n * replaced. If `true`, the original column keeps its type. If not\n * (default), the original column will adopt the type of the replacement\n * column.\n *\n * @emits #setColumns\n * @emits #afterSetColumns\n */\n setColumns(columns, rowIndex, eventDetail, typeAsOriginal) {\n const table = this, tableColumns = table.columns, tableModifier = table.modifier, columnIds = Object.keys(columns);\n let rowCount = table.rowCount;\n table.emit({\n type: 'setColumns',\n columns,\n columnIds,\n detail: eventDetail,\n rowIndex\n });\n if (!DataTable_defined(rowIndex) && !typeAsOriginal) {\n super.setColumns(columns, rowIndex, DataTable_extend(eventDetail, { silent: true }));\n }\n else {\n for (let i = 0, iEnd = columnIds.length, column, tableColumn, columnId, ArrayConstructor; i < iEnd; ++i) {\n columnId = columnIds[i];\n column = columns[columnId];\n tableColumn = tableColumns[columnId];\n ArrayConstructor = Object.getPrototypeOf((tableColumn && typeAsOriginal) ? tableColumn : column).constructor;\n if (!tableColumn) {\n tableColumn = new ArrayConstructor(rowCount);\n }\n else if (ArrayConstructor === Array) {\n if (!Array.isArray(tableColumn)) {\n tableColumn = Array.from(tableColumn);\n }\n }\n else if (tableColumn.length < rowCount) {\n tableColumn =\n new ArrayConstructor(rowCount);\n tableColumn.set(tableColumns[columnId]);\n }\n tableColumns[columnId] = tableColumn;\n for (let i = (rowIndex || 0), iEnd = column.length; i < iEnd; ++i) {\n tableColumn[i] = column[i];\n }\n rowCount = Math.max(rowCount, column.length);\n }\n this.applyRowCount(rowCount);\n }\n if (tableModifier) {\n tableModifier.modifyTable(table);\n }\n table.emit({\n type: 'afterSetColumns',\n columns,\n columnIds,\n detail: eventDetail,\n rowIndex\n });\n }\n /**\n * Assigns a new data modifier to the table.\n *\n * This method does not modify the table directly. Instead, it sets the\n * `.modified` property of the table with a modified copy of this table,\n * as produced by the modifier.\n *\n * @param {Highcharts.DataModifier} [modifier]\n * Modifier to set, or `undefined` to unset.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Promise<Highcharts.DataTable>}\n * Resolves to this table if successful, or rejects on failure.\n *\n * @emits #setModifier\n * @emits #afterSetModifier\n */\n setModifier(modifier, eventDetail) {\n const table = this;\n let promise;\n table.emit({\n type: 'setModifier',\n detail: eventDetail,\n modifier,\n modified: table.getModified()\n });\n table.modifier = modifier;\n if (modifier) {\n promise = modifier.modify(table);\n }\n else {\n promise = Promise.resolve(table);\n }\n return promise\n .then((table) => {\n table.emit({\n type: 'afterSetModifier',\n detail: eventDetail,\n modifier,\n modified: table.getModified()\n });\n return table;\n })['catch']((error) => {\n table.emit({\n type: 'setModifierError',\n error,\n modifier,\n modified: table.getModified()\n });\n throw error;\n });\n }\n /**\n * Sets the original row indexes for the table. It is used to keep the\n * reference to the original rows when modifying the table.\n *\n * @param {Array<number|undefined>} originalRowIndexes\n * Original row indexes array.\n *\n * @param {boolean} omitLocalRowIndexes\n * Whether to omit the local row indexes calculation. Defaults to `false`.\n */\n setOriginalRowIndexes(originalRowIndexes, omitLocalRowIndexes = false) {\n this.originalRowIndexes = originalRowIndexes;\n if (omitLocalRowIndexes) {\n return;\n }\n const modifiedIndexes = this.localRowIndexes = [];\n for (let i = 0, iEnd = originalRowIndexes.length, originalIndex; i < iEnd; ++i) {\n originalIndex = originalRowIndexes[i];\n if (DataTable_defined(originalIndex)) {\n modifiedIndexes[originalIndex] = i;\n }\n }\n }\n /**\n * Sets cell values of a row. Will insert a new row, if no index was\n * provided, or if the index is higher than the total number of table rows.\n *\n * Note: This function is just a simplified wrap of\n * {@link Highcharts.DataTable#setRows}.\n *\n * @function Highcharts.DataTable#setRow\n *\n * @param {Highcharts.DataTableRow|Highcharts.DataTableRowObject} row\n * Cell values to set.\n *\n * @param {number} [rowIndex]\n * Index of the row to set. Leave `undefind` to add as a new row.\n *\n * @param {boolean} [insert]\n * Whether to insert the row at the given index, or to overwrite the row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #setRows\n * @emits #afterSetRows\n */\n setRow(row, rowIndex, insert, eventDetail) {\n this.setRows([row], rowIndex, insert, eventDetail);\n }\n /**\n * Sets cell values for multiple rows. Will insert new rows, if no index was\n * was provided, or if the index is higher than the total number of table\n * rows.\n *\n * @function Highcharts.DataTable#setRows\n *\n * @param {Array<(Highcharts.DataTableRow|Highcharts.DataTableRowObject)>} rows\n * Row values to set.\n *\n * @param {number} [rowIndex]\n * Index of the first row to set. Leave `undefined` to add as new rows.\n *\n * @param {boolean} [insert]\n * Whether to insert the row at the given index, or to overwrite the row.\n *\n * @param {Highcharts.DataTableEventDetail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits #setRows\n * @emits #afterSetRows\n */\n setRows(rows, rowIndex = this.rowCount, insert, eventDetail) {\n const table = this, columns = table.columns, columnIds = Object.keys(columns), modifier = table.modifier, rowCount = rows.length;\n table.emit({\n type: 'setRows',\n detail: eventDetail,\n rowCount,\n rowIndex,\n rows\n });\n for (let i = 0, i2 = rowIndex, row; i < rowCount; ++i, ++i2) {\n row = rows[i];\n if (Object.keys(row).length === 0) { // Is empty Object\n for (let j = 0, jEnd = columnIds.length; j < jEnd; ++j) {\n const column = columns[columnIds[j]];\n if (insert) {\n columns[columnIds[j]] = DataTable_splice(column, i2, 0, true, [null]).array;\n }\n else {\n column[i2] = null;\n }\n }\n }\n else if (Array.isArray(row)) {\n for (let j = 0, jEnd = columnIds.length; j < jEnd; ++j) {\n columns[columnIds[j]][i2] = row[j];\n }\n }\n else {\n super.setRow(row, i2, void 0, { silent: true });\n }\n }\n const indexRowCount = insert ?\n rowCount + rows.length :\n rowIndex + rowCount;\n if (indexRowCount > table.rowCount) {\n table.rowCount = indexRowCount;\n for (let i = 0, iEnd = columnIds.length; i < iEnd; ++i) {\n const columnId = columnIds[i];\n columns[columnId] = DataTable_setLength(columns[columnId], indexRowCount);\n }\n }\n if (modifier) {\n modifier.modifyTable(table);\n }\n table.emit({\n type: 'afterSetRows',\n detail: eventDetail,\n rowCount,\n rowIndex,\n rows\n });\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Data_DataTable = (DataTable);\n\n;// ./code/grid/es-modules/Data/Connectors/DataConnector.js\n/* *\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Wojciech Chmiel\n * - Gøran Slettemark\n * - Dawid Dragula\n * - Kamil Kubik\n *\n * */\n\n\n\n\nconst { addEvent: DataConnector_addEvent, fireEvent: DataConnector_fireEvent, merge: DataConnector_merge, pick: DataConnector_pick } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Abstract class providing an interface for managing a DataConnector.\n */\nclass DataConnector {\n /**\n * Whether the connector is currently polling for new data.\n */\n get polling() {\n return !!this._polling;\n }\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructor for the connector class.\n *\n * @param {DataConnectorOptions} [options]\n * Options to use in the connector.\n */\n constructor(options) {\n /**\n * Tables managed by this DataConnector instance.\n */\n this.dataTables = {};\n /**\n * Helper flag for detecting whether the data connector is loaded.\n * @internal\n */\n this.loaded = false;\n this.metadata = options.metadata || { columns: {} };\n this.options = options;\n // Create a data table for each defined in the dataTables user options.\n const dataTables = options?.dataTables;\n let dataTableIndex = 0;\n if (options.options) {\n // eslint-disable-next-line no-console\n console.error('The `DataConnectorOptions.options` property was removed in Dashboards v4.0.0. Check how to upgrade your connector to use the new options structure here: https://api.highcharts.com/dashboards/#interfaces/Data_DataTableOptions.DataTableOptions-1');\n }\n if (dataTables && dataTables?.length > 0) {\n for (let i = 0, iEnd = dataTables.length; i < iEnd; ++i) {\n const dataTable = dataTables[i];\n const key = dataTable?.key;\n this.dataTables[key ?? dataTableIndex] =\n new Data_DataTable(dataTable);\n if (!key) {\n dataTableIndex++;\n }\n }\n // If user options dataTables is not defined, generate a default table.\n }\n else {\n this.dataTables[0] = new Data_DataTable({\n id: options.id // Required by DataTableCore\n });\n }\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Returns a single data table instance based on the provided key.\n * Otherwise, returns the first data table.\n *\n * @param {string} [key]\n * The data table key.\n *\n * @return {DataTable}\n * The data table instance.\n */\n getTable(key) {\n if (key) {\n return this.dataTables[key];\n }\n return Object.values(this.dataTables)[0];\n }\n /**\n * Method for adding metadata for a single column.\n *\n * @param {string} name\n * The name of the column to be described.\n *\n * @param {DataConnector.MetaColumn} columnMeta\n * The metadata to apply to the column.\n */\n describeColumn(name, columnMeta) {\n const connector = this;\n const columns = connector.metadata.columns;\n columns[name] = DataConnector_merge(columns[name] || {}, columnMeta);\n }\n /**\n * Method for applying columns meta information to the whole DataConnector.\n *\n * @param {Highcharts.Dictionary<DataConnector.MetaColumn>} columns\n * Pairs of column names and MetaColumn objects.\n */\n describeColumns(columns) {\n const connector = this;\n const columnIds = Object.keys(columns);\n let columnId;\n while (typeof (columnId = columnIds.pop()) === 'string') {\n connector.describeColumn(columnId, columns[columnId]);\n }\n }\n /**\n * Returns the order of columns.\n *\n * @return {string[] | undefined}\n * Order of columns.\n */\n getColumnOrder() {\n const connector = this, columns = connector.metadata.columns, names = Object.keys(columns || {});\n if (names.length) {\n return names.sort((a, b) => (DataConnector_pick(columns[a].index, 0) - DataConnector_pick(columns[b].index, 0)));\n }\n }\n /**\n * Retrieves the columns of the dataTable,\n * applies column order from meta.\n *\n * @return {Highcharts.DataTableColumnCollection}\n * An object with the properties `columnIds` and `columnValues`\n */\n getSortedColumns() {\n return this.getTable().getColumns(this.getColumnOrder());\n }\n /**\n * Sets the index and order of columns.\n *\n * @param {Array<string>} columnIds\n * Order of columns.\n */\n setColumnOrder(columnIds) {\n const connector = this;\n for (let i = 0, iEnd = columnIds.length; i < iEnd; ++i) {\n connector.describeColumn(columnIds[i], { index: i });\n }\n }\n /**\n * The default load method, which fires the `afterLoad` event\n *\n * @return {Promise<DataConnector>}\n * The loaded connector.\n *\n * @emits DataConnector#afterLoad\n */\n load() {\n this.emit({ type: 'afterLoad' });\n return Promise.resolve(this);\n }\n /**\n * Applies the data modifiers to the data tables according to the\n * connector data tables options.\n */\n async applyTableModifiers() {\n const tableOptionsArray = this.options?.dataTables;\n for (const [key, table] of Object.entries(this.dataTables)) {\n // Take data modifier options from the corresponsing data table\n // options, otherwise take the data modifier options from the\n // connector options.\n const dataModifierOptions = tableOptionsArray?.find((dataTable) => dataTable.key === key)?.dataModifier ?? this.options?.dataModifier;\n const ModifierClass = (dataModifierOptions &&\n Modifiers_DataModifier.types[dataModifierOptions.type]);\n await table.setModifier(ModifierClass ?\n new ModifierClass(dataModifierOptions) :\n void 0);\n }\n return this;\n }\n /**\n * Starts polling new data after the specific time span in milliseconds.\n *\n * @param {number} refreshTime\n * Refresh time in milliseconds between polls.\n */\n startPolling(refreshTime = 1000) {\n const connector = this;\n // Assign a new abort controller.\n this.pollingController = new AbortController();\n // Clear the polling timeout.\n window.clearTimeout(connector._polling);\n connector._polling = window.setTimeout(() => connector\n .load()['catch']((error) => connector.emit({\n type: 'loadError',\n error\n }))\n .then(() => {\n if (connector._polling) {\n connector.startPolling(refreshTime);\n }\n }), refreshTime);\n }\n /**\n * Stops polling data. Shouldn't be performed if polling is already stopped.\n */\n stopPolling() {\n const connector = this;\n if (!connector.polling) {\n return;\n }\n // Abort the existing request.\n connector?.pollingController?.abort();\n // Clear the polling timeout.\n window.clearTimeout(connector._polling);\n delete connector._polling;\n }\n /**\n * Emits an event on the connector to all registered callbacks of this\n * event.\n *\n * @param {DataConnector.Event} e\n * Event object containing additional event information.\n */\n emit(e) {\n DataConnector_fireEvent(this, e.type, e);\n }\n /**\n * Registers a callback for a specific connector event.\n *\n * @param type\n * Event type.\n *\n * @param callback\n * Function to register for the connector callback.\n *\n * @return {Function}\n * Function to unregister callback from the connector event.\n */\n on(type, callback) {\n return DataConnector_addEvent(this, type, callback);\n }\n /**\n * Iterates over the dataTables and initiates the corresponding converters.\n * Updates the dataTables and assigns the first converter.\n *\n * @param {T}[data]\n * Data specific to the corresponding converter.\n *\n * @param {DataConnector.CreateConverterFunction}[createConverter]\n * Creates a specific converter combining the dataTable options.\n *\n * @param {DataConnector.ParseDataFunction<T>}[parseData]\n * Runs the converter parse method with the specific data type.\n */\n initConverters(data, createConverter, parseData) {\n let index = 0;\n for (const [key, table] of Object.entries(this.dataTables)) {\n // Create a proper converter and parse its data.\n const converter = createConverter(key);\n const columns = parseData(converter, data);\n // Update the dataTable.\n table.deleteColumns();\n table.setColumns(columns);\n // Assign the first converter.\n if (index === 0) {\n this.converter = converter;\n }\n index++;\n }\n }\n}\n/* *\n *\n * Class Namespace\n *\n * */\n(function (DataConnector) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n /**\n * Registry as a record object with connector names and their class.\n */\n DataConnector.types = {};\n /* *\n *\n * Functions\n *\n * */\n /**\n * Adds a connector class to the registry. The connector has to provide the\n * `DataConnector.options` property and the `DataConnector.load` method to\n * modify the table.\n *\n * @private\n *\n * @param {string} key\n * Registry key of the connector class.\n *\n * @param {DataConnectorType} DataConnectorClass\n * Connector class (aka class constructor) to register.\n *\n * @return {boolean}\n * Returns true, if the registration was successful. False is returned, if\n * their is already a connector registered with this key.\n */\n function registerType(key, DataConnectorClass) {\n return (!!key &&\n !DataConnector.types[key] &&\n !!(DataConnector.types[key] = DataConnectorClass));\n }\n DataConnector.registerType = registerType;\n})(DataConnector || (DataConnector = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Connectors_DataConnector = (DataConnector);\n\n;// ./code/grid/es-modules/Data/Converters/DataConverterUtils.js\n/* *\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Kamil Kubik\n *\n * */\n\nconst { isNumber: DataConverterUtils_isNumber } = Core_Utilities;\n/* *\n *\n * Namespace\n *\n * */\nvar DataConverterUtils;\n(function (DataConverterUtils) {\n /* *\n *\n * Properties\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * Converts a value to a Date.\n *\n * @param {DataConverter.Type} value\n * Value to convert.\n *\n * @return {globalThis.Date}\n * Converted value as a Date.\n */\n function asDate(value, converter) {\n let timestamp;\n if (typeof value === 'string') {\n timestamp = converter.parseDate(value);\n }\n else if (typeof value === 'number') {\n timestamp = value;\n }\n else if (value instanceof Date) {\n return value;\n }\n else {\n timestamp = converter.parseDate(asString(value));\n }\n return new Date(timestamp);\n }\n DataConverterUtils.asDate = asDate;\n /**\n * Converts a value to a number.\n *\n * @param {DataConverter.Type} value\n * Value to convert.\n *\n * @return {number}\n * Converted value as a number.\n */\n function asNumber(value, decimalRegExp) {\n if (typeof value === 'number') {\n return value;\n }\n if (typeof value === 'boolean') {\n return value ? 1 : 0;\n }\n if (typeof value === 'string') {\n const decimalRegex = decimalRegExp;\n if (value.indexOf(' ') > -1) {\n value = value.replace(/\\s+/g, '');\n }\n if (decimalRegex) {\n if (!decimalRegex.test(value)) {\n return NaN;\n }\n value = value.replace(decimalRegex, '$1.$2');\n }\n return parseFloat(value);\n }\n if (value instanceof Date) {\n return value.getDate();\n }\n if (value) {\n return value.getRowCount();\n }\n return NaN;\n }\n DataConverterUtils.asNumber = asNumber;\n /**\n * Converts a value to a string.\n *\n * @param {DataConverter.Type} value\n * Value to convert.\n *\n * @return {string}\n * Converted value as a string.\n */\n function asString(value) {\n return '' + value;\n }\n DataConverterUtils.asString = asString;\n /**\n * Converts a value to a boolean.\n *\n * @param {DataConverter.Type} value\n * Value to convert.\n *\n * @return {boolean}\n * Converted value as a boolean.\n */\n function asBoolean(value) {\n if (typeof value === 'boolean') {\n return value;\n }\n if (typeof value === 'string') {\n return value !== '' && value !== '0' && value !== 'false';\n }\n return !!asNumber(value);\n }\n DataConverterUtils.asBoolean = asBoolean;\n /**\n * Guesses the potential type of a string value for parsing CSV etc.\n *\n * @param {*} value\n * The value to examine.\n *\n * @return {'number' | 'string' | 'Date'}\n * Type string, either `string`, `Date`, or `number`.\n */\n function guessType(value, converter) {\n let result = 'string';\n if (typeof value === 'string') {\n const trimedValue = DataConverterUtils.trim(`${value}`), decimalRegExp = converter.decimalRegExp;\n let innerTrimedValue = DataConverterUtils.trim(trimedValue, true);\n if (decimalRegExp) {\n innerTrimedValue = (decimalRegExp.test(innerTrimedValue) ?\n innerTrimedValue.replace(decimalRegExp, '$1.$2') :\n '');\n }\n const floatValue = parseFloat(innerTrimedValue);\n if (+innerTrimedValue === floatValue) {\n // String is numeric\n value = floatValue;\n }\n else {\n // Determine if a date string\n const dateValue = converter.parseDate(value);\n result = DataConverterUtils_isNumber(dateValue) ? 'Date' : 'string';\n }\n }\n if (typeof value === 'number') {\n // Greater than milliseconds in a year assumed timestamp\n result = value > 365 * 24 * 3600 * 1000 ? 'Date' : 'number';\n }\n return result;\n }\n DataConverterUtils.guessType = guessType;\n /**\n * Trim a string from whitespaces.\n *\n * @param {string} str\n * String to trim.\n *\n * @param {boolean} [inside=false]\n * Remove all spaces between numbers.\n *\n * @return {string}\n * Trimed string\n */\n function trim(str, inside) {\n if (typeof str === 'string') {\n str = str.replace(/^\\s+|\\s+$/g, '');\n // Clear white space insdie the string, like thousands separators\n if (inside && /^[\\d\\s]+$/.test(str)) {\n str = str.replace(/\\s/g, '');\n }\n }\n return str;\n }\n DataConverterUtils.trim = trim;\n /**\n * Parses an array of columns to a column collection. If more headers are\n * provided, the corresponding, empty columns are added.\n *\n * @param {DataTable.Column[]} [columnsArray]\n * Array of columns.\n *\n * @param {string[]} [headers]\n * Column ids to use.\n *\n * @return {DataTable.ColumnCollection}\n * Parsed columns.\n */\n function getColumnsCollection(columnsArray = [], headers) {\n const columns = {};\n for (let i = 0, iEnd = Math.max(headers.length, columnsArray.length); i < iEnd; ++i) {\n const columnId = headers[i] || `${i}`;\n columns[columnId] = columnsArray[i] ? columnsArray[i].slice() : [];\n }\n return columns;\n }\n DataConverterUtils.getColumnsCollection = getColumnsCollection;\n})(DataConverterUtils || (DataConverterUtils = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Converters_DataConverterUtils = (DataConverterUtils);\n\n;// ./code/grid/es-modules/Data/Converters/DataConverter.js\n/* *\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Sebastian Bochan\n * - Gøran Slettemark\n * - Torstein Hønsi\n * - Wojciech Chmiel\n * - Jomar Hønsi\n * - Kamil Kubik\n *\n * */\n\n\n\nconst { addEvent: DataConverter_addEvent, fireEvent: DataConverter_fireEvent, merge: DataConverter_merge } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Base class providing an interface and basic methods for a DataConverter\n *\n * @private\n */\nclass DataConverter {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the DataConverter.\n *\n * @param {DataConverter.UserOptions} [options]\n * Options for the DataConverter.\n */\n constructor(options) {\n /* *\n *\n * Properties\n *\n * */\n /**\n * A collection of available date formats.\n */\n this.dateFormats = {\n 'YYYY/mm/dd': {\n regex: /^(\\d{4})([\\-\\.\\/])(\\d{1,2})\\2(\\d{1,2})$/,\n parser: function (match) {\n return (match ?\n Date.UTC(+match[1], +match[3] - 1, +match[4]) : NaN);\n }\n },\n 'dd/mm/YYYY': {\n regex: /^(\\d{1,2})([\\-\\.\\/])(\\d{1,2})\\2(\\d{4})$/,\n parser: function (match) {\n return (match ?\n Date.UTC(+match[4], +match[3] - 1, +match[1]) : NaN);\n },\n alternative: 'mm/dd/YYYY' // Different format with the same regex\n },\n 'mm/dd/YYYY': {\n regex: /^(\\d{1,2})([\\-\\.\\/])(\\d{1,2})\\2(\\d{4})$/,\n parser: function (match) {\n return (match ?\n Date.UTC(+match[4], +match[1] - 1, +match[3]) : NaN);\n }\n },\n 'dd/mm/YY': {\n regex: /^(\\d{1,2})([\\-\\.\\/])(\\d{1,2})\\2(\\d{2})$/,\n parser: function (match) {\n const d = new Date();\n if (!match) {\n return NaN;\n }\n let year = +match[4];\n if (year > (d.getFullYear() - 2000)) {\n year += 1900;\n }\n else {\n year += 2000;\n }\n return Date.UTC(year, +match[3] - 1, +match[1]);\n },\n alternative: 'mm/dd/YY' // Different format with the same regex\n },\n 'mm/dd/YY': {\n regex: /^(\\d{1,2})([\\-\\.\\/])(\\d{1,2})\\2(\\d{2})$/,\n parser: function (match) {\n return (match ?\n Date.UTC(+match[4] + 2000, +match[1] - 1, +match[3]) :\n NaN);\n }\n }\n };\n const mergedOptions = DataConverter_merge(DataConverter.defaultOptions, options);\n let regExpPoint = mergedOptions.decimalPoint;\n if (regExpPoint === '.' || regExpPoint === ',') {\n regExpPoint = regExpPoint === '.' ? '\\\\.' : ',';\n this.decimalRegExp =\n new RegExp('^(-?[0-9]+)' + regExpPoint + '([0-9]+)$');\n }\n this.options = mergedOptions;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Converts a string value based on its guessed type.\n *\n * @param {*} value\n * The value to examine.\n *\n * @return {number | string | Date}\n * The converted value.\n */\n convertByType(value) {\n const converter = this, typeMap = {\n 'number': (value) => Converters_DataConverterUtils.asNumber(value, converter.decimalRegExp),\n 'Date': (value) => Converters_DataConverterUtils.asDate(value, converter),\n 'string': Converters_DataConverterUtils.asString\n };\n return typeMap[Converters_DataConverterUtils.guessType(value, converter)]\n .call(converter, value);\n }\n /**\n * Tries to guess the date format\n * - Check if either month candidate exceeds 12\n * - Check if year is missing (use current year)\n * - Check if a shortened year format is used (e.g. 1/1/99)\n * - If no guess can be made, the user must be prompted\n * data is the data to deduce a format based on\n * @private\n *\n * @param {string[]} data\n * Data to check the format.\n *\n * @param {number} limit\n * Max data to check the format.\n *\n * @param {boolean} save\n * Whether to save the date format in the converter options.\n */\n deduceDateFormat(data, limit, save) {\n const parser = this, stable = [], max = [];\n let format = 'YYYY/mm/dd', thing, guessedFormat = [], i = 0, madeDeduction = false, elem, j;\n if (!limit || limit > data.length) {\n limit = data.length;\n }\n for (; i < limit; i++) {\n if (typeof data[i] !== 'undefined' &&\n data[i] && data[i].length) {\n thing = data[i]\n .trim()\n .replace(/[\\-\\.\\/]/g, ' ')\n .split(' ');\n guessedFormat = [\n '',\n '',\n ''\n ];\n for (j = 0; j < thing.length; j++) {\n if (j < guessedFormat.length) {\n elem = parseInt(thing[j], 10);\n if (elem) {\n max[j] = (!max[j] || max[j] < elem) ? elem : max[j];\n if (typeof stable[j] !== 'undefined') {\n if (stable[j] !== elem) {\n stable[j] = false;\n }\n }\n else {\n stable[j] = elem;\n }\n if (elem > 31) {\n if (elem < 100) {\n guessedFormat[j] = 'YY';\n }\n else {\n guessedFormat[j] = 'YYYY';\n }\n }\n else if (elem > 12 &&\n elem <= 31) {\n guessedFormat[j] = 'dd';\n madeDeduction = true;\n }\n else if (!guessedFormat[j].length) {\n guessedFormat[j] = 'mm';\n }\n }\n }\n }\n }\n }\n if (madeDeduction) {\n // This handles a few edge cases with hard to guess dates\n for (j = 0; j < stable.length; j++) {\n if (stable[j] !== false) {\n if (max[j] > 12 &&\n guessedFormat[j] !== 'YY' &&\n guessedFormat[j] !== 'YYYY') {\n guessedFormat[j] = 'YY';\n }\n }\n else if (max[j] > 12 && guessedFormat[j] === 'mm') {\n guessedFormat[j] = 'dd';\n }\n }\n // If the middle one is dd, and the last one is dd,\n // the last should likely be year.\n if (guessedFormat.length === 3 &&\n guessedFormat[1] === 'dd' &&\n guessedFormat[2] === 'dd') {\n guessedFormat[2] = 'YY';\n }\n format = guessedFormat.join('/');\n // If the caculated format is not valid, we need to present an\n // error.\n }\n // Save the deduced format in the converter options.\n if (save) {\n parser.options.dateFormat = format;\n }\n return format;\n }\n /**\n * Emits an event on the DataConverter instance.\n *\n * @param {DataConverter.Event} [e]\n * Event object containing additional event data\n */\n emit(e) {\n DataConverter_fireEvent(this, e.type, e);\n }\n /**\n * Registers a callback for a specific event.\n *\n * @param {string} type\n * Event type as a string.\n *\n * @param {DataEventEmitter.Callback} callback\n * Function to register for an modifier callback.\n *\n * @return {Function}\n * Function to unregister callback from the modifier event.\n */\n on(type, callback) {\n return DataConverter_addEvent(this, type, callback);\n }\n /**\n * Parse a date and return it as a number.\n *\n * @param {string} value\n * Value to parse.\n *\n * @param {string} dateFormatProp\n * Which of the predefined date formats\n * to use to parse date values.\n */\n parseDate(value, dateFormatProp) {\n const converter = this, options = converter.options;\n let dateFormat = dateFormatProp || options.dateFormat, result = NaN, key, match = null;\n if (options.parseDate) {\n result = options.parseDate(value);\n }\n else {\n const dateFormats = converter.dateFormats;\n // Auto-detect the date format the first time\n if (!dateFormat) {\n for (key in dateFormats) { // eslint-disable-line guard-for-in\n const format = dateFormats[key];\n match = value.match(format.regex);\n if (match) {\n dateFormat = key;\n result = format.parser(match);\n break;\n }\n }\n // Next time, use the one previously found\n }\n else {\n let format = dateFormats[dateFormat];\n if (!format) {\n // The selected format is invalid\n format = dateFormats['YYYY/mm/dd'];\n }\n match = value.match(format.regex);\n if (match) {\n result = format.parser(match);\n }\n }\n // Fall back to Date.parse\n if (!match) {\n const parsed = Date.parse(value);\n if (!isNaN(parsed)) {\n result =\n parsed - new Date(parsed).getTimezoneOffset() * 60000;\n // Reset dates without year in Chrome\n if (!value.includes('2001') &&\n new Date(result).getFullYear() === 2001) {\n result = NaN;\n }\n }\n }\n }\n return result;\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Default options\n */\nDataConverter.defaultOptions = {\n dateFormat: '',\n firstRowAsNames: true\n};\n/* *\n *\n * Class Namespace\n *\n * */\n/**\n * Additionally provided types for events and conversion.\n */\n(function (DataConverter) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n /**\n * Registry as a record object with connector names and their class.\n */\n DataConverter.types = {};\n /* *\n *\n * Functions\n *\n * */\n /**\n * Adds a converter class to the registry.\n *\n * @private\n *\n * @param {string} key\n * Registry key of the converter class.\n *\n * @param {DataConverterTypes} DataConverterClass\n * Connector class (aka class constructor) to register.\n *\n * @return {boolean}\n * Returns true, if the registration was successful. False is returned, if\n * their is already a converter registered with this key.\n */\n function registerType(key, DataConverterClass) {\n return (!!key &&\n !DataConverter.types[key] &&\n !!(DataConverter.types[key] = DataConverterClass));\n }\n DataConverter.registerType = registerType;\n})(DataConverter || (DataConverter = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Converters_DataConverter = (DataConverter);\n\n;// ./code/grid/es-modules/Data/DataCursor.js\n/* *\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n/* *\n *\n * Class\n *\n * */\n/**\n * This class manages state cursors pointing on {@link Data.DataTable}. It\n * creates a relation between states of the user interface and the table cells,\n * columns, or rows.\n *\n * @class\n * @name Data.DataCursor\n */\nclass DataCursor {\n /* *\n *\n * Static Properties\n *\n * */\n /* *\n *\n * Constructor\n *\n * */\n constructor(stateMap = {}) {\n this.emittingRegister = [];\n this.listenerMap = {};\n this.stateMap = stateMap;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * This function registers a listener for a specific state and table.\n *\n * @example\n * ```TypeScript\n * dataCursor.addListener(myTable.id, 'hover', (e: DataCursor.Event) => {\n * if (e.cursor.type === 'position') {\n * console.log(`Hover over row #${e.cursor.row}.`);\n * }\n * });\n * ```\n *\n * @function #addListener\n *\n * @param {Data.DataCursor.TableId} tableId\n * The ID of the table to listen to.\n *\n * @param {Data.DataCursor.State} state\n * The state on the table to listen to.\n *\n * @param {Data.DataCursor.Listener} listener\n * The listener to register.\n *\n * @return {Data.DataCursor}\n * Returns the DataCursor instance for a call chain.\n */\n addListener(tableId, state, listener) {\n const listenerMap = this.listenerMap[tableId] = (this.listenerMap[tableId] ||\n {});\n const listeners = listenerMap[state] = (listenerMap[state] ||\n []);\n listeners.push(listener);\n return this;\n }\n /**\n * @private\n */\n buildEmittingTag(e) {\n return (e.cursor.type === 'position' ?\n [\n e.table.id,\n e.cursor.column,\n e.cursor.row,\n e.cursor.state,\n e.cursor.type\n ] :\n [\n e.table.id,\n e.cursor.columns,\n e.cursor.firstRow,\n e.cursor.lastRow,\n e.cursor.state,\n e.cursor.type\n ]).join('\\0');\n }\n /**\n * This function emits a state cursor related to a table. It will provide\n * lasting state cursors of the table to listeners.\n *\n * @example\n * ```ts\n * dataCursor.emit(myTable, {\n * type: 'position',\n * column: 'city',\n * row: 4,\n * state: 'hover',\n * });\n * ```\n *\n * @param {Data.DataTable} table\n * The related table of the cursor.\n *\n * @param {Data.DataCursor.Type} cursor\n * The state cursor to emit.\n *\n * @param {Event} [event]\n * Optional event information from a related source.\n *\n * @param {boolean} [lasting]\n * Whether this state cursor should be kept until it is cleared with\n * {@link DataCursor#remitCursor}.\n *\n * @return {Data.DataCursor}\n * Returns the DataCursor instance for a call chain.\n */\n emitCursor(table, cursor, event, lasting) {\n const tableId = table.id, state = cursor.state, listeners = (this.listenerMap[tableId] &&\n this.listenerMap[tableId][state]);\n if (listeners) {\n const stateMap = this.stateMap[tableId] = (this.stateMap[tableId] ?? {});\n const cursors = stateMap[cursor.state] || [];\n if (lasting) {\n if (!cursors.length) {\n stateMap[cursor.state] = cursors;\n }\n if (DataCursor.getIndex(cursor, cursors) === -1) {\n cursors.push(cursor);\n }\n }\n const e = {\n cursor,\n cursors,\n table\n };\n if (event) {\n e.event = event;\n }\n const emittingRegister = this.emittingRegister, emittingTag = this.buildEmittingTag(e);\n if (emittingRegister.indexOf(emittingTag) >= 0) {\n // Break call stack loops\n return this;\n }\n try {\n this.emittingRegister.push(emittingTag);\n for (let i = 0, iEnd = listeners.length; i < iEnd; ++i) {\n listeners[i].call(this, e);\n }\n }\n finally {\n const index = this.emittingRegister.indexOf(emittingTag);\n if (index >= 0) {\n this.emittingRegister.splice(index, 1);\n }\n }\n }\n return this;\n }\n /**\n * Removes a lasting state cursor.\n *\n * @function #remitCursor\n *\n * @param {string} tableId\n * ID of the related cursor table.\n *\n * @param {Data.DataCursor.Type} cursor\n * Copy or reference of the cursor.\n *\n * @return {Data.DataCursor}\n * Returns the DataCursor instance for a call chain.\n */\n remitCursor(tableId, cursor) {\n const cursors = (this.stateMap[tableId] &&\n this.stateMap[tableId][cursor.state]);\n if (cursors) {\n const index = DataCursor.getIndex(cursor, cursors);\n if (index >= 0) {\n cursors.splice(index, 1);\n }\n }\n return this;\n }\n /**\n * This function removes a listener.\n *\n * @function #addListener\n *\n * @param {Data.DataCursor.TableId} tableId\n * The ID of the table the listener is connected to.\n *\n * @param {Data.DataCursor.State} state\n * The state on the table the listener is listening to.\n *\n * @param {Data.DataCursor.Listener} listener\n * The listener to deregister.\n *\n * @return {Data.DataCursor}\n * Returns the DataCursor instance for a call chain.\n */\n removeListener(tableId, state, listener) {\n const listeners = (this.listenerMap[tableId] &&\n this.listenerMap[tableId][state]);\n if (listeners) {\n const index = listeners.indexOf(listener);\n if (index >= 0) {\n listeners.splice(index, 1);\n }\n }\n return this;\n }\n}\n/* *\n *\n * Class Namespace\n *\n * */\n/**\n * @class Data.DataCursor\n */\n(function (DataCursor) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * Finds the index of an cursor in an array.\n * @private\n */\n function getIndex(needle, cursors) {\n if (needle.type === 'position') {\n for (let cursor, i = 0, iEnd = cursors.length; i < iEnd; ++i) {\n cursor = cursors[i];\n if (cursor.type === 'position' &&\n cursor.state === needle.state &&\n cursor.column === needle.column &&\n cursor.row === needle.row) {\n return i;\n }\n }\n }\n else {\n const columnNeedle = JSON.stringify(needle.columns);\n for (let cursor, i = 0, iEnd = cursors.length; i < iEnd; ++i) {\n cursor = cursors[i];\n if (cursor.type === 'range' &&\n cursor.state === needle.state &&\n cursor.firstRow === needle.firstRow &&\n cursor.lastRow === needle.lastRow &&\n JSON.stringify(cursor.columns) === columnNeedle) {\n return i;\n }\n }\n }\n return -1;\n }\n DataCursor.getIndex = getIndex;\n /**\n * Checks whether two cursor share the same properties.\n * @private\n */\n function isEqual(cursorA, cursorB) {\n if (cursorA.type === 'position' && cursorB.type === 'position') {\n return (cursorA.column === cursorB.column &&\n cursorA.row === cursorB.row &&\n cursorA.state === cursorB.state);\n }\n if (cursorA.type === 'range' && cursorB.type === 'range') {\n return (cursorA.firstRow === cursorB.firstRow &&\n cursorA.lastRow === cursorB.lastRow &&\n (JSON.stringify(cursorA.columns) ===\n JSON.stringify(cursorB.columns)));\n }\n return false;\n }\n DataCursor.isEqual = isEqual;\n /**\n * Checks whether a cursor is in a range.\n * @private\n */\n function isInRange(needle, range) {\n if (range.type === 'position') {\n range = toRange(range);\n }\n if (needle.type === 'position') {\n needle = toRange(needle, range);\n }\n const needleColumns = needle.columns;\n const rangeColumns = range.columns;\n return (needle.firstRow >= range.firstRow &&\n needle.lastRow <= range.lastRow &&\n (!needleColumns ||\n !rangeColumns ||\n needleColumns.every((column) => rangeColumns.indexOf(column) >= 0)));\n }\n DataCursor.isInRange = isInRange;\n /**\n * @private\n */\n function toPositions(cursor) {\n if (cursor.type === 'position') {\n return [cursor];\n }\n const columns = (cursor.columns || []);\n const positions = [];\n const state = cursor.state;\n for (let row = cursor.firstRow, rowEnd = cursor.lastRow; row < rowEnd; ++row) {\n if (!columns.length) {\n positions.push({\n type: 'position',\n row,\n state\n });\n continue;\n }\n for (let column = 0, columnEnd = columns.length; column < columnEnd; ++column) {\n positions.push({\n type: 'position',\n column: columns[column],\n row,\n state\n });\n }\n }\n return positions;\n }\n DataCursor.toPositions = toPositions;\n /**\n * @private\n */\n function toRange(cursor, defaultRange) {\n if (cursor.type === 'range') {\n return cursor;\n }\n const range = {\n type: 'range',\n firstRow: (cursor.row ??\n (defaultRange && defaultRange.firstRow) ??\n 0),\n lastRow: (cursor.row ??\n (defaultRange && defaultRange.lastRow) ??\n Number.MAX_VALUE),\n state: cursor.state\n };\n if (typeof cursor.column !== 'undefined') {\n range.columns = [cursor.column];\n }\n return range;\n }\n DataCursor.toRange = toRange;\n})(DataCursor || (DataCursor = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Data_DataCursor = (DataCursor);\n\n;// ./code/grid/es-modules/Accessibility/HighContrastMode.js\n/* *\n *\n * (c) 2009-2025 Øystein Moseng\n *\n * Handling for Windows High Contrast Mode.\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * */\n\n\nconst { doc: HighContrastMode_doc, isMS, win: HighContrastMode_win } = Core_Globals;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Detect WHCM in the browser.\n *\n * @function Highcharts#isHighContrastModeActive\n * @private\n * @return {boolean} Returns true if the browser is in High Contrast mode.\n */\nfunction isHighContrastModeActive() {\n // Test BG image for IE\n if (isMS && HighContrastMode_win.getComputedStyle) {\n const testDiv = HighContrastMode_doc.createElement('div');\n const imageSrc = 'data:image/gif;base64,' +\n 'R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==';\n testDiv.style.backgroundImage = `url(${imageSrc})`; // #13071\n HighContrastMode_doc.body.appendChild(testDiv);\n const bi = (testDiv.currentStyle ||\n HighContrastMode_win.getComputedStyle(testDiv)).backgroundImage;\n HighContrastMode_doc.body.removeChild(testDiv);\n return bi === 'none';\n }\n // Other browsers use the forced-colors standard\n return HighContrastMode_win.matchMedia && HighContrastMode_win.matchMedia('(forced-colors: active)').matches;\n}\n/**\n * Force high contrast theme for the chart. The default theme is defined in\n * a separate file.\n *\n * @function Highcharts#setHighContrastTheme\n * @private\n * @param {Highcharts.AccessibilityChart} chart The chart to set the theme of.\n * @return {void}\n */\nfunction setHighContrastTheme(chart) {\n // We might want to add additional functionality here in the future for\n // storing the old state so that we can reset the theme if HC mode is\n // disabled. For now, the user will have to reload the page.\n chart.highContrastModeActive = true;\n // Apply theme to chart\n const theme = (chart.options.accessibility.highContrastTheme);\n chart.update(theme, false);\n const hasCustomColors = theme.colors?.length > 1;\n // Force series colors (plotOptions is not enough)\n chart.series.forEach(function (s) {\n const plotOpts = theme.plotOptions[s.type] || {};\n const fillColor = hasCustomColors && s.colorIndex !== void 0 ?\n theme.colors[s.colorIndex] :\n plotOpts.color || 'window';\n const seriesOptions = {\n color: plotOpts.color || 'windowText',\n colors: hasCustomColors ?\n theme.colors : [plotOpts.color || 'windowText'],\n borderColor: plotOpts.borderColor || 'window',\n fillColor\n };\n s.update(seriesOptions, false);\n if (s.points) {\n // Force point colors if existing\n s.points.forEach(function (p) {\n if (p.options && p.options.color) {\n p.update({\n color: plotOpts.color || 'windowText',\n borderColor: plotOpts.borderColor || 'window'\n }, false);\n }\n });\n }\n });\n // The redraw for each series and after is required for 3D pie\n // (workaround)\n chart.redraw();\n}\n/* *\n *\n * Default Export\n *\n * */\nconst whcm = {\n isHighContrastModeActive,\n setHighContrastTheme\n};\n/* harmony default export */ const HighContrastMode = (whcm);\n\n;// ./code/grid/es-modules/Grid/Core/Globals.js\n/* *\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n/* *\n *\n * Class\n *\n * */\n/**\n * Globals Grid namespace.\n */\nvar Globals_Globals;\n(function (Globals) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n Globals.classNamePrefix = 'hcg-';\n Globals.rawClassNames = {\n container: 'container',\n tableElement: 'table',\n captionElement: 'caption',\n descriptionElement: 'description',\n theadElement: 'thead',\n tbodyElement: 'tbody',\n rowElement: 'row',\n rowEven: 'row-even',\n rowOdd: 'row-odd',\n hoveredRow: 'hovered-row',\n columnElement: 'column',\n hoveredCell: 'hovered-cell',\n hoveredColumn: 'hovered-column',\n syncedRow: 'synced-row',\n syncedCell: 'synced-cell',\n syncedColumn: 'synced-column',\n editedCell: 'edited-cell',\n mockedRow: 'mocked-row',\n rowsContentNowrap: 'rows-content-nowrap',\n virtualization: 'virtualization',\n scrollableContent: 'scrollable-content',\n headerCell: 'header-cell',\n headerCellContainer: 'header-cell-container',\n headerCellContent: 'header-cell-content',\n headerCellFilterIcon: 'header-cell-filter-icon',\n headerCellIcons: 'header-cell-icons',\n headerCellSortIcon: 'header-cell-sort-icon',\n headerCellMenuIcon: 'header-cell-menu-icon',\n headerRow: 'head-row-content',\n noData: 'no-data',\n noPadding: 'no-padding',\n columnFirst: 'column-first',\n columnSortable: 'column-sortable',\n columnSortableIcon: 'column-sortable-icon',\n columnSortedAsc: 'column-sorted-asc',\n columnSortedDesc: 'column-sorted-desc',\n resizableContent: 'resizable-content',\n resizerHandles: 'column-resizer',\n resizedColumn: 'column-resized',\n creditsContainer: 'credits-container',\n creditsText: 'credits',\n creditsPro: 'credits-pro',\n visuallyHidden: 'visually-hidden',\n lastHeaderCellInRow: 'last-header-cell-in-row',\n loadingWrapper: 'loading-wrapper',\n loadingSpinner: 'spinner',\n loadingMessage: 'loading-message',\n popup: 'popup',\n button: 'button',\n icon: 'icon',\n iconSearch: 'icon-search',\n popupContent: 'popup-content',\n columnFilterWrapper: 'column-filter-wrapper',\n toolbarButtonActiveIndicator: 'active-indicator',\n menuContainer: 'menu-container',\n menuItem: 'menu-item',\n menuHeader: 'menu-header',\n menuHeaderCategory: 'menu-header-category',\n menuHeaderName: 'menu-header-name',\n menuItemIcon: 'menu-item-icon',\n menuItemLabel: 'menu-item-label',\n menuDivider: 'menu-divider',\n clearFilterButton: 'clear-filter-button',\n paginationWrapper: 'pagination-wrapper',\n paginationContainer: 'pagination-container',\n paginationPageInfo: 'pagination-info',\n paginationControls: 'pagination-controls',\n paginationButton: 'pagination-btn',\n paginationButtonDisabled: 'pagination-btn-disabled',\n paginationFirstButton: 'pagination-first',\n paginationPrevButton: 'pagination-prev',\n paginationNextButton: 'pagination-next',\n paginationLastButton: 'pagination-last',\n paginationPageButton: 'pagination-page',\n paginationPageButtonActive: 'pagination-page-active',\n paginationEllipsis: 'pagination-ellipsis',\n paginationMobileSelector: 'pagination-mobile-selector',\n paginationMobilePageSizeSelector: 'pagination-mobile-page-size-selector',\n paginationPageSizeContainer: 'pagination-page-size-container',\n paginationPageSizeSelect: 'pagination-page-size-select',\n noWidth: 'no-width',\n rightAlign: 'right',\n centerAlign: 'center',\n leftAlign: 'left'\n };\n Globals.win = window;\n Globals.composed = [];\n Globals.userAgent = (Globals.win.navigator && Globals.win.navigator.userAgent) || '';\n Globals.isChrome = Globals.userAgent.indexOf('Chrome') !== -1;\n Globals.isSafari = !Globals.isChrome && Globals.userAgent.indexOf('Safari') !== -1;\n Globals.getClassName = (classNameKey) => Globals.classNamePrefix + Globals.rawClassNames[classNameKey];\n})(Globals_Globals || (Globals_Globals = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Grid_Core_Globals = (Globals_Globals);\n\n;// ./code/grid/es-modules/Grid/Core/GridUtils.js\n/* *\n *\n * Grid utilities\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\nconst { isObject: GridUtils_isObject } = Core_Utilities;\nHTML_AST.allowedAttributes.push('srcset', 'media');\nHTML_AST.allowedTags.push('picture', 'source');\n/* *\n *\n * Namespace\n *\n * */\nvar GridUtils;\n(function (GridUtils) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Functions\n *\n * */\n /**\n * Creates a HTML element with the provided options.\n *\n * @param tagName\n * The tag name of the element.\n *\n * @param params\n * The parameters of the element.\n *\n * @param parent\n * The parent element.\n */\n function makeHTMLElement(tagName, params, parent) {\n const element = document.createElement(tagName);\n if (params) {\n const paramsKeys = Object.keys(params);\n for (let i = 0; i < paramsKeys.length; i++) {\n const key = paramsKeys[i];\n const value = params[key];\n if (value !== void 0) {\n if (key === 'style') {\n Object.assign(element.style, value);\n }\n else {\n element[key] = value;\n }\n }\n }\n }\n if (parent) {\n parent.appendChild(element);\n }\n return element;\n }\n GridUtils.makeHTMLElement = makeHTMLElement;\n /**\n * Creates a div element with the provided class name and id.\n *\n * @param className\n * The class name of the div.\n *\n * @param id\n * The id of the element.\n */\n function makeDiv(className, id) {\n return makeHTMLElement('div', { className, id });\n }\n GridUtils.makeDiv = makeDiv;\n /**\n * Check if there's a possibility that the given string is an HTML\n * (contains '<').\n *\n * @param str\n * Text to verify.\n */\n function isHTML(str) {\n return str.indexOf('<') !== -1;\n }\n GridUtils.isHTML = isHTML;\n /**\n * Returns a string containing plain text format by removing HTML tags\n *\n * @param text\n * String to be sanitized\n *\n * @returns\n * Sanitized plain text string\n */\n function sanitizeText(text) {\n try {\n return new DOMParser().parseFromString(text, 'text/html')\n .body.textContent || '';\n }\n catch {\n return '';\n }\n }\n GridUtils.sanitizeText = sanitizeText;\n /**\n * Sets an element's content, checking whether it is HTML or plain text.\n * Should be used instead of element.innerText when the content can be HTML.\n *\n * @param element\n * Parent element where the content should be.\n *\n * @param content\n * Content to render.\n */\n function setHTMLContent(element, content) {\n if (isHTML(content)) {\n element.innerHTML = HTML_AST.emptyHTML;\n const formattedNodes = new HTML_AST(content);\n formattedNodes.addToDOM(element);\n }\n else {\n element.innerText = content;\n }\n }\n GridUtils.setHTMLContent = setHTMLContent;\n /**\n * Creates a proxy that, when reading a property, first returns the value\n * from the original options of a given entity; if it is not defined, it\n * falls back to the value from the defaults (default options), recursively\n * for nested objects. Setting values on the proxy will change the original\n * options object (1st argument), not the defaults (2nd argument).\n *\n * @param options\n * The specific options object.\n *\n * @param defaultOptions\n * The default options to fall back to.\n *\n * @returns\n * A proxy that provides merged access to options and defaults.\n */\n function createOptionsProxy(options, defaultOptions = {}) {\n const handler = (defaults = {}) => ({\n get(target, prop) {\n const targetValue = target[prop];\n const defaultValue = defaults[prop];\n if (GridUtils_isObject(targetValue, true)) {\n return new Proxy(targetValue, handler(defaultValue ?? {}));\n }\n return targetValue ?? defaultValue;\n },\n set(target, prop, value) {\n target[prop] = value;\n return true;\n },\n deleteProperty(target, prop) {\n delete target[prop];\n return true;\n }\n });\n return new Proxy(options, handler(defaultOptions));\n }\n GridUtils.createOptionsProxy = createOptionsProxy;\n /**\n * Format text with placeholders. Used for lang texts.\n *\n * @param template The text template with placeholders\n * @param values Object containing values to replace placeholders\n * @returns Formatted text\n */\n function formatText(template, values) {\n return template.replace(/\\{(\\w+)\\}/g, (match, key) => (values[key] !== void 0 ? String(values[key]) : match));\n }\n GridUtils.formatText = formatText;\n})(GridUtils || (GridUtils = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Core_GridUtils = (GridUtils);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilteringTypes.js\n/* *\n *\n * Grid Filtering Types and Constants\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n * - Kamil Kubik\n *\n * */\n\n/**\n * String conditions values for the condition select options.\n */\nconst stringConditions = [\n 'contains',\n 'doesNotContain',\n 'equals',\n 'doesNotEqual',\n 'beginsWith',\n 'endsWith',\n 'empty',\n 'notEmpty'\n];\n/**\n * Number conditions values for the condition select options.\n */\nconst numberConditions = [\n 'equals',\n 'doesNotEqual',\n 'greaterThan',\n 'greaterThanOrEqualTo',\n 'lessThan',\n 'lessThanOrEqualTo',\n 'empty',\n 'notEmpty'\n];\n/**\n * DateTime conditions values for the condition select options.\n */\nconst dateTimeConditions = [\n 'equals',\n 'doesNotEqual',\n 'before',\n 'after',\n 'empty',\n 'notEmpty'\n];\n/**\n * Boolean conditions values for the condition select options.\n */\nconst booleanConditions = [\n 'all',\n 'true',\n 'false',\n 'empty'\n];\n/**\n * Corresponding values for the boolean select options.\n */\nconst booleanValueMap = {\n 'all': 'all',\n 'true': true,\n 'false': false,\n 'empty': null\n};\n/**\n * Conditions map for the condition select options.\n */\nconst conditionsMap = {\n string: stringConditions,\n number: numberConditions,\n datetime: dateTimeConditions,\n 'boolean': booleanConditions\n};\n\n;// ./code/grid/es-modules/Grid/Core/Table/Actions/ColumnFiltering/ColumnFiltering.js\n/* *\n *\n * Grid ColumnFiltering class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n * - Kamil Kubik\n *\n * */\n\n\n\n\n\nconst { defined: ColumnFiltering_defined, fireEvent: ColumnFiltering_fireEvent } = Core_Utilities;\nconst { makeHTMLElement } = Core_GridUtils;\n/* *\n *\n * Class\n *\n * */\n/**\n * Class that manages filtering for a dedicated column.\n */\nclass ColumnFiltering {\n /* *\n *\n * Static Methods\n *\n * */\n /**\n * Parses a camel case string to a readable string and capitalizes the first\n * letter.\n *\n * @param value\n * The camel case string to parse.\n *\n * @returns\n * The readable string with the first letter capitalized.\n */\n static parseCamelCaseToReadable(value) {\n const readable = value\n .replace(/([A-Z])/g, ' $1')\n .trim()\n .toLowerCase()\n .split(/\\s+/).join(' ');\n return readable.charAt(0).toUpperCase() + readable.slice(1);\n }\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs filtering controller for a dedicated column.\n *\n * @param column\n * The filtered column.\n */\n constructor(column) {\n /**\n * Handles the keydown event for the filtering content. Used externally,\n * not in the class itself.\n *\n * @param e\n * The keyboard event.\n */\n this.onKeyDown = (e) => {\n const contentOrder = [];\n if (this.filterSelect && !this.filterSelect.disabled) {\n contentOrder.push(this.filterSelect);\n }\n if (this.filterInput && !this.filterInput.disabled) {\n contentOrder.push(this.filterInput);\n }\n if (this.clearButton && !this.clearButton.disabled) {\n contentOrder.push(this.clearButton);\n }\n const direction = {\n 'ArrowDown': 1,\n 'ArrowUp': -1\n }[e.key];\n if (direction) {\n e.preventDefault();\n const currentIndex = contentOrder.indexOf(e.target);\n const n = contentOrder.length;\n contentOrder[(currentIndex + direction + n) % n].focus();\n return;\n }\n if (e.key === 'Enter') {\n if (e.target === this.clearButton) {\n e.preventDefault();\n void this.set();\n contentOrder[0]?.focus();\n return;\n }\n }\n };\n this.column = column;\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Sets the value and condition for the filtering.\n *\n * @param value\n * The value to set.\n *\n * @param condition\n * The condition to set.\n */\n async set(value, condition) {\n if (this.filterInput) {\n this.filterInput.value = value ?? '';\n }\n if (this.filterSelect) {\n this.filterSelect.value =\n condition ?? conditionsMap[this.column.dataType][0];\n }\n await this.applyFilter({ value, condition });\n }\n /**\n * Render the filtering content in the container.\n *\n * @param container\n * The container element.\n */\n renderFilteringContent(container) {\n const column = this.column;\n const columnType = column.dataType;\n if (!column.options.filtering?.enabled) {\n return;\n }\n // Render the input wrapper.\n const inputWrapper = makeHTMLElement('div', {\n className: Grid_Core_Globals.getClassName('columnFilterWrapper')\n }, container);\n this.renderConditionSelect(inputWrapper);\n if (columnType !== 'boolean') {\n this.renderFilteringInput(inputWrapper, columnType);\n }\n this.renderClearButton(inputWrapper);\n }\n /**\n * Takes the filtering value and condition from the inputs and applies it\n * to the column.\n */\n applyFilterFromForm() {\n const result = {\n condition: this.filterSelect?.value\n };\n if (this.filterInput) {\n result.value = this.filterInput.value;\n }\n if (result.condition &&\n conditionsMap[this.column.dataType].includes(result.condition)) {\n void this.applyFilter(result);\n }\n }\n /**\n * Applies the filtering to the column.\n *\n * @param condition\n * The filtering condition.\n */\n async applyFilter(condition) {\n const viewport = this.column.viewport;\n const querying = viewport.grid.querying;\n const filteringController = querying.filtering;\n const columnId = this.column.id;\n const a11y = viewport.grid.accessibility;\n const { value } = condition;\n ColumnFiltering_fireEvent(this.column, 'beforeFilter', {\n target: this.column\n });\n const filteringApplied = this.isFilteringApplied();\n const clearButton = this.clearButton;\n if (clearButton && filteringApplied === clearButton.disabled) {\n clearButton.disabled = !filteringApplied;\n }\n if (ColumnFiltering_defined(value) && value !== '' && typeof value !== 'number') {\n switch (this.column.dataType) {\n case 'number':\n condition.value = Number(value);\n break;\n case 'datetime':\n condition.value = new Date(`${value}Z`).getTime();\n break;\n }\n }\n // Update the userOptions.\n void this.column.update({ filtering: condition }, false);\n filteringController.addColumnFilterCondition(columnId, condition);\n this.disableInputIfNeeded();\n await querying.proceed();\n await viewport.updateRows();\n a11y?.userFilteredColumn({\n ...condition,\n columnId,\n rowsCount: viewport.rows.length\n }, filteringApplied);\n ColumnFiltering_fireEvent(this.column, 'afterFilter', {\n target: this.column\n });\n }\n /**\n * Render the filtering input element, based on the column type.\n *\n * @param inputWrapper\n * Reference to the input wrapper.\n *\n * @param columnType\n * Reference to the column type.\n */\n renderFilteringInput(inputWrapper, columnType) {\n // Render the input element.\n this.filterInput = makeHTMLElement('input', {}, inputWrapper);\n this.filterInput.setAttribute('tabindex', '-1');\n const column = this.column;\n this.filterInput.setAttribute('id', 'filter-input-' + column.viewport.grid.id + '-' + column.id);\n this.filterInput.placeholder = 'Value...';\n if (columnType === 'number') {\n this.filterInput.type = 'number';\n }\n else if (columnType === 'datetime') {\n this.filterInput.type = 'date';\n }\n else {\n this.filterInput.type = 'text';\n this.filterInput.classList.add(Grid_Core_Globals.getClassName('icon'), Grid_Core_Globals.getClassName('iconSearch'));\n }\n // Assign the default input value.\n const { value } = this.column.options.filtering ?? {};\n if (value || value === 0) {\n this.filterInput.value = columnType === 'datetime' ?\n column.viewport.grid.time.dateFormat('%Y-%m-%d', Number(value)) :\n value.toString();\n }\n if (this.filterSelect) {\n this.disableInputIfNeeded();\n }\n const eventTypes = {\n string: ['keyup'],\n number: ['keyup', 'change'],\n datetime: ['change']\n };\n for (const eventType of eventTypes[columnType]) {\n this.filterInput.addEventListener(eventType, () => {\n this.applyFilterFromForm();\n });\n }\n }\n /**\n * Render the condition select element.\n *\n * @param inputWrapper\n * Reference to the input wrapper.\n */\n renderConditionSelect(inputWrapper) {\n // Render the select element.\n this.filterSelect = makeHTMLElement('select', {}, inputWrapper);\n this.filterSelect.setAttribute('tabindex', '-1');\n const column = this.column;\n this.filterSelect.setAttribute('id', 'filter-select-' + column.viewport.grid.id + '-' + column.id);\n const conditions = conditionsMap[column.dataType];\n const langConditions = this.column.viewport.grid.options\n ?.lang?.columnFilteringConditions ?? {};\n // Render the options.\n for (const condition of conditions) {\n const optionElement = document.createElement('option');\n optionElement.value = condition;\n optionElement.textContent = langConditions[condition] ??\n ColumnFiltering.parseCamelCaseToReadable(condition);\n this.filterSelect.appendChild(optionElement);\n }\n // Use condition from options or first available condition as default.\n const filteringCondition = this.column.options.filtering?.condition;\n if (filteringCondition && conditions.includes(filteringCondition)) {\n this.filterSelect.value = filteringCondition;\n }\n else {\n this.filterSelect.value = conditions[0];\n }\n this.disableInputIfNeeded();\n // Attach event listener.\n this.filterSelect.addEventListener('change', () => {\n this.applyFilterFromForm();\n });\n }\n renderClearButton(inputWrapper) {\n this.clearButton = makeHTMLElement('button', {\n className: Grid_Core_Globals.getClassName('clearFilterButton'),\n innerText: 'Clear filter' // TODO: Lang\n }, inputWrapper);\n this.clearButton.setAttribute('tabindex', '-1');\n this.clearButton.disabled = !this.isFilteringApplied();\n this.clearButton.addEventListener('click', () => {\n void this.set();\n });\n }\n /**\n * Checks if filtering is applied to the column.\n *\n * @returns\n * `true` if filtering is applied to the column, `false` otherwise.\n */\n isFilteringApplied() {\n const { filterSelect: select, filterInput: input } = this;\n const { dataType } = this.column;\n const condition = select?.value;\n if (dataType === 'boolean') {\n return condition !== 'all';\n }\n if (condition === 'empty' || condition === 'notEmpty') {\n return true;\n }\n return input?.value !== '';\n }\n /**\n * Disables the input element if the condition is `empty` or `notEmpty`.\n */\n disableInputIfNeeded() {\n const { filterSelect: select, filterInput: input } = this;\n const condition = select?.value;\n if (!input || !select) {\n return;\n }\n if (condition === 'empty' || condition === 'notEmpty') {\n input.disabled = true;\n }\n else if (input?.disabled) {\n input.disabled = false;\n }\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ColumnFiltering_ColumnFiltering = (ColumnFiltering);\n\n;// ./code/grid/es-modules/Grid/Core/Accessibility/Accessibility.js\n/* *\n *\n * Grid Accessibility class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\n\n\nconst { formatText } = Core_GridUtils;\n/**\n * Representing the accessibility functionalities for the Data Grid.\n */\nclass Accessibility {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Construct the accessibility object.\n *\n * @param grid\n * The Grid Table instance which the accessibility controller belong to.\n */\n constructor(grid) {\n this.grid = grid;\n this.element = document.createElement('div');\n this.element.classList.add(Grid_Core_Globals.getClassName('visuallyHidden'));\n this.grid.container?.prepend(this.element);\n this.announcerElement = document.createElement('p');\n this.announcerElement.setAttribute('aria-atomic', 'true');\n this.announcerElement.setAttribute('aria-hidden', 'false');\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Add the description to the header cell.\n *\n * @param thElement\n * The header cell element to add the description to.\n *\n * @param description\n * The description to be added.\n */\n addHeaderCellDescription(thElement, description) {\n if (description) {\n thElement.setAttribute('aria-description', description);\n }\n }\n /**\n * Announce the message to the screen reader.\n *\n * @param msg\n * The message to be announced.\n *\n * @param assertive\n * Whether the message should be assertive. Default is false.\n */\n announce(msg, assertive = false) {\n if (this.announcerTimeout) {\n clearTimeout(this.announcerTimeout);\n }\n this.announcerElement.remove();\n this.announcerElement.setAttribute('aria-live', assertive ? 'assertive' : 'polite');\n this.element.appendChild(this.announcerElement);\n requestAnimationFrame(() => {\n this.announcerElement.textContent = msg;\n });\n this.announcerTimeout = setTimeout(() => {\n this.announcerElement.remove();\n }, 3000);\n }\n /**\n * Announce the message to the screen reader that the user sorted the\n * column.\n *\n * @param order\n * The order of the sorting.\n */\n userSortedColumn(order) {\n const { options } = this.grid;\n const announcementsLang = options?.lang\n ?.accessibility?.sorting?.announcements;\n if (!options?.accessibility?.announcements?.sorting) {\n return;\n }\n let msg;\n switch (order) {\n case 'asc':\n msg = announcementsLang?.ascending;\n break;\n case 'desc':\n msg = announcementsLang?.descending;\n break;\n default:\n msg = announcementsLang?.none;\n }\n if (!msg) {\n return;\n }\n this.announce(msg, true);\n }\n /**\n * Set the aria sort state of the column header cell element.\n *\n * @param thElement\n * The header cell element to set the `aria-sort` state to.\n *\n * @param state\n * The sort state to be set for the column header cell.\n */\n setColumnSortState(thElement, state) {\n thElement?.setAttribute('aria-sort', state);\n }\n /**\n * Announce the message to the screen reader that the user filtered the\n * column.\n *\n * @param filteredColumnValues\n * The values of the filtered column.\n *\n * @param filteringApplied\n * Whether the filtering was applied or cleared.\n */\n userFilteredColumn(filteredColumnValues, filteringApplied) {\n const { columnId, condition, value, rowsCount } = filteredColumnValues;\n const { lang, accessibility } = this.grid.options || {};\n if (!accessibility?.announcements?.filtering) {\n return;\n }\n const announcementsLang = lang?.accessibility?.filtering?.announcements;\n let msg;\n if (filteringApplied && condition) {\n const parsedCondition = ColumnFiltering_ColumnFiltering.parseCamelCaseToReadable(condition);\n if (condition === 'empty' ||\n condition === 'notEmpty' ||\n condition === 'false' ||\n condition === 'true') {\n msg = formatText(announcementsLang?.emptyFilterApplied || '', {\n columnId,\n condition: parsedCondition,\n rowsCount: rowsCount\n });\n }\n else {\n msg = formatText(announcementsLang?.filterApplied || '', {\n columnId,\n condition: parsedCondition,\n value: value?.toString() || '',\n rowsCount: rowsCount\n });\n }\n }\n else {\n msg = formatText(announcementsLang?.filterCleared || '', {\n columnId,\n rowsCount: rowsCount\n });\n }\n this.announce(msg, true);\n }\n /**\n * Adds high contrast CSS class, if the browser is in High Contrast mode.\n */\n addHighContrast() {\n const highContrastMode = this.grid.options?.accessibility?.highContrastMode;\n if (highContrastMode !== false && (HighContrastMode.isHighContrastModeActive() ||\n highContrastMode === true)) {\n this.grid.contentWrapper?.classList.add('hcg-theme-highcontrast');\n }\n }\n /**\n * Set the row index attribute for the row element.\n *\n * @param el\n * The row element to set the index to.\n *\n * @param idx\n * The index of the row in the data table.\n */\n setRowIndex(el, idx) {\n el.setAttribute('aria-rowindex', idx);\n }\n /**\n * Set a11y options for the Grid.\n */\n setA11yOptions() {\n const grid = this.grid;\n const tableEl = grid.tableElement;\n if (!tableEl) {\n return;\n }\n tableEl.setAttribute('aria-rowcount', grid.dataTable?.getRowCount() || 0);\n if (grid.captionElement) {\n tableEl.setAttribute('aria-labelledby', grid.captionElement.id);\n }\n if (grid.descriptionElement) {\n tableEl.setAttribute('aria-describedby', grid.descriptionElement.id);\n }\n this.addHighContrast();\n }\n /**\n * Destroy the accessibility controller.\n */\n destroy() {\n this.element.remove();\n this.announcerElement.remove();\n clearTimeout(this.announcerTimeout);\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Accessibility_Accessibility = (Accessibility);\n\n;// ./code/grid/es-modules/Grid/Core/Defaults.js\n/* *\n *\n * Grid default options\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\nconst { merge: Core_Defaults_merge } = Core_Utilities;\n/**\n * Namespace for default options.\n */\nvar Defaults_Defaults;\n(function (Defaults) {\n /**\n * Default options for the Grid.\n */\n Defaults.defaultOptions = {\n accessibility: {\n enabled: true,\n highContrastMode: 'auto',\n announcements: {\n sorting: true,\n filtering: true\n }\n },\n lang: {\n accessibility: {\n sorting: {\n sortable: 'Sortable.',\n announcements: {\n ascending: 'Sorted ascending.',\n descending: 'Sorted descending.',\n none: 'Not sorted.'\n }\n },\n pagination: {\n announcements: {\n pageSizeChange: 'Page size changed to',\n pageChange: 'Page changed to'\n }\n },\n filtering: {\n announcements: {\n filterApplied: 'Filter applied for {columnId}, ' +\n '{condition} {value}. {rowsCount} results found.',\n emptyFilterApplied: 'Filter applied for {columnId}, ' +\n '{condition} values. {rowsCount} results found.',\n filterCleared: 'Filter cleared for {columnId}. ' +\n '{rowsCount} results found.'\n }\n }\n },\n loading: 'Loading...',\n noData: 'No data to display',\n filter: 'Filter',\n sortAscending: 'Sort ascending',\n sortDescending: 'Sort descending',\n column: 'Column',\n setFilter: 'Set filter',\n pagination: {\n pageInfo: 'Showing {start} - {end} of {total} ' +\n '(page {currentPage} of {totalPages})',\n pageSizeLabel: 'rows per page',\n firstPage: 'First page',\n previousPage: 'Previous page',\n nextPage: 'Next page',\n lastPage: 'Last page',\n pageNumber: 'Page {page}',\n ellipsis: 'More pages'\n },\n columnFilteringConditions: {\n contains: 'Contains',\n doesNotContain: 'Does not contain',\n equals: 'Equals',\n doesNotEqual: 'Does not equal',\n beginsWith: 'Begins with',\n endsWith: 'Ends with',\n empty: 'Empty',\n notEmpty: 'Not empty',\n greaterThan: 'Greater than',\n greaterThanOrEqualTo: 'Greater than or equal to',\n lessThan: 'Less than',\n lessThanOrEqualTo: 'Less than or equal to',\n before: 'Before',\n after: 'After',\n all: 'All',\n 'true': 'True',\n 'false': 'False'\n }\n },\n time: {\n timezone: 'UTC'\n },\n rendering: {\n rows: {\n bufferSize: 10,\n minVisibleRows: 2,\n strictHeights: false,\n virtualizationThreshold: 50\n },\n header: {\n enabled: true\n },\n columns: {\n resizing: {\n enabled: true,\n mode: 'adjacent'\n }\n },\n theme: 'hcg-theme-default'\n },\n columnDefaults: {\n sorting: {\n sortable: true\n },\n filtering: {\n inline: false\n }\n }\n };\n /**\n * Merge the default options with custom options. Commonly used for defining\n * reusable templates.\n *\n * @param options\n * The new custom chart options.\n */\n function setOptions(options) {\n Core_Defaults_merge(true, Defaults.defaultOptions, options);\n }\n Defaults.setOptions = setOptions;\n})(Defaults_Defaults || (Defaults_Defaults = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Core_Defaults = (Defaults_Defaults);\n\n;// ./code/grid/es-modules/Grid/Core/Table/CellContent/CellContent.js\n/* *\n *\n * Cell Content abstract class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a cell content in the grid.\n */\nclass CellContent {\n /**\n * Creates and renders the cell content.\n *\n * @param cell\n * The cell to which the content belongs.\n */\n constructor(cell) {\n this.cell = cell;\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const CellContent_CellContent = (CellContent);\n\n;// ./code/grid/es-modules/Grid/Core/Table/CellContent/TextContent.js\n/* *\n *\n * Text Cell Content class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\n\nconst { setHTMLContent } = Core_GridUtils;\n\nconst { defined: TextContent_defined } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a text type of content.\n */\nclass TextContent extends CellContent_CellContent {\n constructor(cell) {\n super(cell);\n this.add();\n }\n add() {\n this.update();\n }\n destroy() {\n this.cell.htmlElement.innerHTML = HTML_AST.emptyHTML;\n }\n update() {\n setHTMLContent(this.cell.htmlElement, this.format());\n }\n /**\n * Returns the formatted value of the cell.\n *\n * @internal\n */\n format() {\n const { cell } = this;\n const cellsDefaults = cell.row.viewport.grid.options?.columnDefaults?.cells || {};\n const { format, formatter } = cell.column.options.cells || {};\n let value = cell.value;\n if (!TextContent_defined(value)) {\n value = '';\n }\n let cellContent = '';\n if (!format && !formatter) {\n return cell.format(TextContent.defaultFormatsForDataTypes[cell.column.dataType]);\n }\n const isDefaultFormat = cellsDefaults.format === format;\n const isDefaultFormatter = cellsDefaults.formatter === formatter;\n if (isDefaultFormat && isDefaultFormatter) {\n cellContent = formatter ?\n formatter.call(cell).toString() :\n (format ? cell.format(format) : value + '');\n }\n else if (isDefaultFormat) {\n cellContent = formatter?.call(cell).toString() || value + '';\n }\n else if (isDefaultFormatter) {\n cellContent = format ? cell.format(format) : value + '';\n }\n return cellContent;\n }\n}\n/* *\n *\n * Namespace\n *\n * */\n(function (TextContent) {\n /**\n * Default formats for data types.\n */\n TextContent.defaultFormatsForDataTypes = {\n string: '{value}',\n number: '{value}',\n 'boolean': '{value}',\n datetime: '{value:%Y-%m-%d %H:%M:%S}'\n };\n})(TextContent || (TextContent = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const CellContent_TextContent = (TextContent);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Column.js\n/* *\n *\n * Grid Column class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\n\n\n\n\nconst { defined: Column_defined, fireEvent: Column_fireEvent } = Core_Utilities;\nconst { createOptionsProxy } = Core_GridUtils;\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a column in the data grid.\n */\nclass Column {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a column in the data grid.\n *\n * @param viewport\n * The viewport (table) the column belongs to.\n *\n * @param id\n * The id of the column (`name` in the Data Table).\n *\n * @param index\n * The index of the column.\n */\n constructor(viewport, id, index) {\n var _a;\n /**\n * The cells of the column.\n */\n this.cells = [];\n const { grid } = viewport;\n this.id = id;\n this.index = index;\n this.viewport = viewport;\n this.loadData();\n this.dataType = this.assumeDataType();\n // Populate column options map if not exists, to prepare option\n // references for each column.\n if (grid.options && !grid.columnOptionsMap?.[id]) {\n const columnOptions = { id };\n ((_a = grid.options).columns ?? (_a.columns = [])).push(columnOptions);\n grid.columnOptionsMap[id] = {\n index: grid.options.columns.length - 1,\n options: columnOptions\n };\n }\n this.options = createOptionsProxy(grid.columnOptionsMap?.[id]?.options ?? {}, grid.options?.columnDefaults);\n if (this.options.filtering?.enabled) {\n this.filtering = new ColumnFiltering_ColumnFiltering(this);\n }\n Column_fireEvent(this, 'afterInit');\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Loads the data of the column from the viewport's data table.\n */\n loadData() {\n this.data = this.viewport.dataTable.getColumn(this.id, true);\n }\n /**\n * Creates a cell content instance.\n *\n * @param cell\n * The cell that is to be edited.\n *\n */\n createCellContent(cell) {\n return new CellContent_TextContent(cell);\n }\n /**\n * Assumes the data type of the column based on the options or data in the\n * column if not specified.\n */\n assumeDataType() {\n const { grid } = this.viewport;\n const type = grid.columnOptionsMap?.[this.id]?.options.dataType ??\n grid.options?.columnDefaults?.dataType;\n if (type) {\n return type;\n }\n if (!this.data) {\n return 'string';\n }\n if (!Array.isArray(this.data)) {\n // Typed array\n return 'number';\n }\n for (let i = 0, iEnd = Math.min(this.data.length, 30); i < iEnd; ++i) {\n if (!Column_defined(this.data[i])) {\n // If the data is null or undefined, we should look\n // at the next value to determine the type.\n continue;\n }\n switch (typeof this.data[i]) {\n case 'number':\n return 'number';\n case 'boolean':\n return 'boolean';\n default:\n return 'string';\n }\n }\n // eslint-disable-next-line no-console\n console.warn(`Column \"${this.id}\" contains too few data points with ` +\n 'unambiguous types to correctly determine its dataType. It\\'s ' +\n 'recommended to set the `dataType` option for it.');\n return 'string';\n }\n /**\n * Registers a cell in the column.\n *\n * @param cell\n * The cell to register.\n */\n registerCell(cell) {\n cell.htmlElement.setAttribute('data-column-id', this.id);\n if (this.options.className) {\n cell.htmlElement.classList.add(...this.options.className.split(/\\s+/g));\n }\n if (this.viewport.grid.hoveredColumnId === this.id) {\n cell.htmlElement.classList.add(Grid_Core_Globals.getClassName('hoveredColumn'));\n }\n this.cells.push(cell);\n }\n /**\n * Unregister a cell from the column.\n *\n * @param cell\n * The cell to unregister.\n */\n unregisterCell(cell) {\n const index = this.cells.indexOf(cell);\n if (index > -1) {\n this.cells.splice(index, 1);\n }\n }\n /**\n * Returns the width of the column in pixels.\n */\n getWidth() {\n return this.viewport.columnResizing.getColumnWidth(this);\n }\n /**\n * Adds or removes the hovered CSS class to the column element\n * and its cells.\n *\n * @param hovered\n * Whether the column should be hovered.\n */\n setHoveredState(hovered) {\n this.header?.htmlElement?.classList[hovered ? 'add' : 'remove'](Grid_Core_Globals.getClassName('hoveredColumn'));\n for (let i = 0, iEnd = this.cells.length; i < iEnd; ++i) {\n this.cells[i].htmlElement.classList[hovered ? 'add' : 'remove'](Grid_Core_Globals.getClassName('hoveredColumn'));\n }\n }\n /**\n * Adds or removes the synced CSS class to the column element\n * and its cells.\n *\n * @param synced\n * Whether the column should have synced state.\n */\n setSyncedState(synced) {\n this.header?.htmlElement?.classList[synced ? 'add' : 'remove'](Grid_Core_Globals.getClassName('syncedColumn'));\n for (let i = 0, iEnd = this.cells.length; i < iEnd; ++i) {\n this.cells[i].htmlElement.classList[synced ? 'add' : 'remove'](Grid_Core_Globals.getClassName('syncedColumn'));\n }\n }\n /**\n * Returns the formatted string where the templating context is the column.\n *\n * @param template\n * The template string.\n *\n * @return\n * The formatted string.\n */\n format(template) {\n return Core_Templating.format(template, this, this.viewport.grid);\n }\n /**\n * Updates the column with new options.\n *\n * @param newOptions\n * The new options for the column.\n *\n * @param render\n * Whether to re-render after the update. If `false`, the update will just\n * extend the options object. Defaults to `true`.\n */\n async update(newOptions, render = true) {\n await this.viewport.grid.updateColumn(this.id, newOptions, render);\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Table_Column = (Column);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Row.js\n/* *\n *\n * Grid Row abstract class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\nconst { makeHTMLElement: Row_makeHTMLElement } = Core_GridUtils;\n/* *\n *\n * Abstract Class of Row\n *\n * */\n/**\n * Represents a row in the data grid.\n */\nclass Row {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a row in the data grid.\n *\n * @param viewport\n * The Grid Table instance which the row belongs to.\n */\n constructor(viewport) {\n /* *\n *\n * Properties\n *\n * */\n /**\n * The cells of the row.\n */\n this.cells = [];\n this.viewport = viewport;\n this.htmlElement = Row_makeHTMLElement('tr', {});\n this.htmlElement.setAttribute('role', 'row');\n }\n /**\n * Renders the row's content. It does not attach the row element to the\n * viewport nor pushes the rows to the viewport.rows array.\n */\n render() {\n const columns = this.viewport.columns;\n for (let i = 0, iEnd = columns.length; i < iEnd; i++) {\n const cell = this.createCell(columns[i]);\n cell.render();\n }\n this.rendered = true;\n if (this.viewport.virtualRows) {\n this.reflow();\n }\n }\n /**\n * Reflows the row's content dimensions.\n */\n reflow() {\n for (let j = 0, jEnd = this.cells.length; j < jEnd; ++j) {\n this.cells[j].reflow();\n }\n const vp = this.viewport;\n if (vp.rowsWidth) {\n this.htmlElement.style.width = vp.rowsWidth + 'px';\n }\n }\n /**\n * Destroys the row.\n */\n destroy() {\n if (!this.htmlElement) {\n return;\n }\n for (let i = this.cells.length - 1; i >= 0; --i) {\n this.cells[i].destroy();\n }\n this.htmlElement.remove();\n }\n /**\n * Returns the cell with the given column ID.\n *\n * @param columnId\n * The column ID that the cell belongs to.\n *\n * @returns\n * The cell with the given column ID or undefined if not found.\n */\n getCell(columnId) {\n return this.cells.find((cell) => cell.column?.id === columnId);\n }\n /**\n * Registers a cell in the row.\n *\n * @param cell\n * The cell to register.\n */\n registerCell(cell) {\n this.cells.push(cell);\n }\n /**\n * Unregister a cell from the row.\n *\n * @param cell\n * The cell to unregister.\n */\n unregisterCell(cell) {\n const index = this.cells.indexOf(cell);\n if (index > -1) {\n this.cells.splice(index, 1);\n }\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Table_Row = (Row);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Cell.js\n/* *\n *\n * Grid Cell abstract class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n/* *\n *\n * Abstract Class of Cell\n *\n * */\nclass Cell {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a cell in the data grid.\n *\n * @param row\n * The row of the cell.\n *\n * @param column\n * The column of the cell.\n */\n constructor(row, column) {\n /**\n * Array of cell events to be removed when the cell is destroyed.\n */\n this.cellEvents = [];\n this.column = column;\n this.row = row;\n this.row.registerCell(this);\n this.htmlElement = this.init();\n this.htmlElement.setAttribute('tabindex', '-1');\n if (!this.column?.options.cells?.editMode?.enabled) {\n this.htmlElement.setAttribute('aria-readonly', 'true');\n }\n this.initEvents();\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Init element.\n * @internal\n */\n init() {\n const cell = document.createElement('td', {});\n cell.setAttribute('role', 'gridcell');\n return cell;\n }\n /**\n * Initialize event listeners. Events added to the `cellEvents` array will\n * be registered now and unregistered when the cell is destroyed.\n */\n initEvents() {\n this.cellEvents.push(['blur', () => this.onBlur()]);\n this.cellEvents.push(['focus', () => this.onFocus()]);\n this.cellEvents.push(['click', (e) => {\n this.onClick(e);\n }]);\n this.cellEvents.push(['keydown', (e) => {\n this.onKeyDown(e);\n }]);\n this.cellEvents.forEach((pair) => {\n this.htmlElement.addEventListener(pair[0], pair[1]);\n });\n }\n /**\n * Handles the focus event on the cell.\n */\n onFocus() {\n this.row.viewport.setFocusAnchorCell(this);\n }\n /**\n * Handles the blur event on the cell.\n */\n onBlur() {\n delete this.row.viewport.focusCursor;\n }\n /**\n * Handles user keydown on the cell.\n *\n * @param e\n * Keyboard event object.\n */\n onKeyDown(e) {\n const { row, column } = this;\n if (!column) {\n return;\n }\n const vp = row.viewport;\n const { header } = vp;\n const getVerticalPos = () => {\n if (row.index !== void 0) {\n return row.index - vp.rows[0].index;\n }\n const level = row.level;\n if (!header || level === void 0) {\n return 0;\n }\n return Math.max(level, header.levels) - header.rows.length - 1;\n };\n const changeFocusKeys = {\n ArrowDown: [1, 0],\n ArrowUp: [-1, 0],\n ArrowLeft: [0, -1],\n ArrowRight: [0, 1]\n };\n const dir = changeFocusKeys[e.key];\n if (e.key === 'Enter') {\n this.onClick(e);\n }\n if (dir) {\n e.preventDefault();\n e.stopPropagation();\n const { header } = vp;\n const localRowIndex = getVerticalPos();\n const nextVerticalDir = localRowIndex + dir[0];\n if (nextVerticalDir < 0 && header) {\n const extraRowIdx = header.rows.length + nextVerticalDir;\n if (extraRowIdx + 1 > header.levels) {\n header.rows[extraRowIdx]\n .cells[column.index + dir[1]]?.htmlElement.focus();\n }\n else {\n vp.columns[column.index + dir[1]]\n ?.header?.htmlElement.focus();\n }\n return;\n }\n const nextRow = vp.rows[nextVerticalDir];\n if (nextRow) {\n nextRow.cells[column.index + dir[1]]?.htmlElement.focus();\n }\n }\n }\n /**\n * Renders the cell by appending the HTML element to the row.\n */\n render() {\n this.row.htmlElement.appendChild(this.htmlElement);\n this.reflow();\n }\n /**\n * Reflows the cell dimensions.\n */\n reflow() {\n const column = this.column;\n if (!column) {\n return;\n }\n const elementStyle = this.htmlElement.style;\n elementStyle.width = elementStyle.maxWidth = column.getWidth() + 'px';\n }\n /**\n * Returns the formatted string where the templating context is the cell.\n *\n * @param template\n * The template string.\n *\n * @return\n * The formatted string.\n */\n format(template) {\n return Core_Templating.format(template, this, this.row.viewport.grid);\n }\n /**\n * Sets the custom class name of the cell based on the template.\n *\n * @param template\n * The template string.\n */\n setCustomClassName(template) {\n const element = this.htmlElement;\n if (this.customClassName) {\n element.classList.remove(...this.customClassName.split(/\\s+/g));\n }\n if (!template) {\n delete this.customClassName;\n return;\n }\n const newClassName = this.format(template);\n if (!newClassName) {\n delete this.customClassName;\n return;\n }\n element.classList.add(...newClassName.split(/\\s+/g));\n this.customClassName = newClassName;\n }\n /**\n * Destroys the cell.\n */\n destroy() {\n this.cellEvents.forEach((pair) => {\n this.htmlElement.removeEventListener(pair[0], pair[1]);\n });\n this.column?.unregisterCell(this);\n this.row.unregisterCell(this);\n this.htmlElement.remove();\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Table_Cell = (Cell);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Actions/ColumnSorting.js\n/* *\n *\n * Grid ColumnSorting class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\nconst { fireEvent: ColumnSorting_fireEvent } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Class that manages sorting for a dedicated column.\n */\nclass ColumnSorting {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs sorting for a dedicated column.\n *\n * @param column\n * The column that be sorted.\n *\n * @param headerCellElement\n * The head element of the column.\n */\n constructor(column, headerCellElement) {\n /**\n * Toggle sorting order for the column in the order: asc -> desc -> none\n */\n this.toggle = () => {\n const viewport = this.column.viewport;\n const querying = viewport.grid.querying;\n const sortingController = querying.sorting;\n const currentOrder = (sortingController.currentSorting?.columnId === this.column.id ?\n sortingController.currentSorting.order : null) || 'none';\n const consequents = {\n none: 'asc',\n asc: 'desc',\n desc: null\n };\n void this.setOrder(consequents[currentOrder]);\n };\n this.column = column;\n this.headerCellElement = headerCellElement;\n this.addHeaderElementAttributes();\n if (column.options.sorting?.sortable) {\n headerCellElement.classList.add(Grid_Core_Globals.getClassName('columnSortable'));\n }\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Adds attributes to the column header.\n */\n addHeaderElementAttributes() {\n const col = this.column;\n const a11y = col.viewport.grid.accessibility;\n const sortingOptions = col.options.sorting;\n const { currentSorting } = col.viewport.grid.querying.sorting;\n const sortedAscClassName = Grid_Core_Globals.getClassName('columnSortedAsc');\n const sortedDescClassName = Grid_Core_Globals.getClassName('columnSortedDesc');\n const el = this.headerCellElement;\n if (currentSorting?.columnId !== col.id || !currentSorting?.order) {\n el.classList.remove(sortedAscClassName);\n el.classList.remove(sortedDescClassName);\n if (sortingOptions?.sortable) {\n a11y?.setColumnSortState(el, 'none');\n }\n return;\n }\n switch (currentSorting?.order) {\n case 'asc':\n el.classList.add(sortedAscClassName);\n el.classList.remove(sortedDescClassName);\n a11y?.setColumnSortState(el, 'ascending');\n break;\n case 'desc':\n el.classList.remove(sortedAscClassName);\n el.classList.add(sortedDescClassName);\n a11y?.setColumnSortState(el, 'descending');\n break;\n }\n }\n /**\n * Updates the column options with the new sorting state.\n *\n * @param col\n * The column to update.\n */\n updateColumnOptions(col) {\n const order = col.viewport.grid.querying.sorting.currentSorting?.order;\n if (col.id === this.column.id && order) {\n col.update({\n sorting: {\n order\n }\n }, false);\n }\n else {\n delete col.options.sorting?.order;\n if (col.options.sorting &&\n Object.keys(col.options.sorting).length < 1) {\n delete col.options.sorting;\n }\n }\n }\n /**\n * Set sorting order for the column. It will modify the presentation data\n * and rerender the rows.\n *\n * @param order\n * The order of sorting. It can be `'asc'`, `'desc'` or `null` if the\n * sorting should be disabled.\n */\n async setOrder(order) {\n const viewport = this.column.viewport;\n // Do not call sorting when cell is currently edited and validated.\n if (viewport.validator?.errorCell) {\n return;\n }\n const querying = viewport.grid.querying;\n const sortingController = querying.sorting;\n const a11y = viewport.grid.accessibility;\n [this.column, viewport.grid].forEach((source) => {\n ColumnSorting_fireEvent(source, 'beforeSort', {\n target: this.column,\n order\n });\n });\n sortingController.setSorting(order, this.column.id);\n await viewport.updateRows();\n for (const col of viewport.columns) {\n this.updateColumnOptions(col);\n col.sorting?.addHeaderElementAttributes();\n }\n a11y?.userSortedColumn(order);\n [this.column, viewport.grid].forEach((source) => {\n ColumnSorting_fireEvent(source, 'afterSort', {\n target: this.column,\n order\n });\n });\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Actions_ColumnSorting = (ColumnSorting);\n\n;// ./code/grid/es-modules/Grid/Core/UI/SvgIcons.js\n/* *\n *\n * Grid Svg Icons Registry\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Mikkel Espolin Birkeland\n * - Dawid Dragula\n *\n * */\n\n/* eslint-disable max-len */\n/* *\n *\n * Imports\n *\n * */\n\n/* *\n *\n * Constants\n *\n * */\n/**\n * Registry of all Grid Svg icons with their SVG path data.\n * Icons are designed for a 24x24 viewBox and use stroke-based rendering.\n */\nvar SvgIcons;\n(function (SvgIcons) {\n /**\n * The registry of all Grid Svg icons with their SVG path data.\n */\n SvgIcons.icons = {\n filter: {\n width: 16,\n height: 14,\n children: [{\n d: 'M2.2571 2.77791C1.75287 2.21437 1.50076 1.93259 1.49125 1.69312C1.48299 1.48509 1.57238 1.28515 1.73292 1.15259C1.91773 1 2.29583 1 3.05202 1H12.9473C13.7035 1 14.0816 1 14.2664 1.15259C14.427 1.28515 14.5163 1.48509 14.5081 1.69312C14.4986 1.93259 14.2465 2.21437 13.7422 2.77791L9.93808 7.02962C9.83756 7.14196 9.78731 7.19813 9.75147 7.26205C9.71969 7.31875 9.69637 7.37978 9.68225 7.44323C9.66633 7.51476 9.66633 7.59013 9.66633 7.74087V11.3056C9.66633 11.436 9.66633 11.5011 9.64531 11.5575C9.62673 11.6073 9.59651 11.6519 9.55717 11.6877C9.51265 11.7281 9.45213 11.7524 9.33108 11.8008L7.06441 12.7074C6.81938 12.8054 6.69687 12.8545 6.59852 12.834C6.51251 12.8161 6.43704 12.765 6.3885 12.6918C6.333 12.6081 6.333 12.4762 6.333 12.2122V7.74087C6.333 7.59013 6.333 7.51476 6.31708 7.44323C6.30296 7.37978 6.27964 7.31875 6.24786 7.26205C6.21203 7.19813 6.16177 7.14196 6.06126 7.02962L2.2571 2.77791Z'\n }]\n },\n menu: {\n width: 4,\n height: 12,\n children: [{\n d: 'M2.00016 6.66675C2.36835 6.66675 2.66683 6.36827 2.66683 6.00008C2.66683 5.63189 2.36835 5.33341 2.00016 5.33341C1.63197 5.33341 1.3335 5.63189 1.3335 6.00008C1.3335 6.36827 1.63197 6.66675 2.00016 6.66675Z'\n }, {\n d: 'M2.00016 2.00008C2.36835 2.00008 2.66683 1.7016 2.66683 1.33341C2.66683 0.965225 2.36835 0.666748 2.00016 0.666748C1.63197 0.666748 1.3335 0.965225 1.3335 1.33341C1.3335 1.7016 1.63197 2.00008 2.00016 2.00008Z'\n }, {\n d: 'M2.00016 11.3334C2.36835 11.3334 2.66683 11.0349 2.66683 10.6667C2.66683 10.2986 2.36835 10.0001 2.00016 10.0001C1.63197 10.0001 1.3335 10.2986 1.3335 10.6667C1.3335 11.0349 1.63197 11.3334 2.00016 11.3334Z'\n }]\n },\n chevronRight: {\n width: 6,\n height: 10,\n children: [{\n d: 'M1 9L5 5L1 1',\n 'stroke-width': 1.34\n }]\n },\n checkmark: {\n width: 12,\n height: 9,\n children: [{\n d: 'M11.3332 1L3.99984 8.33333L0.666504 5'\n }]\n },\n upDownArrows: {\n width: 14,\n height: 12,\n children: [{\n d: 'M3.66667 0.666748V11.3334M3.66667 11.3334L1 8.66675M3.66667 11.3334L6.33333 8.66675M10.3333 11.3334V0.666748M10.3333 0.666748L7.66667 3.33341M10.3333 0.666748L13 3.33341'\n }]\n },\n sortAsc: {\n width: 14,\n height: 12,\n children: [{\n d: 'M3.66667 0.666748V11.3334M3.66667 11.3334L1 8.66675M3.66667 11.3334L6.33333 8.66675',\n opacity: 0.2\n }, {\n d: 'M 10.3333 11.3334 V 0.6667 M 10.3333 0.6667 L 7.6667 3.3334 M 10.3333 0.6667 L 13 3.3334'\n }]\n },\n sortDesc: {\n width: 14,\n height: 12,\n children: [{\n d: 'M3.66667 0.666748V11.3334M3.66667 11.3334L1 8.66675M3.66667 11.3334L6.33333 8.66675'\n }, {\n d: 'M 10.3333 11.3334 V 0.6667 M 10.3333 0.6667 L 7.6667 3.3334 M 10.3333 0.6667 L 13 3.3334',\n opacity: 0.2\n }]\n }\n };\n /**\n * The default path definitions for the Grid Svg icons.\n */\n SvgIcons.pathDefaults = {\n stroke: 'currentColor',\n 'stroke-width': 1.33,\n 'stroke-linecap': 'round',\n 'stroke-linejoin': 'round'\n };\n /* *\n *\n * Functions\n *\n * */\n /**\n * Creates an SVG icon element from the SvgIcons registry.\n *\n * @param name\n * The name of the icon from SvgIcons registry\n *\n * @param className\n * CSS class name for the SVG element (default: 'hcg-icon')\n *\n * @returns\n * SVG element with the specified icon\n */\n function createGridIcon(name, className = Grid_Core_Globals.getClassName('icon')) {\n const createElement = (type) => document.createElementNS('http://www.w3.org/2000/svg', type);\n const { width = 16, height = 16, viewBox, fill, children } = SvgIcons.icons[name];\n const svg = createElement('svg');\n svg.setAttribute('width', width.toString());\n svg.setAttribute('height', height.toString());\n svg.setAttribute('viewBox', viewBox ?? `0 0 ${width} ${height}`);\n svg.setAttribute('fill', fill ?? 'none');\n for (const childDefinition of children ?? []) {\n const path = createElement('path');\n const attrKeys = new Set([\n ...Object.keys(childDefinition),\n ...Object.keys(SvgIcons.pathDefaults)\n ]);\n for (const attr of attrKeys) {\n const value = childDefinition[attr] ?? SvgIcons.pathDefaults[attr];\n if (value !== void 0) {\n path.setAttribute(attr, value.toString());\n }\n }\n svg.appendChild(path);\n }\n svg.classList.add(className);\n return svg;\n }\n SvgIcons.createGridIcon = createGridIcon;\n})(SvgIcons || (SvgIcons = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const UI_SvgIcons = (SvgIcons);\n\n;// ./code/grid/es-modules/Grid/Core/UI/ToolbarButton.js\n/* *\n *\n * Grid Toolbar Button class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\n\nconst { makeHTMLElement: ToolbarButton_makeHTMLElement } = Core_GridUtils;\n/* *\n *\n * Class\n *\n * */\nclass ToolbarButton {\n /* *\n *\n * Constructor\n *\n * */\n constructor(options) {\n /**\n * Used to remove the event listeners when the button is destroyed.\n */\n this.eventListenerDestroyers = [];\n /**\n * Whether the button is active.\n */\n this.isActive = false;\n this.options = options;\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Adds the button to the toolbar.\n *\n * @param toolbar\n * The toolbar to add the button to.\n */\n add(toolbar) {\n const cfg = this.options;\n this.toolbar = toolbar;\n toolbar.buttons.push(this);\n const wrapper = ToolbarButton_makeHTMLElement('span', cfg.classNameKey && {\n className: Grid_Core_Globals.getClassName(cfg.classNameKey)\n }, toolbar.container);\n this.wrapper = wrapper;\n const button = this.buttonEl = ToolbarButton_makeHTMLElement('button', {\n className: (Grid_Core_Globals.getClassName('button') +\n (this.isActive ? ' active' : ''))\n }, wrapper);\n button.setAttribute('type', 'button');\n button.setAttribute('tabindex', '-1');\n this.setA11yAttributes(button);\n this.setIcon(cfg.icon);\n this.refreshState();\n this.addEventListeners();\n return this;\n }\n setA11yAttributes(button) {\n const { accessibility, tooltip } = this.options;\n const { ariaLabel, ariaExpanded, ariaControls } = accessibility || {};\n if (tooltip) {\n button.title = tooltip;\n }\n if (ariaLabel) {\n button.setAttribute('aria-label', ariaLabel);\n }\n if (typeof ariaExpanded === 'boolean') {\n button.setAttribute('aria-expanded', ariaExpanded);\n }\n if (ariaControls) {\n button.setAttribute('aria-controls', ariaControls);\n }\n }\n focus() {\n this.buttonEl?.focus();\n const tb = this.toolbar;\n if (tb) {\n tb.focusCursor = tb.buttons.indexOf(this);\n }\n }\n /**\n * Sets the icon for the button.\n *\n * @param icon\n * The icon to set.\n */\n setIcon(icon) {\n this.icon?.remove();\n this.icon = UI_SvgIcons.createGridIcon(icon);\n this.buttonEl?.appendChild(this.icon);\n }\n setActive(active) {\n this.isActive = active;\n this.buttonEl?.classList.toggle('active', active);\n this.renderActiveIndicator(active);\n }\n setHighlighted(highlighted) {\n this.buttonEl?.classList.toggle('highlighted', highlighted);\n const ariaExpanded = this.options.accessibility?.ariaExpanded;\n if (typeof ariaExpanded === 'boolean') {\n this.buttonEl?.setAttribute('aria-expanded', highlighted);\n }\n }\n /**\n * Destroys the button.\n */\n destroy() {\n this.removeEventListeners();\n this.wrapper?.remove();\n // Unregister from toolbar\n this.toolbar?.buttons.splice(this.toolbar.buttons.indexOf(this), 1);\n delete this.toolbar;\n }\n /**\n * Initializes the state of the button.\n */\n refreshState() {\n // Do nothing, to be overridden by subclasses\n }\n /**\n * Handles the click event for the button.\n *\n * @param event\n * The mouse event.\n */\n clickHandler(event) {\n this.options.onClick?.(event, this);\n }\n /**\n * Renders the active indicator for the button.\n *\n * @param render\n * Whether the active indicator should be rendered.\n */\n renderActiveIndicator(render) {\n const button = this.buttonEl;\n if (!button) {\n return;\n }\n this.activeIndicator?.remove();\n if (!render) {\n delete this.activeIndicator;\n return;\n }\n this.activeIndicator = ToolbarButton_makeHTMLElement('div', {\n className: Grid_Core_Globals.getClassName('toolbarButtonActiveIndicator')\n }, button);\n }\n /**\n * Adds event listeners to the button.\n */\n addEventListeners() {\n const clickListener = (event) => {\n this.clickHandler(event);\n };\n this.buttonEl?.addEventListener('click', clickListener);\n this.eventListenerDestroyers.push(() => {\n this.buttonEl?.removeEventListener('click', clickListener);\n });\n }\n /**\n * Removes event listeners from the button.\n */\n removeEventListeners() {\n for (const destroyer of this.eventListenerDestroyers) {\n destroyer();\n }\n this.eventListenerDestroyers.length = 0;\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const UI_ToolbarButton = (ToolbarButton);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Header/ColumnToolbar/StateHelpers.js\n/* *\n *\n * Grid Header Cell State Helpers namespace\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n/* *\n *\n * Namespace\n *\n * */\nvar StateHelpers;\n(function (StateHelpers) {\n /**\n * Checks if the column is filtered.\n *\n * @param column\n * The column to check.\n */\n function isFiltered(column) {\n const { condition, value } = column.options.filtering || {};\n return !!(condition && (['empty', 'notEmpty', 'true', 'false'].includes(condition) ||\n (value !== void 0 && value !== '') // Accept null and 0\n ));\n }\n StateHelpers.isFiltered = isFiltered;\n /**\n * Checks if the column is sorted.\n *\n * @param column\n * The column to check.\n *\n * @param order\n * Optional sorting order to check for.\n *\n * @returns\n * True if the column is sorted. In case of `order` is provided, true\n * only if the column is sorted in the provided order.\n */\n function isSorted(column, order) {\n const { currentSorting } = column.viewport.grid.querying.sorting || {};\n if (currentSorting?.columnId !== column.id) {\n return false;\n }\n return order ?\n currentSorting?.order === order :\n !!currentSorting?.order;\n }\n StateHelpers.isSorted = isSorted;\n})(StateHelpers || (StateHelpers = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ColumnToolbar_StateHelpers = (StateHelpers);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/SortToolbarButton.js\n/* *\n *\n * Grid Sort Toolbar Button class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\n\nconst { addEvent: SortToolbarButton_addEvent } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\nclass SortToolbarButton extends UI_ToolbarButton {\n /* *\n *\n * Constructor\n *\n * */\n constructor() {\n super({\n icon: 'upDownArrows',\n classNameKey: 'headerCellSortIcon',\n accessibility: {\n ariaLabel: 'sort'\n }\n });\n }\n /* *\n *\n * Methods\n *\n * */\n clickHandler(event) {\n super.clickHandler(event);\n this.toolbar?.column.sorting?.toggle();\n }\n refreshState() {\n const column = this.toolbar?.column;\n if (!column) {\n return;\n }\n if (!ColumnToolbar_StateHelpers.isSorted(column)) {\n this.setActive(false);\n this.setIcon('upDownArrows');\n return;\n }\n const { currentSorting } = column.viewport.grid.querying.sorting;\n this.setActive(true);\n this.setIcon(currentSorting?.order === 'asc' ? 'sortAsc' : 'sortDesc');\n }\n addEventListeners() {\n super.addEventListeners();\n const column = this.toolbar?.column;\n if (!column) {\n return;\n }\n // If this grid is currently sorted, update the state\n this.eventListenerDestroyers.push(SortToolbarButton_addEvent(column.viewport.grid, 'afterSort', () => this.refreshState()));\n }\n renderActiveIndicator() {\n // Do nothing\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ToolbarButtons_SortToolbarButton = (SortToolbarButton);\n\n;// ./code/grid/es-modules/Grid/Core/UI/Popup.js\n/* *\n *\n * Grid Popup abstract class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\n\nconst { makeHTMLElement: Popup_makeHTMLElement } = Core_GridUtils;\nconst { fireEvent: Popup_fireEvent } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Abstract base class for for Grid popups.\n */\nclass Popup {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a popup for the given grid.\n *\n * @param grid\n * The grid that will own this popup.\n *\n * @param button\n * The button that opened the popup, if any.\n *\n * @param options\n * Popup options.\n */\n constructor(grid, button, options) {\n /**\n * Whether the popup is currently visible.\n */\n this.isVisible = false;\n /**\n * Event listener destroyers.\n */\n this.eventListenerDestroyers = [];\n this.grid = grid;\n this.button = button;\n this.options = options || {};\n }\n /**\n * Shows the popup positioned relative to the anchor element.\n *\n * @param anchorElement\n * The element to position the popup relative to.\n */\n show(anchorElement) {\n if (this.container) {\n return;\n }\n this.button?.setHighlighted(true);\n this.container = Popup_makeHTMLElement('div', {\n className: Grid_Core_Globals.getClassName('popup')\n });\n this.content = Popup_makeHTMLElement('div', {\n className: Grid_Core_Globals.getClassName('popupContent')\n });\n const { header } = this.options;\n if (header) {\n this.addHeader(header.label, header.category);\n }\n this.renderContent(this.content);\n this.container.appendChild(this.content);\n this.anchorElement = anchorElement;\n this.isVisible = true;\n this.grid.contentWrapper?.appendChild(this.container);\n this.position(anchorElement);\n this.addEventListeners();\n this.grid.popups.add(this);\n Popup_fireEvent(this, 'afterShow');\n }\n /**\n * Hides the popup. In reality, it just destroys the popup container and\n * removes the event listeners.\n */\n hide() {\n if (!this.container) {\n return;\n }\n this.grid.popups.delete(this);\n this.isVisible = false;\n // Remove event listeners\n this.removeEventListeners();\n this.container.remove();\n delete this.container;\n delete this.content;\n this.button?.setHighlighted(false);\n Popup_fireEvent(this, 'afterHide');\n }\n /**\n * Toggles the popup visibility.\n *\n * @param anchorElement\n * The element to position the popup relative to. If not provided, the popup\n * will be positioned relative to the parent element.\n */\n toggle(anchorElement) {\n if (this.isVisible) {\n this.hide();\n }\n else {\n this.show(anchorElement);\n }\n }\n /**\n * Reflows the popup.\n */\n reflow() {\n if (this.anchorElement?.isConnected) {\n this.position(this.anchorElement);\n }\n else {\n this.hide();\n }\n }\n /**\n * Positions the popup relative to the anchor element.\n *\n * @param anchorElement\n * The element to position relative to. If not provided, the popup will be\n * positioned relative to the parent element.\n */\n position(anchorElement) {\n const wrapper = this.grid.contentWrapper;\n if (!this.container || !this.content || !wrapper) {\n return;\n }\n const next = this.options.nextToAnchor || false;\n const popupRect = this.container.getBoundingClientRect();\n const parentRect = wrapper.getBoundingClientRect();\n const anchorRect = anchorElement?.getBoundingClientRect() ?? parentRect;\n const top = next ? anchorRect.top : anchorRect.bottom + 4;\n let left = next ? anchorRect.right + 3 : anchorRect.left;\n // If popup's right side is after the parent's right side, shift popup\n // to the left of the anchor element.\n if (left + popupRect.width > parentRect.width) {\n left = -popupRect.width + (next ? anchorRect.left + 4 : anchorRect.right);\n }\n // If popup's left side is before the parent's left side,\n // shift popup so it's aligned to parent's left.\n if (left < parentRect.left) {\n left = parentRect.left;\n }\n // Apply positioning\n this.container.style.top = `${top - parentRect.top}px`;\n this.container.style.left = `${left - parentRect.left}px`;\n // If the content is too tall, constrain the container to the bottom\n // of the parent to enable content Y-scrolling.\n const contentRect = this.content.getBoundingClientRect();\n if (contentRect.height + contentRect.top - parentRect.top >\n parentRect.height) {\n this.container.style.top = 'auto';\n this.container.style.bottom = '0';\n }\n else {\n this.container.style.top = `${top - parentRect.top}px`;\n this.container.style.bottom = 'auto';\n }\n }\n /**\n * Adds a header to the context menu.\n *\n * @param label\n * The label shown in the header of the context menu.\n *\n * @param category\n * The category shown in the header of the context menu, before the label.\n *\n * @returns\n * The header element.\n */\n addHeader(label, category) {\n if (!this.content) {\n return;\n }\n const container = Popup_makeHTMLElement('div', {\n className: Grid_Core_Globals.getClassName('menuHeader')\n }, this.content);\n if (category) {\n Popup_makeHTMLElement('span', {\n className: Grid_Core_Globals.getClassName('menuHeaderCategory'),\n innerText: category + ' '\n }, container);\n }\n Popup_makeHTMLElement('span', {\n className: Grid_Core_Globals.getClassName('menuHeaderName'),\n innerText: label\n }, container);\n return container;\n }\n /**\n * Handles key down events.\n *\n * @param e\n * Keyboard event\n */\n onKeyDown(e) {\n if (e.key === 'Escape' || (e.key === 'Tab' && e.shiftKey)) {\n e.preventDefault();\n this.hide();\n this.button?.focus();\n }\n }\n /**\n * Handles click outside events.\n *\n * @param e\n * Mouse event\n */\n onClickOutside(e) {\n if (!this.container?.contains(e.target) &&\n !this.anchorElement?.contains(e.target)) {\n this.hide();\n }\n }\n /**\n * Adds event listeners for click outside and escape key.\n */\n addEventListeners() {\n const container = this.container;\n if (!container) {\n return;\n }\n const clickOutsideListener = (event) => {\n this.onClickOutside(event);\n };\n const keyDownListener = (event) => {\n this.onKeyDown(event);\n };\n document.addEventListener('mousedown', clickOutsideListener);\n container.addEventListener('keydown', keyDownListener);\n this.eventListenerDestroyers.push(() => {\n document.removeEventListener('mousedown', clickOutsideListener);\n container.removeEventListener('keydown', keyDownListener);\n });\n }\n /**\n * Removes event listeners.\n */\n removeEventListeners() {\n for (const destroyer of this.eventListenerDestroyers) {\n destroyer();\n }\n this.eventListenerDestroyers.length = 0;\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const UI_Popup = (Popup);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Header/ColumnToolbar/FilterPopup.js\n/* *\n *\n * Grid Filter Popup class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\nconst { merge: FilterPopup_merge } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * The column filtering popup.\n */\nclass FilterPopup extends UI_Popup {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a column filtering popup.\n *\n * @param filtering\n * The column filtering.\n *\n * @param button\n * The button that opened the popup.\n *\n * @param options\n * Popup options.\n */\n constructor(filtering, button, options) {\n const grid = filtering.column.viewport.grid;\n super(grid, button, FilterPopup_merge({\n header: {\n category: grid.options?.lang?.setFilter,\n label: filtering.column.header?.value || ''\n }\n }, options));\n this.filtering = filtering;\n }\n /* *\n *\n * Methods\n *\n * */\n show(anchorElement) {\n super.show(anchorElement);\n this.filtering.filterSelect?.focus();\n }\n renderContent(contentElement) {\n this.filtering.renderFilteringContent(contentElement);\n }\n onKeyDown(event) {\n super.onKeyDown(event);\n this.filtering.onKeyDown(event);\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ColumnToolbar_FilterPopup = (FilterPopup);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/FilterToolbarButton.js\n/* *\n *\n * Grid Filter Toolbar Button class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\n\n\nconst { addEvent: FilterToolbarButton_addEvent } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\nclass FilterToolbarButton extends UI_ToolbarButton {\n /* *\n *\n * Constructor\n *\n * */\n constructor() {\n super({\n icon: 'filter',\n classNameKey: 'headerCellFilterIcon',\n accessibility: {\n ariaLabel: 'filter',\n ariaExpanded: false,\n ariaControls: 'filter-popup'\n }\n });\n }\n /* *\n *\n * Methods\n *\n * */\n refreshState() {\n const column = this.toolbar?.column;\n if (column) {\n this.setActive(ColumnToolbar_StateHelpers.isFiltered(column));\n }\n }\n addEventListeners() {\n super.addEventListeners();\n const toolbar = this.toolbar;\n if (!toolbar) {\n return;\n }\n this.eventListenerDestroyers.push(FilterToolbarButton_addEvent(toolbar.column, 'afterFilter', () => {\n this.refreshState();\n }));\n }\n clickHandler(event) {\n super.clickHandler(event);\n const filtering = this.toolbar?.column.filtering;\n if (!filtering) {\n return;\n }\n if (!this.popup) {\n this.popup = new ColumnToolbar_FilterPopup(filtering, this);\n }\n this.popup.toggle(this.wrapper);\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ToolbarButtons_FilterToolbarButton = (FilterToolbarButton);\n\n;// ./code/grid/es-modules/Grid/Core/UI/ContextMenu.js\n/* *\n *\n * Grid Context Menu abstract class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n/* *\n *\n * Imports\n *\n * */\n\n\n\nconst { makeHTMLElement: ContextMenu_makeHTMLElement } = Core_GridUtils;\n/* *\n *\n * Class\n *\n * */\n/**\n * The context menu.\n */\nclass ContextMenu extends UI_Popup {\n constructor() {\n /* *\n *\n * Properties\n *\n * */\n super(...arguments);\n /**\n * The array of buttons in the context menu.\n */\n this.buttons = [];\n /**\n * The index of the focused button in the context menu.\n */\n this.focusCursor = 0;\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Ensures that the items container element is created.\n *\n * @returns\n * The items container element.\n */\n ensureItemsContainer() {\n if (!this.content) {\n return;\n }\n if (this.itemsContainer) {\n return this.itemsContainer;\n }\n this.itemsContainer = ContextMenu_makeHTMLElement('ul', {\n className: Grid_Core_Globals.getClassName('menuContainer')\n }, this.content);\n return this.itemsContainer;\n }\n show(anchorElement) {\n super.show(anchorElement);\n this.buttons[0]?.focus();\n }\n hide() {\n for (const btn of this.buttons) {\n btn.destroy();\n }\n this.buttons.length = 0;\n this.itemsContainer?.remove();\n delete this.itemsContainer;\n super.hide();\n }\n /**\n * Adds a divider to the context menu.\n *\n * @returns\n * The divider element.\n */\n addDivider() {\n if (!this.ensureItemsContainer()) {\n return;\n }\n return ContextMenu_makeHTMLElement('li', {\n className: Grid_Core_Globals.getClassName('menuDivider')\n }, this.itemsContainer);\n }\n onClickOutside(event) {\n const buttons = this.buttons;\n for (let i = 0, iEnd = buttons.length; i < iEnd; ++i) {\n if (buttons[i].popup?.container?.contains(event.target)) {\n return;\n }\n }\n super.onClickOutside(event);\n }\n onKeyDown(e) {\n super.onKeyDown(e);\n const len = this.buttons.length;\n const cursor = this.focusCursor;\n switch (e.key) {\n case 'ArrowUp':\n case 'ArrowLeft':\n e.preventDefault();\n this.buttons[Math.abs((cursor - 1 + len) % len)].focus();\n break;\n case 'ArrowDown':\n case 'ArrowRight':\n e.preventDefault();\n this.buttons[(cursor + 1) % len].focus();\n break;\n }\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const UI_ContextMenu = (ContextMenu);\n\n;// ./code/grid/es-modules/Grid/Core/UI/ContextMenuButton.js\n/* *\n *\n * Grid Context Menu Button class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\n\nconst { makeHTMLElement: ContextMenuButton_makeHTMLElement } = Core_GridUtils;\n/* *\n *\n * Class\n *\n * */\nclass ContextMenuButton {\n /* *\n *\n * Constructor\n *\n * */\n constructor(options) {\n /**\n * Used to remove the event listeners when the button is destroyed.\n */\n this.eventListenerDestroyers = [];\n /**\n * Whether the button is active.\n */\n this.isActive = false;\n this.options = options;\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Adds the button to the context menu.\n *\n * @param contextMenu\n * The context menu to add the button to.\n */\n add(contextMenu) {\n const cfg = this.options;\n this.contextMenu = contextMenu;\n contextMenu.buttons.push(this);\n const container = contextMenu.ensureItemsContainer();\n if (!container) {\n return;\n }\n const liEl = this.wrapper = ContextMenuButton_makeHTMLElement('li', cfg.classNameKey && {\n className: Grid_Core_Globals.getClassName(cfg.classNameKey)\n }, container);\n const buttonEl = this.buttonEl = ContextMenuButton_makeHTMLElement('button', {\n className: Grid_Core_Globals.getClassName('menuItem')\n }, liEl);\n const iconEl = this.iconWrapper = ContextMenuButton_makeHTMLElement('span', {\n className: Grid_Core_Globals.getClassName('menuItemIcon')\n }, buttonEl);\n this.spanEl = ContextMenuButton_makeHTMLElement('span', {\n className: Grid_Core_Globals.getClassName('menuItemLabel'),\n innerText: cfg.label || ''\n }, buttonEl);\n const chevronEl = ContextMenuButton_makeHTMLElement('span', {\n className: Grid_Core_Globals.getClassName('menuItemIcon')\n }, buttonEl);\n iconEl.setAttribute('aria-hidden', 'true');\n chevronEl.setAttribute('aria-hidden', 'true');\n buttonEl.setAttribute('type', 'button');\n buttonEl.setAttribute('tabindex', '-1');\n this.refreshState();\n if (cfg.chevron) {\n chevronEl.appendChild(UI_SvgIcons.createGridIcon('chevronRight'));\n }\n if (cfg.icon) {\n this.setIcon(cfg.icon);\n }\n this.addEventListeners();\n return this;\n }\n focus() {\n this.buttonEl?.focus();\n const cm = this.contextMenu;\n if (cm) {\n cm.focusCursor = cm.buttons.indexOf(this);\n }\n }\n setLabel(label) {\n if (this.spanEl) {\n this.spanEl.innerText = label;\n }\n }\n /**\n * Sets the icon for the button.\n *\n * @param icon\n * The icon to set.\n */\n setIcon(icon) {\n this.icon?.remove();\n if (!icon) {\n return;\n }\n this.icon = UI_SvgIcons.createGridIcon(icon);\n this.iconWrapper?.appendChild(this.icon);\n }\n setActive(active) {\n this.isActive = active;\n this.buttonEl?.classList.toggle('active', active);\n const { activeIcon, icon } = this.options;\n if (activeIcon) {\n this.setIcon(active ? activeIcon : icon);\n }\n }\n setHighlighted(highlighted) {\n this.buttonEl?.classList.toggle('highlighted', highlighted);\n }\n /**\n * Destroys the button.\n */\n destroy() {\n this.removeEventListeners();\n this.wrapper?.remove();\n // Unregister from the context menu\n const cm = this.contextMenu;\n if (cm) {\n cm.buttons.splice(cm.buttons.indexOf(this), 1);\n delete this.contextMenu;\n }\n }\n /**\n * Initializes the state of the button.\n */\n refreshState() {\n // Do nothing, to be overridden by subclasses\n }\n /**\n * Handles the click event for the button.\n *\n * @param event\n * The mouse event.\n */\n clickHandler(event) {\n this.options.onClick?.(event, this);\n }\n /**\n * Adds event listeners to the button.\n */\n addEventListeners() {\n const clickListener = (event) => {\n this.clickHandler(event);\n };\n this.buttonEl?.addEventListener('click', clickListener);\n this.eventListenerDestroyers.push(() => {\n this.buttonEl?.removeEventListener('click', clickListener);\n });\n }\n /**\n * Removes event listeners from the button.\n */\n removeEventListeners() {\n for (const destroyer of this.eventListenerDestroyers) {\n destroyer();\n }\n this.eventListenerDestroyers.length = 0;\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const UI_ContextMenuButton = (ContextMenuButton);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/FilterMenuButton.js\n/* *\n *\n * Grid Filter Context Menu Button class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\n\n\nconst { addEvent: FilterMenuButton_addEvent } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\nclass FilterMenuButton_FilterToolbarButton extends UI_ContextMenuButton {\n /* *\n *\n * Constructor\n *\n * */\n constructor(langOptions) {\n super({\n label: langOptions.filter,\n icon: 'filter',\n chevron: true\n });\n }\n /* *\n *\n * Methods\n *\n * */\n refreshState() {\n const column = this.contextMenu?.button.toolbar?.column;\n if (column) {\n this.setActive(ColumnToolbar_StateHelpers.isFiltered(column));\n }\n }\n addEventListeners() {\n super.addEventListeners();\n const toolbar = this.contextMenu?.button.toolbar;\n if (!toolbar) {\n return;\n }\n this.eventListenerDestroyers.push(FilterMenuButton_addEvent(toolbar.column, 'afterFilter', () => {\n this.refreshState();\n }));\n }\n clickHandler(event) {\n super.clickHandler(event);\n const filtering = this.contextMenu?.button.toolbar?.column.filtering;\n if (!filtering) {\n return;\n }\n if (!this.popup) {\n this.popup = new ColumnToolbar_FilterPopup(filtering, this, {\n nextToAnchor: true\n });\n }\n this.popup.toggle(this.wrapper);\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const FilterMenuButton = (FilterMenuButton_FilterToolbarButton);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuButtons/SortMenuButton.js\n/* *\n *\n * Grid Sort Context Menu Button class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\n\nconst { addEvent: SortMenuButton_addEvent } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\nclass SortMenuButton extends UI_ContextMenuButton {\n /* *\n *\n * Constructor\n *\n * */\n constructor(langOptions, direction) {\n super({ icon: direction === 'asc' ? 'sortAsc' : 'sortDesc' });\n this.direction = direction;\n this.options.label = langOptions[direction === 'asc' ? 'sortAscending' : 'sortDescending'];\n }\n /* *\n *\n * Methods\n *\n * */\n refreshState() {\n const column = this.contextMenu?.button?.toolbar?.column;\n if (!column) {\n return;\n }\n this.setActive(ColumnToolbar_StateHelpers.isSorted(column, this.direction));\n }\n addEventListeners() {\n super.addEventListeners();\n const column = this.contextMenu?.button?.toolbar?.column;\n if (!column) {\n return;\n }\n // If this grid is currently sorted, update the state\n this.eventListenerDestroyers.push(SortMenuButton_addEvent(column.viewport.grid, 'afterSort', () => this.refreshState()));\n }\n clickHandler(event) {\n super.clickHandler(event);\n const sorting = this.contextMenu?.button?.toolbar?.column.sorting;\n if (!sorting) {\n return;\n }\n void sorting.setOrder(this.isActive ? null : this.direction);\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const MenuButtons_SortMenuButton = (SortMenuButton);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Header/ColumnToolbar/MenuPopup.js\n/* *\n *\n * Grid Menu Popup class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\n\n/* *\n *\n * Class\n *\n * */\n/**\n * The column filtering popup.\n */\nclass MenuPopup extends UI_ContextMenu {\n /* *\n *\n * Constructor\n *\n * */\n constructor(grid, button) {\n super(grid, button);\n this.button = button;\n }\n /* *\n *\n * Methods\n *\n * */\n renderContent() {\n const lang = this.grid.options?.lang || {};\n const columnOptions = this.button.toolbar?.column.options || {};\n const filteringEnabled = (columnOptions.filtering?.enabled &&\n !columnOptions.filtering.inline);\n const sortingEnabled = columnOptions.sorting?.sortable;\n this.addHeader(this.button.toolbar?.column.header?.value || '', lang.column);\n if (sortingEnabled) {\n new MenuButtons_SortMenuButton(lang, 'desc').add(this);\n new MenuButtons_SortMenuButton(lang, 'asc').add(this);\n if (filteringEnabled) {\n this.addDivider();\n }\n }\n if (filteringEnabled) {\n new FilterMenuButton(lang || {}).add(this);\n }\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ColumnToolbar_MenuPopup = (MenuPopup);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Header/ColumnToolbar/ToolbarButtons/MenuToolbarButton.js\n/* *\n *\n * Grid Menu Toolbar Button class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\n\n\nconst { addEvent: MenuToolbarButton_addEvent } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\nclass MenuToolbarButton extends UI_ToolbarButton {\n /* *\n *\n * Constructor\n *\n * */\n constructor() {\n super({\n icon: 'menu',\n classNameKey: 'headerCellMenuIcon'\n });\n }\n /* *\n *\n * Methods\n *\n * */\n clickHandler(event) {\n super.clickHandler(event);\n const grid = this.toolbar?.column.viewport.grid;\n if (!grid) {\n return;\n }\n if (!this.popup) {\n this.popup = new ColumnToolbar_MenuPopup(grid, this);\n }\n this.popup.toggle(this.wrapper);\n }\n refreshState() {\n const column = this.toolbar?.column;\n if (!column) {\n return;\n }\n this.setActive(ColumnToolbar_StateHelpers.isSorted(column) ||\n ColumnToolbar_StateHelpers.isFiltered(column));\n }\n addEventListeners() {\n super.addEventListeners();\n const column = this.toolbar?.column;\n if (!column) {\n return;\n }\n this.eventListenerDestroyers.push(MenuToolbarButton_addEvent(column.viewport.grid, 'afterSort', () => {\n this.refreshState();\n }), MenuToolbarButton_addEvent(column, 'afterFilter', () => {\n this.refreshState();\n }));\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ToolbarButtons_MenuToolbarButton = (MenuToolbarButton);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Header/ColumnToolbar/ColumnToolbar.js\n/* *\n *\n * Grid Header Cell Toolbar class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\n\n\n\n\nconst { makeHTMLElement: ColumnToolbar_makeHTMLElement } = Core_GridUtils;\nconst { getStyle: ColumnToolbar_getStyle } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\nclass HeaderCellToolbar {\n /* *\n *\n * Constructor\n *\n * */\n constructor(column) {\n this.buttons = [];\n this.focusCursor = 0;\n /**\n * The event listener destroyers of the toolbar.\n */\n this.eventListenerDestroyers = [];\n this.column = column;\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Initializes the buttons of the toolbar.\n */\n renderFull() {\n const columnOptions = this.column.options;\n if (columnOptions.sorting?.sortable) {\n new ToolbarButtons_SortToolbarButton().add(this);\n }\n if (columnOptions.filtering?.enabled &&\n !columnOptions.filtering.inline) {\n new ToolbarButtons_FilterToolbarButton().add(this);\n }\n }\n renderMinimized() {\n const columnOptions = this.column.options;\n if (columnOptions.sorting?.sortable || (columnOptions.filtering?.enabled &&\n !columnOptions.filtering.inline)) {\n new ToolbarButtons_MenuToolbarButton().add(this);\n }\n }\n /**\n * Render the toolbar.\n */\n add() {\n const headerCell = this.column.header;\n if (!headerCell?.container) {\n return;\n }\n if (this.columnResizeObserver) {\n this.columnResizeObserver.disconnect();\n delete this.columnResizeObserver;\n }\n this.columnResizeObserver = new ResizeObserver(() => this.reflow());\n this.columnResizeObserver.observe(headerCell.container);\n const container = this.container = ColumnToolbar_makeHTMLElement('div', {\n className: Grid_Core_Globals.getClassName('headerCellIcons')\n });\n headerCell.container.appendChild(container);\n const onKeyDown = (e) => {\n this.keyDownHandler(e);\n };\n container.addEventListener('keydown', onKeyDown);\n this.eventListenerDestroyers.push(() => {\n container.removeEventListener('keydown', onKeyDown);\n });\n }\n /**\n * Destroys all buttons of the toolbar.\n */\n clearButtons() {\n const { buttons } = this;\n while (buttons.length > 0) {\n buttons[buttons.length - 1].destroy();\n }\n }\n /**\n * Reflows the toolbar. It is called when the column is resized.\n */\n reflow() {\n const width = this.column.getWidth();\n const shouldBeMinimized = width <= HeaderCellToolbar.MINIMIZED_COLUMN_WIDTH;\n if (shouldBeMinimized !== this.isMinimized) {\n this.isMinimized = shouldBeMinimized;\n this.clearButtons();\n if (shouldBeMinimized) {\n this.renderMinimized();\n }\n else {\n this.renderFull();\n }\n }\n if (!shouldBeMinimized) {\n return;\n }\n const parent = this.column.header?.htmlElement;\n const container = this.container;\n const parentWidth = parent?.offsetWidth || 0;\n const containerWidth = this.buttons[0]?.wrapper?.offsetWidth || 0;\n const parentPaddings = ((parent && ColumnToolbar_getStyle(parent, 'padding-left', true) || 0) +\n (parent && ColumnToolbar_getStyle(parent, 'padding-right', true) || 0));\n const containerMargins = ((container && ColumnToolbar_getStyle(container, 'margin-left', true) || 0) +\n (container && ColumnToolbar_getStyle(container, 'margin-right', true) || 0));\n const shouldBeCentered = parentWidth - parentPaddings < containerWidth + containerMargins;\n if (this.isMenuCentered !== shouldBeCentered) {\n this.isMenuCentered = shouldBeCentered;\n this.column.header?.container?.classList.toggle(Grid_Core_Globals.getClassName('noWidth'), shouldBeCentered);\n }\n }\n /**\n * Destroy the toolbar.\n */\n destroy() {\n for (const destroyer of this.eventListenerDestroyers) {\n destroyer();\n }\n this.eventListenerDestroyers.length = 0;\n this.columnResizeObserver?.disconnect();\n delete this.columnResizeObserver;\n }\n /**\n * Focuses the first button of the toolbar.\n */\n focus() {\n this.buttons[0]?.focus();\n }\n /**\n * Handles the key down event on the toolbar.\n *\n * @param e\n * Keyboard event object.\n */\n keyDownHandler(e) {\n const len = this.buttons.length;\n const cursor = this.focusCursor;\n switch (e.key) {\n case 'ArrowUp':\n case 'ArrowLeft':\n this.buttons[Math.abs((cursor - 1 + len) % len)].focus();\n break;\n case 'ArrowDown':\n case 'ArrowRight':\n this.buttons[(cursor + 1) % len].focus();\n break;\n case 'Escape':\n this.column.header?.htmlElement.focus();\n break;\n }\n }\n}\n/**\n * The maximum width of the column to be minimized.\n */\nHeaderCellToolbar.MINIMIZED_COLUMN_WIDTH = 120;\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ColumnToolbar = (HeaderCellToolbar);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Header/HeaderCell.js\n/* *\n *\n * Grid HeaderCell class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\n\n\n\n\nconst { makeHTMLElement: HeaderCell_makeHTMLElement, setHTMLContent: HeaderCell_setHTMLContent, createOptionsProxy: HeaderCell_createOptionsProxy } = Core_GridUtils;\nconst { fireEvent: HeaderCell_fireEvent, isString: HeaderCell_isString } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a cell in the data grid header.\n */\nclass HeaderCell extends Table_Cell {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a cell in the data grid header.\n *\n * @param row\n * The row of the cell.\n *\n * @param column\n * The column of the cell.\n *\n * @param columnsTree\n * If the cell is a wider than one column, this property contains the\n * structure of the columns that are subordinated to the header cell.\n */\n constructor(row, column, columnsTree) {\n super(row, column);\n /**\n * Reference to options taken from the header settings, that will override\n * the column options.\n * @internal\n */\n this.superColumnOptions = {};\n /**\n * List of columns that are subordinated to the header cell.\n */\n this.columns = [];\n /**\n * Content value of the header cell.\n */\n this.value = '';\n const header = this.row.viewport.header;\n if (!header) {\n throw new Error('No header found.');\n }\n this.tableHeader = header;\n if (column) {\n column.header = this;\n this.columns.push(column);\n }\n else if (columnsTree) {\n const vp = this.row.viewport;\n const columnIds = vp.grid.getColumnIds(columnsTree, true);\n for (const columnId of columnIds) {\n const column = vp.getColumn(columnId);\n if (column) {\n this.columns.push(column);\n }\n }\n }\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Init element.\n */\n init() {\n const elem = document.createElement('th', {});\n elem.classList.add(Grid_Core_Globals.getClassName('headerCell'));\n elem.setAttribute('role', 'columnheader');\n return elem;\n }\n /**\n * Render the cell container.\n */\n render() {\n const { column } = this;\n const options = HeaderCell_createOptionsProxy(this.superColumnOptions, column?.options);\n const headerCellOptions = options.header || {};\n if (headerCellOptions.formatter) {\n this.value = headerCellOptions.formatter.call(this).toString();\n }\n else if (HeaderCell_isString(headerCellOptions.format)) {\n this.value = column ?\n column.format(headerCellOptions.format) :\n headerCellOptions.format;\n }\n else {\n this.value = column?.id || '';\n }\n // Render content of th element\n this.row.htmlElement.appendChild(this.htmlElement);\n // Create flex container for header content and icons\n const container = this.container = HeaderCell_makeHTMLElement('div', {\n className: Grid_Core_Globals.getClassName('headerCellContainer')\n }, this.htmlElement);\n this.headerContent = HeaderCell_makeHTMLElement('span', {\n className: Grid_Core_Globals.getClassName('headerCellContent')\n }, container);\n // Render the header cell element content.\n HeaderCell_setHTMLContent(this.headerContent, this.value);\n this.htmlElement.setAttribute('scope', 'col');\n if (this.superColumnOptions.className) {\n this.htmlElement.classList.add(...this.superColumnOptions.className.split(/\\s+/g));\n }\n if (column) {\n this.htmlElement.setAttribute('data-column-id', column.id);\n this.htmlElement.setAttribute('aria-label', column.id);\n // Add user column classname\n if (column.options.className) {\n this.htmlElement.classList.add(...column.options.className.split(/\\s+/g));\n }\n // Add resizing\n column.viewport.columnsResizer?.renderColumnDragHandles(column, this);\n // Add toolbar\n this.toolbar = new ColumnToolbar(column);\n this.toolbar.add();\n // Add sorting\n this.initColumnSorting();\n }\n this.setCustomClassName(options.header?.className);\n // Add alignment to number column\n if (column?.dataType === 'number') {\n this.setCustomClassName(Grid_Core_Globals.getClassName('rightAlign'));\n }\n HeaderCell_fireEvent(this, 'afterRender', { column });\n }\n reflow() {\n const th = this.htmlElement;\n if (!th) {\n return;\n }\n let width = 0;\n for (const column of this.columns) {\n width += column.getWidth() || 0;\n }\n // Set the width of the column. Max width is needed for the\n // overflow: hidden to work.\n th.style.width = th.style.maxWidth = width + 'px';\n this.toolbar?.reflow();\n }\n onKeyDown(e) {\n if (!this.column || e.target !== this.htmlElement) {\n return;\n }\n if (e.key === 'Enter') {\n this.toolbar?.focus();\n e.preventDefault();\n return;\n }\n super.onKeyDown(e);\n }\n onClick(e) {\n const column = this.column;\n if (!column || (e.target !== this.htmlElement &&\n e.target !== column.header?.headerContent) || column.viewport.columnsResizer?.isResizing) {\n return;\n }\n if (column.options.sorting?.sortable) {\n column.sorting?.toggle();\n }\n HeaderCell_fireEvent(this, 'click', {\n originalEvent: e,\n column: this.column\n });\n }\n /**\n * Add sorting option to the column.\n */\n initColumnSorting() {\n const { column } = this;\n if (!column) {\n return;\n }\n column.sorting = new Actions_ColumnSorting(column, this.htmlElement);\n }\n /**\n * Check if the cell is part of the last cell in the header.\n */\n isLastColumn() {\n const vp = this.row.viewport;\n const lastViewportColumn = vp.columns[vp.columns.length - 1];\n const lastCellColumn = this.columns?.[this.columns.length - 1];\n return lastViewportColumn === lastCellColumn;\n }\n destroy() {\n this.toolbar?.destroy();\n super.destroy();\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Header_HeaderCell = (HeaderCell);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Header/HeaderRow.js\n/* *\n *\n * Grid HeaderRow class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\n\n\nconst { isString: HeaderRow_isString } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a row in the data grid header.\n */\nclass HeaderRow extends Table_Row {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a row in the data grid.\n *\n * @param viewport\n * The Grid Table instance which the row belongs to.\n *\n * @param level\n * The current level of header that is rendered.\n */\n constructor(viewport, level) {\n super(viewport);\n this.level = level;\n this.setRowAttributes();\n }\n /* *\n *\n * Methods\n *\n * */\n createCell(column, columnsTree) {\n return new Header_HeaderCell(this, column, columnsTree);\n }\n /**\n * Renders the row's content in the header.\n *\n * @param level\n * The current level in the header tree\n *\n * @internal\n */\n renderContent(level) {\n const headerOpt = this.viewport.grid.options?.header;\n const vp = this.viewport;\n const enabledColumns = vp.grid.enabledColumns || [];\n // Render element\n vp.theadElement?.appendChild(this.htmlElement);\n this.htmlElement.classList.add(Grid_Core_Globals.getClassName('headerRow'));\n if (!headerOpt) {\n super.render();\n }\n else {\n const columnsOnLevel = this.getColumnsAtLevel(headerOpt, level);\n for (let i = 0, iEnd = columnsOnLevel.length; i < iEnd; i++) {\n const columnOnLevel = columnsOnLevel[i];\n const colIsString = typeof columnOnLevel === 'string';\n const colSpan = (!colIsString && columnOnLevel.columns) ?\n vp.grid.getColumnIds(columnOnLevel.columns).length : 0;\n const columnId = colIsString ?\n columnOnLevel : columnOnLevel.columnId;\n const dataColumn = columnId ?\n vp.getColumn(columnId || '') : void 0;\n const headerFormat = !colIsString ?\n columnOnLevel.format : void 0;\n const className = !colIsString ?\n columnOnLevel.className : void 0;\n // Skip hidden column or header when all columns are hidden.\n if ((columnId && enabledColumns &&\n enabledColumns.indexOf(columnId) < 0) || (!dataColumn && colSpan === 0)) {\n continue;\n }\n const headerCell = this.createCell(dataColumn, !colIsString ? columnOnLevel.columns : void 0);\n if (!colIsString) {\n vp.grid.accessibility?.addHeaderCellDescription(headerCell.htmlElement, columnOnLevel.accessibility?.description);\n }\n if (HeaderRow_isString(headerFormat)) {\n if (!headerCell.superColumnOptions.header) {\n headerCell.superColumnOptions.header = {};\n }\n headerCell.superColumnOptions.header.format = headerFormat;\n }\n if (className) {\n headerCell.superColumnOptions.className = className;\n }\n // Add class to disable left border on first column\n if (dataColumn?.index === 0 && i === 0) {\n headerCell.htmlElement.classList.add(Grid_Core_Globals.getClassName('columnFirst'));\n }\n headerCell.render();\n if (columnId) {\n headerCell.htmlElement.setAttribute('rowSpan', (this.viewport.header?.levels || 1) - level);\n }\n else {\n if (colSpan > 1) {\n headerCell.htmlElement.setAttribute('colSpan', colSpan);\n }\n }\n }\n }\n this.setLastCellClass();\n }\n reflow() {\n const row = this;\n for (let i = 0, iEnd = row.cells.length; i < iEnd; i++) {\n const cell = row.cells[i];\n cell.reflow();\n }\n }\n /**\n * Sets a specific class to the last cell in the row.\n */\n setLastCellClass() {\n const lastCell = this.cells[this.cells.length - 1];\n if (lastCell.isLastColumn()) {\n lastCell.htmlElement.classList.add(Grid_Core_Globals.getClassName('lastHeaderCellInRow'));\n }\n }\n /**\n * Get all headers that should be rendered in a level.\n *\n * @param scope\n * Level that we start from\n *\n * @param targetLevel\n * Max level\n *\n * @param currentLevel\n * Current level\n *\n * @return\n * Array of headers that should be rendered in a level\n */\n getColumnsAtLevel(scope, targetLevel, currentLevel = 0) {\n let result = [];\n for (const column of scope) {\n if (currentLevel === targetLevel) {\n result.push(column);\n }\n if (typeof column !== 'string' && column.columns) {\n result = result.concat(this.getColumnsAtLevel(column.columns, targetLevel, currentLevel + 1));\n }\n }\n return result;\n }\n /**\n * Sets the row HTML element attributes and additional classes.\n */\n setRowAttributes() {\n this.viewport.grid.accessibility?.setRowIndex(this.htmlElement, this.level // Level (1-based)\n );\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Header_HeaderRow = (HeaderRow);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterCell.js\n/* *\n *\n * Grid Filter Cell class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\nconst { fireEvent: FilterCell_fireEvent } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a cell in the data grid header.\n */\nclass FilterCell extends Header_HeaderCell {\n /* *\n *\n * Constructor\n *\n * */\n constructor(row, column) {\n const trueHeader = column.header;\n super(row, column);\n column.header = trueHeader;\n }\n /* *\n *\n * Methods\n *\n * */\n render() {\n const { column } = this;\n if (!column) {\n return;\n }\n // Render content of th element\n this.row.htmlElement.appendChild(this.htmlElement);\n this.htmlElement.setAttribute('scope', 'col');\n this.htmlElement.setAttribute('data-column-id', column.id);\n // Add user column classname\n if (column.options.className) {\n this.htmlElement.classList.add(...column.options.className.split(/\\s+/g));\n }\n this.setCustomClassName(column.options.header?.className);\n FilterCell_fireEvent(this, 'afterRender', { column, filtering: true });\n }\n onKeyDown(e) {\n this.column.filtering?.onKeyDown(e);\n if (e.target === this.htmlElement) {\n if (e.key === 'Enter') {\n this.column.filtering?.filterSelect?.focus();\n }\n else {\n super.onKeyDown(e);\n }\n }\n else {\n if (e.key === 'Escape') {\n this.htmlElement.focus();\n }\n }\n }\n onClick(e) {\n if (e.target === this.htmlElement) {\n this.htmlElement.focus();\n }\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ColumnFiltering_FilterCell = (FilterCell);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Actions/ColumnFiltering/FilterRow.js\n/* *\n *\n * Grid FilteringRow class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\n\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a special filtering row in the data grid header.\n */\nclass FilterRow extends Header_HeaderRow {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a filtering row in the Grid's header.\n *\n * @param viewport\n * The Grid Table instance which the row belongs to.\n */\n constructor(viewport) {\n super(viewport, (viewport.header?.levels ?? 0) + 1 // Level (1-based)\n );\n }\n /* *\n *\n * Methods\n *\n * */\n createCell(column) {\n return new ColumnFiltering_FilterCell(this, column);\n }\n renderContent() {\n const vp = this.viewport;\n const enabledColumns = vp.grid.enabledColumns || [];\n vp.theadElement?.appendChild(this.htmlElement);\n this.htmlElement.classList.add(Grid_Core_Globals.getClassName('headerRow'));\n for (let i = 0, iEnd = vp.columns.length; i < iEnd; i++) {\n const column = vp.columns[i];\n if (enabledColumns?.indexOf(column.id) < 0) {\n continue;\n }\n const cell = this.createCell(column);\n cell.render();\n if (column.options.filtering?.inline) {\n column.filtering?.renderFilteringContent(cell.htmlElement);\n }\n }\n const firstCell = this.cells[0];\n if (firstCell.column?.index === 0) {\n // Add class to disable left border on first column\n this.cells[0].htmlElement.classList.add(Grid_Core_Globals.getClassName('columnFirst'));\n }\n this.setLastCellClass();\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ColumnFiltering_FilterRow = (FilterRow);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Header/TableHeader.js\n/* *\n *\n * Grid TableHeader class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a table header row containing the cells (headers) with\n * column names.\n */\nclass TableHeader {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a new table head.\n *\n * @param viewport\n * The viewport (table) the table head belongs to.\n */\n constructor(viewport) {\n /* *\n *\n * Properties\n *\n * */\n /**\n * The visible columns of the table.\n */\n this.columns = [];\n /**\n * The container of the table head.\n */\n this.rows = [];\n /**\n * Amount of levels in the header, that is used in creating correct rows.\n * Excludes any extra levels, like filtering row.\n */\n this.levels = 1;\n this.viewport = viewport;\n this.columns = viewport.columns;\n if (viewport.grid.options?.header) {\n this.levels = this.getRowLevels(viewport.grid.options?.header);\n }\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Renders the table head content.\n */\n render() {\n const vp = this.viewport;\n if (!vp.grid.enabledColumns) {\n return;\n }\n // Render regular, multiple level rows.\n for (let i = 0, iEnd = this.levels; i < iEnd; i++) {\n const row = new Header_HeaderRow(vp, i + 1); // Avoid indexing from 0\n row.renderContent(i);\n this.rows.push(row);\n }\n // Render an extra row for inline filtering.\n if (vp.columns.some((column) => (column.options.filtering?.enabled &&\n column.options.filtering.inline) || false)) {\n const row = new ColumnFiltering_FilterRow(vp);\n row.renderContent();\n this.rows.push(row);\n }\n }\n /**\n * Reflows the table head's content dimensions.\n */\n reflow() {\n const vp = this.viewport;\n if (!vp.theadElement) {\n return;\n }\n const { clientWidth, offsetWidth } = vp.tbodyElement;\n const rows = this.rows;\n const bordersWidth = offsetWidth - clientWidth;\n for (const row of rows) {\n row.reflow();\n }\n if (vp.rowsWidth) {\n vp.theadElement.style.width =\n Math.max(vp.rowsWidth, clientWidth) + bordersWidth + 'px';\n }\n }\n /**\n * Returns amount of rows for the current cell in header tree.\n *\n * @param scope\n * Structure of header\n *\n * @returns\n */\n getRowLevels(scope) {\n let maxDepth = 0;\n for (const item of scope) {\n if (typeof item !== 'string' && item.columns) {\n const depth = this.getRowLevels(item.columns);\n if (depth > maxDepth) {\n maxDepth = depth;\n }\n }\n }\n return maxDepth + 1;\n }\n /**\n * Scrolls the table head horizontally, only when the virtualization\n * is enabled.\n *\n * @param scrollLeft\n * The left scroll position.\n */\n scrollHorizontally(scrollLeft) {\n const el = this.viewport.theadElement;\n if (!el) {\n return;\n }\n el.style.transform = `translateX(${-scrollLeft}px)`;\n }\n /**\n * Destroys the table header and all its associated components.\n */\n destroy() {\n for (const row of this.rows) {\n row.destroy();\n }\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Header_TableHeader = (TableHeader);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Body/TableCell.js\n/* *\n *\n * Grid class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\n\nconst { fireEvent: TableCell_fireEvent } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a cell in the data grid.\n */\nclass TableCell extends Table_Cell {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a cell in the data grid.\n *\n * @param row\n * The row of the cell.\n *\n * @param column\n * The column of the cell.\n */\n constructor(row, column) {\n super(row, column);\n this.column = column;\n this.row = row;\n this.column.registerCell(this);\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Renders the cell by appending it to the row and setting its value.\n */\n render() {\n super.render();\n void this.setValue();\n }\n /**\n * Sets the cell value and updates its content with it.\n *\n * @param value\n * The raw value to set. If not provided, it will use the value from the\n * data table for the current row and column.\n *\n * @param updateTable\n * Whether to update the table after setting the content. Defaults to\n * `false`, meaning the table will not be updated.\n */\n async setValue(value = this.column.data?.[this.row.index], updateTable = false) {\n this.value = value;\n if (updateTable && await this.updateDataTable()) {\n return;\n }\n if (this.content) {\n this.content.update();\n }\n else {\n this.content = this.column.createCellContent(this);\n }\n this.htmlElement.setAttribute('data-value', this.value + '');\n this.setCustomClassName(this.column.options.cells?.className);\n // Add alignment to number column\n if (this.column.dataType === 'number') {\n this.setCustomClassName(Grid_Core_Globals.getClassName('rightAlign'));\n }\n TableCell_fireEvent(this, 'afterRender', { target: this });\n }\n /**\n * Updates the the data table so that it reflects the current state of\n * the grid.\n *\n * @returns\n * A promise that resolves to `true` if the cell triggered all the whole\n * viewport rows to be updated, or `false` if the only change should be\n * the cell's content.\n */\n async updateDataTable() {\n if (this.column.data?.[this.row.index] === this.value) {\n // Abort if the value is the same as in the data table.\n return false;\n }\n const vp = this.column.viewport;\n const { dataTable: originalDataTable } = vp.grid;\n const rowTableIndex = this.row.id &&\n originalDataTable?.getLocalRowIndex(this.row.id);\n if (!originalDataTable || rowTableIndex === void 0) {\n return false;\n }\n this.row.data[this.column.id] = this.value;\n originalDataTable.setCell(this.column.id, rowTableIndex, this.value);\n // If no modifiers, don't update all rows\n if (vp.grid.dataTable === vp.grid.presentationTable) {\n return false;\n }\n await vp.updateRows();\n return true;\n }\n initEvents() {\n this.cellEvents.push(['dblclick', (e) => (this.onDblClick(e))]);\n this.cellEvents.push(['mouseout', () => this.onMouseOut()]);\n this.cellEvents.push(['mouseover', () => this.onMouseOver()]);\n this.cellEvents.push(['mousedown', (e) => {\n this.onMouseDown(e);\n }]);\n super.initEvents();\n }\n /**\n * Handles the focus event on the cell.\n */\n onFocus() {\n super.onFocus();\n const vp = this.row.viewport;\n vp.focusCursor = [\n this.row.index,\n this.column.index\n ];\n }\n /**\n * Handles the mouse down event on the cell.\n *\n * @param e\n * The mouse event object.\n *\n * @internal\n */\n onMouseDown(e) {\n if (e.target === this.htmlElement) {\n this.htmlElement.focus();\n }\n TableCell_fireEvent(this, 'mouseDown', {\n target: this,\n originalEvent: e\n });\n }\n /**\n * Handles the mouse over event on the cell.\n * @internal\n */\n onMouseOver() {\n const { grid } = this.row.viewport;\n grid.hoverRow(this.row.index);\n grid.hoverColumn(this.column.id);\n TableCell_fireEvent(this, 'mouseOver', {\n target: this\n });\n }\n /**\n * Handles the mouse out event on the cell.\n */\n onMouseOut() {\n const { grid } = this.row.viewport;\n grid.hoverRow();\n grid.hoverColumn();\n TableCell_fireEvent(this, 'mouseOut', {\n target: this\n });\n }\n /**\n * Handles the double click event on the cell.\n *\n * @param e\n * The mouse event object.\n */\n onDblClick(e) {\n TableCell_fireEvent(this, 'dblClick', {\n target: this,\n originalEvent: e\n });\n }\n onClick() {\n TableCell_fireEvent(this, 'click', {\n target: this\n });\n }\n /**\n * Handles the key down event on the cell.\n *\n * @param e\n * Keyboard event object.\n *\n * @internal\n */\n onKeyDown(e) {\n if (e.target !== this.htmlElement) {\n return;\n }\n TableCell_fireEvent(this, 'keyDown', {\n target: this,\n originalEvent: e\n });\n super.onKeyDown(e);\n }\n /**\n * Destroys the cell.\n */\n destroy() {\n this.content?.destroy();\n delete this.content;\n super.destroy();\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Body_TableCell = (TableCell);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Body/TableRow.js\n/* *\n *\n * Grid TableRow class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\n\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a row in the data grid.\n */\nclass TableRow extends Table_Row {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a row in the data grid.\n *\n * @param viewport\n * The Grid Table instance which the row belongs to.\n *\n * @param index\n * The index of the row in the data table.\n */\n constructor(viewport, index) {\n super(viewport);\n /* *\n *\n * Properties\n *\n * */\n /**\n * The row values from the data table in the original column order.\n */\n this.data = {};\n /**\n * The vertical translation of the row.\n */\n this.translateY = 0;\n this.index = index;\n this.id = viewport.dataTable.getOriginalRowIndex(index);\n this.loadData();\n this.setRowAttributes();\n }\n /* *\n *\n * Methods\n *\n * */\n createCell(column) {\n return new Body_TableCell(this, column);\n }\n /**\n * Loads the row data from the data table.\n */\n loadData() {\n const data = this.viewport.dataTable.getRowObject(this.index);\n if (!data) {\n return;\n }\n this.data = data;\n }\n /**\n * Updates the row data and its cells with the latest values from the data\n * table.\n */\n update() {\n this.id = this.viewport.dataTable.getOriginalRowIndex(this.index);\n this.updateRowAttributes();\n this.loadData();\n for (let i = 0, iEnd = this.cells.length; i < iEnd; ++i) {\n const cell = this.cells[i];\n void cell.setValue();\n }\n this.reflow();\n }\n /**\n * Adds or removes the hovered CSS class to the row element.\n *\n * @param hovered\n * Whether the row should be hovered.\n */\n setHoveredState(hovered) {\n this.htmlElement.classList[hovered ? 'add' : 'remove'](Grid_Core_Globals.getClassName('hoveredRow'));\n if (hovered) {\n this.viewport.grid.hoveredRowIndex = this.index;\n }\n }\n /**\n * Adds or removes the synced CSS class to the row element.\n *\n * @param synced\n * Whether the row should be synced.\n */\n setSyncedState(synced) {\n this.htmlElement.classList[synced ? 'add' : 'remove'](Grid_Core_Globals.getClassName('syncedRow'));\n if (synced) {\n this.viewport.grid.syncedRowIndex = this.index;\n }\n }\n /**\n * Sets the row HTML element attributes and additional classes.\n */\n setRowAttributes() {\n const idx = this.index;\n const el = this.htmlElement;\n el.classList.add(Grid_Core_Globals.getClassName('rowElement'));\n // Index of the row in the presentation data table\n el.setAttribute('data-row-index', idx);\n this.updateRowAttributes();\n // Indexing from 0, so rows with even index are odd.\n el.classList.add(Grid_Core_Globals.getClassName(idx % 2 ? 'rowEven' : 'rowOdd'));\n if (this.viewport.grid.hoveredRowIndex === idx) {\n el.classList.add(Grid_Core_Globals.getClassName('hoveredRow'));\n }\n if (this.viewport.grid.syncedRowIndex === idx) {\n el.classList.add(Grid_Core_Globals.getClassName('syncedRow'));\n }\n }\n /**\n * Sets the row HTML element attributes that are updateable in the row\n * lifecycle.\n */\n updateRowAttributes() {\n const vp = this.viewport;\n const a11y = vp.grid.accessibility;\n const idx = this.index;\n const el = this.htmlElement;\n // Index of the row in the original data table (ID)\n if (this.id !== void 0) {\n el.setAttribute('data-row-id', this.id);\n }\n // Calculate levels of header, 1 to avoid indexing from 0\n a11y?.setRowIndex(el, idx + (vp.header?.rows.length ?? 0) + 1);\n }\n /**\n * Sets the vertical translation of the row. Used for virtual scrolling.\n *\n * @param value\n * The vertical translation of the row.\n */\n setTranslateY(value) {\n this.translateY = value;\n this.htmlElement.style.transform = `translateY(${value}px)`;\n }\n /**\n * Returns the default top offset of the row (before adjusting row heights).\n * @internal\n */\n getDefaultTopOffset() {\n return this.index * this.viewport.rowsVirtualizer.defaultRowHeight;\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Body_TableRow = (TableRow);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Actions/RowsVirtualizer.js\n/* *\n *\n * Grid Rows Renderer class.\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a virtualized rows renderer for the data grid.\n */\nclass RowsVirtualizer {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the rows virtualizer.\n *\n * @param viewport\n * The viewport of the data grid to render rows in.\n */\n constructor(viewport) {\n /**\n * The index of the first visible row.\n */\n this.rowCursor = 0;\n /**\n * Flag indicating if the scrolling handler should be prevented to avoid\n * flickering loops when scrolling to the last row.\n */\n this.preventScroll = false;\n this.rowSettings =\n viewport.grid.options?.rendering?.rows;\n this.viewport = viewport;\n this.strictRowHeights = this.rowSettings.strictHeights;\n this.buffer = Math.max(this.rowSettings.bufferSize, 0);\n this.defaultRowHeight = this.getDefaultRowHeight();\n if (this.strictRowHeights) {\n viewport.tbodyElement.classList.add(Grid_Core_Globals.getClassName('rowsContentNowrap'));\n }\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Renders the rows in the viewport for the first time.\n */\n initialRender() {\n // Initial reflow to set the viewport height\n if (this.viewport.virtualRows) {\n this.viewport.reflow();\n }\n // Load & render rows\n this.renderRows(this.rowCursor);\n this.adjustRowHeights();\n }\n /**\n * Renders the rows in the viewport. It is called when the rows need to be\n * re-rendered, e.g., after a sort or filter operation.\n */\n rerender() {\n const tbody = this.viewport.tbodyElement;\n let rows = this.viewport.rows;\n const oldScrollLeft = tbody.scrollLeft;\n let oldScrollTop;\n if (rows.length) {\n oldScrollTop = tbody.scrollTop;\n for (let i = 0, iEnd = rows.length; i < iEnd; ++i) {\n rows[i].destroy();\n }\n rows.length = 0;\n }\n this.renderRows(this.rowCursor);\n if (this.viewport.virtualRows) {\n if (oldScrollTop !== void 0) {\n tbody.scrollTop = oldScrollTop;\n }\n this.scroll();\n }\n rows = this.viewport.rows;\n // Reflow the rendered row cells widths (check redundancy)\n for (let i = 0, iEnd = rows.length; i < iEnd; ++i) {\n rows[i].reflow();\n }\n tbody.scrollLeft = oldScrollLeft;\n }\n /**\n * Method called on the viewport scroll event, only when the virtualization\n * is enabled.\n */\n scroll() {\n const target = this.viewport.tbodyElement;\n const { defaultRowHeight: rowHeight } = this;\n const lastScrollTop = target.scrollTop;\n if (this.preventScroll) {\n if (lastScrollTop <= target.scrollTop) {\n this.preventScroll = false;\n }\n this.adjustBottomRowHeights();\n return;\n }\n // Do vertical virtual scrolling\n const rowCursor = Math.floor(target.scrollTop / rowHeight);\n if (this.rowCursor !== rowCursor) {\n this.renderRows(rowCursor);\n }\n this.rowCursor = rowCursor;\n this.adjustRowHeights();\n if (!this.strictRowHeights &&\n lastScrollTop > target.scrollTop &&\n !this.preventScroll) {\n target.scrollTop = lastScrollTop;\n this.preventScroll = true;\n }\n }\n /**\n * Adjusts the visible row heights from the bottom of the viewport.\n */\n adjustBottomRowHeights() {\n const rows = this.viewport.rows;\n const rowsLn = rows.length;\n const lastRow = rows[rowsLn - 1];\n let rowTop = lastRow.translateY;\n const rowBottom = rowTop + lastRow.htmlElement.offsetHeight;\n let newHeight = lastRow.cells[0].htmlElement.offsetHeight;\n rowTop = rowBottom - newHeight;\n lastRow.htmlElement.style.height = newHeight + 'px';\n lastRow.setTranslateY(rowTop);\n for (let j = 0, jEnd = lastRow.cells.length; j < jEnd; ++j) {\n lastRow.cells[j].htmlElement.style.transform = '';\n }\n for (let i = rowsLn - 2; i >= 0; i--) {\n const row = rows[i];\n newHeight = row.cells[0].htmlElement.offsetHeight;\n rowTop -= newHeight;\n row.htmlElement.style.height = newHeight + 'px';\n row.setTranslateY(rowTop);\n for (let j = 0, jEnd = row.cells.length; j < jEnd; ++j) {\n row.cells[j].htmlElement.style.transform = '';\n }\n }\n }\n /**\n * Renders rows in the specified range. Removes rows that are out of the\n * range except the last row.\n *\n * @param rowCursor\n * The index of the first visible row.\n */\n renderRows(rowCursor) {\n const { viewport: vp, buffer } = this;\n const rowCount = vp.dataTable.getRowCount();\n // Stop rendering if there are no rows to render.\n if (rowCount < 1) {\n return;\n }\n const isVirtualization = this.viewport.virtualRows;\n const rowsPerPage = isVirtualization ? Math.ceil((vp.grid.tableElement?.clientHeight || 0) /\n this.defaultRowHeight) : Infinity; // Need to be refactored when add pagination\n let rows = vp.rows;\n if (!isVirtualization && rows.length > 50) {\n // eslint-disable-next-line no-console\n console.warn('Grid: a large dataset can cause performance issues when ' +\n 'virtualization is disabled. Consider enabling ' +\n 'virtualization in the rows settings.');\n }\n if (!rows.length) {\n const last = new Body_TableRow(vp, rowCount - 1);\n vp.tbodyElement.appendChild(last.htmlElement);\n last.render();\n rows.push(last);\n if (isVirtualization) {\n last.setTranslateY(last.getDefaultTopOffset());\n }\n }\n const from = Math.max(0, Math.min(rowCursor - buffer, rowCount - rowsPerPage));\n const to = Math.min(rowCursor + rowsPerPage + buffer, rows[rows.length - 1].index - 1);\n const alwaysLastRow = rows.pop();\n const tempRows = [];\n // Remove rows that are out of the range except the last row.\n for (let i = 0, iEnd = rows.length; i < iEnd; ++i) {\n const row = rows[i];\n const rowIndex = row.index;\n if (rowIndex < from || rowIndex > to) {\n row.destroy();\n }\n else {\n tempRows.push(row);\n }\n }\n rows = tempRows;\n vp.rows = rows;\n for (let i = from; i <= to; ++i) {\n const row = rows[i - (rows[0]?.index || 0)];\n // Recreate row when it is destroyed and it is in the range.\n if (!row) {\n const newRow = new Body_TableRow(vp, i);\n rows.push(newRow);\n newRow.rendered = false;\n if (isVirtualization) {\n newRow.setTranslateY(newRow.getDefaultTopOffset());\n }\n }\n }\n rows.sort((a, b) => a.index - b.index);\n for (let i = 0, iEnd = rows.length; i < iEnd; ++i) {\n if (!rows[i].rendered) {\n vp.tbodyElement.insertBefore(rows[i].htmlElement, vp.tbodyElement.lastChild);\n rows[i].render();\n }\n }\n if (alwaysLastRow) {\n rows.push(alwaysLastRow);\n }\n // Focus the cell if the focus cursor is set\n if (vp.focusCursor) {\n const [rowIndex, columnIndex] = vp.focusCursor;\n const row = rows.find((row) => row.index === rowIndex);\n if (row) {\n row.cells[columnIndex]?.htmlElement.focus({\n preventScroll: true\n });\n }\n }\n // Set the focus anchor cell\n if ((!vp.focusCursor || !vp.focusAnchorCell?.row.rendered) &&\n rows.length > 0) {\n const rowIndex = rowCursor - rows[0].index;\n if (rows[rowIndex]) {\n vp.setFocusAnchorCell(rows[rowIndex].cells[0]);\n }\n }\n }\n /**\n * Adjusts the heights of the rows based on the current scroll position.\n * It handles the possibility of the rows having different heights than\n * the default height.\n */\n adjustRowHeights() {\n if (this.strictRowHeights ||\n !this.viewport.virtualRows) {\n return;\n }\n const { rowCursor: cursor, defaultRowHeight: defaultH } = this;\n const { rows, tbodyElement } = this.viewport;\n const rowsLn = rows.length;\n if (rowsLn < 1) {\n return;\n }\n let translateBuffer = rows[0].getDefaultTopOffset();\n for (let i = 0; i < rowsLn; ++i) {\n const row = rows[i];\n // Reset row height and cell transforms\n row.htmlElement.style.height = '';\n if (row.cells[0].htmlElement.style.transform) {\n for (let j = 0, jEnd = row.cells.length; j < jEnd; ++j) {\n const cell = row.cells[j];\n cell.htmlElement.style.transform = '';\n }\n }\n // Rows above the first visible row\n if (row.index < cursor) {\n row.htmlElement.style.height = defaultH + 'px';\n continue;\n }\n const cellHeight = row.cells[0].htmlElement.offsetHeight;\n row.htmlElement.style.height = cellHeight + 'px';\n // Rows below the first visible row\n if (row.index > cursor) {\n continue;\n }\n // First visible row\n if (row.htmlElement.offsetHeight > defaultH) {\n const newHeight = Math.floor(cellHeight - (cellHeight - defaultH) * (tbodyElement.scrollTop / defaultH - cursor));\n row.htmlElement.style.height = newHeight + 'px';\n for (let j = 0, jEnd = row.cells.length; j < jEnd; ++j) {\n const cell = row.cells[j];\n cell.htmlElement.style.transform = `translateY(${newHeight - cellHeight}px)`;\n }\n }\n }\n rows[0].setTranslateY(translateBuffer);\n for (let i = 1, iEnd = rowsLn - 1; i < iEnd; ++i) {\n translateBuffer += rows[i - 1].htmlElement.offsetHeight;\n rows[i].setTranslateY(translateBuffer);\n }\n // Set the proper offset for the last row\n const lastRow = rows[rowsLn - 1];\n const preLastRow = rows[rowsLn - 2];\n if (preLastRow && preLastRow.index === lastRow.index - 1) {\n lastRow.setTranslateY(preLastRow.htmlElement.offsetHeight + translateBuffer);\n }\n }\n /**\n * Reflow the rendered rows content dimensions.\n */\n reflowRows() {\n const rows = this.viewport.rows;\n if (rows.length < 1) {\n return;\n }\n for (let i = 0, iEnd = rows.length; i < iEnd; ++i) {\n rows[i].reflow();\n }\n this.adjustRowHeights();\n }\n /**\n * Returns the default height of a row. This method should be called only\n * once on initialization.\n */\n getDefaultRowHeight() {\n const vp = this.viewport;\n const mockRow = new Body_TableRow(vp, 0);\n mockRow.htmlElement.style.position = 'absolute';\n mockRow.htmlElement.classList.add(Grid_Core_Globals.getClassName('mockedRow'));\n this.viewport.tbodyElement.appendChild(mockRow.htmlElement);\n mockRow.render();\n const defaultRowHeight = mockRow.htmlElement.offsetHeight;\n mockRow.destroy();\n return defaultRowHeight;\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Actions_RowsVirtualizer = (RowsVirtualizer);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Actions/ColumnsResizer.js\n/* *\n *\n * Grid Columns Resizer class.\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\n\nconst { makeHTMLElement: ColumnsResizer_makeHTMLElement } = Core_GridUtils;\nconst { fireEvent: ColumnsResizer_fireEvent } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * The class that handles the resizing of columns in the data grid.\n */\nclass ColumnsResizer {\n /* *\n *\n * Constructor\n *\n * */\n constructor(viewport) {\n /**\n * Any column is being resized. Turned off after slight delay.\n */\n this.isResizing = false;\n /**\n * The handles and their mouse down event listeners.\n */\n this.handles = [];\n /**\n * Handles the mouse move event on the document.\n *\n * @param e\n * The mouse event.\n *\n * @internal\n */\n this.onDocumentMouseMove = (e) => {\n if (!this.draggedResizeHandle || !this.draggedColumn) {\n return;\n }\n const diff = e.pageX - (this.dragStartX || 0);\n const vp = this.viewport;\n vp.columnResizing.resize(this, diff);\n vp.reflow();\n vp.rowsVirtualizer.adjustRowHeights();\n ColumnsResizer_fireEvent(this.draggedColumn, 'afterResize', {\n target: this.draggedColumn,\n originalEvent: e\n });\n };\n /**\n * Handles the mouse up event on the document.\n */\n this.onDocumentMouseUp = () => {\n this.draggedColumn?.header?.htmlElement?.classList.remove(Grid_Core_Globals.getClassName('resizedColumn'));\n if (!this.draggedResizeHandle?.matches(':hover')) {\n this.draggedResizeHandle?.classList.remove('hovered');\n }\n this.dragStartX = void 0;\n this.draggedColumn = void 0;\n this.draggedResizeHandle = void 0;\n this.columnStartWidth = void 0;\n this.nextColumnStartWidth = void 0;\n requestAnimationFrame(() => {\n this.isResizing = false;\n });\n };\n this.viewport = viewport;\n document.addEventListener('mousemove', this.onDocumentMouseMove);\n document.addEventListener('mouseup', this.onDocumentMouseUp);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Render the drag handle for resizing columns.\n *\n * @param column\n * The reference to rendered column\n *\n * @param cell\n * The reference to rendered cell, where hadles should be added\n */\n renderColumnDragHandles(column, cell) {\n const vp = column.viewport;\n if (vp.columnsResizer) {\n const handle = ColumnsResizer_makeHTMLElement('div', {\n className: Grid_Core_Globals.getClassName('resizerHandles')\n }, cell.htmlElement);\n handle.setAttribute('aria-hidden', true);\n vp.columnsResizer?.addHandleListeners(handle, column);\n }\n }\n /**\n * Adds event listeners to the handle.\n *\n * @param handle\n * The handle element.\n *\n * @param column\n * The column the handle belongs to.\n */\n addHandleListeners(handle, column) {\n const onHandleMouseDown = (e) => {\n const vp = column.viewport;\n this.isResizing = true;\n handle.classList.add('hovered');\n vp.reflow();\n this.dragStartX = e.pageX;\n this.draggedColumn = column;\n this.draggedResizeHandle = handle;\n this.columnStartWidth = column.getWidth();\n this.nextColumnStartWidth =\n vp.columns[column.index + 1]?.getWidth();\n column.header?.htmlElement.classList.add(Grid_Core_Globals.getClassName('resizedColumn'));\n };\n const onHandleMouseOver = () => {\n if (this.draggedResizeHandle) {\n return;\n }\n handle.classList.add('hovered');\n };\n const onHandleMouseOut = () => {\n if (this.draggedResizeHandle) {\n return;\n }\n handle.classList.remove('hovered');\n };\n const handleListeners = [{\n eventName: 'mousedown',\n listener: onHandleMouseDown\n }, {\n eventName: 'mouseover',\n listener: onHandleMouseOver\n }, {\n eventName: 'mouseout',\n listener: onHandleMouseOut\n }];\n for (const { eventName, listener } of handleListeners) {\n handle.addEventListener(eventName, listener);\n }\n this.handles.push([handle, handleListeners]);\n }\n /**\n * Removes all added event listeners from the document and handles. This\n * should be called on the destroy of the data grid.\n */\n removeEventListeners() {\n document.removeEventListener('mousemove', this.onDocumentMouseMove);\n document.removeEventListener('mouseup', this.onDocumentMouseUp);\n for (let i = 0, iEnd = this.handles.length; i < iEnd; i++) {\n const [handle, listeners] = this.handles[i];\n for (const { eventName, listener } of listeners) {\n handle.removeEventListener(eventName, listener);\n }\n }\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Actions_ColumnsResizer = (ColumnsResizer);\n\n;// ./code/grid/es-modules/Grid/Core/Table/Table.js\n/* *\n *\n * Grid Table Viewport class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\n\n\n\n\n\n\nconst { makeHTMLElement: Table_makeHTMLElement } = Core_GridUtils;\nconst { fireEvent: Table_fireEvent, getStyle: Table_getStyle, defined: Table_defined } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a table viewport of the data grid.\n */\nclass Table {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a new data grid table.\n *\n * @param grid\n * The data grid instance which the table (viewport) belongs to.\n *\n * @param tableElement\n * The HTML table element of the data grid.\n */\n constructor(grid, tableElement) {\n /**\n * The visible columns of the table.\n */\n this.columns = [];\n /**\n * The visible rows of the table.\n */\n this.rows = [];\n /**\n * Handles the focus event on the table body.\n *\n * @param e\n * The focus event.\n */\n this.onTBodyFocus = (e) => {\n e.preventDefault();\n this.rows[this.rowsVirtualizer.rowCursor - this.rows[0].index]\n ?.cells[0]?.htmlElement.focus();\n };\n /**\n * Handles the resize event.\n */\n this.onResize = () => {\n this.reflow();\n };\n /**\n * Handles the scroll event.\n */\n this.onScroll = () => {\n if (this.virtualRows) {\n this.rowsVirtualizer.scroll();\n }\n this.header?.scrollHorizontally(this.tbodyElement.scrollLeft);\n };\n this.grid = grid;\n this.tableElement = tableElement;\n this.dataTable = this.grid.presentationTable;\n const dgOptions = grid.options;\n const customClassName = dgOptions?.rendering?.table?.className;\n this.columnResizing = ColumnResizing_ColumnResizing.initMode(this);\n this.virtualRows = this.shouldVirtualizeRows();\n if (dgOptions?.rendering?.header?.enabled) {\n this.theadElement = Table_makeHTMLElement('thead', {}, tableElement);\n }\n this.tbodyElement = Table_makeHTMLElement('tbody', {}, tableElement);\n if (this.virtualRows) {\n tableElement.classList.add(Grid_Core_Globals.getClassName('virtualization'));\n }\n if (dgOptions?.rendering?.columns?.resizing?.enabled) {\n this.columnsResizer = new Actions_ColumnsResizer(this);\n }\n if (customClassName) {\n tableElement.classList.add(...customClassName.split(/\\s+/g));\n }\n tableElement.classList.add(Grid_Core_Globals.getClassName('scrollableContent'));\n // Load columns\n this.loadColumns();\n // Virtualization\n this.rowsVirtualizer = new Actions_RowsVirtualizer(this);\n // Init Table\n this.init();\n // Add event listeners\n this.resizeObserver = new ResizeObserver(this.onResize);\n this.resizeObserver.observe(tableElement);\n this.tbodyElement.addEventListener('scroll', this.onScroll);\n this.tbodyElement.addEventListener('focus', this.onTBodyFocus);\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Initializes the data grid table.\n */\n init() {\n Table_fireEvent(this, 'beforeInit');\n this.setTbodyMinHeight();\n // Load & render head\n if (this.grid.options?.rendering?.header?.enabled) {\n this.header = new Header_TableHeader(this);\n this.header.render();\n }\n // TODO: Load & render footer\n // this.footer = new TableFooter(this);\n // this.footer.render();\n this.rowsVirtualizer.initialRender();\n Table_fireEvent(this, 'afterInit');\n }\n /**\n * Sets the minimum height of the table body.\n */\n setTbodyMinHeight() {\n const { options } = this.grid;\n const minVisibleRows = options?.rendering?.rows?.minVisibleRows;\n const tbody = this.tbodyElement;\n if (Table_defined(minVisibleRows) &&\n !Table_getStyle(tbody, 'min-height', true)) {\n tbody.style.minHeight = (minVisibleRows * this.rowsVirtualizer.defaultRowHeight) + 'px';\n }\n }\n /**\n * Checks if rows virtualization should be enabled.\n *\n * @returns\n * Whether rows virtualization should be enabled.\n */\n shouldVirtualizeRows() {\n const { grid } = this;\n const rows = grid.userOptions.rendering?.rows;\n if (Table_defined(rows?.virtualization)) {\n return rows.virtualization;\n }\n // Consider changing this to use the presentation table row count\n // instead of the original data table row count.\n const rowCount = Number(grid.dataTable?.rowCount);\n const threshold = rows?.virtualizationThreshold ?? 50;\n const paginationPageSize = grid.pagination?.currentPageSize;\n return paginationPageSize ?\n paginationPageSize >= threshold :\n rowCount >= threshold;\n }\n /**\n * Loads the columns of the table.\n */\n loadColumns() {\n const { enabledColumns } = this.grid;\n if (!enabledColumns) {\n return;\n }\n let columnId;\n for (let i = 0, iEnd = enabledColumns.length; i < iEnd; ++i) {\n columnId = enabledColumns[i];\n this.columns.push(new Table_Column(this, columnId, i));\n }\n this.columnResizing.loadColumns();\n }\n /**\n * Updates the rows of the table.\n */\n async updateRows() {\n const vp = this;\n let focusedRowId;\n if (vp.focusCursor) {\n focusedRowId = vp.dataTable.getOriginalRowIndex(vp.focusCursor[0]);\n }\n vp.grid.pagination?.clampCurrentPage();\n // Update data\n const oldRowsCount = (vp.rows[vp.rows.length - 1]?.index ?? -1) + 1;\n await vp.grid.querying.proceed();\n vp.dataTable = vp.grid.presentationTable;\n for (const column of vp.columns) {\n column.loadData();\n }\n // Update virtualization if needed\n const shouldVirtualize = this.shouldVirtualizeRows();\n let shouldRerender = false;\n if (this.virtualRows !== shouldVirtualize) {\n this.virtualRows = shouldVirtualize;\n vp.tableElement.classList.toggle(Grid_Core_Globals.getClassName('virtualization'), shouldVirtualize);\n shouldRerender = true;\n }\n if (shouldRerender || oldRowsCount !== vp.dataTable.rowCount) {\n // Rerender all rows\n vp.rowsVirtualizer.rerender();\n }\n else {\n // Update existing rows\n for (let i = 0, iEnd = vp.rows.length; i < iEnd; ++i) {\n vp.rows[i].update();\n }\n }\n // Update the pagination controls\n vp.grid.pagination?.updateControls();\n vp.reflow();\n // Scroll to the focused row\n if (focusedRowId !== void 0 && vp.focusCursor) {\n const newRowIndex = vp.dataTable.getLocalRowIndex(focusedRowId);\n if (newRowIndex !== void 0) {\n // Scroll to the focused row.\n vp.scrollToRow(newRowIndex);\n // Focus the cell that was focused before the update.\n setTimeout(() => {\n if (!Table_defined(vp.focusCursor?.[1])) {\n return;\n }\n vp.rows[newRowIndex - vp.rows[0].index]?.cells[vp.focusCursor[1]].htmlElement.focus();\n });\n }\n }\n }\n /**\n * Reflows the table's content dimensions.\n */\n reflow() {\n this.columnResizing.reflow();\n // Reflow the head\n this.header?.reflow();\n // Reflow rows content dimensions\n this.rowsVirtualizer.reflowRows();\n // Reflow the pagination\n this.grid.pagination?.reflow();\n // Reflow popups\n this.grid.popups.forEach((popup) => {\n popup.reflow();\n });\n }\n /**\n * Scrolls the table to the specified row.\n *\n * @param index\n * The index of the row to scroll to.\n *\n * Try it: {@link https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/grid-lite/basic/scroll-to-row | Scroll to row}\n */\n scrollToRow(index) {\n if (this.virtualRows) {\n this.tbodyElement.scrollTop =\n index * this.rowsVirtualizer.defaultRowHeight;\n return;\n }\n const rowClass = '.' + Grid_Core_Globals.getClassName('rowElement');\n const firstRowTop = this.tbodyElement\n .querySelectorAll(rowClass)[0]\n .getBoundingClientRect().top;\n this.tbodyElement.scrollTop = (this.tbodyElement\n .querySelectorAll(rowClass)[index]\n .getBoundingClientRect().top) - firstRowTop;\n }\n /**\n * Get the widthRatio value from the width in pixels. The widthRatio is\n * calculated based on the width of the viewport.\n *\n * @param width\n * The width in pixels.\n *\n * @return The width ratio.\n *\n * @internal\n */\n getRatioFromWidth(width) {\n return width / this.tbodyElement.clientWidth;\n }\n /**\n * Get the width in pixels from the widthRatio value. The width is\n * calculated based on the width of the viewport.\n *\n * @param ratio\n * The width ratio.\n *\n * @returns The width in pixels.\n *\n * @internal\n */\n getWidthFromRatio(ratio) {\n return this.tbodyElement.clientWidth * ratio;\n }\n /**\n * Destroys the grid table.\n */\n destroy() {\n this.tbodyElement.removeEventListener('focus', this.onTBodyFocus);\n this.tbodyElement.removeEventListener('scroll', this.onScroll);\n this.resizeObserver.disconnect();\n this.columnsResizer?.removeEventListeners();\n this.header?.destroy();\n for (let i = 0, iEnd = this.rows.length; i < iEnd; ++i) {\n this.rows[i].destroy();\n }\n Table_fireEvent(this, 'afterDestroy');\n }\n /**\n * Get the viewport state metadata. It is used to save the state of the\n * viewport and restore it when the data grid is re-rendered.\n *\n * @returns\n * The viewport state metadata.\n */\n getStateMeta() {\n return {\n scrollTop: this.tbodyElement.scrollTop,\n scrollLeft: this.tbodyElement.scrollLeft,\n columnResizing: this.columnResizing,\n focusCursor: this.focusCursor\n };\n }\n /**\n * Apply the metadata to the viewport state. It is used to restore the state\n * of the viewport when the data grid is re-rendered.\n *\n * @param meta\n * The viewport state metadata.\n */\n applyStateMeta(meta) {\n this.tbodyElement.scrollTop = meta.scrollTop;\n this.tbodyElement.scrollLeft = meta.scrollLeft;\n if (meta.focusCursor) {\n const [rowIndex, columnIndex] = meta.focusCursor;\n const row = this.rows[rowIndex - this.rows[0].index];\n row?.cells[columnIndex]?.htmlElement.focus();\n }\n }\n /**\n * Sets the focus anchor cell.\n *\n * @param cell\n * The cell to set as the focus anchor cell.\n */\n setFocusAnchorCell(cell) {\n this.focusAnchorCell?.htmlElement.setAttribute('tabindex', '-1');\n this.focusAnchorCell = cell;\n this.focusAnchorCell.htmlElement.setAttribute('tabindex', '0');\n }\n /**\n * Returns the column with the provided ID.\n *\n * @param id\n * The ID of the column.\n */\n getColumn(id) {\n const columns = this.grid.enabledColumns;\n if (!columns) {\n return;\n }\n const columnIndex = columns.indexOf(id);\n if (columnIndex < 0) {\n return;\n }\n return this.columns[columnIndex];\n }\n /**\n * Returns the row with the provided ID.\n *\n * @param id\n * The ID of the row.\n */\n getRow(id) {\n // TODO: Change `find` to a method using `vp.dataTable.getLocalRowIndex`\n // and rows[presentationRowIndex - firstRowIndex]. Needs more testing,\n // but it should be faster.\n return this.rows.find((row) => row.id === id);\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Table_Table = (Table);\n\n;// ./code/grid/es-modules/Data/Modifiers/ChainModifier.js\n/* *\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Dawid Dragula\n *\n * */\n\n\n\nconst { addEvent: ChainModifier_addEvent, fireEvent: ChainModifier_fireEvent, merge: ChainModifier_merge } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Modifies a table with the help of modifiers in an ordered chain.\n *\n */\nclass ChainModifier extends Modifiers_DataModifier {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the modifier chain.\n *\n * @param {Partial<ChainModifier.Options>} [options]\n * Options to configure the modifier chain.\n *\n * @param {...DataModifier} [chain]\n * Ordered chain of modifiers.\n */\n constructor(options, ...chain) {\n super();\n this.chain = chain;\n this.options = ChainModifier_merge(ChainModifier.defaultOptions, options);\n const optionsChain = this.options.chain || [];\n for (let i = 0, iEnd = optionsChain.length, modifierOptions, ModifierClass; i < iEnd; ++i) {\n modifierOptions = optionsChain[i];\n if (!modifierOptions.type) {\n continue;\n }\n ModifierClass = Modifiers_DataModifier.types[modifierOptions.type];\n if (ModifierClass) {\n chain.push(new ModifierClass(modifierOptions));\n }\n }\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Adds a configured modifier to the end of the modifier chain. Please note,\n * that the modifier can be added multiple times.\n *\n * @param {DataModifier} modifier\n * Configured modifier to add.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n */\n add(modifier, eventDetail) {\n this.emit({\n type: 'addModifier',\n detail: eventDetail,\n modifier\n });\n this.chain.push(modifier);\n this.emit({\n type: 'addModifier',\n detail: eventDetail,\n modifier\n });\n }\n /**\n * Clears all modifiers from the chain.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n */\n clear(eventDetail) {\n this.emit({\n type: 'clearChain',\n detail: eventDetail\n });\n this.chain.length = 0;\n this.emit({\n type: 'afterClearChain',\n detail: eventDetail\n });\n }\n /**\n * Sequentially applies all modifiers in the chain to the given table,\n * updating its `modified` property with the final result.\n *\n * *Note:* The `modified` property reference of the table gets replaced.\n *\n * @param {Highcharts.DataTable} table\n * Table to modify.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Promise<Highcharts.DataTable>}\n * Table with `modified` property as a reference.\n */\n async modify(table, eventDetail) {\n const modifiers = (this.options.reverse ?\n this.chain.slice().reverse() :\n this.chain.slice());\n if (!table.modified) {\n table.modified = table.clone(false, eventDetail);\n }\n let modified = table;\n for (let i = 0, iEnd = modifiers.length; i < iEnd; ++i) {\n try {\n await modifiers[i].modify(modified, eventDetail);\n }\n catch (error) {\n this.emit({\n type: 'error',\n detail: eventDetail,\n table\n });\n throw error;\n }\n modified = modified.getModified();\n }\n table.modified = modified;\n return table;\n }\n /**\n * Applies several modifications to the table.\n *\n * *Note:* The `modified` property reference of the table gets replaced.\n *\n * @param {DataTable} table\n * Table to modify.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {DataTable}\n * Table as a reference.\n *\n * @emits ChainDataModifier#execute\n * @emits ChainDataModifier#afterExecute\n */\n modifyTable(table, eventDetail) {\n const chain = this;\n chain.emit({\n type: 'modify',\n detail: eventDetail,\n table\n });\n const modifiers = (chain.options.reverse ?\n chain.chain.reverse() :\n chain.chain.slice());\n let modified = table.getModified();\n for (let i = 0, iEnd = modifiers.length, modifier; i < iEnd; ++i) {\n modifier = modifiers[i];\n modified =\n modifier.modifyTable(modified, eventDetail).getModified();\n }\n table.modified = modified;\n chain.emit({\n type: 'afterModify',\n detail: eventDetail,\n table\n });\n return table;\n }\n /**\n * Removes a configured modifier from all positions in the modifier chain.\n *\n * @param {DataModifier} modifier\n * Configured modifier to remove.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n */\n remove(modifier, eventDetail) {\n const modifiers = this.chain;\n this.emit({\n type: 'removeModifier',\n detail: eventDetail,\n modifier\n });\n modifiers.splice(modifiers.indexOf(modifier), 1);\n this.emit({\n type: 'afterRemoveModifier',\n detail: eventDetail,\n modifier\n });\n }\n emit(e) {\n ChainModifier_fireEvent(this, e.type, e);\n }\n on(type, callback) {\n return ChainModifier_addEvent(this, type, callback);\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Default option for the ordered modifier chain.\n */\nChainModifier.defaultOptions = {\n type: 'Chain'\n};\nModifiers_DataModifier.registerType('Chain', ChainModifier);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Modifiers_ChainModifier = (ChainModifier);\n\n;// ./code/grid/es-modules/Data/Modifiers/SortModifier.js\n/* *\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Dawid Dragula\n *\n * */\n\n\n\nconst { merge: SortModifier_merge } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Sort table rows according to values of a column.\n *\n */\nclass SortModifier extends Modifiers_DataModifier {\n /* *\n *\n * Static Functions\n *\n * */\n static ascending(a, b) {\n return ((a || 0) < (b || 0) ? -1 :\n (a || 0) > (b || 0) ? 1 :\n 0);\n }\n static descending(a, b) {\n return ((b || 0) < (a || 0) ? -1 :\n (b || 0) > (a || 0) ? 1 :\n 0);\n }\n static compareFactory(direction, customCompare) {\n if (customCompare) {\n if (direction === 'desc') {\n return (a, b) => -customCompare(a, b);\n }\n return customCompare;\n }\n return (direction === 'asc' ?\n SortModifier.ascending :\n SortModifier.descending);\n }\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the sort modifier.\n *\n * @param {Partial<SortDataModifier.Options>} [options]\n * Options to configure the sort modifier.\n */\n constructor(options) {\n super();\n this.options = SortModifier_merge(SortModifier.defaultOptions, options);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Returns index and row for sort reference.\n *\n * @private\n *\n * @param {Highcharts.DataTable} table\n * Table with rows to reference.\n *\n * @return {Array<SortModifier.RowReference>}\n * Array of row references.\n */\n getRowReferences(table) {\n const rows = table.getRows(), rowReferences = [];\n for (let i = 0, iEnd = rows.length; i < iEnd; ++i) {\n rowReferences.push({\n index: i,\n row: rows[i]\n });\n }\n return rowReferences;\n }\n modifyTable(table, eventDetail) {\n const modifier = this;\n modifier.emit({ type: 'modify', detail: eventDetail, table });\n const columnIds = table.getColumnIds(), rowCount = table.getRowCount(), rowReferences = this.getRowReferences(table), { direction, orderByColumn, orderInColumn, compare: customCompare } = modifier.options, compare = SortModifier.compareFactory(direction, customCompare), orderByColumnIndex = columnIds.indexOf(orderByColumn), modified = table.getModified();\n if (orderByColumnIndex !== -1) {\n rowReferences.sort((a, b) => compare(a.row[orderByColumnIndex], b.row[orderByColumnIndex]));\n }\n if (orderInColumn) {\n const column = [];\n for (let i = 0; i < rowCount; ++i) {\n column[rowReferences[i].index] = i;\n }\n modified.setColumns({ [orderInColumn]: column });\n }\n else {\n const originalIndexes = [];\n const rows = [];\n let rowReference;\n for (let i = 0; i < rowCount; ++i) {\n rowReference = rowReferences[i];\n originalIndexes.push(table.getOriginalRowIndex(rowReference.index));\n rows.push(rowReference.row);\n }\n modified.setRows(rows, 0);\n modified.setOriginalRowIndexes(originalIndexes);\n }\n modifier.emit({ type: 'afterModify', detail: eventDetail, table });\n return table;\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Default options to group table rows.\n */\nSortModifier.defaultOptions = {\n type: 'Sort',\n direction: 'desc',\n orderByColumn: 'y'\n};\nModifiers_DataModifier.registerType('Sort', SortModifier);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Modifiers_SortModifier = (SortModifier);\n\n;// ./code/grid/es-modules/Grid/Core/Querying/SortingController.js\n/* *\n *\n * Grid Sorting Controller class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n/* *\n *\n * Class\n *\n * */\n/**\n * Class that manages one of the data grid querying types - sorting.\n */\nclass SortingController {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs the SortingController instance.\n *\n * @param querying\n * The querying controller instance.\n */\n constructor(querying) {\n this.querying = querying;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Sets the sorting state. If the new sorting state is different than the\n * current one, the `shouldBeUpdated` flag is set to `true`. If the\n * same, the flag is set to `false`.\n *\n * @param order\n * The sorting order.\n *\n * @param columnId\n * The column ID to sort by.\n */\n setSorting(order, columnId) {\n if (this.currentSorting?.columnId !== columnId ||\n this.currentSorting?.order !== order) {\n this.querying.shouldBeUpdated = true;\n this.currentSorting = {\n columnId,\n order\n };\n }\n this.modifier = this.createModifier();\n }\n /**\n * Returns the sorting options from the data grid options.\n */\n getSortingOptions() {\n const grid = this.querying.grid, { columnOptionsMap } = grid;\n if (!columnOptionsMap) {\n return { order: null };\n }\n const columnIDs = Object.keys(columnOptionsMap);\n let foundOrder = null;\n let foundColumnId;\n for (let i = columnIDs.length - 1; i > -1; --i) {\n const columnId = columnIDs[i];\n const columnOptions = columnOptionsMap[columnId]?.options || {};\n const order = columnOptions.sorting?.order;\n if (order) {\n if (foundColumnId) {\n // eslint-disable-next-line no-console\n console.warn('Grid: Only one column can be sorted at a time. ' +\n 'Data will be sorted only by the last found column ' +\n `with the sorting order defined in the options: \"${foundColumnId}\".`);\n break;\n }\n foundOrder = order;\n foundColumnId = columnId;\n }\n }\n return {\n columnId: foundColumnId,\n order: foundOrder\n };\n }\n /**\n * Loads sorting options from the data grid options.\n */\n loadOptions() {\n const stateFromOptions = this.getSortingOptions();\n if (stateFromOptions.columnId !== this.initialSorting?.columnId ||\n stateFromOptions.order !== this.initialSorting?.order) {\n this.initialSorting = stateFromOptions;\n this.setSorting(stateFromOptions.order, stateFromOptions.columnId);\n }\n }\n /**\n * Returns the sorting modifier based on the loaded sorting options.\n */\n createModifier() {\n if (!this.currentSorting) {\n return;\n }\n const { columnId, order } = this.currentSorting;\n if (!order || !columnId) {\n return;\n }\n const grid = this.querying.grid;\n return new Modifiers_SortModifier({\n orderByColumn: columnId,\n direction: order,\n compare: grid.columnOptionsMap?.[columnId]?.options\n ?.sorting?.compare ||\n grid.options?.columnDefaults?.sorting?.compare\n });\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Querying_SortingController = (SortingController);\n\n;// ./code/grid/es-modules/Data/Modifiers/FilterModifier.js\n/* *\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\nconst { isFunction: FilterModifier_isFunction, merge: FilterModifier_merge } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Filters out table rows matching a given condition.\n */\nclass FilterModifier extends Modifiers_DataModifier {\n /* *\n *\n * Static Functions\n *\n * */\n /**\n * Compiles a filter condition into a callback function.\n *\n * @param {FilterCondition} condition\n * Condition to compile.\n */\n static compile(condition) {\n if (FilterModifier_isFunction(condition)) {\n return condition;\n }\n const op = condition.operator;\n switch (op) {\n case 'and': {\n const subs = condition.conditions.map((c) => this.compile(c));\n return (row, table, i) => subs.every((cond) => cond(row, table, i));\n }\n case 'or': {\n const subs = condition.conditions.map((c) => this.compile(c));\n return (row, table, i) => subs.some((cond) => cond(row, table, i));\n }\n case 'not': {\n const sub = this.compile(condition.condition);\n return (row, table, i) => !sub(row, table, i);\n }\n }\n const { columnId: col, value } = condition;\n switch (op) {\n case '==':\n // eslint-disable-next-line eqeqeq\n return (row) => row[col] == value;\n case '===':\n return (row) => row[col] === value;\n case '!=':\n // eslint-disable-next-line eqeqeq\n return (row) => row[col] != value;\n case '!==':\n return (row) => row[col] !== value;\n case '>':\n return (row) => (row[col] || 0) > (value || 0);\n case '>=':\n return (row) => (row[col] || 0) >= (value || 0);\n case '<':\n return (row) => (row[col] || 0) < (value || 0);\n case '<=':\n return (row) => (row[col] || 0) <= (value || 0);\n case 'empty':\n return (row) => row[col] === null || row[col] === '';\n }\n const { ignoreCase } = condition;\n const str = (val) => {\n const s = '' + val;\n return (ignoreCase ?? true) ? s.toLowerCase() : s;\n };\n switch (op) {\n case 'contains':\n return (row) => str(row[col]).includes(str(value));\n default:\n return (row) => str(row[col])[op](str(value));\n }\n }\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the filter modifier.\n *\n * @param {Partial<FilterModifier.Options>} [options]\n * Options to configure the filter modifier.\n */\n constructor(options) {\n super();\n this.options = FilterModifier_merge(FilterModifier.defaultOptions, options);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Filters out table rows matching a given condition. If the given table\n * does not have defined a `modified` property, the filtering is applied\n * in-place on the original table rather than on a `modified` copy.\n *\n * @param {DataTable} table\n * Table to modify.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {DataTable}\n * Table with `modified` property as a reference or modified table, if\n * `modified` property of the original table is undefined.\n */\n modifyTable(table, eventDetail) {\n const modifier = this;\n modifier.emit({ type: 'modify', detail: eventDetail, table });\n const { condition } = modifier.options;\n if (!condition) {\n // If no condition is set, return the unmodified table.\n return table;\n }\n const matchRow = FilterModifier.compile(condition);\n const modified = table.getModified();\n const rows = [];\n const indexes = [];\n for (let i = 0, iEnd = table.getRowCount(); i < iEnd; ++i) {\n const row = table.getRowObject(i);\n if (!row) {\n continue;\n }\n if (matchRow(row, table, i)) {\n rows.push(row);\n indexes.push(table.getOriginalRowIndex(i));\n }\n }\n modified.deleteRows();\n modified.setRows(rows);\n modified.setOriginalRowIndexes(indexes);\n modifier.emit({ type: 'afterModify', detail: eventDetail, table });\n return table;\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Default options for the filter modifier.\n */\nFilterModifier.defaultOptions = {\n type: 'Filter'\n};\nModifiers_DataModifier.registerType('Filter', FilterModifier);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Modifiers_FilterModifier = (FilterModifier);\n\n;// ./code/grid/es-modules/Grid/Core/Querying/FilteringController.js\n/* *\n *\n * Grid Filtering Controller class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\nconst { isString: FilteringController_isString } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Class that manages one of the data grid querying types - filtering.\n */\nclass FilteringController {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs the FilteringController instance.\n *\n * @param querying\n * The querying controller instance.\n */\n constructor(querying) {\n /**\n * A map of the filtering conditions for each column.\n */\n this.columnConditions = {};\n this.querying = querying;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Maps filtering options to the filtering condition.\n *\n * @param columnId\n * Id of the column to filter.\n *\n * @param options\n * Filtering options.\n */\n static mapOptionsToFilter(columnId, options) {\n const { condition, value } = options;\n const isStringValue = FilteringController_isString(value);\n const stringifiedValue = isStringValue ? value : '';\n const nonValueConditions = ['empty', 'notEmpty', 'true', 'false'];\n if ((typeof value === 'undefined' ||\n (isStringValue && !stringifiedValue)) && !nonValueConditions.includes(condition ?? '')) {\n return;\n }\n switch (condition) {\n case 'contains':\n return {\n columnId,\n operator: 'contains',\n value: stringifiedValue\n };\n case 'doesNotContain':\n return {\n operator: 'not',\n condition: {\n columnId,\n operator: 'contains',\n value: stringifiedValue\n }\n };\n case 'equals':\n return {\n columnId,\n operator: '===',\n value\n };\n case 'doesNotEqual':\n return {\n columnId,\n operator: '!==',\n value\n };\n case 'beginsWith':\n return {\n columnId,\n operator: 'startsWith',\n value: stringifiedValue\n };\n case 'endsWith':\n return {\n columnId,\n operator: 'endsWith',\n value: stringifiedValue\n };\n case 'greaterThan':\n return {\n columnId,\n operator: '>',\n value\n };\n case 'greaterThanOrEqualTo':\n return {\n columnId,\n operator: '>=',\n value\n };\n case 'lessThan':\n return {\n columnId,\n operator: '<',\n value\n };\n case 'lessThanOrEqualTo':\n return {\n columnId,\n operator: '<=',\n value\n };\n case 'before':\n return {\n columnId,\n operator: '<',\n value\n };\n case 'after':\n return {\n columnId,\n operator: '>',\n value\n };\n case 'empty':\n return {\n columnId,\n operator: 'empty',\n value\n };\n case 'notEmpty':\n return {\n operator: 'not',\n condition: {\n columnId,\n operator: 'empty',\n value\n }\n };\n case 'true':\n return {\n columnId,\n operator: '===',\n value: true\n };\n case 'false':\n return {\n columnId,\n operator: '===',\n value: false\n };\n }\n }\n /**\n * Loads filtering options from the data grid options.\n */\n loadOptions() {\n const columnOptionsMap = this.querying.grid.columnOptionsMap;\n const newConditions = {};\n if (columnOptionsMap) {\n const columnIds = Object.keys(columnOptionsMap);\n for (let i = 0, iEnd = columnIds.length; i < iEnd; ++i) {\n const columnId = columnIds[i];\n const filteringOptions = columnOptionsMap[columnId]?.options?.filtering;\n if (!filteringOptions) {\n continue;\n }\n const condition = FilteringController.mapOptionsToFilter(columnId, filteringOptions);\n if (condition) {\n newConditions[columnId] = condition;\n }\n }\n }\n this.columnConditions = newConditions;\n this.updateModifier();\n }\n /**\n * Adds a new filtering condition to the specified column.\n *\n * @param columnId\n * The column ID to filter in.\n *\n * @param options\n * The filtering options.\n */\n addColumnFilterCondition(columnId, options) {\n const condition = FilteringController.mapOptionsToFilter(columnId, options);\n if (condition) {\n this.columnConditions[columnId] = condition;\n }\n else {\n delete this.columnConditions[columnId];\n }\n this.updateModifier();\n }\n /**\n * Clears the filtering condition for the specified column. If no column ID\n * is provided, clears all the column filtering conditions.\n *\n * @param columnId\n * The column ID to clear or `undefined` to clear all the column filtering\n * conditions.\n */\n clearColumnFiltering(columnId) {\n if (!columnId) {\n this.columnConditions = {};\n }\n else {\n delete this.columnConditions[columnId];\n }\n this.updateModifier();\n }\n /**\n * Updates the modifier based on the current column conditions.\n */\n updateModifier() {\n const columnConditions = Object.values(this.columnConditions);\n this.querying.shouldBeUpdated = true;\n if (columnConditions.length < 1) {\n delete this.modifier;\n return;\n }\n this.modifier = new Modifiers_FilterModifier({\n condition: {\n operator: 'and',\n conditions: columnConditions\n }\n });\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Querying_FilteringController = (FilteringController);\n\n;// ./code/grid/es-modules/Data/Modifiers/RangeModifier.js\n/* *\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n * - Dawid Dragula\n *\n * */\n\n\n\nconst { merge: RangeModifier_merge } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Slices the table rows based on the specified range.\n */\nclass RangeModifier extends Modifiers_DataModifier {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the range modifier.\n *\n * @param {Partial<RangeModifier.Options>} [options]\n * Options to configure the range modifier.\n */\n constructor(options) {\n super();\n this.options = RangeModifier_merge(RangeModifier.defaultOptions, options);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Replaces table rows with ranged rows. If the given table does not have\n * defined a `modified` property, the filtering is applied in-place on the\n * original table rather than on a `modified` copy.\n *\n * @param {DataTable} table\n * Table to modify.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {DataTable}\n * Table with `modified` property as a reference or modified table, if\n * `modified` property of the original table is undefined.\n */\n modifyTable(table, eventDetail) {\n const modifier = this;\n modifier.emit({ type: 'modify', detail: eventDetail, table });\n let { start, end } = modifier.options;\n start = Math.max(0, start || 0);\n end = Math.min(end || Infinity, table.getRowCount());\n const length = Math.max(end - start, 0);\n const modified = table.getModified();\n modified.deleteRows();\n modified.setRows(table.getRows(start, length));\n modified.setOriginalRowIndexes(Array.from({ length }, (_, i) => table.getOriginalRowIndex(start + i)));\n modifier.emit({ type: 'afterModify', detail: eventDetail, table });\n return table;\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Default options for the range modifier.\n */\nRangeModifier.defaultOptions = {\n type: 'Range',\n start: 0,\n end: Infinity\n};\nModifiers_DataModifier.registerType('Range', RangeModifier);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Modifiers_RangeModifier = (RangeModifier);\n\n;// ./code/grid/es-modules/Grid/Core/Querying/PaginationController.js\n/* *\n *\n * Grid Pagination Controller class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sebastian Bochan\n *\n * */\n\n\n/* *\n *\n * Class\n *\n * */\n/**\n * Class that manages one of the data grid querying types - pagination.\n */\nclass PaginationController {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs the PaginationController instance.\n *\n * @param querying\n * The querying controller instance.\n */\n constructor(querying) {\n this.querying = querying;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Sets the range options.\n *\n * @param currentPage\n * The current page.\n */\n setRange(currentPage) {\n this.currentPage = currentPage;\n this.querying.shouldBeUpdated = true;\n }\n /**\n * Loads range options from the grid options.\n */\n loadOptions() {\n const pagination = this.querying.grid.pagination;\n if (pagination?.options.enabled &&\n this.currentPage !== pagination.currentPage) {\n this.currentPage = pagination.currentPage;\n this.setRange(this.currentPage);\n }\n }\n /**\n * Returns the range modifier.\n *\n * @param rowsCountBeforePagination\n * The number of rows before pagination. Default is the number of rows in\n * the original data table.\n */\n createModifier(rowsCountBeforePagination = (this.querying.grid.dataTable?.rowCount || 0)) {\n const currentPage = this.currentPage || 1; // Start from page 1, not 0\n const pageSize = this.querying.grid.pagination?.currentPageSize;\n if (!pageSize) {\n return;\n }\n // Calculate the start index (0-based)\n const start = (currentPage - 1) * pageSize;\n const end = Math.min(start + pageSize, rowsCountBeforePagination);\n this.totalItems = rowsCountBeforePagination;\n return new Modifiers_RangeModifier({\n start,\n end\n });\n }\n /**\n * Reset the pagination controller.\n */\n reset() {\n delete this.currentPage;\n this.querying.shouldBeUpdated = true;\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Querying_PaginationController = (PaginationController);\n\n;// ./code/grid/es-modules/Grid/Core/Querying/QueryingController.js\n/* *\n *\n * Grid Querying Controller class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\n\n\n/* *\n *\n * Class\n *\n * */\n/**\n * Class that manage data modification of the visible data in the data grid.\n * It manages the modifiers that are applied to the data table.\n */\nclass QueryingController {\n /* *\n *\n * Constructor\n *\n * */\n constructor(grid) {\n /**\n * This flag should be set to `true` if the modifiers should reapply to the\n * data table due to some data change or other important reason.\n */\n this.shouldBeUpdated = false;\n this.grid = grid;\n this.filtering = new Querying_FilteringController(this);\n this.sorting = new Querying_SortingController(this);\n this.pagination = new Querying_PaginationController(this);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Proceeds with the data modification if needed.\n *\n * @param force\n * If the data should be modified even if the significant options are not\n * changed.\n */\n async proceed(force = false) {\n if (force || this.shouldBeUpdated) {\n await this.modifyData();\n }\n }\n /**\n * Load all options needed to generate the modifiers.\n */\n loadOptions() {\n this.filtering.loadOptions();\n this.sorting.loadOptions();\n this.pagination.loadOptions();\n }\n /**\n * Creates a list of modifiers that should be applied to the data table.\n */\n willNotModify() {\n return (!this.sorting.modifier &&\n !this.filtering.modifier);\n }\n /**\n * Returns a list of modifiers that should be applied to the data table.\n */\n getGroupedModifiers() {\n const modifiers = [];\n if (this.sorting.modifier) {\n modifiers.push(this.sorting.modifier);\n }\n if (this.filtering.modifier) {\n modifiers.push(this.filtering.modifier);\n }\n return modifiers;\n }\n /**\n * Apply all modifiers to the data table.\n */\n async modifyData() {\n const originalDataTable = this.grid.dataTable;\n if (!originalDataTable) {\n return;\n }\n const groupedModifiers = this.getGroupedModifiers();\n let interTable;\n // Grouped modifiers\n if (groupedModifiers.length > 0) {\n const chainModifier = new Modifiers_ChainModifier({}, ...groupedModifiers);\n const dataTableCopy = originalDataTable.clone();\n await chainModifier.modify(dataTableCopy.getModified());\n interTable = dataTableCopy.getModified();\n }\n else {\n interTable = originalDataTable.getModified();\n }\n // Pagination modifier\n const paginationModifier = this.pagination.createModifier(interTable.rowCount);\n if (paginationModifier) {\n interTable = interTable.clone();\n await paginationModifier.modify(interTable);\n interTable = interTable.getModified();\n }\n this.grid.presentationTable = interTable;\n this.shouldBeUpdated = false;\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Querying_QueryingController = (QueryingController);\n\n;// ./code/grid/es-modules/Grid/Core/Pagination/Icons.js\nconst icons = {\n first: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\"><path d=\"M5 9L1 5L5 1M9 9L5 5L9 1\" stroke=\"currentColor\" stroke-width=\"1.34\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>',\n previous: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 8 10\" fill=\"none\"><path d=\"M5 9L1 5L5 1\" stroke=\"currentColor\" stroke-width=\"1.34\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>',\n next: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 4 10\" fill=\"none\"><path d=\"M1 1L5 5L1 9\" stroke=\"currentColor\" stroke-width=\"1.34\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>',\n last: '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\"><path d=\"M5 1L9 5L5 9M1 1L5 5L1 9\" stroke=\"currentColor\" stroke-width=\"1.34\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/></svg>'\n};\n/* harmony default export */ const Icons = (icons);\n\n;// ./code/grid/es-modules/Grid/Core/Pagination/Pagination.js\n/* *\n *\n * Grid Pagination class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sebastian Bochan\n *\n * */\n\n\n\n\n\n\n\nconst { makeHTMLElement: Pagination_makeHTMLElement, formatText: Pagination_formatText } = Core_GridUtils;\nconst { merge: Pagination_merge, fireEvent: Pagination_fireEvent, isObject: Pagination_isObject, defined: Pagination_defined } = Core_Utilities;\n/**\n * Representing the pagination functionalities for the Grid.\n */\nclass Pagination {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Construct the pagination object.\n *\n * @param grid\n * The Grid Table instance which the pagination controller belongs to.\n *\n * @param options\n * The Pagination user options.\n *\n * @param state\n * The Pagination state. Used to restore the previous state after the Grid\n * is destroyed.\n */\n constructor(grid, options, state = {}) {\n /**\n * Current page number, starting from 1.\n */\n this.currentPage = 1;\n this.grid = grid;\n this.options = Pagination_merge(Pagination.defaultOptions, options);\n const pageSizeSelector = this.options.controls.pageSizeSelector;\n this.pageSizeOptions = Pagination_isObject(pageSizeSelector) ?\n pageSizeSelector.options :\n Pagination.defaultOptions.controls.pageSizeSelector.options; // eslint-disable-line\n this.currentPageSize =\n state.currentPageSize ||\n this.options.pageSize ||\n this.pageSizeOptions[0];\n // Lang pack\n this.lang = Pagination_merge(Core_Defaults.defaultOptions.pagination, this.grid.options?.lang?.pagination);\n // Set state\n if (state.currentPage) {\n this.currentPage = state.currentPage;\n }\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Total number of items (rows)\n */\n get totalItems() {\n return this.grid.querying.pagination.totalItems || 0;\n }\n /**\n * Total number of pages\n */\n get totalPages() {\n return Math.ceil(this.totalItems / this.currentPageSize) || 1;\n }\n /**\n * Render the pagination container.\n *\n * The pagination container is positioned based on the `position` option:\n * - `'top'`: Rendered before the table\n * - `'bottom'`: Rendered after the table (default)\n * - `'footer'`: Rendered inside a tfoot element\n * - `'#id'` or any string: Rendered inside a custom container with\n * the specified ID.\n */\n render() {\n const position = this.options.position;\n const grid = this.grid;\n this.oldTotalItems = this.totalItems;\n // Set row count for a11y\n grid.tableElement?.setAttribute('aria-current', 'page');\n this.updateA11yRowsCount(this.currentPageSize);\n // Render pagination container\n if (typeof position === 'string' && position.startsWith('#')) {\n this.renderCustomContainer(position);\n }\n else {\n if (position === 'footer') {\n this.renderFooter();\n }\n this.contentWrapper = Pagination_makeHTMLElement('nav', {\n className: Grid_Core_Globals.getClassName('paginationWrapper')\n }, position === 'footer' ?\n this.paginationContainer : grid.contentWrapper);\n this.contentWrapper.setAttribute('aria-label', 'Results pagination');\n }\n // Clamps the current page to the valid range\n this.clampCurrentPage();\n // Render all components\n this.renderPageInfo();\n this.renderControls();\n this.renderPageSizeSelector();\n // Update button states after rendering\n this.updateButtonStates();\n }\n /**\n * Render pagination in a tfoot element.\n */\n renderFooter() {\n const tableElement = this.grid.tableElement;\n if (!tableElement) {\n return;\n }\n // Create tfoot element\n const tfootElement = Pagination_makeHTMLElement('tfoot', {}, tableElement);\n // Create tfoot row\n const tfootRow = Pagination_makeHTMLElement('tr', {}, tfootElement);\n // Create tfoot cell with colspan and store it in paginationContainer\n this.paginationContainer = Pagination_makeHTMLElement('td', {}, tfootRow);\n this.paginationContainer.setAttribute('colSpan', (this.grid.enabledColumns || []).length.toString());\n this.reflow();\n }\n /**\n * Render pagination in a custom container by ID.\n *\n * @param id\n * The ID of the custom container.\n */\n renderCustomContainer(id) {\n const customContainer = document.querySelector(id);\n if (!customContainer) {\n console.warn(`Pagination: Custom container with ID \"${id}\" not found.`); // eslint-disable-line no-console\n return;\n }\n this.paginationContainer = customContainer;\n // Set content wrapper to the custom container\n this.contentWrapper = Pagination_makeHTMLElement('div', {\n className: Grid_Core_Globals.getClassName('paginationContainer')\n }, customContainer);\n }\n /**\n * Render the page information text.\n */\n renderPageInfo() {\n const pageInfo = this.options.controls?.pageInfo;\n if (pageInfo === false ||\n (Pagination_isObject(pageInfo) && pageInfo.enabled === false)) {\n return;\n }\n this.pageInfoElement = Pagination_makeHTMLElement('div', {\n className: Grid_Core_Globals.getClassName('paginationPageInfo')\n }, this.contentWrapper);\n this.updatePageInfo();\n }\n /**\n * Update the page information text.\n */\n updatePageInfo() {\n if (!this.pageInfoElement) {\n return;\n }\n const startItem = (this.currentPage - 1) * this.currentPageSize + 1;\n const endItem = Math.min(this.currentPage * this.currentPageSize, this.totalItems);\n const pageInfoText = Pagination_formatText(this.lang.pageInfo, {\n start: startItem,\n end: endItem,\n total: this.totalItems,\n currentPage: this.currentPage,\n totalPages: this.totalPages\n });\n this.pageInfoElement.innerHTML = pageInfoText;\n }\n /**\n * Render the controls buttons and page numbers.\n */\n renderControls() {\n const navContainer = Pagination_makeHTMLElement('div', {\n className: Grid_Core_Globals.getClassName('paginationControls')\n }, this.contentWrapper);\n // Render first/previous buttons\n if (this.options.controls?.firstLastButtons) {\n this.renderFirstButton(navContainer);\n }\n // Render previous button\n if (this.options.controls?.previousNextButtons) {\n this.renderPrevButton(navContainer);\n }\n // Render page numbers\n if (this.options.controls?.pageButtons) {\n this.renderPageNumbers(navContainer);\n }\n // Render mobile page selector\n this.renderMobilePageSelector(navContainer);\n // Render next button\n if (this.options.controls?.previousNextButtons) {\n this.renderNextButton(navContainer);\n }\n // Render last/first buttons\n if (this.options.controls?.firstLastButtons) {\n this.renderLastButton(navContainer);\n }\n }\n /**\n * Update the pagination controls.\n */\n updateControls() {\n if (this.oldTotalItems === this.totalItems) {\n return;\n }\n this.updatePageInfo();\n this.updatePageNumbers();\n this.updateButtonStates();\n this.updateA11yRowsCount(this.currentPageSize);\n this.oldTotalItems = this.totalItems;\n }\n /**\n * Render the first page button.\n *\n * @param container\n * The container element for the first page button.\n *\n */\n renderFirstButton(container) {\n const firstLastButtons = this.options.controls?.firstLastButtons;\n if (firstLastButtons === false ||\n (Pagination_isObject(firstLastButtons) && firstLastButtons.enabled === false)) {\n return;\n }\n // Create first button\n this.firstButton = Pagination_makeHTMLElement('button', {\n innerHTML: Icons.first,\n className: Grid_Core_Globals.getClassName('paginationButton') + ' ' +\n Grid_Core_Globals.getClassName('paginationFirstButton')\n }, container);\n this.firstButton.title = this.lang.firstPage;\n // Set aria-label for a11y\n this.firstButton.setAttribute('aria-label', this.lang.firstPage);\n // Add click event\n this.firstButton.addEventListener('click', () => {\n void this.goToPage(1);\n });\n this.setButtonState(this.firstButton, this.currentPage === 1);\n }\n /**\n * Render the previous page button.\n *\n * @param container\n * The container element for the previous page button.\n */\n renderPrevButton(container) {\n const previousNextButtons = this.options.controls?.previousNextButtons;\n if (previousNextButtons === false ||\n (Pagination_isObject(previousNextButtons) &&\n previousNextButtons.enabled === false)) {\n return;\n }\n // Create previous button\n this.prevButton = Pagination_makeHTMLElement('button', {\n innerHTML: Icons.previous,\n className: Grid_Core_Globals.getClassName('paginationButton') + ' ' +\n Grid_Core_Globals.getClassName('paginationPrevButton')\n }, container);\n this.prevButton.title = this.lang.previousPage;\n // Set aria-label for a11y\n this.prevButton.setAttribute('aria-label', this.lang.previousPage);\n // Add click event\n this.prevButton.addEventListener('click', () => {\n void this.goToPage(this.currentPage - 1);\n });\n this.setButtonState(this.prevButton, this.currentPage === 1);\n }\n /**\n * Render the next page button.\n *\n * @param container\n * The container element for the next page button.\n */\n renderNextButton(container) {\n const previousNextButtons = this.options.controls?.previousNextButtons;\n if (previousNextButtons === false ||\n (Pagination_isObject(previousNextButtons) &&\n previousNextButtons.enabled === false)) {\n return;\n }\n // Create next button\n this.nextButton = Pagination_makeHTMLElement('button', {\n innerHTML: Icons.next,\n className: Grid_Core_Globals.getClassName('paginationButton') + ' ' +\n Grid_Core_Globals.getClassName('paginationNextButton')\n }, container);\n this.nextButton.title = this.lang.nextPage;\n // Set aria-label for a11y\n this.nextButton.setAttribute('aria-label', this.lang.nextPage);\n // Add click event\n this.nextButton.addEventListener('click', () => {\n void this.goToPage(this.currentPage + 1);\n });\n this.setButtonState(this.nextButton, this.currentPage >= this.totalPages);\n }\n /**\n * Render the last page button.\n *\n * @param container\n * The container element for the last page button.\n */\n renderLastButton(container) {\n const firstLastButtons = this.options.controls?.firstLastButtons;\n if (firstLastButtons === false ||\n (Pagination_isObject(firstLastButtons) && firstLastButtons.enabled === false)) {\n return;\n }\n // Create last button\n this.lastButton = Pagination_makeHTMLElement('button', {\n innerHTML: Icons.last,\n className: Grid_Core_Globals.getClassName('paginationButton') + ' ' +\n Grid_Core_Globals.getClassName('paginationLastButton')\n }, container);\n this.lastButton.title = this.lang.lastPage;\n // Set aria-label for a11y\n this.lastButton.setAttribute('aria-label', this.lang.lastPage);\n // Add click event\n this.lastButton.addEventListener('click', () => {\n void this.goToPage(this.totalPages);\n });\n this.setButtonState(this.lastButton, this.currentPage >= this.totalPages);\n }\n /**\n * Render page number buttons with ellipsis.\n *\n * @param container\n * The container element for the page number buttons.\n */\n renderPageNumbers(container) {\n const pageButtons = this.options.controls?.pageButtons;\n if (pageButtons === false ||\n (Pagination_isObject(pageButtons) && pageButtons.enabled === false)) {\n return;\n }\n this.pageNumbersContainer = Pagination_makeHTMLElement('div', {\n className: Grid_Core_Globals.getClassName('paginationPageButton')\n }, container);\n this.updatePageNumbers();\n }\n /**\n * Update page number buttons based on current page and total pages.\n */\n updatePageNumbers() {\n if (!this.pageNumbersContainer) {\n return;\n }\n // Clear existing page numbers\n this.pageNumbersContainer.innerHTML = HTML_AST.emptyHTML;\n const pageButtons = this.options.controls?.pageButtons;\n const maxPageNumbers = Pagination_isObject(pageButtons) ?\n pageButtons.count :\n Pagination.defaultOptions.controls.pageButtons.count; // eslint-disable-line\n const totalPages = this.totalPages;\n const currentPage = this.currentPage;\n if (totalPages <= maxPageNumbers) {\n // Show all page numbers if total pages is less than max\n for (let i = 1; i <= totalPages; i++) {\n this.createPageButton(i, i === currentPage);\n }\n }\n else {\n const elements = [];\n // Determine layout based on current page position\n const isNearStart = currentPage <= 3;\n const isNearEnd = currentPage >= totalPages - 2;\n if (isNearStart) {\n // -2 for ellipsis and last page\n const pagesToShow = maxPageNumbers - 2;\n const maxPages = Math.min(pagesToShow, totalPages - 1);\n for (let i = 1; i <= maxPages; i++) {\n elements.push({ type: 'button', page: i });\n }\n if (totalPages > pagesToShow + 1) {\n elements.push({ type: 'ellipsis' });\n elements.push({ type: 'button', page: totalPages });\n }\n }\n else if (isNearEnd) {\n // -2 for first page and ellipsis\n const pagesToShow = maxPageNumbers - 2;\n let i = totalPages - pagesToShow + 1;\n elements.push({ type: 'button', page: 1 });\n elements.push({ type: 'ellipsis' });\n for (i; i <= totalPages; i++) {\n elements.push({ type: 'button', page: i });\n }\n }\n else {\n // Always add first page\n elements.push({ type: 'button', page: 1 });\n // -4 for first, last, and two ellipsis\n const maxMiddlePages = maxPageNumbers - 4;\n const halfMiddle = Math.floor(maxMiddlePages / 2);\n let startPage = Math.max(2, currentPage - halfMiddle);\n let endPage = Math.min(totalPages - 1, currentPage + halfMiddle);\n // Adjust to ensure we have exactly maxMiddlePages\n if (endPage - startPage + 1 > maxMiddlePages) {\n if (startPage === 2) {\n endPage = startPage + maxMiddlePages - 1;\n }\n else {\n startPage = endPage - maxMiddlePages + 1;\n }\n }\n // Check if we actually need ellipsis\n const needFirstEllipsis = startPage > 2;\n const needLastEllipsis = endPage < totalPages - 1;\n if (!needFirstEllipsis && !needLastEllipsis) {\n // -2 for first and last\n const availableSlots = maxPageNumbers - 2;\n startPage = 2;\n endPage = Math.min(totalPages - 1, startPage + availableSlots - 1);\n }\n else if (!needFirstEllipsis) {\n // -3 for first, last, and one ellipsis\n const availableSlots = maxPageNumbers - 3;\n startPage = 2;\n endPage = Math.min(totalPages - 1, startPage + availableSlots - 1);\n }\n else if (!needLastEllipsis) {\n // -3 for first, last, and one ellipsis\n const availableSlots = maxPageNumbers - 3;\n endPage = totalPages - 1;\n startPage = Math.max(2, endPage - availableSlots + 1);\n }\n // Add first ellipsis\n if (needFirstEllipsis) {\n elements.push({ type: 'ellipsis' });\n }\n // Add middle pages\n for (let i = startPage; i <= endPage; i++) {\n elements.push({ type: 'button', page: i });\n }\n // Add last ellipsis\n if (needLastEllipsis) {\n elements.push({ type: 'ellipsis' });\n }\n // Always add last page\n elements.push({ type: 'button', page: totalPages });\n }\n // Render all elements\n elements.forEach((element) => {\n if (element.type === 'button' && Pagination_defined(element.page)) {\n this.createPageButton(element.page, element.page === currentPage);\n }\n else if (element.type === 'ellipsis') {\n this.createEllipsis();\n }\n });\n }\n // Update mobile selector if it exists\n if (this.mobilePageSelector) {\n this.mobilePageSelector.value = this.currentPage.toString();\n }\n }\n /**\n * Create a page number button.\n *\n * @param pageNumber\n * The page number to create a button for.\n *\n * @param isActive\n * Whether the page number button is active.\n */\n createPageButton(pageNumber, isActive) {\n if (!this.pageNumbersContainer) {\n return;\n }\n const button = Pagination_makeHTMLElement('button', {\n innerHTML: pageNumber.toString(),\n className: Grid_Core_Globals.getClassName(isActive ? 'paginationPageButtonActive' : 'paginationPageButton')\n }, this.pageNumbersContainer);\n button.title = Pagination_formatText(this.lang.pageNumber, { page: pageNumber });\n // Set aria-label for a11y\n button.setAttribute('aria-label', Pagination_formatText(this.lang.pageNumber, { page: pageNumber }));\n // Add click event\n button.addEventListener('click', () => {\n void this.goToPage(pageNumber);\n });\n }\n /**\n * Create an ellipsis element.\n */\n createEllipsis() {\n if (!this.pageNumbersContainer) {\n return;\n }\n const ellipsisElement = Pagination_makeHTMLElement('span', {\n innerHTML: '...',\n className: Grid_Core_Globals.getClassName('paginationEllipsis')\n }, this.pageNumbersContainer);\n ellipsisElement.title = this.lang.ellipsis;\n // Set aria-label for a11y\n ellipsisElement.setAttribute('aria-hidden', true);\n }\n /**\n * Render the page size selector.\n */\n renderPageSizeSelector() {\n const pageSizeSelector = this.options.controls.pageSizeSelector;\n if (pageSizeSelector === false ||\n (Pagination_isObject(pageSizeSelector) &&\n pageSizeSelector.enabled === false)) {\n return;\n }\n const container = Pagination_makeHTMLElement('div', {\n className: Grid_Core_Globals.getClassName('paginationPageSizeContainer')\n }, this.contentWrapper);\n Pagination_makeHTMLElement('span', {\n innerHTML: this.lang.pageSizeLabel\n }, container);\n this.pageSizeSelect = Pagination_makeHTMLElement('select', {\n className: Grid_Core_Globals.getClassName('paginationPageSizeSelect')\n }, container);\n this.pageSizeOptions.forEach((option) => {\n const optionElement = document.createElement('option');\n optionElement.value = option.toString();\n optionElement.innerHTML = option.toString();\n if (option === this.currentPageSize) {\n optionElement.selected = true;\n }\n this.pageSizeSelect?.appendChild(optionElement);\n });\n this.pageSizeSelect.addEventListener('change', () => {\n if (!this.pageSizeSelect) {\n return;\n }\n void this.setPageSize(parseInt(this.pageSizeSelect.value, 10));\n });\n // Render mobile page size selector in the same container\n this.renderMobilePageSizeSelector(container);\n }\n /**\n * Set the page size and recalculate pagination.\n *\n * @param newPageSize\n * The new page size to set.\n */\n async setPageSize(newPageSize) {\n const pageSize = this.currentPageSize;\n const langAccessibility = this.grid.options?.lang?.accessibility;\n Pagination_fireEvent(this, 'beforePageSizeChange', {\n pageSize: pageSize,\n newPageSize: newPageSize\n });\n this.currentPageSize = newPageSize;\n // Reset to first page when changing page size\n this.currentPage = 1;\n // Update the grid's pagination range\n await this.updateGridPagination();\n // Update UI\n this.updatePageInfo();\n this.updatePageNumbers();\n this.updateButtonStates();\n // Update row count for a11y\n this.updateA11yRowsCount(this.currentPageSize);\n // Announce the page size change\n this.grid.accessibility?.announce(langAccessibility?.pagination?.announcements?.pageSizeChange +\n ' ' + newPageSize);\n // Update mobile page size selector if it exists\n if (this.mobilePageSizeSelector) {\n this.mobilePageSizeSelector.value = this.currentPageSize.toString();\n }\n Pagination_fireEvent(this, 'afterPageSizeChange', {\n pageSize: newPageSize,\n previousPageSize: pageSize\n });\n }\n /**\n * Navigate to a specific page.\n *\n * @param pageNumber\n * The page number to navigate to.\n */\n async goToPage(pageNumber) {\n const langAccessibility = this.grid.options?.lang?.accessibility;\n if (pageNumber < 1 ||\n pageNumber > this.totalPages ||\n pageNumber === this.currentPage) {\n return;\n }\n const previousPage = this.currentPage;\n Pagination_fireEvent(this, 'beforePageChange', {\n currentPage: this.currentPage,\n nextPage: pageNumber,\n pageSize: this.currentPageSize\n });\n this.currentPage = pageNumber;\n await this.updateGridPagination();\n this.updatePageInfo();\n this.updatePageNumbers();\n this.updateButtonStates();\n // Announce the page change\n this.grid.accessibility?.announce(langAccessibility?.pagination?.announcements?.pageChange +\n ' ' + this.currentPage);\n Pagination_fireEvent(this, 'afterPageChange', {\n currentPage: this.currentPage,\n previousPage: previousPage,\n pageSize: this.currentPageSize\n });\n }\n /**\n * Update the grid's pagination state.\n *\n * @param ignoreDataRange\n * Whether to ignore the data range update. Used when updating the data\n * range is not needed, for example when updating the data range from\n * the server.\n * @internal\n */\n async updateGridPagination(ignoreDataRange = false) {\n if (!this.grid.querying?.pagination) {\n return;\n }\n this.grid.querying.pagination.setRange(ignoreDataRange ? 1 : this.currentPage);\n // Trigger the grid to update its data and viewport\n this.grid.querying.shouldBeUpdated = true;\n // Force the querying controller to proceed with updates\n await this.grid.querying.proceed(true);\n // Update the viewport to reflect the new data\n await this.grid.viewport?.updateRows();\n this.grid.viewport?.header?.reflow();\n // Scroll to top after page change\n const tBody = this.grid.viewport?.tbodyElement;\n if (tBody) {\n tBody.scrollTop = 0;\n }\n }\n /**\n * Ensures the current page is within valid range.\n */\n clampCurrentPage() {\n if (this.currentPage > this.totalPages) {\n this.currentPage = this.totalPages;\n this.grid.querying.pagination.setRange(this.currentPage);\n }\n }\n /**\n * Update button states based on current page.\n */\n updateButtonStates() {\n if (this.firstButton) {\n this.setButtonState(this.firstButton, this.currentPage === 1);\n }\n if (this.prevButton) {\n this.setButtonState(this.prevButton, this.currentPage === 1);\n }\n if (this.nextButton) {\n this.setButtonState(this.nextButton, this.currentPage >= this.totalPages);\n }\n if (this.lastButton) {\n this.setButtonState(this.lastButton, this.currentPage >= this.totalPages);\n }\n }\n /**\n * Call modifier to replace items with new ones.\n *\n * @param isNextPage\n * Declare prev or next action triggered by button.\n * @returns\n */\n async updatePage(isNextPage = true) {\n const newPage = isNextPage ? this.currentPage + 1 : this.currentPage - 1;\n await this.goToPage(newPage);\n }\n /**\n * Set button state (enabled/disabled).\n *\n * @param button\n * The button to set the state for.\n *\n * @param disabled\n * Whether the button should be disabled.\n */\n setButtonState(button, disabled) {\n if (disabled) {\n button.classList.add(Grid_Core_Globals.getClassName('paginationButtonDisabled'));\n button.setAttribute('disabled', 'disabled');\n }\n else {\n button.classList.remove(Grid_Core_Globals.getClassName('paginationButtonDisabled'));\n button.removeAttribute('disabled');\n }\n }\n /**\n * Reflow the pagination container.\n */\n reflow() {\n const position = this.options.position;\n if (!this.paginationContainer) {\n return;\n }\n if (position === 'footer') {\n // Set the width to match the table width\n this.paginationContainer.style.width =\n this.grid.tableElement?.offsetWidth + 'px';\n return;\n }\n }\n /**\n * Destroy the pagination instance.\n */\n destroy() {\n const position = this.options.position;\n if (position === 'footer') {\n // For footer position, remove the entire tfoot element.\n this.paginationContainer?.parentElement?.parentElement?.remove();\n }\n else {\n this.contentWrapper?.remove();\n }\n this.grid.querying.pagination.reset();\n }\n /**\n * Render the mobile page selector (select dropdown).\n *\n * @param container\n * The container element for the mobile page selector.\n */\n renderMobilePageSelector(container) {\n const totalPages = this.totalPages;\n if (totalPages <= 1) {\n return;\n }\n const mobileSelect = Pagination_makeHTMLElement('select', {\n className: Grid_Core_Globals.getClassName('paginationMobileSelector')\n }, container);\n // Add options for each page\n for (let i = 1; i <= totalPages; i++) {\n const option = Pagination_makeHTMLElement('option', {}, mobileSelect);\n option.value = i.toString();\n option.textContent = `Page ${i} of ${totalPages}`;\n }\n // Set current page as selected\n mobileSelect.value = this.currentPage.toString();\n this.mobilePageSelector = mobileSelect;\n // Add event listener for page change\n mobileSelect.addEventListener('change', () => {\n const newPage = parseInt(mobileSelect.value, 10);\n if (newPage !== this.currentPage) {\n void this.goToPage(newPage);\n }\n });\n }\n /**\n * Render the mobile page size selector (select dropdown).\n *\n * @param container\n * The container element for the mobile page size selector.\n */\n renderMobilePageSizeSelector(container) {\n const mobilePageSizeSelect = Pagination_makeHTMLElement('select', {\n className: Grid_Core_Globals.getClassName('paginationMobilePageSizeSelector')\n }, container);\n this.pageSizeOptions.forEach((option) => {\n const optionElement = Pagination_makeHTMLElement('option', {}, mobilePageSizeSelect);\n optionElement.value = option.toString();\n optionElement.textContent = `${option} ${this.lang.pageSizeLabel}`;\n if (option === this.currentPageSize) {\n optionElement.selected = true;\n }\n });\n this.mobilePageSizeSelector = mobilePageSizeSelect;\n mobilePageSizeSelect.addEventListener('change', () => {\n if (!this.mobilePageSizeSelector) {\n return;\n }\n void this.setPageSize(parseInt(this.mobilePageSizeSelector.value, 10));\n });\n }\n /**\n * Update the row count for a11y.\n *\n * @param currentPageSize\n * The current page size.\n */\n updateA11yRowsCount(currentPageSize) {\n const grid = this.grid;\n grid.tableElement?.setAttribute('aria-rowcount', currentPageSize || this.totalItems);\n }\n}\n/* *\n*\n* Static Properties\n*\n* */\n/**\n * Default options of the pagination.\n */\nPagination.defaultOptions = {\n enabled: false,\n pageSize: 10,\n position: 'bottom',\n controls: {\n pageSizeSelector: {\n enabled: true,\n options: [10, 20, 50, 100]\n },\n pageInfo: {\n enabled: true\n },\n firstLastButtons: {\n enabled: true\n },\n previousNextButtons: {\n enabled: true\n },\n pageButtons: {\n enabled: true,\n count: 7\n }\n }\n};\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Pagination_Pagination = (Pagination);\n\n;// ./code/grid/es-modules/Grid/Core/Grid.js\n/* *\n *\n * Highcharts Grid class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\n\n\n\n\n\n\n\n\n\nconst { makeHTMLElement: Grid_makeHTMLElement, setHTMLContent: Grid_setHTMLContent } = Core_GridUtils;\nconst { extend: Grid_extend, fireEvent: Grid_fireEvent, getStyle: Grid_getStyle, merge: Grid_merge, pick: Grid_pick, isObject: Grid_isObject } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * A base class for the Grid.\n */\nclass Grid {\n // Implementation\n static grid(renderTo, options, async) {\n if (async) {\n return new Promise((resolve) => {\n void new Grid(renderTo, options, (grid) => {\n resolve(grid);\n });\n });\n }\n return new Grid(renderTo, options);\n }\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs a new Grid.\n *\n * @param renderTo\n * The render target (container) of the Grid.\n *\n * @param options\n * The options of the Grid.\n *\n * @param afterLoadCallback\n * The callback that is called after the Grid is loaded.\n */\n constructor(renderTo, options, afterLoadCallback) {\n /**\n * The user options declared for the columns as an object of column ID to\n * column options.\n * @internal\n */\n this.columnOptionsMap = {};\n /**\n * The options that were declared by the user when creating the Grid\n * or when updating it.\n */\n this.userOptions = {};\n /**\n * The initial height of the container. Can be 0 also if not set.\n * @internal\n */\n this.initialContainerHeight = 0;\n /**\n * The list of currently shown popups.\n */\n this.popups = new Set();\n /**\n * Functions that unregister events attached to the grid's data table,\n * that need to be removed when the grid is destroyed.\n */\n this.dataTableEventDestructors = [];\n this.loadUserOptions(options);\n this.id = this.options?.id || Core_Utilities.uniqueKey();\n this.querying = new Querying_QueryingController(this);\n this.locale = this.options?.lang?.locale || (this.container?.closest('[lang]')?.lang);\n this.time = new Shared_TimeBase(Grid_extend(this.options?.time, { locale: this.locale }), this.options?.lang);\n Grid_fireEvent(this, 'beforeLoad');\n Grid.grids.push(this);\n this.initContainers(renderTo);\n this.initAccessibility();\n this.initPagination();\n this.loadDataTable();\n this.querying.loadOptions();\n void this.querying.proceed().then(() => {\n this.renderViewport();\n afterLoadCallback?.(this);\n Grid_fireEvent(this, 'afterLoad');\n });\n }\n /* *\n *\n * Methods\n *\n * */\n /*\n * Initializes the accessibility controller.\n */\n initAccessibility() {\n this.accessibility?.destroy();\n delete this.accessibility;\n if (this.options?.accessibility?.enabled) {\n this.accessibility = new Accessibility_Accessibility(this);\n }\n }\n /*\n * Initializes the pagination.\n */\n initPagination() {\n let state;\n if (this.pagination) {\n const { currentPageSize, currentPage } = this.pagination || {};\n state = {\n currentPageSize,\n currentPage\n };\n }\n this.pagination?.destroy();\n delete this.pagination;\n const rawOptions = this.options?.pagination;\n const options = Grid_isObject(rawOptions) ? rawOptions : {\n enabled: rawOptions\n };\n if (options?.enabled) {\n this.pagination = new Pagination_Pagination(this, options, state);\n }\n }\n /**\n * Initializes the container of the Grid.\n *\n * @param renderTo\n * The render target (html element or id) of the Grid.\n *\n */\n initContainers(renderTo) {\n const container = (typeof renderTo === 'string') ?\n Grid_Core_Globals.win.document.getElementById(renderTo) : renderTo;\n // Display an error if the renderTo is wrong\n if (!container) {\n // eslint-disable-next-line no-console\n console.error(`\n Rendering div not found. It is unable to find the HTML element\n to render the Grid in.\n `);\n return;\n }\n this.initialContainerHeight = Grid_getStyle(container, 'height', true) || 0;\n this.container = container;\n this.container.innerHTML = HTML_AST.emptyHTML;\n this.contentWrapper = Grid_makeHTMLElement('div', {\n className: Grid_Core_Globals.getClassName('container')\n }, this.container);\n }\n /**\n * Loads the new user options to all the important fields (`userOptions`,\n * `options` and `columnOptionsMap`).\n *\n * @param newOptions\n * The options that were declared by the user.\n *\n * @param oneToOne\n * When `false` (default), the existing column options will be merged with\n * the ones that are currently defined in the user options. When `true`,\n * the columns not defined in the new options will be removed.\n */\n loadUserOptions(newOptions, oneToOne = false) {\n // Operate on a copy of the options argument\n newOptions = Grid_merge(newOptions);\n if (newOptions.columns) {\n if (oneToOne) {\n this.setColumnOptionsOneToOne(newOptions.columns);\n }\n else {\n this.setColumnOptions(newOptions.columns);\n }\n delete newOptions.columns;\n }\n this.userOptions = Grid_merge(this.userOptions, newOptions);\n this.options = Grid_merge(this.options ?? Core_Defaults.defaultOptions, this.userOptions);\n // Generate column options map\n const columnOptionsArray = this.options?.columns;\n if (!columnOptionsArray) {\n return;\n }\n const columnOptionsMap = {};\n for (let i = 0, iEnd = columnOptionsArray?.length ?? 0; i < iEnd; ++i) {\n columnOptionsMap[columnOptionsArray[i].id] = {\n index: i,\n options: columnOptionsArray[i]\n };\n }\n this.columnOptionsMap = columnOptionsMap;\n }\n /**\n * Sets the new column options to the userOptions field.\n *\n * @param newColumnOptions\n * The new column options that should be loaded.\n *\n * @param overwrite\n * Whether to overwrite the existing column options with the new ones.\n * Default is `false`.\n */\n setColumnOptions(newColumnOptions, overwrite = false) {\n if (!this.userOptions.columns) {\n this.userOptions.columns = this.options?.columns ?? [];\n }\n const columnOptions = this.userOptions.columns;\n for (let i = 0, iEnd = newColumnOptions.length; i < iEnd; ++i) {\n const newOptions = newColumnOptions[i];\n const colOptionsIndex = this.columnOptionsMap?.[newOptions.id]?.index ?? -1;\n // If the new column options contain only the id.\n if (Object.keys(newOptions).length < 2) {\n if (overwrite && colOptionsIndex !== -1) {\n columnOptions.splice(colOptionsIndex, 1);\n }\n continue;\n }\n if (colOptionsIndex === -1) {\n columnOptions.push(newOptions);\n }\n else if (overwrite) {\n columnOptions[colOptionsIndex] = newOptions;\n }\n else {\n Grid_merge(true, columnOptions[colOptionsIndex], newOptions);\n }\n }\n if (columnOptions.length < 1) {\n delete this.userOptions.columns;\n }\n }\n /**\n * Loads the new column options to the userOptions field in a one-to-one\n * manner. It means that all the columns that are not defined in the new\n * options will be removed.\n *\n * @param newColumnOptions\n * The new column options that should be loaded.\n */\n setColumnOptionsOneToOne(newColumnOptions) {\n const prevColumnOptions = this.userOptions.columns;\n const columnOptions = [];\n let prevOptions;\n for (let i = 0, iEnd = newColumnOptions.length; i < iEnd; ++i) {\n const newOptions = newColumnOptions[i];\n const indexInPrevOptions = prevColumnOptions?.findIndex((prev) => prev.id === newOptions.id);\n if (indexInPrevOptions !== void 0 && indexInPrevOptions !== -1) {\n prevOptions = prevColumnOptions?.[indexInPrevOptions];\n }\n const resultOptions = Grid_merge(prevOptions ?? {}, newOptions);\n if (Object.keys(resultOptions).length > 1) {\n columnOptions.push(resultOptions);\n }\n }\n this.userOptions.columns = columnOptions;\n }\n /**\n * Updates the Grid with new options.\n *\n * @param options\n * The options of the Grid that should be updated. If not provided,\n * the update will be proceeded based on the `this.userOptions` property.\n * The `column` options are merged using the `id` property as a key.\n *\n * @param render\n * Whether to re-render the Grid after updating the options.\n *\n * @param oneToOne\n * When `false` (default), the existing column options will be merged with\n * the ones that are currently defined in the user options. When `true`,\n * the columns not defined in the new options will be removed.\n */\n async update(options = {}, render = true, oneToOne = false) {\n this.loadUserOptions(options, oneToOne);\n if (!this.dataTable || options.dataTable) {\n this.userOptions.dataTable = options.dataTable;\n (this.options ?? {}).dataTable = options.dataTable;\n this.loadDataTable();\n this.querying.shouldBeUpdated = true;\n }\n if (!render) {\n return;\n }\n this.initAccessibility();\n this.initPagination();\n this.querying.loadOptions();\n // Update locale.\n const locale = options.lang?.locale;\n if (locale) {\n this.locale = locale;\n this.time.update(Grid_extend(options.time || {}, { locale: this.locale }));\n }\n await this.querying.proceed();\n this.renderViewport();\n }\n /**\n * Updates the column of the Grid with new options.\n *\n * @param columnId\n * The ID of the column that should be updated.\n *\n * @param options\n * The options of the columns that should be updated. If null,\n * column options for this column ID will be removed.\n *\n * @param render\n * Whether to re-render the Grid after updating the columns.\n *\n * @param overwrite\n * If true, the column options will be updated by replacing the existing\n * options with the new ones instead of merging them.\n */\n async updateColumn(columnId, options, render = true, overwrite = false) {\n this.setColumnOptions([{\n id: columnId,\n ...options\n }], overwrite);\n await this.update(void 0, render);\n }\n /**\n * Hovers the row with the provided index. It removes the hover effect from\n * the previously hovered row.\n *\n * @param rowIndex\n * The index of the row.\n */\n hoverRow(rowIndex) {\n const rows = this.viewport?.rows;\n if (!rows) {\n return;\n }\n const firstRowIndex = this.viewport?.rows[0]?.index ?? 0;\n if (this.hoveredRowIndex !== void 0) {\n rows[this.hoveredRowIndex - firstRowIndex]?.setHoveredState(false);\n }\n if (rowIndex !== void 0) {\n rows[rowIndex - firstRowIndex]?.setHoveredState(true);\n }\n this.hoveredRowIndex = rowIndex;\n }\n /**\n * Hovers the column with the provided ID. It removes the hover effect from\n * the previously hovered column.\n *\n * @param columnId\n * The ID of the column.\n */\n hoverColumn(columnId) {\n const vp = this.viewport;\n if (!vp) {\n return;\n }\n if (this.hoveredColumnId) {\n vp.getColumn(this.hoveredColumnId)?.setHoveredState(false);\n }\n if (columnId) {\n vp.getColumn(columnId)?.setHoveredState(true);\n }\n this.hoveredColumnId = columnId;\n }\n /**\n * Sets the sync state to the row with the provided index. It removes the\n * synced effect from the previously synced row.\n *\n * @param rowIndex\n * The index of the row.\n */\n syncRow(rowIndex) {\n const rows = this.viewport?.rows;\n if (!rows) {\n return;\n }\n const firstRowIndex = this.viewport?.rows[0]?.index ?? 0;\n if (this.syncedRowIndex !== void 0) {\n rows[this.syncedRowIndex - firstRowIndex]?.setSyncedState(false);\n }\n if (rowIndex !== void 0) {\n rows[rowIndex - firstRowIndex]?.setSyncedState(true);\n }\n this.syncedRowIndex = rowIndex;\n }\n /**\n * Sets the sync state to the column with the provided ID. It removes the\n * synced effect from the previously synced column.\n *\n * @param columnId\n * The ID of the column.\n */\n syncColumn(columnId) {\n const vp = this.viewport;\n if (!vp) {\n return;\n }\n if (this.syncedColumnId) {\n vp.getColumn(this.syncedColumnId)?.setSyncedState(false);\n }\n if (columnId) {\n vp.getColumn(columnId)?.setSyncedState(true);\n }\n this.syncedColumnId = columnId;\n }\n /**\n * Render caption above the grid.\n * @internal\n */\n renderCaption() {\n const captionOptions = this.options?.caption;\n const captionText = captionOptions?.text;\n if (!captionText) {\n return;\n }\n // Create a caption element.\n this.captionElement = Grid_makeHTMLElement('div', {\n className: Grid_Core_Globals.getClassName('captionElement'),\n id: this.id + '-caption'\n }, this.contentWrapper);\n // Render the caption element content.\n Grid_setHTMLContent(this.captionElement, captionText);\n if (captionOptions.className) {\n this.captionElement.classList.add(...captionOptions.className.split(/\\s+/g));\n }\n }\n /**\n * Render description under the grid.\n *\n * @internal\n */\n renderDescription() {\n const descriptionOptions = this.options?.description;\n const descriptionText = descriptionOptions?.text;\n if (!descriptionText) {\n return;\n }\n // Create a description element.\n this.descriptionElement = Grid_makeHTMLElement('div', {\n className: Grid_Core_Globals.getClassName('descriptionElement'),\n id: this.id + '-description'\n }, this.contentWrapper);\n // Render the description element content.\n Grid_setHTMLContent(this.descriptionElement, descriptionText);\n if (descriptionOptions.className) {\n this.descriptionElement.classList.add(...descriptionOptions.className.split(/\\s+/g));\n }\n }\n /**\n * Resets the content wrapper of the Grid. It clears the content and\n * resets the class names.\n * @internal\n */\n resetContentWrapper() {\n if (!this.contentWrapper) {\n return;\n }\n this.contentWrapper.innerHTML = HTML_AST.emptyHTML;\n this.contentWrapper.className =\n Grid_Core_Globals.getClassName('container') + ' ' +\n this.options?.rendering?.theme || '';\n }\n /**\n * Renders the viewport of the Grid. If the Grid is already\n * rendered, it will be destroyed and re-rendered with the new data.\n * @internal\n */\n renderViewport() {\n const viewportMeta = this.viewport?.getStateMeta();\n const pagination = this.pagination;\n const paginationPosition = pagination?.options.position;\n this.enabledColumns = this.getEnabledColumnIDs();\n this.credits?.destroy();\n this.viewport?.destroy();\n delete this.viewport;\n this.resetContentWrapper();\n Grid_fireEvent(this, 'beforeRenderViewport');\n this.renderCaption();\n // Render top pagination if enabled (before table)\n if (paginationPosition === 'top') {\n pagination?.render();\n }\n if (this.enabledColumns.length > 0) {\n this.viewport = this.renderTable();\n if (viewportMeta && this.viewport) {\n this.viewport.applyStateMeta(viewportMeta);\n }\n }\n else {\n this.renderNoData();\n }\n this.accessibility?.setA11yOptions();\n // Render bottom pagination, footer pagination,\n // or custom container pagination (after table).\n if (paginationPosition !== 'top') {\n pagination?.render();\n }\n this.renderDescription();\n Grid_fireEvent(this, 'afterRenderViewport');\n this.viewport?.reflow();\n }\n /**\n * Renders the table (viewport) of the Grid.\n *\n * @returns\n * The newly rendered table (viewport) of the Grid.\n */\n renderTable() {\n this.tableElement = Grid_makeHTMLElement('table', {\n className: Grid_Core_Globals.getClassName('tableElement')\n }, this.contentWrapper);\n this.tableElement.setAttribute('role', 'grid');\n return new Table_Table(this, this.tableElement);\n }\n /**\n * Renders a message that there is no data to display.\n */\n renderNoData() {\n Grid_makeHTMLElement('div', {\n className: Grid_Core_Globals.getClassName('noData'),\n innerText: this.options?.lang?.noData\n }, this.contentWrapper);\n }\n /**\n * Returns the array of IDs of columns that should be displayed in the data\n * grid, in the correct order.\n */\n getEnabledColumnIDs() {\n const { columnOptionsMap } = this;\n const header = this.options?.header;\n const headerColumns = this.getColumnIds(header || [], false);\n const columnsIncluded = this.options?.rendering?.columns?.included || (headerColumns && headerColumns.length > 0 ?\n headerColumns : this.dataTable?.getColumnIds());\n if (!columnsIncluded?.length) {\n return [];\n }\n if (!columnOptionsMap) {\n return columnsIncluded;\n }\n let columnId;\n const result = [];\n for (let i = 0, iEnd = columnsIncluded.length; i < iEnd; ++i) {\n columnId = columnsIncluded[i];\n if (columnOptionsMap?.[columnId]?.options?.enabled !== false) {\n result.push(columnId);\n }\n }\n return result;\n }\n /**\n * Loads the data table of the Grid. If the data table is passed as a\n * reference, it should be used instead of creating a new one.\n */\n loadDataTable() {\n // Unregister all events attached to the previous data table.\n this.dataTableEventDestructors.forEach((fn) => fn());\n const tableOptions = this.options?.dataTable;\n // If the table is passed as a reference, it should be used instead of\n // creating a new one.\n if (tableOptions?.clone) {\n this.dataTable = tableOptions;\n this.presentationTable = this.dataTable.getModified();\n return;\n }\n const dt = this.dataTable = this.presentationTable =\n new Data_DataTable(tableOptions);\n // If the data table is modified, mark the querying controller to be\n // updated on the next proceed.\n [\n 'afterDeleteColumns',\n 'afterDeleteRows',\n 'afterSetCell',\n 'afterSetColumns',\n 'afterSetRows'\n ].forEach((eventName) => {\n this.dataTableEventDestructors.push(dt.on(eventName, () => {\n this.querying.shouldBeUpdated = true;\n }));\n });\n }\n /**\n * Extracts all references to columnIds on all levels below defined level\n * in the settings.header structure.\n *\n * @param columnsTree\n * Structure that we start calculation\n *\n * @param [onlyEnabledColumns=true]\n * Extract all columns from header or columns filtered by enabled param\n * @returns\n */\n getColumnIds(columnsTree, onlyEnabledColumns = true) {\n let columnIds = [];\n const { enabledColumns } = this;\n for (const column of columnsTree) {\n const columnId = typeof column === 'string' ? column : column.columnId;\n if (columnId &&\n (!onlyEnabledColumns || (enabledColumns?.includes(columnId)))) {\n columnIds.push(columnId);\n }\n if (typeof column !== 'string' && column.columns) {\n columnIds = columnIds.concat(this.getColumnIds(column.columns, onlyEnabledColumns));\n }\n }\n return columnIds;\n }\n /**\n * Destroys the Grid.\n */\n destroy() {\n const dgIndex = Grid.grids.findIndex((dg) => dg === this);\n this.dataTableEventDestructors.forEach((fn) => fn());\n this.viewport?.destroy();\n if (this.container) {\n this.container.innerHTML = HTML_AST.emptyHTML;\n this.container.classList.remove(Grid_Core_Globals.getClassName('container'));\n }\n // Clear all properties\n Object.keys(this).forEach((key) => {\n delete this[key];\n });\n Grid.grids.splice(dgIndex, 1);\n }\n /**\n * Grey out the Grid and show a loading indicator.\n *\n * @param message\n * The message to display in the loading indicator.\n */\n showLoading(message) {\n if (this.loadingWrapper) {\n return;\n }\n // Create loading wrapper.\n this.loadingWrapper = Grid_makeHTMLElement('div', {\n className: Grid_Core_Globals.getClassName('loadingWrapper')\n }, this.contentWrapper);\n // Create spinner element.\n Grid_makeHTMLElement('div', {\n className: Grid_Core_Globals.getClassName('loadingSpinner')\n }, this.loadingWrapper);\n // Create loading message span element.\n const loadingSpan = Grid_makeHTMLElement('span', {\n className: Grid_Core_Globals.getClassName('loadingMessage')\n }, this.loadingWrapper);\n Grid_setHTMLContent(loadingSpan, Grid_pick(message, this.options?.lang?.loading, ''));\n }\n /**\n * Removes the loading indicator.\n */\n hideLoading() {\n this.loadingWrapper?.remove();\n delete this.loadingWrapper;\n }\n /**\n * Returns the grid data as a JSON string.\n *\n * @param modified\n * Whether to return the modified data table (after filtering/sorting/etc.)\n * or the unmodified, original one. Default value is set to `true`.\n *\n * @return\n * JSON representation of the data\n */\n getData(modified = true) {\n const dataTable = modified ? this.viewport?.dataTable : this.dataTable;\n const columns = dataTable?.columns;\n if (!this.enabledColumns || !columns) {\n return '{}';\n }\n for (const key of Object.keys(columns)) {\n if (this.enabledColumns.indexOf(key) === -1) {\n delete columns[key];\n }\n }\n return JSON.stringify(columns, null, 2);\n }\n /**\n * Returns the current Grid options.\n *\n * @param onlyUserOptions\n * Whether to return only the user options or all options (user options\n * merged with the default ones). Default is `true`.\n *\n * @returns\n * Grid options.\n */\n getOptions(onlyUserOptions = true) {\n const options = onlyUserOptions ? Grid_merge(this.userOptions) : Grid_merge(this.options);\n if (options.dataTable?.id) {\n options.dataTable = {\n columns: options.dataTable.columns\n };\n }\n return options;\n }\n}\n/* *\n*\n* Properties\n*\n* */\n/**\n * An array containing the current Grid objects in the page.\n * @private\n */\nGrid.grids = [];\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Core_Grid = (Grid);\n\n;// ./code/grid/es-modules/Data/DataPool.js\n/* *\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sophie Bremer\n *\n * */\n\n\n\nconst { addEvent: DataPool_addEvent, fireEvent: DataPool_fireEvent, merge: DataPool_merge } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Data pool to load connectors on-demand.\n *\n * @class\n * @name Data.DataPool\n *\n * @param {DataPoolOptions} options\n * Pool options with all connectors.\n */\nclass DataPool {\n /* *\n *\n * Constructor\n *\n * */\n constructor(options) {\n this.options = DataPool_merge(DataPool.defaultOptions, options);\n this.connectors = {};\n this.waiting = {};\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Emits an event on this data pool to all registered callbacks of the given\n * event.\n *\n * @param {DataTable.Event} e\n * Event object with event information.\n */\n emit(e) {\n DataPool_fireEvent(this, e.type, e);\n }\n /**\n * Loads the connector.\n *\n * @function Data.DataPool#getConnector\n *\n * @param {string} connectorId\n * ID of the connector.\n *\n * @return {Promise<Data.DataConnectorType>}\n * Returns the connector.\n */\n getConnector(connectorId) {\n const connector = this.connectors[connectorId];\n // Already loaded\n if (connector?.loaded) {\n return Promise.resolve(connector);\n }\n let waitingList = this.waiting[connectorId];\n // Start loading\n if (!waitingList) {\n waitingList = this.waiting[connectorId] = [];\n const connectorOptions = this.getConnectorOptions(connectorId);\n if (!connectorOptions) {\n throw new Error(`Connector '${connectorId}' not found.`);\n }\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this\n .loadConnector(connectorOptions)\n .then((connector) => {\n delete this.waiting[connectorId];\n for (let i = 0, iEnd = waitingList.length; i < iEnd; ++i) {\n waitingList[i][0](connector);\n }\n })['catch']((error) => {\n delete this.waiting[connectorId];\n for (let i = 0, iEnd = waitingList.length; i < iEnd; ++i) {\n waitingList[i][1](error);\n }\n });\n }\n // Add request to waiting list\n return new Promise((resolve, reject) => {\n waitingList.push([resolve, reject]);\n });\n }\n /**\n * Returns the IDs of all connectors.\n *\n * @private\n *\n * @return {Array<string>}\n * Names of all connectors.\n */\n getConnectorIds() {\n const connectors = this.options.connectors, connectorIds = [];\n for (let i = 0, iEnd = connectors.length; i < iEnd; ++i) {\n connectorIds.push(connectors[i].id);\n }\n return connectorIds;\n }\n /**\n * Loads the options of the connector.\n *\n * @private\n *\n * @param {string} connectorId\n * ID of the connector.\n *\n * @return {DataConnectorTypeOptions | undefined}\n * Returns the options of the connector, or `undefined` if not found.\n */\n getConnectorOptions(connectorId) {\n const connectors = this.options.connectors;\n for (let i = 0, iEnd = connectors.length; i < iEnd; ++i) {\n if (connectors[i].id === connectorId) {\n return connectors[i];\n }\n }\n }\n /**\n * Tests whether the connector has never been requested.\n *\n * @param {string} connectorId\n * Name of the connector.\n *\n * @return {boolean}\n * Returns `true`, if the connector has never been requested, otherwise\n * `false`.\n */\n isNewConnector(connectorId) {\n return !this.connectors[connectorId];\n }\n /**\n * Instantiates the connector class for the given options and loads its\n * data.\n *\n * @private\n *\n * @param {Data.DataPoolConnectorOptions} options\n * Options of connector.\n *\n * @return {Promise<Data.DataConnectorType>}\n * Returns the connector.\n */\n loadConnector(options) {\n return new Promise((resolve, reject) => {\n this.emit({\n type: 'load',\n options\n });\n const ConnectorClass = Connectors_DataConnector.types[options.type];\n if (!ConnectorClass) {\n throw new Error(`Connector type not found. (${options.type})`);\n }\n const connector = this.connectors[options.id] =\n new ConnectorClass(options);\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n connector\n .load()\n .then(({ converter }) => {\n connector.converter = converter;\n connector.loaded = true;\n this.emit({\n type: 'afterLoad',\n options\n });\n resolve(connector);\n })['catch'](reject);\n });\n }\n /**\n * Cancels all data connectors pending requests.\n */\n cancelPendingRequests() {\n const { connectors } = this;\n for (const connectorKey of Object.keys(connectors)) {\n connectors[connectorKey].stopPolling();\n }\n }\n /**\n * Registers a callback for a specific event.\n *\n * @function Highcharts.DataPool#on\n *\n * @param {string} type\n * Event type as a string.\n *\n * @param {Highcharts.EventCallbackFunction<Highcharts.DataPool>} callback\n * Function to register for an event callback.\n *\n * @return {Function}\n * Function to unregister callback from the event.\n */\n on(type, callback) {\n return DataPool_addEvent(this, type, callback);\n }\n /**\n * Sets connector options under the specified `options.id`.\n *\n * @param options\n * Connector options to set.\n */\n setConnectorOptions(options) {\n const connectorsOptions = this.options.connectors;\n const connectorsInstances = this.connectors;\n this.emit({\n type: 'setConnectorOptions',\n options\n });\n for (let i = 0, iEnd = connectorsOptions.length; i < iEnd; ++i) {\n if (connectorsOptions[i].id === options.id) {\n connectorsOptions.splice(i, 1);\n break;\n }\n }\n // TODO: Check if can be refactored\n if (connectorsInstances[options.id]) {\n connectorsInstances[options.id].stopPolling();\n delete connectorsInstances[options.id];\n }\n connectorsOptions.push(options);\n this.emit({\n type: 'afterSetConnectorOptions',\n options\n });\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\nDataPool.defaultOptions = {\n connectors: []\n};\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Data_DataPool = (DataPool);\n\n;// ./code/grid/es-modules/Grid/Pro/GridEvents.js\n/* *\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\nconst { addEvent: GridEvents_addEvent, fireEvent: GridEvents_fireEvent, pushUnique: GridEvents_pushUnique } = Core_Utilities;\nconst propagate = {\n 'cell_mouseOver': function () {\n GridEvents_fireEvent(this.row.viewport.grid, 'cellMouseOver', {\n target: this\n });\n },\n 'cell_mouseOut': function () {\n GridEvents_fireEvent(this.row.viewport.grid, 'cellMouseOut', {\n target: this\n });\n }\n};\n/* *\n *\n * Functions\n *\n * */\n/**\n * Composition to add events options to the Grid.\n *\n * @param GridClass\n * The class to extend.\n *\n * @param ColumnClass\n * The class to extend.\n *\n * @param HeaderCellClass\n * The class to extend.\n *\n * @param TableCellClass\n * The class to extend.\n *\n * @internal\n */\nfunction compose(GridClass, ColumnClass, HeaderCellClass, TableCellClass) {\n if (!GridEvents_pushUnique(Core_Globals.composed, 'GridEvents')) {\n return;\n }\n [\n 'beforeLoad',\n 'afterLoad'\n ].forEach((name) => {\n GridEvents_addEvent(GridClass, name, (e) => {\n const grid = e.target;\n grid.options?.events?.[name]?.call(grid);\n });\n });\n [\n 'mouseOver',\n 'mouseOut',\n 'dblClick',\n 'click',\n 'afterRender'\n ].forEach((name) => {\n GridEvents_addEvent(TableCellClass, name, (e) => {\n const cell = e.target;\n cell.column.options.cells?.events?.[name]?.call(cell);\n propagate['cell_' + name]?.call(cell);\n });\n });\n [\n 'afterResize',\n 'beforeSort',\n 'afterSort',\n 'beforeFilter',\n 'afterFilter'\n ].forEach((name) => {\n GridEvents_addEvent(ColumnClass, name, (e) => {\n const column = e.target;\n column.options?.events?.[name]?.call(column);\n });\n });\n [\n 'click',\n 'afterRender'\n ].forEach((name) => {\n GridEvents_addEvent(HeaderCellClass, name, (e) => {\n const { column } = e;\n column?.options?.header?.events?.[name]?.call(column);\n });\n });\n}\n/* *\n *\n * Default Export\n *\n * */\n/**\n * @internal\n */\n/* harmony default export */ const GridEvents = ({ compose });\n\n;// ./code/grid/es-modules/Grid/Pro/CellEditing/CellEditing.js\n/* *\n *\n * Grid Cell Editing class.\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\nconst { fireEvent: CellEditing_fireEvent } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * The class that handles the manual editing of cells in the data grid.\n */\nclass CellEditing {\n /* *\n *\n * Constructor\n *\n * */\n constructor(viewport) {\n /**\n * Handles the blur event on the input field.\n */\n this.onInputBlur = () => {\n if (!this.stopEditing()) {\n this.editModeContent?.getMainElement().focus();\n }\n };\n /**\n * Handles the change event on the input field.\n */\n this.onInputChange = () => {\n if (this.editModeContent?.finishAfterChange &&\n !this.stopEditing()) {\n this.editModeContent?.getMainElement().focus();\n }\n };\n /**\n * Handles the keydown event on the input field. Cancels editing on escape\n * and saves the value on enter.\n *\n * @param e\n * The keyboard event.\n */\n this.onInputKeyDown = (e) => {\n const { key } = e;\n e.stopPropagation();\n if (key === 'Escape') {\n this.stopEditing(false);\n return;\n }\n if (key === 'Enter') {\n if (this.editModeContent?.finishAfterChange) {\n this.onInputChange();\n return;\n }\n this.stopEditing();\n }\n };\n this.viewport = viewport;\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Turns the cell into an editable input field.\n *\n * @param cell\n * The cell that is to be edited.\n */\n startEditing(cell) {\n if (this.editedCell === cell || (\n // If value is invalid, do not start new editing\n this.editedCell && !this.stopEditing())) {\n return;\n }\n this.editedCell = cell;\n cell.htmlElement.classList.add(Grid_Core_Globals.getClassName('editedCell'));\n this.render();\n CellEditing_fireEvent(cell, 'startedEditing');\n }\n /**\n * Stops the editing of the cell.\n *\n * @param submit\n * Whether to save the value of the input to the cell. Defaults to true.\n *\n * @return\n * Returns `true` if the cell was successfully stopped editing.\n */\n stopEditing(submit = true) {\n const cell = this.editedCell;\n const emContent = this.editModeContent;\n if (!cell || !emContent) {\n return false;\n }\n const { column } = cell;\n const vp = column.viewport;\n const newValue = emContent.value;\n if (submit) {\n const validationErrors = [];\n if (!vp.validator.validate(cell, validationErrors)) {\n vp.validator.initErrorBox(cell, validationErrors);\n this.setA11yAttributes(false);\n return false;\n }\n this.setA11yAttributes(true);\n vp.validator.hide();\n vp.validator.errorCell = void 0;\n }\n // Hide notification\n this.viewport.validator.hide();\n // Hide input\n this.destroy();\n cell.htmlElement.classList.remove(Grid_Core_Globals.getClassName('editedCell'));\n cell.htmlElement.focus();\n const isValueChanged = cell.value !== newValue;\n void cell.setValue(submit ? newValue : cell.value, submit && isValueChanged);\n if (isValueChanged) {\n CellEditing_fireEvent(cell, 'stoppedEditing', { submit });\n }\n delete this.editedCell;\n return true;\n }\n setA11yAttributes(valid) {\n const mainElement = this.editModeContent?.getMainElement();\n if (!mainElement) {\n return;\n }\n if (!valid) {\n mainElement.setAttribute('aria-invalid', 'true');\n mainElement.setAttribute('aria-errormessage', 'notification-error');\n }\n else {\n mainElement.setAttribute('aria-invalid', 'false');\n mainElement.setAttribute('aria-errormessage', '');\n }\n }\n /**\n * Renders the input field for the cell, focuses it and sets up event\n * listeners.\n */\n render() {\n const cell = this.editedCell;\n if (!cell || !cell.column.editModeRenderer) {\n return;\n }\n this.containerElement = this.containerElement ||\n document.createElement('div');\n this.containerElement.className =\n CellEditing.classNames.cellEditingContainer;\n this.editedCell?.htmlElement.appendChild(this.containerElement);\n this.editModeContent = cell.column.editModeRenderer?.render(cell, this.containerElement);\n this.editModeContent.getMainElement().focus();\n this.editModeContent.blurHandler = this.onInputBlur;\n this.editModeContent.changeHandler = this.onInputChange;\n this.editModeContent.keyDownHandler = this.onInputKeyDown;\n const rules = cell.column.options?.cells?.editMode?.validationRules ||\n [];\n if (rules.includes('notEmpty')) {\n this.editModeContent.getMainElement().setAttribute('aria-required', 'true');\n }\n }\n /**\n * Removes event listeners and the input element.\n */\n destroy() {\n if (!this.editModeContent) {\n return;\n }\n this.editModeContent.destroy();\n this.containerElement?.remove();\n delete this.editModeContent;\n delete this.containerElement;\n }\n}\n/* *\n *\n * Namespace\n *\n * */\n(function (CellEditing) {\n /**\n * The class names used by the CellEditing functionality.\n */\n CellEditing.classNames = {\n cellEditingContainer: Grid_Core_Globals.classNamePrefix + 'cell-editing-container'\n };\n})(CellEditing || (CellEditing = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const CellEditing_CellEditing = (CellEditing);\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/CellRendererRegistry.js\n/* *\n *\n * Cell Renderer Registry\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n/* *\n *\n * Namespace\n *\n * */\nvar CellRendererRegistry;\n(function (CellRendererRegistry) {\n /* *\n *\n * Constants\n *\n * */\n /**\n * Record of cell renderer classes\n */\n CellRendererRegistry.types = {};\n /* *\n *\n * Functions\n *\n * */\n /**\n * Method used to register new cell renderer classes.\n *\n * @param key\n * Registry key of the cell renderer class.\n *\n * @param CellRendererClass\n * Cell renderer class (aka class constructor) to register.\n */\n function registerRenderer(key, CellRendererClass) {\n return (!!key &&\n !CellRendererRegistry.types[key] &&\n !!(CellRendererRegistry.types[key] = CellRendererClass));\n }\n CellRendererRegistry.registerRenderer = registerRenderer;\n})(CellRendererRegistry || (CellRendererRegistry = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const CellRendering_CellRendererRegistry = (CellRendererRegistry);\n\n;// ./code/grid/es-modules/Grid/Pro/CellEditing/CellEditingComposition.js\n/* *\n *\n * Grid Cell Editing class.\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\n\n\n\n\nconst { makeHTMLElement: CellEditingComposition_makeHTMLElement } = Core_GridUtils;\nconst { addEvent: CellEditingComposition_addEvent, merge: CellEditingComposition_merge, pushUnique: CellEditingComposition_pushUnique } = Core_Utilities;\n/* *\n *\n * Composition\n *\n * */\n/**\n * @internal\n */\nvar CellEditingComposition;\n(function (CellEditingComposition) {\n /**\n * Default options for the cell editing.\n */\n const defaultOptions = {\n accessibility: {\n announcements: {\n cellEditing: true\n }\n },\n lang: {\n accessibility: {\n cellEditing: {\n editable: 'Editable.',\n announcements: {\n started: 'Entered cell editing mode.',\n edited: 'Edited cell value.',\n cancelled: 'Editing canceled.',\n notValid: 'Provided value is not valid.'\n }\n }\n }\n }\n };\n /**\n * Extends the grid classes with cell editing functionality.\n *\n * @param TableClass\n * The class to extend.\n *\n * @param TableCellClass\n * The class to extend.\n *\n * @param ColumnClass\n * The class to extend.\n */\n function compose(TableClass, TableCellClass, ColumnClass) {\n if (!CellEditingComposition_pushUnique(Grid_Core_Globals.composed, 'CellEditing')) {\n return;\n }\n CellEditingComposition_merge(true, Core_Defaults.defaultOptions, defaultOptions);\n CellEditingComposition_addEvent(ColumnClass, 'afterInit', afterColumnInit);\n CellEditingComposition_addEvent(TableClass, 'beforeInit', initTable);\n CellEditingComposition_addEvent(TableCellClass, 'keyDown', onCellKeyDown);\n CellEditingComposition_addEvent(TableCellClass, 'dblClick', onCellDblClick);\n CellEditingComposition_addEvent(TableCellClass, 'afterRender', addEditableCellA11yHint);\n CellEditingComposition_addEvent(TableCellClass, 'startedEditing', function () {\n announceA11yUserEditedCell(this, 'started');\n });\n CellEditingComposition_addEvent(TableCellClass, 'stoppedEditing', function (e) {\n if (e.submit) {\n this.column.options.cells?.events?.afterEdit?.call(this);\n }\n announceA11yUserEditedCell(this, e.submit ? 'edited' : 'cancelled');\n });\n }\n CellEditingComposition.compose = compose;\n /**\n * Callback function called before table initialization.\n */\n function initTable() {\n this.cellEditing = new CellEditing_CellEditing(this);\n }\n /**\n * Creates the edit mode renderer for the column.\n *\n * @param column\n * The column to create the edit mode renderer for.\n */\n function createEditModeRenderer(column) {\n const editModeOptions = column.options.cells?.editMode;\n const selectedEditModeRendererTypeName = editModeOptions?.renderer?.type;\n const viewRendererTypeName = column.options?.cells?.renderer?.type || 'text';\n if (selectedEditModeRendererTypeName) {\n return new CellRendering_CellRendererRegistry.types[selectedEditModeRendererTypeName](column, editModeOptions?.renderer || {});\n }\n const ViewRendererType = CellRendering_CellRendererRegistry.types[viewRendererTypeName] ||\n CellRendering_CellRendererRegistry.types.text;\n let editModeRendererTypeName = ViewRendererType.defaultEditingRenderer;\n if (typeof editModeRendererTypeName !== 'string') {\n editModeRendererTypeName =\n editModeRendererTypeName[column.dataType] || 'textInput';\n }\n return new CellRendering_CellRendererRegistry.types[editModeRendererTypeName](column, editModeRendererTypeName === viewRendererTypeName ? CellEditingComposition_merge(column.options.cells?.renderer, { disabled: false }) || {} : {});\n }\n /**\n * Callback function called after column initialization.\n */\n function afterColumnInit() {\n const { options } = this;\n if (options?.cells?.editMode?.enabled) {\n this.editModeRenderer = createEditModeRenderer(this);\n }\n }\n /**\n * Callback function called when a key is pressed on a cell.\n *\n * @param e\n * The event object.\n */\n function onCellKeyDown(e) {\n if (e.originalEvent?.key !== 'Enter' ||\n !this.column.editModeRenderer) {\n return;\n }\n this.row.viewport.cellEditing?.startEditing(this);\n }\n /**\n * Callback function called when a cell is double clicked.\n */\n function onCellDblClick() {\n if (this.column.editModeRenderer) {\n this.row.viewport.cellEditing?.startEditing(this);\n }\n }\n /**\n * Add the 'editable' hint span element for the editable cell.\n */\n function addEditableCellA11yHint() {\n const a11y = this.row.viewport.grid.accessibility;\n if (!a11y || this.a11yEditableHint?.isConnected) {\n return;\n }\n const editableLang = this.row.viewport.grid.options\n ?.lang?.accessibility?.cellEditing?.editable;\n if (!this.column.options.cells?.editMode?.enabled || !editableLang) {\n return;\n }\n this.a11yEditableHint = CellEditingComposition_makeHTMLElement('span', {\n className: Grid_Core_Globals.getClassName('visuallyHidden'),\n innerText: ', ' + editableLang\n }, this.htmlElement);\n }\n /**\n * Announce that the cell editing started.\n *\n * @param cell\n * The cell that is being edited.\n *\n * @param msgType\n * The type of the message.\n */\n function announceA11yUserEditedCell(cell, msgType) {\n const a11y = cell.row.viewport.grid.accessibility;\n if (!a11y) {\n return;\n }\n const { options } = a11y.grid;\n if (!options?.accessibility?.announcements?.cellEditing) {\n return;\n }\n const lang = options?.lang?.accessibility?.cellEditing?.announcements;\n const msg = lang?.[msgType];\n if (!msg) {\n return;\n }\n a11y.announce(msg);\n }\n})(CellEditingComposition || (CellEditingComposition = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const CellEditing_CellEditingComposition = (CellEditingComposition);\n\n;// ./code/grid/es-modules/Grid/Core/Credits.js\n/* *\n *\n * Grid Credits class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\nconst { makeHTMLElement: Credits_makeHTMLElement, setHTMLContent: Credits_setHTMLContent } = Core_GridUtils;\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a credits in the grid.\n */\nclass Credits {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Construct the credits.\n *\n * @param grid\n * The Grid instance which the credits belong to.\n *\n * @param options\n * Options for the credits label. Predefined if not provided.\n *\n */\n constructor(grid, options) {\n this.grid = grid;\n this.containerElement = Credits_makeHTMLElement('div', {\n className: Grid_Core_Globals.getClassName('creditsContainer')\n });\n this.textElement = this.renderAnchor();\n this.options = options ?? Credits.defaultOptions;\n this.render();\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Render the credits. If the credits are disabled, they will be removed\n * from the container.\n */\n render() {\n const grid = this.grid;\n const contentWrapper = grid.contentWrapper;\n const { text, href } = this.options;\n this.containerElement.remove();\n if (!this.textElement) {\n this.textElement = this.renderAnchor();\n }\n if (text) {\n Credits_setHTMLContent(this.textElement, text);\n }\n if (href) {\n this.textElement.setAttribute('href', href || '');\n }\n if (grid.descriptionElement) {\n contentWrapper?.insertBefore(this.containerElement, grid.descriptionElement);\n }\n else {\n contentWrapper?.appendChild(this.containerElement);\n }\n }\n renderAnchor() {\n const anchorElement = Credits_makeHTMLElement('a', {\n className: Grid_Core_Globals.getClassName('creditsText')\n }, this.containerElement);\n anchorElement.setAttribute('target', '_blank');\n anchorElement.setAttribute('alt', 'Highcharts logo');\n return anchorElement;\n }\n /**\n * Get the height of the credits container.\n */\n getHeight() {\n return this.containerElement.offsetHeight;\n }\n /**\n * Destroy the credits. The credits will be removed from the container and\n * the reference to the credits will be deleted from the Grid instance\n * it belongs to.\n */\n destroy() {\n this.containerElement.remove();\n }\n}\n/* *\n*\n* Static Properties\n*\n* */\n/**\n * Default options of the credits.\n */\nCredits.defaultOptions = {\n enabled: true,\n text: '',\n href: 'https://www.highcharts.com',\n position: 'bottom'\n};\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Core_Credits = (Credits);\n\n;// ./code/grid/es-modules/Grid/Pro/Credits/CreditsPro.js\n/* *\n *\n * Grid Credits class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\n\nconst { setHTMLContent: CreditsPro_setHTMLContent } = Core_GridUtils;\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a credits in the data grid.\n */\nclass CreditsPro extends Core_Credits {\n /* *\n *\n * Methods\n *\n * */\n /**\n * Set the content of the credits.\n */\n setContent() {\n const { text, href } = this.options;\n CreditsPro_setHTMLContent(this.textElement, text || '');\n this.textElement.setAttribute('href', href || '');\n }\n /**\n * Append the credits to the container. The position of the credits is\n * determined by the `position` option.\n */\n appendToContainer() {\n const grid = this.grid;\n const contentWrapper = grid.contentWrapper;\n const { position } = this.options;\n // Apply grid-pro class\n this.containerElement.classList.add(Grid_Core_Globals.getClassName('creditsPro'));\n if (position === 'top') {\n // Append the credits to the top of the table.\n contentWrapper?.prepend(this.containerElement);\n return;\n }\n // Append the credits to the bottom of the table.\n if (grid.descriptionElement) {\n contentWrapper?.insertBefore(this.containerElement, grid.descriptionElement);\n }\n else {\n contentWrapper?.appendChild(this.containerElement);\n }\n }\n /**\n * Update the credits with new options.\n *\n * @param options\n * The new options for the credits.\n *\n * @param render\n * Whether to render the credits after the update.\n */\n update(options, render = true) {\n if (options) {\n this.grid.update({\n credits: options\n }, false);\n this.options = this.grid.options?.credits ?? {};\n }\n if (render) {\n this.render();\n }\n }\n /**\n * Render the credits. If the credits are disabled, they will be removed\n * from the container. If also reflows the viewport dimensions.\n */\n render() {\n const enabled = this.options.enabled ?? false;\n this.containerElement.remove();\n if (enabled) {\n this.setContent();\n this.appendToContainer();\n }\n else {\n this.destroy();\n }\n this.grid.viewport?.reflow();\n }\n destroy() {\n super.destroy();\n delete this.grid.credits;\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Credits_CreditsPro = (CreditsPro);\n\n;// ./code/grid/es-modules/Grid/Pro/Credits/CreditsProComposition.js\n/* *\n *\n * Grid Credits class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\n\n\nconst { addEvent: CreditsProComposition_addEvent, merge: CreditsProComposition_merge, pushUnique: CreditsProComposition_pushUnique } = Core_Utilities;\n/* *\n *\n * Class Namespace\n *\n * */\nvar CreditsProComposition;\n(function (CreditsProComposition) {\n /**\n * Extends the grid classes with customizable credits.\n *\n * @param GridClass\n * The class to extend.\n *\n */\n function compose(GridClass) {\n if (!CreditsProComposition_pushUnique(Grid_Core_Globals.composed, 'CreditsPro')) {\n return;\n }\n CreditsProComposition_merge(true, Core_Defaults.defaultOptions, {\n credits: Credits_CreditsPro.defaultOptions\n });\n // TODO: Change to `beforeLoad` after upgrading grid update.\n CreditsProComposition_addEvent(GridClass, 'afterRenderViewport', initCredits);\n }\n CreditsProComposition.compose = compose;\n /**\n * Init configurable credits.\n * @param this\n * Reference to Grid.\n */\n function initCredits() {\n this.credits = new Credits_CreditsPro(this, this.options?.credits);\n }\n})(CreditsProComposition || (CreditsProComposition = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Credits_CreditsProComposition = (CreditsProComposition);\n\n;// ./code/grid/es-modules/Shared/DownloadURL.js\n/* *\n *\n * (c) 2015-2025 Oystein Moseng\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Mixin for downloading content in the browser\n *\n * */\n\n/* *\n *\n * Imports\n *\n * */\n\nconst { isSafari, win: DownloadURL_win, win: { document: DownloadURL_doc } } = Core_Globals;\n\nconst { error: DownloadURL_error } = Core_Utilities;\n/* *\n *\n * Constants\n *\n * */\nconst domurl = DownloadURL_win.URL || DownloadURL_win.webkitURL || DownloadURL_win;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Convert base64 dataURL to Blob if supported, otherwise returns undefined.\n *\n * @private\n * @function Highcharts.dataURLtoBlob\n *\n * @param {string} dataURL\n * URL to convert.\n *\n * @return {string | undefined}\n * Blob.\n */\nfunction dataURLtoBlob(dataURL) {\n const parts = dataURL\n .replace(/filename=.*;/, '')\n .match(/data:([^;]*)(;base64)?,([A-Z+\\d\\/]+)/i);\n if (parts &&\n parts.length > 3 &&\n (DownloadURL_win.atob) &&\n DownloadURL_win.ArrayBuffer &&\n DownloadURL_win.Uint8Array &&\n DownloadURL_win.Blob &&\n (domurl.createObjectURL)) {\n // Try to convert data URL to Blob\n const binStr = DownloadURL_win.atob(parts[3]), buf = new DownloadURL_win.ArrayBuffer(binStr.length), binary = new DownloadURL_win.Uint8Array(buf);\n for (let i = 0; i < binary.length; ++i) {\n binary[i] = binStr.charCodeAt(i);\n }\n return domurl\n .createObjectURL(new DownloadURL_win.Blob([binary], { 'type': parts[1] }));\n }\n}\n/**\n * Download a data URL in the browser. Can also take a blob as first param.\n *\n * @private\n * @function Highcharts.downloadURL\n *\n * @param {string | global.URL} dataURL\n * The dataURL/Blob to download.\n * @param {string} filename\n * The name of the resulting file (w/extension).\n */\nfunction downloadURL(dataURL, filename) {\n const nav = DownloadURL_win.navigator, a = DownloadURL_doc.createElement('a');\n // IE specific blob implementation\n // Don't use for normal dataURLs\n if (typeof dataURL !== 'string' &&\n !(dataURL instanceof String) &&\n nav.msSaveOrOpenBlob) {\n nav.msSaveOrOpenBlob(dataURL, filename);\n return;\n }\n dataURL = '' + dataURL;\n if (nav.userAgent.length > 1000 /* RegexLimits.shortLimit */) {\n throw new Error('Input too long');\n }\n const // Some browsers have limitations for data URL lengths. Try to convert\n // to Blob or fall back. Edge always needs that blob.\n isOldEdgeBrowser = /Edge\\/\\d+/.test(nav.userAgent), \n // Safari on iOS needs Blob in order to download PDF\n safariBlob = (isSafari &&\n typeof dataURL === 'string' &&\n dataURL.indexOf('data:application/pdf') === 0);\n if (safariBlob || isOldEdgeBrowser || dataURL.length > 2000000) {\n dataURL = dataURLtoBlob(dataURL) || '';\n if (!dataURL) {\n throw new Error('Failed to convert to blob');\n }\n }\n // Try HTML5 download attr if supported\n if (typeof a.download !== 'undefined') {\n a.href = dataURL;\n a.download = filename; // HTML5 download attribute\n DownloadURL_doc.body.appendChild(a);\n a.click();\n DownloadURL_doc.body.removeChild(a);\n }\n else {\n // No download attr, just opening data URI\n try {\n if (!DownloadURL_win.open(dataURL, 'chart')) {\n throw new Error('Failed to open window');\n }\n }\n catch {\n // If window.open failed, try location.href\n DownloadURL_win.location.href = dataURL;\n }\n }\n}\n/**\n * Asynchronously downloads a script from a provided location.\n *\n * @private\n * @function Highcharts.getScript\n *\n * @param {string} scriptLocation\n * The location for the script to fetch.\n */\nfunction getScript(scriptLocation) {\n return new Promise((resolve, reject) => {\n const head = DownloadURL_doc.getElementsByTagName('head')[0], script = DownloadURL_doc.createElement('script');\n // Set type and location for the script\n script.type = 'text/javascript';\n script.src = scriptLocation;\n // Resolve in case of a succesful script fetching\n script.onload = () => {\n resolve();\n };\n // Reject in case of fail\n script.onerror = () => {\n const msg = `Error loading script ${scriptLocation}`;\n DownloadURL_error(msg);\n reject(new Error(msg));\n };\n // Append the newly created script\n head.appendChild(script);\n });\n}\n/**\n * Get a blob object from content, if blob is supported.\n *\n * @private\n * @function Highcharts.getBlobFromContent\n *\n * @param {string} content\n * The content to create the blob from.\n * @param {string} type\n * The type of the content.\n *\n * @return {string | undefined}\n * The blob object, or undefined if not supported.\n *\n * @requires modules/exporting\n * @requires modules/export-data\n */\nfunction getBlobFromContent(content, type) {\n const nav = DownloadURL_win.navigator, domurl = DownloadURL_win.URL || DownloadURL_win.webkitURL || DownloadURL_win;\n try {\n // MS specific\n if ((nav.msSaveOrOpenBlob) && DownloadURL_win.MSBlobBuilder) {\n const blob = new DownloadURL_win.MSBlobBuilder();\n blob.append(content);\n return blob.getBlob('image/svg+xml');\n }\n return domurl.createObjectURL(new DownloadURL_win.Blob(['\\uFEFF' + content], // #7084\n { type: type }));\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n }\n catch (e) {\n // Ignore\n }\n}\n/* *\n *\n * Default Export\n *\n * */\nconst DownloadURL = {\n dataURLtoBlob,\n downloadURL,\n getBlobFromContent,\n getScript\n};\n/* harmony default export */ const Shared_DownloadURL = (DownloadURL);\n\n;// ./code/grid/es-modules/Grid/Pro/Export/Exporting.js\n/* *\n *\n * Grid Exporting class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Karol Kolodziej\n *\n * */\n\n\nconst { downloadURL: Exporting_downloadURL, getBlobFromContent: Exporting_getBlobFromContent } = Shared_DownloadURL;\n/* *\n *\n * Class\n *\n * */\n/**\n * Export the given table to CSV format.\n */\nclass Exporting {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Construct the exporting.\n *\n * @param grid\n * The Grid instance.\n */\n constructor(grid) {\n this.grid = grid;\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Downloads the CSV string as a file.\n *\n * @param modified\n * Whether to return the modified data table (after filtering/sorting/etc.)\n * or the unmodified, original one. Default value is set to `true`.\n */\n downloadCSV(modified = true) {\n const csv = this.getCSV(modified);\n Exporting_downloadURL(Exporting_getBlobFromContent(csv, 'text/csv') ||\n 'data:text/csv,\\uFEFF' + encodeURIComponent(csv), this.getFilename() + '.csv');\n }\n /**\n * Downloads the JSON string as a file.\n *\n * @param modified\n * Whether to return the modified data table (after filtering/sorting/etc.)\n * or the unmodified, original one. Default value is set to `true`.\n */\n downloadJSON(modified = true) {\n const json = this.getJSON(modified);\n Exporting_downloadURL(Exporting_getBlobFromContent(json, 'application/json') ||\n 'data:application/json,\\uFEFF' + encodeURIComponent(json), this.getFilename() + '.json');\n }\n /**\n * Creates a CSV string from the data table.\n *\n * @param modified\n * Whether to return the modified data table (after filtering/sorting/etc.)\n * or the unmodified, original one. Default value is set to `true`.\n *\n * @return\n * CSV string representing the data table.\n */\n getCSV(modified = true) {\n const dataTable = modified ?\n this.grid.viewport?.dataTable :\n this.grid.dataTable;\n if (!dataTable) {\n return '';\n }\n const options = this.grid.options?.exporting || Exporting.defaultOptions;\n const { useLocalDecimalPoint, lineDelimiter, firstRowAsNames } = options.csv ?? {};\n const exportNames = firstRowAsNames !== false;\n let { decimalPoint, itemDelimiter } = options.csv ?? {};\n if (!decimalPoint) {\n decimalPoint = (itemDelimiter !== ',' && useLocalDecimalPoint ?\n (1.1).toLocaleString()[1] :\n '.');\n }\n if (!itemDelimiter) {\n itemDelimiter = (decimalPoint === ',' ? ';' : ',');\n }\n const columns = dataTable.getColumns();\n const columnIds = Object.keys(columns);\n const csvRows = [];\n const columnsCount = columnIds.length;\n const rowArray = [];\n // Add the names as the first row if they should be exported\n if (exportNames) {\n csvRows.push(columnIds.map((columnId) => `\"${columnId}\"`).join(itemDelimiter));\n }\n for (let columnIndex = 0; columnIndex < columnsCount; columnIndex++) {\n const columnId = columnIds[columnIndex], column = columns[columnId], columnLength = column.length;\n let columnDataType;\n for (let rowIndex = 0; rowIndex < columnLength; rowIndex++) {\n let cellValue = column[rowIndex];\n if (!rowArray[rowIndex]) {\n rowArray[rowIndex] = [];\n }\n // Prefer datatype from metadata\n if (columnDataType === 'string') {\n cellValue = '\"' + cellValue + '\"';\n }\n else if (typeof cellValue === 'number') {\n cellValue = String(cellValue).replace('.', decimalPoint);\n }\n else if (typeof cellValue === 'string') {\n cellValue = `\"${cellValue}\"`;\n }\n rowArray[rowIndex][columnIndex] = cellValue;\n // On the final column, push the row to the CSV\n if (columnIndex === columnsCount - 1) {\n // Trim repeated undefined values starting at the end\n // Currently, we export the first \"comma\" even if the\n // second value is undefined\n let i = columnIndex;\n while (rowArray[rowIndex].length > 2) {\n const cellVal = rowArray[rowIndex][i];\n if (cellVal !== void 0) {\n break;\n }\n rowArray[rowIndex].pop();\n i--;\n }\n csvRows.push(rowArray[rowIndex].join(itemDelimiter));\n }\n }\n }\n return csvRows.join(lineDelimiter);\n }\n /**\n * Returns the current grid data as a JSON string.\n *\n * @param modified\n * Whether to return the modified data table (after filtering/sorting/etc.)\n * or the unmodified, original one. Default value is set to `true`.\n *\n * @return\n * JSON representation of the data\n */\n getJSON(modified = true) {\n return this.grid.getData(modified);\n }\n /**\n * Get the default file name used for exported the grid.\n *\n * @returns\n * A file name without extension.\n */\n getFilename() {\n let filename = this.grid.options?.exporting?.filename || 'Grid';\n if (filename) {\n return filename.replace(/\\//g, '-');\n }\n if (typeof filename === 'string') {\n filename = filename\n .toLowerCase()\n .replace(/<\\/?[^>]+(>|$)/g, '') // Strip HTML tags\n .replace(/[\\s_]+/g, '-')\n .replace(/[^a-z\\d\\-]/g, '') // Preserve only latin\n .replace(/^[\\-]+/g, '') // Dashes in the start\n .replace(/[\\-]+/g, '-') // Dashes in a row\n .substr(0, 24)\n .replace(/[\\-]+$/g, ''); // Dashes in the end;\n }\n return filename;\n }\n}\n/**\n * Default options of the credits.\n */\nExporting.defaultOptions = {\n filename: 'Grid',\n csv: {\n firstRowAsNames: true,\n useLocalDecimalPoint: true,\n itemDelimiter: ',',\n lineDelimiter: '\\n'\n }\n};\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Export_Exporting = (Exporting);\n\n;// ./code/grid/es-modules/Grid/Pro/Export/ExportingComposition.js\n/* *\n *\n * Grid Exporting composition\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Karol Kolodziej\n *\n * */\n\n\n\n\n\nconst { addEvent: ExportingComposition_addEvent, pushUnique: ExportingComposition_pushUnique } = Core_Utilities;\n/* *\n *\n * Class Namespace\n *\n * */\nvar ExportingComposition;\n(function (ExportingComposition) {\n /**\n * Extends the grid classes with exporting.\n *\n * @param GridClass\n * The class to extend.\n *\n */\n function compose(GridClass) {\n if (!ExportingComposition_pushUnique(Grid_Core_Globals.composed, 'Exporting')) {\n return;\n }\n Core_Defaults.defaultOptions.exporting = Export_Exporting.defaultOptions;\n ExportingComposition_addEvent(GridClass, 'beforeLoad', initExporting);\n }\n ExportingComposition.compose = compose;\n /**\n * Init exporting\n */\n function initExporting() {\n this.exporting = new Export_Exporting(this);\n }\n})(ExportingComposition || (ExportingComposition = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Export_ExportingComposition = (ExportingComposition);\n\n;// ./code/grid/es-modules/Grid/Pro/ColumnTypes/Validator.js\n/* *\n *\n * Grid cell content validator\n *\n * (c) 2009-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\n\n\nconst { makeDiv, setHTMLContent: Validator_setHTMLContent } = Core_GridUtils;\nconst { defined: Validator_defined } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Class for validating cell content.\n */\nclass Validator {\n /* *\n *\n * Constructor\n *\n * */\n constructor(viewport) {\n this.viewport = viewport;\n this.notifContainer = makeDiv(Validator.classNames.notifContainer);\n this.viewport.grid.contentWrapper?.appendChild(this.notifContainer);\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Validates the cell content.\n *\n * @param cell\n * Edited cell.\n *\n * @param errors\n * An output array for error messages.\n *\n * @returns\n * Returns true if the value is valid, false otherwise.\n */\n validate(cell, errors = []) {\n const { options, dataType } = cell.column;\n const validationErrors = cell.row.viewport.grid.options?.lang?.validationErrors;\n let rules = Array.from(options?.cells?.editMode?.validationRules || []);\n // Remove duplicates in validationRules\n const isArrayString = rules.every((rule) => typeof rule === 'string');\n if (rules.length > 0 && isArrayString) {\n rules = [...new Set(rules)];\n }\n else {\n const predefined = Validator.predefinedRules[dataType] || [];\n const hasPredefined = rules.some((rule) => typeof rule !== 'string' &&\n typeof rule.validate === 'string' &&\n predefined.includes(rule.validate));\n if (!hasPredefined) {\n rules.push(...predefined);\n }\n }\n for (const rule of rules) {\n let ruleDef;\n let err;\n if (typeof rule === 'string') {\n ruleDef = Validator.rulesRegistry[rule];\n err = validationErrors?.[rule]?.notification;\n }\n else {\n ruleDef = rule;\n }\n let validateFn;\n if (typeof ruleDef.validate === 'string') {\n const predefinedRules = (Validator.rulesRegistry[ruleDef.validate]);\n validateFn =\n predefinedRules?.validate;\n }\n else {\n validateFn = ruleDef.validate;\n }\n const { editModeContent } = cell.column.viewport.cellEditing || {};\n if (typeof validateFn === 'function' &&\n editModeContent &&\n !validateFn.call(cell, editModeContent)) {\n if (typeof ruleDef.notification === 'function') {\n err = ruleDef.notification.call(cell, editModeContent);\n }\n errors.push((err || ruleDef.notification));\n }\n }\n return !errors.length;\n }\n /**\n * Set content of notification and adjust the position.\n *\n * @param cell\n * Cell that is currently edited and is not valid.\n *\n * @param errors\n * An array of error messages.\n *\n */\n initErrorBox(cell, errors) {\n const { grid } = this.viewport;\n this.errorCell = cell;\n // Set error container position\n this.reflow();\n // Set width and content\n Validator_setHTMLContent(this.notifContainer, errors.join('<br />'));\n // A11y announcement\n if (grid.options?.accessibility?.announcements?.cellEditing) {\n this.viewport.grid.accessibility?.announce((grid.options?.lang?.accessibility?.cellEditing\n ?.announcements?.notValid || '') + ' ' + errors.join('. '), true);\n }\n this.show();\n }\n /**\n * Highlight the non-valid cell and display error in the notification box.\n */\n show() {\n this.errorCell?.htmlElement.classList.add(Validator.classNames.editedCellError);\n this.notifContainer.classList.add(Validator.classNames.notifError, Validator.classNames.notifAnimation);\n // Set for the aria-errormessage attribute.\n this.notifContainer.setAttribute('id', 'notification-error');\n }\n /**\n * Hide the notification, error and unset highlight on cell.\n *\n * @param hideErrorBox\n * The flag that hides the error on edited cell.\n *\n */\n hide(hideErrorBox = true) {\n this.errorCell?.htmlElement.classList.remove(Validator.classNames.editedCellError);\n this.notifContainer.classList.remove(Validator.classNames.notifError, Validator.classNames.notifAnimation);\n this.notifContainer.removeAttribute('id');\n if (hideErrorBox) {\n this.errorCell = void 0;\n }\n this.notifContainer.innerHTML = HTML_AST.emptyHTML;\n }\n /**\n * Set the position of the error box.\n */\n reflow() {\n const vp = this.viewport, errorCell = this.errorCell?.htmlElement, tableElement = vp.grid.tableElement, contentWrapper = vp.grid.contentWrapper;\n if (!errorCell || !tableElement || !contentWrapper) {\n return;\n }\n const tableTop = tableElement.offsetTop, tableHeight = tableElement.offsetHeight, middlePoint = tableTop + (tableHeight / 2), errorCellTop = errorCell.offsetTop - tableTop;\n if (errorCellTop > middlePoint) {\n this.notifContainer.style.top = // Avoid header overlap\n tableTop + (vp.theadElement?.offsetHeight || 0) + 'px';\n this.notifContainer.style.bottom = 'auto';\n }\n else {\n this.notifContainer.style.top = 'auto';\n this.notifContainer.style.bottom =\n contentWrapper.offsetHeight - tableTop - tableHeight + 'px';\n }\n }\n /**\n * Destroy validator.\n */\n destroy() {\n this.errorCell = void 0;\n this.notifContainer.remove();\n }\n}\n/* *\n *\n * Namespace\n *\n * */\n/**\n * Namespace for Validation functionality.\n */\n(function (Validator) {\n /**\n * The class names used by the validator functionality.\n */\n Validator.classNames = {\n notifContainer: Grid_Core_Globals.classNamePrefix + 'notification',\n notifError: Grid_Core_Globals.classNamePrefix + 'notification-error',\n notifAnimation: Grid_Core_Globals.classNamePrefix + 'notification-animation',\n editedCellError: Grid_Core_Globals.classNamePrefix + 'edited-cell-error'\n };\n /* *\n *\n * Variables\n *\n * */\n /**\n * Definition of default validation rules.\n */\n Validator.rulesRegistry = {\n notEmpty: {\n validate: ({ value, rawValue }) => (Validator_defined(value) && rawValue.length > 0),\n notification: 'Value cannot be empty.'\n },\n number: {\n validate: ({ rawValue }) => !isNaN(+rawValue),\n notification: 'Value has to be a number.'\n },\n datetime: {\n validate: ({ value }) => !Validator_defined(value) || !isNaN(+value),\n notification: 'Value has to be parsed to a valid timestamp.'\n },\n 'boolean': {\n validate: ({ rawValue }) => (rawValue === 'true' || rawValue === 'false' ||\n Number(rawValue) === 1 || Number(rawValue) === 0),\n notification: 'Value has to be a boolean.'\n },\n ignoreCaseUnique: {\n validate: function ({ rawValue }) {\n const oldValue = String(this.value).toLowerCase();\n const rowValueString = rawValue.toLowerCase();\n if (oldValue === rowValueString) {\n return true;\n }\n const columnData = this.column.data;\n const isDuplicate = columnData?.some((value) => String(value).toLowerCase() ===\n rowValueString);\n return !isDuplicate;\n },\n notification: 'Value must be unique within this column (case-insensitive).'\n },\n unique: {\n validate: function ({ rawValue }) {\n const oldValue = this.value;\n if (oldValue === rawValue) {\n return true;\n }\n const columnData = this.column.data;\n const isDuplicate = columnData?.some((value) => value === rawValue);\n return !isDuplicate;\n },\n notification: 'Value must be unique within this column (case-sensitive).'\n }\n };\n /**\n * Default validation rules for each dataType.\n */\n Validator.predefinedRules = {\n 'boolean': ['boolean'],\n datetime: ['datetime'],\n number: ['number'],\n string: []\n };\n})(Validator || (Validator = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ColumnTypes_Validator = (Validator);\n\n;// ./code/grid/es-modules/Grid/Pro/ColumnTypes/ValidatorComposition.js\n/* *\n *\n * Validator Composition.\n *\n * (c) 2020-2024 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sebastian Bochan\n *\n * */\n\n\n\n\nconst { addEvent: ValidatorComposition_addEvent, pushUnique: ValidatorComposition_pushUnique } = Core_Utilities;\n/* *\n *\n * Composition\n *\n * */\n/**\n * @internal\n */\nvar ValidatorComposition;\n(function (ValidatorComposition) {\n /**\n * Extends the grid classes with cell editing functionality.\n *\n * @param TableClass\n * The class to extend.\n *\n */\n function compose(TableClass) {\n if (!ValidatorComposition_pushUnique(Grid_Core_Globals.composed, 'Validator')) {\n return;\n }\n ValidatorComposition_addEvent(TableClass, 'afterInit', initValidatorComposition);\n ValidatorComposition_addEvent(TableClass, 'afterDestroy', destroy);\n }\n ValidatorComposition.compose = compose;\n /**\n * Callback function called after table initialization.\n */\n function initValidatorComposition() {\n this.validator = new ColumnTypes_Validator(this);\n }\n /**\n * Callback function called after table destroy.\n */\n function destroy() {\n this.validator.destroy();\n }\n})(ValidatorComposition || (ValidatorComposition = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ColumnTypes_ValidatorComposition = (ValidatorComposition);\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/CellRenderersComposition.js\n/* *\n *\n * Cell Content Pro composition\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\n\nconst { addEvent: CellRenderersComposition_addEvent, pushUnique: CellRenderersComposition_pushUnique } = Core_Utilities;\n/* *\n *\n * Composition\n *\n * */\n/**\n * @internal\n */\nvar CellRenderersComposition;\n(function (CellRenderersComposition) {\n /**\n * Extends the grid classes with cell editing functionality.\n *\n * @param ColumnClass\n * The class to extend.\n */\n function compose(ColumnClass) {\n if (!CellRenderersComposition_pushUnique(Grid_Core_Globals.composed, 'CellRenderers')) {\n return;\n }\n CellRenderersComposition_addEvent(ColumnClass, 'afterInit', afterColumnInit);\n ColumnClass.prototype.createCellContent = createCellContent;\n }\n CellRenderersComposition.compose = compose;\n /**\n * Init a type of content for a column.\n * @param this\n * Current column.\n */\n function afterColumnInit() {\n const rendererType = this.options.cells?.renderer?.type || 'text';\n let Renderer = CellRendering_CellRendererRegistry.types[rendererType];\n if (!Renderer) {\n // eslint-disable-next-line no-console\n console.warn(`The cell renderer of type \"${rendererType}\" is not registered. Using default text renderer instead.`);\n Renderer = CellRendering_CellRendererRegistry.types.text;\n }\n this.cellRenderer = new Renderer(this, this.options.cells?.renderer || {});\n }\n /**\n * Render content of cell.\n * @param this\n * Current column.\n *\n * @param cell\n * Current cell.\n *\n * @returns\n * Formatted cell content.\n */\n function createCellContent(cell) {\n return this.cellRenderer.render(cell);\n }\n})(CellRenderersComposition || (CellRenderersComposition = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const CellRendering_CellRenderersComposition = (CellRenderersComposition);\n\n;// ./code/grid/es-modules/Grid/Pro/Pagination/PaginationComposition.js\n/* *\n *\n * Grid Pro Pagination class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sebastian Bochan\n *\n * */\n\n\n\nconst { addEvent: PaginationComposition_addEvent, pushUnique: PaginationComposition_pushUnique } = Core_Utilities;\n/* *\n *\n * Class Namespace\n *\n * */\nvar PaginationComposition;\n(function (PaginationComposition) {\n /**\n * Extends the pagination class with events.\n *\n * @param PaginationClass\n * The class to extend.\n *\n */\n function compose(PaginationClass) {\n if (!PaginationComposition_pushUnique(Core_Globals.composed, 'PaginationPro')) {\n return;\n }\n // Register pagination events\n PaginationComposition_addEvent(PaginationClass, 'beforePageChange', (e) => {\n const { target, currentPage, nextPage, pageSize } = e;\n target.options.events?.beforePageChange?.call(target, {\n currentPage: currentPage,\n nextPage: nextPage,\n pageSize: pageSize\n });\n });\n PaginationComposition_addEvent(PaginationClass, 'afterPageChange', (e) => {\n const { target, currentPage, previousPage, pageSize } = e;\n target.options.events?.afterPageChange?.call(target, {\n currentPage: currentPage,\n previousPage: previousPage,\n pageSize: pageSize\n });\n });\n PaginationComposition_addEvent(PaginationClass, 'beforePageSizeChange', (e) => {\n const { target, newPageSize, pageSize } = e;\n target.options.events?.beforePageSizeChange?.call(target, {\n pageSize: pageSize,\n newPageSize: newPageSize\n });\n });\n PaginationComposition_addEvent(PaginationClass, 'afterPageSizeChange', (e) => {\n const { target, previousPageSize, pageSize } = e;\n target.options.events?.afterPageSizeChange?.call(target, {\n pageSize: pageSize,\n previousPageSize: previousPageSize\n });\n });\n }\n PaginationComposition.compose = compose;\n})(PaginationComposition || (PaginationComposition = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Pagination_PaginationComposition = (PaginationComposition);\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/CellContentPro.js\n/* *\n *\n * Cell Content Pro abstract class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a cell content in the grid.\n */\nclass CellContentPro extends CellContent_CellContent {\n /**\n * Creates and renders the cell content.\n *\n * @param cell\n * The cell to which the content belongs.\n *\n * @param renderer\n * Renderer that allows print content (inputs, selects, etc.)\n */\n constructor(cell, renderer) {\n super(cell);\n this.renderer = renderer;\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const CellRendering_CellContentPro = (CellContentPro);\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/CellRenderer.js\n/* *\n *\n * Cell Renderer abstract class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n/* *\n *\n * Class\n *\n * */\n/**\n * Renderer class that initialize all options per column.\n */\nclass CellRenderer {\n /**\n * Constructs the CellRenderer instance.\n *\n * @param column\n * The column of the cell.\n *\n */\n constructor(column) {\n this.column = column;\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const CellRendering_CellRenderer = (CellRenderer);\n\n;// ./code/grid/es-modules/Data/Converters/CSVConverter.js\n/* *\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Torstein Hønsi\n * - Christer Vasseng\n * - Gøran Slettemark\n * - Sophie Bremer\n * - Kamil Kubik\n *\n * */\n\n\n\n\nconst { merge: CSVConverter_merge } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Handles parsing and transforming CSV to a table.\n *\n * @private\n */\nclass CSVConverter extends Converters_DataConverter {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the CSV parser.\n *\n * @param {Partial<CSVConverterOptions>} [options]\n * Options for the CSV parser.\n */\n constructor(options) {\n const mergedOptions = CSVConverter_merge(CSVConverter.defaultOptions, options);\n super(mergedOptions);\n /* *\n *\n * Properties\n *\n * */\n this.headers = [];\n this.dataTypes = [];\n this.options = mergedOptions;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Parses the CSV string into a DataTable column collection.\n * Handles line and item delimiters, optional header row, and\n * applies pre-processing if a beforeParse callback is provided.\n *\n * @param {Partial<CSVConverterOptions>} [options]\n * Options for the parser.\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n * @return {DataTable.ColumnCollection}\n * The parsed column collection.\n *\n * @emits CSVDataParser#parse\n * @emits CSVDataParser#afterParse\n */\n parse(options, eventDetail) {\n const converter = this, dataTypes = converter.dataTypes, parserOptions = CSVConverter_merge(this.options, options), { beforeParse, lineDelimiter, firstRowAsNames, itemDelimiter } = parserOptions;\n let lines, rowIt = 0, { csv, startRow, endRow } = parserOptions, column;\n const columnsArray = [];\n converter.emit({\n type: 'parse',\n columns: columnsArray,\n detail: eventDetail,\n headers: converter.headers\n });\n if (csv && beforeParse) {\n csv = beforeParse(csv);\n }\n if (csv) {\n lines = csv\n .replace(/\\r\\n|\\r/g, '\\n') // Windows | Mac\n .split(lineDelimiter || '\\n');\n if (!startRow || startRow < 0) {\n startRow = 0;\n }\n if (!endRow || endRow >= lines.length) {\n endRow = lines.length - 1;\n }\n if (!itemDelimiter) {\n converter.guessedItemDelimiter =\n converter.guessDelimiter(lines);\n }\n // If the first row contain names, add them to the\n // headers array and skip the row.\n if (firstRowAsNames) {\n const headers = lines[0].split(itemDelimiter || converter.guessedItemDelimiter || ',');\n // Remove \"\"s from the headers\n for (let i = 0; i < headers.length; i++) {\n headers[i] = headers[i].trim().replace(/^[\"']|[\"']$/g, '');\n }\n converter.headers = headers;\n startRow++;\n }\n let offset = 0;\n for (rowIt = startRow; rowIt <= endRow; rowIt++) {\n if (lines[rowIt][0] === '#') {\n offset++;\n }\n else {\n converter.parseCSVRow(columnsArray, lines[rowIt], rowIt - startRow - offset);\n }\n }\n if (dataTypes.length &&\n dataTypes[0].length &&\n dataTypes[0][1] === 'date' && // Format is a string date\n !converter.options.dateFormat) {\n converter.deduceDateFormat(columnsArray[0], null, true);\n }\n // Guess types.\n for (let i = 0, iEnd = columnsArray.length; i < iEnd; ++i) {\n column = columnsArray[i];\n for (let j = 0, jEnd = column.length; j < jEnd; ++j) {\n if (column[j] && typeof column[j] === 'string') {\n let cellValue = converter.convertByType(column[j]);\n if (cellValue instanceof Date) {\n cellValue = cellValue.getTime();\n }\n columnsArray[i][j] = cellValue;\n }\n }\n }\n }\n // Normalize columns to same length to avoid truncation.\n columnsArray.forEach((col) => {\n col.length = Math.max(...columnsArray.map((c) => c.length));\n });\n converter.emit({\n type: 'afterParse',\n columns: columnsArray,\n detail: eventDetail,\n headers: converter.headers\n });\n return Converters_DataConverterUtils.getColumnsCollection(columnsArray, converter.headers);\n }\n /**\n * Parses a single CSV row string into columns, handling delimiters,\n * quoted values, data type inference, and column range selection.\n */\n parseCSVRow(columns, columnStr, rowNumber) {\n const converter = this, dataTypes = converter.dataTypes, { startColumn, endColumn } = converter.options, itemDelimiter = (converter.options.itemDelimiter ||\n converter.guessedItemDelimiter);\n let { decimalPoint } = converter.options;\n if (!decimalPoint || decimalPoint === itemDelimiter) {\n decimalPoint = converter.guessedDecimalPoint || '.';\n }\n let i = 0, c = '', token = '', actualColumn = 0, column = 0;\n const read = (j) => {\n c = columnStr[j];\n };\n const pushType = (type) => {\n if (dataTypes.length < column + 1) {\n dataTypes.push([type]);\n }\n if (dataTypes[column][dataTypes[column].length - 1] !== type) {\n dataTypes[column].push(type);\n }\n };\n const push = () => {\n if (startColumn > actualColumn || actualColumn > endColumn) {\n // Skip this column, but increment the column count (#7272)\n ++actualColumn;\n token = '';\n return;\n }\n // Save the type of the token.\n if (typeof token === 'string') {\n const parsedNumber = parseFloat(token);\n if (!isNaN(parsedNumber) && isFinite(Number(token))) {\n token = parsedNumber;\n pushType('number');\n }\n else if (!isNaN(Date.parse(token))) {\n token = token.replace(/\\//g, '-');\n pushType('date');\n }\n else {\n pushType('string');\n }\n }\n else {\n pushType('number');\n }\n if (columns.length < column + 1) {\n columns.push([]);\n }\n // Try to apply the decimal point, and check if the token then is a\n // number. If not, reapply the initial value\n if (typeof token !== 'number' &&\n Converters_DataConverterUtils.guessType(token, converter) !== 'number' &&\n decimalPoint) {\n const initialValue = token;\n token = token.replace(decimalPoint, '.');\n if (Converters_DataConverterUtils.guessType(token, converter) !== 'number') {\n token = initialValue;\n }\n }\n columns[column][rowNumber] = token;\n token = '';\n ++column;\n ++actualColumn;\n };\n if (!columnStr.trim().length) {\n return;\n }\n if (columnStr.trim()[0] === '#') {\n return;\n }\n for (; i < columnStr.length; i++) {\n read(i);\n if (c === '#') {\n // If there are hexvalues remaining (#13283)\n if (!/^#[A-F\\d]{3,3}|[A-F\\d]{6,6}/i.test(columnStr.substring(i))) {\n // The rest of the row is a comment\n push();\n return;\n }\n }\n // Quoted string\n if (c === '\"') {\n read(++i);\n while (i < columnStr.length) {\n if (c === '\"') {\n break;\n }\n token += c;\n read(++i);\n }\n }\n else if (c === itemDelimiter) {\n push();\n // Actual column data\n }\n else {\n token += c;\n }\n }\n push();\n }\n /**\n * Internal method that guesses the delimiter from the first\n * 13 lines of the CSV\n * @param {string[]} lines\n * The CSV, split into lines\n */\n guessDelimiter(lines) {\n let points = 0, commas = 0, guessed;\n const potDelimiters = {\n ',': 0,\n ';': 0,\n '\\t': 0\n }, linesCount = lines.length;\n for (let i = 0; i < linesCount; i++) {\n let inStr = false, c, cn, cl, token = '';\n // We should be able to detect dateformats within 13 rows\n if (i > 13) {\n break;\n }\n const columnStr = lines[i];\n for (let j = 0; j < columnStr.length; j++) {\n c = columnStr[j];\n cn = columnStr[j + 1];\n cl = columnStr[j - 1];\n if (c === '#') {\n // Skip the rest of the line - it's a comment\n break;\n }\n if (c === '\"') {\n if (inStr) {\n if (cl !== '\"' && cn !== '\"') {\n while (cn === ' ' && j < columnStr.length) {\n cn = columnStr[++j];\n }\n // After parsing a string, the next non-blank\n // should be a delimiter if the CSV is properly\n // formed.\n if (typeof potDelimiters[cn] !== 'undefined') {\n potDelimiters[cn]++;\n }\n inStr = false;\n }\n }\n else {\n inStr = true;\n }\n }\n else if (typeof potDelimiters[c] !== 'undefined') {\n token = token.trim();\n if (!isNaN(Date.parse(token))) {\n potDelimiters[c]++;\n }\n else if (isNaN(Number(token)) ||\n !isFinite(Number(token))) {\n potDelimiters[c]++;\n }\n token = '';\n }\n else {\n token += c;\n }\n if (c === ',') {\n commas++;\n }\n if (c === '.') {\n points++;\n }\n }\n }\n // Count the potential delimiters.\n // This could be improved by checking if the number of delimiters\n // equals the number of columns - 1\n if (potDelimiters[';'] > potDelimiters[',']) {\n guessed = ';';\n }\n else if (potDelimiters[','] > potDelimiters[';']) {\n guessed = ',';\n }\n else {\n // No good guess could be made..\n guessed = ',';\n }\n // Try to deduce the decimal point if it's not explicitly set.\n // If both commas or points is > 0 there is likely an issue\n if (points > commas) {\n this.guessedDecimalPoint = '.';\n }\n else {\n this.guessedDecimalPoint = ',';\n }\n return guessed;\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Default options\n */\nCSVConverter.defaultOptions = {\n ...Converters_DataConverter.defaultOptions,\n lineDelimiter: '\\n',\n startColumn: 0,\n endColumn: Number.MAX_VALUE,\n startRow: 0,\n endRow: Number.MAX_VALUE\n};\nConverters_DataConverter.registerType('CSV', CSVConverter);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Converters_CSVConverter = (CSVConverter);\n\n;// ./code/grid/es-modules/Data/Connectors/CSVConnector.js\n/* *\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Torstein Hønsi\n * - Christer Vasseng\n * - Gøran Slettemark\n * - Sophie Bremer\n * - Kamil Kubik\n *\n * */\n\n\n\n\nconst { merge: CSVConnector_merge, fireEvent: CSVConnector_fireEvent } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Class that handles creating a DataConnector from CSV\n *\n * @private\n */\nclass CSVConnector extends Connectors_DataConnector {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of CSVConnector.\n *\n * @param {Partial<CSVConnectorOptions>} [options]\n * Options for the connector and converter.\n */\n constructor(options) {\n const mergedOptions = CSVConnector_merge(CSVConnector.defaultOptions, options);\n super(mergedOptions);\n this.options = mergedOptions;\n if (mergedOptions.enablePolling) {\n this.startPolling(Math.max(mergedOptions.dataRefreshRate || 0, 1) * 1000);\n }\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Overrides the DataConnector method. Emits an event on the connector to\n * all registered callbacks of this event.\n *\n * @param {CSVConnector.Event} e\n * Event object containing additional event information.\n */\n emit(e) {\n CSVConnector_fireEvent(this, e.type, e);\n }\n /**\n * Initiates the loading of the CSV source to the connector\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits CSVConnector#load\n * @emits CSVConnector#afterLoad\n */\n load(eventDetail) {\n const connector = this;\n const options = connector.options;\n const { csv, csvURL, dataTables, decimalPoint } = options;\n connector.emit({\n type: 'load',\n csv\n });\n return Promise\n .resolve(csvURL ?\n fetch(csvURL, {\n signal: connector?.pollingController?.signal\n }).then((response) => response.text()) :\n csv || '')\n .then((csv) => {\n if (csv) {\n this.initConverters(csv, (key) => {\n const tableOptions = dataTables?.find((dataTable) => dataTable.key === key);\n // The data table options takes precedence over the\n // connector options.\n const { firstRowAsNames = options.firstRowAsNames, beforeParse = options.beforeParse } = tableOptions || {};\n const converterOptions = {\n decimalPoint,\n firstRowAsNames,\n beforeParse\n };\n return new Converters_CSVConverter(CSVConnector_merge(options, converterOptions));\n }, (converter, data) => converter.parse({ csv: data }));\n }\n return connector.applyTableModifiers().then(() => csv);\n })\n .then((csv) => {\n connector.emit({\n type: 'afterLoad',\n detail: eventDetail,\n csv\n });\n return connector;\n })['catch']((error) => {\n connector.emit({\n type: 'loadError',\n detail: eventDetail,\n error\n });\n throw error;\n });\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\nCSVConnector.defaultOptions = {\n id: 'csv-connector',\n type: 'CSV',\n csv: '',\n csvURL: '',\n enablePolling: false,\n dataRefreshRate: 1,\n firstRowAsNames: true\n};\n/* *\n *\n * Registry\n *\n * */\nConnectors_DataConnector.registerType('CSV', CSVConnector);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Connectors_CSVConnector = ((/* unused pure expression or super */ null && (CSVConnector)));\n\n;// ./code/grid/es-modules/Data/Converters/GoogleSheetsConverter.js\n/* *\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Torstein Hønsi\n * - Gøran Slettemark\n * - Wojciech Chmiel\n * - Sophie Bremer\n * - Kamil Kubik\n *\n * */\n\n\n\n\nconst { merge: GoogleSheetsConverter_merge, uniqueKey: GoogleSheetsConverter_uniqueKey } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Handles parsing and transformation of an Google Sheets to a table.\n *\n * @private\n */\nclass GoogleSheetsConverter extends Converters_DataConverter {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the GoogleSheetsConverter.\n *\n * @param {Partial<GoogleSheetsConverterOptions>} [options]\n * Options for the GoogleSheetsConverter.\n */\n constructor(options) {\n const mergedOptions = GoogleSheetsConverter_merge(GoogleSheetsConverter.defaultOptions, options);\n super(mergedOptions);\n this.header = [];\n this.options = mergedOptions;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Initiates the parsing of the Google Sheet\n *\n * @param {Partial<GoogleSheetsConverterOptions>}[options]\n * Options for the parser\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits GoogleSheetsParser#parse\n * @emits GoogleSheetsParser#afterParse\n */\n parse(options, eventDetail) {\n const converter = this, parseOptions = GoogleSheetsConverter_merge(converter.options, options);\n let columnsArray = ((parseOptions.json?.values) || []).map((column) => column.slice());\n if (columnsArray.length === 0) {\n return {};\n }\n converter.header = [];\n converter.emit({\n type: 'parse',\n columns: [],\n detail: eventDetail,\n headers: converter.header\n });\n // If beforeParse is defined, use it to modify the data\n const { beforeParse, json } = parseOptions;\n if (beforeParse && json) {\n columnsArray = beforeParse(json.values);\n }\n let column;\n for (let i = 0, iEnd = columnsArray.length; i < iEnd; i++) {\n column = columnsArray[i];\n converter.header[i] = (parseOptions.firstRowAsNames ?\n `${column.shift()}` :\n GoogleSheetsConverter_uniqueKey());\n for (let j = 0, jEnd = column.length; j < jEnd; ++j) {\n let cellValue = column[j];\n if (isDateObject(cellValue)) {\n cellValue = cellValue.getTime();\n }\n columnsArray[i][j] = cellValue;\n }\n }\n converter.emit({\n type: 'afterParse',\n columns: columnsArray,\n detail: eventDetail,\n headers: converter.header\n });\n return Converters_DataConverterUtils.getColumnsCollection(columnsArray, converter.header);\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Default options\n */\nGoogleSheetsConverter.defaultOptions = {\n ...Converters_DataConverter.defaultOptions\n};\nConverters_DataConverter.registerType('GoogleSheets', GoogleSheetsConverter);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Converters_GoogleSheetsConverter = (GoogleSheetsConverter);\n/**\n * Check if a value is a Date object\n *\n * @param {unknown} value to verify\n * @return {boolean}\n * True if the value is a Date object, false otherwise.\n */\nfunction isDateObject(value) {\n return Object.prototype.toString.call(value) === '[object Date]';\n}\n\n;// ./code/grid/es-modules/Data/Connectors/GoogleSheetsConnector.js\n/* *\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Torstein Hønsi\n * - Gøran Slettemark\n * - Wojciech Chmiel\n * - Sophie Bremer\n * - Jomar Hønsi\n * - Kamil Kubik\n *\n * */\n\n\n\n\nconst { merge: GoogleSheetsConnector_merge, pick: GoogleSheetsConnector_pick, fireEvent: GoogleSheetsConnector_fireEvent } = Core_Utilities;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Tests Google's response for error.\n * @private\n */\nfunction isGoogleError(json) {\n return (typeof json === 'object' && json &&\n typeof json.error === 'object' && json.error &&\n typeof json.error.code === 'number' &&\n typeof json.error.message === 'string' &&\n typeof json.error.status === 'string');\n}\n/* *\n *\n * Class\n *\n * */\n/**\n * @private\n * @todo implement save, requires oauth2\n */\nclass GoogleSheetsConnector extends Connectors_DataConnector {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of GoogleSheetsConnector\n *\n * @param {Partial<GoogleSheetsConnectorOptions>} [options]\n * Options for the connector and converter.\n */\n constructor(options) {\n const mergedOptions = GoogleSheetsConnector_merge(GoogleSheetsConnector.defaultOptions, options);\n super(mergedOptions);\n this.options = mergedOptions;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Overrides the DataConnector method. Emits an event on the connector to\n * all registered callbacks of this event.\n *\n * @param {GoogleSheetsConnector.Event} e\n * Event object containing additional event information.\n */\n emit(e) {\n GoogleSheetsConnector_fireEvent(this, e.type, e);\n }\n /**\n * Loads data from a Google Spreadsheet.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {Promise<this>}\n * Same connector instance with modified table.\n */\n load(eventDetail) {\n const connector = this;\n const options = connector.options;\n const { dataRefreshRate, enablePolling, googleAPIKey, googleSpreadsheetKey, dataTables } = options;\n const url = GoogleSheetsConnector.buildFetchURL(googleAPIKey, googleSpreadsheetKey, options);\n connector.emit({\n type: 'load',\n detail: eventDetail,\n url\n });\n if (!URL.canParse(url)) {\n throw new Error('Invalid URL: ' + url);\n }\n return fetch(url, { signal: connector?.pollingController?.signal })\n .then((response) => (response.json()))\n .then((json) => {\n if (isGoogleError(json)) {\n throw new Error(json.error.message);\n }\n this.initConverters(json, (key) => {\n const tableOptions = dataTables?.find((dataTable) => dataTable.key === key);\n // The data table options takes precedence over the\n // connector options.\n const { firstRowAsNames = options.firstRowAsNames, beforeParse = options.beforeParse } = tableOptions || {};\n const converterOptions = {\n firstRowAsNames,\n beforeParse\n };\n return new Converters_GoogleSheetsConverter(converterOptions);\n }, (converter, data) => converter.parse({ json: data }));\n return connector.applyTableModifiers();\n })\n .then(() => {\n connector.emit({\n type: 'afterLoad',\n detail: eventDetail,\n url\n });\n // Polling\n if (enablePolling) {\n setTimeout(() => connector.load(), Math.max(dataRefreshRate || 0, 1) * 1000);\n }\n return connector;\n })['catch']((error) => {\n connector.emit({\n type: 'loadError',\n detail: eventDetail,\n error\n });\n throw error;\n });\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\nGoogleSheetsConnector.defaultOptions = {\n id: 'google-sheets-connector',\n type: 'GoogleSheets',\n googleAPIKey: '',\n googleSpreadsheetKey: '',\n enablePolling: false,\n dataRefreshRate: 2,\n firstRowAsNames: true\n};\n/* *\n *\n * Class Namespace\n *\n * */\n(function (GoogleSheetsConnector) {\n /* *\n *\n * Declarations\n *\n * */\n /* *\n *\n * Constants\n *\n * */\n const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n /* *\n *\n * Functions\n *\n * */\n /**\n * Creates GoogleSheets API v4 URL.\n * @private\n */\n function buildFetchURL(apiKey, sheetKey, options = {}) {\n const url = new URL(`https://sheets.googleapis.com/v4/spreadsheets/${sheetKey}/values/`);\n const range = options.onlyColumnIds ?\n 'A1:Z1' : buildQueryRange(options);\n url.pathname += range;\n const searchParams = url.searchParams;\n searchParams.set('alt', 'json');\n if (!options.onlyColumnIds) {\n searchParams.set('dateTimeRenderOption', 'FORMATTED_STRING');\n searchParams.set('majorDimension', 'COLUMNS');\n searchParams.set('valueRenderOption', 'UNFORMATTED_VALUE');\n }\n searchParams.set('prettyPrint', 'false');\n searchParams.set('key', apiKey);\n return url.href;\n }\n GoogleSheetsConnector.buildFetchURL = buildFetchURL;\n /**\n * Creates sheets range.\n * @private\n */\n function buildQueryRange(options = {}) {\n const { endColumn, endRow, googleSpreadsheetRange, startColumn, startRow } = options;\n return googleSpreadsheetRange || ((alphabet[startColumn || 0] || 'A') +\n (Math.max((startRow || 0), 0) + 1) +\n ':' +\n (alphabet[GoogleSheetsConnector_pick(endColumn, 25)] || 'Z') +\n (endRow ?\n Math.max(endRow, 0) :\n 'Z'));\n }\n GoogleSheetsConnector.buildQueryRange = buildQueryRange;\n})(GoogleSheetsConnector || (GoogleSheetsConnector = {}));\n/* *\n *\n * Registry\n *\n * */\nConnectors_DataConnector.registerType('GoogleSheets', GoogleSheetsConnector);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Connectors_GoogleSheetsConnector = ((/* unused pure expression or super */ null && (GoogleSheetsConnector)));\n\n;// ./code/grid/es-modules/Data/Converters/HTMLTableConverter.js\n/* *\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Torstein Hønsi\n * - Gøran Slettemark\n * - Wojciech Chmiel\n * - Sophie Bremer\n * - Kamil Kubik\n *\n * */\n\n\n\n\nconst { merge: HTMLTableConverter_merge } = Core_Utilities;\n/* *\n *\n * Functions\n *\n * */\n/**\n * Row equal\n */\nfunction isRowEqual(row1, row2) {\n let i = row1.length;\n if (row2.length === i) {\n while (--i) {\n if (row1[i] !== row2[i]) {\n return false;\n }\n }\n }\n else {\n return false;\n }\n return true;\n}\n/* *\n *\n * Class\n *\n * */\n/**\n * Handles parsing and transformation of an HTML table to a table.\n *\n * @private\n */\nclass HTMLTableConverter extends Converters_DataConverter {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the HTMLTableConverter.\n *\n * @param {Partial<HTMLTableConverterOptions>} [options]\n * Options for the HTMLTableConverter.\n */\n constructor(options) {\n const mergedOptions = HTMLTableConverter_merge(HTMLTableConverter.defaultOptions, options);\n super(mergedOptions);\n this.headers = [];\n this.options = mergedOptions;\n if (mergedOptions.tableElement) {\n this.tableElement = mergedOptions.tableElement;\n this.tableElementID = mergedOptions.tableElement.id;\n }\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Exports the dataconnector as an HTML string, using the options\n * provided on import unless other options are provided.\n *\n * @param {DataConnector} connector\n * Connector instance to export from.\n *\n * @param {HTMLTableConnector.ExportOptions} [options]\n * Options that override default or existing export options.\n *\n * @return {string}\n * HTML from the current dataTable.\n */\n export(connector, options = this.options) {\n const exportNames = (options.firstRowAsNames !== false), useMultiLevelHeaders = options.useMultiLevelHeaders;\n const columns = connector.getSortedColumns(), columnIds = Object.keys(columns), htmlRows = [], columnsCount = columnIds.length;\n const rowArray = [];\n let tableHead = '';\n // Add the names as the first row if they should be exported\n if (exportNames) {\n const subcategories = [];\n // If using multilevel headers, the first value\n // of each column is a subcategory\n if (useMultiLevelHeaders) {\n for (const columnId of columnIds) {\n let column = columns[columnId];\n if (!Array.isArray(column)) {\n // Convert to conventional array from typed array\n // if needed\n column = Array.from(column);\n }\n const subhead = (column.shift() || '').toString();\n columns[columnId] = column;\n subcategories.push(subhead);\n }\n tableHead = this.getTableHeaderHTML(columnIds, subcategories, options);\n }\n else {\n tableHead = this.getTableHeaderHTML(void 0, columnIds, options);\n }\n }\n for (let columnIndex = 0; columnIndex < columnsCount; columnIndex++) {\n const columnId = columnIds[columnIndex], column = columns[columnId], columnLength = column.length;\n for (let rowIndex = 0; rowIndex < columnLength; rowIndex++) {\n let cellValue = column[rowIndex];\n if (!rowArray[rowIndex]) {\n rowArray[rowIndex] = [];\n }\n if (!(typeof cellValue === 'string' ||\n typeof cellValue === 'number' ||\n typeof cellValue === 'undefined')) {\n cellValue = (cellValue || '').toString();\n }\n rowArray[rowIndex][columnIndex] = this.getCellHTMLFromValue(columnIndex ? 'td' : 'th', null, columnIndex ? '' : 'scope=\"row\"', cellValue);\n // On the final column, push the row to the array\n if (columnIndex === columnsCount - 1) {\n htmlRows.push('<tr>' +\n rowArray[rowIndex].join('') +\n '</tr>');\n }\n }\n }\n let caption = '';\n // Add table caption\n // Current exportdata falls back to chart title\n // but that should probably be handled elsewhere?\n if (options.tableCaption) {\n caption = '<caption class=\"highcharts-table-caption\">' +\n options.tableCaption +\n '</caption>';\n }\n return ('<table>' +\n caption +\n tableHead +\n '<tbody>' +\n htmlRows.join('') +\n '</tbody>' +\n '</table>');\n }\n /**\n * Get table cell markup from row data.\n */\n getCellHTMLFromValue(tag, classes, attrs, value, decimalPoint) {\n let val = value, className = 'text' + (classes ? ' ' + classes : '');\n // Convert to string if number\n if (typeof val === 'number') {\n val = val.toString();\n if (decimalPoint === ',') {\n val = val.replace('.', decimalPoint);\n }\n className = 'number';\n }\n else if (!value) {\n val = '';\n className = 'empty';\n }\n return '<' + tag + (attrs ? ' ' + attrs : '') +\n ' class=\"' + className + '\">' +\n val + '</' + tag + '>';\n }\n /**\n * Get table header markup from row data.\n */\n getTableHeaderHTML(topheaders = [], subheaders = [], options = this.options) {\n const { useMultiLevelHeaders, useRowspanHeaders } = options;\n let html = '<thead>', i = 0, len = subheaders && subheaders.length, next, cur, curColspan = 0, rowspan;\n // Clean up multiple table headers. Exporting.getDataRows() returns two\n // levels of headers when using multilevel, not merged. We need to\n // merge identical headers, remove redundant headers, and keep it\n // all marked up nicely.\n if (useMultiLevelHeaders &&\n topheaders &&\n subheaders &&\n !isRowEqual(topheaders, subheaders)) {\n html += '<tr>';\n for (; i < len; ++i) {\n cur = topheaders[i];\n next = topheaders[i + 1];\n if (cur === next) {\n ++curColspan;\n }\n else if (curColspan) {\n // Ended colspan\n // Add cur to HTML with colspan.\n html += this.getCellHTMLFromValue('th', 'highcharts-table-topheading', 'scope=\"col\" ' +\n 'colspan=\"' + (curColspan + 1) + '\"', cur);\n curColspan = 0;\n }\n else {\n // Cur is standalone. If it is same as sublevel,\n // remove sublevel and add just toplevel.\n if (cur === subheaders[i]) {\n if (useRowspanHeaders) {\n rowspan = 2;\n subheaders.splice(i, 1);\n }\n else {\n rowspan = 1;\n subheaders[i] = '';\n }\n }\n else {\n rowspan = 1;\n }\n html += this.getCellHTMLFromValue('th', 'highcharts-table-topheading', 'scope=\"col\"' +\n (rowspan > 1 ?\n ' valign=\"top\" rowspan=\"' + rowspan + '\"' :\n ''), cur);\n }\n }\n html += '</tr>';\n }\n // Add the subheaders (the only headers if not using multilevels)\n if (subheaders) {\n html += '<tr>';\n for (i = 0, len = subheaders.length; i < len; ++i) {\n if (typeof subheaders[i] !== 'undefined') {\n html += this.getCellHTMLFromValue('th', null, 'scope=\"col\"', subheaders[i]);\n }\n }\n html += '</tr>';\n }\n html += '</thead>';\n return html;\n }\n /**\n * Initiates the parsing of the HTML table\n *\n * @param {Partial<HTMLTableConverterOptions>}[options]\n * Options for the parser\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits CSVDataParser#parse\n * @emits CSVDataParser#afterParse\n * @emits HTMLTableParser#parseError\n */\n parse(options, eventDetail) {\n const converter = this, columnsArray = [], headers = [], parseOptions = HTMLTableConverter_merge(converter.options, options), { endRow, startColumn, endColumn, firstRowAsNames } = parseOptions, tableHTML = parseOptions.tableElement || this.tableElement;\n if (!(tableHTML instanceof HTMLElement)) {\n converter.emit({\n type: 'parseError',\n columns: columnsArray,\n detail: eventDetail,\n headers,\n error: 'Not a valid HTML Table'\n });\n return {};\n }\n converter.tableElement = tableHTML;\n converter.tableElementID = tableHTML.id;\n this.emit({\n type: 'parse',\n columns: columnsArray,\n detail: eventDetail,\n headers: converter.headers\n });\n const rows = tableHTML.getElementsByTagName('tr'), rowsCount = rows.length;\n let rowIndex = 0, item, { startRow } = parseOptions;\n // Insert headers from the first row\n if (firstRowAsNames && rowsCount) {\n const items = rows[0].children, itemsLength = items.length;\n for (let i = startColumn; i < itemsLength; i++) {\n if (i > endColumn) {\n break;\n }\n item = items[i];\n if (item.tagName === 'TD' ||\n item.tagName === 'TH') {\n headers.push(item.innerHTML);\n }\n }\n startRow++;\n }\n while (rowIndex < rowsCount) {\n if (rowIndex >= startRow && rowIndex <= endRow) {\n const columnsInRow = rows[rowIndex].children, columnsInRowLength = columnsInRow.length;\n let columnIndex = 0;\n while (columnIndex < columnsInRowLength) {\n const relativeColumnIndex = columnIndex - startColumn, row = columnsArray[relativeColumnIndex];\n item = columnsInRow[columnIndex];\n if ((item.tagName === 'TD' ||\n item.tagName === 'TH') &&\n (columnIndex >= startColumn &&\n columnIndex <= endColumn)) {\n if (!columnsArray[relativeColumnIndex]) {\n columnsArray[relativeColumnIndex] = [];\n }\n let cellValue = converter.convertByType(item.innerHTML);\n if (cellValue instanceof Date) {\n cellValue = cellValue.getTime();\n }\n columnsArray[relativeColumnIndex][rowIndex - startRow] = cellValue;\n // Loop over all previous indices and make sure\n // they are nulls, not undefined.\n let i = 1;\n while (rowIndex - startRow >= i &&\n row[rowIndex - startRow - i] === void 0) {\n row[rowIndex - startRow - i] = null;\n i++;\n }\n }\n columnIndex++;\n }\n }\n rowIndex++;\n }\n this.headers = headers;\n this.emit({\n type: 'afterParse',\n columns: columnsArray,\n detail: eventDetail,\n headers\n });\n return Converters_DataConverterUtils.getColumnsCollection(columnsArray, converter.headers);\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Default options\n */\nHTMLTableConverter.defaultOptions = {\n ...Converters_DataConverter.defaultOptions,\n useRowspanHeaders: true,\n useMultiLevelHeaders: true,\n startColumn: 0,\n endColumn: Number.MAX_VALUE,\n startRow: 0,\n endRow: Number.MAX_VALUE\n};\nConverters_DataConverter.registerType('HTMLTable', HTMLTableConverter);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Converters_HTMLTableConverter = (HTMLTableConverter);\n\n;// ./code/grid/es-modules/Data/Connectors/HTMLTableConnector.js\n/* *\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Torstein Hønsi\n * - Gøran Slettemark\n * - Wojciech Chmiel\n * - Sophie Bremer\n * - Kamil Kubik\n *\n * */\n\n\n\n\nconst { win: HTMLTableConnector_win } = Core_Globals;\n\nconst { merge: HTMLTableConnector_merge } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Class that handles creating a data connector from an HTML table.\n *\n * @private\n */\nclass HTMLTableConnector extends Connectors_DataConnector {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of HTMLTableConnector.\n *\n * @param {HTMLTableConnector.CombinedHTMLTableConnectorOptions} [options]\n * Options for the connector and converter.\n */\n constructor(options) {\n const mergedOptions = HTMLTableConnector_merge(HTMLTableConnector.defaultOptions, options);\n super(mergedOptions);\n this.options = mergedOptions;\n this.converter = new Converters_HTMLTableConverter(mergedOptions);\n }\n /**\n * Initiates creating the dataconnector from the HTML table\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits HTMLTableConnector#load\n * @emits HTMLTableConnector#afterLoad\n * @emits HTMLTableConnector#loadError\n */\n async load(eventDetail) {\n const connector = this;\n const options = connector.options;\n const converter = connector.converter;\n const table = connector.getTable();\n const htmlTable = options.htmlTable;\n connector.emit({\n type: 'load',\n detail: eventDetail\n });\n let tableElement;\n if (typeof htmlTable === 'string') {\n connector.tableID = htmlTable;\n tableElement = HTMLTableConnector_win.document.getElementById(htmlTable);\n }\n else {\n tableElement = htmlTable;\n connector.tableID = tableElement.id;\n }\n connector.tableElement = tableElement || void 0;\n if (!connector.tableElement) {\n const error = 'HTML table not provided, or element with ID not found';\n connector.emit({\n type: 'loadError',\n detail: eventDetail,\n error\n });\n return Promise.reject(new Error(error));\n }\n const columns = converter.parse(HTMLTableConnector_merge({ tableElement: connector.tableElement }, options), eventDetail);\n // If already loaded, clear the current rows\n table.deleteColumns();\n table.setColumns(columns);\n await connector.applyTableModifiers();\n connector.emit({\n type: 'afterLoad',\n detail: eventDetail\n });\n return connector;\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\nHTMLTableConnector.defaultOptions = {\n id: 'HTML-table-connector',\n type: 'HTMLTable',\n htmlTable: ''\n};\nConnectors_DataConnector.registerType('HTMLTable', HTMLTableConnector);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Connectors_HTMLTableConnector = ((/* unused pure expression or super */ null && (HTMLTableConnector)));\n\n;// ./code/grid/es-modules/Data/Converters/JSONConverter.js\n/* *\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Pawel Lysy\n * - Kamil Kubik\n *\n * */\n\n\n\n\nconst { error: JSONConverter_error, isArray: JSONConverter_isArray, merge: JSONConverter_merge, objectEach: JSONConverter_objectEach } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Handles parsing and transforming JSON to a table.\n *\n * @private\n */\nclass JSONConverter extends Converters_DataConverter {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the JSON parser.\n *\n * @param {Partial<JSONConverterOptions>} [options]\n * Options for the JSON parser.\n */\n constructor(options) {\n const mergedOptions = JSONConverter_merge(JSONConverter.defaultOptions, options);\n super(mergedOptions);\n /* *\n *\n * Properties\n *\n * */\n this.headerColumnIds = [];\n this.headers = [];\n this.options = mergedOptions;\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Initiates parsing of JSON structure.\n *\n * @param {Partial<JSONConverterOptions>}[options]\n * Options for the parser\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits JSONConverter#parse\n * @emits JSONConverter#afterParse\n */\n parse(options, eventDetail) {\n const converter = this;\n options = JSONConverter_merge(converter.options, options);\n const { beforeParse, orientation, firstRowAsNames, columnIds } = options;\n let data = options.data;\n if (!data) {\n return {};\n }\n converter.headers = [];\n const columnsArray = [];\n converter.emit({\n type: 'parse',\n columns: columnsArray,\n detail: eventDetail,\n headers: converter.headers\n });\n if (beforeParse) {\n data = beforeParse(data);\n }\n data = data.slice();\n if (orientation === 'columns') {\n this.parseColumnsOrientation(columnsArray, data, firstRowAsNames, columnIds);\n }\n else if (orientation === 'rows') {\n this.parseRowsOrientation(columnsArray, data, firstRowAsNames, columnIds);\n }\n converter.emit({\n type: 'afterParse',\n columns: columnsArray,\n detail: eventDetail,\n headers: converter.headers\n });\n return Converters_DataConverterUtils.getColumnsCollection(columnsArray, converter.headers);\n }\n /**\n * Helper for parsing data in 'columns' orientation.\n *\n * @param {DataTable.BasicColumn[]} [columnsArray]\n * Array of columns.\n *\n * @param {unknown[]} [data]\n * Array of data elements.\n *\n * @param {Boolean} [firstRowAsNames]\n * Defines row as names.\n *\n * @param {Array<string>} [columnIds]\n * Column ids to retrieve.\n *\n * @return {void}\n */\n parseColumnsOrientation(columnsArray, data, firstRowAsNames, columnIds) {\n const converter = this;\n for (let i = 0, iEnd = data.length; i < iEnd; i++) {\n const item = data[i];\n if (!(Array.isArray(item))) {\n return;\n }\n if (Array.isArray(converter.headers)) {\n if (firstRowAsNames) {\n converter.headers.push(`${item.shift()}`);\n }\n else if (columnIds && Array.isArray(columnIds)) {\n converter.headers.push(columnIds[i]);\n }\n columnsArray.push(item);\n }\n else {\n JSONConverter_error('JSONConverter: Invalid `columnIds` option.', false);\n }\n }\n }\n /**\n * Helper for parsing data in 'rows' orientation.\n *\n * @param {DataTable.BasicColumn[]} [columnsArray]\n * Array of columns.\n *\n * Helper for parsing data in 'rows' orientation.\n *\n * @param {unknown[]} [data]\n * Array of data elements.\n *\n * @param {Boolean} [firstRowAsNames]\n * Defines row as names.\n *\n * @param {Array<string>} [columnIds]\n * Column ids to retrieve.\n *\n * @return {DataTable.BasicColumn[]}\n * Parsed columns.\n */\n parseRowsOrientation(columnsArray, data, firstRowAsNames, columnIds) {\n const converter = this;\n if (firstRowAsNames) {\n converter.headers = data.shift();\n }\n else if (columnIds) {\n converter.headerColumnIds = columnIds;\n }\n for (let rowIndex = 0, iEnd = data.length; rowIndex < iEnd; rowIndex++) {\n let row = data[rowIndex];\n if (!JSONConverter_isArray(row)) {\n row = this.convertItemToRow(row, columnIds);\n }\n for (let columnIndex = 0, jEnd = row.length; columnIndex < jEnd; columnIndex++) {\n if (columnsArray.length < columnIndex + 1) {\n columnsArray.push([]);\n }\n columnsArray[columnIndex].push(row[columnIndex]);\n // Create headers only once.\n if (!firstRowAsNames && rowIndex === 0) {\n if (Array.isArray(converter.headerColumnIds)) {\n converter.headers.push(converter.headerColumnIds[columnIndex] ||\n columnIndex.toString());\n }\n else {\n JSONConverter_error('JSONConverter: Invalid `columnIds` option.', false);\n }\n }\n }\n }\n }\n /**\n * Extracts a row from an object, using columnIds if provided.\n *\n * @param {Record<string, string|number>} [rowObj]\n * Set of props.\n *\n * @param {Array<string>} [columnIds]\n * Column ids to retrieve.\n *\n * @return {Array<string | number>}\n * Row converted to array.\n */\n convertItemToRow(rowObj, columnIds) {\n const converter = this;\n if (columnIds && !(Array.isArray(columnIds))) {\n const newRow = [];\n JSONConverter_objectEach(columnIds, (arrayWithPath, name) => {\n newRow.push(arrayWithPath.reduce((acc, key) => acc[key], rowObj));\n if (converter.headers.indexOf(name) < 0) {\n converter.headers.push(name);\n }\n });\n return newRow;\n }\n converter.headerColumnIds = Object.keys(rowObj);\n return Object.values(rowObj);\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Default options\n */\nJSONConverter.defaultOptions = {\n ...Converters_DataConverter.defaultOptions,\n orientation: 'rows'\n};\nConverters_DataConverter.registerType('JSON', JSONConverter);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Converters_JSONConverter = (JSONConverter);\n\n;// ./code/grid/es-modules/Data/Connectors/JSONConnector.js\n/* *\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Pawel Lysy\n * - Kamil Kubik\n *\n * */\n\n\n\n\nconst { merge: JSONConnector_merge, fireEvent: JSONConnector_fireEvent } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Class that handles creating a DataConnector from JSON structure\n *\n * @private\n */\nclass JSONConnector extends Connectors_DataConnector {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of JSONConnector.\n *\n * @param {Partial<JSONConnectorOptions>} [options]\n * Options for the connector and converter.\n */\n constructor(options) {\n const mergedOptions = JSONConnector_merge(JSONConnector.defaultOptions, options);\n super(mergedOptions);\n this.options = mergedOptions;\n if (mergedOptions.enablePolling) {\n this.startPolling(Math.max(mergedOptions.dataRefreshRate || 0, 1) * 1000);\n }\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Overrides the DataConnector method. Emits an event on the connector to\n * all registered callbacks of this event.\n *\n * @param {JSONConnector.Event} e\n * Event object containing additional event information.\n */\n emit(e) {\n JSONConnector_fireEvent(this, e.type, e);\n }\n /**\n * Initiates the loading of the JSON source to the connector\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @emits JSONConnector#load\n * @emits JSONConnector#afterLoad\n */\n load(eventDetail) {\n const connector = this;\n const options = connector.options;\n const { data, dataUrl, dataTables } = options;\n connector.emit({\n type: 'load',\n detail: eventDetail,\n data\n });\n return Promise\n .resolve(dataUrl ?\n fetch(dataUrl, {\n signal: connector?.pollingController?.signal\n }).then((response) => response.json())['catch']((error) => {\n connector.emit({\n type: 'loadError',\n detail: eventDetail,\n error\n });\n console.warn(`Unable to fetch data from ${dataUrl}.`); // eslint-disable-line no-console\n }) :\n data || [])\n .then(async (data) => {\n if (data) {\n this.initConverters(data, (key) => {\n const tableOptions = dataTables?.find((dataTable) => dataTable.key === key);\n // The data table options takes precedence over the\n // connector options.\n const { columnIds = options.columnIds, firstRowAsNames = options.firstRowAsNames, orientation = options.orientation, beforeParse = options.beforeParse } = tableOptions || {};\n const converterOptions = {\n data,\n columnIds,\n firstRowAsNames,\n orientation,\n beforeParse\n };\n return new Converters_JSONConverter(converterOptions);\n }, (converter, data) => converter.parse({ data }));\n }\n return connector.applyTableModifiers().then(() => data ?? []);\n })\n .then((data) => {\n connector.emit({\n type: 'afterLoad',\n detail: eventDetail,\n data\n });\n return connector;\n })['catch']((error) => {\n connector.emit({\n type: 'loadError',\n detail: eventDetail,\n error\n });\n throw error;\n });\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\nJSONConnector.defaultOptions = {\n type: 'JSON',\n id: 'json-connector',\n data: [],\n enablePolling: false,\n dataRefreshRate: 0,\n firstRowAsNames: true,\n orientation: 'rows'\n};\n/* *\n *\n * Registry\n *\n * */\nConnectors_DataConnector.registerType('JSON', JSONConnector);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Connectors_JSONConnector = ((/* unused pure expression or super */ null && (JSONConnector)));\n\n;// ./code/grid/es-modules/Data/Modifiers/InvertModifier.js\n/* *\n *\n * (c) 2009-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Wojciech Chmiel\n * - Sophie Bremer\n *\n * */\n\n\n\nconst { merge: InvertModifier_merge } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Inverts columns and rows in a table.\n *\n * @private\n */\nclass InvertModifier extends Modifiers_DataModifier {\n /* *\n *\n * Constructor\n *\n * */\n /**\n * Constructs an instance of the invert modifier.\n *\n * @param {Partial<InvertModifier.Options>} [options]\n * Options to configure the invert modifier.\n */\n constructor(options) {\n super();\n this.options = InvertModifier_merge(InvertModifier.defaultOptions, options);\n }\n /* *\n *\n * Functions\n *\n * */\n /**\n * Inverts rows and columns in the table. If the given table does not have\n * defined a `modified` property, the filtering is applied in-place on the\n * original table rather than on a `modified` copy.\n *\n * @param {DataTable} table\n * Table to invert.\n *\n * @param {DataEvent.Detail} [eventDetail]\n * Custom information for pending events.\n *\n * @return {DataTable}\n * Table with inverted `modified` property as a reference or modified table,\n * if `modified` property of the original table is undefined.\n */\n modifyTable(table, eventDetail) {\n const modifier = this;\n modifier.emit({ type: 'modify', detail: eventDetail, table });\n const modified = table.getModified();\n if (table.hasColumns(['columnIds'])) { // Inverted table\n const columnIdsColumn = ((table.deleteColumns(['columnIds']) || {})\n .columnIds || []), columns = {}, columnIds = [];\n for (let i = 0, iEnd = columnIdsColumn.length; i < iEnd; ++i) {\n columnIds.push('' + columnIdsColumn[i]);\n }\n for (let i = 0, iEnd = table.getRowCount(), row; i < iEnd; ++i) {\n row = table.getRow(i);\n if (row) {\n columns[columnIds[i]] = row;\n }\n }\n modified.deleteColumns();\n modified.setColumns(columns);\n }\n else { // Regular table\n const columns = {};\n for (let i = 0, iEnd = table.getRowCount(), row; i < iEnd; ++i) {\n row = table.getRow(i);\n if (row) {\n columns[`${i}`] = row;\n }\n }\n columns.columnIds = table.getColumnIds();\n modified.deleteColumns();\n modified.setColumns(columns);\n }\n modifier.emit({ type: 'afterModify', detail: eventDetail, table });\n return table;\n }\n}\n/* *\n *\n * Static Properties\n *\n * */\n/**\n * Default options for the invert modifier.\n */\nInvertModifier.defaultOptions = {\n type: 'Invert'\n};\nModifiers_DataModifier.registerType('Invert', InvertModifier);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Modifiers_InvertModifier = ((/* unused pure expression or super */ null && (InvertModifier)));\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/Renderers/TextRenderer.js\n/* *\n *\n * Text Cell Renderer class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\n\n\nconst { merge: TextRenderer_merge } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Renderer for the Text in a column..\n */\nclass TextRenderer extends CellRendering_CellRenderer {\n /* *\n *\n * Constructor\n *\n * */\n constructor(column) {\n super(column);\n this.options = TextRenderer_merge(TextRenderer.defaultOptions, this.column.options.cells?.renderer || {});\n const cellOptions = column.options.cells;\n this.format =\n cellOptions?.format ??\n CellContent_TextContent.defaultFormatsForDataTypes[column.dataType];\n this.formatter = cellOptions?.formatter;\n }\n /* *\n *\n * Methods\n *\n * */\n render(cell) {\n return new CellContent_TextContent(cell);\n }\n}\n/**\n * The default edit mode renderer type names for this view renderer.\n */\nTextRenderer.defaultEditingRenderer = {\n string: 'textInput',\n number: 'numberInput',\n 'boolean': 'checkbox',\n datetime: 'dateInput'\n};\n/**\n * Default options for the text renderer.\n */\nTextRenderer.defaultOptions = {\n type: 'text'\n};\nCellRendering_CellRendererRegistry.registerRenderer('text', TextRenderer);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Renderers_TextRenderer = ((/* unused pure expression or super */ null && (TextRenderer)));\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/ContentTypes/CheckboxContent.js\n/* *\n *\n * Checkbox Cell Content class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a checkbox type of cell content.\n */\nclass CheckboxContent extends CellRendering_CellContentPro {\n /* *\n *\n * Constructor\n *\n * */\n constructor(cell, renderer, parentElement) {\n super(cell, renderer);\n this.finishAfterChange = false;\n this.onChange = (e) => {\n if (this.changeHandler) {\n this.changeHandler(e);\n }\n else {\n void this.cell.setValue(this.value, true);\n }\n };\n this.onKeyDown = (e) => {\n this.keyDownHandler?.(e);\n };\n this.onBlur = (e) => {\n this.blurHandler?.(e);\n };\n this.onCellKeyDown = (e) => {\n if (e.key === ' ') {\n this.input.click();\n }\n };\n this.input = this.add(parentElement);\n }\n /* *\n *\n * Methods\n *\n * */\n add(parentElement = this.cell.htmlElement) {\n const cell = this.cell;\n const { options } = this.renderer;\n const input = this.input = document.createElement('input');\n input.tabIndex = -1;\n input.type = 'checkbox';\n input.name = cell.column.id + '-' + cell.row.id;\n if (options.attributes) {\n Object.entries(options.attributes).forEach(([key, value]) => {\n input.setAttribute(key, value);\n });\n }\n this.update();\n parentElement.appendChild(this.input);\n input.classList.add(Grid_Core_Globals.classNamePrefix + 'field-auto-width');\n input.addEventListener('change', this.onChange);\n input.addEventListener('keydown', this.onKeyDown);\n input.addEventListener('blur', this.onBlur);\n this.cell.htmlElement.addEventListener('keydown', this.onCellKeyDown);\n return this.input;\n }\n update() {\n const cell = this.cell;\n const input = this.input;\n const { options } = this.renderer;\n input.checked = !!cell.value;\n input.disabled = !!options.disabled;\n }\n get rawValue() {\n return this.input.checked ? 'true' : 'false';\n }\n get value() {\n const val = this.input.checked;\n switch (this.cell.column.dataType) {\n case 'datetime':\n case 'number':\n return +val;\n case 'boolean':\n return val;\n case 'string':\n return '' + val;\n }\n }\n getMainElement() {\n return this.input;\n }\n destroy() {\n const input = this.input;\n this.cell.htmlElement.removeEventListener('keydown', this.onCellKeyDown);\n input.removeEventListener('blur', this.onBlur);\n input.removeEventListener('keydown', this.onKeyDown);\n input.removeEventListener('change', this.onChange);\n input.remove();\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ContentTypes_CheckboxContent = (CheckboxContent);\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/Renderers/CheckboxRenderer.js\n/* *\n *\n * Checkbox Cell Renderer class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\n\n\nconst { merge: CheckboxRenderer_merge } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Renderer for the Checkbox in a column.\n */\nclass CheckboxRenderer extends CellRendering_CellRenderer {\n /* *\n *\n * Constructor\n *\n * */\n constructor(column, options) {\n super(column);\n this.options = CheckboxRenderer_merge(CheckboxRenderer.defaultOptions, options);\n }\n /* *\n *\n * Methods\n *\n * */\n render(cell, parentElement) {\n return new ContentTypes_CheckboxContent(cell, this, parentElement);\n }\n}\n/**\n * The default edit mode renderer type name for this view renderer.\n */\nCheckboxRenderer.defaultEditingRenderer = 'checkbox';\n/**\n * Default options for the checkbox renderer.\n */\nCheckboxRenderer.defaultOptions = {\n type: 'checkbox'\n};\nCellRendering_CellRendererRegistry.registerRenderer('checkbox', CheckboxRenderer);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Renderers_CheckboxRenderer = ((/* unused pure expression or super */ null && (CheckboxRenderer)));\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/ContentTypes/SelectContent.js\n/* *\n *\n * Select Cell Content class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a select type of cell content.\n */\nclass SelectContent extends CellRendering_CellContentPro {\n /* *\n *\n * Constructor\n *\n * */\n constructor(cell, renderer, parentElement) {\n super(cell, renderer);\n /**\n * Whether to finish the edit after a change.\n */\n this.finishAfterChange = true;\n /**\n * The HTML option elements representing the options in the select input.\n */\n this.optionElements = [];\n this.onChange = (e) => {\n if (this.changeHandler) {\n this.changeHandler(e);\n }\n else {\n this.cell.htmlElement.focus();\n void this.cell.setValue(this.value, true);\n }\n };\n this.onKeyDown = (e) => {\n e.stopPropagation();\n if (this.keyDownHandler) {\n this.keyDownHandler?.(e);\n return;\n }\n if (e.key === 'Escape' || e.key === 'Enter') {\n this.cell.htmlElement.focus();\n }\n };\n this.onBlur = (e) => {\n this.blurHandler?.(e);\n };\n this.onCellKeyDown = (e) => {\n if (e.key === ' ') {\n this.select.focus();\n e.preventDefault();\n }\n };\n this.select = this.add(parentElement);\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Adds the select element to the parent element.\n * @param parentElement The parent element to add the select element to.\n * @returns The select element.\n */\n add(parentElement = this.cell.htmlElement) {\n const cell = this.cell;\n const { options } = this.renderer;\n const select = this.select = document.createElement('select');\n select.tabIndex = -1;\n select.name = cell.column.id + '-' + cell.row.id;\n if (options.attributes) {\n Object.entries(options.attributes).forEach(([key, value]) => {\n select.setAttribute(key, value);\n });\n }\n this.update();\n parentElement.appendChild(this.select);\n select.addEventListener('change', this.onChange);\n select.addEventListener('keydown', this.onKeyDown);\n select.addEventListener('blur', this.onBlur);\n this.cell.htmlElement.addEventListener('keydown', this.onCellKeyDown);\n return select;\n }\n /**\n * Updates the select element.\n */\n update() {\n const cell = this.cell;\n const { options } = this.renderer;\n this.select.disabled = !!options.disabled;\n // If there will be a need, we can optimize this by not removing all\n // old options and only updating the ones that need to be updated.\n this.select.innerHTML = HTML_AST.emptyHTML;\n for (const option of options.options) {\n const optionElement = document.createElement('option');\n optionElement.value = option.value;\n optionElement.textContent = option.label || option.value;\n optionElement.disabled = !!option.disabled;\n if (cell.value === option.value) {\n optionElement.selected = true;\n }\n this.select.appendChild(optionElement);\n this.optionElements.push(optionElement);\n }\n }\n /**\n * Destroys the content.\n */\n destroy() {\n const select = this.select;\n this.cell.htmlElement.removeEventListener('keydown', this.onCellKeyDown);\n select.removeEventListener('blur', this.onBlur);\n select.removeEventListener('keydown', this.onKeyDown);\n select.removeEventListener('change', this.onChange);\n for (const optionElement of this.optionElements) {\n optionElement.remove();\n }\n this.optionElements.length = 0;\n select.remove();\n }\n /**\n * Gets the raw value of the select element.\n */\n get rawValue() {\n return this.select.value;\n }\n /**\n * Gets the value of the select element.\n */\n get value() {\n const val = this.select.value;\n switch (this.cell.column.dataType) {\n case 'datetime':\n case 'number':\n return +val;\n case 'boolean':\n return val;\n case 'string':\n return '' + val;\n }\n }\n /**\n * Gets the main element (select) of the content.\n * @returns The select element.\n */\n getMainElement() {\n return this.select;\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ContentTypes_SelectContent = (SelectContent);\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/Renderers/SelectRenderer.js\n/* *\n *\n * Select Cell Renderer class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\n\n\nconst { merge: SelectRenderer_merge } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Renderer for the Select in a column..\n */\nclass SelectRenderer extends CellRendering_CellRenderer {\n /* *\n *\n * Constructor\n *\n * */\n constructor(column, options) {\n super(column);\n this.options = SelectRenderer_merge(SelectRenderer.defaultOptions, options);\n }\n /* *\n *\n * Methods\n *\n * */\n render(cell, parentElement) {\n return new ContentTypes_SelectContent(cell, this, parentElement);\n }\n}\n/**\n * The default edit mode renderer type name for this view renderer.\n */\nSelectRenderer.defaultEditingRenderer = 'select';\n/**\n * Default options for the select renderer.\n */\nSelectRenderer.defaultOptions = {\n type: 'select',\n options: []\n};\nCellRendering_CellRendererRegistry.registerRenderer('select', SelectRenderer);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Renderers_SelectRenderer = ((/* unused pure expression or super */ null && (SelectRenderer)));\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/ContentTypes/TextInputContent.js\n/* *\n *\n * Text Input Cell Content class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\nconst { defined: TextInputContent_defined } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a text input type of cell content.\n */\nclass TextInputContent extends CellRendering_CellContentPro {\n /* *\n *\n * Constructor\n *\n * */\n constructor(cell, renderer, parentElement) {\n super(cell, renderer);\n /**\n * Whether to finish the edit after a change.\n */\n this.finishAfterChange = true;\n this.onChange = (e) => {\n if (this.changeHandler) {\n this.changeHandler(e);\n return;\n }\n void this.cell.setValue(e.target.value, true);\n };\n this.onKeyDown = (e) => {\n e.stopPropagation();\n if (this.keyDownHandler) {\n this.keyDownHandler(e);\n return;\n }\n if (e.key === 'Escape') {\n this.input.value = this.convertToInputValue();\n this.cell.htmlElement.focus();\n return;\n }\n if (e.key === 'Enter') {\n this.cell.htmlElement.focus();\n }\n };\n this.onBlur = (e) => {\n this.blurHandler?.(e);\n };\n this.onCellKeyDown = (e) => {\n if (e.key === ' ') {\n this.input.focus();\n e.preventDefault();\n }\n };\n this.input = this.add(parentElement);\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Adds the input element to the parent element.\n * @param parentElement The parent element to add the input element to.\n * @returns The input element.\n */\n add(parentElement = this.cell.htmlElement) {\n const cell = this.cell;\n const input = this.input = document.createElement('input');\n const { options } = this.renderer;\n input.tabIndex = -1;\n input.name = cell.column.id + '-' + cell.row.id;\n if (options.attributes) {\n Object.entries(options.attributes).forEach(([key, value]) => {\n input.setAttribute(key, value);\n });\n }\n this.update();\n parentElement.appendChild(this.input);\n input.addEventListener('change', this.onChange);\n input.addEventListener('keydown', this.onKeyDown);\n input.addEventListener('blur', this.onBlur);\n this.cell.htmlElement.addEventListener('keydown', this.onCellKeyDown);\n return input;\n }\n /**\n * Updates the input element.\n */\n update() {\n const { options } = this.renderer;\n this.input.value = this.convertToInputValue();\n this.input.disabled = !!options.disabled;\n }\n /**\n * Gets the raw value of the input element.\n */\n get rawValue() {\n return this.input.value;\n }\n /**\n * Gets the value of the input element.\n */\n get value() {\n const val = this.input.value;\n switch (this.cell.column.dataType) {\n case 'datetime':\n case 'number':\n return val === '' ? null : +val;\n case 'boolean':\n if (val === '') {\n return null;\n }\n if (val === 'false' || +val === 0) {\n return false;\n }\n return true;\n case 'string':\n return val;\n }\n }\n /**\n * Converts the cell value to a string for the input.\n */\n convertToInputValue() {\n const val = this.cell.value;\n return TextInputContent_defined(val) ? '' + val : '';\n }\n /**\n * Gets the main element (input) of the content.\n * @returns The input element.\n */\n getMainElement() {\n return this.input;\n }\n /**\n * Destroys the content.\n */\n destroy() {\n const input = this.input;\n this.cell.htmlElement.removeEventListener('keydown', this.onCellKeyDown);\n input.removeEventListener('blur', this.onBlur);\n input.removeEventListener('keydown', this.onKeyDown);\n input.removeEventListener('change', this.onChange);\n input.remove();\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ContentTypes_TextInputContent = (TextInputContent);\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/Renderers/TextInputRenderer.js\n/* *\n *\n * Text Input Cell Renderer class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\n\n\nconst { merge: TextInputRenderer_merge } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Renderer for the Select in a column..\n */\nclass TextInputRenderer extends CellRendering_CellRenderer {\n /* *\n *\n * Constructor\n *\n * */\n constructor(column, options) {\n super(column);\n this.options = TextInputRenderer_merge(TextInputRenderer.defaultOptions, options);\n }\n /* *\n *\n * Methods\n *\n * */\n render(cell, parentElement) {\n return new ContentTypes_TextInputContent(cell, this, parentElement);\n }\n}\n/**\n * The default edit mode renderer type names for this view renderer.\n */\nTextInputRenderer.defaultEditingRenderer = 'textInput';\n/**\n * Default options for the text input renderer.\n */\nTextInputRenderer.defaultOptions = {\n type: 'textInput'\n};\nCellRendering_CellRendererRegistry.registerRenderer('textInput', TextInputRenderer);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Renderers_TextInputRenderer = ((/* unused pure expression or super */ null && (TextInputRenderer)));\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContentBase.js\n/* *\n *\n * Date Input Cell Content Base class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a date/time/datetime input type of cell content.\n */\nclass DateInputContentBase extends CellRendering_CellContentPro {\n /* *\n *\n * Constructor\n *\n * */\n constructor(cell, renderer, parentElement) {\n super(cell, renderer);\n /**\n * Whether to finish the edit after a change.\n */\n this.finishAfterChange = false;\n this.onChange = (e) => {\n this.changeHandler?.(e);\n };\n this.onKeyDown = (e) => {\n e.stopPropagation();\n if (this.keyDownHandler) {\n this.keyDownHandler(e);\n return;\n }\n if (e.key === 'Escape') {\n this.cell.htmlElement.focus();\n this.input.value = this.convertToInputValue();\n return;\n }\n if (e.key === 'Enter') {\n this.cell.htmlElement.focus();\n void this.cell.setValue(this.value, true);\n }\n };\n this.onBlur = (e) => {\n if (this.blurHandler) {\n this.blurHandler(e);\n return;\n }\n void this.cell.setValue(this.value, true);\n };\n this.onCellKeyDown = (e) => {\n if (e.key === ' ') {\n this.input.focus();\n e.preventDefault();\n }\n };\n this.options = renderer.options;\n this.input = this.add(parentElement);\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Adds the input element to the parent element.\n * @param parentElement The parent element to add the input element to.\n * @returns The input element.\n */\n add(parentElement = this.cell.htmlElement) {\n const { cell, options } = this;\n const input = this.input = document.createElement('input');\n input.tabIndex = -1;\n input.type = this.getInputType();\n input.name = cell.column.id + '-' + cell.row.id;\n if (options.attributes) {\n Object.entries(options.attributes).forEach(([key, value]) => {\n input.setAttribute(key, value);\n });\n }\n this.update();\n parentElement.appendChild(input);\n input.addEventListener('change', this.onChange);\n input.addEventListener('keydown', this.onKeyDown);\n input.addEventListener('blur', this.onBlur);\n this.cell.htmlElement.addEventListener('keydown', this.onCellKeyDown);\n return this.input;\n }\n /**\n * Updates the input element.\n */\n update() {\n const input = this.input;\n input.value = this.convertToInputValue();\n input.disabled = !!this.options.disabled;\n }\n /**\n * Gets the raw value of the input element.\n */\n get rawValue() {\n return this.input.value;\n }\n /**\n * Gets the value of the input element.\n */\n get value() {\n return new Date(`${this.input.value}Z`).getTime();\n }\n /**\n * Gets the main element (input) of the content.\n * @returns The input element.\n */\n getMainElement() {\n return this.input;\n }\n /**\n * Destroys the content.\n */\n destroy() {\n const input = this.input;\n this.cell.htmlElement.removeEventListener('keydown', this.onCellKeyDown);\n input.removeEventListener('blur', this.onBlur);\n input.removeEventListener('keydown', this.onKeyDown);\n input.removeEventListener('change', this.onChange);\n input.remove();\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ContentTypes_DateInputContentBase = (DateInputContentBase);\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/ContentTypes/DateInputContent.js\n/* *\n *\n * Date Input Cell Content class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a date input type of cell content.\n */\nclass DateInputContent extends ContentTypes_DateInputContentBase {\n getInputType() {\n return 'date';\n }\n convertToInputValue() {\n return this.cell.column.viewport.grid.time.dateFormat('%Y-%m-%d', Number(this.cell.value || 0));\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ContentTypes_DateInputContent = (DateInputContent);\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/Renderers/DateInputRenderer.js\n/* *\n *\n * Date Input Cell Renderer class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\n\n\nconst { merge: DateInputRenderer_merge } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Renderer for the Select in a column..\n */\nclass DateInputRenderer extends CellRendering_CellRenderer {\n /* *\n *\n * Constructor\n *\n * */\n constructor(column, options) {\n super(column);\n this.options = DateInputRenderer_merge(DateInputRenderer.defaultOptions, options);\n }\n /* *\n *\n * Methods\n *\n * */\n render(cell, parentElement) {\n return new ContentTypes_DateInputContent(cell, this, parentElement);\n }\n}\n/**\n * The default edit mode renderer type name for this view renderer.\n */\nDateInputRenderer.defaultEditingRenderer = 'dateInput';\n/**\n * Default options for the date input renderer.\n */\nDateInputRenderer.defaultOptions = {\n type: 'dateInput'\n};\nCellRendering_CellRendererRegistry.registerRenderer('dateInput', DateInputRenderer);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Renderers_DateInputRenderer = ((/* unused pure expression or super */ null && (DateInputRenderer)));\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/ContentTypes/DateTimeInputContent.js\n/* *\n *\n * DateTime Input Cell Content class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a datetime input type of cell content.\n */\nclass DateTimeInputContent extends ContentTypes_DateInputContentBase {\n getInputType() {\n return 'datetime-local';\n }\n convertToInputValue() {\n return this.cell.column.viewport.grid.time.dateFormat('%Y-%m-%dT%H:%M:%S', Number(this.cell.value || 0));\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ContentTypes_DateTimeInputContent = (DateTimeInputContent);\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/Renderers/DateTimeInputRenderer.js\n/* *\n *\n * Date Time Input Cell Renderer class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\n\n\nconst { merge: DateTimeInputRenderer_merge } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Renderer for the Select in a column..\n */\nclass DateTimeInputRenderer extends CellRendering_CellRenderer {\n /* *\n *\n * Constructor\n *\n * */\n constructor(column, options) {\n super(column);\n this.options = DateTimeInputRenderer_merge(DateTimeInputRenderer.defaultOptions, options);\n }\n /* *\n *\n * Methods\n *\n * */\n render(cell, parentElement) {\n return new ContentTypes_DateTimeInputContent(cell, this, parentElement);\n }\n}\n/**\n * The default edit mode renderer type name for this view renderer.\n */\nDateTimeInputRenderer.defaultEditingRenderer = 'dateTimeInput';\n/**\n * Default options for the date input renderer.\n */\nDateTimeInputRenderer.defaultOptions = {\n type: 'dateTimeInput'\n};\nCellRendering_CellRendererRegistry.registerRenderer('dateTimeInput', DateTimeInputRenderer);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Renderers_DateTimeInputRenderer = ((/* unused pure expression or super */ null && (DateTimeInputRenderer)));\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/ContentTypes/TimeInputContent.js\n/* *\n *\n * Time Input Cell Content class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a time input type of cell content.\n */\nclass TimeInputContent extends ContentTypes_DateInputContentBase {\n getInputType() {\n return 'time';\n }\n get value() {\n return new Date(`1970-01-01T${this.input.value}Z`).getTime();\n }\n convertToInputValue() {\n return this.cell.column.viewport.grid.time.dateFormat('%H:%M:%S', Number(this.cell.value || 0));\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ContentTypes_TimeInputContent = (TimeInputContent);\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/Renderers/TimeInputRenderer.js\n/* *\n *\n * Time Input Cell Renderer class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n *\n * */\n\n\n\n\n\nconst { merge: TimeInputRenderer_merge } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Renderer for the Select in a column..\n */\nclass TimeInputRenderer extends CellRendering_CellRenderer {\n /* *\n *\n * Constructor\n *\n * */\n constructor(column, options) {\n super(column);\n this.options = TimeInputRenderer_merge(TimeInputRenderer.defaultOptions, options);\n }\n /* *\n *\n * Methods\n *\n * */\n render(cell, parentElement) {\n return new ContentTypes_TimeInputContent(cell, this, parentElement);\n }\n}\n/**\n * The default edit mode renderer type name for this view renderer.\n */\nTimeInputRenderer.defaultEditingRenderer = 'timeInput';\n/**\n * Default options for the time input renderer.\n */\nTimeInputRenderer.defaultOptions = {\n type: 'timeInput'\n};\nCellRendering_CellRendererRegistry.registerRenderer('timeInput', TimeInputRenderer);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Renderers_TimeInputRenderer = ((/* unused pure expression or super */ null && (TimeInputRenderer)));\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/ContentTypes/SparklineContent.js\n/* *\n *\n * Sparkline Cell Content class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\n\nconst { defined: SparklineContent_defined, merge: SparklineContent_merge } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a sparkline type of cell content.\n */\nclass SparklineContent extends CellRendering_CellContentPro {\n /* *\n *\n * Constructor\n *\n * */\n constructor(cell, renderer, parentElement) {\n super(cell, renderer);\n this.onKeyDown = () => {\n this.cell.htmlElement.focus();\n };\n this.add(parentElement);\n }\n /* *\n *\n * Methods\n *\n * */\n add(parentElement = this.cell.htmlElement) {\n const H = SparklineContent.H;\n if (!H || !SparklineContent_defined(this.cell.value)) {\n return;\n }\n this.chartContainer = document.createElement('div');\n parentElement.classList.add(Grid_Core_Globals.getClassName('noPadding'));\n parentElement.appendChild(this.chartContainer);\n this.chart = H.Chart.chart(this.chartContainer, SparklineContent_merge(SparklineContent.defaultChartOptions, this.getProcessedOptions()));\n this.chartContainer.addEventListener('click', this.onKeyDown);\n }\n update() {\n const chartOptions = this.getProcessedOptions();\n this.chart?.update(chartOptions, true, false, chartOptions.chart?.animation);\n }\n destroy() {\n this.chartContainer?.removeEventListener('keydown', this.onKeyDown);\n this.chart?.destroy();\n this.chartContainer?.remove();\n delete this.chart;\n delete this.chartContainer;\n this.cell.htmlElement.classList.remove(Grid_Core_Globals.getClassName('noPadding'));\n }\n getProcessedOptions() {\n const renderer = this.renderer;\n const { chartOptions } = renderer.options;\n let options;\n if (typeof chartOptions === 'function') {\n options = chartOptions.call(this.cell, this.cell.value);\n }\n else {\n options = SparklineContent_merge(chartOptions) || {};\n }\n let trimmedValue = ('' + this.cell.value).trim();\n if (!trimmedValue.startsWith('[') && !trimmedValue.startsWith('{')) {\n trimmedValue = `[${trimmedValue}]`;\n }\n if (!options.series) {\n options.series = [{\n data: JSON.parse(trimmedValue)\n }];\n }\n return options;\n }\n}\nSparklineContent.defaultChartOptions = {\n chart: {\n height: 40,\n margin: [5, 8, 5, 8],\n backgroundColor: 'transparent',\n skipClone: true\n },\n accessibility: {\n enabled: false\n },\n tooltip: {\n enabled: false\n },\n title: {\n text: ''\n },\n credits: {\n enabled: false\n },\n xAxis: {\n visible: false\n },\n yAxis: {\n visible: false\n },\n legend: {\n enabled: false\n },\n plotOptions: {\n series: {\n borderWidth: 0,\n marker: {\n enabled: false\n },\n states: {\n hover: {\n enabled: false\n },\n inactive: {\n enabled: false\n }\n },\n animation: false,\n dataLabels: {\n enabled: false\n }\n },\n pie: {\n slicedOffset: 0,\n borderRadius: 0\n }\n }\n};\n/* *\n *\n * Namespace\n *\n * */\n(function (SparklineContent) {\n})(SparklineContent || (SparklineContent = {}));\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ContentTypes_SparklineContent = (SparklineContent);\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/Renderers/SparklineRenderer.js\n/* *\n *\n * Sparkline Cell Renderer class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Dawid Dragula\n * - Sebastian Bochan\n *\n * */\n\n\n\n\n\nconst { merge: SparklineRenderer_merge } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Renderer for the Text in a column..\n */\nclass SparklineRenderer extends CellRendering_CellRenderer {\n /* *\n *\n * Constructor\n *\n * */\n constructor(column) {\n super(column);\n if (!ContentTypes_SparklineContent.H) {\n throw new Error('Sparkline Renderer: Highcharts is not loaded. Please ensure ' +\n 'that Highcharts namespace is registered before the Sparkline' +\n ' Renderer is used.');\n }\n this.options = SparklineRenderer_merge(SparklineRenderer.defaultOptions, this.column.options.cells?.renderer || {});\n }\n /* *\n *\n * Methods\n *\n * */\n render(cell) {\n return new ContentTypes_SparklineContent(cell, this);\n }\n}\n/**\n * The default edit mode renderer type names for this view renderer.\n */\nSparklineRenderer.defaultEditingRenderer = 'textInput';\n/**\n * Default options for the sparkline renderer.\n */\nSparklineRenderer.defaultOptions = {\n type: 'sparkline'\n};\n/* *\n *\n * Namespace\n *\n * */\n(function (SparklineRenderer) {\n /**\n * Imports the Highcharts namespace to be used by the Sparkline Renderer.\n *\n * @param H\n * Highcharts namespace.\n */\n function useHighcharts(H) {\n if (H && !ContentTypes_SparklineContent.H) {\n ContentTypes_SparklineContent.H = H;\n }\n }\n SparklineRenderer.useHighcharts = useHighcharts;\n})(SparklineRenderer || (SparklineRenderer = {}));\nCellRendering_CellRendererRegistry.registerRenderer('sparkline', SparklineRenderer);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Renderers_SparklineRenderer = ((/* unused pure expression or super */ null && (SparklineRenderer)));\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/ContentTypes/NumberInputContent.js\n/* *\n *\n * Text Input Cell Content class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sebastian Bochan\n *\n * */\n\n\n\nconst { defined: NumberInputContent_defined } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Represents a text input type of cell content.\n */\nclass NumberInputContent extends CellRendering_CellContentPro {\n /* *\n *\n * Constructor\n *\n * */\n constructor(cell, renderer, parentElement) {\n super(cell, renderer);\n /**\n * Whether to finish the edit after a change.\n */\n this.finishAfterChange = false;\n this.dblClickHandler = (e) => {\n e.stopPropagation();\n this.input.focus();\n };\n this.onChange = (e) => {\n if (this.changeHandler) {\n this.changeHandler(e);\n return;\n }\n void this.cell.setValue(this.value, true);\n };\n this.onKeyDown = (e) => {\n e.stopPropagation();\n if (this.keyDownHandler) {\n this.keyDownHandler(e);\n return;\n }\n if (e.key === 'Escape') {\n this.input.value = this.convertToInputValue();\n this.cell.htmlElement.focus();\n return;\n }\n if (e.key === 'Enter') {\n this.cell.htmlElement.focus();\n }\n };\n this.onBlur = (e) => {\n this.blurHandler?.(e);\n };\n this.onCellKeyDown = (e) => {\n if (e.key === ' ') {\n this.input.focus();\n e.preventDefault();\n }\n };\n this.input = this.add(parentElement);\n }\n /* *\n *\n * Methods\n *\n * */\n /**\n * Adds the input element to the parent element.\n * @param parentElement The parent element to add the input element to.\n * @returns The input element.\n */\n add(parentElement = this.cell.htmlElement) {\n const cell = this.cell;\n const input = this.input = document.createElement('input');\n const { options } = this.renderer;\n input.type = 'number';\n input.tabIndex = -1;\n input.name = cell.column.id + '-' + cell.row.id;\n if (options.attributes) {\n Object.entries(options.attributes).forEach(([key, value]) => {\n input.setAttribute(key, value);\n });\n }\n this.update();\n parentElement.appendChild(this.input);\n input.addEventListener('change', this.onChange);\n input.addEventListener('keydown', this.onKeyDown);\n input.addEventListener('blur', this.onBlur);\n input.addEventListener('dblclick', this.dblClickHandler);\n this.cell.htmlElement.addEventListener('keydown', this.onCellKeyDown);\n return input;\n }\n /**\n * Updates the input element.\n */\n update() {\n const { options } = this.renderer;\n this.input.value = this.convertToInputValue();\n this.input.disabled = !!options.disabled;\n }\n /**\n * Gets the raw value of the input element.\n */\n get rawValue() {\n return this.input.value;\n }\n /**\n * Gets the number value of the input element.\n */\n get value() {\n return +this.input.value;\n }\n /**\n * Converts the cell value to a string for the input.\n */\n convertToInputValue() {\n const val = this.cell.value;\n return NumberInputContent_defined(val) ? '' + val : '';\n }\n /**\n * Gets the main element (input) of the content.\n * @returns The input element.\n */\n getMainElement() {\n return this.input;\n }\n /**\n * Destroys the content.\n */\n destroy() {\n const input = this.input;\n this.cell.htmlElement.removeEventListener('keydown', this.onCellKeyDown);\n input.removeEventListener('blur', this.onBlur);\n input.removeEventListener('keydown', this.onKeyDown);\n input.removeEventListener('change', this.onChange);\n input.remove();\n }\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const ContentTypes_NumberInputContent = (NumberInputContent);\n\n;// ./code/grid/es-modules/Grid/Pro/CellRendering/Renderers/NumberInputRenderer.js\n/* *\n *\n * Date Input Cell Renderer class\n *\n * (c) 2020-2025 Highsoft AS\n *\n * License: www.highcharts.com/license\n *\n * !!!!!!! SOURCE GETS TRANSPILED BY TYPESCRIPT. EDIT TS FILE ONLY. !!!!!!!\n *\n * Authors:\n * - Sebastian Bochan\n *\n * */\n\n\n\n\n\nconst { merge: NumberInputRenderer_merge } = Core_Utilities;\n/* *\n *\n * Class\n *\n * */\n/**\n * Renderer for the Select in a column..\n */\nclass NumberInputRenderer extends CellRendering_CellRenderer {\n /* *\n *\n * Constructor\n *\n * */\n constructor(column, options) {\n super(column);\n this.options = NumberInputRenderer_merge(NumberInputRenderer.defaultOptions, options);\n }\n /* *\n *\n * Methods\n *\n * */\n render(cell, parentElement) {\n return new ContentTypes_NumberInputContent(cell, this, parentElement);\n }\n}\n/**\n * The default edit mode renderer type name for this view renderer.\n */\nNumberInputRenderer.defaultEditingRenderer = 'numberInput';\n/**\n * Default options for the date input renderer.\n */\nNumberInputRenderer.defaultOptions = {\n type: 'numberInput'\n};\nCellRendering_CellRendererRegistry.registerRenderer('numberInput', NumberInputRenderer);\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const Renderers_NumberInputRenderer = ((/* unused pure expression or super */ null && (NumberInputRenderer)));\n\n;// ./code/grid/es-modules/masters/grid-pro.js\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* *\n *\n * Registers Imports\n *\n * */\n// Connectors\n\n\n\n\n\n\n\n\n\n// Compositions\n\n\n\n\n// Cell Renderers\n\n\n\n\n\n\n\n\n\n\n\n\n/* *\n *\n * Namespace\n *\n * */\nconst G = Grid_Core_Globals;\nG.AST = HTML_AST;\nG.classNamePrefix = 'hcg-';\nG.DataConnector = Connectors_DataConnector;\nG.DataCursor = Data_DataCursor;\nG.DataConverter = Converters_DataConverter;\nG.Grid = Core_Grid;\nG.grid = Core_Grid.grid;\nG.grids = Core_Grid.grids;\nG.DataModifier = Modifiers_DataModifier;\nG.DataPool = Data_DataPool;\nG.DataTable = Data_DataTable;\nG.ColumnResizing = ColumnResizing_ColumnResizing;\nG.defaultOptions = Core_Defaults.defaultOptions;\nG.isHighContrastModeActive = HighContrastMode.isHighContrastModeActive;\nG.setOptions = Core_Defaults.setOptions;\nG.Templating = Core_Templating;\nG.product = 'Grid Pro';\nG.merge = Core_Utilities.merge;\nG.Table = G.Table || Table_Table;\nG.Column = G.Column || Table_Column;\nG.HeaderCell = G.HeaderCell || Header_HeaderCell;\nG.TableCell = G.TableCell || Body_TableCell;\nG.Pagination = G.Pagination || Pagination_Pagination;\nGridEvents.compose(G.Grid, G.Column, G.HeaderCell, G.TableCell);\nCellEditing_CellEditingComposition.compose(G.Table, G.TableCell, G.Column);\nCredits_CreditsProComposition.compose(G.Grid);\nExport_ExportingComposition.compose(G.Grid);\nColumnTypes_ValidatorComposition.compose(G.Table);\nCellRendering_CellRenderersComposition.compose(G.Column);\nPagination_PaginationComposition.compose(G.Pagination);\nG.CellRendererRegistry = G.CellRendererRegistry || CellRendering_CellRendererRegistry;\nG.CellContentPro = CellRendering_CellContentPro;\nG.CellRenderer = CellRendering_CellRenderer;\nG.SvgIcons = UI_SvgIcons;\n/* *\n *\n * Classic Export\n *\n * */\nif (!G.win.Grid) {\n G.win.Grid = G;\n}\nif (G.win.Highcharts) {\n G.CellRendererRegistry.types.sparkline.useHighcharts(G.win.Highcharts);\n}\n/* *\n *\n * Default Export\n *\n * */\n/* harmony default export */ const grid_pro_src = (G);\n\n__webpack_exports__ = __webpack_exports__[\"default\"];\n/******/ \treturn __webpack_exports__;\n/******/ })()\n;\n});"],"names":["root","factory","exports","module","define","amd","error","window","serialMode","Globals","ColumnResizing","ColumnUtils","DataConverterUtils","Globals_Globals","GridUtils","Defaults_Defaults","SvgIcons","StateHelpers","CellRendererRegistry","CellEditingComposition","CreditsProComposition","ExportingComposition","ValidatorComposition","CellRenderersComposition","PaginationComposition","__webpack_require__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","__webpack_exports__","grid_pro_src","SVG_NS","product","version","win","doc","document","svg","createElementNS","createSVGRect","pageLang","documentElement","closest","lang","userAgent","navigator","isChrome","chrome","isFirefox","indexOf","isMS","test","opera","isSafari","isTouchDevice","isWebKit","deg2rad","Math","PI","marginNames","noop","supportsPassiveEvents","supportsPassive","opts","addEventListener","removeEventListener","charts","composed","dateFormats","seriesTypes","symbolSizes","chartCount","Core_Globals","code","stop","chart","params","severity","isCode","isNumber","message","toString","additionalMessages","objectEach","value","encodeURI","fireEvent","Error","console","messages","warn","push","pInt","s","mag","parseInt","isString","isArray","str","isObject","strict","isDOMElement","nodeType","isClass","c","name","n","isNaN","Infinity","defined","attr","elem","keyOrAttribs","ret","isGetter","attrSingle","setAttribute","getAttribute","removeAttribute","splat","extend","a","b","pick","args","arguments","length","i","arg","css","el","styles","style","getMagnitude","num","pow","floor","log","LN10","correctFloat","prec","parseFloat","toPrecision","easeInOutSine","pos","cos","find","Array","arr","callback","fn","ctx","removeEvent","type","removeOneEvent","removeAllEvents","eventCollection","types","len","nodeName","_val","owner","events","hcEvents","typeEvents","filter","eventArguments","defaultFunction","createEvent","dispatchEvent","e","initEvent","target","preventDefault","defaultPrevented","object","multilevel","unshift","apply","getPrototypeOf","sort","order","forEach","uniqueKey","hash","random","substring","id","jQuery","highcharts","slice","shift","Utilities","addEvent","options","Point","series","runTrackerClick","passive","capture","eventObject","arrayMax","data","max","arrayMin","min","clamp","clearTimeout","createElement","tag","attribs","parent","nopad","padding","border","margin","appendChild","crisp","lineWidth","inverted","mod","inverter","round","destroyObjectProperties","except","destructablesOnly","val","destroy","diffObjects","newer","older","keepOlder","collectionsWithUpdate","diff","depth","keeper","newerVal","keys","discardElement","element","parentElement","removeChild","erase","item","splice","extendClass","members","getAlignFactor","align","center","right","middle","bottom","getClosestDistance","arrays","onError","loopLength","distance","allowNegative","xData","getNestedProperty","path","pathElements","split","pathElement","thisProp","child","replace","getStyle","toInt","offsetWidth","scrollWidth","boundingClientRectWidth","getBoundingClientRect","width","offsetHeight","scrollHeight","getComputedStyle","getPropertyValue","insertItem","collection","indexOption","index","isInternal","_i","isFunction","merge","extendOrSource","sources","doCopy","copy","original","normalizeTickInterval","interval","multiples","magnitude","allowDecimals","hasTickAmount","retInterval","normalized","offset","docElem","box","parentNode","top","left","height","pageYOffset","scrollTop","clientTop","pageXOffset","scrollLeft","clientLeft","pad","number","padder","String","join","pushUnique","array","relativeLength","base","replaceNested","text","replacements","previous","replacement","stableSort","sortFunction","sortValue","safeI","syncTimeout","delay","context","setTimeout","timeUnits","millisecond","second","minute","hour","day","week","month","year","ucfirst","toUpperCase","useSerialIds","mode","wrap","method","func","proceed","outerArgs","scope","concat","AST_win","AST_attr","AST_createElement","AST_css","AST_error","AST_isFunction","AST_isString","AST_objectEach","AST_splat","trustedTypes","trustedTypesPolicy","createPolicy","createHTML","emptyHTML","AST","filterUserAttributes","attributes","valid","allowedAttributes","allowedReferences","some","ref","parseStyle","reduce","line","pair","map","trim","g","setElementHTML","html","innerHTML","ast","addToDOM","source","nodes","parseMarkup","recurse","subtree","subParent","node","tagName","textNode","textContent","createTextNode","bypassHTMLFiltering","allowedTags","NS","namespaceURI","children","markup","DOMParser","parseFromString","body","appendChildNodes","addTo","toLowerCase","astNode","parsedAttributes","attrib","childNodes","childNode","TimeBase_win","TimeBase_defined","TimeBase_error","TimeBase_extend","TimeBase_isNumber","TimeBase_isObject","TimeBase_isString","TimeBase_merge","TimeBase_objectEach","TimeBase_pad","TimeBase_splat","TimeBase_timeUnits","TimeBase_ucfirst","hasOldSafariBug","Intl","DateTimeFormat","formatRange","Shared_TimeBase","timezone","variableTimezone","Date","update","dTLCache","timezoneOffset","useUTC","locale","isMonth","isShort","timeZone","position","dateFormat","toParts","timestamp","weekday","dayOfMonth","hours","minutes","seconds","dateTimeFormat","Number","cacheKey","JSON","stringify","str2dtf","dTL","format","dtf","mapping","L","fractionalSecondDigits","S","M","H","k","E","A","B","m","y","Y","makeTime","date","milliseconds","UTC","getTimezoneOffset","newOffset","parse","hasTimezone","isYYYYMMDD","ts","gmt","colon","timeZoneName","upperCaseFirst","invalidDate","match","localeAwareRegex","exec","time","fullYear","langWeekdays","weekdays","shortWeekdays","months","shortMonths","substr","w","v","weekFrom","I","l","p","P","tzHours","prefix","suffix","resolveDTLFormat","f","main","from","to","getDateFormat","range","startOfWeek","dateTimeLabelFormats","dateStr","blank","strpos","lastN","Time_defined","Time_extend","Time_timeUnits","Core_Time","getTimeTicks","normalizedInterval","tickPositions","higherRanks","count","unitRange","variableDayLength","weekdayNo","t","info","totalRange","Defaults_fireEvent","Defaults_merge","defaultOptions","colors","symbols","chartTitle","loading","seriesName","numericSymbols","pieSliceName","resetZoom","yAxisTitle","resetZoomTitle","global","buttonTheme","fill","r","stroke","color","cursor","fontSize","fontWeight","states","hover","select","disabled","alignThresholds","panning","enabled","styledMode","borderRadius","colorCount","allowMutatingData","ignoreHiddenSeries","spacing","resetZoomButton","theme","reflow","zooming","singleTouch","resetButton","zIndex","x","borderColor","backgroundColor","plotBorderColor","title","minScale","subtitle","caption","verticalAlign","plotOptions","legend","alignColumns","className","layout","itemMarginBottom","itemMarginTop","labelFormatter","navigation","activeColor","inactiveColor","itemStyle","textDecoration","textOverflow","itemHoverStyle","itemHiddenStyle","shadow","itemCheckboxStyle","squareSymbol","symbolPadding","labelStyle","opacity","textAlign","tooltip","animation","duration","easing","sqrt","footerFormat","headerShape","hideDelay","shared","snap","headerFormat","pointFormat","borderWidth","stickOnContact","useHTML","credits","href","defaultTime","Templating_defaultOptions","Templating_defaultTime","getOptions","setOptions","Templating_pageLang","Templating_extend","Templating_getNestedProperty","Templating_isArray","Templating_isNumber","Templating_isObject","Templating_isString","Templating_pick","Templating_ucfirst","helpers","add","divide","eq","each","ge","gt","condition","le","lt","multiply","ne","subtract","unless","numberFormatCache","isQuotedString","regex","subRegex","matches","floatRegex","decRegex","numberFormatter","numberFormat","bind","resolveProperty","currentMatch","hasSub","mainMatch","subMatch","isBlock","expression","charAt","start","startInner","startingElseSection","elseBody","parts","startChar","char","valueAndFormat","isFloat","segment","decimals","decimalPoint","thousandsSep","lastIndex","fractionDigits","mantissa","exp","origDec","firstDecimals","toExponential","toFixed","minimumFractionDigits","maximumFractionDigits","useGrouping","hasSeparators","nf","NumberFormat","Core_Templating","ResizingMode_getStyle","ResizingMode_defined","ResizingMode","viewport","columnWidths","columnWidthUnits","getColumnWidth","column","vp","widthValue","minWidth","getMinWidth","tbody","tbodyElement","freeWidth","calculateOccupiedWidth","clientWidth","grid","enabledColumns","getWidthFromRatio","loadColumn","rawWidth","unitCode","loadColumns","columns","iEnd","rowsWidth","tableColumnEl","cells","htmlElement","headerColumnEl","header","getElPaddings","result","MIN_COLUMN_WIDTH","columnId","occupiedWidth","columnIds","unit","ColumnResizing_ResizingMode","ColumnResizing_AdjacentResizingMode","resize","resizer","draggedColumn","colW","columnStartWidth","nextCol","newW","newNextW","nextColumnStartWidth","ColumnResizing_IndependentResizingMode","colIndex","rightCol","rcWidth","getWidth","ColumnResizing_DistributedResizingMode","AbstractStrategy","adjacent","distributed","independent","initMode","modeName","rendering","resizing","ModeConstructor","ColumnResizing_ColumnResizing","DataModifier_addEvent","DataModifier_fireEvent","DataModifier_merge","DataModifier","benchmark","dataTable","results","modifier","execute","modifyTable","emit","iterations","on","times","startTime","endTime","performance","now","modify","table","eventDetail","Promise","resolve","reject","modified","clone","detail","registerType","DataModifierClass","Modifiers_DataModifier","setLength","asSubarray","deleteCount","removedAsSubarray","items","removed","Constructor","set","subarray","convertToNumber","useNaN","Data_ColumnUtils","DataTableCore_fireEvent","DataTableCore_objectEach","DataTableCore_uniqueKey","Data_DataTableCore","autoId","rowCount","versionTag","applyRowCount","deleteRows","rowIndex","getColumn","asReference","getColumns","getRow","setColumn","setColumns","silent","setRow","row","insert","indexRowCount","cellValue","addColumns","getModified","DataTable_splice","DataTable_setLength","DataTable_addEvent","DataTable_defined","DataTable_extend","DataTable_fireEvent","DataTable_isNumber","DataTable_uniqueKey","DataTable","metadata","skipColumns","tableOptions","tableClone","originalRowIndexes","localRowIndexes","deleteColumns","deletedColumns","modifiedColumns","deleteRowIndexReferences","deletedRows","modifiedRows","deletedCells","j","jEnd","rows","includes","getCell","getColumnIds","asBasicColumns","tableColumns","getLocalRowIndex","originalRowIndex","getModifier","getOriginalRowIndex","getRows","getRowCount","getRowIndexBy","rowIndexOffset","getRowObject","getRowObjects","i2","getVersionTag","hasColumns","hasRowWith","isFinite","changeColumnId","newColumnId","setCell","typeAsOriginal","tableModifier","tableColumn","ArrayConstructor","setModifier","promise","then","setOriginalRowIndexes","omitLocalRowIndexes","modifiedIndexes","originalIndex","setRows","DataConnector_addEvent","DataConnector_fireEvent","DataConnector_merge","DataConnector_pick","DataConnector","polling","_polling","dataTables","loaded","dataTableIndex","getTable","values","describeColumn","columnMeta","connector","describeColumns","pop","getColumnOrder","names","getSortedColumns","setColumnOrder","load","applyTableModifiers","tableOptionsArray","entries","dataModifierOptions","dataModifier","ModifierClass","startPolling","refreshTime","pollingController","AbortController","stopPolling","abort","initConverters","createConverter","parseData","converter","DataConnectorClass","Connectors_DataConnector","DataConverterUtils_isNumber","asNumber","decimalRegExp","decimalRegex","NaN","getDate","asDate","parseDate","asString","asBoolean","guessType","trimedValue","innerTrimedValue","floatValue","inside","getColumnsCollection","columnsArray","headers","Converters_DataConverterUtils","DataConverter_addEvent","DataConverter_fireEvent","DataConverter_merge","DataConverter","parser","alternative","getFullYear","mergedOptions","regExpPoint","RegExp","convertByType","typeMap","deduceDateFormat","limit","save","stable","thing","guessedFormat","madeDeduction","dateFormatProp","parsed","firstRowAsNames","DataConverterClass","Converters_DataConverter","DataCursor","stateMap","emittingRegister","listenerMap","addListener","tableId","state","listener","listeners","buildEmittingTag","firstRow","lastRow","emitCursor","event","lasting","cursors","getIndex","emittingTag","remitCursor","removeListener","toRange","defaultRange","MAX_VALUE","needle","columnNeedle","isEqual","cursorA","cursorB","isInRange","needleColumns","rangeColumns","every","toPositions","positions","rowEnd","columnEnd","Data_DataCursor","HighContrastMode_doc","HighContrastMode_win","HighContrastMode","isHighContrastModeActive","testDiv","backgroundImage","bi","currentStyle","matchMedia","classNamePrefix","rawClassNames","container","tableElement","captionElement","descriptionElement","theadElement","rowElement","rowEven","rowOdd","hoveredRow","columnElement","hoveredCell","hoveredColumn","syncedRow","syncedCell","syncedColumn","editedCell","mockedRow","rowsContentNowrap","virtualization","scrollableContent","headerCell","headerCellContainer","headerCellContent","headerCellFilterIcon","headerCellIcons","headerCellSortIcon","headerCellMenuIcon","headerRow","noData","noPadding","columnFirst","columnSortable","columnSortableIcon","columnSortedAsc","columnSortedDesc","resizableContent","resizerHandles","resizedColumn","creditsContainer","creditsText","creditsPro","visuallyHidden","lastHeaderCellInRow","loadingWrapper","loadingSpinner","loadingMessage","popup","button","icon","iconSearch","popupContent","columnFilterWrapper","toolbarButtonActiveIndicator","menuContainer","menuItem","menuHeader","menuHeaderCategory","menuHeaderName","menuItemIcon","menuItemLabel","menuDivider","clearFilterButton","paginationWrapper","paginationContainer","paginationPageInfo","paginationControls","paginationButton","paginationButtonDisabled","paginationFirstButton","paginationPrevButton","paginationNextButton","paginationLastButton","paginationPageButton","paginationPageButtonActive","paginationEllipsis","paginationMobileSelector","paginationMobilePageSizeSelector","paginationPageSizeContainer","paginationPageSizeSelect","noWidth","rightAlign","centerAlign","leftAlign","getClassName","classNameKey","Grid_Core_Globals","GridUtils_isObject","HTML_AST","makeHTMLElement","paramsKeys","assign","isHTML","makeDiv","sanitizeText","setHTMLContent","content","formattedNodes","innerText","createOptionsProxy","handler","defaults","targetValue","defaultValue","Proxy","deleteProperty","formatText","template","Core_GridUtils","conditionsMap","string","datetime","ColumnFiltering_defined","ColumnFiltering_fireEvent","ColumnFiltering","parseCamelCaseToReadable","readable","onKeyDown","contentOrder","filterSelect","filterInput","clearButton","direction","currentIndex","focus","dataType","applyFilter","renderFilteringContent","columnType","filtering","inputWrapper","renderConditionSelect","renderFilteringInput","renderClearButton","applyFilterFromForm","querying","filteringController","a11y","accessibility","filteringApplied","isFilteringApplied","getTime","addColumnFilterCondition","disableInputIfNeeded","updateRows","userFilteredColumn","rowsCount","placeholder","classList","eventType","eventTypes","conditions","langConditions","columnFilteringConditions","optionElement","filteringCondition","input","Accessibility_Accessibility","prepend","announcerElement","addHeaderCellDescription","thElement","description","announce","msg","assertive","announcerTimeout","remove","requestAnimationFrame","userSortedColumn","announcementsLang","sorting","announcements","ascending","descending","none","setColumnSortState","filteredColumnValues","parsedCondition","ColumnFiltering_ColumnFiltering","emptyFilterApplied","filterApplied","filterCleared","addHighContrast","highContrastMode","contentWrapper","setRowIndex","idx","setA11yOptions","tableEl","Core_Defaults_merge","Defaults","sortable","pagination","pageSizeChange","pageChange","sortAscending","sortDescending","setFilter","pageInfo","pageSizeLabel","firstPage","previousPage","nextPage","lastPage","pageNumber","ellipsis","contains","doesNotContain","equals","doesNotEqual","beginsWith","endsWith","empty","notEmpty","greaterThan","greaterThanOrEqualTo","lessThan","lessThanOrEqualTo","before","after","all","bufferSize","minVisibleRows","strictHeights","virtualizationThreshold","columnDefaults","inline","Core_Defaults","CellContent_CellContent","cell","TextContent_defined","TextContent","cellsDefaults","formatter","cellContent","defaultFormatsForDataTypes","isDefaultFormat","isDefaultFormatter","CellContent_TextContent","Column_defined","Column_fireEvent","Table_Column","_a","loadData","assumeDataType","columnOptionsMap","columnOptions","createCellContent","registerCell","hoveredColumnId","unregisterCell","columnResizing","setHoveredState","hovered","setSyncedState","synced","newOptions","render","updateColumn","Row_makeHTMLElement","Table_Row","createCell","rendered","virtualRows","Table_Cell","cellEvents","init","editMode","initEvents","onBlur","onFocus","onClick","setFocusAnchorCell","focusCursor","dir","changeFocusKeys","ArrowDown","ArrowUp","ArrowLeft","ArrowRight","stopPropagation","nextVerticalDir","localRowIndex","getVerticalPos","level","levels","extraRowIdx","nextRow","elementStyle","maxWidth","setCustomClassName","customClassName","newClassName","ColumnSorting_fireEvent","Actions_ColumnSorting","headerCellElement","toggle","sortingController","currentOrder","currentSorting","setOrder","consequents","asc","desc","addHeaderElementAttributes","col","sortingOptions","sortedAscClassName","sortedDescClassName","updateColumnOptions","validator","errorCell","setSorting","icons","menu","chevronRight","checkmark","upDownArrows","sortAsc","sortDesc","pathDefaults","createGridIcon","viewBox","childDefinition","Set","UI_SvgIcons","ToolbarButton_makeHTMLElement","UI_ToolbarButton","eventListenerDestroyers","isActive","toolbar","cfg","buttons","wrapper","buttonEl","setA11yAttributes","setIcon","refreshState","addEventListeners","ariaLabel","ariaExpanded","ariaControls","tb","setActive","active","renderActiveIndicator","setHighlighted","highlighted","removeEventListeners","clickHandler","activeIndicator","clickListener","destroyer","isFiltered","isSorted","ColumnToolbar_StateHelpers","SortToolbarButton_addEvent","ToolbarButtons_SortToolbarButton","Popup_makeHTMLElement","Popup_fireEvent","UI_Popup","isVisible","show","anchorElement","addHeader","label","category","renderContent","popups","hide","delete","isConnected","next","nextToAnchor","popupRect","parentRect","anchorRect","contentRect","shiftKey","onClickOutside","clickOutsideListener","keyDownListener","FilterPopup_merge","ColumnToolbar_FilterPopup","contentElement","FilterToolbarButton_addEvent","ToolbarButtons_FilterToolbarButton","ContextMenu_makeHTMLElement","UI_ContextMenu","ensureItemsContainer","itemsContainer","btn","addDivider","abs","ContextMenuButton_makeHTMLElement","UI_ContextMenuButton","contextMenu","liEl","iconEl","iconWrapper","spanEl","chevronEl","chevron","cm","setLabel","activeIcon","FilterMenuButton_addEvent","FilterMenuButton","langOptions","SortMenuButton_addEvent","MenuButtons_SortMenuButton","ColumnToolbar_MenuPopup","filteringEnabled","sortingEnabled","MenuToolbarButton_addEvent","ToolbarButtons_MenuToolbarButton","ColumnToolbar_makeHTMLElement","ColumnToolbar_getStyle","HeaderCellToolbar","renderFull","renderMinimized","columnResizeObserver","disconnect","ResizeObserver","observe","keyDownHandler","clearButtons","shouldBeMinimized","MINIMIZED_COLUMN_WIDTH","isMinimized","parentWidth","containerWidth","shouldBeCentered","isMenuCentered","HeaderCell_makeHTMLElement","HeaderCell_setHTMLContent","HeaderCell_createOptionsProxy","HeaderCell_fireEvent","HeaderCell_isString","Header_HeaderCell","columnsTree","superColumnOptions","tableHeader","headerCellOptions","headerContent","columnsResizer","renderColumnDragHandles","initColumnSorting","th","isResizing","originalEvent","isLastColumn","lastViewportColumn","HeaderRow_isString","Header_HeaderRow","setRowAttributes","headerOpt","columnsOnLevel","getColumnsAtLevel","columnOnLevel","colIsString","colSpan","dataColumn","setLastCellClass","lastCell","targetLevel","currentLevel","FilterCell_fireEvent","ColumnFiltering_FilterCell","trueHeader","ColumnFiltering_FilterRow","firstCell","Header_TableHeader","getRowLevels","maxDepth","scrollHorizontally","transform","TableCell_fireEvent","Body_TableCell","setValue","updateTable","updateDataTable","originalDataTable","rowTableIndex","presentationTable","onDblClick","onMouseOut","onMouseOver","onMouseDown","hoverRow","hoverColumn","Body_TableRow","translateY","updateRowAttributes","hoveredRowIndex","syncedRowIndex","setTranslateY","getDefaultTopOffset","rowsVirtualizer","defaultRowHeight","Actions_RowsVirtualizer","rowCursor","preventScroll","rowSettings","strictRowHeights","buffer","getDefaultRowHeight","initialRender","renderRows","adjustRowHeights","rerender","oldScrollTop","oldScrollLeft","scroll","rowHeight","lastScrollTop","adjustBottomRowHeights","rowsLn","rowTop","rowBottom","newHeight","isVirtualization","rowsPerPage","ceil","clientHeight","last","alwaysLastRow","tempRows","newRow","insertBefore","lastChild","columnIndex","focusAnchorCell","defaultH","translateBuffer","cellHeight","preLastRow","reflowRows","mockRow","ColumnsResizer_makeHTMLElement","ColumnsResizer_fireEvent","Actions_ColumnsResizer","handles","onDocumentMouseMove","draggedResizeHandle","pageX","dragStartX","onDocumentMouseUp","handle","addHandleListeners","handleListeners","eventName","Table_makeHTMLElement","Table_fireEvent","Table_getStyle","Table_defined","Table_Table","onTBodyFocus","onResize","onScroll","dgOptions","shouldVirtualizeRows","resizeObserver","setTbodyMinHeight","minHeight","userOptions","threshold","paginationPageSize","currentPageSize","focusedRowId","clampCurrentPage","oldRowsCount","shouldVirtualize","shouldRerender","updateControls","newRowIndex","scrollToRow","rowClass","firstRowTop","querySelectorAll","getRatioFromWidth","ratio","getStateMeta","applyStateMeta","meta","ChainModifier_addEvent","ChainModifier_fireEvent","ChainModifier_merge","ChainModifier","chain","optionsChain","modifierOptions","clear","modifiers","reverse","SortModifier_merge","SortModifier","compareFactory","customCompare","getRowReferences","rowReferences","orderByColumn","orderInColumn","compare","orderByColumnIndex","rowReference","originalIndexes","Querying_SortingController","shouldBeUpdated","createModifier","getSortingOptions","foundColumnId","columnIDs","foundOrder","loadOptions","stateFromOptions","initialSorting","FilterModifier_isFunction","FilterModifier_merge","FilterModifier","compile","op","operator","subs","cond","sub","ignoreCase","matchRow","indexes","FilteringController_isString","FilteringController","columnConditions","mapOptionsToFilter","isStringValue","stringifiedValue","nonValueConditions","newConditions","filteringOptions","updateModifier","clearColumnFiltering","RangeModifier_merge","RangeModifier","end","_","Querying_PaginationController","setRange","currentPage","rowsCountBeforePagination","pageSize","totalItems","reset","Querying_QueryingController","force","modifyData","willNotModify","getGroupedModifiers","interTable","groupedModifiers","chainModifier","dataTableCopy","paginationModifier","Icons","first","Pagination_makeHTMLElement","Pagination_formatText","Pagination_merge","Pagination_fireEvent","Pagination_isObject","Pagination_defined","Pagination","pageSizeSelector","controls","pageSizeOptions","totalPages","oldTotalItems","updateA11yRowsCount","startsWith","renderCustomContainer","renderFooter","renderPageInfo","renderControls","renderPageSizeSelector","updateButtonStates","tfootElement","tfootRow","customContainer","querySelector","pageInfoElement","updatePageInfo","startItem","endItem","pageInfoText","total","navContainer","firstLastButtons","renderFirstButton","previousNextButtons","renderPrevButton","pageButtons","renderPageNumbers","renderMobilePageSelector","renderNextButton","renderLastButton","updatePageNumbers","firstButton","goToPage","setButtonState","prevButton","nextButton","lastButton","pageNumbersContainer","maxPageNumbers","createPageButton","elements","isNearEnd","pagesToShow","maxPages","page","maxMiddlePages","halfMiddle","startPage","endPage","needFirstEllipsis","needLastEllipsis","createEllipsis","mobilePageSelector","ellipsisElement","pageSizeSelect","option","selected","setPageSize","renderMobilePageSizeSelector","newPageSize","langAccessibility","updateGridPagination","mobilePageSizeSelector","previousPageSize","ignoreDataRange","tBody","updatePage","isNextPage","newPage","mobileSelect","mobilePageSizeSelect","Grid_makeHTMLElement","Grid_setHTMLContent","Grid_extend","Grid_fireEvent","Grid_getStyle","Grid_merge","Grid_pick","Grid_isObject","Grid","renderTo","async","afterLoadCallback","initialContainerHeight","dataTableEventDestructors","loadUserOptions","Core_Utilities","grids","initContainers","initAccessibility","initPagination","loadDataTable","renderViewport","rawOptions","getElementById","oneToOne","setColumnOptionsOneToOne","setColumnOptions","columnOptionsArray","newColumnOptions","overwrite","colOptionsIndex","prevOptions","prevColumnOptions","indexInPrevOptions","findIndex","prev","resultOptions","firstRowIndex","syncRow","syncColumn","syncedColumnId","renderCaption","captionOptions","captionText","renderDescription","descriptionOptions","descriptionText","resetContentWrapper","viewportMeta","paginationPosition","getEnabledColumnIDs","renderTable","renderNoData","headerColumns","columnsIncluded","included","dt","onlyEnabledColumns","dgIndex","dg","showLoading","hideLoading","getData","onlyUserOptions","DataPool_addEvent","DataPool_fireEvent","DataPool_merge","DataPool","connectors","waiting","getConnector","connectorId","waitingList","connectorOptions","getConnectorOptions","loadConnector","getConnectorIds","connectorIds","isNewConnector","ConnectorClass","cancelPendingRequests","connectorKey","setConnectorOptions","connectorsOptions","connectorsInstances","GridEvents_addEvent","GridEvents_fireEvent","GridEvents_pushUnique","propagate","CellEditing_fireEvent","CellEditing","onInputBlur","stopEditing","editModeContent","getMainElement","onInputChange","finishAfterChange","onInputKeyDown","startEditing","submit","emContent","newValue","validationErrors","validate","initErrorBox","isValueChanged","mainElement","editModeRenderer","containerElement","classNames","cellEditingContainer","blurHandler","changeHandler","rules","validationRules","CellEditing_CellEditing","registerRenderer","CellRendererClass","CellRendering_CellRendererRegistry","CellEditingComposition_makeHTMLElement","CellEditingComposition_addEvent","CellEditingComposition_merge","CellEditingComposition_pushUnique","cellEditing","editable","started","edited","cancelled","notValid","initTable","afterColumnInit","createEditModeRenderer","editModeOptions","selectedEditModeRendererTypeName","renderer","viewRendererTypeName","editModeRendererTypeName","ViewRendererType","defaultEditingRenderer","onCellKeyDown","onCellDblClick","addEditableCellA11yHint","a11yEditableHint","editableLang","announceA11yUserEditedCell","msgType","compose","TableClass","TableCellClass","ColumnClass","afterEdit","CellEditing_CellEditingComposition","Credits_makeHTMLElement","Credits_setHTMLContent","Credits","textElement","renderAnchor","getHeight","Core_Credits","CreditsPro_setHTMLContent","Credits_CreditsPro","setContent","appendToContainer","CreditsProComposition_addEvent","CreditsProComposition_merge","CreditsProComposition_pushUnique","initCredits","GridClass","Credits_CreditsProComposition","DownloadURL_win","DownloadURL_doc","DownloadURL_error","domurl","URL","webkitURL","dataURLtoBlob","dataURL","atob","ArrayBuffer","Uint8Array","Blob","createObjectURL","binStr","buf","binary","charCodeAt","downloadURL","Exporting_downloadURL","getBlobFromContent","Exporting_getBlobFromContent","filename","nav","msSaveOrOpenBlob","isOldEdgeBrowser","safariBlob","download","click","open","location","MSBlobBuilder","blob","append","getBlob","getScript","scriptLocation","head","getElementsByTagName","script","src","onload","onerror","Exporting","downloadCSV","csv","getCSV","encodeURIComponent","getFilename","downloadJSON","json","getJSON","exporting","useLocalDecimalPoint","lineDelimiter","itemDelimiter","toLocaleString","csvRows","columnsCount","rowArray","exportNames","columnDataType","columnLength","cellVal","ExportingComposition_addEvent","ExportingComposition_pushUnique","initExporting","Export_Exporting","Export_ExportingComposition","Validator_setHTMLContent","Validator_defined","Validator","notifContainer","errors","isArrayString","rule","predefined","predefinedRules","ruleDef","err","validateFn","rulesRegistry","notification","editedCellError","notifError","notifAnimation","hideErrorBox","tableTop","offsetTop","tableHeight","errorCellTop","rawValue","ignoreCaseUnique","oldValue","rowValueString","columnData","unique","ColumnTypes_Validator","ValidatorComposition_addEvent","ValidatorComposition_pushUnique","initValidatorComposition","ColumnTypes_ValidatorComposition","CellRenderersComposition_addEvent","CellRenderersComposition_pushUnique","rendererType","Renderer","cellRenderer","CellRendering_CellRenderersComposition","PaginationComposition_addEvent","PaginationComposition_pushUnique","PaginationClass","beforePageChange","afterPageChange","beforePageSizeChange","afterPageSizeChange","Pagination_PaginationComposition","CellRendering_CellContentPro","CellRendering_CellRenderer","CSVConverter_merge","CSVConverter","dataTypes","parserOptions","beforeParse","lines","rowIt","startRow","endRow","guessedItemDelimiter","guessDelimiter","parseCSVRow","columnStr","rowNumber","startColumn","endColumn","guessedDecimalPoint","token","actualColumn","read","pushType","parsedNumber","initialValue","points","commas","guessed","potDelimiters","linesCount","inStr","cn","cl","CSVConnector_merge","CSVConnector_fireEvent","CSVConnector","enablePolling","dataRefreshRate","csvURL","fetch","signal","response","GoogleSheetsConverter_merge","GoogleSheetsConverter_uniqueKey","GoogleSheetsConverter","parseOptions","GoogleSheetsConnector_merge","GoogleSheetsConnector_pick","GoogleSheetsConnector_fireEvent","GoogleSheetsConnector","googleAPIKey","googleSpreadsheetKey","url","buildFetchURL","canParse","status","alphabet","buildQueryRange","googleSpreadsheetRange","apiKey","sheetKey","onlyColumnIds","pathname","searchParams","HTMLTableConverter_merge","HTMLTableConverter","tableElementID","export","useMultiLevelHeaders","htmlRows","tableHead","subcategories","subhead","getTableHeaderHTML","getCellHTMLFromValue","tableCaption","classes","attrs","topheaders","subheaders","useRowspanHeaders","cur","curColspan","rowspan","isRowEqual","row1","row2","tableHTML","HTMLElement","itemsLength","columnsInRow","columnsInRowLength","relativeColumnIndex","HTMLTableConnector_win","HTMLTableConnector_merge","HTMLTableConnector","htmlTable","tableID","JSONConverter_error","JSONConverter_isArray","JSONConverter_merge","JSONConverter_objectEach","JSONConverter","headerColumnIds","orientation","parseColumnsOrientation","parseRowsOrientation","convertItemToRow","rowObj","arrayWithPath","acc","JSONConnector_merge","JSONConnector_fireEvent","JSONConnector","dataUrl","InvertModifier_merge","InvertModifier","columnIdsColumn","TextRenderer_merge","TextRenderer","cellOptions","ContentTypes_CheckboxContent","onChange","tabIndex","checked","CheckboxRenderer_merge","CheckboxRenderer","ContentTypes_SelectContent","optionElements","SelectRenderer_merge","SelectRenderer","TextInputContent_defined","ContentTypes_TextInputContent","convertToInputValue","TextInputRenderer_merge","TextInputRenderer","ContentTypes_DateInputContentBase","getInputType","ContentTypes_DateInputContent","DateInputRenderer_merge","DateInputRenderer","ContentTypes_DateTimeInputContent","DateTimeInputRenderer_merge","DateTimeInputRenderer","ContentTypes_TimeInputContent","TimeInputRenderer_merge","TimeInputRenderer","SparklineContent_defined","SparklineContent_merge","SparklineContent","chartContainer","Chart","defaultChartOptions","getProcessedOptions","chartOptions","trimmedValue","skipClone","xAxis","visible","yAxis","marker","inactive","dataLabels","pie","slicedOffset","ContentTypes_SparklineContent","SparklineRenderer_merge","SparklineRenderer","useHighcharts","NumberInputContent_defined","ContentTypes_NumberInputContent","dblClickHandler","NumberInputRenderer_merge","NumberInputRenderer","G","Core_Grid","Templating","Table","Column","HeaderCell","TableCell","GridEvents","HeaderCellClass","CellContentPro","CellRenderer","Highcharts","sparkline"],"mappings":"CAQA,AARA;;;;;;;CAOC,EACA,SAA0CA,CAAI,CAAEC,CAAO,EACpD,AAAmB,UAAnB,OAAOC,SAAwB,AAAkB,UAAlB,OAAOC,OACvCH,CAAAA,EAAK,KAAQ,CAAGC,IAAUE,OAAOD,OAAO,CAAGF,EAAK,KAAQ,AAAD,EACjD,AAAkB,YAAlB,OAAOI,QAAyBA,OAAOC,GAAG,CACjDD,OAAO,gBAAiB,EAAE,CAAEH,GACrB,AAAmB,UAAnB,OAAOC,QACbF,CAAAA,EAAK,KAAQ,CAAGC,IAAUC,OAAO,CAAC,gBAAgB,CAAGF,EAAK,KAAQ,AAAD,EAEjE,CAAA,AAACA,EAAK,IAAO,EAAIA,EAAK,IAAO,CAACM,KAAK,CAAC,GAAI,CAAA,GAAQN,EAAK,IAAO,CAAGC,GAAQ,CAC1E,EAAG,AAAkB,aAAlB,OAAOM,OAAyB,IAAI,CAAGA,OAAQ,IAClC,AAAC,CAAA,KACP,iBA4mDNC,EA1mDM,IAgDNC,EA+mRAC,EA0QAC,EA8sDAC,EAqkCAC,EA0IAC,EA21BAC,EAyiCAC,EAqVAC,EAixNAC,EAwEAC,EAmbAC,EAkdAC,EA2UAC,EAiEAC,EA6EAC,EAttsBUC,EAAsB,CAAC,CAM1BA,CAAAA,EAAoBC,CAAC,CAAG,CAACxB,EAASyB,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,CAAC,CAACF,EAAYC,IAAQ,CAACH,EAAoBI,CAAC,CAAC3B,EAAS0B,IAC5EE,OAAOC,cAAc,CAAC7B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R,QAAQ,CAAGA,CAAO,CAElC,CACAM,EAAM/T,IAAI,CAACiU,EACf,EAEA,MADA,EAAE,CAACtO,OAAO,CAAC1J,IAAI,CAACO,EAAIqX,IAAI,CAACO,UAAU,CAAE,AAACC,GAAcP,EAAiBO,EAAW1B,IACzEA,CACX,CACJ,CAqBArB,GAAII,iBAAiB,CAAG,CACpB,MACA,gBACA,mBACA,gBACA,gBACA,cACA,aACA,kBACA,YACA,eACA,gBACA,uBACA,gBACA,QACA,YACA,QACA,UACA,KACA,KACA,IACA,WACA,KACA,KACA,OACA,cACA,cACA,gBACA,SACA,OACA,KACA,KACA,MACA,eACA,cACA,SACA,UACA,WACA,SACA,UACA,cACA,eACA,eACA,IACA,SACA,OACA,OACA,SACA,OACA,UACA,QACA,QACA,MACA,cACA,eACA,iBACA,eACA,SACA,QACA,UACA,WACA,cACA,SACA,aACA,cACA,aACA,aACA,QACA,OACA,SACA,QACA,IACA,KACA,KACA,aACA,IACA,KACA,KACA,SACH,CAgBDJ,GAAIK,iBAAiB,CAAG,CACpB,WACA,UACA,UACA,IACA,MACA,KACA,IACH,CAeDL,GAAIgC,WAAW,CAAG,CACd,QACA,IACA,OACA,IACA,KACA,SACA,UACA,SACA,WACA,OACA,KACA,OACA,MACA,KACA,KACA,KACA,sBACA,cACA,eACA,UACA,UACA,UACA,UACA,UACA,iBACA,UACA,cACA,eACA,WACA,SACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,IACA,MACA,KACA,iBACA,SACA,KACA,IACA,OACA,UACA,MACA,OACA,QACA,OACA,OACA,SACA,QACA,MACA,MACA,MACA,QACA,QACA,KACA,OACA,WACA,KACA,QACA,QACA,KACA,QACA,IACA,KACH,CACDhC,GAAID,SAAS,CAAGA,GA4BhBC,GAAI+B,mBAAmB,CAAG,CAAA,EA81C1B,GAAM,CAAExW,SAAAA,EAAQ,CAAEN,IAAK+X,EAAY,CAAE,CAAGzV,EAElC,CAAEqC,QAASqT,EAAgB,CAAEta,MAAOua,EA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