brd-ui-kit 0.1.57 → 0.1.58

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 (312) hide show
  1. package/dist/_commonjsHelpers-DKOUU3wS.cjs +2 -0
  2. package/dist/_commonjsHelpers-DKOUU3wS.cjs.map +1 -0
  3. package/dist/_commonjsHelpers-DaMA6jEr.js +9 -0
  4. package/dist/_commonjsHelpers-DaMA6jEr.js.map +1 -0
  5. package/dist/chart-CgVfpT_X.cjs +63 -0
  6. package/dist/chart-CgVfpT_X.cjs.map +1 -0
  7. package/dist/chart-D15EtNmb.js +13139 -0
  8. package/dist/chart-D15EtNmb.js.map +1 -0
  9. package/dist/components-app-pagination-app-pagination.js +97 -0
  10. package/dist/components-app-pagination-app-pagination.js.map +1 -0
  11. package/dist/components-app-pagination-app-pagination.styles.js +85 -0
  12. package/dist/components-app-pagination-app-pagination.styles.js.map +1 -0
  13. package/dist/components-app-pagination.js +5 -0
  14. package/dist/components-app-pagination.js.map +1 -0
  15. package/dist/components-app-sidebar-app-sidebar.js +97 -0
  16. package/dist/components-app-sidebar-app-sidebar.js.map +1 -0
  17. package/dist/components-app-sidebar-app-sidebar.styles.js +59 -0
  18. package/dist/components-app-sidebar-app-sidebar.styles.js.map +1 -0
  19. package/dist/components-app-sidebar.js +5 -0
  20. package/dist/components-app-sidebar.js.map +1 -0
  21. package/dist/components-avatar-uploader-avatar-uploader.cjs +2 -2
  22. package/dist/components-avatar-uploader-avatar-uploader.cjs.map +1 -1
  23. package/dist/components-avatar-uploader-avatar-uploader.js +103 -0
  24. package/dist/components-avatar-uploader-avatar-uploader.js.map +1 -0
  25. package/dist/components-avatar-uploader.js +5 -0
  26. package/dist/components-avatar-uploader.js.map +1 -0
  27. package/dist/components-basic-avatar-basic-avatar.cjs +1 -1
  28. package/dist/components-basic-avatar-basic-avatar.cjs.map +1 -1
  29. package/dist/components-basic-avatar-basic-avatar.js +99 -0
  30. package/dist/components-basic-avatar-basic-avatar.js.map +1 -0
  31. package/dist/components-basic-avatar.js +5 -0
  32. package/dist/components-basic-avatar.js.map +1 -0
  33. package/dist/components-basic-chart-basic-chart.cjs +3 -1
  34. package/dist/components-basic-chart-basic-chart.cjs.map +1 -1
  35. package/dist/components-basic-chart-basic-chart.js +5546 -0
  36. package/dist/components-basic-chart-basic-chart.js.map +1 -0
  37. package/dist/components-basic-chart.js +5 -0
  38. package/dist/components-basic-chart.js.map +1 -0
  39. package/dist/components-basic-checkbox-basic-checkbox.js +54 -0
  40. package/dist/components-basic-checkbox-basic-checkbox.js.map +1 -0
  41. package/dist/components-basic-checkbox.js +5 -0
  42. package/dist/components-basic-checkbox.js.map +1 -0
  43. package/dist/components-basic-drawer-basic-drawer.cjs +1 -1
  44. package/dist/components-basic-drawer-basic-drawer.cjs.map +1 -1
  45. package/dist/components-basic-drawer-basic-drawer.js +74 -0
  46. package/dist/components-basic-drawer-basic-drawer.js.map +1 -0
  47. package/dist/components-basic-drawer.js +5 -0
  48. package/dist/components-basic-drawer.js.map +1 -0
  49. package/dist/components-basic-modal-basic-modal.js +56 -0
  50. package/dist/components-basic-modal-basic-modal.js.map +1 -0
  51. package/dist/components-basic-modal.js +5 -0
  52. package/dist/components-basic-modal.js.map +1 -0
  53. package/dist/components-basic-select-basic-select.js +53 -0
  54. package/dist/components-basic-select-basic-select.js.map +1 -0
  55. package/dist/components-basic-select.js +5 -0
  56. package/dist/components-basic-select.js.map +1 -0
  57. package/dist/components-basic-table-basic-table.js +1961 -0
  58. package/dist/components-basic-table-basic-table.js.map +1 -0
  59. package/dist/components-basic-table.js +5 -0
  60. package/dist/components-basic-table.js.map +1 -0
  61. package/dist/components-basic-tooltip-basic-tooltip.js +61 -0
  62. package/dist/components-basic-tooltip-basic-tooltip.js.map +1 -0
  63. package/dist/components-basic-tooltip.js +5 -0
  64. package/dist/components-basic-tooltip.js.map +1 -0
  65. package/dist/components-files-uploader-files-uploader.cjs +3 -3
  66. package/dist/components-files-uploader-files-uploader.cjs.map +1 -1
  67. package/dist/components-files-uploader-files-uploader.js +185 -0
  68. package/dist/components-files-uploader-files-uploader.js.map +1 -0
  69. package/dist/components-files-uploader.js +5 -0
  70. package/dist/components-files-uploader.js.map +1 -0
  71. package/dist/components-input-field-input-field.js +56 -0
  72. package/dist/components-input-field-input-field.js.map +1 -0
  73. package/dist/components-input-field.js +5 -0
  74. package/dist/components-input-field.js.map +1 -0
  75. package/dist/components-input-password-input-password.cjs +1 -1
  76. package/dist/components-input-password-input-password.cjs.map +1 -1
  77. package/dist/components-input-password-input-password.js +67 -0
  78. package/dist/components-input-password-input-password.js.map +1 -0
  79. package/dist/components-input-password.js +5 -0
  80. package/dist/components-input-password.js.map +1 -0
  81. package/dist/components-popover-modal-popover-modal.js +40 -0
  82. package/dist/components-popover-modal-popover-modal.js.map +1 -0
  83. package/dist/components-popover-modal.js +5 -0
  84. package/dist/components-popover-modal.js.map +1 -0
  85. package/dist/components-radio-button-radio-button.js +74 -0
  86. package/dist/components-radio-button-radio-button.js.map +1 -0
  87. package/dist/components-radio-button.js +5 -0
  88. package/dist/components-radio-button.js.map +1 -0
  89. package/dist/components-select-field-select-field.js +179 -0
  90. package/dist/components-select-field-select-field.js.map +1 -0
  91. package/dist/components-select-field.js +5 -0
  92. package/dist/components-select-field.js.map +1 -0
  93. package/dist/components-select-groups-select-groups.js +91 -0
  94. package/dist/components-select-groups-select-groups.js.map +1 -0
  95. package/dist/components-select-groups.js +5 -0
  96. package/dist/components-select-groups.js.map +1 -0
  97. package/dist/components-textarea-field-textarea-field.js +30 -0
  98. package/dist/components-textarea-field-textarea-field.js.map +1 -0
  99. package/dist/components-textarea-field.js +5 -0
  100. package/dist/components-textarea-field.js.map +1 -0
  101. package/dist/components-ui-avatar-avatar.js +149 -0
  102. package/dist/components-ui-avatar-avatar.js.map +1 -0
  103. package/dist/components-ui-avatar.js +10 -0
  104. package/dist/components-ui-avatar.js.map +1 -0
  105. package/dist/components-ui-badge-badge.js +47 -0
  106. package/dist/components-ui-badge-badge.js.map +1 -0
  107. package/dist/components-ui-badge-badge.styles.js +53 -0
  108. package/dist/components-ui-badge-badge.styles.js.map +1 -0
  109. package/dist/components-ui-badge.js +7 -0
  110. package/dist/components-ui-badge.js.map +1 -0
  111. package/dist/components-ui-button-button.js +26 -0
  112. package/dist/components-ui-button-button.js.map +1 -0
  113. package/dist/components-ui-button-button.styles.js +58 -0
  114. package/dist/components-ui-button-button.styles.js.map +1 -0
  115. package/dist/components-ui-button.js +7 -0
  116. package/dist/components-ui-button.js.map +1 -0
  117. package/dist/components-ui-card-card.js +95 -0
  118. package/dist/components-ui-card-card.js.map +1 -0
  119. package/dist/components-ui-card-card.styles.js +55 -0
  120. package/dist/components-ui-card-card.styles.js.map +1 -0
  121. package/dist/components-ui-card.js +10 -0
  122. package/dist/components-ui-card.js.map +1 -0
  123. package/dist/components-ui-chart-chart.cjs +1 -21
  124. package/dist/components-ui-chart-chart.cjs.map +1 -1
  125. package/dist/components-ui-chart-chart.js +13 -0
  126. package/dist/components-ui-chart-chart.js.map +1 -0
  127. package/dist/components-ui-chart.cjs +1 -1
  128. package/dist/components-ui-chart.js +10 -0
  129. package/dist/components-ui-chart.js.map +1 -0
  130. package/dist/components-ui-checkbox-checkbox.js +26 -0
  131. package/dist/components-ui-checkbox-checkbox.js.map +1 -0
  132. package/dist/components-ui-checkbox-checkbox.styles.js +20 -0
  133. package/dist/components-ui-checkbox-checkbox.styles.js.map +1 -0
  134. package/dist/components-ui-checkbox.js +5 -0
  135. package/dist/components-ui-checkbox.js.map +1 -0
  136. package/dist/components-ui-combobox-combobox.cjs +5 -5
  137. package/dist/components-ui-combobox-combobox.cjs.map +1 -1
  138. package/dist/components-ui-combobox-combobox.js +7155 -0
  139. package/dist/components-ui-combobox-combobox.js.map +1 -0
  140. package/dist/components-ui-combobox-combobox.styles.js +93 -0
  141. package/dist/components-ui-combobox-combobox.styles.js.map +1 -0
  142. package/dist/components-ui-combobox.js +20 -0
  143. package/dist/components-ui-combobox.js.map +1 -0
  144. package/dist/components-ui-dialog-dialog.js +88 -0
  145. package/dist/components-ui-dialog-dialog.js.map +1 -0
  146. package/dist/components-ui-dialog-dialog.styles.js +34 -0
  147. package/dist/components-ui-dialog-dialog.styles.js.map +1 -0
  148. package/dist/components-ui-dialog.js +14 -0
  149. package/dist/components-ui-dialog.js.map +1 -0
  150. package/dist/components-ui-drawer-drawer.cjs +1 -1
  151. package/dist/components-ui-drawer-drawer.cjs.map +1 -1
  152. package/dist/components-ui-drawer-drawer.js +177 -0
  153. package/dist/components-ui-drawer-drawer.js.map +1 -0
  154. package/dist/components-ui-drawer.js +14 -0
  155. package/dist/components-ui-drawer.js.map +1 -0
  156. package/dist/components-ui-field-field.js +155 -0
  157. package/dist/components-ui-field-field.js.map +1 -0
  158. package/dist/components-ui-field-field.styles.js +59 -0
  159. package/dist/components-ui-field-field.styles.js.map +1 -0
  160. package/dist/components-ui-field.js +14 -0
  161. package/dist/components-ui-field.js.map +1 -0
  162. package/dist/components-ui-icon-icon-dictionary.js +60 -0
  163. package/dist/components-ui-icon-icon-dictionary.js.map +1 -0
  164. package/dist/components-ui-icon-icon.js +40 -0
  165. package/dist/components-ui-icon-icon.js.map +1 -0
  166. package/dist/components-ui-icon-overrides.js +65 -0
  167. package/dist/components-ui-icon-overrides.js.map +1 -0
  168. package/dist/components-ui-icon.js +5 -0
  169. package/dist/components-ui-icon.js.map +1 -0
  170. package/dist/components-ui-input-group-input-group.js +129 -0
  171. package/dist/components-ui-input-group-input-group.js.map +1 -0
  172. package/dist/components-ui-input-group-input-group.styles.js +43 -0
  173. package/dist/components-ui-input-group-input-group.styles.js.map +1 -0
  174. package/dist/components-ui-input-group.js +10 -0
  175. package/dist/components-ui-input-group.js.map +1 -0
  176. package/dist/components-ui-input-input.js +18 -0
  177. package/dist/components-ui-input-input.js.map +1 -0
  178. package/dist/components-ui-input-input.styles.js +31 -0
  179. package/dist/components-ui-input-input.styles.js.map +1 -0
  180. package/dist/components-ui-input.js +5 -0
  181. package/dist/components-ui-input.js.map +1 -0
  182. package/dist/components-ui-label-label.js +19 -0
  183. package/dist/components-ui-label-label.js.map +1 -0
  184. package/dist/components-ui-label.js +5 -0
  185. package/dist/components-ui-label.js.map +1 -0
  186. package/dist/components-ui-navigation-item-navigation-item.js +66 -0
  187. package/dist/components-ui-navigation-item-navigation-item.js.map +1 -0
  188. package/dist/components-ui-navigation-item-navigation-item.styles.js +32 -0
  189. package/dist/components-ui-navigation-item-navigation-item.styles.js.map +1 -0
  190. package/dist/components-ui-navigation-item.js +5 -0
  191. package/dist/components-ui-navigation-item.js.map +1 -0
  192. package/dist/components-ui-navigation-menu-navigation-menu.js +25 -0
  193. package/dist/components-ui-navigation-menu-navigation-menu.js.map +1 -0
  194. package/dist/components-ui-navigation-menu-navigation-menu.styles.js +23 -0
  195. package/dist/components-ui-navigation-menu-navigation-menu.styles.js.map +1 -0
  196. package/dist/components-ui-navigation-menu.js +5 -0
  197. package/dist/components-ui-navigation-menu.js.map +1 -0
  198. package/dist/components-ui-pagination-pagination.js +110 -0
  199. package/dist/components-ui-pagination-pagination.js.map +1 -0
  200. package/dist/components-ui-pagination.js +11 -0
  201. package/dist/components-ui-pagination.js.map +1 -0
  202. package/dist/components-ui-popover-popover.js +117 -0
  203. package/dist/components-ui-popover-popover.js.map +1 -0
  204. package/dist/components-ui-popover-popover.styles.js +13 -0
  205. package/dist/components-ui-popover-popover.styles.js.map +1 -0
  206. package/dist/components-ui-popover.js +11 -0
  207. package/dist/components-ui-popover.js.map +1 -0
  208. package/dist/components-ui-progress-progress.js +49 -0
  209. package/dist/components-ui-progress-progress.js.map +1 -0
  210. package/dist/components-ui-progress.js +5 -0
  211. package/dist/components-ui-progress.js.map +1 -0
  212. package/dist/components-ui-radio-group-radio-group.js +29 -0
  213. package/dist/components-ui-radio-group-radio-group.js.map +1 -0
  214. package/dist/components-ui-radio-group-radio-group.styles.js +23 -0
  215. package/dist/components-ui-radio-group-radio-group.styles.js.map +1 -0
  216. package/dist/components-ui-radio-group.js +6 -0
  217. package/dist/components-ui-radio-group.js.map +1 -0
  218. package/dist/components-ui-select-select.js +194 -0
  219. package/dist/components-ui-select-select.js.map +1 -0
  220. package/dist/components-ui-select-select.styles.js +43 -0
  221. package/dist/components-ui-select-select.styles.js.map +1 -0
  222. package/dist/components-ui-select.js +14 -0
  223. package/dist/components-ui-select.js.map +1 -0
  224. package/dist/components-ui-separator-separator.js +29 -0
  225. package/dist/components-ui-separator-separator.js.map +1 -0
  226. package/dist/components-ui-separator.js +5 -0
  227. package/dist/components-ui-separator.js.map +1 -0
  228. package/dist/components-ui-sonner-sonner.cjs +1 -1
  229. package/dist/components-ui-sonner-sonner.cjs.map +1 -1
  230. package/dist/components-ui-sonner-sonner.js +72 -0
  231. package/dist/components-ui-sonner-sonner.js.map +1 -0
  232. package/dist/components-ui-sonner-sonner.styles.js +42 -0
  233. package/dist/components-ui-sonner-sonner.styles.js.map +1 -0
  234. package/dist/components-ui-sonner.cjs +1 -1
  235. package/dist/components-ui-sonner.js +7 -0
  236. package/dist/components-ui-sonner.js.map +1 -0
  237. package/dist/components-ui-switch-switch.js +19 -0
  238. package/dist/components-ui-switch-switch.js.map +1 -0
  239. package/dist/components-ui-switch-switch.styles.js +22 -0
  240. package/dist/components-ui-switch-switch.styles.js.map +1 -0
  241. package/dist/components-ui-switch.js +5 -0
  242. package/dist/components-ui-switch.js.map +1 -0
  243. package/dist/components-ui-table-table.js +130 -0
  244. package/dist/components-ui-table-table.js.map +1 -0
  245. package/dist/components-ui-table.js +12 -0
  246. package/dist/components-ui-table.js.map +1 -0
  247. package/dist/components-ui-tabs-tabs.js +62 -0
  248. package/dist/components-ui-tabs-tabs.js.map +1 -0
  249. package/dist/components-ui-tabs-tabs.styles.js +64 -0
  250. package/dist/components-ui-tabs-tabs.styles.js.map +1 -0
  251. package/dist/components-ui-tabs.js +8 -0
  252. package/dist/components-ui-tabs.js.map +1 -0
  253. package/dist/components-ui-textarea-textarea.js +16 -0
  254. package/dist/components-ui-textarea-textarea.js.map +1 -0
  255. package/dist/components-ui-textarea-textarea.styles.js +13 -0
  256. package/dist/components-ui-textarea-textarea.styles.js.map +1 -0
  257. package/dist/components-ui-textarea.js +5 -0
  258. package/dist/components-ui-textarea.js.map +1 -0
  259. package/dist/components-ui-tooltip-tooltip.js +28 -0
  260. package/dist/components-ui-tooltip-tooltip.js.map +1 -0
  261. package/dist/components-ui-tooltip-tooltip.styles.js +11 -0
  262. package/dist/components-ui-tooltip-tooltip.styles.js.map +1 -0
  263. package/dist/components-ui-tooltip.js +9 -0
  264. package/dist/components-ui-tooltip.js.map +1 -0
  265. package/dist/components-ui-typography-typography.js +19 -0
  266. package/dist/components-ui-typography-typography.js.map +1 -0
  267. package/dist/components-ui-typography-typography.styles.js +85 -0
  268. package/dist/components-ui-typography-typography.styles.js.map +1 -0
  269. package/dist/components-ui-typography.js +9 -0
  270. package/dist/components-ui-typography.js.map +1 -0
  271. package/dist/hooks-usePopupControls.js +14 -0
  272. package/dist/hooks-usePopupControls.js.map +1 -0
  273. package/dist/index-B5Id-jNC.js +2830 -0
  274. package/dist/index-B5Id-jNC.js.map +1 -0
  275. package/dist/index-C4iHL8Gs.js +776 -0
  276. package/dist/index-C4iHL8Gs.js.map +1 -0
  277. package/dist/index-C6N9aMq_.js +1038 -0
  278. package/dist/index-C6N9aMq_.js.map +1 -0
  279. package/dist/index-D8y9Cogu.cjs +7 -0
  280. package/dist/index-D8y9Cogu.cjs.map +1 -0
  281. package/dist/index-DGxwh2Ms.cjs +2 -0
  282. package/dist/index-DGxwh2Ms.cjs.map +1 -0
  283. package/dist/index-fTTv8YY8.cjs +4 -0
  284. package/dist/index-fTTv8YY8.cjs.map +1 -0
  285. package/dist/index.cjs +1 -1
  286. package/dist/index.js +194 -0
  287. package/dist/index.js.map +1 -0
  288. package/dist/lib-utils.js +16 -0
  289. package/dist/lib-utils.js.map +1 -0
  290. package/dist/lodash-FemA_LCk.js +3688 -0
  291. package/dist/lodash-FemA_LCk.js.map +1 -0
  292. package/dist/lodash-kqhtUJfz.cjs +21 -0
  293. package/dist/lodash-kqhtUJfz.cjs.map +1 -0
  294. package/dist/types-types.js +2 -0
  295. package/dist/types-types.js.map +1 -0
  296. package/dist/utils-helpers.js +17 -0
  297. package/dist/utils-helpers.js.map +1 -0
  298. package/dist/with-selector-CNcGWQ-h.js +534 -0
  299. package/dist/with-selector-CNcGWQ-h.js.map +1 -0
  300. package/dist/with-selector-DSbfqgSY.cjs +8 -0
  301. package/dist/with-selector-DSbfqgSY.cjs.map +1 -0
  302. package/package.json +149 -379
  303. package/.githooks/pre-commit +0 -19
  304. package/.prettierignore +0 -13
  305. package/components.json +0 -25
  306. package/prettier.config.mjs +0 -28
  307. package/public/vite.svg +0 -1
  308. package/scripts/generate-exports.js +0 -76
  309. package/scripts/get-entry-points.ts +0 -102
  310. package/tsconfig.app.json +0 -40
  311. package/tsconfig.node.json +0 -26
  312. package/tsconfig.storybook.json +0 -7
