@dmsi/wedgekit-react 1.0.1 → 2.0.1

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 (282) hide show
  1. package/dist/classNames.d.ts +1 -0
  2. package/dist/classNames.d.ts.map +1 -1
  3. package/dist/classNames.js +150 -0
  4. package/dist/components/AccessCard.js +63 -0
  5. package/dist/components/AccessCardGroup.js +73 -0
  6. package/dist/components/AccessChangerTabItem.js +51 -0
  7. package/dist/components/Accordion.js +99 -0
  8. package/dist/components/Alert.d.ts.map +1 -1
  9. package/dist/components/Alert.js +78 -0
  10. package/dist/components/Breadcrumbs.js +111 -0
  11. package/dist/components/Button.js +137 -0
  12. package/dist/components/CalendarRange.js +405 -0
  13. package/dist/components/Caption.js +99 -0
  14. package/dist/components/Card.js +50 -0
  15. package/dist/components/Checkbox.js +108 -0
  16. package/dist/components/CompactImagesPreview.d.ts.map +1 -1
  17. package/dist/components/CompactImagesPreview.js +120 -0
  18. package/dist/components/ContentTab.js +68 -0
  19. package/dist/components/ContentTabs.js +96 -0
  20. package/dist/components/DMSiLogo.js +54 -0
  21. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +27 -0
  22. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +79 -0
  23. package/dist/components/DataGrid/PinnedColumns.d.ts +9 -2
  24. package/dist/components/DataGrid/PinnedColumns.d.ts.map +1 -1
  25. package/dist/components/DataGrid/PinnedColumns.js +165 -0
  26. package/dist/components/DataGrid/SummaryRow/SummaryCell.d.ts +18 -0
  27. package/dist/components/DataGrid/SummaryRow/SummaryCell.d.ts.map +1 -0
  28. package/dist/components/DataGrid/SummaryRow/SummaryCell.js +51 -0
  29. package/dist/components/DataGrid/SummaryRow/aggregations.d.ts +39 -0
  30. package/dist/components/DataGrid/SummaryRow/aggregations.d.ts.map +1 -0
  31. package/dist/components/DataGrid/SummaryRow/aggregations.js +55 -0
  32. package/dist/components/DataGrid/SummaryRow/index.d.ts +18 -0
  33. package/dist/components/DataGrid/SummaryRow/index.d.ts.map +1 -0
  34. package/dist/components/DataGrid/SummaryRow/index.js +86 -0
  35. package/dist/components/DataGrid/TableBody/GroupRow.d.ts +18 -0
  36. package/dist/components/DataGrid/TableBody/GroupRow.d.ts.map +1 -0
  37. package/dist/components/DataGrid/TableBody/GroupRow.js +243 -0
  38. package/dist/components/DataGrid/TableBody/LoadingCell.js +33 -0
  39. package/dist/components/DataGrid/TableBody/TableBodyRow.d.ts +3 -2
  40. package/dist/components/DataGrid/TableBody/TableBodyRow.d.ts.map +1 -1
  41. package/dist/components/DataGrid/TableBody/TableBodyRow.js +136 -0
  42. package/dist/components/DataGrid/TableBody/index.d.ts +3 -1
  43. package/dist/components/DataGrid/TableBody/index.d.ts.map +1 -1
  44. package/dist/components/DataGrid/TableBody/index.js +161 -0
  45. package/dist/components/DataGrid/index.d.ts +1 -1
  46. package/dist/components/DataGrid/index.d.ts.map +1 -1
  47. package/dist/components/DataGrid/index.js +696 -0
  48. package/dist/components/DataGrid/types.d.ts +141 -1
  49. package/dist/components/DataGrid/types.d.ts.map +1 -1
  50. package/dist/components/DataGrid/utils.d.ts +2 -0
  51. package/dist/components/DataGrid/utils.d.ts.map +1 -1
  52. package/dist/components/DataGrid/utils.js +20 -0
  53. package/dist/components/DataGridCell.d.ts +5 -2
  54. package/dist/components/DataGridCell.d.ts.map +1 -1
  55. package/dist/components/DataGridCell.js +412 -0
  56. package/dist/components/DataTable.js +700 -0
  57. package/dist/components/DateInput.js +193 -0
  58. package/dist/components/DateRangeInput.js +368 -0
  59. package/dist/components/DebugJson.js +28 -0
  60. package/dist/components/Display.js +46 -0
  61. package/dist/components/EditingContext.js +34 -0
  62. package/dist/components/EmblaCarousel/ArrowButtons.js +83 -0
  63. package/dist/components/EmblaCarousel/SelectedSnapDisplay.js +12 -0
  64. package/dist/components/EmblaCarousel/index.js +153 -0
  65. package/dist/components/EmblaCarousel/usePrevNextButtons.js +21 -0
  66. package/dist/components/EmblaCarousel/useSelectedSnapDisplay.js +15 -0
  67. package/dist/components/EmptyCartIcon.js +25 -0
  68. package/dist/components/FilterGroup.d.ts +5 -3
  69. package/dist/components/FilterGroup.d.ts.map +1 -1
  70. package/dist/components/FilterGroup.js +198 -0
  71. package/dist/components/FullViewportBox.js +19 -0
  72. package/dist/components/Grid.js +54 -0
  73. package/dist/components/Heading.js +50 -0
  74. package/dist/components/HorizontalDivider.js +20 -0
  75. package/dist/components/Icon.d.ts +5 -2
  76. package/dist/components/Icon.d.ts.map +1 -1
  77. package/dist/components/Icon.js +73 -0
  78. package/dist/components/ImagePlaceholder.js +22 -0
  79. package/dist/components/Input.d.ts +11 -9
  80. package/dist/components/Input.d.ts.map +1 -1
  81. package/dist/components/Input.js +469 -0
  82. package/dist/components/InputGroup.js +45 -0
  83. package/dist/components/Label.js +37 -0
  84. package/dist/components/Link.js +69 -0
  85. package/dist/components/List.js +12 -0
  86. package/dist/components/ListGroup.d.ts.map +1 -1
  87. package/dist/components/ListGroup.js +54 -0
  88. package/dist/components/LiveChatComponent.js +25 -0
  89. package/dist/components/LoadingScrim.js +22 -0
  90. package/dist/components/LogoAgilityTopBar.js +90 -0
  91. package/dist/components/LogoDMSiTopBar.js +54 -0
  92. package/dist/components/LogoMillworkTopBar.js +196 -0
  93. package/dist/components/MainBar.js +58 -0
  94. package/dist/components/MaxViewportBox.js +19 -0
  95. package/dist/components/Menu.d.ts.map +1 -1
  96. package/dist/components/Menu.js +202 -0
  97. package/dist/components/MenuOption.js +161 -0
  98. package/dist/components/MobileDataGrid/ColumnList.js +85 -0
  99. package/dist/components/MobileDataGrid/ColumnSelector/index.js +100 -0
  100. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.d.ts.map +1 -1
  101. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.js +6 -0
  102. package/dist/components/MobileDataGrid/GridContextProvider/index.js +80 -0
  103. package/dist/components/MobileDataGrid/GridContextProvider/useGridContext.js +11 -0
  104. package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.js +18 -0
  105. package/dist/components/MobileDataGrid/MobileDataGridCard/index.d.ts +2 -1
  106. package/dist/components/MobileDataGrid/MobileDataGridCard/index.d.ts.map +1 -1
  107. package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +130 -0
  108. package/dist/components/MobileDataGrid/MobileDataGridHeader.d.ts.map +1 -1
  109. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +67 -0
  110. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +42 -0
  111. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.d.ts.map +1 -1
  112. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +58 -0
  113. package/dist/components/MobileDataGrid/dataGridReducer.js +28 -0
  114. package/dist/components/MobileDataGrid/index.d.ts +1 -1
  115. package/dist/components/MobileDataGrid/index.d.ts.map +1 -1
  116. package/dist/components/MobileDataGrid/index.js +78 -0
  117. package/dist/components/MobileNavMenu.d.ts.map +1 -1
  118. package/dist/components/MobileNavMenu.js +173 -0
  119. package/dist/components/Modal.d.ts +1 -2
  120. package/dist/components/Modal.d.ts.map +1 -1
  121. package/dist/components/Modal.js +201 -0
  122. package/dist/components/ModalButtons.d.ts.map +1 -1
  123. package/dist/components/ModalButtons.js +57 -0
  124. package/dist/components/ModalContent.d.ts +1 -2
  125. package/dist/components/ModalContent.d.ts.map +1 -1
  126. package/dist/components/ModalContent.js +24 -0
  127. package/dist/components/ModalHeader.js +74 -0
  128. package/dist/components/ModalScrim.js +32 -0
  129. package/dist/components/NavigationTab.js +72 -0
  130. package/dist/components/NavigationTabs.js +45 -0
  131. package/dist/components/NestedMenu.d.ts.map +1 -1
  132. package/dist/components/NestedMenu.js +119 -0
  133. package/dist/components/Notification.js +91 -0
  134. package/dist/components/OptionPill.d.ts +2 -1
  135. package/dist/components/OptionPill.d.ts.map +1 -1
  136. package/dist/components/OptionPill.js +103 -0
  137. package/dist/components/OrderCheckIcon.js +28 -0
  138. package/dist/components/PDFViewer/DownloadIcon.js +25 -0
  139. package/dist/components/PDFViewer/PDFElement.js +77 -0
  140. package/dist/components/PDFViewer/PDFNavigation.js +64 -0
  141. package/dist/components/PDFViewer/PDFPage.js +28 -0
  142. package/dist/components/PDFViewer/index.d.ts.map +1 -1
  143. package/dist/components/PDFViewer/index.js +124 -0
  144. package/dist/components/Pagination.d.ts.map +1 -1
  145. package/dist/components/Pagination.js +117 -0
  146. package/dist/components/Paragraph.js +43 -0
  147. package/dist/components/Password.js +47 -0
  148. package/dist/components/ProductImagePreview/CarouselPagination.js +48 -0
  149. package/dist/components/ProductImagePreview/MobileImageCarousel.d.ts +2 -1
  150. package/dist/components/ProductImagePreview/MobileImageCarousel.d.ts.map +1 -1
  151. package/dist/components/ProductImagePreview/MobileImageCarousel.js +146 -0
  152. package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts +2 -1
  153. package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts.map +1 -1
  154. package/dist/components/ProductImagePreview/ProductPrimaryImage.js +138 -0
  155. package/dist/components/ProductImagePreview/Thumbnail.d.ts +2 -1
  156. package/dist/components/ProductImagePreview/Thumbnail.d.ts.map +1 -1
  157. package/dist/components/ProductImagePreview/Thumbnail.js +46 -0
  158. package/dist/components/ProductImagePreview/ZoomWindow.js +74 -0
  159. package/dist/components/ProductImagePreview/index.d.ts.map +1 -1
  160. package/dist/components/ProductImagePreview/index.js +189 -0
  161. package/dist/components/ProductImagePreview/useProductImagePreview.js +85 -0
  162. package/dist/components/ProjectBar.d.ts +1 -1
  163. package/dist/components/ProjectBar.js +54 -0
  164. package/dist/components/Radio.js +113 -0
  165. package/dist/components/Search.js +89 -0
  166. package/dist/components/SearchResultImage/index.js +26 -0
  167. package/dist/components/Select.js +122 -0
  168. package/dist/components/SideMenu.js +24 -0
  169. package/dist/components/SideMenuGroup.js +80 -0
  170. package/dist/components/SideMenuItem.js +79 -0
  171. package/dist/components/SimpleTable.js +60 -0
  172. package/dist/components/SkeletonParagraph.js +24 -0
  173. package/dist/components/Spinner.d.ts +1 -1
  174. package/dist/components/Spinner.d.ts.map +1 -1
  175. package/dist/components/Spinner.js +30 -0
  176. package/dist/components/Stack.js +174 -0
  177. package/dist/components/StatusPill.js +44 -0
  178. package/dist/components/Stepper.js +138 -0
  179. package/dist/components/Subheader.d.ts +2 -1
  180. package/dist/components/Subheader.d.ts.map +1 -1
  181. package/dist/components/Subheader.js +41 -0
  182. package/dist/components/Surface.js +30 -0
  183. package/dist/components/Swatch.js +1498 -0
  184. package/dist/components/Textarea.js +106 -0
  185. package/dist/components/Theme.d.ts +1 -1
  186. package/dist/components/Theme.d.ts.map +1 -1
  187. package/dist/components/Theme.js +25 -0
  188. package/dist/components/Time.d.ts +2 -1
  189. package/dist/components/Time.d.ts.map +1 -1
  190. package/dist/components/Time.js +225 -0
  191. package/dist/components/Toast.d.ts +4 -3
  192. package/dist/components/Toast.d.ts.map +1 -1
  193. package/dist/components/Toast.js +170 -0
  194. package/dist/components/Tooltip.js +102 -0
  195. package/dist/components/TopBar.d.ts.map +1 -1
  196. package/dist/components/TopBar.js +119 -0
  197. package/dist/components/Upload.js +107 -0
  198. package/dist/components/WorldpayIframe.d.ts.map +1 -1
  199. package/dist/components/WorldpayIframe.js +19 -0
  200. package/dist/hooks/useEditCell.js +23 -0
  201. package/dist/hooks/useInfiniteScroll.js +25 -0
  202. package/dist/hooks/useKeydown.js +20 -0
  203. package/dist/hooks/useMatchesMedia.js +15 -0
  204. package/dist/hooks/useMenuSystem.js +186 -0
  205. package/dist/hooks/useMounted.js +9 -0
  206. package/dist/hooks/useTableLayout/computeColumns.js +59 -0
  207. package/dist/hooks/useTableLayout/storage.js +64 -0
  208. package/dist/hooks/useTableLayout/useTableLayout.js +163 -0
  209. package/dist/index.js +249 -52864
  210. package/dist/lib/loadFonts.js +11 -0
  211. package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +56 -0
  212. package/dist/node_modules/@dnd-kit/core/dist/core.esm.js +2299 -0
  213. package/dist/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js +13 -0
  214. package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +367 -0
  215. package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +235 -0
  216. package/dist/node_modules/@headlessui/react/dist/components/description/description.js +45 -0
  217. package/dist/node_modules/@headlessui/react/dist/components/keyboard.js +4 -0
  218. package/dist/node_modules/@headlessui/react/dist/components/label/label.js +62 -0
  219. package/dist/node_modules/@headlessui/react/dist/components/switch/switch.js +56 -0
  220. package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js +33 -0
  221. package/dist/node_modules/@headlessui/react/dist/hooks/use-controllable.js +10 -0
  222. package/dist/node_modules/@headlessui/react/dist/hooks/use-default-value.js +8 -0
  223. package/dist/node_modules/@headlessui/react/dist/hooks/use-disposables.js +9 -0
  224. package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js +9 -0
  225. package/dist/node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js +8 -0
  226. package/dist/node_modules/@headlessui/react/dist/hooks/use-latest-value.js +11 -0
  227. package/dist/node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js +12 -0
  228. package/dist/node_modules/@headlessui/react/dist/hooks/use-slot.js +7 -0
  229. package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js +16 -0
  230. package/dist/node_modules/@headlessui/react/dist/internal/disabled.js +8 -0
  231. package/dist/node_modules/@headlessui/react/dist/internal/form-fields.js +35 -0
  232. package/dist/node_modules/@headlessui/react/dist/internal/hidden.js +13 -0
  233. package/dist/node_modules/@headlessui/react/dist/internal/id.js +8 -0
  234. package/dist/node_modules/@headlessui/react/dist/utils/bugs.js +19 -0
  235. package/dist/node_modules/@headlessui/react/dist/utils/class-names.js +6 -0
  236. package/dist/node_modules/@headlessui/react/dist/utils/disposables.js +40 -0
  237. package/dist/node_modules/@headlessui/react/dist/utils/dom.js +34 -0
  238. package/dist/node_modules/@headlessui/react/dist/utils/env.js +34 -0
  239. package/dist/node_modules/@headlessui/react/dist/utils/form.js +32 -0
  240. package/dist/node_modules/@headlessui/react/dist/utils/match.js +11 -0
  241. package/dist/node_modules/@headlessui/react/dist/utils/micro-task.js +8 -0
  242. package/dist/node_modules/@headlessui/react/dist/utils/owner.js +8 -0
  243. package/dist/node_modules/@headlessui/react/dist/utils/render.js +126 -0
  244. package/dist/node_modules/@js-temporal/polyfill/dist/index.esm.js +3913 -0
  245. package/dist/node_modules/@mikecousins/react-pdf/dist/index.js +83 -0
  246. package/dist/node_modules/@react-aria/focus/dist/useFocusRing.js +38 -0
  247. package/dist/node_modules/@react-aria/interactions/dist/useFocus.js +31 -0
  248. package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.js +99 -0
  249. package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.js +59 -0
  250. package/dist/node_modules/@react-aria/interactions/dist/useHover.js +86 -0
  251. package/dist/node_modules/@react-aria/interactions/dist/utils.js +68 -0
  252. package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.js +32 -0
  253. package/dist/node_modules/@react-aria/utils/dist/domHelpers.js +15 -0
  254. package/dist/node_modules/@react-aria/utils/dist/focusWithoutScrolling.js +45 -0
  255. package/dist/node_modules/@react-aria/utils/dist/isVirtualEvent.js +7 -0
  256. package/dist/node_modules/@react-aria/utils/dist/openLink.js +28 -0
  257. package/dist/node_modules/@react-aria/utils/dist/platform.js +47 -0
  258. package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.js +34 -0
  259. package/dist/node_modules/@react-aria/utils/dist/useLayoutEffect.js +6 -0
  260. package/dist/node_modules/@react-stately/flags/dist/import.js +7 -0
  261. package/dist/node_modules/@tanstack/react-table/build/lib/index.js +94 -0
  262. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +38 -0
  263. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1954 -0
  264. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +575 -0
  265. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +52 -0
  266. package/dist/node_modules/clsx/dist/clsx.js +17 -0
  267. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1204 -0
  268. package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js +126 -0
  269. package/dist/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +24 -0
  270. package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +35 -0
  271. package/dist/node_modules/jsbi/dist/jsbi.js +1040 -0
  272. package/dist/node_modules/react-use/esm/usePrevious.js +10 -0
  273. package/dist/static/no-results-image.png.js +4 -0
  274. package/dist/styles.css +1 -1
  275. package/dist/utils/date-patch-dashes.js +28 -0
  276. package/dist/utils/date.js +95 -0
  277. package/dist/utils/formatting.js +22 -0
  278. package/dist/utils/index.js +4 -0
  279. package/dist/utils/mergeObjectArrays.js +18 -0
  280. package/dist/utils.js +20 -0
  281. package/package.json +1 -1
  282. /package/dist/{pdf-l6QfMa5e.js → node_modules/pdfjs-dist/build/pdf.js} +0 -0
