@leonardaustin/ui 0.25.0 → 0.26.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 (279) hide show
  1. package/README.md +11 -0
  2. package/dist/components/app-shell/AppShell.d.ts +3 -3
  3. package/dist/components/app-shell/AppShell.js +82 -0
  4. package/dist/components/app-shell/AuthLayout.d.ts +3 -3
  5. package/dist/components/app-shell/AuthLayout.js +16 -0
  6. package/dist/components/app-shell/BackLink.d.ts +3 -3
  7. package/dist/components/app-shell/BackLink.js +19 -0
  8. package/dist/components/app-shell/BottomNav.d.ts +3 -2
  9. package/dist/components/app-shell/BottomNav.js +37 -0
  10. package/dist/components/app-shell/Breadcrumbs.d.ts +3 -2
  11. package/dist/components/app-shell/Breadcrumbs.js +46 -0
  12. package/dist/components/app-shell/CommandPalette.d.ts +3 -2
  13. package/dist/components/app-shell/CommandPalette.js +119 -0
  14. package/dist/components/app-shell/MobileDrawer.d.ts +3 -3
  15. package/dist/components/app-shell/MobileDrawer.js +128 -0
  16. package/dist/components/app-shell/Sidebar.d.ts +3 -3
  17. package/dist/components/app-shell/Sidebar.js +355 -0
  18. package/dist/components/app-shell/ThemeMenu.d.ts +3 -2
  19. package/dist/components/app-shell/ThemeMenu.js +273 -0
  20. package/dist/components/app-shell/TopBar.d.ts +3 -3
  21. package/dist/components/app-shell/TopBar.js +129 -0
  22. package/dist/components/app-shell/commandPaletteEvents.js +16 -0
  23. package/dist/components/app-shell/navigation.js +21 -0
  24. package/dist/components/app-shell/themeMenuEvents.js +7 -0
  25. package/dist/components/charts/AreaChart.d.ts +4 -3
  26. package/dist/components/charts/AreaChart.js +217 -0
  27. package/dist/components/charts/BarChart.d.ts +4 -3
  28. package/dist/components/charts/BarChart.js +91 -0
  29. package/dist/components/charts/DonutChart.d.ts +4 -3
  30. package/dist/components/charts/DonutChart.js +172 -0
  31. package/dist/components/charts/RadarChart.d.ts +4 -3
  32. package/dist/components/charts/RadarChart.js +142 -0
  33. package/dist/components/charts/RadialBarChart.d.ts +4 -3
  34. package/dist/components/charts/RadialBarChart.js +219 -0
  35. package/dist/components/charts/SparkLine.d.ts +4 -3
  36. package/dist/components/charts/SparkLine.js +39 -0
  37. package/dist/components/charts/StackedBarChart.d.ts +4 -3
  38. package/dist/components/charts/StackedBarChart.js +249 -0
  39. package/dist/components/charts/VerticalBarChart.d.ts +4 -3
  40. package/dist/components/charts/VerticalBarChart.js +143 -0
  41. package/dist/components/charts/chartUtils.js +68 -0
  42. package/dist/components/tables/ColumnPicker.d.ts +3 -3
  43. package/dist/components/tables/ColumnPicker.js +59 -0
  44. package/dist/components/tables/Pagination.d.ts +3 -3
  45. package/dist/components/tables/Pagination.js +56 -0
  46. package/dist/components/tables/ResourceTable.d.ts +3 -3
  47. package/dist/components/tables/ResourceTable.js +88 -0
  48. package/dist/components/tables/Table.js +95 -0
  49. package/dist/components/tables/sortRows.js +11 -0
  50. package/dist/components/ui/Accordion.d.ts +2 -1
  51. package/dist/components/ui/Accordion.js +35 -0
  52. package/dist/components/ui/Alert.d.ts +3 -2
  53. package/dist/components/ui/Alert.js +51 -0
  54. package/dist/components/ui/AttachmentList.d.ts +5 -5
  55. package/dist/components/ui/AttachmentList.js +90 -0
  56. package/dist/components/ui/AudioPlayer.d.ts +5 -2
  57. package/dist/components/ui/AudioPlayer.js +447 -0
  58. package/dist/components/ui/AuthCard.d.ts +3 -3
  59. package/dist/components/ui/AuthCard.js +39 -0
  60. package/dist/components/ui/AuthorByline.d.ts +3 -3
  61. package/dist/components/ui/AuthorByline.js +23 -0
  62. package/dist/components/ui/Avatar.d.ts +3 -2
  63. package/dist/components/ui/Avatar.js +36 -0
  64. package/dist/components/ui/Badge.d.ts +3 -2
  65. package/dist/components/ui/Badge.js +47 -0
  66. package/dist/components/ui/Button.d.ts +3 -3
  67. package/dist/components/ui/Button.js +83 -0
  68. package/dist/components/ui/Calendar.d.ts +3 -3
  69. package/dist/components/ui/Calendar.js +344 -0
  70. package/dist/components/ui/CalendarGrid.d.ts +3 -2
  71. package/dist/components/ui/CalendarGrid.js +136 -0
  72. package/dist/components/ui/Card.d.ts +6 -5
  73. package/dist/components/ui/Card.js +53 -0
  74. package/dist/components/ui/CharacterCount.d.ts +3 -3
  75. package/dist/components/ui/CharacterCount.js +27 -0
  76. package/dist/components/ui/Checkbox.d.ts +10 -8
  77. package/dist/components/ui/Checkbox.js +52 -0
  78. package/dist/components/ui/CodeInput.d.ts +7 -4
  79. package/dist/components/ui/CodeInput.js +96 -0
  80. package/dist/components/ui/Combobox.d.ts +8 -6
  81. package/dist/components/ui/Combobox.js +213 -0
  82. package/dist/components/ui/CopyButton.d.ts +1 -1
  83. package/dist/components/ui/CopyButton.js +57 -0
  84. package/dist/components/ui/DangerZone.d.ts +3 -3
  85. package/dist/components/ui/DangerZone.js +23 -0
  86. package/dist/components/ui/DatePartsInput.d.ts +6 -4
  87. package/dist/components/ui/DatePartsInput.js +138 -0
  88. package/dist/components/ui/DatePicker.d.ts +9 -4
  89. package/dist/components/ui/DatePicker.js +84 -0
  90. package/dist/components/ui/DateRangePicker.d.ts +7 -4
  91. package/dist/components/ui/DateRangePicker.js +143 -0
  92. package/dist/components/ui/DateTimePicker.d.ts +7 -4
  93. package/dist/components/ui/DateTimePicker.js +267 -0
  94. package/dist/components/ui/DetailPanel.d.ts +3 -3
  95. package/dist/components/ui/DetailPanel.js +183 -0
  96. package/dist/components/ui/Dialog.d.ts +3 -3
  97. package/dist/components/ui/Dialog.js +411 -0
  98. package/dist/components/ui/DialogActions.d.ts +3 -3
  99. package/dist/components/ui/DialogActions.js +35 -0
  100. package/dist/components/ui/Disclosure.d.ts +3 -3
  101. package/dist/components/ui/Disclosure.js +45 -0
  102. package/dist/components/ui/DividerLabel.d.ts +3 -3
  103. package/dist/components/ui/DividerLabel.js +20 -0
  104. package/dist/components/ui/DropdownMenu.d.ts +3 -3
  105. package/dist/components/ui/DropdownMenu.js +229 -0
  106. package/dist/components/ui/EmptyState.d.ts +3 -3
  107. package/dist/components/ui/EmptyState.js +31 -0
  108. package/dist/components/ui/ErrorBoundary.js +46 -0
  109. package/dist/components/ui/FieldContext.js +8 -0
  110. package/dist/components/ui/Fieldset.d.ts +2 -2
  111. package/dist/components/ui/Fieldset.js +39 -0
  112. package/dist/components/ui/FilterButton.d.ts +4 -7
  113. package/dist/components/ui/FilterButton.js +17 -0
  114. package/dist/components/ui/FilterDropdown.d.ts +4 -4
  115. package/dist/components/ui/FilterDropdown.js +18 -0
  116. package/dist/components/ui/FormField.d.ts +4 -4
  117. package/dist/components/ui/FormField.js +68 -0
  118. package/dist/components/ui/Grid.d.ts +1 -1
  119. package/dist/components/ui/Grid.js +19 -0
  120. package/dist/components/ui/GridItem.d.ts +1 -1
  121. package/dist/components/ui/GridItem.js +16 -0
  122. package/dist/components/ui/Inline.d.ts +1 -1
  123. package/dist/components/ui/Inline.js +24 -0
  124. package/dist/components/ui/Kbd.d.ts +3 -2
  125. package/dist/components/ui/Kbd.js +13 -0
  126. package/dist/components/ui/ListItemLink.d.ts +3 -3
  127. package/dist/components/ui/ListItemLink.js +44 -0
  128. package/dist/components/ui/LoadingSpinner.d.ts +3 -2
  129. package/dist/components/ui/LoadingSpinner.js +19 -0
  130. package/dist/components/ui/MessageBubble.d.ts +2 -2
  131. package/dist/components/ui/MessageBubble.js +41 -0
  132. package/dist/components/ui/MetadataGrid.d.ts +5 -3
  133. package/dist/components/ui/MetadataGrid.js +76 -0
  134. package/dist/components/ui/MetricCard.d.ts +3 -3
  135. package/dist/components/ui/MetricCard.js +51 -0
  136. package/dist/components/ui/NavTabs.d.ts +2 -2
  137. package/dist/components/ui/NavTabs.js +29 -0
  138. package/dist/components/ui/OAuthButton.d.ts +2 -2
  139. package/dist/components/ui/OAuthButton.js +55 -0
  140. package/dist/components/ui/OverlineLabel.d.ts +3 -3
  141. package/dist/components/ui/OverlineLabel.js +13 -0
  142. package/dist/components/ui/PageHeader.d.ts +3 -3
  143. package/dist/components/ui/PageHeader.js +33 -0
  144. package/dist/components/ui/PageSection.d.ts +3 -3
  145. package/dist/components/ui/PageSection.js +31 -0
  146. package/dist/components/ui/PaginationBar.d.ts +3 -3
  147. package/dist/components/ui/PaginationBar.js +62 -0
  148. package/dist/components/ui/PasswordInput.d.ts +3 -3
  149. package/dist/components/ui/PasswordInput.js +62 -0
  150. package/dist/components/ui/PasswordRequirements.d.ts +3 -2
  151. package/dist/components/ui/PasswordRequirements.js +34 -0
  152. package/dist/components/ui/Popover.d.ts +3 -3
  153. package/dist/components/ui/Popover.js +53 -0
  154. package/dist/components/ui/ProfileHeader.d.ts +3 -3
  155. package/dist/components/ui/ProfileHeader.js +54 -0
  156. package/dist/components/ui/ProgressBar.d.ts +3 -3
  157. package/dist/components/ui/ProgressBar.js +42 -0
  158. package/dist/components/ui/ProseContent.d.ts +3 -3
  159. package/dist/components/ui/ProseContent.js +13 -0
  160. package/dist/components/ui/QrCode.d.ts +3 -3
  161. package/dist/components/ui/QrCode.js +47 -0
  162. package/dist/components/ui/Radio.d.ts +9 -6
  163. package/dist/components/ui/Radio.js +58 -0
  164. package/dist/components/ui/RadioPill.d.ts +7 -4
  165. package/dist/components/ui/RadioPill.js +53 -0
  166. package/dist/components/ui/ReorderList.d.ts +3 -3
  167. package/dist/components/ui/ReorderList.js +123 -0
  168. package/dist/components/ui/SearchInput.d.ts +7 -5
  169. package/dist/components/ui/SearchInput.js +49 -0
  170. package/dist/components/ui/SectionHeader.d.ts +3 -3
  171. package/dist/components/ui/SectionHeader.js +13 -0
  172. package/dist/components/ui/Select.d.ts +4 -4
  173. package/dist/components/ui/Select.js +117 -0
  174. package/dist/components/ui/SelectDropdown.d.ts +8 -3
  175. package/dist/components/ui/SelectDropdown.js +206 -0
  176. package/dist/components/ui/SettingRow.d.ts +5 -5
  177. package/dist/components/ui/SettingRow.js +25 -0
  178. package/dist/components/ui/SideSheet.d.ts +3 -3
  179. package/dist/components/ui/SideSheet.js +164 -0
  180. package/dist/components/ui/Skeleton.d.ts +3 -3
  181. package/dist/components/ui/Skeleton.js +18 -0
  182. package/dist/components/ui/Slider.d.ts +11 -6
  183. package/dist/components/ui/Slider.js +58 -0
  184. package/dist/components/ui/SplitPaneLayout.d.ts +5 -5
  185. package/dist/components/ui/SplitPaneLayout.js +22 -0
  186. package/dist/components/ui/Stack.d.ts +1 -1
  187. package/dist/components/ui/Stack.js +18 -0
  188. package/dist/components/ui/StatusDot.d.ts +3 -2
  189. package/dist/components/ui/StatusDot.js +24 -0
  190. package/dist/components/ui/StepProgress.d.ts +3 -2
  191. package/dist/components/ui/StepProgress.js +33 -0
  192. package/dist/components/ui/Tabs.d.ts +5 -5
  193. package/dist/components/ui/Tabs.js +63 -0
  194. package/dist/components/ui/TextInput.d.ts +3 -3
  195. package/dist/components/ui/TextInput.js +57 -0
  196. package/dist/components/ui/Textarea.d.ts +3 -3
  197. package/dist/components/ui/Textarea.js +59 -0
  198. package/dist/components/ui/ThemePreview.d.ts +3 -3
  199. package/dist/components/ui/ThemePreview.js +28 -0
  200. package/dist/components/ui/TimeInput.d.ts +7 -6
  201. package/dist/components/ui/TimeInput.js +22 -0
  202. package/dist/components/ui/Timeline.d.ts +3 -2
  203. package/dist/components/ui/Timeline.js +29 -0
  204. package/dist/components/ui/Toast.js +121 -0
  205. package/dist/components/ui/Toggle.d.ts +5 -3
  206. package/dist/components/ui/Toggle.js +34 -0
  207. package/dist/components/ui/Toolbar.d.ts +3 -3
  208. package/dist/components/ui/Toolbar.js +70 -0
  209. package/dist/components/ui/Tooltip.js +91 -0
  210. package/dist/components/ui/TranscriptLine.d.ts +3 -3
  211. package/dist/components/ui/TranscriptLine.js +40 -0
  212. package/dist/components/ui/UploadDropzone.d.ts +3 -5
  213. package/dist/components/ui/UploadDropzone.js +55 -0
  214. package/dist/components/ui/badgeColors.js +5 -0
  215. package/dist/components/ui/calendar/AgendaView.js +140 -0
  216. package/dist/components/ui/calendar/MonthView.js +321 -0
  217. package/dist/components/ui/calendar/TimeGrid.js +501 -0
  218. package/dist/components/ui/calendar/TimelineView.js +311 -0
  219. package/dist/components/ui/calendar/context.js +10 -0
  220. package/dist/components/ui/calendar/items.js +152 -0
  221. package/dist/components/ui/calendar/types.js +38 -0
  222. package/dist/components/ui/calendar/useGridInteraction.js +393 -0
  223. package/dist/components/ui/useFieldControl.d.ts +1 -1
  224. package/dist/components/ui/useFieldControl.js +17 -0
  225. package/dist/config/theme.js +219 -0
  226. package/dist/core.css +2933 -0
  227. package/dist/hooks/useAnchoredPopup.js +162 -0
  228. package/dist/hooks/useApplyTheme.js +16 -0
  229. package/dist/hooks/useControllableState.d.ts +14 -0
  230. package/dist/hooks/useControllableState.js +10 -0
  231. package/dist/hooks/useDismiss.js +24 -0
  232. package/dist/hooks/useFocusTrap.js +42 -0
  233. package/dist/hooks/useOverlayStack.js +23 -0
  234. package/dist/hooks/usePopover.js +47 -0
  235. package/dist/hooks/usePortalContainer.js +14 -0
  236. package/dist/hooks/useSettings.js +8 -0
  237. package/dist/hooks/useTheme.js +8 -0
  238. package/dist/hooks/useTypeahead.js +19 -0
  239. package/dist/index.js +133 -12884
  240. package/dist/lib/anchorPlacement.js +75 -0
  241. package/dist/lib/calendar.js +666 -0
  242. package/dist/lib/cn.js +228 -0
  243. package/dist/lib/codeInput.js +51 -0
  244. package/dist/lib/dateParts.js +31 -0
  245. package/dist/lib/dialogDrag.js +45 -0
  246. package/dist/lib/dialogResize.js +47 -0
  247. package/dist/lib/formatDate.js +29 -0
  248. package/dist/lib/formatMediaTime.js +7 -0
  249. package/dist/lib/layout.js +29 -0
  250. package/dist/lib/math.js +6 -0
  251. package/dist/lib/mergeRefs.d.ts +6 -0
  252. package/dist/lib/mergeRefs.js +17 -0
  253. package/dist/lib/months.js +30 -0
  254. package/dist/lib/overlayStack.js +47 -0
  255. package/dist/lib/panelResize.js +8 -0
  256. package/dist/lib/passwordRequirements.js +23 -0
  257. package/dist/lib/qrCode.js +570 -0
  258. package/dist/lib/tones.js +104 -0
  259. package/dist/lib/typeahead.js +31 -0
  260. package/dist/providers/ControlSizeContext.js +9 -0
  261. package/dist/providers/ControlSizeProvider.js +11 -0
  262. package/dist/providers/SettingsContext.js +53 -0
  263. package/dist/providers/SettingsProvider.js +249 -0
  264. package/dist/providers/ThemeContext.js +5 -0
  265. package/dist/providers/ThemeProvider.js +17 -0
  266. package/dist/providers/accentColors.js +75 -0
  267. package/dist/providers/themeClasses.d.ts +1 -0
  268. package/dist/providers/themeClasses.js +20 -0
  269. package/dist/styles.css +228 -176
  270. package/dist/themes/cyber-brutal-dark.css +53 -0
  271. package/dist/themes/cyber-brutal-light.css +75 -0
  272. package/dist/themes/glass-dark.css +217 -0
  273. package/dist/themes/glass-light.css +215 -0
  274. package/dist/themes/hashi.css +66 -0
  275. package/dist/themes/light-inverted.css +32 -0
  276. package/dist/themes/light.css +1 -0
  277. package/dist/themes/monokai.css +51 -0
  278. package/dist/themes/solarized.css +55 -0
  279. package/package.json +3 -1