@@ -0,0 +1,1961 @@
1
+ import { jsx as x, jsxs as ve } from "react/jsx-runtime";
2
+ import * as X from "react";
3
+ import { Table as _e, TableHeader as Fe, TableRow as O, TableHead as $e, TableBody as Ve, TableCell as ie } from "./components-ui-table-table.js";
4
+ import { cn as le } from "./lib-utils.js";
5
+ function I(e, o) {
6
+ return typeof e == "function" ? e(o) : e;
7
+ }
8
+ function $(e, o) {
9
+ return (t) => {
10
+ o.setState((n) => ({
11
+ ...n,
12
+ [e]: I(t, n[e])
13
+ }));
14
+ };
15
+ }
16
+ function z(e) {
17
+ return e instanceof Function;
18
+ }
19
+ function Me(e) {
20
+ return Array.isArray(e) && e.every((o) => typeof o == "number");
21
+ }
22
+ function xe(e, o) {
23
+ const t = [], n = (r) => {
24
+ r.forEach((i) => {
25
+ t.push(i);
26
+ const l = o(i);
27
+ l != null && l.length && n(l);
28
+ });
29
+ };
30
+ return n(e), t;
31
+ }
32
+ function S(e, o, t) {
33
+ let n = [], r;
34
+ return (i) => {
35
+ let l;
36
+ t.key && t.debug && (l = Date.now());
37
+ const u = e(i);
38
+ if (!(u.length !== n.length || u.some((f, m) => n[m] !== f)))
39
+ return r;
40
+ n = u;
41
+ let g;
42
+ if (t.key && t.debug && (g = Date.now()), r = o(...u), t == null || t.onChange == null || t.onChange(r), t.key && t.debug && t != null && t.debug()) {
43
+ const f = Math.round((Date.now() - l) * 100) / 100, m = Math.round((Date.now() - g) * 100) / 100, d = m / 16, s = (c, p) => {
44
+ for (c = String(c); c.length < p; )
45
+ c = " " + c;
46
+ return c;
47
+ };
48
+ console.info(`%c⏱ ${s(m, 5)} /${s(f, 5)} ms`, `
49
+ font-size: .6rem;
50
+ font-weight: bold;
51
+ color: hsl(${Math.max(0, Math.min(120 - 120 * d, 120))}deg 100% 31%);`, t?.key);
52
+ }
53
+ return r;
54
+ };
55
+ }
56
+ function C(e, o, t, n) {
57
+ return {
58
+ debug: () => {
59
+ var r;
60
+ return (r = e?.debugAll) != null ? r : e[o];
61
+ },
62
+ key: process.env.NODE_ENV === "development" && t,
63
+ onChange: n
64
+ };
65
+ }
66
+ function Pe(e, o, t, n) {
67
+ const r = () => {
68
+ var l;
69
+ return (l = i.getValue()) != null ? l : e.options.renderFallbackValue;
70
+ }, i = {
71
+ id: `${o.id}_${t.id}`,
72
+ row: o,
73
+ column: t,
74
+ getValue: () => o.getValue(n),
75
+ renderValue: r,
76
+ getContext: S(() => [e, t, o, i], (l, u, a, g) => ({
77
+ table: l,
78
+ column: u,
79
+ row: a,
80
+ cell: g,
81
+ getValue: g.getValue,
82
+ renderValue: g.renderValue
83
+ }), C(e.options, "debugCells", "cell.getContext"))
84
+ };
85
+ return e._features.forEach((l) => {
86
+ l.createCell == null || l.createCell(i, t, o, e);
87
+ }, {}), i;
88
+ }
89
+ function Ie(e, o, t, n) {
90
+ var r, i;
91
+ const u = {
92
+ ...e._getDefaultColumnDef(),
93
+ ...o
94
+ }, a = u.accessorKey;
95
+ let g = (r = (i = u.id) != null ? i : a ? typeof String.prototype.replaceAll == "function" ? a.replaceAll(".", "_") : a.replace(/\./g, "_") : void 0) != null ? r : typeof u.header == "string" ? u.header : void 0, f;
96
+ if (u.accessorFn ? f = u.accessorFn : a && (a.includes(".") ? f = (d) => {
97
+ let s = d;
98
+ for (const p of a.split(".")) {
99
+ var c;
100
+ s = (c = s) == null ? void 0 : c[p], process.env.NODE_ENV !== "production" && s === void 0 && console.warn(`"${p}" in deeply nested key "${a}" returned undefined.`);
101
+ }
102
+ return s;
103
+ } : f = (d) => d[u.accessorKey]), !g)
104
+ throw process.env.NODE_ENV !== "production" ? new Error(u.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
105
+ let m = {
106
+ id: `${String(g)}`,
107
+ accessorFn: f,
108
+ parent: n,
109
+ depth: t,
110
+ columnDef: u,
111
+ columns: [],
112
+ getFlatColumns: S(() => [!0], () => {
113
+ var d;
114
+ return [m, ...(d = m.columns) == null ? void 0 : d.flatMap((s) => s.getFlatColumns())];
115
+ }, C(e.options, "debugColumns", "column.getFlatColumns")),
116
+ getLeafColumns: S(() => [e._getOrderColumnsFn()], (d) => {
117
+ var s;
118
+ if ((s = m.columns) != null && s.length) {
119
+ let c = m.columns.flatMap((p) => p.getLeafColumns());
120
+ return d(c);
121
+ }
122
+ return [m];
123
+ }, C(e.options, "debugColumns", "column.getLeafColumns"))
124
+ };
125
+ for (const d of e._features)
126
+ d.createColumn == null || d.createColumn(m, e);
127
+ return m;
128
+ }
129
+ const _ = "debugHeaders";
130
+ function se(e, o, t) {
131
+ var n;
132
+ let i = {
133
+ id: (n = t.id) != null ? n : o.id,
134
+ column: o,
135
+ index: t.index,
136
+ isPlaceholder: !!t.isPlaceholder,
137
+ placeholderId: t.placeholderId,
138
+ depth: t.depth,
139
+ subHeaders: [],
140
+ colSpan: 0,
141
+ rowSpan: 0,
142
+ headerGroup: null,
143
+ getLeafHeaders: () => {
144
+ const l = [], u = (a) => {
145
+ a.subHeaders && a.subHeaders.length && a.subHeaders.map(u), l.push(a);
146
+ };
147
+ return u(i), l;
148
+ },
149
+ getContext: () => ({
150
+ table: e,
151
+ header: i,
152
+ column: o
153
+ })
154
+ };
155
+ return e._features.forEach((l) => {
156
+ l.createHeader == null || l.createHeader(i, e);
157
+ }), i;
158
+ }
159
+ const ye = {
160
+ createTable: (e) => {
161
+ e.getHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => {
162
+ var i, l;
163
+ const u = (i = n?.map((m) => t.find((d) => d.id === m)).filter(Boolean)) != null ? i : [], a = (l = r?.map((m) => t.find((d) => d.id === m)).filter(Boolean)) != null ? l : [], g = t.filter((m) => !(n != null && n.includes(m.id)) && !(r != null && r.includes(m.id)));
164
+ return G(o, [...u, ...g, ...a], e);
165
+ }, C(e.options, _, "getHeaderGroups")), e.getCenterHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n, r) => (t = t.filter((i) => !(n != null && n.includes(i.id)) && !(r != null && r.includes(i.id))), G(o, t, e, "center")), C(e.options, _, "getCenterHeaderGroups")), e.getLeftHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (o, t, n) => {
166
+ var r;
167
+ const i = (r = n?.map((l) => t.find((u) => u.id === l)).filter(Boolean)) != null ? r : [];
168
+ return G(o, i, e, "left");
169
+ }, C(e.options, _, "getLeftHeaderGroups")), e.getRightHeaderGroups = S(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (o, t, n) => {
170
+ var r;
171
+ const i = (r = n?.map((l) => t.find((u) => u.id === l)).filter(Boolean)) != null ? r : [];
172
+ return G(o, i, e, "right");
173
+ }, C(e.options, _, "getRightHeaderGroups")), e.getFooterGroups = S(() => [e.getHeaderGroups()], (o) => [...o].reverse(), C(e.options, _, "getFooterGroups")), e.getLeftFooterGroups = S(() => [e.getLeftHeaderGroups()], (o) => [...o].reverse(), C(e.options, _, "getLeftFooterGroups")), e.getCenterFooterGroups = S(() => [e.getCenterHeaderGroups()], (o) => [...o].reverse(), C(e.options, _, "getCenterFooterGroups")), e.getRightFooterGroups = S(() => [e.getRightHeaderGroups()], (o) => [...o].reverse(), C(e.options, _, "getRightFooterGroups")), e.getFlatHeaders = S(() => [e.getHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, _, "getFlatHeaders")), e.getLeftFlatHeaders = S(() => [e.getLeftHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, _, "getLeftFlatHeaders")), e.getCenterFlatHeaders = S(() => [e.getCenterHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, _, "getCenterFlatHeaders")), e.getRightFlatHeaders = S(() => [e.getRightHeaderGroups()], (o) => o.map((t) => t.headers).flat(), C(e.options, _, "getRightFlatHeaders")), e.getCenterLeafHeaders = S(() => [e.getCenterFlatHeaders()], (o) => o.filter((t) => {
174
+ var n;
175
+ return !((n = t.subHeaders) != null && n.length);
176
+ }), C(e.options, _, "getCenterLeafHeaders")), e.getLeftLeafHeaders = S(() => [e.getLeftFlatHeaders()], (o) => o.filter((t) => {
177
+ var n;
178
+ return !((n = t.subHeaders) != null && n.length);
179
+ }), C(e.options, _, "getLeftLeafHeaders")), e.getRightLeafHeaders = S(() => [e.getRightFlatHeaders()], (o) => o.filter((t) => {
180
+ var n;
181
+ return !((n = t.subHeaders) != null && n.length);
182
+ }), C(e.options, _, "getRightLeafHeaders")), e.getLeafHeaders = S(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (o, t, n) => {
183
+ var r, i, l, u, a, g;
184
+ return [...(r = (i = o[0]) == null ? void 0 : i.headers) != null ? r : [], ...(l = (u = t[0]) == null ? void 0 : u.headers) != null ? l : [], ...(a = (g = n[0]) == null ? void 0 : g.headers) != null ? a : []].map((f) => f.getLeafHeaders()).flat();
185
+ }, C(e.options, _, "getLeafHeaders"));
186
+ }
187
+ };
188
+ function G(e, o, t, n) {
189
+ var r, i;
190
+ let l = 0;
191
+ const u = function(d, s) {
192
+ s === void 0 && (s = 1), l = Math.max(l, s), d.filter((c) => c.getIsVisible()).forEach((c) => {
193
+ var p;
194
+ (p = c.columns) != null && p.length && u(c.columns, s + 1);
195
+ }, 0);
196
+ };
197
+ u(e);
198
+ let a = [];
199
+ const g = (d, s) => {
200
+ const c = {
201
+ depth: s,
202
+ id: [n, `${s}`].filter(Boolean).join("_"),
203
+ headers: []
204
+ }, p = [];
205
+ d.forEach((R) => {
206
+ const w = [...p].reverse()[0], h = R.column.depth === c.depth;
207
+ let v, M = !1;
208
+ if (h && R.column.parent ? v = R.column.parent : (v = R.column, M = !0), w && w?.column === v)
209
+ w.subHeaders.push(R);
210
+ else {
211
+ const F = se(t, v, {
212
+ id: [n, s, v.id, R?.id].filter(Boolean).join("_"),
213
+ isPlaceholder: M,
214
+ placeholderId: M ? `${p.filter((E) => E.column === v).length}` : void 0,
215
+ depth: s,
216
+ index: p.length
217
+ });
218
+ F.subHeaders.push(R), p.push(F);
219
+ }
220
+ c.headers.push(R), R.headerGroup = c;
221
+ }), a.push(c), s > 0 && g(p, s - 1);
222
+ }, f = o.map((d, s) => se(t, d, {
223
+ depth: l,
224
+ index: s
225
+ }));
226
+ g(f, l - 1), a.reverse();
227
+ const m = (d) => d.filter((c) => c.column.getIsVisible()).map((c) => {
228
+ let p = 0, R = 0, w = [0];
229
+ c.subHeaders && c.subHeaders.length ? (w = [], m(c.subHeaders).forEach((v) => {
230
+ let {
231
+ colSpan: M,
232
+ rowSpan: F
233
+ } = v;
234
+ p += M, w.push(F);
235
+ })) : p = 1;
236
+ const h = Math.min(...w);
237
+ return R = R + h, c.colSpan = p, c.rowSpan = R, {
238
+ colSpan: p,
239
+ rowSpan: R
240
+ };
241
+ });
242
+ return m((r = (i = a[0]) == null ? void 0 : i.headers) != null ? r : []), a;
243
+ }
244
+ const Z = (e, o, t, n, r, i, l) => {
245
+ let u = {
246
+ id: o,
247
+ index: n,
248
+ original: t,
249
+ depth: r,
250
+ parentId: l,
251
+ _valuesCache: {},
252
+ _uniqueValuesCache: {},
253
+ getValue: (a) => {
254
+ if (u._valuesCache.hasOwnProperty(a))
255
+ return u._valuesCache[a];
256
+ const g = e.getColumn(a);
257
+ if (g != null && g.accessorFn)
258
+ return u._valuesCache[a] = g.accessorFn(u.original, n), u._valuesCache[a];
259
+ },
260
+ getUniqueValues: (a) => {
261
+ if (u._uniqueValuesCache.hasOwnProperty(a))
262
+ return u._uniqueValuesCache[a];
263
+ const g = e.getColumn(a);
264
+ if (g != null && g.accessorFn)
265
+ return g.columnDef.getUniqueValues ? (u._uniqueValuesCache[a] = g.columnDef.getUniqueValues(u.original, n), u._uniqueValuesCache[a]) : (u._uniqueValuesCache[a] = [u.getValue(a)], u._uniqueValuesCache[a]);
266
+ },
267
+ renderValue: (a) => {
268
+ var g;
269
+ return (g = u.getValue(a)) != null ? g : e.options.renderFallbackValue;
270
+ },
271
+ subRows: [],
272
+ getLeafRows: () => xe(u.subRows, (a) => a.subRows),
273
+ getParentRow: () => u.parentId ? e.getRow(u.parentId, !0) : void 0,
274
+ getParentRows: () => {
275
+ let a = [], g = u;
276
+ for (; ; ) {
277
+ const f = g.getParentRow();
278
+ if (!f) break;
279
+ a.push(f), g = f;
280
+ }
281
+ return a.reverse();
282
+ },
283
+ getAllCells: S(() => [e.getAllLeafColumns()], (a) => a.map((g) => Pe(e, u, g, g.id)), C(e.options, "debugRows", "getAllCells")),
284
+ _getAllCellsByColumnId: S(() => [u.getAllCells()], (a) => a.reduce((g, f) => (g[f.column.id] = f, g), {}), C(e.options, "debugRows", "getAllCellsByColumnId"))
285
+ };
286
+ for (let a = 0; a < e._features.length; a++) {
287
+ const g = e._features[a];
288
+ g == null || g.createRow == null || g.createRow(u, e);
289
+ }
290
+ return u;
291
+ }, Ee = {
292
+ createColumn: (e, o) => {
293
+ e._getFacetedRowModel = o.options.getFacetedRowModel && o.options.getFacetedRowModel(o, e.id), e.getFacetedRowModel = () => e._getFacetedRowModel ? e._getFacetedRowModel() : o.getPreFilteredRowModel(), e._getFacetedUniqueValues = o.options.getFacetedUniqueValues && o.options.getFacetedUniqueValues(o, e.id), e.getFacetedUniqueValues = () => e._getFacetedUniqueValues ? e._getFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getFacetedMinMaxValues = o.options.getFacetedMinMaxValues && o.options.getFacetedMinMaxValues(o, e.id), e.getFacetedMinMaxValues = () => {
294
+ if (e._getFacetedMinMaxValues)
295
+ return e._getFacetedMinMaxValues();
296
+ };
297
+ }
298
+ }, ge = (e, o, t) => {
299
+ var n, r;
300
+ const i = t == null || (n = t.toString()) == null ? void 0 : n.toLowerCase();
301
+ return !!(!((r = e.getValue(o)) == null || (r = r.toString()) == null || (r = r.toLowerCase()) == null) && r.includes(i));
302
+ };
303
+ ge.autoRemove = (e) => V(e);
304
+ const de = (e, o, t) => {
305
+ var n;
306
+ return !!(!((n = e.getValue(o)) == null || (n = n.toString()) == null) && n.includes(t));
307
+ };
308
+ de.autoRemove = (e) => V(e);
309
+ const fe = (e, o, t) => {
310
+ var n;
311
+ return ((n = e.getValue(o)) == null || (n = n.toString()) == null ? void 0 : n.toLowerCase()) === t?.toLowerCase();
312
+ };
313
+ fe.autoRemove = (e) => V(e);
314
+ const ce = (e, o, t) => {
315
+ var n;
316
+ return (n = e.getValue(o)) == null ? void 0 : n.includes(t);
317
+ };
318
+ ce.autoRemove = (e) => V(e);
319
+ const pe = (e, o, t) => !t.some((n) => {
320
+ var r;
321
+ return !((r = e.getValue(o)) != null && r.includes(n));
322
+ });
323
+ pe.autoRemove = (e) => V(e) || !(e != null && e.length);
324
+ const me = (e, o, t) => t.some((n) => {
325
+ var r;
326
+ return (r = e.getValue(o)) == null ? void 0 : r.includes(n);
327
+ });
328
+ me.autoRemove = (e) => V(e) || !(e != null && e.length);
329
+ const Se = (e, o, t) => e.getValue(o) === t;
330
+ Se.autoRemove = (e) => V(e);
331
+ const Ce = (e, o, t) => e.getValue(o) == t;
332
+ Ce.autoRemove = (e) => V(e);
333
+ const b = (e, o, t) => {
334
+ let [n, r] = t;
335
+ const i = e.getValue(o);
336
+ return i >= n && i <= r;
337
+ };
338
+ b.resolveFilterValue = (e) => {
339
+ let [o, t] = e, n = typeof o != "number" ? parseFloat(o) : o, r = typeof t != "number" ? parseFloat(t) : t, i = o === null || Number.isNaN(n) ? -1 / 0 : n, l = t === null || Number.isNaN(r) ? 1 / 0 : r;
340
+ if (i > l) {
341
+ const u = i;
342
+ i = l, l = u;
343
+ }
344
+ return [i, l];
345
+ };
346
+ b.autoRemove = (e) => V(e) || V(e[0]) && V(e[1]);
347
+ const P = {
348
+ includesString: ge,
349
+ includesStringSensitive: de,
350
+ equalsString: fe,
351
+ arrIncludes: ce,
352
+ arrIncludesAll: pe,
353
+ arrIncludesSome: me,
354
+ equals: Se,
355
+ weakEquals: Ce,
356
+ inNumberRange: b
357
+ };
358
+ function V(e) {
359
+ return e == null || e === "";
360
+ }
361
+ const De = {
362
+ getDefaultColumnDef: () => ({
363
+ filterFn: "auto"
364
+ }),
365
+ getInitialState: (e) => ({
366
+ columnFilters: [],
367
+ ...e
368
+ }),
369
+ getDefaultOptions: (e) => ({
370
+ onColumnFiltersChange: $("columnFilters", e),
371
+ filterFromLeafRows: !1,
372
+ maxLeafRowFilterDepth: 100
373
+ }),
374
+ createColumn: (e, o) => {
375
+ e.getAutoFilterFn = () => {
376
+ const t = o.getCoreRowModel().flatRows[0], n = t?.getValue(e.id);
377
+ return typeof n == "string" ? P.includesString : typeof n == "number" ? P.inNumberRange : typeof n == "boolean" || n !== null && typeof n == "object" ? P.equals : Array.isArray(n) ? P.arrIncludes : P.weakEquals;
378
+ }, e.getFilterFn = () => {
379
+ var t, n;
380
+ return z(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
381
+ // @ts-ignore
382
+ (t = (n = o.options.filterFns) == null ? void 0 : n[e.columnDef.filterFn]) != null ? t : P[e.columnDef.filterFn]
383
+ );
384
+ }, e.getCanFilter = () => {
385
+ var t, n, r;
386
+ return ((t = e.columnDef.enableColumnFilter) != null ? t : !0) && ((n = o.options.enableColumnFilters) != null ? n : !0) && ((r = o.options.enableFilters) != null ? r : !0) && !!e.accessorFn;
387
+ }, e.getIsFiltered = () => e.getFilterIndex() > -1, e.getFilterValue = () => {
388
+ var t;
389
+ return (t = o.getState().columnFilters) == null || (t = t.find((n) => n.id === e.id)) == null ? void 0 : t.value;
390
+ }, e.getFilterIndex = () => {
391
+ var t, n;
392
+ return (t = (n = o.getState().columnFilters) == null ? void 0 : n.findIndex((r) => r.id === e.id)) != null ? t : -1;
393
+ }, e.setFilterValue = (t) => {
394
+ o.setColumnFilters((n) => {
395
+ const r = e.getFilterFn(), i = n?.find((f) => f.id === e.id), l = I(t, i ? i.value : void 0);
396
+ if (ue(r, l, e)) {
397
+ var u;
398
+ return (u = n?.filter((f) => f.id !== e.id)) != null ? u : [];
399
+ }
400
+ const a = {
401
+ id: e.id,
402
+ value: l
403
+ };
404
+ if (i) {
405
+ var g;
406
+ return (g = n?.map((f) => f.id === e.id ? a : f)) != null ? g : [];
407
+ }
408
+ return n != null && n.length ? [...n, a] : [a];
409
+ });
410
+ };
411
+ },
412
+ createRow: (e, o) => {
413
+ e.columnFilters = {}, e.columnFiltersMeta = {};
414
+ },
415
+ createTable: (e) => {
416
+ e.setColumnFilters = (o) => {
417
+ const t = e.getAllLeafColumns(), n = (r) => {
418
+ var i;
419
+ return (i = I(o, r)) == null ? void 0 : i.filter((l) => {
420
+ const u = t.find((a) => a.id === l.id);
421
+ if (u) {
422
+ const a = u.getFilterFn();
423
+ if (ue(a, l.value, u))
424
+ return !1;
425
+ }
426
+ return !0;
427
+ });
428
+ };
429
+ e.options.onColumnFiltersChange == null || e.options.onColumnFiltersChange(n);
430
+ }, e.resetColumnFilters = (o) => {
431
+ var t, n;
432
+ e.setColumnFilters(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.columnFilters) != null ? t : []);
433
+ }, e.getPreFilteredRowModel = () => e.getCoreRowModel(), e.getFilteredRowModel = () => (!e._getFilteredRowModel && e.options.getFilteredRowModel && (e._getFilteredRowModel = e.options.getFilteredRowModel(e)), e.options.manualFiltering || !e._getFilteredRowModel ? e.getPreFilteredRowModel() : e._getFilteredRowModel());
434
+ }
435
+ };
436
+ function ue(e, o, t) {
437
+ return (e && e.autoRemove ? e.autoRemove(o, t) : !1) || typeof o > "u" || typeof o == "string" && !o;
438
+ }
439
+ const He = (e, o, t) => t.reduce((n, r) => {
440
+ const i = r.getValue(e);
441
+ return n + (typeof i == "number" ? i : 0);
442
+ }, 0), Ge = (e, o, t) => {
443
+ let n;
444
+ return t.forEach((r) => {
445
+ const i = r.getValue(e);
446
+ i != null && (n > i || n === void 0 && i >= i) && (n = i);
447
+ }), n;
448
+ }, Le = (e, o, t) => {
449
+ let n;
450
+ return t.forEach((r) => {
451
+ const i = r.getValue(e);
452
+ i != null && (n < i || n === void 0 && i >= i) && (n = i);
453
+ }), n;
454
+ }, Ae = (e, o, t) => {
455
+ let n, r;
456
+ return t.forEach((i) => {
457
+ const l = i.getValue(e);
458
+ l != null && (n === void 0 ? l >= l && (n = r = l) : (n > l && (n = l), r < l && (r = l)));
459
+ }), [n, r];
460
+ }, ze = (e, o) => {
461
+ let t = 0, n = 0;
462
+ if (o.forEach((r) => {
463
+ let i = r.getValue(e);
464
+ i != null && (i = +i) >= i && (++t, n += i);
465
+ }), t) return n / t;
466
+ }, Oe = (e, o) => {
467
+ if (!o.length)
468
+ return;
469
+ const t = o.map((i) => i.getValue(e));
470
+ if (!Me(t))
471
+ return;
472
+ if (t.length === 1)
473
+ return t[0];
474
+ const n = Math.floor(t.length / 2), r = t.sort((i, l) => i - l);
475
+ return t.length % 2 !== 0 ? r[n] : (r[n - 1] + r[n]) / 2;
476
+ }, Be = (e, o) => Array.from(new Set(o.map((t) => t.getValue(e))).values()), Te = (e, o) => new Set(o.map((t) => t.getValue(e))).size, Ne = (e, o) => o.length, B = {
477
+ sum: He,
478
+ min: Ge,
479
+ max: Le,
480
+ extent: Ae,
481
+ mean: ze,
482
+ median: Oe,
483
+ unique: Be,
484
+ uniqueCount: Te,
485
+ count: Ne
486
+ }, qe = {
487
+ getDefaultColumnDef: () => ({
488
+ aggregatedCell: (e) => {
489
+ var o, t;
490
+ return (o = (t = e.getValue()) == null || t.toString == null ? void 0 : t.toString()) != null ? o : null;
491
+ },
492
+ aggregationFn: "auto"
493
+ }),
494
+ getInitialState: (e) => ({
495
+ grouping: [],
496
+ ...e
497
+ }),
498
+ getDefaultOptions: (e) => ({
499
+ onGroupingChange: $("grouping", e),
500
+ groupedColumnMode: "reorder"
501
+ }),
502
+ createColumn: (e, o) => {
503
+ e.toggleGrouping = () => {
504
+ o.setGrouping((t) => t != null && t.includes(e.id) ? t.filter((n) => n !== e.id) : [...t ?? [], e.id]);
505
+ }, e.getCanGroup = () => {
506
+ var t, n;
507
+ return ((t = e.columnDef.enableGrouping) != null ? t : !0) && ((n = o.options.enableGrouping) != null ? n : !0) && (!!e.accessorFn || !!e.columnDef.getGroupingValue);
508
+ }, e.getIsGrouped = () => {
509
+ var t;
510
+ return (t = o.getState().grouping) == null ? void 0 : t.includes(e.id);
511
+ }, e.getGroupedIndex = () => {
512
+ var t;
513
+ return (t = o.getState().grouping) == null ? void 0 : t.indexOf(e.id);
514
+ }, e.getToggleGroupingHandler = () => {
515
+ const t = e.getCanGroup();
516
+ return () => {
517
+ t && e.toggleGrouping();
518
+ };
519
+ }, e.getAutoAggregationFn = () => {
520
+ const t = o.getCoreRowModel().flatRows[0], n = t?.getValue(e.id);
521
+ if (typeof n == "number")
522
+ return B.sum;
523
+ if (Object.prototype.toString.call(n) === "[object Date]")
524
+ return B.extent;
525
+ }, e.getAggregationFn = () => {
526
+ var t, n;
527
+ if (!e)
528
+ throw new Error();
529
+ return z(e.columnDef.aggregationFn) ? e.columnDef.aggregationFn : e.columnDef.aggregationFn === "auto" ? e.getAutoAggregationFn() : (t = (n = o.options.aggregationFns) == null ? void 0 : n[e.columnDef.aggregationFn]) != null ? t : B[e.columnDef.aggregationFn];
530
+ };
531
+ },
532
+ createTable: (e) => {
533
+ e.setGrouping = (o) => e.options.onGroupingChange == null ? void 0 : e.options.onGroupingChange(o), e.resetGrouping = (o) => {
534
+ var t, n;
535
+ e.setGrouping(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.grouping) != null ? t : []);
536
+ }, e.getPreGroupedRowModel = () => e.getFilteredRowModel(), e.getGroupedRowModel = () => (!e._getGroupedRowModel && e.options.getGroupedRowModel && (e._getGroupedRowModel = e.options.getGroupedRowModel(e)), e.options.manualGrouping || !e._getGroupedRowModel ? e.getPreGroupedRowModel() : e._getGroupedRowModel());
537
+ },
538
+ createRow: (e, o) => {
539
+ e.getIsGrouped = () => !!e.groupingColumnId, e.getGroupingValue = (t) => {
540
+ if (e._groupingValuesCache.hasOwnProperty(t))
541
+ return e._groupingValuesCache[t];
542
+ const n = o.getColumn(t);
543
+ return n != null && n.columnDef.getGroupingValue ? (e._groupingValuesCache[t] = n.columnDef.getGroupingValue(e.original), e._groupingValuesCache[t]) : e.getValue(t);
544
+ }, e._groupingValuesCache = {};
545
+ },
546
+ createCell: (e, o, t, n) => {
547
+ e.getIsGrouped = () => o.getIsGrouped() && o.id === t.groupingColumnId, e.getIsPlaceholder = () => !e.getIsGrouped() && o.getIsGrouped(), e.getIsAggregated = () => {
548
+ var r;
549
+ return !e.getIsGrouped() && !e.getIsPlaceholder() && !!((r = t.subRows) != null && r.length);
550
+ };
551
+ }
552
+ };
553
+ function ke(e, o, t) {
554
+ if (!(o != null && o.length) || !t)
555
+ return e;
556
+ const n = e.filter((i) => !o.includes(i.id));
557
+ return t === "remove" ? n : [...o.map((i) => e.find((l) => l.id === i)).filter(Boolean), ...n];
558
+ }
559
+ const je = {
560
+ getInitialState: (e) => ({
561
+ columnOrder: [],
562
+ ...e
563
+ }),
564
+ getDefaultOptions: (e) => ({
565
+ onColumnOrderChange: $("columnOrder", e)
566
+ }),
567
+ createColumn: (e, o) => {
568
+ e.getIndex = S((t) => [H(o, t)], (t) => t.findIndex((n) => n.id === e.id), C(o.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
569
+ var n;
570
+ return ((n = H(o, t)[0]) == null ? void 0 : n.id) === e.id;
571
+ }, e.getIsLastColumn = (t) => {
572
+ var n;
573
+ const r = H(o, t);
574
+ return ((n = r[r.length - 1]) == null ? void 0 : n.id) === e.id;
575
+ };
576
+ },
577
+ createTable: (e) => {
578
+ e.setColumnOrder = (o) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(o), e.resetColumnOrder = (o) => {
579
+ var t;
580
+ e.setColumnOrder(o ? [] : (t = e.initialState.columnOrder) != null ? t : []);
581
+ }, e._getOrderColumnsFn = S(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (o, t, n) => (r) => {
582
+ let i = [];
583
+ if (!(o != null && o.length))
584
+ i = r;
585
+ else {
586
+ const l = [...o], u = [...r];
587
+ for (; u.length && l.length; ) {
588
+ const a = l.shift(), g = u.findIndex((f) => f.id === a);
589
+ g > -1 && i.push(u.splice(g, 1)[0]);
590
+ }
591
+ i = [...i, ...u];
592
+ }
593
+ return ke(i, t, n);
594
+ }, C(e.options, "debugTable", "_getOrderColumnsFn"));
595
+ }
596
+ }, T = () => ({
597
+ left: [],
598
+ right: []
599
+ }), Ue = {
600
+ getInitialState: (e) => ({
601
+ columnPinning: T(),
602
+ ...e
603
+ }),
604
+ getDefaultOptions: (e) => ({
605
+ onColumnPinningChange: $("columnPinning", e)
606
+ }),
607
+ createColumn: (e, o) => {
608
+ e.pin = (t) => {
609
+ const n = e.getLeafColumns().map((r) => r.id).filter(Boolean);
610
+ o.setColumnPinning((r) => {
611
+ var i, l;
612
+ if (t === "right") {
613
+ var u, a;
614
+ return {
615
+ left: ((u = r?.left) != null ? u : []).filter((m) => !(n != null && n.includes(m))),
616
+ right: [...((a = r?.right) != null ? a : []).filter((m) => !(n != null && n.includes(m))), ...n]
617
+ };
618
+ }
619
+ if (t === "left") {
620
+ var g, f;
621
+ return {
622
+ left: [...((g = r?.left) != null ? g : []).filter((m) => !(n != null && n.includes(m))), ...n],
623
+ right: ((f = r?.right) != null ? f : []).filter((m) => !(n != null && n.includes(m)))
624
+ };
625
+ }
626
+ return {
627
+ left: ((i = r?.left) != null ? i : []).filter((m) => !(n != null && n.includes(m))),
628
+ right: ((l = r?.right) != null ? l : []).filter((m) => !(n != null && n.includes(m)))
629
+ };
630
+ });
631
+ }, e.getCanPin = () => e.getLeafColumns().some((n) => {
632
+ var r, i, l;
633
+ return ((r = n.columnDef.enablePinning) != null ? r : !0) && ((i = (l = o.options.enableColumnPinning) != null ? l : o.options.enablePinning) != null ? i : !0);
634
+ }), e.getIsPinned = () => {
635
+ const t = e.getLeafColumns().map((u) => u.id), {
636
+ left: n,
637
+ right: r
638
+ } = o.getState().columnPinning, i = t.some((u) => n?.includes(u)), l = t.some((u) => r?.includes(u));
639
+ return i ? "left" : l ? "right" : !1;
640
+ }, e.getPinnedIndex = () => {
641
+ var t, n;
642
+ const r = e.getIsPinned();
643
+ return r ? (t = (n = o.getState().columnPinning) == null || (n = n[r]) == null ? void 0 : n.indexOf(e.id)) != null ? t : -1 : 0;
644
+ };
645
+ },
646
+ createRow: (e, o) => {
647
+ e.getCenterVisibleCells = S(() => [e._getAllVisibleCells(), o.getState().columnPinning.left, o.getState().columnPinning.right], (t, n, r) => {
648
+ const i = [...n ?? [], ...r ?? []];
649
+ return t.filter((l) => !i.includes(l.column.id));
650
+ }, C(o.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = S(() => [e._getAllVisibleCells(), o.getState().columnPinning.left], (t, n) => (n ?? []).map((i) => t.find((l) => l.column.id === i)).filter(Boolean).map((i) => ({
651
+ ...i,
652
+ position: "left"
653
+ })), C(o.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = S(() => [e._getAllVisibleCells(), o.getState().columnPinning.right], (t, n) => (n ?? []).map((i) => t.find((l) => l.column.id === i)).filter(Boolean).map((i) => ({
654
+ ...i,
655
+ position: "right"
656
+ })), C(o.options, "debugRows", "getRightVisibleCells"));
657
+ },
658
+ createTable: (e) => {
659
+ e.setColumnPinning = (o) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(o), e.resetColumnPinning = (o) => {
660
+ var t, n;
661
+ return e.setColumnPinning(o ? T() : (t = (n = e.initialState) == null ? void 0 : n.columnPinning) != null ? t : T());
662
+ }, e.getIsSomeColumnsPinned = (o) => {
663
+ var t;
664
+ const n = e.getState().columnPinning;
665
+ if (!o) {
666
+ var r, i;
667
+ return !!((r = n.left) != null && r.length || (i = n.right) != null && i.length);
668
+ }
669
+ return !!((t = n[o]) != null && t.length);
670
+ }, e.getLeftLeafColumns = S(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), C(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = S(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (o, t) => (t ?? []).map((n) => o.find((r) => r.id === n)).filter(Boolean), C(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = S(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (o, t, n) => {
671
+ const r = [...t ?? [], ...n ?? []];
672
+ return o.filter((i) => !r.includes(i.id));
673
+ }, C(e.options, "debugColumns", "getCenterLeafColumns"));
674
+ }
675
+ };
676
+ function Xe(e) {
677
+ return e || (typeof document < "u" ? document : null);
678
+ }
679
+ const L = {
680
+ size: 150,
681
+ minSize: 20,
682
+ maxSize: Number.MAX_SAFE_INTEGER
683
+ }, N = () => ({
684
+ startOffset: null,
685
+ startSize: null,
686
+ deltaOffset: null,
687
+ deltaPercentage: null,
688
+ isResizingColumn: !1,
689
+ columnSizingStart: []
690
+ }), Ke = {
691
+ getDefaultColumnDef: () => L,
692
+ getInitialState: (e) => ({
693
+ columnSizing: {},
694
+ columnSizingInfo: N(),
695
+ ...e
696
+ }),
697
+ getDefaultOptions: (e) => ({
698
+ columnResizeMode: "onEnd",
699
+ columnResizeDirection: "ltr",
700
+ onColumnSizingChange: $("columnSizing", e),
701
+ onColumnSizingInfoChange: $("columnSizingInfo", e)
702
+ }),
703
+ createColumn: (e, o) => {
704
+ e.getSize = () => {
705
+ var t, n, r;
706
+ const i = o.getState().columnSizing[e.id];
707
+ return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : L.minSize, (n = i ?? e.columnDef.size) != null ? n : L.size), (r = e.columnDef.maxSize) != null ? r : L.maxSize);
708
+ }, e.getStart = S((t) => [t, H(o, t), o.getState().columnSizing], (t, n) => n.slice(0, e.getIndex(t)).reduce((r, i) => r + i.getSize(), 0), C(o.options, "debugColumns", "getStart")), e.getAfter = S((t) => [t, H(o, t), o.getState().columnSizing], (t, n) => n.slice(e.getIndex(t) + 1).reduce((r, i) => r + i.getSize(), 0), C(o.options, "debugColumns", "getAfter")), e.resetSize = () => {
709
+ o.setColumnSizing((t) => {
710
+ let {
711
+ [e.id]: n,
712
+ ...r
713
+ } = t;
714
+ return r;
715
+ });
716
+ }, e.getCanResize = () => {
717
+ var t, n;
718
+ return ((t = e.columnDef.enableResizing) != null ? t : !0) && ((n = o.options.enableColumnResizing) != null ? n : !0);
719
+ }, e.getIsResizing = () => o.getState().columnSizingInfo.isResizingColumn === e.id;
720
+ },
721
+ createHeader: (e, o) => {
722
+ e.getSize = () => {
723
+ let t = 0;
724
+ const n = (r) => {
725
+ if (r.subHeaders.length)
726
+ r.subHeaders.forEach(n);
727
+ else {
728
+ var i;
729
+ t += (i = r.column.getSize()) != null ? i : 0;
730
+ }
731
+ };
732
+ return n(e), t;
733
+ }, e.getStart = () => {
734
+ if (e.index > 0) {
735
+ const t = e.headerGroup.headers[e.index - 1];
736
+ return t.getStart() + t.getSize();
737
+ }
738
+ return 0;
739
+ }, e.getResizeHandler = (t) => {
740
+ const n = o.getColumn(e.column.id), r = n?.getCanResize();
741
+ return (i) => {
742
+ if (!n || !r || (i.persist == null || i.persist(), q(i) && i.touches && i.touches.length > 1))
743
+ return;
744
+ const l = e.getSize(), u = e ? e.getLeafHeaders().map((w) => [w.column.id, w.column.getSize()]) : [[n.id, n.getSize()]], a = q(i) ? Math.round(i.touches[0].clientX) : i.clientX, g = {}, f = (w, h) => {
745
+ typeof h == "number" && (o.setColumnSizingInfo((v) => {
746
+ var M, F;
747
+ const E = o.options.columnResizeDirection === "rtl" ? -1 : 1, ne = (h - ((M = v?.startOffset) != null ? M : 0)) * E, oe = Math.max(ne / ((F = v?.startSize) != null ? F : 0), -0.999999);
748
+ return v.columnSizingStart.forEach((we) => {
749
+ let [he, re] = we;
750
+ g[he] = Math.round(Math.max(re + re * oe, 0) * 100) / 100;
751
+ }), {
752
+ ...v,
753
+ deltaOffset: ne,
754
+ deltaPercentage: oe
755
+ };
756
+ }), (o.options.columnResizeMode === "onChange" || w === "end") && o.setColumnSizing((v) => ({
757
+ ...v,
758
+ ...g
759
+ })));
760
+ }, m = (w) => f("move", w), d = (w) => {
761
+ f("end", w), o.setColumnSizingInfo((h) => ({
762
+ ...h,
763
+ isResizingColumn: !1,
764
+ startOffset: null,
765
+ startSize: null,
766
+ deltaOffset: null,
767
+ deltaPercentage: null,
768
+ columnSizingStart: []
769
+ }));
770
+ }, s = Xe(t), c = {
771
+ moveHandler: (w) => m(w.clientX),
772
+ upHandler: (w) => {
773
+ s?.removeEventListener("mousemove", c.moveHandler), s?.removeEventListener("mouseup", c.upHandler), d(w.clientX);
774
+ }
775
+ }, p = {
776
+ moveHandler: (w) => (w.cancelable && (w.preventDefault(), w.stopPropagation()), m(w.touches[0].clientX), !1),
777
+ upHandler: (w) => {
778
+ var h;
779
+ s?.removeEventListener("touchmove", p.moveHandler), s?.removeEventListener("touchend", p.upHandler), w.cancelable && (w.preventDefault(), w.stopPropagation()), d((h = w.touches[0]) == null ? void 0 : h.clientX);
780
+ }
781
+ }, R = Je() ? {
782
+ passive: !1
783
+ } : !1;
784
+ q(i) ? (s?.addEventListener("touchmove", p.moveHandler, R), s?.addEventListener("touchend", p.upHandler, R)) : (s?.addEventListener("mousemove", c.moveHandler, R), s?.addEventListener("mouseup", c.upHandler, R)), o.setColumnSizingInfo((w) => ({
785
+ ...w,
786
+ startOffset: a,
787
+ startSize: l,
788
+ deltaOffset: 0,
789
+ deltaPercentage: 0,
790
+ columnSizingStart: u,
791
+ isResizingColumn: n.id
792
+ }));
793
+ };
794
+ };
795
+ },
796
+ createTable: (e) => {
797
+ e.setColumnSizing = (o) => e.options.onColumnSizingChange == null ? void 0 : e.options.onColumnSizingChange(o), e.setColumnSizingInfo = (o) => e.options.onColumnSizingInfoChange == null ? void 0 : e.options.onColumnSizingInfoChange(o), e.resetColumnSizing = (o) => {
798
+ var t;
799
+ e.setColumnSizing(o ? {} : (t = e.initialState.columnSizing) != null ? t : {});
800
+ }, e.resetHeaderSizeInfo = (o) => {
801
+ var t;
802
+ e.setColumnSizingInfo(o ? N() : (t = e.initialState.columnSizingInfo) != null ? t : N());
803
+ }, e.getTotalSize = () => {
804
+ var o, t;
805
+ return (o = (t = e.getHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
806
+ }, e.getLeftTotalSize = () => {
807
+ var o, t;
808
+ return (o = (t = e.getLeftHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
809
+ }, e.getCenterTotalSize = () => {
810
+ var o, t;
811
+ return (o = (t = e.getCenterHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
812
+ }, e.getRightTotalSize = () => {
813
+ var o, t;
814
+ return (o = (t = e.getRightHeaderGroups()[0]) == null ? void 0 : t.headers.reduce((n, r) => n + r.getSize(), 0)) != null ? o : 0;
815
+ };
816
+ }
817
+ };
818
+ let A = null;
819
+ function Je() {
820
+ if (typeof A == "boolean") return A;
821
+ let e = !1;
822
+ try {
823
+ const o = {
824
+ get passive() {
825
+ return e = !0, !1;
826
+ }
827
+ }, t = () => {
828
+ };
829
+ window.addEventListener("test", t, o), window.removeEventListener("test", t);
830
+ } catch {
831
+ e = !1;
832
+ }
833
+ return A = e, A;
834
+ }
835
+ function q(e) {
836
+ return e.type === "touchstart";
837
+ }
838
+ const Qe = {
839
+ getInitialState: (e) => ({
840
+ columnVisibility: {},
841
+ ...e
842
+ }),
843
+ getDefaultOptions: (e) => ({
844
+ onColumnVisibilityChange: $("columnVisibility", e)
845
+ }),
846
+ createColumn: (e, o) => {
847
+ e.toggleVisibility = (t) => {
848
+ e.getCanHide() && o.setColumnVisibility((n) => ({
849
+ ...n,
850
+ [e.id]: t ?? !e.getIsVisible()
851
+ }));
852
+ }, e.getIsVisible = () => {
853
+ var t, n;
854
+ const r = e.columns;
855
+ return (t = r.length ? r.some((i) => i.getIsVisible()) : (n = o.getState().columnVisibility) == null ? void 0 : n[e.id]) != null ? t : !0;
856
+ }, e.getCanHide = () => {
857
+ var t, n;
858
+ return ((t = e.columnDef.enableHiding) != null ? t : !0) && ((n = o.options.enableHiding) != null ? n : !0);
859
+ }, e.getToggleVisibilityHandler = () => (t) => {
860
+ e.toggleVisibility == null || e.toggleVisibility(t.target.checked);
861
+ };
862
+ },
863
+ createRow: (e, o) => {
864
+ e._getAllVisibleCells = S(() => [e.getAllCells(), o.getState().columnVisibility], (t) => t.filter((n) => n.column.getIsVisible()), C(o.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = S(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, n, r) => [...t, ...n, ...r], C(o.options, "debugRows", "getVisibleCells"));
865
+ },
866
+ createTable: (e) => {
867
+ const o = (t, n) => S(() => [n(), n().filter((r) => r.getIsVisible()).map((r) => r.id).join("_")], (r) => r.filter((i) => i.getIsVisible == null ? void 0 : i.getIsVisible()), C(e.options, "debugColumns", t));
868
+ e.getVisibleFlatColumns = o("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = o("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = o("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = o("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = o("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
869
+ var n;
870
+ e.setColumnVisibility(t ? {} : (n = e.initialState.columnVisibility) != null ? n : {});
871
+ }, e.toggleAllColumnsVisible = (t) => {
872
+ var n;
873
+ t = (n = t) != null ? n : !e.getIsAllColumnsVisible(), e.setColumnVisibility(e.getAllLeafColumns().reduce((r, i) => ({
874
+ ...r,
875
+ [i.id]: t || !(i.getCanHide != null && i.getCanHide())
876
+ }), {}));
877
+ }, e.getIsAllColumnsVisible = () => !e.getAllLeafColumns().some((t) => !(t.getIsVisible != null && t.getIsVisible())), e.getIsSomeColumnsVisible = () => e.getAllLeafColumns().some((t) => t.getIsVisible == null ? void 0 : t.getIsVisible()), e.getToggleAllColumnsVisibilityHandler = () => (t) => {
878
+ var n;
879
+ e.toggleAllColumnsVisible((n = t.target) == null ? void 0 : n.checked);
880
+ };
881
+ }
882
+ };
883
+ function H(e, o) {
884
+ return o ? o === "center" ? e.getCenterVisibleLeafColumns() : o === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
885
+ }
886
+ const We = {
887
+ createTable: (e) => {
888
+ e._getGlobalFacetedRowModel = e.options.getFacetedRowModel && e.options.getFacetedRowModel(e, "__global__"), e.getGlobalFacetedRowModel = () => e.options.manualFiltering || !e._getGlobalFacetedRowModel ? e.getPreFilteredRowModel() : e._getGlobalFacetedRowModel(), e._getGlobalFacetedUniqueValues = e.options.getFacetedUniqueValues && e.options.getFacetedUniqueValues(e, "__global__"), e.getGlobalFacetedUniqueValues = () => e._getGlobalFacetedUniqueValues ? e._getGlobalFacetedUniqueValues() : /* @__PURE__ */ new Map(), e._getGlobalFacetedMinMaxValues = e.options.getFacetedMinMaxValues && e.options.getFacetedMinMaxValues(e, "__global__"), e.getGlobalFacetedMinMaxValues = () => {
889
+ if (e._getGlobalFacetedMinMaxValues)
890
+ return e._getGlobalFacetedMinMaxValues();
891
+ };
892
+ }
893
+ }, Ye = {
894
+ getInitialState: (e) => ({
895
+ globalFilter: void 0,
896
+ ...e
897
+ }),
898
+ getDefaultOptions: (e) => ({
899
+ onGlobalFilterChange: $("globalFilter", e),
900
+ globalFilterFn: "auto",
901
+ getColumnCanGlobalFilter: (o) => {
902
+ var t;
903
+ const n = (t = e.getCoreRowModel().flatRows[0]) == null || (t = t._getAllCellsByColumnId()[o.id]) == null ? void 0 : t.getValue();
904
+ return typeof n == "string" || typeof n == "number";
905
+ }
906
+ }),
907
+ createColumn: (e, o) => {
908
+ e.getCanGlobalFilter = () => {
909
+ var t, n, r, i;
910
+ return ((t = e.columnDef.enableGlobalFilter) != null ? t : !0) && ((n = o.options.enableGlobalFilter) != null ? n : !0) && ((r = o.options.enableFilters) != null ? r : !0) && ((i = o.options.getColumnCanGlobalFilter == null ? void 0 : o.options.getColumnCanGlobalFilter(e)) != null ? i : !0) && !!e.accessorFn;
911
+ };
912
+ },
913
+ createTable: (e) => {
914
+ e.getGlobalAutoFilterFn = () => P.includesString, e.getGlobalFilterFn = () => {
915
+ var o, t;
916
+ const {
917
+ globalFilterFn: n
918
+ } = e.options;
919
+ return z(n) ? n : n === "auto" ? e.getGlobalAutoFilterFn() : (o = (t = e.options.filterFns) == null ? void 0 : t[n]) != null ? o : P[n];
920
+ }, e.setGlobalFilter = (o) => {
921
+ e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(o);
922
+ }, e.resetGlobalFilter = (o) => {
923
+ e.setGlobalFilter(o ? void 0 : e.initialState.globalFilter);
924
+ };
925
+ }
926
+ }, Ze = {
927
+ getInitialState: (e) => ({
928
+ expanded: {},
929
+ ...e
930
+ }),
931
+ getDefaultOptions: (e) => ({
932
+ onExpandedChange: $("expanded", e),
933
+ paginateExpandedRows: !0
934
+ }),
935
+ createTable: (e) => {
936
+ let o = !1, t = !1;
937
+ e._autoResetExpanded = () => {
938
+ var n, r;
939
+ if (!o) {
940
+ e._queue(() => {
941
+ o = !0;
942
+ });
943
+ return;
944
+ }
945
+ if ((n = (r = e.options.autoResetAll) != null ? r : e.options.autoResetExpanded) != null ? n : !e.options.manualExpanding) {
946
+ if (t) return;
947
+ t = !0, e._queue(() => {
948
+ e.resetExpanded(), t = !1;
949
+ });
950
+ }
951
+ }, e.setExpanded = (n) => e.options.onExpandedChange == null ? void 0 : e.options.onExpandedChange(n), e.toggleAllRowsExpanded = (n) => {
952
+ n ?? !e.getIsAllRowsExpanded() ? e.setExpanded(!0) : e.setExpanded({});
953
+ }, e.resetExpanded = (n) => {
954
+ var r, i;
955
+ e.setExpanded(n ? {} : (r = (i = e.initialState) == null ? void 0 : i.expanded) != null ? r : {});
956
+ }, e.getCanSomeRowsExpand = () => e.getPrePaginationRowModel().flatRows.some((n) => n.getCanExpand()), e.getToggleAllRowsExpandedHandler = () => (n) => {
957
+ n.persist == null || n.persist(), e.toggleAllRowsExpanded();
958
+ }, e.getIsSomeRowsExpanded = () => {
959
+ const n = e.getState().expanded;
960
+ return n === !0 || Object.values(n).some(Boolean);
961
+ }, e.getIsAllRowsExpanded = () => {
962
+ const n = e.getState().expanded;
963
+ return typeof n == "boolean" ? n === !0 : !(!Object.keys(n).length || e.getRowModel().flatRows.some((r) => !r.getIsExpanded()));
964
+ }, e.getExpandedDepth = () => {
965
+ let n = 0;
966
+ return (e.getState().expanded === !0 ? Object.keys(e.getRowModel().rowsById) : Object.keys(e.getState().expanded)).forEach((i) => {
967
+ const l = i.split(".");
968
+ n = Math.max(n, l.length);
969
+ }), n;
970
+ }, e.getPreExpandedRowModel = () => e.getSortedRowModel(), e.getExpandedRowModel = () => (!e._getExpandedRowModel && e.options.getExpandedRowModel && (e._getExpandedRowModel = e.options.getExpandedRowModel(e)), e.options.manualExpanding || !e._getExpandedRowModel ? e.getPreExpandedRowModel() : e._getExpandedRowModel());
971
+ },
972
+ createRow: (e, o) => {
973
+ e.toggleExpanded = (t) => {
974
+ o.setExpanded((n) => {
975
+ var r;
976
+ const i = n === !0 ? !0 : !!(n != null && n[e.id]);
977
+ let l = {};
978
+ if (n === !0 ? Object.keys(o.getRowModel().rowsById).forEach((u) => {
979
+ l[u] = !0;
980
+ }) : l = n, t = (r = t) != null ? r : !i, !i && t)
981
+ return {
982
+ ...l,
983
+ [e.id]: !0
984
+ };
985
+ if (i && !t) {
986
+ const {
987
+ [e.id]: u,
988
+ ...a
989
+ } = l;
990
+ return a;
991
+ }
992
+ return n;
993
+ });
994
+ }, e.getIsExpanded = () => {
995
+ var t;
996
+ const n = o.getState().expanded;
997
+ return !!((t = o.options.getIsRowExpanded == null ? void 0 : o.options.getIsRowExpanded(e)) != null ? t : n === !0 || n?.[e.id]);
998
+ }, e.getCanExpand = () => {
999
+ var t, n, r;
1000
+ return (t = o.options.getRowCanExpand == null ? void 0 : o.options.getRowCanExpand(e)) != null ? t : ((n = o.options.enableExpanding) != null ? n : !0) && !!((r = e.subRows) != null && r.length);
1001
+ }, e.getIsAllParentsExpanded = () => {
1002
+ let t = !0, n = e;
1003
+ for (; t && n.parentId; )
1004
+ n = o.getRow(n.parentId, !0), t = n.getIsExpanded();
1005
+ return t;
1006
+ }, e.getToggleExpandedHandler = () => {
1007
+ const t = e.getCanExpand();
1008
+ return () => {
1009
+ t && e.toggleExpanded();
1010
+ };
1011
+ };
1012
+ }
1013
+ }, K = 0, J = 10, k = () => ({
1014
+ pageIndex: K,
1015
+ pageSize: J
1016
+ }), be = {
1017
+ getInitialState: (e) => ({
1018
+ ...e,
1019
+ pagination: {
1020
+ ...k(),
1021
+ ...e?.pagination
1022
+ }
1023
+ }),
1024
+ getDefaultOptions: (e) => ({
1025
+ onPaginationChange: $("pagination", e)
1026
+ }),
1027
+ createTable: (e) => {
1028
+ let o = !1, t = !1;
1029
+ e._autoResetPageIndex = () => {
1030
+ var n, r;
1031
+ if (!o) {
1032
+ e._queue(() => {
1033
+ o = !0;
1034
+ });
1035
+ return;
1036
+ }
1037
+ if ((n = (r = e.options.autoResetAll) != null ? r : e.options.autoResetPageIndex) != null ? n : !e.options.manualPagination) {
1038
+ if (t) return;
1039
+ t = !0, e._queue(() => {
1040
+ e.resetPageIndex(), t = !1;
1041
+ });
1042
+ }
1043
+ }, e.setPagination = (n) => {
1044
+ const r = (i) => I(n, i);
1045
+ return e.options.onPaginationChange == null ? void 0 : e.options.onPaginationChange(r);
1046
+ }, e.resetPagination = (n) => {
1047
+ var r;
1048
+ e.setPagination(n ? k() : (r = e.initialState.pagination) != null ? r : k());
1049
+ }, e.setPageIndex = (n) => {
1050
+ e.setPagination((r) => {
1051
+ let i = I(n, r.pageIndex);
1052
+ const l = typeof e.options.pageCount > "u" || e.options.pageCount === -1 ? Number.MAX_SAFE_INTEGER : e.options.pageCount - 1;
1053
+ return i = Math.max(0, Math.min(i, l)), {
1054
+ ...r,
1055
+ pageIndex: i
1056
+ };
1057
+ });
1058
+ }, e.resetPageIndex = (n) => {
1059
+ var r, i;
1060
+ e.setPageIndex(n ? K : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageIndex) != null ? r : K);
1061
+ }, e.resetPageSize = (n) => {
1062
+ var r, i;
1063
+ e.setPageSize(n ? J : (r = (i = e.initialState) == null || (i = i.pagination) == null ? void 0 : i.pageSize) != null ? r : J);
1064
+ }, e.setPageSize = (n) => {
1065
+ e.setPagination((r) => {
1066
+ const i = Math.max(1, I(n, r.pageSize)), l = r.pageSize * r.pageIndex, u = Math.floor(l / i);
1067
+ return {
1068
+ ...r,
1069
+ pageIndex: u,
1070
+ pageSize: i
1071
+ };
1072
+ });
1073
+ }, e.setPageCount = (n) => e.setPagination((r) => {
1074
+ var i;
1075
+ let l = I(n, (i = e.options.pageCount) != null ? i : -1);
1076
+ return typeof l == "number" && (l = Math.max(-1, l)), {
1077
+ ...r,
1078
+ pageCount: l
1079
+ };
1080
+ }), e.getPageOptions = S(() => [e.getPageCount()], (n) => {
1081
+ let r = [];
1082
+ return n && n > 0 && (r = [...new Array(n)].fill(null).map((i, l) => l)), r;
1083
+ }, C(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
1084
+ const {
1085
+ pageIndex: n
1086
+ } = e.getState().pagination, r = e.getPageCount();
1087
+ return r === -1 ? !0 : r === 0 ? !1 : n < r - 1;
1088
+ }, e.previousPage = () => e.setPageIndex((n) => n - 1), e.nextPage = () => e.setPageIndex((n) => n + 1), e.firstPage = () => e.setPageIndex(0), e.lastPage = () => e.setPageIndex(e.getPageCount() - 1), e.getPrePaginationRowModel = () => e.getExpandedRowModel(), e.getPaginationRowModel = () => (!e._getPaginationRowModel && e.options.getPaginationRowModel && (e._getPaginationRowModel = e.options.getPaginationRowModel(e)), e.options.manualPagination || !e._getPaginationRowModel ? e.getPrePaginationRowModel() : e._getPaginationRowModel()), e.getPageCount = () => {
1089
+ var n;
1090
+ return (n = e.options.pageCount) != null ? n : Math.ceil(e.getRowCount() / e.getState().pagination.pageSize);
1091
+ }, e.getRowCount = () => {
1092
+ var n;
1093
+ return (n = e.options.rowCount) != null ? n : e.getPrePaginationRowModel().rows.length;
1094
+ };
1095
+ }
1096
+ }, j = () => ({
1097
+ top: [],
1098
+ bottom: []
1099
+ }), et = {
1100
+ getInitialState: (e) => ({
1101
+ rowPinning: j(),
1102
+ ...e
1103
+ }),
1104
+ getDefaultOptions: (e) => ({
1105
+ onRowPinningChange: $("rowPinning", e)
1106
+ }),
1107
+ createRow: (e, o) => {
1108
+ e.pin = (t, n, r) => {
1109
+ const i = n ? e.getLeafRows().map((a) => {
1110
+ let {
1111
+ id: g
1112
+ } = a;
1113
+ return g;
1114
+ }) : [], l = r ? e.getParentRows().map((a) => {
1115
+ let {
1116
+ id: g
1117
+ } = a;
1118
+ return g;
1119
+ }) : [], u = /* @__PURE__ */ new Set([...l, e.id, ...i]);
1120
+ o.setRowPinning((a) => {
1121
+ var g, f;
1122
+ if (t === "bottom") {
1123
+ var m, d;
1124
+ return {
1125
+ top: ((m = a?.top) != null ? m : []).filter((p) => !(u != null && u.has(p))),
1126
+ bottom: [...((d = a?.bottom) != null ? d : []).filter((p) => !(u != null && u.has(p))), ...Array.from(u)]
1127
+ };
1128
+ }
1129
+ if (t === "top") {
1130
+ var s, c;
1131
+ return {
1132
+ top: [...((s = a?.top) != null ? s : []).filter((p) => !(u != null && u.has(p))), ...Array.from(u)],
1133
+ bottom: ((c = a?.bottom) != null ? c : []).filter((p) => !(u != null && u.has(p)))
1134
+ };
1135
+ }
1136
+ return {
1137
+ top: ((g = a?.top) != null ? g : []).filter((p) => !(u != null && u.has(p))),
1138
+ bottom: ((f = a?.bottom) != null ? f : []).filter((p) => !(u != null && u.has(p)))
1139
+ };
1140
+ });
1141
+ }, e.getCanPin = () => {
1142
+ var t;
1143
+ const {
1144
+ enableRowPinning: n,
1145
+ enablePinning: r
1146
+ } = o.options;
1147
+ return typeof n == "function" ? n(e) : (t = n ?? r) != null ? t : !0;
1148
+ }, e.getIsPinned = () => {
1149
+ const t = [e.id], {
1150
+ top: n,
1151
+ bottom: r
1152
+ } = o.getState().rowPinning, i = t.some((u) => n?.includes(u)), l = t.some((u) => r?.includes(u));
1153
+ return i ? "top" : l ? "bottom" : !1;
1154
+ }, e.getPinnedIndex = () => {
1155
+ var t, n;
1156
+ const r = e.getIsPinned();
1157
+ if (!r) return -1;
1158
+ const i = (t = r === "top" ? o.getTopRows() : o.getBottomRows()) == null ? void 0 : t.map((l) => {
1159
+ let {
1160
+ id: u
1161
+ } = l;
1162
+ return u;
1163
+ });
1164
+ return (n = i?.indexOf(e.id)) != null ? n : -1;
1165
+ };
1166
+ },
1167
+ createTable: (e) => {
1168
+ e.setRowPinning = (o) => e.options.onRowPinningChange == null ? void 0 : e.options.onRowPinningChange(o), e.resetRowPinning = (o) => {
1169
+ var t, n;
1170
+ return e.setRowPinning(o ? j() : (t = (n = e.initialState) == null ? void 0 : n.rowPinning) != null ? t : j());
1171
+ }, e.getIsSomeRowsPinned = (o) => {
1172
+ var t;
1173
+ const n = e.getState().rowPinning;
1174
+ if (!o) {
1175
+ var r, i;
1176
+ return !!((r = n.top) != null && r.length || (i = n.bottom) != null && i.length);
1177
+ }
1178
+ return !!((t = n[o]) != null && t.length);
1179
+ }, e._getPinnedRows = (o, t, n) => {
1180
+ var r;
1181
+ return ((r = e.options.keepPinnedRows) == null || r ? (
1182
+ //get all rows that are pinned even if they would not be otherwise visible
1183
+ //account for expanded parent rows, but not pagination or filtering
1184
+ (t ?? []).map((l) => {
1185
+ const u = e.getRow(l, !0);
1186
+ return u.getIsAllParentsExpanded() ? u : null;
1187
+ })
1188
+ ) : (
1189
+ //else get only visible rows that are pinned
1190
+ (t ?? []).map((l) => o.find((u) => u.id === l))
1191
+ )).filter(Boolean).map((l) => ({
1192
+ ...l,
1193
+ position: n
1194
+ }));
1195
+ }, e.getTopRows = S(() => [e.getRowModel().rows, e.getState().rowPinning.top], (o, t) => e._getPinnedRows(o, t, "top"), C(e.options, "debugRows", "getTopRows")), e.getBottomRows = S(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (o, t) => e._getPinnedRows(o, t, "bottom"), C(e.options, "debugRows", "getBottomRows")), e.getCenterRows = S(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (o, t, n) => {
1196
+ const r = /* @__PURE__ */ new Set([...t ?? [], ...n ?? []]);
1197
+ return o.filter((i) => !r.has(i.id));
1198
+ }, C(e.options, "debugRows", "getCenterRows"));
1199
+ }
1200
+ }, tt = {
1201
+ getInitialState: (e) => ({
1202
+ rowSelection: {},
1203
+ ...e
1204
+ }),
1205
+ getDefaultOptions: (e) => ({
1206
+ onRowSelectionChange: $("rowSelection", e),
1207
+ enableRowSelection: !0,
1208
+ enableMultiRowSelection: !0,
1209
+ enableSubRowSelection: !0
1210
+ // enableGroupingRowSelection: false,
1211
+ // isAdditiveSelectEvent: (e: unknown) => !!e.metaKey,
1212
+ // isInclusiveSelectEvent: (e: unknown) => !!e.shiftKey,
1213
+ }),
1214
+ createTable: (e) => {
1215
+ e.setRowSelection = (o) => e.options.onRowSelectionChange == null ? void 0 : e.options.onRowSelectionChange(o), e.resetRowSelection = (o) => {
1216
+ var t;
1217
+ return e.setRowSelection(o ? {} : (t = e.initialState.rowSelection) != null ? t : {});
1218
+ }, e.toggleAllRowsSelected = (o) => {
1219
+ e.setRowSelection((t) => {
1220
+ o = typeof o < "u" ? o : !e.getIsAllRowsSelected();
1221
+ const n = {
1222
+ ...t
1223
+ }, r = e.getPreGroupedRowModel().flatRows;
1224
+ return o ? r.forEach((i) => {
1225
+ i.getCanSelect() && (n[i.id] = !0);
1226
+ }) : r.forEach((i) => {
1227
+ delete n[i.id];
1228
+ }), n;
1229
+ });
1230
+ }, e.toggleAllPageRowsSelected = (o) => e.setRowSelection((t) => {
1231
+ const n = typeof o < "u" ? o : !e.getIsAllPageRowsSelected(), r = {
1232
+ ...t
1233
+ };
1234
+ return e.getRowModel().rows.forEach((i) => {
1235
+ Q(r, i.id, n, !0, e);
1236
+ }), r;
1237
+ }), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = S(() => [e.getState().rowSelection, e.getCoreRowModel()], (o, t) => Object.keys(o).length ? U(e, t) : {
1238
+ rows: [],
1239
+ flatRows: [],
1240
+ rowsById: {}
1241
+ }, C(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = S(() => [e.getState().rowSelection, e.getFilteredRowModel()], (o, t) => Object.keys(o).length ? U(e, t) : {
1242
+ rows: [],
1243
+ flatRows: [],
1244
+ rowsById: {}
1245
+ }, C(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = S(() => [e.getState().rowSelection, e.getSortedRowModel()], (o, t) => Object.keys(o).length ? U(e, t) : {
1246
+ rows: [],
1247
+ flatRows: [],
1248
+ rowsById: {}
1249
+ }, C(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
1250
+ const o = e.getFilteredRowModel().flatRows, {
1251
+ rowSelection: t
1252
+ } = e.getState();
1253
+ let n = !!(o.length && Object.keys(t).length);
1254
+ return n && o.some((r) => r.getCanSelect() && !t[r.id]) && (n = !1), n;
1255
+ }, e.getIsAllPageRowsSelected = () => {
1256
+ const o = e.getPaginationRowModel().flatRows.filter((r) => r.getCanSelect()), {
1257
+ rowSelection: t
1258
+ } = e.getState();
1259
+ let n = !!o.length;
1260
+ return n && o.some((r) => !t[r.id]) && (n = !1), n;
1261
+ }, e.getIsSomeRowsSelected = () => {
1262
+ var o;
1263
+ const t = Object.keys((o = e.getState().rowSelection) != null ? o : {}).length;
1264
+ return t > 0 && t < e.getFilteredRowModel().flatRows.length;
1265
+ }, e.getIsSomePageRowsSelected = () => {
1266
+ const o = e.getPaginationRowModel().flatRows;
1267
+ return e.getIsAllPageRowsSelected() ? !1 : o.filter((t) => t.getCanSelect()).some((t) => t.getIsSelected() || t.getIsSomeSelected());
1268
+ }, e.getToggleAllRowsSelectedHandler = () => (o) => {
1269
+ e.toggleAllRowsSelected(o.target.checked);
1270
+ }, e.getToggleAllPageRowsSelectedHandler = () => (o) => {
1271
+ e.toggleAllPageRowsSelected(o.target.checked);
1272
+ };
1273
+ },
1274
+ createRow: (e, o) => {
1275
+ e.toggleSelected = (t, n) => {
1276
+ const r = e.getIsSelected();
1277
+ o.setRowSelection((i) => {
1278
+ var l;
1279
+ if (t = typeof t < "u" ? t : !r, e.getCanSelect() && r === t)
1280
+ return i;
1281
+ const u = {
1282
+ ...i
1283
+ };
1284
+ return Q(u, e.id, t, (l = n?.selectChildren) != null ? l : !0, o), u;
1285
+ });
1286
+ }, e.getIsSelected = () => {
1287
+ const {
1288
+ rowSelection: t
1289
+ } = o.getState();
1290
+ return ee(e, t);
1291
+ }, e.getIsSomeSelected = () => {
1292
+ const {
1293
+ rowSelection: t
1294
+ } = o.getState();
1295
+ return W(e, t) === "some";
1296
+ }, e.getIsAllSubRowsSelected = () => {
1297
+ const {
1298
+ rowSelection: t
1299
+ } = o.getState();
1300
+ return W(e, t) === "all";
1301
+ }, e.getCanSelect = () => {
1302
+ var t;
1303
+ return typeof o.options.enableRowSelection == "function" ? o.options.enableRowSelection(e) : (t = o.options.enableRowSelection) != null ? t : !0;
1304
+ }, e.getCanSelectSubRows = () => {
1305
+ var t;
1306
+ return typeof o.options.enableSubRowSelection == "function" ? o.options.enableSubRowSelection(e) : (t = o.options.enableSubRowSelection) != null ? t : !0;
1307
+ }, e.getCanMultiSelect = () => {
1308
+ var t;
1309
+ return typeof o.options.enableMultiRowSelection == "function" ? o.options.enableMultiRowSelection(e) : (t = o.options.enableMultiRowSelection) != null ? t : !0;
1310
+ }, e.getToggleSelectedHandler = () => {
1311
+ const t = e.getCanSelect();
1312
+ return (n) => {
1313
+ var r;
1314
+ t && e.toggleSelected((r = n.target) == null ? void 0 : r.checked);
1315
+ };
1316
+ };
1317
+ }
1318
+ }, Q = (e, o, t, n, r) => {
1319
+ var i;
1320
+ const l = r.getRow(o, !0);
1321
+ t ? (l.getCanMultiSelect() || Object.keys(e).forEach((u) => delete e[u]), l.getCanSelect() && (e[o] = !0)) : delete e[o], n && (i = l.subRows) != null && i.length && l.getCanSelectSubRows() && l.subRows.forEach((u) => Q(e, u.id, t, n, r));
1322
+ };
1323
+ function U(e, o) {
1324
+ const t = e.getState().rowSelection, n = [], r = {}, i = function(l, u) {
1325
+ return l.map((a) => {
1326
+ var g;
1327
+ const f = ee(a, t);
1328
+ if (f && (n.push(a), r[a.id] = a), (g = a.subRows) != null && g.length && (a = {
1329
+ ...a,
1330
+ subRows: i(a.subRows)
1331
+ }), f)
1332
+ return a;
1333
+ }).filter(Boolean);
1334
+ };
1335
+ return {
1336
+ rows: i(o.rows),
1337
+ flatRows: n,
1338
+ rowsById: r
1339
+ };
1340
+ }
1341
+ function ee(e, o) {
1342
+ var t;
1343
+ return (t = o[e.id]) != null ? t : !1;
1344
+ }
1345
+ function W(e, o, t) {
1346
+ var n;
1347
+ if (!((n = e.subRows) != null && n.length)) return !1;
1348
+ let r = !0, i = !1;
1349
+ return e.subRows.forEach((l) => {
1350
+ if (!(i && !r) && (l.getCanSelect() && (ee(l, o) ? i = !0 : r = !1), l.subRows && l.subRows.length)) {
1351
+ const u = W(l, o);
1352
+ u === "all" ? i = !0 : (u === "some" && (i = !0), r = !1);
1353
+ }
1354
+ }), r ? "all" : i ? "some" : !1;
1355
+ }
1356
+ const Y = /([0-9]+)/gm, nt = (e, o, t) => Re(y(e.getValue(t)).toLowerCase(), y(o.getValue(t)).toLowerCase()), ot = (e, o, t) => Re(y(e.getValue(t)), y(o.getValue(t))), rt = (e, o, t) => te(y(e.getValue(t)).toLowerCase(), y(o.getValue(t)).toLowerCase()), it = (e, o, t) => te(y(e.getValue(t)), y(o.getValue(t))), lt = (e, o, t) => {
1357
+ const n = e.getValue(t), r = o.getValue(t);
1358
+ return n > r ? 1 : n < r ? -1 : 0;
1359
+ }, st = (e, o, t) => te(e.getValue(t), o.getValue(t));
1360
+ function te(e, o) {
1361
+ return e === o ? 0 : e > o ? 1 : -1;
1362
+ }
1363
+ function y(e) {
1364
+ return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
1365
+ }
1366
+ function Re(e, o) {
1367
+ const t = e.split(Y).filter(Boolean), n = o.split(Y).filter(Boolean);
1368
+ for (; t.length && n.length; ) {
1369
+ const r = t.shift(), i = n.shift(), l = parseInt(r, 10), u = parseInt(i, 10), a = [l, u].sort();
1370
+ if (isNaN(a[0])) {
1371
+ if (r > i)
1372
+ return 1;
1373
+ if (i > r)
1374
+ return -1;
1375
+ continue;
1376
+ }
1377
+ if (isNaN(a[1]))
1378
+ return isNaN(l) ? -1 : 1;
1379
+ if (l > u)
1380
+ return 1;
1381
+ if (u > l)
1382
+ return -1;
1383
+ }
1384
+ return t.length - n.length;
1385
+ }
1386
+ const D = {
1387
+ alphanumeric: nt,
1388
+ alphanumericCaseSensitive: ot,
1389
+ text: rt,
1390
+ textCaseSensitive: it,
1391
+ datetime: lt,
1392
+ basic: st
1393
+ }, ut = {
1394
+ getInitialState: (e) => ({
1395
+ sorting: [],
1396
+ ...e
1397
+ }),
1398
+ getDefaultColumnDef: () => ({
1399
+ sortingFn: "auto",
1400
+ sortUndefined: 1
1401
+ }),
1402
+ getDefaultOptions: (e) => ({
1403
+ onSortingChange: $("sorting", e),
1404
+ isMultiSortEvent: (o) => o.shiftKey
1405
+ }),
1406
+ createColumn: (e, o) => {
1407
+ e.getAutoSortingFn = () => {
1408
+ const t = o.getFilteredRowModel().flatRows.slice(10);
1409
+ let n = !1;
1410
+ for (const r of t) {
1411
+ const i = r?.getValue(e.id);
1412
+ if (Object.prototype.toString.call(i) === "[object Date]")
1413
+ return D.datetime;
1414
+ if (typeof i == "string" && (n = !0, i.split(Y).length > 1))
1415
+ return D.alphanumeric;
1416
+ }
1417
+ return n ? D.text : D.basic;
1418
+ }, e.getAutoSortDir = () => {
1419
+ const t = o.getFilteredRowModel().flatRows[0];
1420
+ return typeof t?.getValue(e.id) == "string" ? "asc" : "desc";
1421
+ }, e.getSortingFn = () => {
1422
+ var t, n;
1423
+ if (!e)
1424
+ throw new Error();
1425
+ return z(e.columnDef.sortingFn) ? e.columnDef.sortingFn : e.columnDef.sortingFn === "auto" ? e.getAutoSortingFn() : (t = (n = o.options.sortingFns) == null ? void 0 : n[e.columnDef.sortingFn]) != null ? t : D[e.columnDef.sortingFn];
1426
+ }, e.toggleSorting = (t, n) => {
1427
+ const r = e.getNextSortingOrder(), i = typeof t < "u" && t !== null;
1428
+ o.setSorting((l) => {
1429
+ const u = l?.find((s) => s.id === e.id), a = l?.findIndex((s) => s.id === e.id);
1430
+ let g = [], f, m = i ? t : r === "desc";
1431
+ if (l != null && l.length && e.getCanMultiSort() && n ? u ? f = "toggle" : f = "add" : l != null && l.length && a !== l.length - 1 ? f = "replace" : u ? f = "toggle" : f = "replace", f === "toggle" && (i || r || (f = "remove")), f === "add") {
1432
+ var d;
1433
+ g = [...l, {
1434
+ id: e.id,
1435
+ desc: m
1436
+ }], g.splice(0, g.length - ((d = o.options.maxMultiSortColCount) != null ? d : Number.MAX_SAFE_INTEGER));
1437
+ } else f === "toggle" ? g = l.map((s) => s.id === e.id ? {
1438
+ ...s,
1439
+ desc: m
1440
+ } : s) : f === "remove" ? g = l.filter((s) => s.id !== e.id) : g = [{
1441
+ id: e.id,
1442
+ desc: m
1443
+ }];
1444
+ return g;
1445
+ });
1446
+ }, e.getFirstSortDir = () => {
1447
+ var t, n;
1448
+ return ((t = (n = e.columnDef.sortDescFirst) != null ? n : o.options.sortDescFirst) != null ? t : e.getAutoSortDir() === "desc") ? "desc" : "asc";
1449
+ }, e.getNextSortingOrder = (t) => {
1450
+ var n, r;
1451
+ const i = e.getFirstSortDir(), l = e.getIsSorted();
1452
+ return l ? l !== i && ((n = o.options.enableSortingRemoval) == null || n) && // If enableSortRemove, enable in general
1453
+ (!(t && (r = o.options.enableMultiRemove) != null) || r) ? !1 : l === "desc" ? "asc" : "desc" : i;
1454
+ }, e.getCanSort = () => {
1455
+ var t, n;
1456
+ return ((t = e.columnDef.enableSorting) != null ? t : !0) && ((n = o.options.enableSorting) != null ? n : !0) && !!e.accessorFn;
1457
+ }, e.getCanMultiSort = () => {
1458
+ var t, n;
1459
+ return (t = (n = e.columnDef.enableMultiSort) != null ? n : o.options.enableMultiSort) != null ? t : !!e.accessorFn;
1460
+ }, e.getIsSorted = () => {
1461
+ var t;
1462
+ const n = (t = o.getState().sorting) == null ? void 0 : t.find((r) => r.id === e.id);
1463
+ return n ? n.desc ? "desc" : "asc" : !1;
1464
+ }, e.getSortIndex = () => {
1465
+ var t, n;
1466
+ return (t = (n = o.getState().sorting) == null ? void 0 : n.findIndex((r) => r.id === e.id)) != null ? t : -1;
1467
+ }, e.clearSorting = () => {
1468
+ o.setSorting((t) => t != null && t.length ? t.filter((n) => n.id !== e.id) : []);
1469
+ }, e.getToggleSortingHandler = () => {
1470
+ const t = e.getCanSort();
1471
+ return (n) => {
1472
+ t && (n.persist == null || n.persist(), e.toggleSorting == null || e.toggleSorting(void 0, e.getCanMultiSort() ? o.options.isMultiSortEvent == null ? void 0 : o.options.isMultiSortEvent(n) : !1));
1473
+ };
1474
+ };
1475
+ },
1476
+ createTable: (e) => {
1477
+ e.setSorting = (o) => e.options.onSortingChange == null ? void 0 : e.options.onSortingChange(o), e.resetSorting = (o) => {
1478
+ var t, n;
1479
+ e.setSorting(o ? [] : (t = (n = e.initialState) == null ? void 0 : n.sorting) != null ? t : []);
1480
+ }, e.getPreSortedRowModel = () => e.getGroupedRowModel(), e.getSortedRowModel = () => (!e._getSortedRowModel && e.options.getSortedRowModel && (e._getSortedRowModel = e.options.getSortedRowModel(e)), e.options.manualSorting || !e._getSortedRowModel ? e.getPreSortedRowModel() : e._getSortedRowModel());
1481
+ }
1482
+ }, at = [
1483
+ ye,
1484
+ Qe,
1485
+ je,
1486
+ Ue,
1487
+ Ee,
1488
+ De,
1489
+ We,
1490
+ //depends on ColumnFaceting
1491
+ Ye,
1492
+ //depends on ColumnFiltering
1493
+ ut,
1494
+ qe,
1495
+ //depends on RowSorting
1496
+ Ze,
1497
+ be,
1498
+ et,
1499
+ tt,
1500
+ Ke
1501
+ ];
1502
+ function gt(e) {
1503
+ var o, t;
1504
+ process.env.NODE_ENV !== "production" && (e.debugAll || e.debugTable) && console.info("Creating Table Instance...");
1505
+ const n = [...at, ...(o = e._features) != null ? o : []];
1506
+ let r = {
1507
+ _features: n
1508
+ };
1509
+ const i = r._features.reduce((d, s) => Object.assign(d, s.getDefaultOptions == null ? void 0 : s.getDefaultOptions(r)), {}), l = (d) => r.options.mergeOptions ? r.options.mergeOptions(i, d) : {
1510
+ ...i,
1511
+ ...d
1512
+ };
1513
+ let a = {
1514
+ ...{},
1515
+ ...(t = e.initialState) != null ? t : {}
1516
+ };
1517
+ r._features.forEach((d) => {
1518
+ var s;
1519
+ a = (s = d.getInitialState == null ? void 0 : d.getInitialState(a)) != null ? s : a;
1520
+ });
1521
+ const g = [];
1522
+ let f = !1;
1523
+ const m = {
1524
+ _features: n,
1525
+ options: {
1526
+ ...i,
1527
+ ...e
1528
+ },
1529
+ initialState: a,
1530
+ _queue: (d) => {
1531
+ g.push(d), f || (f = !0, Promise.resolve().then(() => {
1532
+ for (; g.length; )
1533
+ g.shift()();
1534
+ f = !1;
1535
+ }).catch((s) => setTimeout(() => {
1536
+ throw s;
1537
+ })));
1538
+ },
1539
+ reset: () => {
1540
+ r.setState(r.initialState);
1541
+ },
1542
+ setOptions: (d) => {
1543
+ const s = I(d, r.options);
1544
+ r.options = l(s);
1545
+ },
1546
+ getState: () => r.options.state,
1547
+ setState: (d) => {
1548
+ r.options.onStateChange == null || r.options.onStateChange(d);
1549
+ },
1550
+ _getRowId: (d, s, c) => {
1551
+ var p;
1552
+ return (p = r.options.getRowId == null ? void 0 : r.options.getRowId(d, s, c)) != null ? p : `${c ? [c.id, s].join(".") : s}`;
1553
+ },
1554
+ getCoreRowModel: () => (r._getCoreRowModel || (r._getCoreRowModel = r.options.getCoreRowModel(r)), r._getCoreRowModel()),
1555
+ // The final calls start at the bottom of the model,
1556
+ // expanded rows, which then work their way up
1557
+ getRowModel: () => r.getPaginationRowModel(),
1558
+ //in next version, we should just pass in the row model as the optional 2nd arg
1559
+ getRow: (d, s) => {
1560
+ let c = (s ? r.getPrePaginationRowModel() : r.getRowModel()).rowsById[d];
1561
+ if (!c && (c = r.getCoreRowModel().rowsById[d], !c))
1562
+ throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${d}`) : new Error();
1563
+ return c;
1564
+ },
1565
+ _getDefaultColumnDef: S(() => [r.options.defaultColumn], (d) => {
1566
+ var s;
1567
+ return d = (s = d) != null ? s : {}, {
1568
+ header: (c) => {
1569
+ const p = c.header.column.columnDef;
1570
+ return p.accessorKey ? p.accessorKey : p.accessorFn ? p.id : null;
1571
+ },
1572
+ // footer: props => props.header.column.id,
1573
+ cell: (c) => {
1574
+ var p, R;
1575
+ return (p = (R = c.renderValue()) == null || R.toString == null ? void 0 : R.toString()) != null ? p : null;
1576
+ },
1577
+ ...r._features.reduce((c, p) => Object.assign(c, p.getDefaultColumnDef == null ? void 0 : p.getDefaultColumnDef()), {}),
1578
+ ...d
1579
+ };
1580
+ }, C(e, "debugColumns", "_getDefaultColumnDef")),
1581
+ _getColumnDefs: () => r.options.columns,
1582
+ getAllColumns: S(() => [r._getColumnDefs()], (d) => {
1583
+ const s = function(c, p, R) {
1584
+ return R === void 0 && (R = 0), c.map((w) => {
1585
+ const h = Ie(r, w, R, p), v = w;
1586
+ return h.columns = v.columns ? s(v.columns, h, R + 1) : [], h;
1587
+ });
1588
+ };
1589
+ return s(d);
1590
+ }, C(e, "debugColumns", "getAllColumns")),
1591
+ getAllFlatColumns: S(() => [r.getAllColumns()], (d) => d.flatMap((s) => s.getFlatColumns()), C(e, "debugColumns", "getAllFlatColumns")),
1592
+ _getAllFlatColumnsById: S(() => [r.getAllFlatColumns()], (d) => d.reduce((s, c) => (s[c.id] = c, s), {}), C(e, "debugColumns", "getAllFlatColumnsById")),
1593
+ getAllLeafColumns: S(() => [r.getAllColumns(), r._getOrderColumnsFn()], (d, s) => {
1594
+ let c = d.flatMap((p) => p.getLeafColumns());
1595
+ return s(c);
1596
+ }, C(e, "debugColumns", "getAllLeafColumns")),
1597
+ getColumn: (d) => {
1598
+ const s = r._getAllFlatColumnsById()[d];
1599
+ return process.env.NODE_ENV !== "production" && !s && console.error(`[Table] Column with id '${d}' does not exist.`), s;
1600
+ }
1601
+ };
1602
+ Object.assign(r, m);
1603
+ for (let d = 0; d < r._features.length; d++) {
1604
+ const s = r._features[d];
1605
+ s == null || s.createTable == null || s.createTable(r);
1606
+ }
1607
+ return r;
1608
+ }
1609
+ function dt() {
1610
+ return (e) => S(() => [e.options.data], (o) => {
1611
+ const t = {
1612
+ rows: [],
1613
+ flatRows: [],
1614
+ rowsById: {}
1615
+ }, n = function(r, i, l) {
1616
+ i === void 0 && (i = 0);
1617
+ const u = [];
1618
+ for (let g = 0; g < r.length; g++) {
1619
+ const f = Z(e, e._getRowId(r[g], g, l), r[g], g, i, void 0, l?.id);
1620
+ if (t.flatRows.push(f), t.rowsById[f.id] = f, u.push(f), e.options.getSubRows) {
1621
+ var a;
1622
+ f.originalSubRows = e.options.getSubRows(r[g], g), (a = f.originalSubRows) != null && a.length && (f.subRows = n(f.originalSubRows, i + 1, f));
1623
+ }
1624
+ }
1625
+ return u;
1626
+ };
1627
+ return t.rows = n(o), t;
1628
+ }, C(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
1629
+ }
1630
+ function ft(e) {
1631
+ const o = [], t = (n) => {
1632
+ var r;
1633
+ o.push(n), (r = n.subRows) != null && r.length && n.getIsExpanded() && n.subRows.forEach(t);
1634
+ };
1635
+ return e.rows.forEach(t), {
1636
+ rows: o,
1637
+ flatRows: e.flatRows,
1638
+ rowsById: e.rowsById
1639
+ };
1640
+ }
1641
+ function ct(e, o, t) {
1642
+ return t.options.filterFromLeafRows ? pt(e, o, t) : mt(e, o, t);
1643
+ }
1644
+ function pt(e, o, t) {
1645
+ var n;
1646
+ const r = [], i = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, u = function(a, g) {
1647
+ g === void 0 && (g = 0);
1648
+ const f = [];
1649
+ for (let d = 0; d < a.length; d++) {
1650
+ var m;
1651
+ let s = a[d];
1652
+ const c = Z(t, s.id, s.original, s.index, s.depth, void 0, s.parentId);
1653
+ if (c.columnFilters = s.columnFilters, (m = s.subRows) != null && m.length && g < l) {
1654
+ if (c.subRows = u(s.subRows, g + 1), s = c, o(s) && !c.subRows.length) {
1655
+ f.push(s), i[s.id] = s, r.push(s);
1656
+ continue;
1657
+ }
1658
+ if (o(s) || c.subRows.length) {
1659
+ f.push(s), i[s.id] = s, r.push(s);
1660
+ continue;
1661
+ }
1662
+ } else
1663
+ s = c, o(s) && (f.push(s), i[s.id] = s, r.push(s));
1664
+ }
1665
+ return f;
1666
+ };
1667
+ return {
1668
+ rows: u(e),
1669
+ flatRows: r,
1670
+ rowsById: i
1671
+ };
1672
+ }
1673
+ function mt(e, o, t) {
1674
+ var n;
1675
+ const r = [], i = {}, l = (n = t.options.maxLeafRowFilterDepth) != null ? n : 100, u = function(a, g) {
1676
+ g === void 0 && (g = 0);
1677
+ const f = [];
1678
+ for (let d = 0; d < a.length; d++) {
1679
+ let s = a[d];
1680
+ if (o(s)) {
1681
+ var m;
1682
+ if ((m = s.subRows) != null && m.length && g < l) {
1683
+ const p = Z(t, s.id, s.original, s.index, s.depth, void 0, s.parentId);
1684
+ p.subRows = u(s.subRows, g + 1), s = p;
1685
+ }
1686
+ f.push(s), r.push(s), i[s.id] = s;
1687
+ }
1688
+ }
1689
+ return f;
1690
+ };
1691
+ return {
1692
+ rows: u(e),
1693
+ flatRows: r,
1694
+ rowsById: i
1695
+ };
1696
+ }
1697
+ function St() {
1698
+ return (e) => S(() => [e.getPreFilteredRowModel(), e.getState().columnFilters, e.getState().globalFilter], (o, t, n) => {
1699
+ if (!o.rows.length || !(t != null && t.length) && !n) {
1700
+ for (let d = 0; d < o.flatRows.length; d++)
1701
+ o.flatRows[d].columnFilters = {}, o.flatRows[d].columnFiltersMeta = {};
1702
+ return o;
1703
+ }
1704
+ const r = [], i = [];
1705
+ (t ?? []).forEach((d) => {
1706
+ var s;
1707
+ const c = e.getColumn(d.id);
1708
+ if (!c)
1709
+ return;
1710
+ const p = c.getFilterFn();
1711
+ if (!p) {
1712
+ process.env.NODE_ENV !== "production" && console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${c.id}.`);
1713
+ return;
1714
+ }
1715
+ r.push({
1716
+ id: d.id,
1717
+ filterFn: p,
1718
+ resolvedValue: (s = p.resolveFilterValue == null ? void 0 : p.resolveFilterValue(d.value)) != null ? s : d.value
1719
+ });
1720
+ });
1721
+ const l = (t ?? []).map((d) => d.id), u = e.getGlobalFilterFn(), a = e.getAllLeafColumns().filter((d) => d.getCanGlobalFilter());
1722
+ n && u && a.length && (l.push("__global__"), a.forEach((d) => {
1723
+ var s;
1724
+ i.push({
1725
+ id: d.id,
1726
+ filterFn: u,
1727
+ resolvedValue: (s = u.resolveFilterValue == null ? void 0 : u.resolveFilterValue(n)) != null ? s : n
1728
+ });
1729
+ }));
1730
+ let g, f;
1731
+ for (let d = 0; d < o.flatRows.length; d++) {
1732
+ const s = o.flatRows[d];
1733
+ if (s.columnFilters = {}, r.length)
1734
+ for (let c = 0; c < r.length; c++) {
1735
+ g = r[c];
1736
+ const p = g.id;
1737
+ s.columnFilters[p] = g.filterFn(s, p, g.resolvedValue, (R) => {
1738
+ s.columnFiltersMeta[p] = R;
1739
+ });
1740
+ }
1741
+ if (i.length) {
1742
+ for (let c = 0; c < i.length; c++) {
1743
+ f = i[c];
1744
+ const p = f.id;
1745
+ if (f.filterFn(s, p, f.resolvedValue, (R) => {
1746
+ s.columnFiltersMeta[p] = R;
1747
+ })) {
1748
+ s.columnFilters.__global__ = !0;
1749
+ break;
1750
+ }
1751
+ }
1752
+ s.columnFilters.__global__ !== !0 && (s.columnFilters.__global__ = !1);
1753
+ }
1754
+ }
1755
+ const m = (d) => {
1756
+ for (let s = 0; s < l.length; s++)
1757
+ if (d.columnFilters[l[s]] === !1)
1758
+ return !1;
1759
+ return !0;
1760
+ };
1761
+ return ct(o.rows, m, e);
1762
+ }, C(e.options, "debugTable", "getFilteredRowModel", () => e._autoResetPageIndex()));
1763
+ }
1764
+ function Ct(e) {
1765
+ return (o) => S(() => [o.getState().pagination, o.getPrePaginationRowModel(), o.options.paginateExpandedRows ? void 0 : o.getState().expanded], (t, n) => {
1766
+ if (!n.rows.length)
1767
+ return n;
1768
+ const {
1769
+ pageSize: r,
1770
+ pageIndex: i
1771
+ } = t;
1772
+ let {
1773
+ rows: l,
1774
+ flatRows: u,
1775
+ rowsById: a
1776
+ } = n;
1777
+ const g = r * i, f = g + r;
1778
+ l = l.slice(g, f);
1779
+ let m;
1780
+ o.options.paginateExpandedRows ? m = {
1781
+ rows: l,
1782
+ flatRows: u,
1783
+ rowsById: a
1784
+ } : m = ft({
1785
+ rows: l,
1786
+ flatRows: u,
1787
+ rowsById: a
1788
+ }), m.flatRows = [];
1789
+ const d = (s) => {
1790
+ m.flatRows.push(s), s.subRows.length && s.subRows.forEach(d);
1791
+ };
1792
+ return m.rows.forEach(d), m;
1793
+ }, C(o.options, "debugTable", "getPaginationRowModel"));
1794
+ }
1795
+ function Rt() {
1796
+ return (e) => S(() => [e.getState().sorting, e.getPreSortedRowModel()], (o, t) => {
1797
+ if (!t.rows.length || !(o != null && o.length))
1798
+ return t;
1799
+ const n = e.getState().sorting, r = [], i = n.filter((a) => {
1800
+ var g;
1801
+ return (g = e.getColumn(a.id)) == null ? void 0 : g.getCanSort();
1802
+ }), l = {};
1803
+ i.forEach((a) => {
1804
+ const g = e.getColumn(a.id);
1805
+ g && (l[a.id] = {
1806
+ sortUndefined: g.columnDef.sortUndefined,
1807
+ invertSorting: g.columnDef.invertSorting,
1808
+ sortingFn: g.getSortingFn()
1809
+ });
1810
+ });
1811
+ const u = (a) => {
1812
+ const g = a.map((f) => ({
1813
+ ...f
1814
+ }));
1815
+ return g.sort((f, m) => {
1816
+ for (let s = 0; s < i.length; s += 1) {
1817
+ var d;
1818
+ const c = i[s], p = l[c.id], R = p.sortUndefined, w = (d = c?.desc) != null ? d : !1;
1819
+ let h = 0;
1820
+ if (R) {
1821
+ const v = f.getValue(c.id), M = m.getValue(c.id), F = v === void 0, E = M === void 0;
1822
+ if (F || E) {
1823
+ if (R === "first") return F ? -1 : 1;
1824
+ if (R === "last") return F ? 1 : -1;
1825
+ h = F && E ? 0 : F ? R : -R;
1826
+ }
1827
+ }
1828
+ if (h === 0 && (h = p.sortingFn(f, m, c.id)), h !== 0)
1829
+ return w && (h *= -1), p.invertSorting && (h *= -1), h;
1830
+ }
1831
+ return f.index - m.index;
1832
+ }), g.forEach((f) => {
1833
+ var m;
1834
+ r.push(f), (m = f.subRows) != null && m.length && (f.subRows = u(f.subRows));
1835
+ }), g;
1836
+ };
1837
+ return {
1838
+ rows: u(t.rows),
1839
+ flatRows: r,
1840
+ rowsById: t.rowsById
1841
+ };
1842
+ }, C(e.options, "debugTable", "getSortedRowModel", () => e._autoResetPageIndex()));
1843
+ }
1844
+ function ae(e, o) {
1845
+ return e ? wt(e) ? /* @__PURE__ */ X.createElement(e, o) : e : null;
1846
+ }
1847
+ function wt(e) {
1848
+ return ht(e) || typeof e == "function" || vt(e);
1849
+ }
1850
+ function ht(e) {
1851
+ return typeof e == "function" && (() => {
1852
+ const o = Object.getPrototypeOf(e);
1853
+ return o.prototype && o.prototype.isReactComponent;
1854
+ })();
1855
+ }
1856
+ function vt(e) {
1857
+ return typeof e == "object" && typeof e.$$typeof == "symbol" && ["react.memo", "react.forward_ref"].includes(e.$$typeof.description);
1858
+ }
1859
+ function _t(e) {
1860
+ const o = {
1861
+ state: {},
1862
+ // Dummy state
1863
+ onStateChange: () => {
1864
+ },
1865
+ // noop
1866
+ renderFallbackValue: null,
1867
+ ...e
1868
+ }, [t] = X.useState(() => ({
1869
+ current: gt(o)
1870
+ })), [n, r] = X.useState(() => t.current.initialState);
1871
+ return t.current.setOptions((i) => ({
1872
+ ...i,
1873
+ ...e,
1874
+ state: {
1875
+ ...n,
1876
+ ...e.state
1877
+ },
1878
+ // Similarly, we'll maintain both our internal state and any user-provided
1879
+ // state.
1880
+ onStateChange: (l) => {
1881
+ r(l), e.onStateChange == null || e.onStateChange(l);
1882
+ }
1883
+ })), t.current;
1884
+ }
1885
+ function Mt({
1886
+ columns: e,
1887
+ data: o,
1888
+ sorting: t,
1889
+ columnFilters: n,
1890
+ pagination: r,
1891
+ globalFilter: i,
1892
+ setGlobalFilter: l,
1893
+ onSortingChange: u,
1894
+ onColumnFiltersChange: a,
1895
+ onPaginationChange: g,
1896
+ className: f
1897
+ }) {
1898
+ const m = {
1899
+ sorting: t,
1900
+ columnFilters: n,
1901
+ ...r && { pagination: r },
1902
+ globalFilter: i
1903
+ }, d = _t({
1904
+ data: o,
1905
+ columns: e,
1906
+ state: m,
1907
+ onSortingChange: u,
1908
+ onColumnFiltersChange: a,
1909
+ onPaginationChange: g,
1910
+ getCoreRowModel: dt(),
1911
+ getPaginationRowModel: Ct(),
1912
+ getSortedRowModel: Rt(),
1913
+ getFilteredRowModel: St(),
1914
+ onGlobalFilterChange: l,
1915
+ globalFilterFn: "includesString"
1916
+ });
1917
+ return /* @__PURE__ */ x("div", { className: le("w-full overflow-hidden", f?.className), children: /* @__PURE__ */ ve(_e, { className: f?.tableClassName, children: [
1918
+ /* @__PURE__ */ x(Fe, { className: f?.headerClassName, children: d.getHeaderGroups().map((s) => /* @__PURE__ */ x(
1919
+ O,
1920
+ {
1921
+ className: f?.rowClassName,
1922
+ children: s.headers.map((c) => /* @__PURE__ */ x(
1923
+ $e,
1924
+ {
1925
+ className: f?.headCellClassName,
1926
+ children: c.isPlaceholder ? null : ae(c.column.columnDef.header, c.getContext())
1927
+ },
1928
+ c.id
1929
+ ))
1930
+ },
1931
+ s.id
1932
+ )) }),
1933
+ /* @__PURE__ */ x(Ve, { children: d.getRowModel().rows.length ? d.getRowModel().rows.map((s) => /* @__PURE__ */ x(
1934
+ O,
1935
+ {
1936
+ className: f?.rowClassName,
1937
+ "data-state": s.getIsSelected() && "selected",
1938
+ children: s.getVisibleCells().map((c) => /* @__PURE__ */ x(
1939
+ ie,
1940
+ {
1941
+ className: f?.cellClassName,
1942
+ children: ae(c.column.columnDef.cell, c.getContext())
1943
+ },
1944
+ c.id
1945
+ ))
1946
+ },
1947
+ s.id
1948
+ )) : /* @__PURE__ */ x(O, { className: f?.rowClassName, children: /* @__PURE__ */ x(
1949
+ ie,
1950
+ {
1951
+ colSpan: e.length,
1952
+ className: le("h-24 text-center", f?.cellClassName),
1953
+ children: "No results."
1954
+ }
1955
+ ) }) })
1956
+ ] }) });
1957
+ }
1958
+ export {
1959
+ Mt as BasicTable
1960
+ };
1961
+ //# sourceMappingURL=components-basic-table-basic-table.js.map