@fde-desktop/fde-core 0.3.7 → 0.4.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 (163) hide show
  1. package/README.md +419 -68
  2. package/dist/CalendarApp-CHLUCAI7.css +744 -0
  3. package/dist/CalendarApp-K7ZOUZ6C.js +2 -0
  4. package/dist/CalendarApp-OTGEERSS.cjs +8 -0
  5. package/dist/CodeServerApp-5KZGO7HL.css +75 -0
  6. package/dist/CodeServerApp-LUZFCQBI.js +3 -0
  7. package/dist/CodeServerApp-P3TMJPLY.cjs +9 -0
  8. package/dist/CreateItemApp-NAZMXOPK.cjs +14 -0
  9. package/dist/CreateItemApp-PQB5GTFG.css +107 -0
  10. package/dist/CreateItemApp-ZHCTSPQE.js +8 -0
  11. package/dist/DeviceInfoApp-R6YNVIGX.cjs +11 -0
  12. package/dist/DeviceInfoApp-YHCYAO6N.js +5 -0
  13. package/dist/DeviceInfoApp-ZSMRSITP.css +7 -0
  14. package/dist/FilesApp-AKCVRTXR.js +8 -0
  15. package/dist/FilesApp-E6L5W3T2.css +1817 -0
  16. package/dist/FilesApp-RW3Y6ILO.cjs +14 -0
  17. package/dist/ImageViewerApp-5UXNSW2O.js +11 -0
  18. package/dist/ImageViewerApp-N2Q7E7WZ.css +215 -0
  19. package/dist/ImageViewerApp-RRRRKSFN.cjs +17 -0
  20. package/dist/ImageViewerMenuBar-I3TFKQPS.cjs +14 -0
  21. package/dist/ImageViewerMenuBar-TV5C6TM2.js +5 -0
  22. package/dist/ImageViewerMenuBar-XLK4LIHW.css +56 -0
  23. package/dist/MenuEditApp-HUZRFEHE.js +9 -0
  24. package/dist/MenuEditApp-MCUHGTKQ.cjs +15 -0
  25. package/dist/MenuEditApp-YA6HSAMJ.css +94 -0
  26. package/dist/MenuEditMenuBar-7VHMZNRM.css +56 -0
  27. package/dist/MenuEditMenuBar-GF6L4PGZ.cjs +15 -0
  28. package/dist/MenuEditMenuBar-IUXFPZE5.js +6 -0
  29. package/dist/NotesApp-37BV33C6.js +10 -0
  30. package/dist/NotesApp-4EVUQEFZ.cjs +16 -0
  31. package/dist/NotesApp-TQ6IHDNX.css +302 -0
  32. package/dist/NotesMenuBar-25LKN3SE.cjs +15 -0
  33. package/dist/NotesMenuBar-MXLOX7OT.css +56 -0
  34. package/dist/NotesMenuBar-SRV3AIAL.js +6 -0
  35. package/dist/PdfApp-5VBDNRMC.cjs +16 -0
  36. package/dist/PdfApp-BUIC5U5H.css +206 -0
  37. package/dist/PdfApp-RH6MZZX5.js +10 -0
  38. package/dist/PdfMenuBar-NLZC6JHS.js +4 -0
  39. package/dist/PdfMenuBar-QUM72EE4.css +56 -0
  40. package/dist/PdfMenuBar-WBRTKMLN.cjs +13 -0
  41. package/dist/SettingsApp-5LDHEHYV.cjs +20 -0
  42. package/dist/SettingsApp-JVOSEFH3.css +283 -0
  43. package/dist/SettingsApp-X6764D7T.js +14 -0
  44. package/dist/SettingsMenuBar-5CBSSMVM.css +56 -0
  45. package/dist/SettingsMenuBar-VLT6TTCM.js +6 -0
  46. package/dist/SettingsMenuBar-Y5QEXDEO.cjs +15 -0
  47. package/dist/StorybookApp-NQ244BER.css +7 -0
  48. package/dist/StorybookApp-NZDV4X3Y.js +1 -0
  49. package/dist/StorybookApp-VF3KIMU3.cjs +7 -0
  50. package/dist/TerminalApp-CDGWRBFJ.cjs +10 -0
  51. package/dist/TerminalApp-EAATMIMX.css +77 -0
  52. package/dist/TerminalApp-GCKJCM55.js +4 -0
  53. package/dist/TerminalMenuBar-3J26O26Q.css +56 -0
  54. package/dist/TerminalMenuBar-7BH7MGNJ.cjs +14 -0
  55. package/dist/TerminalMenuBar-7JAEQUZ4.js +5 -0
  56. package/dist/UploaderApp-2WYRCUQV.js +10 -0
  57. package/dist/UploaderApp-6KV3TGCT.css +1817 -0
  58. package/dist/UploaderApp-EYFC36PM.cjs +16 -0
  59. package/dist/chunk-2FO445RM.cjs +449 -0
  60. package/dist/chunk-2PSTHGTD.cjs +42 -0
  61. package/dist/chunk-2RQX7QBP.cjs +148 -0
  62. package/dist/chunk-3IICBLEA.js +442 -0
  63. package/dist/chunk-43W6UDUZ.cjs +19 -0
  64. package/dist/chunk-4E45FBAH.js +223 -0
  65. package/dist/chunk-4MCFQPKY.js +444 -0
  66. package/dist/chunk-4OH5RPSQ.cjs +38 -0
  67. package/dist/chunk-4XURSNM4.js +43 -0
  68. package/dist/chunk-4ZCRYHL6.js +407 -0
  69. package/dist/chunk-54PYEQLK.js +283 -0
  70. package/dist/chunk-5C6IQE42.cjs +35 -0
  71. package/dist/chunk-5NOHYJNH.js +84 -0
  72. package/dist/chunk-5PYK5ASL.js +162 -0
  73. package/dist/chunk-5YH6AKEO.js +146 -0
  74. package/dist/chunk-657BJOY5.cjs +324 -0
  75. package/dist/chunk-6QOUYSEE.cjs +2303 -0
  76. package/dist/chunk-7SAFECOJ.js +215 -0
  77. package/dist/chunk-7Y7HB7FB.cjs +53 -0
  78. package/dist/chunk-ABIAPZ6S.cjs +45 -0
  79. package/dist/chunk-AQL372JF.cjs +219 -0
  80. package/dist/chunk-AXDUVZVP.cjs +88 -0
  81. package/dist/chunk-AYFNYHMP.js +541 -0
  82. package/dist/chunk-BDO6B7MZ.cjs +451 -0
  83. package/dist/chunk-BKXEA2BK.cjs +286 -0
  84. package/dist/chunk-BLV47DX2.js +47 -0
  85. package/dist/chunk-BQCD5RAF.cjs +48 -0
  86. package/dist/chunk-BQL3YXMV.js +17429 -0
  87. package/dist/chunk-C6BEZNAM.cjs +45 -0
  88. package/dist/chunk-CFWV2JMR.js +234 -0
  89. package/dist/chunk-CV5PUHAE.cjs +86 -0
  90. package/dist/chunk-D5MVFFID.js +42 -0
  91. package/dist/chunk-D7R55WWT.js +1601 -0
  92. package/dist/chunk-DMNF4CNN.cjs +49 -0
  93. package/dist/chunk-DWP2SYF7.js +55 -0
  94. package/dist/chunk-E55VXNLK.cjs +17498 -0
  95. package/dist/chunk-EAELL43F.js +42 -0
  96. package/dist/chunk-EUQLZW6P.js +48 -0
  97. package/dist/chunk-EX5V2ZTU.js +40 -0
  98. package/dist/chunk-FH4ILMKF.js +38 -0
  99. package/dist/chunk-FRHBM2U7.js +33 -0
  100. package/dist/chunk-FX2TPX3L.cjs +45 -0
  101. package/dist/chunk-GCYD6T52.js +32 -0
  102. package/dist/chunk-GRYCUBJZ.js +9 -0
  103. package/dist/chunk-HWHBSAUC.js +40 -0
  104. package/dist/chunk-ICUE6T7J.cjs +50 -0
  105. package/dist/chunk-IDHP3R4I.js +31 -0
  106. package/dist/chunk-IUOQPOEN.js +2293 -0
  107. package/dist/chunk-J7L2S2GT.cjs +34 -0
  108. package/dist/chunk-JEBKLIMU.cjs +123 -0
  109. package/dist/chunk-KQHICFX3.js +121 -0
  110. package/dist/chunk-LMJE6V4N.cjs +42 -0
  111. package/dist/chunk-MVDGM5Y4.js +68 -0
  112. package/dist/chunk-NVEGEK3N.js +31 -0
  113. package/dist/chunk-NWMSWRUD.js +2236 -0
  114. package/dist/chunk-ODXL6BR3.js +77 -0
  115. package/dist/chunk-OJIDKDKF.js +68 -0
  116. package/dist/chunk-PKPQA5NR.js +15 -0
  117. package/dist/chunk-PNDBLFJW.cjs +50 -0
  118. package/dist/chunk-PYTKNRGM.js +280 -0
  119. package/dist/chunk-Q3WA72BF.cjs +70 -0
  120. package/dist/chunk-QB72BLCJ.cjs +237 -0
  121. package/dist/chunk-QHBBLML3.js +86 -0
  122. package/dist/chunk-RDIDAZ3S.cjs +9 -0
  123. package/dist/chunk-RGJPRXYY.js +48 -0
  124. package/dist/chunk-RQ6OZRUW.cjs +41 -0
  125. package/dist/chunk-SBE4SZAN.cjs +226 -0
  126. package/dist/chunk-SYGUWGWK.cjs +2329 -0
  127. package/dist/chunk-TDZ43MUX.cjs +165 -0
  128. package/dist/chunk-TGWMOHAO.js +17 -0
  129. package/dist/chunk-U4RYIS6Z.cjs +548 -0
  130. package/dist/chunk-UIQCTAVM.cjs +59 -0
  131. package/dist/chunk-XVASHRCE.cjs +70 -0
  132. package/dist/chunk-XYSMVQQD.cjs +1608 -0
  133. package/dist/chunk-YAIWI4Z5.js +7 -0
  134. package/dist/chunk-YP2PLNOF.cjs +34 -0
  135. package/dist/chunk-YSOLW4FS.cjs +11 -0
  136. package/dist/chunk-YY6OUR2U.js +44 -0
  137. package/dist/chunk-YZWS7FDT.cjs +409 -0
  138. package/dist/chunk-Z5YGWL65.cjs +39 -0
  139. package/dist/chunk-ZBGWYTCU.cjs +83 -0
  140. package/dist/chunk-ZHB5Q2M6.js +36 -0
  141. package/dist/chunk-ZHNDXNL4.js +45 -0
  142. package/dist/chunk-ZX3EDZ5C.cjs +17 -0
  143. package/dist/index.cjs +5641 -0
  144. package/dist/index.css +9192 -0
  145. package/dist/index.d.cts +2019 -0
  146. package/dist/index.d.ts +2019 -11
  147. package/dist/index.js +4794 -6598
  148. package/package.json +26 -14
  149. package/dist/apps/index.d.ts +0 -2
  150. package/dist/components/index.d.ts +0 -1
  151. package/dist/constants/index.d.ts +0 -12
  152. package/dist/domain/index.d.ts +0 -5
  153. package/dist/fc-D_a-n3yF.js +0 -20204
  154. package/dist/fi-DwZ_MW7F.js +0 -9993
  155. package/dist/hooks/index.d.ts +0 -28
  156. package/dist/i18n/index.d.ts +0 -2
  157. package/dist/iconBase-B764UN-4.js +0 -108
  158. package/dist/infrastructure/index.d.ts +0 -6
  159. package/dist/interfaces/index.d.ts +0 -11
  160. package/dist/stores/index.d.ts +0 -8
  161. package/dist/types/index.d.ts +0 -4
  162. package/dist/utils/index.d.ts +0 -14
  163. package/dist/vsc-CeA30gcb.js +0 -9574