@@ -0,0 +1,666 @@
1
+ import { clamp as e } from "./math.js";
2
+ //#region src/lib/calendar.ts
3
+ var t = /* @__PURE__ */ new Map();
4
+ function n(e, n) {
5
+ if (!n) return {
6
+ year: e.getFullYear(),
7
+ month: e.getMonth() + 1,
8
+ day: e.getDate(),
9
+ hour: e.getHours(),
10
+ minute: e.getMinutes(),
11
+ second: e.getSeconds(),
12
+ millisecond: e.getMilliseconds()
13
+ };
14
+ let r = t.get(n);
15
+ r || (r = new Intl.DateTimeFormat("en-GB-u-ca-iso8601-nu-latn", {
16
+ timeZone: n,
17
+ year: "numeric",
18
+ month: "2-digit",
19
+ day: "2-digit",
20
+ hour: "2-digit",
21
+ minute: "2-digit",
22
+ second: "2-digit",
23
+ hourCycle: "h23"
24
+ }), t.set(n, r));
25
+ let i = {};
26
+ for (let t of r.formatToParts(e)) t.type !== "literal" && (i[t.type] = Number(t.value));
27
+ return {
28
+ year: i.year,
29
+ month: i.month,
30
+ day: i.day,
31
+ hour: i.hour,
32
+ minute: i.minute,
33
+ second: i.second,
34
+ millisecond: e.getUTCMilliseconds()
35
+ };
36
+ }
37
+ function r(e) {
38
+ let t = /* @__PURE__ */ new Date(0);
39
+ return t.setUTCFullYear(e.year, e.month - 1, e.day), t.setUTCHours(e.hour, e.minute, e.second, e.millisecond), t.getTime();
40
+ }
41
+ function i(e, t, i = "compatible") {
42
+ let a = r(e), o = new Date(a);
43
+ if (!Object.values(e).every(Number.isInteger) || o.getUTCFullYear() !== e.year || o.getUTCMonth() + 1 !== e.month || o.getUTCDate() !== e.day || o.getUTCHours() !== e.hour || o.getUTCMinutes() !== e.minute || o.getUTCSeconds() !== e.second || o.getUTCMilliseconds() !== e.millisecond) throw RangeError("Invalid civil date and time");
44
+ if (!t) {
45
+ let t = /* @__PURE__ */ new Date(0);
46
+ return t.setFullYear(e.year, e.month - 1, e.day), t.setHours(e.hour, e.minute, e.second, e.millisecond), t;
47
+ }
48
+ let s = /* @__PURE__ */ new Set();
49
+ for (let e of [
50
+ -48,
51
+ -24,
52
+ 0,
53
+ 24,
54
+ 48
55
+ ]) {
56
+ let i = a + e * 36e5;
57
+ s.add(r(n(new Date(i), t)) - i);
58
+ }
59
+ let c = [...s].map((e) => a - e).sort((e, t) => e - t), l = c.filter((e) => r(n(new Date(e), t)) === a);
60
+ if (l.length === 1) return new Date(l[0]);
61
+ if (i === "reject") throw RangeError(l.length ? "This time occurs twice in the selected timezone" : "This time does not exist in the selected timezone");
62
+ return l.length ? new Date(i === "later" ? l[l.length - 1] : l[0]) : new Date(i === "earlier" ? c[0] : c[c.length - 1]);
63
+ }
64
+ var a = 1440, o = 6e4, s = [
65
+ 1,
66
+ 2,
67
+ 3,
68
+ 4,
69
+ 5
70
+ ];
71
+ function c(e) {
72
+ return new Date(e.getFullYear(), e.getMonth(), e.getDate());
73
+ }
74
+ function l(e, t) {
75
+ return new Date(e.getFullYear(), e.getMonth(), e.getDate() + t, e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds());
76
+ }
77
+ function u(e, t) {
78
+ return new Date(e.getFullYear(), e.getMonth(), e.getDate(), e.getHours(), e.getMinutes() + t, e.getSeconds(), e.getMilliseconds());
79
+ }
80
+ function d(e, t) {
81
+ let n = new Date(e.getFullYear(), e.getMonth() + t, 1), r = new Date(n.getFullYear(), n.getMonth() + 1, 0).getDate();
82
+ return new Date(n.getFullYear(), n.getMonth(), Math.min(e.getDate(), r), e.getHours(), e.getMinutes());
83
+ }
84
+ function f(e, t = 1) {
85
+ let n = c(e);
86
+ return l(n, -((n.getDay() - t + 7) % 7));
87
+ }
88
+ function p(e) {
89
+ return new Date(e.getFullYear(), e.getMonth(), 1);
90
+ }
91
+ function m(e, t) {
92
+ return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
93
+ }
94
+ function h(e, t) {
95
+ let n = Date.UTC(e.getFullYear(), e.getMonth(), e.getDate()), r = Date.UTC(t.getFullYear(), t.getMonth(), t.getDate());
96
+ return Math.round((n - r) / 864e5);
97
+ }
98
+ function g(e) {
99
+ return e.getHours() * 60 + e.getMinutes() + e.getSeconds() / 60 + e.getMilliseconds() / o;
100
+ }
101
+ function _(e, t) {
102
+ let n = v(e, t);
103
+ if (!m(n, e) || g(n) <= t) return n;
104
+ let r = Math.floor(t);
105
+ for (; r > 0 && g(v(e, r - 1)) !== r - 1;) r--;
106
+ return /* @__PURE__ */ new Date(n.getTime() - (t - r) * o);
107
+ }
108
+ function v(e, t) {
109
+ let n = Math.floor(t);
110
+ return new Date(e.getFullYear(), e.getMonth(), e.getDate(), 0, n, Math.round((t - n) * 60));
111
+ }
112
+ function y(e) {
113
+ let t = /^(\d{1,2}):(\d{2})$/.exec(e.trim());
114
+ if (!t) throw RangeError(`Invalid time "${e}", expected HH:mm`);
115
+ let n = Number(t[1]), r = Number(t[2]);
116
+ if (r > 59 || n > 24 || n === 24 && r > 0) throw RangeError(`Invalid time "${e}"`);
117
+ return n * 60 + r;
118
+ }
119
+ function b(e) {
120
+ let t = Math.round(e), n = Math.floor(t / 60), r = t % 60;
121
+ return `${String(n).padStart(2, "0")}:${String(r).padStart(2, "0")}`;
122
+ }
123
+ function x(e) {
124
+ return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
125
+ }
126
+ function S(e) {
127
+ let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
128
+ if (!t) throw RangeError(`Invalid date key "${e}"`);
129
+ let n = new Date(Number(t[1]), Number(t[2]) - 1, Number(t[3]));
130
+ if (x(n) !== e) throw RangeError(`Invalid date key "${e}"`);
131
+ return n;
132
+ }
133
+ function C(e, t, n = "round") {
134
+ if (t <= 0) return e;
135
+ let r = n === "floor" ? Math.floor : n === "ceil" ? Math.ceil : Math.round, i = e / t;
136
+ return r(n === "floor" ? i + 1e-9 : n === "ceil" ? i - 1e-9 : i) * t;
137
+ }
138
+ function w(e, t, n = "round") {
139
+ return v(c(e), C(g(e), t, n));
140
+ }
141
+ function T(e) {
142
+ return e === "day" || e === "threeDay" || e === "workWeek" || e === "week";
143
+ }
144
+ function E(e, t, n = {}) {
145
+ let r = n.weekStartsOn ?? 1, i = c(t);
146
+ switch (e) {
147
+ case "day":
148
+ case "timeline": return [i];
149
+ case "threeDay": return [
150
+ i,
151
+ l(i, 1),
152
+ l(i, 2)
153
+ ];
154
+ case "week": {
155
+ let e = f(i, r);
156
+ return Array.from({ length: 7 }, (t, n) => l(e, n));
157
+ }
158
+ case "workWeek": {
159
+ let e = new Set(n.workWeekDays ?? s), t = f(i, r), a = Array.from({ length: 7 }, (e, n) => l(t, n)).filter((t) => e.has(t.getDay()));
160
+ return a.length ? a : [i];
161
+ }
162
+ case "agenda": {
163
+ let e = Math.max(1, Math.floor(n.agendaDays ?? 7));
164
+ return Array.from({ length: e }, (e, t) => l(i, t));
165
+ }
166
+ case "month": return D(t, r).flat();
167
+ }
168
+ }
169
+ function D(e, t = 1) {
170
+ let n = p(e), r = new Date(n.getFullYear(), n.getMonth() + 1, 0), i = f(n, t), a = [], o = i;
171
+ for (; o <= r || a.length === 0;) {
172
+ let e = Array.from({ length: 7 }, (e, t) => l(o, t));
173
+ a.push(e), o = l(o, 7);
174
+ }
175
+ return a;
176
+ }
177
+ function O(e, t, n = {}) {
178
+ let r = E(e, t, n);
179
+ return {
180
+ start: r[0],
181
+ end: l(r[r.length - 1], 1)
182
+ };
183
+ }
184
+ function k(e, t, n, r = {}) {
185
+ switch (e) {
186
+ case "day":
187
+ case "timeline": return l(t, n);
188
+ case "threeDay": return l(t, 3 * n);
189
+ case "week":
190
+ case "workWeek": return l(t, 7 * n);
191
+ case "agenda": return l(t, Math.max(1, r.agendaDays ?? 7) * n);
192
+ case "month": return d(t, n);
193
+ }
194
+ }
195
+ var A = /* @__PURE__ */ new Map();
196
+ function j(e, t) {
197
+ let n = `${e}|${JSON.stringify(t)}`, r = A.get(n);
198
+ return r || (r = new Intl.DateTimeFormat(e, t), A.set(n, r)), r;
199
+ }
200
+ function M(e, t = {}) {
201
+ return j(t.locale ?? "en-GB", {
202
+ timeZone: t.timeZone,
203
+ timeZoneName: t.timeZone ? "short" : void 0,
204
+ hour: t.hour12 ? "numeric" : "2-digit",
205
+ minute: "2-digit",
206
+ hourCycle: t.hour12 ? "h12" : "h23"
207
+ }).format(e);
208
+ }
209
+ function N(e, t, n = {}) {
210
+ return `${M(e, n)}–${M(t, n)}`;
211
+ }
212
+ function P(e, t = {}) {
213
+ if (!t.hour12) return b(e);
214
+ let n = v(new Date(2e3, 0, 1), e);
215
+ return j(t.locale ?? "en-GB", {
216
+ hour: "numeric",
217
+ minute: e % 60 ? "2-digit" : void 0,
218
+ hour12: !0
219
+ }).format(n);
220
+ }
221
+ function F(e, t = "en-GB") {
222
+ return j(t, {
223
+ weekday: "long",
224
+ day: "numeric",
225
+ month: "long",
226
+ year: "numeric"
227
+ }).format(e);
228
+ }
229
+ function I(e, t, n = {}) {
230
+ let r = n.locale ?? "en-GB";
231
+ if (e === "month") return j(r, {
232
+ month: "long",
233
+ year: "numeric"
234
+ }).format(t);
235
+ let i = E(e, t, n), a = i[0], o = i[i.length - 1];
236
+ if (i.length === 1) return F(a, r);
237
+ let s = a.getFullYear() === o.getFullYear(), c = s && a.getMonth() === o.getMonth(), l = j(r, {
238
+ day: "numeric",
239
+ month: "long",
240
+ year: "numeric"
241
+ });
242
+ if (c) return `${a.getDate()} – ${l.format(o)}`;
243
+ let u = j(r, s ? {
244
+ day: "numeric",
245
+ month: "short"
246
+ } : {
247
+ day: "numeric",
248
+ month: "short",
249
+ year: "numeric"
250
+ }), d = j(r, {
251
+ day: "numeric",
252
+ month: "short",
253
+ year: "numeric"
254
+ });
255
+ return `${u.format(a)} – ${d.format(o)}`;
256
+ }
257
+ function L(e, t, n, r) {
258
+ return e < r && n < t;
259
+ }
260
+ function R(e, t, n) {
261
+ let r = c(n), i = l(r, 1), o = e.getTime(), s = Math.max(t.getTime(), o);
262
+ if (s === o) {
263
+ if (o < r.getTime() || o >= i.getTime()) return null;
264
+ } else if (!L(o, s, r.getTime(), i.getTime())) return null;
265
+ let u = o < r.getTime(), d = s > i.getTime();
266
+ return {
267
+ startMinute: u ? 0 : g(e),
268
+ endMinute: s >= i.getTime() ? a : Math.max(g(t), u ? 0 : g(e)),
269
+ continuesBefore: u,
270
+ continuesAfter: d
271
+ };
272
+ }
273
+ function z(e) {
274
+ let t = e.filter(([e, t]) => t > e).map(([e, t]) => [e, t]).sort((e, t) => e[0] - t[0]), n = [];
275
+ for (let [e, r] of t) {
276
+ let t = n[n.length - 1];
277
+ t && e <= t[1] ? t[1] = Math.max(t[1], r) : n.push([e, r]);
278
+ }
279
+ return n;
280
+ }
281
+ function B(e, t, n) {
282
+ let r = [], i = e;
283
+ for (let [e, a] of z(n)) if (!(a <= i) && (e >= t || (e > i && r.push([i, Math.min(e, t)]), i = Math.max(i, a), i >= t))) break;
284
+ return i < t && r.push([i, t]), r;
285
+ }
286
+ function V(e, t = 0) {
287
+ let n = e.map((e) => ({
288
+ id: e.id,
289
+ start: e.start,
290
+ end: Math.max(e.end, e.start + t)
291
+ })).sort((e, t) => e.start - t.start || t.end - e.end || (e.id < t.id ? -1 : 1)), r = /* @__PURE__ */ new Map(), i = [], a = [], o = -Infinity, s = () => {
292
+ let e = a.length;
293
+ for (let t of i) {
294
+ let n = 1;
295
+ for (let r = t.column + 1; r < e && !i.some((e) => e.column === r && L(t.start, t.end, e.start, e.end)); r++) n++;
296
+ r.set(t.id, {
297
+ column: t.column,
298
+ columns: e,
299
+ span: n
300
+ });
301
+ }
302
+ i = [], a = [], o = -Infinity;
303
+ };
304
+ for (let e of n) {
305
+ e.start >= o && s();
306
+ let t = a.findIndex((t) => t <= e.start);
307
+ t === -1 ? (t = a.length, a.push(e.end)) : a[t] = e.end, i.push({
308
+ ...e,
309
+ column: t
310
+ }), o = Math.max(o, e.end);
311
+ }
312
+ return s(), r;
313
+ }
314
+ function H(e) {
315
+ let t = [...e].sort((e, t) => e.start - t.start || t.end - e.end || (e.id < t.id ? -1 : 1)), n = [], r = /* @__PURE__ */ new Map();
316
+ for (let e of t) {
317
+ let t = Math.max(e.end, e.start + 1e-6), i = n.findIndex((t) => t <= e.start);
318
+ i === -1 ? (i = n.length, n.push(t)) : n[i] = t, r.set(e.id, i);
319
+ }
320
+ return {
321
+ lanes: r,
322
+ count: n.length
323
+ };
324
+ }
325
+ function U(e) {
326
+ return e === void 0 ? [] : typeof e == "string" ? [e] : e;
327
+ }
328
+ function W(e, t, { emptyMatchesAll: n }) {
329
+ if (t === void 0) return !0;
330
+ let r = U(e);
331
+ return r.length === 0 ? n : r.includes(t);
332
+ }
333
+ function G(e, t, n) {
334
+ let r = U(e);
335
+ if (t === void 0 || n === void 0 || t === n) return r.length ? [...r] : void 0;
336
+ if (r.length === 0) return;
337
+ let i = r.map((e) => e === t ? n : e);
338
+ return [...new Set(i)];
339
+ }
340
+ function K(e, t, n = []) {
341
+ let r = /* @__PURE__ */ new Set(), i = e.start.getTime(), a = e.end.getTime();
342
+ for (let e of [...t, ...n]) if (L(e.start.getTime(), e.end.getTime(), i, a) && !("kind" in e && e.kind === "unavailable")) for (let t of U(e.resourceId)) r.add(t);
343
+ return r;
344
+ }
345
+ function q(e, t, n = {}) {
346
+ let { fromDateKey: r, wallDateAtMinutes: i, toDateKey: o, startOfWeek: s, startOfDay: c, addDays: l, differenceInDays: u, weekday: d } = $(n.timeZone), f = n.weekStartsOn ?? 1, p = [], m = t.start.getTime(), h = t.end.getTime();
347
+ for (let n of e) {
348
+ let e = y(n.startTime), g = y(n.endTime);
349
+ g <= e && (g += a);
350
+ let _ = r(n.startDate), v = (t) => {
351
+ let r = i(t, e), a = i(t, g);
352
+ if (a <= r || !L(r.getTime(), a.getTime(), m, h)) return;
353
+ let s = o(t);
354
+ p.push({
355
+ id: n.recurrence ? `${n.id}@${s}` : n.id,
356
+ start: r,
357
+ end: a,
358
+ kind: n.kind ?? "available",
359
+ resourceId: n.resourceId,
360
+ label: n.label,
361
+ color: n.color,
362
+ editable: n.editable,
363
+ seriesId: n.recurrence ? n.id : void 0,
364
+ occurrenceKey: n.recurrence ? s : void 0,
365
+ data: n.data
366
+ });
367
+ }, b = n.recurrence;
368
+ if (!b) {
369
+ v(_);
370
+ continue;
371
+ }
372
+ let x = Math.max(1, Math.floor(b.interval ?? 1)), S = new Set(b.weekdays);
373
+ if (S.size === 0) continue;
374
+ let C = new Set(b.exclusions ?? []), w = b.until ? r(b.until) : null, T = s(_, f), E = c(t.start);
375
+ E = l(E, -1), E < _ && (E = _);
376
+ let D = c(t.end);
377
+ for (; E <= D && (!w || E <= w);) S.has(d(E)) && Math.floor(u(s(E, f), T) / 7) % x === 0 && !C.has(o(E)) && v(E), E = l(E, 1);
378
+ }
379
+ return p.sort((e, t) => e.start.getTime() - t.start.getTime());
380
+ }
381
+ function J(t, n, r, i, a) {
382
+ let s = C(n, i, "floor"), c = C(r, i, "floor"), l = e(Math.min(s, c), a.min, a.max - i), u = e(Math.max(s, c) + i, l + i, a.max), d = _(t, l), f = _(t, u);
383
+ return f <= d && (f = new Date(d.getTime() + i * o)), {
384
+ start: d,
385
+ end: f
386
+ };
387
+ }
388
+ function Y(t, n, r, i, a, s) {
389
+ let c = (t.end.getTime() - t.start.getTime()) / o, l = C(r - i, a), u = g(t.start);
390
+ u >= s.min && u + c <= s.max && (l = e(l, s.min, s.max - c));
391
+ let d = v(n, l);
392
+ return {
393
+ start: d,
394
+ end: new Date(d.getTime() + c * o)
395
+ };
396
+ }
397
+ function X(t, n, r, i, o) {
398
+ let s = c(n), l = t.start.getTime() >= s.getTime() ? g(t.start) + i : i;
399
+ return _(s, e(C(r, i), Math.min(l, a), Math.max(o.max, l)));
400
+ }
401
+ function Z(e, t) {
402
+ return {
403
+ start: l(e.start, t),
404
+ end: l(e.end, t)
405
+ };
406
+ }
407
+ function Q(e, t) {
408
+ return e.start.getTime() === t.start.getTime() && e.end.getTime() === t.end.getTime();
409
+ }
410
+ function ee(e) {
411
+ return e.allDay ? !0 : e.end.getTime() >= l(e.start, 1).getTime();
412
+ }
413
+ function $(t) {
414
+ let r = (e) => n(e, t), c = (e) => i(e, t), l = (e) => {
415
+ let t = r(e);
416
+ return `${String(t.year).padStart(4, "0")}-${String(t.month).padStart(2, "0")}-${String(t.day).padStart(2, "0")}`;
417
+ }, d = (e) => c({
418
+ ...r(e),
419
+ hour: 0,
420
+ minute: 0,
421
+ second: 0,
422
+ millisecond: 0
423
+ }), f = (e, t) => {
424
+ if (t === 0) return new Date(e);
425
+ let n = r(e), i = new Date(Date.UTC(n.year, n.month - 1, n.day + t));
426
+ return c({
427
+ ...n,
428
+ year: i.getUTCFullYear(),
429
+ month: i.getUTCMonth() + 1,
430
+ day: i.getUTCDate()
431
+ });
432
+ }, p = (e, t) => {
433
+ let n = r(e), i = new Date(Date.UTC(n.year, n.month - 1 + t, 1)), a = new Date(Date.UTC(i.getUTCFullYear(), i.getUTCMonth() + 1, 0)).getUTCDate();
434
+ return c({
435
+ ...n,
436
+ year: i.getUTCFullYear(),
437
+ month: i.getUTCMonth() + 1,
438
+ day: Math.min(n.day, a)
439
+ });
440
+ }, m = (e) => {
441
+ let t = r(e);
442
+ return new Date(Date.UTC(t.year, t.month - 1, t.day)).getUTCDay();
443
+ }, h = (e, t = 1) => f(d(e), -((m(e) - t + 7) % 7)), _ = (e) => c({
444
+ ...r(d(e)),
445
+ day: 1
446
+ }), y = (e, t) => {
447
+ let n = r(e), i = r(t);
448
+ return Math.round((Date.UTC(n.year, n.month - 1, n.day) - Date.UTC(i.year, i.month - 1, i.day)) / 864e5);
449
+ }, b = (e, t) => {
450
+ let n = r(e), i = new Date(Date.UTC(n.year, n.month - 1, n.day, 0, Math.floor(t), 0, Math.round((t - Math.floor(t)) * o)));
451
+ return c({
452
+ year: i.getUTCFullYear(),
453
+ month: i.getUTCMonth() + 1,
454
+ day: i.getUTCDate(),
455
+ hour: i.getUTCHours(),
456
+ minute: i.getUTCMinutes(),
457
+ second: i.getUTCSeconds(),
458
+ millisecond: i.getUTCMilliseconds()
459
+ });
460
+ }, x = (e, t) => {
461
+ let n = r(e);
462
+ return y(e, t) * a + n.hour * 60 + n.minute + n.second / 60 + n.millisecond / o;
463
+ }, S = (e, n) => {
464
+ let r = b(e, n), i = x(r, e);
465
+ if (!t || i <= n + 1e-8) return r;
466
+ let a = Math.floor(r.getTime() - (i - n) * o), s = r.getTime();
467
+ for (; a < s;) {
468
+ let t = Math.floor((a + s) / 2);
469
+ x(new Date(t), e) < n ? a = t + 1 : s = t;
470
+ }
471
+ return new Date(s);
472
+ }, w = (e) => {
473
+ if (!Number.isFinite(e.min) || !Number.isFinite(e.max) || e.max <= e.min) throw RangeError("Calendar time bounds must contain a positive interval of real instants");
474
+ }, T = t ? (e, t) => new Date(d(e).getTime() + t * o) : v, E = t ? (e) => (e.getTime() - d(e).getTime()) / o : g, D = t ? (e, t) => new Date(e.getTime() + t * o) : u, O = (e) => {
475
+ let t = /^(\d{4})-(\d{2})-(\d{2})$/.exec(e);
476
+ if (!t) throw RangeError(`Invalid date key "${e}"`);
477
+ let n = c({
478
+ year: +t[1],
479
+ month: +t[2],
480
+ day: +t[3],
481
+ hour: 0,
482
+ minute: 0,
483
+ second: 0,
484
+ millisecond: 0
485
+ });
486
+ if (l(n) !== e) throw RangeError(`Invalid date key "${e}"`);
487
+ return n;
488
+ }, k = (e, t = 1) => {
489
+ let n = _(e), r = p(n, 1), i = [];
490
+ for (let e = h(n, t); e < r; e = f(e, 7)) i.push(Array.from({ length: 7 }, (t, n) => f(e, n)));
491
+ return i;
492
+ }, A = (e, t, n = {}) => {
493
+ let r = d(t);
494
+ if (e === "month") return k(r, n.weekStartsOn).flat();
495
+ if (e === "week" || e === "workWeek") {
496
+ let t = h(r, n.weekStartsOn), i = Array.from({ length: 7 }, (e, n) => f(t, n));
497
+ if (e === "week") return i;
498
+ let a = new Set(n.workWeekDays ?? s), o = i.filter((e) => a.has(m(e)));
499
+ return o.length ? o : [r];
500
+ }
501
+ let i = e === "threeDay" ? 3 : e === "agenda" ? Math.max(1, Math.floor(n.agendaDays ?? 7)) : 1;
502
+ return Array.from({ length: i }, (e, t) => f(r, t));
503
+ }, M = (e, n, r) => {
504
+ if (!t) return R(e, n, r);
505
+ let i = d(r).getTime(), a = f(d(r), 1).getTime(), s = e.getTime(), c = Math.max(s, n.getTime());
506
+ return (c === s ? s < i || s >= a : !L(s, c, i, a)) ? null : {
507
+ startMinute: Math.max(0, (s - i) / o),
508
+ endMinute: Math.min(a - i, c - i) / o,
509
+ continuesBefore: s < i,
510
+ continuesAfter: c > a
511
+ };
512
+ }, N = (e) => !!e.allDay || e.end >= f(e.start, 1), P = (e, n) => j(e, {
513
+ ...n,
514
+ ...t ? { timeZone: t } : {}
515
+ }), F = (e, t = "en-GB") => P(t, {
516
+ weekday: "long",
517
+ day: "numeric",
518
+ month: "long",
519
+ year: "numeric"
520
+ }).format(e), z = (e, n, i = {}) => {
521
+ if (!t) return I(e, n, i);
522
+ let a = i.locale ?? "en-GB";
523
+ if (e === "month") return P(a, {
524
+ month: "long",
525
+ year: "numeric"
526
+ }).format(n);
527
+ let o = A(e, n, i), s = o[0], c = o[o.length - 1];
528
+ if (o.length === 1) return F(s, a);
529
+ let l = r(s), u = r(c);
530
+ return l.year === u.year && l.month === u.month ? `${l.day} – ${P(a, {
531
+ day: "numeric",
532
+ month: "long",
533
+ year: "numeric"
534
+ }).format(c)}` : `${P(a, {
535
+ day: "numeric",
536
+ month: "short",
537
+ ...l.year === u.year ? {} : { year: "numeric" }
538
+ }).format(s)} – ${P(a, {
539
+ day: "numeric",
540
+ month: "short",
541
+ year: "numeric"
542
+ }).format(c)}`;
543
+ }, B = (n, i, s, c, l, u) => {
544
+ if (!t) return Y(n, i, s, c, l, u);
545
+ w(u);
546
+ let d = (n.end.getTime() - n.start.getTime()) / o, f = C(s - c, l), p = (e) => {
547
+ let t = T(i, e), n = r(t);
548
+ return y(t, i) * a + n.hour * 60 + n.minute;
549
+ }, m = b(n.start, p(u.min)), h = b(n.start, p(u.max));
550
+ n.start >= m && n.end <= h && d <= u.max - u.min && (f = e(f, u.min, u.max - d));
551
+ let g = T(i, f);
552
+ return {
553
+ start: g,
554
+ end: D(g, d)
555
+ };
556
+ };
557
+ return {
558
+ parts: r,
559
+ weekday: m,
560
+ startOfDay: d,
561
+ addDays: f,
562
+ addMonths: p,
563
+ addMinutes: D,
564
+ startOfWeek: h,
565
+ startOfMonth: _,
566
+ toDateKey: l,
567
+ fromDateKey: O,
568
+ differenceInDays: y,
569
+ isSameDay: (e, t) => l(e) === l(t),
570
+ dateAtMinutes: T,
571
+ wallDateAtMinutes: b,
572
+ minutesOfDay: E,
573
+ getMonthWeeks: k,
574
+ getVisibleDays: A,
575
+ getViewRange: (e, t, n = {}) => {
576
+ let r = A(e, t, n);
577
+ return {
578
+ start: r[0],
579
+ end: f(r[r.length - 1], 1)
580
+ };
581
+ },
582
+ shiftDate: (e, t, n, r = {}) => e === "month" ? p(t, n) : f(t, n * (e === "threeDay" ? 3 : e === "week" || e === "workWeek" ? 7 : e === "agenda" ? Math.max(1, r.agendaDays ?? 7) : 1)),
583
+ getFormatter: P,
584
+ formatLongDate: F,
585
+ formatRangeTitle: z,
586
+ daySegment: M,
587
+ isAllDayLike: N,
588
+ eventsOnDay: (e, t) => e.filter((e) => M(e.start, e.end, t)).sort((e, t) => Number(N(t)) - Number(N(e)) || e.start.getTime() - t.start.getTime() || t.end.getTime() - e.end.getTime() || e.title.localeCompare(t.title)),
589
+ computeCreateRange: (n, r, i, a, o) => {
590
+ if (!t) return J(n, r, i, a, o);
591
+ let s = C(r, a, "floor"), c = C(i, a, "floor");
592
+ w(o);
593
+ let l = Math.min(a, o.max - o.min), u = e(Math.min(s, c), o.min, o.max - l);
594
+ return {
595
+ start: T(n, u),
596
+ end: T(n, e(Math.max(s, c) + a, u + l, o.max))
597
+ };
598
+ },
599
+ computeMoveRange: B,
600
+ computeResizeEnd: (n, r, i, a, s) => {
601
+ if (!t) return X(n, r, i, a, s);
602
+ w(s);
603
+ let c = Math.max(0, (n.start.getTime() - d(r).getTime()) / o) + a;
604
+ return T(r, e(C(i, a), c, Math.max(s.max, c)));
605
+ },
606
+ computeNudgeRange: (e, t, n) => B(e, d(e.start), E(e.start) + t, 0, 1, n),
607
+ shiftRangeDays: (e, n) => {
608
+ if (!t) return Z(e, n);
609
+ if (e.allDay) return {
610
+ start: f(e.start, n),
611
+ end: f(e.end, n)
612
+ };
613
+ let r = f(e.start, n);
614
+ return {
615
+ start: r,
616
+ end: new Date(r.getTime() + e.end.getTime() - e.start.getTime())
617
+ };
618
+ },
619
+ dayBounds: (e, n) => {
620
+ if (!t) return n;
621
+ let r = d(e).getTime(), i = {
622
+ min: (S(e, n.min).getTime() - r) / o,
623
+ max: (S(e, n.max).getTime() - r) / o
624
+ };
625
+ return w(i), i;
626
+ }
627
+ };
628
+ }
629
+ function te(e, t, n, r, i = !0) {
630
+ let a = Math.max(5, t), o = (e) => Array.from({ length: Math.ceil((e.max - e.min) / a) }, (t, n) => e.min + n * a);
631
+ if (!i) return {
632
+ reference: void 0,
633
+ axes: e.map(({ day: e, bounds: t }) => ({
634
+ day: e,
635
+ bounds: t,
636
+ minutes: o(t),
637
+ matchesReference: !1
638
+ }))
639
+ };
640
+ let s = $(n.timeZone), c = /* @__PURE__ */ new Map(), l = e.map(({ day: e, bounds: t }) => {
641
+ let i = s.toDateKey(e), a = c.get(i);
642
+ if (a) return a;
643
+ let l = o(t), u = l.map((t) => s.dateAtMinutes(e, t)), d = u.map((e) => M(e, n)), f = j(n.locale ?? "en-GB", {
644
+ timeZone: n.timeZone,
645
+ timeZoneName: "short"
646
+ }), p = new Set(u.map((e) => f.formatToParts(e).find((e) => e.type === "timeZoneName")?.value)), m = t.max - t.min === r.max - r.min && p.size === 1, h = {
647
+ day: e,
648
+ bounds: t,
649
+ minutes: l,
650
+ signature: JSON.stringify([t.max - t.min, d]),
651
+ regular: m
652
+ };
653
+ return c.set(i, h), h;
654
+ }), u = /* @__PURE__ */ new Map(), d = [...c.values()].filter((e) => e.regular);
655
+ for (let e of d) u.set(e.signature, (u.get(e.signature) ?? 0) + 1);
656
+ let f = d.reduce((e, t) => !e || u.get(t.signature) > u.get(e.signature) || u.get(t.signature) === u.get(e.signature) && t.day < e.day ? t : e, void 0);
657
+ return {
658
+ reference: f,
659
+ axes: l.map((e) => ({
660
+ ...e,
661
+ matchesReference: !!f && e.signature === f.signature
662
+ }))
663
+ };
664
+ }
665
+ //#endregion
666
+ export { l as addDays, u as addMinutes, d as addMonths, i as calendarDateFromParts, n as calendarDateParts, $ as createCalendarDateMath, v as dateAtMinutes, h as differenceInDays, q as expandAvailabilityRules, P as formatHourLabel, I as formatRangeTitle, M as formatTime, b as formatTimeOfDay, N as formatTimeRange, S as fromDateKey, K as getActiveResourceIds, O as getViewRange, E as getVisibleDays, ee as isAllDayLike, m as isSameDay, T as isTimeGridView, V as layoutOverlaps, W as matchesResource, g as minutesOfDay, H as packLanes, y as parseTime, L as rangesOverlap, G as replaceResource, U as resourceIdsOf, Q as sameRange, te as selectCalendarTimeAxis, k as shiftDate, w as snapDate, C as snapMinutes, c as startOfDay, p as startOfMonth, f as startOfWeek, B as subtractIntervals, x as toDateKey };