@vokril/ui-solid 0.2.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/{AttributeGrid-iOgTCpF7.js → AttributeGrid-BUyv-hUX.js} +3 -3
  3. package/dist/{AttributeGrid-DgORu6BF.cjs → AttributeGrid-Tk8KJx8e.cjs} +1 -1
  4. package/dist/{Button-CCm03bSE.js → Button-BZWXPn8y.js} +1 -1
  5. package/dist/{Button-DntBQ4fM.cjs → Button-X8QR6llv.cjs} +1 -1
  6. package/dist/{CommandPalette-D5BzLE0U.js → CommandPalette-BTjINvuw.js} +5 -5
  7. package/dist/{CommandPalette-4w3pEbna.cjs → CommandPalette-CSaQCEyY.cjs} +1 -1
  8. package/dist/{CopyButton-BxwyIJxL.cjs → CopyButton-3cX5MHAf.cjs} +1 -1
  9. package/dist/{CopyButton-ClqxiGPb.js → CopyButton-D3dIRRnn.js} +1 -1
  10. package/dist/{DateRangePicker-dLlHJR71.cjs → DateRangePicker-CHrwr34H.cjs} +1 -1
  11. package/dist/{DateRangePicker-Qho0OzUE.js → DateRangePicker-jnZfDhQA.js} +3 -3
  12. package/dist/{GuidedTour-YUs4zuez.js → GuidedTour-Be7OITLu.js} +2991 -2974
  13. package/dist/GuidedTour-CTHXtWoK.cjs +21 -0
  14. package/dist/{IconPicker-CO5TWhFx.js → IconPicker-BxofGXCS.js} +3 -3
  15. package/dist/{IconPicker-BreG8jKY.cjs → IconPicker-C_gAGvo0.cjs} +1 -1
  16. package/dist/{Modal-BqajyLjD.cjs → Modal-BSSY6C3D.cjs} +1 -1
  17. package/dist/{Modal-DdbgnOMR.js → Modal-BmtEt5Yo.js} +2 -2
  18. package/dist/{PageSkeleton-DfLEHkrh.js → PageSkeleton-CyTXvZYm.js} +4 -4
  19. package/dist/{PageSkeleton-VbWHl878.cjs → PageSkeleton-DzKYTuNy.cjs} +1 -1
  20. package/dist/{SearchableSelect-D6yjIQO1.cjs → SearchableSelect-9pgcO5JS.cjs} +1 -1
  21. package/dist/{SearchableSelect-CBpLrNvW.js → SearchableSelect-ByCRBEZI.js} +2 -2
  22. package/dist/{StatusBarNotificationBell-DQ94Snzi.cjs → StatusBarNotificationBell-jmfcQw6Y.cjs} +1 -1
  23. package/dist/{StatusBarNotificationBell-BWZj0Pc2.js → StatusBarNotificationBell-k_Ol9XDW.js} +7 -7
  24. package/dist/Stepper-C3dnwwiV.cjs +1 -0
  25. package/dist/{Stepper-CrXi8mfh.js → Stepper-CrTxBpDL.js} +137 -137
  26. package/dist/{TimeSeriesChart-BzzqarqB.cjs → TimeSeriesChart-CS4jQflv.cjs} +1 -1
  27. package/dist/{TimeSeriesChart-D18yHUrf.js → TimeSeriesChart-DBrDzBGE.js} +1 -1
  28. package/dist/{ToggleButton-l1cEdv9w.cjs → ToggleButton-CFvMUndy.cjs} +1 -1
  29. package/dist/{ToggleButton-BiEKoA4q.js → ToggleButton-DBWFnm_R.js} +4 -4
  30. package/dist/_internal/app/keybindings/context/useFocusClaim.d.cts +27 -0
  31. package/dist/_internal/app/keybindings/context/useFocusClaim.d.ts +27 -0
  32. package/dist/_internal/app/keybindings/context/useListCommands.d.cts +15 -0
  33. package/dist/_internal/app/keybindings/context/useListCommands.d.ts +15 -0
  34. package/dist/_internal/app/keybindings/contextKey/builtins.d.cts +48 -2
  35. package/dist/_internal/app/keybindings/contextKey/builtins.d.ts +48 -2
  36. package/dist/_internal/app/keybindings/index.d.cts +4 -0
  37. package/dist/_internal/app/keybindings/index.d.ts +4 -0
  38. package/dist/_internal/app/keybindings/panelCommandsRegistry.d.cts +30 -0
  39. package/dist/_internal/app/keybindings/panelCommandsRegistry.d.ts +30 -0
  40. package/dist/builtins-DM7FDxEt.cjs +1 -0
  41. package/dist/builtins-XOM9gfIx.js +74 -0
  42. package/dist/{catalogNotify-B6x3enJ5.cjs → catalogNotify-C9RzbC6x.cjs} +1 -1
  43. package/dist/{catalogNotify-CcaMBipB.js → catalogNotify-CIhFuJ1b.js} +1 -1
  44. package/dist/charts/index.cjs +1 -1
  45. package/dist/charts/index.js +1 -1
  46. package/dist/{createResizableSidebar-_yb33Qli.cjs → createResizableSidebar-DVATOkMf.cjs} +1 -1
  47. package/dist/{createResizableSidebar-onQNGhy_.js → createResizableSidebar-uf_OJsjO.js} +3 -3
  48. package/dist/{de-Cim4IGZg.js → de-CEltsqV5.js} +1 -0
  49. package/dist/{server/de-B5MOZZDV.cjs → de-DRobPEJV.cjs} +1 -1
  50. package/dist/descriptor-B1MaujhY.js +1106 -0
  51. package/dist/descriptor-lw1fA9mi.cjs +1 -0
  52. package/dist/desktop/index.cjs +1 -1
  53. package/dist/desktop/index.js +28 -28
  54. package/dist/feedback/index.cjs +1 -1
  55. package/dist/feedback/index.js +2 -2
  56. package/dist/{format-C46MmwwW.js → format-Dd946oS-.js} +1 -1
  57. package/dist/{format-Cy7RJpYG.cjs → format-aHRZi12I.cjs} +1 -1
  58. package/dist/forms/index.cjs +1 -1
  59. package/dist/forms/index.js +7 -7
  60. package/dist/grid/index.cjs +1 -1
  61. package/dist/grid/index.js +1 -1
  62. package/dist/host/index.cjs +1 -1
  63. package/dist/host/index.d.cts +3 -0
  64. package/dist/host/index.d.ts +3 -0
  65. package/dist/host/index.js +67 -61
  66. package/dist/i18n/index.cjs +1 -1
  67. package/dist/i18n/index.js +1 -1
  68. package/dist/i18n/messageKeys.d.cts +1 -1
  69. package/dist/i18n/messageKeys.d.ts +1 -1
  70. package/dist/{i18n-DZZyw7Iu.cjs → i18n-B9ccWgcR.cjs} +1 -1
  71. package/dist/{server/i18n-B_XRSWWN.js → i18n-CYq-dVvv.js} +2 -2
  72. package/dist/index.cjs +1 -1
  73. package/dist/index.js +492 -481
  74. package/dist/layout/index.cjs +1 -1
  75. package/dist/layout/index.js +2 -2
  76. package/dist/navigation/index.cjs +1 -1
  77. package/dist/navigation/index.js +1 -1
  78. package/dist/notifications/index.cjs +1 -1
  79. package/dist/notifications/index.d.cts +1 -0
  80. package/dist/notifications/index.d.ts +1 -0
  81. package/dist/notifications/index.js +57 -53
  82. package/dist/notifications/notificationCommands.d.cts +14 -5
  83. package/dist/notifications/notificationCommands.d.ts +14 -5
  84. package/dist/overlay/index.cjs +1 -1
  85. package/dist/overlay/index.js +5 -5
  86. package/dist/server/{AttributeGrid-Cz49ZLQJ.cjs → AttributeGrid-CSidAjfz.cjs} +1 -1
  87. package/dist/server/{AttributeGrid-Bq6AC927.js → AttributeGrid-D6b2qQS9.js} +3 -3
  88. package/dist/server/{Button-CHjpZWyZ.js → Button-BhqhjFpY.js} +1 -1
  89. package/dist/server/{Button-C9c6mzTA.cjs → Button-CFOM8pOv.cjs} +1 -1
  90. package/dist/server/{CommandPalette-C69NFoDY.js → CommandPalette-D8O7Ct6B.js} +4 -4
  91. package/dist/server/{CommandPalette-C-Y0biXL.cjs → CommandPalette-DnTx84xR.cjs} +1 -1
  92. package/dist/server/{CopyButton-C3AnCUW9.cjs → CopyButton-C2jzn9tR.cjs} +1 -1
  93. package/dist/server/{CopyButton-DOeXnVFC.js → CopyButton-CChDa2p3.js} +1 -1
  94. package/dist/server/{DateRangePicker-tEwswamx.js → DateRangePicker-BK2Ul2uy.js} +2 -2
  95. package/dist/server/{DateRangePicker-BZIjmD5b.cjs → DateRangePicker-s-I_rNUK.cjs} +1 -1
  96. package/dist/server/GuidedTour-BW95cjPT.cjs +20 -0
  97. package/dist/server/{GuidedTour-C38isG70.js → GuidedTour-DW5y5xkJ.js} +2304 -2288
  98. package/dist/server/{IconPicker-tGQ6T_7R.js → IconPicker-BCUZcq-i.js} +3 -3
  99. package/dist/server/{IconPicker-DpsgVG2H.cjs → IconPicker-Bw8tZjCl.cjs} +1 -1
  100. package/dist/server/{Modal-C4E01jt8.js → Modal-CM54uXRu.js} +2 -2
  101. package/dist/server/{Modal-w2CtUJ-g.cjs → Modal-R86Fb2mX.cjs} +1 -1
  102. package/dist/server/{PageSkeleton-BIoewFZz.js → PageSkeleton-Bpgep9QW.js} +4 -4
  103. package/dist/server/{PageSkeleton-t1PiXgcp.cjs → PageSkeleton-KwYRrZua.cjs} +1 -1
  104. package/dist/server/{SearchableSelect-CTDUjMFB.js → SearchableSelect-Cog_rb31.js} +2 -2
  105. package/dist/server/{SearchableSelect-T6iS1AYR.cjs → SearchableSelect-fofn1Bjg.cjs} +1 -1
  106. package/dist/server/{StatusBarNotificationBell-DL_OCMv7.cjs → StatusBarNotificationBell-BolKvDik.cjs} +1 -1
  107. package/dist/server/{StatusBarNotificationBell-Bm2ZiM-t.js → StatusBarNotificationBell-BqPU9Shw.js} +6 -6
  108. package/dist/server/{Stepper-Il_NS3YQ.js → Stepper-BdOBuNco.js} +1 -1
  109. package/dist/server/{Stepper-CZ695tkt.cjs → Stepper-DqwKOszc.cjs} +1 -1
  110. package/dist/server/{TimeSeriesChart-CWxwWo-G.js → TimeSeriesChart-C1LbL_xp.js} +1 -1
  111. package/dist/server/{TimeSeriesChart-Cjpjciv2.cjs → TimeSeriesChart-DtldQrxS.cjs} +1 -1
  112. package/dist/server/{ToggleButton-D7Qu7T2P.js → ToggleButton-B0YuAGY4.js} +3 -3
  113. package/dist/server/{ToggleButton-CXwvg-Hr.cjs → ToggleButton-CbX1kbpI.cjs} +1 -1
  114. package/dist/server/builtins-DM7FDxEt.cjs +1 -0
  115. package/dist/server/builtins-XOM9gfIx.js +74 -0
  116. package/dist/server/{catalogNotify-CTZ3DSTN.cjs → catalogNotify-BPPTINme.cjs} +1 -1
  117. package/dist/server/{catalogNotify-Dnyfrb-0.js → catalogNotify-mUcKuUmZ.js} +1 -1
  118. package/dist/server/charts/index.cjs +1 -1
  119. package/dist/server/charts/index.js +1 -1
  120. package/dist/server/{createResizableSidebar-CBSfZVJk.js → createResizableSidebar-BfTFOM7v.js} +3 -3
  121. package/dist/server/{createResizableSidebar-rfcmiXuS.cjs → createResizableSidebar-D28fY_SX.cjs} +1 -1
  122. package/dist/server/{de-Cim4IGZg.js → de-CEltsqV5.js} +1 -0
  123. package/dist/{de-B5MOZZDV.cjs → server/de-DRobPEJV.cjs} +1 -1
  124. package/dist/server/descriptor-DWkJAggS.js +992 -0
  125. package/dist/server/descriptor-IJq9wdXK.cjs +1 -0
  126. package/dist/server/desktop/index.cjs +1 -1
  127. package/dist/server/desktop/index.js +2 -2
  128. package/dist/server/feedback/index.cjs +1 -1
  129. package/dist/server/feedback/index.js +2 -2
  130. package/dist/server/forms/index.cjs +1 -1
  131. package/dist/server/forms/index.js +6 -6
  132. package/dist/server/grid/index.cjs +1 -1
  133. package/dist/server/grid/index.js +1 -1
  134. package/dist/server/host/index.cjs +1 -1
  135. package/dist/server/host/index.js +71 -65
  136. package/dist/server/i18n/index.cjs +1 -1
  137. package/dist/server/i18n/index.js +1 -1
  138. package/dist/server/{i18n-DZZyw7Iu.cjs → i18n-B9ccWgcR.cjs} +1 -1
  139. package/dist/{i18n-B_XRSWWN.js → server/i18n-CYq-dVvv.js} +2 -2
  140. package/dist/server/index.cjs +1 -1
  141. package/dist/server/index.js +822 -811
  142. package/dist/server/layout/index.cjs +1 -1
  143. package/dist/server/layout/index.js +2 -2
  144. package/dist/server/navigation/index.cjs +1 -1
  145. package/dist/server/navigation/index.js +1 -1
  146. package/dist/server/notifications/index.cjs +1 -1
  147. package/dist/server/notifications/index.js +57 -53
  148. package/dist/server/overlay/index.cjs +1 -1
  149. package/dist/server/overlay/index.js +4 -4
  150. package/dist/server/{settingsSearchContributor-CDqRlqt7.cjs → settingsSearchContributor-DZj7Wc8l.cjs} +1 -1
  151. package/dist/server/{settingsSearchContributor-Dn-HFipc.js → settingsSearchContributor-DeMn-njw.js} +2 -2
  152. package/dist/{tr-MCRQ-3Mn.cjs → server/tr-BDbiY5YD.cjs} +1 -1
  153. package/dist/{tr-DlpnmKv6.js → server/tr-CxuAFkCi.js} +1 -0
  154. package/dist/server/tree/index.cjs +1 -1
  155. package/dist/server/tree/index.js +9 -8
  156. package/dist/server/useListCommands-Bf7aOTXZ.js +61 -0
  157. package/dist/server/useListCommands-ucngC3t4.cjs +1 -0
  158. package/dist/server/visibleBrowserRegistry-BTfWUlI1.cjs +1 -0
  159. package/dist/server/visibleBrowserRegistry-Dw2Y4y_I.js +89 -0
  160. package/dist/{settingsSearchContributor-BGImAgsw.js → settingsSearchContributor-C-UJc7Xc.js} +2 -2
  161. package/dist/{settingsSearchContributor-Ci6vEEQ1.cjs → settingsSearchContributor-Du0SDpJt.cjs} +1 -1
  162. package/dist/solid/_internal/app/keybindings/context/useFocusClaim.js +32 -0
  163. package/dist/solid/_internal/app/keybindings/context/useListCommands.js +22 -0
  164. package/dist/solid/_internal/app/keybindings/contextKey/builtins.js +10 -0
  165. package/dist/solid/_internal/app/keybindings/panelCommandsRegistry.js +25 -0
  166. package/dist/solid/desktop/menu/MenuBar.jsx +2 -1
  167. package/dist/solid/host/index.js +3 -0
  168. package/dist/solid/i18n/locales/de.json +1 -0
  169. package/dist/solid/i18n/locales/tr.json +1 -0
  170. package/dist/solid/navigation/Tabs.jsx +5 -0
  171. package/dist/solid/notifications/NotificationHost.jsx +36 -10
  172. package/dist/solid/notifications/index.js +1 -0
  173. package/dist/solid/notifications/notificationCommands.js +55 -17
  174. package/dist/solid/tree/TreeSurface.jsx +17 -0
  175. package/dist/solid/tree/createTreeController.js +7 -6
  176. package/dist/solid/tree/index.js +1 -0
  177. package/dist/solid/tree/selectAllInScope.js +47 -0
  178. package/dist/solid/tree/treeKeymap.js +0 -5
  179. package/dist/style.css +1 -1
  180. package/dist/{server/tr-MCRQ-3Mn.cjs → tr-BDbiY5YD.cjs} +1 -1
  181. package/dist/{server/tr-DlpnmKv6.js → tr-CxuAFkCi.js} +1 -0
  182. package/dist/tree/createTreeController.d.cts +5 -0
  183. package/dist/tree/createTreeController.d.ts +5 -0
  184. package/dist/tree/index.cjs +1 -1
  185. package/dist/tree/index.d.cts +1 -0
  186. package/dist/tree/index.d.ts +1 -0
  187. package/dist/tree/index.js +9 -8
  188. package/dist/tree/selectAllInScope.d.cts +5 -0
  189. package/dist/tree/selectAllInScope.d.ts +5 -0
  190. package/dist/tree/treeKeymap.d.cts +2 -4
  191. package/dist/tree/treeKeymap.d.ts +2 -4
  192. package/dist/ui.css +1 -1
  193. package/dist/useListCommands-Bf7aOTXZ.js +61 -0
  194. package/dist/useListCommands-ucngC3t4.cjs +1 -0
  195. package/dist/visibleBrowserRegistry-BTfWUlI1.cjs +1 -0
  196. package/dist/visibleBrowserRegistry-Dw2Y4y_I.js +89 -0
  197. package/package.json +1 -1
  198. package/dist/GuidedTour-CYgy48bt.cjs +0 -21
  199. package/dist/Stepper-B_nRDFxN.cjs +0 -1
  200. package/dist/descriptor-NxSXaBdy.cjs +0 -1
  201. package/dist/descriptor-zKWZdo3E.js +0 -1059
  202. package/dist/server/GuidedTour-TAGGtEp2.cjs +0 -20
  203. package/dist/server/descriptor-B6FQLHie.cjs +0 -1
  204. package/dist/server/descriptor-DNWBt66Z.js +0 -951
  205. package/dist/server/visibleBrowserRegistry-CZFCFSo_.cjs +0 -1
  206. package/dist/server/visibleBrowserRegistry-DOZlLrpo.js +0 -113
  207. package/dist/visibleBrowserRegistry-CZFCFSo_.cjs +0 -1
  208. package/dist/visibleBrowserRegistry-DOZlLrpo.js +0 -113
