handsontable 14.0.0 → 14.1.0-next-ba8c2b0-20240110

Sign up to get free protection for your applications and to get access to all the features.
Files changed (350) hide show
  1. package/3rdparty/walkontable/src/calculator/index.js +11 -6
  2. package/3rdparty/walkontable/src/calculator/index.mjs +5 -3
  3. package/3rdparty/walkontable/src/calculator/renderAllColumns.js +50 -0
  4. package/3rdparty/walkontable/src/calculator/renderAllColumns.mjs +46 -0
  5. package/3rdparty/walkontable/src/calculator/renderAllRows.js +50 -0
  6. package/3rdparty/walkontable/src/calculator/renderAllRows.mjs +46 -0
  7. package/3rdparty/walkontable/src/calculator/viewportColumns.js +3 -124
  8. package/3rdparty/walkontable/src/calculator/viewportColumns.mjs +4 -126
  9. package/3rdparty/walkontable/src/calculator/viewportRows.js +3 -3
  10. package/3rdparty/walkontable/src/calculator/viewportRows.mjs +4 -5
  11. package/3rdparty/walkontable/src/cell/coords.d.ts +5 -5
  12. package/3rdparty/walkontable/src/cell/coords.js +2 -2
  13. package/3rdparty/walkontable/src/cell/coords.mjs +2 -2
  14. package/3rdparty/walkontable/src/cell/range.d.ts +5 -5
  15. package/3rdparty/walkontable/src/cell/range.js +16 -41
  16. package/3rdparty/walkontable/src/cell/range.mjs +16 -41
  17. package/3rdparty/walkontable/src/core/_base.js +2 -14
  18. package/3rdparty/walkontable/src/core/_base.mjs +2 -14
  19. package/3rdparty/walkontable/src/core/clone.js +2 -2
  20. package/3rdparty/walkontable/src/core/clone.mjs +2 -2
  21. package/3rdparty/walkontable/src/core/core.js +0 -2
  22. package/3rdparty/walkontable/src/core/core.mjs +0 -2
  23. package/3rdparty/walkontable/src/facade/core.js +0 -9
  24. package/3rdparty/walkontable/src/facade/core.mjs +0 -9
  25. package/3rdparty/walkontable/src/filter/column.js +2 -2
  26. package/3rdparty/walkontable/src/filter/column.mjs +2 -2
  27. package/3rdparty/walkontable/src/filter/row.js +2 -2
  28. package/3rdparty/walkontable/src/filter/row.mjs +2 -2
  29. package/3rdparty/walkontable/src/index.js +3 -4
  30. package/3rdparty/walkontable/src/index.mjs +1 -2
  31. package/3rdparty/walkontable/src/overlay/_base.js +2 -2
  32. package/3rdparty/walkontable/src/overlay/_base.mjs +2 -2
  33. package/3rdparty/walkontable/src/overlay/bottom.js +2 -2
  34. package/3rdparty/walkontable/src/overlay/bottom.mjs +2 -2
  35. package/3rdparty/walkontable/src/overlay/top.js +2 -2
  36. package/3rdparty/walkontable/src/overlay/top.mjs +2 -2
  37. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.js +2 -2
  38. package/3rdparty/walkontable/src/overlay/topInlineStartCorner.mjs +2 -2
  39. package/3rdparty/walkontable/src/overlays.js +2 -5
  40. package/3rdparty/walkontable/src/overlays.mjs +2 -6
  41. package/3rdparty/walkontable/src/renderer/_base.js +2 -2
  42. package/3rdparty/walkontable/src/renderer/_base.mjs +2 -2
  43. package/3rdparty/walkontable/src/renderer/cells.js +2 -2
  44. package/3rdparty/walkontable/src/renderer/cells.mjs +2 -2
  45. package/3rdparty/walkontable/src/renderer/colGroup.js +10 -0
  46. package/3rdparty/walkontable/src/renderer/colGroup.mjs +10 -0
  47. package/3rdparty/walkontable/src/renderer/rowHeaders.js +2 -2
  48. package/3rdparty/walkontable/src/renderer/rowHeaders.mjs +2 -2
  49. package/3rdparty/walkontable/src/renderer/rows.js +6 -5
  50. package/3rdparty/walkontable/src/renderer/rows.mjs +6 -5
  51. package/3rdparty/walkontable/src/renderer/table.js +2 -2
  52. package/3rdparty/walkontable/src/renderer/table.mjs +2 -2
  53. package/3rdparty/walkontable/src/scroll.js +4 -60
  54. package/3rdparty/walkontable/src/scroll.mjs +4 -60
  55. package/3rdparty/walkontable/src/selection/manager.js +0 -1
  56. package/3rdparty/walkontable/src/selection/manager.mjs +0 -1
  57. package/3rdparty/walkontable/src/settings.js +5 -2
  58. package/3rdparty/walkontable/src/settings.mjs +4 -2
  59. package/3rdparty/walkontable/src/table.js +2 -3
  60. package/3rdparty/walkontable/src/table.mjs +2 -3
  61. package/3rdparty/walkontable/src/utils/column.js +29 -14
  62. package/3rdparty/walkontable/src/utils/column.mjs +29 -14
  63. package/3rdparty/walkontable/src/utils/columnStretching.js +219 -0
  64. package/3rdparty/walkontable/src/utils/columnStretching.mjs +215 -0
  65. package/3rdparty/walkontable/src/utils/nodesPool.js +2 -2
  66. package/3rdparty/walkontable/src/utils/nodesPool.mjs +2 -2
  67. package/3rdparty/walkontable/src/utils/orderView/view.js +2 -2
  68. package/3rdparty/walkontable/src/utils/orderView/view.mjs +2 -2
  69. package/3rdparty/walkontable/src/utils/orderView/viewSize.js +2 -2
  70. package/3rdparty/walkontable/src/utils/orderView/viewSize.mjs +2 -2
  71. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.js +2 -2
  72. package/3rdparty/walkontable/src/utils/orderView/viewSizeSet.mjs +2 -2
  73. package/3rdparty/walkontable/src/utils/row.js +2 -2
  74. package/3rdparty/walkontable/src/utils/row.mjs +2 -2
  75. package/3rdparty/walkontable/src/viewport.js +22 -17
  76. package/3rdparty/walkontable/src/viewport.mjs +23 -18
  77. package/CHANGELOG.md +36 -0
  78. package/base.js +4 -2
  79. package/base.mjs +2 -2
  80. package/cellTypes/dropdownType/dropdownType.d.ts +6 -6
  81. package/cellTypes/dropdownType/dropdownType.js +4 -4
  82. package/cellTypes/dropdownType/dropdownType.mjs +4 -4
  83. package/core/focusCatcher/index.js +44 -6
  84. package/core/focusCatcher/index.mjs +44 -6
  85. package/core.d.ts +19 -19
  86. package/core.js +7 -12
  87. package/core.mjs +7 -12
  88. package/dataMap/dataMap.js +3 -2
  89. package/dataMap/dataMap.mjs +2 -2
  90. package/dataMap/dataSource.js +2 -2
  91. package/dataMap/dataSource.mjs +2 -2
  92. package/dataMap/metaManager/lazyFactoryMap.js +2 -2
  93. package/dataMap/metaManager/lazyFactoryMap.mjs +2 -2
  94. package/dataMap/metaManager/metaLayers/cellMeta.js +2 -2
  95. package/dataMap/metaManager/metaLayers/cellMeta.mjs +2 -2
  96. package/dataMap/metaManager/metaLayers/columnMeta.js +2 -2
  97. package/dataMap/metaManager/metaLayers/columnMeta.mjs +2 -2
  98. package/dataMap/metaManager/metaLayers/globalMeta.js +2 -2
  99. package/dataMap/metaManager/metaLayers/globalMeta.mjs +2 -2
  100. package/dataMap/metaManager/metaLayers/tableMeta.js +2 -2
  101. package/dataMap/metaManager/metaLayers/tableMeta.mjs +2 -2
  102. package/dataMap/metaManager/metaSchema.js +40 -25
  103. package/dataMap/metaManager/metaSchema.mjs +40 -25
  104. package/dataMap/metaManager/mods/dynamicCellMeta.js +2 -2
  105. package/dataMap/metaManager/mods/dynamicCellMeta.mjs +2 -2
  106. package/dataMap/metaManager/mods/extendMetaProperties.js +14 -2
  107. package/dataMap/metaManager/mods/extendMetaProperties.mjs +14 -2
  108. package/dist/handsontable.css +5 -5
  109. package/dist/handsontable.full.css +6 -6
  110. package/dist/handsontable.full.js +4835 -4508
  111. package/dist/handsontable.full.min.css +4 -4
  112. package/dist/handsontable.full.min.js +156 -154
  113. package/dist/handsontable.js +3441 -2825
  114. package/dist/handsontable.min.css +3 -3
  115. package/dist/handsontable.min.js +18 -15
  116. package/editorManager.js +5 -6
  117. package/editorManager.mjs +5 -6
  118. package/editors/autocompleteEditor/autocompleteEditor.js +2 -4
  119. package/editors/autocompleteEditor/autocompleteEditor.mjs +2 -4
  120. package/editors/baseEditor/baseEditor.d.ts +1 -1
  121. package/editors/baseEditor/baseEditor.js +2 -2
  122. package/editors/baseEditor/baseEditor.mjs +2 -2
  123. package/editors/dateEditor/dateEditor.d.ts +1 -1
  124. package/editors/dateEditor/dateEditor.js +29 -33
  125. package/editors/dateEditor/dateEditor.mjs +29 -33
  126. package/editors/handsontableEditor/handsontableEditor.js +0 -1
  127. package/editors/handsontableEditor/handsontableEditor.mjs +0 -1
  128. package/editors/selectEditor/selectEditor.js +8 -2
  129. package/editors/selectEditor/selectEditor.mjs +8 -2
  130. package/editors/textEditor/textEditor.js +2 -6
  131. package/editors/textEditor/textEditor.mjs +2 -6
  132. package/eventManager.js +4 -3
  133. package/eventManager.mjs +4 -3
  134. package/helpers/browser.js +5 -2
  135. package/helpers/browser.mjs +5 -2
  136. package/helpers/feature.js +10 -0
  137. package/helpers/feature.mjs +9 -0
  138. package/helpers/mixed.js +2 -2
  139. package/helpers/mixed.mjs +2 -2
  140. package/index.d.ts +12 -0
  141. package/package.json +13 -4
  142. package/pluginHooks.d.ts +10 -9
  143. package/pluginHooks.js +10 -8
  144. package/pluginHooks.mjs +7 -7
  145. package/plugins/autoColumnSize/autoColumnSize.d.ts +2 -2
  146. package/plugins/autoColumnSize/autoColumnSize.js +2 -2
  147. package/plugins/autoColumnSize/autoColumnSize.mjs +2 -2
  148. package/plugins/autoRowSize/autoRowSize.d.ts +3 -3
  149. package/plugins/autoRowSize/autoRowSize.js +2 -2
  150. package/plugins/autoRowSize/autoRowSize.mjs +2 -2
  151. package/plugins/autofill/autofill.js +2 -2
  152. package/plugins/autofill/autofill.mjs +2 -2
  153. package/plugins/base/base.js +2 -2
  154. package/plugins/base/base.mjs +2 -2
  155. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.d.ts +1 -1
  156. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.js +2 -2
  157. package/plugins/bindRowsWithHeaders/bindRowsWithHeaders.mjs +2 -2
  158. package/plugins/collapsibleColumns/collapsibleColumns.js +2 -2
  159. package/plugins/collapsibleColumns/collapsibleColumns.mjs +2 -2
  160. package/plugins/columnSorting/columnSorting.js +2 -2
  161. package/plugins/columnSorting/columnSorting.mjs +2 -2
  162. package/plugins/columnSorting/columnStatesManager.js +2 -2
  163. package/plugins/columnSorting/columnStatesManager.mjs +2 -2
  164. package/plugins/columnSummary/columnSummary.d.ts +11 -11
  165. package/plugins/columnSummary/columnSummary.js +20 -5
  166. package/plugins/columnSummary/columnSummary.mjs +20 -5
  167. package/plugins/columnSummary/endpoints.js +19 -5
  168. package/plugins/columnSummary/endpoints.mjs +19 -5
  169. package/plugins/comments/commentEditor.js +2 -2
  170. package/plugins/comments/commentEditor.mjs +2 -2
  171. package/plugins/comments/comments.js +2 -2
  172. package/plugins/comments/comments.mjs +2 -2
  173. package/plugins/comments/displaySwitch.js +2 -2
  174. package/plugins/comments/displaySwitch.mjs +2 -2
  175. package/plugins/contextMenu/commandExecutor.js +2 -2
  176. package/plugins/contextMenu/commandExecutor.mjs +2 -2
  177. package/plugins/contextMenu/contextMenu.js +2 -2
  178. package/plugins/contextMenu/contextMenu.mjs +2 -2
  179. package/plugins/contextMenu/itemsFactory.js +2 -2
  180. package/plugins/contextMenu/itemsFactory.mjs +2 -2
  181. package/plugins/contextMenu/menu/cursor.js +2 -2
  182. package/plugins/contextMenu/menu/cursor.mjs +2 -2
  183. package/plugins/contextMenu/menu/menu.js +2 -2
  184. package/plugins/contextMenu/menu/menu.mjs +2 -2
  185. package/plugins/copyPaste/copyPaste.js +40 -6
  186. package/plugins/copyPaste/copyPaste.mjs +40 -6
  187. package/plugins/customBorders/customBorders.d.ts +17 -8
  188. package/plugins/customBorders/customBorders.js +2 -7
  189. package/plugins/customBorders/customBorders.mjs +2 -7
  190. package/plugins/customBorders/utils.js +0 -1
  191. package/plugins/customBorders/utils.mjs +0 -1
  192. package/plugins/dragToScroll/dragToScroll.d.ts +8 -1
  193. package/plugins/dragToScroll/dragToScroll.js +18 -22
  194. package/plugins/dragToScroll/dragToScroll.mjs +18 -22
  195. package/plugins/dropdownMenu/dropdownMenu.js +2 -2
  196. package/plugins/dropdownMenu/dropdownMenu.mjs +2 -2
  197. package/plugins/exportFile/dataProvider.js +2 -2
  198. package/plugins/exportFile/dataProvider.mjs +2 -2
  199. package/plugins/exportFile/exportFile.d.ts +18 -3
  200. package/plugins/exportFile/types/_base.js +2 -2
  201. package/plugins/exportFile/types/_base.mjs +2 -2
  202. package/plugins/filters/component/_base.js +2 -2
  203. package/plugins/filters/component/_base.mjs +2 -2
  204. package/plugins/filters/component/actionBar.js +2 -2
  205. package/plugins/filters/component/actionBar.mjs +2 -2
  206. package/plugins/filters/component/condition.js +2 -2
  207. package/plugins/filters/component/condition.mjs +2 -2
  208. package/plugins/filters/component/operators.js +2 -2
  209. package/plugins/filters/component/operators.mjs +2 -2
  210. package/plugins/filters/component/value.js +2 -2
  211. package/plugins/filters/component/value.mjs +2 -2
  212. package/plugins/filters/conditionCollection.js +2 -2
  213. package/plugins/filters/conditionCollection.mjs +2 -2
  214. package/plugins/filters/conditionUpdateObserver.js +2 -2
  215. package/plugins/filters/conditionUpdateObserver.mjs +2 -2
  216. package/plugins/filters/dataFilter.js +2 -2
  217. package/plugins/filters/dataFilter.mjs +2 -2
  218. package/plugins/filters/filters.js +2 -2
  219. package/plugins/filters/filters.mjs +2 -2
  220. package/plugins/filters/ui/_base.js +2 -2
  221. package/plugins/filters/ui/_base.mjs +2 -2
  222. package/plugins/filters/ui/radioInput.js +1 -1
  223. package/plugins/filters/ui/radioInput.mjs +1 -1
  224. package/plugins/formulas/formulas.d.ts +1 -0
  225. package/plugins/formulas/formulas.js +2 -4
  226. package/plugins/formulas/formulas.mjs +2 -4
  227. package/plugins/formulas/indexSyncer/axisSyncer.js +0 -1
  228. package/plugins/formulas/indexSyncer/axisSyncer.mjs +0 -1
  229. package/plugins/manualColumnMove/ui/_base.js +2 -2
  230. package/plugins/manualColumnMove/ui/_base.mjs +2 -2
  231. package/plugins/manualColumnResize/manualColumnResize.js +6 -2
  232. package/plugins/manualColumnResize/manualColumnResize.mjs +6 -2
  233. package/plugins/manualRowMove/ui/_base.js +2 -2
  234. package/plugins/manualRowMove/ui/_base.mjs +2 -2
  235. package/plugins/manualRowResize/manualRowResize.js +7 -3
  236. package/plugins/manualRowResize/manualRowResize.mjs +7 -3
  237. package/plugins/mergeCells/calculations/autofill.js +2 -2
  238. package/plugins/mergeCells/calculations/autofill.mjs +2 -2
  239. package/plugins/mergeCells/calculations/selection.js +2 -2
  240. package/plugins/mergeCells/calculations/selection.mjs +2 -2
  241. package/plugins/mergeCells/cellCoords.js +2 -2
  242. package/plugins/mergeCells/cellCoords.mjs +2 -2
  243. package/plugins/mergeCells/cellsCollection.js +2 -2
  244. package/plugins/mergeCells/cellsCollection.mjs +2 -2
  245. package/plugins/mergeCells/mergeCells.js +2 -4
  246. package/plugins/mergeCells/mergeCells.mjs +2 -4
  247. package/plugins/multiColumnSorting/multiColumnSorting.js +2 -2
  248. package/plugins/multiColumnSorting/multiColumnSorting.mjs +2 -2
  249. package/plugins/multipleSelectionHandles/multipleSelectionHandles.d.ts +8 -1
  250. package/plugins/multipleSelectionHandles/multipleSelectionHandles.js +2 -2
  251. package/plugins/multipleSelectionHandles/multipleSelectionHandles.mjs +2 -2
  252. package/plugins/nestedHeaders/nestedHeaders.js +2 -3
  253. package/plugins/nestedHeaders/nestedHeaders.mjs +2 -3
  254. package/plugins/nestedHeaders/stateManager/headersTree.js +0 -1
  255. package/plugins/nestedHeaders/stateManager/headersTree.mjs +0 -1
  256. package/plugins/nestedHeaders/stateManager/sourceSettings.js +1 -1
  257. package/plugins/nestedHeaders/stateManager/sourceSettings.mjs +1 -1
  258. package/plugins/nestedHeaders/utils/ghostTable.js +2 -2
  259. package/plugins/nestedHeaders/utils/ghostTable.mjs +2 -2
  260. package/plugins/nestedRows/data/dataManager.js +2 -2
  261. package/plugins/nestedRows/data/dataManager.mjs +2 -2
  262. package/plugins/nestedRows/nestedRows.js +2 -2
  263. package/plugins/nestedRows/nestedRows.mjs +2 -2
  264. package/plugins/nestedRows/ui/_base.js +2 -2
  265. package/plugins/nestedRows/ui/_base.mjs +2 -2
  266. package/plugins/nestedRows/ui/contextMenu.js +2 -2
  267. package/plugins/nestedRows/ui/contextMenu.mjs +2 -2
  268. package/plugins/nestedRows/utils/rowMoveController.js +2 -2
  269. package/plugins/nestedRows/utils/rowMoveController.mjs +2 -2
  270. package/plugins/persistentState/persistentState.d.ts +5 -2
  271. package/plugins/persistentState/persistentState.js +2 -2
  272. package/plugins/persistentState/persistentState.mjs +2 -2
  273. package/plugins/persistentState/storage.js +2 -2
  274. package/plugins/persistentState/storage.mjs +2 -2
  275. package/plugins/search/search.js +2 -2
  276. package/plugins/search/search.mjs +2 -2
  277. package/plugins/touchScroll/touchScroll.js +2 -2
  278. package/plugins/touchScroll/touchScroll.mjs +2 -2
  279. package/plugins/trimRows/trimRows.js +2 -2
  280. package/plugins/trimRows/trimRows.mjs +2 -2
  281. package/plugins/undoRedo/undoRedo.d.ts +3 -0
  282. package/plugins/undoRedo/undoRedo.js +64 -7
  283. package/plugins/undoRedo/undoRedo.mjs +64 -7
  284. package/renderers/autocompleteRenderer/autocompleteRenderer.d.ts +1 -1
  285. package/renderers/autocompleteRenderer/autocompleteRenderer.js +0 -1
  286. package/renderers/autocompleteRenderer/autocompleteRenderer.mjs +0 -1
  287. package/renderers/baseRenderer/baseRenderer.d.ts +1 -1
  288. package/renderers/checkboxRenderer/checkboxRenderer.d.ts +1 -1
  289. package/renderers/checkboxRenderer/checkboxRenderer.js +0 -2
  290. package/renderers/checkboxRenderer/checkboxRenderer.mjs +0 -2
  291. package/renderers/dateRenderer/dateRenderer.d.ts +1 -1
  292. package/renderers/dropdownRenderer/dropdownRenderer.d.ts +5 -0
  293. package/renderers/dropdownRenderer/dropdownRenderer.js +23 -0
  294. package/renderers/dropdownRenderer/dropdownRenderer.mjs +19 -0
  295. package/renderers/dropdownRenderer/index.d.ts +1 -0
  296. package/renderers/dropdownRenderer/index.js +6 -0
  297. package/renderers/dropdownRenderer/index.mjs +1 -0
  298. package/renderers/handsontableRenderer/handsontableRenderer.d.ts +1 -1
  299. package/renderers/htmlRenderer/htmlRenderer.d.ts +1 -1
  300. package/renderers/index.d.ts +3 -0
  301. package/renderers/index.js +12 -0
  302. package/renderers/index.mjs +7 -1
  303. package/renderers/numericRenderer/numericRenderer.d.ts +1 -1
  304. package/renderers/passwordRenderer/passwordRenderer.d.ts +1 -1
  305. package/renderers/selectRenderer/selectRenderer.d.ts +1 -1
  306. package/renderers/textRenderer/textRenderer.d.ts +1 -1
  307. package/renderers/timeRenderer/timeRenderer.d.ts +1 -1
  308. package/selection/highlight/highlight.js +2 -3
  309. package/selection/highlight/highlight.mjs +2 -3
  310. package/selection/highlight/visualSelection.js +2 -2
  311. package/selection/highlight/visualSelection.mjs +2 -2
  312. package/selection/range.js +2 -2
  313. package/selection/range.mjs +2 -2
  314. package/selection/selection.js +2 -2
  315. package/selection/selection.mjs +2 -2
  316. package/settings.d.ts +27 -14
  317. package/tableView.js +4 -5
  318. package/tableView.mjs +4 -5
  319. package/translations/indexMapper.d.ts +1 -1
  320. package/translations/indexMapper.js +4 -3
  321. package/translations/indexMapper.mjs +2 -2
  322. package/translations/mapCollections/aggregatedCollection.js +2 -2
  323. package/translations/mapCollections/aggregatedCollection.mjs +2 -2
  324. package/translations/mapCollections/mapCollection.js +2 -2
  325. package/translations/mapCollections/mapCollection.mjs +2 -2
  326. package/translations/maps/indexMap.js +2 -2
  327. package/translations/maps/indexMap.mjs +2 -2
  328. package/translations/maps/linkedPhysicalIndexToValueMap.js +2 -2
  329. package/translations/maps/linkedPhysicalIndexToValueMap.mjs +2 -2
  330. package/utils/dataStructures/linkedList.js +2 -2
  331. package/utils/dataStructures/linkedList.mjs +2 -2
  332. package/utils/dataStructures/tree.js +2 -2
  333. package/utils/dataStructures/tree.mjs +2 -2
  334. package/utils/ghostTable.js +2 -2
  335. package/utils/ghostTable.mjs +2 -2
  336. package/utils/interval.js +2 -2
  337. package/utils/interval.mjs +2 -2
  338. package/utils/samplesGenerator.js +2 -2
  339. package/utils/samplesGenerator.mjs +2 -2
  340. package/validators/dropdownValidator/dropdownValidator.d.ts +5 -0
  341. package/validators/dropdownValidator/dropdownValidator.js +18 -0
  342. package/validators/dropdownValidator/dropdownValidator.mjs +14 -0
  343. package/validators/dropdownValidator/index.d.ts +1 -0
  344. package/validators/dropdownValidator/index.js +6 -0
  345. package/validators/dropdownValidator/index.mjs +1 -0
  346. package/validators/index.d.ts +2 -0
  347. package/validators/index.js +4 -0
  348. package/validators/index.mjs +3 -1
  349. package/validators/timeValidator/timeValidator.js +0 -1
  350. package/validators/timeValidator/timeValidator.mjs +0 -1
@@ -25,11 +25,14 @@
25
25
  * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM
26
26
  * USE OR INABILITY TO USE THIS SOFTWARE.
27
27
  *
28
- * Version: 14.0.0
29
- * Release date: 30/11/2023 (built at 30/11/2023 10:11:12)
28
+ * Version: 14.1.0-next-ba8c2b0-20240110
29
+ * Release date: 16/01/2024 (built at 10/01/2024 08:51:12)
30
30
  */
31
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("dompurify"),require("pikaday"),require("moment"),require("numbro")):"function"==typeof define&&define.amd?define("Handsontable",["dompurify","pikaday","moment","numbro"],t):"object"==typeof exports?exports.Handsontable=t(require("dompurify"),require("pikaday"),require("moment"),require("numbro")):e.Handsontable=t(e.DOMPurify,e.Pikaday,e.moment,e.numbro)}("undefined"!=typeof self?self:this,((e,t,o,s)=>(()=>{var i={2964:()=>{},54894:(e,t)=>{"use strict";t.__esModule=!0,t.parse=function(e){const t=[[""]];if(0===e.length)return t;let r,n=0,a=0;for(;e.length>0&&r!==e.length;)if(r=e.length,e.match(i))e=e.replace(i,""),n+=1,t[a][n]="";else if(e.match(o))e=e.replace(o,""),n=0,a+=1,t[a]=[""];else{let o="";if(e.startsWith('"')){let t=0,s=!0;for(;s;){const i=e.slice(0,1);'"'===i&&(t+=1),o+=i,(0===(e=e.slice(1)).length||e.match(/^[\t\r\n]/)&&t%2==0)&&(s=!1)}o=o.replace(/^"/,"").replace(/"$/,"").replace(/["]*/g,(e=>new Array(Math.floor(e.length/2)).fill('"').join("")))}else{const t=e.match(s);o=t?t[0]:"",e=e.slice(o.length)}t[a][n]=o}return t},t.stringify=function(e){let t,o,s,i,r,n="";for(t=0,o=e.length;t<o;t+=1){for(i=e[t].length,s=0;s<i;s+=1)s>0&&(n+="\t"),r=e[t][s],"string"==typeof r?r.indexOf("\n")>-1?n+=`"${r.replace(/"/g,'""')}"`:n+=r:n+=null==r?"":r;t!==o-1&&(n+="\n")}return n};const o=/^(\r\n|\n\r|\r|\n)/,s=/^[^\t\r\n]+/,i=/^\t/},29270:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(54894);t.parse=s.parse,t.stringify=s.stringify},17137:(e,t)=>{"use strict";t.__esModule=!0;t.RENDER_TYPE=1,t.FULLY_VISIBLE_TYPE=2,t.PARTIALLY_VISIBLE_TYPE=3},46003:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i={ViewportColumnsCalculator:!0,ViewportRowsCalculator:!0},r=s(o(65658));t.ViewportColumnsCalculator=r.default;var n=s(o(36107));t.ViewportRowsCalculator=n.default;var a=o(17137);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||(t[e]=a[e]))}))},65658:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517),o(51344);var i=s(o(93231)),r=s(o(42538)),n=s(o(48427)),a=o(17137);function l(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var h=new WeakMap,u=new WeakMap;class d{static get DEFAULT_WIDTH(){return 50}constructor(e){(0,i.default)(this,"count",0),(0,i.default)(this,"startColumn",null),(0,i.default)(this,"endColumn",null),(0,i.default)(this,"startPosition",null),(0,i.default)(this,"isVisibleInTrimmingContainer",!1),(0,i.default)(this,"stretchAllRatio",0),(0,i.default)(this,"stretchLastWidth",0),l(this,h,{writable:!0,value:0}),(0,i.default)(this,"needVerifyLastColumnWidth",!0),(0,i.default)(this,"stretchAllColumnsWidth",[]),l(this,u,{writable:!0,value:void 0}),(0,n.default)(this,u,e),"function"!=typeof(0,r.default)(this,u).stretchingColumnWidthFn&&((0,r.default)(this,u).stretchingColumnWidthFn=e=>e),this.calculate()}calculate(){const{calculationType:e,overrideFn:t,scrollOffset:o,totalColumns:s,viewportWidth:i}=(0,r.default)(this,u),n=Math.max((0,r.default)(this,u).scrollOffset,0),l=n>0?i+1:i;let h=0,d=!0;const c=[];let g,f=0,p=0;for(let t=0;t<s;t++)if(g=this._getColumnWidth(t),h<=n&&e!==a.FULLY_VISIBLE_TYPE&&(this.startColumn=t,f=g),h>=n&&h+(e===a.FULLY_VISIBLE_TYPE?g:0)<=n+l&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=t,f=g),this.endColumn=t),c.push(h),h+=g,p=g,e!==a.FULLY_VISIBLE_TYPE&&(this.endColumn=t),h>=n+i){d=!1;break}const m=o+i-l,w=e===a.FULLY_VISIBLE_TYPE?0:p,C=e===a.FULLY_VISIBLE_TYPE?f:0;if(m<-1*(0,r.default)(this,u).inlineStartOffset||o>c.at(-1)+w||-1*(0,r.default)(this,u).scrollOffset-(0,r.default)(this,u).viewportWidth>-1*C?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,this.endColumn===s-1&&d)for(this.startColumn=this.endColumn;this.startColumn>0;){const t=c[this.endColumn]+g-c[this.startColumn-1];if((t<=i||e!==a.FULLY_VISIBLE_TYPE)&&(this.startColumn-=1),t>i)break}e===a.RENDER_TYPE&&null!==this.startColumn&&t&&t(this),this.startPosition=c[this.startColumn],void 0===this.startPosition&&(this.startPosition=null),s<this.endColumn&&(this.endColumn=s-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}refreshStretching(e){if("none"===(0,r.default)(this,u).stretchMode)return;let t=e;(0,n.default)(this,h,t);const o=(0,r.default)(this,u).totalColumns;let s=0;for(let e=0;e<o;e++){const o=this._getColumnWidth(e),i=(0,r.default)(this,u).stretchingColumnWidthFn(void 0,e);"number"==typeof i?t-=i:s+=o}const i=t-s;if("all"===(0,r.default)(this,u).stretchMode&&i>0)this.stretchAllRatio=t/s,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===(0,r.default)(this,u).stretchMode&&t!==1/0){const e=this._getColumnWidth(o-1),t=i+e;this.stretchLastWidth=t>=0?t:e}}getStretchedColumnWidth(e,t){let o=null;return"all"===(0,r.default)(this,u).stretchMode&&0!==this.stretchAllRatio?o=this._getStretchedAllColumnWidth(e,t):"last"===(0,r.default)(this,u).stretchMode&&0!==this.stretchLastWidth&&(o=this._getStretchedLastColumnWidth(e)),o}_getStretchedAllColumnWidth(e,t){let o=0;const s=(0,r.default)(this,u).totalColumns;if(!this.stretchAllColumnsWidth[e]){const o=Math.round(t*this.stretchAllRatio),s=(0,r.default)(this,u).stretchingColumnWidthFn(o,e);this.stretchAllColumnsWidth[e]=void 0===s?o:isNaN(s)?this._getColumnWidth(e):s}if(this.stretchAllColumnsWidth.length===s&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(let e=0;e<this.stretchAllColumnsWidth.length;e++)o+=this.stretchAllColumnsWidth[e];o!==(0,r.default)(this,h)&&(this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length-1]+=(0,r.default)(this,h)-o)}return this.stretchAllColumnsWidth[e]}_getStretchedLastColumnWidth(e){return e===(0,r.default)(this,u).totalColumns-1?this.stretchLastWidth:null}_getColumnWidth(e){let t=(0,r.default)(this,u).columnWidthFn(e);return isNaN(t)&&(t=d.DEFAULT_WIDTH),t}}t.default=d},36107:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517),o(51344);var i=s(o(93231)),r=s(o(42538)),n=s(o(48427)),a=o(17137);function l(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var h=new WeakMap;class u{static get DEFAULT_HEIGHT(){return 23}constructor(e){(0,i.default)(this,"count",0),(0,i.default)(this,"startRow",null),(0,i.default)(this,"endRow",null),(0,i.default)(this,"startPosition",null),(0,i.default)(this,"isVisibleInTrimmingContainer",!1),l(this,h,{writable:!0,value:void 0}),(0,n.default)(this,h,e),this.calculate()}calculate(){const{calculationType:e,overrideFn:t,rowHeightFn:o,scrollOffset:s,totalRows:i,viewportHeight:n}=(0,r.default)(this,h),l=Math.max((0,r.default)(this,h).scrollOffset,0),d=(0,r.default)(this,h).horizontalScrollbarHeight||0;let c=0,g=!0;const f=[];let p,m=0,w=0;for(let t=0;t<i;t++)if(p=o(t),isNaN(p)&&(p=u.DEFAULT_HEIGHT),c<=l&&e!==a.FULLY_VISIBLE_TYPE&&(this.startRow=t,m=p),c>=l&&c+(e===a.FULLY_VISIBLE_TYPE?p:0)<=l+n-d&&(null===this.startRow&&(this.startRow=t,m=p),this.endRow=t),f.push(c),c+=p,w=p,e!==a.FULLY_VISIBLE_TYPE&&(this.endRow=t),c>=l+n-d){g=!1;break}const C=s+n-d,v=e===a.FULLY_VISIBLE_TYPE?m:0,y=e===a.FULLY_VISIBLE_TYPE?0:w;if(C<v||s>f.at(-1)+y?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,this.endRow===i-1&&g)for(this.startRow=this.endRow;this.startRow>0;){const t=f[this.endRow]+p-f[this.startRow-1];if((t<=n-d||e!==a.FULLY_VISIBLE_TYPE)&&(this.startRow-=1),t>=n-d)break}e===a.RENDER_TYPE&&null!==this.startRow&&t&&t(this),this.startPosition=f[this.startRow],void 0===this.startPosition&&(this.startPosition=null),i<this.endRow&&(this.endRow=i-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}t.default=u},82325:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=s(o(42538)),n=s(o(48427));function a(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var l=new WeakMap;class h{constructor(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,i.default)(this,"row",null),(0,i.default)(this,"col",null),a(this,l,{writable:!0,value:!1}),(0,n.default)(this,l,o),void 0!==e&&void 0!==t&&(this.row=e,this.col=t)}isValid(e){const{countRows:t,countCols:o,countRowHeaders:s,countColHeaders:i}={countRows:0,countCols:0,countRowHeaders:0,countColHeaders:0,...e};return!(!Number.isInteger(this.row)||!Number.isInteger(this.col))&&(!(this.row<-i||this.col<-s)&&!(this.row>=t||this.col>=o))}isEqual(e){return e===this||this.row===e.row&&this.col===e.col}isHeader(){return!this.isCell()}isCell(){return this.row>=0&&this.col>=0}isRtl(){return(0,r.default)(this,l)}isSouthEastOf(e){return this.row>=e.row&&((0,r.default)(this,l)?this.col<=e.col:this.col>=e.col)}isNorthWestOf(e){return this.row<=e.row&&((0,r.default)(this,l)?this.col>=e.col:this.col<=e.col)}isSouthWestOf(e){return this.row>=e.row&&((0,r.default)(this,l)?this.col>=e.col:this.col<=e.col)}isNorthEastOf(e){return this.row<=e.row&&((0,r.default)(this,l)?this.col<=e.col:this.col>=e.col)}normalize(){return this.row=null===this.row?this.row:Math.max(this.row,0),this.col=null===this.col?this.col:Math.max(this.col,0),this}assign(e){return Number.isInteger(null==e?void 0:e.row)&&(this.row=e.row),Number.isInteger(null==e?void 0:e.col)&&(this.col=e.col),e instanceof h&&(0,n.default)(this,l,e.isRtl()),this}clone(){return new h(this.row,this.col,(0,r.default)(this,l))}toObject(){return{row:this.row,col:this.col}}}t.default=h},2961:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=s(o(42538)),n=s(o(48427)),a=s(o(82325));function l(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var h=new WeakMap;class u{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];(0,i.default)(this,"highlight",null),(0,i.default)(this,"from",null),(0,i.default)(this,"to",null),l(this,h,{writable:!0,value:!1}),this.highlight=e.clone(),this.from=t.clone(),this.to=o.clone(),(0,n.default)(this,h,s)}setHighlight(e){return this.highlight=e.clone(),this}setFrom(e){return this.from=e.clone(),this}setTo(e){return this.to=e.clone(),this}isValid(e){return this.from.isValid(e)&&this.to.isValid(e)}isSingle(){return this.isSingleCell()||this.isSingleHeader()}isSingleCell(){return this.from.row>=0&&this.from.row===this.to.row&&this.from.col>=0&&this.from.col===this.to.col}isSingleHeader(){return(this.from.row<0||this.from.col<0)&&this.from.row===this.to.row&&this.from.col===this.to.col}containsHeaders(){return this.from.isHeader()||this.to.isHeader()}getOuterHeight(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1}getOuterWidth(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1}getHeight(){if(this.from.row<0&&this.to.row<0)return 0;const e=Math.max(this.from.row,0),t=Math.max(this.to.row,0);return Math.max(e,t)-Math.min(e,t)+1}getWidth(){if(this.from.col<0&&this.to.col<0)return 0;const e=Math.max(this.from.col,0),t=Math.max(this.to.col,0);return Math.max(e,t)-Math.min(e,t)+1}getCellsCount(){return this.getWidth()*this.getHeight()}includes(e){const{row:t,col:o}=e,s=this.getOuterTopStartCorner(),i=this.getOuterBottomEndCorner();return s.row<=t&&i.row>=t&&s.col<=o&&i.col>=o}includesRange(e){return this.includes(e.getOuterTopStartCorner())&&this.includes(e.getOuterBottomEndCorner())}isEqual(e){return Math.min(this.from.row,this.to.row)===Math.min(e.from.row,e.to.row)&&Math.max(this.from.row,this.to.row)===Math.max(e.from.row,e.to.row)&&Math.min(this.from.col,this.to.col)===Math.min(e.from.col,e.to.col)&&Math.max(this.from.col,this.to.col)===Math.max(e.from.col,e.to.col)}overlaps(e){return e.isSouthEastOf(this.getOuterTopLeftCorner())&&e.isNorthWestOf(this.getOuterBottomRightCorner())}isSouthEastOf(e){return this.getOuterTopLeftCorner().isSouthEastOf(e)||this.getOuterBottomRightCorner().isSouthEastOf(e)}isNorthWestOf(e){return this.getOuterTopLeftCorner().isNorthWestOf(e)||this.getOuterBottomRightCorner().isNorthWestOf(e)}isOverlappingHorizontally(e){return this.getOuterTopRightCorner().col>=e.getOuterTopLeftCorner().col&&this.getOuterTopRightCorner().col<=e.getOuterTopRightCorner().col||this.getOuterTopLeftCorner().col<=e.getOuterTopRightCorner().col&&this.getOuterTopLeftCorner().col>=e.getOuterTopLeftCorner().col}isOverlappingVertically(e){return this.getOuterBottomRightCorner().row>=e.getOuterTopRightCorner().row&&this.getOuterBottomRightCorner().row<=e.getOuterBottomRightCorner().row||this.getOuterTopRightCorner().row<=e.getOuterBottomRightCorner().row&&this.getOuterTopRightCorner().row>=e.getOuterTopRightCorner().row}expand(e){const t=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner();return(e.row<t.row||e.col<t.col||e.row>o.row||e.col>o.col)&&(this.from=this._createCellCoords(Math.min(t.row,e.row),Math.min(t.col,e.col)),this.to=this._createCellCoords(Math.max(o.row,e.row),Math.max(o.col,e.col)),!0)}expandByRange(e){if(this.includesRange(e)||!this.overlaps(e))return!1;const t=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner(),s=this.getDirection(),i=e.getOuterTopStartCorner(),r=e.getOuterBottomEndCorner(),n=Math.min(t.row,i.row),a=Math.min(t.col,i.col),l=Math.max(o.row,r.row),h=Math.max(o.col,r.col),u=this._createCellCoords(n,a),d=this._createCellCoords(l,h);return this.from=u,this.to=d,this.setDirection(s),this.highlight.row===this.getOuterBottomRightCorner().row&&"N-S"===this.getVerticalDirection()&&this.flipDirectionVertically(),this.highlight.col===this.getOuterTopRightCorner().col&&"W-E"===this.getHorizontalDirection()&&this.flipDirectionHorizontally(),!0}getDirection(){return this.from.isNorthWestOf(this.to)?"NW-SE":this.from.isNorthEastOf(this.to)?"NE-SW":this.from.isSouthEastOf(this.to)?"SE-NW":this.from.isSouthWestOf(this.to)?"SW-NE":void 0}setDirection(e){switch(e){case"NW-SE":[this.from,this.to]=[this.getOuterTopLeftCorner(),this.getOuterBottomRightCorner()];break;case"NE-SW":[this.from,this.to]=[this.getOuterTopRightCorner(),this.getOuterBottomLeftCorner()];break;case"SE-NW":[this.from,this.to]=[this.getOuterBottomRightCorner(),this.getOuterTopLeftCorner()];break;case"SW-NE":[this.from,this.to]=[this.getOuterBottomLeftCorner(),this.getOuterTopRightCorner()]}}getVerticalDirection(){return["NE-SW","NW-SE"].indexOf(this.getDirection())>-1?"N-S":"S-N"}getHorizontalDirection(){return["NW-SE","SW-NE"].indexOf(this.getDirection())>-1?"W-E":"E-W"}flipDirectionVertically(){switch(this.getDirection()){case"NW-SE":this.setDirection("SW-NE");break;case"NE-SW":this.setDirection("SE-NW");break;case"SE-NW":this.setDirection("NE-SW");break;case"SW-NE":this.setDirection("NW-SE")}}flipDirectionHorizontally(){switch(this.getDirection()){case"NW-SE":this.setDirection("NE-SW");break;case"NE-SW":this.setDirection("NW-SE");break;case"SE-NW":this.setDirection("SW-NE");break;case"SW-NE":this.setDirection("SE-NW")}}getTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getTopLeftCorner(){return(0,r.default)(this,h)?this.getTopEndCorner():this.getTopStartCorner()}getBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getBottomRightCorner(){return(0,r.default)(this,h)?this.getBottomStartCorner():this.getBottomEndCorner()}getTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getTopRightCorner(){return(0,r.default)(this,h)?this.getTopStartCorner():this.getTopEndCorner()}getBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getBottomLeftCorner(){return(0,r.default)(this,h)?this.getBottomEndCorner():this.getBottomStartCorner()}getOuterTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterTopLeftCorner(){return(0,r.default)(this,h)?this.getOuterTopEndCorner():this.getOuterTopStartCorner()}getOuterBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterBottomRightCorner(){return(0,r.default)(this,h)?this.getOuterBottomStartCorner():this.getOuterBottomEndCorner()}getOuterTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterTopRightCorner(){return(0,r.default)(this,h)?this.getOuterTopStartCorner():this.getOuterTopEndCorner()}getOuterBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterBottomLeftCorner(){return(0,r.default)(this,h)?this.getOuterBottomEndCorner():this.getOuterBottomStartCorner()}isCorner(e,t){return!!(t&&t.includes(e)&&(this.getOuterTopLeftCorner().isEqual(this._createCellCoords(t.from.row,t.from.col))||this.getOuterTopRightCorner().isEqual(this._createCellCoords(t.from.row,t.to.col))||this.getOuterBottomLeftCorner().isEqual(this._createCellCoords(t.to.row,t.from.col))||this.getOuterBottomRightCorner().isEqual(this._createCellCoords(t.to.row,t.to.col))))||(e.isEqual(this.getOuterTopLeftCorner())||e.isEqual(this.getOuterTopRightCorner())||e.isEqual(this.getOuterBottomLeftCorner())||e.isEqual(this.getOuterBottomRightCorner()))}getOppositeCorner(e,t){if(!(e instanceof a.default))return!1;if(t){const{from:o,to:s}=t;if(t.includes(e)){if(this.getOuterTopStartCorner().isEqual(this._createCellCoords(o.row,o.col)))return this.getOuterBottomEndCorner();if(this.getOuterTopEndCorner().isEqual(this._createCellCoords(o.row,s.col)))return this.getOuterBottomStartCorner();if(this.getOuterBottomStartCorner().isEqual(this._createCellCoords(s.row,o.col)))return this.getOuterTopEndCorner();if(this.getOuterBottomEndCorner().isEqual(this._createCellCoords(s.row,s.col)))return this.getOuterTopStartCorner()}}return e.isEqual(this.getOuterBottomEndCorner())?this.getOuterTopStartCorner():e.isEqual(this.getOuterTopStartCorner())?this.getOuterBottomEndCorner():e.isEqual(this.getOuterTopEndCorner())?this.getOuterBottomStartCorner():e.isEqual(this.getOuterBottomStartCorner())?this.getOuterTopEndCorner():void 0}getBordersSharedWith(e){if(!this.includesRange(e))return[];const t=Math.min(this.from.row,this.to.row),o=Math.max(this.from.row,this.to.row),s=Math.min(this.from.col,this.to.col),i=Math.max(this.from.col,this.to.col),r=Math.min(e.from.row,e.to.row),n=Math.max(e.from.row,e.to.row),a=Math.min(e.from.col,e.to.col),l=Math.max(e.from.col,e.to.col),h=[];return t===r&&h.push("top"),i===l&&h.push("right"),o===n&&h.push("bottom"),s===a&&h.push("left"),h}getInner(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),o=[];for(let s=e.row;s<=t.row;s++)for(let i=e.col;i<=t.col;i++)this.from.row===s&&this.from.col===i||this.to.row===s&&this.to.col===i||o.push(this._createCellCoords(s,i));return o}getAll(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),o=[];for(let s=e.row;s<=t.row;s++)for(let i=e.col;i<=t.col;i++)e.row===s&&e.col===i?o.push(e):t.row===s&&t.col===i?o.push(t):o.push(this._createCellCoords(s,i));return o}forAll(e){const t=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner();for(let s=t.row;s<=o.row;s++)for(let i=t.col;i<=o.col;i++){if(!1===e(s,i))return}}clone(){return new u(this.highlight,this.from,this.to,(0,r.default)(this,h))}toObject(){return{from:this.from.toObject(),to:this.to.toObject()}}_createCellCoords(e,t){return new a.default(e,t,(0,r.default)(this,h))}}t.default=u},25984:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(83302),n=o(18609),a=s(o(75244)),l=s(o(52188)),h=s(o(82325)),u=s(o(2961));t.default=class{get eventManager(){return new a.default(this)}constructor(e,t){(0,i.default)(this,"wtTable",void 0),(0,i.default)(this,"wtScroll",void 0),(0,i.default)(this,"wtViewport",void 0),(0,i.default)(this,"wtOverlays",void 0),(0,i.default)(this,"selectionManager",void 0),(0,i.default)(this,"wtEvent",void 0),(0,i.default)(this,"guid",`wt_${(0,n.randomString)()}`),(0,i.default)(this,"drawInterrupted",!1),(0,i.default)(this,"drawn",!1),(0,i.default)(this,"domBindings",void 0),(0,i.default)(this,"wtSettings",void 0),this.domBindings={rootTable:e,rootDocument:e.ownerDocument,rootWindow:e.ownerDocument.defaultView},this.wtSettings=t,this.wtScroll=new l.default(this.createScrollDao())}findOriginalHeaders(){const e=[];if(this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(let t=0,o=this.wtTable.THEAD.childNodes[0].childNodes.length;t<o;t++)e.push(this.wtTable.THEAD.childNodes[0].childNodes[t].innerHTML);this.wtSettings.getSetting("columnHeaders").length||this.wtSettings.update("columnHeaders",[function(t,o){(0,r.fastInnerText)(o,e[t])}])}}createCellCoords(e,t){return new h.default(e,t,this.wtSettings.getSetting("rtlMode"))}createCellRange(e,t,o){return new u.default(e,t,o,this.wtSettings.getSetting("rtlMode"))}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.drawInterrupted=!1,e||this.wtTable.isVisible()?this.wtTable.draw(e):this.drawInterrupted=!0,this}getCell(e){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))return this.wtTable.getCell(e);const t=this.wtSettings.getSetting("totalRows"),o=this.wtSettings.getSetting("fixedRowsTop"),s=this.wtSettings.getSetting("fixedRowsBottom"),i=this.wtSettings.getSetting("fixedColumnsStart");if(e.row<o&&e.col<i)return this.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.getCell(e);if(e.row<o)return this.wtOverlays.topOverlay.clone.wtTable.getCell(e);if(e.col<i&&e.row>=t-s){if(this.wtOverlays.bottomInlineStartCornerOverlay&&this.wtOverlays.bottomInlineStartCornerOverlay.clone)return this.wtOverlays.bottomInlineStartCornerOverlay.clone.wtTable.getCell(e)}else{if(e.col<i)return this.wtOverlays.inlineStartOverlay.clone.wtTable.getCell(e);if(e.row<t&&e.row>=t-s&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(e)}return this.wtTable.getCell(e)}scrollViewport(e,t,o,s,i){return!(e.col<0||e.row<0)&&this.wtScroll.scrollViewport(e,t,o,s,i)}scrollViewportHorizontally(e,t,o){return!(e<0)&&this.wtScroll.scrollViewportHorizontally(e,t,o)}scrollViewportVertically(e,t,o){return!(e<0)&&this.wtScroll.scrollViewportVertically(e,t,o)}getViewport(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]}destroy(){this.wtOverlays.destroy(),this.wtEvent.destroy()}createScrollDao(){const e=this;return{get drawn(){return e.drawn},get topOverlay(){return e.wtOverlays.topOverlay},get inlineStartOverlay(){return e.wtOverlays.inlineStartOverlay},get wtTable(){return e.wtTable},get wtViewport(){return e.wtViewport},get wtSettings(){return e.wtSettings},get rootWindow(){return e.domBindings.rootWindow},get totalRows(){return e.wtSettings.getSetting("totalRows")},get totalColumns(){return e.wtSettings.getSetting("totalColumns")},get fixedRowsTop(){return e.wtSettings.getSetting("fixedRowsTop")},get fixedRowsBottom(){return e.wtSettings.getSetting("fixedRowsBottom")},get fixedColumnsStart(){return e.wtSettings.getSetting("fixedColumnsStart")}}}getTableDao(){const e=this;return{get wot(){return e},get parentTableOffset(){return e.cloneSource.wtTable.tableOffset},get cloneSource(){return e.cloneSource},get workspaceWidth(){return e.wtViewport.getWorkspaceWidth()},get wtViewport(){return e.wtViewport},get wtOverlays(){return e.wtOverlays},get selectionManager(){return e.selectionManager},get drawn(){return e.drawn},set drawn(t){e.drawn=t},get wtTable(){return e.wtTable},get startColumnRendered(){return e.wtViewport.columnsRenderCalculator.startColumn},get startColumnVisible(){return e.wtViewport.columnsVisibleCalculator.startColumn},get endColumnRendered(){return e.wtViewport.columnsRenderCalculator.endColumn},get endColumnVisible(){return e.wtViewport.columnsVisibleCalculator.endColumn},get countColumnsRendered(){return e.wtViewport.columnsRenderCalculator.count},get countColumnsVisible(){return e.wtViewport.columnsVisibleCalculator.count},get startRowRendered(){return e.wtViewport.rowsRenderCalculator.startRow},get startRowVisible(){return e.wtViewport.rowsVisibleCalculator.startRow},get endRowRendered(){return e.wtViewport.rowsRenderCalculator.endRow},get endRowVisible(){return e.wtViewport.rowsVisibleCalculator.endRow},get countRowsRendered(){return e.wtViewport.rowsRenderCalculator.count},get countRowsVisible(){return e.wtViewport.rowsVisibleCalculator.count},get columnHeaders(){return e.wtSettings.getSetting("columnHeaders")},get rowHeaders(){return e.wtSettings.getSetting("rowHeaders")}}}}},49755:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=s(o(83154)),n=s(o(25984));class a extends n.default{constructor(e,t,o){super(e,t),(0,i.default)(this,"cloneSource",void 0),(0,i.default)(this,"cloneOverlay",void 0);const s=this.wtSettings.getSetting("facade",this);this.cloneSource=o.source,this.cloneOverlay=o.overlay,this.wtTable=this.cloneOverlay.createTable(this.getTableDao(),s,this.domBindings,this.wtSettings),this.wtViewport=o.viewport,this.selectionManager=o.selectionManager,this.wtEvent=new r.default(s,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager,o.event),this.findOriginalHeaders()}}t.default=a},59189:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(83154)),r=s(o(87831)),n=s(o(64057)),a=s(o(94915)),l=s(o(57293)),h=s(o(25984)),u=o(86143),d=o(22232),c=o(83302);class g extends h.default{constructor(e,t){super(e,new n.default(t));const o=this.wtSettings.getSetting("facade",this);this.wtTable=new a.default(this.getTableDao(),o,this.domBindings,this.wtSettings),this.wtViewport=new l.default(this.getViewportDao(),this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.selectionManager=new u.SelectionManager(this.wtSettings.getSetting("selections")),this.wtEvent=new i.default(o,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager),this.wtOverlays=new r.default(this,o,this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.exportSettingsAsClassNames(),this.findOriginalHeaders()}exportSettingsAsClassNames(){const e=[],t=[];(0,d.objectEach)({rowHeaders:"htRowHeaders",columnHeaders:"htColumnHeaders"},((o,s)=>{this.wtSettings.getSetting(s).length&&t.push(o),e.push(o)})),(0,c.removeClass)(this.wtTable.wtRootElement.parentNode,e),(0,c.addClass)(this.wtTable.wtRootElement.parentNode,t)}getViewportDao(){const e=this;return{get wot(){return e},get topOverlayTrimmingContainer(){return e.wtOverlays.topOverlay.trimmingContainer},get inlineStartOverlayTrimmingContainer(){return e.wtOverlays.inlineStartOverlay.trimmingContainer},get topScrollPosition(){return e.wtOverlays.topOverlay.getScrollPosition()},get topParentOffset(){return e.wtOverlays.topOverlay.getTableParentOffset()},get inlineStartScrollPosition(){return e.wtOverlays.inlineStartOverlay.getScrollPosition()},get inlineStartParentOffset(){return e.wtOverlays.inlineStartOverlay.getTableParentOffset()},get topOverlay(){return e.wtOverlays.topOverlay},get inlineStartOverlay(){return e.wtOverlays.inlineStartOverlay},get bottomOverlay(){return e.wtOverlays.bottomOverlay}}}}t.default=g},83154:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(42538)),r=s(o(48427)),n=o(83302),a=o(85015),l=o(7374),h=o(37595),u=o(93315);function d(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var c=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,w=new WeakMap,C=new WeakMap,v=new WeakMap,y=new WeakMap,E=new WeakMap;t.default=class{constructor(e,t,o,s,i,n){let a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;d(this,c,{writable:!0,value:void 0}),d(this,g,{writable:!0,value:void 0}),d(this,f,{writable:!0,value:void 0}),d(this,p,{writable:!0,value:void 0}),d(this,m,{writable:!0,value:void 0}),d(this,w,{writable:!0,value:void 0}),d(this,C,{writable:!0,value:void 0}),d(this,v,{writable:!0,value:void 0}),d(this,y,{writable:!0,value:[null,null]}),d(this,E,{writable:!0,value:[null,null]}),(0,r.default)(this,c,o),(0,r.default)(this,g,t),(0,r.default)(this,f,i),(0,r.default)(this,p,n),(0,r.default)(this,m,a),(0,r.default)(this,w,s),(0,r.default)(this,C,e),this.registerEvents()}registerEvents(){(0,i.default)(this,w).addEventListener((0,i.default)(this,f).holder,"contextmenu",(e=>this.onContextMenu(e))),(0,i.default)(this,w).addEventListener((0,i.default)(this,f).TABLE,"mouseover",(e=>this.onMouseOver(e))),(0,i.default)(this,w).addEventListener((0,i.default)(this,f).TABLE,"mouseout",(e=>this.onMouseOut(e)));const e=()=>{(0,i.default)(this,w).addEventListener((0,i.default)(this,f).holder,"touchstart",(e=>this.onTouchStart(e))),(0,i.default)(this,w).addEventListener((0,i.default)(this,f).holder,"touchend",(e=>this.onTouchEnd(e))),this.momentumScrolling||(this.momentumScrolling={}),(0,i.default)(this,w).addEventListener((0,i.default)(this,f).holder,"scroll",(()=>{clearTimeout(this.momentumScrolling._timeout),this.momentumScrolling.ongoing||(0,i.default)(this,c).getSetting("onBeforeTouchScroll"),this.momentumScrolling.ongoing=!0,this.momentumScrolling._timeout=setTimeout((()=>{this.touchApplied||(this.momentumScrolling.ongoing=!1,(0,i.default)(this,c).getSetting("onAfterMomentumScroll"))}),200)}))},t=()=>{(0,i.default)(this,w).addEventListener((0,i.default)(this,f).holder,"mouseup",(e=>this.onMouseUp(e))),(0,i.default)(this,w).addEventListener((0,i.default)(this,f).holder,"mousedown",(e=>this.onMouseDown(e)))};(0,h.isMobileBrowser)()?e():((0,l.isTouchSupported)()&&e(),t())}selectedCellWasTouched(e){const t=this.parentCell(e).coords;if((0,i.default)(this,v)&&t){const[e,o]=[t.row,(0,i.default)(this,v).from.row],[s,r]=[t.col,(0,i.default)(this,v).from.col];return e===o&&s===r}return!1}parentCell(e){const t={},o=(0,i.default)(this,f).TABLE,s=(0,n.closestDown)(e,["TD","TH"],o);return s?(t.coords=(0,i.default)(this,f).getCoords(s),t.TD=s):(0,n.hasClass)(e,"wtBorder")&&(0,n.hasClass)(e,"current")?(t.coords=(0,i.default)(this,p).getFocusSelection().cellRange.highlight,t.TD=(0,i.default)(this,f).getCell(t.coords)):(0,n.hasClass)(e,"wtBorder")&&(0,n.hasClass)(e,"area")&&(0,i.default)(this,p).getAreaSelection().cellRange&&(t.coords=(0,i.default)(this,p).getAreaSelection().cellRange.to,t.TD=(0,i.default)(this,f).getCell(t.coords)),t}onMouseDown(e){const t=(0,i.default)(this,g).rootDocument.activeElement,o=(0,a.partial)(n.getParent,e.target),s=e.target;if(!["TD","TH"].includes(t.nodeName)&&(s===t||o(0)===t||o(1)===t))return;const r=this.parentCell(s);(0,n.hasClass)(s,"corner")?(0,i.default)(this,c).getSetting("onCellCornerMouseDown",e,s):r.TD&&(0,i.default)(this,c).has("onCellMouseDown")&&this.callListener("onCellMouseDown",e,r.coords,r.TD),(0===e.button||this.touchApplied)&&r.TD&&((0,i.default)(this,E)[0]=r.TD,clearTimeout((0,i.default)(this,y)[0]),(0,i.default)(this,y)[0]=setTimeout((()=>{(0,i.default)(this,E)[0]=null}),1e3))}onContextMenu(e){if((0,i.default)(this,c).has("onCellContextMenu")){const t=this.parentCell(e.target);t.TD&&this.callListener("onCellContextMenu",e,t.coords,t.TD)}}onMouseOver(e){if(!(0,i.default)(this,c).has("onCellMouseOver"))return;const t=(0,i.default)(this,f).TABLE,o=(0,n.closestDown)(e.target,["TD","TH"],t),s=(0,i.default)(this,m)||this;o&&o!==s.lastMouseOver&&(0,n.isChildOf)(o,t)&&(s.lastMouseOver=o,this.callListener("onCellMouseOver",e,(0,i.default)(this,f).getCoords(o),o))}onMouseOut(e){if(!(0,i.default)(this,c).has("onCellMouseOut"))return;const t=(0,i.default)(this,f).TABLE,o=(0,n.closestDown)(e.target,["TD","TH"],t),s=(0,n.closestDown)(e.relatedTarget,["TD","TH"],t),r=(0,i.default)(this,m)||this;o&&o!==s&&(0,n.isChildOf)(o,t)&&(this.callListener("onCellMouseOut",e,(0,i.default)(this,f).getCoords(o),o),null===s&&(r.lastMouseOver=null))}onMouseUp(e){const t=this.parentCell(e.target);t.TD&&(0,i.default)(this,c).has("onCellMouseUp")&&this.callListener("onCellMouseUp",e,t.coords,t.TD),(0===e.button||this.touchApplied)&&(t.TD===(0,i.default)(this,E)[0]&&t.TD===(0,i.default)(this,E)[1]?((0,n.hasClass)(e.target,"corner")?this.callListener("onCellCornerDblClick",e,t.coords,t.TD):this.callListener("onCellDblClick",e,t.coords,t.TD),(0,i.default)(this,E)[0]=null,(0,i.default)(this,E)[1]=null):t.TD===(0,i.default)(this,E)[0]&&((0,i.default)(this,E)[1]=t.TD,clearTimeout((0,i.default)(this,y)[1]),(0,i.default)(this,y)[1]=setTimeout((()=>{(0,i.default)(this,E)[1]=null}),500)))}onTouchStart(e){(0,r.default)(this,v,(0,i.default)(this,p).getFocusSelection().cellRange),this.touchApplied=!0,this.onMouseDown(e)}onTouchEnd(e){var t;const o=e.target,s=null===(t=this.parentCell(o))||void 0===t?void 0:t.coords,r=(0,u.isDefined)(s)&&s.row>=0&&s.col>=0;if(e.cancelable&&r&&(0,i.default)(this,c).getSetting("isDataViewInstance")){const t=["A","BUTTON","INPUT"];(0,h.isIOS)()&&((0,h.isChromeWebKit)()||(0,h.isFirefoxWebKit)())&&this.selectedCellWasTouched(o)&&!t.includes(o.tagName)?e.preventDefault():this.selectedCellWasTouched(o)||e.preventDefault()}this.onMouseUp(e),this.touchApplied=!1}callListener(e,t,o,s){const r=(0,i.default)(this,c).getSettingPure(e);r&&r(t,o,s,(0,i.default)(this,C).call(this))}destroy(){clearTimeout((0,i.default)(this,y)[0]),clearTimeout((0,i.default)(this,y)[1]),(0,i.default)(this,w).destroy()}}},70559:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(59189)),r=s(o(25984));class n{constructor(e){e instanceof r.default?this._wot=e:this._initFromSettings(e)}_initFromSettings(e){e.facade=e=>{const t=new n(e);return()=>t},this._wot=new i.default(e.table,e)}get guid(){return this._wot.guid}get rootDocument(){return this._wot.domBindings.rootDocument}get rootWindow(){return this._wot.domBindings.rootWindow}get wtSettings(){return this._wot.wtSettings}get cloneSource(){return this._wot.cloneSource}get cloneOverlay(){return this._wot.cloneOverlay}get selectionManager(){return this._wot.selectionManager}get wtViewport(){return this._wot.wtViewport}get wtOverlays(){return this._wot.wtOverlays}get wtTable(){return this._wot.wtTable}get wtEvent(){return this._wot.wtEvent}get wtScroll(){return this._wot.wtScroll}get drawn(){return this._wot.drawn}set drawn(e){this._wot.drawn=e}get drawInterrupted(){return this._wot.drawInterrupted}set drawInterrupted(e){this._wot.drawInterrupted=e}get lastMouseOver(){return this._wot.lastMouseOver}set lastMouseOver(e){this._wot.lastMouseOver=e}get momentumScrolling(){return this._wot.momentumScrolling}set momentumScrolling(e){this._wot.momentumScrolling=e}get touchApplied(){return this._wot.touchApplied}set touchApplied(e){this._wot.touchApplied=e}get domBindings(){return this._wot.domBindings}get eventListeners(){return this._wot.eventListeners}set eventListeners(e){this._wot.eventListeners=e}get eventManager(){return this._wot.eventManager}createCellCoords(e,t){return this._wot.createCellCoords(e,t)}createCellRange(e,t,o){return this._wot.createCellRange(e,t,o)}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._wot.draw(e),this}getCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._wot.getCell(e,t)}scrollViewport(e,t,o,s,i){return this._wot.scrollViewport(e,t,o,s,i)}scrollViewportHorizontally(e,t,o){return this._wot.scrollViewportHorizontally(e,t,o)}scrollViewportVertically(e,t,o){return this._wot.scrollViewportVertically(e,t,o)}getViewport(){return this._wot.getViewport()}getOverlayName(){return this._wot.cloneOverlay?this._wot.cloneOverlay.type:"master"}exportSettingsAsClassNames(){return this._wot.exportSettingsAsClassNames()}update(e,t){return this._wot.wtSettings.update(e,t),this}getSetting(e,t,o,s,i){return this._wot.wtSettings.getSetting(e,t,o,s,i)}hasSetting(e){return this._wot.wtSettings.hasSetting(e)}destroy(){this._wot.destroy()}}t.default=n},65946:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231));t.default=class{constructor(e,t,o){(0,i.default)(this,"offset",void 0),(0,i.default)(this,"total",void 0),(0,i.default)(this,"countTH",void 0),this.offset=e,this.total=t,this.countTH=o}offsetted(e){return e+this.offset}unOffsetted(e){return e-this.offset}renderedToSource(e){return this.offsetted(e)}sourceToRendered(e){return this.unOffsetted(e)}offsettedTH(e){return e-this.countTH}unOffsettedTH(e){return e+this.countTH}visibleRowHeadedColumnToSourceColumn(e){return this.renderedToSource(this.offsettedTH(e))}sourceColumnToVisibleRowHeadedColumn(e){return this.unOffsettedTH(this.sourceToRendered(e))}}},22350:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231));t.default=class{constructor(e,t,o){(0,i.default)(this,"offset",void 0),(0,i.default)(this,"total",void 0),(0,i.default)(this,"countTH",void 0),this.offset=e,this.total=t,this.countTH=o}offsetted(e){return e+this.offset}unOffsetted(e){return e-this.offset}renderedToSource(e){return this.offsetted(e)}sourceToRendered(e){return this.unOffsetted(e)}offsettedTH(e){return e-this.countTH}unOffsettedTH(e){return e+this.countTH}visibleColHeadedRowToSourceRow(e){return this.renderedToSource(this.offsettedTH(e))}sourceRowToVisibleColHeadedRow(e){return this.unOffsettedTH(this.sourceToRendered(e))}}},21280:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(65658));t.ViewportColumnsCalculator=i.default;var r=s(o(36107));t.ViewportRowsCalculator=r.default;var n=s(o(82325));t.CellCoords=n.default;var a=s(o(2961));t.CellRange=a.default;var l=s(o(70559));t.default=l.default,t.Core=l.default;var h=o(88361);t.Selection=h.Selection,t.HIGHLIGHT_ACTIVE_HEADER_TYPE=h.ACTIVE_HEADER_TYPE,t.HIGHLIGHT_AREA_TYPE=h.AREA_TYPE,t.HIGHLIGHT_FOCUS_TYPE=h.FOCUS_TYPE,t.HIGHLIGHT_FILL_TYPE=h.FILL_TYPE,t.HIGHLIGHT_HEADER_TYPE=h.HEADER_TYPE,t.HIGHLIGHT_ROW_TYPE=h.ROW_TYPE,t.HIGHLIGHT_COLUMN_TYPE=h.COLUMN_TYPE,t.HIGHLIGHT_CUSTOM_SELECTION_TYPE=h.CUSTOM_SELECTION_TYPE;var u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=g(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(96649));t.Renderer=u;var d=o(1909);t.OrderView=d.OrderView,t.SharedOrderView=d.SharedOrderView;var c=o(75244);function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(g=function(e){return e?o:t})(e)}t.getListenersCounter=c.getListenersCounter},75391:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(83302),n=o(22232),a=o(50095),l=o(69173),h=o(3984),u=s(o(49755)),d=o(5386);t.Overlay=class{constructor(e,t,o,s,a){(0,i.default)(this,"wtSettings",null),(0,n.defineGetter)(this,"wot",e,{writable:!1}),this.domBindings=a,this.facadeGetter=t,this.wtSettings=s;const{TABLE:l,hider:h,spreader:u,holder:d,wtRootElement:c}=this.wot.wtTable;this.instance=this.wot,this.type=o,this.mainTableScrollableElement=null,this.TABLE=l,this.hider=h,this.spreader=u,this.holder=d,this.wtRootElement=c,this.trimmingContainer=(0,r.getTrimmingContainer)(this.hider.parentNode.parentNode),this.updateStateOfRendering(),this.clone=this.makeClone()}updateStateOfRendering(){const e=this.needFullRender;this.needFullRender=this.shouldBeRendered();const t=e!==this.needFullRender;return t&&!this.needFullRender&&this.reset(),t}shouldBeRendered(){return!0}updateTrimmingContainer(){this.trimmingContainer=(0,r.getTrimmingContainer)(this.hider.parentNode.parentNode)}updateMainScrollableElement(){const{wtTable:e}=this.wot,{rootWindow:t}=this.domBindings;"hidden"===t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow")?this.mainTableScrollableElement=this.wot.wtTable.holder:this.mainTableScrollableElement=(0,r.getScrollableElement)(e.TABLE)}getRelativeCellPosition(e,t,o){if(!1===this.clone.wtTable.holder.contains(e))return void(0,l.warn)(`The provided element is not a child of the ${this.type} overlay`);const s=this.mainTableScrollableElement===this.domBindings.rootWindow,i=o<this.wtSettings.getSetting("fixedColumnsStart"),r=t<this.wtSettings.getSetting("fixedRowsTop"),n=t>=this.wtSettings.getSetting("totalRows")-this.wtSettings.getSetting("fixedRowsBottom"),a=this.clone.wtTable.spreader,h={start:this.getRelativeStartPosition(a),top:a.offsetTop},u={start:this.getRelativeStartPosition(e),top:e.offsetTop};let d=null;return d=s?this.getRelativeCellPositionWithinWindow(r,i,u,h):this.getRelativeCellPositionWithinHolder(r,n,i,u,h),d}getRelativeStartPosition(e){return this.isRtl()?e.offsetParent.offsetWidth-e.offsetLeft-e.offsetWidth:e.offsetLeft}getRelativeCellPositionWithinWindow(e,t,o,s){const i=this.wot.wtTable.wtRootElement.getBoundingClientRect();let n=0,a=0;if(t){let e=i.left;this.isRtl()&&(e=this.domBindings.rootWindow.innerWidth-(i.left+i.width+(0,r.getScrollbarWidth)())),n=e<=0?-1*e:0}else n=s.start;if(e){a=this.clone.wtTable.TABLE.getBoundingClientRect().top-i.top}else a=s.top;return{start:o.start+n,top:o.top+a}}getRelativeCellPositionWithinHolder(e,t,o,s,i){const r=this.wot.wtOverlays.inlineStartOverlay.getScrollPosition(),n=this.wot.wtOverlays.topOverlay.getScrollPosition();let a=0,l=0;if(o||(a=r-i.start),t){const e=this.wot.wtTable.wtRootElement.getBoundingClientRect();l=-1*this.clone.wtTable.TABLE.getBoundingClientRect().top+e.top}else e||(l=n-i.top);return{start:s.start-a,top:s.top-l}}makeClone(){if(-1===h.CLONE_TYPES.indexOf(this.type))throw new Error(`Clone type "${this.type}" is not supported.`);const{wtTable:e,wtSettings:t}=this.wot,{rootDocument:o,rootWindow:s}=this.domBindings,i=o.createElement("div"),n=o.createElement("table"),a=e.wtRootElement.parentNode;i.className=`${h.CLONE_CLASS_NAMES.get(this.type)} handsontable`,i.setAttribute("dir",this.isRtl()?"rtl":"ltr"),i.style.position="absolute",i.style.top=0,i.style.overflow="visible",this.isRtl()?i.style.right=0:i.style.left=0,t.getSetting("ariaTags")&&(0,r.setAttribute)(i,[(0,d.A11Y_PRESENTATION)()]),n.className=e.TABLE.className;e.TABLE.getAttribute("role")&&n.setAttribute("role",e.TABLE.getAttribute("role")),i.appendChild(n),a.appendChild(i);const l=this.wtSettings.getSetting("preventOverflow");return!0===l||"horizontal"===l&&this.type===h.CLONE_TOP||"vertical"===l&&this.type===h.CLONE_INLINE_START?this.mainTableScrollableElement=s:"hidden"===s.getComputedStyle(a).getPropertyValue("overflow")?this.mainTableScrollableElement=e.holder:this.mainTableScrollableElement=(0,r.getScrollableElement)(e.TABLE),new u.default(n,this.wtSettings,{source:this.wot,overlay:this,viewport:this.wot.wtViewport,event:this.wot.wtEvent,selectionManager:this.wot.selectionManager})}refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.shouldBeRendered();this.clone&&(this.needFullRender||t)&&this.clone.draw(e),this.needFullRender=t}reset(){if(!this.clone)return;const e=this.clone.wtTable.holder,t=this.clone.wtTable.hider,o=e.style,s=t.style,i=e.parentNode.style;(0,a.arrayEach)([o,s,i],(e=>{e.width="",e.height=""}))}isRtl(){return this.wtSettings.getSetting("rtlMode")}destroy(){this.clone.eventManager.destroy()}}},99260:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(83302),n=s(o(86363)),a=o(75391),l=o(3984);class h extends a.Overlay{constructor(e,t,o,s){super(e,t,l.CLONE_BOTTOM,o,s),(0,i.default)(this,"cachedFixedRowsBottom",-1),this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom")}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new n.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.wot.wtTable.holder.parentNode)return!1;const{rootWindow:e}=this.domBindings,t=this.clone.wtTable.holder.parentNode;t.style.top="";let o=0;const s=this.wtSettings.getSetting("preventOverflow");this.trimmingContainer!==e||s&&"vertical"===s?(o=this.getScrollPosition(),this.repositionOverlay()):(o=this.getOverlayOffset(),t.style.bottom=`${o}px`);const i=this.adjustHeaderBordersPosition(o);return this.adjustElementsSize(),i}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o}=this.domBindings,s=this.clone.wtTable.holder.parentNode;let i=0;t.hasVerticalScroll()||(i+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(i+=(0,r.getScrollbarWidth)(o)),s.style.bottom=`${i}px`}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let o=!1;return this.mainTableScrollableElement===t?(t.scrollTo((0,r.getWindowScrollLeft)(t),e),o=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,o=!0),o}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const{wtTable:o,wtSettings:s}=this.wot,i=s.getSetting("defaultRowHeight");let r=e,n=0;for(;r<t;){const e=o.getRowHeight(r);n+=void 0===e?i:e,r+=1}return n}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o,rootWindow:s}=this.domBindings,i=(0,r.getScrollbarWidth)(o),n=this.clone.wtTable.holder.parentNode.style,a=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==s||"horizontal"===a){let o=t.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(o-=i),o=Math.min(o,e.wtRootElement.scrollWidth),n.width=`${o}px`}else n.width="";this.clone.wtTable.holder.style.width=n.width;let l=(0,r.outerHeight)(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(l=0),n.height=`${l}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=e.parentNode.style.height}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");if("number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`;else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?t.style[e]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:t.style[e]=""}scrollTo(e,t){let o=this.getTableParentOffset();const s=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder;let i=0;t&&s.offsetHeight!==s.clientHeight&&(i=(0,r.getScrollbarWidth)(this.domBindings.rootDocument)),t?(o+=this.sumCellSizes(0,e+1),o-=this.wot.wtViewport.getViewportHeight(),o+=1):o+=this.sumCellSizes(this.wtSettings.getSetting("fixedRowsBottom"),e),o+=i,this.setScrollPosition(o)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return(0,r.getScrollTop)(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===e&&(!t||"vertical"!==t)){const e=this.wot.wtTable.getTotalHeight(),t=e-this.clone.wtTable.getTotalHeight(),s=this.domBindings.rootDocument.documentElement.clientHeight;o=Math.max(this.getTableParentOffset()-this.getScrollPosition()-s+e,0),o>t&&(o=0)}return o}adjustHeaderBordersPosition(e){const t=this.wtSettings.getSetting("fixedRowsBottom"),o=this.cachedFixedRowsBottom!==t,s=this.wtSettings.getSetting("columnHeaders");let i=!1;if((o||0===t)&&s.length>0){const t=this.wot.wtTable.holder.parentNode,o=(0,r.hasClass)(t,"innerBorderBottom");this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom"),e||0===this.wtSettings.getSetting("totalRows")?((0,r.addClass)(t,"innerBorderBottom"),i=!o):((0,r.removeClass)(t,"innerBorderBottom"),i=o)}return i}}t.BottomOverlay=h},79720:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=o(83302),r=s(o(58654)),n=o(75391),a=o(3984);class l extends n.Overlay{constructor(e,t,o,s,i,r){super(e,t,a.CLONE_BOTTOM_INLINE_START_CORNER,o,s),this.bottomOverlay=i,this.inlineStartOverlay=r}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new r.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wot:e}=this;if(this.updateTrimmingContainer(),!e.wtTable.holder.parentNode)return!1;const t=this.clone.wtTable.holder.parentNode;if(t.style.top="",this.trimmingContainer===this.domBindings.rootWindow){const e=this.inlineStartOverlay.getOverlayOffset(),o=this.bottomOverlay.getOverlayOffset();t.style[this.isRtl()?"right":"left"]=`${e}px`,t.style.bottom=`${o}px`}else(0,i.resetCssTransform)(t),this.repositionOverlay();let o=(0,i.outerHeight)(this.clone.wtTable.TABLE);const s=(0,i.outerWidth)(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(o=0),t.style.height=`${o}px`,t.style.width=`${s}px`,!1}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o}=this.domBindings,s=this.clone.wtTable.holder.parentNode;let r=0;t.hasVerticalScroll()||(r+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(r+=(0,i.getScrollbarWidth)(o)),s.style.bottom=`${r}px`}}t.BottomInlineStartCornerOverlay=l},3984:(e,t)=>{"use strict";t.__esModule=!0;const o=t.CLONE_TOP="top",s=t.CLONE_BOTTOM="bottom",i=t.CLONE_INLINE_START="inline_start",r=t.CLONE_TOP_INLINE_START_CORNER="top_inline_start_corner",n=t.CLONE_BOTTOM_INLINE_START_CORNER="bottom_inline_start_corner";t.CLONE_TYPES=[o,s,i,r,n],t.CLONE_CLASS_NAMES=new Map([[o,`ht_clone_${o}`],[s,`ht_clone_${s}`],[i,`ht_clone_${i} ht_clone_left`],[r,`ht_clone_${r} ht_clone_top_left_corner`],[n,`ht_clone_${n} ht_clone_bottom_left_corner`]])},89381:(e,t,o)=>{"use strict";t.__esModule=!0;var s={BottomInlineStartCornerOverlay:!0,BottomOverlay:!0,InlineStartOverlay:!0,Overlay:!0,TopInlineStartCornerOverlay:!0,TopOverlay:!0},i=o(79720);t.BottomInlineStartCornerOverlay=i.BottomInlineStartCornerOverlay;var r=o(99260);t.BottomOverlay=r.BottomOverlay;var n=o(34170);t.InlineStartOverlay=n.InlineStartOverlay;var a=o(75391);t.Overlay=a.Overlay;var l=o(40387);t.TopInlineStartCornerOverlay=l.TopInlineStartCornerOverlay;var h=o(82148);t.TopOverlay=h.TopOverlay;var u=o(3984);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===u[e]||(t[e]=u[e]))}))},34170:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=o(83302),r=s(o(32173)),n=o(75391),a=o(88361),l=o(3984);class h extends n.Overlay{constructor(e,t,o,s){super(e,t,l.CLONE_INLINE_START,o,s)}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new r.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wtTable:e}=this.wot;if(!this.needFullRender||!e.holder.parentNode)return!1;const{rootWindow:t}=this.domBindings,o=this.clone.wtTable.holder.parentNode,s=this.wtSettings.getSetting("preventOverflow");let r=0;this.trimmingContainer!==t||s&&"horizontal"===s?(r=this.getScrollPosition(),(0,i.resetCssTransform)(o)):(r=this.getOverlayOffset()*(this.isRtl()?-1:1),(0,i.setOverlayPosition)(o,`${r}px`,"0px"));const n=this.adjustHeaderBordersPosition(r);return this.adjustElementsSize(),n}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let o=!1;return this.isRtl()&&(e=-e),this.mainTableScrollableElement===t&&t.scrollX!==e?(t.scrollTo(e,(0,i.getWindowScrollTop)(t)),o=!0):this.mainTableScrollableElement.scrollLeft!==e&&(this.mainTableScrollableElement.scrollLeft=e,o=!0),o}onScroll(){this.wtSettings.getSetting("onScrollVertically")}sumCellSizes(e,t){const o=this.wtSettings.getSetting("defaultColumnWidth");let s=e,i=0;for(;s<t;)i+=this.wot.wtTable.getStretchedColumnWidth(s)||o,s+=1;return i}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:o}=this.domBindings,s=(0,i.getScrollbarWidth)(t),r=this.clone.wtTable.holder.parentNode.style,n=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==o||"vertical"===n){let t=this.wot.wtViewport.getWorkspaceHeight();this.wot.wtOverlays.hasScrollbarBottom&&(t-=s),t=Math.min(t,e.wtRootElement.scrollHeight),r.height=`${t}px`}else r.height="";this.clone.wtTable.holder.style.height=r.height;const a=(0,i.outerWidth)(this.clone.wtTable.TABLE);r.width=`${a}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=this.wot.selectionManager.getFocusSelection()?parseInt(a.CORNER_DEFAULT_STYLE.width,10)/2:0;this.clone.wtTable.hider.style.height=this.hider.style.height,e.style.height=e.parentNode.style.height,e.style.width=`${parseInt(e.parentNode.style.width,10)+t}px`}applyToDOM(){const e=this.wtSettings.getSetting("totalColumns"),t=this.isRtl()?"right":"left";if("number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition)this.spreader.style[t]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`;else{if(0!==e)throw new Error("Incorrect value of the columnsRenderCalculator");this.spreader.style[t]="0"}this.isRtl()?this.spreader.style.left="":this.spreader.style.right="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`:this.clone.wtTable.spreader.style.top=""}scrollTo(e,t){let o=this.getTableParentOffset();const s=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder;let r=0;if(t){this.wot.wtTable.getColumnWidth(e)>this.wot.wtViewport.getViewportWidth()&&(t=!1)}return t&&s.offsetWidth!==s.clientWidth&&(r=(0,i.getScrollbarWidth)(this.domBindings.rootDocument)),t?(o+=this.sumCellSizes(0,e+1),o-=this.wot.wtViewport.getViewportWidth()):o+=this.sumCellSizes(this.wtSettings.getSetting("fixedColumnsStart"),e),o+=r,this.setScrollPosition(o)}getTableParentOffset(){let e=0;return this.wtSettings.getSetting("preventOverflow")||this.trimmingContainer!==this.domBindings.rootWindow||(e=this.wot.wtTable.holderOffset.left),e}getScrollPosition(){return Math.abs((0,i.getScrollLeft)(this.mainTableScrollableElement,this.domBindings.rootWindow))}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===e&&(!t||"horizontal"!==t)){o=this.isRtl()?Math.abs(Math.min(this.getTableParentOffset()-this.getScrollPosition(),0)):Math.max(this.getScrollPosition()-this.getTableParentOffset(),0);o>this.wot.wtTable.getTotalWidth()-this.clone.wtTable.getTotalWidth()&&(o=0)}return o}adjustHeaderBordersPosition(e){const t=this.wot.wtTable.holder.parentNode,o=this.wtSettings.getSetting("rowHeaders"),s=this.wtSettings.getSetting("fixedColumnsStart");this.wtSettings.getSetting("totalRows")?(0,i.removeClass)(t,"emptyRows"):(0,i.addClass)(t,"emptyRows");let r=!1;if(s&&!o.length)(0,i.addClass)(t,"innerBorderLeft innerBorderInlineStart");else if(!s&&o.length){const o=(0,i.hasClass)(t,"innerBorderInlineStart");e?((0,i.addClass)(t,"innerBorderLeft innerBorderInlineStart"),r=!o):((0,i.removeClass)(t,"innerBorderLeft innerBorderInlineStart"),r=o)}return r}}t.InlineStartOverlay=h},82148:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(83302),n=s(o(85043)),a=o(75391),l=o(88361),h=o(3984);class u extends a.Overlay{constructor(e,t,o,s){super(e,t,h.CLONE_TOP,o,s),(0,i.default)(this,"cachedFixedRowsTop",-1),this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop")}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new n.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode,{rootWindow:t}=this.domBindings,o=this.wtSettings.getSetting("preventOverflow");let s=0,i=!1;if(this.trimmingContainer!==t||o&&"vertical"===o)s=this.getScrollPosition(),(0,r.resetCssTransform)(e);else{const{wtTable:t}=this.wot,o=t.hider.getBoundingClientRect();i=Math.ceil(o.bottom)===e.offsetHeight,s=this.getOverlayOffset(),(0,r.setOverlayPosition)(e,"0px",`${s}px`)}const n=this.adjustHeaderBordersPosition(s,i);return this.adjustElementsSize(),n}setScrollPosition(e){const t=this.domBindings.rootWindow;let o=!1;return this.mainTableScrollableElement===t&&t.scrollY!==e?(t.scrollTo((0,r.getWindowScrollLeft)(t),e),o=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,o=!0),o}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const o=this.wtSettings.getSetting("defaultRowHeight");let s=e,i=0;for(;s<t;){const e=this.wot.wtTable.getRowHeight(s);i+=void 0===e?o:e,s+=1}return i}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:o}=this.domBindings,s=(0,r.getScrollbarWidth)(t),i=this.clone.wtTable.holder.parentNode.style,n=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==o||"horizontal"===n){let t=this.wot.wtViewport.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(t-=s),t=Math.min(t,e.wtRootElement.scrollWidth),i.width=`${t}px`}else i.width="";this.clone.wtTable.holder.style.width=i.width;let a=(0,r.outerHeight)(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(a=0),i.height=`${a}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=this.wot.selectionManager.getFocusSelection()?parseInt(l.CORNER_DEFAULT_STYLE.height,10)/2:0;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=`${parseInt(e.parentNode.style.height,10)+t}px`}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");if("number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`;else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?t.style[e]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:t.style[e]=""}scrollTo(e,t){const{wot:o,wtSettings:s}=this,i=(o.cloneSource?o.cloneSource:o).wtTable.holder;let n=this.getTableParentOffset(),a=0;if(t){this.wot.wtTable.getRowHeight(e)>this.wot.wtViewport.getViewportHeight()&&(t=!1)}if(t&&i.offsetHeight!==i.clientHeight&&(a=(0,r.getScrollbarWidth)(this.domBindings.rootDocument)),t){const t=s.getSetting("fixedRowsBottom"),i=s.getSetting("totalRows");n+=this.sumCellSizes(0,e+1),n-=o.wtViewport.getViewportHeight()-this.sumCellSizes(i-t,i),n+=1}else n+=this.sumCellSizes(s.getSetting("fixedRowsTop"),e);return n+=a,this.setScrollPosition(n)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return(0,r.getScrollTop)(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===e&&(!t||"vertical"!==t)){const e=this.wot.wtTable.getTotalHeight()-this.clone.wtTable.getTotalHeight();o=Math.max(this.getScrollPosition()-this.getTableParentOffset(),0),o>e&&(o=0)}return o}adjustHeaderBordersPosition(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=this.wot.wtTable.holder.parentNode;this.wtSettings.getSetting("totalColumns")?(0,r.removeClass)(o,"emptyColumns"):(0,r.addClass)(o,"emptyColumns");let s=!1;if(!t){const t=this.wtSettings.getSetting("fixedRowsTop"),i=this.cachedFixedRowsTop!==t,n=this.wtSettings.getSetting("columnHeaders");if((i||0===t)&&n.length>0){const t=(0,r.hasClass)(o,"innerBorderTop");this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop"),e||0===this.wtSettings.getSetting("totalRows")?((0,r.addClass)(o,"innerBorderTop"),s=!t):((0,r.removeClass)(o,"innerBorderTop"),s=t)}}return s}}t.TopOverlay=u},40387:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(83302),n=s(o(56754)),a=o(75391),l=o(3984);class h extends a.Overlay{constructor(e,t,o,s,r,n){super(e,t,l.CLONE_TOP_INLINE_START_CORNER,o,s),(0,i.default)(this,"topOverlay",void 0),(0,i.default)(this,"inlineStartOverlay",void 0),this.topOverlay=r,this.inlineStartOverlay=n}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new n.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){if(this.updateTrimmingContainer(),!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode;if(this.trimmingContainer===this.domBindings.rootWindow){const t=this.inlineStartOverlay.getOverlayOffset()*(this.isRtl()?-1:1),o=this.topOverlay.getOverlayOffset();(0,r.setOverlayPosition)(e,`${t}px`,`${o}px`)}else(0,r.resetCssTransform)(e);let t=(0,r.outerHeight)(this.clone.wtTable.TABLE);const o=(0,r.outerWidth)(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(t=0),e.style.height=`${t}px`,e.style.width=`${o}px`,!1}}t.TopInlineStartCornerOverlay=h},87831:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(83302),n=o(7374),a=o(50095),l=o(80151),h=o(37595),u=o(89381);t.default=class{constructor(e,t,o,s,a,l){(0,i.default)(this,"wot",null),(0,i.default)(this,"topOverlay",null),(0,i.default)(this,"bottomOverlay",null),(0,i.default)(this,"inlineStartOverlay",null),(0,i.default)(this,"topInlineStartCornerOverlay",null),(0,i.default)(this,"bottomInlineStartCornerOverlay",null),(0,i.default)(this,"browserLineHeight",void 0),(0,i.default)(this,"wtSettings",null),(0,i.default)(this,"resizeObserver",new ResizeObserver((e=>{(0,n.requestAnimationFrame)((()=>{Array.isArray(e)&&e.length&&this.wtSettings.getSetting("onContainerElementResize")}))}))),this.wot=e,this.wtSettings=s,this.domBindings=o,this.facadeGetter=t,this.wtTable=l;const{rootDocument:h,rootWindow:u}=this.domBindings;this.instance=this.wot,this.eventManager=a,this.scrollbarSize=(0,r.getScrollbarWidth)(h);const d="hidden"===u.getComputedStyle(l.wtRootElement.parentNode).getPropertyValue("overflow");this.scrollableElement=d?l.holder:(0,r.getScrollableElement)(l.TABLE),this.initOverlays(),this.hasScrollbarBottom=!1,this.hasScrollbarRight=!1,this.destroyed=!1,this.keyPressed=!1,this.spreaderLastSize={width:null,height:null},this.verticalScrolling=!1,this.horizontalScrolling=!1,this.initBrowserLineHeight(),this.registerListeners(),this.lastScrollX=u.scrollX,this.lastScrollY=u.scrollY}getOverlays(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=[this.topOverlay,this.topInlineStartCornerOverlay,this.inlineStartOverlay,this.bottomOverlay,this.bottomInlineStartCornerOverlay];return e&&t.push(this.wtTable),t}initBrowserLineHeight(){const{rootWindow:e,rootDocument:t}=this.domBindings,o=e.getComputedStyle(t.body),s=parseInt(o.lineHeight,10),i=1.2*parseInt(o.fontSize,10);this.browserLineHeight=s||i}initOverlays(){const e=[this.wot,this.facadeGetter,this.wtSettings,this.domBindings];this.topOverlay=new u.TopOverlay(...e),this.bottomOverlay=new u.BottomOverlay(...e),this.inlineStartOverlay=new u.InlineStartOverlay(...e),this.topInlineStartCornerOverlay=new u.TopInlineStartCornerOverlay(...e,this.topOverlay,this.inlineStartOverlay),this.bottomInlineStartCornerOverlay=new u.BottomInlineStartCornerOverlay(...e,this.bottomOverlay,this.inlineStartOverlay)}updateStateOfRendering(){let e=this.topOverlay.updateStateOfRendering();return e=this.bottomOverlay.updateStateOfRendering()||e,e=this.inlineStartOverlay.updateStateOfRendering()||e,this.inlineStartOverlay.needFullRender&&(this.topOverlay.needFullRender&&(e=this.topInlineStartCornerOverlay.updateStateOfRendering()||e),this.bottomOverlay.needFullRender&&(e=this.bottomInlineStartCornerOverlay.updateStateOfRendering()||e)),e}refreshAll(){this.wot.drawn&&(this.wtTable.holder.parentNode?(this.wot.draw(!0),this.verticalScrolling&&this.inlineStartOverlay.onScroll(),this.horizontalScrolling&&this.topOverlay.onScroll(),this.verticalScrolling=!1,this.horizontalScrolling=!1):this.destroy())}registerListeners(){const{rootDocument:e,rootWindow:t}=this.domBindings,{mainTableScrollableElement:o}=this.topOverlay,{mainTableScrollableElement:s}=this.inlineStartOverlay;this.eventManager.addEventListener(e.documentElement,"keydown",(e=>this.onKeyDown(e))),this.eventManager.addEventListener(e.documentElement,"keyup",(()=>this.onKeyUp())),this.eventManager.addEventListener(e,"visibilitychange",(()=>this.onKeyUp())),this.eventManager.addEventListener(o,"scroll",(e=>this.onTableScroll(e)),{passive:!0}),o!==s&&this.eventManager.addEventListener(s,"scroll",(e=>this.onTableScroll(e)),{passive:!0});const i=t.devicePixelRatio&&t.devicePixelRatio>1,r=this.scrollableElement===t,n=this.wtSettings.getSetting("preventWheel"),a={passive:r};(n||i||!(0,h.isChrome)())&&this.eventManager.addEventListener(this.wtTable.wtRootElement,"wheel",(e=>this.onCloneWheel(e,n)),a);let l;[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay].forEach((e=>{if(e&&e.needFullRender){const{holder:t}=e.clone.wtTable;this.eventManager.addEventListener(t,"wheel",(e=>this.onCloneWheel(e,n)),a)}})),this.eventManager.addEventListener(t,"resize",(()=>{clearTimeout(l),l=setTimeout((()=>{this.wtSettings.getSetting("onWindowResize")}),200)})),r||this.resizeObserver.observe(this.wtTable.wtRootElement.parentElement)}deregisterListeners(){this.eventManager.clearEvents(!0)}onTableScroll(e){const t=this.domBindings.rootWindow,o=this.inlineStartOverlay.mainTableScrollableElement,s=this.topOverlay.mainTableScrollableElement,i=e.target;this.keyPressed&&(s!==t&&i!==t&&!e.target.contains(s)||o!==t&&i!==t&&!e.target.contains(o))||this.syncScrollPositions(e)}onCloneWheel(e,t){const{rootWindow:o}=this.domBindings,s=this.inlineStartOverlay.mainTableScrollableElement,i=this.topOverlay.mainTableScrollableElement,r=e.target,n=i!==o&&r!==o&&!r.contains(i),a=s!==o&&r!==o&&!r.contains(s);if(this.keyPressed&&(n||a))return;const l=this.translateMouseWheelToScroll(e);(t||this.scrollableElement!==o&&l)&&e.preventDefault()}onKeyDown(e){this.keyPressed=(0,l.isKey)(e.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")}onKeyUp(){this.keyPressed=!1}translateMouseWheelToScroll(e){let t=isNaN(e.deltaY)?-1*e.wheelDeltaY:e.deltaY,o=isNaN(e.deltaX)?-1*e.wheelDeltaX:e.deltaX;1===e.deltaMode&&(o+=o*this.browserLineHeight,t+=t*this.browserLineHeight);const s=this.scrollVertically(t),i=this.scrollHorizontally(o);return s||i}scrollVertically(e){const t=this.scrollableElement.scrollTop;return this.scrollableElement.scrollTop+=e,t!==this.scrollableElement.scrollTop}scrollHorizontally(e){const t=this.scrollableElement.scrollLeft;return this.scrollableElement.scrollLeft+=e,t!==this.scrollableElement.scrollLeft}syncScrollPositions(){if(this.destroyed)return;const{rootWindow:e}=this.domBindings,t=this.topOverlay.clone.wtTable.holder,o=this.inlineStartOverlay.clone.wtTable.holder,[s,i]=[this.scrollableElement.scrollLeft,this.scrollableElement.scrollTop];if(this.horizontalScrolling=t.scrollLeft!==s||this.lastScrollX!==e.scrollX,this.verticalScrolling=o.scrollTop!==i||this.lastScrollY!==e.scrollY,this.lastScrollX=e.scrollX,this.lastScrollY=e.scrollY,this.horizontalScrolling){t.scrollLeft=s;const e=this.bottomOverlay.needFullRender?this.bottomOverlay.clone.wtTable.holder:null;e&&(e.scrollLeft=s)}this.verticalScrolling&&(o.scrollTop=i),this.refreshAll()}syncScrollWithMaster(){const e=this.topOverlay.mainTableScrollableElement,{scrollLeft:t,scrollTop:o}=e;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=t),this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=t),this.inlineStartOverlay.needFullRender&&(this.inlineStartOverlay.clone.wtTable.holder.scrollTop=o)}updateMainScrollableElements(){this.deregisterListeners(),this.inlineStartOverlay.updateMainScrollableElement(),this.topOverlay.updateMainScrollableElement(),this.bottomOverlay.needFullRender&&this.bottomOverlay.updateMainScrollableElement();const{wtTable:e}=this,{rootWindow:t}=this.domBindings;"hidden"===t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow")?this.scrollableElement=e.holder:this.scrollableElement=(0,r.getScrollableElement)(e.TABLE),this.registerListeners()}destroy(){this.resizeObserver.disconnect(),this.eventManager.destroy(),this.topOverlay.destroy(),this.bottomOverlay.clone&&this.bottomOverlay.destroy(),this.inlineStartOverlay.destroy(),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.destroy(),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.destroy(),this.destroyed=!0}refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateLastSpreaderSize()&&this.adjustElementsSize(),this.bottomOverlay.clone&&this.bottomOverlay.refresh(e),this.inlineStartOverlay.refresh(e),this.topOverlay.refresh(e),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.refresh(e),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.refresh(e)}updateLastSpreaderSize(){const e=this.wtTable.spreader,t=e.clientWidth,o=e.clientHeight,s=t!==this.spreaderLastSize.width||o!==this.spreaderLastSize.height;return s&&(this.spreaderLastSize.width=t,this.spreaderLastSize.height=o),s}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtViewport:t}=this.wot,{wtTable:o}=this,s=this.wtSettings.getSetting("totalColumns"),i=this.wtSettings.getSetting("totalRows"),r=t.getRowHeaderWidth(),n=t.getColumnHeaderHeight(),a=o.hider.style;if(a.width=`${r+this.inlineStartOverlay.sumCellSizes(0,s)}px`,a.height=`${n+this.topOverlay.sumCellSizes(0,i)+1}px`,this.scrollbarSize>0){const{scrollHeight:e,scrollWidth:t}=o.wtRootElement,{scrollHeight:s,scrollWidth:i}=o.holder;this.hasScrollbarRight=e<s,this.hasScrollbarBottom=t<i,this.hasScrollbarRight&&o.hider.scrollWidth+this.scrollbarSize>t?this.hasScrollbarBottom=!0:this.hasScrollbarBottom&&o.hider.scrollHeight+this.scrollbarSize>e&&(this.hasScrollbarRight=!0)}this.topOverlay.adjustElementsSize(e),this.inlineStartOverlay.adjustElementsSize(e),this.bottomOverlay.adjustElementsSize(e)}applyToDOM(){this.wtTable.isVisible()&&(this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.inlineStartOverlay.applyToDOM())}getParentOverlay(e){if(!e)return null;const t=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];let o=null;return(0,a.arrayEach)(t,(t=>{t&&t.clone&&t.clone.wtTable.TABLE.contains(e)&&(o=t.clone)})),o}syncOverlayTableClassNames(){const e=this.wtTable.TABLE,t=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];(0,a.arrayEach)(t,(t=>{t&&(t.clone.wtTable.TABLE.className=e.className)}))}}},46593:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=s(o(94191));t.default=class{constructor(e,t){(0,i.default)(this,"nodesPool",null),(0,i.default)(this,"nodeType",void 0),(0,i.default)(this,"rootNode",void 0),(0,i.default)(this,"table",null),(0,i.default)(this,"renderedNodes",0),this.nodesPool="string"==typeof e?new r.default(e):null,this.nodeType=e,this.rootNode=t}setTable(e){this.nodesPool&&this.nodesPool.setRootDocument(e.rootDocument),this.table=e}adjust(){}render(){}}},91767:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(83302),n=o(1909),a=s(o(46593)),l=o(5386);class h extends a.default{constructor(){super("TD"),(0,i.default)(this,"orderViews",new WeakMap),(0,i.default)(this,"sourceRowIndex",0)}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new n.SharedOrderView(e,(e=>this.nodesPool.obtain(this.sourceRowIndex,e)),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,columnsToRender:t,rows:o,rowHeaders:s}=this.table;for(let a=0;a<e;a++){const e=this.table.renderedRowToSource(a),h=o.getRenderedNode(a);this.sourceRowIndex=e;const u=this.obtainOrderView(h),d=s.obtainOrderView(h);u.prependView(d).setSize(t).setOffset(this.table.renderedColumnToSource(0)).start();for(let o=0;o<t;o++){u.render();const t=u.getCurrentNode(),s=this.table.renderedColumnToSource(o);var i,n;if((0,r.hasClass)(t,"hide")||(t.className=""),t.removeAttribute("style"),t.removeAttribute("dir"),(0,r.removeAttribute)(t,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.cellRenderer(e,s,t),this.table.isAriaEnabled())(0,r.setAttribute)(t,[...t.hasAttribute("role")?[]:[(0,l.A11Y_GRIDCELL)()],(0,l.A11Y_TABINDEX)(-1),(0,l.A11Y_COLINDEX)(s+(null!==(i=null===(n=this.table.rowUtils)||void 0===n||null===(n=n.dataAccessObject)||void 0===n?void 0:n.rowHeaders.length)&&void 0!==i?i:0)+1)])}u.end()}}}t.default=h},84888:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(46593)),r=o(83302);class n extends i.default{constructor(e){super(null,e)}adjust(){const{columnsToRender:e,rowHeadersCount:t}=this.table,o=e+t;for(;this.renderedNodes<o;)this.rootNode.appendChild(this.table.rootDocument.createElement("col")),this.renderedNodes+=1;for(;this.renderedNodes>o;)this.rootNode.removeChild(this.rootNode.lastChild),this.renderedNodes-=1}render(){this.adjust();const{columnsToRender:e,rowHeadersCount:t}=this.table;for(let e=0;e<t;e++){const t=this.table.renderedColumnToSource(e),o=this.table.columnUtils.getHeaderWidth(t);this.rootNode.childNodes[e].style.width=`${o}px`}for(let o=0;o<e;o++){const e=this.table.renderedColumnToSource(o),s=this.table.columnUtils.getStretchedColumnWidth(e);this.rootNode.childNodes[o+t].style.width=`${s}px`}const o=this.rootNode.firstChild;o&&(0,r.addClass)(o,"rowHeader")}}t.default=n},90802:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=o(83302),r=s(o(46593)),n=o(5386);class a extends r.default{constructor(e){super(null,e)}adjust(){const{columnHeadersCount:e,rowHeadersCount:t}=this.table;let o=this.rootNode.firstChild;if(e){const{columnsToRender:s}=this.table,i=s+t;for(let t=0,s=e;t<s;t++){for(o=this.rootNode.childNodes[t],o||(o=this.table.rootDocument.createElement("tr"),this.rootNode.appendChild(o)),this.renderedNodes=o.childNodes.length;this.renderedNodes<i;)o.appendChild(this.table.rootDocument.createElement("th")),this.renderedNodes+=1;for(;this.renderedNodes>i;)o.removeChild(o.lastChild),this.renderedNodes-=1}const r=this.rootNode.childNodes.length;if(r>e)for(let t=e;t<r;t++)this.rootNode.removeChild(this.rootNode.lastChild)}else o&&(0,i.empty)(o)}render(){const{columnHeadersCount:e}=this.table;this.table.isAriaEnabled()&&(0,i.setAttribute)(this.rootNode,[(0,n.A11Y_ROWGROUP)()]);for(let t=0;t<e;t+=1){const{columnHeaderFunctions:e,columnsToRender:o,rowHeadersCount:s}=this.table,r=this.rootNode.childNodes[t];this.table.isAriaEnabled()&&(0,i.setAttribute)(r,[(0,n.A11Y_ROW)(),(0,n.A11Y_ROWINDEX)(t+1)]);for(let a=-1*s;a<o;a+=1){const o=this.table.renderedColumnToSource(a),l=r.childNodes[a+s];l.className="",l.removeAttribute("style"),(0,i.removeAttribute)(l,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&(0,i.setAttribute)(l,[(0,n.A11Y_COLINDEX)(a+1+this.table.rowHeadersCount),(0,n.A11Y_TABINDEX)(-1),(0,n.A11Y_COLUMNHEADER)(),...a>=0?[(0,n.A11Y_SCOPE_COL)()]:[(0,n.A11Y_ROW)()]]),e[t](o,l,t)}}}}t.default=a},96649:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(68384));t.RowHeadersRenderer=i.default;var r=s(o(90802));t.ColumnHeadersRenderer=r.default;var n=s(o(84888));t.ColGroupRenderer=n.default;var a=s(o(77267));t.RowsRenderer=a.default;var l=s(o(91767));t.CellsRenderer=l.default;var h=s(o(46538));t.TableRenderer=h.default;t.Renderer=class{constructor(){let{TABLE:e,THEAD:t,COLGROUP:o,TBODY:s,rowUtils:u,columnUtils:d,cellRenderer:c}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderer=new h.default(e,{cellRenderer:c}),this.renderer.setRenderers({rowHeaders:new i.default,columnHeaders:new r.default(t),colGroup:new n.default(o),rows:new a.default(s),cells:new l.default}),this.renderer.setAxisUtils(u,d)}setFilters(e,t){return this.renderer.setFilters(e,t),this}setViewportSize(e,t){return this.renderer.setViewportSize(e,t),this}setHeaderContentRenderers(e,t){return this.renderer.setHeaderContentRenderers(e,t),this}adjust(){this.renderer.adjust()}render(){this.renderer.render()}}},68384:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(1909),n=s(o(46593)),a=o(83302),l=o(5386);class h extends n.default{constructor(){super("TH"),(0,i.default)(this,"orderViews",new WeakMap),(0,i.default)(this,"sourceRowIndex",0)}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new r.SharedOrderView(e,(e=>this.nodesPool.obtain(this.sourceRowIndex,e)),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,rowHeaderFunctions:t,rowHeadersCount:o,rows:s,cells:i}=this.table;for(let r=0;r<e;r++){const e=this.table.renderedRowToSource(r),n=s.getRenderedNode(r);this.sourceRowIndex=e;const h=this.obtainOrderView(n),u=i.obtainOrderView(n);h.appendView(u).setSize(o).setOffset(this.table.renderedColumnToSource(0)).start();for(let s=0;s<o;s++){h.render();const o=h.getCurrentNode();o.className="",o.removeAttribute("style"),(0,a.removeAttribute)(o,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&(0,a.setAttribute)(o,[(0,l.A11Y_ROWHEADER)(),(0,l.A11Y_SCOPE_ROW)(),(0,l.A11Y_COLINDEX)(s+1),(0,l.A11Y_TABINDEX)(-1)]),t[s](e,o,s)}h.end()}}}t.default=h},77267:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(69173),n=o(28236),a=o(1909),l=s(o(46593)),h=o(83302),u=o(5386);let d=!1;class c extends l.default{constructor(e){super("TR",e),(0,i.default)(this,"orderView",void 0),this.orderView=new a.OrderView(e,(e=>this.nodesPool.obtain(e)),this.nodeType)}getRenderedNode(e){return this.orderView.getNode(e)}render(){const{rowsToRender:e}=this.table;!d&&e>1e3&&(d=!0,(0,r.warn)(n.toSingleLine`Performance tip: Handsontable rendered more than 1000 visible rows. Consider limiting\x20
32
- the number of rendered rows by specifying the table height and/or turning off the "renderAllRows" option.`)),this.table.isAriaEnabled()&&(0,h.setAttribute)(this.rootNode,[(0,u.A11Y_ROWGROUP)()]),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(let s=0;s<e;s++){this.orderView.render();const e=this.orderView.getCurrentNode(),i=this.table.renderedRowToSource(s);var t,o;if(this.table.isAriaEnabled())(0,h.setAttribute)(e,[(0,u.A11Y_ROW)(),(0,u.A11Y_ROWINDEX)(i+(null!==(t=null===(o=this.table.rowUtils)||void 0===o||null===(o=o.dataAccessObject)||void 0===o?void 0:o.columnHeaders.length)&&void 0!==t?t:0)+1)])}this.orderView.end()}}t.default=c},46538:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231));t.default=class{constructor(e){let{cellRenderer:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,i.default)(this,"rootNode",void 0),(0,i.default)(this,"rootDocument",void 0),(0,i.default)(this,"rowHeaders",null),(0,i.default)(this,"columnHeaders",null),(0,i.default)(this,"colGroup",null),(0,i.default)(this,"rows",null),(0,i.default)(this,"cells",null),(0,i.default)(this,"rowFilter",null),(0,i.default)(this,"columnFilter",null),(0,i.default)(this,"rowUtils",null),(0,i.default)(this,"columnUtils",null),(0,i.default)(this,"rowsToRender",0),(0,i.default)(this,"columnsToRender",0),(0,i.default)(this,"rowHeaderFunctions",[]),(0,i.default)(this,"rowHeadersCount",0),(0,i.default)(this,"columnHeaderFunctions",[]),(0,i.default)(this,"columnHeadersCount",0),(0,i.default)(this,"cellRenderer",void 0),this.rootNode=e,this.rootDocument=this.rootNode.ownerDocument,this.cellRenderer=t}setAxisUtils(e,t){this.rowUtils=e,this.columnUtils=t}setViewportSize(e,t){this.rowsToRender=e,this.columnsToRender=t}setFilters(e,t){this.rowFilter=e,this.columnFilter=t}setHeaderContentRenderers(e,t){this.rowHeaderFunctions=e,this.rowHeadersCount=e.length,this.columnHeaderFunctions=t,this.columnHeadersCount=t.length}setRenderers(){let{rowHeaders:e,columnHeaders:t,colGroup:o,rows:s,cells:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.setTable(this),t.setTable(this),o.setTable(this),s.setTable(this),i.setTable(this),this.rowHeaders=e,this.columnHeaders=t,this.colGroup=o,this.rows=s,this.cells=i}renderedRowToSource(e){return this.rowFilter.renderedToSource(e)}renderedColumnToSource(e){return this.columnFilter.renderedToSource(e)}isAriaEnabled(){return this.rowUtils.wtSettings.getSetting("ariaTags")}render(){this.colGroup.adjust(),this.columnHeaders.adjust(),this.rows.adjust(),this.rowHeaders.adjust(),this.columnHeaders.render(),this.rows.render(),this.rowHeaders.render(),this.cells.render(),this.columnUtils.calculateWidths(),this.colGroup.render();const{rowsToRender:e,rows:t}=this;for(let o=0;o<e;o++){const e=t.getRenderedNode(o);if(e.firstChild){const t=this.renderedRowToSource(o),s=this.rowUtils.getHeight(t);e.firstChild.style.height=s?s-1+"px":""}}}}},52188:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(83302);t.default=class{constructor(e){(0,i.default)(this,"dataAccessObject",void 0),(0,i.default)(this,"lastScrolledColumnPos",-1),(0,i.default)(this,"lastScrolledRowPos",-1),this.dataAccessObject=e}scrollViewport(e,t,o,s,i){const r=this.scrollViewportHorizontally(e.col,o,i),n=this.scrollViewportVertically(e.row,t,s);return r||n}scrollViewportHorizontally(e,t,o){const{drawn:s,totalColumns:i}=this.dataAccessObject;if(!s||!Number.isInteger(e)||e<0||e>i)return!1;const r=this.getFirstVisibleColumn(),n=this.getLastVisibleColumn(),a=void 0===t&&void 0===o,{fixedColumnsStart:l,inlineStartOverlay:h}=this.dataAccessObject;if(a&&e<l)return!1;let u=!1;return e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollHorizontally",e),-1===r?u=h.scrollTo(e,a?e>this.lastScrolledColumnPos:t):(a&&(e<r||e>n)||!a)&&(u=h.scrollTo(e,a?e>n:t)),u&&(this.lastScrolledColumnPos=e),u}scrollViewportVertically(e,t,o){const{drawn:s,totalRows:i}=this.dataAccessObject;if(!s||!Number.isInteger(e)||e<0||e>i)return!1;const r=this.getFirstVisibleRow(),n=this.getLastVisibleRow(),a=void 0===t&&void 0===o,{fixedRowsBottom:l,fixedRowsTop:h,topOverlay:u}=this.dataAccessObject;if(a&&(e<h||e>i-l-1))return!1;let d=!1;return e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollVertically",e),-1===r?d=u.scrollTo(e,a?e>this.lastScrolledRowPos:o):(a&&(e<r||e>n)||!a)&&(d=u.scrollTo(e,a?e>n:o)),d&&(this.lastScrolledRowPos=e),d}getFirstVisibleRow(){const{topOverlay:e,wtTable:t,wtViewport:o,totalRows:s,fixedRowsTop:i,rootWindow:n}=this.dataAccessObject;let a=t.getFirstVisibleRow();if(e.mainTableScrollableElement===n){const l=(0,r.offset)(t.wtRootElement),h=(0,r.innerHeight)(t.hider),u=(0,r.innerHeight)(n),d=(0,r.getScrollTop)(n,n);if(l.top+h-u<=d){let t=o.getColumnHeaderHeight();t+=e.sumCellSizes(0,i);for(let o=s;o>0;o--)if(t+=e.sumCellSizes(o-1,o),l.top+h-t<=d){a=o;break}}}return a}getLastVisibleRow(){const{topOverlay:e,wtTable:t,wtViewport:o,totalRows:s,rootWindow:i}=this.dataAccessObject;let n=t.getLastVisibleRow();if(e.mainTableScrollableElement===i){const a=(0,r.offset)(t.wtRootElement),l=(0,r.getScrollTop)(i,i);if(a.top>l){const t=(0,r.innerHeight)(i);let h=o.getColumnHeaderHeight();for(let o=1;o<=s;o++)if(h+=e.sumCellSizes(o-1,o),a.top+h-l>=t){n=o-2;break}}}return n}getFirstVisibleColumn(){const{inlineStartOverlay:e,wtTable:t,wtViewport:o,totalColumns:s,rootWindow:i}=this.dataAccessObject;let n=t.getFirstVisibleColumn();if(e.mainTableScrollableElement===i){const a=(0,r.offset)(t.wtRootElement),l=(0,r.innerWidth)(t.hider),h=(0,r.innerWidth)(i),u=Math.abs((0,r.getScrollLeft)(i,i));if(a.left+l-h<=u){let t=o.getRowHeaderWidth();for(let o=s;o>0;o--)if(t+=e.sumCellSizes(o-1,o),a.left+l-t<=u){n=o;break}}}return n}getLastVisibleColumn(){const{wtSettings:e,inlineStartOverlay:t,wtTable:o,wtViewport:s,totalColumns:i,rootWindow:n}=this.dataAccessObject;let a=o.getLastVisibleColumn();if(t.mainTableScrollableElement===n){let l=null;if(e.getSetting("rtlMode")){const e=o.TABLE.getBoundingClientRect(),t=this.dataAccessObject.rootWindow.document.documentElement.offsetWidth;l=Math.abs(e.right-t)}else{l=(0,r.offset)(o.wtRootElement).left}const h=Math.abs((0,r.getScrollLeft)(n,n));if(l>h){const e=(0,r.innerWidth)(n);let o=s.getRowHeaderWidth();for(let s=1;s<=i;s++)if(o+=t.sumCellSizes(s-1,s),l+o-h>=e){a=s-2;break}}}return a}}},67175:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(83302),i=o(24449),r=o(22232),n=o(37595),a=o(97132);t.default=class{constructor(e,t){t&&(this.eventManager=e.eventManager,this.instance=e,this.wot=e,this.settings=t,this.mouseDown=!1,this.main=null,this.top=null,this.bottom=null,this.start=null,this.end=null,this.topStyle=null,this.bottomStyle=null,this.startStyle=null,this.endStyle=null,this.cornerDefaultStyle=a.CORNER_DEFAULT_STYLE,this.cornerCenterPointOffset=-parseInt(this.cornerDefaultStyle.width,10)/2,this.corner=null,this.cornerStyle=null,this.createBorders(t),this.registerListeners())}registerListeners(){const e=this.wot.rootDocument.body;this.eventManager.addEventListener(e,"mousedown",(()=>this.onMouseDown())),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp()));for(let e=0,t=this.main.childNodes.length;e<t;e++){const t=this.main.childNodes[e];this.eventManager.addEventListener(t,"mouseenter",(t=>this.onMouseEnter(t,this.main.childNodes[e])))}}onMouseDown(){this.mouseDown=!0}onMouseUp(){this.mouseDown=!1}onMouseEnter(e,t){if(!this.mouseDown||!this.wot.getSetting("hideBorderOnMouseDownOver"))return;e.preventDefault(),(0,i.stopImmediatePropagation)(e);const o=this,s=this.wot.rootDocument.body,r=t.getBoundingClientRect();t.style.display="none",this.eventManager.addEventListener(s,"mousemove",(function e(i){var n;((n=i).clientY<Math.floor(r.top)||n.clientY>Math.ceil(r.top+r.height)||n.clientX<Math.floor(r.left)||n.clientX>Math.ceil(r.left+r.width))&&(o.eventManager.removeEventListener(s,"mousemove",e),t.style.display="block")}))}createBorders(e){const{rootDocument:t}=this.wot;this.main=t.createElement("div");const o=["top","start","bottom","end","corner"];let s=this.main.style;s.position="absolute",s.top=0,s.left=0;for(let i=0;i<5;i++){const r=o[i],n=t.createElement("div");n.className=`wtBorder ${this.settings.className||""}`,this.settings[r]&&this.settings[r].hide&&(n.className+=" hidden"),s=n.style,s.backgroundColor=this.settings[r]&&this.settings[r].color?this.settings[r].color:e.border.color,s.height=this.settings[r]&&this.settings[r].width?`${this.settings[r].width}px`:`${e.border.width}px`,s.width=this.settings[r]&&this.settings[r].width?`${this.settings[r].width}px`:`${e.border.width}px`,this.main.appendChild(n)}this.top=this.main.childNodes[0],this.start=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.end=this.main.childNodes[3],this.topStyle=this.top.style,this.startStyle=this.start.style,this.bottomStyle=this.bottom.style,this.endStyle=this.end.style,this.corner=this.main.childNodes[4],this.corner.className+=" corner",this.cornerStyle=this.corner.style,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.height=this.cornerDefaultStyle.height,this.cornerStyle.border=[this.cornerDefaultStyle.borderWidth,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),(0,n.isMobileBrowser)()&&this.createMultipleSelectorHandles(),this.disappear();const{wtTable:i}=this.wot;let r=i.bordersHolder;r||(r=t.createElement("div"),r.className="htBorders",i.bordersHolder=r,i.spreader.appendChild(r)),r.appendChild(this.main)}createMultipleSelectorHandles(){const{rootDocument:e}=this.wot;this.selectionHandles={top:e.createElement("DIV"),topHitArea:e.createElement("DIV"),bottom:e.createElement("DIV"),bottomHitArea:e.createElement("DIV")};this.selectionHandles.top.className="topSelectionHandle topLeftSelectionHandle",this.selectionHandles.topHitArea.className="topSelectionHandle-HitArea topLeftSelectionHandle-HitArea",this.selectionHandles.bottom.className="bottomSelectionHandle bottomRightSelectionHandle",this.selectionHandles.bottomHitArea.className="bottomSelectionHandle-HitArea bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={top:this.selectionHandles.top.style,topHitArea:this.selectionHandles.topHitArea.style,bottom:this.selectionHandles.bottom.style,bottomHitArea:this.selectionHandles.bottomHitArea.style};const t={position:"absolute",height:"40px",width:"40px","border-radius":`${parseInt(40/1.5,10)}px`};(0,r.objectEach)(t,((e,t)=>{this.selectionHandles.styles.bottomHitArea[t]=e,this.selectionHandles.styles.topHitArea[t]=e}));const o={position:"absolute",height:"10px",width:"10px","border-radius":`${parseInt(10/1.5,10)}px`,background:"#F5F5FF",border:"1px solid #4285c8"};(0,r.objectEach)(o,((e,t)=>{this.selectionHandles.styles.bottom[t]=e,this.selectionHandles.styles.top[t]=e})),this.main.appendChild(this.selectionHandles.top),this.main.appendChild(this.selectionHandles.bottom),this.main.appendChild(this.selectionHandles.topHitArea),this.main.appendChild(this.selectionHandles.bottomHitArea)}isPartRange(e,t){const o=this.wot.selectionManager.getAreaSelection();return!(!o.cellRange||e===o.cellRange.to.row&&t===o.cellRange.to.col)}updateMultipleSelectionHandlesPosition(e,t,o,s,i,r){const n=this.wot.wtSettings.getSetting("rtlMode")?"right":"left",{top:a,topHitArea:l,bottom:h,bottomHitArea:u}=this.selectionHandles.styles,d=parseInt(a.borderWidth,10),c=parseInt(a.width,10),g=parseInt(l.width,10),f=this.wot.wtTable.getWidth(),p=this.wot.wtTable.getHeight();a.top=`${parseInt(o-c-1,10)}px`,a[n]=`${parseInt(s-c-1,10)}px`,l.top=`${parseInt(o-g/4*3,10)}px`,l[n]=`${parseInt(s-g/4*3,10)}px`;const m=Math.min(parseInt(s+i,10),f-c-2*d),w=Math.min(parseInt(s+i-g/4,10),f-g-2*d);h[n]=`${m}px`,u[n]=`${w}px`;const C=Math.min(parseInt(o+r,10),p-c-2*d),v=Math.min(parseInt(o+r-g/4,10),p-g-2*d);h.top=`${C}px`,u.top=`${v}px`,this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(a.display="block",l.display="block",this.isPartRange(e,t)?(h.display="none",u.display="none"):(h.display="block",u.display="block")):(a.display="none",h.display="none",l.display="none",u.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||t===this.wot.wtSettings.getSetting("fixedColumnsStart")?(a.zIndex="9999",l.zIndex="9999"):(a.zIndex="",l.zIndex="")}appear(e){if(this.disabled)return;const{wtTable:t,rootDocument:o,rootWindow:i}=this.wot;let r,a,l,h,u,d;const c=t.getRenderedRowsCount();for(let o=0;o<c;o+=1){const s=t.rowFilter.renderedToSource(o);if(s>=e[0]&&s<=e[2]){r=s,u=e[0];break}}for(let o=c-1;o>=0;o-=1){const s=t.rowFilter.renderedToSource(o);if(s>=e[0]&&s<=e[2]){a=s;break}}const g=t.getRenderedColumnsCount();for(let o=0;o<g;o+=1){const s=t.columnFilter.renderedToSource(o);if(s>=e[1]&&s<=e[3]){l=s,d=e[1];break}}for(let o=g-1;o>=0;o-=1){const s=t.columnFilter.renderedToSource(o);if(s>=e[1]&&s<=e[3]){h=s;break}}if(void 0===r||void 0===l)return void this.disappear();let f=t.getCell(this.wot.createCellCoords(r,l));const p=r!==a||l!==h,m=p?t.getCell(this.wot.createCellCoords(a,h)):f,w=(0,s.offset)(f),C=p?(0,s.offset)(m):w,v=(0,s.offset)(t.TABLE),y=(0,s.outerWidth)(t.TABLE),E=w.top,S=w.left,R=this.wot.wtSettings.getSetting("rtlMode");let b=0,_=0;if(R){const e=(0,s.outerWidth)(f),t=i.innerWidth-v.left-y;_=S+e-C.left,b=i.innerWidth-S-e-t-1}else _=C.left+(0,s.outerWidth)(m)-S,b=S-v.left-1;if(this.isEntireColumnSelected(r,a)){const e=this.getDimensionsFromHeader("columns",l,h,u,v);let t=null;e&&([t,b,_]=e),t&&(f=t)}let T=E-v.top-1,O=C.top+(0,s.outerHeight)(m)-E;if(this.isEntireRowSelected(l,h)){const e=this.getDimensionsFromHeader("rows",r,a,d,v);let t=null;e&&([t,T,O]=e),t&&(f=t)}const M=(0,s.getComputedStyle)(f,i);parseInt(M.borderTopWidth,10)>0&&(T+=1,O=O>0?O-1:0),parseInt(M[R?"borderRightWidth":"borderLeftWidth"],10)>0&&(b+=1,_=_>0?_-1:0);const I=R?"right":"left";this.topStyle.top=`${T}px`,this.topStyle[I]=`${b}px`,this.topStyle.width=`${_}px`,this.topStyle.display="block",this.startStyle.top=`${T}px`,this.startStyle[I]=`${b}px`,this.startStyle.height=`${O}px`,this.startStyle.display="block";const N=Math.floor(this.settings.border.width/2);this.bottomStyle.top=T+O-N+"px",this.bottomStyle[I]=`${b}px`,this.bottomStyle.width=`${_}px`,this.bottomStyle.display="block",this.endStyle.top=`${T}px`,this.endStyle[I]=b+_-N+"px",this.endStyle.height=`${O+1}px`,this.endStyle.display="block";let A=this.settings.border.cornerVisible;A="function"==typeof A?A(this.settings.layerLevel):A;const P=this.wot.getSetting("onModifyGetCellCoords",a,h);let[x,H]=[a,h];if(P&&Array.isArray(P)&&([,,x,H]=P),(0,n.isMobileBrowser)()||!A||this.isPartRange(x,H))this.cornerStyle.display="none";else{this.cornerStyle.top=T+O+this.cornerCenterPointOffset-1+"px",this.cornerStyle[I]=b+_+this.cornerCenterPointOffset-1+"px",this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";let e=(0,s.getTrimmingContainer)(t.TABLE);const r=e===i;r&&(e=o.documentElement);const n=parseInt(this.cornerDefaultStyle.width,10)/2,l=parseInt(this.cornerDefaultStyle.height,10)/2;if(h===this.wot.getSetting("totalColumns")-1){const t=r?m.getBoundingClientRect().left:m.offsetLeft;let o=!1,i=0;R?(i=t-parseInt(this.cornerDefaultStyle.width,10)/2,o=i<0):(i=t+(0,s.outerWidth)(m)+parseInt(this.cornerDefaultStyle.width,10)/2,o=i>=(0,s.innerWidth)(e)),o&&(this.cornerStyle[I]=`${Math.floor(b+_+this.cornerCenterPointOffset-n)}px`,this.cornerStyle[R?"borderLeftWidth":"borderRightWidth"]=0)}if(a===this.wot.getSetting("totalRows")-1){(r?m.getBoundingClientRect().top:m.offsetTop)+(0,s.outerHeight)(m)+parseInt(this.cornerDefaultStyle.height,10)/2>=(0,s.innerHeight)(e)&&(this.cornerStyle.top=`${Math.floor(T+O+this.cornerCenterPointOffset-l)}px`,this.cornerStyle.borderBottomWidth=0)}this.cornerStyle.display="block"}(0,n.isMobileBrowser)()&&this.updateMultipleSelectionHandlesPosition(a,h,T,b,_,O)}isEntireColumnSelected(e,t){return e===this.wot.wtTable.getFirstRenderedRow()&&t===this.wot.wtTable.getLastRenderedRow()}isEntireRowSelected(e,t){return e===this.wot.wtTable.getFirstRenderedColumn()&&t===this.wot.wtTable.getLastRenderedColumn()}getDimensionsFromHeader(e,t,o,i,r){const{wtTable:n}=this.wot,a=n.wtRootElement.parentNode;let l=null,h=null,u=null,d=null,c=null,g=null,f=null,p=null;switch(e){case"rows":l=function(){return n.getRowHeader(...arguments)},h=function(){return(0,s.outerHeight)(...arguments)},u="ht__selection--rows",g="top";break;case"columns":l=function(){return n.getColumnHeader(...arguments)},h=function(){return(0,s.outerWidth)(...arguments)},u="ht__selection--columns",g="left"}if(a.classList.contains(u)){const e=this.wot.getSetting("columnHeaders").length;if(f=l(t,e-i),p=l(o,e-i),!f||!p)return!1;const n=(0,s.offset)(f),a=(0,s.offset)(p);return f&&p&&(d=n[g]-r[g]-1,c=a[g]+h(p)-n[g]),[f,d,c]}return!1}changeBorderStyle(e,t){const o=this[e].style,i=t[e];!i||i.hide?(0,s.addClass)(this[e],"hidden"):((0,s.hasClass)(this[e],"hidden")&&(0,s.removeClass)(this[e],"hidden"),o.backgroundColor=i.color,"top"!==e&&"bottom"!==e||(o.height=`${i.width}px`),"start"!==e&&"end"!==e||(o.width=`${i.width}px`))}changeBorderToDefaultStyle(e){const t=1,o="#000",s=this[e].style;s.backgroundColor=o,s.width=`${t}px`,s.height=`${t}px`}toggleHiddenClass(e,t){this.changeBorderToDefaultStyle(e),t?(0,s.addClass)(this[e],"hidden"):(0,s.removeClass)(this[e],"hidden")}disappear(){this.topStyle.display="none",this.bottomStyle.display="none",this.startStyle.display="none",this.endStyle.display="none",this.cornerStyle.display="none",(0,n.isMobileBrowser)()&&(this.selectionHandles.styles.top.display="none",this.selectionHandles.styles.topHitArea.display="none",this.selectionHandles.styles.bottom.display="none",this.selectionHandles.styles.bottomHitArea.display="none")}destroy(){this.eventManager.destroyWithOwnEventsOnly(),this.main.parentNode.removeChild(this.main)}}},97132:(e,t)=>{"use strict";t.__esModule=!0;t.CORNER_DEFAULT_STYLE=Object.freeze({width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"})},23009:(e,t)=>{"use strict";t.__esModule=!0;t.ACTIVE_HEADER_TYPE="active-header",t.HEADER_TYPE="header",t.AREA_TYPE="area",t.FOCUS_TYPE="focus",t.FILL_TYPE="fill",t.ROW_TYPE="row",t.COLUMN_TYPE="column",t.CUSTOM_SELECTION_TYPE="custom-selection"},88361:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i={SelectionManager:!0,Selection:!0},r=s(o(33468));t.Selection=r.default;var n=o(23009);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===n[e]||(t[e]=n[e]))}));var a=o(97132);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||(t[e]=a[e]))}));var l=o(86143);t.SelectionManager=l.SelectionManager},86143:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517),o(9815);var i=s(o(42538)),r=s(o(48427)),n=o(83302),a=o(7161),l=s(o(67175));function h(e,t,o){u(e,t),t.set(e,o)}function u(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}var d=new WeakMap,c=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,w=new WeakSet;function C(){const e=(0,i.default)(this,f).get((0,i.default)(this,d)),t=(0,i.default)(this,d).wtSettings.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(t))for(let o=0;o<t.length;o++)e.add(t[o]);e.forEach((e=>{var t,o;const s=(0,i.default)(this,d).wtTable.TABLE.querySelectorAll(`.${e}`);let r=[];Array.isArray(null===(t=(0,i.default)(this,c).options)||void 0===t?void 0:t.cellAttributes)&&(r=(0,i.default)(this,c).options.cellAttributes.map((e=>e[0]))),Array.isArray(null===(o=(0,i.default)(this,c).options)||void 0===o?void 0:o.headerAttributes)&&(r=[...r,...(0,i.default)(this,c).options.headerAttributes.map((e=>e[0]))]);for(let t=0,o=s.length;t<o;t++)(0,n.removeClass)(s[t],e),(0,n.removeAttribute)(s[t],r)})),e.clear()}t.SelectionManager=class{constructor(e){var t,o;u(t=this,o=w),o.add(t),h(this,d,{writable:!0,value:void 0}),h(this,c,{writable:!0,value:void 0}),h(this,g,{writable:!0,value:new a.SelectionScanner}),h(this,f,{writable:!0,value:new WeakMap}),h(this,p,{writable:!0,value:new WeakSet}),h(this,m,{writable:!0,value:new Map}),(0,r.default)(this,c,e)}setActiveOverlay(e){return(0,r.default)(this,d,e),(0,i.default)(this,g).setActiveOverlay((0,i.default)(this,d)),(0,i.default)(this,f).has((0,i.default)(this,d))||(0,i.default)(this,f).set((0,i.default)(this,d),new Set),this}getFocusSelection(){return null!==(0,i.default)(this,c)?(0,i.default)(this,c).getFocus():null}getAreaSelection(){return null!==(0,i.default)(this,c)?(0,i.default)(this,c).createLayeredArea():null}getBorderInstance(e){if(!e.settings.border)return null;if((0,i.default)(this,m).has(e)){const t=(0,i.default)(this,m).get(e);if(t.has((0,i.default)(this,d)))return t.get((0,i.default)(this,d));const o=new l.default((0,i.default)(this,d),e.settings);return t.set((0,i.default)(this,d),o),o}const t=new l.default((0,i.default)(this,d),e.settings);return(0,i.default)(this,m).set(e,new Map([[(0,i.default)(this,d),t]])),t}getBorderInstances(e){var t,o;return Array.from(null!==(t=null===(o=(0,i.default)(this,m).get(e))||void 0===o?void 0:o.values())&&void 0!==t?t:[])}destroyBorders(e){(0,i.default)(this,m).get(e).forEach((e=>e.destroy())),(0,i.default)(this,m).delete(e)}render(e){if(null===(0,i.default)(this,c))return;e&&function(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}(this,w,C).call(this);const t=Array.from((0,i.default)(this,c)),o=new Map,s=new Map;for(let e=0;e<t.length;e++){const r=t[e],{className:n,headerAttributes:a,createLayers:l,selectionType:h}=r.settings;(0,i.default)(this,p).has(r)||((0,i.default)(this,p).add(r),r.addLocalHook("destroy",(()=>this.destroyBorders(r))));const u=this.getBorderInstance(r);if(r.isEmpty()){null==u||u.disappear();continue}if(n){(0,i.default)(this,g).setActiveSelection(r).scan().forEach((e=>{if(o.has(e)){const t=o.get(e);t.has(n)&&!0===l?t.set(n,t.get(n)+1):t.set(n,1)}else o.set(e,new Map([[n,1]]));a&&(s.has(e)||s.set(e,[]),"TH"===e.nodeName&&s.get(e).push(...a))}))}const c=r.getCorners();(0,i.default)(this,d).getSetting("onBeforeDrawBorders",c,h),null==u||u.appear(c)}o.forEach(((e,t)=>{var o;const s=Array.from(e).map((e=>{let[t,o]=e;return 1===o?t:[t,...Array.from({length:o-1},((e,o)=>`${t}-${o+1}`))]})).flat();s.forEach((e=>(0,i.default)(this,f).get((0,i.default)(this,d)).add(e))),(0,n.addClass)(t,s),"TD"===t.nodeName&&Array.isArray(null===(o=(0,i.default)(this,c).options)||void 0===o?void 0:o.cellAttributes)&&(0,n.setAttribute)(t,(0,i.default)(this,c).options.cellAttributes)})),Array.from(s.keys()).forEach((e=>{(0,n.setAttribute)(e,[...s.get(e)])}))}}},7161:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(42538)),r=s(o(48427)),n=o(83302);function a(e,t,o){l(e,t),t.set(e,o)}function l(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var u=new WeakMap,d=new WeakMap,c=new WeakSet;function g(e){const{wtTable:t}=(0,i.default)(this,d),o=t.getRenderedRowsCount(),s=t.getRenderedColumnsCount();for(let i=0;i<o;i+=1){const o=t.rowFilter.renderedToSource(i);for(let i=0;i<s;i+=1)e(o,t.columnFilter.renderedToSource(i))}}t.SelectionScanner=class{constructor(){var e,t;l(e=this,t=c),t.add(e),a(this,u,{writable:!0,value:void 0}),a(this,d,{writable:!0,value:void 0})}setActiveOverlay(e){return(0,r.default)(this,d,e),this}setActiveSelection(e){return(0,r.default)(this,u,e),this}scan(){const e=(0,i.default)(this,u).settings.selectionType,t=new Set;return"active-header"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e)))):"area"===e?this.scanCellsRange((e=>t.add(e))):"focus"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e))),this.scanCellsRange((e=>t.add(e)))):"fill"===e?this.scanCellsRange((e=>t.add(e))):"header"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e)))):"row"===e?(this.scanRowsInHeadersRange((e=>t.add(e))),this.scanRowsInCellsRange((e=>t.add(e)))):"column"===e&&(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanColumnsInCellsRange((e=>t.add(e)))),t}scanColumnsInHeadersRange(e){const[t,o,s,r]=(0,i.default)(this,u).getCorners(),{wtTable:n}=(0,i.default)(this,d),a=n.getRenderedColumnsCount(),l=n.getColumnHeadersCount();let h=0;for(let c=-n.getRowHeadersCount();c<a;c++){const a=n.columnFilter.renderedToSource(c);if(!(a<o||a>r)){for(let c=-l;c<0;c++){if(c<t||c>s)continue;const g=c+l;let f=n.getColumnHeader(a,g);const p=(0,i.default)(this,d).getSetting("onBeforeHighlightingColumnHeader",a,g,{selectionType:(0,i.default)(this,u).settings.selectionType,columnCursor:h,selectionWidth:r-o+1});null!==p&&(p!==a&&(f=n.getColumnHeader(p,g)),e(f))}h+=1}}}scanRowsInHeadersRange(e){const[t,o,s,r]=(0,i.default)(this,u).getCorners(),{wtTable:n}=(0,i.default)(this,d),a=n.getRenderedRowsCount(),l=n.getRowHeadersCount();let h=0;for(let c=-n.getColumnHeadersCount();c<a;c++){const a=n.rowFilter.renderedToSource(c);if(!(a<t||a>s)){for(let c=-l;c<0;c++){if(c<o||c>r)continue;const g=c+l;let f=n.getRowHeader(a,g);const p=(0,i.default)(this,d).getSetting("onBeforeHighlightingRowHeader",a,g,{selectionType:(0,i.default)(this,u).settings.selectionType,rowCursor:h,selectionHeight:s-t+1});null!==p&&(p!==a&&(f=n.getRowHeader(p,g)),e(f))}h+=1}}}scanCellsRange(e){const[t,o,s,r]=(0,i.default)(this,u).getCorners(),{wtTable:a}=(0,i.default)(this,d);h(this,c,g).call(this,((l,h)=>{if(l>=t&&l<=s&&h>=o&&h<=r){const t=a.getCell((0,i.default)(this,d).createCellCoords(l,h)),o=(0,i.default)(this,d).getSetting("onAfterDrawSelection",l,h,(0,i.default)(this,u).settings.layerLevel);"string"==typeof o&&(0,n.addClass)(t,o),e(t)}}))}scanRowsInCellsRange(e){const[t,,o]=(0,i.default)(this,u).getCorners(),{wtTable:s}=(0,i.default)(this,d);h(this,c,g).call(this,((r,n)=>{if(r>=t&&r<=o){const t=s.getCell((0,i.default)(this,d).createCellCoords(r,n));e(t)}}))}scanColumnsInCellsRange(e){const[,t,,o]=(0,i.default)(this,u).getCorners(),{wtTable:s}=(0,i.default)(this,d);h(this,c,g).call(this,((r,n)=>{if(n>=t&&n<=o){const t=s.getCell((0,i.default)(this,d).createCellCoords(r,n));e(t)}}))}}},33468:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=o(22232),r=s(o(65718));class n{constructor(e,t){this.settings=e,this.cellRange=t||null}isEmpty(){return null===this.cellRange}add(e){return this.isEmpty()?this.cellRange=this.settings.createCellRange(e):this.cellRange.expand(e),this}replace(e,t){if(!this.isEmpty()){if(this.cellRange.from.isEqual(e))return this.cellRange.from=t,!0;if(this.cellRange.to.isEqual(e))return this.cellRange.to=t,!0}return!1}clear(){return this.cellRange=null,this}getCorners(){const e=this.cellRange.getOuterTopStartCorner(),t=this.cellRange.getOuterBottomEndCorner();return[e.row,e.col,t.row,t.col]}destroy(){this.runLocalHooks("destroy")}}(0,i.mixin)(n,r.default);t.default=n},64057:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(83302),n=o(22232);t.default=class{constructor(e){(0,i.default)(this,"settings",{}),(0,i.default)(this,"defaults",Object.freeze(this.getDefaults())),(0,n.objectEach)(this.defaults,((t,o)=>{if(void 0!==e[o])this.settings[o]=e[o];else{if(void 0===t)throw new Error(`A required setting "${o}" was not provided`);this.settings[o]=t}}))}getDefaults(){return{facade:void 0,table:void 0,isDataViewInstance:!0,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,preventOverflow:()=>!1,preventWheel:!1,data:void 0,freezeOverlays:!1,fixedColumnsStart:0,fixedRowsTop:0,fixedRowsBottom:0,shouldRenderInlineStartOverlay:()=>this.getSetting("fixedColumnsStart")>0||this.getSetting("rowHeaders").length>0,shouldRenderTopOverlay:()=>this.getSetting("fixedRowsTop")>0||this.getSetting("columnHeaders").length>0,shouldRenderBottomOverlay:()=>this.getSetting("fixedRowsBottom")>0,minSpareRows:0,rowHeaders:()=>[],columnHeaders:()=>[],totalRows:void 0,totalColumns:void 0,cellRenderer:(e,t,o)=>{const s=this.getSetting("data",e,t);(0,r.fastInnerText)(o,null==s?"":s)},columnWidth(){},rowHeight(){},defaultRowHeight:23,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,onCellMouseDown:null,onCellContextMenu:null,onCellMouseOver:null,onCellMouseOut:null,onCellMouseUp:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeRemoveCellClassNames:null,onAfterDrawSelection:null,onBeforeDrawBorders:null,onBeforeViewportScrollHorizontally:e=>e,onBeforeViewportScrollVertically:e=>e,onScrollHorizontally:null,onScrollVertically:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onBeforeStretchingColumnWidth:e=>e,onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onBeforeHighlightingRowHeader:e=>e,onBeforeHighlightingColumnHeader:e=>e,onWindowResize:null,onContainerElementResize:null,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null,rtlMode:!1,ariaTags:!0}}update(e,t){return void 0===t?(0,n.objectEach)(e,((e,t)=>{this.settings[t]=e})):this.settings[e]=t,this}getSetting(e,t,o,s,i){return"function"==typeof this.settings[e]?this.settings[e](t,o,s,i):void 0!==t&&Array.isArray(this.settings[e])?this.settings[e][t]:this.settings[e]}getSettingPure(e){return this.settings[e]}has(e){return!!this.settings[e]}}},45460:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=o(83302),n=o(85015),a=s(o(65946)),l=s(o(22350)),h=o(96649),u=s(o(35863)),d=s(o(72772)),c=o(89381),g=o(5386);t.default=class{constructor(e,t,o,s,n){(0,i.default)(this,"wtSettings",null),(0,i.default)(this,"domBindings",void 0),(0,i.default)(this,"TBODY",null),(0,i.default)(this,"THEAD",null),(0,i.default)(this,"COLGROUP",null),(0,i.default)(this,"hasTableHeight",!0),(0,i.default)(this,"hasTableWidth",!0),(0,i.default)(this,"isTableVisible",!1),(0,i.default)(this,"tableOffset",0),(0,i.default)(this,"holderOffset",0),this.domBindings=o,this.isMaster="master"===n,this.name=n,this.dataAccessObject=e,this.facadeGetter=t,this.wtSettings=s,this.instance=this.dataAccessObject.wot,this.wot=this.dataAccessObject.wot,this.TABLE=o.rootTable,(0,r.removeTextNodes)(this.TABLE),this.spreader=this.createSpreader(this.TABLE),this.hider=this.createHider(this.spreader),this.holder=this.createHolder(this.hider),this.wtRootElement=this.holder.parentNode,this.isMaster&&this.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;const a=this.wtSettings.getSettingPure("rowHeaderWidth");this.wtSettings.update("rowHeaderWidth",(()=>this._modifyRowHeaderWidth(a))),this.rowUtils=new d.default(this.dataAccessObject,this.wtSettings),this.columnUtils=new u.default(this.dataAccessObject,this.wtSettings),this.tableRenderer=new h.Renderer({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wtSettings.getSettingPure("cellRenderer")})}is(e){return this.name===e}fixTableDomTree(){const e=this.domBindings.rootDocument;this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=e.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=e.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=e.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD))}createSpreader(e){const t=e.parentNode;let o;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,r.hasClass)(t,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.className="wtSpreader",t&&t.insertBefore(o,e),o.appendChild(e)),o.style.position="relative",this.wtSettings.getSetting("ariaTags")&&(0,r.setAttribute)(o,[(0,g.A11Y_PRESENTATION)()]),o}createHider(e){const t=e.parentNode;let o;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,r.hasClass)(t,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.className="wtHider",t&&t.insertBefore(o,e),o.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,r.setAttribute)(o,[(0,g.A11Y_PRESENTATION)()]),o}createHolder(e){const t=e.parentNode;let o;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,r.hasClass)(t,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.style.position="relative",o.className="wtHolder",t&&t.insertBefore(o,e),this.isMaster&&(o.parentNode.className+="ht_master handsontable",o.parentNode.setAttribute("dir",this.wtSettings.getSettingPure("rtlMode")?"rtl":"ltr"),this.wtSettings.getSetting("ariaTags")&&(0,r.setAttribute)(o.parentNode,[(0,g.A11Y_PRESENTATION)()])),o.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,r.setAttribute)(o,[(0,g.A11Y_PRESENTATION)()]),o}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,{wtOverlays:o,wtViewport:s}=this.dataAccessObject,i=t.getSetting("totalRows"),n=t.getSetting("totalColumns"),h=t.getSetting("rowHeaders"),u=h.length,d=t.getSetting("columnHeaders"),g=d.length;let f=!1,p=e;if(this.isMaster&&(this.holderOffset=(0,r.offset)(this.holder),p=s.createRenderCalculators(p),u&&!t.getSetting("fixedColumnsStart"))){const e=o.inlineStartOverlay.getScrollPosition(),t=this.correctHeaderWidth;this.correctHeaderWidth=0!==e,t!==this.correctHeaderWidth&&(p=!1)}if(this.isMaster&&(f=o.updateStateOfRendering()),p)this.isMaster&&s.createVisibleCalculators(),o&&o.refresh(!0);else{this.isMaster?this.tableOffset=(0,r.offset)(this.TABLE):this.tableOffset=this.dataAccessObject.parentTableOffset;const e=i>0?this.getFirstRenderedRow():0,t=n>0?this.getFirstRenderedColumn():0;this.rowFilter=new l.default(e,i,g),this.columnFilter=new a.default(t,n,u);let o=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();const e={};this.wtSettings.getSetting("beforeDraw",!0,e),o=!0!==e.skipRender}if(o){let e;if(this.tableRenderer.setHeaderContentRenderers(h,d),(this.is(c.CLONE_BOTTOM)||this.is(c.CLONE_BOTTOM_INLINE_START_CORNER))&&this.tableRenderer.setHeaderContentRenderers(h,[]),this.resetOversizedRows(),this.tableRenderer.setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&(e=this.dataAccessObject.workspaceWidth,this.dataAccessObject.wtViewport.containerWidth=null,this.markOversizedColumnHeaders()),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(c.CLONE_BOTTOM))&&this.markOversizedRows(),this.isMaster){this.dataAccessObject.wtViewport.createVisibleCalculators(),this.dataAccessObject.wtOverlays.refresh(!1),this.dataAccessObject.wtOverlays.applyToDOM();const t=(0,r.outerWidth)(this.hider),o=(0,r.outerWidth)(this.TABLE);0!==t&&o!==t&&(this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),e!==this.dataAccessObject.wtViewport.getWorkspaceWidth()&&(this.dataAccessObject.wtViewport.containerWidth=null,this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),this.wtSettings.getSetting("onDraw",!0)}else this.is(c.CLONE_BOTTOM)&&this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize()}}let m=!1;return this.isMaster&&(m=o.topOverlay.resetFixedPosition(),o.bottomOverlay.clone&&(m=o.bottomOverlay.resetFixedPosition()||m),m=o.inlineStartOverlay.resetFixedPosition()||m,o.topInlineStartCornerOverlay&&o.topInlineStartCornerOverlay.resetFixedPosition(),o.bottomInlineStartCornerOverlay&&o.bottomInlineStartCornerOverlay.clone&&o.bottomInlineStartCornerOverlay.resetFixedPosition()),m?(o.refreshAll(),o.adjustElementsSize()):this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(p),f&&o.syncScrollWithMaster(),this.dataAccessObject.drawn=!0,this}markIfOversizedColumnHeader(e){const t=this.columnFilter.renderedToSource(e);let o=this.wtSettings.getSetting("columnHeaders").length;const s=this.wtSettings.getSetting("defaultRowHeight");let i,n,a;const l=this.wtSettings.getSetting("columnHeaderHeight")||[];for(;o;)o-=1,i=this.getColumnHeaderHeight(o),n=this.getColumnHeader(t,o),n&&(a=(0,r.innerHeight)(n),(!i&&s<a||i<a)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=a),Array.isArray(l)?null!==l[o]&&void 0!==l[o]&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=l[o]):isNaN(l)||(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=l),this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]<(l[o]||l)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=l[o]||l))}adjustColumnHeaderHeights(){const{wtSettings:e}=this,t=this.THEAD.childNodes,o=this.dataAccessObject.wtViewport.oversizedColumnHeaders;for(let s=0,i=e.getSetting("columnHeaders").length;s<i;s++)if(o[s]){if(!t[s]||0===t[s].childNodes.length)return;t[s].childNodes[0].style.height=`${o[s]}px`}}resetOversizedRows(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject;if((this.isMaster||this.is(c.CLONE_BOTTOM))&&!e.getSetting("externalRowCalculator")){const e=this.getRenderedRowsCount();for(let o=0;o<e;o++){const e=this.rowFilter.renderedToSource(o);t.oversizedRows&&t.oversizedRows[e]&&(t.oversizedRows[e]=void 0)}}}getCell(e){let t=e.row,o=e.col;const s=this.wtSettings.getSetting("onModifyGetCellCoords",t,o);if(s&&Array.isArray(s)&&([t,o]=s),this.isRowBeforeRenderedRows(t))return-1;if(this.isRowAfterRenderedRows(t))return-2;if(this.isColumnBeforeRenderedColumns(o))return-3;if(this.isColumnAfterRenderedColumns(o))return-4;const i=this.getRow(t);if(!i&&t>=0)throw new Error("TR was expected to be rendered but is not");const r=i.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(o)];if(!r&&o>=0)throw new Error("TD or TH was expected to be rendered but is not");return r}getRow(e){let t=null,o=null;var s,i;e<0?(t=null===(s=this.rowFilter)||void 0===s?void 0:s.sourceRowToVisibleColHeadedRow(e),o=this.THEAD):(t=null===(i=this.rowFilter)||void 0===i?void 0:i.sourceToRendered(e),o=this.TBODY);return void 0!==t&&void 0!==o&&(!(o.childNodes.length<t+1)&&o.childNodes[t])}getColumnHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const o=this.THEAD.childNodes[t];return null==o?void 0:o.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}getColumnHeaders(e){const t=[],o=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e);return this.THEAD.childNodes.forEach((e=>{const s=e.childNodes[o];s&&t.push(s)})),t}getRowHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t>=this.wtSettings.getSetting("rowHeaders").length)return;const o=this.rowFilter.sourceToRendered(e),s=o<0?this.rowFilter.sourceRowToVisibleColHeadedRow(e):o,i=(o<0?this.THEAD:this.TBODY).childNodes[s];return null==i?void 0:i.childNodes[t]}getRowHeaders(e){const t=[],o=this.wtSettings.getSetting("rowHeaders").length;for(let s=0;s<o;s++){const o=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)],i=null==o?void 0:o.childNodes[s];i&&t.push(i)}return t}getCoords(e){let t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=(0,r.closest)(t,["TD","TH"])),null===t)return null;const o=t.parentNode,s=o.parentNode;let i=(0,r.index)(o),n=t.cellIndex;if((0,r.overlayContainsElement)(c.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,r.overlayContainsElement)(c.CLONE_TOP,t,this.wtRootElement))"THEAD"===s.nodeName&&(i-=s.childNodes.length);else if((0,r.overlayContainsElement)(c.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)||(0,r.overlayContainsElement)(c.CLONE_BOTTOM,t,this.wtRootElement)){i=this.wtSettings.getSetting("totalRows")-s.childNodes.length+i}else i=s===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(i):this.rowFilter.renderedToSource(i);return n=(0,r.overlayContainsElement)(c.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,r.overlayContainsElement)(c.CLONE_INLINE_START,t,this.wtRootElement)||(0,r.overlayContainsElement)(c.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)?this.columnFilter.offsettedTH(n):this.columnFilter.visibleRowHeadedColumnToSourceColumn(n),this.wot.createCellCoords(i,n)}markOversizedRows(){if(this.wtSettings.getSetting("externalRowCalculator"))return;let e=this.TBODY.childNodes.length;let t,o,s,i,n;if(e*this.wtSettings.getSetting("defaultRowHeight")!==(0,r.innerHeight)(this.TBODY)-1||this.wtSettings.getSetting("fixedRowsBottom"))for(;e;)e-=1,s=this.rowFilter.renderedToSource(e),t=this.getRowHeight(s),i=this.getTrForRow(s),n=i.querySelector("th"),o=n?(0,r.innerHeight)(n):(0,r.innerHeight)(i)-1,(!t&&this.wtSettings.getSetting("defaultRowHeight")<o||t<o)&&(o+=1,this.dataAccessObject.wtViewport.oversizedRows[s]=o)}getTrForRow(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}isColumnHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("rowHeaders").length;return Math.abs(e)<=t}isRowHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("columnHeaders").length;return Math.abs(e)<=t}isRowBeforeRenderedRows(e){const t=this.getFirstRenderedRow();return e<0&&t<=0?!this.isRowHeaderRendered(e):e<t}isRowAfterRenderedRows(e){return e>this.getLastRenderedRow()}isColumnBeforeRenderedColumns(e){const t=this.getFirstRenderedColumn();return e<0&&t<=0?!this.isColumnHeaderRendered(e):e<t}isColumnAfterRenderedColumns(e){return this.columnFilter&&e>this.getLastRenderedColumn()}isColumnAfterViewport(e){return this.columnFilter&&e>this.getLastVisibleColumn()}isRowAfterViewport(e){return this.rowFilter&&e>this.getLastVisibleRow()}isColumnBeforeViewport(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0}isLastRowFullyVisible(){return this.getLastVisibleRow()===this.getLastRenderedRow()}isLastColumnFullyVisible(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}allRowsInViewport(){return this.wtSettings.getSetting("totalRows")===this.getVisibleRowsCount()}allColumnsInViewport(){return this.wtSettings.getSetting("totalColumns")===this.getVisibleColumnsCount()}getRowHeight(e){return this.rowUtils.getHeight(e)}getColumnHeaderHeight(e){return this.columnUtils.getHeaderHeight(e)}getColumnWidth(e){return this.columnUtils.getWidth(e)}getStretchedColumnWidth(e){return this.columnUtils.getStretchedColumnWidth(e)}hasDefinedSize(){return this.hasTableHeight&&this.hasTableWidth}getWidth(){return(0,r.outerWidth)(this.TABLE)}getHeight(){return(0,r.outerHeight)(this.TABLE)}getTotalWidth(){const e=(0,r.outerWidth)(this.hider);return 0!==e?e:this.getWidth()}getTotalHeight(){const e=(0,r.outerHeight)(this.hider);return 0!==e?e:this.getHeight()}isVisible(){return(0,r.isVisible)(this.TABLE)}_modifyRowHeaderWidth(e){let t=(0,n.isFunction)(e)?e():null;return Array.isArray(t)?(t=[...t],t[t.length-1]=this._correctRowHeaderWidth(t[t.length-1])):t=this._correctRowHeaderWidth(t),t}_correctRowHeaderWidth(e){let t=e;return"number"!=typeof e&&(t=this.wtSettings.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(t+=1),t}}},86363:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(45460)),r=s(o(6271)),n=s(o(92117)),a=o(22232),l=o(89381);class h extends i.default{constructor(e,t,o,s){super(e,t,o,s,l.CLONE_BOTTOM)}}(0,a.mixin)(h,r.default),(0,a.mixin)(h,n.default);t.default=h},58654:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(45460)),r=s(o(6271)),n=s(o(6214)),a=o(22232),l=o(89381);class h extends i.default{constructor(e,t,o,s){super(e,t,o,s,l.CLONE_BOTTOM_INLINE_START_CORNER)}}(0,a.mixin)(h,r.default),(0,a.mixin)(h,n.default);t.default=h},32173:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(45460)),r=s(o(37610)),n=s(o(6214)),a=o(22232),l=o(89381);class h extends i.default{constructor(e,t,o,s){super(e,t,o,s,l.CLONE_INLINE_START)}}(0,a.mixin)(h,r.default),(0,a.mixin)(h,n.default);t.default=h},94915:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=o(83302),r=s(o(45460)),n=s(o(37610)),a=s(o(92117)),l=o(22232);class h extends r.default{constructor(e,t,o,s){super(e,t,o,s,"master")}alignOverlaysWithTrimmingContainer(){const e=(0,i.getTrimmingContainer)(this.wtRootElement),{rootWindow:t}=this.domBindings;if(e===t){this.wtSettings.getSetting("preventOverflow")||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible")}else{const o=e.parentElement,s=(0,i.getStyle)(e,"height",t),r=(0,i.getStyle)(e,"overflow",t),n=this.holder.style,{scrollWidth:a,scrollHeight:l}=e;let h=e.offsetWidth,u=e.offsetHeight;if(o&&["auto","hidden","scroll"].includes(r)){const s=e.cloneNode(!1);s.style.overflow="auto",s.style.position="absolute",e.nextElementSibling?o.insertBefore(s,e.nextElementSibling):o.appendChild(s);const r=parseInt((0,i.getComputedStyle)(s,t).height,10);o.removeChild(s),0===r&&(u=0)}u=Math.min(u,l),n.height="auto"===s?"auto":`${u}px`,h=Math.min(h,a),n.width=`${h}px`,n.overflow="",this.hasTableHeight="auto"===n.height||u>0,this.hasTableWidth=h>0}this.isTableVisible=(0,i.isVisible)(this.TABLE)}markOversizedColumnHeaders(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject,o="master",s=e.getSetting("columnHeaders").length;if(s&&!t.hasOversizedColumnHeadersMarked[o]){const i=e.getSetting("rowHeaders").length,r=this.getRenderedColumnsCount();for(let e=0;e<s;e++)for(let e=-1*i;e<r;e++)this.markIfOversizedColumnHeader(e);t.hasOversizedColumnHeadersMarked[o]=!0}}}(0,l.mixin)(h,n.default),(0,l.mixin)(h,a.default);t.default=h},92117:(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedColumn(){const e=this.dataAccessObject.startColumnRendered;return null===e?-1:e},getFirstVisibleColumn(){const e=this.dataAccessObject.startColumnVisible;return null===e?-1:e},getLastRenderedColumn(){const e=this.dataAccessObject.endColumnRendered;return null===e?-1:e},getLastVisibleColumn(){const e=this.dataAccessObject.endColumnVisible;return null===e?-1:e},getRenderedColumnsCount(){return this.dataAccessObject.countColumnsRendered},getVisibleColumnsCount(){return this.dataAccessObject.countColumnsVisible},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};(0,o(22232).defineGetter)(s,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});t.default=s},37610:(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedRow(){const e=this.dataAccessObject.startRowRendered;return null===e?-1:e},getFirstVisibleRow(){const e=this.dataAccessObject.startRowVisible;return null===e?-1:e},getLastRenderedRow(){const e=this.dataAccessObject.endRowRendered;return null===e?-1:e},getLastVisibleRow(){const e=this.dataAccessObject.endRowVisible;return null===e?-1:e},getRenderedRowsCount(){return this.dataAccessObject.countRowsRendered},getVisibleRowsCount(){return this.dataAccessObject.countRowsVisible},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};(0,o(22232).defineGetter)(s,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});t.default=s},6214:(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedColumn(){return 0===this.wtSettings.getSetting("totalColumns")?-1:0},getFirstVisibleColumn(){return this.getFirstRenderedColumn()},getLastRenderedColumn(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn(){return this.getLastRenderedColumn()},getRenderedColumnsCount(){const e=this.wtSettings.getSetting("totalColumns");return Math.min(this.wtSettings.getSetting("fixedColumnsStart"),e)},getVisibleColumnsCount(){return this.getRenderedColumnsCount()},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};(0,o(22232).defineGetter)(s,"MIXIN_NAME","stickyColumnsStart",{writable:!1,enumerable:!1});t.default=s},6271:(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedRow(){const e=this.wtSettings.getSetting("totalRows"),t=this.wtSettings.getSetting("fixedRowsBottom"),o=e-t;return 0===e||0===t?-1:o<0?0:o},getFirstVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.wtSettings.getSetting("totalRows")-1},getLastVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsBottom"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount:()=>0};(0,o(22232).defineGetter)(s,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});t.default=s},15491:(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedRow(){return 0===this.wtSettings.getSetting("totalRows")?-1:0},getFirstVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.getRenderedRowsCount()-1},getLastVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsTop"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};(0,o(22232).defineGetter)(s,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});t.default=s},85043:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(45460)),r=s(o(15491)),n=s(o(92117)),a=o(22232),l=o(89381);class h extends i.default{constructor(e,t,o,s){super(e,t,o,s,l.CLONE_TOP)}}(0,a.mixin)(h,r.default),(0,a.mixin)(h,n.default);t.default=h},56754:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(45460)),r=s(o(15491)),n=s(o(6214)),a=o(22232),l=o(89381);class h extends i.default{constructor(e,t,o,s){super(e,t,o,s,l.CLONE_TOP_INLINE_START_CORNER)}}(0,a.mixin)(h,r.default),(0,a.mixin)(h,n.default);t.default=h},35863:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(83302);t.default=class{constructor(e,t){(0,i.default)(this,"dataAccessObject",void 0),(0,i.default)(this,"wtSettings",void 0),(0,i.default)(this,"headerWidths",new Map),this.dataAccessObject=e,this.wtSettings=t}getWidth(e){return this.wtSettings.getSetting("columnWidth",e)||this.wtSettings.getSetting("defaultColumnWidth")}getStretchedColumnWidth(e){const t=this.dataAccessObject.wtViewport.columnsRenderCalculator;let o=this.getWidth(e);if(t){const s=t.getStretchedColumnWidth(e,o);s&&(o=s)}return o}getHeaderHeight(e){let t=this.wtSettings.getSetting("defaultRowHeight");const o=this.dataAccessObject.wtViewport.oversizedColumnHeaders[e];return void 0!==o&&(t=t?Math.max(t,o):o),t}getHeaderWidth(e){return this.headerWidths.get(this.dataAccessObject.wtTable.columnFilter.sourceToRendered(e))}calculateWidths(){const{wtSettings:e}=this,{wtTable:t,wtViewport:o,cloneSource:s}=this.dataAccessObject,i=s?s.wtTable.holder:t.holder,n=i.offsetHeight<i.scrollHeight?(0,r.getScrollbarWidth)():0;let a=e.getSetting("rowHeaderWidth");if(o.columnsRenderCalculator.refreshStretching(o.getViewportWidth()-n),a=e.getSetting("onModifyRowHeaderWidth",a),null!=a){const t=e.getSetting("rowHeaders").length,o=e.getSetting("defaultColumnWidth");for(let e=0;e<t;e++){let t=Array.isArray(a)?a[e]:a;t=null==t?o:t,this.headerWidths.set(e,t)}}}}},94191:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231));t.default=class{constructor(e){(0,i.default)(this,"nodeType",void 0),this.nodeType=e.toUpperCase()}setRootDocument(e){this.rootDocument=e}obtain(){return this.rootDocument.createElement(this.nodeType)}}},81787:(e,t)=>{"use strict";t.__esModule=!0;t.WORKING_SPACE_ALL=0,t.WORKING_SPACE_TOP=1,t.WORKING_SPACE_BOTTOM=2},1909:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(55407));t.OrderView=i.default;var r=s(o(52025));t.SharedOrderView=r.default},52025:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(55407));class r extends i.default{prependView(e){return this.sizeSet.prepend(e.sizeSet),e.sizeSet.append(this.sizeSet),this}appendView(e){return this.sizeSet.append(e.sizeSet),e.sizeSet.prepend(this.sizeSet),this}}t.default=r},55407:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(81787),n=s(o(96747));t.default=class{constructor(e,t,o){(0,i.default)(this,"rootNode",void 0),(0,i.default)(this,"nodesPool",void 0),(0,i.default)(this,"sizeSet",new n.default),(0,i.default)(this,"childNodeType",void 0),(0,i.default)(this,"visualIndex",0),(0,i.default)(this,"collectedNodes",[]),this.rootNode=e,this.nodesPool=t,this.childNodeType=o.toUpperCase()}setSize(e){return this.sizeSet.setSize(e),this}setOffset(e){return this.sizeSet.setOffset(e),this}isSharedViewSet(){return this.sizeSet.isShared()}getNode(e){return e<this.collectedNodes.length?this.collectedNodes[e]:null}getCurrentNode(){const e=this.collectedNodes.length;return e>0?this.collectedNodes[e-1]:null}getRenderedChildCount(){const{rootNode:e,sizeSet:t}=this;let o=0;if(this.isSharedViewSet()){let s=e.firstElementChild;for(;s;){if(s.tagName===this.childNodeType)o+=1;else if(t.isPlaceOn(r.WORKING_SPACE_TOP))break;s=s.nextElementSibling}}else o=e.childElementCount;return o}start(){this.collectedNodes.length=0,this.visualIndex=0;const{rootNode:e,sizeSet:t}=this,o=this.isSharedViewSet(),{nextSize:s}=t.getViewSize();let i=this.getRenderedChildCount();for(;i<s;){const s=this.nodesPool();!o||o&&t.isPlaceOn(r.WORKING_SPACE_BOTTOM)?e.appendChild(s):e.insertBefore(s,e.firstChild),i+=1}const n=o&&t.isPlaceOn(r.WORKING_SPACE_TOP);for(;i>s;)e.removeChild(n?e.firstChild:e.lastChild),i-=1}render(){const{rootNode:e,sizeSet:t}=this;let o=this.visualIndex;this.isSharedViewSet()&&t.isPlaceOn(r.WORKING_SPACE_BOTTOM)&&(o+=t.sharedSize.nextSize);let s=e.childNodes[o];if(s.tagName!==this.childNodeType){const t=this.nodesPool();e.replaceChild(t,s),s=t}this.collectedNodes.push(s),this.visualIndex+=1}end(){}}},79193:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231));t.default=class{constructor(){(0,i.default)(this,"currentSize",0),(0,i.default)(this,"nextSize",0),(0,i.default)(this,"currentOffset",0),(0,i.default)(this,"nextOffset",0)}setSize(e){this.currentSize=this.nextSize,this.nextSize=e}setOffset(e){this.currentOffset=this.nextOffset,this.nextOffset=e}}},96747:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=s(o(79193)),n=o(81787);t.default=class{constructor(){(0,i.default)(this,"size",new r.default),(0,i.default)(this,"workingSpace",n.WORKING_SPACE_ALL),(0,i.default)(this,"sharedSize",null)}setSize(e){this.size.setSize(e)}setOffset(e){this.size.setOffset(e)}getViewSize(){return this.size}isShared(){return this.sharedSize instanceof r.default}isPlaceOn(e){return this.workingSpace===e}append(e){this.workingSpace=n.WORKING_SPACE_TOP,e.workingSpace=n.WORKING_SPACE_BOTTOM,this.sharedSize=e.getViewSize()}prepend(e){this.workingSpace=n.WORKING_SPACE_BOTTOM,e.workingSpace=n.WORKING_SPACE_TOP,this.sharedSize=e.getViewSize()}}},72772:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231));t.default=class{constructor(e,t){(0,i.default)(this,"dataAccessObject",void 0),(0,i.default)(this,"wtSettings",void 0),this.dataAccessObject=e,this.wtSettings=t}getHeight(e){let t=this.wtSettings.getSetting("rowHeight",e);const o=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==o&&(t=void 0===t?o:Math.max(t,o)),t}}},57293:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(83302),i=o(22232),r=o(46003);t.default=class{constructor(e,t,o,s,i){this.dataAccessObject=e,this.wot=e.wot,this.instance=this.wot,this.domBindings=t,this.wtSettings=o,this.wtTable=i,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.eventManager=s,this.eventManager.addEventListener(this.domBindings.rootWindow,"resize",(()=>{this.clientHeight=this.getWorkspaceHeight()}))}getWorkspaceHeight(){const e=this.domBindings.rootDocument,t=this.dataAccessObject.topOverlayTrimmingContainer;let o=0;if(t===this.domBindings.rootWindow)o=e.documentElement.clientHeight;else{o=(0,s.outerHeight)(t)>0&&t.clientHeight>0?t.clientHeight:1/0}return o}getWorkspaceWidth(){const{wtSettings:e}=this,{rootDocument:t,rootWindow:o}=this.domBindings,i=this.dataAccessObject.inlineStartOverlayTrimmingContainer,r=t.documentElement.offsetWidth,n=e.getSetting("totalColumns"),a=e.getSetting("preventOverflow"),l=e.getSetting("rtlMode"),h=this.wtTable.TABLE.getBoundingClientRect(),u=r-(l?h.right-r:h.left);let d,c;if(a)return(0,s.outerWidth)(this.wtTable.wtRootElement);if(d=e.getSetting("freezeOverlays")?Math.min(u,r):Math.min(this.getContainerFillWidth(),u,r),i===o&&n>0&&this.sumColumnWidths(0,n-1)>d)return t.documentElement.clientWidth;if(i!==o&&(c=(0,s.getStyle)(this.dataAccessObject.inlineStartOverlayTrimmingContainer,"overflow",o),"scroll"===c||"hidden"===c||"auto"===c))return Math.max(d,i.clientWidth);const g=e.getSetting("stretchH");return"none"!==g&&g?d:Math.max(d,(0,s.outerWidth)(this.wtTable.TABLE))}hasVerticalScroll(){return this.wtTable.hider.offsetHeight>this.getWorkspaceHeight()}hasHorizontalScroll(){return this.wtTable.hider.offsetWidth>this.getWorkspaceWidth()}sumColumnWidths(e,t){let o=0,s=e;for(;s<t;)o+=this.wtTable.getColumnWidth(s),s+=1;return o}getContainerFillWidth(){if(this.containerWidth)return this.containerWidth;const e=this.wtTable.holder,t=this.domBindings.rootDocument.createElement("div");t.style.width="100%",t.style.height="1px",e.appendChild(t);const o=t.offsetWidth;return this.containerWidth=o,e.removeChild(t),o}getWorkspaceOffset(){return(0,s.offset)(this.wtTable.TABLE)}getColumnHeaderHeight(){return this.wtSettings.getSetting("columnHeaders").length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=(0,s.outerHeight)(this.wtTable.THEAD)):this.columnHeaderHeight=0,this.columnHeaderHeight}getViewportHeight(){let e=this.getWorkspaceHeight();if(e===1/0)return e;const t=this.getColumnHeaderHeight();return t>0&&(e-=t),e}getRowHeaderWidth(){const e=this.wtSettings.getSetting("rowHeaderWidth"),t=this.wtSettings.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(let o=0,s=t.length;o<s;o++)this.rowHeaderWidth+=e[o]||e}if(isNaN(this.rowHeaderWidth))if(t.length){let e=this.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(let o=0,i=t.length;o<i;o++)e?(this.rowHeaderWidth+=(0,s.outerWidth)(e),e=e.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.wtSettings.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}getViewportWidth(){const e=this.getWorkspaceWidth();if(e===1/0)return e;const t=this.getRowHeaderWidth();return t>0?e-t:e}createRowsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.RENDER_TYPE;const{wtSettings:t,wtTable:o}=this;let i,n,a;this.rowHeaderWidth=NaN,i=t.getSetting("renderAllRows")&&e===r.RENDER_TYPE?1/0:this.getViewportHeight();let l=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const h=t.getSetting("fixedRowsTop"),u=t.getSetting("fixedRowsBottom"),d=t.getSetting("totalRows");return h&&l>=0&&(a=this.dataAccessObject.topOverlay.sumCellSizes(0,h),l+=a,i-=a),u&&this.dataAccessObject.bottomOverlay.clone&&(a=this.dataAccessObject.bottomOverlay.sumCellSizes(d-u,d),i-=a),n=o.holder.clientHeight===o.holder.offsetHeight?0:(0,s.getScrollbarWidth)(this.domBindings.rootDocument),new r.ViewportRowsCalculator({viewportHeight:i,scrollOffset:l,totalRows:t.getSetting("totalRows"),rowHeightFn:e=>o.getRowHeight(e),overrideFn:t.getSettingPure("viewportRowCalculatorOverride"),calculationType:e,horizontalScrollbarHeight:n})}createColumnsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.RENDER_TYPE;const{wtSettings:t,wtTable:o}=this;let i=this.getViewportWidth(),n=Math.abs(this.dataAccessObject.inlineStartScrollPosition)-this.dataAccessObject.inlineStartParentOffset;this.columnHeaderHeight=NaN;const a=t.getSetting("fixedColumnsStart");if(a&&n>=0){const e=this.dataAccessObject.inlineStartOverlay.sumCellSizes(0,a);n+=e,i-=e}return o.holder.clientWidth!==o.holder.offsetWidth&&(i-=(0,s.getScrollbarWidth)(this.domBindings.rootDocument)),new r.ViewportColumnsCalculator({viewportWidth:i,scrollOffset:n,totalColumns:t.getSetting("totalColumns"),columnWidthFn:e=>o.getColumnWidth(e),overrideFn:t.getSettingPure("viewportColumnCalculatorOverride"),calculationType:e,stretchMode:t.getSetting("stretchH"),stretchingColumnWidthFn:(e,o)=>t.getSetting("onBeforeStretchingColumnWidth",e,o),inlineStartOffset:this.dataAccessObject.inlineStartParentOffset})}createRenderCalculators(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e){const t=this.createRowsCalculator(r.FULLY_VISIBLE_TYPE),o=this.createColumnsCalculator(r.FULLY_VISIBLE_TYPE);this.areAllProposedVisibleRowsAlreadyRendered(t)&&this.areAllProposedVisibleColumnsAlreadyRendered(o)||(e=!1)}return e||(this.rowsRenderCalculator=this.createRowsCalculator(r.RENDER_TYPE),this.columnsRenderCalculator=this.createColumnsCalculator(r.RENDER_TYPE)),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,e}createVisibleCalculators(){this.rowsVisibleCalculator=this.createRowsCalculator(r.FULLY_VISIBLE_TYPE),this.columnsVisibleCalculator=this.createColumnsCalculator(r.FULLY_VISIBLE_TYPE)}areAllProposedVisibleRowsAlreadyRendered(e){if(!this.rowsVisibleCalculator)return!1;const{startRow:t,endRow:o,isVisibleInTrimmingContainer:s}=e;if(null===t&&null===o)return!s;const{startRow:i,endRow:r}=this.rowsRenderCalculator;return!(t<i||t===i&&t>0)&&!(o>r||o===r&&o<this.wtSettings.getSetting("totalRows")-1)}areAllProposedVisibleColumnsAlreadyRendered(e){if(!this.columnsVisibleCalculator)return!1;const{startColumn:t,endColumn:o,isVisibleInTrimmingContainer:s}=e;if(null===t&&null===o)return!s;const{startColumn:i,endColumn:r}=this.columnsRenderCalculator;return!(t<i||t===i&&t>0)&&!(o>r||o===r&&o<this.wtSettings.getSetting("totalColumns")-1)}resetHasOversizedColumnHeadersMarked(){(0,i.objectEach)(this.hasOversizedColumnHeadersMarked,((e,t,o)=>{o[t]=void 0}))}}},73596:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(16247),o(25671),o(97796),o(36662);var i=s(o(78900)),r=o(45433),n=o(3177),a=s(o(56307)),l=o(22489),h=o(65324),u=o(57924),d=o(48253),c=o(21280);function g(e,t){const o=new i.default(e,t||{},r.rootInstanceSymbol);return o.init(),o}t.CellCoords=c.CellCoords,t.CellRange=c.CellRange,(0,h.registerCellType)(u.TextCellType),g.editors={BaseEditor:d.BaseEditor},g.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new i.default(e,t,r.rootInstanceSymbol)},g.DefaultSettings=(0,n.metaSchemaFactory)(),g.hooks=a.default.getSingleton(),g.CellCoords=c.CellCoords,g.CellRange=c.CellRange,g.packageName="handsontable",g.buildDate="30/11/2023 10:11:12",g.version="14.0.0",g.languages={dictionaryKeys:l.dictionaryKeys,getLanguageDictionary:l.getLanguageDictionary,getLanguagesDictionaries:l.getLanguagesDictionaries,registerLanguageDictionary:l.registerLanguageDictionary,getTranslatedPhrase:l.getTranslatedPhrase};t.default=g},78380:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(25815),i=o(16124),r=o(67156);const n=t.CELL_TYPE="autocomplete";t.AutocompleteCellType={CELL_TYPE:n,editor:s.AutocompleteEditor,renderer:i.autocompleteRenderer,validator:r.autocompleteValidator}},83954:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(78380);t.AutocompleteCellType=s.AutocompleteCellType,t.CELL_TYPE=s.CELL_TYPE},30749:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(63729),i=o(8877);const r=t.CELL_TYPE="checkbox";t.CheckboxCellType={CELL_TYPE:r,editor:s.CheckboxEditor,renderer:i.checkboxRenderer}},42855:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(30749);t.CELL_TYPE=s.CELL_TYPE,t.CheckboxCellType=s.CheckboxCellType},24259:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(58437),i=o(56522),r=o(82951);const n=t.CELL_TYPE="date";t.DateCellType={CELL_TYPE:n,editor:s.DateEditor,renderer:i.dateRenderer,validator:r.dateValidator}},56844:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(24259);t.CELL_TYPE=s.CELL_TYPE,t.DateCellType=s.DateCellType},72061:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(9535),i=o(16124),r=o(67156);const n=t.CELL_TYPE="dropdown";t.DropdownCellType={CELL_TYPE:n,editor:s.DropdownEditor,renderer:i.autocompleteRenderer,validator:r.autocompleteValidator}},65867:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(72061);t.CELL_TYPE=s.CELL_TYPE,t.DropdownCellType=s.DropdownCellType},85334:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(93273),i=o(67981);const r=t.CELL_TYPE="handsontable";t.HandsontableCellType={CELL_TYPE:r,editor:s.HandsontableEditor,renderer:i.handsontableRenderer}},243:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(85334);t.CELL_TYPE=s.CELL_TYPE,t.HandsontableCellType=s.HandsontableCellType},74319:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllCellTypes=function(){(0,g.registerCellType)(s.AutocompleteCellType),(0,g.registerCellType)(i.CheckboxCellType),(0,g.registerCellType)(r.DateCellType),(0,g.registerCellType)(n.DropdownCellType),(0,g.registerCellType)(a.HandsontableCellType),(0,g.registerCellType)(l.NumericCellType),(0,g.registerCellType)(h.PasswordCellType),(0,g.registerCellType)(u.SelectCellType),(0,g.registerCellType)(d.TextCellType),(0,g.registerCellType)(c.TimeCellType)};var s=o(83954);t.AutocompleteCellType=s.AutocompleteCellType,t.AUTOCOMPLETE_TYPE=s.CELL_TYPE;var i=o(42855);t.CheckboxCellType=i.CheckboxCellType,t.CHECKBOX_TYPE=i.CELL_TYPE;var r=o(56844);t.DateCellType=r.DateCellType,t.DATE_TYPE=r.CELL_TYPE;var n=o(65867);t.DropdownCellType=n.DropdownCellType,t.DROPDOWN_TYPE=n.CELL_TYPE;var a=o(243);t.HandsontableCellType=a.HandsontableCellType,t.HANDSONTABLE_TYPE=a.CELL_TYPE;var l=o(68683);t.NumericCellType=l.NumericCellType,t.NUMERIC_TYPE=l.CELL_TYPE;var h=o(81762);t.PasswordCellType=h.PasswordCellType,t.PASSWORD_TYPE=h.CELL_TYPE;var u=o(12256);t.SelectCellType=u.SelectCellType,t.SELECT_TYPE=u.CELL_TYPE;var d=o(57924);t.TextCellType=d.TextCellType,t.TEXT_TYPE=d.CELL_TYPE;var c=o(8228);t.TimeCellType=c.TimeCellType,t.TIME_TYPE=c.CELL_TYPE;var g=o(65324);t.registerCellType=g.registerCellType,t.getCellType=g.getCellType,t.getRegisteredCellTypeNames=g.getRegisteredCellTypeNames,t.getRegisteredCellTypes=g.getRegisteredCellTypes,t.hasCellType=g.hasCellType},68683:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(79486);t.CELL_TYPE=s.CELL_TYPE,t.NumericCellType=s.NumericCellType},79486:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(97130),i=o(78416),r=o(71);const n=t.CELL_TYPE="numeric";t.NumericCellType={CELL_TYPE:n,editor:s.NumericEditor,renderer:i.numericRenderer,validator:r.numericValidator,dataType:"number"}},81762:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(40229);t.CELL_TYPE=s.CELL_TYPE,t.PasswordCellType=s.PasswordCellType},40229:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(63630),i=o(76978);const r=t.CELL_TYPE="password";t.PasswordCellType={CELL_TYPE:r,editor:s.PasswordEditor,renderer:i.passwordRenderer,copyable:!1}},65324:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getCellType=function(e){if(!u(e))throw Error(`You declared cell type "${e}" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by\n "Handsontable.cellTypes.registerCellType" method`);return h(e)},t.registerCellType=function(e,t){"string"!=typeof e&&(e=(t=e).CELL_TYPE);const{editor:o,renderer:s,validator:i}=t;o&&(0,r.registerEditor)(e,o);s&&(0,n.registerRenderer)(e,s);i&&(0,a.registerValidator)(e,i);l(e,t)},o(91683);var i=s(o(63800)),r=o(83605),n=o(7462),a=o(80239);const{register:l,getItem:h,hasItem:u,getNames:d,getValues:c}=(0,i.default)("cellTypes");t.getRegisteredCellTypes=c,t.getRegisteredCellTypeNames=d,t.hasCellType=u},12256:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(2145);t.CELL_TYPE=s.CELL_TYPE,t.SelectCellType=s.SelectCellType},2145:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(93333),i=o(73619);const r=t.CELL_TYPE="select";t.SelectCellType={CELL_TYPE:r,editor:s.SelectEditor,renderer:i.selectRenderer}},57924:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(80617);t.CELL_TYPE=s.CELL_TYPE,t.TextCellType=s.TextCellType},80617:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071),i=o(50695);const r=t.CELL_TYPE="text";t.TextCellType={CELL_TYPE:r,editor:s.TextEditor,renderer:i.textRenderer}},8228:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(90214);t.CELL_TYPE=s.CELL_TYPE,t.TimeCellType=s.TimeCellType},90214:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(65930),i=o(43853),r=o(85342);const n=t.CELL_TYPE="time";t.TimeCellType={CELL_TYPE:n,editor:s.TimeEditor,renderer:i.timeRenderer,validator:r.timeValidator}},78900:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.default=function(e,t){var o,s=this;let L=arguments.length>2&&void 0!==arguments[2]&&arguments[2],W=!1,F=this;const V=new h.default(F);let B,U,Y,j,G,z=!0;(0,b.hasValidParameter)(L)&&(0,b.registerAsRootInstance)(this);this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const K=null!==(o=null==t?void 0:t.layoutDirection)&&void 0!==o?o:"inherit",$=["rtl","ltr"].includes(K)?K:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",$),this.isRtl=function(){return"rtl"===$},this.isLtr=function(){return!F.isRtl()},this.getDirectionFactor=function(){return F.isLtr()?1:-1},t.language=(0,O.getValidLanguageCode)(t.language);const X=new N.MetaManager(F,t,[N.DynamicCellMetaMod,N.ExtendMetaPropertiesMod]),q=X.getTableMeta(),Q=X.getGlobalMeta(),J=(0,P.createUniqueMap)();this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),(0,b.isRootInstance)(this)&&(0,n._injectProductInfo)(t.licenseKey,e);this.guid=`ht_${(0,C.randomString)()}`,D.set(this.guid,this),this.columnIndexMapper=new R.IndexMapper,this.rowIndexMapper=new R.IndexMapper,this.columnIndexMapper.addLocalHook("indexesSequenceChange",(e=>{F.runHooks("afterColumnSequenceChange",e)})),this.rowIndexMapper.addLocalHook("indexesSequenceChange",(e=>{F.runHooks("afterRowSequenceChange",e)})),U=new E.default(F),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let Z=new I.Selection(q,{rowIndexMapper:F.rowIndexMapper,columnIndexMapper:F.columnIndexMapper,countCols:()=>F.countCols(),countRows:()=>F.countRows(),propToCol:e=>B.propToCol(e),isEditorOpened:()=>!!F.getActiveEditor()&&F.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),getShortcutManager:()=>F.getShortcutManager(),createCellCoords:(e,t)=>F._createCellCoords(e,t),createCellRange:(e,t,o)=>F._createCellRange(e,t,o),visualToRenderableCoords:e=>{const{row:t,col:o}=e;return F._createCellCoords(t>=0?F.rowIndexMapper.getRenderableFromVisualIndex(t):t,o>=0?F.columnIndexMapper.getRenderableFromVisualIndex(o):o)},renderableToVisualCoords:e=>{const{row:t,col:o}=e;return F._createCellCoords(t>=0?F.rowIndexMapper.getVisualFromRenderableIndex(t):t,o>=0?F.columnIndexMapper.getVisualFromRenderableIndex(o):o)},isDisabledCellSelection:(e,t)=>e<0||t<0?F.getSettings().disableVisualSelection:F.getCellMeta(e,t).disableVisualSelection});this.selection=Z;const ee=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.refresh()};function te(e){const t=(0,M.normalizeLanguageCode)(e);(0,O.hasLanguageDictionary)(t)?(F.runHooks("beforeLanguageChange",t),Q.language=t,F.runHooks("afterLanguageChange",t)):(0,M.warnUserAboutLanguageRegistration)(e)}function oe(e,t){const o="className"===e?F.rootElement:F.table;if(z)(0,i.addClass)(o,t);else{let s=[],r=[];Q[e]&&(s=Array.isArray(Q[e])?Q[e]:(0,c.stringToArray)(Q[e])),t&&(r=Array.isArray(t)?t:(0,c.stringToArray)(t));const n=(0,c.getDifferenceOfArrays)(s,r),a=(0,c.getDifferenceOfArrays)(r,s);n.length&&(0,i.removeClass)(o,n),a.length&&(0,i.addClass)(o,a)}Q[e]=t}function se(){let e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function ie(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function re(e,t,o){if(!e.length)return;const s=F.getActiveEditor(),r=new se;let n=!0;r.onQueueEmpty=e=>{s&&n&&s.cancelChanges(),o(e)};for(let o=e.length-1;o>=0;o--){const[s,a,,l]=e[o],h=B.propToCol(a),u=F.getCellMeta(s,h);"numeric"===u.type&&"string"==typeof l&&(0,v.isNumericLike)(l)&&(e[o][3]=ie(l)),F.getCellValidator(u)&&(r.addValidatorToQueue(),F.validateCell(e[o][3],u,function(t,o){return function(s){if("boolean"!=typeof s)throw new Error("Validation error: result is not boolean");if(!1===s&&!1===o.allowInvalid){n=!1,e.splice(t,1),o.valid=!0;const s=F.getCell(o.visualRow,o.visualCol);null!==s&&(0,i.removeClass)(s,q.invalidCellClassName)}r.removeValidatorFormQueue()}}(o,u),t))}r.checkIfQueueIsEmpty()}function ne(e,t){let o=e.length-1;if(o<0)return;for(;o>=0;o--){let s=!1;if(null!==e[o]){if(null!==e[o][2]&&void 0!==e[o][2]||null!==e[o][3]&&void 0!==e[o][3]){if(q.allowInsertRow)for(;e[o][0]>F.countRows()-1;){const{delta:e}=B.createRow(void 0,void 0,{source:t});if(0===e){s=!0;break}}if("array"===F.dataType&&(!q.columns||0===q.columns.length)&&q.allowInsertColumn)for(;B.propToCol(e[o][1])>F.countCols()-1;){const{delta:e}=B.createCol(void 0,void 0,{source:t});if(0===e){s=!0;break}}s||B.set(e[o][0],e[o][1],e[o][3])}}else e.splice(o,1)}F.forceFullRender=!0,Y.adjustRowsAndCols(),F.runHooks("beforeChangeRender",e,t),j.lockEditor(),F._refreshBorders(null),j.unlockEditor(),F.view.adjustElementsSize(),F.runHooks("afterChange",e,t||"edit");const s=F.getActiveEditor();s&&(0,n.isDefined)(s.refreshValue)&&s.refreshValue()}function ae(e,t,o){return Array.isArray(e)?e:[[e,t,o]]}function le(e,t){const o=F.getActiveEditor(),s=F.runHooks("beforeChange",e,t||"edit"),i=e.filter((e=>null!==e));return!1===s||0===i.length?(o&&o.cancelChanges(),[]):i}this.columnIndexMapper.addLocalHook("cacheUpdated",ee),this.rowIndexMapper.addLocalHook("cacheUpdated",ee),this.selection.addLocalHook("afterSetRangeEnd",(e=>{const t=(0,u.createObjectPropListener)(!1),o=this.selection.getSelectedRange(),{from:s,to:r}=o.current(),n=o.size()-1;this.runHooks("afterSelection",s.row,s.col,r.row,r.col,t,n),this.runHooks("afterSelectionByProp",s.row,F.colToProp(s.col),r.row,F.colToProp(r.col),t,n);let a=!0;W&&(a=!1),t.isTouched()&&(a=!t.value);const l=this.selection.selectedRange.current(),h=this.selection.isSelectedByAnyHeader(),d=this.selection.isSelectedByRowHeader(),c=this.selection.isSelectedByColumnHeader();if(!1!==a)if(h)d?this.scrollViewportTo({row:e.row}):c&&this.scrollViewportTo({col:e.col});else if(l&&!this.selection.isMultiple()){const{row:e,col:t}=l.from;e<0&&t>=0?this.scrollViewportTo({col:t}):t<0&&e>=0?this.scrollViewportTo({row:e}):this.scrollViewportTo({row:e,col:t})}else this.scrollViewportTo(e.toObject());d&&c?(0,i.addClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]):d?((0,i.removeClass)(this.rootElement,"ht__selection--columns"),(0,i.addClass)(this.rootElement,"ht__selection--rows")):c?((0,i.removeClass)(this.rootElement,"ht__selection--rows"),(0,i.addClass)(this.rootElement,"ht__selection--columns")):(0,i.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this._refreshBorders(null)})),this.selection.addLocalHook("afterSelectionFinished",(e=>{const t=e.length-1,{from:o,to:s}=e[t];this.runHooks("afterSelectionEnd",o.row,o.col,s.row,s.col,t),this.runHooks("afterSelectionEndByProp",o.row,F.colToProp(o.col),s.row,F.colToProp(s.col),t)})),this.selection.addLocalHook("afterIsMultipleSelection",(e=>{const t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)})),this.selection.addLocalHook("afterDeselect",(()=>{j.destroyEditor(),this._refreshBorders(),(0,i.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")})),this.selection.addLocalHook("beforeHighlightSet",(()=>this.runHooks("beforeSelectionHighlightSet"))).addLocalHook("beforeSetRangeStart",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSetRangeStart",...t)})).addLocalHook("beforeSetRangeStartOnly",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSetRangeStartOnly",...t)})).addLocalHook("beforeSetRangeEnd",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSetRangeEnd",...t)})).addLocalHook("beforeSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSelectColumns",...t)})).addLocalHook("afterSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterSelectColumns",...t)})).addLocalHook("beforeSelectRows",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSelectRows",...t)})).addLocalHook("afterSelectRows",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterSelectRows",...t)})).addLocalHook("beforeModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("modifyTransformStart",...t)})).addLocalHook("afterModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterModifyTransformStart",...t)})).addLocalHook("beforeModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("modifyTransformEnd",...t)})).addLocalHook("afterModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterModifyTransformEnd",...t)})).addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeRowWrap",...t)})).addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeColumnWrap",...t)})).addLocalHook("insertRowRequire",(e=>this.alter("insert_row_above",e,1,"auto"))).addLocalHook("insertColRequire",(e=>this.alter("insert_col_start",e,1,"auto"))),Y={alter(e,t){var o,s;let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;const l=e=>{if(0===e.length)return[];const t=[...e];t.sort(((e,t)=>{let[o]=e,[s]=t;return o===s?0:o>s?1:-1}));return(0,c.arrayReduce)(t,((e,t)=>{let[o,s]=t;const i=e[e.length-1],[r,n]=i,a=r+n;if(o<=a){const e=Math.max(s-(a-o),0);i[1]+=e}else e.push([o,s]);return e}),[t[0]])};switch(e){case"insert_row_below":case"insert_row_above":const a=F.countSourceRows();if(q.maxRows===a)return;const h="insert_row_below"===e?"below":"above";t=null!==(o=t)&&void 0!==o?o:"below"===h?a:0;const{delta:u,startPhysicalIndex:d}=B.createRow(t,i,{source:r,mode:h});if(u){const e=Z.selectedRange.current(),t=null==e?void 0:e.from,o=null==t?void 0:t.row,s=F.toVisualRow(d);if(Z.isSelectedByCorner())Z.selectAll(!0,!0,{disableHeadersHighlight:!0});else if((0,n.isDefined)(o)&&o>=s){const{row:s,col:i}=e.to;let r=t.col;Z.isSelectedByRowHeader()&&(r=-1),Z.getSelectedRange().pop(),Z.setRangeStartOnly(F._createCellCoords(o+u,r),!0),Z.setRangeEnd(F._createCellCoords(s+u,i))}else F._refreshBorders()}break;case"insert_col_start":case"insert_col_end":const g="insert_col_end"===e?"end":"start";t=null!==(s=t)&&void 0!==s?s:"end"===g?F.countSourceCols():0;const{delta:f,startPhysicalIndex:p}=B.createCol(t,i,{source:r,mode:g});if(f){if(Array.isArray(q.colHeaders)){const e=[F.toVisualColumn(p),0];e.length+=f,Array.prototype.splice.apply(q.colHeaders,e)}const e=Z.selectedRange.current(),t=null==e?void 0:e.from,o=null==t?void 0:t.col,s=F.toVisualColumn(p);if(Z.isSelectedByCorner())Z.selectAll(!0,!0,{disableHeadersHighlight:!0});else if((0,n.isDefined)(o)&&o>=s){const{row:s,col:i}=e.to;let r=t.row;Z.isSelectedByColumnHeader()&&(r=-1),Z.getSelectedRange().pop(),Z.setRangeStartOnly(F._createCellCoords(r,o+f),!0),Z.setRangeEnd(F._createCellCoords(s,i+f))}else F._refreshBorders()}break;case"remove_row":const m=e=>{let t=0;(0,c.arrayEach)(e,(e=>{let[o,s]=e;const i=(0,n.isEmpty)(o)?F.countRows()-1:Math.max(o-t,0);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!B.removeRow(o,s,r))return;const a=F.countRows(),l=q.fixedRowsTop;l>=i+1&&(q.fixedRowsTop-=Math.min(s,l-i));const h=q.fixedRowsBottom;h&&i>=a-h&&(q.fixedRowsBottom-=Math.min(s,h)),t+=s}))};Array.isArray(t)?m(l(t)):m([[t,i]]),Y.adjustRowsAndCols(),F._refreshBorders();break;case"remove_col":const w=e=>{let t=0;(0,c.arrayEach)(e,(e=>{let[o,s]=e;const i=(0,n.isEmpty)(o)?F.countCols()-1:Math.max(o-t,0);let a=F.toPhysicalColumn(i);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!B.removeCol(o,s,r))return;const l=q.fixedColumnsStart;l>=i+1&&(q.fixedColumnsStart-=Math.min(s,l-i)),Array.isArray(q.colHeaders)&&(void 0===a&&(a=-1),q.colHeaders.splice(a,s)),t+=s}))};Array.isArray(t)?w(l(t)):w([[t,i]]),Y.adjustRowsAndCols(),F._refreshBorders();break;default:throw new Error(`There is no such action "${e}"`)}a||Y.adjustRowsAndCols()},adjustRowsAndCols(){const e=q.minRows,t=q.minSpareRows,o=q.minCols,s=q.minSpareCols;if(0===F.countRows()&&0===F.countCols()&&Z.deselect(),e){const t=F.countRows();t<e&&B.createRow(t,e-t,{source:"auto"})}if(t){const e=F.countEmptyRows(!0);if(e<t){const o=t-e,s=Math.min(o,q.maxRows-F.countSourceRows());B.createRow(F.countRows(),s,{source:"auto"})}}{let e;(o||s)&&(e=F.countEmptyCols(!0));let t=F.countCols();if(o&&!q.columns&&t<o){const s=o-t;e+=s,B.createCol(t,s,{source:"auto"})}if(s&&!q.columns&&"array"===F.dataType&&e<s){t=F.countCols();const o=s-e,i=Math.min(o,q.maxCols-t);B.createCol(t,i,{source:"auto"})}}if(Z.isSelected()){const e=F.countRows(),t=F.countCols();(0,c.arrayEach)(Z.selectedRange,(o=>{let s=!1,i=o.from.row,r=o.from.col,n=o.to.row,a=o.to.col;i>e-1?(i=e-1,s=!0,n>i&&(n=i)):n>e-1&&(n=e-1,s=!0,i>n&&(i=n)),r>t-1?(r=t-1,s=!0,a>r&&(a=r)):a>t-1&&(a=t-1,s=!0,r>a&&(r=a)),s&&F.selectCell(i,r,n,a)}))}F.view&&F.view.adjustElementsSize()},populateFromArray(e,t,o,s,i){let r,n,a,l;const h=[],d={},g=[],f=e.row,p=e.col;if(n=t.length,0===n)return!1;let m=0,w=0;switch((0,u.isObject)(o)&&(m=o.col-p+1,w=o.row-f+1),i){case"shift_down":const i=(0,c.pivot)(t),C=i.length,v=Math.max(C,m),y=F.getData().slice(f),E=(0,c.pivot)(y).slice(p,p+v);for(a=0;a<v;a+=1)if(a<C){for(r=0,n=i[a].length;r<w-n;r+=1)i[a].push(i[a][r%n]);a<E.length?g.push(i[a].concat(E[a])):g.push(i[a].concat(new Array(y.length).fill(null)))}else g.push(i[a%C].concat(E[a]));F.populateFromArray(f,p,(0,c.pivot)(g));break;case"shift_right":const S=t.length,R=Math.max(S,w),b=F.getData().slice(f).map((e=>e.slice(p)));for(r=0;r<R;r+=1)if(r<S){for(a=0,l=t[r].length;a<m-l;a+=1)t[r].push(t[r][a%l]);if(r<b.length)for(let e=0;e<b[r].length;e+=1)t[r].push(b[r][e]);else t[r].push(...new Array(b[0].length).fill(null))}else t.push(t[r%n].slice(0,R).concat(b[r]));F.populateFromArray(f,p,t);break;default:d.row=e.row,d.col=e.col;let _,T=0,O=0,M=!0;const I=function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const s=t[e%t.length];return null!==o?s[o%s.length]:s},N=t.length,A=o?o.row-e.row+1:0;for(n=o?A:Math.max(N,A),r=0;r<n&&!(o&&d.row>o.row&&A>N||!q.allowInsertRow&&d.row>F.countRows()-1||d.row>=q.maxRows);r++){const t=r-T,i=I(t).length,c=o?o.col-e.col+1:0;if(l=o?c:Math.max(i,c),d.col=e.col,_=F.getCellMeta(d.row,d.col),"CopyPaste.paste"!==s&&"Autofill.fill"!==s||!_.skipRowOnPaste){for(O=0,a=0;a<l&&!(o&&d.col>o.col&&c>i||!q.allowInsertColumn&&d.col>F.countCols()-1||d.col>=q.maxCols);a++){if(_=F.getCellMeta(d.row,d.col),("CopyPaste.paste"===s||"Autofill.fill"===s)&&_.skipColumnOnPaste){O+=1,d.col+=1,l+=1;continue}if(_.readOnly&&"UndoRedo.undo"!==s){d.col+=1;continue}let e=I(t,a-O),o=F.getDataAtCell(d.row,d.col);if(null!==e&&"object"==typeof e)if(Array.isArray(e)&&null===o&&(o=[]),null===o||"object"!=typeof o)M=!1;else{const t=(0,u.duckSchema)(Array.isArray(o)?o:o[0]||o),s=(0,u.duckSchema)(Array.isArray(e)?e:e[0]||e);(0,u.isObjectEqual)(t,s)||Array.isArray(t)&&Array.isArray(s)?e=(0,u.deepClone)(e):M=!1}else null!==o&&"object"==typeof o&&(M=!1);M&&h.push([d.row,d.col,e]),M=!0,d.col+=1}d.row+=1}else T+=1,d.row+=1,n+=1}F.setDataAtCell(h,null,null,s||"populateFromArray")}}},this.init=function(){U.setData(q.data),F.runHooks("beforeInit"),((0,a.isMobileBrowser)()||(0,a.isIpadOS)())&&(0,i.addClass)(F.rootElement,"mobile"),this.updateSettings(q,!0),this.view=new y.default(this),j=l.default.getInstance(F,q,Z),G=new d.FocusManager(F),(0,b.isRootInstance)(this)&&(0,A.installFocusCatcher)(F),F.runHooks("init"),this.forceFullRender=!0,this.view.render(),z&&null===F.rootElement.offsetParent&&(0,i.observeVisibilityChangeOnce)(F.rootElement,(()=>{F.view._wt.wtOverlays.updateLastSpreaderSize(),F.render(),F.view.adjustElementsSize()})),"object"==typeof z&&(F.runHooks("afterChange",z[0],z[1]),z=!1),F.runHooks("afterInit")},this._createCellCoords=function(e,t){return F.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,o){return F.view._wt.createCellRange(e,t,o)},this.validateCell=function(e,t,o,s){let i=F.getCellValidator(t);function a(e){if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])||!0===t.hidden)return void o(e);const s=t.visualCol,i=t.visualRow,r=F.getCell(i,s,!0);if(r&&"TH"!==r.nodeName){const e=F.rowIndexMapper.getRenderableFromVisualIndex(i),t=F.columnIndexMapper.getRenderableFromVisualIndex(s);F.view._wt.getSetting("cellRenderer",e,t,r)}o(e)}var l;(0,n.isRegExp)(i)&&(l=i,i=function(e,t){t(l.test(e))}),(0,r.isFunction)(i)?(e=F.runHooks("beforeValidate",e,t.visualRow,t.prop,s),F._registerImmediate((()=>{i.call(t,e,(o=>{F&&(o=F.runHooks("afterValidate",o,e,t.visualRow,t.prop,s),t.valid=o,a(o),F.runHooks("postAfterValidate",o,e,t.visualRow,t.prop,s))}))}))):F._registerImmediate((()=>{t.valid=!0,a(t.valid,!1)}))},this.setDataAtCell=function(e,t,o,s){const i=ae(e,t,o),r=[];let n,a,l,h=s;for(n=0,a=i.length;n<a;n++){if("object"!=typeof i[n])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof i[n][1])throw new Error("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");l=i[n][1]>=this.countCols()?i[n][1]:B.colToProp(i[n][1]),r.push([i[n][0],l,U.getAtCell(this.toPhysicalRow(i[n][0]),i[n][1]),i[n][2]])}h||"object"!=typeof e||(h=t);const u=le(r,s);F.runHooks("afterSetDataAtCell",u,h),re(u,h,(()=>{ne(u,h)}))},this.setDataAtRowProp=function(e,t,o,s){const i=ae(e,t,o),r=[];let n,a,l=s;for(n=0,a=i.length;n<a;n++)r.push([i[n][0],i[n][1],U.getAtCell(this.toPhysicalRow(i[n][0]),i[n][1]),i[n][2]]);l||"object"!=typeof e||(l=t);const h=le(r,s);F.runHooks("afterSetDataAtRowProp",h,l),re(h,l,(()=>{ne(h,l)}))},this.listen=function(){F&&!F.isListening()&&(D.forEach((e=>{F!==e&&e.unlisten()})),k=F.guid,F.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(k=null,F.runHooks("afterUnlisten"))},this.isListening=function(){return k===F.guid},this.destroyEditor=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];F._refreshBorders(e,t)},this.populateFromArray=function(e,t,o,s,i,r,n){if("object"!=typeof o||"object"!=typeof o[0])throw new Error("populateFromArray parameter `input` must be an array of arrays");const a="number"==typeof s?F._createCellCoords(s,i):null;return Y.populateFromArray(F._createCellCoords(e,t),o,a,r,n)},this.spliceCol=function(e,t,o){for(var s=arguments.length,i=new Array(s>3?s-3:0),r=3;r<s;r++)i[r-3]=arguments[r];return B.spliceCol(e,t,o,...i)},this.spliceRow=function(e,t,o){for(var s=arguments.length,i=new Array(s>3?s-3:0),r=3;r<s;r++)i[r-3]=arguments[r];return B.spliceRow(e,t,o,...i)},this.getSelected=function(){if(Z.isSelected())return(0,c.arrayMap)(Z.getSelectedRange(),(e=>{let{from:t,to:o}=e;return[t.row,t.col,o.row,o.col]}))},this.getSelectedLast=function(){const e=this.getSelected();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.getSelectedRange=function(){if(Z.isSelected())return Array.from(Z.getSelectedRange())},this.getSelectedRangeLast=function(){const e=this.getSelectedRange();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.emptySelectedCells=function(e){if(!Z.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];(0,c.arrayEach)(Z.getSelectedRange(),(e=>{if(e.isSingleHeader())return;const o=e.getTopStartCorner(),s=e.getBottomEndCorner();(0,v.rangeEach)(o.row,s.row,(e=>{(0,v.rangeEach)(o.col,s.col,(o=>{this.getCellMeta(e,o).readOnly||t.push([e,o,null])}))}))})),t.length>0&&this.setDataAtCell(t,e)},this.isRenderSuspended=function(){return this.renderSuspendedCounter>0},this.suspendRender=function(){this.renderSuspendedCounter+=1},this.resumeRender=function(){const e=this.renderSuspendedCounter-1;this.renderSuspendedCounter=Math.max(e,0),this.isRenderSuspended()||e!==this.renderSuspendedCounter||(this.renderCall?this.render():this._refreshBorders(null))},this.render=function(){this.view&&(this.renderCall=!0,this.forceFullRender=!0,this.isRenderSuspended()||(j.lockEditor(),this._refreshBorders(null),j.unlockEditor()))},this.batchRender=function(e){this.suspendRender();const t=e();return this.resumeRender(),t},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations()},this.resumeExecution=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.executionSuspendedCounter-1;this.executionSuspendedCounter=Math.max(t,0),(!this.isExecutionSuspended()&&t===this.executionSuspendedCounter||e)&&(this.columnIndexMapper.resumeOperations(),this.rowIndexMapper.resumeOperations())},this.batchExecution=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.suspendExecution();const o=e();return this.resumeExecution(t),o},this.batch=function(e){this.suspendRender(),this.suspendExecution();const t=e();return this.resumeExecution(),this.resumeRender(),t},this.refreshDimensions=function(){if(!F.view)return;const{width:e,height:t}=F.view.getLastSize(),{width:o,height:s}=F.rootElement.getBoundingClientRect(),i=o!==e||s!==t;!1===F.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:o,height:s},i)||((i||F.view._wt.wtOverlays.scrollableElement===F.rootWindow)&&(F.view.setLastSize(o,s),F.render()),F.runHooks("afterRefreshDimensions",{width:e,height:t},{width:o,height:s},i))},this.updateData=function(e,t){(0,N.replaceData)(e,(e=>{B=e}),(e=>{B=e,F.columnIndexMapper.fitToLength(this.getInitialColumnCount()),F.rowIndexMapper.fitToLength(this.countSourceRows()),Y.adjustRowsAndCols()}),{hotInstance:F,dataMap:B,dataSource:U,internalSource:"updateData",source:t,metaManager:X,firstRun:z})},this.loadData=function(e,t){(0,N.replaceData)(e,(e=>{B=e}),(()=>{X.clearCellsCache(),F.initIndexMappers(),Y.adjustRowsAndCols(),z&&(z=[null,"loadData"])}),{hotInstance:F,dataMap:B,dataSource:U,internalSource:"loadData",source:t,metaManager:X,firstRun:z})},this.getInitialColumnCount=function(){const e=q.columns;let t=0;if(Array.isArray(e))t=e.length;else if((0,r.isFunction)(e))if("array"===F.dataType){const o=this.countSourceCols();for(let s=0;s<o;s+=1)e(s)&&(t+=1)}else"object"!==F.dataType&&"function"!==F.dataType||(t=B.colToPropCache.length);else if((0,n.isDefined)(q.dataSchema)){const e=B.getSchema();t=Array.isArray(e)?e.length:(0,u.deepObjectSize)(e)}else t=this.countSourceCols();return t},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(e,t,o,s){return(0,n.isUndefined)(e)?B.getAll():B.getRange(F._createCellCoords(e,t),F._createCellCoords(o,s),B.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,o,s){return B.getCopyableText(F._createCellCoords(e,t),F._createCellCoords(o,s))},this.getCopyableData=function(e,t){return B.getCopyable(e,B.colToProp(t))},this.getSchema=function(){return B.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=(z?F.loadData:F.updateData).bind(this);let s,i,a=!1;if((0,n.isDefined)(e.rows))throw new Error('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?');if((0,n.isDefined)(e.cols))throw new Error('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?');if((0,n.isDefined)(e.ganttChart))throw new Error('Since 8.0.0 the "ganttChart" setting is no longer supported.');for(s in e)"data"===s||("language"===s?te(e.language):"className"===s?oe("className",e.className):"tableClassName"===s&&F.table?(oe("tableClassName",e.tableClassName),F.view._wt.wtOverlays.syncOverlayTableClassNames()):T.default.getSingleton().isRegistered(s)||T.default.getSingleton().isDeprecated(s)?((0,r.isFunction)(e[s])||Array.isArray(e[s]))&&(e[s].initialHook=!0,F.addHook(s,e[s])):!t&&(0,u.hasOwnProperty)(e,s)&&(Q[s]=e[s]));void 0===e.data&&void 0===q.data?o(null,"updateSettings"):void 0!==e.data?o(e.data,"updateSettings"):void 0!==e.columns&&(B.createMap(),F.initIndexMappers());const l=F.countCols(),h=q.columns;if(h&&(0,r.isFunction)(h)&&(a=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||X.clearCache(),l>0)for(s=0,i=0;s<l;s++){if(h){const e=a?h(s):h[i];e&&X.updateColumnMeta(i,e)}i+=1}(0,n.isDefined)(e.cell)&&(0,u.objectEach)(e.cell,(e=>{F.setCellMetaObject(e.row,e.col,e)})),F.runHooks("afterCellMetaReset");let d=F.rootElement.style.height;""!==d&&(d=parseInt(F.rootElement.style.height,10));let c=e.height;if((0,r.isFunction)(c)&&(c=c()),t){F.rootElement.getAttribute("style")&&F.rootElement.setAttribute("data-initialstyle",F.rootElement.getAttribute("style"))}if(null===c){const e=F.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?F.rootElement.setAttribute("style",e):(F.rootElement.style.height="",F.rootElement.style.overflow="")}else void 0!==c&&(F.rootElement.style.height=isNaN(c)?`${c}`:`${c}px`,F.rootElement.style.overflow="hidden");if(void 0!==e.width){let t=e.width;(0,r.isFunction)(t)&&(t=t()),F.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}t||(F.view&&(F.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),F.view._wt.exportSettingsAsClassNames()),F.runHooks("afterUpdateSettings",e)),Y.adjustRowsAndCols(),F.view&&!z&&(F.forceFullRender=!0,j.lockEditor(),F._refreshBorders(null),F.view._wt.wtOverlays.adjustElementsSize(),j.unlockEditor()),t||!F.view||""!==d&&""!==c&&void 0!==c||d===c||F.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=F.getSelectedLast();if(q.getValue){if((0,r.isFunction)(q.getValue))return q.getValue.call(F);if(e)return F.getData()[e[0][0]][q.getValue]}else if(e)return F.getDataAtCell(e[0],e[1])},this.getSettings=function(){return q},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,o,s,i){Y.alter(e,t,o,s,i)},this.getCell=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=t,i=e;if(t>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(t)))return null;s=this.columnIndexMapper.getRenderableFromVisualIndex(t)}if(e>=0){if(this.rowIndexMapper.isHidden(this.toPhysicalRow(e)))return null;i=this.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===i||null===s?null:F.view.getCellAtCoords(F._createCellCoords(i,s),o)},this.getCoords=function(e){const t=this.view._wt.wtTable.getCoords(e);if(null===t)return null;const{row:o,col:s}=t;let i=o,r=s;return o>=0&&(i=this.rowIndexMapper.getVisualFromRenderableIndex(o)),s>=0&&(r=this.columnIndexMapper.getVisualFromRenderableIndex(s)),F._createCellCoords(i,r)},this.colToProp=function(e){return B.colToProp(e)},this.propToCol=function(e){return B.propToCol(e)},this.toVisualRow=e=>this.rowIndexMapper.getVisualFromPhysicalIndex(e),this.toVisualColumn=e=>this.columnIndexMapper.getVisualFromPhysicalIndex(e),this.toPhysicalRow=e=>this.rowIndexMapper.getPhysicalFromVisualIndex(e),this.toPhysicalColumn=e=>this.columnIndexMapper.getPhysicalFromVisualIndex(e),this.getDataAtCell=function(e,t){return B.get(e,B.colToProp(t))},this.getDataAtRowProp=function(e,t){return B.get(e,t)},this.getDataAtCol=function(e){const t=[],o=B.getRange(F._createCellCoords(0,e),F._createCellCoords(q.data.length-1,e),B.DESTINATION_RENDERER);for(let e=0;e<o.length;e+=1)for(let s=0;s<o[e].length;s+=1)t.push(o[e][s]);return t},this.getDataAtProp=function(e){const t=[],o=B.getRange(F._createCellCoords(0,B.propToCol(e)),F._createCellCoords(q.data.length-1,B.propToCol(e)),B.DESTINATION_RENDERER);for(let e=0;e<o.length;e+=1)for(let s=0;s<o[e].length;s+=1)t.push(o[e][s]);return t},this.getSourceData=function(e,t,o,s){let i;return i=void 0===e?U.getData():U.getByRange(F._createCellCoords(e,t),F._createCellCoords(o,s)),i},this.getSourceDataArray=function(e,t,o,s){let i;return i=void 0===e?U.getData(!0):U.getByRange(F._createCellCoords(e,t),F._createCellCoords(o,s),!0),i},this.getSourceDataAtCol=function(e){return U.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,o,s){const i=ae(e,t,o),r=this.hasHook("afterSetSourceDataAtCell"),a=[];r&&(0,c.arrayEach)(i,(e=>{let[t,o,s]=e;a.push([t,o,U.getAtCell(t,o),s])})),(0,c.arrayEach)(i,(e=>{let[t,o,s]=e;U.setAtCell(t,o,s)})),r&&this.runHooks("afterSetSourceDataAtCell",a,s),this.render();const l=F.getActiveEditor();l&&(0,n.isDefined)(l.refreshValue)&&l.refreshValue()},this.getSourceDataAtRow=function(e){return U.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return U.getAtCell(e,t)},this.getDataAtRow=function(e){return B.getRange(F._createCellCoords(e,0),F._createCellCoords(e,this.countCols()-1),B.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,o,s){const i=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,o,s],[r,n]=i;let[,,a,l]=i,h=null,u=null;void 0===a&&(a=r),void 0===l&&(l=n);let d="mixed";return(0,v.rangeEach)(Math.max(Math.min(r,a),0),Math.max(r,a),(e=>{let t=!0;return(0,v.rangeEach)(Math.max(Math.min(n,l),0),Math.max(n,l),(o=>{const s=this.getCellMeta(e,o);return u=s.type,h?t=h===u:h=u,t})),d=t?u:"mixed",t})),d},this.removeCellMeta=function(e,t,o){const[s,i]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let r=X.getCellMetaKeyValue(s,i,o);!1!==F.runHooks("beforeRemoveCellMeta",e,t,o,r)&&(X.removeCellMeta(s,i,o),F.runHooks("afterRemoveCellMeta",e,t,o,r)),r=null},this.spliceCellsMeta=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(var o=arguments.length,s=new Array(o>2?o-2:0),i=2;i<o;i++)s[i-2]=arguments[i];if(s.length>0&&!Array.isArray(s[0]))throw new Error("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array.");t>0&&X.removeRow(this.toPhysicalRow(e),t),s.length>0&&(0,c.arrayEach)(s.reverse(),(t=>{X.createRow(this.toPhysicalRow(e)),(0,c.arrayEach)(t,((t,o)=>this.setCellMetaObject(e,o,t)))})),F.render()},this.setCellMetaObject=function(e,t,o){"object"==typeof o&&(0,u.objectEach)(o,((o,s)=>{this.setCellMeta(e,t,s,o)}))},this.setCellMeta=function(e,t,o,s){if(!1===F.runHooks("beforeSetCellMeta",e,t,o,s))return;let i=e,r=t;e<this.countRows()&&(i=this.toPhysicalRow(e)),t<this.countCols()&&(r=this.toPhysicalColumn(t)),X.setCellMeta(i,r,o,s),F.runHooks("afterSetCellMeta",e,t,o,s)},this.getCellsMeta=function(){return X.getCellsMeta()},this.getCellMeta=function(e,t){let o=this.toPhysicalRow(e),s=this.toPhysicalColumn(t);return null===o&&(o=e),null===s&&(s=t),X.getCellMeta(o,s,{visualRow:e,visualColumn:t})},this.getCellMetaAtRow=function(e){return X.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===F.dataType||q.columns)},this.getCellRenderer=function(e,t){const o="number"==typeof e?F.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof o?(0,p.getRenderer)(o):(0,n.isUndefined)(o)?(0,p.getRenderer)("text"):o},this.getCellEditor=function(e,t){const o="number"==typeof e?F.getCellMeta(e,t).editor:e.editor;return"string"==typeof o?(0,m.getEditor)(o):(0,n.isUndefined)(o)?(0,m.getEditor)("text"):o},this.getCellValidator=function(e,t){const o="number"==typeof e?F.getCellMeta(e,t).validator:e.validator;return"string"==typeof o?(0,w.getValidator)(o):o},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){if(!Array.isArray(e))throw new Error("validateRows parameter `rows` must be an array");this._validateCells(t,e)},this.validateColumns=function(e,t){if(!Array.isArray(e))throw new Error("validateColumns parameter `columns` must be an array");this._validateCells(t,void 0,e)},this._validateCells=function(e,t,o){const s=new se;e&&(s.onQueueEmpty=e);let i=F.countRows()-1;for(;i>=0;){if(void 0!==t&&-1===t.indexOf(i)){i-=1;continue}let e=F.countCols()-1;for(;e>=0;)void 0===o||-1!==o.indexOf(e)?(s.addValidatorToQueue(),F.validateCell(F.getDataAtCell(i,e),F.getCellMeta(i,e),(e=>{if("boolean"!=typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(s.valid=!1),s.removeValidatorFormQueue()}),"validateCells"),e-=1):e-=1;i-=1}s.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=q.rowHeaders,o=e;return void 0!==o&&(o=F.runHooks("modifyRowHeader",o)),void 0===o?(t=[],(0,v.rangeEach)(F.countRows()-1,(e=>{t.push(F.getRowHeader(e))}))):Array.isArray(t)&&void 0!==t[o]?t=t[o]:(0,r.isFunction)(t)?t=t(o):t&&"string"!=typeof t&&"number"!=typeof t&&(t=o+1),t},this.hasRowHeaders=function(){return!!q.rowHeaders},this.hasColHeaders=function(){if(void 0!==q.colHeaders&&null!==q.colHeaders)return!!q.colHeaders;for(let e=0,t=F.countCols();e<t;e++)if(F.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const o=F.runHooks("modifyColHeader",e);if(void 0===o){const e=[],t=F.countCols();for(let o=0;o<t;o++)e.push(F.getColHeader(o));return e}let s=q.colHeaders;const i=F.toPhysicalColumn(o),n=function(e){const t=[],o=F.countCols();let s=0;for(;s<o;s++)(0,r.isFunction)(q.columns)&&q.columns(s)&&t.push(s);return t[e]}(i);return!1===q.colHeaders?s=null:q.columns&&(0,r.isFunction)(q.columns)&&q.columns(n)&&q.columns(n).title?s=q.columns(n).title:q.columns&&q.columns[i]&&q.columns[i].title?s=q.columns[i].title:Array.isArray(q.colHeaders)&&void 0!==q.colHeaders[i]?s=q.colHeaders[i]:(0,r.isFunction)(q.colHeaders)?s=q.colHeaders(i):q.colHeaders&&"string"!=typeof q.colHeaders&&"number"!=typeof q.colHeaders&&(s=(0,S.spreadsheetColumnLabel)(o)),s=F.runHooks("modifyColumnHeaderValue",s,e,t),s},this._getColWidthFromSettings=function(e){let t;if(e>=0){t=F.getCellMeta(0,e).width}if(void 0!==t&&t!==q.width||(t=q.colWidths),null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getColWidth=function(e){let t=F._getColWidthFromSettings(e);return t=F.runHooks("modifyColWidth",t,e),void 0===t&&(t=_.ViewportColumnsCalculator.DEFAULT_WIDTH),t},this._getRowHeightFromSettings=function(e){let t=q.rowHeights;if(null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getRowHeight=function(e){let t=F._getRowHeightFromSettings(e);return t=F.runHooks("modifyRowHeight",t,e),t},this.countSourceRows=function(){return U.countRows()},this.countSourceCols=function(){return U.countFirstRowKeys()},this.countRows=function(){return B.getLength()},this.countCols=function(){const e=q.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return F.view._wt.drawn?F.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return F.view._wt.drawn?F.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return F.view._wt.drawn?F.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return F.view._wt.drawn?F.view._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){return this.view.getRowHeadersCount()},this.countColHeaders=function(){return this.view.getColumnHeadersCount()},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,v.rangeEachReverse)(F.countRows()-1,(o=>{if(F.isEmptyRow(o))t+=1;else if(!0===e)return!1})),t},this.countEmptyCols=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,v.rangeEachReverse)(F.countCols()-1,(o=>{if(F.isEmptyCol(o))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return q.isEmptyRow.call(F,e)},this.isEmptyCol=function(e){return q.isEmptyCol.call(F,e)},this.selectCell=function(e,t,o,s){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!(0,n.isUndefined)(e)&&!(0,n.isUndefined)(t)&&this.selectCells([[e,t,o,s]],i,r)},this.selectCells=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(W=!0);const o=Z.selectCells(e);return o&&t&&F.listen(),W=!1,o},this.selectColumns=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2?arguments[2]:void 0;return Z.selectColumns(e,t,o)},this.selectRows=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2?arguments[2]:void 0;return Z.selectRows(e,t,o)},this.deselectCell=function(){Z.deselect()},this.selectAll=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2?arguments[2]:void 0;W=!0,Z.selectAll(e,t,o),W=!1};const he=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(e){var t,o;"number"==typeof e&&(e={row:arguments[0],col:arguments[1],verticalSnap:arguments[2]?"bottom":"top",horizontalSnap:arguments[3]?"end":"start",considerHiddenIndexes:null===(o=arguments[4])||void 0===o||o});const{row:s,col:i,verticalSnap:r,horizontalSnap:n,considerHiddenIndexes:a}=null!==(t=e)&&void 0!==t?t:{};let l,h,u,d;void 0!==r&&(l="top"===r,h=!l),void 0!==n&&(u="start"===n,d=!u);let c=s,g=i;if(void 0===a||a){const e=Number.isInteger(s)&&s>=0,t=Number.isInteger(i)&&i>=0,o=e?he(this.rowIndexMapper,s):void 0,r=t?he(this.columnIndexMapper,i):void 0;if(null===o||null===r)return!1;c=e?F.rowIndexMapper.getRenderableFromVisualIndex(o):s,g=t?F.columnIndexMapper.getRenderableFromVisualIndex(r):i}const f=Number.isInteger(c),p=Number.isInteger(g);return f&&c>=0&&p&&g>=0?F.view.scrollViewport(F._createCellCoords(c,g),l,d,h,u):f&&c>=0&&(p&&g<0||!p)?F.view.scrollViewportVertically(c,l,h):!!(p&&g>=0&&(f&&c<0||!f))&&F.view.scrollViewportHorizontally(g,d,u)},this.scrollToFocusedCell=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{};if(!this.selection.isSelected())return;this.addHookOnce("afterScroll",e);const{highlight:t}=this.getSelectedRangeLast();this.scrollViewportTo(t.toObject())?this.view.render():(this.removeHook("afterScroll",e),this._registerImmediate((()=>e())))},this.destroy=function(){if(F._clearTimeouts(),F._clearImmediates(),F.view&&F.view.destroy(),U&&U.destroy(),U=null,this.getShortcutManager().destroy(),X.clearCache(),D.delete(this.guid),(0,b.isRootInstance)(F)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,i.empty)(F.rootElement),V.destroy(),j&&j.destroy(),F.batchExecution((()=>{F.rowIndexMapper.unregisterAll(),F.columnIndexMapper.unregisterAll(),J.getItems().forEach((e=>{let[,t]=e;t.destroy()})),J.clear(),F.runHooks("afterDestroy")}),!0),T.default.getSingleton().destroy(F),(0,u.objectEach)(F,((e,t,o)=>{var s;(0,r.isFunction)(e)?o[t]=(s=t,()=>{throw new Error(`The "${s}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==t&&(o[t]=null)})),F.isDestroyed=!0,B&&B.destroy(),B=null,Y=null,Z=null,j=null,F=null},this.getActiveEditor=function(){return j.getActiveEditor()},this.getPlugin=function(e){const t=(0,C.toUpperCaseFirst)(e);return"UndoRedo"===t?this.undoRedo:J.getItem(t)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:J.getId(e)},this.getInstance=function(){return F},this.addHook=function(e,t){T.default.getSingleton().add(e,t,F)},this.hasHook=function(e){return T.default.getSingleton().has(e,F)||T.default.getSingleton().has(e)},this.addHookOnce=function(e,t){T.default.getSingleton().once(e,t,F)},this.removeHook=function(e,t){T.default.getSingleton().remove(e,t,F)},this.runHooks=function(e,t,o,s,i,r,n){return T.default.getSingleton().run(F,e,t,o,s,i,r,n)},this.getTranslatedPhrase=function(e,t){return(0,O.getTranslatedPhrase)(q.language,e,t)},this.toHTML=()=>(0,g.instanceToHTML)(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",(0,g.instanceToHTML)(this)),e.firstElementChild},this.timeouts=[],this._registerTimeout=function(e){let t=e;"function"==typeof t&&(t=setTimeout(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)),this.timeouts.push(t)},this._clearTimeouts=function(){(0,c.arrayEach)(this.timeouts,(e=>{clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){(0,c.arrayEach)(this.immediates,(e=>{clearImmediate(e)}))},this._refreshBorders=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];j.destroyEditor(e),F.view.render(),t&&Z.isSelected()&&j.prepareEditor()},this._getEditorManager=function(){return j},this.isRtl=function(){return"rtl"===F.rootWindow.getComputedStyle(F.rootElement).direction},this.isLtr=function(){return!F.isRtl()},this.getDirectionFactor=function(){return F.isLtr()?1:-1};const ue=(0,x.createShortcutManager)({handleEvent:()=>F.isListening(),beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||F.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",(e=>{!1===e.ctrlKey&&!1===e.metaKey&&ue.releasePressedKeys()})),this.getShortcutManager=function(){return ue},this.getFocusManager=function(){return G},(0,f.getPluginsNames)().forEach((e=>{const t=(0,f.getPlugin)(e);J.addItem(e,new t(this))})),(0,H.registerAllShortcutContexts)(F),ue.setActiveContextName("grid"),T.default.getSingleton().run(F,"construct")},o(63517),o(91683),o(97552);var i=o(83302),r=o(85015),n=o(93315),a=o(37595),l=s(o(6116)),h=s(o(75244)),u=o(22232),d=o(51400),c=o(50095),g=o(52870),f=o(52036),p=o(7462),m=o(83605),w=o(80239),C=o(18609),v=o(68145),y=s(o(54833)),E=s(o(43951)),S=o(65320),R=o(33165),b=o(45433),_=o(21280),T=s(o(56307)),O=o(22489),M=o(8222),I=o(69167),N=o(3177),A=o(41808),P=o(42386),x=o(47152),H=o(29282);let k=null;const D=new Map;new Set},89055:(e,t,o)=>{"use strict";t.__esModule=!0,t.installFocusDetector=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=e.rootElement,s=r(e),i=r(e);return s.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromTop())),i.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromBottom())),o.firstChild.before(s),o.lastChild.after(i),{activate(){e._registerTimeout((()=>{s.tabIndex=0,i.tabIndex=0}),10)},deactivate(){e._registerTimeout((()=>{s.tabIndex=-1,i.tabIndex=-1}),10)}}};var s=o(83302),i=o(5386);function r(e){const t=e.rootDocument.createElement("input");return t.type="text",t.classList.add("htFocusCatcher"),e.getSettings().ariaTags&&(0,s.setAttribute)(t,[(0,i.A11Y_PRESENTATION)(),(0,i.A11Y_HIDDEN)()]),t}},58954:(e,t,o)=>{"use strict";t.__esModule=!0,t.installFocusCatcher=function(e){let t;const{activate:o,deactivate:a}=(0,i.installFocusDetector)(e,{onFocusFromTop(){var o;const s=null!==(o=t)&&void 0!==o?o:r(e);s&&(e.runHooks("modifyFocusOnTabNavigation","from_above",s),e.selectCell(s.row,s.col)),e.listen()},onFocusFromBottom(){var o;const s=null!==(o=t)&&void 0!==o?o:n(e);s&&(e.runHooks("modifyFocusOnTabNavigation","from_below",s),e.selectCell(s.row,s.col)),e.listen()}}),l={wrapped:!1,flipped:!1};let h=!0,u=!1;e.addHook("afterListen",(()=>a())),e.addHook("afterUnlisten",(()=>o())),e.addHook("afterSelection",((o,s,i,r,n)=>{var a;(u&&l.wrapped&&l.flipped&&(n.value=!0),h)&&(t=null===(a=e.getSelectedRangeLast())||void 0===a?void 0:a.highlight)})),e.addHook("beforeRowWrap",((e,t,o)=>{l.wrapped=!0,l.flipped=o}));const d={keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:s.GRID_GROUP,group:"focusCatcher"};e.getShortcutManager().getContext("grid").addShortcuts([{...d,callback:()=>{u=!0,e.getSelectedRangeLast()&&!e.getSettings().tabNavigation&&(h=!1)},position:"before"},{...d,callback:o=>{const{tabNavigation:s,autoWrapRow:i}=e.getSettings();if(u=!1,h=!0,!s||!e.selection.isSelected()||i&&l.wrapped&&l.flipped||!i&&l.wrapped)return i&&l.wrapped&&l.flipped&&(t=o.shiftKey?r(e):n(e)),l.wrapped=!1,l.flipped=!1,e.deselectCell(),e.unlisten(),!1;o.preventDefault()},position:"after"}])};var s=o(29282),i=o(89055);function r(e){const{rowIndexMapper:t,columnIndexMapper:o}=e,{navigableHeaders:s}=e.getSettings();let i=s&&e.countColHeaders()>0?-e.countColHeaders():0,r=s&&e.countRowHeaders()>0?-e.countRowHeaders():0;return 0===i&&(i=t.getVisualFromRenderableIndex(i)),0===r&&(r=o.getVisualFromRenderableIndex(r)),null===i||null===r?null:e._createCellCoords(i,r)}function n(e){var t,o;const{rowIndexMapper:s,columnIndexMapper:i}=e,{navigableHeaders:r}=e.getSettings();let n=s.getRenderableIndexesLength()-1,a=i.getRenderableIndexesLength()-1;if(n<0){if(!r||0===e.countColHeaders())return null;n=-1}if(a<0){if(!r||0===e.countColHeaders())return null;a=-1}return e._createCellCoords(null!==(t=s.getVisualFromRenderableIndex(n))&&void 0!==t?t:n,null!==(o=i.getVisualFromRenderableIndex(a))&&void 0!==o?o:a)}},41808:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(58954);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}))},85631:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=o(29270),n=o(65320),a=o(22232),l=o(50095),h=o(68145),u=o(93315);class d{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}constructor(e,t,o){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"metaManager",void 0),(0,i.default)(this,"tableMeta",void 0),(0,i.default)(this,"dataSource",void 0),(0,i.default)(this,"duckSchema",void 0),(0,i.default)(this,"colToPropCache",void 0),(0,i.default)(this,"propToColCache",void 0),this.hot=e,this.metaManager=o,this.tableMeta=o.getTableMeta(),this.dataSource=t,this.duckSchema=this.createDuckSchema(),this.createMap()}createMap(){const e=this.getSchema();if(void 0===e)throw new Error("trying to create `columns` definition but you didn't provide `schema` nor `data`");const t=this.tableMeta.columns;let o;if(this.colToPropCache=[],this.propToColCache=new Map,t){let s=0,i=0,r=!1;if("function"==typeof t){const t=(0,a.deepObjectSize)(e);s=t>0?t:this.countFirstRowKeys(),r=!0}else{const e=this.tableMeta.maxCols;s=Math.min(e,t.length)}for(o=0;o<s;o++){const e=r?t(o):t[o];if((0,a.isObject)(e)){if(void 0!==e.data){const t=r?i:o;this.colToPropCache[t]=e.data,this.propToColCache.set(e.data,t)}i+=1}}}else this.recursiveDuckColumns(e)}countFirstRowKeys(){return(0,n.countFirstRowKeys)(this.dataSource)}recursiveDuckColumns(e,t,o){let s,i=t,r=o;return void 0===i&&(i=0,r=""),"object"!=typeof e||Array.isArray(e)||(0,a.objectEach)(e,((e,t)=>{null===e?(s=r+t,this.colToPropCache.push(s),this.propToColCache.set(s,i),i+=1):i=this.recursiveDuckColumns(e,i,`${t}.`)})),i}colToProp(e){if(!1===Number.isInteger(e))return e;const t=this.hot.toPhysicalColumn(e);return null===t?e:this.colToPropCache&&(0,u.isDefined)(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){const t=this.propToColCache.get(e);if((0,u.isDefined)(t))return this.hot.toVisualColumn(t);const o=this.hot.toVisualColumn(e);return null===o?e:o}getSchema(){const e=this.tableMeta.dataSchema;return e?"function"==typeof e?e():e:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?(0,a.duckSchema)(this.dataSource[0]):{}}refreshDuckSchema(){this.duckSchema=this.createDuckSchema()}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:o,mode:s="above"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=this.hot.countSourceRows();let r=i,n=0,l=e;("number"!=typeof l||l>=i)&&(l=i),l<this.hot.countRows()&&(r=this.hot.toPhysicalRow(l));if(!1===this.hot.runHooks("beforeCreateRow",l,t,o)||null===r)return{delta:0};const u=this.tableMeta.maxRows,d=this.getSchema().length,c=[];for(;n<t&&i+n<u;){let e=null;"array"===this.hot.dataType?this.tableMeta.dataSchema?e=(0,a.deepClone)(this.getSchema()):(e=[],(0,h.rangeEach)(d-1,(()=>e.push(null)))):"function"===this.hot.dataType?e=this.tableMeta.dataSchema(l+n):(e={},(0,a.deepExtend)(e,this.getSchema())),c.push(e),n+=1}this.hot.rowIndexMapper.insertIndexes(l,n),"below"===s&&(r=Math.min(r+1,i)),this.spliceData(r,0,c);const g=this.hot.toVisualRow(r);return this.hot.countSourceRows()===c.length&&this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount()),n>0&&(null==e?this.metaManager.createRow(null,n):"auto"!==o&&this.metaManager.createRow(r,t)),this.hot.runHooks("afterCreateRow",g,n,o),this.hot.forceFullRender=!0,{delta:n,startPhysicalIndex:r}}createCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:o,mode:s="start"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.hot.isColumnModificationAllowed())throw new Error("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting.If you want to be able to add new columns, you have to use array datasource.");const i=this.dataSource,r=this.tableMeta.maxCols,n=this.hot.countSourceCols();let a=e;("number"!=typeof a||a>=n)&&(a=n);if(!1===this.hot.runHooks("beforeCreateCol",a,t,o))return{delta:0};let l=n;a<this.hot.countCols()&&(l=this.hot.toPhysicalColumn(a));const h=this.hot.countSourceRows();let u=this.hot.countCols(),d=0,c=l;"end"===s&&(c=Math.min(c+1,n));const g=c;for(;d<t&&u<r;){if("number"!=typeof a||a>=u)if(h>0)for(let e=0;e<h;e+=1)void 0===i[e]&&(i[e]=[]),i[e].push(null);else i.push([null]);else for(let e=0;e<h;e++)i[e].splice(c,0,null);d+=1,c+=1,u+=1}this.hot.columnIndexMapper.insertIndexes(a,d),d>0&&(null==e?this.metaManager.createColumn(null,d):"auto"!==o&&this.metaManager.createColumn(g,t));const f=this.hot.toVisualColumn(g);return this.hot.runHooks("afterCreateCol",f,d,o),this.hot.forceFullRender=!0,this.refreshDuckSchema(),{delta:d,startPhysicalIndex:g}}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0,s=Number.isInteger(e)?e:-t;const i=this.visualRowsToPhysical(s,t),r=this.hot.countSourceRows();s=(r+s)%r;if(!1===this.hot.runHooks("beforeRemoveRow",s,i.length,i,o))return!1;const n=i.length;if(this.filterData(s,n,i),s<this.hot.countRows()){this.hot.rowIndexMapper.removeIndexes(i);const e=(0,u.isDefined)(this.tableMeta.columns)||(0,u.isDefined)(this.tableMeta.dataSchema);0===this.hot.rowIndexMapper.getNotTrimmedIndexesLength()&&!1===e&&this.hot.columnIndexMapper.setIndexesSequence([])}return i.slice(0).sort(((e,t)=>t-e)).forEach((e=>{this.metaManager.removeRow(e,1)})),this.hot.runHooks("afterRemoveRow",s,n,i,o),this.hot.forceFullRender=!0,!0}removeCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0;if("object"===this.hot.dataType||this.tableMeta.columns)throw new Error("cannot remove column with object data source or columns option specified");let s="number"!=typeof e?-t:e;s=(this.hot.countCols()+s)%this.hot.countCols();const i=this.visualColumnsToPhysical(s,t),r=i.slice(0).sort(((e,t)=>t-e));if(!1===this.hot.runHooks("beforeRemoveCol",s,t,i,o))return!1;let n=!0;const a=r.length,l=this.dataSource;for(let e=0;e<a;e++)n&&i[0]!==i[e]-e&&(n=!1);if(n)for(let e=0,o=this.hot.countSourceRows();e<o;e++)l[e].splice(i[0],t),0===e&&this.metaManager.removeColumn(i[0],t);else for(let e=0,t=this.hot.countSourceRows();e<t;e++)for(let t=0;t<a;t++)l[e].splice(r[t],1),0===e&&this.metaManager.removeColumn(r[t],1);return s<this.hot.countCols()&&(this.hot.columnIndexMapper.removeIndexes(i),0===this.hot.columnIndexMapper.getNotTrimmedIndexesLength()&&this.hot.rowIndexMapper.setIndexesSequence([])),this.hot.runHooks("afterRemoveCol",s,t,i,o),this.hot.forceFullRender=!0,this.refreshDuckSchema(),!0}spliceCol(e,t,o){const s=this.hot.getDataAtCol(e),i=s.slice(t,t+o),r=s.slice(t+o);for(var n=arguments.length,a=new Array(n>3?n-3:0),h=3;h<n;h++)a[h-3]=arguments[h];(0,l.extendArray)(a,r);let u=0;for(;u<o;)a.push(null),u+=1;return(0,l.to2dArray)(a),this.hot.populateFromArray(t,e,a,null,null,"spliceCol"),i}spliceRow(e,t,o){const s=this.hot.getSourceDataAtRow(e),i=s.slice(t,t+o),r=s.slice(t+o);for(var n=arguments.length,a=new Array(n>3?n-3:0),h=3;h<n;h++)a[h-3]=arguments[h];(0,l.extendArray)(a,r);let u=0;for(;u<o;)a.push(null),u+=1;return this.hot.populateFromArray(e,t,[a],null,null,"spliceRow"),i}spliceData(e,t,o){if(!1!==this.hot.runHooks("beforeDataSplice",e,t,o)){const t=[...this.dataSource.slice(0,e),...o,...this.dataSource.slice(e)];this.dataSource.length=0,t.forEach((e=>this.dataSource.push(e)))}}filterData(e,t,o){let s=this.hot.runHooks("filterData",e,t,o);!1===Array.isArray(s)&&(s=this.dataSource.filter(((e,t)=>-1===o.indexOf(t)))),this.dataSource.length=0,Array.prototype.push.apply(this.dataSource,s)}get(e,t){const o=this.hot.toPhysicalRow(e);let s=this.dataSource[o];const i=this.hot.runHooks("modifyRowData",o);s=isNaN(i)?i:s;let r=null;if(s&&s.hasOwnProperty&&(0,a.hasOwnProperty)(s,t))r=s[t];else if("string"==typeof t&&t.indexOf(".")>-1){const e=t.split(".");let o=s;if(!o)return null;for(let t=0,s=e.length;t<s;t++)if(o=o[e[t]],void 0===o)return null;r=o}else"function"==typeof t&&(r=t(this.dataSource.slice(o,o+1)[0]));if(this.hot.hasHook("modifyData")){const e=(0,a.createObjectPropListener)(r);this.hot.runHooks("modifyData",o,this.propToCol(t),e,"get"),e.isTouched()&&(r=e.value)}return r}getCopyable(e,t){return this.hot.getCellMeta(e,this.propToCol(t)).copyable?this.get(e,t):""}set(e,t,o){const s=this.hot.toPhysicalRow(e);let i=o,r=this.dataSource[s];const n=this.hot.runHooks("modifyRowData",s);if(r=isNaN(n)?n:r,this.hot.hasHook("modifyData")){const e=(0,a.createObjectPropListener)(i);this.hot.runHooks("modifyData",s,this.propToCol(t),e,"set"),e.isTouched()&&(i=e.value)}if(r&&r.hasOwnProperty&&(0,a.hasOwnProperty)(r,t))r[t]=i;else if("string"==typeof t&&t.indexOf(".")>-1){const e=t.split(".");let o,s=r,n=0;for(n=0,o=e.length-1;n<o;n++)void 0===s[e[n]]&&(s[e[n]]={}),s=s[e[n]];s[e[n]]=i}else"function"==typeof t?t(this.dataSource.slice(s,s+1)[0],i):r[t]=i}visualRowsToPhysical(e,t){const o=this.hot.countSourceRows(),s=[];let i,r=(o+e)%o,n=t;for(;r<o&&n;)i=this.hot.toPhysicalRow(r),s.push(i),n-=1,r+=1;return s}visualColumnsToPhysical(e,t){const o=this.hot.countCols(),s=[];let i=(o+e)%o,r=t;for(;i<o&&r;){const e=this.hot.toPhysicalColumn(i);s.push(e),r-=1,i+=1}return s}clear(){for(let e=0;e<this.hot.countSourceRows();e++)for(let t=0;t<this.hot.countCols();t++)this.set(e,this.colToProp(t),"")}getLength(){const e=this.tableMeta.maxRows;let t;t=e<0||0===e?0:e||1/0;const o=this.hot.rowIndexMapper.getNotTrimmedIndexesLength();return Math.min(o,t)}getAll(){const e={row:0,col:0},t={row:Math.max(this.hot.countRows()-1,0),col:Math.max(this.hot.countCols()-1,0)};return e.row-t.row!=0||this.hot.countSourceRows()?this.getRange(e,t,d.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(e,t,o){const s=[];let i,r,n;const a=this.tableMeta.maxRows,l=this.tableMeta.maxCols;if(0===a||0===l)return[];const h=o===d.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,u=Math.min(Math.max(a-1,0),Math.max(e.row,t.row)),c=Math.min(Math.max(l-1,0),Math.max(e.col,t.col));for(i=Math.min(e.row,t.row);i<=u;i++){n=[];const o=i>=0?this.hot.toPhysicalRow(i):i;for(r=Math.min(e.col,t.col);r<=c&&null!==o;r++)n.push(h.call(this,i,this.colToProp(r)));null!==o&&s.push(n)}return s}getText(e,t){return(0,r.stringify)(this.getRange(e,t,d.DESTINATION_RENDERER))}getCopyableText(e,t){return(0,r.stringify)(this.getRange(e,t,d.DESTINATION_CLIPBOARD_GENERATOR))}destroy(){this.hot=null,this.metaManager=null,this.dataSource=null,this.duckSchema=null,this.colToPropCache.length=0,this.propToColCache.clear(),this.propToColCache=void 0}}t.default=d},43951:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(22232),n=o(65320),a=o(50095),l=o(68145),h=o(85015);t.default=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];(0,i.default)(this,"hot",void 0),(0,i.default)(this,"data",void 0),(0,i.default)(this,"dataType","array"),(0,i.default)(this,"colToProp",(()=>{})),(0,i.default)(this,"propToCol",(()=>{})),this.hot=e,this.data=t}modifyRowData(e){let t;return this.hot.hasHook("modifyRowData")&&(t=this.hot.runHooks("modifyRowData",e)),void 0===t||Number.isInteger(t)?this.data[e]:t}getData(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.data&&0!==this.data.length?this.getByRange(null,null,e):this.data}setData(e){this.data=e}getAtColumn(e){const t=[];return(0,a.arrayEach)(this.data,((o,s)=>{const i=this.getAtCell(s,e);t.push(i)})),t}getAtRow(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=void 0===t&&void 0===o;let n=null,a=null;if(n=this.modifyRowData(e),Array.isArray(n))a=[],i?n.forEach(((t,o)=>{a[o]=this.getAtPhysicalCell(e,o,n)})):(0,l.rangeEach)(t,o,(o=>{a[o-t]=this.getAtPhysicalCell(e,o,n)}));else if((0,r.isObject)(n)||(0,h.isFunction)(n))if(a=s?[]:{},!i||s){const i=0,h=this.countFirstRowKeys()-1;(0,l.rangeEach)(i,h,(l=>{const u=this.colToProp(l);if(l>=(t||i)&&l<=(o||h)&&!Number.isInteger(u)){const t=this.getAtPhysicalCell(e,u,n);s?a.push(t):(0,r.setProperty)(a,u,t)}}))}else(0,r.objectEach)(n,((t,o)=>{(0,r.setProperty)(a,o,this.getAtPhysicalCell(e,o,n))}));return a}setAtCell(e,t,o){if(!(e>=this.countRows()||t>=this.countFirstRowKeys())){if(this.hot.hasHook("modifySourceData")){const s=(0,r.createObjectPropListener)(o);this.hot.runHooks("modifySourceData",e,t,s,"set"),s.isTouched()&&(o=s.value)}Number.isInteger(t)?this.data[e][t]=o:(0,r.setProperty)(this.data[e],t,o)}}getAtPhysicalCell(e,t,o){let s=null;if(o&&(s="string"==typeof t?(0,r.getProperty)(o,t):"function"==typeof t?t(o):o[t]),this.hot.hasHook("modifySourceData")){const o=(0,r.createObjectPropListener)(s);this.hot.runHooks("modifySourceData",e,t,o,"get"),o.isTouched()&&(s=o.value)}return s}getAtCell(e,t){const o=this.modifyRowData(e);return this.getAtPhysicalCell(e,this.colToProp(t),o)}getByRange(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=!1,i=null,r=null,n=null,a=null;null===e||null===t?(s=!0,i=0,n=this.countRows()-1):(i=Math.min(e.row,t.row),r=Math.min(e.col,t.col),n=Math.max(e.row,t.row),a=Math.max(e.col,t.col));const h=[];return(0,l.rangeEach)(i,n,(e=>{h.push(s?this.getAtRow(e,void 0,void 0,o):this.getAtRow(e,r,a,o))})),h}countRows(){if(this.hot.hasHook("modifySourceLength")){const e=this.hot.runHooks("modifySourceLength");if(Number.isInteger(e))return e}return this.data.length}countFirstRowKeys(){return(0,n.countFirstRowKeys)(this.data)}destroy(){this.data=null,this.hot=null}}},3177:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(85631));t.DataMap=i.default;var r=s(o(10146));t.MetaManager=r.default;var n=s(o(87574));t.metaSchemaFactory=n.default;var a=o(73046);t.replaceData=a.replaceData;var l=o(24298);t.DynamicCellMetaMod=l.DynamicCellMetaMod;var h=o(63511);t.ExtendMetaPropertiesMod=h.ExtendMetaPropertiesMod},10146:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(23373)),r=s(o(34624)),n=s(o(22142)),a=s(o(7083)),l=s(o(65718)),h=o(22232);class u{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.hot=e,this.globalMeta=new i.default(e),this.tableMeta=new r.default(this.globalMeta),this.columnMeta=new n.default(this.globalMeta),this.cellMeta=new a.default(this.columnMeta),o.forEach((e=>new e(this))),this.globalMeta.updateMeta(t)}getGlobalMeta(){return this.globalMeta.getMeta()}updateGlobalMeta(e){this.globalMeta.updateMeta(e)}getTableMeta(){return this.tableMeta.getMeta()}updateTableMeta(e){this.tableMeta.updateMeta(e)}getColumnMeta(e){return this.columnMeta.getMeta(e)}updateColumnMeta(e,t){this.columnMeta.updateMeta(e,t)}getCellMeta(e,t,o){let{visualRow:s,visualColumn:i}=o;const r=this.cellMeta.getMeta(e,t);return r.visualRow=s,r.visualCol=i,r.row=e,r.col=t,this.runLocalHooks("afterGetCellMeta",r),r}getCellMetaKeyValue(e,t,o){if("string"!=typeof o)throw new Error("The passed cell meta object key is not a string");return this.cellMeta.getMeta(e,t,o)}setCellMeta(e,t,o,s){this.cellMeta.setMeta(e,t,o,s)}updateCellMeta(e,t,o){this.cellMeta.updateMeta(e,t,o)}removeCellMeta(e,t,o){this.cellMeta.removeMeta(e,t,o)}getCellsMeta(){return this.cellMeta.getMetas()}getCellsMetaAtRow(e){return this.cellMeta.getMetasAtRow(e)}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createRow(e,t)}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeRow(e,t)}createColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createColumn(e,t),this.columnMeta.createColumn(e,t)}removeColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeColumn(e,t),this.columnMeta.removeColumn(e,t)}clearCellsCache(){this.cellMeta.clearCache()}clearCache(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}}t.default=u,(0,h.mixin)(u,l.default)},32156:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(50095),n=o(8972);let a;a=Symbol.iterator;t.default=class{constructor(e){(0,i.default)(this,"valueFactory",void 0),(0,i.default)(this,"data",[]),(0,i.default)(this,"index",[]),(0,i.default)(this,"holes",new Set),this.valueFactory=e}obtain(e){(0,n.assert)((()=>(0,n.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=this._getStorageIndexByKey(e);let o;if(t>=0)o=this.data[t],void 0===o&&(o=this.valueFactory(e),this.data[t]=o);else if(o=this.valueFactory(e),this.holes.size>0){const t=this.holes.values().next().value;this.holes.delete(t),this.data[t]=o,this.index[e]=t}else this.data.push(o),this.index[e]=this.data.length-1;return o}insert(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,n.assert)((()=>(0,n.isUnsignedNumber)(e)||(0,n.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const o=[],s=this.data.length;for(let e=0;e<t;e++)o.push(s+e),this.data.push(void 0);const i=(0,n.isNullish)(e)?this.index.length:e;this.index=[...this.index.slice(0,i),...o,...this.index.slice(i)]}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,n.assert)((()=>(0,n.isUnsignedNumber)(e)||(0,n.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const o=this.index.splice((0,n.isNullish)(e)?this.index.length-t:e,t);for(let e=0;e<o.length;e++){const t=o[e];"number"==typeof t&&this.holes.add(t)}}size(){return this.data.length-this.holes.size}values(){return(0,r.arrayFilter)(this.data,((e,t)=>!this.holes.has(t)))[Symbol.iterator]()}entries(){const e=[];for(let t=0;t<this.data.length;t++){const o=this._getKeyByStorageIndex(t);-1!==o&&e.push([o,this.data[t]])}let t=0;return{next:()=>{if(t<e.length){const o=e[t];return t+=1,{value:o,done:!1}}return{done:!0}}}}clear(){this.data=[],this.index=[],this.holes.clear()}_getStorageIndexByKey(e){return this.index.length>e?this.index[e]:-1}_getKeyByStorageIndex(e){return this.index.indexOf(e)}[a](){return this.entries()}}},7083:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(22232),n=o(8972),a=s(o(32156));t.default=class{constructor(e){(0,i.default)(this,"columnMeta",void 0),(0,i.default)(this,"metas",new a.default((()=>this._createRow()))),this.columnMeta=e}updateMeta(e,t,o){const s=this.getMeta(e,t);(0,r.extend)(s,o),(0,n.extendByMetaType)(s,o)}createRow(e,t){this.metas.insert(e,t)}createColumn(e,t){for(let o=0;o<this.metas.size();o++)this.metas.obtain(o).insert(e,t)}removeRow(e,t){this.metas.remove(e,t)}removeColumn(e,t){for(let o=0;o<this.metas.size();o++)this.metas.obtain(o).remove(e,t)}getMeta(e,t,o){const s=this.metas.obtain(e).obtain(t);return void 0===o?s:s[o]}setMeta(e,t,o,s){var i;const r=this.metas.obtain(e).obtain(t);null===(i=r._automaticallyAssignedMetaProps)||void 0===i||i.delete(o),r[o]=s}removeMeta(e,t,o){delete this.metas.obtain(e).obtain(t)[o]}getMetas(){const e=[],t=Array.from(this.metas.values());for(let o=0;o<t.length;o++)e.push(...t[o].values());return e}getMetasAtRow(e){(0,n.assert)((()=>(0,n.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=new Map(this.metas);return t.has(e)?Array.from(t.get(e).values()):[]}clearCache(){this.metas.clear()}_createRow(){return new a.default((e=>this._createMeta(e)))}_createMeta(e){return new(this.columnMeta.getMetaConstructor(e))}}},22142:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(22232),n=o(8972),a=s(o(32156));const l=["data","width"];t.default=class{constructor(e){(0,i.default)(this,"globalMeta",void 0),(0,i.default)(this,"metas",new a.default((()=>this._createMeta()))),this.globalMeta=e,this.metas=new a.default((()=>this._createMeta()))}updateMeta(e,t){const o=this.getMeta(e);(0,r.extend)(o,t),(0,n.extendByMetaType)(o,t)}createColumn(e,t){this.metas.insert(e,t)}removeColumn(e,t){this.metas.remove(e,t)}getMeta(e){return this.metas.obtain(e)}getMetaConstructor(e){return this.metas.obtain(e).constructor}clearCache(){this.metas.clear()}_createMeta(){return(0,n.columnFactory)(this.globalMeta.getMetaConstructor(),l).prototype}}},23373:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(22232),n=o(8972),a=s(o(87574));t.default=class{constructor(e){(0,i.default)(this,"metaCtor",class{}),(0,i.default)(this,"meta",void 0),this.meta=this.metaCtor.prototype,(0,r.extend)(this.meta,(0,a.default)()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){var t;(0,r.extend)(this.meta,e),(0,n.extendByMetaType)(this.meta,{...e,type:null!==(t=e.type)&&void 0!==t?t:this.meta.type},e)}}},34624:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(22232),n=o(8972);t.default=class{constructor(e){(0,i.default)(this,"meta",void 0);const t=e.getMetaConstructor();this.meta=new t}getMeta(){return this.meta}updateMeta(e){(0,r.extend)(this.meta,e),(0,n.extendByMetaType)(this.meta,e,e)}}},87574:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(93315),i=o(22232);t.default=()=>({_automaticallyAssignedMetaProps:void 0,activeHeaderClassName:"ht__active_highlight",allowEmpty:!0,allowHtml:!1,allowInsertColumn:!0,allowInsertRow:!0,allowInvalid:!0,allowRemoveColumn:!0,allowRemoveRow:!0,ariaTags:!0,autoColumnSize:void 0,autoRowSize:void 0,autoWrapCol:!1,autoWrapRow:!1,bindRowsWithHeaders:void 0,cell:[],cells:void 0,checkedTemplate:void 0,className:void 0,colHeaders:null,collapsibleColumns:void 0,columnHeaderHeight:void 0,columns:void 0,columnSorting:void 0,columnSummary:void 0,colWidths:void 0,commentedCellClassName:"htCommentCell",comments:!1,contextMenu:void 0,copyable:!0,copyPaste:!0,correctFormat:!1,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,data:void 0,dataSchema:void 0,dateFormat:"DD/MM/YYYY",datePickerConfig:void 0,defaultDate:void 0,disableVisualSelection:!1,dragToScroll:!0,dropdownMenu:void 0,editor:void 0,enterBeginsEditing:!0,enterMoves:{col:0,row:1},fillHandle:{autoInsertRow:!1},filter:!0,filteringCaseSensitive:!1,filters:void 0,fixedColumnsLeft:0,fixedColumnsStart:0,fixedRowsBottom:0,fixedRowsTop:0,formulas:void 0,fragmentSelection:!1,height:void 0,hiddenColumns:void 0,hiddenRows:void 0,invalidCellClassName:"htInvalid",imeFastEdit:!1,isEmptyCol(e){let t,o,i;for(t=0,o=this.countRows();t<o;t++)if(i=this.getDataAtCell(t,e),!1===(0,s.isEmpty)(i))return!1;return!0},isEmptyRow(e){let t,o,r,n;for(t=0,o=this.countCols();t<o;t++)if(r=this.getDataAtCell(e,t),!1===(0,s.isEmpty)(r))return"object"==typeof r&&(n=this.getCellMeta(e,t),(0,i.isObjectEqual)(this.getSchema()[n.prop],r));return!0},label:void 0,language:"en-US",layoutDirection:"inherit",licenseKey:void 0,locale:"en-US",manualColumnFreeze:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,maxCols:1/0,maxRows:1/0,mergeCells:!1,minCols:0,minRows:0,minSpareCols:0,minSpareRows:0,multiColumnSorting:void 0,navigableHeaders:!1,tabNavigation:!0,nestedHeaders:void 0,nestedRows:void 0,noWordWrapClassName:"htNoWrap",numericFormat:void 0,observeDOMVisibility:!0,outsideClickDeselects:!0,persistentState:void 0,placeholder:void 0,placeholderCellClassName:"htPlaceholder",preventOverflow:!1,preventWheel:!1,readOnly:!1,readOnlyCellClassName:"htDimmed",renderAllRows:void 0,renderer:void 0,rowHeaders:void 0,rowHeaderWidth:void 0,rowHeights:void 0,search:!1,selectionMode:"multiple",selectOptions:void 0,skipColumnOnPaste:!1,skipRowOnPaste:!1,sortByRelevance:!0,source:void 0,startCols:5,startRows:5,stretchH:"none",strict:void 0,tableClassName:void 0,tabMoves:{row:0,col:1},title:void 0,trimDropdown:!0,trimRows:void 0,trimWhitespace:!0,type:"text",uncheckedTemplate:void 0,undo:void 0,validator:void 0,viewportColumnRenderingOffset:"auto",viewportRowRenderingOffset:"auto",visibleRows:10,width:void 0,wordWrap:!0})},24298:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=s(o(56307)),n=o(22232),a=o(85015);t.DynamicCellMetaMod=class{constructor(e){(0,i.default)(this,"metaManager",void 0),(0,i.default)(this,"metaSyncMemo",new Map),this.metaManager=e,e.addLocalHook("afterGetCellMeta",(e=>this.extendCellMeta(e))),r.default.getSingleton().add("beforeRender",(e=>{e&&this.metaSyncMemo.clear()}),this.metaManager.hot)}extendCellMeta(e){var t;const{row:o,col:s}=e;if(null!==(t=this.metaSyncMemo.get(o))&&void 0!==t&&t.has(s))return;const{visualRow:i,visualCol:r}=e,l=this.metaManager.hot,h=l.colToProp(r);e.prop=h,l.runHooks("beforeGetCellMeta",i,r,e);const u=(0,n.hasOwnProperty)(e,"type")?e.type:null;let d=(0,a.isFunction)(e.cells)?e.cells(o,s,h):null;var c;u&&(d?d.type=null!==(c=d.type)&&void 0!==c?c:u:d={type:u});d&&this.metaManager.updateCellMeta(o,s,d),l.runHooks("afterGetCellMeta",i,r,e),this.metaSyncMemo.has(o)||this.metaSyncMemo.set(o,new Set),this.metaSyncMemo.get(o).add(s)}}},63511:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231));t.ExtendMetaPropertiesMod=class{constructor(e){(0,i.default)(this,"metaManager",void 0),(0,i.default)(this,"usageTracker",new Set),(0,i.default)(this,"propDescriptors",new Map([["ariaTags",{onChange(e,t,o){if(!o)throw new Error(`The \`${e}\` option can not be updated after the Handsontable instance was initialized.`)}}],["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(e){if(this.metaManager.hot.isRtl()&&"fixedColumnsLeft"===e)throw new Error("The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`.");if(this.usageTracker.has("fixedColumnsLeft")&&this.usageTracker.has("fixedColumnsStart"))throw new Error("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`.")}}],["layoutDirection",{onChange(e,t,o){if(!o)throw new Error(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)}}]])),this.metaManager=e,this.extendMetaProps()}extendMetaProps(){this.propDescriptors.forEach(((e,t)=>{const{target:o,onChange:s=(()=>{})}=e,i="string"==typeof o,r=i?o:t,n=`_${r}`;this.metaManager.globalMeta.meta[n]=this.metaManager.globalMeta.meta[r],this.installPropWatcher(t,n,s),i&&this.installPropWatcher(o,n,s)}))}installPropWatcher(e,t,o){const s=this;Object.defineProperty(this.metaManager.globalMeta.meta,e,{get(){return this[t]},set(i){const r=!s.usageTracker.has(e);s.usageTracker.add(e),o.call(s,e,i,r),this[t]=i},enumerable:!0,configurable:!0})}}},8972:(e,t,o)=>{"use strict";t.__esModule=!0,t.assert=function(e,t){if(!e())throw new Error(`Assertion failed: ${t}`)},t.columnFactory=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];function o(){}(0,s.inherit)(o,e);for(let e=0;e<t.length;e++)o.prototype[t[e]]=void 0;return o},t.extendByMetaType=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const r="string"==typeof t.type?(0,i.getCellType)(t.type):t.type;e._automaticallyAssignedMetaProps&&(0,s.objectEach)(t,((t,o)=>{e._automaticallyAssignedMetaProps.delete(o)}));if(!(0,s.isObject)(r))return;o!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);const n={};(0,s.objectEach)(r,((t,i)=>{var r;(function(e,t){var o;if("CELL_TYPE"===e)return!1;return(null===(o=t._automaticallyAssignedMetaProps)||void 0===o?void 0:o.has(e))||!(0,s.hasOwnProperty)(t,e)})(i,o)&&(n[i]=t,null===(r=e._automaticallyAssignedMetaProps)||void 0===r||r.add(i))})),(0,s.extend)(e,n)},t.isNullish=function(e){return null==e},t.isUnsignedNumber=function(e){return Number.isInteger(e)&&e>=0},o(91683);var s=o(22232),i=o(65324)},73046:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.replaceData=function(e,t,o,s){const{hotInstance:u,dataMap:d,dataSource:c,internalSource:g,source:f,metaManager:p,firstRun:m}=s,w=(0,i.toUpperCaseFirst)(g),C=u.getSettings();Array.isArray(C.dataSchema)?u.dataType="array":(0,r.isFunction)(C.dataSchema)?u.dataType="function":u.dataType="object";d&&d.destroy();e=u.runHooks(`before${w}`,e,m,f);const v=new n.default(u,e,p);if(t(v),"object"==typeof e&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error(`${g} only accepts array of objects or array of arrays (${typeof e} given)`);{const t=v.getSchema();let o;e=[];let s=0,i=0;for(s=0,i=C.startRows;s<i;s++)if("object"!==u.dataType&&"function"!==u.dataType||!C.dataSchema)if("array"===u.dataType)o=(0,a.deepClone)(t[0]),e.push(o);else{o=[];for(let e=0,t=C.startCols;e<t;e++)o.push(null);e.push(o)}else o=(0,a.deepClone)(t),e.push(o)}}Array.isArray(e[0])&&(u.dataType="array");C.data=e,v.dataSource=e,c.data=e,c.dataType=u.dataType,c.colToProp=v.colToProp.bind(v),c.propToCol=v.propToCol.bind(v),c.countCachedColumns=v.countCachedColumns.bind(v),o(v),u.runHooks(`after${w}`,e,m,f),m||(u.runHooks("afterChange",null,g),u.render());u.getSettings().ariaTags&&(0,l.setAttribute)(u.rootElement,[(0,h.A11Y_ROWCOUNT)(-1),(0,h.A11Y_COLCOUNT)(u.countCols()+(u.view?u.countRowHeaders():0))])},o(63517),o(91683);var i=o(18609),r=o(85015),n=s(o(85631)),a=o(22232),l=o(83302),h=o(5386)},6116:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(80151),n=o(24449),a=o(83605),l=s(o(75244)),h=o(93315);function u(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function d(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const c=t.SHORTCUTS_GROUP_NAVIGATION="editorManager.navigation";var g=new WeakSet,f=new WeakSet;class p{constructor(e,t,o){u(this,f),u(this,g),(0,i.default)(this,"hot",void 0),(0,i.default)(this,"tableMeta",void 0),(0,i.default)(this,"selection",void 0),(0,i.default)(this,"eventManager",void 0),(0,i.default)(this,"destroyed",!1),(0,i.default)(this,"lock",!1),(0,i.default)(this,"activeEditor",void 0),(0,i.default)(this,"cellProperties",void 0),this.hot=e,this.tableMeta=t,this.selection=o,this.eventManager=new l.default(e),this.hot.addHook("afterDocumentKeyDown",(e=>d(this,g,m).call(this,e))),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"compositionstart",(e=>{!this.destroyed&&this.hot.isListening()&&this.openEditor("",e)})),this.hot.view._wt.update("onCellDblClick",((e,t,o)=>d(this,f,w).call(this,e,t,o)))}lockEditor(){this.lock=!0}unlockEditor(){this.lock=!1}destroyEditor(e){this.lock||this.closeEditor(e)}getActiveEditor(){return this.activeEditor}prepareEditor(){if(this.lock)return;if(this.activeEditor&&this.activeEditor.isWaiting())return void this.closeEditor(!1,!1,(e=>{e&&this.prepareEditor()}));const{highlight:e}=this.hot.getSelectedRangeLast();if(e.isHeader())return;const{row:t,col:o}=e,s=this.hot.runHooks("modifyGetCellCoords",t,o);let i=t,r=o;if(Array.isArray(s)&&([i,r]=s),this.cellProperties=this.hot.getCellMeta(i,r),!this.isCellEditable())return void this.clearActiveEditor();const n=this.hot.getCell(t,o,!0);if(n){const e=this.hot.getCellEditor(this.cellProperties),s=this.hot.colToProp(r),l=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(i),r);this.activeEditor=(0,a.getEditorInstance)(e,this.hot),this.activeEditor.prepare(t,o,s,n,l,this.cellProperties)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.isCellEditable()?(this.activeEditor||(this.hot.scrollToFocusedCell(),this.prepareEditor()),this.activeEditor&&(o&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(e,t))):this.clearActiveEditor()}closeEditor(e,t,o){this.activeEditor?this.activeEditor.finishEditing(e,t,o):o&&o(!1)}closeEditorAndSaveChanges(e){this.closeEditor(!1,e)}closeEditorAndRestoreOriginalValue(e){this.closeEditor(!0,e)}clearActiveEditor(){this.activeEditor=void 0}isCellEditable(){const e=this.hot.getSelectedRangeLast();if(!e)return!1;const t=this.hot.getCellEditor(this.cellProperties),{row:o,col:s}=e.highlight,{rowIndexMapper:i,columnIndexMapper:r}=this.hot,n=i.isHidden(this.hot.toPhysicalRow(o))||r.isHidden(this.hot.toPhysicalColumn(s));return!(this.cellProperties.readOnly||!t||n)}moveSelectionAfterEnter(e){const t="function"==typeof this.tableMeta.enterMoves?this.tableMeta.enterMoves(event):this.tableMeta.enterMoves;e?this.selection.transformStart(-t.row,-t.col):this.selection.transformStart(t.row,t.col,!0)}destroy(){this.destroyed=!0,this.eventManager.destroy()}}function m(e){const t=this.hot.getSelectedRangeLast();if(!this.hot.isListening()||!t||t.highlight.isHeader()||(0,n.isImmediatePropagationStopped)(e))return;const{keyCode:o}=e,s=(e.ctrlKey||e.metaKey)&&!e.altKey;if((!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&!((0,r.isFunctionKey)(o)||(0,r.isCtrlMetaKey)(o)||s||this.isEditorOpened())){const t=this.hot.getShortcutManager().getContext("editor"),o={runOnlyIf:()=>(0,h.isDefined)(this.hot.getSelected()),group:c};t.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.hot.selection.transformStart(-1,0)}},{keys:[["ArrowDown"]],callback:()=>{this.hot.selection.transformStart(1,0)}},{keys:[["ArrowLeft"]],callback:()=>{this.hot.selection.transformStart(0,-1*this.hot.getDirectionFactor())}},{keys:[["ArrowRight"]],callback:()=>{this.hot.selection.transformStart(0,this.hot.getDirectionFactor())}}],o),this.openEditor("",e)}}function w(e,t,o){"TD"===o.nodeName&&this.openEditor(null,e,!0)}const C=new WeakMap;p.getInstance=function(e,t,o){let s=C.get(e);return s||(s=new p(e,t,o),C.set(e,s)),s};t.default=p},87857:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=s(o(42538)),n=o(93273),a=o(50095),l=o(83302),h=o(93315),u=o(18609),d=o(80151),c=o(37595),g=o(50695),f=o(5386);function p(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}const m=t.EDITOR_TYPE="autocomplete";var w=new WeakMap;class C extends n.HandsontableEditor{constructor(){super(...arguments),(0,i.default)(this,"query",null),(0,i.default)(this,"strippedChoices",[]),(0,i.default)(this,"rawChoices",[]),p(this,w,{writable:!0,value:this.hot.guid.slice(0,9)}),(0,i.default)(this,"sortByRelevance",(function(e,t,o){const s=[],i=[],r=e.length;let n,a,l,d,c=t.length;if(0===r){for(l=0;l<c;l++)i.push(l);return i}for(l=0;l<c;l++){if(a=(0,u.stripTags)((0,h.stringify)(t[l])),o)d=a.indexOf(e);else{const t=this.cellProperties.locale;d=a.toLocaleLowerCase(t).indexOf(e.toLocaleLowerCase(t))}-1!==d&&(n=a.length-d-r,s.push({baseIndex:l,index:d,charsLeft:n,value:a}))}for(s.sort(((e,t)=>{if(-1===t.index)return-1;if(-1===e.index)return 1;if(e.index<t.index)return-1;if(t.index<e.index)return 1;if(e.index===t.index){if(e.charsLeft<t.charsLeft)return-1;if(e.charsLeft>t.charsLeft)return 1}return 0})),l=0,c=s.length;l<c;l++)i.push(s[l].baseIndex);return i}))}static get EDITOR_TYPE(){return m}getValue(){const e=this.rawChoices.find((e=>this.stripValueIfNeeded(e)===this.TEXTAREA.value));return(0,h.isDefined)(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),(0,l.addClass)(this.htContainer,"autocompleteEditor"),(0,l.addClass)(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,f.A11Y_TEXT)(),(0,f.A11Y_COMBOBOX)(),(0,f.A11Y_HASPOPUP)("listbox"),(0,f.A11Y_AUTOCOMPLETE)()])}prepare(e,t,o,s,i,n){super.prepare(e,t,o,s,i,n),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,f.A11Y_EXPANDED)("false"),(0,f.A11Y_CONTROLS)(`${(0,r.default)(this,w)}-listbox-${e}-${t}`)])}open(){super.open();const e=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown,t=this.hot.getSettings().ariaTags,o=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,s=null==o?void 0:o.length,{row:i,col:n}=this;this.showEditableElement(),this.focus();let a=(0,l.getScrollbarWidth)();0===a&&(0,c.isMacOS)()&&(a+=15),this.addHook("beforeKeyDown",(e=>this.onBeforeKeyDown(e))),this.htEditor.updateSettings({colWidths:e?[(0,l.outerWidth)(this.TEXTAREA)-2]:void 0,width:e?(0,l.outerWidth)(this.TEXTAREA)+a:void 0,autoColumnSize:!0,renderer:(e,i,r,n,a,u,d)=>{(0,g.textRenderer)(e,i,r,n,a,u,d);const{filteringCaseSensitive:c,allowHtml:p,locale:m}=this.cellProperties,w=this.query;let C,v,y=(0,h.stringify)(u);y&&!p&&(C=!0===c?y.indexOf(w):y.toLocaleLowerCase(m).indexOf(w.toLocaleLowerCase(m)),-1!==C&&(v=y.substr(C,w.length),y=y.replace(v,`<strong>${v}</strong>`))),t&&(0,l.setAttribute)(i,[(0,f.A11Y_OPTION)(),...o?[(0,f.A11Y_SETSIZE)(s)]:[],...o?[(0,f.A11Y_POSINSET)(o.indexOf(u)+1)]:[],["id",`${this.htEditor.rootElement.id}_${r}-${n}`]]),i.innerHTML=y},afterSelection:(e,o)=>{if(t){const t=this.htEditor.getCell(e,o,!0);(0,l.setAttribute)(t,[(0,f.A11Y_SELECTED)()]),(0,l.setAttribute)(this.TEXTAREA,...(0,f.A11Y_ACTIVEDESCENDANT)(t.id))}}}),t&&((0,l.setAttribute)(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...(0,f.A11Y_PRESENTATION)()),(0,l.setAttribute)(this.htEditor.rootElement,[(0,f.A11Y_LISTBOX)(),(0,f.A11Y_LIVE)("polite"),(0,f.A11Y_RELEVANT)("text"),["id",`${(0,r.default)(this,w)}-listbox-${i}-${n}`]]),(0,l.setAttribute)(this.TEXTAREA,...(0,f.A11Y_EXPANDED)("true"))),this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}))}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,f.A11Y_EXPANDED)("false")])}discardEditor(e){super.discardEditor(e),this.hot.view.render()}queryChoices(e){const t=this.cellProperties.source;this.query=e,"function"==typeof t?t.call(this.cellProperties,e,(e=>{this.rawChoices=e,this.updateChoicesList(this.stripValuesIfNeeded(e))})):Array.isArray(t)?(this.rawChoices=t,this.updateChoicesList(this.stripValuesIfNeeded(t))):this.updateChoicesList([])}updateChoicesList(e){const t=(0,l.getCaretPosition)(this.TEXTAREA),o=(0,l.getSelectionEndPosition)(this.TEXTAREA),s=this.cellProperties.sortByRelevance,i=this.cellProperties.filter;let r=null,n=null,h=e;s&&(r=this.sortByRelevance(this.stripValueIfNeeded(this.getValue()),h,this.cellProperties.filteringCaseSensitive));const u=Array.isArray(r)?r.length:0;if(!1===i)u&&(n=r[0]);else{const e=[];for(let t=0,o=h.length;t<o&&!(s&&u<=t);t++)u?e.push(h[r[t]]):e.push(h[t]);n=0,h=e}this.strippedChoices=h,this.htEditor.loadData((0,a.pivot)([h])),0===h.length?this.htEditor.rootElement.style.display="none":(this.htEditor.rootElement.style.display="",this.updateDropdownHeight(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(n)),this.hot.listen(),(0,l.setCaretPosition)(this.TEXTAREA,t,t===o?void 0:o)}flipDropdownIfNeeded(){const e=(0,l.getTrimmingContainer)(this.hot.view._wt.wtTable.TABLE),t=e===this.hot.rootWindow,o=this.cellProperties.preventOverflow;if(t||!t&&(o||"horizontal"===o))return!1;const s=(0,l.offset)(this.TEXTAREA),i=(0,l.outerHeight)(this.TEXTAREA),r=this.getDropdownHeight(),n=e.scrollTop,a=(0,l.outerHeight)(this.hot.view._wt.wtTable.THEAD),h=(0,l.offset)(e),u=s.top-h.top-a+n,d=e.scrollHeight-u-a-i,c=r>d&&u>d;return c?this.flipDropdown(r):this.unflipDropdown(),this.limitDropdownIfNeeded(c?u:d,r),c}limitDropdownIfNeeded(e,t){if(t>e){let o=0,s=0,i=0,r=null;do{i=this.htEditor.getRowHeight(s)||this.htEditor.view._wt.getSetting("defaultRowHeight"),o+=i,s+=1}while(o<e);r=o-i,this.htEditor.flipped&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+t-r+"px"),this.setDropdownHeight(o-i)}}flipDropdown(e){const t=this.htEditor.rootElement.style;t.position="absolute",t.top=-e+"px",this.htEditor.flipped=!0}unflipDropdown(){const e=this.htEditor.rootElement.style;e.position="absolute",e.top="",this.htEditor.flipped=void 0}updateDropdownHeight(){const e=this.htEditor.getColWidth(0)+(0,l.getScrollbarWidth)(this.hot.rootDocument)+2,t=this.cellProperties.trimDropdown;this.htEditor.updateSettings({height:this.getDropdownHeight(),width:t?void 0:e}),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e})}highlightBestMatchingChoice(e){"number"==typeof e?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()}getDropdownHeight(){const e=this.htEditor.getRowHeight(0)||23,t=this.cellProperties.visibleRows;return this.strippedChoices.length>=t?t*e:this.strippedChoices.length*e+8}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){const{allowHtml:t}=this.cellProperties,o=(0,a.arrayMap)(e,(e=>(0,h.stringify)(e)));return(0,a.arrayMap)(o,(e=>t?e:(0,u.stripTags)(e)))}allowKeyEventPropagation(e){const t=this.htEditor.getSelectedRangeLast(),o=t?t.from.row:-1;let s=!1;return e===d.KEY_CODES.ARROW_DOWN&&o>0&&o<this.htEditor.countRows()-1&&(s=!0),e===d.KEY_CODES.ARROW_UP&&o>-1&&(s=!0),s}onBeforeKeyDown(e){if((0,d.isPrintableChar)(e.keyCode)||e.keyCode===d.KEY_CODES.BACKSPACE||e.keyCode===d.KEY_CODES.DELETE||e.keyCode===d.KEY_CODES.INSERT){let t=10;if(e.keyCode===d.KEY_CODES.C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(t+=10),this.htEditor&&this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}),t)}}}t.AutocompleteEditor=C},25815:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(87857);t.EDITOR_TYPE=s.EDITOR_TYPE,t.AutocompleteEditor=s.AutocompleteEditor},97296:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(93315),n=o(22232),a=o(6116),l=s(o(4748)),h=o(83302);const u=t.EDITOR_TYPE="base",d=t.EDITOR_STATE=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"}),c=t.SHORTCUTS_GROUP_EDITOR="baseEditor";class g{static get EDITOR_TYPE(){return u}constructor(e){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"state",d.VIRGIN),(0,i.default)(this,"_opened",!1),(0,i.default)(this,"_fullEditMode",!1),(0,i.default)(this,"_closeCallback",null),(0,i.default)(this,"TD",null),(0,i.default)(this,"row",null),(0,i.default)(this,"col",null),(0,i.default)(this,"prop",null),(0,i.default)(this,"originalValue",null),(0,i.default)(this,"cellProperties",null),this.hot=e,this.init()}_fireCallbacks(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)}init(){}getValue(){throw Error("Editor getValue() method unimplemented")}setValue(){throw Error("Editor setValue() method unimplemented")}open(){throw Error("Editor open() method unimplemented")}close(){throw Error("Editor close() method unimplemented")}prepare(e,t,o,s,i,r){this.TD=s,this.row=e,this.col=t,this.prop=o,this.originalValue=i,this.cellProperties=r,this.state=d.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let o,s,i,n;if(t){const e=this.hot.getSelectedLast();o=Math.max(Math.min(e[0],e[2]),0),s=Math.max(Math.min(e[1],e[3]),0),i=Math.max(e[0],e[2]),n=Math.max(e[1],e[3])}else[o,s,i,n]=[this.row,this.col,null,null];const a=this.hot.runHooks("modifyGetCellCoords",o,s);Array.isArray(a)&&([o,s]=a);const l=this.hot.getShortcutManager().getContext("editor"),h={runOnlyIf:()=>(0,r.isDefined)(this.hot.getSelected()),group:c};this.isInFullEditMode()&&l.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.hot.selection.transformStart(-1,0)}},{keys:[["ArrowDown"]],callback:()=>{this.hot.selection.transformStart(1,0)}},{keys:[["ArrowLeft"]],callback:()=>{this.hot.selection.transformStart(0,-1*this.hot.getDirectionFactor())}},{keys:[["ArrowRight"]],callback:()=>{this.hot.selection.transformStart(0,this.hot.getDirectionFactor())}}],h),this.hot.populateFromArray(o,s,e,i,n,"edit")}beginEditing(e,t){if(this.state!==d.VIRGIN)return;const o=this.hot,s=o.rowIndexMapper.getRenderableFromVisualIndex(this.row),i=o.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(o.view.scrollViewport(o._createCellCoords(s,i)),this.state=d.EDITING,this.isInFullEditMode()){const t="string"==typeof e?e:(0,r.stringify)(this.originalValue);this.setValue(t)}this.open(t),this._opened=!0,this.focus(),o.view.render(),o.runHooks("afterBeginEditing",this.row,this.col)}finishEditing(e,t,o){let s;if(o){const e=this._closeCallback;this._closeCallback=t=>{e&&e(t),o(t),this.hot.view.render()}}if(this.isWaiting())return;const i=this.hot.getShortcutManager().getContext("editor");if(i.removeShortcutsByGroup(c),i.removeShortcutsByGroup(a.SHORTCUTS_GROUP_NAVIGATION),this.state!==d.VIRGIN){if(this.state===d.EDITING){if(e)return this.cancelChanges(),void this.hot.view.render();const o=this.getValue();s=this.cellProperties.trimWhitespace?[["string"==typeof o?String.prototype.trim.call(o||""):o]]:[[o]],this.state=d.WAITING,this.saveValue(s,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",(e=>{this.state=d.FINISHED,this.discardEditor(e)})):(this.state=d.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout((()=>{this._fireCallbacks(!0)}))}cancelChanges(){this.state=d.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===d.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid)this.hot.selectCell(this.row,this.col),this.focus(),this.state=d.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=d.VIRGIN,this._fireCallbacks(!0);this.hot.getShortcutManager().setActiveContextName("grid")}}enableFullEditMode(){this._fullEditMode=!0}isInFullEditMode(){return this._fullEditMode}isOpened(){return this._opened}isWaiting(){return this.state===d.WAITING}getEditedCellRect(){var e;const t=this.getEditedCell();if(!t)return;const{wtOverlays:o,wtViewport:s}=this.hot.view._wt,i=this.hot.rootWindow,r=(0,h.offset)(t),n=(0,h.outerWidth)(t),a=(0,h.offset)(this.hot.rootElement),l=(0,h.outerWidth)(this.hot.rootElement),u=o.topOverlay.holder,d=o.inlineStartOverlay.holder,c=u!==i?u.scrollTop:0,g=d!==i?d.scrollLeft:0,f=i.innerWidth-a.left-l,{wtTable:p}=null!==(e=o.getParentOverlay(t))&&void 0!==e?e:this.hot.view._wt,m=p.name,w=["master","inline_start"].includes(m)?c:0,C=["master","top","bottom"].includes(m)?g:0,v=r.top===a.top?0:1;let y=r.top-a.top-v-w,E=0;E=this.hot.isRtl()?i.innerWidth-r.left-n-f-1+C:r.left-a.left-1-C,["top","top_inline_start_corner"].includes(m)&&(y+=o.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(m)&&(E+=Math.abs(o.inlineStartOverlay.getOverlayOffset()));const S=this.hot.hasColHeaders(),R=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),b=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),_=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(S&&R<=0||R===_)&&(y+=1),b<=0&&(E+=1);const T=s.rowsRenderCalculator.startPosition,O=s.columnsRenderCalculator.startPosition,M=Math.abs(o.inlineStartOverlay.getScrollPosition()),I=o.topOverlay.getScrollPosition(),N=(0,h.getScrollbarWidth)(this.hot.rootDocument);let A=t.offsetTop;if(["inline_start","master"].includes(m)&&(A+=T-I),["bottom","bottom_inline_start_corner"].includes(m)){const{wtViewport:e,wtTable:t}=o.bottomOverlay.clone;A+=e.getWorkspaceHeight()-t.getHeight()-N}let P=t.offsetLeft;this.hot.isRtl()?(P=P>=0?p.getWidth()-t.offsetLeft:Math.abs(P),P+=O-M-n):["top","master","bottom"].includes(m)&&(P+=O-M);const x=(0,h.getComputedStyle)(this.TD,this.hot.rootWindow),H=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",k=parseInt(x[H],10)>0?0:1,D=parseInt(x.borderTopWidth,10)>0?0:1,L=(0,h.outerWidth)(t)+k,W=(0,h.outerHeight)(t)+D,F=(0,h.hasVerticalScrollbar)(u)?N:0,V=(0,h.hasHorizontalScrollbar)(d)?N:0,B=this.hot.view.maximumVisibleElementWidth(P)-F+k;return{top:y,start:E,height:W,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(A)-V+D,23),width:L,maxWidth:B}}getEditedCellsLayerClass(){switch(this.checkEditorSection()){case"inline-start":return"ht_clone_left ht_clone_inline_start";case"bottom":return"ht_clone_bottom";case"bottom-inline-start-corner":return"ht_clone_bottom_left_corner ht_clone_bottom_inline_start_corner";case"top":return"ht_clone_top";case"top-inline-start-corner":return"ht_clone_top_left_corner ht_clone_top_inline_start_corner";default:return"ht_clone_master"}}getEditedCell(){return this.hot.getCell(this.row,this.col,!0)}checkEditorSection(){const e=this.hot.countRows();let t="";return this.row<this.hot.getSettings().fixedRowsTop?t=this.col<this.hot.getSettings().fixedColumnsStart?"top-inline-start-corner":"top":this.hot.getSettings().fixedRowsBottom&&this.row>=e-this.hot.getSettings().fixedRowsBottom?t=this.col<this.hot.getSettings().fixedColumnsStart?"bottom-inline-start-corner":"bottom":this.col<this.hot.getSettings().fixedColumnsStart&&(t="inline-start"),t}}t.BaseEditor=g,(0,n.mixin)(g,l.default)},48253:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(97296);t.EDITOR_STATE=s.EDITOR_STATE,t.EDITOR_TYPE=s.EDITOR_TYPE,t.BaseEditor=s.BaseEditor},99935:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48253),i=o(83302);const r=t.EDITOR_TYPE="checkbox";class n extends s.BaseEditor{static get EDITOR_TYPE(){return r}beginEditing(e,t){if(t&&"mouseup"===t.type){const e=this.TD.querySelector('input[type="checkbox"]');(0,i.hasClass)(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}t.CheckboxEditor=n},63729:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(99935);t.EDITOR_TYPE=s.EDITOR_TYPE,t.CheckboxEditor=s.CheckboxEditor},23330:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=s(o(33034)),n=s(o(32134)),a=o(5071),l=s(o(75244)),h=o(83302),u=o(22232),d=o(80151);o(2964);const c=t.EDITOR_TYPE="date",g="dateEditor";class f extends a.TextEditor{constructor(){super(...arguments),(0,i.default)(this,"defaultDateFormat","DD/MM/YYYY"),(0,i.default)(this,"isCellEdited",!1),(0,i.default)(this,"parentDestroyed",!1),(0,i.default)(this,"$datePicker",null)}static get EDITOR_TYPE(){return c}init(){if("function"!=typeof r.default)throw new Error("You need to include moment.js to your project.");if("function"!=typeof n.default)throw new Error("You need to include Pikaday to your project.");super.init(),this.hot.addHook("afterDestroy",(()=>{this.parentDestroyed=!0,this.destroyElements()}))}createElements(){super.createElements(),this.datePicker=this.hot.rootDocument.createElement("DIV"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=9999,this.datePicker.setAttribute("dir",this.hot.isRtl()?"rtl":"ltr"),(0,h.addClass)(this.datePicker,"htDatepickerHolder"),this.hot.rootDocument.body.appendChild(this.datePicker);const e=new l.default(this);e.addEventListener(this.datePicker,"mousedown",(e=>{(0,h.hasClass)(e.target,"pika-day")&&this.hideDatepicker(),e.stopPropagation()})),e.addEventListener(this.TEXTAREA,"keydown",(e=>{["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(e.code)&&e.preventDefault()}))}destroyElements(){const e=this.datePicker.parentNode;this.$datePicker&&this.$datePicker.destroy(),e&&e.removeChild(this.datePicker)}prepare(e,t,o,s,i,r){super.prepare(e,t,o,s,i,r)}open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.hot.getShortcutManager().getContext("editor");super.open(),this.showDatepicker(e),t.addShortcut({keys:[["Enter"]],callback:e=>{e.stopPropagation()},group:g})}close(){var e;this._opened=!1,null!==(e=this.$datePicker)&&void 0!==e&&e.destroy&&this.$datePicker.destroy(),this.hot._registerTimeout((()=>{this.hot._refreshBorders()}));this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(g),super.close()}finishEditing(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){const e=this.originalValue;void 0!==e&&this.setValue(e)}super.finishEditing(e,t)}showDatepicker(e){const t=this.TD.getBoundingClientRect(),o=this.cellProperties.dateFormat||this.defaultDateFormat,s=this.hot.view.isMouseDown(),i=!!e&&(0,d.isFunctionKey)(e.keyCode);let a;this.datePicker.style.display="block",this.$datePicker=new n.default(this.getDatePickerConfig()),this.$datePicker._onInputFocus=function(){},this.datePickerStyle.top=`${this.hot.rootWindow.pageYOffset+t.top+(0,h.outerHeight)(this.TD)}px`;let l=this.hot.rootWindow.pageXOffset;l=this.hot.isRtl()?t.right-(0,h.outerWidth)(this.datePicker):t.left,this.datePickerStyle.left=`${l}px`,this.originalValue?(a=this.originalValue,(0,r.default)(a,o,!0).isValid()&&this.$datePicker.setMoment((0,r.default)(a,o),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),i||s||this.setValue("")):this.cellProperties.defaultDate?(a=this.cellProperties.defaultDate,(0,r.default)(a,o,!0).isValid()&&this.$datePicker.setMoment((0,r.default)(a,o),!0),i||s||this.setValue("")):this.$datePicker.gotoToday()}hideDatepicker(){this.datePickerStyle.display="none",this.$datePicker.hide()}getDatePickerConfig(){const e=this.TEXTAREA,t={};this.cellProperties&&this.cellProperties.datePickerConfig&&(0,u.deepExtend)(t,this.cellProperties.datePickerConfig);const o=t.onSelect,s=t.onClose;return t.field=e,t.trigger=e,t.container=this.datePicker,t.bound=!1,t.format=t.format||this.defaultDateFormat,t.reposition=t.reposition||!1,t.isRTL=!1,t.onSelect=e=>{let t=e;isNaN(t.getTime())||(t=(0,r.default)(t).format(this.cellProperties.dateFormat||this.defaultDateFormat)),this.setValue(t),o&&o()},t.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),s&&s()},t}}t.DateEditor=f},58437:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(23330);t.EDITOR_TYPE=s.EDITOR_TYPE,t.DateEditor=s.DateEditor},14733:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=o(25815),r=s(o(56307));const n=t.EDITOR_TYPE="dropdown";class a extends i.AutocompleteEditor{static get EDITOR_TYPE(){return n}prepare(e,t,o,s,i,r){super.prepare(e,t,o,s,i,r),this.cellProperties.filter=!1,this.cellProperties.strict=!0}}t.DropdownEditor=a,r.default.getSingleton().add("beforeValidate",(function(e,t,o){const s=this.getCellMeta(t,this.propToCol(o));s.editor===a&&void 0===s.strict&&(s.filter=!1,s.strict=!0)}))},9535:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(14733);t.EDITOR_TYPE=s.EDITOR_TYPE,t.DropdownEditor=s.DropdownEditor},95567:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071),i=o(83302),r=o(24449),n=o(22232),a=o(6116);const l="handsontableEditor",h=t.EDITOR_TYPE="handsontable";class u extends s.TextEditor{static get EDITOR_TYPE(){return h}open(){super.open(),this.htEditor&&this.htEditor.destroy(),"none"===this.htContainer.style.display&&(this.htContainer.style.display=""),this.htEditor=new this.hot.constructor(this.htContainer,this.htOptions),this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),(0,i.setCaretPosition)(this.TEXTAREA,0,this.TEXTAREA.value.length),this.refreshDimensions()}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}prepare(e,t,o,s,i,r){super.prepare(e,t,o,s,i,r);const a=this,l={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,ariaTags:!1,afterOnCellMouseDown(e,t){const o=this.getSourceData(t.row,t.col);void 0!==o&&a.setValue(o),a.hot.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&(0,n.extend)(l,r.handsontable),this.htOptions=l}beginEditing(e,t){const o=this.hot.getSettings().onBeginEditing;o&&!1===o()||super.beginEditing(e,t)}createElements(){super.createElements();const e=this.hot.rootDocument.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.assignHooks()}finishEditing(e,t,o){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedLast()){const e=this.htEditor.getValue();void 0!==e&&this.setValue(e)}super.finishEditing(e,t,o)}assignHooks(){this.hot.addHook("afterDestroy",(()=>{this.htEditor&&this.htEditor.destroy()}))}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();const t={group:l,relativeToGroup:a.SHORTCUTS_GROUP_NAVIGATION,position:"before"},o=(e,t)=>{const o=this.htEditor;if(void 0!==e&&(e<0||o.flipped&&e>o.countRows()-1?o.deselectCell():o.selectCell(e,0),o.getData().length))return t.preventDefault(),(0,r.stopImmediatePropagation)(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{const t=this.htEditor;let s,i;return!t.getSelectedLast()&&t.flipped?s=t.countRows()-1:t.getSelectedLast()&&(t.flipped?(i=t.getSelectedLast()[0],s=Math.max(0,i-1)):(i=t.getSelectedLast()[0],s=i-1)),o(s,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{const t=this.htEditor;let s,i;if(t.getSelectedLast()||t.flipped){if(t.getSelectedLast())if(t.flipped)s=t.getSelectedLast()[0]+1;else if(!t.flipped){const e=t.countRows()-1;i=t.getSelectedLast()[0],s=Math.min(e,i+1)}}else s=0;return o(s,e)},preventDefault:!1}],t)}unregisterShortcuts(){super.unregisterShortcuts();this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(l)}}t.HandsontableEditor=u},93273:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(95567);t.EDITOR_TYPE=s.EDITOR_TYPE,t.HandsontableEditor=s.HandsontableEditor},74465:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllEditors=function(){(0,f.registerEditor)(i.BaseEditor),(0,f.registerEditor)(s.AutocompleteEditor),(0,f.registerEditor)(r.CheckboxEditor),(0,f.registerEditor)(n.DateEditor),(0,f.registerEditor)(a.DropdownEditor),(0,f.registerEditor)(l.HandsontableEditor),(0,f.registerEditor)(h.NumericEditor),(0,f.registerEditor)(u.PasswordEditor),(0,f.registerEditor)(d.SelectEditor),(0,f.registerEditor)(c.TextEditor),(0,f.registerEditor)(g.TimeEditor)};var s=o(25815);t.AutocompleteEditor=s.AutocompleteEditor,t.AUTOCOMPLETE_EDITOR=s.EDITOR_TYPE;var i=o(48253);t.BaseEditor=i.BaseEditor,t.BASE_EDITOR=i.EDITOR_TYPE;var r=o(63729);t.CheckboxEditor=r.CheckboxEditor,t.CHECKBOX_EDITOR=r.EDITOR_TYPE;var n=o(58437);t.DateEditor=n.DateEditor,t.DATE_EDITOR=n.EDITOR_TYPE;var a=o(9535);t.DropdownEditor=a.DropdownEditor,t.DROPDOWN_EDITOR=a.EDITOR_TYPE;var l=o(93273);t.HandsontableEditor=l.HandsontableEditor,t.HANDSONTABLE_EDITOR=l.EDITOR_TYPE;var h=o(97130);t.NumericEditor=h.NumericEditor,t.NUMERIC_EDITOR=h.EDITOR_TYPE;var u=o(63630);t.PasswordEditor=u.PasswordEditor,t.PASSWORD_EDITOR=u.EDITOR_TYPE;var d=o(93333);t.SelectEditor=d.SelectEditor,t.SELECT_EDITOR=d.EDITOR_TYPE;var c=o(5071);t.TextEditor=c.TextEditor,t.TEXT_EDITOR=c.EDITOR_TYPE;var g=o(65930);t.TimeEditor=g.TimeEditor,t.TIME_EDITOR=g.EDITOR_TYPE;var f=o(83605);t.registerEditor=f.registerEditor,t.RegisteredEditor=f.RegisteredEditor,t._getEditorInstance=f._getEditorInstance,t.getEditor=f.getEditor,t.getEditorInstance=f.getEditorInstance,t.getRegisteredEditorNames=f.getRegisteredEditorNames,t.getRegisteredEditors=f.getRegisteredEditors,t.hasEditor=f.hasEditor},97130:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(47427);t.EDITOR_TYPE=s.EDITOR_TYPE,t.NumericEditor=s.NumericEditor},47427:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071);const i=t.EDITOR_TYPE="numeric";class r extends s.TextEditor{static get EDITOR_TYPE(){return i}}t.NumericEditor=r},63630:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(35356);t.EDITOR_TYPE=s.EDITOR_TYPE,t.PasswordEditor=s.PasswordEditor},35356:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071),i=o(83302),r=o(5386);const n=t.EDITOR_TYPE="password";class a extends s.TextEditor{static get EDITOR_TYPE(){return n}createElements(){super.createElements(),this.TEXTAREA=this.hot.rootDocument.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.setAttribute("data-hot-input",""),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.hot.getSettings().ariaTags&&(0,i.setAttribute)(this.TEXTAREA,[(0,r.A11Y_HIDDEN)()]),(0,i.empty)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}t.PasswordEditor=a},83605:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.RegisteredEditor=c,t.getEditorInstance=t._getEditorInstance=function(e,t){let o;if("function"==typeof e)n.get(e)||g(null,e),o=n.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');o=l(e)}if(!o)throw Error(`No editor registered under name "${e}"`);return o.getInstance(t)},t.getEditor=function(e){if("function"==typeof e)return e;if(!h(e))throw Error(`No registered editor found under "${e}" name`);return l(e).getConstructor()},t.registerEditor=g,o(91683);var i=s(o(56307)),r=s(o(63800));const n=new WeakMap,{register:a,getItem:l,hasItem:h,getNames:u,getValues:d}=(0,r.default)("editors");function c(e){const t={},o=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new o(e)),t[e.guid]},i.default.getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function g(e,t){e&&"string"!=typeof e&&(e=(t=e).EDITOR_TYPE);const o=new c(t);"string"==typeof e&&a(e,o),n.set(t,o)}t.getRegisteredEditors=d,t.getRegisteredEditorNames=u,t.hasEditor=h},93333:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(82854);t.EDITOR_TYPE=s.EDITOR_TYPE,t.SelectEditor=s.SelectEditor},82854:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48253),i=o(83302),r=o(22232);const n="ht_editor_visible",a="selectEditor",l=t.EDITOR_TYPE="select";class h extends s.BaseEditor{static get EDITOR_TYPE(){return l}init(){this.select=this.hot.rootDocument.createElement("SELECT"),(0,i.addClass)(this.select,"htSelectEditor"),this.select.style.display="none",this.hot.rootElement.appendChild(this.select),this.registerHooks()}getValue(){return this.select.value}setValue(e){this.select.value=e}open(){this._opened=!0,this.refreshDimensions(),this.select.style.display="";this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.select.style.display="none",(0,i.hasClass)(this.select,n)&&(0,i.removeClass)(this.select,n),this.unregisterShortcuts(),this.clearHooks()}focus(){this.select.focus()}registerHooks(){this.addHook("afterScrollHorizontally",(()=>this.refreshDimensions())),this.addHook("afterScrollVertically",(()=>this.refreshDimensions())),this.addHook("afterColumnResize",(()=>this.refreshDimensions())),this.addHook("afterRowResize",(()=>this.refreshDimensions()))}prepare(e,t,o,s,n,a){super.prepare(e,t,o,s,n,a);const l=this.cellProperties.selectOptions;let h;h="function"==typeof l?this.prepareOptions(l(this.row,this.col,this.prop)):this.prepareOptions(l),(0,i.empty)(this.select),(0,r.objectEach)(h,((e,t)=>{const o=this.hot.rootDocument.createElement("OPTION");o.value=t,(0,i.fastInnerHTML)(o,e),this.select.appendChild(o)}))}prepareOptions(e){let t={};if(Array.isArray(e))for(let o=0,s=e.length;o<s;o++)t[e[o]]=e[o];else"object"==typeof e&&(t=e);return t}refreshValue(){const e=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()}refreshDimensions(){if(this.state!==s.EDITOR_STATE.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();const{top:e,start:t,width:o,height:r}=this.getEditedCellRect(),a=this.select.style;a.height=`${r}px`,a.width=`${o}px`,a.top=`${e}px`,a[this.hot.isRtl()?"right":"left"]=`${t}px`,a.margin="0px",(0,i.addClass)(this.select,n)}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={group:a};!1!==this.isInFullEditMode()&&e.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{const e=this.select.selectedIndex-1;e>=0&&(this.select[e].selected=!0)}},{keys:[["ArrowDown"]],callback:()=>{const e=this.select.selectedIndex+1;e<=this.select.length-1&&(this.select[e].selected=!0)}}],t)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(a)}}t.SelectEditor=h},67547:(e,t,o)=>{"use strict";t.__esModule=!0,t.updateCaretPosition=function(e,t){const o=(0,s.getCaretPosition)(t),i=t.value.split("\n");let r=o,n=0;for(let t=0;t<i.length;t++){const s=i[t];0!==t&&(n+=i[t-1].length+1);const a=n+s.length;if("home"===e?r=n:"end"===e&&(r=a),o<=a)break}(0,s.setCaretPosition)(t,r)};var s=o(83302)},5071:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48917);t.EDITOR_TYPE=s.EDITOR_TYPE,t.TextEditor=s.TextEditor},48917:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(48253),n=s(o(75244)),a=o(37595),l=o(83302),h=o(68145),u=o(65175),d=o(93315),c=o(6116),g=o(97296),f=o(67547),p=o(5386);const m="ht_editor_hidden",w="textEditor",C=t.EDITOR_TYPE="text";class v extends r.BaseEditor{static get EDITOR_TYPE(){return C}constructor(e){super(e),(0,i.default)(this,"eventManager",new n.default(this)),(0,i.default)(this,"autoResize",(0,u.createInputElementResizer)(this.hot.rootDocument)),(0,i.default)(this,"TEXTAREA",void 0),(0,i.default)(this,"textareaStyle",void 0),(0,i.default)(this,"TEXTAREA_PARENT",void 0),(0,i.default)(this,"textareaParentStyle",void 0),(0,i.default)(this,"layerClass",void 0),this.eventManager=new n.default(this),this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",(()=>this.destroy()))}getValue(){return this.TEXTAREA.value}setValue(e){this.TEXTAREA.value=e}open(){this.refreshDimensions(),this.showEditableElement(),this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this.autoResize.unObserve(),(0,l.isThisHotChild)(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts()}prepare(e,t,o,s,i,n){const a=this.state;if(super.prepare(e,t,o,s,i,n),!n.readOnly){this.refreshDimensions(!0);const{allowInvalid:e}=n;e&&(this.TEXTAREA.value=""),a!==r.EDITOR_STATE.FINISHED&&this.hideEditableElement()}}beginEditing(e,t){this.state===r.EDITOR_STATE.VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(e,t))}focus(){this.TEXTAREA.select(),(0,l.setCaretPosition)(this.TEXTAREA,this.TEXTAREA.value.length)}createElements(){const{rootDocument:e}=this.hot;this.TEXTAREA=e.createElement("TEXTAREA"),(0,l.setAttribute)(this.TEXTAREA,[["data-hot-input",""],(0,p.A11Y_TABINDEX)(-1)]),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,p.A11Y_HIDDEN)()]),(0,l.addClass)(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.textareaStyle.overflowY="visible",this.TEXTAREA_PARENT=e.createElement("DIV"),(0,l.addClass)(this.TEXTAREA_PARENT,"handsontableInputHolder"),(0,l.hasClass)(this.TEXTAREA_PARENT,this.layerClass)&&(0,l.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,l.addClass)(this.TEXTAREA_PARENT,m),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){(0,a.isEdge)()&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",(0,l.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,l.addClass)(this.TEXTAREA_PARENT,m)}showEditableElement(){this.textareaParentStyle.height="",this.textareaParentStyle.overflow="",this.textareaParentStyle.position="",this.textareaParentStyle[this.hot.isRtl()?"left":"right"]="auto",this.textareaParentStyle.opacity="1",this.textareaStyle.textIndent="",this.textareaStyle.overflowY="hidden";const e=this.TEXTAREA_PARENT.childNodes;let t=!1;(0,h.rangeEach)(e.length-1,(o=>{const s=e[o];if((0,l.hasClass)(s,"handsontableEditor"))return t=!0,!1})),(0,l.hasClass)(this.TEXTAREA_PARENT,m)&&(0,l.removeClass)(this.TEXTAREA_PARENT,m),t?(this.layerClass="ht_editor_visible",(0,l.addClass)(this.TEXTAREA_PARENT,this.layerClass)):(this.layerClass=this.getEditedCellsLayerClass(),(0,l.addClass)(this.TEXTAREA_PARENT,this.layerClass))}refreshValue(){const e=this.hot.toPhysicalRow(this.row),t=this.hot.getSourceDataAtCell(e,this.col);this.originalValue=t,this.setValue(t),this.refreshDimensions()}refreshDimensions(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state!==r.EDITOR_STATE.EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD)return void(e||this.close());const{top:t,start:o,width:s,maxWidth:i,height:n,maxHeight:a}=this.getEditedCellRect();this.textareaParentStyle.top=`${t}px`,this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=`${o}px`,this.showEditableElement();const h=(0,l.getComputedStyle)(this.TD,this.hot.rootWindow);this.TEXTAREA.style.fontSize=h.fontSize,this.TEXTAREA.style.fontFamily=h.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor;const u=(0,l.getComputedStyle)(this.TEXTAREA),d=parseInt(u.paddingLeft,10)+parseInt(u.paddingRight,10),c=parseInt(u.paddingTop,10)+parseInt(u.paddingBottom,10),g=s-d,f=n-c,p=i-d,m=a-c;this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(g,p),minHeight:Math.min(f,m),maxWidth:p,maxHeight:m},!0)}bindEvents(){(0,a.isIOS)()&&this.eventManager.addEventListener(this.TEXTAREA,"focusout",(()=>this.finishEditing(!1))),this.addHook("afterScrollHorizontally",(()=>this.refreshDimensions())),this.addHook("afterScrollVertically",(()=>this.refreshDimensions())),this.addHook("afterColumnResize",(()=>{this.refreshDimensions(),this.state===r.EDITOR_STATE.EDITING&&this.focus()})),this.addHook("afterRowResize",(()=>{this.refreshDimensions(),this.state===r.EDITOR_STATE.EDITING&&this.focus()}))}allowKeyEventPropagation(){}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor"),o=e.getContext("grid"),s={runOnlyIf:()=>(0,d.isDefined)(this.hot.getSelected()),group:w},i=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};t.addShortcuts([{keys:[["Tab"],["Shift","Tab"],["PageUp"],["PageDown"]],forwardToContext:o,callback:()=>{}},{keys:[["Control","Enter"]],callback:()=>(i(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e.altKey},{keys:[["Meta","Enter"]],callback:()=>(i(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(i(),!1)},{keys:[["Home"]],callback:(e,t)=>{let[o]=t;(0,f.updateCaretPosition)(o,this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{let[o]=t;(0,f.updateCaretPosition)(o,this.TEXTAREA)}}],s)}unregisterShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");e.removeShortcutsByGroup(c.SHORTCUTS_GROUP_NAVIGATION),e.removeShortcutsByGroup(w),e.removeShortcutsByGroup(g.SHORTCUTS_GROUP_EDITOR)}}t.TextEditor=v},65930:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(45952);t.EDITOR_TYPE=s.EDITOR_TYPE,t.TimeEditor=s.TimeEditor},45952:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071);const i=t.EDITOR_TYPE="time";class r extends s.TextEditor{static get EDITOR_TYPE(){return i}prepare(e,t,o,s,i,r){super.prepare(e,t,o,s,i,r),this.TEXTAREA.dir="ltr"}}t.TimeEditor=r},75244:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getListenersCounter=function(){return n},o(63517);var i=s(o(93231)),r=o(24449);let n=0;t.default=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,i.default)(this,"context",void 0),this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])}addEventListener(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];function i(e){o.call(this,function(e){const t=e.stopImmediatePropagation;return e.stopImmediatePropagation=function(){t.apply(this),(0,r.stopImmediatePropagation)(this)},e}(e))}return this.context.eventListeners.push({element:e,event:t,callback:o,callbackProxy:i,options:s,eventManager:this}),e.addEventListener(t,i,s),n+=1,()=>{this.removeEventListener(e,t,o)}}removeEventListener(e,t,o){let s,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=this.context.eventListeners.length;for(;r;)if(r-=1,s=this.context.eventListeners[r],s.event===t&&s.element===e){if(o&&o!==s.callback)continue;if(i&&s.eventManager!==this)continue;this.context.eventListeners.splice(r,1),s.element.removeEventListener(s.event,s.callbackProxy,s.options),n-=1}}clearEvents(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.context)return;let t=this.context.eventListeners.length;for(;t;){t-=1;const o=this.context.eventListeners[t];e&&o.eventManager!==this||(this.context.eventListeners.splice(t,1),o.element.removeEventListener(o.event,o.callbackProxy,o.options),n-=1)}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(e,t){let o=e.document,s=e;o||(o=e.ownerDocument?e.ownerDocument:e,s=o.defaultView);const i={bubbles:!0,cancelable:"mousemove"!==t,view:s,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};let r;o.createEvent?(r=o.createEvent("MouseEvents"),r.initMouseEvent(t,i.bubbles,i.cancelable,i.view,i.detail,i.screenX,i.screenY,i.clientX,i.clientY,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,i.button,i.relatedTarget||o.body.parentNode)):r=o.createEventObject(),e.dispatchEvent?e.dispatchEvent(r):e.fireEvent(`on${t}`,r)}}},51400:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(42538)),r=s(o(48427)),n=o(69173),a=o(83302),l=o(85015);function h(e,t){d(e,t),t.add(e)}function u(e,t,o){d(e,t),t.set(e,o)}function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function c(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const g=Object.freeze({CELL:"cell",MIXED:"mixed"});var f=new WeakMap,p=new WeakMap,m=new WeakMap,w=new WeakMap,C=new WeakMap,v=new WeakSet,y=new WeakSet,E=new WeakSet,S=new WeakSet;function R(e){var t;const o=null===(t=(0,i.default)(this,f).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!o||!(0,i.default)(this,f).selection.isCellVisible(o))return void e(null);const s=(0,i.default)(this,f).getCell(o.row,o.col,!0);null===s?(0,i.default)(this,f).addHookOnce("afterScroll",(()=>{e((0,i.default)(this,f).getCell(o.row,o.col,!0))})):e(s)}function b(){c(this,v,R).call(this,(e=>{const{activeElement:t}=(0,i.default)(this,f).rootDocument;t&&(0,a.isOutsideInput)(t)&&t.blur(),this.focusOnHighlightedCell(e)}))}function _(){c(this,v,R).call(this,(e=>{this.getFocusMode()===g.MIXED&&"TD"===e.nodeName&&this.refocusToEditorTextarea()}))}function T(e){e.imeFastEdit&&this.getFocusMode()!==g.MIXED?this.setFocusMode(g.MIXED):e.imeFastEdit||this.getFocusMode()===g.CELL||this.setFocusMode(g.CELL)}t.FocusManager=class{constructor(e){var t=this;h(this,S),h(this,E),h(this,y),h(this,v),u(this,f,{writable:!0,value:void 0}),u(this,p,{writable:!0,value:void 0}),u(this,m,{writable:!0,value:50}),u(this,w,{writable:!0,value:null}),u(this,C,{writable:!0,value:new Map});const o=e.getSettings();(0,r.default)(this,f,e),(0,r.default)(this,p,o.imeFastEdit?g.MIXED:g.CELL),(0,i.default)(this,f).addHook("afterUpdateSettings",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return c(t,S,T).call(t,...o)})),(0,i.default)(this,f).addHook("afterSelection",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return c(t,y,b).call(t,...o)})),(0,i.default)(this,f).addHook("afterSelectionEnd",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return c(t,E,_).call(t,...o)}))}getFocusMode(){return(0,i.default)(this,p)}setFocusMode(e){Object.values(g).includes(e)?(0,r.default)(this,p,e):(0,n.warn)(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return(0,i.default)(this,m)}setRefocusDelay(e){(0,r.default)(this,m,e)}setRefocusElementGetter(e){(0,r.default)(this,w,e)}getRefocusElement(){return"function"==typeof(0,i.default)(this,w)?(0,i.default)(this,w).call(this):null===(e=(0,i.default)(this,f).getActiveEditor())||void 0===e?void 0:e.TEXTAREA;var e}focusOnHighlightedCell(e){const t=e=>{var t,o;const s=null===(t=(0,i.default)(this,f).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!s)return;let r=(0,i.default)(this,f).runHooks("modifyFocusedElement",s.row,s.col,e);r instanceof HTMLElement||(r=e),!r||null!==(o=(0,i.default)(this,f).getActiveEditor())&&void 0!==o&&o.isOpened()||r.focus({preventScroll:!0})};e?t(e):c(this,v,R).call(this,(e=>t(e)))}refocusToEditorTextarea(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i.default)(this,m);const o=this.getRefocusElement();!(0,i.default)(this,f).getSettings().imeFastEdit||null!==(e=(0,i.default)(this,f).getActiveEditor())&&void 0!==e&&e.isOpened()||!o||((0,i.default)(this,C).has(t)||(0,i.default)(this,C).set(t,(0,l.debounce)((()=>{o.select()}),t)),(0,i.default)(this,C).get(t)())}}},5386:(e,t)=>{"use strict";t.__esModule=!0;t.A11Y_TABINDEX=e=>["tabindex",e];t.A11Y_TREEGRID=()=>["role","treegrid"];t.A11Y_PRESENTATION=()=>["role","presentation"];t.A11Y_GRIDCELL=()=>["role","gridcell"];t.A11Y_ROWHEADER=()=>["role","rowheader"];t.A11Y_ROWGROUP=()=>["role","rowgroup"];t.A11Y_COLUMNHEADER=()=>["role","columnheader"];t.A11Y_ROW=()=>["role","row"];t.A11Y_MENU=()=>["role","menu"];t.A11Y_MENU_ITEM=()=>["role","menuitem"];t.A11Y_COMBOBOX=()=>["role","combobox"];t.A11Y_LISTBOX=()=>["role","listbox"];t.A11Y_OPTION=()=>["role","option"];t.A11Y_CHECKBOX=()=>["role","checkbox"];t.A11Y_SCOPE_COL=()=>["scope","col"];t.A11Y_SCOPE_ROW=()=>["scope","row"];t.A11Y_TEXT=()=>["type","text"];t.A11Y_LABEL=e=>["aria-label",e];t.A11Y_HIDDEN=()=>["aria-hidden","true"];t.A11Y_DISABLED=()=>["aria-disabled","true"];t.A11Y_MULTISELECTABLE=()=>["aria-multiselectable","true"];t.A11Y_HASPOPUP=e=>["aria-haspopup",e];t.A11Y_ROWCOUNT=e=>["aria-rowcount",e];t.A11Y_COLCOUNT=e=>["aria-colcount",e];t.A11Y_ROWINDEX=e=>["aria-rowindex",e];t.A11Y_COLINDEX=e=>["aria-colindex",e];t.A11Y_EXPANDED=e=>["aria-expanded",e];t.A11Y_SORT=e=>["aria-sort",e];t.A11Y_READONLY=()=>["aria-readonly","true"];t.A11Y_INVALID=()=>["aria-invalid","true"];t.A11Y_CHECKED=e=>["aria-checked",e];t.A11Y_SELECTED=()=>["aria-selected","true"];t.A11Y_AUTOCOMPLETE=()=>["aria-autocomplete","list"];t.A11Y_CONTROLS=e=>["aria-controls",e];t.A11Y_ACTIVEDESCENDANT=e=>["aria-activedescendant",e];t.A11Y_LIVE=e=>["aria-live",e];t.A11Y_RELEVANT=e=>["aria-relevant",e];t.A11Y_SETSIZE=e=>["aria-setsize",e];t.A11Y_POSINSET=e=>["aria-posinset",e]},50095:(e,t,o)=>{"use strict";function s(e,t,o,s){let i=-1,r=e,n=o;Array.isArray(e)||(r=Array.from(e));const a=r.length;for(s&&a&&(i+=1,n=r[i]),i+=1;i<a;)n=t(n,r[i],i,r),i+=1;return n}function i(e,t){let o=0,s=e;Array.isArray(e)||(s=Array.from(e));const i=s.length;for(;o<i&&!1!==t(s[o],o,s);)o+=1;return e}function r(e){return s(e,((e,t)=>e+t),0)}t.__esModule=!0,t.arrayAvg=function(e){if(!e.length)return 0;return r(e)/e.length},t.arrayEach=i,t.arrayFilter=function(e,t){let o=0,s=e;Array.isArray(e)||(s=Array.from(e));const i=s.length,r=[];let n=-1;for(;o<i;){const e=s[o];t(e,o,s)&&(n+=1,r[n]=e),o+=1}return r},t.arrayFlatten=function e(t){return s(t,((t,o)=>t.concat(Array.isArray(o)?e(o):o)),[])},t.arrayMap=function(e,t){let o=0,s=e;Array.isArray(e)||(s=Array.from(e));const i=s.length,r=[];let n=-1;for(;o<i;){const e=s[o];n+=1,r[n]=t(e,o,s),o+=1}return r},t.arrayMax=function(e){return s(e,((e,t)=>e>t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayMin=function(e){return s(e,((e,t)=>e<t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayReduce=s,t.arraySum=r,t.arrayUnique=function(e){const t=[];return i(e,(e=>{-1===t.indexOf(e)&&t.push(e)})),t},t.extendArray=function(e,t){const o=t.length;let s=0;for(;s<o;)e.push(t[s]),s+=1},t.getDifferenceOfArrays=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[s,...r]=[...t];let n=s;return i(r,(e=>{n=n.filter((t=>!e.includes(t)))})),n},t.getIntersectionOfArrays=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[s,...r]=[...t];let n=s;return i(r,(e=>{n=n.filter((t=>e.includes(t)))})),n},t.getUnionOfArrays=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[s,...r]=[...t],n=new Set(s);return i(r,(e=>{i(e,(e=>{n.has(e)||n.add(e)}))})),Array.from(n)},t.pivot=function(e){const t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;const o=e.length,s=e[0].length;for(let i=0;i<o;i++)for(let o=0;o<s;o++)t[o]||(t[o]=[]),t[o][i]=e[i][o];return t},t.stringToArray=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.split(t)},t.to2dArray=function(e){const t=e.length;let o=0;for(;o<t;)e[o]=[e[o]],o+=1},o(63517)},37595:(e,t,o)=>{"use strict";t.__esModule=!0,t.isChrome=function(){return r.chrome.value},t.isChromeWebKit=function(){return r.chromeWebKit.value},t.isEdge=function(){return r.edge.value},t.isEdgeWebKit=function(){return r.edgeWebKit.value},t.isFirefox=function(){return r.firefox.value},t.isFirefoxWebKit=function(){return r.firefoxWebKit.value},t.isIOS=function(){return n.ios.value},t.isIpadOS=function(){let{maxTouchPoints:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return e>2&&n.mac.value},t.isLinuxOS=function(){return n.linux.value},t.isMacOS=function(){return n.mac.value},t.isMobileBrowser=function(){return r.mobile.value},t.isSafari=function(){return r.safari.value},t.isWindowsOS=function(){return n.win.value},t.setBrowserMeta=a,t.setPlatformMeta=l;var s=o(22232);const i=e=>{const t={value:!1,test:(o,s)=>{t.value=e(o,s)}};return t},r={chrome:i(((e,t)=>/Chrome/.test(e)&&/Google/.test(t))),chromeWebKit:i((e=>/CriOS/.test(e))),edge:i((e=>/Edge/.test(e))),edgeWebKit:i((e=>/EdgiOS/.test(e))),firefox:i((e=>/Firefox/.test(e))),firefoxWebKit:i((e=>/FxiOS/.test(e))),mobile:i((e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e))),safari:i(((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t)))},n={mac:i((e=>/^Mac/.test(e))),win:i((e=>/^Win/.test(e))),linux:i((e=>/^Linux/.test(e))),ios:i((e=>/iPhone|iPad|iPod/i.test(e)))};function a(){let{userAgent:e=navigator.userAgent,vendor:t=navigator.vendor}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.objectEach)(r,(o=>{let{test:s}=o;s(e,t)}))}function l(){let{platform:e=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.objectEach)(n,(t=>{let{test:o}=t;o(e)}))}a(),l()},69173:(e,t,o)=>{"use strict";t.__esModule=!0,t.error=function(){(0,s.isDefined)(console)&&console.error(...arguments)},t.info=function(){(0,s.isDefined)(console)&&console.info(...arguments)},t.log=function(){(0,s.isDefined)(console)&&console.log(...arguments)},t.warn=function(){(0,s.isDefined)(console)&&console.warn(...arguments)};var s=o(93315)},65320:(e,t,o)=>{"use strict";t.__esModule=!0,t.countFirstRowKeys=function(e){let t=0;Array.isArray(e)&&(e[0]&&Array.isArray(e[0])?t=e[0].length:e[0]&&(0,s.isObject)(e[0])&&(t=(0,s.deepObjectSize)(e[0])));return t},t.createEmptySpreadsheetData=function(e,t){const o=[];let s;for(let i=0;i<e;i++){s=[];for(let e=0;e<t;e++)s.push("");o.push(s)}return o},t.createSpreadsheetData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const o=[];let s,i;for(s=0;s<e;s++){const e=[];for(i=0;i<t;i++)e.push(n(i)+(s+1));o.push(e)}return o},t.createSpreadsheetObjectData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const o=[];let s,i;for(s=0;s<e;s++){const e={};for(i=0;i<t;i++)e[`prop${i}`]=n(i)+(s+1);o.push(e)}return o},t.dataRowToChangesArray=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=e;const s=[];Array.isArray(e)&&Array.isArray(e[0])||(o=[e]);return o.forEach(((e,o)=>{Array.isArray(e)?e.forEach(((e,i)=>{s.push([o+t,i,e])})):Object.keys(e).forEach((i=>{s.push([o+t,i,e[i]])}))})),s},t.isArrayOfArrays=function(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>Array.isArray(e))))},t.isArrayOfObjects=function(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>"object"==typeof e&&!Array.isArray(e)&&null!==e)))},t.spreadsheetColumnIndex=function(e){let t=0;if(e)for(let o=0,s=e.length-1;o<e.length;o+=1,s-=1)t+=r**s*(i.indexOf(e[o])+1);return t-=1,t},t.spreadsheetColumnLabel=n,o(63517);var s=o(22232);const i="ABCDEFGHIJKLMNOPQRSTUVWXYZ",r=i.length;function n(e){let t,o=e+1,s="";for(;o>0;)t=(o-1)%r,s=String.fromCharCode(65+t)+s,o=parseInt((o-t)/r,10);return s}},48150:(e,t)=>{"use strict";t.__esModule=!0,t.getNormalizedDate=function(e){const t=new Date(e);if(!isNaN(new Date(`${e}T00:00`).getDate()))return new Date(t.getTime()+6e4*t.getTimezoneOffset());return t}},83302:(e,t,o)=>{"use strict";t.__esModule=!0,t.addClass=h,t.addEvent=function(e,t,o){e.addEventListener(t,o,!1)},t.clearTextSelection=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;e.getSelection&&(e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges())},t.closest=n,t.closestDown=function(e,t,o){const s=[];let i=e;for(;i&&(i=n(i,t,o),i&&(!o||o.contains(i)));)s.push(i),i=i.host&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?i.host:i.parentNode;const r=s.length;return r?s[r-1]:null},t.empty=c,t.fastInnerHTML=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];g.test(t)?e.innerHTML=o?(0,s.sanitize)(t):t:f(e,t)},t.fastInnerText=f,t.getCaretPosition=function(e){if(e.selectionStart)return e.selectionStart;return 0},t.getComputedStyle=w,t.getCssTransform=function(e){let t;if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];return-1},t.getFrameElement=r,t.getParent=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=-1,s=null,i=e;for(;null!==i;){if(o===t){s=i;break}i.host&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?i=i.host:(o+=1,i=i.parentNode)}return s},t.getParentWindow=function(e){return r(e)&&e.parent},t.getScrollLeft=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return m(t);return e.scrollLeft},t.getScrollTop=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return p(t);return e.scrollTop},t.getScrollableElement=function(e){let t=e.ownerDocument,o=t?t.defaultView:void 0;t||(t=e.document?e.document:e,o=t.defaultView);const s=["auto","scroll"];let i=e.parentNode;for(;i&&i.style&&t.body!==i;){let{overflow:e,overflowX:t,overflowY:r}=i.style;if([e,t,r].includes("scroll"))return i;if(({overflow:e,overflowX:t,overflowY:r}=o.getComputedStyle(i)),s.includes(e)||s.includes(t)||s.includes(r))return i;if(i.clientHeight<=i.scrollHeight+1&&(s.includes(r)||s.includes(e)))return i;if(i.clientWidth<=i.scrollWidth+1&&(s.includes(t)||s.includes(e)))return i;i=i.parentNode}return o},t.getScrollbarWidth=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;void 0===C&&(C=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;const t=e.createElement("div");t.style.height="200px",t.style.width="100%";const o=e.createElement("div");o.style.boxSizing="content-box",o.style.height="150px",o.style.left="0px",o.style.overflow="hidden",o.style.position="absolute",o.style.top="0px",o.style.width="200px",o.style.visibility="hidden",o.appendChild(t),(e.body||e.documentElement).appendChild(o);const s=t.offsetWidth;o.style.overflow="scroll";let i=t.offsetWidth;s===i&&(i=o.clientWidth);return(e.body||e.documentElement).removeChild(o),s-i}(e));return C},t.getSelectionEndPosition=function(e){if(e.selectionEnd)return e.selectionEnd;return 0},t.getSelectionText=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const t=e.document;let o="";e.getSelection?o=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(o=t.selection.createRange().text);return o},t.getStyle=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e===o)return"width"===t?`${o.innerWidth}px`:"height"===t?`${o.innerHeight}px`:void 0;const s=e.style[t];if(""!==s&&void 0!==s)return s;const i=w(e,o);if(""!==i[t]&&void 0!==i[t])return i[t]},t.getTrimmingContainer=function(e){const t=e.ownerDocument,o=t.defaultView;let s=e.parentNode;for(;s&&s.style&&t.body!==s;){if("visible"!==s.style.overflow&&""!==s.style.overflow)return s;const e=w(s,o),t=["scroll","hidden","auto"],i=e.getPropertyValue("overflow"),r=e.getPropertyValue("overflow-y"),n=e.getPropertyValue("overflow-x");if(t.includes(i)||t.includes(r)||t.includes(n))return s;s=s.parentNode}return o},t.getWindowScrollLeft=m,t.getWindowScrollTop=p,t.hasAccessToParentWindow=function(e){return!!Object.getPrototypeOf(e.parent)},t.hasClass=function(e,t){if(void 0===e.classList||"string"!=typeof t||""===t)return!1;return e.classList.contains(t)},t.hasHorizontalScrollbar=function(e){return e.offsetHeight!==e.clientHeight},t.hasVerticalScrollbar=function(e){return e.offsetWidth!==e.clientWidth},t.index=function(e){let t=0,o=e;if(o.previousSibling)for(;o=o.previousSibling;)t+=1;return t},t.innerHeight=function(e){return e.clientHeight||e.innerHeight},t.innerWidth=function(e){return e.clientWidth||e.innerWidth},t.isChildOf=function(e,t){let o=e.parentNode,s=[];"string"==typeof t?s=e.defaultView?Array.prototype.slice.call(e.querySelectorAll(t),0):Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):s.push(t);for(;null!==o;){if(s.indexOf(o)>-1)return!0;o=o.parentNode}return!1},t.isDetached=function(e){return!e.parentNode},t.isInput=v,t.isOutsideInput=y,t.isThisHotChild=function(e,t){const o=e.closest(".handsontable");return!!o&&(o.parentNode===t||o===t)},t.isVisible=function e(t){const o=t.ownerDocument.documentElement;let s=t;for(;s!==o;){if(null===s)return!1;if(s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(s.host){if(s.host.impl)return e(s.host.impl);if(s.host)return e(s.host);throw new Error("Lost in Web Components world")}return!1}if("none"===w(s).display)return!1;s=s.parentNode}return!0},t.makeElementContentEditableAndSelectItsContent=E,t.matchesCSSRules=function(e,t){const{selectorText:o}=t;let s=!1;t.type===CSSRule.STYLE_RULE&&o&&(e.msMatchesSelector?s=e.msMatchesSelector(o):e.matches&&(s=e.matches(o)));return s},t.observeVisibilityChangeOnce=function(e,t){new IntersectionObserver(((o,s)=>{o.forEach((o=>{o.isIntersecting&&null!==e.offsetParent&&(t(),s.unobserve(e))}))}),{root:e.ownerDocument.body}).observe(e)},t.offset=function(e){const t=e.ownerDocument,o=t.defaultView,s=t.documentElement;let i,r,n,a=e;i=a.offsetLeft,r=a.offsetTop,n=a;for(;(a=a.offsetParent)&&a!==t.body&&"offsetLeft"in a;)i+=a.offsetLeft,r+=a.offsetTop,n=a;n&&"fixed"===n.style.position&&(i+=o.pageXOffset||s.scrollLeft,r+=o.pageYOffset||s.scrollTop);return{left:i,top:r}},t.outerHeight=function(e){return e.offsetHeight},t.outerWidth=function(e){return e.offsetWidth},t.overlayContainsElement=function(e,t,o){const s=o.parentElement.querySelector(`.ht_clone_${e}`);return s?s.contains(t):null},t.removeAttribute=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);const{regexFree:o,regexes:s}=l(t,!0);o.forEach((t=>{""!==t&&e.removeAttribute(t)})),s.forEach((t=>{e.getAttributeNames().forEach((o=>{t.test(o)&&e.removeAttribute(o)}))}))},t.removeClass=u,t.removeContentEditableFromElementAndDeselect=S,t.removeEvent=function(e,t,o){e.removeEventListener(t,o,!1)},t.removeTextNodes=function e(t){if(3===t.nodeType)t.parentNode.removeChild(t);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(t.nodeName)>-1){const o=t.childNodes;for(let t=o.length-1;t>=0;t--)e(o[t])}},t.resetCssTransform=function(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")},t.runWithSelectedContendEditableElement=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];E(e,o),t(),S(e,o)},t.selectElementIfAllowed=function(e){y(e.ownerDocument.activeElement)||e.select()},t.setAttribute=d,t.setCaretPosition=function(e,t,o){void 0===o&&(o=t);if(e.setSelectionRange){e.focus();try{e.setSelectionRange(t,o)}catch(s){const i=e.parentNode,r=i.style.display;i.style.display="block",e.setSelectionRange(t,o),i.style.display=r}}},t.setOverlayPosition=function(e,t,o){e.style.transform=`translate3d(${t},${o},0)`},o(63517),o(91683);var s=o(18609),i=o(5386);function r(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0;const{ELEMENT_NODE:s,DOCUMENT_FRAGMENT_NODE:i}=Node;let r=e;for(;null!=r&&r!==o;){const{nodeType:e,nodeName:o}=r;if(e===s&&(t.includes(o)||t.includes(r)))return r;const{host:n}=r;r=n&&e===i?n:r.parentNode}return null}function a(e){return e&&e.length?e.filter((e=>!!e)):[]}function l(e,t){if(!e||!e.length)return t?{regexFree:[],regexes:[]}:[];const o=[],s=[];return s.push(...e.filter((e=>{const s=e instanceof RegExp;return s&&t&&o.push(e),!s}))),t?{regexFree:s,regexes:o}:s}function h(e,t){"string"==typeof t&&(t=t.split(" ")),(t=a(t)).length>0&&e.classList.add(...t)}function u(e,t){"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:o,regexes:s}=l(t,!0);o=a(o),o.length>0&&e.classList.remove(...o),s.forEach((t=>{e.classList.forEach((o=>{t.test(o)&&e.classList.remove(o)}))}))}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0;Array.isArray(t)||(t=[[t,o]]),t.forEach((t=>{Array.isArray(t)&&""!==t[0]&&e.setAttribute(...t)}))}function c(e){let t;for(;t=e.lastChild;)e.removeChild(t)}const g=t.HTML_CHARACTERS=/(<(.*)>|&(.*);)/;function f(e,t){const o=e.firstChild;o&&3===o.nodeType&&null===o.nextSibling?o.textContent=t:(c(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function p(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollY}function m(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollX}function w(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}let C;function v(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function y(e){return v(e)&&!1===e.hasAttribute("data-hot-input")}function E(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=e.ownerDocument,r=s.createRange(),n=s.defaultView.getSelection();d(e,"contenteditable",!0),o&&d(e,...(0,i.A11Y_HIDDEN)()),t&&h(e,"invisibleSelection"),r.selectNodeContents(e),n.removeAllRanges(),n.addRange(r)}function S(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=e.ownerDocument.defaultView.getSelection();e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden"),o.removeAllRanges(),t&&u(e,"invisibleSelection"),e.removeAttribute("contenteditable")}},24449:(e,t)=>{"use strict";t.__esModule=!0,t.isImmediatePropagationStopped=function(e){return!1===e.isImmediatePropagationEnabled},t.isLeftClick=function(e){return 0===e.button},t.isRightClick=function(e){return 2===e.button},t.offsetRelativeTo=function(e,t){const o={x:e.offsetX,y:e.offsetY};let s=e.target;if(!(t instanceof HTMLElement)||s!==t&&s.contains(t))return o;for(;s!==t;)o.x+=s.offsetLeft,o.y+=s.offsetTop,s=s.offsetParent;return o},t.stopImmediatePropagation=function(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}},7374:(e,t)=>{"use strict";let o;t.__esModule=!0,t.cancelAnimationFrame=function(e){window.cancelAnimationFrame(e)},t.getComparisonFunction=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o)return o;o="object"==typeof Intl?new Intl.Collator(e,t).compare:"function"==typeof String.prototype.localeCompare?(e,t)=>`${e}`.localeCompare(t):(e,t)=>e===t?0:e>t?-1:1;return o},t.isTouchSupported=function(){return"ontouchstart"in window},t.requestAnimationFrame=function(e){return window.requestAnimationFrame(e)}},85015:(e,t,o)=>{"use strict";t.__esModule=!0,t.curry=function(e){const t=e.length;return function o(s){return function(){for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];const a=s.concat(r);let l;return l=a.length>=t?e.apply(this,a):o(a),l}}([])},t.curryRight=function(e){const t=e.length;return function o(s){return function(){for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];const a=s.concat(r.reverse());let l;return l=a.length>=t?e.apply(this,a):o(a),l}}([])},t.debounce=function(e){let t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,s=null;return function(){for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];return s&&clearTimeout(s),s=setTimeout((()=>{t=e.apply(this,r)}),o),t}},t.fastCall=function(e,t,o,s,r,n,a,l){if((0,i.isDefined)(l))return e.call(t,o,s,r,n,a,l);if((0,i.isDefined)(a))return e.call(t,o,s,r,n,a);if((0,i.isDefined)(n))return e.call(t,o,s,r,n);if((0,i.isDefined)(r))return e.call(t,o,s,r);if((0,i.isDefined)(s))return e.call(t,o,s);if((0,i.isDefined)(o))return e.call(t,o);return e.call(t)},t.isFunction=function(e){return"function"==typeof e},t.partial=function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];return function(){for(var t=arguments.length,s=new Array(t),i=0;i<t;i++)s[i]=arguments[i];return e.apply(this,o.concat(s))}},t.pipe=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[i,...r]=t;return function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return(0,s.arrayReduce)(r,((e,t)=>t(e)),i.apply(this,t))}},t.throttle=r,t.throttleAfterHits=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const s=r(e,t);let i=o;function n(){for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];return i?(i-=1,e.apply(this,o)):s.apply(this,o)}return n.clearHits=function(){i=o},n};var s=o(50095),i=o(93315);function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,o=0;const s={lastCallThrottled:!0};let i=null;return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];const l=Date.now();let h=!1;s.lastCallThrottled=!0,o||(o=l,h=!0);const u=t-(l-o);return h?(s.lastCallThrottled=!1,e.apply(this,n)):(i&&clearTimeout(i),i=setTimeout((()=>{s.lastCallThrottled=!1,e.apply(this,n),o=0,i=void 0}),u)),s}}},93315:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t._injectProductInfo=function(e,t){const o=!a(e),s="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),r="14.0.0";let n,v="invalid",y="invalid";const E=function(e){let t=[][l],o=t;if(e[l]!==c("Z"))return!1;for(let t="",s="B<H4P+".split(""),i=c(s.shift());i;i=c(s.shift()||"A"))--i<""[l]?o|=(u(`${u(h(t)+(h(d(e,Math.abs(i),2))+[]).padStart(2,"0"))}`)%97||2)>>1:t=d(e,i,i?1===s[l]?9:8:6);return o===t}(e=g(e||""));if(o||s||E)if(E){const t=(0,i.default)("30/11/2023","DD/MM/YYYY"),o=Math.floor(t.toDate().getTime()/864e5),s=f(e);n=(0,i.default)(864e5*(s+1),"x").format("MMMM DD, YYYY"),o>s?(v="expired",y="expired"):(v="valid",y="valid")}else s?(v="non_commercial",y="valid"):(v="invalid",y="invalid");else v="missing",y="missing";p()&&(v="valid",y="valid");if(!m&&"valid"!==v){w[v]({keyValidityDate:n,hotVersion:r})&&console["non_commercial"===v?"info":"warn"](w[v]({keyValidityDate:n,hotVersion:r})),m=!0}if("valid"!==y&&t.parentNode){if(C[y]({keyValidityDate:n,hotVersion:r})){const e=document.createElement("div");e.className="hot-display-license-info",e.innerHTML=C[y]({keyValidityDate:n,hotVersion:r}),t.parentNode.insertBefore(e,t.nextSibling)}}},t.isDefined=function(e){return void 0!==e},t.isEmpty=a,t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isUndefined=n,t.stringify=function(e){let t;switch(typeof e){case"string":case"number":t=`${e}`;break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString()}return t};var i=s(o(33034)),r=o(28236);function n(e){return void 0===e}function a(e){return null===e||""===e||n(e)}const l="length",h=e=>parseInt(e,16),u=e=>parseInt(e,10),d=(e,t,o)=>e.substr(t,o),c=e=>e.codePointAt(0)-65,g=e=>`${e}`.replace(/\-/g,""),f=e=>h(d(g(e),h("12"),c("F")))/(h(d(g(e),c("B"),~~![][l]))||9),p=()=>"undefined"!=typeof location&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host);let m=!1;const w={invalid:()=>r.toSingleLine`
31
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("dompurify"),require("@handsontable/pikaday"),require("moment"),require("numbro")):"function"==typeof define&&define.amd?define("Handsontable",["dompurify","@handsontable/pikaday","moment","numbro"],t):"object"==typeof exports?exports.Handsontable=t(require("dompurify"),require("@handsontable/pikaday"),require("moment"),require("numbro")):e.Handsontable=t(e.DOMPurify,e.Pikaday,e.moment,e.numbro)}("undefined"!=typeof self?self:this,((e,t,o,s)=>(()=>{var i={86856:()=>{},54894:(e,t)=>{"use strict";t.__esModule=!0,t.parse=function(e){const t=[[""]];if(0===e.length)return t;let r,n=0,a=0;for(;e.length>0&&r!==e.length;)if(r=e.length,e.match(i))e=e.replace(i,""),n+=1,t[a][n]="";else if(e.match(o))e=e.replace(o,""),n=0,a+=1,t[a]=[""];else{let o="";if(e.startsWith('"')){let t=0,s=!0;for(;s;){const i=e.slice(0,1);'"'===i&&(t+=1),o+=i,(0===(e=e.slice(1)).length||e.match(/^[\t\r\n]/)&&t%2==0)&&(s=!1)}o=o.replace(/^"/,"").replace(/"$/,"").replace(/["]*/g,(e=>new Array(Math.floor(e.length/2)).fill('"').join("")))}else{const t=e.match(s);o=t?t[0]:"",e=e.slice(o.length)}t[a][n]=o}return t},t.stringify=function(e){let t,o,s,i,r,n="";for(t=0,o=e.length;t<o;t+=1){for(i=e[t].length,s=0;s<i;s+=1)s>0&&(n+="\t"),r=e[t][s],"string"==typeof r?r.indexOf("\n")>-1?n+=`"${r.replace(/"/g,'""')}"`:n+=r:n+=null==r?"":r;t!==o-1&&(n+="\n")}return n};const o=/^(\r\n|\n\r|\r|\n)/,s=/^[^\t\r\n]+/,i=/^\t/},29270:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(54894);t.parse=s.parse,t.stringify=s.stringify},17137:(e,t)=>{"use strict";t.__esModule=!0;t.RENDER_TYPE=1,t.FULLY_VISIBLE_TYPE=2,t.PARTIALLY_VISIBLE_TYPE=3},46003:(e,t,o)=>{"use strict";t.__esModule=!0;var s={RenderAllColumnsCalculator:!0,RenderAllRowsCalculator:!0,ViewportColumnsCalculator:!0,ViewportRowsCalculator:!0},i=o(74558);t.RenderAllColumnsCalculator=i.RenderAllColumnsCalculator;var r=o(11433);t.RenderAllRowsCalculator=r.RenderAllRowsCalculator;var n=o(65658);t.ViewportColumnsCalculator=n.ViewportColumnsCalculator;var a=o(36107);t.ViewportRowsCalculator=a.ViewportRowsCalculator;var l=o(17137);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===l[e]||(t[e]=l[e]))}))},74558:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231));t.RenderAllColumnsCalculator=class{constructor(e){(0,i.default)(this,"count",0),(0,i.default)(this,"startColumn",0),(0,i.default)(this,"endColumn",0),(0,i.default)(this,"startPosition",0),this.count=e.totalColumns,this.endColumn=this.count-1}}},11433:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231));t.RenderAllRowsCalculator=class{constructor(e){(0,i.default)(this,"count",0),(0,i.default)(this,"startRow",0),(0,i.default)(this,"endRow",0),(0,i.default)(this,"startPosition",0),this.count=e.totalRows,this.endRow=this.count-1}}},65658:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517),o(51344);var i=s(o(93231)),r=s(o(42538)),n=s(o(48427)),a=o(17137);function l(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var h=new WeakMap;class u{static get DEFAULT_WIDTH(){return 50}constructor(e){(0,i.default)(this,"count",0),(0,i.default)(this,"startColumn",null),(0,i.default)(this,"endColumn",null),(0,i.default)(this,"startPosition",null),(0,i.default)(this,"isVisibleInTrimmingContainer",!1),l(this,h,{writable:!0,value:void 0}),(0,n.default)(this,h,e),this.calculate()}calculate(){const{calculationType:e,overrideFn:t,scrollOffset:o,totalColumns:s,viewportWidth:i}=(0,r.default)(this,h),n=Math.max((0,r.default)(this,h).scrollOffset,0),l=n>0?i+1:i;let u=0,d=!0;const c=[];let g,f=0,p=0;for(let t=0;t<s;t++)if(g=this._getColumnWidth(t),u<=n&&e!==a.FULLY_VISIBLE_TYPE&&(this.startColumn=t,f=g),u>=n&&u+(e===a.FULLY_VISIBLE_TYPE?g:0)<=n+l&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=t,f=g),this.endColumn=t),c.push(u),u+=g,p=g,e!==a.FULLY_VISIBLE_TYPE&&(this.endColumn=t),u>=n+i){d=!1;break}const m=o+i-l,w=e===a.FULLY_VISIBLE_TYPE?0:p,C=e===a.FULLY_VISIBLE_TYPE?f:0;if(m<-1*(0,r.default)(this,h).inlineStartOffset||o>c.at(-1)+w||-1*(0,r.default)(this,h).scrollOffset-(0,r.default)(this,h).viewportWidth>-1*C?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,this.endColumn===s-1&&d)for(this.startColumn=this.endColumn;this.startColumn>0;){const t=c[this.endColumn]+g-c[this.startColumn-1];if((t<=i||e!==a.FULLY_VISIBLE_TYPE)&&(this.startColumn-=1),t>i)break}e===a.RENDER_TYPE&&null!==this.startColumn&&t&&t(this),this.startPosition=c[this.startColumn],void 0===this.startPosition&&(this.startPosition=null),s<this.endColumn&&(this.endColumn=s-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}_getColumnWidth(e){let t=(0,r.default)(this,h).columnWidthFn(e);return isNaN(t)&&(t=u.DEFAULT_WIDTH),t}}t.ViewportColumnsCalculator=u},36107:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517),o(51344);var i=s(o(93231)),r=s(o(42538)),n=s(o(48427)),a=o(17137);function l(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var h=new WeakMap;class u{static get DEFAULT_HEIGHT(){return 23}constructor(e){(0,i.default)(this,"count",0),(0,i.default)(this,"startRow",null),(0,i.default)(this,"endRow",null),(0,i.default)(this,"startPosition",null),(0,i.default)(this,"isVisibleInTrimmingContainer",!1),l(this,h,{writable:!0,value:void 0}),(0,n.default)(this,h,e),this.calculate()}calculate(){const{calculationType:e,overrideFn:t,rowHeightFn:o,scrollOffset:s,totalRows:i,viewportHeight:n}=(0,r.default)(this,h),l=Math.max((0,r.default)(this,h).scrollOffset,0),d=(0,r.default)(this,h).horizontalScrollbarHeight||0;let c=0,g=!0;const f=[];let p,m=0,w=0;for(let t=0;t<i;t++)if(p=o(t),isNaN(p)&&(p=u.DEFAULT_HEIGHT),c<=l&&e!==a.FULLY_VISIBLE_TYPE&&(this.startRow=t,m=p),c>=l&&c+(e===a.FULLY_VISIBLE_TYPE?p:0)<=l+n-d&&(null===this.startRow&&(this.startRow=t,m=p),this.endRow=t),f.push(c),c+=p,w=p,e!==a.FULLY_VISIBLE_TYPE&&(this.endRow=t),c>=l+n-d){g=!1;break}const C=s+n-d,v=e===a.FULLY_VISIBLE_TYPE?m:0,y=e===a.FULLY_VISIBLE_TYPE?0:w;if(C<v||s>f.at(-1)+y?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,this.endRow===i-1&&g)for(this.startRow=this.endRow;this.startRow>0;){const t=f[this.endRow]+p-f[this.startRow-1];if((t<=n-d||e!==a.FULLY_VISIBLE_TYPE)&&(this.startRow-=1),t>=n-d)break}e===a.RENDER_TYPE&&null!==this.startRow&&t&&t(this),this.startPosition=f[this.startRow],void 0===this.startPosition&&(this.startPosition=null),i<this.endRow&&(this.endRow=i-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}t.ViewportRowsCalculator=u},82325:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=s(o(42538)),n=s(o(48427));function a(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var l=new WeakMap;class h{constructor(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];(0,i.default)(this,"row",null),(0,i.default)(this,"col",null),a(this,l,{writable:!0,value:!1}),(0,n.default)(this,l,o),void 0!==e&&void 0!==t&&(this.row=e,this.col=t)}isValid(e){const{countRows:t,countCols:o,countRowHeaders:s,countColHeaders:i}={countRows:0,countCols:0,countRowHeaders:0,countColHeaders:0,...e};return!(!Number.isInteger(this.row)||!Number.isInteger(this.col))&&(!(this.row<-i||this.col<-s)&&!(this.row>=t||this.col>=o))}isEqual(e){return e===this||this.row===e.row&&this.col===e.col}isHeader(){return!this.isCell()}isCell(){return this.row>=0&&this.col>=0}isRtl(){return(0,r.default)(this,l)}isSouthEastOf(e){return this.row>=e.row&&((0,r.default)(this,l)?this.col<=e.col:this.col>=e.col)}isNorthWestOf(e){return this.row<=e.row&&((0,r.default)(this,l)?this.col>=e.col:this.col<=e.col)}isSouthWestOf(e){return this.row>=e.row&&((0,r.default)(this,l)?this.col>=e.col:this.col<=e.col)}isNorthEastOf(e){return this.row<=e.row&&((0,r.default)(this,l)?this.col<=e.col:this.col>=e.col)}normalize(){return this.row=null===this.row?this.row:Math.max(this.row,0),this.col=null===this.col?this.col:Math.max(this.col,0),this}assign(e){return Number.isInteger(null==e?void 0:e.row)&&(this.row=e.row),Number.isInteger(null==e?void 0:e.col)&&(this.col=e.col),e instanceof h&&(0,n.default)(this,l,e.isRtl()),this}clone(){return new h(this.row,this.col,(0,r.default)(this,l))}toObject(){return{row:this.row,col:this.col}}}t.default=h},2961:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=s(o(42538)),n=s(o(48427)),a=s(o(82325));function l(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var h=new WeakMap;class u{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];(0,i.default)(this,"highlight",null),(0,i.default)(this,"from",null),(0,i.default)(this,"to",null),l(this,h,{writable:!0,value:!1}),this.highlight=e.clone(),this.from=t.clone(),this.to=o.clone(),(0,n.default)(this,h,s)}setHighlight(e){return this.highlight=e.clone(),this}setFrom(e){return this.from=e.clone(),this}setTo(e){return this.to=e.clone(),this}isValid(e){return this.from.isValid(e)&&this.to.isValid(e)}isSingle(){return this.isSingleCell()||this.isSingleHeader()}isSingleCell(){return this.from.row>=0&&this.from.row===this.to.row&&this.from.col>=0&&this.from.col===this.to.col}isSingleHeader(){return(this.from.row<0||this.from.col<0)&&this.from.row===this.to.row&&this.from.col===this.to.col}containsHeaders(){return this.from.isHeader()||this.to.isHeader()}getOuterHeight(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1}getOuterWidth(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1}getHeight(){if(this.from.row<0&&this.to.row<0)return 0;const e=Math.max(this.from.row,0),t=Math.max(this.to.row,0);return Math.max(e,t)-Math.min(e,t)+1}getWidth(){if(this.from.col<0&&this.to.col<0)return 0;const e=Math.max(this.from.col,0),t=Math.max(this.to.col,0);return Math.max(e,t)-Math.min(e,t)+1}getCellsCount(){return this.getWidth()*this.getHeight()}includes(e){const{row:t,col:o}=e,s=this.getOuterTopStartCorner(),i=this.getOuterBottomEndCorner();return s.row<=t&&i.row>=t&&s.col<=o&&i.col>=o}includesRange(e){return this.includes(e.getOuterTopStartCorner())&&this.includes(e.getOuterBottomEndCorner())}isEqual(e){return Math.min(this.from.row,this.to.row)===Math.min(e.from.row,e.to.row)&&Math.max(this.from.row,this.to.row)===Math.max(e.from.row,e.to.row)&&Math.min(this.from.col,this.to.col)===Math.min(e.from.col,e.to.col)&&Math.max(this.from.col,this.to.col)===Math.max(e.from.col,e.to.col)}overlaps(e){return e.isSouthEastOf(this.getOuterTopLeftCorner())&&e.isNorthWestOf(this.getOuterBottomRightCorner())}isSouthEastOf(e){return this.getOuterTopLeftCorner().isSouthEastOf(e)||this.getOuterBottomRightCorner().isSouthEastOf(e)}isNorthWestOf(e){return this.getOuterTopLeftCorner().isNorthWestOf(e)||this.getOuterBottomRightCorner().isNorthWestOf(e)}isOverlappingHorizontally(e){return this.getOuterTopEndCorner().col>=e.getOuterTopStartCorner().col&&this.getOuterTopEndCorner().col<=e.getOuterTopEndCorner().col||this.getOuterTopStartCorner().col<=e.getOuterTopEndCorner().col&&this.getOuterTopStartCorner().col>=e.getOuterTopStartCorner().col}isOverlappingVertically(e){return this.getOuterBottomStartCorner().row>=e.getOuterTopRightCorner().row&&this.getOuterBottomStartCorner().row<=e.getOuterBottomStartCorner().row||this.getOuterTopEndCorner().row<=e.getOuterBottomStartCorner().row&&this.getOuterTopEndCorner().row>=e.getOuterTopRightCorner().row}expand(e){const t=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner();return(e.row<t.row||e.col<t.col||e.row>o.row||e.col>o.col)&&(this.from=this._createCellCoords(Math.min(t.row,e.row),Math.min(t.col,e.col)),this.to=this._createCellCoords(Math.max(o.row,e.row),Math.max(o.col,e.col)),!0)}expandByRange(e){if(this.includesRange(e)||!this.overlaps(e))return!1;const t=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner(),s=this.getDirection(),i=e.getOuterTopStartCorner(),r=e.getOuterBottomEndCorner(),n=Math.min(t.row,i.row),a=Math.min(t.col,i.col),l=Math.max(o.row,r.row),h=Math.max(o.col,r.col),u=this._createCellCoords(n,a),d=this._createCellCoords(l,h);return this.from=u,this.to=d,this.setDirection(s),this.highlight.row===this.getOuterBottomRightCorner().row&&"N-S"===this.getVerticalDirection()&&this.flipDirectionVertically(),this.highlight.col===this.getOuterTopRightCorner().col&&"W-E"===this.getHorizontalDirection()&&this.flipDirectionHorizontally(),!0}getDirection(){return this.from.isNorthWestOf(this.to)?"NW-SE":this.from.isNorthEastOf(this.to)?"NE-SW":this.from.isSouthEastOf(this.to)?"SE-NW":this.from.isSouthWestOf(this.to)?"SW-NE":void 0}setDirection(e){switch(e){case"NW-SE":[this.from,this.to]=[this.getOuterTopLeftCorner(),this.getOuterBottomRightCorner()];break;case"NE-SW":[this.from,this.to]=[this.getOuterTopRightCorner(),this.getOuterBottomLeftCorner()];break;case"SE-NW":[this.from,this.to]=[this.getOuterBottomRightCorner(),this.getOuterTopLeftCorner()];break;case"SW-NE":[this.from,this.to]=[this.getOuterBottomLeftCorner(),this.getOuterTopRightCorner()]}}getVerticalDirection(){return["NE-SW","NW-SE"].indexOf(this.getDirection())>-1?"N-S":"S-N"}getHorizontalDirection(){return["NW-SE","SW-NE"].indexOf(this.getDirection())>-1?"W-E":"E-W"}flipDirectionVertically(){switch(this.getDirection()){case"NW-SE":this.setDirection("SW-NE");break;case"NE-SW":this.setDirection("SE-NW");break;case"SE-NW":this.setDirection("NE-SW");break;case"SW-NE":this.setDirection("NW-SE")}}flipDirectionHorizontally(){switch(this.getDirection()){case"NW-SE":this.setDirection("NE-SW");break;case"NE-SW":this.setDirection("NW-SE");break;case"SE-NW":this.setDirection("SW-NE");break;case"SW-NE":this.setDirection("SE-NW")}}getTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getTopLeftCorner(){return(0,r.default)(this,h)?this.getTopEndCorner():this.getTopStartCorner()}getBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getBottomRightCorner(){return(0,r.default)(this,h)?this.getBottomStartCorner():this.getBottomEndCorner()}getTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getTopRightCorner(){return(0,r.default)(this,h)?this.getTopStartCorner():this.getTopEndCorner()}getBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getBottomLeftCorner(){return(0,r.default)(this,h)?this.getBottomEndCorner():this.getBottomStartCorner()}getOuterTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterTopLeftCorner(){return(0,r.default)(this,h)?this.getOuterTopEndCorner():this.getOuterTopStartCorner()}getOuterBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterBottomRightCorner(){return(0,r.default)(this,h)?this.getOuterBottomStartCorner():this.getOuterBottomEndCorner()}getOuterTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterTopRightCorner(){return(0,r.default)(this,h)?this.getOuterTopStartCorner():this.getOuterTopEndCorner()}getOuterBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterBottomLeftCorner(){return(0,r.default)(this,h)?this.getOuterBottomEndCorner():this.getOuterBottomStartCorner()}isCorner(e){return e.isEqual(this.getOuterTopLeftCorner())||e.isEqual(this.getOuterTopRightCorner())||e.isEqual(this.getOuterBottomLeftCorner())||e.isEqual(this.getOuterBottomRightCorner())}getOppositeCorner(e){return e instanceof a.default&&(e.isEqual(this.getOuterBottomEndCorner())?this.getOuterTopStartCorner():e.isEqual(this.getOuterTopStartCorner())?this.getOuterBottomEndCorner():e.isEqual(this.getOuterTopEndCorner())?this.getOuterBottomStartCorner():e.isEqual(this.getOuterBottomStartCorner())?this.getOuterTopEndCorner():void 0)}getBordersSharedWith(e){if(!this.includesRange(e))return[];const t=Math.min(this.from.row,this.to.row),o=Math.max(this.from.row,this.to.row),s=Math.min(this.from.col,this.to.col),i=Math.max(this.from.col,this.to.col),n=Math.min(e.from.row,e.to.row),a=Math.max(e.from.row,e.to.row),l=Math.min(e.from.col,e.to.col),u=Math.max(e.from.col,e.to.col),d=[];return t===n&&d.push("top"),i===u&&d.push((0,r.default)(this,h)?"left":"right"),o===a&&d.push("bottom"),s===l&&d.push((0,r.default)(this,h)?"right":"left"),d}getInner(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),o=[];for(let s=e.row;s<=t.row;s++)for(let i=e.col;i<=t.col;i++)this.from.row===s&&this.from.col===i||this.to.row===s&&this.to.col===i||o.push(this._createCellCoords(s,i));return o}getAll(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),o=[];for(let s=e.row;s<=t.row;s++)for(let i=e.col;i<=t.col;i++)e.row===s&&e.col===i?o.push(e):t.row===s&&t.col===i?o.push(t):o.push(this._createCellCoords(s,i));return o}forAll(e){const t=this.getOuterTopStartCorner(),o=this.getOuterBottomEndCorner();for(let s=t.row;s<=o.row;s++)for(let i=t.col;i<=o.col;i++){if(!1===e(s,i))return}}clone(){return new u(this.highlight,this.from,this.to,(0,r.default)(this,h))}toObject(){return{from:this.from.toObject(),to:this.to.toObject()}}_createCellCoords(e,t){return new a.default(e,t,(0,r.default)(this,h))}}t.default=u},25984:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(83302),n=o(18609),a=s(o(75244)),l=s(o(52188)),h=s(o(82325)),u=s(o(2961));t.default=class{get eventManager(){return new a.default(this)}constructor(e,t){(0,i.default)(this,"wtTable",void 0),(0,i.default)(this,"wtScroll",void 0),(0,i.default)(this,"wtViewport",void 0),(0,i.default)(this,"wtOverlays",void 0),(0,i.default)(this,"selectionManager",void 0),(0,i.default)(this,"wtEvent",void 0),(0,i.default)(this,"guid",`wt_${(0,n.randomString)()}`),(0,i.default)(this,"drawInterrupted",!1),(0,i.default)(this,"drawn",!1),(0,i.default)(this,"domBindings",void 0),(0,i.default)(this,"wtSettings",void 0),this.domBindings={rootTable:e,rootDocument:e.ownerDocument,rootWindow:e.ownerDocument.defaultView},this.wtSettings=t,this.wtScroll=new l.default(this.createScrollDao())}findOriginalHeaders(){const e=[];if(this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(let t=0,o=this.wtTable.THEAD.childNodes[0].childNodes.length;t<o;t++)e.push(this.wtTable.THEAD.childNodes[0].childNodes[t].innerHTML);this.wtSettings.getSetting("columnHeaders").length||this.wtSettings.update("columnHeaders",[function(t,o){(0,r.fastInnerText)(o,e[t])}])}}createCellCoords(e,t){return new h.default(e,t,this.wtSettings.getSetting("rtlMode"))}createCellRange(e,t,o){return new u.default(e,t,o,this.wtSettings.getSetting("rtlMode"))}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.drawInterrupted=!1,e||this.wtTable.isVisible()?this.wtTable.draw(e):this.drawInterrupted=!0,this}getCell(e){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))return this.wtTable.getCell(e);const t=this.wtSettings.getSetting("totalRows"),o=this.wtSettings.getSetting("fixedRowsTop"),s=this.wtSettings.getSetting("fixedRowsBottom"),i=this.wtSettings.getSetting("fixedColumnsStart");if(e.row<o&&e.col<i)return this.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.getCell(e);if(e.row<o)return this.wtOverlays.topOverlay.clone.wtTable.getCell(e);if(e.col<i&&e.row>=t-s){if(this.wtOverlays.bottomInlineStartCornerOverlay&&this.wtOverlays.bottomInlineStartCornerOverlay.clone)return this.wtOverlays.bottomInlineStartCornerOverlay.clone.wtTable.getCell(e)}else{if(e.col<i)return this.wtOverlays.inlineStartOverlay.clone.wtTable.getCell(e);if(e.row<t&&e.row>=t-s&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(e)}return this.wtTable.getCell(e)}scrollViewport(e,t,o,s,i){return!(e.col<0||e.row<0)&&this.wtScroll.scrollViewport(e,t,o,s,i)}scrollViewportHorizontally(e,t,o){return!(e<0)&&this.wtScroll.scrollViewportHorizontally(e,t,o)}scrollViewportVertically(e,t,o){return!(e<0)&&this.wtScroll.scrollViewportVertically(e,t,o)}getViewport(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]}destroy(){this.wtOverlays.destroy(),this.wtEvent.destroy()}createScrollDao(){const e=this;return{get drawn(){return e.drawn},get topOverlay(){return e.wtOverlays.topOverlay},get inlineStartOverlay(){return e.wtOverlays.inlineStartOverlay},get wtTable(){return e.wtTable},get wtViewport(){return e.wtViewport},get wtSettings(){return e.wtSettings},get rootWindow(){return e.domBindings.rootWindow},get totalRows(){return e.wtSettings.getSetting("totalRows")},get totalColumns(){return e.wtSettings.getSetting("totalColumns")},get fixedRowsTop(){return e.wtSettings.getSetting("fixedRowsTop")},get fixedRowsBottom(){return e.wtSettings.getSetting("fixedRowsBottom")},get fixedColumnsStart(){return e.wtSettings.getSetting("fixedColumnsStart")}}}getTableDao(){const e=this;return{get wot(){return e},get parentTableOffset(){return e.cloneSource.wtTable.tableOffset},get cloneSource(){return e.cloneSource},get workspaceWidth(){return e.wtViewport.getWorkspaceWidth()},get wtViewport(){return e.wtViewport},get wtOverlays(){return e.wtOverlays},get selectionManager(){return e.selectionManager},get drawn(){return e.drawn},set drawn(t){e.drawn=t},get wtTable(){return e.wtTable},get startColumnRendered(){return e.wtViewport.columnsRenderCalculator.startColumn},get startColumnVisible(){return e.wtViewport.columnsVisibleCalculator.startColumn},get endColumnRendered(){return e.wtViewport.columnsRenderCalculator.endColumn},get endColumnVisible(){return e.wtViewport.columnsVisibleCalculator.endColumn},get countColumnsRendered(){return e.wtViewport.columnsRenderCalculator.count},get countColumnsVisible(){return e.wtViewport.columnsVisibleCalculator.count},get startRowRendered(){return e.wtViewport.rowsRenderCalculator.startRow},get startRowVisible(){return e.wtViewport.rowsVisibleCalculator.startRow},get endRowRendered(){return e.wtViewport.rowsRenderCalculator.endRow},get endRowVisible(){return e.wtViewport.rowsVisibleCalculator.endRow},get countRowsRendered(){return e.wtViewport.rowsRenderCalculator.count},get countRowsVisible(){return e.wtViewport.rowsVisibleCalculator.count},get columnHeaders(){return e.wtSettings.getSetting("columnHeaders")},get rowHeaders(){return e.wtSettings.getSetting("rowHeaders")}}}}},49755:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=s(o(83154)),n=s(o(25984));class a extends n.default{constructor(e,t,o){super(e,t),(0,i.default)(this,"cloneSource",void 0),(0,i.default)(this,"cloneOverlay",void 0);const s=this.wtSettings.getSetting("facade",this);this.cloneSource=o.source,this.cloneOverlay=o.overlay,this.wtTable=this.cloneOverlay.createTable(this.getTableDao(),s,this.domBindings,this.wtSettings),this.wtViewport=o.viewport,this.selectionManager=o.selectionManager,this.wtEvent=new r.default(s,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager,o.event),this.findOriginalHeaders()}}t.default=a},59189:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(83154)),r=s(o(87831)),n=s(o(64057)),a=s(o(94915)),l=s(o(57293)),h=s(o(25984)),u=o(86143),d=o(22232),c=o(83302);class g extends h.default{constructor(e,t){super(e,new n.default(t));const o=this.wtSettings.getSetting("facade",this);this.wtTable=new a.default(this.getTableDao(),o,this.domBindings,this.wtSettings),this.wtViewport=new l.default(this.getViewportDao(),this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.selectionManager=new u.SelectionManager(this.wtSettings.getSetting("selections")),this.wtEvent=new i.default(o,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager),this.wtOverlays=new r.default(this,o,this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.exportSettingsAsClassNames(),this.findOriginalHeaders()}exportSettingsAsClassNames(){const e=[],t=[];(0,d.objectEach)({rowHeaders:"htRowHeaders",columnHeaders:"htColumnHeaders"},((o,s)=>{this.wtSettings.getSetting(s).length&&t.push(o),e.push(o)})),(0,c.removeClass)(this.wtTable.wtRootElement.parentNode,e),(0,c.addClass)(this.wtTable.wtRootElement.parentNode,t)}getViewportDao(){const e=this;return{get wot(){return e},get topOverlayTrimmingContainer(){return e.wtOverlays.topOverlay.trimmingContainer},get inlineStartOverlayTrimmingContainer(){return e.wtOverlays.inlineStartOverlay.trimmingContainer},get topScrollPosition(){return e.wtOverlays.topOverlay.getScrollPosition()},get topParentOffset(){return e.wtOverlays.topOverlay.getTableParentOffset()},get inlineStartScrollPosition(){return e.wtOverlays.inlineStartOverlay.getScrollPosition()},get inlineStartParentOffset(){return e.wtOverlays.inlineStartOverlay.getTableParentOffset()},get topOverlay(){return e.wtOverlays.topOverlay},get inlineStartOverlay(){return e.wtOverlays.inlineStartOverlay},get bottomOverlay(){return e.wtOverlays.bottomOverlay}}}}t.default=g},83154:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(42538)),r=s(o(48427)),n=o(83302),a=o(85015),l=o(7374),h=o(37595),u=o(93315);function d(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var c=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,w=new WeakMap,C=new WeakMap,v=new WeakMap,y=new WeakMap,E=new WeakMap;t.default=class{constructor(e,t,o,s,i,n){let a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;d(this,c,{writable:!0,value:void 0}),d(this,g,{writable:!0,value:void 0}),d(this,f,{writable:!0,value:void 0}),d(this,p,{writable:!0,value:void 0}),d(this,m,{writable:!0,value:void 0}),d(this,w,{writable:!0,value:void 0}),d(this,C,{writable:!0,value:void 0}),d(this,v,{writable:!0,value:void 0}),d(this,y,{writable:!0,value:[null,null]}),d(this,E,{writable:!0,value:[null,null]}),(0,r.default)(this,c,o),(0,r.default)(this,g,t),(0,r.default)(this,f,i),(0,r.default)(this,p,n),(0,r.default)(this,m,a),(0,r.default)(this,w,s),(0,r.default)(this,C,e),this.registerEvents()}registerEvents(){(0,i.default)(this,w).addEventListener((0,i.default)(this,f).holder,"contextmenu",(e=>this.onContextMenu(e))),(0,i.default)(this,w).addEventListener((0,i.default)(this,f).TABLE,"mouseover",(e=>this.onMouseOver(e))),(0,i.default)(this,w).addEventListener((0,i.default)(this,f).TABLE,"mouseout",(e=>this.onMouseOut(e)));const e=()=>{(0,i.default)(this,w).addEventListener((0,i.default)(this,f).holder,"touchstart",(e=>this.onTouchStart(e))),(0,i.default)(this,w).addEventListener((0,i.default)(this,f).holder,"touchend",(e=>this.onTouchEnd(e))),this.momentumScrolling||(this.momentumScrolling={}),(0,i.default)(this,w).addEventListener((0,i.default)(this,f).holder,"scroll",(()=>{clearTimeout(this.momentumScrolling._timeout),this.momentumScrolling.ongoing||(0,i.default)(this,c).getSetting("onBeforeTouchScroll"),this.momentumScrolling.ongoing=!0,this.momentumScrolling._timeout=setTimeout((()=>{this.touchApplied||(this.momentumScrolling.ongoing=!1,(0,i.default)(this,c).getSetting("onAfterMomentumScroll"))}),200)}))},t=()=>{(0,i.default)(this,w).addEventListener((0,i.default)(this,f).holder,"mouseup",(e=>this.onMouseUp(e))),(0,i.default)(this,w).addEventListener((0,i.default)(this,f).holder,"mousedown",(e=>this.onMouseDown(e)))};(0,h.isMobileBrowser)()?e():((0,l.isTouchSupported)()&&e(),t())}selectedCellWasTouched(e){const t=this.parentCell(e).coords;if((0,i.default)(this,v)&&t){const[e,o]=[t.row,(0,i.default)(this,v).from.row],[s,r]=[t.col,(0,i.default)(this,v).from.col];return e===o&&s===r}return!1}parentCell(e){const t={},o=(0,i.default)(this,f).TABLE,s=(0,n.closestDown)(e,["TD","TH"],o);return s?(t.coords=(0,i.default)(this,f).getCoords(s),t.TD=s):(0,n.hasClass)(e,"wtBorder")&&(0,n.hasClass)(e,"current")?(t.coords=(0,i.default)(this,p).getFocusSelection().cellRange.highlight,t.TD=(0,i.default)(this,f).getCell(t.coords)):(0,n.hasClass)(e,"wtBorder")&&(0,n.hasClass)(e,"area")&&(0,i.default)(this,p).getAreaSelection().cellRange&&(t.coords=(0,i.default)(this,p).getAreaSelection().cellRange.to,t.TD=(0,i.default)(this,f).getCell(t.coords)),t}onMouseDown(e){const t=(0,i.default)(this,g).rootDocument.activeElement,o=(0,a.partial)(n.getParent,e.target),s=e.target;if(!["TD","TH"].includes(t.nodeName)&&(s===t||o(0)===t||o(1)===t))return;const r=this.parentCell(s);(0,n.hasClass)(s,"corner")?(0,i.default)(this,c).getSetting("onCellCornerMouseDown",e,s):r.TD&&(0,i.default)(this,c).has("onCellMouseDown")&&this.callListener("onCellMouseDown",e,r.coords,r.TD),(0===e.button||this.touchApplied)&&r.TD&&((0,i.default)(this,E)[0]=r.TD,clearTimeout((0,i.default)(this,y)[0]),(0,i.default)(this,y)[0]=setTimeout((()=>{(0,i.default)(this,E)[0]=null}),1e3))}onContextMenu(e){if((0,i.default)(this,c).has("onCellContextMenu")){const t=this.parentCell(e.target);t.TD&&this.callListener("onCellContextMenu",e,t.coords,t.TD)}}onMouseOver(e){if(!(0,i.default)(this,c).has("onCellMouseOver"))return;const t=(0,i.default)(this,f).TABLE,o=(0,n.closestDown)(e.target,["TD","TH"],t),s=(0,i.default)(this,m)||this;o&&o!==s.lastMouseOver&&(0,n.isChildOf)(o,t)&&(s.lastMouseOver=o,this.callListener("onCellMouseOver",e,(0,i.default)(this,f).getCoords(o),o))}onMouseOut(e){if(!(0,i.default)(this,c).has("onCellMouseOut"))return;const t=(0,i.default)(this,f).TABLE,o=(0,n.closestDown)(e.target,["TD","TH"],t),s=(0,n.closestDown)(e.relatedTarget,["TD","TH"],t),r=(0,i.default)(this,m)||this;o&&o!==s&&(0,n.isChildOf)(o,t)&&(this.callListener("onCellMouseOut",e,(0,i.default)(this,f).getCoords(o),o),null===s&&(r.lastMouseOver=null))}onMouseUp(e){const t=this.parentCell(e.target);t.TD&&(0,i.default)(this,c).has("onCellMouseUp")&&this.callListener("onCellMouseUp",e,t.coords,t.TD),(0===e.button||this.touchApplied)&&(t.TD===(0,i.default)(this,E)[0]&&t.TD===(0,i.default)(this,E)[1]?((0,n.hasClass)(e.target,"corner")?this.callListener("onCellCornerDblClick",e,t.coords,t.TD):this.callListener("onCellDblClick",e,t.coords,t.TD),(0,i.default)(this,E)[0]=null,(0,i.default)(this,E)[1]=null):t.TD===(0,i.default)(this,E)[0]&&((0,i.default)(this,E)[1]=t.TD,clearTimeout((0,i.default)(this,y)[1]),(0,i.default)(this,y)[1]=setTimeout((()=>{(0,i.default)(this,E)[1]=null}),500)))}onTouchStart(e){(0,r.default)(this,v,(0,i.default)(this,p).getFocusSelection().cellRange),this.touchApplied=!0,this.onMouseDown(e)}onTouchEnd(e){var t;const o=e.target,s=null===(t=this.parentCell(o))||void 0===t?void 0:t.coords,r=(0,u.isDefined)(s)&&s.row>=0&&s.col>=0;if(e.cancelable&&r&&(0,i.default)(this,c).getSetting("isDataViewInstance")){const t=["A","BUTTON","INPUT"];(0,h.isIOS)()&&((0,h.isChromeWebKit)()||(0,h.isFirefoxWebKit)())&&this.selectedCellWasTouched(o)&&!t.includes(o.tagName)?e.preventDefault():this.selectedCellWasTouched(o)||e.preventDefault()}this.onMouseUp(e),this.touchApplied=!1}callListener(e,t,o,s){const r=(0,i.default)(this,c).getSettingPure(e);r&&r(t,o,s,(0,i.default)(this,C).call(this))}destroy(){clearTimeout((0,i.default)(this,y)[0]),clearTimeout((0,i.default)(this,y)[1]),(0,i.default)(this,w).destroy()}}},70559:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(59189)),r=s(o(25984));class n{constructor(e){e instanceof r.default?this._wot=e:this._initFromSettings(e)}_initFromSettings(e){e.facade=e=>{const t=new n(e);return()=>t},this._wot=new i.default(e.table,e)}get guid(){return this._wot.guid}get rootDocument(){return this._wot.domBindings.rootDocument}get rootWindow(){return this._wot.domBindings.rootWindow}get wtSettings(){return this._wot.wtSettings}get cloneSource(){return this._wot.cloneSource}get cloneOverlay(){return this._wot.cloneOverlay}get selectionManager(){return this._wot.selectionManager}get wtViewport(){return this._wot.wtViewport}get wtOverlays(){return this._wot.wtOverlays}get wtTable(){return this._wot.wtTable}get wtEvent(){return this._wot.wtEvent}get wtScroll(){return this._wot.wtScroll}get drawn(){return this._wot.drawn}set drawn(e){this._wot.drawn=e}get drawInterrupted(){return this._wot.drawInterrupted}set drawInterrupted(e){this._wot.drawInterrupted=e}get lastMouseOver(){return this._wot.lastMouseOver}set lastMouseOver(e){this._wot.lastMouseOver=e}get momentumScrolling(){return this._wot.momentumScrolling}set momentumScrolling(e){this._wot.momentumScrolling=e}get touchApplied(){return this._wot.touchApplied}set touchApplied(e){this._wot.touchApplied=e}get domBindings(){return this._wot.domBindings}get eventListeners(){return this._wot.eventListeners}set eventListeners(e){this._wot.eventListeners=e}get eventManager(){return this._wot.eventManager}createCellCoords(e,t){return this._wot.createCellCoords(e,t)}createCellRange(e,t,o){return this._wot.createCellRange(e,t,o)}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._wot.draw(e),this}getCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._wot.getCell(e,t)}scrollViewport(e,t,o,s,i){return this._wot.scrollViewport(e,t,o,s,i)}scrollViewportHorizontally(e,t,o){return this._wot.scrollViewportHorizontally(e,t,o)}scrollViewportVertically(e,t,o){return this._wot.scrollViewportVertically(e,t,o)}getViewport(){return this._wot.getViewport()}getOverlayName(){return this._wot.cloneOverlay?this._wot.cloneOverlay.type:"master"}exportSettingsAsClassNames(){return this._wot.exportSettingsAsClassNames()}update(e,t){return this._wot.wtSettings.update(e,t),this}getSetting(e,t,o,s,i){return this._wot.wtSettings.getSetting(e,t,o,s,i)}hasSetting(e){return this._wot.wtSettings.hasSetting(e)}destroy(){this._wot.destroy()}}t.default=n},65946:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231));t.default=class{constructor(e,t,o){(0,i.default)(this,"offset",void 0),(0,i.default)(this,"total",void 0),(0,i.default)(this,"countTH",void 0),this.offset=e,this.total=t,this.countTH=o}offsetted(e){return e+this.offset}unOffsetted(e){return e-this.offset}renderedToSource(e){return this.offsetted(e)}sourceToRendered(e){return this.unOffsetted(e)}offsettedTH(e){return e-this.countTH}unOffsettedTH(e){return e+this.countTH}visibleRowHeadedColumnToSourceColumn(e){return this.renderedToSource(this.offsettedTH(e))}sourceColumnToVisibleRowHeadedColumn(e){return this.unOffsettedTH(this.sourceToRendered(e))}}},22350:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231));t.default=class{constructor(e,t,o){(0,i.default)(this,"offset",void 0),(0,i.default)(this,"total",void 0),(0,i.default)(this,"countTH",void 0),this.offset=e,this.total=t,this.countTH=o}offsetted(e){return e+this.offset}unOffsetted(e){return e-this.offset}renderedToSource(e){return this.offsetted(e)}sourceToRendered(e){return this.unOffsetted(e)}offsettedTH(e){return e-this.countTH}unOffsettedTH(e){return e+this.countTH}visibleColHeadedRowToSourceRow(e){return this.renderedToSource(this.offsettedTH(e))}sourceRowToVisibleColHeadedRow(e){return this.unOffsettedTH(this.sourceToRendered(e))}}},21280:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=o(46003);t.ViewportColumnsCalculator=i.ViewportColumnsCalculator,t.ViewportRowsCalculator=i.ViewportRowsCalculator;var r=s(o(82325));t.CellCoords=r.default;var n=s(o(2961));t.CellRange=n.default;var a=s(o(70559));t.default=a.default,t.Core=a.default;var l=o(88361);t.Selection=l.Selection,t.HIGHLIGHT_ACTIVE_HEADER_TYPE=l.ACTIVE_HEADER_TYPE,t.HIGHLIGHT_AREA_TYPE=l.AREA_TYPE,t.HIGHLIGHT_FOCUS_TYPE=l.FOCUS_TYPE,t.HIGHLIGHT_FILL_TYPE=l.FILL_TYPE,t.HIGHLIGHT_HEADER_TYPE=l.HEADER_TYPE,t.HIGHLIGHT_ROW_TYPE=l.ROW_TYPE,t.HIGHLIGHT_COLUMN_TYPE=l.COLUMN_TYPE,t.HIGHLIGHT_CUSTOM_SELECTION_TYPE=l.CUSTOM_SELECTION_TYPE;var h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=c(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(96649));t.Renderer=h;var u=o(1909);t.OrderView=u.OrderView,t.SharedOrderView=u.SharedOrderView;var d=o(75244);function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(c=function(e){return e?o:t})(e)}t.getListenersCounter=d.getListenersCounter},75391:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(83302),n=o(22232),a=o(50095),l=o(69173),h=o(3984),u=s(o(49755)),d=o(5386);t.Overlay=class{constructor(e,t,o,s,a){(0,i.default)(this,"wtSettings",null),(0,n.defineGetter)(this,"wot",e,{writable:!1}),this.domBindings=a,this.facadeGetter=t,this.wtSettings=s;const{TABLE:l,hider:h,spreader:u,holder:d,wtRootElement:c}=this.wot.wtTable;this.instance=this.wot,this.type=o,this.mainTableScrollableElement=null,this.TABLE=l,this.hider=h,this.spreader=u,this.holder=d,this.wtRootElement=c,this.trimmingContainer=(0,r.getTrimmingContainer)(this.hider.parentNode.parentNode),this.updateStateOfRendering(),this.clone=this.makeClone()}updateStateOfRendering(){const e=this.needFullRender;this.needFullRender=this.shouldBeRendered();const t=e!==this.needFullRender;return t&&!this.needFullRender&&this.reset(),t}shouldBeRendered(){return!0}updateTrimmingContainer(){this.trimmingContainer=(0,r.getTrimmingContainer)(this.hider.parentNode.parentNode)}updateMainScrollableElement(){const{wtTable:e}=this.wot,{rootWindow:t}=this.domBindings;"hidden"===t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow")?this.mainTableScrollableElement=this.wot.wtTable.holder:this.mainTableScrollableElement=(0,r.getScrollableElement)(e.TABLE)}getRelativeCellPosition(e,t,o){if(!1===this.clone.wtTable.holder.contains(e))return void(0,l.warn)(`The provided element is not a child of the ${this.type} overlay`);const s=this.mainTableScrollableElement===this.domBindings.rootWindow,i=o<this.wtSettings.getSetting("fixedColumnsStart"),r=t<this.wtSettings.getSetting("fixedRowsTop"),n=t>=this.wtSettings.getSetting("totalRows")-this.wtSettings.getSetting("fixedRowsBottom"),a=this.clone.wtTable.spreader,h={start:this.getRelativeStartPosition(a),top:a.offsetTop},u={start:this.getRelativeStartPosition(e),top:e.offsetTop};let d=null;return d=s?this.getRelativeCellPositionWithinWindow(r,i,u,h):this.getRelativeCellPositionWithinHolder(r,n,i,u,h),d}getRelativeStartPosition(e){return this.isRtl()?e.offsetParent.offsetWidth-e.offsetLeft-e.offsetWidth:e.offsetLeft}getRelativeCellPositionWithinWindow(e,t,o,s){const i=this.wot.wtTable.wtRootElement.getBoundingClientRect();let n=0,a=0;if(t){let e=i.left;this.isRtl()&&(e=this.domBindings.rootWindow.innerWidth-(i.left+i.width+(0,r.getScrollbarWidth)())),n=e<=0?-1*e:0}else n=s.start;if(e){a=this.clone.wtTable.TABLE.getBoundingClientRect().top-i.top}else a=s.top;return{start:o.start+n,top:o.top+a}}getRelativeCellPositionWithinHolder(e,t,o,s,i){const r=this.wot.wtOverlays.inlineStartOverlay.getScrollPosition(),n=this.wot.wtOverlays.topOverlay.getScrollPosition();let a=0,l=0;if(o||(a=r-i.start),t){const e=this.wot.wtTable.wtRootElement.getBoundingClientRect();l=-1*this.clone.wtTable.TABLE.getBoundingClientRect().top+e.top}else e||(l=n-i.top);return{start:s.start-a,top:s.top-l}}makeClone(){if(-1===h.CLONE_TYPES.indexOf(this.type))throw new Error(`Clone type "${this.type}" is not supported.`);const{wtTable:e,wtSettings:t}=this.wot,{rootDocument:o,rootWindow:s}=this.domBindings,i=o.createElement("div"),n=o.createElement("table"),a=e.wtRootElement.parentNode;i.className=`${h.CLONE_CLASS_NAMES.get(this.type)} handsontable`,i.setAttribute("dir",this.isRtl()?"rtl":"ltr"),i.style.position="absolute",i.style.top=0,i.style.overflow="visible",this.isRtl()?i.style.right=0:i.style.left=0,t.getSetting("ariaTags")&&(0,r.setAttribute)(i,[(0,d.A11Y_PRESENTATION)()]),n.className=e.TABLE.className;e.TABLE.getAttribute("role")&&n.setAttribute("role",e.TABLE.getAttribute("role")),i.appendChild(n),a.appendChild(i);const l=this.wtSettings.getSetting("preventOverflow");return!0===l||"horizontal"===l&&this.type===h.CLONE_TOP||"vertical"===l&&this.type===h.CLONE_INLINE_START?this.mainTableScrollableElement=s:"hidden"===s.getComputedStyle(a).getPropertyValue("overflow")?this.mainTableScrollableElement=e.holder:this.mainTableScrollableElement=(0,r.getScrollableElement)(e.TABLE),new u.default(n,this.wtSettings,{source:this.wot,overlay:this,viewport:this.wot.wtViewport,event:this.wot.wtEvent,selectionManager:this.wot.selectionManager})}refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.shouldBeRendered();this.clone&&(this.needFullRender||t)&&this.clone.draw(e),this.needFullRender=t}reset(){if(!this.clone)return;const e=this.clone.wtTable.holder,t=this.clone.wtTable.hider,o=e.style,s=t.style,i=e.parentNode.style;(0,a.arrayEach)([o,s,i],(e=>{e.width="",e.height=""}))}isRtl(){return this.wtSettings.getSetting("rtlMode")}destroy(){this.clone.eventManager.destroy()}}},99260:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(83302),n=s(o(86363)),a=o(75391),l=o(3984);class h extends a.Overlay{constructor(e,t,o,s){super(e,t,l.CLONE_BOTTOM,o,s),(0,i.default)(this,"cachedFixedRowsBottom",-1),this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom")}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new n.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.wot.wtTable.holder.parentNode)return!1;const{rootWindow:e}=this.domBindings,t=this.clone.wtTable.holder.parentNode;t.style.top="";let o=0;const s=this.wtSettings.getSetting("preventOverflow");this.trimmingContainer!==e||s&&"vertical"===s?(o=this.getScrollPosition(),this.repositionOverlay()):(o=this.getOverlayOffset(),t.style.bottom=`${o}px`);const i=this.adjustHeaderBordersPosition(o);return this.adjustElementsSize(),i}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o}=this.domBindings,s=this.clone.wtTable.holder.parentNode;let i=0;t.hasVerticalScroll()||(i+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(i+=(0,r.getScrollbarWidth)(o)),s.style.bottom=`${i}px`}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let o=!1;return this.mainTableScrollableElement===t?(t.scrollTo((0,r.getWindowScrollLeft)(t),e),o=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,o=!0),o}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const{wtTable:o,wtSettings:s}=this.wot,i=s.getSetting("defaultRowHeight");let r=e,n=0;for(;r<t;){const e=o.getRowHeight(r);n+=void 0===e?i:e,r+=1}return n}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o,rootWindow:s}=this.domBindings,i=(0,r.getScrollbarWidth)(o),n=this.clone.wtTable.holder.parentNode.style,a=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==s||"horizontal"===a){let o=t.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(o-=i),o=Math.min(o,e.wtRootElement.scrollWidth),n.width=`${o}px`}else n.width="";this.clone.wtTable.holder.style.width=n.width;let l=(0,r.outerHeight)(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(l=0),n.height=`${l}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=e.parentNode.style.height}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");if("number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`;else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?t.style[e]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:t.style[e]=""}scrollTo(e,t){let o=this.getTableParentOffset();const s=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder;let i=0;t&&s.offsetHeight!==s.clientHeight&&(i=(0,r.getScrollbarWidth)(this.domBindings.rootDocument)),t?(o+=this.sumCellSizes(0,e+1),o-=this.wot.wtViewport.getViewportHeight(),o+=1):o+=this.sumCellSizes(this.wtSettings.getSetting("fixedRowsBottom"),e),o+=i,this.setScrollPosition(o)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return(0,r.getScrollTop)(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===e&&(!t||"vertical"!==t)){const e=this.wot.wtTable.getTotalHeight(),t=e-this.clone.wtTable.getTotalHeight(),s=this.domBindings.rootDocument.documentElement.clientHeight;o=Math.max(this.getTableParentOffset()-this.getScrollPosition()-s+e,0),o>t&&(o=0)}return o}adjustHeaderBordersPosition(e){const t=this.wtSettings.getSetting("fixedRowsBottom"),o=this.cachedFixedRowsBottom!==t,s=this.wtSettings.getSetting("columnHeaders");let i=!1;if((o||0===t)&&s.length>0){const t=this.wot.wtTable.holder.parentNode,o=(0,r.hasClass)(t,"innerBorderBottom");this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom"),e||0===this.wtSettings.getSetting("totalRows")?((0,r.addClass)(t,"innerBorderBottom"),i=!o):((0,r.removeClass)(t,"innerBorderBottom"),i=o)}return i}}t.BottomOverlay=h},79720:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=o(83302),r=s(o(58654)),n=o(75391),a=o(3984);class l extends n.Overlay{constructor(e,t,o,s,i,r){super(e,t,a.CLONE_BOTTOM_INLINE_START_CORNER,o,s),this.bottomOverlay=i,this.inlineStartOverlay=r}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new r.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wot:e}=this;if(this.updateTrimmingContainer(),!e.wtTable.holder.parentNode)return!1;const t=this.clone.wtTable.holder.parentNode;if(t.style.top="",this.trimmingContainer===this.domBindings.rootWindow){const e=this.inlineStartOverlay.getOverlayOffset(),o=this.bottomOverlay.getOverlayOffset();t.style[this.isRtl()?"right":"left"]=`${e}px`,t.style.bottom=`${o}px`}else(0,i.resetCssTransform)(t),this.repositionOverlay();let o=(0,i.outerHeight)(this.clone.wtTable.TABLE);const s=(0,i.outerWidth)(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(o=0),t.style.height=`${o}px`,t.style.width=`${s}px`,!1}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:o}=this.domBindings,s=this.clone.wtTable.holder.parentNode;let r=0;t.hasVerticalScroll()||(r+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(r+=(0,i.getScrollbarWidth)(o)),s.style.bottom=`${r}px`}}t.BottomInlineStartCornerOverlay=l},3984:(e,t)=>{"use strict";t.__esModule=!0;const o=t.CLONE_TOP="top",s=t.CLONE_BOTTOM="bottom",i=t.CLONE_INLINE_START="inline_start",r=t.CLONE_TOP_INLINE_START_CORNER="top_inline_start_corner",n=t.CLONE_BOTTOM_INLINE_START_CORNER="bottom_inline_start_corner";t.CLONE_TYPES=[o,s,i,r,n],t.CLONE_CLASS_NAMES=new Map([[o,`ht_clone_${o}`],[s,`ht_clone_${s}`],[i,`ht_clone_${i} ht_clone_left`],[r,`ht_clone_${r} ht_clone_top_left_corner`],[n,`ht_clone_${n} ht_clone_bottom_left_corner`]])},89381:(e,t,o)=>{"use strict";t.__esModule=!0;var s={BottomInlineStartCornerOverlay:!0,BottomOverlay:!0,InlineStartOverlay:!0,Overlay:!0,TopInlineStartCornerOverlay:!0,TopOverlay:!0},i=o(79720);t.BottomInlineStartCornerOverlay=i.BottomInlineStartCornerOverlay;var r=o(99260);t.BottomOverlay=r.BottomOverlay;var n=o(34170);t.InlineStartOverlay=n.InlineStartOverlay;var a=o(75391);t.Overlay=a.Overlay;var l=o(40387);t.TopInlineStartCornerOverlay=l.TopInlineStartCornerOverlay;var h=o(82148);t.TopOverlay=h.TopOverlay;var u=o(3984);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===u[e]||(t[e]=u[e]))}))},34170:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=o(83302),r=s(o(32173)),n=o(75391),a=o(88361),l=o(3984);class h extends n.Overlay{constructor(e,t,o,s){super(e,t,l.CLONE_INLINE_START,o,s)}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new r.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wtTable:e}=this.wot;if(!this.needFullRender||!e.holder.parentNode)return!1;const{rootWindow:t}=this.domBindings,o=this.clone.wtTable.holder.parentNode,s=this.wtSettings.getSetting("preventOverflow");let r=0;this.trimmingContainer!==t||s&&"horizontal"===s?(r=this.getScrollPosition(),(0,i.resetCssTransform)(o)):(r=this.getOverlayOffset()*(this.isRtl()?-1:1),(0,i.setOverlayPosition)(o,`${r}px`,"0px"));const n=this.adjustHeaderBordersPosition(r);return this.adjustElementsSize(),n}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let o=!1;return this.isRtl()&&(e=-e),this.mainTableScrollableElement===t&&t.scrollX!==e?(t.scrollTo(e,(0,i.getWindowScrollTop)(t)),o=!0):this.mainTableScrollableElement.scrollLeft!==e&&(this.mainTableScrollableElement.scrollLeft=e,o=!0),o}onScroll(){this.wtSettings.getSetting("onScrollVertically")}sumCellSizes(e,t){const o=this.wtSettings.getSetting("defaultColumnWidth");let s=e,i=0;for(;s<t;)i+=this.wot.wtTable.getStretchedColumnWidth(s)||o,s+=1;return i}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:o}=this.domBindings,s=(0,i.getScrollbarWidth)(t),r=this.clone.wtTable.holder.parentNode.style,n=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==o||"vertical"===n){let t=this.wot.wtViewport.getWorkspaceHeight();this.wot.wtOverlays.hasScrollbarBottom&&(t-=s),t=Math.min(t,e.wtRootElement.scrollHeight),r.height=`${t}px`}else r.height="";this.clone.wtTable.holder.style.height=r.height;const a=(0,i.outerWidth)(this.clone.wtTable.TABLE);r.width=`${a}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=this.wot.selectionManager.getFocusSelection()?parseInt(a.CORNER_DEFAULT_STYLE.width,10)/2:0;this.clone.wtTable.hider.style.height=this.hider.style.height,e.style.height=e.parentNode.style.height,e.style.width=`${parseInt(e.parentNode.style.width,10)+t}px`}applyToDOM(){const e=this.wtSettings.getSetting("totalColumns"),t=this.isRtl()?"right":"left";if("number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition)this.spreader.style[t]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`;else{if(0!==e)throw new Error("Incorrect value of the columnsRenderCalculator");this.spreader.style[t]="0"}this.isRtl()?this.spreader.style.left="":this.spreader.style.right="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){"number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`:this.clone.wtTable.spreader.style.top=""}scrollTo(e,t){let o=this.getTableParentOffset();const s=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder;let r=0;if(t){this.wot.wtTable.getColumnWidth(e)>this.wot.wtViewport.getViewportWidth()&&(t=!1)}return t&&s.offsetWidth!==s.clientWidth&&(r=(0,i.getScrollbarWidth)(this.domBindings.rootDocument)),t?(o+=this.sumCellSizes(0,e+1),o-=this.wot.wtViewport.getViewportWidth()):o+=this.sumCellSizes(this.wtSettings.getSetting("fixedColumnsStart"),e),o+=r,this.setScrollPosition(o)}getTableParentOffset(){let e=0;return this.wtSettings.getSetting("preventOverflow")||this.trimmingContainer!==this.domBindings.rootWindow||(e=this.wot.wtTable.holderOffset.left),e}getScrollPosition(){return Math.abs((0,i.getScrollLeft)(this.mainTableScrollableElement,this.domBindings.rootWindow))}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===e&&(!t||"horizontal"!==t)){o=this.isRtl()?Math.abs(Math.min(this.getTableParentOffset()-this.getScrollPosition(),0)):Math.max(this.getScrollPosition()-this.getTableParentOffset(),0);o>this.wot.wtTable.getTotalWidth()-this.clone.wtTable.getTotalWidth()&&(o=0)}return o}adjustHeaderBordersPosition(e){const t=this.wot.wtTable.holder.parentNode,o=this.wtSettings.getSetting("rowHeaders"),s=this.wtSettings.getSetting("fixedColumnsStart");this.wtSettings.getSetting("totalRows")?(0,i.removeClass)(t,"emptyRows"):(0,i.addClass)(t,"emptyRows");let r=!1;if(s&&!o.length)(0,i.addClass)(t,"innerBorderLeft innerBorderInlineStart");else if(!s&&o.length){const o=(0,i.hasClass)(t,"innerBorderInlineStart");e?((0,i.addClass)(t,"innerBorderLeft innerBorderInlineStart"),r=!o):((0,i.removeClass)(t,"innerBorderLeft innerBorderInlineStart"),r=o)}return r}}t.InlineStartOverlay=h},82148:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(83302),n=s(o(85043)),a=o(75391),l=o(88361),h=o(3984);class u extends a.Overlay{constructor(e,t,o,s){super(e,t,h.CLONE_TOP,o,s),(0,i.default)(this,"cachedFixedRowsTop",-1),this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop")}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new n.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode,{rootWindow:t}=this.domBindings,o=this.wtSettings.getSetting("preventOverflow");let s=0,i=!1;if(this.trimmingContainer!==t||o&&"vertical"===o)s=this.getScrollPosition(),(0,r.resetCssTransform)(e);else{const{wtTable:t}=this.wot,o=t.hider.getBoundingClientRect();i=Math.ceil(o.bottom)===e.offsetHeight,s=this.getOverlayOffset(),(0,r.setOverlayPosition)(e,"0px",`${s}px`)}const n=this.adjustHeaderBordersPosition(s,i);return this.adjustElementsSize(),n}setScrollPosition(e){const t=this.domBindings.rootWindow;let o=!1;return this.mainTableScrollableElement===t&&t.scrollY!==e?(t.scrollTo((0,r.getWindowScrollLeft)(t),e),o=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,o=!0),o}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const o=this.wtSettings.getSetting("defaultRowHeight");let s=e,i=0;for(;s<t;){const e=this.wot.wtTable.getRowHeight(s);i+=void 0===e?o:e,s+=1}return i}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateTrimmingContainer(),(this.needFullRender||e)&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:o}=this.domBindings,s=(0,r.getScrollbarWidth)(t),i=this.clone.wtTable.holder.parentNode.style,n=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==o||"horizontal"===n){let t=this.wot.wtViewport.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(t-=s),t=Math.min(t,e.wtRootElement.scrollWidth),i.width=`${t}px`}else i.width="";this.clone.wtTable.holder.style.width=i.width;let a=(0,r.outerHeight)(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(a=0),i.height=`${a}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=this.wot.selectionManager.getFocusSelection()?parseInt(l.CORNER_DEFAULT_STYLE.height,10)/2:0;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=`${parseInt(e.parentNode.style.height,10)+t}px`}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");if("number"==typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=`${this.wot.wtViewport.rowsRenderCalculator.startPosition}px`;else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;"number"==typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?t.style[e]=`${this.wot.wtViewport.columnsRenderCalculator.startPosition}px`:t.style[e]=""}scrollTo(e,t){const{wot:o,wtSettings:s}=this,i=(o.cloneSource?o.cloneSource:o).wtTable.holder;let n=this.getTableParentOffset(),a=0;if(t){this.wot.wtTable.getRowHeight(e)>this.wot.wtViewport.getViewportHeight()&&(t=!1)}if(t&&i.offsetHeight!==i.clientHeight&&(a=(0,r.getScrollbarWidth)(this.domBindings.rootDocument)),t){const t=s.getSetting("fixedRowsBottom"),i=s.getSetting("totalRows");n+=this.sumCellSizes(0,e+1),n-=o.wtViewport.getViewportHeight()-this.sumCellSizes(i-t,i),n+=1}else n+=this.sumCellSizes(s.getSetting("fixedRowsTop"),e);return n+=a,this.setScrollPosition(n)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return(0,r.getScrollTop)(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let o=0;if(this.trimmingContainer===e&&(!t||"vertical"!==t)){const e=this.wot.wtTable.getTotalHeight()-this.clone.wtTable.getTotalHeight();o=Math.max(this.getScrollPosition()-this.getTableParentOffset(),0),o>e&&(o=0)}return o}adjustHeaderBordersPosition(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=this.wot.wtTable.holder.parentNode;this.wtSettings.getSetting("totalColumns")?(0,r.removeClass)(o,"emptyColumns"):(0,r.addClass)(o,"emptyColumns");let s=!1;if(!t){const t=this.wtSettings.getSetting("fixedRowsTop"),i=this.cachedFixedRowsTop!==t,n=this.wtSettings.getSetting("columnHeaders");if((i||0===t)&&n.length>0){const t=(0,r.hasClass)(o,"innerBorderTop");this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop"),e||0===this.wtSettings.getSetting("totalRows")?((0,r.addClass)(o,"innerBorderTop"),s=!t):((0,r.removeClass)(o,"innerBorderTop"),s=t)}}return s}}t.TopOverlay=u},40387:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(83302),n=s(o(56754)),a=o(75391),l=o(3984);class h extends a.Overlay{constructor(e,t,o,s,r,n){super(e,t,l.CLONE_TOP_INLINE_START_CORNER,o,s),(0,i.default)(this,"topOverlay",void 0),(0,i.default)(this,"inlineStartOverlay",void 0),this.topOverlay=r,this.inlineStartOverlay=n}createTable(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return new n.default(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){if(this.updateTrimmingContainer(),!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode;if(this.trimmingContainer===this.domBindings.rootWindow){const t=this.inlineStartOverlay.getOverlayOffset()*(this.isRtl()?-1:1),o=this.topOverlay.getOverlayOffset();(0,r.setOverlayPosition)(e,`${t}px`,`${o}px`)}else(0,r.resetCssTransform)(e);let t=(0,r.outerHeight)(this.clone.wtTable.TABLE);const o=(0,r.outerWidth)(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(t=0),e.style.height=`${t}px`,e.style.width=`${o}px`,!1}}t.TopInlineStartCornerOverlay=h},87831:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(83302),n=o(7374),a=o(50095),l=o(80151),h=o(37595),u=o(89381);t.default=class{constructor(e,t,o,s,a,l){(0,i.default)(this,"wot",null),(0,i.default)(this,"topOverlay",null),(0,i.default)(this,"bottomOverlay",null),(0,i.default)(this,"inlineStartOverlay",null),(0,i.default)(this,"topInlineStartCornerOverlay",null),(0,i.default)(this,"bottomInlineStartCornerOverlay",null),(0,i.default)(this,"browserLineHeight",void 0),(0,i.default)(this,"wtSettings",null),(0,i.default)(this,"resizeObserver",new ResizeObserver((e=>{(0,n.requestAnimationFrame)((()=>{Array.isArray(e)&&e.length&&this.wtSettings.getSetting("onContainerElementResize")}))}))),this.wot=e,this.wtSettings=s,this.domBindings=o,this.facadeGetter=t,this.wtTable=l;const{rootDocument:h,rootWindow:u}=this.domBindings;this.instance=this.wot,this.eventManager=a,this.scrollbarSize=(0,r.getScrollbarWidth)(h);const d="hidden"===u.getComputedStyle(l.wtRootElement.parentNode).getPropertyValue("overflow");this.scrollableElement=d?l.holder:(0,r.getScrollableElement)(l.TABLE),this.initOverlays(),this.hasScrollbarBottom=!1,this.hasScrollbarRight=!1,this.destroyed=!1,this.keyPressed=!1,this.spreaderLastSize={width:null,height:null},this.verticalScrolling=!1,this.horizontalScrolling=!1,this.initBrowserLineHeight(),this.registerListeners(),this.lastScrollX=u.scrollX,this.lastScrollY=u.scrollY}getOverlays(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=[this.topOverlay,this.topInlineStartCornerOverlay,this.inlineStartOverlay,this.bottomOverlay,this.bottomInlineStartCornerOverlay];return e&&t.push(this.wtTable),t}initBrowserLineHeight(){const{rootWindow:e,rootDocument:t}=this.domBindings,o=e.getComputedStyle(t.body),s=parseInt(o.lineHeight,10),i=1.2*parseInt(o.fontSize,10);this.browserLineHeight=s||i}initOverlays(){const e=[this.wot,this.facadeGetter,this.wtSettings,this.domBindings];this.topOverlay=new u.TopOverlay(...e),this.bottomOverlay=new u.BottomOverlay(...e),this.inlineStartOverlay=new u.InlineStartOverlay(...e),this.topInlineStartCornerOverlay=new u.TopInlineStartCornerOverlay(...e,this.topOverlay,this.inlineStartOverlay),this.bottomInlineStartCornerOverlay=new u.BottomInlineStartCornerOverlay(...e,this.bottomOverlay,this.inlineStartOverlay)}updateStateOfRendering(){let e=this.topOverlay.updateStateOfRendering();return e=this.bottomOverlay.updateStateOfRendering()||e,e=this.inlineStartOverlay.updateStateOfRendering()||e,this.inlineStartOverlay.needFullRender&&(this.topOverlay.needFullRender&&(e=this.topInlineStartCornerOverlay.updateStateOfRendering()||e),this.bottomOverlay.needFullRender&&(e=this.bottomInlineStartCornerOverlay.updateStateOfRendering()||e)),e}refreshAll(){this.wot.drawn&&(this.wtTable.holder.parentNode?(this.wot.draw(!0),this.verticalScrolling&&this.inlineStartOverlay.onScroll(),this.horizontalScrolling&&this.topOverlay.onScroll(),this.verticalScrolling=!1,this.horizontalScrolling=!1):this.destroy())}registerListeners(){const{rootDocument:e,rootWindow:t}=this.domBindings,{mainTableScrollableElement:o}=this.topOverlay,{mainTableScrollableElement:s}=this.inlineStartOverlay;this.eventManager.addEventListener(e.documentElement,"keydown",(e=>this.onKeyDown(e))),this.eventManager.addEventListener(e.documentElement,"keyup",(()=>this.onKeyUp())),this.eventManager.addEventListener(e,"visibilitychange",(()=>this.onKeyUp())),this.eventManager.addEventListener(o,"scroll",(e=>this.onTableScroll(e)),{passive:!0}),o!==s&&this.eventManager.addEventListener(s,"scroll",(e=>this.onTableScroll(e)),{passive:!0});const i=t.devicePixelRatio&&t.devicePixelRatio>1,r=this.scrollableElement===t,n=this.wtSettings.getSetting("preventWheel"),a={passive:r};(n||i||!(0,h.isChrome)())&&this.eventManager.addEventListener(this.wtTable.wtRootElement,"wheel",(e=>this.onCloneWheel(e,n)),a);let l;[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay].forEach((e=>{if(e&&e.needFullRender){const{holder:t}=e.clone.wtTable;this.eventManager.addEventListener(t,"wheel",(e=>this.onCloneWheel(e,n)),a)}})),this.eventManager.addEventListener(t,"resize",(()=>{clearTimeout(l),l=setTimeout((()=>{this.wtSettings.getSetting("onWindowResize")}),200)})),r||this.resizeObserver.observe(this.wtTable.wtRootElement.parentElement)}deregisterListeners(){this.eventManager.clearEvents(!0)}onTableScroll(e){const t=this.domBindings.rootWindow,o=this.inlineStartOverlay.mainTableScrollableElement,s=this.topOverlay.mainTableScrollableElement,i=e.target;this.keyPressed&&(s!==t&&i!==t&&!e.target.contains(s)||o!==t&&i!==t&&!e.target.contains(o))||this.syncScrollPositions(e)}onCloneWheel(e,t){const{rootWindow:o}=this.domBindings,s=this.inlineStartOverlay.mainTableScrollableElement,i=this.topOverlay.mainTableScrollableElement,r=e.target,n=i!==o&&r!==o&&!r.contains(i),a=s!==o&&r!==o&&!r.contains(s);if(this.keyPressed&&(n||a))return;const l=this.translateMouseWheelToScroll(e);(t||this.scrollableElement!==o&&l)&&e.preventDefault()}onKeyDown(e){this.keyPressed=(0,l.isKey)(e.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")}onKeyUp(){this.keyPressed=!1}translateMouseWheelToScroll(e){let t=isNaN(e.deltaY)?-1*e.wheelDeltaY:e.deltaY,o=isNaN(e.deltaX)?-1*e.wheelDeltaX:e.deltaX;1===e.deltaMode&&(o+=o*this.browserLineHeight,t+=t*this.browserLineHeight);const s=this.scrollVertically(t),i=this.scrollHorizontally(o);return s||i}scrollVertically(e){const t=this.scrollableElement.scrollTop;return this.scrollableElement.scrollTop+=e,t!==this.scrollableElement.scrollTop}scrollHorizontally(e){const t=this.scrollableElement.scrollLeft;return this.scrollableElement.scrollLeft+=e,t!==this.scrollableElement.scrollLeft}syncScrollPositions(){if(this.destroyed)return;const{rootWindow:e}=this.domBindings,t=this.topOverlay.clone.wtTable.holder,o=this.inlineStartOverlay.clone.wtTable.holder,[s,i]=[this.scrollableElement.scrollLeft,this.scrollableElement.scrollTop];if(this.horizontalScrolling=t.scrollLeft!==s||this.lastScrollX!==e.scrollX,this.verticalScrolling=o.scrollTop!==i||this.lastScrollY!==e.scrollY,this.lastScrollX=e.scrollX,this.lastScrollY=e.scrollY,this.horizontalScrolling){t.scrollLeft=s;const e=this.bottomOverlay.needFullRender?this.bottomOverlay.clone.wtTable.holder:null;e&&(e.scrollLeft=s)}this.verticalScrolling&&(o.scrollTop=i),this.refreshAll()}syncScrollWithMaster(){const e=this.topOverlay.mainTableScrollableElement,{scrollLeft:t,scrollTop:o}=e;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=t),this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=t),this.inlineStartOverlay.needFullRender&&(this.inlineStartOverlay.clone.wtTable.holder.scrollTop=o)}updateMainScrollableElements(){this.deregisterListeners(),this.inlineStartOverlay.updateMainScrollableElement(),this.topOverlay.updateMainScrollableElement(),this.bottomOverlay.needFullRender&&this.bottomOverlay.updateMainScrollableElement();const{wtTable:e}=this,{rootWindow:t}=this.domBindings;"hidden"===t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow")?this.scrollableElement=e.holder:this.scrollableElement=(0,r.getScrollableElement)(e.TABLE),this.registerListeners()}destroy(){this.resizeObserver.disconnect(),this.eventManager.destroy(),this.topOverlay.destroy(),this.bottomOverlay.clone&&this.bottomOverlay.destroy(),this.inlineStartOverlay.destroy(),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.destroy(),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.destroy(),this.destroyed=!0}refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.updateLastSpreaderSize()&&this.adjustElementsSize(),this.bottomOverlay.clone&&this.bottomOverlay.refresh(e),this.inlineStartOverlay.refresh(e),this.topOverlay.refresh(e),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.refresh(e),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.refresh(e)}updateLastSpreaderSize(){const e=this.wtTable.spreader,t=e.clientWidth,o=e.clientHeight,s=t!==this.spreaderLastSize.width||o!==this.spreaderLastSize.height;return s&&(this.spreaderLastSize.width=t,this.spreaderLastSize.height=o),s}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtViewport:t}=this.wot,{wtTable:o}=this,s=this.wtSettings.getSetting("totalColumns"),i=this.wtSettings.getSetting("totalRows"),r=t.getRowHeaderWidth(),n=t.getColumnHeaderHeight(),a=o.hider.style;if(a.width=`${r+this.inlineStartOverlay.sumCellSizes(0,s)}px`,a.height=`${n+this.topOverlay.sumCellSizes(0,i)+1}px`,this.scrollbarSize>0){const{scrollHeight:e,scrollWidth:t}=o.wtRootElement,{scrollHeight:s,scrollWidth:i}=o.holder;this.hasScrollbarRight=e<s,this.hasScrollbarBottom=t<i,this.hasScrollbarRight&&o.hider.scrollWidth+this.scrollbarSize>t?this.hasScrollbarBottom=!0:this.hasScrollbarBottom&&o.hider.scrollHeight+this.scrollbarSize>e&&(this.hasScrollbarRight=!0)}this.topOverlay.adjustElementsSize(e),this.inlineStartOverlay.adjustElementsSize(e),this.bottomOverlay.adjustElementsSize(e)}applyToDOM(){this.wtTable.isVisible()&&(this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.inlineStartOverlay.applyToDOM())}getParentOverlay(e){if(!e)return null;const t=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];let o=null;return(0,a.arrayEach)(t,(t=>{t&&t.clone&&t.clone.wtTable.TABLE.contains(e)&&(o=t.clone)})),o}syncOverlayTableClassNames(){const e=this.wtTable.TABLE,t=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];(0,a.arrayEach)(t,(t=>{t&&(t.clone.wtTable.TABLE.className=e.className)}))}}},46593:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=s(o(94191));t.default=class{constructor(e,t){(0,i.default)(this,"nodesPool",null),(0,i.default)(this,"nodeType",void 0),(0,i.default)(this,"rootNode",void 0),(0,i.default)(this,"table",null),(0,i.default)(this,"renderedNodes",0),this.nodesPool="string"==typeof e?new r.default(e):null,this.nodeType=e,this.rootNode=t}setTable(e){this.nodesPool&&this.nodesPool.setRootDocument(e.rootDocument),this.table=e}adjust(){}render(){}}},91767:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(83302),n=o(1909),a=s(o(46593)),l=o(5386);class h extends a.default{constructor(){super("TD"),(0,i.default)(this,"orderViews",new WeakMap),(0,i.default)(this,"sourceRowIndex",0)}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new n.SharedOrderView(e,(e=>this.nodesPool.obtain(this.sourceRowIndex,e)),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,columnsToRender:t,rows:o,rowHeaders:s}=this.table;for(let a=0;a<e;a++){const e=this.table.renderedRowToSource(a),h=o.getRenderedNode(a);this.sourceRowIndex=e;const u=this.obtainOrderView(h),d=s.obtainOrderView(h);u.prependView(d).setSize(t).setOffset(this.table.renderedColumnToSource(0)).start();for(let o=0;o<t;o++){u.render();const t=u.getCurrentNode(),s=this.table.renderedColumnToSource(o);var i,n;if((0,r.hasClass)(t,"hide")||(t.className=""),t.removeAttribute("style"),t.removeAttribute("dir"),(0,r.removeAttribute)(t,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.cellRenderer(e,s,t),this.table.isAriaEnabled())(0,r.setAttribute)(t,[...t.hasAttribute("role")?[]:[(0,l.A11Y_GRIDCELL)()],(0,l.A11Y_TABINDEX)(-1),(0,l.A11Y_COLINDEX)(s+(null!==(i=null===(n=this.table.rowUtils)||void 0===n||null===(n=n.dataAccessObject)||void 0===n?void 0:n.rowHeaders.length)&&void 0!==i?i:0)+1)])}u.end()}}}t.default=h},84888:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(46593)),r=o(69173),n=o(28236),a=o(83302);let l=!1;class h extends i.default{constructor(e){super(null,e)}adjust(){const{columnsToRender:e,rowHeadersCount:t}=this.table,o=e+t;for(;this.renderedNodes<o;)this.rootNode.appendChild(this.table.rootDocument.createElement("col")),this.renderedNodes+=1;for(;this.renderedNodes>o;)this.rootNode.removeChild(this.rootNode.lastChild),this.renderedNodes-=1}render(){this.adjust();const{columnsToRender:e,rowHeadersCount:t}=this.table;!l&&e>1e3&&(l=!0,(0,r.warn)(n.toSingleLine`Performance tip: Handsontable rendered more than 1000 visible columns.\x20
32
+ Consider limiting the number of rendered columns by specifying the table width and/or\x20
33
+ turning off the "renderAllColumns" option.`));for(let e=0;e<t;e++){const t=this.table.renderedColumnToSource(e),o=this.table.columnUtils.getHeaderWidth(t);this.rootNode.childNodes[e].style.width=`${o}px`}for(let o=0;o<e;o++){const e=this.table.renderedColumnToSource(o),s=this.table.columnUtils.getStretchedColumnWidth(e);this.rootNode.childNodes[o+t].style.width=`${s}px`}const o=this.rootNode.firstChild;o&&(0,a.addClass)(o,"rowHeader")}}t.default=h},90802:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=o(83302),r=s(o(46593)),n=o(5386);class a extends r.default{constructor(e){super(null,e)}adjust(){const{columnHeadersCount:e,rowHeadersCount:t}=this.table;let o=this.rootNode.firstChild;if(e){const{columnsToRender:s}=this.table,i=s+t;for(let t=0,s=e;t<s;t++){for(o=this.rootNode.childNodes[t],o||(o=this.table.rootDocument.createElement("tr"),this.rootNode.appendChild(o)),this.renderedNodes=o.childNodes.length;this.renderedNodes<i;)o.appendChild(this.table.rootDocument.createElement("th")),this.renderedNodes+=1;for(;this.renderedNodes>i;)o.removeChild(o.lastChild),this.renderedNodes-=1}const r=this.rootNode.childNodes.length;if(r>e)for(let t=e;t<r;t++)this.rootNode.removeChild(this.rootNode.lastChild)}else o&&(0,i.empty)(o)}render(){const{columnHeadersCount:e}=this.table;this.table.isAriaEnabled()&&(0,i.setAttribute)(this.rootNode,[(0,n.A11Y_ROWGROUP)()]);for(let t=0;t<e;t+=1){const{columnHeaderFunctions:e,columnsToRender:o,rowHeadersCount:s}=this.table,r=this.rootNode.childNodes[t];this.table.isAriaEnabled()&&(0,i.setAttribute)(r,[(0,n.A11Y_ROW)(),(0,n.A11Y_ROWINDEX)(t+1)]);for(let a=-1*s;a<o;a+=1){const o=this.table.renderedColumnToSource(a),l=r.childNodes[a+s];l.className="",l.removeAttribute("style"),(0,i.removeAttribute)(l,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&(0,i.setAttribute)(l,[(0,n.A11Y_COLINDEX)(a+1+this.table.rowHeadersCount),(0,n.A11Y_TABINDEX)(-1),(0,n.A11Y_COLUMNHEADER)(),...a>=0?[(0,n.A11Y_SCOPE_COL)()]:[(0,n.A11Y_ROW)()]]),e[t](o,l,t)}}}}t.default=a},96649:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(68384));t.RowHeadersRenderer=i.default;var r=s(o(90802));t.ColumnHeadersRenderer=r.default;var n=s(o(84888));t.ColGroupRenderer=n.default;var a=s(o(77267));t.RowsRenderer=a.default;var l=s(o(91767));t.CellsRenderer=l.default;var h=s(o(46538));t.TableRenderer=h.default;t.Renderer=class{constructor(){let{TABLE:e,THEAD:t,COLGROUP:o,TBODY:s,rowUtils:u,columnUtils:d,cellRenderer:c}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderer=new h.default(e,{cellRenderer:c}),this.renderer.setRenderers({rowHeaders:new i.default,columnHeaders:new r.default(t),colGroup:new n.default(o),rows:new a.default(s),cells:new l.default}),this.renderer.setAxisUtils(u,d)}setFilters(e,t){return this.renderer.setFilters(e,t),this}setViewportSize(e,t){return this.renderer.setViewportSize(e,t),this}setHeaderContentRenderers(e,t){return this.renderer.setHeaderContentRenderers(e,t),this}adjust(){this.renderer.adjust()}render(){this.renderer.render()}}},68384:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(1909),n=s(o(46593)),a=o(83302),l=o(5386);class h extends n.default{constructor(){super("TH"),(0,i.default)(this,"orderViews",new WeakMap),(0,i.default)(this,"sourceRowIndex",0)}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new r.SharedOrderView(e,(e=>this.nodesPool.obtain(this.sourceRowIndex,e)),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,rowHeaderFunctions:t,rowHeadersCount:o,rows:s,cells:i}=this.table;for(let r=0;r<e;r++){const e=this.table.renderedRowToSource(r),n=s.getRenderedNode(r);this.sourceRowIndex=e;const h=this.obtainOrderView(n),u=i.obtainOrderView(n);h.appendView(u).setSize(o).setOffset(this.table.renderedColumnToSource(0)).start();for(let s=0;s<o;s++){h.render();const o=h.getCurrentNode();o.className="",o.removeAttribute("style"),(0,a.removeAttribute)(o,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&(0,a.setAttribute)(o,[(0,l.A11Y_ROWHEADER)(),(0,l.A11Y_SCOPE_ROW)(),(0,l.A11Y_COLINDEX)(s+1),(0,l.A11Y_TABINDEX)(-1)]),t[s](e,o,s)}h.end()}}}t.default=h},77267:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=s(o(46593)),n=o(69173),a=o(28236),l=o(1909),h=o(83302),u=o(5386);let d=!1;class c extends r.default{constructor(e){super("TR",e),(0,i.default)(this,"orderView",void 0),this.orderView=new l.OrderView(e,(e=>this.nodesPool.obtain(e)),this.nodeType)}getRenderedNode(e){return this.orderView.getNode(e)}render(){const{rowsToRender:e}=this.table;!d&&e>1e3&&(d=!0,(0,n.warn)(a.toSingleLine`Performance tip: Handsontable rendered more than 1000 visible rows.\x20
34
+ Consider limiting the number of rendered rows by specifying the table height and/or\x20
35
+ turning off the "renderAllRows" option.`)),this.table.isAriaEnabled()&&(0,h.setAttribute)(this.rootNode,[(0,u.A11Y_ROWGROUP)()]),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(let s=0;s<e;s++){this.orderView.render();const e=this.orderView.getCurrentNode(),i=this.table.renderedRowToSource(s);var t,o;if(this.table.isAriaEnabled())(0,h.setAttribute)(e,[(0,u.A11Y_ROW)(),(0,u.A11Y_ROWINDEX)(i+(null!==(t=null===(o=this.table.rowUtils)||void 0===o||null===(o=o.dataAccessObject)||void 0===o?void 0:o.columnHeaders.length)&&void 0!==t?t:0)+1)])}this.orderView.end()}}t.default=c},46538:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231));t.default=class{constructor(e){let{cellRenderer:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,i.default)(this,"rootNode",void 0),(0,i.default)(this,"rootDocument",void 0),(0,i.default)(this,"rowHeaders",null),(0,i.default)(this,"columnHeaders",null),(0,i.default)(this,"colGroup",null),(0,i.default)(this,"rows",null),(0,i.default)(this,"cells",null),(0,i.default)(this,"rowFilter",null),(0,i.default)(this,"columnFilter",null),(0,i.default)(this,"rowUtils",null),(0,i.default)(this,"columnUtils",null),(0,i.default)(this,"rowsToRender",0),(0,i.default)(this,"columnsToRender",0),(0,i.default)(this,"rowHeaderFunctions",[]),(0,i.default)(this,"rowHeadersCount",0),(0,i.default)(this,"columnHeaderFunctions",[]),(0,i.default)(this,"columnHeadersCount",0),(0,i.default)(this,"cellRenderer",void 0),this.rootNode=e,this.rootDocument=this.rootNode.ownerDocument,this.cellRenderer=t}setAxisUtils(e,t){this.rowUtils=e,this.columnUtils=t}setViewportSize(e,t){this.rowsToRender=e,this.columnsToRender=t}setFilters(e,t){this.rowFilter=e,this.columnFilter=t}setHeaderContentRenderers(e,t){this.rowHeaderFunctions=e,this.rowHeadersCount=e.length,this.columnHeaderFunctions=t,this.columnHeadersCount=t.length}setRenderers(){let{rowHeaders:e,columnHeaders:t,colGroup:o,rows:s,cells:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.setTable(this),t.setTable(this),o.setTable(this),s.setTable(this),i.setTable(this),this.rowHeaders=e,this.columnHeaders=t,this.colGroup=o,this.rows=s,this.cells=i}renderedRowToSource(e){return this.rowFilter.renderedToSource(e)}renderedColumnToSource(e){return this.columnFilter.renderedToSource(e)}isAriaEnabled(){return this.rowUtils.wtSettings.getSetting("ariaTags")}render(){this.colGroup.adjust(),this.columnHeaders.adjust(),this.rows.adjust(),this.rowHeaders.adjust(),this.columnHeaders.render(),this.rows.render(),this.rowHeaders.render(),this.cells.render(),this.columnUtils.calculateWidths(),this.colGroup.render();const{rowsToRender:e,rows:t}=this;for(let o=0;o<e;o++){const e=t.getRenderedNode(o);if(e.firstChild){const t=this.renderedRowToSource(o),s=this.rowUtils.getHeight(t);e.firstChild.style.height=s?s-1+"px":""}}}}},52188:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(83302);t.default=class{constructor(e){(0,i.default)(this,"dataAccessObject",void 0),(0,i.default)(this,"lastScrolledColumnPos",-1),(0,i.default)(this,"lastScrolledRowPos",-1),this.dataAccessObject=e}scrollViewport(e,t,o,s,i){const r=this.scrollViewportHorizontally(e.col,o,i),n=this.scrollViewportVertically(e.row,t,s);return r||n}scrollViewportHorizontally(e,t,o){const{drawn:s,totalColumns:i}=this.dataAccessObject;if(!s||!Number.isInteger(e)||e<0||e>i)return!1;const r=this.getFirstVisibleColumn(),n=this.getLastVisibleColumn(),a=void 0===t&&void 0===o,{fixedColumnsStart:l,inlineStartOverlay:h}=this.dataAccessObject;if(a&&e<l)return!1;let u=!1;return e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollHorizontally",e),-1===r?u=h.scrollTo(e,a?e>this.lastScrolledColumnPos:t):(a&&(e<r||e>n)||!a)&&(u=h.scrollTo(e,a?e>n:t)),u&&(this.lastScrolledColumnPos=e),u}scrollViewportVertically(e,t,o){const{drawn:s,totalRows:i}=this.dataAccessObject;if(!s||!Number.isInteger(e)||e<0||e>i)return!1;const r=this.getFirstVisibleRow(),n=this.getLastVisibleRow(),a=void 0===t&&void 0===o,{fixedRowsBottom:l,fixedRowsTop:h,topOverlay:u}=this.dataAccessObject;if(a&&(e<h||e>i-l-1))return!1;let d=!1;return e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollVertically",e),-1===r?d=u.scrollTo(e,a?e>this.lastScrolledRowPos:o):(a&&(e<r||e>n)||!a)&&(d=u.scrollTo(e,a?e>n:o)),d&&(this.lastScrolledRowPos=e),d}getFirstVisibleRow(){return this.dataAccessObject.wtTable.getFirstVisibleRow()}getLastVisibleRow(){const{topOverlay:e,wtTable:t,wtViewport:o,totalRows:s,rootWindow:i}=this.dataAccessObject;let n=t.getLastVisibleRow();if(e.mainTableScrollableElement===i){const a=(0,r.offset)(t.wtRootElement),l=(0,r.getScrollTop)(i,i);if(a.top>l){const t=(0,r.innerHeight)(i);let h=o.getColumnHeaderHeight();for(let o=1;o<=s;o++)if(h+=e.sumCellSizes(o-1,o),a.top+h-l>=t){n=o-2;break}}}return n}getFirstVisibleColumn(){return this.dataAccessObject.wtTable.getFirstVisibleColumn()}getLastVisibleColumn(){const{wtSettings:e,inlineStartOverlay:t,wtTable:o,wtViewport:s,totalColumns:i,rootWindow:n}=this.dataAccessObject;let a=o.getLastVisibleColumn();if(t.mainTableScrollableElement===n){let l=null;if(e.getSetting("rtlMode")){const e=o.TABLE.getBoundingClientRect(),t=this.dataAccessObject.rootWindow.document.documentElement.offsetWidth;l=Math.abs(e.right-t)}else{l=(0,r.offset)(o.wtRootElement).left}const h=Math.abs((0,r.getScrollLeft)(n,n));if(l>h){const e=(0,r.innerWidth)(n);let o=s.getRowHeaderWidth();for(let s=1;s<=i;s++)if(o+=t.sumCellSizes(s-1,s),l+o-h>=e){a=s-2;break}}}return a}}},67175:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(83302),i=o(24449),r=o(22232),n=o(37595),a=o(97132);t.default=class{constructor(e,t){t&&(this.eventManager=e.eventManager,this.instance=e,this.wot=e,this.settings=t,this.mouseDown=!1,this.main=null,this.top=null,this.bottom=null,this.start=null,this.end=null,this.topStyle=null,this.bottomStyle=null,this.startStyle=null,this.endStyle=null,this.cornerDefaultStyle=a.CORNER_DEFAULT_STYLE,this.cornerCenterPointOffset=-parseInt(this.cornerDefaultStyle.width,10)/2,this.corner=null,this.cornerStyle=null,this.createBorders(t),this.registerListeners())}registerListeners(){const e=this.wot.rootDocument.body;this.eventManager.addEventListener(e,"mousedown",(()=>this.onMouseDown())),this.eventManager.addEventListener(e,"mouseup",(()=>this.onMouseUp()));for(let e=0,t=this.main.childNodes.length;e<t;e++){const t=this.main.childNodes[e];this.eventManager.addEventListener(t,"mouseenter",(t=>this.onMouseEnter(t,this.main.childNodes[e])))}}onMouseDown(){this.mouseDown=!0}onMouseUp(){this.mouseDown=!1}onMouseEnter(e,t){if(!this.mouseDown||!this.wot.getSetting("hideBorderOnMouseDownOver"))return;e.preventDefault(),(0,i.stopImmediatePropagation)(e);const o=this,s=this.wot.rootDocument.body,r=t.getBoundingClientRect();t.style.display="none",this.eventManager.addEventListener(s,"mousemove",(function e(i){var n;((n=i).clientY<Math.floor(r.top)||n.clientY>Math.ceil(r.top+r.height)||n.clientX<Math.floor(r.left)||n.clientX>Math.ceil(r.left+r.width))&&(o.eventManager.removeEventListener(s,"mousemove",e),t.style.display="block")}))}createBorders(e){const{rootDocument:t}=this.wot;this.main=t.createElement("div");const o=["top","start","bottom","end","corner"];let s=this.main.style;s.position="absolute",s.top=0,s.left=0;for(let i=0;i<5;i++){const r=o[i],n=t.createElement("div");n.className=`wtBorder ${this.settings.className||""}`,this.settings[r]&&this.settings[r].hide&&(n.className+=" hidden"),s=n.style,s.backgroundColor=this.settings[r]&&this.settings[r].color?this.settings[r].color:e.border.color,s.height=this.settings[r]&&this.settings[r].width?`${this.settings[r].width}px`:`${e.border.width}px`,s.width=this.settings[r]&&this.settings[r].width?`${this.settings[r].width}px`:`${e.border.width}px`,this.main.appendChild(n)}this.top=this.main.childNodes[0],this.start=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.end=this.main.childNodes[3],this.topStyle=this.top.style,this.startStyle=this.start.style,this.bottomStyle=this.bottom.style,this.endStyle=this.end.style,this.corner=this.main.childNodes[4],this.corner.className+=" corner",this.cornerStyle=this.corner.style,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.height=this.cornerDefaultStyle.height,this.cornerStyle.border=[this.cornerDefaultStyle.borderWidth,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),(0,n.isMobileBrowser)()&&this.createMultipleSelectorHandles(),this.disappear();const{wtTable:i}=this.wot;let r=i.bordersHolder;r||(r=t.createElement("div"),r.className="htBorders",i.bordersHolder=r,i.spreader.appendChild(r)),r.appendChild(this.main)}createMultipleSelectorHandles(){const{rootDocument:e}=this.wot;this.selectionHandles={top:e.createElement("DIV"),topHitArea:e.createElement("DIV"),bottom:e.createElement("DIV"),bottomHitArea:e.createElement("DIV")};this.selectionHandles.top.className="topSelectionHandle topLeftSelectionHandle",this.selectionHandles.topHitArea.className="topSelectionHandle-HitArea topLeftSelectionHandle-HitArea",this.selectionHandles.bottom.className="bottomSelectionHandle bottomRightSelectionHandle",this.selectionHandles.bottomHitArea.className="bottomSelectionHandle-HitArea bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={top:this.selectionHandles.top.style,topHitArea:this.selectionHandles.topHitArea.style,bottom:this.selectionHandles.bottom.style,bottomHitArea:this.selectionHandles.bottomHitArea.style};const t={position:"absolute",height:"40px",width:"40px","border-radius":`${parseInt(40/1.5,10)}px`};(0,r.objectEach)(t,((e,t)=>{this.selectionHandles.styles.bottomHitArea[t]=e,this.selectionHandles.styles.topHitArea[t]=e}));const o={position:"absolute",height:"10px",width:"10px","border-radius":`${parseInt(10/1.5,10)}px`,background:"#F5F5FF",border:"1px solid #4285c8"};(0,r.objectEach)(o,((e,t)=>{this.selectionHandles.styles.bottom[t]=e,this.selectionHandles.styles.top[t]=e})),this.main.appendChild(this.selectionHandles.top),this.main.appendChild(this.selectionHandles.bottom),this.main.appendChild(this.selectionHandles.topHitArea),this.main.appendChild(this.selectionHandles.bottomHitArea)}isPartRange(e,t){const o=this.wot.selectionManager.getAreaSelection();return!(!o.cellRange||e===o.cellRange.to.row&&t===o.cellRange.to.col)}updateMultipleSelectionHandlesPosition(e,t,o,s,i,r){const n=this.wot.wtSettings.getSetting("rtlMode")?"right":"left",{top:a,topHitArea:l,bottom:h,bottomHitArea:u}=this.selectionHandles.styles,d=parseInt(a.borderWidth,10),c=parseInt(a.width,10),g=parseInt(l.width,10),f=this.wot.wtTable.getWidth(),p=this.wot.wtTable.getHeight();a.top=`${parseInt(o-c-1,10)}px`,a[n]=`${parseInt(s-c-1,10)}px`,l.top=`${parseInt(o-g/4*3,10)}px`,l[n]=`${parseInt(s-g/4*3,10)}px`;const m=Math.min(parseInt(s+i,10),f-c-2*d),w=Math.min(parseInt(s+i-g/4,10),f-g-2*d);h[n]=`${m}px`,u[n]=`${w}px`;const C=Math.min(parseInt(o+r,10),p-c-2*d),v=Math.min(parseInt(o+r-g/4,10),p-g-2*d);h.top=`${C}px`,u.top=`${v}px`,this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(a.display="block",l.display="block",this.isPartRange(e,t)?(h.display="none",u.display="none"):(h.display="block",u.display="block")):(a.display="none",h.display="none",l.display="none",u.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||t===this.wot.wtSettings.getSetting("fixedColumnsStart")?(a.zIndex="9999",l.zIndex="9999"):(a.zIndex="",l.zIndex="")}appear(e){if(this.disabled)return;const{wtTable:t,rootDocument:o,rootWindow:i}=this.wot;let r,a,l,h,u,d;const c=t.getRenderedRowsCount();for(let o=0;o<c;o+=1){const s=t.rowFilter.renderedToSource(o);if(s>=e[0]&&s<=e[2]){r=s,u=e[0];break}}for(let o=c-1;o>=0;o-=1){const s=t.rowFilter.renderedToSource(o);if(s>=e[0]&&s<=e[2]){a=s;break}}const g=t.getRenderedColumnsCount();for(let o=0;o<g;o+=1){const s=t.columnFilter.renderedToSource(o);if(s>=e[1]&&s<=e[3]){l=s,d=e[1];break}}for(let o=g-1;o>=0;o-=1){const s=t.columnFilter.renderedToSource(o);if(s>=e[1]&&s<=e[3]){h=s;break}}if(void 0===r||void 0===l)return void this.disappear();let f=t.getCell(this.wot.createCellCoords(r,l));const p=r!==a||l!==h,m=p?t.getCell(this.wot.createCellCoords(a,h)):f,w=(0,s.offset)(f),C=p?(0,s.offset)(m):w,v=(0,s.offset)(t.TABLE),y=(0,s.outerWidth)(t.TABLE),E=w.top,S=w.left,R=this.wot.wtSettings.getSetting("rtlMode");let b=0,_=0;if(R){const e=(0,s.outerWidth)(f),t=i.innerWidth-v.left-y;_=S+e-C.left,b=i.innerWidth-S-e-t-1}else _=C.left+(0,s.outerWidth)(m)-S,b=S-v.left-1;if(this.isEntireColumnSelected(r,a)){const e=this.getDimensionsFromHeader("columns",l,h,u,v);let t=null;e&&([t,b,_]=e),t&&(f=t)}let T=E-v.top-1,O=C.top+(0,s.outerHeight)(m)-E;if(this.isEntireRowSelected(l,h)){const e=this.getDimensionsFromHeader("rows",r,a,d,v);let t=null;e&&([t,T,O]=e),t&&(f=t)}const M=(0,s.getComputedStyle)(f,i);parseInt(M.borderTopWidth,10)>0&&(T+=1,O=O>0?O-1:0),parseInt(M[R?"borderRightWidth":"borderLeftWidth"],10)>0&&(b+=1,_=_>0?_-1:0);const I=R?"right":"left";this.topStyle.top=`${T}px`,this.topStyle[I]=`${b}px`,this.topStyle.width=`${_}px`,this.topStyle.display="block",this.startStyle.top=`${T}px`,this.startStyle[I]=`${b}px`,this.startStyle.height=`${O}px`,this.startStyle.display="block";const A=Math.floor(this.settings.border.width/2);this.bottomStyle.top=T+O-A+"px",this.bottomStyle[I]=`${b}px`,this.bottomStyle.width=`${_}px`,this.bottomStyle.display="block",this.endStyle.top=`${T}px`,this.endStyle[I]=b+_-A+"px",this.endStyle.height=`${O+1}px`,this.endStyle.display="block";let N=this.settings.border.cornerVisible;N="function"==typeof N?N(this.settings.layerLevel):N;const P=this.wot.getSetting("onModifyGetCellCoords",a,h);let[x,H]=[a,h];if(P&&Array.isArray(P)&&([,,x,H]=P),(0,n.isMobileBrowser)()||!N||this.isPartRange(x,H))this.cornerStyle.display="none";else{this.cornerStyle.top=T+O+this.cornerCenterPointOffset-1+"px",this.cornerStyle[I]=b+_+this.cornerCenterPointOffset-1+"px",this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";let e=(0,s.getTrimmingContainer)(t.TABLE);const r=e===i;r&&(e=o.documentElement);const n=parseInt(this.cornerDefaultStyle.width,10)/2,l=parseInt(this.cornerDefaultStyle.height,10)/2;if(h===this.wot.getSetting("totalColumns")-1){const t=r?m.getBoundingClientRect().left:m.offsetLeft;let o=!1,i=0;R?(i=t-parseInt(this.cornerDefaultStyle.width,10)/2,o=i<0):(i=t+(0,s.outerWidth)(m)+parseInt(this.cornerDefaultStyle.width,10)/2,o=i>=(0,s.innerWidth)(e)),o&&(this.cornerStyle[I]=`${Math.floor(b+_+this.cornerCenterPointOffset-n)}px`,this.cornerStyle[R?"borderLeftWidth":"borderRightWidth"]=0)}if(a===this.wot.getSetting("totalRows")-1){(r?m.getBoundingClientRect().top:m.offsetTop)+(0,s.outerHeight)(m)+parseInt(this.cornerDefaultStyle.height,10)/2>=(0,s.innerHeight)(e)&&(this.cornerStyle.top=`${Math.floor(T+O+this.cornerCenterPointOffset-l)}px`,this.cornerStyle.borderBottomWidth=0)}this.cornerStyle.display="block"}(0,n.isMobileBrowser)()&&this.updateMultipleSelectionHandlesPosition(a,h,T,b,_,O)}isEntireColumnSelected(e,t){return e===this.wot.wtTable.getFirstRenderedRow()&&t===this.wot.wtTable.getLastRenderedRow()}isEntireRowSelected(e,t){return e===this.wot.wtTable.getFirstRenderedColumn()&&t===this.wot.wtTable.getLastRenderedColumn()}getDimensionsFromHeader(e,t,o,i,r){const{wtTable:n}=this.wot,a=n.wtRootElement.parentNode;let l=null,h=null,u=null,d=null,c=null,g=null,f=null,p=null;switch(e){case"rows":l=function(){return n.getRowHeader(...arguments)},h=function(){return(0,s.outerHeight)(...arguments)},u="ht__selection--rows",g="top";break;case"columns":l=function(){return n.getColumnHeader(...arguments)},h=function(){return(0,s.outerWidth)(...arguments)},u="ht__selection--columns",g="left"}if(a.classList.contains(u)){const e=this.wot.getSetting("columnHeaders").length;if(f=l(t,e-i),p=l(o,e-i),!f||!p)return!1;const n=(0,s.offset)(f),a=(0,s.offset)(p);return f&&p&&(d=n[g]-r[g]-1,c=a[g]+h(p)-n[g]),[f,d,c]}return!1}changeBorderStyle(e,t){const o=this[e].style,i=t[e];!i||i.hide?(0,s.addClass)(this[e],"hidden"):((0,s.hasClass)(this[e],"hidden")&&(0,s.removeClass)(this[e],"hidden"),o.backgroundColor=i.color,"top"!==e&&"bottom"!==e||(o.height=`${i.width}px`),"start"!==e&&"end"!==e||(o.width=`${i.width}px`))}changeBorderToDefaultStyle(e){const t=1,o="#000",s=this[e].style;s.backgroundColor=o,s.width=`${t}px`,s.height=`${t}px`}toggleHiddenClass(e,t){this.changeBorderToDefaultStyle(e),t?(0,s.addClass)(this[e],"hidden"):(0,s.removeClass)(this[e],"hidden")}disappear(){this.topStyle.display="none",this.bottomStyle.display="none",this.startStyle.display="none",this.endStyle.display="none",this.cornerStyle.display="none",(0,n.isMobileBrowser)()&&(this.selectionHandles.styles.top.display="none",this.selectionHandles.styles.topHitArea.display="none",this.selectionHandles.styles.bottom.display="none",this.selectionHandles.styles.bottomHitArea.display="none")}destroy(){this.eventManager.destroyWithOwnEventsOnly(),this.main.parentNode.removeChild(this.main)}}},97132:(e,t)=>{"use strict";t.__esModule=!0;t.CORNER_DEFAULT_STYLE=Object.freeze({width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"})},23009:(e,t)=>{"use strict";t.__esModule=!0;t.ACTIVE_HEADER_TYPE="active-header",t.HEADER_TYPE="header",t.AREA_TYPE="area",t.FOCUS_TYPE="focus",t.FILL_TYPE="fill",t.ROW_TYPE="row",t.COLUMN_TYPE="column",t.CUSTOM_SELECTION_TYPE="custom-selection"},88361:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i={SelectionManager:!0,Selection:!0},r=s(o(33468));t.Selection=r.default;var n=o(23009);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===n[e]||(t[e]=n[e]))}));var a=o(97132);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===a[e]||(t[e]=a[e]))}));var l=o(86143);t.SelectionManager=l.SelectionManager},86143:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517),o(9815);var i=s(o(42538)),r=s(o(48427)),n=o(83302),a=o(7161),l=s(o(67175));function h(e,t,o){u(e,t),t.set(e,o)}function u(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}var d=new WeakMap,c=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,w=new WeakSet;function C(){const e=(0,i.default)(this,f).get((0,i.default)(this,d)),t=(0,i.default)(this,d).wtSettings.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(t))for(let o=0;o<t.length;o++)e.add(t[o]);e.forEach((e=>{var t,o;const s=(0,i.default)(this,d).wtTable.TABLE.querySelectorAll(`.${e}`);let r=[];Array.isArray(null===(t=(0,i.default)(this,c).options)||void 0===t?void 0:t.cellAttributes)&&(r=(0,i.default)(this,c).options.cellAttributes.map((e=>e[0]))),Array.isArray(null===(o=(0,i.default)(this,c).options)||void 0===o?void 0:o.headerAttributes)&&(r=[...r,...(0,i.default)(this,c).options.headerAttributes.map((e=>e[0]))]);for(let t=0,o=s.length;t<o;t++)(0,n.removeClass)(s[t],e),(0,n.removeAttribute)(s[t],r)})),e.clear()}t.SelectionManager=class{constructor(e){var t,o;u(t=this,o=w),o.add(t),h(this,d,{writable:!0,value:void 0}),h(this,c,{writable:!0,value:void 0}),h(this,g,{writable:!0,value:new a.SelectionScanner}),h(this,f,{writable:!0,value:new WeakMap}),h(this,p,{writable:!0,value:new WeakSet}),h(this,m,{writable:!0,value:new Map}),(0,r.default)(this,c,e)}setActiveOverlay(e){return(0,r.default)(this,d,e),(0,i.default)(this,g).setActiveOverlay((0,i.default)(this,d)),(0,i.default)(this,f).has((0,i.default)(this,d))||(0,i.default)(this,f).set((0,i.default)(this,d),new Set),this}getFocusSelection(){return null!==(0,i.default)(this,c)?(0,i.default)(this,c).getFocus():null}getAreaSelection(){return null!==(0,i.default)(this,c)?(0,i.default)(this,c).createLayeredArea():null}getBorderInstance(e){if(!e.settings.border)return null;if((0,i.default)(this,m).has(e)){const t=(0,i.default)(this,m).get(e);if(t.has((0,i.default)(this,d)))return t.get((0,i.default)(this,d));const o=new l.default((0,i.default)(this,d),e.settings);return t.set((0,i.default)(this,d),o),o}const t=new l.default((0,i.default)(this,d),e.settings);return(0,i.default)(this,m).set(e,new Map([[(0,i.default)(this,d),t]])),t}getBorderInstances(e){var t,o;return Array.from(null!==(t=null===(o=(0,i.default)(this,m).get(e))||void 0===o?void 0:o.values())&&void 0!==t?t:[])}destroyBorders(e){(0,i.default)(this,m).get(e).forEach((e=>e.destroy())),(0,i.default)(this,m).delete(e)}render(e){if(null===(0,i.default)(this,c))return;e&&function(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}(this,w,C).call(this);const t=Array.from((0,i.default)(this,c)),o=new Map,s=new Map;for(let e=0;e<t.length;e++){const r=t[e],{className:n,headerAttributes:a,createLayers:l,selectionType:h}=r.settings;(0,i.default)(this,p).has(r)||((0,i.default)(this,p).add(r),r.addLocalHook("destroy",(()=>this.destroyBorders(r))));const u=this.getBorderInstance(r);if(r.isEmpty()){null==u||u.disappear();continue}if(n){(0,i.default)(this,g).setActiveSelection(r).scan().forEach((e=>{if(o.has(e)){const t=o.get(e);t.has(n)&&!0===l?t.set(n,t.get(n)+1):t.set(n,1)}else o.set(e,new Map([[n,1]]));a&&(s.has(e)||s.set(e,[]),"TH"===e.nodeName&&s.get(e).push(...a))}))}const c=r.getCorners();(0,i.default)(this,d).getSetting("onBeforeDrawBorders",c,h),null==u||u.appear(c)}o.forEach(((e,t)=>{var o;const s=Array.from(e).map((e=>{let[t,o]=e;return 1===o?t:[t,...Array.from({length:o-1},((e,o)=>`${t}-${o+1}`))]})).flat();s.forEach((e=>(0,i.default)(this,f).get((0,i.default)(this,d)).add(e))),(0,n.addClass)(t,s),"TD"===t.nodeName&&Array.isArray(null===(o=(0,i.default)(this,c).options)||void 0===o?void 0:o.cellAttributes)&&(0,n.setAttribute)(t,(0,i.default)(this,c).options.cellAttributes)})),Array.from(s.keys()).forEach((e=>{(0,n.setAttribute)(e,[...s.get(e)])}))}}},7161:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(42538)),r=s(o(48427)),n=o(83302);function a(e,t,o){l(e,t),t.set(e,o)}function l(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function h(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var u=new WeakMap,d=new WeakMap,c=new WeakSet;function g(e){const{wtTable:t}=(0,i.default)(this,d),o=t.getRenderedRowsCount(),s=t.getRenderedColumnsCount();for(let i=0;i<o;i+=1){const o=t.rowFilter.renderedToSource(i);for(let i=0;i<s;i+=1)e(o,t.columnFilter.renderedToSource(i))}}t.SelectionScanner=class{constructor(){var e,t;l(e=this,t=c),t.add(e),a(this,u,{writable:!0,value:void 0}),a(this,d,{writable:!0,value:void 0})}setActiveOverlay(e){return(0,r.default)(this,d,e),this}setActiveSelection(e){return(0,r.default)(this,u,e),this}scan(){const e=(0,i.default)(this,u).settings.selectionType,t=new Set;return"active-header"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e)))):"area"===e?this.scanCellsRange((e=>t.add(e))):"focus"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e))),this.scanCellsRange((e=>t.add(e)))):"fill"===e?this.scanCellsRange((e=>t.add(e))):"header"===e?(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanRowsInHeadersRange((e=>t.add(e)))):"row"===e?(this.scanRowsInHeadersRange((e=>t.add(e))),this.scanRowsInCellsRange((e=>t.add(e)))):"column"===e&&(this.scanColumnsInHeadersRange((e=>t.add(e))),this.scanColumnsInCellsRange((e=>t.add(e)))),t}scanColumnsInHeadersRange(e){const[t,o,s,r]=(0,i.default)(this,u).getCorners(),{wtTable:n}=(0,i.default)(this,d),a=n.getRenderedColumnsCount(),l=n.getColumnHeadersCount();let h=0;for(let c=-n.getRowHeadersCount();c<a;c++){const a=n.columnFilter.renderedToSource(c);if(!(a<o||a>r)){for(let c=-l;c<0;c++){if(c<t||c>s)continue;const g=c+l;let f=n.getColumnHeader(a,g);const p=(0,i.default)(this,d).getSetting("onBeforeHighlightingColumnHeader",a,g,{selectionType:(0,i.default)(this,u).settings.selectionType,columnCursor:h,selectionWidth:r-o+1});null!==p&&(p!==a&&(f=n.getColumnHeader(p,g)),e(f))}h+=1}}}scanRowsInHeadersRange(e){const[t,o,s,r]=(0,i.default)(this,u).getCorners(),{wtTable:n}=(0,i.default)(this,d),a=n.getRenderedRowsCount(),l=n.getRowHeadersCount();let h=0;for(let c=-n.getColumnHeadersCount();c<a;c++){const a=n.rowFilter.renderedToSource(c);if(!(a<t||a>s)){for(let c=-l;c<0;c++){if(c<o||c>r)continue;const g=c+l;let f=n.getRowHeader(a,g);const p=(0,i.default)(this,d).getSetting("onBeforeHighlightingRowHeader",a,g,{selectionType:(0,i.default)(this,u).settings.selectionType,rowCursor:h,selectionHeight:s-t+1});null!==p&&(p!==a&&(f=n.getRowHeader(p,g)),e(f))}h+=1}}}scanCellsRange(e){const[t,o,s,r]=(0,i.default)(this,u).getCorners(),{wtTable:a}=(0,i.default)(this,d);h(this,c,g).call(this,((l,h)=>{if(l>=t&&l<=s&&h>=o&&h<=r){const t=a.getCell((0,i.default)(this,d).createCellCoords(l,h)),o=(0,i.default)(this,d).getSetting("onAfterDrawSelection",l,h,(0,i.default)(this,u).settings.layerLevel);"string"==typeof o&&(0,n.addClass)(t,o),e(t)}}))}scanRowsInCellsRange(e){const[t,,o]=(0,i.default)(this,u).getCorners(),{wtTable:s}=(0,i.default)(this,d);h(this,c,g).call(this,((r,n)=>{if(r>=t&&r<=o){const t=s.getCell((0,i.default)(this,d).createCellCoords(r,n));e(t)}}))}scanColumnsInCellsRange(e){const[,t,,o]=(0,i.default)(this,u).getCorners(),{wtTable:s}=(0,i.default)(this,d);h(this,c,g).call(this,((r,n)=>{if(n>=t&&n<=o){const t=s.getCell((0,i.default)(this,d).createCellCoords(r,n));e(t)}}))}}},33468:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=o(22232),r=s(o(65718));class n{constructor(e,t){this.settings=e,this.cellRange=t||null}isEmpty(){return null===this.cellRange}add(e){return this.isEmpty()?this.cellRange=this.settings.createCellRange(e):this.cellRange.expand(e),this}replace(e,t){if(!this.isEmpty()){if(this.cellRange.from.isEqual(e))return this.cellRange.from=t,!0;if(this.cellRange.to.isEqual(e))return this.cellRange.to=t,!0}return!1}clear(){return this.cellRange=null,this}getCorners(){const e=this.cellRange.getOuterTopStartCorner(),t=this.cellRange.getOuterBottomEndCorner();return[e.row,e.col,t.row,t.col]}destroy(){this.runLocalHooks("destroy")}}(0,i.mixin)(n,r.default);t.default=n},64057:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(83302),n=o(22232);t.default=class{constructor(e){(0,i.default)(this,"settings",{}),(0,i.default)(this,"defaults",Object.freeze(this.getDefaults())),(0,n.objectEach)(this.defaults,((t,o)=>{if(void 0!==e[o])this.settings[o]=e[o];else{if(void 0===t)throw new Error(`A required setting "${o}" was not provided`);this.settings[o]=t}}))}getDefaults(){return{facade:void 0,table:void 0,isDataViewInstance:!0,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,preventOverflow:()=>!1,preventWheel:!1,data:void 0,freezeOverlays:!1,fixedColumnsStart:0,fixedRowsTop:0,fixedRowsBottom:0,shouldRenderInlineStartOverlay:()=>this.getSetting("fixedColumnsStart")>0||this.getSetting("rowHeaders").length>0,shouldRenderTopOverlay:()=>this.getSetting("fixedRowsTop")>0||this.getSetting("columnHeaders").length>0,shouldRenderBottomOverlay:()=>this.getSetting("fixedRowsBottom")>0,minSpareRows:0,rowHeaders:()=>[],columnHeaders:()=>[],totalRows:void 0,totalColumns:void 0,cellRenderer:(e,t,o)=>{const s=this.getSetting("data",e,t);(0,r.fastInnerText)(o,null==s?"":s)},columnWidth(){},rowHeight(){},defaultRowHeight:23,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,onCellMouseDown:null,onCellContextMenu:null,onCellMouseOver:null,onCellMouseOut:null,onCellMouseUp:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeRemoveCellClassNames:null,onAfterDrawSelection:null,onBeforeDrawBorders:null,onBeforeViewportScrollHorizontally:e=>e,onBeforeViewportScrollVertically:e=>e,onScrollHorizontally:null,onScrollVertically:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onBeforeStretchingColumnWidth:e=>e,onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onBeforeHighlightingRowHeader:e=>e,onBeforeHighlightingColumnHeader:e=>e,onWindowResize:null,onContainerElementResize:null,renderAllColumns:!1,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null,rtlMode:!1,ariaTags:!0}}update(e,t){return void 0===t?(0,n.objectEach)(e,((e,t)=>{this.settings[t]=e})):this.settings[e]=t,this}getSetting(e,t,o,s,i){return"function"==typeof this.settings[e]?this.settings[e](t,o,s,i):void 0!==t&&Array.isArray(this.settings[e])?this.settings[e][t]:this.settings[e]}getSettingPure(e){return this.settings[e]}has(e){return!!this.settings[e]}}},45460:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=o(83302),n=o(85015),a=s(o(65946)),l=s(o(22350)),h=o(96649),u=s(o(35863)),d=s(o(72772)),c=o(89381),g=o(5386);t.default=class{constructor(e,t,o,s,n){(0,i.default)(this,"wtSettings",null),(0,i.default)(this,"domBindings",void 0),(0,i.default)(this,"TBODY",null),(0,i.default)(this,"THEAD",null),(0,i.default)(this,"COLGROUP",null),(0,i.default)(this,"hasTableHeight",!0),(0,i.default)(this,"hasTableWidth",!0),(0,i.default)(this,"isTableVisible",!1),(0,i.default)(this,"tableOffset",0),(0,i.default)(this,"holderOffset",0),this.domBindings=o,this.isMaster="master"===n,this.name=n,this.dataAccessObject=e,this.facadeGetter=t,this.wtSettings=s,this.instance=this.dataAccessObject.wot,this.wot=this.dataAccessObject.wot,this.TABLE=o.rootTable,(0,r.removeTextNodes)(this.TABLE),this.spreader=this.createSpreader(this.TABLE),this.hider=this.createHider(this.spreader),this.holder=this.createHolder(this.hider),this.wtRootElement=this.holder.parentNode,this.isMaster&&this.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;const a=this.wtSettings.getSettingPure("rowHeaderWidth");this.wtSettings.update("rowHeaderWidth",(()=>this._modifyRowHeaderWidth(a))),this.rowUtils=new d.default(this.dataAccessObject,this.wtSettings),this.columnUtils=new u.default(this.dataAccessObject,this.wtSettings),this.tableRenderer=new h.Renderer({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wtSettings.getSettingPure("cellRenderer")})}is(e){return this.name===e}fixTableDomTree(){const e=this.domBindings.rootDocument;this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=e.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=e.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=e.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD))}createSpreader(e){const t=e.parentNode;let o;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,r.hasClass)(t,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.className="wtSpreader",t&&t.insertBefore(o,e),o.appendChild(e)),o.style.position="relative",this.wtSettings.getSetting("ariaTags")&&(0,r.setAttribute)(o,[(0,g.A11Y_PRESENTATION)()]),o}createHider(e){const t=e.parentNode;let o;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,r.hasClass)(t,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.className="wtHider",t&&t.insertBefore(o,e),o.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,r.setAttribute)(o,[(0,g.A11Y_PRESENTATION)()]),o}createHolder(e){const t=e.parentNode;let o;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,r.hasClass)(t,"wtHolder")||(o=this.domBindings.rootDocument.createElement("div"),o.style.position="relative",o.className="wtHolder",t&&t.insertBefore(o,e),this.isMaster&&(o.parentNode.className+="ht_master handsontable",o.parentNode.setAttribute("dir",this.wtSettings.getSettingPure("rtlMode")?"rtl":"ltr"),this.wtSettings.getSetting("ariaTags")&&(0,r.setAttribute)(o.parentNode,[(0,g.A11Y_PRESENTATION)()])),o.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,r.setAttribute)(o,[(0,g.A11Y_PRESENTATION)()]),o}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,{wtOverlays:o,wtViewport:s}=this.dataAccessObject,i=t.getSetting("totalRows"),n=t.getSetting("totalColumns"),h=t.getSetting("rowHeaders"),u=h.length,d=t.getSetting("columnHeaders"),g=d.length;let f=!1,p=e;if(this.isMaster&&(this.holderOffset=(0,r.offset)(this.holder),p=s.createRenderCalculators(p),u&&!t.getSetting("fixedColumnsStart"))){const e=o.inlineStartOverlay.getScrollPosition(),t=this.correctHeaderWidth;this.correctHeaderWidth=0!==e,t!==this.correctHeaderWidth&&(p=!1)}if(this.isMaster&&(f=o.updateStateOfRendering()),p)this.isMaster&&s.createVisibleCalculators(),o&&o.refresh(!0);else{this.isMaster?this.tableOffset=(0,r.offset)(this.TABLE):this.tableOffset=this.dataAccessObject.parentTableOffset;const e=i>0?this.getFirstRenderedRow():0,t=n>0?this.getFirstRenderedColumn():0;this.rowFilter=new l.default(e,i,g),this.columnFilter=new a.default(t,n,u);let o=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();const e={};this.wtSettings.getSetting("beforeDraw",!0,e),o=!0!==e.skipRender}if(o){let e;if(this.tableRenderer.setHeaderContentRenderers(h,d),(this.is(c.CLONE_BOTTOM)||this.is(c.CLONE_BOTTOM_INLINE_START_CORNER))&&this.tableRenderer.setHeaderContentRenderers(h,[]),this.resetOversizedRows(),this.tableRenderer.setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&(e=this.dataAccessObject.workspaceWidth,this.dataAccessObject.wtViewport.containerWidth=null,this.markOversizedColumnHeaders()),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(c.CLONE_BOTTOM))&&this.markOversizedRows(),this.isMaster){this.dataAccessObject.wtViewport.createVisibleCalculators(),this.dataAccessObject.wtOverlays.refresh(!1),this.dataAccessObject.wtOverlays.applyToDOM();const t=(0,r.outerWidth)(this.hider),o=(0,r.outerWidth)(this.TABLE);0!==t&&o!==t&&(this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),e!==this.dataAccessObject.wtViewport.getWorkspaceWidth()&&(this.dataAccessObject.wtViewport.containerWidth=null,this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),this.wtSettings.getSetting("onDraw",!0)}else this.is(c.CLONE_BOTTOM)&&this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize()}}let m=!1;return this.isMaster&&(m=o.topOverlay.resetFixedPosition(),o.bottomOverlay.clone&&(m=o.bottomOverlay.resetFixedPosition()||m),m=o.inlineStartOverlay.resetFixedPosition()||m,o.topInlineStartCornerOverlay&&o.topInlineStartCornerOverlay.resetFixedPosition(),o.bottomInlineStartCornerOverlay&&o.bottomInlineStartCornerOverlay.clone&&o.bottomInlineStartCornerOverlay.resetFixedPosition()),m?(o.refreshAll(),o.adjustElementsSize()):this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(p),f&&o.syncScrollWithMaster(),this.dataAccessObject.drawn=!0,this}markIfOversizedColumnHeader(e){const t=this.columnFilter.renderedToSource(e);let o=this.wtSettings.getSetting("columnHeaders").length;const s=this.wtSettings.getSetting("defaultRowHeight");let i,n,a;const l=this.wtSettings.getSetting("columnHeaderHeight")||[];for(;o;)o-=1,i=this.getColumnHeaderHeight(o),n=this.getColumnHeader(t,o),n&&(a=(0,r.innerHeight)(n),(!i&&s<a||i<a)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=a),Array.isArray(l)?null!==l[o]&&void 0!==l[o]&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=l[o]):isNaN(l)||(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=l),this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]<(l[o]||l)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[o]=l[o]||l))}adjustColumnHeaderHeights(){const{wtSettings:e}=this,t=this.THEAD.childNodes,o=this.dataAccessObject.wtViewport.oversizedColumnHeaders;for(let s=0,i=e.getSetting("columnHeaders").length;s<i;s++)if(o[s]){if(!t[s]||0===t[s].childNodes.length)return;t[s].childNodes[0].style.height=`${o[s]}px`}}resetOversizedRows(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject;if((this.isMaster||this.is(c.CLONE_BOTTOM))&&!e.getSetting("externalRowCalculator")){const e=this.getRenderedRowsCount();for(let o=0;o<e;o++){const e=this.rowFilter.renderedToSource(o);t.oversizedRows&&t.oversizedRows[e]&&(t.oversizedRows[e]=void 0)}}}getCell(e){let t=e.row,o=e.col;const s=this.wtSettings.getSetting("onModifyGetCellCoords",t,o);if(s&&Array.isArray(s)&&([t,o]=s),this.isRowBeforeRenderedRows(t))return-1;if(this.isRowAfterRenderedRows(t))return-2;if(this.isColumnBeforeRenderedColumns(o))return-3;if(this.isColumnAfterRenderedColumns(o))return-4;const i=this.getRow(t);if(!i&&t>=0)throw new Error("TR was expected to be rendered but is not");const r=i.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(o)];if(!r&&o>=0)throw new Error("TD or TH was expected to be rendered but is not");return r}getRow(e){let t=null,o=null;var s,i;e<0?(t=null===(s=this.rowFilter)||void 0===s?void 0:s.sourceRowToVisibleColHeadedRow(e),o=this.THEAD):(t=null===(i=this.rowFilter)||void 0===i?void 0:i.sourceToRendered(e),o=this.TBODY);return void 0!==t&&void 0!==o&&(!(o.childNodes.length<t+1)&&o.childNodes[t])}getColumnHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const o=this.THEAD.childNodes[t];return null==o?void 0:o.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}getColumnHeaders(e){const t=[],o=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e);return this.THEAD.childNodes.forEach((e=>{const s=e.childNodes[o];s&&t.push(s)})),t}getRowHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t>=this.wtSettings.getSetting("rowHeaders").length)return;const o=this.rowFilter.sourceToRendered(e),s=o<0?this.rowFilter.sourceRowToVisibleColHeadedRow(e):o,i=(o<0?this.THEAD:this.TBODY).childNodes[s];return null==i?void 0:i.childNodes[t]}getRowHeaders(e){const t=[],o=this.wtSettings.getSetting("rowHeaders").length;for(let s=0;s<o;s++){const o=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)],i=null==o?void 0:o.childNodes[s];i&&t.push(i)}return t}getCoords(e){let t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=(0,r.closest)(t,["TD","TH"])),null===t)return null;const o=t.parentNode,s=o.parentNode;let i=(0,r.index)(o),n=t.cellIndex;if((0,r.overlayContainsElement)(c.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,r.overlayContainsElement)(c.CLONE_TOP,t,this.wtRootElement))"THEAD"===s.nodeName&&(i-=s.childNodes.length);else if((0,r.overlayContainsElement)(c.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)||(0,r.overlayContainsElement)(c.CLONE_BOTTOM,t,this.wtRootElement)){i=this.wtSettings.getSetting("totalRows")-s.childNodes.length+i}else i=s===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(i):this.rowFilter.renderedToSource(i);return n=(0,r.overlayContainsElement)(c.CLONE_TOP_INLINE_START_CORNER,t,this.wtRootElement)||(0,r.overlayContainsElement)(c.CLONE_INLINE_START,t,this.wtRootElement)||(0,r.overlayContainsElement)(c.CLONE_BOTTOM_INLINE_START_CORNER,t,this.wtRootElement)?this.columnFilter.offsettedTH(n):this.columnFilter.visibleRowHeadedColumnToSourceColumn(n),this.wot.createCellCoords(i,n)}markOversizedRows(){if(this.wtSettings.getSetting("externalRowCalculator"))return;let e=this.TBODY.childNodes.length;let t,o,s,i,n;if(e*this.wtSettings.getSetting("defaultRowHeight")!==(0,r.innerHeight)(this.TBODY)-1||this.wtSettings.getSetting("fixedRowsBottom"))for(;e;)e-=1,s=this.rowFilter.renderedToSource(e),t=this.getRowHeight(s),i=this.getTrForRow(s),n=i.querySelector("th"),o=n?(0,r.innerHeight)(n):(0,r.innerHeight)(i)-1,(!t&&this.wtSettings.getSetting("defaultRowHeight")<o||t<o)&&(o+=1,this.dataAccessObject.wtViewport.oversizedRows[s]=o)}getTrForRow(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}isColumnHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("rowHeaders").length;return Math.abs(e)<=t}isRowHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("columnHeaders").length;return Math.abs(e)<=t}isRowBeforeRenderedRows(e){const t=this.getFirstRenderedRow();return e<0&&t<=0?!this.isRowHeaderRendered(e):e<t}isRowAfterRenderedRows(e){return e>this.getLastRenderedRow()}isColumnBeforeRenderedColumns(e){const t=this.getFirstRenderedColumn();return e<0&&t<=0?!this.isColumnHeaderRendered(e):e<t}isColumnAfterRenderedColumns(e){return this.columnFilter&&e>this.getLastRenderedColumn()}isColumnAfterViewport(e){return this.columnFilter&&e>this.getLastVisibleColumn()}isRowAfterViewport(e){return this.rowFilter&&e>this.getLastVisibleRow()}isColumnBeforeViewport(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0}isLastRowFullyVisible(){return this.getLastVisibleRow()===this.getLastRenderedRow()}isLastColumnFullyVisible(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}allRowsInViewport(){return this.wtSettings.getSetting("totalRows")===this.getVisibleRowsCount()}allColumnsInViewport(){return this.wtSettings.getSetting("totalColumns")===this.getVisibleColumnsCount()}getRowHeight(e){return this.rowUtils.getHeight(e)}getColumnHeaderHeight(e){return this.columnUtils.getHeaderHeight(e)}getColumnWidth(e){return this.columnUtils.getWidth(e)}getStretchedColumnWidth(e){return this.columnUtils.getStretchedColumnWidth(e)}hasDefinedSize(){return this.hasTableHeight&&this.hasTableWidth}getWidth(){return(0,r.outerWidth)(this.TABLE)}getHeight(){return(0,r.outerHeight)(this.TABLE)}getTotalWidth(){const e=(0,r.outerWidth)(this.hider);return 0!==e?e:this.getWidth()}getTotalHeight(){const e=(0,r.outerHeight)(this.hider);return 0!==e?e:this.getHeight()}isVisible(){return(0,r.isVisible)(this.TABLE)}_modifyRowHeaderWidth(e){let t=(0,n.isFunction)(e)?e():null;return Array.isArray(t)?(t=[...t],t[t.length-1]=this._correctRowHeaderWidth(t[t.length-1])):t=this._correctRowHeaderWidth(t),t}_correctRowHeaderWidth(e){let t=e;return"number"!=typeof e&&(t=this.wtSettings.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(t+=1),t}}},86363:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(45460)),r=s(o(6271)),n=s(o(92117)),a=o(22232),l=o(89381);class h extends i.default{constructor(e,t,o,s){super(e,t,o,s,l.CLONE_BOTTOM)}}(0,a.mixin)(h,r.default),(0,a.mixin)(h,n.default);t.default=h},58654:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(45460)),r=s(o(6271)),n=s(o(6214)),a=o(22232),l=o(89381);class h extends i.default{constructor(e,t,o,s){super(e,t,o,s,l.CLONE_BOTTOM_INLINE_START_CORNER)}}(0,a.mixin)(h,r.default),(0,a.mixin)(h,n.default);t.default=h},32173:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(45460)),r=s(o(37610)),n=s(o(6214)),a=o(22232),l=o(89381);class h extends i.default{constructor(e,t,o,s){super(e,t,o,s,l.CLONE_INLINE_START)}}(0,a.mixin)(h,r.default),(0,a.mixin)(h,n.default);t.default=h},94915:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=o(83302),r=s(o(45460)),n=s(o(37610)),a=s(o(92117)),l=o(22232);class h extends r.default{constructor(e,t,o,s){super(e,t,o,s,"master")}alignOverlaysWithTrimmingContainer(){const e=(0,i.getTrimmingContainer)(this.wtRootElement),{rootWindow:t}=this.domBindings;if(e===t){this.wtSettings.getSetting("preventOverflow")||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible")}else{const o=e.parentElement,s=(0,i.getStyle)(e,"height",t),r=(0,i.getStyle)(e,"overflow",t),n=this.holder.style,{scrollWidth:a,scrollHeight:l}=e;let h=e.offsetWidth,u=e.offsetHeight;if(o&&["auto","hidden","scroll"].includes(r)){const s=e.cloneNode(!1);s.style.overflow="auto",s.style.position="absolute",e.nextElementSibling?o.insertBefore(s,e.nextElementSibling):o.appendChild(s);const r=parseInt((0,i.getComputedStyle)(s,t).height,10);o.removeChild(s),0===r&&(u=0)}u=Math.min(u,l),n.height="auto"===s?"auto":`${u}px`,h=Math.min(h,a),n.width=`${h}px`,n.overflow="",this.hasTableHeight="auto"===n.height||u>0,this.hasTableWidth=h>0}this.isTableVisible=(0,i.isVisible)(this.TABLE)}markOversizedColumnHeaders(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject,o="master",s=e.getSetting("columnHeaders").length;if(s&&!t.hasOversizedColumnHeadersMarked[o]){const i=e.getSetting("rowHeaders").length,r=this.getRenderedColumnsCount();for(let e=0;e<s;e++)for(let e=-1*i;e<r;e++)this.markIfOversizedColumnHeader(e);t.hasOversizedColumnHeadersMarked[o]=!0}}}(0,l.mixin)(h,n.default),(0,l.mixin)(h,a.default);t.default=h},92117:(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedColumn(){const e=this.dataAccessObject.startColumnRendered;return null===e?-1:e},getFirstVisibleColumn(){const e=this.dataAccessObject.startColumnVisible;return null===e?-1:e},getLastRenderedColumn(){const e=this.dataAccessObject.endColumnRendered;return null===e?-1:e},getLastVisibleColumn(){const e=this.dataAccessObject.endColumnVisible;return null===e?-1:e},getRenderedColumnsCount(){return this.dataAccessObject.countColumnsRendered},getVisibleColumnsCount(){return this.dataAccessObject.countColumnsVisible},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};(0,o(22232).defineGetter)(s,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});t.default=s},37610:(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedRow(){const e=this.dataAccessObject.startRowRendered;return null===e?-1:e},getFirstVisibleRow(){const e=this.dataAccessObject.startRowVisible;return null===e?-1:e},getLastRenderedRow(){const e=this.dataAccessObject.endRowRendered;return null===e?-1:e},getLastVisibleRow(){const e=this.dataAccessObject.endRowVisible;return null===e?-1:e},getRenderedRowsCount(){return this.dataAccessObject.countRowsRendered},getVisibleRowsCount(){return this.dataAccessObject.countRowsVisible},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};(0,o(22232).defineGetter)(s,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});t.default=s},6214:(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedColumn(){return 0===this.wtSettings.getSetting("totalColumns")?-1:0},getFirstVisibleColumn(){return this.getFirstRenderedColumn()},getLastRenderedColumn(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn(){return this.getLastRenderedColumn()},getRenderedColumnsCount(){const e=this.wtSettings.getSetting("totalColumns");return Math.min(this.wtSettings.getSetting("fixedColumnsStart"),e)},getVisibleColumnsCount(){return this.getRenderedColumnsCount()},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};(0,o(22232).defineGetter)(s,"MIXIN_NAME","stickyColumnsStart",{writable:!1,enumerable:!1});t.default=s},6271:(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedRow(){const e=this.wtSettings.getSetting("totalRows"),t=this.wtSettings.getSetting("fixedRowsBottom"),o=e-t;return 0===e||0===t?-1:o<0?0:o},getFirstVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.wtSettings.getSetting("totalRows")-1},getLastVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsBottom"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount:()=>0};(0,o(22232).defineGetter)(s,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});t.default=s},15491:(e,t,o)=>{"use strict";t.__esModule=!0;const s={getFirstRenderedRow(){return 0===this.wtSettings.getSetting("totalRows")?-1:0},getFirstVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.getRenderedRowsCount()-1},getLastVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsTop"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};(0,o(22232).defineGetter)(s,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});t.default=s},85043:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(45460)),r=s(o(15491)),n=s(o(92117)),a=o(22232),l=o(89381);class h extends i.default{constructor(e,t,o,s){super(e,t,o,s,l.CLONE_TOP)}}(0,a.mixin)(h,r.default),(0,a.mixin)(h,n.default);t.default=h},56754:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(45460)),r=s(o(15491)),n=s(o(6214)),a=o(22232),l=o(89381);class h extends i.default{constructor(e,t,o,s){super(e,t,o,s,l.CLONE_TOP_INLINE_START_CORNER)}}(0,a.mixin)(h,r.default),(0,a.mixin)(h,n.default);t.default=h},35863:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(83302),n=o(83674);t.default=class{constructor(e,t){(0,i.default)(this,"dataAccessObject",void 0),(0,i.default)(this,"wtSettings",void 0),(0,i.default)(this,"headerWidths",new Map),(0,i.default)(this,"stretching",void 0),this.dataAccessObject=e,this.wtSettings=t,this.stretching=new n.ColumnStretching({totalColumns:()=>this.wtSettings.getSetting("totalColumns"),stretchMode:()=>this.wtSettings.getSetting("stretchH"),stretchingColumnWidthFn:(e,t)=>this.wtSettings.getSetting("onBeforeStretchingColumnWidth",e,t),columnWidthFn:e=>this.dataAccessObject.wtTable.getColumnWidth(e)})}getWidth(e){return this.wtSettings.getSetting("columnWidth",e)||this.wtSettings.getSetting("defaultColumnWidth")}getStretchedColumnWidth(e){let t=this.getWidth(e);const o=this.stretching.getStretchedColumnWidth(e,t);return o&&(t=o),t}getHeaderHeight(e){let t=this.wtSettings.getSetting("defaultRowHeight");const o=this.dataAccessObject.wtViewport.oversizedColumnHeaders[e];return void 0!==o&&(t=t?Math.max(t,o):o),t}getHeaderWidth(e){return this.headerWidths.get(this.dataAccessObject.wtTable.columnFilter.sourceToRendered(e))}refreshStretching(){const{wtTable:e,wtViewport:t,cloneSource:o}=this.dataAccessObject,s=o?o.wtTable.holder:e.holder,i=s.offsetHeight<s.scrollHeight?(0,r.getScrollbarWidth)():0;this.stretching.refreshStretching(t.getViewportWidth()-i)}calculateWidths(){const{wtSettings:e}=this;let t=e.getSetting("rowHeaderWidth");if(this.refreshStretching(),t=e.getSetting("onModifyRowHeaderWidth",t),null!=t){const o=e.getSetting("rowHeaders").length,s=e.getSetting("defaultColumnWidth");for(let e=0;e<o;e++){let o=Array.isArray(t)?t[e]:t;o=null==o?s:o,this.headerWidths.set(e,o)}}}}},83674:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=s(o(42538)),n=s(o(48427));function a(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var l=new WeakMap,h=new WeakMap,u=new WeakMap,d=new WeakMap,c=new WeakMap;class g{static get DEFAULT_WIDTH(){return 50}constructor(e){let{totalColumns:t,stretchMode:o,stretchingColumnWidthFn:s,columnWidthFn:g}=e;(0,i.default)(this,"stretchAllRatio",0),(0,i.default)(this,"stretchLastWidth",0),(0,i.default)(this,"stretchAllColumnsWidth",[]),a(this,l,{writable:!0,value:0}),(0,i.default)(this,"needVerifyLastColumnWidth",!0),a(this,h,{writable:!0,value:()=>0}),a(this,u,{writable:!0,value:e=>e}),a(this,d,{writable:!0,value:e=>e}),a(this,c,{writable:!0,value:()=>"none"}),(0,n.default)(this,h,t),(0,n.default)(this,c,o),(0,n.default)(this,u,null!=s?s:(0,r.default)(this,u)),(0,n.default)(this,d,null!=g?g:(0,r.default)(this,d))}refreshStretching(e){if("none"===(0,r.default)(this,c).call(this))return;(0,n.default)(this,l,e);let t=0;for(let o=0;o<(0,r.default)(this,h).call(this);o++){const s=this._getColumnWidth(o),i=(0,r.default)(this,u).call(this,void 0,o);"number"==typeof i?e-=i:t+=s}const o=e-t;if("all"===(0,r.default)(this,c).call(this)&&o>0)this.stretchAllRatio=e/t,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===(0,r.default)(this,c).call(this)&&e!==1/0){const e=this._getColumnWidth((0,r.default)(this,h).call(this)-1),t=o+e;this.stretchLastWidth=t>=0?t:e}}getStretchedColumnWidth(e,t){let o=null;return"all"===(0,r.default)(this,c).call(this)&&0!==this.stretchAllRatio?o=this._getStretchedAllColumnWidth(e,t):"last"===(0,r.default)(this,c).call(this)&&0!==this.stretchLastWidth&&(o=this._getStretchedLastColumnWidth(e)),o}_getStretchedAllColumnWidth(e,t){let o=0;if(!this.stretchAllColumnsWidth[e]){const o=Math.round(t*this.stretchAllRatio),s=(0,r.default)(this,u).call(this,o,e);this.stretchAllColumnsWidth[e]=void 0===s?o:isNaN(s)?this._getColumnWidth(e):s}if(this.stretchAllColumnsWidth.length===(0,r.default)(this,h).call(this)&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(let e=0;e<this.stretchAllColumnsWidth.length;e++)o+=this.stretchAllColumnsWidth[e];o!==(0,r.default)(this,l)&&(this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length-1]+=(0,r.default)(this,l)-o)}return this.stretchAllColumnsWidth[e]}_getStretchedLastColumnWidth(e){return e===(0,r.default)(this,h).call(this)-1?this.stretchLastWidth:null}_getColumnWidth(e){let t=(0,r.default)(this,d).call(this,e);return isNaN(t)&&(t=g.DEFAULT_WIDTH),t}}t.ColumnStretching=g},94191:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231));t.default=class{constructor(e){(0,i.default)(this,"nodeType",void 0),this.nodeType=e.toUpperCase()}setRootDocument(e){this.rootDocument=e}obtain(){return this.rootDocument.createElement(this.nodeType)}}},81787:(e,t)=>{"use strict";t.__esModule=!0;t.WORKING_SPACE_ALL=0,t.WORKING_SPACE_TOP=1,t.WORKING_SPACE_BOTTOM=2},1909:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(55407));t.OrderView=i.default;var r=s(o(52025));t.SharedOrderView=r.default},52025:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(55407));class r extends i.default{prependView(e){return this.sizeSet.prepend(e.sizeSet),e.sizeSet.append(this.sizeSet),this}appendView(e){return this.sizeSet.append(e.sizeSet),e.sizeSet.prepend(this.sizeSet),this}}t.default=r},55407:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(81787),n=s(o(96747));t.default=class{constructor(e,t,o){(0,i.default)(this,"rootNode",void 0),(0,i.default)(this,"nodesPool",void 0),(0,i.default)(this,"sizeSet",new n.default),(0,i.default)(this,"childNodeType",void 0),(0,i.default)(this,"visualIndex",0),(0,i.default)(this,"collectedNodes",[]),this.rootNode=e,this.nodesPool=t,this.childNodeType=o.toUpperCase()}setSize(e){return this.sizeSet.setSize(e),this}setOffset(e){return this.sizeSet.setOffset(e),this}isSharedViewSet(){return this.sizeSet.isShared()}getNode(e){return e<this.collectedNodes.length?this.collectedNodes[e]:null}getCurrentNode(){const e=this.collectedNodes.length;return e>0?this.collectedNodes[e-1]:null}getRenderedChildCount(){const{rootNode:e,sizeSet:t}=this;let o=0;if(this.isSharedViewSet()){let s=e.firstElementChild;for(;s;){if(s.tagName===this.childNodeType)o+=1;else if(t.isPlaceOn(r.WORKING_SPACE_TOP))break;s=s.nextElementSibling}}else o=e.childElementCount;return o}start(){this.collectedNodes.length=0,this.visualIndex=0;const{rootNode:e,sizeSet:t}=this,o=this.isSharedViewSet(),{nextSize:s}=t.getViewSize();let i=this.getRenderedChildCount();for(;i<s;){const s=this.nodesPool();!o||o&&t.isPlaceOn(r.WORKING_SPACE_BOTTOM)?e.appendChild(s):e.insertBefore(s,e.firstChild),i+=1}const n=o&&t.isPlaceOn(r.WORKING_SPACE_TOP);for(;i>s;)e.removeChild(n?e.firstChild:e.lastChild),i-=1}render(){const{rootNode:e,sizeSet:t}=this;let o=this.visualIndex;this.isSharedViewSet()&&t.isPlaceOn(r.WORKING_SPACE_BOTTOM)&&(o+=t.sharedSize.nextSize);let s=e.childNodes[o];if(s.tagName!==this.childNodeType){const t=this.nodesPool();e.replaceChild(t,s),s=t}this.collectedNodes.push(s),this.visualIndex+=1}end(){}}},79193:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231));t.default=class{constructor(){(0,i.default)(this,"currentSize",0),(0,i.default)(this,"nextSize",0),(0,i.default)(this,"currentOffset",0),(0,i.default)(this,"nextOffset",0)}setSize(e){this.currentSize=this.nextSize,this.nextSize=e}setOffset(e){this.currentOffset=this.nextOffset,this.nextOffset=e}}},96747:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=s(o(79193)),n=o(81787);t.default=class{constructor(){(0,i.default)(this,"size",new r.default),(0,i.default)(this,"workingSpace",n.WORKING_SPACE_ALL),(0,i.default)(this,"sharedSize",null)}setSize(e){this.size.setSize(e)}setOffset(e){this.size.setOffset(e)}getViewSize(){return this.size}isShared(){return this.sharedSize instanceof r.default}isPlaceOn(e){return this.workingSpace===e}append(e){this.workingSpace=n.WORKING_SPACE_TOP,e.workingSpace=n.WORKING_SPACE_BOTTOM,this.sharedSize=e.getViewSize()}prepend(e){this.workingSpace=n.WORKING_SPACE_BOTTOM,e.workingSpace=n.WORKING_SPACE_TOP,this.sharedSize=e.getViewSize()}}},72772:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231));t.default=class{constructor(e,t){(0,i.default)(this,"dataAccessObject",void 0),(0,i.default)(this,"wtSettings",void 0),this.dataAccessObject=e,this.wtSettings=t}getHeight(e){let t=this.wtSettings.getSetting("rowHeight",e);const o=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==o&&(t=void 0===t?o:Math.max(t,o)),t}}},57293:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(83302),i=o(22232),r=o(46003);t.default=class{constructor(e,t,o,s,i){this.dataAccessObject=e,this.wot=e.wot,this.instance=this.wot,this.domBindings=t,this.wtSettings=o,this.wtTable=i,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.eventManager=s,this.eventManager.addEventListener(this.domBindings.rootWindow,"resize",(()=>{this.clientHeight=this.getWorkspaceHeight()}))}getWorkspaceHeight(){const e=this.domBindings.rootDocument,t=this.dataAccessObject.topOverlayTrimmingContainer;let o=0;if(t===this.domBindings.rootWindow)o=e.documentElement.clientHeight;else{o=(0,s.outerHeight)(t)>0&&t.clientHeight>0?t.clientHeight:1/0}return o}getWorkspaceWidth(){const{wtSettings:e}=this,{rootDocument:t,rootWindow:o}=this.domBindings,i=this.dataAccessObject.inlineStartOverlayTrimmingContainer,r=t.documentElement.offsetWidth,n=e.getSetting("totalColumns"),a=e.getSetting("preventOverflow"),l=e.getSetting("rtlMode"),h=this.wtTable.TABLE.getBoundingClientRect(),u=r-(l?h.right-r:h.left);let d,c;if(a)return(0,s.outerWidth)(this.wtTable.wtRootElement);if(d=e.getSetting("freezeOverlays")?Math.min(u,r):Math.min(this.getContainerFillWidth(),u,r),i===o&&n>0&&this.sumColumnWidths(0,n-1)>d)return t.documentElement.clientWidth;if(i!==o&&(c=(0,s.getStyle)(this.dataAccessObject.inlineStartOverlayTrimmingContainer,"overflow",o),"scroll"===c||"hidden"===c||"auto"===c))return Math.max(d,i.clientWidth);const g=e.getSetting("stretchH");return"none"!==g&&g?d:Math.max(d,(0,s.outerWidth)(this.wtTable.TABLE))}hasVerticalScroll(){return this.wtTable.hider.offsetHeight>this.getWorkspaceHeight()}hasHorizontalScroll(){return this.wtTable.hider.offsetWidth>this.getWorkspaceWidth()}sumColumnWidths(e,t){let o=0,s=e;for(;s<t;)o+=this.wtTable.getColumnWidth(s),s+=1;return o}getContainerFillWidth(){if(this.containerWidth)return this.containerWidth;const e=this.wtTable.holder,t=this.domBindings.rootDocument.createElement("div");t.style.width="100%",t.style.height="1px",e.appendChild(t);const o=t.offsetWidth;return this.containerWidth=o,e.removeChild(t),o}getWorkspaceOffset(){return(0,s.offset)(this.wtTable.TABLE)}getColumnHeaderHeight(){return this.wtSettings.getSetting("columnHeaders").length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=(0,s.outerHeight)(this.wtTable.THEAD)):this.columnHeaderHeight=0,this.columnHeaderHeight}getViewportHeight(){let e=this.getWorkspaceHeight();if(e===1/0)return e;const t=this.getColumnHeaderHeight();return t>0&&(e-=t),e}getRowHeaderWidth(){const e=this.wtSettings.getSetting("rowHeaderWidth"),t=this.wtSettings.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(let o=0,s=t.length;o<s;o++)this.rowHeaderWidth+=e[o]||e}if(isNaN(this.rowHeaderWidth))if(t.length){let e=this.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(let o=0,i=t.length;o<i;o++)e?(this.rowHeaderWidth+=(0,s.outerWidth)(e),e=e.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.wtSettings.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}getViewportWidth(){const e=this.getWorkspaceWidth();if(e===1/0)return e;const t=this.getRowHeaderWidth();return t>0?e-t:e}createRowsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.RENDER_TYPE;const{wtSettings:t,wtTable:o}=this;if(t.getSetting("renderAllRows")&&e===r.RENDER_TYPE)return new r.RenderAllRowsCalculator({totalRows:t.getSetting("totalRows")});let i,n,a=this.getViewportHeight();this.rowHeaderWidth=NaN;let l=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const h=t.getSetting("fixedRowsTop"),u=t.getSetting("fixedRowsBottom"),d=t.getSetting("totalRows");return h&&l>=0&&(n=this.dataAccessObject.topOverlay.sumCellSizes(0,h),l+=n,a-=n),u&&this.dataAccessObject.bottomOverlay.clone&&(n=this.dataAccessObject.bottomOverlay.sumCellSizes(d-u,d),a-=n),i=o.holder.clientHeight===o.holder.offsetHeight?0:(0,s.getScrollbarWidth)(this.domBindings.rootDocument),new r.ViewportRowsCalculator({viewportHeight:a,scrollOffset:l,totalRows:t.getSetting("totalRows"),rowHeightFn:e=>o.getRowHeight(e),overrideFn:t.getSettingPure("viewportRowCalculatorOverride"),calculationType:e,horizontalScrollbarHeight:i})}createColumnsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.RENDER_TYPE;const{wtSettings:t,wtTable:o}=this;if(t.getSetting("renderAllColumns")&&e===r.RENDER_TYPE)return new r.RenderAllColumnsCalculator({totalColumns:t.getSetting("totalColumns")});let i=this.getViewportWidth(),n=Math.abs(this.dataAccessObject.inlineStartScrollPosition)-this.dataAccessObject.inlineStartParentOffset;this.columnHeaderHeight=NaN;const a=t.getSetting("fixedColumnsStart");if(a&&n>=0){const e=this.dataAccessObject.inlineStartOverlay.sumCellSizes(0,a);n+=e,i-=e}return o.holder.clientWidth!==o.holder.offsetWidth&&(i-=(0,s.getScrollbarWidth)(this.domBindings.rootDocument)),new r.ViewportColumnsCalculator({viewportWidth:i,scrollOffset:n,totalColumns:t.getSetting("totalColumns"),columnWidthFn:e=>o.getColumnWidth(e),overrideFn:t.getSettingPure("viewportColumnCalculatorOverride"),calculationType:e,inlineStartOffset:this.dataAccessObject.inlineStartParentOffset})}createRenderCalculators(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this;if(e&&!t.getSetting("renderAllRows")){const t=this.createRowsCalculator(r.FULLY_VISIBLE_TYPE);e=this.areAllProposedVisibleRowsAlreadyRendered(t)}if(e&&!t.getSetting("renderAllColumns")){const t=this.createColumnsCalculator(r.FULLY_VISIBLE_TYPE);e=this.areAllProposedVisibleColumnsAlreadyRendered(t)}return e||(this.rowsRenderCalculator=this.createRowsCalculator(r.RENDER_TYPE),this.columnsRenderCalculator=this.createColumnsCalculator(r.RENDER_TYPE)),this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,e}createVisibleCalculators(){this.rowsVisibleCalculator=this.createRowsCalculator(r.FULLY_VISIBLE_TYPE),this.columnsVisibleCalculator=this.createColumnsCalculator(r.FULLY_VISIBLE_TYPE)}areAllProposedVisibleRowsAlreadyRendered(e){if(!this.rowsVisibleCalculator)return!1;const{startRow:t,endRow:o,isVisibleInTrimmingContainer:s}=e;if(null===t&&null===o)return!s;const{startRow:i,endRow:r}=this.rowsRenderCalculator;return!(t<i||t===i&&t>0)&&!(o>r||o===r&&o<this.wtSettings.getSetting("totalRows")-1)}areAllProposedVisibleColumnsAlreadyRendered(e){if(!this.columnsVisibleCalculator)return!1;const{startColumn:t,endColumn:o,isVisibleInTrimmingContainer:s}=e;if(null===t&&null===o)return!s;const{startColumn:i,endColumn:r}=this.columnsRenderCalculator;return!(t<i||t===i&&t>0)&&!(o>r||o===r&&o<this.wtSettings.getSetting("totalColumns")-1)}resetHasOversizedColumnHeadersMarked(){(0,i.objectEach)(this.hasOversizedColumnHeadersMarked,((e,t,o)=>{o[t]=void 0}))}}},73596:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(16247),o(25671),o(97796),o(36662);var i=s(o(78900)),r=o(45433),n=o(3177),a=s(o(56307)),l=o(22489),h=o(65324),u=o(57924),d=o(48253),c=o(21280);function g(e,t){const o=new i.default(e,t||{},r.rootInstanceSymbol);return o.init(),o}t.CellCoords=c.CellCoords,t.CellRange=c.CellRange,(0,h.registerCellType)(u.TextCellType),g.editors={BaseEditor:d.BaseEditor},g.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new i.default(e,t,r.rootInstanceSymbol)},g.DefaultSettings=(0,n.metaSchemaFactory)(),g.hooks=a.default.getSingleton(),g.CellCoords=c.CellCoords,g.CellRange=c.CellRange,g.packageName="handsontable",g.buildDate="10/01/2024 08:51:12",g.version="14.1.0-next-ba8c2b0-20240110",g.languages={dictionaryKeys:l.dictionaryKeys,getLanguageDictionary:l.getLanguageDictionary,getLanguagesDictionaries:l.getLanguagesDictionaries,registerLanguageDictionary:l.registerLanguageDictionary,getTranslatedPhrase:l.getTranslatedPhrase};t.default=g},78380:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(25815),i=o(16124),r=o(67156);const n=t.CELL_TYPE="autocomplete";t.AutocompleteCellType={CELL_TYPE:n,editor:s.AutocompleteEditor,renderer:i.autocompleteRenderer,validator:r.autocompleteValidator}},83954:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(78380);t.AutocompleteCellType=s.AutocompleteCellType,t.CELL_TYPE=s.CELL_TYPE},30749:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(63729),i=o(8877);const r=t.CELL_TYPE="checkbox";t.CheckboxCellType={CELL_TYPE:r,editor:s.CheckboxEditor,renderer:i.checkboxRenderer}},42855:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(30749);t.CELL_TYPE=s.CELL_TYPE,t.CheckboxCellType=s.CheckboxCellType},24259:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(58437),i=o(56522),r=o(82951);const n=t.CELL_TYPE="date";t.DateCellType={CELL_TYPE:n,editor:s.DateEditor,renderer:i.dateRenderer,validator:r.dateValidator}},56844:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(24259);t.CELL_TYPE=s.CELL_TYPE,t.DateCellType=s.DateCellType},72061:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(9535),i=o(45194),r=o(57509);const n=t.CELL_TYPE="dropdown";t.DropdownCellType={CELL_TYPE:n,editor:s.DropdownEditor,renderer:i.dropdownRenderer,validator:r.dropdownValidator}},65867:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(72061);t.CELL_TYPE=s.CELL_TYPE,t.DropdownCellType=s.DropdownCellType},85334:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(93273),i=o(67981);const r=t.CELL_TYPE="handsontable";t.HandsontableCellType={CELL_TYPE:r,editor:s.HandsontableEditor,renderer:i.handsontableRenderer}},243:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(85334);t.CELL_TYPE=s.CELL_TYPE,t.HandsontableCellType=s.HandsontableCellType},74319:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllCellTypes=function(){(0,g.registerCellType)(s.AutocompleteCellType),(0,g.registerCellType)(i.CheckboxCellType),(0,g.registerCellType)(r.DateCellType),(0,g.registerCellType)(n.DropdownCellType),(0,g.registerCellType)(a.HandsontableCellType),(0,g.registerCellType)(l.NumericCellType),(0,g.registerCellType)(h.PasswordCellType),(0,g.registerCellType)(u.SelectCellType),(0,g.registerCellType)(d.TextCellType),(0,g.registerCellType)(c.TimeCellType)};var s=o(83954);t.AutocompleteCellType=s.AutocompleteCellType,t.AUTOCOMPLETE_TYPE=s.CELL_TYPE;var i=o(42855);t.CheckboxCellType=i.CheckboxCellType,t.CHECKBOX_TYPE=i.CELL_TYPE;var r=o(56844);t.DateCellType=r.DateCellType,t.DATE_TYPE=r.CELL_TYPE;var n=o(65867);t.DropdownCellType=n.DropdownCellType,t.DROPDOWN_TYPE=n.CELL_TYPE;var a=o(243);t.HandsontableCellType=a.HandsontableCellType,t.HANDSONTABLE_TYPE=a.CELL_TYPE;var l=o(68683);t.NumericCellType=l.NumericCellType,t.NUMERIC_TYPE=l.CELL_TYPE;var h=o(81762);t.PasswordCellType=h.PasswordCellType,t.PASSWORD_TYPE=h.CELL_TYPE;var u=o(12256);t.SelectCellType=u.SelectCellType,t.SELECT_TYPE=u.CELL_TYPE;var d=o(57924);t.TextCellType=d.TextCellType,t.TEXT_TYPE=d.CELL_TYPE;var c=o(8228);t.TimeCellType=c.TimeCellType,t.TIME_TYPE=c.CELL_TYPE;var g=o(65324);t.registerCellType=g.registerCellType,t.getCellType=g.getCellType,t.getRegisteredCellTypeNames=g.getRegisteredCellTypeNames,t.getRegisteredCellTypes=g.getRegisteredCellTypes,t.hasCellType=g.hasCellType},68683:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(79486);t.CELL_TYPE=s.CELL_TYPE,t.NumericCellType=s.NumericCellType},79486:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(97130),i=o(78416),r=o(71);const n=t.CELL_TYPE="numeric";t.NumericCellType={CELL_TYPE:n,editor:s.NumericEditor,renderer:i.numericRenderer,validator:r.numericValidator,dataType:"number"}},81762:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(40229);t.CELL_TYPE=s.CELL_TYPE,t.PasswordCellType=s.PasswordCellType},40229:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(63630),i=o(76978);const r=t.CELL_TYPE="password";t.PasswordCellType={CELL_TYPE:r,editor:s.PasswordEditor,renderer:i.passwordRenderer,copyable:!1}},65324:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getCellType=function(e){if(!u(e))throw Error(`You declared cell type "${e}" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by\n "Handsontable.cellTypes.registerCellType" method`);return h(e)},t.registerCellType=function(e,t){"string"!=typeof e&&(e=(t=e).CELL_TYPE);const{editor:o,renderer:s,validator:i}=t;o&&(0,r.registerEditor)(e,o);s&&(0,n.registerRenderer)(e,s);i&&(0,a.registerValidator)(e,i);l(e,t)},o(91683);var i=s(o(63800)),r=o(83605),n=o(7462),a=o(80239);const{register:l,getItem:h,hasItem:u,getNames:d,getValues:c}=(0,i.default)("cellTypes");t.getRegisteredCellTypes=c,t.getRegisteredCellTypeNames=d,t.hasCellType=u},12256:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(2145);t.CELL_TYPE=s.CELL_TYPE,t.SelectCellType=s.SelectCellType},2145:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(93333),i=o(73619);const r=t.CELL_TYPE="select";t.SelectCellType={CELL_TYPE:r,editor:s.SelectEditor,renderer:i.selectRenderer}},57924:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(80617);t.CELL_TYPE=s.CELL_TYPE,t.TextCellType=s.TextCellType},80617:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071),i=o(50695);const r=t.CELL_TYPE="text";t.TextCellType={CELL_TYPE:r,editor:s.TextEditor,renderer:i.textRenderer}},8228:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(90214);t.CELL_TYPE=s.CELL_TYPE,t.TimeCellType=s.TimeCellType},90214:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(65930),i=o(43853),r=o(85342);const n=t.CELL_TYPE="time";t.TimeCellType={CELL_TYPE:n,editor:s.TimeEditor,renderer:i.timeRenderer,validator:r.timeValidator}},78900:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.default=function(e,t){var o,s=this;let L=arguments.length>2&&void 0!==arguments[2]&&arguments[2],W=!1,F=this;const V=new h.default(F);let B,U,Y,j,G,z=!0;(0,b.hasValidParameter)(L)&&(0,b.registerAsRootInstance)(this);this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const K=null!==(o=null==t?void 0:t.layoutDirection)&&void 0!==o?o:"inherit",$=["rtl","ltr"].includes(K)?K:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",$),this.isRtl=function(){return"rtl"===$},this.isLtr=function(){return!F.isRtl()},this.getDirectionFactor=function(){return F.isLtr()?1:-1},t.language=(0,O.getValidLanguageCode)(t.language);const X=new A.MetaManager(F,t,[A.DynamicCellMetaMod,A.ExtendMetaPropertiesMod]),q=X.getTableMeta(),Q=X.getGlobalMeta(),J=(0,P.createUniqueMap)();this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),(0,b.isRootInstance)(this)&&(0,n._injectProductInfo)(t.licenseKey,e);this.guid=`ht_${(0,C.randomString)()}`,D.set(this.guid,this),this.columnIndexMapper=new R.IndexMapper,this.rowIndexMapper=new R.IndexMapper,this.columnIndexMapper.addLocalHook("indexesSequenceChange",(e=>{F.runHooks("afterColumnSequenceChange",e)})),this.rowIndexMapper.addLocalHook("indexesSequenceChange",(e=>{F.runHooks("afterRowSequenceChange",e)})),U=new E.default(F),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let Z=new I.Selection(q,{rowIndexMapper:F.rowIndexMapper,columnIndexMapper:F.columnIndexMapper,countCols:()=>F.countCols(),countRows:()=>F.countRows(),propToCol:e=>B.propToCol(e),isEditorOpened:()=>!!F.getActiveEditor()&&F.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),getShortcutManager:()=>F.getShortcutManager(),createCellCoords:(e,t)=>F._createCellCoords(e,t),createCellRange:(e,t,o)=>F._createCellRange(e,t,o),visualToRenderableCoords:e=>{const{row:t,col:o}=e;return F._createCellCoords(t>=0?F.rowIndexMapper.getRenderableFromVisualIndex(t):t,o>=0?F.columnIndexMapper.getRenderableFromVisualIndex(o):o)},renderableToVisualCoords:e=>{const{row:t,col:o}=e;return F._createCellCoords(t>=0?F.rowIndexMapper.getVisualFromRenderableIndex(t):t,o>=0?F.columnIndexMapper.getVisualFromRenderableIndex(o):o)},isDisabledCellSelection:(e,t)=>e<0||t<0?F.getSettings().disableVisualSelection:F.getCellMeta(e,t).disableVisualSelection});this.selection=Z;const ee=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.refresh()};function te(e){const t=(0,M.normalizeLanguageCode)(e);(0,O.hasLanguageDictionary)(t)?(F.runHooks("beforeLanguageChange",t),Q.language=t,F.runHooks("afterLanguageChange",t)):(0,M.warnUserAboutLanguageRegistration)(e)}function oe(e,t){const o="className"===e?F.rootElement:F.table;if(z)(0,i.addClass)(o,t);else{let s=[],r=[];Q[e]&&(s=Array.isArray(Q[e])?Q[e]:(0,c.stringToArray)(Q[e])),t&&(r=Array.isArray(t)?t:(0,c.stringToArray)(t));const n=(0,c.getDifferenceOfArrays)(s,r),a=(0,c.getDifferenceOfArrays)(r,s);n.length&&(0,i.removeClass)(o,n),a.length&&(0,i.addClass)(o,a)}Q[e]=t}function se(){let e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function ie(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function re(e,t,o){if(!e.length)return;const s=F.getActiveEditor(),r=new se;let n=!0;r.onQueueEmpty=e=>{s&&n&&s.cancelChanges(),o(e)};for(let o=e.length-1;o>=0;o--){const[s,a,,l]=e[o],h=B.propToCol(a),u=F.getCellMeta(s,h);"numeric"===u.type&&"string"==typeof l&&(0,v.isNumericLike)(l)&&(e[o][3]=ie(l)),F.getCellValidator(u)&&(r.addValidatorToQueue(),F.validateCell(e[o][3],u,function(t,o){return function(s){if("boolean"!=typeof s)throw new Error("Validation error: result is not boolean");if(!1===s&&!1===o.allowInvalid){n=!1,e.splice(t,1),o.valid=!0;const s=F.getCell(o.visualRow,o.visualCol);null!==s&&(0,i.removeClass)(s,q.invalidCellClassName)}r.removeValidatorFormQueue()}}(o,u),t))}r.checkIfQueueIsEmpty()}function ne(e,t){let o=e.length-1;if(o<0)return;for(;o>=0;o--){let s=!1;if(null!==e[o]){if(null!==e[o][2]&&void 0!==e[o][2]||null!==e[o][3]&&void 0!==e[o][3]){if(q.allowInsertRow)for(;e[o][0]>F.countRows()-1;){const{delta:e}=B.createRow(void 0,void 0,{source:t});if(0===e){s=!0;break}}if("array"===F.dataType&&(!q.columns||0===q.columns.length)&&q.allowInsertColumn)for(;B.propToCol(e[o][1])>F.countCols()-1;){const{delta:e}=B.createCol(void 0,void 0,{source:t});if(0===e){s=!0;break}}s||B.set(e[o][0],e[o][1],e[o][3])}}else e.splice(o,1)}F.forceFullRender=!0,Y.adjustRowsAndCols(),F.runHooks("beforeChangeRender",e,t),j.lockEditor(),F._refreshBorders(null),j.unlockEditor(),F.view.adjustElementsSize(),F.runHooks("afterChange",e,t||"edit");const s=F.getActiveEditor();s&&(0,n.isDefined)(s.refreshValue)&&s.refreshValue()}function ae(e,t,o){return Array.isArray(e)?e:[[e,t,o]]}function le(e,t){const o=F.getActiveEditor(),s=F.runHooks("beforeChange",e,t||"edit"),i=e.filter((e=>null!==e));return!1===s||0===i.length?(o&&o.cancelChanges(),[]):i}this.columnIndexMapper.addLocalHook("cacheUpdated",ee),this.rowIndexMapper.addLocalHook("cacheUpdated",ee),this.selection.addLocalHook("afterSetRangeEnd",(e=>{const t=(0,u.createObjectPropListener)(!1),o=this.selection.getSelectedRange(),{from:s,to:r}=o.current(),n=o.size()-1;this.runHooks("afterSelection",s.row,s.col,r.row,r.col,t,n),this.runHooks("afterSelectionByProp",s.row,F.colToProp(s.col),r.row,F.colToProp(r.col),t,n);let a=!0;W&&(a=!1),t.isTouched()&&(a=!t.value);const l=this.selection.selectedRange.current(),h=this.selection.isSelectedByAnyHeader(),d=this.selection.isSelectedByRowHeader(),c=this.selection.isSelectedByColumnHeader();if(!1!==a)if(h)d?this.scrollViewportTo({row:e.row}):c&&this.scrollViewportTo({col:e.col});else if(l&&!this.selection.isMultiple()){const{row:e,col:t}=l.from;e<0&&t>=0?this.scrollViewportTo({col:t}):t<0&&e>=0?this.scrollViewportTo({row:e}):this.scrollViewportTo({row:e,col:t})}else this.scrollViewportTo(e.toObject());d&&c?(0,i.addClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]):d?((0,i.removeClass)(this.rootElement,"ht__selection--columns"),(0,i.addClass)(this.rootElement,"ht__selection--rows")):c?((0,i.removeClass)(this.rootElement,"ht__selection--rows"),(0,i.addClass)(this.rootElement,"ht__selection--columns")):(0,i.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this._refreshBorders(null)})),this.selection.addLocalHook("afterSelectionFinished",(e=>{const t=e.length-1,{from:o,to:s}=e[t];this.runHooks("afterSelectionEnd",o.row,o.col,s.row,s.col,t),this.runHooks("afterSelectionEndByProp",o.row,F.colToProp(o.col),s.row,F.colToProp(s.col),t)})),this.selection.addLocalHook("afterIsMultipleSelection",(e=>{const t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)})),this.selection.addLocalHook("afterDeselect",(()=>{j.destroyEditor(),this._refreshBorders(),(0,i.removeClass)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")})),this.selection.addLocalHook("beforeHighlightSet",(()=>this.runHooks("beforeSelectionHighlightSet"))).addLocalHook("beforeSetRangeStart",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSetRangeStart",...t)})).addLocalHook("beforeSetRangeStartOnly",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSetRangeStartOnly",...t)})).addLocalHook("beforeSetRangeEnd",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSetRangeEnd",...t)})).addLocalHook("beforeSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSelectColumns",...t)})).addLocalHook("afterSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterSelectColumns",...t)})).addLocalHook("beforeSelectRows",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeSelectRows",...t)})).addLocalHook("afterSelectRows",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterSelectRows",...t)})).addLocalHook("beforeModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("modifyTransformStart",...t)})).addLocalHook("afterModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterModifyTransformStart",...t)})).addLocalHook("beforeModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("modifyTransformEnd",...t)})).addLocalHook("afterModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("afterModifyTransformEnd",...t)})).addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeRowWrap",...t)})).addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return s.runHooks("beforeColumnWrap",...t)})).addLocalHook("insertRowRequire",(e=>this.alter("insert_row_above",e,1,"auto"))).addLocalHook("insertColRequire",(e=>this.alter("insert_col_start",e,1,"auto"))),Y={alter(e,t){var o,s;let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;const l=e=>{if(0===e.length)return[];const t=[...e];t.sort(((e,t)=>{let[o]=e,[s]=t;return o===s?0:o>s?1:-1}));return(0,c.arrayReduce)(t,((e,t)=>{let[o,s]=t;const i=e[e.length-1],[r,n]=i,a=r+n;if(o<=a){const e=Math.max(s-(a-o),0);i[1]+=e}else e.push([o,s]);return e}),[t[0]])};switch(e){case"insert_row_below":case"insert_row_above":const a=F.countSourceRows();if(q.maxRows===a)return;const h="insert_row_below"===e?"below":"above";t=null!==(o=t)&&void 0!==o?o:"below"===h?a:0;const{delta:u,startPhysicalIndex:d}=B.createRow(t,i,{source:r,mode:h});if(u){const e=Z.selectedRange.current(),t=null==e?void 0:e.from,o=null==t?void 0:t.row,s=F.toVisualRow(d);if(Z.isSelectedByCorner())Z.selectAll(!0,!0,{disableHeadersHighlight:!0});else if((0,n.isDefined)(o)&&o>=s){const{row:s,col:i}=e.to;let r=t.col;Z.isSelectedByRowHeader()&&(r=-1),Z.getSelectedRange().pop(),Z.setRangeStartOnly(F._createCellCoords(o+u,r),!0),Z.setRangeEnd(F._createCellCoords(s+u,i))}else F._refreshBorders()}break;case"insert_col_start":case"insert_col_end":const g="insert_col_end"===e?"end":"start";t=null!==(s=t)&&void 0!==s?s:"end"===g?F.countSourceCols():0;const{delta:f,startPhysicalIndex:p}=B.createCol(t,i,{source:r,mode:g});if(f){if(Array.isArray(q.colHeaders)){const e=[F.toVisualColumn(p),0];e.length+=f,Array.prototype.splice.apply(q.colHeaders,e)}const e=Z.selectedRange.current(),t=null==e?void 0:e.from,o=null==t?void 0:t.col,s=F.toVisualColumn(p);if(Z.isSelectedByCorner())Z.selectAll(!0,!0,{disableHeadersHighlight:!0});else if((0,n.isDefined)(o)&&o>=s){const{row:s,col:i}=e.to;let r=t.row;Z.isSelectedByColumnHeader()&&(r=-1),Z.getSelectedRange().pop(),Z.setRangeStartOnly(F._createCellCoords(r,o+f),!0),Z.setRangeEnd(F._createCellCoords(s,i+f))}else F._refreshBorders()}break;case"remove_row":const m=e=>{let t=0;(0,c.arrayEach)(e,(e=>{let[o,s]=e;const i=(0,n.isEmpty)(o)?F.countRows()-1:Math.max(o-t,0);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!B.removeRow(o,s,r))return;const a=F.countRows(),l=q.fixedRowsTop;l>=i+1&&(q.fixedRowsTop-=Math.min(s,l-i));const h=q.fixedRowsBottom;h&&i>=a-h&&(q.fixedRowsBottom-=Math.min(s,h)),t+=s}))};Array.isArray(t)?m(l(t)):m([[t,i]]),Y.adjustRowsAndCols(),F._refreshBorders();break;case"remove_col":const w=e=>{let t=0;(0,c.arrayEach)(e,(e=>{let[o,s]=e;const i=(0,n.isEmpty)(o)?F.countCols()-1:Math.max(o-t,0);let a=F.toPhysicalColumn(i);Number.isInteger(o)&&(o=Math.max(o-t,0));if(!B.removeCol(o,s,r))return;const l=q.fixedColumnsStart;l>=i+1&&(q.fixedColumnsStart-=Math.min(s,l-i)),Array.isArray(q.colHeaders)&&(void 0===a&&(a=-1),q.colHeaders.splice(a,s)),t+=s}))};Array.isArray(t)?w(l(t)):w([[t,i]]),Y.adjustRowsAndCols(),F._refreshBorders();break;default:throw new Error(`There is no such action "${e}"`)}a||Y.adjustRowsAndCols()},adjustRowsAndCols(){const e=q.minRows,t=q.minSpareRows,o=q.minCols,s=q.minSpareCols;if(0===F.countRows()&&0===F.countCols()&&Z.deselect(),e){const t=F.countRows();t<e&&B.createRow(t,e-t,{source:"auto"})}if(t){const e=F.countEmptyRows(!0);if(e<t){const o=t-e,s=Math.min(o,q.maxRows-F.countSourceRows());B.createRow(F.countRows(),s,{source:"auto"})}}{let e;(o||s)&&(e=F.countEmptyCols(!0));let t=F.countCols();if(o&&!q.columns&&t<o){const s=o-t;e+=s,B.createCol(t,s,{source:"auto"})}if(s&&!q.columns&&"array"===F.dataType&&e<s){t=F.countCols();const o=s-e,i=Math.min(o,q.maxCols-t);B.createCol(t,i,{source:"auto"})}}if(Z.isSelected()){const e=F.countRows(),t=F.countCols();(0,c.arrayEach)(Z.selectedRange,(o=>{let s=!1,i=o.from.row,r=o.from.col,n=o.to.row,a=o.to.col;i>e-1?(i=e-1,s=!0,n>i&&(n=i)):n>e-1&&(n=e-1,s=!0,i>n&&(i=n)),r>t-1?(r=t-1,s=!0,a>r&&(a=r)):a>t-1&&(a=t-1,s=!0,r>a&&(r=a)),s&&(r<0?F.selectRows(i,n,r):i<0?F.selectColumns(r,a,i):F.selectCell(i,r,n,a))}))}F.view&&F.view.adjustElementsSize()},populateFromArray(e,t,o,s,i){let r,n,a,l;const h=[],d={},g=[],f=e.row,p=e.col;if(n=t.length,0===n)return!1;let m=0,w=0;switch((0,u.isObject)(o)&&(m=o.col-p+1,w=o.row-f+1),i){case"shift_down":const i=(0,c.pivot)(t),C=i.length,v=Math.max(C,m),y=F.getData().slice(f),E=(0,c.pivot)(y).slice(p,p+v);for(a=0;a<v;a+=1)if(a<C){for(r=0,n=i[a].length;r<w-n;r+=1)i[a].push(i[a][r%n]);a<E.length?g.push(i[a].concat(E[a])):g.push(i[a].concat(new Array(y.length).fill(null)))}else g.push(i[a%C].concat(E[a]));F.populateFromArray(f,p,(0,c.pivot)(g));break;case"shift_right":const S=t.length,R=Math.max(S,w),b=F.getData().slice(f).map((e=>e.slice(p)));for(r=0;r<R;r+=1)if(r<S){for(a=0,l=t[r].length;a<m-l;a+=1)t[r].push(t[r][a%l]);if(r<b.length)for(let e=0;e<b[r].length;e+=1)t[r].push(b[r][e]);else t[r].push(...new Array(b[0].length).fill(null))}else t.push(t[r%n].slice(0,R).concat(b[r]));F.populateFromArray(f,p,t);break;default:d.row=e.row,d.col=e.col;let _,T=0,O=0,M=!0;const I=function(e){let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const s=t[e%t.length];return null!==o?s[o%s.length]:s},A=t.length,N=o?o.row-e.row+1:0;for(n=o?N:Math.max(A,N),r=0;r<n&&!(o&&d.row>o.row&&N>A||!q.allowInsertRow&&d.row>F.countRows()-1||d.row>=q.maxRows);r++){const t=r-T,i=I(t).length,c=o?o.col-e.col+1:0;if(l=o?c:Math.max(i,c),d.col=e.col,_=F.getCellMeta(d.row,d.col),"CopyPaste.paste"!==s&&"Autofill.fill"!==s||!_.skipRowOnPaste){for(O=0,a=0;a<l&&!(o&&d.col>o.col&&c>i||!q.allowInsertColumn&&d.col>F.countCols()-1||d.col>=q.maxCols);a++){if(_=F.getCellMeta(d.row,d.col),("CopyPaste.paste"===s||"Autofill.fill"===s)&&_.skipColumnOnPaste){O+=1,d.col+=1,l+=1;continue}if(_.readOnly&&"UndoRedo.undo"!==s){d.col+=1;continue}let e=I(t,a-O),o=F.getDataAtCell(d.row,d.col);if(null!==e&&"object"==typeof e)if(Array.isArray(e)&&null===o&&(o=[]),null===o||"object"!=typeof o)M=!1;else{const t=(0,u.duckSchema)(Array.isArray(o)?o:o[0]||o),s=(0,u.duckSchema)(Array.isArray(e)?e:e[0]||e);(0,u.isObjectEqual)(t,s)||Array.isArray(t)&&Array.isArray(s)?e=(0,u.deepClone)(e):M=!1}else null!==o&&"object"==typeof o&&(M=!1);M&&h.push([d.row,d.col,e]),M=!0,d.col+=1}d.row+=1}else T+=1,d.row+=1,n+=1}F.setDataAtCell(h,null,null,s||"populateFromArray")}}},this.init=function(){U.setData(q.data),F.runHooks("beforeInit"),((0,a.isMobileBrowser)()||(0,a.isIpadOS)())&&(0,i.addClass)(F.rootElement,"mobile"),this.updateSettings(q,!0),this.view=new y.default(this),j=l.default.getInstance(F,q,Z),G=new d.FocusManager(F),(0,b.isRootInstance)(this)&&(0,N.installFocusCatcher)(F),F.runHooks("init"),this.forceFullRender=!0,this.view.render(),z&&null===F.rootElement.offsetParent&&(0,i.observeVisibilityChangeOnce)(F.rootElement,(()=>{F.view._wt.wtOverlays.updateLastSpreaderSize(),F.render(),F.view.adjustElementsSize()})),"object"==typeof z&&(F.runHooks("afterChange",z[0],z[1]),z=!1),F.runHooks("afterInit")},this._createCellCoords=function(e,t){return F.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,o){return F.view._wt.createCellRange(e,t,o)},this.validateCell=function(e,t,o,s){let i=F.getCellValidator(t);function a(e){if(!(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])||!0===t.hidden)return void o(e);const s=t.visualCol,i=t.visualRow,r=F.getCell(i,s,!0);if(r&&"TH"!==r.nodeName){const e=F.rowIndexMapper.getRenderableFromVisualIndex(i),t=F.columnIndexMapper.getRenderableFromVisualIndex(s);F.view._wt.getSetting("cellRenderer",e,t,r)}o(e)}var l;(0,n.isRegExp)(i)&&(l=i,i=function(e,t){t(l.test(e))}),(0,r.isFunction)(i)?(e=F.runHooks("beforeValidate",e,t.visualRow,t.prop,s),F._registerImmediate((()=>{i.call(t,e,(o=>{F&&(o=F.runHooks("afterValidate",o,e,t.visualRow,t.prop,s),t.valid=o,a(o),F.runHooks("postAfterValidate",o,e,t.visualRow,t.prop,s))}))}))):F._registerImmediate((()=>{t.valid=!0,a(t.valid,!1)}))},this.setDataAtCell=function(e,t,o,s){const i=ae(e,t,o),r=[];let n,a,l,h=s;for(n=0,a=i.length;n<a;n++){if("object"!=typeof i[n])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof i[n][1])throw new Error("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");l=i[n][1]>=this.countCols()?i[n][1]:B.colToProp(i[n][1]),r.push([i[n][0],l,U.getAtCell(this.toPhysicalRow(i[n][0]),i[n][1]),i[n][2]])}h||"object"!=typeof e||(h=t);const u=le(r,s);F.runHooks("afterSetDataAtCell",u,h),re(u,h,(()=>{ne(u,h)}))},this.setDataAtRowProp=function(e,t,o,s){const i=ae(e,t,o),r=[];let n,a,l=s;for(n=0,a=i.length;n<a;n++)r.push([i[n][0],i[n][1],U.getAtCell(this.toPhysicalRow(i[n][0]),i[n][1]),i[n][2]]);l||"object"!=typeof e||(l=t);const h=le(r,s);F.runHooks("afterSetDataAtRowProp",h,l),re(h,l,(()=>{ne(h,l)}))},this.listen=function(){F&&!F.isListening()&&(D.forEach((e=>{F!==e&&e.unlisten()})),k=F.guid,F.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(k=null,F.runHooks("afterUnlisten"))},this.isListening=function(){return k===F.guid},this.destroyEditor=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];F._refreshBorders(e,t)},this.populateFromArray=function(e,t,o,s,i,r,n){if("object"!=typeof o||"object"!=typeof o[0])throw new Error("populateFromArray parameter `input` must be an array of arrays");const a="number"==typeof s?F._createCellCoords(s,i):null;return Y.populateFromArray(F._createCellCoords(e,t),o,a,r,n)},this.spliceCol=function(e,t,o){for(var s=arguments.length,i=new Array(s>3?s-3:0),r=3;r<s;r++)i[r-3]=arguments[r];return B.spliceCol(e,t,o,...i)},this.spliceRow=function(e,t,o){for(var s=arguments.length,i=new Array(s>3?s-3:0),r=3;r<s;r++)i[r-3]=arguments[r];return B.spliceRow(e,t,o,...i)},this.getSelected=function(){if(Z.isSelected())return(0,c.arrayMap)(Z.getSelectedRange(),(e=>{let{from:t,to:o}=e;return[t.row,t.col,o.row,o.col]}))},this.getSelectedLast=function(){const e=this.getSelected();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.getSelectedRange=function(){if(Z.isSelected())return Array.from(Z.getSelectedRange())},this.getSelectedRangeLast=function(){const e=this.getSelectedRange();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.emptySelectedCells=function(e){if(!Z.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];(0,c.arrayEach)(Z.getSelectedRange(),(e=>{if(e.isSingleHeader())return;const o=e.getTopStartCorner(),s=e.getBottomEndCorner();(0,v.rangeEach)(o.row,s.row,(e=>{(0,v.rangeEach)(o.col,s.col,(o=>{this.getCellMeta(e,o).readOnly||t.push([e,o,null])}))}))})),t.length>0&&this.setDataAtCell(t,e)},this.isRenderSuspended=function(){return this.renderSuspendedCounter>0},this.suspendRender=function(){this.renderSuspendedCounter+=1},this.resumeRender=function(){const e=this.renderSuspendedCounter-1;this.renderSuspendedCounter=Math.max(e,0),this.isRenderSuspended()||e!==this.renderSuspendedCounter||(this.renderCall?this.render():this._refreshBorders(null))},this.render=function(){this.view&&(this.renderCall=!0,this.forceFullRender=!0,this.isRenderSuspended()||(j.lockEditor(),this._refreshBorders(null),j.unlockEditor()))},this.batchRender=function(e){this.suspendRender();const t=e();return this.resumeRender(),t},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations()},this.resumeExecution=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.executionSuspendedCounter-1;this.executionSuspendedCounter=Math.max(t,0),(!this.isExecutionSuspended()&&t===this.executionSuspendedCounter||e)&&(this.columnIndexMapper.resumeOperations(),this.rowIndexMapper.resumeOperations())},this.batchExecution=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.suspendExecution();const o=e();return this.resumeExecution(t),o},this.batch=function(e){this.suspendRender(),this.suspendExecution();const t=e();return this.resumeExecution(),this.resumeRender(),t},this.refreshDimensions=function(){if(!F.view)return;const{width:e,height:t}=F.view.getLastSize(),{width:o,height:s}=F.rootElement.getBoundingClientRect(),i=o!==e||s!==t;!1===F.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:o,height:s},i)||((i||F.view._wt.wtOverlays.scrollableElement===F.rootWindow)&&(F.view.setLastSize(o,s),F.render()),F.runHooks("afterRefreshDimensions",{width:e,height:t},{width:o,height:s},i))},this.updateData=function(e,t){(0,A.replaceData)(e,(e=>{B=e}),(e=>{B=e,F.columnIndexMapper.fitToLength(this.getInitialColumnCount()),F.rowIndexMapper.fitToLength(this.countSourceRows()),Y.adjustRowsAndCols()}),{hotInstance:F,dataMap:B,dataSource:U,internalSource:"updateData",source:t,metaManager:X,firstRun:z})},this.loadData=function(e,t){(0,A.replaceData)(e,(e=>{B=e}),(()=>{X.clearCellsCache(),F.initIndexMappers(),Y.adjustRowsAndCols(),z&&(z=[null,"loadData"])}),{hotInstance:F,dataMap:B,dataSource:U,internalSource:"loadData",source:t,metaManager:X,firstRun:z})},this.getInitialColumnCount=function(){const e=q.columns;let t=0;if(Array.isArray(e))t=e.length;else if((0,r.isFunction)(e))if("array"===F.dataType){const o=this.countSourceCols();for(let s=0;s<o;s+=1)e(s)&&(t+=1)}else"object"!==F.dataType&&"function"!==F.dataType||(t=B.colToPropCache.length);else if((0,n.isDefined)(q.dataSchema)){const e=B.getSchema();t=Array.isArray(e)?e.length:(0,u.deepObjectSize)(e)}else t=this.countSourceCols();return t},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(e,t,o,s){return(0,n.isUndefined)(e)?B.getAll():B.getRange(F._createCellCoords(e,t),F._createCellCoords(o,s),B.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,o,s){return B.getCopyableText(F._createCellCoords(e,t),F._createCellCoords(o,s))},this.getCopyableData=function(e,t){return B.getCopyable(e,B.colToProp(t))},this.getSchema=function(){return B.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=(z?F.loadData:F.updateData).bind(this);let s,i,a=!1;if((0,n.isDefined)(e.rows))throw new Error('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?');if((0,n.isDefined)(e.cols))throw new Error('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?');if((0,n.isDefined)(e.ganttChart))throw new Error('Since 8.0.0 the "ganttChart" setting is no longer supported.');for(s in e)"data"===s||("language"===s?te(e.language):"className"===s?oe("className",e.className):"tableClassName"===s&&F.table?(oe("tableClassName",e.tableClassName),F.view._wt.wtOverlays.syncOverlayTableClassNames()):T.default.getSingleton().isRegistered(s)||T.default.getSingleton().isDeprecated(s)?((0,r.isFunction)(e[s])||Array.isArray(e[s]))&&(e[s].initialHook=!0,F.addHook(s,e[s])):!t&&(0,u.hasOwnProperty)(e,s)&&(Q[s]=e[s]));void 0===e.data&&void 0===q.data?o(null,"updateSettings"):void 0!==e.data?o(e.data,"updateSettings"):void 0!==e.columns&&(B.createMap(),F.initIndexMappers());const l=F.countCols(),h=q.columns;if(h&&(0,r.isFunction)(h)&&(a=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||X.clearCache(),l>0)for(s=0,i=0;s<l;s++){if(h){const e=a?h(s):h[i];e&&X.updateColumnMeta(i,e)}i+=1}(0,n.isDefined)(e.cell)&&(0,u.objectEach)(e.cell,(e=>{F.setCellMetaObject(e.row,e.col,e)})),F.runHooks("afterCellMetaReset");let d=F.rootElement.style.height;""!==d&&(d=parseInt(F.rootElement.style.height,10));let c=e.height;if((0,r.isFunction)(c)&&(c=c()),t){F.rootElement.getAttribute("style")&&F.rootElement.setAttribute("data-initialstyle",F.rootElement.getAttribute("style"))}if(null===c){const e=F.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?F.rootElement.setAttribute("style",e):(F.rootElement.style.height="",F.rootElement.style.overflow="")}else void 0!==c&&(F.rootElement.style.height=isNaN(c)?`${c}`:`${c}px`,F.rootElement.style.overflow="hidden");if(void 0!==e.width){let t=e.width;(0,r.isFunction)(t)&&(t=t()),F.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}t||(F.view&&(F.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),F.view._wt.exportSettingsAsClassNames()),F.runHooks("afterUpdateSettings",e)),Y.adjustRowsAndCols(),F.view&&!z&&(F.forceFullRender=!0,j.lockEditor(),F._refreshBorders(null),F.view._wt.wtOverlays.adjustElementsSize(),j.unlockEditor()),t||!F.view||""!==d&&""!==c&&void 0!==c||d===c||F.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=F.getSelectedLast();if(q.getValue){if((0,r.isFunction)(q.getValue))return q.getValue.call(F);if(e)return F.getData()[e[0][0]][q.getValue]}else if(e)return F.getDataAtCell(e[0],e[1])},this.getSettings=function(){return q},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,o,s,i){Y.alter(e,t,o,s,i)},this.getCell=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=t,i=e;if(t>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(t)))return null;s=this.columnIndexMapper.getRenderableFromVisualIndex(t)}if(e>=0){if(this.rowIndexMapper.isHidden(this.toPhysicalRow(e)))return null;i=this.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===i||null===s?null:F.view.getCellAtCoords(F._createCellCoords(i,s),o)},this.getCoords=function(e){const t=this.view._wt.wtTable.getCoords(e);if(null===t)return null;const{row:o,col:s}=t;let i=o,r=s;return o>=0&&(i=this.rowIndexMapper.getVisualFromRenderableIndex(o)),s>=0&&(r=this.columnIndexMapper.getVisualFromRenderableIndex(s)),F._createCellCoords(i,r)},this.colToProp=function(e){return B.colToProp(e)},this.propToCol=function(e){return B.propToCol(e)},this.toVisualRow=e=>this.rowIndexMapper.getVisualFromPhysicalIndex(e),this.toVisualColumn=e=>this.columnIndexMapper.getVisualFromPhysicalIndex(e),this.toPhysicalRow=e=>this.rowIndexMapper.getPhysicalFromVisualIndex(e),this.toPhysicalColumn=e=>this.columnIndexMapper.getPhysicalFromVisualIndex(e),this.getDataAtCell=function(e,t){return B.get(e,B.colToProp(t))},this.getDataAtRowProp=function(e,t){return B.get(e,t)},this.getDataAtCol=function(e){const t=[],o=B.getRange(F._createCellCoords(0,e),F._createCellCoords(q.data.length-1,e),B.DESTINATION_RENDERER);for(let e=0;e<o.length;e+=1)for(let s=0;s<o[e].length;s+=1)t.push(o[e][s]);return t},this.getDataAtProp=function(e){const t=[],o=B.getRange(F._createCellCoords(0,B.propToCol(e)),F._createCellCoords(q.data.length-1,B.propToCol(e)),B.DESTINATION_RENDERER);for(let e=0;e<o.length;e+=1)for(let s=0;s<o[e].length;s+=1)t.push(o[e][s]);return t},this.getSourceData=function(e,t,o,s){let i;return i=void 0===e?U.getData():U.getByRange(F._createCellCoords(e,t),F._createCellCoords(o,s)),i},this.getSourceDataArray=function(e,t,o,s){let i;return i=void 0===e?U.getData(!0):U.getByRange(F._createCellCoords(e,t),F._createCellCoords(o,s),!0),i},this.getSourceDataAtCol=function(e){return U.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,o,s){const i=ae(e,t,o),r=this.hasHook("afterSetSourceDataAtCell"),a=[];r&&(0,c.arrayEach)(i,(e=>{let[t,o,s]=e;a.push([t,o,U.getAtCell(t,o),s])})),(0,c.arrayEach)(i,(e=>{let[t,o,s]=e;U.setAtCell(t,o,s)})),r&&this.runHooks("afterSetSourceDataAtCell",a,s),this.render();const l=F.getActiveEditor();l&&(0,n.isDefined)(l.refreshValue)&&l.refreshValue()},this.getSourceDataAtRow=function(e){return U.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return U.getAtCell(e,t)},this.getDataAtRow=function(e){return B.getRange(F._createCellCoords(e,0),F._createCellCoords(e,this.countCols()-1),B.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,o,s){const i=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,o,s],[r,n]=i;let[,,a,l]=i,h=null,u=null;void 0===a&&(a=r),void 0===l&&(l=n);let d="mixed";return(0,v.rangeEach)(Math.max(Math.min(r,a),0),Math.max(r,a),(e=>{let t=!0;return(0,v.rangeEach)(Math.max(Math.min(n,l),0),Math.max(n,l),(o=>{const s=this.getCellMeta(e,o);return u=s.type,h?t=h===u:h=u,t})),d=t?u:"mixed",t})),d},this.removeCellMeta=function(e,t,o){const[s,i]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let r=X.getCellMetaKeyValue(s,i,o);!1!==F.runHooks("beforeRemoveCellMeta",e,t,o,r)&&(X.removeCellMeta(s,i,o),F.runHooks("afterRemoveCellMeta",e,t,o,r)),r=null},this.spliceCellsMeta=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(var o=arguments.length,s=new Array(o>2?o-2:0),i=2;i<o;i++)s[i-2]=arguments[i];if(s.length>0&&!Array.isArray(s[0]))throw new Error("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array.");t>0&&X.removeRow(this.toPhysicalRow(e),t),s.length>0&&(0,c.arrayEach)(s.reverse(),(t=>{X.createRow(this.toPhysicalRow(e)),(0,c.arrayEach)(t,((t,o)=>this.setCellMetaObject(e,o,t)))})),F.render()},this.setCellMetaObject=function(e,t,o){"object"==typeof o&&(0,u.objectEach)(o,((o,s)=>{this.setCellMeta(e,t,s,o)}))},this.setCellMeta=function(e,t,o,s){if(!1===F.runHooks("beforeSetCellMeta",e,t,o,s))return;let i=e,r=t;e<this.countRows()&&(i=this.toPhysicalRow(e)),t<this.countCols()&&(r=this.toPhysicalColumn(t)),X.setCellMeta(i,r,o,s),F.runHooks("afterSetCellMeta",e,t,o,s)},this.getCellsMeta=function(){return X.getCellsMeta()},this.getCellMeta=function(e,t){let o=this.toPhysicalRow(e),s=this.toPhysicalColumn(t);return null===o&&(o=e),null===s&&(s=t),X.getCellMeta(o,s,{visualRow:e,visualColumn:t})},this.getCellMetaAtRow=function(e){return X.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===F.dataType||q.columns)},this.getCellRenderer=function(e,t){const o="number"==typeof e?F.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof o?(0,p.getRenderer)(o):(0,n.isUndefined)(o)?(0,p.getRenderer)("text"):o},this.getCellEditor=function(e,t){const o="number"==typeof e?F.getCellMeta(e,t).editor:e.editor;return"string"==typeof o?(0,m.getEditor)(o):(0,n.isUndefined)(o)?(0,m.getEditor)("text"):o},this.getCellValidator=function(e,t){const o="number"==typeof e?F.getCellMeta(e,t).validator:e.validator;return"string"==typeof o?(0,w.getValidator)(o):o},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){if(!Array.isArray(e))throw new Error("validateRows parameter `rows` must be an array");this._validateCells(t,e)},this.validateColumns=function(e,t){if(!Array.isArray(e))throw new Error("validateColumns parameter `columns` must be an array");this._validateCells(t,void 0,e)},this._validateCells=function(e,t,o){const s=new se;e&&(s.onQueueEmpty=e);let i=F.countRows()-1;for(;i>=0;){if(void 0!==t&&-1===t.indexOf(i)){i-=1;continue}let e=F.countCols()-1;for(;e>=0;)void 0===o||-1!==o.indexOf(e)?(s.addValidatorToQueue(),F.validateCell(F.getDataAtCell(i,e),F.getCellMeta(i,e),(e=>{if("boolean"!=typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(s.valid=!1),s.removeValidatorFormQueue()}),"validateCells"),e-=1):e-=1;i-=1}s.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=q.rowHeaders,o=e;return void 0!==o&&(o=F.runHooks("modifyRowHeader",o)),void 0===o?(t=[],(0,v.rangeEach)(F.countRows()-1,(e=>{t.push(F.getRowHeader(e))}))):Array.isArray(t)&&void 0!==t[o]?t=t[o]:(0,r.isFunction)(t)?t=t(o):t&&"string"!=typeof t&&"number"!=typeof t&&(t=o+1),t},this.hasRowHeaders=function(){return!!q.rowHeaders},this.hasColHeaders=function(){if(void 0!==q.colHeaders&&null!==q.colHeaders)return!!q.colHeaders;for(let e=0,t=F.countCols();e<t;e++)if(F.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const o=F.runHooks("modifyColHeader",e);if(void 0===o){const e=[],t=F.countCols();for(let o=0;o<t;o++)e.push(F.getColHeader(o));return e}let s=q.colHeaders;const i=F.toPhysicalColumn(o),n=function(e){const t=[],o=F.countCols();let s=0;for(;s<o;s++)(0,r.isFunction)(q.columns)&&q.columns(s)&&t.push(s);return t[e]}(i);return!1===q.colHeaders?s=null:q.columns&&(0,r.isFunction)(q.columns)&&q.columns(n)&&q.columns(n).title?s=q.columns(n).title:q.columns&&q.columns[i]&&q.columns[i].title?s=q.columns[i].title:Array.isArray(q.colHeaders)&&void 0!==q.colHeaders[i]?s=q.colHeaders[i]:(0,r.isFunction)(q.colHeaders)?s=q.colHeaders(i):q.colHeaders&&"string"!=typeof q.colHeaders&&"number"!=typeof q.colHeaders&&(s=(0,S.spreadsheetColumnLabel)(o)),s=F.runHooks("modifyColumnHeaderValue",s,e,t),s},this._getColWidthFromSettings=function(e){let t;if(e>=0){t=F.getCellMeta(0,e).width}if(void 0!==t&&t!==q.width||(t=q.colWidths),null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getColWidth=function(e){let t=F._getColWidthFromSettings(e);return t=F.runHooks("modifyColWidth",t,e),void 0===t&&(t=_.ViewportColumnsCalculator.DEFAULT_WIDTH),t},this._getRowHeightFromSettings=function(e){let t=q.rowHeights;if(null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getRowHeight=function(e){let t=F._getRowHeightFromSettings(e);return t=F.runHooks("modifyRowHeight",t,e),t},this.countSourceRows=function(){return U.countRows()},this.countSourceCols=function(){return U.countFirstRowKeys()},this.countRows=function(){return B.getLength()},this.countCols=function(){const e=q.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return F.view._wt.drawn?F.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return F.view._wt.drawn?F.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return F.view._wt.drawn?F.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return F.view._wt.drawn?F.view._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){return this.view.getRowHeadersCount()},this.countColHeaders=function(){return this.view.getColumnHeadersCount()},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,v.rangeEachReverse)(F.countRows()-1,(o=>{if(F.isEmptyRow(o))t+=1;else if(!0===e)return!1})),t},this.countEmptyCols=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return(0,v.rangeEachReverse)(F.countCols()-1,(o=>{if(F.isEmptyCol(o))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return q.isEmptyRow.call(F,e)},this.isEmptyCol=function(e){return q.isEmptyCol.call(F,e)},this.selectCell=function(e,t,o,s){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!(0,n.isUndefined)(e)&&!(0,n.isUndefined)(t)&&this.selectCells([[e,t,o,s]],i,r)},this.selectCells=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&(W=!0);const o=Z.selectCells(e);return o&&t&&F.listen(),W=!1,o},this.selectColumns=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2?arguments[2]:void 0;return Z.selectColumns(e,t,o)},this.selectRows=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2?arguments[2]:void 0;return Z.selectRows(e,t,o)},this.deselectCell=function(){Z.deselect()},this.selectAll=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2?arguments[2]:void 0;W=!0,Z.selectAll(e,t,o),W=!1};const he=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(e){var t,o;"number"==typeof e&&(e={row:arguments[0],col:arguments[1],verticalSnap:arguments[2]?"bottom":"top",horizontalSnap:arguments[3]?"end":"start",considerHiddenIndexes:null===(o=arguments[4])||void 0===o||o});const{row:s,col:i,verticalSnap:r,horizontalSnap:n,considerHiddenIndexes:a}=null!==(t=e)&&void 0!==t?t:{};let l,h,u,d;void 0!==r&&(l="top"===r,h=!l),void 0!==n&&(u="start"===n,d=!u);let c=s,g=i;if(void 0===a||a){const e=Number.isInteger(s)&&s>=0,t=Number.isInteger(i)&&i>=0,o=e?he(this.rowIndexMapper,s):void 0,r=t?he(this.columnIndexMapper,i):void 0;if(null===o||null===r)return!1;c=e?F.rowIndexMapper.getRenderableFromVisualIndex(o):s,g=t?F.columnIndexMapper.getRenderableFromVisualIndex(r):i}const f=Number.isInteger(c),p=Number.isInteger(g);return f&&c>=0&&p&&g>=0?F.view.scrollViewport(F._createCellCoords(c,g),l,d,h,u):f&&c>=0&&(p&&g<0||!p)?F.view.scrollViewportVertically(c,l,h):!!(p&&g>=0&&(f&&c<0||!f))&&F.view.scrollViewportHorizontally(g,d,u)},this.scrollToFocusedCell=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{};if(!this.selection.isSelected())return;this.addHookOnce("afterScroll",e);const{highlight:t}=this.getSelectedRangeLast();this.scrollViewportTo(t.toObject())?this.view.render():(this.removeHook("afterScroll",e),this._registerImmediate((()=>e())))},this.destroy=function(){if(F._clearTimeouts(),F._clearImmediates(),F.view&&F.view.destroy(),U&&U.destroy(),U=null,this.getShortcutManager().destroy(),X.clearCache(),D.delete(this.guid),(0,b.isRootInstance)(F)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,i.empty)(F.rootElement),V.destroy(),j&&j.destroy(),F.batchExecution((()=>{F.rowIndexMapper.unregisterAll(),F.columnIndexMapper.unregisterAll(),J.getItems().forEach((e=>{let[,t]=e;t.destroy()})),J.clear(),F.runHooks("afterDestroy")}),!0),T.default.getSingleton().destroy(F),(0,u.objectEach)(F,((e,t,o)=>{var s;(0,r.isFunction)(e)?o[t]=(s=t,()=>{throw new Error(`The "${s}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==t&&(o[t]=null)})),F.isDestroyed=!0,B&&B.destroy(),B=null,Y=null,Z=null,j=null,F=null},this.getActiveEditor=function(){return j.getActiveEditor()},this.getPlugin=function(e){const t=(0,C.toUpperCaseFirst)(e);return"UndoRedo"===t?this.undoRedo:J.getItem(t)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:J.getId(e)},this.getInstance=function(){return F},this.addHook=function(e,t){T.default.getSingleton().add(e,t,F)},this.hasHook=function(e){return T.default.getSingleton().has(e,F)||T.default.getSingleton().has(e)},this.addHookOnce=function(e,t){T.default.getSingleton().once(e,t,F)},this.removeHook=function(e,t){T.default.getSingleton().remove(e,t,F)},this.runHooks=function(e,t,o,s,i,r,n){return T.default.getSingleton().run(F,e,t,o,s,i,r,n)},this.getTranslatedPhrase=function(e,t){return(0,O.getTranslatedPhrase)(q.language,e,t)},this.toHTML=()=>(0,g.instanceToHTML)(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",(0,g.instanceToHTML)(this)),e.firstElementChild},this.timeouts=[],this._registerTimeout=function(e){let t=e;"function"==typeof t&&(t=setTimeout(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)),this.timeouts.push(t)},this._clearTimeouts=function(){(0,c.arrayEach)(this.timeouts,(e=>{clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){(0,c.arrayEach)(this.immediates,(e=>{clearImmediate(e)}))},this._refreshBorders=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];j.destroyEditor(e),F.view.render(),t&&Z.isSelected()&&j.prepareEditor()},this._getEditorManager=function(){return j},this.isRtl=function(){return"rtl"===F.rootWindow.getComputedStyle(F.rootElement).direction},this.isLtr=function(){return!F.isRtl()},this.getDirectionFactor=function(){return F.isLtr()?1:-1};const ue=(0,x.createShortcutManager)({handleEvent:()=>F.isListening(),beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||F.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",(e=>{!1===e.ctrlKey&&!1===e.metaKey&&ue.releasePressedKeys()})),this.getShortcutManager=function(){return ue},this.getFocusManager=function(){return G},(0,f.getPluginsNames)().forEach((e=>{const t=(0,f.getPlugin)(e);J.addItem(e,new t(this))})),(0,H.registerAllShortcutContexts)(F),ue.setActiveContextName("grid"),T.default.getSingleton().run(F,"construct")},o(63517),o(91683),o(97552);var i=o(83302),r=o(85015),n=o(93315),a=o(37595),l=s(o(6116)),h=s(o(75244)),u=o(22232),d=o(51400),c=o(50095),g=o(52870),f=o(52036),p=o(7462),m=o(83605),w=o(80239),C=o(18609),v=o(68145),y=s(o(54833)),E=s(o(43951)),S=o(65320),R=o(33165),b=o(45433),_=o(21280),T=s(o(56307)),O=o(22489),M=o(8222),I=o(69167),A=o(3177),N=o(41808),P=o(42386),x=o(47152),H=o(29282);let k=null;const D=new Map;new Set},89055:(e,t,o)=>{"use strict";t.__esModule=!0,t.installFocusDetector=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o=e.rootElement,s=r(e),i=r(e);return s.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromTop())),i.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromBottom())),o.firstChild.before(s),o.lastChild.after(i),{activate(){e._registerTimeout((()=>{s.tabIndex=0,i.tabIndex=0}),10)},deactivate(){e._registerTimeout((()=>{s.tabIndex=-1,i.tabIndex=-1}),10)}}};var s=o(83302),i=o(5386);function r(e){const t=e.rootDocument.createElement("input");return t.type="text",t.classList.add("htFocusCatcher"),e.getSettings().ariaTags&&(0,s.setAttribute)(t,[(0,i.A11Y_PRESENTATION)(),(0,i.A11Y_HIDDEN)()]),t}},58954:(e,t,o)=>{"use strict";t.__esModule=!0,t.installFocusCatcher=function(e){const t=function(e){return t=>{if(!t)return null;const o=r(e),s=n(e);return t.col<o.col&&(t.col=o.col),t.col>s.col&&(t.col=s.col),t.row<o.row&&(t.row=o.row),t.row>s.row&&(t.row=s.row),t}}(e);let o;const{activate:a,deactivate:l}=(0,i.installFocusDetector)(e,{onFocusFromTop(){var s;const i=null!==(s=t(o))&&void 0!==s?s:r(e);i&&(e.runHooks("modifyFocusOnTabNavigation","from_above",i),e.selectCell(i.row,i.col)),e.listen()},onFocusFromBottom(){var s;const i=null!==(s=t(o))&&void 0!==s?s:n(e);i&&(e.runHooks("modifyFocusOnTabNavigation","from_below",i),e.selectCell(i.row,i.col)),e.listen()}}),h={wrapped:!1,flipped:!1};let u=!0,d=!1,c=!1;e.addHook("afterListen",(()=>l())),e.addHook("afterUnlisten",(()=>a())),e.addHook("afterSelection",((t,s,i,r,n)=>{var a;(d&&(h.wrapped&&h.flipped||c)&&(c=!1,n.value=!0),u)&&(o=null===(a=e.getSelectedRangeLast())||void 0===a?void 0:a.highlight)})),e.addHook("beforeRowWrap",((e,t,o)=>{h.wrapped=!0,h.flipped=o}));const g={keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:s.GRID_GROUP,group:"focusCatcher"};e.getShortcutManager().getContext("grid").addShortcuts([{...g,callback:()=>{const{tabNavigation:t}=e.getSettings();d=!0,e.getSelectedRangeLast()&&!t&&(u=!1),t||(c=!0)},position:"before"},{...g,callback:t=>{const{tabNavigation:s,autoWrapRow:i}=e.getSettings();if(d=!1,u=!0,!s||!e.selection.isSelected()||i&&h.wrapped&&h.flipped||!i&&h.wrapped)return i&&h.wrapped&&h.flipped&&(o=t.shiftKey?r(e):n(e)),h.wrapped=!1,h.flipped=!1,e.deselectCell(),e.unlisten(),!1;t.preventDefault()},position:"after"}])};var s=o(29282),i=o(89055);function r(e){const{rowIndexMapper:t,columnIndexMapper:o}=e,{navigableHeaders:s}=e.getSettings();let i=s&&e.countColHeaders()>0?-e.countColHeaders():0,r=s&&e.countRowHeaders()>0?-e.countRowHeaders():0;return 0===i&&(i=t.getVisualFromRenderableIndex(i)),0===r&&(r=o.getVisualFromRenderableIndex(r)),null===i||null===r?null:e._createCellCoords(i,r)}function n(e){var t,o;const{rowIndexMapper:s,columnIndexMapper:i}=e,{navigableHeaders:r}=e.getSettings();let n=s.getRenderableIndexesLength()-1,a=i.getRenderableIndexesLength()-1;if(n<0){if(!r||0===e.countColHeaders())return null;n=-1}if(a<0){if(!r||0===e.countColHeaders())return null;a=-1}return e._createCellCoords(null!==(t=s.getVisualFromRenderableIndex(n))&&void 0!==t?t:n,null!==(o=i.getVisualFromRenderableIndex(a))&&void 0!==o?o:a)}},41808:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(58954);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}))},85631:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=o(29270),n=o(65320),a=o(22232),l=o(50095),h=o(68145),u=o(93315);class d{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}constructor(e,t,o){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"metaManager",void 0),(0,i.default)(this,"tableMeta",void 0),(0,i.default)(this,"dataSource",void 0),(0,i.default)(this,"duckSchema",void 0),(0,i.default)(this,"colToPropCache",void 0),(0,i.default)(this,"propToColCache",void 0),this.hot=e,this.metaManager=o,this.tableMeta=o.getTableMeta(),this.dataSource=t,this.duckSchema=this.createDuckSchema(),this.createMap()}createMap(){const e=this.getSchema();if(void 0===e)throw new Error("trying to create `columns` definition but you didn't provide `schema` nor `data`");const t=this.tableMeta.columns;let o;if(this.colToPropCache=[],this.propToColCache=new Map,t){let s=0,i=0,r=!1;if("function"==typeof t){const t=(0,a.deepObjectSize)(e);s=t>0?t:this.countFirstRowKeys(),r=!0}else{const e=this.tableMeta.maxCols;s=Math.min(e,t.length)}for(o=0;o<s;o++){const e=r?t(o):t[o];if((0,a.isObject)(e)){if(void 0!==e.data){const t=r?i:o;this.colToPropCache[t]=e.data,this.propToColCache.set(e.data,t)}i+=1}}}else this.recursiveDuckColumns(e)}countFirstRowKeys(){return(0,n.countFirstRowKeys)(this.dataSource)}recursiveDuckColumns(e,t,o){let s,i=t,r=o;return void 0===i&&(i=0,r=""),"object"!=typeof e||Array.isArray(e)||(0,a.objectEach)(e,((e,t)=>{null===e?(s=r+t,this.colToPropCache.push(s),this.propToColCache.set(s,i),i+=1):i=this.recursiveDuckColumns(e,i,`${t}.`)})),i}colToProp(e){if(!1===Number.isInteger(e))return e;const t=this.hot.toPhysicalColumn(e);return null===t?e:this.colToPropCache&&(0,u.isDefined)(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){const t=this.propToColCache.get(e);if((0,u.isDefined)(t))return this.hot.toVisualColumn(t);const o=this.hot.toVisualColumn(e);return null===o?e:o}getSchema(){const e=this.tableMeta.dataSchema;return e?"function"==typeof e?e():e:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?(0,a.duckSchema)(this.dataSource[0]):{}}refreshDuckSchema(){this.duckSchema=this.createDuckSchema()}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:o,mode:s="above"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=this.hot.countSourceRows();let r=i,n=0,l=e;("number"!=typeof l||l>=i)&&(l=i),l<this.hot.countRows()&&(r=this.hot.toPhysicalRow(l));if(!1===this.hot.runHooks("beforeCreateRow",l,t,o)||null===r)return{delta:0};const u=this.tableMeta.maxRows,d=this.getSchema().length,c=[];for(;n<t&&i+n<u;){let e=null;"array"===this.hot.dataType?this.tableMeta.dataSchema?e=(0,a.deepClone)(this.getSchema()):(e=[],(0,h.rangeEach)(d-1,(()=>e.push(null)))):"function"===this.hot.dataType?e=this.tableMeta.dataSchema(l+n):(e={},(0,a.deepExtend)(e,this.getSchema())),c.push(e),n+=1}this.hot.rowIndexMapper.insertIndexes(l,n),"below"===s&&(r=Math.min(r+1,i)),this.spliceData(r,0,c);const g=this.hot.toVisualRow(r);return this.hot.countSourceRows()===c.length&&this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount()),n>0&&(null==e?this.metaManager.createRow(null,n):"auto"!==o&&this.metaManager.createRow(r,t)),this.hot.runHooks("afterCreateRow",g,n,o),this.hot.forceFullRender=!0,{delta:n,startPhysicalIndex:r}}createCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:o,mode:s="start"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.hot.isColumnModificationAllowed())throw new Error("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting.If you want to be able to add new columns, you have to use array datasource.");const i=this.dataSource,r=this.tableMeta.maxCols,n=this.hot.countSourceCols();let a=e;("number"!=typeof a||a>=n)&&(a=n);if(!1===this.hot.runHooks("beforeCreateCol",a,t,o))return{delta:0};let l=n;a<this.hot.countCols()&&(l=this.hot.toPhysicalColumn(a));const h=this.hot.countSourceRows();let u=this.hot.countCols(),d=0,c=l;"end"===s&&(c=Math.min(c+1,n));const g=c;for(;d<t&&u<r;){if("number"!=typeof a||a>=u)if(h>0)for(let e=0;e<h;e+=1)void 0===i[e]&&(i[e]=[]),i[e].push(null);else i.push([null]);else for(let e=0;e<h;e++)i[e].splice(c,0,null);d+=1,c+=1,u+=1}this.hot.columnIndexMapper.insertIndexes(a,d),d>0&&(null==e?this.metaManager.createColumn(null,d):"auto"!==o&&this.metaManager.createColumn(g,t));const f=this.hot.toVisualColumn(g);return this.hot.runHooks("afterCreateCol",f,d,o),this.hot.forceFullRender=!0,this.refreshDuckSchema(),{delta:d,startPhysicalIndex:g}}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0,s=Number.isInteger(e)?e:-t;const i=this.visualRowsToPhysical(s,t),r=this.hot.countSourceRows();s=(r+s)%r;if(!1===this.hot.runHooks("beforeRemoveRow",s,i.length,i,o))return!1;const n=i.length;if(this.filterData(s,n,i),s<this.hot.countRows()){this.hot.rowIndexMapper.removeIndexes(i);const e=(0,u.isDefined)(this.tableMeta.columns)||(0,u.isDefined)(this.tableMeta.dataSchema);0===this.hot.rowIndexMapper.getNotTrimmedIndexesLength()&&!1===e&&this.hot.columnIndexMapper.setIndexesSequence([])}return i.slice(0).sort(((e,t)=>t-e)).forEach((e=>{this.metaManager.removeRow(e,1)})),this.hot.runHooks("afterRemoveRow",s,n,i,o),this.hot.forceFullRender=!0,!0}removeCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0;if("object"===this.hot.dataType||this.tableMeta.columns)throw new Error("cannot remove column with object data source or columns option specified");let s="number"!=typeof e?-t:e;s=(this.hot.countCols()+s)%this.hot.countCols();const i=this.visualColumnsToPhysical(s,t),r=i.slice(0).sort(((e,t)=>t-e));if(!1===this.hot.runHooks("beforeRemoveCol",s,t,i,o))return!1;let n=!0;const a=r.length,l=this.dataSource;for(let e=0;e<a;e++)n&&i[0]!==i[e]-e&&(n=!1);if(n)for(let e=0,o=this.hot.countSourceRows();e<o;e++)l[e].splice(i[0],t),0===e&&this.metaManager.removeColumn(i[0],t);else for(let e=0,t=this.hot.countSourceRows();e<t;e++)for(let t=0;t<a;t++)l[e].splice(r[t],1),0===e&&this.metaManager.removeColumn(r[t],1);return s<this.hot.countCols()&&(this.hot.columnIndexMapper.removeIndexes(i),0===this.hot.columnIndexMapper.getNotTrimmedIndexesLength()&&this.hot.rowIndexMapper.setIndexesSequence([])),this.hot.runHooks("afterRemoveCol",s,t,i,o),this.hot.forceFullRender=!0,this.refreshDuckSchema(),!0}spliceCol(e,t,o){const s=this.hot.getDataAtCol(e),i=s.slice(t,t+o),r=s.slice(t+o);for(var n=arguments.length,a=new Array(n>3?n-3:0),h=3;h<n;h++)a[h-3]=arguments[h];(0,l.extendArray)(a,r);let u=0;for(;u<o;)a.push(null),u+=1;return(0,l.to2dArray)(a),this.hot.populateFromArray(t,e,a,null,null,"spliceCol"),i}spliceRow(e,t,o){const s=this.hot.getSourceDataAtRow(e),i=s.slice(t,t+o),r=s.slice(t+o);for(var n=arguments.length,a=new Array(n>3?n-3:0),h=3;h<n;h++)a[h-3]=arguments[h];(0,l.extendArray)(a,r);let u=0;for(;u<o;)a.push(null),u+=1;return this.hot.populateFromArray(e,t,[a],null,null,"spliceRow"),i}spliceData(e,t,o){if(!1!==this.hot.runHooks("beforeDataSplice",e,t,o)){const t=[...this.dataSource.slice(0,e),...o,...this.dataSource.slice(e)];this.dataSource.length=0,t.forEach((e=>this.dataSource.push(e)))}}filterData(e,t,o){let s=this.hot.runHooks("filterData",e,t,o);!1===Array.isArray(s)&&(s=this.dataSource.filter(((e,t)=>-1===o.indexOf(t)))),this.dataSource.length=0,Array.prototype.push.apply(this.dataSource,s)}get(e,t){const o=this.hot.toPhysicalRow(e);let s=this.dataSource[o];const i=this.hot.runHooks("modifyRowData",o);s=isNaN(i)?i:s;let r=null;if(s&&s.hasOwnProperty&&(0,a.hasOwnProperty)(s,t))r=s[t];else if("string"==typeof t&&t.indexOf(".")>-1){const e=t.split(".");let o=s;if(!o)return null;for(let t=0,s=e.length;t<s;t++)if(o=o[e[t]],void 0===o)return null;r=o}else"function"==typeof t&&(r=t(this.dataSource.slice(o,o+1)[0]));if(this.hot.hasHook("modifyData")){const e=(0,a.createObjectPropListener)(r);this.hot.runHooks("modifyData",o,this.propToCol(t),e,"get"),e.isTouched()&&(r=e.value)}return r}getCopyable(e,t){return this.hot.getCellMeta(e,this.propToCol(t)).copyable?this.get(e,t):""}set(e,t,o){const s=this.hot.toPhysicalRow(e);let i=o,r=this.dataSource[s];const n=this.hot.runHooks("modifyRowData",s);if(r=isNaN(n)?n:r,this.hot.hasHook("modifyData")){const e=(0,a.createObjectPropListener)(i);this.hot.runHooks("modifyData",s,this.propToCol(t),e,"set"),e.isTouched()&&(i=e.value)}if(r&&r.hasOwnProperty&&(0,a.hasOwnProperty)(r,t))r[t]=i;else if("string"==typeof t&&t.indexOf(".")>-1){const e=t.split(".");let o,s=r,n=0;for(n=0,o=e.length-1;n<o;n++)void 0===s[e[n]]&&(s[e[n]]={}),s=s[e[n]];s[e[n]]=i}else"function"==typeof t?t(this.dataSource.slice(s,s+1)[0],i):r[t]=i}visualRowsToPhysical(e,t){const o=this.hot.countSourceRows(),s=[];let i,r=(o+e)%o,n=t;for(;r<o&&n;)i=this.hot.toPhysicalRow(r),s.push(i),n-=1,r+=1;return s}visualColumnsToPhysical(e,t){const o=this.hot.countCols(),s=[];let i=(o+e)%o,r=t;for(;i<o&&r;){const e=this.hot.toPhysicalColumn(i);s.push(e),r-=1,i+=1}return s}clear(){for(let e=0;e<this.hot.countSourceRows();e++)for(let t=0;t<this.hot.countCols();t++)this.set(e,this.colToProp(t),"")}getLength(){const e=this.tableMeta.maxRows;let t;t=e<0||0===e?0:e||1/0;const o=this.hot.rowIndexMapper.getNotTrimmedIndexesLength();return Math.min(o,t)}getAll(){const e={row:0,col:0},t={row:Math.max(this.hot.countRows()-1,0),col:Math.max(this.hot.countCols()-1,0)};return e.row-t.row!=0||this.hot.countSourceRows()?this.getRange(e,t,d.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(e,t,o){const s=[];let i,r,n;const a=this.tableMeta.maxRows,l=this.tableMeta.maxCols;if(0===a||0===l)return[];const h=o===d.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,u=Math.min(Math.max(a-1,0),Math.max(e.row,t.row)),c=Math.min(Math.max(l-1,0),Math.max(e.col,t.col));for(i=Math.min(e.row,t.row);i<=u;i++){n=[];const o=i>=0?this.hot.toPhysicalRow(i):i;for(r=Math.min(e.col,t.col);r<=c&&null!==o;r++)n.push(h.call(this,i,this.colToProp(r)));null!==o&&s.push(n)}return s}getText(e,t){return(0,r.stringify)(this.getRange(e,t,d.DESTINATION_RENDERER))}getCopyableText(e,t){return(0,r.stringify)(this.getRange(e,t,d.DESTINATION_CLIPBOARD_GENERATOR))}destroy(){this.hot=null,this.metaManager=null,this.dataSource=null,this.duckSchema=null,this.colToPropCache.length=0,this.propToColCache.clear(),this.propToColCache=void 0}}t.default=d},43951:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(22232),n=o(65320),a=o(50095),l=o(68145),h=o(85015);t.default=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];(0,i.default)(this,"hot",void 0),(0,i.default)(this,"data",void 0),(0,i.default)(this,"dataType","array"),(0,i.default)(this,"colToProp",(()=>{})),(0,i.default)(this,"propToCol",(()=>{})),this.hot=e,this.data=t}modifyRowData(e){let t;return this.hot.hasHook("modifyRowData")&&(t=this.hot.runHooks("modifyRowData",e)),void 0===t||Number.isInteger(t)?this.data[e]:t}getData(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.data&&0!==this.data.length?this.getByRange(null,null,e):this.data}setData(e){this.data=e}getAtColumn(e){const t=[];return(0,a.arrayEach)(this.data,((o,s)=>{const i=this.getAtCell(s,e);t.push(i)})),t}getAtRow(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=void 0===t&&void 0===o;let n=null,a=null;if(n=this.modifyRowData(e),Array.isArray(n))a=[],i?n.forEach(((t,o)=>{a[o]=this.getAtPhysicalCell(e,o,n)})):(0,l.rangeEach)(t,o,(o=>{a[o-t]=this.getAtPhysicalCell(e,o,n)}));else if((0,r.isObject)(n)||(0,h.isFunction)(n))if(a=s?[]:{},!i||s){const i=0,h=this.countFirstRowKeys()-1;(0,l.rangeEach)(i,h,(l=>{const u=this.colToProp(l);if(l>=(t||i)&&l<=(o||h)&&!Number.isInteger(u)){const t=this.getAtPhysicalCell(e,u,n);s?a.push(t):(0,r.setProperty)(a,u,t)}}))}else(0,r.objectEach)(n,((t,o)=>{(0,r.setProperty)(a,o,this.getAtPhysicalCell(e,o,n))}));return a}setAtCell(e,t,o){if(!(e>=this.countRows()||t>=this.countFirstRowKeys())){if(this.hot.hasHook("modifySourceData")){const s=(0,r.createObjectPropListener)(o);this.hot.runHooks("modifySourceData",e,t,s,"set"),s.isTouched()&&(o=s.value)}Number.isInteger(t)?this.data[e][t]=o:(0,r.setProperty)(this.data[e],t,o)}}getAtPhysicalCell(e,t,o){let s=null;if(o&&(s="string"==typeof t?(0,r.getProperty)(o,t):"function"==typeof t?t(o):o[t]),this.hot.hasHook("modifySourceData")){const o=(0,r.createObjectPropListener)(s);this.hot.runHooks("modifySourceData",e,t,o,"get"),o.isTouched()&&(s=o.value)}return s}getAtCell(e,t){const o=this.modifyRowData(e);return this.getAtPhysicalCell(e,this.colToProp(t),o)}getByRange(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=!1,i=null,r=null,n=null,a=null;null===e||null===t?(s=!0,i=0,n=this.countRows()-1):(i=Math.min(e.row,t.row),r=Math.min(e.col,t.col),n=Math.max(e.row,t.row),a=Math.max(e.col,t.col));const h=[];return(0,l.rangeEach)(i,n,(e=>{h.push(s?this.getAtRow(e,void 0,void 0,o):this.getAtRow(e,r,a,o))})),h}countRows(){if(this.hot.hasHook("modifySourceLength")){const e=this.hot.runHooks("modifySourceLength");if(Number.isInteger(e))return e}return this.data.length}countFirstRowKeys(){return(0,n.countFirstRowKeys)(this.data)}destroy(){this.data=null,this.hot=null}}},3177:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(85631));t.DataMap=i.default;var r=s(o(10146));t.MetaManager=r.default;var n=s(o(87574));t.metaSchemaFactory=n.default;var a=o(73046);t.replaceData=a.replaceData;var l=o(24298);t.DynamicCellMetaMod=l.DynamicCellMetaMod;var h=o(63511);t.ExtendMetaPropertiesMod=h.ExtendMetaPropertiesMod},10146:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(23373)),r=s(o(34624)),n=s(o(22142)),a=s(o(7083)),l=s(o(65718)),h=o(22232);class u{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.hot=e,this.globalMeta=new i.default(e),this.tableMeta=new r.default(this.globalMeta),this.columnMeta=new n.default(this.globalMeta),this.cellMeta=new a.default(this.columnMeta),o.forEach((e=>new e(this))),this.globalMeta.updateMeta(t)}getGlobalMeta(){return this.globalMeta.getMeta()}updateGlobalMeta(e){this.globalMeta.updateMeta(e)}getTableMeta(){return this.tableMeta.getMeta()}updateTableMeta(e){this.tableMeta.updateMeta(e)}getColumnMeta(e){return this.columnMeta.getMeta(e)}updateColumnMeta(e,t){this.columnMeta.updateMeta(e,t)}getCellMeta(e,t,o){let{visualRow:s,visualColumn:i}=o;const r=this.cellMeta.getMeta(e,t);return r.visualRow=s,r.visualCol=i,r.row=e,r.col=t,this.runLocalHooks("afterGetCellMeta",r),r}getCellMetaKeyValue(e,t,o){if("string"!=typeof o)throw new Error("The passed cell meta object key is not a string");return this.cellMeta.getMeta(e,t,o)}setCellMeta(e,t,o,s){this.cellMeta.setMeta(e,t,o,s)}updateCellMeta(e,t,o){this.cellMeta.updateMeta(e,t,o)}removeCellMeta(e,t,o){this.cellMeta.removeMeta(e,t,o)}getCellsMeta(){return this.cellMeta.getMetas()}getCellsMetaAtRow(e){return this.cellMeta.getMetasAtRow(e)}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createRow(e,t)}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeRow(e,t)}createColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createColumn(e,t),this.columnMeta.createColumn(e,t)}removeColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeColumn(e,t),this.columnMeta.removeColumn(e,t)}clearCellsCache(){this.cellMeta.clearCache()}clearCache(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}}t.default=u,(0,h.mixin)(u,l.default)},32156:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(50095),n=o(8972);let a;a=Symbol.iterator;t.default=class{constructor(e){(0,i.default)(this,"valueFactory",void 0),(0,i.default)(this,"data",[]),(0,i.default)(this,"index",[]),(0,i.default)(this,"holes",new Set),this.valueFactory=e}obtain(e){(0,n.assert)((()=>(0,n.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=this._getStorageIndexByKey(e);let o;if(t>=0)o=this.data[t],void 0===o&&(o=this.valueFactory(e),this.data[t]=o);else if(o=this.valueFactory(e),this.holes.size>0){const t=this.holes.values().next().value;this.holes.delete(t),this.data[t]=o,this.index[e]=t}else this.data.push(o),this.index[e]=this.data.length-1;return o}insert(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,n.assert)((()=>(0,n.isUnsignedNumber)(e)||(0,n.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const o=[],s=this.data.length;for(let e=0;e<t;e++)o.push(s+e),this.data.push(void 0);const i=(0,n.isNullish)(e)?this.index.length:e;this.index=[...this.index.slice(0,i),...o,...this.index.slice(i)]}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;(0,n.assert)((()=>(0,n.isUnsignedNumber)(e)||(0,n.isNullish)(e)),"Expecting an unsigned number or null/undefined argument.");const o=this.index.splice((0,n.isNullish)(e)?this.index.length-t:e,t);for(let e=0;e<o.length;e++){const t=o[e];"number"==typeof t&&this.holes.add(t)}}size(){return this.data.length-this.holes.size}values(){return(0,r.arrayFilter)(this.data,((e,t)=>!this.holes.has(t)))[Symbol.iterator]()}entries(){const e=[];for(let t=0;t<this.data.length;t++){const o=this._getKeyByStorageIndex(t);-1!==o&&e.push([o,this.data[t]])}let t=0;return{next:()=>{if(t<e.length){const o=e[t];return t+=1,{value:o,done:!1}}return{done:!0}}}}clear(){this.data=[],this.index=[],this.holes.clear()}_getStorageIndexByKey(e){return this.index.length>e?this.index[e]:-1}_getKeyByStorageIndex(e){return this.index.indexOf(e)}[a](){return this.entries()}}},7083:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(22232),n=o(8972),a=s(o(32156));t.default=class{constructor(e){(0,i.default)(this,"columnMeta",void 0),(0,i.default)(this,"metas",new a.default((()=>this._createRow()))),this.columnMeta=e}updateMeta(e,t,o){const s=this.getMeta(e,t);(0,r.extend)(s,o),(0,n.extendByMetaType)(s,o)}createRow(e,t){this.metas.insert(e,t)}createColumn(e,t){for(let o=0;o<this.metas.size();o++)this.metas.obtain(o).insert(e,t)}removeRow(e,t){this.metas.remove(e,t)}removeColumn(e,t){for(let o=0;o<this.metas.size();o++)this.metas.obtain(o).remove(e,t)}getMeta(e,t,o){const s=this.metas.obtain(e).obtain(t);return void 0===o?s:s[o]}setMeta(e,t,o,s){var i;const r=this.metas.obtain(e).obtain(t);null===(i=r._automaticallyAssignedMetaProps)||void 0===i||i.delete(o),r[o]=s}removeMeta(e,t,o){delete this.metas.obtain(e).obtain(t)[o]}getMetas(){const e=[],t=Array.from(this.metas.values());for(let o=0;o<t.length;o++)e.push(...t[o].values());return e}getMetasAtRow(e){(0,n.assert)((()=>(0,n.isUnsignedNumber)(e)),"Expecting an unsigned number.");const t=new Map(this.metas);return t.has(e)?Array.from(t.get(e).values()):[]}clearCache(){this.metas.clear()}_createRow(){return new a.default((e=>this._createMeta(e)))}_createMeta(e){return new(this.columnMeta.getMetaConstructor(e))}}},22142:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(22232),n=o(8972),a=s(o(32156));const l=["data","width"];t.default=class{constructor(e){(0,i.default)(this,"globalMeta",void 0),(0,i.default)(this,"metas",new a.default((()=>this._createMeta()))),this.globalMeta=e,this.metas=new a.default((()=>this._createMeta()))}updateMeta(e,t){const o=this.getMeta(e);(0,r.extend)(o,t),(0,n.extendByMetaType)(o,t)}createColumn(e,t){this.metas.insert(e,t)}removeColumn(e,t){this.metas.remove(e,t)}getMeta(e){return this.metas.obtain(e)}getMetaConstructor(e){return this.metas.obtain(e).constructor}clearCache(){this.metas.clear()}_createMeta(){return(0,n.columnFactory)(this.globalMeta.getMetaConstructor(),l).prototype}}},23373:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(22232),n=o(8972),a=s(o(87574));t.default=class{constructor(e){(0,i.default)(this,"metaCtor",class{}),(0,i.default)(this,"meta",void 0),this.meta=this.metaCtor.prototype,(0,r.extend)(this.meta,(0,a.default)()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){var t;(0,r.extend)(this.meta,e),(0,n.extendByMetaType)(this.meta,{...e,type:null!==(t=e.type)&&void 0!==t?t:this.meta.type},e)}}},34624:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(22232),n=o(8972);t.default=class{constructor(e){(0,i.default)(this,"meta",void 0);const t=e.getMetaConstructor();this.meta=new t}getMeta(){return this.meta}updateMeta(e){(0,r.extend)(this.meta,e),(0,n.extendByMetaType)(this.meta,e,e)}}},87574:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(93315),i=o(22232);t.default=()=>({_automaticallyAssignedMetaProps:void 0,activeHeaderClassName:"ht__active_highlight",allowEmpty:!0,allowHtml:!1,allowInsertColumn:!0,allowInsertRow:!0,allowInvalid:!0,allowRemoveColumn:!0,allowRemoveRow:!0,ariaTags:!0,autoColumnSize:void 0,autoRowSize:void 0,autoWrapCol:!1,autoWrapRow:!1,bindRowsWithHeaders:void 0,cell:[],cells:void 0,checkedTemplate:void 0,className:void 0,colHeaders:null,collapsibleColumns:void 0,columnHeaderHeight:void 0,columns:void 0,columnSorting:void 0,columnSummary:void 0,colWidths:void 0,commentedCellClassName:"htCommentCell",comments:!1,contextMenu:void 0,copyable:!0,copyPaste:!0,correctFormat:!1,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,data:void 0,dataSchema:void 0,dateFormat:"DD/MM/YYYY",datePickerConfig:void 0,defaultDate:void 0,disableVisualSelection:!1,dragToScroll:!0,dropdownMenu:void 0,editor:void 0,enterBeginsEditing:!0,enterMoves:{col:0,row:1},fillHandle:{autoInsertRow:!1},filter:!0,filteringCaseSensitive:!1,filters:void 0,fixedColumnsLeft:0,fixedColumnsStart:0,fixedRowsBottom:0,fixedRowsTop:0,formulas:void 0,fragmentSelection:!1,height:void 0,hiddenColumns:void 0,hiddenRows:void 0,invalidCellClassName:"htInvalid",imeFastEdit:!1,isEmptyCol(e){let t,o,i;for(t=0,o=this.countRows();t<o;t++)if(i=this.getDataAtCell(t,e),!1===(0,s.isEmpty)(i))return!1;return!0},isEmptyRow(e){let t,o,r,n;for(t=0,o=this.countCols();t<o;t++)if(r=this.getDataAtCell(e,t),!1===(0,s.isEmpty)(r))return"object"==typeof r&&(n=this.getCellMeta(e,t),(0,i.isObjectEqual)(this.getSchema()[n.prop],r));return!0},label:void 0,language:"en-US",layoutDirection:"inherit",licenseKey:void 0,locale:"en-US",manualColumnFreeze:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,maxCols:1/0,maxRows:1/0,mergeCells:!1,minCols:0,minRows:0,minSpareCols:0,minSpareRows:0,multiColumnSorting:void 0,navigableHeaders:!1,tabNavigation:!0,nestedHeaders:void 0,nestedRows:void 0,noWordWrapClassName:"htNoWrap",numericFormat:void 0,observeDOMVisibility:!0,outsideClickDeselects:!0,persistentState:void 0,placeholder:void 0,placeholderCellClassName:"htPlaceholder",preventOverflow:!1,preventWheel:!1,readOnly:!1,readOnlyCellClassName:"htDimmed",renderAllRows:!1,renderAllColumns:!1,renderer:void 0,rowHeaders:void 0,rowHeaderWidth:void 0,rowHeights:void 0,search:!1,selectionMode:"multiple",selectOptions:void 0,skipColumnOnPaste:!1,skipRowOnPaste:!1,sortByRelevance:!0,source:void 0,startCols:5,startRows:5,stretchH:"none",strict:void 0,tableClassName:void 0,tabMoves:{row:0,col:1},title:void 0,trimDropdown:!0,trimRows:void 0,trimWhitespace:!0,type:"text",uncheckedTemplate:void 0,undo:void 0,validator:void 0,viewportColumnRenderingOffset:"auto",viewportRowRenderingOffset:"auto",visibleRows:10,width:void 0,wordWrap:!0})},24298:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=s(o(56307)),n=o(22232),a=o(85015);t.DynamicCellMetaMod=class{constructor(e){(0,i.default)(this,"metaManager",void 0),(0,i.default)(this,"metaSyncMemo",new Map),this.metaManager=e,e.addLocalHook("afterGetCellMeta",(e=>this.extendCellMeta(e))),r.default.getSingleton().add("beforeRender",(e=>{e&&this.metaSyncMemo.clear()}),this.metaManager.hot)}extendCellMeta(e){var t;const{row:o,col:s}=e;if(null!==(t=this.metaSyncMemo.get(o))&&void 0!==t&&t.has(s))return;const{visualRow:i,visualCol:r}=e,l=this.metaManager.hot,h=l.colToProp(r);e.prop=h,l.runHooks("beforeGetCellMeta",i,r,e);const u=(0,n.hasOwnProperty)(e,"type")?e.type:null;let d=(0,a.isFunction)(e.cells)?e.cells(o,s,h):null;var c;u&&(d?d.type=null!==(c=d.type)&&void 0!==c?c:u:d={type:u});d&&this.metaManager.updateCellMeta(o,s,d),l.runHooks("afterGetCellMeta",i,r,e),this.metaSyncMemo.has(o)||this.metaSyncMemo.set(o,new Set),this.metaSyncMemo.get(o).add(s)}}},63511:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231));t.ExtendMetaPropertiesMod=class{constructor(e){(0,i.default)(this,"metaManager",void 0),(0,i.default)(this,"usageTracker",new Set),(0,i.default)(this,"propDescriptors",new Map([["ariaTags",{onChange(e,t,o){if(!o)throw new Error(`The \`${e}\` option can not be updated after the Handsontable instance was initialized.`)}}],["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(e){if(this.metaManager.hot.isRtl()&&"fixedColumnsLeft"===e)throw new Error("The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`.");if(this.usageTracker.has("fixedColumnsLeft")&&this.usageTracker.has("fixedColumnsStart"))throw new Error("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`.")}}],["layoutDirection",{onChange(e,t,o){if(!o)throw new Error(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)}}],["renderAllColumns",{onChange(e,t,o){if(!o)throw new Error(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)}}],["renderAllRows",{onChange(e,t,o){if(!o)throw new Error(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)}}]])),this.metaManager=e,this.extendMetaProps()}extendMetaProps(){this.propDescriptors.forEach(((e,t)=>{const{target:o,onChange:s=(()=>{})}=e,i="string"==typeof o,r=i?o:t,n=`_${r}`;this.metaManager.globalMeta.meta[n]=this.metaManager.globalMeta.meta[r],this.installPropWatcher(t,n,s),i&&this.installPropWatcher(o,n,s)}))}installPropWatcher(e,t,o){const s=this;Object.defineProperty(this.metaManager.globalMeta.meta,e,{get(){return this[t]},set(i){const r=!s.usageTracker.has(e);s.usageTracker.add(e),o.call(s,e,i,r),this[t]=i},enumerable:!0,configurable:!0})}}},8972:(e,t,o)=>{"use strict";t.__esModule=!0,t.assert=function(e,t){if(!e())throw new Error(`Assertion failed: ${t}`)},t.columnFactory=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];function o(){}(0,s.inherit)(o,e);for(let e=0;e<t.length;e++)o.prototype[t[e]]=void 0;return o},t.extendByMetaType=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const r="string"==typeof t.type?(0,i.getCellType)(t.type):t.type;e._automaticallyAssignedMetaProps&&(0,s.objectEach)(t,((t,o)=>{e._automaticallyAssignedMetaProps.delete(o)}));if(!(0,s.isObject)(r))return;o!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);const n={};(0,s.objectEach)(r,((t,i)=>{var r;(function(e,t){var o;if("CELL_TYPE"===e)return!1;return(null===(o=t._automaticallyAssignedMetaProps)||void 0===o?void 0:o.has(e))||!(0,s.hasOwnProperty)(t,e)})(i,o)&&(n[i]=t,null===(r=e._automaticallyAssignedMetaProps)||void 0===r||r.add(i))})),(0,s.extend)(e,n)},t.isNullish=function(e){return null==e},t.isUnsignedNumber=function(e){return Number.isInteger(e)&&e>=0},o(91683);var s=o(22232),i=o(65324)},73046:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.replaceData=function(e,t,o,s){const{hotInstance:u,dataMap:d,dataSource:c,internalSource:g,source:f,metaManager:p,firstRun:m}=s,w=(0,i.toUpperCaseFirst)(g),C=u.getSettings();Array.isArray(C.dataSchema)?u.dataType="array":(0,r.isFunction)(C.dataSchema)?u.dataType="function":u.dataType="object";d&&d.destroy();e=u.runHooks(`before${w}`,e,m,f);const v=new n.default(u,e,p);if(t(v),"object"==typeof e&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error(`${g} only accepts array of objects or array of arrays (${typeof e} given)`);{const t=v.getSchema();let o;e=[];let s=0,i=0;for(s=0,i=C.startRows;s<i;s++)if("object"!==u.dataType&&"function"!==u.dataType||!C.dataSchema)if("array"===u.dataType)o=(0,a.deepClone)(t[0]),e.push(o);else{o=[];for(let e=0,t=C.startCols;e<t;e++)o.push(null);e.push(o)}else o=(0,a.deepClone)(t),e.push(o)}}Array.isArray(e[0])&&(u.dataType="array");C.data=e,v.dataSource=e,c.data=e,c.dataType=u.dataType,c.colToProp=v.colToProp.bind(v),c.propToCol=v.propToCol.bind(v),c.countCachedColumns=v.countCachedColumns.bind(v),o(v),u.runHooks(`after${w}`,e,m,f),m||(u.runHooks("afterChange",null,g),u.render());u.getSettings().ariaTags&&(0,l.setAttribute)(u.rootElement,[(0,h.A11Y_ROWCOUNT)(-1),(0,h.A11Y_COLCOUNT)(u.countCols()+(u.view?u.countRowHeaders():0))])},o(63517),o(91683);var i=o(18609),r=o(85015),n=s(o(85631)),a=o(22232),l=o(83302),h=o(5386)},6116:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(80151),n=o(24449),a=o(83605),l=s(o(75244)),h=o(93315);function u(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function d(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const c=t.SHORTCUTS_GROUP_NAVIGATION="editorManager.navigation";var g=new WeakSet,f=new WeakSet;class p{constructor(e,t,o){u(this,f),u(this,g),(0,i.default)(this,"hot",void 0),(0,i.default)(this,"tableMeta",void 0),(0,i.default)(this,"selection",void 0),(0,i.default)(this,"eventManager",void 0),(0,i.default)(this,"destroyed",!1),(0,i.default)(this,"lock",!1),(0,i.default)(this,"activeEditor",void 0),(0,i.default)(this,"cellProperties",void 0),this.hot=e,this.tableMeta=t,this.selection=o,this.eventManager=new l.default(e),this.hot.addHook("afterDocumentKeyDown",(e=>d(this,g,m).call(this,e))),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"compositionstart",(e=>{!this.destroyed&&this.hot.isListening()&&this.openEditor("",e)})),this.hot.view._wt.update("onCellDblClick",((e,t,o)=>d(this,f,w).call(this,e,t,o)))}lockEditor(){this.lock=!0}unlockEditor(){this.lock=!1}destroyEditor(e){this.lock||this.closeEditor(e)}getActiveEditor(){return this.activeEditor}prepareEditor(){var e;if(this.lock)return;if(this.activeEditor&&this.activeEditor.isWaiting())return void this.closeEditor(!1,!1,(e=>{e&&this.prepareEditor()}));const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;if(!t||t.isHeader())return;const{row:o,col:s}=t,i=this.hot.runHooks("modifyGetCellCoords",o,s);let r=o,n=s;if(Array.isArray(i)&&([r,n]=i),this.cellProperties=this.hot.getCellMeta(r,n),!this.isCellEditable())return void this.clearActiveEditor();const l=this.hot.getCell(o,s,!0);if(l){const e=this.hot.getCellEditor(this.cellProperties),t=this.hot.colToProp(n),i=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(r),n);this.activeEditor=(0,a.getEditorInstance)(e,this.hot),this.activeEditor.prepare(o,s,t,l,i,this.cellProperties)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.isCellEditable()?(this.activeEditor||(this.hot.scrollToFocusedCell(),this.prepareEditor()),this.activeEditor&&(o&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(e,t))):this.clearActiveEditor()}closeEditor(e,t,o){this.activeEditor?this.activeEditor.finishEditing(e,t,o):o&&o(!1)}closeEditorAndSaveChanges(e){this.closeEditor(!1,e)}closeEditorAndRestoreOriginalValue(e){this.closeEditor(!0,e)}clearActiveEditor(){this.activeEditor=void 0}isCellEditable(){const e=this.hot.getSelectedRangeLast();if(!e)return!1;const t=this.hot.getCellEditor(this.cellProperties),{row:o,col:s}=e.highlight,{rowIndexMapper:i,columnIndexMapper:r}=this.hot,n=i.isHidden(this.hot.toPhysicalRow(o))||r.isHidden(this.hot.toPhysicalColumn(s));return!(this.cellProperties.readOnly||!t||n)}moveSelectionAfterEnter(e){const t="function"==typeof this.tableMeta.enterMoves?this.tableMeta.enterMoves(event):this.tableMeta.enterMoves;e?this.selection.transformStart(-t.row,-t.col):this.selection.transformStart(t.row,t.col,!0)}destroy(){this.destroyed=!0,this.eventManager.destroy()}}function m(e){const t=this.hot.getSelectedRangeLast();if(!this.hot.isListening()||!t||t.highlight.isHeader()||(0,n.isImmediatePropagationStopped)(e))return;const{keyCode:o}=e,s=(e.ctrlKey||e.metaKey)&&!e.altKey;if((!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&!((0,r.isFunctionKey)(o)||(0,r.isCtrlMetaKey)(o)||s||this.isEditorOpened())){const t=this.hot.getShortcutManager().getContext("editor"),o={runOnlyIf:()=>(0,h.isDefined)(this.hot.getSelected()),group:c};t.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.hot.selection.transformStart(-1,0)}},{keys:[["ArrowDown"]],callback:()=>{this.hot.selection.transformStart(1,0)}},{keys:[["ArrowLeft"]],callback:()=>{this.hot.selection.transformStart(0,-1*this.hot.getDirectionFactor())}},{keys:[["ArrowRight"]],callback:()=>{this.hot.selection.transformStart(0,this.hot.getDirectionFactor())}}],o),this.openEditor("",e)}}function w(e,t,o){"TD"===o.nodeName&&this.openEditor(null,e,!0)}const C=new WeakMap;p.getInstance=function(e,t,o){let s=C.get(e);return s||(s=new p(e,t,o),C.set(e,s)),s};t.default=p},87857:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=s(o(42538)),n=o(93273),a=o(50095),l=o(83302),h=o(93315),u=o(18609),d=o(80151),c=o(37595),g=o(50695),f=o(5386);function p(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}const m=t.EDITOR_TYPE="autocomplete";var w=new WeakMap;class C extends n.HandsontableEditor{constructor(){super(...arguments),(0,i.default)(this,"query",null),(0,i.default)(this,"strippedChoices",[]),(0,i.default)(this,"rawChoices",[]),p(this,w,{writable:!0,value:this.hot.guid.slice(0,9)}),(0,i.default)(this,"sortByRelevance",(function(e,t,o){const s=[],i=[],r=e.length;let n,a,l,d,c=t.length;if(0===r){for(l=0;l<c;l++)i.push(l);return i}for(l=0;l<c;l++){if(a=(0,u.stripTags)((0,h.stringify)(t[l])),o)d=a.indexOf(e);else{const t=this.cellProperties.locale;d=a.toLocaleLowerCase(t).indexOf(e.toLocaleLowerCase(t))}-1!==d&&(n=a.length-d-r,s.push({baseIndex:l,index:d,charsLeft:n,value:a}))}for(s.sort(((e,t)=>{if(-1===t.index)return-1;if(-1===e.index)return 1;if(e.index<t.index)return-1;if(t.index<e.index)return 1;if(e.index===t.index){if(e.charsLeft<t.charsLeft)return-1;if(e.charsLeft>t.charsLeft)return 1}return 0})),l=0,c=s.length;l<c;l++)i.push(s[l].baseIndex);return i}))}static get EDITOR_TYPE(){return m}getValue(){const e=this.rawChoices.find((e=>this.stripValueIfNeeded(e)===this.TEXTAREA.value));return(0,h.isDefined)(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),(0,l.addClass)(this.htContainer,"autocompleteEditor"),(0,l.addClass)(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,f.A11Y_TEXT)(),(0,f.A11Y_COMBOBOX)(),(0,f.A11Y_HASPOPUP)("listbox"),(0,f.A11Y_AUTOCOMPLETE)()])}prepare(e,t,o,s,i,n){super.prepare(e,t,o,s,i,n),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,f.A11Y_EXPANDED)("false"),(0,f.A11Y_CONTROLS)(`${(0,r.default)(this,w)}-listbox-${e}-${t}`)])}open(){super.open();const e=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown,t=this.hot.getSettings().ariaTags,o=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,s=null==o?void 0:o.length,{row:i,col:n}=this;this.showEditableElement(),this.focus();let a=(0,l.getScrollbarWidth)();0===a&&(0,c.isMacOS)()&&(a+=15),this.addHook("beforeKeyDown",(e=>this.onBeforeKeyDown(e))),this.htEditor.updateSettings({colWidths:e?[(0,l.outerWidth)(this.TEXTAREA)-2]:void 0,width:e?(0,l.outerWidth)(this.TEXTAREA)+a:void 0,autoColumnSize:!0,renderer:(e,i,r,n,a,u,d)=>{(0,g.textRenderer)(e,i,r,n,a,u,d);const{filteringCaseSensitive:c,allowHtml:p,locale:m}=this.cellProperties,w=this.query;let C,v,y=(0,h.stringify)(u);y&&!p&&(C=!0===c?y.indexOf(w):y.toLocaleLowerCase(m).indexOf(w.toLocaleLowerCase(m)),-1!==C&&(v=y.substr(C,w.length),y=y.replace(v,`<strong>${v}</strong>`))),t&&(0,l.setAttribute)(i,[(0,f.A11Y_OPTION)(),...o?[(0,f.A11Y_SETSIZE)(s)]:[],...o?[(0,f.A11Y_POSINSET)(o.indexOf(u)+1)]:[],["id",`${this.htEditor.rootElement.id}_${r}-${n}`]]),i.innerHTML=y},afterSelection:(e,o)=>{if(t){const t=this.htEditor.getCell(e,o,!0);(0,l.setAttribute)(t,[(0,f.A11Y_SELECTED)()]),(0,l.setAttribute)(this.TEXTAREA,...(0,f.A11Y_ACTIVEDESCENDANT)(t.id))}}}),t&&((0,l.setAttribute)(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...(0,f.A11Y_PRESENTATION)()),(0,l.setAttribute)(this.htEditor.rootElement,[(0,f.A11Y_LISTBOX)(),(0,f.A11Y_LIVE)("polite"),(0,f.A11Y_RELEVANT)("text"),["id",`${(0,r.default)(this,w)}-listbox-${i}-${n}`]]),(0,l.setAttribute)(this.TEXTAREA,...(0,f.A11Y_EXPANDED)("true"))),this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}))}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,f.A11Y_EXPANDED)("false")])}discardEditor(e){super.discardEditor(e),this.hot.view.render()}queryChoices(e){const t=this.cellProperties.source;this.query=e,"function"==typeof t?t.call(this.cellProperties,e,(e=>{this.rawChoices=e,this.updateChoicesList(this.stripValuesIfNeeded(e))})):Array.isArray(t)?(this.rawChoices=t,this.updateChoicesList(this.stripValuesIfNeeded(t))):this.updateChoicesList([])}updateChoicesList(e){const t=(0,l.getCaretPosition)(this.TEXTAREA),o=(0,l.getSelectionEndPosition)(this.TEXTAREA),s=this.cellProperties.sortByRelevance,i=this.cellProperties.filter;let r=null,n=null,h=e;s&&(r=this.sortByRelevance(this.stripValueIfNeeded(this.getValue()),h,this.cellProperties.filteringCaseSensitive));const u=Array.isArray(r)?r.length:0;if(!1===i)u&&(n=r[0]);else{const e=[];for(let t=0,o=h.length;t<o&&!(s&&u<=t);t++)u?e.push(h[r[t]]):e.push(h[t]);n=0,h=e}this.strippedChoices=h,this.htEditor.loadData((0,a.pivot)([h])),0===h.length?this.htEditor.rootElement.style.display="none":(this.htEditor.rootElement.style.display="",this.updateDropdownHeight(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(n)),this.hot.listen(),(0,l.setCaretPosition)(this.TEXTAREA,t,t===o?void 0:o)}flipDropdownIfNeeded(){const e=(0,l.getTrimmingContainer)(this.hot.view._wt.wtTable.TABLE),t=e===this.hot.rootWindow,o=this.cellProperties.preventOverflow;if(t||!t&&(o||"horizontal"===o))return!1;const s=(0,l.offset)(this.TEXTAREA),i=(0,l.outerHeight)(this.TEXTAREA),r=this.getDropdownHeight(),n=e.scrollTop,a=(0,l.outerHeight)(this.hot.view._wt.wtTable.THEAD),h=(0,l.offset)(e),u=s.top-h.top-a+n,d=e.scrollHeight-u-a-i,c=r>d&&u>d;return c?this.flipDropdown(r):this.unflipDropdown(),this.limitDropdownIfNeeded(c?u:d,r),c}limitDropdownIfNeeded(e,t){if(t>e){let o=0,s=0,i=0,r=null;do{i=this.htEditor.getRowHeight(s)||this.htEditor.view._wt.getSetting("defaultRowHeight"),o+=i,s+=1}while(o<e);r=o-i,this.htEditor.flipped&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+t-r+"px"),this.setDropdownHeight(o-i)}}flipDropdown(e){const t=this.htEditor.rootElement.style;t.position="absolute",t.top=-e+"px",this.htEditor.flipped=!0}unflipDropdown(){const e=this.htEditor.rootElement.style;e.position="absolute",e.top="",this.htEditor.flipped=void 0}updateDropdownHeight(){const e=this.htEditor.getColWidth(0)+(0,l.getScrollbarWidth)(this.hot.rootDocument)+2,t=this.cellProperties.trimDropdown;this.htEditor.updateSettings({height:this.getDropdownHeight(),width:t?void 0:e}),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e})}highlightBestMatchingChoice(e){"number"==typeof e?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()}getDropdownHeight(){const e=this.htEditor.getRowHeight(0)||23,t=this.cellProperties.visibleRows;return this.strippedChoices.length>=t?t*e:this.strippedChoices.length*e+8}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){const{allowHtml:t}=this.cellProperties,o=(0,a.arrayMap)(e,(e=>(0,h.stringify)(e)));return(0,a.arrayMap)(o,(e=>t?e:(0,u.stripTags)(e)))}allowKeyEventPropagation(e){const t=this.htEditor.getSelectedRangeLast(),o=t?t.from.row:-1;let s=!1;return e===d.KEY_CODES.ARROW_DOWN&&o>0&&o<this.htEditor.countRows()-1&&(s=!0),e===d.KEY_CODES.ARROW_UP&&o>-1&&(s=!0),s}onBeforeKeyDown(e){if((0,d.isPrintableChar)(e.keyCode)||e.keyCode===d.KEY_CODES.BACKSPACE||e.keyCode===d.KEY_CODES.DELETE||e.keyCode===d.KEY_CODES.INSERT){let t=10;if(e.keyCode===d.KEY_CODES.C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(t+=10),this.htEditor&&this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}),t)}}}t.AutocompleteEditor=C},25815:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(87857);t.EDITOR_TYPE=s.EDITOR_TYPE,t.AutocompleteEditor=s.AutocompleteEditor},97296:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(93315),n=o(22232),a=o(6116),l=s(o(4748)),h=o(83302);const u=t.EDITOR_TYPE="base",d=t.EDITOR_STATE=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"}),c=t.SHORTCUTS_GROUP_EDITOR="baseEditor";class g{static get EDITOR_TYPE(){return u}constructor(e){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"state",d.VIRGIN),(0,i.default)(this,"_opened",!1),(0,i.default)(this,"_fullEditMode",!1),(0,i.default)(this,"_closeCallback",null),(0,i.default)(this,"TD",null),(0,i.default)(this,"row",null),(0,i.default)(this,"col",null),(0,i.default)(this,"prop",null),(0,i.default)(this,"originalValue",null),(0,i.default)(this,"cellProperties",null),this.hot=e,this.init()}_fireCallbacks(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)}init(){}getValue(){throw Error("Editor getValue() method unimplemented")}setValue(){throw Error("Editor setValue() method unimplemented")}open(){throw Error("Editor open() method unimplemented")}close(){throw Error("Editor close() method unimplemented")}prepare(e,t,o,s,i,r){this.TD=s,this.row=e,this.col=t,this.prop=o,this.originalValue=i,this.cellProperties=r,this.state=d.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let o,s,i,n;if(t){const e=this.hot.getSelectedLast();o=Math.max(Math.min(e[0],e[2]),0),s=Math.max(Math.min(e[1],e[3]),0),i=Math.max(e[0],e[2]),n=Math.max(e[1],e[3])}else[o,s,i,n]=[this.row,this.col,null,null];const a=this.hot.runHooks("modifyGetCellCoords",o,s);Array.isArray(a)&&([o,s]=a);const l=this.hot.getShortcutManager().getContext("editor"),h={runOnlyIf:()=>(0,r.isDefined)(this.hot.getSelected()),group:c};this.isInFullEditMode()&&l.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{this.hot.selection.transformStart(-1,0)}},{keys:[["ArrowDown"]],callback:()=>{this.hot.selection.transformStart(1,0)}},{keys:[["ArrowLeft"]],callback:()=>{this.hot.selection.transformStart(0,-1*this.hot.getDirectionFactor())}},{keys:[["ArrowRight"]],callback:()=>{this.hot.selection.transformStart(0,this.hot.getDirectionFactor())}}],h),this.hot.populateFromArray(o,s,e,i,n,"edit")}beginEditing(e,t){if(this.state!==d.VIRGIN)return;const o=this.hot,s=o.rowIndexMapper.getRenderableFromVisualIndex(this.row),i=o.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(o.view.scrollViewport(o._createCellCoords(s,i)),this.state=d.EDITING,this.isInFullEditMode()){const t="string"==typeof e?e:(0,r.stringify)(this.originalValue);this.setValue(t)}this.open(t),this._opened=!0,this.focus(),o.view.render(),o.runHooks("afterBeginEditing",this.row,this.col)}finishEditing(e,t,o){let s;if(o){const e=this._closeCallback;this._closeCallback=t=>{e&&e(t),o(t),this.hot.view.render()}}if(this.isWaiting())return;const i=this.hot.getShortcutManager().getContext("editor");if(i.removeShortcutsByGroup(c),i.removeShortcutsByGroup(a.SHORTCUTS_GROUP_NAVIGATION),this.state!==d.VIRGIN){if(this.state===d.EDITING){if(e)return this.cancelChanges(),void this.hot.view.render();const o=this.getValue();s=this.cellProperties.trimWhitespace?[["string"==typeof o?String.prototype.trim.call(o||""):o]]:[[o]],this.state=d.WAITING,this.saveValue(s,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",(e=>{this.state=d.FINISHED,this.discardEditor(e)})):(this.state=d.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout((()=>{this._fireCallbacks(!0)}))}cancelChanges(){this.state=d.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===d.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid)this.hot.selectCell(this.row,this.col),this.focus(),this.state=d.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=d.VIRGIN,this._fireCallbacks(!0);this.hot.getShortcutManager().setActiveContextName("grid")}}enableFullEditMode(){this._fullEditMode=!0}isInFullEditMode(){return this._fullEditMode}isOpened(){return this._opened}isWaiting(){return this.state===d.WAITING}getEditedCellRect(){var e;const t=this.getEditedCell();if(!t)return;const{wtOverlays:o,wtViewport:s}=this.hot.view._wt,i=this.hot.rootWindow,r=(0,h.offset)(t),n=(0,h.outerWidth)(t),a=(0,h.offset)(this.hot.rootElement),l=(0,h.outerWidth)(this.hot.rootElement),u=o.topOverlay.holder,d=o.inlineStartOverlay.holder,c=u!==i?u.scrollTop:0,g=d!==i?d.scrollLeft:0,f=i.innerWidth-a.left-l,{wtTable:p}=null!==(e=o.getParentOverlay(t))&&void 0!==e?e:this.hot.view._wt,m=p.name,w=["master","inline_start"].includes(m)?c:0,C=["master","top","bottom"].includes(m)?g:0,v=r.top===a.top?0:1;let y=r.top-a.top-v-w,E=0;E=this.hot.isRtl()?i.innerWidth-r.left-n-f-1+C:r.left-a.left-1-C,["top","top_inline_start_corner"].includes(m)&&(y+=o.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(m)&&(E+=Math.abs(o.inlineStartOverlay.getOverlayOffset()));const S=this.hot.hasColHeaders(),R=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),b=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),_=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(S&&R<=0||R===_)&&(y+=1),b<=0&&(E+=1);const T=s.rowsRenderCalculator.startPosition,O=s.columnsRenderCalculator.startPosition,M=Math.abs(o.inlineStartOverlay.getScrollPosition()),I=o.topOverlay.getScrollPosition(),A=(0,h.getScrollbarWidth)(this.hot.rootDocument);let N=t.offsetTop;if(["inline_start","master"].includes(m)&&(N+=T-I),["bottom","bottom_inline_start_corner"].includes(m)){const{wtViewport:e,wtTable:t}=o.bottomOverlay.clone;N+=e.getWorkspaceHeight()-t.getHeight()-A}let P=t.offsetLeft;this.hot.isRtl()?(P=P>=0?p.getWidth()-t.offsetLeft:Math.abs(P),P+=O-M-n):["top","master","bottom"].includes(m)&&(P+=O-M);const x=(0,h.getComputedStyle)(this.TD,this.hot.rootWindow),H=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",k=parseInt(x[H],10)>0?0:1,D=parseInt(x.borderTopWidth,10)>0?0:1,L=(0,h.outerWidth)(t)+k,W=(0,h.outerHeight)(t)+D,F=(0,h.hasVerticalScrollbar)(u)?A:0,V=(0,h.hasHorizontalScrollbar)(d)?A:0,B=this.hot.view.maximumVisibleElementWidth(P)-F+k;return{top:y,start:E,height:W,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(N)-V+D,23),width:L,maxWidth:B}}getEditedCellsLayerClass(){switch(this.checkEditorSection()){case"inline-start":return"ht_clone_left ht_clone_inline_start";case"bottom":return"ht_clone_bottom";case"bottom-inline-start-corner":return"ht_clone_bottom_left_corner ht_clone_bottom_inline_start_corner";case"top":return"ht_clone_top";case"top-inline-start-corner":return"ht_clone_top_left_corner ht_clone_top_inline_start_corner";default:return"ht_clone_master"}}getEditedCell(){return this.hot.getCell(this.row,this.col,!0)}checkEditorSection(){const e=this.hot.countRows();let t="";return this.row<this.hot.getSettings().fixedRowsTop?t=this.col<this.hot.getSettings().fixedColumnsStart?"top-inline-start-corner":"top":this.hot.getSettings().fixedRowsBottom&&this.row>=e-this.hot.getSettings().fixedRowsBottom?t=this.col<this.hot.getSettings().fixedColumnsStart?"bottom-inline-start-corner":"bottom":this.col<this.hot.getSettings().fixedColumnsStart&&(t="inline-start"),t}}t.BaseEditor=g,(0,n.mixin)(g,l.default)},48253:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(97296);t.EDITOR_STATE=s.EDITOR_STATE,t.EDITOR_TYPE=s.EDITOR_TYPE,t.BaseEditor=s.BaseEditor},99935:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48253),i=o(83302);const r=t.EDITOR_TYPE="checkbox";class n extends s.BaseEditor{static get EDITOR_TYPE(){return r}beginEditing(e,t){if(t&&"mouseup"===t.type){const e=this.TD.querySelector('input[type="checkbox"]');(0,i.hasClass)(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}t.CheckboxEditor=n},63729:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(99935);t.EDITOR_TYPE=s.EDITOR_TYPE,t.CheckboxEditor=s.CheckboxEditor},23330:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=s(o(33034)),n=s(o(57852)),a=o(5071),l=o(83302),h=o(22232),u=o(80151);o(86856);const d=t.EDITOR_TYPE="date",c="dateEditor";class g extends a.TextEditor{constructor(){super(...arguments),(0,i.default)(this,"defaultDateFormat","DD/MM/YYYY"),(0,i.default)(this,"parentDestroyed",!1),(0,i.default)(this,"$datePicker",null)}static get EDITOR_TYPE(){return d}init(){if("function"!=typeof r.default)throw new Error("You need to include moment.js to your project.");if("function"!=typeof n.default)throw new Error("You need to include Pikaday to your project.");super.init(),this.hot.addHook("afterDestroy",(()=>{this.parentDestroyed=!0,this.destroyElements()}))}createElements(){super.createElements(),this.datePicker=this.hot.rootDocument.createElement("DIV"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=9999,this.datePicker.setAttribute("dir",this.hot.isRtl()?"rtl":"ltr"),(0,l.addClass)(this.datePicker,"htDatepickerHolder"),this.hot.rootDocument.body.appendChild(this.datePicker),this.eventManager.addEventListener(this.datePicker,"mousedown",(e=>{(0,l.hasClass)(e.target,"pika-day")&&this.hideDatepicker(),e.stopPropagation()}))}destroyElements(){const e=this.datePicker.parentNode;this.$datePicker&&this.$datePicker.destroy(),e&&e.removeChild(this.datePicker)}prepare(e,t,o,s,i,r){super.prepare(e,t,o,s,i,r)}open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.hot.getShortcutManager().getContext("editor");super.open(),this.showDatepicker(e),t.addShortcuts([{keys:[["ArrowLeft"]],callback:()=>{this.$datePicker.adjustDate("subtract",1)}},{keys:[["ArrowRight"]],callback:()=>{this.$datePicker.adjustDate("add",1)}},{keys:[["ArrowUp"]],callback:()=>{this.$datePicker.adjustDate("subtract",7)}},{keys:[["ArrowDown"]],callback:()=>{this.$datePicker.adjustDate("add",7)}}],{group:c})}close(){var e;this._opened=!1,null!==(e=this.$datePicker)&&void 0!==e&&e.destroy&&this.$datePicker.destroy(),this.hot._registerTimeout((()=>{this.hot._refreshBorders()}));this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(c),super.close()}finishEditing(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super.finishEditing(e,t)}showDatepicker(e){const t=this.TD.getBoundingClientRect(),o=this.cellProperties.dateFormat||this.defaultDateFormat,s=this.hot.view.isMouseDown(),i=!!e&&(0,u.isFunctionKey)(e.keyCode);let a;this.datePicker.style.display="block",this.$datePicker=new n.default(this.getDatePickerConfig()),"function"==typeof this.$datePicker.useMoment&&this.$datePicker.useMoment(r.default),this.$datePicker._onInputFocus=function(){},this.datePickerStyle.top=`${this.hot.rootWindow.pageYOffset+t.top+(0,l.outerHeight)(this.TD)}px`;let h=this.hot.rootWindow.pageXOffset;h=this.hot.isRtl()?t.right-(0,l.outerWidth)(this.datePicker):t.left,this.datePickerStyle.left=`${h}px`,this.originalValue?(a=this.originalValue,(0,r.default)(a,o,!0).isValid()&&this.$datePicker.setMoment((0,r.default)(a,o),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),i||s||this.setValue("")):this.cellProperties.defaultDate?(a=this.cellProperties.defaultDate,(0,r.default)(a,o,!0).isValid()&&this.$datePicker.setMoment((0,r.default)(a,o),!0),i||s||this.setValue("")):this.$datePicker.gotoToday()}hideDatepicker(){this.datePickerStyle.display="none",this.$datePicker.hide()}getDatePickerConfig(){const e=this.TEXTAREA,t={};this.cellProperties&&this.cellProperties.datePickerConfig&&(0,h.deepExtend)(t,this.cellProperties.datePickerConfig);const o=t.onSelect,s=t.onClose;return t.field=e,t.trigger=e,t.container=this.datePicker,t.bound=!1,t.keyboardInput=!1,t.format=t.format||this.defaultDateFormat,t.reposition=t.reposition||!1,t.isRTL=!1,t.onSelect=e=>{let t=e;isNaN(t.getTime())||(t=(0,r.default)(t).format(this.cellProperties.dateFormat||this.defaultDateFormat)),this.setValue(t),o&&o()},t.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),s&&s()},t}}t.DateEditor=g},58437:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(23330);t.EDITOR_TYPE=s.EDITOR_TYPE,t.DateEditor=s.DateEditor},14733:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=o(25815),r=s(o(56307));const n=t.EDITOR_TYPE="dropdown";class a extends i.AutocompleteEditor{static get EDITOR_TYPE(){return n}prepare(e,t,o,s,i,r){super.prepare(e,t,o,s,i,r),this.cellProperties.filter=!1,this.cellProperties.strict=!0}}t.DropdownEditor=a,r.default.getSingleton().add("beforeValidate",(function(e,t,o){const s=this.getCellMeta(t,this.propToCol(o));s.editor===a&&void 0===s.strict&&(s.filter=!1,s.strict=!0)}))},9535:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(14733);t.EDITOR_TYPE=s.EDITOR_TYPE,t.DropdownEditor=s.DropdownEditor},95567:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071),i=o(83302),r=o(24449),n=o(22232),a=o(6116);const l="handsontableEditor",h=t.EDITOR_TYPE="handsontable";class u extends s.TextEditor{static get EDITOR_TYPE(){return h}open(){super.open(),this.htEditor&&this.htEditor.destroy(),"none"===this.htContainer.style.display&&(this.htContainer.style.display=""),this.htEditor=new this.hot.constructor(this.htContainer,this.htOptions),this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),(0,i.setCaretPosition)(this.TEXTAREA,0,this.TEXTAREA.value.length),this.refreshDimensions()}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}prepare(e,t,o,s,i,r){super.prepare(e,t,o,s,i,r);const a=this,l={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,ariaTags:!1,afterOnCellMouseDown(e,t){const o=this.getSourceData(t.row,t.col);void 0!==o&&a.setValue(o),a.hot.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&(0,n.extend)(l,r.handsontable),this.htOptions=l}beginEditing(e,t){const o=this.hot.getSettings().onBeginEditing;o&&!1===o()||super.beginEditing(e,t)}createElements(){super.createElements();const e=this.hot.rootDocument.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.assignHooks()}finishEditing(e,t,o){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedLast()){const e=this.htEditor.getValue();void 0!==e&&this.setValue(e)}super.finishEditing(e,t,o)}assignHooks(){this.hot.addHook("afterDestroy",(()=>{this.htEditor&&this.htEditor.destroy()}))}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();const t={group:l,relativeToGroup:a.SHORTCUTS_GROUP_NAVIGATION,position:"before"},o=(e,t)=>{const o=this.htEditor;if(void 0!==e&&(e<0||o.flipped&&e>o.countRows()-1?o.deselectCell():o.selectCell(e,0),o.getData().length))return t.preventDefault(),(0,r.stopImmediatePropagation)(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{const t=this.htEditor;let s,i;return!t.getSelectedLast()&&t.flipped?s=t.countRows()-1:t.getSelectedLast()&&(t.flipped?(i=t.getSelectedLast()[0],s=Math.max(0,i-1)):(i=t.getSelectedLast()[0],s=i-1)),o(s,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{const t=this.htEditor;let s,i;if(t.getSelectedLast()||t.flipped){if(t.getSelectedLast())if(t.flipped)s=t.getSelectedLast()[0]+1;else if(!t.flipped){const e=t.countRows()-1;i=t.getSelectedLast()[0],s=Math.min(e,i+1)}}else s=0;return o(s,e)},preventDefault:!1}],t)}unregisterShortcuts(){super.unregisterShortcuts();this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(l)}}t.HandsontableEditor=u},93273:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(95567);t.EDITOR_TYPE=s.EDITOR_TYPE,t.HandsontableEditor=s.HandsontableEditor},74465:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllEditors=function(){(0,f.registerEditor)(i.BaseEditor),(0,f.registerEditor)(s.AutocompleteEditor),(0,f.registerEditor)(r.CheckboxEditor),(0,f.registerEditor)(n.DateEditor),(0,f.registerEditor)(a.DropdownEditor),(0,f.registerEditor)(l.HandsontableEditor),(0,f.registerEditor)(h.NumericEditor),(0,f.registerEditor)(u.PasswordEditor),(0,f.registerEditor)(d.SelectEditor),(0,f.registerEditor)(c.TextEditor),(0,f.registerEditor)(g.TimeEditor)};var s=o(25815);t.AutocompleteEditor=s.AutocompleteEditor,t.AUTOCOMPLETE_EDITOR=s.EDITOR_TYPE;var i=o(48253);t.BaseEditor=i.BaseEditor,t.BASE_EDITOR=i.EDITOR_TYPE;var r=o(63729);t.CheckboxEditor=r.CheckboxEditor,t.CHECKBOX_EDITOR=r.EDITOR_TYPE;var n=o(58437);t.DateEditor=n.DateEditor,t.DATE_EDITOR=n.EDITOR_TYPE;var a=o(9535);t.DropdownEditor=a.DropdownEditor,t.DROPDOWN_EDITOR=a.EDITOR_TYPE;var l=o(93273);t.HandsontableEditor=l.HandsontableEditor,t.HANDSONTABLE_EDITOR=l.EDITOR_TYPE;var h=o(97130);t.NumericEditor=h.NumericEditor,t.NUMERIC_EDITOR=h.EDITOR_TYPE;var u=o(63630);t.PasswordEditor=u.PasswordEditor,t.PASSWORD_EDITOR=u.EDITOR_TYPE;var d=o(93333);t.SelectEditor=d.SelectEditor,t.SELECT_EDITOR=d.EDITOR_TYPE;var c=o(5071);t.TextEditor=c.TextEditor,t.TEXT_EDITOR=c.EDITOR_TYPE;var g=o(65930);t.TimeEditor=g.TimeEditor,t.TIME_EDITOR=g.EDITOR_TYPE;var f=o(83605);t.registerEditor=f.registerEditor,t.RegisteredEditor=f.RegisteredEditor,t._getEditorInstance=f._getEditorInstance,t.getEditor=f.getEditor,t.getEditorInstance=f.getEditorInstance,t.getRegisteredEditorNames=f.getRegisteredEditorNames,t.getRegisteredEditors=f.getRegisteredEditors,t.hasEditor=f.hasEditor},97130:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(47427);t.EDITOR_TYPE=s.EDITOR_TYPE,t.NumericEditor=s.NumericEditor},47427:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071);const i=t.EDITOR_TYPE="numeric";class r extends s.TextEditor{static get EDITOR_TYPE(){return i}}t.NumericEditor=r},63630:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(35356);t.EDITOR_TYPE=s.EDITOR_TYPE,t.PasswordEditor=s.PasswordEditor},35356:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071),i=o(83302),r=o(5386);const n=t.EDITOR_TYPE="password";class a extends s.TextEditor{static get EDITOR_TYPE(){return n}createElements(){super.createElements(),this.TEXTAREA=this.hot.rootDocument.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.setAttribute("data-hot-input",""),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.hot.getSettings().ariaTags&&(0,i.setAttribute)(this.TEXTAREA,[(0,r.A11Y_HIDDEN)()]),(0,i.empty)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}t.PasswordEditor=a},83605:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.RegisteredEditor=c,t.getEditorInstance=t._getEditorInstance=function(e,t){let o;if("function"==typeof e)n.get(e)||g(null,e),o=n.get(e);else{if("string"!=typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');o=l(e)}if(!o)throw Error(`No editor registered under name "${e}"`);return o.getInstance(t)},t.getEditor=function(e){if("function"==typeof e)return e;if(!h(e))throw Error(`No registered editor found under "${e}" name`);return l(e).getConstructor()},t.registerEditor=g,o(91683);var i=s(o(56307)),r=s(o(63800));const n=new WeakMap,{register:a,getItem:l,hasItem:h,getNames:u,getValues:d}=(0,r.default)("editors");function c(e){const t={},o=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new o(e)),t[e.guid]},i.default.getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function g(e,t){e&&"string"!=typeof e&&(e=(t=e).EDITOR_TYPE);const o=new c(t);"string"==typeof e&&a(e,o),n.set(t,o)}t.getRegisteredEditors=d,t.getRegisteredEditorNames=u,t.hasEditor=h},93333:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(82854);t.EDITOR_TYPE=s.EDITOR_TYPE,t.SelectEditor=s.SelectEditor},82854:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48253),i=o(83302),r=o(22232);const n="ht_editor_visible",a="selectEditor",l=t.EDITOR_TYPE="select";class h extends s.BaseEditor{static get EDITOR_TYPE(){return l}init(){this.select=this.hot.rootDocument.createElement("select"),this.select.setAttribute("data-hot-input","true"),this.select.style.display="none",(0,i.addClass)(this.select,"htSelectEditor"),this.hot.rootElement.appendChild(this.select),this.registerHooks()}getValue(){return this.select.value}setValue(e){this.select.value=e}open(){this._opened=!0,this.refreshDimensions(),this.select.style.display="";this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.select.style.display="none",(0,i.hasClass)(this.select,n)&&(0,i.removeClass)(this.select,n),this.unregisterShortcuts(),this.clearHooks()}focus(){this.select.focus()}registerHooks(){this.addHook("afterScrollHorizontally",(()=>this.refreshDimensions())),this.addHook("afterScrollVertically",(()=>this.refreshDimensions())),this.addHook("afterColumnResize",(()=>this.refreshDimensions())),this.addHook("afterRowResize",(()=>this.refreshDimensions()))}prepare(e,t,o,s,n,a){super.prepare(e,t,o,s,n,a);const l=this.cellProperties.selectOptions;let h;h="function"==typeof l?this.prepareOptions(l(this.row,this.col,this.prop)):this.prepareOptions(l),(0,i.empty)(this.select),(0,r.objectEach)(h,((e,t)=>{const o=this.hot.rootDocument.createElement("OPTION");o.value=t,(0,i.fastInnerHTML)(o,e),this.select.appendChild(o)}))}prepareOptions(e){let t={};if(Array.isArray(e))for(let o=0,s=e.length;o<s;o++)t[e[o]]=e[o];else"object"==typeof e&&(t=e);return t}refreshValue(){const e=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()}refreshDimensions(){if(this.state!==s.EDITOR_STATE.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();const{top:e,start:t,width:o,height:r}=this.getEditedCellRect(),a=this.select.style;a.height=`${r}px`,a.width=`${o}px`,a.top=`${e}px`,a[this.hot.isRtl()?"right":"left"]=`${t}px`,a.margin="0px",(0,i.addClass)(this.select,n)}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor"),o=e.getContext("grid"),s={group:a};!1!==this.isInFullEditMode()&&t.addShortcuts([{keys:[["Tab"],["Shift","Tab"]],forwardToContext:o,callback:()=>{}},{keys:[["ArrowUp"]],callback:()=>{const e=this.select.selectedIndex-1;e>=0&&(this.select[e].selected=!0)}},{keys:[["ArrowDown"]],callback:()=>{const e=this.select.selectedIndex+1;e<=this.select.length-1&&(this.select[e].selected=!0)}}],s)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(a)}}t.SelectEditor=h},67547:(e,t,o)=>{"use strict";t.__esModule=!0,t.updateCaretPosition=function(e,t){const o=(0,s.getCaretPosition)(t),i=t.value.split("\n");let r=o,n=0;for(let t=0;t<i.length;t++){const s=i[t];0!==t&&(n+=i[t-1].length+1);const a=n+s.length;if("home"===e?r=n:"end"===e&&(r=a),o<=a)break}(0,s.setCaretPosition)(t,r)};var s=o(83302)},5071:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48917);t.EDITOR_TYPE=s.EDITOR_TYPE,t.TextEditor=s.TextEditor},48917:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(48253),n=s(o(75244)),a=o(37595),l=o(83302),h=o(68145),u=o(65175),d=o(93315),c=o(6116),g=o(97296),f=o(67547),p=o(5386);const m="ht_editor_hidden",w="textEditor",C=t.EDITOR_TYPE="text";class v extends r.BaseEditor{static get EDITOR_TYPE(){return C}constructor(e){super(e),(0,i.default)(this,"eventManager",new n.default(this)),(0,i.default)(this,"autoResize",(0,u.createInputElementResizer)(this.hot.rootDocument)),(0,i.default)(this,"TEXTAREA",void 0),(0,i.default)(this,"textareaStyle",void 0),(0,i.default)(this,"TEXTAREA_PARENT",void 0),(0,i.default)(this,"textareaParentStyle",void 0),(0,i.default)(this,"layerClass",void 0),this.eventManager=new n.default(this),this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",(()=>this.destroy()))}getValue(){return this.TEXTAREA.value}setValue(e){this.TEXTAREA.value=e}open(){this.refreshDimensions(),this.showEditableElement(),this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this.autoResize.unObserve(),(0,l.isThisHotChild)(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts()}prepare(e,t,o,s,i,n){const a=this.state;if(super.prepare(e,t,o,s,i,n),!n.readOnly){this.refreshDimensions(!0);const{allowInvalid:e}=n;e&&(this.TEXTAREA.value=""),a!==r.EDITOR_STATE.FINISHED&&this.hideEditableElement()}}beginEditing(e,t){this.state===r.EDITOR_STATE.VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(e,t))}focus(){this.TEXTAREA.select(),(0,l.setCaretPosition)(this.TEXTAREA,this.TEXTAREA.value.length)}createElements(){const{rootDocument:e}=this.hot;this.TEXTAREA=e.createElement("TEXTAREA"),(0,l.setAttribute)(this.TEXTAREA,[["data-hot-input",""],(0,p.A11Y_TABINDEX)(-1)]),this.hot.getSettings().ariaTags&&(0,l.setAttribute)(this.TEXTAREA,[(0,p.A11Y_HIDDEN)()]),(0,l.addClass)(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.textareaStyle.overflowY="visible",this.TEXTAREA_PARENT=e.createElement("DIV"),(0,l.addClass)(this.TEXTAREA_PARENT,"handsontableInputHolder"),(0,l.hasClass)(this.TEXTAREA_PARENT,this.layerClass)&&(0,l.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,l.addClass)(this.TEXTAREA_PARENT,m),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){(0,a.isEdge)()&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",(0,l.removeClass)(this.TEXTAREA_PARENT,this.layerClass),(0,l.addClass)(this.TEXTAREA_PARENT,m)}showEditableElement(){this.textareaParentStyle.height="",this.textareaParentStyle.overflow="",this.textareaParentStyle.position="",this.textareaParentStyle[this.hot.isRtl()?"left":"right"]="auto",this.textareaParentStyle.opacity="1",this.textareaStyle.textIndent="",this.textareaStyle.overflowY="hidden";const e=this.TEXTAREA_PARENT.childNodes;let t=!1;(0,h.rangeEach)(e.length-1,(o=>{const s=e[o];if((0,l.hasClass)(s,"handsontableEditor"))return t=!0,!1})),(0,l.hasClass)(this.TEXTAREA_PARENT,m)&&(0,l.removeClass)(this.TEXTAREA_PARENT,m),t?(this.layerClass="ht_editor_visible",(0,l.addClass)(this.TEXTAREA_PARENT,this.layerClass)):(this.layerClass=this.getEditedCellsLayerClass(),(0,l.addClass)(this.TEXTAREA_PARENT,this.layerClass))}refreshValue(){const e=this.hot.toPhysicalRow(this.row),t=this.hot.getSourceDataAtCell(e,this.col);this.originalValue=t,this.setValue(t),this.refreshDimensions()}refreshDimensions(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state!==r.EDITOR_STATE.EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD)return void(e||this.close());const{top:t,start:o,width:s,maxWidth:i,height:n,maxHeight:a}=this.getEditedCellRect();this.textareaParentStyle.top=`${t}px`,this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=`${o}px`,this.showEditableElement();const h=(0,l.getComputedStyle)(this.TD,this.hot.rootWindow);this.TEXTAREA.style.fontSize=h.fontSize,this.TEXTAREA.style.fontFamily=h.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor;const u=(0,l.getComputedStyle)(this.TEXTAREA),d=parseInt(u.paddingLeft,10)+parseInt(u.paddingRight,10),c=parseInt(u.paddingTop,10)+parseInt(u.paddingBottom,10),g=s-d,f=n-c,p=i-d,m=a-c;this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(g,p),minHeight:Math.min(f,m),maxWidth:p,maxHeight:m},!0)}bindEvents(){(0,a.isIOS)()&&this.eventManager.addEventListener(this.TEXTAREA,"focusout",(()=>this.finishEditing(!1))),this.addHook("afterScrollHorizontally",(()=>this.refreshDimensions())),this.addHook("afterScrollVertically",(()=>this.refreshDimensions())),this.addHook("afterColumnResize",(()=>{this.refreshDimensions(),this.state===r.EDITOR_STATE.EDITING&&this.focus()})),this.addHook("afterRowResize",(()=>{this.refreshDimensions(),this.state===r.EDITOR_STATE.EDITING&&this.focus()}))}allowKeyEventPropagation(){}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor"),o=e.getContext("grid"),s={runOnlyIf:()=>(0,d.isDefined)(this.hot.getSelected()),group:w},i=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};t.addShortcuts([{keys:[["Tab"],["Shift","Tab"],["PageUp"],["PageDown"]],forwardToContext:o,callback:()=>{}},{keys:[["Control","Enter"]],callback:()=>(i(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e.altKey},{keys:[["Meta","Enter"]],callback:()=>(i(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(i(),!1)},{keys:[["Home"]],callback:(e,t)=>{let[o]=t;(0,f.updateCaretPosition)(o,this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{let[o]=t;(0,f.updateCaretPosition)(o,this.TEXTAREA)}}],s)}unregisterShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");e.removeShortcutsByGroup(c.SHORTCUTS_GROUP_NAVIGATION),e.removeShortcutsByGroup(w),e.removeShortcutsByGroup(g.SHORTCUTS_GROUP_EDITOR)}}t.TextEditor=v},65930:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(45952);t.EDITOR_TYPE=s.EDITOR_TYPE,t.TimeEditor=s.TimeEditor},45952:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(5071);const i=t.EDITOR_TYPE="time";class r extends s.TextEditor{static get EDITOR_TYPE(){return i}prepare(e,t,o,s,i,r){super.prepare(e,t,o,s,i,r),this.TEXTAREA.dir="ltr"}}t.TimeEditor=r},75244:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getListenersCounter=function(){return n},o(63517);var i=s(o(93231)),r=o(24449);let n=0;t.default=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,i.default)(this,"context",void 0),this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])}addEventListener(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3];function i(e){o.call(this,function(e){const t=e.stopImmediatePropagation;return e.stopImmediatePropagation=function(){t.apply(this),(0,r.stopImmediatePropagation)(this)},e}(e))}return this.context.eventListeners.push({element:e,event:t,callback:o,callbackProxy:i,options:s,eventManager:this}),e.addEventListener(t,i,s),n+=1,()=>{this.removeEventListener(e,t,o)}}removeEventListener(e,t,o){let s,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=this.context.eventListeners.length;for(;r;)if(r-=1,s=this.context.eventListeners[r],s.event===t&&s.element===e){if(o&&o!==s.callback)continue;if(i&&s.eventManager!==this)continue;this.context.eventListeners.splice(r,1),s.element.removeEventListener(s.event,s.callbackProxy,s.options),n-=1}}clearEvents(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.context)return;let t=this.context.eventListeners.length;for(;t;){t-=1;const o=this.context.eventListeners[t];e&&o.eventManager!==this||(this.context.eventListeners.splice(t,1),o.element.removeEventListener(o.event,o.callbackProxy,o.options),n-=1)}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(e,t){let o=e.document,s=e;o||(o=e.ownerDocument?e.ownerDocument:e,s=o.defaultView);const i={bubbles:!0,cancelable:"mousemove"!==t,view:s,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};let r;o.createEvent?(r=o.createEvent("MouseEvents"),r.initMouseEvent(t,i.bubbles,i.cancelable,i.view,i.detail,i.screenX,i.screenY,i.clientX,i.clientY,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,i.button,i.relatedTarget||o.body.parentNode)):r=o.createEventObject(),e.dispatchEvent?e.dispatchEvent(r):e.fireEvent(`on${t}`,r)}}},51400:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(42538)),r=s(o(48427)),n=o(69173),a=o(83302),l=o(85015);function h(e,t){d(e,t),t.add(e)}function u(e,t,o){d(e,t),t.set(e,o)}function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function c(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const g=Object.freeze({CELL:"cell",MIXED:"mixed"});var f=new WeakMap,p=new WeakMap,m=new WeakMap,w=new WeakMap,C=new WeakMap,v=new WeakSet,y=new WeakSet,E=new WeakSet,S=new WeakSet;function R(e){var t;const o=null===(t=(0,i.default)(this,f).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!o||!(0,i.default)(this,f).selection.isCellVisible(o))return void e(null);const s=(0,i.default)(this,f).getCell(o.row,o.col,!0);null===s?(0,i.default)(this,f).addHookOnce("afterScroll",(()=>{e((0,i.default)(this,f).getCell(o.row,o.col,!0))})):e(s)}function b(){c(this,v,R).call(this,(e=>{const{activeElement:t}=(0,i.default)(this,f).rootDocument;t&&(0,a.isOutsideInput)(t)&&t.blur(),this.focusOnHighlightedCell(e)}))}function _(){c(this,v,R).call(this,(e=>{this.getFocusMode()===g.MIXED&&"TD"===e.nodeName&&this.refocusToEditorTextarea()}))}function T(e){e.imeFastEdit&&this.getFocusMode()!==g.MIXED?this.setFocusMode(g.MIXED):e.imeFastEdit||this.getFocusMode()===g.CELL||this.setFocusMode(g.CELL)}t.FocusManager=class{constructor(e){var t=this;h(this,S),h(this,E),h(this,y),h(this,v),u(this,f,{writable:!0,value:void 0}),u(this,p,{writable:!0,value:void 0}),u(this,m,{writable:!0,value:50}),u(this,w,{writable:!0,value:null}),u(this,C,{writable:!0,value:new Map});const o=e.getSettings();(0,r.default)(this,f,e),(0,r.default)(this,p,o.imeFastEdit?g.MIXED:g.CELL),(0,i.default)(this,f).addHook("afterUpdateSettings",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return c(t,S,T).call(t,...o)})),(0,i.default)(this,f).addHook("afterSelection",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return c(t,y,b).call(t,...o)})),(0,i.default)(this,f).addHook("afterSelectionEnd",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return c(t,E,_).call(t,...o)}))}getFocusMode(){return(0,i.default)(this,p)}setFocusMode(e){Object.values(g).includes(e)?(0,r.default)(this,p,e):(0,n.warn)(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return(0,i.default)(this,m)}setRefocusDelay(e){(0,r.default)(this,m,e)}setRefocusElementGetter(e){(0,r.default)(this,w,e)}getRefocusElement(){return"function"==typeof(0,i.default)(this,w)?(0,i.default)(this,w).call(this):null===(e=(0,i.default)(this,f).getActiveEditor())||void 0===e?void 0:e.TEXTAREA;var e}focusOnHighlightedCell(e){const t=e=>{var t,o;const s=null===(t=(0,i.default)(this,f).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!s)return;let r=(0,i.default)(this,f).runHooks("modifyFocusedElement",s.row,s.col,e);r instanceof HTMLElement||(r=e),!r||null!==(o=(0,i.default)(this,f).getActiveEditor())&&void 0!==o&&o.isOpened()||r.focus({preventScroll:!0})};e?t(e):c(this,v,R).call(this,(e=>t(e)))}refocusToEditorTextarea(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i.default)(this,m);const o=this.getRefocusElement();!(0,i.default)(this,f).getSettings().imeFastEdit||null!==(e=(0,i.default)(this,f).getActiveEditor())&&void 0!==e&&e.isOpened()||!o||((0,i.default)(this,C).has(t)||(0,i.default)(this,C).set(t,(0,l.debounce)((()=>{o.select()}),t)),(0,i.default)(this,C).get(t)())}}},5386:(e,t)=>{"use strict";t.__esModule=!0;t.A11Y_TABINDEX=e=>["tabindex",e];t.A11Y_TREEGRID=()=>["role","treegrid"];t.A11Y_PRESENTATION=()=>["role","presentation"];t.A11Y_GRIDCELL=()=>["role","gridcell"];t.A11Y_ROWHEADER=()=>["role","rowheader"];t.A11Y_ROWGROUP=()=>["role","rowgroup"];t.A11Y_COLUMNHEADER=()=>["role","columnheader"];t.A11Y_ROW=()=>["role","row"];t.A11Y_MENU=()=>["role","menu"];t.A11Y_MENU_ITEM=()=>["role","menuitem"];t.A11Y_COMBOBOX=()=>["role","combobox"];t.A11Y_LISTBOX=()=>["role","listbox"];t.A11Y_OPTION=()=>["role","option"];t.A11Y_CHECKBOX=()=>["role","checkbox"];t.A11Y_SCOPE_COL=()=>["scope","col"];t.A11Y_SCOPE_ROW=()=>["scope","row"];t.A11Y_TEXT=()=>["type","text"];t.A11Y_LABEL=e=>["aria-label",e];t.A11Y_HIDDEN=()=>["aria-hidden","true"];t.A11Y_DISABLED=()=>["aria-disabled","true"];t.A11Y_MULTISELECTABLE=()=>["aria-multiselectable","true"];t.A11Y_HASPOPUP=e=>["aria-haspopup",e];t.A11Y_ROWCOUNT=e=>["aria-rowcount",e];t.A11Y_COLCOUNT=e=>["aria-colcount",e];t.A11Y_ROWINDEX=e=>["aria-rowindex",e];t.A11Y_COLINDEX=e=>["aria-colindex",e];t.A11Y_EXPANDED=e=>["aria-expanded",e];t.A11Y_SORT=e=>["aria-sort",e];t.A11Y_READONLY=()=>["aria-readonly","true"];t.A11Y_INVALID=()=>["aria-invalid","true"];t.A11Y_CHECKED=e=>["aria-checked",e];t.A11Y_SELECTED=()=>["aria-selected","true"];t.A11Y_AUTOCOMPLETE=()=>["aria-autocomplete","list"];t.A11Y_CONTROLS=e=>["aria-controls",e];t.A11Y_ACTIVEDESCENDANT=e=>["aria-activedescendant",e];t.A11Y_LIVE=e=>["aria-live",e];t.A11Y_RELEVANT=e=>["aria-relevant",e];t.A11Y_SETSIZE=e=>["aria-setsize",e];t.A11Y_POSINSET=e=>["aria-posinset",e]},50095:(e,t,o)=>{"use strict";function s(e,t,o,s){let i=-1,r=e,n=o;Array.isArray(e)||(r=Array.from(e));const a=r.length;for(s&&a&&(i+=1,n=r[i]),i+=1;i<a;)n=t(n,r[i],i,r),i+=1;return n}function i(e,t){let o=0,s=e;Array.isArray(e)||(s=Array.from(e));const i=s.length;for(;o<i&&!1!==t(s[o],o,s);)o+=1;return e}function r(e){return s(e,((e,t)=>e+t),0)}t.__esModule=!0,t.arrayAvg=function(e){if(!e.length)return 0;return r(e)/e.length},t.arrayEach=i,t.arrayFilter=function(e,t){let o=0,s=e;Array.isArray(e)||(s=Array.from(e));const i=s.length,r=[];let n=-1;for(;o<i;){const e=s[o];t(e,o,s)&&(n+=1,r[n]=e),o+=1}return r},t.arrayFlatten=function e(t){return s(t,((t,o)=>t.concat(Array.isArray(o)?e(o):o)),[])},t.arrayMap=function(e,t){let o=0,s=e;Array.isArray(e)||(s=Array.from(e));const i=s.length,r=[];let n=-1;for(;o<i;){const e=s[o];n+=1,r[n]=t(e,o,s),o+=1}return r},t.arrayMax=function(e){return s(e,((e,t)=>e>t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayMin=function(e){return s(e,((e,t)=>e<t?e:t),Array.isArray(e)?e[0]:void 0)},t.arrayReduce=s,t.arraySum=r,t.arrayUnique=function(e){const t=[];return i(e,(e=>{-1===t.indexOf(e)&&t.push(e)})),t},t.extendArray=function(e,t){const o=t.length;let s=0;for(;s<o;)e.push(t[s]),s+=1},t.getDifferenceOfArrays=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[s,...r]=[...t];let n=s;return i(r,(e=>{n=n.filter((t=>!e.includes(t)))})),n},t.getIntersectionOfArrays=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[s,...r]=[...t];let n=s;return i(r,(e=>{n=n.filter((t=>e.includes(t)))})),n},t.getUnionOfArrays=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[s,...r]=[...t],n=new Set(s);return i(r,(e=>{i(e,(e=>{n.has(e)||n.add(e)}))})),Array.from(n)},t.pivot=function(e){const t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;const o=e.length,s=e[0].length;for(let i=0;i<o;i++)for(let o=0;o<s;o++)t[o]||(t[o]=[]),t[o][i]=e[i][o];return t},t.stringToArray=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.split(t)},t.to2dArray=function(e){const t=e.length;let o=0;for(;o<t;)e[o]=[e[o]],o+=1},o(63517)},37595:(e,t,o)=>{"use strict";t.__esModule=!0,t.isChrome=function(){return n.chrome.value},t.isChromeWebKit=function(){return n.chromeWebKit.value},t.isEdge=function(){return n.edge.value},t.isEdgeWebKit=function(){return n.edgeWebKit.value},t.isFirefox=function(){return n.firefox.value},t.isFirefoxWebKit=function(){return n.firefoxWebKit.value},t.isIOS=function(){return a.ios.value},t.isIpadOS=function(){let{maxTouchPoints:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return e>2&&a.mac.value},t.isLinuxOS=function(){return a.linux.value},t.isMacOS=function(){return a.mac.value},t.isMobileBrowser=function(){return n.mobile.value},t.isSafari=function(){return n.safari.value},t.isWindowsOS=function(){return a.win.value},t.setBrowserMeta=l,t.setPlatformMeta=h;var s=o(22232),i=o(7374);const r=e=>{const t={value:!1,test:(o,s)=>{t.value=e(o,s)}};return t},n={chrome:r(((e,t)=>/Chrome/.test(e)&&/Google/.test(t))),chromeWebKit:r((e=>/CriOS/.test(e))),edge:r((e=>/Edge/.test(e))),edgeWebKit:r((e=>/EdgiOS/.test(e))),firefox:r((e=>/Firefox/.test(e))),firefoxWebKit:r((e=>/FxiOS/.test(e))),mobile:r((e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e))),safari:r(((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t)))},a={mac:r((e=>/^Mac/.test(e))),win:r((e=>/^Win/.test(e))),linux:r((e=>/^Linux/.test(e))),ios:r((e=>/iPhone|iPad|iPod/i.test(e)))};function l(){let{userAgent:e=navigator.userAgent,vendor:t=navigator.vendor}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.objectEach)(n,(o=>{let{test:s}=o;s(e,t)}))}function h(){let{platform:e=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,s.objectEach)(a,(t=>{let{test:o}=t;o(e)}))}(0,i.isCSR)()&&(l(),h())},69173:(e,t,o)=>{"use strict";t.__esModule=!0,t.error=function(){(0,s.isDefined)(console)&&console.error(...arguments)},t.info=function(){(0,s.isDefined)(console)&&console.info(...arguments)},t.log=function(){(0,s.isDefined)(console)&&console.log(...arguments)},t.warn=function(){(0,s.isDefined)(console)&&console.warn(...arguments)};var s=o(93315)},65320:(e,t,o)=>{"use strict";t.__esModule=!0,t.countFirstRowKeys=function(e){let t=0;Array.isArray(e)&&(e[0]&&Array.isArray(e[0])?t=e[0].length:e[0]&&(0,s.isObject)(e[0])&&(t=(0,s.deepObjectSize)(e[0])));return t},t.createEmptySpreadsheetData=function(e,t){const o=[];let s;for(let i=0;i<e;i++){s=[];for(let e=0;e<t;e++)s.push("");o.push(s)}return o},t.createSpreadsheetData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const o=[];let s,i;for(s=0;s<e;s++){const e=[];for(i=0;i<t;i++)e.push(n(i)+(s+1));o.push(e)}return o},t.createSpreadsheetObjectData=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const o=[];let s,i;for(s=0;s<e;s++){const e={};for(i=0;i<t;i++)e[`prop${i}`]=n(i)+(s+1);o.push(e)}return o},t.dataRowToChangesArray=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=e;const s=[];Array.isArray(e)&&Array.isArray(e[0])||(o=[e]);return o.forEach(((e,o)=>{Array.isArray(e)?e.forEach(((e,i)=>{s.push([o+t,i,e])})):Object.keys(e).forEach((i=>{s.push([o+t,i,e[i]])}))})),s},t.isArrayOfArrays=function(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>Array.isArray(e))))},t.isArrayOfObjects=function(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>"object"==typeof e&&!Array.isArray(e)&&null!==e)))},t.spreadsheetColumnIndex=function(e){let t=0;if(e)for(let o=0,s=e.length-1;o<e.length;o+=1,s-=1)t+=r**s*(i.indexOf(e[o])+1);return t-=1,t},t.spreadsheetColumnLabel=n,o(63517);var s=o(22232);const i="ABCDEFGHIJKLMNOPQRSTUVWXYZ",r=i.length;function n(e){let t,o=e+1,s="";for(;o>0;)t=(o-1)%r,s=String.fromCharCode(65+t)+s,o=parseInt((o-t)/r,10);return s}},48150:(e,t)=>{"use strict";t.__esModule=!0,t.getNormalizedDate=function(e){const t=new Date(e);if(!isNaN(new Date(`${e}T00:00`).getDate()))return new Date(t.getTime()+6e4*t.getTimezoneOffset());return t}},83302:(e,t,o)=>{"use strict";t.__esModule=!0,t.addClass=h,t.addEvent=function(e,t,o){e.addEventListener(t,o,!1)},t.clearTextSelection=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;e.getSelection&&(e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges())},t.closest=n,t.closestDown=function(e,t,o){const s=[];let i=e;for(;i&&(i=n(i,t,o),i&&(!o||o.contains(i)));)s.push(i),i=i.host&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?i.host:i.parentNode;const r=s.length;return r?s[r-1]:null},t.empty=c,t.fastInnerHTML=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];g.test(t)?e.innerHTML=o?(0,s.sanitize)(t):t:f(e,t)},t.fastInnerText=f,t.getCaretPosition=function(e){if(e.selectionStart)return e.selectionStart;return 0},t.getComputedStyle=w,t.getCssTransform=function(e){let t;if(e.style.transform&&""!==(t=e.style.transform))return["transform",t];return-1},t.getFrameElement=r,t.getParent=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=-1,s=null,i=e;for(;null!==i;){if(o===t){s=i;break}i.host&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?i=i.host:(o+=1,i=i.parentNode)}return s},t.getParentWindow=function(e){return r(e)&&e.parent},t.getScrollLeft=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return m(t);return e.scrollLeft},t.getScrollTop=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;if(e===t)return p(t);return e.scrollTop},t.getScrollableElement=function(e){let t=e.ownerDocument,o=t?t.defaultView:void 0;t||(t=e.document?e.document:e,o=t.defaultView);const s=["auto","scroll"];let i=e.parentNode;for(;i&&i.style&&t.body!==i;){let{overflow:e,overflowX:t,overflowY:r}=i.style;if([e,t,r].includes("scroll"))return i;if(({overflow:e,overflowX:t,overflowY:r}=o.getComputedStyle(i)),s.includes(e)||s.includes(t)||s.includes(r))return i;if(i.clientHeight<=i.scrollHeight+1&&(s.includes(r)||s.includes(e)))return i;if(i.clientWidth<=i.scrollWidth+1&&(s.includes(t)||s.includes(e)))return i;i=i.parentNode}return o},t.getScrollbarWidth=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;void 0===C&&(C=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;const t=e.createElement("div");t.style.height="200px",t.style.width="100%";const o=e.createElement("div");o.style.boxSizing="content-box",o.style.height="150px",o.style.left="0px",o.style.overflow="hidden",o.style.position="absolute",o.style.top="0px",o.style.width="200px",o.style.visibility="hidden",o.appendChild(t),(e.body||e.documentElement).appendChild(o);const s=t.offsetWidth;o.style.overflow="scroll";let i=t.offsetWidth;s===i&&(i=o.clientWidth);return(e.body||e.documentElement).removeChild(o),s-i}(e));return C},t.getSelectionEndPosition=function(e){if(e.selectionEnd)return e.selectionEnd;return 0},t.getSelectionText=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const t=e.document;let o="";e.getSelection?o=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(o=t.selection.createRange().text);return o},t.getStyle=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e===o)return"width"===t?`${o.innerWidth}px`:"height"===t?`${o.innerHeight}px`:void 0;const s=e.style[t];if(""!==s&&void 0!==s)return s;const i=w(e,o);if(""!==i[t]&&void 0!==i[t])return i[t]},t.getTrimmingContainer=function(e){const t=e.ownerDocument,o=t.defaultView;let s=e.parentNode;for(;s&&s.style&&t.body!==s;){if("visible"!==s.style.overflow&&""!==s.style.overflow)return s;const e=w(s,o),t=["scroll","hidden","auto"],i=e.getPropertyValue("overflow"),r=e.getPropertyValue("overflow-y"),n=e.getPropertyValue("overflow-x");if(t.includes(i)||t.includes(r)||t.includes(n))return s;s=s.parentNode}return o},t.getWindowScrollLeft=m,t.getWindowScrollTop=p,t.hasAccessToParentWindow=function(e){return!!Object.getPrototypeOf(e.parent)},t.hasClass=function(e,t){if(void 0===e.classList||"string"!=typeof t||""===t)return!1;return e.classList.contains(t)},t.hasHorizontalScrollbar=function(e){return e.offsetHeight!==e.clientHeight},t.hasVerticalScrollbar=function(e){return e.offsetWidth!==e.clientWidth},t.index=function(e){let t=0,o=e;if(o.previousSibling)for(;o=o.previousSibling;)t+=1;return t},t.innerHeight=function(e){return e.clientHeight||e.innerHeight},t.innerWidth=function(e){return e.clientWidth||e.innerWidth},t.isChildOf=function(e,t){let o=e.parentNode,s=[];"string"==typeof t?s=e.defaultView?Array.prototype.slice.call(e.querySelectorAll(t),0):Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):s.push(t);for(;null!==o;){if(s.indexOf(o)>-1)return!0;o=o.parentNode}return!1},t.isDetached=function(e){return!e.parentNode},t.isInput=v,t.isOutsideInput=y,t.isThisHotChild=function(e,t){const o=e.closest(".handsontable");return!!o&&(o.parentNode===t||o===t)},t.isVisible=function e(t){const o=t.ownerDocument.documentElement;let s=t;for(;s!==o;){if(null===s)return!1;if(s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(s.host){if(s.host.impl)return e(s.host.impl);if(s.host)return e(s.host);throw new Error("Lost in Web Components world")}return!1}if("none"===w(s).display)return!1;s=s.parentNode}return!0},t.makeElementContentEditableAndSelectItsContent=E,t.matchesCSSRules=function(e,t){const{selectorText:o}=t;let s=!1;t.type===CSSRule.STYLE_RULE&&o&&(e.msMatchesSelector?s=e.msMatchesSelector(o):e.matches&&(s=e.matches(o)));return s},t.observeVisibilityChangeOnce=function(e,t){new IntersectionObserver(((o,s)=>{o.forEach((o=>{o.isIntersecting&&null!==e.offsetParent&&(t(),s.unobserve(e))}))}),{root:e.ownerDocument.body}).observe(e)},t.offset=function(e){const t=e.ownerDocument,o=t.defaultView,s=t.documentElement;let i,r,n,a=e;i=a.offsetLeft,r=a.offsetTop,n=a;for(;(a=a.offsetParent)&&a!==t.body&&"offsetLeft"in a;)i+=a.offsetLeft,r+=a.offsetTop,n=a;n&&"fixed"===n.style.position&&(i+=o.pageXOffset||s.scrollLeft,r+=o.pageYOffset||s.scrollTop);return{left:i,top:r}},t.outerHeight=function(e){return e.offsetHeight},t.outerWidth=function(e){return e.offsetWidth},t.overlayContainsElement=function(e,t,o){const s=o.parentElement.querySelector(`.ht_clone_${e}`);return s?s.contains(t):null},t.removeAttribute=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);const{regexFree:o,regexes:s}=l(t,!0);o.forEach((t=>{""!==t&&e.removeAttribute(t)})),s.forEach((t=>{e.getAttributeNames().forEach((o=>{t.test(o)&&e.removeAttribute(o)}))}))},t.removeClass=u,t.removeContentEditableFromElementAndDeselect=S,t.removeEvent=function(e,t,o){e.removeEventListener(t,o,!1)},t.removeTextNodes=function e(t){if(3===t.nodeType)t.parentNode.removeChild(t);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(t.nodeName)>-1){const o=t.childNodes;for(let t=o.length-1;t>=0;t--)e(o[t])}},t.resetCssTransform=function(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")},t.runWithSelectedContendEditableElement=function(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];E(e,o),t(),S(e,o)},t.selectElementIfAllowed=function(e){y(e.ownerDocument.activeElement)||e.select()},t.setAttribute=d,t.setCaretPosition=function(e,t,o){void 0===o&&(o=t);if(e.setSelectionRange){e.focus();try{e.setSelectionRange(t,o)}catch(s){const i=e.parentNode,r=i.style.display;i.style.display="block",e.setSelectionRange(t,o),i.style.display=r}}},t.setOverlayPosition=function(e,t,o){e.style.transform=`translate3d(${t},${o},0)`},o(63517),o(91683);var s=o(18609),i=o(5386);function r(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0;const{ELEMENT_NODE:s,DOCUMENT_FRAGMENT_NODE:i}=Node;let r=e;for(;null!=r&&r!==o;){const{nodeType:e,nodeName:o}=r;if(e===s&&(t.includes(o)||t.includes(r)))return r;const{host:n}=r;r=n&&e===i?n:r.parentNode}return null}function a(e){return e&&e.length?e.filter((e=>!!e)):[]}function l(e,t){if(!e||!e.length)return t?{regexFree:[],regexes:[]}:[];const o=[],s=[];return s.push(...e.filter((e=>{const s=e instanceof RegExp;return s&&t&&o.push(e),!s}))),t?{regexFree:s,regexes:o}:s}function h(e,t){"string"==typeof t&&(t=t.split(" ")),(t=a(t)).length>0&&e.classList.add(...t)}function u(e,t){"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:o,regexes:s}=l(t,!0);o=a(o),o.length>0&&e.classList.remove(...o),s.forEach((t=>{e.classList.forEach((o=>{t.test(o)&&e.classList.remove(o)}))}))}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2?arguments[2]:void 0;Array.isArray(t)||(t=[[t,o]]),t.forEach((t=>{Array.isArray(t)&&""!==t[0]&&e.setAttribute(...t)}))}function c(e){let t;for(;t=e.lastChild;)e.removeChild(t)}const g=t.HTML_CHARACTERS=/(<(.*)>|&(.*);)/;function f(e,t){const o=e.firstChild;o&&3===o.nodeType&&null===o.nextSibling?o.textContent=t:(c(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function p(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollY}function m(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollX}function w(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}let C;function v(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function y(e){return v(e)&&!1===e.hasAttribute("data-hot-input")}function E(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=e.ownerDocument,r=s.createRange(),n=s.defaultView.getSelection();d(e,"contenteditable",!0),o&&d(e,...(0,i.A11Y_HIDDEN)()),t&&h(e,"invisibleSelection"),r.selectNodeContents(e),n.removeAllRanges(),n.addRange(r)}function S(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=e.ownerDocument.defaultView.getSelection();e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden"),o.removeAllRanges(),t&&u(e,"invisibleSelection"),e.removeAttribute("contenteditable")}},24449:(e,t)=>{"use strict";t.__esModule=!0,t.isImmediatePropagationStopped=function(e){return!1===e.isImmediatePropagationEnabled},t.isLeftClick=function(e){return 0===e.button},t.isRightClick=function(e){return 2===e.button},t.offsetRelativeTo=function(e,t){const o={x:e.offsetX,y:e.offsetY};let s=e.target;if(!(t instanceof HTMLElement)||s!==t&&s.contains(t))return o;for(;s!==t;)o.x+=s.offsetLeft,o.y+=s.offsetTop,s=s.offsetParent;return o},t.stopImmediatePropagation=function(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}},7374:(e,t)=>{"use strict";let o;t.__esModule=!0,t.cancelAnimationFrame=function(e){window.cancelAnimationFrame(e)},t.getComparisonFunction=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o)return o;o="object"==typeof Intl?new Intl.Collator(e,t).compare:"function"==typeof String.prototype.localeCompare?(e,t)=>`${e}`.localeCompare(t):(e,t)=>e===t?0:e>t?-1:1;return o},t.isCSR=function(){return"undefined"!=typeof window},t.isTouchSupported=function(){return"ontouchstart"in window},t.requestAnimationFrame=function(e){return window.requestAnimationFrame(e)}},85015:(e,t,o)=>{"use strict";t.__esModule=!0,t.curry=function(e){const t=e.length;return function o(s){return function(){for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];const a=s.concat(r);let l;return l=a.length>=t?e.apply(this,a):o(a),l}}([])},t.curryRight=function(e){const t=e.length;return function o(s){return function(){for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];const a=s.concat(r.reverse());let l;return l=a.length>=t?e.apply(this,a):o(a),l}}([])},t.debounce=function(e){let t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,s=null;return function(){for(var i=arguments.length,r=new Array(i),n=0;n<i;n++)r[n]=arguments[n];return s&&clearTimeout(s),s=setTimeout((()=>{t=e.apply(this,r)}),o),t}},t.fastCall=function(e,t,o,s,r,n,a,l){if((0,i.isDefined)(l))return e.call(t,o,s,r,n,a,l);if((0,i.isDefined)(a))return e.call(t,o,s,r,n,a);if((0,i.isDefined)(n))return e.call(t,o,s,r,n);if((0,i.isDefined)(r))return e.call(t,o,s,r);if((0,i.isDefined)(s))return e.call(t,o,s);if((0,i.isDefined)(o))return e.call(t,o);return e.call(t)},t.isFunction=function(e){return"function"==typeof e},t.partial=function(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];return function(){for(var t=arguments.length,s=new Array(t),i=0;i<t;i++)s[i]=arguments[i];return e.apply(this,o.concat(s))}},t.pipe=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const[i,...r]=t;return function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return(0,s.arrayReduce)(r,((e,t)=>t(e)),i.apply(this,t))}},t.throttle=r,t.throttleAfterHits=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const s=r(e,t);let i=o;function n(){for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];return i?(i-=1,e.apply(this,o)):s.apply(this,o)}return n.clearHits=function(){i=o},n};var s=o(50095),i=o(93315);function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,o=0;const s={lastCallThrottled:!0};let i=null;return function(){for(var r=arguments.length,n=new Array(r),a=0;a<r;a++)n[a]=arguments[a];const l=Date.now();let h=!1;s.lastCallThrottled=!0,o||(o=l,h=!0);const u=t-(l-o);return h?(s.lastCallThrottled=!1,e.apply(this,n)):(i&&clearTimeout(i),i=setTimeout((()=>{s.lastCallThrottled=!1,e.apply(this,n),o=0,i=void 0}),u)),s}}},93315:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t._injectProductInfo=function(e,t){const o=!a(e),s="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),r="14.1.0-next-ba8c2b0-20240110";let n,v="invalid",y="invalid";const E=function(e){let t=[][l],o=t;if(e[l]!==c("Z"))return!1;for(let t="",s="B<H4P+".split(""),i=c(s.shift());i;i=c(s.shift()||"A"))--i<""[l]?o|=(u(`${u(h(t)+(h(d(e,Math.abs(i),2))+[]).padStart(2,"0"))}`)%97||2)>>1:t=d(e,i,i?1===s[l]?9:8:6);return o===t}(e=g(e||""));if(o||s||E)if(E){const t=(0,i.default)("16/01/2024","DD/MM/YYYY"),o=Math.floor(t.toDate().getTime()/864e5),s=f(e);n=(0,i.default)(864e5*(s+1),"x").format("MMMM DD, YYYY"),o>s?(v="expired",y="expired"):(v="valid",y="valid")}else s?(v="non_commercial",y="valid"):(v="invalid",y="invalid");else v="missing",y="missing";p()&&(v="valid",y="valid");if(!m&&"valid"!==v){w[v]({keyValidityDate:n,hotVersion:r})&&console["non_commercial"===v?"info":"warn"](w[v]({keyValidityDate:n,hotVersion:r})),m=!0}if("valid"!==y&&t.parentNode){if(C[y]({keyValidityDate:n,hotVersion:r})){const e=document.createElement("div");e.className="hot-display-license-info",e.innerHTML=C[y]({keyValidityDate:n,hotVersion:r}),t.parentNode.insertBefore(e,t.nextSibling)}}},t.isDefined=function(e){return void 0!==e},t.isEmpty=a,t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isUndefined=n,t.stringify=function(e){let t;switch(typeof e){case"string":case"number":t=`${e}`;break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString()}return t};var i=s(o(33034)),r=o(28236);function n(e){return void 0===e}function a(e){return null===e||""===e||n(e)}const l="length",h=e=>parseInt(e,16),u=e=>parseInt(e,10),d=(e,t,o)=>e.substr(t,o),c=e=>e.codePointAt(0)-65,g=e=>`${e}`.replace(/\-/g,""),f=e=>h(d(g(e),h("12"),c("F")))/(h(d(g(e),c("B"),~~![][l]))||9),p=()=>"undefined"!=typeof location&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host);let m=!1;const w={invalid:()=>r.toSingleLine`
33
36
  The license key for Handsontable is invalid.\x20
34
37
  If you need any help, contact us at support@handsontable.com.`,expired:e=>{let{keyValidityDate:t,hotVersion:o}=e;return r.toSingleLine`
35
38
  The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
@@ -60,30 +63,30 @@
60
63
  */}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r={languageCode:"en-US",[s.CONTEXTMENU_ITEMS_NO_ITEMS]:"No available options",[s.CONTEXTMENU_ITEMS_ROW_ABOVE]:"Insert row above",[s.CONTEXTMENU_ITEMS_ROW_BELOW]:"Insert row below",[s.CONTEXTMENU_ITEMS_INSERT_LEFT]:"Insert column left",[s.CONTEXTMENU_ITEMS_INSERT_RIGHT]:"Insert column right",[s.CONTEXTMENU_ITEMS_REMOVE_ROW]:["Remove row","Remove rows"],[s.CONTEXTMENU_ITEMS_REMOVE_COLUMN]:["Remove column","Remove columns"],[s.CONTEXTMENU_ITEMS_UNDO]:"Undo",[s.CONTEXTMENU_ITEMS_REDO]:"Redo",[s.CONTEXTMENU_ITEMS_READ_ONLY]:"Read only",[s.CONTEXTMENU_ITEMS_CLEAR_COLUMN]:"Clear column",[s.CONTEXTMENU_ITEMS_ALIGNMENT]:"Alignment",[s.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT]:"Left",[s.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER]:"Center",[s.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT]:"Right",[s.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY]:"Justify",[s.CONTEXTMENU_ITEMS_ALIGNMENT_TOP]:"Top",[s.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE]:"Middle",[s.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM]:"Bottom",[s.CONTEXTMENU_ITEMS_FREEZE_COLUMN]:"Freeze column",[s.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN]:"Unfreeze column",[s.CONTEXTMENU_ITEMS_BORDERS]:"Borders",[s.CONTEXTMENU_ITEMS_BORDERS_TOP]:"Top",[s.CONTEXTMENU_ITEMS_BORDERS_RIGHT]:"Right",[s.CONTEXTMENU_ITEMS_BORDERS_BOTTOM]:"Bottom",[s.CONTEXTMENU_ITEMS_BORDERS_LEFT]:"Left",[s.CONTEXTMENU_ITEMS_REMOVE_BORDERS]:"Remove border(s)",[s.CONTEXTMENU_ITEMS_ADD_COMMENT]:"Add comment",[s.CONTEXTMENU_ITEMS_EDIT_COMMENT]:"Edit comment",[s.CONTEXTMENU_ITEMS_REMOVE_COMMENT]:"Delete comment",[s.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT]:"Read-only comment",[s.CONTEXTMENU_ITEMS_MERGE_CELLS]:"Merge cells",[s.CONTEXTMENU_ITEMS_UNMERGE_CELLS]:"Unmerge cells",[s.CONTEXTMENU_ITEMS_COPY]:"Copy",[s.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS]:["Copy with header","Copy with headers"],[s.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS]:["Copy with group header","Copy with group headers"],[s.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY]:["Copy header only","Copy headers only"],[s.CONTEXTMENU_ITEMS_CUT]:"Cut",[s.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD]:"Insert child row",[s.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD]:"Detach from parent",[s.CONTEXTMENU_ITEMS_HIDE_COLUMN]:["Hide column","Hide columns"],[s.CONTEXTMENU_ITEMS_SHOW_COLUMN]:["Show column","Show columns"],[s.CONTEXTMENU_ITEMS_HIDE_ROW]:["Hide row","Hide rows"],[s.CONTEXTMENU_ITEMS_SHOW_ROW]:["Show row","Show rows"],[s.FILTERS_CONDITIONS_NONE]:"None",[s.FILTERS_CONDITIONS_EMPTY]:"Is empty",[s.FILTERS_CONDITIONS_NOT_EMPTY]:"Is not empty",[s.FILTERS_CONDITIONS_EQUAL]:"Is equal to",[s.FILTERS_CONDITIONS_NOT_EQUAL]:"Is not equal to",[s.FILTERS_CONDITIONS_BEGINS_WITH]:"Begins with",[s.FILTERS_CONDITIONS_ENDS_WITH]:"Ends with",[s.FILTERS_CONDITIONS_CONTAINS]:"Contains",[s.FILTERS_CONDITIONS_NOT_CONTAIN]:"Does not contain",[s.FILTERS_CONDITIONS_GREATER_THAN]:"Greater than",[s.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL]:"Greater than or equal to",[s.FILTERS_CONDITIONS_LESS_THAN]:"Less than",[s.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL]:"Less than or equal to",[s.FILTERS_CONDITIONS_BETWEEN]:"Is between",[s.FILTERS_CONDITIONS_NOT_BETWEEN]:"Is not between",[s.FILTERS_CONDITIONS_AFTER]:"After",[s.FILTERS_CONDITIONS_BEFORE]:"Before",[s.FILTERS_CONDITIONS_TODAY]:"Today",[s.FILTERS_CONDITIONS_TOMORROW]:"Tomorrow",[s.FILTERS_CONDITIONS_YESTERDAY]:"Yesterday",[s.FILTERS_VALUES_BLANK_CELLS]:"Blank cells",[s.FILTERS_DIVS_FILTER_BY_CONDITION]:"Filter by condition",[s.FILTERS_DIVS_FILTER_BY_VALUE]:"Filter by value",[s.FILTERS_LABELS_CONJUNCTION]:"And",[s.FILTERS_LABELS_DISJUNCTION]:"Or",[s.FILTERS_BUTTONS_SELECT_ALL]:"Select all",[s.FILTERS_BUTTONS_CLEAR]:"Clear",[s.FILTERS_BUTTONS_OK]:"OK",[s.FILTERS_BUTTONS_CANCEL]:"Cancel",[s.FILTERS_BUTTONS_PLACEHOLDER_SEARCH]:"Search",[s.FILTERS_BUTTONS_PLACEHOLDER_VALUE]:"Value",[s.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE]:"Second value",[s.CHECKBOX_CHECKED]:"Checked",[s.CHECKBOX_UNCHECKED]:"Unchecked"};t.default=r},14529:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getPhraseFormatters=t.getAll=function(){return a()},t.registerPhraseFormatter=t.register=l;var i=s(o(63800)),r=s(o(6614));const{register:n,getValues:a}=(0,i.default)("phraseFormatters");function l(e,t){n(e,t)}l("pluralize",r.default)},6614:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t){if(Array.isArray(e)&&Number.isInteger(t))return e[t];return e}},22489:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getDefaultLanguageDictionary=function(){return u.default},t.getLanguageDictionary=v,t.getLanguagesDictionaries=function(){return w()},t.getTranslatedPhrase=function(e,t,o){const s=v(e);if(null===s)return null;const i=s[t];if((0,n.isUndefined)(i))return null;const a=function(e,t){let o=e;return(0,r.arrayEach)((0,h.getPhraseFormatters)(),(s=>{o=s(e,t)})),o}(i,o);if(Array.isArray(a))return a[0];return a},t.getValidLanguageCode=function(e){let t=(0,a.normalizeLanguageCode)(e);y(t)||(t=g,(0,a.warnUserAboutLanguageRegistration)(e));return t},t.hasLanguageDictionary=y,t.registerLanguageDictionary=C;var i=o(22232),r=o(50095),n=o(93315),a=o(8222),l=s(o(63800)),h=o(14529),u=s(o(69579)),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=c(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516));function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(c=function(e){return e?o:t})(e)}t.dictionaryKeys=d;const g=t.DEFAULT_LANGUAGE_CODE=u.default.languageCode,{register:f,getItem:p,hasItem:m,getValues:w}=(0,l.default)("languagesDictionaries");function C(e,t){let o=e,s=t;return(0,i.isObject)(e)&&(s=e,o=s.languageCode),function(e,t){e!==g&&(0,a.extendNotExistingKeys)(t,p(g))}(o,s),f(o,(0,i.deepClone)(s)),(0,i.deepClone)(s)}function v(e){return y(e)?(0,i.deepClone)(p(e)):null}function y(e){return m(e)}C(u.default)},8222:(e,t,o)=>{"use strict";t.__esModule=!0,t.createCellHeadersRange=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:t,[i,r]=[o,s];e>t&&([i,r]=[r,i]);return`${i}-${r}`},t.extendNotExistingKeys=function(e,t){return(0,i.objectEach)(t,((t,o)=>{(0,s.isUndefined)(e[o])&&(e[o]=t)})),e},t.normalizeLanguageCode=function(e){const t=/^([a-zA-Z]{2})-([a-zA-Z]{2})$/.exec(e);if(t)return`${t[1].toLowerCase()}-${t[2].toUpperCase()}`;return e},t.warnUserAboutLanguageRegistration=function(e){(0,s.isDefined)(e)&&(0,r.error)(n.toSingleLine`Language with code "${e}" was not found. You should register particular language\x20
61
64
  before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.`)};var s=o(93315),i=o(22232),r=o(69173),n=o(28236)},4748:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517);var s=o(50095),i=o(22232);const r={_hooksStorage:Object.create(null),addHook(e,t){return this._hooksStorage[e]||(this._hooksStorage[e]=[]),this.hot.addHook(e,t),this._hooksStorage[e].push(t),this},removeHooksByKey(e){(0,s.arrayEach)(this._hooksStorage[e]||[],(t=>{this.hot.removeHook(e,t)}))},clearHooks(){(0,i.objectEach)(this._hooksStorage,((e,t)=>this.removeHooksByKey(t))),this._hooksStorage={}}};(0,i.defineGetter)(r,"MIXIN_NAME","hooksRefRegisterer",{writable:!1,enumerable:!1});t.default=r},65718:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517);var s=o(22232),i=o(85015);const r={_localHooks:Object.create(null),addLocalHook(e,t){return this._localHooks[e]||(this._localHooks[e]=[]),this._localHooks[e].push(t),this},runLocalHooks(e,t,o,s,r,n,a){if(this._localHooks[e]){const l=this._localHooks[e].length;for(let h=0;h<l;h++)(0,i.fastCall)(this._localHooks[e][h],this,t,o,s,r,n,a)}},clearLocalHooks(){return this._localHooks={},this}};(0,s.defineGetter)(r,"MIXIN_NAME","localHooks",{writable:!1,enumerable:!1});t.default=r},56307:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(50095),n=o(22232),a=o(18609),l=o(69173),h=o(28236),u=o(85015);const d=["afterCellMetaReset","afterChange","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterColumnSequenceChange","afterCreateCol","beforeCreateRow","afterCreateRow","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterInit","afterLoadData","afterUpdateData","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterRemoveCol","afterRemoveRow","beforeRenderer","afterRenderer","afterRowSequenceChange","beforeViewportScrollVertically","beforeViewportScrollHorizontally","beforeViewportScroll","afterScrollHorizontally","afterScrollVertically","afterScroll","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","beforeSelectColumns","afterSelectColumns","beforeSelectRows","afterSelectRows","afterSetCellMeta","afterRemoveCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterSetSourceDataAtCell","afterUpdateSettings","afterValidate","beforeLanguageChange","afterLanguageChange","beforeAutofill","afterAutofill","beforeCellAlignment","beforeChange","beforeChangeRender","beforeDrawBorders","beforeGetCellMeta","beforeRemoveCellMeta","beforeInit","beforeInitWalkontable","beforeLoadData","beforeUpdateData","beforeKeyDown","beforeOnCellMouseDown","beforeOnCellMouseUp","beforeOnCellContextMenu","beforeOnCellMouseOver","beforeOnCellMouseOut","beforeRemoveCol","beforeRemoveRow","beforeViewRender","afterViewRender","beforeRender","afterRender","beforeRowWrap","beforeColumnWrap","beforeSetCellMeta","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeSelectionHighlightSet","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyColHeader","modifyColWidth","modifyFocusedElement","modifyRowHeader","modifyRowHeight","modifyData","modifySourceData","modifyRowData","modifyGetCellCoords","modifyFocusOnTabNavigation","beforeHighlightingRowHeader","beforeHighlightingColumnHeader","persistentStateLoad","persistentStateReset","persistentStateSave","beforeColumnSort","afterColumnSort","modifyAutofillRange","modifyCopyableRange","beforeCut","afterCut","beforeCopy","afterCopy","beforePaste","afterPaste","beforeColumnFreeze","afterColumnFreeze","beforeColumnMove","afterColumnMove","beforeColumnUnfreeze","afterColumnUnfreeze","beforeRowMove","afterRowMove","beforeColumnResize","afterColumnResize","beforeRowResize","afterRowResize","afterGetColumnHeaderRenderers","afterGetRowHeaderRenderers","beforeStretchingColumnWidth","beforeFilter","afterFilter","afterFormulasValuesUpdate","afterNamedExpressionAdded","afterNamedExpressionRemoved","afterSheetAdded","afterSheetRenamed","afterSheetRemoved","modifyColumnHeaderHeight","modifyColumnHeaderValue","beforeUndo","beforeUndoStackChange","afterUndo","afterUndoStackChange","beforeRedo","beforeRedoStackChange","afterRedo","afterRedoStackChange","modifyRowHeaderWidth","modifyTransformStart","modifyTransformEnd","afterModifyTransformStart","afterModifyTransformEnd","afterViewportRowCalculatorOverride","afterViewportColumnCalculatorOverride","afterPluginsInitialized","beforeHideRows","afterHideRows","beforeUnhideRows","afterUnhideRows","beforeHideColumns","afterHideColumns","beforeUnhideColumns","afterUnhideColumns","beforeTrimRow","afterTrimRow","beforeUntrimRow","afterUntrimRow","beforeDropdownMenuShow","afterDropdownMenuShow","afterDropdownMenuHide","beforeAddChild","afterAddChild","beforeDetachChild","afterDetachChild","afterBeginEditing","beforeMergeCells","afterMergeCells","beforeUnmergeCells","afterUnmergeCells","afterListen","afterUnlisten","afterRefreshDimensions","beforeRefreshDimensions","beforeColumnCollapse","afterColumnCollapse","beforeColumnExpand","afterColumnExpand","modifyAutoColumnSizeSeed"],c=h.toSingleLine`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
62
65
  Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\x20
63
- learn about the migration path.`,g=new Map([["modifyRow","8.0.0"],["modifyCol","8.0.0"],["unmodifyRow","8.0.0"],["unmodifyCol","8.0.0"],["skipLengthCache","8.0.0"],["hiddenColumn","8.0.0"],["hiddenRow","8.0.0"]]),f=new Map([[]]);class p{static getSingleton(){return m}constructor(){(0,i.default)(this,"globalBucket",void 0),this.globalBucket=this.createEmptyBucket()}createEmptyBucket(){const e=Object.create(null);return(0,r.arrayEach)(d,(t=>e[t]=[])),e}getBucket(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket}add(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(t))(0,r.arrayEach)(t,(t=>this.add(e,t,o)));else{g.has(e)&&(0,l.warn)((0,a.substitute)(c,{hookName:e,removedInVersion:g.get(e)})),f.has(e)&&(0,l.warn)(f.get(e));const s=this.getBucket(o);if(void 0===s[e]&&(this.register(e),s[e]=[]),t.skip=!1,-1===s[e].indexOf(t)){let o=!1;t.initialHook&&(0,r.arrayEach)(s[e],((i,r)=>{if(i.initialHook)return s[e][r]=t,o=!0,!1})),o||s[e].push(t)}}return this}once(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Array.isArray(t)?(0,r.arrayEach)(t,(t=>this.once(e,t,o))):(t.runOnce=!0,this.add(e,t,o))}remove(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const s=this.getBucket(o);return void 0!==s[e]&&s[e].indexOf(t)>=0&&(t.skip=!0,!0)}has(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const o=this.getBucket(t);return!(void 0===o[e]||!o[e].length)}run(e,t,o,s,i,r,n,a){{const l=this.globalBucket[t],h=l?l.length:0;let d=0;if(h)for(;d<h;){if(!l[d]||l[d].skip){d+=1;continue}const h=(0,u.fastCall)(l[d],e,o,s,i,r,n,a);void 0!==h&&(o=h),l[d]&&l[d].runOnce&&this.remove(t,l[d]),d+=1}}{const l=this.getBucket(e)[t],h=l?l.length:0;let d=0;if(h)for(;d<h;){if(!l[d]||l[d].skip){d+=1;continue}const h=(0,u.fastCall)(l[d],e,o,s,i,r,n,a);void 0!==h&&(o=h),l[d]&&l[d].runOnce&&this.remove(t,l[d],e),d+=1}}return o}destroy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,n.objectEach)(this.getBucket(e),((e,t,o)=>o[t].length=0))}register(e){this.isRegistered(e)||d.push(e)}deregister(e){this.isRegistered(e)&&d.splice(d.indexOf(e),1)}isDeprecated(e){return f.has(e)||g.has(e)}isRegistered(e){return d.indexOf(e)>=0}getRegistered(){return d}}const m=new p;t.default=p},35030:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=s(o(48427)),n=s(o(42538)),a=o(36026),l=o(50095),h=o(7374),u=s(o(17954)),d=s(o(56307)),c=o(22232),g=o(68145),f=s(o(10977)),p=o(18609),m=o(21280),w=o(33165),C=o(93315);function v(e,t){y(e,t),t.add(e)}function y(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function E(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}d.default.getSingleton().register("modifyAutoColumnSizeSeed");const S=t.PLUGIN_KEY="autoColumnSize",R=t.PLUGIN_PRIORITY=10;var b=new WeakMap,_=new WeakSet,T=new WeakSet,O=new WeakSet,M=new WeakSet,I=new WeakSet,N=new WeakSet;class A extends a.BasePlugin{static get PLUGIN_KEY(){return S}static get PLUGIN_PRIORITY(){return R}static get SETTING_KEYS(){return!0}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 50}constructor(e){var t,o,s;super(e),v(this,N),v(this,I),v(this,M),v(this,O),v(this,T),v(this,_),(0,i.default)(this,"ghostTable",new u.default(this.hot)),(0,i.default)(this,"samplesGenerator",new f.default(((e,t)=>{const o=this.hot.getCellMeta(e,t);let s="";o.spanned||(s=this.hot.getDataAtCell(e,t));let i="";return this.hot.hasHook("modifyAutoColumnSizeSeed")&&(i=this.hot.runHooks("modifyAutoColumnSizeSeed",i,o,s)),{value:s,bundleSeed:i}}))),(0,i.default)(this,"firstCalculation",!0),(0,i.default)(this,"inProgress",!1),(0,i.default)(this,"measuredColumns",0),(0,i.default)(this,"columnWidthsMap",new w.PhysicalIndexToValueMap),s={writable:!0,value:[]},y(t=this,o=b),o.set(t,s),this.hot.columnIndexMapper.registerMap("autoColumnSize",this.columnWidthsMap),this.addHook("beforeColumnResize",((e,t,o)=>E(this,M,k).call(this,e,t,o)))}isEnabled(){return!1!==this.hot.getSettings()[S]&&!this.hot.getSettings().colWidths}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[S];t&&null!==t.useHeaders&&void 0!==t.useHeaders&&this.ghostTable.setSetting("useHeaders",t.useHeaders),this.setSamplingOptions(),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return E(e,T,x).call(e,...o)})),this.addHook("beforeChangeRender",(e=>E(this,O,H).call(this,e))),this.addHook("afterFormulasValuesUpdate",(e=>E(this,N,L).call(this,e))),this.addHook("beforeViewRender",(e=>E(this,_,P).call(this,e))),this.addHook("modifyColWidth",((e,t)=>this.getColumnWidth(t,e))),this.addHook("afterInit",(()=>E(this,I,D).call(this))),super.enablePlugin()}updatePlugin(){const e=this.findColumnsWhereHeaderWasChanged();e.length&&(this.clearCache(e),this.calculateVisibleColumnsWidth()),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.addHook("beforeColumnResize",((e,t,o)=>E(this,M,k).call(this,e,t,o)))}calculateVisibleColumnsWidth(){if(!this.hot.countRows())return;const e=this.hot.renderCall,t=this.getFirstVisibleColumn(),o=this.getLastVisibleColumn();-1!==t&&-1!==o&&this.calculateColumnsWidth({from:t,to:o},void 0,e)}calculateColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countRows()-1},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s="number"==typeof e?{from:e,to:e}:e,i="number"==typeof t?{from:t,to:t}:t;(0,g.rangeEach)(s.from,s.to,(e=>{let t=this.hot.toPhysicalColumn(e);if(null===t&&(t=e),o||null===this.columnWidthsMap.getValueAtIndex(t)&&!this.hot._getColWidthFromSettings(t)){const t=this.samplesGenerator.generateColumnSamples(e,i);(0,l.arrayEach)(t,(e=>{let[t,o]=e;return this.ghostTable.addColumn(t,o)}))}})),this.ghostTable.columns.length&&(this.hot.batchExecution((()=>{this.ghostTable.getWidths(((e,t)=>{const o=this.hot.toPhysicalColumn(e);this.columnWidthsMap.setValueAtIndex(o,t)}))}),!0),this.measuredColumns=s.to+1,this.ghostTable.clean())}calculateAllColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=0;const o=this.hot.countCols()-1;let s=null;this.inProgress=!0;const i=()=>{if(!this.hot)return(0,h.cancelAnimationFrame)(s),void(this.inProgress=!1);this.calculateColumnsWidth({from:t,to:Math.min(t+A.CALCULATION_STEP,o)},e),t=t+A.CALCULATION_STEP+1,t<o?s=(0,h.requestAnimationFrame)(i):((0,h.cancelAnimationFrame)(s),this.inProgress=!1,this.hot.view.adjustElementsSize())},r=this.getSyncCalculationLimit();this.firstCalculation&&r>=0&&(this.calculateColumnsWidth({from:0,to:r},e),this.firstCalculation=!1,t=r+1),t<o?i():this.inProgress=!1}setSamplingOptions(){const e=this.hot.getSettings()[S],t=e&&(0,c.hasOwnProperty)(e,"samplingRatio")?e.samplingRatio:void 0,o=e&&(0,c.hasOwnProperty)(e,"allowSampleDuplicates")?e.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),o&&this.samplesGenerator.setAllowDuplicates(o)}recalculateAllColumnsWidth(){this.hot.view&&this.hot.view._wt.wtTable.isVisible()&&(this.clearCache(),this.calculateAllColumnsWidth())}getSyncCalculationLimit(){const e=this.hot.getSettings()[S];let t=A.SYNC_CALCULATION_LIMIT;const o=this.hot.countCols()-1;return(0,c.isObject)(e)&&(t=e.syncLimit,(0,p.isPercentValue)(t)?t=(0,g.valueAccordingPercent)(o,t):t>>=0),Math.min(t,o)}getColumnWidth(e){let t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return void 0===o&&(o=this.columnWidthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e)),t&&"number"==typeof o&&(o=Math.max(o,m.ViewportColumnsCalculator.DEFAULT_WIDTH))),o}getFirstVisibleColumn(){const e=this.hot.view._wt;if(e.wtViewport.columnsVisibleCalculator){const t=e.wtTable.getFirstVisibleColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}if(e.wtViewport.columnsRenderCalculator){const t=e.wtTable.getFirstRenderedColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}return-1}getLastVisibleColumn(){const e=this.hot.view._wt;if(e.wtViewport.columnsVisibleCalculator){const t=e.wtTable.getLastVisibleColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}if(e.wtViewport.columnsRenderCalculator){const t=e.wtTable.getLastRenderedColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}return-1}findColumnsWhereHeaderWasChanged(){const e=this.hot.getColHeader();return(0,l.arrayReduce)(e,((e,t,o)=>{const s=(0,n.default)(this,b).length;return(s-1<o||(0,n.default)(this,b)[o]!==t)&&e.push(o),s-1<o?(0,n.default)(this,b).push(t):(0,n.default)(this,b)[o]=t,e}),[])}clearCache(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.length?this.hot.batchExecution((()=>{(0,l.arrayEach)(e,(e=>{this.columnWidthsMap.setValueAtIndex(e,null)}))}),!0):this.columnWidthsMap.clear()}isNeedRecalculate(){return!!(0,l.arrayFilter)(this.columnWidthsMap.getValues().slice(0,this.measuredColumns),(e=>null===e)).length}destroy(){this.ghostTable.clean(),super.destroy()}}function P(){this.calculateVisibleColumnsWidth(),this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllColumnsWidth()}function x(){this.hot.view?this.recalculateAllColumnsWidth():setTimeout((()=>{this.hot&&this.recalculateAllColumnsWidth()}),0)}function H(e){const t=(0,l.arrayMap)(e,(e=>{let[,t]=e;return this.hot.toPhysicalColumn(this.hot.propToCol(t))}));this.clearCache(Array.from(new Set(t)))}function k(e,t,o){let s=e;return o&&(this.calculateColumnsWidth(t,void 0,!0),s=this.getColumnWidth(t,void 0,!1)),s}function D(){(0,r.default)(this,b,this.hot.getColHeader())}function L(e){const t=(0,l.arrayFilter)(e,(e=>{var t;return(0,C.isDefined)(null===(t=e.address)||void 0===t?void 0:t.col)})),o=(0,l.arrayMap)(t,(e=>e.address.col));this.clearCache(Array.from(new Set(o)))}t.AutoColumnSize=A},21215:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(35030);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.AutoColumnSize=s.AutoColumnSize},64168:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(36026),n=o(50095),a=o(7374),l=o(83302),h=s(o(17954)),u=o(22232),d=o(68145),c=s(o(10977)),g=o(18609),f=o(33165);function p(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function m(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const w=t.PLUGIN_KEY="autoRowSize",C=t.PLUGIN_PRIORITY=40;var v=new WeakSet,y=new WeakSet,E=new WeakSet,S=new WeakSet;class R extends r.BasePlugin{static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return C}static get SETTING_KEYS(){return!0}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 500}constructor(e){super(e),p(this,S),p(this,E),p(this,y),p(this,v),(0,i.default)(this,"headerHeight",null),(0,i.default)(this,"ghostTable",new h.default(this.hot)),(0,i.default)(this,"samplesGenerator",new c.default(((e,t)=>{if(e>=0&&t>=0){if(this.hot.getCellMeta(e,t).hidden)return!1}let o;return e>=0?o=this.hot.getDataAtCell(e,t):-1===e&&(o=this.hot.getColHeader(t)),{value:o}}))),(0,i.default)(this,"firstCalculation",!0),(0,i.default)(this,"inProgress",!1),(0,i.default)(this,"measuredRows",0),(0,i.default)(this,"rowHeightsMap",new f.PhysicalIndexToValueMap),this.hot.rowIndexMapper.registerMap("autoRowSize",this.rowHeightsMap),this.addHook("beforeRowResize",((e,t,o)=>m(this,y,_).call(this,e,t,o)))}isEnabled(){const e=this.hot.getSettings()[w];return!0===e||(0,u.isObject)(e)}enablePlugin(){var e=this;this.enabled||(this.setSamplingOptions(),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return m(e,E,T).call(e,...o)})),this.addHook("beforeChangeRender",(e=>m(this,S,O).call(this,e))),this.addHook("beforeColumnResize",(()=>this.recalculateAllRowsHeight())),this.addHook("beforeViewRender",(e=>m(this,v,b).call(this,e))),this.addHook("modifyRowHeight",((e,t)=>this.getRowHeight(t,e))),this.addHook("modifyColumnHeaderHeight",(()=>this.getColumnHeaderHeight())),super.enablePlugin())}disablePlugin(){this.headerHeight=null,super.disablePlugin(),this.addHook("beforeRowResize",((e,t,o)=>m(this,y,_).call(this,e,t,o)))}calculateRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countCols()-1},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s="number"==typeof e?{from:e,to:e}:e,i="number"==typeof t?{from:t,to:t}:t;if(null!==this.hot.getColHeader(0)){const e=this.samplesGenerator.generateRowSamples(-1,i);this.ghostTable.addColumnHeadersRow(e.get(-1))}(0,d.rangeEach)(s.from,s.to,(e=>{if(o||null===this.rowHeightsMap.getValueAtIndex(e)){const t=this.samplesGenerator.generateRowSamples(e,i);(0,n.arrayEach)(t,(e=>{let[t,o]=e;return this.ghostTable.addRow(t,o)}))}})),this.ghostTable.rows.length&&(this.hot.batchExecution((()=>{this.ghostTable.getHeights(((e,t)=>{e<0?this.headerHeight=t:this.rowHeightsMap.setValueAtIndex(this.hot.toPhysicalRow(e),t)}))}),!0),this.measuredRows=s.to+1,this.ghostTable.clean())}calculateAllRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=0;const o=this.hot.countRows()-1;let s=null;this.inProgress=!0;const i=()=>{if(!this.hot)return(0,a.cancelAnimationFrame)(s),void(this.inProgress=!1);this.calculateRowsHeight({from:t,to:Math.min(t+R.CALCULATION_STEP,o)},e),t=t+R.CALCULATION_STEP+1,t<o?s=(0,a.requestAnimationFrame)(i):((0,a.cancelAnimationFrame)(s),this.inProgress=!1,this.hot.view.adjustElementsSize(!0),this.hot.view._wt.wtOverlays.inlineStartOverlay.needFullRender&&this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.draw())},r=this.getSyncCalculationLimit();this.firstCalculation&&r>=0&&(this.calculateRowsHeight({from:0,to:r},e),this.firstCalculation=!1,t=r+1),t<o?i():(this.inProgress=!1,this.hot.view.adjustElementsSize(!1))}setSamplingOptions(){const e=this.hot.getSettings()[w],t=e&&(0,u.hasOwnProperty)(e,"samplingRatio")?e.samplingRatio:void 0,o=e&&(0,u.hasOwnProperty)(e,"allowSampleDuplicates")?e.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),o&&this.samplesGenerator.setAllowDuplicates(o)}recalculateAllRowsHeight(){(0,l.isVisible)(this.hot.view._wt.wtTable.TABLE)&&(this.clearCache(),this.calculateAllRowsHeight())}getSyncCalculationLimit(){const e=this.hot.getSettings()[w];let t=R.SYNC_CALCULATION_LIMIT;const o=this.hot.countRows()-1;return(0,u.isObject)(e)&&(t=e.syncLimit,(0,g.isPercentValue)(t)?t=(0,d.valueAccordingPercent)(o,t):t>>=0),Math.min(t,o)}getRowHeight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;const o=e<0?this.headerHeight:this.rowHeightsMap.getValueAtIndex(this.hot.toPhysicalRow(e));let s=t;return null!==o&&o>(t||0)&&(s=o),s}getColumnHeaderHeight(){return this.headerHeight}getFirstVisibleRow(){const e=this.hot.view._wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getFirstVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getFirstRenderedRow():-1}getLastVisibleRow(){const e=this.hot.view._wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getLastVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getLastRenderedRow():-1}clearCache(){this.headerHeight=null,this.rowHeightsMap.init()}clearCacheByRange(e){const{from:t,to:o}="number"==typeof e?{from:e,to:e}:e;this.hot.batchExecution((()=>{(0,d.rangeEach)(Math.min(t,o),Math.max(t,o),(e=>{this.rowHeightsMap.setValueAtIndex(e,null)}))}),!0)}isNeedRecalculate(){return!!(0,n.arrayFilter)(this.rowHeightsMap.getValues().slice(0,this.measuredRows),(e=>null===e)).length}destroy(){this.ghostTable.clean(),super.destroy()}}function b(){const e=this.hot.renderCall,t=this.hot.getSettings().fixedRowsBottom,o=this.getFirstVisibleRow(),s=this.getLastVisibleRow();if(-1!==o&&-1!==s){if(this.calculateRowsHeight({from:o,to:s},void 0,e),t){const e=this.hot.countRows()-1;this.calculateRowsHeight({from:e-t,to:e})}this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllRowsHeight()}}function _(e,t,o){let s=e;return o&&(this.calculateRowsHeight(t,void 0,!0),s=this.getRowHeight(t)),s}function T(){this.hot.view?this.recalculateAllRowsHeight():this.hot._registerTimeout((()=>{this.hot&&this.recalculateAllRowsHeight()}))}function O(e){let t=null;1===e.length?t=e[0][0]:e.length>1&&(t={from:e[0][0],to:e[e.length-1][0]}),null!==t&&this.clearCacheByRange(t)}t.AutoRowSize=R},60687:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(64168);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.AutoRowSize=s.AutoRowSize},51479:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=o(36026),n=s(o(56307)),a=o(83302),l=o(50095),h=o(28151);function u(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function d(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}n.default.getSingleton().register("modifyAutofillRange"),n.default.getSingleton().register("beforeAutofill"),n.default.getSingleton().register("afterAutofill");const c=t.PLUGIN_KEY="autofill",g=t.PLUGIN_PRIORITY=20,f=["fillHandle"];var p=new WeakSet,m=new WeakSet,w=new WeakSet,C=new WeakSet,v=new WeakSet;class y extends r.BasePlugin{constructor(){super(...arguments),u(this,v),u(this,C),u(this,w),u(this,m),u(this,p),(0,i.default)(this,"addingStarted",!1),(0,i.default)(this,"mouseDownOnCellCorner",!1),(0,i.default)(this,"mouseDragOutside",!1),(0,i.default)(this,"handleDraggedCells",0),(0,i.default)(this,"directions",[]),(0,i.default)(this,"autoInsertRow",!1)}static get PLUGIN_KEY(){return c}static get PLUGIN_PRIORITY(){return g}static get SETTING_KEYS(){return[c,...f]}isEnabled(){return this.hot.getSettings().fillHandle}enablePlugin(){this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",(e=>d(this,m,S).call(this,e))),this.addHook("afterOnCellCornerDblClick",(e=>d(this,p,E).call(this,e))),this.addHook("beforeOnCellMouseOver",((e,t)=>d(this,w,R).call(this,t))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.clearMappedSettings(),super.disablePlugin()}getSelectionData(){const e=this.hot.getSelectedRangeLast(),{row:t,col:o}=e.getTopStartCorner(),{row:s,col:i}=e.getBottomEndCorner(),r=this.hot.runHooks("modifyCopyableRange",[{startRow:t,startCol:o,endRow:s,endCol:i}]),n=[],a=[],h=[];return(0,l.arrayEach)(r,(e=>{for(let t=e.startRow;t<=e.endRow;t+=1)-1===n.indexOf(t)&&n.push(t);for(let t=e.startCol;t<=e.endCol;t+=1)-1===a.indexOf(t)&&a.push(t)})),(0,l.arrayEach)(n,(e=>{const t=[];(0,l.arrayEach)(a,(o=>{t.push(this.hot.getCopyableData(e,o))})),h.push(t)})),h}fillIn(){if(this.hot.selection.highlight.getFill().isEmpty())return!1;const[e,t,o,s]=this.hot.selection.highlight.getFill().getVisualCorners(),i=this.hot.getSelectedRangeLast(),r=i.getTopStartCorner(),n=i.getBottomEndCorner();this.resetSelectionOfDraggedArea();const a=[r.row,r.col,n.row,n.col],l=this.hot.runHooks("modifyAutofillRange",[Math.min(r.row,e),Math.min(r.col,t),Math.max(n.row,o),Math.max(n.col,s)],a),{directionOfDrag:u,startOfDragCoords:d,endOfDragCoords:c}=(0,h.getDragDirectionAndRange)(a,l,((e,t)=>this.hot._createCellCoords(e,t)));if(d&&d.row>-1&&d.col>-1){const e=this.getSelectionData(),t=i.clone(),o=this.hot._createCellRange(d,d,c),s=this.hot.runHooks("beforeAutofill",e,t,o,u);if(!1===s)return this.hot.selection.highlight.getFill().clear(),this.hot.render(),!1;let r=s;const n=s;if(["up","left"].indexOf(u)>-1&&(1!==n.length||0!==n[0].length))if(r=[],"up"===u){const e=c.row-d.row+1,t=e%n.length;for(let o=0;o<e;o++)r.push(n[(o+(n.length-t))%n.length])}else{const e=c.col-d.col+1,t=e%n[0].length;for(let o=0;o<n.length;o++){r.push([]);for(let s=0;s<e;s++)r[o].push(n[o][(s+(n[o].length-t))%n[o].length])}}this.hot.populateFromArray(d.row,d.col,r,c.row,c.col,`${this.pluginName}.fill`,null),this.setSelection(l),this.hot.runHooks("afterAutofill",r,t,o,u),this.hot.render()}else this.hot._refreshBorders();return!0}reduceSelectionAreaIfNeeded(e){return e.row<0&&(e.row=0),e.col<0&&(e.col=0),e}getCoordsOfDragAndDropBorders(e){const t=this.hot.getSelectedRangeLast(),o=t.getBottomEndCorner();let s=e;if(this.directions.includes(h.DIRECTIONS.vertical)&&this.directions.includes(h.DIRECTIONS.horizontal)){const i=t.getTopStartCorner();(o.col<=e.col||i.col>=e.col)&&(s=this.hot._createCellCoords(o.row,e.col)),(o.row<e.row||i.row>e.row)&&(s=this.hot._createCellCoords(e.row,o.col))}else if(this.directions.includes(h.DIRECTIONS.vertical))s=this.hot._createCellCoords(e.row,o.col);else{if(!this.directions.includes(h.DIRECTIONS.horizontal))return;s=this.hot._createCellCoords(o.row,e.col)}return this.reduceSelectionAreaIfNeeded(s)}showBorder(e){const t=this.getCoordsOfDragAndDropBorders(e);t&&this.redrawBorders(t)}addRow(){this.hot._registerTimeout((()=>{this.hot.alter("insert_row_below",void 0,1,`${this.pluginName}.fill`),this.addingStarted=!1}),200)}addNewRowIfNeeded(){if(!this.hot.selection.highlight.getFill().isEmpty()&&!1===this.addingStarted&&this.autoInsertRow){const e=this.hot.getSelectedLast(),t=this.hot.selection.highlight.getFill().getVisualCorners(),o=this.hot.countRows();e[2]<o-1&&t[2]===o-1&&(this.addingStarted=!0,this.addRow())}}getIndexOfLastAdjacentFilledInRow(e){const t=this.hot.getData(),o=this.hot.countRows();let s;for(let i=e[2]+1;i<o;i++){for(let o=e[1];o<=e[3];o++){if(t[i][o])return-1}const o=t[i][e[1]-1],r=t[i][e[3]+1];(o||r)&&(s=i)}return s}addSelectionFromStartAreaToSpecificRowIndex(e,t){this.hot.selection.highlight.getFill().clear().add(this.hot._createCellCoords(e[0],e[1])).add(this.hot._createCellCoords(t,e[3])).commit()}setSelection(e){this.hot.selectCell(...(0,l.arrayMap)(e,(e=>Math.max(e,0))),!1,!1)}selectAdjacent(){const e=this.hot.getSelectedLast(),t=this.getIndexOfLastAdjacentFilledInRow(e);return-1!==t&&void 0!==t&&(this.addSelectionFromStartAreaToSpecificRowIndex(e,t),!0)}resetSelectionOfDraggedArea(){this.handleDraggedCells=0,this.hot.selection.highlight.getFill().clear()}redrawBorders(e){this.hot.selection.highlight.getFill().clear().add(this.hot.getSelectedRangeLast().from).add(this.hot.getSelectedRangeLast().to).add(e).commit(),this.hot.view.render()}getIfMouseWasDraggedOutside(e){const{documentElement:t}=this.hot.rootDocument,o=(0,a.offset)(this.hot.table).top-(this.hot.rootWindow.pageYOffset||t.scrollTop)+(0,a.outerHeight)(this.hot.table),s=(0,a.offset)(this.hot.table).left-(this.hot.rootWindow.pageXOffset||t.scrollLeft)+(0,a.outerWidth)(this.hot.table);return e.clientY>o&&e.clientX<=s}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mouseup",(()=>d(this,C,b).call(this))),this.eventManager.addEventListener(e,"mousemove",(e=>d(this,v,_).call(this,e)))}clearMappedSettings(){this.directions.length=0,this.autoInsertRow=!1}mapSettings(){const e=(0,h.getMappedFillHandleSetting)(this.hot.getSettings().fillHandle);this.directions=e.directions,this.autoInsertRow=e.autoInsertRow}destroy(){super.destroy()}}function E(){this.selectAdjacent()&&this.fillIn()}function S(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}function R(e){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.showBorder(e),this.addNewRowIfNeeded())}function b(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}function _(e){const t=this.getIfMouseWasDraggedOutside(e);!1===this.addingStarted&&this.handleDraggedCells>0&&t?(this.mouseDragOutside=!0,this.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&this.autoInsertRow&&this.addRow()}t.Autofill=y},62080:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(51479);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Autofill=s.Autofill},28151:(e,t,o)=>{"use strict";t.__esModule=!0,t.getDragDirectionAndRange=function(e,t,o){let s,i,r;t[0]===e[0]&&t[1]<e[1]?(r="left",s=o(t[0],t[1]),i=o(t[2],e[1]-1)):t[2]===e[2]&&t[0]===e[0]&&t[3]>e[3]?(r="right",s=o(t[0],e[3]+1),i=o(t[2],t[3])):t[0]<e[0]&&t[1]===e[1]?(r="up",s=o(t[0],t[1]),i=o(e[0]-1,t[3])):t[2]>e[2]&&t[1]===e[1]&&(r="down",s=o(e[2]+1,t[1]),i=o(t[2],t[3]));s&&s.normalize();i&&i.normalize();return{directionOfDrag:r,startOfDragCoords:s,endOfDragCoords:i}},t.getMappedFillHandleSetting=function(e){const t={};!0===e?(t.directions=Object.keys(r),t.autoInsertRow=!0):(0,s.isObject)(e)?((0,i.isDefined)(e.autoInsertRow)?e.direction===r.horizontal?t.autoInsertRow=!1:t.autoInsertRow=e.autoInsertRow:t.autoInsertRow=!1,(0,i.isDefined)(e.direction)?t.directions=[e.direction]:t.directions=Object.keys(r)):"string"==typeof e?(t.directions=[e],t.autoInsertRow=!0):(t.directions=[],t.autoInsertRow=!1);return t};var s=o(22232),i=o(93315);const r=t.DIRECTIONS={horizontal:"horizontal",vertical:"vertical"}},13541:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=s(o(42538)),n=o(22232),a=o(50095),l=o(52036),h=o(65324),u=o(83605),d=o(7462),c=o(80239),g=s(o(75244));function f(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}const p=new Map([["plugin",l.hasPlugin],["cell-type",h.hasCellType],["editor",u.hasEditor],["renderer",d.hasRenderer],["validator",c.hasValidator]]),m=t.PLUGIN_KEY="base",w=[];let C=null;var v=new WeakMap,y=new WeakSet;function E(e){if(!e)return!1;const t=this.constructor.SETTING_KEYS;if("boolean"==typeof t)return t;for(let o=0;o<t.length;o++)if(void 0!==e[t[o]])return!0;return!1}t.BasePlugin=class{static get PLUGIN_KEY(){return m}static get SETTING_KEYS(){return[this.PLUGIN_KEY]}constructor(e){var t,o;f(t=this,o=y),o.add(t),(0,i.default)(this,"eventManager",new g.default(this)),(0,i.default)(this,"pluginName",null),(0,i.default)(this,"pluginsInitializedCallbacks",[]),(0,i.default)(this,"isPluginsReady",!1),(0,i.default)(this,"enabled",!1),(0,i.default)(this,"initialized",!1),function(e,t,o){f(e,t),t.set(e,o)}(this,v,{writable:!0,value:{}}),(0,n.defineGetter)(this,"hot",e,{writable:!1}),C=null,this.hot.addHook("afterPluginsInitialized",(()=>this.onAfterPluginsInitialized())),this.hot.addHook("afterUpdateSettings",(e=>this.onUpdateSettings(e))),this.hot.addHook("beforeInit",(()=>this.init()))}init(){this.pluginName=this.hot.getPluginName(this);const e=this.constructor.PLUGIN_DEPS,t=Array.isArray(e)?e:[];if(t.length>0){const e=[];if(t.forEach((t=>{const[o,s]=t.split(":");if(!p.has(o))throw new Error(`Unknown plugin dependency type "${o}" was found.`);p.get(o)(s)||e.push(` - ${s} (${o})`)})),e.length>0){const t=[`The ${this.pluginName} plugin requires the following modules:\n`,`${e.join("\n")}\n`].join("");w.push(t)}}C||(C=(0,l.getPluginsNames)()),C.indexOf("UndoRedo")>=0&&C.splice(C.indexOf("UndoRedo"),1),C.indexOf(this.pluginName)>=0&&C.splice(C.indexOf(this.pluginName),1),this.hot.addHookOnce("afterPluginsInitialized",(()=>{this.isEnabled&&this.isEnabled()&&this.enablePlugin()}));if(0===C.length){if(w.length>0){const e=[`${w.join("\n")}\n`,"You have to import and register them manually."].join("");throw new Error(e)}this.hot.runHooks("afterPluginsInitialized")}this.initialized=!0}enablePlugin(){this.enabled=!0}disablePlugin(){var e;null===(e=this.eventManager)||void 0===e||e.clear(),this.clearHooks(),this.enabled=!1}addHook(e,t){(0,r.default)(this,v)[e]=(0,r.default)(this,v)[e]||[];const o=(0,r.default)(this,v)[e];this.hot.addHook(e,t),o.push(t),(0,r.default)(this,v)[e]=o}removeHooks(e){(0,a.arrayEach)((0,r.default)(this,v)[e]||[],(t=>{this.hot.removeHook(e,t)}))}clearHooks(){const e=(0,r.default)(this,v);(0,n.objectEach)(e,((e,t)=>this.removeHooks(t))),e.length=0}callOnPluginsReady(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)}onAfterPluginsInitialized(){(0,a.arrayEach)(this.pluginsInitializedCallbacks,(e=>e())),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}onUpdateSettings(e){const t=function(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}(this,y,E).call(this,e);this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&t&&this.updatePlugin(e))}updatePlugin(){}destroy(){var e;null===(e=this.eventManager)||void 0===e||e.destroy(),this.clearHooks(),(0,n.objectEach)(this,((e,t)=>{"hot"!==t&&(this[t]=null)})),delete this.t,delete this.hot}}},36026:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(13541);t.PLUGIN_KEY=s.PLUGIN_KEY,t.BasePlugin=s.BasePlugin},37958:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(36026),n=s(o(82173)),a=s(o(12738));function l(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}const h=t.PLUGIN_KEY="bindRowsWithHeaders",u=t.PLUGIN_PRIORITY=210,d=new Map([["loose",n.default],["strict",a.default]]);var c=new WeakSet;class g extends r.BasePlugin{constructor(){super(...arguments),l(this,c),(0,i.default)(this,"headerIndexes",null)}static get PLUGIN_KEY(){return h}static get PLUGIN_PRIORITY(){return u}isEnabled(){return!!this.hot.getSettings()[h]}enablePlugin(){if(this.enabled)return;let e=this.hot.getSettings()[h];"string"!=typeof e&&(e="loose");const t=d.get(e);this.headerIndexes=this.hot.rowIndexMapper.registerMap("bindRowsWithHeaders",new t),this.addHook("modifyRowHeader",(e=>function(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}(this,c,f).call(this,e))),super.enablePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("bindRowsWithHeaders"),super.disablePlugin()}destroy(){super.destroy()}}function f(e){return this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(e))}t.BindRowsWithHeaders=g},85939:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(37958);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.BindRowsWithHeaders=s.BindRowsWithHeaders},82173:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(33165);const{getListWithInsertedItems:i,getListWithRemovedItems:r}=(0,s.alterUtilsFactory)("physicallyIndexed");class n extends s.IndexMap{constructor(){super((e=>e))}insert(e,t){const o=(0,s.getIncreasedIndexes)(this.indexedValues,t);this.indexedValues=i(o,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){const t=r(this.indexedValues,e);this.indexedValues=(0,s.getDecreasedIndexes)(t,e),super.remove(e)}}t.default=n},12738:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(33165);const{getListWithInsertedItems:i,getListWithRemovedItems:r}=(0,s.alterUtilsFactory)("physicallyIndexed");class n extends s.IndexMap{constructor(){super((e=>e))}insert(e,t){this.indexedValues=i(this.indexedValues,e,t,((e,t)=>this.getNextValue(t))),super.insert(e,t)}remove(e){this.indexedValues=r(this.indexedValues,e),super.remove(e)}getNextValue(e){return Math.max(...this.getValues())+1+e}}t.default=n},11665:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=s(o(42538)),n=s(o(48427)),a=o(36026),l=o(50095),h=o(68145),u=o(69173),d=o(83302),c=o(24449),g=o(5386);function f(e,t){p(e,t),t.add(e)}function p(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function m(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const w=t.PLUGIN_KEY="collapsibleColumns",C=t.PLUGIN_PRIORITY=290,v=["nestedHeaders"],y="collapsibleIndicator",E=w,S=new Map([["collapse",{hideColumn:!0,beforeHook:"beforeColumnCollapse",afterHook:"afterColumnCollapse"}],["expand",{hideColumn:!1,beforeHook:"beforeColumnExpand",afterHook:"afterColumnExpand"}]]);var R=new WeakMap,b=new WeakSet,_=new WeakSet,T=new WeakSet,O=new WeakSet;class M extends a.BasePlugin{constructor(){var e,t,o;super(...arguments),f(this,O),f(this,T),f(this,_),f(this,b),(0,i.default)(this,"nestedHeadersPlugin",null),(0,i.default)(this,"headerStateManager",null),o={writable:!0,value:null},p(e=this,t=R),t.set(e,o)}static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return C}static get PLUGIN_DEPS(){return["plugin:NestedHeaders"]}static get SETTING_KEYS(){return[w,...v]}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();t||(0,u.warn)("You need to configure the Nested Headers plugin in order to use collapsible headers."),(0,n.default)(this,R,this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding")),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.headerStateManager=this.nestedHeadersPlugin.getStateManager(),this.addHook("init",(()=>m(this,T,A).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return m(e,O,P).call(e,...o)})),this.addHook("afterGetColHeader",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return m(e,b,I).call(e,...o)})),this.addHook("beforeOnCellMouseDown",((e,t,o)=>m(this,_,N).call(this,e,t,o))),this.registerShortcuts(),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(this.hot.view){if(!this.nestedHeadersPlugin.detectedOverlappedHeaders){const{collapsibleColumns:e}=this.hot.getSettings();"boolean"==typeof e?this.headerStateManager.mapState((e=>({collapsible:e.origColspan>1}))):Array.isArray(e)&&(this.headerStateManager.mapState((()=>({collapsible:!1}))),this.headerStateManager.mergeStateWith(e))}super.updatePlugin()}}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),(0,n.default)(this,R,null),this.nestedHeadersPlugin=null,this.unregisterShortcuts(),this.clearButtons(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{var e;const{row:t,col:o}=this.hot.getSelectedRangeLast().highlight,{collapsible:s,isCollapsed:i,columnIndex:r}=null!==(e=this.headerStateManager.getHeaderTreeNodeData(t,o))&&void 0!==e?e:{};s&&(i?this.expandSection({row:t,col:r}):this.collapseSection({row:t,col:r}))},runOnlyIf:()=>{var e;return null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isHeader()},group:E})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(E)}clearButtons(){if(!this.hot.view)return;const e=this.hot.view._wt.getSetting("columnHeaders").length,t=this.hot.view._wt.wtTable.THEAD,o=this.hot.view._wt.wtOverlays.topOverlay.clone.wtTable.THEAD,s=this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay?this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null,i=function(e){e&&e.parentNode.removeChild(e)};(0,h.rangeEach)(0,e-1,(e=>{const r=t.childNodes[e],n=o.childNodes[e],a=s?s.childNodes[e]:null;(0,h.rangeEach)(0,r.childNodes.length-1,(e=>{let t=r.childNodes[e].querySelector(`.${y}`);i(t),n&&n.childNodes[e]&&(t=n.childNodes[e].querySelector(`.${y}`),i(t)),s&&a&&a.childNodes[e]&&(t=a.childNodes[e].querySelector(`.${y}`),i(t))}))}),!0)}expandSection(e){this.toggleCollapsibleSection([e],"expand")}collapseSection(e){this.toggleCollapsibleSection([e],"collapse")}toggleAllCollapsibleSections(e){const t=this.headerStateManager.mapNodes((t=>{const{collapsible:o,origColspan:s,headerLevel:i,columnIndex:r,isCollapsed:n}=t;if(!0===o&&s>1&&(n&&"expand"===e||!n&&"collapse"===e))return{row:this.headerStateManager.levelToRowCoords(i),col:r}}));this.toggleCollapsibleSection(t,e)}collapseAll(){this.toggleAllCollapsibleSections("collapse")}expandAll(){this.toggleAllCollapsibleSections("expand")}toggleCollapsibleSection(e,t){if(!S.has(t))throw new Error(`Unsupported action is passed (${t}).`);if(!Array.isArray(e))return;const o=(0,l.arrayFilter)(e,(e=>{let{row:t}=e;return t<0}));let s=o.length>0;(0,l.arrayEach)(o,(e=>{var o;let{row:i,col:r}=e;const{collapsible:n,isCollapsed:a}=null!==(o=this.headerStateManager.getHeaderSettings(i,r))&&void 0!==o?o:{};if(!n||a&&"collapse"===t||!a&&"expand"===t)return s=!1,!1}));const i=[],n=[];s&&(0,l.arrayEach)(o,(e=>{let{row:o,col:s}=e;const{colspanCompensation:r,affectedColumns:a,rollbackModification:l}=this.headerStateManager.triggerNodeModification(t,o,s);r>0&&(n.push(...a),i.push(l))}));const a=this.getCollapsedColumns();let h=[];"collapse"===t?h=(0,l.arrayUnique)([...a,...n]):"expand"===t&&(h=(0,l.arrayFilter)(a,(e=>!n.includes(e))));const u=S.get(t);if(!1===this.hot.runHooks(u.beforeHook,a,h,s))return void(0,l.arrayEach)(i,(e=>{e()}));this.hot.batchExecution((()=>{(0,l.arrayEach)(n,(e=>{(0,r.default)(this,R).setValueAtIndex(this.hot.toPhysicalColumn(e),u.hideColumn)}))}),!0);const d=this.getCollapsedColumns().length!==a.length;this.hot.runHooks(u.afterHook,a,h,s,d),this.hot.render(),this.hot.view.adjustElementsSize(!0)}getCollapsedColumns(){return(0,r.default)(this,R).getHiddenIndexes()}destroy(){(0,n.default)(this,R,null),super.destroy()}}function I(e,t,o){var s;const{collapsible:i,origColspan:r,isCollapsed:n}=null!==(s=this.headerStateManager.getHeaderSettings(o,e))&&void 0!==s?s:{},a=i&&r>1&&e>=this.hot.getSettings().fixedColumnsStart,l=this.hot.getSettings().ariaTags;let h=t.querySelector(`.${y}`);var u;((0,d.removeAttribute)(t,[(0,g.A11Y_EXPANDED)("")[0]]),a)?(h||(h=this.hot.rootDocument.createElement("div"),(0,d.addClass)(h,y),t.querySelector("div:first-child").appendChild(h)),(0,d.removeClass)(h,["collapsed","expanded"]),n?((0,d.addClass)(h,"collapsed"),(0,d.fastInnerText)(h,"+"),l&&(0,d.setAttribute)(t,...(0,g.A11Y_EXPANDED)(!1))):((0,d.addClass)(h,"expanded"),(0,d.fastInnerText)(h,"-"),l&&(0,d.setAttribute)(t,...(0,g.A11Y_EXPANDED)(!0))),l&&(0,d.setAttribute)(h,...(0,g.A11Y_HIDDEN)())):null===(u=h)||void 0===u||u.remove()}function N(e,t){(0,d.hasClass)(e.target,y)&&((0,d.hasClass)(e.target,"expanded")?(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"collapse")):(0,d.hasClass)(e.target,"collapsed")&&(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"expand")),(0,c.stopImmediatePropagation)(e))}function A(){this.updatePlugin()}function P(e,t){t||this.updatePlugin()}t.CollapsibleColumns=M},55994:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(11665);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.CollapsibleColumns=s.CollapsibleColumns},80081:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=o(83302),n=o(93315),a=o(22232),l=o(85015),h=o(50095),u=o(36026),d=o(33165),c=s(o(56307)),g=o(88082),f=o(64951),p=o(59809),m=o(24892),w=o(51510),C=o(5386);function v(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function y(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const E=t.PLUGIN_KEY="columnSorting",S=t.PLUGIN_PRIORITY=50,R=t.APPEND_COLUMN_CONFIG_STRATEGY="append",b=t.REPLACE_COLUMN_CONFIG_STRATEGY="replace",_=E;(0,w.registerRootComparator)(E,m.rootComparator),c.default.getSingleton().register("beforeColumnSort"),c.default.getSingleton().register("afterColumnSort");var T=new WeakSet,O=new WeakSet,M=new WeakSet,I=new WeakSet;class N extends u.BasePlugin{constructor(){super(...arguments),v(this,I),v(this,M),v(this,O),v(this,T),(0,i.default)(this,"columnStatesManager",null),(0,i.default)(this,"columnMetaCache",null),(0,i.default)(this,"pluginKey",E),(0,i.default)(this,"indexesSequenceCache",null)}static get PLUGIN_KEY(){return E}static get PLUGIN_PRIORITY(){return S}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){var e=this;this.enabled||(this.columnStatesManager=new g.ColumnStatesManager(this.hot,`${this.pluginKey}.sortingStates`),this.columnMetaCache=new d.PhysicalIndexToValueMap((e=>{let t=this.hot.toVisualColumn(e);return null===t&&(t=e),this.getMergedPluginSettings(t)})),this.hot.columnIndexMapper.registerMap(`${this.pluginKey}.columnMeta`,this.columnMetaCache),this.addHook("afterGetColHeader",((e,t)=>y(this,O,P).call(this,e,t))),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return y(e,I,H).call(e,...o)})),this.addHook("afterOnCellMouseDown",((e,t)=>this.onAfterOnCellMouseDown(e,t))),this.addHook("afterInit",(()=>y(this,T,A).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return y(e,M,x).call(e,...o)})),this.hot.view&&y(this,T,A).call(this),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){const e=(e,t)=>{const o=(0,f.getHeaderSpanElement)(t);!1!==(0,f.isFirstLevelColumnHeader)(e,t)&&null!==o&&this.updateHeaderClasses(o)};this.hot.addHook("afterGetColHeader",e),this.hot.addHookOnce("afterViewRender",(()=>{this.hot.removeHook("afterGetColHeader",e)})),this.hot.batchExecution((()=>{null!==this.indexesSequenceCache&&(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginKey))}),!0),this.hot.columnIndexMapper.unregisterMap(`${this.pluginKey}.columnMeta`),this.columnStatesManager.destroy(),this.columnMetaCache=null,this.columnStatesManager=null,this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();-1===e.row&&e.col>=0&&this.sort(this.getColumnNextConfig(e.col))},runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()},group:_})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(_)}sort(e){const t=this.getSortConfig(),o=this.getNormalizedSortConfigs(e),s=this.areValidSortConfigs(o);!1!==this.hot.runHooks("beforeColumnSort",t,o,s)&&(0===t.length&&null===this.indexesSequenceCache&&(this.indexesSequenceCache=this.hot.rowIndexMapper.registerMap(this.pluginKey,new d.IndexesSequence),this.indexesSequenceCache.setValues(this.hot.rowIndexMapper.getIndexesSequence())),s&&(this.columnStatesManager.setSortStates(o),this.sortByPresetSortStates(o),this.saveAllSortSettings(o)),this.hot.runHooks("afterColumnSort",t,s?o:t,s),s&&(this.hot.render(),this.hot.forceFullRender=!1,this.hot.view.render()))}clearSort(){this.sort([])}isSorted(){return this.enabled&&!this.columnStatesManager.isListOfSortedColumnsEmpty()}getSortConfig(e){return(0,n.isDefined)(e)?this.columnStatesManager.getColumnSortState(e):this.columnStatesManager.getSortStates()}setSortConfig(e){const t=this.getNormalizedSortConfigs(e);this.areValidSortConfigs(t)&&this.columnStatesManager.setSortStates(t)}getNormalizedSortConfigs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e.slice(0,1):[e]}areValidSortConfigs(e){const t=this.hot.countCols();return(0,f.areValidSortStates)(e)&&e.every((e=>{let{column:o}=e;return o<=t&&o>=0}))}saveAllSortSettings(e){const t=this.columnStatesManager.getAllColumnsProperties();t.initialConfig=(0,h.arrayMap)(e,(e=>{let{column:t,...o}=e;return{column:this.hot.toPhysicalColumn(t),...o}})),this.hot.runHooks("persistentStateSave","columnSorting",t)}getAllSavedSortSettings(){const e={};this.hot.runHooks("persistentStateLoad","columnSorting",e);const t=e.value,o=e=>{let{column:t,...o}=e;return{column:this.hot.toVisualColumn(t),...o}};return(0,n.isDefined)(t)&&Array.isArray(t.initialConfig)&&(t.initialConfig=(0,h.arrayMap)(t.initialConfig,o)),t}getColumnNextConfig(e){const t=this.columnStatesManager.getSortOrderOfColumn(e);if((0,n.isDefined)(t)){const o=(0,f.getNextSortOrder)(t);return(0,n.isDefined)(o)?{column:e,sortOrder:o}:void 0}const o=this.hot.countCols();if(Number.isInteger(e)&&e>=0&&e<o)return{column:e,sortOrder:(0,f.getNextSortOrder)()}}getNextSortConfig(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R;const o=this.columnStatesManager.getIndexOfColumnInSortQueue(e),s=-1!==o,i=this.getSortConfig(),r=this.getColumnNextConfig(e);if(s){if((0,n.isUndefined)(r))return[...i.slice(0,o),...i.slice(o+1)];if(t===R)return[...i.slice(0,o),...i.slice(o+1),r];if(t===b)return[...i.slice(0,o),r,...i.slice(o+1)]}return(0,n.isDefined)(r)?i.concat(r):i}getPluginColumnConfig(e){if((0,a.isObject)(e)){const t=e[this.pluginKey];if((0,a.isObject)(t))return t}return{}}getMergedPluginSettings(e){const t=this.hot.getSettings()[this.pluginKey],o=this.columnStatesManager.getAllColumnsProperties(),s=this.hot.getCellMeta(0,e),i=Object.getPrototypeOf(s);return Array.isArray(i.columns)?Object.assign(o,t,this.getPluginColumnConfig(i.columns[e])):(0,l.isFunction)(i.columns)?Object.assign(o,t,this.getPluginColumnConfig(i.columns(e))):Object.assign(o,t)}getFirstCellSettings(e){const t=this.hot.getCellMeta(0,e),o=Object.create(t);return o[this.pluginKey]=this.columnMetaCache.getValueAtIndex(this.hot.toPhysicalColumn(e)),o}getNumberOfRowsToSort(e){const t=this.hot.getSettings();return t.maxRows<=e?t.maxRows:e-t.minSpareRows}sortByPresetSortStates(e){if(0===e.length)return void this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues());const t=[],o=this.hot.countRows(),s=t=>(0,h.arrayMap)(e,(e=>this.hot.getDataAtCell(t,e.column)));for(let e=0;e<this.getNumberOfRowsToSort(o);e+=1)t.push([this.hot.toPhysicalRow(e)].concat(s(e)));const i=(0,h.arrayMap)(t,(e=>e[0]));(0,w.sort)(t,this.pluginKey,(0,h.arrayMap)(e,(e=>e.sortOrder)),(0,h.arrayMap)(e,(e=>this.getFirstCellSettings(e.column))));for(let e=t.length;e<o;e+=1)t.push([e].concat(s(e)));const r=(0,h.arrayMap)(t,(e=>e[0])),n=new Map((0,h.arrayMap)(i,((e,t)=>[e,r[t]]))),a=(0,h.arrayMap)(this.hot.rowIndexMapper.getIndexesSequence(),(e=>n.has(e)?n.get(e):e));this.hot.rowIndexMapper.setIndexesSequence(a)}sortBySettings(e){if((0,a.isObject)(e)){this.columnStatesManager.updateAllColumnsProperties(e);const t=e.initialConfig;(Array.isArray(t)||(0,a.isObject)(t))&&this.sort(t)}else this.hot.render()}updateHeaderClasses(e){if((0,r.removeClass)(e,(0,p.getClassesToRemove)(e)),!1!==this.enabled){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];(0,r.addClass)(e,(0,p.getClassesToAdd)(...o))}}onUpdateSettings(e){super.onUpdateSettings(),null!==this.columnMetaCache&&this.columnMetaCache.init(this.hot.columnIndexMapper.getNumberOfIndexes()),(0,n.isDefined)(e[this.pluginKey])&&this.sortBySettings(e[this.pluginKey])}wasClickableHeaderClicked(e,t){return this.getFirstCellSettings(t)[this.pluginKey].headerAction&&(0,r.hasClass)(e.target,f.HEADER_SPAN_CLASS)}onAfterOnCellMouseDown(e,t){!1!==(0,f.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&(this.hot.getShortcutManager().isCtrlPressed()&&(this.hot.deselectCell(),this.hot.selectColumns(t.col)),this.sort(this.getColumnNextConfig(t.col)))}destroy(){var e;null===(e=this.columnStatesManager)||void 0===e||e.destroy(),super.destroy()}}function A(){const e=this.getAllSavedSortSettings();if((0,a.isObject)(e))this.sortBySettings(e);else{const e=this.hot.getSettings()[this.pluginKey];this.sortBySettings(e)}}function P(e,t){const o=(0,f.getHeaderSpanElement)(t);if(!1===(0,f.isFirstLevelColumnHeader)(e,t)||null===o)return;const s=this.getFirstCellSettings(e)[this.pluginKey],i=s.indicator,n=s.headerAction;if(this.updateHeaderClasses(o,this.columnStatesManager,e,i,n),this.hot.getSettings().ariaTags){const o=this.columnStatesManager.getSortOrderOfColumn(e);(0,r.setAttribute)(t,...(0,C.A11Y_SORT)(o?`${o}ending`:"none"))}}function x(e){!0===e&&this.hot.view&&y(this,T,A).call(this)}function H(e,t,o,s){!1!==(0,f.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&this.hot.getShortcutManager().isCtrlPressed()&&(s.column=!0)}t.ColumnSorting=N},88082:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(22232),n=o(33165),a=o(93315);const l=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"];t.ColumnStatesManager=class{constructor(e,t){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"sortingStates",new n.LinkedPhysicalIndexToValueMap),(0,i.default)(this,"sortEmptyCells",false),(0,i.default)(this,"indicator",true),(0,i.default)(this,"headerAction",true),(0,i.default)(this,"compareFunctionFactory",void 0),(0,i.default)(this,"mapName",void 0),this.hot=e,this.mapName=t,this.hot.columnIndexMapper.registerMap(t,this.sortingStates)}updateAllColumnsProperties(e){(0,r.isObject)(e)&&(0,r.objectEach)(e,((e,t)=>{l.includes(t)&&(this[t]=e)}))}getAllColumnsProperties(){const e={sortEmptyCells:this.sortEmptyCells,indicator:this.indicator,headerAction:this.headerAction};return"function"==typeof this.compareFunctionFactory&&(e.compareFunctionFactory=this.compareFunctionFactory),e}getSortOrderOfColumn(e){var t;return null===(t=this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))||void 0===t?void 0:t.sortOrder}getIndexOfColumnInSortQueue(e){return e=this.hot.toPhysicalColumn(e),this.sortingStates.getEntries().findIndex((t=>{let[o]=t;return o===e}))}getNumberOfSortedColumns(){return this.sortingStates.getLength()}isListOfSortedColumnsEmpty(){return 0===this.getNumberOfSortedColumns()}isColumnSorted(e){return(0,r.isObject)(this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))}getSortStates(){if(null===this.sortingStates)return[];return this.sortingStates.getEntries().map((e=>{let[t,o]=e;return{column:this.hot.toVisualColumn(t),...o}}))}getColumnSortState(e){const t=this.getSortOrderOfColumn(e);if((0,a.isDefined)(t))return{column:e,sortOrder:t}}setSortStates(e){this.sortingStates.clear();for(let t=0;t<e.length;t+=1)this.sortingStates.setValueAtIndex(this.hot.toPhysicalColumn(e[t].column),{sortOrder:e[t].sortOrder})}destroy(){this.hot.columnIndexMapper.unregisterMap(this.mapName),this.sortingStates=null}}},59809:(e,t,o)=>{"use strict";t.__esModule=!0,t.getClassesToAdd=function(e,t,o,i){const h=[n];i&&h.push(a);if(!1===o)return h.push(r),h;const u=e.getSortOrderOfColumn(t);(0,s.isDefined)(u)&&h.push(l.get(u));return h},t.getClassesToRemove=function(){return Array.from(l.values()).concat(a,r,n)},o(63517);var s=o(93315),i=o(64951);const r="indicatorDisabled",n="columnSorting",a="sortAction",l=new Map([[i.ASC_SORT_STATE,"ascending"],[i.DESC_SORT_STATE,"descending"]])},1902:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(80081);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ColumnSorting=s.ColumnSorting,t.APPEND_COLUMN_CONFIG_STRATEGY=s.APPEND_COLUMN_CONFIG_STRATEGY,t.REPLACE_COLUMN_CONFIG_STRATEGY=s.REPLACE_COLUMN_CONFIG_STRATEGY},24892:(e,t,o)=>{"use strict";t.__esModule=!0,t.rootComparator=function(e,t){return function(o,i){const[,...r]=o,[,...n]=i;return function(o){const i=e[o],a=t[o],l=r[o],h=n[o],u=a.columnSorting;return(u.compareFunctionFactory?u.compareFunctionFactory:(0,s.getCompareFunctionFactory)(a.type))(i,a,u)(l,h)}(0)}};var s=o(51510)},72844:(e,t,o)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,o){const n=t.checkedTemplate,a=t.uncheckedTemplate,{sortEmptyCells:l}=o;return function(h,u){const d=(0,r.isEmpty)(h),c=(0,r.isEmpty)(u),g=d?a:h,f=c?a:u,p=g===a||g===n,m=f===a||f===n;if(!1===l){if(d&&!1===c)return s.FIRST_AFTER_SECOND;if(!1===d&&c)return s.FIRST_BEFORE_SECOND}return!1===p&&m?"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND:p&&!1===m?"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND:!1===p&&!1===m?(0,i.compareFunctionFactory)(e,t,o)(h,u):g===a&&f===n?"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND:g===n&&f===a?"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND:s.DO_NOT_SWAP}};var s=o(51510),i=o(93388),r=o(93315);t.COLUMN_DATA_TYPE="checkbox"},75889:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.compareFunctionFactory=function(e,t,o){return function(s,a){const{sortEmptyCells:l}=o;if(s===a)return n.DO_NOT_SWAP;if((0,r.isEmpty)(s))return(0,r.isEmpty)(a)?n.DO_NOT_SWAP:l&&"asc"===e?n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND;if((0,r.isEmpty)(a))return l&&"asc"===e?n.FIRST_AFTER_SECOND:n.FIRST_BEFORE_SECOND;const h=t.dateFormat,u=(0,i.default)(s,h),d=(0,i.default)(a,h);return u.isValid()?d.isValid()?d.isAfter(u)?"asc"===e?n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND:d.isBefore(u)?"asc"===e?n.FIRST_AFTER_SECOND:n.FIRST_BEFORE_SECOND:n.DO_NOT_SWAP:n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND}};var i=s(o(33034)),r=o(93315),n=o(51510);t.COLUMN_DATA_TYPE="date"},93388:(e,t,o)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,o){const r=t.locale;return function(t,n){const{sortEmptyCells:a}=o;return"string"==typeof t&&(t=t.toLocaleLowerCase(r)),"string"==typeof n&&(n=n.toLocaleLowerCase(r)),t===n?i.DO_NOT_SWAP:(0,s.isEmpty)(t)?(0,s.isEmpty)(n)?i.DO_NOT_SWAP:a&&"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND:(0,s.isEmpty)(n)?a&&"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND:isNaN(t)&&!isNaN(n)?"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND:!isNaN(t)&&isNaN(n)?"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND:(isNaN(t)||isNaN(n)||(t=parseFloat(t),n=parseFloat(n)),t<n?"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND:t>n?"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND:i.DO_NOT_SWAP)}};var s=o(93315),i=o(51510);t.COLUMN_DATA_TYPE="default"},7974:(e,t,o)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,o){return function(t,r){const n=parseFloat(t),a=parseFloat(r),{sortEmptyCells:l}=o;if(n===a||isNaN(n)&&isNaN(a))return i.DO_NOT_SWAP;if(l){if((0,s.isEmpty)(t))return"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND;if((0,s.isEmpty)(r))return"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND}return isNaN(n)?i.FIRST_AFTER_SECOND:isNaN(a)?i.FIRST_BEFORE_SECOND:n<a?"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND:n>a?"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND:i.DO_NOT_SWAP}};var s=o(93315),i=o(51510);t.COLUMN_DATA_TYPE="numeric"},5685:(e,t,o)=>{"use strict";t.__esModule=!0,t.sort=function(e,t){const o=(0,s.getRootComparator)(t);for(var i=arguments.length,r=new Array(i>2?i-2:0),n=2;n<i;n++)r[n-2]=arguments[n];e.sort(o(...r))};var s=o(78004);t.DO_NOT_SWAP=0,t.FIRST_BEFORE_SECOND=-1,t.FIRST_AFTER_SECOND=1},51510:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(78004);t.registerRootComparator=s.registerRootComparator,t.getRootComparator=s.getRootComparator,t.getCompareFunctionFactory=s.getCompareFunctionFactory;var i=o(5685);t.FIRST_AFTER_SECOND=i.FIRST_AFTER_SECOND,t.FIRST_BEFORE_SECOND=i.FIRST_BEFORE_SECOND,t.DO_NOT_SWAP=i.DO_NOT_SWAP,t.sort=i.sort},78004:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getCompareFunctionFactory=function(e){if(d(e))return u(e);return u(i.COLUMN_DATA_TYPE)};var i=o(93388),r=o(7974),n=o(72844),a=o(75889),l=s(o(63800));const{register:h,getItem:u,hasItem:d}=(0,l.default)("sorting.compareFunctionFactory"),{register:c,getItem:g}=(0,l.default)("sorting.mainSortComparator");t.getRootComparator=g,t.registerRootComparator=c,h(r.COLUMN_DATA_TYPE,r.compareFunctionFactory),h(n.COLUMN_DATA_TYPE,n.compareFunctionFactory),h(a.COLUMN_DATA_TYPE,a.compareFunctionFactory),h(i.COLUMN_DATA_TYPE,i.compareFunctionFactory)},64951:(e,t,o)=>{"use strict";t.__esModule=!0,t.areValidSortStates=function(e){if(e.some((e=>!1===function(e){if(!1===(0,s.isObject)(e))return!1;const{column:t,sortOrder:o}=e;return Number.isInteger(t)&&[r,n].includes(o)}(e))))return!1;const t=e.map((e=>{let{column:t}=e;return t}));return new Set(t).size===t.length},t.getHeaderSpanElement=function(e){return e.querySelector(`.${a}`)},t.getNextSortOrder=function(e){if(e===n)return;if(e===r)return n;return r},t.isFirstLevelColumnHeader=function(e,t){if(e<0||!t.parentNode)return!1;const o=t.parentNode.parentNode.childNodes;if(Array.from(o).indexOf(t.parentNode)-o.length!=-1)return!1;return!0},t.wasHeaderClickedProperly=function(e,t,o){return-1===e&&t>=0&&!1===(0,i.isRightClick)(o)};var s=o(22232),i=o(24449);const r=t.ASC_SORT_STATE="asc",n=t.DESC_SORT_STATE="desc",a=t.HEADER_SPAN_CLASS="colHeader"},24378:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(36026),n=o(22232),a=s(o(5572)),l=o(28236),h=o(88475);function u(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function d(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const c=t.PLUGIN_KEY="columnSummary",g=t.PLUGIN_PRIORITY=220;var f=new WeakSet,p=new WeakSet,m=new WeakSet;class w extends r.BasePlugin{constructor(){super(...arguments),u(this,m),u(this,p),u(this,f),(0,i.default)(this,"endpoints",null)}static get PLUGIN_KEY(){return c}static get PLUGIN_PRIORITY(){return g}isEnabled(){return!!this.hot.getSettings()[c]}enablePlugin(){var e=this;this.enabled||(this.settings=this.hot.getSettings()[c],this.endpoints=new a.default(this,this.settings),this.addHook("afterInit",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return d(e,f,C).call(e,...o)})),this.addHook("afterChange",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return d(e,p,v).call(e,...o)})),this.addHook("beforeCreateRow",((e,t,o)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_row",e,t,null,o))),this.addHook("beforeCreateCol",((e,t,o)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_col",e,t,null,o))),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.endpoints.resetSetupBeforeStructureAlteration("remove_row",...o)})),this.addHook("beforeRemoveCol",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.endpoints.resetSetupBeforeStructureAlteration("remove_col",...o)})),this.addHook("afterCreateRow",((e,t,o)=>this.endpoints.resetSetupAfterStructureAlteration("insert_row",e,t,null,o))),this.addHook("afterCreateCol",((e,t,o)=>this.endpoints.resetSetupAfterStructureAlteration("insert_col",e,t,null,o))),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.endpoints.resetSetupAfterStructureAlteration("remove_row",...o)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.endpoints.resetSetupAfterStructureAlteration("remove_col",...o)})),this.addHook("afterRowMove",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return d(e,m,y).call(e,...o)})),super.enablePlugin())}disablePlugin(){this.endpoints=null,this.settings=null,this.currentEndpoint=null}calculate(e){switch(e.type.toLowerCase()){case"sum":e.result=this.calculateSum(e);break;case"min":case"max":e.result=this.calculateMinMax(e,e.type);break;case"count":e.result=this.countEntries(e);break;case"average":e.result=this.calculateAverage(e);break;case"custom":e.result=e.customFunction.call(this,e)}}calculateSum(e){let t=0;return(0,n.objectEach)(e.ranges,(o=>{t+=this.getPartialSum(o,e.sourceColumn)})),t}getPartialSum(e,t){let o=0,s=e[1]||e[0],i=null,r=0;do{if(i=this.getCellValue(s,t),i=(0,h.isNullishOrNaN)(i)?null:i,null!==i){const e=(`${i}`.split(".")[1]||[]).length||1;e>r&&(r=e)}o+=i||0,s-=1}while(s>=e[0]);return Math.round(o*10**r)/10**r}calculateMinMax(e,t){let o=null;return(0,n.objectEach)(e.ranges,(s=>{const i=this.getPartialMinMax(s,e.sourceColumn,t);if(null===o&&null!==i&&(o=i),null!==i)switch(t){case"min":o=Math.min(o,i);break;case"max":o=Math.max(o,i)}})),null===o?"Not enough data":o}getPartialMinMax(e,t,o){let s,i=null,r=e[1]||e[0];do{if(s=this.getCellValue(r,t),s=(0,h.isNullishOrNaN)(s)?null:s,null===i)i=s;else if(null!==s)switch(o){case"min":i=Math.min(i,s);break;case"max":i=Math.max(i,s)}r-=1}while(r>=e[0]);return i}countEmpty(e,t){let o,s=0,i=e[1]||e[0];do{o=this.getCellValue(i,t),o=(0,h.isNullishOrNaN)(o)?null:o,null===o&&(s+=1),i-=1}while(i>=e[0]);return s}countEntries(e){let t=0;const o=e.ranges;return(0,n.objectEach)(o,(o=>{const s=void 0===o[1]?1:o[1]-o[0]+1,i=this.countEmpty(o,e.sourceColumn);t+=s,t-=i})),t}calculateAverage(e){return this.calculateSum(e)/this.countEntries(e)}getCellValue(e,t){const o=this.hot.toVisualRow(e),s=this.hot.toVisualColumn(t);let i=this.hot.getSourceDataAtCell(e,t),r="";if(null!==o&&null!==s&&(r=this.hot.getCellMeta(o,s).className||""),r.indexOf("columnSummaryResult")>-1)return null;if(this.endpoints.currentEndpoint.forceNumeric&&("string"==typeof i&&(i=i.replace(/,/,".")),i=parseFloat(i)),isNaN(i)&&!this.endpoints.currentEndpoint.suppressDataTypeErrors)throw new Error(l.toSingleLine`ColumnSummary plugin: cell at (${e}, ${t}) is not in a\x20
64
- numeric format. Cannot do the calculation.`);return i}}function C(){this.endpoints.endpoints=this.endpoints.parseSettings(),this.endpoints.refreshAllEndpoints(!0)}function v(e,t){e&&"ColumnSummary.reset"!==t&&"ColumnSummary.set"!==t&&"loadData"!==t&&this.endpoints.refreshChangedEndpoints(e)}function y(e,t){this.endpoints.resetSetupBeforeStructureAlteration("move_row",e[0],e.length,e,this.pluginName),this.endpoints.resetSetupAfterStructureAlteration("move_row",t,e.length,e,this.pluginName)}t.ColumnSummary=w},5572:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=o(50095),n=o(69173);t.default=class{constructor(e,t){(0,i.default)(this,"plugin",void 0),(0,i.default)(this,"hot",void 0),(0,i.default)(this,"endpoints",[]),(0,i.default)(this,"settings",void 0),(0,i.default)(this,"settingsType","array"),(0,i.default)(this,"currentEndpoint",null),(0,i.default)(this,"cellsToSetCache",[]),this.plugin=e,this.hot=this.plugin.hot,this.settings=t}getEndpoint(e){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings)[e]:this.endpoints[e]}getAllEndpoints(){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings):this.endpoints}fillMissingEndpointData(e){return this.parseSettings(e.call(this))}parseSettings(e){const t=[];let o=e;if(o||"function"!=typeof this.settings)return o||(o=this.settings),(0,r.arrayEach)(o,(e=>{const o={};this.assignSetting(e,o,"ranges",[[0,this.hot.countRows()-1]]),this.assignSetting(e,o,"reversedRowCoords",!1),this.assignSetting(e,o,"destinationRow",new Error("\n You must provide a destination row for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,o,"destinationColumn",new Error("\n You must provide a destination column for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,o,"sourceColumn",e.destinationColumn),this.assignSetting(e,o,"type","sum"),this.assignSetting(e,o,"forceNumeric",!1),this.assignSetting(e,o,"suppressDataTypeErrors",!0),this.assignSetting(e,o,"suppressDataTypeErrors",!0),this.assignSetting(e,o,"customFunction",null),this.assignSetting(e,o,"readOnly",!0),this.assignSetting(e,o,"roundFloat",!1),t.push(o)})),t;this.settingsType="function"}assignSetting(e,t,o,s){if("ranges"!==o||void 0!==e[o]){if("ranges"!==o||0!==e[o].length)if(void 0===e[o]){if(s instanceof Error)throw s;t[o]=s}else"destinationRow"===o&&t.reversedRowCoords?t[o]=this.hot.countRows()-e[o]-1:t[o]=e[o]}else t[o]=s}resetSetupBeforeStructureAlteration(e,t,o){if("function"!==this.settingsType)return;const s=e.indexOf("row")>-1?"row":"col",i=this.getAllEndpoints();(0,r.arrayEach)(i,(i=>{"row"===s&&i.destinationRow>=t&&("insert_row"===e?i.alterRowOffset=o:"remove_row"===e&&(i.alterRowOffset=-1*o)),"col"===s&&i.destinationColumn>=t&&("insert_col"===e?i.alterColumnOffset=o:"remove_col"===e&&(i.alterColumnOffset=-1*o))})),this.resetAllEndpoints(i,!1)}resetSetupAfterStructureAlteration(e,t,o,s,i){let n=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if("function"===this.settingsType){const e=()=>(this.hot.removeHook("beforeViewRender",e),this.refreshAllEndpoints());return void this.hot.addHookOnce("beforeViewRender",e)}const a=e.indexOf("row")>-1?"row":"col",l=e.indexOf("remove")>-1?-1:1,h=this.getAllEndpoints(),u=0===e.indexOf("move_row"),d=t;(0,r.arrayEach)(h,(e=>{"row"===a&&e.destinationRow>=d&&(e.alterRowOffset=l*o),"col"===a&&e.destinationColumn>=d&&(e.alterColumnOffset=l*o)})),this.resetAllEndpoints(h,!u),u?(0,r.arrayEach)(h,(e=>{this.extendEndpointRanges(e,d,s[0],s.length),this.recreatePhysicalRanges(e),this.clearOffsetInformation(e)})):(0,r.arrayEach)(h,(e=>{this.shiftEndpointCoordinates(e,d)})),n&&this.refreshAllEndpoints()}clearOffsetInformation(e){e.alterRowOffset=void 0,e.alterColumnOffset=void 0}extendEndpointRanges(e,t,o,s){(0,r.arrayEach)(e.ranges,(e=>{e[1]&&(t>=e[0]&&t<=e[1]?o>e[1]?e[1]+=s:o<e[0]&&(e[0]-=s):o>=e[0]&&o<=e[1]&&(e[1]-=s,t<=e[0]&&(e[0]+=1,e[1]+=1)))}))}recreatePhysicalRanges(e){const t=e.ranges,o=[],s=[];(0,r.arrayEach)(t,(e=>{const t=[];if(e[1])for(let o=e[0];o<=e[1];o++)t.push(this.hot.toPhysicalRow(o));else t.push(this.hot.toPhysicalRow(e[0]));s.push(t)})),(0,r.arrayEach)(s,(e=>{let t=[];(0,r.arrayEach)(e,((s,i)=>{0===i?t.push(s):e[i]!==e[i-1]+1&&(t.push(e[i-1]),o.push(t),t=[],t.push(s)),i===e.length-1&&(t.push(s),o.push(t))}))})),e.ranges=o}shiftEndpointCoordinates(e,t){e.alterRowOffset&&0!==e.alterRowOffset?(e.destinationRow+=e.alterRowOffset||0,(0,r.arrayEach)(e.ranges,(o=>{(0,r.arrayEach)(o,((s,i)=>{s>=t&&(o[i]+=e.alterRowOffset||0)}))}))):e.alterColumnOffset&&0!==e.alterColumnOffset&&(e.destinationColumn+=e.alterColumnOffset||0,e.sourceColumn+=e.alterColumnOffset||0)}resetAllEndpoints(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAllEndpoints(),t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.some((e=>{const t=e.alterRowOffset||0,o=e.alterColumnOffset||0;return e.destinationRow+t>=this.hot.countRows()||e.destinationColumn+o>=this.hot.countCols()}))||(this.cellsToSetCache=[],(0,r.arrayEach)(e,(e=>{this.resetEndpointValue(e,t)})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[])}refreshAllEndpoints(){this.cellsToSetCache=[],(0,r.arrayEach)(this.getAllEndpoints(),(e=>{this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e,"init")})),this.currentEndpoint=null,this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshChangedEndpoints(e){const t=[];this.cellsToSetCache=[],(0,r.arrayEach)(e,((e,o,s)=>{`${e[2]||""}`!=`${e[3]}`&&(0,r.arrayEach)(this.getAllEndpoints(),((e,i)=>{this.hot.propToCol(s[o][1])===e.sourceColumn&&-1===t.indexOf(i)&&t.push(i)}))})),(0,r.arrayEach)(t,(e=>{this.refreshEndpoint(this.getEndpoint(e))})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshEndpoint(e){this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e),this.currentEndpoint=null}resetEndpointValue(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=e.alterRowOffset||0,s=e.alterColumnOffset||0;this.cellsToSetCache.push([this.hot.toVisualRow(e.destinationRow+(t?o:0)),this.hot.toVisualColumn(e.destinationColumn+(t?s:0)),""])}setEndpointValue(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=this.hot.toVisualRow(e.destinationRow);if(e.destinationRow>=this.hot.countRows()||e.destinationColumn>=this.hot.countCols())return void this.throwOutOfBoundsWarning();const i=this.hot.toVisualRow(e.destinationRow);if(null!==i){const o=this.hot.getCellMeta(i,e.destinationColumn);"init"!==t&&o.readOnly===e.readOnly||(o.readOnly=e.readOnly,o.className="columnSummaryResult")}e.roundFloat&&!isNaN(e.result)&&(e.result=e.result.toFixed(e.roundFloat)),o?this.hot.setDataAtCell(s,e.destinationColumn,e.result,"ColumnSummary.set"):this.cellsToSetCache.push([s,e.destinationColumn,e.result]),e.alterRowOffset=void 0,e.alterColumnOffset=void 0}throwOutOfBoundsWarning(){(0,n.warn)("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}}},68918:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(24378);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ColumnSummary=s.ColumnSummary},88475:(e,t)=>{"use strict";t.__esModule=!0,t.isNullishOrNaN=function(e){return null==e||isNaN(e)}},59070:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(83302);class n{static get CLASS_EDITOR_CONTAINER(){return"htCommentsContainer"}static get CLASS_EDITOR(){return"htComments"}static get CLASS_INPUT(){return"htCommentTextArea"}static get CLASS_CELL(){return"htCommentCell"}constructor(e,t){(0,i.default)(this,"rootDocument",void 0),(0,i.default)(this,"isRtl",!1),(0,i.default)(this,"container",null),(0,i.default)(this,"editor",void 0),(0,i.default)(this,"editorStyle",void 0),(0,i.default)(this,"hidden",!0),this.rootDocument=e,this.isRtl=t,this.editor=this.createEditor(),this.editorStyle=this.editor.style,this.hide()}setPosition(e,t){this.editorStyle.left=`${e}px`,this.editorStyle.top=`${t}px`}setSize(e,t){if(e&&t){const o=this.getInputElement();o.style.width=`${e}px`,o.style.height=`${t}px`}}getSize(){return{width:(0,r.outerWidth)(this.getInputElement()),height:(0,r.outerHeight)(this.getInputElement())}}resetSize(){const e=this.getInputElement();e.style.width="",e.style.height=""}setReadOnlyState(e){this.getInputElement().readOnly=e}show(){this.editorStyle.display="block",this.hidden=!1}hide(){this.hidden||(this.editorStyle.display="none"),this.hidden=!0}isVisible(){return"block"===this.editorStyle.display}setValue(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")||"";this.getInputElement().value=e}getValue(){return this.getInputElement().value}isFocused(){return this.rootDocument.activeElement===this.getInputElement()}focus(){this.getInputElement().focus()}createEditor(){const e=this.rootDocument.createElement("div"),t=this.rootDocument.createElement("textarea");return e.style.display="none",this.container=this.rootDocument.createElement("div"),this.container.setAttribute("dir",this.isRtl?"rtl":"ltr"),(0,r.addClass)(this.container,n.CLASS_EDITOR_CONTAINER),this.rootDocument.body.appendChild(this.container),(0,r.addClass)(e,n.CLASS_EDITOR),(0,r.addClass)(t,n.CLASS_INPUT),t.setAttribute("data-hot-input",!0),e.appendChild(t),this.container.appendChild(e),e}getInputElement(){return this.editor.querySelector(`.${n.CLASS_INPUT}`)}destroy(){const e=this.container?this.container.parentNode:null;this.editor.parentNode.removeChild(this.editor),this.editor=null,this.editorStyle=null,e&&e.removeChild(this.container)}}t.default=n},34745:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=s(o(48427)),n=s(o(42538)),a=o(83302),l=o(24449),h=o(22232),u=o(36026),d=s(o(59070)),c=s(o(71586)),g=o(90500),f=s(o(21190)),p=s(o(74567)),m=s(o(57817));function w(e,t){v(e,t),t.add(e)}function C(e,t,o){v(e,t),t.set(e,o)}function v(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function y(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(68581);const E=t.PLUGIN_KEY="comments",S=t.PLUGIN_PRIORITY=60,R=t.META_COMMENT="comment",b=t.META_COMMENT_VALUE="value",_=t.META_STYLE="style",T=t.META_READONLY="readOnly",O=E,M=`plugin:${E}`;var I=new WeakMap,N=new WeakMap,A=new WeakMap,P=new WeakMap,x=new WeakMap,H=new WeakMap,k=new WeakMap,D=new WeakSet,L=new WeakSet,W=new WeakSet,F=new WeakSet,V=new WeakSet,B=new WeakSet,U=new WeakSet,Y=new WeakSet,j=new WeakSet,G=new WeakSet;class z extends u.BasePlugin{constructor(){super(...arguments),w(this,G),w(this,j),w(this,Y),w(this,U),w(this,B),w(this,V),w(this,F),w(this,W),w(this,L),w(this,D),(0,i.default)(this,"range",{}),C(this,I,{writable:!0,value:null}),C(this,N,{writable:!0,value:null}),C(this,A,{writable:!0,value:!1}),C(this,P,{writable:!0,value:!1}),C(this,x,{writable:!0,value:{}}),C(this,H,{writable:!0,value:null}),C(this,k,{writable:!0,value:""})}static get PLUGIN_KEY(){return E}static get PLUGIN_PRIORITY(){return S}isEnabled(){return!!this.hot.getSettings()[E]}enablePlugin(){this.enabled||((0,n.default)(this,I)||(0,r.default)(this,I,new d.default(this.hot.rootDocument,this.hot.isRtl())),(0,n.default)(this,N)||(0,r.default)(this,N,new c.default(this.getDisplayDelaySetting())),this.addHook("afterContextMenuDefaultOptions",(e=>this.addToContextMenu(e))),this.addHook("afterRenderer",((e,t,o,s,i,r)=>y(this,F,q).call(this,e,r))),this.addHook("afterScroll",(()=>y(this,G,oe).call(this))),this.addHook("afterBeginEditing",(()=>this.hide())),this.addHook("afterDocumentKeyDown",(e=>y(this,j,te).call(this,e))),(0,n.default)(this,N).addLocalHook("hide",(()=>this.hide())),(0,n.default)(this,N).addLocalHook("show",((e,t)=>this.showAtCell(e,t))),this.registerShortcuts(),this.registerListeners(),super.enablePlugin())}updatePlugin(){(0,n.default)(this,N).updateDelay(this.getDisplayDelaySetting()),super.updatePlugin()}disablePlugin(){this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid"),o=e.addContext(M);t.addShortcut({keys:[["Control","Alt","M"]],callback:()=>{const t=this.hot.getSelectedRangeLast();(0,r.default)(this,P,!0),this.hot.scrollToFocusedCell((()=>{this.setRange(t),this.show(),this.focusEditor(),e.setActiveContextName(M),this.hot._registerTimeout((()=>{(0,r.default)(this,P,!1)}))}))},stopPropagation:!0,runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&!(0,n.default)(this,I).isVisible()},group:O}),o.addShortcut({keys:[["Escape"]],callback:()=>{(0,n.default)(this,I).setValue((0,n.default)(this,k)),this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&(0,n.default)(this,I).isVisible()},group:O}),o.addShortcut({keys:[["Control/Meta","Enter"]],callback:()=>{this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&(0,n.default)(this,I).isVisible()},group:O})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(O)}registerListeners(){const{rootDocument:e}=this.hot,t=this.getEditorInputElement();this.eventManager.addEventListener(e,"mouseover",(e=>y(this,L,$).call(this,e))),this.eventManager.addEventListener(e,"mousedown",(e=>y(this,D,K).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>y(this,W,X).call(this))),this.eventManager.addEventListener(t,"focus",(()=>y(this,B,J).call(this))),this.eventManager.addEventListener(t,"blur",(()=>y(this,V,Q).call(this))),this.eventManager.addEventListener(t,"mousedown",(e=>y(this,U,Z).call(this,e))),this.eventManager.addEventListener(t,"mouseup",(e=>y(this,Y,ee).call(this,e)))}setRange(e){this.range=e}clearRange(){this.range={}}targetIsCellWithComment(e){const t=(0,a.closest)(e.target,"TD","TBODY");return!!(t&&(0,a.hasClass)(t,"htCommentCell")&&(0,a.closest)(t,[this.hot.rootElement]))}targetIsCommentTextArea(e){return this.getEditorInputElement()===e.target}setComment(e){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const t=(0,n.default)(this,I).getValue();let o="";null!=e?o=e:null!=t&&(o=t);const s=this.range.from.row,i=this.range.from.col;this.updateCommentMeta(s,i,{[b]:o}),this.hot.render()}setCommentAtCell(e,t,o){this.setRange({from:this.hot._createCellCoords(e,t)}),this.setComment(o)}removeComment(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');this.hot.setCellMeta(this.range.from.row,this.range.from.col,R),e&&this.hot.render(),this.hide()}removeCommentAtCell(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.setRange({from:this.hot._createCellCoords(e,t)}),this.removeComment(o)}getComment(){const e=this.range.from.row,t=this.range.from.col;return this.getCommentMeta(e,t,b)}getCommentAtCell(e,t){return this.getCommentMeta(e,t,b)}show(){var e;if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{from:{row:t,col:o}}=this.range;if(t<0||t>this.hot.countSourceRows()-1||o<0||o>this.hot.countSourceCols()-1)return!1;const s=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return(0,n.default)(this,N).cancelHiding(),(0,n.default)(this,I).setValue(null!==(e=s[R]?s[R][b]:null)&&void 0!==e?e:""),(0,n.default)(this,I).show(),this.refreshEditor(!0),!0}showAtCell(e,t){return this.setRange({from:this.hot._createCellCoords(e,t)}),this.show()}hide(){(0,n.default)(this,I).hide()}refreshEditor(){var e,t;if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.range.from&&(0,n.default)(this,I).isVisible()))return;const{rowIndexMapper:o,columnIndexMapper:s}=this.hot,{row:i,col:r}=this.range.from;let l=o.getRenderableFromVisualIndex(i),h=s.getRenderableFromVisualIndex(r);const u=null===l;(0,n.default)(this,I).setPosition(0,0),null===l&&(l=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(i,-1))),null===h&&(h=s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(r,-1)));const d=null===l,c=null===h;l=null!==(e=l)&&void 0!==e?e:0,h=null!==(t=h)&&void 0!==t?t:0;const{rootWindow:g,view:{_wt:f}}=this.hot,{wtTable:p}=f,m=f.getCell({row:l,col:h},!0),w=this.getCommentMeta(i,r,_);w?(0,n.default)(this,I).setSize(w.width,w.height):(0,n.default)(this,I).resetSize();const C=c?0:p.getStretchedColumnWidth(h),v=u&&!d?(0,a.outerHeight)(m):0,{left:y,top:E,width:S,height:R}=m.getBoundingClientRect(),{width:b,height:O}=(0,n.default)(this,I).getSize(),{innerWidth:M,innerHeight:N}=this.hot.rootWindow,A=this.hot.rootDocument.documentElement;let P=y+g.scrollX+C,x=E+g.scrollY+v;this.hot.isRtl()&&(P-=b+C),this.hot.isLtr()&&y+S+b>M?P=y+g.scrollX-b-1:this.hot.isRtl()&&P<-(A.scrollWidth-A.clientWidth)&&(P=y+g.scrollX+C+1),E+O>N&&(x-=O-R+1),(0,n.default)(this,I).setPosition(P,x),(0,n.default)(this,I).setReadOnlyState(this.getCommentMeta(i,r,T))}focusEditor(){(0,n.default)(this,I).focus()}updateCommentMeta(e,t,o){const s=this.hot.getCellMeta(e,t)[R];let i;s?(i=(0,h.deepClone)(s),(0,h.deepExtend)(i,o)):i=o,this.hot.setCellMeta(e,t,R,i)}getCommentMeta(e,t,o){const s=this.hot.getCellMeta(e,t);if(s[R])return s[R][o]}addToContextMenu(e){e.items.push({name:g.SEPARATOR},(0,f.default)(this),(0,p.default)(this),(0,m.default)(this))}getDisplayDelaySetting(){const e=this.hot.getSettings()[E];if((0,h.isObject)(e))return e.displayDelay}getEditorInputElement(){return(0,n.default)(this,I).getInputElement()}destroy(){(0,n.default)(this,I)&&(0,n.default)(this,I).destroy(),(0,n.default)(this,N)&&(0,n.default)(this,N).destroy(),super.destroy()}}function K(e){if(this.hot.view&&this.hot.view._wt&&!(0,n.default)(this,A)&&!this.targetIsCommentTextArea(e)){const t=(0,a.closest)(e.target,"TD","TBODY");let o=null;t&&(o=this.hot.getCoords(t)),(!t||this.range.from&&o&&(this.range.from.row!==o.row||this.range.from.col!==o.col))&&this.hide()}}function $(e){const{rootDocument:t}=this.hot;if(!((0,n.default)(this,A)||(0,n.default)(this,I).isFocused()||(0,a.hasClass)(e.target,"wtBorder")||(0,n.default)(this,H)===e.target)&&(0,n.default)(this,I))if((0,r.default)(this,H,t.elementFromPoint(e.clientX,e.clientY)),this.targetIsCellWithComment(e)){const t=this.hot._createCellRange(this.hot.getCoords(e.target));(0,n.default)(this,N).show(t)}else(0,a.isChildOf)(e.target,t)&&!this.targetIsCommentTextArea(e)&&(0,n.default)(this,N).hide()}function X(){(0,r.default)(this,A,!1)}function q(e,t){t[R]&&t[R][b]&&(0,a.addClass)(e,t.commentedCellClassName)}function Q(){(0,r.default)(this,k,""),this.hot.getShortcutManager().setActiveContextName("grid"),this.setComment()}function J(){(0,r.default)(this,k,this.getComment()),this.hot.listen(),this.hot.getShortcutManager().setActiveContextName(M)}function Z(e){(0,r.default)(this,x,{width:(0,a.outerWidth)(e.target),height:(0,a.outerHeight)(e.target)})}function ee(e){const t=(0,a.outerWidth)(e.target),o=(0,a.outerHeight)(e.target);t===(0,n.default)(this,x).width+1&&o===(0,n.default)(this,x).height+2||this.updateCommentMeta(this.range.from.row,this.range.from.col,{[_]:{width:t,height:o}})}function te(e){(0,n.default)(this,I).isVisible()&&(0,l.stopImmediatePropagation)(e)}function oe(){(0,n.default)(this,P)||this.hide()}t.Comments=z},21190:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsAddEdit",name(){var t;const o=null===(t=this.getSelectedRangeLast())||void 0===t?void 0:t.highlight;return null!=o&&o.isCell()&&e.getCommentAtCell(o.row,o.col)?this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_EDIT_COMMENT):this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_ADD_COMMENT)},callback(){const t=this.getSelectedRangeLast();this.deselectCell(),e.setRange(t),e.show(),e.focusEditor()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},57817:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsReadOnly",name(){const t=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);return(0,i.checkSelectionConsistency)(this.getSelectedRange(),((t,o)=>e.getCommentMeta(t,o,r.META_READONLY)))?(0,i.markLabelAsSelected)(t):t},callback(){this.getSelectedRangeLast().forAll(((t,o)=>{if(t>=0&&o>=0){const s=!!e.getCommentMeta(t,o,r.META_READONLY);e.updateCommentMeta(t,o,{[r.META_READONLY]:!s})}}))},disabled(){const t=this.getSelectedRangeLast();return!!(!t||t.highlight.isHeader()||!e.getCommentAtCell(t.highlight.row,t.highlight.col)||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(80734),r=o(34745);function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},74567:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsRemove",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REMOVE_COMMENT)},callback(){this.getSelectedRangeLast().forAll(((t,o)=>{t>=0&&o>=0&&e.removeCommentAtCell(t,o,!1)})),this.render()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},71586:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(85015),n=o(22232),a=s(o(65718));class l{constructor(e){(0,i.default)(this,"wasLastActionShow",!0),(0,i.default)(this,"showDebounced",null),(0,i.default)(this,"hidingTimer",null),this.updateDelay(e)}hide(){this.wasLastActionShow=!1,this.hidingTimer=setTimeout((()=>{!1===this.wasLastActionShow&&this.runLocalHooks("hide")}),250)}show(e){this.wasLastActionShow=!0,this.showDebounced(e)}cancelHiding(){this.wasLastActionShow=!0,clearTimeout(this.hidingTimer),this.hidingTimer=null}updateDelay(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250;this.showDebounced=(0,r.debounce)((e=>{this.wasLastActionShow&&this.runLocalHooks("show",e.from.row,e.from.col)}),e)}destroy(){this.clearLocalHooks()}}(0,n.mixin)(l,a.default);t.default=l},76076:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(34745);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Comments=s.Comments},26514:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517),o(57270);var i=s(o(93231)),r=o(50095),n=o(22232);t.CommandExecutor=class{constructor(e){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"commands",{}),(0,i.default)(this,"commonCallback",null),this.hot=e}registerCommand(e,t){this.commands[e]=t}setCommonCallback(e){this.commonCallback=e}execute(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];const i=e.split(":"),a=i[0],l=2===i.length?i[1]:null;let h=this.commands[a];if(!h)throw new Error(`Menu command '${a}' not exists.`);if(l&&h.submenu&&(h=function(e,t){let o;return(0,r.arrayEach)(t,(t=>{const s=t.key?t.key.split(":"):null;if(Array.isArray(s)&&s[1]===e)return o=t,!1})),o}(l,h.submenu.items)),!0===h.disabled)return;if("function"==typeof h.disabled&&!0===h.disabled.call(this.hot))return;if((0,n.hasOwnProperty)(h,"submenu"))return;const u=[];"function"==typeof h.callback&&u.push(h.callback),"function"==typeof this.commonCallback&&u.push(this.commonCallback),o.unshift(i.join(":")),(0,r.arrayEach)(u,(e=>e.apply(this.hot,o)))}}},52481:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(36026),n=s(o(56307)),a=o(50095),l=o(22232),h=o(26514),u=o(40255),d=o(90437),c=o(80734),g=o(83302),f=o(90500);function p(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function m(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(79498);const w=t.PLUGIN_KEY="contextMenu",C=t.PLUGIN_PRIORITY=70,v=w;n.default.getSingleton().register("afterContextMenuDefaultOptions"),n.default.getSingleton().register("beforeContextMenuShow"),n.default.getSingleton().register("afterContextMenuShow"),n.default.getSingleton().register("afterContextMenuHide"),n.default.getSingleton().register("afterContextMenuExecute");var y=new WeakSet,E=new WeakSet,S=new WeakSet,R=new WeakSet;class b extends r.BasePlugin{constructor(){super(...arguments),p(this,R),p(this,S),p(this,E),p(this,y),(0,i.default)(this,"commandExecutor",new h.CommandExecutor(this.hot)),(0,i.default)(this,"itemsFactory",null),(0,i.default)(this,"menu",null)}static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return C}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[f.ROW_ABOVE,f.ROW_BELOW,f.SEPARATOR,f.COLUMN_LEFT,f.COLUMN_RIGHT,f.SEPARATOR,f.REMOVE_ROW,f.REMOVE_COLUMN,f.SEPARATOR,f.UNDO,f.REDO,f.SEPARATOR,f.READ_ONLY,f.SEPARATOR,f.ALIGNMENT]}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[w];"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.menu=new d.Menu(this.hot,{className:"htContextMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.menu.addLocalHook("beforeOpen",(()=>m(this,E,T).call(this))),this.menu.addLocalHook("afterOpen",(()=>m(this,S,O).call(this))),this.menu.addLocalHook("afterClose",(()=>m(this,R,M).call(this))),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.executeCommand.call(e,...o)})),this.addHook("afterOnCellContextMenu",(e=>m(this,y,_).call(this,e))),this.registerShortcuts(),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&(this.menu.destroy(),this.menu=null),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control/Meta","Shift","Backslash"],["Shift","F10"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();this.hot.scrollToFocusedCell();const t=this.hot.getCell(e.row,e.col,!0).getBoundingClientRect(),o=(0,c.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument);this.open({left:t.left+o.left,top:t.top+o.top-1+t.height},{left:t.width,above:-t.height}),this.menu.getNavigator().toFirstItem()},runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&!this.menu.isOpened()},group:v})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(v)}open(e){var t;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(t=this.menu)&&void 0!==t&&t.isOpened()||(this.prepareMenuItems(),this.menu.open(),(0,l.objectEach)(o,((e,t)=>{this.menu.setOffset(t,e)})),this.menu.setPosition(e))}close(){var e;null===(e=this.menu)||void 0===e||e.close(),this.itemsFactory=null}executeCommand(e){null===this.itemsFactory&&this.prepareMenuItems();for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];this.commandExecutor.execute(e,...o)}prepareMenuItems(){this.itemsFactory=new u.ItemsFactory(this.hot,b.DEFAULT_ITEMS);const e=this.hot.getSettings()[w],t={items:this.itemsFactory.getItems(e)};this.hot.runHooks("afterContextMenuDefaultOptions",t),this.itemsFactory.setPredefinedItems(t.items);const o=this.itemsFactory.getItems(e);this.hot.runHooks("beforeContextMenuSetItems",o),this.menu.setMenuItems(o),(0,a.arrayEach)(o,(e=>this.commandExecutor.registerCommand(e.key,e)))}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function _(e){const t=this.hot.getSettings(),o=t.rowHeaders,s=t.colHeaders;const i=e.target;if(this.close(),(0,g.hasClass)(i,"handsontableInput"))return;if(e.preventDefault(),e.stopPropagation(),!o&&!s&&!(function(e){return"TD"===e.nodeName||"TD"===e.parentNode.nodeName}(i)||(0,g.hasClass)(i,"current")&&(0,g.hasClass)(i,"wtBorder")))return;const r=(0,c.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument);this.open({top:e.clientY+r.top,left:e.clientX+r.left})}function T(){this.hot.runHooks("beforeContextMenuShow",this)}function O(){this.hot.runHooks("afterContextMenuShow",this)}function M(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}t.ContextMenu=b,b.SEPARATOR={name:f.SEPARATOR}},86738:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(52481);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ContextMenu=s.ContextMenu},40255:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(22232),n=o(50095),a=o(90500);t.ItemsFactory=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,i.default)(this,"hot",void 0),(0,i.default)(this,"predefinedItems",(0,a.predefinedItems)()),(0,i.default)(this,"defaultOrderPattern",void 0),this.hot=e,this.defaultOrderPattern=t}setPredefinedItems(e){const t={};this.defaultOrderPattern.length=0,(0,r.objectEach)(e,((e,o)=>{let s="";e.name===a.SEPARATOR?(t[a.SEPARATOR]=e,s=a.SEPARATOR):isNaN(parseInt(o,10))?(e.key=void 0===e.key?o:e.key,t[o]=e,s=e.key):(t[e.key]=e,s=e.key),this.defaultOrderPattern.push(s)})),this.predefinedItems=t}getItems(){return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=[];let i=e;i&&i.items?i=i.items:Array.isArray(i)||(i=t);(0,r.isObject)(i)?(0,r.objectEach)(i,((e,t)=>{let i=o["string"==typeof e?e:t];i||(i=e),(0,r.isObject)(e)?(0,r.extend)(i,e):"string"==typeof i&&(i={name:i}),void 0===i.key&&(i.key=t),s.push(i)})):(0,n.arrayEach)(i,((e,t)=>{let i=o[e];!i&&a.ITEMS.indexOf(e)>=0||(i||(i={name:e,key:`${t}`}),(0,r.isObject)(e)&&(0,r.extend)(i,e),void 0===i.key&&(i.key=t),s.push(i))}));return s}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.defaultOrderPattern,this.predefinedItems)}}},91801:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231));t.Cursor=class{constructor(e,t){(0,i.default)(this,"top",void 0),(0,i.default)(this,"topRelative",void 0),(0,i.default)(this,"left",void 0),(0,i.default)(this,"leftRelative",void 0),(0,i.default)(this,"scrollTop",void 0),(0,i.default)(this,"scrollLeft",void 0),(0,i.default)(this,"cellHeight",void 0),(0,i.default)(this,"cellWidth",void 0);const o=t.scrollY,s=t.scrollX;let r,n,a,l,h,u;this.rootWindow=t,this.type=this.getSourceType(e),"literal"===this.type?(r=parseInt(e.top,10),a=parseInt(e.left,10),h=e.height||0,u=e.width||0,n=r,l=a,r+=o,a+=s):"event"===this.type&&(r=parseInt(e.pageY,10),a=parseInt(e.pageX,10),h=e.target.clientHeight,u=e.target.clientWidth,n=r-o,l=a-s),this.top=r,this.topRelative=n,this.left=a,this.leftRelative=l,this.scrollTop=o,this.scrollLeft=s,this.cellHeight=h,this.cellWidth=u}getSourceType(e){let t="literal";return e instanceof Event&&(t="event"),t}fitsAbove(e){return this.topRelative>=e.offsetHeight}fitsBelow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerHeight;return this.topRelative+e.offsetHeight<=t}fitsOnRight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerWidth;return this.leftRelative+this.cellWidth+e.offsetWidth<=t}fitsOnLeft(e){return this.leftRelative>=e.offsetWidth}}},97818:(e,t)=>{"use strict";t.__esModule=!0,t.createDefaultShortcutsList=function(e){return[{keys:[["Tab"],["Shift","Tab"],["Control/Meta","A"]],forwardToContext:e.hot.getShortcutManager().getContext("grid"),callback:()=>e.close(!0)},{keys:[["Escape"]],callback:()=>e.close()},{keys:[["ArrowDown"]],callback:()=>e.getNavigator().toNextItem()},{keys:[["ArrowUp"]],callback:()=>e.getNavigator().toPreviousItem()},{keys:[["ArrowRight"]],callback:()=>{const t=e.hotMenu.getSelectedLast();if(t){const o=e.openSubMenu(t[0]);o&&o.getNavigator().toFirstItem()}}},{keys:[["ArrowLeft"]],callback:()=>{e.hotMenu.getSelectedLast()&&e.isSubMenu()&&(e.close(),e.isSubMenu()&&e.parentMenu.hotMenu.listen())}},{keys:[["Control/Meta","ArrowUp"],["Home"]],callback:()=>e.getNavigator().toFirstItem()},{keys:[["Control/Meta","ArrowDown"],["End"]],callback:()=>e.getNavigator().toLastItem()},{keys:[["Enter"],["Space"]],callback:t=>{const o=e.hotMenu.getSelectedLast();o&&(e.hotMenu.getSourceDataAtRow(o[0]).submenu?e.openSubMenu(o[0]).getNavigator().toFirstItem():(e.executeCommand(t),e.close(!0)))}},{keys:[["PageUp"]],callback:()=>{e.hotMenu.getSelectedLast()?e.hotMenu.selection.transformStart(-e.hotMenu.countVisibleRows(),0):e.getNavigator().toFirstItem()}},{keys:[["PageDown"]],callback:()=>{e.hotMenu.getSelectedLast()?e.hotMenu.selection.transformStart(e.hotMenu.countVisibleRows(),0):e.getNavigator().toLastItem()}}]}},90437:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(95369);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}))},95369:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=s(o(48427)),n=s(o(42538)),a=o(62587),l=o(32967),h=o(58045),u=o(90500),d=o(69498),c=s(o(75244)),g=o(50095),f=o(37595),p=o(83302),m=o(24449),w=o(85015),C=o(93315),v=o(22232),y=s(o(65718)),E=o(77003),S=o(5386);function R(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var b=new WeakMap,_=new WeakMap;class T{constructor(e,t){var o=this;(0,i.default)(this,"hot",void 0),(0,i.default)(this,"options",void 0),(0,i.default)(this,"eventManager",new c.default(this)),(0,i.default)(this,"container",void 0),(0,i.default)(this,"positioner",void 0),(0,i.default)(this,"hotMenu",null),(0,i.default)(this,"hotSubMenus",{}),(0,i.default)(this,"parentMenu",void 0),(0,i.default)(this,"menuItems",null),(0,i.default)(this,"origOutsideClickDeselects",null),R(this,b,{writable:!0,value:void 0}),R(this,_,{writable:!0,value:void 0}),this.hot=e,this.options=t||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:215,container:this.hot.rootDocument.documentElement},this.container=this.createContainer(this.options.name),this.positioner=new a.Positioner(this.options.keepInViewport),this.parentMenu=this.options.parent||null,this.registerEvents(),this.isSubMenu()&&this.addLocalHook("afterSelectionChange",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.parentMenu.runLocalHooks("afterSelectionChange",...t)}))}registerEvents(){let e=this.hot.rootWindow;for(;e;)this.eventManager.addEventListener(e.document,"mousedown",(e=>this.onDocumentMouseDown(e))),this.eventManager.addEventListener(e.document,"contextmenu",(e=>this.onDocumentContextMenu(e))),e=(0,p.getParentWindow)(e)}setMenuItems(e){this.menuItems=e}getNavigator(){return(0,n.default)(this,b)}getKeyboardShortcutsCtrl(){return(0,n.default)(this,_)}getSelectedItem(){return this.hasSelectedItem()?this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]):null}hasSelectedItem(){return Array.isArray(this.hotMenu.getSelectedLast())}isSubMenu(){return null!==this.parentMenu}open(){this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";const e=(0,w.debounce)((e=>this.openSubMenu(e)),300),t=this.options.minWidth||215;let o=!1,s=(0,g.arrayFilter)(this.menuItems,(e=>(e.key===u.NO_ITEMS&&(o=!0),(0,d.isItemHidden)(e,this.hot))));if(s.length<1&&!o)s.push((0,u.predefinedItems)()[u.NO_ITEMS]);else if(0===s.length)return;s=(0,d.filterSeparators)(s,u.SEPARATOR);let i=!1;const a={data:s,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth:e=>(0,C.isDefined)(e)&&e<t?t:e,autoRowSize:!1,readOnly:!0,editor:!1,copyPaste:!1,hiddenRows:!0,maxCols:1,columns:[{data:"name",renderer:(0,E.createMenuItemRenderer)(this.hot)}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",layoutDirection:this.hot.isRtl()?"rtl":"ltr",ariaTags:!1,beforeOnCellMouseOver:(e,t)=>{(0,n.default)(this,b).setCurrentPage(t.row)},afterOnCellMouseOver:(t,o)=>{this.isAllSubMenusClosed()?e(o.row):this.openSubMenu(o.row)},rowHeights:e=>s[e].name===u.SEPARATOR?1:23,afterOnCellContextMenu:e=>{e.preventDefault(),(0,f.isWindowsOS)()&&i&&this.hasSelectedItem()&&this.close(!0)},afterSelection:(e,t,o,s,i)=>{this.hotMenu.view.isMouseDown()&&(i.value=!0),this.runLocalHooks("afterSelectionChange",this.getSelectedItem())},beforeOnCellMouseUp:e=>{this.hasSelectedItem()&&(i=!this.isCommandPassive(this.getSelectedItem()),this.executeCommand(e))},afterOnCellMouseUp:e=>{(0,f.isWindowsOS)()&&(0,m.isRightClick)(e)||!i||!this.hasSelectedItem()||((0,f.isMobileBrowser)()||(0,f.isIpadOS)()?this.hot._registerTimeout((()=>this.close(!0)),325):this.close(!0))},afterUnlisten:()=>{!this.hasSelectedItem()&&this.isOpened()&&this.hotMenu.listen()}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new this.hot.constructor(this.container,a),this.hotMenu.addHook("afterInit",(()=>this.onAfterInit())),this.hotMenu.init(),(0,r.default)(this,b,(0,l.createMenuNavigator)(this.hotMenu)),(0,r.default)(this,_,(0,h.createKeyboardShortcutsCtrl)(this)),(0,n.default)(this,_).listen(),this.focus(),this.isSubMenu()&&this.addLocalHook("afterOpen",(()=>this.parentMenu.runLocalHooks("afterSubmenuOpen",this))),this.runLocalHooks("afterOpen",this)}close(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isOpened())if(e&&this.isSubMenu())this.parentMenu.close();else if((0,n.default)(this,b).clear(),this.closeAllSubMenus(),this.container.style.display="none",this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.isSubMenu()){if(this.hot.getSettings().ariaTags){const e=this.parentMenu.hotMenu.getSelectedLast();if(e){const t=this.parentMenu.hotMenu.getCell(e[0],0);(0,p.setAttribute)(t,[(0,S.A11Y_EXPANDED)(!1)])}}this.parentMenu.hotMenu.listen()}}openSubMenu(e){if(!this.hotMenu)return!1;const t=this.hotMenu.getCell(e,0);if(this.closeAllSubMenus(),!t||!(0,d.hasSubMenu)(t))return!1;const o=this.hotMenu.getSourceDataAtRow(e),s=new T(this.hot,{parent:this,name:o.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return s.setMenuItems(o.submenu.items),s.open(),s.setPosition(t.getBoundingClientRect()),this.hotSubMenus[o.key]=s,this.hot.getSettings().ariaTags&&(0,p.setAttribute)(t,[(0,S.A11Y_EXPANDED)(!0)]),s}closeSubMenu(e){const t=this.hotMenu.getSourceDataAtRow(e),o=this.hotSubMenus[t.key];if(o){o.destroy(),delete this.hotSubMenus[t.key];const s=this.hotMenu.getCell(e,0);this.hot.getSettings().ariaTags&&(0,p.setAttribute)(s,[(0,S.A11Y_EXPANDED)(!1)])}}closeAllSubMenus(){(0,g.arrayEach)(this.hotMenu.getData(),((e,t)=>this.closeSubMenu(t)))}isAllSubMenusClosed(){return 0===Object.keys(this.hotSubMenus).length}focus(){this.isOpened()&&(this.hotMenu.rootElement.focus({preventScroll:!0}),this.getKeyboardShortcutsCtrl().listen(),this.hotMenu.listen())}destroy(){const e=this.container.parentNode;this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy(),e&&e.removeChild(this.container)}isOpened(){return null!==this.hotMenu}executeCommand(e){if(!this.isOpened()||!this.hasSelectedItem())return;const t=this.getSelectedItem();if(this.runLocalHooks("select",t,e),this.isCommandPassive(t))return;const o=this.hot.getSelectedRange(),s=o?(0,d.normalizeSelection)(o):[];this.runLocalHooks("executeCommand",t.key,s,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,s,e)}isCommandPassive(e){return!1===e.isCommand||(0,d.isItemSeparator)(e)||(0,d.isItemDisabled)(e,this.hot)||(0,d.isItemSubMenu)(e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.positioner.setOffset(e,t)}setPosition(e){this.isSubMenu()&&this.positioner.setParentElement(this.parentMenu.container),this.positioner.setElement(this.container).updatePosition(e)}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.options.container.ownerDocument;let o,s=e;return s&&((0,w.isFunction)(s)&&(s=s.call(this.hot),s=null===s||(0,C.isUndefined)(s)?"":s.toString()),s=s.replace(/[^A-z0-9]/g,"_"),s=`${this.options.className}Sub_${s}`,o=t.querySelector(`.${this.options.className}.${s}`)),o||(o=t.createElement("div"),(0,p.addClass)(o,`htMenu ${this.options.className}`),s&&(0,p.addClass)(o,s),this.options.container.appendChild(o)),o}onAfterInit(){const{wtTable:e}=this.hotMenu.view._wt,t=this.hotMenu.getSettings().data,o=e.hider.style,s=e.holder.style,i=parseInt(o.width,10),r=(0,g.arrayReduce)(t,((e,t)=>e+(t.name===u.SEPARATOR?1:26)),0);s.width=`${i+3}px`,s.height=`${r+3}px`,o.height=s.height,this.hot.getSettings().ariaTags&&(0,p.setAttribute)(this.hotMenu.rootElement,[(0,S.A11Y_MENU)(),(0,S.A11Y_TABINDEX)(-1)])}onDocumentMouseDown(e){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!(0,p.isChildOf)(e.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||(0,p.isChildOf)(e.target,".htMenu")||this.close(!0))}onDocumentContextMenu(e){this.isOpened()&&(0,p.hasClass)(e.target,"htCore")&&(0,p.isChildOf)(e.target,this.hotMenu.rootElement)&&e.preventDefault()}}t.Menu=T,(0,v.mixin)(T,y.default)},77003:(e,t,o)=>{"use strict";t.__esModule=!0,t.createMenuItemRenderer=function(e){return(t,o,n,a,l,h)=>{if(o.hasAttribute("ghost-table"))return;const u=t.getSourceDataAtRow(n),d=e.rootDocument.createElement("div"),c="function"==typeof h?h.call(e):h;if((0,i.empty)(o),(0,i.addClass)(d,"htItemWrapper"),e.getSettings().ariaTags){const t=!(0,s.isItemDisabled)(u,e)&&!(0,s.isItemSelectionDisabled)(u)&&!(0,s.isItemSeparator)(u);(0,i.setAttribute)(o,[(0,r.A11Y_MENU_ITEM)(),(0,r.A11Y_LABEL)(c),...t?[(0,r.A11Y_TABINDEX)(-1)]:[],...(0,s.isItemDisabled)(u,e)?[(0,r.A11Y_DISABLED)()]:[],...(0,s.isItemSubMenu)(u)?[(0,r.A11Y_EXPANDED)(!1)]:[]])}o.className="",o.appendChild(d),(0,s.isItemSeparator)(u)?(0,i.addClass)(o,"htSeparator"):"function"==typeof u.renderer?((0,i.addClass)(o,"htCustomMenuRenderer"),o.appendChild(u.renderer(t,d,n,a,l,c))):(0,i.fastInnerHTML)(d,c),(0,s.isItemDisabled)(u,e)?(0,i.addClass)(o,"htDisabled"):(0,s.isItemSelectionDisabled)(u)?(0,i.addClass)(o,"htSelectionDisabled"):(0,s.isItemSubMenu)(u)&&(0,i.addClass)(o,"htSubmenu")}};var s=o(69498),i=o(83302),r=o(5386)},32967:(e,t,o)=>{"use strict";t.__esModule=!0,t.createMenuNavigator=function(e){return(0,s.createPaginator)({size:()=>e.countRows(),onItemSelect(t,o){const s=e.getCell(t,0);if(!s||(0,i.isSeparator)(s)||(0,i.isDisabled)(s)||(0,i.isSelectionDisabled)(s))return!1;e.selectCell(t,0,...o?[t,0,!1,!1]:[])},onClear(){e.deselectCell()}})};var s=o(29583),i=o(69498)},62587:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(42538)),r=s(o(48427)),n=o(91801);function a(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var l=new WeakMap,h=new WeakMap,u=new WeakMap,d=new WeakMap,c=new WeakMap;t.Positioner=class{constructor(e){a(this,l,{writable:!0,value:void 0}),a(this,h,{writable:!0,value:void 0}),a(this,u,{writable:!0,value:void 0}),a(this,d,{writable:!0,value:!1}),a(this,c,{writable:!0,value:{above:0,below:0,left:0,right:0}}),(0,r.default)(this,d,e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(0,i.default)(this,c)[e]=t,this}setElement(e){return(0,r.default)(this,l,e),this}setParentElement(e){return(0,r.default)(this,h,e),this}updatePosition(e){(0,r.default)(this,u,new n.Cursor(e,(0,i.default)(this,l).ownerDocument.defaultView)),(0,i.default)(this,d)?((0,i.default)(this,u).fitsBelow((0,i.default)(this,l))?this.setPositionBelowCursor():(0,i.default)(this,u).fitsAbove((0,i.default)(this,l))?this.setPositionAboveCursor():this.setPositionBelowCursor(),this.updateHorizontalPosition()):(this.setPositionBelowCursor(),this.setPositionOnRightOfCursor())}updateHorizontalPosition(){"rtl"===(0,i.default)(this,l).dir?(0,i.default)(this,u).fitsOnLeft((0,i.default)(this,l))?this.setPositionOnLeftOfCursor():this.setPositionOnRightOfCursor():(0,i.default)(this,u).fitsOnRight((0,i.default)(this,l))?this.setPositionOnRightOfCursor():this.setPositionOnLeftOfCursor()}setPositionAboveCursor(){let e=(0,i.default)(this,c).above+(0,i.default)(this,u).top-(0,i.default)(this,l).offsetHeight;(0,i.default)(this,h)&&(e=(0,i.default)(this,u).top+(0,i.default)(this,u).cellHeight-(0,i.default)(this,l).offsetHeight+3),(0,i.default)(this,l).style.top=`${e}px`}setPositionBelowCursor(){let e=(0,i.default)(this,c).below+(0,i.default)(this,u).top+1;(0,i.default)(this,h)&&(e=(0,i.default)(this,u).top-1),(0,i.default)(this,l).style.top=`${e}px`}setPositionOnRightOfCursor(){let e=(0,i.default)(this,u).left;if((0,i.default)(this,h)){const{right:t}=(0,i.default)(this,h).getBoundingClientRect();e+=(0,i.default)(this,u).cellWidth+t-((0,i.default)(this,u).left+(0,i.default)(this,u).cellWidth)}else e+=(0,i.default)(this,c).right;(0,i.default)(this,l).style.left=`${e}px`}setPositionOnLeftOfCursor(){let e=(0,i.default)(this,c).left+(0,i.default)(this,u).left-(0,i.default)(this,l).offsetWidth;if((0,i.default)(this,h)){const{left:t}=(0,i.default)(this,h).getBoundingClientRect();e-=(0,i.default)(this,u).left-t}(0,i.default)(this,l).style.left=`${e}px`}}},58045:(e,t,o)=>{"use strict";t.__esModule=!0,t.createKeyboardShortcutsCtrl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const o=[];function n(e,t){h(t).addShortcuts(e,{group:i})}function a(e,t){const s=h(t);e.forEach((e=>{let{keys:t}=e;t.forEach((e=>s.removeShortcutsByKeys(e)))})),o.push({shortcuts:e,contextName:t}),n(e,t)}function l(e){return e?`${r}:${e}`:r}function h(t){var o;const s=e.hotMenu.getShortcutManager(),i=l(t);return null!==(o=s.getContext(i))&&void 0!==o?o:s.addContext(i)}return n((0,s.createDefaultShortcutsList)(e)),t.forEach((e=>{let{shortcuts:t,contextName:o}=e;a(t,o)})),{addCustomShortcuts:a,getCustomShortcuts:function(){return[...o]},getContext:h,listen:function(t){e.hotMenu.getShortcutManager().setActiveContextName(l(t))}}},o(63517);var s=o(97818);const i="menu",r=i},69498:(e,t,o)=>{"use strict";t.__esModule=!0,t.filterSeparators=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.SEPARATOR,o=e.slice(0);return o=a(o,t),o=function(e,t){let o=e.slice(0);return o.reverse(),o=a(o,t),o.reverse(),o}(o,t),o=function(e){const t=[];return(0,s.arrayEach)(e,((e,o)=>{o>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)})),t}(o),o},t.hasSubMenu=function(e){return(0,r.hasClass)(e,"htSubmenu")},t.isDisabled=function(e){return(0,r.hasClass)(e,"htDisabled")},t.isItemDisabled=function(e,t){return!0===e.disabled||"function"==typeof e.disabled&&!0===e.disabled.call(t)},t.isItemHidden=function(e,t){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(t))},t.isItemSelectionDisabled=function(e){return(0,i.hasOwnProperty)(e,"disableSelection")},t.isItemSeparator=function(e){return new RegExp(n.SEPARATOR,"i").test(e.name)},t.isItemSubMenu=function(e){return(0,i.hasOwnProperty)(e,"submenu")},t.isSelectionDisabled=function(e){return(0,r.hasClass)(e,"htSelectionDisabled")},t.isSeparator=function(e){return(0,r.hasClass)(e,"htSeparator")},t.normalizeSelection=function(e){return(0,s.arrayMap)(e,(e=>({start:e.getTopStartCorner(),end:e.getBottomEndCorner()})))},o(63517);var s=o(50095),i=o(22232),r=o(83302),n=o(90500);function a(e,t){const o=e.slice(0);for(let e=0;e<o.length&&o[e].name===t;)o.shift();return o}},33439:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:a,name(){return this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT)},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||!(this.getSelectedRange()&&!this.selection.isSelectedByCorner()))},submenu:{items:[{key:`${a}:left`,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const o=this.getCellMeta(e,t).className;if(o&&-1!==o.indexOf("htLeft"))return!0}))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="horizontal",i="htLeft";this.runHooks("beforeCellAlignment",t,e,o,i),(0,s.align)(e,o,i,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${a}:center`,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const o=this.getCellMeta(e,t).className;if(o&&-1!==o.indexOf("htCenter"))return!0}))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="horizontal",i="htCenter";this.runHooks("beforeCellAlignment",t,e,o,i),(0,s.align)(e,o,i,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${a}:right`,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const o=this.getCellMeta(e,t).className;if(o&&-1!==o.indexOf("htRight"))return!0}))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="horizontal",i="htRight";this.runHooks("beforeCellAlignment",t,e,o,i),(0,s.align)(e,o,i,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${a}:justify`,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const o=this.getCellMeta(e,t).className;if(o&&-1!==o.indexOf("htJustify"))return!0}))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="horizontal",i="htJustify";this.runHooks("beforeCellAlignment",t,e,o,i),(0,s.align)(e,o,i,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{name:i.KEY},{key:`${a}:top`,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT_TOP);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const o=this.getCellMeta(e,t).className;if(o&&-1!==o.indexOf("htTop"))return!0}))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="vertical",i="htTop";this.runHooks("beforeCellAlignment",t,e,o,i),(0,s.align)(e,o,i,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${a}:middle`,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const o=this.getCellMeta(e,t).className;if(o&&-1!==o.indexOf("htMiddle"))return!0}))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="vertical",i="htMiddle";this.runHooks("beforeCellAlignment",t,e,o,i),(0,s.align)(e,o,i,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${a}:bottom`,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const o=this.getCellMeta(e,t).className;if(o&&-1!==o.indexOf("htBottom"))return!0}))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="vertical",i="htBottom";this.runHooks("beforeCellAlignment",t,e,o,i),(0,s.align)(e,o,i,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1}]}}};var s=o(80734),i=o(11689),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.KEY="alignment"},8295:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_CLEAR_COLUMN)},callback(e,t){const o=t[0].start.col,s=t[0].end.col;this.countRows()&&this.populateFromArray(0,o,[[null]],Math.max(t[0].start.row,t[0].end.row),s,"ContextMenu.clearColumn")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByColumnHeader())}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.KEY="clear_column"},19865:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_INSERT_LEFT)},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner(),t=this.isRtl()?"insert_col_end":"insert_col_start";this.alter(t,e.col,1,"ContextMenu.columnLeft")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;if(this.selection.isSelectedByCorner()){return 0===this.countCols()}return this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols},hidden(){return!this.getSettings().allowInsertColumn}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.KEY="col_left"},27471:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_INSERT_RIGHT)},callback(){const e=this.getSelectedRangeLast().getTopRightCorner(),t=this.isRtl()?"insert_col_start":"insert_col_end";this.alter(t,e.col,1,"ContextMenu.columnRight")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols))},hidden(){return!this.getSettings().allowInsertColumn}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.KEY="col_right"},90500:(e,t,o)=>{"use strict";t.__esModule=!0,t.addItem=function(e,t){-1===v.indexOf(e)&&(y[e]=t)},t.predefinedItems=function(){const e={};return(0,s.objectEach)(y,((t,o)=>{e[o]=t()})),e};var s=o(22232),i=C(o(33439));t.ALIGNMENT=i.KEY;var r=C(o(8295));t.CLEAR_COLUMN=r.KEY;var n=C(o(19865));t.COLUMN_LEFT=n.KEY;var a=C(o(27471));t.COLUMN_RIGHT=a.KEY;var l=C(o(37010));t.READ_ONLY=l.KEY;var h=C(o(1687));t.REDO=h.KEY;var u=C(o(63665));t.REMOVE_COLUMN=u.KEY;var d=C(o(90458));t.REMOVE_ROW=d.KEY;var c=C(o(96604));t.ROW_ABOVE=c.KEY;var g=C(o(96599));t.ROW_BELOW=g.KEY;var f=C(o(11689));t.SEPARATOR=f.KEY;var p=C(o(10490));t.NO_ITEMS=p.KEY;var m=C(o(47872));function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(w=function(e){return e?o:t})(e)}function C(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=w(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}t.UNDO=m.KEY;const v=t.ITEMS=[c.KEY,g.KEY,n.KEY,a.KEY,r.KEY,d.KEY,u.KEY,m.KEY,h.KEY,l.KEY,i.KEY,f.KEY,p.KEY],y={[f.KEY]:f.default,[p.KEY]:p.default,[c.KEY]:c.default,[g.KEY]:g.default,[n.KEY]:n.default,[a.KEY]:a.default,[r.KEY]:r.default,[d.KEY]:d.default,[u.KEY]:u.default,[m.KEY]:m.default,[h.KEY]:h.default,[l.KEY]:l.default,[i.KEY]:i.default}},10490:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_NO_ITEMS)},disabled:!0,isCommand:!1}};var s=o(77516);const i=t.KEY="no_items"},37010:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:a,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_READ_ONLY);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>this.getCellMeta(e,t).readOnly))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.checkSelectionConsistency)(e,((e,t)=>this.getCellMeta(e,t).readOnly));(0,i.arrayEach)(e,(e=>{e.forAll(((e,o)=>{e>=0&&o>=0&&this.setCellMeta(e,o,"readOnly",!t)}))})),this.render()},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||(!!this.selection.isSelectedByCorner()||(0===this.countRows()||0===this.countCols()||(!this.getSelectedRange()||0===this.getSelectedRange().length))))}}};var s=o(80734),i=o(50095),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.KEY="make_read_only"},1687:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REDO)},callback(){this.redo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isRedoAvailable()}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.KEY="redo"},63665:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:n,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[,o,,s]=e[0];o-s!=0&&(t=1)}return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_REMOVE_COLUMN,t)},callback(){this.alter("remove_col",(0,s.transformSelectionToColumnDistance)(this),null,"ContextMenu.removeColumn")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;const t=this.countCols();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByRowHeader()||0===t},hidden(){return!this.getSettings().allowRemoveColumn}}};var s=o(69248),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const n=t.KEY="remove_col"},90458:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:n,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[o,,s]=e[0];o-s!=0&&(t=1)}return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_REMOVE_ROW,t)},callback(){this.alter("remove_row",(0,s.transformSelectionToRowDistance)(this),1,"ContextMenu.removeRow")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;const t=this.countRows();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByColumnHeader()||0===t},hidden(){return!this.getSettings().allowRemoveRow}}};var s=o(69248),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const n=t.KEY="remove_row"},96604:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_ROW_ABOVE)},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner();this.alter("insert_row_above",e.row,1,"ContextMenu.rowAbove")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;if(this.selection.isSelectedByCorner()){return 0===this.countRows()}return this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows},hidden(){return!this.getSettings().allowInsertRow}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.KEY="row_above"},96599:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_ROW_BELOW)},callback(){const e=this.getSelectedRangeLast().getBottomRightCorner();this.alter("insert_row_below",e.row,1,"ContextMenu.rowBelow")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.row<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows))},hidden(){return!this.getSettings().allowInsertRow}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.KEY="row_below"},11689:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){return{name:o}};const o=t.KEY="---------"},47872:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_UNDO)},callback(){this.undo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isUndoAvailable()}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.KEY="undo"},80734:(e,t,o)=>{"use strict";t.__esModule=!0,t.align=function(e,t,o,n,a){(0,s.arrayEach)(e,(e=>{e.forAll(((e,s)=>{e>=0&&s>=0&&function(e,t,o,s,n,a){const l=n(e,t);let h=s;l.className&&(h="vertical"===o?i(l.className,s):r(l.className,s));a(e,t,"className",h)}(e,s,t,o,n,a)}))}))},t.checkSelectionConsistency=function(e,t){let o=!1;Array.isArray(e)&&(0,s.arrayEach)(e,(e=>(e.forAll(((e,s)=>{if(e>=0&&s>=0&&t(e,s))return o=!0,!1})),o)));return o},t.getAlignmentClasses=function(e,t){const o={};return(0,s.arrayEach)(e,(e=>{e.forAll(((e,s)=>{e>=0&&s>=0&&(o[e]||(o[e]=[]),o[e][s]=t(e,s))}))})),o},t.getDocumentOffsetByElement=function(e,t){const o={top:0,left:0};if(t!==e.ownerDocument){const{frameElement:e}=t.defaultView,{top:s,left:i}=e.getBoundingClientRect();o.top=s,o.left=i}return o},t.markLabelAsSelected=function(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`},t.prepareHorizontalAlignClass=r,t.prepareVerticalAlignClass=i;var s=o(50095);function i(e,t){if(-1!==e.indexOf(t))return e;return`${e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","")} ${t}`}function r(e,t){if(-1!==e.indexOf(t))return e;return`${e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","")} ${t}`}},31856:(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(){this.data={}}setData(e,t){this.data[e]=t}getData(e){return this.data[e]||void 0}}},6706:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_COPY)},callback(){e.copyCellsOnly()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=o(77516)},95842:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_column_headers_only",name(){const e=this.getSelectedRangeLast(),t=e?(0,i.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY,t)},callback(){e.copyColumnHeadersOnly()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=o(77516),i=o(68145)},99411:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_with_column_group_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,i.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS,t)},callback(){e.copyWithAllColumnHeaders()},disabled(){if(!this.hasColHeaders()||!this.getSettings().nestedHeaders)return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=o(77516),i=o(68145)},80370:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_with_column_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,i.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS,t)},callback(){e.copyWithColumnHeaders()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=o(77516),i=o(68145)},96813:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"cut",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_CUT)},callback(){e.cut()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},63273:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=s(o(42538)),n=s(o(48427)),a=o(36026),l=s(o(56307)),h=o(29270),u=o(50095),d=o(18609),c=o(83302),g=o(37595),f=s(o(6706)),p=s(o(95842)),m=s(o(99411)),w=s(o(80370)),C=s(o(96813)),v=s(o(83697)),y=o(70189),E=o(52870);function S(e,t){b(e,t),t.add(e)}function R(e,t,o){b(e,t),t.set(e,o)}function b(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(63824),l.default.getSingleton().register("afterCopyLimit"),l.default.getSingleton().register("modifyCopyableRange"),l.default.getSingleton().register("beforeCut"),l.default.getSingleton().register("afterCut"),l.default.getSingleton().register("beforePaste"),l.default.getSingleton().register("afterPaste"),l.default.getSingleton().register("beforeCopy"),l.default.getSingleton().register("afterCopy");const T=t.PLUGIN_KEY="copyPaste",O=t.PLUGIN_PRIORITY=80,M=["fragmentSelection"],I=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join("");var N=new WeakMap,A=new WeakMap,P=new WeakMap,x=new WeakMap,H=new WeakMap,k=new WeakMap,D=new WeakMap,L=new WeakSet,W=new WeakSet,F=new WeakSet,V=new WeakSet,B=new WeakSet,U=new WeakSet,Y=new WeakSet,j=new WeakSet,G=new WeakSet;class z extends a.BasePlugin{constructor(){super(...arguments),S(this,G),S(this,j),S(this,Y),S(this,U),S(this,B),S(this,V),S(this,F),S(this,W),S(this,L),(0,i.default)(this,"columnsLimit",1/0),(0,i.default)(this,"rowsLimit",1/0),(0,i.default)(this,"pasteMode","overwrite"),(0,i.default)(this,"uiContainer",this.hot.rootDocument.body),R(this,N,{writable:!0,value:!1}),R(this,A,{writable:!0,value:!1}),R(this,P,{writable:!0,value:!1}),R(this,x,{writable:!0,value:"cells-only"}),R(this,H,{writable:!0,value:!1}),R(this,k,{writable:!0,value:!1}),R(this,D,{writable:!0,value:new y.CopyableRangesFactory({countRows:()=>this.hot.countRows(),countColumns:()=>this.hot.countCols(),rowsLimit:()=>this.rowsLimit,columnsLimit:()=>this.columnsLimit,countColumnHeaders:()=>this.hot.view.getColumnHeadersCount()})}),(0,i.default)(this,"copyableRanges",[])}static get PLUGIN_KEY(){return T}static get SETTING_KEYS(){return[T,...M]}static get PLUGIN_PRIORITY(){return O}isEnabled(){return!!this.hot.getSettings()[T]}enablePlugin(){var e=this;if(this.enabled)return;const{[T]:t}=this.hot.getSettings();var o,s;"object"==typeof t&&(this.pasteMode=null!==(o=t.pasteMode)&&void 0!==o?o:this.pasteMode,this.rowsLimit=isNaN(t.rowsLimit)?this.rowsLimit:t.rowsLimit,this.columnsLimit=isNaN(t.columnsLimit)?this.columnsLimit:t.columnsLimit,(0,n.default)(this,N,!!t.copyColumnHeaders),(0,n.default)(this,A,!!t.copyColumnGroupHeaders),(0,n.default)(this,P,!!t.copyColumnHeadersOnly),this.uiContainer=null!==(s=t.uiContainer)&&void 0!==s?s:this.uiContainer);this.addHook("afterContextMenuDefaultOptions",(e=>_(this,B,Q).call(this,e))),this.addHook("afterSelectionEnd",(()=>_(this,U,J).call(this))),this.eventManager.addEventListener(this.hot.rootDocument,"copy",(function(){return e.onCopy(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"cut",(function(){return e.onCut(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"paste",(function(){return e.onPaste(...arguments)})),(0,g.isSafari)()&&(this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseenter",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return _(e,Y,Z).call(e,...o)})),this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseleave",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return _(e,j,ee).call(e,...o)})),this.addHook("afterSelection",(()=>_(this,G,te).call(this)))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin()}copy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cells-only";(0,n.default)(this,x,e),(0,n.default)(this,H,!0),_(this,L,K).call(this,"copy")}copyCellsOnly(){this.copy("cells-only")}copyColumnHeadersOnly(){this.copy("column-headers-only")}copyWithAllColumnHeaders(){this.copy("with-column-group-headers")}copyWithColumnHeaders(){this.copy("with-column-headers")}cut(){(0,n.default)(this,k,!0),_(this,L,K).call(this,"cut")}getRangedCopyableData(e){return(0,h.stringify)(this.getRangedData(e))}getRangedData(e){const t=[],{rows:o,columns:s}=(0,y.normalizeRanges)(e);return(0,u.arrayEach)(o,(e=>{const o=[];(0,u.arrayEach)(s,(t=>{e<0?o.push(this.hot.getColHeader(t,e)):o.push(this.hot.getCopyableData(e,t))})),t.push(o)})),t}paste(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(!e&&!t)return;const o=new v.default;e&&o.clipboardData.setData("text/plain",e),t&&o.clipboardData.setData("text/html",t),this.onPaste(o)}setCopyableText(){const e=this.hot.getSelectedRangeLast();if(!e)return;if(e.isSingleHeader())return void(this.copyableRanges=[]);(0,r.default)(this,D).setSelectedRange(e);const t=new Map([["headers",null],["cells",null]]);"column-headers-only"===(0,r.default)(this,x)?t.set("headers",(0,r.default)(this,D).getMostBottomColumnHeadersRange()):("with-column-headers"===(0,r.default)(this,x)?t.set("headers",(0,r.default)(this,D).getMostBottomColumnHeadersRange()):"with-column-group-headers"===(0,r.default)(this,x)&&t.set("headers",(0,r.default)(this,D).getAllColumnHeadersRange()),t.set("cells",(0,r.default)(this,D).getCellsRange())),this.copyableRanges=Array.from(t.values()).filter((e=>null!==e)).map((e=>{let{startRow:t,startCol:o,endRow:s,endCol:i}=e;return{startRow:t,startCol:o,endRow:s,endCol:i}})),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges);const o=t.get("cells");if(null!==o&&o.isRangeTrimmed){const{startRow:e,startCol:t,endRow:s,endCol:i}=o;this.hot.runHooks("afterCopyLimit",s-e+1,i-t+1,this.rowsLimit,this.columnsLimit)}}isEditorOpened(){var e;return null===(e=this.hot.getActiveEditor())||void 0===e?void 0:e.isOpened()}populateValues(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.hot.getSelectedRangeLast();if(!e.length)return;const o=e.length,s=e[0].length,i=[],{row:r,col:n}=t.getTopStartCorner(),{row:a,col:l}=t.getBottomEndCorner();let h=r,u=n,d=r,c=n;for(;i.length<o||h<=a;){const{skipRowOnPaste:t,visualRow:a}=this.hot.getCellMeta(h,n);if(h=a+1,!0===t)continue;d=a,u=n;const g=[],f=i.length%o;for(;g.length<s||u<=l;){const{skipColumnOnPaste:t,visualCol:o}=this.hot.getCellMeta(r,u);if(u=o+1,!0===t)continue;c=o;const i=g.length%s;g.push(e[f][i])}i.push(g)}return this.hot.populateFromArray(r,n,i,void 0,void 0,"CopyPaste.paste",this.pasteMode),[r,n,d,c]}onCopy(e){if(!this.hot.isListening()&&!(0,r.default)(this,H)||this.isEditorOpened())return;this.setCopyableText(),(0,n.default)(this,H,!1);const t=this.getRangedData(this.copyableRanges),o=_(this,W,$).call(this,this.copyableRanges);if(!!this.hot.runHooks("beforeCopy",t,this.copyableRanges,o)){const s=(0,h.stringify)(t);if(e&&e.clipboardData){const o=(0,E._dataToHTML)(t,this.hot.rootDocument);e.clipboardData.setData("text/plain",s),e.clipboardData.setData("text/html",[I,o].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",s);this.hot.runHooks("afterCopy",t,this.copyableRanges,o)}(0,n.default)(this,x,"cells-only"),e.preventDefault()}onCut(e){if(!this.hot.isListening()&&!(0,r.default)(this,k)||this.isEditorOpened())return;this.setCopyableText(),(0,n.default)(this,k,!1);const t=this.getRangedData(this.copyableRanges);if(!!this.hot.runHooks("beforeCut",t,this.copyableRanges)){const o=(0,h.stringify)(t);if(e&&e.clipboardData){const s=(0,E._dataToHTML)(t,this.hot.rootDocument);e.clipboardData.setData("text/plain",o),e.clipboardData.setData("text/html",[I,s].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",o);this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",t,this.copyableRanges)}e.preventDefault()}onPaste(e){if(!this.hot.isListening()||this.isEditorOpened()||!this.hot.getSelected())return;let t;if(e&&e.preventDefault&&e.preventDefault(),e&&void 0!==e.clipboardData){const o=(0,d.sanitize)(e.clipboardData.getData("text/html"),{ADD_TAGS:["meta"],ADD_ATTR:["content"],FORCE_BODY:!0});if(o&&/(<table)|(<TABLE)/g.test(o)){t=(0,E.htmlToGridSettings)(o,this.hot.rootDocument).data}else t=e.clipboardData.getData("text/plain")}else"undefined"==typeof ClipboardEvent&&void 0!==this.hot.rootWindow.clipboardData&&(t=this.hot.rootWindow.clipboardData.getData("Text"));if("string"==typeof t&&(t=(0,h.parse)(t)),void 0===t||t&&0===t.length)return;if(!1===this.hot.runHooks("beforePaste",t,this.copyableRanges))return;const[o,s,i,r]=this.populateValues(t);this.hot.selectCell(o,s,Math.min(this.hot.countRows()-1,i),Math.min(this.hot.countCols()-1,r)),this.hot.runHooks("afterPaste",t,this.copyableRanges)}destroy(){super.destroy()}}function K(e){if((0,g.isSafari)()){const t=this.hot.getSelectedRangeLast();if(t){const{row:o,col:s}=t.highlight,i=this.hot.getCell(o,s,!0);i&&(0,c.runWithSelectedContendEditableElement)(i,(()=>{this.hot.rootDocument.execCommand(e)}))}}else this.hot.rootDocument.execCommand(e)}function $(e){const{rows:t}=(0,y.normalizeRanges)(e);let o=0;for(let e=0;e<t.length&&!(t[e]>=0);e++)o+=1;return{columnHeadersCount:o}}function X(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:o}=e.highlight,s=this.hot.getCell(t,o,!0);s&&(0,c.makeElementContentEditableAndSelectItsContent)(s)}}}function q(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:o}=e.highlight,s=this.hot.getCell(t,o,!0);null!=s&&s.hasAttribute("contenteditable")&&(0,c.removeContentEditableFromElementAndDeselect)(s)}}}function Q(e){e.items.push({name:"---------"},(0,f.default)(this)),(0,r.default)(this,N)&&e.items.push((0,w.default)(this)),(0,r.default)(this,A)&&e.items.push((0,m.default)(this)),(0,r.default)(this,P)&&e.items.push((0,p.default)(this)),e.items.push((0,C.default)(this))}function J(){this.isEditorOpened()||this.hot.getSettings().fragmentSelection||this.setCopyableText()}function Z(){_(this,V,q).call(this)}function ee(){_(this,F,X).call(this)}function te(){_(this,V,q).call(this)}t.CopyPaste=z},70189:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,t.normalizeRanges=function(e){const t=[],o=[];return(0,n.arrayEach)(e,(e=>{const s=Math.min(e.startRow,e.endRow),i=Math.max(e.startRow,e.endRow);(0,a.rangeEach)(s,i,(e=>{-1===t.indexOf(e)&&t.push(e)}));const r=Math.min(e.startCol,e.endCol),n=Math.max(e.startCol,e.endCol);(0,a.rangeEach)(r,n,(e=>{-1===o.indexOf(e)&&o.push(e)}))})),{rows:t,columns:o}},o(63517);var i=s(o(42538)),r=s(o(48427)),n=o(50095),a=o(68145);function l(e,t){u(e,t),t.add(e)}function h(e,t,o){u(e,t),t.set(e,o)}function u(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function d(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var c=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,w=new WeakMap,C=new WeakSet,v=new WeakSet;function y(e,t){return Math.min(t,Math.max(e+(0,i.default)(this,m).call(this)-1,e))}function E(e,t){return Math.min(t,Math.max(e+(0,i.default)(this,p).call(this)-1,e))}t.CopyableRangesFactory=class{constructor(e){let{countRows:t,countColumns:o,rowsLimit:s,columnsLimit:i,countColumnHeaders:n}=e;l(this,v),l(this,C),h(this,c,{writable:!0,value:void 0}),h(this,g,{writable:!0,value:void 0}),h(this,f,{writable:!0,value:void 0}),h(this,p,{writable:!0,value:void 0}),h(this,m,{writable:!0,value:void 0}),h(this,w,{writable:!0,value:void 0}),(0,r.default)(this,g,t),(0,r.default)(this,f,o),(0,r.default)(this,p,s),(0,r.default)(this,m,i),(0,r.default)(this,w,n)}setSelectedRange(e){(0,r.default)(this,c,e)}getCellsRange(){if(0===(0,i.default)(this,g).call(this)||0===(0,i.default)(this,f).call(this))return null;const{row:e,col:t}=(0,i.default)(this,c).getTopStartCorner(),{row:o,col:s}=(0,i.default)(this,c).getBottomEndCorner(),r=d(this,v,E).call(this,e,o),n=d(this,C,y).call(this,t,s);return{isRangeTrimmed:o!==r||s!==n,startRow:e,startCol:t,endRow:r,endCol:n}}getMostBottomColumnHeadersRange(){if(0===(0,i.default)(this,f).call(this)||0===(0,i.default)(this,w).call(this))return null;const{col:e}=(0,i.default)(this,c).getTopStartCorner(),{col:t}=(0,i.default)(this,c).getBottomEndCorner(),o=d(this,C,y).call(this,e,t);return{isRangeTrimmed:t!==o,startRow:-1,startCol:e,endRow:-1,endCol:o}}getAllColumnHeadersRange(){if(0===(0,i.default)(this,f).call(this)||0===(0,i.default)(this,w).call(this))return null;const{col:e}=(0,i.default)(this,c).getTopStartCorner(),{col:t}=(0,i.default)(this,c).getBottomEndCorner(),o=d(this,C,y).call(this,e,t);return{isRangeTrimmed:t!==o,startRow:-(0,i.default)(this,w).call(this),startCol:e,endRow:-1,endCol:o}}}},77708:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(63273);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.CopyPaste=s.CopyPaste},83697:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(31856));t.default=class{constructor(){this.clipboardData=new i.default}}},65899:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:bottom",name(){let e=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_BORDERS_BOTTOM);return(0,i.checkSelectionBorders)(this,"bottom")&&(e=(0,i.markSelected)(e)),e},callback(t,o){const s=(0,i.checkSelectionBorders)(this,"bottom");e.prepareBorder(o,"bottom",s)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(55298);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},20216:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(65899));t.bottom=i.default;var r=s(o(47521));t.left=r.default;var n=s(o(3908));t.noBorders=n.default;var a=s(o(72702));t.right=a.default;var l=s(o(57951));t.top=l.default},47521:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=e.hot.isRtl()?"end":"start";return{key:"borders:left",name(){let e=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_BORDERS_LEFT);return(0,i.checkSelectionBorders)(this,t)&&(e=(0,i.markSelected)(e)),e},callback(o,s){const r=(0,i.checkSelectionBorders)(this,t);e.prepareBorder(s,t,r)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(55298);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},3908:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:no_borders",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REMOVE_BORDERS)},callback(t,o){e.prepareBorder(o,"noBorders")},disabled(){return!(0,i.checkSelectionBorders)(this)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(55298);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},72702:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=e.hot.isRtl()?"start":"end";return{key:"borders:right",name(){let e=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_BORDERS_RIGHT);return(0,i.checkSelectionBorders)(this,t)&&(e=(0,i.markSelected)(e)),e},callback(o,s){const r=(0,i.checkSelectionBorders)(this,t);e.prepareBorder(s,t,r)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(55298);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},57951:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:top",name(){let e=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_BORDERS_TOP);return(0,i.checkSelectionBorders)(this,"top")&&(e=(0,i.markSelected)(e)),e},callback(t,o){const s=(0,i.checkSelectionBorders)(this,"top");e.prepareBorder(o,"top",s)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(55298);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},68849:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=o(36026),n=o(22232),a=o(68145),l=o(50095),h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=g(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),u=o(20216),d=o(55298),c=o(69167);function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(g=function(e){return e?o:t})(e)}function f(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function p(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const m=t.PLUGIN_KEY="customBorders",w=t.PLUGIN_PRIORITY=90;var C=new WeakSet,v=new WeakSet;class y extends r.BasePlugin{constructor(){super(...arguments),f(this,v),f(this,C),(0,i.default)(this,"savedBorders",[])}static get PLUGIN_KEY(){return m}static get PLUGIN_PRIORITY(){return w}isEnabled(){return!!this.hot.getSettings()[m]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>p(this,C,E).call(this,e))),this.addHook("init",(()=>p(this,v,S).call(this))),super.enablePlugin())}disablePlugin(){this.hideBorders(),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),super.updatePlugin()}setBorders(e,t){let o=["top","bottom","start","end"],s=null;t&&(this.checkSettingsCohesion([t]),o=Object.keys(t),s=(0,d.normalizeBorder)(t));const i=(0,c.detectSelectionType)(e),r=(0,c.normalizeSelectionFactory)(i,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)});(0,l.arrayEach)(e,(e=>{r(e).forAll(((e,t)=>{(0,l.arrayEach)(o,(o=>{this.prepareBorderFromCustomAdded(e,t,s,(0,d.toInlinePropName)(o))}))}))})),this.hot.view.render()}getBorders(e){if(!Array.isArray(e))return this.savedBorders;const t=(0,c.detectSelectionType)(e),o=(0,c.normalizeSelectionFactory)(t,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)}),s=[];return(0,l.arrayEach)(e,(e=>{o(e).forAll(((e,t)=>{(0,l.arrayEach)(this.savedBorders,(o=>{o.row===e&&o.col===t&&s.push((0,d.denormalizeBorder)(o))}))}))})),s}clearBorders(e){e?this.setBorders(e):((0,l.arrayEach)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange(),this.hot.removeCellMeta(e.row,e.col,"borders")})),this.savedBorders.length=0)}insertBorderIntoSettings(e,t){this.checkSavedBorders(e)||this.savedBorders.push(e);const o=this.hot._createCellRange(this.hot._createCellCoords(e.row,e.col));this.checkCustomSelections(e,o,t)||this.hot.selection.highlight.addCustomSelection({border:e,visualCellRange:o})}prepareBorderFromCustomAdded(e,t,o,s){const i=this.hot.countRows(),r=this.hot.countCols();if(e>=i||t>=r)return;let n=(0,d.createEmptyBorders)(e,t);o&&(n=(0,d.extendDefaultBorder)(n,o),(0,l.arrayEach)(this.hot.selection.highlight.customSelections,(e=>{if(n.id===e.settings.id)return Object.assign(e.settings,o),n.id=e.settings.id,n.top=e.settings.top,n.bottom=e.settings.bottom,n.start=e.settings.start,n.end=e.settings.end,!1}))),this.hot.setCellMeta(e,t,"borders",(0,d.denormalizeBorder)(n)),this.insertBorderIntoSettings(n,s)}prepareBorderFromCustomAddedRange(e,t){const o=Math.min(e.to.row,this.hot.countRows()-1),s=Math.min(e.to.col,this.hot.countCols()-1);(0,a.rangeEach)(e.from.row,o,(o=>{(0,a.rangeEach)(e.from.col,s,(s=>{const i=(0,d.createEmptyBorders)(o,s);let r=0;o===e.from.row&&(0,n.hasOwnProperty)(t,"top")&&(r+=1,i.top=t.top),o===e.to.row&&(0,n.hasOwnProperty)(t,"bottom")&&(r+=1,i.bottom=t.bottom),s===e.from.col&&(0,n.hasOwnProperty)(t,"start")&&(r+=1,i.start=t.start),s===e.to.col&&(0,n.hasOwnProperty)(t,"end")&&(r+=1,i.end=t.end),r>0&&(this.hot.setCellMeta(o,s,"borders",(0,d.denormalizeBorder)(i)),this.insertBorderIntoSettings(i))}))}))}removeAllBorders(e,t){const o=(0,d.createId)(e,t);this.spliceBorder(o),this.clearBordersFromSelectionSettings(o),this.clearNullCellRange(),this.hot.removeCellMeta(e,t,"borders")}setBorder(e,t,o,s){let i=this.hot.getCellMeta(e,t).borders;if(i=i&&void 0!==i.border?(0,d.normalizeBorder)(i):(0,d.createEmptyBorders)(e,t),s){i[o]=(0,d.createSingleEmptyBorder)();if(4===this.countHide(i))this.removeAllBorders(e,t);else{this.checkCustomSelectionsFromContextMenu(i,o,s)||this.insertBorderIntoSettings(i),this.hot.setCellMeta(e,t,"borders",(0,d.denormalizeBorder)(i))}}else{i[o]=(0,d.createDefaultCustomBorder)();this.checkCustomSelectionsFromContextMenu(i,o,s)||this.insertBorderIntoSettings(i),this.hot.setCellMeta(e,t,"borders",(0,d.denormalizeBorder)(i))}}prepareBorder(e,t,o){(0,l.arrayEach)(e,(e=>{let{start:s,end:i}=e;if(s.row===i.row&&s.col===i.col)"noBorders"===t?this.removeAllBorders(s.row,s.col):this.setBorder(s.row,s.col,t,o);else switch(t){case"noBorders":(0,a.rangeEach)(s.col,i.col,(e=>{(0,a.rangeEach)(s.row,i.row,(t=>{this.removeAllBorders(t,e)}))}));break;case"top":(0,a.rangeEach)(s.col,i.col,(e=>{this.setBorder(s.row,e,t,o)}));break;case"bottom":(0,a.rangeEach)(s.col,i.col,(e=>{this.setBorder(i.row,e,t,o)}));break;case"start":(0,a.rangeEach)(s.row,i.row,(e=>{this.setBorder(e,s.col,t,o)}));break;case"end":(0,a.rangeEach)(s.row,i.row,(e=>{this.setBorder(e,i.col,t,o)}))}}))}createCustomBorders(e){(0,l.arrayEach)(e,(e=>{const t=(0,d.normalizeBorder)(e);e.range?this.prepareBorderFromCustomAddedRange(e.range,t):this.prepareBorderFromCustomAdded(e.row,e.col,t)}))}countHide(e){const{top:t,bottom:o,start:s,end:i}=e,r=[t,o,s,i];return(0,l.arrayReduce)(r,((e,t)=>{let o=e;return t&&t.hide&&(o+=1),o}),0)}clearBordersFromSelectionSettings(e){const t=(0,l.arrayMap)(this.hot.selection.highlight.customSelections,(e=>e.settings.id)).indexOf(e);t>-1&&this.hot.selection.highlight.customSelections[t].clear()}clearNullCellRange(){(0,l.arrayEach)(this.hot.selection.highlight.customSelections,((e,t)=>{if(null===e.cellRange)return this.hot.selection.highlight.customSelections[t].destroy(),this.hot.selection.highlight.customSelections.splice(t,1),!1}))}hideBorders(){(0,l.arrayEach)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange()}))}spliceBorder(e){const t=(0,l.arrayMap)(this.savedBorders,(e=>e.id)).indexOf(e);t>-1&&this.savedBorders.splice(t,1)}checkSavedBorders(e){let t=!1;return 4===this.countHide(e)?(this.spliceBorder(e.id),t=!0):(0,l.arrayEach)(this.savedBorders,((o,s)=>{if(e.id===o.id)return this.savedBorders[s]=e,t=!0,!1})),t}checkCustomSelectionsFromContextMenu(e,t,o){let s=!1;return(0,l.arrayEach)(this.hot.selection.highlight.customSelections,(i=>{if(e.id===i.settings.id){const e=this.hot.view._wt.selectionManager.getBorderInstances(i);return(0,l.arrayEach)(e,(e=>{e.toggleHiddenClass(t,o)})),s=!0,!1}})),s}checkCustomSelections(e,t,o){const s=this.countHide(e);let i=!1;return 4===s?(this.removeAllBorders(e.row,e.col),i=!0):(0,l.arrayEach)(this.hot.selection.highlight.customSelections,(s=>{if(e.id===s.settings.id){if(s.visualCellRange=t,s.commit(),o){const t=this.hot.view._wt.selectionManager.getBorderInstances(s);(0,l.arrayEach)(t,(t=>{t.changeBorderStyle(o,e)}))}return i=!0,!1}})),i}changeBorderSettings(){const e=this.hot.getSettings()[m];if(Array.isArray(e)){const t=(0,n.deepClone)(e);this.checkSettingsCohesion(t),t.length||(this.savedBorders=t),this.createCustomBorders(t)}else void 0!==e&&this.createCustomBorders(this.savedBorders)}checkSettingsCohesion(e){const t=(0,d.hasLeftRightTypeOptions)(e),o=(0,d.hasStartEndTypeOptions)(e);if(t&&o)throw new Error('The "left"/"right" and "start"/"end" options should not be used together. Please use only the option "start"/"end".');if(this.hot.isRtl()&&t)throw new Error('The "left"/"right" properties are not supported for RTL. Please use option "start"/"end".')}destroy(){super.destroy()}}function E(e){this.hot.getSettings()[m]&&e.items.push({name:"---------"},{key:"borders",name(){return this.getTranslatedPhrase(h.CONTEXTMENU_ITEMS_BORDERS)},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||this.selection.isSelectedByCorner())},submenu:{items:[(0,u.top)(this),(0,u.right)(this),(0,u.bottom)(this),(0,u.left)(this),(0,u.noBorders)(this)]}})}function S(){this.changeBorderSettings()}t.CustomBorders=y},3455:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(68849);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.CustomBorders=s.CustomBorders},55298:(e,t,o)=>{"use strict";t.__esModule=!0,t.checkSelectionBorders=function(e,t){let o=!1;return(0,r.arrayEach)(e.getSelectedRange(),(i=>{i.forAll(((i,r)=>{if(i<0||r<0)return;const n=e.getCellMeta(i,r).borders;if(n){if(!t)return o=!0,!1;if(!(0,s.hasOwnProperty)(n[t],"hide")||!1===n[t].hide)return o=!0,!1}}))})),o},t.createDefaultCustomBorder=a,t.createDefaultHtBorder=h,t.createEmptyBorders=function(e,t){return{id:n(e,t),border:{width:1,color:"#000",cornerVisible:!1},row:e,col:t,top:{hide:!0},bottom:{hide:!0},start:{hide:!0},end:{hide:!0}}},t.createId=n,t.createSingleEmptyBorder=l,t.denormalizeBorder=function(e){(0,i.isDefined)(e.start)&&(e.left=e.start);(0,i.isDefined)(e.end)&&(e.right=e.end);return e},t.extendDefaultBorder=function(e,t){(0,s.hasOwnProperty)(t,"border")&&t.border&&(e.border=t.border);(0,s.hasOwnProperty)(t,"top")&&(0,i.isDefined)(t.top)&&(t.top?((0,s.isObject)(t.top)||(t.top={width:1,color:"#000"}),e.top=t.top):(t.top={hide:!0},e.top=t.top));(0,s.hasOwnProperty)(t,"bottom")&&(0,i.isDefined)(t.bottom)&&(t.bottom?((0,s.isObject)(t.bottom)||(t.bottom={width:1,color:"#000"}),e.bottom=t.bottom):(t.bottom={hide:!0},e.bottom=t.bottom));(0,s.hasOwnProperty)(t,"start")&&(0,i.isDefined)(t.start)&&(t.start?((0,s.isObject)(t.start)||(t.start={width:1,color:"#000"}),e.start=t.start):(t.start={hide:!0},e.start=t.start));(0,s.hasOwnProperty)(t,"end")&&(0,i.isDefined)(t.end)&&(t.end?((0,s.isObject)(t.end)||(t.end={width:1,color:"#000"}),e.end=t.end):(t.end={hide:!0},e.end=t.end));return e},t.hasLeftRightTypeOptions=function(e){return e.some((e=>(0,i.isDefined)(e.left)||(0,i.isDefined)(e.right)))},t.hasStartEndTypeOptions=function(e){return e.some((e=>(0,i.isDefined)(e.start)||(0,i.isDefined)(e.end)))},t.markSelected=function(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`},t.normalizeBorder=function(e){var t,o;((0,i.isDefined)(e.start)||(0,i.isDefined)(e.left))&&(e.start=null!==(t=e.start)&&void 0!==t?t:e.left);((0,i.isDefined)(e.end)||(0,i.isDefined)(e.right))&&(e.end=null!==(o=e.end)&&void 0!==o?o:e.right);return delete e.left,delete e.right,e},t.toInlinePropName=function(e){var t;return null!==(t=u.get(e))&&void 0!==t?t:e};var s=o(22232),i=o(93315),r=o(50095);function n(e,t){return`border_row${e}col${t}`}function a(){return{width:1,color:"#000"}}function l(){return{hide:!0}}function h(){return{width:1,color:"#000",cornerVisible:!1}}const u=new Map([["left","start"],["right","end"]])},49276:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(36026),n=o(24449),a=o(83302);function l(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function h(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const u=t.PLUGIN_KEY="dragToScroll",d=t.PLUGIN_PRIORITY=100;var c=new WeakSet;class g extends r.BasePlugin{constructor(){super(...arguments),l(this,c),(0,i.default)(this,"boundaries",null),(0,i.default)(this,"callback",null),(0,i.default)(this,"listening",!1)}static get PLUGIN_KEY(){return u}static get PLUGIN_PRIORITY(){return d}isEnabled(){return!!this.hot.getSettings()[u]}enablePlugin(){this.enabled||(this.addHook("afterOnCellMouseDown",(e=>h(this,c,f).call(this,e))),this.addHook("afterOnCellCornerMouseDown",(e=>h(this,c,f).call(this,e))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.unregisterEvents(),super.disablePlugin()}setBoundaries(e){this.boundaries=e}setCallback(e){this.callback=e}check(e,t){let o=0,s=0;t<this.boundaries.top?s=t-this.boundaries.top:t>this.boundaries.bottom&&(s=t-this.boundaries.bottom),e<this.boundaries.left?o=e-this.boundaries.left:e>this.boundaries.right&&(o=e-this.boundaries.right),this.callback(o,s)}listen(){this.listening=!0}unlisten(){this.listening=!1}isListening(){return this.listening}registerEvents(){const{rootWindow:e}=this.hot;let t=e;for(;t;)this.eventManager.addEventListener(t.document,"contextmenu",(()=>this.unlisten())),this.eventManager.addEventListener(t.document,"mouseup",(()=>this.unlisten())),this.eventManager.addEventListener(t.document,"mousemove",(e=>this.onMouseMove(e))),t=(0,a.getParentWindow)(t)}unregisterEvents(){this.eventManager.clear()}onMouseMove(e){this.isListening()&&this.check(e.clientX,e.clientY)}destroy(){super.destroy()}}function f(e){if((0,n.isRightClick)(e))return;const t=this.hot.view._wt.wtTable.holder;t!==this.hot.rootWindow&&(this.setBoundaries(t.getBoundingClientRect()),this.setCallback(((e,o)=>{e<0?t.scrollLeft-=50:e>0&&(t.scrollLeft+=50),o<0?t.scrollTop-=20:o>0&&(t.scrollTop+=20)})),this.listen())}t.DragToScroll=g},72919:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(49276);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.DragToScroll=s.DragToScroll},21894:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(36026),n=o(50095),a=o(22232),l=o(26514),h=o(80734),u=o(83302),d=o(40255),c=o(90437),g=s(o(56307)),f=o(90500);o(59456);var p=o(5386);function m(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function w(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}g.default.getSingleton().register("afterDropdownMenuDefaultOptions"),g.default.getSingleton().register("beforeDropdownMenuShow"),g.default.getSingleton().register("afterDropdownMenuShow"),g.default.getSingleton().register("afterDropdownMenuHide"),g.default.getSingleton().register("afterDropdownMenuExecute");const C=t.PLUGIN_KEY="dropdownMenu",v=t.PLUGIN_PRIORITY=230,y="changeType",E=C;var S=new WeakSet,R=new WeakSet,b=new WeakSet,_=new WeakSet,T=new WeakSet,O=new WeakSet,M=new WeakSet;class I extends r.BasePlugin{static get PLUGIN_KEY(){return C}static get PLUGIN_PRIORITY(){return v}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[f.COLUMN_LEFT,f.COLUMN_RIGHT,f.SEPARATOR,f.REMOVE_COLUMN,f.SEPARATOR,f.CLEAR_COLUMN,f.SEPARATOR,f.READ_ONLY,f.SEPARATOR,f.ALIGNMENT]}constructor(e){super(e),m(this,M),m(this,O),m(this,T),m(this,_),m(this,b),m(this,R),m(this,S),(0,i.default)(this,"commandExecutor",new l.CommandExecutor(this.hot)),(0,i.default)(this,"itemsFactory",null),(0,i.default)(this,"menu",null),this.hot.addHook("afterGetColHeader",((e,t)=>w(this,b,P).call(this,e,t)))}isEnabled(){return this.hot.getSettings()[C]}enablePlugin(){var e=this;if(this.enabled)return;this.itemsFactory=new d.ItemsFactory(this.hot,I.DEFAULT_ITEMS);const t=this.hot.getSettings()[C],o={items:this.itemsFactory.getItems(t)};this.registerEvents(),"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.registerShortcuts(),super.enablePlugin(),this.callOnPluginsReady((()=>{this.hot.runHooks("afterDropdownMenuDefaultOptions",o),this.itemsFactory.setPredefinedItems(o.items);const s=this.itemsFactory.getItems(t);this.menu&&this.menu.destroy(),this.menu=new c.Menu(this.hot,{className:"htDropdownMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.hot.runHooks("beforeDropdownMenuSetItems",s),this.menu.setMenuItems(s),this.menu.addLocalHook("beforeOpen",(()=>w(this,_,x).call(this))),this.menu.addLocalHook("afterOpen",(()=>w(this,T,H).call(this))),this.menu.addLocalHook("afterSubmenuOpen",(e=>w(this,O,k).call(this,e))),this.menu.addLocalHook("afterClose",(()=>w(this,M,D).call(this))),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.executeCommand.call(e,...o)})),(0,n.arrayEach)(s,(e=>this.commandExecutor.registerCommand(e.key,e)))}))}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&this.menu.destroy(),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=()=>{const{highlight:e}=this.hot.getSelectedRangeLast();if((e.isHeader()&&-1===e.row||e.isCell())&&e.col>=0){this.hot.selectColumns(e.col,e.col,-1);const{from:t}=this.hot.getSelectedRangeLast(),o=(0,h.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument),s=this.hot.getCell(-1,t.col,!0),i=s.getBoundingClientRect();this.open({left:i.left+o.left,top:i.top+s.offsetHeight+o.top},{left:i.width}),this.menu.getNavigator().toFirstItem()}};this.hot.getShortcutManager().getContext("grid").addShortcuts([{keys:[["Shift","Alt","ArrowDown"],["Control/Meta","Enter"]],callback:e,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()&&!this.menu.isOpened()},captureCtrl:!0,group:E},{keys:[["Shift","Alt","ArrowDown"]],callback:e,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isCell()&&!this.menu.isOpened()},group:E}])}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(E)}registerEvents(){this.eventManager.addEventListener(this.hot.rootElement,"click",(e=>w(this,R,A).call(this,e)))}open(e){var t;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(t=this.menu)&&void 0!==t&&t.isOpened()||(this.menu.open(),(0,a.objectEach)(o,((e,t)=>{this.menu.setOffset(t,e)})),this.menu.setPosition(e))}close(){var e;null===(e=this.menu)||void 0===e||e.close()}executeCommand(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];this.commandExecutor.execute(e,...o)}setListening(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.menu.isOpened()&&(e?this.menu.hotMenu.listen():this.menu.hotMenu.unlisten())}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function N(e){e.getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Control/Meta","A"]],callback:()=>!1}])}function A(e){if(e.stopPropagation(),(0,u.hasClass)(e.target,y)){const t=(0,h.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument),o=e.target.getBoundingClientRect();this.open({left:o.left+t.left,top:o.top+e.target.offsetHeight+3+t.top},{left:o.width})}}function P(e,t){const o=t.parentNode;if(!o)return;const s=o.parentNode.childNodes,i=Array.prototype.indexOf.call(s,o);if(e<0||i!==s.length-1)return;const r=t.querySelector(`.${y}`);if(this.enabled&&r)return;if(!this.enabled)return void(r&&r.parentNode.removeChild(r));const n=this.hot.rootDocument.createElement("button");n.className=y,n.type="button",n.tabIndex=-1,this.hot.getSettings().ariaTags&&((0,u.setAttribute)(n,[(0,p.A11Y_HIDDEN)(),(0,p.A11Y_LABEL)(" ")]),(0,u.setAttribute)(t,[(0,p.A11Y_HASPOPUP)("menu")])),n.onclick=function(){return!1},t.firstChild.insertBefore(n,t.firstChild.firstChild)}function x(){this.hot.runHooks("beforeDropdownMenuShow",this)}function H(){this.hot.runHooks("afterDropdownMenuShow",this),w(this,S,N).call(this,this.menu)}function k(e){w(this,S,N).call(this,e)}function D(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}t.DropdownMenu=I,I.SEPARATOR={name:f.SEPARATOR}},74123:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(21894);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.DropdownMenu=s.DropdownMenu},14682:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(68145);t.default=class{constructor(e){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"options",{}),this.hot=e}setOptions(e){this.options=e}getData(){const{startRow:e,startCol:t,endRow:o,endCol:s}=this._getDataRange(),i=this.options,n=[];return(0,r.rangeEach)(e,o,(e=>{const o=[];!i.exportHiddenRows&&this._isHiddenRow(e)||((0,r.rangeEach)(t,s,(t=>{!i.exportHiddenColumns&&this._isHiddenColumn(t)||o.push(this.hot.getDataAtCell(e,t))})),n.push(o))})),n}getRowHeaders(){const e=[];if(this.options.rowHeaders){const{startRow:t,endRow:o}=this._getDataRange(),s=this.hot.getRowHeader();(0,r.rangeEach)(t,o,(t=>{!this.options.exportHiddenRows&&this._isHiddenRow(t)||e.push(s[t])}))}return e}getColumnHeaders(){const e=[];if(this.options.columnHeaders){const{startCol:t,endCol:o}=this._getDataRange(),s=this.hot.getColHeader();(0,r.rangeEach)(t,o,(t=>{!this.options.exportHiddenColumns&&this._isHiddenColumn(t)||e.push(s[t])}))}return e}_getDataRange(){const e=this.hot.countCols()-1,t=this.hot.countRows()-1;let[o=0,s=0,i=t,r=e]=this.options.range;return o=Math.max(o,0),s=Math.max(s,0),i=Math.min(i,t),r=Math.min(r,e),{startRow:o,startCol:s,endRow:i,endCol:r}}_isHiddenRow(e){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(e))}_isHiddenColumn(e){return this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(e))}}},59589:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=o(36026),r=s(o(14682)),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=a(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(17395));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(a=function(e){return e?o:t})(e)}const l=t.PLUGIN_KEY="exportFile",h=t.PLUGIN_PRIORITY=240;class u extends i.BasePlugin{static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return h}isEnabled(){return!0}exportAsString(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createTypeFormatter(e,t).export()}exportAsBlob(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createBlob(this._createTypeFormatter(e,t))}downloadFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{rootDocument:o,rootWindow:s}=this.hot,i=this._createTypeFormatter(e,t),r=this._createBlob(i),n=s.URL||s.webkitURL,a=o.createElement("a"),l=`${i.options.filename}.${i.options.fileExtension}`;if(void 0!==a.download){const e=n.createObjectURL(r);a.style.display="none",a.setAttribute("href",e),a.setAttribute("download",l),o.body.appendChild(a),a.dispatchEvent(new MouseEvent("click")),o.body.removeChild(a),setTimeout((()=>{n.revokeObjectURL(e)}),100)}else navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob(r,l)}_createTypeFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!n.EXPORT_TYPES[e])throw new Error(`Export format type "${e}" is not supported.`);return(0,n.default)(e,new r.default(this.hot),t)}_createBlob(e){let t=null;return"undefined"!=typeof Blob&&(t=new Blob([e.export()],{type:`${e.options.mimeType};charset=${e.options.encoding}`})),t}}t.ExportFile=u},83281:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(59589);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ExportFile=s.ExportFile},17395:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.default=function(e,t,o){if("function"==typeof n[e])return new n[e](t,o);return null};var i=s(o(13322));const r=t.TYPE_CSV="csv",n=(t.TYPE_EXCEL="excel",t.TYPE_PDF="pdf",t.EXPORT_TYPES={[r]:i.default})},96186:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(22232),n=o(18609);class a{static get DEFAULT_OPTIONS(){return{mimeType:"text/plain",fileExtension:"txt",filename:"Handsontable [YYYY]-[MM]-[DD]",encoding:"utf-8",bom:!1,columnHeaders:!1,rowHeaders:!1,exportHiddenColumns:!1,exportHiddenRows:!1,range:[]}}constructor(e,t){(0,i.default)(this,"dataProvider",void 0),(0,i.default)(this,"options",void 0),this.dataProvider=e,this.options=this._mergeOptions(t),this.dataProvider.setOptions(this.options)}_mergeOptions(e){let t=(0,r.clone)(this.constructor.DEFAULT_OPTIONS);const o=new Date;return t=(0,r.extend)((0,r.clone)(a.DEFAULT_OPTIONS),t),t=(0,r.extend)(t,e),t.filename=(0,n.substitute)(t.filename,{YYYY:o.getFullYear(),MM:`${o.getMonth()+1}`.padStart(2,"0"),DD:`${o.getDate()}`.padStart(2,"0")}),t}}t.default=a},13322:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=o(50095),r=o(93315),n=s(o(96186));const a=String.fromCharCode(13),l=String.fromCharCode(34),h=String.fromCharCode(10);class u extends n.default{static get DEFAULT_OPTIONS(){return{mimeType:"text/csv",fileExtension:"csv",bom:!0,columnDelimiter:",",rowDelimiter:"\r\n"}}export(){const e=this.options,t=this.dataProvider.getData();let o=this.dataProvider.getColumnHeaders();const s=o.length>0,r=this.dataProvider.getRowHeaders(),n=r.length>0;let a=e.bom?String.fromCharCode(65279):"";return s&&(o=(0,i.arrayMap)(o,(e=>this._escapeCell(e,!0))),n&&(a+=e.columnDelimiter),a+=o.join(e.columnDelimiter),a+=e.rowDelimiter),(0,i.arrayEach)(t,((t,o)=>{o>0&&(a+=e.rowDelimiter),n&&(a+=this._escapeCell(r[o])+e.columnDelimiter),a+=t.map((e=>this._escapeCell(e))).join(e.columnDelimiter)})),a}_escapeCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=(0,r.stringify)(e);return""!==o&&(t||o.indexOf(a)>=0||o.indexOf(l)>=0||o.indexOf(h)>=0||o.indexOf(this.options.columnDelimiter)>=0)&&(o=o.replace(new RegExp('"',"g"),'""'),o=`"${o}"`),o}}t.default=u},96817:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(50095),n=o(22232),a=s(o(65718)),l=o(33165);class h{constructor(e,t){let{id:o,stateless:s=!0}=t;(0,i.default)(this,"hot",void 0),(0,i.default)(this,"id",void 0),(0,i.default)(this,"elements",[]),(0,i.default)(this,"hidden",!1),(0,i.default)(this,"stateId",""),(0,i.default)(this,"state",void 0),this.hot=e,this.id=o,this.stateId=`Filters.component.${this.id}`,this.state=s?null:this.hot.columnIndexMapper.registerMap(this.stateId,new l.LinkedPhysicalIndexToValueMap)}getElements(){return this.elements}reset(){(0,r.arrayEach)(this.elements,(e=>e.reset()))}hide(){this.hidden=!0}show(){this.hidden=!1}isHidden(){return null===this.hot||this.hidden}restoreState(e){this.state&&this.setState(this.state.getValueAtIndex(e))}setState(){throw new Error("The state setting logic is not implemented")}saveState(e){this.state&&this.state.setValueAtIndex(e,this.getState())}getState(){throw new Error("The state gathering logic is not implemented")}destroy(){this.hot.columnIndexMapper.unregisterMap(this.stateId),this.clearLocalHooks(),(0,r.arrayEach)(this.elements,(e=>e.destroy())),this.state=null,this.elements=null,this.hot=null}}t.BaseComponent=h,(0,n.mixin)(h,a.default)},78873:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i,r=s(o(93231)),n=o(83302),a=o(50095),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=d(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),h=o(96817),u=o(79857);function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(d=function(e){return e?o:t})(e)}function c(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}var g=new WeakSet;class f extends h.BaseComponent{static get BUTTON_OK(){return"ok"}static get BUTTON_CANCEL(){return"cancel"}constructor(e,t){super(e,{id:t.id,stateless:!0}),c(this,g),(0,r.default)(this,"name",""),this.name=t.name,this.elements.push(new u.InputUI(this.hot,{type:"button",value:l.FILTERS_BUTTONS_OK,className:"htUIButton htUIButtonOK",identifier:f.BUTTON_OK})),this.elements.push(new u.InputUI(this.hot,{type:"button",value:l.FILTERS_BUTTONS_CANCEL,className:"htUIButton htUIButtonCancel",identifier:f.BUTTON_CANCEL})),this.registerHooks()}registerHooks(){(0,a.arrayEach)(this.elements,(e=>{e.addLocalHook("click",((e,t)=>function(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}(this,g,p).call(this,e,t)))}))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>((0,n.addClass)(t.parentNode,"htFiltersMenuActionBar"),(0,a.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t)}}accept(){this.runLocalHooks("accept")}cancel(){this.runLocalHooks("cancel")}}function p(e,t){t.options.identifier===i.BUTTON_OK?this.accept():this.cancel()}t.ActionBarComponent=f,i=f},17209:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=o(83302),n=o(24449),a=o(50095),l=o(80151),h=o(22232),u=w(o(77516)),d=o(96817),c=w(o(97160)),g=o(79857),f=o(44854),p=o(53407);function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(m=function(e){return e?o:t})(e)}function w(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=m(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}function C(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function v(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var y=new WeakSet,E=new WeakSet;class S extends d.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),C(this,E),C(this,y),(0,i.default)(this,"name",""),(0,i.default)(this,"addSeparator",!1),this.name=t.name,this.addSeparator=t.addSeparator,this.elements.push(new f.SelectUI(this.hot,{menuContainer:t.menuContainer})),this.elements.push(new g.InputUI(this.hot,{placeholder:u.FILTERS_BUTTONS_PLACEHOLDER_VALUE})),this.elements.push(new g.InputUI(this.hot,{placeholder:u.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE})),this.registerHooks()}registerHooks(){this.getSelectElement().addLocalHook("select",(e=>v(this,y,R).call(this,e))).addLocalHook("afterClose",(()=>this.runLocalHooks("afterClose"))).addLocalHook("tabKeydown",(e=>this.runLocalHooks("selectTabKeydown",e))),(0,a.arrayEach)(this.getInputElements(),(e=>{e.addLocalHook("keydown",(e=>v(this,E,b).call(this,e)))}))}setState(e){if(this.reset(),!e)return;const t=(0,h.clone)(e.command);t.name.startsWith(u.FILTERS_CONDITIONS_NAMESPACE)&&(t.name=this.hot.getTranslatedPhrase(t.name)),this.getSelectElement().setValue(t),(0,a.arrayEach)(e.args,((e,o)=>{if(o>t.inputsCount-1)return!1;const s=this.getInputElement(o);s.setValue(e),s[t.inputsCount>o?"show":"hide"](),o||this.hot._registerTimeout((()=>s.focus()),10)}))}getState(){const e=this.getSelectElement().getValue()||(0,p.getConditionDescriptor)(c.CONDITION_NONE),t=[];return(0,a.arrayEach)(this.getInputElements(),((o,s)=>{e.inputsCount>s&&t.push(o.getValue())})),{command:e,args:t}}updateState(e,t){const o=e?(0,p.getConditionDescriptor)(e.name):(0,p.getConditionDescriptor)(c.CONDITION_NONE);this.state.setValueAtIndex(t,{command:o,args:e?e.args:[]}),e||(0,a.arrayEach)(this.getInputElements(),(e=>e.setValue(null)))}getSelectElement(){return this.elements.filter((e=>e instanceof f.SelectUI))[0]}getInputElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.getInputElements()[e]}getInputElements(){return this.elements.filter((e=>e instanceof g.InputUI))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,o,s,i,n)=>{(0,r.addClass)(t.parentNode,"htFiltersMenuCondition"),this.addSeparator&&(0,r.addClass)(t.parentNode,"border");const l=this.hot.rootDocument.createElement("div");return(0,r.addClass)(l,"htFiltersMenuLabel"),l.textContent=n,t.appendChild(l),(0,a.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t}}}reset(){const e=this.hot.getPlugin("filters").getSelectedColumn();let t=[(0,p.getConditionDescriptor)(c.CONDITION_NONE)];if(null!==e){const{visualIndex:o}=e;t=(0,c.default)(this.hot.getDataType(0,o,this.hot.countRows(),o))}(0,a.arrayEach)(this.getInputElements(),(e=>e.hide())),this.getSelectElement().setItems(t),super.reset(),this.getSelectElement().setValue(t[0])}}function R(e){(0,a.arrayEach)(this.getInputElements(),((t,o)=>{t[e.inputsCount>o?"show":"hide"](),0===o&&this.hot._registerTimeout((()=>t.focus()),10)})),this.runLocalHooks("change",e)}function b(e){(0,l.isKey)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,n.stopImmediatePropagation)(e))}t.ConditionComponent=S},3246:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=o(83302),n=o(50095),a=o(28236),l=o(96817),h=o(74607),u=o(97413),d=o(60171),c=o(63462),g=o(87255);function f(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}var p=new WeakSet;class m extends l.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),f(this,p),(0,i.default)(this,"name",""),this.name=t.name,this.buildOperatorsElement()}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>((0,r.addClass)(t.parentNode,"htFiltersMenuOperators"),(0,n.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t)}}buildOperatorsElement(){const e=[u.OPERATION_ID,d.OPERATION_ID];(0,n.arrayEach)(e,(t=>{const o=new g.RadioInputUI(this.hot,{name:"operator",label:{htmlFor:t,textContent:(0,h.getOperationName)(t)},value:t,checked:t===e[0],id:t});o.addLocalHook("change",(e=>function(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}(this,p,w).call(this,e))),this.elements.push(o)}))}setChecked(e){if(this.elements.length<e)throw Error(a.toSingleLine`Radio button with index ${e} doesn't exist.`);(0,n.arrayEach)(this.elements,((t,o)=>{t.setChecked(o===e)}))}getActiveOperationId(){const e=this.elements.find((e=>e instanceof g.RadioInputUI&&e.isChecked()));return e?e.getValue():u.OPERATION_ID}getState(){return this.getActiveOperationId()}setState(e){this.reset(),e&&this.getActiveOperationId()!==e&&(0,n.arrayEach)(this.elements,(t=>{t.setChecked(t.getValue()===e)}))}updateState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.OPERATION_ID,t=arguments.length>1?arguments[1]:void 0,o=e;o===c.OPERATION_ID&&(o=d.OPERATION_ID),this.state.setValueAtIndex(t,o)}reset(){this.setChecked(0)}}function w(e){this.setState(e.target.value)}t.OperatorsComponent=m},6379:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=o(83302),n=o(24449),a=o(50095),l=o(80151),h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=p(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),u=o(94427),d=o(96817),c=o(89409),g=o(97160),f=o(53407);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(p=function(e){return e?o:t})(e)}function m(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}var w=new WeakSet;class C extends d.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),m(this,w),(0,i.default)(this,"name",""),this.name=t.name,this.elements.push(new c.MultipleSelectUI(this.hot)),this.registerHooks()}registerHooks(){this.getMultipleSelectElement().addLocalHook("keydown",(e=>function(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}(this,w,v).call(this,e))).addLocalHook("listTabKeydown",(e=>this.runLocalHooks("listTabKeydown",e)))}getElements(){const e=this.getMultipleSelectElement();return[e.getSearchInputElement(),e.getSelectAllElement(),e.getClearAllElement(),this.getMultipleSelectElement()]}setState(e){if(this.reset(),e&&e.command.key===g.CONDITION_BY_VALUE){const t=this.getMultipleSelectElement();t.setItems(e.itemsSnapshot),t.setValue(e.args[0]),t.setLocale(e.locale)}}getState(){const e=this.getMultipleSelectElement(),t=e.getItems();return{command:{key:e.isSelectedAllValues()||!t.length?g.CONDITION_NONE:g.CONDITION_BY_VALUE},args:[e.getValue()],itemsSnapshot:t}}updateState(e){const t=(t,o,s,i,r)=>{const[n]=(0,a.arrayFilter)(o,(e=>e.name===g.CONDITION_BY_VALUE)),l={},d=this.hot.getTranslatedPhrase(h.FILTERS_VALUES_BLANK_CELLS);if(n){const o=(0,u.unifyColumnValues)((0,a.arrayMap)(i(t,r),(e=>e.value)));s&&(n.args[0]=s);const h=[],c=(0,u.intersectValues)(o,n.args[0],d,(e=>{e.checked&&h.push(e.value)})),p=e.editedConditionStack.column;l.locale=this.hot.getCellMeta(0,p).locale,l.args=[h],l.command=(0,f.getConditionDescriptor)(g.CONDITION_BY_VALUE),l.itemsSnapshot=c}else l.args=[],l.command=(0,f.getConditionDescriptor)(g.CONDITION_NONE);this.state.setValueAtIndex(t,l)};t(e.editedConditionStack.column,e.editedConditionStack.conditions,e.conditionArgsChange,e.filteredRowsFactory),e.dependentConditionStacks.length&&t(e.dependentConditionStacks[0].column,e.dependentConditionStacks[0].conditions,e.conditionArgsChange,e.filteredRowsFactory,e.editedConditionStack)}getMultipleSelectElement(){return this.elements.filter((e=>e instanceof c.MultipleSelectUI))[0]}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,o,s,i,n)=>{(0,r.addClass)(t.parentNode,"htFiltersMenuValue");const l=this.hot.rootDocument.createElement("div");return(0,r.addClass)(l,"htFiltersMenuLabel"),l.textContent=n,t.appendChild(l),(0,a.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t}}}reset(){const e=this.hot.getTranslatedPhrase(h.FILTERS_VALUES_BLANK_CELLS),t=(0,u.unifyColumnValues)(this._getColumnVisibleValues()),o=(0,u.intersectValues)(t,t,e);this.getMultipleSelectElement().setItems(o),super.reset(),this.getMultipleSelectElement().setValue(t);const s=this.hot.getPlugin("filters").getSelectedColumn();null!==s&&this.getMultipleSelectElement().setLocale(this.hot.getCellMeta(0,s.visualIndex).locale)}_getColumnVisibleValues(){const e=this.hot.getPlugin("filters").getSelectedColumn();return null===e?[]:(0,a.arrayMap)(this.hot.getDataAtCol(e.visualIndex),(e=>(0,u.toEmptyString)(e)))}}function v(e){(0,l.isKey)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,n.stopImmediatePropagation)(e))}t.ValueComponent=C},81773:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(93315),r=o(53407);function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="begins_with";function l(e,t){let[o]=t;return(0,i.stringify)(e.value).toLocaleLowerCase(e.meta.locale).startsWith((0,i.stringify)(o))}(0,r.registerCondition)(a,l,{name:s.FILTERS_CONDITIONS_BEGINS_WITH,inputsCount:1,showOperators:!0})},31644:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=h;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=a(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407),r=o(67444),n=o(26189);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(a=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="between";function h(e,t){let[o,s]=t,a=o,l=s;if("numeric"===e.meta.type){const e=parseFloat(a,10),t=parseFloat(l,10);a=Math.min(e,t),l=Math.max(e,t)}else if("date"===e.meta.type){const t=(0,i.getCondition)(n.CONDITION_NAME,[l]),o=(0,i.getCondition)(r.CONDITION_NAME,[a]);return t(e)&&o(e)}return e.value>=a&&e.value<=l}(0,i.registerCondition)(l,h,{name:s.FILTERS_CONDITIONS_BETWEEN,inputsCount:2,showOperators:!0})},7765:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=n;var s=o(53407),i=o(94427);const r=t.CONDITION_NAME="by_value";function n(e,t){let[o]=t;return o(e.value)}(0,s.registerCondition)(r,n,{name:"By value",inputsCount:0,inputValuesDecorator(e){let[t]=e;return[(0,i.createArrayAssertion)(t)]},showOperators:!1})},88199:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(93315),r=o(53407);function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="contains";function l(e,t){let[o]=t;return(0,i.stringify)(e.value).toLocaleLowerCase(e.meta.locale).indexOf((0,i.stringify)(o))>=0}(0,r.registerCondition)(a,l,{name:s.FILTERS_CONDITIONS_CONTAINS,inputsCount:1,showOperators:!0})},67444:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.condition=h;var i=s(o(33034)),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=a(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),n=o(53407);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(a=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="date_after";function h(e,t){let[o]=t;const s=(0,i.default)(e.value,e.meta.dateFormat),r=(0,i.default)(o,e.meta.dateFormat);return!(!s.isValid()||!r.isValid())&&s.diff(r)>=0}(0,n.registerCondition)(l,h,{name:r.FILTERS_CONDITIONS_AFTER,inputsCount:1,showOperators:!0})},26189:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.condition=h;var i=s(o(33034)),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=a(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),n=o(53407);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(a=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="date_before";function h(e,t){let[o]=t;const s=(0,i.default)(e.value,e.meta.dateFormat),r=(0,i.default)(o,e.meta.dateFormat);return!(!s.isValid()||!r.isValid())&&s.diff(r)<=0}(0,n.registerCondition)(l,h,{name:r.FILTERS_CONDITIONS_BEFORE,inputsCount:1,showOperators:!0})},960:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.condition=h;var i=s(o(33034)),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=a(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),n=o(53407);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(a=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="date_today";function h(e){const t=(0,i.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,i.default)().startOf("day"),"d")}(0,n.registerCondition)(l,h,{name:r.FILTERS_CONDITIONS_TODAY,inputsCount:0})},98756:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.condition=h;var i=s(o(33034)),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=a(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),n=o(53407);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(a=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="date_tomorrow";function h(e){const t=(0,i.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,i.default)().subtract(-1,"days").startOf("day"),"d")}(0,n.registerCondition)(l,h,{name:r.FILTERS_CONDITIONS_TOMORROW,inputsCount:0})},74467:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.condition=h;var i=s(o(33034)),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=a(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),n=o(53407);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(a=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="date_yesterday";function h(e){const t=(0,i.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,i.default)().subtract(1,"days").startOf("day"),"d")}(0,n.registerCondition)(l,h,{name:r.FILTERS_CONDITIONS_YESTERDAY,inputsCount:0})},668:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407),r=o(93315);function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="empty";function l(e){return(0,r.isEmpty)(e.value)}(0,i.registerCondition)(a,l,{name:s.FILTERS_CONDITIONS_EMPTY,inputsCount:0,showOperators:!0})},49030:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(93315),r=o(53407);function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="ends_with";function l(e,t){let[o]=t;return(0,i.stringify)(e.value).toLocaleLowerCase(e.meta.locale).endsWith((0,i.stringify)(o))}(0,r.registerCondition)(a,l,{name:s.FILTERS_CONDITIONS_ENDS_WITH,inputsCount:1,showOperators:!0})},43741:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(93315),r=o(53407);function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="eq";function l(e,t){let[o]=t;return(0,i.stringify)(e.value).toLocaleLowerCase(e.meta.locale)===(0,i.stringify)(o)}(0,r.registerCondition)(a,l,{name:s.FILTERS_CONDITIONS_EQUAL,inputsCount:1,showOperators:!0})},47003:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=r;var s=o(53407);const i=t.CONDITION_NAME="false";function r(){return!1}(0,s.registerCondition)(i,r,{name:"False"})},87941:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const n=t.CONDITION_NAME="gt";function a(e,t){let[o]=t,s=o;return"numeric"===e.meta.type&&(s=parseFloat(s,10)),e.value>s}(0,i.registerCondition)(n,a,{name:s.FILTERS_CONDITIONS_GREATER_THAN,inputsCount:1,showOperators:!0})},45980:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const n=t.CONDITION_NAME="gte";function a(e,t){let[o]=t,s=o;return"numeric"===e.meta.type&&(s=parseFloat(s,10)),e.value>=s}(0,i.registerCondition)(n,a,{name:s.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL,inputsCount:1,showOperators:!0})},9561:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const n=t.CONDITION_NAME="lt";function a(e,t){let[o]=t,s=o;return"numeric"===e.meta.type&&(s=parseFloat(s,10)),e.value<s}(0,i.registerCondition)(n,a,{name:s.FILTERS_CONDITIONS_LESS_THAN,inputsCount:1,showOperators:!0})},8201:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const n=t.CONDITION_NAME="lte";function a(e,t){let[o]=t,s=o;return"numeric"===e.meta.type&&(s=parseFloat(s,10)),e.value<=s}(0,i.registerCondition)(n,a,{name:s.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL,inputsCount:1,showOperators:!0})},14757:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const n=t.CONDITION_NAME="none";function a(){return!0}(0,i.registerCondition)(n,a,{name:s.FILTERS_CONDITIONS_NONE,inputsCount:0,showOperators:!1})},16e3:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407),r=o(31644);function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="not_between";function l(e,t){return!(0,i.getCondition)(r.CONDITION_NAME,t)(e)}(0,i.registerCondition)(a,l,{name:s.FILTERS_CONDITIONS_NOT_BETWEEN,inputsCount:2,showOperators:!0})},10884:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407),r=o(88199);function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="not_contains";function l(e,t){return!(0,i.getCondition)(r.CONDITION_NAME,t)(e)}(0,i.registerCondition)(a,l,{name:s.FILTERS_CONDITIONS_NOT_CONTAIN,inputsCount:1,showOperators:!0})},33337:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407),r=o(668);function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="not_empty";function l(e,t){return!(0,i.getCondition)(r.CONDITION_NAME,t)(e)}(0,i.registerCondition)(a,l,{name:s.FILTERS_CONDITIONS_NOT_EMPTY,inputsCount:0,showOperators:!0})},67229:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407),r=o(43741);function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="neq";function l(e,t){return!(0,i.getCondition)(r.CONDITION_NAME,t)(e)}(0,i.registerCondition)(a,l,{name:s.FILTERS_CONDITIONS_NOT_EQUAL,inputsCount:1,showOperators:!0})},49807:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=r;var s=o(53407);const i=t.CONDITION_NAME="true";function r(){return!0}(0,s.registerCondition)(i,r,{name:"True"})},20833:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=o(50095),n=o(22232),a=o(28236),l=s(o(65718)),h=o(53407),u=o(97413),d=o(74607),c=o(93315),g=o(33165);const f="ConditionCollection.filteringStates";class p{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];(0,i.default)(this,"hot",void 0),(0,i.default)(this,"isMapRegistrable",void 0),(0,i.default)(this,"filteringStates",new g.LinkedPhysicalIndexToValueMap),this.hot=e,this.isMapRegistrable=t,!0===this.isMapRegistrable?this.hot.columnIndexMapper.registerMap(f,this.filteringStates):this.filteringStates.init(this.hot.columnIndexMapper.getNumberOfIndexes())}isEmpty(){return 0===this.getFilteredColumns().length}isMatch(e,t){var o;const s=this.filteringStates.getValueAtIndex(t),i=null!==(o=null==s?void 0:s.conditions)&&void 0!==o?o:[],r=null==s?void 0:s.operation;return this.isMatchInConditions(i,e,r)}isMatchInConditions(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.OPERATION_ID;return!e.length||(0,d.getOperationFunc)(o)(e,t)}addCondition(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.OPERATION_ID,s=arguments.length>3?arguments[3]:void 0;const i=this.hot.getCellMeta(0,e).locale,n=(0,r.arrayMap)(t.args,(e=>"string"==typeof e?e.toLocaleLowerCase(i):e)),l=t.name||t.command.key;this.runLocalHooks("beforeAdd",e);const g=this.getOperation(e);if(g){if(g!==o)throw Error(a.toSingleLine`The column of index ${e} has been already applied with a \`${g}\`\x20
66
+ learn about the migration path.`,g=new Map([["modifyRow","8.0.0"],["modifyCol","8.0.0"],["unmodifyRow","8.0.0"],["unmodifyCol","8.0.0"],["skipLengthCache","8.0.0"],["hiddenColumn","8.0.0"],["hiddenRow","8.0.0"]]),f=new Map([[]]);class p{static getSingleton(){return m}constructor(){(0,i.default)(this,"globalBucket",void 0),this.globalBucket=this.createEmptyBucket()}createEmptyBucket(){const e=Object.create(null);return(0,r.arrayEach)(d,(t=>e[t]=[])),e}getBucket(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket}add(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(Array.isArray(t))(0,r.arrayEach)(t,(t=>this.add(e,t,o)));else{g.has(e)&&(0,l.warn)((0,a.substitute)(c,{hookName:e,removedInVersion:g.get(e)})),f.has(e)&&(0,l.warn)(f.get(e));const s=this.getBucket(o);if(void 0===s[e]&&(this.register(e),s[e]=[]),t.skip=!1,-1===s[e].indexOf(t)){let o=!1;t.initialHook&&(0,r.arrayEach)(s[e],((i,r)=>{if(i.initialHook)return s[e][r]=t,o=!0,!1})),o||s[e].push(t)}}return this}once(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;Array.isArray(t)?(0,r.arrayEach)(t,(t=>this.once(e,t,o))):(t.runOnce=!0,this.add(e,t,o))}remove(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const s=this.getBucket(o);return void 0!==s[e]&&s[e].indexOf(t)>=0&&(t.skip=!0,!0)}has(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const o=this.getBucket(t);return!(void 0===o[e]||!o[e].length)}run(e,t,o,s,i,r,n,a){{const l=this.globalBucket[t],h=l?l.length:0;let d=0;if(h)for(;d<h;){if(!l[d]||l[d].skip){d+=1;continue}const h=(0,u.fastCall)(l[d],e,o,s,i,r,n,a);void 0!==h&&(o=h),l[d]&&l[d].runOnce&&this.remove(t,l[d]),d+=1}}{const l=this.getBucket(e)[t],h=l?l.length:0;let d=0;if(h)for(;d<h;){if(!l[d]||l[d].skip){d+=1;continue}const h=(0,u.fastCall)(l[d],e,o,s,i,r,n,a);void 0!==h&&(o=h),l[d]&&l[d].runOnce&&this.remove(t,l[d],e),d+=1}}return o}destroy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,n.objectEach)(this.getBucket(e),((e,t,o)=>o[t].length=0))}register(e){this.isRegistered(e)||d.push(e)}deregister(e){this.isRegistered(e)&&d.splice(d.indexOf(e),1)}isDeprecated(e){return f.has(e)||g.has(e)}isRegistered(e){return d.indexOf(e)>=0}getRegistered(){return d}}const m=new p;t.default=p},35030:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=s(o(48427)),n=s(o(42538)),a=o(36026),l=o(50095),h=o(7374),u=s(o(17954)),d=s(o(56307)),c=o(22232),g=o(68145),f=s(o(10977)),p=o(18609),m=o(21280),w=o(33165),C=o(93315);function v(e,t){y(e,t),t.add(e)}function y(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function E(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}d.default.getSingleton().register("modifyAutoColumnSizeSeed");const S=t.PLUGIN_KEY="autoColumnSize",R=t.PLUGIN_PRIORITY=10;var b=new WeakMap,_=new WeakSet,T=new WeakSet,O=new WeakSet,M=new WeakSet,I=new WeakSet,A=new WeakSet;class N extends a.BasePlugin{static get PLUGIN_KEY(){return S}static get PLUGIN_PRIORITY(){return R}static get SETTING_KEYS(){return!0}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 50}constructor(e){var t,o,s;super(e),v(this,A),v(this,I),v(this,M),v(this,O),v(this,T),v(this,_),(0,i.default)(this,"ghostTable",new u.default(this.hot)),(0,i.default)(this,"samplesGenerator",new f.default(((e,t)=>{const o=this.hot.getCellMeta(e,t);let s="";o.spanned||(s=this.hot.getDataAtCell(e,t));let i="";return this.hot.hasHook("modifyAutoColumnSizeSeed")&&(i=this.hot.runHooks("modifyAutoColumnSizeSeed",i,o,s)),{value:s,bundleSeed:i}}))),(0,i.default)(this,"firstCalculation",!0),(0,i.default)(this,"inProgress",!1),(0,i.default)(this,"measuredColumns",0),(0,i.default)(this,"columnWidthsMap",new w.PhysicalIndexToValueMap),s={writable:!0,value:[]},y(t=this,o=b),o.set(t,s),this.hot.columnIndexMapper.registerMap("autoColumnSize",this.columnWidthsMap),this.addHook("beforeColumnResize",((e,t,o)=>E(this,M,k).call(this,e,t,o)))}isEnabled(){return!1!==this.hot.getSettings()[S]&&!this.hot.getSettings().colWidths}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[S];t&&null!==t.useHeaders&&void 0!==t.useHeaders&&this.ghostTable.setSetting("useHeaders",t.useHeaders),this.setSamplingOptions(),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return E(e,T,x).call(e,...o)})),this.addHook("beforeChangeRender",(e=>E(this,O,H).call(this,e))),this.addHook("afterFormulasValuesUpdate",(e=>E(this,A,L).call(this,e))),this.addHook("beforeViewRender",(e=>E(this,_,P).call(this,e))),this.addHook("modifyColWidth",((e,t)=>this.getColumnWidth(t,e))),this.addHook("afterInit",(()=>E(this,I,D).call(this))),super.enablePlugin()}updatePlugin(){const e=this.findColumnsWhereHeaderWasChanged();e.length&&(this.clearCache(e),this.calculateVisibleColumnsWidth()),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.addHook("beforeColumnResize",((e,t,o)=>E(this,M,k).call(this,e,t,o)))}calculateVisibleColumnsWidth(){if(!this.hot.countRows())return;const e=this.hot.renderCall,t=this.getFirstVisibleColumn(),o=this.getLastVisibleColumn();-1!==t&&-1!==o&&this.calculateColumnsWidth({from:t,to:o},void 0,e)}calculateColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countRows()-1},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s="number"==typeof e?{from:e,to:e}:e,i="number"==typeof t?{from:t,to:t}:t;(0,g.rangeEach)(s.from,s.to,(e=>{let t=this.hot.toPhysicalColumn(e);if(null===t&&(t=e),o||null===this.columnWidthsMap.getValueAtIndex(t)&&!this.hot._getColWidthFromSettings(t)){const t=this.samplesGenerator.generateColumnSamples(e,i);(0,l.arrayEach)(t,(e=>{let[t,o]=e;return this.ghostTable.addColumn(t,o)}))}})),this.ghostTable.columns.length&&(this.hot.batchExecution((()=>{this.ghostTable.getWidths(((e,t)=>{const o=this.hot.toPhysicalColumn(e);this.columnWidthsMap.setValueAtIndex(o,t)}))}),!0),this.measuredColumns=s.to+1,this.ghostTable.clean())}calculateAllColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=0;const o=this.hot.countCols()-1;let s=null;this.inProgress=!0;const i=()=>{if(!this.hot)return(0,h.cancelAnimationFrame)(s),void(this.inProgress=!1);this.calculateColumnsWidth({from:t,to:Math.min(t+N.CALCULATION_STEP,o)},e),t=t+N.CALCULATION_STEP+1,t<o?s=(0,h.requestAnimationFrame)(i):((0,h.cancelAnimationFrame)(s),this.inProgress=!1,this.hot.view.adjustElementsSize())},r=this.getSyncCalculationLimit();this.firstCalculation&&r>=0&&(this.calculateColumnsWidth({from:0,to:r},e),this.firstCalculation=!1,t=r+1),t<o?i():this.inProgress=!1}setSamplingOptions(){const e=this.hot.getSettings()[S],t=e&&(0,c.hasOwnProperty)(e,"samplingRatio")?e.samplingRatio:void 0,o=e&&(0,c.hasOwnProperty)(e,"allowSampleDuplicates")?e.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),o&&this.samplesGenerator.setAllowDuplicates(o)}recalculateAllColumnsWidth(){this.hot.view&&this.hot.view._wt.wtTable.isVisible()&&(this.clearCache(),this.calculateAllColumnsWidth())}getSyncCalculationLimit(){const e=this.hot.getSettings()[S];let t=N.SYNC_CALCULATION_LIMIT;const o=this.hot.countCols()-1;return(0,c.isObject)(e)&&(t=e.syncLimit,(0,p.isPercentValue)(t)?t=(0,g.valueAccordingPercent)(o,t):t>>=0),Math.min(t,o)}getColumnWidth(e){let t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return void 0===o&&(o=this.columnWidthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e)),t&&"number"==typeof o&&(o=Math.max(o,m.ViewportColumnsCalculator.DEFAULT_WIDTH))),o}getFirstVisibleColumn(){const e=this.hot.view._wt;if(e.wtViewport.columnsVisibleCalculator){const t=e.wtTable.getFirstVisibleColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}if(e.wtViewport.columnsRenderCalculator){const t=e.wtTable.getFirstRenderedColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}return-1}getLastVisibleColumn(){const e=this.hot.view._wt;if(e.wtViewport.columnsVisibleCalculator){const t=e.wtTable.getLastVisibleColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}if(e.wtViewport.columnsRenderCalculator){const t=e.wtTable.getLastRenderedColumn();if(-1!==t)return this.hot.columnIndexMapper.getVisualFromRenderableIndex(t)}return-1}findColumnsWhereHeaderWasChanged(){const e=this.hot.getColHeader();return(0,l.arrayReduce)(e,((e,t,o)=>{const s=(0,n.default)(this,b).length;return(s-1<o||(0,n.default)(this,b)[o]!==t)&&e.push(o),s-1<o?(0,n.default)(this,b).push(t):(0,n.default)(this,b)[o]=t,e}),[])}clearCache(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.length?this.hot.batchExecution((()=>{(0,l.arrayEach)(e,(e=>{this.columnWidthsMap.setValueAtIndex(e,null)}))}),!0):this.columnWidthsMap.clear()}isNeedRecalculate(){return!!(0,l.arrayFilter)(this.columnWidthsMap.getValues().slice(0,this.measuredColumns),(e=>null===e)).length}destroy(){this.ghostTable.clean(),super.destroy()}}function P(){this.calculateVisibleColumnsWidth(),this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllColumnsWidth()}function x(){this.hot.view?this.recalculateAllColumnsWidth():setTimeout((()=>{this.hot&&this.recalculateAllColumnsWidth()}),0)}function H(e){const t=(0,l.arrayMap)(e,(e=>{let[,t]=e;return this.hot.toPhysicalColumn(this.hot.propToCol(t))}));this.clearCache(Array.from(new Set(t)))}function k(e,t,o){let s=e;return o&&(this.calculateColumnsWidth(t,void 0,!0),s=this.getColumnWidth(t,void 0,!1)),s}function D(){(0,r.default)(this,b,this.hot.getColHeader())}function L(e){const t=(0,l.arrayFilter)(e,(e=>{var t;return(0,C.isDefined)(null===(t=e.address)||void 0===t?void 0:t.col)})),o=(0,l.arrayMap)(t,(e=>e.address.col));this.clearCache(Array.from(new Set(o)))}t.AutoColumnSize=N},21215:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(35030);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.AutoColumnSize=s.AutoColumnSize},64168:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(36026),n=o(50095),a=o(7374),l=o(83302),h=s(o(17954)),u=o(22232),d=o(68145),c=s(o(10977)),g=o(18609),f=o(33165);function p(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function m(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const w=t.PLUGIN_KEY="autoRowSize",C=t.PLUGIN_PRIORITY=40;var v=new WeakSet,y=new WeakSet,E=new WeakSet,S=new WeakSet;class R extends r.BasePlugin{static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return C}static get SETTING_KEYS(){return!0}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 500}constructor(e){super(e),p(this,S),p(this,E),p(this,y),p(this,v),(0,i.default)(this,"headerHeight",null),(0,i.default)(this,"ghostTable",new h.default(this.hot)),(0,i.default)(this,"samplesGenerator",new c.default(((e,t)=>{if(e>=0&&t>=0){if(this.hot.getCellMeta(e,t).hidden)return!1}let o;return e>=0?o=this.hot.getDataAtCell(e,t):-1===e&&(o=this.hot.getColHeader(t)),{value:o}}))),(0,i.default)(this,"firstCalculation",!0),(0,i.default)(this,"inProgress",!1),(0,i.default)(this,"measuredRows",0),(0,i.default)(this,"rowHeightsMap",new f.PhysicalIndexToValueMap),this.hot.rowIndexMapper.registerMap("autoRowSize",this.rowHeightsMap),this.addHook("beforeRowResize",((e,t,o)=>m(this,y,_).call(this,e,t,o)))}isEnabled(){const e=this.hot.getSettings()[w];return!0===e||(0,u.isObject)(e)}enablePlugin(){var e=this;this.enabled||(this.setSamplingOptions(),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return m(e,E,T).call(e,...o)})),this.addHook("beforeChangeRender",(e=>m(this,S,O).call(this,e))),this.addHook("beforeColumnResize",(()=>this.recalculateAllRowsHeight())),this.addHook("beforeViewRender",(e=>m(this,v,b).call(this,e))),this.addHook("modifyRowHeight",((e,t)=>this.getRowHeight(t,e))),this.addHook("modifyColumnHeaderHeight",(()=>this.getColumnHeaderHeight())),super.enablePlugin())}disablePlugin(){this.headerHeight=null,super.disablePlugin(),this.addHook("beforeRowResize",((e,t,o)=>m(this,y,_).call(this,e,t,o)))}calculateRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countCols()-1},o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s="number"==typeof e?{from:e,to:e}:e,i="number"==typeof t?{from:t,to:t}:t;if(null!==this.hot.getColHeader(0)){const e=this.samplesGenerator.generateRowSamples(-1,i);this.ghostTable.addColumnHeadersRow(e.get(-1))}(0,d.rangeEach)(s.from,s.to,(e=>{if(o||null===this.rowHeightsMap.getValueAtIndex(e)){const t=this.samplesGenerator.generateRowSamples(e,i);(0,n.arrayEach)(t,(e=>{let[t,o]=e;return this.ghostTable.addRow(t,o)}))}})),this.ghostTable.rows.length&&(this.hot.batchExecution((()=>{this.ghostTable.getHeights(((e,t)=>{e<0?this.headerHeight=t:this.rowHeightsMap.setValueAtIndex(this.hot.toPhysicalRow(e),t)}))}),!0),this.measuredRows=s.to+1,this.ghostTable.clean())}calculateAllRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=0;const o=this.hot.countRows()-1;let s=null;this.inProgress=!0;const i=()=>{if(!this.hot)return(0,a.cancelAnimationFrame)(s),void(this.inProgress=!1);this.calculateRowsHeight({from:t,to:Math.min(t+R.CALCULATION_STEP,o)},e),t=t+R.CALCULATION_STEP+1,t<o?s=(0,a.requestAnimationFrame)(i):((0,a.cancelAnimationFrame)(s),this.inProgress=!1,this.hot.view.adjustElementsSize(!0),this.hot.view._wt.wtOverlays.inlineStartOverlay.needFullRender&&this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.draw())},r=this.getSyncCalculationLimit();this.firstCalculation&&r>=0&&(this.calculateRowsHeight({from:0,to:r},e),this.firstCalculation=!1,t=r+1),t<o?i():(this.inProgress=!1,this.hot.view.adjustElementsSize(!1))}setSamplingOptions(){const e=this.hot.getSettings()[w],t=e&&(0,u.hasOwnProperty)(e,"samplingRatio")?e.samplingRatio:void 0,o=e&&(0,u.hasOwnProperty)(e,"allowSampleDuplicates")?e.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),o&&this.samplesGenerator.setAllowDuplicates(o)}recalculateAllRowsHeight(){(0,l.isVisible)(this.hot.view._wt.wtTable.TABLE)&&(this.clearCache(),this.calculateAllRowsHeight())}getSyncCalculationLimit(){const e=this.hot.getSettings()[w];let t=R.SYNC_CALCULATION_LIMIT;const o=this.hot.countRows()-1;return(0,u.isObject)(e)&&(t=e.syncLimit,(0,g.isPercentValue)(t)?t=(0,d.valueAccordingPercent)(o,t):t>>=0),Math.min(t,o)}getRowHeight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;const o=e<0?this.headerHeight:this.rowHeightsMap.getValueAtIndex(this.hot.toPhysicalRow(e));let s=t;return null!==o&&o>(t||0)&&(s=o),s}getColumnHeaderHeight(){return this.headerHeight}getFirstVisibleRow(){const e=this.hot.view._wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getFirstVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getFirstRenderedRow():-1}getLastVisibleRow(){const e=this.hot.view._wt;return e.wtViewport.rowsVisibleCalculator?e.wtTable.getLastVisibleRow():e.wtViewport.rowsRenderCalculator?e.wtTable.getLastRenderedRow():-1}clearCache(){this.headerHeight=null,this.rowHeightsMap.init()}clearCacheByRange(e){const{from:t,to:o}="number"==typeof e?{from:e,to:e}:e;this.hot.batchExecution((()=>{(0,d.rangeEach)(Math.min(t,o),Math.max(t,o),(e=>{this.rowHeightsMap.setValueAtIndex(e,null)}))}),!0)}isNeedRecalculate(){return!!(0,n.arrayFilter)(this.rowHeightsMap.getValues().slice(0,this.measuredRows),(e=>null===e)).length}destroy(){this.ghostTable.clean(),super.destroy()}}function b(){const e=this.hot.renderCall,t=this.hot.getSettings().fixedRowsBottom,o=this.getFirstVisibleRow(),s=this.getLastVisibleRow();if(-1!==o&&-1!==s){if(this.calculateRowsHeight({from:o,to:s},void 0,e),t){const e=this.hot.countRows()-1;this.calculateRowsHeight({from:e-t,to:e})}this.isNeedRecalculate()&&!this.inProgress&&this.calculateAllRowsHeight()}}function _(e,t,o){let s=e;return o&&(this.calculateRowsHeight(t,void 0,!0),s=this.getRowHeight(t)),s}function T(){this.hot.view?this.recalculateAllRowsHeight():this.hot._registerTimeout((()=>{this.hot&&this.recalculateAllRowsHeight()}))}function O(e){let t=null;1===e.length?t=e[0][0]:e.length>1&&(t={from:e[0][0],to:e[e.length-1][0]}),null!==t&&this.clearCacheByRange(t)}t.AutoRowSize=R},60687:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(64168);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.AutoRowSize=s.AutoRowSize},51479:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=o(36026),n=s(o(56307)),a=o(83302),l=o(50095),h=o(28151);function u(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function d(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}n.default.getSingleton().register("modifyAutofillRange"),n.default.getSingleton().register("beforeAutofill"),n.default.getSingleton().register("afterAutofill");const c=t.PLUGIN_KEY="autofill",g=t.PLUGIN_PRIORITY=20,f=["fillHandle"];var p=new WeakSet,m=new WeakSet,w=new WeakSet,C=new WeakSet,v=new WeakSet;class y extends r.BasePlugin{constructor(){super(...arguments),u(this,v),u(this,C),u(this,w),u(this,m),u(this,p),(0,i.default)(this,"addingStarted",!1),(0,i.default)(this,"mouseDownOnCellCorner",!1),(0,i.default)(this,"mouseDragOutside",!1),(0,i.default)(this,"handleDraggedCells",0),(0,i.default)(this,"directions",[]),(0,i.default)(this,"autoInsertRow",!1)}static get PLUGIN_KEY(){return c}static get PLUGIN_PRIORITY(){return g}static get SETTING_KEYS(){return[c,...f]}isEnabled(){return this.hot.getSettings().fillHandle}enablePlugin(){this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",(e=>d(this,m,S).call(this,e))),this.addHook("afterOnCellCornerDblClick",(e=>d(this,p,E).call(this,e))),this.addHook("beforeOnCellMouseOver",((e,t)=>d(this,w,R).call(this,t))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.clearMappedSettings(),super.disablePlugin()}getSelectionData(){const e=this.hot.getSelectedRangeLast(),{row:t,col:o}=e.getTopStartCorner(),{row:s,col:i}=e.getBottomEndCorner(),r=this.hot.runHooks("modifyCopyableRange",[{startRow:t,startCol:o,endRow:s,endCol:i}]),n=[],a=[],h=[];return(0,l.arrayEach)(r,(e=>{for(let t=e.startRow;t<=e.endRow;t+=1)-1===n.indexOf(t)&&n.push(t);for(let t=e.startCol;t<=e.endCol;t+=1)-1===a.indexOf(t)&&a.push(t)})),(0,l.arrayEach)(n,(e=>{const t=[];(0,l.arrayEach)(a,(o=>{t.push(this.hot.getCopyableData(e,o))})),h.push(t)})),h}fillIn(){if(this.hot.selection.highlight.getFill().isEmpty())return!1;const[e,t,o,s]=this.hot.selection.highlight.getFill().getVisualCorners(),i=this.hot.getSelectedRangeLast(),r=i.getTopStartCorner(),n=i.getBottomEndCorner();this.resetSelectionOfDraggedArea();const a=[r.row,r.col,n.row,n.col],l=this.hot.runHooks("modifyAutofillRange",[Math.min(r.row,e),Math.min(r.col,t),Math.max(n.row,o),Math.max(n.col,s)],a),{directionOfDrag:u,startOfDragCoords:d,endOfDragCoords:c}=(0,h.getDragDirectionAndRange)(a,l,((e,t)=>this.hot._createCellCoords(e,t)));if(d&&d.row>-1&&d.col>-1){const e=this.getSelectionData(),t=i.clone(),o=this.hot._createCellRange(d,d,c),s=this.hot.runHooks("beforeAutofill",e,t,o,u);if(!1===s)return this.hot.selection.highlight.getFill().clear(),this.hot.render(),!1;let r=s;const n=s;if(["up","left"].indexOf(u)>-1&&(1!==n.length||0!==n[0].length))if(r=[],"up"===u){const e=c.row-d.row+1,t=e%n.length;for(let o=0;o<e;o++)r.push(n[(o+(n.length-t))%n.length])}else{const e=c.col-d.col+1,t=e%n[0].length;for(let o=0;o<n.length;o++){r.push([]);for(let s=0;s<e;s++)r[o].push(n[o][(s+(n[o].length-t))%n[o].length])}}this.hot.populateFromArray(d.row,d.col,r,c.row,c.col,`${this.pluginName}.fill`,null),this.setSelection(l),this.hot.runHooks("afterAutofill",r,t,o,u),this.hot.render()}else this.hot._refreshBorders();return!0}reduceSelectionAreaIfNeeded(e){return e.row<0&&(e.row=0),e.col<0&&(e.col=0),e}getCoordsOfDragAndDropBorders(e){const t=this.hot.getSelectedRangeLast(),o=t.getBottomEndCorner();let s=e;if(this.directions.includes(h.DIRECTIONS.vertical)&&this.directions.includes(h.DIRECTIONS.horizontal)){const i=t.getTopStartCorner();(o.col<=e.col||i.col>=e.col)&&(s=this.hot._createCellCoords(o.row,e.col)),(o.row<e.row||i.row>e.row)&&(s=this.hot._createCellCoords(e.row,o.col))}else if(this.directions.includes(h.DIRECTIONS.vertical))s=this.hot._createCellCoords(e.row,o.col);else{if(!this.directions.includes(h.DIRECTIONS.horizontal))return;s=this.hot._createCellCoords(o.row,e.col)}return this.reduceSelectionAreaIfNeeded(s)}showBorder(e){const t=this.getCoordsOfDragAndDropBorders(e);t&&this.redrawBorders(t)}addRow(){this.hot._registerTimeout((()=>{this.hot.alter("insert_row_below",void 0,1,`${this.pluginName}.fill`),this.addingStarted=!1}),200)}addNewRowIfNeeded(){if(!this.hot.selection.highlight.getFill().isEmpty()&&!1===this.addingStarted&&this.autoInsertRow){const e=this.hot.getSelectedLast(),t=this.hot.selection.highlight.getFill().getVisualCorners(),o=this.hot.countRows();e[2]<o-1&&t[2]===o-1&&(this.addingStarted=!0,this.addRow())}}getIndexOfLastAdjacentFilledInRow(e){const t=this.hot.getData(),o=this.hot.countRows();let s;for(let i=e[2]+1;i<o;i++){for(let o=e[1];o<=e[3];o++){if(t[i][o])return-1}const o=t[i][e[1]-1],r=t[i][e[3]+1];(o||r)&&(s=i)}return s}addSelectionFromStartAreaToSpecificRowIndex(e,t){this.hot.selection.highlight.getFill().clear().add(this.hot._createCellCoords(e[0],e[1])).add(this.hot._createCellCoords(t,e[3])).commit()}setSelection(e){this.hot.selectCell(...(0,l.arrayMap)(e,(e=>Math.max(e,0))),!1,!1)}selectAdjacent(){const e=this.hot.getSelectedLast(),t=this.getIndexOfLastAdjacentFilledInRow(e);return-1!==t&&void 0!==t&&(this.addSelectionFromStartAreaToSpecificRowIndex(e,t),!0)}resetSelectionOfDraggedArea(){this.handleDraggedCells=0,this.hot.selection.highlight.getFill().clear()}redrawBorders(e){this.hot.selection.highlight.getFill().clear().add(this.hot.getSelectedRangeLast().from).add(this.hot.getSelectedRangeLast().to).add(e).commit(),this.hot.view.render()}getIfMouseWasDraggedOutside(e){const{documentElement:t}=this.hot.rootDocument,o=(0,a.offset)(this.hot.table).top-(this.hot.rootWindow.pageYOffset||t.scrollTop)+(0,a.outerHeight)(this.hot.table),s=(0,a.offset)(this.hot.table).left-(this.hot.rootWindow.pageXOffset||t.scrollLeft)+(0,a.outerWidth)(this.hot.table);return e.clientY>o&&e.clientX<=s}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mouseup",(()=>d(this,C,b).call(this))),this.eventManager.addEventListener(e,"mousemove",(e=>d(this,v,_).call(this,e)))}clearMappedSettings(){this.directions.length=0,this.autoInsertRow=!1}mapSettings(){const e=(0,h.getMappedFillHandleSetting)(this.hot.getSettings().fillHandle);this.directions=e.directions,this.autoInsertRow=e.autoInsertRow}destroy(){super.destroy()}}function E(){this.selectAdjacent()&&this.fillIn()}function S(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}function R(e){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.showBorder(e),this.addNewRowIfNeeded())}function b(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}function _(e){const t=this.getIfMouseWasDraggedOutside(e);!1===this.addingStarted&&this.handleDraggedCells>0&&t?(this.mouseDragOutside=!0,this.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&this.autoInsertRow&&this.addRow()}t.Autofill=y},62080:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(51479);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Autofill=s.Autofill},28151:(e,t,o)=>{"use strict";t.__esModule=!0,t.getDragDirectionAndRange=function(e,t,o){let s,i,r;t[0]===e[0]&&t[1]<e[1]?(r="left",s=o(t[0],t[1]),i=o(t[2],e[1]-1)):t[2]===e[2]&&t[0]===e[0]&&t[3]>e[3]?(r="right",s=o(t[0],e[3]+1),i=o(t[2],t[3])):t[0]<e[0]&&t[1]===e[1]?(r="up",s=o(t[0],t[1]),i=o(e[0]-1,t[3])):t[2]>e[2]&&t[1]===e[1]&&(r="down",s=o(e[2]+1,t[1]),i=o(t[2],t[3]));s&&s.normalize();i&&i.normalize();return{directionOfDrag:r,startOfDragCoords:s,endOfDragCoords:i}},t.getMappedFillHandleSetting=function(e){const t={};!0===e?(t.directions=Object.keys(r),t.autoInsertRow=!0):(0,s.isObject)(e)?((0,i.isDefined)(e.autoInsertRow)?e.direction===r.horizontal?t.autoInsertRow=!1:t.autoInsertRow=e.autoInsertRow:t.autoInsertRow=!1,(0,i.isDefined)(e.direction)?t.directions=[e.direction]:t.directions=Object.keys(r)):"string"==typeof e?(t.directions=[e],t.autoInsertRow=!0):(t.directions=[],t.autoInsertRow=!1);return t};var s=o(22232),i=o(93315);const r=t.DIRECTIONS={horizontal:"horizontal",vertical:"vertical"}},13541:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=s(o(42538)),n=o(22232),a=o(50095),l=o(52036),h=o(65324),u=o(83605),d=o(7462),c=o(80239),g=s(o(75244));function f(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}const p=new Map([["plugin",l.hasPlugin],["cell-type",h.hasCellType],["editor",u.hasEditor],["renderer",d.hasRenderer],["validator",c.hasValidator]]),m=t.PLUGIN_KEY="base",w=[];let C=null;var v=new WeakMap,y=new WeakSet;function E(e){if(!e)return!1;const t=this.constructor.SETTING_KEYS;if("boolean"==typeof t)return t;for(let o=0;o<t.length;o++)if(void 0!==e[t[o]])return!0;return!1}t.BasePlugin=class{static get PLUGIN_KEY(){return m}static get SETTING_KEYS(){return[this.PLUGIN_KEY]}constructor(e){var t,o;f(t=this,o=y),o.add(t),(0,i.default)(this,"eventManager",new g.default(this)),(0,i.default)(this,"pluginName",null),(0,i.default)(this,"pluginsInitializedCallbacks",[]),(0,i.default)(this,"isPluginsReady",!1),(0,i.default)(this,"enabled",!1),(0,i.default)(this,"initialized",!1),function(e,t,o){f(e,t),t.set(e,o)}(this,v,{writable:!0,value:{}}),(0,n.defineGetter)(this,"hot",e,{writable:!1}),C=null,this.hot.addHook("afterPluginsInitialized",(()=>this.onAfterPluginsInitialized())),this.hot.addHook("afterUpdateSettings",(e=>this.onUpdateSettings(e))),this.hot.addHook("beforeInit",(()=>this.init()))}init(){this.pluginName=this.hot.getPluginName(this);const e=this.constructor.PLUGIN_DEPS,t=Array.isArray(e)?e:[];if(t.length>0){const e=[];if(t.forEach((t=>{const[o,s]=t.split(":");if(!p.has(o))throw new Error(`Unknown plugin dependency type "${o}" was found.`);p.get(o)(s)||e.push(` - ${s} (${o})`)})),e.length>0){const t=[`The ${this.pluginName} plugin requires the following modules:\n`,`${e.join("\n")}\n`].join("");w.push(t)}}C||(C=(0,l.getPluginsNames)()),C.indexOf("UndoRedo")>=0&&C.splice(C.indexOf("UndoRedo"),1),C.indexOf(this.pluginName)>=0&&C.splice(C.indexOf(this.pluginName),1),this.hot.addHookOnce("afterPluginsInitialized",(()=>{this.isEnabled&&this.isEnabled()&&this.enablePlugin()}));if(0===C.length){if(w.length>0){const e=[`${w.join("\n")}\n`,"You have to import and register them manually."].join("");throw new Error(e)}this.hot.runHooks("afterPluginsInitialized")}this.initialized=!0}enablePlugin(){this.enabled=!0}disablePlugin(){var e;null===(e=this.eventManager)||void 0===e||e.clear(),this.clearHooks(),this.enabled=!1}addHook(e,t){(0,r.default)(this,v)[e]=(0,r.default)(this,v)[e]||[];const o=(0,r.default)(this,v)[e];this.hot.addHook(e,t),o.push(t),(0,r.default)(this,v)[e]=o}removeHooks(e){(0,a.arrayEach)((0,r.default)(this,v)[e]||[],(t=>{this.hot.removeHook(e,t)}))}clearHooks(){const e=(0,r.default)(this,v);(0,n.objectEach)(e,((e,t)=>this.removeHooks(t))),e.length=0}callOnPluginsReady(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)}onAfterPluginsInitialized(){(0,a.arrayEach)(this.pluginsInitializedCallbacks,(e=>e())),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}onUpdateSettings(e){const t=function(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}(this,y,E).call(this,e);this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&t&&this.updatePlugin(e))}updatePlugin(){}destroy(){var e;null===(e=this.eventManager)||void 0===e||e.destroy(),this.clearHooks(),(0,n.objectEach)(this,((e,t)=>{"hot"!==t&&(this[t]=null)})),delete this.t,delete this.hot}}},36026:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(13541);t.PLUGIN_KEY=s.PLUGIN_KEY,t.BasePlugin=s.BasePlugin},37958:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(36026),n=s(o(82173)),a=s(o(12738));function l(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}const h=t.PLUGIN_KEY="bindRowsWithHeaders",u=t.PLUGIN_PRIORITY=210,d=new Map([["loose",n.default],["strict",a.default]]);var c=new WeakSet;class g extends r.BasePlugin{constructor(){super(...arguments),l(this,c),(0,i.default)(this,"headerIndexes",null)}static get PLUGIN_KEY(){return h}static get PLUGIN_PRIORITY(){return u}isEnabled(){return!!this.hot.getSettings()[h]}enablePlugin(){if(this.enabled)return;let e=this.hot.getSettings()[h];"string"!=typeof e&&(e="loose");const t=d.get(e);this.headerIndexes=this.hot.rowIndexMapper.registerMap("bindRowsWithHeaders",new t),this.addHook("modifyRowHeader",(e=>function(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}(this,c,f).call(this,e))),super.enablePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("bindRowsWithHeaders"),super.disablePlugin()}destroy(){super.destroy()}}function f(e){return this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(e))}t.BindRowsWithHeaders=g},85939:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(37958);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.BindRowsWithHeaders=s.BindRowsWithHeaders},82173:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(33165);const{getListWithInsertedItems:i,getListWithRemovedItems:r}=(0,s.alterUtilsFactory)("physicallyIndexed");class n extends s.IndexMap{constructor(){super((e=>e))}insert(e,t){const o=(0,s.getIncreasedIndexes)(this.indexedValues,t);this.indexedValues=i(o,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){const t=r(this.indexedValues,e);this.indexedValues=(0,s.getDecreasedIndexes)(t,e),super.remove(e)}}t.default=n},12738:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(33165);const{getListWithInsertedItems:i,getListWithRemovedItems:r}=(0,s.alterUtilsFactory)("physicallyIndexed");class n extends s.IndexMap{constructor(){super((e=>e))}insert(e,t){this.indexedValues=i(this.indexedValues,e,t,((e,t)=>this.getNextValue(t))),super.insert(e,t)}remove(e){this.indexedValues=r(this.indexedValues,e),super.remove(e)}getNextValue(e){return Math.max(...this.getValues())+1+e}}t.default=n},11665:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=s(o(42538)),n=s(o(48427)),a=o(36026),l=o(50095),h=o(68145),u=o(69173),d=o(83302),c=o(24449),g=o(5386);function f(e,t){p(e,t),t.add(e)}function p(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function m(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const w=t.PLUGIN_KEY="collapsibleColumns",C=t.PLUGIN_PRIORITY=290,v=["nestedHeaders"],y="collapsibleIndicator",E=w,S=new Map([["collapse",{hideColumn:!0,beforeHook:"beforeColumnCollapse",afterHook:"afterColumnCollapse"}],["expand",{hideColumn:!1,beforeHook:"beforeColumnExpand",afterHook:"afterColumnExpand"}]]);var R=new WeakMap,b=new WeakSet,_=new WeakSet,T=new WeakSet,O=new WeakSet;class M extends a.BasePlugin{constructor(){var e,t,o;super(...arguments),f(this,O),f(this,T),f(this,_),f(this,b),(0,i.default)(this,"nestedHeadersPlugin",null),(0,i.default)(this,"headerStateManager",null),o={writable:!0,value:null},p(e=this,t=R),t.set(e,o)}static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return C}static get PLUGIN_DEPS(){return["plugin:NestedHeaders"]}static get SETTING_KEYS(){return[w,...v]}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();t||(0,u.warn)("You need to configure the Nested Headers plugin in order to use collapsible headers."),(0,n.default)(this,R,this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding")),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.headerStateManager=this.nestedHeadersPlugin.getStateManager(),this.addHook("init",(()=>m(this,T,N).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return m(e,O,P).call(e,...o)})),this.addHook("afterGetColHeader",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return m(e,b,I).call(e,...o)})),this.addHook("beforeOnCellMouseDown",((e,t,o)=>m(this,_,A).call(this,e,t,o))),this.registerShortcuts(),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(this.hot.view){if(!this.nestedHeadersPlugin.detectedOverlappedHeaders){const{collapsibleColumns:e}=this.hot.getSettings();"boolean"==typeof e?this.headerStateManager.mapState((e=>({collapsible:e.origColspan>1}))):Array.isArray(e)&&(this.headerStateManager.mapState((()=>({collapsible:!1}))),this.headerStateManager.mergeStateWith(e))}super.updatePlugin()}}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),(0,n.default)(this,R,null),this.nestedHeadersPlugin=null,this.unregisterShortcuts(),this.clearButtons(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{var e;const{row:t,col:o}=this.hot.getSelectedRangeLast().highlight,{collapsible:s,isCollapsed:i,columnIndex:r}=null!==(e=this.headerStateManager.getHeaderTreeNodeData(t,o))&&void 0!==e?e:{};s&&(i?this.expandSection({row:t,col:r}):this.collapseSection({row:t,col:r}))},runOnlyIf:()=>{var e;return null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isHeader()},group:E})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(E)}clearButtons(){if(!this.hot.view)return;const e=this.hot.view._wt.getSetting("columnHeaders").length,t=this.hot.view._wt.wtTable.THEAD,o=this.hot.view._wt.wtOverlays.topOverlay.clone.wtTable.THEAD,s=this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay?this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null,i=function(e){e&&e.parentNode.removeChild(e)};(0,h.rangeEach)(0,e-1,(e=>{const r=t.childNodes[e],n=o.childNodes[e],a=s?s.childNodes[e]:null;(0,h.rangeEach)(0,r.childNodes.length-1,(e=>{let t=r.childNodes[e].querySelector(`.${y}`);i(t),n&&n.childNodes[e]&&(t=n.childNodes[e].querySelector(`.${y}`),i(t)),s&&a&&a.childNodes[e]&&(t=a.childNodes[e].querySelector(`.${y}`),i(t))}))}),!0)}expandSection(e){this.toggleCollapsibleSection([e],"expand")}collapseSection(e){this.toggleCollapsibleSection([e],"collapse")}toggleAllCollapsibleSections(e){const t=this.headerStateManager.mapNodes((t=>{const{collapsible:o,origColspan:s,headerLevel:i,columnIndex:r,isCollapsed:n}=t;if(!0===o&&s>1&&(n&&"expand"===e||!n&&"collapse"===e))return{row:this.headerStateManager.levelToRowCoords(i),col:r}}));this.toggleCollapsibleSection(t,e)}collapseAll(){this.toggleAllCollapsibleSections("collapse")}expandAll(){this.toggleAllCollapsibleSections("expand")}toggleCollapsibleSection(e,t){if(!S.has(t))throw new Error(`Unsupported action is passed (${t}).`);if(!Array.isArray(e))return;const o=(0,l.arrayFilter)(e,(e=>{let{row:t}=e;return t<0}));let s=o.length>0;(0,l.arrayEach)(o,(e=>{var o;let{row:i,col:r}=e;const{collapsible:n,isCollapsed:a}=null!==(o=this.headerStateManager.getHeaderSettings(i,r))&&void 0!==o?o:{};if(!n||a&&"collapse"===t||!a&&"expand"===t)return s=!1,!1}));const i=[],n=[];s&&(0,l.arrayEach)(o,(e=>{let{row:o,col:s}=e;const{colspanCompensation:r,affectedColumns:a,rollbackModification:l}=this.headerStateManager.triggerNodeModification(t,o,s);r>0&&(n.push(...a),i.push(l))}));const a=this.getCollapsedColumns();let h=[];"collapse"===t?h=(0,l.arrayUnique)([...a,...n]):"expand"===t&&(h=(0,l.arrayFilter)(a,(e=>!n.includes(e))));const u=S.get(t);if(!1===this.hot.runHooks(u.beforeHook,a,h,s))return void(0,l.arrayEach)(i,(e=>{e()}));this.hot.batchExecution((()=>{(0,l.arrayEach)(n,(e=>{(0,r.default)(this,R).setValueAtIndex(this.hot.toPhysicalColumn(e),u.hideColumn)}))}),!0);const d=this.getCollapsedColumns().length!==a.length;this.hot.runHooks(u.afterHook,a,h,s,d),this.hot.render(),this.hot.view.adjustElementsSize(!0)}getCollapsedColumns(){return(0,r.default)(this,R).getHiddenIndexes()}destroy(){(0,n.default)(this,R,null),super.destroy()}}function I(e,t,o){var s;const{collapsible:i,origColspan:r,isCollapsed:n}=null!==(s=this.headerStateManager.getHeaderSettings(o,e))&&void 0!==s?s:{},a=i&&r>1&&e>=this.hot.getSettings().fixedColumnsStart,l=this.hot.getSettings().ariaTags;let h=t.querySelector(`.${y}`);var u;((0,d.removeAttribute)(t,[(0,g.A11Y_EXPANDED)("")[0]]),a)?(h||(h=this.hot.rootDocument.createElement("div"),(0,d.addClass)(h,y),t.querySelector("div:first-child").appendChild(h)),(0,d.removeClass)(h,["collapsed","expanded"]),n?((0,d.addClass)(h,"collapsed"),(0,d.fastInnerText)(h,"+"),l&&(0,d.setAttribute)(t,...(0,g.A11Y_EXPANDED)(!1))):((0,d.addClass)(h,"expanded"),(0,d.fastInnerText)(h,"-"),l&&(0,d.setAttribute)(t,...(0,g.A11Y_EXPANDED)(!0))),l&&(0,d.setAttribute)(h,...(0,g.A11Y_HIDDEN)())):null===(u=h)||void 0===u||u.remove()}function A(e,t){(0,d.hasClass)(e.target,y)&&((0,d.hasClass)(e.target,"expanded")?(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"collapse")):(0,d.hasClass)(e.target,"collapsed")&&(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"expand")),(0,c.stopImmediatePropagation)(e))}function N(){this.updatePlugin()}function P(e,t){t||this.updatePlugin()}t.CollapsibleColumns=M},55994:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(11665);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.CollapsibleColumns=s.CollapsibleColumns},80081:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=o(83302),n=o(93315),a=o(22232),l=o(85015),h=o(50095),u=o(36026),d=o(33165),c=s(o(56307)),g=o(88082),f=o(64951),p=o(59809),m=o(24892),w=o(51510),C=o(5386);function v(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function y(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const E=t.PLUGIN_KEY="columnSorting",S=t.PLUGIN_PRIORITY=50,R=t.APPEND_COLUMN_CONFIG_STRATEGY="append",b=t.REPLACE_COLUMN_CONFIG_STRATEGY="replace",_=E;(0,w.registerRootComparator)(E,m.rootComparator),c.default.getSingleton().register("beforeColumnSort"),c.default.getSingleton().register("afterColumnSort");var T=new WeakSet,O=new WeakSet,M=new WeakSet,I=new WeakSet;class A extends u.BasePlugin{constructor(){super(...arguments),v(this,I),v(this,M),v(this,O),v(this,T),(0,i.default)(this,"columnStatesManager",null),(0,i.default)(this,"columnMetaCache",null),(0,i.default)(this,"pluginKey",E),(0,i.default)(this,"indexesSequenceCache",null)}static get PLUGIN_KEY(){return E}static get PLUGIN_PRIORITY(){return S}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){var e=this;this.enabled||(this.columnStatesManager=new g.ColumnStatesManager(this.hot,`${this.pluginKey}.sortingStates`),this.columnMetaCache=new d.PhysicalIndexToValueMap((e=>{let t=this.hot.toVisualColumn(e);return null===t&&(t=e),this.getMergedPluginSettings(t)})),this.hot.columnIndexMapper.registerMap(`${this.pluginKey}.columnMeta`,this.columnMetaCache),this.addHook("afterGetColHeader",((e,t)=>y(this,O,P).call(this,e,t))),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return y(e,I,H).call(e,...o)})),this.addHook("afterOnCellMouseDown",((e,t)=>this.onAfterOnCellMouseDown(e,t))),this.addHook("afterInit",(()=>y(this,T,N).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return y(e,M,x).call(e,...o)})),this.hot.view&&y(this,T,N).call(this),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){const e=(e,t)=>{const o=(0,f.getHeaderSpanElement)(t);!1!==(0,f.isFirstLevelColumnHeader)(e,t)&&null!==o&&this.updateHeaderClasses(o)};this.hot.addHook("afterGetColHeader",e),this.hot.addHookOnce("afterViewRender",(()=>{this.hot.removeHook("afterGetColHeader",e)})),this.hot.batchExecution((()=>{null!==this.indexesSequenceCache&&(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginKey))}),!0),this.hot.columnIndexMapper.unregisterMap(`${this.pluginKey}.columnMeta`),this.columnStatesManager.destroy(),this.columnMetaCache=null,this.columnStatesManager=null,this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();-1===e.row&&e.col>=0&&this.sort(this.getColumnNextConfig(e.col))},runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()},group:_})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(_)}sort(e){const t=this.getSortConfig(),o=this.getNormalizedSortConfigs(e),s=this.areValidSortConfigs(o);!1!==this.hot.runHooks("beforeColumnSort",t,o,s)&&(0===t.length&&null===this.indexesSequenceCache&&(this.indexesSequenceCache=this.hot.rowIndexMapper.registerMap(this.pluginKey,new d.IndexesSequence),this.indexesSequenceCache.setValues(this.hot.rowIndexMapper.getIndexesSequence())),s&&(this.columnStatesManager.setSortStates(o),this.sortByPresetSortStates(o),this.saveAllSortSettings(o)),this.hot.runHooks("afterColumnSort",t,s?o:t,s),s&&(this.hot.render(),this.hot.forceFullRender=!1,this.hot.view.render()))}clearSort(){this.sort([])}isSorted(){return this.enabled&&!this.columnStatesManager.isListOfSortedColumnsEmpty()}getSortConfig(e){return(0,n.isDefined)(e)?this.columnStatesManager.getColumnSortState(e):this.columnStatesManager.getSortStates()}setSortConfig(e){const t=this.getNormalizedSortConfigs(e);this.areValidSortConfigs(t)&&this.columnStatesManager.setSortStates(t)}getNormalizedSortConfigs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e.slice(0,1):[e]}areValidSortConfigs(e){const t=this.hot.countCols();return(0,f.areValidSortStates)(e)&&e.every((e=>{let{column:o}=e;return o<=t&&o>=0}))}saveAllSortSettings(e){const t=this.columnStatesManager.getAllColumnsProperties();t.initialConfig=(0,h.arrayMap)(e,(e=>{let{column:t,...o}=e;return{column:this.hot.toPhysicalColumn(t),...o}})),this.hot.runHooks("persistentStateSave","columnSorting",t)}getAllSavedSortSettings(){const e={};this.hot.runHooks("persistentStateLoad","columnSorting",e);const t=e.value,o=e=>{let{column:t,...o}=e;return{column:this.hot.toVisualColumn(t),...o}};return(0,n.isDefined)(t)&&Array.isArray(t.initialConfig)&&(t.initialConfig=(0,h.arrayMap)(t.initialConfig,o)),t}getColumnNextConfig(e){const t=this.columnStatesManager.getSortOrderOfColumn(e);if((0,n.isDefined)(t)){const o=(0,f.getNextSortOrder)(t);return(0,n.isDefined)(o)?{column:e,sortOrder:o}:void 0}const o=this.hot.countCols();if(Number.isInteger(e)&&e>=0&&e<o)return{column:e,sortOrder:(0,f.getNextSortOrder)()}}getNextSortConfig(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:R;const o=this.columnStatesManager.getIndexOfColumnInSortQueue(e),s=-1!==o,i=this.getSortConfig(),r=this.getColumnNextConfig(e);if(s){if((0,n.isUndefined)(r))return[...i.slice(0,o),...i.slice(o+1)];if(t===R)return[...i.slice(0,o),...i.slice(o+1),r];if(t===b)return[...i.slice(0,o),r,...i.slice(o+1)]}return(0,n.isDefined)(r)?i.concat(r):i}getPluginColumnConfig(e){if((0,a.isObject)(e)){const t=e[this.pluginKey];if((0,a.isObject)(t))return t}return{}}getMergedPluginSettings(e){const t=this.hot.getSettings()[this.pluginKey],o=this.columnStatesManager.getAllColumnsProperties(),s=this.hot.getCellMeta(0,e),i=Object.getPrototypeOf(s);return Array.isArray(i.columns)?Object.assign(o,t,this.getPluginColumnConfig(i.columns[e])):(0,l.isFunction)(i.columns)?Object.assign(o,t,this.getPluginColumnConfig(i.columns(e))):Object.assign(o,t)}getFirstCellSettings(e){const t=this.hot.getCellMeta(0,e),o=Object.create(t);return o[this.pluginKey]=this.columnMetaCache.getValueAtIndex(this.hot.toPhysicalColumn(e)),o}getNumberOfRowsToSort(e){const t=this.hot.getSettings();return t.maxRows<=e?t.maxRows:e-t.minSpareRows}sortByPresetSortStates(e){if(0===e.length)return void this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues());const t=[],o=this.hot.countRows(),s=t=>(0,h.arrayMap)(e,(e=>this.hot.getDataAtCell(t,e.column)));for(let e=0;e<this.getNumberOfRowsToSort(o);e+=1)t.push([this.hot.toPhysicalRow(e)].concat(s(e)));const i=(0,h.arrayMap)(t,(e=>e[0]));(0,w.sort)(t,this.pluginKey,(0,h.arrayMap)(e,(e=>e.sortOrder)),(0,h.arrayMap)(e,(e=>this.getFirstCellSettings(e.column))));for(let e=t.length;e<o;e+=1)t.push([e].concat(s(e)));const r=(0,h.arrayMap)(t,(e=>e[0])),n=new Map((0,h.arrayMap)(i,((e,t)=>[e,r[t]]))),a=(0,h.arrayMap)(this.hot.rowIndexMapper.getIndexesSequence(),(e=>n.has(e)?n.get(e):e));this.hot.rowIndexMapper.setIndexesSequence(a)}sortBySettings(e){if((0,a.isObject)(e)){this.columnStatesManager.updateAllColumnsProperties(e);const t=e.initialConfig;(Array.isArray(t)||(0,a.isObject)(t))&&this.sort(t)}else this.hot.render()}updateHeaderClasses(e){if((0,r.removeClass)(e,(0,p.getClassesToRemove)(e)),!1!==this.enabled){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];(0,r.addClass)(e,(0,p.getClassesToAdd)(...o))}}onUpdateSettings(e){super.onUpdateSettings(),null!==this.columnMetaCache&&this.columnMetaCache.init(this.hot.columnIndexMapper.getNumberOfIndexes()),(0,n.isDefined)(e[this.pluginKey])&&this.sortBySettings(e[this.pluginKey])}wasClickableHeaderClicked(e,t){return this.getFirstCellSettings(t)[this.pluginKey].headerAction&&(0,r.hasClass)(e.target,f.HEADER_SPAN_CLASS)}onAfterOnCellMouseDown(e,t){!1!==(0,f.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&(this.hot.getShortcutManager().isCtrlPressed()&&(this.hot.deselectCell(),this.hot.selectColumns(t.col)),this.sort(this.getColumnNextConfig(t.col)))}destroy(){var e;null===(e=this.columnStatesManager)||void 0===e||e.destroy(),super.destroy()}}function N(){const e=this.getAllSavedSortSettings();if((0,a.isObject)(e))this.sortBySettings(e);else{const e=this.hot.getSettings()[this.pluginKey];this.sortBySettings(e)}}function P(e,t){const o=(0,f.getHeaderSpanElement)(t);if(!1===(0,f.isFirstLevelColumnHeader)(e,t)||null===o)return;const s=this.getFirstCellSettings(e)[this.pluginKey],i=s.indicator,n=s.headerAction;if(this.updateHeaderClasses(o,this.columnStatesManager,e,i,n),this.hot.getSettings().ariaTags){const o=this.columnStatesManager.getSortOrderOfColumn(e);(0,r.setAttribute)(t,...(0,C.A11Y_SORT)(o?`${o}ending`:"none"))}}function x(e){!0===e&&this.hot.view&&y(this,T,N).call(this)}function H(e,t,o,s){!1!==(0,f.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&this.hot.getShortcutManager().isCtrlPressed()&&(s.column=!0)}t.ColumnSorting=A},88082:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(22232),n=o(33165),a=o(93315);const l=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"];t.ColumnStatesManager=class{constructor(e,t){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"sortingStates",new n.LinkedPhysicalIndexToValueMap),(0,i.default)(this,"sortEmptyCells",false),(0,i.default)(this,"indicator",true),(0,i.default)(this,"headerAction",true),(0,i.default)(this,"compareFunctionFactory",void 0),(0,i.default)(this,"mapName",void 0),this.hot=e,this.mapName=t,this.hot.columnIndexMapper.registerMap(t,this.sortingStates)}updateAllColumnsProperties(e){(0,r.isObject)(e)&&(0,r.objectEach)(e,((e,t)=>{l.includes(t)&&(this[t]=e)}))}getAllColumnsProperties(){const e={sortEmptyCells:this.sortEmptyCells,indicator:this.indicator,headerAction:this.headerAction};return"function"==typeof this.compareFunctionFactory&&(e.compareFunctionFactory=this.compareFunctionFactory),e}getSortOrderOfColumn(e){var t;return null===(t=this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))||void 0===t?void 0:t.sortOrder}getIndexOfColumnInSortQueue(e){return e=this.hot.toPhysicalColumn(e),this.sortingStates.getEntries().findIndex((t=>{let[o]=t;return o===e}))}getNumberOfSortedColumns(){return this.sortingStates.getLength()}isListOfSortedColumnsEmpty(){return 0===this.getNumberOfSortedColumns()}isColumnSorted(e){return(0,r.isObject)(this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))}getSortStates(){if(null===this.sortingStates)return[];return this.sortingStates.getEntries().map((e=>{let[t,o]=e;return{column:this.hot.toVisualColumn(t),...o}}))}getColumnSortState(e){const t=this.getSortOrderOfColumn(e);if((0,a.isDefined)(t))return{column:e,sortOrder:t}}setSortStates(e){this.sortingStates.clear();for(let t=0;t<e.length;t+=1)this.sortingStates.setValueAtIndex(this.hot.toPhysicalColumn(e[t].column),{sortOrder:e[t].sortOrder})}destroy(){this.hot.columnIndexMapper.unregisterMap(this.mapName),this.sortingStates=null}}},59809:(e,t,o)=>{"use strict";t.__esModule=!0,t.getClassesToAdd=function(e,t,o,i){const h=[n];i&&h.push(a);if(!1===o)return h.push(r),h;const u=e.getSortOrderOfColumn(t);(0,s.isDefined)(u)&&h.push(l.get(u));return h},t.getClassesToRemove=function(){return Array.from(l.values()).concat(a,r,n)},o(63517);var s=o(93315),i=o(64951);const r="indicatorDisabled",n="columnSorting",a="sortAction",l=new Map([[i.ASC_SORT_STATE,"ascending"],[i.DESC_SORT_STATE,"descending"]])},1902:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(80081);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ColumnSorting=s.ColumnSorting,t.APPEND_COLUMN_CONFIG_STRATEGY=s.APPEND_COLUMN_CONFIG_STRATEGY,t.REPLACE_COLUMN_CONFIG_STRATEGY=s.REPLACE_COLUMN_CONFIG_STRATEGY},24892:(e,t,o)=>{"use strict";t.__esModule=!0,t.rootComparator=function(e,t){return function(o,i){const[,...r]=o,[,...n]=i;return function(o){const i=e[o],a=t[o],l=r[o],h=n[o],u=a.columnSorting;return(u.compareFunctionFactory?u.compareFunctionFactory:(0,s.getCompareFunctionFactory)(a.type))(i,a,u)(l,h)}(0)}};var s=o(51510)},72844:(e,t,o)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,o){const n=t.checkedTemplate,a=t.uncheckedTemplate,{sortEmptyCells:l}=o;return function(h,u){const d=(0,r.isEmpty)(h),c=(0,r.isEmpty)(u),g=d?a:h,f=c?a:u,p=g===a||g===n,m=f===a||f===n;if(!1===l){if(d&&!1===c)return s.FIRST_AFTER_SECOND;if(!1===d&&c)return s.FIRST_BEFORE_SECOND}return!1===p&&m?"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND:p&&!1===m?"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND:!1===p&&!1===m?(0,i.compareFunctionFactory)(e,t,o)(h,u):g===a&&f===n?"asc"===e?s.FIRST_BEFORE_SECOND:s.FIRST_AFTER_SECOND:g===n&&f===a?"asc"===e?s.FIRST_AFTER_SECOND:s.FIRST_BEFORE_SECOND:s.DO_NOT_SWAP}};var s=o(51510),i=o(93388),r=o(93315);t.COLUMN_DATA_TYPE="checkbox"},75889:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.compareFunctionFactory=function(e,t,o){return function(s,a){const{sortEmptyCells:l}=o;if(s===a)return n.DO_NOT_SWAP;if((0,r.isEmpty)(s))return(0,r.isEmpty)(a)?n.DO_NOT_SWAP:l&&"asc"===e?n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND;if((0,r.isEmpty)(a))return l&&"asc"===e?n.FIRST_AFTER_SECOND:n.FIRST_BEFORE_SECOND;const h=t.dateFormat,u=(0,i.default)(s,h),d=(0,i.default)(a,h);return u.isValid()?d.isValid()?d.isAfter(u)?"asc"===e?n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND:d.isBefore(u)?"asc"===e?n.FIRST_AFTER_SECOND:n.FIRST_BEFORE_SECOND:n.DO_NOT_SWAP:n.FIRST_BEFORE_SECOND:n.FIRST_AFTER_SECOND}};var i=s(o(33034)),r=o(93315),n=o(51510);t.COLUMN_DATA_TYPE="date"},93388:(e,t,o)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,o){const r=t.locale;return function(t,n){const{sortEmptyCells:a}=o;return"string"==typeof t&&(t=t.toLocaleLowerCase(r)),"string"==typeof n&&(n=n.toLocaleLowerCase(r)),t===n?i.DO_NOT_SWAP:(0,s.isEmpty)(t)?(0,s.isEmpty)(n)?i.DO_NOT_SWAP:a&&"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND:(0,s.isEmpty)(n)?a&&"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND:isNaN(t)&&!isNaN(n)?"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND:!isNaN(t)&&isNaN(n)?"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND:(isNaN(t)||isNaN(n)||(t=parseFloat(t),n=parseFloat(n)),t<n?"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND:t>n?"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND:i.DO_NOT_SWAP)}};var s=o(93315),i=o(51510);t.COLUMN_DATA_TYPE="default"},7974:(e,t,o)=>{"use strict";t.__esModule=!0,t.compareFunctionFactory=function(e,t,o){return function(t,r){const n=parseFloat(t),a=parseFloat(r),{sortEmptyCells:l}=o;if(n===a||isNaN(n)&&isNaN(a))return i.DO_NOT_SWAP;if(l){if((0,s.isEmpty)(t))return"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND;if((0,s.isEmpty)(r))return"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND}return isNaN(n)?i.FIRST_AFTER_SECOND:isNaN(a)?i.FIRST_BEFORE_SECOND:n<a?"asc"===e?i.FIRST_BEFORE_SECOND:i.FIRST_AFTER_SECOND:n>a?"asc"===e?i.FIRST_AFTER_SECOND:i.FIRST_BEFORE_SECOND:i.DO_NOT_SWAP}};var s=o(93315),i=o(51510);t.COLUMN_DATA_TYPE="numeric"},5685:(e,t,o)=>{"use strict";t.__esModule=!0,t.sort=function(e,t){const o=(0,s.getRootComparator)(t);for(var i=arguments.length,r=new Array(i>2?i-2:0),n=2;n<i;n++)r[n-2]=arguments[n];e.sort(o(...r))};var s=o(78004);t.DO_NOT_SWAP=0,t.FIRST_BEFORE_SECOND=-1,t.FIRST_AFTER_SECOND=1},51510:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(78004);t.registerRootComparator=s.registerRootComparator,t.getRootComparator=s.getRootComparator,t.getCompareFunctionFactory=s.getCompareFunctionFactory;var i=o(5685);t.FIRST_AFTER_SECOND=i.FIRST_AFTER_SECOND,t.FIRST_BEFORE_SECOND=i.FIRST_BEFORE_SECOND,t.DO_NOT_SWAP=i.DO_NOT_SWAP,t.sort=i.sort},78004:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getCompareFunctionFactory=function(e){if(d(e))return u(e);return u(i.COLUMN_DATA_TYPE)};var i=o(93388),r=o(7974),n=o(72844),a=o(75889),l=s(o(63800));const{register:h,getItem:u,hasItem:d}=(0,l.default)("sorting.compareFunctionFactory"),{register:c,getItem:g}=(0,l.default)("sorting.mainSortComparator");t.getRootComparator=g,t.registerRootComparator=c,h(r.COLUMN_DATA_TYPE,r.compareFunctionFactory),h(n.COLUMN_DATA_TYPE,n.compareFunctionFactory),h(a.COLUMN_DATA_TYPE,a.compareFunctionFactory),h(i.COLUMN_DATA_TYPE,i.compareFunctionFactory)},64951:(e,t,o)=>{"use strict";t.__esModule=!0,t.areValidSortStates=function(e){if(e.some((e=>!1===function(e){if(!1===(0,s.isObject)(e))return!1;const{column:t,sortOrder:o}=e;return Number.isInteger(t)&&[r,n].includes(o)}(e))))return!1;const t=e.map((e=>{let{column:t}=e;return t}));return new Set(t).size===t.length},t.getHeaderSpanElement=function(e){return e.querySelector(`.${a}`)},t.getNextSortOrder=function(e){if(e===n)return;if(e===r)return n;return r},t.isFirstLevelColumnHeader=function(e,t){if(e<0||!t.parentNode)return!1;const o=t.parentNode.parentNode.childNodes;if(Array.from(o).indexOf(t.parentNode)-o.length!=-1)return!1;return!0},t.wasHeaderClickedProperly=function(e,t,o){return-1===e&&t>=0&&!1===(0,i.isRightClick)(o)};var s=o(22232),i=o(24449);const r=t.ASC_SORT_STATE="asc",n=t.DESC_SORT_STATE="desc",a=t.HEADER_SPAN_CLASS="colHeader"},24378:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(36026),n=o(22232),a=s(o(5572)),l=o(28236),h=o(88475);function u(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function d(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const c=t.PLUGIN_KEY="columnSummary",g=t.PLUGIN_PRIORITY=220;var f=new WeakSet,p=new WeakSet,m=new WeakSet;class w extends r.BasePlugin{constructor(){super(...arguments),u(this,m),u(this,p),u(this,f),(0,i.default)(this,"endpoints",null)}static get PLUGIN_KEY(){return c}static get PLUGIN_PRIORITY(){return g}isEnabled(){return!!this.hot.getSettings()[c]}enablePlugin(){var e=this;this.enabled||(this.settings=this.hot.getSettings()[c],this.endpoints=new a.default(this,this.settings),this.addHook("afterInit",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return d(e,f,C).call(e,...o)})),this.addHook("afterChange",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return d(e,p,v).call(e,...o)})),this.addHook("beforeCreateRow",((e,t,o)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_row",e,t,null,o))),this.addHook("beforeCreateCol",((e,t,o)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_col",e,t,null,o))),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.endpoints.resetSetupBeforeStructureAlteration("remove_row",...o)})),this.addHook("beforeRemoveCol",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.endpoints.resetSetupBeforeStructureAlteration("remove_col",...o)})),this.addHook("afterCreateRow",((e,t,o)=>this.endpoints.resetSetupAfterStructureAlteration("insert_row",e,t,null,o))),this.addHook("afterCreateCol",((e,t,o)=>this.endpoints.resetSetupAfterStructureAlteration("insert_col",e,t,null,o))),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.endpoints.resetSetupAfterStructureAlteration("remove_row",...o)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.endpoints.resetSetupAfterStructureAlteration("remove_col",...o)})),this.addHook("afterRowMove",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return d(e,m,y).call(e,...o)})),super.enablePlugin())}disablePlugin(){this.endpoints=null,this.settings=null,this.currentEndpoint=null,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.endpoints.initEndpoints(),super.updatePlugin()}calculate(e){switch(e.type.toLowerCase()){case"sum":e.result=this.calculateSum(e);break;case"min":case"max":e.result=this.calculateMinMax(e,e.type);break;case"count":e.result=this.countEntries(e);break;case"average":e.result=this.calculateAverage(e);break;case"custom":e.result=e.customFunction.call(this,e)}}calculateSum(e){let t=0;return(0,n.objectEach)(e.ranges,(o=>{t+=this.getPartialSum(o,e.sourceColumn)})),t}getPartialSum(e,t){let o=0,s=e[1]||e[0],i=null,r=0;do{if(i=this.getCellValue(s,t),i=(0,h.isNullishOrNaN)(i)?null:i,null!==i){const e=(`${i}`.split(".")[1]||[]).length||1;e>r&&(r=e)}o+=i||0,s-=1}while(s>=e[0]);return Math.round(o*10**r)/10**r}calculateMinMax(e,t){let o=null;return(0,n.objectEach)(e.ranges,(s=>{const i=this.getPartialMinMax(s,e.sourceColumn,t);if(null===o&&null!==i&&(o=i),null!==i)switch(t){case"min":o=Math.min(o,i);break;case"max":o=Math.max(o,i)}})),null===o?"Not enough data":o}getPartialMinMax(e,t,o){let s,i=null,r=e[1]||e[0];do{if(s=this.getCellValue(r,t),s=(0,h.isNullishOrNaN)(s)?null:s,null===i)i=s;else if(null!==s)switch(o){case"min":i=Math.min(i,s);break;case"max":i=Math.max(i,s)}r-=1}while(r>=e[0]);return i}countEmpty(e,t){let o,s=0,i=e[1]||e[0];do{o=this.getCellValue(i,t),o=(0,h.isNullishOrNaN)(o)?null:o,null===o&&(s+=1),i-=1}while(i>=e[0]);return s}countEntries(e){let t=0;const o=e.ranges;return(0,n.objectEach)(o,(o=>{const s=void 0===o[1]?1:o[1]-o[0]+1,i=this.countEmpty(o,e.sourceColumn);t+=s,t-=i})),t}calculateAverage(e){return this.calculateSum(e)/this.countEntries(e)}getCellValue(e,t){const o=this.hot.toVisualRow(e),s=this.hot.toVisualColumn(t);let i=this.hot.getSourceDataAtCell(e,t),r="";if(null!==o&&null!==s&&(r=this.hot.getCellMeta(o,s).className||""),r.indexOf("columnSummaryResult")>-1)return null;if(this.endpoints.currentEndpoint.forceNumeric&&("string"==typeof i&&(i=i.replace(/,/,".")),i=parseFloat(i)),isNaN(i)&&!this.endpoints.currentEndpoint.suppressDataTypeErrors)throw new Error(l.toSingleLine`ColumnSummary plugin: cell at (${e}, ${t}) is not in a\x20
67
+ numeric format. Cannot do the calculation.`);return i}}function C(){this.endpoints.initEndpoints()}function v(e,t){e&&"ColumnSummary.reset"!==t&&"ColumnSummary.set"!==t&&"loadData"!==t&&this.endpoints.refreshChangedEndpoints(e)}function y(e,t){this.endpoints.resetSetupBeforeStructureAlteration("move_row",e[0],e.length,e,this.pluginName),this.endpoints.resetSetupAfterStructureAlteration("move_row",t,e.length,e,this.pluginName)}t.ColumnSummary=w},5572:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=o(50095),n=o(69173);t.default=class{constructor(e,t){(0,i.default)(this,"plugin",void 0),(0,i.default)(this,"hot",void 0),(0,i.default)(this,"endpoints",[]),(0,i.default)(this,"settings",void 0),(0,i.default)(this,"settingsType","array"),(0,i.default)(this,"currentEndpoint",null),(0,i.default)(this,"cellsToSetCache",[]),this.plugin=e,this.hot=this.plugin.hot,this.settings=t}initEndpoints(){this.endpoints=this.parseSettings(),this.refreshAllEndpoints()}getEndpoint(e){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings)[e]:this.endpoints[e]}getAllEndpoints(){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings):this.endpoints}fillMissingEndpointData(e){return this.parseSettings(e.call(this))}parseSettings(e){const t=[];let o=e;if(o||"function"!=typeof this.settings)return o||(o=this.settings),(0,r.arrayEach)(o,(e=>{const o={};this.assignSetting(e,o,"ranges",[[0,this.hot.countRows()-1]]),this.assignSetting(e,o,"reversedRowCoords",!1),this.assignSetting(e,o,"destinationRow",new Error("\n You must provide a destination row for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,o,"destinationColumn",new Error("\n You must provide a destination column for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,o,"sourceColumn",e.destinationColumn),this.assignSetting(e,o,"type","sum"),this.assignSetting(e,o,"forceNumeric",!1),this.assignSetting(e,o,"suppressDataTypeErrors",!0),this.assignSetting(e,o,"customFunction",null),this.assignSetting(e,o,"readOnly",!0),this.assignSetting(e,o,"roundFloat",!1),t.push(o)})),t;this.settingsType="function"}assignSetting(e,t,o,s){if("ranges"!==o||void 0!==e[o]){if("ranges"!==o||0!==e[o].length)if(void 0===e[o]){if(s instanceof Error)throw s;t[o]=s}else"destinationRow"===o&&t.reversedRowCoords?t[o]=this.hot.countRows()-e[o]-1:t[o]=e[o]}else t[o]=s}resetSetupBeforeStructureAlteration(e,t,o){if("function"!==this.settingsType)return;const s=e.indexOf("row")>-1?"row":"col",i=this.getAllEndpoints();(0,r.arrayEach)(i,(i=>{"row"===s&&i.destinationRow>=t&&("insert_row"===e?i.alterRowOffset=o:"remove_row"===e&&(i.alterRowOffset=-1*o)),"col"===s&&i.destinationColumn>=t&&("insert_col"===e?i.alterColumnOffset=o:"remove_col"===e&&(i.alterColumnOffset=-1*o))})),this.resetAllEndpoints(i,!1)}resetSetupAfterStructureAlteration(e,t,o,s,i){let n=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if("function"===this.settingsType){const e=()=>(this.hot.removeHook("beforeViewRender",e),this.refreshAllEndpoints());return void this.hot.addHookOnce("beforeViewRender",e)}const a=e.indexOf("row")>-1?"row":"col",l=e.indexOf("remove")>-1?-1:1,h=this.getAllEndpoints(),u=0===e.indexOf("move_row"),d=t;(0,r.arrayEach)(h,(e=>{"row"===a&&e.destinationRow>=d&&(e.alterRowOffset=l*o),"col"===a&&e.destinationColumn>=d&&(e.alterColumnOffset=l*o)})),this.resetAllEndpoints(h,!u),u?(0,r.arrayEach)(h,(e=>{this.extendEndpointRanges(e,d,s[0],s.length),this.recreatePhysicalRanges(e),this.clearOffsetInformation(e)})):(0,r.arrayEach)(h,(e=>{this.shiftEndpointCoordinates(e,d)})),n&&this.refreshAllEndpoints()}clearOffsetInformation(e){e.alterRowOffset=void 0,e.alterColumnOffset=void 0}extendEndpointRanges(e,t,o,s){(0,r.arrayEach)(e.ranges,(e=>{e[1]&&(t>=e[0]&&t<=e[1]?o>e[1]?e[1]+=s:o<e[0]&&(e[0]-=s):o>=e[0]&&o<=e[1]&&(e[1]-=s,t<=e[0]&&(e[0]+=1,e[1]+=1)))}))}recreatePhysicalRanges(e){const t=e.ranges,o=[],s=[];(0,r.arrayEach)(t,(e=>{const t=[];if(e[1])for(let o=e[0];o<=e[1];o++)t.push(this.hot.toPhysicalRow(o));else t.push(this.hot.toPhysicalRow(e[0]));s.push(t)})),(0,r.arrayEach)(s,(e=>{let t=[];(0,r.arrayEach)(e,((s,i)=>{0===i?t.push(s):e[i]!==e[i-1]+1&&(t.push(e[i-1]),o.push(t),t=[],t.push(s)),i===e.length-1&&(t.push(s),o.push(t))}))})),e.ranges=o}shiftEndpointCoordinates(e,t){e.alterRowOffset&&0!==e.alterRowOffset?(e.destinationRow+=e.alterRowOffset||0,(0,r.arrayEach)(e.ranges,(o=>{(0,r.arrayEach)(o,((s,i)=>{s>=t&&(o[i]+=e.alterRowOffset||0)}))}))):e.alterColumnOffset&&0!==e.alterColumnOffset&&(e.destinationColumn+=e.alterColumnOffset||0,e.sourceColumn+=e.alterColumnOffset||0)}resetAllEndpoints(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAllEndpoints(),t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.some((e=>{const t=e.alterRowOffset||0,o=e.alterColumnOffset||0;return e.destinationRow+t>=this.hot.countRows()||e.destinationColumn+o>=this.hot.countCols()}))||(this.cellsToSetCache=[],(0,r.arrayEach)(e,(e=>{this.resetEndpointValue(e,t)})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[])}refreshAllEndpoints(){this.cellsToSetCache=[],(0,r.arrayEach)(this.getAllEndpoints(),(e=>{this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e,"init")})),this.currentEndpoint=null,this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshChangedEndpoints(e){const t=[];this.cellsToSetCache=[],(0,r.arrayEach)(e,((e,o,s)=>{`${e[2]||""}`!=`${e[3]}`&&(0,r.arrayEach)(this.getAllEndpoints(),((e,i)=>{this.hot.propToCol(s[o][1])===e.sourceColumn&&-1===t.indexOf(i)&&t.push(i)}))})),(0,r.arrayEach)(t,(e=>{this.refreshEndpoint(this.getEndpoint(e))})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshEndpoint(e){this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e),this.currentEndpoint=null}resetEndpointValue(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const o=e.alterRowOffset||0,s=e.alterColumnOffset||0;this.cellsToSetCache.push([this.hot.toVisualRow(e.destinationRow+(t?o:0)),this.hot.toVisualColumn(e.destinationColumn+(t?s:0)),""])}setEndpointValue(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=this.hot.toVisualRow(e.destinationRow);if(e.destinationRow>=this.hot.countRows()||e.destinationColumn>=this.hot.countCols())return void this.throwOutOfBoundsWarning();const i=this.hot.toVisualRow(e.destinationRow);if(null!==i){const o=this.hot.getCellMeta(i,e.destinationColumn);"init"!==t&&o.readOnly===e.readOnly||(o.readOnly=e.readOnly,o.className="columnSummaryResult")}if((!0===e.roundFloat||Number.isInteger(e.roundFloat))&&!isNaN(e.result)){const t=e.roundFloat;let o=0;Number.isInteger(t)&&(o=Math.min(Math.max(0,t),100)),e.result=e.result.toFixed(o)}o?this.hot.setDataAtCell(s,e.destinationColumn,e.result,"ColumnSummary.set"):this.cellsToSetCache.push([s,e.destinationColumn,e.result]),e.alterRowOffset=void 0,e.alterColumnOffset=void 0}throwOutOfBoundsWarning(){(0,n.warn)("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}}},68918:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(24378);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ColumnSummary=s.ColumnSummary},88475:(e,t)=>{"use strict";t.__esModule=!0,t.isNullishOrNaN=function(e){return null==e||isNaN(e)}},59070:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(83302);class n{static get CLASS_EDITOR_CONTAINER(){return"htCommentsContainer"}static get CLASS_EDITOR(){return"htComments"}static get CLASS_INPUT(){return"htCommentTextArea"}static get CLASS_CELL(){return"htCommentCell"}constructor(e,t){(0,i.default)(this,"rootDocument",void 0),(0,i.default)(this,"isRtl",!1),(0,i.default)(this,"container",null),(0,i.default)(this,"editor",void 0),(0,i.default)(this,"editorStyle",void 0),(0,i.default)(this,"hidden",!0),this.rootDocument=e,this.isRtl=t,this.editor=this.createEditor(),this.editorStyle=this.editor.style,this.hide()}setPosition(e,t){this.editorStyle.left=`${e}px`,this.editorStyle.top=`${t}px`}setSize(e,t){if(e&&t){const o=this.getInputElement();o.style.width=`${e}px`,o.style.height=`${t}px`}}getSize(){return{width:(0,r.outerWidth)(this.getInputElement()),height:(0,r.outerHeight)(this.getInputElement())}}resetSize(){const e=this.getInputElement();e.style.width="",e.style.height=""}setReadOnlyState(e){this.getInputElement().readOnly=e}show(){this.editorStyle.display="block",this.hidden=!1}hide(){this.hidden||(this.editorStyle.display="none"),this.hidden=!0}isVisible(){return"block"===this.editorStyle.display}setValue(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")||"";this.getInputElement().value=e}getValue(){return this.getInputElement().value}isFocused(){return this.rootDocument.activeElement===this.getInputElement()}focus(){this.getInputElement().focus()}createEditor(){const e=this.rootDocument.createElement("div"),t=this.rootDocument.createElement("textarea");return e.style.display="none",this.container=this.rootDocument.createElement("div"),this.container.setAttribute("dir",this.isRtl?"rtl":"ltr"),(0,r.addClass)(this.container,n.CLASS_EDITOR_CONTAINER),this.rootDocument.body.appendChild(this.container),(0,r.addClass)(e,n.CLASS_EDITOR),(0,r.addClass)(t,n.CLASS_INPUT),t.setAttribute("data-hot-input",!0),e.appendChild(t),this.container.appendChild(e),e}getInputElement(){return this.editor.querySelector(`.${n.CLASS_INPUT}`)}destroy(){const e=this.container?this.container.parentNode:null;this.editor.parentNode.removeChild(this.editor),this.editor=null,this.editorStyle=null,e&&e.removeChild(this.container)}}t.default=n},34745:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=s(o(48427)),n=s(o(42538)),a=o(83302),l=o(24449),h=o(22232),u=o(36026),d=s(o(59070)),c=s(o(71586)),g=o(90500),f=s(o(21190)),p=s(o(74567)),m=s(o(57817));function w(e,t){v(e,t),t.add(e)}function C(e,t,o){v(e,t),t.set(e,o)}function v(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function y(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(68581);const E=t.PLUGIN_KEY="comments",S=t.PLUGIN_PRIORITY=60,R=t.META_COMMENT="comment",b=t.META_COMMENT_VALUE="value",_=t.META_STYLE="style",T=t.META_READONLY="readOnly",O=E,M=`plugin:${E}`;var I=new WeakMap,A=new WeakMap,N=new WeakMap,P=new WeakMap,x=new WeakMap,H=new WeakMap,k=new WeakMap,D=new WeakSet,L=new WeakSet,W=new WeakSet,F=new WeakSet,V=new WeakSet,B=new WeakSet,U=new WeakSet,Y=new WeakSet,j=new WeakSet,G=new WeakSet;class z extends u.BasePlugin{constructor(){super(...arguments),w(this,G),w(this,j),w(this,Y),w(this,U),w(this,B),w(this,V),w(this,F),w(this,W),w(this,L),w(this,D),(0,i.default)(this,"range",{}),C(this,I,{writable:!0,value:null}),C(this,A,{writable:!0,value:null}),C(this,N,{writable:!0,value:!1}),C(this,P,{writable:!0,value:!1}),C(this,x,{writable:!0,value:{}}),C(this,H,{writable:!0,value:null}),C(this,k,{writable:!0,value:""})}static get PLUGIN_KEY(){return E}static get PLUGIN_PRIORITY(){return S}isEnabled(){return!!this.hot.getSettings()[E]}enablePlugin(){this.enabled||((0,n.default)(this,I)||(0,r.default)(this,I,new d.default(this.hot.rootDocument,this.hot.isRtl())),(0,n.default)(this,A)||(0,r.default)(this,A,new c.default(this.getDisplayDelaySetting())),this.addHook("afterContextMenuDefaultOptions",(e=>this.addToContextMenu(e))),this.addHook("afterRenderer",((e,t,o,s,i,r)=>y(this,F,q).call(this,e,r))),this.addHook("afterScroll",(()=>y(this,G,oe).call(this))),this.addHook("afterBeginEditing",(()=>this.hide())),this.addHook("afterDocumentKeyDown",(e=>y(this,j,te).call(this,e))),(0,n.default)(this,A).addLocalHook("hide",(()=>this.hide())),(0,n.default)(this,A).addLocalHook("show",((e,t)=>this.showAtCell(e,t))),this.registerShortcuts(),this.registerListeners(),super.enablePlugin())}updatePlugin(){(0,n.default)(this,A).updateDelay(this.getDisplayDelaySetting()),super.updatePlugin()}disablePlugin(){this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid"),o=e.addContext(M);t.addShortcut({keys:[["Control","Alt","M"]],callback:()=>{const t=this.hot.getSelectedRangeLast();(0,r.default)(this,P,!0),this.hot.scrollToFocusedCell((()=>{this.setRange(t),this.show(),this.focusEditor(),e.setActiveContextName(M),this.hot._registerTimeout((()=>{(0,r.default)(this,P,!1)}))}))},stopPropagation:!0,runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&!(0,n.default)(this,I).isVisible()},group:O}),o.addShortcut({keys:[["Escape"]],callback:()=>{(0,n.default)(this,I).setValue((0,n.default)(this,k)),this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&(0,n.default)(this,I).isVisible()},group:O}),o.addShortcut({keys:[["Control/Meta","Enter"]],callback:()=>{this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&(0,n.default)(this,I).isVisible()},group:O})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(O)}registerListeners(){const{rootDocument:e}=this.hot,t=this.getEditorInputElement();this.eventManager.addEventListener(e,"mouseover",(e=>y(this,L,$).call(this,e))),this.eventManager.addEventListener(e,"mousedown",(e=>y(this,D,K).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>y(this,W,X).call(this))),this.eventManager.addEventListener(t,"focus",(()=>y(this,B,J).call(this))),this.eventManager.addEventListener(t,"blur",(()=>y(this,V,Q).call(this))),this.eventManager.addEventListener(t,"mousedown",(e=>y(this,U,Z).call(this,e))),this.eventManager.addEventListener(t,"mouseup",(e=>y(this,Y,ee).call(this,e)))}setRange(e){this.range=e}clearRange(){this.range={}}targetIsCellWithComment(e){const t=(0,a.closest)(e.target,"TD","TBODY");return!!(t&&(0,a.hasClass)(t,"htCommentCell")&&(0,a.closest)(t,[this.hot.rootElement]))}targetIsCommentTextArea(e){return this.getEditorInputElement()===e.target}setComment(e){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const t=(0,n.default)(this,I).getValue();let o="";null!=e?o=e:null!=t&&(o=t);const s=this.range.from.row,i=this.range.from.col;this.updateCommentMeta(s,i,{[b]:o}),this.hot.render()}setCommentAtCell(e,t,o){this.setRange({from:this.hot._createCellCoords(e,t)}),this.setComment(o)}removeComment(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');this.hot.setCellMeta(this.range.from.row,this.range.from.col,R),e&&this.hot.render(),this.hide()}removeCommentAtCell(e,t){let o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.setRange({from:this.hot._createCellCoords(e,t)}),this.removeComment(o)}getComment(){const e=this.range.from.row,t=this.range.from.col;return this.getCommentMeta(e,t,b)}getCommentAtCell(e,t){return this.getCommentMeta(e,t,b)}show(){var e;if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{from:{row:t,col:o}}=this.range;if(t<0||t>this.hot.countSourceRows()-1||o<0||o>this.hot.countSourceCols()-1)return!1;const s=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return(0,n.default)(this,A).cancelHiding(),(0,n.default)(this,I).setValue(null!==(e=s[R]?s[R][b]:null)&&void 0!==e?e:""),(0,n.default)(this,I).show(),this.refreshEditor(!0),!0}showAtCell(e,t){return this.setRange({from:this.hot._createCellCoords(e,t)}),this.show()}hide(){(0,n.default)(this,I).hide()}refreshEditor(){var e,t;if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.range.from&&(0,n.default)(this,I).isVisible()))return;const{rowIndexMapper:o,columnIndexMapper:s}=this.hot,{row:i,col:r}=this.range.from;let l=o.getRenderableFromVisualIndex(i),h=s.getRenderableFromVisualIndex(r);const u=null===l;(0,n.default)(this,I).setPosition(0,0),null===l&&(l=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(i,-1))),null===h&&(h=s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(r,-1)));const d=null===l,c=null===h;l=null!==(e=l)&&void 0!==e?e:0,h=null!==(t=h)&&void 0!==t?t:0;const{rootWindow:g,view:{_wt:f}}=this.hot,{wtTable:p}=f,m=f.getCell({row:l,col:h},!0),w=this.getCommentMeta(i,r,_);w?(0,n.default)(this,I).setSize(w.width,w.height):(0,n.default)(this,I).resetSize();const C=c?0:p.getStretchedColumnWidth(h),v=u&&!d?(0,a.outerHeight)(m):0,{left:y,top:E,width:S,height:R}=m.getBoundingClientRect(),{width:b,height:O}=(0,n.default)(this,I).getSize(),{innerWidth:M,innerHeight:A}=this.hot.rootWindow,N=this.hot.rootDocument.documentElement;let P=y+g.scrollX+C,x=E+g.scrollY+v;this.hot.isRtl()&&(P-=b+C),this.hot.isLtr()&&y+S+b>M?P=y+g.scrollX-b-1:this.hot.isRtl()&&P<-(N.scrollWidth-N.clientWidth)&&(P=y+g.scrollX+C+1),E+O>A&&(x-=O-R+1),(0,n.default)(this,I).setPosition(P,x),(0,n.default)(this,I).setReadOnlyState(this.getCommentMeta(i,r,T))}focusEditor(){(0,n.default)(this,I).focus()}updateCommentMeta(e,t,o){const s=this.hot.getCellMeta(e,t)[R];let i;s?(i=(0,h.deepClone)(s),(0,h.deepExtend)(i,o)):i=o,this.hot.setCellMeta(e,t,R,i)}getCommentMeta(e,t,o){const s=this.hot.getCellMeta(e,t);if(s[R])return s[R][o]}addToContextMenu(e){e.items.push({name:g.SEPARATOR},(0,f.default)(this),(0,p.default)(this),(0,m.default)(this))}getDisplayDelaySetting(){const e=this.hot.getSettings()[E];if((0,h.isObject)(e))return e.displayDelay}getEditorInputElement(){return(0,n.default)(this,I).getInputElement()}destroy(){(0,n.default)(this,I)&&(0,n.default)(this,I).destroy(),(0,n.default)(this,A)&&(0,n.default)(this,A).destroy(),super.destroy()}}function K(e){if(this.hot.view&&this.hot.view._wt&&!(0,n.default)(this,N)&&!this.targetIsCommentTextArea(e)){const t=(0,a.closest)(e.target,"TD","TBODY");let o=null;t&&(o=this.hot.getCoords(t)),(!t||this.range.from&&o&&(this.range.from.row!==o.row||this.range.from.col!==o.col))&&this.hide()}}function $(e){const{rootDocument:t}=this.hot;if(!((0,n.default)(this,N)||(0,n.default)(this,I).isFocused()||(0,a.hasClass)(e.target,"wtBorder")||(0,n.default)(this,H)===e.target)&&(0,n.default)(this,I))if((0,r.default)(this,H,t.elementFromPoint(e.clientX,e.clientY)),this.targetIsCellWithComment(e)){const t=this.hot._createCellRange(this.hot.getCoords(e.target));(0,n.default)(this,A).show(t)}else(0,a.isChildOf)(e.target,t)&&!this.targetIsCommentTextArea(e)&&(0,n.default)(this,A).hide()}function X(){(0,r.default)(this,N,!1)}function q(e,t){t[R]&&t[R][b]&&(0,a.addClass)(e,t.commentedCellClassName)}function Q(){(0,r.default)(this,k,""),this.hot.getShortcutManager().setActiveContextName("grid"),this.setComment()}function J(){(0,r.default)(this,k,this.getComment()),this.hot.listen(),this.hot.getShortcutManager().setActiveContextName(M)}function Z(e){(0,r.default)(this,x,{width:(0,a.outerWidth)(e.target),height:(0,a.outerHeight)(e.target)})}function ee(e){const t=(0,a.outerWidth)(e.target),o=(0,a.outerHeight)(e.target);t===(0,n.default)(this,x).width+1&&o===(0,n.default)(this,x).height+2||this.updateCommentMeta(this.range.from.row,this.range.from.col,{[_]:{width:t,height:o}})}function te(e){(0,n.default)(this,I).isVisible()&&(0,l.stopImmediatePropagation)(e)}function oe(){(0,n.default)(this,P)||this.hide()}t.Comments=z},21190:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsAddEdit",name(){var t;const o=null===(t=this.getSelectedRangeLast())||void 0===t?void 0:t.highlight;return null!=o&&o.isCell()&&e.getCommentAtCell(o.row,o.col)?this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_EDIT_COMMENT):this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_ADD_COMMENT)},callback(){const t=this.getSelectedRangeLast();this.deselectCell(),e.setRange(t),e.show(),e.focusEditor()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},57817:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsReadOnly",name(){const t=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);return(0,i.checkSelectionConsistency)(this.getSelectedRange(),((t,o)=>e.getCommentMeta(t,o,r.META_READONLY)))?(0,i.markLabelAsSelected)(t):t},callback(){this.getSelectedRangeLast().forAll(((t,o)=>{if(t>=0&&o>=0){const s=!!e.getCommentMeta(t,o,r.META_READONLY);e.updateCommentMeta(t,o,{[r.META_READONLY]:!s})}}))},disabled(){const t=this.getSelectedRangeLast();return!!(!t||t.highlight.isHeader()||!e.getCommentAtCell(t.highlight.row,t.highlight.col)||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(80734),r=o(34745);function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},74567:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"commentsRemove",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REMOVE_COMMENT)},callback(){this.getSelectedRangeLast().forAll(((t,o)=>{t>=0&&o>=0&&e.removeCommentAtCell(t,o,!1)})),this.render()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},71586:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(85015),n=o(22232),a=s(o(65718));class l{constructor(e){(0,i.default)(this,"wasLastActionShow",!0),(0,i.default)(this,"showDebounced",null),(0,i.default)(this,"hidingTimer",null),this.updateDelay(e)}hide(){this.wasLastActionShow=!1,this.hidingTimer=setTimeout((()=>{!1===this.wasLastActionShow&&this.runLocalHooks("hide")}),250)}show(e){this.wasLastActionShow=!0,this.showDebounced(e)}cancelHiding(){this.wasLastActionShow=!0,clearTimeout(this.hidingTimer),this.hidingTimer=null}updateDelay(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250;this.showDebounced=(0,r.debounce)((e=>{this.wasLastActionShow&&this.runLocalHooks("show",e.from.row,e.from.col)}),e)}destroy(){this.clearLocalHooks()}}(0,n.mixin)(l,a.default);t.default=l},76076:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(34745);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Comments=s.Comments},26514:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517),o(57270);var i=s(o(93231)),r=o(50095),n=o(22232);t.CommandExecutor=class{constructor(e){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"commands",{}),(0,i.default)(this,"commonCallback",null),this.hot=e}registerCommand(e,t){this.commands[e]=t}setCommonCallback(e){this.commonCallback=e}execute(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];const i=e.split(":"),a=i[0],l=2===i.length?i[1]:null;let h=this.commands[a];if(!h)throw new Error(`Menu command '${a}' not exists.`);if(l&&h.submenu&&(h=function(e,t){let o;return(0,r.arrayEach)(t,(t=>{const s=t.key?t.key.split(":"):null;if(Array.isArray(s)&&s[1]===e)return o=t,!1})),o}(l,h.submenu.items)),!0===h.disabled)return;if("function"==typeof h.disabled&&!0===h.disabled.call(this.hot))return;if((0,n.hasOwnProperty)(h,"submenu"))return;const u=[];"function"==typeof h.callback&&u.push(h.callback),"function"==typeof this.commonCallback&&u.push(this.commonCallback),o.unshift(i.join(":")),(0,r.arrayEach)(u,(e=>e.apply(this.hot,o)))}}},52481:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(36026),n=s(o(56307)),a=o(50095),l=o(22232),h=o(26514),u=o(40255),d=o(90437),c=o(80734),g=o(83302),f=o(90500);function p(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function m(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(79498);const w=t.PLUGIN_KEY="contextMenu",C=t.PLUGIN_PRIORITY=70,v=w;n.default.getSingleton().register("afterContextMenuDefaultOptions"),n.default.getSingleton().register("beforeContextMenuShow"),n.default.getSingleton().register("afterContextMenuShow"),n.default.getSingleton().register("afterContextMenuHide"),n.default.getSingleton().register("afterContextMenuExecute");var y=new WeakSet,E=new WeakSet,S=new WeakSet,R=new WeakSet;class b extends r.BasePlugin{constructor(){super(...arguments),p(this,R),p(this,S),p(this,E),p(this,y),(0,i.default)(this,"commandExecutor",new h.CommandExecutor(this.hot)),(0,i.default)(this,"itemsFactory",null),(0,i.default)(this,"menu",null)}static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return C}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[f.ROW_ABOVE,f.ROW_BELOW,f.SEPARATOR,f.COLUMN_LEFT,f.COLUMN_RIGHT,f.SEPARATOR,f.REMOVE_ROW,f.REMOVE_COLUMN,f.SEPARATOR,f.UNDO,f.REDO,f.SEPARATOR,f.READ_ONLY,f.SEPARATOR,f.ALIGNMENT]}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[w];"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.menu=new d.Menu(this.hot,{className:"htContextMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.menu.addLocalHook("beforeOpen",(()=>m(this,E,T).call(this))),this.menu.addLocalHook("afterOpen",(()=>m(this,S,O).call(this))),this.menu.addLocalHook("afterClose",(()=>m(this,R,M).call(this))),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.executeCommand.call(e,...o)})),this.addHook("afterOnCellContextMenu",(e=>m(this,y,_).call(this,e))),this.registerShortcuts(),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&(this.menu.destroy(),this.menu=null),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control/Meta","Shift","Backslash"],["Shift","F10"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();this.hot.scrollToFocusedCell();const t=this.hot.getCell(e.row,e.col,!0).getBoundingClientRect(),o=(0,c.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument);this.open({left:t.left+o.left,top:t.top+o.top-1+t.height},{left:t.width,above:-t.height}),this.menu.getNavigator().toFirstItem()},runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&!this.menu.isOpened()},group:v})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(v)}open(e){var t;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(t=this.menu)&&void 0!==t&&t.isOpened()||(this.prepareMenuItems(),this.menu.open(),(0,l.objectEach)(o,((e,t)=>{this.menu.setOffset(t,e)})),this.menu.setPosition(e))}close(){var e;null===(e=this.menu)||void 0===e||e.close(),this.itemsFactory=null}executeCommand(e){null===this.itemsFactory&&this.prepareMenuItems();for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];this.commandExecutor.execute(e,...o)}prepareMenuItems(){this.itemsFactory=new u.ItemsFactory(this.hot,b.DEFAULT_ITEMS);const e=this.hot.getSettings()[w],t={items:this.itemsFactory.getItems(e)};this.hot.runHooks("afterContextMenuDefaultOptions",t),this.itemsFactory.setPredefinedItems(t.items);const o=this.itemsFactory.getItems(e);this.hot.runHooks("beforeContextMenuSetItems",o),this.menu.setMenuItems(o),(0,a.arrayEach)(o,(e=>this.commandExecutor.registerCommand(e.key,e)))}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function _(e){const t=this.hot.getSettings(),o=t.rowHeaders,s=t.colHeaders;const i=e.target;if(this.close(),(0,g.hasClass)(i,"handsontableInput"))return;if(e.preventDefault(),e.stopPropagation(),!o&&!s&&!(function(e){return"TD"===e.nodeName||"TD"===e.parentNode.nodeName}(i)||(0,g.hasClass)(i,"current")&&(0,g.hasClass)(i,"wtBorder")))return;const r=(0,c.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument);this.open({top:e.clientY+r.top,left:e.clientX+r.left})}function T(){this.hot.runHooks("beforeContextMenuShow",this)}function O(){this.hot.runHooks("afterContextMenuShow",this)}function M(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}t.ContextMenu=b,b.SEPARATOR={name:f.SEPARATOR}},86738:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(52481);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ContextMenu=s.ContextMenu},40255:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(22232),n=o(50095),a=o(90500);t.ItemsFactory=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;(0,i.default)(this,"hot",void 0),(0,i.default)(this,"predefinedItems",(0,a.predefinedItems)()),(0,i.default)(this,"defaultOrderPattern",void 0),this.hot=e,this.defaultOrderPattern=t}setPredefinedItems(e){const t={};this.defaultOrderPattern.length=0,(0,r.objectEach)(e,((e,o)=>{let s="";e.name===a.SEPARATOR?(t[a.SEPARATOR]=e,s=a.SEPARATOR):isNaN(parseInt(o,10))?(e.key=void 0===e.key?o:e.key,t[o]=e,s=e.key):(t[e.key]=e,s=e.key),this.defaultOrderPattern.push(s)})),this.predefinedItems=t}getItems(){return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const s=[];let i=e;i&&i.items?i=i.items:Array.isArray(i)||(i=t);(0,r.isObject)(i)?(0,r.objectEach)(i,((e,t)=>{let i=o["string"==typeof e?e:t];i||(i=e),(0,r.isObject)(e)?(0,r.extend)(i,e):"string"==typeof i&&(i={name:i}),void 0===i.key&&(i.key=t),s.push(i)})):(0,n.arrayEach)(i,((e,t)=>{let i=o[e];!i&&a.ITEMS.indexOf(e)>=0||(i||(i={name:e,key:`${t}`}),(0,r.isObject)(e)&&(0,r.extend)(i,e),void 0===i.key&&(i.key=t),s.push(i))}));return s}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.defaultOrderPattern,this.predefinedItems)}}},91801:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231));t.Cursor=class{constructor(e,t){(0,i.default)(this,"top",void 0),(0,i.default)(this,"topRelative",void 0),(0,i.default)(this,"left",void 0),(0,i.default)(this,"leftRelative",void 0),(0,i.default)(this,"scrollTop",void 0),(0,i.default)(this,"scrollLeft",void 0),(0,i.default)(this,"cellHeight",void 0),(0,i.default)(this,"cellWidth",void 0);const o=t.scrollY,s=t.scrollX;let r,n,a,l,h,u;this.rootWindow=t,this.type=this.getSourceType(e),"literal"===this.type?(r=parseInt(e.top,10),a=parseInt(e.left,10),h=e.height||0,u=e.width||0,n=r,l=a,r+=o,a+=s):"event"===this.type&&(r=parseInt(e.pageY,10),a=parseInt(e.pageX,10),h=e.target.clientHeight,u=e.target.clientWidth,n=r-o,l=a-s),this.top=r,this.topRelative=n,this.left=a,this.leftRelative=l,this.scrollTop=o,this.scrollLeft=s,this.cellHeight=h,this.cellWidth=u}getSourceType(e){let t="literal";return e instanceof Event&&(t="event"),t}fitsAbove(e){return this.topRelative>=e.offsetHeight}fitsBelow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerHeight;return this.topRelative+e.offsetHeight<=t}fitsOnRight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerWidth;return this.leftRelative+this.cellWidth+e.offsetWidth<=t}fitsOnLeft(e){return this.leftRelative>=e.offsetWidth}}},97818:(e,t)=>{"use strict";t.__esModule=!0,t.createDefaultShortcutsList=function(e){return[{keys:[["Tab"],["Shift","Tab"],["Control/Meta","A"]],forwardToContext:e.hot.getShortcutManager().getContext("grid"),callback:()=>e.close(!0)},{keys:[["Escape"]],callback:()=>e.close()},{keys:[["ArrowDown"]],callback:()=>e.getNavigator().toNextItem()},{keys:[["ArrowUp"]],callback:()=>e.getNavigator().toPreviousItem()},{keys:[["ArrowRight"]],callback:()=>{const t=e.hotMenu.getSelectedLast();if(t){const o=e.openSubMenu(t[0]);o&&o.getNavigator().toFirstItem()}}},{keys:[["ArrowLeft"]],callback:()=>{e.hotMenu.getSelectedLast()&&e.isSubMenu()&&(e.close(),e.isSubMenu()&&e.parentMenu.hotMenu.listen())}},{keys:[["Control/Meta","ArrowUp"],["Home"]],callback:()=>e.getNavigator().toFirstItem()},{keys:[["Control/Meta","ArrowDown"],["End"]],callback:()=>e.getNavigator().toLastItem()},{keys:[["Enter"],["Space"]],callback:t=>{const o=e.hotMenu.getSelectedLast();o&&(e.hotMenu.getSourceDataAtRow(o[0]).submenu?e.openSubMenu(o[0]).getNavigator().toFirstItem():(e.executeCommand(t),e.close(!0)))}},{keys:[["PageUp"]],callback:()=>{e.hotMenu.getSelectedLast()?e.hotMenu.selection.transformStart(-e.hotMenu.countVisibleRows(),0):e.getNavigator().toFirstItem()}},{keys:[["PageDown"]],callback:()=>{e.hotMenu.getSelectedLast()?e.hotMenu.selection.transformStart(e.hotMenu.countVisibleRows(),0):e.getNavigator().toLastItem()}}]}},90437:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(95369);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}))},95369:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=s(o(48427)),n=s(o(42538)),a=o(62587),l=o(32967),h=o(58045),u=o(90500),d=o(69498),c=s(o(75244)),g=o(50095),f=o(37595),p=o(83302),m=o(24449),w=o(85015),C=o(93315),v=o(22232),y=s(o(65718)),E=o(77003),S=o(5386);function R(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var b=new WeakMap,_=new WeakMap;class T{constructor(e,t){var o=this;(0,i.default)(this,"hot",void 0),(0,i.default)(this,"options",void 0),(0,i.default)(this,"eventManager",new c.default(this)),(0,i.default)(this,"container",void 0),(0,i.default)(this,"positioner",void 0),(0,i.default)(this,"hotMenu",null),(0,i.default)(this,"hotSubMenus",{}),(0,i.default)(this,"parentMenu",void 0),(0,i.default)(this,"menuItems",null),(0,i.default)(this,"origOutsideClickDeselects",null),R(this,b,{writable:!0,value:void 0}),R(this,_,{writable:!0,value:void 0}),this.hot=e,this.options=t||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:215,container:this.hot.rootDocument.documentElement},this.container=this.createContainer(this.options.name),this.positioner=new a.Positioner(this.options.keepInViewport),this.parentMenu=this.options.parent||null,this.registerEvents(),this.isSubMenu()&&this.addLocalHook("afterSelectionChange",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.parentMenu.runLocalHooks("afterSelectionChange",...t)}))}registerEvents(){let e=this.hot.rootWindow;for(;e;)this.eventManager.addEventListener(e.document,"mousedown",(e=>this.onDocumentMouseDown(e))),this.eventManager.addEventListener(e.document,"contextmenu",(e=>this.onDocumentContextMenu(e))),e=(0,p.getParentWindow)(e)}setMenuItems(e){this.menuItems=e}getNavigator(){return(0,n.default)(this,b)}getKeyboardShortcutsCtrl(){return(0,n.default)(this,_)}getSelectedItem(){return this.hasSelectedItem()?this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]):null}hasSelectedItem(){return Array.isArray(this.hotMenu.getSelectedLast())}isSubMenu(){return null!==this.parentMenu}open(){this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";const e=(0,w.debounce)((e=>this.openSubMenu(e)),300),t=this.options.minWidth||215;let o=!1,s=(0,g.arrayFilter)(this.menuItems,(e=>(e.key===u.NO_ITEMS&&(o=!0),(0,d.isItemHidden)(e,this.hot))));if(s.length<1&&!o)s.push((0,u.predefinedItems)()[u.NO_ITEMS]);else if(0===s.length)return;s=(0,d.filterSeparators)(s,u.SEPARATOR);let i=!1;const a={data:s,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth:e=>(0,C.isDefined)(e)&&e<t?t:e,autoRowSize:!1,readOnly:!0,editor:!1,copyPaste:!1,hiddenRows:!0,maxCols:1,columns:[{data:"name",renderer:(0,E.createMenuItemRenderer)(this.hot)}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",layoutDirection:this.hot.isRtl()?"rtl":"ltr",ariaTags:!1,beforeOnCellMouseOver:(e,t)=>{(0,n.default)(this,b).setCurrentPage(t.row)},afterOnCellMouseOver:(t,o)=>{this.isAllSubMenusClosed()?e(o.row):this.openSubMenu(o.row)},rowHeights:e=>s[e].name===u.SEPARATOR?1:23,afterOnCellContextMenu:e=>{e.preventDefault(),(0,f.isWindowsOS)()&&i&&this.hasSelectedItem()&&this.close(!0)},afterSelection:(e,t,o,s,i)=>{this.hotMenu.view.isMouseDown()&&(i.value=!0),this.runLocalHooks("afterSelectionChange",this.getSelectedItem())},beforeOnCellMouseUp:e=>{this.hasSelectedItem()&&(i=!this.isCommandPassive(this.getSelectedItem()),this.executeCommand(e))},afterOnCellMouseUp:e=>{(0,f.isWindowsOS)()&&(0,m.isRightClick)(e)||!i||!this.hasSelectedItem()||((0,f.isMobileBrowser)()||(0,f.isIpadOS)()?this.hot._registerTimeout((()=>this.close(!0)),325):this.close(!0))},afterUnlisten:()=>{!this.hasSelectedItem()&&this.isOpened()&&this.hotMenu.listen()}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new this.hot.constructor(this.container,a),this.hotMenu.addHook("afterInit",(()=>this.onAfterInit())),this.hotMenu.init(),(0,r.default)(this,b,(0,l.createMenuNavigator)(this.hotMenu)),(0,r.default)(this,_,(0,h.createKeyboardShortcutsCtrl)(this)),(0,n.default)(this,_).listen(),this.focus(),this.isSubMenu()&&this.addLocalHook("afterOpen",(()=>this.parentMenu.runLocalHooks("afterSubmenuOpen",this))),this.runLocalHooks("afterOpen",this)}close(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isOpened())if(e&&this.isSubMenu())this.parentMenu.close();else if((0,n.default)(this,b).clear(),this.closeAllSubMenus(),this.container.style.display="none",this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.isSubMenu()){if(this.hot.getSettings().ariaTags){const e=this.parentMenu.hotMenu.getSelectedLast();if(e){const t=this.parentMenu.hotMenu.getCell(e[0],0);(0,p.setAttribute)(t,[(0,S.A11Y_EXPANDED)(!1)])}}this.parentMenu.hotMenu.listen()}}openSubMenu(e){if(!this.hotMenu)return!1;const t=this.hotMenu.getCell(e,0);if(this.closeAllSubMenus(),!t||!(0,d.hasSubMenu)(t))return!1;const o=this.hotMenu.getSourceDataAtRow(e),s=new T(this.hot,{parent:this,name:o.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return s.setMenuItems(o.submenu.items),s.open(),s.setPosition(t.getBoundingClientRect()),this.hotSubMenus[o.key]=s,this.hot.getSettings().ariaTags&&(0,p.setAttribute)(t,[(0,S.A11Y_EXPANDED)(!0)]),s}closeSubMenu(e){const t=this.hotMenu.getSourceDataAtRow(e),o=this.hotSubMenus[t.key];if(o){o.destroy(),delete this.hotSubMenus[t.key];const s=this.hotMenu.getCell(e,0);this.hot.getSettings().ariaTags&&(0,p.setAttribute)(s,[(0,S.A11Y_EXPANDED)(!1)])}}closeAllSubMenus(){(0,g.arrayEach)(this.hotMenu.getData(),((e,t)=>this.closeSubMenu(t)))}isAllSubMenusClosed(){return 0===Object.keys(this.hotSubMenus).length}focus(){this.isOpened()&&(this.hotMenu.rootElement.focus({preventScroll:!0}),this.getKeyboardShortcutsCtrl().listen(),this.hotMenu.listen())}destroy(){const e=this.container.parentNode;this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy(),e&&e.removeChild(this.container)}isOpened(){return null!==this.hotMenu}executeCommand(e){if(!this.isOpened()||!this.hasSelectedItem())return;const t=this.getSelectedItem();if(this.runLocalHooks("select",t,e),this.isCommandPassive(t))return;const o=this.hot.getSelectedRange(),s=o?(0,d.normalizeSelection)(o):[];this.runLocalHooks("executeCommand",t.key,s,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,s,e)}isCommandPassive(e){return!1===e.isCommand||(0,d.isItemSeparator)(e)||(0,d.isItemDisabled)(e,this.hot)||(0,d.isItemSubMenu)(e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.positioner.setOffset(e,t)}setPosition(e){this.isSubMenu()&&this.positioner.setParentElement(this.parentMenu.container),this.positioner.setElement(this.container).updatePosition(e)}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.options.container.ownerDocument;let o,s=e;return s&&((0,w.isFunction)(s)&&(s=s.call(this.hot),s=null===s||(0,C.isUndefined)(s)?"":s.toString()),s=s.replace(/[^A-z0-9]/g,"_"),s=`${this.options.className}Sub_${s}`,o=t.querySelector(`.${this.options.className}.${s}`)),o||(o=t.createElement("div"),(0,p.addClass)(o,`htMenu ${this.options.className}`),s&&(0,p.addClass)(o,s),this.options.container.appendChild(o)),o}onAfterInit(){const{wtTable:e}=this.hotMenu.view._wt,t=this.hotMenu.getSettings().data,o=e.hider.style,s=e.holder.style,i=parseInt(o.width,10),r=(0,g.arrayReduce)(t,((e,t)=>e+(t.name===u.SEPARATOR?1:26)),0);s.width=`${i+3}px`,s.height=`${r+3}px`,o.height=s.height,this.hot.getSettings().ariaTags&&(0,p.setAttribute)(this.hotMenu.rootElement,[(0,S.A11Y_MENU)(),(0,S.A11Y_TABINDEX)(-1)])}onDocumentMouseDown(e){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!(0,p.isChildOf)(e.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||(0,p.isChildOf)(e.target,".htMenu")||this.close(!0))}onDocumentContextMenu(e){this.isOpened()&&(0,p.hasClass)(e.target,"htCore")&&(0,p.isChildOf)(e.target,this.hotMenu.rootElement)&&e.preventDefault()}}t.Menu=T,(0,v.mixin)(T,y.default)},77003:(e,t,o)=>{"use strict";t.__esModule=!0,t.createMenuItemRenderer=function(e){return(t,o,n,a,l,h)=>{if(o.hasAttribute("ghost-table"))return;const u=t.getSourceDataAtRow(n),d=e.rootDocument.createElement("div"),c="function"==typeof h?h.call(e):h;if((0,i.empty)(o),(0,i.addClass)(d,"htItemWrapper"),e.getSettings().ariaTags){const t=!(0,s.isItemDisabled)(u,e)&&!(0,s.isItemSelectionDisabled)(u)&&!(0,s.isItemSeparator)(u);(0,i.setAttribute)(o,[(0,r.A11Y_MENU_ITEM)(),(0,r.A11Y_LABEL)(c),...t?[(0,r.A11Y_TABINDEX)(-1)]:[],...(0,s.isItemDisabled)(u,e)?[(0,r.A11Y_DISABLED)()]:[],...(0,s.isItemSubMenu)(u)?[(0,r.A11Y_EXPANDED)(!1)]:[]])}o.className="",o.appendChild(d),(0,s.isItemSeparator)(u)?(0,i.addClass)(o,"htSeparator"):"function"==typeof u.renderer?((0,i.addClass)(o,"htCustomMenuRenderer"),o.appendChild(u.renderer(t,d,n,a,l,c))):(0,i.fastInnerHTML)(d,c),(0,s.isItemDisabled)(u,e)?(0,i.addClass)(o,"htDisabled"):(0,s.isItemSelectionDisabled)(u)?(0,i.addClass)(o,"htSelectionDisabled"):(0,s.isItemSubMenu)(u)&&(0,i.addClass)(o,"htSubmenu")}};var s=o(69498),i=o(83302),r=o(5386)},32967:(e,t,o)=>{"use strict";t.__esModule=!0,t.createMenuNavigator=function(e){return(0,s.createPaginator)({size:()=>e.countRows(),onItemSelect(t,o){const s=e.getCell(t,0);if(!s||(0,i.isSeparator)(s)||(0,i.isDisabled)(s)||(0,i.isSelectionDisabled)(s))return!1;e.selectCell(t,0,...o?[t,0,!1,!1]:[])},onClear(){e.deselectCell()}})};var s=o(29583),i=o(69498)},62587:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(42538)),r=s(o(48427)),n=o(91801);function a(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var l=new WeakMap,h=new WeakMap,u=new WeakMap,d=new WeakMap,c=new WeakMap;t.Positioner=class{constructor(e){a(this,l,{writable:!0,value:void 0}),a(this,h,{writable:!0,value:void 0}),a(this,u,{writable:!0,value:void 0}),a(this,d,{writable:!0,value:!1}),a(this,c,{writable:!0,value:{above:0,below:0,left:0,right:0}}),(0,r.default)(this,d,e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(0,i.default)(this,c)[e]=t,this}setElement(e){return(0,r.default)(this,l,e),this}setParentElement(e){return(0,r.default)(this,h,e),this}updatePosition(e){(0,r.default)(this,u,new n.Cursor(e,(0,i.default)(this,l).ownerDocument.defaultView)),(0,i.default)(this,d)?((0,i.default)(this,u).fitsBelow((0,i.default)(this,l))?this.setPositionBelowCursor():(0,i.default)(this,u).fitsAbove((0,i.default)(this,l))?this.setPositionAboveCursor():this.setPositionBelowCursor(),this.updateHorizontalPosition()):(this.setPositionBelowCursor(),this.setPositionOnRightOfCursor())}updateHorizontalPosition(){"rtl"===(0,i.default)(this,l).dir?(0,i.default)(this,u).fitsOnLeft((0,i.default)(this,l))?this.setPositionOnLeftOfCursor():this.setPositionOnRightOfCursor():(0,i.default)(this,u).fitsOnRight((0,i.default)(this,l))?this.setPositionOnRightOfCursor():this.setPositionOnLeftOfCursor()}setPositionAboveCursor(){let e=(0,i.default)(this,c).above+(0,i.default)(this,u).top-(0,i.default)(this,l).offsetHeight;(0,i.default)(this,h)&&(e=(0,i.default)(this,u).top+(0,i.default)(this,u).cellHeight-(0,i.default)(this,l).offsetHeight+3),(0,i.default)(this,l).style.top=`${e}px`}setPositionBelowCursor(){let e=(0,i.default)(this,c).below+(0,i.default)(this,u).top+1;(0,i.default)(this,h)&&(e=(0,i.default)(this,u).top-1),(0,i.default)(this,l).style.top=`${e}px`}setPositionOnRightOfCursor(){let e=(0,i.default)(this,u).left;if((0,i.default)(this,h)){const{right:t}=(0,i.default)(this,h).getBoundingClientRect();e+=(0,i.default)(this,u).cellWidth+t-((0,i.default)(this,u).left+(0,i.default)(this,u).cellWidth)}else e+=(0,i.default)(this,c).right;(0,i.default)(this,l).style.left=`${e}px`}setPositionOnLeftOfCursor(){let e=(0,i.default)(this,c).left+(0,i.default)(this,u).left-(0,i.default)(this,l).offsetWidth;if((0,i.default)(this,h)){const{left:t}=(0,i.default)(this,h).getBoundingClientRect();e-=(0,i.default)(this,u).left-t}(0,i.default)(this,l).style.left=`${e}px`}}},58045:(e,t,o)=>{"use strict";t.__esModule=!0,t.createKeyboardShortcutsCtrl=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const o=[];function n(e,t){h(t).addShortcuts(e,{group:i})}function a(e,t){const s=h(t);e.forEach((e=>{let{keys:t}=e;t.forEach((e=>s.removeShortcutsByKeys(e)))})),o.push({shortcuts:e,contextName:t}),n(e,t)}function l(e){return e?`${r}:${e}`:r}function h(t){var o;const s=e.hotMenu.getShortcutManager(),i=l(t);return null!==(o=s.getContext(i))&&void 0!==o?o:s.addContext(i)}return n((0,s.createDefaultShortcutsList)(e)),t.forEach((e=>{let{shortcuts:t,contextName:o}=e;a(t,o)})),{addCustomShortcuts:a,getCustomShortcuts:function(){return[...o]},getContext:h,listen:function(t){e.hotMenu.getShortcutManager().setActiveContextName(l(t))}}},o(63517);var s=o(97818);const i="menu",r=i},69498:(e,t,o)=>{"use strict";t.__esModule=!0,t.filterSeparators=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.SEPARATOR,o=e.slice(0);return o=a(o,t),o=function(e,t){let o=e.slice(0);return o.reverse(),o=a(o,t),o.reverse(),o}(o,t),o=function(e){const t=[];return(0,s.arrayEach)(e,((e,o)=>{o>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)})),t}(o),o},t.hasSubMenu=function(e){return(0,r.hasClass)(e,"htSubmenu")},t.isDisabled=function(e){return(0,r.hasClass)(e,"htDisabled")},t.isItemDisabled=function(e,t){return!0===e.disabled||"function"==typeof e.disabled&&!0===e.disabled.call(t)},t.isItemHidden=function(e,t){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(t))},t.isItemSelectionDisabled=function(e){return(0,i.hasOwnProperty)(e,"disableSelection")},t.isItemSeparator=function(e){return new RegExp(n.SEPARATOR,"i").test(e.name)},t.isItemSubMenu=function(e){return(0,i.hasOwnProperty)(e,"submenu")},t.isSelectionDisabled=function(e){return(0,r.hasClass)(e,"htSelectionDisabled")},t.isSeparator=function(e){return(0,r.hasClass)(e,"htSeparator")},t.normalizeSelection=function(e){return(0,s.arrayMap)(e,(e=>({start:e.getTopStartCorner(),end:e.getBottomEndCorner()})))},o(63517);var s=o(50095),i=o(22232),r=o(83302),n=o(90500);function a(e,t){const o=e.slice(0);for(let e=0;e<o.length&&o[e].name===t;)o.shift();return o}},33439:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:a,name(){return this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT)},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||!(this.getSelectedRange()&&!this.selection.isSelectedByCorner()))},submenu:{items:[{key:`${a}:left`,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const o=this.getCellMeta(e,t).className;if(o&&-1!==o.indexOf("htLeft"))return!0}))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="horizontal",i="htLeft";this.runHooks("beforeCellAlignment",t,e,o,i),(0,s.align)(e,o,i,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${a}:center`,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const o=this.getCellMeta(e,t).className;if(o&&-1!==o.indexOf("htCenter"))return!0}))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="horizontal",i="htCenter";this.runHooks("beforeCellAlignment",t,e,o,i),(0,s.align)(e,o,i,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${a}:right`,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const o=this.getCellMeta(e,t).className;if(o&&-1!==o.indexOf("htRight"))return!0}))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="horizontal",i="htRight";this.runHooks("beforeCellAlignment",t,e,o,i),(0,s.align)(e,o,i,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${a}:justify`,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const o=this.getCellMeta(e,t).className;if(o&&-1!==o.indexOf("htJustify"))return!0}))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="horizontal",i="htJustify";this.runHooks("beforeCellAlignment",t,e,o,i),(0,s.align)(e,o,i,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{name:i.KEY},{key:`${a}:top`,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT_TOP);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const o=this.getCellMeta(e,t).className;if(o&&-1!==o.indexOf("htTop"))return!0}))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="vertical",i="htTop";this.runHooks("beforeCellAlignment",t,e,o,i),(0,s.align)(e,o,i,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${a}:middle`,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const o=this.getCellMeta(e,t).className;if(o&&-1!==o.indexOf("htMiddle"))return!0}))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="vertical",i="htMiddle";this.runHooks("beforeCellAlignment",t,e,o,i),(0,s.align)(e,o,i,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1},{key:`${a}:bottom`,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>{const o=this.getCellMeta(e,t).className;if(o&&-1!==o.indexOf("htBottom"))return!0}))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.getAlignmentClasses)(e,((e,t)=>this.getCellMeta(e,t).className)),o="vertical",i="htBottom";this.runHooks("beforeCellAlignment",t,e,o,i),(0,s.align)(e,o,i,((e,t)=>this.getCellMeta(e,t)),((e,t,o,s)=>this.setCellMeta(e,t,o,s))),this.render()},disabled:!1}]}}};var s=o(80734),i=o(11689),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.KEY="alignment"},8295:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_CLEAR_COLUMN)},callback(e,t){const o=t[0].start.col,s=t[0].end.col;this.countRows()&&this.populateFromArray(0,o,[[null]],Math.max(t[0].start.row,t[0].end.row),s,"ContextMenu.clearColumn")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByColumnHeader())}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.KEY="clear_column"},19865:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_INSERT_LEFT)},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner(),t=this.isRtl()?"insert_col_end":"insert_col_start";this.alter(t,e.col,1,"ContextMenu.columnLeft")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;if(this.selection.isSelectedByCorner()){return 0===this.countCols()}return this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols},hidden(){return!this.getSettings().allowInsertColumn}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.KEY="col_left"},27471:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_INSERT_RIGHT)},callback(){const e=this.getSelectedRangeLast().getTopRightCorner(),t=this.isRtl()?"insert_col_start":"insert_col_end";this.alter(t,e.col,1,"ContextMenu.columnRight")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols))},hidden(){return!this.getSettings().allowInsertColumn}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.KEY="col_right"},90500:(e,t,o)=>{"use strict";t.__esModule=!0,t.addItem=function(e,t){-1===v.indexOf(e)&&(y[e]=t)},t.predefinedItems=function(){const e={};return(0,s.objectEach)(y,((t,o)=>{e[o]=t()})),e};var s=o(22232),i=C(o(33439));t.ALIGNMENT=i.KEY;var r=C(o(8295));t.CLEAR_COLUMN=r.KEY;var n=C(o(19865));t.COLUMN_LEFT=n.KEY;var a=C(o(27471));t.COLUMN_RIGHT=a.KEY;var l=C(o(37010));t.READ_ONLY=l.KEY;var h=C(o(1687));t.REDO=h.KEY;var u=C(o(63665));t.REMOVE_COLUMN=u.KEY;var d=C(o(90458));t.REMOVE_ROW=d.KEY;var c=C(o(96604));t.ROW_ABOVE=c.KEY;var g=C(o(96599));t.ROW_BELOW=g.KEY;var f=C(o(11689));t.SEPARATOR=f.KEY;var p=C(o(10490));t.NO_ITEMS=p.KEY;var m=C(o(47872));function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(w=function(e){return e?o:t})(e)}function C(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=w(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}t.UNDO=m.KEY;const v=t.ITEMS=[c.KEY,g.KEY,n.KEY,a.KEY,r.KEY,d.KEY,u.KEY,m.KEY,h.KEY,l.KEY,i.KEY,f.KEY,p.KEY],y={[f.KEY]:f.default,[p.KEY]:p.default,[c.KEY]:c.default,[g.KEY]:g.default,[n.KEY]:n.default,[a.KEY]:a.default,[r.KEY]:r.default,[d.KEY]:d.default,[u.KEY]:u.default,[m.KEY]:m.default,[h.KEY]:h.default,[l.KEY]:l.default,[i.KEY]:i.default}},10490:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:i,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_NO_ITEMS)},disabled:!0,isCommand:!1}};var s=o(77516);const i=t.KEY="no_items"},37010:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:a,name(){let e=this.getTranslatedPhrase(r.CONTEXTMENU_ITEMS_READ_ONLY);return(0,s.checkSelectionConsistency)(this.getSelectedRange(),((e,t)=>this.getCellMeta(e,t).readOnly))&&(e=(0,s.markLabelAsSelected)(e)),e},callback(){const e=this.getSelectedRange(),t=(0,s.checkSelectionConsistency)(e,((e,t)=>this.getCellMeta(e,t).readOnly));(0,i.arrayEach)(e,(e=>{e.forAll(((e,o)=>{e>=0&&o>=0&&this.setCellMeta(e,o,"readOnly",!t)}))})),this.render()},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||(!!this.selection.isSelectedByCorner()||(0===this.countRows()||0===this.countCols()||(!this.getSelectedRange()||0===this.getSelectedRange().length))))}}};var s=o(80734),i=o(50095),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.KEY="make_read_only"},1687:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REDO)},callback(){this.redo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isRedoAvailable()}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.KEY="redo"},63665:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:n,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[,o,,s]=e[0];o-s!=0&&(t=1)}return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_REMOVE_COLUMN,t)},callback(){this.alter("remove_col",(0,s.transformSelectionToColumnDistance)(this),null,"ContextMenu.removeColumn")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;const t=this.countCols();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByRowHeader()||0===t},hidden(){return!this.getSettings().allowRemoveColumn}}};var s=o(69248),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const n=t.KEY="remove_col"},90458:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:n,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[o,,s]=e[0];o-s!=0&&(t=1)}return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_REMOVE_ROW,t)},callback(){this.alter("remove_row",(0,s.transformSelectionToRowDistance)(this),1,"ContextMenu.removeRow")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;const t=this.countRows();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByColumnHeader()||0===t},hidden(){return!this.getSettings().allowRemoveRow}}};var s=o(69248),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const n=t.KEY="remove_row"},96604:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_ROW_ABOVE)},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner();this.alter("insert_row_above",e.row,1,"ContextMenu.rowAbove")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;if(this.selection.isSelectedByCorner()){return 0===this.countRows()}return this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows},hidden(){return!this.getSettings().allowInsertRow}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.KEY="row_above"},96599:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_ROW_BELOW)},callback(){const e=this.getSelectedRangeLast().getBottomRightCorner();this.alter("insert_row_below",e.row,1,"ContextMenu.rowBelow")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.row<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows))},hidden(){return!this.getSettings().allowInsertRow}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.KEY="row_below"},11689:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){return{name:o}};const o=t.KEY="---------"},47872:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(){return{key:r,name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_UNDO)},callback(){this.undo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isUndoAvailable()}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}const r=t.KEY="undo"},80734:(e,t,o)=>{"use strict";t.__esModule=!0,t.align=function(e,t,o,n,a){(0,s.arrayEach)(e,(e=>{e.forAll(((e,s)=>{e>=0&&s>=0&&function(e,t,o,s,n,a){const l=n(e,t);let h=s;l.className&&(h="vertical"===o?i(l.className,s):r(l.className,s));a(e,t,"className",h)}(e,s,t,o,n,a)}))}))},t.checkSelectionConsistency=function(e,t){let o=!1;Array.isArray(e)&&(0,s.arrayEach)(e,(e=>(e.forAll(((e,s)=>{if(e>=0&&s>=0&&t(e,s))return o=!0,!1})),o)));return o},t.getAlignmentClasses=function(e,t){const o={};return(0,s.arrayEach)(e,(e=>{e.forAll(((e,s)=>{e>=0&&s>=0&&(o[e]||(o[e]=[]),o[e][s]=t(e,s))}))})),o},t.getDocumentOffsetByElement=function(e,t){const o={top:0,left:0};if(t!==e.ownerDocument){const{frameElement:e}=t.defaultView,{top:s,left:i}=e.getBoundingClientRect();o.top=s,o.left=i}return o},t.markLabelAsSelected=function(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`},t.prepareHorizontalAlignClass=r,t.prepareVerticalAlignClass=i;var s=o(50095);function i(e,t){if(-1!==e.indexOf(t))return e;return`${e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","")} ${t}`}function r(e,t){if(-1!==e.indexOf(t))return e;return`${e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","")} ${t}`}},31856:(e,t)=>{"use strict";t.__esModule=!0;t.default=class{constructor(){this.data={}}setData(e,t){this.data[e]=t}getData(e){return this.data[e]||void 0}}},6706:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_COPY)},callback(){e.copyCellsOnly()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=o(77516)},95842:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_column_headers_only",name(){const e=this.getSelectedRangeLast(),t=e?(0,i.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY,t)},callback(){e.copyColumnHeadersOnly()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=o(77516),i=o(68145)},99411:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_with_column_group_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,i.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS,t)},callback(){e.copyWithAllColumnHeaders()},disabled(){if(!this.hasColHeaders()||!this.getSettings().nestedHeaders)return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=o(77516),i=o(68145)},80370:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"copy_with_column_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,i.clamp)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS,t)},callback(){e.copyWithColumnHeaders()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=o(77516),i=o(68145)},96813:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"cut",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_CUT)},callback(){e.cut()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},63273:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=s(o(42538)),n=s(o(48427)),a=o(36026),l=s(o(56307)),h=o(29270),u=o(50095),d=o(18609),c=o(83302),g=o(37595),f=s(o(6706)),p=s(o(95842)),m=s(o(99411)),w=s(o(80370)),C=s(o(96813)),v=s(o(83697)),y=o(70189),E=o(52870);function S(e,t){b(e,t),t.add(e)}function R(e,t,o){b(e,t),t.set(e,o)}function b(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(63824),l.default.getSingleton().register("afterCopyLimit"),l.default.getSingleton().register("modifyCopyableRange"),l.default.getSingleton().register("beforeCut"),l.default.getSingleton().register("afterCut"),l.default.getSingleton().register("beforePaste"),l.default.getSingleton().register("afterPaste"),l.default.getSingleton().register("beforeCopy"),l.default.getSingleton().register("afterCopy");const T=t.PLUGIN_KEY="copyPaste",O=t.PLUGIN_PRIORITY=80,M=["fragmentSelection"],I=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join("");var A=new WeakMap,N=new WeakMap,P=new WeakMap,x=new WeakMap,H=new WeakMap,k=new WeakMap,D=new WeakMap,L=new WeakMap,W=new WeakSet,F=new WeakSet,V=new WeakSet,B=new WeakSet,U=new WeakSet,Y=new WeakSet,j=new WeakSet,G=new WeakSet,z=new WeakSet,K=new WeakSet;class $ extends a.BasePlugin{constructor(){super(...arguments),S(this,K),S(this,z),S(this,G),S(this,j),S(this,Y),S(this,U),S(this,B),S(this,V),S(this,F),S(this,W),(0,i.default)(this,"columnsLimit",1/0),(0,i.default)(this,"rowsLimit",1/0),(0,i.default)(this,"pasteMode","overwrite"),(0,i.default)(this,"uiContainer",this.hot.rootDocument.body),R(this,A,{writable:!0,value:!1}),R(this,N,{writable:!0,value:!1}),R(this,P,{writable:!0,value:!1}),R(this,x,{writable:!0,value:"cells-only"}),R(this,H,{writable:!0,value:!1}),R(this,k,{writable:!0,value:!1}),R(this,D,{writable:!0,value:new y.CopyableRangesFactory({countRows:()=>this.hot.countRows(),countColumns:()=>this.hot.countCols(),rowsLimit:()=>this.rowsLimit,columnsLimit:()=>this.columnsLimit,countColumnHeaders:()=>this.hot.view.getColumnHeadersCount()})}),R(this,L,{writable:!0,value:!1}),(0,i.default)(this,"copyableRanges",[])}static get PLUGIN_KEY(){return T}static get SETTING_KEYS(){return[T,...M]}static get PLUGIN_PRIORITY(){return O}isEnabled(){return!!this.hot.getSettings()[T]}enablePlugin(){var e=this;if(this.enabled)return;const{[T]:t}=this.hot.getSettings();var o,s;"object"==typeof t&&(this.pasteMode=null!==(o=t.pasteMode)&&void 0!==o?o:this.pasteMode,this.rowsLimit=isNaN(t.rowsLimit)?this.rowsLimit:t.rowsLimit,this.columnsLimit=isNaN(t.columnsLimit)?this.columnsLimit:t.columnsLimit,(0,n.default)(this,A,!!t.copyColumnHeaders),(0,n.default)(this,N,!!t.copyColumnGroupHeaders),(0,n.default)(this,P,!!t.copyColumnHeadersOnly),this.uiContainer=null!==(s=t.uiContainer)&&void 0!==s?s:this.uiContainer);this.addHook("afterContextMenuDefaultOptions",(e=>_(this,U,Z).call(this,e))),this.addHook("afterSelection",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return _(e,Y,ee).call(e,...o)})),this.addHook("afterSelectionEnd",(()=>_(this,j,te).call(this))),this.eventManager.addEventListener(this.hot.rootDocument,"copy",(function(){return e.onCopy(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"cut",(function(){return e.onCut(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"paste",(function(){return e.onPaste(...arguments)})),(0,g.isSafari)()&&(this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseenter",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return _(e,G,oe).call(e,...o)})),this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseleave",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return _(e,z,se).call(e,...o)})),this.addHook("afterSelection",(()=>_(this,K,ie).call(this)))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin()}copy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cells-only";(0,n.default)(this,x,e),(0,n.default)(this,H,!0),_(this,W,X).call(this,"copy")}copyCellsOnly(){this.copy("cells-only")}copyColumnHeadersOnly(){this.copy("column-headers-only")}copyWithAllColumnHeaders(){this.copy("with-column-group-headers")}copyWithColumnHeaders(){this.copy("with-column-headers")}cut(){(0,n.default)(this,k,!0),_(this,W,X).call(this,"cut")}getRangedCopyableData(e){return(0,h.stringify)(this.getRangedData(e))}getRangedData(e){const t=[],{rows:o,columns:s}=(0,y.normalizeRanges)(e);return(0,u.arrayEach)(o,(e=>{const o=[];(0,u.arrayEach)(s,(t=>{e<0?o.push(this.hot.getColHeader(t,e)):o.push(this.hot.getCopyableData(e,t))})),t.push(o)})),t}paste(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(!e&&!t)return;const o=new v.default;e&&o.clipboardData.setData("text/plain",e),t&&o.clipboardData.setData("text/html",t),this.onPaste(o)}setCopyableText(){const e=this.hot.getSelectedRangeLast();if(!e)return;if(e.isSingleHeader())return void(this.copyableRanges=[]);(0,r.default)(this,D).setSelectedRange(e);const t=new Map([["headers",null],["cells",null]]);"column-headers-only"===(0,r.default)(this,x)?t.set("headers",(0,r.default)(this,D).getMostBottomColumnHeadersRange()):("with-column-headers"===(0,r.default)(this,x)?t.set("headers",(0,r.default)(this,D).getMostBottomColumnHeadersRange()):"with-column-group-headers"===(0,r.default)(this,x)&&t.set("headers",(0,r.default)(this,D).getAllColumnHeadersRange()),t.set("cells",(0,r.default)(this,D).getCellsRange())),this.copyableRanges=Array.from(t.values()).filter((e=>null!==e)).map((e=>{let{startRow:t,startCol:o,endRow:s,endCol:i}=e;return{startRow:t,startCol:o,endRow:s,endCol:i}})),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges);const o=t.get("cells");if(null!==o&&o.isRangeTrimmed){const{startRow:e,startCol:t,endRow:s,endCol:i}=o;this.hot.runHooks("afterCopyLimit",s-e+1,i-t+1,this.rowsLimit,this.columnsLimit)}}isEditorOpened(){var e;return null===(e=this.hot.getActiveEditor())||void 0===e?void 0:e.isOpened()}populateValues(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.hot.getSelectedRangeLast();if(!e.length)return;const o=e.length,s=e[0].length,i=[],{row:r,col:a}=t.getTopStartCorner(),{row:l,col:h}=t.getBottomEndCorner();let u=r,d=a,c=r,g=a;for(;i.length<o||u<=l;){const{skipRowOnPaste:t,visualRow:n}=this.hot.getCellMeta(u,a);if(u=n+1,!0===t)continue;c=n,d=a;const l=[],f=i.length%o;for(;l.length<s||d<=h;){const{skipColumnOnPaste:t,visualCol:o}=this.hot.getCellMeta(r,d);if(d=o+1,!0===t)continue;g=o;const i=l.length%s;l.push(e[f][i])}i.push(l)}return(0,n.default)(this,L,!0),this.hot.populateFromArray(r,a,i,void 0,void 0,"CopyPaste.paste",this.pasteMode),[r,a,c,g]}onCopy(e){if(!this.hot.isListening()&&!(0,r.default)(this,H)||this.isEditorOpened())return;this.setCopyableText(),(0,n.default)(this,H,!1);const t=this.getRangedData(this.copyableRanges),o=_(this,F,q).call(this,this.copyableRanges);if(!!this.hot.runHooks("beforeCopy",t,this.copyableRanges,o)){const s=(0,h.stringify)(t);if(e&&e.clipboardData){const o=(0,E._dataToHTML)(t,this.hot.rootDocument);e.clipboardData.setData("text/plain",s),e.clipboardData.setData("text/html",[I,o].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",s);this.hot.runHooks("afterCopy",t,this.copyableRanges,o)}(0,n.default)(this,x,"cells-only"),e.preventDefault()}onCut(e){if(!this.hot.isListening()&&!(0,r.default)(this,k)||this.isEditorOpened())return;this.setCopyableText(),(0,n.default)(this,k,!1);const t=this.getRangedData(this.copyableRanges);if(!!this.hot.runHooks("beforeCut",t,this.copyableRanges)){const o=(0,h.stringify)(t);if(e&&e.clipboardData){const s=(0,E._dataToHTML)(t,this.hot.rootDocument);e.clipboardData.setData("text/plain",o),e.clipboardData.setData("text/html",[I,s].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",o);this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",t,this.copyableRanges)}e.preventDefault()}onPaste(e){if(!this.hot.isListening()||this.isEditorOpened()||!this.hot.getSelected())return;let t;if(e&&e.preventDefault&&e.preventDefault(),e&&void 0!==e.clipboardData){const o=(0,d.sanitize)(e.clipboardData.getData("text/html"),{ADD_TAGS:["meta"],ADD_ATTR:["content"],FORCE_BODY:!0});if(o&&/(<table)|(<TABLE)/g.test(o)){t=(0,E.htmlToGridSettings)(o,this.hot.rootDocument).data}else t=e.clipboardData.getData("text/plain")}else"undefined"==typeof ClipboardEvent&&void 0!==this.hot.rootWindow.clipboardData&&(t=this.hot.rootWindow.clipboardData.getData("Text"));if("string"==typeof t&&(t=(0,h.parse)(t)),void 0===t||t&&0===t.length)return;if(!1===this.hot.runHooks("beforePaste",t,this.copyableRanges))return;const[o,s,i,r]=this.populateValues(t);this.hot.selectCell(o,s,Math.min(this.hot.countRows()-1,i),Math.min(this.hot.countCols()-1,r)),this.hot.runHooks("afterPaste",t,this.copyableRanges)}destroy(){super.destroy()}}function X(e){if((0,g.isSafari)()){const t=this.hot.getSelectedRangeLast();if(t){const{row:o,col:s}=t.highlight,i=this.hot.getCell(o,s,!0);i&&(0,c.runWithSelectedContendEditableElement)(i,(()=>{this.hot.rootDocument.execCommand(e)}))}}else this.hot.rootDocument.execCommand(e)}function q(e){const{rows:t}=(0,y.normalizeRanges)(e);let o=0;for(let e=0;e<t.length&&!(t[e]>=0);e++)o+=1;return{columnHeadersCount:o}}function Q(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:o}=e.highlight,s=this.hot.getCell(t,o,!0);s&&(0,c.makeElementContentEditableAndSelectItsContent)(s)}}}function J(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:o}=e.highlight,s=this.hot.getCell(t,o,!0);null!=s&&s.hasAttribute("contenteditable")&&(0,c.removeContentEditableFromElementAndDeselect)(s)}}}function Z(e){e.items.push({name:"---------"},(0,f.default)(this)),(0,r.default)(this,A)&&e.items.push((0,w.default)(this)),(0,r.default)(this,N)&&e.items.push((0,m.default)(this)),(0,r.default)(this,P)&&e.items.push((0,p.default)(this)),e.items.push((0,C.default)(this))}function ee(e,t,o,s,i){(0,r.default)(this,L)&&(i.value=!0),(0,n.default)(this,L,!1)}function te(){this.isEditorOpened()||this.hot.getSettings().fragmentSelection||this.setCopyableText()}function oe(){_(this,B,J).call(this)}function se(){_(this,V,Q).call(this)}function ie(){_(this,B,J).call(this)}t.CopyPaste=$},70189:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,t.normalizeRanges=function(e){const t=[],o=[];return(0,n.arrayEach)(e,(e=>{const s=Math.min(e.startRow,e.endRow),i=Math.max(e.startRow,e.endRow);(0,a.rangeEach)(s,i,(e=>{-1===t.indexOf(e)&&t.push(e)}));const r=Math.min(e.startCol,e.endCol),n=Math.max(e.startCol,e.endCol);(0,a.rangeEach)(r,n,(e=>{-1===o.indexOf(e)&&o.push(e)}))})),{rows:t,columns:o}},o(63517);var i=s(o(42538)),r=s(o(48427)),n=o(50095),a=o(68145);function l(e,t){u(e,t),t.add(e)}function h(e,t,o){u(e,t),t.set(e,o)}function u(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function d(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var c=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakMap,w=new WeakMap,C=new WeakSet,v=new WeakSet;function y(e,t){return Math.min(t,Math.max(e+(0,i.default)(this,m).call(this)-1,e))}function E(e,t){return Math.min(t,Math.max(e+(0,i.default)(this,p).call(this)-1,e))}t.CopyableRangesFactory=class{constructor(e){let{countRows:t,countColumns:o,rowsLimit:s,columnsLimit:i,countColumnHeaders:n}=e;l(this,v),l(this,C),h(this,c,{writable:!0,value:void 0}),h(this,g,{writable:!0,value:void 0}),h(this,f,{writable:!0,value:void 0}),h(this,p,{writable:!0,value:void 0}),h(this,m,{writable:!0,value:void 0}),h(this,w,{writable:!0,value:void 0}),(0,r.default)(this,g,t),(0,r.default)(this,f,o),(0,r.default)(this,p,s),(0,r.default)(this,m,i),(0,r.default)(this,w,n)}setSelectedRange(e){(0,r.default)(this,c,e)}getCellsRange(){if(0===(0,i.default)(this,g).call(this)||0===(0,i.default)(this,f).call(this))return null;const{row:e,col:t}=(0,i.default)(this,c).getTopStartCorner(),{row:o,col:s}=(0,i.default)(this,c).getBottomEndCorner(),r=d(this,v,E).call(this,e,o),n=d(this,C,y).call(this,t,s);return{isRangeTrimmed:o!==r||s!==n,startRow:e,startCol:t,endRow:r,endCol:n}}getMostBottomColumnHeadersRange(){if(0===(0,i.default)(this,f).call(this)||0===(0,i.default)(this,w).call(this))return null;const{col:e}=(0,i.default)(this,c).getTopStartCorner(),{col:t}=(0,i.default)(this,c).getBottomEndCorner(),o=d(this,C,y).call(this,e,t);return{isRangeTrimmed:t!==o,startRow:-1,startCol:e,endRow:-1,endCol:o}}getAllColumnHeadersRange(){if(0===(0,i.default)(this,f).call(this)||0===(0,i.default)(this,w).call(this))return null;const{col:e}=(0,i.default)(this,c).getTopStartCorner(),{col:t}=(0,i.default)(this,c).getBottomEndCorner(),o=d(this,C,y).call(this,e,t);return{isRangeTrimmed:t!==o,startRow:-(0,i.default)(this,w).call(this),startCol:e,endRow:-1,endCol:o}}}},77708:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(63273);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.CopyPaste=s.CopyPaste},83697:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(31856));t.default=class{constructor(){this.clipboardData=new i.default}}},65899:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:bottom",name(){let e=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_BORDERS_BOTTOM);return(0,i.checkSelectionBorders)(this,"bottom")&&(e=(0,i.markSelected)(e)),e},callback(t,o){const s=(0,i.checkSelectionBorders)(this,"bottom");e.prepareBorder(o,"bottom",s)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(55298);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},20216:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(65899));t.bottom=i.default;var r=s(o(47521));t.left=r.default;var n=s(o(3908));t.noBorders=n.default;var a=s(o(72702));t.right=a.default;var l=s(o(57951));t.top=l.default},47521:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=e.hot.isRtl()?"end":"start";return{key:"borders:left",name(){let e=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_BORDERS_LEFT);return(0,i.checkSelectionBorders)(this,t)&&(e=(0,i.markSelected)(e)),e},callback(o,s){const r=(0,i.checkSelectionBorders)(this,t);e.prepareBorder(s,t,r)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(55298);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},3908:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:no_borders",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_REMOVE_BORDERS)},callback(t,o){e.prepareBorder(o,"noBorders")},disabled(){return!(0,i.checkSelectionBorders)(this)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(55298);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},72702:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=e.hot.isRtl()?"start":"end";return{key:"borders:right",name(){let e=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_BORDERS_RIGHT);return(0,i.checkSelectionBorders)(this,t)&&(e=(0,i.markSelected)(e)),e},callback(o,s){const r=(0,i.checkSelectionBorders)(this,t);e.prepareBorder(s,t,r)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(55298);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},57951:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"borders:top",name(){let e=this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_BORDERS_TOP);return(0,i.checkSelectionBorders)(this,"top")&&(e=(0,i.markSelected)(e)),e},callback(t,o){const s=(0,i.checkSelectionBorders)(this,"top");e.prepareBorder(o,"top",s)}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(55298);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},68849:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=o(36026),n=o(22232),a=o(68145),l=o(50095),h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=g(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),u=o(20216),d=o(55298),c=o(69167);function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(g=function(e){return e?o:t})(e)}function f(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function p(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const m=t.PLUGIN_KEY="customBorders",w=t.PLUGIN_PRIORITY=90;var C=new WeakSet,v=new WeakSet;class y extends r.BasePlugin{constructor(){super(...arguments),f(this,v),f(this,C),(0,i.default)(this,"savedBorders",[])}static get PLUGIN_KEY(){return m}static get PLUGIN_PRIORITY(){return w}isEnabled(){return!!this.hot.getSettings()[m]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>p(this,C,E).call(this,e))),this.addHook("init",(()=>p(this,v,S).call(this))),super.enablePlugin())}disablePlugin(){this.hideBorders(),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),super.updatePlugin()}setBorders(e,t){let o=["top","bottom","start","end"],s=null;t&&(this.checkSettingsCohesion([t]),o=Object.keys(t),s=(0,d.normalizeBorder)(t));const i=(0,c.detectSelectionType)(e),r=(0,c.normalizeSelectionFactory)(i,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)});(0,l.arrayEach)(e,(e=>{r(e).forAll(((e,t)=>{(0,l.arrayEach)(o,(o=>{this.prepareBorderFromCustomAdded(e,t,s,(0,d.toInlinePropName)(o))}))}))})),this.hot.view.render()}getBorders(e){if(!Array.isArray(e))return this.savedBorders;const t=(0,c.detectSelectionType)(e),o=(0,c.normalizeSelectionFactory)(t,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)}),s=[];return(0,l.arrayEach)(e,(e=>{o(e).forAll(((e,t)=>{(0,l.arrayEach)(this.savedBorders,(o=>{o.row===e&&o.col===t&&s.push((0,d.denormalizeBorder)(o))}))}))})),s}clearBorders(e){e?this.setBorders(e):((0,l.arrayEach)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange(),this.hot.removeCellMeta(e.row,e.col,"borders")})),this.savedBorders.length=0)}insertBorderIntoSettings(e,t){this.checkSavedBorders(e)||this.savedBorders.push(e);const o=this.hot._createCellRange(this.hot._createCellCoords(e.row,e.col));this.checkCustomSelections(e,o,t)||this.hot.selection.highlight.addCustomSelection({border:e,visualCellRange:o})}prepareBorderFromCustomAdded(e,t,o,s){const i=this.hot.countRows(),r=this.hot.countCols();if(e>=i||t>=r)return;let n=(0,d.createEmptyBorders)(e,t);o&&(n=(0,d.extendDefaultBorder)(n,o),(0,l.arrayEach)(this.hot.selection.highlight.customSelections,(e=>{if(n.id===e.settings.id)return Object.assign(e.settings,o),n.id=e.settings.id,n.top=e.settings.top,n.bottom=e.settings.bottom,n.start=e.settings.start,n.end=e.settings.end,!1}))),this.hot.setCellMeta(e,t,"borders",(0,d.denormalizeBorder)(n)),this.insertBorderIntoSettings(n,s)}prepareBorderFromCustomAddedRange(e,t){const o=Math.min(e.to.row,this.hot.countRows()-1),s=Math.min(e.to.col,this.hot.countCols()-1);(0,a.rangeEach)(e.from.row,o,(o=>{(0,a.rangeEach)(e.from.col,s,(s=>{const i=(0,d.createEmptyBorders)(o,s);let r=0;o===e.from.row&&(0,n.hasOwnProperty)(t,"top")&&(r+=1,i.top=t.top),o===e.to.row&&(0,n.hasOwnProperty)(t,"bottom")&&(r+=1,i.bottom=t.bottom),s===e.from.col&&(0,n.hasOwnProperty)(t,"start")&&(r+=1,i.start=t.start),s===e.to.col&&(0,n.hasOwnProperty)(t,"end")&&(r+=1,i.end=t.end),r>0&&(this.hot.setCellMeta(o,s,"borders",(0,d.denormalizeBorder)(i)),this.insertBorderIntoSettings(i))}))}))}removeAllBorders(e,t){const o=(0,d.createId)(e,t);this.spliceBorder(o),this.clearBordersFromSelectionSettings(o),this.clearNullCellRange(),this.hot.removeCellMeta(e,t,"borders")}setBorder(e,t,o,s){let i=this.hot.getCellMeta(e,t).borders;if(i=i&&void 0!==i.border?(0,d.normalizeBorder)(i):(0,d.createEmptyBorders)(e,t),s){i[o]=(0,d.createSingleEmptyBorder)();if(4===this.countHide(i))this.removeAllBorders(e,t);else{this.checkCustomSelectionsFromContextMenu(i,o,s)||this.insertBorderIntoSettings(i),this.hot.setCellMeta(e,t,"borders",(0,d.denormalizeBorder)(i))}}else{i[o]=(0,d.createDefaultCustomBorder)();this.checkCustomSelectionsFromContextMenu(i,o,s)||this.insertBorderIntoSettings(i),this.hot.setCellMeta(e,t,"borders",(0,d.denormalizeBorder)(i))}}prepareBorder(e,t,o){(0,l.arrayEach)(e,(e=>{let{start:s,end:i}=e;if(s.row===i.row&&s.col===i.col)"noBorders"===t?this.removeAllBorders(s.row,s.col):this.setBorder(s.row,s.col,t,o);else switch(t){case"noBorders":(0,a.rangeEach)(s.col,i.col,(e=>{(0,a.rangeEach)(s.row,i.row,(t=>{this.removeAllBorders(t,e)}))}));break;case"top":(0,a.rangeEach)(s.col,i.col,(e=>{this.setBorder(s.row,e,t,o)}));break;case"bottom":(0,a.rangeEach)(s.col,i.col,(e=>{this.setBorder(i.row,e,t,o)}));break;case"start":(0,a.rangeEach)(s.row,i.row,(e=>{this.setBorder(e,s.col,t,o)}));break;case"end":(0,a.rangeEach)(s.row,i.row,(e=>{this.setBorder(e,i.col,t,o)}))}}))}createCustomBorders(e){(0,l.arrayEach)(e,(e=>{const t=(0,d.normalizeBorder)(e);e.range?this.prepareBorderFromCustomAddedRange(e.range,t):this.prepareBorderFromCustomAdded(e.row,e.col,t)}))}countHide(e){const{top:t,bottom:o,start:s,end:i}=e,r=[t,o,s,i];return(0,l.arrayReduce)(r,((e,t)=>{let o=e;return t&&t.hide&&(o+=1),o}),0)}clearBordersFromSelectionSettings(e){const t=(0,l.arrayMap)(this.hot.selection.highlight.customSelections,(e=>e.settings.id)).indexOf(e);t>-1&&this.hot.selection.highlight.customSelections[t].clear()}clearNullCellRange(){(0,l.arrayEach)(this.hot.selection.highlight.customSelections,((e,t)=>{if(null===e.cellRange)return this.hot.selection.highlight.customSelections[t].destroy(),this.hot.selection.highlight.customSelections.splice(t,1),!1}))}hideBorders(){(0,l.arrayEach)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange()}))}spliceBorder(e){const t=(0,l.arrayMap)(this.savedBorders,(e=>e.id)).indexOf(e);t>-1&&this.savedBorders.splice(t,1)}checkSavedBorders(e){let t=!1;return 4===this.countHide(e)?(this.spliceBorder(e.id),t=!0):(0,l.arrayEach)(this.savedBorders,((o,s)=>{if(e.id===o.id)return this.savedBorders[s]=e,t=!0,!1})),t}checkCustomSelectionsFromContextMenu(e,t,o){let s=!1;return(0,l.arrayEach)(this.hot.selection.highlight.customSelections,(i=>{if(e.id===i.settings.id){const e=this.hot.view._wt.selectionManager.getBorderInstances(i);return(0,l.arrayEach)(e,(e=>{e.toggleHiddenClass(t,o)})),s=!0,!1}})),s}checkCustomSelections(e,t,o){const s=this.countHide(e);let i=!1;return 4===s?(this.removeAllBorders(e.row,e.col),i=!0):(0,l.arrayEach)(this.hot.selection.highlight.customSelections,(s=>{if(e.id===s.settings.id){if(s.visualCellRange=t,s.commit(),o){const t=this.hot.view._wt.selectionManager.getBorderInstances(s);(0,l.arrayEach)(t,(t=>{t.changeBorderStyle(o,e)}))}return i=!0,!1}})),i}changeBorderSettings(){const e=this.hot.getSettings()[m];if(Array.isArray(e)){const t=(0,n.deepClone)(e);this.checkSettingsCohesion(t),t.length||(this.savedBorders=t),this.createCustomBorders(t)}else void 0!==e&&this.createCustomBorders(this.savedBorders)}checkSettingsCohesion(e){const t=(0,d.hasLeftRightTypeOptions)(e),o=(0,d.hasStartEndTypeOptions)(e);if(t&&o)throw new Error('The "left"/"right" and "start"/"end" options should not be used together. Please use only the option "start"/"end".');if(this.hot.isRtl()&&t)throw new Error('The "left"/"right" properties are not supported for RTL. Please use option "start"/"end".')}destroy(){super.destroy()}}function E(e){this.hot.getSettings()[m]&&e.items.push({name:"---------"},{key:"borders",name(){return this.getTranslatedPhrase(h.CONTEXTMENU_ITEMS_BORDERS)},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||this.selection.isSelectedByCorner())},submenu:{items:[(0,u.top)(this),(0,u.right)(this),(0,u.bottom)(this),(0,u.left)(this),(0,u.noBorders)(this)]}})}function S(){this.changeBorderSettings()}t.CustomBorders=y},3455:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(68849);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.CustomBorders=s.CustomBorders},55298:(e,t,o)=>{"use strict";t.__esModule=!0,t.checkSelectionBorders=function(e,t){let o=!1;return(0,r.arrayEach)(e.getSelectedRange(),(i=>{i.forAll(((i,r)=>{if(i<0||r<0)return;const n=e.getCellMeta(i,r).borders;if(n){if(!t)return o=!0,!1;if(!(0,s.hasOwnProperty)(n[t],"hide")||!1===n[t].hide)return o=!0,!1}}))})),o},t.createDefaultCustomBorder=a,t.createDefaultHtBorder=h,t.createEmptyBorders=function(e,t){return{id:n(e,t),border:{width:1,color:"#000",cornerVisible:!1},row:e,col:t,top:{hide:!0},bottom:{hide:!0},start:{hide:!0},end:{hide:!0}}},t.createId=n,t.createSingleEmptyBorder=l,t.denormalizeBorder=function(e){(0,i.isDefined)(e.start)&&(e.left=e.start);(0,i.isDefined)(e.end)&&(e.right=e.end);return e},t.extendDefaultBorder=function(e,t){(0,s.hasOwnProperty)(t,"border")&&t.border&&(e.border=t.border);(0,s.hasOwnProperty)(t,"top")&&(0,i.isDefined)(t.top)&&(t.top?((0,s.isObject)(t.top)||(t.top={width:1,color:"#000"}),e.top=t.top):(t.top={hide:!0},e.top=t.top));(0,s.hasOwnProperty)(t,"bottom")&&(0,i.isDefined)(t.bottom)&&(t.bottom?((0,s.isObject)(t.bottom)||(t.bottom={width:1,color:"#000"}),e.bottom=t.bottom):(t.bottom={hide:!0},e.bottom=t.bottom));(0,s.hasOwnProperty)(t,"start")&&(0,i.isDefined)(t.start)&&(t.start?((0,s.isObject)(t.start)||(t.start={width:1,color:"#000"}),e.start=t.start):(t.start={hide:!0},e.start=t.start));(0,s.hasOwnProperty)(t,"end")&&(0,i.isDefined)(t.end)&&(t.end?((0,s.isObject)(t.end)||(t.end={width:1,color:"#000"}),e.end=t.end):(t.end={hide:!0},e.end=t.end));return e},t.hasLeftRightTypeOptions=function(e){return e.some((e=>(0,i.isDefined)(e.left)||(0,i.isDefined)(e.right)))},t.hasStartEndTypeOptions=function(e){return e.some((e=>(0,i.isDefined)(e.start)||(0,i.isDefined)(e.end)))},t.markSelected=function(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`},t.normalizeBorder=function(e){var t,o;((0,i.isDefined)(e.start)||(0,i.isDefined)(e.left))&&(e.start=null!==(t=e.start)&&void 0!==t?t:e.left);((0,i.isDefined)(e.end)||(0,i.isDefined)(e.right))&&(e.end=null!==(o=e.end)&&void 0!==o?o:e.right);return delete e.left,delete e.right,e},t.toInlinePropName=function(e){var t;return null!==(t=u.get(e))&&void 0!==t?t:e};var s=o(22232),i=o(93315),r=o(50095);function n(e,t){return`border_row${e}col${t}`}function a(){return{width:1,color:"#000"}}function l(){return{hide:!0}}function h(){return{width:1,color:"#000",cornerVisible:!1}}const u=new Map([["left","start"],["right","end"]])},49276:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(36026),n=o(24449),a=o(83302);function l(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function h(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const u=t.PLUGIN_KEY="dragToScroll",d=t.PLUGIN_PRIORITY=100;var c=new WeakSet;class g extends r.BasePlugin{constructor(){super(...arguments),l(this,c),(0,i.default)(this,"boundaries",null),(0,i.default)(this,"callback",null),(0,i.default)(this,"listening",!1)}static get PLUGIN_KEY(){return u}static get PLUGIN_PRIORITY(){return d}isEnabled(){return!!this.hot.getSettings()[u]}enablePlugin(){this.enabled||(this.addHook("afterOnCellMouseDown",(e=>h(this,c,f).call(this,e))),this.addHook("afterOnCellCornerMouseDown",(e=>h(this,c,f).call(this,e))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.unregisterEvents(),super.disablePlugin()}setBoundaries(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,right:this.hot.rootWindow.innerWidth,top:0,bottom:this.hot.rootWindow.innerHeight};this.boundaries=e}setCallback(e){this.callback=e}check(e,t){let o=0,s=0;t<this.boundaries.top?s=t-this.boundaries.top:t>this.boundaries.bottom&&(s=t-this.boundaries.bottom),e<this.boundaries.left?o=e-this.boundaries.left:e>this.boundaries.right&&(o=e-this.boundaries.right),this.callback(o,s)}listen(){this.listening=!0}unlisten(){this.listening=!1}isListening(){return this.listening}registerEvents(){const{rootWindow:e}=this.hot;let t=e;for(;t;)this.eventManager.addEventListener(t.document,"contextmenu",(()=>this.unlisten())),this.eventManager.addEventListener(t.document,"mouseup",(()=>this.unlisten())),this.eventManager.addEventListener(t.document,"mousemove",(e=>this.onMouseMove(e))),t=(0,a.getParentWindow)(t)}unregisterEvents(){this.eventManager.clear()}onMouseMove(e){this.isListening()&&this.check(e.clientX,e.clientY)}destroy(){super.destroy()}}function f(e){if((0,n.isRightClick)(e))return;const t=this.hot.view._wt.wtOverlays.topOverlay.mainTableScrollableElement;this.setBoundaries(t!==this.hot.rootWindow?t.getBoundingClientRect():void 0),this.setCallback(((e,o)=>{var s,i;const r=null!==(s=t.scrollLeft)&&void 0!==s?s:t.scrollX,n=null!==(i=t.scrollTop)&&void 0!==i?i:t.scrollY;t.scroll(r+50*Math.sign(e),n+20*Math.sign(o))})),this.listen()}t.DragToScroll=g},72919:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(49276);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.DragToScroll=s.DragToScroll},21894:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(36026),n=o(50095),a=o(22232),l=o(26514),h=o(80734),u=o(83302),d=o(40255),c=o(90437),g=s(o(56307)),f=o(90500);o(59456);var p=o(5386);function m(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function w(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}g.default.getSingleton().register("afterDropdownMenuDefaultOptions"),g.default.getSingleton().register("beforeDropdownMenuShow"),g.default.getSingleton().register("afterDropdownMenuShow"),g.default.getSingleton().register("afterDropdownMenuHide"),g.default.getSingleton().register("afterDropdownMenuExecute");const C=t.PLUGIN_KEY="dropdownMenu",v=t.PLUGIN_PRIORITY=230,y="changeType",E=C;var S=new WeakSet,R=new WeakSet,b=new WeakSet,_=new WeakSet,T=new WeakSet,O=new WeakSet,M=new WeakSet;class I extends r.BasePlugin{static get PLUGIN_KEY(){return C}static get PLUGIN_PRIORITY(){return v}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[f.COLUMN_LEFT,f.COLUMN_RIGHT,f.SEPARATOR,f.REMOVE_COLUMN,f.SEPARATOR,f.CLEAR_COLUMN,f.SEPARATOR,f.READ_ONLY,f.SEPARATOR,f.ALIGNMENT]}constructor(e){super(e),m(this,M),m(this,O),m(this,T),m(this,_),m(this,b),m(this,R),m(this,S),(0,i.default)(this,"commandExecutor",new l.CommandExecutor(this.hot)),(0,i.default)(this,"itemsFactory",null),(0,i.default)(this,"menu",null),this.hot.addHook("afterGetColHeader",((e,t)=>w(this,b,P).call(this,e,t)))}isEnabled(){return this.hot.getSettings()[C]}enablePlugin(){var e=this;if(this.enabled)return;this.itemsFactory=new d.ItemsFactory(this.hot,I.DEFAULT_ITEMS);const t=this.hot.getSettings()[C],o={items:this.itemsFactory.getItems(t)};this.registerEvents(),"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.registerShortcuts(),super.enablePlugin(),this.callOnPluginsReady((()=>{this.hot.runHooks("afterDropdownMenuDefaultOptions",o),this.itemsFactory.setPredefinedItems(o.items);const s=this.itemsFactory.getItems(t);this.menu&&this.menu.destroy(),this.menu=new c.Menu(this.hot,{className:"htDropdownMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.hot.runHooks("beforeDropdownMenuSetItems",s),this.menu.setMenuItems(s),this.menu.addLocalHook("beforeOpen",(()=>w(this,_,x).call(this))),this.menu.addLocalHook("afterOpen",(()=>w(this,T,H).call(this))),this.menu.addLocalHook("afterSubmenuOpen",(e=>w(this,O,k).call(this,e))),this.menu.addLocalHook("afterClose",(()=>w(this,M,D).call(this))),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return e.executeCommand.call(e,...o)})),(0,n.arrayEach)(s,(e=>this.commandExecutor.registerCommand(e.key,e)))}))}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&this.menu.destroy(),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=()=>{const{highlight:e}=this.hot.getSelectedRangeLast();if((e.isHeader()&&-1===e.row||e.isCell())&&e.col>=0){this.hot.selectColumns(e.col,e.col,-1);const{from:t}=this.hot.getSelectedRangeLast(),o=(0,h.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument),s=this.hot.getCell(-1,t.col,!0),i=s.getBoundingClientRect();this.open({left:i.left+o.left,top:i.top+s.offsetHeight+o.top},{left:i.width}),this.menu.getNavigator().toFirstItem()}};this.hot.getShortcutManager().getContext("grid").addShortcuts([{keys:[["Shift","Alt","ArrowDown"],["Control/Meta","Enter"]],callback:e,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()&&!this.menu.isOpened()},captureCtrl:!0,group:E},{keys:[["Shift","Alt","ArrowDown"]],callback:e,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isCell()&&!this.menu.isOpened()},group:E}])}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(E)}registerEvents(){this.eventManager.addEventListener(this.hot.rootElement,"click",(e=>w(this,R,N).call(this,e)))}open(e){var t;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(t=this.menu)&&void 0!==t&&t.isOpened()||(this.menu.open(),(0,a.objectEach)(o,((e,t)=>{this.menu.setOffset(t,e)})),this.menu.setPosition(e))}close(){var e;null===(e=this.menu)||void 0===e||e.close()}executeCommand(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];this.commandExecutor.execute(e,...o)}setListening(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.menu.isOpened()&&(e?this.menu.hotMenu.listen():this.menu.hotMenu.unlisten())}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function A(e){e.getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Control/Meta","A"]],callback:()=>!1}])}function N(e){if(e.stopPropagation(),(0,u.hasClass)(e.target,y)){const t=(0,h.getDocumentOffsetByElement)(this.menu.container,this.hot.rootDocument),o=e.target.getBoundingClientRect();this.open({left:o.left+t.left,top:o.top+e.target.offsetHeight+3+t.top},{left:o.width})}}function P(e,t){const o=t.parentNode;if(!o)return;const s=o.parentNode.childNodes,i=Array.prototype.indexOf.call(s,o);if(e<0||i!==s.length-1)return;const r=t.querySelector(`.${y}`);if(this.enabled&&r)return;if(!this.enabled)return void(r&&r.parentNode.removeChild(r));const n=this.hot.rootDocument.createElement("button");n.className=y,n.type="button",n.tabIndex=-1,this.hot.getSettings().ariaTags&&((0,u.setAttribute)(n,[(0,p.A11Y_HIDDEN)(),(0,p.A11Y_LABEL)(" ")]),(0,u.setAttribute)(t,[(0,p.A11Y_HASPOPUP)("menu")])),n.onclick=function(){return!1},t.firstChild.insertBefore(n,t.firstChild.firstChild)}function x(){this.hot.runHooks("beforeDropdownMenuShow",this)}function H(){this.hot.runHooks("afterDropdownMenuShow",this),w(this,S,A).call(this,this.menu)}function k(e){w(this,S,A).call(this,e)}function D(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}t.DropdownMenu=I,I.SEPARATOR={name:f.SEPARATOR}},74123:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(21894);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.DropdownMenu=s.DropdownMenu},14682:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(68145);t.default=class{constructor(e){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"options",{}),this.hot=e}setOptions(e){this.options=e}getData(){const{startRow:e,startCol:t,endRow:o,endCol:s}=this._getDataRange(),i=this.options,n=[];return(0,r.rangeEach)(e,o,(e=>{const o=[];!i.exportHiddenRows&&this._isHiddenRow(e)||((0,r.rangeEach)(t,s,(t=>{!i.exportHiddenColumns&&this._isHiddenColumn(t)||o.push(this.hot.getDataAtCell(e,t))})),n.push(o))})),n}getRowHeaders(){const e=[];if(this.options.rowHeaders){const{startRow:t,endRow:o}=this._getDataRange(),s=this.hot.getRowHeader();(0,r.rangeEach)(t,o,(t=>{!this.options.exportHiddenRows&&this._isHiddenRow(t)||e.push(s[t])}))}return e}getColumnHeaders(){const e=[];if(this.options.columnHeaders){const{startCol:t,endCol:o}=this._getDataRange(),s=this.hot.getColHeader();(0,r.rangeEach)(t,o,(t=>{!this.options.exportHiddenColumns&&this._isHiddenColumn(t)||e.push(s[t])}))}return e}_getDataRange(){const e=this.hot.countCols()-1,t=this.hot.countRows()-1;let[o=0,s=0,i=t,r=e]=this.options.range;return o=Math.max(o,0),s=Math.max(s,0),i=Math.min(i,t),r=Math.min(r,e),{startRow:o,startCol:s,endRow:i,endCol:r}}_isHiddenRow(e){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(e))}_isHiddenColumn(e){return this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(e))}}},59589:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=o(36026),r=s(o(14682)),n=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=a(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(17395));function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(a=function(e){return e?o:t})(e)}const l=t.PLUGIN_KEY="exportFile",h=t.PLUGIN_PRIORITY=240;class u extends i.BasePlugin{static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return h}isEnabled(){return!0}exportAsString(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createTypeFormatter(e,t).export()}exportAsBlob(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createBlob(this._createTypeFormatter(e,t))}downloadFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{rootDocument:o,rootWindow:s}=this.hot,i=this._createTypeFormatter(e,t),r=this._createBlob(i),n=s.URL||s.webkitURL,a=o.createElement("a"),l=`${i.options.filename}.${i.options.fileExtension}`;if(void 0!==a.download){const e=n.createObjectURL(r);a.style.display="none",a.setAttribute("href",e),a.setAttribute("download",l),o.body.appendChild(a),a.dispatchEvent(new MouseEvent("click")),o.body.removeChild(a),setTimeout((()=>{n.revokeObjectURL(e)}),100)}else navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob(r,l)}_createTypeFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!n.EXPORT_TYPES[e])throw new Error(`Export format type "${e}" is not supported.`);return(0,n.default)(e,new r.default(this.hot),t)}_createBlob(e){let t=null;return"undefined"!=typeof Blob&&(t=new Blob([e.export()],{type:`${e.options.mimeType};charset=${e.options.encoding}`})),t}}t.ExportFile=u},83281:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(59589);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ExportFile=s.ExportFile},17395:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.default=function(e,t,o){if("function"==typeof n[e])return new n[e](t,o);return null};var i=s(o(13322));const r=t.TYPE_CSV="csv",n=(t.TYPE_EXCEL="excel",t.TYPE_PDF="pdf",t.EXPORT_TYPES={[r]:i.default})},96186:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(22232),n=o(18609);class a{static get DEFAULT_OPTIONS(){return{mimeType:"text/plain",fileExtension:"txt",filename:"Handsontable [YYYY]-[MM]-[DD]",encoding:"utf-8",bom:!1,columnHeaders:!1,rowHeaders:!1,exportHiddenColumns:!1,exportHiddenRows:!1,range:[]}}constructor(e,t){(0,i.default)(this,"dataProvider",void 0),(0,i.default)(this,"options",void 0),this.dataProvider=e,this.options=this._mergeOptions(t),this.dataProvider.setOptions(this.options)}_mergeOptions(e){let t=(0,r.clone)(this.constructor.DEFAULT_OPTIONS);const o=new Date;return t=(0,r.extend)((0,r.clone)(a.DEFAULT_OPTIONS),t),t=(0,r.extend)(t,e),t.filename=(0,n.substitute)(t.filename,{YYYY:o.getFullYear(),MM:`${o.getMonth()+1}`.padStart(2,"0"),DD:`${o.getDate()}`.padStart(2,"0")}),t}}t.default=a},13322:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=o(50095),r=o(93315),n=s(o(96186));const a=String.fromCharCode(13),l=String.fromCharCode(34),h=String.fromCharCode(10);class u extends n.default{static get DEFAULT_OPTIONS(){return{mimeType:"text/csv",fileExtension:"csv",bom:!0,columnDelimiter:",",rowDelimiter:"\r\n"}}export(){const e=this.options,t=this.dataProvider.getData();let o=this.dataProvider.getColumnHeaders();const s=o.length>0,r=this.dataProvider.getRowHeaders(),n=r.length>0;let a=e.bom?String.fromCharCode(65279):"";return s&&(o=(0,i.arrayMap)(o,(e=>this._escapeCell(e,!0))),n&&(a+=e.columnDelimiter),a+=o.join(e.columnDelimiter),a+=e.rowDelimiter),(0,i.arrayEach)(t,((t,o)=>{o>0&&(a+=e.rowDelimiter),n&&(a+=this._escapeCell(r[o])+e.columnDelimiter),a+=t.map((e=>this._escapeCell(e))).join(e.columnDelimiter)})),a}_escapeCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=(0,r.stringify)(e);return""!==o&&(t||o.indexOf(a)>=0||o.indexOf(l)>=0||o.indexOf(h)>=0||o.indexOf(this.options.columnDelimiter)>=0)&&(o=o.replace(new RegExp('"',"g"),'""'),o=`"${o}"`),o}}t.default=u},96817:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(50095),n=o(22232),a=s(o(65718)),l=o(33165);class h{constructor(e,t){let{id:o,stateless:s=!0}=t;(0,i.default)(this,"hot",void 0),(0,i.default)(this,"id",void 0),(0,i.default)(this,"elements",[]),(0,i.default)(this,"hidden",!1),(0,i.default)(this,"stateId",""),(0,i.default)(this,"state",void 0),this.hot=e,this.id=o,this.stateId=`Filters.component.${this.id}`,this.state=s?null:this.hot.columnIndexMapper.registerMap(this.stateId,new l.LinkedPhysicalIndexToValueMap)}getElements(){return this.elements}reset(){(0,r.arrayEach)(this.elements,(e=>e.reset()))}hide(){this.hidden=!0}show(){this.hidden=!1}isHidden(){return null===this.hot||this.hidden}restoreState(e){this.state&&this.setState(this.state.getValueAtIndex(e))}setState(){throw new Error("The state setting logic is not implemented")}saveState(e){this.state&&this.state.setValueAtIndex(e,this.getState())}getState(){throw new Error("The state gathering logic is not implemented")}destroy(){this.hot.columnIndexMapper.unregisterMap(this.stateId),this.clearLocalHooks(),(0,r.arrayEach)(this.elements,(e=>e.destroy())),this.state=null,this.elements=null,this.hot=null}}t.BaseComponent=h,(0,n.mixin)(h,a.default)},78873:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i,r=s(o(93231)),n=o(83302),a=o(50095),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=d(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),h=o(96817),u=o(79857);function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(d=function(e){return e?o:t})(e)}function c(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}var g=new WeakSet;class f extends h.BaseComponent{static get BUTTON_OK(){return"ok"}static get BUTTON_CANCEL(){return"cancel"}constructor(e,t){super(e,{id:t.id,stateless:!0}),c(this,g),(0,r.default)(this,"name",""),this.name=t.name,this.elements.push(new u.InputUI(this.hot,{type:"button",value:l.FILTERS_BUTTONS_OK,className:"htUIButton htUIButtonOK",identifier:f.BUTTON_OK})),this.elements.push(new u.InputUI(this.hot,{type:"button",value:l.FILTERS_BUTTONS_CANCEL,className:"htUIButton htUIButtonCancel",identifier:f.BUTTON_CANCEL})),this.registerHooks()}registerHooks(){(0,a.arrayEach)(this.elements,(e=>{e.addLocalHook("click",((e,t)=>function(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}(this,g,p).call(this,e,t)))}))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>((0,n.addClass)(t.parentNode,"htFiltersMenuActionBar"),(0,a.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t)}}accept(){this.runLocalHooks("accept")}cancel(){this.runLocalHooks("cancel")}}function p(e,t){t.options.identifier===i.BUTTON_OK?this.accept():this.cancel()}t.ActionBarComponent=f,i=f},17209:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=o(83302),n=o(24449),a=o(50095),l=o(80151),h=o(22232),u=w(o(77516)),d=o(96817),c=w(o(97160)),g=o(79857),f=o(44854),p=o(53407);function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(m=function(e){return e?o:t})(e)}function w(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=m(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}function C(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function v(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var y=new WeakSet,E=new WeakSet;class S extends d.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),C(this,E),C(this,y),(0,i.default)(this,"name",""),(0,i.default)(this,"addSeparator",!1),this.name=t.name,this.addSeparator=t.addSeparator,this.elements.push(new f.SelectUI(this.hot,{menuContainer:t.menuContainer})),this.elements.push(new g.InputUI(this.hot,{placeholder:u.FILTERS_BUTTONS_PLACEHOLDER_VALUE})),this.elements.push(new g.InputUI(this.hot,{placeholder:u.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE})),this.registerHooks()}registerHooks(){this.getSelectElement().addLocalHook("select",(e=>v(this,y,R).call(this,e))).addLocalHook("afterClose",(()=>this.runLocalHooks("afterClose"))).addLocalHook("tabKeydown",(e=>this.runLocalHooks("selectTabKeydown",e))),(0,a.arrayEach)(this.getInputElements(),(e=>{e.addLocalHook("keydown",(e=>v(this,E,b).call(this,e)))}))}setState(e){if(this.reset(),!e)return;const t=(0,h.clone)(e.command);t.name.startsWith(u.FILTERS_CONDITIONS_NAMESPACE)&&(t.name=this.hot.getTranslatedPhrase(t.name)),this.getSelectElement().setValue(t),(0,a.arrayEach)(e.args,((e,o)=>{if(o>t.inputsCount-1)return!1;const s=this.getInputElement(o);s.setValue(e),s[t.inputsCount>o?"show":"hide"](),o||this.hot._registerTimeout((()=>s.focus()),10)}))}getState(){const e=this.getSelectElement().getValue()||(0,p.getConditionDescriptor)(c.CONDITION_NONE),t=[];return(0,a.arrayEach)(this.getInputElements(),((o,s)=>{e.inputsCount>s&&t.push(o.getValue())})),{command:e,args:t}}updateState(e,t){const o=e?(0,p.getConditionDescriptor)(e.name):(0,p.getConditionDescriptor)(c.CONDITION_NONE);this.state.setValueAtIndex(t,{command:o,args:e?e.args:[]}),e||(0,a.arrayEach)(this.getInputElements(),(e=>e.setValue(null)))}getSelectElement(){return this.elements.filter((e=>e instanceof f.SelectUI))[0]}getInputElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.getInputElements()[e]}getInputElements(){return this.elements.filter((e=>e instanceof g.InputUI))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,o,s,i,n)=>{(0,r.addClass)(t.parentNode,"htFiltersMenuCondition"),this.addSeparator&&(0,r.addClass)(t.parentNode,"border");const l=this.hot.rootDocument.createElement("div");return(0,r.addClass)(l,"htFiltersMenuLabel"),l.textContent=n,t.appendChild(l),(0,a.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t}}}reset(){const e=this.hot.getPlugin("filters").getSelectedColumn();let t=[(0,p.getConditionDescriptor)(c.CONDITION_NONE)];if(null!==e){const{visualIndex:o}=e;t=(0,c.default)(this.hot.getDataType(0,o,this.hot.countRows(),o))}(0,a.arrayEach)(this.getInputElements(),(e=>e.hide())),this.getSelectElement().setItems(t),super.reset(),this.getSelectElement().setValue(t[0])}}function R(e){(0,a.arrayEach)(this.getInputElements(),((t,o)=>{t[e.inputsCount>o?"show":"hide"](),0===o&&this.hot._registerTimeout((()=>t.focus()),10)})),this.runLocalHooks("change",e)}function b(e){(0,l.isKey)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,n.stopImmediatePropagation)(e))}t.ConditionComponent=S},3246:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=o(83302),n=o(50095),a=o(28236),l=o(96817),h=o(74607),u=o(97413),d=o(60171),c=o(63462),g=o(87255);function f(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}var p=new WeakSet;class m extends l.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),f(this,p),(0,i.default)(this,"name",""),this.name=t.name,this.buildOperatorsElement()}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>((0,r.addClass)(t.parentNode,"htFiltersMenuOperators"),(0,n.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t)}}buildOperatorsElement(){const e=[u.OPERATION_ID,d.OPERATION_ID];(0,n.arrayEach)(e,(t=>{const o=new g.RadioInputUI(this.hot,{name:"operator",label:{htmlFor:t,textContent:(0,h.getOperationName)(t)},value:t,checked:t===e[0],id:t});o.addLocalHook("change",(e=>function(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}(this,p,w).call(this,e))),this.elements.push(o)}))}setChecked(e){if(this.elements.length<e)throw Error(a.toSingleLine`Radio button with index ${e} doesn't exist.`);(0,n.arrayEach)(this.elements,((t,o)=>{t.setChecked(o===e)}))}getActiveOperationId(){const e=this.elements.find((e=>e instanceof g.RadioInputUI&&e.isChecked()));return e?e.getValue():u.OPERATION_ID}getState(){return this.getActiveOperationId()}setState(e){this.reset(),e&&this.getActiveOperationId()!==e&&(0,n.arrayEach)(this.elements,(t=>{t.setChecked(t.getValue()===e)}))}updateState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:u.OPERATION_ID,t=arguments.length>1?arguments[1]:void 0,o=e;o===c.OPERATION_ID&&(o=d.OPERATION_ID),this.state.setValueAtIndex(t,o)}reset(){this.setChecked(0)}}function w(e){this.setState(e.target.value)}t.OperatorsComponent=m},6379:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=o(83302),n=o(24449),a=o(50095),l=o(80151),h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=p(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),u=o(94427),d=o(96817),c=o(89409),g=o(97160),f=o(53407);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(p=function(e){return e?o:t})(e)}function m(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}var w=new WeakSet;class C extends d.BaseComponent{constructor(e,t){super(e,{id:t.id,stateless:!1}),m(this,w),(0,i.default)(this,"name",""),this.name=t.name,this.elements.push(new c.MultipleSelectUI(this.hot)),this.registerHooks()}registerHooks(){this.getMultipleSelectElement().addLocalHook("keydown",(e=>function(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}(this,w,v).call(this,e))).addLocalHook("listTabKeydown",(e=>this.runLocalHooks("listTabKeydown",e)))}getElements(){const e=this.getMultipleSelectElement();return[e.getSearchInputElement(),e.getSelectAllElement(),e.getClearAllElement(),this.getMultipleSelectElement()]}setState(e){if(this.reset(),e&&e.command.key===g.CONDITION_BY_VALUE){const t=this.getMultipleSelectElement();t.setItems(e.itemsSnapshot),t.setValue(e.args[0]),t.setLocale(e.locale)}}getState(){const e=this.getMultipleSelectElement(),t=e.getItems();return{command:{key:e.isSelectedAllValues()||!t.length?g.CONDITION_NONE:g.CONDITION_BY_VALUE},args:[e.getValue()],itemsSnapshot:t}}updateState(e){const t=(t,o,s,i,r)=>{const[n]=(0,a.arrayFilter)(o,(e=>e.name===g.CONDITION_BY_VALUE)),l={},d=this.hot.getTranslatedPhrase(h.FILTERS_VALUES_BLANK_CELLS);if(n){const o=(0,u.unifyColumnValues)((0,a.arrayMap)(i(t,r),(e=>e.value)));s&&(n.args[0]=s);const h=[],c=(0,u.intersectValues)(o,n.args[0],d,(e=>{e.checked&&h.push(e.value)})),p=e.editedConditionStack.column;l.locale=this.hot.getCellMeta(0,p).locale,l.args=[h],l.command=(0,f.getConditionDescriptor)(g.CONDITION_BY_VALUE),l.itemsSnapshot=c}else l.args=[],l.command=(0,f.getConditionDescriptor)(g.CONDITION_NONE);this.state.setValueAtIndex(t,l)};t(e.editedConditionStack.column,e.editedConditionStack.conditions,e.conditionArgsChange,e.filteredRowsFactory),e.dependentConditionStacks.length&&t(e.dependentConditionStacks[0].column,e.dependentConditionStacks[0].conditions,e.conditionArgsChange,e.filteredRowsFactory,e.editedConditionStack)}getMultipleSelectElement(){return this.elements.filter((e=>e instanceof c.MultipleSelectUI))[0]}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,o,s,i,n)=>{(0,r.addClass)(t.parentNode,"htFiltersMenuValue");const l=this.hot.rootDocument.createElement("div");return(0,r.addClass)(l,"htFiltersMenuLabel"),l.textContent=n,t.appendChild(l),(0,a.arrayEach)(this.elements,(e=>t.appendChild(e.element))),t}}}reset(){const e=this.hot.getTranslatedPhrase(h.FILTERS_VALUES_BLANK_CELLS),t=(0,u.unifyColumnValues)(this._getColumnVisibleValues()),o=(0,u.intersectValues)(t,t,e);this.getMultipleSelectElement().setItems(o),super.reset(),this.getMultipleSelectElement().setValue(t);const s=this.hot.getPlugin("filters").getSelectedColumn();null!==s&&this.getMultipleSelectElement().setLocale(this.hot.getCellMeta(0,s.visualIndex).locale)}_getColumnVisibleValues(){const e=this.hot.getPlugin("filters").getSelectedColumn();return null===e?[]:(0,a.arrayMap)(this.hot.getDataAtCol(e.visualIndex),(e=>(0,u.toEmptyString)(e)))}}function v(e){(0,l.isKey)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,n.stopImmediatePropagation)(e))}t.ValueComponent=C},81773:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(93315),r=o(53407);function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="begins_with";function l(e,t){let[o]=t;return(0,i.stringify)(e.value).toLocaleLowerCase(e.meta.locale).startsWith((0,i.stringify)(o))}(0,r.registerCondition)(a,l,{name:s.FILTERS_CONDITIONS_BEGINS_WITH,inputsCount:1,showOperators:!0})},31644:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=h;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=a(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407),r=o(67444),n=o(26189);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(a=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="between";function h(e,t){let[o,s]=t,a=o,l=s;if("numeric"===e.meta.type){const e=parseFloat(a,10),t=parseFloat(l,10);a=Math.min(e,t),l=Math.max(e,t)}else if("date"===e.meta.type){const t=(0,i.getCondition)(n.CONDITION_NAME,[l]),o=(0,i.getCondition)(r.CONDITION_NAME,[a]);return t(e)&&o(e)}return e.value>=a&&e.value<=l}(0,i.registerCondition)(l,h,{name:s.FILTERS_CONDITIONS_BETWEEN,inputsCount:2,showOperators:!0})},7765:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=n;var s=o(53407),i=o(94427);const r=t.CONDITION_NAME="by_value";function n(e,t){let[o]=t;return o(e.value)}(0,s.registerCondition)(r,n,{name:"By value",inputsCount:0,inputValuesDecorator(e){let[t]=e;return[(0,i.createArrayAssertion)(t)]},showOperators:!1})},88199:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(93315),r=o(53407);function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="contains";function l(e,t){let[o]=t;return(0,i.stringify)(e.value).toLocaleLowerCase(e.meta.locale).indexOf((0,i.stringify)(o))>=0}(0,r.registerCondition)(a,l,{name:s.FILTERS_CONDITIONS_CONTAINS,inputsCount:1,showOperators:!0})},67444:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.condition=h;var i=s(o(33034)),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=a(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),n=o(53407);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(a=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="date_after";function h(e,t){let[o]=t;const s=(0,i.default)(e.value,e.meta.dateFormat),r=(0,i.default)(o,e.meta.dateFormat);return!(!s.isValid()||!r.isValid())&&s.diff(r)>=0}(0,n.registerCondition)(l,h,{name:r.FILTERS_CONDITIONS_AFTER,inputsCount:1,showOperators:!0})},26189:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.condition=h;var i=s(o(33034)),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=a(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),n=o(53407);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(a=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="date_before";function h(e,t){let[o]=t;const s=(0,i.default)(e.value,e.meta.dateFormat),r=(0,i.default)(o,e.meta.dateFormat);return!(!s.isValid()||!r.isValid())&&s.diff(r)<=0}(0,n.registerCondition)(l,h,{name:r.FILTERS_CONDITIONS_BEFORE,inputsCount:1,showOperators:!0})},960:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.condition=h;var i=s(o(33034)),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=a(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),n=o(53407);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(a=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="date_today";function h(e){const t=(0,i.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,i.default)().startOf("day"),"d")}(0,n.registerCondition)(l,h,{name:r.FILTERS_CONDITIONS_TODAY,inputsCount:0})},98756:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.condition=h;var i=s(o(33034)),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=a(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),n=o(53407);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(a=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="date_tomorrow";function h(e){const t=(0,i.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,i.default)().subtract(-1,"days").startOf("day"),"d")}(0,n.registerCondition)(l,h,{name:r.FILTERS_CONDITIONS_TOMORROW,inputsCount:0})},74467:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.condition=h;var i=s(o(33034)),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=a(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),n=o(53407);function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(a=function(e){return e?o:t})(e)}const l=t.CONDITION_NAME="date_yesterday";function h(e){const t=(0,i.default)(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame((0,i.default)().subtract(1,"days").startOf("day"),"d")}(0,n.registerCondition)(l,h,{name:r.FILTERS_CONDITIONS_YESTERDAY,inputsCount:0})},668:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407),r=o(93315);function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="empty";function l(e){return(0,r.isEmpty)(e.value)}(0,i.registerCondition)(a,l,{name:s.FILTERS_CONDITIONS_EMPTY,inputsCount:0,showOperators:!0})},49030:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(93315),r=o(53407);function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="ends_with";function l(e,t){let[o]=t;return(0,i.stringify)(e.value).toLocaleLowerCase(e.meta.locale).endsWith((0,i.stringify)(o))}(0,r.registerCondition)(a,l,{name:s.FILTERS_CONDITIONS_ENDS_WITH,inputsCount:1,showOperators:!0})},43741:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(93315),r=o(53407);function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="eq";function l(e,t){let[o]=t;return(0,i.stringify)(e.value).toLocaleLowerCase(e.meta.locale)===(0,i.stringify)(o)}(0,r.registerCondition)(a,l,{name:s.FILTERS_CONDITIONS_EQUAL,inputsCount:1,showOperators:!0})},47003:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=r;var s=o(53407);const i=t.CONDITION_NAME="false";function r(){return!1}(0,s.registerCondition)(i,r,{name:"False"})},87941:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const n=t.CONDITION_NAME="gt";function a(e,t){let[o]=t,s=o;return"numeric"===e.meta.type&&(s=parseFloat(s,10)),e.value>s}(0,i.registerCondition)(n,a,{name:s.FILTERS_CONDITIONS_GREATER_THAN,inputsCount:1,showOperators:!0})},45980:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const n=t.CONDITION_NAME="gte";function a(e,t){let[o]=t,s=o;return"numeric"===e.meta.type&&(s=parseFloat(s,10)),e.value>=s}(0,i.registerCondition)(n,a,{name:s.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL,inputsCount:1,showOperators:!0})},9561:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const n=t.CONDITION_NAME="lt";function a(e,t){let[o]=t,s=o;return"numeric"===e.meta.type&&(s=parseFloat(s,10)),e.value<s}(0,i.registerCondition)(n,a,{name:s.FILTERS_CONDITIONS_LESS_THAN,inputsCount:1,showOperators:!0})},8201:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const n=t.CONDITION_NAME="lte";function a(e,t){let[o]=t,s=o;return"numeric"===e.meta.type&&(s=parseFloat(s,10)),e.value<=s}(0,i.registerCondition)(n,a,{name:s.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL,inputsCount:1,showOperators:!0})},14757:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=a;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const n=t.CONDITION_NAME="none";function a(){return!0}(0,i.registerCondition)(n,a,{name:s.FILTERS_CONDITIONS_NONE,inputsCount:0,showOperators:!1})},16e3:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407),r=o(31644);function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="not_between";function l(e,t){return!(0,i.getCondition)(r.CONDITION_NAME,t)(e)}(0,i.registerCondition)(a,l,{name:s.FILTERS_CONDITIONS_NOT_BETWEEN,inputsCount:2,showOperators:!0})},10884:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407),r=o(88199);function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="not_contains";function l(e,t){return!(0,i.getCondition)(r.CONDITION_NAME,t)(e)}(0,i.registerCondition)(a,l,{name:s.FILTERS_CONDITIONS_NOT_CONTAIN,inputsCount:1,showOperators:!0})},33337:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407),r=o(668);function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="not_empty";function l(e,t){return!(0,i.getCondition)(r.CONDITION_NAME,t)(e)}(0,i.registerCondition)(a,l,{name:s.FILTERS_CONDITIONS_NOT_EMPTY,inputsCount:0,showOperators:!0})},67229:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(53407),r=o(43741);function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}const a=t.CONDITION_NAME="neq";function l(e,t){return!(0,i.getCondition)(r.CONDITION_NAME,t)(e)}(0,i.registerCondition)(a,l,{name:s.FILTERS_CONDITIONS_NOT_EQUAL,inputsCount:1,showOperators:!0})},49807:(e,t,o)=>{"use strict";t.__esModule=!0,t.condition=r;var s=o(53407);const i=t.CONDITION_NAME="true";function r(){return!0}(0,s.registerCondition)(i,r,{name:"True"})},20833:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=o(50095),n=o(22232),a=o(28236),l=s(o(65718)),h=o(53407),u=o(97413),d=o(74607),c=o(93315),g=o(33165);const f="ConditionCollection.filteringStates";class p{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];(0,i.default)(this,"hot",void 0),(0,i.default)(this,"isMapRegistrable",void 0),(0,i.default)(this,"filteringStates",new g.LinkedPhysicalIndexToValueMap),this.hot=e,this.isMapRegistrable=t,!0===this.isMapRegistrable?this.hot.columnIndexMapper.registerMap(f,this.filteringStates):this.filteringStates.init(this.hot.columnIndexMapper.getNumberOfIndexes())}isEmpty(){return 0===this.getFilteredColumns().length}isMatch(e,t){var o;const s=this.filteringStates.getValueAtIndex(t),i=null!==(o=null==s?void 0:s.conditions)&&void 0!==o?o:[],r=null==s?void 0:s.operation;return this.isMatchInConditions(i,e,r)}isMatchInConditions(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.OPERATION_ID;return!e.length||(0,d.getOperationFunc)(o)(e,t)}addCondition(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.OPERATION_ID,s=arguments.length>3?arguments[3]:void 0;const i=this.hot.getCellMeta(0,e).locale,n=(0,r.arrayMap)(t.args,(e=>"string"==typeof e?e.toLocaleLowerCase(i):e)),l=t.name||t.command.key;this.runLocalHooks("beforeAdd",e);const g=this.getOperation(e);if(g){if(g!==o)throw Error(a.toSingleLine`The column of index ${e} has been already applied with a \`${g}\`\x20
65
68
  filter operation. Use \`removeConditions\` to clear the current conditions and then add new ones.\x20
66
69
  Mind that you cannot mix different types of operations (for instance, if you use \`conjunction\`,\x20
67
70
  use it consequently for a particular column).`)}else if((0,c.isUndefined)(d.operations[o]))throw new Error(a.toSingleLine`Unexpected operation named \`${o}\`. Possible ones are\x20
68
- \`disjunction\` and \`conjunction\`.`);const f=this.getConditions(e);0===f.length?this.filteringStates.setValueAtIndex(e,{operation:o,conditions:[{name:l,args:n,func:(0,h.getCondition)(l,n)}]},s):f.push({name:l,args:n,func:(0,h.getCondition)(l,n)}),this.runLocalHooks("afterAdd",e)}getConditions(e){var t,o;return null!==(t=null===(o=this.filteringStates.getValueAtIndex(e))||void 0===o?void 0:o.conditions)&&void 0!==t?t:[]}getOperation(e){var t;return null===(t=this.filteringStates.getValueAtIndex(e))||void 0===t?void 0:t.operation}getFilteredColumns(){return this.filteringStates.getEntries().map((e=>{let[t]=e;return t}))}getColumnStackPosition(e){return this.getFilteredColumns().indexOf(e)}exportAllConditions(){return(0,r.arrayReduce)(this.filteringStates.getEntries(),((e,t)=>{let[o,{operation:s,conditions:i}]=t;return e.push({column:o,operation:s,conditions:(0,r.arrayMap)(i,(e=>{let{name:t,args:o}=e;return{name:t,args:o}}))}),e}),[])}importAllConditions(e){this.clean(),(0,r.arrayEach)(e,(e=>{(0,r.arrayEach)(e.conditions,(t=>this.addCondition(e.column,t)))}))}removeConditions(e){this.runLocalHooks("beforeRemove",e),this.filteringStates.clearValue(e),this.runLocalHooks("afterRemove",e)}clean(){this.runLocalHooks("beforeClean"),this.filteringStates.clear(),this.runLocalHooks("afterClean")}hasConditions(e,t){const o=this.getConditions(e);return t?o.some((e=>e.name===t)):o.length>0}destroy(){this.isMapRegistrable&&this.hot.columnIndexMapper.unregisterMap(f),this.filteringStates=null,this.clearLocalHooks()}}(0,n.mixin)(p,l.default);t.default=p},53407:(e,t,o)=>{"use strict";t.__esModule=!0,t.getCondition=function(e,t){if(!s[e])throw Error(`Filter condition "${e}" does not exist.`);const{condition:o,descriptor:i}=s[e];let r=t;i.inputValuesDecorator&&(r=i.inputValuesDecorator(r));return function(e){return o.apply(e.meta.instance,[].concat([e],[r]))}},t.getConditionDescriptor=function(e){if(!s[e])throw Error(`Filter condition "${e}" does not exist.`);return s[e].descriptor},t.registerCondition=function(e,t,o){o.key=e,s[e]={condition:t,descriptor:o}},o(91683);const s=t.conditions={}},86949:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=o(50095),n=o(22232),a=o(85015),l=s(o(65718)),h=s(o(20833)),u=s(o(24009)),d=o(94427);function c(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function g(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var f=new WeakSet,p=new WeakSet,m=new WeakSet;class w{constructor(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>[];c(this,m),c(this,p),c(this,f),(0,i.default)(this,"hot",void 0),(0,i.default)(this,"conditionCollection",void 0),(0,i.default)(this,"columnDataFactory",void 0),(0,i.default)(this,"changes",[]),(0,i.default)(this,"grouping",!1),(0,i.default)(this,"latestEditedColumnPosition",-1),(0,i.default)(this,"latestOrderStack",[]),this.hot=e,this.conditionCollection=t,this.columnDataFactory=o,this.conditionCollection.addLocalHook("beforeRemove",(e=>g(this,f,C).call(this,e))),this.conditionCollection.addLocalHook("afterRemove",(e=>this.updateStatesAtColumn(e))),this.conditionCollection.addLocalHook("afterAdd",(e=>this.updateStatesAtColumn(e))),this.conditionCollection.addLocalHook("beforeClean",(()=>g(this,p,v).call(this))),this.conditionCollection.addLocalHook("afterClean",(()=>g(this,m,y).call(this)))}groupChanges(){this.grouping=!0}flush(){this.grouping=!1,(0,r.arrayEach)(this.changes,(e=>{this.updateStatesAtColumn(e)})),this.changes.length=0}updateStatesAtColumn(e,t){var o=this;if(this.grouping)return void(-1===this.changes.indexOf(e)&&this.changes.push(e));const s=this.conditionCollection.exportAllConditions();let i=this.conditionCollection.getColumnStackPosition(e);-1===i&&(i=this.latestEditedColumnPosition);const n=s.slice(0,i),l=s.slice(i);l.length&&l[0].column===e&&l.shift();const c=(0,a.curry)((function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const i=new h.default(o.hot,!1),n=[].concat(e,s);i.importAllConditions(n);const a=o.columnDataFactory(t);let l;l=i.isEmpty()?a:new u.default(i,(e=>o.columnDataFactory(e))).filter(),l=(0,r.arrayMap)(l,(e=>e.meta.visualRow));const c=(0,d.createArrayAssertion)(l);return i.destroy(),(0,r.arrayFilter)(a,(e=>c(e.meta.visualRow)))}))(n),g=[].concat(this.conditionCollection.getConditions(e));this.runLocalHooks("update",{editedConditionStack:{column:e,conditions:g},dependentConditionStacks:l,filteredRowsFactory:c,conditionArgsChange:t})}destroy(){this.clearLocalHooks(),(0,n.objectEach)(this,((e,t)=>{this[t]=null}))}}function C(e){this.latestEditedColumnPosition=this.conditionCollection.getColumnStackPosition(e)}function v(){this.latestOrderStack=this.conditionCollection.getFilteredColumns()}function y(){(0,r.arrayEach)(this.latestOrderStack,(e=>{this.updateStatesAtColumn(e)}))}(0,n.mixin)(w,l.default);t.default=w},97160:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=[];let o=e;D[o]||(o=H);return(0,i.arrayEach)(D[o],(e=>{let o;o=e===r.SEPARATOR?{name:r.SEPARATOR}:(0,s.clone)((0,n.getConditionDescriptor)(e)),t.push(o)})),t},o(63517);var s=o(22232),i=o(50095),r=o(90500),n=o(53407),a=o(14757);t.CONDITION_NONE=a.CONDITION_NAME;var l=o(668);t.CONDITION_EMPTY=l.CONDITION_NAME;var h=o(33337);t.CONDITION_NOT_EMPTY=h.CONDITION_NAME;var u=o(43741);t.CONDITION_EQUAL=u.CONDITION_NAME;var d=o(67229);t.CONDITION_NOT_EQUAL=d.CONDITION_NAME;var c=o(87941);t.CONDITION_GREATER_THAN=c.CONDITION_NAME;var g=o(45980);t.CONDITION_GREATER_THAN_OR_EQUAL=g.CONDITION_NAME;var f=o(9561);t.CONDITION_LESS_THAN=f.CONDITION_NAME;var p=o(8201);t.CONDITION_LESS_THAN_OR_EQUAL=p.CONDITION_NAME;var m=o(31644);t.CONDITION_BETWEEN=m.CONDITION_NAME;var w=o(16e3);t.CONDITION_NOT_BETWEEN=w.CONDITION_NAME;var C=o(81773);t.CONDITION_BEGINS_WITH=C.CONDITION_NAME;var v=o(49030);t.CONDITION_ENDS_WITH=v.CONDITION_NAME;var y=o(88199);t.CONDITION_CONTAINS=y.CONDITION_NAME;var E=o(10884);t.CONDITION_NOT_CONTAINS=E.CONDITION_NAME;var S=o(26189);t.CONDITION_DATE_BEFORE=S.CONDITION_NAME;var R=o(67444);t.CONDITION_DATE_AFTER=R.CONDITION_NAME;var b=o(98756);t.CONDITION_TOMORROW=b.CONDITION_NAME;var _=o(960);t.CONDITION_TODAY=_.CONDITION_NAME;var T=o(74467);t.CONDITION_YESTERDAY=T.CONDITION_NAME;var O=o(7765);t.CONDITION_BY_VALUE=O.CONDITION_NAME;var M=o(49807);t.CONDITION_TRUE=M.CONDITION_NAME;var I=o(47003);t.CONDITION_FALSE=I.CONDITION_NAME;var N=o(97413);t.OPERATION_AND=N.OPERATION_ID;var A=o(60171);t.OPERATION_OR=A.OPERATION_ID;var P=o(63462);t.OPERATION_OR_THEN_VARIABLE=P.OPERATION_ID;const x=t.TYPE_NUMERIC="numeric",H=t.TYPE_TEXT="text",k=t.TYPE_DATE="date",D=t.TYPES={[x]:[a.CONDITION_NAME,r.SEPARATOR,l.CONDITION_NAME,h.CONDITION_NAME,r.SEPARATOR,u.CONDITION_NAME,d.CONDITION_NAME,r.SEPARATOR,c.CONDITION_NAME,g.CONDITION_NAME,f.CONDITION_NAME,p.CONDITION_NAME,m.CONDITION_NAME,w.CONDITION_NAME],[H]:[a.CONDITION_NAME,r.SEPARATOR,l.CONDITION_NAME,h.CONDITION_NAME,r.SEPARATOR,u.CONDITION_NAME,d.CONDITION_NAME,r.SEPARATOR,C.CONDITION_NAME,v.CONDITION_NAME,r.SEPARATOR,y.CONDITION_NAME,E.CONDITION_NAME],[k]:[a.CONDITION_NAME,r.SEPARATOR,l.CONDITION_NAME,h.CONDITION_NAME,r.SEPARATOR,u.CONDITION_NAME,d.CONDITION_NAME,r.SEPARATOR,S.CONDITION_NAME,R.CONDITION_NAME,m.CONDITION_NAME,r.SEPARATOR,b.CONDITION_NAME,_.CONDITION_NAME,T.CONDITION_NAME]}},24009:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(50095);t.default=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>[];(0,i.default)(this,"conditionCollection",void 0),(0,i.default)(this,"columnDataFactory",void 0),this.conditionCollection=e,this.columnDataFactory=t}filter(){let e=[];return(0,r.arrayEach)(this.conditionCollection.getFilteredColumns(),((t,o)=>{let s=this.columnDataFactory(t);o&&(s=this._getIntersectData(s,e)),e=this.filterByColumn(t,s)})),e}filterByColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const o=[];return(0,r.arrayEach)(t,(t=>{void 0!==t&&this.conditionCollection.isMatch(t,e)&&o.push(t)})),o}_getIntersectData(e,t){const o=[];return(0,r.arrayEach)(t,(t=>{const s=t.meta.visualRow;void 0!==e[s]&&(o[s]=e[s])})),o}}},59427:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(9815),o(63517),o(91683);var i=s(o(93231)),r=s(o(48427)),n=s(o(42538)),a=o(36026),l=o(50095),h=o(28236),u=o(69173),d=o(68145),c=o(83302),g=o(80151),f=o(90500),p=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=O(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),m=o(17209),w=o(3246),C=o(6379),v=o(78873),y=s(o(20833)),E=s(o(24009)),S=s(o(86949)),R=o(94427),b=o(16899),_=o(97160),T=o(33165);function O(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(O=function(e){return e?o:t})(e)}function M(e,t){I(e,t),t.add(e)}function I(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function N(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(30352);const A=t.PLUGIN_KEY="filters",P=t.PLUGIN_PRIORITY=250,x=A;var H=new WeakMap,k=new WeakSet,D=new WeakSet,L=new WeakSet,W=new WeakSet,F=new WeakSet,V=new WeakSet,B=new WeakSet,U=new WeakSet,Y=new WeakSet;class j extends a.BasePlugin{static get PLUGIN_KEY(){return A}static get PLUGIN_PRIORITY(){return P}static get PLUGIN_DEPS(){return["plugin:DropdownMenu","plugin:HiddenRows","cell-type:checkbox"]}constructor(e){var t,o,s;super(e),M(this,Y),M(this,U),M(this,B),M(this,V),M(this,F),M(this,W),M(this,L),M(this,D),M(this,k),(0,i.default)(this,"dropdownMenuPlugin",null),(0,i.default)(this,"conditionCollection",null),(0,i.default)(this,"conditionUpdateObserver",null),(0,i.default)(this,"components",new Map([["filter_by_condition",null],["filter_operators",null],["filter_by_condition2",null],["filter_by_value",null],["filter_action_bar",null]])),(0,i.default)(this,"filtersRowsMap",null),s={writable:!0,value:void 0},I(t=this,o=H),o.set(t,s),this.hot.addHook("afterGetColHeader",((e,t)=>N(this,U,J).call(this,e,t)))}isEnabled(){return!!this.hot.getSettings()[A]}enablePlugin(){if(this.enabled)return;this.filtersRowsMap=this.hot.rowIndexMapper.registerMap(this.pluginName,new T.TrimmingMap),this.dropdownMenuPlugin=this.hot.getPlugin("dropdownMenu");const e=this.hot.getSettings().dropdownMenu,t=e&&e.uiContainer||this.hot.rootDocument.body,o=e=>(e.addLocalHook("accept",(()=>N(this,F,X).call(this,"accept"))),e.addLocalHook("cancel",(()=>N(this,F,X).call(this,"cancel"))),e.addLocalHook("change",(t=>N(this,V,q).call(this,e,t))),e),s=()=>`${this.hot.getTranslatedPhrase(p.FILTERS_DIVS_FILTER_BY_CONDITION)}:`,i=()=>`${this.hot.getTranslatedPhrase(p.FILTERS_DIVS_FILTER_BY_VALUE)}:`;if(!this.components.get("filter_by_condition")){const e=new m.ConditionComponent(this.hot,{id:"filter_by_condition",name:s,addSeparator:!1,menuContainer:t});e.addLocalHook("afterClose",(()=>N(this,B,Q).call(this))),this.components.set("filter_by_condition",o(e))}if(this.components.get("filter_operators")||this.components.set("filter_operators",new w.OperatorsComponent(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){const e=new m.ConditionComponent(this.hot,{id:"filter_by_condition2",name:"",addSeparator:!0,menuContainer:t});e.addLocalHook("afterClose",(()=>N(this,B,Q).call(this))),this.components.set("filter_by_condition2",o(e))}if(this.components.get("filter_by_value")||this.components.set("filter_by_value",o(new C.ValueComponent(this.hot,{id:"filter_by_value",name:i}))),this.components.get("filter_action_bar")||this.components.set("filter_action_bar",o(new v.ActionBarComponent(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new y.default(this.hot)),this.conditionUpdateObserver||(this.conditionUpdateObserver=new S.default(this.hot,this.conditionCollection,(e=>this.getDataMapAtColumn(e))),this.conditionUpdateObserver.addLocalHook("update",(e=>N(this,Y,Z).call(this,e)))),this.components.forEach((e=>e.show())),this.addHook("afterDropdownMenuDefaultOptions",(e=>N(this,W,$).call(this,e))),this.addHook("afterDropdownMenuShow",(()=>N(this,D,z).call(this))),this.addHook("afterDropdownMenuHide",(()=>N(this,L,K).call(this))),this.addHook("afterChange",(e=>N(this,k,G).call(this,e))),this.hot.getSettings().dropdownMenu&&this.dropdownMenuPlugin&&(this.dropdownMenuPlugin.disablePlugin(),this.dropdownMenuPlugin.enablePlugin()),!(0,n.default)(this,H)&&this.dropdownMenuPlugin.enabled){const e=this.dropdownMenuPlugin.menu,t=[{focus:()=>{const t=e.getNavigator(),o=(0,n.default)(this,H).getLastMenuPage();e.focus(),o>0?t.setCurrentPage(o):t.toFirstItem()}},...Array.from(this.components).map((e=>{let[,t]=e;return t.getElements()})).flat()];(0,r.default)(this,H,(0,b.createMenuFocusController)(e,t));const o=e=>{(0,n.default)(this,H).listen(),e.preventDefault(),(0,g.isKey)(e.keyCode,"TAB")&&(e.shiftKey?(0,n.default)(this,H).toPreviousItem():(0,n.default)(this,H).toNextItem())};this.components.get("filter_by_value").addLocalHook("listTabKeydown",o),this.components.get("filter_by_condition").addLocalHook("selectTabKeydown",o)}this.registerShortcuts(),super.enablePlugin()}disablePlugin(){var e;this.enabled&&(null!==(e=this.dropdownMenuPlugin)&&void 0!==e&&e.enabled&&this.dropdownMenuPlugin.menu.clearLocalHooks(),this.components.forEach(((e,t)=>{e.destroy(),this.components.set(t,null)})),this.conditionCollection.destroy(),this.conditionCollection=null,this.hot.rowIndexMapper.unregisterMap(this.pluginName));this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Alt","A"]],stopPropagation:!0,callback:()=>{const e=this.hot.getSelected();this.clearConditions(),this.filter(),e&&this.hot.selectCells(e)},group:x})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(x)}addCondition(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_.OPERATION_AND;const i=this.hot.toPhysicalColumn(e);this.conditionCollection.addCondition(i,{command:{key:t},args:o},s)}removeConditions(e){const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}clearConditions(e){if(void 0===e)this.conditionCollection.clean();else{const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}}filter(){const{navigableHeaders:e}=this.hot.getSettings(),t=this._createDataFilter(),o=!this.conditionCollection.isEmpty();let s=[];const i=this.conditionCollection.exportAllConditions();if(!1!==this.hot.runHooks("beforeFilter",i))if(o){const o=[];this.hot.batchExecution((()=>{this.filtersRowsMap.clear(),s=(0,l.arrayMap)(t.filter(),(e=>e.meta.visualRow));const e=(0,R.createArrayAssertion)(s);(0,d.rangeEach)(this.hot.countSourceRows()-1,(t=>{e(t)||o.push(t)})),(0,l.arrayEach)(o,(e=>{this.filtersRowsMap.setValueAtIndex(e,!0)}))}),!0),e||s.length||this.hot.deselectCell()}else this.filtersRowsMap.clear();this.hot.runHooks("afterFilter",i),this.hot.view.adjustElementsSize(!0),this.hot.render(),this.hot.selection.isSelected()&&this.hot.selectCell(e?-1:0,this.hot.getSelectedRangeLast().highlight.col)}getSelectedColumn(){var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t?{visualIndex:t.col,physicalIndex:this.hot.toPhysicalColumn(t.col)}:null}getDataMapAtColumn(e){const t=this.hot.toVisualColumn(e),o=[];return(0,l.arrayEach)(this.hot.getSourceDataAtCol(t),((e,s)=>{var i;const{row:r,col:n,visualCol:a,visualRow:l,type:h,instance:u,dateFormat:d,locale:c}=this.hot.getCellMeta(s,t),g=null!==(i=this.hot.getDataAtCell(this.hot.toVisualRow(s),t))&&void 0!==i?i:e;o.push({meta:{row:r,col:n,visualCol:a,visualRow:l,type:h,instance:u,dateFormat:d,locale:c},value:(0,R.toEmptyString)(g)})})),o}updateValueComponentCondition(e){const t=this.hot.getDataAtCol(e),o=(0,R.unifyColumnValues)(t);this.conditionUpdateObserver.updateStatesAtColumn(e,o)}restoreComponents(e){var t;const o=null===(t=this.getSelectedColumn())||void 0===t?void 0:t.physicalIndex;e.forEach((e=>{e.isHidden()||e.restoreState(o)})),this.updateDependentComponentsVisibility()}getOperationBasedOnArguments(e,t,o,s){let i=e;return i===_.OPERATION_OR&&t.command.key!==_.CONDITION_NONE&&o.command.key!==_.CONDITION_NONE&&s.command.key!==_.CONDITION_NONE?i=_.OPERATION_OR_THEN_VARIABLE:s.command.key!==_.CONDITION_NONE&&(t.command.key!==_.CONDITION_NONE&&o.command.key!==_.CONDITION_NONE||(i=_.OPERATION_AND)),i}setListeningDropdownMenu(){this.dropdownMenuPlugin&&this.dropdownMenuPlugin.setListening()}updateDependentComponentsVisibility(){const e=this.components.get("filter_by_condition"),{command:t}=e.getState(),o=[this.components.get("filter_by_condition2"),this.components.get("filter_operators")];t.showOperators?this.showComponents(...o):this.hideComponents(...o)}_createDataFilter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.conditionCollection;return new E.default(e,(e=>this.getDataMapAtColumn(e)))}getIndexesOfComponents(){const e=[];if(!this.dropdownMenuPlugin)return e;const t=this.dropdownMenuPlugin.menu;for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(0,l.arrayEach)(s,(o=>{(0,l.arrayEach)(t.menuItems,((t,s)=>{t.key===o.getMenuItemDescriptor().key&&e.push(s)}))})),e}changeComponentsVisibility(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.dropdownMenuPlugin)return;const t=this.dropdownMenuPlugin.menu.hotMenu,o=t.getPlugin("hiddenRows");for(var s=arguments.length,i=new Array(s>1?s-1:0),r=1;r<s;r++)i[r-1]=arguments[r];const n=this.getIndexesOfComponents(...i);e?o.showRows(n):o.hideRows(n),t.render()}hideComponents(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.changeComponentsVisibility(!1,...t)}showComponents(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.changeComponentsVisibility(!0,...t)}destroy(){this.enabled&&(this.components.forEach(((e,t)=>{null!==e&&(e.destroy(),this.components.set(t,null))})),this.conditionCollection.destroy(),this.conditionUpdateObserver.destroy(),this.hot.rowIndexMapper.unregisterMap(this.pluginName)),super.destroy()}}function G(e){e&&(0,l.arrayEach)(e,(e=>{const[,t]=e,o=this.hot.propToCol(t);this.conditionCollection.hasConditions(o)&&this.updateValueComponentCondition(o)}))}function z(){this.restoreComponents(Array.from(this.components.values()))}function K(){this.components.get("filter_by_condition").getSelectElement().closeOptions(),this.components.get("filter_by_condition2").getSelectElement().closeOptions()}function $(e){e.items.push({name:f.SEPARATOR}),this.components.forEach((t=>{e.items.push(t.getMenuItemDescriptor())}))}function X(e){var t;if("accept"===e){const e=this.getSelectedColumn();var o;if(null===e)return void(null===(o=this.dropdownMenuPlugin)||void 0===o||o.close());const{physicalIndex:t}=e,s=this.components.get("filter_by_condition").getState(),i=this.components.get("filter_by_condition2").getState(),r=this.components.get("filter_by_value").getState(),n=this.getOperationBasedOnArguments(this.components.get("filter_operators").getActiveOperationId(),s,i,r);this.conditionUpdateObserver.groupChanges();let a=this.conditionCollection.getColumnStackPosition(t);-1===a&&(a=void 0),this.conditionCollection.removeConditions(t),s.command.key!==_.CONDITION_NONE&&(this.conditionCollection.addCondition(t,s,n,a),i.command.key!==_.CONDITION_NONE&&this.conditionCollection.addCondition(t,i,n,a)),r.command.key!==_.CONDITION_NONE&&this.conditionCollection.addCondition(t,r,n,a),this.conditionUpdateObserver.flush(),this.components.forEach((e=>e.saveState(t))),this.filtersRowsMap.clear(),this.filter()}null===(t=this.dropdownMenuPlugin)||void 0===t||t.close()}function q(e,t){this.updateDependentComponentsVisibility(),e.constructor!==m.ConditionComponent||t.inputsCount||this.setListeningDropdownMenu()}function Q(){this.setListeningDropdownMenu()}function J(e,t){const o=this.hot.toPhysicalColumn(e);this.enabled&&this.conditionCollection.hasConditions(o)?(0,c.addClass)(t,"htFiltersActive"):(0,c.removeClass)(t,"htFiltersActive")}function Z(e){var t;if(null===(t=this.dropdownMenuPlugin)||void 0===t||!t.enabled)return;const{editedConditionStack:{conditions:o,column:s}}=e,i=o.filter((e=>e.name===_.CONDITION_BY_VALUE)),r=o.filter((e=>e.name!==_.CONDITION_BY_VALUE));if(i.length>=2||r.length>=3)(0,u.warn)(h.toSingleLine`The filter conditions have been applied properly, but couldn’t be displayed visually.\x20
71
+ \`disjunction\` and \`conjunction\`.`);const f=this.getConditions(e);0===f.length?this.filteringStates.setValueAtIndex(e,{operation:o,conditions:[{name:l,args:n,func:(0,h.getCondition)(l,n)}]},s):f.push({name:l,args:n,func:(0,h.getCondition)(l,n)}),this.runLocalHooks("afterAdd",e)}getConditions(e){var t,o;return null!==(t=null===(o=this.filteringStates.getValueAtIndex(e))||void 0===o?void 0:o.conditions)&&void 0!==t?t:[]}getOperation(e){var t;return null===(t=this.filteringStates.getValueAtIndex(e))||void 0===t?void 0:t.operation}getFilteredColumns(){return this.filteringStates.getEntries().map((e=>{let[t]=e;return t}))}getColumnStackPosition(e){return this.getFilteredColumns().indexOf(e)}exportAllConditions(){return(0,r.arrayReduce)(this.filteringStates.getEntries(),((e,t)=>{let[o,{operation:s,conditions:i}]=t;return e.push({column:o,operation:s,conditions:(0,r.arrayMap)(i,(e=>{let{name:t,args:o}=e;return{name:t,args:o}}))}),e}),[])}importAllConditions(e){this.clean(),(0,r.arrayEach)(e,(e=>{(0,r.arrayEach)(e.conditions,(t=>this.addCondition(e.column,t)))}))}removeConditions(e){this.runLocalHooks("beforeRemove",e),this.filteringStates.clearValue(e),this.runLocalHooks("afterRemove",e)}clean(){this.runLocalHooks("beforeClean"),this.filteringStates.clear(),this.runLocalHooks("afterClean")}hasConditions(e,t){const o=this.getConditions(e);return t?o.some((e=>e.name===t)):o.length>0}destroy(){this.isMapRegistrable&&this.hot.columnIndexMapper.unregisterMap(f),this.filteringStates=null,this.clearLocalHooks()}}(0,n.mixin)(p,l.default);t.default=p},53407:(e,t,o)=>{"use strict";t.__esModule=!0,t.getCondition=function(e,t){if(!s[e])throw Error(`Filter condition "${e}" does not exist.`);const{condition:o,descriptor:i}=s[e];let r=t;i.inputValuesDecorator&&(r=i.inputValuesDecorator(r));return function(e){return o.apply(e.meta.instance,[].concat([e],[r]))}},t.getConditionDescriptor=function(e){if(!s[e])throw Error(`Filter condition "${e}" does not exist.`);return s[e].descriptor},t.registerCondition=function(e,t,o){o.key=e,s[e]={condition:t,descriptor:o}},o(91683);const s=t.conditions={}},86949:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=o(50095),n=o(22232),a=o(85015),l=s(o(65718)),h=s(o(20833)),u=s(o(24009)),d=o(94427);function c(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function g(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var f=new WeakSet,p=new WeakSet,m=new WeakSet;class w{constructor(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>[];c(this,m),c(this,p),c(this,f),(0,i.default)(this,"hot",void 0),(0,i.default)(this,"conditionCollection",void 0),(0,i.default)(this,"columnDataFactory",void 0),(0,i.default)(this,"changes",[]),(0,i.default)(this,"grouping",!1),(0,i.default)(this,"latestEditedColumnPosition",-1),(0,i.default)(this,"latestOrderStack",[]),this.hot=e,this.conditionCollection=t,this.columnDataFactory=o,this.conditionCollection.addLocalHook("beforeRemove",(e=>g(this,f,C).call(this,e))),this.conditionCollection.addLocalHook("afterRemove",(e=>this.updateStatesAtColumn(e))),this.conditionCollection.addLocalHook("afterAdd",(e=>this.updateStatesAtColumn(e))),this.conditionCollection.addLocalHook("beforeClean",(()=>g(this,p,v).call(this))),this.conditionCollection.addLocalHook("afterClean",(()=>g(this,m,y).call(this)))}groupChanges(){this.grouping=!0}flush(){this.grouping=!1,(0,r.arrayEach)(this.changes,(e=>{this.updateStatesAtColumn(e)})),this.changes.length=0}updateStatesAtColumn(e,t){var o=this;if(this.grouping)return void(-1===this.changes.indexOf(e)&&this.changes.push(e));const s=this.conditionCollection.exportAllConditions();let i=this.conditionCollection.getColumnStackPosition(e);-1===i&&(i=this.latestEditedColumnPosition);const n=s.slice(0,i),l=s.slice(i);l.length&&l[0].column===e&&l.shift();const c=(0,a.curry)((function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const i=new h.default(o.hot,!1),n=[].concat(e,s);i.importAllConditions(n);const a=o.columnDataFactory(t);let l;l=i.isEmpty()?a:new u.default(i,(e=>o.columnDataFactory(e))).filter(),l=(0,r.arrayMap)(l,(e=>e.meta.visualRow));const c=(0,d.createArrayAssertion)(l);return i.destroy(),(0,r.arrayFilter)(a,(e=>c(e.meta.visualRow)))}))(n),g=[].concat(this.conditionCollection.getConditions(e));this.runLocalHooks("update",{editedConditionStack:{column:e,conditions:g},dependentConditionStacks:l,filteredRowsFactory:c,conditionArgsChange:t})}destroy(){this.clearLocalHooks(),(0,n.objectEach)(this,((e,t)=>{this[t]=null}))}}function C(e){this.latestEditedColumnPosition=this.conditionCollection.getColumnStackPosition(e)}function v(){this.latestOrderStack=this.conditionCollection.getFilteredColumns()}function y(){(0,r.arrayEach)(this.latestOrderStack,(e=>{this.updateStatesAtColumn(e)}))}(0,n.mixin)(w,l.default);t.default=w},97160:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=[];let o=e;D[o]||(o=H);return(0,i.arrayEach)(D[o],(e=>{let o;o=e===r.SEPARATOR?{name:r.SEPARATOR}:(0,s.clone)((0,n.getConditionDescriptor)(e)),t.push(o)})),t},o(63517);var s=o(22232),i=o(50095),r=o(90500),n=o(53407),a=o(14757);t.CONDITION_NONE=a.CONDITION_NAME;var l=o(668);t.CONDITION_EMPTY=l.CONDITION_NAME;var h=o(33337);t.CONDITION_NOT_EMPTY=h.CONDITION_NAME;var u=o(43741);t.CONDITION_EQUAL=u.CONDITION_NAME;var d=o(67229);t.CONDITION_NOT_EQUAL=d.CONDITION_NAME;var c=o(87941);t.CONDITION_GREATER_THAN=c.CONDITION_NAME;var g=o(45980);t.CONDITION_GREATER_THAN_OR_EQUAL=g.CONDITION_NAME;var f=o(9561);t.CONDITION_LESS_THAN=f.CONDITION_NAME;var p=o(8201);t.CONDITION_LESS_THAN_OR_EQUAL=p.CONDITION_NAME;var m=o(31644);t.CONDITION_BETWEEN=m.CONDITION_NAME;var w=o(16e3);t.CONDITION_NOT_BETWEEN=w.CONDITION_NAME;var C=o(81773);t.CONDITION_BEGINS_WITH=C.CONDITION_NAME;var v=o(49030);t.CONDITION_ENDS_WITH=v.CONDITION_NAME;var y=o(88199);t.CONDITION_CONTAINS=y.CONDITION_NAME;var E=o(10884);t.CONDITION_NOT_CONTAINS=E.CONDITION_NAME;var S=o(26189);t.CONDITION_DATE_BEFORE=S.CONDITION_NAME;var R=o(67444);t.CONDITION_DATE_AFTER=R.CONDITION_NAME;var b=o(98756);t.CONDITION_TOMORROW=b.CONDITION_NAME;var _=o(960);t.CONDITION_TODAY=_.CONDITION_NAME;var T=o(74467);t.CONDITION_YESTERDAY=T.CONDITION_NAME;var O=o(7765);t.CONDITION_BY_VALUE=O.CONDITION_NAME;var M=o(49807);t.CONDITION_TRUE=M.CONDITION_NAME;var I=o(47003);t.CONDITION_FALSE=I.CONDITION_NAME;var A=o(97413);t.OPERATION_AND=A.OPERATION_ID;var N=o(60171);t.OPERATION_OR=N.OPERATION_ID;var P=o(63462);t.OPERATION_OR_THEN_VARIABLE=P.OPERATION_ID;const x=t.TYPE_NUMERIC="numeric",H=t.TYPE_TEXT="text",k=t.TYPE_DATE="date",D=t.TYPES={[x]:[a.CONDITION_NAME,r.SEPARATOR,l.CONDITION_NAME,h.CONDITION_NAME,r.SEPARATOR,u.CONDITION_NAME,d.CONDITION_NAME,r.SEPARATOR,c.CONDITION_NAME,g.CONDITION_NAME,f.CONDITION_NAME,p.CONDITION_NAME,m.CONDITION_NAME,w.CONDITION_NAME],[H]:[a.CONDITION_NAME,r.SEPARATOR,l.CONDITION_NAME,h.CONDITION_NAME,r.SEPARATOR,u.CONDITION_NAME,d.CONDITION_NAME,r.SEPARATOR,C.CONDITION_NAME,v.CONDITION_NAME,r.SEPARATOR,y.CONDITION_NAME,E.CONDITION_NAME],[k]:[a.CONDITION_NAME,r.SEPARATOR,l.CONDITION_NAME,h.CONDITION_NAME,r.SEPARATOR,u.CONDITION_NAME,d.CONDITION_NAME,r.SEPARATOR,S.CONDITION_NAME,R.CONDITION_NAME,m.CONDITION_NAME,r.SEPARATOR,b.CONDITION_NAME,_.CONDITION_NAME,T.CONDITION_NAME]}},24009:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(50095);t.default=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>[];(0,i.default)(this,"conditionCollection",void 0),(0,i.default)(this,"columnDataFactory",void 0),this.conditionCollection=e,this.columnDataFactory=t}filter(){let e=[];return(0,r.arrayEach)(this.conditionCollection.getFilteredColumns(),((t,o)=>{let s=this.columnDataFactory(t);o&&(s=this._getIntersectData(s,e)),e=this.filterByColumn(t,s)})),e}filterByColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const o=[];return(0,r.arrayEach)(t,(t=>{void 0!==t&&this.conditionCollection.isMatch(t,e)&&o.push(t)})),o}_getIntersectData(e,t){const o=[];return(0,r.arrayEach)(t,(t=>{const s=t.meta.visualRow;void 0!==e[s]&&(o[s]=e[s])})),o}}},59427:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(9815),o(63517),o(91683);var i=s(o(93231)),r=s(o(48427)),n=s(o(42538)),a=o(36026),l=o(50095),h=o(28236),u=o(69173),d=o(68145),c=o(83302),g=o(80151),f=o(90500),p=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=O(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),m=o(17209),w=o(3246),C=o(6379),v=o(78873),y=s(o(20833)),E=s(o(24009)),S=s(o(86949)),R=o(94427),b=o(16899),_=o(97160),T=o(33165);function O(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(O=function(e){return e?o:t})(e)}function M(e,t){I(e,t),t.add(e)}function I(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function A(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(30352);const N=t.PLUGIN_KEY="filters",P=t.PLUGIN_PRIORITY=250,x=N;var H=new WeakMap,k=new WeakSet,D=new WeakSet,L=new WeakSet,W=new WeakSet,F=new WeakSet,V=new WeakSet,B=new WeakSet,U=new WeakSet,Y=new WeakSet;class j extends a.BasePlugin{static get PLUGIN_KEY(){return N}static get PLUGIN_PRIORITY(){return P}static get PLUGIN_DEPS(){return["plugin:DropdownMenu","plugin:HiddenRows","cell-type:checkbox"]}constructor(e){var t,o,s;super(e),M(this,Y),M(this,U),M(this,B),M(this,V),M(this,F),M(this,W),M(this,L),M(this,D),M(this,k),(0,i.default)(this,"dropdownMenuPlugin",null),(0,i.default)(this,"conditionCollection",null),(0,i.default)(this,"conditionUpdateObserver",null),(0,i.default)(this,"components",new Map([["filter_by_condition",null],["filter_operators",null],["filter_by_condition2",null],["filter_by_value",null],["filter_action_bar",null]])),(0,i.default)(this,"filtersRowsMap",null),s={writable:!0,value:void 0},I(t=this,o=H),o.set(t,s),this.hot.addHook("afterGetColHeader",((e,t)=>A(this,U,J).call(this,e,t)))}isEnabled(){return!!this.hot.getSettings()[N]}enablePlugin(){if(this.enabled)return;this.filtersRowsMap=this.hot.rowIndexMapper.registerMap(this.pluginName,new T.TrimmingMap),this.dropdownMenuPlugin=this.hot.getPlugin("dropdownMenu");const e=this.hot.getSettings().dropdownMenu,t=e&&e.uiContainer||this.hot.rootDocument.body,o=e=>(e.addLocalHook("accept",(()=>A(this,F,X).call(this,"accept"))),e.addLocalHook("cancel",(()=>A(this,F,X).call(this,"cancel"))),e.addLocalHook("change",(t=>A(this,V,q).call(this,e,t))),e),s=()=>`${this.hot.getTranslatedPhrase(p.FILTERS_DIVS_FILTER_BY_CONDITION)}:`,i=()=>`${this.hot.getTranslatedPhrase(p.FILTERS_DIVS_FILTER_BY_VALUE)}:`;if(!this.components.get("filter_by_condition")){const e=new m.ConditionComponent(this.hot,{id:"filter_by_condition",name:s,addSeparator:!1,menuContainer:t});e.addLocalHook("afterClose",(()=>A(this,B,Q).call(this))),this.components.set("filter_by_condition",o(e))}if(this.components.get("filter_operators")||this.components.set("filter_operators",new w.OperatorsComponent(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){const e=new m.ConditionComponent(this.hot,{id:"filter_by_condition2",name:"",addSeparator:!0,menuContainer:t});e.addLocalHook("afterClose",(()=>A(this,B,Q).call(this))),this.components.set("filter_by_condition2",o(e))}if(this.components.get("filter_by_value")||this.components.set("filter_by_value",o(new C.ValueComponent(this.hot,{id:"filter_by_value",name:i}))),this.components.get("filter_action_bar")||this.components.set("filter_action_bar",o(new v.ActionBarComponent(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new y.default(this.hot)),this.conditionUpdateObserver||(this.conditionUpdateObserver=new S.default(this.hot,this.conditionCollection,(e=>this.getDataMapAtColumn(e))),this.conditionUpdateObserver.addLocalHook("update",(e=>A(this,Y,Z).call(this,e)))),this.components.forEach((e=>e.show())),this.addHook("afterDropdownMenuDefaultOptions",(e=>A(this,W,$).call(this,e))),this.addHook("afterDropdownMenuShow",(()=>A(this,D,z).call(this))),this.addHook("afterDropdownMenuHide",(()=>A(this,L,K).call(this))),this.addHook("afterChange",(e=>A(this,k,G).call(this,e))),this.hot.getSettings().dropdownMenu&&this.dropdownMenuPlugin&&(this.dropdownMenuPlugin.disablePlugin(),this.dropdownMenuPlugin.enablePlugin()),!(0,n.default)(this,H)&&this.dropdownMenuPlugin.enabled){const e=this.dropdownMenuPlugin.menu,t=[{focus:()=>{const t=e.getNavigator(),o=(0,n.default)(this,H).getLastMenuPage();e.focus(),o>0?t.setCurrentPage(o):t.toFirstItem()}},...Array.from(this.components).map((e=>{let[,t]=e;return t.getElements()})).flat()];(0,r.default)(this,H,(0,b.createMenuFocusController)(e,t));const o=e=>{(0,n.default)(this,H).listen(),e.preventDefault(),(0,g.isKey)(e.keyCode,"TAB")&&(e.shiftKey?(0,n.default)(this,H).toPreviousItem():(0,n.default)(this,H).toNextItem())};this.components.get("filter_by_value").addLocalHook("listTabKeydown",o),this.components.get("filter_by_condition").addLocalHook("selectTabKeydown",o)}this.registerShortcuts(),super.enablePlugin()}disablePlugin(){var e;this.enabled&&(null!==(e=this.dropdownMenuPlugin)&&void 0!==e&&e.enabled&&this.dropdownMenuPlugin.menu.clearLocalHooks(),this.components.forEach(((e,t)=>{e.destroy(),this.components.set(t,null)})),this.conditionCollection.destroy(),this.conditionCollection=null,this.hot.rowIndexMapper.unregisterMap(this.pluginName));this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Alt","A"]],stopPropagation:!0,callback:()=>{const e=this.hot.getSelected();this.clearConditions(),this.filter(),e&&this.hot.selectCells(e)},group:x})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(x)}addCondition(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:_.OPERATION_AND;const i=this.hot.toPhysicalColumn(e);this.conditionCollection.addCondition(i,{command:{key:t},args:o},s)}removeConditions(e){const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}clearConditions(e){if(void 0===e)this.conditionCollection.clean();else{const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}}filter(){const{navigableHeaders:e}=this.hot.getSettings(),t=this._createDataFilter(),o=!this.conditionCollection.isEmpty();let s=[];const i=this.conditionCollection.exportAllConditions();if(!1!==this.hot.runHooks("beforeFilter",i))if(o){const o=[];this.hot.batchExecution((()=>{this.filtersRowsMap.clear(),s=(0,l.arrayMap)(t.filter(),(e=>e.meta.visualRow));const e=(0,R.createArrayAssertion)(s);(0,d.rangeEach)(this.hot.countSourceRows()-1,(t=>{e(t)||o.push(t)})),(0,l.arrayEach)(o,(e=>{this.filtersRowsMap.setValueAtIndex(e,!0)}))}),!0),e||s.length||this.hot.deselectCell()}else this.filtersRowsMap.clear();this.hot.runHooks("afterFilter",i),this.hot.view.adjustElementsSize(!0),this.hot.render(),this.hot.selection.isSelected()&&this.hot.selectCell(e?-1:0,this.hot.getSelectedRangeLast().highlight.col)}getSelectedColumn(){var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t?{visualIndex:t.col,physicalIndex:this.hot.toPhysicalColumn(t.col)}:null}getDataMapAtColumn(e){const t=this.hot.toVisualColumn(e),o=[];return(0,l.arrayEach)(this.hot.getSourceDataAtCol(t),((e,s)=>{var i;const{row:r,col:n,visualCol:a,visualRow:l,type:h,instance:u,dateFormat:d,locale:c}=this.hot.getCellMeta(s,t),g=null!==(i=this.hot.getDataAtCell(this.hot.toVisualRow(s),t))&&void 0!==i?i:e;o.push({meta:{row:r,col:n,visualCol:a,visualRow:l,type:h,instance:u,dateFormat:d,locale:c},value:(0,R.toEmptyString)(g)})})),o}updateValueComponentCondition(e){const t=this.hot.getDataAtCol(e),o=(0,R.unifyColumnValues)(t);this.conditionUpdateObserver.updateStatesAtColumn(e,o)}restoreComponents(e){var t;const o=null===(t=this.getSelectedColumn())||void 0===t?void 0:t.physicalIndex;e.forEach((e=>{e.isHidden()||e.restoreState(o)})),this.updateDependentComponentsVisibility()}getOperationBasedOnArguments(e,t,o,s){let i=e;return i===_.OPERATION_OR&&t.command.key!==_.CONDITION_NONE&&o.command.key!==_.CONDITION_NONE&&s.command.key!==_.CONDITION_NONE?i=_.OPERATION_OR_THEN_VARIABLE:s.command.key!==_.CONDITION_NONE&&(t.command.key!==_.CONDITION_NONE&&o.command.key!==_.CONDITION_NONE||(i=_.OPERATION_AND)),i}setListeningDropdownMenu(){this.dropdownMenuPlugin&&this.dropdownMenuPlugin.setListening()}updateDependentComponentsVisibility(){const e=this.components.get("filter_by_condition"),{command:t}=e.getState(),o=[this.components.get("filter_by_condition2"),this.components.get("filter_operators")];t.showOperators?this.showComponents(...o):this.hideComponents(...o)}_createDataFilter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.conditionCollection;return new E.default(e,(e=>this.getDataMapAtColumn(e)))}getIndexesOfComponents(){const e=[];if(!this.dropdownMenuPlugin)return e;const t=this.dropdownMenuPlugin.menu;for(var o=arguments.length,s=new Array(o),i=0;i<o;i++)s[i]=arguments[i];return(0,l.arrayEach)(s,(o=>{(0,l.arrayEach)(t.menuItems,((t,s)=>{t.key===o.getMenuItemDescriptor().key&&e.push(s)}))})),e}changeComponentsVisibility(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.dropdownMenuPlugin)return;const t=this.dropdownMenuPlugin.menu.hotMenu,o=t.getPlugin("hiddenRows");for(var s=arguments.length,i=new Array(s>1?s-1:0),r=1;r<s;r++)i[r-1]=arguments[r];const n=this.getIndexesOfComponents(...i);e?o.showRows(n):o.hideRows(n),t.render()}hideComponents(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.changeComponentsVisibility(!1,...t)}showComponents(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.changeComponentsVisibility(!0,...t)}destroy(){this.enabled&&(this.components.forEach(((e,t)=>{null!==e&&(e.destroy(),this.components.set(t,null))})),this.conditionCollection.destroy(),this.conditionUpdateObserver.destroy(),this.hot.rowIndexMapper.unregisterMap(this.pluginName)),super.destroy()}}function G(e){e&&(0,l.arrayEach)(e,(e=>{const[,t]=e,o=this.hot.propToCol(t);this.conditionCollection.hasConditions(o)&&this.updateValueComponentCondition(o)}))}function z(){this.restoreComponents(Array.from(this.components.values()))}function K(){this.components.get("filter_by_condition").getSelectElement().closeOptions(),this.components.get("filter_by_condition2").getSelectElement().closeOptions()}function $(e){e.items.push({name:f.SEPARATOR}),this.components.forEach((t=>{e.items.push(t.getMenuItemDescriptor())}))}function X(e){var t;if("accept"===e){const e=this.getSelectedColumn();var o;if(null===e)return void(null===(o=this.dropdownMenuPlugin)||void 0===o||o.close());const{physicalIndex:t}=e,s=this.components.get("filter_by_condition").getState(),i=this.components.get("filter_by_condition2").getState(),r=this.components.get("filter_by_value").getState(),n=this.getOperationBasedOnArguments(this.components.get("filter_operators").getActiveOperationId(),s,i,r);this.conditionUpdateObserver.groupChanges();let a=this.conditionCollection.getColumnStackPosition(t);-1===a&&(a=void 0),this.conditionCollection.removeConditions(t),s.command.key!==_.CONDITION_NONE&&(this.conditionCollection.addCondition(t,s,n,a),i.command.key!==_.CONDITION_NONE&&this.conditionCollection.addCondition(t,i,n,a)),r.command.key!==_.CONDITION_NONE&&this.conditionCollection.addCondition(t,r,n,a),this.conditionUpdateObserver.flush(),this.components.forEach((e=>e.saveState(t))),this.filtersRowsMap.clear(),this.filter()}null===(t=this.dropdownMenuPlugin)||void 0===t||t.close()}function q(e,t){this.updateDependentComponentsVisibility(),e.constructor!==m.ConditionComponent||t.inputsCount||this.setListeningDropdownMenu()}function Q(){this.setListeningDropdownMenu()}function J(e,t){const o=this.hot.toPhysicalColumn(e);this.enabled&&this.conditionCollection.hasConditions(o)?(0,c.addClass)(t,"htFiltersActive"):(0,c.removeClass)(t,"htFiltersActive")}function Z(e){var t;if(null===(t=this.dropdownMenuPlugin)||void 0===t||!t.enabled)return;const{editedConditionStack:{conditions:o,column:s}}=e,i=o.filter((e=>e.name===_.CONDITION_BY_VALUE)),r=o.filter((e=>e.name!==_.CONDITION_BY_VALUE));if(i.length>=2||r.length>=3)(0,u.warn)(h.toSingleLine`The filter conditions have been applied properly, but couldn’t be displayed visually.\x20
69
72
  The overall amount of conditions exceed the capability of the dropdown menu.\x20
70
- For more details see the documentation.`);else{const t=this.conditionCollection.getOperation(s);this.components.get("filter_by_condition").updateState(r[0],s),this.components.get("filter_by_condition2").updateState(r[1],s),this.components.get("filter_operators").updateState(t,s),this.components.get("filter_by_value").updateState(e)}}t.Filters=j},30905:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(59427);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Filters=s.Filters},74607:(e,t,o)=>{"use strict";t.__esModule=!0,t.getOperationFunc=function(e){if(!s[e])throw Error(`Operation with id "${e}" does not exist.`);const t=s[e].func;return function(e,o){return t(e,o)}},t.getOperationName=function(e){return s[e].name},t.registerOperation=function(e,t,o){s[e]={name:t,func:o}},o(91683);const s=t.operations={}},97413:(e,t,o)=>{"use strict";t.__esModule=!0,t.operationResult=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(74607);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const n=t.OPERATION_ID="conjunction",a=t.SHORT_NAME_FOR_COMPONENT=s.FILTERS_LABELS_CONJUNCTION;function l(e,t){return e.every((e=>e.func(t)))}(0,i.registerOperation)(n,a,l)},60171:(e,t,o)=>{"use strict";t.__esModule=!0,t.operationResult=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(74607);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const n=t.OPERATION_ID="disjunction",a=t.SHORT_NAME_FOR_COMPONENT=s.FILTERS_LABELS_DISJUNCTION;function l(e,t){return e.some((e=>e.func(t)))}(0,i.registerOperation)(n,a,l)},63462:(e,t,o)=>{"use strict";t.__esModule=!0,t.operationResult=l,o(91683);var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(74607);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const n=t.OPERATION_ID="disjunctionWithExtraCondition",a=t.SHORT_NAME_FOR_COMPONENT=s.FILTERS_LABELS_DISJUNCTION;function l(e,t){if(e.length<3)throw Error("Operation doesn't work on less then three conditions.");return e.slice(0,e.length-1).some((e=>e.func(t)))&&e[e.length-1].func(t)}(0,i.registerOperation)(n,a,l)},16899:(e,t,o)=>{"use strict";t.__esModule=!0,t.createMenuFocusController=function(e,t){let o=-1;const l=(0,s.createFocusNavigator)(t),h=o=>()=>{e.isOpened()&&e.getKeyboardShortcutsCtrl().listen(a),l.setCurrentPage(t.indexOf(o))};function u(s){const h=e.getKeyboardShortcutsCtrl(),u=s.getKeyboardShortcutsCtrl();l.clear(),u.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],forwardToContext:h.getContext(a),callback:()=>{s.isSubMenu()&&s.close(),h.listen(a)}}]),s.isSubMenu()||h.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:t=>{const s=e.getNavigator();s.getCurrentPage()>-1&&(o=s.getCurrentPage()),s.clear(),t.shiftKey?l.toPreviousItem():l.toNextItem()}},{keys:[["Escape"]],callback:()=>{e.close()}},{keys:[["Enter"],["Space"]],preventDefault:!1,callback:e=>{const o=t[l.getCurrentPage()];o instanceof i.SelectUI&&(o.openOptions(),e.preventDefault()),o instanceof n.LinkUI&&(o.activate(),e.preventDefault()),o instanceof r.BaseUI||e.preventDefault()}}],a)}return t.forEach((e=>{e instanceof r.BaseUI&&(e.addLocalHook("click",h(e)),e.addLocalHook("focus",h(e)),e.addLocalHook("afterClose",h(e)))})),e.addLocalHook("afterSelectionChange",(e=>{e.key.startsWith("filter_")||l.clear()})),e.addLocalHook("afterSubmenuOpen",u),e.addLocalHook("afterOpen",u),{...l,listen:function(){e.focus(),e.getKeyboardShortcutsCtrl().listen(a)},getLastMenuPage:function(){return o}}};var s=o(28199),i=o(44854),r=o(96633),n=o(40980);const a="filters"},28199:(e,t,o)=>{"use strict";t.__esModule=!0,t.createFocusNavigator=function(e){return(0,s.createPaginator)({initialPage:0,size:()=>e.length,onItemSelect:(t,o)=>{const s=e[t];return s instanceof r.MultipleSelectUI?o:!(s.element&&!(0,i.isVisible)(s.element))&&void s.focus()}})};var s=o(29583),i=o(83302),r=o(89409)},96633:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(22232),n=s(o(65718)),a=s(o(75244)),l=o(83302),h=o(50095),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=d(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516));function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(d=function(e){return e?o:t})(e)}const c="built",g="building",f=["click","input","keydown","keypress","keyup","focus","blur","change"];class p{static get DEFAULTS(){return(0,r.clone)({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}constructor(e,t){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"eventManager",new a.default(this)),(0,i.default)(this,"options",void 0),(0,i.default)(this,"_element",void 0),(0,i.default)(this,"buildState",void 0),this.hot=e,this.options=(0,r.extend)(p.DEFAULTS,t),this._element=this.hot.rootDocument.createElement(this.options.wrapIt?"div":this.options.tagName)}setValue(e){this.options.value=e,this.update()}getValue(){return this.options.value}get element(){return this.buildState===g?this._element:this.buildState===c?(this.update(),this._element):(this.buildState=g,this.build(),this.buildState=c,this._element)}isBuilt(){return this.buildState===c}translateIfPossible(e){return"string"==typeof e&&e.startsWith(u.FILTERS_NAMESPACE)?this.hot.getTranslatedPhrase(e):e}build(){const e=(e,t)=>{this.eventManager.addEventListener(e,t,(e=>this.runLocalHooks(t,e,this)))};if(this.buildState||(this.buildState=g),this._element.setAttribute("data-hot-input",!0),void 0!==this.options.tabIndex&&this._element.setAttribute("tabindex",this.options.tabIndex),void 0!==this.options.role&&this._element.setAttribute("role",this.options.role),this.options.className&&(0,l.addClass)(this._element,this.options.className),this.options.children.length)(0,h.arrayEach)(this.options.children,(e=>this._element.appendChild(e.element)));else if(this.options.wrapIt){const t=this.hot.rootDocument.createElement(this.options.tagName);t.setAttribute("data-hot-input",!0),(0,r.objectEach)(this.options,((e,o)=>{void 0!==t[o]&&"className"!==o&&"tagName"!==o&&"children"!==o&&(t[o]=this.translateIfPossible(e))})),this._element.appendChild(t),(0,h.arrayEach)(f,(o=>e(t,o)))}else(0,h.arrayEach)(f,(t=>e(this._element,t)))}update(){}reset(){this.options.value="",this.update()}show(){this.element.style.display=""}hide(){this.element.style.display="none"}focus(){}destroy(){this.eventManager.destroy(),this.eventManager=null,this.hot=null,this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null}}t.BaseUI=p,(0,r.mixin)(p,n.default)},79857:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(42538)),r=s(o(48427)),n=o(83302),a=o(22232),l=o(96633);function h(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}var u=new WeakMap,d=new WeakSet;class c extends l.BaseUI{static get DEFAULTS(){return(0,a.clone)({placeholder:"",type:"text",tagName:"input",tabIndex:-1})}constructor(e,t){var o,s;super(e,(0,a.extend)(c.DEFAULTS,t)),h(o=this,s=d),s.add(o),function(e,t,o){h(e,t),t.set(e,o)}(this,u,{writable:!0,value:void 0}),this.registerHooks()}registerHooks(){this.addLocalHook("keyup",(e=>function(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}(this,d,g).call(this,e)))}build(){super.build();const e=this.hot.rootDocument.createElement("div");(0,r.default)(this,u,this._element.firstChild),(0,n.addClass)(this._element,"htUIInput"),(0,n.addClass)(e,"htUIInputIcon"),this._element.appendChild(e),this.update()}update(){this.isBuilt()&&((0,i.default)(this,u).type=this.options.type,(0,i.default)(this,u).placeholder=this.translateIfPossible(this.options.placeholder),(0,i.default)(this,u).value=this.translateIfPossible(this.options.value))}focus(){this.isBuilt()&&(0,i.default)(this,u).focus()}}function g(e){this.options.value=e.target.value}t.InputUI=c},40980:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(42538)),r=s(o(48427)),n=o(22232),a=o(96633);function l(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var h=new WeakMap;class u extends a.BaseUI{static get DEFAULTS(){return(0,n.clone)({href:"#",tagName:"a",tabIndex:-1,role:"button"})}constructor(e,t){super(e,(0,n.extend)(u.DEFAULTS,t)),l(this,h,{writable:!0,value:void 0})}build(){super.build(),(0,r.default)(this,h,this._element.firstChild)}update(){this.isBuilt()&&((0,i.default)(this,h).textContent=this.translateIfPossible(this.options.textContent))}focus(){this.isBuilt()&&(0,i.default)(this,h).focus()}activate(){(0,i.default)(this,h).click()}}t.LinkUI=u},89409:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(42538)),r=s(o(48427)),n=o(83302),a=o(22232),l=o(50095),h=o(80151),u=o(85015),d=o(65320),c=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=C(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),g=o(24449),f=o(96633),p=o(79857),m=o(40980),w=o(94427);function C(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(C=function(e){return e?o:t})(e)}function v(e,t){E(e,t),t.add(e)}function y(e,t,o){E(e,t),t.set(e,o)}function E(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function S(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const R="multipleSelect.itemBox";var b=new WeakMap,_=new WeakMap,T=new WeakMap,O=new WeakMap,M=new WeakMap,I=new WeakMap,N=new WeakSet,A=new WeakSet,P=new WeakSet,x=new WeakSet;class H extends f.BaseUI{static get DEFAULTS(){return(0,a.clone)({className:"htUIMultipleSelect",value:[]})}constructor(e,t){super(e,(0,a.extend)(H.DEFAULTS,t)),v(this,x),v(this,P),v(this,A),v(this,N),y(this,b,{writable:!0,value:[]}),y(this,_,{writable:!0,value:void 0}),y(this,T,{writable:!0,value:void 0}),y(this,O,{writable:!0,value:void 0}),y(this,M,{writable:!0,value:void 0}),y(this,I,{writable:!0,value:void 0}),(0,r.default)(this,O,new p.InputUI(this.hot,{placeholder:c.FILTERS_BUTTONS_PLACEHOLDER_SEARCH,className:"htUIMultipleSelectSearch"})),(0,r.default)(this,M,new m.LinkUI(this.hot,{textContent:c.FILTERS_BUTTONS_SELECT_ALL,className:"htUISelectAll"})),(0,r.default)(this,I,new m.LinkUI(this.hot,{textContent:c.FILTERS_BUTTONS_CLEAR,className:"htUIClearAll"})),this.registerHooks()}getItemsBox(){return(0,i.default)(this,_)}registerHooks(){(0,i.default)(this,O).addLocalHook("keydown",(e=>S(this,A,D).call(this,e))),(0,i.default)(this,O).addLocalHook("input",(e=>S(this,N,k).call(this,e))),(0,i.default)(this,M).addLocalHook("click",(e=>S(this,P,L).call(this,e))),(0,i.default)(this,I).addLocalHook("click",(e=>S(this,x,W).call(this,e)))}setItems(e){(0,r.default)(this,b,e),(0,i.default)(this,_)&&(0,i.default)(this,_).loadData((0,i.default)(this,b))}setLocale(e){(0,r.default)(this,T,e)}getLocale(){return(0,i.default)(this,T)}getItems(){return[...(0,i.default)(this,b)]}getValue(){return function(e){const t=[];return(0,l.arrayEach)(e,(e=>{e.checked&&t.push(e.value)})),t}((0,i.default)(this,b))}getSearchInputElement(){return(0,i.default)(this,O)}getSelectAllElement(){return(0,i.default)(this,M)}getClearAllElement(){return(0,i.default)(this,I)}isSelectedAllValues(){return(0,i.default)(this,b).length===this.getValue().length}build(){super.build();const{rootDocument:e}=this.hot,t=e.createElement("div"),o=new f.BaseUI(this.hot,{className:"htUISelectionControls",children:[(0,i.default)(this,M),(0,i.default)(this,I)]});this._element.appendChild((0,i.default)(this,O).element),this._element.appendChild(o.element),this._element.appendChild(t);const s=t=>{if(!this._element)return;(0,i.default)(this,_)&&(0,i.default)(this,_).destroy(),(0,n.addClass)(t,"htUIMultipleSelectHot"),(0,r.default)(this,_,new this.hot.constructor(t,{data:(0,i.default)(this,b),columns:[{data:"checked",type:"checkbox",label:{property:"visualValue",position:"after"}}],beforeRenderer:(e,t,o,s,i,r)=>{e.title=r.instance.getDataAtRowProp(t,r.label.property)},afterListen:()=>{this.runLocalHooks("focus",this)},beforeOnCellMouseUp:()=>{(0,i.default)(this,_).listen()},maxCols:1,autoWrapCol:!0,height:110,colWidths:()=>(0,i.default)(this,_).container.scrollWidth-(0,n.getScrollbarWidth)(e),copyPaste:!1,disableVisualSelection:"area",fillHandle:!1,fragmentSelection:"cell",tabMoves:{row:1,col:0},layoutDirection:this.hot.isRtl()?"rtl":"ltr"})),(0,i.default)(this,_).init();const o=(0,i.default)(this,_).getShortcutManager().getContext("grid");o.removeShortcutsByKeys(["Tab"]),o.removeShortcutsByKeys(["Shift","Tab"]),o.addShortcut({keys:[["Escape"]],callback:e=>{this.runLocalHooks("keydown",e,this)},group:R}),o.addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:e=>{(0,i.default)(this,_).deselectCell(),this.runLocalHooks("keydown",e,this),this.runLocalHooks("listTabKeydown",e,this)},group:R})};s(t),this.hot._registerTimeout((()=>s(t)),100)}focus(){this.isBuilt()&&(0,i.default)(this,_).listen()}reset(){(0,i.default)(this,O).reset(),(0,i.default)(this,M).reset(),(0,i.default)(this,I).reset()}update(){this.isBuilt()&&((0,i.default)(this,_).loadData(function(e,t){const o=(0,w.createArrayAssertion)(t);return(0,l.arrayMap)(e,(e=>(e.checked=o(e.value),e)))}((0,i.default)(this,b),this.options.value)),super.update())}destroy(){(0,i.default)(this,_)&&(0,i.default)(this,_).destroy(),(0,i.default)(this,O).destroy(),(0,i.default)(this,I).destroy(),(0,i.default)(this,M).destroy(),(0,r.default)(this,O,null),(0,r.default)(this,I,null),(0,r.default)(this,M,null),(0,r.default)(this,_,null),(0,r.default)(this,b,null),super.destroy()}}function k(e){const t=e.target.value.toLocaleLowerCase(this.getLocale());let o;o=""===t?[...(0,i.default)(this,b)]:(0,l.arrayFilter)((0,i.default)(this,b),(e=>`${e.value}`.toLocaleLowerCase(this.getLocale()).indexOf(t)>=0)),(0,i.default)(this,_).loadData(o)}function D(e){this.runLocalHooks("keydown",e,this);(0,u.partial)(h.isKey,e.keyCode)("ARROW_DOWN")&&(e.preventDefault(),(0,g.stopImmediatePropagation)(e),(0,i.default)(this,_).listen(),(0,i.default)(this,_).selectCell(0,0))}function L(e){const t=[];e.preventDefault(),(0,l.arrayEach)((0,i.default)(this,_).getSourceData(),((e,o)=>{e.checked=!0,t.push((0,d.dataRowToChangesArray)(e,o)[0])})),(0,i.default)(this,_).setSourceDataAtCell(t)}function W(e){const t=[];e.preventDefault(),(0,l.arrayEach)((0,i.default)(this,_).getSourceData(),((e,o)=>{e.checked=!1,t.push((0,d.dataRowToChangesArray)(e,o)[0])})),(0,i.default)(this,_).setSourceDataAtCell(t)}t.MultipleSelectUI=H;t.default=H},87255:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(42538)),r=s(o(48427)),n=o(22232),a=o(96633);function l(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var h=new WeakMap,u=new WeakMap;class d extends a.BaseUI{static get DEFAULTS(){return(0,n.clone)({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}constructor(e,t){super(e,(0,n.extend)(d.DEFAULTS,t)),l(this,h,{writable:!0,value:void 0}),l(this,u,{writable:!0,value:void 0})}build(){super.build();const e=this.hot.rootDocument.createElement("label");e.textContent=this.translateIfPossible(this.options.label.textContent),e.htmlFor=this.translateIfPossible(this.options.label.htmlFor),(0,r.default)(this,u,e),(0,r.default)(this,h,this._element.firstChild),(0,i.default)(this,h).checked=this.options.checked,this._element.appendChild(e),this.update()}update(){this.isBuilt()&&((0,i.default)(this,u).textContent=this.translateIfPossible(this.options.label.textContent))}isChecked(){return(0,i.default)(this,h).checked}setChecked(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isBuilt()&&((0,i.default)(this,h).checked=e)}focus(){this.isBuilt()&&(0,i.default)(this,h).focus()}}t.RadioInputUI=d},44854:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(48427)),r=s(o(42538)),n=o(90437),a=o(22232),l=o(50095),h=o(83302),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=f(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),d=o(90500),c=o(96633),g=o(5386);function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(f=function(e){return e?o:t})(e)}function p(e,t){w(e,t),t.add(e)}function m(e,t,o){w(e,t),t.set(e,o)}function w(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function C(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var v=new WeakMap,y=new WeakMap,E=new WeakMap,S=new WeakMap,R=new WeakMap,b=new WeakSet,_=new WeakSet,T=new WeakSet;class O extends c.BaseUI{static get DEFAULTS(){return(0,a.clone)({className:"htUISelect",wrapIt:!1,tabIndex:-1})}constructor(e,t){super(e,(0,a.extend)(O.DEFAULTS,t)),p(this,T),p(this,_),p(this,b),m(this,v,{writable:!0,value:null}),m(this,y,{writable:!0,value:[]}),m(this,E,{writable:!0,value:void 0}),m(this,S,{writable:!0,value:void 0}),m(this,R,{writable:!0,value:void 0}),this.registerHooks()}getMenu(){return(0,r.default)(this,v)}registerHooks(){this.addLocalHook("click",(()=>C(this,T,N).call(this)))}setItems(e){(0,i.default)(this,y,this.translateNames(e)),(0,r.default)(this,v)&&(0,r.default)(this,v).setMenuItems((0,r.default)(this,y))}translateNames(e){return(0,l.arrayEach)(e,(e=>{e.name=this.translateIfPossible(e.name)})),e}build(){super.build(),(0,i.default)(this,v,new n.Menu(this.hot,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0,container:this.options.menuContainer})),(0,r.default)(this,v).setMenuItems((0,r.default)(this,y));const e=new c.BaseUI(this.hot,{className:"htUISelectCaption"}),t=new c.BaseUI(this.hot,{className:"htUISelectDropdown"});(0,i.default)(this,E,e),(0,i.default)(this,S,e.element),(0,i.default)(this,R,t),this.hot.getSettings().ariaTags&&((0,h.setAttribute)(t.element,[(0,g.A11Y_HIDDEN)()]),(0,h.setAttribute)(this._element,[(0,g.A11Y_LISTBOX)()])),(0,l.arrayEach)([e,t],(e=>this._element.appendChild(e.element))),(0,r.default)(this,v).addLocalHook("select",(e=>C(this,b,M).call(this,e))),(0,r.default)(this,v).addLocalHook("afterClose",(()=>C(this,_,I).call(this))),this.update()}update(){if(!this.isBuilt())return;let e;e=this.options.value?this.options.value.name:(0,r.default)(this,v).hot.getTranslatedPhrase(u.FILTERS_CONDITIONS_NONE),(0,r.default)(this,S).textContent=e,super.update()}openOptions(){const e=this.element.getBoundingClientRect();(0,r.default)(this,v)&&((0,r.default)(this,v).open(),(0,r.default)(this,v).setPosition({left:this.hot.isLtr()?e.left-5:e.left-31,top:e.top-1,width:e.width,height:e.height}),(0,r.default)(this,v).getNavigator().toFirstItem(),(0,r.default)(this,v).getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:e=>{this.closeOptions(),this.runLocalHooks("tabKeydown",e)}},{keys:[["Control/Meta","A"]],callback:()=>!1}]))}closeOptions(){(0,r.default)(this,v)&&(0,r.default)(this,v).close()}focus(){this.isBuilt()&&this.element.focus()}destroy(){(0,r.default)(this,v)&&((0,r.default)(this,v).destroy(),(0,i.default)(this,v,null)),(0,r.default)(this,E)&&(0,r.default)(this,E).destroy(),(0,r.default)(this,R)&&(0,r.default)(this,R).destroy(),super.destroy()}}function M(e){e.name!==d.SEPARATOR&&(this.options.value=e,this.update(),this.runLocalHooks("select",this.options.value))}function I(){this.runLocalHooks("afterClose")}function N(){this.openOptions()}t.SelectUI=O},94427:(e,t,o)=>{"use strict";t.__esModule=!0,t.createArrayAssertion=h,t.intersectValues=function(e,t,o,s){const r=[],a=e===t;let l;a||(l=h(t));return(0,i.arrayEach)(e,(e=>{let t=!1;(a||l(e))&&(t=!0);const i={checked:t,value:e,visualValue:n(e,o)};s&&s(i),r.push(i)})),r},t.sortComparison=function(e,t){if("number"==typeof e&&"number"==typeof t)return e-t;return r(e,t)},t.toEmptyString=function(e){return null==e?"":e},t.toVisualValue=n,t.unifyColumnValues=function(e){let t=e;t=l?Array.from(new Set(t)):(0,i.arrayUnique)(t);return t=t.sort(((e,t)=>"number"==typeof e&&"number"==typeof t?e-t:e===t?0:e>t?1:-1)),t},o(63517);var s=o(7374),i=o(50095);const r=(0,s.getComparisonFunction)();function n(e,t){let o=e;return""===o&&(o=`(${t})`),o}const a=new Set([1]).has(1),l=a&&"function"==typeof Array.from;function h(e){let t=e;return a&&(t=new Set(t)),function(e){let o;return o=a?t.has(e):!!~t.indexOf(e),o}}},33423:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getRegisteredHotInstances=function(e){var t;const o=d(),s=0===o.size?[]:Array.from(null!==(t=o.get(e))&&void 0!==t?t:[]);return new Map(s.map((e=>[e.getPlugin("formulas").sheetId,e])))},t.registerCustomFunctions=f,t.registerEngine=g,t.registerLanguage=p,t.registerNamedExpressions=m,t.setupEngine=function(e){const t=e.getSettings(),o=t[h.PLUGIN_KEY],s=null==o?void 0:o.engine;if(!0===o)return null;if((0,r.isUndefined)(s))return null;var i;if("function"==typeof s.hyperformula||"function"==typeof s)return g(null!==(i=s.hyperformula)&&void 0!==i?i:s,t,e);if("object"==typeof s&&(0,r.isUndefined)(s.hyperformula)){const t=d(),o=c().get(s);return t.has(s)||t.set(s,[]),t.get(s).push(e),o&&o.push(e.guid),s.getConfig().licenseKey||s.updateConfig({licenseKey:u.DEFAULT_LICENSE_KEY}),s.getConfig().leapYear1900===u.DEFAULT_SETTINGS.leapYear1900&&!1!==(0,l.isObjectEqual)(s.getConfig().nullDate,u.DEFAULT_SETTINGS.nullDate)||(0,a.warn)(n.toSingleLine`If you use HyperFormula with Handsontable, keep the default \`leapYear1900\` and \`nullDate\`
71
- settings. Otherwise, HyperFormula's dates may not sync correctly with Handsontable's dates.`),s}return null},t.setupSheet=function(e,t){!(0,r.isUndefined)(t)&&e.doesSheetExist(t)||(t=e.addSheet(t));return t},t.unregisterEngine=function(e,t){if(e){const o=d(),s=o.get(e),i=c(),r=i.get(e);s&&s.includes(t)&&(s.splice(s.indexOf(t),1),0===s.length&&o.delete(e)),r&&r.includes(t.guid)&&(r.splice(r.indexOf(t.guid),1),0===r.length&&(i.delete(e),e.destroy()))}},o(63517);var i=s(o(63800)),r=o(93315),n=o(28236),a=o(69173),l=o(22232),h=o(11870),u=o(61205);function d(){const e="engine_relationship",t=(0,i.default)(h.PLUGIN_KEY);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function c(){const e="shared_engine_usage",t=(0,i.default)(h.PLUGIN_KEY);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function g(e,t,o){const s=t[h.PLUGIN_KEY],i=(0,u.getEngineSettingsWithDefaultsAndOverrides)(t),r=d(),n=c();f(e,s.functions),p(e,s.language);const a=e.buildEmpty(i);return r.set(a,[o]),n.set(a,[o.guid]),m(a,s.namedExpressions),a.on("sheetAdded",(()=>{a.rebuildAndRecalculate()})),a.on("sheetRemoved",(()=>{a.rebuildAndRecalculate()})),a}function f(e,t){t&&t.forEach((t=>{const{name:o,plugin:s,translations:i}=t;try{e.registerFunction(o,s,i)}catch(e){(0,a.warn)(e.message)}}))}function p(e,t){if(t){const{langCode:o}=t;try{e.registerLanguage(o,t)}catch(e){(0,a.warn)(e.message)}}}function m(e,t){t&&(e.suspendEvaluation(),t.forEach((t=>{const{name:o,expression:s,scope:i,options:r}=t;try{e.addNamedExpression(o,s,i,r)}catch(e){(0,a.warn)(e.message)}})),e.resumeEvaluation())}},61205:(e,t,o)=>{"use strict";t.__esModule=!0,t.getEngineSettingsOverrides=n,t.getEngineSettingsWithDefaultsAndOverrides=function(e){var t;const o=e[s.PLUGIN_KEY],i=a(null!=o&&null!==(t=o.engine)&&void 0!==t&&t.hyperformula?o.engine:{}),l=n(e);return{...r,...i,...l}},t.getEngineSettingsWithOverrides=function(e){var t;const o=e[s.PLUGIN_KEY],i=a(null!=o&&null!==(t=o.engine)&&void 0!==t&&t.hyperformula?o.engine:{}),r=n(e);return{...i,...r}},t.haveEngineSettingsChanged=function(e,t){return Object.keys(t).some((o=>void 0!==t[o]&&t[o]!==e[o]))};var s=o(11870);const i=t.DEFAULT_LICENSE_KEY="internal-use-in-handsontable",r=t.DEFAULT_SETTINGS={licenseKey:i,useArrayArithmetic:!0,useColumnIndex:!1,useStats:!1,evaluateNullToZero:!0,precisionEpsilon:1e-13,precisionRounding:14,smartRounding:!0,leapYear1900:!1,nullDate:{year:1899,month:12,day:30},nullYear:30,dateFormats:["DD/MM/YYYY","DD/MM/YY"],timeFormats:["hh:mm","hh:mm:ss.sss"],matchWholeCell:!0,useRegularExpressions:!1,useWildcards:!0,functionArgSeparator:",",thousandSeparator:"",decimalSeparator:".",language:"enGB"};function n(e){var t;return{maxColumns:e.maxColumns,maxRows:e.maxRows,language:null===(t=e[s.PLUGIN_KEY])||void 0===t||null===(t=t.language)||void 0===t?void 0:t.langCode}}function a(e){return Object.keys(e).reduce(((t,o)=>("hyperformula"!==o&&(t[o]=e[o]),t)),{})}},11870:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(68983),o(91683),o(63517);var i=s(o(93231)),r=s(o(48427)),n=s(o(42538)),a=o(36026),l=s(o(63800)),h=o(69173),u=o(68145),d=o(93315),c=o(33423),g=o(54484),f=o(61205),p=o(65320),m=o(18609),w=s(o(56307)),C=s(o(9424));function v(e,t){E(e,t),t.add(e)}function y(e,t,o){E(e,t),t.set(e,o)}function E(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function S(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const R=t.PLUGIN_KEY="formulas",b=t.SETTING_KEYS=["maxRows","maxColumns","language"],_=t.PLUGIN_PRIORITY=260;w.default.getSingleton().register("afterNamedExpressionAdded"),w.default.getSingleton().register("afterNamedExpressionRemoved"),w.default.getSingleton().register("afterSheetAdded"),w.default.getSingleton().register("afterSheetRemoved"),w.default.getSingleton().register("afterSheetRenamed"),w.default.getSingleton().register("afterFormulasValuesUpdate");const T=e=>"UndoRedo.undo"===e||"UndoRedo.redo"===e||"auto"===e;var O=new WeakMap,M=new WeakMap,I=new WeakMap,N=new WeakSet,A=new WeakSet,P=new WeakSet,x=new WeakSet,H=new WeakSet,k=new WeakSet,D=new WeakSet,L=new WeakSet,W=new WeakSet,F=new WeakSet,V=new WeakSet,B=new WeakSet,U=new WeakSet,Y=new WeakSet,j=new WeakSet,G=new WeakSet,z=new WeakSet,K=new WeakSet,$=new WeakSet,X=new WeakSet,q=new WeakSet,Q=new WeakSet,J=new WeakSet,Z=new WeakSet;class ee extends a.BasePlugin{constructor(){var e;super(...arguments),e=this,v(this,Z),v(this,J),v(this,Q),v(this,q),v(this,X),v(this,$),v(this,K),v(this,z),v(this,G),v(this,j),v(this,Y),v(this,U),v(this,B),v(this,V),v(this,F),v(this,W),v(this,L),v(this,D),v(this,k),v(this,H),v(this,x),v(this,P),v(this,A),v(this,N),y(this,O,{writable:!0,value:!1}),y(this,M,{writable:!0,value:!1}),y(this,I,{writable:!0,value:[["valuesUpdated",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return S(e,$,ve).call(e,...o)}],["namedExpressionAdded",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return S(e,X,ye).call(e,...o)}],["namedExpressionRemoved",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return S(e,q,Ee).call(e,...o)}],["sheetAdded",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return S(e,Q,Se).call(e,...o)}],["sheetRenamed",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return S(e,J,Re).call(e,...o)}],["sheetRemoved",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return S(e,Z,be).call(e,...o)}]]}),(0,i.default)(this,"staticRegister",(0,l.default)("formulas")),(0,i.default)(this,"engine",null),(0,i.default)(this,"sheetName",null),(0,i.default)(this,"indexSyncer",null),(0,i.default)(this,"rowAxisSyncer",null),(0,i.default)(this,"columnAxisSyncer",null)}static get PLUGIN_KEY(){return R}static get PLUGIN_PRIORITY(){return _}static get SETTING_KEYS(){return[R,...b]}get sheetId(){return null===this.sheetName?null:this.engine.getSheetId(this.sheetName)}isEnabled(){return!!this.hot.getSettings()[R]}enablePlugin(){var e,t=this;if(!this.enabled)if(this.engine=null!==(e=(0,c.setupEngine)(this.hot))&&void 0!==e?e:this.engine,this.engine){if(null!==this.sheetName&&!this.engine.doesSheetExist(this.sheetName)){const e=this.addSheet(this.sheetName,this.hot.getSourceDataArray());!1!==e&&(this.sheetName=e)}this.addHook("beforeLoadData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,P,se).call(t,...o)})),this.addHook("afterLoadData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,H,re).call(t,...o)})),this.addHook("beforeUpdateData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,P,se).call(t,...o)})),this.addHook("afterUpdateData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,H,re).call(t,...o)})),this.addHook("modifyData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,k,ne).call(t,...o)})),this.addHook("modifySourceData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,D,ae).call(t,...o)})),this.addHook("beforeValidate",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,N,te).call(t,...o)})),this.addHook("afterSetSourceDataAtCell",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,W,he).call(t,...o)})),this.addHook("afterSetDataAtCell",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,L,le).call(t,...o)})),this.addHook("afterSetDataAtRowProp",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,L,le).call(t,...o)})),this.addHook("beforeCreateRow",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,F,ue).call(t,...o)})),this.addHook("beforeCreateCol",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,V,de).call(t,...o)})),this.addHook("afterCreateRow",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,Y,fe).call(t,...o)})),this.addHook("afterCreateCol",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,j,pe).call(t,...o)})),this.addHook("beforeRemoveRow",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,B,ce).call(t,...o)})),this.addHook("beforeRemoveCol",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,U,ge).call(t,...o)})),this.addHook("afterRemoveRow",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,G,me).call(t,...o)})),this.addHook("afterRemoveCol",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,z,we).call(t,...o)})),this.indexSyncer=new C.default(this.hot.rowIndexMapper,this.hot.columnIndexMapper,(e=>{this.hot.addHookOnce("init",(()=>{e()}))})),this.rowAxisSyncer=this.indexSyncer.getForAxis("row"),this.columnAxisSyncer=this.indexSyncer.getForAxis("column"),this.hot.addHook("afterRowSequenceChange",this.rowAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("afterColumnSequenceChange",this.columnAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("beforeRowMove",((e,t,o,s)=>{this.rowAxisSyncer.storeMovesInformation(e,t,s)})),this.hot.addHook("beforeColumnMove",((e,t,o,s)=>{this.columnAxisSyncer.storeMovesInformation(e,t,s)})),this.hot.addHook("afterRowMove",((e,t,o,s,i)=>{this.rowAxisSyncer.calculateAndSyncMoves(s,i)})),this.hot.addHook("afterColumnMove",((e,t,o,s,i)=>{this.columnAxisSyncer.calculateAndSyncMoves(s,i)})),this.hot.addHook("beforeColumnFreeze",((e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart,t)})),this.hot.addHook("afterColumnFreeze",((e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)})),this.hot.addHook("beforeColumnUnfreeze",((e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart-1,t)})),this.hot.addHook("afterColumnUnfreeze",((e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)})),this.addHook("afterCellMetaReset",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,x,ie).call(t,...o)})),this.addHook("beforeUndo",(()=>{this.indexSyncer.setPerformUndo(!0),this.engine.undo()})),this.addHook("beforeRedo",(()=>{this.indexSyncer.setPerformRedo(!0),this.engine.redo()})),this.addHook("afterUndo",(()=>{this.indexSyncer.setPerformUndo(!1)})),this.addHook("afterUndo",(()=>{this.indexSyncer.setPerformRedo(!1)})),this.addHook("afterDetachChild",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,K,Ce).call(t,...o)})),this.addHook("beforeAutofill",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,A,oe).call(t,...o)})),(0,n.default)(this,I).forEach((e=>{let[t,o]=e;return this.engine.on(t,o)})),super.enablePlugin()}else(0,h.warn)("Missing the required `engine` key in the Formulas settings. Please fill it with either an engine class or an engine instance.")}disablePlugin(){(0,n.default)(this,I).forEach((e=>{let[t,o]=e;return this.engine.off(t,o)})),(0,c.unregisterEngine)(this.engine,this.hot),this.engine=null,super.disablePlugin()}updatePlugin(e){const t=(0,f.getEngineSettingsWithOverrides)(this.hot.getSettings());(0,f.haveEngineSettingsChanged)(this.engine.getConfig(),t)&&this.engine.updateConfig(t);const o=this.hot.getSettings()[R];if((0,d.isDefined)(o)&&(0,d.isDefined)(o.sheetName)&&o.sheetName!==this.sheetName&&this.switchSheet(o.sheetName),!e.data&&null===this.sheetName){const e=this.hot.getSettings()[R].sheetName;e&&this.engine.doesSheetExist(e)?this.switchSheet(this.sheetName):this.sheetName=this.addSheet(null!=e?e:void 0,this.hot.getSourceDataArray())}super.updatePlugin(e)}destroy(){(0,n.default)(this,I).forEach((e=>{var t;let[o,s]=e;return null===(t=this.engine)||void 0===t?void 0:t.off(o,s)})),(0,r.default)(this,I,null),(0,c.unregisterEngine)(this.engine,this.hot),this.engine=null,super.destroy()}addSheet(e,t){if((0,d.isDefined)(t)&&!(0,p.isArrayOfArrays)(t))return(0,h.warn)("The provided data should be an array of arrays."),!1;if(null!=e&&this.engine.doesSheetExist(e))return(0,h.warn)("Sheet with the provided name already exists."),!1;try{const o=this.engine.addSheet(null!=e?e:void 0);return t&&this.engine.setSheetContent(this.engine.getSheetId(o),t),o}catch(e){return(0,h.warn)(e.message),!1}}switchSheet(e){if(!this.engine.doesSheetExist(e))return void(0,h.error)(`The sheet named \`${e}\` does not exist, switch aborted.`);this.sheetName=e;const t=this.engine.getSheetSerialized(this.sheetId);t.length>0&&this.hot.loadData(t,`${(0,m.toUpperCaseFirst)(R)}.switchSheet`)}getCellType(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;const s=this.hot.toPhysicalRow(e),i=this.hot.toPhysicalColumn(t);return null!==s&&null!==i?this.engine.getCellType({sheet:o,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)}):"EMPTY"}isFormulaCellType(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;return this.engine.doesCellHaveFormula({sheet:o,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)})}renderDependentSheets(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=new Set;e.forEach((e=>{var t;const s=null==e||null===(t=e.address)||void 0===t?void 0:t.sheet;void 0!==s&&(o.has(s)||o.add(s))})),(0,c.getRegisteredHotInstances)(this.engine).forEach(((e,s)=>{var i;(t||s!==this.sheetId)&&o.has(s)&&(e.render(),null===(i=e.view)||void 0===i||i.adjustElementsSize())}))}validateDependentCells(e){const t=e=>{var t;const{row:o,col:s,sheet:i}=null!==(t=null==e?void 0:e.address)&&void 0!==t?t:{};return(0,d.isDefined)(i)?`${i}:${o}x${s}`:""},o=new Set((arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).map((e=>t(e))));e.forEach((e=>{var s,i;const{row:r,col:n}=null!==(s=e.address)&&void 0!==s?s:{};if(!1===(0,d.isDefined)(r)||!1===(0,d.isDefined)(n)||r>=this.hot.countRows()||n>=this.hot.countCols())return;const a=null==e||null===(i=e.address)||void 0===i?void 0:i.sheet,l=t(e);if(void 0!==a&&!o.has(l)){const e=(0,c.getRegisteredHotInstances)(this.engine).get(a);if(!e)return;e.validateCell(e.getDataAtCell(r,n),e.getCellMeta(r,n),(()=>{}))}}))}syncChangeWithEngine(e,t,o){const s={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};if(!this.engine.isItPossibleToSetCellContents(s))return void(0,h.warn)(`Not possible to set cell data at ${JSON.stringify(s)}`);const i=this.hot.getCellMeta(e,t);return(0,g.isDate)(o,i.type)&&((0,g.isDateValid)(o,i.dateFormat)?o=(0,g.getDateInHfFormat)(o,i.dateFormat):!1===(0,g.isFormula)(o)&&(o=`'${o}`)),this.engine.setCellContents(s,o)}}function te(e,t,o){const s=this.hot.propToCol(o);if(this.isFormulaCellType(t,s)){const e={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId},o=this.hot.getCellMeta(t,s);let i=this.engine.getCellValue(e);return"date"===o.type&&(0,u.isNumeric)(i)&&(i=(0,g.getDateFromExcelDate)(i,o.dateFormat)),"object"==typeof i&&null!==i?i.value:i}return e}function oe(e,t,o){const{row:s,col:i}=t.getTopStartCorner(),{row:r,col:n}=t.getBottomEndCorner(),{row:a,col:l}=o.getTopStartCorner(),{row:h,col:u}=o.getBottomEndCorner(),d={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(s),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(r),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(n),sheet:this.sheetId}},c={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(a),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(l),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(h),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(u),sheet:this.sheetId}};if(!1===this.engine.isItPossibleToSetCellContents(c))return!1;const f=this.engine.getFillRangeData(d,c),{row:p,col:m}=d.start,{row:w,col:C}=d.end,v=w-p+1,y=C-m+1;for(let e=0;e<f.length;e+=1)for(let t=0;t<f[e].length;t+=1){const o=f[e][t],s=e%v,i=t%y,r=this.hot.getCellMeta(s,i);(0,g.isDate)(o,r.type)&&(o.startsWith("'")?f[e][t]=o.slice(1):!1===this.isFormulaCellType(s,i,this.sheetId)&&(f[e][t]=(0,g.getDateInHotFormat)(o,r.dateFormat)))}return f}function se(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"").includes((0,m.toUpperCaseFirst)(R))||(0,r.default)(this,M,(0,d.isUndefined)(this.hot.getSettings().data))}function ie(){const e=this.hot.getSourceDataArray();let t=!1;e.forEach(((o,s)=>{o.forEach(((o,i)=>{const r=this.hot.getCellMeta(s,i),n=r.dateFormat;(0,g.isDate)(o,r.type)&&(t=!0,(0,g.isDateValid)(o,n)?e[s][i]=(0,g.getDateInHfFormat)(o,n):!1===this.isFormulaCellType(s,i)&&(e[s][i]=`'${o}`))}))})),!0===t&&((0,r.default)(this,O,!0),this.engine.setSheetContent(this.sheetId,e),(0,r.default)(this,O,!1))}function re(e,t){if(!(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"").includes((0,m.toUpperCaseFirst)(R)))if(this.sheetName=(0,c.setupSheet)(this.engine,this.hot.getSettings()[R].sheetName),(0,n.default)(this,M))this.switchSheet(this.sheetName);else{const e=this.hot.getSourceDataArray();if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,e)){(0,r.default)(this,O,!0);const t=this.engine.setSheetContent(this.sheetId,e);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(t),(0,r.default)(this,O,!1)}}}function ne(e,t,o,s){if("get"!==s||(0,n.default)(this,O)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const i=this.hot.toVisualRow(e);if(null===i||null===t)return;if(!this.isFormulaCellType(i,t)){if("ARRAY"!==this.getCellType(i,t))return void((0,g.isEscapedFormulaExpression)(o.value)&&(o.value=(0,g.unescapeFormulaExpression)(o.value)))}const r={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};let a=this.engine.getCellValue(r);const l=this.hot.getCellMeta(i,t);"date"===l.type&&(0,u.isNumeric)(a)&&(a=(0,g.getDateFromExcelDate)(a,l.dateFormat));const h="object"==typeof a&&null!==a?a.value:a;o.value=h}function ae(e,t,o,s){if("get"!==s||(0,n.default)(this,O)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const i=this.hot.toVisualRow(e),r=this.hot.propToCol(t);if(null===i||null===r)return;if(!this.isFormulaCellType(i,r)){if("ARRAY"!==this.getCellType(i,r))return}const a=this.engine.getSheetDimensions(this.engine.getSheetId(this.sheetName));if(0===a.width&&0===a.height)return;const l={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(r),sheet:this.sheetId};o.value=this.engine.getCellSerialized(l)}function le(e,t){if(T(t))return;const o=[],s=[],i=this.engine.batch((()=>{e.forEach((e=>{let[t,i,,r]=e;const n=this.hot.propToCol(i),a=this.hot.toPhysicalRow(t),l=this.hot.toPhysicalColumn(n),h={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(n),sheet:this.sheetId};null!==a&&null!==l?this.syncChangeWithEngine(t,n,r):o.push([t,n,r]),s.push({address:h})}))}));o.length&&this.hot.addHookOnce("afterChange",(()=>{const e=this.engine.batch((()=>{o.forEach((e=>{let[t,o,s]=e;this.syncChangeWithEngine(t,o,s)}))}));this.renderDependentSheets(e,!0)})),this.renderDependentSheets(i),this.validateDependentCells(i,s)}function he(e,t){if(T(t))return;const o=[],s=[];e.forEach((e=>{let[t,i,,r]=e;const n=this.hot.propToCol(i);if(!(0,u.isNumeric)(n))return;const a={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(n),sheet:this.sheetId};this.engine.isItPossibleToSetCellContents(a)?(s.push({address:a}),o.push(...this.engine.setCellContents(a,r))):(0,h.warn)(`Not possible to set source cell data at ${JSON.stringify(a)}`)})),this.renderDependentSheets(o),this.validateDependentCells(o,s)}function ue(e,t){let o=this.rowAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countRows()&&(o=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddRows(this.sheetId,[o,t]))return!1}function de(e,t){let o=this.columnAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countCols()&&(o=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddColumns(this.sheetId,[o,t]))return!1}function ce(e,t,o){return!1!==this.rowAxisSyncer.setRemovedHfIndexes(o).every((e=>this.engine.isItPossibleToRemoveRows(this.sheetId,[e,1])))&&void 0}function ge(e,t,o){return!1!==this.columnAxisSyncer.setRemovedHfIndexes(o).every((e=>this.engine.isItPossibleToRemoveColumns(this.sheetId,[e,1])))&&void 0}function fe(e,t,o){if(T(o))return;const s=this.engine.addRows(this.sheetId,[this.rowAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(s)}function pe(e,t,o){if(T(o))return;const s=this.engine.addColumns(this.sheetId,[this.columnAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(s)}function me(e,t,o,s){if(T(s))return;const i=this.rowAxisSyncer.getRemovedHfIndexes().sort().reverse(),r=this.engine.batch((()=>{i.forEach((e=>{this.engine.removeRows(this.sheetId,[e,1])}))}));this.renderDependentSheets(r)}function we(e,t,o,s){if(T(s))return;const i=this.columnAxisSyncer.getRemovedHfIndexes().sort().reverse(),r=this.engine.batch((()=>{i.forEach((e=>{this.engine.removeColumns(this.sheetId,[e,1])}))}));this.renderDependentSheets(r)}function Ce(e,t,o){var s;(0,r.default)(this,O,!0);const i=this.hot.getSourceDataArray(o,0,o+((null===(s=t.__children)||void 0===s?void 0:s.length)||0),this.hot.countSourceCols());(0,r.default)(this,O,!1),i.forEach(((e,t)=>{e.forEach(((e,s)=>{this.engine.setCellContents({col:s,row:o+t,sheet:this.sheetId},[[e]])}))}))}function ve(e){this.hot.runHooks("afterFormulasValuesUpdate",e)}function ye(e,t){this.hot.runHooks("afterNamedExpressionAdded",e,t)}function Ee(e,t){this.hot.runHooks("afterNamedExpressionRemoved",e,t)}function Se(e){this.hot.runHooks("afterSheetAdded",e)}function Re(e,t){this.hot.runHooks("afterSheetRenamed",e,t)}function be(e,t){this.hot.runHooks("afterSheetRemoved",e,t)}t.Formulas=ee},83264:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(11870);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Formulas=s.Formulas},23657:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(42538)),r=s(o(48427)),n=o(18609);function a(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var l=new WeakMap,h=new WeakMap,u=new WeakMap,d=new WeakMap,c=new WeakMap,g=new WeakMap,f=new WeakMap;t.default=class{constructor(e,t,o){a(this,l,{writable:!0,value:void 0}),a(this,h,{writable:!0,value:void 0}),a(this,u,{writable:!0,value:void 0}),a(this,d,{writable:!0,value:[]}),a(this,c,{writable:!0,value:[]}),a(this,g,{writable:!0,value:void 0}),a(this,f,{writable:!0,value:[]}),(0,r.default)(this,l,e),(0,r.default)(this,h,t),(0,r.default)(this,u,o)}setRemovedHfIndexes(e){return(0,r.default)(this,f,e.map((e=>{const t=(0,i.default)(this,h).getVisualFromPhysicalIndex(e);return this.getHfIndexFromVisualIndex(t)}))),(0,i.default)(this,f)}getRemovedHfIndexes(){return(0,i.default)(this,f)}getHfIndexFromVisualIndex(e){const t=(0,i.default)(this,h).getIndexesSequence(),o=(0,i.default)(this,h).getNotTrimmedIndexes();return t.indexOf(o[e])}syncMoves(e){const t=`move${(0,n.toUpperCaseFirst)((0,i.default)(this,l))}s`;(0,i.default)(this,u).getEngine().batch((()=>{e.forEach((e=>{const o=e.from!==e.to,s=e.from+1!==e.to;o&&s&&(0,i.default)(this,u).getEngine()[t]((0,i.default)(this,u).getSheetId(),e.from,1,e.to)}))}))}storeMovesInformation(e,t,o){!1!==o&&((0,r.default)(this,c,e.map((e=>this.getHfIndexFromVisualIndex(e)))),(0,r.default)(this,g,this.getHfIndexFromVisualIndex(t)))}getMoveLine(e,t){const o=(0,i.default)(this,h).getNumberOfIndexes(),s=Array.from(Array(o).keys()).filter((t=>!1===e.includes(t)));var r;return 0===t?null!==(r=s[t])&&void 0!==r?r:0:s[t-1]+1}getInitiallyCalculatedMoves(e,t){let o=this.getMoveLine(e,t);const s=[];return e.forEach((e=>{const t={from:e,to:o};s.forEach((e=>{const o=e.from>e.to,s=e.to<=t.from;e.from>t.from&&s&&o&&(t.from+=1)})),t.from>=o&&(o+=1),s.push(t)})),s}adjustedCalculatedMoves(e){return e.forEach(((t,o)=>{e.slice(o+1).forEach((e=>{const o=e.from<e.to;e.from>t.from&&o&&(e.from-=1)}))})),e}calculateAndSyncMoves(e,t){if((0,i.default)(this,u).isPerformingUndoRedo())return;if(!1===e||!1===t)return;const o=this.adjustedCalculatedMoves(this.getInitiallyCalculatedMoves((0,i.default)(this,c),(0,i.default)(this,g)));null===(0,i.default)(this,u).getSheetId()?(0,i.default)(this,u).getPostponeAction((()=>this.syncMoves(o))):this.syncMoves(o)}getIndexesChangeSyncMethod(){const e=`set${(0,n.toUpperCaseFirst)((0,i.default)(this,l))}Order`;return t=>{if((0,i.default)(this,u).isPerformingUndoRedo())return;const o=(0,i.default)(this,h).getIndexesSequence();if("update"===t){const t=(0,i.default)(this,d).map((e=>o.indexOf(e))),s=(0,i.default)(this,u).getEngine().getSheetDimensions((0,i.default)(this,u).getSheetId());let r;r="row"===(0,i.default)(this,l)?s.height:s.width;for(let e=t.length;e<r;e+=1)t.push(e);(0,i.default)(this,u).getEngine()[e]((0,i.default)(this,u).getSheetId(),t)}(0,r.default)(this,d,o)}}init(){(0,r.default)(this,d,(0,i.default)(this,h).getIndexesSequence())}}},9424:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(42538)),r=s(o(48427)),n=s(o(23657));function a(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var l=new WeakMap,h=new WeakMap,u=new WeakMap,d=new WeakMap,c=new WeakMap,g=new WeakMap,f=new WeakMap;t.default=class{constructor(e,t,o){a(this,l,{writable:!0,value:void 0}),a(this,h,{writable:!0,value:void 0}),a(this,u,{writable:!0,value:void 0}),a(this,d,{writable:!0,value:!1}),a(this,c,{writable:!0,value:!1}),a(this,g,{writable:!0,value:null}),a(this,f,{writable:!0,value:null}),(0,r.default)(this,l,new n.default("row",e,this)),(0,r.default)(this,h,new n.default("column",t,this)),(0,r.default)(this,u,o)}getForAxis(e){return"row"===e?(0,i.default)(this,l):(0,i.default)(this,h)}setPerformUndo(e){(0,r.default)(this,d,e)}setPerformRedo(e){(0,r.default)(this,c,e)}isPerformingUndoRedo(){return(0,i.default)(this,d)||(0,i.default)(this,c)}getSheetId(){return(0,i.default)(this,f)}getEngine(){return(0,i.default)(this,g)}getPostponeAction(){return(0,i.default)(this,u)}setupSyncEndpoint(e,t){(0,r.default)(this,g,e),(0,r.default)(this,f,t),(0,i.default)(this,l).init(),(0,i.default)(this,h).init()}}},54484:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getDateFromExcelDate=function(e,t){const o=new Date(Date.UTC(0,0,e+-1));return(0,i.default)(o).format(t)},t.getDateInHfFormat=function(e,t){return(0,i.default)(e,t,!0).format(r)},t.getDateInHotFormat=function(e,t){return(0,i.default)(e,r,!0).format(t)},t.isDate=function(e,t){return"string"==typeof e&&"date"===t},t.isDateValid=function(e,t){return(0,i.default)(e,t,!0).isValid()},t.isEscapedFormulaExpression=n,t.isFormula=function(e){return"string"==typeof e&&e.startsWith("=")},t.unescapeFormulaExpression=function(e){return n(e)?e.substr(1):e};var i=s(o(33034));const r="DD/MM/YYYY";function n(e){return"string"==typeof e&&"'"===e.charAt(0)&&"="===e.charAt(1)}},81870:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"hidden_columns_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[,o,,s]=e;o-s!=0&&(t=1)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_HIDE_COLUMN,t)},callback(){const{from:t,to:o}=this.getSelectedRangeLast(),s=Math.max(Math.min(t.col,o.col),0),i=Math.max(t.col,o.col),r=[];for(let e=s;e<=i;e+=1)r.push(e);e.hideColumns(r);const n=r[r.length-1],a=this.columnIndexMapper.getNearestNotHiddenIndex(n,1,!0);Number.isInteger(a)&&a>=0?this.selectColumns(a):this.deselectCell(),this.render(),this.view.adjustElementsSize(!0)},disabled:!1,hidden(){return!(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner())}}},o(63517);var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},89917:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=[];return{key:"hidden_columns_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_SHOW_COLUMN,e)},callback(){var o,s;if(0===t.length)return;let i=t[0],r=t[t.length-1];i=null!==(o=this.columnIndexMapper.getNearestNotHiddenIndex(i-1,-1))&&void 0!==o?o:0,r=null!==(s=this.columnIndexMapper.getNearestNotHiddenIndex(r+1,1))&&void 0!==s?s:this.countCols()-1,e.showColumns(t),this.render(),this.view.adjustElementsSize(!0);r-i+1===this.countCols()||this.selectColumns(i,r)},disabled:!1,hidden(){const o=(0,s.arrayMap)(e.getHiddenColumns(),(e=>this.toPhysicalColumn(e)));if(!this.selection.isSelectedByColumnHeader()&&!this.selection.isSelectedByCorner()||o.length<1)return!0;t.length=0;const i=this.getSelectedRangeLast(),r=i.getTopStartCorner().col,n=i.getBottomEndCorner().col,a=this.columnIndexMapper,l=a.getRenderableFromVisualIndex(r),h=a.getRenderableFromVisualIndex(n),u=a.getNotTrimmedIndexes(),d=[];if(r!==n){if(n-r+1>h-l+1){const e=u.slice(r,n+1);d.push(...e.filter((e=>o.includes(e))))}}else if(0===l&&l<r)d.push(...u.slice(0,r));else if(null===l)d.push(...u.slice(0,this.countCols()));else{const e=this.countCols()-1;h===a.getRenderableFromVisualIndex(a.getNearestNotHiddenIndex(e,-1))&&e>n&&d.push(...u.slice(n+1))}return(0,s.arrayEach)(d,(e=>{t.push(this.toVisualColumn(e))})),0===t.length}}},o(63517);var s=o(50095),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},80923:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(42538)),r=s(o(48427)),n=o(36026),a=o(83302),l=o(68145),h=o(50095),u=o(22232),d=o(93315),c=o(90500),g=s(o(56307)),f=s(o(81870)),p=s(o(89917)),m=o(33165);function w(e,t){v(e,t),t.add(e)}function C(e,t,o){v(e,t),t.set(e,o)}function v(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function y(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(52097),g.default.getSingleton().register("beforeHideColumns"),g.default.getSingleton().register("afterHideColumns"),g.default.getSingleton().register("beforeUnhideColumns"),g.default.getSingleton().register("afterUnhideColumns");const E=t.PLUGIN_KEY="hiddenColumns",S=t.PLUGIN_PRIORITY=310;var R=new WeakMap,b=new WeakMap,_=new WeakSet,T=new WeakSet,O=new WeakSet,M=new WeakSet,I=new WeakSet,N=new WeakSet;class A extends n.BasePlugin{constructor(){super(...arguments),w(this,N),w(this,I),w(this,M),w(this,O),w(this,T),w(this,_),C(this,R,{writable:!0,value:{}}),C(this,b,{writable:!0,value:null})}static get PLUGIN_KEY(){return E}static get PLUGIN_PRIORITY(){return S}isEnabled(){return!!this.hot.getSettings()[E]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[E];(0,u.isObject)(t)&&((0,r.default)(this,R,t),(0,d.isUndefined)(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),(0,r.default)(this,b,new m.HidingMap),(0,i.default)(this,b).addLocalHook("init",(()=>y(this,N,L).call(this))),this.hot.columnIndexMapper.registerMap(this.pluginName,(0,i.default)(this,b)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return y(e,I,D).call(e,...o)})),this.addHook("afterGetCellMeta",((e,t,o)=>y(this,T,x).call(this,e,t,o))),this.addHook("modifyColWidth",((e,t)=>y(this,_,P).call(this,e,t))),this.addHook("afterGetColHeader",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return y(e,M,k).call(e,...o)})),this.addHook("modifyCopyableRange",(e=>y(this,O,H).call(this,e))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),(0,r.default)(this,R,{}),super.disablePlugin(),this.resetCellsMeta()}showColumns(e){const t=this.getHiddenColumns(),o=this.isValidConfig(e);let s=t;const r=(0,i.default)(this,b).getValues().slice(),n=e.length>0;if(o&&n){const t=e.map((e=>this.hot.toPhysicalColumn(e)));(0,h.arrayEach)(t,(e=>{r[e]=!1})),s=(0,h.arrayReduce)(r,((e,t,o)=>(t&&e.push(this.hot.toVisualColumn(o)),e)),[])}!1!==this.hot.runHooks("beforeUnhideColumns",t,s,o&&n)&&(o&&n&&(0,i.default)(this,b).setValues(r),this.hot.view.adjustElementsSize(),this.hot.runHooks("afterUnhideColumns",t,s,o&&n,o&&s.length<t.length))}showColumn(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.showColumns(t)}hideColumns(e){const t=this.getHiddenColumns(),o=this.isValidConfig(e);let s=t;o&&(s=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeHideColumns",t,s,o)&&(o&&this.hot.batchExecution((()=>{(0,h.arrayEach)(e,(e=>{(0,i.default)(this,b).setValueAtIndex(this.hot.toPhysicalColumn(e),!0)}))}),!0),this.hot.runHooks("afterHideColumns",t,s,o,o&&s.length>t.length))}hideColumn(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.hideColumns(t)}getHiddenColumns(){return(0,h.arrayMap)((0,i.default)(this,b).getHiddenIndexes(),(e=>this.hot.toVisualColumn(e)))}isHidden(e){return(0,i.default)(this,b).getValueAtIndex(this.hot.toPhysicalColumn(e))||!1}isValidConfig(e){const t=this.hot.countCols();return!!(Array.isArray(e)&&e.length>0)&&e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}resetCellsMeta(){(0,h.arrayEach)(this.hot.getCellsMeta(),(e=>{e&&(e.skipColumnOnPaste=!1)}))}destroy(){(0,r.default)(this,R,null),(0,r.default)(this,b,null),super.destroy()}}function P(e,t){return this.isHidden(t)?0:(0,i.default)(this,R).indicators&&(this.isHidden(t+1)||this.isHidden(t-1))&&"number"==typeof e&&this.hot.hasColHeaders()?e+15:void 0}function x(e,t,o){if(!1===(0,i.default)(this,R).copyPasteEnabled&&this.isHidden(t)&&(o.skipColumnOnPaste=!0),this.isHidden(t-1))o.className=o.className||"",-1===o.className.indexOf("afterHiddenColumn")&&(o.className+=" afterHiddenColumn");else if(o.className){const e=o.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenColumn");t>-1&&e.splice(t,1),o.className=e.join(" ")}}}function H(e){if((0,i.default)(this,R).copyPasteEnabled)return e;const t=[],o=(e,o,s,i)=>{t.push({startRow:e,endRow:o,startCol:s,endCol:i})};return(0,h.arrayEach)(e,(e=>{let t=!0,s=0;(0,l.rangeEach)(e.startCol,e.endCol,(i=>{this.isHidden(i)?(t||o(e.startRow,e.endRow,s,i-1),t=!0):(t&&(s=i),i===e.endCol&&o(e.startRow,e.endRow,s,i),t=!1)}))})),t}function k(e,t){if(!(0,i.default)(this,R).indicators||e<0)return;const o=[];e>=1&&this.isHidden(e-1)&&o.push("afterHiddenColumn"),e<this.hot.countCols()-1&&this.isHidden(e+1)&&o.push("beforeHiddenColumn"),(0,a.addClass)(t,o)}function D(e){e.items.push({name:c.SEPARATOR},(0,f.default)(this),(0,p.default)(this))}function L(){Array.isArray((0,i.default)(this,R).columns)&&this.hideColumns((0,i.default)(this,R).columns)}t.HiddenColumns=A},16083:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(80923);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.HiddenColumns=s.HiddenColumns},71294:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"hidden_rows_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[o,,s]=e;o-s!=0&&(t=1)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_HIDE_ROW,t)},callback(){const{from:t,to:o}=this.getSelectedRangeLast(),s=Math.max(Math.min(t.row,o.row),0),i=Math.max(t.row,o.row),r=[];for(let e=s;e<=i;e+=1)r.push(e);e.hideRows(r);const n=r[r.length-1],a=this.rowIndexMapper.getNearestNotHiddenIndex(n,1,!0);Number.isInteger(a)&&a>=0?this.selectRows(a):this.deselectCell(),this.render(),this.view.adjustElementsSize(!0)},disabled:!1,hidden(){return!(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner())}}},o(63517);var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},70029:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=[];return{key:"hidden_rows_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_SHOW_ROW,e)},callback(){var o,s;if(0===t.length)return;let i=t[0],r=t[t.length-1];i=null!==(o=this.rowIndexMapper.getNearestNotHiddenIndex(i-1,-1))&&void 0!==o?o:0,r=null!==(s=this.rowIndexMapper.getNearestNotHiddenIndex(r+1,1))&&void 0!==s?s:this.countRows()-1,e.showRows(t),this.render(),this.view.adjustElementsSize(!0);r-i+1===this.countRows()||this.selectRows(i,r)},disabled:!1,hidden(){const o=(0,s.arrayMap)(e.getHiddenRows(),(e=>this.toPhysicalRow(e)));if(!this.selection.isSelectedByRowHeader()&&!this.selection.isSelectedByCorner()||o.length<1)return!0;t.length=0;const i=this.getSelectedRangeLast(),r=i.getTopStartCorner().row,n=i.getBottomEndCorner().row,a=this.rowIndexMapper,l=a.getRenderableFromVisualIndex(r),h=a.getRenderableFromVisualIndex(n),u=a.getNotTrimmedIndexes(),d=[];if(r!==n){if(n-r+1>h-l+1){const e=u.slice(r,n+1);d.push(...e.filter((e=>o.includes(e))))}}else if(0===l&&l<r)d.push(...u.slice(0,r));else if(null===l)d.push(...u.slice(0,this.countRows()));else{const e=this.countRows()-1;h===a.getRenderableFromVisualIndex(a.getNearestNotHiddenIndex(e,-1))&&e>n&&d.push(...u.slice(n+1))}return(0,s.arrayEach)(d,(e=>{t.push(this.toVisualRow(e))})),0===t.length}}},o(63517);var s=o(50095),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},48894:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(42538)),r=s(o(48427)),n=o(36026),a=o(83302),l=o(68145),h=o(50095),u=o(22232),d=o(93315),c=o(90500),g=s(o(56307)),f=s(o(71294)),p=s(o(70029)),m=o(33165);function w(e,t){v(e,t),t.add(e)}function C(e,t,o){v(e,t),t.set(e,o)}function v(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function y(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(25972),g.default.getSingleton().register("beforeHideRows"),g.default.getSingleton().register("afterHideRows"),g.default.getSingleton().register("beforeUnhideRows"),g.default.getSingleton().register("afterUnhideRows");const E=t.PLUGIN_KEY="hiddenRows",S=t.PLUGIN_PRIORITY=320;var R=new WeakMap,b=new WeakMap,_=new WeakSet,T=new WeakSet,O=new WeakSet,M=new WeakSet,I=new WeakSet,N=new WeakSet;class A extends n.BasePlugin{constructor(){super(...arguments),w(this,N),w(this,I),w(this,M),w(this,O),w(this,T),w(this,_),C(this,R,{writable:!0,value:{}}),C(this,b,{writable:!0,value:null})}static get PLUGIN_KEY(){return E}static get PLUGIN_PRIORITY(){return S}isEnabled(){return!!this.hot.getSettings()[E]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[E];(0,u.isObject)(t)&&((0,r.default)(this,R,t),(0,d.isUndefined)(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),(0,r.default)(this,b,new m.HidingMap),(0,i.default)(this,b).addLocalHook("init",(()=>y(this,N,L).call(this))),this.hot.rowIndexMapper.registerMap(this.pluginName,(0,i.default)(this,b)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return y(e,I,D).call(e,...o)})),this.addHook("afterGetCellMeta",((e,t,o)=>y(this,T,x).call(this,e,t,o))),this.addHook("modifyRowHeight",((e,t)=>y(this,_,P).call(this,e,t))),this.addHook("afterGetRowHeader",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return y(e,M,k).call(e,...o)})),this.addHook("modifyCopyableRange",(e=>y(this,O,H).call(this,e))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap(this.pluginName),(0,r.default)(this,R,{}),super.disablePlugin(),this.resetCellsMeta()}showRows(e){const t=this.getHiddenRows(),o=this.isValidConfig(e);let s=t;const r=(0,i.default)(this,b).getValues().slice(),n=e.length>0;if(o&&n){const t=e.map((e=>this.hot.toPhysicalRow(e)));(0,h.arrayEach)(t,(e=>{r[e]=!1})),s=(0,h.arrayReduce)(r,((e,t,o)=>(t&&e.push(this.hot.toVisualRow(o)),e)),[])}!1!==this.hot.runHooks("beforeUnhideRows",t,s,o&&n)&&(o&&n&&(0,i.default)(this,b).setValues(r),this.hot.runHooks("afterUnhideRows",t,s,o&&n,o&&s.length<t.length))}showRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.showRows(t)}hideRows(e){const t=this.getHiddenRows(),o=this.isValidConfig(e);let s=t;o&&(s=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeHideRows",t,s,o)&&(o&&this.hot.batchExecution((()=>{(0,h.arrayEach)(e,(e=>{(0,i.default)(this,b).setValueAtIndex(this.hot.toPhysicalRow(e),!0)}))}),!0),this.hot.runHooks("afterHideRows",t,s,o,o&&s.length>t.length))}hideRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.hideRows(t)}getHiddenRows(){return(0,h.arrayMap)((0,i.default)(this,b).getHiddenIndexes(),(e=>this.hot.toVisualRow(e)))}isHidden(e){return(0,i.default)(this,b).getValueAtIndex(this.hot.toPhysicalRow(e))||!1}isValidConfig(e){const t=this.hot.countRows();return!!(Array.isArray(e)&&e.length>0)&&e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}resetCellsMeta(){(0,h.arrayEach)(this.hot.getCellsMeta(),(e=>{e&&(e.skipRowOnPaste=!1)}))}destroy(){(0,r.default)(this,R,null),(0,r.default)(this,b,null),super.destroy()}}function P(e,t){return this.isHidden(t)?0:e}function x(e,t,o){if(!1===(0,i.default)(this,R).copyPasteEnabled&&this.isHidden(e)&&(o.skipRowOnPaste=!0),this.isHidden(e-1))o.className=o.className||"",-1===o.className.indexOf("afterHiddenRow")&&(o.className+=" afterHiddenRow");else if(o.className){const e=o.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenRow");t>-1&&e.splice(t,1),o.className=e.join(" ")}}}function H(e){if((0,i.default)(this,R).copyPasteEnabled)return e;const t=[],o=(e,o,s,i)=>{t.push({startRow:e,endRow:o,startCol:s,endCol:i})};return(0,h.arrayEach)(e,(e=>{let t=!0,s=0;(0,l.rangeEach)(e.startRow,e.endRow,(i=>{this.isHidden(i)?(t||o(s,i-1,e.startCol,e.endCol),t=!0):(t&&(s=i),i===e.endRow&&o(s,i,e.startCol,e.endCol),t=!1)}))})),t}function k(e,t){if(!(0,i.default)(this,R).indicators||e<0)return;const o=[];e>=1&&this.isHidden(e-1)&&o.push("afterHiddenRow"),e<this.hot.countRows()-1&&this.isHidden(e+1)&&o.push("beforeHiddenRow"),(0,a.addClass)(t,o)}function D(e){e.items.push({name:c.SEPARATOR},(0,f.default)(this),(0,p.default)(this))}function L(){Array.isArray((0,i.default)(this,R).rows)&&this.hideRows((0,i.default)(this,R).rows)}t.HiddenRows=A},51124:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48894);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.HiddenRows=s.HiddenRows},40106:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllPlugins=function(){(0,L.registerPlugin)(s.AutoColumnSize),(0,L.registerPlugin)(i.Autofill),(0,L.registerPlugin)(r.AutoRowSize),(0,L.registerPlugin)(a.BindRowsWithHeaders),(0,L.registerPlugin)(l.CollapsibleColumns),(0,L.registerPlugin)(h.ColumnSorting),(0,L.registerPlugin)(u.ColumnSummary),(0,L.registerPlugin)(d.Comments),(0,L.registerPlugin)(c.ContextMenu),(0,L.registerPlugin)(g.CopyPaste),(0,L.registerPlugin)(f.CustomBorders),(0,L.registerPlugin)(p.DragToScroll),(0,L.registerPlugin)(m.DropdownMenu),(0,L.registerPlugin)(w.ExportFile),(0,L.registerPlugin)(C.Filters),(0,L.registerPlugin)(v.Formulas),(0,L.registerPlugin)(y.HiddenColumns),(0,L.registerPlugin)(E.HiddenRows),(0,L.registerPlugin)(S.ManualColumnFreeze),(0,L.registerPlugin)(R.ManualColumnMove),(0,L.registerPlugin)(b.ManualColumnResize),(0,L.registerPlugin)(_.ManualRowMove),(0,L.registerPlugin)(T.ManualRowResize),(0,L.registerPlugin)(O.MergeCells),(0,L.registerPlugin)(M.MultiColumnSorting),(0,L.registerPlugin)(I.MultipleSelectionHandles),(0,L.registerPlugin)(N.NestedHeaders),(0,L.registerPlugin)(A.NestedRows),(0,L.registerPlugin)(P.PersistentState),(0,L.registerPlugin)(x.Search),(0,L.registerPlugin)(H.TouchScroll),(0,L.registerPlugin)(k.TrimRows),(0,L.registerPlugin)(D.UndoRedo)};var s=o(21215);t.AutoColumnSize=s.AutoColumnSize;var i=o(62080);t.Autofill=i.Autofill;var r=o(60687);t.AutoRowSize=r.AutoRowSize;var n=o(36026);t.BasePlugin=n.BasePlugin;var a=o(85939);t.BindRowsWithHeaders=a.BindRowsWithHeaders;var l=o(55994);t.CollapsibleColumns=l.CollapsibleColumns;var h=o(1902);t.ColumnSorting=h.ColumnSorting;var u=o(68918);t.ColumnSummary=u.ColumnSummary;var d=o(76076);t.Comments=d.Comments;var c=o(86738);t.ContextMenu=c.ContextMenu;var g=o(77708);t.CopyPaste=g.CopyPaste;var f=o(3455);t.CustomBorders=f.CustomBorders;var p=o(72919);t.DragToScroll=p.DragToScroll;var m=o(74123);t.DropdownMenu=m.DropdownMenu;var w=o(83281);t.ExportFile=w.ExportFile;var C=o(30905);t.Filters=C.Filters;var v=o(83264);t.Formulas=v.Formulas;var y=o(16083);t.HiddenColumns=y.HiddenColumns;var E=o(51124);t.HiddenRows=E.HiddenRows;var S=o(58125);t.ManualColumnFreeze=S.ManualColumnFreeze;var R=o(19640);t.ManualColumnMove=R.ManualColumnMove;var b=o(35350);t.ManualColumnResize=b.ManualColumnResize;var _=o(60734);t.ManualRowMove=_.ManualRowMove;var T=o(15702);t.ManualRowResize=T.ManualRowResize;var O=o(95896);t.MergeCells=O.MergeCells;var M=o(13620);t.MultiColumnSorting=M.MultiColumnSorting;var I=o(98481);t.MultipleSelectionHandles=I.MultipleSelectionHandles;var N=o(37499);t.NestedHeaders=N.NestedHeaders;var A=o(93363);t.NestedRows=A.NestedRows;var P=o(94870);t.PersistentState=P.PersistentState;var x=o(27885);t.Search=x.Search;var H=o(30450);t.TouchScroll=H.TouchScroll;var k=o(95128);t.TrimRows=k.TrimRows;var D=o(77137);t.UndoRedo=D.UndoRedo;var L=o(52036);t.registerPlugin=L.registerPlugin,t.getPlugin=L.getPlugin,t.getPluginsNames=L.getPluginsNames},64618:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"freeze_column",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_FREEZE_COLUMN)},callback(t,o){const[{start:{col:s}}]=o;e.freezeColumn(s),this.render(),this.view.adjustElementsSize(!0)},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col<=this.getSettings().fixedColumnsStart-1)&&(t=!0),t}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},76969:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"unfreeze_column",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN)},callback(t,o){const[{start:{col:s}}]=o;e.unfreezeColumn(s),this.render(),this.view.adjustElementsSize(!0)},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col>=this.getSettings().fixedColumnsStart)&&(t=!0),t}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},58125:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(75017);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnFreeze=s.ManualColumnFreeze},75017:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(42538)),r=s(o(48427)),n=o(36026),a=s(o(56307)),l=s(o(64618)),h=s(o(76969));function u(e,t){d(e,t),t.add(e)}function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function c(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(18633),a.default.getSingleton().register("beforeColumnFreeze"),a.default.getSingleton().register("afterColumnFreeze"),a.default.getSingleton().register("beforeColumnUnfreeze"),a.default.getSingleton().register("afterColumnUnfreeze");const g=t.PLUGIN_KEY="manualColumnFreeze",f=t.PLUGIN_PRIORITY=110;var p=new WeakMap,m=new WeakSet,w=new WeakSet;class C extends n.BasePlugin{constructor(){var e,t,o;super(...arguments),u(this,w),u(this,m),o={writable:!0,value:!1},d(e=this,t=p),t.set(e,o)}static get PLUGIN_KEY(){return g}static get PLUGIN_PRIORITY(){return f}isEnabled(){return!!this.hot.getSettings()[g]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>c(this,m,v).call(this,e))),this.addHook("beforeColumnMove",((e,t)=>c(this,w,y).call(this,e,t))),super.enablePlugin())}disablePlugin(){(0,r.default)(this,p,!1),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}freezeColumn(e){const t=this.hot.getSettings(),o=t.fixedColumnsStart<this.hot.countCols()&&e>t.fixedColumnsStart-1;(0,i.default)(this,p)||(0,r.default)(this,p,!0);!1!==this.hot.runHooks("beforeColumnFreeze",e,o)&&(o&&(this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsStart),t._fixedColumnsStart+=1),this.hot.runHooks("afterColumnFreeze",e,o))}unfreezeColumn(e){const t=this.hot.getSettings(),o=t.fixedColumnsStart>0&&e<=t.fixedColumnsStart-1;(0,i.default)(this,p)||(0,r.default)(this,p,!0);!1!==this.hot.runHooks("beforeColumnUnfreeze",e,o)&&(o&&(t._fixedColumnsStart-=1,this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsStart)),this.hot.runHooks("afterColumnUnfreeze",e,o))}}function v(e){e.items.push({name:"---------"},(0,l.default)(this),(0,h.default)(this))}function y(e,t){if((0,i.default)(this,p)){const o=this.hot.getSettings().fixedColumnsStart;if(t<o)return!1;if(e.some((e=>e<o)))return!1}}t.ManualColumnFreeze=C},19640:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(47507);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnMove=s.ManualColumnMove},47507:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(48427)),r=s(o(42538)),n=o(36026),a=s(o(56307)),l=o(50095),h=o(83302),u=o(24449),d=o(68145),c=s(o(53277)),g=s(o(4588));function f(e,t){m(e,t),t.add(e)}function p(e,t,o){m(e,t),t.set(e,o)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(36881),a.default.getSingleton().register("beforeColumnMove"),a.default.getSingleton().register("afterColumnMove");const C=t.PLUGIN_KEY="manualColumnMove",v=t.PLUGIN_PRIORITY=120,y="ht__manualColumnMove",E="show-ui",S="on-moving--columns",R="after-selection--columns";var b=new WeakMap,_=new WeakMap,T=new WeakMap,O=new WeakMap,M=new WeakMap,I=new WeakMap,N=new WeakMap,A=new WeakMap,P=new WeakMap,x=new WeakMap,H=new WeakMap,k=new WeakSet,D=new WeakSet,L=new WeakSet,W=new WeakSet,F=new WeakSet,V=new WeakSet;class B extends n.BasePlugin{constructor(){super(...arguments),f(this,V),f(this,F),f(this,W),f(this,L),f(this,D),f(this,k),p(this,b,{writable:!0,value:new c.default(this.hot)}),p(this,_,{writable:!0,value:new g.default(this.hot)}),p(this,T,{writable:!0,value:[]}),p(this,O,{writable:!0,value:0}),p(this,M,{writable:!0,value:!1}),p(this,I,{writable:!0,value:{}}),p(this,N,{writable:!0,value:void 0}),p(this,A,{writable:!0,value:void 0}),p(this,P,{writable:!0,value:void 0}),p(this,x,{writable:!0,value:void 0}),p(this,H,{writable:!0,value:void 0})}static get PLUGIN_KEY(){return C}static get PLUGIN_PRIORITY(){return v}isEnabled(){return!!this.hot.getSettings()[C]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return w(e,k,U).call(e,...o)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return w(e,L,j).call(e,...o)})),this.addHook("afterScrollVertically",(()=>w(this,F,z).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return w(e,V,K).call(e,...o)})),this.buildPluginUI(),this.registerEvents(),(0,h.addClass)(this.hot.rootElement,y),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,h.removeClass)(this.hot.rootElement,y),this.unregisterEvents(),(0,r.default)(this,b).destroy(),(0,r.default)(this,_).destroy(),super.disablePlugin()}moveColumn(e,t){return this.moveColumns([e],t)}moveColumns(e,t){const o=(0,r.default)(this,N),s=this.isMovePossible(e,t),n=this.hot.runHooks("beforeColumnMove",e,t,o,s);if((0,i.default)(this,N,void 0),!1===n)return;s&&this.hot.columnIndexMapper.moveIndexes(e,t);const a=s&&this.isColumnOrderChanged(e,t);return this.hot.runHooks("afterColumnMove",e,t,o,s,a),a}dragColumn(e,t){return this.dragColumns([e],t)}dragColumns(e,t){const o=this.countFinalIndex(e,t);return(0,i.default)(this,N,t),this.moveColumns(e,o)}isMovePossible(e,t){const o=this.hot.columnIndexMapper.getNotTrimmedIndexesLength(),s=e.length+t>o,i=t<0,r=e.some((e=>e<0)),n=e.some((e=>e>=o));return!(s||i||r||n)}isColumnOrderChanged(e,t){return e.some(((e,o)=>e-o!==t))}countFinalIndex(e,t){const o=(0,l.arrayReduce)(e,((e,o)=>(o<t&&(e+=1),e)),0);return t-o}getColumnsWidth(e,t){const o=this.hot.columnIndexMapper;let s=0;for(let i=e;i<=t;i+=1){const e=o.getRenderableFromVisualIndex(i);i<0?s+=this.hot.view._wt.wtViewport.getRowHeaderWidth()||0:null!==e&&(s+=this.hot.view._wt.wtTable.getStretchedColumnWidth(e)||0)}return s}moveBySettingsOrLoad(){const e=this.hot.getSettings()[C];if(Array.isArray(e))this.moveColumns(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveColumns(e,0)}}isFixedColumnsStart(e){return e<this.hot.getSettings().fixedColumnsStart}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualColumnMove",this.hot.columnIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualColumnMove",e),e.value?e.value:[]}prepareColumnsToMoving(e,t){const o=[];return(0,d.rangeEach)(e,t,(e=>{o.push(e)})),o}refreshPositions(){const e=this.hot.view.getFirstFullyVisibleColumn();this.isFixedColumnsStart((0,r.default)(this,A))&&e>0&&this.hot.scrollViewportTo({col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(e-1,-1)});const t=this.hot.view._wt.wtTable,o=this.hot.view._wt.wtOverlays.scrollableElement,s="number"==typeof o.scrollX?o.scrollX:o.scrollLeft;let i=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,(0,r.default)(this,A)-1);const n=t.hider.offsetWidth,a=t.TBODY.offsetLeft,l=(0,r.default)(this,b).getOffset().start,u=(0,r.default)(this,b).getSize().width;let d=0,c=0;if(this.hot.isRtl()){const e=this.hot.rootWindow,t=(0,h.outerWidth)(this.hot.rootElement),i=e.innerWidth-(0,r.default)(this,P)-t;c=e.innerWidth-(0,r.default)(this,I).eventPageX-i-(void 0===o.scrollX?s:0)}else c=(0,r.default)(this,I).eventPageX-((0,r.default)(this,P)-(void 0===o.scrollX?s:0));if((0,r.default)(this,x)&&(d=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsStart((0,r.default)(this,A))&&(i+=s),i+=d,(0,r.default)(this,A)<0)(0,r.default)(this,H)>0?(0,r.default)(this,I).col=0:(0,r.default)(this,I).col=e>0?e-1:e;else if((0,r.default)(this,I).TD.offsetWidth/2+i<=c){const e=(0,r.default)(this,A)>=(0,r.default)(this,O)?(0,r.default)(this,O)-1:(0,r.default)(this,A);(0,r.default)(this,I).col=e+1,i+=(0,r.default)(this,I).TD.offsetWidth}else(0,r.default)(this,I).col=(0,r.default)(this,A);let g=c,f=i;c+u+l>=n?g=n-u-l:c+l<a+d&&(g=a+d+Math.abs(l)),i>=n-1?f=n-1:0===f?f=1:void 0!==o.scrollX&&(0,r.default)(this,A)<(0,r.default)(this,H)&&(f-=(0,r.default)(this,P)<=o.scrollX?(0,r.default)(this,P):0),(0,r.default)(this,b).setPosition(null,g),(0,r.default)(this,_).setPosition(null,f)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>w(this,D,Y).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>w(this,W,G).call(this)))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){(0,r.default)(this,b).build(),(0,r.default)(this,_).build()}destroy(){(0,r.default)(this,b).destroy(),(0,r.default)(this,_).destroy(),super.destroy()}}function U(e,t,o,s){const n=this.hot.view._wt.wtTable,a=this.hot.selection.isSelectedByColumnHeader(),l=this.hot.getSelectedRangeLast(),d=(0,h.hasClass)(e.target,"sortAction");if(!l||!a||(0,r.default)(this,M)||0!==e.button||d)return(0,i.default)(this,M,!1),(0,r.default)(this,T).length=0,void(0,h.removeClass)(this.hot.rootElement,[S,E]);const c=(0,r.default)(this,_).isBuilt()&&!(0,r.default)(this,_).isAppended(),g=(0,r.default)(this,b).isBuilt()&&!(0,r.default)(this,b).isAppended();c&&g&&((0,r.default)(this,_).appendTo(n.hider),(0,r.default)(this,b).appendTo(n.hider));const{from:f,to:p}=l,m=Math.min(f.col,p.col),w=Math.max(f.col,p.col);if(t.row<0&&t.col>=m&&t.col<=w){s.column=!0,(0,i.default)(this,M,!0);const a=o.firstChild?(0,u.offsetRelativeTo)(e,o.firstChild).x:e.offsetX;(0,r.default)(this,I).eventPageX=e.pageX,(0,i.default)(this,A,t.col),(0,r.default)(this,I).TD=o,(0,r.default)(this,I).col=t.col,(0,i.default)(this,T,this.prepareColumnsToMoving(m,w)),(0,i.default)(this,x,!!this.hot.getSettings().rowHeaders),(0,i.default)(this,O,this.hot.countCols()),(0,i.default)(this,H,this.hot.getSettings().fixedColumnsStart),(0,i.default)(this,P,(0,h.offset)(this.hot.rootElement).left);const l=(0,r.default)(this,x)?-1:0,d=n.holder.scrollTop+n.getColumnHeaderHeight(0)+1,c=t.col<(0,r.default)(this,H),g=this.hot.view._wt.wtOverlays.inlineStartOverlay.getOverlayOffset(),f=Math.abs(a-(this.hot.isRtl()?o.offsetWidth:0)),p=this.getColumnsWidth(m,t.col-1)+f,C=this.getColumnsWidth(l,m-1)+(c?g:0)+p;(0,r.default)(this,b).setPosition(d,C),(0,r.default)(this,b).setSize(this.getColumnsWidth(m,w),n.hider.offsetHeight-d),(0,r.default)(this,b).setOffset(null,-p),(0,h.addClass)(this.hot.rootElement,S)}else(0,h.removeClass)(this.hot.rootElement,R),(0,i.default)(this,M,!1),(0,r.default)(this,T).length=0}function Y(e){(0,r.default)(this,M)&&((0,r.default)(this,I).eventPageX=e.pageX,this.refreshPositions())}function j(e,t,o,s){this.hot.getSelectedRangeLast()&&(0,r.default)(this,M)&&((0,r.default)(this,T).indexOf(t.col)>-1?(0,h.removeClass)(this.hot.rootElement,E):(0,h.addClass)(this.hot.rootElement,E),s.row=!0,s.column=!0,s.cell=!0,(0,i.default)(this,A,t.col),(0,r.default)(this,I).TD=o)}function G(){const e=(0,r.default)(this,I).col,t=(0,r.default)(this,T).length;if((0,i.default)(this,A,void 0),(0,i.default)(this,M,!1),(0,h.removeClass)(this.hot.rootElement,[S,E,R]),this.hot.selection.isSelectedByColumnHeader()&&(0,h.addClass)(this.hot.rootElement,R),t<1||void 0===e)return;const o=(0,r.default)(this,T)[0],s=this.hot.toPhysicalColumn(o),n=this.dragColumns((0,r.default)(this,T),e);if((0,r.default)(this,T).length=0,!0===n){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize(!0);const e=this.hot.toVisualColumn(s),o=e+t-1;this.hot.selectColumns(e,o)}}function z(){const e=this.hot.view._wt.wtTable,t=e.getColumnHeaderHeight(0)+1+e.holder.scrollTop;(0,r.default)(this,b).setPosition(t),(0,r.default)(this,b).setSize(null,e.hider.offsetHeight-t)}function K(){this.moveBySettingsOrLoad()}t.ManualColumnMove=B},50715:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(68145),n=o(18609);const a="px";t.default=class{constructor(e){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"_element",null),(0,i.default)(this,"state",0),(0,i.default)(this,"inlineProperty",void 0),this.hot=e,this.inlineProperty=e.isRtl()?"right":"left"}appendTo(e){e.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(e,t){(0,r.isNumeric)(e)&&(this._element.style.top=e+a),(0,r.isNumeric)(t)&&(this._element.style[this.inlineProperty]=t+a)}getPosition(){const e=this._element.style;return{top:e.top?parseInt(e.top,10):0,start:e[this.inlineProperty]?parseInt(e[this.inlineProperty],10):0}}setSize(e,t){(0,r.isNumeric)(e)&&(this._element.style.width=e+a),(0,r.isNumeric)(t)&&(this._element.style.height=t+a)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){(0,r.isNumeric)(e)&&(this._element.style.marginTop=e+a),(0,r.isNumeric)(t)&&(this._element.style[`margin${(0,n.toUpperCaseFirst)(this.inlineProperty)}`]=t+a)}getOffset(){const e=this._element.style,t=`margin${(0,n.toUpperCaseFirst)(this.inlineProperty)}`;return{top:e.marginTop?parseInt(e.marginTop,10):0,start:e[t]?parseInt(e[t],10):0}}}},53277:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(50715)),r=o(83302);class n extends i.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualColumnMove--backlight")}}t.default=n},4588:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(50715)),r=o(83302);class n extends i.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualColumnMove--guideline")}}t.default=n},35350:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(35426);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnResize=s.ManualColumnResize},35426:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(48427)),r=s(o(42538)),n=o(36026),a=o(83302),l=o(50095),h=o(68145),u=o(33165);function d(e,t){g(e,t),t.add(e)}function c(e,t,o){g(e,t),t.set(e,o)}function g(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function f(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const p=t.PLUGIN_KEY="manualColumnResize",m=t.PLUGIN_PRIORITY=130,w="manualColumnWidths";var C=new WeakMap,v=new WeakMap,y=new WeakMap,E=new WeakMap,S=new WeakMap,R=new WeakMap,b=new WeakMap,_=new WeakMap,T=new WeakMap,O=new WeakMap,M=new WeakMap,I=new WeakMap,N=new WeakMap,A=new WeakMap,P=new WeakMap,x=new WeakMap,H=new WeakSet,k=new WeakSet,D=new WeakSet,L=new WeakSet,W=new WeakSet,F=new WeakSet,V=new WeakSet,B=new WeakSet,U=new WeakSet;class Y extends n.BasePlugin{static get PLUGIN_KEY(){return p}static get PLUGIN_PRIORITY(){return m}constructor(e){super(e),d(this,U),d(this,B),d(this,V),d(this,F),d(this,W),d(this,L),d(this,D),d(this,k),d(this,H),c(this,C,{writable:!0,value:null}),c(this,v,{writable:!0,value:null}),c(this,y,{writable:!0,value:[]}),c(this,E,{writable:!0,value:null}),c(this,S,{writable:!0,value:null}),c(this,R,{writable:!0,value:null}),c(this,b,{writable:!0,value:null}),c(this,_,{writable:!0,value:null}),c(this,T,{writable:!0,value:this.hot.rootDocument.createElement("DIV")}),c(this,O,{writable:!0,value:this.hot.rootDocument.createElement("DIV")}),c(this,M,{writable:!0,value:null}),c(this,I,{writable:!0,value:!1}),c(this,N,{writable:!0,value:0}),c(this,A,{writable:!0,value:null}),c(this,P,{writable:!0,value:void 0}),c(this,x,{writable:!0,value:void 0}),(0,a.addClass)((0,r.default)(this,T),"manualColumnResizer"),(0,a.addClass)((0,r.default)(this,O),"manualColumnResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[p]}enablePlugin(){this.enabled||((0,i.default)(this,P,new u.PhysicalIndexToValueMap),(0,r.default)(this,P).addLocalHook("init",(()=>f(this,H,j).call(this))),this.hot.columnIndexMapper.registerMap(this.pluginName,(0,r.default)(this,P)),this.addHook("modifyColWidth",((e,t)=>f(this,V,q).call(this,e,t))),this.addHook("beforeStretchingColumnWidth",((e,t)=>f(this,B,Q).call(this,e,t))),this.addHook("beforeColumnResize",((e,t,o)=>f(this,U,J).call(this,e,t,o))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){(0,i.default)(this,x,(0,r.default)(this,P).getValues()),this.hot.columnIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualColumnWidths(){this.hot.runHooks("persistentStateSave",w,(0,r.default)(this,P).getValues())}loadManualColumnWidths(){const e={};return this.hot.runHooks("persistentStateLoad",w,e),e.value}setManualSize(e,t){const o=Math.max(t,20),s=this.hot.toPhysicalColumn(e);return(0,r.default)(this,P).setValueAtIndex(s,o),o}clearManualSize(e){const t=this.hot.toPhysicalColumn(e);(0,r.default)(this,P).setValueAtIndex(t,null)}setupHandlePosition(e){if(!e.parentNode)return;(0,i.default)(this,C,e);const{_wt:t}=this.hot.view,o=t.wtTable.getCoords((0,r.default)(this,C)),s=o.col;if(s<0)return;const n=(0,a.outerHeight)((0,r.default)(this,C)),u=(0,r.default)(this,C).getBoundingClientRect();let d;s<t.getSetting("fixedColumnsStart")&&(d=t.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition((0,r.default)(this,C),o.row,o.col)),d||(d=t.wtOverlays.topOverlay.getRelativeCellPosition((0,r.default)(this,C),o.row,o.col)),(0,i.default)(this,v,this.hot.columnIndexMapper.getVisualFromRenderableIndex(s)),(0,i.default)(this,y,[]);const c=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByColumnHeader();if(this.hot.selection.isSelected()&&c){const e=this.hot.getSelectedRange();(0,l.arrayEach)(e,(e=>{const t=e.getTopStartCorner().col,o=e.getBottomEndCorner().col;(0,h.rangeEach)(t,o,(e=>{(0,r.default)(this,y).includes(e)||(0,r.default)(this,y).push(e)}))}))}(0,r.default)(this,y).includes((0,r.default)(this,v))||(0,i.default)(this,y,[(0,r.default)(this,v)]),(0,i.default)(this,_,d.start-6),(0,i.default)(this,b,parseInt(u.width,10)),(0,r.default)(this,T).style.top=`${d.top}px`,(0,r.default)(this,T).style[this.inlineDir]=`${(0,r.default)(this,_)+(0,r.default)(this,b)}px`,(0,r.default)(this,T).style.height=`${n}px`,this.hot.rootElement.appendChild((0,r.default)(this,T))}refreshHandlePosition(){(0,r.default)(this,T).style[this.inlineDir]=`${(0,r.default)(this,_)+(0,r.default)(this,E)}px`}setupGuidePosition(){const e=parseInt((0,a.outerHeight)((0,r.default)(this,T)),10),t=parseInt((0,r.default)(this,T).style.top,10)+e,o=parseInt(this.hot.view.maximumVisibleElementHeight(0),10);(0,a.addClass)((0,r.default)(this,T),"active"),(0,a.addClass)((0,r.default)(this,O),"active"),(0,r.default)(this,O).style.top=`${t}px`,this.refreshGuidePosition(),(0,r.default)(this,O).style.height=o-e+"px",this.hot.rootElement.appendChild((0,r.default)(this,O))}refreshGuidePosition(){(0,r.default)(this,O).style[this.inlineDir]=(0,r.default)(this,T).style[this.inlineDir]}hideHandleAndGuide(){(0,a.removeClass)((0,r.default)(this,T),"active"),(0,a.removeClass)((0,r.default)(this,O),"active")}checkIfColumnHeader(e){return!!(0,a.closest)(e,["THEAD"],this.hot.rootElement)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{const s=this.hot.runHooks("beforeColumnResize",(0,r.default)(this,S),t,!0);void 0!==s&&(0,i.default)(this,S,s),"all"===this.hot.getSettings().stretchH?this.clearManualSize(t):this.setManualSize(t,(0,r.default)(this,S)),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",(0,r.default)(this,S),t,!0),o&&e()};if((0,r.default)(this,N)>=2){(0,r.default)(this,y).length>1?((0,l.arrayEach)((0,r.default)(this,y),(e=>{t(e)})),e()):(0,l.arrayEach)((0,r.default)(this,y),(e=>{t(e,!0)}))}(0,i.default)(this,N,0),(0,i.default)(this,A,null)}bindEvents(){const{rootWindow:e,rootElement:t}=this.hot;this.eventManager.addEventListener(t,"mouseover",(e=>f(this,k,G).call(this,e))),this.eventManager.addEventListener(t,"mousedown",(e=>f(this,D,z).call(this,e))),this.eventManager.addEventListener(e,"mousemove",(e=>f(this,L,K).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>f(this,W,$).call(this))),this.eventManager.addEventListener((0,r.default)(this,T),"contextmenu",(()=>f(this,F,X).call(this)))}destroy(){super.destroy()}}function j(){const e=this.hot.getSettings()[p],t=this.loadManualColumnWidths();void 0!==t?this.hot.batchExecution((()=>{t.forEach(((e,t)=>{(0,r.default)(this,P).setValueAtIndex(t,e)}))}),!0):Array.isArray(e)?(this.hot.batchExecution((()=>{e.forEach(((e,t)=>{(0,r.default)(this,P).setValueAtIndex(t,e)}))}),!0),(0,i.default)(this,x,e)):!0===e&&Array.isArray((0,r.default)(this,x))&&this.hot.batchExecution((()=>{(0,r.default)(this,x).forEach(((e,t)=>{(0,r.default)(this,P).setValueAtIndex(t,e)}))}),!0)}function G(e){if(!(0,a.isDetached)(e.target)&&!0!==(0,r.default)(this,I)&&this.checkIfColumnHeader(e.target)){const t=this.getClosestTHParent(e.target);if(!t)return;const o=t.getAttribute("colspan");!t||null!==o&&"1"!==o||(0,r.default)(this,M)||this.setupHandlePosition(t)}}function z(e){(0,a.hasClass)(e.target,"manualColumnResizer")&&(this.setupHandlePosition((0,r.default)(this,C)),this.setupGuidePosition(),(0,i.default)(this,M,!0),null===(0,r.default)(this,A)&&((0,i.default)(this,A,setTimeout((()=>this.afterMouseDownTimeout()),500)),this.hot._registerTimeout((0,r.default)(this,A))),(0,i.default)(this,N,(0,r.default)(this,N)+1),this.startX=e.pageX,(0,i.default)(this,S,(0,r.default)(this,b)))}function K(e){if((0,r.default)(this,M)){const t=(e.pageX-this.startX)*this.hot.getDirectionFactor();(0,i.default)(this,E,(0,r.default)(this,b)+t),(0,l.arrayEach)((0,r.default)(this,y),(e=>{(0,i.default)(this,S,this.setManualSize(e,(0,r.default)(this,E)))})),this.refreshHandlePosition(),this.refreshGuidePosition()}}function $(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{this.hot.runHooks("beforeColumnResize",(0,r.default)(this,S),t,!1),o&&e(),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",(0,r.default)(this,S),t,!1)};if((0,r.default)(this,M)){if(this.hideHandleAndGuide(),(0,i.default)(this,M,!1),(0,r.default)(this,S)!==(0,r.default)(this,b)){(0,r.default)(this,y).length>1?((0,l.arrayEach)((0,r.default)(this,y),(e=>{t(e)})),e()):(0,l.arrayEach)((0,r.default)(this,y),(e=>{t(e,!0)}))}this.setupHandlePosition((0,r.default)(this,C))}}function X(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild((0,r.default)(this,T)),this.hot.rootElement.removeChild((0,r.default)(this,O)),(0,i.default)(this,M,!1),(0,i.default)(this,I,!0),this.hot._registerImmediate((()=>{(0,i.default)(this,I,!1)}))}function q(e,t){let o=e;if(this.enabled){const e=this.hot.toPhysicalColumn(t),s=(0,r.default)(this,P).getValueAtIndex(e);this.hot.getSettings()[p]&&s&&(o=s)}return o}function Q(e,t){let o=(0,r.default)(this,P).getValueAtIndex(t);return null===o&&(o=e),o}function J(){this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}t.ManualColumnResize=Y},60734:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(52030);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualRowMove=s.ManualRowMove},52030:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(48427)),r=s(o(42538)),n=o(36026),a=s(o(56307)),l=o(50095),h=o(83302),u=o(68145),d=s(o(81005)),c=s(o(67648));function g(e,t){p(e,t),t.add(e)}function f(e,t,o){p(e,t),t.set(e,o)}function p(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function m(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(83988),a.default.getSingleton().register("beforeRowMove"),a.default.getSingleton().register("afterRowMove");const w=t.PLUGIN_KEY="manualRowMove",C=t.PLUGIN_PRIORITY=140,v="ht__manualRowMove",y="show-ui",E="on-moving--rows",S="after-selection--rows";var R=new WeakMap,b=new WeakMap,_=new WeakMap,T=new WeakMap,O=new WeakMap,M=new WeakMap,I=new WeakSet,N=new WeakSet,A=new WeakSet,P=new WeakSet,x=new WeakSet,H=new WeakSet;class k extends n.BasePlugin{constructor(){super(...arguments),g(this,H),g(this,x),g(this,P),g(this,A),g(this,N),g(this,I),f(this,R,{writable:!0,value:new d.default(this.hot)}),f(this,b,{writable:!0,value:new c.default(this.hot)}),f(this,_,{writable:!0,value:[]}),f(this,T,{writable:!0,value:void 0}),f(this,O,{writable:!0,value:{}}),f(this,M,{writable:!0,value:void 0})}static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return C}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return m(e,I,D).call(e,...o)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return m(e,A,W).call(e,...o)})),this.addHook("afterScrollHorizontally",(()=>m(this,x,V).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return m(e,H,B).call(e,...o)})),this.buildPluginUI(),this.registerEvents(),(0,h.addClass)(this.hot.rootElement,v),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,h.removeClass)(this.hot.rootElement,v),this.unregisterEvents(),(0,r.default)(this,R).destroy(),(0,r.default)(this,b).destroy(),super.disablePlugin()}moveRow(e,t){return this.moveRows([e],t)}moveRows(e,t){const o=(0,r.default)(this,M),s=this.isMovePossible(e,t),n=this.hot.runHooks("beforeRowMove",e,t,o,s);if((0,i.default)(this,M,void 0),!1===n)return;s&&this.hot.rowIndexMapper.moveIndexes(e,t);const a=s&&this.isRowOrderChanged(e,t);return this.hot.runHooks("afterRowMove",e,t,o,s,a),a}dragRow(e,t){return this.dragRows([e],t)}dragRows(e,t){const o=this.countFinalIndex(e,t);return(0,i.default)(this,M,t),this.moveRows(e,o)}isMovePossible(e,t){const o=this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),s=e.length+t>o,i=t<0,r=e.some((e=>e<0)),n=e.some((e=>e>=o));return!(s||i||r||n)}isRowOrderChanged(e,t){return e.some(((e,o)=>e-o!==t))}countFinalIndex(e,t){const o=(0,l.arrayReduce)(e,((e,o)=>(o<t&&(e+=1),e)),0);return t-o}getRowsHeight(e,t){const o=this.hot.rowIndexMapper;let s=0;for(let i=e;i<=t;i++){const e=o.getRenderableFromVisualIndex(i);null!==e&&(s+=this.hot.view._wt.wtTable.getRowHeight(e)||23)}return s}moveBySettingsOrLoad(){const e=this.hot.getSettings()[w];if(Array.isArray(e))this.moveRows(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveRows(e,0)}}isFixedRowTop(e){return e<this.hot.getSettings().fixedRowsTop}isFixedRowBottom(e){return e>this.hot.countRows()-1-this.hot.getSettings().fixedRowsBottom}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualRowMove",this.hot.rowIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualRowMove",e),e.value?e.value:[]}prepareRowsToMoving(){const e=this.hot.getSelectedRangeLast(),t=[];if(!e)return t;const{from:o,to:s}=e,i=Math.min(o.row,s.row),r=Math.max(o.row,s.row);return(0,u.rangeEach)(i,r,(e=>{t.push(e)})),t}refreshPositions(){const e=(0,r.default)(this,O).coords,t=this.hot.view.getFirstFullyVisibleRow(),o=this.hot.view.getLastFullyVisibleRow(),s=this.hot.countRows();this.isFixedRowTop(e.row)&&t>0&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(t-1,-1)),this.isFixedRowBottom(e.row)&&o<s&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(o+1,1),void 0,!0);const i=this.hot.view._wt.wtTable,n=(0,r.default)(this,O).TD,a=this.hot.rootElement,l=(0,h.offset)(a),u=(0,h.getTrimmingContainer)(a),d=i.holder.scrollTop,c=this.hot.rootWindow!==u?u.scrollTop:0,g=l.top-c,f=(0,r.default)(this,O).eventPageY-g+d,p=i.hider.offsetHeight,m=i.TBODY.offsetTop,w=(0,r.default)(this,R).getOffset().top,C=(0,r.default)(this,R).getSize().height,v=n.offsetHeight/2,y=n.offsetHeight;let E=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,e.row-1);const S=f>=E+v;this.isFixedRowTop(e.row)&&(E+=this.hot.view._wt.wtOverlays.topOverlay.getOverlayOffset()),e.row<0?(0,r.default)(this,O).row=t>0?t-1:t:S?((0,r.default)(this,O).row=e.row+1,E+=0===e.row?y-1:y):(0,r.default)(this,O).row=e.row;let _=f,T=E;f+C+w>=p?_=p-C-w:f+w<m&&(_=m+Math.abs(w)),E>=p-1&&(T=p-1),(0,r.default)(this,R).setPosition(_),(0,r.default)(this,b).setPosition(T)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>m(this,N,L).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>m(this,P,F).call(this)))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){(0,r.default)(this,R).build(),(0,r.default)(this,b).build()}destroy(){(0,r.default)(this,R).destroy(),(0,r.default)(this,b).destroy(),super.destroy()}}function D(e,t,o,s){const{wtTable:n,wtViewport:a}=this.hot.view._wt,l=this.hot.selection.isSelectedByRowHeader(),u=this.hot.getSelectedRangeLast();if(!u||!l||(0,r.default)(this,T)||0!==e.button)return(0,i.default)(this,T,!1),(0,r.default)(this,_).length=0,void(0,h.removeClass)(this.hot.rootElement,[E,y]);const d=(0,r.default)(this,b).isBuilt()&&!(0,r.default)(this,b).isAppended(),c=(0,r.default)(this,R).isBuilt()&&!(0,r.default)(this,R).isAppended();d&&c&&((0,r.default)(this,b).appendTo(n.hider),(0,r.default)(this,R).appendTo(n.hider));const{from:g,to:f}=u,p=Math.min(g.row,f.row),m=Math.max(g.row,f.row);if(t.col<0&&t.row>=p&&t.row<=m){s.row=!0,(0,i.default)(this,T,!0),(0,r.default)(this,O).eventPageY=e.pageY,(0,r.default)(this,O).coords=t,(0,r.default)(this,O).TD=o,(0,i.default)(this,_,this.prepareRowsToMoving());const l=n.holder.scrollLeft+a.getRowHeaderWidth(),u=this.getRowsHeight(p,t.row-1)+e.offsetY;(0,r.default)(this,R).setPosition(null,l),(0,r.default)(this,R).setSize(n.hider.offsetWidth-l,this.getRowsHeight(p,m)),(0,r.default)(this,R).setOffset(-u,null),(0,h.addClass)(this.hot.rootElement,E),this.refreshPositions()}else(0,h.removeClass)(this.hot.rootElement,S),(0,i.default)(this,T,!1),(0,r.default)(this,_).length=0}function L(e){(0,r.default)(this,T)&&((0,r.default)(this,O).eventPageY=e.pageY,this.refreshPositions())}function W(e,t,o,s){this.hot.getSelectedRangeLast()&&(0,r.default)(this,T)&&((0,r.default)(this,_).indexOf(t.row)>-1?(0,h.removeClass)(this.hot.rootElement,y):(0,h.addClass)(this.hot.rootElement,y),s.row=!0,s.column=!0,s.cell=!0,(0,r.default)(this,O).coords=t,(0,r.default)(this,O).TD=o)}function F(){const e=(0,r.default)(this,O).row,t=(0,r.default)(this,_).length;if((0,i.default)(this,T,!1),(0,h.removeClass)(this.hot.rootElement,[E,y,S]),this.hot.selection.isSelectedByRowHeader()&&(0,h.addClass)(this.hot.rootElement,S),t<1||void 0===e)return;const o=(0,r.default)(this,_)[0],s=this.hot.toPhysicalRow(o),n=this.dragRows((0,r.default)(this,_),e);if((0,r.default)(this,_).length=0,!0===n){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize(!0);const e=this.hot.toVisualRow(s),o=e+t-1;this.hot.selectRows(e,o)}}function V(){const e=this.hot.view._wt.wtTable,t=this.hot.view._wt.wtViewport.getRowHeaderWidth()+e.holder.scrollLeft;(0,r.default)(this,R).setPosition(null,t),(0,r.default)(this,R).setSize(e.hider.offsetWidth-t)}function B(){this.moveBySettingsOrLoad()}t.ManualRowMove=k},32715:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231));const r="px";t.default=class{constructor(e){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"_element",null),(0,i.default)(this,"state",0),this.hot=e}appendTo(e){e.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(e,t){void 0!==e&&(this._element.style.top=e+r),void 0!==t&&(this._element.style.left=t+r)}getPosition(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}}setSize(e,t){e&&(this._element.style.width=e+r),t&&(this._element.style.height=t+r)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){e&&(this._element.style.marginTop=e+r),t&&(this._element.style.marginLeft=t+r)}getOffset(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}}},81005:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(32715)),r=o(83302);class n extends i.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualRowMove--backlight")}}t.default=n},67648:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(32715)),r=o(83302);class n extends i.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualRowMove--guideline")}}t.default=n},15702:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(13524);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualRowResize=s.ManualRowResize},13524:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(48427)),r=s(o(42538)),n=o(36026),a=o(83302),l=o(50095),h=o(68145),u=o(33165),d=o(21280);function c(e,t){f(e,t),t.add(e)}function g(e,t,o){f(e,t),t.set(e,o)}function f(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function p(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const m=t.PLUGIN_KEY="manualRowResize",w=t.PLUGIN_PRIORITY=30,C="manualRowHeights";var v=new WeakMap,y=new WeakMap,E=new WeakMap,S=new WeakMap,R=new WeakMap,b=new WeakMap,_=new WeakMap,T=new WeakMap,O=new WeakMap,M=new WeakMap,I=new WeakMap,N=new WeakMap,A=new WeakMap,P=new WeakMap,x=new WeakMap,H=new WeakMap,k=new WeakSet,D=new WeakSet,L=new WeakSet,W=new WeakSet,F=new WeakSet,V=new WeakSet,B=new WeakSet;class U extends n.BasePlugin{static get PLUGIN_KEY(){return m}static get PLUGIN_PRIORITY(){return w}constructor(e){super(e),c(this,B),c(this,V),c(this,F),c(this,W),c(this,L),c(this,D),c(this,k),g(this,v,{writable:!0,value:null}),g(this,y,{writable:!0,value:null}),g(this,E,{writable:!0,value:[]}),g(this,S,{writable:!0,value:null}),g(this,R,{writable:!0,value:null}),g(this,b,{writable:!0,value:null}),g(this,_,{writable:!0,value:null}),g(this,T,{writable:!0,value:null}),g(this,O,{writable:!0,value:this.hot.rootDocument.createElement("DIV")}),g(this,M,{writable:!0,value:this.hot.rootDocument.createElement("DIV")}),g(this,I,{writable:!0,value:!1}),g(this,N,{writable:!0,value:!1}),g(this,A,{writable:!0,value:0}),g(this,P,{writable:!0,value:null}),g(this,x,{writable:!0,value:void 0}),g(this,H,{writable:!0,value:void 0}),(0,a.addClass)((0,r.default)(this,O),"manualRowResizer"),(0,a.addClass)((0,r.default)(this,M),"manualRowResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[m]}enablePlugin(){this.enabled||((0,i.default)(this,x,new u.PhysicalIndexToValueMap),(0,r.default)(this,x).addLocalHook("init",(()=>p(this,B,X).call(this))),this.hot.rowIndexMapper.registerMap(this.pluginName,(0,r.default)(this,x)),this.addHook("modifyRowHeight",((e,t)=>p(this,V,$).call(this,e,t))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){(0,i.default)(this,H,(0,r.default)(this,x).getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualRowHeights(){this.hot.runHooks("persistentStateSave",C,(0,r.default)(this,x).getValues())}loadManualRowHeights(){const e={};return this.hot.runHooks("persistentStateLoad",C,e),e.value}setManualSize(e,t){const o=this.hot.toPhysicalRow(e),s=Math.max(t,d.ViewportRowsCalculator.DEFAULT_HEIGHT);return(0,r.default)(this,x).setValueAtIndex(o,s),s}setupHandlePosition(e){(0,i.default)(this,v,e);const{view:t}=this.hot,{_wt:o}=t,s=o.wtTable.getCoords((0,r.default)(this,v)),n=s.row;if(n<0)return;const u=(0,a.outerWidth)((0,r.default)(this,v)),d=(0,r.default)(this,v).getBoundingClientRect(),c=n<o.getSetting("fixedRowsTop"),g=n>=t.countNotHiddenRowIndexes(0,1)-o.getSetting("fixedRowsBottom");let f;c?f=o.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition((0,r.default)(this,v),s.row,s.col):g&&(f=o.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition((0,r.default)(this,v),s.row,s.col)),f||(f=o.wtOverlays.inlineStartOverlay.getRelativeCellPosition((0,r.default)(this,v),s.row,s.col)),(0,i.default)(this,y,this.hot.rowIndexMapper.getVisualFromRenderableIndex(n)),(0,i.default)(this,E,[]);const p=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();if(this.hot.selection.isSelected()&&p){const e=this.hot.getSelectedRange();(0,l.arrayEach)(e,(e=>{const t=e.getTopStartCorner().row,o=e.getBottomStartCorner().row;(0,h.rangeEach)(t,o,(e=>{(0,r.default)(this,E).includes(e)||(0,r.default)(this,E).push(e)}))}))}(0,r.default)(this,E).includes((0,r.default)(this,y))||(0,i.default)(this,E,[(0,r.default)(this,y)]),(0,i.default)(this,T,f.top-6),(0,i.default)(this,_,parseInt(d.height,10)),(0,r.default)(this,O).style.top=`${(0,r.default)(this,T)+(0,r.default)(this,_)}px`,(0,r.default)(this,O).style[this.inlineDir]=`${f.start}px`,(0,r.default)(this,O).style.width=`${u}px`,this.hot.rootElement.appendChild((0,r.default)(this,O))}refreshHandlePosition(){(0,r.default)(this,O).style.top=`${(0,r.default)(this,T)+(0,r.default)(this,S)}px`}setupGuidePosition(){const e=parseInt((0,a.outerWidth)((0,r.default)(this,O)),10),t=parseInt((0,r.default)(this,O).style[this.inlineDir],10)+e,o=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);(0,a.addClass)((0,r.default)(this,O),"active"),(0,a.addClass)((0,r.default)(this,M),"active"),(0,r.default)(this,M).style.top=(0,r.default)(this,O).style.top,(0,r.default)(this,M).style[this.inlineDir]=`${t}px`,(0,r.default)(this,M).style.width=o-e+"px",this.hot.rootElement.appendChild((0,r.default)(this,M))}refreshGuidePosition(){(0,r.default)(this,M).style.top=(0,r.default)(this,O).style.top}hideHandleAndGuide(){(0,a.removeClass)((0,r.default)(this,O),"active"),(0,a.removeClass)((0,r.default)(this,M),"active")}checkIfRowHeader(e){var t;return(0,a.closest)(e,["TH"],this.hot.rootElement)&&"TBODY"===(null===(t=e.parentNode)||void 0===t||null===(t=t.parentNode)||void 0===t?void 0:t.tagName)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}getActualRowHeight(e){const t=this.hot.view._wt.wtTable.getRowHeight(e);return void 0!==t&&(0,r.default)(this,R)<t?t:(0,r.default)(this,R)}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{const s=this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!0);void 0!==s&&(0,i.default)(this,R,s),this.setManualSize(t,(0,r.default)(this,R)),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!0),o&&e()};if((0,r.default)(this,A)>=2){(0,r.default)(this,E).length>1?((0,l.arrayEach)((0,r.default)(this,E),(e=>{t(e)})),e()):(0,l.arrayEach)((0,r.default)(this,E),(e=>{t(e,!0)}))}(0,i.default)(this,A,0),(0,i.default)(this,P,null)}bindEvents(){const{rootElement:e,rootWindow:t}=this.hot;this.eventManager.addEventListener(e,"mouseover",(e=>p(this,k,Y).call(this,e))),this.eventManager.addEventListener(e,"mousedown",(e=>p(this,D,j).call(this,e))),this.eventManager.addEventListener(t,"mousemove",(e=>p(this,L,G).call(this,e))),this.eventManager.addEventListener(t,"mouseup",(()=>p(this,W,z).call(this))),this.eventManager.addEventListener((0,r.default)(this,O),"contextmenu",(()=>p(this,F,K).call(this)))}destroy(){super.destroy()}}function Y(e){if(!(0,a.isDetached)(e.target)&&!0!==(0,r.default)(this,N)&&this.checkIfRowHeader(e.target)){const t=this.getClosestTHParent(e.target);t&&((0,r.default)(this,I)||this.setupHandlePosition(t))}}function j(e){(0,a.hasClass)(e.target,"manualRowResizer")&&(this.setupHandlePosition((0,r.default)(this,v)),this.setupGuidePosition(),(0,i.default)(this,I,!0),null===(0,r.default)(this,P)&&((0,i.default)(this,P,setTimeout((()=>this.afterMouseDownTimeout()),500)),this.hot._registerTimeout((0,r.default)(this,P))),(0,i.default)(this,A,(0,r.default)(this,A)+1),(0,i.default)(this,b,e.pageY),(0,i.default)(this,R,(0,r.default)(this,_)))}function G(e){(0,r.default)(this,I)&&((0,i.default)(this,S,(0,r.default)(this,_)+(e.pageY-(0,r.default)(this,b))),(0,l.arrayEach)((0,r.default)(this,E),(e=>{(0,i.default)(this,R,this.setManualSize(e,(0,r.default)(this,S)))})),this.refreshHandlePosition(),this.refreshGuidePosition())}function z(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!1),o&&e(),this.saveManualRowHeights(),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!1)};if((0,r.default)(this,I)){if(this.hideHandleAndGuide(),(0,i.default)(this,I,!1),(0,r.default)(this,R)!==(0,r.default)(this,_)){(0,r.default)(this,E).length>1?((0,l.arrayEach)((0,r.default)(this,E),(e=>{t(e)})),e()):(0,l.arrayEach)((0,r.default)(this,E),(e=>{t(e,!0)}))}this.setupHandlePosition((0,r.default)(this,v))}}function K(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild((0,r.default)(this,O)),this.hot.rootElement.removeChild((0,r.default)(this,M)),(0,i.default)(this,I,!1),(0,i.default)(this,N,!0),this.hot._registerImmediate((()=>{(0,i.default)(this,N,!1)}))}function $(e,t){let o=e;if(this.enabled){const e=this.hot.toPhysicalRow(t),s=(0,r.default)(this,x).getValueAtIndex(e);this.hot.getSettings()[m]&&s&&(o=s)}return o}function X(){const e=this.hot.getSettings()[m],t=this.loadManualRowHeights();this.hot.batchExecution((()=>{void 0!==t?t.forEach(((e,t)=>{(0,r.default)(this,x).setValueAtIndex(t,e)})):Array.isArray(e)?(e.forEach(((e,t)=>{(0,r.default)(this,x).setValueAtIndex(t,e)})),(0,i.default)(this,H,e)):!0===e&&Array.isArray((0,r.default)(this,H))&&(0,r.default)(this,H).forEach(((e,t)=>{(0,r.default)(this,x).setValueAtIndex(t,e)}))}),!0)}t.ManualRowResize=U},86805:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(22232),n=o(50095);t.default=class{constructor(e){(0,i.default)(this,"plugin",void 0),(0,i.default)(this,"mergedCellsCollection",void 0),(0,i.default)(this,"currentFillData",null),this.plugin=e,this.mergedCellsCollection=this.plugin.mergedCellsCollection}correctSelectionAreaSize(e){if(e[0]===e[2]&&e[1]===e[3]){const t=this.mergedCellsCollection.get(e[0],e[1]);t&&(e[2]=e[0]+t.rowspan-1,e[3]=e[1]+t.colspan-1)}}getDirection(e,t){let o=null;return o=t[0]===e[0]&&t[1]===e[1]&&t[3]===e[3]?"down":t[2]===e[2]&&t[1]===e[1]&&t[3]===e[3]?"up":t[1]===e[1]&&t[2]===e[2]?"right":"left",o}snapDragArea(e,t,o,s){const i=t.slice(0),r=this.getAutofillSize(e,t,o),[n,a,l,h]=e,u=["up","down"].indexOf(o)>-1?l-n+1:h-a+1,d=r-Math.floor(r/u)*u,c=this.getFarthestCollection(e,t,o,s);if(c)if("down"===o){const e=c.row+c.rowspan-n-d;i[2]+e>=this.plugin.hot.countRows()?i[2]-=d:i[2]+=d?e:0}else if("right"===o){const e=c.col+c.colspan-a-d;i[3]+e>=this.plugin.hot.countCols()?i[3]-=d:i[3]+=d?e:0}else if("up"===o){const e=l-d-c.row+1;i[0]+e<0?i[0]+=d:i[0]-=d?e:0}else if("left"===o){const e=h-d-c.col+1;i[1]+e<0?i[1]+=d:i[1]-=d?e:0}return this.updateCurrentFillCache({baseArea:e,dragDirection:o,foundMergedCells:s,fillSize:r,dragArea:i,cycleLength:u}),i}updateCurrentFillCache(e){this.currentFillData||(this.currentFillData={}),(0,r.extend)(this.currentFillData,e)}getAutofillSize(e,t,o){const[s,i,r,n]=e,[a,l,h,u]=t;switch(o){case"up":return s-a;case"down":return h-r;case"left":return i-l;case"right":return u-n;default:return null}}getDragArea(e,t,o){const[s,i,r,n]=e,[a,l,h,u]=t;switch(o){case"up":return[a,l,s-1,n];case"down":return[r+1,i,h,n];case"left":return[a,l,r,i-1];case"right":return[s,n+1,h,u];default:return null}}getFarthestCollection(e,t,o,s){const[i,r,a,l]=e,h=["up","down"].indexOf(o)>-1,u=h?a:l,d=h?i:r,c=this.getAutofillSize(e,t,o),g=h?a-i+1:l-r+1,f=c-Math.floor(c/g)*g;let p=null,m=null,w=null;switch(o){case"up":p="includesVertically",w=u-f+1;break;case"left":p="includesHorizontally",w=u-f+1;break;case"down":p="includesVertically",w=d+f-1;break;case"right":p="includesHorizontally",w=d+f-1}return(0,n.arrayEach)(s,(e=>{e[p](w)&&e.isFarther(m,o)&&(m=e)})),m}recreateAfterDataPopulation(e){if(!this.currentFillData)return;const t=this.getRangeFromChanges(e),o=this.currentFillData.foundMergedCells,s=this.currentFillData.dragDirection,i=(e,o)=>{switch(s){case"up":return e.row-o>=t.from.row;case"down":return e.row+e.rowspan-1+o<=t.to.row;case"left":return e.col-o>=t.from.column;case"right":return e.col+e.colspan-1+o<=t.to.column;default:return null}};let r=0,n=null,a=1;do{for(let e=0;e<o.length;e+=1){if(n=o[e],r=a*this.currentFillData.cycleLength,i(n,r))switch(s){case"up":this.plugin.mergedCellsCollection.add({row:n.row-r,rowspan:n.rowspan,col:n.col,colspan:n.colspan});break;case"down":this.plugin.mergedCellsCollection.add({row:n.row+r,rowspan:n.rowspan,col:n.col,colspan:n.colspan});break;case"left":this.plugin.mergedCellsCollection.add({row:n.row,rowspan:n.rowspan,col:n.col-r,colspan:n.colspan});break;case"right":this.plugin.mergedCellsCollection.add({row:n.row,rowspan:n.rowspan,col:n.col+r,colspan:n.colspan})}e===o.length-1&&(a+=1)}}while(i(n,r));this.currentFillData=null,this.plugin.hot.render(),o.length>0&&this.plugin.ifChromeForceRepaint()}getRangeFromChanges(e){const t={min:null,max:null},o={min:null,max:null};return(0,n.arrayEach)(e,(e=>{const s=e[0],i=this.plugin.hot.propToCol(e[1]);(null===t.min||s<t.min)&&(t.min=s),(null===t.max||s>t.max)&&(t.max=s),(null===o.min||i<o.min)&&(o.min=i),(null===o.max||i>o.max)&&(o.max=i)})),{from:{row:t.min,column:o.min},to:{row:t.max,column:o.max}}}dragAreaOverlapsCollections(e,t,o){const s=this.getDragArea(e,t,o),[i,r,n,a]=s,l=this.plugin.hot._createCellCoords(i,r),h=this.plugin.hot._createCellCoords(n,a),u=this.plugin.hot._createCellRange(l,l,h);return!!this.mergedCellsCollection.getWithinRange(u,!0)}}},21989:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231));t.default=class{constructor(e){(0,i.default)(this,"plugin",void 0),(0,i.default)(this,"hot",void 0),(0,i.default)(this,"fullySelectedMergedCellClassName","fullySelectedMergedCell"),this.plugin=e,this.hot=e.hot}snapDelta(e,t,o){const s=t.to,i=s.row+e.row,r=s.col+e.col;e.row?this.jumpOverMergedCell(e,o,i):e.col&&this.jumpOverMergedCell(e,o,r)}jumpOverMergedCell(e,t,o){let s=e.row||e.col,i=null,r=null,n=null;e.row?(i=t.includesVertically(o),r=t.row,n=t.getLastRow()):e.col&&(i=t.includesHorizontally(o),r=t.col,n=t.getLastColumn()),0!==s&&(s>0?i&&o!==r&&(s+=n-o+1):i&&o!==n&&(s-=o-r+1),e.row?e.row=s:e.col&&(e.col=s))}getUpdatedSelectionRange(e,t){return this.hot._createCellRange(e.highlight,e.from,this.hot._createCellCoords(e.to.row+t.row,e.to.col+t.col))}getSelectedMergedCellClassName(e,t,o,s){const i=Math.min(o[0],o[2]),r=Math.min(o[1],o[3]),n=Math.max(o[0],o[2]),a=Math.max(o[1],o[3]);if(void 0===s)return;if(!this.plugin.mergedCellsCollection.isFirstRenderableMergedCell(e,t))return;const l=this.plugin.mergedCellsCollection.get(e,t);if(!l)return;const h=l.getLastRow(),u=l.getLastColumn();return i<=l.row&&r<=l.col&&n>=h&&a>=u?`${this.fullySelectedMergedCellClassName}-${s}`:this.plugin.selectionCalculations.isMergeCellFullySelected(l,this.plugin.hot.getSelectedRange())?`${this.fullySelectedMergedCellClassName}-multiple`:void 0}isMergeCellFullySelected(e,t){const o=[];if(!t||!e)return!1;for(let t=0;t<e.rowspan;t+=1)for(let s=0;s<e.colspan;s+=1)o.push(this.hot._createCellCoords(e.row+t,e.col+s));for(let e=0;e<o.length;e+=1){const s=[];for(let i=0;i<t.length;i+=1)s[i]=t[i].includes(o[e]);if(!s.includes(!0))return!1}return!0}getSelectedMergedCellClassNameToRemove(){const e=[];for(let t=0;t<=7;t+=1)e.push(`${this.fullySelectedMergedCellClassName}-${t}`);return e.push(`${this.fullySelectedMergedCellClassName}-multiple`),e}}},22951:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(28236);t.default=class{constructor(e,t,o,s,r,n){(0,i.default)(this,"row",void 0),(0,i.default)(this,"col",void 0),(0,i.default)(this,"rowspan",void 0),(0,i.default)(this,"colspan",void 0),(0,i.default)(this,"removed",!1),(0,i.default)(this,"cellCoordsFactory",void 0),(0,i.default)(this,"cellRangeFactory",void 0),this.row=e,this.col=t,this.rowspan=o,this.colspan=s,this.cellCoordsFactory=r,this.cellRangeFactory=n}static NEGATIVE_VALUES_WARNING(e){return r.toSingleLine`The merged cell declared with {row: ${e.row}, col: ${e.col},\x20
73
+ For more details see the documentation.`);else{const t=this.conditionCollection.getOperation(s);this.components.get("filter_by_condition").updateState(r[0],s),this.components.get("filter_by_condition2").updateState(r[1],s),this.components.get("filter_operators").updateState(t,s),this.components.get("filter_by_value").updateState(e)}}t.Filters=j},30905:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(59427);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Filters=s.Filters},74607:(e,t,o)=>{"use strict";t.__esModule=!0,t.getOperationFunc=function(e){if(!s[e])throw Error(`Operation with id "${e}" does not exist.`);const t=s[e].func;return function(e,o){return t(e,o)}},t.getOperationName=function(e){return s[e].name},t.registerOperation=function(e,t,o){s[e]={name:t,func:o}},o(91683);const s=t.operations={}},97413:(e,t,o)=>{"use strict";t.__esModule=!0,t.operationResult=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(74607);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const n=t.OPERATION_ID="conjunction",a=t.SHORT_NAME_FOR_COMPONENT=s.FILTERS_LABELS_CONJUNCTION;function l(e,t){return e.every((e=>e.func(t)))}(0,i.registerOperation)(n,a,l)},60171:(e,t,o)=>{"use strict";t.__esModule=!0,t.operationResult=l;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(74607);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const n=t.OPERATION_ID="disjunction",a=t.SHORT_NAME_FOR_COMPONENT=s.FILTERS_LABELS_DISJUNCTION;function l(e,t){return e.some((e=>e.func(t)))}(0,i.registerOperation)(n,a,l)},63462:(e,t,o)=>{"use strict";t.__esModule=!0,t.operationResult=l,o(91683);var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516)),i=o(74607);function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}const n=t.OPERATION_ID="disjunctionWithExtraCondition",a=t.SHORT_NAME_FOR_COMPONENT=s.FILTERS_LABELS_DISJUNCTION;function l(e,t){if(e.length<3)throw Error("Operation doesn't work on less then three conditions.");return e.slice(0,e.length-1).some((e=>e.func(t)))&&e[e.length-1].func(t)}(0,i.registerOperation)(n,a,l)},16899:(e,t,o)=>{"use strict";t.__esModule=!0,t.createMenuFocusController=function(e,t){let o=-1;const l=(0,s.createFocusNavigator)(t),h=o=>()=>{e.isOpened()&&e.getKeyboardShortcutsCtrl().listen(a),l.setCurrentPage(t.indexOf(o))};function u(s){const h=e.getKeyboardShortcutsCtrl(),u=s.getKeyboardShortcutsCtrl();l.clear(),u.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],forwardToContext:h.getContext(a),callback:()=>{s.isSubMenu()&&s.close(),h.listen(a)}}]),s.isSubMenu()||h.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:t=>{const s=e.getNavigator();s.getCurrentPage()>-1&&(o=s.getCurrentPage()),s.clear(),t.shiftKey?l.toPreviousItem():l.toNextItem()}},{keys:[["Escape"]],callback:()=>{e.close()}},{keys:[["Enter"],["Space"]],preventDefault:!1,callback:e=>{const o=t[l.getCurrentPage()];o instanceof i.SelectUI&&(o.openOptions(),e.preventDefault()),o instanceof n.LinkUI&&(o.activate(),e.preventDefault()),o instanceof r.BaseUI||e.preventDefault()}}],a)}return t.forEach((e=>{e instanceof r.BaseUI&&(e.addLocalHook("click",h(e)),e.addLocalHook("focus",h(e)),e.addLocalHook("afterClose",h(e)))})),e.addLocalHook("afterSelectionChange",(e=>{e.key.startsWith("filter_")||l.clear()})),e.addLocalHook("afterSubmenuOpen",u),e.addLocalHook("afterOpen",u),{...l,listen:function(){e.focus(),e.getKeyboardShortcutsCtrl().listen(a)},getLastMenuPage:function(){return o}}};var s=o(28199),i=o(44854),r=o(96633),n=o(40980);const a="filters"},28199:(e,t,o)=>{"use strict";t.__esModule=!0,t.createFocusNavigator=function(e){return(0,s.createPaginator)({initialPage:0,size:()=>e.length,onItemSelect:(t,o)=>{const s=e[t];return s instanceof r.MultipleSelectUI?o:!(s.element&&!(0,i.isVisible)(s.element))&&void s.focus()}})};var s=o(29583),i=o(83302),r=o(89409)},96633:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(22232),n=s(o(65718)),a=s(o(75244)),l=o(83302),h=o(50095),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=d(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516));function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(d=function(e){return e?o:t})(e)}const c="built",g="building",f=["click","input","keydown","keypress","keyup","focus","blur","change"];class p{static get DEFAULTS(){return(0,r.clone)({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}constructor(e,t){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"eventManager",new a.default(this)),(0,i.default)(this,"options",void 0),(0,i.default)(this,"_element",void 0),(0,i.default)(this,"buildState",void 0),this.hot=e,this.options=(0,r.extend)(p.DEFAULTS,t),this._element=this.hot.rootDocument.createElement(this.options.wrapIt?"div":this.options.tagName)}setValue(e){this.options.value=e,this.update()}getValue(){return this.options.value}get element(){return this.buildState===g?this._element:this.buildState===c?(this.update(),this._element):(this.buildState=g,this.build(),this.buildState=c,this._element)}isBuilt(){return this.buildState===c}translateIfPossible(e){return"string"==typeof e&&e.startsWith(u.FILTERS_NAMESPACE)?this.hot.getTranslatedPhrase(e):e}build(){const e=(e,t)=>{this.eventManager.addEventListener(e,t,(e=>this.runLocalHooks(t,e,this)))};if(this.buildState||(this.buildState=g),this._element.setAttribute("data-hot-input",!0),void 0!==this.options.tabIndex&&this._element.setAttribute("tabindex",this.options.tabIndex),void 0!==this.options.role&&this._element.setAttribute("role",this.options.role),this.options.className&&(0,l.addClass)(this._element,this.options.className),this.options.children.length)(0,h.arrayEach)(this.options.children,(e=>this._element.appendChild(e.element)));else if(this.options.wrapIt){const t=this.hot.rootDocument.createElement(this.options.tagName);t.setAttribute("data-hot-input",!0),(0,r.objectEach)(this.options,((e,o)=>{void 0!==t[o]&&"className"!==o&&"tagName"!==o&&"children"!==o&&(t[o]=this.translateIfPossible(e))})),this._element.appendChild(t),(0,h.arrayEach)(f,(o=>e(t,o)))}else(0,h.arrayEach)(f,(t=>e(this._element,t)))}update(){}reset(){this.options.value="",this.update()}show(){this.element.style.display=""}hide(){this.element.style.display="none"}focus(){}destroy(){this.eventManager.destroy(),this.eventManager=null,this.hot=null,this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null}}t.BaseUI=p,(0,r.mixin)(p,n.default)},79857:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(42538)),r=s(o(48427)),n=o(83302),a=o(22232),l=o(96633);function h(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}var u=new WeakMap,d=new WeakSet;class c extends l.BaseUI{static get DEFAULTS(){return(0,a.clone)({placeholder:"",type:"text",tagName:"input",tabIndex:-1})}constructor(e,t){var o,s;super(e,(0,a.extend)(c.DEFAULTS,t)),h(o=this,s=d),s.add(o),function(e,t,o){h(e,t),t.set(e,o)}(this,u,{writable:!0,value:void 0}),this.registerHooks()}registerHooks(){this.addLocalHook("keyup",(e=>function(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}(this,d,g).call(this,e)))}build(){super.build();const e=this.hot.rootDocument.createElement("div");(0,r.default)(this,u,this._element.firstChild),(0,n.addClass)(this._element,"htUIInput"),(0,n.addClass)(e,"htUIInputIcon"),this._element.appendChild(e),this.update()}update(){this.isBuilt()&&((0,i.default)(this,u).type=this.options.type,(0,i.default)(this,u).placeholder=this.translateIfPossible(this.options.placeholder),(0,i.default)(this,u).value=this.translateIfPossible(this.options.value))}focus(){this.isBuilt()&&(0,i.default)(this,u).focus()}}function g(e){this.options.value=e.target.value}t.InputUI=c},40980:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(42538)),r=s(o(48427)),n=o(22232),a=o(96633);function l(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var h=new WeakMap;class u extends a.BaseUI{static get DEFAULTS(){return(0,n.clone)({href:"#",tagName:"a",tabIndex:-1,role:"button"})}constructor(e,t){super(e,(0,n.extend)(u.DEFAULTS,t)),l(this,h,{writable:!0,value:void 0})}build(){super.build(),(0,r.default)(this,h,this._element.firstChild)}update(){this.isBuilt()&&((0,i.default)(this,h).textContent=this.translateIfPossible(this.options.textContent))}focus(){this.isBuilt()&&(0,i.default)(this,h).focus()}activate(){(0,i.default)(this,h).click()}}t.LinkUI=u},89409:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(42538)),r=s(o(48427)),n=o(83302),a=o(22232),l=o(50095),h=o(80151),u=o(85015),d=o(65320),c=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=C(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),g=o(24449),f=o(96633),p=o(79857),m=o(40980),w=o(94427);function C(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(C=function(e){return e?o:t})(e)}function v(e,t){E(e,t),t.add(e)}function y(e,t,o){E(e,t),t.set(e,o)}function E(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function S(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const R="multipleSelect.itemBox";var b=new WeakMap,_=new WeakMap,T=new WeakMap,O=new WeakMap,M=new WeakMap,I=new WeakMap,A=new WeakSet,N=new WeakSet,P=new WeakSet,x=new WeakSet;class H extends f.BaseUI{static get DEFAULTS(){return(0,a.clone)({className:"htUIMultipleSelect",value:[]})}constructor(e,t){super(e,(0,a.extend)(H.DEFAULTS,t)),v(this,x),v(this,P),v(this,N),v(this,A),y(this,b,{writable:!0,value:[]}),y(this,_,{writable:!0,value:void 0}),y(this,T,{writable:!0,value:void 0}),y(this,O,{writable:!0,value:void 0}),y(this,M,{writable:!0,value:void 0}),y(this,I,{writable:!0,value:void 0}),(0,r.default)(this,O,new p.InputUI(this.hot,{placeholder:c.FILTERS_BUTTONS_PLACEHOLDER_SEARCH,className:"htUIMultipleSelectSearch"})),(0,r.default)(this,M,new m.LinkUI(this.hot,{textContent:c.FILTERS_BUTTONS_SELECT_ALL,className:"htUISelectAll"})),(0,r.default)(this,I,new m.LinkUI(this.hot,{textContent:c.FILTERS_BUTTONS_CLEAR,className:"htUIClearAll"})),this.registerHooks()}getItemsBox(){return(0,i.default)(this,_)}registerHooks(){(0,i.default)(this,O).addLocalHook("keydown",(e=>S(this,N,D).call(this,e))),(0,i.default)(this,O).addLocalHook("input",(e=>S(this,A,k).call(this,e))),(0,i.default)(this,M).addLocalHook("click",(e=>S(this,P,L).call(this,e))),(0,i.default)(this,I).addLocalHook("click",(e=>S(this,x,W).call(this,e)))}setItems(e){(0,r.default)(this,b,e),(0,i.default)(this,_)&&(0,i.default)(this,_).loadData((0,i.default)(this,b))}setLocale(e){(0,r.default)(this,T,e)}getLocale(){return(0,i.default)(this,T)}getItems(){return[...(0,i.default)(this,b)]}getValue(){return function(e){const t=[];return(0,l.arrayEach)(e,(e=>{e.checked&&t.push(e.value)})),t}((0,i.default)(this,b))}getSearchInputElement(){return(0,i.default)(this,O)}getSelectAllElement(){return(0,i.default)(this,M)}getClearAllElement(){return(0,i.default)(this,I)}isSelectedAllValues(){return(0,i.default)(this,b).length===this.getValue().length}build(){super.build();const{rootDocument:e}=this.hot,t=e.createElement("div"),o=new f.BaseUI(this.hot,{className:"htUISelectionControls",children:[(0,i.default)(this,M),(0,i.default)(this,I)]});this._element.appendChild((0,i.default)(this,O).element),this._element.appendChild(o.element),this._element.appendChild(t);const s=t=>{if(!this._element)return;(0,i.default)(this,_)&&(0,i.default)(this,_).destroy(),(0,n.addClass)(t,"htUIMultipleSelectHot"),(0,r.default)(this,_,new this.hot.constructor(t,{data:(0,i.default)(this,b),columns:[{data:"checked",type:"checkbox",label:{property:"visualValue",position:"after"}}],beforeRenderer:(e,t,o,s,i,r)=>{e.title=r.instance.getDataAtRowProp(t,r.label.property)},afterListen:()=>{this.runLocalHooks("focus",this)},beforeOnCellMouseUp:()=>{(0,i.default)(this,_).listen()},maxCols:1,autoWrapCol:!0,height:110,colWidths:()=>(0,i.default)(this,_).container.scrollWidth-(0,n.getScrollbarWidth)(e),copyPaste:!1,disableVisualSelection:"area",fillHandle:!1,fragmentSelection:"cell",tabMoves:{row:1,col:0},layoutDirection:this.hot.isRtl()?"rtl":"ltr"})),(0,i.default)(this,_).init();const o=(0,i.default)(this,_).getShortcutManager().getContext("grid");o.removeShortcutsByKeys(["Tab"]),o.removeShortcutsByKeys(["Shift","Tab"]),o.addShortcut({keys:[["Escape"]],callback:e=>{this.runLocalHooks("keydown",e,this)},group:R}),o.addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:e=>{(0,i.default)(this,_).deselectCell(),this.runLocalHooks("keydown",e,this),this.runLocalHooks("listTabKeydown",e,this)},group:R})};s(t),this.hot._registerTimeout((()=>s(t)),100)}focus(){this.isBuilt()&&(0,i.default)(this,_).listen()}reset(){(0,i.default)(this,O).reset(),(0,i.default)(this,M).reset(),(0,i.default)(this,I).reset()}update(){this.isBuilt()&&((0,i.default)(this,_).loadData(function(e,t){const o=(0,w.createArrayAssertion)(t);return(0,l.arrayMap)(e,(e=>(e.checked=o(e.value),e)))}((0,i.default)(this,b),this.options.value)),super.update())}destroy(){(0,i.default)(this,_)&&(0,i.default)(this,_).destroy(),(0,i.default)(this,O).destroy(),(0,i.default)(this,I).destroy(),(0,i.default)(this,M).destroy(),(0,r.default)(this,O,null),(0,r.default)(this,I,null),(0,r.default)(this,M,null),(0,r.default)(this,_,null),(0,r.default)(this,b,null),super.destroy()}}function k(e){const t=e.target.value.toLocaleLowerCase(this.getLocale());let o;o=""===t?[...(0,i.default)(this,b)]:(0,l.arrayFilter)((0,i.default)(this,b),(e=>`${e.value}`.toLocaleLowerCase(this.getLocale()).indexOf(t)>=0)),(0,i.default)(this,_).loadData(o)}function D(e){this.runLocalHooks("keydown",e,this);(0,u.partial)(h.isKey,e.keyCode)("ARROW_DOWN")&&(e.preventDefault(),(0,g.stopImmediatePropagation)(e),(0,i.default)(this,_).listen(),(0,i.default)(this,_).selectCell(0,0))}function L(e){const t=[];e.preventDefault(),(0,l.arrayEach)((0,i.default)(this,_).getSourceData(),((e,o)=>{e.checked=!0,t.push((0,d.dataRowToChangesArray)(e,o)[0])})),(0,i.default)(this,_).setSourceDataAtCell(t)}function W(e){const t=[];e.preventDefault(),(0,l.arrayEach)((0,i.default)(this,_).getSourceData(),((e,o)=>{e.checked=!1,t.push((0,d.dataRowToChangesArray)(e,o)[0])})),(0,i.default)(this,_).setSourceDataAtCell(t)}t.MultipleSelectUI=H;t.default=H},87255:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(42538)),r=s(o(48427)),n=o(22232),a=o(96633);function l(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var h=new WeakMap,u=new WeakMap;class d extends a.BaseUI{static get DEFAULTS(){return(0,n.clone)({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}constructor(e,t){super(e,(0,n.extend)(d.DEFAULTS,t)),l(this,h,{writable:!0,value:void 0}),l(this,u,{writable:!0,value:void 0})}build(){super.build();const e=this.hot.rootDocument.createElement("label");e.textContent=this.translateIfPossible(this.options.label.textContent),e.htmlFor=this.translateIfPossible(this.options.label.htmlFor),(0,r.default)(this,u,e),(0,r.default)(this,h,this._element.firstChild),(0,i.default)(this,h).checked=this.options.checked,this._element.appendChild(e),this.update()}update(){this.isBuilt()&&((0,i.default)(this,u).textContent=this.translateIfPossible(this.options.label.textContent))}isChecked(){return!!this.isBuilt()&&(0,i.default)(this,h).checked}setChecked(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isBuilt()&&((0,i.default)(this,h).checked=e)}focus(){this.isBuilt()&&(0,i.default)(this,h).focus()}}t.RadioInputUI=d},44854:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(48427)),r=s(o(42538)),n=o(90437),a=o(22232),l=o(50095),h=o(83302),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=f(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),d=o(90500),c=o(96633),g=o(5386);function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(f=function(e){return e?o:t})(e)}function p(e,t){w(e,t),t.add(e)}function m(e,t,o){w(e,t),t.set(e,o)}function w(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function C(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var v=new WeakMap,y=new WeakMap,E=new WeakMap,S=new WeakMap,R=new WeakMap,b=new WeakSet,_=new WeakSet,T=new WeakSet;class O extends c.BaseUI{static get DEFAULTS(){return(0,a.clone)({className:"htUISelect",wrapIt:!1,tabIndex:-1})}constructor(e,t){super(e,(0,a.extend)(O.DEFAULTS,t)),p(this,T),p(this,_),p(this,b),m(this,v,{writable:!0,value:null}),m(this,y,{writable:!0,value:[]}),m(this,E,{writable:!0,value:void 0}),m(this,S,{writable:!0,value:void 0}),m(this,R,{writable:!0,value:void 0}),this.registerHooks()}getMenu(){return(0,r.default)(this,v)}registerHooks(){this.addLocalHook("click",(()=>C(this,T,A).call(this)))}setItems(e){(0,i.default)(this,y,this.translateNames(e)),(0,r.default)(this,v)&&(0,r.default)(this,v).setMenuItems((0,r.default)(this,y))}translateNames(e){return(0,l.arrayEach)(e,(e=>{e.name=this.translateIfPossible(e.name)})),e}build(){super.build(),(0,i.default)(this,v,new n.Menu(this.hot,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0,container:this.options.menuContainer})),(0,r.default)(this,v).setMenuItems((0,r.default)(this,y));const e=new c.BaseUI(this.hot,{className:"htUISelectCaption"}),t=new c.BaseUI(this.hot,{className:"htUISelectDropdown"});(0,i.default)(this,E,e),(0,i.default)(this,S,e.element),(0,i.default)(this,R,t),this.hot.getSettings().ariaTags&&((0,h.setAttribute)(t.element,[(0,g.A11Y_HIDDEN)()]),(0,h.setAttribute)(this._element,[(0,g.A11Y_LISTBOX)()])),(0,l.arrayEach)([e,t],(e=>this._element.appendChild(e.element))),(0,r.default)(this,v).addLocalHook("select",(e=>C(this,b,M).call(this,e))),(0,r.default)(this,v).addLocalHook("afterClose",(()=>C(this,_,I).call(this))),this.update()}update(){if(!this.isBuilt())return;let e;e=this.options.value?this.options.value.name:(0,r.default)(this,v).hot.getTranslatedPhrase(u.FILTERS_CONDITIONS_NONE),(0,r.default)(this,S).textContent=e,super.update()}openOptions(){const e=this.element.getBoundingClientRect();(0,r.default)(this,v)&&((0,r.default)(this,v).open(),(0,r.default)(this,v).setPosition({left:this.hot.isLtr()?e.left-5:e.left-31,top:e.top-1,width:e.width,height:e.height}),(0,r.default)(this,v).getNavigator().toFirstItem(),(0,r.default)(this,v).getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:e=>{this.closeOptions(),this.runLocalHooks("tabKeydown",e)}},{keys:[["Control/Meta","A"]],callback:()=>!1}]))}closeOptions(){(0,r.default)(this,v)&&(0,r.default)(this,v).close()}focus(){this.isBuilt()&&this.element.focus()}destroy(){(0,r.default)(this,v)&&((0,r.default)(this,v).destroy(),(0,i.default)(this,v,null)),(0,r.default)(this,E)&&(0,r.default)(this,E).destroy(),(0,r.default)(this,R)&&(0,r.default)(this,R).destroy(),super.destroy()}}function M(e){e.name!==d.SEPARATOR&&(this.options.value=e,this.update(),this.runLocalHooks("select",this.options.value))}function I(){this.runLocalHooks("afterClose")}function A(){this.openOptions()}t.SelectUI=O},94427:(e,t,o)=>{"use strict";t.__esModule=!0,t.createArrayAssertion=h,t.intersectValues=function(e,t,o,s){const r=[],a=e===t;let l;a||(l=h(t));return(0,i.arrayEach)(e,(e=>{let t=!1;(a||l(e))&&(t=!0);const i={checked:t,value:e,visualValue:n(e,o)};s&&s(i),r.push(i)})),r},t.sortComparison=function(e,t){if("number"==typeof e&&"number"==typeof t)return e-t;return r(e,t)},t.toEmptyString=function(e){return null==e?"":e},t.toVisualValue=n,t.unifyColumnValues=function(e){let t=e;t=l?Array.from(new Set(t)):(0,i.arrayUnique)(t);return t=t.sort(((e,t)=>"number"==typeof e&&"number"==typeof t?e-t:e===t?0:e>t?1:-1)),t},o(63517);var s=o(7374),i=o(50095);const r=(0,s.getComparisonFunction)();function n(e,t){let o=e;return""===o&&(o=`(${t})`),o}const a=new Set([1]).has(1),l=a&&"function"==typeof Array.from;function h(e){let t=e;return a&&(t=new Set(t)),function(e){let o;return o=a?t.has(e):!!~t.indexOf(e),o}}},33423:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getRegisteredHotInstances=function(e){var t;const o=d(),s=0===o.size?[]:Array.from(null!==(t=o.get(e))&&void 0!==t?t:[]);return new Map(s.map((e=>[e.getPlugin("formulas").sheetId,e])))},t.registerCustomFunctions=f,t.registerEngine=g,t.registerLanguage=p,t.registerNamedExpressions=m,t.setupEngine=function(e){const t=e.getSettings(),o=t[h.PLUGIN_KEY],s=null==o?void 0:o.engine;if(!0===o)return null;if((0,r.isUndefined)(s))return null;var i;if("function"==typeof s.hyperformula||"function"==typeof s)return g(null!==(i=s.hyperformula)&&void 0!==i?i:s,t,e);if("object"==typeof s&&(0,r.isUndefined)(s.hyperformula)){const t=d(),o=c().get(s);return t.has(s)||t.set(s,[]),t.get(s).push(e),o&&o.push(e.guid),s.getConfig().licenseKey||s.updateConfig({licenseKey:u.DEFAULT_LICENSE_KEY}),s.getConfig().leapYear1900===u.DEFAULT_SETTINGS.leapYear1900&&!1!==(0,l.isObjectEqual)(s.getConfig().nullDate,u.DEFAULT_SETTINGS.nullDate)||(0,a.warn)(n.toSingleLine`If you use HyperFormula with Handsontable, keep the default \`leapYear1900\` and \`nullDate\`
74
+ settings. Otherwise, HyperFormula's dates may not sync correctly with Handsontable's dates.`),s}return null},t.setupSheet=function(e,t){!(0,r.isUndefined)(t)&&e.doesSheetExist(t)||(t=e.addSheet(t));return t},t.unregisterEngine=function(e,t){if(e){const o=d(),s=o.get(e),i=c(),r=i.get(e);s&&s.includes(t)&&(s.splice(s.indexOf(t),1),0===s.length&&o.delete(e)),r&&r.includes(t.guid)&&(r.splice(r.indexOf(t.guid),1),0===r.length&&(i.delete(e),e.destroy()))}},o(63517);var i=s(o(63800)),r=o(93315),n=o(28236),a=o(69173),l=o(22232),h=o(11870),u=o(61205);function d(){const e="engine_relationship",t=(0,i.default)(h.PLUGIN_KEY);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function c(){const e="shared_engine_usage",t=(0,i.default)(h.PLUGIN_KEY);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function g(e,t,o){const s=t[h.PLUGIN_KEY],i=(0,u.getEngineSettingsWithDefaultsAndOverrides)(t),r=d(),n=c();f(e,s.functions),p(e,s.language);const a=e.buildEmpty(i);return r.set(a,[o]),n.set(a,[o.guid]),m(a,s.namedExpressions),a.on("sheetAdded",(()=>{a.rebuildAndRecalculate()})),a.on("sheetRemoved",(()=>{a.rebuildAndRecalculate()})),a}function f(e,t){t&&t.forEach((t=>{const{name:o,plugin:s,translations:i}=t;try{e.registerFunction(o,s,i)}catch(e){(0,a.warn)(e.message)}}))}function p(e,t){if(t){const{langCode:o}=t;try{e.registerLanguage(o,t)}catch(e){(0,a.warn)(e.message)}}}function m(e,t){t&&(e.suspendEvaluation(),t.forEach((t=>{const{name:o,expression:s,scope:i,options:r}=t;try{e.addNamedExpression(o,s,i,r)}catch(e){(0,a.warn)(e.message)}})),e.resumeEvaluation())}},61205:(e,t,o)=>{"use strict";t.__esModule=!0,t.getEngineSettingsOverrides=n,t.getEngineSettingsWithDefaultsAndOverrides=function(e){var t;const o=e[s.PLUGIN_KEY],i=a(null!=o&&null!==(t=o.engine)&&void 0!==t&&t.hyperformula?o.engine:{}),l=n(e);return{...r,...i,...l}},t.getEngineSettingsWithOverrides=function(e){var t;const o=e[s.PLUGIN_KEY],i=a(null!=o&&null!==(t=o.engine)&&void 0!==t&&t.hyperformula?o.engine:{}),r=n(e);return{...i,...r}},t.haveEngineSettingsChanged=function(e,t){return Object.keys(t).some((o=>void 0!==t[o]&&t[o]!==e[o]))};var s=o(11870);const i=t.DEFAULT_LICENSE_KEY="internal-use-in-handsontable",r=t.DEFAULT_SETTINGS={licenseKey:i,useArrayArithmetic:!0,useColumnIndex:!1,useStats:!1,evaluateNullToZero:!0,precisionEpsilon:1e-13,precisionRounding:14,smartRounding:!0,leapYear1900:!1,nullDate:{year:1899,month:12,day:30},nullYear:30,dateFormats:["DD/MM/YYYY","DD/MM/YY"],timeFormats:["hh:mm","hh:mm:ss.sss"],matchWholeCell:!0,useRegularExpressions:!1,useWildcards:!0,functionArgSeparator:",",thousandSeparator:"",decimalSeparator:".",language:"enGB"};function n(e){var t;return{maxColumns:e.maxColumns,maxRows:e.maxRows,language:null===(t=e[s.PLUGIN_KEY])||void 0===t||null===(t=t.language)||void 0===t?void 0:t.langCode}}function a(e){return Object.keys(e).reduce(((t,o)=>("hyperformula"!==o&&(t[o]=e[o]),t)),{})}},11870:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(68983),o(91683),o(63517);var i=s(o(93231)),r=s(o(48427)),n=s(o(42538)),a=o(36026),l=s(o(63800)),h=o(69173),u=o(68145),d=o(93315),c=o(33423),g=o(54484),f=o(61205),p=o(65320),m=o(18609),w=s(o(56307)),C=s(o(9424));function v(e,t){E(e,t),t.add(e)}function y(e,t,o){E(e,t),t.set(e,o)}function E(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function S(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const R=t.PLUGIN_KEY="formulas",b=t.SETTING_KEYS=["maxRows","maxColumns","language"],_=t.PLUGIN_PRIORITY=260;w.default.getSingleton().register("afterNamedExpressionAdded"),w.default.getSingleton().register("afterNamedExpressionRemoved"),w.default.getSingleton().register("afterSheetAdded"),w.default.getSingleton().register("afterSheetRemoved"),w.default.getSingleton().register("afterSheetRenamed"),w.default.getSingleton().register("afterFormulasValuesUpdate");const T=e=>"UndoRedo.undo"===e||"UndoRedo.redo"===e||"auto"===e;var O=new WeakMap,M=new WeakMap,I=new WeakMap,A=new WeakSet,N=new WeakSet,P=new WeakSet,x=new WeakSet,H=new WeakSet,k=new WeakSet,D=new WeakSet,L=new WeakSet,W=new WeakSet,F=new WeakSet,V=new WeakSet,B=new WeakSet,U=new WeakSet,Y=new WeakSet,j=new WeakSet,G=new WeakSet,z=new WeakSet,K=new WeakSet,$=new WeakSet,X=new WeakSet,q=new WeakSet,Q=new WeakSet,J=new WeakSet,Z=new WeakSet;class ee extends a.BasePlugin{constructor(){var e;super(...arguments),e=this,v(this,Z),v(this,J),v(this,Q),v(this,q),v(this,X),v(this,$),v(this,K),v(this,z),v(this,G),v(this,j),v(this,Y),v(this,U),v(this,B),v(this,V),v(this,F),v(this,W),v(this,L),v(this,D),v(this,k),v(this,H),v(this,x),v(this,P),v(this,N),v(this,A),y(this,O,{writable:!0,value:!1}),y(this,M,{writable:!0,value:!1}),y(this,I,{writable:!0,value:[["valuesUpdated",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return S(e,$,ve).call(e,...o)}],["namedExpressionAdded",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return S(e,X,ye).call(e,...o)}],["namedExpressionRemoved",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return S(e,q,Ee).call(e,...o)}],["sheetAdded",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return S(e,Q,Se).call(e,...o)}],["sheetRenamed",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return S(e,J,Re).call(e,...o)}],["sheetRemoved",function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return S(e,Z,be).call(e,...o)}]]}),(0,i.default)(this,"staticRegister",(0,l.default)("formulas")),(0,i.default)(this,"engine",null),(0,i.default)(this,"sheetName",null),(0,i.default)(this,"indexSyncer",null),(0,i.default)(this,"rowAxisSyncer",null),(0,i.default)(this,"columnAxisSyncer",null)}static get PLUGIN_KEY(){return R}static get PLUGIN_PRIORITY(){return _}static get SETTING_KEYS(){return[R,...b]}get sheetId(){return null===this.sheetName?null:this.engine.getSheetId(this.sheetName)}isEnabled(){return!!this.hot.getSettings()[R]}enablePlugin(){var e,t=this;if(!this.enabled)if(this.engine=null!==(e=(0,c.setupEngine)(this.hot))&&void 0!==e?e:this.engine,this.engine){if(null!==this.sheetName&&!this.engine.doesSheetExist(this.sheetName)){const e=this.addSheet(this.sheetName,this.hot.getSourceDataArray());!1!==e&&(this.sheetName=e)}this.addHook("beforeLoadData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,P,se).call(t,...o)})),this.addHook("afterLoadData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,H,re).call(t,...o)})),this.addHook("beforeUpdateData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,P,se).call(t,...o)})),this.addHook("afterUpdateData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,H,re).call(t,...o)})),this.addHook("modifyData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,k,ne).call(t,...o)})),this.addHook("modifySourceData",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,D,ae).call(t,...o)})),this.addHook("beforeValidate",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,A,te).call(t,...o)})),this.addHook("afterSetSourceDataAtCell",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,W,he).call(t,...o)})),this.addHook("afterSetDataAtCell",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,L,le).call(t,...o)})),this.addHook("afterSetDataAtRowProp",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,L,le).call(t,...o)})),this.addHook("beforeCreateRow",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,F,ue).call(t,...o)})),this.addHook("beforeCreateCol",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,V,de).call(t,...o)})),this.addHook("afterCreateRow",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,Y,fe).call(t,...o)})),this.addHook("afterCreateCol",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,j,pe).call(t,...o)})),this.addHook("beforeRemoveRow",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,B,ce).call(t,...o)})),this.addHook("beforeRemoveCol",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,U,ge).call(t,...o)})),this.addHook("afterRemoveRow",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,G,me).call(t,...o)})),this.addHook("afterRemoveCol",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,z,we).call(t,...o)})),this.indexSyncer=new C.default(this.hot.rowIndexMapper,this.hot.columnIndexMapper,(e=>{this.hot.addHookOnce("init",(()=>{e()}))})),this.rowAxisSyncer=this.indexSyncer.getForAxis("row"),this.columnAxisSyncer=this.indexSyncer.getForAxis("column"),this.hot.addHook("afterRowSequenceChange",this.rowAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("afterColumnSequenceChange",this.columnAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("beforeRowMove",((e,t,o,s)=>{this.rowAxisSyncer.storeMovesInformation(e,t,s)})),this.hot.addHook("beforeColumnMove",((e,t,o,s)=>{this.columnAxisSyncer.storeMovesInformation(e,t,s)})),this.hot.addHook("afterRowMove",((e,t,o,s,i)=>{this.rowAxisSyncer.calculateAndSyncMoves(s,i)})),this.hot.addHook("afterColumnMove",((e,t,o,s,i)=>{this.columnAxisSyncer.calculateAndSyncMoves(s,i)})),this.hot.addHook("beforeColumnFreeze",((e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart,t)})),this.hot.addHook("afterColumnFreeze",((e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)})),this.hot.addHook("beforeColumnUnfreeze",((e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart-1,t)})),this.hot.addHook("afterColumnUnfreeze",((e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)})),this.addHook("afterCellMetaReset",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,x,ie).call(t,...o)})),this.addHook("beforeUndo",(()=>{this.indexSyncer.setPerformUndo(!0),this.engine.undo()})),this.addHook("beforeRedo",(()=>{this.indexSyncer.setPerformRedo(!0),this.engine.redo()})),this.addHook("afterUndo",(()=>{this.indexSyncer.setPerformUndo(!1)})),this.addHook("afterUndo",(()=>{this.indexSyncer.setPerformRedo(!1)})),this.addHook("afterDetachChild",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,K,Ce).call(t,...o)})),this.addHook("beforeAutofill",(function(){for(var e=arguments.length,o=new Array(e),s=0;s<e;s++)o[s]=arguments[s];return S(t,N,oe).call(t,...o)})),(0,n.default)(this,I).forEach((e=>{let[t,o]=e;return this.engine.on(t,o)})),super.enablePlugin()}else(0,h.warn)("Missing the required `engine` key in the Formulas settings. Please fill it with either an engine class or an engine instance.")}disablePlugin(){(0,n.default)(this,I).forEach((e=>{let[t,o]=e;return this.engine.off(t,o)})),(0,c.unregisterEngine)(this.engine,this.hot),this.engine=null,super.disablePlugin()}updatePlugin(e){const t=(0,f.getEngineSettingsWithOverrides)(this.hot.getSettings());(0,f.haveEngineSettingsChanged)(this.engine.getConfig(),t)&&this.engine.updateConfig(t);const o=this.hot.getSettings()[R];if((0,d.isDefined)(o)&&(0,d.isDefined)(o.sheetName)&&o.sheetName!==this.sheetName&&this.switchSheet(o.sheetName),!e.data&&null===this.sheetName){const e=this.hot.getSettings()[R].sheetName;e&&this.engine.doesSheetExist(e)?this.switchSheet(this.sheetName):this.sheetName=this.addSheet(null!=e?e:void 0,this.hot.getSourceDataArray())}super.updatePlugin(e)}destroy(){(0,n.default)(this,I).forEach((e=>{var t;let[o,s]=e;return null===(t=this.engine)||void 0===t?void 0:t.off(o,s)})),(0,r.default)(this,I,null),(0,c.unregisterEngine)(this.engine,this.hot),this.engine=null,super.destroy()}addSheet(e,t){if((0,d.isDefined)(t)&&!(0,p.isArrayOfArrays)(t))return(0,h.warn)("The provided data should be an array of arrays."),!1;if(null!=e&&this.engine.doesSheetExist(e))return(0,h.warn)("Sheet with the provided name already exists."),!1;try{const o=this.engine.addSheet(null!=e?e:void 0);return t&&this.engine.setSheetContent(this.engine.getSheetId(o),t),o}catch(e){return(0,h.warn)(e.message),!1}}switchSheet(e){if(!this.engine.doesSheetExist(e))return void(0,h.error)(`The sheet named \`${e}\` does not exist, switch aborted.`);this.sheetName=e;const t=this.engine.getSheetSerialized(this.sheetId);t.length>0&&this.hot.loadData(t,`${(0,m.toUpperCaseFirst)(R)}.switchSheet`)}getCellType(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;const s=this.hot.toPhysicalRow(e),i=this.hot.toPhysicalColumn(t);return null!==s&&null!==i?this.engine.getCellType({sheet:o,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)}):"EMPTY"}isFormulaCellType(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;return this.engine.doesCellHaveFormula({sheet:o,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)})}renderDependentSheets(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=new Set;e.forEach((e=>{var t;const s=null==e||null===(t=e.address)||void 0===t?void 0:t.sheet;void 0!==s&&(o.has(s)||o.add(s))})),(0,c.getRegisteredHotInstances)(this.engine).forEach(((e,s)=>{var i;(t||s!==this.sheetId)&&o.has(s)&&(e.render(),null===(i=e.view)||void 0===i||i.adjustElementsSize())}))}validateDependentCells(e){const t=e=>{var t;const{row:o,col:s,sheet:i}=null!==(t=null==e?void 0:e.address)&&void 0!==t?t:{};return(0,d.isDefined)(i)?`${i}:${o}x${s}`:""},o=new Set((arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).map((e=>t(e))));e.forEach((e=>{var s,i;const{row:r,col:n}=null!==(s=e.address)&&void 0!==s?s:{};if(!1===(0,d.isDefined)(r)||!1===(0,d.isDefined)(n)||r>=this.hot.countRows()||n>=this.hot.countCols())return;const a=null==e||null===(i=e.address)||void 0===i?void 0:i.sheet,l=t(e);if(void 0!==a&&!o.has(l)){const e=(0,c.getRegisteredHotInstances)(this.engine).get(a);if(!e)return;e.validateCell(e.getDataAtCell(r,n),e.getCellMeta(r,n),(()=>{}))}}))}syncChangeWithEngine(e,t,o){const s={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};if(!this.engine.isItPossibleToSetCellContents(s))return void(0,h.warn)(`Not possible to set cell data at ${JSON.stringify(s)}`);const i=this.hot.getCellMeta(e,t);return(0,g.isDate)(o,i.type)&&((0,g.isDateValid)(o,i.dateFormat)?o=(0,g.getDateInHfFormat)(o,i.dateFormat):!1===(0,g.isFormula)(o)&&(o=`'${o}`)),this.engine.setCellContents(s,o)}}function te(e,t,o){const s=this.hot.propToCol(o);if(this.isFormulaCellType(t,s)){const e={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId},o=this.hot.getCellMeta(t,s);let i=this.engine.getCellValue(e);return"date"===o.type&&(0,u.isNumeric)(i)&&(i=(0,g.getDateFromExcelDate)(i,o.dateFormat)),"object"==typeof i&&null!==i?i.value:i}return e}function oe(e,t,o){const{row:s,col:i}=t.getTopStartCorner(),{row:r,col:n}=t.getBottomEndCorner(),{row:a,col:l}=o.getTopStartCorner(),{row:h,col:u}=o.getBottomEndCorner(),d={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(s),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(r),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(n),sheet:this.sheetId}},c={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(a),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(l),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(h),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(u),sheet:this.sheetId}};if(!1===this.engine.isItPossibleToSetCellContents(c))return!1;const f=this.engine.getFillRangeData(d,c),{row:p,col:m}=d.start,{row:w,col:C}=d.end,v=w-p+1,y=C-m+1;for(let e=0;e<f.length;e+=1)for(let t=0;t<f[e].length;t+=1){const o=f[e][t],s=e%v,i=t%y,r=this.hot.getCellMeta(s,i);(0,g.isDate)(o,r.type)&&(o.startsWith("'")?f[e][t]=o.slice(1):!1===this.isFormulaCellType(s,i,this.sheetId)&&(f[e][t]=(0,g.getDateInHotFormat)(o,r.dateFormat)))}return f}function se(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"").includes((0,m.toUpperCaseFirst)(R))||(0,r.default)(this,M,(0,d.isUndefined)(this.hot.getSettings().data))}function ie(){const e=this.hot.getSourceDataArray();let t=!1;e.forEach(((o,s)=>{o.forEach(((o,i)=>{const r=this.hot.getCellMeta(s,i),n=r.dateFormat;(0,g.isDate)(o,r.type)&&(t=!0,(0,g.isDateValid)(o,n)?e[s][i]=(0,g.getDateInHfFormat)(o,n):!1===this.isFormulaCellType(s,i)&&(e[s][i]=`'${o}`))}))})),!0===t&&((0,r.default)(this,O,!0),this.engine.setSheetContent(this.sheetId,e),(0,r.default)(this,O,!1))}function re(e,t){if(!(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"").includes((0,m.toUpperCaseFirst)(R)))if(this.sheetName=(0,c.setupSheet)(this.engine,this.hot.getSettings()[R].sheetName),(0,n.default)(this,M))this.switchSheet(this.sheetName);else{const e=this.hot.getSourceDataArray();if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,e)){(0,r.default)(this,O,!0);const t=this.engine.setSheetContent(this.sheetId,e);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(t),(0,r.default)(this,O,!1)}}}function ne(e,t,o,s){if("get"!==s||(0,n.default)(this,O)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const i=this.hot.toVisualRow(e);if(null===i||null===t)return;if(!this.isFormulaCellType(i,t)){if("ARRAY"!==this.getCellType(i,t))return void((0,g.isEscapedFormulaExpression)(o.value)&&(o.value=(0,g.unescapeFormulaExpression)(o.value)))}const r={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};let a=this.engine.getCellValue(r);const l=this.hot.getCellMeta(i,t);"date"===l.type&&(0,u.isNumeric)(a)&&(a=(0,g.getDateFromExcelDate)(a,l.dateFormat));const h="object"==typeof a&&null!==a?a.value:a;o.value=h}function ae(e,t,o,s){if("get"!==s||(0,n.default)(this,O)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const i=this.hot.toVisualRow(e),r=this.hot.propToCol(t);if(null===i||null===r)return;if(!this.isFormulaCellType(i,r)){if("ARRAY"!==this.getCellType(i,r))return}const a=this.engine.getSheetDimensions(this.engine.getSheetId(this.sheetName));if(0===a.width&&0===a.height)return;const l={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(r),sheet:this.sheetId};o.value=this.engine.getCellSerialized(l)}function le(e,t){if(T(t))return;const o=[],s=[],i=this.engine.batch((()=>{e.forEach((e=>{let[t,i,,r]=e;const n=this.hot.propToCol(i),a=this.hot.toPhysicalRow(t),l=this.hot.toPhysicalColumn(n),h={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(n),sheet:this.sheetId};null!==a&&null!==l?this.syncChangeWithEngine(t,n,r):o.push([t,n,r]),s.push({address:h})}))}));o.length&&this.hot.addHookOnce("afterChange",(()=>{const e=this.engine.batch((()=>{o.forEach((e=>{let[t,o,s]=e;this.syncChangeWithEngine(t,o,s)}))}));this.renderDependentSheets(e,!0)})),this.renderDependentSheets(i),this.validateDependentCells(i,s)}function he(e,t){if(T(t))return;const o=[],s=[];e.forEach((e=>{let[t,i,,r]=e;const n=this.hot.propToCol(i);if(!(0,u.isNumeric)(n))return;const a={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(n),sheet:this.sheetId};this.engine.isItPossibleToSetCellContents(a)?(s.push({address:a}),o.push(...this.engine.setCellContents(a,r))):(0,h.warn)(`Not possible to set source cell data at ${JSON.stringify(a)}`)})),this.renderDependentSheets(o),this.validateDependentCells(o,s)}function ue(e,t){let o=this.rowAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countRows()&&(o=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddRows(this.sheetId,[o,t]))return!1}function de(e,t){let o=this.columnAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countCols()&&(o=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddColumns(this.sheetId,[o,t]))return!1}function ce(e,t,o){return!1!==this.rowAxisSyncer.setRemovedHfIndexes(o).every((e=>this.engine.isItPossibleToRemoveRows(this.sheetId,[e,1])))&&void 0}function ge(e,t,o){return!1!==this.columnAxisSyncer.setRemovedHfIndexes(o).every((e=>this.engine.isItPossibleToRemoveColumns(this.sheetId,[e,1])))&&void 0}function fe(e,t,o){if(T(o))return;const s=this.engine.addRows(this.sheetId,[this.rowAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(s)}function pe(e,t,o){if(T(o))return;const s=this.engine.addColumns(this.sheetId,[this.columnAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(s)}function me(e,t,o,s){if(T(s))return;const i=this.rowAxisSyncer.getRemovedHfIndexes().sort().reverse(),r=this.engine.batch((()=>{i.forEach((e=>{this.engine.removeRows(this.sheetId,[e,1])}))}));this.renderDependentSheets(r)}function we(e,t,o,s){if(T(s))return;const i=this.columnAxisSyncer.getRemovedHfIndexes().sort().reverse(),r=this.engine.batch((()=>{i.forEach((e=>{this.engine.removeColumns(this.sheetId,[e,1])}))}));this.renderDependentSheets(r)}function Ce(e,t,o){var s;(0,r.default)(this,O,!0);const i=this.hot.getSourceDataArray(o,0,o+((null===(s=t.__children)||void 0===s?void 0:s.length)||0),this.hot.countSourceCols());(0,r.default)(this,O,!1),i.forEach(((e,t)=>{e.forEach(((e,s)=>{this.engine.setCellContents({col:s,row:o+t,sheet:this.sheetId},[[e]])}))}))}function ve(e){this.hot.runHooks("afterFormulasValuesUpdate",e)}function ye(e,t){this.hot.runHooks("afterNamedExpressionAdded",e,t)}function Ee(e,t){this.hot.runHooks("afterNamedExpressionRemoved",e,t)}function Se(e){this.hot.runHooks("afterSheetAdded",e)}function Re(e,t){this.hot.runHooks("afterSheetRenamed",e,t)}function be(e,t){this.hot.runHooks("afterSheetRemoved",e,t)}t.Formulas=ee},83264:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(11870);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Formulas=s.Formulas},23657:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(42538)),r=s(o(48427)),n=o(18609);function a(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var l=new WeakMap,h=new WeakMap,u=new WeakMap,d=new WeakMap,c=new WeakMap,g=new WeakMap,f=new WeakMap;t.default=class{constructor(e,t,o){a(this,l,{writable:!0,value:void 0}),a(this,h,{writable:!0,value:void 0}),a(this,u,{writable:!0,value:void 0}),a(this,d,{writable:!0,value:[]}),a(this,c,{writable:!0,value:[]}),a(this,g,{writable:!0,value:void 0}),a(this,f,{writable:!0,value:[]}),(0,r.default)(this,l,e),(0,r.default)(this,h,t),(0,r.default)(this,u,o)}setRemovedHfIndexes(e){return(0,r.default)(this,f,e.map((e=>{const t=(0,i.default)(this,h).getVisualFromPhysicalIndex(e);return this.getHfIndexFromVisualIndex(t)}))),(0,i.default)(this,f)}getRemovedHfIndexes(){return(0,i.default)(this,f)}getHfIndexFromVisualIndex(e){const t=(0,i.default)(this,h).getIndexesSequence(),o=(0,i.default)(this,h).getNotTrimmedIndexes();return t.indexOf(o[e])}syncMoves(e){const t=`move${(0,n.toUpperCaseFirst)((0,i.default)(this,l))}s`;(0,i.default)(this,u).getEngine().batch((()=>{e.forEach((e=>{const o=e.from!==e.to,s=e.from+1!==e.to;o&&s&&(0,i.default)(this,u).getEngine()[t]((0,i.default)(this,u).getSheetId(),e.from,1,e.to)}))}))}storeMovesInformation(e,t,o){!1!==o&&((0,r.default)(this,c,e.map((e=>this.getHfIndexFromVisualIndex(e)))),(0,r.default)(this,g,this.getHfIndexFromVisualIndex(t)))}getMoveLine(e,t){const o=(0,i.default)(this,h).getNumberOfIndexes(),s=Array.from(Array(o).keys()).filter((t=>!1===e.includes(t)));var r;return 0===t?null!==(r=s[t])&&void 0!==r?r:0:s[t-1]+1}getInitiallyCalculatedMoves(e,t){let o=this.getMoveLine(e,t);const s=[];return e.forEach((e=>{const t={from:e,to:o};s.forEach((e=>{const o=e.from>e.to,s=e.to<=t.from;e.from>t.from&&s&&o&&(t.from+=1)})),t.from>=o&&(o+=1),s.push(t)})),s}adjustedCalculatedMoves(e){return e.forEach(((t,o)=>{e.slice(o+1).forEach((e=>{const o=e.from<e.to;e.from>t.from&&o&&(e.from-=1)}))})),e}calculateAndSyncMoves(e,t){if((0,i.default)(this,u).isPerformingUndoRedo())return;if(!1===e||!1===t)return;const o=this.adjustedCalculatedMoves(this.getInitiallyCalculatedMoves((0,i.default)(this,c),(0,i.default)(this,g)));null===(0,i.default)(this,u).getSheetId()?(0,i.default)(this,u).getPostponeAction((()=>this.syncMoves(o))):this.syncMoves(o)}getIndexesChangeSyncMethod(){const e=`set${(0,n.toUpperCaseFirst)((0,i.default)(this,l))}Order`;return t=>{if((0,i.default)(this,u).isPerformingUndoRedo())return;const o=(0,i.default)(this,h).getIndexesSequence();if("update"===t){const t=(0,i.default)(this,d).map((e=>o.indexOf(e))),s=(0,i.default)(this,u).getEngine().getSheetDimensions((0,i.default)(this,u).getSheetId());let r;r="row"===(0,i.default)(this,l)?s.height:s.width;for(let e=t.length;e<r;e+=1)t.push(e);(0,i.default)(this,u).getEngine()[e]((0,i.default)(this,u).getSheetId(),t)}(0,r.default)(this,d,o)}}init(){(0,r.default)(this,d,(0,i.default)(this,h).getIndexesSequence())}}},9424:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(42538)),r=s(o(48427)),n=s(o(23657));function a(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var l=new WeakMap,h=new WeakMap,u=new WeakMap,d=new WeakMap,c=new WeakMap,g=new WeakMap,f=new WeakMap;t.default=class{constructor(e,t,o){a(this,l,{writable:!0,value:void 0}),a(this,h,{writable:!0,value:void 0}),a(this,u,{writable:!0,value:void 0}),a(this,d,{writable:!0,value:!1}),a(this,c,{writable:!0,value:!1}),a(this,g,{writable:!0,value:null}),a(this,f,{writable:!0,value:null}),(0,r.default)(this,l,new n.default("row",e,this)),(0,r.default)(this,h,new n.default("column",t,this)),(0,r.default)(this,u,o)}getForAxis(e){return"row"===e?(0,i.default)(this,l):(0,i.default)(this,h)}setPerformUndo(e){(0,r.default)(this,d,e)}setPerformRedo(e){(0,r.default)(this,c,e)}isPerformingUndoRedo(){return(0,i.default)(this,d)||(0,i.default)(this,c)}getSheetId(){return(0,i.default)(this,f)}getEngine(){return(0,i.default)(this,g)}getPostponeAction(){return(0,i.default)(this,u)}setupSyncEndpoint(e,t){(0,r.default)(this,g,e),(0,r.default)(this,f,t),(0,i.default)(this,l).init(),(0,i.default)(this,h).init()}}},54484:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getDateFromExcelDate=function(e,t){const o=new Date(Date.UTC(0,0,e+-1));return(0,i.default)(o).format(t)},t.getDateInHfFormat=function(e,t){return(0,i.default)(e,t,!0).format(r)},t.getDateInHotFormat=function(e,t){return(0,i.default)(e,r,!0).format(t)},t.isDate=function(e,t){return"string"==typeof e&&"date"===t},t.isDateValid=function(e,t){return(0,i.default)(e,t,!0).isValid()},t.isEscapedFormulaExpression=n,t.isFormula=function(e){return"string"==typeof e&&e.startsWith("=")},t.unescapeFormulaExpression=function(e){return n(e)?e.substr(1):e};var i=s(o(33034));const r="DD/MM/YYYY";function n(e){return"string"==typeof e&&"'"===e.charAt(0)&&"="===e.charAt(1)}},81870:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"hidden_columns_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[,o,,s]=e;o-s!=0&&(t=1)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_HIDE_COLUMN,t)},callback(){const{from:t,to:o}=this.getSelectedRangeLast(),s=Math.max(Math.min(t.col,o.col),0),i=Math.max(t.col,o.col),r=[];for(let e=s;e<=i;e+=1)r.push(e);e.hideColumns(r);const n=r[r.length-1],a=this.columnIndexMapper.getNearestNotHiddenIndex(n,1,!0);Number.isInteger(a)&&a>=0?this.selectColumns(a):this.deselectCell(),this.render(),this.view.adjustElementsSize(!0)},disabled:!1,hidden(){return!(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner())}}},o(63517);var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},89917:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=[];return{key:"hidden_columns_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_SHOW_COLUMN,e)},callback(){var o,s;if(0===t.length)return;let i=t[0],r=t[t.length-1];i=null!==(o=this.columnIndexMapper.getNearestNotHiddenIndex(i-1,-1))&&void 0!==o?o:0,r=null!==(s=this.columnIndexMapper.getNearestNotHiddenIndex(r+1,1))&&void 0!==s?s:this.countCols()-1,e.showColumns(t),this.render(),this.view.adjustElementsSize(!0);r-i+1===this.countCols()||this.selectColumns(i,r)},disabled:!1,hidden(){const o=(0,s.arrayMap)(e.getHiddenColumns(),(e=>this.toPhysicalColumn(e)));if(!this.selection.isSelectedByColumnHeader()&&!this.selection.isSelectedByCorner()||o.length<1)return!0;t.length=0;const i=this.getSelectedRangeLast(),r=i.getTopStartCorner().col,n=i.getBottomEndCorner().col,a=this.columnIndexMapper,l=a.getRenderableFromVisualIndex(r),h=a.getRenderableFromVisualIndex(n),u=a.getNotTrimmedIndexes(),d=[];if(r!==n){if(n-r+1>h-l+1){const e=u.slice(r,n+1);d.push(...e.filter((e=>o.includes(e))))}}else if(0===l&&l<r)d.push(...u.slice(0,r));else if(null===l)d.push(...u.slice(0,this.countCols()));else{const e=this.countCols()-1;h===a.getRenderableFromVisualIndex(a.getNearestNotHiddenIndex(e,-1))&&e>n&&d.push(...u.slice(n+1))}return(0,s.arrayEach)(d,(e=>{t.push(this.toVisualColumn(e))})),0===t.length}}},o(63517);var s=o(50095),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},80923:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(42538)),r=s(o(48427)),n=o(36026),a=o(83302),l=o(68145),h=o(50095),u=o(22232),d=o(93315),c=o(90500),g=s(o(56307)),f=s(o(81870)),p=s(o(89917)),m=o(33165);function w(e,t){v(e,t),t.add(e)}function C(e,t,o){v(e,t),t.set(e,o)}function v(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function y(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(52097),g.default.getSingleton().register("beforeHideColumns"),g.default.getSingleton().register("afterHideColumns"),g.default.getSingleton().register("beforeUnhideColumns"),g.default.getSingleton().register("afterUnhideColumns");const E=t.PLUGIN_KEY="hiddenColumns",S=t.PLUGIN_PRIORITY=310;var R=new WeakMap,b=new WeakMap,_=new WeakSet,T=new WeakSet,O=new WeakSet,M=new WeakSet,I=new WeakSet,A=new WeakSet;class N extends n.BasePlugin{constructor(){super(...arguments),w(this,A),w(this,I),w(this,M),w(this,O),w(this,T),w(this,_),C(this,R,{writable:!0,value:{}}),C(this,b,{writable:!0,value:null})}static get PLUGIN_KEY(){return E}static get PLUGIN_PRIORITY(){return S}isEnabled(){return!!this.hot.getSettings()[E]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[E];(0,u.isObject)(t)&&((0,r.default)(this,R,t),(0,d.isUndefined)(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),(0,r.default)(this,b,new m.HidingMap),(0,i.default)(this,b).addLocalHook("init",(()=>y(this,A,L).call(this))),this.hot.columnIndexMapper.registerMap(this.pluginName,(0,i.default)(this,b)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return y(e,I,D).call(e,...o)})),this.addHook("afterGetCellMeta",((e,t,o)=>y(this,T,x).call(this,e,t,o))),this.addHook("modifyColWidth",((e,t)=>y(this,_,P).call(this,e,t))),this.addHook("afterGetColHeader",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return y(e,M,k).call(e,...o)})),this.addHook("modifyCopyableRange",(e=>y(this,O,H).call(this,e))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),(0,r.default)(this,R,{}),super.disablePlugin(),this.resetCellsMeta()}showColumns(e){const t=this.getHiddenColumns(),o=this.isValidConfig(e);let s=t;const r=(0,i.default)(this,b).getValues().slice(),n=e.length>0;if(o&&n){const t=e.map((e=>this.hot.toPhysicalColumn(e)));(0,h.arrayEach)(t,(e=>{r[e]=!1})),s=(0,h.arrayReduce)(r,((e,t,o)=>(t&&e.push(this.hot.toVisualColumn(o)),e)),[])}!1!==this.hot.runHooks("beforeUnhideColumns",t,s,o&&n)&&(o&&n&&(0,i.default)(this,b).setValues(r),this.hot.view.adjustElementsSize(),this.hot.runHooks("afterUnhideColumns",t,s,o&&n,o&&s.length<t.length))}showColumn(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.showColumns(t)}hideColumns(e){const t=this.getHiddenColumns(),o=this.isValidConfig(e);let s=t;o&&(s=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeHideColumns",t,s,o)&&(o&&this.hot.batchExecution((()=>{(0,h.arrayEach)(e,(e=>{(0,i.default)(this,b).setValueAtIndex(this.hot.toPhysicalColumn(e),!0)}))}),!0),this.hot.runHooks("afterHideColumns",t,s,o,o&&s.length>t.length))}hideColumn(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.hideColumns(t)}getHiddenColumns(){return(0,h.arrayMap)((0,i.default)(this,b).getHiddenIndexes(),(e=>this.hot.toVisualColumn(e)))}isHidden(e){return(0,i.default)(this,b).getValueAtIndex(this.hot.toPhysicalColumn(e))||!1}isValidConfig(e){const t=this.hot.countCols();return!!(Array.isArray(e)&&e.length>0)&&e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}resetCellsMeta(){(0,h.arrayEach)(this.hot.getCellsMeta(),(e=>{e&&(e.skipColumnOnPaste=!1)}))}destroy(){(0,r.default)(this,R,null),(0,r.default)(this,b,null),super.destroy()}}function P(e,t){return this.isHidden(t)?0:(0,i.default)(this,R).indicators&&(this.isHidden(t+1)||this.isHidden(t-1))&&"number"==typeof e&&this.hot.hasColHeaders()?e+15:void 0}function x(e,t,o){if(!1===(0,i.default)(this,R).copyPasteEnabled&&this.isHidden(t)&&(o.skipColumnOnPaste=!0),this.isHidden(t-1))o.className=o.className||"",-1===o.className.indexOf("afterHiddenColumn")&&(o.className+=" afterHiddenColumn");else if(o.className){const e=o.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenColumn");t>-1&&e.splice(t,1),o.className=e.join(" ")}}}function H(e){if((0,i.default)(this,R).copyPasteEnabled)return e;const t=[],o=(e,o,s,i)=>{t.push({startRow:e,endRow:o,startCol:s,endCol:i})};return(0,h.arrayEach)(e,(e=>{let t=!0,s=0;(0,l.rangeEach)(e.startCol,e.endCol,(i=>{this.isHidden(i)?(t||o(e.startRow,e.endRow,s,i-1),t=!0):(t&&(s=i),i===e.endCol&&o(e.startRow,e.endRow,s,i),t=!1)}))})),t}function k(e,t){if(!(0,i.default)(this,R).indicators||e<0)return;const o=[];e>=1&&this.isHidden(e-1)&&o.push("afterHiddenColumn"),e<this.hot.countCols()-1&&this.isHidden(e+1)&&o.push("beforeHiddenColumn"),(0,a.addClass)(t,o)}function D(e){e.items.push({name:c.SEPARATOR},(0,f.default)(this),(0,p.default)(this))}function L(){Array.isArray((0,i.default)(this,R).columns)&&this.hideColumns((0,i.default)(this,R).columns)}t.HiddenColumns=N},16083:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(80923);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.HiddenColumns=s.HiddenColumns},71294:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"hidden_rows_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[o,,s]=e;o-s!=0&&(t=1)}return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_HIDE_ROW,t)},callback(){const{from:t,to:o}=this.getSelectedRangeLast(),s=Math.max(Math.min(t.row,o.row),0),i=Math.max(t.row,o.row),r=[];for(let e=s;e<=i;e+=1)r.push(e);e.hideRows(r);const n=r[r.length-1],a=this.rowIndexMapper.getNearestNotHiddenIndex(n,1,!0);Number.isInteger(a)&&a>=0?this.selectRows(a):this.deselectCell(),this.render(),this.view.adjustElementsSize(!0)},disabled:!1,hidden(){return!(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner())}}},o(63517);var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},70029:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){const t=[];return{key:"hidden_rows_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_SHOW_ROW,e)},callback(){var o,s;if(0===t.length)return;let i=t[0],r=t[t.length-1];i=null!==(o=this.rowIndexMapper.getNearestNotHiddenIndex(i-1,-1))&&void 0!==o?o:0,r=null!==(s=this.rowIndexMapper.getNearestNotHiddenIndex(r+1,1))&&void 0!==s?s:this.countRows()-1,e.showRows(t),this.render(),this.view.adjustElementsSize(!0);r-i+1===this.countRows()||this.selectRows(i,r)},disabled:!1,hidden(){const o=(0,s.arrayMap)(e.getHiddenRows(),(e=>this.toPhysicalRow(e)));if(!this.selection.isSelectedByRowHeader()&&!this.selection.isSelectedByCorner()||o.length<1)return!0;t.length=0;const i=this.getSelectedRangeLast(),r=i.getTopStartCorner().row,n=i.getBottomEndCorner().row,a=this.rowIndexMapper,l=a.getRenderableFromVisualIndex(r),h=a.getRenderableFromVisualIndex(n),u=a.getNotTrimmedIndexes(),d=[];if(r!==n){if(n-r+1>h-l+1){const e=u.slice(r,n+1);d.push(...e.filter((e=>o.includes(e))))}}else if(0===l&&l<r)d.push(...u.slice(0,r));else if(null===l)d.push(...u.slice(0,this.countRows()));else{const e=this.countRows()-1;h===a.getRenderableFromVisualIndex(a.getNearestNotHiddenIndex(e,-1))&&e>n&&d.push(...u.slice(n+1))}return(0,s.arrayEach)(d,(e=>{t.push(this.toVisualRow(e))})),0===t.length}}},o(63517);var s=o(50095),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=r(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=i?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(r=function(e){return e?o:t})(e)}},48894:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(42538)),r=s(o(48427)),n=o(36026),a=o(83302),l=o(68145),h=o(50095),u=o(22232),d=o(93315),c=o(90500),g=s(o(56307)),f=s(o(71294)),p=s(o(70029)),m=o(33165);function w(e,t){v(e,t),t.add(e)}function C(e,t,o){v(e,t),t.set(e,o)}function v(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function y(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(25972),g.default.getSingleton().register("beforeHideRows"),g.default.getSingleton().register("afterHideRows"),g.default.getSingleton().register("beforeUnhideRows"),g.default.getSingleton().register("afterUnhideRows");const E=t.PLUGIN_KEY="hiddenRows",S=t.PLUGIN_PRIORITY=320;var R=new WeakMap,b=new WeakMap,_=new WeakSet,T=new WeakSet,O=new WeakSet,M=new WeakSet,I=new WeakSet,A=new WeakSet;class N extends n.BasePlugin{constructor(){super(...arguments),w(this,A),w(this,I),w(this,M),w(this,O),w(this,T),w(this,_),C(this,R,{writable:!0,value:{}}),C(this,b,{writable:!0,value:null})}static get PLUGIN_KEY(){return E}static get PLUGIN_PRIORITY(){return S}isEnabled(){return!!this.hot.getSettings()[E]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[E];(0,u.isObject)(t)&&((0,r.default)(this,R,t),(0,d.isUndefined)(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),(0,r.default)(this,b,new m.HidingMap),(0,i.default)(this,b).addLocalHook("init",(()=>y(this,A,L).call(this))),this.hot.rowIndexMapper.registerMap(this.pluginName,(0,i.default)(this,b)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return y(e,I,D).call(e,...o)})),this.addHook("afterGetCellMeta",((e,t,o)=>y(this,T,x).call(this,e,t,o))),this.addHook("modifyRowHeight",((e,t)=>y(this,_,P).call(this,e,t))),this.addHook("afterGetRowHeader",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return y(e,M,k).call(e,...o)})),this.addHook("modifyCopyableRange",(e=>y(this,O,H).call(this,e))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap(this.pluginName),(0,r.default)(this,R,{}),super.disablePlugin(),this.resetCellsMeta()}showRows(e){const t=this.getHiddenRows(),o=this.isValidConfig(e);let s=t;const r=(0,i.default)(this,b).getValues().slice(),n=e.length>0;if(o&&n){const t=e.map((e=>this.hot.toPhysicalRow(e)));(0,h.arrayEach)(t,(e=>{r[e]=!1})),s=(0,h.arrayReduce)(r,((e,t,o)=>(t&&e.push(this.hot.toVisualRow(o)),e)),[])}!1!==this.hot.runHooks("beforeUnhideRows",t,s,o&&n)&&(o&&n&&(0,i.default)(this,b).setValues(r),this.hot.runHooks("afterUnhideRows",t,s,o&&n,o&&s.length<t.length))}showRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.showRows(t)}hideRows(e){const t=this.getHiddenRows(),o=this.isValidConfig(e);let s=t;o&&(s=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeHideRows",t,s,o)&&(o&&this.hot.batchExecution((()=>{(0,h.arrayEach)(e,(e=>{(0,i.default)(this,b).setValueAtIndex(this.hot.toPhysicalRow(e),!0)}))}),!0),this.hot.runHooks("afterHideRows",t,s,o,o&&s.length>t.length))}hideRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.hideRows(t)}getHiddenRows(){return(0,h.arrayMap)((0,i.default)(this,b).getHiddenIndexes(),(e=>this.hot.toVisualRow(e)))}isHidden(e){return(0,i.default)(this,b).getValueAtIndex(this.hot.toPhysicalRow(e))||!1}isValidConfig(e){const t=this.hot.countRows();return!!(Array.isArray(e)&&e.length>0)&&e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}resetCellsMeta(){(0,h.arrayEach)(this.hot.getCellsMeta(),(e=>{e&&(e.skipRowOnPaste=!1)}))}destroy(){(0,r.default)(this,R,null),(0,r.default)(this,b,null),super.destroy()}}function P(e,t){return this.isHidden(t)?0:e}function x(e,t,o){if(!1===(0,i.default)(this,R).copyPasteEnabled&&this.isHidden(e)&&(o.skipRowOnPaste=!0),this.isHidden(e-1))o.className=o.className||"",-1===o.className.indexOf("afterHiddenRow")&&(o.className+=" afterHiddenRow");else if(o.className){const e=o.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenRow");t>-1&&e.splice(t,1),o.className=e.join(" ")}}}function H(e){if((0,i.default)(this,R).copyPasteEnabled)return e;const t=[],o=(e,o,s,i)=>{t.push({startRow:e,endRow:o,startCol:s,endCol:i})};return(0,h.arrayEach)(e,(e=>{let t=!0,s=0;(0,l.rangeEach)(e.startRow,e.endRow,(i=>{this.isHidden(i)?(t||o(s,i-1,e.startCol,e.endCol),t=!0):(t&&(s=i),i===e.endRow&&o(s,i,e.startCol,e.endCol),t=!1)}))})),t}function k(e,t){if(!(0,i.default)(this,R).indicators||e<0)return;const o=[];e>=1&&this.isHidden(e-1)&&o.push("afterHiddenRow"),e<this.hot.countRows()-1&&this.isHidden(e+1)&&o.push("beforeHiddenRow"),(0,a.addClass)(t,o)}function D(e){e.items.push({name:c.SEPARATOR},(0,f.default)(this),(0,p.default)(this))}function L(){Array.isArray((0,i.default)(this,R).rows)&&this.hideRows((0,i.default)(this,R).rows)}t.HiddenRows=N},51124:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(48894);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.HiddenRows=s.HiddenRows},40106:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllPlugins=function(){(0,L.registerPlugin)(s.AutoColumnSize),(0,L.registerPlugin)(i.Autofill),(0,L.registerPlugin)(r.AutoRowSize),(0,L.registerPlugin)(a.BindRowsWithHeaders),(0,L.registerPlugin)(l.CollapsibleColumns),(0,L.registerPlugin)(h.ColumnSorting),(0,L.registerPlugin)(u.ColumnSummary),(0,L.registerPlugin)(d.Comments),(0,L.registerPlugin)(c.ContextMenu),(0,L.registerPlugin)(g.CopyPaste),(0,L.registerPlugin)(f.CustomBorders),(0,L.registerPlugin)(p.DragToScroll),(0,L.registerPlugin)(m.DropdownMenu),(0,L.registerPlugin)(w.ExportFile),(0,L.registerPlugin)(C.Filters),(0,L.registerPlugin)(v.Formulas),(0,L.registerPlugin)(y.HiddenColumns),(0,L.registerPlugin)(E.HiddenRows),(0,L.registerPlugin)(S.ManualColumnFreeze),(0,L.registerPlugin)(R.ManualColumnMove),(0,L.registerPlugin)(b.ManualColumnResize),(0,L.registerPlugin)(_.ManualRowMove),(0,L.registerPlugin)(T.ManualRowResize),(0,L.registerPlugin)(O.MergeCells),(0,L.registerPlugin)(M.MultiColumnSorting),(0,L.registerPlugin)(I.MultipleSelectionHandles),(0,L.registerPlugin)(A.NestedHeaders),(0,L.registerPlugin)(N.NestedRows),(0,L.registerPlugin)(P.PersistentState),(0,L.registerPlugin)(x.Search),(0,L.registerPlugin)(H.TouchScroll),(0,L.registerPlugin)(k.TrimRows),(0,L.registerPlugin)(D.UndoRedo)};var s=o(21215);t.AutoColumnSize=s.AutoColumnSize;var i=o(62080);t.Autofill=i.Autofill;var r=o(60687);t.AutoRowSize=r.AutoRowSize;var n=o(36026);t.BasePlugin=n.BasePlugin;var a=o(85939);t.BindRowsWithHeaders=a.BindRowsWithHeaders;var l=o(55994);t.CollapsibleColumns=l.CollapsibleColumns;var h=o(1902);t.ColumnSorting=h.ColumnSorting;var u=o(68918);t.ColumnSummary=u.ColumnSummary;var d=o(76076);t.Comments=d.Comments;var c=o(86738);t.ContextMenu=c.ContextMenu;var g=o(77708);t.CopyPaste=g.CopyPaste;var f=o(3455);t.CustomBorders=f.CustomBorders;var p=o(72919);t.DragToScroll=p.DragToScroll;var m=o(74123);t.DropdownMenu=m.DropdownMenu;var w=o(83281);t.ExportFile=w.ExportFile;var C=o(30905);t.Filters=C.Filters;var v=o(83264);t.Formulas=v.Formulas;var y=o(16083);t.HiddenColumns=y.HiddenColumns;var E=o(51124);t.HiddenRows=E.HiddenRows;var S=o(58125);t.ManualColumnFreeze=S.ManualColumnFreeze;var R=o(19640);t.ManualColumnMove=R.ManualColumnMove;var b=o(35350);t.ManualColumnResize=b.ManualColumnResize;var _=o(60734);t.ManualRowMove=_.ManualRowMove;var T=o(15702);t.ManualRowResize=T.ManualRowResize;var O=o(95896);t.MergeCells=O.MergeCells;var M=o(13620);t.MultiColumnSorting=M.MultiColumnSorting;var I=o(98481);t.MultipleSelectionHandles=I.MultipleSelectionHandles;var A=o(37499);t.NestedHeaders=A.NestedHeaders;var N=o(93363);t.NestedRows=N.NestedRows;var P=o(94870);t.PersistentState=P.PersistentState;var x=o(27885);t.Search=x.Search;var H=o(30450);t.TouchScroll=H.TouchScroll;var k=o(95128);t.TrimRows=k.TrimRows;var D=o(77137);t.UndoRedo=D.UndoRedo;var L=o(52036);t.registerPlugin=L.registerPlugin,t.getPlugin=L.getPlugin,t.getPluginsNames=L.getPluginsNames},64618:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"freeze_column",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_FREEZE_COLUMN)},callback(t,o){const[{start:{col:s}}]=o;e.freezeColumn(s),this.render(),this.view.adjustElementsSize(!0)},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col<=this.getSettings().fixedColumnsStart-1)&&(t=!0),t}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},76969:(e,t,o)=>{"use strict";t.__esModule=!0,t.default=function(e){return{key:"unfreeze_column",name(){return this.getTranslatedPhrase(s.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN)},callback(t,o){const[{start:{col:s}}]=o;e.unfreezeColumn(s),this.render(),this.view.adjustElementsSize(!0)},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col>=this.getSettings().fixedColumnsStart)&&(t=!0),t}}};var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(77516));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}},58125:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(75017);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnFreeze=s.ManualColumnFreeze},75017:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(42538)),r=s(o(48427)),n=o(36026),a=s(o(56307)),l=s(o(64618)),h=s(o(76969));function u(e,t){d(e,t),t.add(e)}function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function c(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(18633),a.default.getSingleton().register("beforeColumnFreeze"),a.default.getSingleton().register("afterColumnFreeze"),a.default.getSingleton().register("beforeColumnUnfreeze"),a.default.getSingleton().register("afterColumnUnfreeze");const g=t.PLUGIN_KEY="manualColumnFreeze",f=t.PLUGIN_PRIORITY=110;var p=new WeakMap,m=new WeakSet,w=new WeakSet;class C extends n.BasePlugin{constructor(){var e,t,o;super(...arguments),u(this,w),u(this,m),o={writable:!0,value:!1},d(e=this,t=p),t.set(e,o)}static get PLUGIN_KEY(){return g}static get PLUGIN_PRIORITY(){return f}isEnabled(){return!!this.hot.getSettings()[g]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>c(this,m,v).call(this,e))),this.addHook("beforeColumnMove",((e,t)=>c(this,w,y).call(this,e,t))),super.enablePlugin())}disablePlugin(){(0,r.default)(this,p,!1),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}freezeColumn(e){const t=this.hot.getSettings(),o=t.fixedColumnsStart<this.hot.countCols()&&e>t.fixedColumnsStart-1;(0,i.default)(this,p)||(0,r.default)(this,p,!0);!1!==this.hot.runHooks("beforeColumnFreeze",e,o)&&(o&&(this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsStart),t._fixedColumnsStart+=1),this.hot.runHooks("afterColumnFreeze",e,o))}unfreezeColumn(e){const t=this.hot.getSettings(),o=t.fixedColumnsStart>0&&e<=t.fixedColumnsStart-1;(0,i.default)(this,p)||(0,r.default)(this,p,!0);!1!==this.hot.runHooks("beforeColumnUnfreeze",e,o)&&(o&&(t._fixedColumnsStart-=1,this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsStart)),this.hot.runHooks("afterColumnUnfreeze",e,o))}}function v(e){e.items.push({name:"---------"},(0,l.default)(this),(0,h.default)(this))}function y(e,t){if((0,i.default)(this,p)){const o=this.hot.getSettings().fixedColumnsStart;if(t<o)return!1;if(e.some((e=>e<o)))return!1}}t.ManualColumnFreeze=C},19640:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(47507);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnMove=s.ManualColumnMove},47507:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(48427)),r=s(o(42538)),n=o(36026),a=s(o(56307)),l=o(50095),h=o(83302),u=o(24449),d=o(68145),c=s(o(53277)),g=s(o(4588));function f(e,t){m(e,t),t.add(e)}function p(e,t,o){m(e,t),t.set(e,o)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(36881),a.default.getSingleton().register("beforeColumnMove"),a.default.getSingleton().register("afterColumnMove");const C=t.PLUGIN_KEY="manualColumnMove",v=t.PLUGIN_PRIORITY=120,y="ht__manualColumnMove",E="show-ui",S="on-moving--columns",R="after-selection--columns";var b=new WeakMap,_=new WeakMap,T=new WeakMap,O=new WeakMap,M=new WeakMap,I=new WeakMap,A=new WeakMap,N=new WeakMap,P=new WeakMap,x=new WeakMap,H=new WeakMap,k=new WeakSet,D=new WeakSet,L=new WeakSet,W=new WeakSet,F=new WeakSet,V=new WeakSet;class B extends n.BasePlugin{constructor(){super(...arguments),f(this,V),f(this,F),f(this,W),f(this,L),f(this,D),f(this,k),p(this,b,{writable:!0,value:new c.default(this.hot)}),p(this,_,{writable:!0,value:new g.default(this.hot)}),p(this,T,{writable:!0,value:[]}),p(this,O,{writable:!0,value:0}),p(this,M,{writable:!0,value:!1}),p(this,I,{writable:!0,value:{}}),p(this,A,{writable:!0,value:void 0}),p(this,N,{writable:!0,value:void 0}),p(this,P,{writable:!0,value:void 0}),p(this,x,{writable:!0,value:void 0}),p(this,H,{writable:!0,value:void 0})}static get PLUGIN_KEY(){return C}static get PLUGIN_PRIORITY(){return v}isEnabled(){return!!this.hot.getSettings()[C]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return w(e,k,U).call(e,...o)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return w(e,L,j).call(e,...o)})),this.addHook("afterScrollVertically",(()=>w(this,F,z).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return w(e,V,K).call(e,...o)})),this.buildPluginUI(),this.registerEvents(),(0,h.addClass)(this.hot.rootElement,y),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,h.removeClass)(this.hot.rootElement,y),this.unregisterEvents(),(0,r.default)(this,b).destroy(),(0,r.default)(this,_).destroy(),super.disablePlugin()}moveColumn(e,t){return this.moveColumns([e],t)}moveColumns(e,t){const o=(0,r.default)(this,A),s=this.isMovePossible(e,t),n=this.hot.runHooks("beforeColumnMove",e,t,o,s);if((0,i.default)(this,A,void 0),!1===n)return;s&&this.hot.columnIndexMapper.moveIndexes(e,t);const a=s&&this.isColumnOrderChanged(e,t);return this.hot.runHooks("afterColumnMove",e,t,o,s,a),a}dragColumn(e,t){return this.dragColumns([e],t)}dragColumns(e,t){const o=this.countFinalIndex(e,t);return(0,i.default)(this,A,t),this.moveColumns(e,o)}isMovePossible(e,t){const o=this.hot.columnIndexMapper.getNotTrimmedIndexesLength(),s=e.length+t>o,i=t<0,r=e.some((e=>e<0)),n=e.some((e=>e>=o));return!(s||i||r||n)}isColumnOrderChanged(e,t){return e.some(((e,o)=>e-o!==t))}countFinalIndex(e,t){const o=(0,l.arrayReduce)(e,((e,o)=>(o<t&&(e+=1),e)),0);return t-o}getColumnsWidth(e,t){const o=this.hot.columnIndexMapper;let s=0;for(let i=e;i<=t;i+=1){const e=o.getRenderableFromVisualIndex(i);i<0?s+=this.hot.view._wt.wtViewport.getRowHeaderWidth()||0:null!==e&&(s+=this.hot.view._wt.wtTable.getStretchedColumnWidth(e)||0)}return s}moveBySettingsOrLoad(){const e=this.hot.getSettings()[C];if(Array.isArray(e))this.moveColumns(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveColumns(e,0)}}isFixedColumnsStart(e){return e<this.hot.getSettings().fixedColumnsStart}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualColumnMove",this.hot.columnIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualColumnMove",e),e.value?e.value:[]}prepareColumnsToMoving(e,t){const o=[];return(0,d.rangeEach)(e,t,(e=>{o.push(e)})),o}refreshPositions(){const e=this.hot.view.getFirstFullyVisibleColumn();this.isFixedColumnsStart((0,r.default)(this,N))&&e>0&&this.hot.scrollViewportTo({col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(e-1,-1)});const t=this.hot.view._wt.wtTable,o=this.hot.view._wt.wtOverlays.scrollableElement,s="number"==typeof o.scrollX?o.scrollX:o.scrollLeft;let i=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,(0,r.default)(this,N)-1);const n=t.hider.offsetWidth,a=t.TBODY.offsetLeft,l=(0,r.default)(this,b).getOffset().start,u=(0,r.default)(this,b).getSize().width;let d=0,c=0;if(this.hot.isRtl()){const e=this.hot.rootWindow,t=(0,h.outerWidth)(this.hot.rootElement),i=e.innerWidth-(0,r.default)(this,P)-t;c=e.innerWidth-(0,r.default)(this,I).eventPageX-i-(void 0===o.scrollX?s:0)}else c=(0,r.default)(this,I).eventPageX-((0,r.default)(this,P)-(void 0===o.scrollX?s:0));if((0,r.default)(this,x)&&(d=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsStart((0,r.default)(this,N))&&(i+=s),i+=d,(0,r.default)(this,N)<0)(0,r.default)(this,H)>0?(0,r.default)(this,I).col=0:(0,r.default)(this,I).col=e>0?e-1:e;else if((0,r.default)(this,I).TD.offsetWidth/2+i<=c){const e=(0,r.default)(this,N)>=(0,r.default)(this,O)?(0,r.default)(this,O)-1:(0,r.default)(this,N);(0,r.default)(this,I).col=e+1,i+=(0,r.default)(this,I).TD.offsetWidth}else(0,r.default)(this,I).col=(0,r.default)(this,N);let g=c,f=i;c+u+l>=n?g=n-u-l:c+l<a+d&&(g=a+d+Math.abs(l)),i>=n-1?f=n-1:0===f?f=1:void 0!==o.scrollX&&(0,r.default)(this,N)<(0,r.default)(this,H)&&(f-=(0,r.default)(this,P)<=o.scrollX?(0,r.default)(this,P):0),(0,r.default)(this,b).setPosition(null,g),(0,r.default)(this,_).setPosition(null,f)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>w(this,D,Y).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>w(this,W,G).call(this)))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){(0,r.default)(this,b).build(),(0,r.default)(this,_).build()}destroy(){(0,r.default)(this,b).destroy(),(0,r.default)(this,_).destroy(),super.destroy()}}function U(e,t,o,s){const n=this.hot.view._wt.wtTable,a=this.hot.selection.isSelectedByColumnHeader(),l=this.hot.getSelectedRangeLast(),d=(0,h.hasClass)(e.target,"sortAction");if(!l||!a||(0,r.default)(this,M)||0!==e.button||d)return(0,i.default)(this,M,!1),(0,r.default)(this,T).length=0,void(0,h.removeClass)(this.hot.rootElement,[S,E]);const c=(0,r.default)(this,_).isBuilt()&&!(0,r.default)(this,_).isAppended(),g=(0,r.default)(this,b).isBuilt()&&!(0,r.default)(this,b).isAppended();c&&g&&((0,r.default)(this,_).appendTo(n.hider),(0,r.default)(this,b).appendTo(n.hider));const{from:f,to:p}=l,m=Math.min(f.col,p.col),w=Math.max(f.col,p.col);if(t.row<0&&t.col>=m&&t.col<=w){s.column=!0,(0,i.default)(this,M,!0);const a=o.firstChild?(0,u.offsetRelativeTo)(e,o.firstChild).x:e.offsetX;(0,r.default)(this,I).eventPageX=e.pageX,(0,i.default)(this,N,t.col),(0,r.default)(this,I).TD=o,(0,r.default)(this,I).col=t.col,(0,i.default)(this,T,this.prepareColumnsToMoving(m,w)),(0,i.default)(this,x,!!this.hot.getSettings().rowHeaders),(0,i.default)(this,O,this.hot.countCols()),(0,i.default)(this,H,this.hot.getSettings().fixedColumnsStart),(0,i.default)(this,P,(0,h.offset)(this.hot.rootElement).left);const l=(0,r.default)(this,x)?-1:0,d=n.holder.scrollTop+n.getColumnHeaderHeight(0)+1,c=t.col<(0,r.default)(this,H),g=this.hot.view._wt.wtOverlays.inlineStartOverlay.getOverlayOffset(),f=Math.abs(a-(this.hot.isRtl()?o.offsetWidth:0)),p=this.getColumnsWidth(m,t.col-1)+f,C=this.getColumnsWidth(l,m-1)+(c?g:0)+p;(0,r.default)(this,b).setPosition(d,C),(0,r.default)(this,b).setSize(this.getColumnsWidth(m,w),n.hider.offsetHeight-d),(0,r.default)(this,b).setOffset(null,-p),(0,h.addClass)(this.hot.rootElement,S)}else(0,h.removeClass)(this.hot.rootElement,R),(0,i.default)(this,M,!1),(0,r.default)(this,T).length=0}function Y(e){(0,r.default)(this,M)&&((0,r.default)(this,I).eventPageX=e.pageX,this.refreshPositions())}function j(e,t,o,s){this.hot.getSelectedRangeLast()&&(0,r.default)(this,M)&&((0,r.default)(this,T).indexOf(t.col)>-1?(0,h.removeClass)(this.hot.rootElement,E):(0,h.addClass)(this.hot.rootElement,E),s.row=!0,s.column=!0,s.cell=!0,(0,i.default)(this,N,t.col),(0,r.default)(this,I).TD=o)}function G(){const e=(0,r.default)(this,I).col,t=(0,r.default)(this,T).length;if((0,i.default)(this,N,void 0),(0,i.default)(this,M,!1),(0,h.removeClass)(this.hot.rootElement,[S,E,R]),this.hot.selection.isSelectedByColumnHeader()&&(0,h.addClass)(this.hot.rootElement,R),t<1||void 0===e)return;const o=(0,r.default)(this,T)[0],s=this.hot.toPhysicalColumn(o),n=this.dragColumns((0,r.default)(this,T),e);if((0,r.default)(this,T).length=0,!0===n){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize(!0);const e=this.hot.toVisualColumn(s),o=e+t-1;this.hot.selectColumns(e,o)}}function z(){const e=this.hot.view._wt.wtTable,t=e.getColumnHeaderHeight(0)+1+e.holder.scrollTop;(0,r.default)(this,b).setPosition(t),(0,r.default)(this,b).setSize(null,e.hider.offsetHeight-t)}function K(){this.moveBySettingsOrLoad()}t.ManualColumnMove=B},50715:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(68145),n=o(18609);const a="px";t.default=class{constructor(e){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"_element",null),(0,i.default)(this,"state",0),(0,i.default)(this,"inlineProperty",void 0),this.hot=e,this.inlineProperty=e.isRtl()?"right":"left"}appendTo(e){e.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(e,t){(0,r.isNumeric)(e)&&(this._element.style.top=e+a),(0,r.isNumeric)(t)&&(this._element.style[this.inlineProperty]=t+a)}getPosition(){const e=this._element.style;return{top:e.top?parseInt(e.top,10):0,start:e[this.inlineProperty]?parseInt(e[this.inlineProperty],10):0}}setSize(e,t){(0,r.isNumeric)(e)&&(this._element.style.width=e+a),(0,r.isNumeric)(t)&&(this._element.style.height=t+a)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){(0,r.isNumeric)(e)&&(this._element.style.marginTop=e+a),(0,r.isNumeric)(t)&&(this._element.style[`margin${(0,n.toUpperCaseFirst)(this.inlineProperty)}`]=t+a)}getOffset(){const e=this._element.style,t=`margin${(0,n.toUpperCaseFirst)(this.inlineProperty)}`;return{top:e.marginTop?parseInt(e.marginTop,10):0,start:e[t]?parseInt(e[t],10):0}}}},53277:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(50715)),r=o(83302);class n extends i.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualColumnMove--backlight")}}t.default=n},4588:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(50715)),r=o(83302);class n extends i.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualColumnMove--guideline")}}t.default=n},35350:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(35426);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualColumnResize=s.ManualColumnResize},35426:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(48427)),r=s(o(42538)),n=o(36026),a=o(83302),l=o(50095),h=o(68145),u=o(33165);function d(e,t){g(e,t),t.add(e)}function c(e,t,o){g(e,t),t.set(e,o)}function g(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function f(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const p=t.PLUGIN_KEY="manualColumnResize",m=t.PLUGIN_PRIORITY=130,w="manualColumnWidths";var C=new WeakMap,v=new WeakMap,y=new WeakMap,E=new WeakMap,S=new WeakMap,R=new WeakMap,b=new WeakMap,_=new WeakMap,T=new WeakMap,O=new WeakMap,M=new WeakMap,I=new WeakMap,A=new WeakMap,N=new WeakMap,P=new WeakMap,x=new WeakMap,H=new WeakSet,k=new WeakSet,D=new WeakSet,L=new WeakSet,W=new WeakSet,F=new WeakSet,V=new WeakSet,B=new WeakSet,U=new WeakSet;class Y extends n.BasePlugin{static get PLUGIN_KEY(){return p}static get PLUGIN_PRIORITY(){return m}constructor(e){super(e),d(this,U),d(this,B),d(this,V),d(this,F),d(this,W),d(this,L),d(this,D),d(this,k),d(this,H),c(this,C,{writable:!0,value:null}),c(this,v,{writable:!0,value:null}),c(this,y,{writable:!0,value:[]}),c(this,E,{writable:!0,value:null}),c(this,S,{writable:!0,value:null}),c(this,R,{writable:!0,value:null}),c(this,b,{writable:!0,value:null}),c(this,_,{writable:!0,value:null}),c(this,T,{writable:!0,value:this.hot.rootDocument.createElement("DIV")}),c(this,O,{writable:!0,value:this.hot.rootDocument.createElement("DIV")}),c(this,M,{writable:!0,value:null}),c(this,I,{writable:!0,value:!1}),c(this,A,{writable:!0,value:0}),c(this,N,{writable:!0,value:null}),c(this,P,{writable:!0,value:void 0}),c(this,x,{writable:!0,value:void 0}),(0,a.addClass)((0,r.default)(this,T),"manualColumnResizer"),(0,a.addClass)((0,r.default)(this,O),"manualColumnResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[p]}enablePlugin(){this.enabled||((0,i.default)(this,P,new u.PhysicalIndexToValueMap),(0,r.default)(this,P).addLocalHook("init",(()=>f(this,H,j).call(this))),this.hot.columnIndexMapper.registerMap(this.pluginName,(0,r.default)(this,P)),this.addHook("modifyColWidth",((e,t)=>f(this,V,q).call(this,e,t))),this.addHook("beforeStretchingColumnWidth",((e,t)=>f(this,B,Q).call(this,e,t))),this.addHook("beforeColumnResize",((e,t,o)=>f(this,U,J).call(this,e,t,o))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){(0,i.default)(this,x,(0,r.default)(this,P).getValues()),this.hot.columnIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualColumnWidths(){this.hot.runHooks("persistentStateSave",w,(0,r.default)(this,P).getValues())}loadManualColumnWidths(){const e={};return this.hot.runHooks("persistentStateLoad",w,e),e.value}setManualSize(e,t){const o=Math.max(t,20),s=this.hot.toPhysicalColumn(e);return(0,r.default)(this,P).setValueAtIndex(s,o),o}clearManualSize(e){const t=this.hot.toPhysicalColumn(e);(0,r.default)(this,P).setValueAtIndex(t,null)}setupHandlePosition(e){if(!e.parentNode)return;(0,i.default)(this,C,e);const{_wt:t}=this.hot.view,o=t.wtTable.getCoords((0,r.default)(this,C)),s=o.col;if(s<0)return;const n=(0,a.outerHeight)((0,r.default)(this,C)),u=(0,r.default)(this,C).getBoundingClientRect();let d;s<t.getSetting("fixedColumnsStart")&&(d=t.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition((0,r.default)(this,C),o.row,o.col)),d||(d=t.wtOverlays.topOverlay.getRelativeCellPosition((0,r.default)(this,C),o.row,o.col)),(0,i.default)(this,v,this.hot.columnIndexMapper.getVisualFromRenderableIndex(s)),(0,i.default)(this,y,[]);const c=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByColumnHeader();if(this.hot.selection.isSelected()&&c){const e=this.hot.getSelectedRange();(0,l.arrayEach)(e,(e=>{const t=e.getTopStartCorner().col,o=e.getBottomEndCorner().col;(0,h.rangeEach)(t,o,(e=>{(0,r.default)(this,y).includes(e)||(0,r.default)(this,y).push(e)}))}))}(0,r.default)(this,y).includes((0,r.default)(this,v))||(0,i.default)(this,y,[(0,r.default)(this,v)]),(0,i.default)(this,_,d.start-6),(0,i.default)(this,b,parseInt(u.width,10)),(0,r.default)(this,T).style.top=`${d.top}px`,(0,r.default)(this,T).style[this.inlineDir]=`${(0,r.default)(this,_)+(0,r.default)(this,b)}px`,(0,r.default)(this,T).style.height=`${n}px`,this.hot.rootElement.appendChild((0,r.default)(this,T))}refreshHandlePosition(){(0,r.default)(this,T).style[this.inlineDir]=`${(0,r.default)(this,_)+(0,r.default)(this,E)}px`}setupGuidePosition(){const e=parseInt((0,a.outerHeight)((0,r.default)(this,T)),10),t=parseInt((0,r.default)(this,T).style.top,10)+e,o=parseInt(this.hot.view.maximumVisibleElementHeight(0),10);(0,a.addClass)((0,r.default)(this,T),"active"),(0,a.addClass)((0,r.default)(this,O),"active"),(0,r.default)(this,O).style.top=`${t}px`,this.refreshGuidePosition(),(0,r.default)(this,O).style.height=o-e+"px",this.hot.rootElement.appendChild((0,r.default)(this,O))}refreshGuidePosition(){(0,r.default)(this,O).style[this.inlineDir]=(0,r.default)(this,T).style[this.inlineDir]}hideHandleAndGuide(){(0,a.removeClass)((0,r.default)(this,T),"active"),(0,a.removeClass)((0,r.default)(this,O),"active")}checkIfColumnHeader(e){const t=(0,a.closest)(e,["THEAD"],this.hot.rootElement),{topOverlay:o,topInlineStartCornerOverlay:s}=this.hot.view._wt.wtOverlays;return[o.clone.wtTable.THEAD,s.clone.wtTable.THEAD].includes(t)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{const s=this.hot.runHooks("beforeColumnResize",(0,r.default)(this,S),t,!0);void 0!==s&&(0,i.default)(this,S,s),"all"===this.hot.getSettings().stretchH?this.clearManualSize(t):this.setManualSize(t,(0,r.default)(this,S)),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",(0,r.default)(this,S),t,!0),o&&e()};if((0,r.default)(this,A)>=2){(0,r.default)(this,y).length>1?((0,l.arrayEach)((0,r.default)(this,y),(e=>{t(e)})),e()):(0,l.arrayEach)((0,r.default)(this,y),(e=>{t(e,!0)}))}(0,i.default)(this,A,0),(0,i.default)(this,N,null)}bindEvents(){const{rootWindow:e,rootElement:t}=this.hot;this.eventManager.addEventListener(t,"mouseover",(e=>f(this,k,G).call(this,e))),this.eventManager.addEventListener(t,"mousedown",(e=>f(this,D,z).call(this,e))),this.eventManager.addEventListener(e,"mousemove",(e=>f(this,L,K).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>f(this,W,$).call(this))),this.eventManager.addEventListener((0,r.default)(this,T),"contextmenu",(()=>f(this,F,X).call(this)))}destroy(){super.destroy()}}function j(){const e=this.hot.getSettings()[p],t=this.loadManualColumnWidths();void 0!==t?this.hot.batchExecution((()=>{t.forEach(((e,t)=>{(0,r.default)(this,P).setValueAtIndex(t,e)}))}),!0):Array.isArray(e)?(this.hot.batchExecution((()=>{e.forEach(((e,t)=>{(0,r.default)(this,P).setValueAtIndex(t,e)}))}),!0),(0,i.default)(this,x,e)):!0===e&&Array.isArray((0,r.default)(this,x))&&this.hot.batchExecution((()=>{(0,r.default)(this,x).forEach(((e,t)=>{(0,r.default)(this,P).setValueAtIndex(t,e)}))}),!0)}function G(e){if(!(0,a.isDetached)(e.target)&&!0!==(0,r.default)(this,I)&&this.checkIfColumnHeader(e.target)){const t=this.getClosestTHParent(e.target);if(!t)return;const o=t.getAttribute("colspan");!t||null!==o&&"1"!==o||(0,r.default)(this,M)||this.setupHandlePosition(t)}}function z(e){(0,a.hasClass)(e.target,"manualColumnResizer")&&(this.setupHandlePosition((0,r.default)(this,C)),this.setupGuidePosition(),(0,i.default)(this,M,!0),null===(0,r.default)(this,N)&&((0,i.default)(this,N,setTimeout((()=>this.afterMouseDownTimeout()),500)),this.hot._registerTimeout((0,r.default)(this,N))),(0,i.default)(this,A,(0,r.default)(this,A)+1),this.startX=e.pageX,(0,i.default)(this,S,(0,r.default)(this,b)))}function K(e){if((0,r.default)(this,M)){const t=(e.pageX-this.startX)*this.hot.getDirectionFactor();(0,i.default)(this,E,(0,r.default)(this,b)+t),(0,l.arrayEach)((0,r.default)(this,y),(e=>{(0,i.default)(this,S,this.setManualSize(e,(0,r.default)(this,E)))})),this.refreshHandlePosition(),this.refreshGuidePosition()}}function $(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{this.hot.runHooks("beforeColumnResize",(0,r.default)(this,S),t,!1),o&&e(),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",(0,r.default)(this,S),t,!1)};if((0,r.default)(this,M)){if(this.hideHandleAndGuide(),(0,i.default)(this,M,!1),(0,r.default)(this,S)!==(0,r.default)(this,b)){(0,r.default)(this,y).length>1?((0,l.arrayEach)((0,r.default)(this,y),(e=>{t(e)})),e()):(0,l.arrayEach)((0,r.default)(this,y),(e=>{t(e,!0)}))}this.setupHandlePosition((0,r.default)(this,C))}}function X(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild((0,r.default)(this,T)),this.hot.rootElement.removeChild((0,r.default)(this,O)),(0,i.default)(this,M,!1),(0,i.default)(this,I,!0),this.hot._registerImmediate((()=>{(0,i.default)(this,I,!1)}))}function q(e,t){let o=e;if(this.enabled){const e=this.hot.toPhysicalColumn(t),s=(0,r.default)(this,P).getValueAtIndex(e);this.hot.getSettings()[p]&&s&&(o=s)}return o}function Q(e,t){let o=(0,r.default)(this,P).getValueAtIndex(t);return null===o&&(o=e),o}function J(){this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}t.ManualColumnResize=Y},60734:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(52030);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualRowMove=s.ManualRowMove},52030:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(48427)),r=s(o(42538)),n=o(36026),a=s(o(56307)),l=o(50095),h=o(83302),u=o(68145),d=s(o(81005)),c=s(o(67648));function g(e,t){p(e,t),t.add(e)}function f(e,t,o){p(e,t),t.set(e,o)}function p(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function m(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(83988),a.default.getSingleton().register("beforeRowMove"),a.default.getSingleton().register("afterRowMove");const w=t.PLUGIN_KEY="manualRowMove",C=t.PLUGIN_PRIORITY=140,v="ht__manualRowMove",y="show-ui",E="on-moving--rows",S="after-selection--rows";var R=new WeakMap,b=new WeakMap,_=new WeakMap,T=new WeakMap,O=new WeakMap,M=new WeakMap,I=new WeakSet,A=new WeakSet,N=new WeakSet,P=new WeakSet,x=new WeakSet,H=new WeakSet;class k extends n.BasePlugin{constructor(){super(...arguments),g(this,H),g(this,x),g(this,P),g(this,N),g(this,A),g(this,I),f(this,R,{writable:!0,value:new d.default(this.hot)}),f(this,b,{writable:!0,value:new c.default(this.hot)}),f(this,_,{writable:!0,value:[]}),f(this,T,{writable:!0,value:void 0}),f(this,O,{writable:!0,value:{}}),f(this,M,{writable:!0,value:void 0})}static get PLUGIN_KEY(){return w}static get PLUGIN_PRIORITY(){return C}isEnabled(){return!!this.hot.getSettings()[w]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return m(e,I,D).call(e,...o)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return m(e,N,W).call(e,...o)})),this.addHook("afterScrollHorizontally",(()=>m(this,x,V).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return m(e,H,B).call(e,...o)})),this.buildPluginUI(),this.registerEvents(),(0,h.addClass)(this.hot.rootElement,v),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,h.removeClass)(this.hot.rootElement,v),this.unregisterEvents(),(0,r.default)(this,R).destroy(),(0,r.default)(this,b).destroy(),super.disablePlugin()}moveRow(e,t){return this.moveRows([e],t)}moveRows(e,t){const o=(0,r.default)(this,M),s=this.isMovePossible(e,t),n=this.hot.runHooks("beforeRowMove",e,t,o,s);if((0,i.default)(this,M,void 0),!1===n)return;s&&this.hot.rowIndexMapper.moveIndexes(e,t);const a=s&&this.isRowOrderChanged(e,t);return this.hot.runHooks("afterRowMove",e,t,o,s,a),a}dragRow(e,t){return this.dragRows([e],t)}dragRows(e,t){const o=this.countFinalIndex(e,t);return(0,i.default)(this,M,t),this.moveRows(e,o)}isMovePossible(e,t){const o=this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),s=e.length+t>o,i=t<0,r=e.some((e=>e<0)),n=e.some((e=>e>=o));return!(s||i||r||n)}isRowOrderChanged(e,t){return e.some(((e,o)=>e-o!==t))}countFinalIndex(e,t){const o=(0,l.arrayReduce)(e,((e,o)=>(o<t&&(e+=1),e)),0);return t-o}getRowsHeight(e,t){const o=this.hot.rowIndexMapper;let s=0;for(let i=e;i<=t;i++){const e=o.getRenderableFromVisualIndex(i);null!==e&&(s+=this.hot.view._wt.wtTable.getRowHeight(e)||23)}return s}moveBySettingsOrLoad(){const e=this.hot.getSettings()[w];if(Array.isArray(e))this.moveRows(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveRows(e,0)}}isFixedRowTop(e){return e<this.hot.getSettings().fixedRowsTop}isFixedRowBottom(e){return e>this.hot.countRows()-1-this.hot.getSettings().fixedRowsBottom}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualRowMove",this.hot.rowIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualRowMove",e),e.value?e.value:[]}prepareRowsToMoving(){const e=this.hot.getSelectedRangeLast(),t=[];if(!e)return t;const{from:o,to:s}=e,i=Math.min(o.row,s.row),r=Math.max(o.row,s.row);return(0,u.rangeEach)(i,r,(e=>{t.push(e)})),t}refreshPositions(){const e=(0,r.default)(this,O).coords,t=this.hot.view.getFirstFullyVisibleRow(),o=this.hot.view.getLastFullyVisibleRow(),s=this.hot.countRows();this.isFixedRowTop(e.row)&&t>0&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(t-1,-1)),this.isFixedRowBottom(e.row)&&o<s&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(o+1,1),void 0,!0);const i=this.hot.view._wt.wtTable,n=(0,r.default)(this,O).TD,a=this.hot.rootElement,l=(0,h.offset)(a),u=(0,h.getTrimmingContainer)(a),d=i.holder.scrollTop,c=this.hot.rootWindow!==u?u.scrollTop:0,g=l.top-c,f=(0,r.default)(this,O).eventPageY-g+d,p=i.hider.offsetHeight,m=i.TBODY.offsetTop,w=(0,r.default)(this,R).getOffset().top,C=(0,r.default)(this,R).getSize().height,v=n.offsetHeight/2,y=n.offsetHeight;let E=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,e.row-1);const S=f>=E+v;this.isFixedRowTop(e.row)&&(E+=this.hot.view._wt.wtOverlays.topOverlay.getOverlayOffset()),e.row<0?(0,r.default)(this,O).row=t>0?t-1:t:S?((0,r.default)(this,O).row=e.row+1,E+=0===e.row?y-1:y):(0,r.default)(this,O).row=e.row;let _=f,T=E;f+C+w>=p?_=p-C-w:f+w<m&&(_=m+Math.abs(w)),E>=p-1&&(T=p-1),(0,r.default)(this,R).setPosition(_),(0,r.default)(this,b).setPosition(T)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>m(this,A,L).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>m(this,P,F).call(this)))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){(0,r.default)(this,R).build(),(0,r.default)(this,b).build()}destroy(){(0,r.default)(this,R).destroy(),(0,r.default)(this,b).destroy(),super.destroy()}}function D(e,t,o,s){const{wtTable:n,wtViewport:a}=this.hot.view._wt,l=this.hot.selection.isSelectedByRowHeader(),u=this.hot.getSelectedRangeLast();if(!u||!l||(0,r.default)(this,T)||0!==e.button)return(0,i.default)(this,T,!1),(0,r.default)(this,_).length=0,void(0,h.removeClass)(this.hot.rootElement,[E,y]);const d=(0,r.default)(this,b).isBuilt()&&!(0,r.default)(this,b).isAppended(),c=(0,r.default)(this,R).isBuilt()&&!(0,r.default)(this,R).isAppended();d&&c&&((0,r.default)(this,b).appendTo(n.hider),(0,r.default)(this,R).appendTo(n.hider));const{from:g,to:f}=u,p=Math.min(g.row,f.row),m=Math.max(g.row,f.row);if(t.col<0&&t.row>=p&&t.row<=m){s.row=!0,(0,i.default)(this,T,!0),(0,r.default)(this,O).eventPageY=e.pageY,(0,r.default)(this,O).coords=t,(0,r.default)(this,O).TD=o,(0,i.default)(this,_,this.prepareRowsToMoving());const l=n.holder.scrollLeft+a.getRowHeaderWidth(),u=this.getRowsHeight(p,t.row-1)+e.offsetY;(0,r.default)(this,R).setPosition(null,l),(0,r.default)(this,R).setSize(n.hider.offsetWidth-l,this.getRowsHeight(p,m)),(0,r.default)(this,R).setOffset(-u,null),(0,h.addClass)(this.hot.rootElement,E),this.refreshPositions()}else(0,h.removeClass)(this.hot.rootElement,S),(0,i.default)(this,T,!1),(0,r.default)(this,_).length=0}function L(e){(0,r.default)(this,T)&&((0,r.default)(this,O).eventPageY=e.pageY,this.refreshPositions())}function W(e,t,o,s){this.hot.getSelectedRangeLast()&&(0,r.default)(this,T)&&((0,r.default)(this,_).indexOf(t.row)>-1?(0,h.removeClass)(this.hot.rootElement,y):(0,h.addClass)(this.hot.rootElement,y),s.row=!0,s.column=!0,s.cell=!0,(0,r.default)(this,O).coords=t,(0,r.default)(this,O).TD=o)}function F(){const e=(0,r.default)(this,O).row,t=(0,r.default)(this,_).length;if((0,i.default)(this,T,!1),(0,h.removeClass)(this.hot.rootElement,[E,y,S]),this.hot.selection.isSelectedByRowHeader()&&(0,h.addClass)(this.hot.rootElement,S),t<1||void 0===e)return;const o=(0,r.default)(this,_)[0],s=this.hot.toPhysicalRow(o),n=this.dragRows((0,r.default)(this,_),e);if((0,r.default)(this,_).length=0,!0===n){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize(!0);const e=this.hot.toVisualRow(s),o=e+t-1;this.hot.selectRows(e,o)}}function V(){const e=this.hot.view._wt.wtTable,t=this.hot.view._wt.wtViewport.getRowHeaderWidth()+e.holder.scrollLeft;(0,r.default)(this,R).setPosition(null,t),(0,r.default)(this,R).setSize(e.hider.offsetWidth-t)}function B(){this.moveBySettingsOrLoad()}t.ManualRowMove=k},32715:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231));const r="px";t.default=class{constructor(e){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"_element",null),(0,i.default)(this,"state",0),this.hot=e}appendTo(e){e.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(e,t){void 0!==e&&(this._element.style.top=e+r),void 0!==t&&(this._element.style.left=t+r)}getPosition(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}}setSize(e,t){e&&(this._element.style.width=e+r),t&&(this._element.style.height=t+r)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){e&&(this._element.style.marginTop=e+r),t&&(this._element.style.marginLeft=t+r)}getOffset(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}}},81005:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(32715)),r=o(83302);class n extends i.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualRowMove--backlight")}}t.default=n},67648:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(32715)),r=o(83302);class n extends i.default{build(){super.build(),(0,r.addClass)(this._element,"ht__manualRowMove--guideline")}}t.default=n},15702:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(13524);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.ManualRowResize=s.ManualRowResize},13524:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(48427)),r=s(o(42538)),n=o(36026),a=o(83302),l=o(50095),h=o(68145),u=o(33165),d=o(21280);function c(e,t){f(e,t),t.add(e)}function g(e,t,o){f(e,t),t.set(e,o)}function f(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function p(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const m=t.PLUGIN_KEY="manualRowResize",w=t.PLUGIN_PRIORITY=30,C="manualRowHeights";var v=new WeakMap,y=new WeakMap,E=new WeakMap,S=new WeakMap,R=new WeakMap,b=new WeakMap,_=new WeakMap,T=new WeakMap,O=new WeakMap,M=new WeakMap,I=new WeakMap,A=new WeakMap,N=new WeakMap,P=new WeakMap,x=new WeakMap,H=new WeakMap,k=new WeakSet,D=new WeakSet,L=new WeakSet,W=new WeakSet,F=new WeakSet,V=new WeakSet,B=new WeakSet;class U extends n.BasePlugin{static get PLUGIN_KEY(){return m}static get PLUGIN_PRIORITY(){return w}constructor(e){super(e),c(this,B),c(this,V),c(this,F),c(this,W),c(this,L),c(this,D),c(this,k),g(this,v,{writable:!0,value:null}),g(this,y,{writable:!0,value:null}),g(this,E,{writable:!0,value:[]}),g(this,S,{writable:!0,value:null}),g(this,R,{writable:!0,value:null}),g(this,b,{writable:!0,value:null}),g(this,_,{writable:!0,value:null}),g(this,T,{writable:!0,value:null}),g(this,O,{writable:!0,value:this.hot.rootDocument.createElement("DIV")}),g(this,M,{writable:!0,value:this.hot.rootDocument.createElement("DIV")}),g(this,I,{writable:!0,value:!1}),g(this,A,{writable:!0,value:!1}),g(this,N,{writable:!0,value:0}),g(this,P,{writable:!0,value:null}),g(this,x,{writable:!0,value:void 0}),g(this,H,{writable:!0,value:void 0}),(0,a.addClass)((0,r.default)(this,O),"manualRowResizer"),(0,a.addClass)((0,r.default)(this,M),"manualRowResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[m]}enablePlugin(){this.enabled||((0,i.default)(this,x,new u.PhysicalIndexToValueMap),(0,r.default)(this,x).addLocalHook("init",(()=>p(this,B,X).call(this))),this.hot.rowIndexMapper.registerMap(this.pluginName,(0,r.default)(this,x)),this.addHook("modifyRowHeight",((e,t)=>p(this,V,$).call(this,e,t))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){(0,i.default)(this,H,(0,r.default)(this,x).getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualRowHeights(){this.hot.runHooks("persistentStateSave",C,(0,r.default)(this,x).getValues())}loadManualRowHeights(){const e={};return this.hot.runHooks("persistentStateLoad",C,e),e.value}setManualSize(e,t){const o=this.hot.toPhysicalRow(e),s=Math.max(t,d.ViewportRowsCalculator.DEFAULT_HEIGHT);return(0,r.default)(this,x).setValueAtIndex(o,s),s}setupHandlePosition(e){(0,i.default)(this,v,e);const{view:t}=this.hot,{_wt:o}=t,s=o.wtTable.getCoords((0,r.default)(this,v)),n=s.row;if(n<0)return;const u=(0,a.outerWidth)((0,r.default)(this,v)),d=(0,r.default)(this,v).getBoundingClientRect(),c=n<o.getSetting("fixedRowsTop"),g=n>=t.countNotHiddenRowIndexes(0,1)-o.getSetting("fixedRowsBottom");let f;c?f=o.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition((0,r.default)(this,v),s.row,s.col):g&&(f=o.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition((0,r.default)(this,v),s.row,s.col)),f||(f=o.wtOverlays.inlineStartOverlay.getRelativeCellPosition((0,r.default)(this,v),s.row,s.col)),(0,i.default)(this,y,this.hot.rowIndexMapper.getVisualFromRenderableIndex(n)),(0,i.default)(this,E,[]);const p=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();if(this.hot.selection.isSelected()&&p){const e=this.hot.getSelectedRange();(0,l.arrayEach)(e,(e=>{const t=e.getTopStartCorner().row,o=e.getBottomStartCorner().row;(0,h.rangeEach)(t,o,(e=>{(0,r.default)(this,E).includes(e)||(0,r.default)(this,E).push(e)}))}))}(0,r.default)(this,E).includes((0,r.default)(this,y))||(0,i.default)(this,E,[(0,r.default)(this,y)]),(0,i.default)(this,T,f.top-6),(0,i.default)(this,_,parseInt(d.height,10)),(0,r.default)(this,O).style.top=`${(0,r.default)(this,T)+(0,r.default)(this,_)}px`,(0,r.default)(this,O).style[this.inlineDir]=`${f.start}px`,(0,r.default)(this,O).style.width=`${u}px`,this.hot.rootElement.appendChild((0,r.default)(this,O))}refreshHandlePosition(){(0,r.default)(this,O).style.top=`${(0,r.default)(this,T)+(0,r.default)(this,S)}px`}setupGuidePosition(){const e=parseInt((0,a.outerWidth)((0,r.default)(this,O)),10),t=parseInt((0,r.default)(this,O).style[this.inlineDir],10)+e,o=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);(0,a.addClass)((0,r.default)(this,O),"active"),(0,a.addClass)((0,r.default)(this,M),"active"),(0,r.default)(this,M).style.top=(0,r.default)(this,O).style.top,(0,r.default)(this,M).style[this.inlineDir]=`${t}px`,(0,r.default)(this,M).style.width=o-e+"px",this.hot.rootElement.appendChild((0,r.default)(this,M))}refreshGuidePosition(){(0,r.default)(this,M).style.top=(0,r.default)(this,O).style.top}hideHandleAndGuide(){(0,a.removeClass)((0,r.default)(this,O),"active"),(0,a.removeClass)((0,r.default)(this,M),"active")}checkIfRowHeader(e){const t=(0,a.closest)(e,["TBODY"],this.hot.rootElement),{inlineStartOverlay:o,topInlineStartCornerOverlay:s,bottomInlineStartCornerOverlay:i}=this.hot.view._wt.wtOverlays;return[o.clone.wtTable.TBODY,s.clone.wtTable.TBODY,i.clone.wtTable.TBODY].includes(t)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}getActualRowHeight(e){const t=this.hot.view._wt.wtTable.getRowHeight(e);return void 0!==t&&(0,r.default)(this,R)<t?t:(0,r.default)(this,R)}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{const s=this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!0);void 0!==s&&(0,i.default)(this,R,s),this.setManualSize(t,(0,r.default)(this,R)),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!0),o&&e()};if((0,r.default)(this,N)>=2){(0,r.default)(this,E).length>1?((0,l.arrayEach)((0,r.default)(this,E),(e=>{t(e)})),e()):(0,l.arrayEach)((0,r.default)(this,E),(e=>{t(e,!0)}))}(0,i.default)(this,N,0),(0,i.default)(this,P,null)}bindEvents(){const{rootElement:e,rootWindow:t}=this.hot;this.eventManager.addEventListener(e,"mouseover",(e=>p(this,k,Y).call(this,e))),this.eventManager.addEventListener(e,"mousedown",(e=>p(this,D,j).call(this,e))),this.eventManager.addEventListener(t,"mousemove",(e=>p(this,L,G).call(this,e))),this.eventManager.addEventListener(t,"mouseup",(()=>p(this,W,z).call(this))),this.eventManager.addEventListener((0,r.default)(this,O),"contextmenu",(()=>p(this,F,K).call(this)))}destroy(){super.destroy()}}function Y(e){if(!(0,a.isDetached)(e.target)&&!0!==(0,r.default)(this,A)&&this.checkIfRowHeader(e.target)){const t=this.getClosestTHParent(e.target);t&&((0,r.default)(this,I)||this.setupHandlePosition(t))}}function j(e){(0,a.hasClass)(e.target,"manualRowResizer")&&(this.setupHandlePosition((0,r.default)(this,v)),this.setupGuidePosition(),(0,i.default)(this,I,!0),null===(0,r.default)(this,P)&&((0,i.default)(this,P,setTimeout((()=>this.afterMouseDownTimeout()),500)),this.hot._registerTimeout((0,r.default)(this,P))),(0,i.default)(this,N,(0,r.default)(this,N)+1),(0,i.default)(this,b,e.pageY),(0,i.default)(this,R,(0,r.default)(this,_)))}function G(e){(0,r.default)(this,I)&&((0,i.default)(this,S,(0,r.default)(this,_)+(e.pageY-(0,r.default)(this,b))),(0,l.arrayEach)((0,r.default)(this,E),(e=>{(0,i.default)(this,R,this.setManualSize(e,(0,r.default)(this,S)))})),this.refreshHandlePosition(),this.refreshGuidePosition())}function z(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize(!0)},t=(t,o)=>{this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!1),o&&e(),this.saveManualRowHeights(),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!1)};if((0,r.default)(this,I)){if(this.hideHandleAndGuide(),(0,i.default)(this,I,!1),(0,r.default)(this,R)!==(0,r.default)(this,_)){(0,r.default)(this,E).length>1?((0,l.arrayEach)((0,r.default)(this,E),(e=>{t(e)})),e()):(0,l.arrayEach)((0,r.default)(this,E),(e=>{t(e,!0)}))}this.setupHandlePosition((0,r.default)(this,v))}}function K(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild((0,r.default)(this,O)),this.hot.rootElement.removeChild((0,r.default)(this,M)),(0,i.default)(this,I,!1),(0,i.default)(this,A,!0),this.hot._registerImmediate((()=>{(0,i.default)(this,A,!1)}))}function $(e,t){let o=e;if(this.enabled){const e=this.hot.toPhysicalRow(t),s=(0,r.default)(this,x).getValueAtIndex(e);this.hot.getSettings()[m]&&s&&(o=s)}return o}function X(){const e=this.hot.getSettings()[m],t=this.loadManualRowHeights();this.hot.batchExecution((()=>{void 0!==t?t.forEach(((e,t)=>{(0,r.default)(this,x).setValueAtIndex(t,e)})):Array.isArray(e)?(e.forEach(((e,t)=>{(0,r.default)(this,x).setValueAtIndex(t,e)})),(0,i.default)(this,H,e)):!0===e&&Array.isArray((0,r.default)(this,H))&&(0,r.default)(this,H).forEach(((e,t)=>{(0,r.default)(this,x).setValueAtIndex(t,e)}))}),!0)}t.ManualRowResize=U},86805:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(22232),n=o(50095);t.default=class{constructor(e){(0,i.default)(this,"plugin",void 0),(0,i.default)(this,"mergedCellsCollection",void 0),(0,i.default)(this,"currentFillData",null),this.plugin=e,this.mergedCellsCollection=this.plugin.mergedCellsCollection}correctSelectionAreaSize(e){if(e[0]===e[2]&&e[1]===e[3]){const t=this.mergedCellsCollection.get(e[0],e[1]);t&&(e[2]=e[0]+t.rowspan-1,e[3]=e[1]+t.colspan-1)}}getDirection(e,t){let o=null;return o=t[0]===e[0]&&t[1]===e[1]&&t[3]===e[3]?"down":t[2]===e[2]&&t[1]===e[1]&&t[3]===e[3]?"up":t[1]===e[1]&&t[2]===e[2]?"right":"left",o}snapDragArea(e,t,o,s){const i=t.slice(0),r=this.getAutofillSize(e,t,o),[n,a,l,h]=e,u=["up","down"].indexOf(o)>-1?l-n+1:h-a+1,d=r-Math.floor(r/u)*u,c=this.getFarthestCollection(e,t,o,s);if(c)if("down"===o){const e=c.row+c.rowspan-n-d;i[2]+e>=this.plugin.hot.countRows()?i[2]-=d:i[2]+=d?e:0}else if("right"===o){const e=c.col+c.colspan-a-d;i[3]+e>=this.plugin.hot.countCols()?i[3]-=d:i[3]+=d?e:0}else if("up"===o){const e=l-d-c.row+1;i[0]+e<0?i[0]+=d:i[0]-=d?e:0}else if("left"===o){const e=h-d-c.col+1;i[1]+e<0?i[1]+=d:i[1]-=d?e:0}return this.updateCurrentFillCache({baseArea:e,dragDirection:o,foundMergedCells:s,fillSize:r,dragArea:i,cycleLength:u}),i}updateCurrentFillCache(e){this.currentFillData||(this.currentFillData={}),(0,r.extend)(this.currentFillData,e)}getAutofillSize(e,t,o){const[s,i,r,n]=e,[a,l,h,u]=t;switch(o){case"up":return s-a;case"down":return h-r;case"left":return i-l;case"right":return u-n;default:return null}}getDragArea(e,t,o){const[s,i,r,n]=e,[a,l,h,u]=t;switch(o){case"up":return[a,l,s-1,n];case"down":return[r+1,i,h,n];case"left":return[a,l,r,i-1];case"right":return[s,n+1,h,u];default:return null}}getFarthestCollection(e,t,o,s){const[i,r,a,l]=e,h=["up","down"].indexOf(o)>-1,u=h?a:l,d=h?i:r,c=this.getAutofillSize(e,t,o),g=h?a-i+1:l-r+1,f=c-Math.floor(c/g)*g;let p=null,m=null,w=null;switch(o){case"up":p="includesVertically",w=u-f+1;break;case"left":p="includesHorizontally",w=u-f+1;break;case"down":p="includesVertically",w=d+f-1;break;case"right":p="includesHorizontally",w=d+f-1}return(0,n.arrayEach)(s,(e=>{e[p](w)&&e.isFarther(m,o)&&(m=e)})),m}recreateAfterDataPopulation(e){if(!this.currentFillData)return;const t=this.getRangeFromChanges(e),o=this.currentFillData.foundMergedCells,s=this.currentFillData.dragDirection,i=(e,o)=>{switch(s){case"up":return e.row-o>=t.from.row;case"down":return e.row+e.rowspan-1+o<=t.to.row;case"left":return e.col-o>=t.from.column;case"right":return e.col+e.colspan-1+o<=t.to.column;default:return null}};let r=0,n=null,a=1;do{for(let e=0;e<o.length;e+=1){if(n=o[e],r=a*this.currentFillData.cycleLength,i(n,r))switch(s){case"up":this.plugin.mergedCellsCollection.add({row:n.row-r,rowspan:n.rowspan,col:n.col,colspan:n.colspan});break;case"down":this.plugin.mergedCellsCollection.add({row:n.row+r,rowspan:n.rowspan,col:n.col,colspan:n.colspan});break;case"left":this.plugin.mergedCellsCollection.add({row:n.row,rowspan:n.rowspan,col:n.col-r,colspan:n.colspan});break;case"right":this.plugin.mergedCellsCollection.add({row:n.row,rowspan:n.rowspan,col:n.col+r,colspan:n.colspan})}e===o.length-1&&(a+=1)}}while(i(n,r));this.currentFillData=null,this.plugin.hot.render(),o.length>0&&this.plugin.ifChromeForceRepaint()}getRangeFromChanges(e){const t={min:null,max:null},o={min:null,max:null};return(0,n.arrayEach)(e,(e=>{const s=e[0],i=this.plugin.hot.propToCol(e[1]);(null===t.min||s<t.min)&&(t.min=s),(null===t.max||s>t.max)&&(t.max=s),(null===o.min||i<o.min)&&(o.min=i),(null===o.max||i>o.max)&&(o.max=i)})),{from:{row:t.min,column:o.min},to:{row:t.max,column:o.max}}}dragAreaOverlapsCollections(e,t,o){const s=this.getDragArea(e,t,o),[i,r,n,a]=s,l=this.plugin.hot._createCellCoords(i,r),h=this.plugin.hot._createCellCoords(n,a),u=this.plugin.hot._createCellRange(l,l,h);return!!this.mergedCellsCollection.getWithinRange(u,!0)}}},21989:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231));t.default=class{constructor(e){(0,i.default)(this,"plugin",void 0),(0,i.default)(this,"hot",void 0),(0,i.default)(this,"fullySelectedMergedCellClassName","fullySelectedMergedCell"),this.plugin=e,this.hot=e.hot}snapDelta(e,t,o){const s=t.to,i=s.row+e.row,r=s.col+e.col;e.row?this.jumpOverMergedCell(e,o,i):e.col&&this.jumpOverMergedCell(e,o,r)}jumpOverMergedCell(e,t,o){let s=e.row||e.col,i=null,r=null,n=null;e.row?(i=t.includesVertically(o),r=t.row,n=t.getLastRow()):e.col&&(i=t.includesHorizontally(o),r=t.col,n=t.getLastColumn()),0!==s&&(s>0?i&&o!==r&&(s+=n-o+1):i&&o!==n&&(s-=o-r+1),e.row?e.row=s:e.col&&(e.col=s))}getUpdatedSelectionRange(e,t){return this.hot._createCellRange(e.highlight,e.from,this.hot._createCellCoords(e.to.row+t.row,e.to.col+t.col))}getSelectedMergedCellClassName(e,t,o,s){const i=Math.min(o[0],o[2]),r=Math.min(o[1],o[3]),n=Math.max(o[0],o[2]),a=Math.max(o[1],o[3]);if(void 0===s)return;if(!this.plugin.mergedCellsCollection.isFirstRenderableMergedCell(e,t))return;const l=this.plugin.mergedCellsCollection.get(e,t);if(!l)return;const h=l.getLastRow(),u=l.getLastColumn();return i<=l.row&&r<=l.col&&n>=h&&a>=u?`${this.fullySelectedMergedCellClassName}-${s}`:this.plugin.selectionCalculations.isMergeCellFullySelected(l,this.plugin.hot.getSelectedRange())?`${this.fullySelectedMergedCellClassName}-multiple`:void 0}isMergeCellFullySelected(e,t){const o=[];if(!t||!e)return!1;for(let t=0;t<e.rowspan;t+=1)for(let s=0;s<e.colspan;s+=1)o.push(this.hot._createCellCoords(e.row+t,e.col+s));for(let e=0;e<o.length;e+=1){const s=[];for(let i=0;i<t.length;i+=1)s[i]=t[i].includes(o[e]);if(!s.includes(!0))return!1}return!0}getSelectedMergedCellClassNameToRemove(){const e=[];for(let t=0;t<=7;t+=1)e.push(`${this.fullySelectedMergedCellClassName}-${t}`);return e.push(`${this.fullySelectedMergedCellClassName}-multiple`),e}}},22951:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(28236);t.default=class{constructor(e,t,o,s,r,n){(0,i.default)(this,"row",void 0),(0,i.default)(this,"col",void 0),(0,i.default)(this,"rowspan",void 0),(0,i.default)(this,"colspan",void 0),(0,i.default)(this,"removed",!1),(0,i.default)(this,"cellCoordsFactory",void 0),(0,i.default)(this,"cellRangeFactory",void 0),this.row=e,this.col=t,this.rowspan=o,this.colspan=s,this.cellCoordsFactory=r,this.cellRangeFactory=n}static NEGATIVE_VALUES_WARNING(e){return r.toSingleLine`The merged cell declared with {row: ${e.row}, col: ${e.col},\x20
72
75
  rowspan: ${e.rowspan}, colspan: ${e.colspan}} contains negative values, which is\x20
73
76
  not supported. It will not be added to the collection.`}static IS_OUT_OF_BOUNDS_WARNING(e){return r.toSingleLine`The merged cell declared at [${e.row}, ${e.col}] is positioned\x20
74
77
  (or positioned partially) outside of the table range. It was not added to the table, please fix your setup.`}static IS_SINGLE_CELL(e){return r.toSingleLine`The merged cell declared at [${e.row}, ${e.col}] has both "rowspan"\x20
75
78
  and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.`}static ZERO_SPAN_WARNING(e){return r.toSingleLine`The merged cell declared at [${e.row}, ${e.col}] has "rowspan"\x20
76
79
  or "colspan" declared as "0", which is not supported. It cannot be added to the collection.`}static containsNegativeValues(e){return e.row<0||e.col<0||e.rowspan<0||e.colspan<0}static isSingleCell(e){return 1===e.colspan&&1===e.rowspan}static containsZeroSpan(e){return 0===e.colspan||0===e.rowspan}static isOutOfBounds(e,t,o){return e.row<0||e.col<0||e.row>=t||e.row+e.rowspan-1>=t||e.col>=o||e.col+e.colspan-1>=o}normalize(e){const t=e.countRows(),o=e.countCols();this.row<0?this.row=0:this.row>t-1&&(this.row=t-1),this.col<0?this.col=0:this.col>o-1&&(this.col=o-1),this.row+this.rowspan>t-1&&(this.rowspan=t-this.row),this.col+this.colspan>o-1&&(this.colspan=o-this.col)}includes(e,t){return this.row<=e&&this.col<=t&&this.row+this.rowspan-1>=e&&this.col+this.colspan-1>=t}includesHorizontally(e){return this.col<=e&&this.col+this.colspan-1>=e}includesVertically(e){return this.row<=e&&this.row+this.rowspan-1>=e}shift(e,t){const o=e[0]||e[1],s=t+Math.abs(e[0]||e[1])-1,i=e[0]?"colspan":"rowspan",r=e[0]?"col":"row",n=Math.min(t,s),a=Math.max(t,s),l=this[r],h=this[r]+this[i]-1;if(l>=t&&(this[r]+=o),o>0)t<=h&&t>l&&(this[i]+=o);else if(o<0){if(n<=l&&a>=h)return this.removed=!0,!1;if(l>=n&&l<=a){const e=a-l+1,t=Math.abs(o)-e;this[r]-=t+o,this[i]-=e}else if(l<=n&&h>=a)this[i]+=o;else if(l<=n&&h>=n&&h<a){const e=h-n+1;this[i]-=e}}return!0}isFarther(e,t){return!e||("down"===t?e.row+e.rowspan-1<this.row+this.rowspan-1:"up"===t?e.row>this.row:"right"===t?e.col+e.colspan-1<this.col+this.colspan-1:"left"===t?e.col>this.col:null)}getLastRow(){return this.row+this.rowspan-1}getLastColumn(){return this.col+this.colspan-1}getRange(){return this.cellRangeFactory(this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.getLastRow(),this.getLastColumn()))}}},22603:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=s(o(22951)),n=o(68145),a=o(69173),l=o(50095),h=o(23916),u=o(28236);class d{constructor(e){(0,i.default)(this,"plugin",void 0),(0,i.default)(this,"mergedCells",[]),(0,i.default)(this,"hot",void 0),this.plugin=e,this.hot=e.hot}static IS_OVERLAPPING_WARNING(e){return u.toSingleLine`The merged cell declared at [${e.row}, ${e.col}], overlaps\x20
77
80
  with the other declared merged cell. The overlapping merged cell was not added to the table, please\x20
78
- fix your setup.`}get(e,t){const o=this.mergedCells;let s=!1;return(0,l.arrayEach)(o,(o=>!(o.row<=e&&o.row+o.rowspan-1>=e&&o.col<=t&&o.col+o.colspan-1>=t)||(s=o,!1))),s}getByRange(e){const t=this.mergedCells;let o=!1;return(0,l.arrayEach)(t,(t=>!(t.row<=e.from.row&&t.row+t.rowspan-1>=e.to.row&&t.col<=e.from.col&&t.col+t.colspan-1>=e.to.col)||(o=t,o))),o}getWithinRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=this.mergedCells,s=[];let i=e;if(!i.includesRange){const e=this.hot._createCellCoords(i.from.row,i.from.col),t=this.hot._createCellCoords(i.to.row,i.to.col);i=this.hot._createCellRange(e,e,t)}return(0,l.arrayEach)(o,(e=>{const o=this.hot._createCellCoords(e.row,e.col),r=this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1),n=this.hot._createCellRange(o,o,r);t?i.overlaps(n)&&s.push(e):i.includesRange(n)&&s.push(e)})),!!s.length&&s}add(e){const t=this.mergedCells,o=e.row,s=e.col,i=e.rowspan,n=e.colspan,l=new r.default(o,s,i,n,this.hot._createCellCoords,this.hot._createCellRange),h=this.get(o,s),u=this.isOverlapping(l);return h||u?((0,a.warn)(d.IS_OVERLAPPING_WARNING(l)),!1):(this.hot&&l.normalize(this.hot),t.push(l),l)}remove(e,t){const o=this.mergedCells,s=this.get(e,t),i=s?this.mergedCells.indexOf(s):-1;return!(!s||-1===i)&&(o.splice(i,1),s)}clear(){const e=this.mergedCells,t=[],o=[];(0,l.arrayEach)(e,(e=>{const o=this.hot.getCell(e.row,e.col);o&&t.push([o,this.get(e.row,e.col),e.row,e.col])})),this.mergedCells.length=0,(0,l.arrayEach)(t,((e,s)=>{(0,n.rangeEach)(0,e.rowspan-1,(t=>{(0,n.rangeEach)(0,e.colspan-1,(s=>{if(0!==s||0!==t){const i=this.hot.getCell(e.row+t,e.col+s);i&&o.push([i,null,null,null])}}))})),t[s][1]=null})),(0,l.arrayEach)(t,(e=>{(0,h.applySpanProperties)(...e)})),(0,l.arrayEach)(o,(e=>{(0,h.applySpanProperties)(...e)}))}isOverlapping(e){const t=this.hot._createCellRange(this.hot._createCellCoords(0,0),this.hot._createCellCoords(e.row,e.col),this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1));let o=!1;return(0,l.arrayEach)(this.mergedCells,(e=>!this.hot._createCellRange(this.hot._createCellCoords(0,0),this.hot._createCellCoords(e.row,e.col),this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1)).overlaps(t)||(o=!0,!1))),o}isFirstRenderableMergedCell(e,t){const o=this.get(e,t);return o&&this.hot.rowIndexMapper.getNearestNotHiddenIndex(o.row,1)===e&&this.hot.columnIndexMapper.getNearestNotHiddenIndex(o.col,1)===t}getFirstRenderableCoords(e,t){const o=this.get(e,t);if(!o||this.isFirstRenderableMergedCell(e,t))return this.hot._createCellCoords(e,t);const s=this.hot.rowIndexMapper.getNearestNotHiddenIndex(o.row,1),i=this.hot.columnIndexMapper.getNearestNotHiddenIndex(o.col,1);return this.hot._createCellCoords(s,i)}shiftCollections(e,t,o){const s=[0,0];switch(e){case"right":s[0]+=o;break;case"left":s[0]-=o;break;case"down":s[1]+=o;break;case"up":s[1]-=o}(0,l.arrayEach)(this.mergedCells,(e=>{e.shift(s,t)})),(0,n.rangeEachReverse)(this.mergedCells.length-1,0,(e=>{const t=this.mergedCells[e];t&&t.removed&&this.mergedCells.splice(this.mergedCells.indexOf(t),1)}))}}t.default=d},4146:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.default=function(e){return{key:"mergeCells",name(){const t=this.getSelectedLast();if(t){const o=e.mergedCellsCollection.get(t[0],t[1]);if(o.row===t[0]&&o.col===t[1]&&o.row+o.rowspan-1===t[2]&&o.col+o.colspan-1===t[3])return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_UNMERGE_CELLS)}return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_MERGE_CELLS)},callback(){e.toggleMergeOnSelection()},disabled(){const e=this.getSelectedLast();if(!e)return!0;return r.default.isSingleCell({row:e[0],col:e[1],rowspan:e[2]-e[0]+1,colspan:e[3]-e[1]+1})||this.selection.isSelectedByCorner()},hidden:!1}};var i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),r=s(o(22951));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},95896:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(53544);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.MergeCells=s.MergeCells},53544:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=s(o(48427)),n=s(o(42538)),a=o(36026),l=s(o(56307)),h=s(o(22603)),u=s(o(22951)),d=s(o(86805)),c=s(o(21989)),g=s(o(4146)),f=o(50095),p=o(22232),m=o(69173),w=o(68145),C=o(23916);o(70980);var v=o(83302),y=o(37595);function E(e,t){S(e,t),t.add(e)}function S(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function R(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}l.default.getSingleton().register("beforeMergeCells"),l.default.getSingleton().register("afterMergeCells"),l.default.getSingleton().register("beforeUnmergeCells"),l.default.getSingleton().register("afterUnmergeCells");const b=t.PLUGIN_KEY="mergeCells",_=t.PLUGIN_PRIORITY=150,T=b;var O=new WeakMap,M=new WeakSet,I=new WeakSet,N=new WeakSet,A=new WeakSet,P=new WeakSet,x=new WeakSet,H=new WeakSet,k=new WeakSet,D=new WeakSet,L=new WeakSet,W=new WeakSet,F=new WeakSet,V=new WeakSet,B=new WeakSet,U=new WeakSet,Y=new WeakSet,j=new WeakSet,G=new WeakSet,z=new WeakSet,K=new WeakSet,$=new WeakSet,X=new WeakSet;class q extends a.BasePlugin{constructor(){var e,t,o;super(...arguments),E(this,X),E(this,$),E(this,K),E(this,z),E(this,G),E(this,j),E(this,Y),E(this,U),E(this,B),E(this,V),E(this,F),E(this,W),E(this,L),E(this,D),E(this,k),E(this,H),E(this,x),E(this,P),E(this,A),E(this,N),E(this,I),E(this,M),(0,i.default)(this,"mergedCellsCollection",null),(0,i.default)(this,"autofillCalculations",null),(0,i.default)(this,"selectionCalculations",null),o={writable:!0,value:null},S(e=this,t=O),t.set(e,o)}static get PLUGIN_KEY(){return b}static get PLUGIN_PRIORITY(){return _}isEnabled(){return!!this.hot.getSettings()[b]}enablePlugin(){var e=this;this.enabled||(this.mergedCellsCollection=new h.default(this),this.autofillCalculations=new d.default(this),this.selectionCalculations=new c.default(this),this.addHook("afterInit",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,M,Q).call(e,...o)})),this.addHook("modifyTransformStart",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,N,Z).call(e,...o)})),this.addHook("afterModifyTransformStart",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,K,me).call(e,...o)})),this.addHook("modifyTransformEnd",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,A,ee).call(e,...o)})),this.addHook("modifyGetCellCoords",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,P,te).call(e,...o)})),this.addHook("beforeSetRangeStart",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,k,ie).call(e,...o)})),this.addHook("beforeSetRangeStartOnly",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,k,ie).call(e,...o)})),this.addHook("beforeSetRangeEnd",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,D,re).call(e,...o)})),this.addHook("afterIsMultipleSelection",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,I,J).call(e,...o)})),this.addHook("afterRenderer",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,H,se).call(e,...o)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,x,oe).call(e,...o)})),this.addHook("afterGetCellMeta",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,L,ne).call(e,...o)})),this.addHook("afterViewportRowCalculatorOverride",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,W,ae).call(e,...o)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,F,le).call(e,...o)})),this.addHook("modifyAutofillRange",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,V,he).call(e,...o)})),this.addHook("afterCreateCol",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,B,ue).call(e,...o)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,U,de).call(e,...o)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,Y,ce).call(e,...o)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,j,ge).call(e,...o)})),this.addHook("afterChange",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,G,fe).call(e,...o)})),this.addHook("beforeDrawBorders",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,z,pe).call(e,...o)})),this.addHook("afterDrawSelection",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,$,we).call(e,...o)})),this.addHook("beforeRemoveCellClassNames",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,X,Ce).call(e,...o)})),this.addHook("beforeUndoStackChange",((e,t)=>{if("MergeCells"===t)return!1})),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.clearCollections(),this.unregisterShortcuts(),this.hot.render(),super.disablePlugin()}updatePlugin(){const e=this.hot.getSettings()[b];this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(e),super.updatePlugin()}ifChromeForceRepaint(){if(!(0,y.isChrome)())return;const e=[];let t=[];this.mergedCellsCollection.mergedCells.forEach((e=>{const{row:o,rowspan:s}=e;for(let e=o+1;e<o+s;e++)t.push(e)})),t=[...new Set(t)],t.forEach((t=>{const o=this.hot.rowIndexMapper.getRenderableFromVisualIndex(t);this.hot.view._wt.wtOverlays.getOverlays(!0).map((e=>"master"===(null==e?void 0:e.name)?e:e.clone.wtTable)).forEach((t=>{const s=t.getRow(o);s&&(s.style.background=(0,v.getStyle)(s,"backgroundColor").replace(")",", 0.99)"),e.push(s))}))})),this.hot._registerTimeout((()=>{e.forEach((e=>{e.style.background=(0,v.getStyle)(e,"backgroundColor").replace(", 0.99)",")")}))}),1)}validateSetting(e){let t=!0;return!!e&&(u.default.containsNegativeValues(e)?((0,m.warn)(u.default.NEGATIVE_VALUES_WARNING(e)),t=!1):u.default.isOutOfBounds(e,this.hot.countRows(),this.hot.countCols())?((0,m.warn)(u.default.IS_OUT_OF_BOUNDS_WARNING(e)),t=!1):u.default.isSingleCell(e)?((0,m.warn)(u.default.IS_SINGLE_CELL(e)),t=!1):u.default.containsZeroSpan(e)&&((0,m.warn)(u.default.ZERO_SPAN_WARNING(e)),t=!1),t)}generateFromSettings(e){if(Array.isArray(e)){const t=[];if((0,f.arrayEach)(e,(e=>{if(!this.validateSetting(e))return;const o=this.hot._createCellCoords(e.row,e.col),s=this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1),i=this.hot._createCellRange(o,o,s);this.mergeRange(i,!0,!0),(0,w.rangeEach)(e.row,e.row+e.rowspan-1,(o=>{(0,w.rangeEach)(e.col,e.col+e.colspan-1,(s=>{!1==(o===e.row&&s===e.col)&&t.push([o,s,null])}))}))})),0===t.length)return;this.hot.setDataAtCell(t)}}clearCollections(){this.mergedCellsCollection.clear()}canMergeRange(e){return!!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])||this.validateSetting(e)}toggleMergeOnSelection(){const e=this.hot.getSelectedRangeLast();if(!e)return;e.setDirection(this.hot.isRtl()?"NE-SW":"NW-SE");const{from:t,to:o}=e;this.toggleMerge(e),this.hot.selectCell(t.row,t.col,o.row,o.col,!1)}mergeSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!e)return;e.setDirection(this.hot.isRtl()?"NE-SW":"NW-SE");const{from:t,to:o}=e;this.unmergeRange(e,!0),this.mergeRange(e),this.hot.selectCell(t.row,t.col,o.row,o.col,!1)}unmergeSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!e)return;const{from:t,to:o}=e;this.unmergeRange(e,!0),this.hot.selectCell(t.row,t.col,o.row,o.col,!1)}mergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=e.getTopStartCorner(),i=e.getBottomEndCorner(),r={row:s.row,col:s.col,rowspan:i.row-s.row+1,colspan:i.col-s.col+1},n=[];let a=null;if(!this.canMergeRange(r,t))return!1;this.hot.runHooks("beforeMergeCells",e,t),(0,w.rangeEach)(0,r.rowspan-1,(e=>{(0,w.rangeEach)(0,r.colspan-1,(t=>{let o=null;n[e]||(n[e]=[]),0===e&&0===t?o=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(r.row),this.hot.toPhysicalColumn(r.col)):this.hot.setCellMeta(r.row+e,r.col+t,"hidden",!0),n[e][t]=o}))})),this.hot.setCellMeta(r.row,r.col,"spanned",!0);return!this.mergedCellsCollection.add(r)||(o?a=[r.row,r.col,n]:this.hot.populateFromArray(r.row,r.col,n,void 0,void 0,this.pluginName),t||this.ifChromeForceRepaint(),this.hot.runHooks("afterMergeCells",e,r,t),a)}unmergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=this.mergedCellsCollection.getWithinRange(e);o&&(this.hot.runHooks("beforeUnmergeCells",e,t),(0,f.arrayEach)(o,(e=>{this.mergedCellsCollection.remove(e.row,e.col),(0,w.rangeEach)(0,e.rowspan-1,(t=>{(0,w.rangeEach)(0,e.colspan-1,(o=>{this.hot.removeCellMeta(e.row+t,e.col+o,"hidden"),this.hot.removeCellMeta(e.row+t,e.col+o,"copyable")}))})),this.hot.removeCellMeta(e.row,e.col,"spanned")})),this.hot.runHooks("afterUnmergeCells",e,t),this.hot.render())}toggleMerge(e){const t=this.mergedCellsCollection.get(e.from.row,e.from.col);t.row===e.from.row&&t.col===e.from.col&&t.row+t.rowspan-1===e.to.row&&t.col+t.colspan-1===e.to.col?this.unmergeRange(e):this.mergeSelection(e)}merge(e,t,o,s){const i=this.hot._createCellCoords(e,t),r=this.hot._createCellCoords(o,s);this.mergeRange(this.hot._createCellRange(i,i,r))}unmerge(e,t,o,s){const i=this.hot._createCellCoords(e,t),r=this.hot._createCellCoords(o,s);this.unmergeRange(this.hot._createCellRange(i,i,r))}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control","m"]],callback:()=>{const e=this.hot.getSelectedRangeLast();e&&!e.isSingleHeader()&&(this.toggleMerge(e),this.hot.render())},runOnlyIf:e=>!e.altKey,group:T})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(T)}modifyViewportRowStart(e,t){const o=this.hot.rowIndexMapper,s=o.getVisualFromRenderableIndex(e.startRow);for(let i=0;i<t;i+=1){const r=this.mergedCellsCollection.get(s,i);if((0,p.isObject)(r)){const s=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(r.row,1));if(s<e.startRow)return e.startRow=s,void this.modifyViewportRowStart(e,t)}}}modifyViewportRowEnd(e,t){const o=this.hot.rowIndexMapper,s=o.getVisualFromRenderableIndex(e.endRow);for(let i=0;i<t;i+=1){const r=this.mergedCellsCollection.get(s,i);if((0,p.isObject)(r)){const s=r.row+r.rowspan-1,i=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(s,-1));if(i>e.endRow)return e.endRow=i,void this.modifyViewportRowEnd(e,t)}}}modifyViewportColumnStart(e,t){const o=this.hot.columnIndexMapper,s=o.getVisualFromRenderableIndex(e.startColumn);for(let i=0;i<t;i+=1){const r=this.mergedCellsCollection.get(i,s);if((0,p.isObject)(r)){const s=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(r.col,1));if(s<e.startColumn)return e.startColumn=s,void this.modifyViewportColumnStart(e,t)}}}modifyViewportColumnEnd(e,t){const o=this.hot.columnIndexMapper,s=o.getVisualFromRenderableIndex(e.endColumn);for(let i=0;i<t;i+=1){const r=this.mergedCellsCollection.get(i,s);if((0,p.isObject)(r)){const s=r.col+r.colspan-1,i=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(s,-1));if(i>e.endColumn)return e.endColumn=i,void this.modifyViewportColumnEnd(e,t)}}}translateMergedCellToRenderable(e,t,o,s){const{rowIndexMapper:i,columnIndexMapper:r}=this.hot;let n,a;n=0===t?i.getNearestNotHiddenIndex(e,1):i.getNearestNotHiddenIndex(e+t-1,-1),a=0===s?r.getNearestNotHiddenIndex(o,1):r.getNearestNotHiddenIndex(o+s-1,-1);return[e>=0?i.getRenderableFromVisualIndex(n):e,o>=0?r.getRenderableFromVisualIndex(a):o]}}function Q(){this.generateFromSettings(this.hot.getSettings()[b]),this.hot.render()}function J(e){if(e){const e=this.mergedCellsCollection.mergedCells,t=this.hot.getSelectedRangeLast();for(let o=0;o<e.length;o+=1)if(t.from.row===e[o].row&&t.from.col===e[o].col&&t.to.row===e[o].row+e[o].rowspan-1&&t.to.col===e[o].col+e[o].colspan-1)return!1}return e}function Z(e){const t=this.hot.getSelectedRangeLast();let o={row:e.row,col:e.col},s=null;const i=this.hot._createCellCoords(t.highlight.row,t.highlight.col),a=this.mergedCellsCollection.get(i.row,i.col);if((0,n.default)(this,O)||(0,r.default)(this,O,this.hot._createCellCoords(null,null)),a){const t=this.hot._createCellCoords(a.row,a.col),s=this.hot._createCellCoords(a.row+a.rowspan-1,a.col+a.colspan-1);this.hot._createCellRange(t,t,s).includes((0,n.default)(this,O))||(0,r.default)(this,O,this.hot._createCellCoords(null,null)),o.row=(0,n.default)(this,O).row?(0,n.default)(this,O).row-i.row:o.row,o.col=(0,n.default)(this,O).col?(0,n.default)(this,O).col-i.col:o.col,e.row>0?o.row=a.row+a.rowspan-1-i.row+e.row:e.row<0&&(o.row=i.row-a.row+e.row),e.col>0?o.col=a.col+a.colspan-1-i.col+e.col:e.col<0&&(o.col=i.col-a.col+e.col)}s=this.hot._createCellCoords(t.highlight.row+o.row,t.highlight.col+o.col);const l=this.mergedCellsCollection.get(s.row,s.col);if(l){const e=this.mergedCellsCollection.getFirstRenderableCoords(l.row,l.col);(0,r.default)(this,O,s),o={row:e.row-i.row,col:e.col-i.col}}0!==o.row&&(e.row=o.row),0!==o.col&&(e.col=o.col)}function ee(e){const t=this.hot.getSelectedRangeLast(),o=(0,p.clone)(e),s=this.selectionCalculations.getUpdatedSelectionRange(t,e);let i=(0,p.clone)(o);const r=this.mergedCellsCollection.getWithinRange(s,!0);do{i=(0,p.clone)(o),this.selectionCalculations.getUpdatedSelectionRange(t,o),(0,f.arrayEach)(r,(e=>{this.selectionCalculations.snapDelta(o,t,e)}))}while(o.row!==i.row||o.col!==i.col);e.row=o.row,e.col=o.col}function te(e,t){if(e<0||t<0)return;const o=this.mergedCellsCollection.get(e,t);if(!o)return;const{row:s,col:i,colspan:r,rowspan:n}=o;return[s,i,s+n-1,i+r-1]}function oe(e){e.items.push({name:"---------"},(0,g.default)(this))}function se(e,t,o){const s=this.mergedCellsCollection.get(t,o),i=(0,p.isObject)(s)?(0,p.clone)(s):void 0;if((0,p.isObject)(i)){const{rowIndexMapper:e,columnIndexMapper:s}=this.hot,{row:r,col:n,colspan:a,rowspan:l}=i,[h,u]=this.translateMergedCellToRenderable(r,l,n,a),d=h-e.getRenderableFromVisualIndex(t)+1,c=u-s.getRenderableFromVisualIndex(o)+1;i.row=e.getNearestNotHiddenIndex(i.row,1),i.col=s.getNearestNotHiddenIndex(i.col,1),i.rowspan=Math.min(i.rowspan,d),i.colspan=Math.min(i.colspan,c)}(0,C.applySpanProperties)(e,i,t,o)}function ie(e){if(this.mergedCellsCollection.isFirstRenderableMergedCell(e.row,e.col)){const t=this.mergedCellsCollection.get(e.row,e.col);[e.row,e.col]=[t.row,t.col]}}function re(e){const t=this.hot.getSelectedRangeLast();t.highlight=this.hot._createCellCoords(t.highlight.row,t.highlight.col),t.to=e;let o=!1;if(!this.hot.selection.isSelectedByColumnHeader()&&!this.hot.selection.isSelectedByRowHeader())do{o=!1;for(let s=0;s<this.mergedCellsCollection.mergedCells.length;s+=1){const i=this.mergedCellsCollection.mergedCells[s].getRange();t.expandByRange(i)&&(e.row=t.to.row,e.col=t.to.col,o=!0)}}while(o)}function ne(e,t,o){const s=this.mergedCellsCollection.get(e,t);s&&(s.row!==e||s.col!==t?o.copyable=!1:(o.rowspan=s.rowspan,o.colspan=s.colspan))}function ae(e){const t=this.hot.countCols();this.modifyViewportRowStart(e,t),this.modifyViewportRowEnd(e,t)}function le(e){const t=this.hot.countRows();this.modifyViewportColumnStart(e,t),this.modifyViewportColumnEnd(e,t)}function he(e,t){this.autofillCalculations.correctSelectionAreaSize(t);const o=this.autofillCalculations.getDirection(t,e);let s=e;if(this.autofillCalculations.dragAreaOverlapsCollections(t,s,o))return s=t,s;const i=this.mergedCellsCollection.getWithinRange({from:{row:t[0],col:t[1]},to:{row:t[2],col:t[3]}});return i?(s=this.autofillCalculations.snapDragArea(t,s,o,i),s):s}function ue(e,t){this.mergedCellsCollection.shiftCollections("right",e,t)}function de(e,t){this.mergedCellsCollection.shiftCollections("left",e,t)}function ce(e,t,o){"auto"!==o&&this.mergedCellsCollection.shiftCollections("down",e,t)}function ge(e,t){this.mergedCellsCollection.shiftCollections("up",e,t)}function fe(e,t){"Autofill.fill"===t&&this.autofillCalculations.recreateAfterDataPopulation(e)}function pe(e,t){if(t&&"area"===t){const t=this.hot.getSelectedRangeLast(),o=this.mergedCellsCollection.getWithinRange(t);(0,f.arrayEach)(o,(o=>{t.getBottomEndCorner().row===o.getLastRow()&&t.getBottomEndCorner().col===o.getLastColumn()&&(e[2]=o.row,e[3]=o.col)}))}}function me(e,t,o){if(!this.enabled)return;const s=this.mergedCellsCollection.get(e.row,e.col);if(!s)return;const i=t>0,r=t<0,n=o<0,a=o>0,l=s.row+s.rowspan-1==this.hot.countRows()-1,h=0===s.row,u=s.col+s.colspan-1==this.hot.countCols()-1,d=0===s.col;(i&&l||r&&h||a&&u||n&&d)&&(e.row=s.row,e.col=s.col)}function we(e,t,o,s){if(o)return this.selectionCalculations.getSelectedMergedCellClassName(e,t,o,s)}function Ce(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}t.MergeCells=q},23916:(e,t)=>{"use strict";t.__esModule=!0,t.applySpanProperties=function(e,t,o,s){t?t.row===o&&t.col===s?(e.setAttribute("rowspan",t.rowspan.toString()),e.setAttribute("colspan",t.colspan.toString())):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="none"):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="")}},82546:(e,t,o)=>{"use strict";t.__esModule=!0,t.getClassesToAdd=function(e,t,o){const i=[];if(!1===o)return i;e.isColumnSorted(t)&&e.getNumberOfSortedColumns()>1&&i.push(`${s}-${e.getIndexOfColumnInSortQueue(t)+1}`);return i},t.getClassesToRemove=function(e){const t=e.className.split(" "),o=new RegExp(`^${s}-[0-9]{1,2}$`);return t.filter((e=>o.test(e)))},o(63517);const s="sort"},13620:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(14755);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.MultiColumnSorting=s.MultiColumnSorting},14755:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(1902),n=o(51510),a=o(64951),l=o(83302),h=o(54639),u=o(67012),d=o(82546);o(2049);const c=t.PLUGIN_KEY="multiColumnSorting",g=t.PLUGIN_PRIORITY=170,f="columnSorting",p=c;(0,n.registerRootComparator)(c,h.rootComparator);class m extends r.ColumnSorting{constructor(){super(...arguments),(0,i.default)(this,"pluginKey",c)}static get PLUGIN_KEY(){return c}static get PLUGIN_PRIORITY(){return g}isEnabled(){return super.isEnabled()}enablePlugin(){!this.enabled&&this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[f]&&(0,u.warnAboutPluginsConflict)(),super.enablePlugin()}disablePlugin(){super.disablePlugin()}registerShortcuts(){super.registerShortcuts(),this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Shift","Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();-1===e.row&&e.col>=0&&this.sort(this.getNextSortConfig(e.col,r.APPEND_COLUMN_CONFIG_STRATEGY))},runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()},group:p})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(p)}sort(e){super.sort(e)}clearSort(){super.clearSort()}isSorted(){return super.isSorted()}getSortConfig(e){return super.getSortConfig(e)}setSortConfig(e){super.setSortConfig(e)}getNormalizedSortConfigs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e:[e]}updateHeaderClasses(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];super.updateHeaderClasses(e,...o),(0,l.removeClass)(e,(0,d.getClassesToRemove)(e)),!1!==this.enabled&&(0,l.addClass)(e,(0,d.getClassesToAdd)(...o))}onUpdateSettings(e){this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[f]&&(0,u.warnAboutPluginsConflict)(),super.onUpdateSettings(e)}onAfterOnCellMouseDown(e,t){!1!==(0,a.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&(this.hot.getShortcutManager().isCtrlPressed()?(this.hot.deselectCell(),this.hot.selectColumns(t.col),this.sort(this.getNextSortConfig(t.col,r.APPEND_COLUMN_CONFIG_STRATEGY))):this.sort(this.getColumnNextConfig(t.col)))}}t.MultiColumnSorting=m},54639:(e,t,o)=>{"use strict";t.__esModule=!0,t.rootComparator=function(e,t){return function(o,i){const[,...r]=o,[,...n]=i;return function o(i){const a=e[i],l=t[i],h=r[i],u=n[i],d=l.multiColumnSorting,c=(d.compareFunctionFactory?d.compareFunctionFactory:(0,s.getCompareFunctionFactory)(l.type))(a,l,d)(h,u);if(c===s.DO_NOT_SWAP){const e=i+1;if(void 0!==t[e])return o(e)}return c}(0)}};var s=o(51510)},67012:(e,t,o)=>{"use strict";t.__esModule=!0,t.warnAboutPluginsConflict=function(){(0,s.warn)(i.toSingleLine`Plugins \`columnSorting\` and \`multiColumnSorting\` should not be enabled simultaneously.
79
- Only \`multiColumnSorting\` will work.`)};var s=o(69173),i=o(28236)},98481:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(72774);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.MultipleSelectionHandles=s.MultipleSelectionHandles},72774:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(83302),n=o(37595),a=o(36026);const l=t.PLUGIN_KEY="multipleSelectionHandles",h=t.PLUGIN_PRIORITY=160;class u extends a.BasePlugin{constructor(){super(...arguments),(0,i.default)(this,"dragged",[]),(0,i.default)(this,"lastSetCell",null)}static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return h}isEnabled(){return(0,n.isMobileBrowser)()}enablePlugin(){this.enabled||(this.registerListeners(),super.enablePlugin())}registerListeners(){const e=this,{rootElement:t}=this.hot;function o(t){if(1===e.dragged.length)return e.dragged.splice(0,e.dragged.length),!0;const o=e.dragged.indexOf(t);if(-1===o)return!1;0===o?e.dragged=e.dragged.slice(0,1):1===o&&(e.dragged=e.dragged.slice(-1))}this.eventManager.addEventListener(t,"touchstart",(t=>{let o;return(0,r.hasClass)(t.target,"topSelectionHandle-HitArea")?(o=e.hot.getSelectedRangeLast(),e.dragged.push("top"),e.touchStartRange={width:o.getWidth(),height:o.getHeight(),direction:o.getDirection()},t.preventDefault(),!1):(0,r.hasClass)(t.target,"bottomSelectionHandle-HitArea")?(o=e.hot.getSelectedRangeLast(),e.dragged.push("bottom"),e.touchStartRange={width:o.getWidth(),height:o.getHeight(),direction:o.getDirection()},t.preventDefault(),!1):void 0})),this.eventManager.addEventListener(t,"touchend",(t=>(0,r.hasClass)(t.target,"topSelectionHandle-HitArea")?(o.call(e,"top"),e.touchStartRange=void 0,t.preventDefault(),!1):(0,r.hasClass)(t.target,"bottomSelectionHandle-HitArea")?(o.call(e,"bottom"),e.touchStartRange=void 0,t.preventDefault(),!1):void 0)),this.eventManager.addEventListener(t,"touchmove",(t=>{const{rootDocument:o}=this.hot;let s,i,r,n,a,l;if(0===e.dragged.length)return;const h=o.elementFromPoint(t.touches[0].clientX,t.touches[0].clientY);h&&h!==e.lastSetCell&&("TD"!==h.nodeName&&"TH"!==h.nodeName||(s=e.hot.getCoords(h),-1===s.col&&(s.col=0),i=e.hot.getSelectedRangeLast(),r=i.getWidth(),n=i.getHeight(),a=i.getDirection(),1===r&&1===n&&e.hot.selection.setRangeEnd(s),l=e.getCurrentRangeCoords(i,s,e.touchStartRange.direction,a,e.dragged[0]),null!==l.start&&e.hot.selection.setRangeStart(l.start),e.hot.selection.setRangeEnd(l.end),e.lastSetCell=h),t.preventDefault())}))}getCurrentRangeCoords(e,t,o,s,i){const r=e.getTopStartCorner(),n=e.getBottomEndCorner(),a=e.getBottomStartCorner(),l=e.getTopEndCorner();let h={start:null,end:null};switch(o){case"NE-SW":switch(s){case"NE-SW":case"NW-SE":h="top"===i?{start:this.hot._createCellCoords(t.row,e.highlight.col),end:this.hot._createCellCoords(a.row,t.col)}:{start:this.hot._createCellCoords(e.highlight.row,t.col),end:this.hot._createCellCoords(t.row,r.col)};break;case"SE-NW":"bottom"===i&&(h={start:this.hot._createCellCoords(n.row,t.col),end:this.hot._createCellCoords(t.row,r.col)})}break;case"NW-SE":switch(s){case"NE-SW":"top"===i?h={start:t,end:a}:h.end=t;break;case"NW-SE":"top"===i?h={start:t,end:n}:h.end=t;break;case"SE-NW":"top"===i?h={start:t,end:r}:h.end=t;break;case"SW-NE":"top"===i?h={start:t,end:l}:h.end=t}break;case"SW-NE":switch(s){case"NW-SE":h="bottom"===i?{start:this.hot._createCellCoords(t.row,r.col),end:this.hot._createCellCoords(a.row,t.col)}:{start:this.hot._createCellCoords(r.row,t.col),end:this.hot._createCellCoords(t.row,n.col)};break;case"SW-NE":h="top"===i?{start:this.hot._createCellCoords(e.highlight.row,t.col),end:this.hot._createCellCoords(t.row,n.col)}:{start:this.hot._createCellCoords(t.row,r.col),end:this.hot._createCellCoords(r.row,t.col)};break;case"SE-NW":"bottom"===i?h={start:this.hot._createCellCoords(t.row,l.col),end:this.hot._createCellCoords(r.row,t.col)}:"top"===i&&(h={start:a,end:t})}break;case"SE-NW":switch(s){case"NW-SE":case"NE-SW":case"SW-NE":"top"===i&&(h.end=t);break;case"SE-NW":"top"===i?h.end=t:h={start:t,end:r}}}return h}isDragged(){return this.dragged.length>0}}t.MultipleSelectionHandles=u},37499:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(25665);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.NestedHeaders=s.NestedHeaders},25665:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=s(o(48427)),n=s(o(42538)),a=o(83302),l=o(68145),h=o(28236),u=o(24449),d=o(69173),c=o(69167),g=o(36026),f=s(o(24768)),p=s(o(45404));function m(e,t){C(e,t),t.add(e)}function w(e,t,o){C(e,t),t.set(e,o)}function C(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function v(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(10596);const y=t.PLUGIN_KEY="nestedHeaders",E=t.PLUGIN_PRIORITY=280;var S=new WeakMap,R=new WeakMap,b=new WeakMap,_=new WeakMap,T=new WeakSet,O=new WeakSet,M=new WeakSet,I=new WeakSet,N=new WeakSet,A=new WeakSet,P=new WeakSet,x=new WeakSet,H=new WeakSet,k=new WeakSet,D=new WeakSet,L=new WeakSet,W=new WeakSet,F=new WeakSet,V=new WeakSet,B=new WeakSet,U=new WeakSet,Y=new WeakSet;class j extends g.BasePlugin{constructor(){super(...arguments),m(this,Y),m(this,U),m(this,B),m(this,V),m(this,F),m(this,W),m(this,L),m(this,D),m(this,k),m(this,H),m(this,x),m(this,P),m(this,A),m(this,N),m(this,I),m(this,M),m(this,O),m(this,T),w(this,S,{writable:!0,value:new f.default}),w(this,R,{writable:!0,value:null}),w(this,b,{writable:!0,value:null}),w(this,_,{writable:!0,value:!1}),(0,i.default)(this,"ghostTable",new p.default(this.hot,((e,t)=>this.getHeaderSettings(e,t)))),(0,i.default)(this,"detectedOverlappedHeaders",!1)}static get PLUGIN_KEY(){return y}static get PLUGIN_PRIORITY(){return E}isEnabled(){return!!this.hot.getSettings()[y]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();Array.isArray(t)&&Array.isArray(t[0])||(0,d.warn)(h.toSingleLine`Your Nested Headers plugin configuration is invalid. The settings has to be\x20
80
- passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]`),this.addHook("init",(()=>v(this,U,ae).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,Y,le).call(e,...o)})),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,N,X).call(e,...o)})),this.addHook("afterOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,A,q).call(e,...o)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,P,Q).call(e,...o)})),this.addHook("beforeOnCellMouseUp",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,x,J).call(e,...o)})),this.addHook("beforeSelectionHighlightSet",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,H,Z).call(e,...o)})),this.addHook("modifyTransformStart",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,k,ee).call(e,...o)})),this.addHook("afterSelection",(()=>v(this,T,G).call(this))),this.addHook("beforeViewportScrollHorizontally",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,O,z).call(e,...o)})),this.addHook("afterGetColumnHeaderRenderers",(e=>v(this,L,oe).call(this,e))),this.addHook("modifyColWidth",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,F,ie).call(e,...o)})),this.addHook("modifyColumnHeaderValue",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,V,re).call(e,...o)})),this.addHook("beforeHighlightingColumnHeader",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,M,K).call(e,...o)})),this.addHook("beforeCopy",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,I,$).call(e,...o)})),this.addHook("beforeSelectColumns",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,D,te).call(e,...o)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,W,se).call(e,...o)})),this.addHook("modifyFocusedElement",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,B,ne).call(e,...o)})),this.hot.columnIndexMapper.addLocalHook("cacheUpdated",(()=>v(this,T,G).call(this))),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",(()=>v(this,T,G).call(this))),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(!this.hot.view)return;const{nestedHeaders:e}=this.hot.getSettings();(0,n.default)(this,S).setColumnsLimit(this.hot.countCols()),Array.isArray(e)&&(this.detectedOverlappedHeaders=(0,n.default)(this,S).setState(e)),this.detectedOverlappedHeaders&&(0,d.warn)(h.toSingleLine`Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\x20
81
+ fix your setup.`}get(e,t){const o=this.mergedCells;let s=!1;return(0,l.arrayEach)(o,(o=>!(o.row<=e&&o.row+o.rowspan-1>=e&&o.col<=t&&o.col+o.colspan-1>=t)||(s=o,!1))),s}getByRange(e){const t=this.mergedCells;let o=!1;return(0,l.arrayEach)(t,(t=>!(t.row<=e.from.row&&t.row+t.rowspan-1>=e.to.row&&t.col<=e.from.col&&t.col+t.colspan-1>=e.to.col)||(o=t,o))),o}getWithinRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=this.mergedCells,s=[];let i=e;if(!i.includesRange){const e=this.hot._createCellCoords(i.from.row,i.from.col),t=this.hot._createCellCoords(i.to.row,i.to.col);i=this.hot._createCellRange(e,e,t)}return(0,l.arrayEach)(o,(e=>{const o=this.hot._createCellCoords(e.row,e.col),r=this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1),n=this.hot._createCellRange(o,o,r);t?i.overlaps(n)&&s.push(e):i.includesRange(n)&&s.push(e)})),!!s.length&&s}add(e){const t=this.mergedCells,o=e.row,s=e.col,i=e.rowspan,n=e.colspan,l=new r.default(o,s,i,n,this.hot._createCellCoords,this.hot._createCellRange),h=this.get(o,s),u=this.isOverlapping(l);return h||u?((0,a.warn)(d.IS_OVERLAPPING_WARNING(l)),!1):(this.hot&&l.normalize(this.hot),t.push(l),l)}remove(e,t){const o=this.mergedCells,s=this.get(e,t),i=s?this.mergedCells.indexOf(s):-1;return!(!s||-1===i)&&(o.splice(i,1),s)}clear(){const e=this.mergedCells,t=[],o=[];(0,l.arrayEach)(e,(e=>{const o=this.hot.getCell(e.row,e.col);o&&t.push([o,this.get(e.row,e.col),e.row,e.col])})),this.mergedCells.length=0,(0,l.arrayEach)(t,((e,s)=>{(0,n.rangeEach)(0,e.rowspan-1,(t=>{(0,n.rangeEach)(0,e.colspan-1,(s=>{if(0!==s||0!==t){const i=this.hot.getCell(e.row+t,e.col+s);i&&o.push([i,null,null,null])}}))})),t[s][1]=null})),(0,l.arrayEach)(t,(e=>{(0,h.applySpanProperties)(...e)})),(0,l.arrayEach)(o,(e=>{(0,h.applySpanProperties)(...e)}))}isOverlapping(e){const t=this.hot._createCellRange(this.hot._createCellCoords(0,0),this.hot._createCellCoords(e.row,e.col),this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1));let o=!1;return(0,l.arrayEach)(this.mergedCells,(e=>!this.hot._createCellRange(this.hot._createCellCoords(0,0),this.hot._createCellCoords(e.row,e.col),this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1)).overlaps(t)||(o=!0,!1))),o}isFirstRenderableMergedCell(e,t){const o=this.get(e,t);return o&&this.hot.rowIndexMapper.getNearestNotHiddenIndex(o.row,1)===e&&this.hot.columnIndexMapper.getNearestNotHiddenIndex(o.col,1)===t}getFirstRenderableCoords(e,t){const o=this.get(e,t);if(!o||this.isFirstRenderableMergedCell(e,t))return this.hot._createCellCoords(e,t);const s=this.hot.rowIndexMapper.getNearestNotHiddenIndex(o.row,1),i=this.hot.columnIndexMapper.getNearestNotHiddenIndex(o.col,1);return this.hot._createCellCoords(s,i)}shiftCollections(e,t,o){const s=[0,0];switch(e){case"right":s[0]+=o;break;case"left":s[0]-=o;break;case"down":s[1]+=o;break;case"up":s[1]-=o}(0,l.arrayEach)(this.mergedCells,(e=>{e.shift(s,t)})),(0,n.rangeEachReverse)(this.mergedCells.length-1,0,(e=>{const t=this.mergedCells[e];t&&t.removed&&this.mergedCells.splice(this.mergedCells.indexOf(t),1)}))}}t.default=d},4146:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.default=function(e){return{key:"mergeCells",name(){const t=this.getSelectedLast();if(t){const o=e.mergedCellsCollection.get(t[0],t[1]);if(o.row===t[0]&&o.col===t[1]&&o.row+o.rowspan-1===t[2]&&o.col+o.colspan-1===t[3])return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_UNMERGE_CELLS)}return this.getTranslatedPhrase(i.CONTEXTMENU_ITEMS_MERGE_CELLS)},callback(){e.toggleMergeOnSelection()},disabled(){const e=this.getSelectedLast();if(!e)return!0;return r.default.isSingleCell({row:e[0],col:e[1],rowspan:e[2]-e[0]+1,colspan:e[3]-e[1]+1})||this.selection.isSelectedByCorner()},hidden:!1}};var i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=n(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(s,r,a):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),r=s(o(22951));function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(n=function(e){return e?o:t})(e)}},95896:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(53544);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.MergeCells=s.MergeCells},53544:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=s(o(48427)),n=s(o(42538)),a=o(36026),l=s(o(56307)),h=s(o(22603)),u=s(o(22951)),d=s(o(86805)),c=s(o(21989)),g=s(o(4146)),f=o(50095),p=o(22232),m=o(69173),w=o(68145),C=o(23916);o(70980);var v=o(83302),y=o(37595);function E(e,t){S(e,t),t.add(e)}function S(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function R(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}l.default.getSingleton().register("beforeMergeCells"),l.default.getSingleton().register("afterMergeCells"),l.default.getSingleton().register("beforeUnmergeCells"),l.default.getSingleton().register("afterUnmergeCells");const b=t.PLUGIN_KEY="mergeCells",_=t.PLUGIN_PRIORITY=150,T=b;var O=new WeakMap,M=new WeakSet,I=new WeakSet,A=new WeakSet,N=new WeakSet,P=new WeakSet,x=new WeakSet,H=new WeakSet,k=new WeakSet,D=new WeakSet,L=new WeakSet,W=new WeakSet,F=new WeakSet,V=new WeakSet,B=new WeakSet,U=new WeakSet,Y=new WeakSet,j=new WeakSet,G=new WeakSet,z=new WeakSet,K=new WeakSet,$=new WeakSet,X=new WeakSet;class q extends a.BasePlugin{constructor(){var e,t,o;super(...arguments),E(this,X),E(this,$),E(this,K),E(this,z),E(this,G),E(this,j),E(this,Y),E(this,U),E(this,B),E(this,V),E(this,F),E(this,W),E(this,L),E(this,D),E(this,k),E(this,H),E(this,x),E(this,P),E(this,N),E(this,A),E(this,I),E(this,M),(0,i.default)(this,"mergedCellsCollection",null),(0,i.default)(this,"autofillCalculations",null),(0,i.default)(this,"selectionCalculations",null),o={writable:!0,value:null},S(e=this,t=O),t.set(e,o)}static get PLUGIN_KEY(){return b}static get PLUGIN_PRIORITY(){return _}isEnabled(){return!!this.hot.getSettings()[b]}enablePlugin(){var e=this;this.enabled||(this.mergedCellsCollection=new h.default(this),this.autofillCalculations=new d.default(this),this.selectionCalculations=new c.default(this),this.addHook("afterInit",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,M,Q).call(e,...o)})),this.addHook("modifyTransformStart",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,A,Z).call(e,...o)})),this.addHook("afterModifyTransformStart",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,K,me).call(e,...o)})),this.addHook("modifyTransformEnd",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,N,ee).call(e,...o)})),this.addHook("modifyGetCellCoords",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,P,te).call(e,...o)})),this.addHook("beforeSetRangeStart",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,k,ie).call(e,...o)})),this.addHook("beforeSetRangeStartOnly",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,k,ie).call(e,...o)})),this.addHook("beforeSetRangeEnd",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,D,re).call(e,...o)})),this.addHook("afterIsMultipleSelection",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,I,J).call(e,...o)})),this.addHook("afterRenderer",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,H,se).call(e,...o)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,x,oe).call(e,...o)})),this.addHook("afterGetCellMeta",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,L,ne).call(e,...o)})),this.addHook("afterViewportRowCalculatorOverride",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,W,ae).call(e,...o)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,F,le).call(e,...o)})),this.addHook("modifyAutofillRange",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,V,he).call(e,...o)})),this.addHook("afterCreateCol",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,B,ue).call(e,...o)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,U,de).call(e,...o)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,Y,ce).call(e,...o)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,j,ge).call(e,...o)})),this.addHook("afterChange",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,G,fe).call(e,...o)})),this.addHook("beforeDrawBorders",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,z,pe).call(e,...o)})),this.addHook("afterDrawSelection",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,$,we).call(e,...o)})),this.addHook("beforeRemoveCellClassNames",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return R(e,X,Ce).call(e,...o)})),this.addHook("beforeUndoStackChange",((e,t)=>{if("MergeCells"===t)return!1})),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.clearCollections(),this.unregisterShortcuts(),this.hot.render(),super.disablePlugin()}updatePlugin(){const e=this.hot.getSettings()[b];this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(e),super.updatePlugin()}ifChromeForceRepaint(){if(!(0,y.isChrome)())return;const e=[];let t=[];this.mergedCellsCollection.mergedCells.forEach((e=>{const{row:o,rowspan:s}=e;for(let e=o+1;e<o+s;e++)t.push(e)})),t=[...new Set(t)],t.forEach((t=>{const o=this.hot.rowIndexMapper.getRenderableFromVisualIndex(t);this.hot.view._wt.wtOverlays.getOverlays(!0).map((e=>"master"===(null==e?void 0:e.name)?e:e.clone.wtTable)).forEach((t=>{const s=t.getRow(o);s&&(s.style.background=(0,v.getStyle)(s,"backgroundColor").replace(")",", 0.99)"),e.push(s))}))})),this.hot._registerTimeout((()=>{e.forEach((e=>{e.style.background=(0,v.getStyle)(e,"backgroundColor").replace(", 0.99)",")")}))}),1)}validateSetting(e){let t=!0;return!!e&&(u.default.containsNegativeValues(e)?((0,m.warn)(u.default.NEGATIVE_VALUES_WARNING(e)),t=!1):u.default.isOutOfBounds(e,this.hot.countRows(),this.hot.countCols())?((0,m.warn)(u.default.IS_OUT_OF_BOUNDS_WARNING(e)),t=!1):u.default.isSingleCell(e)?((0,m.warn)(u.default.IS_SINGLE_CELL(e)),t=!1):u.default.containsZeroSpan(e)&&((0,m.warn)(u.default.ZERO_SPAN_WARNING(e)),t=!1),t)}generateFromSettings(e){if(Array.isArray(e)){const t=[];if((0,f.arrayEach)(e,(e=>{if(!this.validateSetting(e))return;const o=this.hot._createCellCoords(e.row,e.col),s=this.hot._createCellCoords(e.row+e.rowspan-1,e.col+e.colspan-1),i=this.hot._createCellRange(o,o,s);this.mergeRange(i,!0,!0),(0,w.rangeEach)(e.row,e.row+e.rowspan-1,(o=>{(0,w.rangeEach)(e.col,e.col+e.colspan-1,(s=>{!1==(o===e.row&&s===e.col)&&t.push([o,s,null])}))}))})),0===t.length)return;this.hot.setDataAtCell(t)}}clearCollections(){this.mergedCellsCollection.clear()}canMergeRange(e){return!!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])||this.validateSetting(e)}toggleMergeOnSelection(){const e=this.hot.getSelectedRangeLast();if(!e)return;e.setDirection(this.hot.isRtl()?"NE-SW":"NW-SE");const{from:t,to:o}=e;this.toggleMerge(e),this.hot.selectCell(t.row,t.col,o.row,o.col,!1)}mergeSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!e)return;e.setDirection(this.hot.isRtl()?"NE-SW":"NW-SE");const{from:t,to:o}=e;this.unmergeRange(e,!0),this.mergeRange(e),this.hot.selectCell(t.row,t.col,o.row,o.col,!1)}unmergeSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!e)return;const{from:t,to:o}=e;this.unmergeRange(e,!0),this.hot.selectCell(t.row,t.col,o.row,o.col,!1)}mergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=e.getTopStartCorner(),i=e.getBottomEndCorner(),r={row:s.row,col:s.col,rowspan:i.row-s.row+1,colspan:i.col-s.col+1},n=[];let a=null;if(!this.canMergeRange(r,t))return!1;this.hot.runHooks("beforeMergeCells",e,t),(0,w.rangeEach)(0,r.rowspan-1,(e=>{(0,w.rangeEach)(0,r.colspan-1,(t=>{let o=null;n[e]||(n[e]=[]),0===e&&0===t?o=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(r.row),this.hot.toPhysicalColumn(r.col)):this.hot.setCellMeta(r.row+e,r.col+t,"hidden",!0),n[e][t]=o}))})),this.hot.setCellMeta(r.row,r.col,"spanned",!0);return!this.mergedCellsCollection.add(r)||(o?a=[r.row,r.col,n]:this.hot.populateFromArray(r.row,r.col,n,void 0,void 0,this.pluginName),t||this.ifChromeForceRepaint(),this.hot.runHooks("afterMergeCells",e,r,t),a)}unmergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=this.mergedCellsCollection.getWithinRange(e);o&&(this.hot.runHooks("beforeUnmergeCells",e,t),(0,f.arrayEach)(o,(e=>{this.mergedCellsCollection.remove(e.row,e.col),(0,w.rangeEach)(0,e.rowspan-1,(t=>{(0,w.rangeEach)(0,e.colspan-1,(o=>{this.hot.removeCellMeta(e.row+t,e.col+o,"hidden"),this.hot.removeCellMeta(e.row+t,e.col+o,"copyable")}))})),this.hot.removeCellMeta(e.row,e.col,"spanned")})),this.hot.runHooks("afterUnmergeCells",e,t),this.hot.render())}toggleMerge(e){const t=this.mergedCellsCollection.get(e.from.row,e.from.col);t.row===e.from.row&&t.col===e.from.col&&t.row+t.rowspan-1===e.to.row&&t.col+t.colspan-1===e.to.col?this.unmergeRange(e):this.mergeSelection(e)}merge(e,t,o,s){const i=this.hot._createCellCoords(e,t),r=this.hot._createCellCoords(o,s);this.mergeRange(this.hot._createCellRange(i,i,r))}unmerge(e,t,o,s){const i=this.hot._createCellCoords(e,t),r=this.hot._createCellCoords(o,s);this.unmergeRange(this.hot._createCellRange(i,i,r))}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control","m"]],callback:()=>{const e=this.hot.getSelectedRangeLast();e&&!e.isSingleHeader()&&(this.toggleMerge(e),this.hot.render())},runOnlyIf:e=>!e.altKey,group:T})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(T)}modifyViewportRowStart(e,t){const o=this.hot.rowIndexMapper,s=o.getVisualFromRenderableIndex(e.startRow);for(let i=0;i<t;i+=1){const r=this.mergedCellsCollection.get(s,i);if((0,p.isObject)(r)){const s=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(r.row,1));if(s<e.startRow)return e.startRow=s,void this.modifyViewportRowStart(e,t)}}}modifyViewportRowEnd(e,t){const o=this.hot.rowIndexMapper,s=o.getVisualFromRenderableIndex(e.endRow);for(let i=0;i<t;i+=1){const r=this.mergedCellsCollection.get(s,i);if((0,p.isObject)(r)){const s=r.row+r.rowspan-1,i=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(s,-1));if(i>e.endRow)return e.endRow=i,void this.modifyViewportRowEnd(e,t)}}}modifyViewportColumnStart(e,t){const o=this.hot.columnIndexMapper,s=o.getVisualFromRenderableIndex(e.startColumn);for(let i=0;i<t;i+=1){const r=this.mergedCellsCollection.get(i,s);if((0,p.isObject)(r)){const s=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(r.col,1));if(s<e.startColumn)return e.startColumn=s,void this.modifyViewportColumnStart(e,t)}}}modifyViewportColumnEnd(e,t){const o=this.hot.columnIndexMapper,s=o.getVisualFromRenderableIndex(e.endColumn);for(let i=0;i<t;i+=1){const r=this.mergedCellsCollection.get(i,s);if((0,p.isObject)(r)){const s=r.col+r.colspan-1,i=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(s,-1));if(i>e.endColumn)return e.endColumn=i,void this.modifyViewportColumnEnd(e,t)}}}translateMergedCellToRenderable(e,t,o,s){const{rowIndexMapper:i,columnIndexMapper:r}=this.hot;let n,a;n=0===t?i.getNearestNotHiddenIndex(e,1):i.getNearestNotHiddenIndex(e+t-1,-1),a=0===s?r.getNearestNotHiddenIndex(o,1):r.getNearestNotHiddenIndex(o+s-1,-1);return[e>=0?i.getRenderableFromVisualIndex(n):e,o>=0?r.getRenderableFromVisualIndex(a):o]}}function Q(){this.generateFromSettings(this.hot.getSettings()[b]),this.hot.render()}function J(e){if(e){const e=this.mergedCellsCollection.mergedCells,t=this.hot.getSelectedRangeLast();for(let o=0;o<e.length;o+=1)if(t.from.row===e[o].row&&t.from.col===e[o].col&&t.to.row===e[o].row+e[o].rowspan-1&&t.to.col===e[o].col+e[o].colspan-1)return!1}return e}function Z(e){const t=this.hot.getSelectedRangeLast();let o={row:e.row,col:e.col},s=null;const i=this.hot._createCellCoords(t.highlight.row,t.highlight.col),a=this.mergedCellsCollection.get(i.row,i.col);if((0,n.default)(this,O)||(0,r.default)(this,O,this.hot._createCellCoords(null,null)),a){const t=this.hot._createCellCoords(a.row,a.col),s=this.hot._createCellCoords(a.row+a.rowspan-1,a.col+a.colspan-1);this.hot._createCellRange(t,t,s).includes((0,n.default)(this,O))||(0,r.default)(this,O,this.hot._createCellCoords(null,null)),o.row=(0,n.default)(this,O).row?(0,n.default)(this,O).row-i.row:o.row,o.col=(0,n.default)(this,O).col?(0,n.default)(this,O).col-i.col:o.col,e.row>0?o.row=a.row+a.rowspan-1-i.row+e.row:e.row<0&&(o.row=i.row-a.row+e.row),e.col>0?o.col=a.col+a.colspan-1-i.col+e.col:e.col<0&&(o.col=i.col-a.col+e.col)}s=this.hot._createCellCoords(t.highlight.row+o.row,t.highlight.col+o.col);const l=this.mergedCellsCollection.get(s.row,s.col);if(l){const e=this.mergedCellsCollection.getFirstRenderableCoords(l.row,l.col);(0,r.default)(this,O,s),o={row:e.row-i.row,col:e.col-i.col}}0!==o.row&&(e.row=o.row),0!==o.col&&(e.col=o.col)}function ee(e){const t=this.hot.getSelectedRangeLast(),o=(0,p.clone)(e),s=this.selectionCalculations.getUpdatedSelectionRange(t,e);let i=(0,p.clone)(o);const r=this.mergedCellsCollection.getWithinRange(s,!0);do{i=(0,p.clone)(o),this.selectionCalculations.getUpdatedSelectionRange(t,o),(0,f.arrayEach)(r,(e=>{this.selectionCalculations.snapDelta(o,t,e)}))}while(o.row!==i.row||o.col!==i.col);e.row=o.row,e.col=o.col}function te(e,t){if(e<0||t<0)return;const o=this.mergedCellsCollection.get(e,t);if(!o)return;const{row:s,col:i,colspan:r,rowspan:n}=o;return[s,i,s+n-1,i+r-1]}function oe(e){e.items.push({name:"---------"},(0,g.default)(this))}function se(e,t,o){const s=this.mergedCellsCollection.get(t,o),i=(0,p.isObject)(s)?(0,p.clone)(s):void 0;if((0,p.isObject)(i)){const{rowIndexMapper:e,columnIndexMapper:s}=this.hot,{row:r,col:n,colspan:a,rowspan:l}=i,[h,u]=this.translateMergedCellToRenderable(r,l,n,a),d=h-e.getRenderableFromVisualIndex(t)+1,c=u-s.getRenderableFromVisualIndex(o)+1;i.row=e.getNearestNotHiddenIndex(i.row,1),i.col=s.getNearestNotHiddenIndex(i.col,1),i.rowspan=Math.min(i.rowspan,d),i.colspan=Math.min(i.colspan,c)}(0,C.applySpanProperties)(e,i,t,o)}function ie(e){if(this.mergedCellsCollection.isFirstRenderableMergedCell(e.row,e.col)){const t=this.mergedCellsCollection.get(e.row,e.col);[e.row,e.col]=[t.row,t.col]}}function re(e){const t=this.hot.getSelectedRangeLast();t.highlight=this.hot._createCellCoords(t.highlight.row,t.highlight.col),t.to=e;let o=!1;if(!this.hot.selection.isSelectedByColumnHeader()&&!this.hot.selection.isSelectedByRowHeader())do{o=!1;for(let s=0;s<this.mergedCellsCollection.mergedCells.length;s+=1){const i=this.mergedCellsCollection.mergedCells[s].getRange();t.expandByRange(i)&&(e.row=t.to.row,e.col=t.to.col,o=!0)}}while(o)}function ne(e,t,o){const s=this.mergedCellsCollection.get(e,t);s&&(s.row!==e||s.col!==t?o.copyable=!1:(o.rowspan=s.rowspan,o.colspan=s.colspan))}function ae(e){const t=this.hot.countCols();this.modifyViewportRowStart(e,t),this.modifyViewportRowEnd(e,t)}function le(e){const t=this.hot.countRows();this.modifyViewportColumnStart(e,t),this.modifyViewportColumnEnd(e,t)}function he(e,t){this.autofillCalculations.correctSelectionAreaSize(t);const o=this.autofillCalculations.getDirection(t,e);let s=e;if(this.autofillCalculations.dragAreaOverlapsCollections(t,s,o))return s=t,s;const i=this.mergedCellsCollection.getWithinRange({from:{row:t[0],col:t[1]},to:{row:t[2],col:t[3]}});return i?(s=this.autofillCalculations.snapDragArea(t,s,o,i),s):s}function ue(e,t){this.mergedCellsCollection.shiftCollections("right",e,t)}function de(e,t){this.mergedCellsCollection.shiftCollections("left",e,t)}function ce(e,t,o){"auto"!==o&&this.mergedCellsCollection.shiftCollections("down",e,t)}function ge(e,t){this.mergedCellsCollection.shiftCollections("up",e,t)}function fe(e,t){"Autofill.fill"===t&&this.autofillCalculations.recreateAfterDataPopulation(e)}function pe(e,t){if(t&&"area"===t){const t=this.hot.getSelectedRangeLast(),o=this.mergedCellsCollection.getWithinRange(t);(0,f.arrayEach)(o,(o=>{t.getBottomEndCorner().row===o.getLastRow()&&t.getBottomEndCorner().col===o.getLastColumn()&&(e[2]=o.row,e[3]=o.col)}))}}function me(e,t,o){if(!this.enabled)return;const s=this.mergedCellsCollection.get(e.row,e.col);if(!s)return;const i=t>0,r=t<0,n=o<0,a=o>0,l=s.row+s.rowspan-1==this.hot.countRows()-1,h=0===s.row,u=s.col+s.colspan-1==this.hot.countCols()-1,d=0===s.col;(i&&l||r&&h||a&&u||n&&d)&&(e.row=s.row,e.col=s.col)}function we(e,t,o,s){if(o)return this.selectionCalculations.getSelectedMergedCellClassName(e,t,o,s)}function Ce(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}t.MergeCells=q},23916:(e,t)=>{"use strict";t.__esModule=!0,t.applySpanProperties=function(e,t,o,s){t?t.row===o&&t.col===s?(e.setAttribute("rowspan",t.rowspan.toString()),e.setAttribute("colspan",t.colspan.toString())):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="none"):(e.removeAttribute("rowspan"),e.removeAttribute("colspan"),e.style.display="")}},82546:(e,t,o)=>{"use strict";t.__esModule=!0,t.getClassesToAdd=function(e,t,o){const i=[];if(!1===o)return i;e.isColumnSorted(t)&&e.getNumberOfSortedColumns()>1&&i.push(`${s}-${e.getIndexOfColumnInSortQueue(t)+1}`);return i},t.getClassesToRemove=function(e){const t=e.className.split(" "),o=new RegExp(`^${s}-[0-9]{1,2}$`);return t.filter((e=>o.test(e)))},o(63517);const s="sort"},13620:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(14755);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.MultiColumnSorting=s.MultiColumnSorting},14755:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(1902),n=o(51510),a=o(64951),l=o(83302),h=o(54639),u=o(67012),d=o(82546);o(2049);const c=t.PLUGIN_KEY="multiColumnSorting",g=t.PLUGIN_PRIORITY=170,f="columnSorting",p=c;(0,n.registerRootComparator)(c,h.rootComparator);class m extends r.ColumnSorting{constructor(){super(...arguments),(0,i.default)(this,"pluginKey",c)}static get PLUGIN_KEY(){return c}static get PLUGIN_PRIORITY(){return g}isEnabled(){return super.isEnabled()}enablePlugin(){!this.enabled&&this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[f]&&(0,u.warnAboutPluginsConflict)(),super.enablePlugin()}disablePlugin(){super.disablePlugin()}registerShortcuts(){super.registerShortcuts(),this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Shift","Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();-1===e.row&&e.col>=0&&this.sort(this.getNextSortConfig(e.col,r.APPEND_COLUMN_CONFIG_STRATEGY))},runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()},group:p})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(p)}sort(e){super.sort(e)}clearSort(){super.clearSort()}isSorted(){return super.isSorted()}getSortConfig(e){return super.getSortConfig(e)}setSortConfig(e){super.setSortConfig(e)}getNormalizedSortConfigs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e:[e]}updateHeaderClasses(e){for(var t=arguments.length,o=new Array(t>1?t-1:0),s=1;s<t;s++)o[s-1]=arguments[s];super.updateHeaderClasses(e,...o),(0,l.removeClass)(e,(0,d.getClassesToRemove)(e)),!1!==this.enabled&&(0,l.addClass)(e,(0,d.getClassesToAdd)(...o))}onUpdateSettings(e){this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[f]&&(0,u.warnAboutPluginsConflict)(),super.onUpdateSettings(e)}onAfterOnCellMouseDown(e,t){!1!==(0,a.wasHeaderClickedProperly)(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&(this.hot.getShortcutManager().isCtrlPressed()?(this.hot.deselectCell(),this.hot.selectColumns(t.col),this.sort(this.getNextSortConfig(t.col,r.APPEND_COLUMN_CONFIG_STRATEGY))):this.sort(this.getColumnNextConfig(t.col)))}}t.MultiColumnSorting=m},54639:(e,t,o)=>{"use strict";t.__esModule=!0,t.rootComparator=function(e,t){return function(o,i){const[,...r]=o,[,...n]=i;return function o(i){const a=e[i],l=t[i],h=r[i],u=n[i],d=l.multiColumnSorting,c=(d.compareFunctionFactory?d.compareFunctionFactory:(0,s.getCompareFunctionFactory)(l.type))(a,l,d)(h,u);if(c===s.DO_NOT_SWAP){const e=i+1;if(void 0!==t[e])return o(e)}return c}(0)}};var s=o(51510)},67012:(e,t,o)=>{"use strict";t.__esModule=!0,t.warnAboutPluginsConflict=function(){(0,s.warn)(i.toSingleLine`Plugins \`columnSorting\` and \`multiColumnSorting\` should not be enabled simultaneously.
82
+ Only \`multiColumnSorting\` will work.`)};var s=o(69173),i=o(28236)},98481:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(72774);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.MultipleSelectionHandles=s.MultipleSelectionHandles},72774:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(83302),n=o(37595),a=o(36026);const l=t.PLUGIN_KEY="multipleSelectionHandles",h=t.PLUGIN_PRIORITY=160;class u extends a.BasePlugin{constructor(){super(...arguments),(0,i.default)(this,"dragged",[]),(0,i.default)(this,"lastSetCell",null)}static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return h}isEnabled(){return(0,n.isMobileBrowser)()}enablePlugin(){this.enabled||(this.registerListeners(),super.enablePlugin())}registerListeners(){const e=this,{rootElement:t}=this.hot;function o(t){if(1===e.dragged.length)return e.dragged.splice(0,e.dragged.length),!0;const o=e.dragged.indexOf(t);if(-1===o)return!1;0===o?e.dragged=e.dragged.slice(0,1):1===o&&(e.dragged=e.dragged.slice(-1))}this.eventManager.addEventListener(t,"touchstart",(t=>{let o;return(0,r.hasClass)(t.target,"topSelectionHandle-HitArea")?(o=e.hot.getSelectedRangeLast(),e.dragged.push("top"),e.touchStartRange={width:o.getWidth(),height:o.getHeight(),direction:o.getDirection()},t.preventDefault(),!1):(0,r.hasClass)(t.target,"bottomSelectionHandle-HitArea")?(o=e.hot.getSelectedRangeLast(),e.dragged.push("bottom"),e.touchStartRange={width:o.getWidth(),height:o.getHeight(),direction:o.getDirection()},t.preventDefault(),!1):void 0})),this.eventManager.addEventListener(t,"touchend",(t=>(0,r.hasClass)(t.target,"topSelectionHandle-HitArea")?(o.call(e,"top"),e.touchStartRange=void 0,t.preventDefault(),!1):(0,r.hasClass)(t.target,"bottomSelectionHandle-HitArea")?(o.call(e,"bottom"),e.touchStartRange=void 0,t.preventDefault(),!1):void 0)),this.eventManager.addEventListener(t,"touchmove",(t=>{const{rootDocument:o}=this.hot;let s,i,r,n,a,l;if(0===e.dragged.length)return;const h=o.elementFromPoint(t.touches[0].clientX,t.touches[0].clientY);h&&h!==e.lastSetCell&&("TD"!==h.nodeName&&"TH"!==h.nodeName||(s=e.hot.getCoords(h),-1===s.col&&(s.col=0),i=e.hot.getSelectedRangeLast(),r=i.getWidth(),n=i.getHeight(),a=i.getDirection(),1===r&&1===n&&e.hot.selection.setRangeEnd(s),l=e.getCurrentRangeCoords(i,s,e.touchStartRange.direction,a,e.dragged[0]),null!==l.start&&e.hot.selection.setRangeStart(l.start),e.hot.selection.setRangeEnd(l.end),e.lastSetCell=h),t.preventDefault())}))}getCurrentRangeCoords(e,t,o,s,i){const r=e.getTopStartCorner(),n=e.getBottomEndCorner(),a=e.getBottomStartCorner(),l=e.getTopEndCorner();let h={start:null,end:null};switch(o){case"NE-SW":switch(s){case"NE-SW":case"NW-SE":h="top"===i?{start:this.hot._createCellCoords(t.row,e.highlight.col),end:this.hot._createCellCoords(a.row,t.col)}:{start:this.hot._createCellCoords(e.highlight.row,t.col),end:this.hot._createCellCoords(t.row,r.col)};break;case"SE-NW":"bottom"===i&&(h={start:this.hot._createCellCoords(n.row,t.col),end:this.hot._createCellCoords(t.row,r.col)})}break;case"NW-SE":switch(s){case"NE-SW":"top"===i?h={start:t,end:a}:h.end=t;break;case"NW-SE":"top"===i?h={start:t,end:n}:h.end=t;break;case"SE-NW":"top"===i?h={start:t,end:r}:h.end=t;break;case"SW-NE":"top"===i?h={start:t,end:l}:h.end=t}break;case"SW-NE":switch(s){case"NW-SE":h="bottom"===i?{start:this.hot._createCellCoords(t.row,r.col),end:this.hot._createCellCoords(a.row,t.col)}:{start:this.hot._createCellCoords(r.row,t.col),end:this.hot._createCellCoords(t.row,n.col)};break;case"SW-NE":h="top"===i?{start:this.hot._createCellCoords(e.highlight.row,t.col),end:this.hot._createCellCoords(t.row,n.col)}:{start:this.hot._createCellCoords(t.row,r.col),end:this.hot._createCellCoords(r.row,t.col)};break;case"SE-NW":"bottom"===i?h={start:this.hot._createCellCoords(t.row,l.col),end:this.hot._createCellCoords(r.row,t.col)}:"top"===i&&(h={start:a,end:t})}break;case"SE-NW":switch(s){case"NW-SE":case"NE-SW":case"SW-NE":"top"===i&&(h.end=t);break;case"SE-NW":"top"===i?h.end=t:h={start:t,end:r}}}return h}isDragged(){return this.dragged.length>0}}t.MultipleSelectionHandles=u},37499:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(25665);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.NestedHeaders=s.NestedHeaders},25665:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=s(o(48427)),n=s(o(42538)),a=o(83302),l=o(68145),h=o(28236),u=o(24449),d=o(69173),c=o(69167),g=o(36026),f=s(o(24768)),p=s(o(45404));function m(e,t){C(e,t),t.add(e)}function w(e,t,o){C(e,t),t.set(e,o)}function C(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function v(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(10596);const y=t.PLUGIN_KEY="nestedHeaders",E=t.PLUGIN_PRIORITY=280;var S=new WeakMap,R=new WeakMap,b=new WeakMap,_=new WeakMap,T=new WeakSet,O=new WeakSet,M=new WeakSet,I=new WeakSet,A=new WeakSet,N=new WeakSet,P=new WeakSet,x=new WeakSet,H=new WeakSet,k=new WeakSet,D=new WeakSet,L=new WeakSet,W=new WeakSet,F=new WeakSet,V=new WeakSet,B=new WeakSet,U=new WeakSet,Y=new WeakSet;class j extends g.BasePlugin{constructor(){super(...arguments),m(this,Y),m(this,U),m(this,B),m(this,V),m(this,F),m(this,W),m(this,L),m(this,D),m(this,k),m(this,H),m(this,x),m(this,P),m(this,N),m(this,A),m(this,I),m(this,M),m(this,O),m(this,T),w(this,S,{writable:!0,value:new f.default}),w(this,R,{writable:!0,value:null}),w(this,b,{writable:!0,value:null}),w(this,_,{writable:!0,value:!1}),(0,i.default)(this,"ghostTable",new p.default(this.hot,((e,t)=>this.getHeaderSettings(e,t)))),(0,i.default)(this,"detectedOverlappedHeaders",!1)}static get PLUGIN_KEY(){return y}static get PLUGIN_PRIORITY(){return E}isEnabled(){return!!this.hot.getSettings()[y]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();Array.isArray(t)&&Array.isArray(t[0])||(0,d.warn)(h.toSingleLine`Your Nested Headers plugin configuration is invalid. The settings has to be\x20
83
+ passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]`),this.addHook("init",(()=>v(this,U,ae).call(this))),this.addHook("afterLoadData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,Y,le).call(e,...o)})),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,A,X).call(e,...o)})),this.addHook("afterOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,N,q).call(e,...o)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,P,Q).call(e,...o)})),this.addHook("beforeOnCellMouseUp",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,x,J).call(e,...o)})),this.addHook("beforeSelectionHighlightSet",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,H,Z).call(e,...o)})),this.addHook("modifyTransformStart",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,k,ee).call(e,...o)})),this.addHook("afterSelection",(()=>v(this,T,G).call(this))),this.addHook("beforeViewportScrollHorizontally",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,O,z).call(e,...o)})),this.addHook("afterGetColumnHeaderRenderers",(e=>v(this,L,oe).call(this,e))),this.addHook("modifyColWidth",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,F,ie).call(e,...o)})),this.addHook("modifyColumnHeaderValue",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,V,re).call(e,...o)})),this.addHook("beforeHighlightingColumnHeader",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,M,K).call(e,...o)})),this.addHook("beforeCopy",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,I,$).call(e,...o)})),this.addHook("beforeSelectColumns",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,D,te).call(e,...o)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,W,se).call(e,...o)})),this.addHook("modifyFocusedElement",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,B,ne).call(e,...o)})),this.hot.columnIndexMapper.addLocalHook("cacheUpdated",(()=>v(this,T,G).call(this))),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",(()=>v(this,T,G).call(this))),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(!this.hot.view)return;const{nestedHeaders:e}=this.hot.getSettings();(0,n.default)(this,S).setColumnsLimit(this.hot.countCols()),Array.isArray(e)&&(this.detectedOverlappedHeaders=(0,n.default)(this,S).setState(e)),this.detectedOverlappedHeaders&&(0,d.warn)(h.toSingleLine`Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\x20
81
84
  is currently not supported.`),this.enabled&&this.hot.columnIndexMapper.hidingMapsCollection.getMergedValues().forEach(((e,t)=>{const o=!0===e?"hide-column":"show-column";(0,n.default)(this,S).triggerColumnModification(o,t)})),!(0,n.default)(this,R)&&this.enabled&&(0,r.default)(this,R,this.hot.columnIndexMapper.createChangesObserver("hiding").subscribe((e=>{e.forEach((e=>{let{op:t,index:o,newValue:s}=e;if("replace"===t){const e=!0===s?"hide-column":"show-column";(0,n.default)(this,S).triggerColumnModification(e,o)}})),this.ghostTable.buildWidthsMap()}))),this.ghostTable.setLayersCount(this.getLayersCount()).buildWidthsMap(),super.updatePlugin()}disablePlugin(){this.clearColspans(),(0,n.default)(this,S).clear(),(0,n.default)(this,R).unsubscribe(),(0,r.default)(this,R,null),this.ghostTable.clear(),super.disablePlugin()}getStateManager(){return(0,n.default)(this,S)}getLayersCount(){return(0,n.default)(this,S).getLayersCount()}getHeaderSettings(e,t){return(0,n.default)(this,S).getHeaderSettings(e,t)}clearColspans(){if(!this.hot.view)return;const{_wt:e}=this.hot.view,t=e.getSetting("columnHeaders").length,o=e.wtTable.THEAD,s=e.wtOverlays.topOverlay.clone.wtTable.THEAD,i=e.wtOverlays.topInlineStartCornerOverlay?e.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null;for(let e=0;e<t;e++){const t=o.childNodes[e];if(!t)break;const r=s.childNodes[e],n=i?i.childNodes[e]:null;for(let e=0,o=t.childNodes.length;e<o;e++)t.childNodes[e].removeAttribute("colspan"),(0,a.removeClass)(t.childNodes[e],"hiddenHeader"),r&&r.childNodes[e]&&(r.childNodes[e].removeAttribute("colspan"),(0,a.removeClass)(r.childNodes[e],"hiddenHeader")),i&&n&&n.childNodes[e]&&(n.childNodes[e].removeAttribute("colspan"),(0,a.removeClass)(n.childNodes[e],"hiddenHeader"))}}headerRendererFactory(e){var t=this;const o=this.hot.view._wt.getSetting("fixedColumnsStart");return(s,i)=>{var r;const{columnIndexMapper:l,view:h}=this.hot;let u=l.getVisualFromRenderableIndex(s);null===u&&(u=s),i.removeAttribute("colspan"),(0,a.removeClass)(i,"hiddenHeader");const{colspan:d,isHidden:c,isPlaceholder:g}=null!==(r=(0,n.default)(this,S).getHeaderSettings(e,u))&&void 0!==r?r:{label:""};if(g||c)(0,a.addClass)(i,"hiddenHeader");else if(d>1){var f,p;const{wtOverlays:e}=h._wt,t=null===(f=e.topInlineStartCornerOverlay)||void 0===f?void 0:f.clone.wtTable.THEAD.contains(i),r=null===(p=e.inlineStartOverlay)||void 0===p?void 0:p.clone.wtTable.THEAD.contains(i),n=t||r?Math.min(d,o-s):d;n>1&&i.setAttribute("colspan",n)}this.hot.view.appendColHeader(u,i,(function(){return t.getColumnHeaderValue(...arguments)}),e)}}getColumnHeaderValue(e,t){var o;const{isHidden:s,isPlaceholder:i}=null!==(o=(0,n.default)(this,S).getHeaderSettings(t,e))&&void 0!==o?o:{};return i||s?"":this.hot.getColHeader(e,t)}destroy(){(0,r.default)(this,S,null),null!==(0,n.default)(this,R)&&((0,n.default)(this,R).unsubscribe(),(0,r.default)(this,R,null)),super.destroy()}_getHeaderTreeNodeDataByCoords(e){if(!(e.row>=0||e.col<0))return(0,n.default)(this,S).getHeaderTreeNodeData(e.row,e.col)}}function G(){var e;const t=null===(e=this.hot)||void 0===e?void 0:e.getSelectedRangeLast();if(!t)return;const{highlight:o}=t;if(o.isHeader()&&o.col>=0){const e=(0,n.default)(this,S).findLeftMostColumnIndex(o.row,o.col),t=this.hot.selection.highlight.getFocus();t.visualCellRange.highlight.col=e,t.visualCellRange.from.col=e,t.visualCellRange.to.col=e,t.commit()}}function z(e){const t=this.hot.getSelectedRangeLast();if(!t)return e;const{highlight:o}=t;if(!(o.isHeader()&&o.col>=0))return e;const s=this.hot.view.getFirstFullyVisibleColumn(),i=this.hot.view.getLastFullyVisibleColumn(),r=(0,n.default)(this,S).findLeftMostColumnIndex(o.row,o.col),a=(0,n.default)(this,S).findRightMostColumnIndex(o.row,o.col);return r<s&&a>i?e:r<s?r:a}function K(e,t,o){const s=(0,n.default)(this,S).getHeaderTreeNodeData(t,e);if(!s)return e;const{columnCursor:i,selectionType:r,selectionWidth:a}=o,{isRoot:l,colspan:h}=(0,n.default)(this,S).getHeaderSettings(t,e);if(r===c.HEADER_TYPE){if(!l)return s.columnIndex}else if(r===c.ACTIVE_HEADER_TYPE&&(h>a-i||!l))return null;return e}function $(e,t,o){let{columnHeadersCount:s}=o;if(0!==s)for(let o=0;o<t.length;o++){const{startRow:s,startCol:r,endRow:a,endCol:l}=t[o],h=a-s+1;if(s>=0||1===r-l+1)break;for(let t=r;t<=l;t++)for(let o=s;o<=a;o++){var i;const s=h+o,a=t-r;if(0===a)continue;!1===(null===(i=(0,n.default)(this,S).getHeaderTreeNodeData(o,t))||void 0===i?void 0:i.isRoot)&&(e[s][a]="")}}}function X(e,t,o,s){this._getHeaderTreeNodeDataByCoords(t)&&(s.column=!0)}function q(e,t){const o=this._getHeaderTreeNodeDataByCoords(t);if(!o)return;(0,r.default)(this,b,t.clone()),(0,r.default)(this,_,!0);const{selection:s}=this.hot,i=s.isSelected()?s.getSelectedRange().current():null,n=[],{columnIndex:a,origColspan:l}=o,h=!s.inInSelection(t);e.shiftKey&&i?t.col<i.from.col?n.push(i.getTopEndCorner().col,a,t.row):t.col>i.from.col?n.push(i.getTopStartCorner().col,a+l-1,t.row):n.push(a,a+l-1,t.row):((0,u.isLeftClick)(e)||(0,u.isRightClick)(e)&&h)&&n.push(a,a+l-1,t.row),s.selectColumns(...n)}function Q(e,t,o,s){if(!this.hot.view.isMouseDown())return;const i=this._getHeaderTreeNodeDataByCoords(t);if(!i)return;const{columnIndex:r,origColspan:n}=i,a=this.hot.getSelectedRangeLast(),h=a.getTopStartCorner(),u=a.getBottomEndCorner(),{from:d}=a;s.column=!0,s.cell=!0;const c=[],g=(0,l.clamp)(t.row,-1/0,-1);t.col<d.col?c.push(u.col,r,g):t.col>d.col?c.push(h.col,r+n-1,g):c.push(r,r+n-1,g),this.hot.selection.selectColumns(...c)}function J(){(0,r.default)(this,_,!1)}function Z(){const{navigableHeaders:e}=this.hot.getSettings();if(!this.hot.view.isMouseDown()||!(0,n.default)(this,_)||!e)return;const t=this.hot.getSelectedRangeLast(),o=t.getTopStartCorner().col,s=t.getBottomEndCorner().col,{columnIndex:i,origColspan:r}=(0,n.default)(this,S).getHeaderTreeNodeData((0,n.default)(this,b).row,(0,n.default)(this,b).col);if(t.setHighlight((0,n.default)(this,b)),r>t.getWidth()||i<o||i+r-1>s){const e=(0,n.default)(this,S).findTopMostEntireHeaderLevel((0,l.clamp)(o,i,i+r-1),(0,l.clamp)(s,i,i+r-1));t.highlight.row=e,t.highlight.col=t.from.col}}function ee(e){const{highlight:t}=this.hot.getSelectedRangeLast(),o=this.hot._createCellCoords(t.row+e.row,t.col+e.col);if(!(o.isHeader()&&o.col>=0))return;const s=(0,n.default)(this,S).findLeftMostColumnIndex(o.row,o.col),i=(0,n.default)(this,S).findRightMostColumnIndex(o.row,o.col);if(e.col<0){const o=t.col>=s&&t.col<=i?s-1:i,r=this.hot.columnIndexMapper.getNearestNotHiddenIndex(o,-1);e.col=null===r?-this.hot.view.countRenderableColumnsInRange(0,t.col):-Math.max(this.hot.view.countRenderableColumnsInRange(r,t.col)-1,1)}else if(e.col>0){const o=t.col>=s&&t.col<=i?i+1:s,r=this.hot.columnIndexMapper.getNearestNotHiddenIndex(o,1);e.col=null===r?this.hot.view.countRenderableColumnsInRange(t.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(t.col,r)-1,1)}}function te(e,t){const o=e.row,s=this._getHeaderTreeNodeDataByCoords({row:o,col:e.col}),i=this._getHeaderTreeNodeDataByCoords({row:o,col:t.col});t.col<e.col?(s&&(e.col=s.columnIndex+s.origColspan-1),i&&(t.col=i.columnIndex)):t.col>=e.col&&(s&&(e.col=s.columnIndex),i&&(t.col=i.columnIndex+i.origColspan-1))}function oe(e){e.length=0;for(let t=0;t<(0,n.default)(this,S).getLayersCount();t++)e.push(this.headerRendererFactory(t))}function se(e){const t=(0,n.default)(this,S).getLayersCount();let o=e.startColumn,s=!!t;for(let i=0;i<t;i++){const t=(0,n.default)(this,S).findLeftMostColumnIndex(i,e.startColumn),r=this.hot.columnIndexMapper.getRenderableFromVisualIndex(t);if(t>=0&&(s=!1),(0,l.isNumeric)(r)&&r<e.startColumn){o=r;break}}e.startColumn=s?(0,n.default)(this,S).getHeaderTreeNodeData(0,o).columnIndex:o}function ie(e,t){const o=this.ghostTable.getWidth(t);return e>o?e:o}function re(e,t,o){var s;const{label:i}=null!==(s=(0,n.default)(this,S).getHeaderTreeNodeData(o,t))&&void 0!==s?s:{label:""};return i}function ne(e,t){if(e<0)return this.hot.getCell(e,(0,n.default)(this,S).findLeftMostColumnIndex(e,t),!0)}function ae(){this.updatePlugin()}function le(e,t){t||this.updatePlugin()}t.NestedHeaders=j},56803:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(42538)),r=s(o(48427)),n=o(50095),a=s(o(88725));function l(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var h=new WeakMap,u=new WeakMap,d=new WeakMap;t.default=class{constructor(e){l(this,h,{writable:!0,value:new Map}),l(this,u,{writable:!0,value:new Map}),l(this,d,{writable:!0,value:null}),(0,r.default)(this,d,e)}getRoots(){return Array.from((0,i.default)(this,h).values())}getRootByColumn(e){let t;return(0,i.default)(this,u).has(e)&&(t=(0,i.default)(this,h).get((0,i.default)(this,u).get(e))),t}getNode(e,t){const o=this.getRootByColumn(t);if(!o)return;const s=t-(0,i.default)(this,u).get(t);let r,n=0;return o.walkDown((o=>{const{data:{origColspan:i,headerLevel:a}}=o;if(e===a){if(s>=n&&s<=n+i-1)return r=o,r.data.isRoot=t===r.data.columnIndex,!1;n+=i}})),r}rebuildTreeIndex(){let e=0;(0,i.default)(this,u).clear(),(0,n.arrayEach)((0,i.default)(this,h),(t=>{let[,{data:{colspan:o}}]=t;for(let t=e;t<e+o;t++)(0,i.default)(this,u).set(t,e);e+=o}))}buildTree(){this.clear();const e=(0,i.default)(this,d).getColumnsCount();let t=0;for(;t<e;){const e=(0,i.default)(this,d).getHeaderSettings(0,t),o=new a.default;(0,i.default)(this,h).set(t,o),this.buildLeaves(o,t,0,e.origColspan),t+=e.origColspan}this.rebuildTreeIndex()}buildLeaves(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const r=(0,i.default)(this,d).getHeadersSettings(o,t,s);o+=1,(0,n.arrayEach)(r,(s=>{const r={...s,headerLevel:o-1,columnIndex:t};let n;1===o?(e.data=r,n=e):(n=new a.default(r),e.addChild(n)),o<(0,i.default)(this,d).getLayersCount()&&this.buildLeaves(n,t,o,s.origColspan),t+=s.origColspan}))}clear(){(0,i.default)(this,h).clear(),(0,i.default)(this,u).clear()}}},24768:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(48427)),r=s(o(42538)),n=o(50095),a=s(o(44137)),l=s(o(56803)),h=o(33987),u=o(59753),d=o(88725);function c(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var g=new WeakMap,f=new WeakMap,p=new WeakMap;t.default=class{constructor(){c(this,g,{writable:!0,value:new a.default}),c(this,f,{writable:!0,value:new l.default((0,r.default)(this,g))}),c(this,p,{writable:!0,value:[[]]})}setState(e){(0,r.default)(this,g).setData(e);let t=!1;try{(0,r.default)(this,f).buildTree()}catch(e){(0,r.default)(this,f).clear(),(0,r.default)(this,g).clear(),t=!0}return(0,i.default)(this,p,(0,u.generateMatrix)((0,r.default)(this,f).getRoots())),t}setColumnsLimit(e){(0,r.default)(this,g).setColumnsLimit(e)}mergeStateWith(e){const t=(0,n.arrayMap)(e,(e=>{let{row:t,...o}=e;return{row:t<0?this.rowCoordsToLevel(t):t,...o}}));(0,r.default)(this,g).mergeWith(t),(0,r.default)(this,f).buildTree(),(0,i.default)(this,p,(0,u.generateMatrix)((0,r.default)(this,f).getRoots()))}mapState(e){(0,r.default)(this,g).map(e),(0,r.default)(this,f).buildTree(),(0,i.default)(this,p,(0,u.generateMatrix)((0,r.default)(this,f).getRoots()))}mapNodes(e){return(0,n.arrayReduce)((0,r.default)(this,f).getRoots(),((t,o)=>(o.walkDown((o=>{const s=e(o.data);void 0!==s&&t.push(s)})),t)),[])}triggerNodeModification(e,t,o){t<0&&(t=this.rowCoordsToLevel(t));const s=(0,r.default)(this,f).getNode(t,o);let n;return s&&(n=(0,h.triggerNodeModification)(e,s,o),(0,i.default)(this,p,(0,u.generateMatrix)((0,r.default)(this,f).getRoots()))),n}triggerColumnModification(e,t){return this.triggerNodeModification(e,-1,t)}rowCoordsToLevel(e){if(e>=0)return null;const t=e+Math.max(this.getLayersCount(),1);return t<0?null:t}levelToRowCoords(e){if(e<0)return null;const t=e-Math.max(this.getLayersCount(),1);return t>=0?null:t}getHeaderSettings(e,t){var o,s;return e<0&&(e=this.rowCoordsToLevel(e)),null===e||e>=this.getLayersCount()?null:null!==(o=null===(s=(0,r.default)(this,p)[e])||void 0===s?void 0:s[t])&&void 0!==o?o:null}getHeaderTreeNodeData(e,t){const o=this.getHeaderTreeNode(e,t);return o?{...o.data}:null}getHeaderTreeNode(e,t){if(e<0&&(e=this.rowCoordsToLevel(e)),null===e||e>=this.getLayersCount())return null;const o=(0,r.default)(this,f).getNode(e,t);return o||null}findTopMostEntireHeaderLevel(e){var t;let o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const s=o-e+1;let i=!1,n=null;for(let t=e;t<=o;t++){const a=(0,r.default)(this,f).getRootByColumn(t);if(!a)break;i=!0,a.walkDown((t=>{const{columnIndex:i,headerLevel:r,origColspan:a,isHidden:l}=t.data;l||a<=s&&i>=e&&i+a-1<=o&&(null===n||r<n)&&(n=r)}),d.TRAVERSAL_DF_PRE)}return i&&null===n?-1:this.levelToRowCoords(null!==(t=n)&&void 0!==t?t:0)}findLeftMostColumnIndex(e,t){var o;const{isRoot:s}=null!==(o=this.getHeaderSettings(e,t))&&void 0!==o?o:{isRoot:!0};if(s)return t;let i=t-1;for(;i>=0;){var r;const{isRoot:t}=null!==(r=this.getHeaderSettings(e,i))&&void 0!==r?r:{isRoot:!0};if(t)break;i-=1}return i}findRightMostColumnIndex(e,t){var o;const{isRoot:s,origColspan:i}=null!==(o=this.getHeaderSettings(e,t))&&void 0!==o?o:{isRoot:!0,origColspan:1};if(s)return t+i-1;let r=t+1;for(;r<this.getColumnsCount();){var n;const{isRoot:t}=null!==(n=this.getHeaderSettings(e,r))&&void 0!==n?n:{isRoot:!0};if(t)break;r+=1}return r-1}getLayersCount(){return(0,r.default)(this,g).getLayersCount()}getColumnsCount(){return(0,r.default)(this,g).getColumnsCount()}clear(){(0,i.default)(this,p,[]),(0,r.default)(this,g).clear(),(0,r.default)(this,f).clear()}}},59753:(e,t,o)=>{"use strict";t.__esModule=!0,t.generateMatrix=function(e){const t=[];return(0,s.arrayEach)(e,(e=>{e.walkDown((e=>{const o=e.data,{origColspan:s,columnIndex:n,headerLevel:a,crossHiddenColumns:l}=o,h=function(e,t){let o;Array.isArray(e[t])?o=e[t]:(o=[],e[t]=o);return o}(t,a);let u=!1;for(let e=n;e<n+s;e++){if(l.includes(e)||u)h.push((0,i.createPlaceholderHeaderSettings)(o));else{const e=r(o);e.isRoot=!0,h.push(e),u=!0}}}))})),t},o(63517);var s=o(50095),i=o(47687);function r(e){const{crossHiddenColumns:t,...o}=(0,i.createDefaultHeaderSettings)(e);return o}},70014:(e,t,o)=>{"use strict";t.__esModule=!0,t.collapseNode=function e(t){var o;const{data:n,childs:a}=t;if(n.isCollapsed||n.isHidden||n.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if((0,r.isNodeReflectsFirstChildColspan)(t))return e(a[0]);n.isCollapsed=!0;const l=a.slice(1),h=new Set;if(l.length>0)(0,s.arrayEach)(l,(e=>{(0,r.traverseHiddenNodeColumnIndexes)(e,(e=>{h.add(e)})),e.data.clonedTree=e.cloneTree(),e.walkDown((e=>{let{data:t}=e;t.isHidden=!0}))}));else{const{origColspan:e,columnIndex:t}=n;for(let o=1;o<e;o++){const e=t+o;h.add(e)}}const u=n.colspan-(null!==(o=(0,r.getFirstChildProperty)(t,"colspan"))&&void 0!==o?o:1);return t.walkUp((e=>{const{data:t}=e;t.colspan-=u,t.colspan<=1?(t.colspan=1,t.isCollapsed=!0):(0,r.isNodeReflectsFirstChildColspan)(e)&&(t.isCollapsed=(0,r.getFirstChildProperty)(e,"isCollapsed"))})),{rollbackModification:()=>(0,i.expandNode)(t),affectedColumns:Array.from(h),colspanCompensation:u}};var s=o(50095),i=o(76885),r=o(1505)},76885:(e,t,o)=>{"use strict";t.__esModule=!0,t.expandNode=function e(t){const{data:o,childs:n}=t;if(!o.isCollapsed||o.isHidden||o.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if((0,r.isNodeReflectsFirstChildColspan)(t))return e(n[0]);o.isCollapsed=!1;const a=n.slice(1),l=new Set;let h=0;if(a.length>0)(0,s.arrayEach)(a,(e=>{e.replaceTreeWith(e.data.clonedTree),e.data.clonedTree=null;const t=e.data;h+=t.colspan,(0,r.traverseHiddenNodeColumnIndexes)(e,(e=>{l.add(e)}))}));else{const{colspan:e,origColspan:t,columnIndex:s}=o;h=t-e;for(let e=1;e<t;e++)l.add(s+e)}return t.walkUp((e=>{const{data:t}=e;t.colspan+=h,t.colspan>=t.origColspan?(t.colspan=t.origColspan,t.isCollapsed=!1):(0,r.isNodeReflectsFirstChildColspan)(e)&&(t.isCollapsed=(0,r.getFirstChildProperty)(e,"isCollapsed"))})),{rollbackModification:()=>(0,i.collapseNode)(t),affectedColumns:Array.from(l),colspanCompensation:h}};var s=o(50095),i=o(70014),r=o(1505)},82807:(e,t,o)=>{"use strict";t.__esModule=!0,t.hideColumn=function(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(s.toSingleLine`The passed node is not the last node on the tree. Only for\x20
82
85
  the last node, the hide column modification can be applied.`);const{crossHiddenColumns:o}=e.data;if(o.includes(t))return;let i=!1;if(e.walkUp((e=>{const{data:{collapsible:t}}=e;if(t)return i=!0,!1})),i)return;e.walkUp((e=>{const{data:o}=e;o.crossHiddenColumns.push(t),o.colspan>1?o.colspan-=1:o.isHidden=!0}))},o(91683),o(63517);var s=o(28236)},33987:(e,t,o)=>{"use strict";t.__esModule=!0,t.triggerNodeModification=function(e,t,o){if(!a.has(e))throw new Error(`The node modifier action ("${e}") does not exist.`);return a.get(e)(t,o)},o(91683);var s=o(70014),i=o(76885),r=o(82807),n=o(30700);const a=new Map([["collapse",s.collapseNode],["expand",i.expandNode],["hide-column",r.hideColumn],["show-column",n.showColumn]])},30700:(e,t,o)=>{"use strict";t.__esModule=!0,t.showColumn=function(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(s.toSingleLine`The passed node is not the last node on the tree. Only for\x20
83
- the last node, the show column modification can be applied.`);const{crossHiddenColumns:o}=e.data;if(!o.includes(t))return;let i=!1;if(e.walkUp((e=>{const{data:{collapsible:t}}=e;if(t)return i=!0,!1})),i)return;e.walkUp((e=>{const{data:o}=e;o.crossHiddenColumns.splice(o.crossHiddenColumns.indexOf(t),1),!o.isHidden&&o.colspan<o.origColspan&&(o.colspan+=1),o.isHidden=!1}))},o(91683);var s=o(28236)},1505:(e,t)=>{"use strict";function o(e,t){let{childs:o}=e;if(0!==o.length)return o[0].data[t]}t.__esModule=!0,t.getFirstChildProperty=o,t.isNodeReflectsFirstChildColspan=function(e){return o(e,"origColspan")===e.data.origColspan},t.traverseHiddenNodeColumnIndexes=function(e,t){e.walkDown((e=>{let{data:o,childs:s}=e;if(!o.isHidden&&(t(o.columnIndex),0===s.length))for(let e=1;e<o.colspan;e++)t(o.columnIndex+e)}))}},30742:(e,t,o)=>{"use strict";t.__esModule=!0,t.normalizeSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;const o=[];if(0===t)return o;(0,s.arrayEach)(e,(e=>{const a=[];let l=0;o.push(a),(0,s.arrayEach)(e,(e=>{const o=(0,n.createDefaultHeaderSettings)();if((0,i.isObject)(e)){const{label:t,colspan:s}=e;o.label=(0,r.stringify)(t),"number"==typeof s&&s>1&&(o.colspan=s,o.origColspan=s)}else o.label=(0,r.stringify)(e);l+=o.origColspan;let s=!1;if(l>=t&&(o.colspan=o.origColspan-(l-t),o.origColspan=o.colspan,s=!0),a.push(o),o.colspan>1)for(let e=0;e<o.colspan-1;e++)a.push((0,n.createPlaceholderHeaderSettings)());return!s}))}));const a=Math.max(...(0,s.arrayMap)(o,(e=>e.length)));return(0,s.arrayEach)(o,(e=>{if(e.length<a){const t=(0,s.arrayMap)(new Array(a-e.length),(()=>(0,n.createDefaultHeaderSettings)()));e.splice(e.length,0,...t)}})),o},o(63517);var s=o(50095),i=o(22232),r=o(93315),n=o(47687)},44137:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(42538)),r=s(o(48427)),n=o(22232),a=o(50095),l=o(30742);function h(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}const u=t.HEADER_CONFIGURABLE_PROPS=["label","collapsible"];var d=new WeakMap,c=new WeakMap,g=new WeakMap;t.default=class{constructor(){h(this,d,{writable:!0,value:[]}),h(this,c,{writable:!0,value:0}),h(this,g,{writable:!0,value:1/0})}setColumnsLimit(e){(0,r.default)(this,g,e)}setData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(0,r.default)(this,d,(0,l.normalizeSettings)(e,(0,i.default)(this,g))),(0,r.default)(this,c,(0,i.default)(this,d).length)}getData(){return(0,i.default)(this,d)}mergeWith(e){(0,a.arrayEach)(e,(e=>{let{row:t,col:o,...s}=e;const i=this.getHeaderSettings(t,o);null!==i&&(0,n.extend)(i,s,u)}))}map(e){(0,a.arrayEach)((0,i.default)(this,d),(t=>{(0,a.arrayEach)(t,(t=>{const o=e({...t});(0,n.isObject)(o)&&(0,n.extend)(t,o,u)}))}))}getHeaderSettings(e,t){var o;if(e>=(0,i.default)(this,c)||e<0)return null;const s=(0,i.default)(this,d)[e];return t>=s.length?null:null!==(o=s[t])&&void 0!==o?o:null}getHeadersSettings(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const s=[];if(e>=(0,i.default)(this,c)||e<0)return s;const r=(0,i.default)(this,d)[e];let n=0;for(let e=t;e<r.length;e++){const t=r[e];if(t.isPlaceholder)throw new Error("The first column settings cannot overlap the other header layers");if(n+=t.colspan,s.push(t),t.colspan>1&&(e+=t.colspan-1),n===o)break;if(n>o)throw new Error("The last column settings cannot overlap the other header layers")}return s}getLayersCount(){return(0,i.default)(this,c)}getColumnsCount(){return(0,i.default)(this,c)>0?(0,i.default)(this,d)[0].length:0}clear(){(0,r.default)(this,d,[]),(0,r.default)(this,c,0)}}},47687:(e,t)=>{"use strict";t.__esModule=!0,t.createDefaultHeaderSettings=function(){let{label:e="",colspan:t=1,origColspan:o=1,collapsible:s=!1,crossHiddenColumns:i=[],isCollapsed:r=!1,isHidden:n=!1,isRoot:a=!1,isPlaceholder:l=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{label:e,colspan:t,origColspan:o,collapsible:s,isCollapsed:r,crossHiddenColumns:i,isHidden:n,isRoot:a,isPlaceholder:l}},t.createPlaceholderHeaderSettings=function(){return{label:"",isPlaceholder:!0}}},45404:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(83302);t.default=class{constructor(e,t){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"nestedHeaderSettingsGetter",void 0),(0,i.default)(this,"layersCount",0),(0,i.default)(this,"container",void 0),(0,i.default)(this,"widthsMap",void 0),this.hot=e,this.nestedHeaderSettingsGetter=t,this.widthsMap=this.hot.columnIndexMapper.createAndRegisterIndexMap("nestedHeaders.widthsMap","physicalIndexToValue")}setLayersCount(e){return this.layersCount=e,this}getWidth(e){return this.widthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e))}buildWidthsMap(){this.container=this.hot.rootDocument.createElement("div"),this.container.classList.add("handsontable","htGhostTable","htAutoSize"),this._buildGhostTable(this.container),this.hot.rootDocument.body.appendChild(this.container);const e=this.container.querySelectorAll("tr:last-of-type th"),t=e.length;this.widthsMap.clear();for(let o=0;o<t;o++){const t=this.hot.columnIndexMapper.getVisualFromRenderableIndex(o),s=this.hot.toPhysicalColumn(t);this.widthsMap.setValueAtIndex(s,e[o].offsetWidth)}this.container.parentNode.removeChild(this.container),this.container=null}_buildGhostTable(e){const{rootDocument:t,columnIndexMapper:o}=this.hot,s=t.createDocumentFragment(),i=t.createElement("table"),n=!!this.hot.getSettings().dropdownMenu,a=o.getRenderableIndexesLength();for(let e=0;e<this.layersCount;e++){const s=t.createElement("tr");for(let i=0;i<a;i++){let a=o.getVisualFromRenderableIndex(i);null===a&&(a=i);const l=t.createElement("th"),h=this.nestedHeaderSettingsGetter(e,a);if(h&&(!h.isPlaceholder||h.isHidden)){let e=h.label;n&&(e+='<button class="changeType"></button>'),(0,r.fastInnerHTML)(l,e),l.colSpan=h.colspan,s.appendChild(l)}}i.appendChild(s)}s.appendChild(i),e.appendChild(s)}clear(){this.widthsMap.clear(),this.container=null}}},19508:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(68145),n=o(22232),a=o(50095);t.default=class{constructor(e,t){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"data",null),(0,i.default)(this,"plugin",void 0),(0,i.default)(this,"parentReference",new WeakMap),(0,i.default)(this,"cache",{levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap}),this.hot=t,this.plugin=e}setData(e){this.data=e}getData(){return this.data}getRawSourceData(){let e=null;return this.plugin.disableCoreAPIModifiers(),e=this.hot.getSourceData(),this.plugin.enableCoreAPIModifiers(),e}updateWithData(e){this.setData(e),this.rewriteCache()}rewriteCache(){this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap},(0,r.rangeEach)(0,this.data.length-1,(e=>{this.cacheNode(this.data[e],0,null)}))}cacheNode(e,t,o){this.cache.levels[t]||(this.cache.levels[t]=[],this.cache.levelCount+=1),this.cache.levels[t].push(e),this.cache.rows.push(e),this.cache.nodeInfo.set(e,{parent:o,row:this.cache.rows.length-1,level:t}),this.hasChildren(e)&&(0,a.arrayEach)(e.__children,(o=>{this.cacheNode(o,t+1,e)}))}getDataObject(e){return null==e?null:this.cache.rows[e]}readTreeNodes(e,t,o,s){let i=!1,r=t;if(isNaN(r)&&r.end)return r;let n=e;return n||(n={__children:this.data},i=!0,r-=1),null!=o&&r===o?{result:n,end:!0}:null!=s&&n===s?{result:r,end:!0}:(r+=1,n.__children&&(0,a.arrayEach)(n.__children,(e=>{if(this.parentReference.set(e,i?null:n),r=this.readTreeNodes(e,r,o,s),isNaN(r)&&r.end)return!1})),r)}mockParent(){const e=this.mockNode();return e.__children=this.data,e}mockNode(){const e={};return(0,n.objectEach)(this.data[0],((t,o)=>{e[o]=null})),e}getRowIndex(e){return null==e?null:this.cache.nodeInfo.get(e).row}getRowIndexWithinParent(e){let t=null;t=isNaN(e)?e:this.getDataObject(e);const o=this.getRowParent(e);return null==o?this.data.indexOf(t):o.__children.indexOf(t)}countAllRows(){const e={__children:this.data};return this.countChildren(e)}countChildren(e){let t=0,o=e;return isNaN(o)||(o=this.getDataObject(o)),o&&o.__children?((0,a.arrayEach)(o.__children,(e=>{t+=1,e.__children&&(t+=this.countChildren(e))})),t):0}getRowParent(e){let t;return t=isNaN(e)?e:this.getDataObject(e),this.getRowObjectParent(t)}getRowObjectParent(e){return e&&"object"==typeof e?this.cache.nodeInfo.get(e).parent:null}getRowLevel(e){let t=null;return t=isNaN(e)?e:this.getDataObject(e),t?this.getRowObjectLevel(t):null}getRowObjectLevel(e){return null==e?null:this.cache.nodeInfo.get(e).level}hasChildren(e){let t=e;return isNaN(t)||(t=this.getDataObject(t)),!(!t.__children||!t.__children.length)}isChild(e){return null!==this.getRowParent(e)}getChild(e,t){var o;return(null===(o=e.__children)||void 0===o?void 0:o[t])||null}isRowHighestLevel(e){return!this.isChild(e)}isParent(e){var t;let o=e;return isNaN(o)||(o=this.getDataObject(o)),o&&!!o.__children&&0!==(null===(t=o.__children)||void 0===t?void 0:t.length)}addChild(e,t){let o=t;this.hot.runHooks("beforeAddChild",e,o);let s=null;e&&(s=this.getRowIndex(e)),this.hot.runHooks("beforeCreateRow",s+this.countChildren(e)+1,1);let i=e;e||(i=this.mockParent()),i.__children||(i.__children=[]),o||(o=this.mockNode()),i.__children.push(o),this.rewriteCache();const r=this.getRowIndex(o);this.hot.rowIndexMapper.insertIndexes(r,1),this.hot.runHooks("afterCreateRow",r,1),this.hot.runHooks("afterAddChild",e,o)}addChildAtIndex(e,t,o){let s,i=o;if(i||(i=this.mockNode()),this.hot.runHooks("beforeAddChild",e,i,t),e){const o=this.getRowIndex(e)+t+1;this.hot.runHooks("beforeCreateRow",o,1),e.__children.splice(t,null,i),this.rewriteCache(),this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(e),"__children",e.__children,"NestedRows.addChildAtIndex"),this.hot.rowIndexMapper.insertIndexes(o,1),this.plugin.enableCoreAPIModifiers(),this.hot.runHooks("afterCreateRow",o,1),s=o}else this.plugin.disableCoreAPIModifiers(),this.hot.alter("insert_row_above",t,1,"NestedRows.addChildAtIndex"),this.plugin.enableCoreAPIModifiers(),s=this.getRowIndex(this.data[t]);i=this.getDataObject(s),this.hot.runHooks("afterAddChild",e,i,t)}addSibling(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"below";const o=this.translateTrimmedRow(e),s=this.getRowParent(o),i=this.getRowIndexWithinParent(o);switch(t){case"below":this.addChildAtIndex(s,i+1,null);break;case"above":this.addChildAtIndex(s,i,null)}}detachFromParent(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=null;const s=[];Array.isArray(e)?((0,r.rangeEach)(e[0],e[2],(e=>{const t=this.translateTrimmedRow(e);s.push(this.getDataObject(t))})),(0,r.rangeEach)(0,s.length-2,(e=>{this.detachFromParent(s[e],!1)})),o=s[s.length-1]):o=e;const i=this.getRowIndex(o),n=this.countChildren(o),a=this.getRowIndexWithinParent(o),l=this.getRowParent(o),h=this.getRowParent(l),u=this.getRowIndex(h);let d=null;if(this.hot.runHooks("beforeDetachChild",l,o),null!=a){const e=Array.from(new Array(i+n+1).keys()).splice(-1*(n+1));if(this.hot.runHooks("beforeRemoveRow",i,n+1,e,this.plugin.pluginName),l.__children.splice(a,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",i,n+1,e,this.plugin.pluginName),h){d=u+this.countChildren(h);const e=this.getChild(h,this.countChildren(h)-1),t=this.getRowIndex(e);this.hot.runHooks("beforeCreateRow",t+1,n+1,this.plugin.pluginName),h.__children.push(o)}else d=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",d-2,n+1,this.plugin.pluginName),this.data.push(o)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",d-2,n+1,this.plugin.pluginName),this.hot.runHooks("afterDetachChild",l,o,this.getRowIndex(o)),t&&this.hot.render()}filterData(e,t,o){const s=[];(0,a.arrayEach)(o,(e=>{s.push(this.getDataObject(e))})),(0,a.arrayEach)(s,(e=>{const t=this.getRowIndexWithinParent(e),o=this.getRowParent(e);null===o?this.data.splice(t,1):o.__children.splice(t,1)})),this.rewriteCache()}spliceData(e,t,o){const s=this.getDataObject(e-1);let i=null,r=e;s&&s.__children&&0===s.__children.length?(i=s,r=0):e<this.countAllRows()&&(i=this.getRowParent(e),r=this.getRowIndexWithinParent(e)),i?o?i.__children.splice(r,t,...o):i.__children.splice(r,t):o?this.data.splice(r,t,...o):this.data.splice(r,t),this.rewriteCache()}syncRowWithRawSource(e){let t=e,o=null;do{o=this.getRowParent(o),null!==o&&(t=o)}while(null!==o);this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndex(t),"__children",t.__children,"NestedRows.syncRowWithRawSource"),this.plugin.enableCoreAPIModifiers()}moveRow(e,t,o,s){const i=t===this.hot.countRows(),r=this.getRowParent(e),n=this.getRowIndexWithinParent(e),a=r.__children.slice(n,n+1),l=e>t;let h=i?this.getRowParent(t-1):this.getRowParent(t);null==h&&(h=this.getRowParent(t-1)),null==h&&(h=this.getDataObject(t-1)),h?h.__children||(h.__children=[]):(h=this.getDataObject(t),h.__children=[]);const u=i||o||s?h.__children.length:this.getRowIndexWithinParent(t),d=r===h;h.__children.splice(u,0,a[0]),r.__children.splice(n+(l&&d?1:0),1),this.syncRowWithRawSource(r),d||this.syncRowWithRawSource(h)}translateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.translateTrimmedRow(e):e}untranslateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.untranslateTrimmedRow(e):e}}},93363:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(54842);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.NestedRows=s.NestedRows},54842:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=s(o(42538)),n=s(o(48427)),a=o(36026),l=s(o(19508)),h=s(o(48907)),u=s(o(909)),d=s(o(27757)),c=o(69173),g=o(65320),f=o(33165),p=s(o(27170));function m(e,t){C(e,t),t.add(e)}function w(e,t,o){C(e,t),t.set(e,o)}function C(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function v(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(23118);const y=t.PLUGIN_KEY="nestedRows",E=t.PLUGIN_PRIORITY=300,S=y;var R=new WeakMap,b=new WeakMap,_=new WeakSet,T=new WeakSet,O=new WeakSet,M=new WeakSet,I=new WeakSet,N=new WeakSet,A=new WeakSet,P=new WeakSet,x=new WeakSet,H=new WeakSet,k=new WeakSet,D=new WeakSet,L=new WeakSet,W=new WeakSet,F=new WeakSet,V=new WeakSet;class B extends a.BasePlugin{constructor(){super(...arguments),m(this,V),m(this,F),m(this,W),m(this,L),m(this,D),m(this,k),m(this,H),m(this,x),m(this,P),m(this,A),m(this,N),m(this,I),m(this,M),m(this,O),m(this,T),m(this,_),(0,i.default)(this,"dataManager",null),(0,i.default)(this,"headersUI",null),(0,i.default)(this,"collapsedRowsMap",null),w(this,R,{writable:!0,value:!1}),w(this,b,{writable:!0,value:!1})}static get PLUGIN_KEY(){return y}static get PLUGIN_PRIORITY(){return E}isEnabled(){return!!this.hot.getSettings()[y]}enablePlugin(){var e=this;this.enabled||(this.collapsedRowsMap=this.hot.rowIndexMapper.registerMap("nestedRows",new f.TrimmingMap),this.dataManager=new l.default(this,this.hot),this.collapsingUI=new h.default(this,this.hot),this.headersUI=new u.default(this,this.hot),this.contextMenuUI=new d.default(this,this.hot),this.rowMoveController=new p.default(this),this.addHook("afterInit",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,W,te).call(e,...o)})),this.addHook("beforeViewRender",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,F,oe).call(e,...o)})),this.addHook("modifyRowData",(function(){return e.onModifyRowData(...arguments)})),this.addHook("modifySourceLength",(function(){return e.onModifySourceLength(...arguments)})),this.addHook("beforeDataSplice",(function(){return e.onBeforeDataSplice(...arguments)})),this.addHook("filterData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,O,j).call(e,...o)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,M,G).call(e,...o)})),this.addHook("afterGetRowHeader",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,I,z).call(e,...o)})),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,T,Y).call(e,...o)})),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,P,X).call(e,...o)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,A,$).call(e,...o)})),this.addHook("beforeAddChild",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,x,q).call(e,...o)})),this.addHook("afterAddChild",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,H,Q).call(e,...o)})),this.addHook("beforeDetachChild",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,k,J).call(e,...o)})),this.addHook("afterDetachChild",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,D,Z).call(e,...o)})),this.addHook("modifyRowHeaderWidth",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,N,K).call(e,...o)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,L,ee).call(e,...o)})),this.addHook("beforeRowMove",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,_,U).call(e,...o)})),this.addHook("beforeLoadData",(e=>v(this,V,se).call(this,e))),this.addHook("beforeUpdateData",(e=>v(this,V,se).call(this,e))),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("nestedRows"),this.unregisterShortcuts(),super.disablePlugin()}updatePlugin(){this.disablePlugin();const e=this.dataManager.getData();this.enablePlugin(),this.dataManager.updateWithData(e),super.updatePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();if(-1===e.col&&e.row>=0){const t=this.collapsingUI.translateTrimmedRow(e.row);this.collapsingUI.areChildrenCollapsed(t)?this.collapsingUI.expandChildren(t):this.collapsingUI.collapseChildren(t)}},runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()},group:S})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(S)}disableCoreAPIModifiers(){(0,n.default)(this,b,!0)}enableCoreAPIModifiers(){(0,n.default)(this,b,!1)}onModifyRowData(e){if(!(0,r.default)(this,b))return this.dataManager.getDataObject(e)}onModifySourceLength(){if(!(0,r.default)(this,b))return this.dataManager.countAllRows()}onBeforeDataSplice(e,t,o){return!(!(0,r.default)(this,b)&&!this.dataManager.isRowHighestLevel(e))||(this.dataManager.spliceData(e,t,o),!1)}destroy(){super.destroy()}}function U(e,t,o,s){return this.rowMoveController.onBeforeRowMove(e,t,o,s)}function Y(e,t,o){this.collapsingUI.toggleState(e,t,o)}function j(e,t,o){return this.collapsingUI.collapsedRowsStash.stash(),this.collapsingUI.collapsedRowsStash.trimStash(o[0],t),this.collapsingUI.collapsedRowsStash.shiftStash(o[0],null,-1*t),this.dataManager.filterData(e,t,o),(0,n.default)(this,R,!0),this.dataManager.getData().slice()}function G(e){return this.contextMenuUI.appendOptions(e)}function z(e,t){this.headersUI.appendLevelIndicators(e,t)}function K(e){return Math.max(this.headersUI.rowHeaderWidthCache,e)}function $(e,t,o,s){s!==this.pluginName&&this.hot._registerTimeout((()=>{(0,n.default)(this,R,!1),this.headersUI.updateRowHeaderWidth(),this.collapsingUI.collapsedRowsStash.applyStash()}))}function X(e,t,o){const s=Array.from(o.reduce(((e,t)=>{if(this.dataManager.isParent(t)){const o=this.dataManager.getDataObject(t).__children;return e.add(t),Array.isArray(o)&&o.forEach((t=>e.add(this.dataManager.getRowIndex(t)))),e}return e.add(t)}),new Set));o.length=0,o.push(...s)}function q(){this.collapsingUI.collapsedRowsStash.stash()}function Q(e,t){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(t)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function J(){this.collapsingUI.collapsedRowsStash.stash()}function Z(e,t,o){this.collapsingUI.collapsedRowsStash.shiftStash(o,null,-1),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function ee(){this.dataManager.rewriteCache()}function te(){this.headersUI.updateRowHeaderWidth()}function oe(e,t){(0,r.default)(this,R)&&(t.skipRender=!0)}function se(e){if(!(0,g.isArrayOfObjects)(e))return(0,c.error)("The Nested Rows plugin requires an Array of Objects as a dataset to be provided. The plugin has been disabled."),this.hot.getSettings()[y]=!1,void this.disablePlugin();this.dataManager.setData(e),this.dataManager.rewriteCache()}t.NestedRows=B},78575:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231));t.default=class{constructor(e,t){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"plugin",void 0),this.hot=t,this.plugin=e}}},48907:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=o(24449),r=o(50095),n=o(68145),a=o(83302),l=s(o(78575)),h=s(o(909));class u extends l.default{constructor(e,t){var o;super(e,t),o=this,this.dataManager=this.plugin.dataManager,this.collapsedRows=[],this.collapsedRowsStash={stash:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];o.lastCollapsedRows=o.collapsedRows.slice(0),o.expandMultipleChildren(o.lastCollapsedRows,e)},shiftStash:function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null==t&&(t=1/0),(0,r.arrayEach)(o.lastCollapsedRows,((i,r)=>{i>=e&&i<t&&(o.lastCollapsedRows[r]=i+s)}))},applyStash:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];o.collapseMultipleChildren(o.lastCollapsedRows,e),o.lastCollapsedRows=void 0},trimStash:(e,t)=>{(0,n.rangeEach)(e,e+t-1,(e=>{const t=this.lastCollapsedRows.indexOf(e);t>-1&&this.lastCollapsedRows.splice(t,1)}))}}}collapseChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=[];let i=null,n=null,a=null;return isNaN(e)?(i=e,n=this.dataManager.getRowIndex(i)):(i=this.dataManager.getDataObject(e),n=e),this.dataManager.hasChildren(i)&&(0,r.arrayEach)(i.__children,(e=>{s.push(this.dataManager.getRowIndex(e))})),a=this.collapseRows(s,!0,!1),o&&this.trimRows(a),t&&this.renderAndAdjust(),-1===this.collapsedRows.indexOf(n)&&this.collapsedRows.push(n),a}collapseMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=[];(0,r.arrayEach)(e,(e=>{s.push(...this.collapseChildren(e,!1,!1))})),o&&this.trimRows(s),t&&this.renderAndAdjust()}collapseRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.collapseRows([e],t)}collapseRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=[];return(0,r.arrayEach)(e,(e=>{s.push(e),t&&this.collapseChildRows(e,s)})),o&&this.trimRows(s),s}collapseChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const o=this.dataManager.getDataObject(e);(0,r.arrayEach)(o.__children,(e=>{const o=this.dataManager.getRowIndex(e);t.push(o),this.collapseChildRows(o,t)}))}o&&this.trimRows(t)}expandRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.expandRows([e],t)}expandRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=[];return(0,r.arrayEach)(e,(e=>{s.push(e),t&&this.expandChildRows(e,s)})),o&&this.untrimRows(s),s}expandChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const o=this.dataManager.getDataObject(e);(0,r.arrayEach)(o.__children,(e=>{if(!this.isAnyParentCollapsed(e)){const o=this.dataManager.getRowIndex(e);t.push(o),this.expandChildRows(o,t)}}))}o&&this.untrimRows(t)}expandChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=[];let i=null,n=null,a=null;return isNaN(e)?(i=e,n=this.dataManager.getRowIndex(e)):(i=this.dataManager.getDataObject(e),n=e),this.collapsedRows.splice(this.collapsedRows.indexOf(n),1),this.dataManager.hasChildren(i)&&(0,r.arrayEach)(i.__children,(e=>{const t=this.dataManager.getRowIndex(e);s.push(t)})),a=this.expandRows(s,!0,!1),o&&this.untrimRows(a),t&&this.renderAndAdjust(),a}expandMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=[];(0,r.arrayEach)(e,(e=>{s.push(...this.expandChildren(e,!1,!1))})),o&&this.untrimRows(s),t&&this.renderAndAdjust()}collapseAll(){const e=this.dataManager.getData(),t=[];(0,r.arrayEach)(e,(e=>{this.dataManager.hasChildren(e)&&t.push(e)})),this.collapseMultipleChildren(t),this.renderAndAdjust()}expandAll(){const e=this.dataManager.getData(),t=[];(0,r.arrayEach)(e,(e=>{this.dataManager.hasChildren(e)&&t.push(e)})),this.expandMultipleChildren(t),this.renderAndAdjust()}trimRows(e){this.hot.batchExecution((()=>{(0,r.arrayEach)(e,(e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!0)}))}),!0)}untrimRows(e){this.hot.batchExecution((()=>{(0,r.arrayEach)(e,(e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!1)}))}),!0)}areChildrenCollapsed(e){let t=isNaN(e)?e:this.dataManager.getDataObject(e),o=!0;return null===t&&(t={__children:this.dataManager.data}),this.dataManager.hasChildren(t)&&(0,r.arrayEach)(t.__children,(e=>{const t=this.dataManager.getRowIndex(e);if(!this.plugin.collapsedRowsMap.getValueAtIndex(t))return o=!1,!1})),o}isAnyParentCollapsed(e){let t=e;for(;null!==t;){t=this.dataManager.getRowParent(t);const e=this.dataManager.getRowIndex(t);if(this.collapsedRows.indexOf(e)>-1)return!0}return!1}toggleState(e,t){if(t.col>=0)return;const o=this.translateTrimmedRow(t.row);(0,a.hasClass)(e.target,h.default.CSS_CLASSES.button)&&(this.areChildrenCollapsed(o)?this.expandChildren(o):this.collapseChildren(o),(0,i.stopImmediatePropagation)(e))}translateTrimmedRow(e){return this.hot.toPhysicalRow(e)}untranslateTrimmedRow(e){return this.hot.toVisualRow(e)}renderAndAdjust(){this.hot.render(),this.hot.view.adjustElementsSize()}}t.default=u},27757:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=s(o(42538)),n=o(68145),a=o(50095),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=u(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),h=s(o(78575));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(u=function(e){return e?o:t})(e)}function d(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var c=new WeakMap;class g extends h.default{constructor(){super(...arguments),(0,i.default)(this,"dataManager",this.plugin.dataManager),d(this,c,{writable:!0,value:{row_above:(e,t)=>{const o=t[t.length-1];this.dataManager.addSibling(o.start.row,"above")},row_below:(e,t)=>{const o=t[t.length-1];this.dataManager.addSibling(o.start.row,"below")}}})}appendOptions(e){const t=[{key:"add_child",name(){return this.getTranslatedPhrase(l.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD)},callback:()=>{const e=this.dataManager.translateTrimmedRow(this.hot.getSelectedLast()[0]),t=this.dataManager.getDataObject(e);this.dataManager.addChild(t)},disabled:()=>{const e=this.hot.getSelectedLast();return!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{key:"detach_from_parent",name(){return this.getTranslatedPhrase(l.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD)},callback:()=>{this.dataManager.detachFromParent(this.hot.getSelectedLast())},disabled:()=>{const e=this.hot.getSelectedLast(),t=this.dataManager.translateTrimmedRow(e[0]);return!this.dataManager.getRowParent(t)||!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{name:"---------"}];return(0,n.rangeEach)(0,e.items.length-1,(o=>{if(0===o)return(0,a.arrayEach)(t,((t,s)=>{e.items.splice(o+s,0,t)})),!1})),this.modifyRowInsertingOptions(e)}modifyRowInsertingOptions(e){return(0,n.rangeEach)(0,e.items.length-1,(t=>{const o=(0,r.default)(this,c)[e.items[t].key];null!=o&&(e.items[t].callback=o)})),e}}t.default=g},909:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=o(50095),r=o(68145),n=o(83302),a=s(o(78575)),l=o(5386);class h extends a.default{static get CSS_CLASSES(){return{indicatorContainer:"ht_nestingLevels",parent:"ht_nestingParent",indicator:"ht_nestingLevel",emptyIndicator:"ht_nestingLevel_empty",button:"ht_nestingButton",expandButton:"ht_nestingExpand",collapseButton:"ht_nestingCollapse"}}constructor(e,t){super(e,t),this.dataManager=this.plugin.dataManager,this.collapsingUI=this.plugin.collapsingUI,this.rowHeaderWidthCache=null}appendLevelIndicators(e,t){const o=this.hot.toPhysicalRow(e),s=this.dataManager.getRowLevel(o),a=this.dataManager.getDataObject(o),u=t.getElementsByTagName("DIV")[0],d=u.querySelector("span.rowHeader"),c=u.querySelectorAll('[class^="ht_nesting"]'),g=this.hot.getSettings().ariaTags;if((0,i.arrayEach)(c,(e=>{e&&u.removeChild(e)})),(0,n.addClass)(t,h.CSS_CLASSES.indicatorContainer),s){const{rootDocument:e}=this.hot,t=d.cloneNode(!0);u.innerHTML="",(0,r.rangeEach)(0,s-1,(()=>{const t=e.createElement("SPAN");(0,n.addClass)(t,h.CSS_CLASSES.emptyIndicator),u.appendChild(t)})),u.appendChild(t)}if(this.dataManager.hasChildren(a)){const e=this.hot.rootDocument.createElement("DIV");g&&(0,n.setAttribute)(e,[(0,l.A11Y_HIDDEN)()]),(0,n.addClass)(t,h.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(o)?((0,n.addClass)(e,`${h.CSS_CLASSES.button} ${h.CSS_CLASSES.expandButton}`),g&&(0,n.setAttribute)(t,[(0,l.A11Y_EXPANDED)(!1)])):((0,n.addClass)(e,`${h.CSS_CLASSES.button} ${h.CSS_CLASSES.collapseButton}`),g&&(0,n.setAttribute)(t,[(0,l.A11Y_EXPANDED)(!0)])),u.appendChild(e)}}updateRowHeaderWidth(e){let t=e;t||(t=this.dataManager.cache.levelCount),this.rowHeaderWidthCache=Math.max(50,11+10*t+25),this.hot.render()}}t.default=h},27170:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(93315),n=o(69173),a=o(28236);t.default=class{constructor(e){(0,i.default)(this,"plugin",void 0),(0,i.default)(this,"hot",void 0),(0,i.default)(this,"dataManager",void 0),(0,i.default)(this,"collapsingUI",void 0),this.plugin=e,this.hot=e.hot,this.dataManager=e.dataManager,this.collapsingUI=e.collapsingUI}onBeforeRowMove(e,t,o,s){if(this.displayAPICompatibilityWarning({rows:e,finalIndex:t,dropIndex:o,movePossible:s}))return!1;this.movedToCollapsed=!1;const i=o===this.hot.countRows(),r=i?this.hot.countSourceRows():this.dataManager.translateTrimmedRow(o);let n=!0;const a=e.map((e=>{if(!n)return!1;const t=this.dataManager.translateTrimmedRow(e);return n=this.shouldAllowMoving(t,r),t})),l=-1===a.indexOf(r);if(!n||!l)return!1;const h=this.getBaseParent(a),u=this.getTargetParent(i,r),d=h===u;return this.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(u),this.collapsingUI.collapsedRowsStash.stash(),this.shiftCollapsibleParentsLocations(a,r,d),this.moveRows(a,r,u),this.dataManager.rewriteCache(),this.moveCellsMeta(a,r),this.collapsingUI.collapsedRowsStash.applyStash(!1),this.hot.runHooks("afterRowMove",e,t,o,s,s&&this.isRowOrderChanged(e,t)),this.hot.render(),this.selectCells(e,o),!1}displayAPICompatibilityWarning(e){const{rows:t,finalIndex:o,dropIndex:s,movePossible:i}=e;let l=!1;return(0,r.isUndefined)(s)&&((0,n.warn)(a.toSingleLine`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\x20
84
- when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`),this.hot.runHooks("afterRowMove",t,o,s,i,!1),l=!0),l}shouldAllowMoving(e,t){return!(this.dataManager.isParent(e)||this.dataManager.isRowHighestLevel(e)||e===t||0===t)}getBaseParent(e){return this.dataManager.getRowParent(e[0])}getTargetParent(e,t){let o=this.dataManager.getRowParent(e?t-1:t);return null==o&&(o=this.dataManager.getRowParent(t-1)),o}shiftCollapsibleParentsLocations(e,t,o){o||(Math.max(...e)<=t?this.collapsingUI.collapsedRowsStash.shiftStash(e[0],t,-1*e.length):this.collapsingUI.collapsedRowsStash.shiftStash(t,e[0],e.length))}moveRows(e,t,o){const s=t===this.dataManager.getRowIndex(o)+this.dataManager.countChildren(o)+1;this.hot.batchRender((()=>{e.forEach((e=>{this.dataManager.moveRow(e,t,this.movedToCollapsed,s)}))}))}moveCellsMeta(e,t){const o=[],s=Math.max(...e)<t;e.forEach((e=>{o.push(this.hot.getCellMetaAtRow(e))})),this.hot.spliceCellsMeta(e[0],e.length),this.hot.spliceCellsMeta(t-(s?o.length:0),0,...o)}selectCells(e,t){const o=e.length;let s=0,i=0,r=null,n=null;if(this.movedToCollapsed){let r=null;r=e[o-1]<t?this.dataManager.translateTrimmedRow(t-o):this.dataManager.translateTrimmedRow(t);const n=this.dataManager.getRowParent(null===r?this.hot.countSourceRows()-1:r-1),a=this.dataManager.getRowIndex(n);s=this.dataManager.untranslateTrimmedRow(a),i=s}else e[o-1]<t?(i=t-1,s=i-o+1):(s=t,i=s+o-1);r=this.hot.selection,n=this.hot.countCols()-1,r.setRangeStart(this.hot._createCellCoords(s,0)),r.setRangeEnd(this.hot._createCellCoords(i,n),!0)}isRowOrderChanged(e,t){return e.some(((e,o)=>e-o!==t))}}},94870:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(84340);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.PersistentState=s.PersistentState},84340:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(36026),n=s(o(40209)),a=s(o(56307));a.default.getSingleton().register("persistentStateSave"),a.default.getSingleton().register("persistentStateLoad"),a.default.getSingleton().register("persistentStateReset");const l=t.PLUGIN_KEY="persistentState",h=t.PLUGIN_PRIORITY=0;class u extends r.BasePlugin{constructor(){super(...arguments),(0,i.default)(this,"storage",void 0)}static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return h}isEnabled(){return!!this.hot.getSettings()[l]}enablePlugin(){this.enabled||(this.storage||(this.storage=new n.default(this.hot.rootElement.id,this.hot.rootWindow)),this.addHook("persistentStateSave",((e,t)=>this.saveValue(e,t))),this.addHook("persistentStateLoad",((e,t)=>this.loadValue(e,t))),this.addHook("persistentStateReset",(()=>this.resetValue())),super.enablePlugin())}disablePlugin(){this.storage=void 0,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}loadValue(e,t){t.value=this.storage.loadValue(e)}saveValue(e,t){this.storage.saveValue(e,t)}resetValue(e){void 0===e?this.storage.resetAll():this.storage.reset(e)}destroy(){super.destroy()}}t.PersistentState=u},40209:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(68983),o(63517);var i=s(o(93231)),r=o(50095);t.default=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;(0,i.default)(this,"rootWindow",void 0),(0,i.default)(this,"prefix",void 0),(0,i.default)(this,"savedKeys",[]),this.rootWindow=t,this.prefix=e,this.loadSavedKeys()}saveValue(e,t){this.rootWindow.localStorage.setItem(`${this.prefix}_${e}`,JSON.stringify(t)),-1===this.savedKeys.indexOf(e)&&(this.savedKeys.push(e),this.saveSavedKeys())}loadValue(e,t){const o=void 0===e?t:e,s=this.rootWindow.localStorage.getItem(`${this.prefix}_${o}`);return null===s?void 0:JSON.parse(s)}reset(e){this.rootWindow.localStorage.removeItem(`${this.prefix}_${e}`)}resetAll(){(0,r.arrayEach)(this.savedKeys,((e,t)=>{this.rootWindow.localStorage.removeItem(`${this.prefix}_${this.savedKeys[t]}`)})),this.clearSavedKeys()}loadSavedKeys(){const e=this.rootWindow.localStorage.getItem(`${this.prefix}__persistentStateKeys`),t="string"==typeof e?JSON.parse(e):void 0;this.savedKeys=t||[]}saveSavedKeys(){this.rootWindow.localStorage.setItem(`${this.prefix}__persistentStateKeys`,JSON.stringify(this.savedKeys))}clearSavedKeys(){this.savedKeys.length=0,this.saveSavedKeys()}}},52036:(e,t,o)=>{"use strict";t.__esModule=!0,t.getPlugin=d,t.getPluginsNames=function(){return[...l.getItems(),...h.getItems()]},t.hasPlugin=function(e){return!!d(e)},t.registerPlugin=function(e,t,o){[e,t,o]=function(e,t,o){"function"==typeof e&&(e=(t=e).PLUGIN_KEY,o=t.PLUGIN_PRIORITY);return[e,t,o]}(e,t,o),void 0===d(e)&&function(e,t,o){const i=(0,s.toUpperCaseFirst)(e);if(u.hasItem(i))throw new Error(a(i));void 0===o?h.addItem(i):l.addItem(o,i);u.addItem(i,t)}(e,t,o)},o(91683);var s=o(18609),i=o(21196),r=o(42386),n=o(57982);const a=e=>`There is already registered "${e}" plugin.`,l=(0,i.createPriorityMap)({errorPriorityExists:e=>`There is already registered plugin on priority "${e}".`,errorPriorityNaN:e=>`The priority "${e}" is not a number.`}),h=(0,n.createUniqueSet)({errorItemExists:a}),u=(0,r.createUniqueMap)({errorIdExists:a});function d(e){const t=(0,s.toUpperCaseFirst)(e);return u.getItem(t)}},27885:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(54249);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Search=s.Search},54249:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=o(36026),n=o(22232),a=o(68145),l=o(93315);function h(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function u(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const d=t.PLUGIN_KEY="search",c=t.PLUGIN_PRIORITY=190,g=function(e,t,o,s,i){e.getCellMeta(t,o).isSearchResult=i},f=function(e,t,o){return!((0,l.isUndefined)(e)||null===e||!e.toLocaleLowerCase||0===e.length)&&(!(0,l.isUndefined)(t)&&null!==t&&-1!==t.toString().toLocaleLowerCase(o.locale).indexOf(e.toLocaleLowerCase(o.locale)))};var p=new WeakSet;class m extends r.BasePlugin{constructor(){super(...arguments),h(this,p),(0,i.default)(this,"callback",g),(0,i.default)(this,"queryMethod",f),(0,i.default)(this,"searchResultClass","htSearchResult")}static get PLUGIN_KEY(){return d}static get PLUGIN_PRIORITY(){return c}isEnabled(){return this.hot.getSettings()[d]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[d];this.updatePluginSettings(t),this.addHook("beforeRenderer",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return u(e,p,w).call(e,...o)})),super.enablePlugin()}disablePlugin(){var e=this;const t=function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return u(e,p,w).call(e,...o)};this.hot.addHook("beforeRenderer",t),this.hot.addHookOnce("afterViewRender",(()=>{this.hot.removeHook("beforeRenderer",t)})),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}query(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCallback(),o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getQueryMethod();const s=this.hot.countRows(),i=this.hot.countCols(),r=[],n=this.hot;return(0,a.rangeEach)(0,s-1,(s=>{(0,a.rangeEach)(0,i-1,(i=>{const a=this.hot.getDataAtCell(s,i),l=this.hot.getCellMeta(s,i),h=l.search.callback||t,u=(l.search.queryMethod||o)(e,a,l);if(u){const e={row:s,col:i,data:a};r.push(e)}h&&h(n,s,i,a,u)}))})),r}getCallback(){return this.callback}setCallback(e){this.callback=e}getQueryMethod(){return this.queryMethod}setQueryMethod(e){this.queryMethod=e}getSearchResultClass(){return this.searchResultClass}setSearchResultClass(e){this.searchResultClass=e}updatePluginSettings(e){(0,n.isObject)(e)&&(e.searchResultClass&&this.setSearchResultClass(e.searchResultClass),e.queryMethod&&this.setQueryMethod(e.queryMethod),e.callback&&this.setCallback(e.callback))}destroy(){super.destroy()}}function w(e,t,o,s,i,r){const n=r.className||[];let a=[];"string"==typeof n?a=n.split(" "):a.push(...n),this.isEnabled()&&r.isSearchResult?a.includes(this.searchResultClass)||a.push(`${this.searchResultClass}`):a.includes(this.searchResultClass)&&a.splice(a.indexOf(this.searchResultClass),1),r.className=a.join(" ")}t.Search=m},30450:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(84310);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.TouchScroll=s.TouchScroll},84310:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=o(83302),n=o(50095),a=o(36026),l=o(7374);function h(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function u(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const d=t.PLUGIN_KEY="touchScroll",c=t.PLUGIN_PRIORITY=200;var g=new WeakSet,f=new WeakSet,p=new WeakSet;class m extends a.BasePlugin{constructor(){super(...arguments),h(this,p),h(this,f),h(this,g),(0,i.default)(this,"scrollbars",[]),(0,i.default)(this,"clones",[]),(0,i.default)(this,"lockedCollection",!1),(0,i.default)(this,"freezeOverlays",!1)}static get PLUGIN_KEY(){return d}static get PLUGIN_PRIORITY(){return c}static get SETTING_KEYS(){return!0}isEnabled(){return(0,l.isTouchSupported)()}enablePlugin(){this.enabled||(this.addHook("afterViewRender",(()=>u(this,g,w).call(this))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.lockedCollection=!1,super.updatePlugin()}disablePlugin(){super.disablePlugin()}registerEvents(){this.addHook("beforeTouchScroll",(()=>u(this,f,C).call(this))),this.addHook("afterMomentumScroll",(()=>u(this,p,v).call(this)))}}function w(){if(this.lockedCollection)return;const{topOverlay:e,bottomOverlay:t,inlineStartOverlay:o,topInlineStartCornerOverlay:s,bottomInlineStartCornerOverlay:i}=this.hot.view._wt.wtOverlays;this.lockedCollection=!0,this.scrollbars.length=0,this.scrollbars.push(e),t.clone&&this.scrollbars.push(t),this.scrollbars.push(o),s&&this.scrollbars.push(s),i&&i.clone&&this.scrollbars.push(i),this.clones=[],e.needFullRender&&this.clones.push(e.clone.wtTable.holder.parentNode),t.needFullRender&&this.clones.push(t.clone.wtTable.holder.parentNode),o.needFullRender&&this.clones.push(o.clone.wtTable.holder.parentNode),s&&this.clones.push(s.clone.wtTable.holder.parentNode),i&&i.clone&&this.clones.push(i.clone.wtTable.holder.parentNode)}function C(){this.freezeOverlays=!0,(0,n.arrayEach)(this.clones,(e=>{(0,r.addClass)(e,"hide-tween")}))}function v(){this.freezeOverlays=!1,(0,n.arrayEach)(this.clones,(e=>{(0,r.removeClass)(e,"hide-tween"),(0,r.addClass)(e,"show-tween")})),this.hot._registerTimeout((()=>{(0,n.arrayEach)(this.clones,(e=>{(0,r.removeClass)(e,"show-tween")}))}),400),(0,n.arrayEach)(this.scrollbars,(e=>{e.refresh(),e.resetFixedPosition()})),this.hot.view._wt.wtOverlays.syncScrollWithMaster()}t.TouchScroll=m},95128:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(65696);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.TrimRows=s.TrimRows},65696:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=o(36026),n=o(33165),a=o(50095);function l(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}const h=t.PLUGIN_KEY="trimRows",u=t.PLUGIN_PRIORITY=330;var d=new WeakSet;class c extends r.BasePlugin{constructor(){super(...arguments),l(this,d),(0,i.default)(this,"trimmedRowsMap",null)}static get PLUGIN_KEY(){return h}static get PLUGIN_PRIORITY(){return u}isEnabled(){return!!this.hot.getSettings()[h]}enablePlugin(){this.enabled||(this.trimmedRowsMap=this.hot.rowIndexMapper.registerMap("trimRows",new n.TrimmingMap),this.trimmedRowsMap.addLocalHook("init",(()=>function(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}(this,d,g).call(this))),super.enablePlugin())}updatePlugin(){const e=this.hot.getSettings()[h];Array.isArray(e)&&this.hot.batchExecution((()=>{this.trimmedRowsMap.clear(),(0,a.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("trimRows"),super.disablePlugin()}getTrimmedRows(){return this.trimmedRowsMap.getTrimmedIndexes()}trimRows(e){const t=this.getTrimmedRows(),o=this.isValidConfig(e);let s=t;o&&(s=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeTrimRow",t,s,o)&&(o&&this.hot.batchExecution((()=>{(0,a.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0),this.hot.runHooks("afterTrimRow",t,s,o,o&&s.length>t.length))}trimRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.trimRows(t)}untrimRows(e){const t=this.getTrimmedRows(),o=this.isValidConfig(e);let s=t;const i=this.trimmedRowsMap.getValues().slice(),r=e.length>0;o&&r&&((0,a.arrayEach)(e,(e=>{i[e]=!1})),s=(0,a.arrayReduce)(i,((e,t,o)=>(t&&e.push(o),e)),[]));!1!==this.hot.runHooks("beforeUntrimRow",t,s,o&&r)&&(o&&r&&this.trimmedRowsMap.setValues(i),this.hot.runHooks("afterUntrimRow",t,s,o&&r,o&&s.length<t.length))}untrimRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.untrimRows(t)}isTrimmed(e){return this.trimmedRowsMap.getValueAtIndex(e)||!1}untrimAll(){this.untrimRows(this.getTrimmedRows())}isValidConfig(e){const t=this.hot.countSourceRows();return e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}destroy(){super.destroy()}}function g(){const e=this.hot.getSettings()[h];Array.isArray(e)&&this.hot.batchExecution((()=>{(0,a.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0)}t.TrimRows=c},77137:(e,t,o)=>{"use strict";t.__esModule=!0;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(63704));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}t.UndoRedo=s.default,t.PLUGIN_KEY=s.PLUGIN_KEY},63704:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(56307)),r=o(50095),n=o(68145),a=o(22232),l=o(80734);const h="undoRedo",u=t.PLUGIN_KEY="undoRedo";function d(e){const t=this;this.instance=e,this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,this.enabled=!1,e.addHook("afterChange",(function(o,s){const i=o&&o.length;if(!i)return;if(!o.find((e=>{const[,,t,o]=e;return t!==o})))return;t.done((()=>{const t=o.reduce(((e,t)=>(e.push([...t]),e)),[]);(0,r.arrayEach)(t,(t=>{t[1]=e.propToCol(t[1])}));const s=i>1?this.getSelected():[[t[0][0],t[0][1]]];return new d.ChangeAction(t,s)}),s)})),e.addHook("afterCreateRow",((e,o,s)=>{t.done((()=>new d.CreateRowAction(e,o)),s)})),e.addHook("beforeRemoveRow",((o,s,i,r)=>{t.done((()=>{const i=e.toPhysicalRow(o),r=(0,a.deepClone)(t.instance.getSourceData(i,0,i+s-1,t.instance.countSourceCols()-1));return new d.RemoveRowAction(i,r,e.getSettings().fixedRowsBottom,e.getSettings().fixedRowsTop,e.rowIndexMapper.getIndexesSequence())}),r)})),e.addHook("afterCreateCol",((e,o,s)=>{t.done((()=>new d.CreateColumnAction(e,o)),s)})),e.addHook("beforeRemoveCol",((o,s,i,r)=>{t.done((()=>{const i=t.instance.getSourceDataArray(),r=(t.instance.countCols()+o)%t.instance.countCols(),a=[],l=[],h=[];(0,n.rangeEach)(i.length-1,(t=>{const o=[],l=i[t];(0,n.rangeEach)(r,r+(s-1),(t=>{o.push(l[e.toPhysicalColumn(t)])})),a.push(o)})),(0,n.rangeEach)(s-1,(t=>{h.push(e.toPhysicalColumn(r+t))})),Array.isArray(e.getSettings().colHeaders)&&(0,n.rangeEach)(s-1,(t=>{l.push(e.getSettings().colHeaders[e.toPhysicalColumn(r+t)]||null)}));const u=e.columnIndexMapper.getIndexesSequence(),c=e.rowIndexMapper.getIndexesSequence();return new d.RemoveColumnAction(r,h,a,l,u,c,e.getSettings().fixedColumnsStart)}),r)})),e.addHook("beforeCellAlignment",((e,o,s,i)=>{t.done((()=>new d.CellAlignmentAction(e,o,s,i)))})),e.addHook("beforeFilter",(e=>{t.done((()=>new d.FiltersAction(e)))})),e.addHook("beforeRowMove",((e,o)=>{!1!==e&&t.done((()=>new d.RowMoveAction(e,o)))})),e.addHook("beforeMergeCells",((o,s)=>{s||t.done((()=>new d.MergeCellsAction(e,o)))})),e.addHook("afterUnmergeCells",((o,s)=>{s||t.done((()=>new d.UnmergeCellsAction(e,o)))})),e.addHook("afterInit",(()=>{t.init()}))}d.prototype.done=function(e,t){if(this.ignoreNewActions)return;if("UndoRedo.undo"===t||"UndoRedo.redo"===t||"auto"===t)return;const o=this.doneActions.slice();if(!1===this.instance.runHooks("beforeUndoStackChange",o,t))return;const s=e(),i=this.undoneActions.slice();this.doneActions.push(s),this.instance.runHooks("afterUndoStackChange",o,this.doneActions.slice()),this.instance.runHooks("beforeRedoStackChange",i),this.undoneActions.length=0,this.instance.runHooks("afterRedoStackChange",i,this.undoneActions.slice())},d.prototype.undo=function(){if(this.isUndoAvailable()){const e=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",e);const t=this.doneActions.pop();this.instance.runHooks("afterUndoStackChange",e,this.doneActions.slice());const o=(0,a.deepClone)(t);if(!1===this.instance.runHooks("beforeUndo",o))return;this.ignoreNewActions=!0;const s=this,i=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",i),t.undo(this.instance,(()=>{s.ignoreNewActions=!1,s.undoneActions.push(t)})),this.instance.runHooks("afterRedoStackChange",i,this.undoneActions.slice()),this.instance.runHooks("afterUndo",o)}},d.prototype.redo=function(){if(this.isRedoAvailable()){const e=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",e);const t=this.undoneActions.pop();this.instance.runHooks("afterRedoStackChange",e,this.undoneActions.slice());const o=(0,a.deepClone)(t);if(!1===this.instance.runHooks("beforeRedo",o))return;this.ignoreNewActions=!0;const s=this,i=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",i),t.redo(this.instance,(()=>{s.ignoreNewActions=!1,s.doneActions.push(t)})),this.instance.runHooks("afterUndoStackChange",i,this.doneActions.slice()),this.instance.runHooks("afterRedo",o)}},d.prototype.isUndoAvailable=function(){return this.doneActions.length>0},d.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},d.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},d.prototype.isEnabled=function(){return this.enabled},d.prototype.enable=function(){if(this.isEnabled())return;const e=this.instance;var t;this.enabled=!0,(t=e).undo=function(){return t.undoRedo.undo()},t.redo=function(){return t.undoRedo.redo()},t.isUndoAvailable=function(){return t.undoRedo.isUndoAvailable()},t.isRedoAvailable=function(){return t.undoRedo.isRedoAvailable()},t.clearUndo=function(){return t.undoRedo.clear()},this.registerShortcuts(),e.addHook("afterChange",f)},d.prototype.disable=function(){if(!this.isEnabled())return;const e=this.instance;var t;this.enabled=!1,delete(t=e).undo,delete t.redo,delete t.isUndoAvailable,delete t.isRedoAvailable,delete t.clearUndo,this.unregisterShortcuts(),e.removeHook("afterChange",f)},d.prototype.destroy=function(){this.clear(),this.instance=null,this.doneActions=null,this.undoneActions=null},d.Action=function(){},d.Action.prototype.undo=function(){},d.Action.prototype.redo=function(){},d.ChangeAction=function(e,t){this.changes=e,this.selected=t,this.actionType="change"},(0,a.inherit)(d.ChangeAction,d.Action),d.ChangeAction.prototype.undo=function(e,t){const o=(0,a.deepClone)(this.changes),s=e.countEmptyRows(!0),i=e.countEmptyCols(!0);for(let e=0,t=o.length;e<t;e++)o[e].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtCell(o,null,null,"UndoRedo.undo");for(let t=0,r=o.length;t<r;t++){const[r,n]=o[t];e.getSettings().minSpareRows&&r+1+e.getSettings().minSpareRows===e.countRows()&&s===e.getSettings().minSpareRows&&(e.alter("remove_row",parseInt(r+1,10),e.getSettings().minSpareRows),e.undoRedo.doneActions.pop()),e.getSettings().minSpareCols&&n+1+e.getSettings().minSpareCols===e.countCols()&&i===e.getSettings().minSpareCols&&(e.alter("remove_col",parseInt(n+1,10),e.getSettings().minSpareCols),e.undoRedo.doneActions.pop())}e.selectCells(this.selected,!1,!1)},d.ChangeAction.prototype.redo=function(e,t){const o=(0,a.deepClone)(this.changes);for(let e=0,t=o.length;e<t;e++)o[e].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtCell(o,null,null,"UndoRedo.redo"),this.selected&&e.selectCells(this.selected,!1,!1)},d.CreateRowAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_row"},(0,a.inherit)(d.CreateRowAction,d.Action),d.CreateRowAction.prototype.undo=function(e,t){const o=e.countRows(),s=e.getSettings().minSpareRows;this.index>=o&&this.index-s<o&&(this.index-=s),e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.amount,"UndoRedo.undo")},d.CreateRowAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row_above",this.index,this.amount,"UndoRedo.redo")},d.RemoveRowAction=function(e,t,o,s,i){this.index=e,this.data=t,this.actionType="remove_row",this.fixedRowsBottom=o,this.fixedRowsTop=s,this.rowIndexesSequence=i},(0,a.inherit)(d.RemoveRowAction,d.Action),d.RemoveRowAction.prototype.undo=function(e,t){const o=e.getSettings(),s=[];o.fixedRowsBottom=this.fixedRowsBottom,o.fixedRowsTop=this.fixedRowsTop,this.data.forEach(((e,t)=>{Object.keys(e).forEach((o=>{const i=parseInt(o,10);s.push([this.index+t,isNaN(i)?o:i,e[o]])}))})),e.alter("insert_row_above",this.index,this.data.length,"UndoRedo.undo"),e.addHookOnce("afterViewRender",t),e.setSourceDataAtCell(s,null,null,"UndoRedo.undo"),e.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence)},d.RemoveRowAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.data.length,"UndoRedo.redo")},d.CreateColumnAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_col"},(0,a.inherit)(d.CreateColumnAction,d.Action),d.CreateColumnAction.prototype.undo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")},d.CreateColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col_start",this.index,this.amount,"UndoRedo.redo")},d.RemoveColumnAction=function(e,t,o,s,i,r,n){this.index=e,this.indexes=t,this.data=o,this.amount=this.data[0].length,this.headers=s,this.columnPositions=i.slice(0),this.rowPositions=r.slice(0),this.actionType="remove_col",this.fixedColumnsStart=n},(0,a.inherit)(d.RemoveColumnAction,d.Action),d.RemoveColumnAction.prototype.undo=function(e,t){e.getSettings().fixedColumnsStart=this.fixedColumnsStart;const o=this.indexes.slice(0).sort(),s=(e,t,s)=>s[this.indexes.indexOf(o[t])],i=this.data.length,n=[];for(let e=0;e<i;e++)n.push((0,r.arrayMap)(this.data[e],s));const a=(0,r.arrayMap)(this.headers,s),l=[];e.alter("insert_col_start",this.indexes[0],this.indexes.length,"UndoRedo.undo"),(0,r.arrayEach)(e.getSourceDataArray(),((e,t)=>{(0,r.arrayEach)(o,((o,s)=>{e[o]=n[t][s],l.push([t,o,e[o]])}))})),e.setSourceDataAtCell(l,void 0,void 0,"UndoRedo.undo"),void 0!==this.headers&&(0,r.arrayEach)(a,((t,s)=>{e.getSettings().colHeaders[o[s]]=t})),e.batchExecution((()=>{e.rowIndexMapper.setIndexesSequence(this.rowPositions),e.columnIndexMapper.setIndexesSequence(this.columnPositions)}),!0),e.addHookOnce("afterViewRender",t),e.render()},d.RemoveColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.redo")},d.CellAlignmentAction=function(e,t,o,s){this.stateBefore=e,this.range=t,this.type=o,this.alignment=s},d.CellAlignmentAction.prototype.undo=function(e,t){(0,r.arrayEach)(this.range,(t=>{t.forAll(((t,o)=>{t>=0&&o>=0&&e.setCellMeta(t,o,"className",this.stateBefore[t][o]||" htLeft")}))})),e.addHookOnce("afterViewRender",t),e.render()},d.CellAlignmentAction.prototype.redo=function(e,t){(0,l.align)(this.range,this.type,this.alignment,((t,o)=>e.getCellMeta(t,o)),((t,o,s,i)=>e.setCellMeta(t,o,s,i))),e.addHookOnce("afterViewRender",t),e.render()},d.FiltersAction=function(e){this.conditionsStack=e,this.actionType="filter"},(0,a.inherit)(d.FiltersAction,d.Action),d.FiltersAction.prototype.undo=function(e,t){const o=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),o.conditionCollection.importAllConditions(this.conditionsStack.slice(0,this.conditionsStack.length-1)),o.filter()},d.FiltersAction.prototype.redo=function(e,t){const o=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),o.conditionCollection.importAllConditions(this.conditionsStack),o.filter()};class c extends d.Action{constructor(e,t){super(),this.cellRange=t;const o=this.cellRange.getTopStartCorner(),s=this.cellRange.getBottomEndCorner();this.rangeData=e.getData(o.row,o.col,s.row,s.col)}undo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.unmergeRange(this.cellRange,!0);const s=this.cellRange.getTopStartCorner();e.populateFromArray(s.row,s.col,this.rangeData,void 0,void 0,"MergeCells")}redo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.mergeRange(this.cellRange)}}d.MergeCellsAction=c;class g extends d.Action{constructor(e,t){super(),this.cellRange=t}undo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.mergeRange(this.cellRange,!0)}redo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.unmergeRange(this.cellRange,!0),e.render()}}function f(e,t){if("loadData"===t)return this.undoRedo.clear()}d.UnmergeCellsAction=g,d.RowMoveAction=function(e,t){this.rows=e.slice(),this.finalIndex=t,this.actionType="row_move"},(0,a.inherit)(d.RowMoveAction,d.Action),d.RowMoveAction.prototype.undo=function(e,t){const o=e.getPlugin("manualRowMove"),s=[].concat(this.rows),i=s.filter((e=>e>this.finalIndex)),r=s.filter((e=>e<=this.finalIndex)),n=i.sort(((e,t)=>t-e)).concat(r.sort(((e,t)=>e-t)));e.addHookOnce("afterViewRender",t);for(let t=0;t<n.length;t+=1){const s=e.toVisualRow(n[t]);o.moveRow(s,n[t])}e.render(),e.deselectCell(),e.selectRows(this.rows[0],this.rows[0]+this.rows.length-1)},d.RowMoveAction.prototype.redo=function(e,t){const o=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t),o.moveRows(this.rows.slice(),this.finalIndex),e.render(),e.deselectCell(),e.selectRows(this.finalIndex,this.finalIndex+this.rows.length-1)},d.prototype.init=function(){const e=this.instance.getSettings().undo,t=void 0===e||e;this.instance.undoRedo||(this.instance.undoRedo=this),t?this.instance.undoRedo.enable():this.instance.undoRedo.disable()},d.prototype.registerShortcuts=function(){const e=this.instance.getShortcutManager().getContext("grid"),t={runOnlyIf:e=>!e.altKey,group:h};e.addShortcuts([{keys:[["Control/Meta","z"]],callback:()=>{this.undo()}},{keys:[["Control/Meta","y"],["Control/Meta","Shift","z"]],callback:()=>{this.redo()}}],t)},d.prototype.unregisterShortcuts=function(){this.instance.getShortcutManager().getContext("grid").removeShortcutsByGroup(h)};const p=i.default.getSingleton();p.add("afterUpdateSettings",(function(){var e;null===(e=this.getPlugin("undoRedo"))||void 0===e||e.init()})),p.register("beforeUndo"),p.register("afterUndo"),p.register("beforeRedo"),p.register("afterRedo"),d.PLUGIN_KEY=u,d.SETTING_KEYS=!0;t.default=d},62929:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllModules=function(){(0,s.registerAllEditors)(),(0,i.registerAllRenderers)(),(0,r.registerAllValidators)(),(0,n.registerAllCellTypes)(),(0,a.registerAllPlugins)()};var s=o(74465);t.registerAllEditors=s.registerAllEditors;var i=o(42418);t.registerAllRenderers=i.registerAllRenderers;var r=o(12630);t.registerAllValidators=r.registerAllValidators;var n=o(74319);t.registerAllCellTypes=n.registerAllCellTypes;var a=o(40106);t.registerAllPlugins=a.registerAllPlugins},1470:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.autocompleteRenderer=u;var i=o(95025),r=o(50695),n=s(o(75244)),a=o(83302);o(67004);var l=o(5386);const h=t.RENDERER_TYPE="autocomplete";function u(e,t,o,s,h,u,d){const{rootDocument:c}=e,g=d.allowHtml?i.htmlRenderer:r.textRenderer,f=c.createElement("DIV"),p=e.getSettings().ariaTags;if(f.className="htAutocompleteArrow",p&&f.setAttribute(...(0,l.A11Y_HIDDEN)()),f.appendChild(c.createTextNode(String.fromCharCode(9660))),g.apply(this,[e,t,o,s,h,u,d]),t.firstChild||t.appendChild(c.createTextNode(String.fromCharCode(160))),t.insertBefore(f,t.firstChild),(0,a.addClass)(t,"htAutocomplete"),!e.acArrowListener){const i=new n.default(e);e.acArrowListener=function(i){(0,a.hasClass)(i.target,"htAutocompleteArrow")&&e.view._wt.getSetting("onCellDblClick",null,e._createCellCoords(o,s),t)},i.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",(()=>{i.destroy()}))}}u.RENDERER_TYPE=h},16124:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(1470);t.RENDERER_TYPE=s.RENDERER_TYPE,t.autocompleteRenderer=s.autocompleteRenderer},24945:(e,t,o)=>{"use strict";t.__esModule=!0,t.baseRenderer=n,o(63517);var s=o(83302),i=o(5386);const r=t.RENDERER_TYPE="base";function n(e,t,o,r,n,a,l){const h=l.ariaTags,u=[],d=[],c=[],g=[];l.className&&(0,s.addClass)(t,l.className),l.readOnly?(u.push(l.readOnlyCellClassName),h&&g.push((0,i.A11Y_READONLY)())):h&&c.push((0,i.A11Y_READONLY)()[0]),!1===l.valid&&l.invalidCellClassName?(u.push(l.invalidCellClassName),h&&g.push((0,i.A11Y_INVALID)())):(d.push(l.invalidCellClassName),h&&c.push((0,i.A11Y_INVALID)()[0])),!1===l.wordWrap&&l.noWordWrapClassName&&u.push(l.noWordWrapClassName),!a&&l.placeholder&&u.push(l.placeholderCellClassName),(0,s.removeClass)(t,d),(0,s.addClass)(t,u),(0,s.removeAttribute)(t,c),(0,s.setAttribute)(t,g)}n.RENDERER_TYPE=r},60686:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(24945);t.RENDERER_TYPE=s.RENDERER_TYPE,t.baseRenderer=s.baseRenderer},41901:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.checkboxRenderer=v,o(63517);var i=o(60686),r=s(o(75244)),n=o(83302),a=o(93315),l=o(29282),h=s(o(56307)),u=o(5386),d=o(77516);o(51768);const c=new WeakMap,g=new WeakMap,f="htBadValue",p="data-row",m="data-col",w="checkboxRenderer",C=t.RENDERER_TYPE="checkbox";function v(e,t,o,s,h,C,v){const{rootDocument:E}=e,S=e.getSettings().ariaTags;i.baseRenderer.apply(this,[e,t,o,s,h,C,v]),function(e){let t=g.get(e);if(!t){const{rootElement:o}=e;t=new r.default(e),t.addEventListener(o,"click",(t=>function(e,t){const{target:o}=e;if(!y(o))return;if(!o.hasAttribute(p)||!o.hasAttribute(m))return;const s=parseInt(o.getAttribute(p),10),i=parseInt(o.getAttribute(m),10),r=t.getCellMeta(s,i);r.readOnly&&e.preventDefault()}(t,e))),t.addEventListener(o,"mouseup",(t=>function(e,t){const{target:o}=e;if(!y(o))return;if(!o.hasAttribute(p)||!o.hasAttribute(m))return;setTimeout(t.listen,10)}(t,e))),t.addEventListener(o,"change",(t=>function(e,t){const{target:o}=e;if(!y(o))return;if(!o.hasAttribute(p)||!o.hasAttribute(m))return;const s=parseInt(o.getAttribute(p),10),i=parseInt(o.getAttribute(m),10),r=t.getCellMeta(s,i);if(!r.readOnly){let o=null;o=e.target.checked?void 0===r.uncheckedTemplate||r.checkedTemplate:void 0!==r.uncheckedTemplate&&r.uncheckedTemplate,t.setDataAtCell(s,i,o)}}(t,e))),g.set(e,t)}}(e);let R=function(e){const t=e.createElement("input");return t.className="htCheckboxRendererInput",t.type="checkbox",t.setAttribute("tabindex","-1"),t.cloneNode(!1)}(E);const b=v.label;let _=!1;if(void 0===v.checkedTemplate&&(v.checkedTemplate=!0),void 0===v.uncheckedTemplate&&(v.uncheckedTemplate=!1),(0,n.empty)(t),C===v.checkedTemplate||(0,a.stringify)(C).toLocaleLowerCase(v.locale)===(0,a.stringify)(v.checkedTemplate).toLocaleLowerCase(v.locale)?R.checked=!0:C===v.uncheckedTemplate||(0,a.stringify)(C).toLocaleLowerCase(v.locale)===(0,a.stringify)(v.uncheckedTemplate).toLocaleLowerCase(v.locale)?R.checked=!1:(0,a.isEmpty)(C)?(0,n.addClass)(R,"noValue"):(R.style.display="none",(0,n.addClass)(R,f),_=!0),(0,n.setAttribute)(R,[[p,o],[m,s]]),S&&(0,n.setAttribute)(R,[(0,u.A11Y_LABEL)(R.checked?e.getTranslatedPhrase(d.CHECKBOX_CHECKED):e.getTranslatedPhrase(d.CHECKBOX_UNCHECKED)),(0,u.A11Y_CHECKED)(R.checked),(0,u.A11Y_CHECKBOX)()]),!_&&b){let i="";if(b.value)i="function"==typeof b.value?b.value.call(this,o,s,h,C):b.value;else if(b.property){const t=e.getDataAtRowProp(o,b.property);i=null!==t?t:""}const r=function(e,t,o){const s=e.createElement("label");return s.className="htCheckboxRendererLabel "+(o?"fullWidth":""),s.appendChild(e.createTextNode(t)),s.cloneNode(!0)}(E,i,!0!==b.separated);"before"===b.position?b.separated?(t.appendChild(r),t.appendChild(R)):(r.appendChild(R),R=r):b.position&&"after"!==b.position||(b.separated?(t.appendChild(R),t.appendChild(r)):(r.insertBefore(R,r.firstChild),R=r))}function T(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const o=e.getSelectedRange();if(o)for(let s=0;s<o.length;s++){const{row:i,col:r}=o[s].getTopStartCorner(),{row:n,col:a}=o[s].getBottomEndCorner(),l=[];for(let o=i;o<=n;o+=1)for(let s=r;s<=a;s+=1){const i=e.getCellMeta(o,s);if("checkbox"!==i.type)return;if(!0===i.readOnly)continue;void 0===i.checkedTemplate&&(i.checkedTemplate=!0),void 0===i.uncheckedTemplate&&(i.uncheckedTemplate=!1);const r=e.getDataAtCell(o,s);!1===t?[i.checkedTemplate,i.checkedTemplate.toString()].includes(r)?l.push([o,s,i.uncheckedTemplate]):[i.uncheckedTemplate,i.uncheckedTemplate.toString(),null,void 0].includes(r)&&l.push([o,s,i.checkedTemplate]):l.push([o,s,i.uncheckedTemplate])}l.length>0&&e.setDataAtCell(l)}}function O(){const t=e.getSelectedRange();if(t){for(let o=0;o<t.length;o++){const s=t[o].getTopStartCorner(),i=t[o].getBottomEndCorner();for(let t=s.row;t<=i.row;t++)for(let o=s.col;o<=i.col;o++){const s=e.getCellMeta(t,o);if("checkbox"!==s.type)return!1;const i=e.getCell(t,o);if(null==i)return!0;if(i.querySelectorAll("input[type=checkbox]").length>0&&!s.readOnly)return!0}}return!1}}(!b||b&&!b.separated)&&t.appendChild(R),_&&t.appendChild(E.createTextNode("#bad-value#")),c.has(e)||(c.set(e,!0),function(){const t=e.getShortcutManager().getContext("grid"),o={group:w};t.addShortcuts([{keys:[["space"]],callback:()=>(T(),!O())},{keys:[["enter"]],callback:()=>(T(),!O()),runOnlyIf:()=>e.getSettings().enterBeginsEditing},{keys:[["delete"],["backspace"]],callback:()=>(T(!0),!O()),relativeToGroup:l.EDITOR_EDIT_GROUP,position:"before"}],o)}())}function y(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}h.default.getSingleton().add("modifyAutoColumnSizeSeed",(function(e,t,o){const{label:s,type:i,row:r,column:n,prop:a}=t;if(i===C){if(s){const{value:t,property:i}=s;let l=o;if(t)l="function"==typeof t?t(r,n,a,o):t;else if(i){const e=this.getDataAtRowProp(r,i);l=null!==e?e:o}e=l}return e}})),v.RENDERER_TYPE=C},8877:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(41901);t.RENDERER_TYPE=s.RENDERER_TYPE,t.checkboxRenderer=s.checkboxRenderer},22137:(e,t,o)=>{"use strict";t.__esModule=!0,t.dateRenderer=r;var s=o(16124);const i=t.RENDERER_TYPE="date";function r(e,t,o,i,r,n,a){s.autocompleteRenderer.apply(this,[e,t,o,i,r,n,a])}r.RENDERER_TYPE=i},56522:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(22137);t.RENDERER_TYPE=s.RENDERER_TYPE,t.dateRenderer=s.dateRenderer},33979:(e,t,o)=>{"use strict";t.__esModule=!0,t.handsontableRenderer=r;var s=o(16124);const i=t.RENDERER_TYPE="handsontable";function r(e,t,o,i,r,n,a){s.autocompleteRenderer.apply(this,[e,t,o,i,r,n,a])}r.RENDERER_TYPE=i},67981:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(33979);t.RENDERER_TYPE=s.RENDERER_TYPE,t.handsontableRenderer=s.handsontableRenderer},91897:(e,t,o)=>{"use strict";t.__esModule=!0,t.htmlRenderer=n;var s=o(60686),i=o(83302);const r=t.RENDERER_TYPE="html";function n(e,t,o,r,n,a,l){s.baseRenderer.apply(this,[e,t,o,r,n,a,l]),(0,i.fastInnerHTML)(t,null==a?"":a,!1)}n.RENDERER_TYPE=r},95025:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(91897);t.RENDERER_TYPE=s.RENDERER_TYPE,t.htmlRenderer=s.htmlRenderer},42418:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllRenderers=function(){(0,d.registerRenderer)(s.autocompleteRenderer),(0,d.registerRenderer)(i.baseRenderer),(0,d.registerRenderer)(r.checkboxRenderer),(0,d.registerRenderer)(n.htmlRenderer),(0,d.registerRenderer)(a.numericRenderer),(0,d.registerRenderer)(l.passwordRenderer),(0,d.registerRenderer)(h.textRenderer),(0,d.registerRenderer)(u.timeRenderer)};var s=o(16124);t.autocompleteRenderer=s.autocompleteRenderer,t.AUTOCOMPLETE_RENDERER=s.RENDERER_TYPE;var i=o(60686);t.baseRenderer=i.baseRenderer,t.BASE_RENDERER=i.RENDERER_TYPE;var r=o(8877);t.checkboxRenderer=r.checkboxRenderer,t.CHECKBOX_RENDERER=r.RENDERER_TYPE;var n=o(95025);t.htmlRenderer=n.htmlRenderer,t.HTML_RENDERER=n.RENDERER_TYPE;var a=o(78416);t.numericRenderer=a.numericRenderer,t.NUMERIC_RENDERER=a.RENDERER_TYPE;var l=o(76978);t.passwordRenderer=l.passwordRenderer,t.PASSWORD_RENDERER=l.RENDERER_TYPE;var h=o(50695);t.textRenderer=h.textRenderer,t.TEXT_RENDERER=h.RENDERER_TYPE;var u=o(43853);t.timeRenderer=u.timeRenderer,t.TIME_RENDERER=u.RENDERER_TYPE;var d=o(7462);t.registerRenderer=d.registerRenderer,t.getRegisteredRendererNames=d.getRegisteredRendererNames,t.getRegisteredRenderers=d.getRegisteredRenderers,t.getRenderer=d.getRenderer,t.hasRenderer=d.hasRenderer},78416:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(77635);t.RENDERER_TYPE=s.RENDERER_TYPE,t.numericRenderer=s.numericRenderer},77635:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.numericRenderer=l,o(63517);var i=s(o(3333)),r=o(50695),n=o(68145);const a=t.RENDERER_TYPE="numeric";function l(e,t,o,s,a,l,h){let u=l;if((0,n.isNumeric)(u)){const e=h.numericFormat,o=e&&e.culture||"-",s=e&&e.pattern,r=h.className||"",n=r.length?r.split(" "):[];if(void 0!==o&&!i.default.languages()[o]){const e=o.replace("-",""),t=i.default.allLanguages?i.default.allLanguages[o]:i.default[e];t&&i.default.registerLanguage(t)}i.default.setLanguage(o),u=(0,i.default)(u).format(s||"0"),n.indexOf("htLeft")<0&&n.indexOf("htCenter")<0&&n.indexOf("htRight")<0&&n.indexOf("htJustify")<0&&n.push("htRight"),n.indexOf("htNumeric")<0&&n.push("htNumeric"),h.className=n.join(" "),t.dir="ltr"}(0,r.textRenderer)(e,t,o,s,a,u,h)}l.RENDERER_TYPE=a},76978:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(58486);t.RENDERER_TYPE=s.RENDERER_TYPE,t.passwordRenderer=s.passwordRenderer},58486:(e,t,o)=>{"use strict";t.__esModule=!0,t.passwordRenderer=a;var s=o(50695),i=o(83302),r=o(68145);const n=t.RENDERER_TYPE="password";function a(e,t,o,n,a,l,h){s.textRenderer.apply(this,[e,t,o,n,a,l,h]);const u=h.hashLength||t.innerHTML.length,d=h.hashSymbol||"*";let c="";(0,r.rangeEach)(u-1,(()=>{c+=d})),(0,i.fastInnerHTML)(t,c)}a.RENDERER_TYPE=n},7462:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getRenderer=function(e){if("function"==typeof e)return e;if(!a(e))throw Error(`No registered renderer found under "${e}" name`);return n(e)},t.registerRenderer=function(e,t){"string"!=typeof e&&(e=(t=e).RENDERER_TYPE);r(e,t)},o(91683);var i=s(o(63800));const{register:r,getItem:n,hasItem:a,getNames:l,getValues:h}=(0,i.default)("renderers");t.getRegisteredRenderers=h,t.getRegisteredRendererNames=l,t.hasRenderer=a},73619:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(33845);t.RENDERER_TYPE=s.RENDERER_TYPE,t.selectRenderer=s.selectRenderer},33845:(e,t,o)=>{"use strict";t.__esModule=!0,t.selectRenderer=r;var s=o(50695);const i=t.RENDERER_TYPE="select";function r(e,t,o,i,r,n,a){s.textRenderer.apply(this,[e,t,o,i,r,n,a])}r.RENDERER_TYPE=i},50695:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(84249);t.RENDERER_TYPE=s.RENDERER_TYPE,t.textRenderer=s.textRenderer},84249:(e,t,o)=>{"use strict";t.__esModule=!0,t.textRenderer=a;var s=o(60686),i=o(83302),r=o(93315);const n=t.RENDERER_TYPE="text";function a(e,t,o,n,a,l,h){s.baseRenderer.apply(this,[e,t,o,n,a,l,h]);let u=l;if(!u&&h.placeholder&&(u=h.placeholder),u=(0,r.stringify)(u),h.trimWhitespace&&(u=u.trim()),h.rendererTemplate){(0,i.empty)(t);const s=e.rootDocument.createElement("TEMPLATE");s.setAttribute("bind","{{}}"),s.innerHTML=h.rendererTemplate,HTMLTemplateElement.decorate(s),s.model=e.getSourceDataAtRow(o),t.appendChild(s)}else(0,i.fastInnerText)(t,u)}a.RENDERER_TYPE=n},43853:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(98706);t.RENDERER_TYPE=s.RENDERER_TYPE,t.timeRenderer=s.timeRenderer},98706:(e,t,o)=>{"use strict";t.__esModule=!0,t.timeRenderer=r;var s=o(50695);const i=t.RENDERER_TYPE="time";function r(e,t,o,i,r,n,a){s.textRenderer.apply(this,[e,t,o,i,r,n,a]),t.dir="ltr"}r.RENDERER_TYPE=i},43395:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=o(32838),n=o(83692),a=o(45951),l=o(39191),h=o(55730),u=o(84380),d=o(520),c=o(73193),g=o(10450),f=o(21280);t.ACTIVE_HEADER_TYPE=f.HIGHLIGHT_ACTIVE_HEADER_TYPE,t.AREA_TYPE=f.HIGHLIGHT_AREA_TYPE,t.FOCUS_TYPE=f.HIGHLIGHT_FOCUS_TYPE,t.CUSTOM_SELECTION_TYPE=f.HIGHLIGHT_CUSTOM_SELECTION_TYPE,t.FILL_TYPE=f.HIGHLIGHT_FILL_TYPE,t.HEADER_TYPE=f.HIGHLIGHT_HEADER_TYPE,t.ROW_TYPE=f.HIGHLIGHT_ROW_TYPE,t.COLUMN_TYPE=f.HIGHLIGHT_COLUMN_TYPE;var p=o(50095);let m;function w(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function C(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var v=new WeakSet;m=Symbol.iterator;function y(e,t){const o=this.layerLevel;if(e.has(o))return e.get(o);const s=t({layerLevel:o,...this.options});return e.set(o,s),s}t.default=class{constructor(e){w(this,v),(0,i.default)(this,"options",void 0),(0,i.default)(this,"layerLevel",0),(0,i.default)(this,"focus",void 0),(0,i.default)(this,"fill",void 0),(0,i.default)(this,"layeredAreas",new Map),(0,i.default)(this,"areas",new Map),(0,i.default)(this,"rowHeaders",new Map),(0,i.default)(this,"columnHeaders",new Map),(0,i.default)(this,"activeRowHeaders",new Map),(0,i.default)(this,"activeColumnHeaders",new Map),(0,i.default)(this,"activeCornerHeaders",new Map),(0,i.default)(this,"rowHighlights",new Map),(0,i.default)(this,"columnHighlights",new Map),(0,i.default)(this,"customSelections",[]),this.options=e,this.focus=(0,h.createHighlight)(e),this.fill=(0,d.createHighlight)(e)}isEnabledFor(e,t){let o=e;e===f.HIGHLIGHT_FOCUS_TYPE&&(o="current");let s=this.options.disabledCellSelection(t.row,t.col);return"string"==typeof s&&(s=[s]),!1===s||Array.isArray(s)&&!s.includes(o)}useLayerLevel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.layerLevel=e,this}getFocus(){return this.focus}getFill(){return this.fill}createLayeredArea(){return C(this,v,y).call(this,this.layeredAreas,n.createHighlight)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return C(this,v,y).call(this,this.areas,a.createHighlight)}getAreas(){return[...this.areas.values()]}createRowHeader(){return C(this,v,y).call(this,this.rowHeaders,c.createHighlight)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return C(this,v,y).call(this,this.columnHeaders,c.createHighlight)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return C(this,v,y).call(this,this.activeRowHeaders,r.createHighlight)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return C(this,v,y).call(this,this.activeColumnHeaders,r.createHighlight)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return C(this,v,y).call(this,this.activeCornerHeaders,r.createHighlight)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return C(this,v,y).call(this,this.rowHighlights,g.createHighlight)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return C(this,v,y).call(this,this.columnHighlights,l.createHighlight)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(e){this.customSelections.push((0,u.createHighlight)({...this.options,...e}))}clear(){this.focus.clear(),this.fill.clear(),(0,p.arrayEach)(this.areas.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.layeredAreas.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.rowHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.columnHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.activeRowHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.activeColumnHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.activeCornerHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.rowHighlights.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.columnHighlights.values(),(e=>{e.clear()}))}[m](){return[this.focus,this.fill,...this.areas.values(),...this.layeredAreas.values(),...this.rowHeaders.values(),...this.columnHeaders.values(),...this.activeRowHeaders.values(),...this.activeColumnHeaders.values(),...this.activeCornerHeaders.values(),...this.rowHighlights.values(),...this.columnHighlights.values(),...this.customSelections][Symbol.iterator]()}}},32838:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.createHighlight=function(e){let{activeHeaderClassName:t,...o}=e;return new r.default({className:t,...o,selectionType:i.HIGHLIGHT_ACTIVE_HEADER_TYPE})};var i=o(21280),r=s(o(76337))},45951:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.createHighlight=function(e){let{...t}=e;return new r.default({className:"highlight",...t,selectionType:i.HIGHLIGHT_AREA_TYPE})};var i=o(21280),r=s(o(76337))},83692:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.createHighlight=function(e){let{areaCornerVisible:t,...o}=e;return new r.default({className:"area",createLayers:!0,border:{width:1,color:"#4b89ff",cornerVisible:t},...o,selectionType:i.HIGHLIGHT_AREA_TYPE})};var i=o(21280),r=s(o(76337))},39191:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.createHighlight=function(e){let{columnClassName:t,...o}=e;return new r.default({className:t,...o,selectionType:i.HIGHLIGHT_COLUMN_TYPE})};var i=o(21280),r=s(o(76337))},84380:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.createHighlight=function(e){let{border:t,visualCellRange:o,...s}=e;return new r.default({...t,...s,selectionType:i.HIGHLIGHT_CUSTOM_SELECTION_TYPE},o)};var i=o(21280),r=s(o(76337))},520:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.createHighlight=function(e){let{...t}=e;return new r.default({className:"fill",border:{width:1,color:"#ff0000"},...t,selectionType:i.HIGHLIGHT_FILL_TYPE})};var i=o(21280),r=s(o(76337))},55730:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.createHighlight=function(e){let{cellCornerVisible:t,...o}=e;return new r.default({className:"current",headerAttributes:[(0,n.A11Y_SELECTED)()],border:{width:2,color:"#4b89ff",cornerVisible:t},...o,selectionType:i.HIGHLIGHT_FOCUS_TYPE})};var i=o(21280),r=s(o(76337)),n=o(5386)},73193:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.createHighlight=function(e){let{headerClassName:t,...o}=e;return new r.default({className:t,...o,selectionType:i.HIGHLIGHT_HEADER_TYPE})};var i=o(21280),r=s(o(76337))},10450:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.createHighlight=function(e){let{rowClassName:t,...o}=e;return new r.default({className:t,...o,selectionType:i.HIGHLIGHT_ROW_TYPE})};var i=o(21280),r=s(o(76337))},76337:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(21280);class n extends r.Selection{constructor(e,t){super(e,null),(0,i.default)(this,"visualCellRange",null),this.visualCellRange=t||null,this.commit()}add(e){return null===this.visualCellRange?this.visualCellRange=this.settings.createCellRange(e):this.visualCellRange.expand(e),this}clear(){return this.visualCellRange=null,super.clear()}trimToVisibleCellsRangeOnly(e){let{from:t,to:o}=e,s=this.getNearestNotHiddenCoords(t,1),i=this.getNearestNotHiddenCoords(o,-1);return null===s||null===i?null:((s.row>i.row||s.col>i.col)&&(s=t,i=o),this.settings.createCellRange(s,s,i))}getNearestNotHiddenCoords(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;const s=this.getNearestNotHiddenIndex(this.settings.rowIndexMapper,e.row,t);if(null===s)return null;const i=this.getNearestNotHiddenIndex(this.settings.columnIndexMapper,e.col,o);return null===i?null:this.settings.createCellCoords(s,i)}getNearestNotHiddenIndex(e,t,o){return t<0?t:e.getNearestNotHiddenIndex(t,o)}commit(){if(null===this.visualCellRange)return this;const e=this.trimToVisibleCellsRangeOnly(this.visualCellRange);return this.cellRange=null===e?null:this.createRenderableCellRange(e.from,e.to),this}syncWith(e){const t=e.from.clone().normalize(),o="N-S"===e.getVerticalDirection()?1:-1,s="W-E"===e.getHorizontalDirection()?1:-1,i=this.settings.visualToRenderableCoords(this.visualCellRange.highlight);let r=null;if(null!==i&&null!==i.col&&null!==i.row||(r=this.getNearestNotHiddenCoords(t,o,s)),null!==r&&e.overlaps(r)){const t=e.highlight.clone();if(t.row>=0&&(t.row=r.row),t.col>=0&&(t.col=r.col),null===this.cellRange){const e=this.settings.visualToRenderableCoords(t);this.cellRange=this.settings.createCellRange(e)}e.setHighlight(t)}return"focus"===this.settings.selectionType&&null!==i&&null===r&&e.setHighlight(this.visualCellRange.highlight),this}getCorners(){const{from:e,to:t}=this.cellRange;return[Math.min(e.row,t.row),Math.min(e.col,t.col),Math.max(e.row,t.row),Math.max(e.col,t.col)]}getVisualCorners(){const e=this.settings.renderableToVisualCoords(this.cellRange.getTopStartCorner()),t=this.settings.renderableToVisualCoords(this.cellRange.getBottomEndCorner());return[e.row,e.col,t.row,t.col]}createRenderableCellRange(e,t){const o=this.settings.visualToRenderableCoords(e),s=this.settings.visualToRenderableCoords(t);return null===o.row||null===o.col||null===s.row||null===s.col?null:this.settings.createCellRange(o,o,s)}}t.default=n},69167:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i={Selection:!0,handleMouseEvent:!0,detectSelectionType:!0,normalizeSelectionFactory:!0},r=s(o(35750));t.Selection=r.default;var n=o(50743);t.handleMouseEvent=n.handleMouseEvent;var a=o(69248);t.detectSelectionType=a.detectSelectionType,t.normalizeSelectionFactory=a.normalizeSelectionFactory;var l=o(43395);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===l[e]||(t[e]=l[e]))}))},50743:(e,t,o)=>{"use strict";t.__esModule=!0,t.handleMouseEvent=function(e,t){let{coords:o,selection:i,controller:r,cellCoordsFactory:a}=t;n.get(e.type)({coords:o,selection:i,controller:r,cellCoordsFactory:a,isShiftKey:e.shiftKey,isLeftClick:(0,s.isLeftClick)(e)||"touchstart"===e.type,isRightClick:(0,s.isRightClick)(e)})},t.mouseDown=i,t.mouseOver=r;var s=o(24449);function i(e){let{isShiftKey:t,isLeftClick:o,isRightClick:s,coords:i,selection:r,controller:n,cellCoordsFactory:a}=e;const l=r.isSelected()?r.getSelectedRange().current():null,h=r.isSelectedByCorner(),u=r.isSelectedByRowHeader();if(t&&l)i.row>=0&&i.col>=0&&!n.cell?r.setRangeEnd(i):(h||u)&&i.row>=0&&i.col>=0&&!n.cell?r.setRangeEnd(a(i.row,i.col)):h&&i.row<0&&!n.column?r.setRangeEnd(a(l.to.row,i.col)):u&&i.col<0&&!n.row?r.setRangeEnd(a(i.row,l.to.col)):(!h&&!u&&i.col<0||h&&i.col<0)&&!n.row?r.selectRows(Math.max(l.from.row,0),i.row,i.col):(!h&&!u&&i.row<0||u&&i.row<0)&&!n.column&&r.selectColumns(Math.max(l.from.col,0),i.col,i.row);else{const e=!r.inInSelection(i),t=o||s&&e;i.row<0&&i.col>=0&&!n.column?t&&r.selectColumns(i.col,i.col,i.row):i.col<0&&i.row>=0&&!n.row?t&&r.selectRows(i.row,i.row,i.col):i.col>=0&&i.row>=0&&!n.cell?t&&r.setRangeStart(i):i.col<0&&i.row<0&&r.selectAll(!0,!0,{disableHeadersHighlight:!0,focusPosition:{row:0,col:0}})}}function r(e){let{isLeftClick:t,coords:o,selection:s,controller:i,cellCoordsFactory:r}=e;if(!t)return;const n=s.isSelectedByRowHeader(),a=s.isSelectedByColumnHeader(),l=s.tableProps.countCols(),h=s.tableProps.countRows();a&&!i.column?s.setRangeEnd(r(h-1,o.col)):n&&!i.row?s.setRangeEnd(r(o.row,l-1)):i.cell||s.setRangeEnd(o)}const n=new Map([["mousedown",i],["mouseover",r],["touchstart",i]])},16570:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231));let r;r=Symbol.iterator;t.default=class{constructor(e){(0,i.default)(this,"ranges",[]),(0,i.default)(this,"createCellRange",void 0),this.createCellRange=e}isEmpty(){return 0===this.size()}set(e){return this.clear(),this.ranges.push(this.createCellRange(e)),this}add(e){return this.ranges.push(this.createCellRange(e)),this}pop(){return this.ranges.pop(),this}current(){return this.peekByIndex(this.size()-1)}previous(){return this.peekByIndex(this.size()-2)}includes(e){return this.ranges.some((t=>t.includes(e)))}clear(){return this.ranges.length=0,this}size(){return this.ranges.length}peekByIndex(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t>=0&&t<this.size()&&(e=this.ranges[t]),e}[r](){return this.ranges[Symbol.iterator]()}}},35750:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=s(o(48427)),n=s(o(42538)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=C(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(43395)),l=s(o(16570)),h=o(22232),u=o(93315),d=o(68145),c=o(50095),g=s(o(65718)),f=s(o(31778)),p=o(69248),m=o(28236),w=o(5386);function C(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(C=function(e){return e?o:t})(e)}function v(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var y=new WeakMap;class E{constructor(e,t){var o=this;(0,i.default)(this,"settings",void 0),(0,i.default)(this,"tableProps",void 0),(0,i.default)(this,"inProgress",!1),(0,i.default)(this,"selectedRange",new l.default(((e,t,o)=>this.tableProps.createCellRange(e,t,o)))),(0,i.default)(this,"highlight",void 0),(0,i.default)(this,"transformation",void 0),(0,i.default)(this,"selectedByRowHeader",new Set),(0,i.default)(this,"selectedByColumnHeader",new Set),v(this,y,{writable:!0,value:!1}),this.settings=e,this.tableProps=t,this.highlight=new a.default({headerClassName:e.currentHeaderClassName,activeHeaderClassName:e.activeHeaderClassName,rowClassName:e.currentRowClassName,columnClassName:e.currentColClassName,cellAttributes:[(0,w.A11Y_SELECTED)()],rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,disabledCellSelection:(e,t)=>this.tableProps.isDisabledCellSelection(e,t),cellCornerVisible:function(){return o.isCellCornerVisible(...arguments)},areaCornerVisible:function(){return o.isAreaCornerVisible(...arguments)},visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),createCellRange:(e,t,o)=>this.tableProps.createCellRange(e,t,o)}),this.transformation=new f.default(this.selectedRange,{rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,countRenderableRows:()=>this.tableProps.countRenderableRows(),countRenderableColumns:()=>this.tableProps.countRenderableColumns(),countRowHeaders:()=>this.tableProps.countRowHeaders(),countColHeaders:()=>this.tableProps.countColHeaders(),visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),navigableHeaders:()=>e.navigableHeaders,fixedRowsBottom:()=>e.fixedRowsBottom,minSpareRows:()=>e.minSpareRows,minSpareCols:()=>e.minSpareCols,autoWrapRow:()=>e.autoWrapRow,autoWrapCol:()=>e.autoWrapCol}),this.transformation.addLocalHook("beforeTransformStart",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("beforeModifyTransformStart",...t)})),this.transformation.addLocalHook("afterTransformStart",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("afterModifyTransformStart",...t)})),this.transformation.addLocalHook("beforeTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("beforeModifyTransformEnd",...t)})),this.transformation.addLocalHook("afterTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("afterModifyTransformEnd",...t)})),this.transformation.addLocalHook("insertRowRequire",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("insertRowRequire",...t)})),this.transformation.addLocalHook("insertColRequire",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("insertColRequire",...t)})),this.transformation.addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("beforeRowWrap",...t)})),this.transformation.addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("beforeColumnWrap",...t)}))}getSelectedRange(){return this.selectedRange}begin(){this.inProgress=!0}finish(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1}isInProgress(){return this.inProgress}setRangeStart(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e;const i="multiple"===this.settings.selectionMode,r=(0,u.isUndefined)(t)?this.tableProps.getShortcutManager().isCtrlPressed():t,n=e.clone();this.runLocalHooks("beforeSetRangeStart"+(o?"Only":""),n),(!i||i&&!r&&(0,u.isUndefined)(t))&&this.selectedRange.clear(),this.selectedRange.add(n).current().setHighlight(s.clone()),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),o||this.setRangeEnd(e)}setRangeStartOnly(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;this.setRangeStart(e,t,!0,o)}setRangeEnd(e){if(this.selectedRange.isEmpty())return;const t=e.clone(),o=this.tableProps.countRows(),s=this.tableProps.countCols(),i=this.selectedRange.current().clone().setTo(e).isSingleHeader();if((o>0||s>0)&&(0===o&&t.col<0&&!i||0===s&&t.row<0&&!i))return;this.runLocalHooks("beforeSetRangeEnd",t),this.begin();const r=this.selectedRange.current();this.settings.navigableHeaders||r.highlight.normalize(),"single"===this.settings.selectionMode?(r.setFrom(r.highlight),r.setTo(r.highlight)):r.setTo(t),o>0&&s>0&&(!this.settings.navigableHeaders||this.settings.navigableHeaders&&!r.isSingleHeader())&&r.to.normalize(),this.runLocalHooks("beforeHighlightSet");const l=this.highlight.getFocus();l.clear(),this.highlight.isEnabledFor(a.FOCUS_TYPE,r.highlight)&&l.add(this.selectedRange.current().highlight).commit().syncWith(r);const h=this.getLayerLevel();h<this.highlight.layerLevel&&((0,c.arrayEach)(this.highlight.getAreas(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getLayeredAreas(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getRowHeaders(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getColumnHeaders(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getActiveRowHeaders(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getActiveColumnHeaders(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getActiveCornerHeaders(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getRowHighlights(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getColumnHighlights(),(e=>{e.clear()}))),this.highlight.useLayerLevel(h);const u=this.highlight.createArea(),d=this.highlight.createLayeredArea(),g=this.highlight.createRowHeader(),f=this.highlight.createColumnHeader(),p=this.highlight.createActiveRowHeader(),m=this.highlight.createActiveColumnHeader(),w=this.highlight.createActiveCornerHeader(),C=this.highlight.createRowHighlight(),v=this.highlight.createColumnHighlight();if(u.clear(),d.clear(),g.clear(),f.clear(),p.clear(),m.clear(),w.clear(),C.clear(),v.clear(),this.highlight.isEnabledFor(a.AREA_TYPE,r.highlight)&&(this.isMultiple()||h>=1)&&(u.add(r.from).add(r.to).commit(),d.add(r.from).add(r.to).commit(),1===h)){const e=this.selectedRange.previous();this.highlight.useLayerLevel(h-1),this.highlight.createArea().add(e.from).commit().syncWith(e),this.highlight.createLayeredArea().add(e.from).commit().syncWith(e),this.highlight.useLayerLevel(h)}if(this.highlight.isEnabledFor(a.HEADER_TYPE,r.highlight)){if(!r.isSingleHeader()){const e=this.tableProps.createCellCoords(Math.max(r.from.row,0),-1),t=this.tableProps.createCellCoords(r.to.row,-1),o=this.tableProps.createCellCoords(-1,Math.max(r.from.col,0)),s=this.tableProps.createCellCoords(-1,r.to.col);"single"===this.settings.selectionMode?(g.add(e).commit(),f.add(o).commit(),C.add(e).commit(),v.add(o).commit()):(g.add(e).add(t).commit(),f.add(o).add(s).commit(),C.add(e).add(t).commit(),v.add(o).add(s).commit())}const e=!(0,n.default)(this,y)&&this.isEntireRowSelected()&&(s>0&&s===r.getWidth()||0===s&&this.isSelectedByRowHeader()),t=!(0,n.default)(this,y)&&this.isEntireColumnSelected()&&(o>0&&o===r.getHeight()||0===o&&this.isSelectedByColumnHeader());e&&p.add(this.tableProps.createCellCoords(Math.max(r.from.row,0),Math.min(-this.tableProps.countRowHeaders(),-1))).add(this.tableProps.createCellCoords(Math.max(r.to.row,0),-1)).commit(),t&&m.add(this.tableProps.createCellCoords(Math.min(-this.tableProps.countColHeaders(),-1),Math.max(r.from.col,0))).add(this.tableProps.createCellCoords(-1,Math.max(r.to.col,0))).commit(),e&&t&&w.add(this.tableProps.createCellCoords(-this.tableProps.countColHeaders(),-this.tableProps.countRowHeaders())).add(this.tableProps.createCellCoords(-1,-1)).commit()}this.runLocalHooks("afterSetRangeEnd",e)}isMultiple(){const e=(0,h.createObjectPropListener)(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}transformStart(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.setRangeStart(this.transformation.transformStart(e,t,o))}transformEnd(e,t){this.setRangeEnd(this.transformation.transformEnd(e,t))}getLayerLevel(){return this.selectedRange.size()-1}isSelected(){return!this.selectedRange.isEmpty()}isSelectedByRowHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner(e)&&(-1===e?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(e))}isEntireRowSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const t=e=>{const{col:t}=e.getOuterTopStartCorner(),o=this.tableProps.countRowHeaders(),s=this.tableProps.countCols();return(o>0&&t<0||0===o)&&e.getWidth()===s};if(-1===e)return Array.from(this.selectedRange).some((e=>t(e)));const o=this.selectedRange.peekByIndex(e);return!!o&&t(o)}isSelectedByColumnHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner()&&(-1===e?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(e))}isEntireColumnSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const t=e=>{const{row:t}=e.getOuterTopStartCorner(),o=this.tableProps.countColHeaders(),s=this.tableProps.countRows();return(o>0&&t<0||0===o)&&e.getHeight()===s};if(-1===e)return Array.from(this.selectedRange).some((e=>t(e)));const o=this.selectedRange.peekByIndex(e);return!!o&&t(o)}isSelectedByAnyHeader(){return this.isSelectedByRowHeader(-1)||this.isSelectedByColumnHeader(-1)||this.isSelectedByCorner()}isSelectedByCorner(){return this.selectedByColumnHeader.has(this.getLayerLevel())&&this.selectedByRowHeader.has(this.getLayerLevel())}inInSelection(e){return this.selectedRange.includes(e)}isCellCornerVisible(){return this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&!this.isMultiple()}isCellVisible(e){const t=this.tableProps.visualToRenderableCoords(e);return null!==t.row&&null!==t.col}isAreaCornerVisible(e){return(!Number.isInteger(e)||e===this.getLayerLevel())&&(this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&this.isMultiple())}clear(){this.selectedRange.clear(),this.highlight.clear()}deselect(){this.isSelected()&&(this.inProgress=!1,this.clear(),this.runLocalHooks("afterDeselect"))}selectAll(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{focusPosition:!1,disableHeadersHighlight:!1};const i=this.tableProps.countRows(),n=this.tableProps.countCols(),a=this.tableProps.countRowHeaders(),l=this.tableProps.countColHeaders(),h=o?-l:0,u=t?-a:0;if(0===h&&0===u&&(0===i||0===n))return;let c=null===(e=this.getSelectedRange().current())||void 0===e?void 0:e.highlight;const{focusPosition:g,disableHeadersHighlight:f}=s;(0,r.default)(this,y,f),g&&Number.isInteger(null==g?void 0:g.row)&&Number.isInteger(null==g?void 0:g.col)&&(c=this.tableProps.createCellCoords((0,d.clamp)(g.row,h,i-1),(0,d.clamp)(g.col,u,n-1)));const p=this.tableProps.createCellCoords(h,u),m=this.tableProps.createCellCoords(i-1,n-1);this.clear(),this.setRangeStartOnly(p,void 0,c),u<0&&this.selectedByRowHeader.add(this.getLayerLevel()),h<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(m),this.finish(),(0,r.default)(this,y,!1)}selectCells(e){var t=this;const o=(0,p.detectSelectionType)(e);if(o===p.SELECTION_TYPE_EMPTY)return!1;if(o===p.SELECTION_TYPE_UNRECOGNIZED)throw new Error(m.toSingleLine`Unsupported format of the selection ranges was passed. To select cells pass\x20
86
+ the last node, the show column modification can be applied.`);const{crossHiddenColumns:o}=e.data;if(!o.includes(t))return;let i=!1;if(e.walkUp((e=>{const{data:{collapsible:t}}=e;if(t)return i=!0,!1})),i)return;e.walkUp((e=>{const{data:o}=e;o.crossHiddenColumns.splice(o.crossHiddenColumns.indexOf(t),1),!o.isHidden&&o.colspan<o.origColspan&&(o.colspan+=1),o.isHidden=!1}))},o(91683);var s=o(28236)},1505:(e,t)=>{"use strict";function o(e,t){let{childs:o}=e;if(0!==o.length)return o[0].data[t]}t.__esModule=!0,t.getFirstChildProperty=o,t.isNodeReflectsFirstChildColspan=function(e){return o(e,"origColspan")===e.data.origColspan},t.traverseHiddenNodeColumnIndexes=function(e,t){e.walkDown((e=>{let{data:o,childs:s}=e;if(!o.isHidden&&(t(o.columnIndex),0===s.length))for(let e=1;e<o.colspan;e++)t(o.columnIndex+e)}))}},30742:(e,t,o)=>{"use strict";t.__esModule=!0,t.normalizeSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;const o=[];if(0===t)return o;(0,s.arrayEach)(e,(e=>{const a=[];let l=0;o.push(a),(0,s.arrayEach)(e,(e=>{const o=(0,n.createDefaultHeaderSettings)();if((0,i.isObject)(e)){const{label:t,colspan:s}=e;o.label=(0,r.stringify)(t),"number"==typeof s&&s>1&&(o.colspan=s,o.origColspan=s)}else o.label=(0,r.stringify)(e);l+=o.origColspan;let s=!1;if(l>=t&&(o.colspan=o.origColspan-(l-t),o.origColspan=o.colspan,s=!0),a.push(o),o.colspan>1)for(let e=0;e<o.colspan-1;e++)a.push((0,n.createPlaceholderHeaderSettings)());return!s}))}));const a=Math.max(...(0,s.arrayMap)(o,(e=>e.length)));return(0,s.arrayEach)(o,(e=>{if(e.length<a){const t=(0,s.arrayMap)(new Array(a-e.length),(()=>(0,n.createDefaultHeaderSettings)()));e.splice(e.length,0,...t)}})),o},o(63517);var s=o(50095),i=o(22232),r=o(93315),n=o(47687)},44137:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(42538)),r=s(o(48427)),n=o(22232),a=o(50095),l=o(30742);function h(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}const u=t.HEADER_CONFIGURABLE_PROPS=["label","collapsible"];var d=new WeakMap,c=new WeakMap,g=new WeakMap;t.default=class{constructor(){h(this,d,{writable:!0,value:[]}),h(this,c,{writable:!0,value:0}),h(this,g,{writable:!0,value:1/0})}setColumnsLimit(e){(0,r.default)(this,g,e)}setData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];(0,r.default)(this,d,(0,l.normalizeSettings)(e,(0,i.default)(this,g))),(0,r.default)(this,c,(0,i.default)(this,d).length)}getData(){return(0,i.default)(this,d)}mergeWith(e){(0,a.arrayEach)(e,(e=>{let{row:t,col:o,...s}=e;const i=this.getHeaderSettings(t,o);null!==i&&(0,n.extend)(i,s,u)}))}map(e){(0,a.arrayEach)((0,i.default)(this,d),(t=>{(0,a.arrayEach)(t,(t=>{const o=e({...t});(0,n.isObject)(o)&&(0,n.extend)(t,o,u)}))}))}getHeaderSettings(e,t){var o;if(e>=(0,i.default)(this,c)||e<0)return null;const s=(0,i.default)(this,d)[e];return!1===Array.isArray(s)||t>=s.length?null:null!==(o=s[t])&&void 0!==o?o:null}getHeadersSettings(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const s=[];if(e>=(0,i.default)(this,c)||e<0)return s;const r=(0,i.default)(this,d)[e];let n=0;for(let e=t;e<r.length;e++){const t=r[e];if(t.isPlaceholder)throw new Error("The first column settings cannot overlap the other header layers");if(n+=t.colspan,s.push(t),t.colspan>1&&(e+=t.colspan-1),n===o)break;if(n>o)throw new Error("The last column settings cannot overlap the other header layers")}return s}getLayersCount(){return(0,i.default)(this,c)}getColumnsCount(){return(0,i.default)(this,c)>0?(0,i.default)(this,d)[0].length:0}clear(){(0,r.default)(this,d,[]),(0,r.default)(this,c,0)}}},47687:(e,t)=>{"use strict";t.__esModule=!0,t.createDefaultHeaderSettings=function(){let{label:e="",colspan:t=1,origColspan:o=1,collapsible:s=!1,crossHiddenColumns:i=[],isCollapsed:r=!1,isHidden:n=!1,isRoot:a=!1,isPlaceholder:l=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{label:e,colspan:t,origColspan:o,collapsible:s,isCollapsed:r,crossHiddenColumns:i,isHidden:n,isRoot:a,isPlaceholder:l}},t.createPlaceholderHeaderSettings=function(){return{label:"",isPlaceholder:!0}}},45404:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(83302);t.default=class{constructor(e,t){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"nestedHeaderSettingsGetter",void 0),(0,i.default)(this,"layersCount",0),(0,i.default)(this,"container",void 0),(0,i.default)(this,"widthsMap",void 0),this.hot=e,this.nestedHeaderSettingsGetter=t,this.widthsMap=this.hot.columnIndexMapper.createAndRegisterIndexMap("nestedHeaders.widthsMap","physicalIndexToValue")}setLayersCount(e){return this.layersCount=e,this}getWidth(e){return this.widthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e))}buildWidthsMap(){this.container=this.hot.rootDocument.createElement("div"),this.container.classList.add("handsontable","htGhostTable","htAutoSize"),this._buildGhostTable(this.container),this.hot.rootDocument.body.appendChild(this.container);const e=this.container.querySelectorAll("tr:last-of-type th"),t=e.length;this.widthsMap.clear();for(let o=0;o<t;o++){const t=this.hot.columnIndexMapper.getVisualFromRenderableIndex(o),s=this.hot.toPhysicalColumn(t);this.widthsMap.setValueAtIndex(s,e[o].offsetWidth)}this.container.parentNode.removeChild(this.container),this.container=null}_buildGhostTable(e){const{rootDocument:t,columnIndexMapper:o}=this.hot,s=t.createDocumentFragment(),i=t.createElement("table"),n=!!this.hot.getSettings().dropdownMenu,a=o.getRenderableIndexesLength();for(let e=0;e<this.layersCount;e++){const s=t.createElement("tr");for(let i=0;i<a;i++){let a=o.getVisualFromRenderableIndex(i);null===a&&(a=i);const l=t.createElement("th"),h=this.nestedHeaderSettingsGetter(e,a);if(h&&(!h.isPlaceholder||h.isHidden)){let e=h.label;n&&(e+='<button class="changeType"></button>'),(0,r.fastInnerHTML)(l,e),l.colSpan=h.colspan,s.appendChild(l)}}i.appendChild(s)}s.appendChild(i),e.appendChild(s)}clear(){this.widthsMap.clear(),this.container=null}}},19508:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(68145),n=o(22232),a=o(50095);t.default=class{constructor(e,t){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"data",null),(0,i.default)(this,"plugin",void 0),(0,i.default)(this,"parentReference",new WeakMap),(0,i.default)(this,"cache",{levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap}),this.hot=t,this.plugin=e}setData(e){this.data=e}getData(){return this.data}getRawSourceData(){let e=null;return this.plugin.disableCoreAPIModifiers(),e=this.hot.getSourceData(),this.plugin.enableCoreAPIModifiers(),e}updateWithData(e){this.setData(e),this.rewriteCache()}rewriteCache(){this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap},(0,r.rangeEach)(0,this.data.length-1,(e=>{this.cacheNode(this.data[e],0,null)}))}cacheNode(e,t,o){this.cache.levels[t]||(this.cache.levels[t]=[],this.cache.levelCount+=1),this.cache.levels[t].push(e),this.cache.rows.push(e),this.cache.nodeInfo.set(e,{parent:o,row:this.cache.rows.length-1,level:t}),this.hasChildren(e)&&(0,a.arrayEach)(e.__children,(o=>{this.cacheNode(o,t+1,e)}))}getDataObject(e){return null==e?null:this.cache.rows[e]}readTreeNodes(e,t,o,s){let i=!1,r=t;if(isNaN(r)&&r.end)return r;let n=e;return n||(n={__children:this.data},i=!0,r-=1),null!=o&&r===o?{result:n,end:!0}:null!=s&&n===s?{result:r,end:!0}:(r+=1,n.__children&&(0,a.arrayEach)(n.__children,(e=>{if(this.parentReference.set(e,i?null:n),r=this.readTreeNodes(e,r,o,s),isNaN(r)&&r.end)return!1})),r)}mockParent(){const e=this.mockNode();return e.__children=this.data,e}mockNode(){const e={};return(0,n.objectEach)(this.data[0],((t,o)=>{e[o]=null})),e}getRowIndex(e){return null==e?null:this.cache.nodeInfo.get(e).row}getRowIndexWithinParent(e){let t=null;t=isNaN(e)?e:this.getDataObject(e);const o=this.getRowParent(e);return null==o?this.data.indexOf(t):o.__children.indexOf(t)}countAllRows(){const e={__children:this.data};return this.countChildren(e)}countChildren(e){let t=0,o=e;return isNaN(o)||(o=this.getDataObject(o)),o&&o.__children?((0,a.arrayEach)(o.__children,(e=>{t+=1,e.__children&&(t+=this.countChildren(e))})),t):0}getRowParent(e){let t;return t=isNaN(e)?e:this.getDataObject(e),this.getRowObjectParent(t)}getRowObjectParent(e){return e&&"object"==typeof e?this.cache.nodeInfo.get(e).parent:null}getRowLevel(e){let t=null;return t=isNaN(e)?e:this.getDataObject(e),t?this.getRowObjectLevel(t):null}getRowObjectLevel(e){return null==e?null:this.cache.nodeInfo.get(e).level}hasChildren(e){let t=e;return isNaN(t)||(t=this.getDataObject(t)),!(!t.__children||!t.__children.length)}isChild(e){return null!==this.getRowParent(e)}getChild(e,t){var o;return(null===(o=e.__children)||void 0===o?void 0:o[t])||null}isRowHighestLevel(e){return!this.isChild(e)}isParent(e){var t;let o=e;return isNaN(o)||(o=this.getDataObject(o)),o&&!!o.__children&&0!==(null===(t=o.__children)||void 0===t?void 0:t.length)}addChild(e,t){let o=t;this.hot.runHooks("beforeAddChild",e,o);let s=null;e&&(s=this.getRowIndex(e)),this.hot.runHooks("beforeCreateRow",s+this.countChildren(e)+1,1);let i=e;e||(i=this.mockParent()),i.__children||(i.__children=[]),o||(o=this.mockNode()),i.__children.push(o),this.rewriteCache();const r=this.getRowIndex(o);this.hot.rowIndexMapper.insertIndexes(r,1),this.hot.runHooks("afterCreateRow",r,1),this.hot.runHooks("afterAddChild",e,o)}addChildAtIndex(e,t,o){let s,i=o;if(i||(i=this.mockNode()),this.hot.runHooks("beforeAddChild",e,i,t),e){const o=this.getRowIndex(e)+t+1;this.hot.runHooks("beforeCreateRow",o,1),e.__children.splice(t,null,i),this.rewriteCache(),this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(e),"__children",e.__children,"NestedRows.addChildAtIndex"),this.hot.rowIndexMapper.insertIndexes(o,1),this.plugin.enableCoreAPIModifiers(),this.hot.runHooks("afterCreateRow",o,1),s=o}else this.plugin.disableCoreAPIModifiers(),this.hot.alter("insert_row_above",t,1,"NestedRows.addChildAtIndex"),this.plugin.enableCoreAPIModifiers(),s=this.getRowIndex(this.data[t]);i=this.getDataObject(s),this.hot.runHooks("afterAddChild",e,i,t)}addSibling(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"below";const o=this.translateTrimmedRow(e),s=this.getRowParent(o),i=this.getRowIndexWithinParent(o);switch(t){case"below":this.addChildAtIndex(s,i+1,null);break;case"above":this.addChildAtIndex(s,i,null)}}detachFromParent(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=null;const s=[];Array.isArray(e)?((0,r.rangeEach)(e[0],e[2],(e=>{const t=this.translateTrimmedRow(e);s.push(this.getDataObject(t))})),(0,r.rangeEach)(0,s.length-2,(e=>{this.detachFromParent(s[e],!1)})),o=s[s.length-1]):o=e;const i=this.getRowIndex(o),n=this.countChildren(o),a=this.getRowIndexWithinParent(o),l=this.getRowParent(o),h=this.getRowParent(l),u=this.getRowIndex(h);let d=null;if(this.hot.runHooks("beforeDetachChild",l,o),null!=a){const e=Array.from(new Array(i+n+1).keys()).splice(-1*(n+1));if(this.hot.runHooks("beforeRemoveRow",i,n+1,e,this.plugin.pluginName),l.__children.splice(a,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",i,n+1,e,this.plugin.pluginName),h){d=u+this.countChildren(h);const e=this.getChild(h,this.countChildren(h)-1),t=this.getRowIndex(e);this.hot.runHooks("beforeCreateRow",t+1,n+1,this.plugin.pluginName),h.__children.push(o)}else d=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",d-2,n+1,this.plugin.pluginName),this.data.push(o)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",d-2,n+1,this.plugin.pluginName),this.hot.runHooks("afterDetachChild",l,o,this.getRowIndex(o)),t&&this.hot.render()}filterData(e,t,o){const s=[];(0,a.arrayEach)(o,(e=>{s.push(this.getDataObject(e))})),(0,a.arrayEach)(s,(e=>{const t=this.getRowIndexWithinParent(e),o=this.getRowParent(e);null===o?this.data.splice(t,1):o.__children.splice(t,1)})),this.rewriteCache()}spliceData(e,t,o){const s=this.getDataObject(e-1);let i=null,r=e;s&&s.__children&&0===s.__children.length?(i=s,r=0):e<this.countAllRows()&&(i=this.getRowParent(e),r=this.getRowIndexWithinParent(e)),i?o?i.__children.splice(r,t,...o):i.__children.splice(r,t):o?this.data.splice(r,t,...o):this.data.splice(r,t),this.rewriteCache()}syncRowWithRawSource(e){let t=e,o=null;do{o=this.getRowParent(o),null!==o&&(t=o)}while(null!==o);this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndex(t),"__children",t.__children,"NestedRows.syncRowWithRawSource"),this.plugin.enableCoreAPIModifiers()}moveRow(e,t,o,s){const i=t===this.hot.countRows(),r=this.getRowParent(e),n=this.getRowIndexWithinParent(e),a=r.__children.slice(n,n+1),l=e>t;let h=i?this.getRowParent(t-1):this.getRowParent(t);null==h&&(h=this.getRowParent(t-1)),null==h&&(h=this.getDataObject(t-1)),h?h.__children||(h.__children=[]):(h=this.getDataObject(t),h.__children=[]);const u=i||o||s?h.__children.length:this.getRowIndexWithinParent(t),d=r===h;h.__children.splice(u,0,a[0]),r.__children.splice(n+(l&&d?1:0),1),this.syncRowWithRawSource(r),d||this.syncRowWithRawSource(h)}translateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.translateTrimmedRow(e):e}untranslateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.untranslateTrimmedRow(e):e}}},93363:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(54842);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.NestedRows=s.NestedRows},54842:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=s(o(42538)),n=s(o(48427)),a=o(36026),l=s(o(19508)),h=s(o(48907)),u=s(o(909)),d=s(o(27757)),c=o(69173),g=o(65320),f=o(33165),p=s(o(27170));function m(e,t){C(e,t),t.add(e)}function w(e,t,o){C(e,t),t.set(e,o)}function C(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function v(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}o(23118);const y=t.PLUGIN_KEY="nestedRows",E=t.PLUGIN_PRIORITY=300,S=y;var R=new WeakMap,b=new WeakMap,_=new WeakSet,T=new WeakSet,O=new WeakSet,M=new WeakSet,I=new WeakSet,A=new WeakSet,N=new WeakSet,P=new WeakSet,x=new WeakSet,H=new WeakSet,k=new WeakSet,D=new WeakSet,L=new WeakSet,W=new WeakSet,F=new WeakSet,V=new WeakSet;class B extends a.BasePlugin{constructor(){super(...arguments),m(this,V),m(this,F),m(this,W),m(this,L),m(this,D),m(this,k),m(this,H),m(this,x),m(this,P),m(this,N),m(this,A),m(this,I),m(this,M),m(this,O),m(this,T),m(this,_),(0,i.default)(this,"dataManager",null),(0,i.default)(this,"headersUI",null),(0,i.default)(this,"collapsedRowsMap",null),w(this,R,{writable:!0,value:!1}),w(this,b,{writable:!0,value:!1})}static get PLUGIN_KEY(){return y}static get PLUGIN_PRIORITY(){return E}isEnabled(){return!!this.hot.getSettings()[y]}enablePlugin(){var e=this;this.enabled||(this.collapsedRowsMap=this.hot.rowIndexMapper.registerMap("nestedRows",new f.TrimmingMap),this.dataManager=new l.default(this,this.hot),this.collapsingUI=new h.default(this,this.hot),this.headersUI=new u.default(this,this.hot),this.contextMenuUI=new d.default(this,this.hot),this.rowMoveController=new p.default(this),this.addHook("afterInit",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,W,te).call(e,...o)})),this.addHook("beforeViewRender",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,F,oe).call(e,...o)})),this.addHook("modifyRowData",(function(){return e.onModifyRowData(...arguments)})),this.addHook("modifySourceLength",(function(){return e.onModifySourceLength(...arguments)})),this.addHook("beforeDataSplice",(function(){return e.onBeforeDataSplice(...arguments)})),this.addHook("filterData",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,O,j).call(e,...o)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,M,G).call(e,...o)})),this.addHook("afterGetRowHeader",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,I,z).call(e,...o)})),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,T,Y).call(e,...o)})),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,P,X).call(e,...o)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,N,$).call(e,...o)})),this.addHook("beforeAddChild",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,x,q).call(e,...o)})),this.addHook("afterAddChild",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,H,Q).call(e,...o)})),this.addHook("beforeDetachChild",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,k,J).call(e,...o)})),this.addHook("afterDetachChild",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,D,Z).call(e,...o)})),this.addHook("modifyRowHeaderWidth",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,A,K).call(e,...o)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,L,ee).call(e,...o)})),this.addHook("beforeRowMove",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return v(e,_,U).call(e,...o)})),this.addHook("beforeLoadData",(e=>v(this,V,se).call(this,e))),this.addHook("beforeUpdateData",(e=>v(this,V,se).call(this,e))),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("nestedRows"),this.unregisterShortcuts(),super.disablePlugin()}updatePlugin(){this.disablePlugin();const e=this.dataManager.getData();this.enablePlugin(),this.dataManager.updateWithData(e),super.updatePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();if(-1===e.col&&e.row>=0){const t=this.collapsingUI.translateTrimmedRow(e.row);this.collapsingUI.areChildrenCollapsed(t)?this.collapsingUI.expandChildren(t):this.collapsingUI.collapseChildren(t)}},runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()},group:S})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(S)}disableCoreAPIModifiers(){(0,n.default)(this,b,!0)}enableCoreAPIModifiers(){(0,n.default)(this,b,!1)}onModifyRowData(e){if(!(0,r.default)(this,b))return this.dataManager.getDataObject(e)}onModifySourceLength(){if(!(0,r.default)(this,b))return this.dataManager.countAllRows()}onBeforeDataSplice(e,t,o){return!(!(0,r.default)(this,b)&&!this.dataManager.isRowHighestLevel(e))||(this.dataManager.spliceData(e,t,o),!1)}destroy(){super.destroy()}}function U(e,t,o,s){return this.rowMoveController.onBeforeRowMove(e,t,o,s)}function Y(e,t,o){this.collapsingUI.toggleState(e,t,o)}function j(e,t,o){return this.collapsingUI.collapsedRowsStash.stash(),this.collapsingUI.collapsedRowsStash.trimStash(o[0],t),this.collapsingUI.collapsedRowsStash.shiftStash(o[0],null,-1*t),this.dataManager.filterData(e,t,o),(0,n.default)(this,R,!0),this.dataManager.getData().slice()}function G(e){return this.contextMenuUI.appendOptions(e)}function z(e,t){this.headersUI.appendLevelIndicators(e,t)}function K(e){return Math.max(this.headersUI.rowHeaderWidthCache,e)}function $(e,t,o,s){s!==this.pluginName&&this.hot._registerTimeout((()=>{(0,n.default)(this,R,!1),this.headersUI.updateRowHeaderWidth(),this.collapsingUI.collapsedRowsStash.applyStash()}))}function X(e,t,o){const s=Array.from(o.reduce(((e,t)=>{if(this.dataManager.isParent(t)){const o=this.dataManager.getDataObject(t).__children;return e.add(t),Array.isArray(o)&&o.forEach((t=>e.add(this.dataManager.getRowIndex(t)))),e}return e.add(t)}),new Set));o.length=0,o.push(...s)}function q(){this.collapsingUI.collapsedRowsStash.stash()}function Q(e,t){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(t)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function J(){this.collapsingUI.collapsedRowsStash.stash()}function Z(e,t,o){this.collapsingUI.collapsedRowsStash.shiftStash(o,null,-1),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function ee(){this.dataManager.rewriteCache()}function te(){this.headersUI.updateRowHeaderWidth()}function oe(e,t){(0,r.default)(this,R)&&(t.skipRender=!0)}function se(e){if(!(0,g.isArrayOfObjects)(e))return(0,c.error)("The Nested Rows plugin requires an Array of Objects as a dataset to be provided. The plugin has been disabled."),this.hot.getSettings()[y]=!1,void this.disablePlugin();this.dataManager.setData(e),this.dataManager.rewriteCache()}t.NestedRows=B},78575:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231));t.default=class{constructor(e,t){(0,i.default)(this,"hot",void 0),(0,i.default)(this,"plugin",void 0),this.hot=t,this.plugin=e}}},48907:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=o(24449),r=o(50095),n=o(68145),a=o(83302),l=s(o(78575)),h=s(o(909));class u extends l.default{constructor(e,t){var o;super(e,t),o=this,this.dataManager=this.plugin.dataManager,this.collapsedRows=[],this.collapsedRowsStash={stash:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];o.lastCollapsedRows=o.collapsedRows.slice(0),o.expandMultipleChildren(o.lastCollapsedRows,e)},shiftStash:function(e,t){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null==t&&(t=1/0),(0,r.arrayEach)(o.lastCollapsedRows,((i,r)=>{i>=e&&i<t&&(o.lastCollapsedRows[r]=i+s)}))},applyStash:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];o.collapseMultipleChildren(o.lastCollapsedRows,e),o.lastCollapsedRows=void 0},trimStash:(e,t)=>{(0,n.rangeEach)(e,e+t-1,(e=>{const t=this.lastCollapsedRows.indexOf(e);t>-1&&this.lastCollapsedRows.splice(t,1)}))}}}collapseChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=[];let i=null,n=null,a=null;return isNaN(e)?(i=e,n=this.dataManager.getRowIndex(i)):(i=this.dataManager.getDataObject(e),n=e),this.dataManager.hasChildren(i)&&(0,r.arrayEach)(i.__children,(e=>{s.push(this.dataManager.getRowIndex(e))})),a=this.collapseRows(s,!0,!1),o&&this.trimRows(a),t&&this.renderAndAdjust(),-1===this.collapsedRows.indexOf(n)&&this.collapsedRows.push(n),a}collapseMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=[];(0,r.arrayEach)(e,(e=>{s.push(...this.collapseChildren(e,!1,!1))})),o&&this.trimRows(s),t&&this.renderAndAdjust()}collapseRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.collapseRows([e],t)}collapseRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=[];return(0,r.arrayEach)(e,(e=>{s.push(e),t&&this.collapseChildRows(e,s)})),o&&this.trimRows(s),s}collapseChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const o=this.dataManager.getDataObject(e);(0,r.arrayEach)(o.__children,(e=>{const o=this.dataManager.getRowIndex(e);t.push(o),this.collapseChildRows(o,t)}))}o&&this.trimRows(t)}expandRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.expandRows([e],t)}expandRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const s=[];return(0,r.arrayEach)(e,(e=>{s.push(e),t&&this.expandChildRows(e,s)})),o&&this.untrimRows(s),s}expandChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const o=this.dataManager.getDataObject(e);(0,r.arrayEach)(o.__children,(e=>{if(!this.isAnyParentCollapsed(e)){const o=this.dataManager.getRowIndex(e);t.push(o),this.expandChildRows(o,t)}}))}o&&this.untrimRows(t)}expandChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=[];let i=null,n=null,a=null;return isNaN(e)?(i=e,n=this.dataManager.getRowIndex(e)):(i=this.dataManager.getDataObject(e),n=e),this.collapsedRows.splice(this.collapsedRows.indexOf(n),1),this.dataManager.hasChildren(i)&&(0,r.arrayEach)(i.__children,(e=>{const t=this.dataManager.getRowIndex(e);s.push(t)})),a=this.expandRows(s,!0,!1),o&&this.untrimRows(a),t&&this.renderAndAdjust(),a}expandMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const s=[];(0,r.arrayEach)(e,(e=>{s.push(...this.expandChildren(e,!1,!1))})),o&&this.untrimRows(s),t&&this.renderAndAdjust()}collapseAll(){const e=this.dataManager.getData(),t=[];(0,r.arrayEach)(e,(e=>{this.dataManager.hasChildren(e)&&t.push(e)})),this.collapseMultipleChildren(t),this.renderAndAdjust()}expandAll(){const e=this.dataManager.getData(),t=[];(0,r.arrayEach)(e,(e=>{this.dataManager.hasChildren(e)&&t.push(e)})),this.expandMultipleChildren(t),this.renderAndAdjust()}trimRows(e){this.hot.batchExecution((()=>{(0,r.arrayEach)(e,(e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!0)}))}),!0)}untrimRows(e){this.hot.batchExecution((()=>{(0,r.arrayEach)(e,(e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!1)}))}),!0)}areChildrenCollapsed(e){let t=isNaN(e)?e:this.dataManager.getDataObject(e),o=!0;return null===t&&(t={__children:this.dataManager.data}),this.dataManager.hasChildren(t)&&(0,r.arrayEach)(t.__children,(e=>{const t=this.dataManager.getRowIndex(e);if(!this.plugin.collapsedRowsMap.getValueAtIndex(t))return o=!1,!1})),o}isAnyParentCollapsed(e){let t=e;for(;null!==t;){t=this.dataManager.getRowParent(t);const e=this.dataManager.getRowIndex(t);if(this.collapsedRows.indexOf(e)>-1)return!0}return!1}toggleState(e,t){if(t.col>=0)return;const o=this.translateTrimmedRow(t.row);(0,a.hasClass)(e.target,h.default.CSS_CLASSES.button)&&(this.areChildrenCollapsed(o)?this.expandChildren(o):this.collapseChildren(o),(0,i.stopImmediatePropagation)(e))}translateTrimmedRow(e){return this.hot.toPhysicalRow(e)}untranslateTrimmedRow(e){return this.hot.toVisualRow(e)}renderAndAdjust(){this.hot.render(),this.hot.view.adjustElementsSize()}}t.default=u},27757:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=s(o(42538)),n=o(68145),a=o(50095),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=u(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(77516)),h=s(o(78575));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(u=function(e){return e?o:t})(e)}function d(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var c=new WeakMap;class g extends h.default{constructor(){super(...arguments),(0,i.default)(this,"dataManager",this.plugin.dataManager),d(this,c,{writable:!0,value:{row_above:(e,t)=>{const o=t[t.length-1];this.dataManager.addSibling(o.start.row,"above")},row_below:(e,t)=>{const o=t[t.length-1];this.dataManager.addSibling(o.start.row,"below")}}})}appendOptions(e){const t=[{key:"add_child",name(){return this.getTranslatedPhrase(l.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD)},callback:()=>{const e=this.dataManager.translateTrimmedRow(this.hot.getSelectedLast()[0]),t=this.dataManager.getDataObject(e);this.dataManager.addChild(t)},disabled:()=>{const e=this.hot.getSelectedLast();return!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{key:"detach_from_parent",name(){return this.getTranslatedPhrase(l.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD)},callback:()=>{this.dataManager.detachFromParent(this.hot.getSelectedLast())},disabled:()=>{const e=this.hot.getSelectedLast(),t=this.dataManager.translateTrimmedRow(e[0]);return!this.dataManager.getRowParent(t)||!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{name:"---------"}];return(0,n.rangeEach)(0,e.items.length-1,(o=>{if(0===o)return(0,a.arrayEach)(t,((t,s)=>{e.items.splice(o+s,0,t)})),!1})),this.modifyRowInsertingOptions(e)}modifyRowInsertingOptions(e){return(0,n.rangeEach)(0,e.items.length-1,(t=>{const o=(0,r.default)(this,c)[e.items[t].key];null!=o&&(e.items[t].callback=o)})),e}}t.default=g},909:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=o(50095),r=o(68145),n=o(83302),a=s(o(78575)),l=o(5386);class h extends a.default{static get CSS_CLASSES(){return{indicatorContainer:"ht_nestingLevels",parent:"ht_nestingParent",indicator:"ht_nestingLevel",emptyIndicator:"ht_nestingLevel_empty",button:"ht_nestingButton",expandButton:"ht_nestingExpand",collapseButton:"ht_nestingCollapse"}}constructor(e,t){super(e,t),this.dataManager=this.plugin.dataManager,this.collapsingUI=this.plugin.collapsingUI,this.rowHeaderWidthCache=null}appendLevelIndicators(e,t){const o=this.hot.toPhysicalRow(e),s=this.dataManager.getRowLevel(o),a=this.dataManager.getDataObject(o),u=t.getElementsByTagName("DIV")[0],d=u.querySelector("span.rowHeader"),c=u.querySelectorAll('[class^="ht_nesting"]'),g=this.hot.getSettings().ariaTags;if((0,i.arrayEach)(c,(e=>{e&&u.removeChild(e)})),(0,n.addClass)(t,h.CSS_CLASSES.indicatorContainer),s){const{rootDocument:e}=this.hot,t=d.cloneNode(!0);u.innerHTML="",(0,r.rangeEach)(0,s-1,(()=>{const t=e.createElement("SPAN");(0,n.addClass)(t,h.CSS_CLASSES.emptyIndicator),u.appendChild(t)})),u.appendChild(t)}if(this.dataManager.hasChildren(a)){const e=this.hot.rootDocument.createElement("DIV");g&&(0,n.setAttribute)(e,[(0,l.A11Y_HIDDEN)()]),(0,n.addClass)(t,h.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(o)?((0,n.addClass)(e,`${h.CSS_CLASSES.button} ${h.CSS_CLASSES.expandButton}`),g&&(0,n.setAttribute)(t,[(0,l.A11Y_EXPANDED)(!1)])):((0,n.addClass)(e,`${h.CSS_CLASSES.button} ${h.CSS_CLASSES.collapseButton}`),g&&(0,n.setAttribute)(t,[(0,l.A11Y_EXPANDED)(!0)])),u.appendChild(e)}}updateRowHeaderWidth(e){let t=e;t||(t=this.dataManager.cache.levelCount),this.rowHeaderWidthCache=Math.max(50,11+10*t+25),this.hot.render()}}t.default=h},27170:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(93315),n=o(69173),a=o(28236);t.default=class{constructor(e){(0,i.default)(this,"plugin",void 0),(0,i.default)(this,"hot",void 0),(0,i.default)(this,"dataManager",void 0),(0,i.default)(this,"collapsingUI",void 0),this.plugin=e,this.hot=e.hot,this.dataManager=e.dataManager,this.collapsingUI=e.collapsingUI}onBeforeRowMove(e,t,o,s){if(this.displayAPICompatibilityWarning({rows:e,finalIndex:t,dropIndex:o,movePossible:s}))return!1;this.movedToCollapsed=!1;const i=o===this.hot.countRows(),r=i?this.hot.countSourceRows():this.dataManager.translateTrimmedRow(o);let n=!0;const a=e.map((e=>{if(!n)return!1;const t=this.dataManager.translateTrimmedRow(e);return n=this.shouldAllowMoving(t,r),t})),l=-1===a.indexOf(r);if(!n||!l)return!1;const h=this.getBaseParent(a),u=this.getTargetParent(i,r),d=h===u;return this.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(u),this.collapsingUI.collapsedRowsStash.stash(),this.shiftCollapsibleParentsLocations(a,r,d),this.moveRows(a,r,u),this.dataManager.rewriteCache(),this.moveCellsMeta(a,r),this.collapsingUI.collapsedRowsStash.applyStash(!1),this.hot.runHooks("afterRowMove",e,t,o,s,s&&this.isRowOrderChanged(e,t)),this.hot.render(),this.selectCells(e,o),!1}displayAPICompatibilityWarning(e){const{rows:t,finalIndex:o,dropIndex:s,movePossible:i}=e;let l=!1;return(0,r.isUndefined)(s)&&((0,n.warn)(a.toSingleLine`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\x20
87
+ when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`),this.hot.runHooks("afterRowMove",t,o,s,i,!1),l=!0),l}shouldAllowMoving(e,t){return!(this.dataManager.isParent(e)||this.dataManager.isRowHighestLevel(e)||e===t||0===t)}getBaseParent(e){return this.dataManager.getRowParent(e[0])}getTargetParent(e,t){let o=this.dataManager.getRowParent(e?t-1:t);return null==o&&(o=this.dataManager.getRowParent(t-1)),o}shiftCollapsibleParentsLocations(e,t,o){o||(Math.max(...e)<=t?this.collapsingUI.collapsedRowsStash.shiftStash(e[0],t,-1*e.length):this.collapsingUI.collapsedRowsStash.shiftStash(t,e[0],e.length))}moveRows(e,t,o){const s=t===this.dataManager.getRowIndex(o)+this.dataManager.countChildren(o)+1;this.hot.batchRender((()=>{e.forEach((e=>{this.dataManager.moveRow(e,t,this.movedToCollapsed,s)}))}))}moveCellsMeta(e,t){const o=[],s=Math.max(...e)<t;e.forEach((e=>{o.push(this.hot.getCellMetaAtRow(e))})),this.hot.spliceCellsMeta(e[0],e.length),this.hot.spliceCellsMeta(t-(s?o.length:0),0,...o)}selectCells(e,t){const o=e.length;let s=0,i=0,r=null,n=null;if(this.movedToCollapsed){let r=null;r=e[o-1]<t?this.dataManager.translateTrimmedRow(t-o):this.dataManager.translateTrimmedRow(t);const n=this.dataManager.getRowParent(null===r?this.hot.countSourceRows()-1:r-1),a=this.dataManager.getRowIndex(n);s=this.dataManager.untranslateTrimmedRow(a),i=s}else e[o-1]<t?(i=t-1,s=i-o+1):(s=t,i=s+o-1);r=this.hot.selection,n=this.hot.countCols()-1,r.setRangeStart(this.hot._createCellCoords(s,0)),r.setRangeEnd(this.hot._createCellCoords(i,n),!0)}isRowOrderChanged(e,t){return e.some(((e,o)=>e-o!==t))}}},94870:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(84340);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.PersistentState=s.PersistentState},84340:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(36026),n=s(o(40209)),a=s(o(56307));a.default.getSingleton().register("persistentStateSave"),a.default.getSingleton().register("persistentStateLoad"),a.default.getSingleton().register("persistentStateReset");const l=t.PLUGIN_KEY="persistentState",h=t.PLUGIN_PRIORITY=0;class u extends r.BasePlugin{constructor(){super(...arguments),(0,i.default)(this,"storage",void 0)}static get PLUGIN_KEY(){return l}static get PLUGIN_PRIORITY(){return h}isEnabled(){return!!this.hot.getSettings()[l]}enablePlugin(){this.enabled||(this.storage||(this.storage=new n.default(this.hot.rootElement.id,this.hot.rootWindow)),this.addHook("persistentStateSave",((e,t)=>this.saveValue(e,t))),this.addHook("persistentStateLoad",((e,t)=>this.loadValue(e,t))),this.addHook("persistentStateReset",(()=>this.resetValue())),super.enablePlugin())}disablePlugin(){this.storage=void 0,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}loadValue(e,t){t.value=this.storage.loadValue(e)}saveValue(e,t){this.storage.saveValue(e,t)}resetValue(e){void 0===e?this.storage.resetAll():this.storage.reset(e)}destroy(){super.destroy()}}t.PersistentState=u},40209:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(68983),o(63517);var i=s(o(93231)),r=o(50095);t.default=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;(0,i.default)(this,"rootWindow",void 0),(0,i.default)(this,"prefix",void 0),(0,i.default)(this,"savedKeys",[]),this.rootWindow=t,this.prefix=e,this.loadSavedKeys()}saveValue(e,t){this.rootWindow.localStorage.setItem(`${this.prefix}_${e}`,JSON.stringify(t)),-1===this.savedKeys.indexOf(e)&&(this.savedKeys.push(e),this.saveSavedKeys())}loadValue(e,t){const o=void 0===e?t:e,s=this.rootWindow.localStorage.getItem(`${this.prefix}_${o}`);return null===s?void 0:JSON.parse(s)}reset(e){this.rootWindow.localStorage.removeItem(`${this.prefix}_${e}`)}resetAll(){(0,r.arrayEach)(this.savedKeys,((e,t)=>{this.rootWindow.localStorage.removeItem(`${this.prefix}_${this.savedKeys[t]}`)})),this.clearSavedKeys()}loadSavedKeys(){const e=this.rootWindow.localStorage.getItem(`${this.prefix}__persistentStateKeys`),t="string"==typeof e?JSON.parse(e):void 0;this.savedKeys=t||[]}saveSavedKeys(){this.rootWindow.localStorage.setItem(`${this.prefix}__persistentStateKeys`,JSON.stringify(this.savedKeys))}clearSavedKeys(){this.savedKeys.length=0,this.saveSavedKeys()}}},52036:(e,t,o)=>{"use strict";t.__esModule=!0,t.getPlugin=d,t.getPluginsNames=function(){return[...l.getItems(),...h.getItems()]},t.hasPlugin=function(e){return!!d(e)},t.registerPlugin=function(e,t,o){[e,t,o]=function(e,t,o){"function"==typeof e&&(e=(t=e).PLUGIN_KEY,o=t.PLUGIN_PRIORITY);return[e,t,o]}(e,t,o),void 0===d(e)&&function(e,t,o){const i=(0,s.toUpperCaseFirst)(e);if(u.hasItem(i))throw new Error(a(i));void 0===o?h.addItem(i):l.addItem(o,i);u.addItem(i,t)}(e,t,o)},o(91683);var s=o(18609),i=o(21196),r=o(42386),n=o(57982);const a=e=>`There is already registered "${e}" plugin.`,l=(0,i.createPriorityMap)({errorPriorityExists:e=>`There is already registered plugin on priority "${e}".`,errorPriorityNaN:e=>`The priority "${e}" is not a number.`}),h=(0,n.createUniqueSet)({errorItemExists:a}),u=(0,r.createUniqueMap)({errorIdExists:a});function d(e){const t=(0,s.toUpperCaseFirst)(e);return u.getItem(t)}},27885:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(54249);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.Search=s.Search},54249:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=o(36026),n=o(22232),a=o(68145),l=o(93315);function h(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function u(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const d=t.PLUGIN_KEY="search",c=t.PLUGIN_PRIORITY=190,g=function(e,t,o,s,i){e.getCellMeta(t,o).isSearchResult=i},f=function(e,t,o){return!((0,l.isUndefined)(e)||null===e||!e.toLocaleLowerCase||0===e.length)&&(!(0,l.isUndefined)(t)&&null!==t&&-1!==t.toString().toLocaleLowerCase(o.locale).indexOf(e.toLocaleLowerCase(o.locale)))};var p=new WeakSet;class m extends r.BasePlugin{constructor(){super(...arguments),h(this,p),(0,i.default)(this,"callback",g),(0,i.default)(this,"queryMethod",f),(0,i.default)(this,"searchResultClass","htSearchResult")}static get PLUGIN_KEY(){return d}static get PLUGIN_PRIORITY(){return c}isEnabled(){return this.hot.getSettings()[d]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[d];this.updatePluginSettings(t),this.addHook("beforeRenderer",(function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return u(e,p,w).call(e,...o)})),super.enablePlugin()}disablePlugin(){var e=this;const t=function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return u(e,p,w).call(e,...o)};this.hot.addHook("beforeRenderer",t),this.hot.addHookOnce("afterViewRender",(()=>{this.hot.removeHook("beforeRenderer",t)})),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}query(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCallback(),o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getQueryMethod();const s=this.hot.countRows(),i=this.hot.countCols(),r=[],n=this.hot;return(0,a.rangeEach)(0,s-1,(s=>{(0,a.rangeEach)(0,i-1,(i=>{const a=this.hot.getDataAtCell(s,i),l=this.hot.getCellMeta(s,i),h=l.search.callback||t,u=(l.search.queryMethod||o)(e,a,l);if(u){const e={row:s,col:i,data:a};r.push(e)}h&&h(n,s,i,a,u)}))})),r}getCallback(){return this.callback}setCallback(e){this.callback=e}getQueryMethod(){return this.queryMethod}setQueryMethod(e){this.queryMethod=e}getSearchResultClass(){return this.searchResultClass}setSearchResultClass(e){this.searchResultClass=e}updatePluginSettings(e){(0,n.isObject)(e)&&(e.searchResultClass&&this.setSearchResultClass(e.searchResultClass),e.queryMethod&&this.setQueryMethod(e.queryMethod),e.callback&&this.setCallback(e.callback))}destroy(){super.destroy()}}function w(e,t,o,s,i,r){const n=r.className||[];let a=[];"string"==typeof n?a=n.split(" "):a.push(...n),this.isEnabled()&&r.isSearchResult?a.includes(this.searchResultClass)||a.push(`${this.searchResultClass}`):a.includes(this.searchResultClass)&&a.splice(a.indexOf(this.searchResultClass),1),r.className=a.join(" ")}t.Search=m},30450:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(84310);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.TouchScroll=s.TouchScroll},84310:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=o(83302),n=o(50095),a=o(36026),l=o(7374);function h(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function u(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}const d=t.PLUGIN_KEY="touchScroll",c=t.PLUGIN_PRIORITY=200;var g=new WeakSet,f=new WeakSet,p=new WeakSet;class m extends a.BasePlugin{constructor(){super(...arguments),h(this,p),h(this,f),h(this,g),(0,i.default)(this,"scrollbars",[]),(0,i.default)(this,"clones",[]),(0,i.default)(this,"lockedCollection",!1),(0,i.default)(this,"freezeOverlays",!1)}static get PLUGIN_KEY(){return d}static get PLUGIN_PRIORITY(){return c}static get SETTING_KEYS(){return!0}isEnabled(){return(0,l.isTouchSupported)()}enablePlugin(){this.enabled||(this.addHook("afterViewRender",(()=>u(this,g,w).call(this))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.lockedCollection=!1,super.updatePlugin()}disablePlugin(){super.disablePlugin()}registerEvents(){this.addHook("beforeTouchScroll",(()=>u(this,f,C).call(this))),this.addHook("afterMomentumScroll",(()=>u(this,p,v).call(this)))}}function w(){if(this.lockedCollection)return;const{topOverlay:e,bottomOverlay:t,inlineStartOverlay:o,topInlineStartCornerOverlay:s,bottomInlineStartCornerOverlay:i}=this.hot.view._wt.wtOverlays;this.lockedCollection=!0,this.scrollbars.length=0,this.scrollbars.push(e),t.clone&&this.scrollbars.push(t),this.scrollbars.push(o),s&&this.scrollbars.push(s),i&&i.clone&&this.scrollbars.push(i),this.clones=[],e.needFullRender&&this.clones.push(e.clone.wtTable.holder.parentNode),t.needFullRender&&this.clones.push(t.clone.wtTable.holder.parentNode),o.needFullRender&&this.clones.push(o.clone.wtTable.holder.parentNode),s&&this.clones.push(s.clone.wtTable.holder.parentNode),i&&i.clone&&this.clones.push(i.clone.wtTable.holder.parentNode)}function C(){this.freezeOverlays=!0,(0,n.arrayEach)(this.clones,(e=>{(0,r.addClass)(e,"hide-tween")}))}function v(){this.freezeOverlays=!1,(0,n.arrayEach)(this.clones,(e=>{(0,r.removeClass)(e,"hide-tween"),(0,r.addClass)(e,"show-tween")})),this.hot._registerTimeout((()=>{(0,n.arrayEach)(this.clones,(e=>{(0,r.removeClass)(e,"show-tween")}))}),400),(0,n.arrayEach)(this.scrollbars,(e=>{e.refresh(),e.resetFixedPosition()})),this.hot.view._wt.wtOverlays.syncScrollWithMaster()}t.TouchScroll=m},95128:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(65696);t.PLUGIN_KEY=s.PLUGIN_KEY,t.PLUGIN_PRIORITY=s.PLUGIN_PRIORITY,t.TrimRows=s.TrimRows},65696:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=o(36026),n=o(33165),a=o(50095);function l(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}const h=t.PLUGIN_KEY="trimRows",u=t.PLUGIN_PRIORITY=330;var d=new WeakSet;class c extends r.BasePlugin{constructor(){super(...arguments),l(this,d),(0,i.default)(this,"trimmedRowsMap",null)}static get PLUGIN_KEY(){return h}static get PLUGIN_PRIORITY(){return u}isEnabled(){return!!this.hot.getSettings()[h]}enablePlugin(){this.enabled||(this.trimmedRowsMap=this.hot.rowIndexMapper.registerMap("trimRows",new n.TrimmingMap),this.trimmedRowsMap.addLocalHook("init",(()=>function(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}(this,d,g).call(this))),super.enablePlugin())}updatePlugin(){const e=this.hot.getSettings()[h];Array.isArray(e)&&this.hot.batchExecution((()=>{this.trimmedRowsMap.clear(),(0,a.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("trimRows"),super.disablePlugin()}getTrimmedRows(){return this.trimmedRowsMap.getTrimmedIndexes()}trimRows(e){const t=this.getTrimmedRows(),o=this.isValidConfig(e);let s=t;o&&(s=Array.from(new Set(t.concat(e))));!1!==this.hot.runHooks("beforeTrimRow",t,s,o)&&(o&&this.hot.batchExecution((()=>{(0,a.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0),this.hot.runHooks("afterTrimRow",t,s,o,o&&s.length>t.length))}trimRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.trimRows(t)}untrimRows(e){const t=this.getTrimmedRows(),o=this.isValidConfig(e);let s=t;const i=this.trimmedRowsMap.getValues().slice(),r=e.length>0;o&&r&&((0,a.arrayEach)(e,(e=>{i[e]=!1})),s=(0,a.arrayReduce)(i,((e,t,o)=>(t&&e.push(o),e)),[]));!1!==this.hot.runHooks("beforeUntrimRow",t,s,o&&r)&&(o&&r&&this.trimmedRowsMap.setValues(i),this.hot.runHooks("afterUntrimRow",t,s,o&&r,o&&s.length<t.length))}untrimRow(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];this.untrimRows(t)}isTrimmed(e){return this.trimmedRowsMap.getValueAtIndex(e)||!1}untrimAll(){this.untrimRows(this.getTrimmedRows())}isValidConfig(e){const t=this.hot.countSourceRows();return e.every((e=>Number.isInteger(e)&&e>=0&&e<t))}destroy(){super.destroy()}}function g(){const e=this.hot.getSettings()[h];Array.isArray(e)&&this.hot.batchExecution((()=>{(0,a.arrayEach)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0)}t.TrimRows=c},77137:(e,t,o)=>{"use strict";t.__esModule=!0;var s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=i(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if("default"!==n&&Object.prototype.hasOwnProperty.call(e,n)){var a=r?Object.getOwnPropertyDescriptor(e,n):null;a&&(a.get||a.set)?Object.defineProperty(s,n,a):s[n]=e[n]}return s.default=e,o&&o.set(e,s),s}(o(63704));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(i=function(e){return e?o:t})(e)}t.UndoRedo=s.default,t.PLUGIN_KEY=s.PLUGIN_KEY},63704:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(20433);var i=s(o(56307)),r=o(50095),n=o(68145),a=o(22232),l=o(80734);const h="undoRedo",u=t.PLUGIN_KEY="undoRedo";function d(e){const t=this;this.instance=e,this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,this.enabled=!1,e.addHook("afterChange",(function(o,s){const i=o&&o.length;if(!i)return;if(!o.find((e=>{const[,,t,o]=e;return t!==o})))return;t.done((()=>{const t=o.reduce(((e,t)=>(e.push([...t]),e)),[]);(0,r.arrayEach)(t,(t=>{t[1]=e.propToCol(t[1])}));const s=i>1?this.getSelected():[[t[0][0],t[0][1]]];return new d.ChangeAction(t,s)}),s)})),e.addHook("afterCreateRow",((e,o,s)=>{t.done((()=>new d.CreateRowAction(e,o)),s)}));const o=(t,o,s,i)=>{const r=["visualRow","visualCol","row","col","prop"],a=r.length,l=[];return(0,n.rangeEach)(s,i,(s=>{(0,n.rangeEach)(t,o,(t=>{const o=e.getCellMeta(t,s);if(Object.keys(o).length!==a){const e=Object.fromEntries(Object.entries(o).filter((e=>{let[t]=e;return!1===r.includes(t)})));l.push([o.visualRow,o.visualCol,e])}}))})),l};e.addHook("beforeRemoveRow",((s,i,r,n)=>{t.done((()=>{const r=e.toPhysicalRow(s),n=r+i-1,l=(0,a.deepClone)(t.instance.getSourceData(r,0,r+i-1,t.instance.countSourceCols()-1));return new d.RemoveRowAction(r,l,e.getSettings().fixedRowsBottom,e.getSettings().fixedRowsTop,e.rowIndexMapper.getIndexesSequence(),o(r,n,0,e.countCols()-1))}),n)})),e.addHook("afterCreateCol",((e,o,s)=>{t.done((()=>new d.CreateColumnAction(e,o)),s)})),e.addHook("beforeRemoveCol",((s,i,r,a)=>{t.done((()=>{const r=t.instance.getSourceDataArray(),a=(t.instance.countCols()+s)%t.instance.countCols(),l=a+i-1,h=[],u=[],c=[];(0,n.rangeEach)(r.length-1,(t=>{const o=[],s=r[t];(0,n.rangeEach)(a,l,(t=>{o.push(s[e.toPhysicalColumn(t)])})),h.push(o)})),(0,n.rangeEach)(i-1,(t=>{c.push(e.toPhysicalColumn(a+t))})),Array.isArray(e.getSettings().colHeaders)&&(0,n.rangeEach)(i-1,(t=>{u.push(e.getSettings().colHeaders[e.toPhysicalColumn(a+t)]||null)}));const g=e.columnIndexMapper.getIndexesSequence(),f=e.rowIndexMapper.getIndexesSequence();return new d.RemoveColumnAction(a,c,h,u,g,f,e.getSettings().fixedColumnsStart,o(0,e.countRows(),a,l))}),a)})),e.addHook("beforeCellAlignment",((e,o,s,i)=>{t.done((()=>new d.CellAlignmentAction(e,o,s,i)))})),e.addHook("beforeFilter",(e=>{t.done((()=>new d.FiltersAction(e)))})),e.addHook("beforeRowMove",((e,o)=>{!1!==e&&t.done((()=>new d.RowMoveAction(e,o)))})),e.addHook("beforeMergeCells",((o,s)=>{s||t.done((()=>new d.MergeCellsAction(e,o)))})),e.addHook("afterUnmergeCells",((o,s)=>{s||t.done((()=>new d.UnmergeCellsAction(e,o)))})),e.addHook("afterInit",(()=>{t.init()}))}d.prototype.done=function(e,t){if(this.ignoreNewActions)return;if("UndoRedo.undo"===t||"UndoRedo.redo"===t||"auto"===t)return;const o=this.doneActions.slice();if(!1===this.instance.runHooks("beforeUndoStackChange",o,t))return;const s=e(),i=this.undoneActions.slice();this.doneActions.push(s),this.instance.runHooks("afterUndoStackChange",o,this.doneActions.slice()),this.instance.runHooks("beforeRedoStackChange",i),this.undoneActions.length=0,this.instance.runHooks("afterRedoStackChange",i,this.undoneActions.slice())},d.prototype.undo=function(){if(this.isUndoAvailable()){const e=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",e);const t=this.doneActions.pop();this.instance.runHooks("afterUndoStackChange",e,this.doneActions.slice());const o=(0,a.deepClone)(t);if(!1===this.instance.runHooks("beforeUndo",o))return;this.ignoreNewActions=!0;const s=this,i=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",i),t.undo(this.instance,(()=>{s.ignoreNewActions=!1,s.undoneActions.push(t)})),this.instance.runHooks("afterRedoStackChange",i,this.undoneActions.slice()),this.instance.runHooks("afterUndo",o)}},d.prototype.redo=function(){if(this.isRedoAvailable()){const e=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",e);const t=this.undoneActions.pop();this.instance.runHooks("afterRedoStackChange",e,this.undoneActions.slice());const o=(0,a.deepClone)(t);if(!1===this.instance.runHooks("beforeRedo",o))return;this.ignoreNewActions=!0;const s=this,i=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",i),t.redo(this.instance,(()=>{s.ignoreNewActions=!1,s.doneActions.push(t)})),this.instance.runHooks("afterUndoStackChange",i,this.doneActions.slice()),this.instance.runHooks("afterRedo",o)}},d.prototype.isUndoAvailable=function(){return this.doneActions.length>0},d.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},d.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},d.prototype.isEnabled=function(){return this.enabled},d.prototype.enable=function(){if(this.isEnabled())return;const e=this.instance;var t;this.enabled=!0,(t=e).undo=function(){return t.undoRedo.undo()},t.redo=function(){return t.undoRedo.redo()},t.isUndoAvailable=function(){return t.undoRedo.isUndoAvailable()},t.isRedoAvailable=function(){return t.undoRedo.isRedoAvailable()},t.clearUndo=function(){return t.undoRedo.clear()},this.registerShortcuts(),e.addHook("afterChange",f)},d.prototype.disable=function(){if(!this.isEnabled())return;const e=this.instance;var t;this.enabled=!1,delete(t=e).undo,delete t.redo,delete t.isUndoAvailable,delete t.isRedoAvailable,delete t.clearUndo,this.unregisterShortcuts(),e.removeHook("afterChange",f)},d.prototype.destroy=function(){this.clear(),this.instance=null,this.doneActions=null,this.undoneActions=null},d.Action=function(){},d.Action.prototype.undo=function(){},d.Action.prototype.redo=function(){},d.ChangeAction=function(e,t){this.changes=e,this.selected=t,this.actionType="change"},(0,a.inherit)(d.ChangeAction,d.Action),d.ChangeAction.prototype.undo=function(e,t){const o=(0,a.deepClone)(this.changes),s=e.countEmptyRows(!0),i=e.countEmptyCols(!0);for(let e=0,t=o.length;e<t;e++)o[e].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtCell(o,null,null,"UndoRedo.undo");for(let t=0,r=o.length;t<r;t++){const[r,n]=o[t];e.getSettings().minSpareRows&&r+1+e.getSettings().minSpareRows===e.countRows()&&s===e.getSettings().minSpareRows&&(e.alter("remove_row",parseInt(r+1,10),e.getSettings().minSpareRows),e.undoRedo.doneActions.pop()),e.getSettings().minSpareCols&&n+1+e.getSettings().minSpareCols===e.countCols()&&i===e.getSettings().minSpareCols&&(e.alter("remove_col",parseInt(n+1,10),e.getSettings().minSpareCols),e.undoRedo.doneActions.pop())}const r=e.getSelectedLast();if(void 0!==r){const[t,s]=o[0],[i,n]=r,a=t>=e.view.getFirstFullyVisibleRow(),l=s>=e.view.getFirstFullyVisibleColumn();if(!1===(a&&l)&&!0===(i!==t||n!==s)){const o={row:t,col:s};!1===a&&(o.verticalSnap="top"),!1===l&&(o.horizontalSnap="start"),e.scrollViewportTo(o)}}e.selectCells(this.selected,!1,!1)},d.ChangeAction.prototype.redo=function(e,t){const o=(0,a.deepClone)(this.changes);for(let e=0,t=o.length;e<t;e++)o[e].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtCell(o,null,null,"UndoRedo.redo"),this.selected&&e.selectCells(this.selected,!1,!1)},d.CreateRowAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_row"},(0,a.inherit)(d.CreateRowAction,d.Action),d.CreateRowAction.prototype.undo=function(e,t){const o=e.countRows(),s=e.getSettings().minSpareRows;this.index>=o&&this.index-s<o&&(this.index-=s),e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.amount,"UndoRedo.undo")},d.CreateRowAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row_above",this.index,this.amount,"UndoRedo.redo")},d.RemoveRowAction=function(e,t,o,s,i,r){this.index=e,this.data=t,this.actionType="remove_row",this.fixedRowsBottom=o,this.fixedRowsTop=s,this.rowIndexesSequence=i,this.removedCellMetas=r},(0,a.inherit)(d.RemoveRowAction,d.Action),d.RemoveRowAction.prototype.undo=function(e,t){const o=e.getSettings(),s=[];o.fixedRowsBottom=this.fixedRowsBottom,o.fixedRowsTop=this.fixedRowsTop,this.data.forEach(((e,t)=>{Object.keys(e).forEach((o=>{const i=parseInt(o,10);s.push([this.index+t,isNaN(i)?o:i,e[o]])}))})),e.alter("insert_row_above",this.index,this.data.length,"UndoRedo.undo"),this.removedCellMetas.forEach((t=>{let[o,s,i]=t;e.setCellMetaObject(o,s,i)})),e.addHookOnce("afterViewRender",t),e.setSourceDataAtCell(s,null,null,"UndoRedo.undo"),e.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence)},d.RemoveRowAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.data.length,"UndoRedo.redo")},d.CreateColumnAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_col"},(0,a.inherit)(d.CreateColumnAction,d.Action),d.CreateColumnAction.prototype.undo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")},d.CreateColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col_start",this.index,this.amount,"UndoRedo.redo")},d.RemoveColumnAction=function(e,t,o,s,i,r,n,a){this.index=e,this.indexes=t,this.data=o,this.amount=this.data[0].length,this.headers=s,this.columnPositions=i.slice(0),this.rowPositions=r.slice(0),this.actionType="remove_col",this.fixedColumnsStart=n,this.removedCellMetas=a},(0,a.inherit)(d.RemoveColumnAction,d.Action),d.RemoveColumnAction.prototype.undo=function(e,t){e.getSettings().fixedColumnsStart=this.fixedColumnsStart;const o=this.indexes.slice(0).sort(),s=(e,t,s)=>s[this.indexes.indexOf(o[t])],i=this.data.length,n=[];for(let e=0;e<i;e++)n.push((0,r.arrayMap)(this.data[e],s));const a=(0,r.arrayMap)(this.headers,s),l=[];e.alter("insert_col_start",this.indexes[0],this.indexes.length,"UndoRedo.undo"),(0,r.arrayEach)(e.getSourceDataArray(),((e,t)=>{(0,r.arrayEach)(o,((o,s)=>{e[o]=n[t][s],l.push([t,o,e[o]])}))})),e.setSourceDataAtCell(l,void 0,void 0,"UndoRedo.undo"),void 0!==this.headers&&(0,r.arrayEach)(a,((t,s)=>{e.getSettings().colHeaders[o[s]]=t})),this.removedCellMetas.forEach((t=>{let[o,s,i]=t;e.setCellMetaObject(o,s,i)})),e.batchExecution((()=>{e.rowIndexMapper.setIndexesSequence(this.rowPositions),e.columnIndexMapper.setIndexesSequence(this.columnPositions)}),!0),e.addHookOnce("afterViewRender",t),e.render()},d.RemoveColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.redo")},d.CellAlignmentAction=function(e,t,o,s){this.stateBefore=e,this.range=t,this.type=o,this.alignment=s},d.CellAlignmentAction.prototype.undo=function(e,t){(0,r.arrayEach)(this.range,(t=>{t.forAll(((t,o)=>{t>=0&&o>=0&&e.setCellMeta(t,o,"className",this.stateBefore[t][o]||" htLeft")}))})),e.addHookOnce("afterViewRender",t),e.render()},d.CellAlignmentAction.prototype.redo=function(e,t){(0,l.align)(this.range,this.type,this.alignment,((t,o)=>e.getCellMeta(t,o)),((t,o,s,i)=>e.setCellMeta(t,o,s,i))),e.addHookOnce("afterViewRender",t),e.render()},d.FiltersAction=function(e){this.conditionsStack=e,this.actionType="filter"},(0,a.inherit)(d.FiltersAction,d.Action),d.FiltersAction.prototype.undo=function(e,t){const o=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),o.conditionCollection.importAllConditions(this.conditionsStack.slice(0,this.conditionsStack.length-1)),o.filter()},d.FiltersAction.prototype.redo=function(e,t){const o=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),o.conditionCollection.importAllConditions(this.conditionsStack),o.filter()};class c extends d.Action{constructor(e,t){super(),this.cellRange=t;const o=this.cellRange.getTopStartCorner(),s=this.cellRange.getBottomEndCorner();this.rangeData=e.getData(o.row,o.col,s.row,s.col)}undo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.unmergeRange(this.cellRange,!0);const s=this.cellRange.getTopStartCorner();e.populateFromArray(s.row,s.col,this.rangeData,void 0,void 0,"MergeCells")}redo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.mergeRange(this.cellRange)}}d.MergeCellsAction=c;class g extends d.Action{constructor(e,t){super(),this.cellRange=t}undo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.mergeRange(this.cellRange,!0)}redo(e,t){const o=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),o.unmergeRange(this.cellRange,!0),e.render()}}function f(e,t){if("loadData"===t)return this.undoRedo.clear()}d.UnmergeCellsAction=g,d.RowMoveAction=function(e,t){this.rows=e.slice(),this.finalIndex=t,this.actionType="row_move"},(0,a.inherit)(d.RowMoveAction,d.Action),d.RowMoveAction.prototype.undo=function(e,t){const o=e.getPlugin("manualRowMove"),s=[].concat(this.rows),i=s.filter((e=>e>this.finalIndex)),r=s.filter((e=>e<=this.finalIndex)),n=i.sort(((e,t)=>t-e)).concat(r.sort(((e,t)=>e-t)));e.addHookOnce("afterViewRender",t);for(let t=0;t<n.length;t+=1){const s=e.toVisualRow(n[t]);o.moveRow(s,n[t])}e.render(),e.deselectCell(),e.selectRows(this.rows[0],this.rows[0]+this.rows.length-1)},d.RowMoveAction.prototype.redo=function(e,t){const o=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t),o.moveRows(this.rows.slice(),this.finalIndex),e.render(),e.deselectCell(),e.selectRows(this.finalIndex,this.finalIndex+this.rows.length-1)},d.prototype.init=function(){const e=this.instance.getSettings().undo,t=void 0===e||e;this.instance.undoRedo||(this.instance.undoRedo=this),t?this.instance.undoRedo.enable():this.instance.undoRedo.disable()},d.prototype.registerShortcuts=function(){const e=this.instance.getShortcutManager().getContext("grid"),t={runOnlyIf:e=>!e.altKey,group:h};e.addShortcuts([{keys:[["Control/Meta","z"]],callback:()=>{this.undo()}},{keys:[["Control/Meta","y"],["Control/Meta","Shift","z"]],callback:()=>{this.redo()}}],t)},d.prototype.unregisterShortcuts=function(){this.instance.getShortcutManager().getContext("grid").removeShortcutsByGroup(h)};const p=i.default.getSingleton();p.add("afterUpdateSettings",(function(){var e;null===(e=this.getPlugin("undoRedo"))||void 0===e||e.init()})),p.register("beforeUndo"),p.register("afterUndo"),p.register("beforeRedo"),p.register("afterRedo"),d.PLUGIN_KEY=u,d.SETTING_KEYS=!0;t.default=d},62929:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllModules=function(){(0,s.registerAllEditors)(),(0,i.registerAllRenderers)(),(0,r.registerAllValidators)(),(0,n.registerAllCellTypes)(),(0,a.registerAllPlugins)()};var s=o(74465);t.registerAllEditors=s.registerAllEditors;var i=o(42418);t.registerAllRenderers=i.registerAllRenderers;var r=o(12630);t.registerAllValidators=r.registerAllValidators;var n=o(74319);t.registerAllCellTypes=n.registerAllCellTypes;var a=o(40106);t.registerAllPlugins=a.registerAllPlugins},1470:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.autocompleteRenderer=u;var i=o(95025),r=o(50695),n=s(o(75244)),a=o(83302);o(67004);var l=o(5386);const h=t.RENDERER_TYPE="autocomplete";function u(e,t,o,s,h,u,d){const{rootDocument:c}=e,g=d.allowHtml?i.htmlRenderer:r.textRenderer,f=c.createElement("DIV"),p=e.getSettings().ariaTags;if(f.className="htAutocompleteArrow",p&&f.setAttribute(...(0,l.A11Y_HIDDEN)()),f.appendChild(c.createTextNode(String.fromCharCode(9660))),g.apply(this,[e,t,o,s,h,u,d]),t.firstChild||t.appendChild(c.createTextNode(String.fromCharCode(160))),t.insertBefore(f,t.firstChild),(0,a.addClass)(t,"htAutocomplete"),!e.acArrowListener){const i=new n.default(e);e.acArrowListener=function(i){(0,a.hasClass)(i.target,"htAutocompleteArrow")&&e.view._wt.getSetting("onCellDblClick",null,e._createCellCoords(o,s),t)},i.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",(()=>{i.destroy()}))}}u.RENDERER_TYPE=h},16124:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(1470);t.RENDERER_TYPE=s.RENDERER_TYPE,t.autocompleteRenderer=s.autocompleteRenderer},24945:(e,t,o)=>{"use strict";t.__esModule=!0,t.baseRenderer=n,o(63517);var s=o(83302),i=o(5386);const r=t.RENDERER_TYPE="base";function n(e,t,o,r,n,a,l){const h=l.ariaTags,u=[],d=[],c=[],g=[];l.className&&(0,s.addClass)(t,l.className),l.readOnly?(u.push(l.readOnlyCellClassName),h&&g.push((0,i.A11Y_READONLY)())):h&&c.push((0,i.A11Y_READONLY)()[0]),!1===l.valid&&l.invalidCellClassName?(u.push(l.invalidCellClassName),h&&g.push((0,i.A11Y_INVALID)())):(d.push(l.invalidCellClassName),h&&c.push((0,i.A11Y_INVALID)()[0])),!1===l.wordWrap&&l.noWordWrapClassName&&u.push(l.noWordWrapClassName),!a&&l.placeholder&&u.push(l.placeholderCellClassName),(0,s.removeClass)(t,d),(0,s.addClass)(t,u),(0,s.removeAttribute)(t,c),(0,s.setAttribute)(t,g)}n.RENDERER_TYPE=r},60686:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(24945);t.RENDERER_TYPE=s.RENDERER_TYPE,t.baseRenderer=s.baseRenderer},41901:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.checkboxRenderer=v,o(63517);var i=o(60686),r=s(o(75244)),n=o(83302),a=o(93315),l=o(29282),h=s(o(56307)),u=o(5386),d=o(77516);o(51768);const c=new WeakMap,g=new WeakMap,f="htBadValue",p="data-row",m="data-col",w="checkboxRenderer",C=t.RENDERER_TYPE="checkbox";function v(e,t,o,s,h,C,v){const{rootDocument:E}=e,S=e.getSettings().ariaTags;i.baseRenderer.apply(this,[e,t,o,s,h,C,v]),function(e){let t=g.get(e);if(!t){const{rootElement:o}=e;t=new r.default(e),t.addEventListener(o,"click",(t=>function(e,t){const{target:o}=e;if(!y(o))return;if(!o.hasAttribute(p)||!o.hasAttribute(m))return;const s=parseInt(o.getAttribute(p),10),i=parseInt(o.getAttribute(m),10),r=t.getCellMeta(s,i);r.readOnly&&e.preventDefault()}(t,e))),t.addEventListener(o,"mouseup",(t=>function(e,t){const{target:o}=e;if(!y(o))return;if(!o.hasAttribute(p)||!o.hasAttribute(m))return;setTimeout(t.listen,10)}(t,e))),t.addEventListener(o,"change",(t=>function(e,t){const{target:o}=e;if(!y(o))return;if(!o.hasAttribute(p)||!o.hasAttribute(m))return;const s=parseInt(o.getAttribute(p),10),i=parseInt(o.getAttribute(m),10),r=t.getCellMeta(s,i);if(!r.readOnly){let o=null;o=e.target.checked?void 0===r.uncheckedTemplate||r.checkedTemplate:void 0!==r.uncheckedTemplate&&r.uncheckedTemplate,t.setDataAtCell(s,i,o)}}(t,e))),g.set(e,t)}}(e);let R=function(e){const t=e.createElement("input");return t.className="htCheckboxRendererInput",t.type="checkbox",t.setAttribute("tabindex","-1"),t.cloneNode(!1)}(E);const b=v.label;let _=!1;if(void 0===v.checkedTemplate&&(v.checkedTemplate=!0),void 0===v.uncheckedTemplate&&(v.uncheckedTemplate=!1),(0,n.empty)(t),C===v.checkedTemplate||(0,a.stringify)(C).toLocaleLowerCase(v.locale)===(0,a.stringify)(v.checkedTemplate).toLocaleLowerCase(v.locale)?R.checked=!0:C===v.uncheckedTemplate||(0,a.stringify)(C).toLocaleLowerCase(v.locale)===(0,a.stringify)(v.uncheckedTemplate).toLocaleLowerCase(v.locale)?R.checked=!1:(0,a.isEmpty)(C)?(0,n.addClass)(R,"noValue"):(R.style.display="none",(0,n.addClass)(R,f),_=!0),(0,n.setAttribute)(R,[[p,o],[m,s]]),S&&(0,n.setAttribute)(R,[(0,u.A11Y_LABEL)(R.checked?e.getTranslatedPhrase(d.CHECKBOX_CHECKED):e.getTranslatedPhrase(d.CHECKBOX_UNCHECKED)),(0,u.A11Y_CHECKED)(R.checked),(0,u.A11Y_CHECKBOX)()]),!_&&b){let i="";if(b.value)i="function"==typeof b.value?b.value.call(this,o,s,h,C):b.value;else if(b.property){const t=e.getDataAtRowProp(o,b.property);i=null!==t?t:""}const r=function(e,t,o){const s=e.createElement("label");return s.className="htCheckboxRendererLabel "+(o?"fullWidth":""),s.appendChild(e.createTextNode(t)),s.cloneNode(!0)}(E,i,!0!==b.separated);"before"===b.position?b.separated?(t.appendChild(r),t.appendChild(R)):(r.appendChild(R),R=r):b.position&&"after"!==b.position||(b.separated?(t.appendChild(R),t.appendChild(r)):(r.insertBefore(R,r.firstChild),R=r))}function T(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const o=e.getSelectedRange();if(o)for(let s=0;s<o.length;s++){const{row:i,col:r}=o[s].getTopStartCorner(),{row:n,col:a}=o[s].getBottomEndCorner(),l=[];for(let o=i;o<=n;o+=1)for(let s=r;s<=a;s+=1){const i=e.getCellMeta(o,s);if("checkbox"!==i.type)return;if(!0===i.readOnly)continue;void 0===i.checkedTemplate&&(i.checkedTemplate=!0),void 0===i.uncheckedTemplate&&(i.uncheckedTemplate=!1);const r=e.getDataAtCell(o,s);!1===t?[i.checkedTemplate,i.checkedTemplate.toString()].includes(r)?l.push([o,s,i.uncheckedTemplate]):[i.uncheckedTemplate,i.uncheckedTemplate.toString(),null,void 0].includes(r)&&l.push([o,s,i.checkedTemplate]):l.push([o,s,i.uncheckedTemplate])}l.length>0&&e.setDataAtCell(l)}}function O(){const t=e.getSelectedRange();if(t){for(let o=0;o<t.length;o++){const s=t[o].getTopStartCorner(),i=t[o].getBottomEndCorner();for(let t=s.row;t<=i.row;t++)for(let o=s.col;o<=i.col;o++){const s=e.getCellMeta(t,o);if("checkbox"!==s.type)return!1;const i=e.getCell(t,o);if(null==i)return!0;if(i.querySelectorAll("input[type=checkbox]").length>0&&!s.readOnly)return!0}}return!1}}(!b||b&&!b.separated)&&t.appendChild(R),_&&t.appendChild(E.createTextNode("#bad-value#")),c.has(e)||(c.set(e,!0),function(){const t=e.getShortcutManager().getContext("grid"),o={group:w};t.addShortcuts([{keys:[["space"]],callback:()=>(T(),!O())},{keys:[["enter"]],callback:()=>(T(),!O()),runOnlyIf:()=>e.getSettings().enterBeginsEditing},{keys:[["delete"],["backspace"]],callback:()=>(T(!0),!O()),relativeToGroup:l.EDITOR_EDIT_GROUP,position:"before"}],o)}())}function y(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}h.default.getSingleton().add("modifyAutoColumnSizeSeed",(function(e,t,o){const{label:s,type:i,row:r,column:n,prop:a}=t;if(i===C){if(s){const{value:t,property:i}=s;let l=o;if(t)l="function"==typeof t?t(r,n,a,o):t;else if(i){const e=this.getDataAtRowProp(r,i);l=null!==e?e:o}e=l}return e}})),v.RENDERER_TYPE=C},8877:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(41901);t.RENDERER_TYPE=s.RENDERER_TYPE,t.checkboxRenderer=s.checkboxRenderer},22137:(e,t,o)=>{"use strict";t.__esModule=!0,t.dateRenderer=r;var s=o(16124);const i=t.RENDERER_TYPE="date";function r(e,t,o,i,r,n,a){s.autocompleteRenderer.apply(this,[e,t,o,i,r,n,a])}r.RENDERER_TYPE=i},56522:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(22137);t.RENDERER_TYPE=s.RENDERER_TYPE,t.dateRenderer=s.dateRenderer},12626:(e,t,o)=>{"use strict";t.__esModule=!0,t.dropdownRenderer=r;var s=o(16124);const i=t.RENDERER_TYPE="dropdown";function r(e,t,o,i,r,n,a){s.autocompleteRenderer.apply(this,[e,t,o,i,r,n,a])}r.RENDERER_TYPE=i},45194:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(12626);t.RENDERER_TYPE=s.RENDERER_TYPE,t.dropdownRenderer=s.dropdownRenderer},33979:(e,t,o)=>{"use strict";t.__esModule=!0,t.handsontableRenderer=r;var s=o(16124);const i=t.RENDERER_TYPE="handsontable";function r(e,t,o,i,r,n,a){s.autocompleteRenderer.apply(this,[e,t,o,i,r,n,a])}r.RENDERER_TYPE=i},67981:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(33979);t.RENDERER_TYPE=s.RENDERER_TYPE,t.handsontableRenderer=s.handsontableRenderer},91897:(e,t,o)=>{"use strict";t.__esModule=!0,t.htmlRenderer=n;var s=o(60686),i=o(83302);const r=t.RENDERER_TYPE="html";function n(e,t,o,r,n,a,l){s.baseRenderer.apply(this,[e,t,o,r,n,a,l]),(0,i.fastInnerHTML)(t,null==a?"":a,!1)}n.RENDERER_TYPE=r},95025:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(91897);t.RENDERER_TYPE=s.RENDERER_TYPE,t.htmlRenderer=s.htmlRenderer},42418:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllRenderers=function(){(0,f.registerRenderer)(s.autocompleteRenderer),(0,f.registerRenderer)(i.baseRenderer),(0,f.registerRenderer)(n.checkboxRenderer),(0,f.registerRenderer)(r.dropdownRenderer),(0,f.registerRenderer)(a.handsontableRenderer),(0,f.registerRenderer)(l.htmlRenderer),(0,f.registerRenderer)(h.numericRenderer),(0,f.registerRenderer)(u.passwordRenderer),(0,f.registerRenderer)(d.selectRenderer),(0,f.registerRenderer)(c.textRenderer),(0,f.registerRenderer)(g.timeRenderer)};var s=o(16124);t.autocompleteRenderer=s.autocompleteRenderer,t.AUTOCOMPLETE_RENDERER=s.RENDERER_TYPE;var i=o(60686);t.baseRenderer=i.baseRenderer,t.BASE_RENDERER=i.RENDERER_TYPE;var r=o(45194);t.dropdownRenderer=r.dropdownRenderer,t.DROPDOWN_RENDERER=r.RENDERER_TYPE;var n=o(8877);t.checkboxRenderer=n.checkboxRenderer,t.CHECKBOX_RENDERER=n.RENDERER_TYPE;var a=o(67981);t.handsontableRenderer=a.handsontableRenderer,t.HANDSONTABLE_RENDERER=a.RENDERER_TYPE;var l=o(95025);t.htmlRenderer=l.htmlRenderer,t.HTML_RENDERER=l.RENDERER_TYPE;var h=o(78416);t.numericRenderer=h.numericRenderer,t.NUMERIC_RENDERER=h.RENDERER_TYPE;var u=o(76978);t.passwordRenderer=u.passwordRenderer,t.PASSWORD_RENDERER=u.RENDERER_TYPE;var d=o(73619);t.selectRenderer=d.selectRenderer,t.SELECT_RENDERER=d.RENDERER_TYPE;var c=o(50695);t.textRenderer=c.textRenderer,t.TEXT_RENDERER=c.RENDERER_TYPE;var g=o(43853);t.timeRenderer=g.timeRenderer,t.TIME_RENDERER=g.RENDERER_TYPE;var f=o(7462);t.registerRenderer=f.registerRenderer,t.getRegisteredRendererNames=f.getRegisteredRendererNames,t.getRegisteredRenderers=f.getRegisteredRenderers,t.getRenderer=f.getRenderer,t.hasRenderer=f.hasRenderer},78416:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(77635);t.RENDERER_TYPE=s.RENDERER_TYPE,t.numericRenderer=s.numericRenderer},77635:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.numericRenderer=l,o(63517);var i=s(o(3333)),r=o(50695),n=o(68145);const a=t.RENDERER_TYPE="numeric";function l(e,t,o,s,a,l,h){let u=l;if((0,n.isNumeric)(u)){const e=h.numericFormat,o=e&&e.culture||"-",s=e&&e.pattern,r=h.className||"",n=r.length?r.split(" "):[];if(void 0!==o&&!i.default.languages()[o]){const e=o.replace("-",""),t=i.default.allLanguages?i.default.allLanguages[o]:i.default[e];t&&i.default.registerLanguage(t)}i.default.setLanguage(o),u=(0,i.default)(u).format(s||"0"),n.indexOf("htLeft")<0&&n.indexOf("htCenter")<0&&n.indexOf("htRight")<0&&n.indexOf("htJustify")<0&&n.push("htRight"),n.indexOf("htNumeric")<0&&n.push("htNumeric"),h.className=n.join(" "),t.dir="ltr"}(0,r.textRenderer)(e,t,o,s,a,u,h)}l.RENDERER_TYPE=a},76978:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(58486);t.RENDERER_TYPE=s.RENDERER_TYPE,t.passwordRenderer=s.passwordRenderer},58486:(e,t,o)=>{"use strict";t.__esModule=!0,t.passwordRenderer=a;var s=o(50695),i=o(83302),r=o(68145);const n=t.RENDERER_TYPE="password";function a(e,t,o,n,a,l,h){s.textRenderer.apply(this,[e,t,o,n,a,l,h]);const u=h.hashLength||t.innerHTML.length,d=h.hashSymbol||"*";let c="";(0,r.rangeEach)(u-1,(()=>{c+=d})),(0,i.fastInnerHTML)(t,c)}a.RENDERER_TYPE=n},7462:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getRenderer=function(e){if("function"==typeof e)return e;if(!a(e))throw Error(`No registered renderer found under "${e}" name`);return n(e)},t.registerRenderer=function(e,t){"string"!=typeof e&&(e=(t=e).RENDERER_TYPE);r(e,t)},o(91683);var i=s(o(63800));const{register:r,getItem:n,hasItem:a,getNames:l,getValues:h}=(0,i.default)("renderers");t.getRegisteredRenderers=h,t.getRegisteredRendererNames=l,t.hasRenderer=a},73619:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(33845);t.RENDERER_TYPE=s.RENDERER_TYPE,t.selectRenderer=s.selectRenderer},33845:(e,t,o)=>{"use strict";t.__esModule=!0,t.selectRenderer=r;var s=o(50695);const i=t.RENDERER_TYPE="select";function r(e,t,o,i,r,n,a){s.textRenderer.apply(this,[e,t,o,i,r,n,a])}r.RENDERER_TYPE=i},50695:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(84249);t.RENDERER_TYPE=s.RENDERER_TYPE,t.textRenderer=s.textRenderer},84249:(e,t,o)=>{"use strict";t.__esModule=!0,t.textRenderer=a;var s=o(60686),i=o(83302),r=o(93315);const n=t.RENDERER_TYPE="text";function a(e,t,o,n,a,l,h){s.baseRenderer.apply(this,[e,t,o,n,a,l,h]);let u=l;if(!u&&h.placeholder&&(u=h.placeholder),u=(0,r.stringify)(u),h.trimWhitespace&&(u=u.trim()),h.rendererTemplate){(0,i.empty)(t);const s=e.rootDocument.createElement("TEMPLATE");s.setAttribute("bind","{{}}"),s.innerHTML=h.rendererTemplate,HTMLTemplateElement.decorate(s),s.model=e.getSourceDataAtRow(o),t.appendChild(s)}else(0,i.fastInnerText)(t,u)}a.RENDERER_TYPE=n},43853:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(98706);t.RENDERER_TYPE=s.RENDERER_TYPE,t.timeRenderer=s.timeRenderer},98706:(e,t,o)=>{"use strict";t.__esModule=!0,t.timeRenderer=r;var s=o(50695);const i=t.RENDERER_TYPE="time";function r(e,t,o,i,r,n,a){s.textRenderer.apply(this,[e,t,o,i,r,n,a]),t.dir="ltr"}r.RENDERER_TYPE=i},43395:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517),o(91683);var i=s(o(93231)),r=o(32838),n=o(83692),a=o(45951),l=o(39191),h=o(55730),u=o(84380),d=o(520),c=o(73193),g=o(10450),f=o(21280);t.ACTIVE_HEADER_TYPE=f.HIGHLIGHT_ACTIVE_HEADER_TYPE,t.AREA_TYPE=f.HIGHLIGHT_AREA_TYPE,t.FOCUS_TYPE=f.HIGHLIGHT_FOCUS_TYPE,t.CUSTOM_SELECTION_TYPE=f.HIGHLIGHT_CUSTOM_SELECTION_TYPE,t.FILL_TYPE=f.HIGHLIGHT_FILL_TYPE,t.HEADER_TYPE=f.HIGHLIGHT_HEADER_TYPE,t.ROW_TYPE=f.HIGHLIGHT_ROW_TYPE,t.COLUMN_TYPE=f.HIGHLIGHT_COLUMN_TYPE;var p=o(50095);let m;function w(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}function C(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var v=new WeakSet;m=Symbol.iterator;function y(e,t){const o=this.layerLevel;if(e.has(o))return e.get(o);const s=t({layerLevel:o,...this.options});return e.set(o,s),s}t.default=class{constructor(e){w(this,v),(0,i.default)(this,"options",void 0),(0,i.default)(this,"layerLevel",0),(0,i.default)(this,"focus",void 0),(0,i.default)(this,"fill",void 0),(0,i.default)(this,"layeredAreas",new Map),(0,i.default)(this,"areas",new Map),(0,i.default)(this,"rowHeaders",new Map),(0,i.default)(this,"columnHeaders",new Map),(0,i.default)(this,"activeRowHeaders",new Map),(0,i.default)(this,"activeColumnHeaders",new Map),(0,i.default)(this,"activeCornerHeaders",new Map),(0,i.default)(this,"rowHighlights",new Map),(0,i.default)(this,"columnHighlights",new Map),(0,i.default)(this,"customSelections",[]),this.options=e,this.focus=(0,h.createHighlight)(e),this.fill=(0,d.createHighlight)(e)}isEnabledFor(e,t){let o=e;e===f.HIGHLIGHT_FOCUS_TYPE&&(o="current");let s=this.options.disabledCellSelection(t.row,t.col);return"string"==typeof s&&(s=[s]),!1===s||Array.isArray(s)&&!s.includes(o)}useLayerLevel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.layerLevel=e,this}getFocus(){return this.focus}getFill(){return this.fill}createLayeredArea(){return C(this,v,y).call(this,this.layeredAreas,n.createHighlight)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return C(this,v,y).call(this,this.areas,a.createHighlight)}getAreas(){return[...this.areas.values()]}createRowHeader(){return C(this,v,y).call(this,this.rowHeaders,c.createHighlight)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return C(this,v,y).call(this,this.columnHeaders,c.createHighlight)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return C(this,v,y).call(this,this.activeRowHeaders,r.createHighlight)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return C(this,v,y).call(this,this.activeColumnHeaders,r.createHighlight)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return C(this,v,y).call(this,this.activeCornerHeaders,r.createHighlight)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return C(this,v,y).call(this,this.rowHighlights,g.createHighlight)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return C(this,v,y).call(this,this.columnHighlights,l.createHighlight)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(e){this.customSelections.push((0,u.createHighlight)({...this.options,...e}))}clear(){this.focus.clear(),this.fill.clear(),(0,p.arrayEach)(this.areas.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.layeredAreas.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.rowHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.columnHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.activeRowHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.activeColumnHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.activeCornerHeaders.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.rowHighlights.values(),(e=>{e.clear()})),(0,p.arrayEach)(this.columnHighlights.values(),(e=>{e.clear()}))}[m](){return[this.focus,this.fill,...this.areas.values(),...this.layeredAreas.values(),...this.rowHeaders.values(),...this.columnHeaders.values(),...this.activeRowHeaders.values(),...this.activeColumnHeaders.values(),...this.activeCornerHeaders.values(),...this.rowHighlights.values(),...this.columnHighlights.values(),...this.customSelections][Symbol.iterator]()}}},32838:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.createHighlight=function(e){let{activeHeaderClassName:t,...o}=e;return new r.default({className:t,...o,selectionType:i.HIGHLIGHT_ACTIVE_HEADER_TYPE})};var i=o(21280),r=s(o(76337))},45951:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.createHighlight=function(e){let{...t}=e;return new r.default({className:"highlight",...t,selectionType:i.HIGHLIGHT_AREA_TYPE})};var i=o(21280),r=s(o(76337))},83692:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.createHighlight=function(e){let{areaCornerVisible:t,...o}=e;return new r.default({className:"area",createLayers:!0,border:{width:1,color:"#4b89ff",cornerVisible:t},...o,selectionType:i.HIGHLIGHT_AREA_TYPE})};var i=o(21280),r=s(o(76337))},39191:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.createHighlight=function(e){let{columnClassName:t,...o}=e;return new r.default({className:t,...o,selectionType:i.HIGHLIGHT_COLUMN_TYPE})};var i=o(21280),r=s(o(76337))},84380:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.createHighlight=function(e){let{border:t,visualCellRange:o,...s}=e;return new r.default({...t,...s,selectionType:i.HIGHLIGHT_CUSTOM_SELECTION_TYPE},o)};var i=o(21280),r=s(o(76337))},520:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.createHighlight=function(e){let{...t}=e;return new r.default({className:"fill",border:{width:1,color:"#ff0000"},...t,selectionType:i.HIGHLIGHT_FILL_TYPE})};var i=o(21280),r=s(o(76337))},55730:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.createHighlight=function(e){let{cellCornerVisible:t,...o}=e;return new r.default({className:"current",headerAttributes:[(0,n.A11Y_SELECTED)()],border:{width:2,color:"#4b89ff",cornerVisible:t},...o,selectionType:i.HIGHLIGHT_FOCUS_TYPE})};var i=o(21280),r=s(o(76337)),n=o(5386)},73193:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.createHighlight=function(e){let{headerClassName:t,...o}=e;return new r.default({className:t,...o,selectionType:i.HIGHLIGHT_HEADER_TYPE})};var i=o(21280),r=s(o(76337))},10450:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.createHighlight=function(e){let{rowClassName:t,...o}=e;return new r.default({className:t,...o,selectionType:i.HIGHLIGHT_ROW_TYPE})};var i=o(21280),r=s(o(76337))},76337:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(21280);class n extends r.Selection{constructor(e,t){super(e,null),(0,i.default)(this,"visualCellRange",null),this.visualCellRange=t||null,this.commit()}add(e){return null===this.visualCellRange?this.visualCellRange=this.settings.createCellRange(e):this.visualCellRange.expand(e),this}clear(){return this.visualCellRange=null,super.clear()}trimToVisibleCellsRangeOnly(e){let{from:t,to:o}=e,s=this.getNearestNotHiddenCoords(t,1),i=this.getNearestNotHiddenCoords(o,-1);return null===s||null===i?null:((s.row>i.row||s.col>i.col)&&(s=t,i=o),this.settings.createCellRange(s,s,i))}getNearestNotHiddenCoords(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;const s=this.getNearestNotHiddenIndex(this.settings.rowIndexMapper,e.row,t);if(null===s)return null;const i=this.getNearestNotHiddenIndex(this.settings.columnIndexMapper,e.col,o);return null===i?null:this.settings.createCellCoords(s,i)}getNearestNotHiddenIndex(e,t,o){return t<0?t:e.getNearestNotHiddenIndex(t,o)}commit(){if(null===this.visualCellRange)return this;const e=this.trimToVisibleCellsRangeOnly(this.visualCellRange);return this.cellRange=null===e?null:this.createRenderableCellRange(e.from,e.to),this}syncWith(e){const t=e.from.clone().normalize(),o="N-S"===e.getVerticalDirection()?1:-1,s="W-E"===e.getHorizontalDirection()?1:-1,i=this.settings.visualToRenderableCoords(this.visualCellRange.highlight);let r=null;if(null!==i&&null!==i.col&&null!==i.row||(r=this.getNearestNotHiddenCoords(t,o,s)),null!==r&&e.overlaps(r)){const t=e.highlight.clone();if(t.row>=0&&(t.row=r.row),t.col>=0&&(t.col=r.col),null===this.cellRange){const e=this.settings.visualToRenderableCoords(t);this.cellRange=this.settings.createCellRange(e)}e.setHighlight(t)}return"focus"===this.settings.selectionType&&null!==i&&null===r&&e.setHighlight(this.visualCellRange.highlight),this}getCorners(){const{from:e,to:t}=this.cellRange;return[Math.min(e.row,t.row),Math.min(e.col,t.col),Math.max(e.row,t.row),Math.max(e.col,t.col)]}getVisualCorners(){const e=this.settings.renderableToVisualCoords(this.cellRange.getTopStartCorner()),t=this.settings.renderableToVisualCoords(this.cellRange.getBottomEndCorner());return[e.row,e.col,t.row,t.col]}createRenderableCellRange(e,t){const o=this.settings.visualToRenderableCoords(e),s=this.settings.visualToRenderableCoords(t);return null===o.row||null===o.col||null===s.row||null===s.col?null:this.settings.createCellRange(o,o,s)}}t.default=n},69167:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i={Selection:!0,handleMouseEvent:!0,detectSelectionType:!0,normalizeSelectionFactory:!0},r=s(o(35750));t.Selection=r.default;var n=o(50743);t.handleMouseEvent=n.handleMouseEvent;var a=o(69248);t.detectSelectionType=a.detectSelectionType,t.normalizeSelectionFactory=a.normalizeSelectionFactory;var l=o(43395);Object.keys(l).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(i,e)||e in t&&t[e]===l[e]||(t[e]=l[e]))}))},50743:(e,t,o)=>{"use strict";t.__esModule=!0,t.handleMouseEvent=function(e,t){let{coords:o,selection:i,controller:r,cellCoordsFactory:a}=t;n.get(e.type)({coords:o,selection:i,controller:r,cellCoordsFactory:a,isShiftKey:e.shiftKey,isLeftClick:(0,s.isLeftClick)(e)||"touchstart"===e.type,isRightClick:(0,s.isRightClick)(e)})},t.mouseDown=i,t.mouseOver=r;var s=o(24449);function i(e){let{isShiftKey:t,isLeftClick:o,isRightClick:s,coords:i,selection:r,controller:n,cellCoordsFactory:a}=e;const l=r.isSelected()?r.getSelectedRange().current():null,h=r.isSelectedByCorner(),u=r.isSelectedByRowHeader();if(t&&l)i.row>=0&&i.col>=0&&!n.cell?r.setRangeEnd(i):(h||u)&&i.row>=0&&i.col>=0&&!n.cell?r.setRangeEnd(a(i.row,i.col)):h&&i.row<0&&!n.column?r.setRangeEnd(a(l.to.row,i.col)):u&&i.col<0&&!n.row?r.setRangeEnd(a(i.row,l.to.col)):(!h&&!u&&i.col<0||h&&i.col<0)&&!n.row?r.selectRows(Math.max(l.from.row,0),i.row,i.col):(!h&&!u&&i.row<0||u&&i.row<0)&&!n.column&&r.selectColumns(Math.max(l.from.col,0),i.col,i.row);else{const e=!r.inInSelection(i),t=o||s&&e;i.row<0&&i.col>=0&&!n.column?t&&r.selectColumns(i.col,i.col,i.row):i.col<0&&i.row>=0&&!n.row?t&&r.selectRows(i.row,i.row,i.col):i.col>=0&&i.row>=0&&!n.cell?t&&r.setRangeStart(i):i.col<0&&i.row<0&&r.selectAll(!0,!0,{disableHeadersHighlight:!0,focusPosition:{row:0,col:0}})}}function r(e){let{isLeftClick:t,coords:o,selection:s,controller:i,cellCoordsFactory:r}=e;if(!t)return;const n=s.isSelectedByRowHeader(),a=s.isSelectedByColumnHeader(),l=s.tableProps.countCols(),h=s.tableProps.countRows();a&&!i.column?s.setRangeEnd(r(h-1,o.col)):n&&!i.row?s.setRangeEnd(r(o.row,l-1)):i.cell||s.setRangeEnd(o)}const n=new Map([["mousedown",i],["mouseover",r],["touchstart",i]])},16570:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231));let r;r=Symbol.iterator;t.default=class{constructor(e){(0,i.default)(this,"ranges",[]),(0,i.default)(this,"createCellRange",void 0),this.createCellRange=e}isEmpty(){return 0===this.size()}set(e){return this.clear(),this.ranges.push(this.createCellRange(e)),this}add(e){return this.ranges.push(this.createCellRange(e)),this}pop(){return this.ranges.pop(),this}current(){return this.peekByIndex(this.size()-1)}previous(){return this.peekByIndex(this.size()-2)}includes(e){return this.ranges.some((t=>t.includes(e)))}clear(){return this.ranges.length=0,this}size(){return this.ranges.length}peekByIndex(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t>=0&&t<this.size()&&(e=this.ranges[t]),e}[r](){return this.ranges[Symbol.iterator]()}}},35750:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=s(o(48427)),n=s(o(42538)),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=C(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(o(43395)),l=s(o(16570)),h=o(22232),u=o(93315),d=o(68145),c=o(50095),g=s(o(65718)),f=s(o(31778)),p=o(69248),m=o(28236),w=o(5386);function C(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(C=function(e){return e?o:t})(e)}function v(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var y=new WeakMap;class E{constructor(e,t){var o=this;(0,i.default)(this,"settings",void 0),(0,i.default)(this,"tableProps",void 0),(0,i.default)(this,"inProgress",!1),(0,i.default)(this,"selectedRange",new l.default(((e,t,o)=>this.tableProps.createCellRange(e,t,o)))),(0,i.default)(this,"highlight",void 0),(0,i.default)(this,"transformation",void 0),(0,i.default)(this,"selectedByRowHeader",new Set),(0,i.default)(this,"selectedByColumnHeader",new Set),v(this,y,{writable:!0,value:!1}),this.settings=e,this.tableProps=t,this.highlight=new a.default({headerClassName:e.currentHeaderClassName,activeHeaderClassName:e.activeHeaderClassName,rowClassName:e.currentRowClassName,columnClassName:e.currentColClassName,cellAttributes:[(0,w.A11Y_SELECTED)()],rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,disabledCellSelection:(e,t)=>this.tableProps.isDisabledCellSelection(e,t),cellCornerVisible:function(){return o.isCellCornerVisible(...arguments)},areaCornerVisible:function(){return o.isAreaCornerVisible(...arguments)},visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),createCellRange:(e,t,o)=>this.tableProps.createCellRange(e,t,o)}),this.transformation=new f.default(this.selectedRange,{rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,countRenderableRows:()=>this.tableProps.countRenderableRows(),countRenderableColumns:()=>this.tableProps.countRenderableColumns(),countRowHeaders:()=>this.tableProps.countRowHeaders(),countColHeaders:()=>this.tableProps.countColHeaders(),visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),navigableHeaders:()=>e.navigableHeaders,fixedRowsBottom:()=>e.fixedRowsBottom,minSpareRows:()=>e.minSpareRows,minSpareCols:()=>e.minSpareCols,autoWrapRow:()=>e.autoWrapRow,autoWrapCol:()=>e.autoWrapCol}),this.transformation.addLocalHook("beforeTransformStart",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("beforeModifyTransformStart",...t)})),this.transformation.addLocalHook("afterTransformStart",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("afterModifyTransformStart",...t)})),this.transformation.addLocalHook("beforeTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("beforeModifyTransformEnd",...t)})),this.transformation.addLocalHook("afterTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("afterModifyTransformEnd",...t)})),this.transformation.addLocalHook("insertRowRequire",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("insertRowRequire",...t)})),this.transformation.addLocalHook("insertColRequire",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("insertColRequire",...t)})),this.transformation.addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("beforeRowWrap",...t)})),this.transformation.addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return o.runLocalHooks("beforeColumnWrap",...t)}))}getSelectedRange(){return this.selectedRange}begin(){this.inProgress=!0}finish(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1}isInProgress(){return this.inProgress}setRangeStart(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e;const i="multiple"===this.settings.selectionMode,r=(0,u.isUndefined)(t)?this.tableProps.getShortcutManager().isCtrlPressed():t,n=e.clone();this.runLocalHooks("beforeSetRangeStart"+(o?"Only":""),n),(!i||i&&!r&&(0,u.isUndefined)(t))&&this.selectedRange.clear(),this.selectedRange.add(n).current().setHighlight(s.clone()),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),o||this.setRangeEnd(e)}setRangeStartOnly(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;this.setRangeStart(e,t,!0,o)}setRangeEnd(e){if(this.selectedRange.isEmpty())return;const t=e.clone(),o=this.tableProps.countRows(),s=this.tableProps.countCols(),i=this.selectedRange.current().clone().setTo(e).isSingleHeader();if((o>0||s>0)&&(0===o&&t.col<0&&!i||0===s&&t.row<0&&!i))return;this.runLocalHooks("beforeSetRangeEnd",t),this.begin();const r=this.selectedRange.current();this.settings.navigableHeaders||r.highlight.normalize(),"single"===this.settings.selectionMode?(r.setFrom(r.highlight),r.setTo(r.highlight)):r.setTo(t),o>0&&s>0&&(!this.settings.navigableHeaders||this.settings.navigableHeaders&&!r.isSingleHeader())&&r.to.normalize(),this.runLocalHooks("beforeHighlightSet");const l=this.highlight.getFocus();l.clear(),this.highlight.isEnabledFor(a.FOCUS_TYPE,r.highlight)&&l.add(this.selectedRange.current().highlight).commit().syncWith(r);const h=this.getLayerLevel();h<this.highlight.layerLevel&&((0,c.arrayEach)(this.highlight.getAreas(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getLayeredAreas(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getRowHeaders(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getColumnHeaders(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getActiveRowHeaders(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getActiveColumnHeaders(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getActiveCornerHeaders(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getRowHighlights(),(e=>{e.clear()})),(0,c.arrayEach)(this.highlight.getColumnHighlights(),(e=>{e.clear()}))),this.highlight.useLayerLevel(h);const u=this.highlight.createArea(),d=this.highlight.createLayeredArea(),g=this.highlight.createRowHeader(),f=this.highlight.createColumnHeader(),p=this.highlight.createActiveRowHeader(),m=this.highlight.createActiveColumnHeader(),w=this.highlight.createActiveCornerHeader(),C=this.highlight.createRowHighlight(),v=this.highlight.createColumnHighlight();if(u.clear(),d.clear(),g.clear(),f.clear(),p.clear(),m.clear(),w.clear(),C.clear(),v.clear(),this.highlight.isEnabledFor(a.AREA_TYPE,r.highlight)&&(this.isMultiple()||h>=1)&&(u.add(r.from).add(r.to).commit(),d.add(r.from).add(r.to).commit(),1===h)){const e=this.selectedRange.previous();this.highlight.useLayerLevel(h-1),this.highlight.createArea().add(e.from).commit().syncWith(e),this.highlight.createLayeredArea().add(e.from).commit().syncWith(e),this.highlight.useLayerLevel(h)}if(this.highlight.isEnabledFor(a.HEADER_TYPE,r.highlight)){if(!r.isSingleHeader()){const e=this.tableProps.createCellCoords(Math.max(r.from.row,0),-1),t=this.tableProps.createCellCoords(r.to.row,-1),o=this.tableProps.createCellCoords(-1,Math.max(r.from.col,0)),s=this.tableProps.createCellCoords(-1,r.to.col);"single"===this.settings.selectionMode?(g.add(e).commit(),f.add(o).commit(),C.add(e).commit(),v.add(o).commit()):(g.add(e).add(t).commit(),f.add(o).add(s).commit(),C.add(e).add(t).commit(),v.add(o).add(s).commit())}const e=!(0,n.default)(this,y)&&this.isEntireRowSelected()&&(s>0&&s===r.getWidth()||0===s&&this.isSelectedByRowHeader()),t=!(0,n.default)(this,y)&&this.isEntireColumnSelected()&&(o>0&&o===r.getHeight()||0===o&&this.isSelectedByColumnHeader());e&&p.add(this.tableProps.createCellCoords(Math.max(r.from.row,0),Math.min(-this.tableProps.countRowHeaders(),-1))).add(this.tableProps.createCellCoords(Math.max(r.to.row,0),-1)).commit(),t&&m.add(this.tableProps.createCellCoords(Math.min(-this.tableProps.countColHeaders(),-1),Math.max(r.from.col,0))).add(this.tableProps.createCellCoords(-1,Math.max(r.to.col,0))).commit(),e&&t&&w.add(this.tableProps.createCellCoords(-this.tableProps.countColHeaders(),-this.tableProps.countRowHeaders())).add(this.tableProps.createCellCoords(-1,-1)).commit()}this.runLocalHooks("afterSetRangeEnd",e)}isMultiple(){const e=(0,h.createObjectPropListener)(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}transformStart(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.setRangeStart(this.transformation.transformStart(e,t,o))}transformEnd(e,t){this.setRangeEnd(this.transformation.transformEnd(e,t))}getLayerLevel(){return this.selectedRange.size()-1}isSelected(){return!this.selectedRange.isEmpty()}isSelectedByRowHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner(e)&&(-1===e?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(e))}isEntireRowSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const t=e=>{const{col:t}=e.getOuterTopStartCorner(),o=this.tableProps.countRowHeaders(),s=this.tableProps.countCols();return(o>0&&t<0||0===o)&&e.getWidth()===s};if(-1===e)return Array.from(this.selectedRange).some((e=>t(e)));const o=this.selectedRange.peekByIndex(e);return!!o&&t(o)}isSelectedByColumnHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner()&&(-1===e?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(e))}isEntireColumnSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const t=e=>{const{row:t}=e.getOuterTopStartCorner(),o=this.tableProps.countColHeaders(),s=this.tableProps.countRows();return(o>0&&t<0||0===o)&&e.getHeight()===s};if(-1===e)return Array.from(this.selectedRange).some((e=>t(e)));const o=this.selectedRange.peekByIndex(e);return!!o&&t(o)}isSelectedByAnyHeader(){return this.isSelectedByRowHeader(-1)||this.isSelectedByColumnHeader(-1)||this.isSelectedByCorner()}isSelectedByCorner(){return this.selectedByColumnHeader.has(this.getLayerLevel())&&this.selectedByRowHeader.has(this.getLayerLevel())}inInSelection(e){return this.selectedRange.includes(e)}isCellCornerVisible(){return this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&!this.isMultiple()}isCellVisible(e){const t=this.tableProps.visualToRenderableCoords(e);return null!==t.row&&null!==t.col}isAreaCornerVisible(e){return(!Number.isInteger(e)||e===this.getLayerLevel())&&(this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&this.isMultiple())}clear(){this.selectedRange.clear(),this.highlight.clear()}deselect(){this.isSelected()&&(this.inProgress=!1,this.clear(),this.runLocalHooks("afterDeselect"))}selectAll(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{focusPosition:!1,disableHeadersHighlight:!1};const i=this.tableProps.countRows(),n=this.tableProps.countCols(),a=this.tableProps.countRowHeaders(),l=this.tableProps.countColHeaders(),h=o?-l:0,u=t?-a:0;if(0===h&&0===u&&(0===i||0===n))return;let c=null===(e=this.getSelectedRange().current())||void 0===e?void 0:e.highlight;const{focusPosition:g,disableHeadersHighlight:f}=s;(0,r.default)(this,y,f),g&&Number.isInteger(null==g?void 0:g.row)&&Number.isInteger(null==g?void 0:g.col)&&(c=this.tableProps.createCellCoords((0,d.clamp)(g.row,h,i-1),(0,d.clamp)(g.col,u,n-1)));const p=this.tableProps.createCellCoords(h,u),m=this.tableProps.createCellCoords(i-1,n-1);this.clear(),this.setRangeStartOnly(p,void 0,c),u<0&&this.selectedByRowHeader.add(this.getLayerLevel()),h<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(m),this.finish(),(0,r.default)(this,y,!1)}selectCells(e){var t=this;const o=(0,p.detectSelectionType)(e);if(o===p.SELECTION_TYPE_EMPTY)return!1;if(o===p.SELECTION_TYPE_UNRECOGNIZED)throw new Error(m.toSingleLine`Unsupported format of the selection ranges was passed. To select cells pass\x20
85
88
  the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,\x20
86
89
  columnEnd/columnPropEnd]]) or as an array of CellRange objects.`);const s=(0,p.normalizeSelectionFactory)(o,{createCellCoords:function(){return t.tableProps.createCellCoords(...arguments)},createCellRange:function(){return t.tableProps.createCellRange(...arguments)},propToCol:e=>this.tableProps.propToCol(e),keepDirection:!0}),i=this.settings.navigableHeaders,r={countRows:this.tableProps.countRows(),countCols:this.tableProps.countCols(),countRowHeaders:i?this.tableProps.countRowHeaders():0,countColHeaders:i?this.tableProps.countColHeaders():0},n=!e.some((e=>{const t=s(e),o=t.isValid(r);return!(o&&!t.containsHeaders()||o&&t.containsHeaders()&&t.isSingleHeader())}));return n&&(this.clear(),(0,c.arrayEach)(e,(e=>{const{from:t,to:o}=s(e);this.setRangeStartOnly(t.clone(),!1),this.setRangeEnd(o.clone()),this.finish()}))),n}selectColumns(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s="string"==typeof e?this.tableProps.propToCol(e):e,i="string"==typeof t?this.tableProps.propToCol(t):t,r=this.tableProps.countRows(),n=this.tableProps.countCols(),a=this.tableProps.countColHeaders(),l=0===a?0:-a,h=this.tableProps.createCellCoords(l,s),u=this.tableProps.createCellCoords(r-1,i),c=this.tableProps.createCellRange(h,h,u).isValid({countRows:r,countCols:n,countRowHeaders:0,countColHeaders:a});if(c){const e=0===a?0:(0,d.clamp)(o,l,-1),t=r-1,n=this.tableProps.createCellCoords(e,s),h=this.tableProps.createCellCoords(t,i),u=this.tableProps.createCellCoords((0,d.clamp)(o,l,r-1),s);this.runLocalHooks("beforeSelectColumns",n,h,u),n.row=e,h.row=t,this.setRangeStartOnly(n,void 0,u),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(h),this.runLocalHooks("afterSelectColumns",n,h,u),this.finish()}return c}selectRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const s=this.tableProps.countRows(),i=this.tableProps.countCols(),r=this.tableProps.countRowHeaders(),n=0===r?0:-r,a=this.tableProps.createCellCoords(e,n),l=this.tableProps.createCellCoords(t,i-1),h=this.tableProps.createCellRange(a,a,l).isValid({countRows:s,countCols:i,countRowHeaders:r,countColHeaders:0});if(h){const s=0===r?0:(0,d.clamp)(o,n,-1),a=i-1,l=this.tableProps.createCellCoords(e,s),h=this.tableProps.createCellCoords(t,a),u=this.tableProps.createCellCoords(e,(0,d.clamp)(o,n,i-1));this.runLocalHooks("beforeSelectRows",l,h,u),l.col=s,h.col=a,this.setRangeStartOnly(l,void 0,u),this.selectedByRowHeader.add(this.getLayerLevel()),this.setRangeEnd(h),this.runLocalHooks("afterSelectRows",l,h,u),this.finish()}return h}refresh(){if(this.highlight.getCustomSelections().forEach((e=>{e.commit()})),!this.isSelected())return;const e=this.highlight.getFocus(),t=this.getLayerLevel();e.commit().syncWith(this.selectedRange.current());for(let e=0;e<this.selectedRange.size();e+=1){this.highlight.useLayerLevel(e);const t=this.highlight.createArea(),o=this.highlight.createLayeredArea(),s=this.highlight.createRowHeader(),i=this.highlight.createColumnHeader(),r=this.highlight.createActiveRowHeader(),n=this.highlight.createActiveColumnHeader(),a=this.highlight.createActiveCornerHeader(),l=this.highlight.createRowHighlight(),h=this.highlight.createColumnHighlight();t.commit(),o.commit(),s.commit(),i.commit(),r.commit(),n.commit(),a.commit(),l.commit(),h.commit()}this.highlight.useLayerLevel(t)}}(0,h.mixin)(E,g.default);t.default=E},31778:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(42538)),r=s(o(48427)),n=o(22232),a=s(o(65718));function l(e,t){u(e,t),t.add(e)}function h(e,t,o){u(e,t),t.set(e,o)}function u(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function d(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var c=new WeakMap,g=new WeakMap,f=new WeakMap,p=new WeakSet,m=new WeakSet,w=new WeakSet,C=new WeakSet,v=new WeakSet;class y{constructor(e,t){l(this,v),l(this,C),l(this,w),l(this,m),l(this,p),h(this,c,{writable:!0,value:void 0}),h(this,g,{writable:!0,value:void 0}),h(this,f,{writable:!0,value:{x:0,y:0}}),(0,r.default)(this,c,e),(0,r.default)(this,g,t)}transformStart(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];d(this,p,E).call(this,{x:(0,i.default)(this,g).navigableHeaders()?(0,i.default)(this,g).countRowHeaders():0,y:(0,i.default)(this,g).navigableHeaders()?(0,i.default)(this,g).countColHeaders():0});const s=(0,i.default)(this,g).createCellCoords(e,t);let r=(0,i.default)(this,c).current().highlight;const a=(0,i.default)(this,g).visualToRenderableCoords(r);let l=0,h=0;if(this.runLocalHooks("beforeTransformStart",s),null!==a.row&&null!==a.col){const{width:e,height:t}=d(this,w,R).call(this),{row:a,col:u}=d(this,C,b).call(this,r),c=(0,i.default)(this,g).fixedRowsBottom(),f=(0,i.default)(this,g).minSpareRows(),p=(0,i.default)(this,g).minSpareCols(),y=(0,i.default)(this,g).autoWrapRow(),E=(0,i.default)(this,g).autoWrapCol(),T=(0,i.default)(this,g).createCellCoords(a+s.row,u+s.col);if(T.row>=t){const s=(0,n.createObjectPropListener)(o&&f>0&&0===c),r=T.col+1,a=(0,i.default)(this,g).createCellCoords(T.row-t,r>=e?r-e:r);this.runLocalHooks("beforeColumnWrap",s,d(this,v,_).call(this,a),r>=e),s.value?this.runLocalHooks("insertRowRequire",(0,i.default)(this,g).countRenderableRows()):E&&T.assign(a)}else if(T.row<0){const o=(0,n.createObjectPropListener)(E),s=T.col-1,r=(0,i.default)(this,g).createCellCoords(t+T.row,s<0?e+s:s);this.runLocalHooks("beforeColumnWrap",o,d(this,v,_).call(this,r),s<0),E&&T.assign(r)}if(T.col>=e){const s=(0,n.createObjectPropListener)(o&&p>0),r=T.row+1,a=(0,i.default)(this,g).createCellCoords(r>=t?r-t:r,T.col-e);this.runLocalHooks("beforeRowWrap",s,d(this,v,_).call(this,a),r>=t),s.value?this.runLocalHooks("insertColRequire",(0,i.default)(this,g).countRenderableColumns()):y&&T.assign(a)}else if(T.col<0){const o=(0,n.createObjectPropListener)(y),s=T.row-1,r=(0,i.default)(this,g).createCellCoords(s<0?t+s:s,e+T.col);this.runLocalHooks("beforeRowWrap",o,d(this,v,_).call(this,r),s<0),y&&T.assign(r)}const{rowDir:O,colDir:M}=d(this,m,S).call(this,T);l=O,h=M,r=d(this,v,_).call(this,T)}return this.runLocalHooks("afterTransformStart",r,l,h),r}transformEnd(e,t){d(this,p,E).call(this,{x:(0,i.default)(this,g).navigableHeaders()?(0,i.default)(this,g).countRowHeaders():0,y:(0,i.default)(this,g).navigableHeaders()?(0,i.default)(this,g).countColHeaders():0});const o=(0,i.default)(this,g).createCellCoords(e,t),s=(0,i.default)(this,c).current(),r=(0,i.default)(this,g).visualToRenderableCoords(s.highlight),n=s.to.clone();let a=0,l=0;if(this.runLocalHooks("beforeTransformEnd",o),null!==r.row&&null!==r.col){const{row:e,col:t}=d(this,C,b).call(this,s.to),r=(0,i.default)(this,g).createCellCoords(e+o.row,t+o.col),{rowDir:h,colDir:u}=d(this,m,S).call(this,r);a=h,l=u;const c=d(this,v,_).call(this,r);0===o.row&&0!==o.col?n.col=c.col:0!==o.row&&0===o.col?n.row=c.row:(n.row=c.row,n.col=c.col)}return this.runLocalHooks("afterTransformEnd",n,a,l),n}}function E(e){let{x:t,y:o}=e;(0,r.default)(this,f,{x:t,y:o})}function S(e){const{width:t,height:o}=d(this,w,R).call(this);let s=0,i=0;return e.row<0?(s=-1,e.row=0):e.row>0&&e.row>=o&&(s=1,e.row=o-1),e.col<0?(i=-1,e.col=0):e.col>0&&e.col>=t&&(i=1,e.col=t-1),{rowDir:s,colDir:i}}function R(){return{width:(0,i.default)(this,f).x+(0,i.default)(this,g).countRenderableColumns(),height:(0,i.default)(this,f).y+(0,i.default)(this,g).countRenderableRows()}}function b(e){const{row:t,col:o}=(0,i.default)(this,g).visualToRenderableCoords(e);return(0,i.default)(this,g).createCellCoords((0,i.default)(this,f).y+t,(0,i.default)(this,f).x+o)}function _(e){const t=e.clone();return t.col=e.col-(0,i.default)(this,f).x,t.row=e.row-(0,i.default)(this,f).y,(0,i.default)(this,g).renderableToVisualCoords(t)}(0,n.mixin)(y,a.default);t.default=y},69248:(e,t,o)=>{"use strict";t.__esModule=!0,t.detectSelectionType=f,t.normalizeSelectionFactory=p,t.transformSelectionToColumnDistance=function(e){const t=f(e.getSelected());if(t===n||t===a)return[];const o=p(t,{createCellCoords:e._createCellCoords.bind(e),createCellRange:e._createCellRange.bind(e)}),s=new Set;(0,i.arrayEach)(e.getSelected(),(e=>{const{from:t,to:r}=o(e),n=Math.max(t.col,0),a=r.col-n+1;(0,i.arrayEach)(Array.from(new Array(a),((e,t)=>n+t)),(e=>{s.has(e)||s.add(e)}))}));const r=Array.from(s).sort(((e,t)=>e-t));return(0,i.arrayReduce)(r,((e,t,o,s)=>(0!==o&&t===s[o-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e)),[])},t.transformSelectionToRowDistance=function(e){const t=f(e.getSelected());if(t===n||t===a)return[];const o=p(t,{createCellCoords:e._createCellCoords.bind(e),createCellRange:e._createCellRange.bind(e)}),s=new Set;(0,i.arrayEach)(e.getSelected(),(e=>{const{from:t,to:r}=o(e),n=Math.max(t.row,0),a=r.row-n+1;(0,i.arrayEach)(Array.from(new Array(a),((e,t)=>n+t)),(e=>{s.has(e)||s.add(e)}))}));const r=Array.from(s).sort(((e,t)=>e-t));return(0,i.arrayReduce)(r,((e,t,o,s)=>(0!==o&&t===s[o-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e)),[])},o(91683),o(63517);var s=o(21280),i=o(50095),r=o(93315);const n=t.SELECTION_TYPE_UNRECOGNIZED=0,a=t.SELECTION_TYPE_EMPTY=1,l=t.SELECTION_TYPE_ARRAY=2,h=t.SELECTION_TYPE_OBJECT=3,u=t.SELECTION_TYPES=[h,l],d=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],c=Symbol("root"),g=Symbol("child");function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c;if(t!==c&&t!==g)throw new Error("The second argument is used internally only and cannot be overwritten.");const o=Array.isArray(e),i=t===c;let r=n;if(o){const t=e[0];if(0===e.length)r=a;else if(i&&t instanceof s.CellRange)r=h;else if(i&&Array.isArray(t))r=f(t,g);else if(e.length>=2&&e.length<=4){!e.some(((e,t)=>!d[t].includes(typeof e)))&&(r=l)}}return r}function p(e){let{createCellCoords:t,createCellRange:o,keepDirection:s=!1,propToCol:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!u.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(n){const a=e===h;let l=a?n.from.row:n[0],u=a?n.from.col:n[1],d=a?n.to.row:n[2],c=a?n.to.col:n[3];if("function"==typeof i&&("string"==typeof u&&(u=i(u)),"string"==typeof c&&(c=i(c))),(0,r.isUndefined)(d)&&(d=l),(0,r.isUndefined)(c)&&(c=u),!s){const e=l,t=u,o=d,s=c;l=Math.min(e,o),u=Math.min(t,s),d=Math.max(e,o),c=Math.max(t,s)}const g=t(l,u),f=t(d,c);return o(g,g,f)}}},61321:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"editorCloseAndSave",callback(e,t,o){const s=e._getEditorManager();s.closeEditorAndSaveChanges(t.ctrlKey||t.metaKey),s.moveSelectionAfterEnter(o.includes("shift"))}}},67826:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"editorCloseWithoutSaving",callback(e){const t=e._getEditorManager();t.closeEditorAndRestoreOriginalValue(e.getShortcutManager().isCtrlPressed()),t.activeEditor.focus()}}},15092:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"editorFastOpen",callback(e,t){const{highlight:o}=e.getSelectedRangeLast();o.isHeader()||e._getEditorManager().openEditor(null,t,!0)}}},77511:(e,t,o)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[s.command,i.command,r.command,n.command]};var s=o(61321),i=o(67826),r=o(15092),n=o(75543)},75543:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(24449);t.command={name:"editorOpen",callback(e,t,o){const i=e._getEditorManager(),{highlight:r}=e.getSelectedRangeLast();r.isHeader()||(e.getSettings().enterBeginsEditing?i.cellProperties.readOnly?i.moveSelectionAfterEnter():i.openEditor(null,t,!0):i.moveSelectionAfterEnter(o.includes("shift")),(0,s.stopImmediatePropagation)(t))}}},15376:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e._getEditorManager().prepareEditor()}}},72410:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionDown",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())&&e.selection.transformEnd(1,0)}}},65189:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionDownByViewportHeight",callback(e){const{to:t}=e.getSelectedRangeLast(),o=Math.min(t.row+e.countVisibleRows(),e.countRows()-1),s=e.rowIndexMapper.getNearestNotHiddenIndex(o,-1);if(null!==s){const o=e._createCellCoords(s,t.col),i=t.row-e.view.getFirstFullyVisibleRow(),r=Math.min(o.row-i,e.countRows()-1);e.selection.setRangeEnd(o),e.scrollViewportTo({row:r,verticalSnap:"top",horizontalSnap:"start"})}}}},19061:(e,t,o)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[s.command,i.command,r.command,n.command,a.command,l.command,h.command,u.command,d.command,c.command,g.command,f.command,p.command,m.command]};var s=o(72410),i=o(65189),r=o(38495),n=o(17099),a=o(29147),l=o(51730),h=o(98267),u=o(90949),d=o(13901),c=o(3585),g=o(35376),f=o(17852),p=o(30405),m=o(73317)},38495:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionLeft",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())&&e.selection.transformEnd(0,-1*e.getDirectionFactor())}}},17099:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionRight",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())&&e.selection.transformEnd(0,e.getDirectionFactor())}}},29147:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToColumns",callback(e){const{highlight:t,from:o,to:s}=e.getSelectedRangeLast();e.selection.isSelectedByRowHeader()?e.selection.selectAll(!0,!0):e.selectColumns(o.col,s.col,t.row)}}},51730:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToMostBottom",callback(e){const{selection:t,rowIndexMapper:o}=e,{highlight:s,from:i,to:r}=e.getSelectedRangeLast(),n=s.isHeader()&&e.selection.isSelectedByRowHeader();if(s.isCell()||n){const s=o.getNearestNotHiddenIndex(e.countRows()-1,-1);t.setRangeStart(i.clone()),n&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s,r.col))}}}},98267:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:o}=e,{highlight:s}=e.getSelectedRangeLast();s.isCell()&&t.setRangeEnd(e._createCellCoords(t.selectedRange.current().from.row,o.getNearestNotHiddenIndex(e.countCols()-1,-1)))}}},90949:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:o}=e,{highlight:s}=e.getSelectedRangeLast();s.isCell()&&t.setRangeEnd(e._createCellCoords(t.selectedRange.current().from.row,o.getNearestNotHiddenIndex(0,1)))}}},13901:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:o}=e,{highlight:s,from:i,to:r}=e.getSelectedRangeLast(),n=s.isHeader()&&e.selection.isSelectedByColumnHeader();if(s.isCell()||n){const s=o.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]);t.setRangeStart(i.clone()),n&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(r.row,s))}}}},3585:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:o}=e,{highlight:s,from:i,to:r}=e.getSelectedRangeLast(),n=s.isHeader()&&e.selection.isSelectedByColumnHeader();if(s.isCell()||n){const s=o.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]);t.setRangeStart(i.clone()),n&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(r.row,s))}}}},35376:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToMostTop",callback(e){const{selection:t,rowIndexMapper:o}=e,{highlight:s,from:i,to:r}=e.getSelectedRangeLast(),n=s.isHeader()&&e.selection.isSelectedByRowHeader();if(s.isCell()||n){const s=o.getNearestNotHiddenIndex(0,1);t.setRangeStart(i.clone()),n&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s,r.col))}}}},17852:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionToRows",callback(e){const{highlight:t,from:o,to:s}=e.getSelectedRangeLast();e.selection.isSelectedByColumnHeader()?e.selection.selectAll(!0,!0):e.selectRows(o.row,s.row,t.col)}}},30405:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionUp",callback(e){const{highlight:t}=e.getSelectedRangeLast();(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())&&e.selection.transformEnd(-1,0)}}},73317:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"extendCellsSelectionUpByViewportHeight",callback(e){const{to:t}=e.getSelectedRangeLast(),o=Math.max(t.row-e.countVisibleRows(),0),s=e.rowIndexMapper.getNearestNotHiddenIndex(o,1);if(null!==s){const o=e._createCellCoords(s,t.col),i=t.row-e.view.getFirstFullyVisibleRow(),r=Math.max(o.row-i,0);e.selection.setRangeEnd(o),e.scrollViewportTo({row:r,verticalSnap:"top",horizontalSnap:"start"})}}}},69619:(e,t,o)=>{"use strict";t.__esModule=!0,t.createKeyboardShortcutCommandsPool=function(e){const t={};return d.forEach((o=>{let{name:s,callback:i}=o;t[s]=function(){for(var t=arguments.length,o=new Array(t),s=0;s<t;s++)o[s]=arguments[s];return i(e,...o)}})),t};var s=o(77511),i=o(19061),r=o(36653),n=o(15376),a=o(25730),l=o(45427),h=o(26695),u=o(19708);const d=[...(0,s.getAllCommands)(),...(0,i.getAllCommands)(),...(0,r.getAllCommands)(),n.command,a.command,l.command,h.command,u.command]},59749:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionDown",callback(e){let{selection:t}=e;t.transformStart(1,0)}}},87096:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionDownByViewportHeight",callback(e){const{navigableHeaders:t}=e.getSettings(),o=t?e.countColHeaders():0,{row:s}=e.getSelectedRangeLast().highlight;let i=e.countVisibleRows()+o;s===e.countRows()-1?i=1:s+i>e.countRows()&&(i=e.countRows()-s-1),e.selection.transformStart(i,0),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo({row:0})}}},36653:(e,t,o)=>{"use strict";t.__esModule=!0,t.getAllCommands=function(){return[s.command,i.command,r.command,n.command,a.command,l.command,h.command,u.command,d.command,c.command,g.command,f.command,p.command,m.command,w.command,C.command]};var s=o(59749),i=o(87096),r=o(82175),n=o(14581),a=o(96616),l=o(35888),h=o(1449),u=o(64129),d=o(36586),c=o(158),g=o(89115),f=o(75025),p=o(20333),m=o(94793),w=o(87854),C=o(52771)},82175:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionInlineEnd",callback(e,t){const o=e.getSettings(),s="function"==typeof o.tabMoves?o.tabMoves(t):o.tabMoves;e.selection.transformStart(-s.row,-s.col)}}},14581:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionInlineStart",callback(e,t){const o=e.getSettings(),s="function"==typeof o.tabMoves?o.tabMoves(t):o.tabMoves;e.selection.transformStart(s.row,s.col)}}},96616:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionLeft",callback(e){e.selection.transformStart(0,-1*e.getDirectionFactor())}}},35888:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionRight",callback(e){e.selection.transformStart(0,e.getDirectionFactor())}}},1449:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostBottom",callback(e){const{col:t}=e.getSelectedRangeLast().highlight;let o=e.rowIndexMapper.getNearestNotHiddenIndex(e.countRows()-1,-1);null===o&&(o=-1),e.selection.setRangeStart(e._createCellCoords(o,t))}}},64129:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostBottomInlineEnd",callback(e){const{selection:t,rowIndexMapper:o,columnIndexMapper:s}=e,i=parseInt(e.getSettings().fixedRowsBottom,10),r=o.getNearestNotHiddenIndex(e.countRows()-i-1,-1),n=s.getNearestNotHiddenIndex(e.countCols()-1,-1);t.setRangeStart(e._createCellCoords(r,n))}}},36586:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:o}=e;t.setRangeStart(e._createCellCoords(e.getSelectedRangeLast().highlight.row,o.getNearestNotHiddenIndex(e.countCols()-1,-1)))}}},158:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:o}=e,s=parseInt(e.getSettings().fixedColumnsStart,10),i=e.getSelectedRangeLast().highlight.row,r=o.getNearestNotHiddenIndex(s,1);t.setRangeStart(e._createCellCoords(i,r))}}},89115:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:o}=e,s=e.getSelectedRangeLast().highlight.row;let i=o.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]);null===i&&(i=e.isRtl()?-1:-e.countRowHeaders()),t.setRangeStart(e._createCellCoords(s,i))}}},75025:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:o}=e,{row:s}=e.getSelectedRangeLast().highlight;let i=o.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]);null===i&&(i=e.isRtl()?-e.countRowHeaders():-1),t.setRangeStart(e._createCellCoords(s,i))}}},20333:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostTop",callback(e){const{col:t}=e.getSelectedRangeLast().highlight;let o=e.rowIndexMapper.getNearestNotHiddenIndex(0,1);null===o&&(o=-e.countColHeaders()),e.selection.setRangeStart(e._createCellCoords(o,t))}}},94793:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionToMostTopInlineStart",callback(e){const{selection:t,rowIndexMapper:o,columnIndexMapper:s}=e,i=parseInt(e.getSettings().fixedRowsTop,10),r=parseInt(e.getSettings().fixedColumnsStart,10),n=o.getNearestNotHiddenIndex(i,1),a=s.getNearestNotHiddenIndex(r,1);t.setRangeStart(e._createCellCoords(n,a))}}},87854:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionUp",callback(e){let{selection:t}=e;t.transformStart(-1,0)}}},52771:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"moveCellSelectionUpByViewportHight",callback(e){const{navigableHeaders:t}=e.getSettings(),o=t?e.countColHeaders():0,{row:s}=e.getSelectedRangeLast().highlight;let i=-(e.countVisibleRows()+o);s===-o?i=-1:s+i<o&&(i=-(s+o)),e.selection.transformStart(i,0),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo({row:0})}}},19708:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"populateSelectedCellsData",callback(e){const t=e.getSelectedRange(),{row:o,col:s}=t[t.length-1].highlight.normalize(),i=e.getDataAtCell(o,s),r=new Map;for(let n=0;n<t.length;n++)t[n].forAll(((t,n)=>{if(t>=0&&n>=0&&(t!==o||n!==s)){const{readOnly:o}=e.getCellMeta(t,n);o||r.set(`${t}x${n}`,[t,n,i])}}));e.setDataAtCell(Array.from(r.values()))}}},25730:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"scrollToFocusedCell",callback(e){const{highlight:t}=e.getSelectedRangeLast(),o=e.view.getFirstFullyVisibleRow()-1,s=e.view.getFirstFullyVisibleColumn()-1,i=e.view.getLastFullyVisibleRow()+1,r=e.view.getLastFullyVisibleColumn()+1,n=e._createCellCoords(o,s),a=e._createCellCoords(i,r);if(!e._createCellRange(n,n,a).includes(t)&&(t.row>=0||t.col>=0)){const o={};if(t.col>=0){const s=Math.floor(e.countVisibleCols()/2);o.col=Math.max(t.col-s,0)}if(t.row>=0){const s=Math.floor(e.countVisibleRows()/2);o.row=Math.max(t.row-s,0)}e.scrollViewportTo({...o,verticalSnap:"top",horizontalSnap:"start"})}}}},45427:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"selectAllCells",callback(e){e.selection.selectAll(!0,!0,{disableHeadersHighlight:!0})}}},26695:(e,t)=>{"use strict";t.__esModule=!0;t.command={name:"selectAllCellsAndHeaders",callback(e){e.selection.selectAll(!0,!0,{disableHeadersHighlight:!1})}}},87592:(e,t)=>{"use strict";t.__esModule=!0;t.GRID_GROUP="gridDefault",t.EDITOR_EDIT_GROUP="editorManager.handlingEditor"},90508:(e,t,o)=>{"use strict";t.__esModule=!0,t.shortcutsEditorContext=function(e){const t=e.getShortcutManager().addContext("editor"),o=(0,i.createKeyboardShortcutCommandsPool)(e),r={group:s.EDITOR_EDIT_GROUP};t.addShortcuts([{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>o.editorCloseAndSave(e,t)},{keys:[["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],captureCtrl:!0,callback:(e,t)=>o.editorCloseAndSave(e,t)},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>o.editorCloseWithoutSaving()}],r)};var s=o(87592),i=o(69619)},15022:(e,t,o)=>{"use strict";t.__esModule=!0,t.shortcutsGridContext=function(e){const t=e.getShortcutManager().addContext("grid"),o=(0,r.createKeyboardShortcutCommandsPool)(e),n={runOnlyIf:()=>{const{navigableHeaders:t}=e.getSettings();return(0,s.isDefined)(e.getSelected())&&(t||!t&&e.countRenderedRows()>0&&e.countRenderedCols()>0)},group:i.GRID_GROUP};t.addShortcuts([{keys:[["F2"]],callback:e=>o.editorFastOpen(e)},{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>o.editorOpen(e,t)},{keys:[["Backspace"],["Delete"]],callback:()=>o.emptySelectedCells()}],{group:i.EDITOR_EDIT_GROUP,runOnlyIf:()=>(0,s.isDefined)(e.getSelected())}),t.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>o.selectAllCells()},{keys:[["Control/Meta","Shift","Space"]],callback:()=>o.selectAllCellsAndHeaders()},{keys:[["Control/Meta","Enter"]],callback:()=>o.populateSelectedCellsData(),runOnlyIf:()=>!e.getSelectedRangeLast().highlight.isHeader()&&e.getSelectedRangeLast().getCellsCount()>1},{keys:[["Control","Space"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToColumns()},{keys:[["Shift","Space"]],stopPropagation:!0,callback:()=>o.extendCellsSelectionToRows()},{keys:[["ArrowUp"]],callback:()=>o.moveCellSelectionUp()},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostTop()},{keys:[["ArrowUp","Shift"]],callback:()=>o.extendCellsSelectionUp()},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostTop(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>o.moveCellSelectionDown()},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostBottom()},{keys:[["ArrowDown","Shift"]],callback:()=>o.extendCellsSelectionDown()},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostBottom(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>o.moveCellSelectionLeft()},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostLeft()},{keys:[["ArrowLeft","Shift"]],callback:()=>o.extendCellsSelectionLeft()},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostLeft(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>o.moveCellSelectionRight()},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostRight()},{keys:[["ArrowRight","Shift"]],callback:()=>o.extendCellsSelectionRight()},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>o.extendCellsSelectionToMostRight(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>o.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>o.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>o.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>o.moveCellSelectionUpByViewportHight()},{keys:[["PageUp","Shift"]],callback:()=>o.extendCellsSelectionUpByViewportHeight()},{keys:[["PageDown"]],callback:()=>o.moveCellSelectionDownByViewportHeight()},{keys:[["PageDown","Shift"]],callback:()=>o.extendCellsSelectionDownByViewportHeight()},{keys:[["Tab"]],preventDefault:!1,callback:()=>o.moveCellSelectionInlineStart()},{keys:[["Shift","Tab"]],preventDefault:!1,callback:()=>o.moveCellSelectionInlineEnd()},{keys:[["Control/Meta","Backspace"]],callback:()=>o.scrollToFocusedCell()}],n)};var s=o(93315),i=o(87592),r=o(69619)},29282:(e,t,o)=>{"use strict";t.__esModule=!0;var s={registerAllShortcutContexts:!0};t.registerAllShortcutContexts=function(e){[i.shortcutsEditorContext,r.shortcutsGridContext].forEach((t=>t(e)))};var i=o(90508),r=o(15022),n=o(87592);Object.keys(n).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===n[e]||(t[e]=n[e]))}))},29275:(e,t,o)=>{"use strict";t.__esModule=!0,t.isContextObject=u,o(91683),o(63517);var s=o(42386),i=o(32464),r=o(93315),n=o(85015),a=o(22232),l=o(28236);const h=Symbol("shortcut-context");function u(e){return(0,a.isObject)(e)&&e.__kindOf===h}t.createContext=e=>{const t=(0,s.createUniqueMap)({errorIdExists:t=>`The "${t}" shortcut is already registered in the "${e}" context.`}),o=function(){let{keys:e,callback:o,group:s,runOnlyIf:a=(()=>!0),captureCtrl:h=!1,preventDefault:d=!0,stopPropagation:c=!1,relativeToGroup:g,position:f,forwardToContext:p}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,r.isUndefined)(s))throw new Error("You need to define the shortcut's group.");if(!1===(0,n.isFunction)(o))throw new Error("The shortcut's callback needs to be a function.");if(!1===Array.isArray(e))throw new Error(l.toSingleLine`Pass the shortcut\'s keys as an array of arrays,\x20
87
90
  using the KeyboardEvent.key properties:\x20
88
91
  https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`);const m={callback:o,group:s,runOnlyIf:a,captureCtrl:h,preventDefault:d,stopPropagation:c};(0,r.isDefined)(g)&&([m.relativeToGroup,m.position]=[g,f]),u(p)&&(m.forwardToContext=p),e.forEach((e=>{const o=(0,i.normalizeKeys)(e);if(t.hasItem(o)){const e=t.getItem(o);let s=e.findIndex((e=>e.group===g));-1!==s?"before"===f?s-=1:s+=1:s=e.length,e.splice(s,0,m)}else t.addItem(o,[m])}))},d=e=>{const o=(0,i.normalizeKeys)(e);t.removeItem(o)};return{__kindOf:h,addShortcut:o,addShortcuts:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach((e=>{(0,a.objectEach)(t,((o,s)=>{!1===Object.prototype.hasOwnProperty.call(e,s)&&(e[s]=t[s])})),o(e)}))},getShortcuts:e=>{const o=(0,i.normalizeKeys)(e),s=t.getItem(o);return(0,r.isDefined)(s)?s.slice():[]},hasShortcut:e=>{const o=(0,i.normalizeKeys)(e);return t.hasItem(o)},removeShortcutsByKeys:d,removeShortcutsByGroup:e=>{t.getItems().forEach((t=>{let[o,s]=t;const r=s.filter((t=>t.group!==e));0===r.length?d((0,i.getKeysList)(o)):(s.length=0,s.push(...r))}))}}}},47152:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(36671);t.createShortcutManager=s.createShortcutManager},18071:(e,t)=>{"use strict";t.__esModule=!0,t.createKeysObserver=function(){const e=new Set;return{press(t){e.add(t)},release(t){e.delete(t)},releaseAll(){e.clear()},isPressed:t=>e.has(t)}}},36671:(e,t,o)=>{"use strict";t.__esModule=!0,o(91683);var s=o(42386),i=o(24449),r=o(29275),n=o(67152),a=o(28236);t.createShortcutManager=e=>{let{ownerWindow:t,handleEvent:o,beforeKeyDown:l,afterKeyDown:h}=e;const u=(0,s.createUniqueMap)({errorIdExists:e=>`The "${e}" context name is already registered.`});let d="grid";const c=()=>d,g=e=>u.getItem(e);let f=!1;const p=function(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c();const s=(0,r.isContextObject)(o)?o:g(o);let n=!1;if(!s.hasShortcut(t))return n;const a=s.getShortcuts(t);for(let o=0;o<a.length;o++){const{callback:s,runOnlyIf:r,preventDefault:l,stopPropagation:h,captureCtrl:u,forwardToContext:d}=a[o];if(!0===r(e)){if(f=u,n=!1===s(e,t),f=!1,l&&e.preventDefault(),h&&((0,i.stopImmediatePropagation)(e),e.stopPropagation()),n)break;d&&p(e,t,d)}}return n},m=(0,n.useRecorder)(t,o,l,h,p);return m.mount(),{addContext:e=>{const t=(0,r.createContext)(e);return u.addItem(e,t),t},getActiveContextName:c,getContext:g,setActiveContextName:e=>{if(!u.hasItem(e))throw new Error(a.toSingleLine`You've tried to activate the "${e}" shortcut context\x20
89
- that does not exist. Before activation, register the context using the "addContext" method.`);d=e},isCtrlPressed:()=>!f&&(m.isPressed("control")||m.isPressed("meta")),releasePressedKeys:()=>m.releasePressedKeys(),destroy:()=>m.unmount()}}},67152:(e,t,o)=>{"use strict";t.__esModule=!0,t.useRecorder=function(e,t,o,s,d){const c=e=>l.includes(e),g=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=[];return e.altKey&&o.push("alt"),t&&(e.ctrlKey||e.metaKey)?o.push("control/meta"):(e.ctrlKey&&o.push("control"),e.metaKey&&o.push("meta")),e.shiftKey&&o.push("shift"),o},f=e=>{if(!1===t(e))return;const n=o(e);if(229===e.keyCode||!1===n||(0,r.isImmediatePropagationStopped)(e))return;const l=(0,i.normalizeEventKey)(e);let h=[];c(l)||(h=g(e));const u=[l].concat(h);!d(e,u)&&((0,a.isMacOS)()&&h.includes("meta")||!(0,a.isMacOS)()&&h.includes("control"))&&d(e,[l].concat(g(e,!0))),s(e)},p=e=>{const t=(0,i.normalizeEventKey)(e);c(t)&&h.press(t)},m=e=>{const t=(0,i.normalizeEventKey)(e);c(t)&&h.release(t)},w=()=>{h.releaseAll()};return{mount:()=>{let t=e;for(u+=1;t;)1===u&&(t.document.documentElement.addEventListener("keydown",p),t.document.documentElement.addEventListener("keyup",m)),t.document.documentElement.addEventListener("keydown",f),t.document.documentElement.addEventListener("blur",w),t=(0,n.getParentWindow)(t)},unmount:()=>{let t=e;for(u-=1;t;)0===u&&(t.document.documentElement.removeEventListener("keydown",p),t.document.documentElement.removeEventListener("keyup",m)),t.document.documentElement.removeEventListener("keydown",f),t.document.documentElement.removeEventListener("blur",w),t=(0,n.getParentWindow)(t)},isPressed:e=>h.isPressed(e),releasePressedKeys:()=>h.releaseAll()}},o(63517);var s=o(18071),i=o(32464),r=o(24449),n=o(83302),a=o(37595);const l=["meta","alt","shift","control"],h=(0,s.createKeysObserver)();let u=0},32464:(e,t)=>{"use strict";t.__esModule=!0;const o=new Map([[" ","space"],["spacebar","space"],["scroll","scrolllock"],["del","delete"],["esc","escape"],["medianexttrack","mediatracknext"],["mediaprevioustrack","mediatrackprevious"],["volumeup","audiovolumeup"],["volumedown","audiovolumedown"],["volumemute","audiovolumemute"],["multiply","*"],["add","+"],["divide","/"],["subtract","-"],["left","arrowleft"],["right","arrowright"],["up","arrowup"],["down","arrowdown"]]);t.normalizeKeys=e=>e.map((e=>{const t=e.toLowerCase();return o.has(t)?o.get(t):t})).sort().join("+");t.getKeysList=e=>e.split("+");const s=new RegExp("^(?:Key|Digit)([A-Z0-9])$"),i=new Set(["Backquote","Minus","Equal","BracketLeft","BracketRight","Backslash","Semicolon","Quote","Comma","Period","Slash"]);t.normalizeEventKey=e=>{let{key:t,code:o}=e,r=t;return s.test(o)?r=o.replace(s,"$1"):i.has(o)&&(r=o),r.toLowerCase()}},54833:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=s(o(42538)),n=s(o(48427)),a=o(83302),l=s(o(75244)),h=o(24449),u=s(o(21280)),d=o(50743),c=o(45433),g=o(5386);function f(e,t){m(e,t),t.add(e)}function p(e,t,o){m(e,t),t.set(e,o)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var C=new WeakMap,v=new WeakMap,y=new WeakMap,E=new WeakMap,S=new WeakMap,R=new WeakMap,b=new WeakMap,_=new WeakSet,T=new WeakSet;function O(){return parseInt(this.hot.rootElement.getAttribute((0,g.A11Y_COLCOUNT)()[0]),10)}function M(e){const t=w(this,_,O).call(this)+e;(0,a.setAttribute)(this.hot.rootElement,...(0,g.A11Y_COLCOUNT)(t))}t.default=class{constructor(e){f(this,T),f(this,_),(0,i.default)(this,"hot",void 0),(0,i.default)(this,"eventManager",void 0),(0,i.default)(this,"settings",void 0),(0,i.default)(this,"THEAD",void 0),(0,i.default)(this,"TBODY",void 0),(0,i.default)(this,"_wt",void 0),(0,i.default)(this,"activeWt",void 0),p(this,C,{writable:!0,value:0}),p(this,v,{writable:!0,value:0}),(0,i.default)(this,"postponedAdjustElementsSize",!1),p(this,y,{writable:!0,value:!1}),p(this,E,{writable:!0,value:void 0}),p(this,S,{writable:!0,value:void 0}),p(this,R,{writable:!0,value:0}),p(this,b,{writable:!0,value:0}),this.hot=e,this.eventManager=new l.default(this.hot),this.settings=this.hot.getSettings(),this.createElements(),this.registerEvents(),this.initializeWalkontable()}render(){this.hot.isRenderSuspended()||(this.hot.runHooks("beforeRender",this.hot.forceFullRender),this.postponedAdjustElementsSize&&(this.postponedAdjustElementsSize=!1,this.adjustElementsSize(!0)),this._wt.draw(!this.hot.forceFullRender),this.hot.runHooks("afterRender",this.hot.forceFullRender),this.hot.forceFullRender=!1,this.hot.renderCall=!1)}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.hot.isRenderSuspended()?this.postponedAdjustElementsSize=!0:this._wt.wtOverlays.adjustElementsSize(e)}getCellAtCoords(e,t){const o=this._wt.getCell(e,t);return o<0?null:o}scrollViewport(e,t,o,s,i){return this._wt.scrollViewport(e,t,o,s,i)}scrollViewportHorizontally(e,t,o){return this._wt.scrollViewportHorizontally(e,t,o)}scrollViewportVertically(e,t,o){return this._wt.scrollViewportVertically(e,t,o)}createElements(){const{rootElement:e,rootDocument:t}=this.hot,o=e.getAttribute("style");o&&e.setAttribute("data-originalstyle",o),(0,a.addClass)(e,"handsontable"),(0,n.default)(this,S,t.createElement("TABLE")),(0,a.addClass)((0,r.default)(this,S),"htCore"),this.hot.getSettings().tableClassName&&(0,a.addClass)((0,r.default)(this,S),this.hot.getSettings().tableClassName),this.settings.ariaTags&&((0,a.setAttribute)((0,r.default)(this,S),[(0,g.A11Y_PRESENTATION)()]),(0,a.setAttribute)(e,[(0,g.A11Y_TREEGRID)(),(0,g.A11Y_ROWCOUNT)(-1),(0,g.A11Y_COLCOUNT)(this.hot.countCols()),(0,g.A11Y_MULTISELECTABLE)()])),this.THEAD=t.createElement("THEAD"),(0,r.default)(this,S).appendChild(this.THEAD),this.TBODY=t.createElement("TBODY"),(0,r.default)(this,S).appendChild(this.TBODY),this.hot.table=(0,r.default)(this,S),this.hot.container.insertBefore((0,r.default)(this,S),this.hot.container.firstChild)}registerEvents(){const{rootElement:e,rootDocument:t,selection:o}=this.hot,s=t.documentElement;this.eventManager.addEventListener(e,"mousedown",(e=>{if((0,n.default)(this,y,!0),!this.isTextSelectionAllowed(e.target)){const{rootWindow:t}=this.hot;(0,a.clearTextSelection)(t),e.preventDefault(),t.focus()}})),this.eventManager.addEventListener(e,"mouseup",(()=>{(0,n.default)(this,y,!1)})),this.eventManager.addEventListener(e,"mousemove",(e=>{(0,r.default)(this,y)&&!this.isTextSelectionAllowed(e.target)&&(this.settings.fragmentSelection&&(0,a.clearTextSelection)(this.hot.rootWindow),e.preventDefault())})),this.eventManager.addEventListener(s,"keyup",(e=>{o.isInProgress()&&!e.shiftKey&&o.finish()})),this.eventManager.addEventListener(s,"mouseup",(s=>{o.isInProgress()&&(0,h.isLeftClick)(s)&&o.finish(),(0,n.default)(this,E,!1);const i=(0,a.isOutsideInput)(t.activeElement);i&&(!i&&(o.isSelected()||o.isSelectedByAnyHeader()||e.contains(s.target)||(0,h.isRightClick)(s))||this.hot.unlisten())})),this.eventManager.addEventListener(s,"contextmenu",(e=>{o.isInProgress()&&(0,h.isRightClick)(e)&&(o.finish(),(0,n.default)(this,E,!1))})),this.eventManager.addEventListener(s,"touchend",(()=>{o.isInProgress()&&o.finish(),(0,n.default)(this,E,!1)})),this.eventManager.addEventListener(s,"mousedown",(o=>{const i=o.target,n=o.x||o.clientX,l=o.y||o.clientY;let h=o.target;if((0,r.default)(this,E)||!e||!this.hot.view)return;const{holder:u}=this.hot.view._wt.wtTable;if(h===u){const e=(0,a.getScrollbarWidth)(t);if(t.elementFromPoint(n+e,l)!==u||t.elementFromPoint(n,l+e)!==u)return}else for(;h!==s;){if(null===h){if(o.isTargetWebComponent)break;return}if(h===e)return;h=h.parentNode}("function"==typeof this.settings.outsideClickDeselects?this.settings.outsideClickDeselects(i):this.settings.outsideClickDeselects)?this.hot.deselectCell():this.hot.destroyEditor(!1,!1)})),this.eventManager.addEventListener((0,r.default)(this,S),"selectstart",(e=>{this.settings.fragmentSelection||(0,a.isInput)(e.target)||e.preventDefault()}))}translateFromRenderableToVisualCoords(e){let{row:t,col:o}=e;return this.hot._createCellCoords(...this.translateFromRenderableToVisualIndex(t,o))}translateFromRenderableToVisualIndex(e,t){let o=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e,s=t>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(t):t;return null===o&&(o=e),null===s&&(s=t),[o,s]}countRenderableIndexes(e,t){const o=Math.min(e.getNotTrimmedIndexesLength(),t),s=e.getNearestNotHiddenIndex(o-1,-1);return null===s?0:e.getRenderableFromVisualIndex(s)+1}countRenderableColumns(){return this.countRenderableIndexes(this.hot.columnIndexMapper,this.settings.maxCols)}countRenderableRows(){return this.countRenderableIndexes(this.hot.rowIndexMapper,this.settings.maxRows)}countNotHiddenRowIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.rowIndexMapper,this.countRenderableRows())}countNotHiddenColumnIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.columnIndexMapper,this.countRenderableColumns())}countNotHiddenIndexes(e,t,o,s){if(isNaN(e)||e<0)return 0;const i=o.getNearestNotHiddenIndex(e,t),r=o.getRenderableFromVisualIndex(i);if(!Number.isInteger(r))return 0;let n=0;return t<0?n=r+1:t>0&&(n=s-r),n}countNotHiddenFixedColumnsStart(){const e=this.hot.countCols(),t=Math.min(parseInt(this.settings.fixedColumnsStart,10),e)-1;return this.countNotHiddenColumnIndexes(t,-1)}countNotHiddenFixedRowsTop(){const e=this.hot.countRows(),t=Math.min(parseInt(this.settings.fixedRowsTop,10),e)-1;return this.countNotHiddenRowIndexes(t,-1)}countNotHiddenFixedRowsBottom(){const e=this.hot.countRows(),t=Math.max(e-parseInt(this.settings.fixedRowsBottom,10),0);return this.countNotHiddenRowIndexes(t,1)}countRenderableColumnsInRange(e,t){let o=0;for(let s=e;s<=t;s++)null!==this.hot.columnIndexMapper.getRenderableFromVisualIndex(s)&&(o+=1);return o}countRenderableRowsInRange(e,t){let o=0;for(let s=e;s<=t;s++)null!==this.hot.rowIndexMapper.getRenderableFromVisualIndex(s)&&(o+=1);return o}isMainTableNotFullyCoveredByOverlays(){const e=this.countNotHiddenFixedRowsTop()+this.countNotHiddenFixedRowsBottom(),t=this.countNotHiddenFixedColumnsStart();return this.hot.countRenderedRows()>e&&this.hot.countRenderedCols()>t}initializeWalkontable(){const e={ariaTags:this.settings.ariaTags,rtlMode:this.hot.isRtl(),externalRowCalculator:this.hot.getPlugin("autoRowSize")&&this.hot.getPlugin("autoRowSize").isEnabled(),table:(0,r.default)(this,S),isDataViewInstance:()=>(0,c.isRootInstance)(this.hot),preventOverflow:()=>this.settings.preventOverflow,preventWheel:()=>this.settings.preventWheel,stretchH:()=>this.settings.stretchH,data:(e,t)=>this.hot.getDataAtCell(...this.translateFromRenderableToVisualIndex(e,t)),totalRows:()=>this.countRenderableRows(),totalColumns:()=>this.countRenderableColumns(),fixedColumnsStart:()=>this.countNotHiddenFixedColumnsStart(),fixedRowsTop:()=>this.countNotHiddenFixedRowsTop(),fixedRowsBottom:()=>this.countNotHiddenFixedRowsBottom(),shouldRenderInlineStartOverlay:()=>this.settings.fixedColumnsStart>0||e.rowHeaders().length>0,shouldRenderTopOverlay:()=>this.settings.fixedRowsTop>0||e.columnHeaders().length>0,shouldRenderBottomOverlay:()=>this.settings.fixedRowsBottom>0,minSpareRows:()=>this.settings.minSpareRows,renderAllRows:this.settings.renderAllRows,rowHeaders:()=>{const e=[];return this.hot.hasRowHeaders()&&e.push(((e,t)=>{const o=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e;this.appendRowHeader(o,t)})),this.hot.runHooks("afterGetRowHeaderRenderers",e),(0,n.default)(this,v,e.length),this.hot.getSettings().ariaTags&&w(this,_,O).call(this)===this.hot.countCols()&&w(this,T,M).call(this,(0,r.default)(this,v)),e},columnHeaders:()=>{const e=[];return this.hot.hasColHeaders()&&e.push(((e,t)=>{const o=e>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(e):e;this.appendColHeader(o,t)})),this.hot.runHooks("afterGetColumnHeaderRenderers",e),(0,n.default)(this,C,e.length),e},columnWidth:e=>{const t=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e);return this.hot.getColWidth(null===t?e:t)},rowHeight:e=>{const t=this.hot.rowIndexMapper.getVisualFromRenderableIndex(e);return this.hot.getRowHeight(null===t?e:t)},cellRenderer:(e,t,o)=>{const[s,i]=this.translateFromRenderableToVisualIndex(e,t),r=this.hot.runHooks("modifyGetCellCoords",s,i);let n=s,a=i;Array.isArray(r)&&([n,a]=r);const l=this.hot.getCellMeta(n,a),h=this.hot.colToProp(a);let u=this.hot.getDataAtRowProp(n,h);this.hot.hasHook("beforeValueRender")&&(u=this.hot.runHooks("beforeValueRender",u,l)),this.hot.runHooks("beforeRenderer",o,s,i,h,u,l),this.hot.getCellRenderer(l)(this.hot,o,s,i,h,u,l),this.hot.runHooks("afterRenderer",o,s,i,h,u,l)},selections:this.hot.selection.highlight,hideBorderOnMouseDownOver:()=>this.settings.fragmentSelection,onWindowResize:()=>{this.hot&&!this.hot.isDestroyed&&this.hot.refreshDimensions()},onContainerElementResize:()=>{this.hot&&!this.hot.isDestroyed&&(0,a.isVisible)(this.hot.rootElement)&&this.hot.refreshDimensions()},onCellMouseDown:(e,t,o,s)=>{const i=this.translateFromRenderableToVisualCoords(t),r={row:!1,column:!1,cell:!1};this.hot.listen(),this.activeWt=s,(0,n.default)(this,E,!0),this.hot.runHooks("beforeOnCellMouseDown",e,i,o,r),(0,h.isImmediatePropagationStopped)(e)||((0,d.handleMouseEvent)(e,{coords:i,selection:this.hot.selection,controller:r,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseDown",e,i,o),this.activeWt=this._wt)},onCellContextMenu:(e,t,o,s)=>{const i=this.translateFromRenderableToVisualCoords(t);this.activeWt=s,(0,n.default)(this,E,!1),this.hot.selection.isInProgress()&&this.hot.selection.finish(),this.hot.runHooks("beforeOnCellContextMenu",e,i,o),(0,h.isImmediatePropagationStopped)(e)||(this.hot.runHooks("afterOnCellContextMenu",e,i,o),this.activeWt=this._wt)},onCellMouseOut:(e,t,o,s)=>{const i=this.translateFromRenderableToVisualCoords(t);this.activeWt=s,this.hot.runHooks("beforeOnCellMouseOut",e,i,o),(0,h.isImmediatePropagationStopped)(e)||(this.hot.runHooks("afterOnCellMouseOut",e,i,o),this.activeWt=this._wt)},onCellMouseOver:(e,t,o,s)=>{const i=this.translateFromRenderableToVisualCoords(t),n={row:!1,column:!1,cell:!1};this.activeWt=s,this.hot.runHooks("beforeOnCellMouseOver",e,i,o,n),(0,h.isImmediatePropagationStopped)(e)||((0,r.default)(this,E)&&(0,d.handleMouseEvent)(e,{coords:i,selection:this.hot.selection,controller:n,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseOver",e,i,o),this.activeWt=this._wt)},onCellMouseUp:(e,t,o,s)=>{const i=this.translateFromRenderableToVisualCoords(t);this.activeWt=s,this.hot.runHooks("beforeOnCellMouseUp",e,i,o),(0,h.isImmediatePropagationStopped)(e)||this.hot.isDestroyed||(this.hot.runHooks("afterOnCellMouseUp",e,i,o),this.activeWt=this._wt)},onCellCornerMouseDown:e=>{e.preventDefault(),this.hot.runHooks("afterOnCellCornerMouseDown",e)},onCellCornerDblClick:e=>{e.preventDefault(),this.hot.runHooks("afterOnCellCornerDblClick",e)},beforeDraw:(e,t)=>this.beforeRender(e,t),onDraw:e=>this.afterRender(e),onBeforeViewportScrollVertically:e=>{const t=this.hot.rowIndexMapper,o=e<0;let s=e;return o||(s=t.getVisualFromRenderableIndex(e),null!==s)?(s=this.hot.runHooks("beforeViewportScrollVertically",s),this.hot.runHooks("beforeViewportScroll"),o?s:t.getRenderableFromVisualIndex(s)):e},onBeforeViewportScrollHorizontally:e=>{const t=this.hot.columnIndexMapper,o=e<0;let s=e;return o||(s=t.getVisualFromRenderableIndex(e),null!==s)?(s=this.hot.runHooks("beforeViewportScrollHorizontally",s),this.hot.runHooks("beforeViewportScroll"),o?s:t.getRenderableFromVisualIndex(s)):e},onScrollVertically:()=>{this.hot.runHooks("afterScrollVertically"),this.hot.runHooks("afterScroll")},onScrollHorizontally:()=>{this.hot.runHooks("afterScrollHorizontally"),this.hot.runHooks("afterScroll")},onBeforeRemoveCellClassNames:()=>this.hot.runHooks("beforeRemoveCellClassNames"),onBeforeHighlightingRowHeader:(e,t,o)=>{const s=this.hot.rowIndexMapper,i=e<0;let r=e;i||(r=s.getVisualFromRenderableIndex(e));const n=this.hot.runHooks("beforeHighlightingRowHeader",r,t,o);return i?n:s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(n,1))},onBeforeHighlightingColumnHeader:(e,t,o)=>{const s=this.hot.columnIndexMapper,i=e<0;let r=e;i||(r=s.getVisualFromRenderableIndex(e));const n=this.hot.runHooks("beforeHighlightingColumnHeader",r,t,o);return i?n:s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(n,1))},onAfterDrawSelection:(e,t,o)=>{let s;const[i,r]=this.translateFromRenderableToVisualIndex(e,t),n=this.hot.selection.getSelectedRange();if(n.size()>0){const e=n.peekByIndex(null!=o?o:0);s=[e.from.row,e.from.col,e.to.row,e.to.col]}return this.hot.runHooks("afterDrawSelection",i,r,s,o)},onBeforeDrawBorders:(e,t)=>{const[o,s,i,r]=e,n=[this.hot.rowIndexMapper.getVisualFromRenderableIndex(o),this.hot.columnIndexMapper.getVisualFromRenderableIndex(s),this.hot.rowIndexMapper.getVisualFromRenderableIndex(i),this.hot.columnIndexMapper.getVisualFromRenderableIndex(r)];return this.hot.runHooks("beforeDrawBorders",n,t)},onBeforeTouchScroll:()=>this.hot.runHooks("beforeTouchScroll"),onAfterMomentumScroll:()=>this.hot.runHooks("afterMomentumScroll"),onBeforeStretchingColumnWidth:(e,t)=>{const o=this.hot.columnIndexMapper.getVisualFromRenderableIndex(t);return this.hot.runHooks("beforeStretchingColumnWidth",e,o)},onModifyRowHeaderWidth:e=>this.hot.runHooks("modifyRowHeaderWidth",e),onModifyGetCellCoords:(e,t,o)=>{const s=this.hot.rowIndexMapper,i=this.hot.columnIndexMapper,r=t>=0?i.getVisualFromRenderableIndex(t):t,n=e>=0?s.getVisualFromRenderableIndex(e):e,a=this.hot.runHooks("modifyGetCellCoords",n,r,o);if(Array.isArray(a)){const[e,t,o,r]=a;return[e>=0?s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(e,1)):e,t>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(t,1)):t,o>=0?s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(o,-1)):o,r>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(r,-1)):r]}},viewportRowCalculatorOverride:e=>{let t=this.settings.viewportRowRenderingOffset;if("auto"===t&&this.settings.fixedRowsTop&&(t=10),t>0||"auto"===t){const o=this.countRenderableRows(),s=e.startRow,i=e.endRow;if("number"==typeof t)e.startRow=Math.max(s-t,0),e.endRow=Math.min(i+t,o-1);else if("auto"===t){const t=Math.ceil(i/o*12);e.startRow=Math.max(s-t,0),e.endRow=Math.min(i+t,o-1)}}this.hot.runHooks("afterViewportRowCalculatorOverride",e)},viewportColumnCalculatorOverride:e=>{let t=this.settings.viewportColumnRenderingOffset;if("auto"===t&&this.settings.fixedColumnsStart&&(t=10),t>0||"auto"===t){const o=this.countRenderableColumns(),s=e.startColumn,i=e.endColumn;if("number"==typeof t&&(e.startColumn=Math.max(s-t,0),e.endColumn=Math.min(i+t,o-1)),"auto"===t){const t=Math.ceil(i/o*6);e.startColumn=Math.max(s-t,0),e.endColumn=Math.min(i+t,o-1)}}this.hot.runHooks("afterViewportColumnCalculatorOverride",e)},rowHeaderWidth:()=>this.settings.rowHeaderWidth,columnHeaderHeight:()=>{const e=this.hot.runHooks("modifyColumnHeaderHeight");return this.settings.columnHeaderHeight||e}};this.hot.runHooks("beforeInitWalkontable",e),this._wt=new u.default(e),this.activeWt=this._wt;const t=this._wt.wtTable.spreader,{width:o,height:s}=this.hot.rootElement.getBoundingClientRect();this.setLastSize(o,s),this.eventManager.addEventListener(t,"mousedown",(e=>{e.target===t&&3===e.which&&e.stopPropagation()})),this.eventManager.addEventListener(t,"contextmenu",(e=>{e.target===t&&3===e.which&&e.stopPropagation()})),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"click",(()=>{this.settings.observeDOMVisibility&&this._wt.drawInterrupted&&(this.hot.forceFullRender=!0,this.render())}))}isTextSelectionAllowed(e){if((0,a.isInput)(e))return!0;const t=(0,a.isChildOf)(e,this.hot.view._wt.wtTable.spreader);return!(!0!==this.settings.fragmentSelection||!t)||(!("cell"!==this.settings.fragmentSelection||!this.isSelectedOnlyCell()||!t)||!(this.settings.fragmentSelection||!this.isCellEdited()||!this.isSelectedOnlyCell()))}isMouseDown(){return(0,r.default)(this,E)}isSelectedOnlyCell(){var e,t;return null!==(e=null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingleCell())&&void 0!==e&&e}isCellEdited(){const e=this.hot.getActiveEditor();return e&&e.isOpened()}beforeRender(e,t){e&&this.hot.runHooks("beforeViewRender",this.hot.forceFullRender,t)}afterRender(e){e&&this.hot.runHooks("afterViewRender",this.hot.forceFullRender)}appendRowHeader(e,t){if(t.firstChild){const o=t.firstChild;if(!(0,a.hasClass)(o,"relative"))return(0,a.empty)(t),void this.appendRowHeader(e,t);this.updateCellHeader(o.querySelector(".rowHeader"),e,this.hot.getRowHeader)}else{const{rootDocument:o,getRowHeader:s}=this.hot,i=o.createElement("div"),r=o.createElement("span");i.className="relative",r.className="rowHeader",this.updateCellHeader(r,e,s),i.appendChild(r),t.appendChild(i)}this.hot.runHooks("afterGetRowHeader",e,t)}appendColHeader(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hot.getColHeader,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(t.firstChild){const i=t.firstChild;(0,a.hasClass)(i,"relative")?this.updateCellHeader(i.querySelector(".colHeader"),e,o,s):((0,a.empty)(t),this.appendColHeader(e,t,o,s))}else{const{rootDocument:i}=this.hot,r=i.createElement("div"),n=i.createElement("span");r.className="relative",n.className="colHeader",this.settings.ariaTags&&((0,a.setAttribute)(r,...(0,g.A11Y_PRESENTATION)()),(0,a.setAttribute)(n,...(0,g.A11Y_PRESENTATION)())),this.updateCellHeader(n,e,o,s),r.appendChild(n),t.appendChild(r)}this.hot.runHooks("afterGetColHeader",e,t,s)}updateCellHeader(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=t;const r=this._wt.wtOverlays.getParentOverlay(e)||this._wt;e.parentNode&&((0,a.hasClass)(e,"colHeader")?i=r.wtTable.columnFilter.sourceToRendered(t):(0,a.hasClass)(e,"rowHeader")&&(i=r.wtTable.rowFilter.sourceToRendered(t))),i>-1?(0,a.fastInnerHTML)(e,o(t,s)):((0,a.fastInnerText)(e,String.fromCharCode(160)),(0,a.addClass)(e,"cornerHeader"))}maximumVisibleElementWidth(e){const t=this._wt.wtViewport.getWorkspaceWidth()-e;return t>0?t:0}maximumVisibleElementHeight(e){const t=this._wt.wtViewport.getWorkspaceHeight()-e;return t>0?t:0}setLastSize(e,t){(0,n.default)(this,R,e),(0,n.default)(this,b,t)}getLastSize(){return{width:(0,r.default)(this,R),height:(0,r.default)(this,b)}}getFirstFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getFirstVisibleRow())}getLastFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getLastVisibleRow())}getFirstFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getFirstVisibleColumn())}getLastFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getLastVisibleColumn())}getColumnHeadersCount(){return(0,r.default)(this,C)}getRowHeadersCount(){return(0,r.default)(this,v)}destroy(){this._wt.destroy(),this.eventManager.destroy()}}},18756:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(42538)),r=s(o(48427)),n=o(56617),a=o(69939);function l(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var h=new WeakMap,u=new WeakMap,d=new WeakMap,c=new WeakMap,g=new WeakMap;t.ChangesObservable=class{constructor(){let{initialIndexValue:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l(this,h,{writable:!0,value:new Set}),l(this,u,{writable:!0,value:[]}),l(this,d,{writable:!0,value:[]}),l(this,c,{writable:!0,value:!1}),l(this,g,{writable:!0,value:!1}),(0,r.default)(this,g,null!=e&&e)}createObserver(){const e=new n.ChangesObserver;return(0,i.default)(this,h).add(e),e.addLocalHook("unsubscribe",(()=>{(0,i.default)(this,h).delete(e)})),e._writeInitialChanges((0,a.arrayDiff)((0,i.default)(this,u),(0,i.default)(this,d))),e}emit(e){let t=(0,i.default)(this,d);(0,i.default)(this,c)&&(0,i.default)(this,u).length===e.length||(0===e.length?e=new Array(t.length).fill((0,i.default)(this,g)):(0,r.default)(this,u,new Array(e.length).fill((0,i.default)(this,g))),(0,i.default)(this,c)||((0,r.default)(this,c,!0),t=(0,i.default)(this,u)));const o=(0,a.arrayDiff)(t,e);(0,i.default)(this,h).forEach((e=>e._write(o))),(0,r.default)(this,d,e)}}},56617:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(48427)),r=s(o(42538)),n=o(22232),a=s(o(65718));function l(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var h=new WeakMap;class u{constructor(){l(this,h,{writable:!0,value:[]})}subscribe(e){return this.addLocalHook("change",e),this._write((0,r.default)(this,h)),this}unsubscribe(){return this.runLocalHooks("unsubscribe"),this.clearLocalHooks(),this}_write(e){return e.length>0&&this.runLocalHooks("change",e),this}_writeInitialChanges(e){(0,i.default)(this,h,e)}}t.ChangesObserver=u,(0,n.mixin)(u,a.default)},69939:(e,t,o)=>{"use strict";t.__esModule=!0,t.arrayDiff=function(e,t){const o=[];let s=0,i=0;for(;s<e.length&&i<t.length;s++,i++)e[s]!==t[i]&&o.push({op:"replace",index:i,oldValue:e[s],newValue:t[i]});for(;s<t.length;s++)o.push({op:"insert",index:s,oldValue:void 0,newValue:t[s]});for(;i<e.length;i++)o.push({op:"remove",index:i,oldValue:e[i],newValue:void 0});return o},o(63517)},33165:(e,t,o)=>{"use strict";t.__esModule=!0;var s={IndexMapper:!0,getRegisteredMapsCounter:!0,getIncreasedIndexes:!0,getDecreasedIndexes:!0,alterUtilsFactory:!0},i=o(78661);t.IndexMapper=i.IndexMapper;var r=o(64760);t.getRegisteredMapsCounter=r.getRegisteredMapsCounter;var n=o(55759);t.getIncreasedIndexes=n.getIncreasedIndexes,t.getDecreasedIndexes=n.getDecreasedIndexes,t.alterUtilsFactory=n.alterUtilsFactory;var a=o(22460);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===a[e]||(t[e]=a[e]))}))},78661:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(50095),n=o(22460),a=o(67734),l=s(o(65718)),h=o(22232),u=o(93315),d=o(18756);new Set;class c{constructor(){(0,i.default)(this,"indexesSequence",new n.IndexesSequence),(0,i.default)(this,"trimmingMapsCollection",new a.AggregatedCollection((e=>e.some((e=>!0===e))),!1)),(0,i.default)(this,"hidingMapsCollection",new a.AggregatedCollection((e=>e.some((e=>!0===e))),!1)),(0,i.default)(this,"variousMapsCollection",new a.MapCollection),(0,i.default)(this,"hidingChangesObservable",new d.ChangesObservable({initialIndexValue:!1})),(0,i.default)(this,"notTrimmedIndexesCache",[]),(0,i.default)(this,"notHiddenIndexesCache",[]),(0,i.default)(this,"isBatched",!1),(0,i.default)(this,"indexesSequenceChanged",!1),(0,i.default)(this,"indexesChangeSource",void 0),(0,i.default)(this,"trimmedIndexesChanged",!1),(0,i.default)(this,"hiddenIndexesChanged",!1),(0,i.default)(this,"renderablePhysicalIndexesCache",[]),(0,i.default)(this,"fromPhysicalToVisualIndexesCache",new Map),(0,i.default)(this,"fromVisualToRenderableIndexesCache",new Map),this.indexesSequence.addLocalHook("change",(()=>{this.indexesSequenceChanged=!0,this.updateCache(),this.runLocalHooks("indexesSequenceChange",this.indexesChangeSource),this.runLocalHooks("change",this.indexesSequence,null)})),this.trimmingMapsCollection.addLocalHook("change",(e=>{this.trimmedIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.trimmingMapsCollection)})),this.hidingMapsCollection.addLocalHook("change",(e=>{this.hiddenIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.hidingMapsCollection)})),this.variousMapsCollection.addLocalHook("change",(e=>{this.runLocalHooks("change",e,this.variousMapsCollection)}))}suspendOperations(){this.isBatched=!0}resumeOperations(){this.isBatched=!1,this.updateCache()}createChangesObserver(e){if("hiding"!==e)throw new Error(`Unsupported index map type "${e}".`);return this.hidingChangesObservable.createObserver()}createAndRegisterIndexMap(e,t,o){return this.registerMap(e,(0,n.createIndexMap)(t,o))}registerMap(e,t){if(this.trimmingMapsCollection.get(e)||this.hidingMapsCollection.get(e)||this.variousMapsCollection.get(e))throw Error(`Map with name "${e}" has been already registered.`);t instanceof n.TrimmingMap?this.trimmingMapsCollection.register(e,t):t instanceof n.HidingMap?this.hidingMapsCollection.register(e,t):this.variousMapsCollection.register(e,t);const o=this.getNumberOfIndexes();return o>0&&t.init(o),t}unregisterMap(e){this.trimmingMapsCollection.unregister(e),this.hidingMapsCollection.unregister(e),this.variousMapsCollection.unregister(e)}unregisterAll(){this.trimmingMapsCollection.unregisterAll(),this.hidingMapsCollection.unregisterAll(),this.variousMapsCollection.unregisterAll()}getPhysicalFromVisualIndex(e){const t=this.notTrimmedIndexesCache[e];return(0,u.isDefined)(t)?t:null}getPhysicalFromRenderableIndex(e){const t=this.renderablePhysicalIndexesCache[e];return(0,u.isDefined)(t)?t:null}getVisualFromPhysicalIndex(e){const t=this.fromPhysicalToVisualIndexesCache.get(e);return(0,u.isDefined)(t)?t:null}getVisualFromRenderableIndex(e){return this.getVisualFromPhysicalIndex(this.getPhysicalFromRenderableIndex(e))}getRenderableFromVisualIndex(e){const t=this.fromVisualToRenderableIndexesCache.get(e);return(0,u.isDefined)(t)?t:null}getNearestNotHiddenIndex(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null===this.getPhysicalFromVisualIndex(e))return null;if(this.fromVisualToRenderableIndexesCache.has(e))return e;const s=Array.from(this.fromVisualToRenderableIndexesCache.keys());let i=-1;return i=t>0?s.findIndex((t=>t>e)):s.reverse().findIndex((t=>t<e)),-1===i?o?this.getNearestNotHiddenIndex(e,-t,!1):null:s[i]}initToLength(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getNumberOfIndexes();this.notTrimmedIndexesCache=[...new Array(e).keys()],this.notHiddenIndexesCache=[...new Array(e).keys()],this.suspendOperations(),this.indexesChangeSource="init",this.indexesSequence.init(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.initEvery(e),this.resumeOperations(),this.suspendOperations(),this.hidingMapsCollection.initEvery(e),this.variousMapsCollection.initEvery(e),this.resumeOperations(),this.runLocalHooks("init")}fitToLength(e){const t=this.getNumberOfIndexes();if(e<t){const t=[...Array(this.getNumberOfIndexes()-e).keys()].map((t=>t+e));this.removeIndexes(t)}else this.insertIndexes(t,e-t)}getIndexesSequence(){return this.indexesSequence.getValues()}setIndexesSequence(e){void 0===this.indexesChangeSource&&(this.indexesChangeSource="update"),this.indexesSequence.setValues(e),"update"===this.indexesChangeSource&&(this.indexesChangeSource=void 0)}getNotTrimmedIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.notTrimmedIndexesCache;return this.getIndexesSequence().filter((e=>!1===this.isTrimmed(e)))}getNotTrimmedIndexesLength(){return this.getNotTrimmedIndexes().length}getNotHiddenIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.notHiddenIndexesCache;return this.getIndexesSequence().filter((e=>!1===this.isHidden(e)))}getNotHiddenIndexesLength(){return this.getNotHiddenIndexes().length}getRenderableIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.renderablePhysicalIndexesCache;return this.getNotTrimmedIndexes().filter((e=>!1===this.isHidden(e)))}getRenderableIndexesLength(){return this.getRenderableIndexes().length}getNumberOfIndexes(){return this.getIndexesSequence().length}moveIndexes(e,t){"number"==typeof e&&(e=[e]);const o=(0,r.arrayMap)(e,(e=>this.getPhysicalFromVisualIndex(e))),s=this.getNotTrimmedIndexesLength(),i=e.length,a=(0,n.getListWithRemovedItems)(this.getIndexesSequence(),o),l=a.filter((e=>!1===this.isTrimmed(e)));let h=a.indexOf(l[l.length-1])+1;if(t+i<s){const e=l[t];h=a.indexOf(e)}this.indexesChangeSource="move",this.setIndexesSequence((0,n.getListWithInsertedItems)(a,h,o)),this.indexesChangeSource=void 0}isTrimmed(e){return this.trimmingMapsCollection.getMergedValueAtIndex(e)}isHidden(e){return this.hidingMapsCollection.getMergedValueAtIndex(e)}insertIndexes(e,t){const o=this.getNotTrimmedIndexes()[e],s=(0,u.isDefined)(o)?o:this.getNumberOfIndexes(),i=this.getIndexesSequence().includes(o)?this.getIndexesSequence().indexOf(o):this.getNumberOfIndexes(),n=(0,r.arrayMap)(new Array(t).fill(s),((e,t)=>e+t));this.suspendOperations(),this.indexesChangeSource="insert",this.indexesSequence.insert(i,n),this.indexesChangeSource=void 0,this.trimmingMapsCollection.insertToEvery(i,n),this.hidingMapsCollection.insertToEvery(i,n),this.variousMapsCollection.insertToEvery(i,n),this.resumeOperations()}removeIndexes(e){this.suspendOperations(),this.indexesChangeSource="remove",this.indexesSequence.remove(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.removeFromEvery(e),this.hidingMapsCollection.removeFromEvery(e),this.variousMapsCollection.removeFromEvery(e),this.resumeOperations()}updateCache(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.indexesSequenceChanged||this.trimmedIndexesChanged||this.hiddenIndexesChanged;(!0===e||!1===this.isBatched&&!0===t)&&(this.trimmingMapsCollection.updateCache(),this.hidingMapsCollection.updateCache(),this.notTrimmedIndexesCache=this.getNotTrimmedIndexes(!1),this.notHiddenIndexesCache=this.getNotHiddenIndexes(!1),this.renderablePhysicalIndexesCache=this.getRenderableIndexes(!1),this.cacheFromPhysicalToVisualIndexes(),this.cacheFromVisualToRenderableIndexes(),this.hiddenIndexesChanged&&this.hidingChangesObservable.emit(this.hidingMapsCollection.getMergedValues()),this.runLocalHooks("cacheUpdated",{indexesSequenceChanged:this.indexesSequenceChanged,trimmedIndexesChanged:this.trimmedIndexesChanged,hiddenIndexesChanged:this.hiddenIndexesChanged}),this.indexesSequenceChanged=!1,this.trimmedIndexesChanged=!1,this.hiddenIndexesChanged=!1)}cacheFromPhysicalToVisualIndexes(){const e=this.getNotTrimmedIndexesLength();this.fromPhysicalToVisualIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromVisualIndex(t);this.fromPhysicalToVisualIndexesCache.set(e,t)}}cacheFromVisualToRenderableIndexes(){const e=this.getRenderableIndexesLength();this.fromVisualToRenderableIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromRenderableIndex(t),o=this.getVisualFromPhysicalIndex(e);this.fromVisualToRenderableIndexesCache.set(o,t)}}}t.IndexMapper=c,(0,h.mixin)(c,l.default)},40302:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(64760),n=o(50095),a=o(93315);class l extends r.MapCollection{constructor(e,t){super(),(0,i.default)(this,"mergedValuesCache",[]),(0,i.default)(this,"aggregationFunction",void 0),(0,i.default)(this,"fallbackValue",void 0),this.aggregationFunction=e,this.fallbackValue=t}getMergedValues(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.mergedValuesCache;if(0===this.getLength())return[];const e=(0,n.arrayMap)(this.get(),(e=>e.getValues())),t=[],o=(0,a.isDefined)(e[0])&&e[0].length||0;for(let s=0;s<o;s+=1){const o=[];for(let t=0;t<this.getLength();t+=1)o.push(e[t][s]);t.push(o)}return(0,n.arrayMap)(t,this.aggregationFunction)}getMergedValueAtIndex(e,t){const o=this.getMergedValues(t)[e];return(0,a.isDefined)(o)?o:this.fallbackValue}updateCache(){this.mergedValuesCache=this.getMergedValues(!1)}}t.AggregatedCollection=l},67734:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(40302);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}));var i=o(64760);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||(t[e]=i[e]))}))},64760:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getRegisteredMapsCounter=function(){return l};var i=s(o(93231)),r=o(93315),n=o(22232),a=s(o(65718));let l=0;class h{constructor(){(0,i.default)(this,"collection",new Map)}register(e,t){!1===this.collection.has(e)&&(this.collection.set(e,t),t.addLocalHook("change",(()=>this.runLocalHooks("change",t))),l+=1)}unregister(e){const t=this.collection.get(e);(0,r.isDefined)(t)&&(t.destroy(),this.collection.delete(e),this.runLocalHooks("change",t),l-=1)}unregisterAll(){this.collection.forEach(((e,t)=>this.unregister(t))),this.collection.clear()}get(e){return(0,r.isUndefined)(e)?Array.from(this.collection.values()):this.collection.get(e)}getLength(){return this.collection.size}removeFromEvery(e){this.collection.forEach((t=>{t.remove(e)}))}insertToEvery(e,t){this.collection.forEach((o=>{o.insert(e,t)}))}initEvery(e){this.collection.forEach((t=>{t.init(e)}))}}t.MapCollection=h,(0,n.mixin)(h,a.default)},27866:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517);var s=o(40986),i=o(50095);class r extends s.PhysicalIndexToValueMap{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getHiddenIndexes(){return(0,i.arrayReduce)(this.getValues(),((e,t,o)=>(t&&e.push(o),e)),[])}}t.HidingMap=r},22460:(e,t,o)=>{"use strict";t.__esModule=!0;var s={createIndexMap:!0,HidingMap:!0,IndexMap:!0,LinkedPhysicalIndexToValueMap:!0,PhysicalIndexToValueMap:!0,TrimmingMap:!0};t.createIndexMap=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!d.has(e))throw new Error(`The provided map type ("${e}") does not exist.`);return new(d.get(e))(t)},o(91683);var i=o(27866);t.HidingMap=i.HidingMap;var r=o(30196);t.IndexMap=r.IndexMap;var n=o(95902);t.LinkedPhysicalIndexToValueMap=n.LinkedPhysicalIndexToValueMap;var a=o(40986);t.PhysicalIndexToValueMap=a.PhysicalIndexToValueMap;var l=o(27770);t.TrimmingMap=l.TrimmingMap;var h=o(23083);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===h[e]||(t[e]=h[e]))}));var u=o(42776);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===u[e]||(t[e]=u[e]))}));const d=new Map([["hiding",i.HidingMap],["index",r.IndexMap],["linkedPhysicalIndexToValue",n.LinkedPhysicalIndexToValueMap],["physicalIndexToValue",a.PhysicalIndexToValueMap],["trimming",l.TrimmingMap]])},30196:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(68145),n=o(22232),a=o(85015),l=s(o(65718));class h{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,i.default)(this,"indexedValues",[]),(0,i.default)(this,"initValueOrFn",void 0),this.initValueOrFn=e}getValues(){return this.indexedValues}getValueAtIndex(e){const t=this.indexedValues;if(e<t.length)return t[e]}setValues(e){this.indexedValues=e.slice(),this.runLocalHooks("change")}setValueAtIndex(e,t){return e<this.indexedValues.length&&(this.indexedValues[e]=t,this.runLocalHooks("change"),!0)}clear(){this.setDefaultValues()}getLength(){return this.getValues().length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.indexedValues.length=0,(0,a.isFunction)(this.initValueOrFn)?(0,r.rangeEach)(e-1,(e=>this.indexedValues.push(this.initValueOrFn(e)))):(0,r.rangeEach)(e-1,(()=>this.indexedValues.push(this.initValueOrFn))),this.runLocalHooks("change")}init(e){return this.setDefaultValues(e),this.runLocalHooks("init"),this}insert(){this.runLocalHooks("change")}remove(){this.runLocalHooks("change")}destroy(){this.clearLocalHooks(),this.indexedValues=null,this.initValueOrFn=null}}t.IndexMap=h,(0,n.mixin)(h,l.default)},23083:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(30196),i=o(42776),r=o(55759);class n extends s.IndexMap{constructor(){super((e=>e))}insert(e,t){const o=(0,r.getIncreasedIndexes)(this.indexedValues,t);this.indexedValues=(0,i.getListWithInsertedItems)(o,e,t),super.insert(e,t)}remove(e){const t=(0,i.getListWithRemovedItems)(this.indexedValues,e);this.indexedValues=(0,r.getDecreasedIndexes)(t,e),super.remove(e)}}t.IndexesSequence=n},95902:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(30196),n=o(60991),a=o(42776),l=o(75445),h=o(85015);class u extends r.IndexMap{constructor(){super(...arguments),(0,i.default)(this,"orderOfIndexes",[])}getValues(){return this.orderOfIndexes.map((e=>this.indexedValues[e]))}setValues(e){this.orderOfIndexes=[...Array(e.length).keys()],super.setValues(e)}setValueAtIndex(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.orderOfIndexes.length;return e<this.indexedValues.length&&(this.indexedValues[e]=t,!1===this.orderOfIndexes.includes(e)&&this.orderOfIndexes.splice(o,0,e),this.runLocalHooks("change"),!0)}clearValue(e){this.orderOfIndexes=(0,a.getListWithRemovedItems)(this.orderOfIndexes,[e]),(0,h.isFunction)(this.initValueOrFn)?super.setValueAtIndex(e,this.initValueOrFn(e)):super.setValueAtIndex(e,this.initValueOrFn)}getLength(){return this.orderOfIndexes.length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.orderOfIndexes.length=0,super.setDefaultValues(e)}insert(e,t){this.indexedValues=(0,n.getListWithInsertedItems)(this.indexedValues,e,t,this.initValueOrFn),this.orderOfIndexes=(0,l.getIncreasedIndexes)(this.orderOfIndexes,t),super.insert(e,t)}remove(e){this.indexedValues=(0,n.getListWithRemovedItems)(this.indexedValues,e),this.orderOfIndexes=(0,a.getListWithRemovedItems)(this.orderOfIndexes,e),this.orderOfIndexes=(0,l.getDecreasedIndexes)(this.orderOfIndexes,e),super.remove(e)}getEntries(){return this.orderOfIndexes.map((e=>[e,this.getValueAtIndex(e)]))}}t.LinkedPhysicalIndexToValueMap=u},40986:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(30196),i=o(60991);class r extends s.IndexMap{insert(e,t){this.indexedValues=(0,i.getListWithInsertedItems)(this.indexedValues,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){this.indexedValues=(0,i.getListWithRemovedItems)(this.indexedValues,e),super.remove(e)}}t.PhysicalIndexToValueMap=r},27770:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517);var s=o(40986),i=o(50095);class r extends s.PhysicalIndexToValueMap{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getTrimmedIndexes(){return(0,i.arrayReduce)(this.getValues(),((e,t,o)=>(t&&e.push(o),e)),[])}}t.TrimmingMap=r},75445:(e,t,o)=>{"use strict";t.__esModule=!0,t.getDecreasedIndexes=function(e,t){return(0,s.arrayMap)(e,(e=>e-t.filter((t=>t<e)).length))},t.getIncreasedIndexes=function(e,t){const o=t[0],i=t.length;return(0,s.arrayMap)(e,(e=>e>=o?e+i:e))};var s=o(50095)},55759:(e,t,o)=>{"use strict";t.__esModule=!0,o(91683);var s=o(75445);t.getDecreasedIndexes=s.getDecreasedIndexes,t.getIncreasedIndexes=s.getIncreasedIndexes;var i=o(42776),r=o(60991);const n=new Map([["indexesSequence",{getListWithInsertedItems:i.getListWithInsertedItems,getListWithRemovedItems:i.getListWithRemovedItems}],["physicallyIndexed",{getListWithInsertedItems:r.getListWithInsertedItems,getListWithRemovedItems:r.getListWithRemovedItems}]]);t.alterUtilsFactory=e=>{if(!1===n.has(e))throw new Error(`Alter strategy with ID '${e}' does not exist.`);return n.get(e)}},42776:(e,t,o)=>{"use strict";t.__esModule=!0,t.getListWithInsertedItems=function(e,t,o){return[...e.slice(0,t),...o,...e.slice(t)]},t.getListWithRemovedItems=function(e,t){return(0,s.arrayFilter)(e,(e=>!1===t.includes(e)))};var s=o(50095)},60991:(e,t,o)=>{"use strict";t.__esModule=!0,t.getListWithInsertedItems=function(e,t,o,i){const r=o.length?o[0]:void 0;return[...e.slice(0,r),...o.map(((e,t)=>(0,s.isFunction)(i)?i(e,t):i)),...void 0===r?[]:e.slice(r)]},t.getListWithRemovedItems=function(e,t){return(0,i.arrayFilter)(e,((e,o)=>!1===t.includes(o)))};var s=o(85015),i=o(50095)},65175:(e,t)=>{"use strict";function o(e,t,o){e.addEventListener(t,o,!1)}function s(e,t,o){e.removeEventListener(t,o,!1)}function i(e){return e.ownerDocument.defaultView.getComputedStyle(e)}t.__esModule=!0,t.createInputElementResizer=function(e){const t={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},r=e.body,n=e.createTextNode(""),a=e.createElement("span");let l;function h(){n.textContent=l.value,a.style.position="absolute",a.style.fontSize=i(l).fontSize,a.style.fontFamily=i(l).fontFamily,a.style.whiteSpace="pre",r.appendChild(a);const e=a.clientWidth+2;r.removeChild(a);const o=l.style;o.height=`${t.minHeight}px`,t.minWidth>e?o.width=`${t.minWidth}px`:e>t.maxWidth?o.width=`${t.maxWidth}px`:o.width=`${e}px`;const s=l.scrollHeight?l.scrollHeight-1:0;t.minHeight>s?o.height=`${t.minHeight}px`:t.maxHeight<s?(o.height=`${t.maxHeight}px`,o.overflowY="visible"):o.height=`${s}px`}function u(){e.defaultView.setTimeout(h,0)}return{init:function(e,s){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];l=e,function(e){if(e&&e.minHeight)if("inherit"===e.minHeight)t.minHeight=l.clientHeight;else{const o=parseInt(e.minHeight,10);isNaN(o)||(t.minHeight=o)}if(e&&e.maxHeight)if("inherit"===e.maxHeight)t.maxHeight=l.clientHeight;else{const o=parseInt(e.maxHeight,10);isNaN(o)||(t.maxHeight=o)}if(e&&e.minWidth)if("inherit"===e.minWidth)t.minWidth=l.clientWidth;else{const o=parseInt(e.minWidth,10);isNaN(o)||(t.minWidth=o)}if(e&&e.maxWidth)if("inherit"===e.maxWidth)t.maxWidth=l.clientWidth;else{const o=parseInt(e.maxWidth,10);isNaN(o)||(t.maxWidth=o)}a.firstChild||(a.className="autoResize",a.style.display="inline-block",a.appendChild(n))}(s),"TEXTAREA"===l.nodeName&&(l.style.resize="none",l.style.overflowY="",l.style.height=`${t.minHeight}px`,l.style.minWidth=`${t.minWidth}px`,l.style.maxWidth=`${t.maxWidth}px`,l.style.overflowY="hidden"),i&&(o(l,"input",h),o(l,"keydown",u)),h()},resize:h,unObserve(){s(l,"input",h),s(l,"keydown",u)}}}},21196:(e,t,o)=>{"use strict";t.__esModule=!0,t.createPriorityMap=function(){let{errorPriorityExists:e,errorPriorityNaN:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=new Map;return e=(0,i.isFunction)(e)?e:l,t=(0,i.isFunction)(t)?t:h,{addItem:function(i,r){if(!(0,s.isNumeric)(i))throw new Error(t(i));if(o.has(i))throw new Error(e(i));o.set(i,r)},getItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r;const[t,s]=a.get(e)||a.get(r);return[...o].sort(((e,o)=>e[0]<o[0]?t:s)).map((e=>e[1]))}}},o(91683);var s=o(68145),i=o(85015);const r=t.ASC="asc",n=t.DESC="desc",a=new Map([[r,[-1,1]],[n,[1,-1]]]),l=e=>`The priority '${e}' is already declared in a map.`,h=e=>`The priority '${e}' is not a number.`},88725:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.depthFirstPreOrder=n;var i=s(o(93231));o(63517),o(91683);const r=t.TRAVERSAL_DF_PRE="DF-pre-order";function n(e,t){let o=e.call(t,this);for(let s=0;s<this.childs.length;s++){if(!1===o)return!1;o=n.call(this.childs[s],e,t)}return o}const a=t.TRAVERSAL_DF_POST="DF-post-order";const l=t.TRAVERSAL_BF="BF";const h=l,u=new Map([[r,n],[a,function e(t,o){for(let s=0;s<this.childs.length;s++){if(!1===e.call(this.childs[s],t,o))return!1}return t.call(o,this)}],[l,function(e,t){const o=[this];!function s(){if(0===o.length)return;const i=o.shift();o.push(...i.childs),!1!==e.call(t,i)&&s()}()}]]);class d{constructor(e){(0,i.default)(this,"data",{}),(0,i.default)(this,"parent",null),(0,i.default)(this,"childs",[]),this.data=e}addChild(e){e.parent=this,this.childs.push(e)}cloneTree(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this;const t=new d({...e.data});for(let o=0;o<e.childs.length;o++)t.addChild(this.cloneTree(e.childs[o]));return t}replaceTreeWith(e){this.data={...e.data},this.childs=[];for(let t=0;t<e.childs.length;t++)this.addChild(e.childs[t])}walkDown(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h;if(!u.has(t))throw new Error(`Traversal strategy "${t}" does not exist`);u.get(t).call(this,e,this)}walkUp(e){const t=this,o=s=>{!1!==e.call(t,s)&&null!==s.parent&&o(s.parent)};o(this)}}t.default=d},42386:(e,t,o)=>{"use strict";t.__esModule=!0,t.createUniqueMap=function(){let{errorIdExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Map;function o(){return[...t]}function r(e){return t.has(e)}return e=(0,s.isFunction)(e)?e:i,{addItem:function(o,s){if(r(o))throw new Error(e(o));t.set(o,s)},clear:function(){t.clear()},getId:function(e){const[t]=o().find((t=>{let[o,s]=t;return e===s&&o}))||[null];return t},getItem:function(e){return t.get(e)},getItems:o,hasItem:r,removeItem:function(e){return t.delete(e)}}},o(91683);var s=o(85015);const i=e=>`The id '${e}' is already declared in a map.`},57982:(e,t,o)=>{"use strict";t.__esModule=!0,t.createUniqueSet=function(){let{errorItemExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Set;return e=(0,s.isFunction)(e)?e:i,{addItem:function(o){if(t.has(o))throw new Error(e(o));t.add(o)},clear:function(){t.clear()},getItems:function(){return[...t]}}},o(91683);var s=o(85015);const i=e=>`'${e}' value is already declared in a unique set.`},17954:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=o(83302),n=o(50095);t.default=class{constructor(e){(0,i.default)(this,"hot",null),(0,i.default)(this,"container",null),(0,i.default)(this,"injected",!1),(0,i.default)(this,"rows",[]),(0,i.default)(this,"columns",[]),(0,i.default)(this,"samples",null),(0,i.default)(this,"settings",{useHeaders:!0}),this.hot=e}addRow(e,t){if(this.columns.length)throw new Error("Doesn't support multi-dimensional table");this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));const o={row:e};this.rows.push(o),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol(e)),this.table.tr.appendChild(this.createRow(e)),this.container.container.appendChild(this.table.fragment),o.table=this.table.table}addColumnHeadersRow(e){const t=this.hot.getColHeader(0);if(null!=t){const t={row:-1};this.rows.push(t),this.container=this.createContainer(this.hot.rootElement.className),this.samples=e,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.appendColumnHeadersRow(),this.container.container.appendChild(this.table.fragment),t.table=this.table.table}}addColumn(e,t){if(this.rows.length)throw new Error("Doesn't support multi-dimensional table");this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));const o={col:e};this.columns.push(o),this.samples=t,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&null!==this.hot.getColHeader(e)&&this.hot.view.appendColHeader(e,this.table.th),this.table.tBody.appendChild(this.createCol(e)),this.container.container.appendChild(this.table.fragment),o.table=this.table.table}getHeights(e){this.injected||this.injectTable(),(0,n.arrayEach)(this.rows,(t=>{e(t.row,(0,r.outerHeight)(t.table)-1)}))}getWidths(e){this.injected||this.injectTable(),(0,n.arrayEach)(this.columns,(t=>{const{width:o}=t.table.getBoundingClientRect();e(t.col,Math.ceil(o))}))}setSettings(e){this.settings=e}setSetting(e,t){this.settings||(this.settings={}),this.settings[e]=t}getSettings(){return this.settings}getSetting(e){return this.settings?this.settings[e]:null}createColGroupsCol(e){const t=this.hot.rootDocument.createDocumentFragment();return this.hot.hasRowHeaders()&&t.appendChild(this.createColElement(-1,-1)),this.samples.forEach((o=>{(0,n.arrayEach)(o.strings,(o=>{t.appendChild(this.createColElement(o.col,e))}))})),t}createRow(e){const{rootDocument:t}=this.hot,o=t.createDocumentFragment(),s=t.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(e,s),o.appendChild(s)),this.samples.forEach((s=>{(0,n.arrayEach)(s.strings,(s=>{const i=s.col,r=this.hot.getCellMeta(e,i);r.col=i,r.row=e;const n=this.hot.getCellRenderer(r),a=t.createElement("td");a.setAttribute("ghost-table",1),n(this.hot,a,e,i,this.hot.colToProp(i),s.value,r),o.appendChild(a)}))})),o}appendColumnHeadersRow(){const{rootDocument:e}=this.hot,t=e.createDocumentFragment(),o=[];if(this.hot.hasRowHeaders()){const s=e.createElement("th");o.push([-1,s]),t.appendChild(s)}this.samples.forEach((s=>{(0,n.arrayEach)(s.strings,(s=>{const i=s.col,r=e.createElement("th");o.push([i,r]),t.appendChild(r)}))})),this.table.tHead.appendChild(t),(0,n.arrayEach)(o,(e=>{const[t,o]=e;this.hot.view.appendColHeader(t,o)}))}createCol(e){const{rootDocument:t}=this.hot,o=t.createDocumentFragment();return this.samples.forEach((s=>{(0,n.arrayEach)(s.strings,(s=>{const i=s.row,r=this.hot.getCellMeta(i,e);r.col=e,r.row=i;const n=this.hot.getCellRenderer(r),a=t.createElement("td"),l=t.createElement("tr");a.setAttribute("ghost-table",1),n(this.hot,a,i,e,this.hot.colToProp(e),s.value,r),l.appendChild(a),o.appendChild(l)}))})),o}clean(){this.rows.length=0,this.rows[-1]=void 0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()}injectTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.injected||((e||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)}removeTable(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)}createColElement(e,t){const o=this.hot.rootDocument.createElement("col");let s=0;t>=0&&e>=0&&(s=this.hot.getCellMeta(t,e).colspan);let i=this.hot.view._wt.wtTable.getStretchedColumnWidth(e);if(s>1)for(let t=e+1;t<e+s;t++)i+=this.hot.view._wt.wtTable.getStretchedColumnWidth(t);return o.style.width=`${i}px`,o}createTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,o=t.createDocumentFragment(),s=t.createElement("table"),i=t.createElement("thead"),n=t.createElement("tbody"),a=t.createElement("colgroup"),l=t.createElement("tr"),h=t.createElement("th");return this.isVertical()&&s.appendChild(a),this.isHorizontal()&&(l.appendChild(h),i.appendChild(l),s.style.tableLayout="auto",s.style.width="auto"),s.appendChild(i),this.isVertical()&&n.appendChild(l),s.appendChild(n),(0,r.addClass)(s,e),o.appendChild(s),{fragment:o,table:s,tHead:i,tBody:n,colGroup:a,tr:l,th:h}}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,o=t.createDocumentFragment(),s=t.createElement("div"),i=`htGhostTable htAutoSize ${e.trim()}`;return(0,r.addClass)(s,i),o.appendChild(s),{fragment:o,container:s}}isVertical(){return!(!this.rows.length||this.columns.length)}isHorizontal(){return!(!this.columns.length||this.rows.length)}}},29583:(e,t,o)=>{"use strict";t.__esModule=!0,t.createPaginator=function(e){let{initialPage:t=-1,size:o=(()=>0),onItemSelect:i=(()=>{}),onClear:r=(()=>{})}=e;const n=new Set;let a=(0,s.clamp)(t,-1,h()-1);function l(e,t){const o=h()-1;if(e<0&&(e=o),e>o&&(e=0),n.has(e))return-1;n.add(e);return!1===i(e,!1)&&(e=l(1===t?++e:--e,t)),e}function h(){return Math.max(o(),0)}return{setCurrentPage:function(e){e>-1&&e<h()&&!1!==i(e,!0)&&(a=e)},getCurrentPage:function(){return a},toFirstItem:function(){h()>0&&(n.clear(),a=l(0,1))},toLastItem:function(){h()>0&&(n.clear(),a=l(h()-1,-1))},toNextItem:function(){h()>0&&(n.clear(),a=l(++a,1))},toPreviousItem:function(){h()>0&&(n.clear(),a=l(--a,-1))},getSize:h,clear:function(){n.clear(),a=t,r()}}};var s=o(68145)},52870:(e,t,o)=>{"use strict";t.__esModule=!0,t._dataToHTML=function(e){const t=e.length,o=["<table>"];for(let i=0;i<t;i+=1){const r=e[i],n=r.length,a=[];0===i&&o.push("<tbody>");for(let e=0;e<n;e+=1){const t=r[e],o=(0,s.isEmpty)(t)?"":t.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20{2,}/gi,(e=>`<span style="mso-spacerun: yes">${"&nbsp;".repeat(e.length-1)} </span>`)).replace(/\t/gi,"&#9;");a.push(`<td>${o}</td>`)}o.push("<tr>",...a,"</tr>"),i+1===t&&o.push("</tbody>")}return o.push("</table>"),o.join("")},t.htmlToGridSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;const o={},s=t.createDocumentFragment(),n=t.createElement("div");s.appendChild(n);let a=e;if("string"==typeof a){const e=a.replace(/<td\b[^>]*?>([\s\S]*?)<\/\s*td>/g,(e=>{const t=e.match(/<td\b[^>]*?>/g)[0];return`${t}${e.substring(t.length,e.lastIndexOf("<")).replace(/(<(?!br)([^>]+)>)/gi,"")}</td>`}));n.insertAdjacentHTML("afterbegin",`${e}`),a=n.querySelector("table")}if(!a||!function(e){return"TABLE"===(e&&e.nodeName||"")}(a))return;const l=n.querySelector('meta[name$="enerator"]'),h=null!==a.querySelector("tbody th"),u=a.querySelector("tr"),d=u?Array.from(u.cells).reduce(((e,t)=>e+t.colSpan),0)-(h?1:0):0,c=a.tFoot&&Array.from(a.tFoot.rows)||[],g=[];let f=!1,p=0,m=0;if(a.tHead){const e=Array.from(a.tHead.rows).filter((e=>{const t=null!==e.querySelector("td");return t&&g.push(e),!t}));p=e.length,f=p>0,p>1?o.nestedHeaders=Array.from(e).reduce(((e,t)=>{const o=Array.from(t.cells).reduce(((e,t,o)=>{if(h&&0===o)return e;const{colSpan:s,innerHTML:i}=t,r=s>1?{label:i,colspan:s}:i;return e.push(r),e}),[]);return e.push(o),e}),[]):f&&(o.colHeaders=Array.from(e[0].children).reduce(((e,t,o)=>(h&&0===o||e.push(t.innerHTML),e)),[]))}g.length&&(o.fixedRowsTop=g.length);c.length&&(o.fixedRowsBottom=c.length);const w=[...g,...Array.from(a.tBodies).reduce(((e,t)=>(e.push(...Array.from(t.rows)),e)),[]),...c];m=w.length;const C=new Array(m);for(let e=0;e<m;e++)C[e]=new Array(d);const v=[],y=[];for(let e=0;e<m;e++){const t=w[e],o=Array.from(t.cells),s=o.length;for(let t=0;t<s;t++){const s=o[t],{nodeName:n,innerHTML:a,rowSpan:h,colSpan:u}=s,d=C[e].findIndex((e=>void 0===e));if("TD"===n){if(h>1||u>1){for(let t=e;t<e+h;t++)if(t<m)for(let e=d;e<d+u;e++)C[t][e]=null;const t=s.getAttribute("style");t&&t.includes("mso-ignore:colspan")||v.push({col:d,row:e,rowspan:h,colspan:u})}let t="";t=l&&/excel/gi.test(l.content)?a.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,"\r\n"):a.replace(/<br(\s*|\/)>[\r\n]?/gim,"\r\n"),C[e][d]=t.replace(r,(e=>i[e]))}else y.push(a)}}v.length&&(o.mergeCells=v);y.length&&(o.rowHeaders=y);C.length&&(o.data=C);return o},t.instanceToHTML=function(e){const t=e.hasColHeaders(),o=e.hasRowHeaders(),i=[t?-1:0,o?-1:0,e.countRows()-1,e.countCols()-1],r=e.getData(...i),n=r.length,a=n>0?r[0].length:0,l=["<table>","</table>"],h=t?["<thead>","</thead>"]:[],u=["<tbody>","</tbody>"],d=o?1:0,c=t?1:0;for(let i=0;i<n;i+=1){const n=t&&0===i,l=[];for(let t=0;t<a;t+=1){const a=!n&&o&&0===t;let h="";if(n)h=`<th>${e.getColHeader(t-d)}</th>`;else if(a)h=`<th>${e.getRowHeader(i-c)}</th>`;else{const o=r[i][t],{hidden:n,rowspan:a,colspan:l}=e.getCellMeta(i-c,t-d);if(!n){const e=[];if(a&&e.push(`rowspan="${a}"`),l&&e.push(`colspan="${l}"`),(0,s.isEmpty)(o))h=`<td ${e.join(" ")}></td>`;else{const t=o.toString().replace("<","&lt;").replace(">","&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi,"&nbsp;").replace(/\t/gi,"&#9;");h=`<td ${e.join(" ")}>${t}</td>`}}}l.push(h)}const g=["<tr>",...l,"</tr>"].join("");n?h.splice(1,0,g):u.splice(-1,0,g)}return l.splice(1,0,h.join(""),u.join("")),l.join("")},o(63517);var s=o(93315);const i={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">"},r=new RegExp(Object.keys(i).map((e=>`(${e})`)).join("|"),"gi")},45433:(e,t)=>{"use strict";t.__esModule=!0,t.hasValidParameter=function(e){return e===s},t.isRootInstance=function(e){return o.has(e)},t.registerAsRootInstance=function(e){o.set(e,!0)};const o=t.holder=new WeakMap,s=t.rootInstanceSymbol=Symbol("rootInstance")},10977:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=o(22232),n=o(68145),a=o(93315);class l{static get SAMPLE_COUNT(){return 3}constructor(e){(0,i.default)(this,"samples",null),(0,i.default)(this,"dataFactory",null),(0,i.default)(this,"customSampleCount",null),(0,i.default)(this,"allowDuplicates",!1),this.dataFactory=e}getSampleCount(){return this.customSampleCount?this.customSampleCount:l.SAMPLE_COUNT}setSampleCount(e){this.customSampleCount=e}setAllowDuplicates(e){this.allowDuplicates=e}generateRowSamples(e,t){return this.generateSamples("row",t,e)}generateColumnSamples(e,t){return this.generateSamples("col",t,e)}generateSamples(e,t,o){const s=new Map,{from:i,to:r}="number"==typeof o?{from:o,to:o}:o;return(0,n.rangeEach)(i,r,(o=>{const i=this.generateSample(e,t,o);s.set(o,i)})),s}generateSample(e,t,o){if("row"!==e&&"col"!==e)throw new Error("Unsupported sample type");const s=new Map,i="row"===e?"col":"row",l=[];return(0,n.rangeEach)(t.from,t.to,(t=>{const n="row"===e?this.dataFactory(o,t):this.dataFactory(t,o);if(!1===n)return;const{value:h,bundleSeed:u}=n,d="string"==typeof u&&u.length>0;let c;c=d?u:(0,r.isObject)(h)?`${Object.keys(h).length}`:Array.isArray(h)?`${h.length}`:`${(0,a.stringify)(h).length}`,s.has(c)||s.set(c,{needed:this.getSampleCount(),strings:[]});const g=s.get(c);if(g.needed){(!(l.indexOf(h)>-1)||this.allowDuplicates||d)&&(g.strings.push({value:h,[i]:t}),l.push(h),g.needed-=1)}})),s}}t.default=l},63800:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";o.has(e)||o.set(e,new Map);const t=o.get(e);return{register:function(e,o){t.set(e,o)},getItem:function(e){return t.get(e)},hasItem:function(e){return t.has(e)},getNames:function(){return[...t.keys()]},getValues:function(){return[...t.values()]}}};const o=t.collection=new Map},98889:(e,t)=>{"use strict";t.__esModule=!0,t.autocompleteValidator=s;const o=t.VALIDATOR_TYPE="autocomplete";function s(e,t){let o=e;null==o&&(o=""),this.allowEmpty&&""===o?t(!0):this.strict&&this.source?"function"==typeof this.source?this.source(o,i(o,t)):i(o,t)(this.source):t(!0)}function i(e,t){const o=e;return function(e){let s=!1;for(let t=0,i=e.length;t<i;t++)if(o===e[t]){s=!0;break}t(s)}}s.VALIDATOR_TYPE=o},67156:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(98889);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.autocompleteValidator=s.autocompleteValidator},88819:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.correctFormat=u,t.dateValidator=h;var i=s(o(33034)),r=o(83605),n=o(58437),a=o(48150);const l=t.VALIDATOR_TYPE="date";function h(e,t){const o=(0,r.getEditorInstance)(n.EDITOR_TYPE,this.instance);let s=e,a=!0;null==s&&(s="");let l=(0,i.default)(s,this.dateFormat||o.defaultDateFormat,!0).isValid(),h=(0,i.default)(new Date(s)).isValid()||l;if(this.allowEmpty&&""===s&&(h=!0,l=!0),h||(a=!1),!h&&l&&(a=!0),h&&!l)if(!0===this.correctFormat){const e=u(s,this.dateFormat),t=this.instance.toVisualRow(this.row),o=this.instance.toVisualColumn(this.col);this.instance.setDataAtCell(t,o,e,"dateValidator"),a=!0}else a=!1;t(a)}function u(e,t){const o=(0,i.default)((0,a.getNormalizedDate)(e)),s=(0,i.default)(e,t),r=e.search(/[A-z]/g)>-1;let n;return n=o.isValid()&&o.format("x")===s.format("x")||!s.isValid()||r?o:s,n.format(t)}h.VALIDATOR_TYPE=l},82951:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(88819);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.correctFormat=s.correctFormat,t.dateValidator=s.dateValidator},12630:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllValidators=function(){(0,a.registerValidator)(s.autocompleteValidator),(0,a.registerValidator)(i.dateValidator),(0,a.registerValidator)(r.numericValidator),(0,a.registerValidator)(n.timeValidator)};var s=o(67156);t.autocompleteValidator=s.autocompleteValidator,t.AUTOCOMPLETE_VALIDATOR=s.VALIDATOR_TYPE;var i=o(82951);t.dateValidator=i.dateValidator,t.DATE_VALIDATOR=i.VALIDATOR_TYPE;var r=o(71);t.numericValidator=r.numericValidator,t.NUMERIC_VALIDATOR=r.VALIDATOR_TYPE;var n=o(85342);t.timeValidator=n.timeValidator,t.TIME_VALIDATOR=n.VALIDATOR_TYPE;var a=o(80239);t.registerValidator=a.registerValidator,t.getRegisteredValidatorNames=a.getRegisteredValidatorNames,t.getRegisteredValidators=a.getRegisteredValidators,t.getValidator=a.getValidator,t.hasValidator=a.hasValidator},71:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(3740);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.numericValidator=s.numericValidator},3740:(e,t,o)=>{"use strict";t.__esModule=!0,t.numericValidator=r;var s=o(68145);const i=t.VALIDATOR_TYPE="numeric";function r(e,t){let o=e;null==o&&(o=""),this.allowEmpty&&""===o?t(!0):t(""!==o&&(0,s.isNumeric)(e))}r.VALIDATOR_TYPE=i},80239:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getValidator=function(e){if("function"==typeof e)return e;if(!a(e))throw Error(`No registered validator found under "${e}" name`);return n(e)},t.registerValidator=function(e,t){"string"!=typeof e&&(e=(t=e).VALIDATOR_TYPE);r(e,t)},o(91683);var i=s(o(63800));const{register:r,getItem:n,hasItem:a,getNames:l,getValues:h}=(0,i.default)("validators");t.getRegisteredValidators=h,t.getRegisteredValidatorNames=l,t.hasValidator=a},85342:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(60950);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.timeValidator=s.timeValidator},60950:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.timeValidator=a;var i=s(o(33034));const r=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"],n=t.VALIDATOR_TYPE="time";function a(e,t){const o=this.timeFormat||"h:mm:ss a";let s=!0,n=e;null===n&&(n=""),n=/^\d{3,}$/.test(n)?parseInt(n,10):n;const a=/^\d{1,2}$/.test(n);a&&(n+=":00");const l=(0,i.default)(n,r,!0).isValid()?(0,i.default)(n):(0,i.default)(n,o);let h=l.isValid(),u=(0,i.default)(n,o,!0).isValid()&&!a;if(this.allowEmpty&&""===n&&(h=!0,u=!0),h||(s=!1),!h&&u&&(s=!0),h&&!u)if(!0===this.correctFormat){const e=l.format(o),t=this.instance.toVisualRow(this.row),i=this.instance.toVisualColumn(this.col);this.instance.setDataAtCell(t,i,e,"timeValidator"),s=!0}else s=!1;t(s)}a.VALIDATOR_TYPE=n},25671:(e,t,o)=>{"use strict";o.r(t)},16247:(e,t,o)=>{"use strict";o.r(t)},97796:(e,t,o)=>{"use strict";o.r(t)},36662:(e,t,o)=>{"use strict";o.r(t)},68581:(e,t,o)=>{"use strict";o.r(t)},79498:(e,t,o)=>{"use strict";o.r(t)},63824:(e,t,o)=>{"use strict";o.r(t)},59456:(e,t,o)=>{"use strict";o.r(t)},30352:(e,t,o)=>{"use strict";o.r(t)},52097:(e,t,o)=>{"use strict";o.r(t)},25972:(e,t,o)=>{"use strict";o.r(t)},18633:(e,t,o)=>{"use strict";o.r(t)},36881:(e,t,o)=>{"use strict";o.r(t)},83988:(e,t,o)=>{"use strict";o.r(t)},70980:(e,t,o)=>{"use strict";o.r(t)},2049:(e,t,o)=>{"use strict";o.r(t)},10596:(e,t,o)=>{"use strict";o.r(t)},23118:(e,t,o)=>{"use strict";o.r(t)},67004:(e,t,o)=>{"use strict";o.r(t)},51768:(e,t,o)=>{"use strict";o.r(t)},36565:t=>{"use strict";t.exports=e},32134:e=>{"use strict";e.exports=t},33034:e=>{"use strict";e.exports=o},3333:e=>{"use strict";e.exports=s},21594:e=>{e.exports=function(e,t){return t.get?t.get.call(e):t.value},e.exports.__esModule=!0,e.exports.default=e.exports},20218:e=>{e.exports=function(e,t,o){if(t.set)t.set.call(e,o);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=o}},e.exports.__esModule=!0,e.exports.default=e.exports},18708:e=>{e.exports=function(e,t,o){if(!t.has(e))throw new TypeError("attempted to "+o+" private field on non-instance");return t.get(e)},e.exports.__esModule=!0,e.exports.default=e.exports},42538:(e,t,o)=>{var s=o(21594),i=o(18708);e.exports=function(e,t){var o=i(e,t,"get");return s(e,o)},e.exports.__esModule=!0,e.exports.default=e.exports},48427:(e,t,o)=>{var s=o(20218),i=o(18708);e.exports=function(e,t,o){var r=i(e,t,"set");return s(e,r,o),o},e.exports.__esModule=!0,e.exports.default=e.exports},93231:(e,t,o)=>{var s=o(74040);e.exports=function(e,t,o){return(t=s(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},e.exports.__esModule=!0,e.exports.default=e.exports},73203:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},56027:(e,t,o)=>{var s=o(7501).default;e.exports=function(e,t){if("object"!==s(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var i=o.call(e,t||"default");if("object"!==s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},74040:(e,t,o)=>{var s=o(7501).default,i=o(56027);e.exports=function(e){var t=i(e,"string");return"symbol"===s(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},7501:e=>{function t(o){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},61575:(e,t,o)=>{"use strict";var s=o(55893),i=o(85545),r=TypeError;e.exports=function(e){if(s(e))return e;throw new r(i(e)+" is not a function")}},99272:(e,t,o)=>{"use strict";var s=o(55893),i=String,r=TypeError;e.exports=function(e){if("object"==typeof e||s(e))return e;throw new r("Can't set "+i(e)+" as a prototype")}},49408:(e,t,o)=>{"use strict";var s=o(67936),i=o(9464),r=o(27144).f,n=s("unscopables"),a=Array.prototype;void 0===a[n]&&r(a,n,{configurable:!0,value:i(null)}),e.exports=function(e){a[n][e]=!0}},99972:(e,t,o)=>{"use strict";var s=o(15287),i=String,r=TypeError;e.exports=function(e){if(s(e))return e;throw new r(i(e)+" is not an object")}},22971:(e,t,o)=>{"use strict";var s=o(79405),i=o(29961),r=o(19969),n=function(e){return function(t,o,n){var a,l=s(t),h=r(l),u=i(n,h);if(e&&o!=o){for(;h>u;)if((a=l[u++])!=a)return!0}else for(;h>u;u++)if((e||u in l)&&l[u]===o)return e||u||0;return!e&&-1}};e.exports={includes:n(!0),indexOf:n(!1)}},58576:(e,t,o)=>{"use strict";var s=o(3877),i=o(65289),r=TypeError,n=Object.getOwnPropertyDescriptor,a=s&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=a?function(e,t){if(i(e)&&!n(e,"length").writable)throw new r("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},30039:(e,t,o)=>{"use strict";var s=o(46406);e.exports=s([].slice)},63048:(e,t,o)=>{"use strict";var s=o(46406),i=s({}.toString),r=s("".slice);e.exports=function(e){return r(i(e),8,-1)}},85683:(e,t,o)=>{"use strict";var s=o(46623),i=o(55893),r=o(63048),n=o(67936)("toStringTag"),a=Object,l="Arguments"===r(function(){return arguments}());e.exports=s?r:function(e){var t,o,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(o=function(e,t){try{return e[t]}catch(e){}}(t=a(e),n))?o:l?r(t):"Object"===(s=r(t))&&i(t.callee)?"Arguments":s}},30779:(e,t,o)=>{"use strict";var s=o(4130),i=o(6627),r=o(20010),n=o(27144);e.exports=function(e,t,o){for(var a=i(t),l=n.f,h=r.f,u=0;u<a.length;u++){var d=a[u];s(e,d)||o&&s(o,d)||l(e,d,h(t,d))}}},89251:(e,t,o)=>{"use strict";var s=o(3877),i=o(27144),r=o(49637);e.exports=s?function(e,t,o){return i.f(e,t,r(1,o))}:function(e,t,o){return e[t]=o,e}},49637:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},67205:(e,t,o)=>{"use strict";var s=o(55893),i=o(27144),r=o(73911),n=o(13630);e.exports=function(e,t,o,a){a||(a={});var l=a.enumerable,h=void 0!==a.name?a.name:t;if(s(o)&&r(o,h,a),a.global)l?e[t]=o:n(t,o);else{try{a.unsafe?e[t]&&(l=!0):delete e[t]}catch(e){}l?e[t]=o:i.f(e,t,{value:o,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},13630:(e,t,o)=>{"use strict";var s=o(77802),i=Object.defineProperty;e.exports=function(e,t){try{i(s,e,{value:t,configurable:!0,writable:!0})}catch(o){s[e]=t}return t}},39021:(e,t,o)=>{"use strict";var s=o(85545),i=TypeError;e.exports=function(e,t){if(!delete e[t])throw new i("Cannot delete property "+s(t)+" of "+s(e))}},3877:(e,t,o)=>{"use strict";var s=o(5306);e.exports=!s((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},10811:e=>{"use strict";var t="object"==typeof document&&document.all,o=void 0===t&&void 0!==t;e.exports={all:t,IS_HTMLDDA:o}},19800:(e,t,o)=>{"use strict";var s=o(77802),i=o(15287),r=s.document,n=i(r)&&i(r.createElement);e.exports=function(e){return n?r.createElement(e):{}}},59060:e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},73517:e=>{"use strict";e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},27580:(e,t,o)=>{"use strict";var s=o(22626);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(s)},16576:(e,t,o)=>{"use strict";var s=o(77802),i=o(63048);e.exports="process"===i(s.process)},22626:e=>{"use strict";e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7245:(e,t,o)=>{"use strict";var s,i,r=o(77802),n=o(22626),a=r.process,l=r.Deno,h=a&&a.versions||l&&l.version,u=h&&h.v8;u&&(i=(s=u.split("."))[0]>0&&s[0]<4?1:+(s[0]+s[1])),!i&&n&&(!(s=n.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=n.match(/Chrome\/(\d+)/))&&(i=+s[1]),e.exports=i},14286:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},93939:(e,t,o)=>{"use strict";var s=o(46406),i=Error,r=s("".replace),n=String(new i("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,l=a.test(n);e.exports=function(e,t){if(l&&"string"==typeof e&&!i.prepareStackTrace)for(;t--;)e=r(e,a,"");return e}},83452:(e,t,o)=>{"use strict";var s=o(89251),i=o(93939),r=o(64815),n=Error.captureStackTrace;e.exports=function(e,t,o,a){r&&(n?n(e,t):s(e,"stack",i(o,a)))}},64815:(e,t,o)=>{"use strict";var s=o(5306),i=o(49637);e.exports=!s((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",i(1,7)),7!==e.stack)}))},92390:(e,t,o)=>{"use strict";var s=o(77802),i=o(20010).f,r=o(89251),n=o(67205),a=o(13630),l=o(30779),h=o(75031);e.exports=function(e,t){var o,u,d,c,g,f=e.target,p=e.global,m=e.stat;if(o=p?s:m?s[f]||a(f,{}):(s[f]||{}).prototype)for(u in t){if(c=t[u],d=e.dontCallGetSet?(g=i(o,u))&&g.value:o[u],!h(p?u:f+(m?".":"#")+u,e.forced)&&void 0!==d){if(typeof c==typeof d)continue;l(c,d)}(e.sham||d&&d.sham)&&r(c,"sham",!0),n(o,u,c,e)}}},5306:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},56415:(e,t,o)=>{"use strict";var s=o(67219),i=Function.prototype,r=i.apply,n=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(s?n.bind(r):function(){return n.apply(r,arguments)})},45898:(e,t,o)=>{"use strict";var s=o(38717),i=o(61575),r=o(67219),n=s(s.bind);e.exports=function(e,t){return i(e),void 0===t?e:r?n(e,t):function(){return e.apply(t,arguments)}}},67219:(e,t,o)=>{"use strict";var s=o(5306);e.exports=!s((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},11550:(e,t,o)=>{"use strict";var s=o(67219),i=Function.prototype.call;e.exports=s?i.bind(i):function(){return i.apply(i,arguments)}},9656:(e,t,o)=>{"use strict";var s=o(3877),i=o(4130),r=Function.prototype,n=s&&Object.getOwnPropertyDescriptor,a=i(r,"name"),l=a&&"something"===function(){}.name,h=a&&(!s||s&&n(r,"name").configurable);e.exports={EXISTS:a,PROPER:l,CONFIGURABLE:h}},28692:(e,t,o)=>{"use strict";var s=o(46406),i=o(61575);e.exports=function(e,t,o){try{return s(i(Object.getOwnPropertyDescriptor(e,t)[o]))}catch(e){}}},38717:(e,t,o)=>{"use strict";var s=o(63048),i=o(46406);e.exports=function(e){if("Function"===s(e))return i(e)}},46406:(e,t,o)=>{"use strict";var s=o(67219),i=Function.prototype,r=i.call,n=s&&i.bind.bind(r,r);e.exports=s?n:function(e){return function(){return r.apply(e,arguments)}}},51570:(e,t,o)=>{"use strict";var s=o(77802),i=o(55893);e.exports=function(e,t){return arguments.length<2?(o=s[e],i(o)?o:void 0):s[e]&&s[e][t];var o}},36695:(e,t,o)=>{"use strict";var s=o(46406),i=o(65289),r=o(55893),n=o(63048),a=o(42755),l=s([].push);e.exports=function(e){if(r(e))return e;if(i(e)){for(var t=e.length,o=[],s=0;s<t;s++){var h=e[s];"string"==typeof h?l(o,h):"number"!=typeof h&&"Number"!==n(h)&&"String"!==n(h)||l(o,a(h))}var u=o.length,d=!0;return function(e,t){if(d)return d=!1,t;if(i(this))return t;for(var s=0;s<u;s++)if(o[s]===e)return t}}}},56628:(e,t,o)=>{"use strict";var s=o(61575),i=o(87707);e.exports=function(e,t){var o=e[t];return i(o)?void 0:s(o)}},77802:function(e){"use strict";var t=function(e){return e&&e.Math===Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof global&&global)||function(){return this}()||this||Function("return this")()},4130:(e,t,o)=>{"use strict";var s=o(46406),i=o(85864),r=s({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return r(i(e),t)}},63421:e=>{"use strict";e.exports={}},12343:(e,t,o)=>{"use strict";var s=o(51570);e.exports=s("document","documentElement")},33075:(e,t,o)=>{"use strict";var s=o(3877),i=o(5306),r=o(19800);e.exports=!s&&!i((function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},25366:(e,t,o)=>{"use strict";var s=o(46406),i=o(5306),r=o(63048),n=Object,a=s("".split);e.exports=i((function(){return!n("z").propertyIsEnumerable(0)}))?function(e){return"String"===r(e)?a(e,""):n(e)}:n},91074:(e,t,o)=>{"use strict";var s=o(55893),i=o(15287),r=o(71126);e.exports=function(e,t,o){var n,a;return r&&s(n=t.constructor)&&n!==o&&i(a=n.prototype)&&a!==o.prototype&&r(e,a),e}},85088:(e,t,o)=>{"use strict";var s=o(46406),i=o(55893),r=o(64830),n=s(Function.toString);i(r.inspectSource)||(r.inspectSource=function(e){return n(e)}),e.exports=r.inspectSource},71281:(e,t,o)=>{"use strict";var s=o(15287),i=o(89251);e.exports=function(e,t){s(t)&&"cause"in t&&i(e,"cause",t.cause)}},9930:(e,t,o)=>{"use strict";var s,i,r,n=o(45585),a=o(77802),l=o(15287),h=o(89251),u=o(4130),d=o(64830),c=o(50139),g=o(63421),f="Object already initialized",p=a.TypeError,m=a.WeakMap;if(n||d.state){var w=d.state||(d.state=new m);w.get=w.get,w.has=w.has,w.set=w.set,s=function(e,t){if(w.has(e))throw new p(f);return t.facade=e,w.set(e,t),t},i=function(e){return w.get(e)||{}},r=function(e){return w.has(e)}}else{var C=c("state");g[C]=!0,s=function(e,t){if(u(e,C))throw new p(f);return t.facade=e,h(e,C,t),t},i=function(e){return u(e,C)?e[C]:{}},r=function(e){return u(e,C)}}e.exports={set:s,get:i,has:r,enforce:function(e){return r(e)?i(e):s(e,{})},getterFor:function(e){return function(t){var o;if(!l(t)||(o=i(t)).type!==e)throw new p("Incompatible receiver, "+e+" required");return o}}}},65289:(e,t,o)=>{"use strict";var s=o(63048);e.exports=Array.isArray||function(e){return"Array"===s(e)}},55893:(e,t,o)=>{"use strict";var s=o(10811),i=s.all;e.exports=s.IS_HTMLDDA?function(e){return"function"==typeof e||e===i}:function(e){return"function"==typeof e}},75031:(e,t,o)=>{"use strict";var s=o(5306),i=o(55893),r=/#|\.prototype\./,n=function(e,t){var o=l[a(e)];return o===u||o!==h&&(i(t)?s(t):!!t)},a=n.normalize=function(e){return String(e).replace(r,".").toLowerCase()},l=n.data={},h=n.NATIVE="N",u=n.POLYFILL="P";e.exports=n},87707:e=>{"use strict";e.exports=function(e){return null==e}},15287:(e,t,o)=>{"use strict";var s=o(55893),i=o(10811),r=i.all;e.exports=i.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:s(e)||e===r}:function(e){return"object"==typeof e?null!==e:s(e)}},99:e=>{"use strict";e.exports=!1},103:(e,t,o)=>{"use strict";var s=o(51570),i=o(55893),r=o(2075),n=o(90345),a=Object;e.exports=n?function(e){return"symbol"==typeof e}:function(e){var t=s("Symbol");return i(t)&&r(t.prototype,a(e))}},19969:(e,t,o)=>{"use strict";var s=o(9099);e.exports=function(e){return s(e.length)}},73911:(e,t,o)=>{"use strict";var s=o(46406),i=o(5306),r=o(55893),n=o(4130),a=o(3877),l=o(9656).CONFIGURABLE,h=o(85088),u=o(9930),d=u.enforce,c=u.get,g=String,f=Object.defineProperty,p=s("".slice),m=s("".replace),w=s([].join),C=a&&!i((function(){return 8!==f((function(){}),"length",{value:8}).length})),v=String(String).split("String"),y=e.exports=function(e,t,o){"Symbol("===p(g(t),0,7)&&(t="["+m(g(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),o&&o.getter&&(t="get "+t),o&&o.setter&&(t="set "+t),(!n(e,"name")||l&&e.name!==t)&&(a?f(e,"name",{value:t,configurable:!0}):e.name=t),C&&o&&n(o,"arity")&&e.length!==o.arity&&f(e,"length",{value:o.arity});try{o&&n(o,"constructor")&&o.constructor?a&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var s=d(e);return n(s,"source")||(s.source=w(v,"string"==typeof t?t:"")),e};Function.prototype.toString=y((function(){return r(this)&&c(this).source||h(this)}),"toString")},61402:e=>{"use strict";var t=Math.ceil,o=Math.floor;e.exports=Math.trunc||function(e){var s=+e;return(s>0?o:t)(s)}},93819:(e,t,o)=>{"use strict";var s=o(42755);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:s(e)}},9464:(e,t,o)=>{"use strict";var s,i=o(99972),r=o(33872),n=o(14286),a=o(63421),l=o(12343),h=o(19800),u=o(50139),d="prototype",c="script",g=u("IE_PROTO"),f=function(){},p=function(e){return"<"+c+">"+e+"</"+c+">"},m=function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t},w=function(){try{s=new ActiveXObject("htmlfile")}catch(e){}var e,t,o;w="undefined"!=typeof document?document.domain&&s?m(s):(t=h("iframe"),o="java"+c+":",t.style.display="none",l.appendChild(t),t.src=String(o),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F):m(s);for(var i=n.length;i--;)delete w[d][n[i]];return w()};a[g]=!0,e.exports=Object.create||function(e,t){var o;return null!==e?(f[d]=i(e),o=new f,f[d]=null,o[g]=e):o=w(),void 0===t?o:r.f(o,t)}},33872:(e,t,o)=>{"use strict";var s=o(3877),i=o(27475),r=o(27144),n=o(99972),a=o(79405),l=o(51008);t.f=s&&!i?Object.defineProperties:function(e,t){n(e);for(var o,s=a(t),i=l(t),h=i.length,u=0;h>u;)r.f(e,o=i[u++],s[o]);return e}},27144:(e,t,o)=>{"use strict";var s=o(3877),i=o(33075),r=o(27475),n=o(99972),a=o(83662),l=TypeError,h=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",c="configurable",g="writable";t.f=s?r?function(e,t,o){if(n(e),t=a(t),n(o),"function"==typeof e&&"prototype"===t&&"value"in o&&g in o&&!o[g]){var s=u(e,t);s&&s[g]&&(e[t]=o.value,o={configurable:c in o?o[c]:s[c],enumerable:d in o?o[d]:s[d],writable:!1})}return h(e,t,o)}:h:function(e,t,o){if(n(e),t=a(t),n(o),i)try{return h(e,t,o)}catch(e){}if("get"in o||"set"in o)throw new l("Accessors not supported");return"value"in o&&(e[t]=o.value),e}},20010:(e,t,o)=>{"use strict";var s=o(3877),i=o(11550),r=o(71940),n=o(49637),a=o(79405),l=o(83662),h=o(4130),u=o(33075),d=Object.getOwnPropertyDescriptor;t.f=s?d:function(e,t){if(e=a(e),t=l(t),u)try{return d(e,t)}catch(e){}if(h(e,t))return n(!i(r.f,e,t),e[t])}},17397:(e,t,o)=>{"use strict";var s=o(65079),i=o(14286).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return s(e,i)}},76855:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},2075:(e,t,o)=>{"use strict";var s=o(46406);e.exports=s({}.isPrototypeOf)},65079:(e,t,o)=>{"use strict";var s=o(46406),i=o(4130),r=o(79405),n=o(22971).indexOf,a=o(63421),l=s([].push);e.exports=function(e,t){var o,s=r(e),h=0,u=[];for(o in s)!i(a,o)&&i(s,o)&&l(u,o);for(;t.length>h;)i(s,o=t[h++])&&(~n(u,o)||l(u,o));return u}},51008:(e,t,o)=>{"use strict";var s=o(65079),i=o(14286);e.exports=Object.keys||function(e){return s(e,i)}},71940:(e,t)=>{"use strict";var o={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,i=s&&!o.call({1:2},1);t.f=i?function(e){var t=s(this,e);return!!t&&t.enumerable}:o},71126:(e,t,o)=>{"use strict";var s=o(28692),i=o(99972),r=o(99272);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,o={};try{(e=s(Object.prototype,"__proto__","set"))(o,[]),t=o instanceof Array}catch(e){}return function(o,s){return i(o),r(s),t?e(o,s):o.__proto__=s,o}}():void 0)},51253:(e,t,o)=>{"use strict";var s=o(11550),i=o(55893),r=o(15287),n=TypeError;e.exports=function(e,t){var o,a;if("string"===t&&i(o=e.toString)&&!r(a=s(o,e)))return a;if(i(o=e.valueOf)&&!r(a=s(o,e)))return a;if("string"!==t&&i(o=e.toString)&&!r(a=s(o,e)))return a;throw new n("Can't convert object to primitive value")}},6627:(e,t,o)=>{"use strict";var s=o(51570),i=o(46406),r=o(17397),n=o(76855),a=o(99972),l=i([].concat);e.exports=s("Reflect","ownKeys")||function(e){var t=r.f(a(e)),o=n.f;return o?l(t,o(e)):t}},46296:(e,t,o)=>{"use strict";var s=o(27144).f;e.exports=function(e,t,o){o in e||s(e,o,{configurable:!0,get:function(){return t[o]},set:function(e){t[o]=e}})}},46762:(e,t,o)=>{"use strict";var s=o(87707),i=TypeError;e.exports=function(e){if(s(e))throw new i("Can't call method on "+e);return e}},91795:(e,t,o)=>{"use strict";var s,i=o(77802),r=o(56415),n=o(55893),a=o(73517),l=o(22626),h=o(30039),u=o(7443),d=i.Function,c=/MSIE .\./.test(l)||a&&((s=i.Bun.version.split(".")).length<3||"0"===s[0]&&(s[1]<3||"3"===s[1]&&"0"===s[2]));e.exports=function(e,t){var o=t?2:1;return c?function(s,i){var a=u(arguments.length,1)>o,l=n(s)?s:d(s),c=a?h(arguments,o):[],g=a?function(){r(l,this,c)}:l;return t?e(g,i):e(g)}:e}},50139:(e,t,o)=>{"use strict";var s=o(19231),i=o(46350),r=s("keys");e.exports=function(e){return r[e]||(r[e]=i(e))}},64830:(e,t,o)=>{"use strict";var s=o(77802),i=o(13630),r="__core-js_shared__",n=s[r]||i(r,{});e.exports=n},19231:(e,t,o)=>{"use strict";var s=o(99),i=o(64830);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.33.2",mode:s?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE",source:"https://github.com/zloirock/core-js"})},34053:(e,t,o)=>{"use strict";var s=o(7245),i=o(5306),r=o(77802).String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol("symbol detection");return!r(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&s&&s<41}))},71998:(e,t,o)=>{"use strict";var s,i,r,n,a=o(77802),l=o(56415),h=o(45898),u=o(55893),d=o(4130),c=o(5306),g=o(12343),f=o(30039),p=o(19800),m=o(7443),w=o(27580),C=o(16576),v=a.setImmediate,y=a.clearImmediate,E=a.process,S=a.Dispatch,R=a.Function,b=a.MessageChannel,_=a.String,T=0,O={},M="onreadystatechange";c((function(){s=a.location}));var I=function(e){if(d(O,e)){var t=O[e];delete O[e],t()}},N=function(e){return function(){I(e)}},A=function(e){I(e.data)},P=function(e){a.postMessage(_(e),s.protocol+"//"+s.host)};v&&y||(v=function(e){m(arguments.length,1);var t=u(e)?e:R(e),o=f(arguments,1);return O[++T]=function(){l(t,void 0,o)},i(T),T},y=function(e){delete O[e]},C?i=function(e){E.nextTick(N(e))}:S&&S.now?i=function(e){S.now(N(e))}:b&&!w?(n=(r=new b).port2,r.port1.onmessage=A,i=h(n.postMessage,n)):a.addEventListener&&u(a.postMessage)&&!a.importScripts&&s&&"file:"!==s.protocol&&!c(P)?(i=P,a.addEventListener("message",A,!1)):i=M in p("script")?function(e){g.appendChild(p("script"))[M]=function(){g.removeChild(this),I(e)}}:function(e){setTimeout(N(e),0)}),e.exports={set:v,clear:y}},29961:(e,t,o)=>{"use strict";var s=o(15930),i=Math.max,r=Math.min;e.exports=function(e,t){var o=s(e);return o<0?i(o+t,0):r(o,t)}},79405:(e,t,o)=>{"use strict";var s=o(25366),i=o(46762);e.exports=function(e){return s(i(e))}},15930:(e,t,o)=>{"use strict";var s=o(61402);e.exports=function(e){var t=+e;return t!=t||0===t?0:s(t)}},9099:(e,t,o)=>{"use strict";var s=o(15930),i=Math.min;e.exports=function(e){return e>0?i(s(e),9007199254740991):0}},85864:(e,t,o)=>{"use strict";var s=o(46762),i=Object;e.exports=function(e){return i(s(e))}},46090:(e,t,o)=>{"use strict";var s=o(11550),i=o(15287),r=o(103),n=o(56628),a=o(51253),l=o(67936),h=TypeError,u=l("toPrimitive");e.exports=function(e,t){if(!i(e)||r(e))return e;var o,l=n(e,u);if(l){if(void 0===t&&(t="default"),o=s(l,e,t),!i(o)||r(o))return o;throw new h("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},83662:(e,t,o)=>{"use strict";var s=o(46090),i=o(103);e.exports=function(e){var t=s(e,"string");return i(t)?t:t+""}},46623:(e,t,o)=>{"use strict";var s={};s[o(67936)("toStringTag")]="z",e.exports="[object z]"===String(s)},42755:(e,t,o)=>{"use strict";var s=o(85683),i=String;e.exports=function(e){if("Symbol"===s(e))throw new TypeError("Cannot convert a Symbol value to a string");return i(e)}},85545:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},46350:(e,t,o)=>{"use strict";var s=o(46406),i=0,r=Math.random(),n=s(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+n(++i+r,36)}},90345:(e,t,o)=>{"use strict";var s=o(34053);e.exports=s&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},27475:(e,t,o)=>{"use strict";var s=o(3877),i=o(5306);e.exports=s&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},7443:e=>{"use strict";var t=TypeError;e.exports=function(e,o){if(e<o)throw new t("Not enough arguments");return e}},45585:(e,t,o)=>{"use strict";var s=o(77802),i=o(55893),r=s.WeakMap;e.exports=i(r)&&/native code/.test(String(r))},67936:(e,t,o)=>{"use strict";var s=o(77802),i=o(19231),r=o(4130),n=o(46350),a=o(34053),l=o(90345),h=s.Symbol,u=i("wks"),d=l?h.for||h:h&&h.withoutSetter||n;e.exports=function(e){return r(u,e)||(u[e]=a&&r(h,e)?h[e]:d("Symbol."+e)),u[e]}},35357:(e,t,o)=>{"use strict";var s=o(51570),i=o(4130),r=o(89251),n=o(2075),a=o(71126),l=o(30779),h=o(46296),u=o(91074),d=o(93819),c=o(71281),g=o(83452),f=o(3877),p=o(99);e.exports=function(e,t,o,m){var w="stackTraceLimit",C=m?2:1,v=e.split("."),y=v[v.length-1],E=s.apply(null,v);if(E){var S=E.prototype;if(!p&&i(S,"cause")&&delete S.cause,!o)return E;var R=s("Error"),b=t((function(e,t){var o=d(m?t:e,void 0),s=m?new E(e):new E;return void 0!==o&&r(s,"message",o),g(s,b,s.stack,2),this&&n(S,this)&&u(s,this,b),arguments.length>C&&c(s,arguments[C]),s}));if(b.prototype=S,"Error"!==y?a?a(b,R):l(b,R,{name:!0}):f&&w in E&&(h(b,E,w),h(b,E,"prepareStackTrace")),l(b,E),!p)try{S.name!==y&&r(S,"name",y),S.constructor=b}catch(e){}return b}}},51344:(e,t,o)=>{"use strict";var s=o(92390),i=o(85864),r=o(19969),n=o(15930),a=o(49408);s({target:"Array",proto:!0},{at:function(e){var t=i(this),o=r(t),s=n(e),a=s>=0?s:o+s;return a<0||a>=o?void 0:t[a]}}),a("at")},63517:(e,t,o)=>{"use strict";var s=o(92390),i=o(85864),r=o(19969),n=o(58576),a=o(59060);s({target:"Array",proto:!0,arity:1,forced:o(5306)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=i(this),o=r(t),s=arguments.length;a(o+s);for(var l=0;l<s;l++)t[o]=arguments[l],o++;return n(t,o),o}})},9815:(e,t,o)=>{"use strict";o(49408)("flat")},57270:(e,t,o)=>{"use strict";var s=o(92390),i=o(85864),r=o(19969),n=o(58576),a=o(39021),l=o(59060);s({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}()},{unshift:function(e){var t=i(this),o=r(t),s=arguments.length;if(s){l(o+s);for(var h=o;h--;){var u=h+s;h in t?t[u]=t[h]:a(t,u)}for(var d=0;d<s;d++)t[d]=arguments[d]}return n(t,o+s)}})},91683:(e,t,o)=>{"use strict";var s=o(92390),i=o(77802),r=o(56415),n=o(35357),a="WebAssembly",l=i[a],h=7!==new Error("e",{cause:7}).cause,u=function(e,t){var o={};o[e]=n(e,t,h),s({global:!0,constructor:!0,arity:1,forced:h},o)},d=function(e,t){if(l&&l[e]){var o={};o[e]=n(a+"."+e,t,h),s({target:a,stat:!0,constructor:!0,arity:1,forced:h},o)}};u("Error",(function(e){return function(t){return r(e,this,arguments)}})),u("EvalError",(function(e){return function(t){return r(e,this,arguments)}})),u("RangeError",(function(e){return function(t){return r(e,this,arguments)}})),u("ReferenceError",(function(e){return function(t){return r(e,this,arguments)}})),u("SyntaxError",(function(e){return function(t){return r(e,this,arguments)}})),u("TypeError",(function(e){return function(t){return r(e,this,arguments)}})),u("URIError",(function(e){return function(t){return r(e,this,arguments)}})),d("CompileError",(function(e){return function(t){return r(e,this,arguments)}})),d("LinkError",(function(e){return function(t){return r(e,this,arguments)}})),d("RuntimeError",(function(e){return function(t){return r(e,this,arguments)}}))},68983:(e,t,o)=>{"use strict";var s=o(92390),i=o(51570),r=o(56415),n=o(11550),a=o(46406),l=o(5306),h=o(55893),u=o(103),d=o(30039),c=o(36695),g=o(34053),f=String,p=i("JSON","stringify"),m=a(/./.exec),w=a("".charAt),C=a("".charCodeAt),v=a("".replace),y=a(1..toString),E=/[\uD800-\uDFFF]/g,S=/^[\uD800-\uDBFF]$/,R=/^[\uDC00-\uDFFF]$/,b=!g||l((function(){var e=i("Symbol")("stringify detection");return"[null]"!==p([e])||"{}"!==p({a:e})||"{}"!==p(Object(e))})),_=l((function(){return'"\\udf06\\ud834"'!==p("\udf06\ud834")||'"\\udead"'!==p("\udead")})),T=function(e,t){var o=d(arguments),s=c(t);if(h(s)||void 0!==e&&!u(e))return o[1]=function(e,t){if(h(s)&&(t=n(s,this,f(e),t)),!u(t))return t},r(p,null,o)},O=function(e,t,o){var s=w(o,t-1),i=w(o,t+1);return m(S,e)&&!m(R,i)||m(R,e)&&!m(S,s)?"\\u"+y(C(e,0),16):e};p&&s({target:"JSON",stat:!0,arity:3,forced:b||_},{stringify:function(e,t,o){var s=d(arguments),i=r(b?T:p,null,s);return _&&"string"==typeof i?v(i,E,O):i}})},1555:(e,t,o)=>{"use strict";var s=o(92390),i=o(77802),r=o(71998).clear;s({global:!0,bind:!0,enumerable:!0,forced:i.clearImmediate!==r},{clearImmediate:r})},97552:(e,t,o)=>{"use strict";o(1555),o(66845)},66845:(e,t,o)=>{"use strict";var s=o(92390),i=o(77802),r=o(71998).set,n=o(91795),a=i.setImmediate?n(r,!1):r;s({global:!0,bind:!0,enumerable:!0,forced:i.setImmediate!==a},{setImmediate:a})}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}};return i[e].call(o.exports,o,o.exports,n),o.exports}n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{"use strict";var e=a,t=n(73203);var o=D(n(73596));o.CellCoords,o.CellRange;var s,i,r,l,h,u=n(62929),d=D(n(75244)),c=n(33165),g=t(n(80265)),f=t(n(17954)),p=D(n(52870)),m=D(n(50095)),w=D(n(37595)),C=D(n(65320)),v=D(n(48150)),y=D(n(7374)),E=D(n(85015)),S=D(n(93315)),R=D(n(68145)),b=D(n(22232)),_=D(n(18609)),T=D(n(80151)),O=D(n(83302)),M=D(n(24449)),I=n(83605),N=n(7462),A=n(80239),P=n(65324),x=n(52036),H=n(36026);function k(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(k=function(e){return e?o:t})(e)}function D(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=k(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(0,u.registerAllModules)(),(0,g.default)(o.default),o.default.__GhostTable=f.default,o.default._getListenersCounter=d.getListenersCounter,o.default._getRegisteredMapsCounter=c.getRegisteredMapsCounter,o.default.EventManager=d.default;const L=[m,w,C,v,y,E,S,R,b,_,T,p],W=[O,M];o.default.helper={},o.default.dom={},m.arrayEach(L,(e=>{m.arrayEach(Object.getOwnPropertyNames(e),(t=>{"_"!==t.charAt(0)&&(o.default.helper[t]=e[t])}))})),m.arrayEach(W,(e=>{m.arrayEach(Object.getOwnPropertyNames(e),(t=>{"_"!==t.charAt(0)&&(o.default.dom[t]=e[t])}))})),o.default.cellTypes=null!==(s=o.default.cellTypes)&&void 0!==s?s:{},m.arrayEach((0,P.getRegisteredCellTypeNames)(),(e=>{o.default.cellTypes[e]=(0,P.getCellType)(e)})),o.default.cellTypes.registerCellType=P.registerCellType,o.default.cellTypes.getCellType=P.getCellType,o.default.editors=null!==(i=o.default.editors)&&void 0!==i?i:{},m.arrayEach((0,I.getRegisteredEditorNames)(),(e=>{o.default.editors[`${_.toUpperCaseFirst(e)}Editor`]=(0,I.getEditor)(e)})),o.default.editors.registerEditor=I.registerEditor,o.default.editors.getEditor=I.getEditor,o.default.renderers=null!==(r=o.default.renderers)&&void 0!==r?r:{},m.arrayEach((0,N.getRegisteredRendererNames)(),(e=>{const t=(0,N.getRenderer)(e);"base"===e&&(o.default.renderers.cellDecorator=t),o.default.renderers[`${_.toUpperCaseFirst(e)}Renderer`]=t})),o.default.renderers.registerRenderer=N.registerRenderer,o.default.renderers.getRenderer=N.getRenderer,o.default.validators=null!==(l=o.default.validators)&&void 0!==l?l:{},m.arrayEach((0,A.getRegisteredValidatorNames)(),(e=>{o.default.validators[`${_.toUpperCaseFirst(e)}Validator`]=(0,A.getValidator)(e)})),o.default.validators.registerValidator=A.registerValidator,o.default.validators.getValidator=A.getValidator,o.default.plugins=null!==(h=o.default.plugins)&&void 0!==h?h:{},m.arrayEach((0,x.getPluginsNames)(),(e=>{o.default.plugins[e]=(0,x.getPlugin)(e)})),o.default.plugins[`${_.toUpperCaseFirst(H.BasePlugin.PLUGIN_KEY)}Plugin`]=H.BasePlugin,o.default.plugins.registerPlugin=x.registerPlugin,o.default.plugins.getPlugin=x.getPlugin;e.default=o.default})(),a=a.default})()));
92
+ that does not exist. Before activation, register the context using the "addContext" method.`);d=e},isCtrlPressed:()=>!f&&(m.isPressed("control")||m.isPressed("meta")),releasePressedKeys:()=>m.releasePressedKeys(),destroy:()=>m.unmount()}}},67152:(e,t,o)=>{"use strict";t.__esModule=!0,t.useRecorder=function(e,t,o,s,d){const c=e=>l.includes(e),g=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=[];return e.altKey&&o.push("alt"),t&&(e.ctrlKey||e.metaKey)?o.push("control/meta"):(e.ctrlKey&&o.push("control"),e.metaKey&&o.push("meta")),e.shiftKey&&o.push("shift"),o},f=e=>{if(!1===t(e))return;const n=o(e);if(229===e.keyCode||!1===n||(0,r.isImmediatePropagationStopped)(e))return;const l=(0,i.normalizeEventKey)(e);let h=[];c(l)||(h=g(e));const u=[l].concat(h);!d(e,u)&&((0,a.isMacOS)()&&h.includes("meta")||!(0,a.isMacOS)()&&h.includes("control"))&&d(e,[l].concat(g(e,!0))),s(e)},p=e=>{const t=(0,i.normalizeEventKey)(e);c(t)&&h.press(t)},m=e=>{const t=(0,i.normalizeEventKey)(e);c(t)&&h.release(t)},w=()=>{h.releaseAll()};return{mount:()=>{let t=e;for(u+=1;t;)1===u&&(t.document.documentElement.addEventListener("keydown",p),t.document.documentElement.addEventListener("keyup",m)),t.document.documentElement.addEventListener("keydown",f),t.document.documentElement.addEventListener("blur",w),t=(0,n.getParentWindow)(t)},unmount:()=>{let t=e;for(u-=1;t;)0===u&&(t.document.documentElement.removeEventListener("keydown",p),t.document.documentElement.removeEventListener("keyup",m)),t.document.documentElement.removeEventListener("keydown",f),t.document.documentElement.removeEventListener("blur",w),t=(0,n.getParentWindow)(t)},isPressed:e=>h.isPressed(e),releasePressedKeys:()=>h.releaseAll()}},o(63517);var s=o(18071),i=o(32464),r=o(24449),n=o(83302),a=o(37595);const l=["meta","alt","shift","control"],h=(0,s.createKeysObserver)();let u=0},32464:(e,t)=>{"use strict";t.__esModule=!0;const o=new Map([[" ","space"],["spacebar","space"],["scroll","scrolllock"],["del","delete"],["esc","escape"],["medianexttrack","mediatracknext"],["mediaprevioustrack","mediatrackprevious"],["volumeup","audiovolumeup"],["volumedown","audiovolumedown"],["volumemute","audiovolumemute"],["multiply","*"],["add","+"],["divide","/"],["subtract","-"],["left","arrowleft"],["right","arrowright"],["up","arrowup"],["down","arrowdown"]]);t.normalizeKeys=e=>e.map((e=>{const t=e.toLowerCase();return o.has(t)?o.get(t):t})).sort().join("+");t.getKeysList=e=>e.split("+");const s=new RegExp("^(?:Key|Digit)([A-Z0-9])$"),i=new Set(["Backquote","Minus","Equal","BracketLeft","BracketRight","Backslash","Semicolon","Quote","Comma","Period","Slash"]);t.normalizeEventKey=e=>{let{key:t,code:o}=e,r=t;return s.test(o)?r=o.replace(s,"$1"):i.has(o)&&(r=o),r.toLowerCase()}},54833:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=s(o(42538)),n=s(o(48427)),a=o(83302),l=s(o(75244)),h=o(24449),u=s(o(21280)),d=o(50743),c=o(45433),g=o(5386);function f(e,t){m(e,t),t.add(e)}function p(e,t,o){m(e,t),t.set(e,o)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function w(e,t,o){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return o}var C=new WeakMap,v=new WeakMap,y=new WeakMap,E=new WeakMap,S=new WeakMap,R=new WeakMap,b=new WeakMap,_=new WeakSet,T=new WeakSet;function O(){return parseInt(this.hot.rootElement.getAttribute((0,g.A11Y_COLCOUNT)()[0]),10)}function M(e){const t=w(this,_,O).call(this)+e;(0,a.setAttribute)(this.hot.rootElement,...(0,g.A11Y_COLCOUNT)(t))}t.default=class{constructor(e){f(this,T),f(this,_),(0,i.default)(this,"hot",void 0),(0,i.default)(this,"eventManager",void 0),(0,i.default)(this,"settings",void 0),(0,i.default)(this,"THEAD",void 0),(0,i.default)(this,"TBODY",void 0),(0,i.default)(this,"_wt",void 0),(0,i.default)(this,"activeWt",void 0),p(this,C,{writable:!0,value:0}),p(this,v,{writable:!0,value:0}),(0,i.default)(this,"postponedAdjustElementsSize",!1),p(this,y,{writable:!0,value:!1}),p(this,E,{writable:!0,value:void 0}),p(this,S,{writable:!0,value:void 0}),p(this,R,{writable:!0,value:0}),p(this,b,{writable:!0,value:0}),this.hot=e,this.eventManager=new l.default(this.hot),this.settings=this.hot.getSettings(),this.createElements(),this.registerEvents(),this.initializeWalkontable()}render(){this.hot.isRenderSuspended()||(this.hot.runHooks("beforeRender",this.hot.forceFullRender),this.postponedAdjustElementsSize&&(this.postponedAdjustElementsSize=!1,this.adjustElementsSize(!0)),this._wt.draw(!this.hot.forceFullRender),this.hot.runHooks("afterRender",this.hot.forceFullRender),this.hot.forceFullRender=!1,this.hot.renderCall=!1)}adjustElementsSize(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.hot.isRenderSuspended()?this.postponedAdjustElementsSize=!0:this._wt.wtOverlays.adjustElementsSize(e)}getCellAtCoords(e,t){const o=this._wt.getCell(e,t);return o<0?null:o}scrollViewport(e,t,o,s,i){return this._wt.scrollViewport(e,t,o,s,i)}scrollViewportHorizontally(e,t,o){return this._wt.scrollViewportHorizontally(e,t,o)}scrollViewportVertically(e,t,o){return this._wt.scrollViewportVertically(e,t,o)}createElements(){const{rootElement:e,rootDocument:t}=this.hot,o=e.getAttribute("style");o&&e.setAttribute("data-originalstyle",o),(0,a.addClass)(e,"handsontable"),(0,n.default)(this,S,t.createElement("TABLE")),(0,a.addClass)((0,r.default)(this,S),"htCore"),this.hot.getSettings().tableClassName&&(0,a.addClass)((0,r.default)(this,S),this.hot.getSettings().tableClassName),this.settings.ariaTags&&((0,a.setAttribute)((0,r.default)(this,S),[(0,g.A11Y_PRESENTATION)()]),(0,a.setAttribute)(e,[(0,g.A11Y_TREEGRID)(),(0,g.A11Y_ROWCOUNT)(-1),(0,g.A11Y_COLCOUNT)(this.hot.countCols()),(0,g.A11Y_MULTISELECTABLE)()])),this.THEAD=t.createElement("THEAD"),(0,r.default)(this,S).appendChild(this.THEAD),this.TBODY=t.createElement("TBODY"),(0,r.default)(this,S).appendChild(this.TBODY),this.hot.table=(0,r.default)(this,S),this.hot.container.insertBefore((0,r.default)(this,S),this.hot.container.firstChild)}registerEvents(){const{rootElement:e,rootDocument:t,selection:o}=this.hot,s=t.documentElement;this.eventManager.addEventListener(e,"mousedown",(e=>{if((0,n.default)(this,y,!0),!this.isTextSelectionAllowed(e.target)){const{rootWindow:t}=this.hot;(0,a.clearTextSelection)(t),e.preventDefault(),t.focus()}})),this.eventManager.addEventListener(e,"mouseup",(()=>{(0,n.default)(this,y,!1)})),this.eventManager.addEventListener(e,"mousemove",(e=>{(0,r.default)(this,y)&&!this.isTextSelectionAllowed(e.target)&&(this.settings.fragmentSelection&&(0,a.clearTextSelection)(this.hot.rootWindow),e.preventDefault())})),this.eventManager.addEventListener(s,"keyup",(e=>{o.isInProgress()&&!e.shiftKey&&o.finish()})),this.eventManager.addEventListener(s,"mouseup",(s=>{o.isInProgress()&&(0,h.isLeftClick)(s)&&o.finish(),(0,n.default)(this,E,!1);const i=(0,a.isOutsideInput)(t.activeElement);(0,a.isInput)(t.activeElement)&&!i||!i&&(o.isSelected()||o.isSelectedByAnyHeader()||e.contains(s.target)||(0,h.isRightClick)(s))||this.hot.unlisten()})),this.eventManager.addEventListener(s,"contextmenu",(e=>{o.isInProgress()&&(0,h.isRightClick)(e)&&(o.finish(),(0,n.default)(this,E,!1))})),this.eventManager.addEventListener(s,"touchend",(()=>{o.isInProgress()&&o.finish(),(0,n.default)(this,E,!1)})),this.eventManager.addEventListener(s,"mousedown",(o=>{const i=o.target,n=o.x||o.clientX,l=o.y||o.clientY;let h=o.target;if((0,r.default)(this,E)||!e||!this.hot.view)return;const{holder:u}=this.hot.view._wt.wtTable;if(h===u){const e=(0,a.getScrollbarWidth)(t);if(t.elementFromPoint(n+e,l)!==u||t.elementFromPoint(n,l+e)!==u)return}else for(;h!==s;){if(null===h){if(o.isTargetWebComponent)break;return}if(h===e)return;h=h.parentNode}("function"==typeof this.settings.outsideClickDeselects?this.settings.outsideClickDeselects(i):this.settings.outsideClickDeselects)?this.hot.deselectCell():this.hot.destroyEditor(!1,!1)})),this.eventManager.addEventListener((0,r.default)(this,S),"selectstart",(e=>{this.settings.fragmentSelection||(0,a.isInput)(e.target)||e.preventDefault()}))}translateFromRenderableToVisualCoords(e){let{row:t,col:o}=e;return this.hot._createCellCoords(...this.translateFromRenderableToVisualIndex(t,o))}translateFromRenderableToVisualIndex(e,t){let o=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e,s=t>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(t):t;return null===o&&(o=e),null===s&&(s=t),[o,s]}countRenderableIndexes(e,t){const o=Math.min(e.getNotTrimmedIndexesLength(),t),s=e.getNearestNotHiddenIndex(o-1,-1);return null===s?0:e.getRenderableFromVisualIndex(s)+1}countRenderableColumns(){return this.countRenderableIndexes(this.hot.columnIndexMapper,this.settings.maxCols)}countRenderableRows(){return this.countRenderableIndexes(this.hot.rowIndexMapper,this.settings.maxRows)}countNotHiddenRowIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.rowIndexMapper,this.countRenderableRows())}countNotHiddenColumnIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.columnIndexMapper,this.countRenderableColumns())}countNotHiddenIndexes(e,t,o,s){if(isNaN(e)||e<0)return 0;const i=o.getNearestNotHiddenIndex(e,t),r=o.getRenderableFromVisualIndex(i);if(!Number.isInteger(r))return 0;let n=0;return t<0?n=r+1:t>0&&(n=s-r),n}countNotHiddenFixedColumnsStart(){const e=this.hot.countCols(),t=Math.min(parseInt(this.settings.fixedColumnsStart,10),e)-1;return this.countNotHiddenColumnIndexes(t,-1)}countNotHiddenFixedRowsTop(){const e=this.hot.countRows(),t=Math.min(parseInt(this.settings.fixedRowsTop,10),e)-1;return this.countNotHiddenRowIndexes(t,-1)}countNotHiddenFixedRowsBottom(){const e=this.hot.countRows(),t=Math.max(e-parseInt(this.settings.fixedRowsBottom,10),0);return this.countNotHiddenRowIndexes(t,1)}countRenderableColumnsInRange(e,t){let o=0;for(let s=e;s<=t;s++)null!==this.hot.columnIndexMapper.getRenderableFromVisualIndex(s)&&(o+=1);return o}countRenderableRowsInRange(e,t){let o=0;for(let s=e;s<=t;s++)null!==this.hot.rowIndexMapper.getRenderableFromVisualIndex(s)&&(o+=1);return o}isMainTableNotFullyCoveredByOverlays(){const e=this.countNotHiddenFixedRowsTop()+this.countNotHiddenFixedRowsBottom(),t=this.countNotHiddenFixedColumnsStart();return this.hot.countRenderedRows()>e&&this.hot.countRenderedCols()>t}initializeWalkontable(){const e={ariaTags:this.settings.ariaTags,rtlMode:this.hot.isRtl(),externalRowCalculator:this.hot.getPlugin("autoRowSize")&&this.hot.getPlugin("autoRowSize").isEnabled(),table:(0,r.default)(this,S),isDataViewInstance:()=>(0,c.isRootInstance)(this.hot),preventOverflow:()=>this.settings.preventOverflow,preventWheel:()=>this.settings.preventWheel,stretchH:()=>this.settings.stretchH,data:(e,t)=>this.hot.getDataAtCell(...this.translateFromRenderableToVisualIndex(e,t)),totalRows:()=>this.countRenderableRows(),totalColumns:()=>this.countRenderableColumns(),fixedColumnsStart:()=>this.countNotHiddenFixedColumnsStart(),fixedRowsTop:()=>this.countNotHiddenFixedRowsTop(),fixedRowsBottom:()=>this.countNotHiddenFixedRowsBottom(),shouldRenderInlineStartOverlay:()=>this.settings.fixedColumnsStart>0||e.rowHeaders().length>0,shouldRenderTopOverlay:()=>this.settings.fixedRowsTop>0||e.columnHeaders().length>0,shouldRenderBottomOverlay:()=>this.settings.fixedRowsBottom>0,minSpareRows:()=>this.settings.minSpareRows,renderAllRows:this.settings.renderAllRows,renderAllColumns:this.settings.renderAllColumns,rowHeaders:()=>{const e=[];return this.hot.hasRowHeaders()&&e.push(((e,t)=>{const o=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e;this.appendRowHeader(o,t)})),this.hot.runHooks("afterGetRowHeaderRenderers",e),(0,n.default)(this,v,e.length),this.hot.getSettings().ariaTags&&w(this,_,O).call(this)===this.hot.countCols()&&w(this,T,M).call(this,(0,r.default)(this,v)),e},columnHeaders:()=>{const e=[];return this.hot.hasColHeaders()&&e.push(((e,t)=>{const o=e>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(e):e;this.appendColHeader(o,t)})),this.hot.runHooks("afterGetColumnHeaderRenderers",e),(0,n.default)(this,C,e.length),e},columnWidth:e=>{const t=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e);return this.hot.getColWidth(null===t?e:t)},rowHeight:e=>{const t=this.hot.rowIndexMapper.getVisualFromRenderableIndex(e);return this.hot.getRowHeight(null===t?e:t)},cellRenderer:(e,t,o)=>{const[s,i]=this.translateFromRenderableToVisualIndex(e,t),r=this.hot.runHooks("modifyGetCellCoords",s,i);let n=s,a=i;Array.isArray(r)&&([n,a]=r);const l=this.hot.getCellMeta(n,a),h=this.hot.colToProp(a);let u=this.hot.getDataAtRowProp(n,h);this.hot.hasHook("beforeValueRender")&&(u=this.hot.runHooks("beforeValueRender",u,l)),this.hot.runHooks("beforeRenderer",o,s,i,h,u,l),this.hot.getCellRenderer(l)(this.hot,o,s,i,h,u,l),this.hot.runHooks("afterRenderer",o,s,i,h,u,l)},selections:this.hot.selection.highlight,hideBorderOnMouseDownOver:()=>this.settings.fragmentSelection,onWindowResize:()=>{this.hot&&!this.hot.isDestroyed&&this.hot.refreshDimensions()},onContainerElementResize:()=>{this.hot&&!this.hot.isDestroyed&&(0,a.isVisible)(this.hot.rootElement)&&this.hot.refreshDimensions()},onCellMouseDown:(e,t,o,s)=>{const i=this.translateFromRenderableToVisualCoords(t),r={row:!1,column:!1,cell:!1};this.hot.listen(),this.activeWt=s,(0,n.default)(this,E,!0),this.hot.runHooks("beforeOnCellMouseDown",e,i,o,r),(0,h.isImmediatePropagationStopped)(e)||((0,d.handleMouseEvent)(e,{coords:i,selection:this.hot.selection,controller:r,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseDown",e,i,o),this.activeWt=this._wt)},onCellContextMenu:(e,t,o,s)=>{const i=this.translateFromRenderableToVisualCoords(t);this.activeWt=s,(0,n.default)(this,E,!1),this.hot.selection.isInProgress()&&this.hot.selection.finish(),this.hot.runHooks("beforeOnCellContextMenu",e,i,o),(0,h.isImmediatePropagationStopped)(e)||(this.hot.runHooks("afterOnCellContextMenu",e,i,o),this.activeWt=this._wt)},onCellMouseOut:(e,t,o,s)=>{const i=this.translateFromRenderableToVisualCoords(t);this.activeWt=s,this.hot.runHooks("beforeOnCellMouseOut",e,i,o),(0,h.isImmediatePropagationStopped)(e)||(this.hot.runHooks("afterOnCellMouseOut",e,i,o),this.activeWt=this._wt)},onCellMouseOver:(e,t,o,s)=>{const i=this.translateFromRenderableToVisualCoords(t),n={row:!1,column:!1,cell:!1};this.activeWt=s,this.hot.runHooks("beforeOnCellMouseOver",e,i,o,n),(0,h.isImmediatePropagationStopped)(e)||((0,r.default)(this,E)&&(0,d.handleMouseEvent)(e,{coords:i,selection:this.hot.selection,controller:n,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseOver",e,i,o),this.activeWt=this._wt)},onCellMouseUp:(e,t,o,s)=>{const i=this.translateFromRenderableToVisualCoords(t);this.activeWt=s,this.hot.runHooks("beforeOnCellMouseUp",e,i,o),(0,h.isImmediatePropagationStopped)(e)||this.hot.isDestroyed||(this.hot.runHooks("afterOnCellMouseUp",e,i,o),this.activeWt=this._wt)},onCellCornerMouseDown:e=>{e.preventDefault(),this.hot.runHooks("afterOnCellCornerMouseDown",e)},onCellCornerDblClick:e=>{e.preventDefault(),this.hot.runHooks("afterOnCellCornerDblClick",e)},beforeDraw:(e,t)=>this.beforeRender(e,t),onDraw:e=>this.afterRender(e),onBeforeViewportScrollVertically:e=>{const t=this.hot.rowIndexMapper,o=e<0;let s=e;return o||(s=t.getVisualFromRenderableIndex(e),null!==s)?(s=this.hot.runHooks("beforeViewportScrollVertically",s),this.hot.runHooks("beforeViewportScroll"),o?s:t.getRenderableFromVisualIndex(s)):e},onBeforeViewportScrollHorizontally:e=>{const t=this.hot.columnIndexMapper,o=e<0;let s=e;return o||(s=t.getVisualFromRenderableIndex(e),null!==s)?(s=this.hot.runHooks("beforeViewportScrollHorizontally",s),this.hot.runHooks("beforeViewportScroll"),o?s:t.getRenderableFromVisualIndex(s)):e},onScrollVertically:()=>{this.hot.runHooks("afterScrollVertically"),this.hot.runHooks("afterScroll")},onScrollHorizontally:()=>{this.hot.runHooks("afterScrollHorizontally"),this.hot.runHooks("afterScroll")},onBeforeRemoveCellClassNames:()=>this.hot.runHooks("beforeRemoveCellClassNames"),onBeforeHighlightingRowHeader:(e,t,o)=>{const s=this.hot.rowIndexMapper,i=e<0;let r=e;i||(r=s.getVisualFromRenderableIndex(e));const n=this.hot.runHooks("beforeHighlightingRowHeader",r,t,o);return i?n:s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(n,1))},onBeforeHighlightingColumnHeader:(e,t,o)=>{const s=this.hot.columnIndexMapper,i=e<0;let r=e;i||(r=s.getVisualFromRenderableIndex(e));const n=this.hot.runHooks("beforeHighlightingColumnHeader",r,t,o);return i?n:s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(n,1))},onAfterDrawSelection:(e,t,o)=>{let s;const[i,r]=this.translateFromRenderableToVisualIndex(e,t),n=this.hot.selection.getSelectedRange();if(n.size()>0){const e=n.peekByIndex(null!=o?o:0);s=[e.from.row,e.from.col,e.to.row,e.to.col]}return this.hot.runHooks("afterDrawSelection",i,r,s,o)},onBeforeDrawBorders:(e,t)=>{const[o,s,i,r]=e,n=[this.hot.rowIndexMapper.getVisualFromRenderableIndex(o),this.hot.columnIndexMapper.getVisualFromRenderableIndex(s),this.hot.rowIndexMapper.getVisualFromRenderableIndex(i),this.hot.columnIndexMapper.getVisualFromRenderableIndex(r)];return this.hot.runHooks("beforeDrawBorders",n,t)},onBeforeTouchScroll:()=>this.hot.runHooks("beforeTouchScroll"),onAfterMomentumScroll:()=>this.hot.runHooks("afterMomentumScroll"),onBeforeStretchingColumnWidth:(e,t)=>{const o=this.hot.columnIndexMapper.getVisualFromRenderableIndex(t);return this.hot.runHooks("beforeStretchingColumnWidth",e,o)},onModifyRowHeaderWidth:e=>this.hot.runHooks("modifyRowHeaderWidth",e),onModifyGetCellCoords:(e,t,o)=>{const s=this.hot.rowIndexMapper,i=this.hot.columnIndexMapper,r=t>=0?i.getVisualFromRenderableIndex(t):t,n=e>=0?s.getVisualFromRenderableIndex(e):e,a=this.hot.runHooks("modifyGetCellCoords",n,r,o);if(Array.isArray(a)){const[e,t,o,r]=a;return[e>=0?s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(e,1)):e,t>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(t,1)):t,o>=0?s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(o,-1)):o,r>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(r,-1)):r]}},viewportRowCalculatorOverride:e=>{let t=this.settings.viewportRowRenderingOffset;if("auto"===t&&this.settings.fixedRowsTop&&(t=10),t>0||"auto"===t){const o=this.countRenderableRows(),s=e.startRow,i=e.endRow;if("number"==typeof t)e.startRow=Math.max(s-t,0),e.endRow=Math.min(i+t,o-1);else if("auto"===t){const t=Math.ceil(i/o*12);e.startRow=Math.max(s-t,0),e.endRow=Math.min(i+t,o-1)}}this.hot.runHooks("afterViewportRowCalculatorOverride",e)},viewportColumnCalculatorOverride:e=>{let t=this.settings.viewportColumnRenderingOffset;if("auto"===t&&this.settings.fixedColumnsStart&&(t=10),t>0||"auto"===t){const o=this.countRenderableColumns(),s=e.startColumn,i=e.endColumn;if("number"==typeof t&&(e.startColumn=Math.max(s-t,0),e.endColumn=Math.min(i+t,o-1)),"auto"===t){const t=Math.ceil(i/o*6);e.startColumn=Math.max(s-t,0),e.endColumn=Math.min(i+t,o-1)}}this.hot.runHooks("afterViewportColumnCalculatorOverride",e)},rowHeaderWidth:()=>this.settings.rowHeaderWidth,columnHeaderHeight:()=>{const e=this.hot.runHooks("modifyColumnHeaderHeight");return this.settings.columnHeaderHeight||e}};this.hot.runHooks("beforeInitWalkontable",e),this._wt=new u.default(e),this.activeWt=this._wt;const t=this._wt.wtTable.spreader,{width:o,height:s}=this.hot.rootElement.getBoundingClientRect();this.setLastSize(o,s),this.eventManager.addEventListener(t,"mousedown",(e=>{e.target===t&&3===e.which&&e.stopPropagation()})),this.eventManager.addEventListener(t,"contextmenu",(e=>{e.target===t&&3===e.which&&e.stopPropagation()})),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"click",(()=>{this.settings.observeDOMVisibility&&this._wt.drawInterrupted&&(this.hot.forceFullRender=!0,this.render())}))}isTextSelectionAllowed(e){if((0,a.isInput)(e))return!0;const t=(0,a.isChildOf)(e,this.hot.view._wt.wtTable.spreader);return!(!0!==this.settings.fragmentSelection||!t)||(!("cell"!==this.settings.fragmentSelection||!this.isSelectedOnlyCell()||!t)||!(this.settings.fragmentSelection||!this.isCellEdited()||!this.isSelectedOnlyCell()))}isMouseDown(){return(0,r.default)(this,E)}isSelectedOnlyCell(){var e,t;return null!==(e=null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingleCell())&&void 0!==e&&e}isCellEdited(){const e=this.hot.getActiveEditor();return e&&e.isOpened()}beforeRender(e,t){e&&this.hot.runHooks("beforeViewRender",this.hot.forceFullRender,t)}afterRender(e){e&&this.hot.runHooks("afterViewRender",this.hot.forceFullRender)}appendRowHeader(e,t){if(t.firstChild){const o=t.firstChild;if(!(0,a.hasClass)(o,"relative"))return(0,a.empty)(t),void this.appendRowHeader(e,t);this.updateCellHeader(o.querySelector(".rowHeader"),e,this.hot.getRowHeader)}else{const{rootDocument:o,getRowHeader:s}=this.hot,i=o.createElement("div"),r=o.createElement("span");i.className="relative",r.className="rowHeader",this.updateCellHeader(r,e,s),i.appendChild(r),t.appendChild(i)}this.hot.runHooks("afterGetRowHeader",e,t)}appendColHeader(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hot.getColHeader,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;if(t.firstChild){const i=t.firstChild;(0,a.hasClass)(i,"relative")?this.updateCellHeader(i.querySelector(".colHeader"),e,o,s):((0,a.empty)(t),this.appendColHeader(e,t,o,s))}else{const{rootDocument:i}=this.hot,r=i.createElement("div"),n=i.createElement("span");r.className="relative",n.className="colHeader",this.settings.ariaTags&&((0,a.setAttribute)(r,...(0,g.A11Y_PRESENTATION)()),(0,a.setAttribute)(n,...(0,g.A11Y_PRESENTATION)())),this.updateCellHeader(n,e,o,s),r.appendChild(n),t.appendChild(r)}this.hot.runHooks("afterGetColHeader",e,t,s)}updateCellHeader(e,t,o){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=t;const r=this._wt.wtOverlays.getParentOverlay(e)||this._wt;e.parentNode&&((0,a.hasClass)(e,"colHeader")?i=r.wtTable.columnFilter.sourceToRendered(t):(0,a.hasClass)(e,"rowHeader")&&(i=r.wtTable.rowFilter.sourceToRendered(t))),i>-1?(0,a.fastInnerHTML)(e,o(t,s)):((0,a.fastInnerText)(e,String.fromCharCode(160)),(0,a.addClass)(e,"cornerHeader"))}maximumVisibleElementWidth(e){const t=this._wt.wtViewport.getWorkspaceWidth()-e;return t>0?t:0}maximumVisibleElementHeight(e){const t=this._wt.wtViewport.getWorkspaceHeight()-e;return t>0?t:0}setLastSize(e,t){(0,n.default)(this,R,e),(0,n.default)(this,b,t)}getLastSize(){return{width:(0,r.default)(this,R),height:(0,r.default)(this,b)}}getFirstFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getFirstVisibleRow())}getLastFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getLastVisibleRow())}getFirstFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getFirstVisibleColumn())}getLastFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this.hot.view._wt.wtScroll.getLastVisibleColumn())}getColumnHeadersCount(){return(0,r.default)(this,C)}getRowHeadersCount(){return(0,r.default)(this,v)}destroy(){this._wt.destroy(),this.eventManager.destroy()}}},18756:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(42538)),r=s(o(48427)),n=o(56617),a=o(69939);function l(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var h=new WeakMap,u=new WeakMap,d=new WeakMap,c=new WeakMap,g=new WeakMap;t.ChangesObservable=class{constructor(){let{initialIndexValue:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};l(this,h,{writable:!0,value:new Set}),l(this,u,{writable:!0,value:[]}),l(this,d,{writable:!0,value:[]}),l(this,c,{writable:!0,value:!1}),l(this,g,{writable:!0,value:!1}),(0,r.default)(this,g,null!=e&&e)}createObserver(){const e=new n.ChangesObserver;return(0,i.default)(this,h).add(e),e.addLocalHook("unsubscribe",(()=>{(0,i.default)(this,h).delete(e)})),e._writeInitialChanges((0,a.arrayDiff)((0,i.default)(this,u),(0,i.default)(this,d))),e}emit(e){let t=(0,i.default)(this,d);(0,i.default)(this,c)&&(0,i.default)(this,u).length===e.length||(0===e.length?e=new Array(t.length).fill((0,i.default)(this,g)):(0,r.default)(this,u,new Array(e.length).fill((0,i.default)(this,g))),(0,i.default)(this,c)||((0,r.default)(this,c,!0),t=(0,i.default)(this,u)));const o=(0,a.arrayDiff)(t,e);(0,i.default)(this,h).forEach((e=>e._write(o))),(0,r.default)(this,d,e)}}},56617:(e,t,o)=>{"use strict";o(91683);var s=o(73203);t.__esModule=!0;var i=s(o(48427)),r=s(o(42538)),n=o(22232),a=s(o(65718));function l(e,t,o){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.set(e,o)}var h=new WeakMap;class u{constructor(){l(this,h,{writable:!0,value:[]})}subscribe(e){return this.addLocalHook("change",e),this._write((0,r.default)(this,h)),this}unsubscribe(){return this.runLocalHooks("unsubscribe"),this.clearLocalHooks(),this}_write(e){return e.length>0&&this.runLocalHooks("change",e),this}_writeInitialChanges(e){(0,i.default)(this,h,e)}}t.ChangesObserver=u,(0,n.mixin)(u,a.default)},69939:(e,t,o)=>{"use strict";t.__esModule=!0,t.arrayDiff=function(e,t){const o=[];let s=0,i=0;for(;s<e.length&&i<t.length;s++,i++)e[s]!==t[i]&&o.push({op:"replace",index:i,oldValue:e[s],newValue:t[i]});for(;s<t.length;s++)o.push({op:"insert",index:s,oldValue:void 0,newValue:t[s]});for(;i<e.length;i++)o.push({op:"remove",index:i,oldValue:e[i],newValue:void 0});return o},o(63517)},33165:(e,t,o)=>{"use strict";t.__esModule=!0;var s={IndexMapper:!0,getRegisteredMapsCounter:!0,getIncreasedIndexes:!0,getDecreasedIndexes:!0,alterUtilsFactory:!0},i=o(78661);t.IndexMapper=i.IndexMapper;var r=o(64760);t.getRegisteredMapsCounter=r.getRegisteredMapsCounter;var n=o(55759);t.getIncreasedIndexes=n.getIncreasedIndexes,t.getDecreasedIndexes=n.getDecreasedIndexes,t.alterUtilsFactory=n.alterUtilsFactory;var a=o(22460);Object.keys(a).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===a[e]||(t[e]=a[e]))}))},78661:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683);var i=s(o(93231)),r=o(50095),n=o(22460),a=o(67734),l=s(o(65718)),h=o(22232),u=o(93315),d=o(18756);new Set;class c{constructor(){(0,i.default)(this,"indexesSequence",new n.IndexesSequence),(0,i.default)(this,"trimmingMapsCollection",new a.AggregatedCollection((e=>e.some((e=>!0===e))),!1)),(0,i.default)(this,"hidingMapsCollection",new a.AggregatedCollection((e=>e.some((e=>!0===e))),!1)),(0,i.default)(this,"variousMapsCollection",new a.MapCollection),(0,i.default)(this,"hidingChangesObservable",new d.ChangesObservable({initialIndexValue:!1})),(0,i.default)(this,"notTrimmedIndexesCache",[]),(0,i.default)(this,"notHiddenIndexesCache",[]),(0,i.default)(this,"isBatched",!1),(0,i.default)(this,"indexesSequenceChanged",!1),(0,i.default)(this,"indexesChangeSource",void 0),(0,i.default)(this,"trimmedIndexesChanged",!1),(0,i.default)(this,"hiddenIndexesChanged",!1),(0,i.default)(this,"renderablePhysicalIndexesCache",[]),(0,i.default)(this,"fromPhysicalToVisualIndexesCache",new Map),(0,i.default)(this,"fromVisualToRenderableIndexesCache",new Map),this.indexesSequence.addLocalHook("change",(()=>{this.indexesSequenceChanged=!0,this.updateCache(),this.runLocalHooks("indexesSequenceChange",this.indexesChangeSource),this.runLocalHooks("change",this.indexesSequence,null)})),this.trimmingMapsCollection.addLocalHook("change",(e=>{this.trimmedIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.trimmingMapsCollection)})),this.hidingMapsCollection.addLocalHook("change",(e=>{this.hiddenIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.hidingMapsCollection)})),this.variousMapsCollection.addLocalHook("change",(e=>{this.runLocalHooks("change",e,this.variousMapsCollection)}))}suspendOperations(){this.isBatched=!0}resumeOperations(){this.isBatched=!1,this.updateCache()}createChangesObserver(e){if("hiding"!==e)throw new Error(`Unsupported index map type "${e}".`);return this.hidingChangesObservable.createObserver()}createAndRegisterIndexMap(e,t,o){return this.registerMap(e,(0,n.createIndexMap)(t,o))}registerMap(e,t){if(this.trimmingMapsCollection.get(e)||this.hidingMapsCollection.get(e)||this.variousMapsCollection.get(e))throw Error(`Map with name "${e}" has been already registered.`);t instanceof n.TrimmingMap?this.trimmingMapsCollection.register(e,t):t instanceof n.HidingMap?this.hidingMapsCollection.register(e,t):this.variousMapsCollection.register(e,t);const o=this.getNumberOfIndexes();return o>0&&t.init(o),t}unregisterMap(e){this.trimmingMapsCollection.unregister(e),this.hidingMapsCollection.unregister(e),this.variousMapsCollection.unregister(e)}unregisterAll(){this.trimmingMapsCollection.unregisterAll(),this.hidingMapsCollection.unregisterAll(),this.variousMapsCollection.unregisterAll()}getPhysicalFromVisualIndex(e){const t=this.notTrimmedIndexesCache[e];return(0,u.isDefined)(t)?t:null}getPhysicalFromRenderableIndex(e){const t=this.renderablePhysicalIndexesCache[e];return(0,u.isDefined)(t)?t:null}getVisualFromPhysicalIndex(e){const t=this.fromPhysicalToVisualIndexesCache.get(e);return(0,u.isDefined)(t)?t:null}getVisualFromRenderableIndex(e){return this.getVisualFromPhysicalIndex(this.getPhysicalFromRenderableIndex(e))}getRenderableFromVisualIndex(e){const t=this.fromVisualToRenderableIndexesCache.get(e);return(0,u.isDefined)(t)?t:null}getNearestNotHiddenIndex(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null===this.getPhysicalFromVisualIndex(e))return null;if(this.fromVisualToRenderableIndexesCache.has(e))return e;const s=Array.from(this.fromVisualToRenderableIndexesCache.keys());let i=-1;return i=t>0?s.findIndex((t=>t>e)):s.reverse().findIndex((t=>t<e)),-1===i?o?this.getNearestNotHiddenIndex(e,-t,!1):null:s[i]}initToLength(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getNumberOfIndexes();this.notTrimmedIndexesCache=[...new Array(e).keys()],this.notHiddenIndexesCache=[...new Array(e).keys()],this.suspendOperations(),this.indexesChangeSource="init",this.indexesSequence.init(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.initEvery(e),this.resumeOperations(),this.suspendOperations(),this.hidingMapsCollection.initEvery(e),this.variousMapsCollection.initEvery(e),this.resumeOperations(),this.runLocalHooks("init")}fitToLength(e){const t=this.getNumberOfIndexes();if(e<t){const t=[...Array(this.getNumberOfIndexes()-e).keys()].map((t=>t+e));this.removeIndexes(t)}else this.insertIndexes(t,e-t)}getIndexesSequence(){return this.indexesSequence.getValues()}setIndexesSequence(e){void 0===this.indexesChangeSource&&(this.indexesChangeSource="update"),this.indexesSequence.setValues(e),"update"===this.indexesChangeSource&&(this.indexesChangeSource=void 0)}getNotTrimmedIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.notTrimmedIndexesCache;return this.getIndexesSequence().filter((e=>!1===this.isTrimmed(e)))}getNotTrimmedIndexesLength(){return this.getNotTrimmedIndexes().length}getNotHiddenIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.notHiddenIndexesCache;return this.getIndexesSequence().filter((e=>!1===this.isHidden(e)))}getNotHiddenIndexesLength(){return this.getNotHiddenIndexes().length}getRenderableIndexes(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.renderablePhysicalIndexesCache;return this.getNotTrimmedIndexes().filter((e=>!1===this.isHidden(e)))}getRenderableIndexesLength(){return this.getRenderableIndexes().length}getNumberOfIndexes(){return this.getIndexesSequence().length}moveIndexes(e,t){"number"==typeof e&&(e=[e]);const o=(0,r.arrayMap)(e,(e=>this.getPhysicalFromVisualIndex(e))),s=this.getNotTrimmedIndexesLength(),i=e.length,a=(0,n.getListWithRemovedItems)(this.getIndexesSequence(),o),l=a.filter((e=>!1===this.isTrimmed(e)));let h=a.indexOf(l[l.length-1])+1;if(t+i<s){const e=l[t];h=a.indexOf(e)}this.indexesChangeSource="move",this.setIndexesSequence((0,n.getListWithInsertedItems)(a,h,o)),this.indexesChangeSource=void 0}isTrimmed(e){return this.trimmingMapsCollection.getMergedValueAtIndex(e)}isHidden(e){return this.hidingMapsCollection.getMergedValueAtIndex(e)}insertIndexes(e,t){const o=this.getNotTrimmedIndexes()[e],s=(0,u.isDefined)(o)?o:this.getNumberOfIndexes(),i=this.getIndexesSequence().includes(o)?this.getIndexesSequence().indexOf(o):this.getNumberOfIndexes(),n=(0,r.arrayMap)(new Array(t).fill(s),((e,t)=>e+t));this.suspendOperations(),this.indexesChangeSource="insert",this.indexesSequence.insert(i,n),this.indexesChangeSource=void 0,this.trimmingMapsCollection.insertToEvery(i,n),this.hidingMapsCollection.insertToEvery(i,n),this.variousMapsCollection.insertToEvery(i,n),this.resumeOperations()}removeIndexes(e){this.suspendOperations(),this.indexesChangeSource="remove",this.indexesSequence.remove(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.removeFromEvery(e),this.hidingMapsCollection.removeFromEvery(e),this.variousMapsCollection.removeFromEvery(e),this.resumeOperations()}updateCache(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.indexesSequenceChanged||this.trimmedIndexesChanged||this.hiddenIndexesChanged;(!0===e||!1===this.isBatched&&!0===t)&&(this.trimmingMapsCollection.updateCache(),this.hidingMapsCollection.updateCache(),this.notTrimmedIndexesCache=this.getNotTrimmedIndexes(!1),this.notHiddenIndexesCache=this.getNotHiddenIndexes(!1),this.renderablePhysicalIndexesCache=this.getRenderableIndexes(!1),this.cacheFromPhysicalToVisualIndexes(),this.cacheFromVisualToRenderableIndexes(),this.hiddenIndexesChanged&&this.hidingChangesObservable.emit(this.hidingMapsCollection.getMergedValues()),this.runLocalHooks("cacheUpdated",{indexesSequenceChanged:this.indexesSequenceChanged,trimmedIndexesChanged:this.trimmedIndexesChanged,hiddenIndexesChanged:this.hiddenIndexesChanged}),this.indexesSequenceChanged=!1,this.trimmedIndexesChanged=!1,this.hiddenIndexesChanged=!1)}cacheFromPhysicalToVisualIndexes(){const e=this.getNotTrimmedIndexesLength();this.fromPhysicalToVisualIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromVisualIndex(t);this.fromPhysicalToVisualIndexesCache.set(e,t)}}cacheFromVisualToRenderableIndexes(){const e=this.getRenderableIndexesLength();this.fromVisualToRenderableIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromRenderableIndex(t),o=this.getVisualFromPhysicalIndex(e);this.fromVisualToRenderableIndexesCache.set(o,t)}}}t.IndexMapper=c,(0,h.mixin)(c,l.default)},40302:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(64760),n=o(50095),a=o(93315);class l extends r.MapCollection{constructor(e,t){super(),(0,i.default)(this,"mergedValuesCache",[]),(0,i.default)(this,"aggregationFunction",void 0),(0,i.default)(this,"fallbackValue",void 0),this.aggregationFunction=e,this.fallbackValue=t}getMergedValues(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.mergedValuesCache;if(0===this.getLength())return[];const e=(0,n.arrayMap)(this.get(),(e=>e.getValues())),t=[],o=(0,a.isDefined)(e[0])&&e[0].length||0;for(let s=0;s<o;s+=1){const o=[];for(let t=0;t<this.getLength();t+=1)o.push(e[t][s]);t.push(o)}return(0,n.arrayMap)(t,this.aggregationFunction)}getMergedValueAtIndex(e,t){const o=this.getMergedValues(t)[e];return(0,a.isDefined)(o)?o:this.fallbackValue}updateCache(){this.mergedValuesCache=this.getMergedValues(!1)}}t.AggregatedCollection=l},67734:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(40302);Object.keys(s).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===s[e]||(t[e]=s[e]))}));var i=o(64760);Object.keys(i).forEach((function(e){"default"!==e&&"__esModule"!==e&&(e in t&&t[e]===i[e]||(t[e]=i[e]))}))},64760:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getRegisteredMapsCounter=function(){return l};var i=s(o(93231)),r=o(93315),n=o(22232),a=s(o(65718));let l=0;class h{constructor(){(0,i.default)(this,"collection",new Map)}register(e,t){!1===this.collection.has(e)&&(this.collection.set(e,t),t.addLocalHook("change",(()=>this.runLocalHooks("change",t))),l+=1)}unregister(e){const t=this.collection.get(e);(0,r.isDefined)(t)&&(t.destroy(),this.collection.delete(e),this.runLocalHooks("change",t),l-=1)}unregisterAll(){this.collection.forEach(((e,t)=>this.unregister(t))),this.collection.clear()}get(e){return(0,r.isUndefined)(e)?Array.from(this.collection.values()):this.collection.get(e)}getLength(){return this.collection.size}removeFromEvery(e){this.collection.forEach((t=>{t.remove(e)}))}insertToEvery(e,t){this.collection.forEach((o=>{o.insert(e,t)}))}initEvery(e){this.collection.forEach((t=>{t.init(e)}))}}t.MapCollection=h,(0,n.mixin)(h,a.default)},27866:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517);var s=o(40986),i=o(50095);class r extends s.PhysicalIndexToValueMap{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getHiddenIndexes(){return(0,i.arrayReduce)(this.getValues(),((e,t,o)=>(t&&e.push(o),e)),[])}}t.HidingMap=r},22460:(e,t,o)=>{"use strict";t.__esModule=!0;var s={createIndexMap:!0,HidingMap:!0,IndexMap:!0,LinkedPhysicalIndexToValueMap:!0,PhysicalIndexToValueMap:!0,TrimmingMap:!0};t.createIndexMap=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!d.has(e))throw new Error(`The provided map type ("${e}") does not exist.`);return new(d.get(e))(t)},o(91683);var i=o(27866);t.HidingMap=i.HidingMap;var r=o(30196);t.IndexMap=r.IndexMap;var n=o(95902);t.LinkedPhysicalIndexToValueMap=n.LinkedPhysicalIndexToValueMap;var a=o(40986);t.PhysicalIndexToValueMap=a.PhysicalIndexToValueMap;var l=o(27770);t.TrimmingMap=l.TrimmingMap;var h=o(23083);Object.keys(h).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===h[e]||(t[e]=h[e]))}));var u=o(42776);Object.keys(u).forEach((function(e){"default"!==e&&"__esModule"!==e&&(Object.prototype.hasOwnProperty.call(s,e)||e in t&&t[e]===u[e]||(t[e]=u[e]))}));const d=new Map([["hiding",i.HidingMap],["index",r.IndexMap],["linkedPhysicalIndexToValue",n.LinkedPhysicalIndexToValueMap],["physicalIndexToValue",a.PhysicalIndexToValueMap],["trimming",l.TrimmingMap]])},30196:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(63517);var i=s(o(93231)),r=o(68145),n=o(22232),a=o(85015),l=s(o(65718));class h{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;(0,i.default)(this,"indexedValues",[]),(0,i.default)(this,"initValueOrFn",void 0),this.initValueOrFn=e}getValues(){return this.indexedValues}getValueAtIndex(e){const t=this.indexedValues;if(e<t.length)return t[e]}setValues(e){this.indexedValues=e.slice(),this.runLocalHooks("change")}setValueAtIndex(e,t){return e<this.indexedValues.length&&(this.indexedValues[e]=t,this.runLocalHooks("change"),!0)}clear(){this.setDefaultValues()}getLength(){return this.getValues().length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.indexedValues.length=0,(0,a.isFunction)(this.initValueOrFn)?(0,r.rangeEach)(e-1,(e=>this.indexedValues.push(this.initValueOrFn(e)))):(0,r.rangeEach)(e-1,(()=>this.indexedValues.push(this.initValueOrFn))),this.runLocalHooks("change")}init(e){return this.setDefaultValues(e),this.runLocalHooks("init"),this}insert(){this.runLocalHooks("change")}remove(){this.runLocalHooks("change")}destroy(){this.clearLocalHooks(),this.indexedValues=null,this.initValueOrFn=null}}t.IndexMap=h,(0,n.mixin)(h,l.default)},23083:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(30196),i=o(42776),r=o(55759);class n extends s.IndexMap{constructor(){super((e=>e))}insert(e,t){const o=(0,r.getIncreasedIndexes)(this.indexedValues,t);this.indexedValues=(0,i.getListWithInsertedItems)(o,e,t),super.insert(e,t)}remove(e){const t=(0,i.getListWithRemovedItems)(this.indexedValues,e);this.indexedValues=(0,r.getDecreasedIndexes)(t,e),super.remove(e)}}t.IndexesSequence=n},95902:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0;var i=s(o(93231)),r=o(30196),n=o(60991),a=o(42776),l=o(75445),h=o(85015);class u extends r.IndexMap{constructor(){super(...arguments),(0,i.default)(this,"orderOfIndexes",[])}getValues(){return this.orderOfIndexes.map((e=>this.indexedValues[e]))}setValues(e){this.orderOfIndexes=[...Array(e.length).keys()],super.setValues(e)}setValueAtIndex(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.orderOfIndexes.length;return e<this.indexedValues.length&&(this.indexedValues[e]=t,!1===this.orderOfIndexes.includes(e)&&this.orderOfIndexes.splice(o,0,e),this.runLocalHooks("change"),!0)}clearValue(e){this.orderOfIndexes=(0,a.getListWithRemovedItems)(this.orderOfIndexes,[e]),(0,h.isFunction)(this.initValueOrFn)?super.setValueAtIndex(e,this.initValueOrFn(e)):super.setValueAtIndex(e,this.initValueOrFn)}getLength(){return this.orderOfIndexes.length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.orderOfIndexes.length=0,super.setDefaultValues(e)}insert(e,t){this.indexedValues=(0,n.getListWithInsertedItems)(this.indexedValues,e,t,this.initValueOrFn),this.orderOfIndexes=(0,l.getIncreasedIndexes)(this.orderOfIndexes,t),super.insert(e,t)}remove(e){this.indexedValues=(0,n.getListWithRemovedItems)(this.indexedValues,e),this.orderOfIndexes=(0,a.getListWithRemovedItems)(this.orderOfIndexes,e),this.orderOfIndexes=(0,l.getDecreasedIndexes)(this.orderOfIndexes,e),super.remove(e)}getEntries(){return this.orderOfIndexes.map((e=>[e,this.getValueAtIndex(e)]))}}t.LinkedPhysicalIndexToValueMap=u},40986:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(30196),i=o(60991);class r extends s.IndexMap{insert(e,t){this.indexedValues=(0,i.getListWithInsertedItems)(this.indexedValues,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){this.indexedValues=(0,i.getListWithRemovedItems)(this.indexedValues,e),super.remove(e)}}t.PhysicalIndexToValueMap=r},27770:(e,t,o)=>{"use strict";t.__esModule=!0,o(63517);var s=o(40986),i=o(50095);class r extends s.PhysicalIndexToValueMap{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getTrimmedIndexes(){return(0,i.arrayReduce)(this.getValues(),((e,t,o)=>(t&&e.push(o),e)),[])}}t.TrimmingMap=r},75445:(e,t,o)=>{"use strict";t.__esModule=!0,t.getDecreasedIndexes=function(e,t){return(0,s.arrayMap)(e,(e=>e-t.filter((t=>t<e)).length))},t.getIncreasedIndexes=function(e,t){const o=t[0],i=t.length;return(0,s.arrayMap)(e,(e=>e>=o?e+i:e))};var s=o(50095)},55759:(e,t,o)=>{"use strict";t.__esModule=!0,o(91683);var s=o(75445);t.getDecreasedIndexes=s.getDecreasedIndexes,t.getIncreasedIndexes=s.getIncreasedIndexes;var i=o(42776),r=o(60991);const n=new Map([["indexesSequence",{getListWithInsertedItems:i.getListWithInsertedItems,getListWithRemovedItems:i.getListWithRemovedItems}],["physicallyIndexed",{getListWithInsertedItems:r.getListWithInsertedItems,getListWithRemovedItems:r.getListWithRemovedItems}]]);t.alterUtilsFactory=e=>{if(!1===n.has(e))throw new Error(`Alter strategy with ID '${e}' does not exist.`);return n.get(e)}},42776:(e,t,o)=>{"use strict";t.__esModule=!0,t.getListWithInsertedItems=function(e,t,o){return[...e.slice(0,t),...o,...e.slice(t)]},t.getListWithRemovedItems=function(e,t){return(0,s.arrayFilter)(e,(e=>!1===t.includes(e)))};var s=o(50095)},60991:(e,t,o)=>{"use strict";t.__esModule=!0,t.getListWithInsertedItems=function(e,t,o,i){const r=o.length?o[0]:void 0;return[...e.slice(0,r),...o.map(((e,t)=>(0,s.isFunction)(i)?i(e,t):i)),...void 0===r?[]:e.slice(r)]},t.getListWithRemovedItems=function(e,t){return(0,i.arrayFilter)(e,((e,o)=>!1===t.includes(o)))};var s=o(85015),i=o(50095)},65175:(e,t)=>{"use strict";function o(e,t,o){e.addEventListener(t,o,!1)}function s(e,t,o){e.removeEventListener(t,o,!1)}function i(e){return e.ownerDocument.defaultView.getComputedStyle(e)}t.__esModule=!0,t.createInputElementResizer=function(e){const t={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},r=e.body,n=e.createTextNode(""),a=e.createElement("span");let l;function h(){n.textContent=l.value,a.style.position="absolute",a.style.fontSize=i(l).fontSize,a.style.fontFamily=i(l).fontFamily,a.style.whiteSpace="pre",r.appendChild(a);const e=a.clientWidth+2;r.removeChild(a);const o=l.style;o.height=`${t.minHeight}px`,t.minWidth>e?o.width=`${t.minWidth}px`:e>t.maxWidth?o.width=`${t.maxWidth}px`:o.width=`${e}px`;const s=l.scrollHeight?l.scrollHeight-1:0;t.minHeight>s?o.height=`${t.minHeight}px`:t.maxHeight<s?(o.height=`${t.maxHeight}px`,o.overflowY="visible"):o.height=`${s}px`}function u(){e.defaultView.setTimeout(h,0)}return{init:function(e,s){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];l=e,function(e){if(e&&e.minHeight)if("inherit"===e.minHeight)t.minHeight=l.clientHeight;else{const o=parseInt(e.minHeight,10);isNaN(o)||(t.minHeight=o)}if(e&&e.maxHeight)if("inherit"===e.maxHeight)t.maxHeight=l.clientHeight;else{const o=parseInt(e.maxHeight,10);isNaN(o)||(t.maxHeight=o)}if(e&&e.minWidth)if("inherit"===e.minWidth)t.minWidth=l.clientWidth;else{const o=parseInt(e.minWidth,10);isNaN(o)||(t.minWidth=o)}if(e&&e.maxWidth)if("inherit"===e.maxWidth)t.maxWidth=l.clientWidth;else{const o=parseInt(e.maxWidth,10);isNaN(o)||(t.maxWidth=o)}a.firstChild||(a.className="autoResize",a.style.display="inline-block",a.appendChild(n))}(s),"TEXTAREA"===l.nodeName&&(l.style.resize="none",l.style.overflowY="",l.style.height=`${t.minHeight}px`,l.style.minWidth=`${t.minWidth}px`,l.style.maxWidth=`${t.maxWidth}px`,l.style.overflowY="hidden"),i&&(o(l,"input",h),o(l,"keydown",u)),h()},resize:h,unObserve(){s(l,"input",h),s(l,"keydown",u)}}}},21196:(e,t,o)=>{"use strict";t.__esModule=!0,t.createPriorityMap=function(){let{errorPriorityExists:e,errorPriorityNaN:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const o=new Map;return e=(0,i.isFunction)(e)?e:l,t=(0,i.isFunction)(t)?t:h,{addItem:function(i,r){if(!(0,s.isNumeric)(i))throw new Error(t(i));if(o.has(i))throw new Error(e(i));o.set(i,r)},getItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r;const[t,s]=a.get(e)||a.get(r);return[...o].sort(((e,o)=>e[0]<o[0]?t:s)).map((e=>e[1]))}}},o(91683);var s=o(68145),i=o(85015);const r=t.ASC="asc",n=t.DESC="desc",a=new Map([[r,[-1,1]],[n,[1,-1]]]),l=e=>`The priority '${e}' is already declared in a map.`,h=e=>`The priority '${e}' is not a number.`},88725:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.depthFirstPreOrder=n;var i=s(o(93231));o(63517),o(91683);const r=t.TRAVERSAL_DF_PRE="DF-pre-order";function n(e,t){let o=e.call(t,this);for(let s=0;s<this.childs.length;s++){if(!1===o)return!1;o=n.call(this.childs[s],e,t)}return o}const a=t.TRAVERSAL_DF_POST="DF-post-order";const l=t.TRAVERSAL_BF="BF";const h=l,u=new Map([[r,n],[a,function e(t,o){for(let s=0;s<this.childs.length;s++){if(!1===e.call(this.childs[s],t,o))return!1}return t.call(o,this)}],[l,function(e,t){const o=[this];!function s(){if(0===o.length)return;const i=o.shift();o.push(...i.childs),!1!==e.call(t,i)&&s()}()}]]);class d{constructor(e){(0,i.default)(this,"data",{}),(0,i.default)(this,"parent",null),(0,i.default)(this,"childs",[]),this.data=e}addChild(e){e.parent=this,this.childs.push(e)}cloneTree(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this;const t=new d({...e.data});for(let o=0;o<e.childs.length;o++)t.addChild(this.cloneTree(e.childs[o]));return t}replaceTreeWith(e){this.data={...e.data},this.childs=[];for(let t=0;t<e.childs.length;t++)this.addChild(e.childs[t])}walkDown(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h;if(!u.has(t))throw new Error(`Traversal strategy "${t}" does not exist`);u.get(t).call(this,e,this)}walkUp(e){const t=this,o=s=>{!1!==e.call(t,s)&&null!==s.parent&&o(s.parent)};o(this)}}t.default=d},42386:(e,t,o)=>{"use strict";t.__esModule=!0,t.createUniqueMap=function(){let{errorIdExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Map;function o(){return[...t]}function r(e){return t.has(e)}return e=(0,s.isFunction)(e)?e:i,{addItem:function(o,s){if(r(o))throw new Error(e(o));t.set(o,s)},clear:function(){t.clear()},getId:function(e){const[t]=o().find((t=>{let[o,s]=t;return e===s&&o}))||[null];return t},getItem:function(e){return t.get(e)},getItems:o,hasItem:r,removeItem:function(e){return t.delete(e)}}},o(91683);var s=o(85015);const i=e=>`The id '${e}' is already declared in a map.`},57982:(e,t,o)=>{"use strict";t.__esModule=!0,t.createUniqueSet=function(){let{errorItemExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Set;return e=(0,s.isFunction)(e)?e:i,{addItem:function(o){if(t.has(o))throw new Error(e(o));t.add(o)},clear:function(){t.clear()},getItems:function(){return[...t]}}},o(91683);var s=o(85015);const i=e=>`'${e}' value is already declared in a unique set.`},17954:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=o(83302),n=o(50095);t.default=class{constructor(e){(0,i.default)(this,"hot",null),(0,i.default)(this,"container",null),(0,i.default)(this,"injected",!1),(0,i.default)(this,"rows",[]),(0,i.default)(this,"columns",[]),(0,i.default)(this,"samples",null),(0,i.default)(this,"settings",{useHeaders:!0}),this.hot=e}addRow(e,t){if(this.columns.length)throw new Error("Doesn't support multi-dimensional table");this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));const o={row:e};this.rows.push(o),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol(e)),this.table.tr.appendChild(this.createRow(e)),this.container.container.appendChild(this.table.fragment),o.table=this.table.table}addColumnHeadersRow(e){const t=this.hot.getColHeader(0);if(null!=t){const t={row:-1};this.rows.push(t),this.container=this.createContainer(this.hot.rootElement.className),this.samples=e,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.appendColumnHeadersRow(),this.container.container.appendChild(this.table.fragment),t.table=this.table.table}}addColumn(e,t){if(this.rows.length)throw new Error("Doesn't support multi-dimensional table");this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));const o={col:e};this.columns.push(o),this.samples=t,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&null!==this.hot.getColHeader(e)&&this.hot.view.appendColHeader(e,this.table.th),this.table.tBody.appendChild(this.createCol(e)),this.container.container.appendChild(this.table.fragment),o.table=this.table.table}getHeights(e){this.injected||this.injectTable(),(0,n.arrayEach)(this.rows,(t=>{e(t.row,(0,r.outerHeight)(t.table)-1)}))}getWidths(e){this.injected||this.injectTable(),(0,n.arrayEach)(this.columns,(t=>{const{width:o}=t.table.getBoundingClientRect();e(t.col,Math.ceil(o))}))}setSettings(e){this.settings=e}setSetting(e,t){this.settings||(this.settings={}),this.settings[e]=t}getSettings(){return this.settings}getSetting(e){return this.settings?this.settings[e]:null}createColGroupsCol(e){const t=this.hot.rootDocument.createDocumentFragment();return this.hot.hasRowHeaders()&&t.appendChild(this.createColElement(-1,-1)),this.samples.forEach((o=>{(0,n.arrayEach)(o.strings,(o=>{t.appendChild(this.createColElement(o.col,e))}))})),t}createRow(e){const{rootDocument:t}=this.hot,o=t.createDocumentFragment(),s=t.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(e,s),o.appendChild(s)),this.samples.forEach((s=>{(0,n.arrayEach)(s.strings,(s=>{const i=s.col,r=this.hot.getCellMeta(e,i);r.col=i,r.row=e;const n=this.hot.getCellRenderer(r),a=t.createElement("td");a.setAttribute("ghost-table",1),n(this.hot,a,e,i,this.hot.colToProp(i),s.value,r),o.appendChild(a)}))})),o}appendColumnHeadersRow(){const{rootDocument:e}=this.hot,t=e.createDocumentFragment(),o=[];if(this.hot.hasRowHeaders()){const s=e.createElement("th");o.push([-1,s]),t.appendChild(s)}this.samples.forEach((s=>{(0,n.arrayEach)(s.strings,(s=>{const i=s.col,r=e.createElement("th");o.push([i,r]),t.appendChild(r)}))})),this.table.tHead.appendChild(t),(0,n.arrayEach)(o,(e=>{const[t,o]=e;this.hot.view.appendColHeader(t,o)}))}createCol(e){const{rootDocument:t}=this.hot,o=t.createDocumentFragment();return this.samples.forEach((s=>{(0,n.arrayEach)(s.strings,(s=>{const i=s.row,r=this.hot.getCellMeta(i,e);r.col=e,r.row=i;const n=this.hot.getCellRenderer(r),a=t.createElement("td"),l=t.createElement("tr");a.setAttribute("ghost-table",1),n(this.hot,a,i,e,this.hot.colToProp(e),s.value,r),l.appendChild(a),o.appendChild(l)}))})),o}clean(){this.rows.length=0,this.rows[-1]=void 0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()}injectTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.injected||((e||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)}removeTable(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)}createColElement(e,t){const o=this.hot.rootDocument.createElement("col");let s=0;t>=0&&e>=0&&(s=this.hot.getCellMeta(t,e).colspan);let i=this.hot.view._wt.wtTable.getStretchedColumnWidth(e);if(s>1)for(let t=e+1;t<e+s;t++)i+=this.hot.view._wt.wtTable.getStretchedColumnWidth(t);return o.style.width=`${i}px`,o}createTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,o=t.createDocumentFragment(),s=t.createElement("table"),i=t.createElement("thead"),n=t.createElement("tbody"),a=t.createElement("colgroup"),l=t.createElement("tr"),h=t.createElement("th");return this.isVertical()&&s.appendChild(a),this.isHorizontal()&&(l.appendChild(h),i.appendChild(l),s.style.tableLayout="auto",s.style.width="auto"),s.appendChild(i),this.isVertical()&&n.appendChild(l),s.appendChild(n),(0,r.addClass)(s,e),o.appendChild(s),{fragment:o,table:s,tHead:i,tBody:n,colGroup:a,tr:l,th:h}}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,o=t.createDocumentFragment(),s=t.createElement("div"),i=`htGhostTable htAutoSize ${e.trim()}`;return(0,r.addClass)(s,i),o.appendChild(s),{fragment:o,container:s}}isVertical(){return!(!this.rows.length||this.columns.length)}isHorizontal(){return!(!this.columns.length||this.rows.length)}}},29583:(e,t,o)=>{"use strict";t.__esModule=!0,t.createPaginator=function(e){let{initialPage:t=-1,size:o=(()=>0),onItemSelect:i=(()=>{}),onClear:r=(()=>{})}=e;const n=new Set;let a=(0,s.clamp)(t,-1,h()-1);function l(e,t){const o=h()-1;if(e<0&&(e=o),e>o&&(e=0),n.has(e))return-1;n.add(e);return!1===i(e,!1)&&(e=l(1===t?++e:--e,t)),e}function h(){return Math.max(o(),0)}return{setCurrentPage:function(e){e>-1&&e<h()&&!1!==i(e,!0)&&(a=e)},getCurrentPage:function(){return a},toFirstItem:function(){h()>0&&(n.clear(),a=l(0,1))},toLastItem:function(){h()>0&&(n.clear(),a=l(h()-1,-1))},toNextItem:function(){h()>0&&(n.clear(),a=l(++a,1))},toPreviousItem:function(){h()>0&&(n.clear(),a=l(--a,-1))},getSize:h,clear:function(){n.clear(),a=t,r()}}};var s=o(68145)},52870:(e,t,o)=>{"use strict";t.__esModule=!0,t._dataToHTML=function(e){const t=e.length,o=["<table>"];for(let i=0;i<t;i+=1){const r=e[i],n=r.length,a=[];0===i&&o.push("<tbody>");for(let e=0;e<n;e+=1){const t=r[e],o=(0,s.isEmpty)(t)?"":t.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20{2,}/gi,(e=>`<span style="mso-spacerun: yes">${"&nbsp;".repeat(e.length-1)} </span>`)).replace(/\t/gi,"&#9;");a.push(`<td>${o}</td>`)}o.push("<tr>",...a,"</tr>"),i+1===t&&o.push("</tbody>")}return o.push("</table>"),o.join("")},t.htmlToGridSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;const o={},s=t.createDocumentFragment(),n=t.createElement("div");s.appendChild(n);let a=e;if("string"==typeof a){const e=a.replace(/<td\b[^>]*?>([\s\S]*?)<\/\s*td>/g,(e=>{const t=e.match(/<td\b[^>]*?>/g)[0];return`${t}${e.substring(t.length,e.lastIndexOf("<")).replace(/(<(?!br)([^>]+)>)/gi,"")}</td>`}));n.insertAdjacentHTML("afterbegin",`${e}`),a=n.querySelector("table")}if(!a||!function(e){return"TABLE"===(e&&e.nodeName||"")}(a))return;const l=n.querySelector('meta[name$="enerator"]'),h=null!==a.querySelector("tbody th"),u=a.querySelector("tr"),d=u?Array.from(u.cells).reduce(((e,t)=>e+t.colSpan),0)-(h?1:0):0,c=a.tFoot&&Array.from(a.tFoot.rows)||[],g=[];let f=!1,p=0,m=0;if(a.tHead){const e=Array.from(a.tHead.rows).filter((e=>{const t=null!==e.querySelector("td");return t&&g.push(e),!t}));p=e.length,f=p>0,p>1?o.nestedHeaders=Array.from(e).reduce(((e,t)=>{const o=Array.from(t.cells).reduce(((e,t,o)=>{if(h&&0===o)return e;const{colSpan:s,innerHTML:i}=t,r=s>1?{label:i,colspan:s}:i;return e.push(r),e}),[]);return e.push(o),e}),[]):f&&(o.colHeaders=Array.from(e[0].children).reduce(((e,t,o)=>(h&&0===o||e.push(t.innerHTML),e)),[]))}g.length&&(o.fixedRowsTop=g.length);c.length&&(o.fixedRowsBottom=c.length);const w=[...g,...Array.from(a.tBodies).reduce(((e,t)=>(e.push(...Array.from(t.rows)),e)),[]),...c];m=w.length;const C=new Array(m);for(let e=0;e<m;e++)C[e]=new Array(d);const v=[],y=[];for(let e=0;e<m;e++){const t=w[e],o=Array.from(t.cells),s=o.length;for(let t=0;t<s;t++){const s=o[t],{nodeName:n,innerHTML:a,rowSpan:h,colSpan:u}=s,d=C[e].findIndex((e=>void 0===e));if("TD"===n){if(h>1||u>1){for(let t=e;t<e+h;t++)if(t<m)for(let e=d;e<d+u;e++)C[t][e]=null;const t=s.getAttribute("style");t&&t.includes("mso-ignore:colspan")||v.push({col:d,row:e,rowspan:h,colspan:u})}let t="";t=l&&/excel/gi.test(l.content)?a.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,"\r\n"):a.replace(/<br(\s*|\/)>[\r\n]?/gim,"\r\n"),C[e][d]=t.replace(r,(e=>i[e]))}else y.push(a)}}v.length&&(o.mergeCells=v);y.length&&(o.rowHeaders=y);C.length&&(o.data=C);return o},t.instanceToHTML=function(e){const t=e.hasColHeaders(),o=e.hasRowHeaders(),i=[t?-1:0,o?-1:0,e.countRows()-1,e.countCols()-1],r=e.getData(...i),n=r.length,a=n>0?r[0].length:0,l=["<table>","</table>"],h=t?["<thead>","</thead>"]:[],u=["<tbody>","</tbody>"],d=o?1:0,c=t?1:0;for(let i=0;i<n;i+=1){const n=t&&0===i,l=[];for(let t=0;t<a;t+=1){const a=!n&&o&&0===t;let h="";if(n)h=`<th>${e.getColHeader(t-d)}</th>`;else if(a)h=`<th>${e.getRowHeader(i-c)}</th>`;else{const o=r[i][t],{hidden:n,rowspan:a,colspan:l}=e.getCellMeta(i-c,t-d);if(!n){const e=[];if(a&&e.push(`rowspan="${a}"`),l&&e.push(`colspan="${l}"`),(0,s.isEmpty)(o))h=`<td ${e.join(" ")}></td>`;else{const t=o.toString().replace("<","&lt;").replace(">","&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi,"&nbsp;").replace(/\t/gi,"&#9;");h=`<td ${e.join(" ")}>${t}</td>`}}}l.push(h)}const g=["<tr>",...l,"</tr>"].join("");n?h.splice(1,0,g):u.splice(-1,0,g)}return l.splice(1,0,h.join(""),u.join("")),l.join("")},o(63517);var s=o(93315);const i={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">"},r=new RegExp(Object.keys(i).map((e=>`(${e})`)).join("|"),"gi")},45433:(e,t)=>{"use strict";t.__esModule=!0,t.hasValidParameter=function(e){return e===s},t.isRootInstance=function(e){return o.has(e)},t.registerAsRootInstance=function(e){o.set(e,!0)};const o=t.holder=new WeakMap,s=t.rootInstanceSymbol=Symbol("rootInstance")},10977:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,o(91683),o(63517);var i=s(o(93231)),r=o(22232),n=o(68145),a=o(93315);class l{static get SAMPLE_COUNT(){return 3}constructor(e){(0,i.default)(this,"samples",null),(0,i.default)(this,"dataFactory",null),(0,i.default)(this,"customSampleCount",null),(0,i.default)(this,"allowDuplicates",!1),this.dataFactory=e}getSampleCount(){return this.customSampleCount?this.customSampleCount:l.SAMPLE_COUNT}setSampleCount(e){this.customSampleCount=e}setAllowDuplicates(e){this.allowDuplicates=e}generateRowSamples(e,t){return this.generateSamples("row",t,e)}generateColumnSamples(e,t){return this.generateSamples("col",t,e)}generateSamples(e,t,o){const s=new Map,{from:i,to:r}="number"==typeof o?{from:o,to:o}:o;return(0,n.rangeEach)(i,r,(o=>{const i=this.generateSample(e,t,o);s.set(o,i)})),s}generateSample(e,t,o){if("row"!==e&&"col"!==e)throw new Error("Unsupported sample type");const s=new Map,i="row"===e?"col":"row",l=[];return(0,n.rangeEach)(t.from,t.to,(t=>{const n="row"===e?this.dataFactory(o,t):this.dataFactory(t,o);if(!1===n)return;const{value:h,bundleSeed:u}=n,d="string"==typeof u&&u.length>0;let c;c=d?u:(0,r.isObject)(h)?`${Object.keys(h).length}`:Array.isArray(h)?`${h.length}`:`${(0,a.stringify)(h).length}`,s.has(c)||s.set(c,{needed:this.getSampleCount(),strings:[]});const g=s.get(c);if(g.needed){(!(l.indexOf(h)>-1)||this.allowDuplicates||d)&&(g.strings.push({value:h,[i]:t}),l.push(h),g.needed-=1)}})),s}}t.default=l},63800:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";o.has(e)||o.set(e,new Map);const t=o.get(e);return{register:function(e,o){t.set(e,o)},getItem:function(e){return t.get(e)},hasItem:function(e){return t.has(e)},getNames:function(){return[...t.keys()]},getValues:function(){return[...t.values()]}}};const o=t.collection=new Map},98889:(e,t)=>{"use strict";t.__esModule=!0,t.autocompleteValidator=s;const o=t.VALIDATOR_TYPE="autocomplete";function s(e,t){let o=e;null==o&&(o=""),this.allowEmpty&&""===o?t(!0):this.strict&&this.source?"function"==typeof this.source?this.source(o,i(o,t)):i(o,t)(this.source):t(!0)}function i(e,t){const o=e;return function(e){let s=!1;for(let t=0,i=e.length;t<i;t++)if(o===e[t]){s=!0;break}t(s)}}s.VALIDATOR_TYPE=o},67156:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(98889);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.autocompleteValidator=s.autocompleteValidator},88819:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.correctFormat=u,t.dateValidator=h;var i=s(o(33034)),r=o(83605),n=o(58437),a=o(48150);const l=t.VALIDATOR_TYPE="date";function h(e,t){const o=(0,r.getEditorInstance)(n.EDITOR_TYPE,this.instance);let s=e,a=!0;null==s&&(s="");let l=(0,i.default)(s,this.dateFormat||o.defaultDateFormat,!0).isValid(),h=(0,i.default)(new Date(s)).isValid()||l;if(this.allowEmpty&&""===s&&(h=!0,l=!0),h||(a=!1),!h&&l&&(a=!0),h&&!l)if(!0===this.correctFormat){const e=u(s,this.dateFormat),t=this.instance.toVisualRow(this.row),o=this.instance.toVisualColumn(this.col);this.instance.setDataAtCell(t,o,e,"dateValidator"),a=!0}else a=!1;t(a)}function u(e,t){const o=(0,i.default)((0,a.getNormalizedDate)(e)),s=(0,i.default)(e,t),r=e.search(/[A-z]/g)>-1;let n;return n=o.isValid()&&o.format("x")===s.format("x")||!s.isValid()||r?o:s,n.format(t)}h.VALIDATOR_TYPE=l},82951:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(88819);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.correctFormat=s.correctFormat,t.dateValidator=s.dateValidator},430:(e,t,o)=>{"use strict";t.__esModule=!0,t.dropdownValidator=r;var s=o(98889);const i=t.VALIDATOR_TYPE="dropdown";function r(e,t){s.autocompleteValidator.apply(this,[e,t])}r.VALIDATOR_TYPE=i},57509:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(430);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.dropdownValidator=s.dropdownValidator},12630:(e,t,o)=>{"use strict";t.__esModule=!0,t.registerAllValidators=function(){(0,l.registerValidator)(s.autocompleteValidator),(0,l.registerValidator)(r.dropdownValidator),(0,l.registerValidator)(i.dateValidator),(0,l.registerValidator)(n.numericValidator),(0,l.registerValidator)(a.timeValidator)};var s=o(67156);t.autocompleteValidator=s.autocompleteValidator,t.AUTOCOMPLETE_VALIDATOR=s.VALIDATOR_TYPE;var i=o(82951);t.dateValidator=i.dateValidator,t.DATE_VALIDATOR=i.VALIDATOR_TYPE;var r=o(57509);t.dropdownValidator=r.dropdownValidator,t.DROPDOWN_VALIDATOR=r.VALIDATOR_TYPE;var n=o(71);t.numericValidator=n.numericValidator,t.NUMERIC_VALIDATOR=n.VALIDATOR_TYPE;var a=o(85342);t.timeValidator=a.timeValidator,t.TIME_VALIDATOR=a.VALIDATOR_TYPE;var l=o(80239);t.registerValidator=l.registerValidator,t.getRegisteredValidatorNames=l.getRegisteredValidatorNames,t.getRegisteredValidators=l.getRegisteredValidators,t.getValidator=l.getValidator,t.hasValidator=l.hasValidator},71:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(3740);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.numericValidator=s.numericValidator},3740:(e,t,o)=>{"use strict";t.__esModule=!0,t.numericValidator=r;var s=o(68145);const i=t.VALIDATOR_TYPE="numeric";function r(e,t){let o=e;null==o&&(o=""),this.allowEmpty&&""===o?t(!0):t(""!==o&&(0,s.isNumeric)(e))}r.VALIDATOR_TYPE=i},80239:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.getValidator=function(e){if("function"==typeof e)return e;if(!a(e))throw Error(`No registered validator found under "${e}" name`);return n(e)},t.registerValidator=function(e,t){"string"!=typeof e&&(e=(t=e).VALIDATOR_TYPE);r(e,t)},o(91683);var i=s(o(63800));const{register:r,getItem:n,hasItem:a,getNames:l,getValues:h}=(0,i.default)("validators");t.getRegisteredValidators=h,t.getRegisteredValidatorNames=l,t.hasValidator=a},85342:(e,t,o)=>{"use strict";t.__esModule=!0;var s=o(60950);t.VALIDATOR_TYPE=s.VALIDATOR_TYPE,t.timeValidator=s.timeValidator},60950:(e,t,o)=>{"use strict";var s=o(73203);t.__esModule=!0,t.timeValidator=a;var i=s(o(33034));const r=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"],n=t.VALIDATOR_TYPE="time";function a(e,t){const o=this.timeFormat||"h:mm:ss a";let s=!0,n=e;null===n&&(n=""),n=/^\d{3,}$/.test(n)?parseInt(n,10):n;const a=/^\d{1,2}$/.test(n);a&&(n+=":00");const l=(0,i.default)(n,r,!0).isValid()?(0,i.default)(n):(0,i.default)(n,o);let h=l.isValid(),u=(0,i.default)(n,o,!0).isValid()&&!a;if(this.allowEmpty&&""===n&&(h=!0,u=!0),h||(s=!1),!h&&u&&(s=!0),h&&!u)if(!0===this.correctFormat){const e=l.format(o),t=this.instance.toVisualRow(this.row),i=this.instance.toVisualColumn(this.col);this.instance.setDataAtCell(t,i,e,"timeValidator"),s=!0}else s=!1;t(s)}a.VALIDATOR_TYPE=n},25671:(e,t,o)=>{"use strict";o.r(t)},16247:(e,t,o)=>{"use strict";o.r(t)},97796:(e,t,o)=>{"use strict";o.r(t)},36662:(e,t,o)=>{"use strict";o.r(t)},68581:(e,t,o)=>{"use strict";o.r(t)},79498:(e,t,o)=>{"use strict";o.r(t)},63824:(e,t,o)=>{"use strict";o.r(t)},59456:(e,t,o)=>{"use strict";o.r(t)},30352:(e,t,o)=>{"use strict";o.r(t)},52097:(e,t,o)=>{"use strict";o.r(t)},25972:(e,t,o)=>{"use strict";o.r(t)},18633:(e,t,o)=>{"use strict";o.r(t)},36881:(e,t,o)=>{"use strict";o.r(t)},83988:(e,t,o)=>{"use strict";o.r(t)},70980:(e,t,o)=>{"use strict";o.r(t)},2049:(e,t,o)=>{"use strict";o.r(t)},10596:(e,t,o)=>{"use strict";o.r(t)},23118:(e,t,o)=>{"use strict";o.r(t)},67004:(e,t,o)=>{"use strict";o.r(t)},51768:(e,t,o)=>{"use strict";o.r(t)},36565:t=>{"use strict";t.exports=e},57852:e=>{"use strict";e.exports=t},33034:e=>{"use strict";e.exports=o},3333:e=>{"use strict";e.exports=s},21594:e=>{e.exports=function(e,t){return t.get?t.get.call(e):t.value},e.exports.__esModule=!0,e.exports.default=e.exports},20218:e=>{e.exports=function(e,t,o){if(t.set)t.set.call(e,o);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=o}},e.exports.__esModule=!0,e.exports.default=e.exports},18708:e=>{e.exports=function(e,t,o){if(!t.has(e))throw new TypeError("attempted to "+o+" private field on non-instance");return t.get(e)},e.exports.__esModule=!0,e.exports.default=e.exports},42538:(e,t,o)=>{var s=o(21594),i=o(18708);e.exports=function(e,t){var o=i(e,t,"get");return s(e,o)},e.exports.__esModule=!0,e.exports.default=e.exports},48427:(e,t,o)=>{var s=o(20218),i=o(18708);e.exports=function(e,t,o){var r=i(e,t,"set");return s(e,r,o),o},e.exports.__esModule=!0,e.exports.default=e.exports},93231:(e,t,o)=>{var s=o(74040);e.exports=function(e,t,o){return(t=s(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e},e.exports.__esModule=!0,e.exports.default=e.exports},73203:e=>{e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},56027:(e,t,o)=>{var s=o(7501).default;e.exports=function(e,t){if("object"!=s(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var i=o.call(e,t||"default");if("object"!=s(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},74040:(e,t,o)=>{var s=o(7501).default,i=o(56027);e.exports=function(e){var t=i(e,"string");return"symbol"==s(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},7501:e=>{function t(o){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(o)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},61575:(e,t,o)=>{"use strict";var s=o(55893),i=o(85545),r=TypeError;e.exports=function(e){if(s(e))return e;throw new r(i(e)+" is not a function")}},99272:(e,t,o)=>{"use strict";var s=o(60545),i=String,r=TypeError;e.exports=function(e){if(s(e))return e;throw new r("Can't set "+i(e)+" as a prototype")}},49408:(e,t,o)=>{"use strict";var s=o(67936),i=o(9464),r=o(27144).f,n=s("unscopables"),a=Array.prototype;void 0===a[n]&&r(a,n,{configurable:!0,value:i(null)}),e.exports=function(e){a[n][e]=!0}},99972:(e,t,o)=>{"use strict";var s=o(15287),i=String,r=TypeError;e.exports=function(e){if(s(e))return e;throw new r(i(e)+" is not an object")}},22971:(e,t,o)=>{"use strict";var s=o(79405),i=o(29961),r=o(19969),n=function(e){return function(t,o,n){var a,l=s(t),h=r(l),u=i(n,h);if(e&&o!=o){for(;h>u;)if((a=l[u++])!=a)return!0}else for(;h>u;u++)if((e||u in l)&&l[u]===o)return e||u||0;return!e&&-1}};e.exports={includes:n(!0),indexOf:n(!1)}},58576:(e,t,o)=>{"use strict";var s=o(3877),i=o(65289),r=TypeError,n=Object.getOwnPropertyDescriptor,a=s&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=a?function(e,t){if(i(e)&&!n(e,"length").writable)throw new r("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},30039:(e,t,o)=>{"use strict";var s=o(46406);e.exports=s([].slice)},63048:(e,t,o)=>{"use strict";var s=o(46406),i=s({}.toString),r=s("".slice);e.exports=function(e){return r(i(e),8,-1)}},85683:(e,t,o)=>{"use strict";var s=o(46623),i=o(55893),r=o(63048),n=o(67936)("toStringTag"),a=Object,l="Arguments"===r(function(){return arguments}());e.exports=s?r:function(e){var t,o,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(o=function(e,t){try{return e[t]}catch(e){}}(t=a(e),n))?o:l?r(t):"Object"===(s=r(t))&&i(t.callee)?"Arguments":s}},30779:(e,t,o)=>{"use strict";var s=o(4130),i=o(6627),r=o(20010),n=o(27144);e.exports=function(e,t,o){for(var a=i(t),l=n.f,h=r.f,u=0;u<a.length;u++){var d=a[u];s(e,d)||o&&s(o,d)||l(e,d,h(t,d))}}},89251:(e,t,o)=>{"use strict";var s=o(3877),i=o(27144),r=o(49637);e.exports=s?function(e,t,o){return i.f(e,t,r(1,o))}:function(e,t,o){return e[t]=o,e}},49637:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},76968:(e,t,o)=>{"use strict";var s=o(83662),i=o(27144),r=o(49637);e.exports=function(e,t,o){var n=s(t);n in e?i.f(e,n,r(0,o)):e[n]=o}},67205:(e,t,o)=>{"use strict";var s=o(55893),i=o(27144),r=o(73911),n=o(13630);e.exports=function(e,t,o,a){a||(a={});var l=a.enumerable,h=void 0!==a.name?a.name:t;if(s(o)&&r(o,h,a),a.global)l?e[t]=o:n(t,o);else{try{a.unsafe?e[t]&&(l=!0):delete e[t]}catch(e){}l?e[t]=o:i.f(e,t,{value:o,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},13630:(e,t,o)=>{"use strict";var s=o(77802),i=Object.defineProperty;e.exports=function(e,t){try{i(s,e,{value:t,configurable:!0,writable:!0})}catch(o){s[e]=t}return t}},39021:(e,t,o)=>{"use strict";var s=o(85545),i=TypeError;e.exports=function(e,t){if(!delete e[t])throw new i("Cannot delete property "+s(t)+" of "+s(e))}},3877:(e,t,o)=>{"use strict";var s=o(5306);e.exports=!s((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},19800:(e,t,o)=>{"use strict";var s=o(77802),i=o(15287),r=s.document,n=i(r)&&i(r.createElement);e.exports=function(e){return n?r.createElement(e):{}}},59060:e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},73517:e=>{"use strict";e.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},27580:(e,t,o)=>{"use strict";var s=o(22626);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(s)},16576:(e,t,o)=>{"use strict";var s=o(77802),i=o(63048);e.exports="process"===i(s.process)},22626:e=>{"use strict";e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7245:(e,t,o)=>{"use strict";var s,i,r=o(77802),n=o(22626),a=r.process,l=r.Deno,h=a&&a.versions||l&&l.version,u=h&&h.v8;u&&(i=(s=u.split("."))[0]>0&&s[0]<4?1:+(s[0]+s[1])),!i&&n&&(!(s=n.match(/Edge\/(\d+)/))||s[1]>=74)&&(s=n.match(/Chrome\/(\d+)/))&&(i=+s[1]),e.exports=i},14286:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},93939:(e,t,o)=>{"use strict";var s=o(46406),i=Error,r=s("".replace),n=String(new i("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,l=a.test(n);e.exports=function(e,t){if(l&&"string"==typeof e&&!i.prepareStackTrace)for(;t--;)e=r(e,a,"");return e}},83452:(e,t,o)=>{"use strict";var s=o(89251),i=o(93939),r=o(64815),n=Error.captureStackTrace;e.exports=function(e,t,o,a){r&&(n?n(e,t):s(e,"stack",i(o,a)))}},64815:(e,t,o)=>{"use strict";var s=o(5306),i=o(49637);e.exports=!s((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",i(1,7)),7!==e.stack)}))},92390:(e,t,o)=>{"use strict";var s=o(77802),i=o(20010).f,r=o(89251),n=o(67205),a=o(13630),l=o(30779),h=o(75031);e.exports=function(e,t){var o,u,d,c,g,f=e.target,p=e.global,m=e.stat;if(o=p?s:m?s[f]||a(f,{}):(s[f]||{}).prototype)for(u in t){if(c=t[u],d=e.dontCallGetSet?(g=i(o,u))&&g.value:o[u],!h(p?u:f+(m?".":"#")+u,e.forced)&&void 0!==d){if(typeof c==typeof d)continue;l(c,d)}(e.sham||d&&d.sham)&&r(c,"sham",!0),n(o,u,c,e)}}},5306:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},56415:(e,t,o)=>{"use strict";var s=o(67219),i=Function.prototype,r=i.apply,n=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(s?n.bind(r):function(){return n.apply(r,arguments)})},45898:(e,t,o)=>{"use strict";var s=o(38717),i=o(61575),r=o(67219),n=s(s.bind);e.exports=function(e,t){return i(e),void 0===t?e:r?n(e,t):function(){return e.apply(t,arguments)}}},67219:(e,t,o)=>{"use strict";var s=o(5306);e.exports=!s((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},11550:(e,t,o)=>{"use strict";var s=o(67219),i=Function.prototype.call;e.exports=s?i.bind(i):function(){return i.apply(i,arguments)}},9656:(e,t,o)=>{"use strict";var s=o(3877),i=o(4130),r=Function.prototype,n=s&&Object.getOwnPropertyDescriptor,a=i(r,"name"),l=a&&"something"===function(){}.name,h=a&&(!s||s&&n(r,"name").configurable);e.exports={EXISTS:a,PROPER:l,CONFIGURABLE:h}},28692:(e,t,o)=>{"use strict";var s=o(46406),i=o(61575);e.exports=function(e,t,o){try{return s(i(Object.getOwnPropertyDescriptor(e,t)[o]))}catch(e){}}},38717:(e,t,o)=>{"use strict";var s=o(63048),i=o(46406);e.exports=function(e){if("Function"===s(e))return i(e)}},46406:(e,t,o)=>{"use strict";var s=o(67219),i=Function.prototype,r=i.call,n=s&&i.bind.bind(r,r);e.exports=s?n:function(e){return function(){return r.apply(e,arguments)}}},51570:(e,t,o)=>{"use strict";var s=o(77802),i=o(55893);e.exports=function(e,t){return arguments.length<2?(o=s[e],i(o)?o:void 0):s[e]&&s[e][t];var o}},85536:(e,t,o)=>{"use strict";var s=o(85683),i=o(56628),r=o(87707),n=o(59921),a=o(67936)("iterator");e.exports=function(e){if(!r(e))return i(e,a)||i(e,"@@iterator")||n[s(e)]}},43159:(e,t,o)=>{"use strict";var s=o(11550),i=o(61575),r=o(99972),n=o(85545),a=o(85536),l=TypeError;e.exports=function(e,t){var o=arguments.length<2?a(e):t;if(i(o))return r(s(o,e));throw new l(n(e)+" is not iterable")}},36695:(e,t,o)=>{"use strict";var s=o(46406),i=o(65289),r=o(55893),n=o(63048),a=o(42755),l=s([].push);e.exports=function(e){if(r(e))return e;if(i(e)){for(var t=e.length,o=[],s=0;s<t;s++){var h=e[s];"string"==typeof h?l(o,h):"number"!=typeof h&&"Number"!==n(h)&&"String"!==n(h)||l(o,a(h))}var u=o.length,d=!0;return function(e,t){if(d)return d=!1,t;if(i(this))return t;for(var s=0;s<u;s++)if(o[s]===e)return t}}}},56628:(e,t,o)=>{"use strict";var s=o(61575),i=o(87707);e.exports=function(e,t){var o=e[t];return i(o)?void 0:s(o)}},77802:function(e){"use strict";var t=function(e){return e&&e.Math===Math&&e};e.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof global&&global)||t("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4130:(e,t,o)=>{"use strict";var s=o(46406),i=o(85864),r=s({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return r(i(e),t)}},63421:e=>{"use strict";e.exports={}},12343:(e,t,o)=>{"use strict";var s=o(51570);e.exports=s("document","documentElement")},33075:(e,t,o)=>{"use strict";var s=o(3877),i=o(5306),r=o(19800);e.exports=!s&&!i((function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},25366:(e,t,o)=>{"use strict";var s=o(46406),i=o(5306),r=o(63048),n=Object,a=s("".split);e.exports=i((function(){return!n("z").propertyIsEnumerable(0)}))?function(e){return"String"===r(e)?a(e,""):n(e)}:n},91074:(e,t,o)=>{"use strict";var s=o(55893),i=o(15287),r=o(71126);e.exports=function(e,t,o){var n,a;return r&&s(n=t.constructor)&&n!==o&&i(a=n.prototype)&&a!==o.prototype&&r(e,a),e}},85088:(e,t,o)=>{"use strict";var s=o(46406),i=o(55893),r=o(64830),n=s(Function.toString);i(r.inspectSource)||(r.inspectSource=function(e){return n(e)}),e.exports=r.inspectSource},71281:(e,t,o)=>{"use strict";var s=o(15287),i=o(89251);e.exports=function(e,t){s(t)&&"cause"in t&&i(e,"cause",t.cause)}},9930:(e,t,o)=>{"use strict";var s,i,r,n=o(45585),a=o(77802),l=o(15287),h=o(89251),u=o(4130),d=o(64830),c=o(50139),g=o(63421),f="Object already initialized",p=a.TypeError,m=a.WeakMap;if(n||d.state){var w=d.state||(d.state=new m);w.get=w.get,w.has=w.has,w.set=w.set,s=function(e,t){if(w.has(e))throw new p(f);return t.facade=e,w.set(e,t),t},i=function(e){return w.get(e)||{}},r=function(e){return w.has(e)}}else{var C=c("state");g[C]=!0,s=function(e,t){if(u(e,C))throw new p(f);return t.facade=e,h(e,C,t),t},i=function(e){return u(e,C)?e[C]:{}},r=function(e){return u(e,C)}}e.exports={set:s,get:i,has:r,enforce:function(e){return r(e)?i(e):s(e,{})},getterFor:function(e){return function(t){var o;if(!l(t)||(o=i(t)).type!==e)throw new p("Incompatible receiver, "+e+" required");return o}}}},52943:(e,t,o)=>{"use strict";var s=o(67936),i=o(59921),r=s("iterator"),n=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||n[r]===e)}},65289:(e,t,o)=>{"use strict";var s=o(63048);e.exports=Array.isArray||function(e){return"Array"===s(e)}},55893:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},75031:(e,t,o)=>{"use strict";var s=o(5306),i=o(55893),r=/#|\.prototype\./,n=function(e,t){var o=l[a(e)];return o===u||o!==h&&(i(t)?s(t):!!t)},a=n.normalize=function(e){return String(e).replace(r,".").toLowerCase()},l=n.data={},h=n.NATIVE="N",u=n.POLYFILL="P";e.exports=n},87707:e=>{"use strict";e.exports=function(e){return null==e}},15287:(e,t,o)=>{"use strict";var s=o(55893);e.exports=function(e){return"object"==typeof e?null!==e:s(e)}},60545:(e,t,o)=>{"use strict";var s=o(15287);e.exports=function(e){return s(e)||null===e}},99:e=>{"use strict";e.exports=!1},103:(e,t,o)=>{"use strict";var s=o(51570),i=o(55893),r=o(2075),n=o(90345),a=Object;e.exports=n?function(e){return"symbol"==typeof e}:function(e){var t=s("Symbol");return i(t)&&r(t.prototype,a(e))}},82003:(e,t,o)=>{"use strict";var s=o(45898),i=o(11550),r=o(99972),n=o(85545),a=o(52943),l=o(19969),h=o(2075),u=o(43159),d=o(85536),c=o(36335),g=TypeError,f=function(e,t){this.stopped=e,this.result=t},p=f.prototype;e.exports=function(e,t,o){var m,w,C,v,y,E,S,R=o&&o.that,b=!(!o||!o.AS_ENTRIES),_=!(!o||!o.IS_RECORD),T=!(!o||!o.IS_ITERATOR),O=!(!o||!o.INTERRUPTED),M=s(t,R),I=function(e){return m&&c(m,"normal",e),new f(!0,e)},A=function(e){return b?(r(e),O?M(e[0],e[1],I):M(e[0],e[1])):O?M(e,I):M(e)};if(_)m=e.iterator;else if(T)m=e;else{if(!(w=d(e)))throw new g(n(e)+" is not iterable");if(a(w)){for(C=0,v=l(e);v>C;C++)if((y=A(e[C]))&&h(p,y))return y;return new f(!1)}m=u(e,w)}for(E=_?e.next:m.next;!(S=i(E,m)).done;){try{y=A(S.value)}catch(e){c(m,"throw",e)}if("object"==typeof y&&y&&h(p,y))return y}return new f(!1)}},36335:(e,t,o)=>{"use strict";var s=o(11550),i=o(99972),r=o(56628);e.exports=function(e,t,o){var n,a;i(e);try{if(!(n=r(e,"return"))){if("throw"===t)throw o;return o}n=s(n,e)}catch(e){a=!0,n=e}if("throw"===t)throw o;if(a)throw n;return i(n),o}},59921:e=>{"use strict";e.exports={}},19969:(e,t,o)=>{"use strict";var s=o(9099);e.exports=function(e){return s(e.length)}},73911:(e,t,o)=>{"use strict";var s=o(46406),i=o(5306),r=o(55893),n=o(4130),a=o(3877),l=o(9656).CONFIGURABLE,h=o(85088),u=o(9930),d=u.enforce,c=u.get,g=String,f=Object.defineProperty,p=s("".slice),m=s("".replace),w=s([].join),C=a&&!i((function(){return 8!==f((function(){}),"length",{value:8}).length})),v=String(String).split("String"),y=e.exports=function(e,t,o){"Symbol("===p(g(t),0,7)&&(t="["+m(g(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),o&&o.getter&&(t="get "+t),o&&o.setter&&(t="set "+t),(!n(e,"name")||l&&e.name!==t)&&(a?f(e,"name",{value:t,configurable:!0}):e.name=t),C&&o&&n(o,"arity")&&e.length!==o.arity&&f(e,"length",{value:o.arity});try{o&&n(o,"constructor")&&o.constructor?a&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var s=d(e);return n(s,"source")||(s.source=w(v,"string"==typeof t?t:"")),e};Function.prototype.toString=y((function(){return r(this)&&c(this).source||h(this)}),"toString")},61402:e=>{"use strict";var t=Math.ceil,o=Math.floor;e.exports=Math.trunc||function(e){var s=+e;return(s>0?o:t)(s)}},93819:(e,t,o)=>{"use strict";var s=o(42755);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:s(e)}},9464:(e,t,o)=>{"use strict";var s,i=o(99972),r=o(33872),n=o(14286),a=o(63421),l=o(12343),h=o(19800),u=o(50139),d="prototype",c="script",g=u("IE_PROTO"),f=function(){},p=function(e){return"<"+c+">"+e+"</"+c+">"},m=function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t},w=function(){try{s=new ActiveXObject("htmlfile")}catch(e){}var e,t,o;w="undefined"!=typeof document?document.domain&&s?m(s):(t=h("iframe"),o="java"+c+":",t.style.display="none",l.appendChild(t),t.src=String(o),(e=t.contentWindow.document).open(),e.write(p("document.F=Object")),e.close(),e.F):m(s);for(var i=n.length;i--;)delete w[d][n[i]];return w()};a[g]=!0,e.exports=Object.create||function(e,t){var o;return null!==e?(f[d]=i(e),o=new f,f[d]=null,o[g]=e):o=w(),void 0===t?o:r.f(o,t)}},33872:(e,t,o)=>{"use strict";var s=o(3877),i=o(27475),r=o(27144),n=o(99972),a=o(79405),l=o(51008);t.f=s&&!i?Object.defineProperties:function(e,t){n(e);for(var o,s=a(t),i=l(t),h=i.length,u=0;h>u;)r.f(e,o=i[u++],s[o]);return e}},27144:(e,t,o)=>{"use strict";var s=o(3877),i=o(33075),r=o(27475),n=o(99972),a=o(83662),l=TypeError,h=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d="enumerable",c="configurable",g="writable";t.f=s?r?function(e,t,o){if(n(e),t=a(t),n(o),"function"==typeof e&&"prototype"===t&&"value"in o&&g in o&&!o[g]){var s=u(e,t);s&&s[g]&&(e[t]=o.value,o={configurable:c in o?o[c]:s[c],enumerable:d in o?o[d]:s[d],writable:!1})}return h(e,t,o)}:h:function(e,t,o){if(n(e),t=a(t),n(o),i)try{return h(e,t,o)}catch(e){}if("get"in o||"set"in o)throw new l("Accessors not supported");return"value"in o&&(e[t]=o.value),e}},20010:(e,t,o)=>{"use strict";var s=o(3877),i=o(11550),r=o(71940),n=o(49637),a=o(79405),l=o(83662),h=o(4130),u=o(33075),d=Object.getOwnPropertyDescriptor;t.f=s?d:function(e,t){if(e=a(e),t=l(t),u)try{return d(e,t)}catch(e){}if(h(e,t))return n(!i(r.f,e,t),e[t])}},17397:(e,t,o)=>{"use strict";var s=o(65079),i=o(14286).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return s(e,i)}},76855:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},2075:(e,t,o)=>{"use strict";var s=o(46406);e.exports=s({}.isPrototypeOf)},65079:(e,t,o)=>{"use strict";var s=o(46406),i=o(4130),r=o(79405),n=o(22971).indexOf,a=o(63421),l=s([].push);e.exports=function(e,t){var o,s=r(e),h=0,u=[];for(o in s)!i(a,o)&&i(s,o)&&l(u,o);for(;t.length>h;)i(s,o=t[h++])&&(~n(u,o)||l(u,o));return u}},51008:(e,t,o)=>{"use strict";var s=o(65079),i=o(14286);e.exports=Object.keys||function(e){return s(e,i)}},71940:(e,t)=>{"use strict";var o={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,i=s&&!o.call({1:2},1);t.f=i?function(e){var t=s(this,e);return!!t&&t.enumerable}:o},71126:(e,t,o)=>{"use strict";var s=o(28692),i=o(99972),r=o(99272);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,o={};try{(e=s(Object.prototype,"__proto__","set"))(o,[]),t=o instanceof Array}catch(e){}return function(o,s){return i(o),r(s),t?e(o,s):o.__proto__=s,o}}():void 0)},51253:(e,t,o)=>{"use strict";var s=o(11550),i=o(55893),r=o(15287),n=TypeError;e.exports=function(e,t){var o,a;if("string"===t&&i(o=e.toString)&&!r(a=s(o,e)))return a;if(i(o=e.valueOf)&&!r(a=s(o,e)))return a;if("string"!==t&&i(o=e.toString)&&!r(a=s(o,e)))return a;throw new n("Can't convert object to primitive value")}},6627:(e,t,o)=>{"use strict";var s=o(51570),i=o(46406),r=o(17397),n=o(76855),a=o(99972),l=i([].concat);e.exports=s("Reflect","ownKeys")||function(e){var t=r.f(a(e)),o=n.f;return o?l(t,o(e)):t}},46296:(e,t,o)=>{"use strict";var s=o(27144).f;e.exports=function(e,t,o){o in e||s(e,o,{configurable:!0,get:function(){return t[o]},set:function(e){t[o]=e}})}},46762:(e,t,o)=>{"use strict";var s=o(87707),i=TypeError;e.exports=function(e){if(s(e))throw new i("Can't call method on "+e);return e}},91795:(e,t,o)=>{"use strict";var s,i=o(77802),r=o(56415),n=o(55893),a=o(73517),l=o(22626),h=o(30039),u=o(7443),d=i.Function,c=/MSIE .\./.test(l)||a&&((s=i.Bun.version.split(".")).length<3||"0"===s[0]&&(s[1]<3||"3"===s[1]&&"0"===s[2]));e.exports=function(e,t){var o=t?2:1;return c?function(s,i){var a=u(arguments.length,1)>o,l=n(s)?s:d(s),c=a?h(arguments,o):[],g=a?function(){r(l,this,c)}:l;return t?e(g,i):e(g)}:e}},50139:(e,t,o)=>{"use strict";var s=o(19231),i=o(46350),r=s("keys");e.exports=function(e){return r[e]||(r[e]=i(e))}},64830:(e,t,o)=>{"use strict";var s=o(77802),i=o(13630),r="__core-js_shared__",n=s[r]||i(r,{});e.exports=n},19231:(e,t,o)=>{"use strict";var s=o(99),i=o(64830);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.35.0",mode:s?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.0/LICENSE",source:"https://github.com/zloirock/core-js"})},34053:(e,t,o)=>{"use strict";var s=o(7245),i=o(5306),r=o(77802).String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol("symbol detection");return!r(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&s&&s<41}))},71998:(e,t,o)=>{"use strict";var s,i,r,n,a=o(77802),l=o(56415),h=o(45898),u=o(55893),d=o(4130),c=o(5306),g=o(12343),f=o(30039),p=o(19800),m=o(7443),w=o(27580),C=o(16576),v=a.setImmediate,y=a.clearImmediate,E=a.process,S=a.Dispatch,R=a.Function,b=a.MessageChannel,_=a.String,T=0,O={},M="onreadystatechange";c((function(){s=a.location}));var I=function(e){if(d(O,e)){var t=O[e];delete O[e],t()}},A=function(e){return function(){I(e)}},N=function(e){I(e.data)},P=function(e){a.postMessage(_(e),s.protocol+"//"+s.host)};v&&y||(v=function(e){m(arguments.length,1);var t=u(e)?e:R(e),o=f(arguments,1);return O[++T]=function(){l(t,void 0,o)},i(T),T},y=function(e){delete O[e]},C?i=function(e){E.nextTick(A(e))}:S&&S.now?i=function(e){S.now(A(e))}:b&&!w?(n=(r=new b).port2,r.port1.onmessage=N,i=h(n.postMessage,n)):a.addEventListener&&u(a.postMessage)&&!a.importScripts&&s&&"file:"!==s.protocol&&!c(P)?(i=P,a.addEventListener("message",N,!1)):i=M in p("script")?function(e){g.appendChild(p("script"))[M]=function(){g.removeChild(this),I(e)}}:function(e){setTimeout(A(e),0)}),e.exports={set:v,clear:y}},29961:(e,t,o)=>{"use strict";var s=o(15930),i=Math.max,r=Math.min;e.exports=function(e,t){var o=s(e);return o<0?i(o+t,0):r(o,t)}},79405:(e,t,o)=>{"use strict";var s=o(25366),i=o(46762);e.exports=function(e){return s(i(e))}},15930:(e,t,o)=>{"use strict";var s=o(61402);e.exports=function(e){var t=+e;return t!=t||0===t?0:s(t)}},9099:(e,t,o)=>{"use strict";var s=o(15930),i=Math.min;e.exports=function(e){return e>0?i(s(e),9007199254740991):0}},85864:(e,t,o)=>{"use strict";var s=o(46762),i=Object;e.exports=function(e){return i(s(e))}},46090:(e,t,o)=>{"use strict";var s=o(11550),i=o(15287),r=o(103),n=o(56628),a=o(51253),l=o(67936),h=TypeError,u=l("toPrimitive");e.exports=function(e,t){if(!i(e)||r(e))return e;var o,l=n(e,u);if(l){if(void 0===t&&(t="default"),o=s(l,e,t),!i(o)||r(o))return o;throw new h("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},83662:(e,t,o)=>{"use strict";var s=o(46090),i=o(103);e.exports=function(e){var t=s(e,"string");return i(t)?t:t+""}},46623:(e,t,o)=>{"use strict";var s={};s[o(67936)("toStringTag")]="z",e.exports="[object z]"===String(s)},42755:(e,t,o)=>{"use strict";var s=o(85683),i=String;e.exports=function(e){if("Symbol"===s(e))throw new TypeError("Cannot convert a Symbol value to a string");return i(e)}},85545:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},46350:(e,t,o)=>{"use strict";var s=o(46406),i=0,r=Math.random(),n=s(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+n(++i+r,36)}},90345:(e,t,o)=>{"use strict";var s=o(34053);e.exports=s&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},27475:(e,t,o)=>{"use strict";var s=o(3877),i=o(5306);e.exports=s&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},7443:e=>{"use strict";var t=TypeError;e.exports=function(e,o){if(e<o)throw new t("Not enough arguments");return e}},45585:(e,t,o)=>{"use strict";var s=o(77802),i=o(55893),r=s.WeakMap;e.exports=i(r)&&/native code/.test(String(r))},67936:(e,t,o)=>{"use strict";var s=o(77802),i=o(19231),r=o(4130),n=o(46350),a=o(34053),l=o(90345),h=s.Symbol,u=i("wks"),d=l?h.for||h:h&&h.withoutSetter||n;e.exports=function(e){return r(u,e)||(u[e]=a&&r(h,e)?h[e]:d("Symbol."+e)),u[e]}},35357:(e,t,o)=>{"use strict";var s=o(51570),i=o(4130),r=o(89251),n=o(2075),a=o(71126),l=o(30779),h=o(46296),u=o(91074),d=o(93819),c=o(71281),g=o(83452),f=o(3877),p=o(99);e.exports=function(e,t,o,m){var w="stackTraceLimit",C=m?2:1,v=e.split("."),y=v[v.length-1],E=s.apply(null,v);if(E){var S=E.prototype;if(!p&&i(S,"cause")&&delete S.cause,!o)return E;var R=s("Error"),b=t((function(e,t){var o=d(m?t:e,void 0),s=m?new E(e):new E;return void 0!==o&&r(s,"message",o),g(s,b,s.stack,2),this&&n(S,this)&&u(s,this,b),arguments.length>C&&c(s,arguments[C]),s}));if(b.prototype=S,"Error"!==y?a?a(b,R):l(b,R,{name:!0}):f&&w in E&&(h(b,E,w),h(b,E,"prepareStackTrace")),l(b,E),!p)try{S.name!==y&&r(S,"name",y),S.constructor=b}catch(e){}return b}}},51344:(e,t,o)=>{"use strict";var s=o(92390),i=o(85864),r=o(19969),n=o(15930),a=o(49408);s({target:"Array",proto:!0},{at:function(e){var t=i(this),o=r(t),s=n(e),a=s>=0?s:o+s;return a<0||a>=o?void 0:t[a]}}),a("at")},63517:(e,t,o)=>{"use strict";var s=o(92390),i=o(85864),r=o(19969),n=o(58576),a=o(59060);s({target:"Array",proto:!0,arity:1,forced:o(5306)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=i(this),o=r(t),s=arguments.length;a(o+s);for(var l=0;l<s;l++)t[o]=arguments[l],o++;return n(t,o),o}})},9815:(e,t,o)=>{"use strict";o(49408)("flat")},57270:(e,t,o)=>{"use strict";var s=o(92390),i=o(85864),r=o(19969),n=o(58576),a=o(39021),l=o(59060);s({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}()},{unshift:function(e){var t=i(this),o=r(t),s=arguments.length;if(s){l(o+s);for(var h=o;h--;){var u=h+s;h in t?t[u]=t[h]:a(t,u)}for(var d=0;d<s;d++)t[d]=arguments[d]}return n(t,o+s)}})},91683:(e,t,o)=>{"use strict";var s=o(92390),i=o(77802),r=o(56415),n=o(35357),a="WebAssembly",l=i[a],h=7!==new Error("e",{cause:7}).cause,u=function(e,t){var o={};o[e]=n(e,t,h),s({global:!0,constructor:!0,arity:1,forced:h},o)},d=function(e,t){if(l&&l[e]){var o={};o[e]=n(a+"."+e,t,h),s({target:a,stat:!0,constructor:!0,arity:1,forced:h},o)}};u("Error",(function(e){return function(t){return r(e,this,arguments)}})),u("EvalError",(function(e){return function(t){return r(e,this,arguments)}})),u("RangeError",(function(e){return function(t){return r(e,this,arguments)}})),u("ReferenceError",(function(e){return function(t){return r(e,this,arguments)}})),u("SyntaxError",(function(e){return function(t){return r(e,this,arguments)}})),u("TypeError",(function(e){return function(t){return r(e,this,arguments)}})),u("URIError",(function(e){return function(t){return r(e,this,arguments)}})),d("CompileError",(function(e){return function(t){return r(e,this,arguments)}})),d("LinkError",(function(e){return function(t){return r(e,this,arguments)}})),d("RuntimeError",(function(e){return function(t){return r(e,this,arguments)}}))},68983:(e,t,o)=>{"use strict";var s=o(92390),i=o(51570),r=o(56415),n=o(11550),a=o(46406),l=o(5306),h=o(55893),u=o(103),d=o(30039),c=o(36695),g=o(34053),f=String,p=i("JSON","stringify"),m=a(/./.exec),w=a("".charAt),C=a("".charCodeAt),v=a("".replace),y=a(1..toString),E=/[\uD800-\uDFFF]/g,S=/^[\uD800-\uDBFF]$/,R=/^[\uDC00-\uDFFF]$/,b=!g||l((function(){var e=i("Symbol")("stringify detection");return"[null]"!==p([e])||"{}"!==p({a:e})||"{}"!==p(Object(e))})),_=l((function(){return'"\\udf06\\ud834"'!==p("\udf06\ud834")||'"\\udead"'!==p("\udead")})),T=function(e,t){var o=d(arguments),s=c(t);if(h(s)||void 0!==e&&!u(e))return o[1]=function(e,t){if(h(s)&&(t=n(s,this,f(e),t)),!u(t))return t},r(p,null,o)},O=function(e,t,o){var s=w(o,t-1),i=w(o,t+1);return m(S,e)&&!m(R,i)||m(R,e)&&!m(S,s)?"\\u"+y(C(e,0),16):e};p&&s({target:"JSON",stat:!0,arity:3,forced:b||_},{stringify:function(e,t,o){var s=d(arguments),i=r(b?T:p,null,s);return _&&"string"==typeof i?v(i,E,O):i}})},20433:(e,t,o)=>{"use strict";var s=o(92390),i=o(82003),r=o(76968);s({target:"Object",stat:!0},{fromEntries:function(e){var t={};return i(e,(function(e,o){r(t,e,o)}),{AS_ENTRIES:!0}),t}})},1555:(e,t,o)=>{"use strict";var s=o(92390),i=o(77802),r=o(71998).clear;s({global:!0,bind:!0,enumerable:!0,forced:i.clearImmediate!==r},{clearImmediate:r})},97552:(e,t,o)=>{"use strict";o(1555),o(66845)},66845:(e,t,o)=>{"use strict";var s=o(92390),i=o(77802),r=o(71998).set,n=o(91795),a=i.setImmediate?n(r,!1):r;s({global:!0,bind:!0,enumerable:!0,forced:i.setImmediate!==a},{setImmediate:a})}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}};return i[e].call(o.exports,o,o.exports,n),o.exports}n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var a={};return(()=>{"use strict";var e=a,t=n(73203);var o=D(n(73596));o.CellCoords,o.CellRange;var s,i,r,l,h,u=n(62929),d=D(n(75244)),c=n(33165),g=t(n(80265)),f=t(n(17954)),p=D(n(52870)),m=D(n(50095)),w=D(n(37595)),C=D(n(65320)),v=D(n(48150)),y=D(n(7374)),E=D(n(85015)),S=D(n(93315)),R=D(n(68145)),b=D(n(22232)),_=D(n(18609)),T=D(n(80151)),O=D(n(83302)),M=D(n(24449)),I=n(83605),A=n(7462),N=n(80239),P=n(65324),x=n(52036),H=n(36026);function k(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,o=new WeakMap;return(k=function(e){return e?o:t})(e)}function D(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var o=k(t);if(o&&o.has(e))return o.get(e);var s={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if("default"!==r&&Object.prototype.hasOwnProperty.call(e,r)){var n=i?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(s,r,n):s[r]=e[r]}return s.default=e,o&&o.set(e,s),s}(0,u.registerAllModules)(),(0,g.default)(o.default),o.default.__GhostTable=f.default,o.default._getListenersCounter=d.getListenersCounter,o.default._getRegisteredMapsCounter=c.getRegisteredMapsCounter,o.default.EventManager=d.default;const L=[m,w,C,v,y,E,S,R,b,_,T,p],W=[O,M];o.default.helper={},o.default.dom={},m.arrayEach(L,(e=>{m.arrayEach(Object.getOwnPropertyNames(e),(t=>{"_"!==t.charAt(0)&&(o.default.helper[t]=e[t])}))})),m.arrayEach(W,(e=>{m.arrayEach(Object.getOwnPropertyNames(e),(t=>{"_"!==t.charAt(0)&&(o.default.dom[t]=e[t])}))})),o.default.cellTypes=null!==(s=o.default.cellTypes)&&void 0!==s?s:{},m.arrayEach((0,P.getRegisteredCellTypeNames)(),(e=>{o.default.cellTypes[e]=(0,P.getCellType)(e)})),o.default.cellTypes.registerCellType=P.registerCellType,o.default.cellTypes.getCellType=P.getCellType,o.default.editors=null!==(i=o.default.editors)&&void 0!==i?i:{},m.arrayEach((0,I.getRegisteredEditorNames)(),(e=>{o.default.editors[`${_.toUpperCaseFirst(e)}Editor`]=(0,I.getEditor)(e)})),o.default.editors.registerEditor=I.registerEditor,o.default.editors.getEditor=I.getEditor,o.default.renderers=null!==(r=o.default.renderers)&&void 0!==r?r:{},m.arrayEach((0,A.getRegisteredRendererNames)(),(e=>{const t=(0,A.getRenderer)(e);"base"===e&&(o.default.renderers.cellDecorator=t),o.default.renderers[`${_.toUpperCaseFirst(e)}Renderer`]=t})),o.default.renderers.registerRenderer=A.registerRenderer,o.default.renderers.getRenderer=A.getRenderer,o.default.validators=null!==(l=o.default.validators)&&void 0!==l?l:{},m.arrayEach((0,N.getRegisteredValidatorNames)(),(e=>{o.default.validators[`${_.toUpperCaseFirst(e)}Validator`]=(0,N.getValidator)(e)})),o.default.validators.registerValidator=N.registerValidator,o.default.validators.getValidator=N.getValidator,o.default.plugins=null!==(h=o.default.plugins)&&void 0!==h?h:{},m.arrayEach((0,x.getPluginsNames)(),(e=>{o.default.plugins[e]=(0,x.getPlugin)(e)})),o.default.plugins[`${_.toUpperCaseFirst(H.BasePlugin.PLUGIN_KEY)}Plugin`]=H.BasePlugin,o.default.plugins.registerPlugin=x.registerPlugin,o.default.plugins.getPlugin=x.getPlugin;e.default=o.default})(),a=a.default})()));