@slotted/react 0.1.0-beta.0 → 0.1.0-beta.2

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 (91) hide show
  1. package/README.md +4 -0
  2. package/dist/{action-sheet-D8Glxl7l.js → action-sheet-DgwzC3iY.js} +1 -1
  3. package/dist/action-sheet.js +1 -1
  4. package/dist/{chart-BNzfIfQe.js → chart-Gb_P3Kdq.js} +344 -333
  5. package/dist/chart.js +1 -1
  6. package/dist/{column-manager-CNZ7Xk5_.js → column-manager-B7_a_jDK.js} +1 -1
  7. package/dist/column-manager.js +1 -1
  8. package/dist/{combobox-C46GRqAA.js → combobox-C66dNlMR.js} +176 -172
  9. package/dist/combobox.js +1 -1
  10. package/dist/dashboard-grid-CKdyO4j6.js +1043 -0
  11. package/dist/dashboard-grid.js +1 -1
  12. package/dist/{data-grid-BUgOJuGp.js → data-grid-rWMDNl-6.js} +2 -2
  13. package/dist/data-grid.js +1 -1
  14. package/dist/docs/AGENTS.snippet.md +10 -0
  15. package/dist/docs/event-calendar.json +7 -0
  16. package/dist/docs/event-calendar.md +1 -0
  17. package/dist/docs/guidelines/README.md +27 -0
  18. package/dist/docs/guidelines/async-feedback.md +108 -0
  19. package/dist/docs/guidelines/browsing.md +74 -0
  20. package/dist/docs/guidelines/builders.md +97 -0
  21. package/dist/docs/guidelines/composition.md +129 -0
  22. package/dist/docs/guidelines/conversations.md +59 -0
  23. package/dist/docs/guidelines/errors-and-conflicts.md +71 -0
  24. package/dist/docs/guidelines/forms.md +192 -0
  25. package/dist/docs/guidelines/index.md +121 -0
  26. package/dist/docs/guidelines/layout-alignment.md +95 -0
  27. package/dist/docs/guidelines/ledgers.md +45 -0
  28. package/dist/docs/guidelines/list-pages.md +165 -0
  29. package/dist/docs/guidelines/overviews.md +66 -0
  30. package/dist/docs/guidelines/own-elements.md +115 -0
  31. package/dist/docs/guidelines/reading-permissions.md +55 -0
  32. package/dist/docs/guidelines/record-pages.md +178 -0
  33. package/dist/docs/guidelines/reports.md +123 -0
  34. package/dist/docs/guidelines/shell-composition.md +94 -0
  35. package/dist/docs/guidelines/workspaces.md +46 -0
  36. package/dist/docs/index.md +12 -0
  37. package/dist/docs/progress-indicator.json +1 -2
  38. package/dist/docs/progress-indicator.md +2 -2
  39. package/dist/docs/skills/build-own-element/SKILL.md +90 -0
  40. package/dist/docs/skills/compose-screen/SKILL.md +76 -0
  41. package/dist/docs/skills/index.md +9 -0
  42. package/dist/docs/skills/review-screen/SKILL.md +70 -0
  43. package/dist/docs/skills/theme-app/SKILL.md +74 -0
  44. package/dist/docs/skills/waiting-states/SKILL.md +139 -0
  45. package/dist/docs/stat-card.json +1 -0
  46. package/dist/docs/stat-card.md +1 -1
  47. package/dist/docs/tabs.json +1 -4
  48. package/dist/docs/tabs.md +1 -1
  49. package/dist/docs/tokens.md +424 -0
  50. package/dist/{drawer-Ci3wuCVa.js → drawer-Dtospdqk.js} +1 -1
  51. package/dist/drawer.js +1 -1
  52. package/dist/{entity-picker-UGhbVwkC.js → entity-picker-Dm-y0RNE.js} +1 -1
  53. package/dist/entity-picker.js +1 -1
  54. package/dist/{event-calendar-BFdeGfC-.js → event-calendar-DYjVwTI6.js} +387 -386
  55. package/dist/event-calendar.js +1 -1
  56. package/dist/{filter-bar-b2Q9BZHf.js → filter-bar-Bh7cbqDE.js} +3 -3
  57. package/dist/filter-bar.js +1 -1
  58. package/dist/{import-export-center-D8xbCLWs.js → import-export-center-CkZ_Ar9w.js} +1 -1
  59. package/dist/import-export-center.js +1 -1
  60. package/dist/index.js +14 -14
  61. package/dist/{multi-select-CfzsvAeI.js → multi-select-B-tuIwAu.js} +226 -231
  62. package/dist/multi-select.js +1 -1
  63. package/dist/{select-UTwKjheK.js → select-hRFp8nCj.js} +128 -141
  64. package/dist/select.js +1 -1
  65. package/dist/styles.css +1 -1
  66. package/dist/{table-CzBIw9ng.js → table-Bd79IwDC.js} +1 -1
  67. package/dist/table.js +1 -1
  68. package/dist/types/chart/chart.d.ts.map +1 -1
  69. package/dist/types/combobox/combobox-collection.d.ts +1 -0
  70. package/dist/types/combobox/combobox-collection.d.ts.map +1 -1
  71. package/dist/types/combobox/combobox-parts.d.ts.map +1 -1
  72. package/dist/types/combobox/combobox.d.ts.map +1 -1
  73. package/dist/types/dashboard-grid/dashboard-grid.d.ts.map +1 -1
  74. package/dist/types/dashboard-grid/dashboard-widget.d.ts +1 -1
  75. package/dist/types/dashboard-grid/dashboard-widget.d.ts.map +1 -1
  76. package/dist/types/drawer/drawer-parts.d.ts.map +1 -1
  77. package/dist/types/event-calendar/event-calendar.d.ts +1 -1
  78. package/dist/types/event-calendar/event-calendar.d.ts.map +1 -1
  79. package/dist/types/event-calendar/event-calendar.types.d.ts +6 -0
  80. package/dist/types/event-calendar/event-calendar.types.d.ts.map +1 -1
  81. package/dist/types/menu/menu.types.d.ts +3 -1
  82. package/dist/types/menu/menu.types.d.ts.map +1 -1
  83. package/dist/types/multi-select/multi-select-collection.d.ts +0 -2
  84. package/dist/types/multi-select/multi-select-collection.d.ts.map +1 -1
  85. package/dist/types/multi-select/multi-select-parts.d.ts.map +1 -1
  86. package/dist/types/multi-select/multi-select.d.ts.map +1 -1
  87. package/dist/types/select/select-collection.d.ts +0 -2
  88. package/dist/types/select/select-collection.d.ts.map +1 -1
  89. package/dist/types/select/select.d.ts.map +1 -1
  90. package/package.json +6 -6
  91. package/dist/dashboard-grid-nfhEewA4.js +0 -1005
@@ -1,29 +1,29 @@
1
1
  import { n as e, t } from "./icon-T9Yt4tnm.js";
2
2
  import { _ as n, n as r, r as i, t as a } from "./menu-parts-BQej6eU9.js";
3
3
  import { n as o, r as s } from "./i18n-DpW8lqJ1.js";
4
- import { a as c, c as l, n as u, o as d, r as f, s as p, t as m, u as h } from "./drawer-Ci3wuCVa.js";
4
+ import { a as c, c as l, n as u, o as d, r as f, s as p, t as m, u as h } from "./drawer-Dtospdqk.js";
5
5
  import { n as g } from "./progress-indicator-DwvUSFFs.js";
6
6
  /* empty css */
7
7
  import { a as _, c as v, f as ee, i as te, l as ne, o as re, p as ie, r as ae, u as oe } from "./popover-DE22lSpV.js";
8
8
  import { n as se, r as y, t as ce } from "./context-menu-DMiHdggw.js";
9
9
  import { a as le, t as ue } from "./segmented-control-Cy_5D3Nj.js";
10
- import { createContext as de, createElement as fe, useCallback as b, useContext as pe, useEffect as x, useId as me, useImperativeHandle as he, useLayoutEffect as ge, useMemo as _e, useRef as S, useState as C } from "react";
10
+ import { createContext as de, createElement as fe, useCallback as b, useContext as pe, useEffect as me, useId as he, useImperativeHandle as ge, useLayoutEffect as _e, useMemo as x, useRef as S, useState as C } from "react";
11
11
  import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
12
12
  import { eventCalendarMessages as ve } from "@slotted/core/i18n";
13
13
  import { COMPACT_BELOW as ye, createWidthGate as be } from "@slotted/core/measure";
14
14
  import { getLiveAnnouncer as xe } from "@slotted/core/live-announcer";
15
15
  import { addDays as Se, compareDate as Ce, compareDateTime as we, createDateFormat as Te, daysBetween as Ee, isPlainDateTime as D, isSameDate as O, isoWeekNumber as De, nowDateTimeIn as Oe, plainDateTime as ke, secondsOfDay as Ae, timeOfSeconds as je, toISODate as k, todayIn as Me } from "@slotted/core/date";
16
- import { calendarColor as Ne, contextSlot as Pe, formatHour as Fe, formatOccurrence as Ie, formatTime as A, formatTimeRange as Le, isMultiDay as Re, isWorkingDay as ze, layoutColumn as Be, layoutRow as Ve, listDayParts as He, listDays as Ue, moveDate as We, movePlacement as Ge, nextAllowedPlacement as Ke, occurrenceTimes as qe, occurrenceWhen as Je, occurrencesIn as Ye, occurrencesOn as Xe, offHoursOn as Ze, offsetChangeOn as Qe, overflowByDay as $e, placeOccurrence as et, placementOf as tt, resizePlacement as nt, slotMinutes as rt, stepView as it, viewRange as at, viewTitle as ot, withPlacement as st, zoneLabel as j } from "@slotted/core/event-calendar";
16
+ import { calendarColor as Ne, contextSlot as Pe, formatHour as Fe, formatOccurrence as Ie, formatTime as Le, formatTimeRange as Re, isMultiDay as ze, isWorkingDay as Be, layoutColumn as Ve, layoutRow as He, listDayParts as Ue, listDays as We, moveDate as Ge, movePlacement as Ke, nextAllowedPlacement as qe, occurrenceTimes as Je, occurrenceWhen as Ye, occurrencesIn as Xe, occurrencesOn as Ze, offHoursOn as Qe, offsetChangeOn as $e, overflowByDay as et, placeOccurrence as tt, placementOf as nt, resizePlacement as rt, slotMinutes as it, stepView as at, viewRange as ot, viewTitle as st, withPlacement as ct, zoneLabel as lt } from "@slotted/core/event-calendar";
17
17
  //#region src/event-calendar/event-calendar-context.ts