@@ -0,0 +1,1608 @@
1
+ 'use strict';
2
+
3
+ var chunkE55VXNLK_cjs = require('./chunk-E55VXNLK.cjs');
4
+ var dayjs27 = require('dayjs');
5
+ var react = require('react');
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+ var isoWeek = require('dayjs/plugin/isoWeek.js');
8
+
9
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
+
11
+ var dayjs27__default = /*#__PURE__*/_interopDefault(dayjs27);
12
+ var isoWeek__default = /*#__PURE__*/_interopDefault(isoWeek);
13
+
14
+ // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/utils/handle-control-key-down/handle-control-key-down.mjs
15
+ function getNextIndex({ direction, levelIndex, rowIndex, cellIndex, size }) {
16
+ switch (direction) {
17
+ case "up":
18
+ if (levelIndex === 0 && rowIndex === 0) return null;
19
+ if (rowIndex === 0) return {
20
+ levelIndex: levelIndex - 1,
21
+ rowIndex: cellIndex <= size[levelIndex - 1][size[levelIndex - 1].length - 1] - 1 ? size[levelIndex - 1].length - 1 : size[levelIndex - 1].length - 2,
22
+ cellIndex
23
+ };
24
+ return {
25
+ levelIndex,
26
+ rowIndex: rowIndex - 1,
27
+ cellIndex
28
+ };
29
+ case "down":
30
+ if (rowIndex === size[levelIndex].length - 1) return {
31
+ levelIndex: levelIndex + 1,
32
+ rowIndex: 0,
33
+ cellIndex
34
+ };
35
+ if (rowIndex === size[levelIndex].length - 2 && cellIndex >= size[levelIndex][size[levelIndex].length - 1]) return {
36
+ levelIndex: levelIndex + 1,
37
+ rowIndex: 0,
38
+ cellIndex
39
+ };
40
+ return {
41
+ levelIndex,
42
+ rowIndex: rowIndex + 1,
43
+ cellIndex
44
+ };
45
+ case "left":
46
+ if (levelIndex === 0 && rowIndex === 0 && cellIndex === 0) return null;
47
+ if (rowIndex === 0 && cellIndex === 0) return {
48
+ levelIndex: levelIndex - 1,
49
+ rowIndex: size[levelIndex - 1].length - 1,
50
+ cellIndex: size[levelIndex - 1][size[levelIndex - 1].length - 1] - 1
51
+ };
52
+ if (cellIndex === 0) return {
53
+ levelIndex,
54
+ rowIndex: rowIndex - 1,
55
+ cellIndex: size[levelIndex][rowIndex - 1] - 1
56
+ };
57
+ return {
58
+ levelIndex,
59
+ rowIndex,
60
+ cellIndex: cellIndex - 1
61
+ };
62
+ case "right":
63
+ if (rowIndex === size[levelIndex].length - 1 && cellIndex === size[levelIndex][rowIndex] - 1) return {
64
+ levelIndex: levelIndex + 1,
65
+ rowIndex: 0,
66
+ cellIndex: 0
67
+ };
68
+ if (cellIndex === size[levelIndex][rowIndex] - 1) return {
69
+ levelIndex,
70
+ rowIndex: rowIndex + 1,
71
+ cellIndex: 0
72
+ };
73
+ return {
74
+ levelIndex,
75
+ rowIndex,
76
+ cellIndex: cellIndex + 1
77
+ };
78
+ default:
79
+ return {
80
+ levelIndex,
81
+ rowIndex,
82
+ cellIndex
83
+ };
84
+ }
85
+ }
86
+ function focusOnNextFocusableControl({ controlsRef, direction, levelIndex, rowIndex, cellIndex, size }) {
87
+ const nextIndex = getNextIndex({
88
+ direction,
89
+ size,
90
+ rowIndex,
91
+ cellIndex,
92
+ levelIndex
93
+ });
94
+ if (!nextIndex) return;
95
+ const controlToFocus = controlsRef.current?.[nextIndex.levelIndex]?.[nextIndex.rowIndex]?.[nextIndex.cellIndex];
96
+ if (!controlToFocus) return;
97
+ if (controlToFocus.disabled || controlToFocus.getAttribute("data-hidden") || controlToFocus.getAttribute("data-outside")) focusOnNextFocusableControl({
98
+ controlsRef,
99
+ direction,
100
+ levelIndex: nextIndex.levelIndex,
101
+ cellIndex: nextIndex.cellIndex,
102
+ rowIndex: nextIndex.rowIndex,
103
+ size
104
+ });
105
+ else controlToFocus.focus();
106
+ }
107
+ function getDirection(key) {
108
+ switch (key) {
109
+ case "ArrowDown":
110
+ return "down";
111
+ case "ArrowUp":
112
+ return "up";
113
+ case "ArrowRight":
114
+ return "right";
115
+ case "ArrowLeft":
116
+ return "left";
117
+ default:
118
+ return null;
119
+ }
120
+ }
121
+ function getControlsSize(controlsRef) {
122
+ return controlsRef.current?.map((column) => column.map((row) => row.length));
123
+ }
124
+ function handleControlKeyDown({ controlsRef, levelIndex, rowIndex, cellIndex, event }) {
125
+ const direction = getDirection(event.key);
126
+ if (direction) {
127
+ event.preventDefault();
128
+ focusOnNextFocusableControl({
129
+ controlsRef,
130
+ direction,
131
+ levelIndex,
132
+ rowIndex,
133
+ cellIndex,
134
+ size: getControlsSize(controlsRef)
135
+ });
136
+ }
137
+ }
138
+ function toDateString(value) {
139
+ return value == null || value === "" ? value : dayjs27__default.default(value).format("YYYY-MM-DD");
140
+ }
141
+ function toDateTimeString(value) {
142
+ return value == null || value === "" ? value : dayjs27__default.default(value).format("YYYY-MM-DD HH:mm:ss");
143
+ }
144
+ var DATES_PROVIDER_DEFAULT_SETTINGS = {
145
+ locale: "en",
146
+ firstDayOfWeek: 1,
147
+ weekendDays: [0, 6],
148
+ labelSeparator: "\u2013",
149
+ consistentWeeks: false
150
+ };
151
+ var DatesProviderContext = react.createContext(DATES_PROVIDER_DEFAULT_SETTINGS);
152
+ function useDatesContext() {
153
+ const ctx = react.use(DatesProviderContext);
154
+ const getLocale = react.useCallback((input) => input || ctx.locale, [ctx.locale]);
155
+ const getFirstDayOfWeek = react.useCallback((input) => typeof input === "number" ? input : ctx.firstDayOfWeek, [ctx.firstDayOfWeek]);
156
+ const getWeekendDays = react.useCallback((input) => Array.isArray(input) ? input : ctx.weekendDays, [ctx.weekendDays]);
157
+ const getLabelSeparator = react.useCallback((input) => typeof input === "string" ? input : ctx.labelSeparator, [ctx.labelSeparator]);
158
+ return {
159
+ ...ctx,
160
+ getLocale,
161
+ getFirstDayOfWeek,
162
+ getWeekendDays,
163
+ getLabelSeparator
164
+ };
165
+ }
166
+
167
+ // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/components/Day/Day.module.mjs
168
+ var Day_module_default = { "day": "m_396ce5cb" };
169
+ var varsResolver = chunkE55VXNLK_cjs.createVarsResolver((_, { size }) => ({ day: { "--day-size": chunkE55VXNLK_cjs.getSize(size, "day-size") } }));
170
+ var Day = chunkE55VXNLK_cjs.factory((_props) => {
171
+ const props = chunkE55VXNLK_cjs.useProps("Day", null, _props);
172
+ const { classNames, className, style, styles, unstyled, vars, date, disabled, __staticSelector, weekend, outside, selected, renderDay, inRange, firstInRange, lastInRange, hidden, static: isStatic, highlightToday, fullWidth, attributes, ...others } = props;
173
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkE55VXNLK_cjs.UnstyledButton, {
174
+ ...chunkE55VXNLK_cjs.useStyles({
175
+ name: __staticSelector || "Day",
176
+ classes: Day_module_default,
177
+ props,
178
+ className,
179
+ style,
180
+ classNames,
181
+ styles,
182
+ unstyled,
183
+ attributes,
184
+ vars,
185
+ varsResolver,
186
+ rootSelector: "day"
187
+ })("day", { style: hidden ? { display: "none" } : void 0 }),
188
+ component: isStatic ? "div" : "button",
189
+ disabled,
190
+ "data-today": dayjs27__default.default(date).isSame(/* @__PURE__ */ new Date(), "day") || void 0,
191
+ "data-hidden": hidden || void 0,
192
+ "data-highlight-today": highlightToday || void 0,
193
+ "data-disabled": disabled || void 0,
194
+ "data-weekend": !disabled && !outside && weekend || void 0,
195
+ "data-outside": !disabled && outside || void 0,
196
+ "data-selected": !disabled && selected || void 0,
197
+ "data-in-range": inRange && !disabled || void 0,
198
+ "data-first-in-range": firstInRange && !disabled || void 0,
199
+ "data-last-in-range": lastInRange && !disabled || void 0,
200
+ "data-static": isStatic || void 0,
201
+ "data-full-width": fullWidth || void 0,
202
+ unstyled,
203
+ ...others,
204
+ children: renderDay?.(date) || dayjs27__default.default(date).date()
205
+ });
206
+ });
207
+ Day.classes = Day_module_default;
208
+ Day.varsResolver = varsResolver;
209
+ Day.displayName = "@mantine/dates/Day";
210
+ function getWeekdayNames({ locale, format = "dd", firstDayOfWeek = 1 }) {
211
+ const baseDate = dayjs27__default.default().day(firstDayOfWeek);
212
+ const labels = [];
213
+ for (let i = 0; i < 7; i += 1) if (typeof format === "string") labels.push(dayjs27__default.default(baseDate).add(i, "days").locale(locale).format(format));
214
+ else labels.push(format(dayjs27__default.default(baseDate).add(i, "days").format("YYYY-MM-DD")));
215
+ return labels;
216
+ }
217
+
218
+ // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/components/WeekdaysRow/WeekdaysRow.module.mjs
219
+ var WeekdaysRow_module_default = { "weekday": "m_18a3eca" };
220
+ var varsResolver2 = chunkE55VXNLK_cjs.createVarsResolver((_, { size }) => ({ weekdaysRow: {
221
+ "--wr-fz": chunkE55VXNLK_cjs.getFontSize(size),
222
+ "--wr-spacing": chunkE55VXNLK_cjs.getSpacing(size)
223
+ } }));
224
+ var WeekdaysRow = chunkE55VXNLK_cjs.factory((_props) => {
225
+ const props = chunkE55VXNLK_cjs.useProps("WeekdaysRow", null, _props);
226
+ const { classNames, className, style, styles, unstyled, vars, locale, firstDayOfWeek, weekdayFormat, cellComponent: CellComponent = "th", __staticSelector, withWeekNumbers, attributes, ...others } = props;
227
+ const getStyles = chunkE55VXNLK_cjs.useStyles({
228
+ name: __staticSelector || "WeekdaysRow",
229
+ classes: WeekdaysRow_module_default,
230
+ props,
231
+ className,
232
+ style,
233
+ classNames,
234
+ styles,
235
+ unstyled,
236
+ attributes,
237
+ vars,
238
+ varsResolver: varsResolver2,
239
+ rootSelector: "weekdaysRow"
240
+ });
241
+ const ctx = useDatesContext();
242
+ const weekdays = getWeekdayNames({
243
+ locale: ctx.getLocale(locale),
244
+ format: weekdayFormat,
245
+ firstDayOfWeek: ctx.getFirstDayOfWeek(firstDayOfWeek)
246
+ }).map((weekday, index) => /* @__PURE__ */ jsxRuntime.jsx(CellComponent, {
247
+ ...getStyles("weekday"),
248
+ children: weekday
249
+ }, index));
250
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkE55VXNLK_cjs.Box, {
251
+ component: "tr",
252
+ ...getStyles("weekdaysRow"),
253
+ ...others,
254
+ children: [withWeekNumbers && /* @__PURE__ */ jsxRuntime.jsx(CellComponent, {
255
+ ...getStyles("weekday"),
256
+ children: "#"
257
+ }), weekdays]
258
+ });
259
+ });
260
+ WeekdaysRow.classes = WeekdaysRow_module_default;
261
+ WeekdaysRow.varsResolver = varsResolver2;
262
+ WeekdaysRow.displayName = "@mantine/dates/WeekdaysRow";
263
+ function getEndOfWeek(date, firstDayOfWeek = 1) {
264
+ let value = dayjs27__default.default(date);
265
+ if (!value.isValid()) return value;
266
+ const lastDayOfWeek = firstDayOfWeek === 0 ? 6 : firstDayOfWeek - 1;
267
+ while (value.day() !== lastDayOfWeek) value = value.add(1, "day");
268
+ return value.format("YYYY-MM-DD");
269
+ }
270
+ function getStartOfWeek(date, firstDayOfWeek = 1) {
271
+ let value = dayjs27__default.default(date);
272
+ while (value.day() !== firstDayOfWeek) value = value.subtract(1, "day");
273
+ return value.format("YYYY-MM-DD");
274
+ }
275
+ function getMonthDays({ month, firstDayOfWeek = 1, consistentWeeks }) {
276
+ const start = dayjs27__default.default(dayjs27__default.default(month).subtract(dayjs27__default.default(month).date() - 1, "day").format("YYYY-M-D"));
277
+ const startOfMonth = start.format("YYYY-MM-DD");
278
+ const endDate = getEndOfWeek(start.add(+start.daysInMonth() - 1, "day").format("YYYY-MM-DD"), firstDayOfWeek);
279
+ const weeks = [];
280
+ let date = dayjs27__default.default(getStartOfWeek(startOfMonth, firstDayOfWeek));
281
+ while (dayjs27__default.default(date).isBefore(endDate, "day")) {
282
+ const days = [];
283
+ for (let i = 0; i < 7; i += 1) {
284
+ days.push(date.format("YYYY-MM-DD"));
285
+ date = date.add(1, "day");
286
+ }
287
+ weeks.push(days);
288
+ }
289
+ if (consistentWeeks && weeks.length < 6) {
290
+ const lastWeek = weeks[weeks.length - 1];
291
+ const lastDay = lastWeek[lastWeek.length - 1];
292
+ let nextDay = dayjs27__default.default(lastDay).add(1, "day");
293
+ while (weeks.length < 6) {
294
+ const days = [];
295
+ for (let i = 0; i < 7; i += 1) {
296
+ days.push(nextDay.format("YYYY-MM-DD"));
297
+ nextDay = nextDay.add(1, "day");
298
+ }
299
+ weeks.push(days);
300
+ }
301
+ }
302
+ return weeks;
303
+ }
304
+ function isSameMonth(date, comparison) {
305
+ return dayjs27__default.default(date).format("YYYY-MM") === dayjs27__default.default(comparison).format("YYYY-MM");
306
+ }
307
+ function isAfterMinDate(date, minDate) {
308
+ return minDate ? dayjs27__default.default(date).isAfter(dayjs27__default.default(minDate).subtract(1, "day"), "day") : true;
309
+ }
310
+ function isBeforeMaxDate(date, maxDate) {
311
+ return maxDate ? dayjs27__default.default(date).isBefore(dayjs27__default.default(maxDate).add(1, "day"), "day") : true;
312
+ }
313
+ function getDateInTabOrder({ dates, minDate, maxDate, getDayProps, excludeDate, hideOutsideDates, month }) {
314
+ const enabledDates = dates.flat().filter((date) => isBeforeMaxDate(date, maxDate) && isAfterMinDate(date, minDate) && !excludeDate?.(date) && !getDayProps?.(date)?.disabled && (!hideOutsideDates || isSameMonth(date, month)));
315
+ const selectedDate = enabledDates.find((date) => getDayProps?.(date)?.selected);
316
+ if (selectedDate) return selectedDate;
317
+ const currentDate = enabledDates.find((date) => dayjs27__default.default().isSame(date, "date"));
318
+ if (currentDate) return currentDate;
319
+ return enabledDates[0];
320
+ }
321
+ dayjs27__default.default.extend(isoWeek__default.default);
322
+ function getWeekNumber(week) {
323
+ return dayjs27__default.default(week.find((date) => dayjs27__default.default(date).day() === 1)).isoWeek();
324
+ }
325
+
326
+ // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/components/Month/Month.module.mjs
327
+ var Month_module_default = {
328
+ "month": "m_cc9820d3",
329
+ "monthCell": "m_8f457cd5",
330
+ "weekNumber": "m_6cff9dea"
331
+ };
332
+ var defaultProps = { withCellSpacing: true };
333
+ var varsResolver3 = chunkE55VXNLK_cjs.createVarsResolver((_, { size }) => ({ weekNumber: {
334
+ "--wn-fz": chunkE55VXNLK_cjs.getFontSize(size),
335
+ "--wn-size": chunkE55VXNLK_cjs.getSize(size, "wn-size")
336
+ } }));
337
+ var Month = chunkE55VXNLK_cjs.factory((_props) => {
338
+ const props = chunkE55VXNLK_cjs.useProps("Month", defaultProps, _props);
339
+ const { classNames, className, style, styles, unstyled, vars, __staticSelector, locale, firstDayOfWeek, weekdayFormat, month, weekendDays, getDayProps, excludeDate, minDate, maxDate, renderDay, hideOutsideDates, hideWeekdays, getDayAriaLabel, static: isStatic, __getDayRef, __onDayKeyDown, __onDayClick, __onDayMouseEnter, __preventFocus, __stopPropagation, withCellSpacing, size, highlightToday, withWeekNumbers, fullWidth, attributes, ...others } = props;
340
+ const getStyles = chunkE55VXNLK_cjs.useStyles({
341
+ name: __staticSelector || "Month",
342
+ classes: Month_module_default,
343
+ props,
344
+ className,
345
+ style,
346
+ classNames,
347
+ styles,
348
+ unstyled,
349
+ attributes,
350
+ vars,
351
+ varsResolver: varsResolver3,
352
+ rootSelector: "month"
353
+ });
354
+ const ctx = useDatesContext();
355
+ const dates = getMonthDays({
356
+ month,
357
+ firstDayOfWeek: ctx.getFirstDayOfWeek(firstDayOfWeek),
358
+ consistentWeeks: ctx.consistentWeeks
359
+ });
360
+ const dateInTabOrder = getDateInTabOrder({
361
+ dates,
362
+ minDate: toDateString(minDate),
363
+ maxDate: toDateString(maxDate),
364
+ getDayProps,
365
+ excludeDate,
366
+ hideOutsideDates,
367
+ month
368
+ });
369
+ const { resolvedClassNames, resolvedStyles } = chunkE55VXNLK_cjs.useResolvedStylesApi({
370
+ classNames,
371
+ styles,
372
+ props
373
+ });
374
+ const rows = dates.map((row, rowIndex) => {
375
+ const cells = row.map((date, cellIndex) => {
376
+ const outside = !isSameMonth(date, month);
377
+ const ariaLabel = getDayAriaLabel?.(date) || dayjs27__default.default(date).locale(locale || ctx.locale).format("D MMMM YYYY");
378
+ const dayProps = getDayProps?.(date);
379
+ const isDateInTabOrder = dayjs27__default.default(date).isSame(dateInTabOrder, "date");
380
+ return /* @__PURE__ */ jsxRuntime.jsx("td", {
381
+ ...getStyles("monthCell"),
382
+ "data-with-spacing": withCellSpacing || void 0,
383
+ children: /* @__PURE__ */ jsxRuntime.jsx(Day, {
384
+ __staticSelector: __staticSelector || "Month",
385
+ classNames: resolvedClassNames,
386
+ styles: resolvedStyles,
387
+ attributes,
388
+ unstyled,
389
+ "data-mantine-stop-propagation": __stopPropagation || void 0,
390
+ highlightToday,
391
+ renderDay,
392
+ date,
393
+ size,
394
+ weekend: ctx.getWeekendDays(weekendDays).includes(dayjs27__default.default(date).get("day")),
395
+ outside,
396
+ hidden: hideOutsideDates ? outside : false,
397
+ "aria-label": ariaLabel,
398
+ static: isStatic,
399
+ fullWidth,
400
+ disabled: excludeDate?.(date) || !isBeforeMaxDate(date, toDateString(maxDate)) || !isAfterMinDate(date, toDateString(minDate)),
401
+ ref: (node) => {
402
+ if (node) __getDayRef?.(rowIndex, cellIndex, node);
403
+ },
404
+ ...dayProps,
405
+ onKeyDown: (event) => {
406
+ dayProps?.onKeyDown?.(event);
407
+ __onDayKeyDown?.(event, {
408
+ rowIndex,
409
+ cellIndex,
410
+ date
411
+ });
412
+ },
413
+ onMouseEnter: (event) => {
414
+ dayProps?.onMouseEnter?.(event);
415
+ __onDayMouseEnter?.(event, date);
416
+ },
417
+ onClick: (event) => {
418
+ dayProps?.onClick?.(event);
419
+ __onDayClick?.(event, date);
420
+ },
421
+ onMouseDown: (event) => {
422
+ dayProps?.onMouseDown?.(event);
423
+ __preventFocus && event.preventDefault();
424
+ },
425
+ tabIndex: __preventFocus || !isDateInTabOrder ? -1 : 0
426
+ })
427
+ }, date.toString());
428
+ });
429
+ return /* @__PURE__ */ jsxRuntime.jsxs("tr", {
430
+ ...getStyles("monthRow"),
431
+ children: [withWeekNumbers && /* @__PURE__ */ jsxRuntime.jsx("td", {
432
+ ...getStyles("weekNumber"),
433
+ children: getWeekNumber(row)
434
+ }), cells]
435
+ }, rowIndex);
436
+ });
437
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkE55VXNLK_cjs.Box, {
438
+ component: "table",
439
+ ...getStyles("month"),
440
+ size,
441
+ "data-full-width": fullWidth || void 0,
442
+ ...others,
443
+ children: [!hideWeekdays && /* @__PURE__ */ jsxRuntime.jsx("thead", {
444
+ ...getStyles("monthThead"),
445
+ children: /* @__PURE__ */ jsxRuntime.jsx(WeekdaysRow, {
446
+ __staticSelector: __staticSelector || "Month",
447
+ locale,
448
+ firstDayOfWeek,
449
+ weekdayFormat,
450
+ withWeekNumbers,
451
+ size,
452
+ classNames: resolvedClassNames,
453
+ styles: resolvedStyles,
454
+ unstyled,
455
+ attributes
456
+ })
457
+ }), /* @__PURE__ */ jsxRuntime.jsx("tbody", {
458
+ ...getStyles("monthTbody"),
459
+ children: rows
460
+ })]
461
+ });
462
+ });
463
+ Month.classes = Month_module_default;
464
+ Month.varsResolver = varsResolver3;
465
+ Month.displayName = "@mantine/dates/Month";
466
+
467
+ // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/components/PickerControl/PickerControl.module.mjs
468
+ var PickerControl_module_default = { "pickerControl": "m_dc6a3c71" };
469
+ var varsResolver4 = chunkE55VXNLK_cjs.createVarsResolver((_, { size }) => ({ pickerControl: {
470
+ "--dpc-fz": chunkE55VXNLK_cjs.getFontSize(size),
471
+ "--dpc-size": chunkE55VXNLK_cjs.getSize(size, "dpc-size")
472
+ } }));
473
+ var PickerControl = chunkE55VXNLK_cjs.factory((_props) => {
474
+ const props = chunkE55VXNLK_cjs.useProps("PickerControl", null, _props);
475
+ const { classNames, className, style, styles, unstyled, vars, firstInRange, lastInRange, inRange, __staticSelector, selected, disabled, fullWidth, attributes, ...others } = props;
476
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkE55VXNLK_cjs.UnstyledButton, {
477
+ ...chunkE55VXNLK_cjs.useStyles({
478
+ name: __staticSelector || "PickerControl",
479
+ classes: PickerControl_module_default,
480
+ props,
481
+ className,
482
+ style,
483
+ classNames,
484
+ styles,
485
+ unstyled,
486
+ attributes,
487
+ vars,
488
+ varsResolver: varsResolver4,
489
+ rootSelector: "pickerControl"
490
+ })("pickerControl"),
491
+ unstyled,
492
+ "data-picker-control": true,
493
+ "data-full-width": fullWidth || void 0,
494
+ "data-selected": selected && !disabled || void 0,
495
+ "data-disabled": disabled || void 0,
496
+ "data-in-range": inRange && !disabled && !selected || void 0,
497
+ "data-first-in-range": firstInRange && !disabled || void 0,
498
+ "data-last-in-range": lastInRange && !disabled || void 0,
499
+ disabled,
500
+ ...others
501
+ });
502
+ });
503
+ PickerControl.classes = PickerControl_module_default;
504
+ PickerControl.varsResolver = varsResolver4;
505
+ PickerControl.displayName = "@mantine/dates/PickerControl";
506
+ function isYearDisabled({ year, minDate, maxDate }) {
507
+ if (!minDate && !maxDate) return false;
508
+ if (minDate && dayjs27__default.default(year).isBefore(minDate, "year")) return true;
509
+ if (maxDate && dayjs27__default.default(year).isAfter(maxDate, "year")) return true;
510
+ return false;
511
+ }
512
+ function getYearInTabOrder({ years, minDate, maxDate, getYearControlProps }) {
513
+ const enabledYears = years.flat().filter((year) => !isYearDisabled({
514
+ year,
515
+ minDate,
516
+ maxDate
517
+ }) && !getYearControlProps?.(year)?.disabled);
518
+ const selectedYear = enabledYears.find((year) => getYearControlProps?.(year)?.selected);
519
+ if (selectedYear) return selectedYear;
520
+ const currentYear = enabledYears.find((year) => dayjs27__default.default().isSame(year, "year"));
521
+ if (currentYear) return currentYear;
522
+ return enabledYears[0];
523
+ }
524
+ function getYearsData(decade) {
525
+ const year = dayjs27__default.default(decade).year();
526
+ const rounded = year - year % 10;
527
+ let currentYearIndex = 0;
528
+ const results = [
529
+ [],
530
+ [],
531
+ [],
532
+ []
533
+ ];
534
+ for (let i = 0; i < 4; i += 1) {
535
+ const max = i === 3 ? 1 : 3;
536
+ for (let j = 0; j < max; j += 1) {
537
+ results[i].push(dayjs27__default.default(new Date(rounded + currentYearIndex, 0)).format("YYYY-MM-DD"));
538
+ currentYearIndex += 1;
539
+ }
540
+ }
541
+ return results;
542
+ }
543
+
544
+ // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/components/YearsList/YearsList.module.mjs
545
+ var YearsList_module_default = {
546
+ "yearsList": "m_9206547b",
547
+ "yearsListCell": "m_c5a19c7d"
548
+ };
549
+ var defaultProps2 = {
550
+ yearsListFormat: "YYYY",
551
+ withCellSpacing: true
552
+ };
553
+ var YearsList = chunkE55VXNLK_cjs.factory((_props) => {
554
+ const props = chunkE55VXNLK_cjs.useProps("YearsList", defaultProps2, _props);
555
+ const { classNames, className, style, styles, unstyled, vars, decade, yearsListFormat, locale, minDate, maxDate, getYearControlProps, __staticSelector, __getControlRef, __onControlKeyDown, __onControlClick, __onControlMouseEnter, __preventFocus, __stopPropagation, withCellSpacing, fullWidth, size, attributes, ...others } = props;
556
+ const getStyles = chunkE55VXNLK_cjs.useStyles({
557
+ name: __staticSelector || "YearsList",
558
+ classes: YearsList_module_default,
559
+ props,
560
+ className,
561
+ style,
562
+ classNames,
563
+ styles,
564
+ unstyled,
565
+ attributes,
566
+ vars,
567
+ rootSelector: "yearsList"
568
+ });
569
+ const ctx = useDatesContext();
570
+ const years = getYearsData(decade);
571
+ const yearInTabOrder = getYearInTabOrder({
572
+ years,
573
+ minDate,
574
+ maxDate,
575
+ getYearControlProps
576
+ });
577
+ const rows = years.map((yearsRow, rowIndex) => {
578
+ const cells = yearsRow.map((year, cellIndex) => {
579
+ const controlProps = getYearControlProps?.(year);
580
+ const isYearInTabOrder = dayjs27__default.default(year).isSame(yearInTabOrder, "year");
581
+ return /* @__PURE__ */ jsxRuntime.jsx("td", {
582
+ ...getStyles("yearsListCell"),
583
+ "data-with-spacing": withCellSpacing || void 0,
584
+ children: /* @__PURE__ */ jsxRuntime.jsx(PickerControl, {
585
+ ...getStyles("yearsListControl"),
586
+ size,
587
+ unstyled,
588
+ fullWidth,
589
+ "data-mantine-stop-propagation": __stopPropagation || void 0,
590
+ disabled: isYearDisabled({
591
+ year,
592
+ minDate,
593
+ maxDate
594
+ }),
595
+ ref: (node) => {
596
+ if (node) __getControlRef?.(rowIndex, cellIndex, node);
597
+ },
598
+ ...controlProps,
599
+ onKeyDown: (event) => {
600
+ controlProps?.onKeyDown?.(event);
601
+ __onControlKeyDown?.(event, {
602
+ rowIndex,
603
+ cellIndex,
604
+ date: year
605
+ });
606
+ },
607
+ onClick: (event) => {
608
+ controlProps?.onClick?.(event);
609
+ __onControlClick?.(event, year);
610
+ },
611
+ onMouseEnter: (event) => {
612
+ controlProps?.onMouseEnter?.(event);
613
+ __onControlMouseEnter?.(event, year);
614
+ },
615
+ onMouseDown: (event) => {
616
+ controlProps?.onMouseDown?.(event);
617
+ __preventFocus && event.preventDefault();
618
+ },
619
+ tabIndex: __preventFocus || !isYearInTabOrder ? -1 : 0,
620
+ children: controlProps?.children ?? dayjs27__default.default(year).locale(ctx.getLocale(locale)).format(yearsListFormat)
621
+ })
622
+ }, cellIndex);
623
+ });
624
+ return /* @__PURE__ */ jsxRuntime.jsx("tr", {
625
+ ...getStyles("yearsListRow"),
626
+ children: cells
627
+ }, rowIndex);
628
+ });
629
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkE55VXNLK_cjs.Box, {
630
+ component: "table",
631
+ size,
632
+ ...getStyles("yearsList"),
633
+ "data-full-width": fullWidth || void 0,
634
+ ...others,
635
+ children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: rows })
636
+ });
637
+ });
638
+ YearsList.classes = YearsList_module_default;
639
+ YearsList.displayName = "@mantine/dates/YearsList";
640
+ function isMonthDisabled({ month, minDate, maxDate }) {
641
+ if (!minDate && !maxDate) return false;
642
+ if (minDate && dayjs27__default.default(month).isBefore(minDate, "month")) return true;
643
+ if (maxDate && dayjs27__default.default(month).isAfter(maxDate, "month")) return true;
644
+ return false;
645
+ }
646
+ function getMonthInTabOrder({ months, minDate, maxDate, getMonthControlProps }) {
647
+ const enabledMonths = months.flat().filter((month) => !isMonthDisabled({
648
+ month,
649
+ minDate,
650
+ maxDate
651
+ }) && !getMonthControlProps?.(month)?.disabled);
652
+ const selectedMonth = enabledMonths.find((month) => getMonthControlProps?.(month)?.selected);
653
+ if (selectedMonth) return selectedMonth;
654
+ const currentMonth = enabledMonths.find((month) => dayjs27__default.default().isSame(month, "month"));
655
+ if (currentMonth) return currentMonth;
656
+ return enabledMonths[0];
657
+ }
658
+ function getMonthsData(year) {
659
+ const startOfYear = dayjs27__default.default(year).startOf("year").toDate();
660
+ const results = [
661
+ [],
662
+ [],
663
+ [],
664
+ []
665
+ ];
666
+ let currentMonthIndex = 0;
667
+ for (let i = 0; i < 4; i += 1) for (let j = 0; j < 3; j += 1) {
668
+ results[i].push(dayjs27__default.default(startOfYear).add(currentMonthIndex, "months").format("YYYY-MM-DD"));
669
+ currentMonthIndex += 1;
670
+ }
671
+ return results;
672
+ }
673
+
674
+ // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/components/MonthsList/MonthsList.module.mjs
675
+ var MonthsList_module_default = {
676
+ "monthsList": "m_2a6c32d",
677
+ "monthsListCell": "m_fe27622f"
678
+ };
679
+ var defaultProps3 = {
680
+ monthsListFormat: "MMM",
681
+ withCellSpacing: true
682
+ };
683
+ var MonthsList = chunkE55VXNLK_cjs.factory((_props) => {
684
+ const props = chunkE55VXNLK_cjs.useProps("MonthsList", defaultProps3, _props);
685
+ const { classNames, className, style, styles, unstyled, vars, __staticSelector, year, monthsListFormat, locale, minDate, maxDate, getMonthControlProps, __getControlRef, __onControlKeyDown, __onControlClick, __onControlMouseEnter, __preventFocus, __stopPropagation, withCellSpacing, fullWidth, size, attributes, ...others } = props;
686
+ const getStyles = chunkE55VXNLK_cjs.useStyles({
687
+ name: __staticSelector || "MonthsList",
688
+ classes: MonthsList_module_default,
689
+ props,
690
+ className,
691
+ style,
692
+ classNames,
693
+ styles,
694
+ unstyled,
695
+ attributes,
696
+ vars,
697
+ rootSelector: "monthsList"
698
+ });
699
+ const ctx = useDatesContext();
700
+ const months = getMonthsData(year);
701
+ const monthInTabOrder = getMonthInTabOrder({
702
+ months,
703
+ minDate: toDateString(minDate),
704
+ maxDate: toDateString(maxDate),
705
+ getMonthControlProps
706
+ });
707
+ const rows = months.map((monthsRow, rowIndex) => {
708
+ const cells = monthsRow.map((month, cellIndex) => {
709
+ const controlProps = getMonthControlProps?.(month);
710
+ const isMonthInTabOrder = dayjs27__default.default(month).isSame(monthInTabOrder, "month");
711
+ return /* @__PURE__ */ jsxRuntime.jsx("td", {
712
+ ...getStyles("monthsListCell"),
713
+ "data-with-spacing": withCellSpacing || void 0,
714
+ children: /* @__PURE__ */ jsxRuntime.jsx(PickerControl, {
715
+ ...getStyles("monthsListControl"),
716
+ size,
717
+ unstyled,
718
+ fullWidth,
719
+ __staticSelector: __staticSelector || "MonthsList",
720
+ "data-mantine-stop-propagation": __stopPropagation || void 0,
721
+ disabled: isMonthDisabled({
722
+ month,
723
+ minDate: toDateString(minDate),
724
+ maxDate: toDateString(maxDate)
725
+ }),
726
+ ref: (node) => {
727
+ if (node) __getControlRef?.(rowIndex, cellIndex, node);
728
+ },
729
+ ...controlProps,
730
+ onKeyDown: (event) => {
731
+ controlProps?.onKeyDown?.(event);
732
+ __onControlKeyDown?.(event, {
733
+ rowIndex,
734
+ cellIndex,
735
+ date: month
736
+ });
737
+ },
738
+ onClick: (event) => {
739
+ controlProps?.onClick?.(event);
740
+ __onControlClick?.(event, month);
741
+ },
742
+ onMouseEnter: (event) => {
743
+ controlProps?.onMouseEnter?.(event);
744
+ __onControlMouseEnter?.(event, month);
745
+ },
746
+ onMouseDown: (event) => {
747
+ controlProps?.onMouseDown?.(event);
748
+ __preventFocus && event.preventDefault();
749
+ },
750
+ tabIndex: __preventFocus || !isMonthInTabOrder ? -1 : 0,
751
+ children: controlProps?.children ?? dayjs27__default.default(month).locale(ctx.getLocale(locale)).format(monthsListFormat)
752
+ })
753
+ }, cellIndex);
754
+ });
755
+ return /* @__PURE__ */ jsxRuntime.jsx("tr", {
756
+ ...getStyles("monthsListRow"),
757
+ children: cells
758
+ }, rowIndex);
759
+ });
760
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkE55VXNLK_cjs.Box, {
761
+ component: "table",
762
+ size,
763
+ ...getStyles("monthsList"),
764
+ "data-full-width": fullWidth || void 0,
765
+ ...others,
766
+ children: /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: rows })
767
+ });
768
+ });
769
+ MonthsList.classes = MonthsList_module_default;
770
+ MonthsList.displayName = "@mantine/dates/MonthsList";
771
+
772
+ // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/components/CalendarHeader/CalendarHeader.module.mjs
773
+ var CalendarHeader_module_default = {
774
+ "calendarHeader": "m_730a79ed",
775
+ "calendarHeaderLevel": "m_f6645d97",
776
+ "calendarHeaderControl": "m_2351eeb0",
777
+ "calendarHeaderControlIcon": "m_367dc749"
778
+ };
779
+ var defaultProps4 = {
780
+ hasNextLevel: true,
781
+ withNext: true,
782
+ withPrevious: true,
783
+ headerControlsOrder: [
784
+ "previous",
785
+ "level",
786
+ "next"
787
+ ]
788
+ };
789
+ var varsResolver5 = chunkE55VXNLK_cjs.createVarsResolver((_, { size }) => ({ calendarHeader: {
790
+ "--dch-control-size": chunkE55VXNLK_cjs.getSize(size, "dch-control-size"),
791
+ "--dch-fz": chunkE55VXNLK_cjs.getFontSize(size)
792
+ } }));
793
+ var CalendarHeader = chunkE55VXNLK_cjs.factory((_props) => {
794
+ const props = chunkE55VXNLK_cjs.useProps("CalendarHeader", defaultProps4, _props);
795
+ const { classNames, className, style, styles, unstyled, vars, nextIcon, previousIcon, nextLabel, previousLabel, onNext, onPrevious, onLevelClick, label, nextDisabled, previousDisabled, hasNextLevel, levelControlAriaLabel, withNext, withPrevious, headerControlsOrder, fullWidth, __staticSelector, __preventFocus, __stopPropagation, attributes, ...others } = props;
796
+ const getStyles = chunkE55VXNLK_cjs.useStyles({
797
+ name: __staticSelector || "CalendarHeader",
798
+ classes: CalendarHeader_module_default,
799
+ props,
800
+ className,
801
+ style,
802
+ classNames,
803
+ styles,
804
+ unstyled,
805
+ attributes,
806
+ vars,
807
+ varsResolver: varsResolver5,
808
+ rootSelector: "calendarHeader"
809
+ });
810
+ const preventFocus = __preventFocus ? (event) => event.preventDefault() : void 0;
811
+ const previousControl = withPrevious && /* @__PURE__ */ react.createElement(chunkE55VXNLK_cjs.UnstyledButton, {
812
+ ...getStyles("calendarHeaderControl"),
813
+ key: "previous",
814
+ "data-direction": "previous",
815
+ "aria-label": previousLabel,
816
+ onClick: onPrevious,
817
+ unstyled,
818
+ onMouseDown: preventFocus,
819
+ disabled: previousDisabled,
820
+ "data-disabled": previousDisabled || void 0,
821
+ tabIndex: __preventFocus || previousDisabled ? -1 : 0,
822
+ "data-mantine-stop-propagation": __stopPropagation || void 0
823
+ }, previousIcon || /* @__PURE__ */ jsxRuntime.jsx(chunkE55VXNLK_cjs.AccordionChevron, {
824
+ ...getStyles("calendarHeaderControlIcon"),
825
+ "data-direction": "previous",
826
+ size: "45%"
827
+ }));
828
+ const levelControl = /* @__PURE__ */ react.createElement(chunkE55VXNLK_cjs.UnstyledButton, {
829
+ component: hasNextLevel ? "button" : "div",
830
+ ...getStyles("calendarHeaderLevel"),
831
+ key: "level",
832
+ onClick: hasNextLevel ? onLevelClick : void 0,
833
+ unstyled,
834
+ onMouseDown: hasNextLevel ? preventFocus : void 0,
835
+ disabled: !hasNextLevel,
836
+ "data-static": !hasNextLevel || void 0,
837
+ "aria-label": levelControlAriaLabel,
838
+ tabIndex: __preventFocus || !hasNextLevel ? -1 : 0,
839
+ "data-mantine-stop-propagation": __stopPropagation || void 0
840
+ }, label);
841
+ const nextControl = withNext && /* @__PURE__ */ react.createElement(chunkE55VXNLK_cjs.UnstyledButton, {
842
+ ...getStyles("calendarHeaderControl"),
843
+ key: "next",
844
+ "data-direction": "next",
845
+ "aria-label": nextLabel,
846
+ onClick: onNext,
847
+ unstyled,
848
+ onMouseDown: preventFocus,
849
+ disabled: nextDisabled,
850
+ "data-disabled": nextDisabled || void 0,
851
+ tabIndex: __preventFocus || nextDisabled ? -1 : 0,
852
+ "data-mantine-stop-propagation": __stopPropagation || void 0
853
+ }, nextIcon || /* @__PURE__ */ jsxRuntime.jsx(chunkE55VXNLK_cjs.AccordionChevron, {
854
+ ...getStyles("calendarHeaderControlIcon"),
855
+ "data-direction": "next",
856
+ size: "45%"
857
+ }));
858
+ const controls = headerControlsOrder.map((control) => {
859
+ if (control === "previous") return previousControl;
860
+ if (control === "level") return levelControl;
861
+ if (control === "next") return nextControl;
862
+ return null;
863
+ });
864
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkE55VXNLK_cjs.Box, {
865
+ ...getStyles("calendarHeader"),
866
+ "data-full-width": fullWidth || void 0,
867
+ ...others,
868
+ children: controls
869
+ });
870
+ });
871
+ CalendarHeader.classes = CalendarHeader_module_default;
872
+ CalendarHeader.varsResolver = varsResolver5;
873
+ CalendarHeader.displayName = "@mantine/dates/CalendarHeader";
874
+
875
+ // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/components/DecadeLevel/get-decade-range/get-decade-range.mjs
876
+ function getDecadeRange(decade) {
877
+ const years = getYearsData(decade);
878
+ return [years[0][0], years[3][0]];
879
+ }
880
+ var defaultProps5 = { decadeLabelFormat: "YYYY" };
881
+ var DecadeLevel = chunkE55VXNLK_cjs.factory((_props) => {
882
+ const { decade, locale, minDate, maxDate, yearsListFormat, getYearControlProps, __getControlRef, __onControlKeyDown, __onControlClick, __onControlMouseEnter, withCellSpacing, __preventFocus, nextIcon, previousIcon, nextLabel, previousLabel, onNext, onPrevious, nextDisabled, previousDisabled, levelControlAriaLabel, withNext, withPrevious, headerControlsOrder, decadeLabelFormat, classNames, styles, unstyled, __staticSelector, __stopPropagation, size, fullWidth, attributes, ...others } = chunkE55VXNLK_cjs.useProps("DecadeLevel", defaultProps5, _props);
883
+ const ctx = useDatesContext();
884
+ const [startOfDecade, endOfDecade] = getDecadeRange(decade);
885
+ const stylesApiProps = {
886
+ __staticSelector: __staticSelector || "DecadeLevel",
887
+ classNames,
888
+ styles,
889
+ unstyled,
890
+ size,
891
+ attributes
892
+ };
893
+ const _nextDisabled = typeof nextDisabled === "boolean" ? nextDisabled : maxDate ? !dayjs27__default.default(endOfDecade).endOf("year").isBefore(maxDate) : false;
894
+ const _previousDisabled = typeof previousDisabled === "boolean" ? previousDisabled : minDate ? !dayjs27__default.default(startOfDecade).startOf("year").isAfter(minDate) : false;
895
+ const formatDecade = (date, format) => dayjs27__default.default(date).locale(locale || ctx.locale).format(format);
896
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkE55VXNLK_cjs.Box, {
897
+ "data-decade-level": true,
898
+ size,
899
+ ...others,
900
+ children: [/* @__PURE__ */ jsxRuntime.jsx(CalendarHeader, {
901
+ label: typeof decadeLabelFormat === "function" ? decadeLabelFormat(startOfDecade, endOfDecade) : `${formatDecade(startOfDecade, decadeLabelFormat)} \u2013 ${formatDecade(endOfDecade, decadeLabelFormat)}`,
902
+ __preventFocus,
903
+ __stopPropagation,
904
+ nextIcon,
905
+ previousIcon,
906
+ nextLabel,
907
+ previousLabel,
908
+ onNext,
909
+ onPrevious,
910
+ nextDisabled: _nextDisabled,
911
+ previousDisabled: _previousDisabled,
912
+ hasNextLevel: false,
913
+ levelControlAriaLabel,
914
+ withNext,
915
+ withPrevious,
916
+ headerControlsOrder,
917
+ fullWidth,
918
+ ...stylesApiProps
919
+ }), /* @__PURE__ */ jsxRuntime.jsx(YearsList, {
920
+ decade,
921
+ locale,
922
+ minDate,
923
+ maxDate,
924
+ yearsListFormat,
925
+ getYearControlProps,
926
+ __getControlRef,
927
+ __onControlKeyDown,
928
+ __onControlClick,
929
+ __onControlMouseEnter,
930
+ __preventFocus,
931
+ __stopPropagation,
932
+ withCellSpacing,
933
+ fullWidth,
934
+ ...stylesApiProps
935
+ })]
936
+ });
937
+ });
938
+ DecadeLevel.classes = {
939
+ ...YearsList.classes,
940
+ ...CalendarHeader.classes
941
+ };
942
+ DecadeLevel.displayName = "@mantine/dates/DecadeLevel";
943
+ var defaultProps6 = { yearLabelFormat: "YYYY" };
944
+ var YearLevel = chunkE55VXNLK_cjs.factory((_props) => {
945
+ const { year, locale, minDate, maxDate, monthsListFormat, getMonthControlProps, __getControlRef, __onControlKeyDown, __onControlClick, __onControlMouseEnter, withCellSpacing, __preventFocus, nextIcon, previousIcon, nextLabel, previousLabel, onNext, onPrevious, onLevelClick, nextDisabled, previousDisabled, hasNextLevel, levelControlAriaLabel, withNext, withPrevious, headerControlsOrder, yearLabelFormat, __staticSelector, __stopPropagation, size, classNames, styles, unstyled, fullWidth, attributes, ...others } = chunkE55VXNLK_cjs.useProps("YearLevel", defaultProps6, _props);
946
+ const ctx = useDatesContext();
947
+ const stylesApiProps = {
948
+ __staticSelector: __staticSelector || "YearLevel",
949
+ classNames,
950
+ styles,
951
+ unstyled,
952
+ size,
953
+ attributes
954
+ };
955
+ const _nextDisabled = typeof nextDisabled === "boolean" ? nextDisabled : maxDate ? !dayjs27__default.default(year).endOf("year").isBefore(maxDate) : false;
956
+ const _previousDisabled = typeof previousDisabled === "boolean" ? previousDisabled : minDate ? !dayjs27__default.default(year).startOf("year").isAfter(minDate) : false;
957
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkE55VXNLK_cjs.Box, {
958
+ "data-year-level": true,
959
+ size,
960
+ ...others,
961
+ children: [/* @__PURE__ */ jsxRuntime.jsx(CalendarHeader, {
962
+ label: typeof yearLabelFormat === "function" ? yearLabelFormat(year) : dayjs27__default.default(year).locale(locale || ctx.locale).format(yearLabelFormat),
963
+ __preventFocus,
964
+ __stopPropagation,
965
+ nextIcon,
966
+ previousIcon,
967
+ nextLabel,
968
+ previousLabel,
969
+ onNext,
970
+ onPrevious,
971
+ onLevelClick,
972
+ nextDisabled: _nextDisabled,
973
+ previousDisabled: _previousDisabled,
974
+ hasNextLevel,
975
+ levelControlAriaLabel,
976
+ withNext,
977
+ withPrevious,
978
+ headerControlsOrder,
979
+ fullWidth,
980
+ ...stylesApiProps
981
+ }), /* @__PURE__ */ jsxRuntime.jsx(MonthsList, {
982
+ year,
983
+ locale,
984
+ minDate,
985
+ maxDate,
986
+ monthsListFormat,
987
+ getMonthControlProps,
988
+ __getControlRef,
989
+ __onControlKeyDown,
990
+ __onControlClick,
991
+ __onControlMouseEnter,
992
+ __preventFocus,
993
+ __stopPropagation,
994
+ withCellSpacing,
995
+ fullWidth,
996
+ ...stylesApiProps
997
+ })]
998
+ });
999
+ });
1000
+ YearLevel.classes = {
1001
+ ...CalendarHeader.classes,
1002
+ ...MonthsList.classes
1003
+ };
1004
+ YearLevel.displayName = "@mantine/dates/YearLevel";
1005
+ var defaultProps7 = { monthLabelFormat: "MMMM YYYY" };
1006
+ var MonthLevel = chunkE55VXNLK_cjs.factory((_props) => {
1007
+ const { month, locale, firstDayOfWeek, weekdayFormat, weekendDays, getDayProps, excludeDate, minDate, maxDate, renderDay, hideOutsideDates, hideWeekdays, getDayAriaLabel, __getDayRef, __onDayKeyDown, __onDayClick, __onDayMouseEnter, withCellSpacing, highlightToday, withWeekNumbers, __preventFocus, __stopPropagation, nextIcon, previousIcon, nextLabel, previousLabel, onNext, onPrevious, onLevelClick, nextDisabled, previousDisabled, hasNextLevel, levelControlAriaLabel, withNext, withPrevious, headerControlsOrder, monthLabelFormat, classNames, styles, unstyled, __staticSelector, size, static: isStatic, fullWidth, attributes, ...others } = chunkE55VXNLK_cjs.useProps("MonthLevel", defaultProps7, _props);
1008
+ const ctx = useDatesContext();
1009
+ const stylesApiProps = {
1010
+ __staticSelector: __staticSelector || "MonthLevel",
1011
+ classNames,
1012
+ styles,
1013
+ unstyled,
1014
+ size,
1015
+ attributes
1016
+ };
1017
+ const _nextDisabled = typeof nextDisabled === "boolean" ? nextDisabled : maxDate ? !dayjs27__default.default(month).endOf("month").isBefore(maxDate) : false;
1018
+ const _previousDisabled = typeof previousDisabled === "boolean" ? previousDisabled : minDate ? !dayjs27__default.default(month).startOf("month").isAfter(minDate) : false;
1019
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkE55VXNLK_cjs.Box, {
1020
+ "data-month-level": true,
1021
+ size,
1022
+ ...others,
1023
+ children: [/* @__PURE__ */ jsxRuntime.jsx(CalendarHeader, {
1024
+ label: typeof monthLabelFormat === "function" ? monthLabelFormat(month) : dayjs27__default.default(month).locale(locale || ctx.locale).format(monthLabelFormat),
1025
+ __preventFocus,
1026
+ __stopPropagation,
1027
+ nextIcon,
1028
+ previousIcon,
1029
+ nextLabel,
1030
+ previousLabel,
1031
+ onNext,
1032
+ onPrevious,
1033
+ onLevelClick,
1034
+ nextDisabled: _nextDisabled,
1035
+ previousDisabled: _previousDisabled,
1036
+ hasNextLevel,
1037
+ levelControlAriaLabel,
1038
+ withNext,
1039
+ withPrevious,
1040
+ headerControlsOrder,
1041
+ fullWidth,
1042
+ ...stylesApiProps
1043
+ }), /* @__PURE__ */ jsxRuntime.jsx(Month, {
1044
+ month,
1045
+ locale,
1046
+ firstDayOfWeek,
1047
+ weekdayFormat,
1048
+ weekendDays,
1049
+ getDayProps,
1050
+ excludeDate,
1051
+ minDate,
1052
+ maxDate,
1053
+ renderDay,
1054
+ hideOutsideDates,
1055
+ hideWeekdays,
1056
+ getDayAriaLabel,
1057
+ __getDayRef,
1058
+ __onDayKeyDown,
1059
+ __onDayClick,
1060
+ __onDayMouseEnter,
1061
+ __preventFocus,
1062
+ __stopPropagation,
1063
+ static: isStatic,
1064
+ withCellSpacing,
1065
+ highlightToday,
1066
+ withWeekNumbers,
1067
+ fullWidth,
1068
+ ...stylesApiProps
1069
+ })]
1070
+ });
1071
+ });
1072
+ MonthLevel.classes = {
1073
+ ...Month.classes,
1074
+ ...CalendarHeader.classes
1075
+ };
1076
+ MonthLevel.displayName = "@mantine/dates/MonthLevel";
1077
+
1078
+ // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/components/LevelsGroup/LevelsGroup.module.mjs
1079
+ var LevelsGroup_module_default = { "levelsGroup": "m_30b26e33" };
1080
+ var LevelsGroup = chunkE55VXNLK_cjs.factory((_props) => {
1081
+ const props = chunkE55VXNLK_cjs.useProps("LevelsGroup", null, _props);
1082
+ const { classNames, className, style, styles, unstyled, vars, __staticSelector, fullWidth, attributes, ...others } = props;
1083
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkE55VXNLK_cjs.Box, {
1084
+ ...chunkE55VXNLK_cjs.useStyles({
1085
+ name: __staticSelector || "LevelsGroup",
1086
+ classes: LevelsGroup_module_default,
1087
+ props,
1088
+ className,
1089
+ style,
1090
+ classNames,
1091
+ styles,
1092
+ unstyled,
1093
+ attributes,
1094
+ vars,
1095
+ rootSelector: "levelsGroup"
1096
+ })("levelsGroup"),
1097
+ "data-full-width": fullWidth || void 0,
1098
+ ...others
1099
+ });
1100
+ });
1101
+ LevelsGroup.classes = LevelsGroup_module_default;
1102
+ LevelsGroup.displayName = "@mantine/dates/LevelsGroup";
1103
+ var defaultProps8 = { numberOfColumns: 1 };
1104
+ var DecadeLevelGroup = chunkE55VXNLK_cjs.factory((_props) => {
1105
+ const { decade, locale, minDate, maxDate, yearsListFormat, getYearControlProps, __onControlClick, __onControlMouseEnter, withCellSpacing, __preventFocus, nextIcon, previousIcon, nextLabel, previousLabel, onNext, onPrevious, nextDisabled, previousDisabled, headerControlsOrder, classNames, styles, unstyled, __staticSelector, __stopPropagation, numberOfColumns, levelControlAriaLabel, decadeLabelFormat, size, fullWidth, vars, attributes, ...others } = chunkE55VXNLK_cjs.useProps("DecadeLevelGroup", defaultProps8, _props);
1106
+ const controlsRef = react.useRef([]);
1107
+ const decades = Array(numberOfColumns).fill(0).map((_, decadeIndex) => {
1108
+ const currentDecade = dayjs27__default.default(decade).add(decadeIndex * 10, "years").format("YYYY-MM-DD");
1109
+ return /* @__PURE__ */ jsxRuntime.jsx(DecadeLevel, {
1110
+ size,
1111
+ yearsListFormat,
1112
+ decade: currentDecade,
1113
+ withNext: decadeIndex === numberOfColumns - 1,
1114
+ withPrevious: decadeIndex === 0,
1115
+ decadeLabelFormat,
1116
+ __onControlClick,
1117
+ __onControlMouseEnter,
1118
+ __onControlKeyDown: (event, payload) => handleControlKeyDown({
1119
+ levelIndex: decadeIndex,
1120
+ rowIndex: payload.rowIndex,
1121
+ cellIndex: payload.cellIndex,
1122
+ event,
1123
+ controlsRef
1124
+ }),
1125
+ __getControlRef: (rowIndex, cellIndex, node) => {
1126
+ if (!Array.isArray(controlsRef.current[decadeIndex])) controlsRef.current[decadeIndex] = [];
1127
+ if (!Array.isArray(controlsRef.current[decadeIndex][rowIndex])) controlsRef.current[decadeIndex][rowIndex] = [];
1128
+ controlsRef.current[decadeIndex][rowIndex][cellIndex] = node;
1129
+ },
1130
+ levelControlAriaLabel: typeof levelControlAriaLabel === "function" ? levelControlAriaLabel(currentDecade) : levelControlAriaLabel,
1131
+ locale,
1132
+ minDate,
1133
+ maxDate,
1134
+ __preventFocus,
1135
+ __stopPropagation,
1136
+ nextIcon,
1137
+ previousIcon,
1138
+ nextLabel,
1139
+ previousLabel,
1140
+ onNext,
1141
+ onPrevious,
1142
+ nextDisabled,
1143
+ previousDisabled,
1144
+ getYearControlProps,
1145
+ __staticSelector: __staticSelector || "DecadeLevelGroup",
1146
+ classNames,
1147
+ styles,
1148
+ unstyled,
1149
+ withCellSpacing,
1150
+ headerControlsOrder,
1151
+ fullWidth,
1152
+ attributes
1153
+ }, decadeIndex);
1154
+ });
1155
+ return /* @__PURE__ */ jsxRuntime.jsx(LevelsGroup, {
1156
+ classNames,
1157
+ styles,
1158
+ __staticSelector: __staticSelector || "DecadeLevelGroup",
1159
+ size,
1160
+ unstyled,
1161
+ fullWidth,
1162
+ attributes,
1163
+ ...others,
1164
+ children: decades
1165
+ });
1166
+ });
1167
+ DecadeLevelGroup.classes = {
1168
+ ...LevelsGroup.classes,
1169
+ ...DecadeLevel.classes
1170
+ };
1171
+ DecadeLevelGroup.displayName = "@mantine/dates/DecadeLevelGroup";
1172
+ var defaultProps9 = { numberOfColumns: 1 };
1173
+ var YearLevelGroup = chunkE55VXNLK_cjs.factory((_props) => {
1174
+ const { year, locale, minDate, maxDate, monthsListFormat, getMonthControlProps, __onControlClick, __onControlMouseEnter, withCellSpacing, __preventFocus, nextIcon, previousIcon, nextLabel, previousLabel, onNext, onPrevious, onLevelClick, nextDisabled, previousDisabled, hasNextLevel, headerControlsOrder, classNames, styles, unstyled, __staticSelector, __stopPropagation, numberOfColumns, levelControlAriaLabel, yearLabelFormat, size, fullWidth, vars, attributes, ...others } = chunkE55VXNLK_cjs.useProps("YearLevelGroup", defaultProps9, _props);
1175
+ const controlsRef = react.useRef([]);
1176
+ const years = Array(numberOfColumns).fill(0).map((_, yearIndex) => {
1177
+ const currentYear = dayjs27__default.default(year).add(yearIndex, "years").format("YYYY-MM-DD");
1178
+ return /* @__PURE__ */ jsxRuntime.jsx(YearLevel, {
1179
+ size,
1180
+ monthsListFormat,
1181
+ year: currentYear,
1182
+ withNext: yearIndex === numberOfColumns - 1,
1183
+ withPrevious: yearIndex === 0,
1184
+ yearLabelFormat,
1185
+ __stopPropagation,
1186
+ __onControlClick,
1187
+ __onControlMouseEnter,
1188
+ __onControlKeyDown: (event, payload) => handleControlKeyDown({
1189
+ levelIndex: yearIndex,
1190
+ rowIndex: payload.rowIndex,
1191
+ cellIndex: payload.cellIndex,
1192
+ event,
1193
+ controlsRef
1194
+ }),
1195
+ __getControlRef: (rowIndex, cellIndex, node) => {
1196
+ if (!Array.isArray(controlsRef.current[yearIndex])) controlsRef.current[yearIndex] = [];
1197
+ if (!Array.isArray(controlsRef.current[yearIndex][rowIndex])) controlsRef.current[yearIndex][rowIndex] = [];
1198
+ controlsRef.current[yearIndex][rowIndex][cellIndex] = node;
1199
+ },
1200
+ levelControlAriaLabel: typeof levelControlAriaLabel === "function" ? levelControlAriaLabel(currentYear) : levelControlAriaLabel,
1201
+ locale,
1202
+ minDate,
1203
+ maxDate,
1204
+ __preventFocus,
1205
+ nextIcon,
1206
+ previousIcon,
1207
+ nextLabel,
1208
+ previousLabel,
1209
+ onNext,
1210
+ onPrevious,
1211
+ onLevelClick,
1212
+ nextDisabled,
1213
+ previousDisabled,
1214
+ hasNextLevel,
1215
+ getMonthControlProps,
1216
+ classNames,
1217
+ styles,
1218
+ unstyled,
1219
+ __staticSelector: __staticSelector || "YearLevelGroup",
1220
+ withCellSpacing,
1221
+ headerControlsOrder,
1222
+ fullWidth,
1223
+ attributes
1224
+ }, yearIndex);
1225
+ });
1226
+ return /* @__PURE__ */ jsxRuntime.jsx(LevelsGroup, {
1227
+ classNames,
1228
+ styles,
1229
+ __staticSelector: __staticSelector || "YearLevelGroup",
1230
+ size,
1231
+ unstyled,
1232
+ fullWidth,
1233
+ attributes,
1234
+ ...others,
1235
+ children: years
1236
+ });
1237
+ });
1238
+ YearLevelGroup.classes = {
1239
+ ...YearLevel.classes,
1240
+ ...LevelsGroup.classes
1241
+ };
1242
+ YearLevelGroup.displayName = "@mantine/dates/YearLevelGroup";
1243
+ var defaultProps10 = { numberOfColumns: 1 };
1244
+ var MonthLevelGroup = chunkE55VXNLK_cjs.factory((_props) => {
1245
+ const { month, locale, firstDayOfWeek, weekdayFormat, weekendDays, getDayProps, excludeDate, minDate, maxDate, renderDay, hideOutsideDates, hideWeekdays, getDayAriaLabel, __onDayClick, __onDayMouseEnter, withCellSpacing, highlightToday, withWeekNumbers, __preventFocus, nextIcon, previousIcon, nextLabel, previousLabel, onNext, onPrevious, onLevelClick, nextDisabled, previousDisabled, hasNextLevel, headerControlsOrder, classNames, styles, unstyled, numberOfColumns, levelControlAriaLabel, monthLabelFormat, __staticSelector, __stopPropagation, size, static: isStatic, fullWidth, vars, attributes, ...others } = chunkE55VXNLK_cjs.useProps("MonthLevelGroup", defaultProps10, _props);
1246
+ const daysRefs = react.useRef([]);
1247
+ const months = Array(numberOfColumns).fill(0).map((_, monthIndex) => {
1248
+ const currentMonth = dayjs27__default.default(month).add(monthIndex, "months").format("YYYY-MM-DD");
1249
+ return /* @__PURE__ */ jsxRuntime.jsx(MonthLevel, {
1250
+ month: currentMonth,
1251
+ withNext: monthIndex === numberOfColumns - 1,
1252
+ withPrevious: monthIndex === 0,
1253
+ monthLabelFormat,
1254
+ __stopPropagation,
1255
+ __onDayClick,
1256
+ __onDayMouseEnter,
1257
+ __onDayKeyDown: (event, payload) => handleControlKeyDown({
1258
+ levelIndex: monthIndex,
1259
+ rowIndex: payload.rowIndex,
1260
+ cellIndex: payload.cellIndex,
1261
+ event,
1262
+ controlsRef: daysRefs
1263
+ }),
1264
+ __getDayRef: (rowIndex, cellIndex, node) => {
1265
+ if (!Array.isArray(daysRefs.current[monthIndex])) daysRefs.current[monthIndex] = [];
1266
+ if (!Array.isArray(daysRefs.current[monthIndex][rowIndex])) daysRefs.current[monthIndex][rowIndex] = [];
1267
+ daysRefs.current[monthIndex][rowIndex][cellIndex] = node;
1268
+ },
1269
+ levelControlAriaLabel: typeof levelControlAriaLabel === "function" ? levelControlAriaLabel(currentMonth) : levelControlAriaLabel,
1270
+ locale,
1271
+ firstDayOfWeek,
1272
+ weekdayFormat,
1273
+ weekendDays,
1274
+ getDayProps,
1275
+ excludeDate,
1276
+ minDate,
1277
+ maxDate,
1278
+ renderDay,
1279
+ hideOutsideDates,
1280
+ hideWeekdays,
1281
+ getDayAriaLabel,
1282
+ __preventFocus,
1283
+ nextIcon,
1284
+ previousIcon,
1285
+ nextLabel,
1286
+ previousLabel,
1287
+ onNext,
1288
+ onPrevious,
1289
+ onLevelClick,
1290
+ nextDisabled,
1291
+ previousDisabled,
1292
+ hasNextLevel,
1293
+ classNames,
1294
+ styles,
1295
+ unstyled,
1296
+ __staticSelector: __staticSelector || "MonthLevelGroup",
1297
+ size,
1298
+ static: isStatic,
1299
+ withCellSpacing,
1300
+ highlightToday,
1301
+ withWeekNumbers,
1302
+ headerControlsOrder,
1303
+ fullWidth,
1304
+ attributes
1305
+ }, monthIndex);
1306
+ });
1307
+ return /* @__PURE__ */ jsxRuntime.jsx(LevelsGroup, {
1308
+ classNames,
1309
+ styles,
1310
+ __staticSelector: __staticSelector || "MonthLevelGroup",
1311
+ size,
1312
+ fullWidth,
1313
+ attributes,
1314
+ ...others,
1315
+ children: months
1316
+ });
1317
+ });
1318
+ MonthLevelGroup.classes = {
1319
+ ...LevelsGroup.classes,
1320
+ ...MonthLevel.classes
1321
+ };
1322
+ MonthLevelGroup.displayName = "@mantine/dates/MonthLevelGroup";
1323
+ var getEmptyValue = (type) => type === "range" ? [null, null] : type === "multiple" ? [] : null;
1324
+ var convertDatesValue = (value, withTime) => {
1325
+ const converter = withTime ? toDateTimeString : toDateString;
1326
+ return Array.isArray(value) ? value.map(converter) : converter(value);
1327
+ };
1328
+ function useUncontrolledDates({ type, value, defaultValue, onChange, withTime = false }) {
1329
+ const storedType = react.useRef(type);
1330
+ const [_value, _setValue, controlled] = chunkE55VXNLK_cjs.useUncontrolled({
1331
+ value: convertDatesValue(value, withTime),
1332
+ defaultValue: convertDatesValue(defaultValue, withTime),
1333
+ finalValue: getEmptyValue(type),
1334
+ onChange
1335
+ });
1336
+ let _finalValue = _value;
1337
+ if (storedType.current !== type) {
1338
+ storedType.current = type;
1339
+ if (value === void 0) {
1340
+ _finalValue = defaultValue !== void 0 ? defaultValue : getEmptyValue(type);
1341
+ _setValue(_finalValue);
1342
+ }
1343
+ }
1344
+ return [
1345
+ _finalValue,
1346
+ _setValue,
1347
+ controlled
1348
+ ];
1349
+ }
1350
+
1351
+ // ../../node_modules/.bun/@mantine+dates@9.0.0+7c0e6e23d8f8fc3c/node_modules/@mantine/dates/esm/components/Calendar/clamp-level/clamp-level.mjs
1352
+ function levelToNumber(level, fallback) {
1353
+ if (!level) return fallback || 0;
1354
+ return level === "month" ? 0 : level === "year" ? 1 : 2;
1355
+ }
1356
+ function levelNumberToLevel(levelNumber) {
1357
+ return levelNumber === 0 ? "month" : levelNumber === 1 ? "year" : "decade";
1358
+ }
1359
+ function clampLevel(level, minLevel, maxLevel) {
1360
+ return levelNumberToLevel(chunkE55VXNLK_cjs.clamp(levelToNumber(level, 0), levelToNumber(minLevel, 0), levelToNumber(maxLevel, 2)));
1361
+ }
1362
+ var defaultProps11 = {
1363
+ maxLevel: "decade",
1364
+ minLevel: "month",
1365
+ __updateDateOnYearSelect: true,
1366
+ __updateDateOnMonthSelect: true,
1367
+ enableKeyboardNavigation: true
1368
+ };
1369
+ var Calendar = chunkE55VXNLK_cjs.factory((_props) => {
1370
+ const props = chunkE55VXNLK_cjs.useProps("Calendar", defaultProps11, _props);
1371
+ const { vars, maxLevel, minLevel, defaultLevel, level, onLevelChange, date, defaultDate, onDateChange, numberOfColumns, columnsToScroll, ariaLabels, nextLabel, previousLabel, onYearSelect, onMonthSelect, onYearMouseEnter, onMonthMouseEnter, headerControlsOrder, __updateDateOnYearSelect, __updateDateOnMonthSelect, __setDateRef, __setLevelRef, firstDayOfWeek, weekdayFormat, weekendDays, getDayProps, excludeDate, renderDay, hideOutsideDates, hideWeekdays, getDayAriaLabel, monthLabelFormat, nextIcon, previousIcon, __onDayClick, __onDayMouseEnter, withCellSpacing, highlightToday, withWeekNumbers, monthsListFormat, getMonthControlProps, yearLabelFormat, yearsListFormat, getYearControlProps, decadeLabelFormat, classNames, styles, unstyled, minDate, maxDate, locale, __staticSelector, size, __preventFocus, __stopPropagation, onNextDecade, onPreviousDecade, onNextYear, onPreviousYear, onNextMonth, onPreviousMonth, static: isStatic, enableKeyboardNavigation, fullWidth, attributes, ref, ...others } = props;
1372
+ const { resolvedClassNames, resolvedStyles } = chunkE55VXNLK_cjs.useResolvedStylesApi({
1373
+ classNames,
1374
+ styles,
1375
+ props
1376
+ });
1377
+ const [_level, setLevel] = chunkE55VXNLK_cjs.useUncontrolled({
1378
+ value: level ? clampLevel(level, minLevel, maxLevel) : void 0,
1379
+ defaultValue: defaultLevel ? clampLevel(defaultLevel, minLevel, maxLevel) : void 0,
1380
+ finalValue: clampLevel(void 0, minLevel, maxLevel),
1381
+ onChange: onLevelChange
1382
+ });
1383
+ const [_date, setDate] = useUncontrolledDates({
1384
+ type: "default",
1385
+ value: toDateString(date),
1386
+ defaultValue: toDateString(defaultDate),
1387
+ onChange: onDateChange
1388
+ });
1389
+ react.useImperativeHandle(__setDateRef, () => (date2) => {
1390
+ setDate(date2);
1391
+ });
1392
+ react.useImperativeHandle(__setLevelRef, () => (level2) => {
1393
+ setLevel(level2);
1394
+ });
1395
+ const stylesApiProps = {
1396
+ __staticSelector: __staticSelector || "Calendar",
1397
+ styles: resolvedStyles,
1398
+ classNames: resolvedClassNames,
1399
+ unstyled,
1400
+ size,
1401
+ attributes
1402
+ };
1403
+ const _columnsToScroll = columnsToScroll || numberOfColumns || 1;
1404
+ const fallbackDateRef = react.useRef(null);
1405
+ if (fallbackDateRef.current === null) {
1406
+ const now = /* @__PURE__ */ new Date();
1407
+ fallbackDateRef.current = minDate && dayjs27__default.default(now).isAfter(minDate) ? minDate : dayjs27__default.default(now).format("YYYY-MM-DD");
1408
+ }
1409
+ const currentDate = _date || fallbackDateRef.current;
1410
+ const handleNextMonth = () => {
1411
+ const nextDate = dayjs27__default.default(currentDate).add(_columnsToScroll, "month").format("YYYY-MM-DD");
1412
+ onNextMonth?.(nextDate);
1413
+ setDate(nextDate);
1414
+ };
1415
+ const handlePreviousMonth = () => {
1416
+ const nextDate = dayjs27__default.default(currentDate).subtract(_columnsToScroll, "month").format("YYYY-MM-DD");
1417
+ onPreviousMonth?.(nextDate);
1418
+ setDate(nextDate);
1419
+ };
1420
+ const handleNextYear = () => {
1421
+ const nextDate = dayjs27__default.default(currentDate).add(_columnsToScroll, "year").format("YYYY-MM-DD");
1422
+ onNextYear?.(nextDate);
1423
+ setDate(nextDate);
1424
+ };
1425
+ const handlePreviousYear = () => {
1426
+ const nextDate = dayjs27__default.default(currentDate).subtract(_columnsToScroll, "year").format("YYYY-MM-DD");
1427
+ onPreviousYear?.(nextDate);
1428
+ setDate(nextDate);
1429
+ };
1430
+ const handleNextDecade = () => {
1431
+ const nextDate = dayjs27__default.default(currentDate).add(10 * _columnsToScroll, "year").format("YYYY-MM-DD");
1432
+ onNextDecade?.(nextDate);
1433
+ setDate(nextDate);
1434
+ };
1435
+ const handlePreviousDecade = () => {
1436
+ const nextDate = dayjs27__default.default(currentDate).subtract(10 * _columnsToScroll, "year").format("YYYY-MM-DD");
1437
+ onPreviousDecade?.(nextDate);
1438
+ setDate(nextDate);
1439
+ };
1440
+ const calendarRef = react.useRef(null);
1441
+ react.useEffect(() => {
1442
+ if (!enableKeyboardNavigation || isStatic) return;
1443
+ const handleKeyDown = (event) => {
1444
+ if (!calendarRef.current?.contains(document.activeElement)) return;
1445
+ const isCtrlOrCmd = event.ctrlKey || event.metaKey;
1446
+ const isShift = event.shiftKey;
1447
+ switch (event.key) {
1448
+ case "ArrowUp":
1449
+ if (isCtrlOrCmd && isShift) {
1450
+ event.preventDefault();
1451
+ handlePreviousDecade();
1452
+ } else if (isCtrlOrCmd) {
1453
+ event.preventDefault();
1454
+ handlePreviousYear();
1455
+ }
1456
+ break;
1457
+ case "ArrowDown":
1458
+ if (isCtrlOrCmd && isShift) {
1459
+ event.preventDefault();
1460
+ handleNextDecade();
1461
+ } else if (isCtrlOrCmd) {
1462
+ event.preventDefault();
1463
+ handleNextYear();
1464
+ }
1465
+ break;
1466
+ case "y":
1467
+ case "Y":
1468
+ if (_level === "month") {
1469
+ event.preventDefault();
1470
+ setLevel("year");
1471
+ }
1472
+ break;
1473
+ }
1474
+ };
1475
+ document.addEventListener("keydown", handleKeyDown);
1476
+ return () => {
1477
+ document.removeEventListener("keydown", handleKeyDown);
1478
+ };
1479
+ }, [
1480
+ enableKeyboardNavigation,
1481
+ isStatic,
1482
+ _level,
1483
+ handleNextYear,
1484
+ handlePreviousYear,
1485
+ handleNextDecade,
1486
+ handlePreviousDecade
1487
+ ]);
1488
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkE55VXNLK_cjs.Box, {
1489
+ ref: chunkE55VXNLK_cjs.useMergedRef(calendarRef, ref),
1490
+ size,
1491
+ "data-calendar": true,
1492
+ "data-full-width": fullWidth || void 0,
1493
+ ...others,
1494
+ children: [
1495
+ _level === "month" && /* @__PURE__ */ jsxRuntime.jsx(MonthLevelGroup, {
1496
+ month: currentDate,
1497
+ minDate,
1498
+ maxDate,
1499
+ firstDayOfWeek,
1500
+ weekdayFormat,
1501
+ weekendDays,
1502
+ getDayProps,
1503
+ excludeDate,
1504
+ renderDay,
1505
+ hideOutsideDates,
1506
+ hideWeekdays,
1507
+ getDayAriaLabel,
1508
+ onNext: handleNextMonth,
1509
+ onPrevious: handlePreviousMonth,
1510
+ hasNextLevel: maxLevel !== "month",
1511
+ onLevelClick: () => setLevel("year"),
1512
+ numberOfColumns,
1513
+ locale,
1514
+ levelControlAriaLabel: ariaLabels?.monthLevelControl,
1515
+ nextLabel: ariaLabels?.nextMonth ?? nextLabel,
1516
+ nextIcon,
1517
+ previousLabel: ariaLabels?.previousMonth ?? previousLabel,
1518
+ previousIcon,
1519
+ monthLabelFormat,
1520
+ __onDayClick,
1521
+ __onDayMouseEnter,
1522
+ __preventFocus,
1523
+ __stopPropagation,
1524
+ static: isStatic,
1525
+ withCellSpacing,
1526
+ highlightToday,
1527
+ withWeekNumbers,
1528
+ headerControlsOrder,
1529
+ fullWidth,
1530
+ ...stylesApiProps
1531
+ }),
1532
+ _level === "year" && /* @__PURE__ */ jsxRuntime.jsx(YearLevelGroup, {
1533
+ year: currentDate,
1534
+ numberOfColumns,
1535
+ minDate,
1536
+ maxDate,
1537
+ monthsListFormat,
1538
+ getMonthControlProps,
1539
+ locale,
1540
+ onNext: handleNextYear,
1541
+ onPrevious: handlePreviousYear,
1542
+ hasNextLevel: maxLevel !== "month" && maxLevel !== "year",
1543
+ onLevelClick: () => setLevel("decade"),
1544
+ levelControlAriaLabel: ariaLabels?.yearLevelControl,
1545
+ nextLabel: ariaLabels?.nextYear ?? nextLabel,
1546
+ nextIcon,
1547
+ previousLabel: ariaLabels?.previousYear ?? previousLabel,
1548
+ previousIcon,
1549
+ yearLabelFormat,
1550
+ __onControlMouseEnter: onMonthMouseEnter,
1551
+ __onControlClick: (_event, payload) => {
1552
+ __updateDateOnMonthSelect && setDate(payload);
1553
+ setLevel(clampLevel("month", minLevel, maxLevel));
1554
+ onMonthSelect?.(payload);
1555
+ },
1556
+ __preventFocus,
1557
+ __stopPropagation,
1558
+ withCellSpacing,
1559
+ headerControlsOrder,
1560
+ fullWidth,
1561
+ ...stylesApiProps
1562
+ }),
1563
+ _level === "decade" && /* @__PURE__ */ jsxRuntime.jsx(DecadeLevelGroup, {
1564
+ decade: currentDate,
1565
+ minDate,
1566
+ maxDate,
1567
+ yearsListFormat,
1568
+ getYearControlProps,
1569
+ locale,
1570
+ onNext: handleNextDecade,
1571
+ onPrevious: handlePreviousDecade,
1572
+ numberOfColumns,
1573
+ nextLabel: ariaLabels?.nextDecade ?? nextLabel,
1574
+ nextIcon,
1575
+ previousLabel: ariaLabels?.previousDecade ?? previousLabel,
1576
+ previousIcon,
1577
+ decadeLabelFormat,
1578
+ __onControlMouseEnter: onYearMouseEnter,
1579
+ __onControlClick: (_event, payload) => {
1580
+ __updateDateOnYearSelect && setDate(payload);
1581
+ setLevel(clampLevel("year", minLevel, maxLevel));
1582
+ onYearSelect?.(payload);
1583
+ },
1584
+ __preventFocus,
1585
+ __stopPropagation,
1586
+ withCellSpacing,
1587
+ headerControlsOrder,
1588
+ fullWidth,
1589
+ ...stylesApiProps
1590
+ })
1591
+ ]
1592
+ });
1593
+ });
1594
+ Calendar.classes = {
1595
+ ...DecadeLevelGroup.classes,
1596
+ ...YearLevelGroup.classes,
1597
+ ...MonthLevelGroup.classes
1598
+ };
1599
+ Calendar.displayName = "@mantine/dates/Calendar";
1600
+
1601
+ // src/components/Apps/CalendarApp/CalendarApp.module.css
1602
+ var CalendarApp_default = {};
1603
+ var CalendarApp = () => {
1604
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: CalendarApp_default.root, children: /* @__PURE__ */ jsxRuntime.jsx(Calendar, {}) });
1605
+ };
1606
+ var CalendarApp_default2 = CalendarApp;
1607
+
1608
+ exports.CalendarApp_default = CalendarApp_default2;