@slotted/react 0.1.0-beta.40 → 0.1.0-beta.41

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 (267) hide show
  1. package/dist/{app-shell-ClwskWBN.js → app-shell-DyPHYe4K.js} +1 -1
  2. package/dist/app-shell.js +1 -1
  3. package/dist/{attachment-AAjprQyU.js → attachment-MqczA38F.js} +1 -1
  4. package/dist/attachment.js +1 -1
  5. package/dist/{badge-pgYVOnZO.js → badge-DFskjsxA.js} +21 -20
  6. package/dist/badge.js +1 -1
  7. package/dist/{calendar-D3QZDlm0.js → calendar-DRuJ7z0H.js} +198 -195
  8. package/dist/calendar.js +1 -1
  9. package/dist/chart-CgXbG6gZ.js +1055 -0
  10. package/dist/chart.js +1 -1
  11. package/dist/{color-picker-CaLcV-63.js → color-picker-CeOl4ikV.js} +7 -7
  12. package/dist/color-picker.js +1 -1
  13. package/dist/column-manager-CnOhzVGP.js +586 -0
  14. package/dist/column-manager.js +1 -1
  15. package/dist/{currency-field-BO2P6FPd.js → currency-field-LAawS9qo.js} +181 -144
  16. package/dist/currency-field.js +1 -1
  17. package/dist/dashboard-grid-Zzqmbzqq.js +1201 -0
  18. package/dist/dashboard-grid.js +1 -1
  19. package/dist/{data-grid-B7UuUvBH.js → data-grid-Y5aX9njc.js} +1424 -1398
  20. package/dist/data-grid.js +1 -1
  21. package/dist/{date-picker-DMcMFW_N.js → date-picker-6hj83x5D.js} +28 -26
  22. package/dist/date-picker.js +2 -2
  23. package/dist/{date-range-picker-D9zo93NE.js → date-range-picker-CBWnFTgL.js} +167 -162
  24. package/dist/date-range-picker.js +1 -1
  25. package/dist/{datetime-picker-lOXZbAx_.js → datetime-picker-DwUYd3zF.js} +174 -163
  26. package/dist/datetime-picker.js +1 -1
  27. package/dist/{datetime-range-picker-DU5ctZbm.js → datetime-range-picker-CX_tBt6b.js} +193 -182
  28. package/dist/datetime-range-picker.js +1 -1
  29. package/dist/{detail-panel-DLgRhEFO.js → detail-panel-EImAtksY.js} +3 -3
  30. package/dist/detail-panel.js +1 -1
  31. package/dist/docs/badge.json +8 -0
  32. package/dist/docs/badge.md +1 -0
  33. package/dist/docs/calendar.json +8 -1
  34. package/dist/docs/calendar.md +2 -1
  35. package/dist/docs/chart.examples.md +48 -0
  36. package/dist/docs/chart.json +60 -7
  37. package/dist/docs/chart.md +9 -5
  38. package/dist/docs/currency-field.examples.md +1 -1
  39. package/dist/docs/currency-field.json +4 -4
  40. package/dist/docs/currency-field.md +3 -3
  41. package/dist/docs/data-grid.json +15 -1
  42. package/dist/docs/data-grid.md +1 -1
  43. package/dist/docs/data-grid.props.md +2 -0
  44. package/dist/docs/date-picker.json +9 -2
  45. package/dist/docs/date-picker.md +3 -2
  46. package/dist/docs/date-range-picker.json +9 -2
  47. package/dist/docs/date-range-picker.md +3 -2
  48. package/dist/docs/datetime-picker.json +9 -2
  49. package/dist/docs/datetime-picker.md +3 -2
  50. package/dist/docs/datetime-range-picker.json +9 -2
  51. package/dist/docs/datetime-range-picker.md +3 -2
  52. package/dist/docs/guidelines/async-feedback.md +11 -1
  53. package/dist/docs/guidelines/index.md +1 -0
  54. package/dist/docs/popover.json +41 -3
  55. package/dist/docs/popover.md +5 -2
  56. package/dist/docs/section.json +1 -1
  57. package/dist/docs/section.md +1 -1
  58. package/dist/docs/skills/theme-app/SKILL.md +3 -2
  59. package/dist/docs/skills/waiting-states/SKILL.md +4 -1
  60. package/dist/docs/stat-card.json +9 -1
  61. package/dist/docs/stat-card.md +2 -1
  62. package/dist/docs/switch.json +12 -5
  63. package/dist/docs/switch.md +5 -4
  64. package/dist/docs/tag.json +8 -0
  65. package/dist/docs/tag.md +1 -0
  66. package/dist/docs/time-picker.json +1 -1
  67. package/dist/docs/time-picker.md +1 -1
  68. package/dist/docs/time-range-picker.json +1 -1
  69. package/dist/docs/time-range-picker.md +1 -1
  70. package/dist/{event-calendar-biSTH0yK.js → event-calendar-DzlL95E4.js} +2 -2
  71. package/dist/event-calendar.js +1 -1
  72. package/dist/{filter-bar-BQZFgV0A.js → filter-bar-DMuP5P6e.js} +19 -19
  73. package/dist/filter-bar.js +1 -1
  74. package/dist/{hover-card-D8OyhmEG.js → hover-card-CWCSZ5_p.js} +1 -1
  75. package/dist/hover-card.js +1 -1
  76. package/dist/{import-export-center-DWSEOV5Z.js → import-export-center-DzAUMTq5.js} +3 -3
  77. package/dist/import-export-center.js +1 -1
  78. package/dist/index.js +47 -47
  79. package/dist/{loading-overlay-BLIrcaoj.js → loading-overlay-BxIktMtQ.js} +1 -1
  80. package/dist/loading-overlay.js +1 -1
  81. package/dist/{page-header-NN3Jq5vb.js → page-header-DmwBGwlm.js} +1 -1
  82. package/dist/page-header.js +1 -1
  83. package/dist/{picker-frame-_9ZqQOjf.js → picker-frame-CT5WNEnw.js} +1 -1
  84. package/dist/popover-B2t__iNO.js +575 -0
  85. package/dist/popover.js +1 -1
  86. package/dist/{progress-indicator-D0acshNn.js → progress-indicator-DRr0Gj6w.js} +1 -0
  87. package/dist/progress-indicator.js +1 -1
  88. package/dist/{saved-views-BvRFgSdg.js → saved-views-zM-DxT1F.js} +6 -6
  89. package/dist/saved-views.js +1 -1
  90. package/dist/{section-CQPQf6RU.js → section-D_qOfdxR.js} +1 -0
  91. package/dist/section.js +1 -1
  92. package/dist/{side-navigation-Cwi2FHOz.js → side-navigation-CtZuP87S.js} +1 -1
  93. package/dist/side-navigation.js +1 -1
  94. package/dist/{stat-card-CmpabaTc.js → stat-card-CL3Xe6pV.js} +4 -1
  95. package/dist/stat-card.js +1 -1
  96. package/dist/styles/action-bar.css +1 -1
  97. package/dist/styles/app-shell.css +4 -2
  98. package/dist/styles/attachment.css +3 -1
  99. package/dist/styles/badge.css +1 -1
  100. package/dist/styles/calendar.css +1 -1
  101. package/dist/styles/cascader.css +1 -1
  102. package/dist/styles/chart.css +3 -1
  103. package/dist/styles/color-picker.css +2 -2
  104. package/dist/styles/column-manager.css +2 -2
  105. package/dist/styles/dashboard-grid.css +2 -2
  106. package/dist/styles/data-grid.css +6 -6
  107. package/dist/styles/date-picker.css +2 -2
  108. package/dist/styles/date-range-picker.css +2 -2
  109. package/dist/styles/datetime-picker.css +2 -2
  110. package/dist/styles/datetime-range-picker.css +2 -2
  111. package/dist/styles/detail-panel.css +5 -3
  112. package/dist/styles/entity-picker.css +1 -1
  113. package/dist/styles/event-calendar.css +4 -2
  114. package/dist/styles/filter-bar.css +5 -5
  115. package/dist/styles/hover-card.css +1 -1
  116. package/dist/styles/import-export-center.css +8 -6
  117. package/dist/styles/index.css +17 -15
  118. package/dist/styles/loading-overlay.css +3 -1
  119. package/dist/styles/multi-select.css +1 -1
  120. package/dist/styles/page-header.css +3 -1
  121. package/dist/styles/popover.css +1 -1
  122. package/dist/styles/progress-indicator.css +3 -1
  123. package/dist/styles/saved-views.css +2 -2
  124. package/dist/styles/section.css +1 -1
  125. package/dist/styles/select.css +1 -1
  126. package/dist/styles/side-navigation.css +4 -2
  127. package/dist/styles/stat-card.css +1 -1
  128. package/dist/styles/switch.css +7 -1
  129. package/dist/styles/table.css +5 -5
  130. package/dist/styles/tag.css +1 -1
  131. package/dist/styles/tags-input.css +1 -1
  132. package/dist/styles/textarea.css +1 -1
  133. package/dist/styles/time-picker.css +1 -1
  134. package/dist/styles/time-range-picker.css +1 -1
  135. package/dist/styles/toast.css +3 -1
  136. package/dist/styles/top-navigation.css +4 -2
  137. package/dist/styles/upload.css +3 -1
  138. package/dist/styles/wizard.css +1 -1
  139. package/dist/styles.css +1 -1
  140. package/dist/switch-CcZAVLiW.js +154 -0
  141. package/dist/switch.js +1 -1
  142. package/dist/{table-MGb3iZY_.js → table-D4oX9Gvn.js} +46 -46
  143. package/dist/table.js +1 -1
  144. package/dist/{tag-BYzDYvM_.js → tag-DCMsVXN6.js} +31 -28
  145. package/dist/tag.js +1 -1
  146. package/dist/{time-picker-z4GSRuha.js → time-picker-Cu1iV039.js} +130 -128
  147. package/dist/time-picker.js +1 -1
  148. package/dist/{time-range-picker-ar40oPcf.js → time-range-picker-sdbaFJFN.js} +117 -115
  149. package/dist/time-range-picker.js +1 -1
  150. package/dist/{toast-Cg28GkqX.js → toast-aM_ga1mc.js} +1 -1
  151. package/dist/toast.js +1 -1
  152. package/dist/{top-navigation-C73WDqLg.js → top-navigation-D3rpgBV2.js} +1 -1
  153. package/dist/top-navigation.js +1 -1
  154. package/dist/types/badge/badge.d.ts +1 -1
  155. package/dist/types/badge/badge.d.ts.map +1 -1
  156. package/dist/types/badge/badge.types.d.ts +6 -0
  157. package/dist/types/badge/badge.types.d.ts.map +1 -1
  158. package/dist/types/calendar/calendar-day-cell.d.ts +3 -1
  159. package/dist/types/calendar/calendar-day-cell.d.ts.map +1 -1
  160. package/dist/types/calendar/calendar-defaults.d.ts +1 -1
  161. package/dist/types/calendar/calendar-defaults.d.ts.map +1 -1
  162. package/dist/types/calendar/calendar.d.ts +1 -1
  163. package/dist/types/calendar/calendar.d.ts.map +1 -1
  164. package/dist/types/calendar/calendar.types.d.ts +8 -0
  165. package/dist/types/calendar/calendar.types.d.ts.map +1 -1
  166. package/dist/types/chart/chart-help.d.ts +11 -0
  167. package/dist/types/chart/chart-help.d.ts.map +1 -0
  168. package/dist/types/chart/chart.d.ts.map +1 -1
  169. package/dist/types/chart/index.d.ts +1 -1
  170. package/dist/types/chart/index.d.ts.map +1 -1
  171. package/dist/types/currency-field/currency-field.d.ts +3 -3
  172. package/dist/types/currency-field/currency-field.d.ts.map +1 -1
  173. package/dist/types/currency-field/currency-field.types.d.ts +4 -3
  174. package/dist/types/currency-field/currency-field.types.d.ts.map +1 -1
  175. package/dist/types/dashboard-grid/dashboard-widget-help.d.ts +3 -1
  176. package/dist/types/dashboard-grid/dashboard-widget-help.d.ts.map +1 -1
  177. package/dist/types/data-grid/data-grid-body.d.ts.map +1 -1
  178. package/dist/types/data-grid/data-grid-context.d.ts +4 -0
  179. package/dist/types/data-grid/data-grid-context.d.ts.map +1 -1
  180. package/dist/types/data-grid/data-grid-header.d.ts.map +1 -1
  181. package/dist/types/data-grid/data-grid.d.ts +1 -1
  182. package/dist/types/data-grid/data-grid.d.ts.map +1 -1
  183. package/dist/types/data-grid/data-grid.types.d.ts +13 -0
  184. package/dist/types/data-grid/data-grid.types.d.ts.map +1 -1
  185. package/dist/types/date-picker/date-picker-defaults.d.ts.map +1 -1
  186. package/dist/types/date-picker/date-picker-panel.d.ts +2 -0
  187. package/dist/types/date-picker/date-picker-panel.d.ts.map +1 -1
  188. package/dist/types/date-picker/date-picker.d.ts.map +1 -1
  189. package/dist/types/date-picker/date-picker.types.d.ts +9 -0
  190. package/dist/types/date-picker/date-picker.types.d.ts.map +1 -1
  191. package/dist/types/date-picker/use-date-picker.d.ts +6 -3
  192. package/dist/types/date-picker/use-date-picker.d.ts.map +1 -1
  193. package/dist/types/date-range-picker/date-range-panel.d.ts +2 -0
  194. package/dist/types/date-range-picker/date-range-panel.d.ts.map +1 -1
  195. package/dist/types/date-range-picker/date-range-picker-defaults.d.ts.map +1 -1
  196. package/dist/types/date-range-picker/date-range-picker.d.ts.map +1 -1
  197. package/dist/types/date-range-picker/date-range-picker.types.d.ts +9 -0
  198. package/dist/types/date-range-picker/date-range-picker.types.d.ts.map +1 -1
  199. package/dist/types/date-range-picker/use-date-range-picker.d.ts +1 -0
  200. package/dist/types/date-range-picker/use-date-range-picker.d.ts.map +1 -1
  201. package/dist/types/datetime-picker/datetime-picker-defaults.d.ts.map +1 -1
  202. package/dist/types/datetime-picker/datetime-picker-panel.d.ts +2 -0
  203. package/dist/types/datetime-picker/datetime-picker-panel.d.ts.map +1 -1
  204. package/dist/types/datetime-picker/datetime-picker.d.ts.map +1 -1
  205. package/dist/types/datetime-picker/datetime-picker.types.d.ts +9 -0
  206. package/dist/types/datetime-picker/datetime-picker.types.d.ts.map +1 -1
  207. package/dist/types/datetime-picker/use-datetime-picker.d.ts +2 -1
  208. package/dist/types/datetime-picker/use-datetime-picker.d.ts.map +1 -1
  209. package/dist/types/datetime-range-picker/datetime-range-panel.d.ts +2 -0
  210. package/dist/types/datetime-range-picker/datetime-range-panel.d.ts.map +1 -1
  211. package/dist/types/datetime-range-picker/datetime-range-picker-defaults.d.ts.map +1 -1
  212. package/dist/types/datetime-range-picker/datetime-range-picker.d.ts.map +1 -1
  213. package/dist/types/datetime-range-picker/datetime-range-picker.types.d.ts +9 -0
  214. package/dist/types/datetime-range-picker/datetime-range-picker.types.d.ts.map +1 -1
  215. package/dist/types/datetime-range-picker/use-datetime-range-picker.d.ts +2 -1
  216. package/dist/types/datetime-range-picker/use-datetime-range-picker.d.ts.map +1 -1
  217. package/dist/types/picker-panel/picker-footer.d.ts +8 -2
  218. package/dist/types/picker-panel/picker-footer.d.ts.map +1 -1
  219. package/dist/types/picker-panel/use-media-query.d.ts +2 -2
  220. package/dist/types/picker-panel/use-media-query.d.ts.map +1 -1
  221. package/dist/types/picker-panel/use-picker-layer.d.ts.map +1 -1
  222. package/dist/types/popover/index.d.ts +1 -1
  223. package/dist/types/popover/index.d.ts.map +1 -1
  224. package/dist/types/popover/popover-parts.d.ts +2 -1
  225. package/dist/types/popover/popover-parts.d.ts.map +1 -1
  226. package/dist/types/popover/popover.d.ts +4 -2
  227. package/dist/types/popover/popover.d.ts.map +1 -1
  228. package/dist/types/popover/popover.types.d.ts +17 -0
  229. package/dist/types/popover/popover.types.d.ts.map +1 -1
  230. package/dist/types/progress-indicator/loader.d.ts +1 -0
  231. package/dist/types/progress-indicator/loader.d.ts.map +1 -1
  232. package/dist/types/section/section.d.ts.map +1 -1
  233. package/dist/types/section/section.types.d.ts +4 -2
  234. package/dist/types/section/section.types.d.ts.map +1 -1
  235. package/dist/types/stat-card/stat-card-parts.d.ts.map +1 -1
  236. package/dist/types/switch/switch-defaults.d.ts.map +1 -1
  237. package/dist/types/switch/switch.d.ts +2 -1
  238. package/dist/types/switch/switch.d.ts.map +1 -1
  239. package/dist/types/switch/switch.types.d.ts +9 -0
  240. package/dist/types/switch/switch.types.d.ts.map +1 -1
  241. package/dist/types/tag/tag-chip.d.ts +4 -1
  242. package/dist/types/tag/tag-chip.d.ts.map +1 -1
  243. package/dist/types/tag/tag.d.ts +1 -1
  244. package/dist/types/tag/tag.d.ts.map +1 -1
  245. package/dist/types/tag/tag.types.d.ts +6 -0
  246. package/dist/types/tag/tag.types.d.ts.map +1 -1
  247. package/dist/types/time-picker/time-picker-panel.d.ts +3 -1
  248. package/dist/types/time-picker/time-picker-panel.d.ts.map +1 -1
  249. package/dist/types/time-picker/time-picker.d.ts.map +1 -1
  250. package/dist/types/time-range-picker/time-range-panel.d.ts +2 -0
  251. package/dist/types/time-range-picker/time-range-panel.d.ts.map +1 -1
  252. package/dist/types/time-range-picker/time-range-picker.d.ts.map +1 -1
  253. package/dist/{upload-DggJrkQ7.js → upload-CPl38p-S.js} +1 -1
  254. package/dist/upload.js +1 -1
  255. package/dist/use-date-picker-DWV7KWS7.js +137 -0
  256. package/dist/use-media-query-DJY5h_K5.js +15 -0
  257. package/dist/{use-picker-draft-Bw8VFaj0.js → use-picker-draft-BJlHcb6J.js} +128 -134
  258. package/dist/{wizard-BokOrtwq.js → wizard-4c0X7Bx_.js} +1 -1
  259. package/dist/wizard.js +1 -1
  260. package/package.json +6 -6
  261. package/dist/chart-DwXqQZjQ.js +0 -1027
  262. package/dist/column-manager-BBGczWQe.js +0 -586
  263. package/dist/dashboard-grid-DAY_CjCW.js +0 -1191
  264. package/dist/picker-jump-BcTRIJs6.js +0 -70
  265. package/dist/popover-BfEn2wdZ.js +0 -500
  266. package/dist/switch-C2krbZHI.js +0 -147
  267. package/dist/use-date-picker-DL8tRXji.js +0 -63
@@ -3,47 +3,47 @@ import { n, t as r } from "./icon-D04-_QFA.js";
3
3
  import { _ as i, c as a, g as o, n as s, t as c } from "./menu-parts-DgL617_H.js";
4
4
  import { n as l } from "./icon-button-N8Madx6i.js";
5
5
  import { a as u, i as d, n as f, r as p } from "./tooltip-DrFiRlH8.js";
6
- import { t as m } from "./checkbox-D3E4gzMe.js";
7
- import { i as h } from "./skeleton-DeEOmm1y.js";
8
- import { t as g } from "./text-field-Cnjc7LB5.js";
9
- import { a as _, d as ee, f as te, l as ne, r as re, t as ie } from "./popover-BfEn2wdZ.js";
10
- import { t as v } from "./visually-hidden-BUSrFZ1_.js";
11
- import { i as ae, n as oe, o as se, r as ce, t as le } from "./result-state-Ct9AB01a.js";
12
- import { t as ue } from "./date-picker-DMcMFW_N.js";
13
- import { t as de } from "./date-field-CxubN_3u.js";
14
- import { t as fe } from "./date-range-picker-D9zo93NE.js";
15
- import { t as pe } from "./datetime-picker-lOXZbAx_.js";
16
- import { t as me } from "./datetime-field-GMIqBuTa.js";
17
- import { t as he } from "./time-field-BanhrUvf.js";
18
- import { t as ge } from "./datetime-range-picker-DU5ctZbm.js";
19
- import { a as _e, i as ve, n as ye, s as be } from "./multi-select-DEd_92BC.js";
20
- import { t as xe } from "./number-field-BJKoidAE.js";
21
- import { a as Se, t as Ce } from "./segmented-control-D52GeOlS.js";
22
- import { c as we, i as Te, n as Ee, o as De, s as Oe } from "./select-BkUuIVBK.js";
23
- import { t as ke } from "./time-picker-z4GSRuha.js";
24
- import { t as Ae } from "./time-range-picker-ar40oPcf.js";
25
- import { selectorKeyProps as je, withSelectorKey as Me } from "@slotted/core/selector-key";
26
- import { createControllable as Ne } from "@slotted/core/state";
27
- import { createContext as Pe, createElement as Fe, memo as Ie, useCallback as y, useContext as Le, useEffect as b, useId as Re, useImperativeHandle as ze, useLayoutEffect as Be, useMemo as x, useRef as S, useState as C, useSyncExternalStore as Ve } from "react";
28
- import { Fragment as He, jsx as w, jsxs as T } from "react/jsx-runtime";
29
- import { createScrollAffordance as Ue } from "@slotted/core/overflow";
30
- import { dataGridMessages as We, dragMessages as Ge } from "@slotted/core/i18n";
31
- import { createRowMetrics as Ke, nextSelection as qe, virtualWindow as Je } from "@slotted/core/collection";
32
- import { COMPACT_BELOW as Ye } from "@slotted/core/measure";
33
- import { placeholderWidth as Xe } from "@slotted/core/loading";
34
- import { getLiveAnnouncer as Ze } from "@slotted/core/live-announcer";
35
- import { isPlainDate as Qe, isPlainDateTime as $e, isPlainTime as et, parseISODate as tt, parseISODateTime as nt, parseISOTime as rt, toISODate as it, toISODateTime as at, toISOTime as ot } from "@slotted/core/date";
36
- import { writeToClipboard as st } from "@slotted/core/clipboard";
37
- import { createDragController as ct } from "@slotted/core/drag";
38
- import { FILTER_ROW as lt, GROUP_ROW_PREFIX as ut, HEADER_ROW as dt, POPIN_COLUMN_ID as ft, RESIZE_STEP as pt, SUMMARY_ROW as mt, applyQuery as ht, cellText as gt, cellValue as _t, clampWidth as vt, columnRange as yt, columnTemplate as bt, columnsOutOfSpace as xt, emptyGridView as St, emptyQuery as Ct, groupInOrder as wt, isGroupCursorRow as Tt, moveCursor as Et, normalizeColumnState as Dt, parseGridView as Ot, rangeBounds as kt, rangeCells as At, rangeEdges as jt, rangeToText as Mt, resolveColumnOverflow as Nt, resolveColumns as Pt, rowRange as Ft, sameCell as E, serializeGridView as It, serializeQuery as Lt, settleCursor as Rt, toCsv as zt, wholeRange as Bt, withColumnFilter as Vt, withColumnHidden as Ht, withColumnMoved as Ut, withColumnPinned as Wt, withColumnWidth as Gt, withSort as Kt, withSortPress as qt, withoutFilters as Jt, zoneOf as Yt } from "@slotted/core/grid";
39
- import { createFilterGroupPredicate as Xt, defaultOperator as Zt, describeFilter as Qt, emptyFilter as $t, isConditionActive as en, isFilterActive as tn, normalizeFilter as nn, operandCount as rn, operatorsFor as an, ruleFor as on, serializeFilter as sn, withCondition as cn, withJoin as ln, withoutRuleFor as un } from "@slotted/core/filter";
6
+ import { a as m, d as h, f as g, l as _, p as ee, r as v, t as te } from "./popover-B2t__iNO.js";
7
+ import { t as y } from "./checkbox-D3E4gzMe.js";
8
+ import { i as ne } from "./skeleton-DeEOmm1y.js";
9
+ import { t as b } from "./text-field-Cnjc7LB5.js";
10
+ import { t as re } from "./visually-hidden-BUSrFZ1_.js";
11
+ import { i as ie, n as ae, o as oe, r as se, t as ce } from "./result-state-Ct9AB01a.js";
12
+ import { t as le } from "./date-picker-6hj83x5D.js";
13
+ import { t as ue } from "./date-field-CxubN_3u.js";
14
+ import { t as de } from "./date-range-picker-CBWnFTgL.js";
15
+ import { t as fe } from "./datetime-picker-DwUYd3zF.js";
16
+ import { t as pe } from "./datetime-field-GMIqBuTa.js";
17
+ import { t as me } from "./time-field-BanhrUvf.js";
18
+ import { t as he } from "./datetime-range-picker-CX_tBt6b.js";
19
+ import { a as ge, i as _e, n as ve, s as ye } from "./multi-select-DEd_92BC.js";
20
+ import { t as be } from "./number-field-BJKoidAE.js";
21
+ import { a as xe, t as Se } from "./segmented-control-D52GeOlS.js";
22
+ import { c as Ce, i as we, n as Te, o as Ee, s as De } from "./select-BkUuIVBK.js";
23
+ import { t as Oe } from "./time-picker-Cu1iV039.js";
24
+ import { t as ke } from "./time-range-picker-sdbaFJFN.js";
25
+ import { selectorKeyProps as Ae, withSelectorKey as je } from "@slotted/core/selector-key";
26
+ import { createControllable as Me } from "@slotted/core/state";
27
+ import { createContext as Ne, createElement as Pe, memo as Fe, useCallback as x, useContext as Ie, useEffect as S, useId as Le, useImperativeHandle as Re, useLayoutEffect as ze, useMemo as C, useRef as w, useState as T, useSyncExternalStore as Be } from "react";
28
+ import { Fragment as Ve, jsx as E, jsxs as D } from "react/jsx-runtime";
29
+ import { createScrollAffordance as He } from "@slotted/core/overflow";
30
+ import { dataGridMessages as Ue, dragMessages as We } from "@slotted/core/i18n";
31
+ import { createRowMetrics as Ge, nextSelection as Ke, virtualWindow as qe } from "@slotted/core/collection";
32
+ import { COMPACT_BELOW as Je } from "@slotted/core/measure";
33
+ import { placeholderWidth as Ye } from "@slotted/core/loading";
34
+ import { getLiveAnnouncer as Xe } from "@slotted/core/live-announcer";
35
+ import { isPlainDate as Ze, isPlainDateTime as Qe, isPlainTime as $e, parseISODate as et, parseISODateTime as tt, parseISOTime as nt, toISODate as rt, toISODateTime as it, toISOTime as at } from "@slotted/core/date";
36
+ import { writeToClipboard as ot } from "@slotted/core/clipboard";
37
+ import { createDragController as st } from "@slotted/core/drag";
38
+ import { FILTER_ROW as ct, GROUP_ROW_PREFIX as lt, HEADER_ROW as ut, POPIN_COLUMN_ID as dt, RESIZE_STEP as ft, SUMMARY_ROW as pt, applyQuery as mt, cellText as ht, cellValue as gt, clampWidth as _t, columnRange as vt, columnTemplate as yt, columnsOutOfSpace as bt, emptyGridView as xt, emptyQuery as St, groupInOrder as Ct, isGroupCursorRow as wt, moveCursor as Tt, normalizeColumnState as Et, parseGridView as Dt, rangeBounds as Ot, rangeCells as kt, rangeEdges as At, rangeToText as jt, resolveColumnOverflow as Mt, resolveColumns as Nt, rowRange as Pt, sameCell as O, serializeGridView as Ft, serializeQuery as It, settleCursor as Lt, toCsv as Rt, wholeRange as zt, withColumnFilter as Bt, withColumnHidden as Vt, withColumnMoved as Ht, withColumnPinned as Ut, withColumnWidth as Wt, withSort as Gt, withSortPress as Kt, withoutFilters as qt, zoneOf as Jt } from "@slotted/core/grid";
39
+ import { createFilterGroupPredicate as Yt, defaultOperator as Xt, describeFilter as Zt, emptyFilter as Qt, isConditionActive as $t, isFilterActive as en, normalizeFilter as tn, operandCount as nn, operatorsFor as rn, ruleFor as an, serializeFilter as on, withCondition as sn, withJoin as cn, withoutRuleFor as ln } from "@slotted/core/filter";
40
40
  //#region src/data-grid/data-grid-constants.ts