18
- var ct = de(null);
19
- function lt() {
20
- let e = pe(ct);
18
+ var ut = de(null);
19
+ function A() {
20
+ let e = pe(ut);
21
21
  if (e === null) throw Error("An event calendar part has to be inside EventCalendar.");
22
22
  return e;
23
23
  }
24
24
  //#endregion
25
25
  //#region src/event-calendar/event-calendar-defaults.tsx
26
- var ut = {
26
+ var dt = {
27
27
  compact: "list",
28
28
  dayHours: [0, 24],
29
29
  firstDayOfWeek: void 0,
@@ -43,29 +43,29 @@ var ut = {
43
43
  timeZone: void 0,
44
44
  weekends: "shown",
45
45
  weekNumbers: !1
46
- }, dt = de(ut);
47
- function ft() {
48
- return pe(dt);
46
+ }, ft = de(dt);
47
+ function pt() {
48
+ return pe(ft);
49
49
  }
50
- function pt({ children: e, ...t }) {
51
- let n = { ...ft() };
50
+ function mt({ children: e, ...t }) {
51
+ let n = { ...pt() };
52
52
  for (let [e, r] of Object.entries(t)) r !== void 0 && (n[e] = r);
53
- return /* @__PURE__ */ T(dt.Provider, {
53
+ return /* @__PURE__ */ T(ft.Provider, {
54
54
  value: n,
55
55
  children: e
56
56
  });
57
57
  }
58
58
  //#endregion
59
59
  //#region src/event-calendar/event-calendar-event.tsx
60
- function mt(e, t, n) {
60
+ function ht(e, t, n) {
61
61
  if (t.allDay) return e.t("allDay");
62
62
  let r = {
63
63
  locale: e.locale,
64
64
  hourCycle: e.hourCycle
65
- }, { start: i, end: a } = qe(t, n);
66
- return i !== null && a !== null ? Le(i, a, r) : i === null ? a === null ? e.t("allDay") : e.t("until", { time: A(a, r) }) : e.t("from", { time: A(i, r) });
65
+ }, { start: i, end: a } = Je(t, n);
66
+ return i !== null && a !== null ? Re(i, a, r) : i === null ? a === null ? e.t("allDay") : e.t("until", { time: Le(a, r) }) : e.t("from", { time: Le(i, r) });
67
67
  }
68
- function ht(e, t, n) {
68
+ function gt(e, t, n) {
69
69
  let r = [
70
70
  Ie(t, {
71
71
  locale: e.locale,
@@ -80,11 +80,11 @@ function ht(e, t, n) {
80
80
  ].filter((e) => e !== void 0 && e !== "");
81
81
  return `, ${new Intl.ListFormat(e.locale, { type: "unit" }).format(r)}`;
82
82
  }
83
- function gt({ clippedEnd: n, clippedStart: r, continuesAfter: i, continuesBefore: a, date: o, inGrid: s, layout: c, occurrence: l, short: u, style: d, withLocation: f }) {
84
- let p = lt(), { event: m } = l, h = l.key, g = p.openKey === h, _ = p.colorOf(m.calendar), v = c === "bar", ee = b((e) => p.registerEvent(h, e), [h, p.registerEvent]), te = c !== "bar" || !l.allDay, ne = c === "lane" || v && !l.allDay ? A(l.start.time, {
83
+ function _t({ clippedEnd: n, clippedStart: r, continuesAfter: i, continuesBefore: a, date: o, inGrid: s, layout: c, occurrence: l, short: u, style: d, withLocation: f }) {
84
+ let p = A(), { event: m } = l, h = l.key, g = p.openKey === h, _ = p.colorOf(m.calendar), v = c === "bar", ee = b((e) => p.registerEvent(h, e), [h, p.registerEvent]), te = c !== "bar" || !l.allDay, ne = c === "lane" || v && !l.allDay ? Le(l.start.time, {
85
85
  locale: p.locale,
86
86
  hourCycle: p.hourCycle
87
- }) : mt(p, l, o), re = /* @__PURE__ */ E(w, { children: [
87
+ }) : ht(p, l, o), re = /* @__PURE__ */ E(w, { children: [
88
88
  te && !(v && l.allDay) ? /* @__PURE__ */ T("span", {
89
89
  "data-part": "event-time",
90
90
  children: ne
@@ -130,7 +130,7 @@ function gt({ clippedEnd: n, clippedStart: r, continuesAfter: i, continuesBefore
130
130
  ie,
131
131
  /* @__PURE__ */ T("span", {
132
132
  "data-part": "event-meta",
133
- children: ht(p, l, a === !0)
133
+ children: gt(p, l, a === !0)
134
134
  }),
135
135
  c === "bar" && i === !0 ? y("end") : null,
136
136
  se ? /* @__PURE__ */ T("span", {
@@ -159,8 +159,8 @@ function gt({ clippedEnd: n, clippedStart: r, continuesAfter: i, continuesBefore
159
159
  }
160
160
  //#endregion
161
161
  //#region src/event-calendar/event-calendar-list.tsx
162
- function _t({ days: e, empty: t, emptyText: n, occurrences: r }) {
163
- let i = lt(), a = Ue(r, e), o = `h${Math.min(6, i.headingLevel + 1)}`;
162
+ function vt({ days: e, empty: t, emptyText: n, occurrences: r }) {
163
+ let i = A(), a = We(r, e), o = `h${Math.min(6, i.headingLevel + 1)}`;
164
164
  return a.length === 0 ? /* @__PURE__ */ T("div", {
165
165
  "data-part": "list",
166
166
  children: /* @__PURE__ */ E("div", {
@@ -170,7 +170,7 @@ function _t({ days: e, empty: t, emptyText: n, occurrences: r }) {
170
170
  }) : /* @__PURE__ */ T("div", {
171
171
  "data-part": "list",
172
172
  children: a.map((e) => {
173
- let t = k(e.date), n = `${i.id}-list-${t}`, r = He(e.date, i.locale);
173
+ let t = k(e.date), n = `${i.id}-list-${t}`, r = Ue(e.date, i.locale);
174
174
  return /* @__PURE__ */ E("section", {
175
175
  "aria-labelledby": n,
176
176
  "data-date": t,
@@ -193,7 +193,7 @@ function _t({ days: e, empty: t, emptyText: n, occurrences: r }) {
193
193
  ] })), /* @__PURE__ */ T("ul", {
194
194
  "data-part": "list-events",
195
195
  role: "list",
196
- children: e.occurrences.map((t) => /* @__PURE__ */ T("li", { children: /* @__PURE__ */ T(gt, {
196
+ children: e.occurrences.map((t) => /* @__PURE__ */ T("li", { children: /* @__PURE__ */ T(_t, {
197
197
  date: e.date,
198
198
  inGrid: !1,
199
199
  layout: "list",
@@ -207,18 +207,18 @@ function _t({ days: e, empty: t, emptyText: n, occurrences: r }) {
207
207
  }
208
208
  //#endregion
209
209
  //#region src/event-calendar/event-calendar-month.tsx
210
- function vt(e, t, n) {
210
+ function yt(e, t, n) {
211
211
  if (e === null || D(e.start) || !n) return !1;
212
212
  let { start: r, end: i } = e;
213
213
  return Ce(t, r) >= 0 && Ce(t, i) <= 0;
214
214
  }
215
- function yt(e, t, n) {
215
+ function bt(e, t, n) {
216
216
  return new Intl.DateTimeFormat(e.locale, {
217
217
  timeZone: "UTC",
218
218
  weekday: n
219
219
  }).format(new Date(Date.UTC(t.year, t.month - 1, t.day)));
220
220
  }
221
- function M(e, t) {
221
+ function j(e, t) {
222
222
  return new Intl.DateTimeFormat(e.locale, {
223
223
  timeZone: "UTC",
224
224
  weekday: "long",
@@ -226,8 +226,8 @@ function M(e, t) {
226
226
  day: "numeric"
227
227
  }).format(new Date(Date.UTC(t.year, t.month - 1, t.day)));
228
228
  }
229
- function bt({ anchorMonth: e, occurrences: t, titleId: n, weeks: r }) {
230
- let i = lt(), a = r[0] ?? [], o = i.pendingSelection ?? i.selection;
229
+ function xt({ anchorMonth: e, occurrences: t, titleId: n, weeks: r }) {
230
+ let i = A(), a = r[0] ?? [], o = i.pendingSelection ?? i.selection;
231
231
  return /* @__PURE__ */ E("table", {
232
232
  "aria-labelledby": n,
233
233
  "data-part": "month",
@@ -242,13 +242,13 @@ function bt({ anchorMonth: e, occurrences: t, titleId: n, weeks: r }) {
242
242
  children: i.t("weekNumber")
243
243
  })
244
244
  }) : null, a.map((e) => /* @__PURE__ */ T("th", {
245
- abbr: yt(i, e, "long"),
245
+ abbr: bt(i, e, "long"),
246
246
  "data-part": "weekday",
247
247
  scope: "col",
248
- children: yt(i, e, "short")
248
+ children: bt(i, e, "short")
249
249
  }, k(e)))]
250
250
  }) }), /* @__PURE__ */ T("tbody", { children: r.map((n) => {
251
- let { segments: r } = Ve(t, n, {}), a = $e(r, n.length, i.maxEvents), s = n[0];
251
+ let { segments: r } = He(t, n, {}), a = et(r, n.length, i.maxEvents), s = n[0];
252
252
  return /* @__PURE__ */ E("tr", {
253
253
  "data-part": "week",
254
254
  style: { "--slotted-event-calendar-lanes": i.maxEvents },
@@ -257,12 +257,12 @@ function bt({ anchorMonth: e, occurrences: t, titleId: n, weeks: r }) {
257
257
  scope: "row",
258
258
  children: De(s)
259
259
  }) : null, n.map((n, s) => {
260
- let c = k(n), l = `${i.id}-day-${c}`, u = `${l}-count`, d = r.filter((e) => e.start === s && e.lane < i.maxEvents), f = r.filter((e) => e.start < s && e.start + e.span > s && e.lane < i.maxEvents), p = Xe(t, n).length, m = vt(o, n, !0), h = i.renderDayContent?.(n, { view: "month" }), g = a[s] ?? 0;
260
+ let c = k(n), l = `${i.id}-day-${c}`, u = `${l}-count`, d = r.filter((e) => e.start === s && e.lane < i.maxEvents), f = r.filter((e) => e.start < s && e.start + e.span > s && e.lane < i.maxEvents), p = Ze(t, n).length, m = yt(o, n, !0), h = i.renderDayContent?.(n, { view: "month" }), g = a[s] ?? 0;
261
261
  return /* @__PURE__ */ E("td", {
262
262
  "aria-labelledby": `${l} ${u}`,
263
263
  "aria-selected": i.selectionMode === "range" ? m : void 0,
264
264
  "data-date": c,
265
- "data-non-working": ze(n, i.workingHours) ? void 0 : "",
265
+ "data-non-working": Be(n, i.workingHours) ? void 0 : "",
266
266
  "data-outside-month": n.month === e ? void 0 : "",
267
267
  "data-part": "day",
268
268
  "data-row": "day",
@@ -274,7 +274,7 @@ function bt({ anchorMonth: e, occurrences: t, titleId: n, weeks: r }) {
274
274
  "data-part": "day-header",
275
275
  children: [
276
276
  /* @__PURE__ */ T("button", {
277
- "aria-label": M(i, n),
277
+ "aria-label": j(i, n),
278
278
  "aria-haspopup": i.narrow ? "dialog" : void 0,
279
279
  "data-part": "day-number",
280
280
  id: l,
@@ -297,8 +297,8 @@ function bt({ anchorMonth: e, occurrences: t, titleId: n, weeks: r }) {
297
297
  "data-part": "day-events",
298
298
  children: [
299
299
  d.map((e) => {
300
- let t = e.occurrence.allDay || Re(e.occurrence);
301
- return /* @__PURE__ */ T(gt, {
300
+ let t = e.occurrence.allDay || ze(e.occurrence);
301
+ return /* @__PURE__ */ T(_t, {
302
302
  continuesAfter: e.continuesAfter,
303
303
  continuesBefore: e.continuesBefore,
304
304
  date: n,
@@ -335,17 +335,17 @@ function bt({ anchorMonth: e, occurrences: t, titleId: n, weeks: r }) {
335
335
  }
336
336
  //#endregion
337
337
  //#region src/event-calendar/event-calendar-time-grid.tsx
338
- var xt = 64, St = 45, Ct = 20, N = (e) => Ae(e.time) / 60;
339
- function wt(e, t) {
338
+ var St = 64, Ct = 45, wt = 20, M = (e) => Ae(e.time) / 60;
339
+ function Tt(e, t) {
340
340
  return {
341
341
  direction: e.minutes > 0 ? "forward" : "back",
342
342
  hours: Math.abs(e.minutes) / 60,
343
- at: A(e.at, t)
343
+ at: Le(e.at, t)
344
344
  };
345
345
  }
346
- function Tt({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
347
- let i = lt(), [a, o] = i.dayHours, s = S(null), [c, l] = C(null);
348
- ge(() => {
346
+ function Et({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
347
+ let i = A(), [a, o] = i.dayHours, s = S(null), [c, l] = C(null);
348
+ _e(() => {
349
349
  let e = s.current?.querySelector("[data-part='column']");
350
350
  if (e == null || typeof ResizeObserver > "u") return;
351
351
  let t = () => l(e.getBoundingClientRect().width || null);
@@ -353,9 +353,9 @@ function Tt({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
353
353
  let n = new ResizeObserver(t);
354
354
  return n.observe(e), () => n.disconnect();
355
355
  }, [e.length]);
356
- let u = c === null ? i.maxColumns : Math.max(1, Math.min(i.maxColumns, Math.floor(c / xt))), d = b((e) => {
356
+ let u = c === null ? i.maxColumns : Math.max(1, Math.min(i.maxColumns, Math.floor(c / St))), d = b((e) => {
357
357
  s.current = e, typeof n == "function" ? n(e) : n != null && (n.current = e);
358
- }, [n]), { segments: f, lanes: p } = Ve(t, e, { allDayOnly: !0 }), m = i.pendingSelection ?? i.selection, h = {
358
+ }, [n]), { segments: f, lanes: p } = He(t, e, { allDayOnly: !0 }), m = i.pendingSelection ?? i.selection, h = {
359
359
  locale: i.locale,
360
360
  hourCycle: i.hourCycle
361
361
  }, g = e[0], _ = (e) => O(e, i.date), v = (e) => i.today !== null && O(e, i.today), ee = Array.from({ length: Math.max(0, o - a) }, (e, t) => a + t);
@@ -376,9 +376,9 @@ function Tt({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
376
376
  children: [/* @__PURE__ */ T("div", {
377
377
  "data-part": "zone",
378
378
  role: "columnheader",
379
- children: j(g, i.timeZone, i.locale)
379
+ children: lt(g, i.timeZone, i.locale)
380
380
  }), e.map((e) => {
381
- let t = Qe(e, i.timeZone), n = i.renderDayContent?.(e, { view: i.view });
381
+ let t = $e(e, i.timeZone), n = i.renderDayContent?.(e, { view: i.view });
382
382
  return /* @__PURE__ */ E("div", {
383
383
  "data-date": k(e),
384
384
  "data-offset-change": t === null ? void 0 : "",
@@ -397,7 +397,7 @@ function Tt({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
397
397
  }).format(new Date(Date.UTC(e.year, e.month - 1, e.day)))
398
398
  }),
399
399
  /* @__PURE__ */ T("button", {
400
- "aria-label": M(i, e),
400
+ "aria-label": j(i, e),
401
401
  "data-part": "day-number",
402
402
  onClick: (t) => i.drill(e, t.detail === 0 ? "keyboard" : "pointer", t),
403
403
  tabIndex: -1,
@@ -409,10 +409,10 @@ function Tt({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
409
409
  children: n
410
410
  }),
411
411
  t === null ? null : /* @__PURE__ */ T("span", {
412
- "aria-label": i.t("offsetChange", wt(t, h)),
412
+ "aria-label": i.t("offsetChange", Tt(t, h)),
413
413
  "data-part": "offset-change",
414
414
  role: "note",
415
- children: i.t("offsetChangeShort", wt(t, h))
415
+ children: i.t("offsetChangeShort", Tt(t, h))
416
416
  })
417
417
  ]
418
418
  }, k(e));
@@ -426,18 +426,18 @@ function Tt({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
426
426
  role: "rowheader",
427
427
  children: i.t("allDay")
428
428
  }), e.map((e, t) => {
429
- let n = f.filter((e) => e.start === t), r = f.filter((e) => e.start < t && e.start + e.span > t), a = vt(m, e, !0);
429
+ let n = f.filter((e) => e.start === t), r = f.filter((e) => e.start < t && e.start + e.span > t), a = yt(m, e, !0);
430
430
  return /* @__PURE__ */ E("div", {
431
431
  "aria-selected": i.selectionMode === "range" ? a : void 0,
432
432
  "data-date": k(e),
433
- "data-non-working": ze(e, i.workingHours) ? void 0 : "",
433
+ "data-non-working": Be(e, i.workingHours) ? void 0 : "",
434
434
  "data-part": "all-day-cell",
435
435
  "data-row": "all-day",
436
436
  "data-selected": a ? "" : void 0,
437
437
  "data-today": v(e) ? "" : void 0,
438
438
  role: "gridcell",
439
439
  tabIndex: i.row === "all-day" && _(e) ? 0 : -1,
440
- children: [n.map((t) => /* @__PURE__ */ T(gt, {
440
+ children: [n.map((t) => /* @__PURE__ */ T(_t, {
441
441
  continuesAfter: t.continuesAfter,
442
442
  continuesBefore: t.continuesBefore,
443
443
  date: e,
@@ -474,22 +474,22 @@ function Tt({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
474
474
  children: Fe(e, h)
475
475
  }, e))]
476
476
  }), e.map((e) => {
477
- let { items: n, more: r } = Be(t, e, {
477
+ let { items: n, more: r } = Ve(t, e, {
478
478
  startHour: a,
479
479
  endHour: o,
480
480
  maxColumns: u,
481
- minLength: Ct
482
- }), s = Qe(e, i.timeZone), c = i.now !== null && O(i.now.date, e) ? N(i.now) : null, l = m !== null && D(m.start) && O(m.start.date, e) ? m : null;
481
+ minLength: wt
482
+ }), s = $e(e, i.timeZone), c = i.now !== null && O(i.now.date, e) ? M(i.now) : null, l = m !== null && D(m.start) && O(m.start.date, e) ? m : null;
483
483
  return /* @__PURE__ */ E("div", {
484
484
  "data-date": k(e),
485
- "data-non-working": ze(e, i.workingHours) ? void 0 : "",
485
+ "data-non-working": Be(e, i.workingHours) ? void 0 : "",
486
486
  "data-part": "column",
487
487
  "data-row": "timed",
488
488
  "data-today": v(e) ? "" : void 0,
489
489
  role: "gridcell",
490
490
  tabIndex: i.row === "timed" && _(e) ? 0 : -1,
491
491
  children: [
492
- Ze(e, i.workingHours, {
492
+ Qe(e, i.workingHours, {
493
493
  startHour: a,
494
494
  endHour: o
495
495
  }).map((e) => /* @__PURE__ */ T("div", {
@@ -509,12 +509,12 @@ function Tt({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
509
509
  "aria-hidden": "true",
510
510
  "data-part": "selection",
511
511
  style: {
512
- "--slotted-event-start": N(l.start) - a * 60,
513
- "--slotted-event-length": (O(l.end.date, e) ? N(l.end) : 1440) - N(l.start)
512
+ "--slotted-event-start": M(l.start) - a * 60,
513
+ "--slotted-event-length": (O(l.end.date, e) ? M(l.end) : 1440) - M(l.start)
514
514
  },
515
- children: Le(l.start.time, l.end.time, h)
515
+ children: Re(l.start.time, l.end.time, h)
516
516
  }),
517
- n.map((t) => /* @__PURE__ */ T(gt, {
517
+ n.map((t) => /* @__PURE__ */ T(_t, {
518
518
  clippedEnd: t.clippedEnd,
519
519
  clippedStart: t.clippedStart,
520
520
  continuesAfter: t.continuesAfter,
@@ -523,7 +523,7 @@ function Tt({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
523
523
  inGrid: !0,
524
524
  layout: "block",
525
525
  occurrence: t.occurrence,
526
- short: t.length < St,
526
+ short: t.length < Ct,
527
527
  style: {
528
528
  "--slotted-event-start": t.start,
529
529
  "--slotted-event-length": t.length,
@@ -531,7 +531,7 @@ function Tt({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
531
531
  "--slotted-event-columns": t.columns,
532
532
  "--slotted-event-span": t.span
533
533
  },
534
- withLocation: t.length >= St
534
+ withLocation: t.length >= Ct
535
535
  }, t.occurrence.key)),
536
536
  r.map((t) => /* @__PURE__ */ E("button", {
537
537
  "aria-expanded": i.moreDate === k(e),
@@ -565,13 +565,13 @@ function Tt({ days: e, occurrences: t, scrollerRef: n, titleId: r }) {
565
565
  }
566
566
  //#endregion
567
567
  //#region src/event-calendar/event-calendar.tsx
568
- var Et = [
568
+ var Dt = [
569
569
  "month",
570
570
  "week",
571
571
  "day",
572
572
  "list"
573
- ], Dt = "[data-part='day-number'], [data-part='event'], [data-part='more']", Ot = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]);
574
- function kt(e, t, n, r) {
573
+ ], Ot = "[data-part='day-number'], [data-part='event'], [data-part='more']", kt = (e, t) => e.length === t.length && e.every((e, n) => e === t[n]);
574
+ function At(e, t, n, r) {
575
575
  for (let i of e?.querySelectorAll(`[data-row='${t}'][data-date]`) ?? []) {
576
576
  let e = i.getBoundingClientRect();
577
577
  if (n >= e.left && n < e.right && (t !== "day" || r >= e.top && r < e.bottom)) {
@@ -585,17 +585,17 @@ function kt(e, t, n, r) {
585
585
  }
586
586
  return null;
587
587
  }
588
- function At(e, t) {
588
+ function jt(e, t) {
589
589
  return e === null || t === null ? e === t : D(e.start) === D(t.start) ? D(e.start) ? we(e.start, t.start) === 0 && we(e.end, t.end) === 0 : Ce(e.start, t.start) === 0 && Ce(e.end, t.end) === 0 : !1;
590
590
  }
591
- var jt = (e, t) => Ce(e, t) <= 0 ? {
591
+ var Mt = (e, t) => Ce(e, t) <= 0 ? {
592
592
  start: e,
593
593
  end: t
594
594
  } : {
595
595
  start: t,
596
596
  end: e
597
- }, P = (e, t) => t >= 1440 ? ke(Se(e, 1), je(0)) : ke(e, je(Math.max(0, t) * 60));
598
- function Mt(e, t, n, r, i, a) {
597
+ }, N = (e, t) => t >= 1440 ? ke(Se(e, 1), je(0)) : ke(e, je(Math.max(0, t) * 60));
598
+ function Nt(e, t, n, r, i, a) {
599
599
  if (n(e, t)) return !1;
600
600
  let o = !1;
601
601
  return a?.(t, {
@@ -611,7 +611,7 @@ function Mt(e, t, n, r, i, a) {
611
611
  }
612
612
  }), !o;
613
613
  }
614
- function Nt({ when: e }) {
614
+ function Pt({ when: e }) {
615
615
  return /* @__PURE__ */ E(w, { children: [e.day === null ? null : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E("span", {
616
616
  "data-part": "detail-day",
617
617
  children: [e.day, ","]
@@ -620,188 +620,189 @@ function Nt({ when: e }) {
620
620
  children: e.range
621
621
  })] });
622
622
  }
623
- function Pt({ handle: e }) {
623
+ function Ft({ handle: e }) {
624
624
  return e.current = y(), null;
625
625
  }
626
- function Ft({ element: e }) {
626
+ function It({ element: e }) {
627
627
  let t = ie();
628
- return ge(() => {
628
+ return _e(() => {
629
629
  t.setAnchorNode(e);
630
630
  }, [e, t.setAnchorNode]), null;
631
631
  }
632
- function It({ actions: ie, calendars: y = [], className: de, compact: pe, date: Se, dayHours: Ce, defaultDate: we, defaultOpenEvent: De, defaultSelection: ke, defaultView: je, defaultVisibleCalendars: Fe, editable: A = !1, empty: Re, error: ze, events: Be, filter: Ve, firstDayOfWeek: He, fixedWeeks: Ue, header: qe = !0, hourCycle: Ze, level: Qe = 2, listRange: $e, loading: j = !1, loadingDelay: lt, loadingMinDuration: ut, locale: dt, maxColumns: pt, maxEvents: mt, messages: ht, onDateChange: vt, onEventChange: yt, canDrop: xt, onOpenEventChange: St, onRangeChange: Ct, onSelectionChange: N, onViewChange: wt, onVisibleCalendarsChange: It, openEvent: Lt, ref: Rt, render: zt, renderDayContent: Bt, renderEvent: Vt, renderContextMenu: Ht, renderEventDetail: Ut, scrollTime: Wt, selection: Gt, selectionMode: Kt = "none", slotDuration: qt, style: Jt, timeZone: Yt, view: Xt, views: Zt = Et, visibleCalendars: Qt, weekends: $t, weekNumbers: en, workingHours: tn = [], ...nn }) {
633
- let F = ft(), rn = me(), an = `${rn}-title`, on = o(), I = s(ve, ht), L = dt ?? on, sn = Yt ?? F.timeZone, cn = Ze ?? F.hourCycle, ln = $t ?? F.weekends, un = Ce ?? F.dayHours, R = rt(qt ?? F.slotDuration), dn = Wt ?? F.scrollTime, fn = Math.max(1, mt ?? F.maxEvents), pn = Math.max(2, pt ?? F.maxColumns), mn = pe ?? F.compact, hn = $e ?? F.listRange, gn = {
634
- firstDayOfWeek: _e(() => Te({
635
- locale: L,
636
- firstDayOfWeek: He ?? F.firstDayOfWeek
632
+ function Lt({ actions: ie, calendars: y = [], className: de, compact: pe, date: Se, dayHours: Ce, defaultDate: we, now: De, defaultOpenEvent: ke, defaultSelection: je, defaultView: Fe, defaultVisibleCalendars: Le, editable: ze = !1, empty: Be, error: Ve, events: He, filter: Ue, firstDayOfWeek: We, fixedWeeks: Je, header: Qe = !0, hourCycle: $e, level: et = 2, listRange: lt, loading: A = !1, loadingDelay: dt, loadingMinDuration: ft, locale: mt, maxColumns: ht, maxEvents: gt, messages: yt, onDateChange: bt, onEventChange: St, canDrop: Ct, onOpenEventChange: wt, onRangeChange: M, onSelectionChange: Tt, onViewChange: Lt, onVisibleCalendarsChange: Rt, openEvent: zt, ref: Bt, render: Vt, renderDayContent: Ht, renderEvent: Ut, renderContextMenu: Wt, renderEventDetail: Gt, scrollTime: Kt, selection: qt, selectionMode: Jt = "none", slotDuration: Yt, style: Xt, timeZone: Zt, view: Qt, views: $t = Dt, visibleCalendars: en, weekends: tn, weekNumbers: nn, workingHours: rn = [], ...an }) {
633
+ let P = pt(), on = he(), sn = `${on}-title`, cn = o(), F = s(ve, yt), I = mt ?? cn, ln = Zt ?? P.timeZone, L = $e ?? P.hourCycle, un = tn ?? P.weekends, dn = Ce ?? P.dayHours, R = it(Yt ?? P.slotDuration), fn = Kt ?? P.scrollTime, pn = Math.max(1, gt ?? P.maxEvents), mn = Math.max(2, ht ?? P.maxColumns), hn = pe ?? P.compact, gn = lt ?? P.listRange, _n = {
634
+ firstDayOfWeek: x(() => Te({
635
+ locale: I,
636
+ firstDayOfWeek: We ?? P.firstDayOfWeek
637
637
  }).firstDayOfWeek, [
638
- F.firstDayOfWeek,
639
- He,
640
- L
638
+ P.firstDayOfWeek,
639
+ We,
640
+ I
641
641
  ]),
642
- weekends: ln,
643
- fixedWeeks: Ue ?? F.fixedWeeks,
644
- listRange: hn
645
- }, z = S(null), B = S(null), _n = S(null), [vn, yn] = C(null);
646
- x(() => {
642
+ weekends: un,
643
+ fixedWeeks: Je ?? P.fixedWeeks,
644
+ listRange: gn
645
+ }, z = S(null), B = S(null), vn = S(null), [yn, bn] = C(null), xn = De === void 0;
646
+ me(() => {
647
+ if (!xn) return;
647
648
  let e, t = () => {
648
- yn(Oe(sn)), e = setTimeout(t, 6e4 - Date.now() % 6e4);
649
+ bn(Oe(ln)), e = setTimeout(t, 6e4 - Date.now() % 6e4);
649
650
  };
650
651
  return t(), () => clearTimeout(e);
651
- }, [sn]);
652
- let bn = vn?.date ?? null, [xn, Sn] = C(() => we ?? Me(sn)), V = Se ?? xn, [Cn, wn] = C(je ?? Zt[0] ?? "month"), H = Xt ?? Cn, Tn = _e(() => y.map((e) => e.key), [y]), [En, Dn] = C(Fe ?? null), U = Qt ?? En ?? Tn, [On, kn] = C(ke ?? null), An = Gt === void 0 ? On : Gt, [jn, Mn] = C(De ?? null), W = Lt === void 0 ? jn : Lt, G = b((e, t, n) => {
653
- let r = Mt(V, e, O, t, n, vt);
654
- return r && Se === void 0 && Sn(e), r;
652
+ }, [ln, xn]);
653
+ let Sn = De ?? yn, Cn = Sn?.date ?? null, [wn, Tn] = C(() => we ?? Me(ln)), V = Se ?? wn, [En, Dn] = C(Fe ?? $t[0] ?? "month"), H = Qt ?? En, On = x(() => y.map((e) => e.key), [y]), [kn, An] = C(Le ?? null), U = en ?? kn ?? On, [jn, Mn] = C(je ?? null), Nn = qt === void 0 ? jn : qt, [Pn, Fn] = C(ke ?? null), W = zt === void 0 ? Pn : zt, G = b((e, t, n) => {
654
+ let r = Nt(V, e, O, t, n, bt);
655
+ return r && Se === void 0 && Tn(e), r;
655
656
  }, [
656
657
  V,
657
658
  Se,
658
- vt
659
- ]), Nn = b((e, t, n) => {
660
- let r = Mt(H, e, Object.is, t, n, wt);
661
- return r && Xt === void 0 && wn(e), r;
659
+ bt
660
+ ]), In = b((e, t, n) => {
661
+ let r = Nt(H, e, Object.is, t, n, Lt);
662
+ return r && Qt === void 0 && Dn(e), r;
662
663
  }, [
663
664
  H,
664
- wt,
665
- Xt
666
- ]), Pn = b((e, t, n) => {
667
- let r = Mt(U, e, Ot, t, n, It);
668
- return r && Qt === void 0 && Dn(e), r;
665
+ Lt,
666
+ Qt
667
+ ]), Ln = b((e, t, n) => {
668
+ let r = Nt(U, e, kt, t, n, Rt);
669
+ return r && en === void 0 && An(e), r;
669
670
  }, [
670
- It,
671
+ Rt,
671
672
  U,
672
- Qt
673
- ]), Fn = b((e, t, n) => {
674
- let r = Mt(An, e, At, t, n, N);
675
- return r && Gt === void 0 && kn(e), r;
673
+ en
674
+ ]), Rn = b((e, t, n) => {
675
+ let r = Nt(Nn, e, jt, t, n, Tt);
676
+ return r && qt === void 0 && Mn(e), r;
676
677
  }, [
677
- An,
678
- N,
679
- Gt
680
- ]), In = b((e, t, n) => {
681
- let r = Mt(W, e, Object.is, t, n, St);
682
- return r && Lt === void 0 && Mn(e), r;
678
+ Nn,
679
+ Tt,
680
+ qt
681
+ ]), zn = b((e, t, n) => {
682
+ let r = Nt(W, e, Object.is, t, n, wt);
683
+ return r && zt === void 0 && Fn(e), r;
683
684
  }, [
684
685
  W,
685
- St,
686
- Lt
687
- ]), [Ln, Rn] = C(!1), zn = S(null), Bn = S(null), [Vn, Hn] = C(null);
688
- x(() => {
686
+ wt,
687
+ zt
688
+ ]), [Bn, Vn] = C(!1), Hn = S(null), Un = S(null), [Wn, Gn] = C(null);
689
+ me(() => {
689
690
  let e = z.current;
690
691
  if (e === null) return;
691
692
  let t = be(e, {
692
693
  at: ye,
693
- onChange: Rn
694
+ onChange: Vn
694
695
  });
695
- return Rn(t.narrow()), () => t.destroy();
696
+ return Vn(t.narrow()), () => t.destroy();
696
697
  }, []);
697
- let Un = H === "list" || Ln && mn === "list" && (H === "month" || H === "week") ? "list" : "grid", K = Un === "list" && H !== "list" ? at("list", V, {
698
- ...gn,
698
+ let Kn = H === "list" || Bn && hn === "list" && (H === "month" || H === "week") ? "list" : "grid", K = Kn === "list" && H !== "list" ? ot("list", V, {
699
+ ..._n,
699
700
  listRange: H === "month" ? "month" : "week"
700
- }) : at(H, V, gn), Wn = k(K.start), Gn = k(K.end), Kn = _e(() => new Intl.Collator(L), [L]), q = _e(() => Ye(Be, K.start, K.end, { collator: Kn }).filter((e) => (e.event.calendar === void 0 || !Tn.includes(e.event.calendar) || U.includes(e.event.calendar)) && (Ve === void 0 || Ve(e))), [
701
- Tn,
702
- Kn,
703
- Be,
704
- Ve,
705
- Gn,
706
- Wn,
701
+ }) : ot(H, V, _n), qn = k(K.start), Jn = k(K.end), Yn = x(() => new Intl.Collator(I), [I]), q = x(() => Xe(He, K.start, K.end, { collator: Yn }).filter((e) => (e.event.calendar === void 0 || !On.includes(e.event.calendar) || U.includes(e.event.calendar)) && (Ue === void 0 || Ue(e))), [
702
+ On,
703
+ Yn,
704
+ He,
705
+ Ue,
706
+ Jn,
707
+ qn,
707
708
  U
708
- ]), qn = b((e) => typeof A == "function" ? A(e) : A, [A]), [Jn, Yn] = C(null), Xn = _e(() => Jn === null ? q : st(q, Jn.key, Jn.placement), [Jn, q]), Zn = S(null);
709
- ge(() => {
710
- let e = Zn.current;
711
- e !== null && (Zn.current = null, z.current?.querySelector(`[data-part='event'][data-key='${CSS.escape(e)}']`)?.focus());
709
+ ]), Xn = b((e) => typeof ze == "function" ? ze(e) : ze, [ze]), [Zn, Qn] = C(null), $n = x(() => Zn === null ? q : ct(q, Zn.key, Zn.placement), [Zn, q]), er = S(null);
710
+ _e(() => {
711
+ let e = er.current;
712
+ e !== null && (er.current = null, z.current?.querySelector(`[data-part='event'][data-key='${CSS.escape(e)}']`)?.focus());
712
713
  });
713
- let Qn = b((e, t, n) => ({
714
+ let tr = b((e, t, n) => ({
714
715
  key: e.key,
715
716
  event: e.event,
716
717
  occurrence: e.start.date,
717
718
  recurring: e.recurring,
718
719
  kind: n,
719
- ...et(t)
720
- }), []), $n = b((e, t, n) => xt === void 0 || xt(Qn(e, t, n)), [xt, Qn]), er = b((e, t, n, r, i) => {
721
- let a = (t) => Qn(e, t, n), o = Mt(a(tt(e)), a(t), (e, t) => JSON.stringify([e.start, e.end]) === JSON.stringify([t.start, t.end]), r, i, yt);
720
+ ...tt(t)
721
+ }), []), nr = b((e, t, n) => Ct === void 0 || Ct(tr(e, t, n)), [Ct, tr]), rr = b((e, t, n, r, i) => {
722
+ let a = (t) => tr(e, t, n), o = Nt(a(nt(e)), a(t), (e, t) => JSON.stringify([e.start, e.end]) === JSON.stringify([t.start, t.end]), r, i, St);
722
723
  return o && xe().announce(`${e.event.title}, ${Ie({
723
724
  ...e,
724
725
  start: t.start,
725
726
  end: t.end
726
727
  }, {
727
- locale: L,
728
- hourCycle: cn
728
+ locale: I,
729
+ hourCycle: L
729
730
  })}`), o;
730
731
  }, [
731
- Qn,
732
- yt,
733
- cn,
734
- L
735
- ]), tr = ot(H, K, V, {
736
- locale: L,
737
- listRange: H === "list" ? hn : void 0
738
- }), nr = S(null);
739
- x(() => {
740
- let e = `${Wn}/${Gn}/${H}`;
741
- nr.current !== e && (nr.current = e, Ct?.({
732
+ tr,
733
+ St,
734
+ L,
735
+ I
736
+ ]), ir = st(H, K, V, {
737
+ locale: I,
738
+ listRange: H === "list" ? gn : void 0
739
+ }), ar = S(null);
740
+ me(() => {
741
+ let e = `${qn}/${Jn}/${H}`;
742
+ ar.current !== e && (ar.current = e, M?.({
742
743
  start: K.start,
743
744
  end: K.end,
744
745
  view: H
745
746
  }));
746
747
  }, [
747
748
  H,
748
- Ct,
749
- Gn,
750
- Wn
749
+ M,
750
+ Jn,
751
+ qn
751
752
  ]);
752
- let [rr, ir] = C("timed"), J = S(null);
753
- ge(() => {
753
+ let [or, sr] = C("timed"), J = S(null);
754
+ _e(() => {
754
755
  let e = J.current;
755
756
  e !== null && (J.current = null, B.current?.querySelector(`[data-row='${e.row}'][data-date='${e.date}']`)?.focus());
756
757
  });
757
- let ar = S(/* @__PURE__ */ new Map()), or = b((e, t) => {
758
- t === null ? ar.current.delete(e) : ar.current.set(e, t);
759
- }, []), [Y, sr] = C(null), [cr, lr] = C(null), X = _e(() => W === null ? null : q.find((e) => e.key === W) ?? null, [W, q]), ur = Ut !== void 0, [dr, fr] = C(null), pr = S(null), [Z, Q] = un, mr = (e, t, n) => {
758
+ let cr = S(/* @__PURE__ */ new Map()), lr = b((e, t) => {
759
+ t === null ? cr.current.delete(e) : cr.current.set(e, t);
760
+ }, []), [Y, ur] = C(null), [dr, fr] = C(null), X = x(() => W === null ? null : q.find((e) => e.key === W) ?? null, [W, q]), pr = Gt !== void 0, [mr, hr] = C(null), gr = S(null), [Z, Q] = dn, _r = (e, t, n) => {
760
761
  let r = e.getBoundingClientRect(), i = (Q - Z) * 60, a = Z * 60 + (t - r.top) / Math.max(1, r.height) * i, o = Math[n](a / R) * R;
761
762
  return Math.min(Q * 60, Math.max(Z * 60, o));
762
- }, hr = b((e) => {
763
+ }, vr = b((e) => {
763
764
  let t = {
764
- locale: L,
765
- hourCycle: cn
765
+ locale: I,
766
+ hourCycle: L
766
767
  };
767
- return D(e.start) ? `${M({ locale: L }, e.start.date)}, ${Le(e.start.time, e.end.time, t)}` : O(e.start, e.end) ? M({ locale: L }, e.start) : `${M({ locale: L }, e.start)} – ${M({ locale: L }, e.end)}`;
768
- }, [cn, L]), gr = b((e) => xe().announce(I("selected", { text: hr(e) })), [hr, I]);
769
- x(() => {
770
- if (dr === null) return;
768
+ return D(e.start) ? `${j({ locale: I }, e.start.date)}, ${Re(e.start.time, e.end.time, t)}` : O(e.start, e.end) ? j({ locale: I }, e.start) : `${j({ locale: I }, e.start)} – ${j({ locale: I }, e.end)}`;
769
+ }, [L, I]), yr = b((e) => xe().announce(F("selected", { text: vr(e) })), [vr, F]);
770
+ me(() => {
771
+ if (mr === null) return;
771
772
  let e = (e) => {
772
- let t = pr.current;
773
+ let t = gr.current;
773
774
  if (t === null) return;
774
775
  if (t.kind === "hours") {
775
- let n = mr(t.column, e.clientY, "floor"), r = Math.min(t.anchor, n), i = Math.max(t.anchor, n) + R;
776
- fr({
777
- start: P(t.date, r),
778
- end: P(t.date, Math.min(i, Q * 60))
776
+ let n = _r(t.column, e.clientY, "floor"), r = Math.min(t.anchor, n), i = Math.max(t.anchor, n) + R;
777
+ hr({
778
+ start: N(t.date, r),
779
+ end: N(t.date, Math.min(i, Q * 60))
779
780
  });
780
781
  return;
781
782
  }
782
- let n = kt(z.current, "day", e.clientX, e.clientY) ?? kt(z.current, "all-day", e.clientX, e.clientY);
783
- n !== null && fr(jt(t.anchor, n));
783
+ let n = At(z.current, "day", e.clientX, e.clientY) ?? At(z.current, "all-day", e.clientX, e.clientY);
784
+ n !== null && hr(Mt(t.anchor, n));
784
785
  }, t = (e) => {
785
- let t = dr;
786
- pr.current = null, fr(null), t !== null && Fn(t, "pointer", e) && gr(t);
786
+ let t = mr;
787
+ gr.current = null, hr(null), t !== null && Rn(t, "pointer", e) && yr(t);
787
788
  }, n = (e) => {
788
- e.key === "Escape" && (pr.current = null, fr(null));
789
+ e.key === "Escape" && (gr.current = null, hr(null));
789
790
  };
790
791
  return document.addEventListener("pointermove", e), document.addEventListener("pointerup", t), document.addEventListener("keydown", n, !0), () => {
791
792
  document.removeEventListener("pointermove", e), document.removeEventListener("pointerup", t), document.removeEventListener("keydown", n, !0);
792
793
  };
793
794
  });
794
- let _r = S(null), vr = S(!1), yr = (e) => {
795
+ let br = S(null), xr = S(!1), Sr = (e) => {
795
796
  let t = e.target, n = t.closest("[data-part='event'][data-editable]"), r = n?.closest("[data-row]"), i = n?.dataset.key, a = r?.dataset.date;
796
797
  if (n == null || r == null) return !1;
797
798
  let o = q.find((e) => e.key === i);
798
799
  if (o === void 0 || a === void 0) return !1;
799
800
  let s = r.dataset.row ?? "", [c, l, u] = a.split("-").map(Number);
800
- _r.current = {
801
+ br.current = {
801
802
  occurrence: o,
802
803
  kind: t.closest("[data-part='resize-handle']") ? "resize" : "move",
803
804
  row: s,
804
- date: kt(z.current, s, e.clientX, e.clientY) ?? {
805
+ date: At(z.current, s, e.clientX, e.clientY) ?? {
805
806
  year: c,
806
807
  month: l,
807
808
  day: u
@@ -810,31 +811,31 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
810
811
  x: e.clientX,
811
812
  y: e.clientY,
812
813
  started: !1,
813
- placement: tt(o),
814
+ placement: nt(o),
814
815
  invalid: !1
815
816
  };
816
817
  let d = () => Math.max(1, r.getBoundingClientRect().height / Math.max(1, Q - Z)), f = (e) => {
817
- let t = _r.current;
818
+ let t = br.current;
818
819
  if (t === null || !t.started && Math.hypot(e.clientX - t.x, e.clientY - t.y) < 4) return;
819
820
  t.started = !0;
820
- let n = kt(z.current, t.row, e.clientX, e.clientY), r = {
821
+ let n = At(z.current, t.row, e.clientX, e.clientY), r = {
821
822
  days: n === null ? 0 : Ee(t.date, n),
822
823
  minutes: t.row === "timed" ? Math.round((e.clientY - t.y) / d() * (60 / R)) * R : 0
823
824
  };
824
- t.placement = t.kind === "move" ? Ge(tt(t.occurrence), r) : nt(tt(t.occurrence), r, R), t.invalid = !$n(t.occurrence, t.placement, t.kind), Yn({
825
+ t.placement = t.kind === "move" ? Ke(nt(t.occurrence), r) : rt(nt(t.occurrence), r, R), t.invalid = !nr(t.occurrence, t.placement, t.kind), Qn({
825
826
  key: t.occurrence.key,
826
827
  placement: t.placement,
827
828
  invalid: t.invalid
828
829
  });
829
830
  }, p = (e, t) => {
830
- let n = _r.current;
831
- _r.current = null, document.removeEventListener("pointermove", f), document.removeEventListener("pointerup", m), document.removeEventListener("keydown", h, !0), Yn(null), n !== null && n.started && (vr.current = !0, t && !n.invalid && er(n.occurrence, n.placement, n.kind, "pointer", e));
831
+ let n = br.current;
832
+ br.current = null, document.removeEventListener("pointermove", f), document.removeEventListener("pointerup", m), document.removeEventListener("keydown", h, !0), Qn(null), n !== null && n.started && (xr.current = !0, t && !n.invalid && rr(n.occurrence, n.placement, n.kind, "pointer", e));
832
833
  }, m = (e) => p(e, !0), h = (e) => {
833
- e.key === "Escape" && _r.current?.started === !0 && (e.stopPropagation(), p(e, !1));
834
+ e.key === "Escape" && br.current?.started === !0 && (e.stopPropagation(), p(e, !1));
834
835
  };
835
836
  return document.addEventListener("pointermove", f), document.addEventListener("pointerup", m), document.addEventListener("keydown", h, !0), !0;
836
- }, br = (e) => {
837
- if (e.button !== 0 || yr(e) || Kt !== "range") return;
837
+ }, Cr = (e) => {
838
+ if (e.button !== 0 || Sr(e) || Jt !== "range") return;
838
839
  let t = e.target;
839
840
  if (t.closest("button, a, input")) return;
840
841
  let n = t.closest("[data-row]"), r = n?.dataset.date;
@@ -845,29 +846,29 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
845
846
  day: o
846
847
  };
847
848
  if (n.dataset.row === "timed") {
848
- let t = mr(n, e.clientY, "floor");
849
- pr.current = {
849
+ let t = _r(n, e.clientY, "floor");
850
+ gr.current = {
850
851
  kind: "hours",
851
852
  date: s,
852
853
  anchor: t,
853
854
  column: n
854
- }, fr({
855
- start: P(s, t),
856
- end: P(s, Math.min(t + R, Q * 60))
855
+ }, hr({
856
+ start: N(s, t),
857
+ end: N(s, Math.min(t + R, Q * 60))
857
858
  });
858
- } else if (n.dataset.row === "day" || n.dataset.row === "all-day") pr.current = {
859
+ } else if (n.dataset.row === "day" || n.dataset.row === "all-day") gr.current = {
859
860
  kind: "days",
860
861
  anchor: s
861
- }, fr({
862
+ }, hr({
862
863
  start: s,
863
864
  end: s
864
865
  });
865
866
  else return;
866
867
  e.preventDefault();
867
- }, [$, xr] = C(null), Sr = S(null), Cr = S(null), wr = (e, t) => {
868
- Sr.current = null;
868
+ }, [$, wr] = C(null), Tr = S(null), Er = S(null), Dr = (e, t) => {
869
+ Tr.current = null;
869
870
  let n = B.current;
870
- if (Ht === void 0 || !(e instanceof Element) || n === null || !n.contains(e)) return null;
871
+ if (Wt === void 0 || !(e instanceof Element) || n === null || !n.contains(e)) return null;
871
872
  let r = e.closest("[data-part='event'][data-key]"), i = r === null ? void 0 : q.find((e) => e.key === r.dataset.key), a;
872
873
  if (r !== null && i !== void 0) a = {
873
874
  target: {
@@ -885,9 +886,9 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
885
886
  month: s,
886
887
  day: c
887
888
  },
888
- minute: l && t !== null ? mr(r, t, "floor") : null,
889
+ minute: l && t !== null ? _r(r, t, "floor") : null,
889
890
  timed: l,
890
- held: dr ?? An,
891
+ held: mr ?? Nn,
891
892
  slot: R,
892
893
  endMinute: Q * 60
893
894
  }), d = l && t === null ? r.querySelector("[data-part='selection']") ?? n.querySelector(`[data-part='column-header'][data-date='${i}']`) ?? r : r;
@@ -899,9 +900,9 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
899
900
  element: d
900
901
  };
901
902
  }
902
- let o = Ht(a.target);
903
- return o == null || o === !1 ? null : (Sr.current = a, a);
904
- }, Tr = $ === null ? void 0 : $.target.kind === "event" ? $.target.occurrence.event.title : hr($.target.slot), Er = S(null), Dr = (e, t, n) => {
903
+ let o = Wt(a.target);
904
+ return o == null || o === !1 ? null : (Tr.current = a, a);
905
+ }, Or = $ === null ? void 0 : $.target.kind === "event" ? $.target.occurrence.event.title : vr($.target.slot), kr = S(null), Ar = (e, t, n) => {
905
906
  if (J.current = {
906
907
  date: k(e),
907
908
  row: t
@@ -910,7 +911,7 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
910
911
  return;
911
912
  }
912
913
  G(e, "keyboard", n);
913
- }, Or = (e) => {
914
+ }, jr = (e) => {
914
915
  let t = e.target, n = t.closest("[data-row]");
915
916
  if (n === null || !B.current?.contains(n) || n.dataset.row === void 0) return;
916
917
  let r = n.dataset.row;
@@ -931,16 +932,16 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
931
932
  minutes: 0
932
933
  };
933
934
  if (c.days === 0 && c.minutes === 0) return;
934
- let l = e.shiftKey ? "resize" : "move", u = Ke(tt(t), c, l, {
935
+ let l = e.shiftKey ? "resize" : "move", u = qe(nt(t), c, l, {
935
936
  slot: R,
936
- hours: un,
937
- allowed: (e) => $n(t, e, l)
937
+ hours: dn,
938
+ allowed: (e) => nr(t, e, l)
938
939
  });
939
940
  if (u === null) {
940
- xe().announce(I("dropInvalid", { title: t.event.title }));
941
+ xe().announce(F("dropInvalid", { title: t.event.title }));
941
942
  return;
942
943
  }
943
- Zn.current = t.key, er(t, u, l, "keyboard", e);
944
+ er.current = t.key, rr(t, u, l, "keyboard", e);
944
945
  return;
945
946
  }
946
947
  if (e.key === "Escape" || e.key === "F2") {
@@ -948,7 +949,7 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
948
949
  return;
949
950
  }
950
951
  if (e.key === "ArrowDown" || e.key === "ArrowUp") {
951
- let r = [...n.querySelectorAll(Dt)], i = r[r.indexOf(t.closest(Dt) ?? t) + (e.key === "ArrowDown" ? 1 : -1)];
952
+ let r = [...n.querySelectorAll(Ot)], i = r[r.indexOf(t.closest(Ot) ?? t) + (e.key === "ArrowDown" ? 1 : -1)];
952
953
  e.preventDefault(), i?.focus();
953
954
  }
954
955
  return;
@@ -963,15 +964,15 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
963
964
  ArrowUp: a ? "up" : void 0,
964
965
  ArrowDown: a ? "down" : void 0
965
966
  };
966
- if (r === "timed" && e.shiftKey && (e.key === "ArrowDown" || e.key === "ArrowUp") && Kt === "range") {
967
+ if (r === "timed" && e.shiftKey && (e.key === "ArrowDown" || e.key === "ArrowUp") && Jt === "range") {
967
968
  e.preventDefault();
968
- let t = An;
969
+ let t = Nn;
969
970
  if (t === null || !D(t.start) || !O(t.start.date, V)) return;
970
971
  let n = Ae(t.start.time) / 60, r = t.end, i = O(r.date, V) ? Ae(r.time) / 60 : 1440, a = Math.min(Q * 60, Math.max(n + R, i + (e.key === "ArrowDown" ? 1 : -1) * R)), o = {
971
972
  start: t.start,
972
- end: P(V, a)
973
+ end: N(V, a)
973
974
  };
974
- Fn(o, "keyboard", e) && gr(o);
975
+ Rn(o, "keyboard", e) && yr(o);
975
976
  return;
976
977
  }
977
978
  if (!a && (e.key === "ArrowUp" || e.key === "ArrowDown")) {
@@ -982,7 +983,7 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
982
983
  "timed"
983
984
  ], n = t[t.indexOf(r) + (e.key === "ArrowDown" ? 1 : -1)];
984
985
  if (n === void 0) return;
985
- ir(n), J.current = {
986
+ sr(n), J.current = {
986
987
  date: k(V),
987
988
  row: n
988
989
  };
@@ -991,70 +992,70 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
991
992
  let s = o[e.key];
992
993
  if (s !== void 0) {
993
994
  e.preventDefault();
994
- let t = We(H, V, s, gn);
995
- if (e.shiftKey && Kt === "range" && e.key.startsWith("Arrow") && r !== "timed") {
996
- let n = Er.current ?? V;
997
- Er.current = n;
998
- let r = jt(n, t);
999
- Fn(r, "keyboard", e) && gr(r);
1000
- } else e.shiftKey || (Er.current = null);
1001
- Dr(t, r, e);
995
+ let t = Ge(H, V, s, _n);
996
+ if (e.shiftKey && Jt === "range" && e.key.startsWith("Arrow") && r !== "timed") {
997
+ let n = kr.current ?? V;
998
+ kr.current = n;
999
+ let r = Mt(n, t);
1000
+ Rn(r, "keyboard", e) && yr(r);
1001
+ } else e.shiftKey || (kr.current = null);
1002
+ Ar(t, r, e);
1002
1003
  return;
1003
1004
  }
1004
1005
  if (e.key === "Enter" || e.key === "F2") {
1005
- let t = n.querySelector(Dt);
1006
+ let t = n.querySelector(Ot);
1006
1007
  if (t === null) return;
1007
1008
  e.preventDefault(), t.focus();
1008
1009
  return;
1009
1010
  }
1010
- if (e.key === " " && Kt === "range") {
1011
- e.preventDefault(), Er.current = V;
1011
+ if (e.key === " " && Jt === "range") {
1012
+ e.preventDefault(), kr.current = V;
1012
1013
  let t = r === "timed" ? (() => {
1013
- let e = Math.min(Math.max(Ae(dn) / 60, Z * 60), Q * 60 - R);
1014
+ let e = Math.min(Math.max(Ae(fn) / 60, Z * 60), Q * 60 - R);
1014
1015
  return {
1015
- start: P(V, e),
1016
- end: P(V, e + R)
1016
+ start: N(V, e),
1017
+ end: N(V, e + R)
1017
1018
  };
1018
1019
  })() : {
1019
1020
  start: V,
1020
1021
  end: V
1021
1022
  };
1022
- Fn(t, "keyboard", e) && gr(t);
1023
+ Rn(t, "keyboard", e) && yr(t);
1023
1024
  return;
1024
1025
  }
1025
- e.key === "Escape" && An !== null && (e.preventDefault(), Fn(null, "escape", e));
1026
- }, kr = b((e) => {
1027
- let t = _n.current, n = t?.querySelector("[data-part='column']");
1026
+ e.key === "Escape" && Nn !== null && (e.preventDefault(), Rn(null, "escape", e));
1027
+ }, Mr = b((e) => {
1028
+ let t = vn.current, n = t?.querySelector("[data-part='column']");
1028
1029
  if (t == null || n == null) return;
1029
1030
  let r = n.getBoundingClientRect().height / Math.max(1, Q - Z), i = t.querySelector("[data-part='hour']"), a = i === null ? 0 : parseFloat(getComputedStyle(i).lineHeight) / 2 || 0;
1030
1031
  t.scrollTop = Math.max(0, (Ae(e) / 3600 - Z) * r - a);
1031
1032
  }, [Q, Z]);
1032
- ge(() => {
1033
- Un === "grid" && (H === "week" || H === "day") && kr(dn);
1034
- }, [H, Un]);
1035
- let Ar = lt ?? F.loadingDelay, jr = ut ?? F.loadingMinDuration, [Mr, Nr] = C(j);
1036
- x(() => {
1037
- if (j) {
1038
- Nr(!0);
1033
+ _e(() => {
1034
+ Kn === "grid" && (H === "week" || H === "day") && Mr(fn);
1035
+ }, [H, Kn]);
1036
+ let Nr = dt ?? P.loadingDelay, Pr = ft ?? P.loadingMinDuration, [Fr, Ir] = C(A);
1037
+ me(() => {
1038
+ if (A) {
1039
+ Ir(!0);
1039
1040
  return;
1040
1041
  }
1041
- let e = setTimeout(() => Nr(!1), Ar + jr);
1042
+ let e = setTimeout(() => Ir(!1), Nr + Pr);
1042
1043
  return () => clearTimeout(e);
1043
1044
  }, [
1044
- Ar,
1045
- jr,
1046
- j
1045
+ Nr,
1046
+ Pr,
1047
+ A
1047
1048
  ]);
1048
- let Pr = I("loading");
1049
- x(() => {
1050
- if (!j) return;
1051
- let e = setTimeout(() => xe().announce(Pr), Ar);
1049
+ let Lr = F("loading");
1050
+ me(() => {
1051
+ if (!A) return;
1052
+ let e = setTimeout(() => xe().announce(Lr), Nr);
1052
1053
  return () => clearTimeout(e);
1053
1054
  }, [
1054
- Ar,
1055
- j,
1056
- Pr
1057
- ]), he(Rt, () => ({
1055
+ Nr,
1056
+ A,
1057
+ Lr
1058
+ ]), ge(Bt, () => ({
1058
1059
  get element() {
1059
1060
  return z.current;
1060
1061
  },
@@ -1064,7 +1065,7 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
1064
1065
  focusDate(e) {
1065
1066
  if (J.current = {
1066
1067
  date: k(e),
1067
- row: H === "month" ? "day" : rr
1068
+ row: H === "month" ? "day" : or
1068
1069
  }, O(e, V)) {
1069
1070
  B.current?.querySelector(`[data-row='${J.current.row}'][data-date='${k(e)}']`)?.focus(), J.current = null;
1070
1071
  return;
@@ -1072,117 +1073,117 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
1072
1073
  G(e, "programmatic");
1073
1074
  },
1074
1075
  focusEvent(e) {
1075
- let t = ar.current.get(e);
1076
+ let t = cr.current.get(e);
1076
1077
  return t === void 0 || !t.isConnected ? !1 : (t.focus(), !0);
1077
1078
  },
1078
- scrollToTime: kr
1079
+ scrollToTime: Mr
1079
1080
  }), [
1080
1081
  V,
1081
1082
  H,
1082
1083
  G,
1083
- rr,
1084
- kr
1084
+ or,
1085
+ Mr
1085
1086
  ]);
1086
- let Fr = {
1087
- id: rn,
1088
- t: I,
1089
- locale: L,
1090
- hourCycle: cn,
1091
- timeZone: sn,
1087
+ let Rr = {
1088
+ id: on,
1089
+ t: F,
1090
+ locale: I,
1091
+ hourCycle: L,
1092
+ timeZone: ln,
1092
1093
  view: H,
1093
1094
  date: V,
1094
- today: bn,
1095
- now: vn,
1095
+ today: Cn,
1096
+ now: Sn,
1096
1097
  calendars: y,
1097
1098
  openKey: W,
1098
- hostsDetail: ur,
1099
- selection: An,
1100
- pendingSelection: dr ?? ($?.target.kind === "slot" ? $.target.slot : null),
1101
- selectionMode: Kt,
1102
- narrow: Ln,
1103
- weekNumbers: en ?? F.weekNumbers,
1104
- maxEvents: fn,
1105
- maxColumns: pn,
1099
+ hostsDetail: pr,
1100
+ selection: Nn,
1101
+ pendingSelection: mr ?? ($?.target.kind === "slot" ? $.target.slot : null),
1102
+ selectionMode: Jt,
1103
+ narrow: Bn,
1104
+ weekNumbers: nn ?? P.weekNumbers,
1105
+ maxEvents: pn,
1106
+ maxColumns: mn,
1106
1107
  slotDuration: R,
1107
- dayHours: un,
1108
- workingHours: tn,
1109
- row: H === "month" ? "timed" : rr,
1108
+ dayHours: dn,
1109
+ workingHours: rn,
1110
+ row: H === "month" ? "timed" : or,
1110
1111
  moreDate: Y === null ? null : k(Y.date),
1111
- headingLevel: Qe,
1112
- renderEvent: Vt,
1113
- canEdit: qn,
1114
- draggingKey: Jn?.key ?? null,
1115
- dropInvalid: Jn?.invalid ?? !1,
1112
+ headingLevel: et,
1113
+ renderEvent: Ut,
1114
+ canEdit: Xn,
1115
+ draggingKey: Zn?.key ?? null,
1116
+ dropInvalid: Zn?.invalid ?? !1,
1116
1117
  contextKey: $?.target.kind === "event" ? $.target.occurrence.key : null,
1117
- renderDayContent: Bt,
1118
+ renderDayContent: Ht,
1118
1119
  activate(e, t, n, r) {
1119
- lr(t), sr(null), In(W === e.key ? null : e.key, n, r);
1120
+ fr(t), ur(null), zn(W === e.key ? null : e.key, n, r);
1120
1121
  },
1121
1122
  drill(e, t, n) {
1122
- if (Ln && H === "month" && Un === "grid") {
1123
+ if (Bn && H === "month" && Kn === "grid") {
1123
1124
  let t = n.currentTarget;
1124
- sr((n) => n !== null && O(n.date, e) ? null : {
1125
+ ur((n) => n !== null && O(n.date, e) ? null : {
1125
1126
  date: e,
1126
1127
  element: t
1127
1128
  });
1128
1129
  return;
1129
1130
  }
1130
- Nn("day", t, n), G(e, t, n);
1131
+ In("day", t, n), G(e, t, n);
1131
1132
  },
1132
1133
  openMore(e, t) {
1133
- sr((n) => n !== null && O(n.date, e) ? null : {
1134
+ ur((n) => n !== null && O(n.date, e) ? null : {
1134
1135
  date: e,
1135
1136
  element: t
1136
1137
  });
1137
1138
  },
1138
- registerEvent: or,
1139
+ registerEvent: lr,
1139
1140
  calendarLabel: (e) => y.find((t) => t.key === e)?.label,
1140
1141
  colorOf: (e) => Ne(e, y)
1141
- }, Ir = fe(`h${Qe}`, {
1142
+ }, zr = fe(`h${et}`, {
1142
1143
  "aria-live": "polite",
1143
1144
  "data-part": "title",
1144
- id: an
1145
- }, tr), Lr = qe ? /* @__PURE__ */ E("div", {
1145
+ id: sn
1146
+ }, ir), Br = Qe ? /* @__PURE__ */ E("div", {
1146
1147
  "data-part": "header",
1147
1148
  children: [
1148
- Ir,
1149
+ zr,
1149
1150
  /* @__PURE__ */ E("div", {
1150
- "aria-label": I("navigation"),
1151
+ "aria-label": F("navigation"),
1151
1152
  "data-part": "navigation",
1152
1153
  role: "group",
1153
1154
  children: [
1154
1155
  /* @__PURE__ */ T("button", {
1155
- "aria-label": I(`previous.${H}`),
1156
+ "aria-label": F(`previous.${H}`),
1156
1157
  "data-part": "previous",
1157
- onClick: (e) => G(it(H, V, -1, gn), e.detail === 0 ? "keyboard" : "pointer", e),
1158
+ onClick: (e) => G(at(H, V, -1, _n), e.detail === 0 ? "keyboard" : "pointer", e),
1158
1159
  type: "button",
1159
1160
  children: /* @__PURE__ */ T(t, { children: /* @__PURE__ */ T(e, { name: "chevron-right" }) })
1160
1161
  }),
1161
1162
  /* @__PURE__ */ T("button", {
1162
1163
  "data-part": "today",
1163
- onClick: (e) => G(bn ?? Me(sn), e.detail === 0 ? "keyboard" : "pointer", e),
1164
+ onClick: (e) => G(Cn ?? Me(ln), e.detail === 0 ? "keyboard" : "pointer", e),
1164
1165
  type: "button",
1165
- children: I("today")
1166
+ children: F("today")
1166
1167
  }),
1167
1168
  /* @__PURE__ */ T("button", {
1168
- "aria-label": I(`next.${H}`),
1169
+ "aria-label": F(`next.${H}`),
1169
1170
  "data-part": "next",
1170
- onClick: (e) => G(it(H, V, 1, gn), e.detail === 0 ? "keyboard" : "pointer", e),
1171
+ onClick: (e) => G(at(H, V, 1, _n), e.detail === 0 ? "keyboard" : "pointer", e),
1171
1172
  type: "button",
1172
1173
  children: /* @__PURE__ */ T(t, { children: /* @__PURE__ */ T(e, { name: "chevron-right" }) })
1173
1174
  })
1174
1175
  ]
1175
1176
  }),
1176
- Zt.length > 1 ? /* @__PURE__ */ T("div", {
1177
+ $t.length > 1 ? /* @__PURE__ */ T("div", {
1177
1178
  "data-part": "views",
1178
1179
  children: /* @__PURE__ */ T(ue, {
1179
- "aria-label": I("views"),
1180
+ "aria-label": F("views"),
1180
1181
  fullWidth: !0,
1181
- onValueChange: (e, t) => Nn(e, t.reason, t.source),
1182
+ onValueChange: (e, t) => In(e, t.reason, t.source),
1182
1183
  value: H,
1183
- children: Zt.map((e) => /* @__PURE__ */ T(le, {
1184
+ children: $t.map((e) => /* @__PURE__ */ T(le, {
1184
1185
  value: e,
1185
- children: I(`view.${e}`)
1186
+ children: F(`view.${e}`)
1186
1187
  }, e))
1187
1188
  })
1188
1189
  }) : null,
@@ -1192,14 +1193,14 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
1192
1193
  type: "button",
1193
1194
  children: [
1194
1195
  /* @__PURE__ */ T(t, { children: /* @__PURE__ */ T(e, { name: "funnel" }) }),
1195
- /* @__PURE__ */ T("span", { children: I("calendars") }),
1196
+ /* @__PURE__ */ T("span", { children: F("calendars") }),
1196
1197
  /* @__PURE__ */ T(t, { children: /* @__PURE__ */ T(e, { name: "chevron-down" }) })
1197
1198
  ]
1198
1199
  }) }), /* @__PURE__ */ T(a, { children: y.map((e) => {
1199
1200
  let t = Ne(e.key, y);
1200
1201
  return /* @__PURE__ */ E(i, {
1201
1202
  checked: U.includes(e.key),
1202
- onCheckedChange: (t, n) => Pn(t ? Tn.filter((t) => t === e.key || U.includes(t)) : U.filter((t) => t !== e.key), n.reason, n.source),
1203
+ onCheckedChange: (t, n) => Ln(t ? On.filter((t) => t === e.key || U.includes(t)) : U.filter((t) => t !== e.key), n.reason, n.source),
1203
1204
  children: [/* @__PURE__ */ T("svg", {
1204
1205
  "aria-hidden": "true",
1205
1206
  height: "10",
@@ -1219,123 +1220,123 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
1219
1220
  children: ie
1220
1221
  })
1221
1222
  ]
1222
- }) : null, Rr = H === "month" ? "month" : H === "day" ? "day" : "week", zr = /* @__PURE__ */ E(w, { children: [
1223
+ }) : null, Vr = H === "month" ? "month" : H === "day" ? "day" : "week", Hr = /* @__PURE__ */ E(w, { children: [
1223
1224
  /* @__PURE__ */ T("div", {
1224
1225
  "data-part": "loader",
1225
- children: Mr ? /* @__PURE__ */ T(g, {
1226
- delay: Ar,
1226
+ children: Fr ? /* @__PURE__ */ T(g, {
1227
+ delay: Nr,
1227
1228
  hideLabel: !0,
1228
- label: I("loading"),
1229
- loading: j,
1230
- minDuration: jr,
1231
- onWithdraw: () => Nr(!1),
1229
+ label: F("loading"),
1230
+ loading: A,
1231
+ minDuration: Pr,
1232
+ onWithdraw: () => Ir(!1),
1232
1233
  size: "sm"
1233
1234
  }) : null
1234
1235
  }),
1235
- ze == null ? null : /* @__PURE__ */ T("div", {
1236
+ Ve == null ? null : /* @__PURE__ */ T("div", {
1236
1237
  "data-part": "error",
1237
- children: ze
1238
+ children: Ve
1238
1239
  }),
1239
- Un === "list" ? /* @__PURE__ */ T(_t, {
1240
+ Kn === "list" ? /* @__PURE__ */ T(vt, {
1240
1241
  days: K.days,
1241
- empty: Re,
1242
- emptyText: I(`empty.${Rr}`),
1243
- occurrences: Xn
1244
- }) : H === "month" ? /* @__PURE__ */ T(bt, {
1242
+ empty: Be,
1243
+ emptyText: F(`empty.${Vr}`),
1244
+ occurrences: $n
1245
+ }) : H === "month" ? /* @__PURE__ */ T(xt, {
1245
1246
  anchorMonth: V.month,
1246
- occurrences: Xn,
1247
- titleId: an,
1247
+ occurrences: $n,
1248
+ titleId: sn,
1248
1249
  weeks: K.weeks
1249
- }) : /* @__PURE__ */ T(Tt, {
1250
+ }) : /* @__PURE__ */ T(Et, {
1250
1251
  days: K.days,
1251
- occurrences: Xn,
1252
- scrollerRef: _n,
1253
- titleId: an
1252
+ occurrences: $n,
1253
+ scrollerRef: vn,
1254
+ titleId: sn
1254
1255
  })
1255
- ] }), Br = {
1256
- "aria-busy": j ? !0 : void 0,
1256
+ ] }), Ur = {
1257
+ "aria-busy": A ? !0 : void 0,
1257
1258
  "data-part": "body",
1258
- onKeyDown: Or,
1259
- onPointerDown: br
1260
- }, Vr = Ht === void 0 ? /* @__PURE__ */ T("div", {
1261
- ...Br,
1259
+ onKeyDown: jr,
1260
+ onPointerDown: Cr
1261
+ }, Wr = Wt === void 0 ? /* @__PURE__ */ T("div", {
1262
+ ...Ur,
1262
1263
  ref: B,
1263
- children: zr
1264
+ children: Hr
1264
1265
  }) : /* @__PURE__ */ E(ce, {
1265
1266
  onOpenChange: (e, t) => {
1266
1267
  if (!e) {
1267
- xr(null);
1268
+ wr(null);
1268
1269
  return;
1269
1270
  }
1270
- let n = Sr.current;
1271
+ let n = Tr.current;
1271
1272
  if (n === null) {
1272
1273
  t.cancel();
1273
1274
  return;
1274
1275
  }
1275
- xr(n), t.reason === "keyboard" && Cr.current?.setAnchor(n.element);
1276
+ wr(n), t.reason === "keyboard" && Er.current?.setAnchor(n.element);
1276
1277
  },
1277
1278
  children: [
1278
- /* @__PURE__ */ T(Pt, { handle: Cr }),
1279
+ /* @__PURE__ */ T(Ft, { handle: Er }),
1279
1280
  /* @__PURE__ */ T(se, { render: (e) => /* @__PURE__ */ T("div", {
1280
1281
  ...e,
1281
- ...Br,
1282
+ ...Ur,
1282
1283
  onContextMenuCapture: (e) => {
1283
- wr(e.target, e.clientY) === null && e.stopPropagation();
1284
+ Dr(e.target, e.clientY) === null && e.stopPropagation();
1284
1285
  },
1285
1286
  onKeyDown: (t) => {
1286
1287
  if (t.key === "ContextMenu" || t.key === "F10" && t.shiftKey) {
1287
- if (wr(t.target, null) === null) return;
1288
- } else Or(t);
1288
+ if (Dr(t.target, null) === null) return;
1289
+ } else jr(t);
1289
1290
  e.onKeyDown?.(t);
1290
1291
  },
1291
1292
  onPointerDown: (t) => {
1292
- t.pointerType !== "mouse" && wr(t.target, t.clientY), br(t), e.onPointerDown?.(t);
1293
+ t.pointerType !== "mouse" && Dr(t.target, t.clientY), Cr(t), e.onPointerDown?.(t);
1293
1294
  },
1294
1295
  ref: (t) => {
1295
1296
  B.current = t, e.ref?.(t);
1296
1297
  },
1297
- children: zr
1298
+ children: Hr
1298
1299
  }) }),
1299
1300
  /* @__PURE__ */ T(a, {
1300
- "aria-label": Tr,
1301
- children: $ === null ? null : Ht($.target)
1301
+ "aria-label": Or,
1302
+ children: $ === null ? null : Wt($.target)
1302
1303
  })
1303
1304
  ]
1304
- }), Hr = Y === null ? [] : Xe(q, Y.date), Ur = Y === null ? null : M(Fr, Y.date), Wr = Y === null ? null : /* @__PURE__ */ T("ul", {
1305
- "aria-label": I("dayEvents", { day: Ur ?? "" }),
1305
+ }), Gr = Y === null ? [] : Ze(q, Y.date), Kr = Y === null ? null : j(Rr, Y.date), qr = Y === null ? null : /* @__PURE__ */ T("ul", {
1306
+ "aria-label": F("dayEvents", { day: Kr ?? "" }),
1306
1307
  "data-layout": "stacked",
1307
1308
  "data-part": "list-events",
1308
1309
  role: "list",
1309
- children: Hr.map((e) => /* @__PURE__ */ T("li", { children: /* @__PURE__ */ T(gt, {
1310
+ children: Gr.map((e) => /* @__PURE__ */ T("li", { children: /* @__PURE__ */ T(_t, {
1310
1311
  date: Y.date,
1311
1312
  inGrid: !1,
1312
1313
  layout: "list",
1313
1314
  occurrence: e,
1314
1315
  withLocation: !0
1315
1316
  }) }, e.key))
1316
- }), Gr = (W !== null && ar.current.get(W)?.isConnected ? ar.current.get(W) : cr) ?? null, Kr = X === null ? null : /* @__PURE__ */ T(Nt, { when: Je(X, {
1317
- hourCycle: cn,
1318
- locale: L
1319
- }) }), qr = X === null ? null : Ut?.(X, { close: () => In(null, "programmatic") });
1320
- zn.current = Y?.element ?? null, Bn.current = Gr;
1321
- let Jr = Ln ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(h, {
1322
- container: Vn,
1323
- finalFocus: zn,
1317
+ }), Jr = (W !== null && cr.current.get(W)?.isConnected ? cr.current.get(W) : dr) ?? null, Yr = X === null ? null : /* @__PURE__ */ T(Pt, { when: Ye(X, {
1318
+ hourCycle: L,
1319
+ locale: I
1320
+ }) }), Xr = X === null ? null : Gt?.(X, { close: () => zn(null, "programmatic") });
1321
+ Hn.current = Y?.element ?? null, Un.current = Jr;
1322
+ let Zr = Bn ? /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T(h, {
1323
+ container: Wn,
1324
+ finalFocus: Hn,
1324
1325
  onOpenChange: (e) => {
1325
- e || sr(null);
1326
+ e || ur(null);
1326
1327
  },
1327
1328
  open: Y !== null,
1328
1329
  side: "bottom",
1329
1330
  children: /* @__PURE__ */ E(d, { children: [
1330
1331
  /* @__PURE__ */ T(p, {}),
1331
- /* @__PURE__ */ E(c, { children: [/* @__PURE__ */ T(l, { children: Ur }), /* @__PURE__ */ T(u, {})] }),
1332
- /* @__PURE__ */ T(m, { children: Wr })
1332
+ /* @__PURE__ */ E(c, { children: [/* @__PURE__ */ T(l, { children: Kr }), /* @__PURE__ */ T(u, {})] }),
1333
+ /* @__PURE__ */ T(m, { children: qr })
1333
1334
  ] })
1334
- }), ur ? /* @__PURE__ */ T(h, {
1335
- container: Vn,
1336
- finalFocus: Bn,
1335
+ }), pr ? /* @__PURE__ */ T(h, {
1336
+ container: Wn,
1337
+ finalFocus: Un,
1337
1338
  onOpenChange: (e, t) => {
1338
- e || In(null, t.reason, t.source);
1339
+ e || zn(null, t.reason, t.source);
1339
1340
  },
1340
1341
  open: X !== null,
1341
1342
  side: "bottom",
@@ -1343,57 +1344,57 @@ function It({ actions: ie, calendars: y = [], className: de, compact: pe, date:
1343
1344
  /* @__PURE__ */ T(p, {}),
1344
1345
  /* @__PURE__ */ E(c, { children: [
1345
1346
  /* @__PURE__ */ T(l, { children: X?.event.title }),
1346
- /* @__PURE__ */ T(f, { children: Kr }),
1347
+ /* @__PURE__ */ T(f, { children: Yr }),
1347
1348
  /* @__PURE__ */ T(u, {})
1348
1349
  ] }),
1349
- /* @__PURE__ */ T(m, { children: qr })
1350
+ /* @__PURE__ */ T(m, { children: Xr })
1350
1351
  ] })
1351
1352
  }) : null] }) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E(ee, {
1352
1353
  onOpenChange: (e) => {
1353
- e || sr(null);
1354
+ e || ur(null);
1354
1355
  },
1355
1356
  open: Y !== null,
1356
1357
  portal: !1,
1357
- children: [/* @__PURE__ */ T(Ft, { element: Y?.element ?? null }), /* @__PURE__ */ T(ne, { children: /* @__PURE__ */ T(_, { children: Y === null ? null : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E(v, { children: [/* @__PURE__ */ T(oe, { children: Ur }), /* @__PURE__ */ T(te, {})] }), /* @__PURE__ */ T(ae, { children: Wr })] }) }) })]
1358
- }), ur ? /* @__PURE__ */ E(ee, {
1359
- finalFocus: cr ?? void 0,
1358
+ children: [/* @__PURE__ */ T(It, { element: Y?.element ?? null }), /* @__PURE__ */ T(ne, { children: /* @__PURE__ */ T(_, { children: Y === null ? null : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E(v, { children: [/* @__PURE__ */ T(oe, { children: Kr }), /* @__PURE__ */ T(te, {})] }), /* @__PURE__ */ T(ae, { children: qr })] }) }) })]
1359
+ }), pr ? /* @__PURE__ */ E(ee, {
1360
+ finalFocus: dr ?? void 0,
1360
1361
  onOpenChange: (e, t) => {
1361
- e || In(null, t.reason, t.source);
1362
+ e || zn(null, t.reason, t.source);
1362
1363
  },
1363
1364
  open: X !== null,
1364
1365
  portal: !1,
1365
1366
  size: "lg",
1366
- children: [/* @__PURE__ */ T(Ft, { element: Gr }), /* @__PURE__ */ T(ne, { children: /* @__PURE__ */ T(_, { children: X === null ? null : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E(v, { children: [
1367
+ children: [/* @__PURE__ */ T(It, { element: Jr }), /* @__PURE__ */ T(ne, { children: /* @__PURE__ */ T(_, { children: X === null ? null : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ E(v, { children: [
1367
1368
  /* @__PURE__ */ T(oe, { children: X.event.title }),
1368
- /* @__PURE__ */ T(re, { children: Kr }),
1369
+ /* @__PURE__ */ T(re, { children: Yr }),
1369
1370
  /* @__PURE__ */ T(te, {})
1370
- ] }), /* @__PURE__ */ T(ae, { children: qr })] }) }) })]
1371
- }) : null] }), Yr = {
1372
- ...nn,
1371
+ ] }), /* @__PURE__ */ T(ae, { children: Xr })] }) }) })]
1372
+ }) : null] }), Qr = {
1373
+ ...an,
1373
1374
  className: de,
1374
- "data-layout": Un,
1375
- "data-loading": j ? "" : void 0,
1375
+ "data-layout": Kn,
1376
+ "data-loading": A ? "" : void 0,
1376
1377
  "data-part": "root",
1377
1378
  "data-slot-duration": String(R),
1378
1379
  "data-ui": "event-calendar",
1379
1380
  "data-view": H,
1380
1381
  onClickCapture: (e) => {
1381
- nn.onClickCapture?.(e), vr.current && (vr.current = !1, e.preventDefault(), e.stopPropagation());
1382
+ an.onClickCapture?.(e), xr.current && (xr.current = !1, e.preventDefault(), e.stopPropagation());
1382
1383
  },
1383
1384
  ref: (e) => {
1384
- z.current = e, e !== Vn && Hn(e);
1385
+ z.current = e, e !== Wn && Gn(e);
1385
1386
  },
1386
- style: Jt,
1387
- children: /* @__PURE__ */ E(ct.Provider, {
1388
- value: Fr,
1387
+ style: Xt,
1388
+ children: /* @__PURE__ */ E(ut.Provider, {
1389
+ value: Rr,
1389
1390
  children: [
1390
- Lr,
1391
- Vr,
1392
- Jr
1391
+ Br,
1392
+ Wr,
1393
+ Zr
1393
1394
  ]
1394
1395
  })
1395
1396
  };
1396
- return zt === void 0 ? /* @__PURE__ */ T("div", { ...Yr }) : zt(Yr);
1397
+ return Vt === void 0 ? /* @__PURE__ */ T("div", { ...Qr }) : Vt(Qr);
1397
1398
  }
1398
1399
  //#endregion
1399
- export { ft as i, ut as n, pt as r, It as t };
1400
+ export { pt as i, dt as n, mt as r, Lt as t };