@refinitiv-ui/efx-grid 6.0.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (837) hide show
  1. package/LICENSE +17 -0
  2. package/README.md +61 -0
  3. package/lib/column-format-dialog/index.d.ts +1 -0
  4. package/lib/column-format-dialog/index.js +1 -0
  5. package/lib/column-format-dialog/lib/column-format-dialog.d.ts +64 -0
  6. package/lib/column-format-dialog/lib/column-format-dialog.js +2713 -0
  7. package/lib/column-format-dialog/lib/locale/translation-de.d.ts +7 -0
  8. package/lib/column-format-dialog/lib/locale/translation-de.js +94 -0
  9. package/lib/column-format-dialog/lib/locale/translation-en.d.ts +7 -0
  10. package/lib/column-format-dialog/lib/locale/translation-en.js +94 -0
  11. package/lib/column-format-dialog/lib/locale/translation-ja.d.ts +7 -0
  12. package/lib/column-format-dialog/lib/locale/translation-ja.js +94 -0
  13. package/lib/column-format-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
  14. package/lib/column-format-dialog/lib/locale/translation-zh-hant.js +94 -0
  15. package/lib/column-format-dialog/lib/locale/translation-zh.d.ts +7 -0
  16. package/lib/column-format-dialog/lib/locale/translation-zh.js +94 -0
  17. package/lib/column-format-dialog/lib/locale/translation.d.ts +11 -0
  18. package/lib/column-format-dialog/lib/locale/translation.js +18 -0
  19. package/lib/column-format-dialog/lib/preview-table.d.ts +151 -0
  20. package/lib/column-format-dialog/lib/preview-table.js +995 -0
  21. package/lib/column-format-dialog/themes/base.less +429 -0
  22. package/lib/column-format-dialog/themes/elemental/column-format-dialog.less +1 -0
  23. package/lib/column-format-dialog/themes/elemental/dark/column-format-dialog.js +4 -0
  24. package/lib/column-format-dialog/themes/elemental/dark/css/native-elements.css +0 -0
  25. package/lib/column-format-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
  26. package/lib/column-format-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
  27. package/lib/column-format-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
  28. package/lib/column-format-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
  29. package/lib/column-format-dialog/themes/elemental/dark.js +16 -0
  30. package/lib/column-format-dialog/themes/elemental/defaults.less +1 -0
  31. package/lib/column-format-dialog/themes/elemental/index.less +5 -0
  32. package/lib/column-format-dialog/themes/elemental/light/column-format-dialog.js +4 -0
  33. package/lib/column-format-dialog/themes/elemental/light/css/native-elements.css +0 -0
  34. package/lib/column-format-dialog/themes/elemental/light/es5/all-elements.js +2 -0
  35. package/lib/column-format-dialog/themes/elemental/light/imports/all-elements.js +1 -0
  36. package/lib/column-format-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
  37. package/lib/column-format-dialog/themes/elemental/light/imports/native-elements.js +0 -0
  38. package/lib/column-format-dialog/themes/elemental/light.js +16 -0
  39. package/lib/column-format-dialog/themes/halo/column-format-dialog.less +6 -0
  40. package/lib/column-format-dialog/themes/halo/dark/column-format-dialog.js +4 -0
  41. package/lib/column-format-dialog/themes/halo/dark/css/native-elements.css +0 -0
  42. package/lib/column-format-dialog/themes/halo/dark/es5/all-elements.js +2 -0
  43. package/lib/column-format-dialog/themes/halo/dark/imports/all-elements.js +1 -0
  44. package/lib/column-format-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
  45. package/lib/column-format-dialog/themes/halo/dark/imports/native-elements.js +0 -0
  46. package/lib/column-format-dialog/themes/halo/dark.js +16 -0
  47. package/lib/column-format-dialog/themes/halo/defaults.less +1 -0
  48. package/lib/column-format-dialog/themes/halo/index.less +5 -0
  49. package/lib/column-format-dialog/themes/halo/light/column-format-dialog.js +4 -0
  50. package/lib/column-format-dialog/themes/halo/light/css/native-elements.css +0 -0
  51. package/lib/column-format-dialog/themes/halo/light/es5/all-elements.js +2 -0
  52. package/lib/column-format-dialog/themes/halo/light/imports/all-elements.js +1 -0
  53. package/lib/column-format-dialog/themes/halo/light/imports/custom-elements.js +1 -0
  54. package/lib/column-format-dialog/themes/halo/light/imports/native-elements.js +0 -0
  55. package/lib/column-format-dialog/themes/halo/light.js +16 -0
  56. package/lib/column-format-dialog/themes/luna/column-format-dialog.less +1 -0
  57. package/lib/column-format-dialog/themes/luna/default/column-format-dialog.js +4 -0
  58. package/lib/column-format-dialog/themes/luna/default/css/native-elements.css +0 -0
  59. package/lib/column-format-dialog/themes/luna/default/es5/all-elements.js +2 -0
  60. package/lib/column-format-dialog/themes/luna/default/imports/all-elements.js +1 -0
  61. package/lib/column-format-dialog/themes/luna/default/imports/custom-elements.js +1 -0
  62. package/lib/column-format-dialog/themes/luna/default/imports/native-elements.js +0 -0
  63. package/lib/column-format-dialog/themes/luna/defaults.less +1 -0
  64. package/lib/column-format-dialog/themes/luna/index.less +5 -0
  65. package/lib/column-format-dialog/themes/solar/charcoal/column-format-dialog.js +4 -0
  66. package/lib/column-format-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
  67. package/lib/column-format-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
  68. package/lib/column-format-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
  69. package/lib/column-format-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
  70. package/lib/column-format-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
  71. package/lib/column-format-dialog/themes/solar/charcoal.js +16 -0
  72. package/lib/column-format-dialog/themes/solar/column-format-dialog.less +6 -0
  73. package/lib/column-format-dialog/themes/solar/defaults.less +1 -0
  74. package/lib/column-format-dialog/themes/solar/index.less +5 -0
  75. package/lib/column-format-dialog/themes/solar/pearl/column-format-dialog.js +4 -0
  76. package/lib/column-format-dialog/themes/solar/pearl/css/native-elements.css +0 -0
  77. package/lib/column-format-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
  78. package/lib/column-format-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
  79. package/lib/column-format-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
  80. package/lib/column-format-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
  81. package/lib/column-format-dialog/themes/solar/pearl.js +16 -0
  82. package/lib/column-selection-dialog/index.d.ts +1 -0
  83. package/lib/column-selection-dialog/index.js +1 -0
  84. package/lib/column-selection-dialog/lib/column-selection-dialog.d.ts +41 -0
  85. package/lib/column-selection-dialog/lib/column-selection-dialog.js +1410 -0
  86. package/lib/column-selection-dialog/lib/locale/translation-de.d.ts +7 -0
  87. package/lib/column-selection-dialog/lib/locale/translation-de.js +19 -0
  88. package/lib/column-selection-dialog/lib/locale/translation-en.d.ts +7 -0
  89. package/lib/column-selection-dialog/lib/locale/translation-en.js +19 -0
  90. package/lib/column-selection-dialog/lib/locale/translation-ja.d.ts +7 -0
  91. package/lib/column-selection-dialog/lib/locale/translation-ja.js +19 -0
  92. package/lib/column-selection-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
  93. package/lib/column-selection-dialog/lib/locale/translation-zh-hant.js +19 -0
  94. package/lib/column-selection-dialog/lib/locale/translation-zh.d.ts +7 -0
  95. package/lib/column-selection-dialog/lib/locale/translation-zh.js +19 -0
  96. package/lib/column-selection-dialog/lib/locale/translation.d.ts +11 -0
  97. package/lib/column-selection-dialog/lib/locale/translation.js +18 -0
  98. package/lib/column-selection-dialog/themes/base.less +189 -0
  99. package/lib/column-selection-dialog/themes/elemental/column-selection-dialog.less +1 -0
  100. package/lib/column-selection-dialog/themes/elemental/dark/column-selection-dialog.js +4 -0
  101. package/lib/column-selection-dialog/themes/elemental/dark/css/native-elements.css +0 -0
  102. package/lib/column-selection-dialog/themes/elemental/dark/es5/all-elements.js +2 -0
  103. package/lib/column-selection-dialog/themes/elemental/dark/imports/all-elements.js +1 -0
  104. package/lib/column-selection-dialog/themes/elemental/dark/imports/custom-elements.js +1 -0
  105. package/lib/column-selection-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
  106. package/lib/column-selection-dialog/themes/elemental/dark.js +6 -0
  107. package/lib/column-selection-dialog/themes/elemental/defaults.less +1 -0
  108. package/lib/column-selection-dialog/themes/elemental/index.less +5 -0
  109. package/lib/column-selection-dialog/themes/elemental/light/column-selection-dialog.js +4 -0
  110. package/lib/column-selection-dialog/themes/elemental/light/css/native-elements.css +0 -0
  111. package/lib/column-selection-dialog/themes/elemental/light/es5/all-elements.js +2 -0
  112. package/lib/column-selection-dialog/themes/elemental/light/imports/all-elements.js +1 -0
  113. package/lib/column-selection-dialog/themes/elemental/light/imports/custom-elements.js +1 -0
  114. package/lib/column-selection-dialog/themes/elemental/light/imports/native-elements.js +0 -0
  115. package/lib/column-selection-dialog/themes/elemental/light.js +6 -0
  116. package/lib/column-selection-dialog/themes/halo/column-selection-dialog.less +22 -0
  117. package/lib/column-selection-dialog/themes/halo/dark/column-selection-dialog.js +4 -0
  118. package/lib/column-selection-dialog/themes/halo/dark/css/native-elements.css +0 -0
  119. package/lib/column-selection-dialog/themes/halo/dark/es5/all-elements.js +2 -0
  120. package/lib/column-selection-dialog/themes/halo/dark/imports/all-elements.js +1 -0
  121. package/lib/column-selection-dialog/themes/halo/dark/imports/custom-elements.js +1 -0
  122. package/lib/column-selection-dialog/themes/halo/dark/imports/native-elements.js +0 -0
  123. package/lib/column-selection-dialog/themes/halo/dark.js +6 -0
  124. package/lib/column-selection-dialog/themes/halo/defaults.less +1 -0
  125. package/lib/column-selection-dialog/themes/halo/index.less +6 -0
  126. package/lib/column-selection-dialog/themes/halo/light/column-selection-dialog.js +4 -0
  127. package/lib/column-selection-dialog/themes/halo/light/css/native-elements.css +0 -0
  128. package/lib/column-selection-dialog/themes/halo/light/es5/all-elements.js +2 -0
  129. package/lib/column-selection-dialog/themes/halo/light/imports/all-elements.js +1 -0
  130. package/lib/column-selection-dialog/themes/halo/light/imports/custom-elements.js +1 -0
  131. package/lib/column-selection-dialog/themes/halo/light/imports/native-elements.js +0 -0
  132. package/lib/column-selection-dialog/themes/halo/light.js +6 -0
  133. package/lib/column-selection-dialog/themes/solar/charcoal/column-selection-dialog.js +4 -0
  134. package/lib/column-selection-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
  135. package/lib/column-selection-dialog/themes/solar/charcoal/es5/all-elements.js +2 -0
  136. package/lib/column-selection-dialog/themes/solar/charcoal/imports/all-elements.js +1 -0
  137. package/lib/column-selection-dialog/themes/solar/charcoal/imports/custom-elements.js +1 -0
  138. package/lib/column-selection-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
  139. package/lib/column-selection-dialog/themes/solar/charcoal.js +6 -0
  140. package/lib/column-selection-dialog/themes/solar/column-selection-dialog.less +1 -0
  141. package/lib/column-selection-dialog/themes/solar/defaults.less +1 -0
  142. package/lib/column-selection-dialog/themes/solar/index.less +6 -0
  143. package/lib/column-selection-dialog/themes/solar/pearl/column-selection-dialog.js +4 -0
  144. package/lib/column-selection-dialog/themes/solar/pearl/css/native-elements.css +0 -0
  145. package/lib/column-selection-dialog/themes/solar/pearl/es5/all-elements.js +2 -0
  146. package/lib/column-selection-dialog/themes/solar/pearl/imports/all-elements.js +1 -0
  147. package/lib/column-selection-dialog/themes/solar/pearl/imports/custom-elements.js +1 -0
  148. package/lib/column-selection-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
  149. package/lib/column-selection-dialog/themes/solar/pearl.js +6 -0
  150. package/lib/core/dist/core.css +1 -0
  151. package/lib/core/dist/core.js +28075 -0
  152. package/lib/core/dist/core.min.js +1 -0
  153. package/lib/core/es6/data/ColumnStats.d.ts +42 -0
  154. package/lib/core/es6/data/ColumnStats.js +428 -0
  155. package/lib/core/es6/data/DataCache.d.ts +81 -0
  156. package/lib/core/es6/data/DataCache.js +1317 -0
  157. package/lib/core/es6/data/DataTable.d.ts +125 -0
  158. package/lib/core/es6/data/DataTable.js +1655 -0
  159. package/lib/core/es6/data/DataView.d.ts +280 -0
  160. package/lib/core/es6/data/DataView.js +3654 -0
  161. package/lib/core/es6/data/Segment.d.ts +38 -0
  162. package/lib/core/es6/data/Segment.js +193 -0
  163. package/lib/core/es6/data/SegmentCollection.d.ts +58 -0
  164. package/lib/core/es6/data/SegmentCollection.js +431 -0
  165. package/lib/core/es6/grid/Core.d.ts +387 -0
  166. package/lib/core/es6/grid/Core.js +4939 -0
  167. package/lib/core/es6/grid/ILayoutGrid.d.ts +204 -0
  168. package/lib/core/es6/grid/ILayoutGrid.js +658 -0
  169. package/lib/core/es6/grid/LayoutGrid.d.ts +23 -0
  170. package/lib/core/es6/grid/LayoutGrid.js +2602 -0
  171. package/lib/core/es6/grid/VirtualizedLayoutGrid.d.ts +18 -0
  172. package/lib/core/es6/grid/VirtualizedLayoutGrid.js +907 -0
  173. package/lib/core/es6/grid/components/Cell.d.ts +50 -0
  174. package/lib/core/es6/grid/components/Cell.js +740 -0
  175. package/lib/core/es6/grid/components/CellFloatingPanel.d.ts +19 -0
  176. package/lib/core/es6/grid/components/CellFloatingPanel.js +123 -0
  177. package/lib/core/es6/grid/components/CellSpan.d.ts +18 -0
  178. package/lib/core/es6/grid/components/CellSpan.js +99 -0
  179. package/lib/core/es6/grid/components/CellSpans.d.ts +38 -0
  180. package/lib/core/es6/grid/components/CellSpans.js +341 -0
  181. package/lib/core/es6/grid/components/Column.d.ts +22 -0
  182. package/lib/core/es6/grid/components/Column.js +612 -0
  183. package/lib/core/es6/grid/components/ElementWrapper.d.ts +125 -0
  184. package/lib/core/es6/grid/components/ElementWrapper.js +714 -0
  185. package/lib/core/es6/grid/components/HScrollbar.d.ts +24 -0
  186. package/lib/core/es6/grid/components/HScrollbar.js +222 -0
  187. package/lib/core/es6/grid/components/Scrollbar.d.ts +61 -0
  188. package/lib/core/es6/grid/components/Scrollbar.js +1374 -0
  189. package/lib/core/es6/grid/components/StretchedCells.d.ts +17 -0
  190. package/lib/core/es6/grid/components/StretchedCells.js +328 -0
  191. package/lib/core/es6/grid/components/VScrollbar.d.ts +18 -0
  192. package/lib/core/es6/grid/components/VScrollbar.js +139 -0
  193. package/lib/core/es6/grid/components/VirtualItems.d.ts +12 -0
  194. package/lib/core/es6/grid/components/VirtualItems.js +51 -0
  195. package/lib/core/es6/grid/event/EventDispatcher.d.ts +16 -0
  196. package/lib/core/es6/grid/event/EventDispatcher.js +138 -0
  197. package/lib/core/es6/grid/event/EventListeners.d.ts +34 -0
  198. package/lib/core/es6/grid/event/EventListeners.js +163 -0
  199. package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.d.ts +24 -0
  200. package/lib/core/es6/grid/plugins/DragAndDropTitlePlugin.js +615 -0
  201. package/lib/core/es6/grid/plugins/Plugin.d.ts +28 -0
  202. package/lib/core/es6/grid/plugins/Plugin.js +272 -0
  203. package/lib/core/es6/grid/plugins/SortableTitlePlugin.d.ts +127 -0
  204. package/lib/core/es6/grid/plugins/SortableTitlePlugin.js +1707 -0
  205. package/lib/core/es6/grid/util/Conflator.d.ts +32 -0
  206. package/lib/core/es6/grid/util/Conflator.js +191 -0
  207. package/lib/core/es6/grid/util/ElementFrameWork.d.ts +18 -0
  208. package/lib/core/es6/grid/util/ElementFrameWork.js +227 -0
  209. package/lib/core/es6/grid/util/HttpRequest.d.ts +53 -0
  210. package/lib/core/es6/grid/util/HttpRequest.js +371 -0
  211. package/lib/core/es6/grid/util/PercentBar.d.ts +43 -0
  212. package/lib/core/es6/grid/util/PercentBar.js +390 -0
  213. package/lib/core/es6/grid/util/PercentBarRenderer.d.ts +41 -0
  214. package/lib/core/es6/grid/util/PercentBarRenderer.js +316 -0
  215. package/lib/core/es6/grid/util/RangeBar.d.ts +25 -0
  216. package/lib/core/es6/grid/util/RangeBar.js +255 -0
  217. package/lib/core/es6/grid/util/Reverter.d.ts +14 -0
  218. package/lib/core/es6/grid/util/Reverter.js +79 -0
  219. package/lib/core/es6/grid/util/SectionSettings.d.ts +79 -0
  220. package/lib/core/es6/grid/util/SectionSettings.js +674 -0
  221. package/lib/core/es6/grid/util/SelectionList.d.ts +50 -0
  222. package/lib/core/es6/grid/util/SelectionList.js +422 -0
  223. package/lib/core/es6/grid/util/TrackLayout.d.ts +84 -0
  224. package/lib/core/es6/grid/util/TrackLayout.js +850 -0
  225. package/lib/core/es6/grid/util/Virtualizer.d.ts +40 -0
  226. package/lib/core/es6/grid/util/Virtualizer.js +340 -0
  227. package/lib/core/es6/grid/util/util.d.ts +18 -0
  228. package/lib/core/es6/grid/util/util.js +450 -0
  229. package/lib/core/es6/index.d.ts +84 -0
  230. package/lib/core/es6/index.js +132 -0
  231. package/lib/core/es6/tr-grid-theme.d.ts +5 -0
  232. package/lib/core/es6/tr-grid-theme.js +5 -0
  233. package/lib/filter-dialog/index.d.ts +1 -0
  234. package/lib/filter-dialog/index.js +1 -0
  235. package/lib/filter-dialog/lib/checkbox-list.d.ts +27 -0
  236. package/lib/filter-dialog/lib/checkbox-list.js +336 -0
  237. package/lib/filter-dialog/lib/filter-dialog.d.ts +53 -0
  238. package/lib/filter-dialog/lib/filter-dialog.js +860 -0
  239. package/lib/filter-dialog/lib/locale/translation-de.d.ts +7 -0
  240. package/lib/filter-dialog/lib/locale/translation-de.js +37 -0
  241. package/lib/filter-dialog/lib/locale/translation-en.d.ts +7 -0
  242. package/lib/filter-dialog/lib/locale/translation-en.js +37 -0
  243. package/lib/filter-dialog/lib/locale/translation-ja.d.ts +7 -0
  244. package/lib/filter-dialog/lib/locale/translation-ja.js +37 -0
  245. package/lib/filter-dialog/lib/locale/translation-zh-hant.d.ts +7 -0
  246. package/lib/filter-dialog/lib/locale/translation-zh-hant.js +37 -0
  247. package/lib/filter-dialog/lib/locale/translation-zh.d.ts +7 -0
  248. package/lib/filter-dialog/lib/locale/translation-zh.js +37 -0
  249. package/lib/filter-dialog/lib/locale/translation.d.ts +11 -0
  250. package/lib/filter-dialog/lib/locale/translation.js +18 -0
  251. package/lib/filter-dialog/themes/base-checkbox.less +37 -0
  252. package/lib/filter-dialog/themes/base.less +102 -0
  253. package/lib/filter-dialog/themes/elemental/checkbox-list.less +3 -0
  254. package/lib/filter-dialog/themes/elemental/dark/checkbox-list.js +4 -0
  255. package/lib/filter-dialog/themes/elemental/dark/css/native-elements.css +0 -0
  256. package/lib/filter-dialog/themes/elemental/dark/es5/all-elements.js +4 -0
  257. package/lib/filter-dialog/themes/elemental/dark/filter-dialog.js +5 -0
  258. package/lib/filter-dialog/themes/elemental/dark/imports/all-elements.js +2 -0
  259. package/lib/filter-dialog/themes/elemental/dark/imports/custom-elements.js +2 -0
  260. package/lib/filter-dialog/themes/elemental/dark/imports/native-elements.js +0 -0
  261. package/lib/filter-dialog/themes/elemental/dark.js +11 -0
  262. package/lib/filter-dialog/themes/elemental/defaults.less +3 -0
  263. package/lib/filter-dialog/themes/elemental/filter-dialog.less +1 -0
  264. package/lib/filter-dialog/themes/elemental/index.less +6 -0
  265. package/lib/filter-dialog/themes/elemental/light/checkbox-list.js +4 -0
  266. package/lib/filter-dialog/themes/elemental/light/css/native-elements.css +0 -0
  267. package/lib/filter-dialog/themes/elemental/light/es5/all-elements.js +4 -0
  268. package/lib/filter-dialog/themes/elemental/light/filter-dialog.js +5 -0
  269. package/lib/filter-dialog/themes/elemental/light/imports/all-elements.js +2 -0
  270. package/lib/filter-dialog/themes/elemental/light/imports/custom-elements.js +2 -0
  271. package/lib/filter-dialog/themes/elemental/light/imports/native-elements.js +0 -0
  272. package/lib/filter-dialog/themes/elemental/light.js +11 -0
  273. package/lib/filter-dialog/themes/halo/checkbox-list.less +3 -0
  274. package/lib/filter-dialog/themes/halo/dark/checkbox-list.js +4 -0
  275. package/lib/filter-dialog/themes/halo/dark/css/native-elements.css +0 -0
  276. package/lib/filter-dialog/themes/halo/dark/es5/all-elements.js +4 -0
  277. package/lib/filter-dialog/themes/halo/dark/filter-dialog.js +5 -0
  278. package/lib/filter-dialog/themes/halo/dark/imports/all-elements.js +2 -0
  279. package/lib/filter-dialog/themes/halo/dark/imports/custom-elements.js +2 -0
  280. package/lib/filter-dialog/themes/halo/dark/imports/native-elements.js +0 -0
  281. package/lib/filter-dialog/themes/halo/dark.js +11 -0
  282. package/lib/filter-dialog/themes/halo/defaults.less +3 -0
  283. package/lib/filter-dialog/themes/halo/filter-dialog.less +9 -0
  284. package/lib/filter-dialog/themes/halo/index.less +6 -0
  285. package/lib/filter-dialog/themes/halo/light/checkbox-list.js +4 -0
  286. package/lib/filter-dialog/themes/halo/light/css/native-elements.css +0 -0
  287. package/lib/filter-dialog/themes/halo/light/es5/all-elements.js +4 -0
  288. package/lib/filter-dialog/themes/halo/light/filter-dialog.js +5 -0
  289. package/lib/filter-dialog/themes/halo/light/imports/all-elements.js +2 -0
  290. package/lib/filter-dialog/themes/halo/light/imports/custom-elements.js +2 -0
  291. package/lib/filter-dialog/themes/halo/light/imports/native-elements.js +0 -0
  292. package/lib/filter-dialog/themes/halo/light.js +11 -0
  293. package/lib/filter-dialog/themes/solar/charcoal/checkbox-list.js +4 -0
  294. package/lib/filter-dialog/themes/solar/charcoal/css/native-elements.css +0 -0
  295. package/lib/filter-dialog/themes/solar/charcoal/es5/all-elements.js +4 -0
  296. package/lib/filter-dialog/themes/solar/charcoal/filter-dialog.js +5 -0
  297. package/lib/filter-dialog/themes/solar/charcoal/imports/all-elements.js +2 -0
  298. package/lib/filter-dialog/themes/solar/charcoal/imports/custom-elements.js +2 -0
  299. package/lib/filter-dialog/themes/solar/charcoal/imports/native-elements.js +0 -0
  300. package/lib/filter-dialog/themes/solar/charcoal.js +11 -0
  301. package/lib/filter-dialog/themes/solar/checkbox-list.less +3 -0
  302. package/lib/filter-dialog/themes/solar/defaults.less +3 -0
  303. package/lib/filter-dialog/themes/solar/filter-dialog.less +5 -0
  304. package/lib/filter-dialog/themes/solar/index.less +6 -0
  305. package/lib/filter-dialog/themes/solar/pearl/checkbox-list.js +4 -0
  306. package/lib/filter-dialog/themes/solar/pearl/css/native-elements.css +0 -0
  307. package/lib/filter-dialog/themes/solar/pearl/es5/all-elements.js +4 -0
  308. package/lib/filter-dialog/themes/solar/pearl/filter-dialog.js +5 -0
  309. package/lib/filter-dialog/themes/solar/pearl/imports/all-elements.js +2 -0
  310. package/lib/filter-dialog/themes/solar/pearl/imports/custom-elements.js +2 -0
  311. package/lib/filter-dialog/themes/solar/pearl/imports/native-elements.js +0 -0
  312. package/lib/filter-dialog/themes/solar/pearl.js +11 -0
  313. package/lib/formatters/es6/CoralButtonFormatter.d.ts +22 -0
  314. package/lib/formatters/es6/CoralButtonFormatter.js +40 -0
  315. package/lib/formatters/es6/CoralCheckboxFormatter.d.ts +12 -0
  316. package/lib/formatters/es6/CoralCheckboxFormatter.js +45 -0
  317. package/lib/formatters/es6/CoralComboBoxFormatter.d.ts +23 -0
  318. package/lib/formatters/es6/CoralComboBoxFormatter.js +102 -0
  319. package/lib/formatters/es6/CoralIconFormatter.d.ts +23 -0
  320. package/lib/formatters/es6/CoralIconFormatter.js +45 -0
  321. package/lib/formatters/es6/CoralInputFormatter.d.ts +12 -0
  322. package/lib/formatters/es6/CoralInputFormatter.js +40 -0
  323. package/lib/formatters/es6/CoralRadioButtonFormatter.d.ts +22 -0
  324. package/lib/formatters/es6/CoralRadioButtonFormatter.js +80 -0
  325. package/lib/formatters/es6/CoralSelectFormatter.d.ts +23 -0
  326. package/lib/formatters/es6/CoralSelectFormatter.js +66 -0
  327. package/lib/formatters/es6/CoralToggleFormatter.d.ts +12 -0
  328. package/lib/formatters/es6/CoralToggleFormatter.js +47 -0
  329. package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
  330. package/lib/formatters/es6/DuplexEmeraldDateTimePickerFormatter.js +119 -0
  331. package/lib/formatters/es6/EFButtonFormatter.d.ts +22 -0
  332. package/lib/formatters/es6/EFButtonFormatter.js +40 -0
  333. package/lib/formatters/es6/EFCheckboxFormatter.d.ts +12 -0
  334. package/lib/formatters/es6/EFCheckboxFormatter.js +45 -0
  335. package/lib/formatters/es6/EFComboBoxFormatter.d.ts +23 -0
  336. package/lib/formatters/es6/EFComboBoxFormatter.js +68 -0
  337. package/lib/formatters/es6/EFDateTimePickerFormatter.d.ts +13 -0
  338. package/lib/formatters/es6/EFDateTimePickerFormatter.js +55 -0
  339. package/lib/formatters/es6/EFIconFormatter.d.ts +23 -0
  340. package/lib/formatters/es6/EFIconFormatter.js +45 -0
  341. package/lib/formatters/es6/EFNumberFieldFormatter.d.ts +12 -0
  342. package/lib/formatters/es6/EFNumberFieldFormatter.js +40 -0
  343. package/lib/formatters/es6/EFRadioButtonFormatter.d.ts +22 -0
  344. package/lib/formatters/es6/EFRadioButtonFormatter.js +80 -0
  345. package/lib/formatters/es6/EFSelectFormatter.d.ts +23 -0
  346. package/lib/formatters/es6/EFSelectFormatter.js +66 -0
  347. package/lib/formatters/es6/EFTextFieldFormatter.d.ts +12 -0
  348. package/lib/formatters/es6/EFTextFieldFormatter.js +40 -0
  349. package/lib/formatters/es6/EFToggleFormatter.d.ts +12 -0
  350. package/lib/formatters/es6/EFToggleFormatter.js +47 -0
  351. package/lib/formatters/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
  352. package/lib/formatters/es6/EmeraldDateTimePickerFormatter.js +55 -0
  353. package/lib/formatters/es6/FormatterBuilder.d.ts +22 -0
  354. package/lib/formatters/es6/FormatterBuilder.js +334 -0
  355. package/lib/formatters/es6/NumericInputFormatter.d.ts +13 -0
  356. package/lib/formatters/es6/NumericInputFormatter.js +64 -0
  357. package/lib/formatters/es6/PercentBarFormatter.d.ts +25 -0
  358. package/lib/formatters/es6/PercentBarFormatter.js +62 -0
  359. package/lib/formatters/es6/SimpleImageFormatter.d.ts +21 -0
  360. package/lib/formatters/es6/SimpleImageFormatter.js +64 -0
  361. package/lib/formatters/es6/SimpleInputFormatter.d.ts +12 -0
  362. package/lib/formatters/es6/SimpleInputFormatter.js +40 -0
  363. package/lib/formatters/es6/SimpleLinkFormatter.d.ts +21 -0
  364. package/lib/formatters/es6/SimpleLinkFormatter.js +48 -0
  365. package/lib/formatters/es6/SimpleTickerFormatter.d.ts +25 -0
  366. package/lib/formatters/es6/SimpleTickerFormatter.js +65 -0
  367. package/lib/formatters/es6/SimpleToggleFormatter.d.ts +22 -0
  368. package/lib/formatters/es6/SimpleToggleFormatter.js +132 -0
  369. package/lib/formatters/es6/TextFormatter.d.ts +12 -0
  370. package/lib/formatters/es6/TextFormatter.js +30 -0
  371. package/lib/formatters/es6/index.d.ts +43 -0
  372. package/lib/formatters/es6/index.js +67 -0
  373. package/lib/grid/index.d.ts +1 -0
  374. package/lib/grid/index.js +2 -0
  375. package/lib/grid/lib/efx-grid.d.ts +32 -0
  376. package/lib/grid/lib/efx-grid.js +469 -0
  377. package/lib/grid/themes/base.less +134 -0
  378. package/lib/grid/themes/halo/dark/css/native-elements.css +0 -0
  379. package/lib/grid/themes/halo/dark/efx-grid.js +4 -0
  380. package/lib/grid/themes/halo/dark/es5/all-elements.js +2 -0
  381. package/lib/grid/themes/halo/dark/imports/all-elements.js +1 -0
  382. package/lib/grid/themes/halo/dark/imports/custom-elements.js +1 -0
  383. package/lib/grid/themes/halo/dark/imports/native-elements.js +0 -0
  384. package/lib/grid/themes/halo/dark.js +3 -0
  385. package/lib/grid/themes/halo/efx-grid.less +92 -0
  386. package/lib/grid/themes/halo/index.less +3 -0
  387. package/lib/grid/themes/halo/light/css/native-elements.css +0 -0
  388. package/lib/grid/themes/halo/light/efx-grid.js +4 -0
  389. package/lib/grid/themes/halo/light/es5/all-elements.js +2 -0
  390. package/lib/grid/themes/halo/light/imports/all-elements.js +1 -0
  391. package/lib/grid/themes/halo/light/imports/custom-elements.js +1 -0
  392. package/lib/grid/themes/halo/light/imports/native-elements.js +0 -0
  393. package/lib/grid/themes/halo/light.js +3 -0
  394. package/lib/grid/themes/solar/charcoal/css/native-elements.css +0 -0
  395. package/lib/grid/themes/solar/charcoal/efx-grid.js +4 -0
  396. package/lib/grid/themes/solar/charcoal/es5/all-elements.js +2 -0
  397. package/lib/grid/themes/solar/charcoal/imports/all-elements.js +1 -0
  398. package/lib/grid/themes/solar/charcoal/imports/custom-elements.js +1 -0
  399. package/lib/grid/themes/solar/charcoal/imports/native-elements.js +0 -0
  400. package/lib/grid/themes/solar/charcoal.js +3 -0
  401. package/lib/grid/themes/solar/efx-grid.less +27 -0
  402. package/lib/grid/themes/solar/index.less +3 -0
  403. package/lib/grid/themes/solar/pearl/css/native-elements.css +0 -0
  404. package/lib/grid/themes/solar/pearl/efx-grid.js +4 -0
  405. package/lib/grid/themes/solar/pearl/es5/all-elements.js +2 -0
  406. package/lib/grid/themes/solar/pearl/imports/all-elements.js +1 -0
  407. package/lib/grid/themes/solar/pearl/imports/custom-elements.js +1 -0
  408. package/lib/grid/themes/solar/pearl/imports/native-elements.js +0 -0
  409. package/lib/grid/themes/solar/pearl.js +3 -0
  410. package/lib/index.d.ts +102 -0
  411. package/lib/index.js +102 -0
  412. package/lib/row-segmenting/es6/RowSegmenting.d.ts +83 -0
  413. package/lib/row-segmenting/es6/RowSegmenting.js +592 -0
  414. package/lib/row-segmenting/es6/index.d.ts +1 -0
  415. package/lib/row-segmenting/es6/index.js +1 -0
  416. package/lib/rt-grid/dist/rt-grid.js +44672 -0
  417. package/lib/rt-grid/dist/rt-grid.min.js +1 -0
  418. package/lib/rt-grid/es6/ColumnDefinition.d.ts +141 -0
  419. package/lib/rt-grid/es6/ColumnDefinition.js +1074 -0
  420. package/lib/rt-grid/es6/DataConnector.d.ts +37 -0
  421. package/lib/rt-grid/es6/DataConnector.js +266 -0
  422. package/lib/rt-grid/es6/FieldDefinition.d.ts +20 -0
  423. package/lib/rt-grid/es6/FieldDefinition.js +418 -0
  424. package/lib/rt-grid/es6/Grid.d.ts +261 -0
  425. package/lib/rt-grid/es6/Grid.js +2893 -0
  426. package/lib/rt-grid/es6/PredefinedFormula.d.ts +16 -0
  427. package/lib/rt-grid/es6/PredefinedFormula.js +33 -0
  428. package/lib/rt-grid/es6/ReferenceCounter.d.ts +38 -0
  429. package/lib/rt-grid/es6/ReferenceCounter.js +230 -0
  430. package/lib/rt-grid/es6/RowDefinition.d.ts +120 -0
  431. package/lib/rt-grid/es6/RowDefinition.js +873 -0
  432. package/lib/rt-grid/es6/SnapshotFiller.d.ts +21 -0
  433. package/lib/rt-grid/es6/SnapshotFiller.js +252 -0
  434. package/lib/rt-grid/es6/StyleLoader.d.ts +17 -0
  435. package/lib/rt-grid/es6/StyleLoader.js +47 -0
  436. package/lib/rt-grid/es6/index.d.ts +8 -0
  437. package/lib/rt-grid/es6/index.js +43 -0
  438. package/lib/statistics-row/es6/StatisticsRow.d.ts +67 -0
  439. package/lib/statistics-row/es6/StatisticsRow.js +786 -0
  440. package/lib/statistics-row/es6/index.d.ts +1 -0
  441. package/lib/statistics-row/es6/index.js +1 -0
  442. package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.d.ts +45 -0
  443. package/lib/tr-grid-auto-tooltip/es6/AutoTooltip.js +431 -0
  444. package/lib/tr-grid-auto-tooltip/es6/index.d.ts +1 -0
  445. package/lib/tr-grid-auto-tooltip/es6/index.js +1 -0
  446. package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +67 -0
  447. package/lib/tr-grid-cell-selection/es6/CellSelection.js +1777 -0
  448. package/lib/tr-grid-cell-selection/es6/index.d.ts +1 -0
  449. package/lib/tr-grid-cell-selection/es6/index.js +1 -0
  450. package/lib/tr-grid-checkbox/es6/Checkbox.d.ts +69 -0
  451. package/lib/tr-grid-checkbox/es6/Checkbox.js +1476 -0
  452. package/lib/tr-grid-checkbox/es6/index.d.ts +1 -0
  453. package/lib/tr-grid-checkbox/es6/index.js +1 -0
  454. package/lib/tr-grid-column-fitter/es6/ColumnFitter.d.ts +56 -0
  455. package/lib/tr-grid-column-fitter/es6/ColumnFitter.js +1000 -0
  456. package/lib/tr-grid-column-fitter/es6/index.d.ts +1 -0
  457. package/lib/tr-grid-column-fitter/es6/index.js +1 -0
  458. package/lib/tr-grid-column-formatting/es6/ColumnFormatting.d.ts +89 -0
  459. package/lib/tr-grid-column-formatting/es6/ColumnFormatting.js +615 -0
  460. package/lib/tr-grid-column-formatting/es6/index.d.ts +1 -0
  461. package/lib/tr-grid-column-formatting/es6/index.js +1 -0
  462. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +60 -0
  463. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +913 -0
  464. package/lib/tr-grid-column-grouping/es6/index.d.ts +1 -0
  465. package/lib/tr-grid-column-grouping/es6/index.js +1 -0
  466. package/lib/tr-grid-column-resizing/es6/ColumnResizing.d.ts +68 -0
  467. package/lib/tr-grid-column-resizing/es6/ColumnResizing.js +1013 -0
  468. package/lib/tr-grid-column-resizing/es6/index.d.ts +1 -0
  469. package/lib/tr-grid-column-resizing/es6/index.js +1 -0
  470. package/lib/tr-grid-column-selection/es6/ColumnSelection.d.ts +70 -0
  471. package/lib/tr-grid-column-selection/es6/ColumnSelection.js +928 -0
  472. package/lib/tr-grid-column-selection/es6/index.d.ts +1 -0
  473. package/lib/tr-grid-column-selection/es6/index.js +1 -0
  474. package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +76 -0
  475. package/lib/tr-grid-column-stack/es6/ColumnStack.js +1227 -0
  476. package/lib/tr-grid-column-stack/es6/index.d.ts +1 -0
  477. package/lib/tr-grid-column-stack/es6/index.js +1 -0
  478. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.d.ts +70 -0
  479. package/lib/tr-grid-conditional-coloring/es6/ConditionalColoring.js +947 -0
  480. package/lib/tr-grid-conditional-coloring/es6/index.d.ts +1 -0
  481. package/lib/tr-grid-conditional-coloring/es6/index.js +1 -0
  482. package/lib/tr-grid-content-wrap/es6/ContentWrap.d.ts +43 -0
  483. package/lib/tr-grid-content-wrap/es6/ContentWrap.js +478 -0
  484. package/lib/tr-grid-content-wrap/es6/index.d.ts +1 -0
  485. package/lib/tr-grid-content-wrap/es6/index.js +1 -0
  486. package/lib/tr-grid-contextmenu/es6/ContextMenu.d.ts +83 -0
  487. package/lib/tr-grid-contextmenu/es6/ContextMenu.js +471 -0
  488. package/lib/tr-grid-contextmenu/es6/MenuEventAPI.d.ts +22 -0
  489. package/lib/tr-grid-contextmenu/es6/MenuEventAPI.js +133 -0
  490. package/lib/tr-grid-contextmenu/es6/MenuItem.d.ts +39 -0
  491. package/lib/tr-grid-contextmenu/es6/MenuItem.js +245 -0
  492. package/lib/tr-grid-contextmenu/es6/PopupMenu.d.ts +29 -0
  493. package/lib/tr-grid-contextmenu/es6/PopupMenu.js +292 -0
  494. package/lib/tr-grid-contextmenu/es6/index.d.ts +1 -0
  495. package/lib/tr-grid-contextmenu/es6/index.js +1 -0
  496. package/lib/tr-grid-filter-input/es6/FilterInput.d.ts +57 -0
  497. package/lib/tr-grid-filter-input/es6/FilterInput.js +928 -0
  498. package/lib/tr-grid-filter-input/es6/index.d.ts +1 -0
  499. package/lib/tr-grid-filter-input/es6/index.js +1 -0
  500. package/lib/tr-grid-heat-map/es6/HeatMap.d.ts +44 -0
  501. package/lib/tr-grid-heat-map/es6/HeatMap.js +394 -0
  502. package/lib/tr-grid-heat-map/es6/index.d.ts +1 -0
  503. package/lib/tr-grid-heat-map/es6/index.js +1 -0
  504. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.d.ts +129 -0
  505. package/lib/tr-grid-in-cell-editing/es6/InCellEditing.js +1977 -0
  506. package/lib/tr-grid-in-cell-editing/es6/index.d.ts +1 -0
  507. package/lib/tr-grid-in-cell-editing/es6/index.js +1 -0
  508. package/lib/tr-grid-pagination/es6/Pagination.d.ts +57 -0
  509. package/lib/tr-grid-pagination/es6/Pagination.js +427 -0
  510. package/lib/tr-grid-pagination/es6/index.d.ts +1 -0
  511. package/lib/tr-grid-pagination/es6/index.js +1 -0
  512. package/lib/tr-grid-percent-bar/es6/PercentBar.d.ts +60 -0
  513. package/lib/tr-grid-percent-bar/es6/PercentBar.js +801 -0
  514. package/lib/tr-grid-percent-bar/es6/index.d.ts +1 -0
  515. package/lib/tr-grid-percent-bar/es6/index.js +1 -0
  516. package/lib/tr-grid-printer/es6/CellWriter.d.ts +49 -0
  517. package/lib/tr-grid-printer/es6/CellWriter.js +226 -0
  518. package/lib/tr-grid-printer/es6/ColumnWriter.d.ts +12 -0
  519. package/lib/tr-grid-printer/es6/ColumnWriter.js +21 -0
  520. package/lib/tr-grid-printer/es6/GridPrinter.d.ts +32 -0
  521. package/lib/tr-grid-printer/es6/GridPrinter.js +761 -0
  522. package/lib/tr-grid-printer/es6/PrintTrait.d.ts +38 -0
  523. package/lib/tr-grid-printer/es6/PrintTrait.js +481 -0
  524. package/lib/tr-grid-printer/es6/SectionWriter.d.ts +54 -0
  525. package/lib/tr-grid-printer/es6/SectionWriter.js +205 -0
  526. package/lib/tr-grid-printer/es6/index.d.ts +1 -0
  527. package/lib/tr-grid-printer/es6/index.js +1 -0
  528. package/lib/tr-grid-range-bar/es6/RangeBar.d.ts +39 -0
  529. package/lib/tr-grid-range-bar/es6/RangeBar.js +353 -0
  530. package/lib/tr-grid-range-bar/es6/index.d.ts +1 -0
  531. package/lib/tr-grid-range-bar/es6/index.js +1 -0
  532. package/lib/tr-grid-row-dragging/es6/RowDragging.d.ts +53 -0
  533. package/lib/tr-grid-row-dragging/es6/RowDragging.js +794 -0
  534. package/lib/tr-grid-row-dragging/es6/index.d.ts +1 -0
  535. package/lib/tr-grid-row-dragging/es6/index.js +1 -0
  536. package/lib/tr-grid-row-filtering/es6/RowFiltering.d.ts +118 -0
  537. package/lib/tr-grid-row-filtering/es6/RowFiltering.js +1884 -0
  538. package/lib/tr-grid-row-filtering/es6/index.d.ts +1 -0
  539. package/lib/tr-grid-row-filtering/es6/index.js +1 -0
  540. package/lib/tr-grid-row-grouping/es6/RowGrouping.d.ts +109 -0
  541. package/lib/tr-grid-row-grouping/es6/RowGrouping.js +1541 -0
  542. package/lib/tr-grid-row-grouping/es6/index.d.ts +1 -0
  543. package/lib/tr-grid-row-grouping/es6/index.js +1 -0
  544. package/lib/tr-grid-row-selection/es6/RowSelection.d.ts +74 -0
  545. package/lib/tr-grid-row-selection/es6/RowSelection.js +1202 -0
  546. package/lib/tr-grid-row-selection/es6/index.d.ts +1 -0
  547. package/lib/tr-grid-row-selection/es6/index.js +1 -0
  548. package/lib/tr-grid-rowcoloring/es6/RowColoring.d.ts +60 -0
  549. package/lib/tr-grid-rowcoloring/es6/RowColoring.js +611 -0
  550. package/lib/tr-grid-rowcoloring/es6/index.d.ts +1 -0
  551. package/lib/tr-grid-rowcoloring/es6/index.js +1 -0
  552. package/lib/tr-grid-textformatting/es6/TextFormatting.d.ts +77 -0
  553. package/lib/tr-grid-textformatting/es6/TextFormatting.js +574 -0
  554. package/lib/tr-grid-textformatting/es6/index.d.ts +1 -0
  555. package/lib/tr-grid-textformatting/es6/index.js +1 -0
  556. package/lib/tr-grid-titlewrap/es6/TitleWrap.d.ts +29 -0
  557. package/lib/tr-grid-titlewrap/es6/TitleWrap.js +431 -0
  558. package/lib/tr-grid-titlewrap/es6/index.d.ts +1 -0
  559. package/lib/tr-grid-titlewrap/es6/index.js +1 -0
  560. package/lib/tr-grid-util/es6/CellPainter.d.ts +136 -0
  561. package/lib/tr-grid-util/es6/CellPainter.js +1128 -0
  562. package/lib/tr-grid-util/es6/Conflator.d.ts +34 -0
  563. package/lib/tr-grid-util/es6/Conflator.js +193 -0
  564. package/lib/tr-grid-util/es6/CoralItems.d.ts +10 -0
  565. package/lib/tr-grid-util/es6/CoralItems.js +42 -0
  566. package/lib/tr-grid-util/es6/DateTime.d.ts +57 -0
  567. package/lib/tr-grid-util/es6/DateTime.js +508 -0
  568. package/lib/tr-grid-util/es6/Deferred.d.ts +14 -0
  569. package/lib/tr-grid-util/es6/Deferred.js +98 -0
  570. package/lib/tr-grid-util/es6/Delay.d.ts +20 -0
  571. package/lib/tr-grid-util/es6/Delay.js +85 -0
  572. package/lib/tr-grid-util/es6/Dom.d.ts +32 -0
  573. package/lib/tr-grid-util/es6/Dom.js +346 -0
  574. package/lib/tr-grid-util/es6/ElementObserver.d.ts +10 -0
  575. package/lib/tr-grid-util/es6/ElementObserver.js +101 -0
  576. package/lib/tr-grid-util/es6/ElementWrapper.d.ts +23 -0
  577. package/lib/tr-grid-util/es6/ElementWrapper.js +83 -0
  578. package/lib/tr-grid-util/es6/ElfDate.d.ts +26 -0
  579. package/lib/tr-grid-util/es6/ElfDate.js +163 -0
  580. package/lib/tr-grid-util/es6/ElfUtil.d.ts +33 -0
  581. package/lib/tr-grid-util/es6/ElfUtil.js +458 -0
  582. package/lib/tr-grid-util/es6/EventDispatcher.d.ts +26 -0
  583. package/lib/tr-grid-util/es6/EventDispatcher.js +161 -0
  584. package/lib/tr-grid-util/es6/ExpanderIcon.d.ts +27 -0
  585. package/lib/tr-grid-util/es6/ExpanderIcon.js +169 -0
  586. package/lib/tr-grid-util/es6/Ext.d.ts +10 -0
  587. package/lib/tr-grid-util/es6/Ext.js +52 -0
  588. package/lib/tr-grid-util/es6/FieldFormatter.d.ts +55 -0
  589. package/lib/tr-grid-util/es6/FieldFormatter.js +432 -0
  590. package/lib/tr-grid-util/es6/FilterBuilder.d.ts +48 -0
  591. package/lib/tr-grid-util/es6/FilterBuilder.js +521 -0
  592. package/lib/tr-grid-util/es6/FilterOperators.d.ts +41 -0
  593. package/lib/tr-grid-util/es6/FilterOperators.js +181 -0
  594. package/lib/tr-grid-util/es6/GridPlugin.d.ts +72 -0
  595. package/lib/tr-grid-util/es6/GridPlugin.js +747 -0
  596. package/lib/tr-grid-util/es6/Icon.d.ts +14 -0
  597. package/lib/tr-grid-util/es6/Icon.js +61 -0
  598. package/lib/tr-grid-util/es6/MouseDownTrait.d.ts +42 -0
  599. package/lib/tr-grid-util/es6/MouseDownTrait.js +237 -0
  600. package/lib/tr-grid-util/es6/MultiTableManager.d.ts +32 -0
  601. package/lib/tr-grid-util/es6/MultiTableManager.js +506 -0
  602. package/lib/tr-grid-util/es6/NumberFormatter.d.ts +83 -0
  603. package/lib/tr-grid-util/es6/NumberFormatter.js +471 -0
  604. package/lib/tr-grid-util/es6/PercentBar.d.ts +71 -0
  605. package/lib/tr-grid-util/es6/PercentBar.js +600 -0
  606. package/lib/tr-grid-util/es6/Perf.d.ts +32 -0
  607. package/lib/tr-grid-util/es6/Perf.js +162 -0
  608. package/lib/tr-grid-util/es6/Popup.d.ts +84 -0
  609. package/lib/tr-grid-util/es6/Popup.js +818 -0
  610. package/lib/tr-grid-util/es6/RangeBar.d.ts +33 -0
  611. package/lib/tr-grid-util/es6/RangeBar.js +259 -0
  612. package/lib/tr-grid-util/es6/RequestQueue.d.ts +30 -0
  613. package/lib/tr-grid-util/es6/RequestQueue.js +239 -0
  614. package/lib/tr-grid-util/es6/RowPainter.d.ts +23 -0
  615. package/lib/tr-grid-util/es6/RowPainter.js +188 -0
  616. package/lib/tr-grid-util/es6/SubTable.d.ts +74 -0
  617. package/lib/tr-grid-util/es6/SubTable.js +558 -0
  618. package/lib/tr-grid-util/es6/Table.d.ts +125 -0
  619. package/lib/tr-grid-util/es6/Table.js +790 -0
  620. package/lib/tr-grid-util/es6/TextHighlighter.d.ts +18 -0
  621. package/lib/tr-grid-util/es6/TextHighlighter.js +273 -0
  622. package/lib/tr-grid-util/es6/TickCodes.d.ts +8 -0
  623. package/lib/tr-grid-util/es6/TickCodes.js +33 -0
  624. package/lib/tr-grid-util/es6/Timer.d.ts +16 -0
  625. package/lib/tr-grid-util/es6/Timer.js +49 -0
  626. package/lib/tr-grid-util/es6/TouchProxy.d.ts +46 -0
  627. package/lib/tr-grid-util/es6/TouchProxy.js +212 -0
  628. package/lib/tr-grid-util/es6/Util.d.ts +65 -0
  629. package/lib/tr-grid-util/es6/Util.js +528 -0
  630. package/lib/tr-grid-util/es6/formula/ADCService.d.ts +11 -0
  631. package/lib/tr-grid-util/es6/formula/ADCService.js +72 -0
  632. package/lib/tr-grid-util/es6/formula/ADCSubscription.d.ts +17 -0
  633. package/lib/tr-grid-util/es6/formula/ADCSubscription.js +317 -0
  634. package/lib/tr-grid-util/es6/formula/AdFinService.d.ts +12 -0
  635. package/lib/tr-grid-util/es6/formula/AdFinService.js +61 -0
  636. package/lib/tr-grid-util/es6/formula/AdFinSubscription.d.ts +19 -0
  637. package/lib/tr-grid-util/es6/formula/AdFinSubscription.js +310 -0
  638. package/lib/tr-grid-util/es6/formula/Engine.d.ts +56 -0
  639. package/lib/tr-grid-util/es6/formula/Engine.js +592 -0
  640. package/lib/tr-grid-util/es6/formula/Formula.d.ts +68 -0
  641. package/lib/tr-grid-util/es6/formula/Formula.js +882 -0
  642. package/lib/tr-grid-util/es6/formula/IntervalSubscription.d.ts +16 -0
  643. package/lib/tr-grid-util/es6/formula/IntervalSubscription.js +165 -0
  644. package/lib/tr-grid-util/es6/formula/Realtime.d.ts +18 -0
  645. package/lib/tr-grid-util/es6/formula/Realtime.js +279 -0
  646. package/lib/tr-grid-util/es6/formula/RealtimeService.d.ts +18 -0
  647. package/lib/tr-grid-util/es6/formula/RealtimeService.js +203 -0
  648. package/lib/tr-grid-util/es6/formula/TSIService.d.ts +11 -0
  649. package/lib/tr-grid-util/es6/formula/TSIService.js +51 -0
  650. package/lib/tr-grid-util/es6/formula/TSISubscription.d.ts +18 -0
  651. package/lib/tr-grid-util/es6/formula/TSISubscription.js +1015 -0
  652. package/lib/tr-grid-util/es6/formula/VariableToken.d.ts +30 -0
  653. package/lib/tr-grid-util/es6/formula/VariableToken.js +314 -0
  654. package/lib/tr-grid-util/es6/formula/functions/AdFin.d.ts +9 -0
  655. package/lib/tr-grid-util/es6/formula/functions/AdFin.js +1778 -0
  656. package/lib/tr-grid-util/es6/formula/functions/Excel.d.ts +8 -0
  657. package/lib/tr-grid-util/es6/formula/functions/Excel.js +21 -0
  658. package/lib/tr-grid-util/es6/formula/functions/Info.d.ts +8 -0
  659. package/lib/tr-grid-util/es6/formula/functions/Info.js +192 -0
  660. package/lib/tr-grid-util/es6/formula/functions/Internal.d.ts +8 -0
  661. package/lib/tr-grid-util/es6/formula/functions/Internal.js +90 -0
  662. package/lib/tr-grid-util/es6/formula/functions/Logic.d.ts +12 -0
  663. package/lib/tr-grid-util/es6/formula/functions/Logic.js +176 -0
  664. package/lib/tr-grid-util/es6/formula/functions/Math.d.ts +18 -0
  665. package/lib/tr-grid-util/es6/formula/functions/Math.js +1624 -0
  666. package/lib/tr-grid-util/es6/formula/functions/Statistics.d.ts +18 -0
  667. package/lib/tr-grid-util/es6/formula/functions/Statistics.js +234 -0
  668. package/lib/tr-grid-util/es6/formula/functions/Text.d.ts +10 -0
  669. package/lib/tr-grid-util/es6/formula/functions/Text.js +676 -0
  670. package/lib/tr-grid-util/es6/index.d.ts +63 -0
  671. package/lib/tr-grid-util/es6/index.js +99 -0
  672. package/lib/tr-grid-util/es6/jet/CollectionDict.d.ts +28 -0
  673. package/lib/tr-grid-util/es6/jet/CollectionDict.js +141 -0
  674. package/lib/tr-grid-util/es6/jet/DataGenerator.d.ts +114 -0
  675. package/lib/tr-grid-util/es6/jet/DataGenerator.js +827 -0
  676. package/lib/tr-grid-util/es6/jet/DataSet.d.ts +8 -0
  677. package/lib/tr-grid-util/es6/jet/DataSet.js +392 -0
  678. package/lib/tr-grid-util/es6/jet/MockArchive.d.ts +21 -0
  679. package/lib/tr-grid-util/es6/jet/MockArchive.js +56 -0
  680. package/lib/tr-grid-util/es6/jet/MockJET.d.ts +25 -0
  681. package/lib/tr-grid-util/es6/jet/MockJET.js +63 -0
  682. package/lib/tr-grid-util/es6/jet/MockQuotes.d.ts +37 -0
  683. package/lib/tr-grid-util/es6/jet/MockQuotes.js +199 -0
  684. package/lib/tr-grid-util/es6/jet/MockQuotes2.d.ts +72 -0
  685. package/lib/tr-grid-util/es6/jet/MockQuotes2.js +564 -0
  686. package/lib/tr-grid-util/es6/jet/MockRTK.d.ts +8 -0
  687. package/lib/tr-grid-util/es6/jet/MockRTK.js +43 -0
  688. package/lib/tr-grid-util/es6/jet/index.d.ts +9 -0
  689. package/lib/tr-grid-util/es6/jet/index.js +18 -0
  690. package/lib/tr-grid-util/es6/jet/mockDataAPI.d.ts +11 -0
  691. package/lib/tr-grid-util/es6/jet/mockDataAPI.js +131 -0
  692. package/lib/tr-grid-util/es6/locale/translation-de.d.ts +7 -0
  693. package/lib/tr-grid-util/es6/locale/translation-de.js +51 -0
  694. package/lib/tr-grid-util/es6/locale/translation-en.d.ts +7 -0
  695. package/lib/tr-grid-util/es6/locale/translation-en.js +51 -0
  696. package/lib/tr-grid-util/es6/locale/translation-ja.d.ts +7 -0
  697. package/lib/tr-grid-util/es6/locale/translation-ja.js +51 -0
  698. package/lib/tr-grid-util/es6/locale/translation-zh-hant.d.ts +7 -0
  699. package/lib/tr-grid-util/es6/locale/translation-zh-hant.js +51 -0
  700. package/lib/tr-grid-util/es6/locale/translation-zh.d.ts +7 -0
  701. package/lib/tr-grid-util/es6/locale/translation-zh.js +51 -0
  702. package/lib/tr-grid-util/es6/locale/translation.d.ts +11 -0
  703. package/lib/tr-grid-util/es6/locale/translation.js +18 -0
  704. package/lib/types/es6/AutoTooltip.d.ts +45 -0
  705. package/lib/types/es6/CellSelection.d.ts +67 -0
  706. package/lib/types/es6/Checkbox.d.ts +69 -0
  707. package/lib/types/es6/ColumnFitter.d.ts +56 -0
  708. package/lib/types/es6/ColumnFormatting.d.ts +90 -0
  709. package/lib/types/es6/ColumnGrouping.d.ts +60 -0
  710. package/lib/types/es6/ColumnResizing.d.ts +68 -0
  711. package/lib/types/es6/ColumnSelection.d.ts +70 -0
  712. package/lib/types/es6/ColumnStack.d.ts +76 -0
  713. package/lib/types/es6/CompositeGrid/CollapsibleHeaderPlugin.d.ts +11 -0
  714. package/lib/types/es6/CompositeGrid/ColumnSelectionPlugin.d.ts +38 -0
  715. package/lib/types/es6/CompositeGrid/ColumnWidthAdjustingPlugin.d.ts +45 -0
  716. package/lib/types/es6/CompositeGrid/CompositeGrid.d.ts +287 -0
  717. package/lib/types/es6/CompositeGrid/DragAndDropTitlePlugin.d.ts +22 -0
  718. package/lib/types/es6/CompositeGrid/DraggableContentPlugin.d.ts +44 -0
  719. package/lib/types/es6/CompositeGrid/ResizableTitlePlugin.d.ts +30 -0
  720. package/lib/types/es6/CompositeGrid/RowSelectionPlugin.d.ts +42 -0
  721. package/lib/types/es6/CompositeGrid/TextWidthCalculator.d.ts +24 -0
  722. package/lib/types/es6/CompositeGrid/TreeIndentingPlugin.d.ts +46 -0
  723. package/lib/types/es6/CompositeGrid/index.d.ts +9 -0
  724. package/lib/types/es6/ConditionalColoring.d.ts +70 -0
  725. package/lib/types/es6/ContentWrap.d.ts +43 -0
  726. package/lib/types/es6/ContextMenu.d.ts +83 -0
  727. package/lib/types/es6/CoralButtonFormatter.d.ts +22 -0
  728. package/lib/types/es6/CoralCheckboxFormatter.d.ts +12 -0
  729. package/lib/types/es6/CoralComboBoxFormatter.d.ts +23 -0
  730. package/lib/types/es6/CoralIconFormatter.d.ts +23 -0
  731. package/lib/types/es6/CoralInputFormatter.d.ts +12 -0
  732. package/lib/types/es6/CoralRadioButtonFormatter.d.ts +22 -0
  733. package/lib/types/es6/CoralSelectFormatter.d.ts +23 -0
  734. package/lib/types/es6/CoralToggleFormatter.d.ts +12 -0
  735. package/lib/types/es6/Core/data/ColumnStats.d.ts +42 -0
  736. package/lib/types/es6/Core/data/DataCache.d.ts +81 -0
  737. package/lib/types/es6/Core/data/DataTable.d.ts +125 -0
  738. package/lib/types/es6/Core/data/DataView.d.ts +280 -0
  739. package/lib/types/es6/Core/data/Segment.d.ts +38 -0
  740. package/lib/types/es6/Core/data/SegmentCollection.d.ts +58 -0
  741. package/lib/types/es6/Core/grid/Core.d.ts +387 -0
  742. package/lib/types/es6/Core/grid/ILayoutGrid.d.ts +204 -0
  743. package/lib/types/es6/Core/grid/LayoutGrid.d.ts +23 -0
  744. package/lib/types/es6/Core/grid/VirtualizedLayoutGrid.d.ts +18 -0
  745. package/lib/types/es6/Core/grid/components/Cell.d.ts +50 -0
  746. package/lib/types/es6/Core/grid/components/CellFloatingPanel.d.ts +19 -0
  747. package/lib/types/es6/Core/grid/components/CellSpan.d.ts +18 -0
  748. package/lib/types/es6/Core/grid/components/CellSpans.d.ts +38 -0
  749. package/lib/types/es6/Core/grid/components/Column.d.ts +22 -0
  750. package/lib/types/es6/Core/grid/components/ElementWrapper.d.ts +125 -0
  751. package/lib/types/es6/Core/grid/components/HScrollbar.d.ts +24 -0
  752. package/lib/types/es6/Core/grid/components/Scrollbar.d.ts +61 -0
  753. package/lib/types/es6/Core/grid/components/StretchedCells.d.ts +17 -0
  754. package/lib/types/es6/Core/grid/components/VScrollbar.d.ts +18 -0
  755. package/lib/types/es6/Core/grid/components/VirtualItems.d.ts +12 -0
  756. package/lib/types/es6/Core/grid/event/EventDispatcher.d.ts +16 -0
  757. package/lib/types/es6/Core/grid/event/EventListeners.d.ts +34 -0
  758. package/lib/types/es6/Core/grid/plugins/DragAndDropTitlePlugin.d.ts +24 -0
  759. package/lib/types/es6/Core/grid/plugins/Plugin.d.ts +28 -0
  760. package/lib/types/es6/Core/grid/plugins/SortableTitlePlugin.d.ts +127 -0
  761. package/lib/types/es6/Core/grid/util/Conflator.d.ts +32 -0
  762. package/lib/types/es6/Core/grid/util/ElementFrameWork.d.ts +18 -0
  763. package/lib/types/es6/Core/grid/util/HttpRequest.d.ts +53 -0
  764. package/lib/types/es6/Core/grid/util/PercentBar.d.ts +43 -0
  765. package/lib/types/es6/Core/grid/util/PercentBarRenderer.d.ts +41 -0
  766. package/lib/types/es6/Core/grid/util/RangeBar.d.ts +25 -0
  767. package/lib/types/es6/Core/grid/util/Reverter.d.ts +14 -0
  768. package/lib/types/es6/Core/grid/util/SectionSettings.d.ts +79 -0
  769. package/lib/types/es6/Core/grid/util/SelectionList.d.ts +50 -0
  770. package/lib/types/es6/Core/grid/util/TrackLayout.d.ts +84 -0
  771. package/lib/types/es6/Core/grid/util/Virtualizer.d.ts +40 -0
  772. package/lib/types/es6/Core/grid/util/util.d.ts +18 -0
  773. package/lib/types/es6/Core/index.d.ts +84 -0
  774. package/lib/types/es6/Core/tr-grid-theme.d.ts +5 -0
  775. package/lib/types/es6/DuplexEmeraldDateTimePickerFormatter.d.ts +14 -0
  776. package/lib/types/es6/EFButtonFormatter.d.ts +22 -0
  777. package/lib/types/es6/EFCheckboxFormatter.d.ts +12 -0
  778. package/lib/types/es6/EFComboBoxFormatter.d.ts +23 -0
  779. package/lib/types/es6/EFDateTimePickerFormatter.d.ts +13 -0
  780. package/lib/types/es6/EFIconFormatter.d.ts +23 -0
  781. package/lib/types/es6/EFNumberFieldFormatter.d.ts +12 -0
  782. package/lib/types/es6/EFRadioButtonFormatter.d.ts +22 -0
  783. package/lib/types/es6/EFSelectFormatter.d.ts +23 -0
  784. package/lib/types/es6/EFTextFieldFormatter.d.ts +12 -0
  785. package/lib/types/es6/EFToggleFormatter.d.ts +12 -0
  786. package/lib/types/es6/EmeraldDateTimePickerFormatter.d.ts +13 -0
  787. package/lib/types/es6/ExtensionColumnOptions.d.ts +41 -0
  788. package/lib/types/es6/ExtensionOptions.d.ts +52 -0
  789. package/lib/types/es6/Extensions.d.ts +61 -0
  790. package/lib/types/es6/FilterInput.d.ts +57 -0
  791. package/lib/types/es6/FormatterBuilder.d.ts +22 -0
  792. package/lib/types/es6/GridFormatter.d.ts +63 -0
  793. package/lib/types/es6/HeatMap.d.ts +44 -0
  794. package/lib/types/es6/InCellEditing.d.ts +129 -0
  795. package/lib/types/es6/MenuEventAPI.d.ts +22 -0
  796. package/lib/types/es6/MenuItem.d.ts +39 -0
  797. package/lib/types/es6/NumericInputFormatter.d.ts +13 -0
  798. package/lib/types/es6/Pagination.d.ts +57 -0
  799. package/lib/types/es6/PercentBar.d.ts +60 -0
  800. package/lib/types/es6/PercentBarFormatter.d.ts +25 -0
  801. package/lib/types/es6/PopupMenu.d.ts +29 -0
  802. package/lib/types/es6/RangeBar.d.ts +39 -0
  803. package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +143 -0
  804. package/lib/types/es6/RealtimeGrid/DataConnector.d.ts +37 -0
  805. package/lib/types/es6/RealtimeGrid/FieldDefinition.d.ts +20 -0
  806. package/lib/types/es6/RealtimeGrid/Grid.d.ts +263 -0
  807. package/lib/types/es6/RealtimeGrid/PredefinedFormula.d.ts +16 -0
  808. package/lib/types/es6/RealtimeGrid/ReferenceCounter.d.ts +38 -0
  809. package/lib/types/es6/RealtimeGrid/RowDefinition.d.ts +120 -0
  810. package/lib/types/es6/RealtimeGrid/SnapshotFiller.d.ts +21 -0
  811. package/lib/types/es6/RealtimeGrid/StyleLoader.d.ts +17 -0
  812. package/lib/types/es6/RealtimeGrid/index.d.ts +8 -0
  813. package/lib/types/es6/RowColoring.d.ts +60 -0
  814. package/lib/types/es6/RowDragging.d.ts +53 -0
  815. package/lib/types/es6/RowFiltering.d.ts +118 -0
  816. package/lib/types/es6/RowGrouping.d.ts +109 -0
  817. package/lib/types/es6/RowSegmenting.d.ts +83 -0
  818. package/lib/types/es6/RowSelection.d.ts +74 -0
  819. package/lib/types/es6/SimpleImageFormatter.d.ts +21 -0
  820. package/lib/types/es6/SimpleInputFormatter.d.ts +12 -0
  821. package/lib/types/es6/SimpleLinkFormatter.d.ts +21 -0
  822. package/lib/types/es6/SimpleTickerFormatter.d.ts +25 -0
  823. package/lib/types/es6/SimpleToggleFormatter.d.ts +22 -0
  824. package/lib/types/es6/StatisticsRow.d.ts +67 -0
  825. package/lib/types/es6/TextFormatter.d.ts +12 -0
  826. package/lib/types/es6/TextFormatting.d.ts +77 -0
  827. package/lib/types/es6/TitleWrap.d.ts +29 -0
  828. package/lib/types/es6/Zoom.d.ts +51 -0
  829. package/lib/types/es6/index.d.ts +76 -0
  830. package/lib/types/index.d.ts +1 -0
  831. package/lib/versions.json +36 -0
  832. package/lib/window-exporter.js +13 -0
  833. package/lib/zoom/es6/Zoom.d.ts +51 -0
  834. package/lib/zoom/es6/Zoom.js +419 -0
  835. package/lib/zoom/es6/index.d.ts +1 -0
  836. package/lib/zoom/es6/index.js +1 -0
  837. package/package.json +42 -0
@@ -0,0 +1 @@
1
+ !function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=5)}([function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));var n={inherits:function(t,e){function i(){}i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t,t.base=function(t,i,n){i||(i="constructor");for(var o=arguments.length,r=new Array(o),s=2;s<o;s++)r[s-2]=arguments[s];return e.prototype[i].apply(t,r)}}};e.b=n},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"c",(function(){return extendObject})),__webpack_require__.d(__webpack_exports__,"b",(function(){return cloneObject})),__webpack_require__.d(__webpack_exports__,"a",(function(){return arrayToObject})),__webpack_require__.d(__webpack_exports__,"f",(function(){return parseCondition})),__webpack_require__.d(__webpack_exports__,"g",(function(){return prettifyCss})),__webpack_require__.d(__webpack_exports__,"d",(function(){return injectCss})),__webpack_require__.d(__webpack_exports__,"e",(function(){return nestedObjectToArray})),__webpack_require__.d(__webpack_exports__,"h",(function(){return rgb2Hex}));var Util={post:function(t,e){return Util._post(t,e).then(Util.toJSON)},requestText:function(t,e){return Util._post(t,e,"text/plain").then(Util.toText)},requestByUrlEncoded:function(t,e){return Util._post(t,e,"application/x-www-form-urlencoded").then(Util.toJSON)},toJSON:function(t){return Util._logError(t)?Promise.reject(t):t.json()},toText:function(t){return Util._logError(t)?Promise.reject(t):t.text()},_logError:function(t){return!!(t&&t.status>=300)&&(console.log("Response "+t.status+": "+t.statusText),!0)},_post:function(t,e,i){var n={method:e?"POST":"GET",headers:{"Content-Type":i||"application/json"}};return e&&(n.body="string"==typeof e?e:JSON.stringify(e)),fetch(t,n)}},extendObject=function(t,e,i){if(!t)return null;if(!e||t===e)return t;var n;if(i)for(var o=i.length,r=0;r<o;++r)(n=i[r])&&extendProperty(t,e,n);else for(n in e)extendProperty(t,e,n);return t},cloneObject=function(t,e){return extendObject({},t,e)},arrayToObject=function(t,e){if(!Array.isArray(t))return t;if(!e)return null;var i=t;t={};for(var n=i.length,o=0;o<n;++o){var r=e[o];r&&void 0!==i[o]&&(t[r]=i[o])}return t},extendProperty=function(t,e,i){var n=e[i];if(null!=n){var o=t[i];Array.isArray(o)?t[i]=o.concat(n):Array.isArray(n)&&o?t[i]=n.concat(o):t[i]=n}},extendArrayProperty=function(t,e,i){var n=null;if(i){var o=t[e];n=o?Array.isArray(o)?o:t[e]=[o]:t[e]=[],Array.isArray(i)?i.length&&(i.length>1?Array.prototype.push.apply(n,i):n.push(i[0])):n.push(i)}return n},_bracketExp=new RegExp(/\[[^\[]*\]/g),parseCondition=function(expression){if(!expression)return null;if("string"!=typeof expression)return"function"==typeof expression?expression:null;for(var brackets=expression.match(_bracketExp),map={},fields=[],len=brackets?brackets.length:0,i=len;--i>=0;){var field=brackets[i];map[field]||(map[field]="f["+fields.length+"]",fields.push(field.substring(1,field.length-1)))}expression=expression.replace(_bracketExp,(function(t){return"rowData["+map[t]+"]"}));var finalExp="(function(f, rowData) { return ("+expression+"); })",fn=null;try{fn=eval(finalExp),fn=fn.bind(null,fields)}catch(t){console.log(t.message)}return fn||null},_encloseBracket=function(t){return Array.isArray(t)?"{\n"+t.join("\n")+"\n}":t},_indentBracketContent=function(t){return t.replace(/\n+/g,"\n\t").replace(/\n\t}$/,"\n}")},prettifyCss=function(t){if(t){var e="";if(Array.isArray(t))e=t.map(_encloseBracket).join("\n").replace(/{\s*{/g,"{").replace(/\s+{/g," {");else e="string"==typeof t?t:t+"";if(e)return e.replace(/{[\w\W]*?}/g,_indentBracketContent)}return""},getShadowRoot=function(t){var e;if(t&&(t.shadowRoot?e=t.shadowRoot:t.getRootNode&&(e=t.getRootNode()),e&&e!==document&&e!==t))return e;return null},injectCss=function(t,e){if(!t)return null;var i=document.createElement("style");i.textContent="\n"+t+"\n";var n,o=getShadowRoot(e),r=!0;return o||(r=!1,o=document.head),r&&o.children&&o.children.length&&(n=o.children[0]),n?o.insertBefore(i,n):o.appendChild(i),i},isIE=function(){var t=window.navigator.userAgent;return t.indexOf("MSIE ")>0||t.indexOf("Trident/")>0||t.indexOf("Edge/")>0},isMac=function(){return/Mac/.test(navigator.platform)},isTouchDevice=function(){return!!(navigator.maxTouchPoints&&navigator.maxTouchPoints<256||navigator.msMaxTouchPoints&&navigator.msMaxTouchPoints<256)},nestedObjectToArray=function(t,e){for(var i in e||(e=[]),t){var n=t[i];"object"==typeof n?nestedObjectToArray(n,e):e.push(n)}return e},rgb2Hex=function(t){if(!t||"string"!=typeof t)return"";if("#"===t.charAt(0))return t;var e=t.match(/\d+/g);if(!e||e.length<3)return t;for(var i="#",n=0;n<3;n++){var o=+e[n];o>=16||(i+="0"),i+=o?o.toString(16).toUpperCase():"0"}return i},prepareTSVContent=function(t){if(null==t)return"";var e="string"==typeof t?t:t.toString();return e.length?(e.indexOf("\n")>=0&&(e=e.replace(/[\r\n]/g," ")),e.indexOf("\t")>=0&&(e=e.replace(/\t/g," "))," "!==e.charAt(0)&&" "!==e.charAt(e.length-1)||(e=e.trim()),e):""},_unused_webpack_default_export=Util},function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));var n=function(){};n.prototype._events=null,n.prototype._listenerCount=0,n.prototype.addEventListener=function(t,e){if(t&&e){this._events||(this._events={});var i=this._events[t];i?i.indexOf(e)<0&&(i.push(e),++this._listenerCount):(this._events[t]=[e],++this._listenerCount)}},n.prototype.removeEventListener=function(t,e){var i=this._events?this._events[t]:null;if(i){var n=i.indexOf(e);n>=0&&(i.splice(n,1),--this._listenerCount)}},n.prototype.removeAllEventListeners=function(){this._events=null,this._listenerCount=0},n.prototype.hasListener=function(t){if(this._listenerCount){if(t){var e=this._events?this._events[t]:null;return!!e&&e.length>0}return!0}return!1},n.prototype.getListener=function(t,e){if(t){var i=this._events?this._events[t]:null;if(i)return e||(e=0),i[e]||null}return null},n.prototype.addListener=function(t,e){var i=t?t[e]:null;"function"==typeof i&&this.addEventListener(e,i)},n.prototype._prepareEventArguments=function(t,e){return e},n.prototype._dispatch=function(t,e){var i=this._events?this._events[t]:null;if(i){e=this._prepareEventArguments(t,e);for(var n=i.length,o=0;o<n;++o)i[o](e)}};n.preventDefault=function(t){t&&t.preventDefault&&(t.preventDefault(),t.stopPropagation())},e.b=n},function(module,__webpack_exports__,__webpack_require__){"use strict";var _Ext_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),_VariableToken_js__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(4),_EventDispatcher_js__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(2),Formula=function(t,e){this._input=t||"",null!=e&&(this._context=e,e._DATA&&(this.__D=e._DATA)),this.__F=[],this._fnTokens=[],this._fields=[],this._fieldMap={},this._dataCache={},this._intervalServices={},this._formulaCount=1,this._onDataCacheChanged=this._onDataCacheChanged.bind(this),this.dispatchDataChanged=this.dispatchDataChanged.bind(this),this._parse(this._input)};_Ext_js__WEBPACK_IMPORTED_MODULE_0__.b.inherits(Formula,_EventDispatcher_js__WEBPACK_IMPORTED_MODULE_2__.b),Formula._isBoundFormula={RECORD:!0,TR:!0,MTXSERIES:!0,NOW:!0,TODAY:!0,ADSTYLEATTRIBUTE:!0,ADBONDDERIV:!0,ADBONDYIELD:!0,BDSETTLE:!0,ACCRUED:!0,CFYLD:!0,DFFORMATDATE:!0,DFADDPERIOD:!0,DFADDWD:!0,DFADDMONTHS:!0,DFADDYEARS:!0,DFADJUSTTOWD:!0,DFLASTWD:!0,DFFINDDATED:!0,DFCOUNTDAYS:!0,DFCOUNTWD:!0,ADFXSWPTODEP:!0,FXCALCPERIOD:!0,OPCALCDERIV:!0,OPIMPLIEDVOL:!0,ADFORMAT:!0,ADHISTORYVALUE:!0},Formula.prototype._input="",Formula.prototype._expression="",Formula.prototype._alias="",Formula.prototype._main=null,Formula.prototype.__F=null,Formula.prototype._fnTokens=null,Formula.prototype._fields=null,Formula.prototype._fieldMap=null,Formula.prototype._reference="",Formula.prototype._context=null,Formula.prototype._rtService=null,Formula.prototype._intervalServices=null,Formula.prototype._dataCache=null,Formula.prototype._dataLastError="",Formula.prototype._inputWithTokenField="",Formula.prototype._formulaCount=0,Formula._invalidOps={"+=":!0,"-=":!0,"*=":!0,"/=":!0,"|=":!0,"&=":!0,"^=":!0},Formula.prototype.dispose=function(){for(var t in this._rtService&&(this._rtService.dispose(),this._rtService=null),this._intervalServices)this._intervalServices[t].removeEventListener("dataChanged",this.dispatchDataChanged);this._intervalServices=null,this.unlistenAll()},Formula.prototype.calculate=function(t){if(this._main){this._dataLastError="";var e=this._main(t);switch(this._dataLastError){case"Pending data":e=null;break;case"Pending - no erase":e="..."}return e}return null},Formula.prototype.getFunction=function(){return this._main},Formula.prototype.getFieldNames=function(){return this._fields},Formula.prototype._setReference=function(t){this._reference=t},Formula.prototype.getReference=function(){return this._reference},Formula.prototype.getExpression=function(){return this._expression},Formula.prototype.toString=Formula.prototype.getReference,Formula.prototype.getInput=function(){return this._input},Formula.prototype.getAlias=function(){return this._alias||this._input},Formula.prototype.setAlias=function(t){this._alias=t},Formula.prototype.addFormulaCount=function(){this._formulaCount++},Formula.prototype.subtractFormulaCount=function(){return 0==--this._formulaCount},Formula.prototype.updateContext=function(){if(this._context)for(var t=this._fnTokens.length,e=0;e<t;++e){var i=this._fnTokens[e].getFunctionName();this.__F[e]=this._context[i]||Formula._emptyFunction,Formula._isBoundFormula[i]&&(this.__F[e]=this.__F[e].bind(this))}},Formula.prototype._logger=function(t){console.log("["+t+"] "+this._fnTokens[t].getFunctionName()+" is executed")},Formula._emptyFunction=function(){},Formula.prototype._detectCodeInjection=function(t){var e=!1;if(t.match(/\+\+|--/)&&(e=!0),!e)for(var i=t.match(/([^=]=+)/g)||[],n=i.length;--n>=0;){var o=i[n],r=o.substring(o.length-2);if(Formula._invalidOps[r]){e=!0;break}}return e},Formula.toUpperCase=function(t){if(!t||"="!==t.charAt(0))return t||"";var e=[],i=[];return t=(t=(t=Formula.tokenizeQuotes(t,e,i)).toUpperCase()).replace(/TR\.[\w_ ]+\([^\(\)]*\)(\.[a-zA-Z]+)*/g,Formula._encloseWithTR),t=Formula.resolveTokens(t,e,i)},Formula._encloseWithTR=function(t){return'TR("'+t+'")'},Formula.tokenizeQuotes=function(t,e,i){var n;e||(e=[]),i||(i=[]);var o=!1,r=[];do{o=!1,t=t.replace(/(["'])(?:(?=(\\?))\2.)*?\1/g,(function(t){return o=!0,n=e.length,e.push(new _VariableToken_js__WEBPACK_IMPORTED_MODULE_1__.a(t,n)),r.push(n),"♦"+n+"♦"}))}while(o);return i.push(r),t},Formula.tokenizeAdcWithParams=function(t,e,i){var n;e||(e=[]),i||(i=[]);var o=!1,r=[];do{o=!1,t=t.replace(/TR\.\w+\([^\)]*\)+/g,(function(t){return o=!0,n=e.length,e.push(new _VariableToken_js__WEBPACK_IMPORTED_MODULE_1__.a(t,n)),r.push(n),"♦"+n+"♦"}))}while(o);return i.push(r),t},Formula.replaceUnwantedCharacters=function(t,e,i){for(;t.indexOf(" ")>=0;)t=t.replace(/ {2}/g," ");return t=(t=(t=t.replace(/\$/g,"")).replace(/\&+/g,(function(t){return"&"===t?"+":t}))).replace(/(<=|>=|!=|!==|===|==|=(?!([\w]*\([^()]*\))))/g,(function(t){return"="===t?"==":t}))},Formula.prototype._tokenizeParentheses=function(t,e,i){e||(e=[]),i||(i=[]);for(var n={},o=/[\w._]*(?:=|=[\w]*)?\([^()]*\)/,r=new RegExp(o.source,"g");t.match(o);){var s=[];t=t.replace(r,(function(t,i){"="===t.charAt(0)&&(t=t.substr(1,t.length));var o=n[t];return null==o&&(o=e.length,e.push(new _VariableToken_js__WEBPACK_IMPORTED_MODULE_1__.a(t,o)),n[t]=o),s.push(o),"♦"+o+"♦"})),i.push(s)}return t},Formula.prototype._tokenizeConstants=function(t,e,i){e||(e=[]),i||(i=[]);var n=[];return t=t.replace(/[\w._♦]+/g,(function(t){if("♦"===t.charAt(0))return t;var i=e.length;return e.push(new _VariableToken_js__WEBPACK_IMPORTED_MODULE_1__.a(t,i)),n.push(i),"♦"+i+"♦"})),i.push(n),t},Formula.resolveTokens=function(t,e,i){for(var n=i.length;--n>=0;)for(var o=i[n],r=o.length,s=0;s<r;++s){var a=o[s],l=e[a];t=t.replace(new RegExp("♦"+a+"♦","g"),(function(){return l.getExpression()}))}return t},Formula._getInputWithTokenField=function(t,e,i){for(var n=i.length;--n>=0;)for(var o=i[n],r=o.length,s=0;s<r;++s){var a=o[s],l=e[a];t=t.replace(new RegExp("♦"+a+"♦","g"),(function(){return l.getInputWithTokenField()}))}return"="+t},Formula.prototype._parse=function(t){if(this._expression="",this._main=null,this.__F.length=0,this._fnTokens.length=0,this._fields.length=0,!t)return null;if("="===t.charAt(0)&&(t=t.substr(1)),!(t=(t=(t=(t=t.replace(/^\s+|\s+$/gm,"")).replace(/<>/g,"!=")).replace(/‛|‘|’/g,"'")).replace(/‟|“|”/g,'"'))||this._detectCodeInjection(t))return null;var e=[],i=[];t=Formula.tokenizeQuotes(t,e,i),t=Formula.tokenizeAdcWithParams(t,e,i),t=Formula.replaceUnwantedCharacters(t,e,i),t=this._tokenizeParentheses(t,e,i),t=this._tokenizeConstants(t,e,i),this._inputWithTokenField=Formula._getInputWithTokenField(t,e,i),t=Formula.resolveTokens(t,e,i);for(var n={},o=e.length,r=0;r<o;++r){var s=e[r];if(s.getFunctionName()){var a=this._fnTokens.length;t=t.replace(new RegExp("this\\.__F\\["+r+"\\]","g"),"this.__F["+a+"]"),s.setIndex(a),this._fnTokens.push(s)}s.getFieldNames(n)}return this._expression=t,this.updateContext(),this._main=this._createFunction(this._expression),this._main?(this._fieldMap=n,this._fields=Object.keys(n),this._main):null},Formula.prototype._createFunction=function(expression){var func=null;try{func=eval("(function (__R) { return "+expression+"; })"),func=func.bind(this),func({})}catch(t){func=null}return func},Formula.prototype.__D=function(t,e){return e[t]},Formula.prototype.addField=function(t,e){return!this._fieldMap[t]&&(!(t.indexOf("undefined")>=0)&&(this._fields.push(t),this._fieldMap[t]=!0,this._dispatch("dataRequired",{field:t,src:e||"adc"}),!0))},Formula.prototype.changeField=function(t,e){var i=this._fields.indexOf(t);if(i<0)return!1;this._fields.splice(i,1),this._fields.indexOf(e)<0&&this._fields.push(e);var n=this._input,o="♠"+t+"♥",r="♠"+e+"♥";return this._inputWithTokenField=this._inputWithTokenField.replace(new RegExp("♠[^♠]*♥","g"),(function(t){return t===o?r:t})),this._input=this._inputWithTokenField.replace(new RegExp("♠[^♠]*♥","g"),(function(t){return t.substr(1,t.length-2)})),this._expression=this._expression.replace(new RegExp('this\\.__D\\("'+t+'", __R\\)',"g"),'this.__D("'+e+'", __R)'),this._main=this._createFunction(this._expression),this._dispatch("formulaChanged",{oldInput:n,formula:this}),!0},Formula.prototype.changeFields=function(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(var i=this._input,n=t.length;--n>=0;){var o=t[n],r=e[n],s=this._fields.indexOf(o);if(!(s<0)){this._fields.splice(s,1),this._fields.indexOf(r)<0&&this._fields.push(r);var a="♠"+o+"♥",l="♠"+r+"♥";this._inputWithTokenField=this._inputWithTokenField.replace(new RegExp("♠[^♠]*♥","g"),(function(t){return t===a?l:t})),this._input=this._inputWithTokenField.replace(new RegExp("♠[^♠]*♥","g"),(function(t){return t.substr(1,t.length-2)})),this._expression=this._expression.replace(new RegExp('this\\.__D\\("'+o+'", __R\\)',"g"),'this.__D("'+r+'", __R)')}}return this._main=this._createFunction(this._expression),this._dispatch("formulaChanged",{oldInput:i,formula:this}),!0},Formula.prototype.getRealtimeService=function(){return this._rtService},Formula.prototype.setRealtimeService=function(t){this._rtService&&this._rtService.dispose(),this._rtService=t,this._rtService.addEventListener("dataChanged",this._onDataCacheChanged)},Formula.prototype.getIntervalService=function(t){return this._intervalServices[t]},Formula.prototype.setIntervalService=function(t,e){if(e){var i=this._intervalServices[t];i&&i.removeEventListener("dataChanged",this.dispatchDataChanged),this._intervalServices[t]=e,e.addEventListener("dataChanged",this.dispatchDataChanged)}},Formula.prototype.getCachedData=function(t){return this._dataCache[t]},Formula.prototype.setCachedData=function(t,e){this._dataCache[t]=e},Formula.prototype.setDataError=function(t){this._dataLastError=t},Formula.prototype.dispatchDataChanged=function(t){this._dispatch("dataCacheChanged",{})},Formula.prototype._onDataCacheChanged=function(t){var e=t.ric,i=t.values,n=this._dataCache[e];if(n)for(var o in i)n[o]=i[o];else this._dataCache[e]=i;this._dispatch("dataCacheChanged",{})},Formula._proto=Formula.prototype,__webpack_exports__.a=Formula},function(t,e,i){"use strict";var n=function(t,e){if(t=t.replace(/^\s+|\s+$/gm,""),this._inputConverter[t]&&(t=this._inputConverter[t]),this._input=t,null!=e&&(this._index=e),null!=this._constants[t])return this._value=this._constants[t],void(this._type=typeof this._value);var i=t.charAt(0),n=t.length>1?t.charAt(t.length-1):"";if('"'===i&&'"'===n)return this._value=t.substring(1,t.length-1),void(this._type="string");if("'"===i&&"'"===n)return this._value=t.substring(1,t.length-1),void(this._type="string");if("("!==i||")"!==n)if("["!==i||"]"!==n)if(t.match(/TR\.\w+\(/))this._type="dynamic";else{var o=t.match(/[\w._]+\(/g);if(o&&1===o.length)this._resolveFunction(t,o[0]);else{var r=t.match(/[\w._♦]+/g);if(r&&r.length>1)this._resolveVariableGroup(t);else if("♦"!==i){var s=Number(t);if(s==s)return this._value=s,void(this._type="number");this._type="dynamic"}else this._type="token"}}else this._resolveArray(t);else this._resolveVariableGroup(t)};n.prototype._input="",n.prototype._index=-1,n.prototype._type="",n.prototype._subVars=null,n.prototype._funcName="",n.prototype._value,n.prototype._valueWithTokenField="",n.prototype._inputConverter={TRUE:"true",FALSE:"false",PI:"Math.PI","TRUE()":"true","FALSE()":"false","PI()":"Math.PI"},n.prototype._constants={true:!0,false:!1,null:null,NaN:NaN,"Math.E":Math.E,"Math.PI":Math.PI,"Math.SQRT2":Math.SQRT2,"Math.SQRT1_2":Math.SQRT1_2,"Math.LN2":Math.LN2,"Math.LN10":Math.LN10,"Math.LOG2E":Math.LOG2E,"Math.LOG10E":Math.LOG10E},n.prototype.getExpression=function(){return"dynamic"===this._type?'this.__D("'+this._input+'", __R)':"group"===this._type?this._value:"function"===this._type?this._subVars?"this.__F["+this._index+"]("+this._subVars.join(", ")+")":"this.__F["+this._index+"]()":"array"===this._type?this._subVars?"["+this._subVars.join(", ")+"]":"[]":this._input},n.prototype.getInputWithTokenField=function(){return"dynamic"===this._type?"♠"+this._input+"♥":"group"===this._type?this._valueWithTokenField:"function"===this._type?this._funcName+"("+this.getChildInputWithToken()+")":"array"===this._type?"["+this.getChildInputWithToken()+"]":this._input},n.prototype.getChildInputWithToken=function(){var t=this._subVars?this._subVars.length:0;if(t<=0)return"";for(var e=new Array(t),i=0;i<t;++i)e[i]=this._subVars[i].getInputWithTokenField();return e.join(", ")},n.prototype.toString=n.prototype.getExpression,n.prototype.getValue=function(){return this._value},n.prototype.getInput=function(){return this._input},n.prototype.getIndex=function(){return this._index},n.prototype.setIndex=function(t){this._index=t},n.prototype.getFunctionName=function(){return this._funcName},n.prototype.getFieldNames=function(t){if(this._subVars){if(t)for(var e=this._subVars.length,i=0;i<e;++i)this._subVars[i].getFieldNames(t);return this._subVars[0].getFieldNames()}return"dynamic"===this._type?(t&&(t[this._input]=!0),this._input):""},n.prototype._resolveVariableGroup=function(t){var e=this._subVars?this._subVars.length:0;return this._type="group",this._value=t.replace(/[\w._♦]+/g,function(t){this._subVars||(this._subVars=[]);var e=new n(t,this._subVars.length);return this._subVars.push(e),e.getExpression()}.bind(this)),this._valueWithTokenField=t.replace(/[\w._♦]+/g,function(t){return this._subVars[e++].getInputWithTokenField()}.bind(this)),this._value},n.prototype._resolveFunction=function(t,e){if(this._type="function",this._funcName=e.substr(0,e.length-1),t=(t=t.replace(e,"")).substr(0,t.length-1)){this._subVars=[];for(var i=t.split(","),o=i.length,r=0;r<o;++r)this._subVars[r]=new n(i[r],r)}},n.prototype._resolveArray=function(t){if(this._type="array",t=t.substr(1,t.length-1)){this._subVars=[];for(var e=t.split(","),i=e.length,o=0;o<i;++o)this._subVars[o]=new n(e[o],o)}},e.a=n},function(t,e,i){"use strict";i.r(e),i.d(e,"Grid",(function(){return Ce}));var n={create:function(t,e){var i=document.createElement(t);return e&&(i.className=e),i},div:function(t){return n.create("div",t)},text:function(t,e){var i=n.create("span",e);return(t||0===t)&&(i.textContent=t),i},appendChild:function(t,e){if(!t)return null;var i,n;Array.isArray(arguments[1])?(n=arguments[1],i=0):(n=arguments,i=1);for(var o=n.length;i<o;)t.appendChild(n[i]),++i;return t},buildTree:function(t,e){if(!t)return null;for(var i=arguments,o=i.length,r=1;r<o;++r){var s,a=i[r];if(a)Array.isArray(a)?s=n.buildTree.apply(null,a):1===a.nodeType&&(s=a),s&&t.appendChild(s)}return t},removeParent:function(t){if(!t)return null;var e=t.parentNode;return e&&e.removeChild(t),e},setParent:function(t,e){return t?e?(e.appendChild(t),e):n.removeParent(t):null},removeChildren:function(t,e){if(t){var i=t.childNodes.length;for((null==e||e>i)&&(e=i);--e>=0;)t.removeChild(t.lastChild)}},setContent:function(t,e){if(t)if(e||0===e){var i=e.nodeType;1===i||3===i?e!==t.lastChild&&(n.removeChildren(t),t.appendChild(e)):Array.isArray(e)?(n.removeChildren(t),n.appendChild(t,e)):t.textContent=e}else n.removeChildren(t)},toggleAttribute:function(t,e,i){i?t.setAttribute(e,"string"==typeof i?i:""):null==i?t.hasAttribute(e)?t.removeAttribute(e):t.setAttribute(e,""):t.removeAttribute(e)},toggleClass:function(t,e,i){i?t.classList.add(e):null==i?t.classList.contains(e)?t.classList.remove(e):t.classList.add(e):t.classList.remove(e)},addClasses:function(t,e){if(t)for(var i=Array.isArray(e)?e:arguments,n=i.length,o=0;o<n;++o){var r=i[o];r&&"string"==typeof r&&t.classList.add(r)}},removeClasses:function(t,e){if(t)for(var i=Array.isArray(e)?e:arguments,n=i.length,o=0;o<n;++o){var r=i[o];r&&"string"==typeof r&&t.classList.remove(r)}},preventDefault:function(t){t.preventDefault(),t.stopPropagation()},stopPropagation:function(t){t.stopPropagation()},getClientPosition:function(t,e){var i=e||{x:0,y:0};if(t.getBoundingClientRect){var n=t.getBoundingClientRect();i.x=n.left,i.y=n.top}else i.x=t.clientX,i.y=t.clientY;return i},getRelativePosition:function(t,e,i){i=n.getClientPosition(t,i);var o=n.getClientPosition(e);return i.x-=o.x,i.y-=o.y,i},closestElement:function(t,e){for(var i=t;i&&i.classList;){if(i.classList.contains(e))return i;i=i.parentNode}return null},closestTagName:function(t,e){for(var i=t;i&&i.tagName;){if(i.tagName==e)return i;i=i.parentNode}return null}},o=function(t,e,i){this._onConflated=this._onConflated.bind(this),this._data=[],"function"==typeof t?this.setFunction(t,i):"function"==typeof e&&this.setFunction(e,i),"number"==typeof e?this.setConflatingTime(e):"number"==typeof t&&this.setConflatingTime(t)};o.prototype._data,o.prototype._func=null,o.prototype._delay=0,o.prototype._timerId=0,o.prototype._conflated=!1,o.prototype._disabled=!1,o.prototype.reset=function(){return this._timerId&&(clearTimeout(this._timerId),this._timerId=0),this.popAllData()},o.prototype.popAllData=function(){if(this._data.length){var t=this._data;return this._data=[],t}return null},o.prototype.dispose=function(){this._timerId&&(clearTimeout(this._timerId),this._timerId=0),this._data.length&&(this._data.length=0),this._func=null},o.prototype.conflate=function(t){return!this._disabled&&(null!=t&&this._data.push(t),!this._conflated&&(this._timerId||(this._timerId=setTimeout(this._onConflated,this._delay)),!0))},o.prototype.isConflating=function(){return this._timerId>0&&!this._conflated&&!this._disabled},o.prototype._onConflated=function(){this._conflated=!0;try{this._func()}catch(t){console.error(t.message||t)}this._timerId=0,this._data.length=0,this._conflated=!1},o.prototype.getData=function(){return this._data},o.prototype.setFunction=function(t,e){this._func=t,this._func=t?e?t.bind(e):t:null},o.prototype.setConflatingTime=function(t){this._delay=t||0,this._delay<0&&(this._delay=0)},o.prototype.getConflatingTime=function(){return this._delay},o.prototype.disable=function(t){this._disabled=!1!==t},o.prototype.isEnabled=function(){return!this._disabled},o.prototype.enable=function(t){this._disabled=!1===t};var r=i(0),s=i(2),a=i(3),l={en:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat",Sunday:"Sunday",Monday:"Monday",Tuesday:"Tuesday",Wednesday:"Wednesday",Thursday:"Thursday",Friday:"Friday",Saturday:"Saturday",jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec",January:"January",February:"February",March:"March",April:"April",May:"May",June:"June",July:"July",August:"August",September:"September",October:"October",November:"November",December:"December",am:"am",AM:"AM",pm:"pm",PM:"PM"},de:{sun:"So",mon:"Mo",tue:"Di",wed:"Mi",thu:"Do",fri:"Fr",sat:"Sa",Sunday:"Sonntag",Monday:"Montag",Tuesday:"Dienstag",Wednesday:"Mittwoch",Thursday:"Donnerstag",Friday:"Freitag",Saturday:"Samstag",jan:"Jan",feb:"Feb",mar:"Mrz",apr:"Apr",may:"Mai",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Okt",nov:"Nov",dec:"Dez",January:"Januar",February:"Februar",March:"März",April:"April",May:"Mai",June:"Juni",July:"Juli",August:"August",September:"September",October:"Oktober",November:"November",December:"Dezember",am:"am",AM:"AM",pm:"pm",PM:"PM"},ja:{sun:"日",mon:"月",tue:"火",wed:"水",thu:"木",fri:"金",sat:"土",Sunday:"日曜日",Monday:"月曜日",Tuesday:"火曜日",Wednesday:"水曜日",Thursday:"木曜日",Friday:"金曜日",Saturday:"土曜日",jan:"1月",feb:"2月",mar:"3月",apr:"4月",may:"5月",jun:"6月",jul:"7月",aug:"8月",sep:"9月",oct:"10月",nov:"11月",dec:"12月",January:"1月",February:"2月",March:"3月",April:"4月",May:"5月",June:"6月",July:"7月",August:"8月",September:"9月",October:"10月",November:"11月",December:"12月",am:"午前",AM:"午前",pm:"午後",PM:"午後"},zh:{sun:"周日",mon:"周一",tue:"周二",wed:"周三",thu:"周四",fri:"周五",sat:"周六",Sunday:"星期日",Monday:"星期一",Tuesday:"星期二",Wednesday:"星期三",Thursday:"星期四",Friday:"星期五",Saturday:"星期六",jan:"1月",feb:"2月",mar:"3月",apr:"4月",may:"5月",jun:"6月",jul:"7月",aug:"8月",sep:"9月",oct:"10月",nov:"11月",dec:"12月",January:"一月",February:"二月",March:"三月",April:"四月",May:"五月",June:"六月",July:"七月",August:"八月",September:"九月",October:"十月",November:"十一月",December:"十二月",am:"上午",AM:"上午",pm:"下午",PM:"下午"},"zh-Hant":{sun:"週日",mon:"週一",tue:"週二",wed:"週三",thu:"週四",fri:"週五",sat:"週六",Sunday:"星期日",Monday:"星期一",Tuesday:"星期二",Wednesday:"星期三",Thursday:"星期四",Friday:"星期五",Saturday:"星期六",jan:"1月",feb:"2月",mar:"3月",apr:"4月",may:"5月",jun:"6月",jul:"7月",aug:"8月",sep:"9月",oct:"10月",nov:"11月",dec:"12月",January:"一月",February:"二月",March:"三月",April:"四月",May:"五月",June:"六月",July:"七月",August:"八月",September:"九月",October:"十月",November:"十一月",December:"十二月",am:"上午",AM:"上午",pm:"下午",PM:"下午"}},u=i(1),h=function(t,e,i){this.resolve=this.resolve.bind(this),this.reject=this.reject.bind(this),"function"==typeof t&&(this._resolveHandler=t),"function"==typeof e&&(this._rejectHandler=e),null!=i&&(this._ctx=i),this.promise=new Promise(function(t,e){this._resolve=t,this._reject=e}.bind(this))};h.prototype.promise=null,h.prototype._resolve=null,h.prototype._reject=null,h.prototype._resolveHandler=null,h.prototype._rejectHandler=null,h.prototype._ctx=null,h.prototype.resolve=function(t){if(this._resolve){if(this._resolveHandler){var e=this._resolveHandler(t,this._ctx||this);null!=e&&(t=e)}this._resolve(t),this._finally()}},h.prototype.reject=function(t){if(this._reject){if(this._rejectHandler){var e=this._rejectHandler(t,this._ctx||this);null!=e&&(t=e)}this._reject(t),this._finally()}},h.prototype._finally=function(){this._ctx=this._resolveHandler=this._rejectHandler=null,this._resolve=this._reject=null};var p={en:!0,de:!0,ja:!0,zh:!0,"zh-Hant":!0},d={_deferred:null,themeReady:null,_defaultColors:{up:"#39C46E",down:"#F5475B",level:"#C2C2C2",tickUp:"#39C46E",tickDown:"#F5475B",baseGrid:"#1A1A1C",baseText:"#C2C2C2",trackColor:"#FF9933"}};d.themeColors=d._defaultColors,d._components={},d._themeName="",d._elfVersion=0,d._dummyIcon=null,d._iconLoaded=!1,d._icons={"elf-theme-halo":{rowGrouping:{expander:"down"},sorting:{ascending:"hollow-arrow-up",descending:"hollow-arrow-down",sortable:"sort-up-down"},columnStack:{stack:"list",expand:"right",collapse:"left"}},"elf-theme-solar":{columnStack:{stack:"list",expand:"right",collapse:"left"}}},d._icons["halo-theme"]=d._icons["elf-theme-halo"],d._icons["solar-theme"]=d._icons["elf-theme-solar"],d.getElfVersion=function(){if(!d._elfVersion){var t=0;if(window.EFX_GRID){var e=window.EFX_GRID.version;t=+(e=e.split("."))[0]}else if(window.elf)if(window.elf.version){var i=window.elf.version.match(/\d/);i&&i[0]&&(t=parseInt(i[0],10))}else window.elf.customElements?t=3:window.customElements&&(t=4);else window.Polymer&&(t=1);d._elfVersion=t}return d._elfVersion},d.hasComponent=function(t){var e=d._components[t];if(null==e){e=0;var i=d.getElfVersion();if(t)1===i?document.createElement(t).is===t&&(e=i):i>1&&(window.customElements&&window.customElements.get(t)||document.createElement(t).constructor!==HTMLElement)&&(e=i),d._components[t]=e}return e},d.toLangString=function(t){if(!t)return"";if("zh-hant"===(t=t.toLowerCase()))return"zh-Hant";var e=t.replace(/-.*/,"");return p[e]?e:""},d.hasTheme=function(t){return t===d.getThemeName()},d.getThemeName=function(t){return d._themeName||(d._themeName=d.getCssVariable("--theme-name",document.documentElement)),d._themeName},d.isHaloTheme=function(t){return null==t&&(t=d.getThemeName()),!!t&&t.indexOf("halo")>=0},d.injectIcons=function(t,e){if("object"==typeof t){var i=d.getThemeName();t.themeName=i;var n=d.getElfVersion();t.elfVersion=n;var o=d._icons[i];o&&(t.icons=o)}},d.getIconList=function(){var t=d._icons[d.getThemeName()];return t?Object(u.e)(t):[]},d._onIconPreloaded=function(){if(d._dummyIcon){var t=d._dummyIcon.parentNode;t&&t.removeChild(d._dummyIcon),d._dummyIcon=null}},d.prepareIconPreloading=function(){if(!d._iconLoaded){d._iconLoaded=!0;var t=d.getIconList();if(t.length){setTimeout(d._onIconPreloaded,10);var e=d._dummyIcon=document.createElement("ef-icon");return e.style.transform="scale(0)",document.body.appendChild(e),t}}return null},d.getCssVariable=function(t,e){var i="",n=e||document.body;return window&&"string"==typeof t&&1===n.nodeType&&t.match(/^--/)&&(i=(i=window.getComputedStyle(n).getPropertyValue(t)).replace(/[\"\']/g,"")),i},d.getCssVariables=function(t,e){var i=e||document.body;if(window&&1===i.nodeType){var n=window.getComputedStyle(i);for(var o in t){var r=t[o];r&&r.match(/^--/)&&(t[o]=n.getPropertyValue(r).replace(/\"/g,""))}}return t||null},d.getThemeColors=function(){if(d.themeReady)return d.themeReady;var t=d._deferred=new h;d.themeReady=t.promise;var e=window?window.JET:null;if(e&&e.Settings)try{e.Settings.read(d._onColorProfile,{providerName:"Configuration",settingName:"RDE_USER_CURRENT_TICK_COLOR"})}catch(e){t.reject("Cannot read JET's settings")}else setTimeout(d._retrieveThemeColors,100);return t.promise},d._onColorProfile=function(t){t&&document.documentElement.setAttribute("movement-color-profile",t.toLowerCase()),d._retrieveThemeColors()},d.getMovementColorProfile=function(){return document.documentElement.getAttribute("movement-color-profile")},d._retrieveThemeColors=function(){var t=d.themeColors=d.getCssVariables({primary:"--color-scheme-primary",secondary:"--color-scheme-secondary",tertiary:"--color-scheme-tertiary",complementary:"--color-scheme-complementary",up:"--color-scheme-positive",down:"--color-scheme-negative",level:"--color-scheme-neutral",tickUp:"--color-scheme-tickup",tickDown:"--color-scheme-tickdown"});t.up||(t.up=d._defaultColors.up,t.down=d._defaultColors.down,t.level=d._defaultColors.level,t.tickUp=d._defaultColors.tickUp,t.tickDown=d._defaultColors.tickDown),t.positive=t.up,t.negative=t.down,t.neutral=t.level;var e=document.createElement("table");e.style.visibility="hidden",e.style.position="fixed",e.style.left="0",e.style.top="0",e.style.width="0";var i=e.insertRow(-1),n=i.insertCell(-1);document.body.appendChild(e);var o=window.getComputedStyle(i);t.tableBg=o.backgroundColor;var r=window.getComputedStyle(n);t.tableText=r.color,t.tableBorder=r.borderColor,t.tableText===t.tableBorder&&(n.className="tr-lg",r=window.getComputedStyle(n),t.tableBg=r.backgroundColor,t.tableText=r.color,t.tableBorder=r.borderColor,t.tableText===t.tableBorder&&(t.tableBg=d._defaultColors.baseGrid,t.tableText=d._defaultColors.baseText,t.tableBorder="")),t.tableBg=Object(u.h)(t.tableBg),t.tableText=Object(u.h)(t.tableText),t.tableBorder=Object(u.h)(t.tableBorder),document.body.removeChild(e),t.baseGrid=t.tableBg,t.baseText=t.tableText,t.trackColor=t.primary||d._defaultColors.trackColor,d._deferred.resolve(t)};var c=d,_=(new Date(NaN),Date.UTC(1900,0,1)),f=Date.UTC(1900,2,1),g=["sun","mon","tue","wed","thu","fri","sat"],y=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],m=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],v=["January","February","March","April","May","June","July","August","September","October","November","December"],C=function(t){return t>9?""+t:"0"+t},S={D:function(t,e){return""+t.getDate()},DD:function(t,e){return C(t.getDate())},DDD:function(t,e){return e[g[t.getDay()]]},D_:function(t,e){return e[y[t.getDay()]]},M:function(t,e){return""+(t.getMonth()+1)},MM:function(t,e){return C(t.getMonth()+1)},MMM:function(t,e){return e[m[t.getMonth()]]},M_:function(t,e){return e[v[t.getMonth()]]},YY:function(t,e){return(""+t.getFullYear()).substr(-2)},Y_:function(t,e){return""+t.getFullYear()},H:function(t,e){return""+t.getHours()},H_:function(t,e){return C(t.getHours())},h:function(t,e){var i=t.getHours()%12;return 0===i?"12":""+i},h_:function(t,e){var i=t.getHours()%12;return C(i=0===i?12:i)},m:function(t,e){return""+t.getMinutes()},m_:function(t,e){return C(t.getMinutes())},s:function(t,e){return""+t.getSeconds()},s_:function(t,e){return C(t.getSeconds())},S:function(t,e){return~~(t.getMilliseconds()/100)},SS:function(t,e){return C(~~(t.getMilliseconds()/10))},S_:function(t,e){return(i=t.getMilliseconds())>99?""+i:i>9?"0"+i:"00"+i;var i},A:function(t,e){return t.getHours()<12?e.AM:e.PM},a:function(t,e){return t.getHours()<12?e.am:e.pm}},w={_dateTimePattern:"M/D/YY h:mm A",_localeSetting:"en",_activeLocaleMap:null,_activeInput:null,setDateTimePattern:function(t){w._dateTimePattern=t||"M/D/YY h:mm A"},setLocale:function(t){var e=c.toLangString(t);w._localeSetting=l[e]?e:"en"},format:function(t,e,i){var n=null,o="",r=!(!i||"LOCAL"!==i.toUpperCase());if("number"==typeof t)t>1e8?n=new Date(t):(n=w.fromDateNumber(t),r=!0);else if(t instanceof Date)n=new Date(t);else{var s=(o=t+"").match(/^\d{4}(-\d{2}(-\d{2}(T\d{2}\:\d{2}\:\d{2})?)?)?$/);o=o.replace(/\-/g,"/"),s&&(o=o.replace(/T/g," ")),n=new Date(o)}return w.isInvalidDate(n)?t||"":(r||n.setTime(n.getTime()+6e4*n.getTimezoneOffset()),w.formatDateObject(n,e))},formatDateObject:function(t,e){if(w.isInvalidDate(t))return"";e||(e=w._dateTimePattern),w._activeInput=t,w._activeLocaleMap=l[w._localeSetting]||DateTimeLocale.en;var i=e.replace(/D+|M+|Y+|H+|S+|A+|d+|m+|y+|h+|s+|a+|\[[^\]]*\]+/g,w._parseDatePattern);return w._activeInput=null,i},_lowerCaseDatePatterns:{d:!0,y:!0},_parseDatePattern:function(t){var e=t?t.charAt(0):"";if("["===e)return t.substring(1,t.length-1);var i=S[t];if(!i){var n=t;w._lowerCaseDatePatterns[e]&&(n=t.toUpperCase(),e=e.toUpperCase(),i=S[n]),i||(i=S[n=e+"_"])}return i?i(w._activeInput,w._activeLocaleMap):t},isValidDate:function(t){if(t&&t.getTime){var e=t.getTime();return e==e}return!1},isInvalidDate:function(t){if(t&&t.getTime){var e=t.getTime();return e!=e}return!0},fromDateNumber:function(t){var e=w.dateNumberToMs(t);if(e==e){var i=w.timeNumberToMs(t);return new Date(e+i)}return new Date(NaN)},dateNumberToMs:function(t){if(!(t=Math.floor(+t))||t<=0||60===t)return NaN;var e=t-25569;return t<60&&e++,864e5*e},timeNumberToMs:function(t){"number"!=typeof t&&(t=+t);var e=t-Math.floor(t);return e?(e<0&&(e=-e),1e3*Math.round(86400*e)):0},toDateObject:function(t){var e=null;if(t instanceof Date)e=t;else if("number"==typeof t)e=t>3e9||t<=0?new Date(t):t>1e5?new Date(1e3*t):w.fromDateNumber(t);else if(t){var i=t+"",n=i.match(/^\d{4}(-\d{2}(-\d{2}(T\d{2}\:\d{2}\:\d{2})?)?)?$/);i=i.replace(/\-/g,"/"),n&&(i=i.replace(/T/g," ")),e=new Date(i)}else e=new Date(NaN);return e},toDateNumber:function(t){return w._millisecondToDateNumber(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()))},toTimeNumber:function(t){return Date.UTC(1970,0,1,t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())/864e5},_millisecondToDateNumber:function(t){if((t=+t)!=t||t<_)return NaN;var e=t/864e5+25569;return t<f&&e--,e},toYYYYMMDD:function(t){var e=t?t.toJSON():"";return e?e.substr(0,10):""}},b=w,R={ISEMPTY:function(t){return t!=t||0===t||t?0:1},ISERR:function(t){return t!=t||null==t?1:0},ISNA:function(t){return""===t?1:0},ISNUMBER:function(t){return"number"==typeof t?1:0},ISSTRING:function(t){return"string"==typeof t?1:0},ISNASTRING:function(t){if(t){if(0===t.length)return 1;if(t.constructor===Object){for(var e in t)return 0;return 1}}else if(""===t)return 1;return 0}},I=R,D={AND:function(){for(var t=arguments[0]instanceof Array?arguments[0]:arguments,e=t.length;--e>=0;)if(!t[e])return 0;return 1},FALSE:function(){return 0},IF:function(t,e,i){return t?e:i},NOT:function(t){return t?0:1},OR:function(){for(var t=arguments[0]instanceof Array?arguments[0]:arguments,e=t.length;--e>=0;)if(t[e])return 1;return 0},TRUE:function(){return 1}},x=D,A={};A.ABS=Math.abs,A.ACOS=Math.acos,A.ACOSH=function(t){return Math.log(t+Math.sqrt(t*t-1))},A.ASIN=Math.asin,A.ASINH=function(t){return t===-1/0?t:Math.log(t+Math.sqrt(t*t+1))},A.ATAN=Math.atan,A.ATAN2=function(t,e){return Math.atan2(e,t)},A.ATANH=function(t){return Math.log((1+t)/(1-t))/2},A.CEILING=function(t,e){return e||(e=1),t/=e,Math.ceil(t)*e},A.CEIL=A.CEILING,A.COMBIN=function(t,e){var i=A.FACT;return i(t)/(i(e)*i(t-e))},A.COS=Math.cos,A.COSH=function(t){var e=Math.exp(t);return(e+1/e)/2},A.DEGREES=function(t){return t/(Math.PI/180)},A.EVEN=function(t){return(t=Math.ceil(t))%2?t<0?t-1:t+1:t},A.EXP=Math.exp,A.FACT=function(t){if(t<0)return NaN;t=Math.floor(t);for(var e=1;t>1;)e*=t,--t;return e},A.FACTDOUBLE=function(t){if(t<0)return NaN;t=Math.floor(t);for(var e=1;t>1;)e*=t,t-=2;return e},A.FLOOR=function(t,e){return e||(e=1),t/=e,Math.floor(t)*e},A.GCD=function(t,e){if(t<0&&(t=-t),e<0&&(e=-e),e>t){var i=t;t=e,e=i}for(;0!=e;){if(0==(t%=e))return e;e%=t}return t},A.INT=Math.floor,A.LCM=function(){for(var t=arguments[0]instanceof Array?arguments[0]:arguments,e=t.length,i=Math.abs(t[0]),n=1;n<e;n++){for(var o=Math.abs(t[n]),r=i;i&&o;)i>o?i%=o:o%=i;i=Math.abs(r*t[n])/(i+o)}return i},A.LN=Math.log,A.LOG=function(t,e){return null==e&&(e=10),Math.log(t)/Math.log(e)},A.LOG10=function(t){return Math.log(t)/Math.LN10},A.MOD=function(t,e){return t%e},A.ODD=function(t){return(t=Math.ceil(t))%2==0?t<0?t-1:t+1:t},A.POWER=Math.pow,A.PRODUCT=function(){var t=arguments[0]instanceof Array?arguments[0]:arguments,e=t[0];if(null==e||e!=e)return NaN;for(var i=t.length;--i>=1;)e*=t[i];return e},A.PROD=A.PRODUCT,A.QUOTIENT=function(t,e){return Math.floor(t/e)},A.RADIANS=function(t){return t*(Math.PI/180)},A.RAND=Math.random,A.RANDBETWEEN=function(t,e){return Math.floor(Math.random()*(e-t+1))+t},A.ROUND=function(t,e){if(!e)return Math.round(t);var i=Math.pow(10,e);return Math.round(t*i)/i},A.ROUNDDOWN=function(t,e){if(!e)return Math.floor(t);var i=Math.pow(10,e);return Math.floor(t*i)/i},A.ROUNDUP=function(t,e){if(!e)return Math.ceil(t);var i=Math.pow(10,e);return Math.ceil(t*i)/i},A.SERIESSUM=function(t,e,i,n){for(var o=0,r=n.length;--r>=0;)o+=n[r]*Math.pow(t,e+r*i);return o},A.SIGN=function(t){return t>0?1:t<0?-1:0},A.SIN=Math.sin,A.SINH=function(t){var e=Math.exp(t);return(e-1/e)/2},A.SQRT=Math.sqrt,A.SQRTPI=function(t){return Math.sqrt(t*Math.PI)},A.SUM=function(){for(var t=arguments[0]instanceof Array?arguments[0]:arguments,e=0,i=t.length;--i>=0;)e+=t[i];return e},A.SUMPRODUCT=function(){var t,e=arguments[0]instanceof Array?arguments[0]:arguments,i=e.length;if(0===i)return 0;var n=[];for(t=0;t<i;++t)n[t]=1;for(t=0;t<i;++t)n[t]*=e[t];var o=0;for(t=0;t<i;++t)o+=n[t];return o},A.SUMSQ=function(){for(var t=arguments[0]instanceof Array?arguments[0]:arguments,e=0,i=t.length;--i>=0;){var n=t[i];e+=n*n}return e},A.TAN=Math.tan,A.TANH=function(t){if(t===1/0)return 1;if(t===-1/0)return-1;var e=Math.exp(2*t);return(e-1)/(e+1)},A.TRUNC=function(t,e){if(!e)return Math.floor(t);var i=Math.pow(10,e);return Math.floor(t*i)/i};var T=A,L={AVERAGE:function(){var t=arguments[0]instanceof Array?arguments[0]:arguments,e=t.length;if(e<=0)return NaN;for(var i=0,n=e;--n>=0;)i+=t[n];return i/e}};L.AVG=L.AVERAGE,L.COUNT=function(){for(var t=arguments[0]instanceof Array?arguments[0]:arguments,e=0,i=t.length;--i>=0;){var n=t[i];null!=n&&n==n&&++e}return e},L.MAX=function(){var t=arguments[0]instanceof Array?arguments[0]:arguments;if(t.length<=0)return NaN;for(var e=t[0],i=t.length;--i>=1;)t[i]>e&&(e=t[i]);return e},L.MIN=function(){var t=arguments[0]instanceof Array?arguments[0]:arguments;if(t.length<=0)return NaN;for(var e=t[0],i=t.length;--i>=1;)t[i]<e&&(e=t[i]);return e},L.STDEV=function(){var t=arguments[0]instanceof Array?arguments[0]:Array.prototype.slice.call(arguments),e=t.length;if(e<=0)return NaN;if(1===e)return 0;for(var i=L.AVERAGE(t),n=0,o=e;--o>=0;){var r=t[o]-i;n+=r*r}return Math.sqrt(n/(e-1))},L.STDEVP=function(){var t=arguments[0]instanceof Array?arguments[0]:Array.prototype.slice.call(arguments),e=t.length;if(e<=0)return NaN;if(1===e)return 0;for(var i=L.AVERAGE(t),n=0,o=e;--o>=0;){var r=t[o]-i;n+=r*r}return Math.sqrt(n/e)};var M=L,E={},F=function(t){return t||0===t?t+"":""};E.EXACT=function(t,e){return(t+="")===(e+="")?1:0},E.FIND=function(t,e,i){return(t=F(t))&&(e=F(e))?((!(i=+i)||i<0)&&(i=0),e.indexOf(t,i)):0},E.LEFT=function(t,e){return(e=+e)||(e=0),e<0&&(e=1),F(t).substr(0,e)},E.LENGTH=function(t){return F(t).length},E.LEN=E.LENGTH,E.LOWER=function(t){return F(t).toLowerCase()},E.MID=function(t,e,i){return F(t).substr(e,i)},E.REPLACE=function(t,e,i,n){n+="";var o=(t=F(t)).split("");return o.splice(i,e,n),o.join("")},E.RIGHT=function(t,e){(e=+e)||(e=0),e<0&&(e=1);var i=(t=F(t)).length-e;return t.substr(i,e)},E.TRIM=function(t){return F(t).trim()},E.UPPER=function(t){return F(t).toUpperCase()},E.VALUE=function(t){return+t},E.CHAR=function(t){var e=+t;return String.fromCharCode(e)},E.CLEAN=function(t){for(var e=F(t).split(""),i=e.length;--i>=0;){var n=e[i].charCodeAt(0);(n<32||n>127)&&(e[i]="")}return e.join("")},E.CODE=function(t){return F(t).charCodeAt(0)},E.PROPER=function(t){for(var e=(t=F(t)).split(/[\W_]/g),i=t.match(/[\W_]/g),n=e.length,o="",r=0;r<n;r++){var s=e[r],a=s.length;1===a?o+=s.toUpperCase():0!==a&&(o+=s.charAt(0).toUpperCase()+s.substr(1).toLowerCase());var l=i[r];l&&(o+=l)}return o},E.REPEAT=function(t,e){if(!(e=+e)||e<0)return"";if(""===(t=F(t)))return"";for(var i=t,n=1;n<e;n++)i+=t;return i},E.STRING=function(t,e){return(t=+t)?(!(e=+e)||e<0?e=0:e>9&&(e=9),t.toFixed(e)):""};var z=E,k=function(){this._context={},k._addContext(this._context,k.getContext()),this._context._DATA=this._getData.bind(this),this._setData=this._defaultFormulaDataSetter.bind(this),this._formulas=[],this._formulaMap={},this._referenceMap={}};r.b.inherits(k,s.b),k.prototype._context=null,k.prototype._rowData=null,k.prototype._setData=null,k.prototype._formulas=null,k.prototype._formulaMap=null,k.prototype._referenceMap=null,k._context=null,k.getContext=function(){var t=k._context;return t||(t={},k._context=t,k._addContext(t,b),k._addContext(t,I),k._addContext(t,x),k._addContext(t,T),k._addContext(t,M),k._addContext(t,z)),t},k.addContext=function(t){var e=k.getContext();k._addContext(e,t)},k._addContext=function(t,e){for(var i in e)t[i]=e[i]},k.prototype.setFormulaDataGetter=function(t){"function"==typeof t&&(this._context._DATA=t)},k.prototype.setFormulaDataSetter=function(t){"function"==typeof t&&(this._setData=t)},k.prototype._defaultFormulaDataSetter=function(t,e,i,n){if("..."!==e){var o=t.getAlias();i[o]=e,n&&(n[o]=e)}},k.prototype.addFormula=function(t){var e;return t instanceof a.a?e=t:(this._rowData={},e=new a.a(t,this._context),this._rowData=null),e.addEventListener("dataCacheChanged",this._dispatch.bind(this,"dataChanged")),e.addEventListener("dataRequired",this._dispatch.bind(this,"dataRequired")),e.addEventListener("formulaChanged",this._dispatch.bind(this,"formulaChanged")),this._formulas.push(e),e},k.prototype.mockFormula=function(t){return t instanceof a.a?new a.a(t.getInput(),this._context):new a.a(t,this._context)},k.prototype.removeFormula=function(t){var e;if(t instanceof a.a&&(t=this._formulas.indexOf(t)),"number"==typeof t)(e=this._formulas[t])&&(this._formulas.splice(t,1),e.getReference()&&(delete this._formulaMap[e.getReference()],delete this._referenceMap[e.getReference()]),e.dispose());else if("string"==typeof t&&(e=this._formulaMap[t])){var i=this._formulas.indexOf(e);i>=0&&(this._formulas.splice(i,1),delete this._formulaMap[t],delete this._referenceMap[t]),e.dispose()}return e||null},k.prototype.removeAllFormulas=function(){for(var t=this._formulas,e=t.length;--e>=0;)delete this._referenceMap[t[e].getReference()];this._formulas.length=0,this._formulaMap={}},k.prototype.getFormula=function(t){return("number"==typeof t?this._formulas[t]:this._formulaMap[t])||null},k.prototype.getFormulaByExpression=function(t){for(var e=this._formulas.length,i=0;i<e;++i){var n=this._formulas[i];if(n.getInput()===t)return n}return null},k.prototype.getAllFormulas=function(){return this._formulas},k.prototype.getAllFormulaReferences=function(){return this._referenceMap},k.prototype.getFormulaCount=function(){return this._formulas.length},k.prototype._generateUniqueReference=function(t){for(var e=t,i=0;null!=this._referenceMap[e];)e=t+"_"+ ++i;return e},k.prototype.addReference=function(t,e){if(!t||!e)return"";e=this._generateUniqueReference(e);var i="";if(t instanceof a.a){if(!this._setFormulaReference(t,e))return"";i=t.getAlias()}else i=t;return this._referenceMap[e]=i,e},k.prototype.renameReference=function(t,e){if(!e)return this.removeReference(t);if(!t||null==this._referenceMap[t]||t===e)return!1;var i=this._formulaMap[t];if(i&&!this.isValidReference(i,e))return!1;for(var n=this._formulas.length;--n>=0;){var o=this._formulas[n];if(o.changeField(t,e)){var r=o.getReference();r&&(this._referenceMap[r]=o.getAlias())}}return i&&this._setFormulaReference(i,e),this._referenceMap[e]=this._referenceMap[t],delete this._referenceMap[t],!0},k.prototype.removeReference=function(t){if(!t||null==this._referenceMap[t])return!1;var e=this._formulaMap[t];return null!=e&&(e._setReference(""),delete this._formulaMap[t]),delete this._referenceMap[t],!0},k.prototype.resolveReference=function(t){return this._referenceMap[t]||t},k.prototype._getData=function(t,e){if(!this._rowData)return null;var i=this._rowData[this.resolveReference(t)];if(i){var n=Number(i);n==n&&(i=n)}return i},k.prototype._setFormulaReference=function(t,e){if(this._formulaMap[e])return console.warn("Duplicate formula reference detected."),!1;var i=t.getReference();if(i===e)return!1;e&&(this._formulaMap[e]=t),t._setReference(e);var n=this._sortDependencies(this._formulas,this._formulaMap);return n?(this._formulas=n,delete this._formulaMap[i],!0):(t._setReference(i),delete this._formulaMap[e],!1)},k.prototype.calculate=function(t,e){this._rowData=t;for(var i=this._formulas.length,n=0;n<i;++n){var o=this._formulas[n];if(e){var r=null!=e[o.getAlias()];if(!r){for(var s=o.getFieldNames(),a=s.length;--a>=0;)if(null!=e[this.resolveReference(s[a])]){r=!0;break}if(!r)continue}}var l=o.calculate(t);this._setData(o,l,t,e)}this._rowData=null},k.prototype.isValidReference=function(t,e){if(!e)return!0;if(this._referenceMap[e])return!1;var i=t.getReference(),n=this._createParentChildrenMap(this._formulas);if(i)for(var o in delete n[i],n){var r=n[o],s=r.indexOf(i);-1!==s&&((r=r.slice(0)).splice(s,1),-1===(s=r.indexOf(e))&&r.push(e),n[o]=r)}return n[e]=t.getFieldNames(),!!this._sortParentChildrenMap(n)},k.prototype._sortDependencies=function(t,e){if(1===t.length)return t;var i=this._createParentChildrenMap(t),n=this._sortParentChildrenMap(i);if(!n)return null;var o=t.filter((function(t){return!t.getReference()})),r=[];if(e){for(var s=n.length;--s>=0;){var a=e[n[s]];a&&r.push(a)}o.length>0&&(r=r.concat(o))}return r},k.prototype._createParentChildrenMap=function(t){var e,i={};for(e=t.length;--e>=0;){var n=t[e],o=n.getReference();o&&(i[o]=n.getFieldNames())}return i},k.prototype._sortParentChildrenMap=function(t){var e,i,n,o,r,s={};for(r in t){o=(n=t[r]).length;for(var a=0;a<o;++a)s[i=n[a]]=s[i]+1||1}var l=[];for(r in t)s[r]||l.push(r);for(var u=[];l.length>0;)for(r=l.shift(),u.push(r),o=(n=t[r])?n.length:0,e=0;e<o;++e)--s[i=n[e]]>0||l.push(i);for(i in s)if(s[i])return null;return u},k._proto=k.prototype;var P,V={};V.isIE=V.isIE||((P=window.navigator.userAgent).indexOf("MSIE ")>0||P.indexOf("Trident/")>0||P.indexOf("Edge/")>0),V.isTouchDevice=V.isTouchDevice||!!(navigator.maxTouchPoints&&navigator.maxTouchPoints<256||navigator.msMaxTouchPoints&&navigator.msMaxTouchPoints<256),V.getElement=function(t){return V.isElement(t)?t:t&&V.isFunction(t.getElement)?t.getElement():null},V.isElement=function(t){return!!t&&1===t.nodeType},V.isEmpty=function(t,e){return null==t||void 0===t||!e&&""===t||V.isArray(t)&&0===t.length},V.isNumber=function(t){return"number"==typeof t&&isFinite(t)},V.isString=function(t){return"string"==typeof t},V.isArray=Array.isArray,V.isFunction=function(t){return"function"==typeof t},V.getClientPosition=function(t,e){var i=e||{};if(t.getBoundingClientRect){var n=t.getBoundingClientRect();i.x=n.left,i.y=n.top}else i.x=t.clientX,i.y=t.clientY;return i},V.getRelativePosition=function(t,e,i){i=V.getClientPosition(t,i);var n=V.getClientPosition(e);return i.x-=n.x,i.y-=n.y,i},V.moveArrayItem=function(t,e,i){if(!t)return null;var n=t.length;if(e>=n&&i>=n)return t;var o=t.splice(e,1)[0];return i<n?t.splice(i,0,o):t[i]=o,t},V.insertArrayItem=function(t,e,i){t&&(e<0||(e<t.length?t.splice(e,0,i):t[e]=i))},V.removeArrayItem=function(t,e){return t&&e>=0&&e<t.length?t.splice(e,1)[0]:null},V.pushArrayItems=function(t,e){var i=e?e.length:0;if(i>0)if(i<1e5)i>1?Array.prototype.push.apply(t,e):t.push(e[0]);else for(var n=0,o=0;n<i;)o+=1e5,Array.prototype.push.apply(t,e.slice(n,o)),n=o;return t},V.insertEmptyItems=function(t,e,i){if(i>0)if(i>1){var n=t.slice(e);t.length=e,t.length+=i,V.pushArrayItems(t,n)}else t.splice(e,0,null)},V.cycleArray=function(t,e){if(e>0&&t&&e<t.length){var i=t.splice(0,e);return t.concat(i)}return t||null},V.moveIndex=function(t,e,i){return V.isNumber(t)?t===e?V.isNumber(i)?i:-1:(null!==e&&t>e&&--t,null!==i&&t>=i&&++t,t):-1},V.lowerBound=function(t,e,i,n,o){(null==i||i<0)&&(i=0),(null==n||n<0||n>t.length)&&(n=t.length),i>n&&(i=n),null==o&&(o=V._defaultLessComparator);for(var r=0;n>i;)o(t[r=i+n>>1],e)?i=r+1:n=r;return i},V.upperBound=function(t,e,i,n,o){for(var r=V.lowerBound(t,e,i,n,o);t[r]===e;)++r;return r},V.stringFormat=function(t){var e=Array.prototype.slice.call(arguments,1);return t.replace(/{(\d+)}/g,(function(t,i){return null!=e[i]?e[i]:t}))},V._defaultLessComparator=function(t,e){return t<e},V._numericSorter=function(t,e){return t-e},V._preventDefault=function(t){t.preventDefault(),t.stopPropagation()},V._deprecatedFunction=function(){console.warn("Calling deprecated method")},V.calculatePercent=function(t,e,i){if(!t&&0!==t||!e&&0!==e||!i&&0!==i)return NaN;if(i===t)return 50;var n=(e-t)/(i-t);return n<0?0:n>1?100:100*n},V.closestElement=function(t,e){for(var i=t;i&&i.classList;){if(i.classList.contains(e))return i;i=i.parentNode}return null},V.isMobile=V.isMobile||/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);var O=V,N=function(t){this.dispatch=this.dispatch.bind(this),this._listeners=[],this.setSender(t)};N.prototype.listen=function(t,e){if(t&&O.isFunction(t)&&this._listeners.indexOf(t)<0)if(null==e)this._listeners.push(t);else{t._priority=e;var i=O.lowerBound(this._listeners,t,0,this._listeners.length,N.listenerComparer);this._listeners.splice(i,0,t)}},N.prototype.unlisten=function(t){if(t){var e=this._listeners.indexOf(t);e>=0&&this._listeners.splice(e,1)}},N.prototype.unlistenAll=function(){this._listeners.length=0},N.prototype.getListenerCount=function(){return this._listeners.length},N.prototype.hasListener=function(){return this._listeners.length>0},N.prototype.dispatch=function(t){if(this._enabled&&!(this._listeners.length<=0)){this._dispatching&&window.console.log("WARNING: There is an error in one of your binding methods."),this._dispatching=!0,null==t&&(t={}),null!==this._sender&&(t.sender=this._sender),null!==this._extender&&this._extender(t);for(var e=0;e<this._listeners.length;e++)this._listeners[e](t);this._dispatching=!1}},N.prototype.isDispatching=function(){return this._dispatching},N.prototype.isEnabled=function(){return this._enabled},N.prototype.enable=function(t){this._enabled=!1!==t},N.prototype.disable=function(t){this._enabled=!1===t},N.prototype.setSender=function(t){this._sender=t||null},N.prototype.setEventArgExtender=function(t){this._extender=null!=t?t:null},N.listenerComparer=function(t,e){return null==e._priority||t._priority>=e._priority},N.prototype._listeners=null,N.prototype._sender=null,N.prototype._extender=null,N.prototype._enabled=!0,N.prototype._dispatching=!1,N._proto=N.prototype;var H=N,G=function(){};G.prototype._customEvents=null,G.prototype.listen=function(t,e,i){this._customEvents&&this._customEvents[t]&&this._customEvents[t].listen(e,i)},G.prototype.unlisten=function(t,e){this._customEvents&&this._customEvents[t]&&this._customEvents[t].unlisten(e)},G.prototype.unlistenAll=function(t){if(t)this._customEvents&&this._customEvents[t]&&this._customEvents[t].unlistenAll();else for(var e in this._customEvents)this._customEvents[e].unlistenAll()},G.prototype._addEvent=function(t){t&&(this._customEvents||(this._customEvents={}),this._customEvents[t]||(this._customEvents[t]=new H(this)))},G.prototype._addEvents=function(t){for(var e=Array.isArray(t)?t:arguments,i=e.length,n=0;n<i;++n)this._addEvent(e[n])},G.prototype._isEventDispatching=function(t){var e=this._customEvents[t];return!!e&&e.isDispatching()},G.prototype._disableEvent=function(t,e){var i=this._customEvents[t];i&&i.disable(e)},G.prototype._hasListener=function(t){return!(!this._customEvents||!this._customEvents[t])&&this._customEvents[t].hasListener()},G.prototype._dispatch=function(t,e){this._customEvents[t].dispatch(e)},G._proto=G.prototype;var B=G,W=function(){var t=this;t._rows={},t._subs={},t._staticFields={},t._onInsert=t._onInsert.bind(t),t._onUpdate=t._onUpdate.bind(t),t._onDelete=t._onDelete.bind(t),t._onBatchRequestADCData=t._onBatchRequestADCData.bind(t),t._onADCUpdate=t._onADCUpdate.bind(t),t._onADCError=t._onADCError.bind(t),t._onQ2DataChanged=t._onQ2DataChanged.bind(t),t._onQ2SubAdded=t._onQ2SubAdded.bind(t),t._onQ2SubRemoved=t._onQ2SubRemoved.bind(t),t._addEvent("dataComposed"),t._addEvent("dataChanged")};r.b.inherits(W,B),W.prototype.dispose=function(){this.unlistenAll(),this.clearAllData(!0),this._quotes2=null},W.prototype.setSubscriptions=function(t){this._quotes2&&(this._quotes2.removeEventListener("dataChanged",this._onQ2DataChanged),this._quotes2.removeEventListener("subscriptionAdded",this._onQ2SubAdded),this._quotes2.removeEventListener("subscriptionRemoved",this._onQ2SubRemoved)),this._quotes2=t,this._quotes2&&(this._quotes2.addEventListener("dataChanged",this._onQ2DataChanged),this._quotes2.addEventListener("subscriptionAdded",this._onQ2SubAdded),this._quotes2.addEventListener("subscriptionRemoved",this._onQ2SubRemoved))},W.prototype.getSubscriptions=function(){return this._quotes2},W.prototype.addSubscription=function(t,e,i){if(!this.getSubscription(t.id)){var n={s:t,rics:{}};this._subs[t.id]=n,this._quotes2||(t.onNewRow(this._onInsert),t.onUpdate(this._onUpdate),t.onRemoveRow(this._onDelete)),e&&(n.primary=e,i||(i={}),this._onInsert(t,e,i))}},W.prototype.removeSubscription=function(t){var e=t.id;if(t&&this._subs[e]){this._quotes2||t.stop();var i=this._subs[e].rics;for(var n in i)this.setRowData(e+n,null);delete this._subs[e]}},W.prototype.startAllSubscriptions=function(){if(this._quotes2)this._quotes2.start();else for(var t in this._subs)this._subs[t].s.start()},W.prototype.stopAllSubscriptions=function(){if(this._quotes2)this._quotes2.stop();else for(var t in this._subs)this._subs[t].s.stop()},W.prototype.getSubscription=function(t){return this._subs[t]?this._subs[t].s:null},W.prototype.getPrimaryRic=function(t){var e=this._subs[t];return e?e.primary:""},W.prototype.clearAllData=function(t){this._quotes2?this._quotes2.removeAllSubscriptions():this.stopAllSubscriptions(),this._subs={},this._rows={},this._adcTimerId>=0&&(clearTimeout(this._adcTimerId),this._adcTimerId=-1),this._adcRicMap=null,t||this._dispatchDataChange({globalChange:!0})},W.prototype.clearColumnData=function(t,e){for(var i="string"==typeof t?[t]:t,n=i.length;--n>=0;){var o=i[n];if(o)for(var r in this._rows)delete this._rows[r][o]}e||this._dispatchDataChange({globalChange:!0})},W.prototype.getData=function(t,e){var i=this.getRowData(t);return i?i[e]:null},W.prototype.getAllRics=function(){var t={};for(var e in this._subs){var i=this._subs[e].rics;for(var n in i)t[n]||(t[n]=[]),t[n].push(e)}return t},W.prototype.getAllRowIds=function(){var t=[];for(var e in this._rows)t.push(e);return t},W.prototype.hasRowId=function(t){return!!this._rows[t]},W.prototype.getColumnData=function(t){var e=[];for(var i in this._rows)e.push(this._rows[i][t]);return e},W.prototype.getRowData=function(t){return this._rows[t]||null},W.prototype.getMultipleRowData=function(t,e,i){var n=t.length;null==i&&(i=n),i>n&&(i=n),e>0||(e=0);for(var o=new Array(n),r=this._rows,s=e;s<i;++s)o[s]=r[t[s]]||null;return o},W.prototype.getAllRowData=function(){var t=[],e=this._rows;for(var i in e)t.push(e[i]);return t},W.prototype.setData=function(t,e,i){var n={};return n[e]=i,this.setRowData(t,n)},W.prototype.hasDataCloudData=function(t){if(!this._adcFields)return!1;var e=this.getRowData(t);if(!e)return!1;for(var i=this._adcFields.length;--i>=0;){if(null!=e[this._adcFields[i]])return!0}return!1},W.prototype.setRowData=function(t,e,i){var n=this.getRowData(t),o=!1,r=null;if(e)if(n){for(var s in e)n[s]=e[s],o=!0;r=e}else n=e,this._rows[t]=n,o=!0;else n&&(delete this._rows[t],o=!0);if(o&&!this._composing){var a=i||{};a.rid=t,r&&(a.changes=r),a.rowData=n,this._dispatchDataChange(a)}return o},W.prototype.cloneRowData=function(t){var e=this._rows[t];if(!e)return null;var i={};for(var n in e)0!==n.indexOf("FREE_TEXT")&&(i[n]=e[n]);return i},W.prototype.addStaticFields=function(t){if(Array.isArray(t))for(var e in t)this._staticFields[t[e]]?this._staticFields[t[e]]++:this._staticFields[t[e]]=1},W.prototype.removeStaticFields=function(t){if(Array.isArray(t))for(var e in t)this._staticFields[t[e]]&&(this._staticFields[t[e]]--,0===this._staticFields[t[e]]&&delete this._staticFields[t[e]])},W.prototype.resetStaticFields=function(){this._staticFields={}},W.prototype.getStaticFields=function(){return this._staticFields},W.prototype.dump=function(t){return W.constructTable(this.getAllRowData(),t,Object.keys(this._rows))},W.prototype.log=function(t){console.table(this.dump(t))},W.prototype.setDataCloudSettings=function(t,e,i,n){null!=t&&(this._userId=t),null!=e&&(this._productId=e),null!=i&&(this._adcUrl=i),n&&(this._lang=n)},W.prototype.getDataCloudFields=function(){return this._adcFields},W.prototype.addDataCloudFields=function(t){this._adcFields||(this._adcFields=[],this._adcRefMap={});var e=[];if(t instanceof Array)for(var i=t.length;--i>=0;)this._addDataCloudField(t[i],e);else this._addDataCloudField(t,e);if(e.length<=0)return!1;var n=this.getAllRics();return this._batchRequestDataCloud(n,e),!0},W.prototype.removeDataCloudField=function(t){if(!this._adcFields)return!1;if(!this._adcRefMap[t])return!1;if(--this._adcRefMap[t],!this._adcRefMap[t]){var e=this._adcFields.indexOf(t);this._adcFields.splice(e,1),this.clearColumnData(t)}return!0},W.prototype._dispatchDataChange=function(t){this._composing||(this._composing=!0,this._dispatch("dataComposed",t),this._composing=!1,this._dispatch("dataChanged",t))},W._defaultPropertyGetter=function(t,e,i){var n=e[i];return n?n[t]:null},W._defaultGetter=function(t,e){return t[e]},W.constructTable=function(t,e,i){var n=0,o=t.length,r=o,s=null,a=i||null,l=W._defaultGetter,u=!1;if(e){if(e.rowCount&&(r=e.rowCount,u=!0),e.colNames){s={};for(var h=e.colNames.length,p=0;p<h;++p)s[e.colNames[p]]=!0;u=!0}e.getter&&(l="string"==typeof e.getter?W._defaultPropertyGetter.bind(null,e.getter):e.getter,u=!0),e.startIndex&&(n=e.startIndex,u=!0),!1===e.withRowIds&&(a=null)}if(!u&&!a)return t;for(var d=[],c=n;c<o&&!(d.length>=r);++c){var _,f=t[c],g=a?{rid:a[c]}:{};if(f)if(s)for(_ in s)null!=f[_]&&(g[_]=l(f,_));else for(_ in f)g[_]=l(f,_);d.push(g)}return d},W.prototype._insertRic=function(t,e,i){var n=t+(e=e.replace("0#",""));if(this._onADCForNewRic(t,e),!this.getRowData(n)){var o=i;for(var r in i={},o)i[r]=o[r];i.SUB_ID=t,i.RIC=e}this.setRowData(n,i)},W.prototype._onQ2DataChanged=function(t){var e=t.subId,i=t.ric,n=t.values;n?this._insertRic(e,i,n):(delete this._subs[e].rics[i],this.setRowData(e+i,null))},W.prototype._onQ2SubAdded=function(t){for(var e=t.subs,i=t.duplicateSubIds,n=e.length,o=0;o<n;++o){var r=e[o],s=r.ric;if(this.addSubscription(r,s),i){var a=i[o];a&&window.setTimeout(this._onDuplicateRic.bind(this,r.id,this.getRowData(a+s)),10)}}},W.prototype._onQ2SubRemoved=function(t){for(var e=t.subs,i=e.length,n=0;n<i;++n){var o=e[n];this.removeSubscription(o)}},W.prototype._onADCForNewRic=function(t,e){var i=this._subs[t];i&&(this._adcFields&&(i.rics[e]||(this._adcTimerId<0&&(this._adcRicMap={},this._adcTimerId=setTimeout(this._onBatchRequestADCData,100)),this._adcRicMap[e]||(this._adcRicMap[e]=[]),this._adcRicMap[e].push(t))),i.rics[e]=!0)},W.prototype._onDuplicateRic=function(t,e){var i=this._subs[t];if(i){var n=(i=i.s).ric,o=e.SUB_ID,r=this._cloneRowData(e,n,t);if(r){this._onInsert(i,n,r);var s=i.children;if(s)for(var a=s.length,l=0;l<a;++l)n=s[l],r=this._cloneRowData(o,n,t),this._onInsert(i,n,r)}}},W.prototype._onInsert=function(t,e,i){var n=t.id;this._quotes2?this._insertRic(n,e,i):(this._onADCForNewRic(n,e),this.setRowData(n+e,i,{subscription:t,ric:e}))},W.prototype._onUpdate=W.prototype._onInsert,W.prototype._onDelete=function(t,e,i){delete this._subs[t.id].rics[e],this.setRowData(t.id+e,null,{subscription:t,ric:e})},W.prototype._addDataCloudField=function(t,e){this._adcRefMap[t]?++this._adcRefMap[t]:(this._adcFields.push(t),e.push(t),this._adcRefMap[t]=1)},W.prototype._onADCUpdate=function(t){var e=t.currentTarget,i=null;try{i=JSON.parse(e.responseText)}catch(t){return}if("Ok"===i.status){for(var n=i.cols,o=i.rows,r=o[0],s=-1,a={},l=0;l<n;++l){var u=r[l];"instrument"===u.i?s=l:u.r&&(a[u.r]=l)}for(var h=o.length,p=1;p<h;++p){var d=o[p],c=d[s],_={};for(var f in a){var g=d[a[f]];null!=g&&null!==g&&null==g.f&&(this._quotes2?(_[f]=g,_[f+"_FORMATTED"]=g):_[f]={formatted:g+"",raw:g})}var y=e.ricMap[c];if(y)for(l=y.length;--l>=0;){var m=y[l];this._subs[m]&&this.setRowData(m+c,_)}}}},W.prototype._onADCError=function(t){window.console.log(t)},W.prototype._onBatchRequestADCData=function(t){this._adcTimerId<=0||(this._adcTimerId=-1,this._batchRequestDataCloud(this._adcRicMap,this._adcFields),this._adcRicMap=null)},W.prototype._batchRequestDataCloud=function(t,e){if(!this._adcUrl)return null;var i=[];for(var n in t)i.push(n);for(;i.length>30;)this._requestDataCloud(t,e,i.splice(0,30));return this._requestDataCloud(t,e,i)},W.prototype._requestDataCloud=function(t,e,i){if(!i||i.length<=0)return null;if(!e||e.length<=0)return null;var n=new XMLHttpRequest;n.onload=this._onADCUpdate,n.onerror=this._onADCError,n.ricMap=t,n.open("POST",this._adcUrl,!0),n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var o="formula="+e+"&identifiers="+i;return this._productId&&(o+="&productid="+this._productId),this._userId&&(o+="&uuid="+this._userId),this._lang&&(o+="&lang="+this._lang),n.send(o),n},W.prototype._cloneRowData=function(t,e,i){var n="string"==typeof t?t:t.SUB_ID,o=this._rows[n+e];if(!o){if("object"!=typeof t)return null;o=t}var r={};for(var s in o)null==this._staticFields[s]&&(r[s]=o[s]);return r.SUB_ID=i,r},W.prototype._rows,W.prototype._subs,W.prototype._quotes2=null,W.prototype._staticFields=null,W.prototype._adcFields=null,W.prototype._adcRefMap=null,W.prototype._adcTimerId=-1,W.prototype._adcRicMap=null,W.prototype._adcUrl="/datacloud/rest/select",W.prototype._userId="",W.prototype._productId="",W.prototype._composing=!1,W.prototype._lang="",W._proto=W.prototype;var U=W,Y=function(t){this._rid=t,this._children={}};Y.prototype._rid,Y.prototype._children,Y.prototype._childCount=0,Y.prototype._collapsed=!1,Y.prototype._value=0,Y.prototype.getId=function(){return this._rid},Y.prototype.addChild=function(t,e){return!(!t||this._children[t])&&(e&&(e[t]=this._rid),this._children[t]=1,++this._childCount,!0)},Y.prototype.addChildren=function(t,e){for(var i=Array.isArray(t)?t:[t],n=i.length,o=0,r=0;r<n;++r)o|=this.addChild(i[r],e);return!!o},Y.prototype.containsChild=function(t){return!!this._children[t]},Y.prototype.removeChild=function(t,e){return!(!this._childCount||!this._children[t])&&(e&&delete e[t],delete this._children[t],--this._childCount,!0)},Y.prototype.removeChildren=function(t,e){if(!this._childCount)return!1;for(var i=Array.isArray(t)?t:[t],n=i.length,o=0,r=0;r<n;++r)o|=this.removeChild(i[r],e);return!!o},Y.prototype.removeAllChildren=function(t){if(this._childCount){if(t){var e=this._children;for(var i in e)t[i]&&delete t[i]}return this._children={},this._childCount=0,!0}return!1},Y.prototype.getChildIds=function(){return this._childCount?Object.keys(this._children):[]},Y.prototype.collapse=function(t){return t=!1!==t,this._collapsed!==t&&(this._collapsed=t,!0)},Y.prototype.expand=function(t){return this.collapse(!1===t)},Y.prototype.isCollapsed=function(){return this._collapsed},Y.prototype.getCollapsingStates=function(t){if(t||(t={}),this._childCount){var e=this._children,i=this._collapsed;for(var n in e)t[n]=i}return t},Y.prototype.getValue=function(){return this._value},Y.prototype.setValue=function(t){this._value=t};var q=Y,X=function(){this._segments={},this._childToSegmentId={}};X.prototype._segments,X.prototype._segmentCount=0,X.prototype._collapsedRids=null,X.prototype._dirtyCollapsingState=!1,X.prototype._childToSegmentId,X.prototype.addSegment=function(t){return!(!t||this._segments[t])&&(this._childToSegmentId[t]&&console.log("child of a segment cannot be set as a segment separator"),this._segments[t]=new q(t),++this._segmentCount,!0)},X.prototype.addSegments=function(t){for(var e=Array.isArray(t)?t:[t],i=e.length,n=0,o=0;o<i;++o)n|=this.addSegment(e[o]);return!!n},X.prototype.containsSegment=function(t){return!!this._segments[t]},X.prototype.getParentRowId=function(t){return this._childToSegmentId[t]||""},X.prototype.removeSegment=function(t){var e=this._segments[t];return!!e&&(e.isCollapsed()&&(this._dirtyCollapsingState=!0),e.removeAllChildren(this._childToSegmentId),delete this._segments[t],--this._segmentCount,!0)},X.prototype.removeAllSegments=function(){return!!this._segmentCount&&(this._segments={},this._childToSegmentId={},this._segmentCount=0,this._dirtyCollapsingState=!0,!0)},X.prototype.getSegmentCount=function(){return this._segmentCount},X.prototype.getSegment=function(t){return this._segments[t]||null},X.prototype.getSegments=function(){return this._segmentCount?this._segments:null},X.prototype.getSegmentIds=function(){return Object.keys(this._segments)},X.prototype.collapseSegment=function(t,e){var i=this._segments[t];if(i&&i.collapse(e))return this._dirtyCollapsingState=!0,!0;return!1},X.prototype.expandSegment=function(t,e){return this.collapseSegment(t,!1===e)},X.prototype.expandAllSegments=function(){if(this._segmentCount){var t=this._segments,e=0;for(var i in t)e|=t[i].expand();if(e)return this._dirtyCollapsingState=!0,!0}return!1},X.prototype.isCollapsedSegment=function(t){var e=this._segments[t];return!!e&&e.isCollapsed()},X.prototype.getCollapsedRows=function(){if(this._dirtyCollapsingState){this._dirtyCollapsingState=!1;var t=null,e=0;if(this._segmentCount){var i=this._segments;for(var n in t={},i)i[n].isCollapsed()&&(i[n].getCollapsingStates(t),++e)}this._collapsedRids=e?t:null}return this._collapsedRids},X.prototype.addSegmentChild=function(t,e){var i=this._segments[t];if(i&&i.addChild(e,this._childToSegmentId))return i.isCollapsed()&&(this._dirtyCollapsingState=!0),!0;return!1},X.prototype.addSegmentChildren=function(t,e){var i=this._segments[t];if(i&&i.addChildren(e,this._childToSegmentId))return i.isCollapsed()&&(this._dirtyCollapsingState=!0),!0;return!1},X.prototype.containsSegmentChild=function(t,e){var i=this._segments[t];return!!i&&i.containsChild(e)},X.prototype.removeSegmentChild=function(t,e){var i=this._segments[t];if(i&&i.removeChild(e,this._childToSegmentId))return i.isCollapsed()&&(this._dirtyCollapsingState=!0),!0;return!1},X.prototype.removeSegmentChildren=function(t,e){var i=this._segments[t];if(i&&i.removeChildren(e,this._childToSegmentId))return i.isCollapsed()&&(this._dirtyCollapsingState=!0),!0;return!1},X.prototype.removeAllSegmentChildren=function(){this._childToSegmentId={};var t=this._segments,e=this._dirtyCollapsingState,i=!1;for(var n in t){var o=this._segments[n];o.removeAllChildren()&&(i=!0,!e&&o.isCollapsed()&&(e=this._dirtyCollapsingState=!0))}return i},X.prototype.fillSegment=function(t,e){var i=Array.isArray(e)?e.length:0;if(i){var n=this._segments,o=this._childToSegmentId,r=n[t];if(r){var s=e.indexOf(t);if(s>=0){r.isCollapsed()&&(this._dirtyCollapsingState=!0),r.removeAllChildren(o);for(var a=s+1;a<i;++a){var l=e[a];if(n[l])break;r.addChild(l,o)}}}}},X.prototype.fillSegments=function(t){var e=Array.isArray(t)?t.length:0;this._childToSegmentId={};for(var i=this._segments,n=this._childToSegmentId,o=null,r=!1,s=0;s<e;++s){var a=t[s],l=i[a];l?((o=l).isCollapsed()&&(this._dirtyCollapsingState=!0),o.removeAllChildren()):o&&(o.addChild(a,n),r=!0)}return r},X.prototype.getSegmentValues=function(t){var e=t?t.length:0;if(!e)return null;for(var i=this._segments,n=this._childToSegmentId,o=null,r=new Array(e),s=0,a=0,l=0,u={};l<e;){var h=t[l];if(i[h]){if(++s,o=i[h],a+=100,r[l]=a,o.setValue(a),s>=this._segmentCount){++l;break}}else r[l]=s?a+10:0,n[h]&&(u[h]=l);++l}if(s){for(;l<e;)h=t[l],r[l]=a+10,n[h]&&(u[h]=l),++l;for(var p in u)o=i[n[p]],r[u[p]]=o.getValue()+1}return s?r:null};var j=X,K=function(){K.base(this,"constructor"),this._removeRows=this._removeRows.bind(this),this._bySegmentSeparator=this._bySegmentSeparator.bind(this),this._prevData={},this._rids=[],this._compMap={}};r.b.inherits(K,U),K.prototype._prevData=null,K.prototype._rids,K.prototype._frozen=!1,K.prototype._runningId=0,K.prototype._compMap=null,K.prototype._segments=null,K.prototype._autoSegmentFilling=!1,K.prototype._removedRows=null,K.prototype._userSegmentComparer=null,K.SortLogic,K.prototype.dispose=function(){this.unlistenAll(),this.clearAllData(!0),this._compMap=null,this._segments=null},K.prototype.getColumnData=function(t){for(var e=new Array(this._rids.length),i=this._rids.length;--i>=0;)e[i]=this._rows[this._rids[i]][t];return e},K.prototype.getRowId=function(t){return this._rids[t]||""},K.prototype.getAllRowIds=function(t){return t?this._rids:this._rids.slice(0)},K.prototype.getRowIndex=function(t){return this._rids.indexOf(t)},K.prototype.getRowCount=function(){return this._rids.length},K.prototype.getDataAt=function(t,e){return this.getData(this._rids[t],e)},K.prototype.getRowDataAt=function(t){return this.getRowData(this._rids[t])},K.prototype.getPreviousData=function(t,e){var i=this._prevData[t]||null;return i?i[e]:null},K.prototype.setData=function(t,e,i){if(!this._needFiring())return this._setData(t,e,i);var n={};return n[e]=i,this.setRowData(t,n)},K.prototype.setRowData=function(t,e,i){if(!t)return!1;var n=this.getRowData(t),o=!1,r="updated",s=!1;if(e){if(n){var a=this._prevData[t];for(var l in e)a[l]=n[l],n[l]=e[l]}else if(r="inserted",n=e,this._rows[t]=n,this._prevData[t]={},i){var u=i.nextRid,h=null!=u?this.getRowIndex(u):-1;h<0&&(h=i.fallback),null==h||h<0||h>=this._rids.length?this._rids.push(t):(this._rids.splice(h,0,t),s=!this._isLastSegment(h))}else this._rids.push(t);o=!0}else if(n){r="removed",this._prevData[t]=this._rows[t],delete this._rows[t],this._segments&&(s=this._segments.containsSegment(t));for(var p=this._rids.length;--p>=0;)if(this._rids[p]===t){this._rids.splice(p,1);break}o=!0}if(o&&this._needFiring())if(this._autoFillSegments())this.dispatchGlobalChange();else{var d=i||{};d.rid=t,d.changes=e,d.rowData=n,d.type=r,s&&(d.segmentChanged=!0),this._dispatchDataChange(d)}return o},K.prototype.setColumnData=function(t,e,i){var n=e?e.length:0;if(!(n<0)){var o=this._frozen;this.freeze();for(var r=this._generateRids(n,i),s=0;s<n;++s)this._setData(r[s],t,e[s]);this.freeze(o)}},K.prototype.setDataFromObjectMap=function(t){if(t)if(Array.isArray(t))this.addRows(t);else{var e=this._frozen;for(var i in this.freeze(),t)this.setRowData(i,t[i]);this.freeze(e)}},K.prototype.setDataFrom2DArray=function(t,e,i){var n=t?t.length:0;if(!(n<0)){var o=this._frozen;this.freeze();for(var r=0,s=this._generateRids(n,i),a=0;a<n;++a){var l=t[a],u=s[a];if(e)for(r=l.length;--r>=0;)this._setData(u,e[r],l[r]);else for(r=l.length;--r>=0;)this._setData(u,""+r,l[r])}this.freeze(o)}},K.prototype.setDataAt=function(t,e,i){var n=this.getRowId(t);return!!n&&this.setData(n,e,i)},K.prototype.setRowDataAt=function(t,e,i){var n=this.getRowId(t);return!!n&&this.setRowData(n,e,i)},K.prototype.addRow=function(t,e){return t||(t={}),e=this._generateUniqueRid(t,e),this.setRowData(e,t),e},K.prototype.addRows=function(t,e){if(Array.isArray(t)){var i=t.length;if(i)if(1!==i){e||(e=[]);var n=this._frozen;this.freeze();for(var o=0;o<i;++o)this.addRow(t[o],e[o]);this.freeze(n)}else this.addRow(t[0],e?e[0]:null)}},K.prototype.unshiftRow=function(t,e){return this.insertRow(0,t,e)},K.prototype.insertRow=function(t,e,i){var n={};return"number"==typeof t?(n.nextRid=this._rids[t],n.fallback=t):n.nextRid=t,e||(e={}),i=this._generateUniqueRid(e,i),this.setRowData(i,e,n),i},K.prototype.insertAfter=function(t,e,i){var n="string"==typeof t?this.getRowIndex(t):t;return!(n>=0)||n>=this._rids.length-1?this.addRow(e,i):this.insertRow(n+1,e,i)},K.prototype.removeRow=function(t){"number"==typeof t?this.setRowData(this.getRowId(t),null):this.setRowData(t,null)},K.prototype.removeRows=function(t){if(1!==t.length){var e,i=!1;for(this._removedRows={},e=t.length;--e>=0;){"number"==typeof(n=t[e])&&(n=this.getRowId(n)),this.getRowData(n)&&(this._prevData[n]=this._rows[n],this._removedRows[n]=1,delete this._rows[n],i=!0)}i?(this._rids=this._rids.filter(this._removeRows),this._removedRows=null,this.dispatchGlobalChange()):this._removedRows=null}else{var n=t[0];"number"==typeof n?this.removeRow(n):this.setRowData(n,null)}},K.prototype._removeRows=function(t){return!this._removedRows[t]},K.prototype.clearAllData=function(t){K.base(this,"clearAllData",!0),this._prevData={},this._rids.length&&(this._rids.length=0,this.dispatchGlobalChange(t))},K.prototype.removeAllRows=K.prototype.clearAllData,K._ascendingOrder=function(t,e){return t-e},K.prototype.moveRow=function(t,e,i){var n=null,o="";if(e>=0&&e<this._rids.length||(e=this._rids.length),Array.isArray(t)){var r=t;r.sort(K._ascendingOrder);for(var s=[],a=r.length;--a>=0;){var l=r[a];(o=this._rids[l])&&(s.unshift(o),this._rids.splice(l,1),l<e&&--e)}s.length&&(this._rids.splice.apply(this._rids,[e,0].concat(s)),n=s)}else t<0&&(t=0),t!==e&&t+1!==e&&(o=this._rids.splice(t,1)[0])&&(t<e&&--e,this._rids.splice(e,0,o),n=o);return n&&(this._segments&&this._sort(null),this._dispatchPositionChange(i)),n},K.prototype._moveRow=function(t,e,i){var n=t.length;if(!n)return null;for(var o=new Array(n),r=0;r<n;++r)o[r]=this.getRowIndex(t[r]);var s=e?this.getRowIndex(e):this._rids.length;return n>1?this.moveRow(o,s,i):this.moveRow(o[0],s,i)},K.prototype.moveRows=function(t,e,i,n){"string"==typeof t&&(t=this.getRowIndex(t)),"string"==typeof e&&(e=this.getRowIndex(e)),t<0&&(t=0),e<0&&(e=this._rids.length),i||(i=1);var o=t+i-1,r=e;if(e>=t&&(r=e<=o?t:e-i),i>0&&o<=this._rids.length){r>this._rids.length&&(r=this._rids.length);var s=this._rids.splice(t,i),a=[r,0].concat(s);return Array.prototype.splice.apply(this._rids,a),this._segments&&this._sort(null),this._dispatchPositionChange(n),s}return null},K.prototype.swapRow=function(t,e){var i=this._rids.length;if(!(t<0||t>=i||e<0||e>=i)){var n=this._rids[t];this._rids[t]=this._rids[e],this._rids[e]=n}},K.prototype.clearRowData=K.prototype.removeRow,K.prototype.clearColumnData=function(t,e){for(var i="string"==typeof t?[t]:t,n=i.length;--n>=0;){var o=i[n];if(o)for(var r in this._rows)delete this._rows[r][o],delete this._prevData[r][o]}this.dispatchGlobalChange(e)},K.prototype.getDataSource=function(){return null},K.prototype.setDataSource=function(t){},K.prototype.getSortingLogics=function(){return this._compMap},K.prototype.sortOnce=function(t,e,i,n){var o=K._buildSortContext([],t,e,i||this._compMap,n);return!!this._sort(o)&&(this._dispatchPositionChange(),!0)},K.prototype.setSortingLogic=function(t){this._compMap._default=t},K.prototype.setColumnSortingLogic=function(t,e){this._compMap[t]=e},K.prototype.freeze=function(t){t=!1!==t;var e=this._frozen;return e!==t&&(this._frozen=t,this._autoFillSegments(),this.dispatchGlobalChange()),e},K.prototype.unfreeze=function(t){return this.freeze(!1===t)},K.prototype.isFrozen=function(){return this._frozen},K.prototype.setSegmentSeparator=function(t,e){var i=!1;if("string"==typeof t&&(!1!==e?(this._segments||(this._segments=new j),this._segments.addSegment(t)&&(i=!0)):this._segments&&this._segments.removeSegment(t)&&(i=!0,this._segments.getSegmentCount()||(this._segments=null))),i&&this._needFiring())if(this._autoFillSegments())this.dispatchGlobalChange();else{var n=this._rows[t]||null;n&&this._dispatchDataChange({rid:t,changes:{},rowData:n,type:"updated",segmentChanged:!0})}return i},K.prototype.unsetAllSegmentSeparators=function(){return!!this._segments&&(this._segments=null,this.dispatchGlobalChange(),!0)},K.prototype.hasSegmentation=function(){return!!this._segments},K.prototype.isSegmentSeparator=function(t){return!!this._segments&&this._segments.containsSegment(t)},K.prototype.getSegmentParentRowId=function(t){return this._segments?this._segments.getParentRowId(t):""},K.prototype.getSegmentValues=function(t){return this._segments?this._segments.getSegmentValues(t||this._rids):null},K.prototype._isLastSegment=function(t){var e=this._segments;if(e)for(var i=this._rids,n=i.length,o=t+1;o<n;++o)if(e.containsSegment(i[o]))return!1;return!0},K.prototype._getSegmentSeparators=function(){return this._segments},K.prototype.enableAutoSegmentFilling=function(t){this._autoSegmentFilling=0!=t,this._autoFillSegments()},K.prototype._autoFillSegments=function(){return!!this._autoSegmentFilling&&this.fillSegments()},K.prototype.fillSegment=function(t){this._segments&&this._segments.fillSegment(t,this._rids)},K.prototype.fillSegments=function(){return!!this._segments&&this._segments.fillSegments(this._rids)},K.prototype.addSegmentChild=function(t,e){if(this._segments&&this._segments.addSegmentChild(t,e))return this._sort(null)&&this._dispatchPositionChange(),!0;return!1},K.prototype.addSegmentChildren=function(t,e){if(this._segments&&this._segments.addSegmentChildren(t,e))return this._sort(null)&&this._dispatchPositionChange(),!0;return!1},K.prototype.removeSegmentChild=function(t,e){return!!this._segments&&this._segments.removeSegmentChild(t,e)},K.prototype.removeSegmentChildren=function(t,e){return!!this._segments&&this._segments.removeSegmentChildren(t,e)},K.prototype.removeAllSegmentChildren=function(){return!!this._segments&&this._segments.removeAllSegmentChildren()},K.prototype.getSegmentIds=function(){return this._segments?this._segments.getSegmentIds():null},K.prototype.getSegmentChildIds=function(t){if(this._segments){var e=this._segments.getSegment(t);if(e){var i=e.getChildIds();return i.length?i:null}}return null},K.prototype.sortSegments=function(t){if(this._segments&&"function"==typeof t){var e,i=this._rids,n=this._segments,o=n.getSegmentCount(),r=[],s=[],a=0,l=i.length,u="",h=null;for(e=0;e<l&&(u=i[e],!((h=n.getSegment(u))&&(s.push(e),r.push(h),++a>=o)));++e);this._userSegmentComparer=t,r.sort(this._bySegmentSeparator),this._userSegmentComparer=null;var p=!1;for(e=0;e<a;++e){var d=s[e];u=i[d];var c=(h=r[e]).getId();u!==c&&(i[d]=c,p=!0)}p&&(this._sort(null),this._dispatchPositionChange())}},K.prototype._bySegmentSeparator=function(t,e){return this._userSegmentComparer(this.getRowData(t.getId()),this.getRowData(e.getId()))},K.prototype._sort=function(t){var e=this._rids,i=this.getMultipleRowData(e),n=this.getSegmentValues(e),o=K._performMultiLevelSorting(i,t,n);return!!o&&(this._rids=K._reorderItems(e,o),!0)},K.prototype.dispatchGlobalChange=function(t){!t&&this._needFiring()&&this._dispatchDataChange(K._globalChangeArg)},K.prototype._dispatchPositionChange=function(t){!t&&this._needFiring()&&this._dispatch("dataChanged",K._positionChangeArg)},K.prototype.dump=function(t){return U.constructTable(this.getMultipleRowData(this._rids),t,this._rids)},K.prototype._setData=function(t,e,i){var n=this.getRowData(t);return n||(n={},this._rows[t]=n,this._prevData[t]={},this._rids.push(t)),this._prevData[t][e]=n[e],n[e]=i,!0},K.prototype._generateRids=function(t,e){var i,n=0;if(e)i=e;else{i=[];for(var o=this._rids.length;n<o&&n<t;)i.push(this._rids[n++])}for(n=i.length;n<t;)i.push(""+n++);return i},K.prototype._generateUniqueRid=function(t,e){if(!e){if(t.ROW_ID)return t.ROW_ID;for(e="_"+this._runningId++;this._rows[e];)e="_"+this._runningId++}return e},K.prototype._needFiring=function(){return!this._frozen&&!this._composing},K.getSortingDefinitions=O._deprecatedFunction,K._globalChangeArg={globalChange:!0},K._positionChangeArg={globalChange:!0,positionChangeOnly:!0},K._buildSortContext=function(t,e,i,n,o){var r,s;Array.isArray(e)?(r=e,s=i):(r=[e],s=e?[i]:[0]);var a=null,l=null;"function"==typeof n?a=n:l=n;var u=r.length;t.length=u;for(var h=u;--h>=0;){Array.isArray(l)&&(a=l[h]);var p=t[h];p||(p=t[h]=new Array(5));var d=r[h];p[0]=d,p[1]=null,p[2]=a||l[d]||l._default,p[2]||(p[2]=K._defaultComparer),p[3]=K._getSortOrder(s[h]),p[4]=o}return t},K._multiColumnCompareLogic=function(t,e,i,n){for(var o=n.length,r=0,s=0;s<o;++s){var a=n[s];if(r=K._singleColumnCompareLogic(t,e,a[3],a))return r}return r},K._singleColumnCompareLogic=function(t,e,i,n){var o=n[1];return n[2](o[t],o[e],i,n[4])},K._performMultiLevelSorting=function(t,e,i){var n=t?t.length:0,o=e?e.length:0;if(!n)return null;for(var r=0;r<o;++r){var s=e[r],a=s[0],l=s[1];l?l.length=n:l=s[1]=new Array(n);for(var u=0;u<n;++u)l[u]=t[u][a]}if(i){var h=["ROW_SEGMENT",i,K._segmentComparer,1,null];e?(e=e.slice()).unshift(h):e=[h],++o}if(!o)return null;var p,d,c=0;return o>1?(p=K._multiColumnCompareLogic,d=e,c=1):(p=K._singleColumnCompareLogic,c=(d=e[0])[3]),K._mergeSort(n,c,p,d)},K._mergeSort=function(t,e,i,n){for(var o,r,s,a,l,u=!1,h=1,p=K._createIndexArray(t),d=p.slice();h<=t;){for(o=l=0;o<t;)if((l=(s=a=(r=l)+h)+h)>t&&(l=t),s<l){for(;;)if(i(p[r],p[s],e,n)<=0){if(d[o++]=p[r],++r>=a){for(;s<l;)d[o++]=p[s],++s;break}}else if(u=!0,d[o++]=p[s],++s>=l){for(;r<a;)d[o++]=p[r],++r;break}}else for(;o<t;)d[o]=p[o],++o;var c=p;p=d,d=c,h<<=1}return u?p:null},K._reorderItems=function(t,e){if(e){for(var i=t.length;--i>=0;)e[i]=t[e[i]];return e}return t},K._createIndexArray=function(t){var e=K._idxAryMap[t];if(!e){K._idxAryCount>50&&(K._idxAryMap={},K._idxAryCount=0),e=K._idxAryMap[t]=new Array(t),K._idxAryCount++;for(var i=0;i<t;++i)e[i]=i}return e.slice()},K._idxAryMap={},K._idxAryCount=0,K._segmentComparer=function(t,e){return t===e?0:t<e?-1:1},K._defaultComparer=function(t,e,i){return null==t||t!=t?null==e||e!=e?0:1:null==e||e!=e?-1:t<e?-i:e<t?i:0},K._getSortOrder=function(t){if("number"==typeof t)return t;if(t&&"string"==typeof t){if("a"===(t=t.charAt(0).toLowerCase()))return 1;if("d"===t)return-1}return 0},K._proto=K.prototype;var J=K,Q="ROW_DEF",Z=function(t){this._changes={},this._rowId="_"+Z._runningId+++"_",this._dataId=this._rowId,t&&(t.asConstituent?this._initializeAsConstituent(t):this.initialize(t))};Z._runningId=0,Z.prototype._userInput="",Z.prototype._ric="",Z.prototype._displayText="",Z.prototype._label=null,Z.prototype._isChain=!1,Z.prototype._rowId="",Z.prototype._dataId="",Z.prototype._dc=null,Z.prototype._view=null,Z.prototype._subId="",Z.prototype._expanded=!1,Z.prototype._autoGenerated=!1,Z.prototype._staticValues=null,Z.prototype._changes,Z.prototype._updateCount=0,Z.prototype._children=null,Z.prototype._parent=null,Z.prototype._groupOrder=0,Z.prototype._depthLevel=0,Z.prototype._userModel=null,Z.prototype.dispose=function(){if(!this.isDisposed()){if(this._children&&(this._children.forEach(Z.dispose),this._children=null),this._staticValues=null,this._parent=null,this._depthLevel=0,this.unsubscribeForUpdates(),this._dc){var t=this.getRowData();t&&(t[Q]=null),this._dc=null}this._view&&(this._view=null),this._rowId=this._dataId="",this._userModel=null}},Z.prototype.isDisposed=function(){return!this._rowId},Z.prototype.initialize=function(t){if(t){var e=t.ric;if(null!=e&&this.setContent(e),null!=(e=t.chainRic)&&(this._chainRic=e),void 0!==(e=t.values)&&this.setStaticRowData(e,t.fields),e=t.asChain)this._isChain=!0,this._expanded=!t.collapsed;else if(this._isChain){var i=t.collapsed;null!=i&&(this._expanded=!i)}void 0!==(e=t.label)&&(this._label=e),(e=t.keepModel)&&(this._userModel=t)}},Z.prototype._initializeAsConstituent=function(t){this._autoGenerated=!0;var e=t.parent;if(this.setParent(e)&&(this._dataId=t.dataId,this._displayText=this._ric=t.ric,this._dc=e._dc,this._dc)){var i=this.getRowData();i&&(i[Q]=this)}},Z.prototype.setContent=function(t){return!this._autoGenerated&&(t?"string"!=typeof t&&(t+=""):t="",this._userInput!==t&&(this.unsubscribeForUpdates(),this.resetUpdates(),this._userInput=t,"'"===this._userInput.charAt(0)?(this._displayText=this._userInput.substr(1),this._ric=this._chainRic=""):(this._userInput.indexOf("0#")>=0?(this._ric=this._userInput.replace("0#",""),this._isChain=this._expanded=!0,this._chainRic=this._userInput):(this._ric=this._userInput,this._chainRic=""),this._displayText=this._ric),this._dataId=this._rowId+this._ric,this.subscribeForUpdates(),!0))},Z.prototype.getRowId=function(){return this._rowId},Z.prototype.getDataId=function(){return this._dataId},Z.prototype.setDataSource=function(t){if(this._dc=t||null,this._dc){var e=this.getRowData();e||((e={})[Q]=this,this.setRowData(e)),this._staticValues&&this.setRowData(this._staticValues),this.subscribeForUpdates()}},Z.prototype.getRowData=function(){return this._dc.getRowData(this._dataId)},Z.prototype.getData=function(t){return this._dc.getData(this._dataId,t)},Z.prototype.setStaticRowData=function(t,e){this._clearStaticData(),Array.isArray(t)&&(t=Object(u.a)(t,e)),this._staticValues="object"==typeof t?t:null,this._staticValues&&this.setRowData(t)},Z.prototype.updateRowData=function(t,e){Array.isArray(t)&&(t=Object(u.a)(t,e)),t&&this.setRowData(t)},Z.prototype.setStaticData=function(t,e){this._staticValues||(this._staticValues={}),this._staticValues[t]=e,this.setData(t,e)},Z.prototype.setRowData=function(t){this._dc&&this._dc.setRowData(this._dataId,t)},Z.prototype.setData=function(t,e){this._dc&&this._dc.setData(this._dataId,t,e)},Z.prototype._clearStaticData=function(){if(this._staticValues){for(var t in this._staticValues)this._staticValues[t]=null;this._dc&&this._dc.setRowData(this._dataId,this._staticValues),this._staticValues=null}},Z.prototype.getUserInput=function(){return this._userInput},Z.prototype.getRic=function(){return this._ric},Z.prototype.getDisplayText=function(){return null!=this._label?this._label:this._displayText},Z.prototype.getLabel=function(){return this._label},Z.prototype.isRowHeader=function(){return"'"===this._userInput.charAt(0)},Z.prototype.isChain=function(){return this._isChain},Z.hasChain=function(t){return t.isChain()},Z.prototype.isChainCollapsed=function(){return!!this._view&&this._view.isSegmentCollapsed(this._rowId)},Z.prototype.isChainExpanded=function(){return!this.isChainCollapsed()},Z.prototype.isFixedPosition=function(){return this._isChain&&this.isChainExpanded()},Z.prototype.isAutoGenerated=function(){return this._autoGenerated},Z.prototype.isRealTimeRow=function(){return!!this._ric&&(!this.isRowHeader()&&!this._autoGenerated)},Z.prototype.subscribeForUpdates=function(){if(this.isRealTimeRow()){var t=this._dc?this._dc.getSubscriptions():null;if(t){var e=this.unsubscribeForUpdates();this.isChain()?this._subId=t.addChain(this._chainRic||this._ric,this._rowId):this._subId=t.addRic(this._ric,this._rowId),e?this._dc.setRowData(this._dataId,e):this._dc.setRowData(this._dataId,{X_RIC_NAME:this._ric,ROW_DEF:this})}}},Z.prototype.unsubscribeForUpdates=function(){if(this._subId){var t=this._dc.getSubscriptions(),e=this.getRowData();return t.removeSubscription(this._subId),this._subId="",this.resetUpdates(),this._dc.setRowData(this._dataId,null),e}},Z.prototype.isSubscribing=function(){return!!this._subId},Z.prototype.addUpdate=function(t){if(t){var e=t.changes;if(e){var i=0;for(var n in e)this._changes[n]=i=1;if(i)return++this._updateCount,!0}}return!1},Z.prototype.getUpdates=function(){return this._updateCount?this._changes:null},Z.prototype.resetUpdates=function(){this._updateCount&&(this._changes={},this._updateCount=0)},Z.prototype.registerToView=function(t,e){if(t&&this._view!==t){this._view=t;var i={};i[Q]=this;var n=this._view.insertRow(e,i,this.getRowId());this._rowId=n,this._isChain&&(t.setSegmentSeparator(this._rowId),this._expanded||this.collapseChain())}},Z.prototype._deregisterFromView=function(t){return this._view?(t&&t.push(this._rowId),this._view=null,this._rowId):""},Z.deregisterFromView=function(t,e){return e._deregisterFromView(t),t},Z.prototype.addConstituent=function(t){if(!t||this._ric===t)return null;if(!(this._rowId&&this._subId&&this._isChain))return null;var e=null;if(this._children){for(var i=this._children.length;--i>=0;)if(this._children[i]._ric===t){e=this._children[i];break}}else this._children=[];var n=!e;if(n&&(e=new Z({asConstituent:!0,dataId:this._subId+t,ric:t,parent:this})),this._view){var o=this.getRowId(),r=this._view.getRowIndex(o)+this.getChildCount();e.registerToView(this._view,this._view.getRowId(r)),this._view.addSegmentChild(o,e.getRowId())}return n?e:null},Z.prototype.collapseChain=function(){return!(!this._isChain||!this._view)&&(this._expanded=!1,this._view.collapseSegment(this._rowId,!0))},Z.prototype.expandChain=function(){return!(!this._isChain||!this._view)&&(this._expanded=!0,this._view.collapseSegment(this._rowId,!1))},Z.prototype.toggleChain=function(){return this._expanded?this.collapseChain():this.expandChain()},Z.prototype.addChild=function(t){return!!t&&t.setParent(this)},Z.prototype.getChildren=function(){return this._children},Z.prototype.getDescendants=function(t){if(t||(t=[]),this._children)for(var e=this._children,i=e.length,n=0;n<i;++n){var o=e[n];t.push(o),o.getDescendants(t)}return t},Z.prototype.getAllDescendantIds=function(){var t=this.getDescendants();return t.length?t.map(Z.toRowId):null},Z.prototype.getChildCount=function(){return this._children?this._children.length:0},Z.prototype.getParent=function(){return this._parent},Z.prototype.setParent=function(t){if(this._parent===t||t===this)return!1;if(this._parent){var e=this._parent._children.lastIndexOf(this);e>=0&&this._parent._children.splice(e,1),this._parent=null,this._depthLevel=0}return!!t&&(t._children||(t._children=[]),t._children.push(this),this._parent=t,this._depthLevel=t._depthLevel+1,!0)},Z.prototype.getDepthLevel=function(){return this._depthLevel},Z.prototype.getGroupOrder=function(){return this._parent?this._parent.getGroupOrder()+.1:this._groupOrder},Z.prototype.setGroupOrder=function(t){return!this._parent&&this._groupOrder!==t&&(this._groupOrder=t,!0)},Z.prototype.getUserModel=function(){return this._userModel},Z.toRowId=function(t){return t.getRowId()},Z.dispose=function(t){t.dispose()};var $="/synapse/service/suggestions/suggest/?hits=1&profile="+encodeURIComponent("Field Selector");var tt={};function et(t){t.currentTarget._error={type:t.type}}function it(t){var e=t.currentTarget,i=e._defer,n=i.resolve,o=i.reject;if(delete tt._loadingField[e._field],200===e.status){var r={field:e._field,fieldDefinition:null},s=JSON.parse(e.responseText),a=s.result&&s.result[0];if(a){var l=a.hits&&a.hits[0];if(l&&l.p){var u=l.p;if(u.fn.toUpperCase()===e._field.toUpperCase()){var h=tt.get(e._field)||{};h.field=u.fn,h.rank=u.Rank,h.fieldDataType=u.fdt,h.IsMonitorOnlyField=u.fimo,h.IsRealtimePortfolioField=u.firp,h.IsRealtimeField=u.firt,h.name=u.fl,h.source=u.fsrc,h.sourceRank=u.fsrnk,h.description=l.title,tt.set(e._field,h),r.fieldDefinition=h}}}n(r)}else e._error?(e._error.field=e._field,o(e._error)):o({field:e._field,status:e.status,statusText:e.statusText,request:e})}tt._defs={X_RIC_NAME:{name:"RIC",notRealTimeField:!0,width:100,binding:function(t){t.cell.setContent(t.rowDef.getDisplayText())},sortLogic:function(t,e,i){var n=t.getDisplayText(),o=e.getDisplayText();return n===o?0:n?o?n<o?-i:i:-1:1}},CF_NAME:{name:"Name",rank:2800003,fieldDataType:"ALPHANUMERIC",id:"6307",IsMonitorOnlyField:!1,IsRealtimePortfolioField:!1,IsRealtimeField:!0,source:"IDN",sourceRank:100003,description:"The name of the instrument"},CF_LAST:{name:"Last",rank:2800024,fieldDataType:"PRICE",id:"5364",IsMonitorOnlyField:!1,IsRealtimePortfolioField:!1,IsRealtimeField:!0,source:"IDN",sourceRank:100024,description:"The latest trade price or value."},PCTCHNG:{name:"Pct. Chng",rank:2709440,fieldDataType:"PRICE",id:"56",IsMonitorOnlyField:!1,IsRealtimePortfolioField:!1,IsRealtimeField:!0,source:"IDN",sourceRank:9440,description:"Percentage change in the latest trade price or value from the historic close."},CF_NETCHNG:{name:"Net. Chng",rank:2800027,fieldDataType:"PRICE",id:"5367",IsMonitorOnlyField:!1,IsRealtimePortfolioField:!1,IsRealtimeField:!0,source:"IDN",sourceRank:100027,description:"Net Change is the difference between latest trade price or value and the historic closing value or settlement price."},CF_CLOSE:{name:"Close",rank:2800023,fieldDataType:"PRICE",id:"5360",IsMonitorOnlyField:!1,IsRealtimePortfolioField:!1,IsRealtimeField:!0,source:"IDN",sourceRank:100023,description:"The last trade price, settlement value or closing value."},CF_CURR:{name:"Currency",rank:2800021,fieldDataType:"ENUMERATED",id:"6452",IsMonitorOnlyField:!1,IsRealtimePortfolioField:!1,IsRealtimeField:!0,source:"IDN",sourceRank:100021,description:"The currency that the instrument is quoted in"},CF_BID:{name:"Bid",rank:2800025,fieldDataType:"PRICE",id:"5359",IsMonitorOnlyField:!1,IsRealtimePortfolioField:!1,IsRealtimeField:!0,source:"IDN",sourceRank:100025,description:"The latest Bid price."},CF_ASK:{name:"Ask",rank:2800026,fieldDataType:"PRICE",id:"5358",IsMonitorOnlyField:!1,IsRealtimePortfolioField:!1,IsRealtimeField:!0,source:"IDN",sourceRank:100026,description:"The latest Ask price."}},tt._synapse="",tt._lang="en",tt._loadingField={},tt.set=function(t,e){tt._defs[t]=e||null},tt.get=function(t){return tt._defs[t]},tt.remove=function(t){delete tt._defs[t]},tt.setSynapseConfig=function(t){tt._synapse=t},tt.set=function(t,e){tt._defs[t]=e||null},tt.loadFieldInfo=function(t){if(tt._loadingField[t])return tt._loadingField[t].promise;var e=new h,i=tt._synapse;if(i)if(tt._defs[t])e.resolve(tt._defs[t]);else if(i.debug){var n=this._mockOnLoadEndData(t,e);setTimeout(it.bind(null,n),1e3)}else if(i.apiKey&&i.contextApp){var o=$+"&api-key="+encodeURIComponent(i.apiKey)+"&contextApp="+encodeURIComponent(i.contextApp)+"&language="+encodeURIComponent(tt._lang)+"&query="+encodeURIComponent(t);i.auth&&(o+="&auth="+encodeURIComponent(i.auth));var r=new XMLHttpRequest;r._defer=e,r._field=t,tt._loadingField[t]=e,r.addEventListener("loadend",it),r.addEventListener("timeout",et),r.addEventListener("error",et),r.open("GET",o,!0),r.send()}else e.resolve(null);else e.resolve(null);return e.promise},tt._mockOnLoadEndData=function(t,e){var i,n=t.toUpperCase(),o=n.toLowerCase();i=2===o.indexOf("_")?n[3]+o.substring(4):n[0]+o.substring(1);var r=n.indexOf("DATE")>=0?"DATE":"PRICE",s={action:'"'+n+'" SRCH',assetClassifierExplanation:"AssetClassifier is disabled.",assetClassifierStatus:"NOT_INVOKED",result:[{name:"Fields",default:!1,size:1,hits:[{cmd:i,explanation:null,fr:!1,id:"1635614732",navigation:null,p:{Rank:2800024,fdt:r,fid:"5364",fimo:!1,firp:!1,firt:!0,fl:i,fn:n,fsrc:"IDN",fsrnk:100024},position:0,preview:!1,relations:{},score:2840024,source:"87",subtitle:"",symbol:i,title:"title mockup of "+n,vc:"FLD"}],hasMore:!1}],search:"cpurl://apps.cp./apps/SearchAll?Search.Value="+o+"*"};return{currentTarget:{_defer:e,_field:t,status:200,response:s=JSON.stringify(s),responseText:s}}},function(){for(var t in tt._defs)tt._defs[t].field=t}();var nt=tt,ot={_formulas:{},set:function(t,e){ot._formulas[t]=e},get:function(t){return ot._formulas[t]||""},remove:function(t){delete ot._formulas[t]}},rt=ot,st={STRING:"string",BOOLEAN:"boolean",NUMBER:"number",DATE:"datetime",DATETIME:"datetime",TIME:"datetime",ENUMERATED:"string",ALPHANUMERIC:"string",PERCENT:"string",PRICE:"number",DOUBLE:"number",MONEY:"number"},at=function(t,e){this._defaultRenderer=this._defaultRenderer.bind(this),this._customRenderer=this._customRenderer.bind(this),this._defaultSorter=this._defaultSorter.bind(this),this._dataSorter=this._dataSorter.bind(this),this._rowDefSorter=this._rowDefSorter.bind(this),this._id=""+at._runningId++,this._internalRenderer=this._defaultRenderer,this._internalSorter=this._defaultSorter,this._eventArg={colDef:this},this._sortContext={colDef:this},e&&(this._updateContext("grid",e),this._updateContext("core",e.getCoreGrid())),this._classes=[],this._requiredFields=[],this.initialize(t)};at.prototype._id,at._runningId=1,at.prototype._field="",at.prototype._dataType="",at.prototype._name="",at.prototype._isDefaultName=!0,at.prototype._tooltip=null,at.prototype._requiredFields,at.prototype._headerRenderer=null,at.prototype._headerAlignment="",at.prototype._internalRenderer,at.prototype._userRenderers=null,at.prototype._activatedRenderer=null,at.prototype._rendererMap=null,at.prototype._internalSorter,at.prototype._sortContext=null,at.prototype._userSorter=null,at.prototype._sortable=!0,at.prototype._eventArg,at.prototype._realTimeField=!1,at.prototype._classes,at.prototype._fnEngine=null,at.prototype._formula=null,at.prototype._formulaRef="",at.prototype._initialOrder="",at.prototype._rowSorting=null,at.prototype._textSelect=!1,at.prototype._userModel=null,at.prototype.dispose=function(){this._eventArg={},this._activatedRenderer=this._rendererMap=null,this.setRenderer(null),this.setSorter(null),this._userModel=null},at.prototype.initialize=function(t){var e="";if("string"==typeof t&&(e=t,t=nt.get(e)||null),t){var i,n,o;e=t.field;var r,s=nt.get(e);if(s&&s!==t){var a=t;for(o in t={},s)t[o]=s[o];for(o in a)t[o]=a[o]}if((r=t.id)&&(this._id=r+""),(r=t.formulaEngine)&&r.addFormula&&(this._fnEngine=r),(r=t.formulaReference)&&(this._formulaRef=r+""),null!=(r=t.require||t.requiredFields)&&("string"==typeof r?this._requiredFields=r.split(" "):Array.isArray(r)&&(this._requiredFields=r.slice())),this._setField(e,t.formula),null!=(r=t.name||t.title)&&(this._name=r,this._isDefaultName=!1),null!=(r=t.dataType)&&(this._dataType=r),null!=(r=t.notRealTimeField)&&(this._realTimeField=!r),null!=(r=t.tooltip)&&(this._tooltip=r),null!=(r=t.headerAlignment||t.titleAlignment)&&(this._headerAlignment=function(t){if(t){var e=t.charAt(0).toLowerCase();if("l"===e)return"left";if("r"===e)return"right";if("c"===e)return"center"}return""}(r)),void 0!==(r=t.headerBinding||t.headerRenderer)&&(this._headerRenderer=r),(r=t.binding||t.renderer)||(r=t.formatter),void 0!==r)if(r instanceof Array)for(n=r.length,i=0;i<n;++i)this.addRenderer(r[i]);else r?"function"==typeof r?this.setRenderer(r):r.binding&&this.setRenderer(r.binding):this.setRenderer(null);null!=(r=t.rowSorting)&&(this._rowSorting=!!r),void 0!==(r=t.sortLogic||t.sortingLogic||t.sorter)&&this.setSorter(r),null!=(r=t.sortable)&&(this._sortable=!!r),"string"==typeof(r=t.className||t.class)&&(this._classes=r.split(" ")),(r=t.sort)&&(this._initialOrder=r),(r=t.textSelect)&&(this._textSelect=r),this._userModel=t}else this._setField(e)},at.prototype.getId=function(){return this._id},at.prototype.getRequireFields=function(){return this._requiredFields},at.prototype.getRequiredFields=at.prototype.getRequireFields,at.prototype.getRenderer=function(){return this._internalRenderer},at.prototype.getHeaderRenderer=function(){return this._headerRenderer},at.prototype.getSorter=function(){return this._internalSorter},at.prototype._prepareSortContext=function(t){return this._sortContext.colIndex=t,this._sortContext.field=this._field,this._internalSorter},at.prototype.getName=function(){return this._name},at.prototype.isDefaultName=function(){return this._isDefaultName},at.prototype.getFieldDefinition=function(){return nt.get(this._field)},at.prototype.getFieldDataType=function(){var t=this.getFieldDefinition();return t&&t.fieldDataType?t.fieldDataType:""},at.prototype.getDataType=function(){if(this._dataType)return this._dataType;var t=this.getFieldDataType();return t?st[t.toUpperCase()]:""},at.getDataType=function(t){var e=nt.get(t);if(e){var i=e.fieldDataType?e.fieldDataType.toUpperCase():null;return st[i]?st[i]:""}return""},at.prototype.getTooltip=function(){if(null!=this._tooltip){if("string"==typeof this._tooltip)return this._tooltip;if(!this._tooltip)return""}return this._name?this._name:this._field?this._field:""},at.prototype.getField=function(){return this._field},at.prototype.getAllFields=function(){return this._requiredFields.concat(this._field)},at.prototype.isRealTimeField=function(){return!(!this._field||!this._realTimeField||this._formula)&&at.isRealTimeField(this._field)},at.prototype.isFormulaField=function(){return!!this._formula},at.isFormulaField=function(t){return"="===t.charAt(0)},at.isAdcField=function(t){return 0===t.indexOf("TR.")},at.isRealTimeField=function(t){return!(!t||at.isFormulaField(t))&&!at.isAdcField(t)},at.getRealTimeFields=function(t,e){e.isRealTimeField()&&t.push(e.getField());for(var i=e.getRequiredFields(),n=i.length,o=0;o<n;++o){var r=i[o];at.isRealTimeField(r)&&t.push(r)}return t},at.prototype.isSortable=function(){return this._sortable},at.prototype.isScalable=function(){var t=this._eventArg.core,e=this._eventArg.grid.getColumnIndex(this);return t.getColumnScalability(e)},at.prototype.getInitialSortOrder=function(){return this._initialOrder},at.prototype.getWidth=function(){var t=this._eventArg.core,e=this._eventArg.grid.getColumnIndex(this);return t.getColumnWidth(e)},at.prototype.getMinWidth=function(){var t=this._eventArg.core,e=this._eventArg.grid.getColumnIndex(this);return t.getMinimumColumnWidth(e)},at.prototype.getTextAlign=function(){var t=this._eventArg.core,e=this._eventArg.grid.getColumnIndex(this);return t.getColumnAlignment(e)},at.prototype.getHeaderAlignment=function(){return this._headerAlignment||""},at.prototype.getClasses=function(){return this._classes},at.prototype.getConfigObject=function(t){var e=t||{};""===this._field||this._field.match(/^COLUMN_/)||(e.field=this._field);var i=this.getDataType();i&&(e.dataType=i),this._formulaRef&&(e.formulaReference=this._formulaRef),this._requiredFields&&(e.require=this._requiredFields),this._name&&(e.name=this._name),this._realTimeField||(e.notRealTimeField=!0),null!=this._tooltip&&(e.tooltip=this._tooltip),null!=this._rowSorting&&(e.rowSorting=this._rowSorting),this._sortable||(e.sortable=!1),this._initialOrder&&(e.sort=this._initialOrder),this._classes&&(e.className=this._classes.join(" ")),this._textSelect&&(e.textSelect=this._textSelect),this._headerAlignment&&(e.headerAlignment=this._headerAlignment);var n=this._eventArg.core,o=this._eventArg.grid.getColumnIndex(this);return i=n.getColumnScalability(o),e.scalable=i,i=n.getColumnCustomLaneSize(o),e.width=i,32!==(i=n.getMinimumColumnWidth(o))&&(e.minWidth=i),(i=n.isColumnVisible(o))||(e.hidden=!0),"default"!==(i=n.getColumnAlignment(o))&&(e.textAlign=i),e},at.prototype.isHidden=function(){var t=this._eventArg.core,e=this._eventArg.grid.getColumnIndex(this);return!t.isColumnVisible(e)},at.prototype.isTextSelect=function(){return this._textSelect},at.prototype.hide=function(t){var e=this._eventArg.core,i=this._eventArg.grid.getColumnIndex(this);e.hideColumn(i,!1!==t)},at.prototype.setHeaderRenderer=function(t){this._headerRenderer=t},at.prototype.setRenderer=function(t){"function"==typeof t?(this._internalRenderer=this._customRenderer,this._activatedRenderer!==t&&(this._userRenderers?this._userRenderers.length=0:this._userRenderers=[],this._userRenderers.push(t))):(this._internalRenderer=this._defaultRenderer,this._userRenderers=null)},at.prototype.addRenderer=function(t){t&&(this._userRenderers?this._userRenderers.push(t):this.setRenderer(t))},at.prototype.activateRenderer=function(t,e){var i=null;if(null!=t){var n=this._rendererMap;n||(n=this._rendererMap={}),"function"==typeof e?i=n[t]=e:null==e?i=n[t]:e||(i=n[t]=null)}return this._activatedRenderer=i||null,i||(i=this._userRenderers?this._userRenderers[0]:null),this.setRenderer(i),!!this._activatedRenderer},at.prototype.setSorter=function(t){"function"==typeof t?(this._userSorter=t,null==this._rowSorting?this._internalSorter=this._realTimeField?this._dataSorter:this._rowDefSorter:this._internalSorter=this._rowSorting?this._rowDefSorter:this._dataSorter):(this._userSorter=null,this._internalSorter=this._defaultSorter)},at.prototype.setName=function(t){this._name=t,this._isDefaultName=!1},at.prototype._setField=function(t,e){var i=null==t;if(t||(t=""),t=t.replace(/^\s+|\s+$/gm,""),this._fnEngine){var n=t.toUpperCase(),o=e||rt.get(n);(o||at.isFormulaField(t))&&(t=a.a.toUpperCase(t),this._formula=this._fnEngine.addFormula(o||t),o&&(this._formula.setAlias(t),this._fnEngine.addReference(this._formula,t)),this._retrieveNestedFields(this._formula.getFieldNames())),this._formulaRef&&(this._formulaRef=this._fnEngine.addReference(this._formula||t,this._formulaRef))}i?(this._field="COLUMN_"+this._id,this._name="Column "+this._id):(this._field=t,this._name=t,this._realTimeField=!!t),this._isDefaultName=!0,this._updateContext("field",t),this.isRealTimeField()&&this._updateContext("formattedField",t+"_FORMATTED")},at.prototype._retrieveNestedFields=function(t){if(t)for(var e=t.length;--e>=0;){var i=t[e],n=i.toUpperCase(),o=rt.get(n);if(o){var r=this._fnEngine.getFormula(i);r?r.addFormulaCount():((r=this._fnEngine.addFormula(o)).setAlias(i),this._fnEngine.addReference(r,i)),this._retrieveNestedFields(r.getFieldNames())}else this._requiredFields.push(i)}},at.prototype._defaultRenderer=function(t){var e=t.dataValue.getData(this._field);t.cell.setContent(e)},at.prototype._customRenderer=function(t){var e=t.dataValue,i=e.getRowData(),n=this._eventArg;if(n.rowDef=e,n.rowData=i,n.rowIndex=t.rowIndex,i&&(n.data=i[this._field]),n.colIndex=t.colIndex,n.cell=t.cell,n.section=t.section,this._activatedRenderer)this._activatedRenderer(n);else for(var o=this._userRenderers,r=o.length,s=0;s<r;++s)o[s](n)},at.prototype._defaultSorter=function(t,e,i){var n=t.getGroupOrder(),o=e.getGroupOrder();if(n!==o)return n-o;var r=t.getData(this._field),s=e.getData(this._field);return null==r||r!=r?null==s||s!=s?0:1:null==s||s!=s?-1:r<s?-i:s<r?i:0},at.prototype._dataSorter=function(t,e,i){var n=t.getGroupOrder(),o=e.getGroupOrder();if(n!==o)return n-o;var r=t.getData(this._field),s=e.getData(this._field);return this._userSorter(r,s,i,this._sortContext)},at.prototype._rowDefSorter=function(t,e,i){var n=t.getGroupOrder(),o=e.getGroupOrder();return n!==o?n-o:this._userSorter(t,e,i,this._sortContext)},at.prototype._updateContext=function(t,e){this._eventArg[t]=this._sortContext[t]=e},at.prototype.getUserModel=function(){return this._userModel},at.prototype.clearUserModel=function(){this._userModel=null};var lt=at,ut=function(t){for(var e in t)return!1;return!0},ht=function(){this._onRequest=this._onRequest.bind(this),this._rics={},this._fields={}};r.a.inherits(ht,s.a),ht.prototype._timerId=0,ht.prototype._rics,ht.prototype._fields,ht.prototype._rtk,ht.prototype.setRTK=function(t){this._rtk=t},ht.prototype.addRic=function(t){t&&!this._rics[t]&&(this._rics[t]=1,this._request())},ht.prototype.addField=function(t){this._addField(t)&&this._request()},ht.prototype.addFields=function(t){for(var e=t.length,i=0,n=0;n<e;++n)i|=this._addField(t[n]);i&&this._request()},ht.prototype._addField=function(t){return ht.isValidField(t)&&!this._fields[t]?(this._fields[t]=1,1):0},ht.isValidField=function(t){return!(!t||0!==t.indexOf("TR."))},ht.prototype._request=function(){this._timerId||(this._timerId=setTimeout(this._onRequest,0))},ht.prototype._onRequest=function(){this._timerId=0;var t=window.JET;if(this._rtk){if(!this._rtk.Data)return}else if(!t||!t.ContainerDescription||"function"!=typeof t.Data)return;var e,i=Object.keys(this._rics),n=Object.keys(this._fields),o=n.length;if(o&&i.length){var r=[];for(e=0;e<o;e++)r.push({name:n[e]});this._rics={},this._fields={};var s={instruments:i,fields:r},a=this._onSuccess.bind(this,n);this._rtk?this._rtk.Data.DataGrid.request(s).then(a).catch((function(t){console.log(t)})):t.Data("datagrid").then((function(t){return t.request(s)})).then(JSON.parse).then(a).catch((function(t){console.log(t)}))}},ht.prototype._onSuccess=function(t,e){var i=e.data,n=e.headers&&e.headers[0];if(Array.isArray(i)&&Array.isArray(n)){var o,r,s;this._dispatch("adcDataReceived",e);var a=1,l=t.length,u=n.length,h=new Array(u);for(o=0;o<l&&a<u;o++)r=t[o],n[a].field===r.toUpperCase()&&(h[a]=r,a++);var p=i.length,d=h.length,c={};for(o=0;o<p;o++){var _=i[o];if(!c[s=_[0]]){var f=c[s]={};for(a=1;a<d;a++){var g=_[a];null!=g&&""!==g&&(f[r=h[a]]=g)}}}var y={};for(s in c){var m=c[s];ut(m)||(y[s]=m)}this._dispatch("dataChanged",{data:y})}else console.log("Invalid server response detected")};var pt=ht,dt=function(t){this._element=t||document.createElement("div")};r.b.inherits(dt,B),dt.prototype._element=null,dt.prototype._content=null,dt.prototype._textSpan=null,dt.prototype._nativeEvents=null,dt._passiveEvents=null,dt.prototype.getContent=function(t){return t?this._element.children:this._element.lastChild},dt.prototype.setContent=function(t,e){if(null==t||t!=t?t=null:1!==t.nodeType&&11!==t.nodeType&&(null==t.getElement?(O.isString(t)||(t+=""),null==this._textSpan&&(this._textSpan=document.createElement("span")),this._textSpan.textContent=t,t=this._textSpan):t=t.getElement()),t!==this._content){for(this._content=t;null!==this._element.firstChild;)this._element.removeChild(this._element.firstChild);null!==this._content&&this._element.appendChild(this._content)}return e&&t&&t.setAttribute("title",e),this._content},dt.prototype.addContent=function(t){return null==(t=O.getElement(t))?null:(this._content=this._element.children,this._element.appendChild(t),t)},dt.prototype.removeContent=function(t){return null!=(t=O.getElement(t))&&(this._content=this._element.children,this._element.removeChild(t),!0)},dt.prototype.listen=function(t,e,i){if(this._customEvents&&this._customEvents[t])this._customEvents[t].listen(e,i);else{this._nativeEvents||(this._nativeEvents={});var n=this._nativeEvents[t];if(!n){if(n=new H,this._nativeEvents[t]=n,n.dispatch=n.dispatch.bind(n),!dt._passiveEvents){var o=!1;try{var r=Object.defineProperty({},"passive",{get:function(){return o=!0,!1}});window.addEventListener("testPassive",null,r),window.removeEventListener("testPassive",null,r)}catch(t){}if(o){var s={passive:!0};dt._passiveEvents={touchstart:s,touchmove:s}}else dt._passiveEvents={}}this._element.addEventListener(t,n.dispatch,dt._passiveEvents[t]||!1)}n.listen(e,i)}},dt.prototype.unlisten=function(t,e){if(this._customEvents&&this._customEvents[t])this._customEvents[t].unlisten(e);else if(this._nativeEvents){var i=this._nativeEvents[t];i&&i.unlisten(e)}},dt.prototype.unlistenAll=function(t){if(this._customEvents)if(t)this._customEvents[t]&&this._customEvents[t].unlistenAll();else for(var e in this._customEvents)this._customEvents[e].unlistenAll();if(this._nativeEvents)if(t)this._nativeEvents[t]&&(this._unlistenAll(t),delete this._nativeEvents[t]);else{for(var i in this._nativeEvents)this._unlistenAll(i);this._nativeEvents=null}},dt.prototype._unlistenAll=function(t){var e=this._nativeEvents[t];this._element.removeEventListener(t,e.dispatch,!1),e.unlistenAll()},dt.prototype.dispose=function(){this._dispose()},dt.prototype._dispose=function(){this.setParent(null),this.unlistenAll(),this._element=this._content=this._textSpan=null,this._customEvents=this._nativeEvents=null},dt.prototype.setEventArgExtender=function(t,e){if(this._customEvents){var i=this._customEvents[t];i&&i.setEventArgExtender(e)}},dt.prototype.getElement=function(){return this._element},dt.prototype.getNextSibling=function(){return this._element.nextSibling},dt.prototype.getParent=function(){return this._element.parentNode},dt.prototype.setParent=function(t,e){this._setParent(t,e)},dt.prototype._setParent=function(t,e){null!==(t=O.getElement(t))?e?t.insertBefore(this._element,t.firstChild):t.appendChild(this._element):null!==this._element.parentNode&&this._element.parentNode.removeChild(this._element)},dt.prototype.insertBefore=function(t){this._insertBefore(t)},dt.prototype._insertBefore=function(t){if(null!=(t=O.getElement(t))){var e=t.parentNode;null!=e&&e.insertBefore(this._element,t)}else this.setParent(this.getParent())},dt.prototype.insertAfter=function(t){(t=O.getElement(t))?t.nextSibling?this.insertBefore(t.nextSibling):this.setParent(t.parentNode):this.setParent(this.getParent(),!0)},dt.prototype.hasClass=function(t){return!!this._element&&this._element.classList.contains(t)},dt.prototype.addClass=function(t){this._element&&this._element.classList.add(t)},dt.prototype.removeClass=function(t){this._element&&this._element.classList.remove(t)},dt.prototype.toggleClass=function(t,e){var i=this._element;i&&(null==e&&(e=!i.classList.contains(t)),e?i.classList.add(t):i.classList.remove(t))},dt.prototype.enableClass=function(t,e){!1!==e?this.addClass(t):this.removeClass(t)},dt.prototype.getClass=function(){return this._element.className},dt.prototype.setClass=function(t){this._element.className=t},dt.prototype.getAttribute=function(t){return this._element.getAttribute(t)},dt.prototype.setAttribute=function(t,e){this._element.setAttribute(t,e)},dt.prototype.setAttributes=function(t){for(var e in t)this._element.setAttribute(e,t[e])},dt.prototype.removeAttribute=function(t){this._element.removeAttribute(t)},dt.prototype.getStyle=function(t){return this._element.style[t]},dt.prototype.setStyle=function(t,e){this._element.style[t]=e},dt.prototype.setStyles=function(t){var e=this._element.style;for(var i in t)e[i]=t[i]},dt.prototype.getId=function(){return this._element.id},dt.prototype.setId=function(t){this._element.id=t},dt.prototype.toString=function(){var t=this._element.outerHTML;return t=t.replace(this._element.innerHTML,"")},dt.prototype.getTextContent=function(){return this._element.textContent},dt.prototype.setTextContent=function(t){this._element.textContent=t},dt.prototype.getLeft=function(){return this._element.offsetLeft},dt.prototype.setLeft=function(t){return this._element.style.left=t+"px",!0},dt.prototype.getTop=function(){return this._element.offsetTop},dt.prototype.setTop=function(t){return this._element.style.top=t+"px",!0},dt.prototype.getWidth=function(){return this._element.offsetWidth},dt.prototype.setWidth=function(t){return this._element.style.width=t+"px",!0},dt.prototype.getHeight=function(){return this._element.offsetHeight},dt.prototype.setHeight=function(t){return t<0&&(t=0),this._element.style.height=t+"px",!0},dt.prototype.getBoundingClientRect=function(){return this._element.getBoundingClientRect()},dt.prototype.fillParentWidth=function(t){return null==t&&(t=100),this._element.style.width=t+"%",!0},dt.prototype.fillParentHeight=function(t){return null==t&&(t=100),this._element.style.height=t+"%",!0},dt.prototype.getTooltip=function(){return this.getAttribute("title")},dt.prototype.setTooltip=function(t){t?this.setAttribute("title",t):this.removeAttribute("title")},dt.prototype.show=function(t){this._element.style.display=!1!==t?"":"none"},dt.prototype.hide=function(t){this.show(!1===t)},dt.prototype.isVisible=function(){return"none"!==this._element.style.display},dt.prototype.enable=function(t){(t=!1!==t)?this.removeAttribute("disabled"):(this.setAttribute("disabled","disabled"),this._element.disabled=!t)},dt.prototype.disable=function(t){this.enable(!1===t)},dt.prototype.isEnabled=function(){return!this._element.hasAttribute("disabled")},dt.prototype.getScrollLeft=function(){return this._element.scrollLeft},dt.prototype.getScrollTop=function(){return this._element.scrollTop},dt.prototype.isEndOfHorizontalScroll=function(){return this._element.scrollLeft>=this._element.scrollWidth-this.getWidth()},dt.prototype.isEndOfVerticalScroll=function(){return this._element.scrollTop>=this._element.scrollHeight-this.getHeight()},dt._proto=dt.prototype;var ct=dt,_t=function(){this._items=[],this._element=null};r.b.inherits(_t,ct),_t.prototype._items=[],_t.prototype.hasItem=function(){return!!this._items.length},_t.prototype.insertItem=function(t,e){var i=this._items;i.indexOf(t)>-1||(i.push(t),e&&(t._order=e),i.length&&i.sort(_t._iconComparer),this._updatePanelItems())},_t.prototype.removeItem=function(t){var e=this._items,i=-1;if(t)for(var n=e.length;--n>=0;){var o=e[n];if("string"==typeof t){if(o.classList.contains(t)){i=n;break}}else if(o===t){i=n;break}}else i=e.length-1;var r=null;return i>-1&&(r=e.splice(i,1)[0]),this._updatePanelItems(),r},_t.prototype.clearItems=function(){var t=this._items;t.length&&(t.length=0,this._updatePanelItems())},_t._iconComparer=function(t,e){return t._order?e._order?t._order-e._order:1:e._order?-1:0},_t.prototype._updatePanelItems=function(){var t=this._items,e=this._element;if(t.length){for(this._element||(e=this._element=document.createElement("div"));e.lastChild;)e.removeChild(e.lastChild);for(var i=0;i<t.length;i++)e.appendChild(t[i])}};var ft=_t,gt=function(t,e){this._onFocus=this._onFocus.bind(this),this._id=gt._runningId++,this._element=document.createElement("div"),this._element.className="cell",e&&(this._section=e)};r.b.inherits(gt,ct),gt.prototype._aligner=null,gt._runningId=0,gt.prototype._id=0,gt.prototype._width=-1,gt.prototype._height=-1,gt.prototype._visible=!0,gt.prototype._rawContent,gt.prototype._section=null,gt.prototype._contentLocked=!1,gt.prototype._collapsedState=0,gt.prototype._floatingPanel=null,gt.prototype._frontIcon=null,gt.prototype.getContent=function(t){return t&&this._element?this._element.children:this._content||null},gt.prototype.setContent=function(t,e){if(this._contentLocked)return null;if(null==t||t!=t?t=null:1!==t.nodeType&&11!==t.nodeType&&(null==t.getElement?"string"!=typeof t&&(t+=""):t=t.getElement()),this._aligner){var i=this._aligner.firstChild;i!==this._content&&(this._rawContent=i,this._content=i)}var n=this._setRawContent(t);return null!=e&&this._content&&this._content.setAttribute("title",e),n},gt.prototype.setTextContent=function(t){null==t&&(t=""),this._rawContent!==t&&("string"==typeof this._rawContent?(this._rawContent=t,this._textSpan.textContent=t):null!=this._rawContent||this._textSpan?this.setContent(t):(this.initialize(),this._rawContent=t,this._textSpan=document.createElement("span"),this._textSpan.className="text",this._textSpan.textContent=t,this._content=this._textSpan,this._aligner.className="valigner",this._aligner.appendChild(this._textSpan)))},gt.prototype.dispose=function(){this.removeParent(),this.unlistenAll(),this._element=this._section=this._aligner=null,this._textSpan=this._rawContent=this._content=null,this._frontIcon=this._floatingPanel=null},gt.prototype.getNextSibling=function(){return null!==this._element?this._element.nextSibling:null},gt.prototype.getParent=function(){return null!==this._element?this._element.parentNode:null},gt.prototype.setParent=function(t,e){var i=O.getElement(t);if(i){if(this.initialize(),1===this._collapsedState)return;var n;!0===e&&(n=i.firstChild),n?i.insertBefore(this._element,n):i.appendChild(this._element)}else this.removeParent()},gt.prototype.removeParent=function(){var t=this._element;t&&t.parentNode&&t.parentNode.removeChild(t)},gt.prototype.insertBefore=function(t){var e=O.getElement(t);if(null!=e){var i=e.parentNode;null!=i&&(this.initialize(),i.insertBefore(this._element,e))}else this.setParent(this.getParent())},gt.prototype.getTextContent=function(){return this._rawContent?"string"==typeof this._rawContent?this._rawContent:this._rawContent.textContent:""},gt.prototype.getTextElement=function(){return this._textSpan},gt.prototype.getWidth=function(){return this._width>=0?this._width:this._element.offsetWidth},gt.prototype.setWidth=function(t){return t<0&&(t=-1),this._width!==t&&(this._width=t,this._element.style.width=t>=0?t+"px":"",this._updateDisplay(),!0)},gt.prototype.getHeight=function(){return this._height>=0?this._height:this._element.offsetHeight},gt.prototype.setHeight=function(t){return t<0&&(t=-1),this._height!==t&&(this._height=t,this._element.style.height=t>=0?t+"px":"",this._updateDisplay(),!0)},gt.prototype.fillParentWidth=function(t){return!1},gt.prototype.fillParentHeight=function(t){return!1},gt.prototype.show=function(t){var e=!1!==t;e!==this._visible&&(this._visible=e,this._updateDisplay())},gt.prototype.isVisible=function(){return this._visible},gt.prototype.getScrollLeft=function(){return 0},gt.prototype.getScrollTop=function(){return 0},gt.prototype.isEndOfHorizontalScroll=function(){return!0},gt.prototype.isEndOfVerticalScroll=function(){return!0},gt.prototype.hasElement=function(){return null!==this._element},gt.prototype.getSection=function(){return this._section},gt.prototype.initialize=function(){return null==this._aligner&&(O.isIE?this._aligner=document.createElement("div"):(this._aligner=document.createElement("button"),this._aligner.addEventListener("focus",this._onFocus)),this._aligner.className="valigner",this._frontIcon&&this._element.appendChild(this._frontIcon.getElement()),this._element.appendChild(this._aligner),this._floatingPanel&&this._element.appendChild(this._floatingPanel.getElement())),this._element},gt.prototype.updateIcon=function(t){if(t){var e=this._frontIcon;e&&e.clearItems(),this.insertFrontIcon(t,0)}},gt.prototype.removeIcon=function(){var t=this._frontIcon;t&&(t.clearItems(),this._element.removeChild(t.getElement()),t=this._frontIcon=null)},gt.prototype.isFrozen=O._deprecatedFunction,gt.prototype.freezeLayout=O._deprecatedFunction,gt.prototype.setAutoContentClipping=O._deprecatedFunction,gt.prototype.setContentTooltip=function(t){return!(null==t||!this._content)&&(this._content.setAttribute("title",t),!0)},gt.prototype.lockContent=function(t){this._contentLocked=!1!==t},gt.prototype.reset=function(){if(this._element){var t=this._element.style.width,e=this._element.style.height;this.removeAttribute("style"),t&&(this._element.style.width=t),e&&(this._element.style.height=e),this.resetClass();var i=this.blinkState;i&&(i.timerId>=0&&clearInterval(i.timerId),delete this.blinkState),delete this.trendState;var n=this.blinking;n&&(n.blinking>=0&&clearTimeout(n.blinking),n.cell=null,n.styles=null,delete this.blinking),this.removeIcon(),this.setContent(null),this._textSpan&&(this._textSpan.className="text",this._textSpan.textContent="")}},gt.prototype.resetClass=function(){var t="cell";this.hasClass("spanned")&&(t+=" spanned"),this.hasClass("selected-row")&&(t+=" selected-row"),this.hasClass("highlighted-row")&&(t+=" highlighted-row"),this.setClass(t)},gt.prototype.resetToInitialState=function(){this._element&&(this.setParent(null),this.unlistenAll(),this._element.className="cell",this.removeIcon(),this.setContent(null),this._contentLocked=!1,this._collapsedState=0)},gt.prototype.insertFloatingIcon=function(t,e){if(t){var i=this._floatingPanel;i||(i=this._floatingPanel=new ft),i.insertItem(t,e),i.addClass("floating-panel");var n=this._element;n.contains(i.getElement())||n.appendChild(i.getElement())}},gt.prototype.removeFloatingIcon=function(t){var e=this._floatingPanel;if(!e)return null;var i=e.removeItem(t);return e.hasItem()||(this._element.removeChild(e.getElement()),this._floatingPanel=null),i},gt.prototype.insertFrontIcon=function(t,e){if(t){var i=this._frontIcon;i||(i=this._frontIcon=new ft),i.insertItem(t,e),i.addClass("front-panel");var n=this._element;n.contains(i.getElement())||n.insertBefore(i.getElement(),n.firstChild)}},gt.prototype.removeFrontIcon=function(t){var e=this._frontIcon;if(!e)return null;var i=e.removeItem(t);return e.hasItem()||(i=e.getElement(),this._element.removeChild(i),this._frontIcon=null),i},gt.prototype.getCellId=function(){return this._id},gt.prototype.updatePadding=function(){},gt.prototype.collapse=function(t,e){var i,n=!1!==t;return i=n?e?2:1:0,this._collapsedState!==i&&(n?e?this.addClass("spanned"):this.setParent(null):2===this._collapsedState&&this.removeClass("spanned"),this._collapsedState=i,!0)},gt.prototype.isCollapsed=function(){return 0!==this._collapsedState},gt.prototype.isKeptInDoc=function(){return 1!==this._collapsedState},gt.prototype.getClientWidth=function(){return this._element?this._element.clientWidth:this.getWidth()},gt.prototype.getClientHeight=function(){return this._element?this._element.clientHeight:this.getHeight()},gt.prototype._setRawContent=function(t){if(this._rawContent!==t){this._rawContent=t;var e=this._rawContent;if("string"==typeof this._rawContent&&(this._textSpan||(this._textSpan=document.createElement("span"),this._textSpan.className="text"),this._textSpan.textContent=this._rawContent,e=this._textSpan),this._content!==e){this._content=e,this.initialize();for(var i=this._aligner;i.lastChild;)i.removeChild(i.lastChild);this._content&&i.appendChild(this._content)}}return this._content},gt.prototype._updateDisplay=function(){var t=!1;this.isVisible()&&this._width&&this._height&&(t=!0),this._element.style.display=t?"":"none"},gt.prototype._onFocus=function(t){this._section&&this._section._getContext().getElement().focus({preventScroll:!0})},gt._proto=gt.prototype;var yt=gt,mt=function(){this._ends=[],this._cols=[]};mt.prototype._laneCount=0,mt.prototype._defaultSize=10,mt.prototype._defaultScalability=!0,mt.prototype._homogeneous=!0,mt.prototype._visibility=!0,mt.prototype._ends,mt.prototype._cols,mt.prototype._bits=[1,2,4,8],mt.prototype.hitTest=function(t){if(t<0)return-1;if(t>=this.getTrackSize())return~this._laneCount;var e=-1,i=0;if(this._homogeneous){var n=this._defaultSize;i=((e=Math.floor(t/n))+1)*n}else e=O.upperBound(this._ends,t),i=this._ends[e];return(e>=this._laneCount||t>=i)&&(e=~e),e},mt.prototype.isAtDefaultSize=function(t){if(this._homogeneous)return!0;if(null!=t){if(!this._isAtDefaultSize(t))return!1}else{for(var e=this._cols.length;--e>=0;)if(!this._isAtDefaultSize(e))return!1;this._homogeneous=!0}return!0},mt.prototype._isAtDefaultSize=function(t){var e=this._cols[t];if(e){if(e.actualSize!==this._defaultSize)return!1;if(null!=e.customSize)return!1;if(e.invisibility)return!1}return!0},mt.prototype.isHomogeneous=function(){return this._homogeneous},mt.prototype.isAtMinimumSize=function(t){var e=this._getMinimumScalingSize(t);return(null!=t?this.getLaneSize(t):this.getTrackSize())<=e},mt.prototype.isFixedSize=function(){for(var t=0;t<this._laneCount;++t)if(this.getLaneScalability(t))return!1;return!0},mt.prototype.clearLaneCustomizations=function(){this._ends.length=0,this._cols.length=0,this._homogeneous=!0},mt.prototype.getLaneCount=function(){return this._laneCount},mt.prototype.setLaneCount=function(t){t<0&&(t=0),t!==this._laneCount&&(this._markDirtyIndex(t),this._cols.length=t,this._laneCount=t,0===t&&(this._homogeneous=!0))},mt.prototype.getDefaultLaneSize=function(){return this._defaultSize},mt.prototype.setDefaultLaneSize=function(t){return t<0&&(t=0),this._defaultSize!==t&&(this._defaultSize=t,this._markDirtyIndex(0),!0)},mt.prototype.getLaneDefaultSize=function(t){if(t<0||t>=this._laneCount)return-1;var e=this._newColumn(t);return e.defaultSize?e.defaultSize:-1},mt.prototype.setLaneDefaultSize=function(t,e){t<0||t>=this._laneCount||e>=0&&(this._newColumn(t).defaultSize=e)},mt.prototype.resetLaneToDefaultSize=function(){for(var t=!1,e=0;e<this._laneCount;++e){var i=this._cols[e];i&&(i.invisibility||(null!=i.defaultSize?(t|=this.setLaneScalability(e,!1),t|=this.setLaneSize(e,i.defaultSize)):(t|=this.setLaneScalability(e,!0),t|=this.setLaneSize(e,1))))}return!!t},mt.prototype.getDefaultScalability=function(){return this._defaultScalability},mt.prototype.setDefaultScalability=function(t){return this._defaultScalability!==t&&(this._defaultScalability=t,!0)},mt.prototype.getTrackSize=function(){return!this._visibility||this._laneCount<=0?0:this._homogeneous?this._laneCount*this._defaultSize:(this._updateEndPoints(),this._ends[this._laneCount-1])},mt.prototype.setTrackSize=function(t,e){var i=0,n=0,o=[];for(i=0;i<this._laneCount;++i){var r=this._cols[i];r?r.invisibility||(!1!==this._getLaneScalability(r)?o.push(i):n+=this._getFixedSize(r)):o.push(i)}if(o.length<=0)return null;var s=this._distributeLaneSize(t-n-e,o),a=!1,l=[];for(i=s.length;--i>=0;){l[i]=0;var u=s[i];if(null!=u){var h=this.getLaneSize(i);this._newColumn(i),this._setCalculatedLaneSize(i,u)&&(l[i]=u-h,a=!0)}}return a?l:null},mt.prototype.getLaneStart=function(t){if(t<=0)return 0;if(this._homogeneous)return t*this._defaultSize;this._updateEndPoints();var e=t-this._laneCount,i=0;return e>0&&(t-=e,i=e*this._defaultSize),this._ends[t-1]+i},mt.prototype.getLaneEnd=function(t){return this._laneCount<=0?NaN:(t<0?t=0:t>=this._laneCount&&(t=this._laneCount-1),this._homogeneous?(t+1)*this._defaultSize:(this._updateEndPoints(),this._ends[t]))},mt.prototype.getLaneSize=function(t){if(this._visibility){var e=this._cols[t];return e?e.actualSize:this._defaultSize}return 0},mt.prototype.getCustomLaneSize=function(t){var e=this._cols[t];return e&&null!=e.customSize?e.customSize:this._defaultSize},mt.prototype.setLaneSize=function(t,e){if(t<0||t>=this._laneCount)return!1;if(e<0||e!=e)return!1;var i=this._cols[t];return(null==i||i.customSize!==e)&&((i=this._newColumn(t)).customSize=e,this._setCalculatedLaneSize(t,e))},mt.prototype.getMinimumLaneSize=function(t){var e=this._cols[t];return e&&null!=e.minSize?e.minSize:0},mt.prototype.setMinimumLaneSize=function(t,e,i){if(t<0||t>=this._laneCount)return!1;if(e<0&&(e=0),this.getMinimumLaneSize(t)!==e){var n=this._newColumn(t);return n.minSize=e,i&&this.getLaneScalability(t)&&(n.customSize=e),this._setCalculatedLaneSize(t)}return!1},mt.prototype.isLaneVisible=function(t){var e=this._cols[t];return!e||!e.invisibility},mt.prototype.showLane=function(t,e){return this.hideLane(t,!1===e)},mt.prototype.hideLane=function(t,e,i){if(t<0||t>=this._laneCount)return!1;var n=this._newColumn(t),o=!n.invisibility,r=null!=i?this._bits[i]:1;return!1!==e?n.invisibility|=r:n.invisibility&=~r,o!==!n.invisibility&&this._setCalculatedLaneSize(t)},mt.prototype.show=function(t){if(t=!1!==t,this._visibility!==t)if(this._visibility=t,t)for(var e=0;e<this._laneCount;++e)this._newColumn(e),this._setCalculatedLaneSize(e);else this._markDirtyIndex(0)},mt.prototype.getLaneScalability=function(t){var e=this._cols[t];return e&&null!=e.scalability?e.scalability:this._defaultScalability},mt.prototype.setLaneScalability=function(t,e){if(t<0||t>=this._laneCount)return!1;var i=this._cols[t];return(!i||i.scalability!==e)&&((i=this._newColumn(t)).scalability=e,!0)},mt.prototype.removeLaneAt=function(t,e){if(null==e&&(e=1),t<0)return null;if(t+e>this._laneCount&&(e=this._laneCount-t),e<1)return null;this._markDirtyIndex(t);var i=this.serializeLane(t);return this._cols.splice(t,e),this._laneCount-=e,i},mt.prototype.insertLane=function(t,e){t<0&&(t=0);var i=1;if(O.isNumber(e)){if(e<=0)return;i=e,e=null}if(t>=this._laneCount&&(t=this._laneCount,!e))this.setLaneCount(this._laneCount+i);else if(this._laneCount+=i,this._markDirtyIndex(t),O.insertEmptyItems(this._cols,t,i),e)for(var n=t+i,o=t;o<n;++o)this.deserializeLane(o,e)},mt.prototype.moveLane=function(t,e){if(t<0?t=0:t>this._laneCount&&(t=this._laneCount),e<0?e=0:e>this._laneCount&&(e=this._laneCount),t!==e){var i=t<e?t:e;this._markDirtyIndex(i),O.moveArrayItem(this._cols,t,e)}},mt.prototype.serializeLane=function(t){if(t<0||t>=this._laneCount)return null;var e={};e.index=t;var i=this._cols[t];return i?(e.size=i.customSize,e.minSize=i.minSize,e.visible=!i.invisibility,e.scalable=i.scalability,e):e},mt.prototype.deserializeLane=function(t,e){if(e&&!(t<0||t>=this._laneCount)){var i=e.size;null!=i&&this.setLaneSize(t,i),null!=(i=e.minSize)&&this.setMinimumLaneSize(t,i),null!=(i=e.visible)&&this.showLane(t,i),null!=(i=e.scalable)&&this.setLaneScalability(t,i)}},mt.prototype._updateEndPoints=function(){var t=this._ends.length;if(!(t>=this._laneCount)){this._ends.length=this._laneCount;var e=0,i=t>0?this._ends[t-1]:0;for(e=t;e<this._laneCount;++e)i+=this.getLaneSize(e),this._ends[e]=i}},mt.prototype._setCalculatedLaneSize=function(t,e){var i=this._cols[t];if(this._visibility&&!i.invisibility){if(null==e&&(e=null!=i.customSize?i.customSize:this._defaultSize),!i.scalability){var n=null!=i.minSize?i.minSize:0;e<n&&(e=n)}}else e=0;return i.actualSize!==e&&(i.actualSize=e,this._homogeneous=!1,this._markDirtyIndex(t),!0)},mt.prototype._getMinimumScalingSize=function(t){var e=0;if(null!=t){var i=this._cols[t];if(!i.invisibility&&null!=i.minSize)return!1===this._getLaneScalability(i)&&null!=i.customSize&&i.customSize>i.minSize?i.customSize:i.minSize}else for(var n=this._laneCount;--n>=0;)e+=this._getMinimumScalingSize(n);return e},mt.prototype._getFixedSize=function(t){return null!=t.customSize?null!=t.minSize?t.customSize>t.minSize?t.customSize:t.minSize:t.customSize:null!=t.minSize?t.minSize:this._defaultSize},mt.prototype._getLaneScalability=function(t){return null==t.scalability?this._defaultScalability:t.scalability},mt.prototype._distributeLaneSize=function(t,e){if(e.length<=0)return[];t<0&&(t=0);var i=0,n=0,o=0,r=0,s=[],a=[],l=[];for(i=e.length;--i>=0;)s[o=e[i]]=this.getMinimumLaneSize(o),a[o]=this.getCustomLaneSize(o),n+=a[o];for(var u=!0;u;)for(u=!1,i=e.length;--i>=0;){var h=s[o=e[i]],p=a[o];(r=t*p/n)<=h&&(u=!0,l[o]=h,t-=h,n-=p,e.splice(i,1))}var d=e.length-1,c=0,_=0;for(i=d;--i>=0;){r=t*a[o=e[i]]/n;var f=Math.floor(r);(_+=r-f)>=1&&(++f,--_),l[o]=f,c+=f}return l[e[d]]=Math.floor(t-c),l},mt.prototype._markDirtyIndex=function(t){t<this._ends.length&&(this._ends.length=t)},mt.prototype._newColumn=function(t){var e=this._cols[t];return e||(this._cols[t]=e={},e.invisibility=0),e},mt.prototype.copyFrom=function(t,e){if(!this._homogeneous||!t._homogeneous||this._defaultSize!==t._defaultSize){e||(e=0);var i=t.getLaneCount(),n=this.getLaneCount(),o=e+i;o>n&&(o=n);for(var r=0,s=e;s<o;++s){var a=t.getLaneSize(r++),l=this._newColumn(s);l.customSize!==a&&(l.customSize=a,l.actualSize!==a&&(l.actualSize=a,this._homogeneous=!1,this._markDirtyIndex(s)))}}};var vt=mt,Ct=function(){};Ct.prototype.hitTest=function(t,e,i){},Ct.prototype.hitTestX=function(t){},Ct.prototype.hitTestY=function(t){},Ct.prototype.getDefaultColumnWidth=function(){},Ct.prototype.setDefaultColumnWidth=function(t){},Ct.prototype.getDefaultRowHeight=function(){},Ct.prototype.setDefaultRowHeight=function(t){},Ct.prototype.getColumnWidth=function(t){},Ct.prototype.setColumnWidth=function(t,e){},Ct.prototype.getRowHeight=function(t){},Ct.prototype.setRowHeight=function(t,e){},Ct.prototype.isColumnVisible=function(t){},Ct.prototype.hideColumn=function(t,e){},Ct.prototype.isRowVisible=function(t){},Ct.prototype.hideRow=function(t,e){},Ct.prototype.getMinimumColumnWidth=function(t){},Ct.prototype.setMinimumColumnWidth=function(t,e){},Ct.prototype.getMinimumRowHeight=function(t){},Ct.prototype.setMinimumRowHeight=function(t,e){},Ct.prototype.getCellLeft=function(t){},Ct.prototype.getCellTop=function(t){},Ct.prototype.getCellWidth=function(t,e){},Ct.prototype.getCellHeight=function(t,e){},Ct.prototype.hasCellSpan=function(){},Ct.prototype.getCellRowSpan=function(t,e){},Ct.prototype.setCellRowSpan=function(t,e,i){},Ct.prototype.getCellColSpan=function(t,e){},Ct.prototype.setCellColSpan=function(t,e,i){},Ct.prototype.clearCellSpans=function(){},Ct.prototype.clearColumnSpans=function(t){},Ct.prototype.clearColumnCustomizations=function(){},Ct.prototype.clearRowCustomizations=function(){},Ct.prototype.getColumnScalability=function(t){},Ct.prototype.setColumnScalability=function(t,e){},Ct.prototype.getRowScalability=function(t){},Ct.prototype.setRowScalability=function(t,e){},Ct.prototype.getCell=function(t,e,i){},Ct.prototype.getCellContent=function(t,e){},Ct.prototype.setCellContent=function(t,e,i){},Ct.prototype.getColumn=function(t){},Ct.prototype.getColumnCount=function(){},Ct.prototype.setColumnCount=function(t){},Ct.prototype.getRowCount=function(){},Ct.prototype.setRowCount=function(t,e){},Ct.prototype.getVisibleRowCount=function(){},Ct.prototype.addRow=function(t){},Ct.prototype.removeRow=function(t){},Ct.prototype.setBorders=function(t,e,i,n){},Ct.prototype.getColumnStyle=function(t,e){},Ct.prototype.setColumnStyle=function(t,e,i){},Ct.prototype.enableColumnClass=function(t,e,i){},Ct.prototype.hasColumnClass=function(t,e){},Ct.prototype.enableRowClass=function(t,e,i){},Ct.prototype.setRowStyle=function(t,e,i,n){},Ct.prototype.getRelativePosition=function(t){},Ct.prototype.getContentWidth=function(){},Ct.prototype.getContentHeight=function(){},Ct.prototype.getCellsByRowIndex=function(t){},Ct.prototype.disableHorizontalGridLine=function(t){},Ct.prototype.disableVerticalGridLine=function(t){},Ct.prototype.enableShading=function(t){},Ct.prototype.setTransposedShading=function(t){},Ct.prototype.enableRowHighlighting=function(t){},Ct.prototype.getRowHighlight=function(){},Ct.prototype.setRowHighlight=function(t){},Ct.prototype.getSelectedRows=function(){},Ct.prototype.getSelectedRowCount=function(){},Ct.prototype.isSelectedRow=function(t){},Ct.prototype.getRowAnchor=function(){},Ct.prototype.setRowAnchor=function(t){},Ct.prototype.setSelectedRow=function(t,e){},Ct.prototype.selectSingleRow=function(t){},Ct.prototype.selectRowRange=function(t,e){},Ct.prototype.clearSelectedRows=function(){},Ct.prototype.getFirstSelectedRow=function(){},Ct.prototype.getLastSelectedRow=function(){},Ct.prototype.activateColumn=function(t,e){},Ct.prototype.activateRows=function(t,e,i){},Ct.prototype.moveRowsToTop=function(t){},Ct.prototype.getFirstIndexInView=function(){},Ct.prototype.getLastIndexInView=function(){},Ct.prototype.isInCurrentView=function(t){},Ct.prototype.getFrozenLayout=function(){},Ct.prototype.setFrozenLayout=function(t){},Ct.prototype.insertColumn=function(t,e){},Ct.prototype.removeColumnAt=function(t){},Ct.prototype.moveColumn=function(t,e){},Ct.prototype.enableRowVirtualization=function(t){},Ct.prototype.enableColumnVirtualization=function(t){},Ct.prototype.getColumnIndex=function(t){},Ct.prototype.getCellIndex=function(t,e){},Ct.prototype.getIndex=function(){},Ct.prototype.setIndex=function(t){},Ct.prototype.getRowOffset=function(){},Ct.prototype.setRowOffset=function(t){},Ct.prototype.updateLayout=function(){},Ct.prototype.stretchCell=function(t,e,i,n){},Ct.prototype.unstretchCell=function(t,e){},Ct.prototype.unstretchAllCells=function(){},Ct.prototype.getStretchedCell=function(t,e){},Ct.prototype.getStretchedCells=function(){},Ct.prototype.updateStretchedCells=function(){},Ct.prototype.getColumnHost=function(){},Ct.prototype.setHidingMethod=function(t){},Ct.prototype.getHidingMethod=function(){},Ct.prototype.setColumnVisibility=function(t,e,i){},Ct.prototype.getRowLayout=function(){},Ct.prototype.reserveRightSpace=function(t){},Ct.prototype.getReservedSpace=function(){},Ct.prototype.getComputedStyle=function(){},Ct.prototype.isColumnActive=function(t){},Ct.prototype.setRowAttributes=function(t,e){},Ct.prototype.getContextRow=function(t){};var St=function(t){(this._element=document.createElement("div")).className="column",this._cells=[],this._section=t};r.b.inherits(St,ct),St.prototype._nextSibling=null,St.prototype._parent=null,St.prototype._section=null,St.prototype._cells=null,St.prototype._cellStart=0,St.prototype._cellEnd=0,St.prototype._autoStyleUpdating=!1,St.prototype._deactivation=!1,St.prototype._sizeClasses=null,St.prototype._colLeft=0,St.prototype._absolute=!1,St.prototype._scrollFrame=null,St.prototype._invisibility=0,St.prototype._bits=[1,2,4,8],St.prototype._pinned=!0,St.prototype.clearContent=function(){for(var t=this._cells.length;--t>=0;)this._cells[t].setContent(null)},St.prototype.setLeft=function(t){return this._colLeft=t,this._absolute&&(this._element.style.left=t+"px"),!0},St.prototype.enableAbsolutePosition=function(t){(t=!1!==t)!==this._absolute&&(this._absolute=t,this._element.style.left=t?this._colLeft+"px":"")},St.prototype.dispose=function(){this._dispose();for(var t=this._cells.length;--t>=0;)this._cells[t].dispose();this._scrollFrame=this._nextSibling=this._parent=this._cells=this._section=null},St.prototype.setStyle=function(t,e){var i=this._element;i.style[t]=e,i.style.backgroundColor?i.classList.contains("no-shading")||i.classList.add("no-shading"):i.classList.contains("no-shading")&&i.classList.remove("no-shading")},St.prototype.setStyles=function(t){var e=this._element,i=e.style;for(var n in t)i[n]=t[n];e.style.backgroundColor?e.classList.contains("no-shading")||e.classList.add("no-shading"):e.classList.contains("no-shading")&&e.classList.remove("no-shading")},St.prototype.show=function(t){this.setVisibility(0,!1!==t)},St.prototype.setWidth=function(t){this._element.style.width=t+"px";var e,i=t>0&&t<=60?3-Math.floor((t-.01)/20):0;(i<0||i>3)&&(i=3);var n=this._sizeClasses;if(n){if(n.length>i){for(e=n.length;--e>=i;)this.removeClass(n[e]);n.length=i}i||(this._sizeClasses=null)}if(i)for(n||(n=[],this._sizeClasses=n),e=n.length;e<i;++e)n[e]=St._sizeClasses[e],this.addClass(n[e]);return this.setVisibility(1,t>0),!0},St._sizeClasses=["small-col","very-small-col","tiny-col"],St.prototype.setHeight=function(t){return this._element.style.height=t+"px",this.setVisibility(2,t>0),!0},St.prototype.getParent=function(){return this._parent},St.prototype.setParent=function(t,e){if(this._element){this._parent=O.getElement(t);var i=this._section?this._section.getHidingMethod():"";this._invisibility&&!i||this._setParent(this._parent,e)}},St.prototype.insertBefore=function(t){this._parent?this._scrollFrame?t&&this._parent===t.getParent()?this._insertBefore(t):this._insertBefore(this._scrollFrame):t?this._parent===t.getParent()&&this._insertBefore(t):this._setParent(this._parent):(this._insertBefore(t),this._parent=t.getParent())},St.prototype.enableAutoStyleUpdating=function(t){t=!1!==t,this._autoStyleUpdating!==t&&(this._autoStyleUpdating=t)},St.prototype.setNextSibling=function(t){this._nextSibling=t},St.prototype.isActive=function(){return!(this._invisibility&this._bits[3])},St.prototype.disableDeactivation=function(t){this._deactivation=!1!==t,this._deactivation&&(this.isActive()||this.activate())},St.prototype.activate=function(t){return t=this._pinned||this._deactivation||!1!==t,this.isActive()!==t&&(this.setVisibility(3,t),!0)},St.prototype.deactivate=function(t){this.activate(!1===t)},St.prototype.setCellCount=function(t){var e;for(e=this._cells.length;e<t;++e)this._cells.push(new yt(null,this._section));for(e=this._cells.length;--e>=t;)this._cells[e].dispose();this._cells.length=t,this._cellStart>t?this._cellStart=this._cellEnd=t:this._cellEnd>t&&(this._cellEnd=t)},St.prototype.getCell=function(t){return this._cells[t]||null},St.prototype.collapseCells=function(t,e,i,n,o){if(!(e<=0)){var r=!1,s=this._cells[t];s&&!n&&(r|=s.collapse(i,o));for(var a=1;a<e&&(s=this._cells[t+a]);++a)r|=s.collapse(i,o);r&&(i?e>1&&(this._hasCollapsedCells=!0):this.updateCellOrders())}},St.prototype.uncollapseAllCells=O._deprecatedFunction,St.prototype.activateCells=function(t,e){var i,n=this._element;if(this._hasCollapsedCells)t=this._cellEnd,e>this._cellEnd&&(this._cellEnd=e);else if(this._cellStart===t){var o=this._cellEnd-e;if(o>0){for(i=this._cellEnd;--i>=e;)this._cells[i].removeParent();return void(this._cellEnd=e)}if(!(o<0))return;t=this._cellEnd,this._cellEnd=e}else{for(i=this._cellEnd;--i>=this._cellStart;)this._cells[i].removeParent();this._cellStart=t,this._cellEnd=e}for(i=t;i<e;++i){var r=this._cells[i];r.isKeptInDoc()&&(r.initialize(),n.appendChild(r.getElement()))}},St.prototype.moveCellsToTop=function(t){if(this.isActive()){for(var e=this._element,i=0;i<t;++i){var n=this._cells[i];n.isKeptInDoc()&&e.appendChild(n.getElement())}this._cells=O.cycleArray(this._cells,t)}},St.prototype.updateCellOrders=function(){this._hasCollapsedCells=!1;for(var t=this._element,e=this._cellStart;e<this._cellEnd;++e){var i=this._cells[e];i.isKeptInDoc()?t.appendChild(i.getElement()):this._hasCollapsedCells=!0}},St.prototype.hasCollapsedCells=function(){return this._hasCollapsedCells},St.prototype.getCellIndex=function(t){if(!t)return-1;for(var e=this._cellStart;e<this._cellEnd;++e){if(this._cells[e].getElement()===t)return e}return-1},St.prototype.getSection=function(){return this._section},St.prototype.log=function(){for(var t=[],e=this._cells.length,i=0;i<e;++i)t.push(this._cells[i].getTextContent());return t},St.prototype.getVisibility=function(){return!this._invisibility},St.prototype.setVisibility=function(t,e){var i=!this._invisibility,n=this._bits[t]||1;e?this._invisibility&=~n:this._invisibility|=n;var o=!this._invisibility;if(i!==o)if(this._section?this._section.getHidingMethod():"")this.enableClass("hidden",!o);else if(o){var r=this._parent;if(!r)return;for(var s=this._nextSibling;s;){if(s._parent!==r){s=null;break}if(!s._invisibility)break;s=s._nextSibling}this.insertBefore(s)}else this._setParent(null)},St.prototype.updateLayout=function(){},St.prototype.setScrollState=function(t,e,i){this._scrollFrame=t,this.enableAbsolutePosition(i),this.setParent(e||this._section.getColumnHost()),e||this.activate(),this._pinned=!e},St._proto=St.prototype;var wt=St,bt=function(){this._items=[]};bt.prototype._items=null,bt.prototype.dispose=function(){this._items=null},bt.prototype.setItemCount=function(t){var e=this._items,i=e.length;if(i!==t)for(e.length=t;i<t;)e[i++]={}},bt.prototype.getItem=function(t){return this._items[t]||null},bt.prototype.moveItemsToTop=function(t){this._items=O.cycleArray(this._items,t)};var Rt=bt,It=function(t,e,i){t.setTop(e.getLaneStart(i)),t.setHeight(e.getLaneSize(i))},Dt=function(t,e,i,n){if(i){var o=e.getLaneStart(i);t.setLeft(o),t.setWidth(n-o)}else t.setStyle("left",""),t.setWidth(n)},xt=function(t,e,i){this._trackX=t,this._trackY=e,this._section=i,this._cells=[]};xt.prototype._trackX,xt.prototype._trackY,xt.prototype._section,xt.prototype._cells,xt.prototype._activeCount=0,xt.prototype._stretchSize=0,xt.prototype.dispose=function(){var t=this._cells;if(this._activeCount){this._activeCount=0;for(var e=t.length;--e>=0;){var i=t[e];i&&i.dispose()}}t.length=0},xt.prototype.setStretchSize=function(t){this._stretchSize=t},xt.prototype.getStretchSize=function(){return this._stretchSize},xt.prototype.setCellCount=function(t){var e=this._cells,i=e.length;if(i<t)for(e.length=t;i<t;)e[i++]=null;else if(i>t){for(;--i>=t;){var n=e[i];n&&n.dispose()}e.length=t}},xt.prototype.getCell=function(t){return this._cells[t]||null},xt.prototype.getCells=function(){var t=[];if(this._activeCount){for(var e=this._cells,i=e.length,n=0;n<i;++n){var o=e[n];o&&o.getParent()&&t.push(o)}this._activeCount=t.length}return t},xt.prototype.getColumnIndex=function(t){if(t){if(!t.getElement)return t._colIndex||0;var e=t.getElement();if(e)return e._colIndex||0}return-1},xt.prototype.getRowIndex=function(t){if(t){if(t.getElement)return this._cells.indexOf(t);for(var e=this._cells,i=e.length,n=0;n<i;++n){var o=e[n];if(o&&o.getElement()===t)return n}}return-1},xt.prototype.stretchCell=function(t,e){++this._activeCount,(!e||e<0)&&(e=0);var i=this._cells[t]||null;i||((i=new yt(null,this._section)).addClass("tr-stretched"),i.stretched=!0,this._cells[t]=i);var n=i.getElement();n.stretched=!0,n._colIndex=e;var o=this._stretchSize||this._trackX.getTrackSize();return Dt(i,this._trackX,e,o),It(i,this._trackY,t),i},xt.prototype.unstretchCell=function(t){var e=this._cells[t]||null;return e&&e.setParent(null),e},xt.prototype.unstretchAllCells=function(){if(this._activeCount){this._activeCount=0;for(var t=this._cells,e=t.length;--e>=0;){var i=t[e];i&&i.setParent(null)}}},xt.prototype.updateCells=function(){if(this._activeCount){for(var t=0,e=this._cells,i=e.length,n=this._trackX,o=this._trackY,r=this._stretchSize||n.getTrackSize(),s=0;s<i;++s){var a=e[s];a&&a.getParent()&&(++t,Dt(a,n,a.getElement()._colIndex,r),It(a,o,s))}this._activeCount=t}},xt.prototype.updateXAxis=function(){if(this._activeCount){for(var t=0,e=this._cells,i=e.length,n=this._trackX,o=this._stretchSize||n.getTrackSize(),r=0;r<i;++r){var s=e[r];s&&s.getParent()&&(++t,Dt(s,n,s.getElement()._colIndex,o))}this._activeCount=t}},xt.prototype.updateYAxis=function(){if(this._activeCount){for(var t=0,e=this._cells,i=e.length,n=this._trackY,o=0;o<i;++o){var r=e[o];r&&r.getParent()&&(++t,It(r,n,o))}this._activeCount=t}},xt.prototype.moveCellsToTop=function(t){this._activeCount&&(this._cells=O.cycleArray(this._cells,t),this.updateYAxis())};var At=xt,Tt=function(t,e){this.indexX=t,this.indexY=e};Tt.prototype.isSpanIndices=function(t,e){return t===this.indexX&&e===this.indexY},Tt.prototype.isOccupiedIndices=function(t,e){return t!==this.indexX||e!==this.indexY},Tt.prototype.register=function(t,e){this._register(t,e,!0)},Tt.prototype.unregister=function(t,e){this._register(t,e,!1)},Tt.prototype._register=function(t,e,i){var n=t.indexOf(this);i?n<0&&t.push(this):n>=0&&t.splice(n,1);for(var o=i?this:null,r=this.indexX+this.colSpan,s=this.indexY+this.rowSpan,a=this.indexX;a<r;++a)for(var l=this.indexY;l<s;++l)e[a+","+l]=o},Tt.prototype.indexX,Tt.prototype.indexY,Tt.prototype.colSpan=1,Tt.prototype.rowSpan=1,Tt.prototype.prevColSpan=1,Tt.prototype.prevRowSpan=1,Tt.prototype.retVal=0;var Lt=Tt,Mt=function(){this._spans=[],this._occupiedMap={}};Mt.prototype.removeColumn=function(t){var e=!1;return this.removeSpanByColIndex(t)&&(e=!0),this.shiftColumn(t,-1)&&(e=!0),e},Mt.prototype.shiftColumn=function(t,e){if(this._spans.length<=0||0===e)return!1;for(var i=!1,n=this._spans.length;--n>=0;){var o=this._spans[n];o.indexX>=t&&(i=!0,o.indexX+=e)}if(!i)return!1;var r=this._spans;for(this._spans=[],this._occupiedMap={},n=r.length;--n>=0;)(o=r[n]).indexX>=0&&o.register(this._spans,this._occupiedMap);return!0},Mt.prototype.removeSpan=function(t,e){if(this._spans.length<=0)return null;var i=t+","+e,n=this._occupiedMap[i];return!n||n.isOccupiedIndices(t,e)?null:(n.unregister(this._spans,this._occupiedMap),n)},Mt.prototype.removeSpanByColIndex=function(t,e){var i,n=this._spans.length;if(n<=0)return null;for(var o=e||[],r=0,s=0;s<n;++s)(i=this._spans[s])&&i.indexX===t&&(o.push(i),r++);if(r<=0)return null;for(n=o.length,s=0;s<r;++s)o[n-s-1].unregister(this._spans,this._occupiedMap);return o},Mt.prototype.removeSpanStartedFromRowIndex=function(t,e){var i,n=this._spans.length;if(n<=0)return null;for(var o=e||[],r=0,s=0;s<n;++s)(i=this._spans[s])&&i.indexY>=t&&(o.push(i),r++);if(r<=0)return null;for(n=o.length,s=0;s<r;++s)o[n-s-1].unregister(this._spans,this._occupiedMap);return o},Mt.prototype.clearAllSpans=function(){if(this._spans.length<=0)return null;var t=this._spans;return this._spans=[],this._occupiedMap={},t},Mt.prototype.hasSpan=function(){return this._spans.length>0},Mt.prototype.getSpan=function(t,e){var i=this.getOccupyingSpan(t,e);return i&&i.isSpanIndices(t,e)?i:null},Mt.prototype.getOccupyingSpan=function(t,e){return this._spans.length<=0?null:this._occupiedMap[t+","+e]||null},Mt.prototype.getAllSpans=function(){return this._spans},Mt.prototype.getColSpan=function(t,e){var i=this._occupiedMap[t+","+e];return null==i?1:i.isOccupiedIndices(t,e)?i.indexX-t:i.colSpan},Mt.prototype.getRowSpan=function(t,e){var i=this._occupiedMap[t+","+e];return null==i?1:i.isOccupiedIndices(t,e)?i.indexY-e:i.rowSpan},Mt.prototype.setColSpan=function(t,e,i){return this._updateSpan(t,e,!0,i)},Mt.prototype.setRowSpan=function(t,e,i){return this._updateSpan(t,e,!1,i)},Mt.prototype._updateSpan=function(t,e,i,n){n<1&&(n=1);var o=this.getSpan(t,e);o&&(o.retVal=0);var r,s,a,l,u,h,p=t,d=e,c=o?o.colSpan:1,_=o?o.rowSpan:1,f=!0;if(i){if(c===n)return o;if(c>n)p=t+n,r=t+c,f=!1;else{if((a=this._occupiedMap[t+","+e])&&a!==o)return o;p=t+c,r=t+n}s=e+_}else{if(_===n)return o;if(_>n)d=e+n,s=e+_,f=!1;else{if((a=this._occupiedMap[t+","+e])&&a!==o)return o;d=e+_,s=e+n}r=t+c}if(f){var g=[];for(u=p;u<r;++u)for(h=d;h<s;++h){if(l=u+","+h,this._occupiedMap[l])return o;g.push(l)}for(null==o&&(o=new Lt(t,e),l=t+","+e,this._spans.push(o),this._occupiedMap[l]=o),u=g.length;--u>=0;)this._occupiedMap[g[u]]=o}else{if(i?n+_<=2:n+c<=2){l=t+","+e;var y=this._spans.indexOf(o);this._spans.splice(y,1),this._occupiedMap[l]=null}for(u=p;u<r;++u)for(h=d;h<s;++h)this._occupiedMap[u+","+h]=null}return i?(o.prevColSpan=o.colSpan,o.colSpan=n):(o.prevRowSpan=o.rowSpan,o.rowSpan=n),o.retVal=f?1:-1,o},Mt.prototype._spans,Mt.prototype._occupiedMap;var Et=Mt,Ft=function(){this._selections=[]};Ft.prototype.clone=function(){var t=new Ft;return t._selections=this._selections.concat(),t._count=this._count,t._anchor=this._anchor,t._firstIndex=this._firstIndex,t._lastIndex=this._lastIndex,t},Ft.prototype.toString=function(){return this._selections.join(", ")},Ft.prototype.select=function(t){return!(t<0)&&(!!this._select(t)&&(this._anchor=t,(this._firstIndex<0||t<this._firstIndex)&&(this._firstIndex=t),(this._lastIndex<0||t>this._lastIndex)&&(this._lastIndex=t),!0))},Ft.prototype.deselect=function(t){return!!this._selections[t]&&(this._selections[t]=!1,--this._count,this._anchor===t&&(this._anchor=-1),this._firstIndex===t&&(this._firstIndex=this._findNextSelection(t)),this._lastIndex===t&&(this._lastIndex=this._findPrevSelection(t)),!0)},Ft.prototype.toggleSelection=function(t){this._selections[t]?this.deselect(t):this.select(t)},Ft.prototype.singularlySelect=function(t){return 1!==this._count||t<0?(this.clearAllSelections(),this.select(t),!0):this._firstIndex!==t&&(this._selections[this._anchor]=!1,this._selections[t]=!0,this._anchor=t,this._firstIndex=t,this._lastIndex=t,!0)},Ft.prototype.selectRange=function(t,e){if(0!==e)if(t<0&&(t=0),1!==e&&-1!==e){var i=t,n=i+e;if(e<0&&(i=(n=i+1)+e),!(i>=n)){this._anchor=t,(this._firstIndex<0||i<this._firstIndex)&&(this._firstIndex=i),(this._lastIndex<0||n>=this._lastIndex)&&(this._lastIndex=n-1);for(var o=i;o<n;++o)this._select(o)}}else this.select(t)},Ft.prototype.deselectRange=function(t,e){if(!(this._count<=0))if(t<0&&(t=0),1!==e&&-1!==e){var i=t+e;if(e<0&&(t=(i=t+1)+e),this._firstIndex>=t&&this._lastIndex<i)this.clearAllSelections();else{this._anchor>=t&&this._anchor<i&&(this._anchor=-1),this._firstIndex>=t&&this._firstIndex<i&&(this._firstIndex=this._findNextSelection(i-1)),this._lastIndex>=t&&this._lastIndex<i&&(this._lastIndex=this._findPrevSelection(t));var n=0;for(n=t;n<i;++n)this._selections[n]&&(this._selections[n]=!1,--this._count)}}else this.deselect(t)},Ft.prototype.hasSelection=function(t,e){if(this._count<=0)return!1;var i=t+e;if(e<0&&(t=(i=t+1)+e),i<this._firstIndex||t>this._lastIndex)return!1;for(var n=t;n<i;++n)if(this._selections[n])return!0;return!1},Ft.prototype.getSelection=function(t){return!0===this._selections[t]},Ft.prototype.setSelection=function(t,e){return!1!==e?this.select(t):this.deselect(t)},Ft.prototype.getSelectionAnchor=function(){return this._anchor},Ft.prototype.setSelectionAnchor=function(t){this._anchor=t},Ft.prototype.getSelectionCount=function(){return this._count},Ft.prototype.getFirstSelectedIndex=function(){return this._firstIndex},Ft.prototype.getLastSelectedIndex=function(){return this._lastIndex},Ft.prototype.getAllSelections=function(){if(this._count>0){for(var t=new Array(this._count),e=0,i=this._firstIndex;i<=this._lastIndex;++i)this._selections[i]&&(t[e++]=i);return t}return[]},Ft.prototype.getSelectionMap=function(){return this._selections},Ft.prototype.clearAllSelections=function(){if(this._count>0){return this._selections.length=0,this._count=0,this._anchor=-1,this._firstIndex=-1,this._lastIndex=-1,0}return 0},Ft.prototype.copyFrom=function(t,e,i,n){if(!(n<=0)){var o=e+i;if(null!=t)if(!1!==t.hasSelection(e,n)){for(var r=0;r<n;++r)t._selections[e+r]?this.select(o+r):this.deselect(o+r);this._anchor=-1,t._anchor>=0&&t._anchor>=e&&t._anchor<e+n&&(this._anchor=t._anchor+i)}else this.deselectRange(o,n);else this.deselectRange(o,n)}},Ft.prototype._select=function(t){return!this._selections[t]&&(this._selections[t]=!0,++this._count,!0)},Ft.prototype._findNextSelection=function(t){if(this._lastIndex>=0)for(;++t<=this._lastIndex;)if(this._selections[t])return t;return-1},Ft.prototype._findPrevSelection=function(t){if(this._firstIndex>=0)for(;--t>=this._firstIndex;)if(this._selections[t])return t;return-1},Ft.prototype._selections=null,Ft.prototype._count=0,Ft.prototype._anchor=-1,Ft.prototype._firstIndex=-1,Ft.prototype._lastIndex=-1;var zt=Ft,kt=function(t,e){var i=this;i._onMouseMove=i._onMouseMove.bind(i),i._onMouseOut=i._onMouseOut.bind(i),i._trackX=new vt,i._trackY=new vt,i._trackX.setDefaultLaneSize(100),i._trackY.setDefaultLaneSize(32),i._cellSpans=new Et,i._element=t||document.createElement("div"),i._element.className="tr-lg tr-even-shading",i._ctxRows=new Rt,i._columns=[],i._cells=[],i._highlightedCells=[],i._stretchedCells=new At(i._trackX,i._trackY,i),i._selectionList=new zt,e&&(i._virOwner=e.owner||null),i._addEvent("rowHighlighted"),i._addEvent("rowCountChanged"),i._addEvent("rowHeightChanged"),i._addEvent("rowAvailable")};r.b.inherits(kt,ct),kt.prototype._index=-1,kt.prototype._indexOffset=0,kt.prototype._availableRowCount=0,kt.prototype._activeRow=0,kt.prototype._activeRowEnd=0,kt.prototype._colCount=0,kt.prototype._rowCount=0,kt.prototype._hiddenRowCount=0,kt.prototype._trackX,kt.prototype._trackY,kt.prototype._cellSpans,kt.prototype._columns,kt.prototype._firstColumn,kt.prototype._lastColumn,kt.prototype._rightSpace,kt.prototype._frozenLayout=!1,kt.prototype._rowHighlightEnabled=!1,kt.prototype._rowHighlightIndex=-1,kt.prototype._highlightedCells,kt.prototype._coverLayer=null,kt.prototype._stretchedCells=null,kt.prototype._ctx=null,kt.prototype._selectionList,kt.prototype._colVir=!1,kt.prototype._initialized=!1,kt.prototype._hidingMethod="",kt.prototype._virOwner=null,kt.prototype._transformIETimer=0,kt.prototype._ctxRows,kt.prototype.dispose=function(){this.setRowCount(0),this.unlistenAll(),this._ctxRows.dispose(),this._stretchedCells.dispose();for(var t=this._columns.length;--t>=0;)this._columns[t].dispose();this._colCount=this._rowCount=this._activeRowEnd=this._availableRowCount=0,this._highlightedCells.length=0,this._ctx=null,this._dispose()},kt.prototype.getWidth=function(){return!1===this.isVisible()?0:this.getContentWidth()},kt.prototype.setWidth=function(t){if(t<0)return!1;var e=this._rightSpace?this._rightSpace.offsetWidth:0;return null!=this._trackX.setTrackSize(t,e)&&(this._syncLayoutToColumns(0),!0)},kt.prototype.getHeight=function(){return this.isVisible()?this.getContentHeight():0},kt.prototype.setHeight=function(t){return!(t<0)&&(null==this._trackY.setTrackSize(t,0)||this._syncLayoutToRows(0,this._rowCount),!0)},kt.prototype.show=function(t){this._element.style.display=!1!==t?"":"none",this._trackY.show(t),this.setFrozenLayout(!1===t),this._dispatchRowHeightChangedEvent(0,this._rowCount)},kt.prototype.hitTest=function(t,e,i){if(t<0)return null;if(e<0)return null;if(t>=this.getWidth())return null;if(e>=this.getHeight())return null;var n=this._trackX.hitTest(t);if(n<0)return null;var o=this._trackY.hitTest(e);if(o<0)return null;var r={};if(r.colIndex=n,r.rowIndex=o,!0!==i){var s=this._cellSpans.getOccupyingSpan(n,o);s&&(r.colIndex=s.indexX,r.rowIndex=s.indexY)}return r},kt.prototype.hitTestX=function(t){return t<0?-1:t>=this.getWidth()?~this._colCount:this._trackX.hitTest(t)},kt.prototype.hitTestY=function(t){return t<0?-1:t>=this.getHeight()?~this._rowCount:this._trackY.hitTest(t)},kt.prototype.getDefaultColumnWidth=function(){return this._trackX.getDefaultLaneSize()},kt.prototype.setDefaultColumnWidth=function(t){this._trackX.getDefaultLaneSize()!==t&&(this._trackX.setDefaultLaneSize(t),this._syncLayoutToColumns(0))},kt.prototype.getDefaultRowHeight=function(){return this._trackY.getDefaultLaneSize()},kt.prototype.setDefaultRowHeight=function(t){if(this._trackY.getDefaultLaneSize()!==t){this._trackY.setDefaultLaneSize(t);for(var e=0;e<this._colCount;++e)this._columns[e].setHeight(t);this._syncLayoutToRows(0,this._rowCount),this._dispatchRowHeightChangedEvent(0,this._rowCount)}},kt.prototype.getColumnWidth=function(t){return this._trackX.getLaneSize(t)},kt.prototype.setColumnWidth=function(t,e){return!!this._setColumnWidth(t,e)&&(this._syncLayoutToColumns(t),!0)},kt.prototype._setColumnWidth=function(t,e){return this._trackX.setLaneSize(t,e)},kt.prototype._updateColumnLayout=function(){this._syncLayoutToColumns(0)},kt.prototype.getRowHeight=function(t){return this._trackY.getLaneSize(t)},kt.prototype.setRowHeight=function(t,e){if(t<0||t>=this._rowCount)return!1;var i=this._trackY.setLaneSize(t,e);return this._syncLayoutToRows(t,t+1),i&&this._dispatchRowHeightChangedEvent(t,t+1),this._resetTransformIETimer(),i},kt.prototype._updateRowHeights=function(t,e){for(var i=0,n=0;n<this._rowCount;++n){var o=t.getLaneSize(e);i|=this._trackY.setLaneSize(n,o),++e}return this._syncLayoutToRows(0,this._rowCount),i},kt.prototype.isColumnVisible=function(t){return this._trackX.isLaneVisible(t)},kt.prototype.hideColumn=function(t,e){return this.setColumnVisibility(t,!1===e,0)},kt.prototype.isRowVisible=function(t){return this._trackY.isLaneVisible(t)},kt.prototype.hideRow=function(t,e){return!!this._trackY.hideLane(t,e)&&(null!=e&&!e||this.isRowVisible(t)?this.isRowVisible(t)&&this._hiddenRowCount--:this._hiddenRowCount++,this._syncLayoutToRows(t,this._rowCount),this._dispatchRowHeightChangedEvent(t,t+1),!0)},kt.prototype.getMinimumColumnWidth=function(t){return this._trackX.getMinimumLaneSize(t)},kt.prototype.setMinimumColumnWidth=function(t,e){return!!this._trackX.setMinimumLaneSize(t,e)&&(this._syncLayoutToColumns(t),!0)},kt.prototype.getMinimumRowHeight=function(t){return this._trackY.getMinimumLaneSize(t)},kt.prototype.setMinimumRowHeight=function(t,e){return!!this._trackY.setMinimumLaneSize(t,e)&&(this._syncLayoutToRows(t,this._rowCount),this._dispatchRowHeightChangedEvent(t,t+1),!0)},kt.prototype.getCellLeft=function(t){return this._trackX.getLaneStart(t)},kt.prototype.getCellTop=function(t){return this._trackY.getLaneStart(t)},kt.prototype.getCellWidth=function(t,e){var i=this._cellSpans.getOccupyingSpan(t,e);if(i){var n=this._trackX.getLaneStart(i.indexX);return this._trackX.getLaneEnd(i.indexX+i.colSpan-1)-n}return this.getColumnWidth(t)},kt.prototype.getCellHeight=function(t,e){var i=this._cellSpans.getOccupyingSpan(t,e);if(i){var n=this._trackY.getLaneStart(i.indexY);return this._trackY.getLaneEnd(i.indexY+i.rowSpan-1)-n}return this.getRowHeight(e)},kt.prototype.hasCellSpan=function(){return this._cellSpans.hasSpan()},kt.prototype.getCellRowSpan=function(t,e){return this._cellSpans.getRowSpan(t,e)},kt.prototype.setCellRowSpan=function(t,e,i){var n=this._cellSpans.setRowSpan(t,e,i);if(this._updateCellSpanSize(t,e,n),n)return n.retVal>=0?this._updateCellSpanClass(t,e,n.colSpan,n.rowSpan,!0):n.colSpan>1?(this._updateCellSpanClass(t,e,n.colSpan,n.prevRowSpan,!1),this._updateCellSpanClass(t,e,n.colSpan,n.rowSpan,!0)):this._updateCellSpanClass(t,e,n.colSpan,n.prevRowSpan,!1),0!==n.retVal;var o=this._getCell(t,e);return o&&o._rowSpan>1&&this._updateCellSpanClass(t,e,o._colSpan,o._rowSpan,!1),!1},kt.prototype.getCellColSpan=function(t,e){return this._cellSpans.getColSpan(t,e)},kt.prototype.setCellColSpan=function(t,e,i){var n=this._cellSpans.setColSpan(t,e,i);if(this._updateCellSpanSize(t,e,n),n)return n.retVal>=0?this._updateCellSpanClass(t,e,n.colSpan,n.rowSpan,!0):n.colSpan>1?(this._updateCellSpanClass(t,e,n.prevColSpan,n.rowSpan,!1),this._updateCellSpanClass(t,e,n.colSpan,n.rowSpan,!0)):this._updateCellSpanClass(t,e,n.prevColSpan,n.rowSpan,!1),0!==n.retVal;var o=this._getCell(t,e);return o&&o._colSpan>1&&this._updateCellSpanClass(t,e,o._colSpan,o._rowSpan,!1),!1},kt.prototype.clearCellSpans=function(){var t=this._cellSpans.clearAllSpans();if(null==t)return!1;for(var e=t.length;--e>=0;){var i=t[e];this._updateCellSpan(i.indexX,i.indexY,i,!1)}return!0},kt.prototype.clearColumnSpans=function(t){var e=this._cellSpans.removeSpanByColIndex(t);if(null==e)return!1;for(var i=e.length;--i>=0;){var n=e[i];this._updateCellSpan(n.indexX,n.indexY,n,!1)}return!0},kt.prototype.clearColumnCustomizations=function(){this._trackX.clearLaneCustomizations(),this._syncLayoutToColumns(0)},kt.prototype.clearRowCustomizations=function(){this._trackY.clearLaneCustomizations(),this._syncLayoutToRows(0,this._rowCount)},kt.prototype.getColumnScalability=function(t){return this._trackX.getLaneScalability(t)},kt.prototype.setColumnScalability=function(t,e){return this._trackX.setLaneScalability(t,e)},kt.prototype.getRowScalability=function(t){return this._trackY.getLaneScalability(t)},kt.prototype.setRowScalability=function(t,e){return this._trackY.setLaneScalability(t,e)},kt.prototype.getCell=function(t,e,i){if(i&&this._cellSpans.hasSpan()){var n=this._cellSpans.getColSpan(t,e),o=this._cellSpans.getRowSpan(t,e);n<0&&(t+=n),o<0&&(e+=o)}return this._getCell(t,e)},kt.prototype.getCellContent=function(t,e){var i=this.getCell(t,e);return null!==i?i.getContent():null},kt.prototype.setCellContent=function(t,e,i){var n=this.getCell(t,e);return null==n?(window.console.log("Error: Accessing nonexistent cell in Grid's Table"),null):n.setContent(i)},kt.prototype.getColumnCount=function(){return this._colCount},kt.prototype.setColumnCount=function(t){if(t<0&&(t=0),this._colCount!==t){var e=this._colCount;this._trackX.setLaneCount(t),this._colCount=this._trackX.getLaneCount();var i=0,n=null;if(e>t)for(i=e;--i>=t;)(n=this._columns.pop()).dispose(),n===this._firstColumn&&(this._firstColumn=null),n===this._lastColumn&&(this._lastColumn=null);else for(i=e;i<t;++i)n=this._newColumn(i);for(this._updateColumnIndices(),i=e;i<t;++i)this._columns[i].activate(!this._colVir);t<=0&&this._selectionList.clearAllSelections()}},kt.prototype.getRowCount=function(){return this._rowCount},kt.prototype.setRowCount=function(t,e){if(t<0&&(t=0),this._rowCount!==t){var i,n=this._rowCount;for(this._trackY.setLaneCount(t),this._rowCount=this._trackY.getLaneCount(),this._ctxRows.setItemCount(t),this._stretchedCells.setCellCount(t),i=0;i<this._colCount;++i)this._columns[i].setCellCount(t);if(n>t)if(t<this._rowHighlightIndex&&this.setRowHighlight(-1),t<this._activeRowEnd&&(this._activeRowEnd=t),t<this._availableRowCount&&(this._availableRowCount=t),this._cellSpans.removeSpanStartedFromRowIndex(t),this._updateViewHeight(),t>0)for(var o=t;o<n;++o)this._selectionList.deselect(o);else this._selectionList.clearAllSelections();else this._syncLayoutToRows(n,t);var r={};r.prevCount=n,r.rowCount=this._rowCount,this._dispatch("rowCountChanged",r),n<t&&this._insertCells(0,this._rowCount)}},kt.prototype.getVisibleRowCount=function(){return this._rowCount-this._hiddenRowCount},kt.prototype.addRow=function(t){t<=0||(this._colCount<=0?window.console.log("WARNING: Row cannot be added, unless at least one column is added"):this.setRowCount(this._rowCount+t))},kt.prototype.removeRow=function(t){t<=0||(t>this._rowCount&&(t=this._rowCount),this.setRowCount(this._rowCount-t))},kt.prototype.setBorders=function(t,e,i,n){},kt.prototype.getColumnStyle=function(t,e){var i=this._columns[t];return i?i.getStyle(e):null},kt.prototype.setColumnStyle=function(t,e,i){var n=this._columns[t];n&&n.setStyle(e,i)},kt.prototype.enableColumnClass=function(t,e,i){var n=this._columns[t];n&&n.enableClass(e,i)},kt.prototype.hasColumnClass=function(t,e){var i=this._columns[t];return!!i&&i.hasClass(e)},kt.prototype.enableRowClass=function(t,e,i){if(t>=0&&t<this._rowCount)for(var n=0;n<this._colCount;++n)this._columns[n].getCell(t).enableClass(e,i)},kt.prototype.setRowStyle=function(t,e,i,n){if(t>=0&&t<this._rowCount){i&&(null==n||n)||(i="");for(var o=0;o<this._colCount;++o)this._columns[o].getCell(t).setStyle(e,i)}},kt.prototype.getRelativePosition=function(t){return O.getRelativePosition(t,this._element)},kt.prototype.getContentWidth=function(){return this._trackX.getTrackSize()},kt.prototype.getContentHeight=function(){var t=this._trackY.getTrackSize();if(t<=0&&this._colCount*this.getVisibleRowCount()>0){var e=this._columns[0],i=e.getCell(this._rowCount-1);return i.getTop()+i.getHeight()-e.getCell(0).getTop()}return t},kt.prototype.getCellsByRowIndex=function(t){if(t<0||t>=this._rowCount)return null;for(var e=new Array(this._colCount),i=0;i<this._colCount;++i)e[i]=this._columns[i].getCell(t);return e},kt.prototype.disableHorizontalGridLine=function(t){this.enableClass("no-horizontal-grid-line",!1!==t)},kt.prototype.disableVerticalGridLine=function(t){this.enableClass("no-vertical-grid-line",!1!==t)},kt.prototype.enableShading=function(t){!1!==t?this.addClass("tr-even-shading"):(this.removeClass("tr-even-shading"),this.removeClass("tr-odd-shading"))},kt.prototype.setTransposedShading=function(t){this.enableClass("transposed-shading",!1!==t)},kt.prototype.enableRowHighlighting=function(t){null==t&&(t=!0),this._rowHighlightEnabled!==t&&(this._rowHighlightEnabled=t,this._rowHighlightEnabled?(this.listen("mousemove",this._onMouseMove),this.listen("mouseout",this._onMouseOut)):(this.setRowHighlight(-1),this.unlisten("mousemove",this._onMouseMove),this.unlisten("mouseout",this._onMouseOut)))},kt.prototype.getRowHighlight=function(){return this._rowHighlightIndex},kt.prototype.setRowHighlight=function(t){if((!this._rowHighlightEnabled||t<-1||t>=this._rowCount)&&(t=-1),this._rowHighlightIndex!==t){var e=this._rowHighlightIndex;this._rowHighlightIndex=t;for(var i=this._highlightedCells.length;--i>=0;)this._highlightedCells[i].removeClass("highlighted-row");if(t>=0&&t<this._rowCount){this._highlightedCells.length=this._colCount;for(var n=this._colCount;--n>=0;){var o=this._columns[n].getCell(t);this._highlightedCells[n]=o,o.addClass("highlighted-row")}}else this._highlightedCells.length=0;if(this._hasListener("rowHighlighted")){var r={};r.prevRowIndex=e,r.rowIndex=t,this._dispatch("rowHighlighted",r)}}},kt.prototype.getSelectedRows=function(){return this.getSelectedRowCount()>0?this._selectionList.getAllSelections():null},kt.prototype.getSelectedRowCount=function(){return this._selectionList.getSelectionCount()},kt.prototype.isSelectedRow=function(t){return this._selectionList.getSelection(t)},kt.prototype.setSelectedRow=function(t,e){t<0||t>=this._rowCount||(this._selectionList.setSelection(t,e),this._updateSelectionUI(t))},kt.prototype.selectSingleRow=function(t){t<0||t>=this._rowCount||(this.clearSelectedRows(),this._selectionList.select(t),this._addSelectionUI(t))},kt.prototype.selectRowRange=function(t,e){if(!(t<0||t>=this._rowCount)){t+e>this._rowCount&&(e=this._rowCount-t),this._selectionList.selectRange(t,e);for(var i=0;i<e;++i)this._addSelectionUI(i+t)}},kt.prototype.clearSelectedRows=function(){var t=this._selectionList.getSelectionCount();if(t){var e=this._selectionList.getAllSelections();this._selectionList.clearAllSelections();for(var i=0;i<t;++i)this._removeSelectionUI(e[i]);return t}return 0},kt.prototype.getFirstSelectedRow=function(){return this._selectionList.getFirstSelectedIndex()},kt.prototype.getLastSelectedRow=function(){return this._selectionList.getLastSelectedIndex()},kt.prototype.getRowAnchor=function(){return this._selectionList.getSelectionAnchor()},kt.prototype.setRowAnchor=function(t){this._selectionList.setSelectionAnchor(t)},kt.prototype.activateColumn=function(t,e){var i=this._columns[t];if(i){var n=i.activate(e);if(e&&n&&this._rightSpace){var o=this._rightSpace.parentNode;o&&o.appendChild(this._rightSpace)}}},kt.prototype.activateRows=function(){this._onEnterDocument()},kt.prototype.moveRowsToTop=function(t){this._ctxRows.moveItemsToTop(t),this._stretchedCells.moveCellsToTop(t);for(var e=0;e<this._colCount;++e)this._columns[e].moveCellsToTop(t)},kt.prototype.getFirstIndexInView=function(){return 0},kt.prototype.getLastIndexInView=function(){return this._availableRowCount-1},kt.prototype.isInCurrentView=function(t){return 0!==this._rowCount&&(t>=0&&t<this._rowCount)},kt.prototype.getFrozenLayout=function(){return this._frozenLayout},kt.prototype.setFrozenLayout=function(t){this.isVisible()||(t=!0),this._frozenLayout!==t&&(this._frozenLayout=t,this._frozenLayout||(this._syncLayoutToColumns(0),this._syncLayoutToRows(0,this._rowCount),this._dispatchRowHeightChangedEvent(0,this._rowCount)))},kt.prototype.getColumn=function(t){return this._columns[t]||null},kt.prototype.insertColumn=function(t,e){t<0?t=0:t>this._colCount&&(t=this._colCount);var i=t<this._colCount,n=this._cellSpans.getAllSpans();this._updateCellSpans(n,!1),this._trackX.insertLane(t,e),this._colCount=this._trackX.getLaneCount();var o=this._newColumn(t);if(this._updateColumnIndices(),this._cellSpans.shiftColumn(t,1)&&(n=this._cellSpans.getAllSpans()),this._updateCellSpans(n,!0),this._calculateStretchSize(!0),this._stretchedCells.updateXAxis(),this._selectionList.getSelectionCount())for(var r=this._selectionList.getAllSelections(),s=r.length;--s>=0;){var a=o.getCell(r[s]);a&&a.addClass("selected-row")}return o.activate(i||!this._colVir),o},kt.prototype.removeColumnAt=function(t){var e=this._trackX.removeLaneAt(t);if(null==e)return null;var i=this._cellSpans.getAllSpans();this._updateCellSpans(i,!1),this._colCount=this._trackX.getLaneCount();var n=this._columns.splice(t,1)[0];return n.dispose(),e.control=n,this._updateColumnIndices(),this._cellSpans.removeColumn(t)&&(i=this._cellSpans.getAllSpans()),this._updateCellSpans(i,!0),this._syncLayoutToColumns(t),t>=this._colCount&&this._updateViewWidth(),e},kt.prototype.moveColumn=function(t,e){if(t<0)t=0;else if(t>=this._colCount)return;if(e<0?e=0:e>=this._colCount&&(e=this._colCount-1),t!==e){var i=this._cellSpans.getAllSpans();this._updateCellSpans(i,!1),this._trackX.moveLane(t,e);var n=this._columns[t];O.moveArrayItem(this._columns,t,e);var o=this._columns[e+1]||null;if(n.insertBefore(o),this._rightSpace){var r=this._rightSpace.parentNode;r&&r.appendChild(this._rightSpace)}this._updateColumnIndices(),this._updateCellSpans(i,!0);var s=t<e?t:e;this._syncLayoutToColumns(s)}},kt.prototype.enableRowVirtualization=function(){console.log("WARNING: This function is deprecated")},kt.prototype.enableColumnVirtualization=function(t){this._colVir=!1!==t},kt.prototype.getColumnIndex=function(t){if(t){if(t.stretched)return this._stretchedCells.getColumnIndex(t);for(var e=this._columns.length,i=0;i<e;++i)if(this._columns[i].getElement()===t)return i}return-1},kt.prototype.getCellIndex=function(t,e){if(e){if(e.stretched)return this._stretchedCells.getRowIndex(e);var i=this._columns[t];if(i)return i.getCellIndex(e)}return-1},kt.prototype.getIndex=function(){return this._index},kt.prototype.setIndex=function(t){this._index=t},kt.prototype.getRowOffset=function(){return this._rowOffset},kt.prototype.setRowOffset=function(t){this._rowOffset=t},kt.prototype.updateLayout=function(){},kt.prototype.stretchCell=function(t,e,i,n){var o=-1;if("number"==typeof t?(o=t,null==e&&(e=0)):t&&(t.stretched?(o=this._stretchedCells.getColumnIndex(t),null==e&&(e=this._stretchedCells.getRowIndex(t))):t.getParent&&(o=this.getColumnIndex(t.getParent()))),o<0||e<0||null==e)return null;var r=null;if(!1!==i){var s=this._coverLayer;s||((s=this._coverLayer=document.createElement("div")).className="cover-layer",this._updateLayers()),this._calculateStretchSize(),(r=this._stretchedCells.stretchCell(e,n?o:0)).setParent(s)}else r=this._stretchedCells.unstretchCell(e);return r},kt.prototype.unstretchCell=function(t,e){return this.stretchCell(t,e,!1)},kt.prototype.unstretchAllCells=function(){this._stretchedCells.unstretchAllCells()},kt.prototype.getStretchedCell=function(t,e){return null==e&&(e="number"==typeof t?t:this._stretchedCells.getRowIndex(t)),"number"==typeof e?this._stretchedCells.getCell(e):null},kt.prototype.getStretchedCells=function(){return this._stretchedCells.getCells()},kt.prototype.updateStretchedCells=function(){this._updateLayers();var t=this._coverLayer?this._coverLayer.children.length:0;return!(t<=0)&&(this._calculateStretchSize(!0),this._stretchedCells.updateCells(),!!t)},kt.prototype._calculateStretchSize=function(t){var e=this._ctx,i=t?0:this._stretchedCells.getStretchSize();if(!i&&e&&e.getWidth){i=e.getWidth();var n=this.getContentWidth();n<i&&(i=n),this._stretchedCells.setStretchSize(i)}},kt.prototype.getColumnHost=function(){return this._element},kt.prototype.setHidingMethod=function(t){this._hidingMethod=t},kt.prototype.getHidingMethod=function(){return this._hidingMethod},kt.prototype.setColumnVisibility=function(t,e,i){return!!this._trackX.hideLane(t,!e,i)&&(this._syncLayoutToColumns(t),!0)},kt.prototype.getRowLayout=function(){return this._trackY},kt.prototype.reserveRightSpace=function(t){if(t&&t>0){if(!this._rightSpace){var e=this._rightSpace=document.createElement("div");e.className="tr-reserved-space",e.style.height=this.getContentHeight()+"px",this._updateLayers()}this._rightSpace.style.width=t+"px",this._updateViewWidth()}else if(this._rightSpace){var i=this._rightSpace.parentNode;i&&i.removeChild(this._rightSpace),this._rightSpace=null,this._updateViewWidth()}return this._rightSpace},kt.prototype._updateRightSpaceStyle=function(t){var e=this._rightSpace;t?(e.style.top=this._trackY.getLaneStart(this._activeRow)+"px",e.style.left=this._trackX.getLaneStart(this._colCount)+"px",e.style.position="",e.style.display=""):(e.style.position="static",e.style.display="inline-block")},kt.prototype._updateLayers=function(){if(this._rightSpace){var t=this._rightSpace.parentNode;t?t.appendChild(this._rightSpace):this._element.appendChild(this._rightSpace)}this._coverLayer&&this._element.appendChild(this._coverLayer)},kt.prototype.getReservedSpace=function(){return this._rightSpace},kt.prototype.getComputedStyle=function(){var t=this._element;return t.offsetParent?getComputedStyle(t):null},kt.prototype.isColumnActive=function(t){var e=this._columns[t];return!!e&&e.isActive()},kt.prototype.setRowAttributes=function(t,e){if(!(t<0||t>=this._rowCount))for(var i=0;i<this._colCount;++i)for(var n=e(i),o=n.length;--o>=0;){var r=n[o],s=this._columns[i].getCell(t);s&&(r.remove?s.removeAttribute(r.attribute):s.setAttribute(r.attribute,r.value))}},kt.prototype.getContextRow=function(t){return this._ctxRows.getItem(t)},kt.prototype._getCell=function(t,e){var i=this._columns[t];return i?i.getCell(e):null},kt.prototype._insertCells=function(t,e){this._activeRow=t,this._activeRowEnd=e;for(var i=this._trackY.getLaneStart(t),n=0;n<this._colCount;++n){var o=this._columns[n];o.hasCollapsedCells()||o.setTop(i),o.activateCells(t,e)}if(this._rightSpace&&(this._rightSpace.style.top=i+"px"),e>this._availableRowCount){var r={};r.prevRowIndex=this._availableRowCount,r.rowIndex=e,this._availableRowCount=e,this._dispatch("rowAvailable",r)}},kt.prototype._newColumn=function(t){var e=new wt(this._virOwner||this);e.setHeight(this._trackY.getDefaultLaneSize()),e.setCellCount(this._rowCount),e.setTop(this._trackY.getLaneStart(this._activeRow)),e.activateCells(this._activeRow,this._activeRowEnd);for(var i=0;i<this._rowCount;++i)this._trackY.isAtDefaultSize(i)||e.getCell(i).setHeight(this._trackY.getLaneSize(i));if(t>=this._columns.length)this._columns.push(e),e.setParent(this._element);else{this._columns.splice(t,0,e);var n=this._columns[t+1];e.insertBefore(n)}if(this._rightSpace){var o=this._rightSpace.parentNode;o&&o.appendChild(this._rightSpace)}return e},kt.prototype._updateViewWidth=function(){if(!this._frozenLayout){this._calculateStretchSize(!0),this._stretchedCells.updateXAxis();var t=this.getContentWidth();this._rightSpace&&(t+=this._rightSpace.offsetWidth),this._element.style.width=t+"px"}},kt.prototype._updateViewHeight=function(){if(!this._frozenLayout){var t=this.getContentHeight();this._element.style.height=t+"px",this._rightSpace&&(this._rightSpace.style.height=t+"px")}},kt.prototype._updateColumnIndices=function(){var t=this._columns.length,e=this._columns[0];e!==this._firstColumn&&(this._firstColumn&&this._firstColumn.removeClass("first"),this._firstColumn=e,this._firstColumn&&this._firstColumn.addClass("first"));var i=this._columns[t-1];i!==this._lastColumn&&(this._lastColumn&&this._lastColumn.removeClass("last"),this._lastColumn=i,this._lastColumn&&this._lastColumn.addClass("last"));for(var n=null,o=this._columns.length;--o>=0;){var r=this._columns[o];r.setNextSibling(n),n=r}},kt.prototype._syncLayoutToColumns=function(t){if(this._frozenLayout)return!1;if(this._rightSpace&&(this._rightSpace.style.left=this._trackX.getLaneStart(this._colCount)+"px"),t>=this._colCount)return!1;for(var e=t;e<this._colCount;++e){var i=this._columns[e];i.setLeft(this._trackX.getLaneStart(e)),i.setWidth(this._trackX.getLaneSize(e))}return this._updateCellSpanLayout(this._cellSpans.getAllSpans()),this._updateViewWidth(),!0},kt.prototype._syncLayoutToRows=function(t,e){if(!this._frozenLayout){for(var i=t;i<e;++i)for(var n=this._trackY.isAtDefaultSize(i)?-1:this._trackY.getLaneSize(i),o=0;o<this._colCount;++o)this._columns[o].getCell(i).setHeight(n);this._stretchedCells.updateYAxis(),t?this._updateCellSpanLayout(this._cellSpans.getAllSpans()):this._updateCellSpans(this._cellSpans.getAllSpans(),!0),this._updateViewHeight()}},kt.prototype._dispatchRowHeightChangedEvent=function(t,e){if(this._hasListener("rowHeightChanged")&&!(t>=e)){var i={};i.rowIndex=t,i.changeLength=e-t,this._dispatch("rowHeightChanged",i)}},kt.prototype._updateCellSpanSize=function(t,e,i){var n=this._getCell(t,e);if(null!=n)if(i&&i.colSpan>1?(n.setWidth(this.getCellWidth(t,e)),this._columns[t].disableDeactivation()):n.setWidth(-1),i&&i.rowSpan>1)n.setHeight(this.getCellHeight(t,e));else{var o=this._trackY.isAtDefaultSize(e)?-1:this._trackY.getLaneSize(e);n.setHeight(o)}},kt.prototype._updateCellSpanLayout=function(t){if(null!=t)for(var e=t.length;--e>=0;){var i=t[e];this._updateCellSpanSize(i.indexX,i.indexY,i)}},kt.prototype._updateCellSpan=function(t,e,i,n){this._updateCellSpanSize(t,e,n?i:null),this._updateCellSpanClass(t,e,i.colSpan,i.rowSpan,n)},kt.prototype._updateCellSpanClass=function(t,e,i,n,o){for(var r,s=0;s<i&&(r=this._columns[t+s]);++s)r.collapseCells(e,n,o,0===s,s>0);var a=this._getCell(t,e);a&&(a._colSpan=o?i:1,a._rowSpan=o?n:1)},kt.prototype._updateCellSpans=function(t,e){if(null!=t)for(var i=t.length;--i>=0;){var n=t[i];this._updateCellSpan(n.indexX,n.indexY,n,e)}},kt.prototype._onMouseMove=function(t){var e=t.target,i=O.closestElement(e,"column"),n=this.getColumnIndex(i),o=n>=0?O.closestElement(e,"cell"):null;this.setRowHighlight(this.getCellIndex(n,o))},kt.prototype._onMouseOut=function(t){var e=t.relatedTarget;if(e)for(var i=this._element;null!==e.parentNode;)if((e=e.parentNode)===i)return;this.setRowHighlight(-1)},kt.prototype._updateSelectionUI=function(t){for(var e=this._selectionList.getSelection(t),i=0;i<this._colCount;++i){var n=this._columns[i].getCell(t);n&&n.enableClass("selected-row",e)}},kt.prototype._addSelectionUI=function(t){for(var e=0;e<this._colCount;++e){var i=this._columns[e].getCell(t);i&&i.addClass("selected-row")}},kt.prototype._removeSelectionUI=function(t){for(var e=0;e<this._colCount;++e){var i=this._columns[e].getCell(t);i&&i.removeClass("selected-row")}},kt.prototype._onEnterDocument=function(){if(!this._initialized&&this.getParent()){for(var t=0;t<this._colCount;++t)this._columns[t].enableAutoStyleUpdating();this._syncLayoutToColumns(0),this._initialized=!0}},kt.prototype._setContext=function(t){this._ctx=t},kt.prototype._getContext=function(){return this._ctx},kt.prototype._resetTransformIETimer=function(){O.isIE&&(this._transformIETimer||(this.enableClass("reset-transform"),this._transformIETimer=setTimeout(this._onResetTransformIE.bind(this),20)))},kt.prototype._onResetTransformIE=function(){this._transformIETimer=0,this.enableClass("reset-transform",!1)},kt._proto=kt.prototype;var Pt=kt,Vt=function(t,e){this._onDataChanged=this._onDataChanged.bind(this),this._refs=[],t&&(this._dt=t,this._dt.listen("dataChanged",this._onDataChanged,0)),e&&(this._field=e)};Vt.prototype.dispose=function(){this._dt&&(this._dt.unlisten("dataChanged",this._onDataChanged),this._dt=null)},Vt.prototype.setDataSource=function(t){this._dt!==t&&(this._dt&&this._dt.unlisten("dataChanged",this._onDataChanged),this._dt=t,this._dt&&this._dt.listen("dataChanged",this._onDataChanged,0),this._requestRecalculation())},Vt.prototype.setField=function(t){this._field!==t&&(this._field=t,this._requestRecalculation())},Vt.prototype.disableOnDemandMode=function(t){var e=!1===t;this._onDemandMode!==e&&(this._onDemandMode=e,this._requestRecalculation())},Vt.prototype.setColumnDataGetter=function(t){this._colDataGetter!==t&&(this._colDataGetter=t,this._requestRecalculation())},Vt.prototype.getColumnDataGetter=function(){return this._colDataGetter},Vt.prototype.getSum=function(){return this._updateStats(),this._sum},Vt.prototype.getDataCount=function(){return this._updateStats(),this._count},Vt.prototype.getMin=function(){return this._updateStats(),this._min},Vt.prototype.getMax=function(){return this._updateStats(),this._max},Vt.prototype.getAbsoluteMax=function(){this._updateStats();var t=this._max>=0?this._max:-this._max,e=this._min>=0?this._min:-this._min;return t>=e?t:e},Vt.prototype.getAverage=function(){return this._updateStats(),this._sum/this._count},Vt.prototype.getMean=Vt.prototype.getAverage,Vt.prototype.getMidRange=function(){return this._updateStats(),.5*(this._max+this._min)},Vt.prototype.getCachedColumnData=function(){return this._dirty?this._recalculate():this._cacheData||(this._cacheData=this._getColData()),this._cacheData},Vt.prototype.markDirty=function(){return!!this._onDemandMode&&(this._dirty=!0,this._dirty)},Vt.prototype._getColData=function(){return this._colDataGetter?this._colDataGetter(this._field,this._dt):this._dt.getColumnData(this._field)},Vt.prototype._requestRecalculation=function(){this.markDirty()||this._recalculate()},Vt.prototype._updateStats=function(){this._dirty&&this._recalculate()},Vt.prototype._recalculate=function(){if(this._dirty=!1,this._cacheData=null,this._sum=0,this._min=NaN,this._max=NaN,this._count=0,this._dt&&this._field){var t=this._cacheData=this._getColData(),e=t.length;if(e){for(var i,n=Vt._isDataNumeric,o=0;o<e;)if(n(i=+t[o++])){this._sum=this._min=this._max=i,++this._count;break}for(;o<e;)n(i=+t[o])&&(this._sum+=i,i<this._min?this._min=i:i>this._max&&(this._max=i),++this._count),++o}}},Vt.prototype._onDataChanged=function(t){if(t.rid){if(!this._colDataGetter&&t.changes&&null==t.changes[this._field])return;if(this.markDirty())return;this._updateRowData(t.rid)}else if(t.rids){if(this.markDirty())return;var e=t.rids;1===e.length?this._updateRowData(e[0]):this._recalculate()}else if(t.globalChange){if(t.positionChangeOnly)return void(this._cacheData=null);this._requestRecalculation()}},Vt.prototype._updateRowData=function(t){var e=this._dt.getPreviousData(t,this._field),i=this._dt.getData(t,this._field);if(e!==i){var n=Vt._isDataNumeric(i);if(Vt._isDataNumeric(e)){if(this._min===e&&(!n||i>this._min))return void this._recalculate();if(this._max===e&&(!n||i<this._max))return void this._recalculate();this._sum-=e,--this._count}n&&(this._sum+=i,i>=this._min||(this._min=i),i<=this._max||(this._max=i),++this._count)}},Vt._isDataNumeric=function(t){return"number"==typeof t&&t==t},Vt.prototype.addRef=function(t){return t&&this._refs.indexOf(t)<0&&this._refs.push(t),this._refs.length},Vt.prototype.deRef=function(t){if(t){var e=this._refs.indexOf(t);e>=0&&this._refs.splice(e,1)}return this._refs.length},Vt.prototype.getRefCount=function(){return this._refs.length},Vt.prototype._dt=null,Vt.prototype._field="",Vt.prototype._onDemandMode=!0,Vt.prototype._dirty=!0,Vt.prototype._cacheData=null,Vt.prototype._sum=0,Vt.prototype._min=NaN,Vt.prototype._max=NaN,Vt.prototype._count=0,Vt.prototype._colDataGetter=null,Vt.prototype._refs;var Ot=Vt,Nt=function(t){var e=this;e._groupFilterLogic=e._groupFilterLogic.bind(e),e._internalGroupSortingLogic=e._internalGroupSortingLogic.bind(e),e._onDataChanged=e._onDataChanged.bind(e),e._onGroupAdded=e._onGroupAdded.bind(e),e._onBeforeGroupAdded=e._onBeforeGroupAdded.bind(e),e._onRefreshTimeout=e._onRefreshTimeout.bind(e),e._rids=[],e._sortingDefs=[],e._columnStats={},e._shared={},e._conflator=new o(this._onDataChanged,0),e._conflator.disable(),e._addEvents("dataChanged","preDisposed","pageIndexChanged","pageCountChanged","groupAdded","beforeGroupAdded","groupCriteriaChanged","beforeFiltering"),e.setDataSource(t)};r.b.inherits(Nt,B),Nt.prototype._rids,Nt.prototype._groupView=null,Nt.prototype._pageView=null,Nt.prototype._expansionView=null,Nt.prototype._hiddenRids=null,Nt.prototype._collapsedRids=null,Nt.prototype._expansionMap=null,Nt.prototype._expansionChildren=null,Nt.prototype._expansionCount=0,Nt.prototype._dt=null,Nt.prototype._parent=null,Nt.prototype._shared=null,Nt.prototype._sortingDefs=null,Nt.prototype._userFilter=null,Nt.prototype._filteringOut=!1,Nt.prototype._refreshTimerId=0,Nt.prototype._groupSortingLogic=null,Nt.prototype._pageCorrection=!0,Nt.prototype._pageSize=0,Nt.prototype._pageIndex=1,Nt.prototype._lastPageIndex=0,Nt.prototype._groupCriteria=null,Nt.prototype._preDefGroups=null,Nt.prototype._preDefGroupsDirty=!1,Nt.prototype._groupMembers=null,Nt.prototype._groupList=null,Nt.prototype._groupRows=null,Nt.prototype._groupId="",Nt.prototype._groupValue,Nt.prototype._groupRowId="",Nt.prototype._footerRowIds=null,Nt.prototype._groupLevel=0,Nt.prototype._groupViewDirty=!1,Nt.prototype._columnStats,Nt.prototype._hidden=!1,Nt.prototype._hiddenHeaderRow=!1,Nt.prototype._collapsed=!1,Nt.prototype._showOnlyFirstMember=!1,Nt.prototype._beingAdded=!1,Nt.prototype._conflator=null,Nt.prototype.dispose=function(){if(this._dispatch("preDisposed",{}),this.unlistenAll(),this.setDataSource(null),this.groupBy(null),this._conflator.dispose(),this._sortingDefs=null,this._shared=null,this._userFilter=this._groupSortingLogic=null,this._refreshTimerId&&(clearTimeout(this._refreshTimerId),this._refreshTimerId=0),this._columnStats){for(var t in this._columnStats)this._columnStats[t].dispose();this._columnStats=null}},Nt.prototype.getData=function(t,e){return this._dt.getData(t,e)},Nt.prototype.getRowData=function(t){return this._dt.getRowData(t)},Nt.prototype.getColumnData=function(t,e){for(var i=this.getAllRowIds(!0,e),n=[],o=i.length,r=0;r<o;++r){var s=this._dt.getRowData(i[r]);s?n.push(s[t]):e&&n.push(null)}return n},Nt.prototype.getRowId=function(t){return this._rebuildRowIdsFromChildren(),this._getRids()[t]||""},Nt.prototype._toRowId=function(t){return"number"==typeof t?(this._rebuildRowIdsFromChildren(),this._getRids()[t]||""):t||""},Nt.prototype._toRowIds=function(t){for(var e=Array.isArray(t)?t.length:0,i=new Array(e),n=this._getRids(),o=0;o<e;++o){var r=t[o];"number"==typeof r?(this._rebuildRowIdsFromChildren(),i[o]=n[r]||""):i[o]=r||""}return i},Nt.prototype.getAllRowIds=function(t,e){this._rebuildRowIdsFromChildren();var i=e?this._getRids():this._pageView||this._rids;return t?i:i.slice(0)},Nt.prototype.getSortedRowIds=function(t){return this._rebuildRowIdsFromChildren(),t?this._rids:this._rids.slice(0)},Nt.prototype.getRowIndex=function(t){return this._rebuildRowIdsFromChildren(),this._getRids().indexOf(t)},Nt.prototype.getRowCount=function(){return this._getRids().length},Nt.prototype.getDataAt=function(t,e){return this._dt.getData(this.getRowId(t),e)},Nt.prototype.getRowDataAt=function(t){return this._dt.getRowData(this.getRowId(t))},Nt.prototype.getPreviousData=function(t,e){return this._dt.getPreviousData(t,e)},Nt.prototype.getMultipleRowData=function(t,e,i){return this._dt.getMultipleRowData(t,e,i)},Nt.prototype.getAllRowData=function(){return this.getMultipleRowData(this.getAllRowIds(!0))},Nt.prototype.setData=function(t,e,i){return!!this._dt&&this._dt.setData(t,e,i)},Nt.prototype.setRowData=function(t,e,i){return!(!t||!this._dt||this.isRowExpansion(t))&&this._dt.setRowData(t,e,i)},Nt.prototype.setColumnData=function(t,e,i){this._dt&&this._dt.setColumnData(t,e,i)},Nt.prototype.setDataAt=function(t,e,i){var n=this.getRowId(t);return!(!n||!this._dt)&&this._dt.setData(n,e,i)},Nt.prototype.setRowDataAt=function(t,e,i){var n=this.getRowId(t);return this.setRowData(n,e,i)},Nt.prototype.insertRow=function(t,e,i){this._rebuildRowIdsFromChildren();var n=this._toRowId(t);return this._dt?this._dt.insertRow(n,e,i):""},Nt.prototype.removeRow=function(t){this._dt&&this._dt.removeRow(this._toRowId(t))},Nt.prototype.removeRows=function(t){if(this._dt){for(var e=t.length;--e>=0;){var i=t[e];"number"==typeof i&&(t[e]=this.getRowId(i))}this._dt.removeRows(t)}},Nt.prototype.moveRow=function(t,e){this._rebuildRowIdsFromChildren();for(var i=this._getRids(),n=e>=0&&e<i.length?i[e]:"",o=Array.isArray(t)?t:[t],r=o.length,s=new Array(r),a=0;a<r;++a)s[a]=i[o[a]];return this._dt.hasSegmentation()&&this.synchronizeRowOrder(),this._dt._moveRow(s,n)},Nt.prototype.swapRow=O._deprecatedFunction,Nt.prototype.getDataTable=function(){return this._dt},Nt.prototype.getDataSource=function(){return this._parent},Nt.prototype.setDataSource=function(t){if(t){if(this._groupLevel>0)return;this._setParent(t),this._onDataChanged(J._globalChangeArg),this._parent.listen("dataChanged",this._onDataChanged)}else this._parent&&(this._parent.unlisten("dataChanged",this._onDataChanged),this._resetAllViews(),this._groupViewDirty=!1),this._parent=this._dt=null,this._shared={}},Nt.prototype.setConflationRate=function(t){this._conflator.disable(!t),this._conflator.setConflatingTime(t)},Nt.prototype.getConflationRate=function(){return this._conflator.getConflatingTime()},Nt.prototype._resetAllViews=function(){this._rids.length=0,this._groupView&&this._groupView.length&&(this._groupView.length=0),this._pageView&&this._pageView.length&&(this._pageView.length=0),this._expansionView&&this._expansionView.length&&(this._expansionView.length=0)},Nt.prototype.getSortingLogics=function(){return this._dt?this._dt.getSortingLogics():null},Nt.prototype.sort=function(t,e,i,n){if(this._groupLevel>0)window.console.log("ERROR: Sub-group cannot be sorted individually");else{var o=this.getSortingLogics(),r=this._sortingDefs,s=r.length;if(Array.isArray(i))for(var a=i.length;--a>=0;)if("function"!=typeof i[a]){var l=Array.isArray(t)?t[a]:t;i[a]=o[l]||o._default}if(J._buildSortContext(r,t,e,i||o),1===r.length&&0===r[0][3]&&(r.length=0),!(s<=0&&r.length<=0||this._shared.stalledRids)){var u=!1;this._groupMembers||r.length<=0||n?(u=!0,this._updateRowIds()):u=this._sort(),u&&this._dispatchDataChange(J._positionChangeArg)}}},Nt.prototype.sortOnce=function(t,e){this.sort(t,e),this._sortingDefs.length=0},Nt.prototype.setSortingLogic=function(t){this._dt&&this._dt.setSortingLogic(t)},Nt.prototype.setColumnSortingLogic=function(t,e){this._dt&&this._dt.setColumnSortingLogic(t,e)},Nt.prototype.isSorting=function(){return this._sortingDefs.length>0},Nt.prototype.hideRow=function(t,e){this.showRows([t],!1===e)},Nt.prototype.hideRows=function(t,e){this.showRows(t,!1===e)},Nt.prototype.showRows=function(t,e){var i=!1===e;if(i)this._hiddenRids||(this._hiddenRids={});else if(!this._hiddenRids)return;for(var n=this._toRowIds(t),o=n.length;--o>=0;){var r=n[o];r&&(this._hiddenRids[r]=i)}this._refreshAndNotify()},Nt.prototype.unhideAllRows=function(){this._hiddenRids&&(this._hiddenRids=null,this._refreshAndNotify())},Nt.prototype.hasHiddenRow=function(){return!!this._hiddenRids},Nt.prototype.filterIn=function(t,e,i){var n=this._getFilterLogic(t,e),o=!0===i;return!!(this._userFilter!==n||"function"==typeof t||n&&o!==this._filteringOut)&&(this._shared.filterLogic=n,this._userFilter=n,this._filteringOut=o,this._refreshAndNotify(),!0)},Nt.prototype.filterOut=function(t,e){return this.filterIn(t,e,!0)},Nt.prototype.filterInOnce=function(t,e,i){var n=this._getFilterLogic(t,e);if(n){for(var o=!0===i,r=this._rids,s=this._dt,a={},l=0,u=r.length;--u>=0;){var h=r[u],p=s.getRowData(h);p&&n(h,p)!==o||(a[h]=!0,++l)}if(!(l<=0)){var d=this._removeRowIds(a);this._updatePageCount()||this._transformView(d)?this._dispatchGlobalChange():this._dispatchMultiRowRemoved(Object.keys(a))}}},Nt.prototype.filterOutOnce=function(t,e){this.filterInOnce(t,e,!0)},Nt.prototype._removeRowIds=function(t){var e=this._removeArrayItems(this._rids,t);if(this._groupView&&(e=this._removeArrayItems(this._groupView,t)),this._groupMembers)for(var i=this._groupList.length,n=0;n<i;++n){var o=this._groupList[n];this._groupMembers[o]._removeRowIds(t)}return e},Nt.prototype.clearFilter=function(){this._userFilter&&(this._userFilter=null,this._shared.filterLogic=null,this._refreshAndNotify())},Nt.prototype.disablePageCorrection=function(t){this._pageCorrection=!1===t},Nt.prototype.setPage=function(t){var e=this._setPage(t);return e&&this._dispatchGlobalChange(),e},Nt.prototype.gotoPage=Nt.prototype.setPage,Nt.prototype.nextPage=function(){return this.gotoPage(this._pageIndex+1)},Nt.prototype.previousPage=function(){return this.gotoPage(this._pageIndex-1)},Nt.prototype.prevPage=Nt.prototype.previousPage,Nt.prototype.lastPage=function(){return this.gotoPage(this._lastPageIndex-1)},Nt.prototype.firstPage=function(){return this.gotoPage(0)},Nt.prototype.getCurrentPage=function(){return this._pageIndex},Nt.prototype.getPageIndex=Nt.prototype.getCurrentPage,Nt.prototype.isOnLastPage=function(){return this._pageIndex===this._lastPageIndex},Nt.prototype.isOnFirstPage=function(){return 1===this._pageIndex},Nt.prototype.getPageSize=function(){return this._pageSize},Nt.prototype.getPageCount=function(){return this._lastPageIndex},Nt.prototype.getTotalPages=Nt.prototype.getPageCount,Nt.prototype.setPageSize=function(t){t>=0||(t=0),this._pageSize!==t&&(this._pageSize=t,this._updatePageCount(),t>0?this._pageView||(this._pageView=[]):this._pageView&&(this._pageView=null),this._pageView&&0!==t?this._transformView():this._updateRowIds(),this._dispatchGlobalChange())},Nt.prototype.groupBy=function(t,e){if(this._shared.multiGroupRow=!1,this._groupCriteria){if(this._groupList&&this._groupList.length>0){for(var i in this._groupMembers)this._groupMembers[i].dispose();this._groupMembers={},this._groupList.length=0}this._groupCriteria=null}var n,o,r;if(null!=e&&this._setPredefinedGroups(e),t&&0===this._groupLevel)for(this._groupCriteria=[],o=(r=Array.isArray(t)?t:[t]).length,n=0;n<o;++n){var s=r[n];"string"==typeof s?this._groupCriteria.push(this._defaultGroupCriteria.bind(this,s)):s&&this._groupCriteria.push(s)}if(this._groupCriteria)this._groupMembers||(this._groupMembers={},this._groupList=[],this._groupRows={}),this._groupView||(this._groupView=[]);else{if(this._groupMembers=null,this._groupList=null,this._groupView=null,this._groupRows){if(this._groupLevel<=0)this._footerRowIds=null;else if(this._groupRowId&&delete this._groupRows[this._groupRowId],this._footerRowIds){for(o=this._footerRowIds.length,n=0;n<o;++n)delete this._groupRows[this._footerRowIds[n]];this._footerRowIds=null}this._groupRows=null}this._groupValue=null}this._groupLevel=0,this._updateRowIds(),this._dispatch("groupCriteriaChanged",{}),this._dispatchGlobalChange()},Nt.prototype.addGroup=function(t){if(this._groupMembers)if(isArray(t))for(var e=t,i=e.length,n=0;n<i;++n)this._addGroup(e[n]);else this._addGroup(t)},Nt.prototype.sortGroups=function(t){if(this._groupMembers&&(this._groupSortingLogic=null==t?Nt._defaultGroupSortingLogic:t||null,this._groupSortingLogic)){this._groupList.sort(this._internalGroupSortingLogic);for(var e=this._groupList.length;--e>=0;){var i=this._groupList[e];this._groupMembers[i].sortGroups(this._groupSortingLogic)}this._groupViewDirty=!0,this._groupLevel<=0&&this._dispatchGlobalChange()}},Nt.prototype.moveGroup=function(t,e){var i=this.getGroup(t);if(i){var n=i.getDataSource(),o=i.getGroupId(),r=n._groupList.indexOf(o);r!==e&&r+1!==e&&(n._groupList.splice(r,1),r<e&&--e,n._groupList.splice(e,0,o),this._requestRebuildingRowIds(!1))}},Nt.prototype.setPredefinedGroups=function(t){this._setPredefinedGroups(t),this._groupMembers&&this._refreshAndNotify()},Nt.prototype._setPredefinedGroups=function(t){if(this._preDefGroups!==t){this._preDefGroups&&(this._preDefGroups.length=0);var e=!1;if(t)for(var i=t.length;--i>=0;)if(Array.isArray(t[i])){e=!0;break}e?this._preDefGroups=t:Array.isArray(t)?this._preDefGroups=[t]:this._preDefGroups=null,this._preDefGroupsDirty=!0}},Nt.prototype.addFooter=function(t){if(this._groupLevel<=0)console.log("WARNING: Only group can have a footer");else if(null==t&&(t=1),!(t<=0)){this._footerRowIds||(this._footerRowIds=[]);for(var e=0;e<t;++e){var i=this._groupRowId+"_footer"+(this._footerRowIds.length||"");this._footerRowIds.push(i),this._groupRows[i]=this}this._beingAdded||this._requestRebuildingRowIds(this._collapsed)}},Nt.prototype.removeFooter=function(){if(this._footerRowIds){for(var t=this._footerRowIds.length,e=0;e<t;++e)delete this._groupRows[this._footerRowIds[e]];this._footerRowIds=null,this._beingAdded||this._requestRebuildingRowIds(this._collapsed)}},Nt.prototype.enableMultiGroup=function(t){this._shared.multiGroupRow=!1!==t},Nt.prototype.getGroupByRowId=function(t){return this._groupRows&&this._groupRows[t]||null},Nt.prototype.getGroup=function(t){if(!this._groupMembers)return null;var e;if("number"==typeof t){if(!(e=this._groupList[t]))return null}else e=t+"";var i=this._groupMembers[e];if(i)return i;var n=e;return(i=this._groupRows[n])||this._getGroupByContentRowId(n)},Nt.prototype._getGroupByContentRowId=function(t){if(this._groupMembers)for(var e=0;e<this._groupList.length;e++){var i=this._groupList[e],n=this._groupMembers[i]._getGroupByContentRowId(t);if(n)return n}else if(-1!==this._rids.indexOf(t))return this;return null},Nt.prototype.getAllGroups=function(t){if(t||(t=[]),this._groupMembers)for(var e=this._groupList.length,i=0;i<e;++i){var n=this._groupList[i],o=this._groupMembers[n];t.push(o),o.getAllGroups(t)}return t},Nt.prototype.getGroupList=function(){return this._groupList},Nt.prototype.getGroupId=function(){return this._groupId},Nt.prototype.getGroupValue=function(){return this._groupValue},Nt.prototype.getGroupRowId=function(){return this._groupRowId},Nt.prototype.getFooterRowIndex=function(t){if(this._footerRowIds)for(var e=this._footerRowIds.length;--e>=0;)if(this._footerRowIds[e]===t)return e;return-1},Nt.prototype.getFooterRowIds=function(){return this._footerRowIds},Nt.prototype.hasGroup=function(){return!!this._groupMembers},Nt.prototype.getGroupRows=function(){return null},Nt.prototype.getGroupLevel=function(t){if(null!=t&&this._groupRows){if("number"!=typeof t){var e=this.getGroup(t);return e?e._groupLevel:-1}this._rebuildRowIdsFromChildren();for(var i=this._getRids(),n=i[t];n;){var o=this._groupRows[n];if(o)return o._groupLevel;n=i[--t]}}return this._groupLevel},Nt.prototype.enableColumnStats=function(t,e,i){if(!t)return null;var n=!1!==e,o=this._columnStats[t];if(n?(o||(o=new Ot(this,t),this._columnStats[t]=o),o.addRef(i)):o&&(o.deRef(i)||(o.dispose(),delete this._columnStats[t])),this._groupMembers)for(var r=this._groupList.length;--r>=0;){var s=this._groupList[r];this._groupMembers[s].enableColumnStats(t,e,i)}return o||null},Nt.prototype.getColumnStats=function(t){return this._columnStats[t]||null},Nt.prototype.hide=function(t){var e=!1!==t;return this._hidden!==e&&(this._hidden=e,this._refreshAndNotify(),!0)},Nt.prototype.isHidden=function(){return this._hidden},Nt.prototype._isHeaderRowShown=function(){return!this._hiddenHeaderRow&&((!this._shared.filterLogic||0!==this._rids.length)&&(!this._shared.autoGroupHiding||null!=this._groupValue))},Nt.prototype._setCollapse=function(t){if(this._shared.contentAsHeader){if(this._hiddenHeaderRow&&this._showOnlyFirstMember!==t)return this._showOnlyFirstMember=t,!0}else if(this._isHeaderRowShown()&&this._collapsed!==t)return this._collapsed=t,!0;return!1},Nt.prototype.collapse=function(t){this._setCollapse(!1!==t)&&(this._shared.contentAsHeader?this._hiddenHeaderRow&&this._requestRebuildingRowIds(this._showOnlyFirstMember):this._groupLevel>0&&this._requestRebuildingRowIds(this._collapsed))},Nt.prototype.collapseAllGroups=function(t){var e=this.getAllGroups(),i=e.length;if(i){for(var n=!1!==t,o=0;o<i;++o){e[o]._setCollapse(n)}this._requestRebuildingRowIds(!1)}},Nt.prototype.toggleCollapsedState=function(){this.collapse(!this.isCollapsed())},Nt.prototype.isCollapsed=function(){return this._collapsed||this._showOnlyFirstMember},Nt.prototype.enableContentAsHeader=function(t){this._shared.contentAsHeader=!1!==t},Nt.prototype._getFirstHiddenRids=function(){if(this._shared.contentAsHeader&&this._showOnlyFirstMember){var t=this._rids;if(Array.isArray(t)&&t.length)return[t[0]]}return null},Nt.prototype.getVisibleRowIds=function(t){return this.getAllRowIds(t,!0)},Nt.prototype.getVisibleRowCount=function(){return this._collapsed?0:(this._rebuildRowIdsFromChildren(),this._getRids().length)},Nt.prototype.isRowDataInGroup=function(t,e){var i=this._groupCriteria,n=this._groupLevel;if(!e||e===this.getGroupId())return this._isAllowedInGroup(null,t);for(var o=n;o<i.length;o++)if(i[o](t).indexOf(e)>=0)return!0;return!1},Nt.prototype.isRowIdInGroup=function(t,e){var i=this.getRowData(t);return!!i&&this.isRowDataInGroup(i,e)},Nt._getDataViewExpansionId=function(t,e){return t+"_ex"+e},Nt.prototype.addRowExpansion=function(t,e){if(!(this._groupLevel>0)){if(!e||e<0){if(null!=e)return;e=1}var i=this._rids.indexOf(t);if(!(i<0)){var n=0;this._expansionMap?n=this._expansionMap[t]||0:(this._expansionMap={},this._expansionChildren={});var o=n+e;this._expansionMap[t]=o;for(var r=n;r<o;r++)this._expansionChildren[Nt._getDataViewExpansionId(t,r)]=t;if(n||this._expansionCount++,!this._groupViewDirty&&this._updateExpansionView()){var s={};s.rid=t,s.type="inserted",s.nextRid=this._rids[i+1],s.fallback=i,this._dispatchDataChange(s)}}}},Nt.prototype.removeRowExpansion=function(t){if(this._expansionMap){var e=this._expansionMap[t];if(e){for(var i=new Array(e),n=0;n<e;++n)i[n]=Nt._getDataViewExpansionId(t,n),delete this._expansionChildren[i[n]];delete this._expansionMap[t],this._expansionCount--,this._groupViewDirty||this._updateExpansionView()&&(1===e?this._dispatchRowRemoved(i[0]):this._dispatchMultiRowRemoved(i))}}},Nt.prototype.toggleRowExpansion=function(t,e,i){var n=this._toRowId(t);(e=null!=e?!0===e:!this.hasRowExpansion(n))?this.addRowExpansion(n,i):this.removeRowExpansion(n)},Nt.prototype.removeAllRowExpansions=function(){this._expansionMap&&(this._expansionMap=null,this._expansionCount=0,this._expansionView=null,this._expansionChildren=null,this._refreshAndNotify())},Nt.prototype.getRowsWithExpansion=function(t,e){if(!this._expansionMap)return[];var i=this._expansionView,n=i.length;(null==e||e>n)&&(e=n),t>0||(t=0);for(var o=this._expansionCount,r=new Array(n),s=t;s<e;++s){var a=i[s];if(this._expansionMap[a]&&(r[s]=a,--o<=0))break}return r},Nt.prototype.getExpansionParents=function(t,e){var i=[];if(this._expansionMap){var n=this._expansionView,o=n.length;(null==e||e>o)&&(e=o),(!t||t<0)&&(t=0);for(var r=t;r<e;++r)i[r]=this._expansionChildren[n[r]]||""}return i},Nt.prototype.isRowExpansion=function(t){return!!this._expansionChildren&&!!this._expansionChildren[t]},Nt.prototype.hasRowExpansion=function(t){return!!this._expansionMap&&!!this._expansionMap[t]},Nt.prototype.getRowExpansionId=function(t,e){if(this._expansionMap&&(e||(e=0),e<(this._expansionMap[t]||0)))return Nt._getDataViewExpansionId(t,e);return""},Nt.prototype.getRowExpansionIndex=function(t){if(t){var e=t.match(/_ex(\d+)$/);if(e)return+e[1]}return-1},Nt.prototype._updateExpansionView=function(){var t=this._expansionMap;if(t){if(!this._expansionCount||this._expansionCount<0)return this._expansionCount=0,this._expansionMap=null,this._expansionView=null,this._expansionChildren=null,!0;var e=this._pageView||this._groupView||this._rids,i=e.length,n=this._expansionView?this._expansionView.length:0;this._expansionView?this._expansionView.length=i:this._expansionView=new Array(i);for(var o=this._expansionCount,r=0,s=0;r<i;++r){var a=e[r];if(this._expansionView[s++]=a,o){var l=t[a]||0;if(l){for(var u=0;u<l;++u)this._expansionView[s++]=Nt._getDataViewExpansionId(a,u);--o}}}return n!==this._expansionView.length}return!1},Nt.prototype._transformView=function(t){var e=this._updatePaginationView(t);return!!(e|=this._updateExpansionView())},Nt.prototype.searchAll=function(t,e){e||(e=[]),this._rebuildRowIdsFromChildren();for(var i=this._getRids(),n=i.length,o=0;o<n;++o){var r=i[o],s=this._dt.getRowData(r);s&&t(s)&&e.push(r)}return e},Nt.prototype.searchPrev=function(t,e){this._rebuildRowIdsFromChildren();var i=this._getRids(),n=-1;"number"==typeof t?this._dt.getRowData(i[t])&&(n=t):n=i.indexOf(t);var o=-1,r=i.length;return n>0&&(o=this._searchRow(i,e,n-1,-1,-1))>=0||n>=0&&(o=this._searchRow(i,e,r-1,n,-1))>=0?o:-1},Nt.prototype.searchNext=function(t,e){this._rebuildRowIdsFromChildren();var i=this._getRids(),n=-1;if("number"==typeof t?this._dt.getRowData(i[t])&&(n=t):n=i.indexOf(t),n<0)return-1;var o=-1,r=i.length;return n<r-1&&(o=this._searchRow(i,e,n+1,r,1))>=0||n>0&&(o=this._searchRow(i,e,0,n,1))>=0?o:-1},Nt.prototype._searchRow=function(t,e,i,n,o){for(;i!==n;){var r=t[i],s=this._dt.getRowData(r);if(s&&e(s))return i;i+=o}return-1},Nt.prototype.stall=function(t){var e=!1!==t;if(!!this._shared.stalledRids===e)return!1;if(e){var i={};this._shared.stalledRids=i;for(var n=this._getRids(),o=n.length;--o>=0;)i[n[o]]=1}else this._shared.stalledRids=null,this._refreshAndNotify();return!0},Nt.prototype.enableAutoGroupRemoval=function(t){return t=!1!==t,!!this._shared.autoGroupRemoval!==t&&(this._shared.autoGroupRemoval=t,this._triggerGroupRefreshing(),!0)},Nt.prototype.enableAutoGroupHiding=function(t){return t=!1!==t,!!this._shared.autoGroupHiding!==t&&(this._shared.autoGroupHiding=t,this._triggerGroupRefreshing(),!0)},Nt.prototype.synchronizeRowOrder=function(){this.isSorting()&&this._dt._sort(this._sortingDefs)},Nt.prototype.setSegmentSeparator=function(t,e){var i="";return"number"==typeof t?i=this.getRowId(t):"string"==typeof t&&(i=t),!!i&&((e=!1!==e)&&this.synchronizeRowOrder(),this._dt.setSegmentSeparator(i,e))},Nt.prototype.unsetAllSegmentSeparators=function(){return this._dt.unsetAllSegmentSeparators()},Nt.prototype.hasSegmentation=function(){return this._dt.hasSegmentation()},Nt.prototype.isSegmentSeparator=function(t){return this._dt.isSegmentSeparator(t)},Nt.prototype.getSegmentParentRowId=function(t){return this._dt.getSegmentParentRowId(t)},Nt.prototype.collapseSegment=function(t,e){e=!1!==e;var i=this._dt._getSegmentSeparators();if(i){var n=this._toRowId(t);if(i.collapseSegment(n,e))return this._refreshAndNotify(),!0}return!1},Nt.prototype.expandSegment=function(t,e){return this.collapseSegment(t,!1===e)},Nt.prototype.expandAllSegments=function(){var t=this._dt._getSegmentSeparators();return!(!t||!t.expandAllSegments())&&(this._refreshAndNotify(),!0)},Nt.prototype.setSegmentCollapsingLogic=function(){},Nt.prototype.isSegmentCollapsed=function(t){var e=this._dt._getSegmentSeparators();return!!e&&e.isCollapsedSegment(this._toRowId(t))},Nt.prototype.fillSegment=function(t){this._dt.fillSegment(this._toRowId(t))},Nt.prototype.fillSegments=function(){this._dt.fillSegments()},Nt.prototype.addSegmentChild=function(t,e){if(this._dt._getSegmentSeparators()){var i=this._toRowId(t),n=this._toRowId(e);return this._dt.addSegmentChild(i,n)}return!1},Nt.prototype.addSegmentChildren=function(t,e){if(this._dt._getSegmentSeparators()){var i=this._toRowId(t),n=this._toRowIds(e);return this._dt.addSegmentChildren(i,n)}return!1},Nt.prototype.removeSegmentChild=function(t,e){if(this._dt._getSegmentSeparators()){var i=this._toRowId(t),n=this._toRowId(e);return this._dt.removeSegmentChild(i,n)}return!1},Nt.prototype.removeSegmentChildren=function(t,e){if(this._dt._getSegmentSeparators()){var i=this._toRowId(t),n=this._toRowIds(e);return this._dt.removeSegmentChildren(i,n)}return!1},Nt.prototype.removeAllSegmentChildren=function(){return this._dt.removeAllSegmentChildren()},Nt.prototype.getSegmentIds=function(){return this._dt.getSegmentIds()},Nt.prototype.getSegmentChildIds=function(t){return this._dt.getSegmentChildIds(this._toRowId(t))},Nt.prototype.sortSegments=function(t){this._dt.sortSegments(t)},Nt.prototype.dump=function(t){this._rebuildRowIdsFromChildren();var e=this._getRids();return U.constructTable(this.getMultipleRowData(e),t,e)},Nt.prototype.log=function(t){console.table(this.dump(t))},Nt.prototype._getRids=function(){return this._expansionView||this._pageView||this._groupView||this._rids},Nt.prototype._updateRowIds=function(t){if(this._groupViewDirty=!1,this._parent&&!this._hidden){if(!this._shared.stalledRids){this._rids=t||this._parent.getAllRowIds(),this._hiddenRids&&this._removeArrayItems(this._rids,this._hiddenRids);var e=this._dt._getSegmentSeparators();this._collapsedRids=null;var i=null;if(e){i=e.getSegments();var n=this._collapsedRids=e.getCollapsedRows();n&&this._removeArrayItems(this._rids,n)}if(this._dispatch("beforeFiltering",{}),this._quickFilter(this._userFilter,this._filteringOut,i),this._groupLevel>0&&!t&&this._quickFilter(this._groupFilterLogic,!1),this._groupMembers)this._populateGroups();else{var o=this._updatePageCount();this._sort()||o||this._transformView()}}}else this._resetAllViews()},Nt.prototype._onDataChanged=function(t){if(!this._conflator.conflate(t)){var e=this._conflator.popAllData()||[t],i=e.length;if(1===i){var n=e[0];if(n.globalChange)return this._updateRowIds(),void this._dispatchDataChange(t);var o=n.type;"inserted"===o?this._onRowInserted(n):"removed"===o?this._onRowRemoved(n):this._onRowUpdated(n)}else{this._updateRowIds();for(var r=!0,s=0;s<i;s++)if(!e[s].positionChangeOnly){r=!1;break}this._dispatchDataChange({globalChange:!0,positionChangeOnly:r,events:e})}}},Nt.prototype._onRowInserted=function(t){if(this._shared.stalledRids)return 0;if(this.isRowFiltered(t.rid,t.rowData))return 0;var e=0;if(this._groupMembers){var i,n=this._resolveGroupId(t.rowData),o=n.length;o>1&&(this._shared.multiGroupRow=!0);for(var r=0;r<o;r++)if(i=n[r],this._groupMembers[i])e=this._groupMembers[i]._onRowInserted(t);else{var s=this._addGroup(i);s&&(t.globalChange=!0,s._onRowInserted(t),e=1)}t.globalChange&&(this._groupViewDirty=!0)}if(this._hidden)return e;var a=t.rid,l=t.rowData;if(!this._isAllowedInGroup(a,l))return e;var u,h=t.nextRid;u=this.isSorting()&&!t.segmentChanged?this._addDataRow(a):this._addDataRow(a,h,t.fallback);var p=this._updatePageCount(),d=this._sort();return d&&(t.globalChange=!0),t.globalChange?d||p||this._transformView():(t={rid:a,rowData:l,type:"inserted"},null!=h&&(t.nextRid=h,t.fallback=u),this._transformView(u)&&(t.globalChange=!0)),this._dispatchDataChange(t),1},Nt.prototype._onRowRemoved=function(t){if(this._shared.stalledRids)return 0;if(t.segmentChanged&&this.isSorting())return this._refreshAndNotify(),1;var e,i=0,n=t.rids;if(this._groupMembers){var o,r,s=t.rowData;if(!n&&s){for(o=this._resolveGroupId(s),e=0;e<o.length;e++)r=o[e],this._groupMembers[r]&&(i+=this._groupMembers[r]._onRowRemoved(t));i>1&&(this._groupViewDirty=!0)}else{var a=this._groupList.length;for(e=0;e<a;++e)r=this._groupList[e],i+=this._groupMembers[r]._onRowRemoved(t)}}var l,u,h=NaN,p=null;if(i=0,n){for(p=[],e=n.length;--e>=0;)l=n[e],(u=this._removeDataRow(l))>=0&&(p.push(l),u>=h||(h=u));i=p.length}else l=t.rid,(u=this._removeDataRow(l))>=0&&(p=[l],h=u,i=1);i>0&&(this._updatePageCount()||this._transformView(h)?this._dispatchGlobalChange():this._dispatchMultiRowRemoved(p),this._shared.autoGroupRemoval&&this._groupRows&&this._rids.length<=0&&this._triggerGroupRefreshing(),this._hiddenHeaderRow&&this._requestRebuildingRowIds(!0));return i},Nt.prototype._onRowUpdated=function(t){var e,i,n=t.rid,o=t.rowData;if(this.isRowFiltered(n,o))return this._onRowRemoved(t)?1:0;if(this._groupMembers){var r=[],s=this._groupList.length;for(e=0;e<s;++e)i=this._groupList[e],r[this._groupMembers[i]._onRowUpdated(t)]=!0;t.globalChange&&(this._groupViewDirty=!0);var a=0;if(r[2]?a=2:r[1]?this._isAllowedInGroup(n,o)||(a=1):r[4]&&(a=4),this._groupLevel>0){if(1===a)this._removeArrayItem(this._rids,n)>=0&&this._groupView&&this._removeArrayItem(this._groupView,n),this._shared.multiGroupRow&&(this._groupViewDirty=!0);else if(2===a){if(!this._hidden)this._rids.indexOf(n)<0&&this._rids.push(n),this._groupViewDirty=!0,this._resolveGroupId(o).length>1&&(this._shared.multiGroupRow=!0)}}else{var l=r[1]&&r[2]||r[4];if(this._shared.multiGroupRow||!l){var u=this._resolveGroupId(o);for(e=0;e<u.length;e++){i=u[e];var h=this._addGroup(i);h&&(h._onRowInserted(t),a=1)}}!l&&!this._hidden&&this._rids.indexOf(n)<0&&this._addDataRow(n),4===a?this._shared.multiGroupRow?this._dispatchGlobalChange():this._dispatchDataChange(t):(this._groupViewDirty=!0,this._dispatchGlobalChange())}return a}return this._isAllowedInGroup(n,o)?this._rids.indexOf(n)<0?(this._onRowInserted(t),2):(this._shared.stalledRids||this._sort()&&(t.globalChange=!0),this._dispatchDataChange(t),4):this._onRowRemoved(t)?1:0},Nt.prototype._onGroupAdded=function(t){if(!this._hidden){var e=t.newGroup,i=e.getGroupRowId();this._groupView.push(i),this._groupViewDirty=!0,this._dispatch("groupAdded",t),O.pushArrayItems(this._groupView,e.getFooterRowIds())}},Nt.prototype._onBeforeGroupAdded=function(t){this._dispatch("beforeGroupAdded",t)},Nt.prototype._requestRebuildingRowIds=function(t){this._groupMembers&&(this._groupViewDirty=!0),this._groupLevel>0?this._parent._requestRebuildingRowIds(t):(t?this._rebuildRowIdsFromChildren():this._updateRowIds(),this._dispatchGlobalChange())},Nt.prototype._refreshAndNotify=function(){this._updateRowIds(),this._dispatchGlobalChange()},Nt.prototype._onRefreshTimeout=function(){this._refreshTimerId=0,this._refreshAndNotify()},Nt.prototype._addDataRow=function(t,e,i){var n=this._getRowIndex(this._rids,e,i);return this._insertItems(this._rids,n,t),this._groupView?this._groupMembers?(this._groupViewDirty=!0,this._insertItems(this._groupView,-1,t)):n<0?this._insertItems(this._groupView,-1,t):(n=this._getRowIndex(this._groupView,e,i),this._insertItems(this._groupView,n,t)):n>=0?n:this._rids.length-1},Nt.prototype._insertItems=function(t,e,i){return e<0?(e=t.length,t.push(i)):t.splice(e,0,i),e},Nt.prototype._getRowIndex=function(t,e,i){if(null==e)return-1;var n=this._rids.indexOf(e);return n>=0?n:null==i||i>=t.length?-1:i},Nt.prototype._removeDataRow=function(t){var e=this._removeArrayItem(this._rids,t);return this._groupView&&e>=0&&(e=this._removeArrayItem(this._groupView,t)),e},Nt.prototype._removeArrayItem=function(t,e){for(var i=t.length,n=0;n<i;++n)if(t[n]===e)return t.splice(n,1),n;return-1},Nt.prototype._removeArrayItems=function(t,e){for(var i=NaN,n=0,o=t.length;--o>=0;)e[t[o]]?++n:n&&(i=o+1,t.splice(i,n),n=0);return n&&(t.splice(0,n),i=0),i},Nt.prototype._isAllowedInGroup=function(t,e){if(this._groupLevel>0)for(var i=this,n=this._groupLevel;--n>=0;){if(!i._groupFilterLogic(t,e))return!1;i=i.getDataSource()}return!0},Nt.prototype.isRowFiltered=function(t,e){return this._shared.stalledRids?!this._shared.stalledRids[t]:!(!this._hiddenRids||!this._hiddenRids[t])||!this.isSegmentSeparator(t)&&(!(!this._collapsedRids||!this._collapsedRids[t])||!(!this._userFilter||this._userFilter(t,e)!==this._filteringOut))},Nt.prototype._sort=function(){if(this._groupMembers)return!1;if(this._dt._getSegmentSeparators()||this.isSorting()){var t=this._rids,e=this._dt.getMultipleRowData(t),i=this._dt.getSegmentValues(t),n=J._performMultiLevelSorting(e,this._sortingDefs,i);if(n)return this._rids=J._reorderItems(t,n),this._transformView(),!0}return!1},Nt.prototype._quickFilter=function(t,e,i){if(t){for(var n=this._rids,o=n.length,r=this._dt,s=0,a=o;--a>=0;){var l=n[a],u=!1;if(!i||!i[l]){var h=r.getRowData(l);u=!h||t(l,h)===e}u?++s:s>0&&(n.splice(a+1,s),s=0)}s>0&&n.splice(0,s)}},Nt.prototype._getFilterLogic=function(t,e){return null!=t?"function"==typeof t?t:"string"==typeof t?Nt._defaultFilterLogic.bind(null,t,e):Nt._defaultFilterLogic.bind(null,t+"",e):null},Nt.prototype._setPage=function(t){return t>this._lastPageIndex&&this._pageCorrection&&(t=this._lastPageIndex),t<1&&(t=1),t!=this._pageIndex&&(this._pageIndex=t,this._transformView(),this._dispatch("pageIndexChanged",{pageIndex:this._pageIndex}),!0)},Nt.prototype._updatePaginationView=function(t){var e=!1;if(this._pageView){t||(t=0);var i=this._pageSize*(this._pageIndex-1),n=this._pageSize+i;if(t<n){var o=this._groupView||this._rids;n>o.length&&(n=o.length);var r=n-i;this._pageView.length=r>=0?r:0;for(var s=i;s<n;++s)this._pageView[s-i]=o[s];e=!0}}return e},Nt.prototype._updatePageCount=function(){var t=1;if(this._pageSize>0){var e=this._groupView||this._rids,i=e.length>0?e.length:0;t=Math.ceil(i/this._pageSize)}return!!(this._lastPageIndex!==t&&(this._lastPageIndex=t,this._dispatch("pageCountChanged",{pageCount:this._lastPageIndex}),this._lastPageIndex<this._pageIndex&&this._pageCorrection))&&this._setPage(this._lastPageIndex)},Nt.prototype._dispatchRowRemoved=function(t){t&&this._dispatchDataChange({type:"removed",rid:t})},Nt.prototype._dispatchMultiRowRemoved=function(t){if(t){var e=t.length;1===e?this._dispatchRowRemoved(t[0]):e>1&&this._dispatchDataChange({type:"removed",rids:t})}},Nt.prototype._dispatchGlobalChange=function(){this._dispatchDataChange(J._globalChangeArg)},Nt.prototype._dispatchDataChange=function(t){this._dispatch("dataChanged",t)},Nt.prototype._setParent=function(t){this._parent=t,this._dt=t;do{(t=t.getDataSource())&&(this._dt=t)}while(t);if(this._parent&&this._dt!==this._parent){this._shared=this._parent._shared;var e=this._parent._columnStats;if(e)for(var i in e){var n=this.enableColumnStats(i),o=this._parent.getColumnStats(i);n&&o&&n.setColumnDataGetter(o.getColumnDataGetter())}}},Nt.prototype._populateGroups=function(){var t,e,i,n,o,r,s=this._rids;this._rids=[];var a={},l=[];for(e=s.length,t=0;t<e;++t){var u=s[t],h=this._dt.getRowData(u);if(h){(r=(o=this._resolveGroupId(h)).length)>1&&(this._shared.multiGroupRow=!0);for(var p=0;p<r;p++){var d=a[n=o[p]];d?d.push(u):(d=[u],a[n]=d,l.push(n))}}}if(this._shared.autoGroupRemoval)for(t=e=this._groupList.length;--t>=0;)a[n=this._groupList[t]]||(i=this._groupMembers[n])&&!i._predefinedGroup&&this._removeGroupMember(t,n);var c=null;if(this._preDefGroups&&this._groupLevel<this._preDefGroups.length&&(c=this._preDefGroups[this._groupLevel]),e=this._groupList.length,this._preDefGroupsDirty)for(this._preDefGroupsDirty=!1,t=e;--t>=0;)n=this._groupList[t],(i=this._groupMembers[n])&&i._predefinedGroup&&(c?c.indexOf(i._groupId)<0&&this._removeGroupMember(t,n):this._removeGroupMember(t,n));if(c)for(e=c.length,t=0;t<e;++t){var _=this._addGroup(c[t]);_&&(_._predefinedGroup=!0)}for(e=l.length,t=0;t<e;++t)this._addGroup(l[t]);for(e=this._groupList.length,t=0;t<e;++t)n=this._groupList[t],(i=this._groupMembers[n])._updateRowIds(a[n]),i._markColumnStatsDirty();this._groupViewDirty=!0,this._rebuildRowIdsFromChildren()},Nt.prototype._removeGroupMember=function(t,e){var i=this._groupMembers[e];i&&(this._groupList.splice(t,1),delete this._groupMembers[e],i.dispose())},Nt.prototype._defaultGroupCriteria=function(t,e){var i=e[t];return Array.isArray(i)?i.map((function(t){return t+""})):[i+""]},Nt.prototype._groupFilterLogic=function(t,e){return this._groupCriteria[this._groupLevel-1](e).indexOf(this._groupId)>=0},Nt.prototype._internalGroupSortingLogic=function(t,e){var i=this._groupMembers[t],n=this._groupMembers[e];return this._groupSortingLogic(t,e,i,n)},Nt.prototype._addGroup=function(t){var e=t+"";if(!e)return null;var i=this._groupMembers[e];if(i)return null;var n,o=(this._groupRowId||"_grp")+"_"+e;return this._hasListener("beforeGroupAdded")&&(n={dataView:this,newGroupId:e,newGroupValue:t,newGroupRowId:o,newGroupLevel:this._groupLevel+1},this._dispatch("beforeGroupAdded",n),n.cancel)?null:((i=new Nt)._groupId=e,"string"==typeof t?"null"==t?i._groupValue=null:"undefined"!=t&&(i._groupValue=t):i._groupValue=t,n&&!0===n.hideHeaderRow&&(i._hiddenHeaderRow=!0),i._groupRowId=o,i._groupLevel=this._groupLevel+1,i._groupCriteria=this._groupCriteria,i._preDefGroups=this._preDefGroups,i._groupLevel<i._groupCriteria.length&&(i._groupMembers={},i._groupList=[],i._groupView=[]),i._groupRows=this._groupRows,i._setParent(this),i._sortingDefs=this._sortingDefs,this._groupMembers[e]=i,this._groupList.push(e),this._groupRows[i._groupRowId]=i,this._hidden||(i._isHeaderRowShown()&&this._groupView.push(i._groupRowId),this._groupViewDirty=!0,i._beingAdded=!0,this._dispatch("groupAdded",{dataView:this,newGroup:i}),i._beingAdded=!1),i.listen("groupAdded",this._onGroupAdded),this._hasListener("beforeGroupAdded")&&i.listen("beforeGroupAdded",this._onBeforeGroupAdded),i)},Nt.prototype._triggerGroupRefreshing=function(){this._groupLevel>0?this._parent&&this._parent._triggerGroupRefreshing():this._groupRows&&!this._refreshTimerId&&(this._refreshTimerId=setTimeout(this._onRefreshTimeout,100))},Nt.prototype._rebuildRowIdsFromChildren=function(){if(this._groupViewDirty){if(this._rids.length=0,this._groupView&&(this._groupView.length=0),!this._hidden)for(var t=this._groupList.length,e=0;e<t;++e){var i=this._groupList[e],n=this._groupMembers[i];if(n._rebuildRowIdsFromChildren(),O.pushArrayItems(this._rids,n._rids),!this._collapsed&&this._groupView&&(n._isHeaderRowShown()&&this._groupView.push(n._groupRowId),!n._collapsed)){var o=n._getFirstHiddenRids()||n._groupView||n._rids;O.pushArrayItems(this._groupView,o),O.pushArrayItems(this._groupView,n._footerRowIds)}}this._groupViewDirty=!1,this._updatePageCount()||this._transformView()}},Nt.prototype._resolveGroupId=function(t){return this._groupCriteria[this._groupLevel](t)},Nt.prototype._markColumnStatsDirty=function(){for(var t in this._columnStats)this._columnStats[t].markDirty()},Nt._defaultFilterLogic=function(t,e,i,n){return n[t]===e},Nt._defaultGroupSortingLogic=function(t,e){return t==e?0:t<e?-1:1},Nt._proto=Nt.prototype;var Ht=Nt,Gt=function(t,e,i){this._onConflated=this._onConflated.bind(this),this._data=[],"function"==typeof t?this.setFunction(t,i):"function"==typeof e&&this.setFunction(e,i),"number"==typeof e?this.setConflatingTime(e):"number"==typeof t&&this.setConflatingTime(t)};Gt.prototype._data,Gt.prototype._func=null,Gt.prototype._delay=0,Gt.prototype._timerId=0,Gt.prototype._conflated=!1,Gt.prototype._disabled=!1,Gt.prototype.reset=function(){return this._timerId&&(clearTimeout(this._timerId),this._timerId=0),this.popAllData()},Gt.prototype.popAllData=function(){if(this._data.length){var t=this._data;return this._data=[],t}return null},Gt.prototype.dispose=function(){this._timerId&&(clearTimeout(this._timerId),this._timerId=0),this._data.length&&(this._data.length=0),this._func=null},Gt.prototype.conflate=function(t){return!this._disabled&&(null!=t&&this._data.push(t),!this._conflated&&(this._timerId||(this._timerId=setTimeout(this._onConflated,this._delay)),!0))},Gt.prototype.isConflating=function(){return this._timerId>0&&!this._conflated&&!this._disabled},Gt.prototype._onConflated=function(){this._conflated=!0;try{this._func()}catch(t){console.error(t.message||t)}this._timerId=0,this._data.length=0,this._conflated=!1},Gt.prototype.getData=function(){return this._data},Gt.prototype.setFunction=function(t,e){this._func=t,this._func=t?e?t.bind(e):t:null},Gt.prototype.setConflatingTime=function(t){this._delay=t||0,this._delay<0&&(this._delay=0)},Gt.prototype.disable=function(t){this._disabled=!1!==t},Gt.prototype.isEnabled=function(){return!this._disabled},Gt.prototype.enable=function(t){this._disabled=!1===t},Gt._proto=Gt.prototype;var Bt=Gt,Wt=function(t){var e=this;e._onDataChanged=e._onDataChanged.bind(e),e.extendEventArg=e.extendEventArg.bind(e),e._dataChangedConflator=new Bt(100,e._onDataChanged),e._grid=t,e._grid.setEventArgExtender("rowCountChanged",e.extendEventArg),e._grid.setEventArgExtender("rowHeightChanged",e.extendEventArg),e._grid.setEventArgExtender("rowAvailable",e.extendEventArg),e._grid.listen("rowAvailable",e._dispatch.bind(this,"rowAvailable")),e._addEvent("dataChanged"),e._addEvent("rowAvailable")};r.b.inherits(Wt,B),Wt._runningId=0,Wt.prototype._id="",Wt.prototype._type="",Wt.prototype._grid=null,Wt.prototype._snapshot=null,Wt.prototype._dataView=null,Wt.prototype._dataArg=null,Wt.prototype._autoSyncRowCount,Wt.prototype._bindingEnabled=!0,Wt.prototype._parent=null,Wt.prototype._children=null,Wt.prototype._dataChangedConflator,Wt.prototype.getId=function(){return this._id},Wt.prototype.setId=function(t){return this._id=t||"section"+Wt._runningId++,this._grid.setAttribute("id",this._id),this._id},Wt.prototype.getSection=function(){return this._snapshot||this._grid},Wt.prototype.getSectionName=function(){return this._grid.getId()},Wt.prototype.getIndex=function(){return this._grid.getIndex()},Wt.prototype.getType=function(){return this._type},Wt.prototype.setType=function(t){this._type!==t&&(this._type&&this._grid.removeClass(this._type),this._type=t||"",t&&this._grid.addClass(t))},Wt.prototype.getDataSource=function(){return this._dataView},Wt.prototype.setDataSource=function(t){var e=this;e.getAutoSyncRowCount()&&e._dataView!==t&&(e._dataView&&e._dataView.unlisten("dataChanged",this._onDataChanged),e._dataChangedConflator.reset(),e._dataArg=null,e._dataView=t,null!==e._dataView&&e._dataView.listen("dataChanged",e._onDataChanged),e._dispatchDataChanged(0,NaN))},Wt.prototype.getRootDataSource=function(){if(!this._dataView)return null;var t=this._dataView.getDataSource();if(!t)return null;for(;t.getDataSource();)t=t.getDataSource();return t},Wt.prototype.getData=function(t,e){return this._dataView?(e=this._getRowId(e),this._dataView.getData(e,t)):null},Wt.prototype.setData=function(t,e,i){return!!this._dataView&&(e=this._getRowId(e),this._dataView.setData(e,t,i),!0)},Wt.prototype.getRowData=function(t){return this._dataView?(t=this._getRowId(t),this._dataView.getRowData(t)):null},Wt.prototype.removeRowData=function(t){if(!this._dataView)return!1;var e=this.getRootDataSource();if(!e)return!1;t=this._getRowId(t);var i=e.getRowIndex(t);return!(i<0)&&(e.removeRow(i),!0)},Wt.prototype.activateColumns=function(t,e,i){if("content"===this._type)for(var n=i+1;--n>=e;){var o=t[n];null!=o&&this._grid.activateColumn(n,o)}},Wt.prototype.getChildren=function(){return this._children},Wt.prototype.setParent=function(t){if(this._parent){var e=this._parent._children.indexOf(this);e>=0&&(this._parent._children.splice(e,1),this._parent._children.length<=0&&(this._parent._children=null)),this._parent=null}this._parent=t,this._parent&&(this._parent._children||(this._parent._children=[]),this._parent._children.push(this))},Wt.prototype.getParent=function(){return this._parent},Wt.prototype.getDataChangedConflator=function(){return this._dataChangedConflator},Wt.prototype.disableConflation=function(t){this._dataChangedConflator.disable(t)},Wt.prototype.disableDataBinding=function(t){this._bindingEnabled=!1===t},Wt.prototype.getAutoSyncRowCount=function(){return null!=this._autoSyncRowCount?this._autoSyncRowCount:"content"===this._type},Wt.prototype.setAutoSyncRowCount=function(t){if(this._autoSyncRowCount=t,this.getAutoSyncRowCount()){var e=this._dataView?this._dataView.getVisibleRowCount():0;this._grid.setRowCount(e)}},Wt.prototype.isDataBindable=function(){return!(!this._bindingEnabled||!this._dataView)},Wt.prototype.dispose=function(){var t=this;t._dataChangedConflator.reset(),t._dataArg=null,t._grid&&t._grid.dispose(),t._dataView&&t._dataView.unlisten("dataChanged",t._onDataChanged),t.unlistenAll(),t.setParent(null),t._grid=null,t._dataView=null},Wt.prototype.extendEventArg=function(t){return t||(t={}),t.sectionSettings!==this&&(t.sectionSettings=this,t.section=this._snapshot||this._grid,t.sectionName=this._grid.getId(),t.sectionIndex=this._grid.getIndex(),t.sectionType=this._type,t.dataSource=this._dataView,this._snapshot?t.print=!0:t.print&&(t.print=!1)),t},Wt.prototype.extendRenderEventArg=function(t,e,i){return t=this.extendEventArg(t),e>=0||(this._snapshot?(e=0,i=this._grid.getRowCount()):(e=this._grid.getFirstIndexInView(),i=this._grid.getLastIndexInView()+1)),t.fromRowIndex=e,t.toRowIndex=i,t},Wt.prototype.extendDataEventArg=function(t,e,i){var n,o;if(t||(t={}),t.firstUpdate=e,t.lastUpdate=i,this._snapshot?(n=0,o=this._grid.getRowCount()):(n=this._grid.getFirstIndexInView(),o=this._grid.getLastIndexInView()+1),t.fromRowIndex=e>n?e:n,this._dataView){var r=this._dataView.getVisibleRowCount();t.dataRowCount=r,o>r&&(o=r)}return t.toRowIndex=i+1<o?i+1:o,this.extendEventArg(t),t},Wt.prototype.setIndex=function(t){this._grid.setIndex(t)},Wt.prototype.getRowOffset=function(){return this._grid.getRowOffset()},Wt.prototype.setRowOffset=function(t){this._grid.setRowOffset(t)},Wt.prototype.enableColumnVirtualization=function(t){t=!1!==t,"content"===this._type&&this._grid.enableColumnVirtualization(t)},Wt.prototype.isBinding=function(){return this._isEventDispatching("dataChanged")},Wt.prototype._onDataChanged=function(t){if(!this.isBinding()){if(this._bindingEnabled){if(t)this._mergeEvent(t);else if(!this._dataArg)return}else if(!this.getAutoSyncRowCount())return;this._dataChangedConflator.conflate()||(this._calculateChangeIndices(),this._dataArg?this._dispatchDataChanged(this._dataArg.firstUpdate,this._dataArg.lastUpdate):this._dispatchDataChanged(0,NaN))}},Wt.prototype._dispatchDataChanged=function(t,e){var i=this.getAutoSyncRowCount(),n=this._dataView?this._dataView.getVisibleRowCount():0,o=this._grid.getRowCount();i?n!==o&&this._grid.setRowCount(n,!0):n>o&&(e=o-1),this.updateRowData(t,e,this._dataArg),this._dataArg=null},Wt.prototype.updateRowData=function(t,e,i){this.isDataBindable()&&(i=this.extendDataEventArg(i,t,e)).fromRowIndex<i.toRowIndex&&this._dispatch("dataChanged",i)},Wt.prototype.rerender=function(){this.isDataBindable()?this.updateRowData():this._dispatch("rowAvailable",this.extendEventArg())},Wt.prototype.snapshot=function(t){if(t){this._snapshot=t;try{t.setColumnCount(this._grid.getColumnCount()),t.setRowCount(this._grid.getRowCount()),this._dispatch("rowAvailable",this.extendEventArg())}catch(t){console.warn("Unable to take a snapshot: "+t.message)}this._snapshot=null,this._dispatch("rowAvailable",this.extendEventArg())}},Wt.prototype._getRowId=function(t){return O.isNumber(t)?this._dataView.getRowId(t):t},Wt.prototype._mergeEvent=function(t){var e=this._dataArg;if(e||((e=this._dataArg={}).actualUpdate=!0,e.positionChangeOnly=!0,e.events=[],e.firstUpdate=NaN,e.lastUpdate=NaN,e.updatedRids={}),t.positionChangeOnly||(e.positionChangeOnly=!1),t.events?e.events=e.events.concat(t.events):e.events.push(t),!e.globalChange){if(t.globalChange)return e.globalChange=!0,e.firstUpdate=0,void(e.lastUpdate=NaN);var i=t.rids;if(i)for(var n=i.length;--n>=0;)e.updatedRids[i[n]]=!0;else t.rid&&(e.updatedRids[t.rid]=!0);"updated"!==t.type&&(e.indexShifted=!0,"removed"===t.type&&(e.dataRemoved=!0))}},Wt.prototype._calculateChangeIndices=function(){var t,e;if(this.isDataBindable()&&!this._dataArg.globalChange)if(this._dataArg.indexShifted){if(this._dataArg.dataRemoved)this._dataArg.firstUpdate=0;else for(t in this._dataArg.updatedRids)(e=this._dataView.getRowIndex(t))>=0&&(this._dataArg.firstUpdate<=e||(this._dataArg.firstUpdate=e));this._dataArg.lastUpdate=this._dataView.getVisibleRowCount()}else for(t in this._dataArg.updatedRids)(e=this._dataView.getRowIndex(t))>=0&&(this._dataArg.firstUpdate<=e||(this._dataArg.firstUpdate=e),this._dataArg.lastUpdate>=e||(this._dataArg.lastUpdate=e))},Wt._proto=Wt.prototype;var Ut=Wt,Yt=function(t){this._layout=t,this._arg={},this._addEvent("indexChanged")};r.b.inherits(Yt,B),Yt.prototype._layout,Yt.prototype._viewSize=0,Yt.prototype._viewOffset=0,Yt.prototype._startOffsetCount=0,Yt.prototype._endOffsetCount=0,Yt.prototype._bufferSize=0,Yt.prototype._arg=null,Yt.prototype._enabled=!0,Yt.prototype._active=!0,Yt.prototype._virtualizable=!1,Yt.prototype._getMinIndex=function(){return this._startOffsetCount},Yt.prototype._getMaxIndex=function(){var t=this._layout.getLaneCount()-this._endOffsetCount;return t>this._startOffsetCount?t:this._startOffsetCount},Yt.prototype.getContentStart=function(t){return this._layout.getLaneStart(t)},Yt.prototype.getContentInViewCount=function(){var t=this.getFirstIndexInView(),e=this.getLastIndexInView();return t>=0&&t<e?e-t+1:0},Yt.prototype._getContentSizeInBounds=function(){var t=this._getMinIndex(),e=this._getMaxIndex();return this._layout.getLaneStart(e)-this._layout.getLaneStart(t)},Yt.prototype.getViewSize=function(){return this._viewSize},Yt.prototype.getViewOffset=function(){var t=this._getMinIndex();return this._viewOffset+this._layout.getLaneStart(t)},Yt.prototype.getIndexOffset=function(){return this._startOffsetCount},Yt.prototype.isVirtualizable=function(){return this._virtualizable},Yt.prototype.getFirstIndexInView=function(){if(!this._virtualizable)return 0;var t=this.getViewOffset(),e=this._layout.getTrackSize();return t>=e&&(t=e-this._viewSize),t<0?0:this._layout.hitTest(t)},Yt.prototype.getLastIndexInView=function(){if(this._virtualizable){var t=this.getViewOffset()+this._viewSize,e=this._getMaxIndex();return t>=this._layout.getLaneStart(e)?e-1:this._layout.hitTest(t)}return this._layout.getLaneCount()-1},Yt.prototype.getPrevFirstIndexInView=function(){return null!=this._arg.prevFirstIndex?this._arg.prevFirstIndex:-1},Yt.prototype.getPrevLastIndexInView=function(){return null!=this._arg.prevLastIndex?this._arg.prevLastIndex:-1},Yt.prototype.update=function(t){if(!(!0===t||this._enabled&&this._active))return!1;if(this._isEventDispatching("indexChanged"))return!1;var e=this.getFirstIndexInView(),i=this.getLastIndexInView(),n=this._arg.prevFirstIndex!==e||this._arg.prevLastIndex!==i;return(t||n)&&(this._arg.firstIndex=e,this._arg.lastIndex=i,this._dispatch("indexChanged",this._arg),this._arg.prevFirstIndex=e,this._arg.prevLastIndex=i),n},Yt.prototype.isEnabled=function(){return this._enabled},Yt.prototype.enable=function(t){t=!1!==t,this._enabled!==t&&(this._enabled=t,this.validateVirtualization(),this.update(!0))},Yt.prototype.disable=function(t){this.enable(!1===t)},Yt.prototype.isActive=function(){return this._active},Yt.prototype.activate=function(t){t=!1!==t,this._active!==t&&(this._active=t,this.validateVirtualization(),this.update(!0))},Yt.prototype.deactivate=function(t){this.activate(!1===t)},Yt.prototype.getBufferSize=function(){return this._bufferSize},Yt.prototype.setContentLayout=function(t){this._layout!==t&&(this._layout=t,this.validateVirtualization())},Yt.prototype.setViewSize=function(t){t<0&&(t=0),this._viewSize!==t&&(this._viewSize=t,this.validateVirtualization())},Yt.prototype.setViewOffset=function(t){this._viewOffset=t>0?t:0,this.update()},Yt.prototype.setViewBounds=function(t,e){this._startOffsetCount=t>0?t:0,this._endOffsetCount=e>0?e:0,this.validateVirtualization()},Yt.prototype.setBufferSize=function(t){t<0&&(t=0),this._bufferSize!==t&&(this._bufferSize=t,this.validateVirtualization())},Yt.prototype.validateVirtualization=function(){this._virtualizable=!1,this._enabled&&this._active&&this._viewSize>0&&this._getContentSizeInBounds()>this._viewSize&&(this._virtualizable=!0)},Yt._proto=Yt.prototype;var qt=Yt,Xt=function(t,e){this._onInterval=this._onInterval.bind(this),"function"==typeof t?this._func=t:"function"==typeof e&&(this._func=e),"number"==typeof e?this._delay=e:"number"==typeof t&&(this._delay=t)};Xt.prototype._func=null,Xt.prototype._delay=0,Xt.prototype._timerId=0,Xt.prototype._pending=!1,Xt.prototype.start=function(){this._func&&(this._timerId?this._pending=!0:this._timerId=setInterval(this._onInterval,this._delay))},Xt.prototype.dispose=function(){this._timerId&&(clearInterval(this._timerId),this._timerId=0),this._func=null},Xt.prototype._onInterval=function(){this._pending?this._pending=!1:(this._func(),clearInterval(this._timerId),this._timerId=0)},Xt._proto=Xt.prototype;var jt=Xt,Kt=function(){var t=this;t._addEvents("scroll","activated","deactivated","scrollStart","scrollEnd","thicknessChanged","layoutChanged","enabled","disabled"),t._onTrackScroll=t._onTrackScroll.bind(t),t._onKeyDown=t._onKeyDown.bind(t),t._onStartFading=t._onStartFading.bind(t),t._onMouseWheel=t._onMouseWheel.bind(t),t._flash=t._flash.bind(t),t._onTouchStart=t._onTouchStart.bind(t),t._onTouchMove=t._onTouchMove.bind(t),t._onTouchEnd=t._onTouchEnd.bind(t),t._smoothScroll=t._smoothScroll.bind(t),t._updateEffectiveArea=t._updateEffectiveArea.bind(t),t._onRestingPosition=t._onRestingPosition.bind(t),t._element=document.createElement("div"),t._element.className="grid-scrollbar",t._trackContent=document.createElement("div"),t._panes=[],t._paneSliders=[],t._startPos={},t._endPos={},t._reverter=new jt(t._onRestingPosition,300),t._element.addEventListener("scroll",t._onTrackScroll),t._element.addEventListener("mouseover",t._flash),t._element.appendChild(t._trackContent),t.disableKeyboardInput(!1),Kt._queryNativeTrackThickness(t._dispatch.bind(t,"thicknessChanged")),t._updateEffectiveArea()||t.listen("thicknessChanged",t._updateEffectiveArea)};r.b.inherits(Kt,ct),Kt.prototype._vertical=!0,Kt.prototype._step=0,Kt.prototype._parentNode=null,Kt.prototype._hostClassName="",Kt.prototype._trackContent=null,Kt.prototype._panes=null,Kt.prototype._paneSliders=null,Kt.prototype._enabled=!0,Kt.prototype._active=!1,Kt.prototype._isFrozen=!1,Kt.prototype._otherScrollbar=null,Kt.prototype._autoHideScrollbar=!0,Kt.prototype._trackSize=120,Kt.prototype._tContentSize=0,Kt.prototype._tScrollVal=0,Kt.prototype._tPercentVal=0,Kt.prototype._paneSize=0,Kt.prototype._pContentSize=0,Kt.prototype._pScrollVal=0,Kt.prototype._footerCount=0,Kt.prototype._fadingId=0,Kt.prototype._postponeFading=!1,Kt.prototype._layoutChanged=!1,Kt.prototype._contentDirty=!0,Kt.prototype._layoutDirty=!0,Kt.prototype._touchInput=!0,Kt.prototype._swiping=!1,Kt.prototype._touchDrag=!1,Kt.prototype._startPos,Kt.prototype._endPos,Kt.prototype._smoothing=!0,Kt.prototype._smoothingId=0,Kt.prototype._smoothingSpeed=0,Kt.prototype._wheelScrolling="",Kt.prototype._mouseWheelLogic=null,Kt._trackThickness=0,Kt._queryTimeout=0,Kt._queryStarted=!1,Kt._outerDummy=null,Kt._innerDummy=null,Kt._listeners=null,Kt.prototype._updateEffectiveArea=function(){var t=this.getTrackThickness();if(t){var e=this._vertical?"width":"height";this._element.style[e]=t+1+"px"}return!!t},Kt._queryNativeTrackThickness=function(t){if(Kt._queryStarted||Kt._repeatQuery(),t&&Kt._trackThickness<=0){var e=Kt._listeners;e||(e=Kt._listeners=[]),e.push(t)}},Kt._repeatQuery=function(){Kt._queryStarted=!0,Kt._retrieveNativeTrackThinkness()||(Kt._queryTimeout+=100,Kt._queryTimeout<3e3?setTimeout(Kt._repeatQuery,Kt._queryTimeout):(Kt._trackThickness=13,Kt._clearStaticResources()))},Kt._retrieveNativeTrackThinkness=function(){if(Kt._trackThickness>0)return!0;var t=Kt._innerDummy,e=Kt._outerDummy;t||((t=Kt._innerDummy=document.createElement("p")).style.width="100%",t.style.height="200px",(e=Kt._outerDummy=document.createElement("div")).style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.appendChild(t)),e.style.overflow="hidden",document.body.appendChild(e);var i=t.offsetWidth;e.style.overflow="scroll";var n=t.offsetWidth;return i==n&&(n=e.clientWidth),document.body.removeChild(e),(Kt._trackThickness=i-n)>0&&(Kt._clearStaticResources(),!0)},Kt._clearStaticResources=function(){Kt._innerDummy=Kt._outerDummy=null;var t=Kt._listeners;if(t){Kt._listeners=null;for(var e={},i=t.length;--i>=0;)t[i](e)}},Kt.updateTrackThickness=function(){Kt._trackThickness=0,Kt._queryTimeout=0,Kt._queryStarted=!1,Kt._queryNativeTrackThickness()},Kt.prototype.dispose=function(){this.unlistenAll(),this._smoothingId&&(clearInterval(this._smoothingId),this._smoothingId=0),this._active=this._layoutChanged=!1,this._dispose();for(var t=this._panes.length;--t>=0;)this._panes[t].dispose(),this._paneSliders[t].dispose();this._reverter.dispose()},Kt.prototype.getContent=function(t){return this._paneSliders[0].getContent(t)},Kt.prototype.getParent=function(){return this._parentNode},Kt.prototype.setParent=function(t,e){var i=O.getElement(t),n=this._parentNode!==i;n&&this._parentNode&&(this.removeWheelListener(this._parentNode),this._parentNode.classList.remove(this._hostClassName)),this.isActive()?(this._setParent(i,e),this._parentNode=this._element.parentNode,this._parentNode&&this._parentNode.classList.add(this._hostClassName)):this._parentNode=i,n&&this.addWheelListener(this._parentNode)},Kt.prototype.attachToExternalElement=function(t){this.setParent(t);var e=this.getElement();e.style.right="0",this._vertical?e.style.overflowX="hidden":e.style.overflowY="hidden",e.style.boxSizing="border-box",e.style.position="absolute",e.style.outline="none"},Kt.prototype._onActiveStateChange=function(){var t,e=this;if(e._scrollTo(0,!0),e._active){for(e._parentNode&&(e._layoutDirty=!0,e._setParent(e._parentNode),e._parentNode.classList.add(e._hostClassName)),e._flash(),t=e._panes.length;--t>=0;)e._panes[t].removeClass("scroll-disabled");e._dispatch("activated",{})}else{e._setParent(null),e._parentNode&&e._parentNode.classList.remove(e._hostClassName);var i=e._vertical?"height":"width";for(t=e._panes.length;--t>=0;)e._panes[t].addClass("scroll-disabled"),e._panes[t].setStyle(i,"");e._dispatch("deactivated",{})}e._vertical&&e._otherScrollbar&&e._otherScrollbar.isActive()&&e._otherScrollbar.invalidate()},Kt.prototype._onEnablingStateChange=function(){var t=this;t._enabled?t._dispatch("enabled",{}):t._dispatch("disabled",{})},Kt.prototype.isActive=function(){return this._active},Kt.prototype.isEnabled=function(){return this._enabled},Kt.prototype.enable=function(t){t=!1!==t,this._enabled!=t&&(this._enabled=t,this._updateLayout(),this._onEnablingStateChange())},Kt.prototype.disable=function(t){this.enable(!1===t)},Kt.prototype.getTrackSize=function(){return this._trackSize},Kt.prototype.getPaneSize=function(){return this._paneSize},Kt.prototype.getContentSize=function(){return this._pContentSize},Kt.prototype.getTrackThickness=function(){return Kt._trackThickness},Kt.prototype.getScrollGap=function(){return this._pContentSize-this.getPaneSize()},Kt.prototype.setTrackSize=function(t,e){this._trackSize=t>0?t:0,this._paneSize=e>0?e:0},Kt.prototype.calculateContentSize=function(){return 0},Kt.prototype.update=function(){if(this._contentDirty){this._contentDirty=!1;var t=this.calculateContentSize();(!t||t<0)&&(t=0),this._pContentSize!==t&&(this._pContentSize=t,this._layoutDirty=!0)}return!!this._layoutDirty&&(this._layoutDirty=!1,this._updateLayout(),!0)},Kt.prototype.invalidate=function(t,e){this._contentDirty=!0,this._layoutDirty=!0,null!=e&&(this._pScrollVal=e),t&&this.update()},Kt.prototype.invalidateContent=function(){this._contentDirty=!0},Kt.prototype.isScrollPosValid=function(t){var e=t-this.getPaneSize(),i=this._pScrollVal;return 0===i||i>0&&e>0&&i<e},Kt.prototype.flash=function(){this.update(),this._flash()},Kt.prototype._scroll=function(t){this._scrollTo(this._pScrollVal+t)},Kt.prototype._scrollTo=function(t,e){if(this._active||e){t=this._calcProperScrollValue(t);var i=!1;this._pScrollVal!==t&&(this._pScrollVal=t,i=!0),this._setTrackScrollVal(t),i?(e&&(this._layoutChanged=!0),this._dispatchScrollEvent(null)):e&&this._dispatch("layoutChanged",{})}},Kt.prototype._calcProperScrollValue=function(t){if(!t||t-.5<0)return 0;if(this._tPercentVal>=1&&Math.abs(this._pScrollVal-t)<=2)return this._pScrollVal;var e=this.getScrollGap();if(e<=0)return 0;if(t+.5>=e)return e;var i=this._step;if(i){if((t=Math.round(t/i)*i)-i/2<=0)return 0;if(t+i/2>=e)return e}return Math.round(t)},Kt.prototype._convertTrackToPane=function(t){t=Math.round(t);var e=this._getTrackGap();this._tPercentVal>=1&&Math.abs(this._tScrollVal-t)<=5&&(t=e),this._tScrollVal=t,this._tPercentVal=e?t/e:0;var i=this.getScrollGap();return e===i?t:this._tPercentVal*i},Kt.prototype._setTrackScrollVal=function(t){var e=this._getTrackGap(),i=0;if(e>0){if(t>0){var n=this.getScrollGap();i=e===n?t:t/n*e,i=Math.round(i)}i>=e&&(i=e)}if(i!==this._tScrollVal){this._tScrollVal=i,this._tPercentVal=e?i/e:0;var o=this._element;return this._vertical?o.scrollTop=i:o.scrollLeft=i,!0}return!1},Kt.prototype._getTrackGap=function(){var t=this._tContentSize-this.getTrackSize();return t>0?t:0},Kt.prototype._getScrollValue=function(){return this._pScrollVal},Kt.prototype._isEndOfScroll=function(){return!this._active||this._pScrollVal>=this.getScrollGap()},Kt.prototype._isStartOfScroll=function(){return!this._pScrollVal},Kt.prototype._isOnEdge=function(t){return t<0&&this._isStartOfScroll()||t>0&&this._isEndOfScroll()},Kt.prototype._flash=function(){this._active&&this._autoHideScrollbar&&(this._fadingId?this._postponeFading=!0:(this._element._fading&&(this._element.classList.remove("grid-scroll-fadeout"),this._element._fading=!1),this._fadingId=setTimeout(this._onStartFading,1e3)))},Kt.prototype._clearAllPanes=function(){for(var t=this._panes.length;--t>=0;){this._panes[t].setParent(null);var e=this._paneSliders[t];e._content=e._columns=null;for(var i=e.getElement();null!==i.firstChild;)i.removeChild(i.firstChild)}},Kt.prototype.disableKeyboardInput=function(t){!1===t?(this._element.setAttribute("tabindex","0"),this._element.addEventListener("keydown",this._onKeyDown,!1)):(this._element.removeAttribute("tabindex"),this._element.removeEventListener("keydown",this._onKeyDown,!1))},Kt.prototype.disableTouchInput=function(t){this._touchInput=!1===t},Kt.prototype.setAutoHide=function(t){this._autoHideScrollbar=t,t||(this._element._fading&&(this._element.classList.remove("grid-scroll-fadeout"),this._element._fading=!1),this._fadingId&&(clearTimeout(this._fadingId),this._fadingId=0))},Kt.prototype.getAutoHide=function(){return this._autoHideScrollbar},Kt.prototype.setOtherScrollbar=function(t){this._otherScrollbar=t},Kt.prototype.setFooterCount=function(t){this._footerCount=t},Kt.prototype._calcActiveState=function(){if(this._enabled&&this.getTrackSize()>20){var t=this.getPaneSize();if(t>0)return this._pContentSize-t>0}return!1},Kt.prototype._updateLayout=function(){var t=this._calcActiveState();if(t!==this._active&&(this._active=t,this._onActiveStateChange()),this._active){var e=this.getTrackSize(),i=this.getPaneSize();if(this._tContentSize=this._pContentSize/i*e,this._vertical)this._trackContent.style.height=this._tContentSize+"px",this._element.style.height=e+"px",this._panes[0].setHeight(i);else{this._trackContent.style.width=this._tContentSize+"px",this._element.style.width=e+"px";for(var n=this._panes.length;--n>=0;)this._panes[n].setWidth(i)}this._scrollTo(this._pScrollVal,!0)}},Kt.prototype.resetPaneSize=function(){for(var t=this._vertical?"height":"width",e=this._panes.length;--e>=0;)this._panes[e].setStyle(t,"")},Kt._preventVScrolling=function(t){t.currentTarget.scrollTop=0},Kt._preventHScrolling=function(t){t.currentTarget.scrollLeft=0},Kt.prototype._addPaneAt=function(t){null==t&&(t=this._panes.length);var e=this._panes[t];if(!e){if((e=new ct(document.createElement("div"))).setClass("grid-pane"),this._vertical?(e.addClass("sections"),e.listen("scroll",Kt._preventVScrolling)):(e.addClass("columns"),e.listen("scroll",Kt._preventHScrolling)),this._active||e.addClass("scroll-disabled"),this._paneSize&&this._active){var i=this.getPaneSize();this._vertical?e.setHeight(i):e.setWidth(i)}e.listen("touchstart",this._onTouchStart),e.listen("touchmove",this._onTouchMove),e.listen("touchend",this._onTouchEnd),e.listen("touchcancel",this._onTouchEnd);var n=new ct(document.createElement("div"));n.setClass("grid-pane-slider"),n.setParent(e),this._panes[t]=e,this._paneSliders[t]=n}return e},Kt.prototype._onStartFading=function(t){this._fadingId=0,this._active&&(this._postponeFading?(this._postponeFading=!1,this._flash()):this._element._fading||(this._element.classList.add("grid-scroll-fadeout"),this._element._fading=!0))},Kt.prototype._onTrackScroll=function(t){var e=this._vertical?t.target.scrollTop:t.target.scrollLeft,i=this._convertTrackToPane(e);(i=this._calcProperScrollValue(i))!==this._pScrollVal&&(this._pScrollVal=i,this._dispatchScrollEvent(t))},Kt.prototype._onRestingPosition=function(){this._setSliderPosition(-this._pScrollVal,!0)},Kt.prototype._setSliderPosition=function(t,e){var i="",n="",o=this._vertical?"top":"left";t&&(e?n=t+"px":(i=this._vertical?"translateY":"translateX",i+="("+t+"px)",this._reverter.start()));for(var r=this._paneSliders.length;--r>=0;){var s=this._paneSliders[r],a=s.getElement().style;s._titleSection?a[o]=t+"px":(a.transform=i,a[o]=n)}e?this._dispatch("scrollEnd",{}):this._dispatch("scrollStart",{})},Kt.prototype._dispatchScrollEvent=function(t){if(this._setSliderPosition(-this._pScrollVal,!1),this._flash(),!this._isEventDispatching("scroll")){if(!t){var e=this._element;t={currentTarget:e,srcElement:e,target:e}}t.layoutChanged=this._layoutChanged,this._vertical?t.scrollTop=this._pScrollVal:t.scrollLeft=this._pScrollVal,this._dispatch("scroll",t)}},Kt.prototype._onKeyDown=function(t){if(this._isFrozen)O._preventDefault(t);else if(this._active){if(this._vertical?38===t.keyCode||40===t.keyCode:37===t.keyCode||39===t.keyCode){var e=this.getScrollGap(),i=Math.round(.07*e);i<10?i=10:i>100&&(i=100),37!==t.keyCode&&38!==t.keyCode||(i*=-1),this._scroll(i),O._preventDefault(t)}}},Kt.prototype._onTouchStart=function(t){this._isFrozen?O._preventDefault(t):!this._swiping&&this._touchInput&&(this._vertical&&this.update(),this._flash(),this._smoothingId&&(clearInterval(this._smoothingId),this._smoothingId=0),this._swiping=!0,this._getTouchInfo(t,this._startPos))},Kt.prototype._onTouchMove=function(t){var e=this;if(e._isFrozen)O._preventDefault(t);else if(e._swiping&&e._active&&e._touchInput&&!(t.touches&&t.touches.length>1)){var i=e._startPos,n=e._endPos;e._getTouchInfo(t,n);var o=this._vertical?i.y-n.y:i.x-n.x;if(!(o>-5&&o<5||e._isOnEdge(o))){if(e._touchDrag)e._scrollTo(i.scrollValue+o);else n.timeStamp-i.timeStamp>30&&(e._touchDrag=!0);t.cancelable&&t.preventDefault()}}},Kt.prototype._onTouchEnd=function(t){if(this._isFrozen)O._preventDefault(t);else if(this._swiping=!1,this._touchDrag&&(this._touchDrag=!1,t.cancelable&&t.preventDefault(),this._smoothing&&!this._smoothingId)){var e=this._startPos,i=this._getTouchInfo(t,this._endPos),n=i.timeStamp-e.timeStamp,o=this._vertical?e.y-i.y:e.x-i.x;this._smoothingSpeed=30*o/n,(this._smoothingSpeed>10||this._smoothingSpeed<-10)&&(this._smoothingId=setInterval(this._smoothScroll,25))}},Kt.prototype._getTouchInfo=function(t,e){var i=t.changedTouches[0];return e||(e={}),e.x=i.pageX,e.y=i.pageY,e.timeStamp=t.timeStamp,e.scrollValue=this._getScrollValue(),e},Kt.prototype._smoothScroll=function(){var t=this._smoothingSpeed;t=.9*t|0,this._smoothingSpeed=t,t>1||t<-1?this._scroll(t):(clearInterval(this._smoothingId),this._smoothingId=0)},Kt.prototype.disableMouseWheel=function(t){!1===t?this.setMouseWheelLogic(this._mouseWheelLogic||this._onMouseWheel):this.setMouseWheelLogic(null)},Kt.prototype.setMouseWheelLogic=function(t){this.removeWheelListener(this._parentNode),this._mouseWheelLogic=t,this._mouseWheelLogic&&this.addWheelListener(this._parentNode)},Kt.prototype.addWheelListener=function(t){t&&this._mouseWheelLogic&&t.addEventListener("wheel",this._mouseWheelLogic,!1)},Kt.prototype.removeWheelListener=function(t){t&&this._mouseWheelLogic&&t.removeEventListener("wheel",this._mouseWheelLogic,!1)},Kt.prototype.setMouseWheelSpeed=function(t){this._wheelScrolling="string"==typeof t?t:""},Kt.prototype.getMouseWheelSpeed=function(){return this._wheelScrolling},Kt.prototype.getDefaultMouseWheelLogic=function(){return this._onMouseWheel},Kt.prototype._onMouseWheel=function(t){if(this._isFrozen)O._preventDefault(t);else if(!(t.ctrlKey||t.altKey||t.shiftKey)&&this.isActive()){var e=this._vertical?t.deltaY:t.deltaX;if(e&&!this._isOnEdge(e)){if(O._preventDefault(t),t.deltaMode&&(e=e>0?100:-100),"linear"!=this._wheelScrolling){var i=this.getContentSize();i>=4e3&&(e*=1+i/4e3|0)}this.update(),this._scroll(e)}}},Kt.prototype.setScrollingStep=function(t){this._step=t>0?t:0},Kt.prototype.freezeScrolling=function(t){var e=this._isFrozen;return this._isFrozen=!1!==t,e},Kt._proto=Kt.prototype;var Jt=Kt,Qt=function(){var t=this;t._vertical=!1,t._onDeactivated=t._onDeactivated.bind(t),t._onActivated=t._onActivated.bind(t),t._hostClassName="hscrollbar-host",Qt.base(this,"constructor"),t._element.classList.add("grid-hscroll"),t._trackContent.style.height="1px",t.disableMouseWheel(!1),t.listen("activated",t._onActivated),t.listen("deactivated",t._onDeactivated)};r.b.inherits(Qt,Jt),Qt.prototype._pinnedRightColumnCount=0,Qt.prototype.setScrollContent=function(t,e,i,n){this._clearAllPanes();var o=e.length;if(!(o<=0)){this._pinnedRightColumnCount=n>0?n:0;var r=e[0],s=r.getColumnCount(),a=s-n;(!a||a<0)&&(a=s);for(var l=0;l<o;++l){r=e[l];var u,h,p=this._addPaneAt(l),d=this._paneSliders[l],c=p.getElement(),_=d.getElement();for(c.classList.toggle("right-pinning",!!this._pinnedRightColumnCount),u=0;u<i;++u)(h=r.getColumn(u)).setScrollState(c,null,!1);p.setParent(r.getColumnHost());var f=[],g=[];for(u=i;u<a;++u)(h=r.getColumn(u)).setScrollState(null,_,this.isActive()),f.push(h),g.push(h.getElement());for(u=a;u<s;++u)(h=r.getColumn(u)).setScrollState(null,null,!1);var y=r.getReservedSpace();y&&(this._pinnedRightColumnCount||(d.addContent(y),g.push(y)),r._updateRightSpaceStyle(this.isActive()&&!this._pinnedRightColumnCount)),r._updateLayers(),d._titleSection=r.getElement().classList.contains("title"),d._columns=f,d._content=g}this.invalidateContent()}},Qt.prototype.setWidth=function(t){return this.setTrackSize(t,t),!0},Qt.prototype.getWidth=function(){return this.getPaneSize()},Qt.prototype.getScrollLeft=function(){return this._getScrollValue()},Qt.prototype.setScrollLeft=function(t){this.update(),this._scrollTo(t)},Qt.prototype.setPaneLeft=function(t){for(var e=t&&this.isActive()?-t+"px":"",i=this._panes.length;--i>=0;)this._paneSliders[i].setStyle("marginLeft",e)},Qt.prototype.isEndOfHorizontalScroll=function(){return this._isEndOfScroll()},Qt.prototype.getContentWidth=function(){var t=this._paneSliders[0],e=0;if(t)for(var i=t._content,n=i.length;--n>=0;){var o=i[n],r=o?o.style.width:0;r&&(e+=parseFloat(r))}return e},Qt.prototype.calculateContentSize=function(){return this.getContentWidth()},Qt.prototype.getTrackSize=function(){return this._footerCount<=0&&this._otherScrollbar&&this._otherScrollbar.isActive()&&!this._pinnedRightColumnCount?this._trackSize-this.getTrackThickness():this._trackSize},Qt.prototype._onActivated=function(t){this._updateActivation(!0)},Qt.prototype._onDeactivated=function(t){this._updateActivation(!1)},Qt.prototype._updateActivation=function(t){for(var e=this._paneSliders.length,i=0;i<e;++i)for(var n=this._paneSliders[i]._columns,o=n?n.length:0,r=0;r<o;++r){var s=n[r];s.getElement()&&s.enableAbsolutePosition(t)}},Qt._proto=Qt.prototype;var Zt=Qt,$t=function(){var t=this;t._vertical=!0,t._hostClassName="vscrollbar-host",$t.base(this,"constructor"),t._onScroll=t._onScroll.bind(t),t._addPaneAt(),t._element.classList.add("grid-vscroll"),t._trackContent.style.width="1px",t.disableMouseWheel(!1),t.listen("scroll",t._onScroll),t._addEvent("contentScrolled")};r.b.inherits($t,Jt),$t.prototype.setScrollContent=function(t,e,i){this._clearAllPanes();var n=e.length;if(!(n<=0)){for(var o=this._panes[0],r=this._paneSliders[0],s=0;s<i;)e[s++].setParent(t);o.setParent(t);for(var a=n-this._footerCount;s<a;)e[s++].setParent(r);for(;s<n;)e[s++].setParent(t);this.invalidateContent()}},$t.prototype.setHeight=function(t){return this.setTrackSize(t,t),!0},$t.prototype.getHeight=function(){return this.getPaneSize()},$t.prototype.getScrollTop=function(){return this._getScrollValue()},$t.prototype.setScrollTop=function(t){this.update(),this._scrollTo(t)},$t.prototype.isEndOfVerticalScroll=function(){return this._isEndOfScroll()},$t.prototype.getContentHeight=function(){for(var t=this._paneSliders[0].getContent(!0),e=0,i=t.length;--i>=0;)e+=t[i].offsetHeight;return e},$t.prototype.calculateContentSize=function(){return this.getContentHeight()},$t.prototype.getPane=function(){return this._panes[0]},$t.prototype._onScroll=function(t){this._dispatch("contentScrolled",t)},$t._proto=$t.prototype;var te=$t,ee=function(t,e){var i=this;i._onRestingPosition=i._onRestingPosition.bind(i),i._element=t||document.createElement("div"),i._element.className="tr-vlg",e&&i.enableClass(e,!0),i._grid=new Pt(null,{owner:this}),i._grid.setParent(i._element),i._layoutY=new vt,i._selectionList=new zt,i._reverter=new jt(i._onRestingPosition,200),i._addEvent("rowHighlighted"),i._addEvent("rowCountChanged"),i._addEvent("rowHeightChanged"),i._addEvent("rowAvailable")};r.b.inherits(ee,ct),ee.prototype._index=-1,ee.prototype._indexOffset=0,ee.prototype._firstIndex=0,ee.prototype._grid,ee.prototype._layoutY,ee.prototype._selectionList=null,ee.prototype._reverter=null,ee.prototype.getWidth=function(){return this.isVisible()?this._grid.getWidth():0},ee.prototype.getHeight=function(){return this.isVisible()?this._element.offsetHeight:0},ee.prototype.dispose=function(){this.setRowCount(0),this.unlistenAll(),this._grid.dispose(),this._dispose(),this._reverter.dispose()},ee.prototype.setWidth=function(t){return this._grid.setWidth(t)},ee.prototype.setHeight=function(t){return console.log("unsupported"),!1},ee.prototype.show=function(t){this._element.style.display=!1!==t?"":"none",this._dispatchRowHeightChangedEvent(0,this._layoutY.getLaneCount())},ee.prototype.hitTest=function(t,e){var i=[];return i.colIndex=this._grid.hitTestX(t),i.rowIndex=this._layoutY.hitTest(e),i},ee.prototype.hitTestX=function(t){return this._grid.hitTestX(t)},ee.prototype.hitTestY=function(t){return this._layoutY.hitTest(t)},ee.prototype.getDefaultColumnWidth=function(){return this._grid.getDefaultColumnWidth()},ee.prototype.setDefaultColumnWidth=function(t){this._grid.setDefaultColumnWidth(t)},ee.prototype.getDefaultRowHeight=function(){return this._layoutY.getDefaultLaneSize()},ee.prototype.setDefaultRowHeight=function(t){this._layoutY.getDefaultLaneSize()!==t&&(this._layoutY.setDefaultLaneSize(t),this._element.style.height=this._layoutY.getTrackSize()+"px",this._grid.setDefaultRowHeight(t),this._dispatchRowHeightChangedEvent(0,this._layoutY.getLaneCount()))},ee.prototype.getColumnWidth=function(t){return this._grid.getColumnWidth(t)},ee.prototype.setColumnWidth=function(t,e){return this._grid.setColumnWidth(t,e)},ee.prototype._setColumnWidth=function(t,e){return this._grid._setColumnWidth(t,e)},ee.prototype._updateColumnLayout=function(){this._grid._updateColumnLayout()},ee.prototype.getRowHeight=function(t){return this._layoutY.getLaneSize(t)},ee.prototype.setRowHeight=function(t,e){return!!this._layoutY.setLaneSize(t,e)&&(this._grid.setRowHeight(t-this._firstIndex,e),this._element.style.height=this._layoutY.getTrackSize()+"px",this._dispatchRowHeightChangedEvent(t,t+1))},ee.prototype.isColumnVisible=function(t){return this._grid.isColumnVisible(t)},ee.prototype.hideColumn=function(t,e){return this._grid.hideColumn(t,e)},ee.prototype.isRowVisible=function(t){return this._grid.isRowVisible(t-this._firstIndex)},ee.prototype.hideRow=function(t,e){return this._grid.hideRow(t-this._firstIndex,e)},ee.prototype.getMinimumColumnWidth=function(t){return this._grid.getMinimumColumnWidth(t)},ee.prototype.setMinimumColumnWidth=function(t,e){return this._grid.setMinimumColumnWidth(t,e)},ee.prototype.getMinimumRowHeight=function(t){return this._layoutY.getMinimumLaneSize(t)},ee.prototype.setMinimumRowHeight=function(t,e){return console.log("unsupported"),!1},ee.prototype.getCellLeft=function(t){return this._grid.getCellLeft(t)},ee.prototype.getCellTop=function(t){return this._layoutY.getLaneStart(t)},ee.prototype.getCellWidth=function(t,e){return this._grid.getCellWidth(t,0)},ee.prototype.getCellHeight=function(t,e){return this._layoutY.getLaneSize(e)},ee.prototype.hasCellSpan=function(){return this._grid.hasCellSpan()},ee.prototype.getCellRowSpan=function(t,e){return this._grid.getCellRowSpan(t,e-this._firstIndex)},ee.prototype.setCellRowSpan=function(t,e,i){return this._grid.setCellRowSpan(t,e-this._firstIndex,i)},ee.prototype.getCellColSpan=function(t,e){return this._grid.getCellColSpan(t,e-this._firstIndex)},ee.prototype.setCellColSpan=function(t,e,i){return this._grid.setCellColSpan(t,e-this._firstIndex,i)},ee.prototype.clearCellSpans=function(){return this._grid.clearCellSpans()},ee.prototype.clearColumnSpans=function(t){return this._grid.clearColumnSpans(t)},ee.prototype.clearColumnCustomizations=function(){this._grid.clearColumnCustomizations()},ee.prototype.clearRowCustomizations=function(){this._layoutY.clearLaneCustomizations(),this._grid.clearRowCustomizations()},ee.prototype.getColumnScalability=function(t){return this._grid.getColumnScalability(t)},ee.prototype.setColumnScalability=function(t,e){return this._grid.setColumnScalability(t,e)},ee.prototype.getRowScalability=function(t){return this._layoutY.getLaneScalability(t)},ee.prototype.setRowScalability=function(t,e){return console.log("unsupported"),!1},ee.prototype.getCell=function(t,e,i){return this._grid.getCell(t,e-this._firstIndex,i)},ee.prototype.getCellContent=function(t,e){return this._grid.getCellContent(t,e-this._firstIndex)},ee.prototype.setCellContent=function(t,e,i){return this._grid.setCellContent(t,e-this._firstIndex,i)},ee.prototype.getColumnCount=function(){return this._grid.getColumnCount()},ee.prototype.setColumnCount=function(t){this._grid.setColumnCount(t)},ee.prototype.getRowCount=function(){return this._layoutY.getLaneCount()},ee.prototype.setRowCount=function(t,e){var i=this._layoutY.getLaneCount();i!==t&&(this._layoutY.setLaneCount(t),this._element.style.height=this._layoutY.getTrackSize()+"px",this._dispatch("rowCountChanged",{rowCount:t,prevCount:i,noBinding:e}))},ee.prototype.getVisibleRowCount=function(){return this.getRowCount()},ee.prototype.addRow=function(t){t<=0||(this._grid.getColumnCount()<=0?console.log("WARNING: Row cannot be added, unless at least one column is added"):this.setRowCount(this._layoutY.getLaneCount()+t))},ee.prototype.removeRow=function(t){if(!(t<=0)){var e=this._layoutY.getLaneCount();t>e&&(t=e),this.setRowCount(e-t)}},ee.prototype.setBorders=function(t,e,i,n){this._grid.setBorders(t,e,i,n)},ee.prototype.getColumnStyle=function(t,e){return this._grid.getColumnStyle(t,e)},ee.prototype.setColumnStyle=function(t,e,i){this._grid.setColumnStyle(t,e,i)},ee.prototype.enableColumnClass=function(t,e,i){this._grid.enableColumnClass(t,e,i)},ee.prototype.hasColumnClass=function(t,e){return this._grid.hasColumnClass(t,e)},ee.prototype.enableRowClass=function(t,e,i){this._grid.enableRowClass(t-this._firstIndex,e,i)},ee.prototype.setRowStyle=function(t,e,i,n){this._grid.setRowStyle(t-this._firstIndex,e,i,n)},ee.prototype.getContentWidth=function(){return this._grid.getContentWidth()},ee.prototype.getContentHeight=function(){return this._layoutY.getTrackSize()},ee.prototype.getCellsByRowIndex=function(t){return this._grid.getCellsByRowIndex(t-this._firstIndex)},ee.prototype.disableHorizontalGridLine=function(t){this._grid.disableHorizontalGridLine(t)},ee.prototype.disableVerticalGridLine=function(t){this._grid.disableVerticalGridLine(t)},ee.prototype.enableShading=function(t){this._grid.enableShading(t)},ee.prototype.setTransposedShading=function(t){this._grid.setTransposedShading(t)},ee.prototype.enableRowHighlighting=function(t){this._grid.enableRowHighlighting(t)},ee.prototype.getRowHighlight=function(){var t=this._grid.getRowHighlight();return t>=0&&(t+=this._firstIndex),t},ee.prototype.setRowHighlight=function(t){var e=this._grid.getRowHighlight();if(e>=0&&(e+=this._firstIndex),this._grid.setRowHighlight(t-this._firstIndex),(t=this._grid.getRowHighlight())>=0&&(t+=this._firstIndex),this._hasListener("rowHighlighted")){var i={};i.prevRowIndex=e,i.rowIndex=t,this._dispatch("rowHighlighted",i)}},ee.prototype.getSelectedRows=function(){return this.getSelectedRowCount()>0?this._selectionList.getAllSelections():null},ee.prototype.getSelectedRowCount=function(){return this._selectionList.getSelectionCount()},ee.prototype.isSelectedRow=function(t){return this._selectionList.getSelection(t)},ee.prototype.setSelectedRow=function(t,e){this._selectionList.setSelection(t,e);var i=t-this._firstIndex;this._grid.setSelectedRow(i,this._selectionList.getSelection(t))},ee.prototype.selectSingleRow=function(t){this.clearSelectedRows(),this.setSelectedRow(t)},ee.prototype.selectRowRange=function(t,e){this._selectionList.selectRange(t,e),this._updateRowSelection()},ee.prototype.clearSelectedRows=function(){var t=this._selectionList.clearAllSelections();return this._grid.clearSelectedRows(),t},ee.prototype.getFirstSelectedRow=function(){return this._selectionList.getFirstSelectedIndex()},ee.prototype.getLastSelectedRow=function(){return this._selectionList.getLastSelectedIndex()},ee.prototype.getRowAnchor=function(){return this._selectionList.getSelectionAnchor()},ee.prototype.setRowAnchor=function(t){this._selectionList.setSelectionAnchor(t)},ee.prototype.activateColumn=function(t,e){this._grid.activateColumn(t,e)},ee.prototype.activateRows=function(t,e,i){var n=this._layoutY.getLaneCount();t||(t=this._rowOffset),e||0===e||(e=t+n),(t-=this._rowOffset)<0&&(t=0),(e-=this._rowOffset)<0&&(e=0);var o=this._getInnerRowCount(),r=this._firstIndex,s=0;(s=t-(1&t))<0?s=0:s>n&&(s=n);var a=e+(1&e)-s;a+2===o&&(a=o),a<0?a=0:a+s>n&&(a=n-s),this._firstIndex=s;var l=s+a,u=this._layoutY.getLaneStart(s),h=this._grid.getElement();h&&(h.style.transform=u?"translateY("+u+"px)":"",h.style.top="",this._reverter.start()),this._grid._onEnterDocument();var p=!1;if(a!==o){if(this._grid.setRowCount(a),a>o){var d={};d.prevRowIndex=s+o,d.rowIndex=s+a,i&&(d.noDataUpdate=!0),this._dispatch("rowAvailable",d)}p=!0}if(i){if(!p){this._grid.clearSelectedRows();var c=r+o;s<r&&r<l&&c>=l?(this.moveRowsToTop(l-r),i[0]=s,i[1]=r):r<s&&s<c&&l>=c?(this.moveRowsToTop(s-r),i[0]=c,i[1]=l):s===r&&l===c?(i[0]=0,i[1]=0):p=!0}p&&(i[0]=s,i[1]=l)}this._layoutY.isHomogeneous()||this._grid._updateRowHeights(this._layoutY,s),this._updateRowSelection()},ee.prototype.moveRowsToTop=function(t){this._grid.moveRowsToTop(t)},ee.prototype.getFirstIndexInView=function(){return this._firstIndex},ee.prototype.getLastIndexInView=function(){return this._firstIndex+this._getInnerRowCount()-1},ee.prototype.isInCurrentView=function(t){return this._firstIndex<=t&&t<this._firstIndex+this._getInnerRowCount()},ee.prototype.getFrozenLayout=function(){return this._grid.getFrozenLayout()},ee.prototype.setFrozenLayout=function(t){this._grid.setFrozenLayout(t)},ee.prototype.getColumn=function(t){return this._grid.getColumn(t)},ee.prototype.insertColumn=function(t,e){return this._grid.insertColumn(t,e)},ee.prototype.removeColumnAt=function(t){return this._grid.removeColumnAt(t)},ee.prototype.moveColumn=function(t,e){this._grid.moveColumn(t,e)},ee.prototype.enableRowVirtualization=function(t){},ee.prototype.enableColumnVirtualization=function(t){this._grid.enableColumnVirtualization(t)},ee.prototype.getColumnIndex=function(t){return this._grid.getColumnIndex(t)},ee.prototype.getCellIndex=function(t,e){var i=this._grid.getCellIndex(t,e);return i<0?-1:i+this._firstIndex},ee.prototype.getIndex=function(){return this._index},ee.prototype.setIndex=function(t){this._index=t},ee.prototype.setRowOffset=function(t){this._rowOffset=t},ee.prototype.getRowOffset=function(){return this._rowOffset},ee.prototype.updateLayout=function(){},ee.prototype.stretchCell=function(t,e,i,n){return this._grid.stretchCell(t,null!=e?e-this._firstIndex:null,i,n)},ee.prototype.unstretchCell=function(t,e){return this._grid.unstretchCell(t,null!=e?e-this._firstIndex:null)},ee.prototype.unstretchAllCells=function(t,e){return this._grid.unstretchAllCells()},ee.prototype.getStretchedCell=function(t,e){return this._grid.getStretchedCell(t,null!=e?e-this._firstIndex:null)},ee.prototype.getStretchedCells=function(){return this._grid.getStretchedCells()},ee.prototype.updateStretchedCells=function(){return this._grid.updateStretchedCells()},ee.prototype.getColumnHost=function(){return this._grid.getElement()},ee.prototype.setHidingMethod=function(t){this._grid.setHidingMethod(t)},ee.prototype.getHidingMethod=function(){return this._grid.getHidingMethod()},ee.prototype.setColumnVisibility=function(t,e,i){return this._grid.setColumnVisibility(t,e,i)},ee.prototype.getRowLayout=function(){return this._layoutY},ee.prototype.reserveRightSpace=function(t){return this._grid.reserveRightSpace(t)},ee.prototype.getReservedSpace=function(){return this._grid.getReservedSpace()},ee.prototype.getComputedStyle=function(){return this._grid.getComputedStyle()},ee.prototype.isColumnActive=function(t){return this._grid.isColumnActive(t)},ee.prototype.setRowAttributes=function(t,e){return this._grid.setRowAttributes(t,e)},ee.prototype.getContextRow=function(t){return this._grid.getContextRow(t-this._firstIndex)},ee.prototype._getInnerRowCount=function(){return this._grid.getRowCount()},ee.prototype._updateRowSelection=function(){this._grid.clearSelectedRows();var t=this._selectionList,e=t.getSelectionCount();if(!(e<=0)){var i,n=this._firstIndex,o=n+this._getInnerRowCount();if(1===e)n<=(i=t.getFirstSelectedIndex())&&i<o&&this._grid.setSelectedRow(i-n,!0);else if(e>=o-n)for(i=n;i<o;++i)t.getSelection(i)&&this._grid.setSelectedRow(i-n,!0);else for(var r=t.getAllSelections(),s=0;s<e;++s)n<=(i=r[s])&&i<o&&this._grid.setSelectedRow(i-n,!0)}},ee.prototype._dispatchRowHeightChangedEvent=function(t,e){if(t>=e)return!1;var i={};return i.rowIndex=t,i.changeLength=e-t,this._dispatch("rowHeightChanged",i),!0},ee.prototype._onRestingPosition=function(){var t=this._grid.getElement();if(t){var e=this._layoutY.getLaneStart(this._firstIndex);t.style.transform="",t.style.top=e?e+"px":""}},ee.prototype._updateRightSpaceStyle=function(t){this._grid._updateRightSpaceStyle(t)},ee.prototype._updateLayers=function(){this._grid._updateLayers()},ee.prototype._setContext=function(t){this._grid._setContext(t)},ee.prototype._getContext=function(){return this._grid._getContext()},ee._proto=ee.prototype;var ie=ee,ne=function(t){ne._sectionType||(ne._sectionType={},ne._sectionType.title=!0,ne._sectionType.header=!0,ne._sectionType.content=!0,ne._sectionType.footer=!0);var e=this;if(e._onMouseMove=e._onMouseMove.bind(e),e._onRowHightlighted=e._onRowHightlighted.bind(e),e._onWindowResize=e._onWindowResize.bind(e),e._onSectionDataChanged=e._onSectionDataChanged.bind(e),e._onRowCountChanged=e._onRowCountChanged.bind(e),e._onRowHeightChanged=e._onRowHeightChanged.bind(e),e._onRowAvailable=e._onRowAvailable.bind(e),e._onVScroll=e._onVScroll.bind(e),e._onHScroll=e._onHScroll.bind(e),e._onSyncVScroll=e._onSyncVScroll.bind(e),e.updateLayout=e.updateLayout.bind(e),e._onRowRefresh=e._onRowRefresh.bind(e),e._onVScrollEnabled=e._onVScrollEnabled.bind(e),e._onVScrollDisabled=e._onVScrollDisabled.bind(e),e._onRowInViewChanged=e._onRowInViewChanged.bind(e),e._onColInViewChanged=e._onColInViewChanged.bind(e),e._updateVScrollbar=e._updateVScrollbar.bind(e),t)for(var i=t.childNodes.length;--i>=0;)O.isElement(t.childNodes[i])||t.removeChild(t.childNodes[i]);e._element=t||document.createElement("div"),e._element.classList.add("tr-grid"),e._layoutX=new vt,e._layoutY=new vt,e._layoutX.setDefaultLaneSize(100),e._layoutY.setDefaultLaneSize(32),e._settings=[],e._plugins={},e._columnDefs=[],e._sectionStarts=[],e._rowHeightException="title",e._rowVirtualizer=new qt(e._layoutY),e._rowVirtualizer.deactivate(),e._rowVirtualizer.setViewSize(360),e._colVirtualizer=new qt(e._layoutX),e._colVirtualizer.enable(!1),e._colVirtualizer.deactivate(),e._colVirtualizer.setViewSize(400),e._vscrollbar=new te,e._vscrollbar.disable(),e._vscrollbar.setParent(this.getParent()||this.getElement()),e._vscrollbar.listen("scroll",e._onVScroll),e._vscrollbar.listen("layoutChanged",e._onVScroll),e._vscrollbar.listen("activated",e.updateLayout),e._vscrollbar.listen("deactivated",e.updateLayout),e._vscrollbar.listen("thicknessChanged",e.updateLayout),e._vscrollbar.listen("enabled",e._onVScrollEnabled),e._vscrollbar.listen("disabled",e._onVScrollDisabled),e._hscrollbar=new Zt,e._hscrollbar.disable(),e._hscrollbar.setParent(this.getParent()||this.getElement()),e._hscrollbar.listen("scroll",this._onHScroll),e._hscrollbar.listen("layoutChanged",this._onHScroll),e._hscrollbar.listen("activated",this.updateLayout),e._hscrollbar.listen("deactivated",this.updateLayout),e._hscrollbar.setOtherScrollbar(e._vscrollbar),e._vscrollbar.setOtherScrollbar(e._hscrollbar),O.isMobile?e._element.addEventListener("touchmove",this._onMouseMove,!1):e._element.addEventListener("mousemove",this._onMouseMove,!1),window.addEventListener("resize",e._onWindowResize,!1),e._rowVirtualizer.listen("indexChanged",e._onRowInViewChanged),e._colVirtualizer.listen("indexChanged",e._onColInViewChanged),e._rowHeightConflator=new Bt(e._onRowHeightChanged,50),e._vScrollbarConflator=new Bt(e._updateVScrollbar,200),e._addEvents("sectionAdded","columnAdded","columnRemoved","columnMoved","columnVisibilityChanged","columnAlignmentChanged","widthChanged","dataSourceChanged","postDataSourceChanged","preSectionRender","postSectionRender","preSectionDataBinding","postSectionDataBinding","rowExpansionBinding","rowHighlighted","preForcedUpdate","rowAdded","rowRemoved");var n=ne.map;n||(n={},ne.map=n);var o=e._element;o._control=e;var r=o.id||o.name;r&&!n[r]||(r="_grid"+ne._runningGridId),e._id=r,n[r]=e,ne._runningGridId++;var s=document.createElement("input");s.style.position="absolute",s.style.width="0",s.style.height="0",s.style.padding="0",s.style.border="0",s.value="0",e._hiddenInput=s,o.insertBefore(s,o.firstChild),Object.defineProperty(e,"zoomFactor",{set:function(t){!t||t<0||this._zoomFactor!==t&&(this._zoomFactor=t,e._updateLayout())},get:function(){return this._zoomFactor}})};r.b.inherits(ne,ct),ne.SectionReference,ne.MouseInfo,ne.CellReference,ne.ColumnOptions,ne._runningGridId=0,ne._runningColumnId=0,ne._sectionType,ne.prototype._plugins,ne.prototype._dataSource=null,ne.prototype._layoutX,ne.prototype._layoutY,ne.prototype._vscrollbar,ne.prototype._hscrollbar,ne.prototype._tempFrozenSectionRef="",ne.prototype._startVScrollbarIndex=-1,ne.prototype._startHScrollbarIndex=0,ne.prototype._pinnedRightColumnCount=0,ne.prototype._frozenFooterCount=0,ne.prototype._fixFrozenTopSections=!1,ne.prototype._fixFrozenBottomSection=!1,ne.prototype._sectionStarts,ne.prototype._settings,ne.prototype._firstSettings,ne.prototype._lastSettings,ne.prototype._fitContentWidth=!1,ne.prototype._columnDefs,ne.prototype._rowVirtualizer,ne.prototype._colVirtualizer,ne.prototype._autoSetDataSource=!0,ne.prototype._renderingHandler=null,ne.prototype._dataBindingHandler=null,ne.prototype._frozenLayout=!1,ne.prototype._noBinding=!1,ne.prototype._rowHeightSync=!0,ne.prototype._rowHighlighting=!1,ne.prototype._dispatchingDataChanged=!1,ne.prototype._rowHeightException="",ne.prototype._rowScrollingStep=0,ne.prototype._zoomFactor=1,ne.prototype._reservedSpace=0,ne.prototype._hidingMethod="",ne.prototype._rowHeightConflator=null,ne.prototype._rowRefreshTimer=0,ne.prototype._layoutUpdating=!1,ne.prototype._hiddenInput,ne.prototype._bottomPadding=6,ne.prototype._bottomPaddingSect=null,ne.prototype._preserveProportion=!1,ne.prototype._preserveGridSize=!1,ne.getVersion=function(){return"5.0.38"},ne.prototype.dispose=function(){var t=this._id,e=ne.map;if(e[t]){e[t]=null,this._disposed=!0,this._rowRefreshTimer&&(clearTimeout(this._rowRefreshTimer),this._rowRefreshTimer=0),this.unlistenAll(),window.removeEventListener("resize",this._onWindowResize,!1);for(var i=this._columnDefs.length;--i>=0;){var n=this._getColumnDef(i);n.renderingHandler=n.dataBindingHandler=null}for(var o in this._plugins){var r=this._plugins[o];r.unload&&r.unload(this)}this.removeAllSections();var s=this._vscrollbar._mainScrollbar;s&&(s.unlisten("scroll",this._onSyncVScroll),this._vscrollbar._mainScrollbar=null),this._vscrollbar.dispose(),this._hscrollbar.dispose(),this._rowHeightConflator.dispose();var a=this._element;null!==a&&(a._control&&delete a._control,a.removeChild(this._hiddenInput)),this._dispose(),this._columnDefs.length=0,delete this._plugins}else console.log("WARNING: Core grid is disposed twice")},ne.prototype.isDisposed=function(){return this._disposed},ne.prototype.setParent=function(t,e){this._setParent(t,e),this._onParentChange()},ne.prototype.insertBefore=function(t){this._insertBefore(t),this._onParentChange()},ne.prototype._onParentChange=function(){var t=this.getParent()||this.getElement();this._vscrollbar._mainScrollbar||this._vscrollbar.setParent(t),this._hscrollbar.setParent(t),this._updateLayout()},ne.prototype.getConfigObject=function(t){var e=t||{},i=this.getColumnCount();e.columns||(e.columns=[]);for(var n=0;n<i;n++){var o=e.columns[n];o||(o=e.columns[n]={});var r=this._getColumnDef(n);r.styles&&(o.styles=r.styles),null!=r.stationary&&(o.stationary=r.stationary)}this._rowHighlighting&&(e.rowHighlighting=!0),this._pinnedRightColumnCount&&(e.pinnedRightColumns=this._pinnedRightColumnCount),e.columnVirtualization=this._colVirtualizer.isEnabled(),this._fixFrozenTopSections&&(e.topFreezingCount=this._startVScrollbarIndex>=0&&this._startVScrollbarIndex+1),this._fixFrozenBottomSection&&(e.bottomFreezingCount=this._frozenFooterCount),this._rowScrollingStep&&(e.stepScroll=1===this._rowScrollingStep||this._rowScrollingStep),e.autoHideScrollbar=this._vscrollbar.getAutoHide();var s=this._vscrollbar.getMouseWheelSpeed();s&&(e.linearWheelScrolling=s),this.hasClass("no-borders")&&(e.borders=!1),this.hasClass("no-gridlines")&&(e.gridlines=!1),this.hasClass("no-vertical-grid-line")&&(e.verticalLines=!1),this.hasClass("no-horizontal-grid-line")&&(e.horizontalLines=!1),this._bottomPaddingSect&&(e.contentBottomPadding=this._bottomPadding),this._reservedSpace>0&&(e.contentRightPadding=this._reservedSpace);var a=this.getDataConflationRate();for(var l in a&&(e.dataConflationRate=a),this._plugins){var u=this._plugins[l];"function"==typeof u.getConfigObject&&u.getConfigObject(e)}return e},ne.prototype.fillParentWidth=function(t){if(this._fitContentWidth)return!1;if(this._layoutX.isFixedSize())return!1;var e=this._element,i=(0|e.getBoundingClientRect().width)-e.clientLeft;return null!==this._layoutX.setTrackSize(i,this._reservedSpace)},ne.prototype.show=function(t){this._element.style.display=!1!==t?"":"none",!1!==t&&this.updateLayout()},ne.prototype.getContentWidth=function(){return this._layoutX.getTrackSize()},ne.prototype.getSectionCount=function(){return this._settings.length},ne.prototype._updateFrozenTopSections=function(){if(!this._fixFrozenTopSections){var t=this._getTopSectionCount();this._freezeTopSectionAt(t-1)}},ne.prototype._updateFrozenBottomSections=function(){if(!this._fixFrozenBottomSection){var t=this._getBottomSectionCount();this._setFrozenFooter(t)}},ne.prototype._getTopSectionCount=function(){for(var t=this._settings,e=t.length,i=0,n=0;n<e;n++){var o=t[n].getType();if("header"!==o&&"title"!==o)break;i++}return i},ne.prototype._getBottomSectionCount=function(){for(var t=this._settings,e=0,i=t.length-1;i>=0;i--){if("footer"!==t[i].getType())break;e++}return e},ne.prototype.addSection=function(t,e){return this.addSectionAt(this.getSectionCount(),t,e)},ne.prototype.addSectionAt=function(t,e,i){var n=this._settings.length;t<0&&(t=0),t>n&&(t=n);var o=this._toSectionType(e),r="bottomPadding"===i,s=this._newSection(r?"footer":o,i);if(!s)return null;var a=s.getSection();if(r&&(s.setAutoSyncRowCount(!1),this._bottomPaddingSect=a),t>=n?(this._putToLast(a),this._settings.push(s)):(this._settings.splice(t,0,s),a.insertBefore(this._settings[t+1].getSection())),this._updateSectionIndices(t),"footer"===(o=s.getType())?this._updateFrozenBottomSections():"header"!==o&&"title"!==o||this._updateFrozenTopSections(),this._onColumnCountChanged(),this._onSectionCountChanged(!0),this._colVirtualizer.isEnabled()){var l=this._getColActivationList(),u=this.getColumnCount();s.activateColumns(l,0,u-1)}if(this._hasListener("sectionAdded")){var h=s.extendEventArg();this._dispatch("sectionAdded",h)}return a},ne.prototype.removeSection=function(t){var e=this.getSection(t);return null!==e?this.removeSectionAt(e.getIndex()):null},ne.prototype.removeSectionAt=function(t){var e=this._settings.length;if(t>=0&&t<e){var i=this._settings[t],n=i.getIndex(),o=i.getSection(),r=i.getType();return o.setRowCount(0),this._settings.splice(t,1),this._updateSectionIndices(n),"footer"===r?(this._updateFrozenBottomSections(),this._onColumnCountChanged()):"header"!==r&&"title"!==r||this._updateFrozenTopSections(),this._onSectionCountChanged(),i.dispose(),o}return null},ne.prototype.removeLastSection=function(){return this.removeSectionAt(this._settings.length-1)},ne.prototype.removeAllSections=function(){for(var t=this._settings.length,e=0;e<t;++e){this._settings[e].dispose()}this._bottomPaddingSect=null,this._firstSettings=this._lastSettings=null,this._settings.length=0,this._updateSectionIndices(0),this._onSectionCountChanged()},ne.prototype.setBottomPaddingSection=function(t){var e=this._bottomPaddingSect;t?("number"==typeof t&&(this._bottomPadding=t),e||(e=this.addSection("content","bottomPadding")),e&&(e.setDefaultRowHeight(this._bottomPadding),e.getRowCount()||e.addRow(1))):e&&this.removeSection(e)},ne.prototype._updatePaddingBottomSect=function(){var t=this._bottomPaddingSect;if(t){var e=this._settings.length-1;if(e>0){var i=this._settings[e];if(i.getSection()!==t){for(var n=null,o=e;--o>=0;){var r=this._settings[o];if(r.getSection()===t){n=r;break}}if(o>=0)return this._putToLast(t),this._settings.splice(o,1),this._settings.push(n),n.setType("footer"===i.getType()?"footer":"content"),!0;this._bottomPaddingSect=null}else{var s=this._settings[e-1];s&&i.setType("footer"===s.getType()?"footer":"content")}}}return!1},ne.prototype.moveSection=function(t,e){var i=this.getSectionCount();if(t<0)t=0;else if(t>=i)return;if(e<0?e=0:e>=i&&(e=i-1),t!==e){var n=this._settings[t],o=this._settings[e];O.moveArrayItem(this._settings,t,e),o?n.getSection().insertBefore(o.getSection()):this._putToLast(n.getSection()),this._updateSectionIndices(t<=e?t:e),this._syncRowHeights(),this._onSectionCountChanged(),this._frozenLayout||this._rowVirtualizer.update(!0)}},ne.prototype.getSection=function(t){var e=this.getSectionSettings(t);return null!==e?e.getSection():null},ne.prototype.getSectionSettings=function(t){if(O.isString(t)){if(ne._sectionType[t])return this._getNextSection(1,null,t);for(var e=this._settings.length;--e>=0;)if(this._settings[e].getId()===t)return this._settings[e]}else if(null!=t){var i=-1;if(null!=t.getIndex?i=t.getIndex():O.isNumber(t)&&(i=t),i>=0&&i<this._settings.length)return this._settings[i]}return null},ne.prototype.getAllSections=function(t){if(null==t)return this._getAllSections();for(var e=this.getAllSectionSettings(t),i=e,n=i.length;--n>=0;)i[n]=e[n].getSection();return i},ne.prototype.getAllSectionSettings=function(t){if(!t)return this._settings;var e=this._settings.length,i=[];t=this._toSectionType(t);for(var n=0;n<e;++n){var o=this._settings[n];t===o.getType()&&i.push(o)}return i},ne.prototype.getSectionIndex=function(t){if(O.isNumber(t))return t;if(t instanceof MouseEvent){var e=O.getRelativePosition(t,this._element),i={};return this._hitTestY(e.y,i),i.sectionIndex}var n=this.getSection(t);return null==n?-1:n.getIndex()},ne.prototype.getSectionTop=function(t){var e=this.getSection(t);if(null==e)return 0;var i=this._layoutY.getLaneStart(e.getRowOffset());return this._startVScrollbarIndex>=0&&e.getIndex()>=this._startVScrollbarIndex&&(i-=this._vscrollbar.getScrollTop()),i},ne.prototype.getPreviousSection=function(t,e){null==t&&(t=this._settings.length);var i=this._getNextSection(-1,t,e);return null!==i?i.getSection():null},ne.prototype.getNextSection=function(t,e){var i=this._getNextSection(1,t,e);return null!==i?i.getSection():null},ne.prototype.getLastSection=function(){return this.getSection(this._settings.length-1)},ne.prototype.getCell=function(t,e,i,n){var o=this.getSection(t);return o?o.getCell(e,i,n):null},ne.prototype.getCellInfo=function(t){if(!t)return null;var e=t.colIndex,i=t.rowIndex,n=t.sectionName,o=null;if(null==e||null==i)(o=this.getRelativePosition(t)).hit||(o=null);else{n||(n="content");var r=this.getSectionSettings(n);if(r)r.getSection().getCell(e,i)&&((o={}).colIndex=e,o.rowIndex=i,r.extendEventArg(o))}return o},ne.prototype.getNextCellInRow=function(t,e){return this._getNextCellInRow(t,null!=e?e:1)},ne.prototype.getPrevCellInRow=function(t,e){return this._getNextCellInRow(t,null!=e?-e:-1)},ne.prototype._getNextCellInRow=function(t,e){var i=this.getCellInfo(t);if(i){var n=i.colIndex+e,o=i.rowIndex,r=i.section;i.colIndex=n,i.cell=r.getCell(n,o)}return i},ne.prototype.getNextCell=function(t){var e=this.getNextCellInRow(t);if(e&&!e.cell){var i=e.section,n=e.colIndex=0,o=e.rowIndex;e.rowIndex=++o,e.cell=i.getCell(n,o)}return e},ne.prototype.getPrevCell=function(t){var e=this.getPrevCellInRow(t);if(e&&!e.cell){var i=e.section,n=e.colIndex=i.getColumnCount()-1,o=e.rowIndex;e.rowIndex=--o,e.cell=i.getCell(n,o)}return e},ne.prototype.getColumnCount=function(){return this._layoutX.getLaneCount()},ne.prototype.setColumnCount=function(t){var e=this._layoutX.getLaneCount();if(t>=e){this._layoutX.setLaneCount(t);for(var i=this._settings.length;--i>=0;){this._settings[i].getSection().setColumnCount(t)}this._onColumnCountChanged(),this._syncLayoutToColumns(e,t),this._dispatchColumnAddedEvent(e,t-e,!1)}else this._removeColumn(e-t)},ne.prototype.insertColumn=function(t,e){var i=this.getColumnCount();t<i||(t=i),this._layoutX.insertLane(t);for(var n=this._settings.length;--n>=0;){this._settings[n].getSection().insertColumn(t)}var o=this._countPinnedRightColumns();if(this._columnDefs.splice(t,0,null),i>0){var r=this._countPinnedLeftColumns();t<r&&r<i+1?this.freezeColumn(r,o):t>i-o&&this.freezeColumn(r-1,o+1)}this._onColumnCountChanged(),this._deserializeColumn(t,e),this._syncLayoutToColumns(t,t+1),this._dispatchColumnAddedEvent(t,1,t<i,e)},ne.prototype.insertColumns=function(t,e){var i=this.getColumnCount();t<i||(t=i);var n,o=0;if(Array.isArray(e)){if(1===(o=e.length))return void this.insertColumn(t,e[0]);n=e}else{if("number"!=typeof e)return void this.insertColumn(t,e);if(1===(o=e))return void this.insertColumn(t,null)}if(!(o<=0)){var r=this._countPinnedLeftColumns(),s=this._countPinnedRightColumns(),a=this.freezeLayout(),l=[t,0].concat(new Array(o));Array.prototype.splice.apply(this._columnDefs,l);for(var u=0;u<o;u++){var h=t+u;this._layoutX.insertLane(h);for(var p=this._settings.length;--p>=0;){this._settings[p].getSection().insertColumn(h)}var d=n&&n[u];this._deserializeColumn(h,d)}i>0?t<r?this.freezeColumn(r+o-1,s):t>i-s&&this.freezeColumn(r-1,s+o):r+this._pinnedRightColumnCount<o&&this.freezeColumn(r-1,this._pinnedRightColumnCount),this._dispatchColumnAddedEvent(t,o,t<i,n),this.freezeLayout(a)}},ne.prototype.removeColumnAt=function(t){var e=this.getColumnCount();if(t<0||t>=e)return null;var i=-1;this._colVirtualizer.isVirtualizable()&&(i=this._colVirtualizer.getLastIndexInView());for(var n=this._layoutX.removeLaneAt(t),o=this._settings.length,r=0;r<o;++r)this._settings[r].getSection().removeColumnAt(t);var s=this._countPinnedLeftColumns(),a=this._countPinnedRightColumns(),l=this._columnDefs.splice(t,1)[0];if(t<s?this.freezeColumn(s-2,a):t>=e-a&&this.freezeColumn(s-1,a-1),this._onColumnCountChanged(),this._syncLayoutToColumns(t,e-1,!0),l||(l={}),l.layout=n,this._hasListener("columnRemoved")){var u={atTheMiddle:!0};u.colIndex=t,u.columns="deprecated",u.columnData=l.columnData,u.colId=l.id||"",this._dispatch("columnRemoved",u)}return t<=i&&i===this._colVirtualizer.getLastIndexInView()&&this._colVirtualizer.update(),l},ne.prototype.removeAllColumns=function(){this.getColumnCount()>0&&(this._startHScrollbarIndex=0,this._pinnedRightColumnCount=0,this.setColumnCount(0))},ne.prototype.getStationaryColumnIndex=function(){for(var t=this.getColumnCount()-1;t>=0;t--)if(this._getColumnDef(t).stationary)return t;return-1},ne.prototype.isColumnMoveAllowed=function(t,e){if(Array.isArray(t)||(t=[t]),0===t.length||null==e)return!1;var i=this.getStationaryColumnIndex();if(i>-1){if(e<=i)return!1;for(var n=0;n<t.length;n++)if(t[n]<=i)return!1}return!0},ne.prototype.moveColumn=function(t,e){var i=this.getColumnCount();if(t<0?t=0:t>=i&&(t=i-1),e<0?e=0:e>=i&&(e=i-1),t===e)return!1;if(!this.isColumnMoveAllowed(t,e))return!1;var n=-1;this._colVirtualizer.isVirtualizable()&&(n=this._colVirtualizer.getLastIndexInView());var o=this._getColumnId(t);this._layoutX.moveLane(t,e);for(var r=this._settings.length,s=0;s<r;++s){this._settings[s].getSection().moveColumn(t,e)}var a=this._columnDefs[t],l=this._countPinnedRightColumns();if(O.moveArrayItem(this._columnDefs,t,e),t<this._startHScrollbarIndex?e>=i-l?this.freezeColumn(this._startHScrollbarIndex-2,l+1):e>=this._startHScrollbarIndex&&this.freezeColumn(this._startHScrollbarIndex-2,l):a.rightPinned?e<this._startHScrollbarIndex?this.freezeColumn(this._startHScrollbarIndex,l-1):e<i-l&&this.freezeColumn(this._startHScrollbarIndex-1,l-1):e<this._startHScrollbarIndex?this.freezeColumn(this._startHScrollbarIndex,l):e>=i-l&&this.freezeColumn(this._startHScrollbarIndex-1,l+1),this._hasListener("columnMoved")){var u={};u.fromColIndex=t,u.toColIndex=e,u.colId=o,this._dispatch("columnMoved",u)}return n===this._colVirtualizer.getLastIndexInView()&&(t<=n&&e>n||e<=n&&t>n)&&this._colVirtualizer.update(),!0},ne.prototype.getColumnLayout=function(){return this._layoutX},ne.prototype.updateColumnLayout=function(){this._syncLayoutToColumns(0,this.getColumnCount())},ne.prototype._deserializeColumn=function(t,e){if(e){var i,n=e.layout||e,o=e.width;null!=o&&(n.size=o),null!=(o=e.scalable)&&(n.scalable=o),null!=(o=e.minWidth)&&(n.minSize=o),null==n.scalable&&(n.scalable=null==n.size),this._layoutX.deserializeLane(t,n);var r=e.styles;for(i in r)this.setColumnStyle(t,i,r[i]);var s=e.classes;for(i in s)this.enableColumnClass(t,i,s[i]);var a=this._getColumnDef(t),l=e.dataColumnName;null!=l&&(a.dataColumnName=dataColumnName),null!=(l=e.stationary)&&(a.stationary=l),this.setColumnRenderingHandler(t,e.renderingHandler),this.setColumnDataBindingHandler(t,e.dataBindingHandler),(l=e.columnData)&&this.setColumnData(t,l);var u=e.formatter||e.binding;if(Array.isArray(u)&&(u=u[0]),u&&"function"!=typeof u){var h=u.init;"function"==typeof h&&h(e,this)}}},ne.prototype.addRow=function(t){if(null==t)t=1;else if(t<=0)return;this.getColumnCount()<=0&&this.setColumnCount(1);var e=this.getLastSection();null==e&&(e=this.addSection()),e.addRow(t)},ne.prototype.removeRow=function(t){var e=this.getLastSection();null!=e&&(null==t&&(t=1),e.removeRow(t))},ne.prototype.getRowCount=function(){return this._layoutY.getLaneCount()},ne.prototype.setSectionRowCount=function(t,e){var i=this.getSection(t);null!=i&&i.setRowCount(e)},ne.prototype.getRowIndex=function(t,e){return this._sectionStarts[t]+e},ne.prototype.getRelativeIndex=O._deprecatedFunction,ne.prototype.removeAllRows=function(){for(var t=this._settings.length,e=0;e<t;++e)this._settings[e].getSection().setRowCount(0),this._sectionStarts[e]=0;this._sectionStarts[t]=0},ne.prototype.getDefaultRowHeight=function(){return this._layoutY.getDefaultLaneSize()},ne.prototype.setDefaultRowHeight=function(t,e){if(this._layoutY.setDefaultLaneSize(t)){this._rowHeightSync=!1;var i=this._layoutY.getDefaultLaneSize();this._rowHeightException=e?"":"title";for(var n=this._settings.length,o=0;o<n;++o){var r=this._settings[o];r.getType()!==this._rowHeightException&&"bottomPadding"!==r.getId()&&r.getSection().setDefaultRowHeight(i)}this._syncRowHeights(),this._rowHeightSync=!0,this.setRowScrollingStep(this._rowScrollingStep)}},ne.prototype.getDataSource=function(){return this._dataSource},ne.prototype.setDataConflationRate=function(t){this._dataSource.setConflationRate(t)},ne.prototype.getDataConflationRate=function(){return this._dataSource.getConflationRate()},ne.prototype.setDataSource=function(t){t&&t instanceof J&&(t=new Ht(t));var e={};if(e.prevDataSource=this._dataSource,this._dataSource=t||null,e.dataSource=this._dataSource,this._dispatch("dataSourceChanged",e),this._autoSetDataSource)for(var i=this._settings.length,n=0;n<i;++n)this._settings[n].setDataSource(t);return this._dispatch("postDataSourceChanged",e),this._dataSource},ne.prototype.setColumnTemplate=O._deprecatedFunction,ne.prototype.getColumnTemplate=O._deprecatedFunction,ne.prototype.getColumnRenderEvent=O._deprecatedFunction,ne.prototype.getColumnDataBindingEvent=function(t){console.log("getColumnDataBindingEvent() is deprecated. Use setColumnDataBindingHandler() instead");var e=this;return{listen:function(i){e.setColumnDataBindingHandler(t,i)},unlisten:function(){e.setColumnDataBindingHandler(t,null)}}},ne.prototype.setColumnStyle=function(t,e,i,n){if(e){var o;O.isNumber(t)||(t=0,console.log("WARNING: the first parameter for setColumnStyle must be column index")),null==n?o=this._getNestedColumnDef(t,"styles"):(n=this._toSectionType(n),o=this._getNestedColumnDef(t,n,"styles")),o[e]=i;for(var r=this._settings.length;--r>=0;){var s=this._settings[r];if(null==n||n===s.getType())s.getSection().setColumnStyle(t,e,i)}}},ne.prototype.enableColumnClass=function(t,e,i,n){var o;"number"!=typeof t&&(t=0),null==n?o=this._getNestedColumnDef(t,"classes"):(n=this._toSectionType(n),o=this._getNestedColumnDef(t,n,"classes"));var r=!1;if((i=!1!==i)?o[e]||(r=o[e]=!0):o[e]&&(delete o[e],r=!0),r)for(var s=this._settings.length;--s>=0;){var a=this._settings[s];null!=n&&n!==a.getType()||a.getSection().enableColumnClass(t,e,i)}return r},ne.prototype.hasColumnClass=function(t,e,i){var n;return null==i?n=this._getNestedColumnDef(t,"classes"):(i=this._toSectionType(i),n=this._getNestedColumnDef(t,i,"classes")),!(!n||!n[e])},ne.prototype.setColumnAlignment=function(t,e){var i=e?e.charAt(0).toLowerCase():"",n=0;n|=this.enableColumnClass(t,"tr-align-left","l"===i),n|=this.enableColumnClass(t,"tr-align-right","r"===i),(n|=this.enableColumnClass(t,"tr-align-center","c"===i))&&this._dispatch("columnAlignmentChanged",{colIndex:t,alignment:i})},ne.prototype.getColumnAlignment=function(t){return this.hasColumnClass(t,"tr-align-right")?"right":this.hasColumnClass(t,"tr-align-center")?"center":this.hasColumnClass(t,"tr-align-left")?"left":"default"},ne.prototype.getColumnLeft=function(t){var e=this._columnDefs[t];if(e&&e.rightPinned){for(var i=this.getElement().clientWidth,n=this._layoutX.getTrackSize(),o=n<i?n:i,r=this.getColumnCount()-1;r>=t;--r)o-=this._layoutX.getLaneSize(r);return o}return this._startHScrollbarIndex>=0&&t>=this._startHScrollbarIndex?this._layoutX.getLaneStart(t)-this._hscrollbar.getScrollLeft():this._layoutX.getLaneStart(t)},ne.prototype.getColumnRight=function(t){return this.getColumnLeft(t)+this._layoutX.getLaneSize(t)},ne.prototype.getColumnWidth=function(t){return this._layoutX.getLaneSize(t)},ne.prototype.getColumnCustomLaneSize=function(t){return this._layoutX.getCustomLaneSize(t)},ne.prototype._calculateColumnWidths=function(t,e){if(!this._preserveGridSize)return e;var i,n=0,o={},r=t.length,s=new Array(r);for(i=0;i<r;i++)o[t[i]]=!0,s[i]=e[i],n+=e[i];var a=0,l=0,u=this.getColumnCount(),h=this._layoutX;for(i=0;i<u;i++)o[i]||h.isLaneVisible(i)&&(h.getLaneScalability(i)?(a+=h.getMinimumLaneSize(i),l++):a+=h.getLaneSize(i));var p=this.getContentWidth(),d=n+a-p;if(l<1||d>0){for(h.resetLaneToDefaultSize(),h.setTrackSize(p,this._reservedSpace),a=0,i=0;i<u;i++)o[i]||h.isLaneVisible(i)&&(h.getLaneScalability(i)?a+=h.getMinimumLaneSize(i):a+=h.getLaneSize(i));if((d=n+a-p)>0)for(d/=r,i=0;i<r;i++)s[i]-=d}return s},ne.prototype.setColumnWidth=function(t,e,i){var n=this._calculateColumnWidths([t],[e]),o=this._setColumnWidth(t,n[0],i);return o&&this._syncLayoutToColumns(t,t+1),o},ne.prototype.setColumnWidths=function(t,e){var i,n=0,o=[],r=[],s=[];for(i=t.length;--i>=0;){var a=t[i];null!=a&&(o.push(i),r.push(a));var l=Array.isArray(e)?e[i]:e;s.push(l)}var u=this._calculateColumnWidths(o,r);for(i=0;i<u.length;i++)n|=this._setColumnWidth(o[i],u[i],s[i]);return n&&this._syncLayoutToColumns(0,t.length),!!n},ne.prototype.isColumnVisible=function(t){return this._layoutX.isLaneVisible(t)},ne.prototype.hideColumn=function(t,e){var i=!1===e;this.setColumnVisibility(t,i,0)},ne.prototype.hideColumns=function(t,e){var i=Array.isArray(t)?t.length:0,n=[],o=this.getColumnCount();e=!1!==e;for(var r=0;r<i;++r){var s=t[r];s>=0&&s<o&&this._layoutX.hideLane(s,e,0)&&n.push(s)}if(n.length&&(this._syncLayoutToColumns(),this.requestRowRefresh(),this._hasListener("columnVisibilityChanged"))){var a={};a.colIndices=n,a.hidden=e,this._dispatch("columnVisibilityChanged",a)}},ne.prototype.showAllColumns=function(){for(var t=[],e=this.getColumnCount(),i=0;i<e;++i)this._layoutX.hideLane(i,!1,0)&&t.push(i);if(t.length&&(this._syncLayoutToColumns(),this.requestRowRefresh(),this._hasListener("columnVisibilityChanged"))){var n={};n.colIndices=t,n.hidden=!1,this._dispatch("columnVisibilityChanged",n)}},ne.prototype.getMinimumColumnWidth=function(t){return this._layoutX.getMinimumLaneSize(t)},ne.prototype.setMinimumColumnWidth=function(t,e){this._layoutX.setMinimumLaneSize(t,e)&&this._syncLayoutToColumns(t,t+1)},ne.prototype.setMinimumColumnWidths=function(t,e){for(var i=0,n=NaN,o=NaN,r=t.length;--r>=0;){var s=t[r];null!=s&&(o||(o=r),n=r,i|=this._layoutX.setMinimumLaneSize(r,s,e))}return i&&this._syncLayoutToColumns(n,o+1),!!i},ne.prototype.getColumnScalability=function(t){return this._layoutX.getLaneScalability(t)},ne.prototype.setColumnScalability=function(t,e){var i=!1;return O.isNumber(t)?(e=!1!==e,(i=this._layoutX.setLaneScalability(t,e))&&this._syncLayoutToColumns(t,t+1)):this.setDefaultColumnScalable(t),i},ne.prototype.setDefaultColumnScalable=function(t){this._layoutX.setDefaultScalability(!!t)},ne.prototype.resetColumnWidths=function(){var t=this._layoutX.resetLaneToDefaultSize();return t&&this._syncLayoutToColumns(0,this.getColumnCount()),t},ne.prototype.setColumnDefaultWidth=function(t,e){this._layoutX.setLaneDefaultSize(t,e)},ne.prototype.preserveProportion=function(t){this._preserveProportion=!0===t},ne.prototype.isProportionPreserved=function(){return this._preserveProportion},ne.prototype.preserveGridSize=function(t){this._preserveGridSize=!0===t},ne.prototype.getColumnData=function(t){return this._getColumnDef(t).columnData||null},ne.prototype.setColumnData=function(t,e){return this._getColumnDef(t).columnData=e,e},ne.prototype.newColumnData=function(t){return this.getColumnData(t)||{}},ne.prototype.setAlwaysRenderColumn=function(t,e){this.getColumnData(t).alwaysRender=!1!==e},ne.prototype._isAlwaysRenderColumn=function(t){var e=this.getColumnData(t);return!!e&&!0===e.alwaysRender},ne.prototype.getFitContentWidth=function(){return this._fitContentWidth},ne.prototype.setFitContentWidth=function(t){this._fitContentWidth!==t&&(this._fitContentWidth=t,this.enableClass("fit-width",this._fitContentWidth))},ne.prototype.loadPlugin=function(t,e){var i=null;if("string"==typeof t){var n=window.tr,o=n?n.grid:null;if(!o)return null;if(o[t])i=new o[t];else{if(!o[t+"Plugin"])return null;i=new o[t+"Plugin"]}}else i=t;if(!i||!i.getName)return null;var r=i.getName();if(!r)return null;var s=this._plugins[r];if(s){if(s===i)return s;console.log("WARNING: Two of the same "+r+"s cannot be loaded on a single grid. The existing plugin is replaced."),this.unloadPlugin(r)}return i.initialize&&i.initialize(this,e),this._plugins[r]=i,i},ne.prototype.unloadPlugin=function(t){var e;if(t){var i="";"string"==typeof t?i=t:t.getName&&(i=t.getName()),(e=this._plugins[i])||(i+="Plugin",e=this._plugins[i]),e&&(e.unload&&e.unload(this),delete this._plugins[i])}return e||null},ne.prototype.getPlugin=function(t){var e=this._plugins[t];return e||(e=this._plugins[t+"Plugin"]),e||null},ne.prototype.getPlugins=function(){var t=[];for(var e in this._plugins)t.push(this._plugins[e]);return t},ne.prototype.getPluginList=function(){var t=[];for(var e in this._plugins)t.push(e);return t},ne.prototype.freezeSection=function(t){this._fixFrozenTopSections=!0,this._freezeTopSectionAt(t)},ne.prototype._freezeTopSectionAt=function(t){if("number"==typeof t){var e=t+1;if(e===this._startVScrollbarIndex)return;this._startVScrollbarIndex=e}else this._startVScrollbarIndex=-1,"string"==typeof t&&(this._tempFrozenSectionRef=t);this._onSectionCountChanged()},ne.prototype.freezeFooter=function(t){this._fixFrozenBottomSection=!0,this._frozenFooterCount!==t&&(this._setFrozenFooter(t),this._onSectionCountChanged())},ne.prototype._setFrozenFooter=function(t){this._frozenFooterCount!==t&&(this._frozenFooterCount=t,this._vscrollbar.setFooterCount(t),this._hscrollbar.setFooterCount(t))},ne.prototype.getFooterCount=function(){return this._frozenFooterCount},ne.prototype.freezeColumn=function(t,e){t||0===t?this._startHScrollbarIndex=t>=0?t+1:0:null==t?this._startHScrollbarIndex=0:(this._startHScrollbarIndex=-1,this._hscrollbar.setScrollContent(this,this._getAllSections(),this.getColumnCount(),this._countPinnedRightColumns())),null!=e&&this._pinRightColumns(e>0?e:0),this._onColumnCountChanged(),this._updateScrollbarWidth(!0,!0)},ne.prototype._pinRightColumns=function(t){this._pinnedRightColumnCount=t;for(var e=this.getColumnCount();--e>=0;){var i=this._getColumnDef(e);--t>=0?i.rightPinned=!0:i.rightPinned&&(i.rightPinned=!1)}},ne.prototype._countPinnedLeftColumns=function(){return this._startHScrollbarIndex>=0?this._startHScrollbarIndex:0},ne.prototype._countPinnedRightColumns=function(){for(var t=0,e=this._columnDefs.length;--e>=0;){var i=this._columnDefs[e];if(!i||!i.rightPinned)break;++t}return t},ne.prototype.isPinnedColumn=function(t){return t<this.getFrozenColumnCount()||t>=this.getFirstPinnedRightIndex()},ne.prototype.getFrozenColumnCount=function(){var t=this._startHScrollbarIndex;return t<0&&(t=0),t},ne.prototype.getPinnedLeftColumnCount=ne.prototype.getFrozenColumnCount,ne.prototype.getPinnedRightColumnCount=function(){return this._pinnedRightColumnCount},ne.prototype.getFirstPinnedRightIndex=function(){return this.getColumnCount()-this._pinnedRightColumnCount},ne.prototype.updateLayout=function(){this._disposed||this._layoutUpdating||(this._layoutUpdating=!0,this._dispatch("preForcedUpdate",{}),this._updateLayout(),this._colVirtualizer.isEnabled()&&this._activateColumns(),this._layoutUpdating=!1)},ne.prototype.updateScrollbars=function(t,e){e&&this._updateScrollbarWidth(!0,!1),t&&this._updateScrollbarHeight(!0,!1)},ne.prototype.freezeLayout=function(t){t=!1!==t;var e=this._frozenLayout;if(e!==t){var i;this._frozenLayout=t,this._frozenLayout||(this._disableEvent("widthChanged"),this._onSectionCountChanged(),this._onColumnCountChanged(),this._colVirtualizer.isEnabled()&&this._activateColumns()),this._rowHeightSync=!1;var n=this._settings.length;for(i=0;i<n;i++)this._settings[i].getSection().setFrozenLayout(this._frozenLayout);if(!this._frozenLayout)this._syncLayoutToColumns(0,this.getColumnCount()),this._disableEvent("widthChanged",!1),this._dispatch("widthChanged",{}),this._syncRowHeights()||this._rowVirtualizer.update(!0);this._rowHeightSync=!0}return e},ne.prototype.unfreezeLayout=function(t){this.freezeLayout(!1===t)},ne.prototype.isLayoutFrozen=function(){return this._frozenLayout},ne.prototype.showBorders=O._deprecatedFunction,ne.prototype.hideBorders=O._deprecatedFunction,ne.prototype.toggleBorders=function(t){this.toggleClass("no-borders",null!=t?!t:null)},ne.prototype.toggleGridlines=function(t){this.toggleClass("no-gridlines",null!=t?!t:null)},ne.prototype.toggleVerticalLines=function(t){this.toggleClass("no-vertical-grid-line",null!=t?!t:null)},ne.prototype.toggleHorizontalLines=function(t){this.toggleClass("no-horizontal-grid-line",null!=t?!t:null)},ne.prototype.getDataColumnMap=function(){for(var t=[],e=this.getColumnCount();--e>=0;)t[e]=this.getDataColumnName(e);return t},ne.prototype.setDataColumnMap=function(t){var e,i;if(t)for(e=t.length;--e>=0;)(i=this._getColumnDef(e)).dataColumnName=t[e];else for(e=this._columnDefs.length;--e>=0;)(i=this._columnDefs[e])&&null!=i.dataColumnName&&(i.dataColumnName=null)},ne.prototype.getDataColumnName=function(t){return this._getColumnDef(t).dataColumnName||""},ne.prototype.setDataColumnName=function(t,e){this._getColumnDef(t).dataColumnName=e},ne.prototype.setDefaultRenderingHandler=function(t){this._renderingHandler="function"==typeof t?t:null},ne.prototype.setDefaultDataBindingHandler=function(t){this._dataBindingHandler="function"==typeof t?t:null},ne.prototype.setColumnRenderingHandler=function(t,e){this._getColumnDef(t).renderingHandler="function"==typeof e?e:null},ne.prototype.setColumnDataBindingHandler=function(t,e){this._getColumnDef(t).dataBindingHandler="function"==typeof e?e:null},ne.prototype.getColumnRenderingHandler=function(t){return this._getColumnDef(t).renderingHandler||null},ne.prototype.getColumnDataBindingHandler=function(t){return this._getColumnDef(t).dataBindingHandler||null},ne.prototype.enableRowHighlighting=function(t){if(null==t&&(t=!0),this._rowHighlighting!==t){this._rowHighlighting=t;for(var e=this.getAllSections("content"),i=e.length;--i>=0;)e[i].enableRowHighlighting(this._rowHighlighting)}},ne.prototype._getTarget=function(t){var e=t.target;if(e){var i=null;return this._element.contains(e)||(i=t.composedPath?t.composedPath():t.path),i?i[0]||null:e}return t.getElement?t.getElement():O.isElement(t)?t:null},ne.prototype.getRelativePosition=function(t,e){if(!t)return{};var i=e||{},n=this._getTarget(t);t.target?O.getRelativePosition(t,this.getElement(),i):n&&O.getRelativePosition(n,this.getElement(),i),1!==this._zoomFactor&&(i.x/=this._zoomFactor,i.y/=this._zoomFactor),i.hit=!1,i.grid=this,i.clientX=t.clientX,i.clientY=t.clientY,i.zoomFactor=this._zoomFactor;var o=O.closestElement(n,"cell");if(!o)return i;i.cellElement=o;var r=O.closestElement(o,"column");i.columnElement=r;var s=null;if(!(s=r?O.closestElement(r,"tr-lg"):O.closestElement(o,"tr-lg")))return i;i.sectionName=s.id||O.closestElement(s,"tr-vlg").id;var a=this.getSectionSettings(i.sectionName);if(!a)return i;a.extendEventArg(i);var l=a.getSection(),u=l.getColumnIndex(r||o);return u<0?i:(i.colIndex=u,!1===this._hitTestY(-1,i)||(o.stretched?i.cell=l.getStretchedCell(u,i.rowIndex):i.cell=l.getCell(u,i.rowIndex),i.hit=!0),i)},ne.prototype.getColumnIndex=function(t){for(var e=this.getColumnCount();--e>=0;)if(t===this.getDataColumnName(e))return e;return-1},ne.prototype.getVScrollbar=function(){return this._vscrollbar},ne.prototype.getHScrollbar=function(){return this._hscrollbar},ne.prototype.autoHideScrollbars=function(t){t=null==t||t,this._vscrollbar.setAutoHide(t),this._hscrollbar.setAutoHide(t)},ne.prototype.getVScrollStartIndex=function(){return this._startVScrollbarIndex},ne.prototype.getHScrollStartIndex=function(){return this._startHScrollbarIndex},ne.prototype.scrollToColumn=function(t,e){if(!this._updateScrollbar(this._hscrollbar))return!1;var i=this._layoutX.getLaneCount();if(t<=0?t=0:t>=i&&(t=i-1),this.isPinnedColumn(t))return!1;var n=this._startHScrollbarIndex>0?this._layoutX.getLaneStart(this._startHScrollbarIndex):0,o=this._hscrollbar.getScrollLeft(),r=o+n,s=this._hscrollbar.getWidth(),a=this._layoutX.hitTest(r),l=this._layoutX.getLaneStart(t),u=this._layoutX.getLaneSize(t);if(e||u>=s||t<=a){var h=l-n;if(o!==h)return this._hscrollbar.setScrollLeft(h),!0}else{var p=r+s;if(t>=this._layoutX.hitTest(p-.1)){var d=o+(l+u)-p;return this._hscrollbar.setScrollLeft(d),!0}}return!1},ne.prototype.getScrollLeft=function(){return this._updateScrollbar(this._hscrollbar)?this._hscrollbar.getScrollLeft():0},ne.prototype.setScrollLeft=function(t){this._updateScrollbar(this._hscrollbar)&&this._hscrollbar.setScrollLeft(t)},ne.prototype.scrollRight=function(t){this.setScrollLeft(this._hscrollbar.getScrollLeft()+t)},ne.prototype.getScrollWidth=function(){return this._updateScrollbar(this._hscrollbar)?this._hscrollbar.getContentWidth():0},ne.prototype.getYScrollVal=function(t,e,i){if(!this._updateScrollbar(this._vscrollbar))return null;var n=null;t&&(n=this.getSection(t));var o=this._layoutY.getLaneCount(),r=n?n.getRowOffset():this._sectionStarts[this._startVScrollbarIndex];r&&(e+=r),e<=0?e=0:e>=o&&(e=o-1);var s=this._layoutY.getLaneStart(r),a=this._vscrollbar.getScrollTop()+s,l=n?n.getFirstIndexInView():this._layoutY.hitTest(a),u=-1;if(i)u=e;else if(e<=l)(u=e-3)<0&&(u=0);else{var h=a+this._vscrollbar.getHeight(),p=n?n.getLastIndexInView():this._layoutY.hitTest(h-.1);if(e>=p)(u=e-(p-l)+3)<0&&(u=0)}return u>=0?this._layoutY.getLaneStart(u)-s:null},ne.prototype.scrollToRow=function(t,e,i){var n=this.getYScrollVal(t,e,i);null!==n&&this._vscrollbar.setScrollTop(n)},ne.prototype.getVScrollView=function(){if(!this._updateScrollbar(this._vscrollbar))return null;var t=this._layoutY.getLaneCount();if(0===t)return null;var e=this._sectionStarts[this._startVScrollbarIndex],i=this._layoutY.getLaneStart(e),n=this._vscrollbar.getScrollTop()+i,o=this._vscrollbar.getHeight(),r=n+o,s=this._layoutY.hitTest(n),a=this._layoutY.hitTest(r-.1),l=this._layoutY.getLaneStart(s),u=this._layoutY.getLaneEnd(a),h=n-o,p=h<=i?e:this._layoutY.hitTest(h)+1,d=r+o,c=d>=this._layoutY.getTrackSize()?t-1:this._layoutY.hitTest(d-.1)-1;s-=e,a-=e;var _={};return _.viewTop=n-i,_.viewBottom=r-i,_.topRowIndex=s,_.bottomRowIndex=a,_.firstFullRow=l<n?s+1:s,_.lastFullRow=u>r?a-1:a,_.prevPageRowIndex=p-e,_.nextPageRowIndex=c-e,_},ne.prototype.getScrollTop=function(){return this._updateScrollbar(this._vscrollbar)?this._vscrollbar.getScrollTop():0},ne.prototype.setScrollTop=function(t){this._updateScrollbar(this._vscrollbar)&&this._vscrollbar.setScrollTop(t)},ne.prototype.scrollDown=function(t){this.setScrollTop(this._vscrollbar.getScrollTop()+t)},ne.prototype.getScrollHeight=function(){return this._updateScrollbar(this._vscrollbar)?this._vscrollbar.getContentHeight():0},ne.prototype.enableAutoSetDataSource=function(t){this._autoSetDataSource=t},ne.prototype.getRowVirtualizer=function(){return this._rowVirtualizer},ne.prototype.getColumnVirtualizer=function(){return this._colVirtualizer},ne.prototype.enableRowVirtualization=function(t){this._rowVirtualizer.enable(t),this._rowVirtualizer.isEnabled()&&this._vscrollbar.isEnabled()?this._rowVirtualizer.activate():this._rowVirtualizer.deactivate()},ne.prototype.enableColumnVirtualization=function(t){this._colVirtualizer.enable(t);for(var e=this._colVirtualizer.isEnabled(),i=this._settings.length;--i>=0;){this._settings[i].enableColumnVirtualization(e)}},ne.prototype.setRowScrollingStep=function(t){this._rowScrollingStep=t>0?t:0,this._vscrollbar.setScrollingStep(this._layoutY.getDefaultLaneSize()*this._rowScrollingStep)},ne.prototype.getVMouseWheelHandler=function(){return this._vscrollbar.getDefaultMouseWheelLogic()},ne.prototype.synchronizeVScrollbar=function(t){t.unlisten("mousemove",t._onMouseMove),t.listen("mousemove",this._onMouseMove);var e=t.getVScrollbar();e._mainScrollbar=this._vscrollbar,e.setStyle("visibility","hidden"),e.setStyle("pointerEvents","none"),e.disableMouseWheel(),e.attachToExternalElement(this._vscrollbar.getParent()),this._vscrollbar.listen("scroll",t._onSyncVScroll)},ne.prototype.updateRowData=function(t,e,i,n){var o=this.getSectionSettings(t||"content");o&&o.updateRowData(e,i,n)},ne.prototype.rerender=function(){for(var t=this._settings.length,e=0;e<t;e++)this._settings[e].rerender()},ne.prototype.requestRowRefresh=function(){this._rowRefreshTimer||(this._rowRefreshTimer=setTimeout(this._onRowRefresh,100))},ne.prototype.deactivateRendering=function(t){if((t=!1!==t)!=this._noBinding){this._noBinding=t;var e=this.getSectionSettings("content");e&&(e.disableDataBinding(t),t||this.requestRowRefresh())}},ne.prototype._onRowRefresh=function(){this._rowRefreshTimer=0,this.updateRowData()},ne.prototype.disableLazyRendering=function(t){console.log("WARNING: This function is deprecated.")},ne.prototype.getData=function(t,e,i){var n=this.getSectionSettings(t);if(!n)return null;var o=this._toDataColumnName(e);return n.getData(o,i)},ne.prototype.setData=function(t,e,i,n){var o=this.getSectionSettings(t);if(o&&o.isDataBindable()){var r=this._toDataColumnName(e);return o.setData(r,i,n)}return!1},ne.prototype.removeRowData=function(t,e){var i=this.getSectionSettings(t);return!(!i||!i.isDataBindable())&&i.removeRowData(e)},ne.prototype.setHidingMethod=function(t){if(t||(t=""),this._hidingMethod!==t){this._hidingMethod=t;for(var e=this.getAllSections(),i=e.length;--i>=0;)e[i].setHidingMethod(t)}},ne.prototype.getHorizontalLayout=function(){return this._layoutX},ne.prototype.setColumnVisibility=function(t,e,i){if(this._layoutX.hideLane(t,!e,i)){if(this._syncLayoutToColumns(t,t+1),e&&this.requestRowRefresh(),this._hasListener("columnVisibilityChanged")){var n={};n.colIndex=t,n.hidden=!e,this._dispatch("columnVisibilityChanged",n)}return!0}return!1},ne.prototype.reserveRightSpace=function(t){if(this._reservedSpace!==t){this._reservedSpace=t;for(var e=this._settings.length;--e>=0;)this._settings[e].getSection().reserveRightSpace(t);return this._onColumnCountChanged(),this._updateScrollbarWidth(!0,!0),!0}return!1},ne.prototype.getHiddenInput=function(){return this._hiddenInput},ne.prototype.focus=function(){var t=this._element,e=document.activeElement;if(t&&t!==e){var i=window.pageXOffset,n=window.pageYOffset;if(t.setActive)try{t.setActive()}catch(e){t.focus({preventScroll:!0})}else t.focus({preventScroll:!0});n===window.pageYOffset&&i===window.pageXOffset||window.scrollTo(i,n)}},ne.prototype.isBinding=function(){return this._dispatchingDataChanged},ne.prototype.hideRow=function(t,e){this._dataSource.hideRow(t,e)},ne.prototype.hideRows=function(t,e){Array.isArray(t)?this._dataSource.hideRows(t,e):this._dataSource.hideRow(t,e)},ne.prototype.showRows=function(t,e){Array.isArray(t)?this._dataSource.showRows(t,e):this._dataSource.showRows([t],e)},ne.prototype.unhideAllRows=function(){this._dataSource.unhideAllRows()},ne.prototype.hasHiddenRow=function(){return this._dataSource.hasHiddenRow()},ne.prototype.initSimpleTable=function(t){var e=0;t||this.getColumnCount()||(t=["Default"]),t&&(e=t.length,this.setColumnCount(e),this.setDataColumnMap(t));var i=this.addSection("title");if(i.addRow(1),!this._renderingHandler)for(var n=0;n<e;++n)i.setCellContent(n,0,t[n]);this.addSection("content");var o=this.getSectionSettings("title");o.disableDataBinding();var r=this.getSectionSettings("content");r.setAutoSyncRowCount(!0),r.setParent(o),this._dataBindingHandler||this.setDefaultDataBindingHandler(ne._defaultDataBinding)},ne._defaultDataBinding=function(t){t.cell.setContent(t.dataValue)},ne.prototype._getAllSections=function(){for(var t=[],e=this._settings.length,i=0;i<e;i++)t.push(this._settings[i].getSection());return t},ne.prototype._getNextSection=function(t,e,i){var n=this.getSectionIndex(e)+t;if(null==i)return this.getSectionSettings(n);i=this._toSectionType(i);for(var o=this._settings.length;n>=0&&n<o;){var r=this._settings[n];if(i===r.getType())return r;n+=t}return null},ne.prototype._toSectionType=function(t){if(ne._sectionType[t])return t;if(O.isString(t))switch(t.charAt(0).toLowerCase()){case"t":return"title";case"h":case"s":return"header";case"f":return"footer"}return"content"},ne.prototype._newSection=function(t,e){if(e)for(var i=this._settings.length;--i>=0;)if(this._settings[i].getId()===e)return null;var n="content"===(t=this._toSectionType(t))?new ie:new Pt;n._setContext(this);var o=new Ut(n);o.setId(e),o.setType(t),o.listen("dataChanged",this._onSectionDataChanged),o.listen("rowAvailable",this._onRowAvailable);var r="content"===t&&this._rowHighlighting;return n.enableRowHighlighting(r),n.enableShading(!1),n.setHidingMethod(this._hidingMethod),o.enableColumnVirtualization(this._colVirtualizer.isEnabled()),n.setColumnCount(this._layoutX.getLaneCount()),n.reserveRightSpace(this._reservedSpace),this._syncLayoutToSectionColumns(n),this._syncStyleToSectionColumns(n,t),t!==this._rowHeightException&&n.setDefaultRowHeight(this._layoutY.getDefaultLaneSize()),n.listen("rowHighlighted",this._onRowHightlighted),n.listen("rowCountChanged",this._onRowCountChanged),n.listen("rowHeightChanged",this._onRowHeightChanged),this._autoSetDataSource&&o.setDataSource(this._dataSource),o},ne.prototype._putToLast=function(t){if(0===this._settings.length)t.setParent(this._element,!0);else{var e=this.getLastSection().getElement().nextSibling;null!==e?t.insertBefore(e):t.setParent(this._element)}},ne.prototype._syncStyleToSectionColumns=function(t,e){for(var i,n=this._columnDefs.length;--n>=0;){var o=this._getColumnDef(n),r=o.styles;for(i in r)t.setColumnStyle(n,i,r[i]);var s=o.classes;for(i in s)t.enableColumnClass(n,i,!0);var a=o[e];if(a){for(i in r=a.styles)t.setColumnStyle(n,i,r[i]);for(i in s=a.classes)t.enableColumnClass(n,i,!0)}}},ne.prototype._syncRowHeights=function(){for(var t=this._settings.length,e=0;e<t;++e)this._syncSectionRowHeights(this._settings[e].getSection());return!this._frozenLayout&&this._updateScrollbarHeight(!0,!0)},ne.prototype._syncSectionRowHeights=function(t){this._layoutY.copyFrom(t.getRowLayout(),this._sectionStarts[t.getIndex()])},ne.prototype._setColumnWidth=function(t,e,i){var n=!1,o=this._layoutX;if(null!=i)n=o.setLaneScalability(t,!!i);else{var r=o.getLaneScalability(t);if(this._preserveProportion){if(r){for(var s=this.getColumnCount(),a=0,l=0,u=0;u<s;++u)if(o.getLaneScalability(u)){var h=o.getLaneSize(u);a+=o.getCustomLaneSize(u),l+=h}(!(e=(e*a-e*o.getCustomLaneSize(t))/(l-e))||e<0)&&(e=a)}}else n=o.setLaneScalability(t,!1)}return n=o.setLaneSize(t,e)||n},ne.prototype._dispatchColumnAddedEvent=function(t,e,i,n){if(this._hasListener("columnAdded")){var o={};if(o.atTheMiddle=i,1===e)o.colIndex=t,o.context=n,this._dispatch("columnAdded",o);else for(var r=Array.isArray(n)?n:[],s=0;s<e;++s)o.colIndex=t+s,o.context=r[s],this._dispatch("columnAdded",o)}this._dispatchColumnRenderEvent({},t,t+e,0,this._settings.length,NaN,NaN)},ne.prototype._dispatchColumnRenderEvent=function(t,e,i,n,o,r,s){if(n<o){var a;if(t.sender=this,t.fromColIndex=e,t.toColIndex=i,this._hasListener("preSectionRender"))for(a=n;a<o;++a)this._settings[a].extendRenderEventArg(t,r,s),this._dispatch("preSectionRender",t);for(var l=e;l<i;++l){var u=this.getColumnRenderingHandler(l)||this._renderingHandler;if(u)for(t.colIndex=l,t.dataColumnName=this.getDataColumnName(l),a=n;a<o;++a){var h=this._settings[a];h.extendRenderEventArg(t,r,s);for(var p=h.getSection(),d=t.fromRowIndex,c=t.toRowIndex,_=d;_<c;++_)t.rowIndex=_,t.cell=p.getCell(l,_,!1),u(t)}}if(this._hasListener("postSectionRender"))for(a=n;a<o;++a)this._settings[a].extendRenderEventArg(t,r,s),this._dispatch("postSectionRender",t);if(!t.noDataUpdate&&!this._noBinding)for(a=n;a<o;++a)this.updateRowData(this._settings[a],r,s-1)}},ne.prototype._dispatchRowExpansionBinding=function(t){if(this._hasListener("rowExpansionBinding")){var e=t.dataSource;if(e&&e.getDataSource()){var i=t.fromRowIndex,n=t.toRowIndex,o=e.getExpansionParents(i,n),r=e.getVisibleRowIds(!0),s=t.section;t.rowData=null,t.cell=null;for(var a=i;a<n;++a){var l=o[a],u=s.getContextRow(a);if(l)t.originalRowData=e.getRowData(l),t.originalRowId=l,t.rowExpansion=u.rowExpansion=!0;else{if(!u.rowExpansion)continue;t.originalRowData=null,t.originalRowId=null,t.rowExpansion=u.rowExpansion=!1}t.rowId=r[a],t.rowIndex=a,this._dispatch("rowExpansionBinding",t)}t.originalRowData=null,t.originalRowId=null,t.rowExpansion=!1}}},ne.prototype._removeColumn=function(t){var e=this._layoutX.getLaneCount();if(t>e&&(t=e),!(t<=0)){var i=e-t;this._layoutX.setLaneCount(i);for(var n=this._settings.length;--n>=0;){this._settings[n].getSection().setColumnCount(i)}var o=this._columnDefs.slice(i);if(this._columnDefs.length=i,this._onColumnCountChanged(),this._syncLayoutToColumns(i,0,!0),this._hasListener("columnRemoved"))for(var r={},s=e;--s>=i;){var a=o[s-i];r.colIndex=s,r.columnData=a?a.columnData:null,this._dispatch("columnRemoved",r)}}},ne.prototype._onSectionDataChanged=function(t){if(!this._dispatchingDataChanged){this._dispatchingDataChanged=!0;var e,i,n=t.fromRowIndex,o=t.toRowIndex,r=t.section,s=t.dataSource,a=s&&s.getDataSource()?1:0;a&&(e=s.getVisibleRowIds(!0),i=s.getMultipleRowData(e,n,o),t.dataRows=i),this._dispatch("preSectionDataBinding",t);for(var l=this._layoutX.getLaneCount(),u=this.getDataColumnMap(),h=0;h<l;++h)if(r.isColumnActive(h)&&(this.isColumnVisible(h)||this._isAlwaysRenderColumn(h))){var p=this.getColumnDataBindingHandler(h)||this._dataBindingHandler;if(p){var d=u[h];t.dataColumnName=d,t.colIndex=h;for(var c=n;c<o;++c){if(a){var _=i[c];if(!_)continue;t.rowData=_,t.rowId=e[c],t.dataValue=_[d]}t.rowIndex=c,t.cell=r.getCell(h,c,!1),p(t)}}}this._dispatch("postSectionDataBinding",t),this._dispatchRowExpansionBinding(t),this._dispatchingDataChanged=!1}},ne.prototype._updateScrollbar=function(t){return!!t&&(t.isEnabled()&&t.update(),t.isActive())},ne.prototype._onVScroll=function(t){this._rowVirtualizer.setViewOffset(this._vscrollbar.getScrollTop())},ne.prototype._onHScroll=function(t){this._colVirtualizer.setViewOffset(this._hscrollbar.getScrollLeft())},ne.prototype._onVScrollEnabled=function(){this._updateScrollbarHeight(!0,!1),this._rowVirtualizer.isEnabled()&&this._rowVirtualizer.activate(),this._vscrollbar.getAutoHide()||this._updateVScrollbar()},ne.prototype._onVScrollDisabled=function(){this._rowVirtualizer.isEnabled()&&this._rowVirtualizer.deactivate()},ne.prototype._onRowInViewChanged=function(t){for(var e=t.firstIndex,i=t.lastIndex+1,n=this._settings.length,o=[0,0],r=0;r<n;++r){var s=this._settings[r],a=s.getSection();a&&!a.getFrozenLayout()&&(a.activateRows(e,i,o),this.updateRowData(s,o[0],o[1]-1))}},ne.prototype._onColInViewChanged=function(t){var e=t.prevFirstIndex,i=t.prevLastIndex,n=t.firstIndex,o=t.lastIndex,r=e<n?e:n,s=i>o?i:o;this._activateColumns(n,o,r,s);for(var a=this._rowVirtualizer.getFirstIndexInView(),l=this._rowVirtualizer.getLastIndexInView(),u=this.getSectionCount(),h=0;h<u;++h){var p=this._settings[h],d=p.getRowOffset();this.updateRowData(p,a-d,l-d)}},ne.prototype._activateColumns=function(t,e,i,n){null==i&&(i=0),null==n&&(n=this.getColumnCount()-1);for(var o=this._getColActivationList(t,e,i,n),r=this.getSectionCount();--r>=0;){this._settings[r].activateColumns(o,i,n)}},ne.prototype._getColActivationList=function(t,e,i,n){null==i&&(i=0);var o=this.getColumnCount();null==n&&(n=o-1),null==t&&(t=this._colVirtualizer.getFirstIndexInView()),null==e&&(e=this._colVirtualizer.getLastIndexInView());for(var r=this._startHScrollbarIndex,s=this.getFirstPinnedRightIndex(),a=new Array(n+1),l=i;l<=n;++l)a[l]=l<r||l>=t&&l<=e||l>=s;return a},ne.prototype._getColumnDef=function(t){if(t>=0){var e=this._columnDefs[t];return e||(e=this._columnDefs[t]={id:""+ne._runningColumnId++,columnData:{}}),e}return{}},ne.prototype._getNestedColumnDef=function(t,e,i){var n=this._getColumnDef(t);if(e){var o=n;(n=o[e])||(n=o[e]={}),i&&((n=(o=n)[i])||(n=o[i]={}))}return n},ne.prototype._getColumnId=function(t){return this._getColumnDef(t).id},ne.prototype._onWindowResize=function(){this._updateLayout(),this._rowVirtualizer.setViewOffset(this._vscrollbar.getScrollTop())},ne.prototype._onMouseMove=function(){this._vscrollbar.flash(),this._hscrollbar.flash()},ne.prototype._onRowHightlighted=function(t){if(this._hasListener("rowHighlighted")){var e=t.sender,i=this.getSectionSettings(e.getId());if(null!=i){i.extendEventArg(t);var n=i.getDataSource();null!==n&&(t.rowId=n.getRowId(t.rowIndex),t.dataRow=n.getRowData(t.rowId)),this._dispatch("rowHighlighted",t)}}},ne.prototype._onRowCountChanged=function(t){if(!this._disposed){var e=t.sender,i=t.prevCount,n=t.rowCount,o=e.getIndex(),r=this._updateSectionIndices(o),s=0;if(i>n)this._layoutY.removeLaneAt(r,i-n),this._layoutY.isHomogeneous()||this._syncSectionRowHeights(e);else{var a=this._layoutY.getDefaultLaneSize(),l=e.getDefaultRowHeight();if(this._layoutY.insertLane(r+i,n-i),l!==a)for(s=i;s<n;++s)this._layoutY.setLaneSize(r+s,l)}var u=o<=this._startVScrollbarIndex||o>=this._getFooterStartIndex(),h=this._frozenFooterCount>0,p=this._updateScrollbarHeight(u,h,t.noBinding);this._frozenLayout||p||(this._rowVirtualizer.isVirtualizable()?e.activateRows(this._rowVirtualizer.getFirstIndexInView(),this._rowVirtualizer.getLastIndexInView()):e.activateRows()),h||this._updateVScrollbar(),i<n?this._dispatch("rowAdded",t):i>n&&this._dispatch("rowRemoved",t)}},ne.prototype._onRowHeightChanged=function(t){if(this._rowHeightSync&&!this._disposed&&!this._rowHeightConflator.conflate(t)){for(var e=this._rowHeightConflator.popAllData(),i=e.length,n=NaN,o=0;o<i;++o){var r=e[o],s=r.sender;if(this._containsSection(s))for(var a=s.getIndex(),l=r.rowIndex,u=this.getRowIndex(a,l),h=r.changeLength,p=0;p<h;++p)this._layoutY.setLaneSize(u+p,s.getRowHeight(l+p))&&(a>=n||(n=a))}this._rowHeightConflator._needScrollbarUpdate?(this._rowHeightConflator._needScrollbarUpdate=!1,this._updateScrollbarHeight(!0,!0)):n>=0&&this._updateScrollbarHeight(n<this._startVScrollbarIndex,n>=this._startVScrollbarIndex)}},ne.prototype._containsSection=function(t){for(var e=this._settings.length;--e>=0;)if(this._settings[e].getSection()===t)return!0;return!1},ne.prototype._onRowAvailable=function(t){var e=t.sectionIndex;this._dispatchColumnRenderEvent(t,0,this.getColumnCount(),e,e+1,t.prevRowIndex,t.rowIndex)},ne.prototype._onSectionCountChanged=function(t){if(!this._frozenLayout){if(this._tempFrozenSectionRef){var e=this.getNextSection(this._tempFrozenSectionRef);null!==e&&(this._startVScrollbarIndex=e.getIndex(),this._tempFrozenSectionRef="")}this._startVScrollbarIndex>=0&&this._startVScrollbarIndex<this._getFooterStartIndex()?(this._vscrollbar.enable(),this._vscrollbar.setScrollContent(this,this._getAllSections(),this._startVScrollbarIndex),t||this._updateScrollbarHeight(!0,!0),this._syncLayoutToColumns()):this._vscrollbar.disable()}},ne.prototype._onColumnCountChanged=function(){if(!this._frozenLayout){var t=this.getColumnCount(),e=this._countPinnedRightColumns();(this._startHScrollbarIndex>=0?this._startHScrollbarIndex:t)+e<t?(this._hscrollbar.enable(),this._colVirtualizer.activate(),this._hscrollbar.setScrollContent(this,this._getAllSections(),this._startHScrollbarIndex,e)):(this._hscrollbar.disable(),this._colVirtualizer.deactivate())}},ne.prototype._onSyncVScroll=function(t){this._vscrollbar.setScrollTop(t.scrollTop)},ne.prototype._getFooterStartIndex=function(){return this.getSectionCount()-this._frozenFooterCount},ne.prototype._getVScrollStart=function(){return this._getSectionSize(0,this._startVScrollbarIndex)},ne.prototype._getFooterSize=function(){return this._frozenFooterCount>0?this._getSectionSize(this._getFooterStartIndex()):0},ne.prototype._getSectionSize=function(t,e){if(t){if(t<0)return 0}else t=0;null==e&&(e=this.getSectionCount()-t);var i=this._layoutY.getLaneStart(this._sectionStarts[t]),n=t+e;return(e>0?this._layoutY.getLaneStart(this._sectionStarts[n]):0)-i},ne.prototype._updateScrollbarHeight=function(t,e,i){if(!this._vscrollbar.isEnabled())return!1;var n=e,o=t&&this._startVScrollbarIndex>=0,r=this._rowHeightConflator.isConflating();if(r&&(this._rowHeightConflator._needScrollbarUpdate=!0,n=!1),o&&!r){var s=this.getElement();if(!s)return!1;var a=this.getParent(),l=this._vscrollbar.getParent();l?l!==a&&l.firstElementChild&&(l=l.firstElementChild):(l=s,this._vscrollbar.setParent(l));var u=this._getVScrollStart(),h=this._getFooterSize();l!==s&&(u+=s.clientTop),this._vscrollbar.resetPaneSize();var p=l.clientHeight-(u+h)*this._zoomFactor;this._vscrollbar.setTop(u*this._zoomFactor),this._vscrollbar.setTrackSize(p,p/this._zoomFactor);var d=this._layoutY.getDefaultLaneSize(),c=12*d;p>c&&(c=(Math.ceil(p/d)+4)*d),this._rowVirtualizer.setViewSize(c/this._zoomFactor),this._rowVirtualizer.setViewBounds(this._startVScrollbarIndex,this.getFooterCount())}else this._rowVirtualizer.validateVirtualization();var _=!1;return i||(_=this._rowVirtualizer.update()),this._vscrollbar.invalidate(n),_},ne.prototype._updateScrollbarWidth=function(t,e){if(t&&this._startHScrollbarIndex>=0){var i=this.getElement(),n=this._hscrollbar.getParent();n||(n=this.getParent()||i,this._hscrollbar.setParent(n));var o=this._layoutX.getLaneStart(this._startHScrollbarIndex),r=this._layoutX.getLaneCount(),s=0,a=this._countPinnedRightColumns();a&&(s=this._layoutX.getLaneStart(r)-this._layoutX.getLaneStart(r-a));var l=n!==i?i.clientLeft:0,u=n.clientWidth-(o+l+s)*this._zoomFactor;a>0&&(u-=this._reservedSpace),this._hscrollbar.setPaneLeft(o),this._hscrollbar.setLeft((o+l)*this._zoomFactor),this._hscrollbar.setTrackSize(u,u/this._zoomFactor);var h=4*this._layoutX.getDefaultLaneSize();u>h&&(h=u),this._colVirtualizer.setViewSize(h/this._zoomFactor),this._colVirtualizer.setViewBounds(this._startHScrollbarIndex,a)}else this._colVirtualizer.validateVirtualization();this._colVirtualizer.update(),this._hscrollbar.invalidate(e)},ne.prototype._hitTestY=function(t,e){var i;if(e.sectionSettings)i=e.sectionSettings;else{var n,o=(n="number"==e.rowIndex?e.rowIndex:this._layoutY.hitTest(t))>=0?n:~n,r=O.upperBound(this._sectionStarts,o)-1;if(e.sectionIndex=r,!(i=this._settings[r]))return!1;i.extendEventArg(e)}var s=i.getSection();return null!=e.colIndex&&e.cellElement?e.rowIndex=s.getCellIndex(e.colIndex,e.cellElement):e.rowIndex=n+s.getRowOffset(),!0},ne.prototype._syncLayoutToColumns=function(t,e,i){if(!this._frozenLayout){var n=this._layoutX.getLaneCount(),o=this.fillParentWidth(100);(o||null==t||null==e)&&(t=0,e=n,o=!0);var r=this._settings.length;if(!(r<=0)){var s=!1;if(t<e)for(var a=0;a<r;++a)s=this._syncLayoutToSectionColumns(this._settings[a].getSection(),t,e)||s;var l=o||t<this._startHScrollbarIndex||e>this.getFirstPinnedRightIndex();this._updateScrollbarWidth(l,!0),(s||i)&&this._dispatch("widthChanged",{from:t,to:e,colChanged:t})}}},ne.prototype._syncLayoutToSectionColumns=function(t,e,i){null==e&&(e=0),null==i&&(i=this._layoutX.getLaneCount());for(var n=0,o=e;o<i;++o)n|=t._setColumnWidth(o,this._layoutX.getLaneSize(o));return!(!n||this._frozenLayout)&&(t._updateColumnLayout(),!0)},ne.prototype._toDataColumnName=function(t){return O.isNumber(t)?this.getDataColumnName(t):t},ne.prototype._updateSectionIndices=function(t){this._updatePaddingBottomSect()&&--t,t<0&&(t=0);var e=this._settings.length,i=this._settings[0]||null;i!==this._firstSettings&&(this._firstSettings&&this._firstSettings.getSection().removeClass("first"),this._firstSettings=i,this._firstSettings&&this._firstSettings.getSection().addClass("first"));var n=this._settings[e-1]||null;n!==this._lastSettings&&(this._lastSettings&&this._lastSettings.getSection().removeClass("last"),this._lastSettings=n,this._lastSettings&&this._lastSettings.getSection().addClass("last")),this._sectionStarts.length=e+1,this._sectionStarts[0]=0;for(var o=t;o<e;++o){var r=this._settings[o].getSection();r.setIndex(o),r.setRowOffset(this._sectionStarts[o]),this._sectionStarts[o+1]=this._sectionStarts[o]+r.getRowCount()}return this._sectionStarts[t]},ne.prototype._updateLayout=function(){if(!this._disposed){this._syncLayoutToColumns(),this._updateScrollbarHeight(!0,!0),this._updateScrollbarWidth(!0,!0);for(var t=this.getSectionCount(),e=0;e<t;++e){var i=this._settings[e],n=i.getSection();"title"==i.getType()&&n.updateLayout(),n.getReservedSpace()&&n._updateRightSpaceStyle(this._hscrollbar.isActive()&&!this._pinnedRightColumnCount)}}},ne.prototype._updateVScrollbar=function(){!this._disposed&&this._vscrollbar.isEnabled()&&(this._vScrollbarConflator.conflate()||this._vscrollbar.update())},ne._proto=ne.prototype;var oe={chainIcon:""};oe.styles=Object(u.g)([".tr-grid .chain-icon",["cursor: pointer;"],".tr-grid .chain-icon .fallback-arrow",["vertical-align: middle;","font-size: 7px;","line-height: 1;","display: inline-block;","transform: scaleX(1.5);","font-family: Arial;"],".tr-grid .closed .chain-icon",["transform: translate(0px, -1px) rotate(-90deg);"]]),oe.applyStyle=function(t){t&&!t._rowGroupingStyles&&(t._rowGroupingStyles=!0,Object(u.d)(oe.styles,t.getElement()))};var re=oe,se=function(){this._counter={},this._session={},this._referers={}};se.prototype._counter=null,se.prototype._session=null,se.prototype._referers=null,se.prototype.reset=function(){this._counter={},this._referers={},this.newSession()},se.prototype.newSession=function(){this._session={}},se.prototype.getAllReferences=function(){return Object.keys(this._counter)},se.prototype.getAllReferers=function(){return Object.keys(this._referers)},se.prototype.getAllReferrers=se.prototype.getAllReferers,se.prototype.getSession=function(){var t=[],e=[];for(var i in this._session){var n=this._session[i];n>0?t.push(i):n<0&&e.push(i)}return{newEntries:t.filter(Boolean),removedEntries:e.filter(Boolean)}},se.prototype.addReference=function(t,e){if(t){if(e){var i=this._referers[e];if(i){if(i[t])return!1}else i=this._referers[e]={};i[t]=1}if(!this._counter[t])return this._counter[t]=1,this._session[t]=1,!0;++this._counter[t]}return!1},se.prototype.addRef=se.prototype.addReference,se.prototype.removeReference=function(t,e,i){if(!t)return!1;var n=this._counter[t];if(!n)return!1;if(null==i)i=1;else if(i<0)i=n;else if(!i)return!1;if(e){var o=this._referers[e];if(!o)return!1;if(!o[t])return!1;delete o[t]}return!(n-=i)||n<0?(delete this._counter[t],this._session[t]=-1,!0):(this._counter[t]=n,!1)},se.prototype.release=se.prototype.removeReference,se.prototype.addReferences=function(t,e){if(!t)return 0;var i=0;if(Array.isArray(t))for(var n=t.length,o=0;o<n;++o)this.addReference(t[o],e)&&++i;else if("string"==typeof t)this.addReference(t,e)&&++i;else for(var r in t)this.addReference(r,e)&&++i;return i},se.prototype.removeReferer=function(t){var e=0;if(t){var i=this._referers[t];if(i){for(var n in i)this.removeReference(n,t)&&++e;delete this._referers[t]}}return e},se.prototype.removeReferrer=se.prototype.removeReferer,se.prototype.log=function(){console.log(this._counter)};var ae=se,le=function(){var t=this;t._commitRicsChanges=t._commitRicsChanges.bind(this),t._commitFieldsChanges=t._commitFieldsChanges.bind(this),t._fieldChangedConflator=new o(0,t._commitFieldsChanges),t._ricChangedConflator=new o(0,t._commitRicsChanges),t._fields=new ae,t._rics=new ae,t._rowDefMap={}};r.a.inherits(le,s.a),le.prototype._fieldChangedConflator=null,le.prototype._ricChangedConflator=null,le.prototype._rowDefMap=null,le.prototype._rics=null,le.prototype._fields=null,le.prototype.getAllRics=function(){return this._rics.getAllReferences()},le.prototype.getAllRowDefs=function(){var t=[];for(var e in this._rowDefMap)t=t.concat(this._rowDefMap[e]);return t},le.prototype.getAllFields=function(){return this._fields.getAllReferences()},le.prototype.getRowDefByRic=function(t){return this._rowDefMap[t]||null},le.prototype.addRic=function(t){var e=t?t.getRic():"";if(!e)return!1;var i=this._rowDefMap,n=i[e];n?n.indexOf(t)<0&&n.push(t):n=i[e]=[t];var o=this._rics.addReference(e,t.getRowId());return this._commitRicsChanges(),o},le.prototype.removeRic=function(t,e){if(e||(e=t?t.getRic():""),e){var i=this._rowDefMap[e];if(i){var n=i.indexOf(t);n>=0&&i.splice(n,1)}this._rics.removeReference(e,t.getRowId()),this._commitRicsChanges()}},le.prototype.removeAllRics=function(){var t=this._rics.getAllReferers();for(var e in t)this._rics.removeReferer(t[e]);this._rowDefMap={},this._commitRicsChanges()},le.prototype._commitRicsChanges=function(){if(!this._ricChangedConflator.conflate()){var t=this._rics,e=t.getSession(),i=e.removedEntries,n=e.newEntries;i.length&&this._doDispatch({type:"ricRemoved",removedRics:i}),n.length&&this._doDispatch({type:"ricAdded",addedRics:n}),t.newSession()}},le.prototype.addFields=function(t,e){if(t){var i=this._fields;t instanceof lt?i.addReferences(t.getAllFields(),t.getId()):i.addReferences(t,e),this._commitFieldsChanges()}},le.prototype.removeFields=function(t,e){t&&(t instanceof lt?this._fields.removeReferer(t.getId()):this._fields.removeReference(t,e),this._commitFieldsChanges())},le.prototype.removeAllFields=function(){var t=this._fields.getAllReferers();for(var e in t)this._fields.removeReferer(t[e]);this._commitFieldsChanges()},le.prototype._commitFieldsChanges=function(){if(!this._fieldChangedConflator.conflate()){var t=this._fields,e=t.getSession(),i=e.removedEntries,n=e.newEntries;i.length&&this._doDispatch({type:"fieldRemoved",removedFields:i}),n.length&&this._doDispatch({type:"fieldAdded",addedFields:n}),t.newSession()}},le.prototype._doDispatch=function(t){var e=this;t.fields=e.getAllFields(),t.rics=e.getAllRics(),t.rowDefs=e.getAllRowDefs(),e._dispatch(t.type,t)},le.prototype.reset=function(){var t=this;t._rowDefMap={},t._fields.reset(),t._rics.reset(),t._fieldChangedConflator.reset(),t._ricChangedConflator.reset()};var ue=le,he=function(){};r.b.inherits(he,B),he.prototype.getName=function(){return"Plugin"},he.prototype.initialize=function(t){this._host=t},he.prototype.unload=function(t){this._host=null,this.unlistenAll()},he.prototype.getRelativeGrid=function(t){var e;if(t.target){var i=(e=t.target).api;if(i&&i.getCoreGrid)return i.getCoreGrid()}else t.getElement?e=t.getElement():O.isElement(t)&&(e=t);var n=e?O.closestElement(e,"tr-grid"):null;if(n)if(this._host){if(this._host.getElement()===n)return this._host}else for(var o=this._hosts?this._hosts.length:0,r=0;r<o;r++){var s=this._hosts[r];if(s.getElement()===n)return s}return null},he.prototype.getGridElementFromPoint=function(t,e){for(var i=document.elementFromPoint(t,e),n=O.closestElement(i,"tr-grid"),o=[],r=[];!n&&i&&"HTML"!=i.tagName;)o.push(i),r.push(i.style.visibility),i.style.visibility="hidden",i=document.elementFromPoint(t,e),n=O.closestElement(i,"tr-grid");for(var s=0;s<o.length;s++)o[s].style.visibility=r[s];return n},he.prototype._getDataColumnMap=function(){return this._dataMap?this._dataMap:this._host?this._host.getDataColumnMap():this._hosts&&this._hosts[0]?this._hosts[0].getDataColumnMap():null},he.prototype._getDataColumnName=function(t){var e=this._getDataColumnMap();return e&&e[t]||""},he.prototype._isNotFirstHost=function(t){return!!this._hosts&&t.sender!==this._hosts[0]},he.prototype._onColumnAdded=function(t){if(!this._isNotFirstHost(t)&&t.atTheMiddle){var e=t.colIndex;O.insertArrayItem(this._colData,e,null),O.insertArrayItem(this._dataMap,e,null)}},he.prototype._onColumnMoved=function(t){if(!this._isNotFirstHost(t)){var e=t.fromColIndex,i=t.toColIndex;O.moveArrayItem(this._colData,e,i),O.moveArrayItem(this._dataMap,e,i)}},he.prototype._onColumnRemoved=function(t){if(!this._isNotFirstHost(t)&&t.atTheMiddle){var e=t.colIndex;this._colData&&this._colData.splice(e,1),this._dataMap&&this._dataMap.splice(e,1)}},he.prototype._getColumnCount=function(){var t=this._host||this._hosts[0];return t?t.getColumnCount():0},he.prototype._getPlugin=function(t){var e=this._host||this._hosts[0];return e?e.getPlugin(t):null},he.prototype._scrollDown=function(t){(this._host||this._hosts[0]).scrollDown(t)},he.prototype._scrollToRow=function(t){(this._host||this._hosts[0]).scrollToRow(null,t)},he.prototype._scrollRight=function(t){if(this._host)this._host.scrollRight(t);else if(this._hosts)for(var e=this._hosts.length,i=0;i<e;++i){this._hosts[i].scrollRight(t)}},he.prototype._host=null,he.prototype._hosts=null,he.prototype._dataMap=null,he.prototype._colData=null,he._proto=he.prototype;var pe=he,de=function(t){var e=this;e._onSectionAdded=e._onSectionAdded.bind(e),e._onMouseDown=e._onMouseDown.bind(e),e._onUIUpdated=e._onUIUpdated.bind(e),e._onColumnAdded=e._onColumnAdded.bind(e),e._onColumnRemoved=e._onColumnRemoved.bind(e),e._onItemSortingClicked=e._onItemSortingClicked.bind(e),e.refresh=e.refresh.bind(e),e._hosts=[],e._sortLogic={},e._addEvents("preClicked","clicked","preDataSorting","columnSorted"),e._sortStates=[],e._sortingSequence=["a","d"],t&&e.config({sorting:t})};r.b.inherits(de,pe),de.prototype._sortStates,de.prototype._maxCount=1,de.prototype._dataSorting=!0,de.prototype._isDisableDoubleClickToSort=!0,de.prototype._clickTimer=0,de.prototype._delayInterval=0,de.prototype._lastMouseDown=0,de.prototype._initialSort=null,de.prototype._mode="",de.prototype._sortableColumns=!0,de.prototype._sortableIndicator=!1,de.prototype._solarTheme=!1,de.prototype._sortLogic,de.prototype._userManagedLogic=!1,de.prototype._disabled=!1,de.prototype._rowDefMode=!1,de._icons={},de.prototype._sortingSequence,de.prototype._sortingSequenceMap=null;de.prototype.getName=function(){return"SortableTitlePlugin"},de.prototype.initialize=function(t,e){this._hosts.indexOf(t)>=0||(this._hosts.push(t),1===this._hosts.length&&(t.listen("columnAdded",this._onColumnAdded),t.listen("columnRemoved",this._onColumnRemoved)),t.listen("sectionAdded",this._onSectionAdded),t.listen("postSectionRender",this._onUIUpdated),t.listen("dataSourceChanged",this.refresh),this.config(e))},de.prototype.unload=function(t){var e=this._hosts.indexOf(t);e<0||(this._hosts.splice(e,1),t.unlisten("sectionAdded",this._onSectionAdded),t.unlisten("postSectionRender",this._onUIUpdated),t.unlisten("dataSourceChanged",this.refresh),t.unlisten("columnAdded",this._onColumnAdded),t.unlisten("columnRemoved",this._onColumnRemoved),this._hosts.length<=0&&this._clickTimer&&(clearTimeout(this._clickTimer),this._clickTimer=0))},de.prototype.afterInit=function(){var t=this;if(t.setSortLogics(t._sortLogic),null!=t._initialSort){var e=t._initialSort;Array.isArray(e)||(e=[e]),1===t._maxCount&&(e=e.slice(0,1)),t.sortColumns(e)}},de.prototype.config=function(t){if(t){var e=this,i=t.icons;null!=i&&i.sorting&&(de._icons=i.sorting);var n=t.themeName;!n||n.indexOf("solar")>=0?e._solarTheme=!0:e._solarTheme=!1,e._initialSort=e._initialSortByColumnField(t);var o=t.sorting;if(o){o.ROW_DEF&&(this._rowDefMode=!0),o.userManagedLogic&&(e._userManagedLogic=!0);var r=o.multiColumn||o.multicolumn;if(null!=r&&(!0===r&&(r=-1),!1===r&&(r=1),e.setSortableColumnCount("number"==typeof r&&r>0?r:-1)),null!=(r=o.sortableIndicator)&&(e._sortableIndicator=r),null!=(r=o.disabled)&&(e._disabled=!!r),null!=(r=o.threeStatesSorting)&&e.disableTwoStateSorting(r),null!=(r=o.sortingSequence)&&Array.isArray(r)&&(e._sortingSequence=r),null!=(r=o.mode)&&(e._mode=r,"manual"===r&&e.disableDataSorting()),null!=(r=o.indicatorOnly)&&e.disableDataSorting(r),null!=(r=o.disableDoubleClickToSort)&&e.disableDoubleClickToSort(r),"function"==typeof(r=o.columnSorted)&&e.listen("columnSorted",r),"function"==typeof(r=o.preClicked)&&e.listen("preClicked",r),"function"==typeof(r=o.clicked)&&e.listen("clicked",r),"function"==typeof(r=o.preDataSorting)&&e.listen("preDataSorting",r),null!=(r=o.sortableColumns)&&(e._sortableColumns=r),"object"==typeof(r=o.initialSort)&&(e._initialSort=r),"object"==typeof(r=o.sortLogic))for(var s in r)"function"==typeof r[s]&&(e._sortLogic[s]=r[s])}}},de.prototype.getConfigObject=function(t){var e=t||{},i=e.columns;i||(i=e.columns=[]);var n=this._hosts[0];if(!n)return e;for(var o,r,s,a=n.getColumnCount(),l=0;l<a;++l)(o=i[l])||(o=i[l]={}),(r=this._getSortOptions(l))&&(this._sortableColumns?r.disabled&&(o.sortable=!1):r.disabled||(o.sortable=!0),(s=r.field)&&(o.sortBy=s,this._sortingSequenceMap&&this._sortingSequenceMap[s]&&(o.sortingSequence=this._sortingSequenceMap[s])));var u=e.sorting;u||(u=e.sorting={}),u.initialSort=this.getSortedColumns(),u.sortableIndicator=this._sortableIndicator,1!==this._maxCount&&(u.multiColumn=-1===this._maxCount||this._maxCount),u.disableDoubleClickToSort=this._isDisableDoubleClickToSort,u.sortableColumns=this._sortableColumns,u.indicatorOnly=!this._dataSorting,this._disabled&&(u.disabled=!0);var h=this._sortingSequence,p=!0;return 2===h.length&&"a"===h[0]&&"d"===h[1]&&(p=!1),p&&(u.sortingSequence=h.slice()),e},de.prototype.getColumnMenu=function(t,e){e||(e={});var i=e.menus;i||(i=e.menus=[]);var n=i[0];n||(n=i[0]={menuItems:[]});var o=this.getSortOrder(t),r={indexScore:100,label:"Sort Column",icon:"sort-a-to-z",group:"FREQUENTLY_USED",subMenu:{menuItems:[{indexScore:3,label:"Ascending",radioMode:!0,value:{colIndex:t,order:"a"},selected:"a"===o,click:this._onItemSortingClicked},{indexScore:2,label:"Descending",radioMode:!0,value:{colIndex:t,order:"d"},selected:"d"===o,click:this._onItemSortingClicked},{indexScore:1,label:"Un-Sort",radioMode:!0,value:{colIndex:t,order:"n"},selected:"n"===o,click:this._onItemSortingClicked}]}};return n.menuItems.push(r),e},de.prototype._onItemSortingClicked=function(t){this._hosts[0].getPlugin("ColumnMenuPlugin").hide();var e=t.currentTarget.value,i=e.colIndex,n=e.sortOrder;this.sortColumn(i,n)},de.prototype.getIcons=function(){return de._icons},de.prototype.setSortLogics=function(t){if(null!=t){var e=this._hosts[0];if(e){var i=e.getDataSource();for(var n in t)this._setSortLogic(i,n,t[n])}}},de.prototype.setSortLogic=function(t,e){if("string"==typeof t){var i=this._hosts[0];if(i){var n=i.getDataSource();this._setSortLogic(n,t,e)}}},de.prototype._setSortLogic=function(t,e,i){t&&"string"==typeof e&&("*"===e?t.setSortingLogic(i):t.setColumnSortingLogic(e,i))},de.prototype.getSortOrder=function(t){var e=null!=t?this.getSortPriority(t):0,i=this._sortStates[e];return(i?i.sortOrder:"")||"n"},de.prototype.getSortedColumnIndex=function(t){var e=this._sortStates[t||0];if(e)for(var i=this._hosts[0],n=i?i.getColumnCount():0,o=0;o<n;++o){if(this._getSortOptions(o)===e)return o}return-1},de.prototype.getSortPriority=function(t){var e=this._getSortOptions(t);if(e&&e.sortOrder)for(var i=this._sortStates.length,n=0;n<i;++n)if(this._sortStates[n]===e)return n;return-1},de.prototype.isColumnSorted=function(t){return this.getSortPriority(t)>=0},de.prototype.getSortedColumns=function(){var t=this._sortStates.length;if(t<=0)return null;for(var e=new Array(t),i=0;i<t;++i){var n=this.getSortedColumnIndex(i);e[i]={colIndex:n,sortOrder:this._sortStates[i].sortOrder||"n"}}return e},de.prototype.sortColumn=function(t,e,i){if(t>=0){var n=this._preSortColumn(t,e);n&&this._sortColumn([n],i)}},de.prototype.sortColumns=function(t,e){if(Array.isArray(t)){for(var i=[],n=0;n<t.length;n++){var o=t[n],r=this._preSortColumn(o.colIndex,o.sortOrder||o.order);r&&(i[n]=r)}this._sortColumn(i,e)}},de.prototype.clearSortState=function(t){this._popSortState(0,t),this.updateSortSymbols()},de.prototype.refresh=function(){this._sortStates.length&&(this._sortDataView(),this.updateSortSymbols())},de.prototype.restoreUserActions=de.prototype.refresh,de.prototype.setSortableColumnCount=function(t){this._maxCount=t||1,this._popSortState(this._maxCount)},de.prototype.getSortingStates=function(){return this._sortStates},de.prototype.updateSortSymbols=function(){if(!this._disabled)for(var t=this._hosts.length;--t>=0;)this._updateSortableIndicator(t)},de.prototype.getDataColumnMap=function(){var t=this._hosts[0],e=[];if(t)for(var i=t.getColumnCount(),n=0;n<i;++n)e[n]=this.getColumnSortingField(n);return e},de.prototype.getDataColumnNames=de.prototype.getDataColumnMap,de.prototype.setDataColumnMap=function(t){if(Array.isArray(t))for(var e=t.length;--e>=0;)this.setColumnSortingField(e,t[e])},de.prototype.setDataColumnNames=de.prototype.setDataColumnMap,de.prototype.getColumnSortingField=function(t){var e=this._getSortOptions(t),i=e?e.field:null;if(null==i&&!this._rowDefMode){var n=this._hosts[0];n&&(i=n.getDataColumnName(t))}return i||""},de.prototype.setColumnSortingField=function(t,e,i){if("number"==typeof t&&null!=e){var n=this._newSortOptions(t);e||(e=""),n.field!==e&&(n.field=e),null==i||this._userManagedLogic||n.sortLogic!==i&&(n.sortLogic=i||null)}},de.prototype.getColumnSortingFields=function(){for(var t=[],e=this._hosts[0],i=e?e.getColumnCount():0,n=0;n<i;++n){var o=this._getSortOptions(n);if(o&&o.sortOrder){var r=this._sortStates.indexOf(o);r>=0&&(t[r]=this.getColumnSortingField(n))}}return t},de.prototype.setFirstSortOrder=function(t,e){"a"!==(e=e?de._toSortOrder(e):"a")&&"d"!==e&&(e="a");for(var i=null,n=(i=Array.isArray(t)?t:[t]).length,o=0;o<n;++o){var r=i[o],s=this.getSortingSequence(r).slice(),a=s.indexOf(e);a>=0&&s.splice(a,1),s.unshift(e),this.setSortingSequence(s,r)}},de.prototype.disableTwoStateSorting=function(t){var e=this._sortingSequence.indexOf("n");!1===t?e>=0&&this._sortingSequence.splice(e,1):e<0&&this._sortingSequence.push("n")},de.prototype.disableSortSymbols=function(t){},de.prototype.disableDataSorting=function(t){this._dataSorting=!1===t},de.prototype.disableDoubleClickToSort=function(t){this._isDisableDoubleClickToSort=!!t},de.prototype.disableCellClick=function(t,e){t&&t.enableClass("no-sort",!1!==e)},de.prototype.disableColumnSorting=function(t,e){if(e=!1!==e,"number"==typeof t)this._disableColumnSorting(t,e);else if(Array.isArray(t))for(var i=t.length,n=0;n<i;++n)this._disableColumnSorting(t[n]||0,e)},de.prototype._disableColumnSorting=function(t,e){var i=this._newSortOptions(t);i.disabled!==e&&(i.disabled=e)},de.prototype.setClickDelayInterval=function(t){this._delayInterval=null!=t?t:500},de.prototype._prepareColumnOptions=function(t,e){var i=e||{},n={colIndex:t,field:i.field,sortable:!!this._sortableColumns};return null!=i.sortBy&&(n.sortable=!!i.sortBy,n.sortBy=i.sortBy),null!=i.sortable&&(n.sortable=!!i.sortable),n.sortLogic=i.sortLogic||i.sortingLogic||i.sorter,n.sort=i.defaultSort||i.sort,n},de.prototype._initialSortByColumnField=function(t){for(var e=t.columns||[],i=null,n=0;n<e.length;n++){var o=this._prepareColumnOptions(n,e[n]),r=o.sort;r&&(i={colIndex:o.colIndex,sortOrder:r})}return i},de.prototype._onSectionAdded=function(t){if("title"===t.sectionType){var e=t.section;0===e.getIndex()&&(e.listen("mousedown",this._onMouseDown),e.listen("click",this._onClickTitle.bind(this,t.sender),0))}},de.prototype._onUIUpdated=function(t){"title"===t.sectionType&&this.updateSortSymbols()},de.prototype._canClickToSort=function(t){if(this._disabled)return!1;var e=t.grid;if(!e||!e.getElement())return!1;var i=this._getPlugin("CellEditingPlugin");if(i&&i.isEditing())return!1;if(this._dispatch("preClicked",t),t.cancel)return!1;var n=t.colIndex,o=t.section,r=t.rowIndex;return!!this._isCellSortable(o,n,r)},de.prototype._proceedSorting=function(t){if(this._clickTimer=0,this._canClickToSort(t)){var e=t.colIndex,i=this._preSortColumn(e);if(i&&this._sortColumn([i],{isUserAction:!0}),this._hasListener("clicked")){var n={};n.colIndex=e,n.sortOrder=this.getSortOrder(e),n.dataColumnName=this.getColumnSortingField(e),this._dispatch("clicked",n)}}},de.prototype._onMouseDown=function(t){t.button||(this._lastMouseDown=t.timeStamp)},de.prototype._onClickTitle=function(t,e){if(!this._disabled)if(2===e.detail&&this._isDisableDoubleClickToSort)this._clickTimer&&(clearTimeout(this._clickTimer),this._clickTimer=0);else if(!(e.shiftKey||e.ctrlKey||e.altKey||e.metaKey)&&e.timeStamp-this._lastMouseDown<500){var i=t.getRelativePosition(e);if(i.hit){var n=this._getPlugin("ColumnSelectionPlugin");if(n&&n.isEnabled()){var o=i.colIndex;if(!n.isSelectedColumn(o))return}i.target=e.target,this._delayInterval>0?this._clickTimer||(this._clickTimer=setTimeout(this._proceedSorting.bind(this,i),this._delayInterval)):this._proceedSorting(i)}}},de.prototype._popSortState=function(t,e){if(t<0||this._sortStates.length<=t)return!1;for(var i=!1,n=this._sortStates.length;--n>=t;)this._clearSortSymbols(this._sortStates[n]),i=!0;return this._sortStates.length=t,this._sortDataView(e),i},de._toSortOrder=function(t){return!t||"string"!=typeof t||"d"!==(t=t.charAt(0).toLowerCase())&&"a"!==t?"n":t},de.prototype.getSortingSequence=function(t){return this._sortingSequenceMap&&(t||0===t)&&("string"!=typeof t&&(t=this.getColumnSortingField(t)),this._sortingSequenceMap[t])?this._sortingSequenceMap[t]:this._sortingSequence},de.prototype.setSortingSequence=function(t,e){if(Array.isArray(t))t.length||(t=null);else if(t)return;var i;if(null!=e&&("string"==typeof e?i=e:"number"==typeof e&&(i=this.getColumnSortingField(e))),t){var n=t.map(de._toSortOrder);i?(this._sortingSequenceMap||(this._sortingSequenceMap={}),this._sortingSequenceMap[i]=n):this._sortingSequence=n}else i?this._sortingSequenceMap&&delete this._sortingSequenceMap[i]:this._sortingSequence=this._sortingSequence.length>2?["a","d","n"]:["a","d"]},de.prototype.clearAllColumnSortingSequences=function(){this._sortingSequenceMap=null},de.prototype._preSortColumn=function(t,e){if(!this._maxCount)return null;var i=this.getSortPriority(t),n=i>=0?this._sortStates[i]:null,o=n?n.sortOrder:"n",r="n",s=this.getColumnSortingField(t);if(null==e){var a=this.getSortingSequence(s),l=a.indexOf(o);r=a[l=l<0?0:(l+1)%a.length]}else r=de._toSortOrder(e);if(n){if(o===r)return this.updateSortSymbols(),null;this._sortStates.splice(i,1),this._clearSortSymbols(n)}"a"!==r&&"d"!==r||(n||(n=this._newSortOptions(t)),this._sortStates.push(n)),n&&("n"!==o?n.prevOrder=o:delete n.prevOrder,n.order=r,n.sortOrder=r);var u=[];if(this._maxCount>0)for(;this._sortStates.length>this._maxCount;){var h=this._clearSortSymbols(this._sortStates.shift());null!==h&&u.push(h)}return{colIndex:t,sortedField:s,sortOrder:r||"n",prevOrder:o,clearedSortColIndexes:u}},de.prototype._sortColumn=function(t,e){this._sortDataView(e),this.updateSortSymbols();var i=t[0]||{},n=t.length;if(n>1){i.colIndices=new Array(n),i.sortedFields=new Array(n),i.sortOrders=new Array(n),i.prevOrders=new Array(n);for(var o=0;o<n;o++){var r=t[o];i.colIndices[o]=r.colIndex,i.sortedFields[o]=r.sortedField,i.sortOrders[o]=r.sortOrder,i.prevOrders[o]=r.prevOrder}}this._dispatch("columnSorted",i)},de.prototype._onColumnAdded=function(t){var e=this,i=t.colIndex,n=t.context,o=e._prepareColumnOptions(i,n),r=o.sortBy||o.field,s=o.sortLogic||e._sortLogic[r],a=n?n.sortingSequence:null;null!=a&&r&&e.setSortingSequence(a,r),o.sortable?e.setColumnSortingField(i,r,"function"==typeof s?s:null):e.disableColumnSorting(i,!0)},de.prototype._onColumnRemoved=function(t){if(t.atTheMiddle&&this._sortStates.length){var e=t.columnData,i=e?e.sortableTitle:null;if(i?i.sortOrder:""){var n=this._sortStates.indexOf(i);n>=0&&this._sortStates.splice(n,1),this._clearSortSymbols(i),this._sortDataView()}}},de._toRowDefField=function(t){return"ROW_DEF"},de.prototype._sortDataView=function(t){if(t=t||{},this._dispatch("preDataSorting",t),this._dataSorting){var e=this._sortStates.length,i=null,n=null,o=null;if(e){i=new Array(e),n=new Array(e);for(var r=0;r<e;++r)i[r]=this._sortStates[r].sortOrder,n[r]=this._sortStates[r].sortLogic;o=this._rowDefMode?this._sortStates.map(de._toRowDefField):this.getColumnSortingFields()}for(var s=this._hosts.length;--s>=0;){var a=this._hosts[s].getDataSource();if(a){var l=1==t.isUserAction;a.sort(o,i,n,l)}}}},de.prototype._clearSortSymbols=function(t){var e=t.targetCells;if(!e)return null;for(var i=null,n=e.length;--n>=0;){var o,r=e[n];r.removeClass("sorting"),r.removeClass("sortable"),r.removeFloatingIcon("sort-symbol"),r.removeFloatingIcon("priority-symbol"),null==i&&(o=r.getSection())&&(i=o.getColumnIndex(r.getParent()))}return e.length=0,i},de.prototype._updateSortableIndicator=function(t){var e=this,i=e._hosts[t];if(i){var n=i.getSection("title");if(null!=n)for(var o=n.getColumnCount();--o>=0;)for(var r=n.getRowCount(),s=0;s<r;s++){var a=n.getCell(o,s,!0);if(a&&(a.removeClass("sorting"),a.removeClass("sortable"),a.removeClass("asc"),a.removeClass("desc"),a.removeClass("edge-indicator"),a.removeFloatingIcon("sort-symbol"),a.removeFloatingIcon("priority-symbol"),a.removeFloatingIcon("sortable-indicator"),s===r-1&&e._isCellSortable(n,o,s))){a.addClass("sortable");var l,u,h,p=e._getColumnSortingStatePriority(o),d=e._sortStates[p];if(d&&"n"!==d.sortOrder)if(d.targetCells||(d.targetCells=[]),d.targetCells[t]=a,"a"===d.sortOrder?a.addClass("asc"):a.addClass("desc"),a.addClass("sorting"),e._solarTheme)"a"===d.sortOrder?(h="▲",u=de._icons.ascending):(h="▼",u=de._icons.descending),(l=e._createIconElem(u,h)).className="sort-symbol",a.insertFloatingIcon(l,0),e._sortStates.length>1&&((l=document.createElement("span")).className="priority-symbol",l.textContent=p+1,a.insertFloatingIcon(l,1));else a.addClass("edge-indicator");else e._sortableIndicator&&(u=de._icons.sortable,(l=e._createIconElem(u,"◊")).className="sortable-indicator",a.insertFloatingIcon(l,0))}}}},de.prototype._createIconElem=function(t,e){var i;return t&&"string"==typeof t?(i=document.createElement("ef-icon")).setAttribute("icon",t):(i=document.createElement("span")).textContent=e,i},de.prototype._getColumnSortingStatePriority=function(t){for(var e=this._sortStates.length;--e>=0;){if(this.getSortedColumnIndex(e)===t)return e}return-1},de.prototype._getSortOptions=function(t){var e=this._hosts[0];if(e){var i=e.getColumnData(t);if(i)return i.sortableTitle}return null},de.prototype._newSortOptions=function(t){var e=this._hosts[0],i=null;if(e&&t>=0){var n=e.getColumnData(t);n||(n=e.setColumnData(t,{})),(i=n.sortableTitle)||(i=n.sortableTitle={})}return i||{}},de.prototype._isCellSortable=function(t,e,i){var n=this._getSortOptions(e);if(n){if(n.disabled)return!1;var o=n.field;if(null!=o&&!o)return!1}var r=t.getCell(e,i,!0);return!r.hasClass("no-sort")&&r===t.getCell(e,t.getRowCount()-1,!0)},de._proto=de.prototype;var ce=function(){var t=this;t._onColumnAdded=t._onColumnAdded.bind(t),t._onColumnMoved=t._onColumnMoved.bind(t),t._onColumnRemoved=t._onColumnRemoved.bind(t),t._onMouseUp=t._onMouseUp.bind(t),t._onMouseDown=t._onMouseDown.bind(t),t._onDrag=t._onDrag.bind(t),t._onDragStart=t._onDragStart.bind(t),t._onDragEnd=t._onDragEnd.bind(t),t._onDragPulse=t._onDragPulse.bind(t),t._hosts=[],t._guideline=document.createElement("svg"),t._guideline.className="tr-guideline",t._dragbox=document.createElement("svg"),t._dragbox.className="tr-dragbox",t._addEvent("dragged"),t._addEvent("dragStart"),t._addEvent("dragInterval"),t._addEvent("preColumnMoved"),t._addEvent("columnMoved")};r.b.inherits(ce,pe),ce.prototype._clickedGrid,ce.prototype._clickedSection=null,ce.prototype._clickedRow=-1,ce.prototype._guideline,ce.prototype._dragbox,ce.prototype._timerId=0,ce.prototype._dragPulseId=0,ce.prototype._pos=null,ce.prototype._cacheLeft=0,ce.prototype._cacheWidth=0,ce.prototype._startColumn=-1,ce.prototype._endColumn=-1,ce.prototype._destColumn=-1,ce.prototype._leftMovableBorder=-1,ce.prototype._rightMovableBorder=-1,ce.prototype._isDragging=!1,ce.prototype._lockFrozen=!1,ce.prototype._disabled=!1,ce.prototype._noColumnMoving=!1,ce.prototype._noDragBox=!1,ce.prototype.getName=function(){return"DragAndDropTitlePlugin"},ce.prototype.initialize=function(t){this._hosts.indexOf(t)>=0||(this._hosts.push(t),t.listen("mousedown",this._onMouseDown),t.listen("columnAdded",this._onColumnAdded),t.listen("columnMoved",this._onColumnMoved),t.listen("columnRemoved",this._onColumnRemoved),t.listen("dragstart",O._preventDefault))},ce.prototype.unload=function(t){var e=this._hosts.indexOf(t);e<0||(this._hosts.splice(e,1),t.unlisten("mousedown",this._onMouseDown),t.unlisten("columnAdded",this._onColumnAdded),t.unlisten("columnMoved",this._onColumnMoved),t.unlisten("columnRemoved",this._onColumnRemoved))},ce.prototype.getMarker=function(){return null},ce.prototype.lockFrozenColumn=function(t){this._lockFrozen=t},ce.prototype.disable=function(t){this._disabled=!1!==t},ce.prototype.disableMoving=function(t){this._noColumnMoving=!1!==t},ce.prototype.disableDragBox=function(t){this._noDragBox=!1!==t},ce.prototype._isAllowed=function(t){var e=this._clickedGrid||this._hosts[0];if(e){var i=e.getStationaryColumnIndex();if(i<0)return!0;if(t<=i)return!1}return!0},ce.prototype._onMouseDown=function(t){if(!this._disabled&&!(t.shiftKey||t.ctrlKey||t.altKey||t.button||this._timerId)){var e=this.getRelativeGrid(t);if(e&&(this._pos=e.getRelativePosition(t),!1!==this._pos.hit)){var i=this._pos.section;if(i&&"title"===this._pos.sectionType){var n=this._pos.colIndex;if(this._isAllowed(n)&&(!this._lockFrozen||!e.isPinnedColumn(n))){var o=this._pos.rowIndex,r=this._findMoveableBorder(n,o-1,i),s=this._getSpan(n,o,i);this._clickedGrid=e,this._clickedSection=i,this._clickedRow=o,this._startColumn=s.left,this._endColumn=s.right,this._leftMovableBorder=r.left,this._rightMovableBorder=r.right,this._destColumn=this._startColumn,this._timerId=setTimeout(this._onDragStart,300),window.addEventListener("mouseup",this._onMouseUp,!1)}}}}},ce.prototype._onMouseUp=function(t){this._timerId&&(window.clearTimeout(this._timerId),window.removeEventListener("mouseup",this._onMouseUp,!1),this._timerId=0,this._clearCache())},ce.prototype._onDragStart=function(){if(!this._disabled&&!this._isDragging&&(this._hasListener("dragStart")&&this._dispatch("dragStart",this._pos),!this._pos.cancel&&(this._timerId=0,window.removeEventListener("mouseup",this._onMouseUp,!1),this._clickedGrid))){this._isDragging=!0,document.body.classList.add("tr-dragging"),window.addEventListener("mousemove",this._onDrag,!1),window.addEventListener("mouseup",this._onDragEnd,!0);var t=this._clickedGrid,e=t.getHeight(),i=this._clickedSection.getBoundingClientRect(),n=this._clickedSection.getCell(this._startColumn,this._clickedRow).getBoundingClientRect(),o=t.getElement();this._guideline.style.top=n.top-i.top+"px",this._guideline.style.height=e-1+"px",this._dragbox.style.height=e-33+"px",this._dragbox.style.width=this._clickedSection.getColumnWidth(this._startColumn)+"px",o.appendChild(this._guideline),this._dimCol(!0),this._renderGuideline(),this._scrollStep=Math.floor(t.getScrollWidth()/25),this._scrollStep<40?this._scrollStep=40:this._scrollStep>400&&(this._scrollStep=400);var r=t.getHScrollbar();this._cacheLeft=r.getLeft()+20,this._cacheWidth=r.getLeft()+r.getWidth()-20,this._dragPulseId=window.setInterval(this._onDragPulse,150)}},ce.prototype._onDrag=function(t){if(this._isDragging){O._preventDefault(t),this._pos=this._clickedGrid.getRelativePosition(t);var e=this.getRelativeGrid(t);if(e&&e===this._clickedGrid){var i=this._pos.colIndex;!(i>=this._leftMovableBorder&&i<=this._rightMovableBorder&&this._isAllowed(i))||this._lockFrozen&&e.isPinnedColumn(i)||(this._renderGuideline(),this._dispatch("dragged",t)),this._renderDragBox(t)}}},ce.prototype._onDragEnd=function(t){if(this._isDragging){this._isDragging=!1,document.body.classList.remove("tr-dragging"),this._dimCol(!1);var e=this._guideline.parentNode;if(e&&e.removeChild(this._guideline),(e=this._dragbox.parentNode)&&e.removeChild(this._dragbox),window.removeEventListener("mousemove",this._onDrag,!1),window.removeEventListener("mouseup",this._onDragEnd,!0),this._dragPulseId&&(window.clearInterval(this._dragPulseId),this._dragPulseId=0),this._pos=null,O._preventDefault(t),this._destColumn>this._startColumn&&--this._destColumn,!this._destColumn&&0!==this._destColumn||this._destColumn<0||!this._isAllowed(this._destColumn)||this._destColumn>=this._startColumn&&this._destColumn<=this._endColumn)this._clearCache();else{var i={startColumnIndex:this._startColumn,destColumnIndex:this._destColumn};if(this._hasListener("preColumnMoved")&&this._dispatch("preColumnMoved",i),!i.cancel){if(!this._noColumnMoving){var n=-1,o=-1;this._startColumn>this._destColumn?(n=this._destColumn,this._startColumn-1,o=-1*(this._startColumn-this._destColumn)):this._startColumn<this._destColumn&&(n=this._endColumn+1,o=this._destColumn-n+1);for(var r=this._hosts.length;--r>=0;){var s,a=this._hosts[r];if(o>0)for(s=this._startColumn;s<=this._endColumn;s++)a.moveColumn(this._startColumn,this._destColumn);else for(s=this._startColumn;s<=this._endColumn;s++)a.moveColumn(this._startColumn+(s-this._startColumn),this._destColumn+(s-this._startColumn))}}this._hasListener("columnMoved")&&this._dispatch("columnMoved",{startColumnIndex:this._startColumn,endColumnIndex:this._endColumn,destColumnIndex:this._destColumn,clickedRow:this._clickedRow}),this._clearCache()}}}},ce.prototype._onDragPulse=function(){if(this._isDragging&&this._pos){this._dispatch("dragInterval",this._pos);var t=this._clickedGrid;if(t&&t.getHScrollbar().isActive()){var e=this._pos.x,i=0;e<this._cacheLeft?i=-Math.floor(this._scrollStep*(.8+Math.random())):e>this._cacheWidth&&(i=Math.floor(this._scrollStep*(.8+Math.random()))),this._scrollRight(i)}}},ce.prototype._clearCache=function(){this._startColumn=this._endColumn=this._destColumn=-1,this._leftMovableBorder=this._rightMovableBorder=-1,this._clickedRow=-1,this._clickedSection=this._clickedGrid=null},ce.prototype._getSpan=function(t,e,i){var n=i.getCellColSpan(t,e);return n<=0&&(t+=n,n=i.getCellColSpan(t,e)),{left:t,right:t+n-1}},ce.prototype._findMoveableBorder=function(t,e,i){if(e<0||!e&&0!==e)return{left:0,right:i.getColumnCount()-1};var n=this._getSpan(t,e,i);return n.right>=n.left?n:this._findMoveableBorder(t,e-1,i)},ce.prototype._renderGuideline=function(){var t=this._pos.colIndex;if(!(null==t||t<0)){for(var e=this._getSpan(t,this._clickedRow,this._clickedSection),i=e.left,n=e.right,o=this._clickedGrid.getColumnLeft(i),r=0,s=i;s<=n;++s)r+=this._clickedGrid.getColumnWidth(s);var a=this._pos.x>o+r/2,l=a?n+1:i;o=this._clickedGrid.getColumnLeft(this._destColumn),l<this._leftMovableBorder?l=this._leftMovableBorder:l>this._rightMovableBorder&&(l=this._rightMovableBorder+1,a&&(o-=4)),this._destColumn=l,this._guideline.style.left=o+"px"}},ce.prototype._renderDragBox=function(t){if(!this._noDragBox){var e=this._clickedGrid.getElement();this._dragbox.parentNode||e.appendChild(this._dragbox);var i=e.getBoundingClientRect(),n=this._clickedGrid.zoomFactor,o=i.width,r=t.clientX-i.left,s=(t.pageY-i.top)/n-window.scrollY,a=parseFloat((r/o).toFixed(2)),l=i.width*a/n-this._dragbox.offsetWidth*a;this._dragbox.style.left=l+"px",this._dragbox.style.top=s+10+"px"}},ce.prototype._dimCol=function(t){for(var e=this._startColumn;e<=this._endColumn;e++)this._clickedGrid.enableColumnClass(e,"drag-fadeout",t)},ce._proto=ce.prototype;var _e=function(t){return t?t.getRowData():null},fe={ROW_DEF:1,SUB_ID:1},ge=function(t,e){return t-e},ye=function(t,e,i){return i>=t&&i<=e},me=function(t,e,i){e[t]=i},ve=function(t,e,i,n){return(t.getData(n)-e.getData(n))*i},Ce=function(t,e){var i=this;i._onDataChanged=i._onDataChanged.bind(i),i._onDataComposed=i._onDataComposed.bind(i),i._recalculateFormulas=i._recalculateFormulas.bind(i),i._updateStreamingData=i._updateStreamingData.bind(i),i.updateColumnTitle=i.updateColumnTitle.bind(i),i._onPostSectionDataBinding=i._onPostSectionDataBinding.bind(i),i._asyncClearDataUpdates=i._asyncClearDataUpdates.bind(i),i._clearDataUpdates=i._clearDataUpdates.bind(i),i._onPreDataSorting=i._onPreDataSorting.bind(i),i._mainSorter=i._mainSorter.bind(i),i._updateRowData=i._updateRowData.bind(i),i._onFormulaDataChanged=i._onFormulaDataChanged.bind(i),i._onFormulaDataRequired=i._onFormulaDataRequired.bind(i),i._addMemberOfChain=i._addMemberOfChain.bind(i),i._onColumnAdded=i._onColumnAdded.bind(i),i._onRowExpansionBinding=i._onRowExpansionBinding.bind(i),i._onColumnHeaderBinding=i._onColumnHeaderBinding.bind(i),i._getRowId=i._getRowId.bind(i),i._onFieldLoadedError=i._onFieldLoadedError.bind(i),i._snapshotFillerDataChanged=i._snapshotFillerDataChanged.bind(i),i._streamingConflator=new o(50,i._updateStreamingData),i._formulaConflator=new o(300,i._onFormulaDataChanged),i._chainConflator=new o(100,i._addMemberOfChain),i._columnTitleConflator=new o(0,i.updateColumnTitle),i._defaultColumnOptions={},i._topNode=t||n.div(),i._topNode.classList.add("rt-grid"),i._grid=new ne,i._grid._wrapper=this,i._grid.listen("columnAdded",i._onColumnAdded),i._stp=new de({userManagedLogic:!0,sortableColumns:!0,disableDoubleClickToSort:!0,ROW_DEF:!0}),i._stp.listen("preDataSorting",i._onPreDataSorting),i._dtp=new ce,i._grid.loadPlugin(i._stp,e),i._grid.loadPlugin(i._dtp),i._grid.listen("preSectionRender",i._onColumnHeaderBinding),i._grid.listen("postSectionDataBinding",i._onPostSectionDataBinding),i._grid.enableRowHighlighting(!0),i._dc=new W,i._dc.listen("dataChanged",i._onDataChanged),i._dc.listen("dataComposed",i._onDataComposed),i._dc.listen("dataComposed",i._recalculateFormulas),i._dt=new K,i._dt.setSortingLogic(i._mainSorter),i._dv=new Nt(i._dt),i._dv.listen("pageIndexChanged",i._dispatch.bind(i,"pageIndexChanged")),i._dv.listen("pageCountChanged",i._dispatch.bind(i,"pageCountChanged")),i._addGridSections(),i._grid.setDataSource(i._dv),i._grid.setParent(i._topNode),i._snapshot=new pt,i._snapshot.addEventListener("adcDataReceived",i._dispatch.bind(i,"adcDataReceived")),i._snapshot.addEventListener("dataChanged",this._snapshotFillerDataChanged),i._connector=new ue,i._connector.addEventListener("ricAdded",i._onRicAdded.bind(i)),i._connector.addEventListener("ricRemoved",i._onRicRemoved.bind(i)),i._connector.addEventListener("fieldAdded",i._onFieldAdded.bind(i)),i._connector.addEventListener("fieldRemoved",i._onFieldRemoved.bind(i)),i._fnEngine=new k,i._fnEngine.addEventListener("dataChanged",i._onFormulaDataChanged),i._fnEngine.addEventListener("dataRequired",i._onFormulaDataRequired),i.initialize(e),i.initSubscription(),re.applyStyle(i._grid)};r.a.inherits(Ce,s.a),Ce.prototype._topNode=null,Ce.prototype._grid=null,Ce.prototype._dc=null,Ce.prototype._dt=null,Ce.prototype._dv=null,Ce.prototype._subs=null,Ce.prototype._stp=null,Ce.prototype._dtp=null,Ce.prototype._columnSorter=null,Ce.prototype._streamingConflator=null,Ce.prototype._snapshot=null,Ce.prototype._connector=null,Ce.prototype._fnEngine=null,Ce.prototype._formulaConflator=null,Ce.prototype._chainMembers=null,Ce.prototype._chainConflator=null,Ce.prototype._hasGroup=!1,Ce.prototype._clientWidth=NaN,Ce.prototype._autoLayoutTimer=0,Ce.prototype._defaultColumnOptions=null,Ce.prototype._RTK=null,Ce.prototype._synapse=null,Ce.prototype._autoDateConversion=!1,Ce.prototype._textSelect=!1,Ce.prototype._lang=null,Ce.prototype._initializing=!1,Ce.prototype.dispose=function(){this.removeAllEventListeners(),this._autoLayoutTimer&&(clearInterval(this._autoLayoutTimer),this._autoLayoutTimer=0),this.removeAllColumns(),this.removeAllRows(),this._grid.dispose(),this._connector.reset(),this._subs&&(this._subs.dispose(),this._subs=null)},Ce.prototype.getElement=function(){return this._topNode},Ce.prototype.removeEventListeners=Ce.prototype.removeAllEventListeners,Ce.prototype.listen=Ce.prototype.addEventListener,Ce.prototype.initSubscription=function(){var t,e,i;if(!this._dc.getSubscriptions()&&(t=window.JET,this._RTK?e=this._RTK.Quotes:t&&(e=t.Quotes2),e&&(i=e.create()),i)){i.filter&&i.filter(-2,-1),this._subs=i,this._subs.start(),this._dc.setSubscriptions(i);for(var n=this._getAllRowDefinitions(),o=n.length,r=0;r<o;++r){var s=n[r];s&&s.subscribeForUpdates()}}},Ce.prototype.updateLayout=function(){this._grid.updateLayout(),this._stp.updateSortSymbols()},Ce.prototype._updateRowData=function(t){if(t>=0){var e=this._dv.getRowId(t);e&&this._dt.setRowData(e,{})}else this._dt.dispatchGlobalChange()},Ce.prototype.updateRowData=Ce.prototype._updateRowData,Ce.prototype._addGridSections=function(){this._grid.addSection("title").setRowCount(1),this._grid.addSection("content");var t=this._grid.getSectionSettings("title");t.disableDataBinding();var e=this._grid.getSectionSettings("content");e.setAutoSyncRowCount(!0),e.setParent(t)},Ce.prototype.addHeaderSection=function(t){var e=this._grid.getAllSections("title"),i=this._grid.addSectionAt(e.length,"title",t);i&&(i.setRowCount(1),this._grid.getSectionSettings(i).disableDataBinding());return i},Ce.prototype.addFooterSection=function(t){var e=this._grid.addSection("footer",t);e&&(e.setRowCount(1),this._grid.getSectionSettings(e).disableDataBinding());return e},Ce.prototype.setParent=function(t){n.appendChild(t,this._topNode),this.updateLayout()},Ce.prototype.insertBefore=function(t){if(t){var e=t.parentNode;e&&(e.insertBefore(this._topNode,t),this.updateLayout())}},Ce.prototype.getRelativePosition=function(t){return this._grid.getRelativePosition(t)},Ce.prototype.getCoreGrid=function(){return this._grid},Ce.prototype.initialize=function(t){if(t){var e=this;e._initializing=!0;var i=e._grid,n=t.plugins||t.extensions,o=t.fields||t.columns;t.defaultColumnOptions&&(e._defaultColumnOptions=t.defaultColumnOptions,e._defaultColumnSetup(e._defaultColumnOptions,o)),e._processExtension(n,"beforeInit",[i.getElement(),t]),t.textSelect&&(e._textSelect=!0,i.addClass("tr-text-select")),t.RTK&&(e._RTK=t.RTK,e._snapshot.setRTK(e._RTK)),t.synapse&&(e._synapse=t.synapse,nt.setSynapseConfig(e._synapse)),t.icons&&t.icons.rowGrouping&&t.icons.rowGrouping.expander&&(re.chainIcon=t.icons.rowGrouping.expander);var r=t.borders;null!=r&&i.toggleBorders(r);var s=t.gridlines;null!=s&&i.toggleGridlines(s);var a=t.verticalLines;null!=a&&i.toggleVerticalLines(a);var l=t.horizontalLines;null!=l&&i.toggleHorizontalLines(l),t.pageSize&&e._dv.setPageSize(+t.pageSize);var h=+t.rowHeight;h&&i.setDefaultRowHeight(h);var p=+t.headerRowHeight;p&&i.getSection("title").setDefaultRowHeight(p);var d=t.noColumnDragging;null==d&&null!=t.columnReorder&&(d=!t.columnReorder),d&&e._dtp.disable();var c=t.autoLayoutUpdate;!e._autoLayoutTimer&&c&&"0"!==c&&"false"!==c&&(e._autoLayoutTimer=setInterval(e._onAutoLayoutUpdate.bind(e),2e3));var _=t.rowHighlighting;null!=_&&i.enableRowHighlighting(!!_);var f=t.rowExpansionBinding;"function"==typeof f&&(i.listen("rowExpansionBinding",e._onRowExpansionBinding),e.listen("rowExpansionBinding",f));var g=t.dataComposed;"function"==typeof g&&e.listen("dataComposed",g),t.autoDateConversion&&(e._autoDateConversion=!0),t.stepScroll&&i.setRowScrollingStep(1),t.linearWheelScrolling&&i.getVScrollbar().setMouseWheelSpeed("linear"),null!=t.autoHideScrollbar&&i.autoHideScrollbars(!!t.autoHideScrollbar),e.setColumns(o);var y=t.columnFreezing||t.freezeColumn;null==y&&(y=-1);var m=t.pinnedRightColumns,v=!0;if(null!=t.rowVirtualRendering&&(v=t.rowVirtualRendering),null!=t.rowVirtualization&&(v=t.rowVirtualization),i.enableRowVirtualization(!!v),!m){var C=!1;null!=t.columnVirtualRendering&&(C=t.columnVirtualRendering),null!=t.columnVirtualization&&(C=t.columnVirtualization),i.enableColumnVirtualization(!!C)}null==t.scrollbar||t.scrollbar?(e._topNode.style.overflow="hidden",i.freezeColumn(y,m)):(i.freezeSection(null),e._topNode.style.overflow="");var S=t.topFreezingCount;if("number"==typeof S){var b=(S=S>0?S:0)-1;i.freezeSection(b)}else!1===S&&i.freezeSection(null);var R=t.bottomFreezingCount;if("number"==typeof R&&(R=R>0?R:0,i.freezeFooter(R)),e.addDataFields(t.dataFields),t[Q]=!0,Array.isArray(n)){for(var I=0;I<n.length;++I){var D=n[I],x=null;if(D){var A=D.name;x=A?i.loadPlugin(A,D):i.loadPlugin(D,t)}if(x&&x.setGridWrapper)"function"==typeof x.getGridApi&&x.getGridApi()||x.setGridWrapper("realTimeGrid",e)}e._initializing=!1}var T=t.lang;null!=T&&(e._lang=T,w.setLocale(T));var L=t.rows;L||(L=t.rics||null);var M=t.bodies;if(!M&&(M=[],t.body&&M.push(t.body),L)){for(var E=0;E<L.length;E++)"string"==typeof L[E]&&(L[E]={ric:L[E]});M.push({rows:L})}var F=t.staticDataRows||t.dataModel;if(L&&F){for(var z,k,P=F.data?F.data:F,V=F.fields||e.getColumnFields(),O=L.length,N=0;N<O;N++)L[N].values?(z=Object(u.a)(L[N].values,V),k=Object(u.a)(P[N],V),L[N].values=Object(u.c)(z,k)):L[N].values=P[N];P=P.slice(O,P.length),F.data?F.data=P:F=P}for(var H=0;H<M.length;++H)e.insertRows(M[H].rows);e.addStaticDataRows(F),t.contentBottomPadding&&i.setBottomPaddingSection(t.contentBottomPadding);var G=t.contentRightPadding;G&&("number"!=typeof G&&(G=6),i.reserveRightSpace(G));var B=t.dataConflationRate;null!=B&&i.setDataConflationRate(B);var W=i.getPluginList().map(i.getPlugin.bind(i));e._processExtension(W,"afterInit")}},Ce.prototype.getConfigObject=function(t){var e=t||{},i=e.columns;i||(i=e.columns=[]);var n=this._grid;n.getConfigObject&&n.getConfigObject(e);for(var o=this.getColumnCount(),r=0;r<o;++r){var s=i[r];s||(s=i[r]={}),this.getColumnDefinition(r).getConfigObject(s)}""===this._topNode.style.overflow&&(e.scrollbar=!1);var a=this._dv.getPageSize();return a>0&&(e.pageSize=a),32!==(a=n.getDefaultRowHeight())&&(e.rowHeight=a),32!==(a=n.getSection("title").getDefaultRowHeight())&&(e.headerRowHeight=a),this._autoLayoutTimer&&(e.autoLayoutUpdate=!0),(a=n.getHScrollStartIndex())>0&&(e.columnFreezing=a-1),this._defaultColumnOptions&&(e.defaultColumnOptions=this._defaultColumnOptions),this._autoDateConversion&&(e.autoDateConversion=!0),this._textSelect&&(e.textSelect=!0),this._lang&&(e.lang=this._lang),e},Ce.prototype._defaultColumnSetup=function(t,e){for(var i=e.length,n=0;n<i;n++){var o=e[n];if("object"==typeof o)for(var r in t)null==o[r]&&(o[r]=t[r])}},Ce.prototype._processExtension=function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)t[n][e]&&t[n][e].apply(t[n],i)},Ce.prototype._onRicAdded=function(t){var e=t.addedRics;this._snapshot.addFields(t.fields);for(var i=e.length,n=0;n<i;++n)for(var o=e[n],r=this._connector.getRowDefByRic(o),s=r?r.length:0,a=0;a<s;++a){r[a].getRic()===o&&this._snapshot.addRic(o)}this._dispatch(t.type,t)},Ce.prototype._onRicRemoved=function(t){this._dispatch(t.type,t)},Ce.prototype._onFieldAdded=function(t){var e=t.rowDefs,i=t.addedFields;for(var n in e)this._snapshot.addRic(e[n].getRic());if(this._snapshot.addFields(i),this._subs){var o=this._getAllColumnDefinitions().reduce(at.getRealTimeFields,[]);this._subs.addFields(o)}this._dispatch(t.type,t)},Ce.prototype._onFieldRemoved=function(t){var e=t.removedFields;this._subs&&this._subs.removeFields(e),this._dispatch(t.type,t)},Ce.prototype.insertColumn=function(t,e){"string"==typeof t&&(t={field:t});var i=this.getColumnCount();(null==e||e>i)&&(e=i);var n=this._initializing?{}:Object(u.b)(this._defaultColumnOptions);Ce._objectAssign(n,t),n.formulaEngine=this._fnEngine;var o=new at(n,this);n.COL_DEF=o,this._grid.insertColumn(e,n)},Ce.prototype._onFieldLoadedSuccess=function(t,e,i){if(i&&i.fieldDefinition){var n=i.fieldDefinition;e&&e.getField()===t&&e.isDefaultName()&&n.name&&(e.setName(n.name),this.updateColumnTitle())}},Ce.prototype._onFieldLoadedError=function(t){},Ce.prototype._onFieldLoaded=function(t,e){this._connector.addFields(t,e)},Ce.prototype._shouldLoadFieldInfo=function(t,e){return!(nt.get(t)||"X_RIC_NAME"===t||!e&&!at.isAdcField(t)||!this._RTK&&!window.JET)},Ce.prototype.setColumns=function(t){var e=t?t.length:0;if(this.removeAllColumns(),e>0){var i=!1;e>1&&(i=this._grid.freezeLayout(!0));for(var n=0;n<e;++n)this.insertColumn(t[n],n);e>1&&this._grid.freezeLayout(i)}},Ce.prototype.setFields=Ce.prototype.setColumns,Ce.prototype._onColumnAdded=function(t){var e=t.context.COL_DEF;delete t.context.COL_DEF;var i=t.colIndex,n=this._grid.getColumnData(i);n||(n=this._grid.setColumnData(i,{})),n.COL_DEF=e;var o=e.getUserModel();this._grid.setColumnDataBindingHandler(i,e.getRenderer());var r,s=o.width;void 0!==s?(s=+s,r=null!=o.scalable?!!o.scalable:s!=s,this._grid.setColumnWidth(i,s,r)):this._grid.setColumnWidth(i,1,!0);(s=o.minWidth)>=0&&this._grid.setMinimumColumnWidth(i,s),(s=o.hidden)&&this._grid.hideColumn(i,!0),"string"==typeof(s=o.textAlign||o.alignment)&&this._grid.setColumnAlignment(i,s),o.keepModel||e.clearUserModel(),e.isTextSelect()&&this._grid.enableColumnClass(i,"tr-text-select",!0,"content");var a,l=e.getClasses();for(a=0;a<l.length;a++)this._grid.enableColumnClass(i,l[a]);var u=e.getField();e.isRealTimeField()||this._dc.addStaticFields([u]),this._grid.setDataColumnName(i,Q);var h,p,d,c,_,f=e.getAllFields(),g=e.getId(),y=f.length;for(a=0;a<y;a++)h=f[a],c=at.isRealTimeField(h),this._shouldLoadFieldInfo(h,c)?(p=h===u?e.getDataType():at.getDataType(h),d=nt.loadFieldInfo(h).then(this._onFieldLoadedSuccess.bind(this,h,e)).catch(this._onFieldLoadedError),p?this._connector.addFields(h,g):(_=this._onFieldLoaded.bind(this,h,g),d=d.then(_).catch(_))):this._connector.addFields(h,g)},Ce.prototype.removeColumn=function(t){var e=this.getColumnIndex(t);if(!(e<0)){var i=this.getColumnDefinition(e);i.isRealTimeField()||this._dc.removeStaticFields([i.getField()]),i.dispose(),this._grid.removeColumnAt(e),this._connector.removeFields(i)}},Ce.prototype.removeColumns=function(t){var e=this.getColumnIndices(t),i=e.length;if(i<=1)1===i&&this.removeColumn(e[0]);else{e.sort(Ce._descendingOrder);for(var n=[],o=this._grid.freezeLayout(),r=0;r<i;++r){var s=e[r],a=this.getColumnDefinition(s);a.isRealTimeField()||n.push(a.getField()),a.dispose(),this._grid.removeColumnAt(s),this._connector.removeFields(a)}n.length&&this._dc.removeStaticFields(n),this._grid.freezeLayout(o)}},Ce.prototype.removeAllColumns=function(){var t=this.getColumnCount();if(!(t<=0)){this.clearSort();for(var e=t;--e>=0;){this._grid.setColumnDataBindingHandler(e,null),this.getColumnDefinition(e).dispose()}this._columnTitleConflator.reset(),this._connector.removeAllFields(),this._grid.setColumnCount(0),this._dc.resetStaticFields()}},Ce.prototype.moveColumn=function(t,e){Array.isArray(t)||(t=[t]);var i=this._grid.getColumnCount(),n=i-1;if(t.sort(ge),t=t.filter(ye.bind(null,0,n)),!this._grid.isColumnMoveAllowed(t,e))return!1;var o=this._grid.isLayoutFrozen();this._grid.freezeLayout(!0);var r,s=[],a=0;for(r=0;r<i;r++)r==t[a]?(s.push(!0),a++):s.push(!1);var l=-1,u=-1;for(r=0;r<i;r++)if(!1===s[r]&&l++,l===e){u=r;break}-1===u&&(u=i);var h=[],p=[];for(r=0;r<t.length;r++)t[r]<u?h.push(t[r]):t[r]>u&&p.push(t[r]);for(r=0;r<p.length;r++)this._grid.moveColumn(p[r],u+r);for(r=h.length-1;r>=0;r--)u--,this._grid.moveColumn(h[r],u);return this._grid.freezeLayout(o),!0},Ce.prototype.hideColumn=function(t,e){var i=this.getColumnIndex(t);this._grid.hideColumn(i,e)},Ce.prototype.hideColumns=function(t,e){this._grid.hideColumns(this.getColumnIndices(t),e)},Ce.prototype.showAllColumns=function(){this._grid.showAllColumns()},Ce._descendingOrder=function(t,e){return e-t},Ce.prototype.addDataFields=function(t,e){if(!t)return!1;var i,n,o,r,s,a,l=Array.isArray(t)?t:[t],u=l.length;for(i=0;i<u;i++)n=l[i],s=at.isRealTimeField(n),this._shouldLoadFieldInfo(n,s)?(o=at.getDataType(n),r=nt.loadFieldInfo(n).catch(this._onFieldLoadedError),o?this._connector.addFields(n,e||"grid"):(a=this._onFieldLoaded.bind(this,n),r=r.then(a).catch(a))):this._connector.addFields(n,e||"grid");return!0},Ce.prototype.removeDataFields=function(t,e){return!!t&&(this._connector.removeFields(t,e||"grid"),!0)},Ce.prototype.sortColumn=function(t,e){var i=this.getColumnIndex(t);i<0?this._stp.sortColumn(this.getSortedColumnIndex(),"n"):this._stp.sortColumn(i,e)},Ce.prototype.setColumnName=function(t,e){var i=this.getColumnDefinition(t);i&&(i.setName(e),this.updateColumnTitle())},Ce.prototype.setColumnRenderer=function(t,e){var i=this.getColumnIndex(t);this.setColumnFormatter(i,e)},Ce.prototype.activateColumnRenderer=function(t,e,i){var n=this.getColumnIndex(t);if(null!=n){var o=this.getColumnDefinition(n);o&&(o.activateRenderer(e,i),this._grid.setColumnDataBindingHandler(n,o.getRenderer()),this._grid.requestRowRefresh())}},Ce.prototype.setColumnFormatter=function(t,e){if(null!=t){var i=this.getColumnDefinition(t);if(i){var n=null;if(e&&("object"==typeof e?("function"==typeof e.init&&e.init(i.getConfigObject(),this._grid),n=e.binding):n=e,"function"!=typeof n&&(n=null)),n!==i.getRenderer()){var o=this._grid.getSection("content").getColumn(t);o&&o.clearContent(),this._grid.setColumnDataBindingHandler(t,null),i.setRenderer(n),this._grid.setColumnDataBindingHandler(t,i.getRenderer()),this._grid.requestRowRefresh()}}}},Ce.prototype.setColumnSorter=function(t,e){var i=this.getColumnIndex(t),n=this.getColumnDefinition(i);n&&(n.setSorter(e),this.getSortedColumnIndex()===i&&(this._columnSorter=n.getSorter()))},Ce.prototype._initDuplicateRicData=function(t){var e=t.getRic(),i=this._connector.getRowDefByRic(e);i&&i.length&&function(t,e){var i=_e(t),n=_e(e);for(var o in i)fe[o]||(n[o]=i[o])}(i[0],t)},Ce.prototype.insertRow=function(t,e){t&&("string"==typeof t?t={ric:t}:Array.isArray(t.values)&&(t.fields||(t.fields=this.getColumnFields())));var i=new Z(t);return i.setDataSource(this._dc),this._initDuplicateRicData(i),i.isFixedPosition()&&(this._hasGroup=!0),i.registerToView(this._dv,this._getRowId(e)),this._connector.addRic(i),i},Ce.prototype.insertRows=function(t,e,i){if(Array.isArray(t)){for(var n=this._dt.freeze(),o=i||this.getColumnFields(),r=this._getRowId(e),s=t.length,a=0;a<s;++a){var l=t[a];l&&("string"==typeof l&&(l={ric:l}),l.fields=o),this.insertRow(l,r)}this._updateGroupOrder(),this._dt.freeze(n)}},Ce.prototype.addStaticDataRows=function(t,e){if(!Array.isArray(t)){var i=t;t=null,i&&(i.fields&&!e&&(e=i.fields),Array.isArray(i.data)&&(t=i.data))}t&&this.insertRows(t.map(Ce._dataToRowOptions),null,e)},Ce.prototype.updateDataSet=function(t,e){if(Array.isArray(t)&&0!==t.length){var i,n,o={},r=t.length;for(n=0;n<r;n++)o[(i=t[n])[e]]=i;t.forEach(me.bind(null,"ROW_ORDER"));var s,a,l={},u=this.getRowDefinitions(),h=u.length;for(n=0;n<h;n++)(s=u[n])&&((a=s.getRowData()[e])||0===a?l[a]=s:this.removeRow(s));for(var p in l)l[p]&&!o[p]&&this.removeRow(l[p]);for(n=0;n<r;n++)(s=l[a=(i=t[n])[e]])?s.setRowData(i):this.insertRow({values:o[a]});this._dt.sortOnce("ROW_DEF","a",ve,"ROW_ORDER")}else this.removeAllRows()},Ce._dataToRowOptions=function(t){return{values:t}},Ce.prototype.removeRow=function(t){var e=this._getRowDefinition(t);return e&&(e.isAutoGenerated()||this._removeRow(e)),e},Ce.prototype.removeRows=function(t){var e,i;if(!Array.isArray(t))return(e=this.removeRow(t))?[e]:[];var n=[],o=t.length;for(i=0;i<o;++i)(e=this._getRowDefinition(t[i]))&&(e.isAutoGenerated()||n.push(e));var r=!1;for((o=n.length)>1&&(r=this._dt.freeze()),i=0;i<o;++i)this._removeRow(n[i]);return o>1&&this._dt.freeze(r),n},Ce.prototype.removeAllRows=function(){if(this._dt.getRowCount()){var t=this._getAllRowDefinitions();this._dc.clearAllData(),this._dt.clearAllData(),this._clearDataUpdates(),t.forEach(Z.dispose),this._streamingConflator.reset(),this._formulaConflator.reset(),this._chainConflator.reset(),this._connector.removeAllRics(),this._grid.getVScrollbar().setScrollTop(0),this._grid.getHScrollbar().setScrollLeft(0)}},Ce.prototype._removeRow=function(t){this._dispatch("beforeRowRemoved",{});var e=t.getAllDescendantIds();e&&this._dt.removeRows(e),this._connector.removeRic(t),this._dt.removeRow(t.getRowId()),t.dispose()},Ce.prototype.hideRow=function(t,e){this._grid.hideRow(this._getRowId(t),e)},Ce.prototype.hideRows=function(t,e){Array.isArray(t)||(t=[t]);var i=t.map(this._getRowId);this._grid.hideRows(i,e)},Ce.prototype.showRows=function(t,e){this.hideRows(t,!1===e)},Ce.prototype.unhideAllRows=function(){this._grid.unhideAllRows()},Ce.prototype.hasHiddenRow=function(){return this._grid.hasHiddenRow()},Ce.prototype.setRic=function(t,e){var i=this._getRowDefinition(t);if(i){var n=i.getRic();i.setContent(e)&&(this._connector.removeRic(i,n),this._initDuplicateRicData(i),this._connector.addRic(i))}},Ce.prototype.setRowContent=Ce.prototype.setRic,Ce.prototype.toggleRowExpansion=function(t,e){this._dv.toggleRowExpansion(t,e)},Ce.prototype._onRowExpansionBinding=function(t){if(this.hasListener("rowExpansionBinding")){if(t.originalRowId){var e=this._dv.getRowIndex(t.originalRowId);t.originalRowDef=this._getRowDefinitionByIndex(e),t.originalRowData=t.originalRowDef.getRowData()}else t.rowDef=this._getRowDefinitionByIndex(t.rowIndex),t.rowData=t.rowDef.getRowData();this._dispatch("rowExpansionBinding",t)}},Ce.prototype.setRics=function(t){this.removeAllRows(),t&&t.length&&this.insertRows(t)},Ce.prototype.getRowCount=function(){return this._dv.getRowCount()},Ce.prototype.getPageItemCount=function(){return this._dv.getRowCount(!1,!0)},Ce.prototype.getDataRowCount=function(){return this._dt.getRowCount()},Ce.prototype.getColumnCount=function(){return this._grid.getColumnCount()},Ce.prototype.getColumnDataType=function(t){var e=this.getColumnDefinition(t);return e?e.getDataType():""},Ce.prototype.getColumnDefinition=function(t){var e=this._grid.getColumnData(t);return e&&e.COL_DEF||null},Ce.prototype._getColumnDefinition=function(t){if(t instanceof at)return t;if("number"==typeof t)return this.getColumnDefinition(t);if("string"==typeof t)for(var e=this.getColumnCount(),i=0;i<e;++i){var n=this.getColumnDefinition(i);if(n.getField()===t)return n}return null},Ce.prototype._getAllColumnDefinitions=function(){for(var t=this.getColumnCount(),e=new Array(t),i=0;i<t;i++)e[i]=this.getColumnDefinition(i);return e},Ce.prototype.getRowDefinition=function(t){return"number"==typeof t?this._getRowDefinitionByIndex(t):"string"==typeof t?this._getRowDefinitionById(t):null},Ce.prototype._getRowDefinitionByIndex=function(t){return this._dv.getDataAt(t,Q)||null},Ce.prototype._getRowDefinitionById=function(t){return this._dt.getData(t,Q)||null},Ce.prototype._getRowDefinition=function(t){return t instanceof Z&&t.getRowId()?t:this.getRowDefinition(t)},Ce.prototype.getRowDefinitions=function(){return this._dv.getColumnData(Q,!0)},Ce.prototype._getAllRowDefinitions=function(){return this._dt.getColumnData(Q)},Ce.prototype.getRowData=function(t){return _e(this._getRowDefinitionByIndex(t))},Ce.prototype.getMultipleRowData=function(t){if("number"==typeof t)return[this.getRowData(t)];var e=null;if(Array.isArray(t)){var i=t,n=i.length,o=new Array(n);e=this.getRowDefinitions();for(var r=0;r<n;++r){var s=i[r];"number"==typeof s?o[r]=_e(e[s]):s&&s.getRowData&&(o[r]=_e(s))}return o}return(e=t&&t.getColumnData?t.getColumnData(Q,!1):this.getRowDefinitions()).map(_e)},Ce.prototype.setRicData=function(t,e){for(var i=this._connector.getRowDefByRic(t),n=i?i.length:0,o=0;o<n;++o){var r=i[o];r&&r.getRic()===t&&r.setRowData(e)}},Ce.prototype.setRowData=function(t,e){var i=this._getRowDefinition(t);i&&i.setRowData(e)},Ce.prototype._getRowId=function(t){return"string"==typeof t?t:"number"==typeof t?this._dv.getRowId(t):t instanceof Z?t.getRowId():""},Ce.prototype.getColumnIndex=function(t){if("number"==typeof t)return t;var e,i=this.getColumnCount();if(t instanceof at){for(e=0;e<i;++e)if(this.getColumnDefinition(e)===t)return e}else if("string"==typeof t)for(e=0;e<i;++e)if(this.getColumnDefinition(e).getField()===t)return e;return-1},Ce.prototype.getColumnIndices=function(t){for(var e=[],i=this.getColumnCount(),n=Array.isArray(t)?t:[t],o=n.length,r=0;r<o;++r){var s=this.getColumnIndex(n[r]);s>=0&&s<i&&e.push(s)}return e},Ce.prototype.getColumnId=function(t){var e=this.getColumnDefinition(t);return e?e.getId():""},Ce.prototype.getColumnField=function(t){var e=this.getColumnDefinition(t);return e?e.getField():""},Ce.prototype.getColumnFields=function(){for(var t=this.getColumnCount(),e=new Array(t),i=0;i<t;++i)e[i]=this.getColumnField(i);return e},Ce.prototype.getAllFields=function(){return this._connector.getAllFields()},Ce.prototype.freezeColumn=function(t,e){this._grid.freezeColumn(t,e)},Ce.prototype._onColumnHeaderBinding=function(t){if(!("title"!==t.sectionType||t.sectionIndex>0))for(var e=t.fromColIndex,i=t.toColIndex;e<i;)this._renderColumnHeader(e++,t)},Ce.prototype._renderColumnHeader=function(t,e){var i=this.getColumnDefinition(t);if(i){var n=i.getHeaderRenderer(),o=e.section,r=o.getRowCount();e.colIndex=t,e.columnDef=i;for(var s=i.getName(),a=i.getTooltip(),l=i.getHeaderAlignment(),u=0;u<r;++u){var h=o.getCell(t,u,!1);h.setContent(s),h.setTooltip(a),h.setStyle("textAlign",l),n&&(e.rowIndex=u,e.cell=h,n(e))}}},Ce.prototype.updateColumnTitle=function(){if(!this._columnTitleConflator.conflate()){var t=this._grid.getSectionSettings("title");t&&t.rerender()}},Ce.prototype.isSorting=function(){return this.getSortedColumnIndex()>=0},Ce.prototype.getSortedColumnIndex=function(){return this._stp.getSortedColumnIndex()},Ce.prototype.getSortOrder=function(){return this._stp.getSortOrder()},Ce.prototype.clearSort=function(){this._stp.clearSortState()},Ce.prototype._onDataChanged=function(t){var e=t.rowData;if(e){var i=e[Q];if(i){i.getRowId()&&(this._dc.getRowData(t.rid)?(i.addUpdate(t)&&(this._dt._hasNewUpdates=!0),this._updateStreamingData()):i.isAutoGenerated()&&(i.setParent(null),this._removeRow(i)))}else{var n=e.SUB_ID;if(n){var o=this._getRowDefinition(n);o&&o.getRic()!==e.RIC&&(this._chainMembers||(this._chainMembers={}),this._chainMembers[t.rid]||(this._chainMembers[t.rid]=e,this._addMemberOfChain(e)))}}}},Ce.prototype._addMemberOfChain=function(t){if(!this._chainConflator.conflate(t)){var e,i=this._chainConflator.popAllData(),n=i?i.length:0,o=!1;n>1&&(o=this._dt.freeze());var r=[];for(e=0;e<n;++e){var s=(t=i[e]).SUB_ID,a=this._getRowDefinition(s);if(a){var l=a.addConstituent(t.RIC,this._dt);l&&r.push(l)}}this._chainMembers=null;var u=r.length;if(u)for(e=u;--e>=0;)this._connector.addRic(r[e]);n>1&&this._dt.freeze(o)}},Ce.prototype._updateStreamingData=function(){this._streamingConflator.conflate()||this._dt&&this._dt.dispatchGlobalChange()},Ce.prototype._updateGroupOrder=function(){if(this._hasGroup){for(var t=this._dt.getRowCount(),e=0,i=0,n=null,o=!1,r=0;r<t;++r){var s=this._dt.getDataAt(r,Q),a=s.getParent(),l=s.isFixedPosition();(l||l!==o||a!==n)&&++e,n=a,o=l,i|=s.setGroupOrder(e)}i&&this.isSorting()&&this._stp.refresh()}},Ce.prototype._onPreDataSorting=function(t){var e=this._stp.getSortedColumnIndex(),i=e>=0?this.getColumnDefinition(e):null;this._columnSorter=i?i._prepareSortContext(e):null},Ce.prototype._mainSorter=function(t,e,i){return this._columnSorter(t,e,i)},Ce.prototype._onPostSectionDataBinding=function(t){t.actualUpdate&&this._asyncClearDataUpdates()},Ce.prototype._asyncClearDataUpdates=function(){setTimeout(this._clearDataUpdates,0)},Ce.prototype._clearDataUpdates=function(){if(this._dt&&this._dt._hasNewUpdates)for(var t=this._dt.getAllRowIds(!0),e=t.length;--e>=0;){this._dt.getRowData(t[e])[Q].resetUpdates()}},Ce.prototype.getDataView=function(){return this._dv},Ce.prototype.setPage=function(t){return this._dv.setPage(t)},Ce.prototype.setPageSize=function(t){this._dv.setPageSize(t)},Ce.prototype.getPageIndex=function(){return this._dv.getPageIndex()},Ce.prototype.getPageSize=function(){return this._dv.getPageSize()},Ce.prototype.getPageCount=function(){return this._dv.getPageCount()},Ce.prototype.toggleChain=function(t){var e=this._getRowDefinition(t);e&&e.toggleChain()},Ce.prototype.focus=function(){this._grid.focus()},Ce.prototype.requestRowRefresh=function(){this._grid.requestRowRefresh()},Ce.prototype._onFormulaDataChanged=function(t){this._formulaConflator.conflate()||(this._recalculateFormulas(),this._updateRowData())},Ce.prototype._onFormulaDataRequired=function(t){},Ce.prototype._onDataComposed=function(t){var e=t.changes;if(e){var i=t.rowData;if(i){var n=i[Q];if(n){var o,r,s;if(this._autoDateConversion)for(o in e)"datetime"===((s=this._getColumnDefinition(o))?s.getDataType():at.getDataType(o))&&(r=e[o],n.setData(o+"_RAW",r),r=w.toDateObject(r),n.setData(o,r));this.hasListener("dataComposed")&&(t.grid=this,t.rowDef=n,this._dispatch("dataComposed",t))}}}},Ce.prototype._recalculateFormulas=function(t){if(!(this._fnEngine.getFormulaCount()<=0))if(t&&t.rid)this._fnEngine.calculate(t.rowData,t.changes);else for(var e=this._dc.getAllRowData(),i=e.length,n=0;n<i;++n)this._fnEngine.calculate(e[n])},Ce.prototype._snapshotFillerDataChanged=function(t){if(this._dt){var e=t.data;for(var i in e)this.setRicData(i,e[i])}},Ce.prototype._onAutoLayoutUpdate=function(){var t=this._topNode.clientWidth;t!==this._clientWidth&&(this._clientWidth=t,this.updateLayout())},Ce.prototype.logDT=function(t){var e=this._getAllRowDefinitions();this._logData(e,t)},Ce.prototype.logDV=function(t){var e=this.getRowDefinitions();this._logData(e,t)},Ce.prototype._logData=function(t,e){e||(e={}),e.colNames||(e.colNames=this.getColumnFields());var i=W.constructTable(t.map(_e),e);console.table(i)},Ce._objectAssign=function(t,e){for(var i in e)t[i]=e[i]};var Se={texts:["If a dog and cat had a baby together that grew up and worked a desk job he'd be a Cog in the machine","I'm still upset that Tie Domi didn't name his child Tyson","A tagline for a car company that prides itself on its morals and ethics: Take the High Road","Logan Broger is amazing and a wonderful boy according to Logan's mom","You know the Grammys are a joke when Future doesn't win Best Everything","If you were a member of the Bloods and became paralyzed do you then become a member of the Crips?","Curling is the best sport named after something you do to your hair","You say potatoe, I say starchy carbs","If you work for an ad agency and getting paid for it aren't you the one who is being influenced by advertising?","Are there Out of Stock photos? Gafuffle","I think of a lot of good ideas when going to the bathroom I guess I have a real stream of consciousness","Most streets are two way streets","Why does that make love so special?","A tagline for an airline: Take the High Road","Rumour has it targeted online advertising was developed because the internet was upset that you could read it but it couldn't read you","This is a true fact: I never had a fear of heights until I fell off a roof","A tagline for a special highway that is easy to navigate while under the influence of drugs: Take the High Road","I'm the only person in the world with my name","We need more werkin and less twerkin if you ask me","If Fantasy Hockey actually lived up to its name, every team would have Henrik Lundqvist and Joffrey Lupul on it","I'm in a band that does Metallica covers with our private parts it's called Myphallica","Smiling could easily be misinterpreted for showing your teeth to someone because they said something that made you happy","We say we are walking the dog, but the dog always leads","Tim Horton was a hockey player but is the name of a coffee chain, which means my dream of a goat sanctuary being my legacy is not unrealistic","I started a sensory deprivation chamber business it involves really dark curtains, ear plugs, and a sleeping mask","Do we make money or does money make us? Chezwich","Pantone is a colour but also the singular version of pants","Logan Ipsum will loop at some point","Thank you for using my words in your work","You should listen to my mixtape (check out the rest of my portfolio)","I have never known a Jack that was in good enough shape to name bodybuilding after him","Twitter is the rice of social media","Injuries always keep you OUT of things","For the name of an act as serious as killing someone, assassination literally translates to buttbuttination","Why don't we call glasses duocles","If you wake up with a giant zit, you are really facing your fears when you look in the mirror","Cemeteries are just garbage dumps filled with humans","I have a moral code, but I haven't figured out how to read it yet","I bet most serial killers play the drums","To Catch A Predator would have been a great name for a Steve Irwin show","If the word kerning is kerned poorly, it kind of looks like learning which is appropriate because both are important","North America should be called Russia since people are always moving so fast","I don't need a big house, just a two floor condo you could say I have lofty expectations","Even faithful and simple Sancho is forced to deceive him at certain points","The novel is considered a satire of orthodoxy, veracity and even nationalism","In exploring the individualism of his characters, Cervantes helped move beyond the narrow literary conventions of the chivalric romance literature that he spoofed","which consists of straightforward retelling of a series of acts that redound to the knightly virtues of the hero","The character of Don Quixote became so well known in its time that the word quixotic was quickly adopted by many languages","Characters such as Sancho Panza and Don Quixote's steed, Rocinante, are emblems of Western literary culture","It stands in a unique position between medieval chivalric romance and the modern novel","The former consist of disconnected stories featuring the same characters and settings with little exploration of the inner life of even the main character"]};Se.words=Se.texts.join(" ").split(" ").filter((function(t){return t.length>1})),Se.companyName=["Yost-Prohaska","Wehner, Howe and Brown","Gusikowski-Legros","Wolff-Windler","McGlynn, Douglas and Kilback","MacGyver Group","Spinka, Stracke and Huel","Howell, Wolff and Emmerich","Blick-O'Reilly","Dibbert, Buckridge and Leffler","Skiles, Kuhlman and Johns","Daugherty Group","Reilly, Toy and Bayer","Bradtke, Mohr and Weber","Thompson, Bruen and Friesen","Rempel-Bednar","Kunze LLC","Pfannerstill Group","Moen-Larkin","Larson LLC","Haag-Feest","Hauck-Bartell","Rohan-Kohler","Waters, Homenick and Pagac","Ziemann Group","Reynolds, Turcotte and Bosco","Graham, Morar and Waters","Cassin Inc","Bosco-Terry","Stanton-Blick","Prohaska and Sons","Pouros, Daugherty and Pfannerstill","Bogan-Cormier","O'Kon-Mills","Mueller-Schmeler","Runte-Trantow","Muller Inc","Shanahan, Ryan and Orn","Huel LLC","Shanahan-Zulauf","Emard-Schuster","Muller Inc","Collier, Muller and Yundt","Wehner, Prohaska and Harber","Ondricka-Stehr","Towne LLC","Feil Inc","Braun, Kihn and Treutel","Ebert-MacGyver","Harris LLC"],Se.industry=["Specialty Chemicals","Office Equipment/Supplies/Services","Electric Utilities: Central","Trucking Freight/Courier Services","Auto Parts:O.E.M.","Oil Refining/Marketing","Biotechnology: Biological Products (No Diagnostic Substances)","Computer Software: Programming, Data Processing","Farming/Seeds/Milling","Biotechnology: Laboratory Analytical Instruments","Finance: Consumer Services","Major Banks","Investment Managers","Oilfield Services/Equipment","Paper","Transportation Services"],Se.market=["NYSE","NASDAQ","SET","DJI","HSCEI","HKEX","NIKKEI"],Se.country=[{name:"Afghanistan",code:"AF"},{name:"land Islands",code:"AX"},{name:"Albania",code:"AL"},{name:"Algeria",code:"DZ"},{name:"American Samoa",code:"AS"},{name:"AndorrA",code:"AD"},{name:"Angola",code:"AO"},{name:"Anguilla",code:"AI"},{name:"Antarctica",code:"AQ"},{name:"Antigua and Barbuda",code:"AG"},{name:"Argentina",code:"AR"},{name:"Armenia",code:"AM"},{name:"Aruba",code:"AW"},{name:"Australia",code:"AU"},{name:"Austria",code:"AT"},{name:"Azerbaijan",code:"AZ"},{name:"Bahamas",code:"BS"},{name:"Bahrain",code:"BH"},{name:"Bangladesh",code:"BD"},{name:"Barbados",code:"BB"},{name:"Belarus",code:"BY"},{name:"Belgium",code:"BE"},{name:"Belize",code:"BZ"},{name:"Benin",code:"BJ"},{name:"Bermuda",code:"BM"},{name:"Bhutan",code:"BT"},{name:"Bolivia",code:"BO"},{name:"Bosnia and Herzegovina",code:"BA"},{name:"Botswana",code:"BW"},{name:"Bouvet Island",code:"BV"},{name:"Brazil",code:"BR"},{name:"British Indian Ocean Territory",code:"IO"},{name:"Brunei Darussalam",code:"BN"},{name:"Bulgaria",code:"BG"},{name:"Burkina Faso",code:"BF"},{name:"Burundi",code:"BI"},{name:"Cambodia",code:"KH"},{name:"Cameroon",code:"CM"},{name:"Canada",code:"CA"},{name:"Cape Verde",code:"CV"},{name:"Cayman Islands",code:"KY"},{name:"Central African Republic",code:"CF"},{name:"Chad",code:"TD"},{name:"Chile",code:"CL"},{name:"China",code:"CN"},{name:"Christmas Island",code:"CX"},{name:"Cocos (Keeling) Islands",code:"CC"},{name:"Colombia",code:"CO"},{name:"Comoros",code:"KM"},{name:"Congo",code:"CG"},{name:"Congo, The Democratic Republic of the",code:"CD"},{name:"Cook Islands",code:"CK"},{name:"Costa Rica",code:"CR"},{name:"Cote D'Ivoire",code:"CI"},{name:"Croatia",code:"HR"},{name:"Cuba",code:"CU"},{name:"Cyprus",code:"CY"},{name:"Czech Republic",code:"CZ"},{name:"Denmark",code:"DK"},{name:"Djibouti",code:"DJ"},{name:"Dominica",code:"DM"},{name:"Dominican Republic",code:"DO"},{name:"Ecuador",code:"EC"},{name:"Egypt",code:"EG"},{name:"El Salvador",code:"SV"},{name:"Equatorial Guinea",code:"GQ"},{name:"Eritrea",code:"ER"},{name:"Estonia",code:"EE"},{name:"Ethiopia",code:"ET"},{name:"Falkland Islands (Malvinas)",code:"FK"},{name:"Faroe Islands",code:"FO"},{name:"Fiji",code:"FJ"},{name:"Finland",code:"FI"},{name:"France",code:"FR"},{name:"French Guiana",code:"GF"},{name:"French Polynesia",code:"PF"},{name:"French Southern Territories",code:"TF"},{name:"Gabon",code:"GA"},{name:"Gambia",code:"GM"},{name:"Georgia",code:"GE"},{name:"Germany",code:"DE"},{name:"Ghana",code:"GH"},{name:"Gibraltar",code:"GI"},{name:"Greece",code:"GR"},{name:"Greenland",code:"GL"},{name:"Grenada",code:"GD"},{name:"Guadeloupe",code:"GP"},{name:"Guam",code:"GU"},{name:"Guatemala",code:"GT"},{name:"Guernsey",code:"GG"},{name:"Guinea",code:"GN"},{name:"Guinea-Bissau",code:"GW"},{name:"Guyana",code:"GY"},{name:"Haiti",code:"HT"},{name:"Heard Island and Mcdonald Islands",code:"HM"},{name:"Holy See (Vatican City State)",code:"VA"},{name:"Honduras",code:"HN"},{name:"Hong Kong",code:"HK"},{name:"Hungary",code:"HU"},{name:"Iceland",code:"IS"},{name:"India",code:"IN"},{name:"Indonesia",code:"ID"},{name:"Iran, Islamic Republic Of",code:"IR"},{name:"Iraq",code:"IQ"},{name:"Ireland",code:"IE"},{name:"Isle of Man",code:"IM"},{name:"Israel",code:"IL"},{name:"Italy",code:"IT"},{name:"Jamaica",code:"JM"},{name:"Japan",code:"JP"},{name:"Jersey",code:"JE"},{name:"Jordan",code:"JO"},{name:"Kazakhstan",code:"KZ"},{name:"Kenya",code:"KE"},{name:"Kiribati",code:"KI"},{name:"Korea, Democratic People'S Republic of",code:"KP"},{name:"Korea, Republic of",code:"KR"},{name:"Kuwait",code:"KW"},{name:"Kyrgyzstan",code:"KG"},{name:"Lao People'S Democratic Republic",code:"LA"},{name:"Latvia",code:"LV"},{name:"Lebanon",code:"LB"},{name:"Lesotho",code:"LS"},{name:"Liberia",code:"LR"},{name:"Libyan Arab Jamahiriya",code:"LY"},{name:"Liechtenstein",code:"LI"},{name:"Lithuania",code:"LT"},{name:"Luxembourg",code:"LU"},{name:"Macao",code:"MO"},{name:"Macedonia, The Former Yugoslav Republic of",code:"MK"},{name:"Madagascar",code:"MG"},{name:"Malawi",code:"MW"},{name:"Malaysia",code:"MY"},{name:"Maldives",code:"MV"},{name:"Mali",code:"ML"},{name:"Malta",code:"MT"},{name:"Marshall Islands",code:"MH"},{name:"Martinique",code:"MQ"},{name:"Mauritania",code:"MR"},{name:"Mauritius",code:"MU"},{name:"Mayotte",code:"YT"},{name:"Mexico",code:"MX"},{name:"Micronesia, Federated States of",code:"FM"},{name:"Moldova, Republic of",code:"MD"},{name:"Monaco",code:"MC"},{name:"Mongolia",code:"MN"},{name:"Montenegro",code:"ME"},{name:"Montserrat",code:"MS"},{name:"Morocco",code:"MA"},{name:"Mozambique",code:"MZ"},{name:"Myanmar",code:"MM"},{name:"Namibia",code:"NA"},{name:"Nauru",code:"NR"},{name:"Nepal",code:"NP"},{name:"Netherlands",code:"NL"},{name:"Netherlands Antilles",code:"AN"},{name:"New Caledonia",code:"NC"},{name:"New Zealand",code:"NZ"},{name:"Nicaragua",code:"NI"},{name:"Niger",code:"NE"},{name:"Nigeria",code:"NG"},{name:"Niue",code:"NU"},{name:"Norfolk Island",code:"NF"},{name:"Northern Mariana Islands",code:"MP"},{name:"Norway",code:"NO"},{name:"Oman",code:"OM"},{name:"Pakistan",code:"PK"},{name:"Palau",code:"PW"},{name:"Palestinian Territory, Occupied",code:"PS"},{name:"Panama",code:"PA"},{name:"Papua New Guinea",code:"PG"},{name:"Paraguay",code:"PY"},{name:"Peru",code:"PE"},{name:"Philippines",code:"PH"},{name:"Pitcairn",code:"PN"},{name:"Poland",code:"PL"},{name:"Portugal",code:"PT"},{name:"Puerto Rico",code:"PR"},{name:"Qatar",code:"QA"},{name:"Reunion",code:"RE"},{name:"Romania",code:"RO"},{name:"Russian Federation",code:"RU"},{name:"RWANDA",code:"RW"},{name:"Saint Helena",code:"SH"},{name:"Saint Kitts and Nevis",code:"KN"},{name:"Saint Lucia",code:"LC"},{name:"Saint Pierre and Miquelon",code:"PM"},{name:"Saint Vincent and the Grenadines",code:"VC"},{name:"Samoa",code:"WS"},{name:"San Marino",code:"SM"},{name:"Sao Tome and Principe",code:"ST"},{name:"Saudi Arabia",code:"SA"},{name:"Senegal",code:"SN"},{name:"Serbia",code:"RS"},{name:"Seychelles",code:"SC"},{name:"Sierra Leone",code:"SL"},{name:"Singapore",code:"SG"},{name:"Slovakia",code:"SK"},{name:"Slovenia",code:"SI"},{name:"Solomon Islands",code:"SB"},{name:"Somalia",code:"SO"},{name:"South Africa",code:"ZA"},{name:"South Georgia and the South Sandwich Islands",code:"GS"},{name:"Spain",code:"ES"},{name:"Sri Lanka",code:"LK"},{name:"Sudan",code:"SD"},{name:"Suriname",code:"SR"},{name:"Svalbard and Jan Mayen",code:"SJ"},{name:"Swaziland",code:"SZ"},{name:"Sweden",code:"SE"},{name:"Switzerland",code:"CH"},{name:"Syrian Arab Republic",code:"SY"},{name:"Taiwan, Province of China",code:"TW"},{name:"Tajikistan",code:"TJ"},{name:"Tanzania, United Republic of",code:"TZ"},{name:"Thailand",code:"TH"},{name:"Timor-Leste",code:"TL"},{name:"Togo",code:"TG"},{name:"Tokelau",code:"TK"},{name:"Tonga",code:"TO"},{name:"Trinidad and Tobago",code:"TT"},{name:"Tunisia",code:"TN"},{name:"Turkey",code:"TR"},{name:"Turkmenistan",code:"TM"},{name:"Turks and Caicos Islands",code:"TC"},{name:"Tuvalu",code:"TV"},{name:"Uganda",code:"UG"},{name:"Ukraine",code:"UA"},{name:"United Arab Emirates",code:"AE"},{name:"United Kingdom",code:"GB"},{name:"United States",code:"US"},{name:"United States Minor Outlying Islands",code:"UM"},{name:"Uruguay",code:"UY"},{name:"Uzbekistan",code:"UZ"},{name:"Vanuatu",code:"VU"},{name:"Venezuela",code:"VE"},{name:"Viet Nam",code:"VN"},{name:"Virgin Islands, British",code:"VG"},{name:"Virgin Islands, U.S.",code:"VI"},{name:"Wallis and Futuna",code:"WF"},{name:"Western Sahara",code:"EH"},{name:"Yemen",code:"YE"},{name:"Zambia",code:"ZM"},{name:"Zimbabwe",code:"ZW"}];var we=Se,be=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10],Re={X_RIC_NAME:{type:"string"},CF_NAME:{type:"string",prefix:!0,suffix:" Name"},CF_LAST:{type:"number",min:.01,max:1e3,prec:2},PCTCHNG:{type:"number",min:-1,max:1,prec:2,suffix:"%"},PCTCHNG2:{type:"float",min:-20,max:20,prec:2,suffix:"%"},CF_CURR:{fixedValue:"USD"},INDICATOR:{type:"number",min:0,max:5},CF_TICK:{type:"number",min:1,max:3,changeOnly:!0},PRCTCK_1:{type:"set",members:["⇧","B⇧","↑","B↑","26","1",'"1"',"-1","⇩","B⇩","↓","B↓","27","2",'"2"']},CF_NETCHNG:{type:"number",min:-100,max:100},CF_VOLUME:{type:"number",min:0,max:1e7},RI_FLAG:{type:"set",members:["R","Q","I","_",""]},RI_CODE:{type:"number",min:0,max:2},STATUS:{type:"number",min:0,max:6},YRLOW:{type:"number",min:0,max:20},YRHIGH:{type:"number",min:200,max:2e3},CFLOW:{type:"number",min:0,max:20},CFHIGH:{type:"number",min:200,max:2e3},LOW_YLD:{type:"set",members:[void 0,0,1,2,3,4,5,10,11,15,20]},HIGH_YLD:{type:"set",members:[void 0,200,300,400,500,1e3,1500,2e3]},CF_YIELD:{type:"set",members:[void 0,0,10,20,30,40,50,100,200,300,400,500]},"TR.IPODate":{type:"isoDate",min:Date.now()-63072e6,max:Date.now()},"TR.Volume":{type:"number",min:2e3,max:1e7},"TR.Price52WeekHigh":{type:"number",min:100,max:300,prec:2},"TR.Price52WeekLow":{type:"number",min:1,max:200,prec:2},"TR.InvalidField":{type:"set",members:[void 0]},percent:{type:"number",min:0,max:101},number_1:{type:"number",min:1,max:100},number_2:{type:"number",min:-100,max:100},index4:{type:"number",min:0,max:4},index5:{type:"number",min:0,max:5},index10:{type:"number",min:0,max:10},index100:{type:"number",min:0,max:100},group3:{type:"set",members:["Group_A","Group_B","Group_C"]},group4:{type:"set",members:["Group_1","Group_2","Group_3","Group_4"]},float_1:{type:"float",min:0,max:1,prec:2},float_2:{type:"float",min:0,max:100,prec:2},float_3:{type:"float",min:-1,max:1,prec:2},precision4:{type:"float",min:-10,max:10,prec:4},precision8:{type:"float",min:-100,max:100,prec:8},boolean:{type:"boolean"},date:{type:"date",min:15e11,max:16e11},date1:{type:"function",generate:function(t,e){return null==e?Fe(6e11,16e11,e):new Date(1e12+1e9*e)}},ISODate:{type:"isoDateObject",min:Date.now()-63072e6,max:Date.now()},word:{type:"string",min:1,max:1},phrase:{type:"string",min:2,max:5},words:{type:"string",min:1,max:20},words1:{type:"string",min:2,max:8},words2:{type:"string",min:3,max:10},words3:{type:"string",min:5,max:15},sentence:{type:"string",min:8,max:20},id:{type:"function",generate:function(t,e){return null==e&&(e=null!=t._id?t._id:-1,t._id=++e),e||0}},companyName:{type:"set",members:we.companyName},industry:{type:"set",members:we.industry},market:{type:"set",members:we.market},country:{type:"set",members:we.country}},Ie=function(t,e){var i=e;"function"==typeof e&&(i={type:"function",generate:e}),Re[t]=i},De=function(t){return"number"==typeof t?function(t){var e=1e4*Math.sin(113*t);return(e*=e)-(0|e)}(t):Math.random()},xe=function(t,e,i,n){t||(t=0),null==e&&(e=100);var o=(e-t)*De(n)+t;if(i>0){var r=be[i];return Math.floor(o*r)/r}return null!=i?Math.floor(o):o},Ae=function(t,e,i){return xe(t,e+1,0,i)},Te=function(t,e,i){return xe(t,e,0,i)},Le=function(t,e){return Te(0,t,e)},Me=function(t){return 0===Ae(0,1,t)},Ee=function(t,e){return t?t[Le(t.length,e)]:String.fromCharCode(Ae(65,90,e))},Fe=function(t,e,i){(t=t||Date.now()-63072e6)instanceof Date&&(t=t.getTime()),(e=e||Date.now())instanceof Date&&(e=e.getTime());var n=Ae(0,(e-t)/1e3,i);return new Date(t+1e3*n)},ze=function(t,e,i){for(var n=t<e?Te(t,e,i):t,o=new Array(n),r=0;r<n;++r){null!=i&&(i*=1.17*(r+1));var s=Le(we.words.length,i);o[r]=we.words[s]}return o.join(" ")},ke=function(t,e,i){var n=Oe(t,e,i),o=n.value+"";return n.prefix&&("string"==typeof n.prefix?o=n.prefix+o:e.prefix&&(o=e.prefix+" "+o)),n.suffix&&(o+=n.suffix),"string"===n.type&&(n.value=o),n.formattedValue=o,n},Pe=function(t,e,i){var n={},o=0;e&&("number"==typeof e?o=n.numRows=e:(n=e,o=e.numRows||e.numRow||e.rowCount,null!=e.seed&&-1===(i=e.seed)&&(i=null))),o||(o=1),t?Array.isArray(t)||(t=[t+""]):t=[""];for(var r=t.length,s=[],a=0;a<o;++a){for(var l=[],u=0;u<r;++u){var h=t[u];l.push(Oe(h,e,i).value)}null!=i&&++i,s.push(l)}return{data:s,seed:i,fields:t}},Ve=function(t){for(var e=0,i=t.length;--i>=0;)e+=t.charCodeAt(i)*(i+.9);return e},Oe=function(t,e,i){var n,o=function(t){return Re[t]||{}}(t),r=null!=o.min?o.min:100,s=null!=o.max?o.max:1e4,a=null!=o.prec?o.prec:0;if(o.fixedValue)n=o.fixedValue;else if(o.type)if("string"===o.type)null!=o.min||null!=o.max?(null!=i&&(o.hash||(o.hash=Ve(t)),i+=o.hash),n=ze(r,s,i)):n=e.text||"";else if("set"===o.type)n=Ee(o.members,i);else if("date"===o.type)n=Fe(r,s,i);else if("isoDate"===o.type){n=Fe(r,s,i).toISOString().slice(0,10)}else"isoDateObject"===o.type?(n=Fe(r,s,i),n=new Date(n.toISOString().slice(0,10))):"boolean"===o.type?n=Me(i):"function"===o.type?(o.field=t,n=o.generate(o,i)):n=xe(r,s,a,i);else null!=i&&t&&(o.hash||(o.hash=Ve(t),Ie(t,o)),i+=o.hash),n=xe(r,s,a,i);return o.value=n,o},Ne=function(t){this._seed=null!=t?t:null};Ne.prototype._seed=null,Ne.prototype.generate=function(t,e){var i=Pe(t,e,this._seed);return this._seed=i.seed,i.data},Ne.prototype.generateRecords=function(t,e){var i=Pe(t,e,this._seed);this._seed=i.seed;for(var n=(t=i.fields).length,o=i.data,r=o.length;--r>=0;){for(var s=o[r],a={},l=0;l<n;++l){a[t[l]]=s[l]}o[r]=a}return o},Ne.prototype.generateQuoteData=function(t,e){var i=ke(t,e,this._seed);return null!=this._seed&&++this._seed,i},Ne.prototype.getSeed=function(){return this._seed},Ne.prototype.setSeed=function(t){"number"==typeof t&&(this._seed=t)},Ne.prototype.randBetween=function(t,e){var i=Te(t,e,this._seed);return null!=this._seed&&++this._seed,i},Ne.prototype.randInt=function(t,e){var i=Ae(t,e,this._seed);return null!=this._seed&&++this._seed,i},Ne.prototype.randIndex=function(t){var e=Le(t,this._seed);return null!=this._seed&&++this._seed,e},Ne.prototype.randNumber=function(t,e,i){var n=xe(t,e,i,this._seed);return null!=this._seed&&++this._seed,n},Ne.prototype.randBoolean=function(){var t=Me(this._seed);return null!=this._seed&&++this._seed,t},Ne.prototype.randMember=function(t){var e=Ee(t,this._seed);return null!=this._seed&&++this._seed,e},Ne.prototype.randDate=function(t,e){var i=Fe(t,e,this._seed);return null!=this._seed&&++this._seed,i},Ne.prototype.randString=function(t,e){var i=ze(t,e,this._seed);return null!=this._seed&&++this._seed,i},Ne.seed=null,Ne.generate=function(t,e){var i=Pe(t,e,Ne.seed);return Ne.seed=i.seed,i.data},Ne.generateRecord=function(t,e,i){Array.isArray(t)||(t=[t+""]);var n={};null!=e&&("number"==typeof e?i=e:e&&(n=e));for(var o=t.length,r={},s=0;s<o;++s){var a=t[s];r[a]=Oe(a,n,i).value}return r},Ne.generateRecords=function(t,e){var i=Pe(t,e,Ne.seed);Ne.seed=i.seed;for(var n=(t=i.fields).length,o=i.data,r=o.length;--r>=0;){for(var s=o[r],a={},l=0;l<n;++l){a[t[l]]=s[l]}o[r]=a}return o},Ne.addFieldInfo=Ie,Ne.randNumber=xe,Ne.randInt=Ae,Ne.randBetween=Te,Ne.randIndex=Le,Ne.randBoolean=Me,Ne.randMember=Ee,Ne.randDate=Fe,Ne.randString=ze,Ne.toRecords=function(t,e){if(!Array.isArray(t))return null;Array.isArray(e)||(e=e?[e+""]:[]);for(var i=t.length,n=new Array(i),o=0;o<i;++o)for(var r=n[o]={},s=t[o],a=s&&s.length||0,l=0;l<a;++l){var u=s[l];if(void 0!==u){var h=e[l];h||0===h||(h=l+""),r[h]=u}}return n};var He=function(){};He.prototype.create=function(t){return new Ge(t)};var Ge=function(t){this._onRowUpdated=this._onRowUpdated.bind(this),this._fieldMap={},this._prevData={},this.id=null!=t?t+"":"_sub"+Ge._runningId++};Ge.prototype._rics=null,Ge.prototype._isChain=!1,Ge.prototype._fieldMap=null,Ge.prototype._prevData=null,Ge.prototype._updateHandler=null,Ge.prototype._updateTimerId=0,Ge.prototype._updateInterval=1e3,Ge._runningId=0,Ge.prototype.formattedFields=function(t){for(var e=t.length;--e>=0;)this._fieldMap[t[e]]=!0;return this},Ge.prototype.rawFields=function(t){for(var e=t.length;--e>=0;)this._fieldMap[t[e]]=!0;return this},Ge.prototype.chain=function(t){return this._rics=Array.isArray(t)?t[0]:[t],this._isChain=!0,this},Ge.prototype.rics=function(t){return this._rics=Array.isArray(t)?t:[t],this},Ge.prototype.start=function(){return this._onRowUpdated(),this},Ge.prototype.stop=function(){return this._updateTimerId&&(clearInterval(this._updateTimerId),this._updateTimerId=0),this},Ge.prototype.onNewRow=function(t){return this},Ge.prototype.onUpdate=function(t){return this._updateHandler=t,this},Ge.prototype.onRemoveRow=function(t){return this},Ge.prototype._onRowUpdated=function(){if(this._updateHandler){var t,e=this._rics?this._rics.length:0;if(1===e)t=this._rics[0],this._updateHandler(this,t,this._getUpdateData(t));else for(var i=0;i<e;++i)Le(3)||(t=this._rics[i],this._updateHandler(this,t,this._getUpdateData(t)));this._updateTimerId||(this._updateTimerId=setInterval(this._onRowUpdated,this._updateInterval))}},Ge.prototype._getUpdateData=function(t){var e={id:this.id},i={text:t};for(var n in this._fieldMap){var o=ke(n,i),r=o.value,s=o.formattedValue;o.changeOnly&&this._prevData[n]===r||(this._prevData[n]=r,e[n]={raw:r,formatted:s||r+""})}return e};var Be=function(){this._dict={}};Be.prototype._dict,Be.prototype._count=0,Be.prototype.addItem=function(t,e){if(t&&null!=e){var i=this._dict[t];return i?i.push(e):this._dict[t]=[e],++this._count,!0}return!1},Be.prototype.addItems=function(t,e){if(t){if(!Array.isArray(e))return this.addItem(t,e);var i=e?e.length:0;if(i){var n=this._dict[t];return n||(n=this._dict[t]=[]),Array.prototype.push.apply(n,e),this._count+=i,!0}}return!1},Be.prototype.removeItem=function(t,e){var i=this._dict[t];if(i){var n=i.indexOf(e);if(n>=0)return i.length>1?i.splice(n,1):delete this._dict[t],--this._count,!0}return!1},Be.prototype.removeItemsByKey=function(t){var e=this._dict[t];return!!e&&(delete this._dict[t],this._count-=e.length,!0)},Be.prototype.removeAllItems=function(){return!!this._count&&(this._dict={},this._count=0,!0)},Be.prototype.getItems=function(t){return this._dict[t]||null},Be.prototype.getAllItems=function(){if(this._count>0){var t=[],e=this._dict;for(var i in e)Array.prototype.push.apply(t,e[i]);return t}return null},Be.prototype.getItemCount=function(){return this._count},Be.prototype.getAllKeys=function(){return Object.keys(this._dict)};var We=function(t,e){return t.ric+"_"+e.ric},Ue=function(){};Ue.prototype.create=function(t){return new Ye(t)},Ue.prototype.isSkipHeaderSupported=function(){return!0};var Ye=function(t){t&&("number"==typeof t.minInterval&&(this._minInterval=t.minInterval,this._minInterval>this._maxInterval&&(this._maxInterval=this._minInterval)),"number"==typeof t.maxInterval&&(this._maxInterval=t.maxInterval,this._minInterval>this._maxInterval&&(this._minInterval=this._maxInterval)),"number"==typeof t.percentageDataUpdate&&(this._percentageDataUpdate=t.percentageDataUpdate/100)),this._onSubscriptionResponse=this._onSubscriptionResponse.bind(this),this._subMap={},this._dataMap=new Be,this._fields={},this._events={},this._dataGen=new Ne};Ye.prototype._minInterval=750,Ye.prototype._maxInterval=850,Ye.prototype._percentageDataUpdate=.1,Ye.prototype.setUpdateInterval=function(t,e){"number"==typeof t&&(this._minInterval=t),"number"==typeof e&&(this._maxInterval=e)},Ye.prototype.setPercentageDataUpdate=function(t){"number"==typeof t&&(this._percentageDataUpdate=Math.round(t/100))},Ye.prototype.setSeed=function(t){this._dataGen.setSeed(t)},Ye.prototype.addRic=function(t,e){return this._addSymbol(t,!1,e)},Ye.prototype.addChain=function(t,e){return this._addSymbol(t,!0,e)},Ye.prototype.addFields=function(t){if(t){"string"==typeof t&&(t=[t]);for(var e=t.length,i=0;i<e;++i)this._fields[t[i]]=!0}},Ye.prototype.removeSubscription=function(t){var e=this._subMap[t];if(e&&(this._dispatch("subscriptionRemoved",{subs:[e]}),delete this._subMap[t],this._dataMap.removeItem(e.ric,e),e.chain)){for(var i=e.children,n=i.length,o=0;o<n;++o){var r=i[o];this._dataMap.removeItem(We(e,r),r),r.parent=null}e.children=null}},Ye.prototype.removeRic=Ye.prototype.removeSubscription,Ye.prototype.removeChain=Ye.prototype.removeSubscription,Ye.prototype.removeAllSubscriptions=function(){var t=this._working;if(this.stop(),this._hasListener("subscriptionRemoved")){var e=[];for(var i in this._subMap)e.push(this._subMap[i]);e.length>0&&this._dispatch("subscriptionRemoved",{subs:e})}this._subMap={},this._dataMap.removeAllItems(),t&&this.start()},Ye.prototype.removeFields=function(t){"string"==typeof t&&(t=[t]);for(var e=t.length,i=0;i<e;++i){var n=t[i];this._fields[n]&&delete this._fields[n]}},Ye.prototype.removeAllFields=function(){var t=!1;for(var e in this._fields){t=!0;break}t&&(this._fields={})},Ye.prototype.start=function(){this._working=!0,this._connect()},Ye.prototype.stop=function(){this._working=!1,this._timerId>=0&&(window.clearTimeout(this._timerId),this._timerId=-1)},Ye.prototype.dispose=function(){this.stop(),this._subMap=null,this._dataMap&&(this._dataMap.removeAllItems(),this._dataMap=null),this._fields=null,this._events=null},Ye.prototype.addEventListener=function(t,e){if(e){var i=this._events[t];i?i.indexOf(e)<0&&i.push(e):this._events[t]=[e]}},Ye.prototype.removeEventListener=function(t,e){var i=this._events?this._events[t]:null;if(i){var n=i.indexOf(e);n>=0&&i.splice(n,1)}},Ye.prototype.removeAllEventListeners=function(){this._events={}},Ye.prototype.getSubscription=function(t){return this._subMap[t]||null},Ye.prototype.getRic=function(t){var e=this._subMap[t];return e?e.ric:""},Ye.prototype.getAllFields=function(){return this._fields},Ye.prototype.hasField=function(t){return this._fields[t]||!1},Ye.prototype.filter=function(t,e){return this};var qe=function(t,e){for(var i in t)e[i]=t[i];return e};Ye.prototype._addSymbol=function(t,e,i){if(!t)return null;if(i||0===i)i+="";else do{i="_"+this._runningSubId+++"_"}while(this._subMap[i]);if(this._subMap[i])return window.console.log("WARNING: Cannot add ric with duplicate id"),null;e&&(t=t.replace("0#",""));var n={};if(n.ric=t,n.chain=e,n.id=i,n.dataId=i+n.ric,this._subMap[i]=n,this._dataMap.addItem(n.ric,n),e){n.children=[];for(var o=Ye.simpleDigest(t)%10+4,r=0;r<o;++r){var s={};s.ric="Child_"+String.fromCharCode(65+r),s.id=i,s.dataId=i+s.ric,s.parent=n,n.children.push(s),this._dataMap.addItem(We(n,s),s)}}return this._dispatch("subscriptionAdded",{subs:[n]}),this._connect(),i},Ye.simpleDigest=function(t){for(var e=t.length,i=0,n=0;n<e;++n)i+=t.charCodeAt(n);return i},Ye.prototype._connect=function(){if(this._working&&!(this._timerId>=0)){var t=this._dataGen.randInt(this._minInterval,this._maxInterval);this._timerId=window.setTimeout(this._onSubscriptionResponse,t)}},Ye.prototype._onSubscriptionResponse=function(){this._timerId=-1;var t=this._dataMap.getAllKeys(),e=t?t.length:0;if(e){var i=(this._percentageDataUpdate-.02)*e;i=i>0?i:1;var n=(this._percentageDataUpdate+.02)*e;n=n<e?n:e;for(var o=this._dataGen.randInt(i,n),r=0;r<o;r++){var s=t[this._dataGen.randIndex(e)],a=this._dataMap.getItems(s),l=a[0],u=l.ric,h=l.prevData,p={},d={text:u,prefix:l.parent?l.parent.ric:""};for(var c in this._fields){var _=this._dataGen.generateQuoteData(c,d);if(h){if(_.changeOnly&&h[c]===_.value)continue;h[c]=_.value}p[c]=_.value,p[c+"_FORMATTED"]=_.formattedValue}for(var f=a.length,g=0;g<f;++g)this._dispatchDataChanged(a[g],p)}this._connect()}else this._connect()},Ye.prototype._dispatchDataChanged=function(t,e){var i=qe(e,{}),n={};n.ric=t.ric,n.values=i,n.subId=t.id;var o=t.prevData;o||(o={},t.prevData=o,n.type="statusUpdated",i.STATUS=1,i.STATUS_FORMATTED=this._statusMap[1],i.SUB_ID=t.id,qe(i,o)),this._dispatch("dataChanged",n)},Ye.prototype.onFeedStatusChanged=function(t,e){return window.setTimeout((function(){e([{key:"Q",name:"IDN_RDF",state:"up"}])}),1e3),this},Ye.prototype._hasListener=function(t){var e=this._events[t];return!!e&&e.length>0},Ye.prototype._dispatch=function(t,e){var i=this._events[t];if(i)for(var n=i.length,o=0;o<n;++o)i[o](e)},Ye.prototype._subMap=null,Ye.prototype._fields=null,Ye.prototype._events=null,Ye.prototype._working=!1,Ye.prototype._timerId=-1,Ye.prototype._runningSubId=0,Ye.prototype._statusMap={0:"PENDING",1:"OK",2:"STALE",3:"INFO",4:"CLOSED",5:"DELAYED",6:"NOPERM",7:"REACHLIMIT",8:"C_COMPLETE",9:"C_CLOSE",10:"C_EMPTY",11:"C_NOTCHAIN",12:"C_ERR",13:"C_NOBEGIN",14:"C_NOEND"};var Xe=function(){this._data={}};Xe.prototype._data=null,Xe.prototype.clear=function(){this._data={}},Xe.prototype.put=function(t,e){t&&(this._data[t]=e)},Xe.prototype.get=function(t){var e=this._data[t];return null!=e?e:""},Xe.prototype.getAllKeys=function(){return Object.keys(this._data)},Xe.prototype.save=function(){},Xe.prototype.filter=function(t){var e=[];if(t)for(var i in this._data){var n=this._data[i];t(n)&&e.push(n)}return e};var je={"TR.NonExistField":!0,"TR.NotExistField":!0,CF_IGNORE_FIELD:!0};var Ke=new Ne,Je={request:function(t,e){if(e)return Promise.resolve(JSON.stringify(e));var i,n,o,r,s=t.instruments,a=t.fields,l=je;for(a=[],i=0;i<t.fields.length;i++)l[(n=t.fields[i]).name]||a.push(n);var u={};o=s.length;var h=[],p=Ke.generate(a,o);for(i=0;i<o;++i){var d=s[i];(r=u[d])||(r=u[d]=p[i]).unshift(d),h.push(r)}if(h.length>0&&Ke.randInt(1,10)<=3){var c=Ke.randInt(0,h.length-1);o=(r=h[c]).length;var _=new Array(o);for(_[0]=r[0],i=1;i<o;i++)_[i]="";h.splice(c+1,0,_)}var f=[{displayName:"Instrument"}];for(i=0;i<a.length;i++)n=a[i],f.push({displayName:n.name,field:n.name.toUpperCase()});return Promise.resolve(JSON.stringify({data:h,headers:[f]}))}},Qe=function(t){return"datagrid"===t?Promise.resolve(Je):Promise.reject(t+" is not supported.")};Qe.setInvalidFields=function(t){if(t&&"string"==typeof t)je[t]=!0;else if(Array.isArray(t))for(var e=0;e<t.length;e++)je[t[e]]=!0};var Ze=function(){this.Quotes=new He,this.Quotes2=new Ue,this.Archive=new Xe,this.ContainerDescription=!0,this.Data=Qe};Ze.prototype.init=function(t){return this},Ze.prototype.onLoad=function(t){return setTimeout(t,2e3),this},Ze.prototype.navigate=function(t){return this},Ze.prototype.appHit=function(t,e,i){},Ze.prototype.getUserInfo=function(){return Promise.resolve({UUID:"PAXTRA"})},Ze.prototype.contextChange=function(t){};var $e={"⇧":1,"B⇧":1,"↑":1,"B↑":1,26:1,1:1,'"1"':1,"-1":-1,"⇩":-1,"B⇩":-1,"↓":-1,"B↓":-1,27:-1,2:-1,'"2"':-1},ti={CF_TICK:1,PRCTCK_1:1,BID_TICK:1,ASK_TICK:1},ei=function(){this._conditions=[],this._scopes=[],ei._painters.push(this)};ei.ColoringTypes={TEXT:1,HEATMAP:2,CONDITIONAL:3},ei.prototype._coloringType=0,ei.prototype._conditions=null,ei.prototype._blinkCondition=null,ei.prototype._scopes,ei.prototype._columnStats=null,ei.prototype._levelColorDisabled=!1,ei._runningBlinkId=0,ei._blinkingDuration=250,ei._painters=[],ei._emptyAry=[],ei._emptyObj={},ei._bgObj={backgroundColor:"",color:""},ei._colorObj={color:""},ei.bgStyles=["backgroundColor","color"],ei.nonBgStyles=["fontSize","fontWeight","fontStyle","textAlign","textDecoration"],ei.supportedStyles=ei.bgStyles.concat(ei.nonBgStyles),ei.themeReady=null,ei.parse=u.f,ei.prototype.dispose=function(){var t=ei._painters.indexOf(this);t>=0&&ei._painters.splice(t,1),this.reset(),this._conditions=null,this._scopes.length=0,this._blinkCondition=null},ei.prototype.reset=function(){this._setColoringType(0);var t=this._scopes.length;if(t){for(var e=0;e<t;++e){var i=this._scopes[e];ei._clearBlinkTimer(i)&&i._restorer();var n=i.cell;n&&delete n.blinking,i.cell=null}this._scopes.length=0}this._blinkCondition=null},ei.prototype.resetColoring=function(){this._setColoringType(0),this._conditions.length=0},ei.prototype.resetBlinking=function(){this._blinkCondition=null,this._scopes.length=0},ei.prototype.clearBlinking=function(){this._blinkCondition=null;var t=this._scopes.length;if(t){for(var e=0;e<t;++e){var i=this._scopes[e];ei._clearBlinkTimer(i)&&i._restorer();var n=i.cell;n&&delete n.blinking,i.cell=null}this._scopes.length=0}},ei.prototype.resetHeatMap=function(){this._conditions.length=0,this._columnStats=null},ei.prototype.clearHeatMap=function(){return this._blinkCondition?(this._setColoringType(0),this.resetHeatMap(),!1):(this.dispose(),!0)},ei.prototype.applyThemeColor=function(){var t=d.themeColors,e=this._conditions[0];if(e&&(this._coloringType===ei.ColoringTypes.HEATMAP&&(e.textMode?e.baseColor=t.baseText:e.baseColor=t.baseGrid),e.useThemeColor&&(this._coloringType===ei.ColoringTypes.HEATMAP||this._coloringType===ei.ColoringTypes.TEXT))){var i,n;this._coloringType===ei.ColoringTypes.TEXT&&"CF_TICK"===e.field?(i=t.tickUp,n=t.tickDown):(i=t.up,n=t.down);var o=t.level===t.baseText?"":t.level;ei._setUpDownColors(e,i,n,o)}this._blinkCondition&&this._blinkCondition.useThemeColor&&ei._setUpDownColors(this._blinkCondition,t.up,t.down,t.level,!0)},ei.prototype.getConditions=function(){return this._conditions},ei.prototype.getColoringType=function(){return this._coloringType},ei.prototype._setColoringType=function(t){this._coloringType!==t&&(this._coloringType=t)},ei.prototype.setConditions=function(t){this._conditions.length=0,this._setColoringType(ei.ColoringTypes.CONDITIONAL);for(var e=t.length,i=0;i<e;i++)this._addCondition(t[i])},ei.prototype.setColumnStats=function(t){this._columnStats=t&&t.getMin?t:null},ei.prototype.getColumnStats=function(){return this._columnStats},ei.prototype._addCondition=function(t){var e=t.expression;e&&(t._fn=ei.parse(e.text||e),this._conditions.push(t))},ei.prototype.addHeatmap=function(t,e,i,n,o,r){this._setColoringType(ei.ColoringTypes.HEATMAP);var s={heatmap:!0};return s.field=t,s.expression=ei._heatMapCondition.bind(s),s.midPoint=e,ei._setUpDownColors(s,i,n),s.baseColor=o,!0!==r&&"text"!==r||(s.textMode=!0),this._addCondition(s),s},ei.prototype.addHeatmapWithTheme=function(t,e,i){var n=d.themeColors,o=this.addHeatmap(t,e,n.up,n.down,n.baseGrid,i);return!0!==i&&"text"!==i||(o.baseColor=n.baseText),o.useThemeColor=!0,o},ei.prototype._addColorText=function(t,e,i,n,o){this._setColoringType(ei.ColoringTypes.TEXT);var r={};return r.field=e,r.expression=t.bind(null,e),ei._setUpDownColors(r,i,n,o),this._addCondition(r),r},ei.prototype.addColorText=function(t,e,i,n){return this._addColorText(ti[t]?ei._tickColorTextCondition:ei._colorTextCondition,t,e,i,n)},ei.prototype.addColorTextWithTheme=function(t){var e=d.themeColors,i=this.addColorText(t,e.up,e.down,e.level===e.baseText?"":e.level);return i.useThemeColor=!0,i},ei.prototype.addTickColorText=function(t,e,i){return this.addColorText("CF_TICK",t,e,i)},ei.prototype.addTickColorTextWithTheme=function(){var t=d.themeColors,e=this.addTickColorText(t.tickUp,t.tickDown,t.level);return e.useThemeColor=!0,e},ei.prototype.addTickBlink=function(t,e,i,n){return this.addBlink("CF_TICK",t,e,i,n)},ei.prototype.addTickBlinkWithTheme=function(t){var e=d.themeColors,i=this.addTickBlink(e.tickUp,e.tickDown,e.level,t);return i.useThemeColor=!0,i},ei.prototype.addBlink=function(t,e,i,n,o){return this._addBlink(ti[t]?ei._tickBlinkCondition:ei._fieldBlinkCondition,t,e,i,n,o)},ei.prototype.addBlinkWithTheme=function(t,e){var i=d.themeColors,n=this.addBlink(t,i.up,i.down,i.level,e);return n.useThemeColor=!0,n},ei.prototype._addBlink=function(t,e,i,n,o,r){var s=this._blinkCondition={};return s.blink=!0,s.blinkId=ei._runningBlinkId++,s.field=e,s._fn=s.expression=t,!0!==r&&"border"!==r||(s.border=!0),ei._setUpDownColors(s,i,n,o,!0),s},ei.prototype.renderForPrinting=function(t,e,i,n){if(t){var o=this._getStyles(e,i,n),r=o.backgroundColor;r&&(t.style.backgroundColor=r),(r=o.color)&&(t.style.color=r)}},ei._colorTextCondition=function(t,e){var i=e[t];if(i||0===i){if(i>0)return 1;if(i<0)return-1}return"u"},ei._tickColorTextCondition=function(t,e){var i=$e[e[t]];if(i)return i},ei._heatMapCondition=function(t,e,i){var n=t[this.field],o=n||0===n?n-this.midPoint:NaN;if(0===o||o!=o)return 0;var r=1;return o>0?(r=i-this.midPoint)<0&&(r=e-this.midPoint):(r=e-this.midPoint)>0&&(r=i-this.midPoint),r<0&&(r=-r),o/r},ei._tickBlinkCondition=function(t){var e=$e[t];if(e)return e},ei._fieldBlinkCondition=function(t,e){return t>e?1:t<e?-1:0},ei._borderRestorer=function(t){t.blinkTimer=0;var e=t.cell.getElement();e&&(e.style.border="")},ei._cellRestorer=function(t){t.blinkTimer=0;var e=t.cell.getElement();if(e){var i=t.rowData,n=NaN,o=NaN;if(this._coloringType===ei.ColoringTypes.HEATMAP){var r=this._columnStats;r&&(n=r.getMin(),o=r.getMax())}var s=this._getStyles(i,n,o);e.style.backgroundColor=s.backgroundColor||"",e.style.color=s.color||""}},ei.prototype._getStyles=function(t,e,i){if(!t)return ei._emptyObj;for(var n=this._conditions.length,o=0;o<n;++o){var r,s=this._conditions[o],a=s._fn;try{var l=a&&a(t,e,i)}catch(t){}if(l)return this._coloringType===ei.ColoringTypes.HEATMAP?(r=l>0?ei.blendColor(s.baseColor,s.upColor,l):ei.blendColor(s.baseColor,s.downColor,-l),s.textMode?(ei._colorObj.color=ei.num2Hex(r),ei._colorObj):(ei._bgObj.backgroundColor=ei.num2Hex(r),ei._bgObj.color=ei.blackAndWhite(r),ei._bgObj)):this._coloringType===ei.ColoringTypes.TEXT?(ei._colorObj.color=l>0?s.upColor:l<0?s.downColor:this._levelColorDisabled?"":s.levelColor,ei._colorObj):s}return ei._emptyObj},ei.blendColor=function(t,e,i){i>1?i=1:i<0&&(i=0);for(var n=ei.hex2Num(t),o=ei.hex2Num(e),r=[],s=0;s<3;++s){var a=(o[s]-n[s])*i;r.push(n[s]+a)}return r},ei.blackAndWhite=function(t){return Math.sqrt(t[0]*t[0]*.241+t[1]*t[1]*.691+t[2]*t[2]*.068)>=135?"#000000":"#FFFFFF"},ei.rgb2Hex=u.h,ei.num2Hex=function(t){return"#"+(16777216+(t[2]|t[1]<<8|t[0]<<16)).toString(16).slice(1)},ei.num2Rgb=function(t){return"rgb("+t[0]+", "+t[1]+", "+t[2]+")"},ei.hex2Num=function(t){var e=parseInt(t.replace(/[^0-9A-F]/gi,""),16);return[e>>16&255,e>>8&255,255&e]},ei.hex2Rgb=function(t){if(t){var e=parseInt(t.replace(/[^0-9A-F]/gi,""),16);return"rgb("+(e>>16&255)+", "+(e>>8&255)+", "+(255&e)+")"}return""},ei.themeChanged=function(){},ei.setThemeColors=function(){},ei._onThemeChanged=function(t){for(var e=ei._painters,i=e.length;--i>=0;)e[i].applyThemeColor();return t},ei.loadThemeColors=function(){return ei.themeReady||(ei.themeReady=d.getThemeColors().then(ei._onThemeChanged)),ei.themeReady},ei.reloadThemeColors=function(){return ei.themeReady=d.themeReady=null,ei.loadThemeColors()},ei.clearCellStyle=function(t,e){var i=t.getElement();if(i){var n=t.blinking;n&&(ei._clearBlinkTimer(n),delete t.blinking,n.cell=null);for(var o=(e=e||ei.supportedStyles).length;--o>=0;)i.style[e[o]]=""}},ei._setUpDownColors=function(t,e,i,n,o){null!=e&&(t.upColor=e,o&&(t.contrastUpColor=ei.getOppositeColor(e))),null!=i&&(t.downColor=i,o&&(t.contrastDownColor=ei.getOppositeColor(i))),null!=n&&(t.levelColor=n,o&&(t.contrastLevelColor=ei.getOppositeColor(n)))},ei._clearBlinkTimer=function(t,e){return!!t.blinkTimer&&(clearTimeout(t.blinkTimer),t.blinkTimer=0,!0)},ei.getOppositeColor=function(t){if("string"==typeof t){if("#"===t.charAt(0)){var e=ei.hex2Num(t);return ei.blackAndWhite(e)}}else if(Array.isArray(t))return ei.blackAndWhite(t);return""},ei.prototype.render=function(t,e,i,n,o){null!=i&&i==i?this._paintCell(t,e,i,n):this._conditions.length&&this._coloringType===ei.ColoringTypes.CONDITIONAL&&this._paintCell(t,e)},ei.prototype.renderHeatMap=function(t,e,i,n){this._paintCell(t,e,i,n)},ei.prototype.renderColoring=function(t,e){this._paintCell(t,e)},ei.prototype._paintCell=function(t,e,i,n){if(t){var o=t.getElement();if(o){var r,s=this._blinkCondition;if(!(s&&(r=t.blinking)&&r.blinkTimer)||s.border)for(var a=this._getStyles(e,i,n),l=ei.bgStyles,u=o.style,h=l.length;--h>=0;){var p=l[h];u[p]=a[p]||""}}}},ei.prototype.blink=function(t,e,i){this._blinkCell(t,i,e)},ei.prototype.blinkCell=function(t,e,i,n){if(!this._blinkCondition)return!1;var o=this._blinkCondition._fn(e,i);return this._blinkCell(t,n,o)},ei.prototype._blinkCell=function(t,e,i){if(!t)return!1;if(this._levelColorDisabled&&!i)return!1;var n=t.getElement();if(!n)return!1;var o=this._blinkCondition;if(!o)return!1;var r,s,a=t.blinking;if(a||((a={}).cell=t,t.blinking=a,this._scopes.push(a)),a.blinkId!==o.blinkId){a.blinkId=o.blinkId,a.field=o.field;var l=o.border?ei._borderRestorer:ei._cellRestorer;a._restorer=l.bind(this,a)}a.rowData=e,i>0?(r=o.upColor,s=o.contrastUpColor):i<0?(r=o.downColor,s=o.contrastDownColor):(r=o.levelColor,s=o.contrastLevelColor);var u=!0;return o.border?(n.style.border="1px solid "+r,u=!1):(n.style.backgroundColor=r,n.style.color=s),ei._clearBlinkTimer(a),a.blinkTimer=setTimeout(a._restorer,ei._blinkingDuration),u},ei.prototype.verifyBlinking=function(t,e){var i=t.blinking;i&&i.blinkTimer&&i.rowData!==e&&(i.rowData=e,ei._clearBlinkTimer(i)&&i._restorer())},ei.prototype.disableLevelColor=function(t){this._levelColorDisabled=!1!==t};if(window){var ii=window.tr;ii||(ii=window.tr={});var ni=ii.rt;ni||(ni=ii.rt={});var oi=ii.grid;oi||(oi=ii.grid={}),ii.MockJET||(ii.MockJET=Ze),ii.closestElement||(ii.closestElement=n.closestElement),ii.CellPainter||(ii.CellPainter=ei),ni.Grid||(ni.Grid=Ce),oi.CellPainter||(oi.CellPainter=ei)}e.default=Ce}]);