41
- var dn = "__selection", fn = "__expander", pn = "__drag", mn = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"]), [contenteditable=\"true\"]";
42
- function hn(e, t) {
41
+ var un = "__selection", dn = "__expander", fn = "__drag", pn = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"]), [contenteditable=\"true\"]";
42
+ function mn(e, t) {
43
43
  let n = { "--slotted-data-grid-column": String(t) };
44
44
  return e.pinned && (n["--slotted-data-grid-pin-offset"] = `${e.pinOffset}px`), n;
45
45
  }
46
- function gn(e) {
46
+ function hn(e) {
47
47
  return {
48
48
  ...e.align ? { "data-align": e.align } : {},
49
49
  ...e.numeric ? { "data-numeric": "" } : {},
@@ -52,19 +52,19 @@ function gn(e) {
52
52
  "data-column": e.id
53
53
  };
54
54
  }
55
- function _n(e) {
55
+ function gn(e) {
56
56
  let t = e.currentTarget, n = e.target;
57
57
  if (!n || !t.contains(n)) return !0;
58
- let r = n.closest(mn);
58
+ let r = n.closest(pn);
59
59
  return r !== null && r !== t && t.contains(r);
60
60
  }
61
- var vn = 1200, yn = Pe(void 0);
62
- function D() {
63
- let e = Le(yn);
61
+ var _n = 1200, vn = Ne(void 0);
62
+ function k() {
63
+ let e = Ie(vn);
64
64
  if (e === void 0) throw Error("Every DataGrid part must be rendered inside DataGrid.");
65
65
  return e;
66
66
  }
67
- var bn = /* @__PURE__ */ new Set([
67
+ var yn = /* @__PURE__ */ new Set([
68
68
  "changedOf",
69
69
  "current",
70
70
  "detailId",
@@ -74,12 +74,14 @@ var bn = /* @__PURE__ */ new Set([
74
74
  "isDisabled",
75
75
  "isExpanded",
76
76
  "isLoadingChildren",
77
+ "isMuted",
77
78
  "isSelected",
79
+ "isUnselectable",
78
80
  "rangeBounds",
79
81
  "rangeInfo",
80
82
  "rowLabelOf"
81
- ]), xn = /* @__PURE__ */ new Set(/* @__PURE__ */ "activate.allState.announce.anchorToButton.attachDraggable.attachRowDraggable.autofit.beginRange.cancelEdit.commitEdit.extendRange.focused.hide.moveColumn.onCellBlur.onCellClick.onCellDoubleClick.onCellFocus.onCellKeyDown.onCellPointerDown.onCellPointerEnter.onHeaderContextMenu.onManageColumns.pin.pressSort.rangeDragging.rangeSummary.resizeBy.resizeTo.selectableCount.selectedCount.setCurrent.setDraft.setFilter.setFilterOpen.setMenuOpen.setResizing.setSort.startEdit.tabStop.toggleAll.toggleBranch.toggleExpanded.toggleGroup.toggleSelected".split("."));
82
- function Sn(e) {
83
+ ]), bn = /* @__PURE__ */ new Set(/* @__PURE__ */ "activate.allState.announce.anchorToButton.attachDraggable.attachRowDraggable.autofit.beginRange.cancelEdit.commitEdit.extendRange.focused.hide.moveColumn.onCellBlur.onCellClick.onCellDoubleClick.onCellFocus.onCellKeyDown.onCellPointerDown.onCellPointerEnter.onHeaderContextMenu.onManageColumns.pin.pressSort.rangeDragging.rangeSummary.resizeBy.resizeTo.selectableCount.selectionRowCount.selectedCount.setCurrent.setDraft.setFilter.setFilterOpen.setMenuOpen.setResizing.setSort.startEdit.tabStop.toggleAll.toggleBranch.toggleExpanded.toggleGroup.toggleSelected".split("."));
84
+ function xn(e) {
83
85
  let t = e, n = 0, r = /* @__PURE__ */ new Set();
84
86
  return {
85
87
  grid: new Proxy({}, {
@@ -90,7 +92,7 @@ function Sn(e) {
90
92
  set: (e) => {
91
93
  if (e === t) return;
92
94
  let r = t, i = e;
93
- for (let e of Object.keys(i)) if (!(bn.has(e) || xn.has(e)) && r[e] !== i[e]) {
95
+ for (let e of Object.keys(i)) if (!(yn.has(e) || bn.has(e)) && r[e] !== i[e]) {
94
96
  n += 1;
95
97
  break;
96
98
  }
@@ -112,12 +114,14 @@ function Sn(e) {
112
114
  n,
113
115
  +!!t.isSelected(e),
114
116
  +!!t.isDisabled(e),
117
+ +!!t.isMuted(e),
118
+ +!!t.isUnselectable(e),
115
119
  +!!t.isExpanded(e),
116
120
  +!!t.isLoadingChildren(e),
117
121
  +!!t.hasPopinCell(e),
118
122
  +(t.draggingRow === e),
119
123
  r !== null && r.row === e ? r.column : "",
120
- i !== null && i.cell.row === e ? Tn(i) : "",
124
+ i !== null && i.cell.row === e ? wn(i) : "",
121
125
  t.detailId(e),
122
126
  t.rowLabelOf(e),
123
127
  a
@@ -125,39 +129,39 @@ function Sn(e) {
125
129
  }
126
130
  };
127
131
  }
128
- var Cn = /* @__PURE__ */ new WeakMap(), wn = 0;
129
- function Tn(e) {
130
- let t = Cn.get(e);
131
- return t === void 0 && (wn += 1, t = wn, Cn.set(e, t)), t;
132
+ var Sn = /* @__PURE__ */ new WeakMap(), Cn = 0;
133
+ function wn(e) {
134
+ let t = Sn.get(e);
135
+ return t === void 0 && (Cn += 1, t = Cn, Sn.set(e, t)), t;
132
136
  }
133
- var En = Pe(void 0);
134
- function Dn(e) {
135
- let t = Le(En);
137
+ var Tn = Ne(void 0);
138
+ function En(e) {
139
+ let t = Ie(Tn);
136
140
  if (t === void 0) throw Error("Every DataGrid part must be rendered inside DataGrid.");
137
141
  let n = () => t.signature(e);
138
- return Ve(t.subscribe, n, n), t;
142
+ return Be(t.subscribe, n, n), t;
139
143
  }
140
144
  //#endregion
141
145
  //#region src/data-grid/data-grid-body.tsx
142
- function On({ allNodes: e, bodyStyle: t, firstIndex: n, headerRowCount: r, measureRow: i, nodes: a, heldRows: o, loadMore: s }) {
146
+ function Dn({ allNodes: e, bodyStyle: t, firstIndex: n, headerRowCount: r, measureRow: i, nodes: a, heldRows: o, loadMore: s }) {
143
147
  let c = o.map((t) => e.find((e) => e.key === t)).filter((e) => e !== void 0 && !a.includes(e));
144
- return /* @__PURE__ */ T("div", {
148
+ return /* @__PURE__ */ D("div", {
145
149
  "data-part": "body",
146
150
  "data-part-body": "",
147
151
  role: "rowgroup",
148
152
  style: t,
149
153
  children: [[...a, ...c].map((e, t) => {
150
154
  let a = n + t, o = r + 1 + (e.kind === "row" ? e.index : a);
151
- return e.kind === "group" ? /* @__PURE__ */ w(In, {
155
+ return e.kind === "group" ? /* @__PURE__ */ E(Fn, {
152
156
  node: e,
153
157
  rowIndex: o
154
- }, `group:${e.key}`) : /* @__PURE__ */ w(O, {
158
+ }, `group:${e.key}`) : /* @__PURE__ */ E(jn, {
155
159
  index: a,
156
160
  measure: i,
157
161
  node: e,
158
162
  rowIndex: o
159
163
  }, e.key);
160
- }), s ? /* @__PURE__ */ w("div", {
164
+ }), s ? /* @__PURE__ */ E("div", {
161
165
  "aria-hidden": "true",
162
166
  ref: s.ref,
163
167
  style: {
@@ -169,13 +173,13 @@ function On({ allNodes: e, bodyStyle: t, firstIndex: n, headerRowCount: r, measu
169
173
  }) : null]
170
174
  });
171
175
  }
172
- function kn({ edge: e, firstRowIndex: t, nodes: n }) {
173
- return /* @__PURE__ */ w("div", {
176
+ function On({ edge: e, firstRowIndex: t, nodes: n }) {
177
+ return /* @__PURE__ */ E("div", {
174
178
  "data-edge": e,
175
179
  "data-part": "pinned-rows",
176
180
  "data-part-pinned-rows": "",
177
181
  role: "rowgroup",
178
- children: n.map((e, n) => /* @__PURE__ */ w(O, {
182
+ children: n.map((e, n) => /* @__PURE__ */ E(jn, {
179
183
  index: -1,
180
184
  measure: void 0,
181
185
  node: e,
@@ -183,15 +187,15 @@ function kn({ edge: e, firstRowIndex: t, nodes: n }) {
183
187
  }, e.key))
184
188
  });
185
189
  }
186
- function An({ children: e }) {
187
- return /* @__PURE__ */ w("div", {
190
+ function kn({ children: e }) {
191
+ return /* @__PURE__ */ E("div", {
188
192
  "data-part": "empty",
189
193
  "data-part-empty": "",
190
194
  children: e
191
195
  });
192
196
  }
193
- function jn({ index: e, measure: t, node: n, rowIndex: r }) {
194
- let i = n.key, a = Dn(i), o = a.latest(), s = o.isSelected(i), c = o.isDisabled(i), l = o.current !== null && o.current.row === i, u = o.isExpanded(i) && (o.treeColumn === null || n.childCount === 0), d = o.isLoadingChildren(i), f = o.edit !== null && o.edit.cell.row === i, p = y((n) => {
197
+ function An({ index: e, measure: t, node: n, rowIndex: r }) {
198
+ let i = n.key, a = En(i), o = a.latest(), s = o.isSelected(i), c = o.isDisabled(i), l = o.isUnselectable(i), u = o.current !== null && o.current.row === i, d = o.isExpanded(i) && (o.treeColumn === null || n.childCount === 0), f = o.isLoadingChildren(i), p = o.edit !== null && o.edit.cell.row === i, m = x((n) => {
195
199
  t?.(e, n), a.grid.attachRowDraggable(n, i);
196
200
  }, [
197
201
  t,
@@ -199,41 +203,42 @@ function jn({ index: e, measure: t, node: n, rowIndex: r }) {
199
203
  a,
200
204
  i
201
205
  ]);
202
- return /* @__PURE__ */ T(He, { children: [/* @__PURE__ */ T("div", {
206
+ return /* @__PURE__ */ D(Ve, { children: [/* @__PURE__ */ D("div", {
203
207
  "aria-rowindex": r,
204
- "aria-selected": o.selectionMode === "single" || o.selectionMode === "multiple" ? s : void 0,
208
+ "aria-selected": (o.selectionMode === "single" || o.selectionMode === "multiple") && (s || !l) ? s : void 0,
205
209
  "data-part": "row",
206
210
  "data-part-row": "",
207
211
  "data-row": i,
208
- ref: p,
212
+ ref: m,
209
213
  role: "row",
210
214
  ...o.treeColumn === null ? {} : { "aria-level": n.level },
211
- ...o.treeColumn !== null && (n.childCount > 0 || n.open || d) ? { "aria-expanded": n.open } : {},
212
- ...d ? { "data-loading": "" } : {},
215
+ ...o.treeColumn !== null && (n.childCount > 0 || n.open || f) ? { "aria-expanded": n.open } : {},
216
+ ...f ? { "data-loading": "" } : {},
213
217
  ...o.draggingRow === i ? { "data-dragging": "" } : {},
214
218
  ...s ? { "data-selected": "" } : {},
215
- ...l ? { "data-current": "" } : {},
216
- ...u ? { "data-expanded": "" } : {},
219
+ ...u ? { "data-current": "" } : {},
220
+ ...d ? { "data-expanded": "" } : {},
217
221
  ...c ? { "data-disabled": "" } : {},
218
- ...f ? { "data-editing": "" } : {},
222
+ ...o.isMuted(i) ? { "data-muted": "" } : {},
223
+ ...p ? { "data-editing": "" } : {},
219
224
  children: [
220
- o.columnIds.includes("__selection") ? /* @__PURE__ */ w(Mn, { rowKey: i }) : null,
221
- o.columnIds.includes("__drag") ? /* @__PURE__ */ w(k, { node: n }) : null,
222
- o.columnIds.includes("__expander") ? /* @__PURE__ */ w(Nn, { node: n }) : null,
223
- o.mountedColumns.map((e) => /* @__PURE__ */ w(Pn, {
225
+ o.columnIds.includes("__selection") ? /* @__PURE__ */ E(A, { rowKey: i }) : null,
226
+ o.columnIds.includes("__drag") ? /* @__PURE__ */ E(Mn, { node: n }) : null,
227
+ o.columnIds.includes("__expander") ? /* @__PURE__ */ E(j, { node: n }) : null,
228
+ o.mountedColumns.map((e) => /* @__PURE__ */ E(Nn, {
224
229
  column: e,
225
230
  node: n
226
231
  }, e.id)),
227
- o.popinColumns.length > 0 ? /* @__PURE__ */ w(Fn, { node: n }) : null
232
+ o.popinColumns.length > 0 ? /* @__PURE__ */ E(Pn, { node: n }) : null
228
233
  ]
229
- }), u && o.renderDetail ? /* @__PURE__ */ w("div", {
234
+ }), d && o.renderDetail ? /* @__PURE__ */ E("div", {
230
235
  "aria-rowindex": r + 1,
231
236
  "data-part": "detail",
232
237
  "data-part-detail": "",
233
238
  "data-row": `${i}:detail`,
234
239
  id: o.detailId(i),
235
240
  role: "row",
236
- children: /* @__PURE__ */ w("div", {
241
+ children: /* @__PURE__ */ E("div", {
237
242
  "aria-colindex": 1,
238
243
  "aria-colspan": o.popinColumns.length > 0 ? o.popinIndex : o.columnIds.length,
239
244
  role: "gridcell",
@@ -243,15 +248,15 @@ function jn({ index: e, measure: t, node: n, rowIndex: r }) {
243
248
  })
244
249
  }) : null] });
245
250
  }
246
- var O = Ie(jn);
247
- function Mn({ rowKey: e }) {
248
- let t = D(), n = {
251
+ var jn = Fe(An);
252
+ function A({ rowKey: e }) {
253
+ let t = k(), n = {
249
254
  row: e,
250
- column: dn
251
- }, r = t.current !== null && t.current.row === e && t.current.column === "__selection", i = t.isDisabled(e);
252
- return /* @__PURE__ */ w("div", {
255
+ column: un
256
+ }, r = t.current !== null && t.current.row === e && t.current.column === "__selection", i = t.isDisabled(e) || t.isUnselectable(e);
257
+ return /* @__PURE__ */ E("div", {
253
258
  "aria-colindex": 1,
254
- "data-column": dn,
259
+ "data-column": un,
255
260
  "data-part": "selection",
256
261
  "data-part-selection": "",
257
262
  role: "gridcell",
@@ -263,7 +268,7 @@ function Mn({ rowKey: e }) {
263
268
  onKeyDown: (e) => t.onCellKeyDown(e, n),
264
269
  onPointerDown: (e) => t.onCellPointerDown(e, n),
265
270
  ...r ? { "data-current": "" } : {},
266
- children: /* @__PURE__ */ w(m, {
271
+ children: /* @__PURE__ */ E(y, {
267
272
  checked: t.isSelected(e),
268
273
  disabled: i || void 0,
269
274
  onCheckedChange: (n, r) => {
@@ -274,21 +279,21 @@ function Mn({ rowKey: e }) {
274
279
  });
275
280
  },
276
281
  tabIndex: r ? 0 : -1,
277
- children: /* @__PURE__ */ w(v, { children: t.t("selectRow", {
282
+ children: /* @__PURE__ */ E(re, { children: t.t("selectRow", {
278
283
  row: t.rowLabelOf(e),
279
284
  key: e
280
285
  }) })
281
286
  })
282
287
  });
283
288
  }
284
- function k({ node: e }) {
285
- let t = D(), i = {
289
+ function Mn({ node: e }) {
290
+ let t = k(), i = {
286
291
  row: e.key,
287
- column: pn
288
- }, a = t.columnIds.indexOf(pn) + 1, o = t.current !== null && t.current.row === e.key && t.current.column === "__drag";
289
- return /* @__PURE__ */ w("div", {
292
+ column: fn
293
+ }, a = t.columnIds.indexOf(fn) + 1, o = t.current !== null && t.current.row === e.key && t.current.column === "__drag";
294
+ return /* @__PURE__ */ E("div", {
290
295
  "aria-colindex": a,
291
- "data-column": pn,
296
+ "data-column": fn,
292
297
  "data-kind": "drag",
293
298
  "data-part": "cell",
294
299
  "data-part-cell": "",
@@ -301,7 +306,7 @@ function k({ node: e }) {
301
306
  onKeyDown: (e) => t.onCellKeyDown(e, i),
302
307
  onPointerDown: (e) => t.onCellPointerDown(e, i),
303
308
  ...o ? { "data-current": "" } : {},
304
- children: /* @__PURE__ */ w("button", {
309
+ children: /* @__PURE__ */ E("button", {
305
310
  "aria-disabled": !t.rowsReorderable || void 0,
306
311
  "aria-label": t.t("reorderRow", { row: t.rowLabelOf(e.key) }),
307
312
  "data-part": "row-handle",
@@ -309,18 +314,18 @@ function k({ node: e }) {
309
314
  ...t.rowsReorderable ? {} : { "data-disabled": "" },
310
315
  tabIndex: o ? 0 : -1,
311
316
  type: "button",
312
- children: /* @__PURE__ */ w(r, { children: /* @__PURE__ */ w(n, { name: "grip-vertical" }) })
317
+ children: /* @__PURE__ */ E(r, { children: /* @__PURE__ */ E(n, { name: "grip-vertical" }) })
313
318
  })
314
319
  });
315
320
  }
316
- function Nn({ node: e }) {
317
- let t = D(), i = {
321
+ function j({ node: e }) {
322
+ let t = k(), i = {
318
323
  row: e.key,
319
- column: fn
320
- }, a = t.columnIds.indexOf(fn) + 1, o = t.current !== null && t.current.row === e.key && t.current.column === "__expander", s = t.isExpandable(e.row), c = t.isExpanded(e.key);
321
- return /* @__PURE__ */ w("div", {
324
+ column: dn
325
+ }, a = t.columnIds.indexOf(dn) + 1, o = t.current !== null && t.current.row === e.key && t.current.column === "__expander", s = t.isExpandable(e.row), c = t.isExpanded(e.key);
326
+ return /* @__PURE__ */ E("div", {
322
327
  "aria-colindex": a,
323
- "data-column": fn,
328
+ "data-column": dn,
324
329
  "data-kind": "expander",
325
330
  "data-part": "cell",
326
331
  "data-part-cell": "",
@@ -333,7 +338,7 @@ function Nn({ node: e }) {
333
338
  onKeyDown: (e) => t.onCellKeyDown(e, i),
334
339
  onPointerDown: (e) => t.onCellPointerDown(e, i),
335
340
  ...o ? { "data-current": "" } : {},
336
- children: s ? /* @__PURE__ */ w("button", {
341
+ children: s ? /* @__PURE__ */ E("button", {
337
342
  "aria-controls": c ? t.detailId(e.key) : void 0,
338
343
  "aria-expanded": c,
339
344
  "aria-label": t.t(c ? "collapse" : "expand"),
@@ -342,29 +347,29 @@ function Nn({ node: e }) {
342
347
  onClick: (n) => t.toggleExpanded(e.key, n),
343
348
  tabIndex: o ? 0 : -1,
344
349
  type: "button",
345
- children: /* @__PURE__ */ w(r, { children: /* @__PURE__ */ w(n, { name: "chevron-right" }) })
350
+ children: /* @__PURE__ */ E(r, { children: /* @__PURE__ */ E(n, { name: "chevron-right" }) })
346
351
  }) : null
347
352
  });
348
353
  }
349
- function Pn({ column: e, node: t }) {
350
- let i = D(), a = t.key, o = {
354
+ function Nn({ column: e, node: t }) {
355
+ let i = k(), a = t.key, o = {
351
356
  row: a,
352
357
  column: e.id
353
- }, s = i.columnIds.indexOf(e.id) + 1, c = i.current !== null && i.current.row === a && i.current.column === e.id, l = i.isSelected(a), u = i.edit, d = u !== null && u.cell.row === a && u.columns.includes(e.id), f = i.valueOf(e.column, t.row), p = i.textOf(e.column, t.row), m = i.isEditable(e.column, t.row), h = i.rangeInfo(o), g = d ? u.messages[e.id] ?? null : null, _ = d && u.status === "invalid" && g !== null, ee = d && u.status === "pending", te = e.column.rowHeader ? "row-header" : "cell", ne = i.changedOf(o), re = i.treeColumn === e.id, ie = re && (t.childCount > 0 || t.open || i.isLoadingChildren(a) || i.hasChildren(t.row));
354
- return /* @__PURE__ */ T("div", {
355
- ...gn(e),
358
+ }, s = i.columnIds.indexOf(e.id) + 1, c = i.current !== null && i.current.row === a && i.current.column === e.id, l = i.isSelected(a), u = i.edit, d = u !== null && u.cell.row === a && u.columns.includes(e.id), f = i.valueOf(e.column, t.row), p = i.textOf(e.column, t.row), m = i.isEditable(e.column, t.row), h = i.rangeInfo(o), g = d ? u.messages[e.id] ?? null : null, _ = d && u.status === "invalid" && g !== null, ee = d && u.status === "pending", v = e.column.rowHeader ? "row-header" : "cell", te = i.changedOf(o), y = i.treeColumn === e.id, ne = y && (t.childCount > 0 || t.open || i.isLoadingChildren(a) || i.hasChildren(t.row));
359
+ return /* @__PURE__ */ D("div", {
360
+ ...hn(e),
356
361
  "aria-colindex": s,
357
362
  "aria-readonly": i.anyEditable && !m && e.kind !== "actions" ? !0 : void 0,
358
363
  "aria-selected": i.selectionMode === "range" && h.inside ? !0 : void 0,
359
364
  "aria-invalid": _ ? !0 : void 0,
360
- "data-part": te,
361
- ...je("part", te),
365
+ "data-part": v,
366
+ ...Ae("part", v),
362
367
  "data-text": e.text,
363
- role: te === "row-header" ? "rowheader" : "gridcell",
364
- style: re ? {
365
- ...hn(e, s),
368
+ role: v === "row-header" ? "rowheader" : "gridcell",
369
+ style: y ? {
370
+ ...mn(e, s),
366
371
  "--slotted-data-grid-level": String(t.level)
367
- } : hn(e, s),
372
+ } : mn(e, s),
368
373
  tabIndex: c ? 0 : -1,
369
374
  title: _ && g ? g : void 0,
370
375
  onClick: (e) => i.onCellClick(e, o),
@@ -381,10 +386,10 @@ function Pn({ column: e, node: t }) {
381
386
  ...d ? { "data-editing": "" } : {},
382
387
  ..._ ? { "data-invalid": "" } : {},
383
388
  ...ee ? { "data-loading": "" } : {},
384
- ...ne ? { "data-changed": ne } : {},
389
+ ...te ? { "data-changed": te } : {},
385
390
  ...i.anyEditable && !m && e.kind !== "actions" ? { "data-readonly": "" } : {},
386
- ...re ? { "data-tree": ie ? "branch" : "leaf" } : {},
387
- children: [re ? ie ? /* @__PURE__ */ w("button", {
391
+ ...y ? { "data-tree": ne ? "branch" : "leaf" } : {},
392
+ children: [y ? ne ? /* @__PURE__ */ E("button", {
388
393
  "aria-expanded": t.open,
389
394
  "aria-label": i.t(t.open ? "collapse" : "expand"),
390
395
  "data-part": "tree-toggle",
@@ -396,13 +401,13 @@ function Pn({ column: e, node: t }) {
396
401
  tabIndex: -1,
397
402
  type: "button",
398
403
  ...i.isLoadingChildren(a) ? { "data-loading": "" } : {},
399
- children: /* @__PURE__ */ w(r, { children: /* @__PURE__ */ w(n, { name: i.isLoadingChildren(a) ? "loader-circle" : "chevron-right" }) })
400
- }) : /* @__PURE__ */ w("span", {
404
+ children: /* @__PURE__ */ E(r, { children: /* @__PURE__ */ E(n, { name: i.isLoadingChildren(a) ? "loader-circle" : "chevron-right" }) })
405
+ }) : /* @__PURE__ */ E("span", {
401
406
  "aria-hidden": !0,
402
407
  "data-part": "tree-toggle",
403
408
  "data-part-tree-toggle": "",
404
409
  "data-empty": ""
405
- }) : null, d ? /* @__PURE__ */ w("div", {
410
+ }) : null, d ? /* @__PURE__ */ E("div", {
406
411
  "data-part": "editor",
407
412
  "data-part-editor": "",
408
413
  children: i.renderEditorContent({
@@ -431,14 +436,14 @@ function Pn({ column: e, node: t }) {
431
436
  })]
432
437
  });
433
438
  }
434
- function Fn({ node: e }) {
435
- let t = D(), n = e.key, r = {
439
+ function Pn({ node: e }) {
440
+ let t = k(), n = e.key, r = {
436
441
  row: n,
437
- column: ft
438
- }, i = t.current !== null && t.current.row === n && t.current.column === ft, a = t.isSelected(n);
439
- return /* @__PURE__ */ w("div", {
442
+ column: dt
443
+ }, i = t.current !== null && t.current.row === n && t.current.column === dt, a = t.isSelected(n);
444
+ return /* @__PURE__ */ E("div", {
440
445
  "aria-colindex": t.popinIndex,
441
- "data-column": ft,
446
+ "data-column": dt,
442
447
  "data-part": "popin",
443
448
  "data-part-popin": "",
444
449
  role: "gridcell",
@@ -452,15 +457,15 @@ function Fn({ node: e }) {
452
457
  onKeyDown: (e) => t.onCellKeyDown(e, r),
453
458
  onPointerDown: (e) => t.onCellPointerDown(e, r),
454
459
  ...i ? { "data-current": "" } : {},
455
- children: t.popinColumns.map((r) => /* @__PURE__ */ T("div", {
460
+ children: t.popinColumns.map((r) => /* @__PURE__ */ D("div", {
456
461
  "data-field": r.id,
457
462
  "data-part": "popin-field",
458
463
  "data-part-popin-field": "",
459
- children: [r.column.label ? /* @__PURE__ */ w("span", {
464
+ children: [r.column.label ? /* @__PURE__ */ E("span", {
460
465
  "data-part": "popin-label",
461
466
  "data-part-popin-label": "",
462
467
  children: r.column.label
463
- }) : null, /* @__PURE__ */ w("div", {
468
+ }) : null, /* @__PURE__ */ E("div", {
464
469
  "data-part": "popin-value",
465
470
  "data-part-popin-value": "",
466
471
  "data-text": r.text,
@@ -477,12 +482,12 @@ function Fn({ node: e }) {
477
482
  }, r.id))
478
483
  });
479
484
  }
480
- function In({ node: e, rowIndex: t }) {
481
- let i = D(), a = `${ut}${e.key}`, o = i.columns.find((t) => t.id === e.column), s = i.resolved.slice(1).filter((e) => e.column.aggregate !== void 0), c = s.length > 0 ? Math.min(...s.map((e) => i.columnIds.indexOf(e.id) + 1)) : i.columnIds.length + 1, l = (e) => ({
485
+ function Fn({ node: e, rowIndex: t }) {
486
+ let i = k(), a = `${lt}${e.key}`, o = i.columns.find((t) => t.id === e.column), s = i.resolved.slice(1).filter((e) => e.column.aggregate !== void 0), c = s.length > 0 ? Math.min(...s.map((e) => i.columnIds.indexOf(e.id) + 1)) : i.columnIds.length + 1, l = (e) => ({
482
487
  row: a,
483
488
  column: e
484
489
  }), u = i.columnIds[0], d = i.current !== null && i.current.row === a, f = i.t("groupCount", { count: e.count });
485
- return /* @__PURE__ */ T("div", {
490
+ return /* @__PURE__ */ D("div", {
486
491
  "aria-expanded": e.expanded,
487
492
  "aria-level": e.level,
488
493
  "aria-rowindex": t,
@@ -492,7 +497,7 @@ function In({ node: e, rowIndex: t }) {
492
497
  role: "row",
493
498
  style: { "--slotted-data-grid-level": String(e.level) },
494
499
  ...d ? { "data-current": "" } : {},
495
- children: [/* @__PURE__ */ T("div", {
500
+ children: [/* @__PURE__ */ D("div", {
496
501
  "aria-colindex": 1,
497
502
  "aria-colspan": c - 1,
498
503
  "data-column": u,
@@ -506,7 +511,7 @@ function In({ node: e, rowIndex: t }) {
506
511
  onKeyDown: (e) => i.onCellKeyDown(e, l(u)),
507
512
  onPointerDown: (e) => i.onCellPointerDown(e, l(u)),
508
513
  ...d && i.current?.column === u ? { "data-current": "" } : {},
509
- children: [/* @__PURE__ */ w("button", {
514
+ children: [/* @__PURE__ */ E("button", {
510
515
  "aria-expanded": e.expanded,
511
516
  "aria-label": i.t(e.expanded ? "collapseGroup" : "expandGroup", { group: e.text }),
512
517
  "data-part": "group-toggle",
@@ -516,29 +521,29 @@ function In({ node: e, rowIndex: t }) {
516
521
  },
517
522
  tabIndex: -1,
518
523
  type: "button",
519
- children: /* @__PURE__ */ w(r, { children: /* @__PURE__ */ w(n, { name: "chevron-right" }) })
524
+ children: /* @__PURE__ */ E(r, { children: /* @__PURE__ */ E(n, { name: "chevron-right" }) })
520
525
  }), i.renderGroup && o ? i.renderGroup({
521
526
  node: e,
522
527
  column: o,
523
528
  toggle: () => i.toggleGroup(e.key)
524
- }) : /* @__PURE__ */ T(He, { children: [/* @__PURE__ */ w("span", { children: e.text }), /* @__PURE__ */ w("span", {
529
+ }) : /* @__PURE__ */ D(Ve, { children: [/* @__PURE__ */ E("span", { children: e.text }), /* @__PURE__ */ E("span", {
525
530
  "data-count": "",
526
531
  children: f
527
532
  })] })]
528
533
  }), s.map((t) => {
529
- let n = i.columnIds.indexOf(t.id) + 1, r = e.aggregates[t.id], a = r == null ? "" : gt({
534
+ let n = i.columnIds.indexOf(t.id) + 1, r = e.aggregates[t.id], a = r == null ? "" : ht({
530
535
  ...t.column,
531
536
  accessor: () => r
532
537
  }, e.rows[0], {
533
538
  locale: i.locale,
534
539
  booleans: i.booleans
535
540
  }), o = l(t.id), s = d && i.current?.column === t.id;
536
- return /* @__PURE__ */ Fe("div", {
537
- ...gn(t),
541
+ return /* @__PURE__ */ Pe("div", {
542
+ ...hn(t),
538
543
  "aria-colindex": n,
539
544
  key: t.id,
540
545
  role: "gridcell",
541
- style: hn(t, n),
546
+ style: mn(t, n),
542
547
  tabIndex: s ? 0 : -1,
543
548
  onFocus: (e) => {
544
549
  e.target === e.currentTarget && i.onCellFocus(o);
@@ -546,34 +551,34 @@ function In({ node: e, rowIndex: t }) {
546
551
  onKeyDown: (e) => i.onCellKeyDown(e, o),
547
552
  onPointerDown: (e) => i.onCellPointerDown(e, o),
548
553
  ...s ? { "data-current": "" } : {}
549
- }, /* @__PURE__ */ w("span", {
554
+ }, /* @__PURE__ */ E("span", {
550
555
  "data-aggregate": "",
551
556
  children: a
552
557
  }));
553
558
  })]
554
559
  });
555
560
  }
556
- function Ln({ rows: e, rowSize: t }) {
557
- let n = D(), r = n.columnIds.length - n.resolved.length;
558
- return /* @__PURE__ */ w("div", {
561
+ function In({ rows: e, rowSize: t }) {
562
+ let n = k(), r = n.columnIds.length - n.resolved.length;
563
+ return /* @__PURE__ */ E("div", {
559
564
  "aria-hidden": !0,
560
565
  "data-part": "loader",
561
566
  "data-part-loader": "",
562
567
  role: "rowgroup",
563
568
  style: { "--slotted-data-grid-loader-row-size": `${t}px` },
564
- children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ w("div", {
569
+ children: Array.from({ length: e }, (e, t) => /* @__PURE__ */ E("div", {
565
570
  "data-part": "row",
566
571
  "data-part-row": "",
567
572
  role: "row",
568
573
  children: n.columnIds.map((e, i) => {
569
574
  let a = n.resolved[i - r];
570
- return /* @__PURE__ */ w("div", {
575
+ return /* @__PURE__ */ E("div", {
571
576
  role: "gridcell",
572
577
  ...a?.align ? { "data-align": a.align } : {},
573
578
  ...a?.numeric ? { "data-numeric": "" } : {},
574
579
  style: { "--slotted-data-grid-column": String(i + 1) },
575
- children: a === void 0 ? null : /* @__PURE__ */ w(h, {
576
- inlineSize: Xe(t, i - r),
580
+ children: a === void 0 ? null : /* @__PURE__ */ E(ne, {
581
+ inlineSize: Ye(t, i - r),
577
582
  loading: !0
578
583
  })
579
584
  }, e);
@@ -581,10 +586,10 @@ function Ln({ rows: e, rowSize: t }) {
581
586
  }, t))
582
587
  });
583
588
  }
584
- function Rn({ aggregates: e, rowIndex: t }) {
585
- let n = D(), r = n.current !== null && n.current.row === mt, i = n.columnIds.length - n.resolved.length, a = (t) => {
589
+ function Ln({ aggregates: e, rowIndex: t }) {
590
+ let n = k(), r = n.current !== null && n.current.row === pt, i = n.columnIds.length - n.resolved.length, a = (t) => {
586
591
  let r = e[t.id];
587
- return r == null ? "" : gt({
592
+ return r == null ? "" : ht({
588
593
  ...t.column,
589
594
  accessor: () => r
590
595
  }, {}, {
@@ -592,19 +597,19 @@ function Rn({ aggregates: e, rowIndex: t }) {
592
597
  booleans: n.booleans
593
598
  });
594
599
  }, o = {
595
- row: mt,
596
- column: ft
597
- }, s = r && n.current?.column === ft;
598
- return /* @__PURE__ */ w("div", {
600
+ row: pt,
601
+ column: dt
602
+ }, s = r && n.current?.column === dt;
603
+ return /* @__PURE__ */ E("div", {
599
604
  "data-part": "summary",
600
605
  "data-part-summary": "",
601
606
  role: "rowgroup",
602
- children: /* @__PURE__ */ T("div", {
607
+ children: /* @__PURE__ */ D("div", {
603
608
  "aria-rowindex": t,
604
- "data-row": mt,
609
+ "data-row": pt,
605
610
  role: "row",
606
611
  children: [
607
- n.columnIds.slice(0, i).map((e, t) => /* @__PURE__ */ w("div", {
612
+ n.columnIds.slice(0, i).map((e, t) => /* @__PURE__ */ E("div", {
608
613
  "aria-colindex": t + 1,
609
614
  "data-column": e,
610
615
  "data-part": "summary-cell",
@@ -615,17 +620,17 @@ function Rn({ aggregates: e, rowIndex: t }) {
615
620
  }, e)),
616
621
  n.mountedColumns.map((e) => {
617
622
  let t = n.columnIds.indexOf(e.id) + 1, i = {
618
- row: mt,
623
+ row: pt,
619
624
  column: e.id
620
625
  }, o = r && n.current?.column === e.id, s = a(e);
621
- return /* @__PURE__ */ Fe("div", {
622
- ...gn(e),
626
+ return /* @__PURE__ */ Pe("div", {
627
+ ...hn(e),
623
628
  "aria-colindex": t,
624
629
  "data-part": "summary-cell",
625
630
  "data-part-summary-cell": "",
626
631
  key: e.id,
627
632
  role: "gridcell",
628
- style: hn(e, t),
633
+ style: mn(e, t),
629
634
  tabIndex: o ? 0 : -1,
630
635
  onFocus: (e) => {
631
636
  e.target === e.currentTarget && n.onCellFocus(i);
@@ -633,11 +638,11 @@ function Rn({ aggregates: e, rowIndex: t }) {
633
638
  onKeyDown: (e) => n.onCellKeyDown(e, i),
634
639
  onPointerDown: (e) => n.onCellPointerDown(e, i),
635
640
  ...o ? { "data-current": "" } : {}
636
- }, /* @__PURE__ */ w("span", { children: s }));
641
+ }, /* @__PURE__ */ E("span", { children: s }));
637
642
  }),
638
- n.hasPopinCell(mt) ? /* @__PURE__ */ w("div", {
643
+ n.hasPopinCell(pt) ? /* @__PURE__ */ E("div", {
639
644
  "aria-colindex": n.popinIndex,
640
- "data-column": ft,
645
+ "data-column": dt,
641
646
  "data-part": "popin",
642
647
  "data-part-popin": "",
643
648
  role: "gridcell",
@@ -649,18 +654,18 @@ function Rn({ aggregates: e, rowIndex: t }) {
649
654
  onKeyDown: (e) => n.onCellKeyDown(e, o),
650
655
  onPointerDown: (e) => n.onCellPointerDown(e, o),
651
656
  ...s ? { "data-current": "" } : {},
652
- children: n.popinAggregated.map((e) => /* @__PURE__ */ T("div", {
657
+ children: n.popinAggregated.map((e) => /* @__PURE__ */ D("div", {
653
658
  "data-field": e.id,
654
659
  "data-part": "popin-field",
655
660
  "data-part-popin-field": "",
656
- children: [e.column.label ? /* @__PURE__ */ w("span", {
661
+ children: [e.column.label ? /* @__PURE__ */ E("span", {
657
662
  "data-part": "popin-label",
658
663
  "data-part-popin-label": "",
659
664
  children: e.column.label
660
- }) : null, /* @__PURE__ */ w("div", {
665
+ }) : null, /* @__PURE__ */ E("div", {
661
666
  "data-part": "popin-value",
662
667
  "data-part-popin-value": "",
663
- children: /* @__PURE__ */ w("span", { children: a(e) })
668
+ children: /* @__PURE__ */ E("span", { children: a(e) })
664
669
  })]
665
670
  }, e.id))
666
671
  }) : null
@@ -670,30 +675,30 @@ function Rn({ aggregates: e, rowIndex: t }) {
670
675
  }
671
676
  //#endregion
672
677
  //#region src/data-grid/data-grid-defaults.tsx
673
- var zn = Pe({});
674
- function Bn({ children: e, ...t }) {
675
- let n = { ...Le(zn) };
678
+ var Rn = Ne({});
679
+ function zn({ children: e, ...t }) {
680
+ let n = { ...Ie(Rn) };
676
681
  for (let [e, r] of Object.entries(t)) r !== void 0 && (n[e] = r);
677
- let r = x(() => n, [JSON.stringify(n)]);
678
- return /* @__PURE__ */ w(zn.Provider, {
682
+ let r = C(() => n, [JSON.stringify(n)]);
683
+ return /* @__PURE__ */ E(Rn.Provider, {
679
684
  value: r,
680
685
  children: e
681
686
  });
682
687
  }
683
- function Vn() {
684
- return Le(zn);
688
+ function Bn() {
689
+ return Ie(Rn);
685
690
  }
686
691
  //#endregion
687
692
  //#region src/data-grid/use-data-source.ts
688
- var Hn = 20, Un = [];
689
- function Wn(e, t) {
690
- let [n, r] = C({
693
+ var Vn = 20, Hn = [];
694
+ function Un(e, t) {
695
+ let [n, r] = T({
691
696
  key: null,
692
697
  result: null,
693
698
  loading: e !== void 0,
694
699
  error: null
695
- }), i = S(/* @__PURE__ */ new Map()), a = S(null), [o, s] = C(0), c = e ? Lt(t) : null;
696
- b(() => {
700
+ }), i = w(/* @__PURE__ */ new Map()), a = w(null), [o, s] = T(0), c = e ? It(t) : null;
701
+ S(() => {
697
702
  if (!e || c === null) return;
698
703
  let n = i.current.get(c);
699
704
  if (n) {
@@ -713,7 +718,7 @@ function Wn(e, t) {
713
718
  error: null
714
719
  })), e.getRows(t, { signal: o.signal }).then((t) => {
715
720
  if (o.signal.aborted) return;
716
- let n = e.cacheSize ?? Hn;
721
+ let n = e.cacheSize ?? Vn;
717
722
  if (n > 0) for (i.current.set(c, t); i.current.size > n;) {
718
723
  let e = i.current.keys().next().value;
719
724
  if (e === void 0) break;
@@ -739,11 +744,11 @@ function Wn(e, t) {
739
744
  c,
740
745
  o
741
746
  ]);
742
- let l = y(() => s((e) => e + 1), []), u = y(() => {
747
+ let l = x(() => s((e) => e + 1), []), u = x(() => {
743
748
  i.current.clear(), s((e) => e + 1);
744
749
  }, []);
745
750
  return {
746
- rows: n.result?.rows ?? Un,
751
+ rows: n.result?.rows ?? Hn,
747
752
  total: n.result?.total,
748
753
  hasMore: n.result?.hasMore,
749
754
  loading: n.loading,
@@ -754,26 +759,26 @@ function Wn(e, t) {
754
759
  }
755
760
  //#endregion
756
761
  //#region src/data-grid/data-grid-editors.tsx
757
- function Gn(e) {
758
- return /* @__PURE__ */ w("span", {
762
+ function Wn(e) {
763
+ return /* @__PURE__ */ E("span", {
759
764
  title: e.text,
760
765
  children: e.text
761
766
  });
762
767
  }
763
- function Kn(e) {
768
+ function Gn(e) {
764
769
  if (!e) return null;
765
770
  let t = String(e);
766
- return rt(/^\d{2}$/.test(t) ? `${t}:00` : t);
771
+ return nt(/^\d{2}$/.test(t) ? `${t}:00` : t);
767
772
  }
768
- function qn(e) {
773
+ function Kn(e) {
769
774
  if (!e) return null;
770
775
  let t = String(e);
771
- return /^\d{4}-\d{2}-\d{2}$/.test(t) ? nt(`${t}T00:00`) : /^\d{4}-\d{2}-\d{2}T\d{2}$/.test(t) ? nt(`${t}:00`) : nt(t);
776
+ return /^\d{4}-\d{2}-\d{2}$/.test(t) ? tt(`${t}T00:00`) : /^\d{4}-\d{2}-\d{2}T\d{2}$/.test(t) ? tt(`${t}:00`) : tt(t);
772
777
  }
773
- function Jn(e) {
774
- return e ? tt(String(e)) : null;
778
+ function qn(e) {
779
+ return e ? et(String(e)) : null;
775
780
  }
776
- function Yn(e, t, n) {
781
+ function Jn(e, t, n) {
777
782
  let { column: r, draft: i, setDraft: a, invalid: o, message: s } = e, c = r.kind ?? "text", l = r.label, u = {
778
783
  "aria-label": l,
779
784
  autoFocus: !0,
@@ -786,39 +791,39 @@ function Yn(e, t, n) {
786
791
  } : {}
787
792
  };
788
793
  switch (c) {
789
- case "number": return /* @__PURE__ */ w(xe, {
794
+ case "number": return /* @__PURE__ */ E(be, {
790
795
  ...u,
791
796
  onValueChange: (e) => a(e),
792
797
  value: typeof i == "number" ? i : null,
793
798
  ...n === void 0 ? {} : { locale: n }
794
799
  });
795
- case "boolean": return /* @__PURE__ */ w(m, {
800
+ case "boolean": return /* @__PURE__ */ E(y, {
796
801
  "aria-label": l,
797
802
  autoFocus: !0,
798
803
  checked: i === !0,
799
804
  onCheckedChange: (e) => a(e)
800
805
  });
801
- case "date": return /* @__PURE__ */ w(de, {
806
+ case "date": return /* @__PURE__ */ E(ue, {
802
807
  ...u,
803
- onValueChange: (e) => a(Qe(e) ? it(e) : null),
804
- value: Jn(i),
808
+ onValueChange: (e) => a(Ze(e) ? rt(e) : null),
809
+ value: qn(i),
805
810
  ...n === void 0 ? {} : { locale: n }
806
811
  });
807
- case "time": return /* @__PURE__ */ w(he, {
812
+ case "time": return /* @__PURE__ */ E(me, {
808
813
  ...u,
809
- onValueChange: (e) => a(et(e) ? ot(e, "minute") : null),
810
- value: Kn(i),
814
+ onValueChange: (e) => a($e(e) ? at(e, "minute") : null),
815
+ value: Gn(i),
811
816
  ...n === void 0 ? {} : { locale: n }
812
817
  });
813
- case "datetime": return /* @__PURE__ */ w(me, {
818
+ case "datetime": return /* @__PURE__ */ E(pe, {
814
819
  ...u,
815
- onValueChange: (e) => a($e(e) ? at(e) : null),
816
- value: qn(i),
820
+ onValueChange: (e) => a(Qe(e) ? it(e) : null),
821
+ value: Kn(i),
817
822
  ...n === void 0 ? {} : { locale: n }
818
823
  });
819
824
  case "set": {
820
825
  let n = r.options ?? [], o = Array.isArray(e.value);
821
- return /* @__PURE__ */ T(we, {
826
+ return /* @__PURE__ */ D(Ce, {
822
827
  fullWidth: !0,
823
828
  items: n.map((e) => ({
824
829
  label: e.label,
@@ -829,17 +834,17 @@ function Yn(e, t, n) {
829
834
  size: "sm",
830
835
  value: o ? i ?? [] : i == null ? null : String(i),
831
836
  variant: "plain",
832
- children: [/* @__PURE__ */ w(De, {
837
+ children: [/* @__PURE__ */ E(Ee, {
833
838
  "aria-label": l,
834
839
  autoFocus: !0,
835
- children: /* @__PURE__ */ w(Oe, { placeholder: t("filterAny") })
836
- }), /* @__PURE__ */ w(Te, { children: n.map((e) => /* @__PURE__ */ w(Ee, {
840
+ children: /* @__PURE__ */ E(De, { placeholder: t("filterAny") })
841
+ }), /* @__PURE__ */ E(we, { children: n.map((e) => /* @__PURE__ */ E(Te, {
837
842
  value: e.value,
838
843
  children: e.label
839
844
  }, e.value)) })]
840
845
  });
841
846
  }
842
- default: return /* @__PURE__ */ w(g, {
847
+ default: return /* @__PURE__ */ E(b, {
843
848
  ...u,
844
849
  onValueChange: (e) => a(e),
845
850
  value: i == null ? "" : String(i)
@@ -848,7 +853,7 @@ function Yn(e, t, n) {
848
853
  }
849
854
  //#endregion
850
855
  //#region src/data-grid/data-grid-filter.tsx
851
- var A = [
856
+ var Yn = [
852
857
  "text",
853
858
  "number",
854
859
  "date",
@@ -857,21 +862,21 @@ var A = [
857
862
  "boolean",
858
863
  "set"
859
864
  ];
860
- function j(e) {
861
- return A.includes(e.kind) ? e.kind : null;
865
+ function M(e) {
866
+ return Yn.includes(e.kind) ? e.kind : null;
862
867
  }
863
- function Xn(e, t) {
864
- return sn(e) === sn(t);
868
+ function N(e, t) {
869
+ return on(e) === on(t);
865
870
  }
866
- var Zn = [
871
+ var Xn = [
867
872
  "date",
868
873
  "time",
869
874
  "datetime"
870
875
  ];
871
- function Qn(e, t) {
872
- return rn(t) === 2 && Zn.includes(e);
876
+ function Zn(e, t) {
877
+ return nn(t) === 2 && Xn.includes(e);
873
878
  }
874
- function $n({ kind: e, start: t, end: n, onChange: r, t: i, locale: a, variant: o, autoFocus: s }) {
879
+ function Qn({ kind: e, start: t, end: n, onChange: r, t: i, locale: a, variant: o, autoFocus: s }) {
875
880
  let c = {
876
881
  size: "sm",
877
882
  variant: o,
@@ -881,39 +886,39 @@ function $n({ kind: e, start: t, end: n, onChange: r, t: i, locale: a, variant:
881
886
  end: i("filterTo"),
882
887
  start: i("filterFrom")
883
888
  } };
884
- return e === "time" ? /* @__PURE__ */ w(Ae, {
889
+ return e === "time" ? /* @__PURE__ */ E(ke, {
885
890
  confirm: !1,
886
891
  ...c,
887
892
  ...l,
888
- onValueChange: (e) => r(et(e?.start) ? ot(e.start, "minute") : null, et(e?.end) ? ot(e.end, "minute") : null),
893
+ onValueChange: (e) => r($e(e?.start) ? at(e.start, "minute") : null, $e(e?.end) ? at(e.end, "minute") : null),
889
894
  value: {
890
- start: Kn(t),
891
- end: Kn(n)
895
+ start: Gn(t),
896
+ end: Gn(n)
892
897
  }
893
- }) : e === "datetime" ? /* @__PURE__ */ w(ge, {
898
+ }) : e === "datetime" ? /* @__PURE__ */ E(he, {
894
899
  confirm: !1,
895
900
  ...c,
896
901
  ...l,
897
- onValueChange: (e) => r($e(e?.start) ? at(e.start) : null, $e(e?.end) ? at(e.end) : null),
902
+ onValueChange: (e) => r(Qe(e?.start) ? it(e.start) : null, Qe(e?.end) ? it(e.end) : null),
898
903
  value: {
899
- start: qn(t),
900
- end: qn(n)
904
+ start: Kn(t),
905
+ end: Kn(n)
901
906
  }
902
- }) : /* @__PURE__ */ w(fe, {
907
+ }) : /* @__PURE__ */ E(de, {
903
908
  confirm: !1,
904
909
  ...c,
905
910
  messages: {
906
911
  end: i("filterTo"),
907
912
  start: i("filterFrom")
908
913
  },
909
- onValueChange: (e) => r(Qe(e?.start) ? it(e.start) : null, Qe(e?.end) ? it(e.end) : null),
914
+ onValueChange: (e) => r(Ze(e?.start) ? rt(e.start) : null, Ze(e?.end) ? rt(e.end) : null),
910
915
  value: {
911
- start: Jn(t),
912
- end: Jn(n)
916
+ start: qn(t),
917
+ end: qn(n)
913
918
  }
914
919
  });
915
920
  }
916
- function er({ autoFocus: e, column: t, counts: n, kind: r, label: i, t: a, locale: o, onChange: s, onKeyDown: c, placeholder: l, value: u, variant: d }) {
921
+ function $n({ autoFocus: e, column: t, counts: n, kind: r, label: i, t: a, locale: o, onChange: s, onKeyDown: c, placeholder: l, value: u, variant: d }) {
917
922
  let f = {
918
923
  "aria-label": i,
919
924
  size: "sm",
@@ -923,31 +928,31 @@ function er({ autoFocus: e, column: t, counts: n, kind: r, label: i, t: a, local
923
928
  ...o === void 0 ? {} : { locale: o }
924
929
  };
925
930
  switch (r) {
926
- case "number": return /* @__PURE__ */ w(xe, {
931
+ case "number": return /* @__PURE__ */ E(be, {
927
932
  ...f,
928
933
  onValueChange: (e) => s(e),
929
934
  placeholder: l ?? i,
930
935
  stepper: "none",
931
936
  value: typeof u == "number" ? u : null
932
937
  });
933
- case "date": return /* @__PURE__ */ w(ue, {
938
+ case "date": return /* @__PURE__ */ E(le, {
934
939
  ...f,
935
- onValueChange: (e) => s(Qe(e) ? it(e) : null),
936
- value: Jn(u)
940
+ onValueChange: (e) => s(Ze(e) ? rt(e) : null),
941
+ value: qn(u)
937
942
  });
938
- case "time": return /* @__PURE__ */ w(ke, {
943
+ case "time": return /* @__PURE__ */ E(Oe, {
939
944
  confirm: !1,
940
945
  ...f,
941
- onValueChange: (e) => s(et(e) ? ot(e, "minute") : null),
942
- value: Kn(u)
946
+ onValueChange: (e) => s($e(e) ? at(e, "minute") : null),
947
+ value: Gn(u)
943
948
  });
944
- case "datetime": return /* @__PURE__ */ w(pe, {
949
+ case "datetime": return /* @__PURE__ */ E(fe, {
945
950
  confirm: !1,
946
951
  ...f,
947
- onValueChange: (e) => s($e(e) ? at(e) : null),
948
- value: qn(u)
952
+ onValueChange: (e) => s(Qe(e) ? it(e) : null),
953
+ value: Kn(u)
949
954
  });
950
- case "boolean": return /* @__PURE__ */ T(we, {
955
+ case "boolean": return /* @__PURE__ */ D(Ce, {
951
956
  fullWidth: !0,
952
957
  width: "content",
953
958
  items: [{
@@ -961,14 +966,14 @@ function er({ autoFocus: e, column: t, counts: n, kind: r, label: i, t: a, local
961
966
  size: "sm",
962
967
  value: u === !0 ? "true" : u === !1 ? "false" : null,
963
968
  variant: d,
964
- children: [/* @__PURE__ */ w(De, {
969
+ children: [/* @__PURE__ */ E(Ee, {
965
970
  "aria-label": i,
966
971
  ...e ? { autoFocus: !0 } : {},
967
- children: /* @__PURE__ */ w(Oe, { placeholder: a("filterAny") })
968
- }), /* @__PURE__ */ T(Te, { children: [/* @__PURE__ */ w(Ee, {
972
+ children: /* @__PURE__ */ E(De, { placeholder: a("filterAny") })
973
+ }), /* @__PURE__ */ D(we, { children: [/* @__PURE__ */ E(Te, {
969
974
  value: "true",
970
975
  children: a("filterYes")
971
- }), /* @__PURE__ */ w(Ee, {
976
+ }), /* @__PURE__ */ E(Te, {
972
977
  value: "false",
973
978
  children: a("filterNo")
974
979
  })] })]
@@ -978,7 +983,7 @@ function er({ autoFocus: e, column: t, counts: n, kind: r, label: i, t: a, local
978
983
  value: e,
979
984
  label: e
980
985
  })) : [], f = [...r, ...l], p = Array.isArray(u) ? u : [];
981
- return /* @__PURE__ */ T(be, {
986
+ return /* @__PURE__ */ D(ye, {
982
987
  fullWidth: !0,
983
988
  items: f.map((e) => ({
984
989
  label: e.label,
@@ -991,13 +996,13 @@ function er({ autoFocus: e, column: t, counts: n, kind: r, label: i, t: a, local
991
996
  variant: d,
992
997
  width: "content",
993
998
  ...o === void 0 ? {} : { locale: o },
994
- children: [/* @__PURE__ */ w(_e, {
999
+ children: [/* @__PURE__ */ E(ge, {
995
1000
  "aria-label": i,
996
1001
  placeholder: a("filterAny"),
997
1002
  ...e ? { autoFocus: !0 } : {}
998
- }), /* @__PURE__ */ w(ve, {
1003
+ }), /* @__PURE__ */ E(_e, {
999
1004
  "aria-label": i,
1000
- children: f.map((e) => /* @__PURE__ */ T(ye, {
1005
+ children: f.map((e) => /* @__PURE__ */ D(ve, {
1001
1006
  textValue: e.label,
1002
1007
  value: e.value,
1003
1008
  children: [e.label, n?.has(e.value) ? ` (${n.get(e.value)})` : ""]
@@ -1005,7 +1010,7 @@ function er({ autoFocus: e, column: t, counts: n, kind: r, label: i, t: a, local
1005
1010
  })]
1006
1011
  });
1007
1012
  }
1008
- default: return /* @__PURE__ */ w(g, {
1013
+ default: return /* @__PURE__ */ E(b, {
1009
1014
  ...f,
1010
1015
  onValueChange: (e) => s(e),
1011
1016
  placeholder: l ?? i,
@@ -1013,113 +1018,113 @@ function er({ autoFocus: e, column: t, counts: n, kind: r, label: i, t: a, local
1013
1018
  });
1014
1019
  }
1015
1020
  }
1016
- function tr({ column: e, children: t }) {
1017
- let n = D(), r = j(e), i = n.filterOpen === e.id && r !== null, a = n.filterOf(e.id), o = n.t, s = S(null), c = y((e) => {
1021
+ function er({ column: e, children: t }) {
1022
+ let n = k(), r = M(e), i = n.filterOpen === e.id && r !== null, a = n.filterOf(e.id), o = n.t, s = w(null), c = x((e) => {
1018
1023
  s.current = e;
1019
- }, []), u = y(() => r ? $t(r) : null, [r]), [d, f] = C(a ?? u()), p = S(!1);
1020
- if (b(() => {
1024
+ }, []), u = x(() => r ? Qt(r) : null, [r]), [d, f] = T(a ?? u()), p = w(!1);
1025
+ if (S(() => {
1021
1026
  i && !p.current && f(a ?? u()), p.current = i;
1022
1027
  }, [
1023
1028
  i,
1024
1029
  a,
1025
1030
  u
1026
- ]), !r) return /* @__PURE__ */ w(He, { children: t(c) });
1027
- let m = r, h = e.column.label, g = {
1031
+ ]), !r) return /* @__PURE__ */ E(Ve, { children: t(c) });
1032
+ let h = r, ee = e.column.label, v = {
1028
1033
  join: (e) => o(`filterJoins.${e}`),
1029
1034
  operator: (e) => o(`filterOperators.${e}`)
1030
- }, ee = an(r), re = r === "set" ? 1 : 2, v = d ?? u(), ae = (e) => v.conditions[e] ?? { operator: Zt(r) }, oe = re === 2 && en(r, ae(0));
1031
- function se() {
1035
+ }, y = rn(r), ne = r === "set" ? 1 : 2, b = d ?? u(), re = (e) => b.conditions[e] ?? { operator: Xt(r) }, ie = ne === 2 && $t(r, re(0));
1036
+ function ae() {
1032
1037
  n.setFilterOpen(null);
1033
1038
  }
1034
- function ce(t, r) {
1035
- let i = nn(v);
1036
- Xn(i, a) || n.setFilter(e.id, i, r, t), n.announce(i ? o("filterApplied", {
1037
- column: h,
1038
- filter: Qt(i, g)
1039
- }) : o("filterCleared", { column: h })), se();
1039
+ function oe(t, r) {
1040
+ let i = tn(b);
1041
+ N(i, a) || n.setFilter(e.id, i, r, t), n.announce(i ? o("filterApplied", {
1042
+ column: ee,
1043
+ filter: Zt(i, v)
1044
+ }) : o("filterCleared", { column: ee })), ae();
1040
1045
  }
1041
- function le(t) {
1042
- f(u()), a && n.setFilter(e.id, null, "clear", t), n.announce(o("filterCleared", { column: h })), se();
1046
+ function se(t) {
1047
+ f(u()), a && n.setFilter(e.id, null, "clear", t), n.announce(o("filterCleared", { column: ee })), ae();
1043
1048
  }
1044
- function ue(e, t) {
1045
- let n = ae(e), r = rn(n.operator), i = rn(t), a = {
1049
+ function ce(e, t) {
1050
+ let n = re(e), r = nn(n.operator), i = nn(t), a = {
1046
1051
  operator: t,
1047
1052
  ...i >= 1 && r >= 1 ? { value: n.value } : {},
1048
1053
  ...i === 2 && r === 2 ? { end: n.end } : {}
1049
1054
  };
1050
- f(cn(v, e, a));
1055
+ f(sn(b, e, a));
1051
1056
  }
1052
- function de(e, t, n) {
1053
- let r = ae(e), i = t === 0 ? {
1057
+ function le(e, t, n) {
1058
+ let r = re(e), i = t === 0 ? {
1054
1059
  ...r,
1055
1060
  value: n
1056
1061
  } : {
1057
1062
  ...r,
1058
1063
  end: n
1059
1064
  };
1060
- f(cn(v, e, i));
1065
+ f(sn(b, e, i));
1061
1066
  }
1062
- let fe = (e) => {
1063
- e.key === "Enter" && !e.defaultPrevented && (e.preventDefault(), ce(e, "keyboard"));
1067
+ let ue = (e) => {
1068
+ e.key === "Enter" && !e.defaultPrevented && (e.preventDefault(), oe(e, "keyboard"));
1064
1069
  };
1065
- function pe(t) {
1066
- let r = ae(t), i = rn(r.operator), a = n.renderFilterOperand;
1067
- return /* @__PURE__ */ T("div", {
1070
+ function de(t) {
1071
+ let r = re(t), i = nn(r.operator), a = n.renderFilterOperand;
1072
+ return /* @__PURE__ */ D("div", {
1068
1073
  "data-operands": i,
1069
1074
  "data-part": "filter-condition",
1070
1075
  "data-part-filter-condition": "",
1071
1076
  children: [
1072
- t === 1 ? /* @__PURE__ */ w("div", {
1077
+ t === 1 ? /* @__PURE__ */ E("div", {
1073
1078
  "data-part": "filter-join",
1074
1079
  "data-part-filter-join": "",
1075
- children: /* @__PURE__ */ T(Ce, {
1080
+ children: /* @__PURE__ */ D(Se, {
1076
1081
  "aria-label": o("filterJoin"),
1077
- onValueChange: (e) => f(ln(v, e)),
1082
+ onValueChange: (e) => f(cn(b, e)),
1078
1083
  size: "sm",
1079
- value: v.join,
1080
- children: [/* @__PURE__ */ w(Se, {
1084
+ value: b.join,
1085
+ children: [/* @__PURE__ */ E(xe, {
1081
1086
  value: "and",
1082
- children: g.join("and")
1083
- }), /* @__PURE__ */ w(Se, {
1087
+ children: v.join("and")
1088
+ }), /* @__PURE__ */ E(xe, {
1084
1089
  value: "or",
1085
- children: g.join("or")
1090
+ children: v.join("or")
1086
1091
  })]
1087
1092
  })
1088
1093
  }) : null,
1089
- /* @__PURE__ */ w("div", {
1094
+ /* @__PURE__ */ E("div", {
1090
1095
  "data-part": "filter-operator",
1091
1096
  "data-part-filter-operator": "",
1092
- children: /* @__PURE__ */ T(we, {
1097
+ children: /* @__PURE__ */ D(Ce, {
1093
1098
  fullWidth: !0,
1094
1099
  width: "content",
1095
- items: ee.map((e) => ({
1096
- label: g.operator(e),
1100
+ items: y.map((e) => ({
1101
+ label: v.operator(e),
1097
1102
  value: e
1098
1103
  })),
1099
- onValueChange: (e) => ue(t, e),
1104
+ onValueChange: (e) => ce(t, e),
1100
1105
  size: "sm",
1101
1106
  value: r.operator,
1102
- children: [/* @__PURE__ */ w(De, {
1107
+ children: [/* @__PURE__ */ E(Ee, {
1103
1108
  "aria-label": o("filterOperator"),
1104
1109
  ...t === 0 ? { autoFocus: !0 } : {},
1105
- children: /* @__PURE__ */ w(Oe, {})
1106
- }), /* @__PURE__ */ w(Te, { children: ee.map((e) => /* @__PURE__ */ w(Ee, {
1110
+ children: /* @__PURE__ */ E(De, {})
1111
+ }), /* @__PURE__ */ E(we, { children: y.map((e) => /* @__PURE__ */ E(Te, {
1107
1112
  value: e,
1108
- children: g.operator(e)
1113
+ children: v.operator(e)
1109
1114
  }, e)) })]
1110
1115
  })
1111
1116
  }),
1112
- /* @__PURE__ */ w("div", {
1113
- "data-kind": m,
1117
+ /* @__PURE__ */ E("div", {
1118
+ "data-kind": h,
1114
1119
  "data-part": "filter-operand",
1115
1120
  "data-part-filter-operand": "",
1116
- ...i === 2 && !Qn(m, r.operator) ? { "data-range": "" } : {},
1117
- children: i === 0 ? null : !a && Qn(m, r.operator) ? /* @__PURE__ */ w($n, {
1121
+ ...i === 2 && !Zn(h, r.operator) ? { "data-range": "" } : {},
1122
+ children: i === 0 ? null : !a && Zn(h, r.operator) ? /* @__PURE__ */ E(Qn, {
1118
1123
  end: r.end ?? null,
1119
- kind: m,
1124
+ kind: h,
1120
1125
  t: o,
1121
1126
  locale: n.locale,
1122
- onChange: (e, n) => f(cn(v, t, {
1127
+ onChange: (e, n) => f(sn(b, t, {
1123
1128
  ...r,
1124
1129
  value: e,
1125
1130
  end: n
@@ -1128,22 +1133,22 @@ function tr({ column: e, children: t }) {
1128
1133
  variant: "outline"
1129
1134
  }) : [0, 1].slice(0, i).map((s) => {
1130
1135
  let c = o(i === 2 ? s === 0 ? "filterFrom" : "filterTo" : "filterValue"), l = (s === 0 ? r.value : r.end) ?? null;
1131
- return a ? /* @__PURE__ */ w("span", { children: a({
1136
+ return a ? /* @__PURE__ */ E("span", { children: a({
1132
1137
  column: e.id,
1133
1138
  operator: r.operator,
1134
1139
  value: l,
1135
- setValue: (e) => de(t, s, e),
1136
- apply: () => ce(null, "keyboard"),
1140
+ setValue: (e) => le(t, s, e),
1141
+ apply: () => oe(null, "keyboard"),
1137
1142
  label: c
1138
- }) }, s) : /* @__PURE__ */ w(er, {
1143
+ }) }, s) : /* @__PURE__ */ E($n, {
1139
1144
  column: e,
1140
- counts: m === "set" ? n.countsFor(e.id) : void 0,
1141
- kind: m,
1145
+ counts: h === "set" ? n.countsFor(e.id) : void 0,
1146
+ kind: h,
1142
1147
  label: c,
1143
1148
  t: o,
1144
1149
  locale: n.locale,
1145
- onChange: (e) => de(t, s, e),
1146
- onKeyDown: fe,
1150
+ onChange: (e) => le(t, s, e),
1151
+ onKeyDown: ue,
1147
1152
  operator: r.operator,
1148
1153
  value: l,
1149
1154
  variant: "outline"
@@ -1153,40 +1158,40 @@ function tr({ column: e, children: t }) {
1153
1158
  ]
1154
1159
  }, t);
1155
1160
  }
1156
- return /* @__PURE__ */ T(te, {
1161
+ return /* @__PURE__ */ D(g, {
1157
1162
  finalFocus: s,
1158
1163
  onOpenChange: (e) => {
1159
- e || se();
1164
+ e || ae();
1160
1165
  },
1161
1166
  open: i,
1162
1167
  side: "bottom",
1163
1168
  align: "start",
1164
1169
  size: "sm",
1165
- children: [/* @__PURE__ */ w(ie, { render: ({ ref: e }) => /* @__PURE__ */ w(He, { children: t((t) => {
1170
+ children: [/* @__PURE__ */ E(te, { render: ({ ref: e }) => /* @__PURE__ */ E(Ve, { children: t((t) => {
1166
1171
  c(t), typeof e == "function" ? e(t) : e && (e.current = t);
1167
- }) }) }), i ? /* @__PURE__ */ w(ne, { children: /* @__PURE__ */ w(_, {
1168
- "aria-label": o("filterColumn", { column: h }),
1169
- children: /* @__PURE__ */ T("div", {
1170
- "data-kind": m,
1172
+ }) }) }), i ? /* @__PURE__ */ E(_, { children: /* @__PURE__ */ E(m, {
1173
+ "aria-label": o("filterColumn", { column: ee }),
1174
+ children: /* @__PURE__ */ D("div", {
1175
+ "data-kind": h,
1171
1176
  "data-part": "filter-panel",
1172
1177
  "data-part-filter-panel": "",
1173
1178
  "data-ui": "data-grid",
1174
1179
  "data-ui-data-grid": "",
1175
1180
  children: [
1176
- pe(0),
1177
- oe ? pe(1) : null,
1178
- /* @__PURE__ */ T("div", {
1181
+ de(0),
1182
+ ie ? de(1) : null,
1183
+ /* @__PURE__ */ D("div", {
1179
1184
  "data-part": "filter-actions",
1180
1185
  "data-part-filter-actions": "",
1181
- children: [/* @__PURE__ */ w(l, {
1182
- disabled: !tn(v) && a === null,
1183
- onClick: (e) => le(e),
1186
+ children: [/* @__PURE__ */ E(l, {
1187
+ disabled: !en(b) && a === null,
1188
+ onClick: (e) => se(e),
1184
1189
  size: "sm",
1185
1190
  tone: "secondary",
1186
1191
  variant: "ghost",
1187
1192
  children: o("filterClear")
1188
- }), /* @__PURE__ */ w(l, {
1189
- onClick: (e) => ce(e, "pointer"),
1193
+ }), /* @__PURE__ */ E(l, {
1194
+ onClick: (e) => oe(e, "pointer"),
1190
1195
  size: "sm",
1191
1196
  children: o("filterApply")
1192
1197
  })]
@@ -1196,17 +1201,17 @@ function tr({ column: e, children: t }) {
1196
1201
  }) }) : null]
1197
1202
  });
1198
1203
  }
1199
- function M({ column: e }) {
1200
- let t = D(), n = j(e), r = t.columnIds.indexOf(e.id) + 1, o = {
1201
- row: lt,
1204
+ function tr({ column: e }) {
1205
+ let t = k(), n = M(e), r = t.columnIds.indexOf(e.id) + 1, o = {
1206
+ row: ct,
1202
1207
  column: e.id
1203
- }, l = t.current !== null && t.current.row === lt && t.current.column === e.id, u = t.filterOf(e.id), d = t.t, f = u?.conditions[0] ?? null, [p, m] = C(f?.operator ?? (n ? Zt(n) : "contains")), [h, g] = C({
1208
+ }, l = t.current !== null && t.current.row === ct && t.current.column === e.id, u = t.filterOf(e.id), d = t.t, f = u?.conditions[0] ?? null, [p, m] = T(f?.operator ?? (n ? Xt(n) : "contains")), [h, g] = T({
1204
1209
  value: f?.value ?? null,
1205
1210
  end: f?.end ?? null
1206
- }), _ = S(void 0), ee = sn(u), te = S(ee);
1207
- if (b(() => {
1208
- if (te.current === ee) return;
1209
- te.current = ee;
1211
+ }), _ = w(void 0), ee = on(u), v = w(ee);
1212
+ if (S(() => {
1213
+ if (v.current === ee) return;
1214
+ v.current = ee;
1210
1215
  let e = u?.conditions[0];
1211
1216
  e ? (m(e.operator), g({
1212
1217
  value: e.value ?? null,
@@ -1215,13 +1220,13 @@ function M({ column: e }) {
1215
1220
  value: null,
1216
1221
  end: null
1217
1222
  });
1218
- }, [ee, u]), b(() => () => clearTimeout(_.current), []), !n || !e.filterable) return /* @__PURE__ */ w("div", {
1219
- ...gn(e),
1223
+ }, [ee, u]), S(() => () => clearTimeout(_.current), []), !n || !e.filterable) return /* @__PURE__ */ E("div", {
1224
+ ...hn(e),
1220
1225
  "aria-colindex": r,
1221
1226
  "data-part": "filter-cell",
1222
1227
  "data-part-filter-cell": "",
1223
1228
  role: "gridcell",
1224
- style: hn(e, r),
1229
+ style: mn(e, r),
1225
1230
  tabIndex: l ? 0 : -1,
1226
1231
  onFocus: (e) => {
1227
1232
  e.target === e.currentTarget && t.onCellFocus(o);
@@ -1230,10 +1235,10 @@ function M({ column: e }) {
1230
1235
  onPointerDown: (e) => t.onCellPointerDown(e, o),
1231
1236
  ...l ? { "data-current": "" } : {}
1232
1237
  });
1233
- let ne = n, re = an(n), ie = rn(p);
1234
- function v(n, r) {
1235
- let i = nn({
1236
- kind: ne,
1238
+ let te = n, y = rn(n), ne = nn(p);
1239
+ function b(n, r) {
1240
+ let i = tn({
1241
+ kind: te,
1237
1242
  join: "and",
1238
1243
  conditions: [{
1239
1244
  operator: n.operator,
@@ -1241,40 +1246,40 @@ function M({ column: e }) {
1241
1246
  end: n.end
1242
1247
  }]
1243
1248
  });
1244
- Xn(i, u) || t.setFilter(e.id, i, r, void 0);
1249
+ N(i, u) || t.setFilter(e.id, i, r, void 0);
1245
1250
  }
1246
- function ae(e, r) {
1251
+ function re(e, r) {
1247
1252
  g(e), clearTimeout(_.current);
1248
- let i = () => v({
1253
+ let i = () => b({
1249
1254
  operator: p,
1250
1255
  ...e
1251
1256
  }, "keyboard");
1252
1257
  r || n !== "text" && n !== "number" ? i() : _.current = setTimeout(i, t.filterDebounce);
1253
1258
  }
1254
- function oe(e) {
1259
+ function ie(e) {
1255
1260
  m(e);
1256
- let t = rn(e), n = {
1261
+ let t = nn(e), n = {
1257
1262
  value: t >= 1 ? h.value : null,
1258
1263
  end: t === 2 ? h.end : null
1259
1264
  };
1260
- g(n), v({
1265
+ g(n), b({
1261
1266
  operator: e,
1262
1267
  ...n
1263
1268
  }, "pointer");
1264
1269
  }
1265
- let se = (e) => {
1266
- e.key === "Enter" && !e.defaultPrevented && (e.preventDefault(), clearTimeout(_.current), v({
1270
+ let ae = (e) => {
1271
+ e.key === "Enter" && !e.defaultPrevented && (e.preventDefault(), clearTimeout(_.current), b({
1267
1272
  operator: p,
1268
1273
  ...h
1269
1274
  }, "keyboard"));
1270
- }, ce = d(`filterSymbols.${p}`), le = t.renderFilterOperand;
1271
- return /* @__PURE__ */ w("div", {
1272
- ...gn(e),
1275
+ }, oe = d(`filterSymbols.${p}`), se = t.renderFilterOperand;
1276
+ return /* @__PURE__ */ E("div", {
1277
+ ...hn(e),
1273
1278
  "aria-colindex": r,
1274
1279
  "data-part": "filter-cell",
1275
1280
  "data-part-filter-cell": "",
1276
1281
  role: "gridcell",
1277
- style: hn(e, r),
1282
+ style: mn(e, r),
1278
1283
  tabIndex: l ? 0 : -1,
1279
1284
  onFocus: (e) => {
1280
1285
  e.target === e.currentTarget && t.onCellFocus(o);
@@ -1283,61 +1288,61 @@ function M({ column: e }) {
1283
1288
  onPointerDown: (e) => t.onCellPointerDown(e, o),
1284
1289
  ...u ? { "data-filtered": "" } : {},
1285
1290
  ...l ? { "data-current": "" } : {},
1286
- children: /* @__PURE__ */ T("div", {
1291
+ children: /* @__PURE__ */ D("div", {
1287
1292
  "data-kind": n,
1288
1293
  "data-part": "filter-operand",
1289
1294
  "data-part-filter-operand": "",
1290
- ...ie === 2 && !Qn(n, p) ? { "data-range": "" } : {},
1291
- children: [/* @__PURE__ */ w("div", {
1295
+ ...ne === 2 && !Zn(n, p) ? { "data-range": "" } : {},
1296
+ children: [/* @__PURE__ */ E("div", {
1292
1297
  "data-part": "filter-operator",
1293
1298
  "data-part-filter-operator": "",
1294
- children: /* @__PURE__ */ T(i, {
1299
+ children: /* @__PURE__ */ D(i, {
1295
1300
  size: "sm",
1296
- children: [/* @__PURE__ */ w(s, { render: (e) => /* @__PURE__ */ w("button", {
1301
+ children: [/* @__PURE__ */ E(s, { render: (e) => /* @__PURE__ */ E("button", {
1297
1302
  ...e,
1298
1303
  "aria-label": d("filterOperatorChosen", { operator: d(`filterOperators.${p}`) }),
1299
1304
  title: d(`filterOperators.${p}`),
1300
1305
  tabIndex: -1,
1301
1306
  type: "button",
1302
- children: ce
1303
- }) }), /* @__PURE__ */ w(c, { children: re.map((e) => /* @__PURE__ */ w(a, {
1304
- onSelect: () => oe(e),
1307
+ children: oe
1308
+ }) }), /* @__PURE__ */ E(c, { children: y.map((e) => /* @__PURE__ */ E(a, {
1309
+ onSelect: () => ie(e),
1305
1310
  children: d(`filterOperators.${e}`)
1306
1311
  }, e)) })]
1307
1312
  })
1308
- }), ie === 0 ? null : !le && Qn(n, p) ? /* @__PURE__ */ w($n, {
1313
+ }), ne === 0 ? null : !se && Zn(n, p) ? /* @__PURE__ */ E(Qn, {
1309
1314
  end: h.end,
1310
1315
  kind: n,
1311
1316
  t: d,
1312
1317
  locale: t.locale,
1313
- onChange: (e, t) => ae({
1318
+ onChange: (e, t) => re({
1314
1319
  value: e,
1315
1320
  end: t
1316
1321
  }, !0),
1317
1322
  start: h.value,
1318
1323
  variant: "plain"
1319
- }) : [0, 1].slice(0, ie).map((r) => {
1320
- let i = ie === 2 ? d("filterRange", {
1324
+ }) : [0, 1].slice(0, ne).map((r) => {
1325
+ let i = ne === 2 ? d("filterRange", {
1321
1326
  bound: r === 0 ? "from" : "to",
1322
1327
  column: e.column.label
1323
- }) : d("filterColumn", { column: e.column.label }), a = r === 0 ? h.value : h.end, o = (e, t = !1) => ae(r === 0 ? {
1328
+ }) : d("filterColumn", { column: e.column.label }), a = r === 0 ? h.value : h.end, o = (e, t = !1) => re(r === 0 ? {
1324
1329
  ...h,
1325
1330
  value: e
1326
1331
  } : {
1327
1332
  ...h,
1328
1333
  end: e
1329
1334
  }, t);
1330
- return le ? /* @__PURE__ */ w("span", { children: le({
1335
+ return se ? /* @__PURE__ */ E("span", { children: se({
1331
1336
  column: e.id,
1332
1337
  operator: p,
1333
1338
  value: a,
1334
1339
  setValue: (e) => o(e, !0),
1335
- apply: () => v({
1340
+ apply: () => b({
1336
1341
  operator: p,
1337
1342
  ...h
1338
1343
  }, "keyboard"),
1339
1344
  label: i
1340
- }) }, r) : /* @__PURE__ */ w(er, {
1345
+ }) }, r) : /* @__PURE__ */ E($n, {
1341
1346
  column: e,
1342
1347
  counts: n === "set" ? t.countsFor(e.id) : void 0,
1343
1348
  kind: n,
@@ -1345,9 +1350,9 @@ function M({ column: e }) {
1345
1350
  t: d,
1346
1351
  locale: t.locale,
1347
1352
  onChange: (e) => o(e, n !== "text" && n !== "number"),
1348
- onKeyDown: se,
1353
+ onKeyDown: ae,
1349
1354
  operator: p,
1350
- placeholder: d(ie === 2 ? r === 0 ? "filterFrom" : "filterTo" : "filter"),
1355
+ placeholder: d(ne === 2 ? r === 0 ? "filterFrom" : "filterTo" : "filter"),
1351
1356
  value: a,
1352
1357
  variant: "plain"
1353
1358
  }, r);
@@ -1357,53 +1362,53 @@ function M({ column: e }) {
1357
1362
  }
1358
1363
  //#endregion
1359
1364
  //#region src/data-grid/data-grid-header.tsx
1360
- var nr = 4;
1361
- function rr({ columnGroups: e, headerRowCount: t }) {
1362
- let n = D(), r = n.columnIds.length - n.resolved.length, i = e !== void 0 && e.length > 0;
1363
- return /* @__PURE__ */ T("div", {
1365
+ var P = 4;
1366
+ function nr({ columnGroups: e, headerRowCount: t }) {
1367
+ let n = k(), r = n.columnIds.length - n.resolved.length, i = e !== void 0 && e.length > 0;
1368
+ return /* @__PURE__ */ D("div", {
1364
1369
  "data-part": "head",
1365
1370
  "data-part-head": "",
1366
1371
  role: "rowgroup",
1367
1372
  children: [
1368
- i ? /* @__PURE__ */ w("div", {
1373
+ i ? /* @__PURE__ */ E("div", {
1369
1374
  "aria-rowindex": 1,
1370
1375
  "data-part": "header-row",
1371
1376
  "data-part-header-row": "",
1372
1377
  role: "row",
1373
- children: ir(n.mountedColumns, e, r)
1378
+ children: rr(n.mountedColumns, e, r)
1374
1379
  }) : null,
1375
- /* @__PURE__ */ T("div", {
1380
+ /* @__PURE__ */ D("div", {
1376
1381
  "aria-rowindex": i ? 2 : 1,
1377
1382
  "data-part": "header-row",
1378
1383
  "data-part-header-row": "",
1379
- "data-row": dt,
1384
+ "data-row": ut,
1380
1385
  role: "row",
1381
1386
  children: [
1382
- n.columnIds.includes("__selection") ? /* @__PURE__ */ w(ar, {}) : null,
1383
- n.columnIds.includes("__drag") ? /* @__PURE__ */ w("div", {
1384
- "aria-colindex": n.columnIds.indexOf(pn) + 1,
1385
- "data-column": pn,
1387
+ n.columnIds.includes("__selection") ? /* @__PURE__ */ E(ir, {}) : null,
1388
+ n.columnIds.includes("__drag") ? /* @__PURE__ */ E("div", {
1389
+ "aria-colindex": n.columnIds.indexOf(fn) + 1,
1390
+ "data-column": fn,
1386
1391
  "data-part": "column-header",
1387
1392
  "data-part-column-header": "",
1388
1393
  role: "columnheader",
1389
- style: { "--slotted-data-grid-column": String(n.columnIds.indexOf(pn) + 1) },
1394
+ style: { "--slotted-data-grid-column": String(n.columnIds.indexOf(fn) + 1) },
1390
1395
  tabIndex: -1,
1391
- children: /* @__PURE__ */ w("span", {})
1396
+ children: /* @__PURE__ */ E("span", {})
1392
1397
  }) : null,
1393
- n.columnIds.includes("__expander") ? /* @__PURE__ */ w("div", {
1394
- "aria-colindex": n.columnIds.indexOf(fn) + 1,
1395
- "data-column": fn,
1398
+ n.columnIds.includes("__expander") ? /* @__PURE__ */ E("div", {
1399
+ "aria-colindex": n.columnIds.indexOf(dn) + 1,
1400
+ "data-column": dn,
1396
1401
  "data-part": "column-header",
1397
1402
  "data-part-column-header": "",
1398
1403
  role: "columnheader",
1399
- style: { "--slotted-data-grid-column": String(n.columnIds.indexOf(fn) + 1) },
1404
+ style: { "--slotted-data-grid-column": String(n.columnIds.indexOf(dn) + 1) },
1400
1405
  tabIndex: -1,
1401
- children: /* @__PURE__ */ w("span", {})
1406
+ children: /* @__PURE__ */ E("span", {})
1402
1407
  }) : null,
1403
- n.mountedColumns.map((e) => /* @__PURE__ */ w(or, { column: e }, e.id)),
1404
- n.popinColumns.length > 0 ? /* @__PURE__ */ w("div", {
1408
+ n.mountedColumns.map((e) => /* @__PURE__ */ E(ar, { column: e }, e.id)),
1409
+ n.popinColumns.length > 0 ? /* @__PURE__ */ E("div", {
1405
1410
  "aria-colindex": n.popinIndex,
1406
- "data-column": ft,
1411
+ "data-column": dt,
1407
1412
  "data-part": "popin-header",
1408
1413
  "data-part-popin-header": "",
1409
1414
  role: "columnheader",
@@ -1411,50 +1416,50 @@ function rr({ columnGroups: e, headerRowCount: t }) {
1411
1416
  }) : null
1412
1417
  ]
1413
1418
  }),
1414
- n.filterRow ? /* @__PURE__ */ T("div", {
1419
+ n.filterRow ? /* @__PURE__ */ D("div", {
1415
1420
  "aria-rowindex": t,
1416
1421
  "data-part": "filter-row",
1417
1422
  "data-part-filter-row": "",
1418
- "data-row": lt,
1423
+ "data-row": ct,
1419
1424
  role: "row",
1420
1425
  children: [
1421
- n.columnIds.includes("__selection") ? /* @__PURE__ */ w("div", {
1426
+ n.columnIds.includes("__selection") ? /* @__PURE__ */ E("div", {
1422
1427
  "aria-colindex": 1,
1423
- "data-column": dn,
1428
+ "data-column": un,
1424
1429
  "data-part": "filter-cell",
1425
1430
  "data-part-filter-cell": "",
1426
1431
  role: "gridcell",
1427
1432
  tabIndex: -1
1428
1433
  }) : null,
1429
- n.columnIds.includes("__drag") ? /* @__PURE__ */ w("div", {
1430
- "aria-colindex": n.columnIds.indexOf(pn) + 1,
1431
- "data-column": pn,
1434
+ n.columnIds.includes("__drag") ? /* @__PURE__ */ E("div", {
1435
+ "aria-colindex": n.columnIds.indexOf(fn) + 1,
1436
+ "data-column": fn,
1432
1437
  "data-part": "filter-cell",
1433
1438
  "data-part-filter-cell": "",
1434
1439
  role: "gridcell",
1435
1440
  tabIndex: -1
1436
1441
  }) : null,
1437
- n.columnIds.includes("__expander") ? /* @__PURE__ */ w("div", {
1438
- "aria-colindex": n.columnIds.indexOf(fn) + 1,
1439
- "data-column": fn,
1442
+ n.columnIds.includes("__expander") ? /* @__PURE__ */ E("div", {
1443
+ "aria-colindex": n.columnIds.indexOf(dn) + 1,
1444
+ "data-column": dn,
1440
1445
  "data-part": "filter-cell",
1441
1446
  "data-part-filter-cell": "",
1442
1447
  role: "gridcell",
1443
1448
  tabIndex: -1
1444
1449
  }) : null,
1445
- n.mountedColumns.map((e) => /* @__PURE__ */ w(M, { column: e }, e.id))
1450
+ n.mountedColumns.map((e) => /* @__PURE__ */ E(tr, { column: e }, e.id))
1446
1451
  ]
1447
1452
  }) : null
1448
1453
  ]
1449
1454
  });
1450
1455
  }
1451
- function ir(e, t, n) {
1456
+ function rr(e, t, n) {
1452
1457
  let r = [], i = 0;
1453
1458
  for (; i < e.length;) {
1454
1459
  let a = e[i], o = t.find((e) => e.columns.includes(a.id)), s = 1;
1455
1460
  if (o) for (; i + s < e.length && o.columns.includes(e[i + s].id);) s += 1;
1456
1461
  let c = a.index + n, l = { "--slotted-data-grid-column": `${c} / ${c + s}` };
1457
- a.pinned && (l["--slotted-data-grid-pin-offset"] = `${a.pinOffset}px`), r.push(/* @__PURE__ */ w("div", {
1462
+ a.pinned && (l["--slotted-data-grid-pin-offset"] = `${a.pinOffset}px`), r.push(/* @__PURE__ */ E("div", {
1458
1463
  "aria-colindex": c,
1459
1464
  "aria-colspan": s,
1460
1465
  "data-part": "column-group",
@@ -1463,45 +1468,45 @@ function ir(e, t, n) {
1463
1468
  style: l,
1464
1469
  tabIndex: -1,
1465
1470
  ...a.pinned ? { "data-pinned": a.pinned } : {},
1466
- children: /* @__PURE__ */ w("span", { children: o?.label ?? "" })
1471
+ children: /* @__PURE__ */ E("span", { children: o?.label ?? "" })
1467
1472
  }, o ? `${o.id}:${a.id}` : a.id)), i += s;
1468
1473
  }
1469
1474
  return r;
1470
1475
  }
1471
- function ar() {
1472
- let e = D(), t = {
1473
- row: dt,
1474
- column: dn
1475
- }, n = e.current !== null && e.current.row === dt && e.current.column === "__selection", r = e.t(e.total !== null && e.total > e.selectableCount ? "selectAllPage" : "selectAllFiltered", { count: e.selectableCount });
1476
- return /* @__PURE__ */ w("div", {
1476
+ function ir() {
1477
+ let e = k(), t = {
1478
+ row: ut,
1479
+ column: un
1480
+ }, n = e.current !== null && e.current.row === ut && e.current.column === "__selection", r = e.t(e.total !== null && e.total > e.selectionRowCount ? "selectAllPage" : "selectAllFiltered", { count: e.selectableCount });
1481
+ return /* @__PURE__ */ E("div", {
1477
1482
  "aria-colindex": 1,
1478
- "data-column": dn,
1483
+ "data-column": un,
1479
1484
  "data-part": "selection",
1480
1485
  "data-part-selection": "",
1481
1486
  role: "gridcell",
1482
1487
  style: { "--slotted-data-grid-column": "1" },
1483
- tabIndex: n || E(t, e.tabStop) ? 0 : -1,
1488
+ tabIndex: n || O(t, e.tabStop) ? 0 : -1,
1484
1489
  onFocus: () => e.onCellFocus(t),
1485
1490
  onKeyDown: (n) => e.onCellKeyDown(n, t),
1486
1491
  onPointerDown: (n) => e.onCellPointerDown(n, t),
1487
1492
  ...n ? { "data-current": "" } : {},
1488
- children: e.selectionMode === "multiple" ? /* @__PURE__ */ w(m, {
1493
+ children: e.selectionMode === "multiple" ? /* @__PURE__ */ E(y, {
1489
1494
  checked: e.allState === "all",
1490
1495
  indeterminate: e.allState === "some",
1491
1496
  onCheckedChange: (t, n) => e.toggleAll(n.source),
1492
1497
  tabIndex: n ? 0 : -1,
1493
- children: /* @__PURE__ */ w(v, { children: r })
1498
+ children: /* @__PURE__ */ E(re, { children: r })
1494
1499
  }) : null
1495
1500
  });
1496
1501
  }
1497
- function or({ column: e }) {
1498
- let t = D(), i = {
1499
- row: dt,
1502
+ function ar({ column: e }) {
1503
+ let t = k(), i = {
1504
+ row: ut,
1500
1505
  column: e.id
1501
- }, a = t.columnIds.indexOf(e.id) + 1, o = t.current !== null && t.current.row === dt && t.current.column === e.id, s = t.sortOf(e.id), c = t.filterOf(e.id) !== null, l = t.query.sort.length > 1, u = t.menuOpen === e.id, d = t.attachDraggable, f = S(() => void 0), p = S(null), m = y((e) => {
1506
+ }, a = t.columnIds.indexOf(e.id) + 1, o = t.current !== null && t.current.row === ut && t.current.column === e.id, s = t.sortOf(e.id), c = t.filterOf(e.id) !== null, l = t.query.sort.length > 1, u = t.menuOpen === e.id, d = t.attachDraggable, f = w(() => void 0), p = w(null), m = x((e) => {
1502
1507
  p.current = e, f.current(e);
1503
1508
  }, []);
1504
- b(() => (d(p.current, e.id), () => d(null, e.id)), [d, e.id]);
1509
+ S(() => (d(p.current, e.id), () => d(null, e.id)), [d, e.id]);
1505
1510
  let h = e.column.description, g = `${t.id}-description-${e.id}`, _ = e.column.help, ee = t.renderHeaderContent ? t.renderHeaderContent({
1506
1511
  column: e.column,
1507
1512
  resolved: e,
@@ -1509,18 +1514,18 @@ function or({ column: e }) {
1509
1514
  sortIndex: s?.index ?? null,
1510
1515
  filtered: c
1511
1516
  }) : e.column.label;
1512
- return /* @__PURE__ */ w(tr, {
1517
+ return /* @__PURE__ */ E(er, {
1513
1518
  column: e,
1514
- children: (d) => (f.current = d, /* @__PURE__ */ T("div", {
1515
- ...gn(e),
1519
+ children: (d) => (f.current = d, /* @__PURE__ */ D("div", {
1520
+ ...hn(e),
1516
1521
  "aria-colindex": a,
1517
1522
  "aria-describedby": h ? g : void 0,
1518
1523
  "aria-sort": s && s.index === 1 ? s.direction : void 0,
1519
1524
  "data-part": "column-header",
1520
1525
  "data-part-column-header": "",
1521
1526
  role: "columnheader",
1522
- style: hn(e, a),
1523
- tabIndex: o || E(i, t.tabStop) ? 0 : -1,
1527
+ style: mn(e, a),
1528
+ tabIndex: o || O(i, t.tabStop) ? 0 : -1,
1524
1529
  onClick: (e) => t.onCellClick(e, i),
1525
1530
  onContextMenu: (n) => t.onHeaderContextMenu(n, e.id),
1526
1531
  onFocus: (e) => {
@@ -1537,69 +1542,70 @@ function or({ column: e }) {
1537
1542
  ...t.dropTarget === e.id ? { "data-drop-target": "" } : {},
1538
1543
  ...t.resizing === e.id ? { "data-resizing": "" } : {},
1539
1544
  children: [
1540
- /* @__PURE__ */ w(sr, {
1545
+ /* @__PURE__ */ E(or, {
1541
1546
  label: e.column.label,
1542
1547
  children: ee
1543
1548
  }),
1544
- s ? /* @__PURE__ */ w("span", {
1549
+ s ? /* @__PURE__ */ E("span", {
1545
1550
  "aria-hidden": !0,
1546
1551
  "data-part": "sort",
1547
1552
  "data-part-sort": "",
1548
1553
  ...l ? { "data-index": String(s.index) } : {},
1549
- children: /* @__PURE__ */ w(r, { children: /* @__PURE__ */ w(n, { name: "chevron-down" }) })
1554
+ children: /* @__PURE__ */ E(r, { children: /* @__PURE__ */ E(n, { name: "chevron-down" }) })
1550
1555
  }) : null,
1551
- h ? /* @__PURE__ */ w("span", {
1556
+ h ? /* @__PURE__ */ E("span", {
1552
1557
  "aria-hidden": "true",
1553
1558
  "data-part": "column-description",
1554
1559
  "data-part-column-description": "",
1555
1560
  id: g,
1556
1561
  children: h
1557
1562
  }) : null,
1558
- /* @__PURE__ */ T("span", {
1563
+ /* @__PURE__ */ D("span", {
1559
1564
  "data-part": "column-actions",
1560
1565
  "data-part-column-actions": "",
1561
1566
  children: [
1562
- h || _ !== void 0 ? /* @__PURE__ */ w(cr, {
1567
+ h || _ !== void 0 ? /* @__PURE__ */ E(sr, {
1563
1568
  column: e,
1564
1569
  description: h,
1565
1570
  help: _
1566
1571
  }) : null,
1567
- e.filterable ? /* @__PURE__ */ w(lr, {
1572
+ e.filterable ? /* @__PURE__ */ E(lr, {
1568
1573
  column: e,
1569
1574
  filtered: c
1570
1575
  }) : null,
1571
- /* @__PURE__ */ w(ur, {
1576
+ /* @__PURE__ */ E(ur, {
1572
1577
  column: e,
1573
1578
  descriptionId: h ? g : void 0,
1574
1579
  open: u
1575
1580
  })
1576
1581
  ]
1577
1582
  }),
1578
- e.resizable ? /* @__PURE__ */ w(dr, { column: e }) : null
1583
+ e.resizable ? /* @__PURE__ */ E(dr, { column: e }) : null
1579
1584
  ]
1580
1585
  }))
1581
1586
  });
1582
1587
  }
1583
- function sr({ children: e, label: t }) {
1584
- return /* @__PURE__ */ T(u, {
1588
+ function or({ children: e, label: t }) {
1589
+ return /* @__PURE__ */ D(u, {
1585
1590
  describes: "none",
1586
1591
  openOn: "hover",
1587
1592
  side: "bottom",
1588
1593
  whenClipped: !0,
1589
- children: [/* @__PURE__ */ w(d, {
1590
- render: (e) => /* @__PURE__ */ w("span", { ...e }),
1594
+ children: [/* @__PURE__ */ E(d, {
1595
+ render: (e) => /* @__PURE__ */ E("span", { ...e }),
1591
1596
  children: e
1592
- }), /* @__PURE__ */ w(p, { children: /* @__PURE__ */ w(f, { children: t }) })]
1597
+ }), /* @__PURE__ */ E(p, { children: /* @__PURE__ */ E(f, { children: t }) })]
1593
1598
  });
1594
1599
  }
1595
- function cr({ column: e, description: t, help: i }) {
1596
- let a = D().t("columnHelp", { column: e.column.label });
1597
- return /* @__PURE__ */ T(te, {
1600
+ function sr({ column: e, description: t, help: i }) {
1601
+ let a = k().t("columnHelp", { column: e.column.label });
1602
+ return /* @__PURE__ */ D(g, {
1598
1603
  align: "start",
1604
+ presentation: "auto",
1599
1605
  side: "bottom",
1600
1606
  size: "sm",
1601
- children: [/* @__PURE__ */ w(ee, { render: (e) => /* @__PURE__ */ w("button", {
1602
- ...Me(e, "part", "column-help"),
1607
+ children: [/* @__PURE__ */ E(h, { render: (e) => /* @__PURE__ */ E("button", {
1608
+ ...je(e, "part", "column-help"),
1603
1609
  "aria-label": a,
1604
1610
  onClick: (t) => {
1605
1611
  t.stopPropagation(), e.onClick?.(t);
@@ -1607,16 +1613,24 @@ function cr({ column: e, description: t, help: i }) {
1607
1613
  onPointerDown: (e) => e.stopPropagation(),
1608
1614
  tabIndex: -1,
1609
1615
  type: "button",
1610
- children: /* @__PURE__ */ w(r, { children: /* @__PURE__ */ w(n, { name: "circle-question" }) })
1611
- }) }), /* @__PURE__ */ w(ne, { children: /* @__PURE__ */ w(_, {
1612
- "aria-label": a,
1613
- children: /* @__PURE__ */ T(re, { children: [t ? /* @__PURE__ */ w("div", { children: t }) : null, i] })
1616
+ children: /* @__PURE__ */ E(r, { children: /* @__PURE__ */ E(n, { name: "circle-question" }) })
1617
+ }) }), /* @__PURE__ */ E(_, { children: /* @__PURE__ */ D(cr, {
1618
+ heading: e.column.label,
1619
+ label: a,
1620
+ children: [t ? /* @__PURE__ */ E("div", { children: t }) : null, i]
1614
1621
  }) })]
1615
1622
  });
1616
1623
  }
1624
+ function cr({ children: e, heading: t, label: n }) {
1625
+ let { sheet: r } = ee();
1626
+ return /* @__PURE__ */ E(m, {
1627
+ "aria-label": r ? t : n,
1628
+ children: /* @__PURE__ */ E(v, { children: e })
1629
+ });
1630
+ }
1617
1631
  function lr({ column: e, filtered: t }) {
1618
- let i = D(), a = i.filterOpen === e.id;
1619
- return !t && !a ? null : /* @__PURE__ */ w("button", {
1632
+ let i = k(), a = i.filterOpen === e.id;
1633
+ return !t && !a ? null : /* @__PURE__ */ E("button", {
1620
1634
  "aria-expanded": a,
1621
1635
  "aria-haspopup": "dialog",
1622
1636
  "aria-label": i.t("filterColumn", { column: e.column.label }),
@@ -1630,20 +1644,20 @@ function lr({ column: e, filtered: t }) {
1630
1644
  type: "button",
1631
1645
  ...t ? { "data-filtered": "" } : {},
1632
1646
  ...a ? { "data-open": "" } : {},
1633
- children: /* @__PURE__ */ w(r, { children: /* @__PURE__ */ w(n, { name: "funnel" }) })
1647
+ children: /* @__PURE__ */ E(r, { children: /* @__PURE__ */ E(n, { name: "funnel" }) })
1634
1648
  });
1635
1649
  }
1636
1650
  function ur({ column: e, descriptionId: t, open: l }) {
1637
- let u = D(), d = u.t, f = u.sortOf(e.id), p = e.column.label, m = u.menuAnchor !== null && u.menuAnchor.column === e.id;
1638
- return /* @__PURE__ */ T(i, {
1651
+ let u = k(), d = u.t, f = u.sortOf(e.id), p = e.column.label, m = u.menuAnchor !== null && u.menuAnchor.column === e.id;
1652
+ return /* @__PURE__ */ D(i, {
1639
1653
  anchor: m ? u.menuAnchor.anchor : null,
1640
1654
  finalFocus: m ? u.menuAnchor.returnTo : void 0,
1641
1655
  onOpenChange: (t) => u.setMenuOpen(t ? e.id : null),
1642
1656
  open: l,
1643
- sideOffset: nr,
1657
+ sideOffset: P,
1644
1658
  size: "sm",
1645
- children: [/* @__PURE__ */ w(s, { render: (e) => /* @__PURE__ */ w("button", {
1646
- ...Me(e, "part", "column-menu"),
1659
+ children: [/* @__PURE__ */ E(s, { render: (e) => /* @__PURE__ */ E("button", {
1660
+ ...je(e, "part", "column-menu"),
1647
1661
  "aria-label": d("columnMenu", { column: p }),
1648
1662
  onPointerDown: (t) => {
1649
1663
  t.stopPropagation(), e.onPointerDown?.(t);
@@ -1654,65 +1668,65 @@ function ur({ column: e, descriptionId: t, open: l }) {
1654
1668
  tabIndex: -1,
1655
1669
  type: "button",
1656
1670
  ...l ? { "data-open": "" } : {},
1657
- children: /* @__PURE__ */ w(r, { children: /* @__PURE__ */ w(n, { name: "ellipsis" }) })
1658
- }) }), /* @__PURE__ */ T(c, {
1671
+ children: /* @__PURE__ */ E(r, { children: /* @__PURE__ */ E(n, { name: "ellipsis" }) })
1672
+ }) }), /* @__PURE__ */ D(c, {
1659
1673
  "aria-describedby": t,
1660
1674
  children: [
1661
- e.column.description ? /* @__PURE__ */ w("div", {
1675
+ e.column.description ? /* @__PURE__ */ E("div", {
1662
1676
  "aria-hidden": !0,
1663
1677
  "data-part": "column-menu-description",
1664
1678
  "data-part-column-menu-description": "",
1665
1679
  children: e.column.description
1666
1680
  }) : null,
1667
- e.sortable ? /* @__PURE__ */ T(He, { children: [
1668
- /* @__PURE__ */ w(a, {
1681
+ e.sortable ? /* @__PURE__ */ D(Ve, { children: [
1682
+ /* @__PURE__ */ E(a, {
1669
1683
  disabled: f?.direction === "ascending" && f.index === 1 && u.query.sort.length === 1,
1670
1684
  onSelect: (t) => u.setSort(e.id, "ascending", t),
1671
1685
  children: d("sortAscendingAction")
1672
1686
  }),
1673
- /* @__PURE__ */ w(a, {
1687
+ /* @__PURE__ */ E(a, {
1674
1688
  disabled: f?.direction === "descending" && f.index === 1 && u.query.sort.length === 1,
1675
1689
  onSelect: (t) => u.setSort(e.id, "descending", t),
1676
1690
  children: d("sortDescendingAction")
1677
1691
  }),
1678
- /* @__PURE__ */ w(a, {
1692
+ /* @__PURE__ */ E(a, {
1679
1693
  disabled: f === null,
1680
1694
  onSelect: (t) => u.setSort(e.id, null, t),
1681
1695
  children: d("sortClearAction")
1682
1696
  }),
1683
- /* @__PURE__ */ w(o, {})
1697
+ /* @__PURE__ */ E(o, {})
1684
1698
  ] }) : null,
1685
- e.filterable ? /* @__PURE__ */ w(a, {
1699
+ e.filterable ? /* @__PURE__ */ E(a, {
1686
1700
  onSelect: () => u.setFilterOpen(e.id),
1687
1701
  children: d("filterMenu")
1688
1702
  }) : null,
1689
- /* @__PURE__ */ w(a, {
1703
+ /* @__PURE__ */ E(a, {
1690
1704
  disabled: e.pinned === "start",
1691
1705
  onSelect: (t) => u.pin(e.id, "start", t),
1692
1706
  children: d("pinStart")
1693
1707
  }),
1694
- /* @__PURE__ */ w(a, {
1708
+ /* @__PURE__ */ E(a, {
1695
1709
  disabled: e.pinned === "end",
1696
1710
  onSelect: (t) => u.pin(e.id, "end", t),
1697
1711
  children: d("pinEnd")
1698
1712
  }),
1699
- e.pinned ? /* @__PURE__ */ w(a, {
1713
+ e.pinned ? /* @__PURE__ */ E(a, {
1700
1714
  onSelect: (t) => u.pin(e.id, null, t),
1701
1715
  children: d("unpin")
1702
1716
  }) : null,
1703
- /* @__PURE__ */ w(o, {}),
1704
- e.resizable ? /* @__PURE__ */ T(He, { children: [/* @__PURE__ */ w(a, {
1717
+ /* @__PURE__ */ E(o, {}),
1718
+ e.resizable ? /* @__PURE__ */ D(Ve, { children: [/* @__PURE__ */ E(a, {
1705
1719
  onSelect: (t) => u.autofit(e.id, t.reason, t),
1706
1720
  children: d("autofit")
1707
- }), /* @__PURE__ */ w(a, {
1721
+ }), /* @__PURE__ */ E(a, {
1708
1722
  onSelect: (e) => u.autofit(null, e.reason, e),
1709
1723
  children: d("autofitAll")
1710
1724
  })] }) : null,
1711
- e.hideable ? /* @__PURE__ */ w(a, {
1725
+ e.hideable ? /* @__PURE__ */ E(a, {
1712
1726
  onSelect: (t) => u.hide(e.id, t, t.reason),
1713
1727
  children: d("hide")
1714
1728
  }) : null,
1715
- u.onManageColumns ? /* @__PURE__ */ w(a, {
1729
+ u.onManageColumns ? /* @__PURE__ */ E(a, {
1716
1730
  onSelect: () => u.onManageColumns?.(),
1717
1731
  children: d("manageColumns")
1718
1732
  }) : null
@@ -1721,10 +1735,10 @@ function ur({ column: e, descriptionId: t, open: l }) {
1721
1735
  });
1722
1736
  }
1723
1737
  function dr({ column: e }) {
1724
- let t = D(), [n, r] = C(null), i = S(n);
1738
+ let t = k(), [n, r] = T(null), i = w(n);
1725
1739
  i.current = n;
1726
- let a = S(null), o = S(null);
1727
- b(() => {
1740
+ let a = w(null), o = w(null);
1741
+ S(() => {
1728
1742
  if (!n) return;
1729
1743
  let e = (e) => {
1730
1744
  e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), o.current = null, r(null), t.setResizing(null));
@@ -1748,7 +1762,7 @@ function dr({ column: e }) {
1748
1762
  }, c = (t) => {
1749
1763
  let n = i.current;
1750
1764
  if (!n) return;
1751
- let r = (t.clientX - n.startX) * (n.rtl ? -1 : 1), s = vt(e.column, n.startWidth + r);
1765
+ let r = (t.clientX - n.startX) * (n.rtl ? -1 : 1), s = _t(e.column, n.startWidth + r);
1752
1766
  o.current = s, a.current?.style.setProperty("translate", `${String((s - n.startWidth) * (n.rtl ? -1 : 1))}px 0`);
1753
1767
  }, l = (n) => {
1754
1768
  if (!i.current) return;
@@ -1756,7 +1770,7 @@ function dr({ column: e }) {
1756
1770
  let a = o.current;
1757
1771
  o.current = null, r(null), t.setResizing(null), a !== null && n.type === "pointerup" && t.resizeTo(e.id, a, "pointer", n);
1758
1772
  };
1759
- return /* @__PURE__ */ w("div", {
1773
+ return /* @__PURE__ */ E("div", {
1760
1774
  "aria-hidden": !0,
1761
1775
  "data-part": "resizer",
1762
1776
  "data-part-resizer": "",
@@ -1770,7 +1784,7 @@ function dr({ column: e }) {
1770
1784
  onPointerUp: l,
1771
1785
  title: t.t("resize"),
1772
1786
  ...n ? { "data-resizing": "" } : {},
1773
- children: n ? /* @__PURE__ */ w("div", {
1787
+ children: n ? /* @__PURE__ */ E("div", {
1774
1788
  "aria-hidden": !0,
1775
1789
  "data-part": "resize-guide",
1776
1790
  "data-part-resize-guide": "",
@@ -1782,7 +1796,7 @@ function dr({ column: e }) {
1782
1796
  //#endregion
1783
1797
  //#region src/data-grid/use-model.ts
1784
1798
  function fr(e, t, n, r = Object.is) {
1785
- let [i, a] = C(t), o = e === void 0 ? i : e, s = S({
1799
+ let [i, a] = T(t), o = e === void 0 ? i : e, s = w({
1786
1800
  controlled: e,
1787
1801
  value: o,
1788
1802
  onRequest: n,
@@ -1793,8 +1807,8 @@ function fr(e, t, n, r = Object.is) {
1793
1807
  value: o,
1794
1808
  onRequest: n,
1795
1809
  equals: r
1796
- }, [o, y((e, t, n, r) => {
1797
- let { controlled: i, value: o, onRequest: c, equals: l } = s.current, u = Ne({
1810
+ }, [o, x((e, t, n, r) => {
1811
+ let { controlled: i, value: o, onRequest: c, equals: l } = s.current, u = Me({
1798
1812
  controlled: i,
1799
1813
  initial: o,
1800
1814
  equals: l,
@@ -1810,10 +1824,10 @@ var pr = 34, mr = 100, hr = 20, gr = 600, _r = 400, vr = {
1810
1824
  hidden: []
1811
1825
  }, yr = "input, textarea, select, [contenteditable]:not([contenteditable=\"false\"])", br = 300, xr = 500;
1812
1826
  function Sr(e) {
1813
- let t = S(e);
1827
+ let t = w(e);
1814
1828
  t.current = e;
1815
1829
  let n = e !== void 0;
1816
- return x(() => n ? (...e) => t.current(...e) : void 0, [n]);
1830
+ return C(() => n ? (...e) => t.current(...e) : void 0, [n]);
1817
1831
  }
1818
1832
  function Cr(e, t) {
1819
1833
  let n = new DOMRect(e, t, 0, 0);
@@ -1829,7 +1843,7 @@ function Er(e, t) {
1829
1843
  return e === "all" || t === "all" ? e === t : e.length === t.length && e.every((e, n) => e === t[n]);
1830
1844
  }
1831
1845
  function Dr(e, t) {
1832
- return !e || !t ? e === t : E(e.anchor, t.anchor) && E(e.focus, t.focus);
1846
+ return !e || !t ? e === t : O(e.anchor, t.anchor) && O(e.focus, t.focus);
1833
1847
  }
1834
1848
  function Or(e, t) {
1835
1849
  return Array.isArray(e) && Array.isArray(t) ? Er(e, t) : e === t;
@@ -1845,87 +1859,87 @@ function Ar(e) {
1845
1859
  }
1846
1860
  return i + Math.max(0, a - 1) * r + n;
1847
1861
  }
1848
- function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow: a, dataSource: o, columnState: s, columns: c, current: u, density: d, defaultColumnState: f, defaultCurrent: p, defaultExpanded: m, defaultExpandedGroups: h, defaultQuery: g, defaultRange: _, defaultValue: ee, disabledKeys: te, editMode: ne, editorRenderers: re, error: ie, expandable: v, expanded: ue, expandedGroups: de, filterDebounce: fe, filterRow: pe, footer: me, handle: he, hasMore: ge, height: _e, highlightChanges: ve, labelledBy: ye, loadMoreThreshold: be, loadMoreTrigger: xe, loadMoreFailed: Se, loading: Ce, locale: we, messages: Te, mode: Ee, onActivate: De, onColumnStateChange: Oe, onCurrentChange: ke, onEditCancel: Ae, onEditCommit: je, onEditStart: Me, onExpandedChange: Ne, onExpandedGroupsChange: Pe, onLoadChildren: Fe, onRowsReorder: Ie, onKeyDown: Le, onLoadMore: Ve, onManageColumns: He, onOutOfSpaceChange: Xe, onQueryChange: Qe, onRangeChange: $e, onRetry: et, onValueChange: tt, overscan: nt, pinnedRows: rt, pageSizes: it, query: at, range: ot, ref: vt, renderCell: St, renderDetail: Ot, renderEditor: It, renderEmpty: Lt, renderFilterOperand: Zt, renderGroup: Qt, renderHeader: $t, rowHeight: en, rowKey: tn, rowsReorderable: nn, rows: rn, selectionMode: an, showRange: sn, skeletonRows: cn, stickyHeader: ln, stickyTo: hn, striped: gn, style: D, timeZone: bn, totalCount: xn, tree: Cn, value: wn, variant: Tn, virtualize: Dn, ...jn }) {
1849
- let O = Vn(), Mn = Re(), k = S(null), Nn = S(null), Pn = S({
1862
+ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow: a, dataSource: o, columnState: s, columns: c, current: u, density: d, defaultColumnState: f, defaultCurrent: p, defaultExpanded: m, defaultExpandedGroups: h, defaultQuery: g, defaultRange: _, defaultValue: ee, disabledKeys: v, editMode: te, editorRenderers: y, error: ne, expandable: b, expanded: re, expandedGroups: le, filterDebounce: ue, filterRow: de, footer: fe, handle: pe, hasMore: me, height: he, highlightChanges: ge, isRowMuted: _e, isRowSelectable: ve, labelledBy: ye, loadMoreThreshold: be, loadMoreTrigger: xe, loadMoreFailed: Se, loading: Ce, locale: we, messages: Te, mode: Ee, onActivate: De, onColumnStateChange: Oe, onCurrentChange: ke, onEditCancel: Ae, onEditCommit: je, onEditStart: Me, onExpandedChange: Ne, onExpandedGroupsChange: Pe, onLoadChildren: Fe, onRowsReorder: Ie, onKeyDown: Be, onLoadMore: Ve, onManageColumns: Ye, onOutOfSpaceChange: Ze, onQueryChange: Qe, onRangeChange: $e, onRetry: et, onValueChange: tt, overscan: nt, pinnedRows: rt, pageSizes: it, query: at, range: _t, ref: xt, renderCell: Dt, renderDetail: Ft, renderEditor: It, renderEmpty: Xt, renderFilterOperand: Zt, renderGroup: Qt, renderHeader: $t, rowHeight: en, rowKey: tn, rowsReorderable: nn, rows: rn, selectionMode: on, showRange: sn, skeletonRows: cn, stickyHeader: mn, stickyTo: hn, striped: k, style: yn, timeZone: bn, totalCount: Sn, tree: Cn, value: wn, variant: En, virtualize: An, ...jn }) {
1863
+ let A = Bn(), Mn = Le(), j = w(null), Nn = w(null), Pn = w({
1850
1864
  cellRenderers: r,
1851
- editorRenderers: re,
1865
+ editorRenderers: y,
1852
1866
  tree: Cn
1853
1867
  });
1854
1868
  Pn.current = {
1855
1869
  cellRenderers: r,
1856
- editorRenderers: re,
1870
+ editorRenderers: y,
1857
1871
  tree: Cn
1858
1872
  };
1859
- let Fn = Sr(St), In = Sr(Ot), zn = Sr(It), Bn = Sr(Qt), Hn = Sr($t), Un = r ? Object.keys(r).join() : null, Kn = re ? Object.keys(re).join() : null, qn = Cn?.column, Jn = Cn?.hasChildren !== void 0, A = x(() => Cn === void 0 ? void 0 : {
1873
+ let Fn = Sr(Dt), Rn = Sr(Ft), zn = Sr(It), Vn = Sr(Qt), Hn = Sr($t), Gn = r ? Object.keys(r).join() : null, Kn = y ? Object.keys(y).join() : null, qn = Cn?.column, Yn = Cn?.hasChildren !== void 0, M = C(() => Cn === void 0 ? void 0 : {
1860
1874
  column: qn,
1861
1875
  parentKey: (e) => Pn.current.tree.parentKey(e),
1862
- hasChildren: Jn ? (e) => Pn.current.tree.hasChildren?.(e) === !0 : void 0
1876
+ hasChildren: Yn ? (e) => Pn.current.tree.hasChildren?.(e) === !0 : void 0
1863
1877
  }, [
1864
1878
  Cn === void 0,
1865
1879
  qn,
1866
- Jn
1867
- ]), j = t(We, Te), Xn = t(Ge), Zn = e(), Qn = Tn ?? O.variant ?? "ruled", $n = gn ?? O.striped ?? !1, er = ln ?? O.stickyHeader ?? !0, tr = hn ?? O.stickyTo ?? "scroll", M = an ?? O.selectionMode ?? "none", nr = ne ?? O.editMode ?? "cell", ir = pe ?? O.filterRow ?? !1, ar = Dn ?? O.virtualize ?? "auto", or = en ?? O.rowHeight, sr = a ?? O.columnOverflow ?? "auto", cr = nt ?? O.overscan ?? 6, lr = fe ?? O.filterDebounce ?? 300, ur = be ?? O.loadMoreThreshold ?? 20, dr = xe ?? O.loadMoreTrigger ?? "scroll", jr = cn ?? O.skeletonRows ?? 8, N = we ?? Zn, Pr = n ?? !1, P = y((e) => typeof tn == "function" ? tn(e) : String(e[tn]), [tn]), Fr = j("filterYes"), Ir = j("filterNo"), Lr = x(() => ({
1868
- locale: N,
1880
+ Yn
1881
+ ]), N = t(Ue, Te), Xn = t(We), Zn = e(), Qn = En ?? A.variant ?? "ruled", $n = k ?? A.striped ?? !1, er = mn ?? A.stickyHeader ?? !0, tr = hn ?? A.stickyTo ?? "scroll", P = on ?? A.selectionMode ?? "none", rr = te ?? A.editMode ?? "cell", ir = de ?? A.filterRow ?? !1, ar = An ?? A.virtualize ?? "auto", or = en ?? A.rowHeight, sr = a ?? A.columnOverflow ?? "auto", cr = nt ?? A.overscan ?? 6, lr = ue ?? A.filterDebounce ?? 300, ur = be ?? A.loadMoreThreshold ?? 20, dr = xe ?? A.loadMoreTrigger ?? "scroll", jr = cn ?? A.skeletonRows ?? 8, F = we ?? Zn, Pr = n ?? !1, I = x((e) => typeof tn == "function" ? tn(e) : String(e[tn]), [tn]), Fr = N("filterYes"), Ir = N("filterNo"), Lr = C(() => ({
1882
+ locale: F,
1869
1883
  timeZone: bn,
1870
1884
  booleans: {
1871
1885
  true: Fr,
1872
1886
  false: Ir
1873
1887
  }
1874
1888
  }), [
1875
- N,
1889
+ F,
1876
1890
  bn,
1877
1891
  Fr,
1878
1892
  Ir
1879
- ]), Rr = y((e, t) => gt(e, t, Lr), [Lr]), zr = x(() => new Set(te ?? []), [te]), Br = y((e) => zr.has(e), [zr]), F = y((e, t) => {
1880
- if (zr.has(P(t))) return !1;
1893
+ ]), Rr = x((e, t) => ht(e, t, Lr), [Lr]), zr = C(() => new Set(v ?? []), [v]), Br = x((e) => zr.has(e), [zr]), L = x((e, t) => {
1894
+ if (zr.has(I(t))) return !1;
1881
1895
  let n = e.editable;
1882
1896
  return typeof n == "function" ? n(t) : n === !0;
1883
- }, [zr, P]), Vr = x(() => c.some((e) => e.editable), [c]), Hr = y((e) => In ? v === void 0 ? !0 : typeof v == "function" ? v(e) : v : !1, [v, In]), [I, Ur] = fr(at, g ?? Ct(), Qe, wr), Wr = Wn(o, I), L = o ? Wr.rows : rn ?? kr, Gr = o ? Wr.total : xn, Kr = o ? Wr.hasMore : ge, qr = o ? Wr.loading : Ce, Jr = qr !== void 0 && qr !== !1, Yr = o ? Wr.error : ie, Xr = o ? Wr.retry : et, Zr = Ee ?? (o || Gr !== void 0 || Kr !== void 0 ? "server" : "client"), Qr = x(() => Dt(s ?? f, c), [s, c]), [$r, ei] = fr(s === void 0 ? void 0 : Qr, Qr, Oe, Tr), R = x(() => Dt($r, c), [$r, c]), [ti, ni] = fr(wn, ee ?? (M === "multiple" ? [] : null), tt, Or), [ri, ii] = fr(ot, _ ?? null, $e, Dr), [z, ai] = fr(u, p ?? null, ke, E), [oi, si] = fr(ue, m ?? [], Ne, Er), [ci, li] = fr(de, h ?? "all", Pe, Er), ui = M === "single" || M === "multiple", di = nn === !0, fi = In !== void 0, pi = x(() => {
1897
+ }, [zr, I]), Vr = C(() => c.some((e) => e.editable), [c]), Hr = x((e) => Rn ? b === void 0 ? !0 : typeof b == "function" ? b(e) : b : !1, [b, Rn]), [R, Ur] = fr(at, g ?? St(), Qe, wr), Wr = Un(o, R), z = o ? Wr.rows : rn ?? kr, Gr = o ? Wr.total : Sn, Kr = o ? Wr.hasMore : me, qr = o ? Wr.loading : Ce, Jr = qr !== void 0 && qr !== !1, Yr = o ? Wr.error : ne, Xr = o ? Wr.retry : et, Zr = Ee ?? (o || Gr !== void 0 || Kr !== void 0 ? "server" : "client"), Qr = C(() => Et(s ?? f, c), [s, c]), [$r, ei] = fr(s === void 0 ? void 0 : Qr, Qr, Oe, Tr), B = C(() => Et($r, c), [$r, c]), [ti, ni] = fr(wn, ee ?? (P === "multiple" ? [] : null), tt, Or), [ri, ii] = fr(_t, _ ?? null, $e, Dr), [V, ai] = fr(u, p ?? null, ke, O), [oi, si] = fr(re, m ?? [], Ne, Er), [ci, li] = fr(le, h ?? "all", Pe, Er), ui = P === "single" || P === "multiple", di = nn === !0, fi = Rn !== void 0, pi = C(() => {
1884
1898
  let e = [];
1885
1899
  return ui && e.push(48), di && e.push(40), fi && e.push(40), e;
1886
1900
  }, [
1887
1901
  ui,
1888
1902
  di,
1889
1903
  fi
1890
- ]), mi = pi.reduce((e, t) => e + t, 0), hi = x(() => Pt(c, R, { leading: mi }), [
1904
+ ]), mi = pi.reduce((e, t) => e + t, 0), hi = C(() => Nt(c, B, { leading: mi }), [
1891
1905
  c,
1892
- R,
1906
+ B,
1893
1907
  mi
1894
- ]), [gi, _i] = C(0), [vi, yi] = C(!1);
1895
- b(() => {
1908
+ ]), [gi, _i] = T(0), [vi, yi] = T(!1);
1909
+ S(() => {
1896
1910
  if (typeof window > "u" || typeof window.matchMedia != "function") return;
1897
1911
  let e = window.matchMedia("(pointer: coarse)"), t = () => yi(e.matches);
1898
1912
  return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
1899
1913
  }, []);
1900
- let bi = gi <= 0 || Nt(sr, gi, vi) === "scroll" ? vr : xt(hi, gi, { leading: mi }), xi = `${bi.popin.join("\0")}\u0001${bi.hidden.join("\0")}`, B = x(() => bi, [xi]), V = x(() => B.popin.length === 0 && B.hidden.length === 0 ? hi : Pt(c, {
1901
- ...R,
1914
+ let bi = gi <= 0 || Mt(sr, gi, vi) === "scroll" ? vr : bt(hi, gi, { leading: mi }), xi = `${bi.popin.join("\0")}\u0001${bi.hidden.join("\0")}`, H = C(() => bi, [xi]), U = C(() => H.popin.length === 0 && H.hidden.length === 0 ? hi : Nt(c, {
1915
+ ...B,
1902
1916
  hidden: [
1903
- ...R.hidden,
1904
- ...B.popin,
1905
- ...B.hidden
1917
+ ...B.hidden,
1918
+ ...H.popin,
1919
+ ...H.hidden
1906
1920
  ]
1907
1921
  }, { leading: mi }), [
1908
1922
  hi,
1909
- B,
1923
+ H,
1910
1924
  c,
1911
- R,
1925
+ B,
1912
1926
  mi
1913
- ]), Si = x(() => B.popin.length === 0 ? [] : hi.filter((e) => B.popin.includes(e.id)), [hi, B]), Ci = Si.length > 0, wi = S(vr);
1914
- b(() => {
1927
+ ]), Si = C(() => H.popin.length === 0 ? [] : hi.filter((e) => H.popin.includes(e.id)), [hi, H]), Ci = Si.length > 0, wi = w(vr);
1928
+ S(() => {
1915
1929
  let e = wi.current;
1916
- Er(B.popin, e.popin) && Er(B.hidden, e.hidden) || (wi.current = B, Xe?.(B));
1917
- }, [B, Xe]);
1918
- let H = x(() => new Map(V.map((e) => [e.id, e])), [V]), U = x(() => [
1919
- ...ui ? [dn] : [],
1920
- ...di ? [pn] : [],
1921
- ...fi ? [fn] : [],
1922
- ...V.map((e) => e.id)
1930
+ Er(H.popin, e.popin) && Er(H.hidden, e.hidden) || (wi.current = H, Ze?.(H));
1931
+ }, [H, Ze]);
1932
+ let W = C(() => new Map(U.map((e) => [e.id, e])), [U]), G = C(() => [
1933
+ ...ui ? [un] : [],
1934
+ ...di ? [fn] : [],
1935
+ ...fi ? [dn] : [],
1936
+ ...U.map((e) => e.id)
1923
1937
  ], [
1924
1938
  ui,
1925
1939
  di,
1926
1940
  fi,
1927
- V
1928
- ]), Ti = U.length + +!!Ci, Ei = U.length + 1, Di = x(() => Ci ? [...U, ft] : U, [Ci, U]), Oi = x(() => bt(V, pi), [V, pi]), W = x(() => {
1941
+ U
1942
+ ]), Ti = G.length + +!!Ci, Ei = G.length + 1, Di = C(() => Ci ? [...G, dt] : G, [Ci, G]), Oi = C(() => yt(U, pi), [U, pi]), K = C(() => {
1929
1943
  let e = rt?.top ?? [], t = rt?.bottom ?? [];
1930
1944
  if (e.length === 0 && t.length === 0) return {
1931
1945
  top: [],
@@ -1933,7 +1947,7 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
1933
1947
  keys: null
1934
1948
  };
1935
1949
  let n = /* @__PURE__ */ new Map();
1936
- for (let e of L) n.set(P(e), e);
1950
+ for (let e of z) n.set(I(e), e);
1937
1951
  let r = (e) => e.flatMap((e) => {
1938
1952
  let t = n.get(e);
1939
1953
  return t === void 0 ? [] : [{
@@ -1955,20 +1969,20 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
1955
1969
  };
1956
1970
  }, [
1957
1971
  rt,
1958
- L,
1959
- P
1960
- ]), ki = x(() => W.keys ? L.filter((e) => !W.keys.has(P(e))) : L, [
1961
- L,
1962
- W.keys,
1963
- P
1964
- ]), Ai = x(() => {
1972
+ z,
1973
+ I
1974
+ ]), ki = C(() => K.keys ? z.filter((e) => !K.keys.has(I(e))) : z, [
1975
+ z,
1976
+ K.keys,
1977
+ I
1978
+ ]), Ai = C(() => {
1965
1979
  let e = ki;
1966
1980
  if (Zr === "server") return {
1967
- nodes: wt(e, c, I.group, {
1968
- rowKey: P,
1981
+ nodes: Ct(e, c, R.group, {
1982
+ rowKey: I,
1969
1983
  expandedGroups: ci,
1970
- offset: I.page && "index" in I.page ? I.page.index * I.page.size : 0,
1971
- locale: N,
1984
+ offset: R.page && "index" in R.page ? R.page.index * R.page.size : 0,
1985
+ locale: F,
1972
1986
  timeZone: bn,
1973
1987
  booleans: Lr.booleans
1974
1988
  }),
@@ -1977,12 +1991,12 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
1977
1991
  hasMore: Kr ?? !1,
1978
1992
  aggregates: {}
1979
1993
  };
1980
- let t = ht(e, c, I, {
1981
- rowKey: P,
1994
+ let t = mt(e, c, R, {
1995
+ rowKey: I,
1982
1996
  expandedGroups: ci,
1983
- tree: A,
1984
- expanded: A ? oi : void 0,
1985
- locale: N,
1997
+ tree: M,
1998
+ expanded: M ? oi : void 0,
1999
+ locale: F,
1986
2000
  timeZone: bn,
1987
2001
  booleans: Lr.booleans
1988
2002
  });
@@ -1994,55 +2008,55 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
1994
2008
  Zr,
1995
2009
  ki,
1996
2010
  c,
2011
+ R,
1997
2012
  I,
1998
- P,
1999
2013
  ci,
2000
- A,
2014
+ M,
2001
2015
  oi,
2002
- N,
2016
+ F,
2003
2017
  bn,
2004
2018
  Lr.booleans,
2005
2019
  Gr,
2006
2020
  Kr
2007
- ]), G = Ai.nodes, ji = Ai.total, Mi = x(() => Si.filter((e) => e.column.aggregate !== void 0), [Si]), Ni = (V.some((e) => e.column.aggregate !== void 0) || Mi.length > 0) && Zr === "client", Pi = y((e) => Ci ? e === mt ? Mi.length > 0 : Nr(e) : !1, [Ci, Mi]), Fi = y((e) => e.column !== ft || Pi(e.row) ? e : {
2021
+ ]), q = Ai.nodes, ji = Ai.total, Mi = C(() => Si.filter((e) => e.column.aggregate !== void 0), [Si]), Ni = (U.some((e) => e.column.aggregate !== void 0) || Mi.length > 0) && Zr === "client", Pi = x((e) => Ci ? e === pt ? Mi.length > 0 : Nr(e) : !1, [Ci, Mi]), Fi = x((e) => e.column !== dt || Pi(e.row) ? e : {
2008
2022
  row: e.row,
2009
- column: U[U.length - 1]
2010
- }, [Pi, U]), Ii = 1 + (i && i.length > 0 ? 1 : 0) + +!!ir, Li = x(() => {
2011
- let e = [dt];
2012
- ir && e.push(lt);
2013
- for (let t of W.top) e.push(t.key);
2014
- for (let t of G) e.push(t.kind === "group" ? `${ut}${t.key}` : t.key);
2015
- for (let t of W.bottom) e.push(t.key);
2016
- return Ni && e.push(mt), e;
2023
+ column: G[G.length - 1]
2024
+ }, [Pi, G]), Ii = 1 + (i && i.length > 0 ? 1 : 0) + +!!ir, Li = C(() => {
2025
+ let e = [ut];
2026
+ ir && e.push(ct);
2027
+ for (let t of K.top) e.push(t.key);
2028
+ for (let t of q) e.push(t.kind === "group" ? `${lt}${t.key}` : t.key);
2029
+ for (let t of K.bottom) e.push(t.key);
2030
+ return Ni && e.push(pt), e;
2017
2031
  }, [
2018
- G,
2019
- W,
2032
+ q,
2033
+ K,
2020
2034
  ir,
2021
2035
  Ni
2022
- ]), Ri = 1 + +!!ir, zi = Ri + W.top.length + G.length + W.bottom.length, [Bi, Vi] = C(0), [Hi, Ui] = C(0), [K, Wi] = C({
2036
+ ]), Ri = 1 + +!!ir, zi = Ri + K.top.length + q.length + K.bottom.length, [Bi, Vi] = T(0), [Hi, Ui] = T(0), [J, Wi] = T({
2023
2037
  width: 0,
2024
2038
  height: 0
2025
- }), [Gi, Ki] = C(null), [qi, Ji] = C(/* @__PURE__ */ new Map()), Yi = or === "auto" || Ci, q = typeof or == "number" ? or : Gi ?? pr, Xi = ar === !0 || ar === "auto" && G.length > mr, Zi = x(() => {
2026
- if (Yi) return Ke(G.map((e, t) => qi.get(t) ?? q));
2039
+ }), [Gi, Ki] = T(null), [qi, Ji] = T(/* @__PURE__ */ new Map()), Yi = or === "auto" || Ci, Y = typeof or == "number" ? or : Gi ?? pr, Xi = ar === !0 || ar === "auto" && q.length > mr, Zi = C(() => {
2040
+ if (Yi) return Ge(q.map((e, t) => qi.get(t) ?? Y));
2027
2041
  }, [
2028
2042
  Yi,
2029
- G,
2043
+ q,
2030
2044
  qi,
2031
- q
2032
- ]), Qi = x(() => {
2045
+ Y
2046
+ ]), Qi = C(() => {
2033
2047
  if (!Xi) return {
2034
2048
  startIndex: 0,
2035
- endIndex: G.length,
2049
+ endIndex: q.length,
2036
2050
  startOffset: 0,
2037
2051
  totalSize: 0
2038
2052
  };
2039
- let e = Je({
2040
- itemCount: G.length,
2041
- itemSize: q,
2053
+ let e = qe({
2054
+ itemCount: q.length,
2055
+ itemSize: Y,
2042
2056
  metrics: Zi,
2043
2057
  overscan: cr,
2044
2058
  scrollOffset: Math.max(0, Bi),
2045
- viewportSize: K.height || gr
2059
+ viewportSize: J.height || gr
2046
2060
  });
2047
2061
  return {
2048
2062
  startIndex: e.startIndex,
@@ -2052,228 +2066,231 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
2052
2066
  };
2053
2067
  }, [
2054
2068
  Xi,
2055
- K.height,
2056
- G.length,
2057
- q,
2069
+ J.height,
2070
+ q.length,
2071
+ Y,
2058
2072
  Zi,
2059
2073
  cr,
2060
2074
  Bi
2061
- ]), $i = x(() => Xi ? G.slice(Qi.startIndex, Qi.endIndex) : G, [
2075
+ ]), $i = C(() => Xi ? q.slice(Qi.startIndex, Qi.endIndex) : q, [
2062
2076
  Xi,
2063
- G,
2077
+ q,
2064
2078
  Qi.startIndex,
2065
2079
  Qi.endIndex
2066
- ]), [ea, ta] = C([]), na = x(() => V.filter((e) => e.pinned === null), [V]), ra = ar === !0 || ar === "auto" && na.length > hr, ia = x(() => {
2067
- if (!ra || K.width === 0) return V;
2068
- let e = pi.reduce((e, t) => e + t, 0), t = V.filter((e) => e.pinned === "start").reduce((e, t) => e + t.width, 0), n = V.filter((e) => e.pinned === "end").reduce((e, t) => e + t.width, 0), r = Hi - _r, i = Hi + K.width - n + _r, a = e + t, o = /* @__PURE__ */ new Set();
2080
+ ]), [ea, ta] = T([]), na = C(() => U.filter((e) => e.pinned === null), [U]), ra = ar === !0 || ar === "auto" && na.length > hr, ia = C(() => {
2081
+ if (!ra || J.width === 0) return U;
2082
+ let e = pi.reduce((e, t) => e + t, 0), t = U.filter((e) => e.pinned === "start").reduce((e, t) => e + t.width, 0), n = U.filter((e) => e.pinned === "end").reduce((e, t) => e + t.width, 0), r = Hi - _r, i = Hi + J.width - n + _r, a = e + t, o = /* @__PURE__ */ new Set();
2069
2083
  for (let e of na) {
2070
2084
  let t = a + e.width;
2071
2085
  t >= r && a <= i && o.add(e.id), a = t;
2072
2086
  }
2073
- return V.filter((e) => e.pinned !== null || o.has(e.id) || z !== null && z.column === e.id);
2087
+ return U.filter((e) => e.pinned !== null || o.has(e.id) || V !== null && V.column === e.id);
2074
2088
  }, [
2075
2089
  ra,
2076
- K.width,
2077
- V,
2090
+ J.width,
2091
+ U,
2078
2092
  pi,
2079
2093
  Hi,
2080
2094
  na,
2081
- z
2082
- ]), J = x(() => {
2083
- let e = Zr === "client" ? Ai.rows : ki;
2084
- return [
2085
- ...W.top.map((e) => e.key),
2086
- ...e.map(P),
2087
- ...W.bottom.map((e) => e.key)
2088
- ].filter((e) => !zr.has(e));
2089
- }, [
2095
+ V
2096
+ ]), aa = C(() => [
2097
+ ...K.top.map((e) => e.row),
2098
+ ...Zr === "client" ? Ai.rows : ki,
2099
+ ...K.bottom.map((e) => e.row)
2100
+ ], [
2090
2101
  Zr,
2091
2102
  Ai.rows,
2092
2103
  ki,
2093
- W,
2094
- P,
2095
- zr
2096
- ]), aa = x(() => Array.isArray(ti) ? ti : ti == null ? [] : [ti], [ti]), oa = x(() => new Set(aa), [aa]), sa = S(void 0), ca = y((e) => oa.has(e), [oa]), la = x(() => new Set(J), [J]), ua = x(() => aa.filter((e) => la.has(e)).length, [aa, la]), da = ua === 0 ? "none" : ua >= J.length ? "all" : "some", fa = y((e, t, n) => {
2097
- let r = M === "multiple" ? e : e[0] ?? null;
2104
+ K
2105
+ ]), oa = C(() => new Set(ve ? aa.filter((e) => !ve(e)).map(I) : void 0), [
2106
+ ve,
2107
+ aa,
2108
+ I
2109
+ ]), sa = x((e) => oa.has(e), [oa]), ca = x((e) => zr.has(e) || oa.has(e), [zr, oa]), X = C(() => aa.map(I).filter((e) => !ca(e)), [
2110
+ aa,
2111
+ I,
2112
+ ca
2113
+ ]), la = C(() => Array.isArray(ti) ? ti : ti == null ? [] : [ti], [ti]), ua = C(() => new Set(la), [la]), da = w(void 0), fa = x((e) => ua.has(e), [ua]), pa = C(() => new Set(X), [X]), ma = C(() => la.filter((e) => pa.has(e)).length, [la, pa]), ha = ma === 0 ? "none" : ma >= X.length ? "all" : "some", ga = x((e, t, n) => {
2114
+ let r = P === "multiple" ? e : e[0] ?? null;
2098
2115
  ni(r, t, n);
2099
- }, [M, ni]), pa = y((e, t) => {
2100
- if (M === "none" || M === "range" || zr.has(e)) return;
2101
- let n = qe({
2116
+ }, [P, ni]), _a = x((e, t) => {
2117
+ if (P === "none" || P === "range" || ca(e)) return;
2118
+ let n = Ke({
2102
2119
  action: t.range ? "range" : "toggle",
2103
- mode: M,
2104
- selected: aa,
2105
- keys: J,
2120
+ mode: P,
2121
+ selected: la,
2122
+ keys: X,
2106
2123
  key: e,
2107
- anchor: sa.current,
2108
- disabled: (e) => zr.has(e)
2124
+ anchor: da.current,
2125
+ disabled: ca
2109
2126
  });
2110
- t.range || (sa.current = e), n.changed && fa(n.selected, t.reason ?? "pointer", t.source);
2127
+ t.range || (da.current = e), n.changed && ga(n.selected, t.reason ?? "pointer", t.source);
2111
2128
  }, [
2112
- M,
2113
- zr,
2114
- aa,
2115
- J,
2116
- fa
2117
- ]), ma = y((e) => {
2118
- if (M !== "multiple") return;
2119
- let t = qe({
2129
+ P,
2130
+ ca,
2131
+ la,
2132
+ X,
2133
+ ga
2134
+ ]), va = x((e) => {
2135
+ if (P !== "multiple") return;
2136
+ let t = Ke({
2120
2137
  action: "all",
2121
2138
  mode: "multiple",
2122
- selected: aa,
2123
- keys: J
2139
+ selected: la,
2140
+ keys: X
2124
2141
  });
2125
- t.changed && fa(t.selected, "select", e);
2142
+ t.changed && ga(t.selected, "select", e);
2126
2143
  }, [
2127
- M,
2128
- aa,
2129
- J,
2130
- fa
2131
- ]), ha = Math.max(1, Math.floor((K.height || 400) / q) - 1), Y = x(() => ({
2144
+ P,
2145
+ la,
2146
+ X,
2147
+ ga
2148
+ ]), ya = Math.max(1, Math.floor((J.height || 400) / Y) - 1), Z = C(() => ({
2132
2149
  rows: Li,
2133
2150
  columns: Di,
2134
- pageSize: ha,
2151
+ pageSize: ya,
2135
2152
  bodyStart: Ri,
2136
2153
  bodyEnd: zi
2137
2154
  }), [
2138
2155
  Li,
2139
2156
  Di,
2140
- ha,
2157
+ ya,
2141
2158
  Ri,
2142
2159
  zi
2143
- ]), X = x(() => M === "range" ? kt(Y, ri) : null, [
2144
- M,
2145
- Y,
2160
+ ]), ba = C(() => P === "range" ? Ot(Z, ri) : null, [
2161
+ P,
2162
+ Z,
2146
2163
  ri
2147
- ]), ga = y((e) => jt(Y, X, e), [Y, X]), [_a, va] = C(!1), ya = S(null), ba = y((e, t, n) => {
2148
- if (M !== "range" || !Nr(e.row)) return;
2164
+ ]), xa = x((e) => At(Z, ba, e), [Z, ba]), [Sa, Ca] = T(!1), wa = w(null), Ta = x((e, t, n) => {
2165
+ if (P !== "range" || !Nr(e.row)) return;
2149
2166
  let r = t && ri ? ri.anchor : e;
2150
- ya.current = r, ii({
2167
+ wa.current = r, ii({
2151
2168
  anchor: r,
2152
2169
  focus: e
2153
2170
  }, "pointer", n);
2154
2171
  }, [
2155
- M,
2172
+ P,
2156
2173
  ri,
2157
2174
  ii
2158
- ]), xa = y((e, t) => {
2159
- if (M !== "range" || !Nr(e.row)) return;
2160
- let n = ya.current ?? ri?.anchor ?? e;
2175
+ ]), Ea = x((e, t) => {
2176
+ if (P !== "range" || !Nr(e.row)) return;
2177
+ let n = wa.current ?? ri?.anchor ?? e;
2161
2178
  ii({
2162
2179
  anchor: n,
2163
2180
  focus: e
2164
2181
  }, "pointer", t);
2165
2182
  }, [
2166
- M,
2183
+ P,
2167
2184
  ri,
2168
2185
  ii
2169
- ]), Z = y((e) => {
2170
- Ze(k.current?.ownerDocument).announce(e);
2171
- }, []), [Sa, Ca] = C(!1), wa = S(null), Ta = y((e) => {
2172
- let t = k.current?.querySelector(`[data-row="${CSS.escape(e.row)}"] [data-column="${CSS.escape(e.column)}"]`);
2186
+ ]), Da = x((e) => {
2187
+ Xe(j.current?.ownerDocument).announce(e);
2188
+ }, []), [Oa, ka] = T(!1), Aa = w(null), ja = x((e) => {
2189
+ let t = j.current?.querySelector(`[data-row="${CSS.escape(e.row)}"] [data-column="${CSS.escape(e.column)}"]`);
2173
2190
  if (!t) return !1;
2174
2191
  let n = t.matches("[data-part=\"column-header\"], [data-part=\"filter-cell\"]") || t.querySelector("[data-part=\"group-toggle\"]") !== null, r = t.querySelector("[data-part=\"editor\"]");
2175
2192
  if (r) return (r.querySelector("input:not([type=\"checkbox\"]):not([type=\"radio\"]):not([disabled]), textarea:not([disabled]), [role=\"combobox\"]:not([disabled]), [role=\"spinbutton\"]:not([disabled]), [role=\"checkbox\"], [role=\"switch\"]") ?? r.querySelector("a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"]), [contenteditable=\"true\"]") ?? t).focus({ preventScroll: !1 }), !0;
2176
- let i = n ? [] : [...t.querySelectorAll(mn)];
2193
+ let i = n ? [] : [...t.querySelectorAll(pn)];
2177
2194
  return ((i.length === 1 && i[0].matches("a[href], button, input[type=\"checkbox\"], input[type=\"radio\"], [role=\"switch\"], [role=\"button\"], [role=\"checkbox\"]") ? i[0] : null) ?? t).focus({ preventScroll: !1 }), !0;
2178
- }, []), Ea = y((e, t, n) => {
2179
- if (E(e, z) || ai(e, t, n), wa.current = e, Nr(e.row) && !Li.includes(e.row)) return;
2195
+ }, []), Ma = x((e, t, n) => {
2196
+ if (O(e, V) || ai(e, t, n), Aa.current = e, Nr(e.row) && !Li.includes(e.row)) return;
2180
2197
  let r = Li.indexOf(e.row) - Ri;
2181
2198
  if (Xi && r >= 0 && (r < Qi.startIndex || r >= Qi.endIndex)) {
2182
2199
  ta([e.row]);
2183
- let t = Zi ? Zi.offsetOf(r) : r * q;
2184
- Nn.current?.scrollTo({ top: t - K.height / 2 + q });
2200
+ let t = Zi ? Zi.offsetOf(r) : r * Y;
2201
+ Nn.current?.scrollTo({ top: t - J.height / 2 + Y });
2185
2202
  }
2186
2203
  }, [
2187
- z,
2204
+ V,
2188
2205
  ai,
2189
2206
  Li,
2190
2207
  Ri,
2191
2208
  Xi,
2192
2209
  Qi,
2193
2210
  Zi,
2194
- q,
2195
- K.height
2211
+ Y,
2212
+ J.height
2196
2213
  ]);
2197
- Be(() => {
2198
- let e = wa.current;
2199
- e && Ta(e) && (wa.current = null);
2214
+ ze(() => {
2215
+ let e = Aa.current;
2216
+ e && ja(e) && (Aa.current = null);
2200
2217
  });
2201
- let Da = S(0);
2202
- b(() => {
2203
- if (z && Li.includes(z.row) && (Da.current = Li.indexOf(z.row), Di.includes(z.column)) || !z) return;
2204
- let e = Li.includes(z.row) && B.popin.includes(z.column) && Pi(z.row) ? {
2205
- row: z.row,
2206
- column: ft
2207
- } : Rt(Y, z, Da.current);
2208
- e && !E(e, z) ? (ai(e, "programmatic"), Sa && (wa.current = e)) : !e && Sa && k.current?.querySelector("[data-part=\"empty\"] [tabindex]")?.focus();
2218
+ let Na = w(0);
2219
+ S(() => {
2220
+ if (V && Li.includes(V.row) && (Na.current = Li.indexOf(V.row), Di.includes(V.column)) || !V) return;
2221
+ let e = Li.includes(V.row) && H.popin.includes(V.column) && Pi(V.row) ? {
2222
+ row: V.row,
2223
+ column: dt
2224
+ } : Lt(Z, V, Na.current);
2225
+ e && !O(e, V) ? (ai(e, "programmatic"), Oa && (Aa.current = e)) : !e && Oa && j.current?.querySelector("[data-part=\"empty\"] [tabindex]")?.focus();
2209
2226
  }, [
2210
- Y,
2227
+ Z,
2211
2228
  Li,
2212
2229
  Di,
2213
- B,
2230
+ H,
2214
2231
  Pi,
2215
- z,
2232
+ V,
2216
2233
  ai,
2217
- Sa
2234
+ Oa
2218
2235
  ]);
2219
- let Oa = y((e) => {
2220
- let t = I.sort.findIndex((t) => t.column === e);
2236
+ let Pa = x((e) => {
2237
+ let t = R.sort.findIndex((t) => t.column === e);
2221
2238
  return t === -1 ? null : {
2222
- direction: I.sort[t].direction,
2239
+ direction: R.sort[t].direction,
2223
2240
  index: t + 1
2224
2241
  };
2225
- }, [I.sort]), ka = y((e) => H.get(e)?.column.label ?? e, [H]), Aa = y((e) => {
2242
+ }, [R.sort]), Fa = x((e) => W.get(e)?.column.label ?? e, [W]), Ia = x((e) => {
2226
2243
  if (e.sort.length === 0) {
2227
- Z(j("sortCleared"));
2244
+ Da(N("sortCleared"));
2228
2245
  return;
2229
2246
  }
2230
- let t = e.sort.map((e) => j(e.direction === "ascending" ? "sortAscending" : "sortDescending", { column: ka(e.column) })).join(", ");
2231
- Z(j("sortedBy", { order: t }));
2247
+ let t = e.sort.map((e) => N(e.direction === "ascending" ? "sortAscending" : "sortDescending", { column: Fa(e.column) })).join(", ");
2248
+ Da(N("sortedBy", { order: t }));
2232
2249
  }, [
2233
- Z,
2234
- j,
2235
- ka
2236
- ]), ja = y((e, t, n, r = "pointer") => {
2237
- let i = H.get(e);
2250
+ Da,
2251
+ N,
2252
+ Fa
2253
+ ]), La = x((e, t, n, r = "pointer") => {
2254
+ let i = W.get(e);
2238
2255
  if (!i || !i.sortable) return;
2239
- let a = qt(I, e, t);
2240
- Ur(a.query, r, n, { change: a.change }), Aa(a.query);
2256
+ let a = Kt(R, e, t);
2257
+ Ur(a.query, r, n, { change: a.change }), Ia(a.query);
2241
2258
  }, [
2242
- H,
2243
- I,
2259
+ W,
2260
+ R,
2244
2261
  Ur,
2245
- Aa
2246
- ]), Ma = y((e, t, n) => {
2247
- let r = Kt(I, e, t);
2248
- Ur(r.query, "pointer", n, { change: r.change }), Aa(r.query);
2262
+ Ia
2263
+ ]), Ra = x((e, t, n) => {
2264
+ let r = Gt(R, e, t);
2265
+ Ur(r.query, "pointer", n, { change: r.change }), Ia(r.query);
2249
2266
  }, [
2250
- I,
2267
+ R,
2251
2268
  Ur,
2252
- Aa
2253
- ]), Na = y((e) => on(I.filter, e) ?? null, [I.filter]), Pa = y((e, t, n, r) => {
2254
- let i = Vt(I, e, t);
2269
+ Ia
2270
+ ]), za = x((e) => an(R.filter, e) ?? null, [R.filter]), Ba = x((e, t, n, r) => {
2271
+ let i = Bt(R, e, t);
2255
2272
  Ur(i.query, n, r, { change: i.change });
2256
- }, [I, Ur]), [Fa, Ia] = C(null), [La, Ra] = C(null), [za, Ba] = C(null), Va = S(-Infinity), Ha = y((e, t, n) => {
2257
- Ba({
2273
+ }, [R, Ur]), [Va, Ha] = T(null), [Ua, Wa] = T(null), [Ga, Ka] = T(null), qa = w(-Infinity), Ja = x((e, t, n) => {
2274
+ Ka({
2258
2275
  column: e,
2259
2276
  anchor: t,
2260
2277
  returnTo: n
2261
- }), Ra(e);
2262
- }, []), Ua = y(() => Ba(null), []), Wa = y((e, t) => {
2278
+ }), Wa(e);
2279
+ }, []), Ya = x(() => Ka(null), []), Xa = x((e, t) => {
2263
2280
  let n = e.target;
2264
- n instanceof Element && e.currentTarget.contains(n) && (e.shiftKey || n.closest(yr) || (e.preventDefault(), !(Date.now() - Va.current < br) && Ha(t, Cr(e.clientX, e.clientY), e.currentTarget)));
2265
- }, [Ha]), Ga = S(/* @__PURE__ */ new Map()), Ka = y((e) => {
2266
- let t = `${e}|${JSON.stringify(I.filter)}|${I.search}|${L.length}`, n = Ga.current.get(t);
2281
+ n instanceof Element && e.currentTarget.contains(n) && (e.shiftKey || n.closest(yr) || (e.preventDefault(), !(Date.now() - qa.current < br) && Ja(t, Cr(e.clientX, e.clientY), e.currentTarget)));
2282
+ }, [Ja]), Za = w(/* @__PURE__ */ new Map()), Qa = x((e) => {
2283
+ let t = `${e}|${JSON.stringify(R.filter)}|${R.search}|${z.length}`, n = Za.current.get(t);
2267
2284
  if (n) return n;
2268
2285
  let r = c.find((t) => t.id === e), i = /* @__PURE__ */ new Map();
2269
2286
  if (r) {
2270
- let t = un(I.filter, e), n = Xt(t.rules.length ? t : null, (e, t) => {
2287
+ let t = ln(R.filter, e), n = Yt(t.rules.length ? t : null, (e, t) => {
2271
2288
  let n = c.find((e) => e.id === t);
2272
- return n ? _t(n, e) : void 0;
2273
- }, { locale: N });
2274
- for (let e of L) {
2289
+ return n ? gt(n, e) : void 0;
2290
+ }, { locale: F });
2291
+ for (let e of z) {
2275
2292
  if (!n(e)) continue;
2276
- let t = _t(r, e);
2293
+ let t = gt(r, e);
2277
2294
  for (let e of Array.isArray(t) ? t : [t]) {
2278
2295
  if (e == null || e === "") continue;
2279
2296
  let t = String(e);
@@ -2281,107 +2298,107 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
2281
2298
  }
2282
2299
  }
2283
2300
  }
2284
- return Ga.current = /* @__PURE__ */ new Map([[t, i]]), i;
2301
+ return Za.current = /* @__PURE__ */ new Map([[t, i]]), i;
2285
2302
  }, [
2286
2303
  c,
2287
- I.filter,
2288
- I.search,
2289
- L,
2290
- N
2291
- ]), qa = y((e, t, n, r) => {
2304
+ R.filter,
2305
+ R.search,
2306
+ z,
2307
+ F
2308
+ ]), $a = x((e, t, n, r) => {
2292
2309
  ei(e, n, r, { change: t });
2293
- }, [ei]), Ja = y((e, t, n) => {
2294
- qa(Wt(R, e, t), "pinned", "pointer", n);
2295
- }, [R, qa]), Ya = y((e, t, n = "programmatic") => {
2310
+ }, [ei]), eo = x((e, t, n) => {
2311
+ $a(Ut(B, e, t), "pinned", "pointer", n);
2312
+ }, [B, $a]), to = x((e, t, n = "programmatic") => {
2296
2313
  let r = c.find((t) => t.id === e);
2297
- r && !R.hidden.includes(e) && (qa(Ht(R, e, !0), "hidden", n, t), Z(j("columnHidden", { column: r.label })));
2314
+ r && !B.hidden.includes(e) && ($a(Vt(B, e, !0), "hidden", n, t), Da(N("columnHidden", { column: r.label })));
2298
2315
  }, [
2299
2316
  c,
2300
- R,
2301
- qa,
2302
- Z,
2303
- j
2304
- ]), Xa = y((e, t, n, r) => {
2317
+ B,
2318
+ $a,
2319
+ Da,
2320
+ N
2321
+ ]), no = x((e, t, n, r) => {
2305
2322
  let i = c.find((t) => t.id === e);
2306
2323
  if (!i) return;
2307
- let a = Gt(R, i, t);
2308
- qa(a, "width", n, r), n === "keyboard" && Z(j("resized", {
2324
+ let a = Wt(B, i, t);
2325
+ $a(a, "width", n, r), n === "keyboard" && Da(N("resized", {
2309
2326
  column: i.label,
2310
2327
  width: String(a.widths[e] ?? t)
2311
2328
  }));
2312
2329
  }, [
2313
2330
  c,
2314
- R,
2315
- qa,
2316
- Z,
2317
- j
2318
- ]), Za = y((e, t, n) => {
2319
- let r = H.get(e);
2320
- r && r.resizable && Xa(e, r.width + t, "keyboard", n);
2321
- }, [H, Xa]), Qa = y((e) => {
2322
- let t = k.current;
2331
+ B,
2332
+ $a,
2333
+ Da,
2334
+ N
2335
+ ]), ro = x((e, t, n) => {
2336
+ let r = W.get(e);
2337
+ r && r.resizable && no(e, r.width + t, "keyboard", n);
2338
+ }, [W, no]), io = x((e) => {
2339
+ let t = j.current;
2323
2340
  if (!t) return null;
2324
2341
  let n = 0;
2325
2342
  for (let r of t.querySelectorAll(`[data-column="${CSS.escape(e)}"]`)) n = Math.max(n, Ar(r));
2326
2343
  return n > 0 ? Math.ceil(n) : null;
2327
- }, []), $a = y((e, t, n) => {
2328
- if (!H.has(e)) return;
2329
- let r = Qa(e);
2330
- r !== null && Xa(e, r, t, n);
2344
+ }, []), ao = x((e, t, n) => {
2345
+ if (!W.has(e)) return;
2346
+ let r = io(e);
2347
+ r !== null && no(e, r, t, n);
2331
2348
  }, [
2332
- H,
2333
- Qa,
2334
- Xa
2335
- ]), eo = y((e, t) => {
2336
- let n = R;
2337
- for (let e of V) {
2349
+ W,
2350
+ io,
2351
+ no
2352
+ ]), oo = x((e, t) => {
2353
+ let n = B;
2354
+ for (let e of U) {
2338
2355
  if (!e.resizable) continue;
2339
- let t = Qa(e.id);
2340
- t !== null && (n = Gt(n, e.column, t));
2356
+ let t = io(e.id);
2357
+ t !== null && (n = Wt(n, e.column, t));
2341
2358
  }
2342
- n !== R && qa(n, "width", e, t);
2359
+ n !== B && $a(n, "width", e, t);
2343
2360
  }, [
2344
- R,
2345
- V,
2346
- Qa,
2347
- qa
2348
- ]), to = y((e, t, n) => e === null ? eo(t, n) : $a(e, t, n), [eo, $a]), no = y((e, t, n) => {
2349
- let r = H.get(e);
2361
+ B,
2362
+ U,
2363
+ io,
2364
+ $a
2365
+ ]), so = x((e, t, n) => e === null ? oo(t, n) : ao(e, t, n), [oo, ao]), co = x((e, t, n) => {
2366
+ let r = W.get(e);
2350
2367
  if (!r || !r.reorderable) return;
2351
- let i = Yt(V, e), a = i.indexOf(e) + t;
2352
- a < 0 || a >= i.length || qa(Ut(R, e, a, i), "order", "keyboard", n);
2368
+ let i = Jt(U, e), a = i.indexOf(e) + t;
2369
+ a < 0 || a >= i.length || $a(Ht(B, e, a, i), "order", "keyboard", n);
2353
2370
  }, [
2354
- H,
2355
- V,
2356
- R,
2357
- qa
2358
- ]), [ro, io] = C(null), [ao, oo] = C({
2371
+ W,
2372
+ U,
2373
+ B,
2374
+ $a
2375
+ ]), [lo, uo] = T(null), [fo, po] = T({
2359
2376
  dragging: null,
2360
2377
  target: null,
2361
2378
  offset: null,
2362
2379
  scrollTop: 0
2363
- }), so = S(null), co = S({
2364
- resolved: V,
2365
- effectiveState: R,
2366
- requestState: qa,
2380
+ }), mo = w(null), ho = w({
2381
+ resolved: U,
2382
+ effectiveState: B,
2383
+ requestState: $a,
2367
2384
  gutters: pi,
2368
- labelOf: ka,
2369
- t: j,
2385
+ labelOf: Fa,
2386
+ t: N,
2370
2387
  dragT: Xn
2371
2388
  });
2372
- co.current = {
2373
- resolved: V,
2374
- effectiveState: R,
2375
- requestState: qa,
2389
+ ho.current = {
2390
+ resolved: U,
2391
+ effectiveState: B,
2392
+ requestState: $a,
2376
2393
  gutters: pi,
2377
- labelOf: ka,
2378
- t: j,
2394
+ labelOf: Fa,
2395
+ t: N,
2379
2396
  dragT: Xn
2380
2397
  };
2381
- let lo = S(/* @__PURE__ */ new Map()), uo = S(!1), fo = S(/* @__PURE__ */ new Map()), po = y((e, t) => {
2382
- let n = so.current, r = lo.current.get(t);
2383
- if (r && (r(), lo.current.delete(t)), !e || !n) return;
2384
- let i = co.current.resolved.find((e) => e.id === t);
2398
+ let go = w(/* @__PURE__ */ new Map()), _o = w(!1), vo = w(/* @__PURE__ */ new Map()), yo = x((e, t) => {
2399
+ let n = mo.current, r = go.current.get(t);
2400
+ if (r && (r(), go.current.delete(t)), !e || !n) return;
2401
+ let i = ho.current.resolved.find((e) => e.id === t);
2385
2402
  if (!i || !i.reorderable) return;
2386
2403
  let a = n.attachDraggable(e, {
2387
2404
  container: "columns",
@@ -2390,38 +2407,38 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
2390
2407
  canDrag: (e) => !(e.target instanceof Element && e.target.closest("[data-part=\"resizer\"]")),
2391
2408
  distance: 6
2392
2409
  });
2393
- lo.current.set(t, a);
2394
- }, []), mo = y((e, t) => {
2395
- e ? fo.current.set(t, e) : fo.current.delete(t), po(e, t);
2396
- }, [po]), ho = V.map((e) => e.id).join("\0");
2397
- b(() => {
2398
- for (let [e, t] of fo.current) po(t, e);
2399
- }, [ho, po]), b(() => {
2400
- let e = k.current;
2410
+ go.current.set(t, a);
2411
+ }, []), bo = x((e, t) => {
2412
+ e ? vo.current.set(t, e) : vo.current.delete(t), yo(e, t);
2413
+ }, [yo]), xo = U.map((e) => e.id).join("\0");
2414
+ S(() => {
2415
+ for (let [e, t] of vo.current) yo(t, e);
2416
+ }, [xo, yo]), S(() => {
2417
+ let e = j.current;
2401
2418
  if (!e) return;
2402
- let t = ct({
2419
+ let t = st({
2403
2420
  document: e.ownerDocument,
2404
- t: (e, t) => co.current.dragT(e, t),
2421
+ t: (e, t) => ho.current.dragT(e, t),
2405
2422
  preview: !1,
2406
2423
  autoScroll: { axis: "x" },
2407
2424
  onDrop: ({ items: e, target: t, reason: n, event: r }) => {
2408
2425
  if (t.kind !== "between") return;
2409
- let { resolved: i, effectiveState: a, requestState: o } = co.current, s = e[0], c = Yt(i, s), l = Mr(i, c, s, t.index);
2410
- l !== null && o(Ut(a, s, l, c), "order", n === "keyboard" ? "keyboard" : "pointer", r);
2426
+ let { resolved: i, effectiveState: a, requestState: o } = ho.current, s = e[0], c = Jt(i, s), l = Mr(i, c, s, t.index);
2427
+ l !== null && o(Ht(a, s, l, c), "order", n === "keyboard" ? "keyboard" : "pointer", r);
2411
2428
  }
2412
- }), n = () => co.current.resolved.map((e) => e.id), r = (t) => e.querySelector(`[data-part="column-header"][data-column="${CSS.escape(t)}"]`);
2429
+ }), n = () => ho.current.resolved.map((e) => e.id), r = (t) => e.querySelector(`[data-part="column-header"][data-column="${CSS.escape(t)}"]`);
2413
2430
  t.registerContainer({
2414
2431
  key: "columns",
2415
2432
  items: n,
2416
2433
  orientation: "horizontal",
2417
2434
  element: () => e.querySelector("[data-part=\"head\"] > [data-part=\"header-row\"]:last-of-type"),
2418
2435
  itemElement: r,
2419
- label: () => co.current.t("dragColumns"),
2420
- itemLabel: (e) => co.current.labelOf(e)
2436
+ label: () => ho.current.t("dragColumns"),
2437
+ itemLabel: (e) => ho.current.labelOf(e)
2421
2438
  });
2422
2439
  let i = !1, a = t.subscribe((e) => {
2423
2440
  if (e.status !== "dragging") {
2424
- i && (uo.current = !0), i = !1, oo({
2441
+ i && (_o.current = !0), i = !1, po({
2425
2442
  dragging: null,
2426
2443
  target: null,
2427
2444
  offset: null,
@@ -2432,78 +2449,78 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
2432
2449
  i = !0;
2433
2450
  let t = e.items[0] ?? null, a = e.target && e.target.kind === "between" ? e.target : null, o = null, s = 0, c = null;
2434
2451
  if (a && t) {
2435
- let e = co.current.resolved, i = Yt(e, t), l = e.find((e) => e.id === i[0]), u = e.find((e) => e.id === i[i.length - 1]), d = Math.max(l ? l.index - 1 : 0, Math.min(u ? u.index : e.length, a.index)), f = Nn.current, p = n(), m = d >= p.length, h = p[m ? p.length - 1 : d], g = h ? r(h) : null;
2452
+ let e = ho.current.resolved, i = Jt(e, t), l = e.find((e) => e.id === i[0]), u = e.find((e) => e.id === i[i.length - 1]), d = Math.max(l ? l.index - 1 : 0, Math.min(u ? u.index : e.length, a.index)), f = Nn.current, p = n(), m = d >= p.length, h = p[m ? p.length - 1 : d], g = h ? r(h) : null;
2436
2453
  if (g && f) {
2437
2454
  let e = g.getBoundingClientRect(), t = f.getBoundingClientRect(), n = getComputedStyle(f).direction === "rtl", r = m === n ? e.left : e.right;
2438
2455
  o = n ? t.right - r - f.scrollLeft : r - t.left + f.scrollLeft, s = f.scrollTop, c = p[d] ?? null;
2439
2456
  }
2440
2457
  }
2441
- oo({
2458
+ po({
2442
2459
  dragging: t,
2443
2460
  target: c,
2444
2461
  offset: o,
2445
2462
  scrollTop: s
2446
2463
  });
2447
2464
  });
2448
- so.current = t;
2449
- for (let [e, t] of fo.current) po(t, e);
2450
- let o = lo.current;
2465
+ mo.current = t;
2466
+ for (let [e, t] of vo.current) yo(t, e);
2467
+ let o = go.current;
2451
2468
  return () => {
2452
2469
  a();
2453
2470
  for (let e of o.values()) e();
2454
- o.clear(), t.destroy(), so.current = null;
2471
+ o.clear(), t.destroy(), mo.current = null;
2455
2472
  };
2456
2473
  }, []);
2457
- let go = x(() => {
2474
+ let So = C(() => {
2458
2475
  let e = /* @__PURE__ */ new Map();
2459
- for (let t of W.top) e.set(t.key, t);
2460
- for (let t of G) t.kind === "row" && e.set(t.key, t);
2461
- for (let t of W.bottom) e.set(t.key, t);
2476
+ for (let t of K.top) e.set(t.key, t);
2477
+ for (let t of q) t.kind === "row" && e.set(t.key, t);
2478
+ for (let t of K.bottom) e.set(t.key, t);
2462
2479
  return e;
2463
- }, [G, W]), _o = di && !A && Zr === "client" && I.sort.length === 0 && I.filter === null && I.search.trim() === "" && I.group.length === 0, [vo, yo] = C({
2480
+ }, [q, K]), Co = di && !M && Zr === "client" && R.sort.length === 0 && R.filter === null && R.search.trim() === "" && R.group.length === 0, [wo, To] = T({
2464
2481
  dragging: null,
2465
2482
  offset: null,
2466
2483
  scrollLeft: 0
2467
- }), bo = S(null), xo = S(/* @__PURE__ */ new Map()), So = S(/* @__PURE__ */ new Map()), Co = y((e) => {
2468
- let t = go.get(e), n = c.find((e) => e.rowHeader);
2469
- return t && n ? gt(n, t.row, Lr) : e;
2484
+ }), Eo = w(null), Do = w(/* @__PURE__ */ new Map()), Oo = w(/* @__PURE__ */ new Map()), ko = x((e) => {
2485
+ let t = So.get(e), n = c.find((e) => e.rowHeader);
2486
+ return t && n ? ht(n, t.row, Lr) : e;
2470
2487
  }, [
2471
- go,
2488
+ So,
2472
2489
  c,
2473
2490
  Lr
2474
- ]), wo = S({
2475
- nodeByKey: go,
2491
+ ]), Ao = w({
2492
+ nodeByKey: So,
2476
2493
  mountedNodes: $i,
2477
- rowsReorderableNow: _o,
2494
+ rowsReorderableNow: Co,
2478
2495
  onRowsReorder: Ie,
2479
- labelOf: Co,
2480
- t: j,
2496
+ labelOf: ko,
2497
+ t: N,
2481
2498
  dragT: Xn
2482
2499
  });
2483
- wo.current = {
2484
- nodeByKey: go,
2500
+ Ao.current = {
2501
+ nodeByKey: So,
2485
2502
  mountedNodes: $i,
2486
- rowsReorderableNow: _o,
2503
+ rowsReorderableNow: Co,
2487
2504
  onRowsReorder: Ie,
2488
- labelOf: Co,
2489
- t: j,
2505
+ labelOf: ko,
2506
+ t: N,
2490
2507
  dragT: Xn
2491
2508
  };
2492
- let To = y((e, t) => {
2493
- let n = bo.current;
2494
- if (So.current.get(t)?.(), So.current.delete(t), !e || !n) return;
2509
+ let jo = x((e, t) => {
2510
+ let n = Eo.current;
2511
+ if (Oo.current.get(t)?.(), Oo.current.delete(t), !e || !n) return;
2495
2512
  let r = n.attachDraggable(e, {
2496
2513
  container: "rows",
2497
2514
  key: t,
2498
2515
  handle: () => e.querySelector("[data-part=\"row-handle\"]"),
2499
- disabled: () => !wo.current.rowsReorderableNow,
2516
+ disabled: () => !Ao.current.rowsReorderableNow,
2500
2517
  distance: 6
2501
2518
  });
2502
- So.current.set(t, r);
2503
- }, []), Eo = y((e, t) => {
2504
- e ? xo.current.set(t, e) : xo.current.delete(t), To(e, t);
2505
- }, [To]), Do = y((e, t) => {
2506
- let { nodeByKey: n, mountedNodes: r } = wo.current, i = n.get(e);
2519
+ Oo.current.set(t, r);
2520
+ }, []), Mo = x((e, t) => {
2521
+ e ? Do.current.set(t, e) : Do.current.delete(t), jo(e, t);
2522
+ }, [jo]), No = x((e, t) => {
2523
+ let { nodeByKey: n, mountedNodes: r } = Ao.current, i = n.get(e);
2507
2524
  if (!i) return null;
2508
2525
  let a = r.filter((e) => e.kind === "row"), o = a[a.length - 1], s = a[t], c = s && s.kind === "row" ? s.index : o && o.kind === "row" ? o.index + 1 : 0, l = i.index < c ? c - 1 : c;
2509
2526
  return l === i.index ? null : {
@@ -2513,36 +2530,36 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
2513
2530
  reason: "pointer"
2514
2531
  };
2515
2532
  }, []);
2516
- b(() => {
2517
- let e = k.current;
2533
+ S(() => {
2534
+ let e = j.current;
2518
2535
  if (!e || !di) return;
2519
- let t = ct({
2536
+ let t = st({
2520
2537
  document: e.ownerDocument,
2521
- t: (e, t) => wo.current.dragT(e, t),
2538
+ t: (e, t) => Ao.current.dragT(e, t),
2522
2539
  preview: !1,
2523
2540
  autoScroll: { axis: "y" },
2524
2541
  onDrop: ({ items: e, target: t, reason: n, event: r }) => {
2525
2542
  if (t.kind !== "between") return;
2526
- let i = Do(e[0], t.index);
2527
- i && wo.current.onRowsReorder?.({
2543
+ let i = No(e[0], t.index);
2544
+ i && Ao.current.onRowsReorder?.({
2528
2545
  ...i,
2529
2546
  reason: n === "keyboard" ? "keyboard" : "pointer",
2530
2547
  event: r
2531
2548
  });
2532
2549
  }
2533
- }), n = () => wo.current.mountedNodes.flatMap((e) => e.kind === "row" ? [e.key] : []), r = (t) => e.querySelector(`[data-part="body"] > [data-part="row"][data-row="${CSS.escape(t)}"]`);
2550
+ }), n = () => Ao.current.mountedNodes.flatMap((e) => e.kind === "row" ? [e.key] : []), r = (t) => e.querySelector(`[data-part="body"] > [data-part="row"][data-row="${CSS.escape(t)}"]`);
2534
2551
  t.registerContainer({
2535
2552
  key: "rows",
2536
2553
  items: n,
2537
2554
  orientation: "vertical",
2538
2555
  element: () => e.querySelector("[data-part=\"body\"]"),
2539
2556
  itemElement: r,
2540
- label: () => wo.current.t("dragRows"),
2541
- itemLabel: (e) => wo.current.labelOf(e)
2557
+ label: () => Ao.current.t("dragRows"),
2558
+ itemLabel: (e) => Ao.current.labelOf(e)
2542
2559
  });
2543
2560
  let i = t.subscribe((e) => {
2544
2561
  if (e.status !== "dragging") {
2545
- yo({
2562
+ To({
2546
2563
  dragging: null,
2547
2564
  offset: null,
2548
2565
  scrollLeft: 0
@@ -2557,150 +2574,153 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
2557
2574
  a = (t ? e.bottom : e.top) - n.top + s.scrollTop, o = Math.abs(s.scrollLeft);
2558
2575
  }
2559
2576
  }
2560
- yo({
2577
+ To({
2561
2578
  dragging: t,
2562
2579
  offset: a,
2563
2580
  scrollLeft: o
2564
2581
  });
2565
2582
  });
2566
- bo.current = t;
2567
- for (let [e, t] of xo.current) To(t, e);
2568
- let a = So.current;
2583
+ Eo.current = t;
2584
+ for (let [e, t] of Do.current) jo(t, e);
2585
+ let a = Oo.current;
2569
2586
  return () => {
2570
2587
  i();
2571
2588
  for (let e of a.values()) e();
2572
- a.clear(), t.destroy(), bo.current = null;
2589
+ a.clear(), t.destroy(), Eo.current = null;
2573
2590
  };
2574
2591
  }, [
2575
2592
  di,
2576
- To,
2577
- Do
2593
+ jo,
2594
+ No
2578
2595
  ]);
2579
- let Oo = y((e, t, n) => {
2580
- if (!wo.current.rowsReorderableNow) return;
2581
- let r = wo.current.mountedNodes.filter((e) => e.kind === "row").findIndex((t) => t.key === e);
2596
+ let Po = x((e, t, n) => {
2597
+ if (!Ao.current.rowsReorderableNow) return;
2598
+ let r = Ao.current.mountedNodes.filter((e) => e.kind === "row").findIndex((t) => t.key === e);
2582
2599
  if (r < 0) return;
2583
2600
  let i = t > 0 ? r + 2 : r - 1;
2584
2601
  if (i < 0) return;
2585
- let a = Do(e, i);
2602
+ let a = No(e, i);
2586
2603
  a && (Ie?.({
2587
2604
  ...a,
2588
2605
  reason: "keyboard",
2589
2606
  event: n
2590
- }), Z(j("rowMoved", {
2591
- row: wo.current.labelOf(e),
2607
+ }), Da(N("rowMoved", {
2608
+ row: Ao.current.labelOf(e),
2592
2609
  position: a.to + 1
2593
2610
  })));
2594
2611
  }, [
2595
- Do,
2612
+ No,
2596
2613
  Ie,
2597
- Z,
2598
- j
2599
- ]), ko = ve === !0 ? vn : ve || 0, Ao = S(/* @__PURE__ */ new Map()), jo = S(0), [Mo, No] = C(0), Po = S(null), Fo = S(null);
2600
- b(() => {
2601
- if (ko <= 0) {
2602
- Fo.current = null;
2614
+ Da,
2615
+ N
2616
+ ]), Fo = ge === !0 ? _n : ge || 0, Io = w(/* @__PURE__ */ new Map()), Lo = w(0), [Ro, zo] = T(0), Bo = w(null), Vo = w(null);
2617
+ S(() => {
2618
+ if (Fo <= 0) {
2619
+ Vo.current = null;
2603
2620
  return;
2604
2621
  }
2605
- let e = Fo.current, t = /* @__PURE__ */ new Map();
2606
- for (let e of L) t.set(P(e), e);
2607
- if (Fo.current = {
2608
- rows: L,
2622
+ let e = Vo.current, t = /* @__PURE__ */ new Map();
2623
+ for (let e of z) t.set(I(e), e);
2624
+ if (Vo.current = {
2625
+ rows: z,
2609
2626
  byKey: t
2610
- }, !e || e.rows === L) return;
2627
+ }, !e || e.rows === z) return;
2611
2628
  let n = Date.now(), r = !1;
2612
2629
  for (let t of [
2613
- ...W.top,
2630
+ ...K.top,
2614
2631
  ...$i,
2615
- ...W.bottom
2632
+ ...K.bottom
2616
2633
  ]) {
2617
2634
  if (t.kind !== "row") continue;
2618
2635
  let i = e.byKey.get(t.key);
2619
- if (i !== void 0 && i !== t.row) for (let e of V) Object.is(_t(e.column, i), _t(e.column, t.row)) || (Ao.current.set(`${t.key}\u0000${e.id}`, {
2620
- until: n + ko,
2621
- generation: jo.current + 1
2636
+ if (i !== void 0 && i !== t.row) for (let e of U) Object.is(gt(e.column, i), gt(e.column, t.row)) || (Io.current.set(`${t.key}\u0000${e.id}`, {
2637
+ until: n + Fo,
2638
+ generation: Lo.current + 1
2622
2639
  }), r = !0);
2623
2640
  }
2624
- if (r && (jo.current += 1, No((e) => e + 1), Po.current === null)) {
2641
+ if (r && (Lo.current += 1, zo((e) => e + 1), Bo.current === null)) {
2625
2642
  let e = () => {
2626
- Po.current = null;
2643
+ Bo.current = null;
2627
2644
  let t = Date.now(), n = Infinity;
2628
- for (let [e, r] of Ao.current) r.until <= t ? Ao.current.delete(e) : n = Math.min(n, r.until);
2629
- No((e) => e + 1), n !== Infinity && (Po.current = setTimeout(e, Math.max(16, n - t)));
2645
+ for (let [e, r] of Io.current) r.until <= t ? Io.current.delete(e) : n = Math.min(n, r.until);
2646
+ zo((e) => e + 1), n !== Infinity && (Bo.current = setTimeout(e, Math.max(16, n - t)));
2630
2647
  };
2631
- Po.current = setTimeout(e, ko);
2648
+ Bo.current = setTimeout(e, Fo);
2632
2649
  }
2633
2650
  }, [
2634
- L,
2635
- P,
2651
+ z,
2652
+ I,
2636
2653
  $i,
2637
- W,
2638
- V,
2639
- ko
2640
- ]), b(() => () => {
2641
- Po.current !== null && clearTimeout(Po.current);
2654
+ K,
2655
+ U,
2656
+ Fo
2657
+ ]), S(() => () => {
2658
+ Bo.current !== null && clearTimeout(Bo.current);
2642
2659
  }, []);
2643
- let Io = y((e) => {
2644
- let t = Ao.current.get(`${e.row}\u0000${e.column}`);
2660
+ let Ho = x((e) => {
2661
+ let t = Io.current.get(`${e.row}\u0000${e.column}`);
2645
2662
  return t ? t.generation % 2 == 0 ? "a" : "b" : null;
2646
- }, [Mo]), Lo = x(() => new Set(oi), [oi]), Ro = y((e) => Lo.has(e), [Lo]), zo = y((e, t, n = "pointer") => {
2647
- let r = Lo.has(e) ? oi.filter((t) => t !== e) : [...oi, e];
2663
+ }, [Ro]), Uo = C(() => new Set(oi), [oi]), Wo = x((e) => Uo.has(e), [Uo]), Go = x((e, t, n = "pointer") => {
2664
+ let r = Uo.has(e) ? oi.filter((t) => t !== e) : [...oi, e];
2648
2665
  si(r, n, t);
2649
2666
  }, [
2650
- Lo,
2667
+ Uo,
2651
2668
  oi,
2652
2669
  si
2653
- ]), Bo = x(() => A ? A.column && H.has(A.column) ? A.column : V[0]?.id ?? null : null, [
2654
- A,
2655
- H,
2656
- V
2657
- ]), [Vo, Ho] = C(/* @__PURE__ */ new Set()), Uo = y((e) => Vo.has(e), [Vo]), Wo = y((e) => A?.hasChildren?.(e) === !0, [A]);
2658
- b(() => {
2659
- if (Vo.size === 0) return;
2660
- let e = new Set(Vo);
2661
- for (let t of Vo) {
2662
- let n = go.get(t);
2663
- (!n || !Lo.has(t) || n.childCount > 0) && e.delete(t);
2670
+ ]), Ko = C(() => M ? M.column && W.has(M.column) ? M.column : U[0]?.id ?? null : null, [
2671
+ M,
2672
+ W,
2673
+ U
2674
+ ]), [qo, Jo] = T(/* @__PURE__ */ new Set()), Yo = x((e) => qo.has(e), [qo]), Xo = x((e) => M?.hasChildren?.(e) === !0, [M]);
2675
+ S(() => {
2676
+ if (qo.size === 0) return;
2677
+ let e = new Set(qo);
2678
+ for (let t of qo) {
2679
+ let n = So.get(t);
2680
+ (!n || !Uo.has(t) || n.childCount > 0) && e.delete(t);
2664
2681
  }
2665
- e.size !== Vo.size && Ho(e);
2682
+ e.size !== qo.size && Jo(e);
2666
2683
  }, [
2667
- Vo,
2668
- go,
2669
- Lo
2684
+ qo,
2685
+ So,
2686
+ Uo
2670
2687
  ]);
2671
- let Go = y((e, t, n = "pointer") => {
2672
- let r = go.get(e);
2688
+ let Zo = x((e, t, n = "pointer") => {
2689
+ let r = So.get(e);
2673
2690
  if (!r) return;
2674
- let i = !Lo.has(e);
2675
- zo(e, t, n), i && r.childCount === 0 && A?.hasChildren?.(r.row) && Fe && (Ho((t) => new Set(t).add(e)), Fe({
2691
+ let i = !Uo.has(e);
2692
+ Go(e, t, n), i && r.childCount === 0 && M?.hasChildren?.(r.row) && Fe && (Jo((t) => new Set(t).add(e)), Fe({
2676
2693
  key: e,
2677
2694
  row: r.row
2678
2695
  }));
2679
2696
  }, [
2680
- go,
2681
- Lo,
2682
- zo,
2683
- A,
2697
+ So,
2698
+ Uo,
2699
+ Go,
2700
+ M,
2684
2701
  Fe
2685
- ]), Ko = x(() => G.filter((e) => e.kind === "group").map((e) => e.key), [G]), qo = y((e, t, n = "pointer") => {
2702
+ ]), Qo = C(() => q.filter((e) => e.kind === "group").map((e) => e.key), [q]), $o = x((e, t, n = "pointer") => {
2686
2703
  let r = ci === "all" || ci.includes(e), i;
2687
- i = ci === "all" ? Ko.filter((t) => t !== e && !t.startsWith(`${e}/`)) : r ? ci.filter((t) => t !== e) : [...ci, e], li(i, n, t);
2704
+ i = ci === "all" ? Qo.filter((t) => t !== e && !t.startsWith(`${e}/`)) : r ? ci.filter((t) => t !== e) : [...ci, e], li(i, n, t);
2688
2705
  }, [
2689
2706
  ci,
2690
- Ko,
2707
+ Qo,
2691
2708
  li
2692
- ]), [Jo, Yo] = C(null), Xo = S(Jo);
2693
- Xo.current = Jo;
2694
- let Q = y((e) => go.get(e)?.row, [go]), Zo = y((e, t = null) => {
2709
+ ]), [es, ts] = T(null), ns = w(es);
2710
+ ns.current = es;
2711
+ let Q = x((e) => So.get(e)?.row, [So]), rs = x((e) => {
2712
+ let t = Q(e);
2713
+ return t !== void 0 && _e?.(t) === !0;
2714
+ }, [_e, Q]), is = x((e, t = null) => {
2695
2715
  let n = Q(e.row), r = c.find((t) => t.id === e.column);
2696
- if (!n || !r || !F(r, n)) return;
2697
- let i = nr === "row" ? c.filter((e) => F(e, n)).map((e) => e.id) : [e.column], a = {};
2716
+ if (!n || !r || !L(r, n)) return;
2717
+ let i = rr === "row" ? c.filter((e) => L(e, n)).map((e) => e.id) : [e.column], a = {};
2698
2718
  for (let e of i) {
2699
2719
  let t = c.find((t) => t.id === e);
2700
- a[e] = _t(t, n);
2720
+ a[e] = gt(t, n);
2701
2721
  }
2702
2722
  let o = { ...a };
2703
- t !== null && (o[e.column] = r.kind === "number" ? Number(t) : t), Yo({
2723
+ t !== null && (o[e.column] = r.kind === "number" ? Number(t) : t), ts({
2704
2724
  cell: e,
2705
2725
  columns: i,
2706
2726
  drafts: o,
@@ -2708,14 +2728,14 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
2708
2728
  status: "editing",
2709
2729
  messages: {},
2710
2730
  seed: t
2711
- }), Me?.(e), wa.current = e;
2731
+ }), Me?.(e), Aa.current = e;
2712
2732
  }, [
2713
2733
  Q,
2714
2734
  c,
2715
- F,
2716
- nr,
2735
+ L,
2736
+ rr,
2717
2737
  Me
2718
- ]), Qo = y((e, t) => {
2738
+ ]), as = x((e, t) => {
2719
2739
  let n = (n) => n && {
2720
2740
  ...n,
2721
2741
  drafts: {
@@ -2724,44 +2744,44 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
2724
2744
  },
2725
2745
  status: "editing"
2726
2746
  };
2727
- Xo.current = n(Xo.current), Yo(n);
2728
- }, []), $o = y(() => {
2729
- let e = Xo.current;
2730
- e && (Yo(null), Ae?.(e.cell), wa.current = e.cell);
2731
- }, [Ae]), es = y((e, t) => {
2747
+ ns.current = n(ns.current), ts(n);
2748
+ }, []), os = x(() => {
2749
+ let e = ns.current;
2750
+ e && (ts(null), Ae?.(e.cell), Aa.current = e.cell);
2751
+ }, [Ae]), ss = x((e, t) => {
2732
2752
  if (t === "down") {
2733
- let t = Et(Y, e, "down");
2734
- return E(t, e) || !Nr(t.row) ? null : t;
2753
+ let t = Tt(Z, e, "down");
2754
+ return O(t, e) || !Nr(t.row) ? null : t;
2735
2755
  }
2736
2756
  let n = Q(e.row);
2737
2757
  if (!n) return null;
2738
- let r = U.filter((e) => {
2758
+ let r = G.filter((e) => {
2739
2759
  let t = c.find((t) => t.id === e);
2740
- return t !== void 0 && F(t, n);
2760
+ return t !== void 0 && L(t, n);
2741
2761
  }), i = r[r.indexOf(e.column) + (t === "next" ? 1 : -1)];
2742
2762
  return i ? {
2743
2763
  row: e.row,
2744
2764
  column: i
2745
2765
  } : null;
2746
2766
  }, [
2747
- Y,
2767
+ Z,
2748
2768
  Q,
2749
- U,
2769
+ G,
2750
2770
  c,
2751
- F
2752
- ]), $ = y((e, t = {}) => {
2753
- let n = Xo.current;
2771
+ L
2772
+ ]), $ = x((e, t = {}) => {
2773
+ let n = ns.current;
2754
2774
  if (!n || n.status === "pending") return;
2755
2775
  let r = Q(n.cell.row);
2756
2776
  if (!r) {
2757
- Yo(null);
2777
+ ts(null);
2758
2778
  return;
2759
2779
  }
2760
2780
  let i = {};
2761
2781
  for (let e of n.columns) Object.is(n.drafts[e], n.originals[e]) || (i[e] = n.drafts[e]);
2762
2782
  let a = () => {
2763
- let e = t.move ?? "stay", r = e === "stay" ? null : es(n.cell, e);
2764
- Yo(null), r ? (Ea(r, "keyboard"), nr === "cell" && e !== "down" && Zo(r)) : wa.current = n.cell;
2783
+ let e = t.move ?? "stay", r = e === "stay" ? null : ss(n.cell, e);
2784
+ ts(null), r ? (Ma(r, "keyboard"), rr === "cell" && e !== "down" && is(r)) : Aa.current = n.cell;
2765
2785
  };
2766
2786
  if (Object.keys(i).length === 0) {
2767
2787
  a();
@@ -2778,17 +2798,17 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
2778
2798
  return e;
2779
2799
  };
2780
2800
  (async () => {
2781
- Yo((e) => e && {
2801
+ ts((e) => e && {
2782
2802
  ...e,
2783
2803
  status: "pending"
2784
2804
  });
2785
2805
  let t = await o();
2786
2806
  if (Object.keys(t).length > 0) {
2787
- Yo((e) => e && {
2807
+ ts((e) => e && {
2788
2808
  ...e,
2789
2809
  status: "invalid",
2790
2810
  messages: t
2791
- }), wa.current = n.cell;
2811
+ }), Aa.current = n.cell;
2792
2812
  return;
2793
2813
  }
2794
2814
  let s = n.cell.column in i ? n.cell.column : Object.keys(i)[0];
@@ -2803,35 +2823,35 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
2803
2823
  changes: i
2804
2824
  }), a();
2805
2825
  } catch (e) {
2806
- let t = e instanceof Error && e.message ? e.message : j("editFailed");
2807
- Yo((e) => e && {
2826
+ let t = e instanceof Error && e.message ? e.message : N("editFailed");
2827
+ ts((e) => e && {
2808
2828
  ...e,
2809
2829
  status: "invalid",
2810
2830
  messages: { [s]: t }
2811
- }), wa.current = n.cell;
2831
+ }), Aa.current = n.cell;
2812
2832
  }
2813
2833
  })();
2814
2834
  }, [
2815
2835
  Q,
2816
- es,
2817
- Ea,
2818
- nr,
2819
- Zo,
2836
+ ss,
2837
+ Ma,
2838
+ rr,
2839
+ is,
2820
2840
  c,
2821
2841
  je,
2822
- j
2823
- ]), ts = j("editConflict");
2824
- b(() => {
2825
- let e = Xo.current;
2842
+ N
2843
+ ]), cs = N("editConflict");
2844
+ S(() => {
2845
+ let e = ns.current;
2826
2846
  if (!e || e.status === "pending") return;
2827
2847
  let t = Q(e.cell.row);
2828
2848
  if (!t) return;
2829
2849
  let n = {};
2830
2850
  for (let r of e.columns) {
2831
2851
  let i = c.find((e) => e.id === r);
2832
- i && !Object.is(_t(i, t), e.originals[r]) && (n[r] = ts);
2852
+ i && !Object.is(gt(i, t), e.originals[r]) && (n[r] = cs);
2833
2853
  }
2834
- Object.keys(n).length > 0 && Yo({
2854
+ Object.keys(n).length > 0 && ts({
2835
2855
  ...e,
2836
2856
  status: "invalid",
2837
2857
  messages: {
@@ -2840,19 +2860,19 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
2840
2860
  }
2841
2861
  });
2842
2862
  }, [
2843
- L,
2863
+ z,
2844
2864
  Q,
2845
2865
  c,
2846
- ts
2866
+ cs
2847
2867
  ]);
2848
- let ns = y((e, t, n) => {
2868
+ let ls = x((e, t, n) => {
2849
2869
  De?.({
2850
2870
  key: e,
2851
2871
  reason: t,
2852
2872
  event: n
2853
2873
  });
2854
2874
  }, [De]);
2855
- b(() => {
2875
+ S(() => {
2856
2876
  let e = Nn.current;
2857
2877
  if (!e) return;
2858
2878
  let t = 0, n = () => {
@@ -2876,7 +2896,7 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
2876
2896
  width: e.clientWidth,
2877
2897
  height: e.clientHeight
2878
2898
  }), a && _i(e.clientWidth), i();
2879
- let o = Ue(e, {
2899
+ let o = He(e, {
2880
2900
  orientation: () => "horizontal",
2881
2901
  onChange: (t) => {
2882
2902
  e.toggleAttribute("data-overflowing", t.overflowing), e.toggleAttribute("data-at-start", t.overflowing && t.atStart), e.toggleAttribute("data-at-end", t.overflowing && t.atEnd);
@@ -2886,7 +2906,7 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
2886
2906
  e.removeEventListener("scroll", r), t && cancelAnimationFrame(t), a?.disconnect(), o.destroy();
2887
2907
  };
2888
2908
  }, []);
2889
- let rs = Ci ? `${xi}\u0002${gi}` : xi, is = y((e, t) => {
2909
+ let us = Ci ? `${xi}\u0002${gi}` : xi, ds = x((e, t) => {
2890
2910
  if (!t) return;
2891
2911
  let n = typeof or != "number" && Gi === null;
2892
2912
  if (!n && !Yi) return;
@@ -2896,48 +2916,48 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
2896
2916
  or,
2897
2917
  Gi,
2898
2918
  Yi,
2899
- rs
2900
- ]), as = Ve !== void 0 && Kr === !0 && !Jr && dr !== "button" && Se !== !0, os = Math.max(0, G.length - ur), ss = Zi ? Zi.offsetOf(os) : os * q, cs = S(null), ls = S(Ve);
2901
- ls.current = Ve, b(() => {
2902
- let e = cs.current;
2903
- if (!as || e === null || typeof IntersectionObserver > "u") return;
2919
+ us
2920
+ ]), fs = Ve !== void 0 && Kr === !0 && !Jr && dr !== "button" && Se !== !0, ps = Math.max(0, q.length - ur), ms = Zi ? Zi.offsetOf(ps) : ps * Y, hs = w(null), gs = w(Ve);
2921
+ gs.current = Ve, S(() => {
2922
+ let e = hs.current;
2923
+ if (!fs || e === null || typeof IntersectionObserver > "u") return;
2904
2924
  let t = new IntersectionObserver((e) => {
2905
- e.some((e) => e.isIntersecting) && ls.current?.();
2925
+ e.some((e) => e.isIntersecting) && gs.current?.();
2906
2926
  });
2907
2927
  return t.observe(e), () => t.disconnect();
2908
2928
  }, [
2909
- as,
2910
- G.length,
2911
- ss
2929
+ fs,
2930
+ q.length,
2931
+ ms
2912
2932
  ]);
2913
- let us = () => k.current ? getComputedStyle(k.current).direction === "rtl" : !1, ds = y(async (e) => {
2914
- let t = X ? At(Y, X) : [[e]], n = Mt(t, (e) => {
2933
+ let _s = () => j.current ? getComputedStyle(j.current).direction === "rtl" : !1, vs = x(async (e) => {
2934
+ let t = ba ? kt(Z, ba) : [[e]], n = jt(t, (e) => {
2915
2935
  let t = Q(e.row), n = c.find((t) => t.id === e.column);
2916
2936
  return t && n ? Rr(n, t) : "";
2917
2937
  });
2918
- await st(n, k.current?.ownerDocument) !== "refused" && Z(j("copied", { count: t.reduce((e, t) => e + t.length, 0) }));
2938
+ await ot(n, j.current?.ownerDocument) !== "refused" && Da(N("copied", { count: t.reduce((e, t) => e + t.length, 0) }));
2919
2939
  }, [
2920
- X,
2921
- Y,
2940
+ ba,
2941
+ Z,
2922
2942
  Q,
2923
2943
  c,
2924
2944
  Rr,
2925
- Z,
2926
- j
2927
- ]), fs = y((e, t) => {
2945
+ Da,
2946
+ N
2947
+ ]), ys = x((e, t) => {
2928
2948
  if (e.defaultPrevented) return;
2929
- let n = Xo.current, r = e.target, i = e.currentTarget, a = r !== i, o = e.key, s = us();
2930
- if (n && E(n.cell, t)) {
2949
+ let n = ns.current, r = e.target, i = e.currentTarget, a = r !== i, o = e.key, s = _s();
2950
+ if (n && O(n.cell, t)) {
2931
2951
  if (o === "Escape") {
2932
- e.preventDefault(), e.stopPropagation(), $o();
2952
+ e.preventDefault(), e.stopPropagation(), os();
2933
2953
  return;
2934
2954
  }
2935
2955
  if (o === "Enter") {
2936
- e.preventDefault(), $("keyboard", { move: nr === "cell" ? "down" : "stay" });
2956
+ e.preventDefault(), $("keyboard", { move: rr === "cell" ? "down" : "stay" });
2937
2957
  return;
2938
2958
  }
2939
2959
  if (o === "Tab") {
2940
- es(t, e.shiftKey ? "previous" : "next") ? (e.preventDefault(), $("keyboard", { move: e.shiftKey ? "previous" : "next" })) : $("keyboard", { move: "stay" });
2960
+ ss(t, e.shiftKey ? "previous" : "next") ? (e.preventDefault(), $("keyboard", { move: e.shiftKey ? "previous" : "next" })) : $("keyboard", { move: "stay" });
2941
2961
  return;
2942
2962
  }
2943
2963
  if (o === "F2") {
@@ -2948,7 +2968,7 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
2948
2968
  }
2949
2969
  if (n && n.columns.includes(t.column) && n.cell.row === t.row) {
2950
2970
  if (o === "Escape") {
2951
- e.preventDefault(), $o();
2971
+ e.preventDefault(), os();
2952
2972
  return;
2953
2973
  }
2954
2974
  if (o === "Enter") {
@@ -2957,7 +2977,7 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
2957
2977
  }
2958
2978
  return;
2959
2979
  }
2960
- if (a && t.row === dt && i.contains(r) && r.closest("[data-part=\"column-actions\"]") !== null) {
2980
+ if (a && t.row === ut && i.contains(r) && r.closest("[data-part=\"column-actions\"]") !== null) {
2961
2981
  if (o === "Escape" || o === "F2") {
2962
2982
  e.preventDefault(), i.focus();
2963
2983
  return;
@@ -2971,7 +2991,7 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
2971
2991
  if (a && !r.matches("a[href], button, input[type=\"checkbox\"], input[type=\"radio\"], [role=\"switch\"], [role=\"button\"], [role=\"checkbox\"]")) {
2972
2992
  if (o === "Escape") e.preventDefault(), i.focus();
2973
2993
  else if (o === "Tab") {
2974
- let t = [...i.querySelectorAll(mn)];
2994
+ let t = [...i.querySelectorAll(pn)];
2975
2995
  if (t.length > 1) {
2976
2996
  let n = t[(t.indexOf(r) + (e.shiftKey ? -1 : 1) + t.length) % t.length];
2977
2997
  e.preventDefault(), n?.focus();
@@ -2979,7 +2999,7 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
2979
2999
  }
2980
3000
  return;
2981
3001
  }
2982
- let c = t.row === dt, l = H.get(t.column), u = Nr(t.row) ? Q(t.row) : void 0, d = {
3002
+ let c = t.row === ut, l = W.get(t.column), u = Nr(t.row) ? Q(t.row) : void 0, d = {
2983
3003
  ArrowUp: "up",
2984
3004
  ArrowDown: "down",
2985
3005
  ArrowLeft: s ? "end" : "start",
@@ -2991,17 +3011,17 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
2991
3011
  };
2992
3012
  if (c && l) {
2993
3013
  if ((o === "ContextMenu" || o === "F10" && e.shiftKey) && !r.closest(yr)) {
2994
- e.preventDefault(), Va.current = Date.now(), Ha(t.column, i, i);
3014
+ e.preventDefault(), qa.current = Date.now(), Ja(t.column, i, i);
2995
3015
  return;
2996
3016
  }
2997
3017
  if ((e.ctrlKey || e.metaKey) && e.shiftKey && (o === "ArrowLeft" || o === "ArrowRight")) {
2998
3018
  e.preventDefault();
2999
3019
  let n = o === "ArrowRight" !== s;
3000
- Za(t.column, n ? pt : -pt, e);
3020
+ ro(t.column, n ? ft : -ft, e);
3001
3021
  return;
3002
3022
  }
3003
3023
  if ((e.ctrlKey || e.metaKey) && e.shiftKey && o === "Enter") {
3004
- e.preventDefault(), to(t.column, "keyboard", e);
3024
+ e.preventDefault(), so(t.column, "keyboard", e);
3005
3025
  return;
3006
3026
  }
3007
3027
  if (o === "F2" && !a) {
@@ -3012,38 +3032,38 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
3012
3032
  if (e.altKey && (o === "ArrowLeft" || o === "ArrowRight")) {
3013
3033
  e.preventDefault();
3014
3034
  let n = o === "ArrowRight" !== s;
3015
- no(t.column, n ? 1 : -1, e), wa.current = t;
3035
+ co(t.column, n ? 1 : -1, e), Aa.current = t;
3016
3036
  return;
3017
3037
  }
3018
3038
  if ((e.ctrlKey || e.metaKey) && o === "Enter") {
3019
- e.preventDefault(), Ua(), Ra(t.column);
3039
+ e.preventDefault(), Ya(), Wa(t.column);
3020
3040
  return;
3021
3041
  }
3022
3042
  if (o === "Enter" || o === " ") {
3023
3043
  if (a) return;
3024
- e.preventDefault(), ja(t.column, e.shiftKey, e, "keyboard");
3044
+ e.preventDefault(), La(t.column, e.shiftKey, e, "keyboard");
3025
3045
  return;
3026
3046
  }
3027
3047
  }
3028
- if (Tt(t.row) && (o === "ArrowRight" || o === "ArrowLeft") && !e.shiftKey) {
3029
- let n = t.row.slice(ut.length), r = ci === "all" || ci.includes(n);
3048
+ if (wt(t.row) && (o === "ArrowRight" || o === "ArrowLeft") && !e.shiftKey) {
3049
+ let n = t.row.slice(lt.length), r = ci === "all" || ci.includes(n);
3030
3050
  if (o === "ArrowRight" !== s !== r) {
3031
- e.preventDefault(), qo(n, e, "keyboard");
3051
+ e.preventDefault(), $o(n, e, "keyboard");
3032
3052
  return;
3033
3053
  }
3034
3054
  }
3035
3055
  if (u && e.altKey && (o === "ArrowUp" || o === "ArrowDown")) {
3036
- e.preventDefault(), Oo(t.row, o === "ArrowDown" ? 1 : -1, e), wa.current = t;
3056
+ e.preventDefault(), Po(t.row, o === "ArrowDown" ? 1 : -1, e), Aa.current = t;
3037
3057
  return;
3038
3058
  }
3039
- if (u && Bo !== null && t.column === Bo && (o === "ArrowRight" || o === "ArrowLeft") && !e.shiftKey) {
3040
- let n = go.get(t.row), r = n !== void 0 && (n.childCount > 0 || A?.hasChildren?.(u) === !0), i = o === "ArrowRight" !== s;
3059
+ if (u && Ko !== null && t.column === Ko && (o === "ArrowRight" || o === "ArrowLeft") && !e.shiftKey) {
3060
+ let n = So.get(t.row), r = n !== void 0 && (n.childCount > 0 || M?.hasChildren?.(u) === !0), i = o === "ArrowRight" !== s;
3041
3061
  if (n && r && i !== n.open) {
3042
- e.preventDefault(), Go(t.row, e, "keyboard");
3062
+ e.preventDefault(), Zo(t.row, e, "keyboard");
3043
3063
  return;
3044
3064
  }
3045
3065
  if (n && !i && n.parent !== null) {
3046
- e.preventDefault(), Ea({
3066
+ e.preventDefault(), Ma({
3047
3067
  row: n.parent,
3048
3068
  column: t.column
3049
3069
  }, "keyboard", e);
@@ -3051,42 +3071,42 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
3051
3071
  }
3052
3072
  }
3053
3073
  if (u && t.column === "__expander" && (o === "ArrowRight" || o === "ArrowLeft") && !e.shiftKey && Hr(u)) {
3054
- let n = Lo.has(t.row);
3074
+ let n = Uo.has(t.row);
3055
3075
  if (o === "ArrowRight" !== s !== n) {
3056
- e.preventDefault(), zo(t.row, e, "keyboard");
3076
+ e.preventDefault(), Go(t.row, e, "keyboard");
3057
3077
  return;
3058
3078
  }
3059
3079
  }
3060
3080
  if (o === " " && e.shiftKey && u) {
3061
- if (e.preventDefault(), M === "range") {
3062
- let n = Ft(Y, t.row);
3081
+ if (e.preventDefault(), P === "range") {
3082
+ let n = Pt(Z, t.row);
3063
3083
  n && ii(n, "keyboard", e);
3064
- } else pa(t.row, {
3084
+ } else _a(t.row, {
3065
3085
  range: !1,
3066
3086
  source: e,
3067
3087
  reason: "keyboard"
3068
3088
  });
3069
3089
  return;
3070
3090
  }
3071
- if (o === " " && (e.ctrlKey || e.metaKey) && M === "range" && l) {
3091
+ if (o === " " && (e.ctrlKey || e.metaKey) && P === "range" && l) {
3072
3092
  e.preventDefault();
3073
- let n = yt(Y, t.column);
3093
+ let n = vt(Z, t.column);
3074
3094
  n && ii(n, "keyboard", e);
3075
3095
  return;
3076
3096
  }
3077
3097
  if ((o === "a" || o === "A") && (e.ctrlKey || e.metaKey) && !a) {
3078
- if (M === "multiple") {
3079
- e.preventDefault(), (qe({
3098
+ if (P === "multiple") {
3099
+ e.preventDefault(), (Ke({
3080
3100
  action: "all",
3081
3101
  mode: "multiple",
3082
- selected: aa,
3083
- keys: J
3084
- }).changed || ua < J.length) && fa(J, "select", e);
3102
+ selected: la,
3103
+ keys: X
3104
+ }).changed || ma < X.length) && ga(X, "select", e);
3085
3105
  return;
3086
3106
  }
3087
- if (M === "range") {
3107
+ if (P === "range") {
3088
3108
  e.preventDefault();
3089
- let t = Bt(Y);
3109
+ let t = zt(Z);
3090
3110
  t && ii(t, "keyboard", e);
3091
3111
  return;
3092
3112
  }
@@ -3094,216 +3114,216 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
3094
3114
  if ((o === "c" || o === "C") && (e.ctrlKey || e.metaKey) && !a) {
3095
3115
  let n = i.ownerDocument.getSelection();
3096
3116
  if (n && n.toString().length > 0) return;
3097
- e.preventDefault(), ds(t);
3117
+ e.preventDefault(), vs(t);
3098
3118
  return;
3099
3119
  }
3100
- if (o === "Escape" && M === "range" && ri) {
3120
+ if (o === "Escape" && P === "range" && ri) {
3101
3121
  e.preventDefault(), ii(null, "clear", e);
3102
3122
  return;
3103
3123
  }
3104
- if (u && (l || t.column === ft) && (o === "Enter" || o === "F2")) {
3105
- if (l !== void 0 && F(l.column, u) && !a) {
3106
- e.preventDefault(), Zo(t);
3124
+ if (u && (l || t.column === dt) && (o === "Enter" || o === "F2")) {
3125
+ if (l !== void 0 && L(l.column, u) && !a) {
3126
+ e.preventDefault(), is(t);
3107
3127
  return;
3108
3128
  }
3109
- let n = i.querySelectorAll(mn);
3129
+ let n = i.querySelectorAll(pn);
3110
3130
  if (!a && n.length > 0) {
3111
3131
  e.preventDefault(), n[0].focus();
3112
3132
  return;
3113
3133
  }
3114
3134
  if (o === "Enter" && Pr && !a) {
3115
- e.preventDefault(), ns(t.row, "keyboard", e);
3135
+ e.preventDefault(), ls(t.row, "keyboard", e);
3116
3136
  return;
3117
3137
  }
3118
3138
  }
3119
- if (u && l && !a && o.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey && (l.kind === "text" || l.kind === "number") && F(l.column, u)) {
3139
+ if (u && l && !a && o.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey && (l.kind === "text" || l.kind === "number") && L(l.column, u)) {
3120
3140
  if (l.kind === "number" && !/[0-9.,-]/.test(o)) return;
3121
- e.preventDefault(), Zo(t, o);
3141
+ e.preventDefault(), is(t, o);
3122
3142
  return;
3123
3143
  }
3124
3144
  let f = d[o];
3125
3145
  if (!f || a && (o === "ArrowLeft" || o === "ArrowRight" || o === "Home" || o === "End") && r.matches("input:not([type=\"checkbox\"]):not([type=\"radio\"]), textarea")) return;
3126
3146
  e.preventDefault();
3127
- let p = Fi(Et(Y, t, f));
3147
+ let p = Fi(Tt(Z, t, f));
3128
3148
  if (e.shiftKey && o.startsWith("Arrow")) {
3129
- if (M === "range" && Nr(p.row)) {
3149
+ if (P === "range" && Nr(p.row)) {
3130
3150
  let n = ri?.anchor ?? t;
3131
3151
  ii({
3132
3152
  anchor: n,
3133
3153
  focus: p
3134
3154
  }, "keyboard", e);
3135
- } else M === "multiple" && (o === "ArrowUp" || o === "ArrowDown") && Nr(p.row) && pa(p.row, {
3155
+ } else P === "multiple" && (o === "ArrowUp" || o === "ArrowDown") && Nr(p.row) && _a(p.row, {
3136
3156
  range: !0,
3137
3157
  source: e,
3138
3158
  reason: "keyboard"
3139
3159
  });
3140
3160
  }
3141
- E(p, t) || Ea(p, "keyboard", e);
3161
+ O(p, t) || Ma(p, "keyboard", e);
3142
3162
  }, [
3143
- $o,
3163
+ os,
3144
3164
  $,
3145
- nr,
3146
- es,
3147
- H,
3165
+ rr,
3166
+ ss,
3167
+ W,
3148
3168
  Q,
3149
- Za,
3150
- to,
3151
- no,
3152
- ja,
3169
+ ro,
3170
+ so,
3171
+ co,
3172
+ La,
3153
3173
  ci,
3154
- qo,
3174
+ $o,
3155
3175
  Hr,
3156
- Lo,
3157
- zo,
3158
- Bo,
3159
- go,
3160
- A,
3176
+ Uo,
3161
3177
  Go,
3162
- Oo,
3178
+ Ko,
3179
+ So,
3163
3180
  M,
3164
- Y,
3181
+ Zo,
3182
+ Po,
3183
+ P,
3184
+ Z,
3165
3185
  ii,
3166
- pa,
3167
- aa,
3168
- J,
3169
- ua,
3170
- fa,
3171
- ds,
3186
+ _a,
3187
+ la,
3188
+ X,
3189
+ ma,
3190
+ ga,
3191
+ vs,
3172
3192
  ri,
3173
- F,
3174
- Zo,
3193
+ L,
3194
+ is,
3175
3195
  Pr,
3176
- ns,
3177
- Ea,
3178
- Ha,
3179
- Ua,
3196
+ ls,
3197
+ Ma,
3198
+ Ja,
3199
+ Ya,
3180
3200
  Fi
3181
- ]), ps = S(""), ms = S(-Infinity), hs = y((e, t) => {
3182
- if (ps.current = e.pointerType ?? "", e.button !== 0) return;
3183
- uo.current = !1;
3184
- let n = Xo.current;
3185
- n && !E(n.cell, t) && !(n.cell.row === t.row && n.columns.includes(t.column)) && $("blur", { move: "stay" }), E(t, z) || ai(t, "pointer", e), M === "range" && Nr(t.row) && (_n(e) || (ba(t, e.shiftKey, e), va(!0)));
3201
+ ]), bs = w(""), xs = w(-Infinity), Ss = x((e, t) => {
3202
+ if (bs.current = e.pointerType ?? "", e.button !== 0) return;
3203
+ _o.current = !1;
3204
+ let n = ns.current;
3205
+ n && !O(n.cell, t) && !(n.cell.row === t.row && n.columns.includes(t.column)) && $("blur", { move: "stay" }), O(t, V) || ai(t, "pointer", e), P === "range" && Nr(t.row) && (gn(e) || (Ta(t, e.shiftKey, e), Ca(!0)));
3186
3206
  }, [
3187
3207
  $,
3188
- z,
3208
+ V,
3189
3209
  ai,
3190
- M,
3191
- ba
3192
- ]), gs = y((e, t) => {
3193
- _a && e.buttons === 1 && xa(t, e);
3194
- }, [_a, xa]);
3195
- b(() => {
3196
- if (!_a) return;
3197
- let e = () => va(!1), t = k.current?.ownerDocument ?? document;
3210
+ P,
3211
+ Ta
3212
+ ]), Cs = x((e, t) => {
3213
+ Sa && e.buttons === 1 && Ea(t, e);
3214
+ }, [Sa, Ea]);
3215
+ S(() => {
3216
+ if (!Sa) return;
3217
+ let e = () => Ca(!1), t = j.current?.ownerDocument ?? document;
3198
3218
  return t.addEventListener("pointerup", e), t.addEventListener("pointercancel", e), () => {
3199
3219
  t.removeEventListener("pointerup", e), t.removeEventListener("pointercancel", e);
3200
3220
  };
3201
- }, [_a]);
3202
- let _s = y((e, t) => {
3203
- let n = ps.current;
3204
- if (ps.current = "", uo.current) {
3205
- uo.current = !1;
3221
+ }, [Sa]);
3222
+ let ws = x((e, t) => {
3223
+ let n = bs.current;
3224
+ if (bs.current = "", _o.current) {
3225
+ _o.current = !1;
3206
3226
  return;
3207
3227
  }
3208
- if (_n(e)) return;
3209
- if (t.row === dt && H.get(t.column)?.sortable) {
3210
- ja(t.column, e.shiftKey, e, "pointer");
3228
+ if (gn(e)) return;
3229
+ if (t.row === ut && W.get(t.column)?.sortable) {
3230
+ La(t.column, e.shiftKey, e, "pointer");
3211
3231
  return;
3212
3232
  }
3213
- if (Tt(t.row)) {
3214
- qo(t.row.slice(ut.length), e);
3233
+ if (wt(t.row)) {
3234
+ $o(t.row.slice(lt.length), e);
3215
3235
  return;
3216
3236
  }
3217
3237
  if (!Nr(t.row)) return;
3218
- M === "single" && !zr.has(t.row) && pa(t.row, {
3238
+ P === "single" && !ca(t.row) && _a(t.row, {
3219
3239
  range: !1,
3220
3240
  source: e
3221
3241
  });
3222
- let r = Xo.current, i = r !== null && r.cell.row === t.row && r.columns.includes(t.column);
3223
- Pr && (n === "touch" || n === "pen") && !i && (ms.current = Date.now(), ns(t.row, "pointer", e));
3242
+ let r = ns.current, i = r !== null && r.cell.row === t.row && r.columns.includes(t.column);
3243
+ Pr && (n === "touch" || n === "pen") && !i && (xs.current = Date.now(), ls(t.row, "pointer", e));
3224
3244
  }, [
3225
- H,
3226
- ja,
3227
- qo,
3228
- M,
3229
- zr,
3230
- pa,
3245
+ W,
3246
+ La,
3247
+ $o,
3248
+ P,
3249
+ ca,
3250
+ _a,
3231
3251
  Pr,
3232
- ns
3233
- ]), vs = y((e, t) => {
3234
- if (_n(e) || Date.now() - ms.current < xr) return;
3252
+ ls
3253
+ ]), Ts = x((e, t) => {
3254
+ if (gn(e) || Date.now() - xs.current < xr) return;
3235
3255
  let n = Q(t.row), r = c.find((e) => e.id === t.column);
3236
3256
  if (n) {
3237
- if (r && F(r, n) && !Pr) {
3238
- Zo(t);
3257
+ if (r && L(r, n) && !Pr) {
3258
+ is(t);
3239
3259
  return;
3240
3260
  }
3241
- Pr ? ns(t.row, "pointer", e) : r && F(r, n) && Zo(t);
3261
+ Pr ? ls(t.row, "pointer", e) : r && L(r, n) && is(t);
3242
3262
  }
3243
3263
  }, [
3244
3264
  Q,
3245
3265
  c,
3246
- F,
3266
+ L,
3247
3267
  Pr,
3248
- Zo,
3249
- ns
3250
- ]), ys = y((e) => {
3251
- Ca(!0), E(e, z) || ai(e, "programmatic");
3252
- }, [z, ai]), bs = y(() => {}, []), xs = y((e) => {
3268
+ is,
3269
+ ls
3270
+ ]), Es = x((e) => {
3271
+ ka(!0), O(e, V) || ai(e, "programmatic");
3272
+ }, [V, ai]), Ds = x(() => {}, []), Os = x((e) => {
3253
3273
  let t = e.relatedTarget;
3254
3274
  if (!t || !e.currentTarget.contains(t)) {
3255
- Ca(!1);
3256
- let e = Xo.current;
3275
+ ka(!1);
3276
+ let e = ns.current;
3257
3277
  e && e.status === "editing" && $("blur", { move: "stay" });
3258
3278
  }
3259
- }, [$]), Ss = y((e) => {
3279
+ }, [$]), ks = x((e) => {
3260
3280
  let t = Pn.current.cellRenderers?.[e.column.id];
3261
- return t ? t(e) : Fn ? Fn(e) : Gn(e);
3262
- }, [Un, Fn]), Cs = y((e) => {
3281
+ return t ? t(e) : Fn ? Fn(e) : Wn(e);
3282
+ }, [Gn, Fn]), As = x((e) => {
3263
3283
  let t = Pn.current.editorRenderers?.[e.column.id];
3264
- return t ? t(e) : zn ? zn(e) : Yn(e, j, N);
3284
+ return t ? t(e) : zn ? zn(e) : Jn(e, N, F);
3265
3285
  }, [
3266
3286
  Kn,
3267
3287
  zn,
3268
- j,
3269
- N
3270
- ]), ws = y((e, t = "nearest") => {
3271
- let n = G.findIndex((t) => t.key === e), r = Nn.current;
3288
+ N,
3289
+ F
3290
+ ]), js = x((e, t = "nearest") => {
3291
+ let n = q.findIndex((t) => t.key === e), r = Nn.current;
3272
3292
  if (n === -1 || !r) return;
3273
- let i = Zi ? Zi.offsetOf(n) : n * q, a = r.querySelector("[data-part=\"head\"]")?.offsetHeight ?? 0, o = i;
3274
- if (t === "center") o = i - K.height / 2 + q;
3275
- else if (t === "end") o = i - K.height + q + a;
3293
+ let i = Zi ? Zi.offsetOf(n) : n * Y, a = r.querySelector("[data-part=\"head\"]")?.offsetHeight ?? 0, o = i;
3294
+ if (t === "center") o = i - J.height / 2 + Y;
3295
+ else if (t === "end") o = i - J.height + Y + a;
3276
3296
  else if (t === "nearest") {
3277
- let e = r.scrollTop, t = e + K.height - a;
3278
- if (i >= e && i + q <= t) return;
3279
- o = i < e ? i : i - K.height + q + a;
3297
+ let e = r.scrollTop, t = e + J.height - a;
3298
+ if (i >= e && i + Y <= t) return;
3299
+ o = i < e ? i : i - J.height + Y + a;
3280
3300
  }
3281
3301
  r.scrollTo({ top: Math.max(0, o) }), Xi && ta([e]);
3282
3302
  }, [
3283
- G,
3284
- Zi,
3285
3303
  q,
3286
- K.height,
3304
+ Zi,
3305
+ Y,
3306
+ J.height,
3287
3307
  Xi
3288
- ]), Ts = y((e) => {
3289
- let t = Nn.current, n = H.get(e);
3308
+ ]), Ms = x((e) => {
3309
+ let t = Nn.current, n = W.get(e);
3290
3310
  if (!t || !n || n.pinned) return;
3291
3311
  let r = pi.reduce((e, t) => e + t, 0);
3292
- for (let t of V) {
3312
+ for (let t of U) {
3293
3313
  if (t.id === e) break;
3294
3314
  (t.pinned === null || t.pinned === "start") && (r += t.width);
3295
3315
  }
3296
- let i = V.filter((e) => e.pinned === "start").reduce((e, t) => e + t.width, 0) + pi.reduce((e, t) => e + t, 0), a = V.filter((e) => e.pinned === "end").reduce((e, t) => e + t.width, 0), o = Math.abs(t.scrollLeft);
3297
- r < o + i ? t.scrollTo({ left: r - i }) : r + n.width > o + K.width - a && t.scrollTo({ left: r + n.width - K.width + a });
3316
+ let i = U.filter((e) => e.pinned === "start").reduce((e, t) => e + t.width, 0) + pi.reduce((e, t) => e + t, 0), a = U.filter((e) => e.pinned === "end").reduce((e, t) => e + t.width, 0), o = Math.abs(t.scrollLeft);
3317
+ r < o + i ? t.scrollTo({ left: r - i }) : r + n.width > o + J.width - a && t.scrollTo({ left: r + n.width - J.width + a });
3298
3318
  }, [
3299
- H,
3319
+ W,
3300
3320
  pi,
3301
- V,
3302
- K.width
3303
- ]), Es = y((e = {}) => {
3304
- let { filename: t, rows: n, columns: r, ...i } = e, a = Zr === "client" ? Ai.rows : L, o = n === "selected" ? a.filter((e) => oa.has(P(e))) : a, s = r === "all" ? c : V.map((e) => e.column);
3305
- return zt(o, s, {
3306
- locale: N,
3321
+ U,
3322
+ J.width
3323
+ ]), Ns = x((e = {}) => {
3324
+ let { filename: t, rows: n, columns: r, ...i } = e, a = Zr === "client" ? Ai.rows : z, o = n === "selected" ? a.filter((e) => ua.has(I(e))) : a, s = r === "all" ? c : U.map((e) => e.column);
3325
+ return Rt(o, s, {
3326
+ locale: F,
3307
3327
  timeZone: bn,
3308
3328
  ...i,
3309
3329
  booleans: i.booleans ?? Lr.booleans
@@ -3311,442 +3331,448 @@ function jr({ activatable: n, cellRenderers: r, columnGroups: i, columnOverflow:
3311
3331
  }, [
3312
3332
  Zr,
3313
3333
  Ai.rows,
3314
- L,
3315
- oa,
3316
- P,
3334
+ z,
3335
+ ua,
3336
+ I,
3317
3337
  c,
3318
- V,
3319
- N,
3338
+ U,
3339
+ F,
3320
3340
  bn,
3321
3341
  Lr.booleans
3322
3342
  ]);
3323
- ze(he, () => ({
3324
- focusCell: (e) => Ea(e, "programmatic"),
3325
- scrollToRow: ws,
3326
- scrollToColumn: Ts,
3343
+ Re(pe, () => ({
3344
+ focusCell: (e) => Ma(e, "programmatic"),
3345
+ scrollToRow: js,
3346
+ scrollToColumn: Ms,
3327
3347
  scrollToCell: (e) => {
3328
- ws(e.row), Ts(e.column);
3348
+ js(e.row), Ms(e.column);
3329
3349
  },
3330
3350
  startEdit: (e) => {
3331
- Ea(e, "programmatic"), Zo(e);
3351
+ Ma(e, "programmatic"), is(e);
3332
3352
  },
3333
- stopEdit: (e) => e?.commit === !1 ? $o() : $("programmatic"),
3334
- autofit: (e) => to(e ?? null, "programmatic"),
3335
- getOutOfSpace: () => B,
3336
- getVisibleRows: () => Zr === "client" ? Ai.rows : L,
3337
- toCsv: Es,
3353
+ stopEdit: (e) => e?.commit === !1 ? os() : $("programmatic"),
3354
+ autofit: (e) => so(e ?? null, "programmatic"),
3355
+ getOutOfSpace: () => H,
3356
+ getVisibleRows: () => Zr === "client" ? Ai.rows : z,
3357
+ toCsv: Ns,
3338
3358
  reload: Wr.reload,
3339
3359
  exportCsv: (e = {}) => {
3340
- let t = Es(e), n = k.current?.ownerDocument ?? document, r = URL.createObjectURL(new Blob([t], { type: "text/csv;charset=utf-8" })), i = n.createElement("a");
3360
+ let t = Ns(e), n = j.current?.ownerDocument ?? document, r = URL.createObjectURL(new Blob([t], { type: "text/csv;charset=utf-8" })), i = n.createElement("a");
3341
3361
  i.href = r, i.download = e.filename ?? "export.csv", i.click(), URL.revokeObjectURL(r);
3342
3362
  },
3343
- selectAll: () => fa(J, "programmatic", void 0),
3344
- clearSelection: () => fa([], "programmatic", void 0),
3363
+ selectAll: () => ga(X, "programmatic", void 0),
3364
+ clearSelection: () => ga([], "programmatic", void 0),
3345
3365
  get element() {
3346
- return k.current;
3366
+ return j.current;
3347
3367
  }
3348
3368
  }), [
3349
- Ea,
3350
- ws,
3351
- Ts,
3352
- Zo,
3353
- $o,
3369
+ Ma,
3370
+ js,
3371
+ Ms,
3372
+ is,
3373
+ os,
3354
3374
  $,
3355
- to,
3356
- B,
3375
+ so,
3376
+ H,
3357
3377
  Zr,
3358
3378
  Ai.rows,
3359
- L,
3360
- Es,
3379
+ z,
3380
+ Ns,
3361
3381
  Wr.reload,
3362
- fa,
3363
- J
3382
+ ga,
3383
+ X
3364
3384
  ]);
3365
- let Ds = y((e) => {
3366
- k.current = e, typeof vt == "function" ? vt(e) : vt && (vt.current = e);
3367
- }, [vt]), Os = x(() => X ? `${X.rowEnd - X.rowStart + 1} × ${X.columnEnd - X.columnStart + 1}` : null, [X]), ks = S(null), As = qr === "initial" || qr === !0 && ks.current !== "empty";
3368
- !Jr && !Yr && (ks.current = L.length > 0 ? "rows" : "empty");
3369
- let js = Yr ? "error" : As && L.length === 0 ? "loading" : G.length > 0 ? "rows" : I.filter || I.search.trim() ? "no-results" : "empty", Ms = x(() => {
3370
- let e = I.page?.size;
3371
- return K.height === 0 ? jr : Math.max(1, Math.min(e ?? Infinity, Math.ceil(K.height / q)));
3385
+ let Ps = x((e) => {
3386
+ j.current = e, typeof xt == "function" ? xt(e) : xt && (xt.current = e);
3387
+ }, [xt]), Fs = C(() => ba ? `${ba.rowEnd - ba.rowStart + 1} × ${ba.columnEnd - ba.columnStart + 1}` : null, [ba]), Is = w(null), Ls = qr === "initial" || qr === !0 && Is.current !== "empty";
3388
+ !Jr && !Yr && (Is.current = z.length > 0 ? "rows" : "empty");
3389
+ let Rs = Yr ? "error" : Ls && z.length === 0 ? "loading" : q.length > 0 ? "rows" : R.filter || R.search.trim() ? "no-results" : "empty", zs = C(() => {
3390
+ let e = R.page?.size;
3391
+ return J.height === 0 ? jr : Math.max(1, Math.min(e ?? Infinity, Math.ceil(J.height / Y)));
3372
3392
  }, [
3373
- I.page?.size,
3374
- K.height,
3375
- q,
3393
+ R.page?.size,
3394
+ J.height,
3395
+ Y,
3376
3396
  jr
3377
- ]), Ns = x(() => z ?? {
3378
- row: dt,
3379
- column: U[0] ?? ""
3380
- }, [z, U]), Ps = x(() => ({
3397
+ ]), Bs = C(() => V ?? {
3398
+ row: ut,
3399
+ column: G[0] ?? ""
3400
+ }, [V, G]), Vs = C(() => ({
3381
3401
  id: Mn,
3382
- t: j,
3383
- locale: N,
3402
+ t: N,
3403
+ locale: F,
3384
3404
  booleans: Lr.booleans,
3385
3405
  timeZone: bn,
3386
3406
  columns: c,
3387
- resolved: V,
3388
- resolvedById: H,
3389
- columnIds: U,
3407
+ resolved: U,
3408
+ resolvedById: W,
3409
+ columnIds: G,
3390
3410
  mountedColumns: ia,
3391
3411
  columnsWindowed: ra,
3392
3412
  popinColumns: Si,
3393
3413
  popinAggregated: Mi,
3394
3414
  popinIndex: Ei,
3395
3415
  hasPopinCell: Pi,
3396
- query: I,
3397
- nodes: G,
3416
+ query: R,
3417
+ nodes: q,
3398
3418
  total: ji,
3399
- selectionMode: M,
3400
- editMode: nr,
3419
+ selectionMode: P,
3420
+ editMode: rr,
3401
3421
  filterRow: ir,
3402
3422
  activatable: Pr,
3403
- rowKeyOf: P,
3423
+ rowKeyOf: I,
3404
3424
  textOf: Rr,
3405
- valueOf: _t,
3406
- isEditable: F,
3425
+ valueOf: gt,
3426
+ isEditable: L,
3407
3427
  anyEditable: Vr,
3408
3428
  isDisabled: Br,
3429
+ isUnselectable: sa,
3430
+ isMuted: rs,
3409
3431
  isExpandable: Hr,
3410
- current: z,
3411
- tabStop: Ns,
3412
- focused: Sa,
3413
- setCurrent: Ea,
3414
- isSelected: ca,
3415
- selectedCount: ua,
3416
- toggleSelected: pa,
3417
- toggleAll: ma,
3418
- allState: da,
3419
- selectableCount: J.length,
3420
- rangeBounds: X,
3421
- rangeInfo: ga,
3422
- changedOf: Io,
3423
- beginRange: ba,
3424
- extendRange: xa,
3425
- rangeDragging: _a,
3426
- isExpanded: Ro,
3427
- toggleExpanded: zo,
3428
- toggleBranch: Go,
3429
- treeColumn: Bo,
3430
- hasChildren: Wo,
3431
- rowsReorderable: _o,
3432
- attachRowDraggable: Eo,
3433
- rowLabelOf: Co,
3434
- isLoadingChildren: Uo,
3435
- toggleGroup: qo,
3436
- sortOf: Oa,
3437
- pressSort: ja,
3438
- setSort: Ma,
3439
- filterOf: Na,
3440
- setFilter: Pa,
3441
- filterOpen: Fa,
3442
- setFilterOpen: Ia,
3443
- menuOpen: La,
3444
- setMenuOpen: Ra,
3445
- menuAnchor: za,
3446
- anchorToButton: Ua,
3447
- onHeaderContextMenu: Wa,
3432
+ current: V,
3433
+ tabStop: Bs,
3434
+ focused: Oa,
3435
+ setCurrent: Ma,
3436
+ isSelected: fa,
3437
+ selectedCount: ma,
3438
+ toggleSelected: _a,
3439
+ toggleAll: va,
3440
+ allState: ha,
3441
+ selectableCount: X.length,
3442
+ selectionRowCount: aa.length,
3443
+ rangeBounds: ba,
3444
+ rangeInfo: xa,
3445
+ changedOf: Ho,
3446
+ beginRange: Ta,
3447
+ extendRange: Ea,
3448
+ rangeDragging: Sa,
3449
+ isExpanded: Wo,
3450
+ toggleExpanded: Go,
3451
+ toggleBranch: Zo,
3452
+ treeColumn: Ko,
3453
+ hasChildren: Xo,
3454
+ rowsReorderable: Co,
3455
+ attachRowDraggable: Mo,
3456
+ rowLabelOf: ko,
3457
+ isLoadingChildren: Yo,
3458
+ toggleGroup: $o,
3459
+ sortOf: Pa,
3460
+ pressSort: La,
3461
+ setSort: Ra,
3462
+ filterOf: za,
3463
+ setFilter: Ba,
3464
+ filterOpen: Va,
3465
+ setFilterOpen: Ha,
3466
+ menuOpen: Ua,
3467
+ setMenuOpen: Wa,
3468
+ menuAnchor: Ga,
3469
+ anchorToButton: Ya,
3470
+ onHeaderContextMenu: Xa,
3448
3471
  filterDebounce: lr,
3449
- countsFor: Ka,
3450
- pin: Ja,
3451
- hide: Ya,
3452
- resizeBy: Za,
3453
- resizeTo: Xa,
3454
- autofit: to,
3455
- moveColumn: no,
3456
- resizing: ro,
3457
- setResizing: io,
3458
- dragging: ao.dragging,
3459
- dropTarget: ao.target,
3460
- draggingRow: vo.dragging,
3461
- dropOffset: ao.offset,
3462
- attachDraggable: mo,
3463
- onManageColumns: He,
3464
- edit: Jo,
3465
- startEdit: Zo,
3466
- setDraft: Qo,
3472
+ countsFor: Qa,
3473
+ pin: eo,
3474
+ hide: to,
3475
+ resizeBy: ro,
3476
+ resizeTo: no,
3477
+ autofit: so,
3478
+ moveColumn: co,
3479
+ resizing: lo,
3480
+ setResizing: uo,
3481
+ dragging: fo.dragging,
3482
+ dropTarget: fo.target,
3483
+ draggingRow: wo.dragging,
3484
+ dropOffset: fo.offset,
3485
+ attachDraggable: bo,
3486
+ onManageColumns: Ye,
3487
+ edit: es,
3488
+ startEdit: is,
3489
+ setDraft: as,
3467
3490
  commitEdit: $,
3468
- cancelEdit: $o,
3469
- activate: ns,
3470
- renderCellContent: Ss,
3471
- renderEditorContent: Cs,
3491
+ cancelEdit: os,
3492
+ activate: ls,
3493
+ renderCellContent: ks,
3494
+ renderEditorContent: As,
3472
3495
  renderHeaderContent: Hn,
3473
- renderDetail: In,
3474
- renderGroup: Bn,
3496
+ renderDetail: Rn,
3497
+ renderGroup: Vn,
3475
3498
  renderFilterOperand: Zt,
3476
- onCellPointerDown: hs,
3477
- onCellPointerEnter: gs,
3478
- onCellClick: _s,
3479
- onCellDoubleClick: vs,
3480
- onCellKeyDown: fs,
3481
- onCellFocus: ys,
3482
- onCellBlur: bs,
3483
- announce: Z,
3499
+ onCellPointerDown: Ss,
3500
+ onCellPointerEnter: Cs,
3501
+ onCellClick: ws,
3502
+ onCellDoubleClick: Ts,
3503
+ onCellKeyDown: ys,
3504
+ onCellFocus: Es,
3505
+ onCellBlur: Ds,
3506
+ announce: Da,
3484
3507
  detailId: (e) => `${Mn}detail-${e}`,
3485
- rangeSummary: Os
3508
+ rangeSummary: Fs
3486
3509
  }), [
3487
3510
  Mn,
3488
- j,
3489
3511
  N,
3512
+ F,
3490
3513
  Lr.booleans,
3491
3514
  bn,
3492
3515
  c,
3493
- V,
3494
- H,
3495
3516
  U,
3517
+ W,
3518
+ G,
3496
3519
  ia,
3497
3520
  ra,
3498
3521
  Si,
3499
3522
  Mi,
3500
3523
  Ei,
3501
3524
  Pi,
3502
- I,
3503
- G,
3525
+ R,
3526
+ q,
3504
3527
  ji,
3505
- M,
3506
- nr,
3528
+ P,
3529
+ rr,
3507
3530
  ir,
3508
3531
  Pr,
3509
- P,
3532
+ I,
3510
3533
  Rr,
3511
- F,
3534
+ L,
3512
3535
  Vr,
3513
3536
  Br,
3537
+ sa,
3538
+ rs,
3514
3539
  Hr,
3515
- z,
3516
- Ns,
3517
- Sa,
3518
- Ea,
3519
- ca,
3520
- ua,
3521
- pa,
3540
+ V,
3541
+ Bs,
3542
+ Oa,
3543
+ Ma,
3544
+ fa,
3522
3545
  ma,
3523
- da,
3524
- J.length,
3525
- X,
3526
- ga,
3527
- Io,
3546
+ _a,
3547
+ va,
3548
+ ha,
3549
+ X.length,
3550
+ aa.length,
3528
3551
  ba,
3529
3552
  xa,
3530
- _a,
3531
- Ro,
3532
- zo,
3533
- Go,
3534
- Bo,
3553
+ Ho,
3554
+ Ta,
3555
+ Ea,
3556
+ Sa,
3535
3557
  Wo,
3536
- _o,
3537
- Eo,
3558
+ Go,
3559
+ Zo,
3560
+ Ko,
3561
+ Xo,
3538
3562
  Co,
3539
- Uo,
3540
- qo,
3541
- Oa,
3542
- ja,
3543
- Ma,
3544
- Na,
3563
+ Mo,
3564
+ ko,
3565
+ Yo,
3566
+ $o,
3545
3567
  Pa,
3546
- Fa,
3547
3568
  La,
3569
+ Ra,
3548
3570
  za,
3571
+ Ba,
3572
+ Va,
3549
3573
  Ua,
3550
- Wa,
3551
- lr,
3552
- Ka,
3553
- Ja,
3574
+ Ga,
3554
3575
  Ya,
3555
- Za,
3556
3576
  Xa,
3577
+ lr,
3578
+ Qa,
3579
+ eo,
3557
3580
  to,
3558
- no,
3559
3581
  ro,
3560
- ao,
3561
- vo.dragging,
3562
- mo,
3563
- He,
3564
- Jo,
3565
- Zo,
3566
- Qo,
3582
+ no,
3583
+ so,
3584
+ co,
3585
+ lo,
3586
+ fo,
3587
+ wo.dragging,
3588
+ bo,
3589
+ Ye,
3590
+ es,
3591
+ is,
3592
+ as,
3567
3593
  $,
3568
- $o,
3569
- ns,
3570
- Ss,
3571
- Cs,
3594
+ os,
3595
+ ls,
3596
+ ks,
3597
+ As,
3572
3598
  Hn,
3573
- In,
3574
- Bn,
3599
+ Rn,
3600
+ Vn,
3575
3601
  Zt,
3576
- hs,
3577
- gs,
3578
- _s,
3579
- vs,
3580
- fs,
3602
+ Ss,
3603
+ Cs,
3604
+ ws,
3605
+ Ts,
3581
3606
  ys,
3582
- bs,
3583
- Z,
3584
- Os
3585
- ]), [Fs] = C(() => Sn(Ps));
3586
- Fs.set(Ps), Be(() => Fs.publish(), [Ps, Fs]);
3587
- let Is = {
3588
- ...D,
3607
+ Es,
3608
+ Ds,
3609
+ Da,
3610
+ Fs
3611
+ ]), [Hs] = T(() => xn(Vs));
3612
+ Hs.set(Vs), ze(() => Hs.publish(), [Vs, Hs]);
3613
+ let Us = {
3614
+ ...yn,
3589
3615
  "--slotted-data-grid-template": Oi,
3590
- ..._e === void 0 ? {} : { "--slotted-data-grid-block-size": typeof _e == "number" ? `${_e}px` : _e },
3616
+ ...he === void 0 ? {} : { "--slotted-data-grid-block-size": typeof he == "number" ? `${he}px` : he },
3591
3617
  ...typeof or == "number" ? { "--slotted-data-grid-row-block-size": `${or}px` } : {},
3592
- ...ko > 0 ? { "--slotted-data-grid-changed-duration": `${ko}ms` } : {},
3618
+ ...Fo > 0 ? { "--slotted-data-grid-changed-duration": `${Fo}ms` } : {},
3593
3619
  ...Ci ? { "--slotted-data-grid-leading": `${mi}px` } : {},
3594
- ...K.width > 0 ? { "--slotted-data-grid-viewport": `${K.width}px` } : {}
3595
- }, Ls = Xi ? {
3620
+ ...J.width > 0 ? { "--slotted-data-grid-viewport": `${J.width}px` } : {}
3621
+ }, Ws = Xi ? {
3596
3622
  "--slotted-data-grid-window-total": `${Qi.totalSize}px`,
3597
3623
  "--slotted-data-grid-window-start": `${Qi.startOffset}px`
3598
- } : void 0, Rs = (() => {
3599
- if (sn === !1 || !I.page || G.length === 0) return null;
3600
- let e = ("index" in I.page ? I.page.index * I.page.size : 0) + 1, t = e + (Zr === "client" ? G.filter((e) => e.kind === "row").length : L.length) - 1;
3601
- return ji === null || ji < 0 ? j("rangeUnknown", {
3624
+ } : void 0, Gs = (() => {
3625
+ if (sn === !1 || !R.page || q.length === 0) return null;
3626
+ let e = ("index" in R.page ? R.page.index * R.page.size : 0) + 1, t = e + (Zr === "client" ? q.filter((e) => e.kind === "row").length : z.length) - 1;
3627
+ return ji === null || ji < 0 ? N("rangeUnknown", {
3602
3628
  start: e,
3603
3629
  end: t
3604
- }) : j("range", {
3630
+ }) : N("range", {
3605
3631
  start: e,
3606
3632
  end: t,
3607
3633
  total: ji
3608
3634
  });
3609
- })(), zs = !Kr || !Ve ? null : dr === "scroll" && Se !== !0 ? Jr ? /* @__PURE__ */ w("span", {
3635
+ })(), Ks = !Kr || !Ve ? null : dr === "scroll" && Se !== !0 ? Jr ? /* @__PURE__ */ E("span", {
3610
3636
  "data-loading-more": "",
3611
3637
  role: "status",
3612
- children: j("loadingMore")
3613
- }) : null : /* @__PURE__ */ w("div", { children: /* @__PURE__ */ w(l, {
3638
+ children: N("loadingMore")
3639
+ }) : null : /* @__PURE__ */ E("div", { children: /* @__PURE__ */ E(l, {
3614
3640
  disabled: Jr,
3615
3641
  onClick: () => Ve(),
3616
3642
  size: "sm",
3617
3643
  tone: "secondary",
3618
3644
  variant: "outline",
3619
- children: j(Se === !0 ? "retry" : "loadMore")
3620
- }) }), Bs = (() => {
3621
- if (js === "rows" || js === "loading") return null;
3622
- let e = js;
3623
- if (Lt) return Lt(e);
3624
- let t = j(e === "error" ? "error" : e === "no-results" ? "noResults" : "empty");
3625
- return /* @__PURE__ */ T(le, {
3645
+ children: N(Se === !0 ? "retry" : "loadMore")
3646
+ }) }), qs = (() => {
3647
+ if (Rs === "rows" || Rs === "loading") return null;
3648
+ let e = Rs;
3649
+ if (Xt) return Xt(e);
3650
+ let t = N(e === "error" ? "error" : e === "no-results" ? "noResults" : "empty");
3651
+ return /* @__PURE__ */ D(ce, {
3626
3652
  reach: "section",
3627
3653
  status: e,
3628
3654
  tabIndex: -1,
3629
- children: [/* @__PURE__ */ T(ce, { children: [/* @__PURE__ */ w(se, { children: t }), e === "error" && Yr ? /* @__PURE__ */ w(ae, { children: Yr }) : null] }), e === "no-results" || e === "error" && Xr ? /* @__PURE__ */ w(oe, { children: e === "no-results" ? /* @__PURE__ */ w(l, {
3655
+ children: [/* @__PURE__ */ D(se, { children: [/* @__PURE__ */ E(oe, { children: t }), e === "error" && Yr ? /* @__PURE__ */ E(ie, { children: Yr }) : null] }), e === "no-results" || e === "error" && Xr ? /* @__PURE__ */ E(ae, { children: e === "no-results" ? /* @__PURE__ */ E(l, {
3630
3656
  onClick: (e) => {
3631
- let t = Jt(I);
3657
+ let t = qt(R);
3632
3658
  Ur(t.query, "clear", e, { change: t.change });
3633
3659
  },
3634
3660
  size: "sm",
3635
3661
  tone: "secondary",
3636
3662
  variant: "outline",
3637
- children: j("clearFilters")
3638
- }) : /* @__PURE__ */ w(l, {
3663
+ children: N("clearFilters")
3664
+ }) : /* @__PURE__ */ E(l, {
3639
3665
  onClick: () => Xr?.(),
3640
3666
  size: "sm",
3641
3667
  tone: "secondary",
3642
3668
  variant: "outline",
3643
- children: j("retry")
3669
+ children: N("retry")
3644
3670
  }) }) : null]
3645
3671
  });
3646
3672
  })();
3647
- return /* @__PURE__ */ w(yn.Provider, {
3648
- value: Fs.grid,
3649
- children: /* @__PURE__ */ w(En.Provider, {
3650
- value: Fs,
3651
- children: /* @__PURE__ */ T("div", {
3673
+ return /* @__PURE__ */ E(vn.Provider, {
3674
+ value: Hs.grid,
3675
+ children: /* @__PURE__ */ E(Tn.Provider, {
3676
+ value: Hs,
3677
+ children: /* @__PURE__ */ D("div", {
3652
3678
  ...jn,
3653
- "aria-busy": Jr && js !== "loading" ? !0 : void 0,
3679
+ "aria-busy": Jr && Rs !== "loading" ? !0 : void 0,
3654
3680
  "aria-colcount": Ti,
3655
- "aria-label": jn["aria-label"] ?? (ye ? void 0 : j("grid")),
3681
+ "aria-label": jn["aria-label"] ?? (ye ? void 0 : N("grid")),
3656
3682
  "aria-labelledby": ye,
3657
- "aria-multiselectable": M === "multiple" || M === "range" || void 0,
3658
- "aria-rowcount": (ji === null ? -1 : ji) + W.top.length + W.bottom.length + Ii + +!!Ni,
3683
+ "aria-multiselectable": P === "multiple" || P === "range" || void 0,
3684
+ "aria-rowcount": (ji === null ? -1 : ji) + K.top.length + K.bottom.length + Ii + +!!Ni,
3659
3685
  "data-part": "root",
3660
3686
  "data-part-root": "",
3661
- "data-popin": Ci ? B.popin.length : void 0,
3662
- "data-narrow": K.width > 0 && K.width < Ye ? "" : void 0,
3687
+ "data-popin": Ci ? H.popin.length : void 0,
3688
+ "data-narrow": J.width > 0 && J.width < Je ? "" : void 0,
3663
3689
  "data-rows": Yi ? "auto" : "fixed",
3664
3690
  "data-slotted-density": d ?? void 0,
3665
3691
  "data-ui": "data-grid",
3666
3692
  "data-ui-data-grid": "",
3667
3693
  "data-variant": Qn,
3668
- onBlur: xs,
3694
+ onBlur: Os,
3669
3695
  onKeyDown: (e) => {
3670
- Le?.(e), !e.defaultPrevented && (so.current?.handleKeydown(e.nativeEvent) || bo.current?.handleKeydown(e.nativeEvent));
3696
+ Be?.(e), !e.defaultPrevented && (mo.current?.handleKeydown(e.nativeEvent) || Eo.current?.handleKeydown(e.nativeEvent));
3671
3697
  },
3672
- ref: Ds,
3673
- role: A ? "treegrid" : "grid",
3674
- style: Is,
3698
+ ref: Ps,
3699
+ role: M ? "treegrid" : "grid",
3700
+ style: Us,
3675
3701
  ...$n ? { "data-striped": "" } : {},
3676
3702
  ...er ? { "data-sticky-header": "" } : {},
3677
3703
  ...ir ? { "data-filter-row": "" } : {},
3678
3704
  ...tr === "page" ? { "data-sticky-to": "page" } : {},
3679
- ...M === "none" ? {} : { "data-selection": M },
3680
- children: [/* @__PURE__ */ T("div", {
3705
+ ...P === "none" ? {} : { "data-selection": P },
3706
+ children: [/* @__PURE__ */ D("div", {
3681
3707
  "data-part": "scroll",
3682
3708
  "data-part-scroll": "",
3683
3709
  ref: Nn,
3684
3710
  children: [
3685
- /* @__PURE__ */ w(rr, {
3711
+ /* @__PURE__ */ E(nr, {
3686
3712
  columnGroups: i,
3687
3713
  headerRowCount: Ii
3688
3714
  }),
3689
- W.top.length > 0 ? /* @__PURE__ */ w(kn, {
3715
+ K.top.length > 0 ? /* @__PURE__ */ E(On, {
3690
3716
  edge: "top",
3691
3717
  firstRowIndex: Ii + 1,
3692
- nodes: W.top
3718
+ nodes: K.top
3693
3719
  }) : null,
3694
- js === "loading" ? /* @__PURE__ */ w(Ln, {
3695
- rowSize: q,
3696
- rows: Ms
3697
- }) : /* @__PURE__ */ w(On, {
3698
- bodyStyle: Ls,
3720
+ Rs === "loading" ? /* @__PURE__ */ E(In, {
3721
+ rowSize: Y,
3722
+ rows: zs
3723
+ }) : /* @__PURE__ */ E(Dn, {
3724
+ bodyStyle: Ws,
3699
3725
  firstIndex: Xi ? Qi.startIndex : 0,
3700
- headerRowCount: Ii + W.top.length,
3701
- measureRow: Yi || Gi === null ? is : void 0,
3702
- loadMore: as ? {
3703
- top: ss,
3704
- ref: cs
3726
+ headerRowCount: Ii + K.top.length,
3727
+ measureRow: Yi || Gi === null ? ds : void 0,
3728
+ loadMore: fs ? {
3729
+ top: ms,
3730
+ ref: hs
3705
3731
  } : void 0,
3706
3732
  nodes: $i,
3707
3733
  heldRows: ea,
3708
- allNodes: G
3734
+ allNodes: q
3709
3735
  }),
3710
- Bs !== null && js !== "loading" ? /* @__PURE__ */ w(An, { children: Bs }) : null,
3711
- W.bottom.length > 0 ? /* @__PURE__ */ w(kn, {
3736
+ qs !== null && Rs !== "loading" ? /* @__PURE__ */ E(kn, { children: qs }) : null,
3737
+ K.bottom.length > 0 ? /* @__PURE__ */ E(On, {
3712
3738
  edge: "bottom",
3713
- firstRowIndex: Ii + W.top.length + (ji ?? G.length) + 1,
3714
- nodes: W.bottom
3739
+ firstRowIndex: Ii + K.top.length + (ji ?? q.length) + 1,
3740
+ nodes: K.bottom
3715
3741
  }) : null,
3716
- Ni && js === "rows" ? /* @__PURE__ */ w(Rn, {
3742
+ Ni && Rs === "rows" ? /* @__PURE__ */ E(Ln, {
3717
3743
  aggregates: Ai.aggregates,
3718
- rowIndex: Ii + W.top.length + (ji ?? G.length) + W.bottom.length + 1
3744
+ rowIndex: Ii + K.top.length + (ji ?? q.length) + K.bottom.length + 1
3719
3745
  }) : null,
3720
- ao.offset === null ? null : /* @__PURE__ */ w("div", {
3746
+ fo.offset === null ? null : /* @__PURE__ */ E("div", {
3721
3747
  "aria-hidden": !0,
3722
3748
  "data-part": "drop-indicator",
3723
3749
  "data-part-drop-indicator": "",
3724
3750
  style: {
3725
- "--slotted-data-grid-drop-offset": `${ao.offset}px`,
3726
- "--slotted-data-grid-drop-scroll": `${ao.scrollTop}px`
3751
+ "--slotted-data-grid-drop-offset": `${fo.offset}px`,
3752
+ "--slotted-data-grid-drop-scroll": `${fo.scrollTop}px`
3727
3753
  }
3728
3754
  }),
3729
- vo.offset === null ? null : /* @__PURE__ */ w("div", {
3755
+ wo.offset === null ? null : /* @__PURE__ */ E("div", {
3730
3756
  "aria-hidden": !0,
3731
3757
  "data-axis": "row",
3732
3758
  "data-part": "drop-indicator",
3733
3759
  "data-part-drop-indicator": "",
3734
3760
  style: {
3735
- "--slotted-data-grid-drop-offset": `${vo.offset}px`,
3736
- "--slotted-data-grid-drop-scroll": `${vo.scrollLeft}px`
3761
+ "--slotted-data-grid-drop-offset": `${wo.offset}px`,
3762
+ "--slotted-data-grid-drop-scroll": `${wo.scrollLeft}px`
3737
3763
  }
3738
3764
  })
3739
3765
  ]
3740
- }), me !== void 0 || Rs !== null || zs !== null ? /* @__PURE__ */ T("div", {
3766
+ }), fe !== void 0 || Gs !== null || Ks !== null ? /* @__PURE__ */ D("div", {
3741
3767
  "data-part": "footer",
3742
3768
  "data-part-footer": "",
3743
3769
  children: [
3744
- Rs === null ? null : /* @__PURE__ */ w("span", {
3770
+ Gs === null ? null : /* @__PURE__ */ E("span", {
3745
3771
  "data-range": "",
3746
- children: Rs
3772
+ children: Gs
3747
3773
  }),
3748
- me,
3749
- me === void 0 ? zs : null
3774
+ fe,
3775
+ fe === void 0 ? Ks : null
3750
3776
  ]
3751
3777
  }) : null]
3752
3778
  })
@@ -3758,11 +3784,11 @@ function Mr(e, t, n, r) {
3758
3784
  return c === o ? null : c;
3759
3785
  }
3760
3786
  function Nr(e) {
3761
- return e !== dt && e !== lt && e !== mt && !Tt(e);
3787
+ return e !== ut && e !== ct && e !== pt && !wt(e);
3762
3788
  }
3763
3789
  //#endregion
3764
3790
  //#region src/data-grid/use-persisted-grid-view.ts
3765
- function N() {
3791
+ function F() {
3766
3792
  try {
3767
3793
  return typeof window > "u" ? null : window.localStorage;
3768
3794
  } catch {
@@ -3770,11 +3796,11 @@ function N() {
3770
3796
  }
3771
3797
  }
3772
3798
  function Pr({ key: e, columns: t, storage: n, defaultQuery: r, defaultColumnState: i, defaultDensity: a, ...o }) {
3773
- let s = x(() => n === void 0 ? N() : n, [n]), c = x(() => ({
3774
- columns: Dt(i ?? null, t),
3775
- query: r ?? St(o.defaultPageSize).query,
3799
+ let s = C(() => n === void 0 ? F() : n, [n]), c = C(() => ({
3800
+ columns: Et(i ?? null, t),
3801
+ query: r ?? xt(o.defaultPageSize).query,
3776
3802
  density: a ?? null
3777
- }), []), [l, u] = C(() => {
3803
+ }), []), [l, u] = T(() => {
3778
3804
  let n;
3779
3805
  try {
3780
3806
  n = s?.getItem(e) ?? null;
@@ -3782,7 +3808,7 @@ function Pr({ key: e, columns: t, storage: n, defaultQuery: r, defaultColumnStat
3782
3808
  n = null;
3783
3809
  }
3784
3810
  if (n === null || n === "") return c;
3785
- let r = Ot(n, t, o);
3811
+ let r = Dt(n, t, o);
3786
3812
  return {
3787
3813
  columns: r.columns,
3788
3814
  query: r.query.page === null ? {
@@ -3791,7 +3817,7 @@ function Pr({ key: e, columns: t, storage: n, defaultQuery: r, defaultColumnStat
3791
3817
  } : r.query,
3792
3818
  density: r.density ?? c.density
3793
3819
  };
3794
- }), d = S({
3820
+ }), d = w({
3795
3821
  key: e,
3796
3822
  columns: t,
3797
3823
  options: o,
@@ -3805,34 +3831,34 @@ function Pr({ key: e, columns: t, storage: n, defaultQuery: r, defaultColumnStat
3805
3831
  store: s,
3806
3832
  defaults: c
3807
3833
  };
3808
- let f = S(!1);
3809
- b(() => {
3834
+ let f = w(!1);
3835
+ S(() => {
3810
3836
  if (!f.current) return;
3811
3837
  f.current = !1;
3812
3838
  let { key: e, columns: t, options: n, store: r } = d.current;
3813
3839
  if (r) try {
3814
- let i = It(l, t, n);
3840
+ let i = Ft(l, t, n);
3815
3841
  i === "" ? r.removeItem(e) : r.setItem(e, i);
3816
3842
  } catch {}
3817
3843
  }, [l]);
3818
- let p = y((e) => {
3844
+ let p = x((e) => {
3819
3845
  f.current = !0, u((t) => ({
3820
3846
  ...t,
3821
3847
  query: e
3822
3848
  }));
3823
- }, []), m = y((e) => {
3849
+ }, []), m = x((e) => {
3824
3850
  f.current = !0, u((t) => ({
3825
3851
  ...t,
3826
3852
  columns: e
3827
3853
  }));
3828
- }, []), h = y((e) => {
3854
+ }, []), h = x((e) => {
3829
3855
  f.current = !0, u((t) => ({
3830
3856
  ...t,
3831
3857
  density: e
3832
3858
  }));
3833
- }, []), g = y((e) => {
3859
+ }, []), g = x((e) => {
3834
3860
  f.current = !0, u(e);
3835
- }, []), _ = y(() => {
3861
+ }, []), _ = x(() => {
3836
3862
  f.current = !1, u(d.current.defaults);
3837
3863
  try {
3838
3864
  d.current.store?.removeItem(d.current.key);
@@ -3850,4 +3876,4 @@ function Pr({ key: e, columns: t, storage: n, defaultQuery: r, defaultColumnStat
3850
3876
  };
3851
3877
  }
3852
3878
  //#endregion
3853
- export { pn as a, Vn as i, jr as n, fn as o, Bn as r, dn as s, Pr as t };
3879
+ export { fn as a, Bn as i, jr as n, dn as o, zn as r, un as s, Pr as t };