@@ -0,0 +1,575 @@
1
+ import { memo as m, notUndefined as O, approxEqual as y, debounce as A } from "./utils.js";
2
+ const M = (l) => {
3
+ const { offsetWidth: r, offsetHeight: t } = l;
4
+ return { width: r, height: t };
5
+ }, _ = (l) => l, R = (l) => {
6
+ const r = Math.max(l.startIndex - l.overscan, 0), t = Math.min(l.endIndex + l.overscan, l.count - 1), e = [];
7
+ for (let s = r; s <= t; s++)
8
+ e.push(s);
9
+ return e;
10
+ }, T = (l, r) => {
11
+ const t = l.scrollElement;
12
+ if (!t)
13
+ return;
14
+ const e = l.targetWindow;
15
+ if (!e)
16
+ return;
17
+ const s = (n) => {
18
+ const { width: o, height: h } = n;
19
+ r({ width: Math.round(o), height: Math.round(h) });
20
+ };
21
+ if (s(M(t)), !e.ResizeObserver)
22
+ return () => {
23
+ };
24
+ const i = new e.ResizeObserver((n) => {
25
+ const o = () => {
26
+ const h = n[0];
27
+ if (h?.borderBoxSize) {
28
+ const u = h.borderBoxSize[0];
29
+ if (u) {
30
+ s({ width: u.inlineSize, height: u.blockSize });
31
+ return;
32
+ }
33
+ }
34
+ s(M(t));
35
+ };
36
+ l.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(o) : o();
37
+ });
38
+ return i.observe(t, { box: "border-box" }), () => {
39
+ i.unobserve(t);
40
+ };
41
+ }, I = {
42
+ passive: !0
43
+ }, w = typeof window > "u" ? !0 : "onscrollend" in window, k = (l, r) => {
44
+ const t = l.scrollElement;
45
+ if (!t)
46
+ return;
47
+ const e = l.targetWindow;
48
+ if (!e)
49
+ return;
50
+ let s = 0;
51
+ const i = l.options.useScrollendEvent && w ? () => {
52
+ } : A(
53
+ e,
54
+ () => {
55
+ r(s, !1);
56
+ },
57
+ l.options.isScrollingResetDelay
58
+ ), n = (c) => () => {
59
+ const { horizontal: g, isRtl: a } = l.options;
60
+ s = g ? t.scrollLeft * (a && -1 || 1) : t.scrollTop, i(), r(s, c);
61
+ }, o = n(!0), h = n(!1);
62
+ t.addEventListener("scroll", o, I);
63
+ const u = l.options.useScrollendEvent && w;
64
+ return u && t.addEventListener("scrollend", h, I), () => {
65
+ t.removeEventListener("scroll", o), u && t.removeEventListener("scrollend", h);
66
+ };
67
+ }, F = (l, r, t) => {
68
+ if (r?.borderBoxSize) {
69
+ const e = r.borderBoxSize[0];
70
+ if (e)
71
+ return Math.round(
72
+ e[t.options.horizontal ? "inlineSize" : "blockSize"]
73
+ );
74
+ }
75
+ return l[t.options.horizontal ? "offsetWidth" : "offsetHeight"];
76
+ }, L = (l, {
77
+ adjustments: r = 0,
78
+ behavior: t
79
+ }, e) => {
80
+ var s, i;
81
+ const n = l + r;
82
+ (i = (s = e.scrollElement) == null ? void 0 : s.scrollTo) == null || i.call(s, {
83
+ [e.options.horizontal ? "left" : "top"]: n,
84
+ behavior: t
85
+ });
86
+ };
87
+ class D {
88
+ constructor(r) {
89
+ this.unsubs = [], this.scrollElement = null, this.targetWindow = null, this.isScrolling = !1, this.scrollState = null, this.measurementsCache = [], this.itemSizeCache = /* @__PURE__ */ new Map(), this.laneAssignments = /* @__PURE__ */ new Map(), this.pendingMeasuredCacheIndexes = [], this.prevLanes = void 0, this.lanesChangedFlag = !1, this.lanesSettling = !1, this.scrollRect = null, this.scrollOffset = null, this.scrollDirection = null, this.scrollAdjustments = 0, this.elementsCache = /* @__PURE__ */ new Map(), this.now = () => {
90
+ var t, e, s;
91
+ return ((s = (e = (t = this.targetWindow) == null ? void 0 : t.performance) == null ? void 0 : e.now) == null ? void 0 : s.call(e)) ?? Date.now();
92
+ }, this.observer = /* @__PURE__ */ (() => {
93
+ let t = null;
94
+ const e = () => t || (!this.targetWindow || !this.targetWindow.ResizeObserver ? null : t = new this.targetWindow.ResizeObserver((s) => {
95
+ s.forEach((i) => {
96
+ const n = () => {
97
+ this._measureElement(i.target, i);
98
+ };
99
+ this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(n) : n();
100
+ });
101
+ }));
102
+ return {
103
+ disconnect: () => {
104
+ var s;
105
+ (s = e()) == null || s.disconnect(), t = null;
106
+ },
107
+ observe: (s) => {
108
+ var i;
109
+ return (i = e()) == null ? void 0 : i.observe(s, { box: "border-box" });
110
+ },
111
+ unobserve: (s) => {
112
+ var i;
113
+ return (i = e()) == null ? void 0 : i.unobserve(s);
114
+ }
115
+ };
116
+ })(), this.range = null, this.setOptions = (t) => {
117
+ Object.entries(t).forEach(([e, s]) => {
118
+ typeof s > "u" && delete t[e];
119
+ }), this.options = {
120
+ debug: !1,
121
+ initialOffset: 0,
122
+ overscan: 1,
123
+ paddingStart: 0,
124
+ paddingEnd: 0,
125
+ scrollPaddingStart: 0,
126
+ scrollPaddingEnd: 0,
127
+ horizontal: !1,
128
+ getItemKey: _,
129
+ rangeExtractor: R,
130
+ onChange: () => {
131
+ },
132
+ measureElement: F,
133
+ initialRect: { width: 0, height: 0 },
134
+ scrollMargin: 0,
135
+ gap: 0,
136
+ indexAttribute: "data-index",
137
+ initialMeasurementsCache: [],
138
+ lanes: 1,
139
+ isScrollingResetDelay: 150,
140
+ enabled: !0,
141
+ isRtl: !1,
142
+ useScrollendEvent: !1,
143
+ useAnimationFrameWithResizeObserver: !1,
144
+ ...t
145
+ };
146
+ }, this.notify = (t) => {
147
+ var e, s;
148
+ (s = (e = this.options).onChange) == null || s.call(e, this, t);
149
+ }, this.maybeNotify = m(
150
+ () => (this.calculateRange(), [
151
+ this.isScrolling,
152
+ this.range ? this.range.startIndex : null,
153
+ this.range ? this.range.endIndex : null
154
+ ]),
155
+ (t) => {
156
+ this.notify(t);
157
+ },
158
+ {
159
+ key: process.env.NODE_ENV !== "production" && "maybeNotify",
160
+ debug: () => this.options.debug,
161
+ initialDeps: [
162
+ this.isScrolling,
163
+ this.range ? this.range.startIndex : null,
164
+ this.range ? this.range.endIndex : null
165
+ ]
166
+ }
167
+ ), this.cleanup = () => {
168
+ this.unsubs.filter(Boolean).forEach((t) => t()), this.unsubs = [], this.observer.disconnect(), this.rafId != null && this.targetWindow && (this.targetWindow.cancelAnimationFrame(this.rafId), this.rafId = null), this.scrollState = null, this.scrollElement = null, this.targetWindow = null;
169
+ }, this._didMount = () => () => {
170
+ this.cleanup();
171
+ }, this._willUpdate = () => {
172
+ var t;
173
+ const e = this.options.enabled ? this.options.getScrollElement() : null;
174
+ if (this.scrollElement !== e) {
175
+ if (this.cleanup(), !e) {
176
+ this.maybeNotify();
177
+ return;
178
+ }
179
+ this.scrollElement = e, this.scrollElement && "ownerDocument" in this.scrollElement ? this.targetWindow = this.scrollElement.ownerDocument.defaultView : this.targetWindow = ((t = this.scrollElement) == null ? void 0 : t.window) ?? null, this.elementsCache.forEach((s) => {
180
+ this.observer.observe(s);
181
+ }), this.unsubs.push(
182
+ this.options.observeElementRect(this, (s) => {
183
+ this.scrollRect = s, this.maybeNotify();
184
+ })
185
+ ), this.unsubs.push(
186
+ this.options.observeElementOffset(this, (s, i) => {
187
+ this.scrollAdjustments = 0, this.scrollDirection = i ? this.getScrollOffset() < s ? "forward" : "backward" : null, this.scrollOffset = s, this.isScrolling = i, this.scrollState && this.scheduleScrollReconcile(), this.maybeNotify();
188
+ })
189
+ ), this._scrollToOffset(this.getScrollOffset(), {
190
+ adjustments: void 0,
191
+ behavior: void 0
192
+ });
193
+ }
194
+ }, this.rafId = null, this.getSize = () => this.options.enabled ? (this.scrollRect = this.scrollRect ?? this.options.initialRect, this.scrollRect[this.options.horizontal ? "width" : "height"]) : (this.scrollRect = null, 0), this.getScrollOffset = () => this.options.enabled ? (this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset == "function" ? this.options.initialOffset() : this.options.initialOffset), this.scrollOffset) : (this.scrollOffset = null, 0), this.getFurthestMeasurement = (t, e) => {
195
+ const s = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
196
+ for (let n = e - 1; n >= 0; n--) {
197
+ const o = t[n];
198
+ if (s.has(o.lane))
199
+ continue;
200
+ const h = i.get(
201
+ o.lane
202
+ );
203
+ if (h == null || o.end > h.end ? i.set(o.lane, o) : o.end < h.end && s.set(o.lane, !0), s.size === this.options.lanes)
204
+ break;
205
+ }
206
+ return i.size === this.options.lanes ? Array.from(i.values()).sort((n, o) => n.end === o.end ? n.index - o.index : n.end - o.end)[0] : void 0;
207
+ }, this.getMeasurementOptions = m(
208
+ () => [
209
+ this.options.count,
210
+ this.options.paddingStart,
211
+ this.options.scrollMargin,
212
+ this.options.getItemKey,
213
+ this.options.enabled,
214
+ this.options.lanes
215
+ ],
216
+ (t, e, s, i, n, o) => (this.prevLanes !== void 0 && this.prevLanes !== o && (this.lanesChangedFlag = !0), this.prevLanes = o, this.pendingMeasuredCacheIndexes = [], {
217
+ count: t,
218
+ paddingStart: e,
219
+ scrollMargin: s,
220
+ getItemKey: i,
221
+ enabled: n,
222
+ lanes: o
223
+ }),
224
+ {
225
+ key: !1
226
+ }
227
+ ), this.getMeasurements = m(
228
+ () => [this.getMeasurementOptions(), this.itemSizeCache],
229
+ ({ count: t, paddingStart: e, scrollMargin: s, getItemKey: i, enabled: n, lanes: o }, h) => {
230
+ if (!n)
231
+ return this.measurementsCache = [], this.itemSizeCache.clear(), this.laneAssignments.clear(), [];
232
+ if (this.laneAssignments.size > t)
233
+ for (const a of this.laneAssignments.keys())
234
+ a >= t && this.laneAssignments.delete(a);
235
+ this.lanesChangedFlag && (this.lanesChangedFlag = !1, this.lanesSettling = !0, this.measurementsCache = [], this.itemSizeCache.clear(), this.laneAssignments.clear(), this.pendingMeasuredCacheIndexes = []), this.measurementsCache.length === 0 && !this.lanesSettling && (this.measurementsCache = this.options.initialMeasurementsCache, this.measurementsCache.forEach((a) => {
236
+ this.itemSizeCache.set(a.key, a.size);
237
+ }));
238
+ const u = this.lanesSettling ? 0 : this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
239
+ this.pendingMeasuredCacheIndexes = [], this.lanesSettling && this.measurementsCache.length === t && (this.lanesSettling = !1);
240
+ const c = this.measurementsCache.slice(0, u), g = new Array(o).fill(
241
+ void 0
242
+ );
243
+ for (let a = 0; a < u; a++) {
244
+ const p = c[a];
245
+ p && (g[p.lane] = a);
246
+ }
247
+ for (let a = u; a < t; a++) {
248
+ const p = i(a), S = this.laneAssignments.get(a);
249
+ let f, v;
250
+ if (S !== void 0 && this.options.lanes > 1) {
251
+ f = S;
252
+ const d = g[f], x = d !== void 0 ? c[d] : void 0;
253
+ v = x ? x.end + this.options.gap : e + s;
254
+ } else {
255
+ const d = this.options.lanes === 1 ? c[a - 1] : this.getFurthestMeasurement(c, a);
256
+ v = d ? d.end + this.options.gap : e + s, f = d ? d.lane : a % this.options.lanes, this.options.lanes > 1 && this.laneAssignments.set(a, f);
257
+ }
258
+ const b = h.get(p), E = typeof b == "number" ? b : this.options.estimateSize(a), C = v + E;
259
+ c[a] = {
260
+ index: a,
261
+ start: v,
262
+ size: E,
263
+ end: C,
264
+ key: p,
265
+ lane: f
266
+ }, g[f] = a;
267
+ }
268
+ return this.measurementsCache = c, c;
269
+ },
270
+ {
271
+ key: process.env.NODE_ENV !== "production" && "getMeasurements",
272
+ debug: () => this.options.debug
273
+ }
274
+ ), this.calculateRange = m(
275
+ () => [
276
+ this.getMeasurements(),
277
+ this.getSize(),
278
+ this.getScrollOffset(),
279
+ this.options.lanes
280
+ ],
281
+ (t, e, s, i) => this.range = t.length > 0 && e > 0 ? W({
282
+ measurements: t,
283
+ outerSize: e,
284
+ scrollOffset: s,
285
+ lanes: i
286
+ }) : null,
287
+ {
288
+ key: process.env.NODE_ENV !== "production" && "calculateRange",
289
+ debug: () => this.options.debug
290
+ }
291
+ ), this.getVirtualIndexes = m(
292
+ () => {
293
+ let t = null, e = null;
294
+ const s = this.calculateRange();
295
+ return s && (t = s.startIndex, e = s.endIndex), this.maybeNotify.updateDeps([this.isScrolling, t, e]), [
296
+ this.options.rangeExtractor,
297
+ this.options.overscan,
298
+ this.options.count,
299
+ t,
300
+ e
301
+ ];
302
+ },
303
+ (t, e, s, i, n) => i === null || n === null ? [] : t({
304
+ startIndex: i,
305
+ endIndex: n,
306
+ overscan: e,
307
+ count: s
308
+ }),
309
+ {
310
+ key: process.env.NODE_ENV !== "production" && "getVirtualIndexes",
311
+ debug: () => this.options.debug
312
+ }
313
+ ), this.indexFromElement = (t) => {
314
+ const e = this.options.indexAttribute, s = t.getAttribute(e);
315
+ return s ? parseInt(s, 10) : (console.warn(
316
+ `Missing attribute name '${e}={index}' on measured element.`
317
+ ), -1);
318
+ }, this.shouldMeasureDuringScroll = (t) => {
319
+ var e;
320
+ if (!this.scrollState || this.scrollState.behavior !== "smooth")
321
+ return !0;
322
+ const s = this.scrollState.index ?? ((e = this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)) == null ? void 0 : e.index);
323
+ if (s !== void 0 && this.range) {
324
+ const i = Math.max(
325
+ this.options.overscan,
326
+ Math.ceil((this.range.endIndex - this.range.startIndex) / 2)
327
+ ), n = Math.max(0, s - i), o = Math.min(
328
+ this.options.count - 1,
329
+ s + i
330
+ );
331
+ return t >= n && t <= o;
332
+ }
333
+ return !0;
334
+ }, this._measureElement = (t, e) => {
335
+ if (!t.isConnected) {
336
+ this.observer.unobserve(t);
337
+ return;
338
+ }
339
+ const s = this.indexFromElement(t), i = this.measurementsCache[s];
340
+ if (!i)
341
+ return;
342
+ const n = i.key, o = this.elementsCache.get(n);
343
+ o !== t && (o && this.observer.unobserve(o), this.observer.observe(t), this.elementsCache.set(n, t)), this.shouldMeasureDuringScroll(s) && this.resizeItem(s, this.options.measureElement(t, e, this));
344
+ }, this.resizeItem = (t, e) => {
345
+ var s;
346
+ const i = this.measurementsCache[t];
347
+ if (!i)
348
+ return;
349
+ const n = this.itemSizeCache.get(i.key) ?? i.size, o = e - n;
350
+ o !== 0 && (((s = this.scrollState) == null ? void 0 : s.behavior) !== "smooth" && (this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(i, o, this) : i.start < this.getScrollOffset() + this.scrollAdjustments) && (process.env.NODE_ENV !== "production" && this.options.debug && console.info("correction", o), this._scrollToOffset(this.getScrollOffset(), {
351
+ adjustments: this.scrollAdjustments += o,
352
+ behavior: void 0
353
+ })), this.pendingMeasuredCacheIndexes.push(i.index), this.itemSizeCache = new Map(this.itemSizeCache.set(i.key, e)), this.notify(!1));
354
+ }, this.measureElement = (t) => {
355
+ if (!t) {
356
+ this.elementsCache.forEach((e, s) => {
357
+ e.isConnected || (this.observer.unobserve(e), this.elementsCache.delete(s));
358
+ });
359
+ return;
360
+ }
361
+ this._measureElement(t, void 0);
362
+ }, this.getVirtualItems = m(
363
+ () => [this.getVirtualIndexes(), this.getMeasurements()],
364
+ (t, e) => {
365
+ const s = [];
366
+ for (let i = 0, n = t.length; i < n; i++) {
367
+ const o = t[i], h = e[o];
368
+ s.push(h);
369
+ }
370
+ return s;
371
+ },
372
+ {
373
+ key: process.env.NODE_ENV !== "production" && "getVirtualItems",
374
+ debug: () => this.options.debug
375
+ }
376
+ ), this.getVirtualItemForOffset = (t) => {
377
+ const e = this.getMeasurements();
378
+ if (e.length !== 0)
379
+ return O(
380
+ e[z(
381
+ 0,
382
+ e.length - 1,
383
+ (s) => O(e[s]).start,
384
+ t
385
+ )]
386
+ );
387
+ }, this.getMaxScrollOffset = () => {
388
+ if (!this.scrollElement) return 0;
389
+ if ("scrollHeight" in this.scrollElement)
390
+ return this.options.horizontal ? this.scrollElement.scrollWidth - this.scrollElement.clientWidth : this.scrollElement.scrollHeight - this.scrollElement.clientHeight;
391
+ {
392
+ const t = this.scrollElement.document.documentElement;
393
+ return this.options.horizontal ? t.scrollWidth - this.scrollElement.innerWidth : t.scrollHeight - this.scrollElement.innerHeight;
394
+ }
395
+ }, this.getOffsetForAlignment = (t, e, s = 0) => {
396
+ if (!this.scrollElement) return 0;
397
+ const i = this.getSize(), n = this.getScrollOffset();
398
+ e === "auto" && (e = t >= n + i ? "end" : "start"), e === "center" ? t += (s - i) / 2 : e === "end" && (t -= i);
399
+ const o = this.getMaxScrollOffset();
400
+ return Math.max(Math.min(o, t), 0);
401
+ }, this.getOffsetForIndex = (t, e = "auto") => {
402
+ t = Math.max(0, Math.min(t, this.options.count - 1));
403
+ const s = this.getSize(), i = this.getScrollOffset(), n = this.measurementsCache[t];
404
+ if (!n) return;
405
+ if (e === "auto")
406
+ if (n.end >= i + s - this.options.scrollPaddingEnd)
407
+ e = "end";
408
+ else if (n.start <= i + this.options.scrollPaddingStart)
409
+ e = "start";
410
+ else
411
+ return [i, e];
412
+ if (e === "end" && t === this.options.count - 1)
413
+ return [this.getMaxScrollOffset(), e];
414
+ const o = e === "end" ? n.end + this.options.scrollPaddingEnd : n.start - this.options.scrollPaddingStart;
415
+ return [
416
+ this.getOffsetForAlignment(o, e, n.size),
417
+ e
418
+ ];
419
+ }, this.scrollToOffset = (t, { align: e = "start", behavior: s = "auto" } = {}) => {
420
+ const i = this.getOffsetForAlignment(t, e), n = this.now();
421
+ this.scrollState = {
422
+ index: null,
423
+ align: e,
424
+ behavior: s,
425
+ startedAt: n,
426
+ lastTargetOffset: i,
427
+ stableFrames: 0
428
+ }, this._scrollToOffset(i, { adjustments: void 0, behavior: s }), this.scheduleScrollReconcile();
429
+ }, this.scrollToIndex = (t, {
430
+ align: e = "auto",
431
+ behavior: s = "auto"
432
+ } = {}) => {
433
+ t = Math.max(0, Math.min(t, this.options.count - 1));
434
+ const i = this.getOffsetForIndex(t, e);
435
+ if (!i)
436
+ return;
437
+ const [n, o] = i, h = this.now();
438
+ this.scrollState = {
439
+ index: t,
440
+ align: o,
441
+ behavior: s,
442
+ startedAt: h,
443
+ lastTargetOffset: n,
444
+ stableFrames: 0
445
+ }, this._scrollToOffset(n, { adjustments: void 0, behavior: s }), this.scheduleScrollReconcile();
446
+ }, this.scrollBy = (t, { behavior: e = "auto" } = {}) => {
447
+ const s = this.getScrollOffset() + t, i = this.now();
448
+ this.scrollState = {
449
+ index: null,
450
+ align: "start",
451
+ behavior: e,
452
+ startedAt: i,
453
+ lastTargetOffset: s,
454
+ stableFrames: 0
455
+ }, this._scrollToOffset(s, { adjustments: void 0, behavior: e }), this.scheduleScrollReconcile();
456
+ }, this.getTotalSize = () => {
457
+ var t;
458
+ const e = this.getMeasurements();
459
+ let s;
460
+ if (e.length === 0)
461
+ s = this.options.paddingStart;
462
+ else if (this.options.lanes === 1)
463
+ s = ((t = e[e.length - 1]) == null ? void 0 : t.end) ?? 0;
464
+ else {
465
+ const i = Array(this.options.lanes).fill(null);
466
+ let n = e.length - 1;
467
+ for (; n >= 0 && i.some((o) => o === null); ) {
468
+ const o = e[n];
469
+ i[o.lane] === null && (i[o.lane] = o.end), n--;
470
+ }
471
+ s = Math.max(...i.filter((o) => o !== null));
472
+ }
473
+ return Math.max(
474
+ s - this.options.scrollMargin + this.options.paddingEnd,
475
+ 0
476
+ );
477
+ }, this._scrollToOffset = (t, {
478
+ adjustments: e,
479
+ behavior: s
480
+ }) => {
481
+ this.options.scrollToFn(t, { behavior: s, adjustments: e }, this);
482
+ }, this.measure = () => {
483
+ this.itemSizeCache = /* @__PURE__ */ new Map(), this.laneAssignments = /* @__PURE__ */ new Map(), this.notify(!1);
484
+ }, this.setOptions(r);
485
+ }
486
+ scheduleScrollReconcile() {
487
+ if (!this.targetWindow) {
488
+ this.scrollState = null;
489
+ return;
490
+ }
491
+ this.rafId == null && (this.rafId = this.targetWindow.requestAnimationFrame(() => {
492
+ this.rafId = null, this.reconcileScroll();
493
+ }));
494
+ }
495
+ reconcileScroll() {
496
+ if (!this.scrollState || !this.scrollElement) return;
497
+ if (this.now() - this.scrollState.startedAt > 5e3) {
498
+ this.scrollState = null;
499
+ return;
500
+ }
501
+ const e = this.scrollState.index != null ? this.getOffsetForIndex(this.scrollState.index, this.scrollState.align) : void 0, s = e ? e[0] : this.scrollState.lastTargetOffset, i = 1, n = s !== this.scrollState.lastTargetOffset;
502
+ if (!n && y(s, this.getScrollOffset())) {
503
+ if (this.scrollState.stableFrames++, this.scrollState.stableFrames >= i) {
504
+ this.scrollState = null;
505
+ return;
506
+ }
507
+ } else
508
+ this.scrollState.stableFrames = 0, n && (this.scrollState.lastTargetOffset = s, this.scrollState.behavior = "auto", this._scrollToOffset(s, {
509
+ adjustments: void 0,
510
+ behavior: "auto"
511
+ }));
512
+ this.scheduleScrollReconcile();
513
+ }
514
+ }
515
+ const z = (l, r, t, e) => {
516
+ for (; l <= r; ) {
517
+ const s = (l + r) / 2 | 0, i = t(s);
518
+ if (i < e)
519
+ l = s + 1;
520
+ else if (i > e)
521
+ r = s - 1;
522
+ else
523
+ return s;
524
+ }
525
+ return l > 0 ? l - 1 : 0;
526
+ };
527
+ function W({
528
+ measurements: l,
529
+ outerSize: r,
530
+ scrollOffset: t,
531
+ lanes: e
532
+ }) {
533
+ const s = l.length - 1, i = (h) => l[h].start;
534
+ if (l.length <= e)
535
+ return {
536
+ startIndex: 0,
537
+ endIndex: s
538
+ };
539
+ let n = z(
540
+ 0,
541
+ s,
542
+ i,
543
+ t
544
+ ), o = n;
545
+ if (e === 1)
546
+ for (; o < s && l[o].end < t + r; )
547
+ o++;
548
+ else if (e > 1) {
549
+ const h = Array(e).fill(0);
550
+ for (; o < s && h.some((c) => c < t + r); ) {
551
+ const c = l[o];
552
+ h[c.lane] = c.end, o++;
553
+ }
554
+ const u = Array(e).fill(t + r);
555
+ for (; n >= 0 && u.some((c) => c >= t); ) {
556
+ const c = l[n];
557
+ u[c.lane] = c.start, n--;
558
+ }
559
+ n = Math.max(0, n - n % e), o = Math.min(s, o + (e - 1 - o % e));
560
+ }
561
+ return { startIndex: n, endIndex: o };
562
+ }
563
+ export {
564
+ D as Virtualizer,
565
+ y as approxEqual,
566
+ A as debounce,
567
+ _ as defaultKeyExtractor,
568
+ R as defaultRangeExtractor,
569
+ L as elementScroll,
570
+ F as measureElement,
571
+ m as memo,
572
+ O as notUndefined,
573
+ k as observeElementOffset,
574
+ T as observeElementRect
575
+ };
@@ -0,0 +1,52 @@
1
+ function T(n, l, e) {
2
+ let i = e.initialDeps ?? [], t, c = !0;
3
+ function h() {
4
+ var d, m, f;
5
+ let g;
6
+ e.key && ((d = e.debug) != null && d.call(e)) && (g = Date.now());
7
+ const o = n();
8
+ if (!(o.length !== i.length || o.some((r, a) => i[a] !== r)))
9
+ return t;
10
+ i = o;
11
+ let s;
12
+ if (e.key && ((m = e.debug) != null && m.call(e)) && (s = Date.now()), t = l(...o), e.key && ((f = e.debug) != null && f.call(e))) {
13
+ const r = Math.round((Date.now() - g) * 100) / 100, a = Math.round((Date.now() - s) * 100) / 100, b = a / 16, w = (u, D) => {
14
+ for (u = String(u); u.length < D; )
15
+ u = " " + u;
16
+ return u;
17
+ };
18
+ console.info(
19
+ `%c⏱ ${w(a, 5)} /${w(r, 5)} ms`,
20
+ `
21
+ font-size: .6rem;
22
+ font-weight: bold;
23
+ color: hsl(${Math.max(
24
+ 0,
25
+ Math.min(120 - 120 * b, 120)
26
+ )}deg 100% 31%);`,
27
+ e?.key
28
+ );
29
+ }
30
+ return e?.onChange && !(c && e.skipInitialOnChange) && e.onChange(t), c = !1, t;
31
+ }
32
+ return h.updateDeps = (d) => {
33
+ i = d;
34
+ }, h;
35
+ }
36
+ function k(n, l) {
37
+ if (n === void 0)
38
+ throw new Error("Unexpected undefined");
39
+ return n;
40
+ }
41
+ const y = (n, l) => Math.abs(n - l) < 1.01, C = (n, l, e) => {
42
+ let i;
43
+ return function(...t) {
44
+ n.clearTimeout(i), i = n.setTimeout(() => l.apply(this, t), e);
45
+ };
46
+ };
47
+ export {
48
+ y as approxEqual,
49
+ C as debounce,
50
+ T as memo,
51
+ k as notUndefined
52
+ };
@@ -0,0 +1,17 @@
1
+ function a(r) {
2
+ var n, f, t = "";
3
+ if (typeof r == "string" || typeof r == "number") t += r;
4
+ else if (typeof r == "object") if (Array.isArray(r)) {
5
+ var o = r.length;
6
+ for (n = 0; n < o; n++) r[n] && (f = a(r[n])) && (t && (t += " "), t += f);
7
+ } else for (f in r) r[f] && (t && (t += " "), t += f);
8
+ return t;
9
+ }
10
+ function i() {
11
+ for (var r, n, f = 0, t = "", o = arguments.length; f < o; f++) (r = arguments[f]) && (n = a(r)) && (t && (t += " "), t += n);
12
+ return t;
13
+ }
14
+ export {
15
+ i as clsx,
16
+ i as default
17
+ };