@@ -0,0 +1,992 @@
1
+ import { createComponent as C, ssr as D, ssrAttribute as I, escape as s, ssrElement as re, mergeProps as ae, memo as q, ssrStyleProperty as Q } from "solid-js/web";
2
+ import { createMemo as F, Show as $, For as de, createEffect as he, Index as ce, createSignal as U, onCleanup as fe, useContext as ge } from "solid-js";
3
+ import { O as we } from "./OverlayScrollArea-221dfKyz.js";
4
+ import { t as ye } from "./i18n-CYq-dVvv.js";
5
+ import { d as me } from "./rendererLogging-Edo4ALXU.js";
6
+ import { V as ve } from "./VpLoader2-DO0zkwpY.js";
7
+ import { V as Se } from "./VpChevronRight-CwRCE60O.js";
8
+ import { a as ke } from "./useListCommands-Bf7aOTXZ.js";
9
+ import { a as xe } from "./builtins-XOM9gfIx.js";
10
+ import { V as Ce } from "./VpSearch-CzVlR0ue.js";
11
+ import { c as be } from "./createVirtualScroller-DBvqT0UW.js";
12
+ import { D as Re } from "./DesktopContextMenuContext-DJ3PnqAv.js";
13
+ import { n as _e, i as Te } from "./keys-B2nlkpqc.js";
14
+ import { B as Ie } from "./bugIndicatingError-h3J5qkL6.js";
15
+ const oe = {
16
+ canExpand: !0,
17
+ canMultiSelect: !0,
18
+ canTypeAhead: !0,
19
+ canRename: !1,
20
+ canDestroy: !1,
21
+ expandAll: !1
22
+ };
23
+ function le(e, r) {
24
+ return `${e}-row-${r}`;
25
+ }
26
+ function Ae(e) {
27
+ const { treeId: r, label: t, multiSelectable: n, focusMode: a, cursorKey: c } = e;
28
+ return {
29
+ role: e.flat === !0 ? "listbox" : "tree",
30
+ // With roving tabindex the container yields its tab stop to the cursor row
31
+ // once there is one; with active-descendant the container IS the tab stop.
32
+ tabIndex: a === "active-descendant" || c === null ? 0 : -1,
33
+ "aria-label": t,
34
+ "aria-multiselectable": n ? !0 : void 0,
35
+ "aria-activedescendant": a === "active-descendant" && c !== null ? le(r, c) : void 0
36
+ };
37
+ }
38
+ function Me(e) {
39
+ const { treeId: r, rows: t, index: n, focusMode: a, isCursor: c, isSelected: d } = e, h = t[n], u = e.flat === !0;
40
+ let i = n;
41
+ for (let o = n - 1; o >= 0; o--) {
42
+ const g = t[o].depth;
43
+ if (g < h.depth) break;
44
+ g === h.depth && (i = o);
45
+ }
46
+ let f = n;
47
+ for (let o = n + 1; o < t.length; o++) {
48
+ const g = t[o].depth;
49
+ if (g < h.depth) break;
50
+ g === h.depth && (f = o);
51
+ }
52
+ let y = 0, R = 0;
53
+ for (let o = i; o <= f; o++)
54
+ t[o].depth === h.depth && (y++, o <= n && R++);
55
+ return {
56
+ role: u ? "option" : "treeitem",
57
+ id: le(r, h.key),
58
+ tabIndex: a === "roving-tabindex" && c ? 0 : -1,
59
+ // A listbox option has no level, and no expanded state to advertise.
60
+ "aria-level": u ? void 0 : h.depth + 1,
61
+ "aria-setsize": y,
62
+ "aria-posinset": R,
63
+ "aria-selected": d,
64
+ "aria-expanded": !u && h.expandable ? h.expanded : void 0,
65
+ // Announced while the row is fetching its children — silence is what a
66
+ // screen-reader user got before, for as long as the query took.
67
+ "aria-busy": h.busy === !0 ? !0 : void 0
68
+ };
69
+ }
70
+ const De = /[\^$.*+?(){}|[\]\\]/;
71
+ function Ee(e) {
72
+ const r = e.trim();
73
+ if (r.length === 0) return null;
74
+ if (De.test(r))
75
+ try {
76
+ const n = new RegExp(r, "gi");
77
+ return (a) => $e(a, n);
78
+ } catch (n) {
79
+ me("fall through to substring", n);
80
+ }
81
+ const t = r.toLowerCase();
82
+ return (n) => Ge(n, t, r.length);
83
+ }
84
+ function $e(e, r) {
85
+ r.lastIndex = 0;
86
+ const t = [];
87
+ let n = 0, a;
88
+ for (; (a = r.exec(e)) !== null; )
89
+ a.index > n && t.push({ text: e.slice(n, a.index), match: !1 }), t.push({ text: a[0], match: !0 }), n = a.index + a[0].length, a[0].length === 0 && (r.lastIndex += 1);
90
+ return n < e.length && t.push({ text: e.slice(n), match: !1 }), t.length > 0 ? t : [{ text: e, match: !1 }];
91
+ }
92
+ function Ge(e, r, t) {
93
+ if (t === 0) return [{ text: e, match: !1 }];
94
+ const n = e.toLowerCase(), a = [];
95
+ let c = 0;
96
+ for (; c <= e.length; ) {
97
+ const d = n.indexOf(r, c);
98
+ if (d === -1) {
99
+ c < e.length && a.push({ text: e.slice(c), match: !1 });
100
+ break;
101
+ }
102
+ d > c && a.push({ text: e.slice(c, d), match: !1 }), a.push({ text: e.slice(d, d + t), match: !0 }), c = d + t;
103
+ }
104
+ return a.length > 0 ? a : [{ text: e, match: !1 }];
105
+ }
106
+ const Ke = "vk_treeStickyHost_6aT7a", He = "vk_treeViewport_Ku3yB", Oe = "vk_treeContainer_iMrOQ", Le = "vk_treeSlice_homAf", Fe = "vk_treeRow_Hh9r0", Pe = "vk_treeRowCursor_QlUrp", Be = "vk_treeRowSelected_UdZj-", Ne = "vk_treeIndentGuides_W4J04", Ve = "vk_treeIndentGuideActive_9m4l3", Qe = "vk_treeRowChevron_6WMjE", Ue = "vk_treeRowChevronSpacer_Jbp-q", We = "vk_treeRowChevronIcon_KP24Y", Ye = "vk_treeRowChevronIconOpen_fRKNn", qe = "vk_treeRowContent_RR7pP", ze = "vk_treeRowActions_LYQUv", Xe = "vk_treeEmpty_s8RQ-", Ze = "vk_treeRowChevronBusy_lZT8a", je = "vk_treeSpeedSearchBadge_9GHNi", Je = "vk_treeSpeedSearchIcon_48Ae2", pe = "vk_treeSpeedSearchText_F4SZ8", et = "vk_treeMatchHighlight_NY75y", x = {
107
+ treeStickyHost: Ke,
108
+ treeViewport: He,
109
+ treeContainer: Oe,
110
+ treeSlice: Le,
111
+ treeRow: Fe,
112
+ treeRowCursor: Pe,
113
+ treeRowSelected: Be,
114
+ treeIndentGuides: Ne,
115
+ treeIndentGuideActive: Ve,
116
+ treeRowChevron: Qe,
117
+ treeRowChevronSpacer: Ue,
118
+ treeRowChevronIcon: We,
119
+ treeRowChevronIconOpen: Ye,
120
+ treeRowContent: qe,
121
+ treeRowActions: ze,
122
+ treeEmpty: Xe,
123
+ treeRowChevronBusy: Ze,
124
+ treeSpeedSearchBadge: je,
125
+ treeSpeedSearchIcon: Je,
126
+ treeSpeedSearchText: pe,
127
+ treeMatchHighlight: et
128
+ };
129
+ var tt = ["<span", ' aria-hidden="true" tabindex="-1">', "</span>"], j = ["<span", ' aria-hidden="true"></span>'], nt = ["<span", ' style="', '" aria-hidden="true"></span>'], rt = ["<span", ">", "</span>"], at = ["<span", ' tabindex="-1">', "</span>"], ct = ["<mark", ">", "</mark>"];
130
+ function ue(e) {
131
+ he(() => {
132
+ e.sticky === !0 || !e.isCursor || e.treeHasFocus();
133
+ });
134
+ const r = () => C($, {
135
+ get when() {
136
+ return e.row.expandable;
137
+ },
138
+ get fallback() {
139
+ return D(j, I("class", s(x.treeRowChevronSpacer, !0), !1));
140
+ },
141
+ get children() {
142
+ return D(tt, I("class", s(x.treeRowChevron, !0), !1), s(C($, {
143
+ get when() {
144
+ return e.row.busy;
145
+ },
146
+ get fallback() {
147
+ return C(Se, {
148
+ get class() {
149
+ return `${x.treeRowChevronIcon} ${e.row.expanded ? x.treeRowChevronIconOpen : ""}`;
150
+ }
151
+ });
152
+ },
153
+ get children() {
154
+ return C(ve, {
155
+ "data-motion-exempt": "true",
156
+ get class() {
157
+ return `${x.treeRowChevronIcon} ${x.treeRowChevronBusy}`;
158
+ }
159
+ });
160
+ }
161
+ })));
162
+ }
163
+ });
164
+ return re("div", ae({
165
+ get tabIndex() {
166
+ return e.sticky === !0 ? -1 : 0;
167
+ }
168
+ }, () => e.sticky === !0 ? {
169
+ tabIndex: -1
170
+ } : e.aria, {
171
+ get class() {
172
+ var t;
173
+ return `${`${x.treeRow} ${((t = e.dom) == null ? void 0 : t.class) ?? ""}` || ""} ${e.isCursor ? s(x.treeRowCursor, !0) : ""} ${e.isSelected ? s(x.treeRowSelected, !0) : ""}`;
174
+ },
175
+ get style() {
176
+ return {
177
+ height: `${e.rowHeight}px`,
178
+ // Depth travels as a CSS variable so indent stays ONE formula in the
179
+ // stylesheet. Four surfaces used to hardcode it four different ways.
180
+ "--tree-depth": String(e.row.depth)
181
+ };
182
+ }
183
+ }, () => e.sticky === !0 ? {
184
+ "data-tree-sticky-key": e.row.key
185
+ } : {
186
+ "data-tree-row-key": e.row.key
187
+ }, () => {
188
+ var t;
189
+ return ((t = e.dom) == null ? void 0 : t.title) !== void 0 ? {
190
+ title: e.dom.title
191
+ } : {};
192
+ }, () => {
193
+ var t;
194
+ return ((t = e.dom) == null ? void 0 : t.draggable) !== void 0 ? {
195
+ draggable: e.dom.draggable
196
+ } : {};
197
+ }, () => {
198
+ var t;
199
+ return (t = e.dom) != null && t.onDragStart ? {
200
+ onDragStart: e.dom.onDragStart
201
+ } : {};
202
+ }, () => {
203
+ var t;
204
+ return (t = e.dom) != null && t.onDragOver ? {
205
+ onDragOver: e.dom.onDragOver
206
+ } : {};
207
+ }, () => {
208
+ var t;
209
+ return (t = e.dom) != null && t.onDragLeave ? {
210
+ onDragLeave: e.dom.onDragLeave
211
+ } : {};
212
+ }, () => {
213
+ var t;
214
+ return (t = e.dom) != null && t.onDrop ? {
215
+ onDrop: e.dom.onDrop
216
+ } : {};
217
+ }, () => {
218
+ var t;
219
+ return (t = e.dom) != null && t.onDragEnd ? {
220
+ onDragEnd: e.dom.onDragEnd
221
+ } : {};
222
+ }, () => {
223
+ var t;
224
+ return (t = e.dom) != null && t.onMouseEnter ? {
225
+ onMouseEnter: e.dom.onMouseEnter
226
+ } : {};
227
+ }, () => {
228
+ var t;
229
+ return (t = e.dom) != null && t.onMouseLeave ? {
230
+ onMouseLeave: e.dom.onMouseLeave
231
+ } : {};
232
+ }), [s(C($, {
233
+ get when() {
234
+ return q(() => e.indentGuide !== "none")() && e.row.depth > 0;
235
+ },
236
+ get children() {
237
+ return D(j, I("class", s(x.treeIndentGuides, !0), !1));
238
+ }
239
+ })), s(C($, {
240
+ get when() {
241
+ return q(() => e.indentGuide === "active" && e.activeGuideDepth >= 0)() && e.row.depth > e.activeGuideDepth;
242
+ },
243
+ get children() {
244
+ return D(nt, I("class", s(x.treeIndentGuideActive, !0), !1), Q("--tree-active-col:", `${s(e.activeGuideDepth, !0)}`));
245
+ }
246
+ })), s(C($, {
247
+ get when() {
248
+ return e.showChevronGutter;
249
+ },
250
+ get children() {
251
+ return r();
252
+ }
253
+ })), D(rt, I("class", s(x.treeRowContent, !0), !1), s(e.content)), s(C($, {
254
+ get when() {
255
+ return e.actions;
256
+ },
257
+ get children() {
258
+ return D(at, I("class", s(x.treeRowActions, !0), !1), s(e.actions));
259
+ }
260
+ }))], !1);
261
+ }
262
+ function Xt(e) {
263
+ const r = () => e.query ? typeof e.query == "function" ? e.query() : e.query : "", t = F(() => {
264
+ const n = r().trim();
265
+ if (n.length === 0) return null;
266
+ const a = Ee(n);
267
+ return a ? a(e.text) : null;
268
+ });
269
+ return C($, {
270
+ get when() {
271
+ return t();
272
+ },
273
+ get fallback() {
274
+ return e.text;
275
+ },
276
+ get children() {
277
+ return C(de, {
278
+ get each() {
279
+ return t();
280
+ },
281
+ children: (n) => C($, {
282
+ get when() {
283
+ return n.match;
284
+ },
285
+ get fallback() {
286
+ return n.text;
287
+ },
288
+ get children() {
289
+ return D(ct, I("class", s(e.class ?? x.treeMatchHighlight, !0), !1), s(n.text));
290
+ }
291
+ })
292
+ });
293
+ }
294
+ });
295
+ }
296
+ const ot = "vk_treeStickyWidget_Q-8QQ", lt = "vk_treeStickyRow_7gWG2", J = {
297
+ treeStickyWidget: ot,
298
+ treeStickyRow: lt
299
+ };
300
+ var ut = ["<div", ' role="list"', ' style="', '">', "</div>"], it = ["<div", ' role="listitem" style="', '">', "</div>"];
301
+ function st(e) {
302
+ return D(ut, I("class", s(J.treeStickyWidget, !0), !1), I("aria-label", s(e.label, !0), !1), Q("height:", `${s(e.height, !0)}px`), s(C(ce, {
303
+ get each() {
304
+ return e.rows;
305
+ },
306
+ children: (r, t) => D(it, I("class", s(J.treeStickyRow, !0), !1), Q("top:", `${s(r().top, !0)}px`) + Q(";z-index:", `${s(e.rows.length, !0) - s(t, !0)}`), s(C(ue, {
307
+ sticky: !0,
308
+ get row() {
309
+ return r().row;
310
+ },
311
+ get index() {
312
+ return r().index;
313
+ },
314
+ get rowHeight() {
315
+ return e.descriptor.rowHeight;
316
+ },
317
+ get isCursor() {
318
+ return e.isCursor(r().index);
319
+ },
320
+ get isSelected() {
321
+ return e.isSelected(r().row);
322
+ },
323
+ treeHasFocus: () => !1,
324
+ get showChevronGutter() {
325
+ return e.showChevronGutter;
326
+ },
327
+ get indentGuide() {
328
+ return e.indentGuide;
329
+ },
330
+ get activeGuideDepth() {
331
+ return e.activeGuideDepth;
332
+ },
333
+ get dom() {
334
+ var n, a;
335
+ return (a = (n = e.descriptor).rowProps) == null ? void 0 : a.call(n, r().row);
336
+ },
337
+ get content() {
338
+ return e.descriptor.renderContent(r().row);
339
+ },
340
+ get actions() {
341
+ var n, a;
342
+ return (a = (n = e.descriptor).renderActions) == null ? void 0 : a.call(n, r().row);
343
+ },
344
+ get onSelect() {
345
+ return e.onSelect;
346
+ },
347
+ get onFocusRow() {
348
+ return e.onFocusRow;
349
+ },
350
+ get onToggle() {
351
+ return e.onToggle;
352
+ },
353
+ onActivateClick: () => e.onReveal(r().index),
354
+ get onOpenMenu() {
355
+ return e.onOpenMenu;
356
+ }
357
+ })))
358
+ })));
359
+ }
360
+ var dt = ["<div", ' role="status" aria-live="polite" aria-atomic="true">', "<span", ">", "</span></div>"], ht = ["<div", ' style="', '">', "</div>"], ft = ["<p", ">", "</p>"], gt = ["<div", ' style="', '">', "", "", "</div>"];
361
+ const p = "roving-tabindex";
362
+ function Zt(e) {
363
+ const r = () => e.surface.descriptor, t = () => e.surface.controller;
364
+ let n;
365
+ const a = F(() => ({
366
+ ...oe,
367
+ ...r().capabilities
368
+ })), c = () => a().canExpand && (r().chevronGutter ?? !0), d = F(() => {
369
+ if ((r().indentGuide ?? "none") !== "active") return -1;
370
+ const o = e.surface.rows()[t().cursorIndex()];
371
+ return o ? o.depth - 1 : -1;
372
+ });
373
+ ke({
374
+ container: () => n,
375
+ supportsMultiselect: () => a().canMultiSelect,
376
+ verbs: {
377
+ selectAll: () => t().selectAll()
378
+ }
379
+ }), xe();
380
+ const h = F(() => Ae({
381
+ treeId: r().id,
382
+ label: r().ariaLabel,
383
+ multiSelectable: a().canMultiSelect,
384
+ focusMode: p,
385
+ cursorKey: t().cursorKey(),
386
+ flat: !a().canExpand
387
+ })), u = () => n !== void 0, i = (o, g) => {
388
+ t().selectIndex(o, g);
389
+ }, f = (o, g, T) => {
390
+ var L, B;
391
+ (B = (L = r()).onActivate) == null || B.call(L, o, g, T);
392
+ }, y = (o, g) => {
393
+ e.surface.openMenu(o, {
394
+ x: g.clientX,
395
+ y: g.clientY
396
+ }, g);
397
+ }, R = (o) => {
398
+ e.surface.scroller.scrollToIndex(o, "auto", e.surface.stickyInsetFor(o));
399
+ };
400
+ return D(gt, I("class", s(x.treeStickyHost, !0), !1), Q("--tree-indent-base:", `${s(r().indentBaseRem ?? 0, !0)}rem`), s(C($, {
401
+ get when() {
402
+ return t().typeAheadQuery().length > 0;
403
+ },
404
+ get children() {
405
+ return D(dt, I("class", s(x.treeSpeedSearchBadge, !0), !1), s(C(Ce, {
406
+ get class() {
407
+ return x.treeSpeedSearchIcon;
408
+ }
409
+ })), I("class", s(x.treeSpeedSearchText, !0), !1), s(t().typeAheadQuery()));
410
+ }
411
+ })), s(C(we, {
412
+ viewportRef: (o) => {
413
+ var g;
414
+ e.surface.scroller.containerRef(o), (g = e.viewportRef) == null || g.call(e, o);
415
+ },
416
+ get viewportClass() {
417
+ return `${x.treeViewport} ${e.viewportClass ?? ""}`.trim();
418
+ },
419
+ get children() {
420
+ return [re("div", ae(h, {
421
+ get class() {
422
+ return x.treeContainer;
423
+ },
424
+ get style() {
425
+ return {
426
+ height: `${e.surface.scroller.totalHeight()}px`
427
+ };
428
+ }
429
+ }), D(ht, I("class", s(x.treeSlice, !0), !1), Q("transform:", `translate3d(0, ${s(e.surface.scroller.offsetY(), !0)}px, 0)`), s(C(ce, {
430
+ get each() {
431
+ return e.surface.scroller.visibleItems();
432
+ },
433
+ children: (o) => {
434
+ const g = () => o().item, T = () => o().index, L = () => t().cursorIndex() === T(), B = () => t().selectedKeys().has(g().key);
435
+ return C(ue, {
436
+ get row() {
437
+ return g();
438
+ },
439
+ get index() {
440
+ return T();
441
+ },
442
+ get aria() {
443
+ return Me({
444
+ treeId: r().id,
445
+ rows: e.surface.rows(),
446
+ index: T(),
447
+ focusMode: p,
448
+ isCursor: L(),
449
+ isSelected: B(),
450
+ flat: !a().canExpand
451
+ });
452
+ },
453
+ get rowHeight() {
454
+ return r().rowHeight;
455
+ },
456
+ get isCursor() {
457
+ return L();
458
+ },
459
+ get isSelected() {
460
+ return B();
461
+ },
462
+ treeHasFocus: u,
463
+ get showChevronGutter() {
464
+ return c();
465
+ },
466
+ get indentGuide() {
467
+ return r().indentGuide ?? "none";
468
+ },
469
+ get activeGuideDepth() {
470
+ return d();
471
+ },
472
+ get dom() {
473
+ var G, K;
474
+ return (K = (G = r()).rowProps) == null ? void 0 : K.call(G, g());
475
+ },
476
+ get content() {
477
+ return r().renderContent(g());
478
+ },
479
+ get actions() {
480
+ var G, K;
481
+ return (K = (G = r()).renderActions) == null ? void 0 : K.call(G, g());
482
+ },
483
+ onSelect: i,
484
+ onFocusRow: (G) => t().focusIndex(G),
485
+ onToggle: (G) => {
486
+ var K, W;
487
+ return (W = (K = r()).onToggle) == null ? void 0 : W.call(K, G);
488
+ },
489
+ onActivateClick: f,
490
+ onOpenMenu: y
491
+ });
492
+ }
493
+ }))), !1), C($, {
494
+ get when() {
495
+ return q(() => e.surface.rows().length === 0)() && r().emptyLabel;
496
+ },
497
+ get children() {
498
+ return D(ft, I("class", s(x.treeEmpty, !0), !1), s(r().emptyLabel));
499
+ }
500
+ })];
501
+ }
502
+ })), s(C($, {
503
+ get when() {
504
+ return e.surface.stickyState().rows.length > 0;
505
+ },
506
+ get children() {
507
+ return C(st, {
508
+ get rows() {
509
+ return e.surface.stickyState().rows;
510
+ },
511
+ get height() {
512
+ return e.surface.stickyState().height;
513
+ },
514
+ get label() {
515
+ return ye("Sticky parent rows");
516
+ },
517
+ get descriptor() {
518
+ return r();
519
+ },
520
+ get showChevronGutter() {
521
+ return c();
522
+ },
523
+ get indentGuide() {
524
+ return r().indentGuide ?? "none";
525
+ },
526
+ get activeGuideDepth() {
527
+ return d();
528
+ },
529
+ isCursor: (o) => t().cursorIndex() === o,
530
+ isSelected: (o) => t().selectedKeys().has(o.key),
531
+ onSelect: i,
532
+ onFocusRow: (o) => t().focusIndex(o),
533
+ onToggle: (o) => {
534
+ var g, T;
535
+ return (T = (g = r()).onToggle) == null ? void 0 : T.call(g, o);
536
+ },
537
+ onReveal: R,
538
+ onOpenMenu: y
539
+ });
540
+ }
541
+ })));
542
+ }
543
+ const ee = 10, V = (e, r) => Math.max(0, Math.min(e, r - 1));
544
+ function wt(e) {
545
+ return e.key.length === 1 && e.key !== " " && !e.ctrlKey && !e.metaKey && !e.altKey;
546
+ }
547
+ function yt(e, r) {
548
+ const { index: t, rowCount: n, capabilities: a } = r;
549
+ if (n === 0) return null;
550
+ const c = t < 0 ? -1 : t;
551
+ switch (_e(e)) {
552
+ case "ArrowDown":
553
+ return e.shiftKey && a.canMultiSelect ? { type: "extend", to: V(c + 1, n) } : { type: "move", to: V(c + 1, n) };
554
+ case "ArrowUp":
555
+ return c < 0 ? { type: "move", to: n - 1 } : e.shiftKey && a.canMultiSelect ? { type: "extend", to: V(c - 1, n) } : { type: "move", to: V(c - 1, n) };
556
+ case "Home":
557
+ return { type: "move", to: 0 };
558
+ case "End":
559
+ return { type: "move", to: n - 1 };
560
+ case "PageDown":
561
+ return {
562
+ type: "move",
563
+ to: V(Math.max(c, 0) + ee, n)
564
+ };
565
+ case "PageUp":
566
+ return {
567
+ type: "move",
568
+ to: V(Math.max(c, 0) - ee, n)
569
+ };
570
+ case "ArrowRight":
571
+ return a.canExpand ? { type: "expandOrDescend" } : { type: "flatNavigate", direction: "in" };
572
+ case "ArrowLeft":
573
+ return e.ctrlKey || e.metaKey ? null : a.canExpand ? { type: "collapseOrAscend" } : { type: "flatNavigate", direction: "out" };
574
+ case "Enter":
575
+ return { type: "activate" };
576
+ case "ContextMenu":
577
+ return { type: "openMenu" };
578
+ case "F10":
579
+ return e.shiftKey ? { type: "openMenu" } : null;
580
+ }
581
+ return e.key === " " ? a.canExpand ? { type: "toggle" } : null : a.canTypeAhead && wt(e) ? { type: "typeAhead", char: e.key } : null;
582
+ }
583
+ function P(e, r) {
584
+ const t = e[r];
585
+ if (!t) return -1;
586
+ for (let n = r - 1; n >= 0; n--)
587
+ if (e[n].depth < t.depth) return n;
588
+ return -1;
589
+ }
590
+ function ie(e, r) {
591
+ const t = e[r];
592
+ if (!t) return null;
593
+ const n = r + 1;
594
+ if (n >= e.length || e[n].depth <= t.depth) return null;
595
+ let a = n;
596
+ for (; a + 1 < e.length && e[a + 1].depth > t.depth; ) a++;
597
+ return { start: n, end: a };
598
+ }
599
+ function mt(e, r, t, n = !1) {
600
+ const a = t.toLowerCase();
601
+ if (a.length === 0) return -1;
602
+ const c = e.length;
603
+ if (c === 0) return -1;
604
+ const d = n ? 0 : 1;
605
+ for (let h = d; h <= c; h++) {
606
+ const u = (r + h + c) % c;
607
+ if (e[u].label.toLowerCase().startsWith(a)) return u;
608
+ }
609
+ for (let h = d; h <= c; h++) {
610
+ const u = (r + h + c) % c;
611
+ if (e[u].label.toLowerCase().includes(a)) return u;
612
+ }
613
+ return -1;
614
+ }
615
+ function vt(e, r, t) {
616
+ const n = new Map(e.map((f, y) => [f.key, y])), a = [...t].filter((f) => n.has(f)), c = St(e, r, a, n), d = kt(e, c), h = (f) => f.selectable !== !1 && (d === void 0 || f.kind === d), u = new Set(a);
617
+ let i = c < 0 ? -1 : P(e, c);
618
+ for (; ; ) {
619
+ const f = xt(e, i).filter(h).map((o) => o.key);
620
+ if (i < 0) return f;
621
+ const y = f.length === u.size && f.every((o) => u.has(o));
622
+ if (f.length > 0 && !y) return f;
623
+ const R = e[i];
624
+ if (f.length > 0 && h(R))
625
+ return [R.key, ...f];
626
+ i = P(e, i);
627
+ }
628
+ }
629
+ function St(e, r, t, n) {
630
+ var d;
631
+ const a = (d = e[r]) == null ? void 0 : d.key;
632
+ if (a !== void 0 && !t.includes(a)) return r;
633
+ const c = t[0];
634
+ return c === void 0 ? -1 : n.get(c) ?? -1;
635
+ }
636
+ function kt(e, r) {
637
+ const t = e[r];
638
+ if (t && t.selectable !== !1) return t.kind;
639
+ const n = (c) => c.selectable !== !1, a = e.slice(Math.max(r, 0)).find(n) ?? e.find(n);
640
+ return a == null ? void 0 : a.kind;
641
+ }
642
+ function xt(e, r) {
643
+ if (r < 0) return e;
644
+ const t = ie(e, r);
645
+ return t ? e.slice(t.start, t.end + 1) : [];
646
+ }
647
+ const te = 1e3;
648
+ function Ct(e) {
649
+ const r = () => ({
650
+ ...oe,
651
+ ...e.capabilities,
652
+ expandAll: !1
653
+ }), [t, n] = U(-1), [a, c] = U(
654
+ /* @__PURE__ */ new Set()
655
+ ), [d, h] = U(-1), [u, i] = U("");
656
+ let f = 0, y;
657
+ const R = () => {
658
+ y !== void 0 && (clearTimeout(y), y = void 0), u().length > 0 && i("");
659
+ }, o = () => {
660
+ y !== void 0 && (clearTimeout(y), y = void 0), y = setTimeout(() => {
661
+ i(""), y = void 0;
662
+ }, te);
663
+ };
664
+ fe(() => {
665
+ y !== void 0 && (clearTimeout(y), y = void 0);
666
+ });
667
+ const g = F(
668
+ () => {
669
+ var l;
670
+ return ((l = e.rows()[t()]) == null ? void 0 : l.key) ?? null;
671
+ }
672
+ ), T = (l) => {
673
+ var S;
674
+ const v = e.rows();
675
+ l < 0 || l >= v.length || l === t() || (n(l), h(l), (S = e.onScrollToIndex) == null || S.call(e, l));
676
+ }, L = (l, v) => {
677
+ var k;
678
+ const S = e.rows(), m = (k = S[l]) == null ? void 0 : k.kind, [w, A] = l <= v ? [l, v] : [v, l], _ = /* @__PURE__ */ new Set();
679
+ for (let M = w; M <= A; M++) {
680
+ const b = S[M];
681
+ b && b.selectable !== !1 && (m !== void 0 && b.kind !== m || _.add(b.key));
682
+ }
683
+ return _;
684
+ };
685
+ return {
686
+ cursorIndex: t,
687
+ cursorKey: g,
688
+ selectedKeys: a,
689
+ typeAheadQuery: u,
690
+ get capabilities() {
691
+ return r();
692
+ },
693
+ focusIndex: T,
694
+ selectIndex: (l, v) => {
695
+ var w, A, _;
696
+ R();
697
+ const m = e.rows()[l];
698
+ if (m) {
699
+ if (m.selectable === !1 && v !== "range") {
700
+ T(l);
701
+ return;
702
+ }
703
+ if (v === "toggle" && r().canMultiSelect) {
704
+ const k = new Set(a());
705
+ k.has(m.key) ? k.delete(m.key) : k.add(m.key), c(k), n(l), h(l), (w = e.onScrollToIndex) == null || w.call(e, l);
706
+ return;
707
+ }
708
+ if (v === "range" && r().canMultiSelect) {
709
+ const k = d() >= 0 ? d() : l;
710
+ c(L(k, l)), n(l), (A = e.onScrollToIndex) == null || A.call(e, l);
711
+ return;
712
+ }
713
+ c(/* @__PURE__ */ new Set([m.key])), n(l), h(l), (_ = e.onScrollToIndex) == null || _.call(e, l);
714
+ }
715
+ },
716
+ clearSelection: () => {
717
+ R(), a().size > 0 && c(/* @__PURE__ */ new Set());
718
+ },
719
+ selectChildren: (l) => {
720
+ var M;
721
+ const v = e.rows(), S = v[l];
722
+ if (!S) return;
723
+ const m = S.depth + 1, w = /* @__PURE__ */ new Set();
724
+ let A, _ = !1, k = -1;
725
+ for (let b = l + 1; b < v.length; b++) {
726
+ const H = v[b];
727
+ if (H.depth <= S.depth) break;
728
+ if (H.depth === m && H.selectable !== !1) {
729
+ if (!_)
730
+ A = H.kind, k = b, _ = !0;
731
+ else if (A !== void 0 && H.kind !== A) continue;
732
+ w.add(H.key);
733
+ }
734
+ }
735
+ w.size !== 0 && (c(w), k >= 0 && (n(k), h(k), (M = e.onScrollToIndex) == null || M.call(e, k)));
736
+ },
737
+ selectAll: () => {
738
+ r().canMultiSelect && c(
739
+ new Set(vt(e.rows(), t(), a()))
740
+ );
741
+ },
742
+ childKindsHomogeneous: (l) => {
743
+ const v = e.rows(), S = v[l];
744
+ if (!S) return { homogeneous: !1, total: 0, selectable: 0 };
745
+ const m = S.depth + 1;
746
+ let w, A = !1, _ = 0, k = 0;
747
+ for (let M = l + 1; M < v.length; M++) {
748
+ const b = v[M];
749
+ if (b.depth <= S.depth) break;
750
+ b.depth === m && b.selectable !== !1 && (_++, A ? (w === void 0 || b.kind === w) && k++ : (w = b.kind, A = !0, k++));
751
+ }
752
+ return {
753
+ homogeneous: _ > 0 && _ === k,
754
+ total: _,
755
+ selectable: k
756
+ };
757
+ },
758
+ handleKeyDown: (l) => {
759
+ var A, _, k, M, b, H, z, X;
760
+ if (Te(l, "Escape") && u().length > 0) {
761
+ l.preventDefault(), l.stopPropagation(), R();
762
+ return;
763
+ }
764
+ const v = e.rows(), S = t(), m = yt(l, {
765
+ index: S,
766
+ rowCount: v.length,
767
+ capabilities: r()
768
+ });
769
+ if (!m) return;
770
+ const w = v[S];
771
+ switch (m.type) {
772
+ case "move":
773
+ l.preventDefault(), T(m.to);
774
+ return;
775
+ case "extend": {
776
+ l.preventDefault();
777
+ const E = d() >= 0 ? d() : S;
778
+ c(L(E, m.to)), n(m.to), (A = e.onScrollToIndex) == null || A.call(e, m.to);
779
+ return;
780
+ }
781
+ case "expandOrDescend":
782
+ if (!w) return;
783
+ if (l.preventDefault(), w.expandable && !w.expanded) {
784
+ (_ = e.onToggle) == null || _.call(e, w);
785
+ return;
786
+ }
787
+ T(S + 1);
788
+ return;
789
+ case "collapseOrAscend": {
790
+ if (!w) return;
791
+ if (l.preventDefault(), w.expandable && w.expanded) {
792
+ (k = e.onToggle) == null || k.call(e, w);
793
+ return;
794
+ }
795
+ const E = P(v, S);
796
+ E >= 0 && T(E);
797
+ return;
798
+ }
799
+ case "toggle":
800
+ if (!(w != null && w.expandable)) return;
801
+ l.preventDefault(), (M = e.onToggle) == null || M.call(e, w);
802
+ return;
803
+ case "flatNavigate":
804
+ l.preventDefault(), (b = e.onFlatNavigate) == null || b.call(e, m.direction, w);
805
+ return;
806
+ case "activate":
807
+ if (!w) return;
808
+ l.preventDefault(), (H = e.onActivate) == null || H.call(e, w);
809
+ return;
810
+ case "openMenu": {
811
+ if (!w) return;
812
+ l.preventDefault();
813
+ const E = l.target, O = E == null ? void 0 : E.getBoundingClientRect();
814
+ (z = e.onOpenMenu) == null || z.call(e, w, {
815
+ x: Math.round((O == null ? void 0 : O.left) ?? 0),
816
+ y: Math.round((O == null ? void 0 : O.bottom) ?? 0)
817
+ });
818
+ return;
819
+ }
820
+ case "typeAhead": {
821
+ const E = ((X = e.now) == null ? void 0 : X.call(e)) ?? Date.now(), O = E - f > te, N = O ? "" : u(), Y = N.length === 1 && N.toLowerCase() === m.char.toLowerCase() ? N : `${N}${m.char}`, Z = mt(
822
+ v,
823
+ S,
824
+ Y,
825
+ Y.length > 1 && !O
826
+ );
827
+ if (f = E, Z < 0) {
828
+ i(N), N.length > 0 ? o() : R();
829
+ return;
830
+ }
831
+ i(Y), o(), l.preventDefault(), T(Z);
832
+ return;
833
+ }
834
+ }
835
+ },
836
+ openMenuAt: (l, v) => {
837
+ var m;
838
+ const S = e.rows()[l];
839
+ S && ((m = e.onOpenMenu) == null || m.call(e, S, v));
840
+ }
841
+ };
842
+ }
843
+ const bt = 0.4, Rt = { rows: [], height: 0 };
844
+ function se(e) {
845
+ return Math.max(Math.floor(e), 1);
846
+ }
847
+ function _t(e, r, t) {
848
+ let n = r, a = P(e, n);
849
+ for (; a !== -1; ) {
850
+ if (a === t) return n;
851
+ n = a, a = P(e, n);
852
+ }
853
+ return t === -1 ? n : -1;
854
+ }
855
+ function Tt(e, r, t, n) {
856
+ let a = e;
857
+ for (let d = 0; d < e.length; d++)
858
+ if (e[d].top + n > t || d >= r) {
859
+ a = e.slice(0, d);
860
+ break;
861
+ }
862
+ const c = a[a.length - 1];
863
+ return c ? { rows: a, height: c.top + n } : { rows: [], height: 0 };
864
+ }
865
+ function It(e) {
866
+ const { rows: r, scrollTop: t, rowHeight: n, viewportHeight: a } = e;
867
+ if (r.length === 0 || n <= 0) return Rt;
868
+ const c = se(e.maxCount), d = [];
869
+ let h = 0, u = -1;
870
+ for (; ; ) {
871
+ const i = Math.floor((t + h) / n);
872
+ if (i < 0 || i >= r.length) break;
873
+ const f = _t(r, i, u);
874
+ if (f === -1) break;
875
+ const y = ie(r, f);
876
+ if (y === null || f === i && t === f * n - h) break;
877
+ const R = (y.end + 1) * n - t, o = h, g = o + n > R && o <= R ? R - n : o;
878
+ if (d.push({ index: f, row: r[f], top: g }), h = g + n, u = f, d.length >= c) break;
879
+ }
880
+ return Tt(
881
+ d,
882
+ c,
883
+ a * bt,
884
+ n
885
+ );
886
+ }
887
+ function At(e, r, t, n) {
888
+ if (r < 0 || r >= e.length) return 0;
889
+ let a = 0, c = P(e, r);
890
+ for (; c !== -1; )
891
+ a++, c = P(e, c);
892
+ return Math.min(a, se(n)) * t;
893
+ }
894
+ const Mt = 8, ne = 7, Dt = { rows: [], height: 0 };
895
+ function jt(e) {
896
+ const r = ge(Re), t = F(() => [...e.rows()]), n = be({
897
+ items: t,
898
+ itemHeight: e.rowHeight,
899
+ overscan: e.overscan ?? Mt
900
+ }), a = F(() => e.stickyScroll !== !0 ? Dt : It({
901
+ rows: t(),
902
+ scrollTop: n.scrollTop(),
903
+ rowHeight: e.rowHeight,
904
+ viewportHeight: n.viewportHeight(),
905
+ maxCount: e.stickyScrollMaxCount ?? ne
906
+ })), c = (u) => e.stickyScroll === !0 ? At(
907
+ t(),
908
+ u,
909
+ e.rowHeight,
910
+ e.stickyScrollMaxCount ?? ne
911
+ ) : 0, d = Ct({
912
+ rows: t,
913
+ ...e.capabilities ? { capabilities: e.capabilities } : {},
914
+ onToggle: (u) => {
915
+ var i;
916
+ return (i = e.onToggle) == null ? void 0 : i.call(e, u);
917
+ },
918
+ onActivate: (u) => {
919
+ var i;
920
+ return (i = e.onActivate) == null ? void 0 : i.call(e, u, "keyboard");
921
+ },
922
+ onOpenMenu: (u, i) => h(u, i),
923
+ onCollapseAll: () => {
924
+ var u;
925
+ return (u = e.onCollapseAll) == null ? void 0 : u.call(e);
926
+ },
927
+ onFlatNavigate: (u, i) => {
928
+ var f;
929
+ return (f = e.onFlatNavigate) == null ? void 0 : f.call(
930
+ e,
931
+ u,
932
+ i
933
+ );
934
+ },
935
+ onRename: (u) => {
936
+ var i;
937
+ return (i = e.onRename) == null ? void 0 : i.call(e, u);
938
+ },
939
+ onDestroy: (u) => {
940
+ var i;
941
+ return (i = e.onDestroy) == null ? void 0 : i.call(e, u);
942
+ },
943
+ // Arrow keys in a virtualized list are a lie without this: the row the
944
+ // cursor lands on may not be mounted yet.
945
+ //
946
+ // The inset is what keeps them honest once rows are pinned on top: "scroll
947
+ // just enough" would otherwise stop the moment the cursor row reached the
948
+ // viewport's top edge — which is now underneath the widget. Arrowing UP into
949
+ // a parent would walk the cursor into a row nobody can see. Every scroll the
950
+ // controller does — focus, the three selects, select-children, extend —
951
+ // comes through this one call, so this is the only place it has to be said.
952
+ onScrollToIndex: (u) => n.scrollToIndex(u, "auto", c(u))
953
+ });
954
+ function h(u, i, f) {
955
+ if (e.openMenu) {
956
+ e.openMenu(u, i, f);
957
+ return;
958
+ }
959
+ if (!e.buildMenu) return;
960
+ const y = e.buildMenu(u, d.selectedKeys());
961
+ if (y.length !== 0) {
962
+ if (!r)
963
+ throw new Ie(
964
+ "createTreeSurface: descriptor builds a context menu but no DesktopContextMenuProvider is mounted"
965
+ );
966
+ r.open(i.x, i.y, y, f);
967
+ }
968
+ }
969
+ return {
970
+ descriptor: e,
971
+ controller: d,
972
+ scroller: n,
973
+ rows: t,
974
+ stickyState: a,
975
+ stickyInsetFor: c,
976
+ openMenu: h
977
+ };
978
+ }
979
+ const Jt = 0.85;
980
+ export {
981
+ oe as D,
982
+ Jt as T,
983
+ Xt as a,
984
+ ue as b,
985
+ Zt as c,
986
+ Ae as d,
987
+ Me as e,
988
+ Ct as f,
989
+ jt as g,
990
+ vt as s,
991
+ le as t
992
+ };