@innosolutions/inno-calendar 1.0.65 → 1.0.68

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 (56) hide show
  1. package/AGENT.md +1783 -1783
  2. package/README.md +305 -305
  3. package/dist/agenda-widget-DyPlCQHM.cjs +2 -0
  4. package/dist/agenda-widget-DyPlCQHM.cjs.map +1 -0
  5. package/dist/{agenda-widget-CD_UoYWC.js → agenda-widget-nh_h1yy6.js} +970 -961
  6. package/dist/agenda-widget-nh_h1yy6.js.map +1 -0
  7. package/dist/components/index.cjs +1 -1
  8. package/dist/components/index.mjs +2 -2
  9. package/dist/components/views/timeline-view.d.ts.map +1 -1
  10. package/dist/core/context/inno-calendar-provider.d.ts.map +1 -1
  11. package/dist/core/index.cjs +1 -1
  12. package/dist/core/index.mjs +147 -145
  13. package/dist/core/utils/view-storage.d.ts +21 -0
  14. package/dist/core/utils/view-storage.d.ts.map +1 -1
  15. package/dist/index.cjs +1 -1
  16. package/dist/index.mjs +196 -194
  17. package/dist/{position-utils-DpaKqYhO.js → position-utils-BzmOPdvQ.js} +294 -276
  18. package/dist/position-utils-BzmOPdvQ.js.map +1 -0
  19. package/dist/position-utils-EQTCC4tZ.cjs +2 -0
  20. package/dist/position-utils-EQTCC4tZ.cjs.map +1 -0
  21. package/dist/presets/index.cjs +1 -1
  22. package/dist/presets/index.mjs +1 -1
  23. package/dist/{slot-selection-context-D3MW4WJ7.js → slot-selection-context-CjS_VIPj.js} +72 -73
  24. package/dist/slot-selection-context-CjS_VIPj.js.map +1 -0
  25. package/dist/slot-selection-context-CmE-aWgt.cjs +2 -0
  26. package/dist/slot-selection-context-CmE-aWgt.cjs.map +1 -0
  27. package/dist/{tailwind-calendar-CzbuXRmn.js → tailwind-calendar-B6qsueM3.js} +15 -15
  28. package/dist/{tailwind-calendar-CzbuXRmn.js.map → tailwind-calendar-B6qsueM3.js.map} +1 -1
  29. package/dist/{tailwind-calendar-smlkVdSq.cjs → tailwind-calendar-KJ1XJ4gr.cjs} +2 -2
  30. package/dist/{tailwind-calendar-smlkVdSq.cjs.map → tailwind-calendar-KJ1XJ4gr.cjs.map} +1 -1
  31. package/dist/{use-calendar-mU1joTwp.js → use-calendar--JnbGA3L.js} +23 -23
  32. package/dist/{use-calendar-mU1joTwp.js.map → use-calendar--JnbGA3L.js.map} +1 -1
  33. package/dist/{use-calendar-Bd-d8oGj.cjs → use-calendar-BwqE_WNA.cjs} +2 -2
  34. package/dist/{use-calendar-Bd-d8oGj.cjs.map → use-calendar-BwqE_WNA.cjs.map} +1 -1
  35. package/dist/{use-slot-selection-CauKdLYv.js → use-slot-selection-BLCDzQzo.js} +8 -8
  36. package/dist/{use-slot-selection-CauKdLYv.js.map → use-slot-selection-BLCDzQzo.js.map} +1 -1
  37. package/dist/{use-slot-selection-CCOSsRSh.cjs → use-slot-selection-C1tk-o0j.cjs} +2 -2
  38. package/dist/{use-slot-selection-CCOSsRSh.cjs.map → use-slot-selection-C1tk-o0j.cjs.map} +1 -1
  39. package/dist/utils.cjs +1 -1
  40. package/dist/utils.mjs +52 -50
  41. package/dist/{week-view-BQXIaSUZ.js → week-view-B1KsZsC3.js} +3 -3
  42. package/dist/week-view-B1KsZsC3.js.map +1 -0
  43. package/dist/{week-view-xrKlAJos.cjs → week-view-Dv-Uz0eT.cjs} +2 -2
  44. package/dist/week-view-Dv-Uz0eT.cjs.map +1 -0
  45. package/package.json +138 -138
  46. package/dist/agenda-widget-CD_UoYWC.js.map +0 -1
  47. package/dist/agenda-widget-COxgmpv4.cjs +0 -2
  48. package/dist/agenda-widget-COxgmpv4.cjs.map +0 -1
  49. package/dist/position-utils-Do2ciBXl.cjs +0 -2
  50. package/dist/position-utils-Do2ciBXl.cjs.map +0 -1
  51. package/dist/position-utils-DpaKqYhO.js.map +0 -1
  52. package/dist/slot-selection-context-BlrL9b5P.cjs +0 -2
  53. package/dist/slot-selection-context-BlrL9b5P.cjs.map +0 -1
  54. package/dist/slot-selection-context-D3MW4WJ7.js.map +0 -1
  55. package/dist/week-view-BQXIaSUZ.js.map +0 -1
  56. package/dist/week-view-xrKlAJos.cjs.map +0 -1
@@ -1,11 +1,11 @@
1
- import { jsx as e, jsxs as r, Fragment as be } from "react/jsx-runtime";
2
- import { g as lt, u as xt, C as vt } from "./use-calendar-mU1joTwp.js";
3
- import { useCallback as _, useState as le, useEffect as he, forwardRef as Pe, useRef as ie, useMemo as ee, useLayoutEffect as wt, useImperativeHandle as bt } from "react";
1
+ import { jsx as e, jsxs as r, Fragment as ye } from "react/jsx-runtime";
2
+ import { g as lt, u as vt, C as wt } from "./use-calendar--JnbGA3L.js";
3
+ import { useCallback as $, useState as ie, useEffect as ue, forwardRef as Pe, useRef as ae, useMemo as ee, useLayoutEffect as bt, useImperativeHandle as yt } from "react";
4
4
  import { c as g } from "./index-DtaLkIY8.js";
5
- import { P as ct, p as dt, o as ut, z as fe, I as yt, J as kt, B as De, K as Nt, L as Ve, x as ge, F as pe, y as xe, k as Ct, C as Dt, M as Ye, A as Mt, W as Et, c as Lt, N as St } from "./week-view-BQXIaSUZ.js";
6
- import { j as Tt, D as Ht, I as It, e as zt, S as jt } from "./slot-selection-context-D3MW4WJ7.js";
7
- import { aF as de, a$ as We, L as ht, ar as At, a1 as Pt, ac as Wt, o as mt, X as Ft } from "./position-utils-DpaKqYhO.js";
8
- function $t({ view: t, className: n = "" }) {
5
+ import { P as ct, p as dt, o as ut, z as me, I as kt, J as Nt, B as De, K as Ct, L as Ve, x as fe, F as ge, y as pe, k as Dt, C as Mt, M as Ye, A as Et, W as Lt, c as St, N as Tt } from "./week-view-B1KsZsC3.js";
6
+ import { j as Ht, D as It, I as zt, e as jt, S as At } from "./slot-selection-context-CjS_VIPj.js";
7
+ import { aG as ce, b2 as We, L as ht, as as Pt, a2 as Wt, ad as Ft, o as mt, Y as $t } from "./position-utils-BzmOPdvQ.js";
8
+ function Ot({ view: t, className: n = "" }) {
9
9
  return /* @__PURE__ */ e(
10
10
  "div",
11
11
  {
@@ -30,48 +30,48 @@ function $t({ view: t, className: n = "" }) {
30
30
  );
31
31
  }
32
32
  function Ke({ view: t, className: n }) {
33
- return /* @__PURE__ */ e($t, { view: t, className: n });
33
+ return /* @__PURE__ */ e(Ot, { view: t, className: n });
34
34
  }
35
- function Nr(t) {
35
+ function Cr(t) {
36
36
  const {
37
37
  events: n,
38
- resources: a,
38
+ resources: s,
39
39
  scheduleTypes: o,
40
- initialView: s = "week",
40
+ initialView: a = "week",
41
41
  initialDate: l,
42
- initialFilters: x,
42
+ initialFilters: v,
43
43
  preferences: h,
44
44
  locale: c,
45
45
  slots: w,
46
46
  renderEvent: P,
47
- onViewChange: b,
48
- onDateChange: y,
47
+ onViewChange: y,
48
+ onDateChange: k,
49
49
  onEventClick: B,
50
50
  onSlotSelect: A,
51
51
  onFiltersChange: W,
52
52
  className: F,
53
53
  children: H
54
- } = t, k = lt();
55
- if (k)
56
- return /* @__PURE__ */ e("div", { className: F, style: { position: "relative" }, children: H ?? /* @__PURE__ */ e(Ke, { view: k.view, className: F }) });
57
- const $ = xt({
54
+ } = t, C = lt();
55
+ if (C)
56
+ return /* @__PURE__ */ e("div", { className: F, style: { position: "relative" }, children: H ?? /* @__PURE__ */ e(Ke, { view: C.view, className: F }) });
57
+ const O = vt({
58
58
  events: n,
59
- resources: a,
59
+ resources: s,
60
60
  scheduleTypes: o,
61
- initialView: s,
61
+ initialView: a,
62
62
  initialDate: l,
63
- initialFilters: x,
63
+ initialFilters: v,
64
64
  preferences: h,
65
65
  locale: c,
66
- onViewChange: b,
67
- onDateChange: y,
66
+ onViewChange: y,
67
+ onDateChange: k,
68
68
  onEventClick: B,
69
69
  onSlotSelect: A,
70
70
  onFiltersChange: W
71
71
  });
72
- return /* @__PURE__ */ e(vt, { value: $, children: /* @__PURE__ */ e("div", { className: F, style: { position: "relative" }, children: H ?? /* @__PURE__ */ e(Ke, { view: $.view, className: F }) }) });
72
+ return /* @__PURE__ */ e(wt, { value: O, children: /* @__PURE__ */ e("div", { className: F, style: { position: "relative" }, children: H ?? /* @__PURE__ */ e(Ke, { view: O.view, className: F }) }) });
73
73
  }
74
- function Ot({ className: t }) {
74
+ function _t({ className: t }) {
75
75
  return /* @__PURE__ */ r(
76
76
  "svg",
77
77
  {
@@ -131,7 +131,7 @@ function Ae({ className: t }) {
131
131
  }
132
132
  );
133
133
  }
134
- function _t({ className: t }) {
134
+ function Bt({ className: t }) {
135
135
  return /* @__PURE__ */ r(
136
136
  "svg",
137
137
  {
@@ -150,7 +150,7 @@ function _t({ className: t }) {
150
150
  }
151
151
  );
152
152
  }
153
- function He({ className: t }) {
153
+ function Te({ className: t }) {
154
154
  return /* @__PURE__ */ e(
155
155
  "svg",
156
156
  {
@@ -166,7 +166,7 @@ function He({ className: t }) {
166
166
  }
167
167
  );
168
168
  }
169
- function Bt({ className: t }) {
169
+ function Rt({ className: t }) {
170
170
  return /* @__PURE__ */ r(
171
171
  "svg",
172
172
  {
@@ -185,7 +185,7 @@ function Bt({ className: t }) {
185
185
  }
186
186
  );
187
187
  }
188
- function Rt({ className: t }) {
188
+ function Ut({ className: t }) {
189
189
  return /* @__PURE__ */ e(
190
190
  "svg",
191
191
  {
@@ -201,7 +201,7 @@ function Rt({ className: t }) {
201
201
  }
202
202
  );
203
203
  }
204
- function Ut({ className: t }) {
204
+ function Vt({ className: t }) {
205
205
  return /* @__PURE__ */ r(
206
206
  "svg",
207
207
  {
@@ -222,7 +222,7 @@ function Ut({ className: t }) {
222
222
  }
223
223
  );
224
224
  }
225
- function Vt({ className: t }) {
225
+ function Yt({ className: t }) {
226
226
  return /* @__PURE__ */ r(
227
227
  "svg",
228
228
  {
@@ -241,7 +241,7 @@ function Vt({ className: t }) {
241
241
  }
242
242
  );
243
243
  }
244
- function Yt({ className: t }) {
244
+ function Kt({ className: t }) {
245
245
  return /* @__PURE__ */ r(
246
246
  "svg",
247
247
  {
@@ -262,7 +262,7 @@ function Yt({ className: t }) {
262
262
  }
263
263
  );
264
264
  }
265
- function Kt({ className: t }) {
265
+ function Gt({ className: t }) {
266
266
  return /* @__PURE__ */ r(
267
267
  "svg",
268
268
  {
@@ -284,7 +284,7 @@ function Kt({ className: t }) {
284
284
  }
285
285
  );
286
286
  }
287
- function Ee({ className: t }) {
287
+ function Me({ className: t }) {
288
288
  return /* @__PURE__ */ e(
289
289
  "svg",
290
290
  {
@@ -300,7 +300,7 @@ function Ee({ className: t }) {
300
300
  }
301
301
  );
302
302
  }
303
- const Gt = {
303
+ const Jt = {
304
304
  edit: "Edit",
305
305
  delete: "Delete",
306
306
  cancel: "Cancel Event",
@@ -325,31 +325,31 @@ const Gt = {
325
325
  acceptAllEvents: "Accept all events",
326
326
  deleteConfirmTitle: "Delete Event",
327
327
  deleteConfirmDescription: "Are you sure you want to delete this event? This action cannot be undone."
328
- }, Ie = Pe(
329
- ({ onClick: t, label: n, children: a, className: o, variant: s = "ghost", ...l }, x) => /* @__PURE__ */ r(ge, { children: [
330
- /* @__PURE__ */ e(pe, { asChild: !0, children: /* @__PURE__ */ e(
328
+ }, He = Pe(
329
+ ({ onClick: t, label: n, children: s, className: o, variant: a = "ghost", ...l }, v) => /* @__PURE__ */ r(fe, { children: [
330
+ /* @__PURE__ */ e(ge, { asChild: !0, children: /* @__PURE__ */ e(
331
331
  "button",
332
332
  {
333
333
  type: "button",
334
- ref: x,
334
+ ref: v,
335
335
  onClick: t,
336
336
  className: g(
337
337
  "h-8 w-8 rounded-full flex items-center justify-center transition-colors",
338
- s === "ghost" && "hover:bg-zinc-100 dark:hover:bg-zinc-800 text-zinc-600 dark:text-zinc-400",
339
- s === "destructive" && "hover:bg-red-50 dark:hover:bg-red-950/30 text-zinc-600 dark:text-zinc-400 hover:text-red-600",
338
+ a === "ghost" && "hover:bg-zinc-100 dark:hover:bg-zinc-800 text-zinc-600 dark:text-zinc-400",
339
+ a === "destructive" && "hover:bg-red-50 dark:hover:bg-red-950/30 text-zinc-600 dark:text-zinc-400 hover:text-red-600",
340
340
  o
341
341
  ),
342
342
  "aria-label": n,
343
343
  ...l,
344
- children: a
344
+ children: s
345
345
  }
346
346
  ) }),
347
- /* @__PURE__ */ e(xe, { side: "bottom", className: "text-xs", children: n })
347
+ /* @__PURE__ */ e(pe, { side: "bottom", className: "text-xs", children: n })
348
348
  ] })
349
349
  );
350
- Ie.displayName = "IconButton";
351
- function Jt({ src: t, alt: n, initials: a, className: o, isClient: s }) {
352
- const [l, x] = le(!1);
350
+ He.displayName = "IconButton";
351
+ function qt({ src: t, alt: n, initials: s, className: o, isClient: a }) {
352
+ const [l, v] = ie(!1);
353
353
  return /* @__PURE__ */ e(
354
354
  "div",
355
355
  {
@@ -363,16 +363,16 @@ function Jt({ src: t, alt: n, initials: a, className: o, isClient: s }) {
363
363
  src: t,
364
364
  alt: n,
365
365
  className: "h-full w-full object-cover",
366
- onError: () => x(!0)
366
+ onError: () => v(!0)
367
367
  }
368
368
  ) : /* @__PURE__ */ e(
369
369
  "div",
370
370
  {
371
371
  className: g(
372
372
  "h-full w-full flex items-center justify-center text-[10px] font-medium",
373
- s ? "bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300" : "bg-zinc-200 dark:bg-zinc-700 text-zinc-700 dark:text-zinc-300"
373
+ a ? "bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300" : "bg-zinc-200 dark:bg-zinc-700 text-zinc-700 dark:text-zinc-300"
374
374
  ),
375
- children: a
375
+ children: s
376
376
  }
377
377
  )
378
378
  }
@@ -381,29 +381,29 @@ function Jt({ src: t, alt: n, initials: a, className: o, isClient: s }) {
381
381
  function Ge({
382
382
  participant: t,
383
383
  isEventCanceled: n = !1,
384
- labels: a
384
+ labels: s
385
385
  }) {
386
- const o = t.name || "Unknown", s = o.split(" ").map((y) => y[0]).join("").toUpperCase().slice(0, 2), l = t.isOrganizer ?? !1, x = t.isConfirmed, h = x === !0, c = x === !1, w = t.isClient ?? !1, P = t.profilePicture || t.avatar, b = n;
386
+ const o = t.name || "Unknown", a = o.split(" ").map((k) => k[0]).join("").toUpperCase().slice(0, 2), l = t.isOrganizer ?? !1, v = t.isConfirmed, h = v === !0, c = v === !1, w = t.isClient ?? !1, P = t.profilePicture || t.avatar, y = n;
387
387
  return /* @__PURE__ */ r(
388
388
  "div",
389
389
  {
390
390
  className: g(
391
391
  "flex items-center gap-3 py-0",
392
- b && "opacity-60"
392
+ y && "opacity-60"
393
393
  ),
394
394
  children: [
395
395
  /* @__PURE__ */ r("div", { className: "relative", children: [
396
396
  /* @__PURE__ */ e(
397
- Jt,
397
+ qt,
398
398
  {
399
399
  src: P,
400
400
  alt: o,
401
- initials: s,
401
+ initials: a,
402
402
  isClient: w,
403
- className: g(b && "grayscale")
403
+ className: g(y && "grayscale")
404
404
  }
405
405
  ),
406
- b || c ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-red-100 dark:bg-red-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(Ae, { className: "h-2 w-2 text-red-600 dark:text-red-400 stroke-[3]" }) }) }) : h ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-green-100 dark:bg-green-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(He, { className: "h-2 w-2 text-green-600 dark:text-green-400 stroke-[3]" }) }) }) : null
406
+ y || c ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-red-100 dark:bg-red-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(Ae, { className: "h-2 w-2 text-red-600 dark:text-red-400 stroke-[3]" }) }) }) : h ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-green-100 dark:bg-green-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(Te, { className: "h-2 w-2 text-green-600 dark:text-green-400 stroke-[3]" }) }) }) : null
407
407
  ] }),
408
408
  /* @__PURE__ */ r("div", { className: "!h-fit min-w-0 gap-0", children: [
409
409
  /* @__PURE__ */ e("div", { className: "gap-0", children: /* @__PURE__ */ e(
@@ -411,31 +411,31 @@ function Ge({
411
411
  {
412
412
  className: g(
413
413
  "text-sm text-zinc-900 dark:text-zinc-100 truncate",
414
- b && "line-through text-zinc-500 dark:text-zinc-500"
414
+ y && "line-through text-zinc-500 dark:text-zinc-500"
415
415
  ),
416
416
  children: o
417
417
  }
418
418
  ) }),
419
- w && /* @__PURE__ */ e("div", { className: "text-[10px] px-1.5 w-fit py-0.5 rounded bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300 font-medium", children: a.client }),
420
- l && !b && /* @__PURE__ */ e("div", { className: "text-xs text-zinc-500", children: a.organizer })
419
+ w && /* @__PURE__ */ e("div", { className: "text-[10px] px-1.5 w-fit py-0.5 rounded bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300 font-medium", children: s.client }),
420
+ l && !y && /* @__PURE__ */ e("div", { className: "text-xs text-zinc-500", children: s.organizer })
421
421
  ] })
422
422
  ]
423
423
  }
424
424
  );
425
425
  }
426
- function qt({
426
+ function Xt({
427
427
  open: t,
428
428
  onOpenChange: n,
429
- title: a,
429
+ title: s,
430
430
  children: o
431
431
  }) {
432
- return he(() => {
432
+ return ue(() => {
433
433
  if (!t) return;
434
- const s = (l) => {
434
+ const a = (l) => {
435
435
  l.key === "Escape" && n(!1);
436
436
  };
437
- return document.addEventListener("keydown", s), () => document.removeEventListener("keydown", s);
438
- }, [t, n]), he(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
437
+ return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
438
+ }, [t, n]), ue(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
439
439
  document.body.style.overflow = "";
440
440
  }), [t]), t ? /* @__PURE__ */ r("div", { className: "fixed inset-0 z-50", children: [
441
441
  /* @__PURE__ */ e(
@@ -443,25 +443,25 @@ function qt({
443
443
  {
444
444
  className: "fixed inset-0 bg-black/50 backdrop-blur-sm",
445
445
  onClick: () => n(!1),
446
- onKeyDown: (s) => {
447
- (s.key === "Enter" || s.key === " ") && n(!1);
446
+ onKeyDown: (a) => {
447
+ (a.key === "Enter" || a.key === " ") && n(!1);
448
448
  }
449
449
  }
450
450
  ),
451
451
  /* @__PURE__ */ e("div", { className: "fixed inset-x-4 top-[50%] translate-y-[-50%] max-w-md mx-auto", children: /* @__PURE__ */ r("div", { className: "bg-white dark:bg-zinc-900 rounded-2xl shadow-xl overflow-hidden", children: [
452
- a && /* @__PURE__ */ e("div", { className: "sr-only", children: a }),
452
+ s && /* @__PURE__ */ e("div", { className: "sr-only", children: s }),
453
453
  o
454
454
  ] }) })
455
455
  ] }) : null;
456
456
  }
457
- function Xt({
457
+ function Qt({
458
458
  open: t,
459
459
  onOpenChange: n,
460
- title: a,
460
+ title: s,
461
461
  description: o,
462
- cancelLabel: s,
462
+ cancelLabel: a,
463
463
  confirmLabel: l,
464
- onConfirm: x,
464
+ onConfirm: v,
465
465
  isLoading: h
466
466
  }) {
467
467
  return t ? /* @__PURE__ */ r("div", { className: "fixed inset-0 z-[60]", children: [
@@ -476,7 +476,7 @@ function Xt({
476
476
  }
477
477
  ),
478
478
  /* @__PURE__ */ e("div", { className: "fixed inset-x-4 top-[50%] translate-y-[-50%] max-w-md mx-auto", children: /* @__PURE__ */ r("div", { className: "bg-white dark:bg-zinc-900 rounded-lg shadow-xl p-6", children: [
479
- /* @__PURE__ */ e("h2", { className: "text-lg font-semibold text-zinc-900 dark:text-zinc-100", children: a }),
479
+ /* @__PURE__ */ e("h2", { className: "text-lg font-semibold text-zinc-900 dark:text-zinc-100", children: s }),
480
480
  /* @__PURE__ */ e("p", { className: "mt-2 text-sm text-zinc-600 dark:text-zinc-400", children: o }),
481
481
  /* @__PURE__ */ r("div", { className: "mt-4 flex justify-end gap-3", children: [
482
482
  /* @__PURE__ */ e(
@@ -485,7 +485,7 @@ function Xt({
485
485
  variant: "outline",
486
486
  size: "sm",
487
487
  onClick: () => n(!1),
488
- children: s
488
+ children: a
489
489
  }
490
490
  ),
491
491
  /* @__PURE__ */ r(
@@ -493,10 +493,10 @@ function Xt({
493
493
  {
494
494
  variant: "destructive",
495
495
  size: "sm",
496
- onClick: x,
496
+ onClick: v,
497
497
  disabled: h,
498
498
  children: [
499
- h && /* @__PURE__ */ e(Ee, { className: "h-4 w-4 mr-2" }),
499
+ h && /* @__PURE__ */ e(Me, { className: "h-4 w-4 mr-2" }),
500
500
  /* @__PURE__ */ e(ft, { className: "h-4 w-4 mr-2" }),
501
501
  l
502
502
  ]
@@ -506,22 +506,22 @@ function Xt({
506
506
  ] }) })
507
507
  ] }) : null;
508
508
  }
509
- function Qt(t, n) {
509
+ function Zt(t, n) {
510
510
  return t.toLocaleDateString(void 0, {
511
511
  weekday: "long",
512
512
  month: "long",
513
513
  day: "numeric"
514
514
  });
515
515
  }
516
- function Zt(t, n) {
517
- const a = {
516
+ function en(t, n) {
517
+ const s = {
518
518
  hour: "2-digit",
519
519
  minute: "2-digit",
520
520
  hour12: !1
521
521
  };
522
- return `${t.toLocaleTimeString(void 0, a)} – ${n.toLocaleTimeString(void 0, a)}`;
522
+ return `${t.toLocaleTimeString(void 0, s)} – ${n.toLocaleTimeString(void 0, s)}`;
523
523
  }
524
- function en(t) {
524
+ function tn(t) {
525
525
  return t.toLocaleDateString(void 0, {
526
526
  day: "2-digit",
527
527
  month: "short",
@@ -530,66 +530,66 @@ function en(t) {
530
530
  minute: "2-digit"
531
531
  });
532
532
  }
533
- function tn(t) {
534
- const [n, a] = le(() => typeof window < "u" ? window.matchMedia(t).matches : !1);
535
- return he(() => {
533
+ function nn(t) {
534
+ const [n, s] = ie(() => typeof window < "u" ? window.matchMedia(t).matches : !1);
535
+ return ue(() => {
536
536
  if (typeof window > "u") return;
537
- const o = window.matchMedia(t), s = (l) => a(l.matches);
538
- return o.addEventListener("change", s), () => o.removeEventListener("change", s);
537
+ const o = window.matchMedia(t), a = (l) => s(l.matches);
538
+ return o.addEventListener("change", a), () => o.removeEventListener("change", a);
539
539
  }, [t]), n;
540
540
  }
541
541
  function Je({
542
542
  event: t,
543
543
  labels: n,
544
- isLoading: a,
544
+ isLoading: s,
545
545
  onClose: o,
546
- onEdit: s,
546
+ onEdit: a,
547
547
  onDelete: l,
548
- onCancel: x,
548
+ onCancel: v,
549
549
  onAccept: h,
550
550
  onDecline: c,
551
551
  onConfirmMeeting: w,
552
552
  canEdit: P = !0,
553
- canDelete: b = !1,
554
- canCancel: y = !0,
553
+ canDelete: y = !1,
554
+ canCancel: k = !0,
555
555
  isCurrentUserParticipant: B = !1,
556
556
  isCurrentUserClient: A = !1,
557
557
  currentUserAcceptStatus: W,
558
558
  isAcceptLoading: F = !1,
559
559
  isDeclineLoading: H = !1,
560
- isConfirmLoading: k = !1,
561
- isDeleteLoading: $ = !1,
560
+ isConfirmLoading: C = !1,
561
+ isDeleteLoading: O = !1,
562
562
  renderParticipant: R,
563
563
  renderHeaderActions: Y,
564
564
  renderCancelReason: M,
565
565
  renderDeleteConfirmation: V,
566
- formatDate: S = Qt,
567
- formatTimeRange: z = Zt
566
+ formatDate: S = Zt,
567
+ formatTimeRange: z = en
568
568
  }) {
569
- const [U, G] = le(!1), X = !(t.isCanceled || t.meetingTookPlace), m = t.isRecurring ?? !1, p = t.participantDetails, f = t.participantsNames || [], E = p && p.length > 0, D = W === !0, T = W === !1, te = B && !A && X, O = E ? p.filter((d) => d.isConfirmed).length : t.isAccepted ? f.length : 0, q = E ? p.length : f.length, re = t.scheduleTypeColor || t.hexColor || "#039BE5", Q = _(() => t.startDate ? S(t.startDate) : n.noDateProvided, [t.startDate, S, n.noDateProvided]), we = _(() => t.startDate && t.endDate ? z(t.startDate, t.endDate) : null, [t.startDate, t.endDate, z]), ae = () => {
570
- o(), s?.(t);
571
- }, se = () => {
572
- o(), x?.(t);
573
- }, ye = () => {
569
+ const [U, G] = ie(!1), Q = !(t.isCanceled || t.meetingTookPlace), m = t.isRecurring ?? !1, p = t.participantDetails, f = t.participantsNames || [], E = p && p.length > 0, D = W === !0, T = W === !1, te = B && !A && Q, _ = E ? p.filter((u) => u.isConfirmed).length : t.isAccepted ? f.length : 0, J = E ? p.length : f.length, re = t.scheduleTypeColor || t.hexColor || "#039BE5", q = $(() => t.startDate ? S(t.startDate) : n.noDateProvided, [t.startDate, S, n.noDateProvided]), ve = $(() => t.startDate && t.endDate ? z(t.startDate, t.endDate) : null, [t.startDate, t.endDate, z]), we = () => {
570
+ o(), a?.(t);
571
+ }, oe = () => {
572
+ o(), v?.(t);
573
+ }, ke = () => {
574
574
  G(!0);
575
- }, ue = () => {
575
+ }, de = () => {
576
576
  l?.(t), G(!1);
577
577
  };
578
- return a ? /* @__PURE__ */ e("div", { className: "flex h-48 items-center justify-center", children: /* @__PURE__ */ e(Ee, { className: "h-6 w-6 text-zinc-400" }) }) : /* @__PURE__ */ r(fe, { delayDuration: 300, children: [
578
+ return s ? /* @__PURE__ */ e("div", { className: "flex h-48 items-center justify-center", children: /* @__PURE__ */ e(Me, { className: "h-6 w-6 text-zinc-400" }) }) : /* @__PURE__ */ r(me, { delayDuration: 300, children: [
579
579
  /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5 p-3", children: [
580
- /* @__PURE__ */ e("div", { className: "flex items-start justify-end gap-0.5", children: Y ? Y({ onClose: o }) : /* @__PURE__ */ r(be, { children: [
581
- X && P && s && /* @__PURE__ */ e(Ie, { onClick: ae, label: n.edit, children: /* @__PURE__ */ e(Ot, { className: "h-[18px] w-[18px]" }) }),
582
- X && y && x && /* @__PURE__ */ e(Ie, { onClick: se, label: n.cancel, children: /* @__PURE__ */ e(_t, { className: "h-[18px] w-[18px]" }) }),
583
- b && l && /* @__PURE__ */ e(
584
- Ie,
580
+ /* @__PURE__ */ e("div", { className: "flex items-start justify-end gap-0.5", children: Y ? Y({ onClose: o }) : /* @__PURE__ */ r(ye, { children: [
581
+ Q && P && a && /* @__PURE__ */ e(He, { onClick: we, label: n.edit, children: /* @__PURE__ */ e(_t, { className: "h-[18px] w-[18px]" }) }),
582
+ Q && k && v && /* @__PURE__ */ e(He, { onClick: oe, label: n.cancel, children: /* @__PURE__ */ e(Bt, { className: "h-[18px] w-[18px]" }) }),
583
+ y && l && /* @__PURE__ */ e(
584
+ He,
585
585
  {
586
- onClick: ye,
586
+ onClick: ke,
587
587
  label: n.delete,
588
588
  variant: "destructive",
589
589
  children: /* @__PURE__ */ e(ft, { className: "h-[18px] w-[18px]" })
590
590
  }
591
591
  ),
592
- /* @__PURE__ */ e(Ie, { onClick: o, label: n.close, children: /* @__PURE__ */ e(Ae, { className: "h-[18px] w-[18px]" }) })
592
+ /* @__PURE__ */ e(He, { onClick: o, label: n.close, children: /* @__PURE__ */ e(Ae, { className: "h-[18px] w-[18px]" }) })
593
593
  ] }) }),
594
594
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ r("div", { className: "flex items-start gap-2", children: [
595
595
  /* @__PURE__ */ e(
@@ -612,7 +612,7 @@ function Je({
612
612
  }
613
613
  ),
614
614
  t.meetingTookPlace && /* @__PURE__ */ r("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400 text-xs font-medium", children: [
615
- /* @__PURE__ */ e(Bt, { className: "h-3 w-3" }),
615
+ /* @__PURE__ */ e(Rt, { className: "h-3 w-3" }),
616
616
  n.completed
617
617
  ] }),
618
618
  t.isCanceled && /* @__PURE__ */ r("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-400 text-xs font-medium", children: [
@@ -621,10 +621,10 @@ function Je({
621
621
  ] })
622
622
  ] }),
623
623
  /* @__PURE__ */ r("div", { className: "mt-1 text-sm text-zinc-600 dark:text-zinc-400", children: [
624
- /* @__PURE__ */ e("span", { children: Q() }),
625
- we() && /* @__PURE__ */ r(be, { children: [
624
+ /* @__PURE__ */ e("span", { children: q() }),
625
+ ve() && /* @__PURE__ */ r(ye, { children: [
626
626
  /* @__PURE__ */ e("span", { className: "mx-1.5", children: "·" }),
627
- /* @__PURE__ */ e("span", { children: we() })
627
+ /* @__PURE__ */ e("span", { children: ve() })
628
628
  ] })
629
629
  ] }),
630
630
  m && t.recurrenceSummary && /* @__PURE__ */ e("div", { className: "text-sm text-zinc-500 dark:text-zinc-500", children: t.recurrenceSummary })
@@ -640,26 +640,26 @@ function Je({
640
640
  t.canceledDate && /* @__PURE__ */ r("div", { className: "mt-1.5 text-xs text-red-500/70 dark:text-red-400/60", children: [
641
641
  n.canceledOn,
642
642
  " ",
643
- en(t.canceledDate)
643
+ tn(t.canceledDate)
644
644
  ] })
645
645
  ] }) }) }),
646
646
  /* @__PURE__ */ r("div", { className: "space-y-0.5", children: [
647
647
  t.address && /* @__PURE__ */ r("div", { className: "flex items-start gap-2", children: [
648
- /* @__PURE__ */ e(Vt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
648
+ /* @__PURE__ */ e(Yt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
649
649
  /* @__PURE__ */ e("span", { className: "text-sm text-zinc-700 dark:text-zinc-300", children: t.address })
650
650
  ] }),
651
651
  (E || f.length > 0) && /* @__PURE__ */ r("div", { className: "flex items-start gap-2 py-0", children: [
652
- /* @__PURE__ */ e(Ut, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
652
+ /* @__PURE__ */ e(Vt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
653
653
  /* @__PURE__ */ r("div", { className: "flex-1", children: [
654
654
  /* @__PURE__ */ r("div", { className: "flex items-center gap-0", children: [
655
655
  /* @__PURE__ */ r("span", { className: "text-sm text-zinc-900 dark:text-zinc-100 font-medium", children: [
656
- q,
656
+ J,
657
657
  " ",
658
- q !== 1 ? n.guests : n.guest
658
+ J !== 1 ? n.guests : n.guest
659
659
  ] }),
660
- q > 0 && /* @__PURE__ */ r("span", { className: "text-xs text-zinc-500", children: [
660
+ J > 0 && /* @__PURE__ */ r("span", { className: "text-xs text-zinc-500", children: [
661
661
  "(",
662
- O,
662
+ _,
663
663
  " ",
664
664
  n.confirmed,
665
665
  ")"
@@ -667,19 +667,19 @@ function Je({
667
667
  ] }),
668
668
  /* @__PURE__ */ r("div", { className: "mt-2 space-y-2", children: [
669
669
  E ? p.slice(0, 6).map(
670
- (d, I) => R ? R(d, I) : /* @__PURE__ */ e(
670
+ (u, I) => R ? R(u, I) : /* @__PURE__ */ e(
671
671
  Ge,
672
672
  {
673
- participant: d,
673
+ participant: u,
674
674
  isEventCanceled: t.isCanceled,
675
675
  labels: n
676
676
  },
677
- d.id
677
+ u.id
678
678
  )
679
- ) : f.slice(0, 6).map((d, I) => {
679
+ ) : f.slice(0, 6).map((u, I) => {
680
680
  const K = {
681
681
  id: String(I),
682
- name: d,
682
+ name: u,
683
683
  email: "",
684
684
  isConfirmed: t.isAccepted,
685
685
  isOrganizer: I === 0,
@@ -692,12 +692,12 @@ function Je({
692
692
  isEventCanceled: t.isCanceled,
693
693
  labels: n
694
694
  },
695
- d
695
+ u
696
696
  );
697
697
  }),
698
- q > 6 && /* @__PURE__ */ r("div", { className: "text-xs text-zinc-500 py-1.5 pl-10", children: [
698
+ J > 6 && /* @__PURE__ */ r("div", { className: "text-xs text-zinc-500 py-1.5 pl-10", children: [
699
699
  "+",
700
- q - 6,
700
+ J - 6,
701
701
  " ",
702
702
  n.more
703
703
  ] })
@@ -705,17 +705,17 @@ function Je({
705
705
  ] })
706
706
  ] }),
707
707
  t.description && /* @__PURE__ */ r("div", { className: "flex items-start gap-2", children: [
708
- /* @__PURE__ */ e(Kt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
708
+ /* @__PURE__ */ e(Gt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
709
709
  /* @__PURE__ */ e("p", { className: "text-sm text-zinc-700 dark:text-zinc-300 whitespace-pre-wrap", children: t.description })
710
710
  ] }),
711
711
  /* @__PURE__ */ r("div", { className: "flex items-start gap-2", children: [
712
- /* @__PURE__ */ e(Yt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
713
- /* @__PURE__ */ e("div", { className: "text-sm text-zinc-700 dark:text-zinc-300", children: E && p.find((d) => d.isOrganizer)?.name || f[0] || "Calendar" })
712
+ /* @__PURE__ */ e(Kt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
713
+ /* @__PURE__ */ e("div", { className: "text-sm text-zinc-700 dark:text-zinc-300", children: E && p.find((u) => u.isOrganizer)?.name || f[0] || "Calendar" })
714
714
  ] })
715
715
  ] }),
716
716
  te && h && c && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 mt-3 py-3", children: /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
717
- m ? /* @__PURE__ */ r(yt, { children: [
718
- /* @__PURE__ */ e(kt, { asChild: !0, children: /* @__PURE__ */ r("div", { className: "flex", children: [
717
+ m ? /* @__PURE__ */ r(kt, { children: [
718
+ /* @__PURE__ */ e(Nt, { asChild: !0, children: /* @__PURE__ */ r("div", { className: "flex", children: [
719
719
  /* @__PURE__ */ e(
720
720
  De,
721
721
  {
@@ -725,12 +725,12 @@ function Je({
725
725
  "rounded-r-none gap-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
726
726
  D && "!bg-green-700 !text-white hover:!bg-green-700"
727
727
  ),
728
- onClick: (d) => {
729
- d.stopPropagation(), D || h(t);
728
+ onClick: (u) => {
729
+ u.stopPropagation(), D || h(t);
730
730
  },
731
731
  disabled: F,
732
- children: F ? /* @__PURE__ */ e(Ee, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(be, { children: [
733
- D && /* @__PURE__ */ e(He, { className: "h-3.5 w-3.5" }),
732
+ children: F ? /* @__PURE__ */ e(Me, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(ye, { children: [
733
+ D && /* @__PURE__ */ e(Te, { className: "h-3.5 w-3.5" }),
734
734
  n.going
735
735
  ] })
736
736
  }
@@ -744,11 +744,11 @@ function Je({
744
744
  "rounded-l-none px-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
745
745
  D && "!bg-green-700 !text-white hover:!bg-green-700"
746
746
  ),
747
- children: /* @__PURE__ */ e(Rt, { className: "h-3.5 w-3.5" })
747
+ children: /* @__PURE__ */ e(Ut, { className: "h-3.5 w-3.5" })
748
748
  }
749
749
  )
750
750
  ] }) }),
751
- /* @__PURE__ */ r(Nt, { align: "start", children: [
751
+ /* @__PURE__ */ r(Ct, { align: "start", children: [
752
752
  /* @__PURE__ */ r(
753
753
  Ve,
754
754
  {
@@ -758,13 +758,13 @@ function Je({
758
758
  ),
759
759
  onClick: () => h(t),
760
760
  children: [
761
- /* @__PURE__ */ e(He, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
761
+ /* @__PURE__ */ e(Te, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
762
762
  n.acceptThisEvent
763
763
  ]
764
764
  }
765
765
  ),
766
766
  /* @__PURE__ */ r(Ve, { onClick: () => h(t), children: [
767
- /* @__PURE__ */ e(He, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
767
+ /* @__PURE__ */ e(Te, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
768
768
  n.acceptAllEvents
769
769
  ] })
770
770
  ] })
@@ -781,8 +781,8 @@ function Je({
781
781
  D || h(t);
782
782
  },
783
783
  disabled: F,
784
- children: F ? /* @__PURE__ */ e(Ee, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(be, { children: [
785
- D && /* @__PURE__ */ e(He, { className: "h-3.5 w-3.5" }),
784
+ children: F ? /* @__PURE__ */ e(Me, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(ye, { children: [
785
+ D && /* @__PURE__ */ e(Te, { className: "h-3.5 w-3.5" }),
786
786
  n.going
787
787
  ] })
788
788
  }
@@ -800,7 +800,7 @@ function Je({
800
800
  T || c(t);
801
801
  },
802
802
  disabled: H,
803
- children: H ? /* @__PURE__ */ e(Ee, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(be, { children: [
803
+ children: H ? /* @__PURE__ */ e(Me, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(ye, { children: [
804
804
  T && /* @__PURE__ */ e(Ae, { className: "h-3.5 w-3.5" }),
805
805
  n.notGoing
806
806
  ] })
@@ -814,20 +814,20 @@ function Je({
814
814
  variant: "outline",
815
815
  className: "w-full h-9 hover:!bg-green-100 hover:text-green-700 text-green-700 !bg-green-100 !border-none dark:text-green-400 dark:hover:bg-green-950/30",
816
816
  onClick: () => w(t),
817
- disabled: k,
817
+ disabled: C,
818
818
  children: [
819
- k && /* @__PURE__ */ e(Ee, { className: "h-4 w-4 mr-2" }),
819
+ C && /* @__PURE__ */ e(Me, { className: "h-4 w-4 mr-2" }),
820
820
  n.confirmMeeting
821
821
  ]
822
822
  }
823
823
  ) })
824
824
  ] }),
825
825
  V ? U && V({
826
- onConfirm: ue,
826
+ onConfirm: de,
827
827
  onCancel: () => G(!1),
828
- isLoading: $
828
+ isLoading: O
829
829
  }) : /* @__PURE__ */ e(
830
- Xt,
830
+ Qt,
831
831
  {
832
832
  open: U,
833
833
  onOpenChange: G,
@@ -835,33 +835,33 @@ function Je({
835
835
  description: n.deleteConfirmDescription,
836
836
  cancelLabel: n.cancel,
837
837
  confirmLabel: n.delete,
838
- onConfirm: ue,
839
- isLoading: $
838
+ onConfirm: de,
839
+ isLoading: O
840
840
  }
841
841
  )
842
842
  ] });
843
843
  }
844
- function Cr({
844
+ function Dr({
845
845
  event: t,
846
846
  children: n,
847
- open: a,
847
+ open: s,
848
848
  onOpenChange: o,
849
- isLoading: s,
849
+ isLoading: a,
850
850
  labels: l,
851
- onEdit: x,
851
+ onEdit: v,
852
852
  onDelete: h,
853
853
  onCancel: c,
854
854
  onAccept: w,
855
855
  onDecline: P,
856
- onConfirmMeeting: b,
857
- canEdit: y = !0,
856
+ onConfirmMeeting: y,
857
+ canEdit: k = !0,
858
858
  canDelete: B = !1,
859
859
  canCancel: A = !0,
860
860
  isCurrentUserParticipant: W,
861
861
  isCurrentUserClient: F,
862
862
  currentUserAcceptStatus: H,
863
- isAcceptLoading: k,
864
- isDeclineLoading: $,
863
+ isAcceptLoading: C,
864
+ isDeclineLoading: O,
865
865
  isConfirmLoading: R,
866
866
  isDeleteLoading: Y,
867
867
  renderParticipant: M,
@@ -870,30 +870,30 @@ function Cr({
870
870
  renderDeleteConfirmation: z,
871
871
  formatDate: U,
872
872
  formatTimeRange: G,
873
- className: X,
873
+ className: Q,
874
874
  width: m = 360
875
875
  }) {
876
- const p = tn("(min-width: 768px)"), f = { ...Gt, ...l }, E = _(() => {
876
+ const p = nn("(min-width: 768px)"), f = { ...Jt, ...l }, E = $(() => {
877
877
  o?.(!1);
878
878
  }, [o]), D = {
879
879
  event: t,
880
880
  labels: f,
881
- isLoading: s,
881
+ isLoading: a,
882
882
  onClose: E,
883
- onEdit: x,
883
+ onEdit: v,
884
884
  onDelete: h,
885
885
  onCancel: c,
886
886
  onAccept: w,
887
887
  onDecline: P,
888
- onConfirmMeeting: b,
889
- canEdit: y,
888
+ onConfirmMeeting: y,
889
+ canEdit: k,
890
890
  canDelete: B,
891
891
  canCancel: A,
892
892
  isCurrentUserParticipant: W,
893
893
  isCurrentUserClient: F,
894
894
  currentUserAcceptStatus: H,
895
- isAcceptLoading: k,
896
- isDeclineLoading: $,
895
+ isAcceptLoading: C,
896
+ isDeclineLoading: O,
897
897
  isConfirmLoading: R,
898
898
  isDeleteLoading: Y,
899
899
  renderParticipant: M,
@@ -903,7 +903,7 @@ function Cr({
903
903
  formatDate: U,
904
904
  formatTimeRange: G
905
905
  };
906
- return p ? /* @__PURE__ */ r(ct, { open: a ?? !1, onOpenChange: o ?? (() => {
906
+ return p ? /* @__PURE__ */ r(ct, { open: s ?? !1, onOpenChange: o ?? (() => {
907
907
  }), children: [
908
908
  /* @__PURE__ */ e(dt, { asChild: !0, children: n }),
909
909
  /* @__PURE__ */ e(
@@ -911,7 +911,7 @@ function Cr({
911
911
  {
912
912
  className: g(
913
913
  "p-0 shadow-lg !rounded-2xl bg-white dark:bg-zinc-900 overflow-hidden border z-50",
914
- X
914
+ Q
915
915
  ),
916
916
  style: { width: m },
917
917
  align: "center",
@@ -920,12 +920,12 @@ function Cr({
920
920
  children: /* @__PURE__ */ e(Je, { ...D })
921
921
  }
922
922
  )
923
- ] }) : /* @__PURE__ */ r(be, { children: [
923
+ ] }) : /* @__PURE__ */ r(ye, { children: [
924
924
  n,
925
925
  /* @__PURE__ */ e(
926
- qt,
926
+ Xt,
927
927
  {
928
- open: a ?? !1,
928
+ open: s ?? !1,
929
929
  onOpenChange: o ?? (() => {
930
930
  }),
931
931
  title: t.title,
@@ -934,29 +934,29 @@ function Cr({
934
934
  )
935
935
  ] });
936
936
  }
937
- const Fe = 44, qe = 4, nn = 56, Xe = 8, ze = 80, Se = 140, Qe = 100, Ze = 2, rn = 8, on = 18;
937
+ const $e = 44, qe = 4, rn = 56, Xe = 8, ze = 80, Le = 140, Qe = 100, Ze = 2, on = 8, sn = 18;
938
938
  function an(t) {
939
939
  return t.split(" ").map((n) => n[0]).join("").toUpperCase().slice(0, 2);
940
940
  }
941
- function sn(t, n) {
942
- const a = [];
941
+ function ln(t, n) {
942
+ const s = [];
943
943
  for (let o = 0; o < n; o++) {
944
- const s = new Date(t);
945
- s.setDate(s.getDate() + o), a.push(s);
944
+ const a = new Date(t);
945
+ a.setDate(a.getDate() + o), s.push(a);
946
946
  }
947
- return a;
947
+ return s;
948
948
  }
949
- function ln(t, n, a) {
949
+ function cn(t, n, s) {
950
950
  const o = [];
951
- return t.forEach((s, l) => {
952
- for (let x = n; x < a; x++)
953
- o.push({ hour: x, dayIndex: l, date: s });
951
+ return t.forEach((a, l) => {
952
+ for (let v = n; v < s; v++)
953
+ o.push({ hour: v, dayIndex: l, date: a });
954
954
  }), o;
955
955
  }
956
- function $e(t) {
956
+ function Oe(t) {
957
957
  return `${t.toString().padStart(2, "0")}:00`;
958
958
  }
959
- function cn(t) {
959
+ function dn(t) {
960
960
  return t.toLocaleDateString("en-US", {
961
961
  weekday: "short",
962
962
  month: "short",
@@ -964,19 +964,19 @@ function cn(t) {
964
964
  });
965
965
  }
966
966
  function et(t) {
967
- const n = [...t].sort((s, l) => s.startCol !== l.startCol ? s.startCol - l.startCol : l.spanCols - s.spanCols), a = [], o = [];
968
- for (const s of n) {
967
+ const n = [...t].sort((a, l) => a.startCol !== l.startCol ? a.startCol - l.startCol : l.spanCols - a.spanCols), s = [], o = [];
968
+ for (const a of n) {
969
969
  let l = 0;
970
- for (; o[l] !== void 0 && o[l] > s.startCol; )
970
+ for (; o[l] !== void 0 && o[l] > a.startCol; )
971
971
  l++;
972
- o[l] = s.startCol + s.spanCols, a.push({
973
- ...s,
972
+ o[l] = a.startCol + a.spanCols, s.push({
973
+ ...a,
974
974
  stackIndex: l
975
975
  });
976
976
  }
977
- return a;
977
+ return s;
978
978
  }
979
- function dn({ src: t, alt: n, fallback: a, className: o }) {
979
+ function un({ src: t, alt: n, fallback: s, className: o }) {
980
980
  return /* @__PURE__ */ e(
981
981
  "div",
982
982
  {
@@ -991,109 +991,109 @@ function dn({ src: t, alt: n, fallback: a, className: o }) {
991
991
  alt: n,
992
992
  className: "aspect-square h-full w-full object-cover"
993
993
  }
994
- ) : /* @__PURE__ */ e("div", { className: "flex h-full w-full items-center justify-center bg-muted text-muted-foreground", children: a })
994
+ ) : /* @__PURE__ */ e("div", { className: "flex h-full w-full items-center justify-center bg-muted text-muted-foreground", children: s })
995
995
  }
996
996
  );
997
997
  }
998
- const un = 7;
999
- function Te({
1000
- daysToShow: t = un,
998
+ const hn = 7;
999
+ function Se({
1000
+ daysToShow: t = hn,
1001
1001
  events: n,
1002
- users: a = [],
1002
+ users: s = [],
1003
1003
  alwaysShowResources: o,
1004
- selectedDate: s,
1004
+ selectedDate: a,
1005
1005
  onDateChange: l,
1006
- onEventClick: x,
1006
+ onEventClick: v,
1007
1007
  onSlotClick: h,
1008
1008
  onSlotSelect: c,
1009
1009
  visibleHours: w,
1010
1010
  className: P,
1011
- getEventUserId: b,
1012
- renderPopover: y,
1011
+ getEventUserId: y,
1012
+ renderPopover: k,
1013
1013
  slots: B,
1014
1014
  classNames: A,
1015
1015
  enableDrag: W = !0
1016
1016
  }) {
1017
- const F = ie(null), H = Tt(), [k, $] = le(null), R = ie(!1), [Y, M] = le(null), V = s ?? /* @__PURE__ */ new Date(), S = !0, z = w?.from ?? rn, U = w?.to ?? on, G = U - z, X = ee(() => {
1017
+ const F = ae(null), H = Ht(), [C, O] = ie(null), R = ae(!1), [Y, M] = ie(null), V = a ?? /* @__PURE__ */ new Date(), S = !0, z = w?.from ?? on, U = w?.to ?? sn, G = U - z, Q = ee(() => {
1018
1018
  const i = new Date(V);
1019
1019
  if (t === 1 || t === 3)
1020
1020
  return i.setHours(0, 0, 0, 0), i;
1021
- const u = i.getDay(), v = u === 0 ? -6 : 1 - u;
1022
- return i.setDate(i.getDate() + v), i.setHours(0, 0, 0, 0), i;
1021
+ const d = i.getDay(), x = d === 0 ? -6 : 1 - d;
1022
+ return i.setDate(i.getDate() + x), i.setHours(0, 0, 0, 0), i;
1023
1023
  }, [V, t]), m = ee(
1024
- () => sn(X, t),
1025
- [X, t]
1024
+ () => ln(Q, t),
1025
+ [Q, t]
1026
1026
  ), p = ee(
1027
- () => ln(m, z, U),
1027
+ () => cn(m, z, U),
1028
1028
  [S, m, z, U]
1029
- ), E = b ?? ((i) => {
1029
+ ), E = y ?? ((i) => {
1030
1030
  if (i.resourceId) return i.resourceId;
1031
- const u = i.data;
1032
- if (u?.userId) return String(u.userId);
1033
- if (u?.user && typeof u.user == "object" && u.user.id)
1034
- return String(u.user.id);
1031
+ const d = i.data;
1032
+ if (d?.userId) return String(d.userId);
1033
+ if (d?.user && typeof d.user == "object" && d.user.id)
1034
+ return String(d.user.id);
1035
1035
  if (i.user?.id) return i.user.id;
1036
1036
  if (i.participants?.[0]?.id) return i.participants[0].id;
1037
1037
  }), D = ee(() => {
1038
1038
  const i = /* @__PURE__ */ new Map();
1039
- for (const u of a)
1040
- i.set(u.id, {
1041
- id: u.id,
1042
- name: u.name,
1043
- avatar: u.avatar ?? void 0,
1044
- email: u.email
1039
+ for (const d of s)
1040
+ i.set(d.id, {
1041
+ id: d.id,
1042
+ name: d.name,
1043
+ avatar: d.avatar ?? void 0,
1044
+ email: d.email
1045
1045
  });
1046
- for (const u of n) {
1047
- const N = u.data?.user;
1048
- N?.id && !i.has(N.id) && i.set(N.id, {
1049
- id: N.id,
1050
- name: N.name ?? "",
1051
- avatar: N.avatar ?? void 0,
1052
- email: N.email
1053
- }), u.user?.id && !i.has(u.user.id) && i.set(u.user.id, {
1054
- id: u.user.id,
1055
- name: u.user.name,
1056
- avatar: u.user.avatar ?? void 0,
1057
- email: u.user.email
1046
+ for (const d of n) {
1047
+ const b = d.data?.user;
1048
+ b?.id && !i.has(b.id) && i.set(b.id, {
1049
+ id: b.id,
1050
+ name: b.name ?? "",
1051
+ avatar: b.avatar ?? void 0,
1052
+ email: b.email
1053
+ }), d.user?.id && !i.has(d.user.id) && i.set(d.user.id, {
1054
+ id: d.user.id,
1055
+ name: d.user.name,
1056
+ avatar: d.user.avatar ?? void 0,
1057
+ email: d.user.email
1058
1058
  });
1059
- for (const C of u.participants || [])
1060
- C.id && !i.has(C.id) && i.set(C.id, {
1061
- id: C.id,
1062
- name: C.name,
1063
- avatar: C.avatar ?? void 0,
1064
- email: C.email
1059
+ for (const N of d.participants || [])
1060
+ N.id && !i.has(N.id) && i.set(N.id, {
1061
+ id: N.id,
1062
+ name: N.name,
1063
+ avatar: N.avatar ?? void 0,
1064
+ email: N.email
1065
1065
  });
1066
1066
  }
1067
1067
  return Array.from(i.values());
1068
- }, [a, n]), T = ee(() => {
1069
- const i = [], u = /* @__PURE__ */ new Map();
1070
- for (const C of D)
1071
- u.set(C.id, []);
1072
- u.set("unassigned", []);
1073
- for (const C of n) {
1074
- const L = E(C) ?? "unassigned";
1075
- (u.get(L) ?? u.get("unassigned")).push(C);
1068
+ }, [s, n]), T = ee(() => {
1069
+ const i = [], d = /* @__PURE__ */ new Map();
1070
+ for (const N of D)
1071
+ d.set(N.id, []);
1072
+ d.set("unassigned", []);
1073
+ for (const N of n) {
1074
+ const L = E(N) ?? "unassigned";
1075
+ (d.get(L) ?? d.get("unassigned")).push(N);
1076
1076
  }
1077
- const v = (C) => {
1077
+ const x = (N) => {
1078
1078
  const L = [];
1079
- for (const j of C) {
1079
+ for (const j of N) {
1080
1080
  const Z = j.startDate.getHours() + j.startDate.getMinutes() / 60, ne = j.endDate.getHours() + j.endDate.getMinutes() / 60;
1081
- for (let J = 0; J < m.length; J++) {
1082
- const oe = m[J], ke = We(oe), Ne = ht(oe);
1083
- if (j.startDate <= Ne && j.endDate >= ke) {
1084
- let Ce = z, Le = U;
1085
- if (j.startDate >= ke && (Ce = Math.max(z, Z)), j.endDate <= Ne && (Le = Math.min(U, ne)), Ce = Math.max(
1081
+ for (let X = 0; X < m.length; X++) {
1082
+ const se = m[X], Ne = We(se), Ce = ht(se);
1083
+ if (j.startDate <= Ce && j.endDate >= Ne) {
1084
+ let be = z, Ee = U;
1085
+ if (j.startDate >= Ne && (be = Math.max(z, Z)), j.endDate <= Ce && (Ee = Math.min(U, ne)), be = Math.max(
1086
1086
  z,
1087
- Math.min(U, Ce)
1088
- ), Le = Math.max(
1087
+ Math.min(U, be)
1088
+ ), Ee = Math.max(
1089
1089
  z,
1090
- Math.min(U, Le)
1091
- ), Le > Ce) {
1092
- const Ue = J * G + Math.floor(Ce - z), pt = J * G + Math.ceil(Le - z);
1090
+ Math.min(U, Ee)
1091
+ ), Ee > be) {
1092
+ const pt = X * G + (be - z), xt = Ee - be;
1093
1093
  L.push({
1094
1094
  event: j,
1095
- startCol: Ue,
1096
- spanCols: Math.max(1, pt - Ue)
1095
+ startCol: pt,
1096
+ spanCols: xt
1097
1097
  });
1098
1098
  }
1099
1099
  }
@@ -1101,20 +1101,20 @@ function Te({
1101
1101
  }
1102
1102
  return L;
1103
1103
  };
1104
- for (const C of D) {
1105
- const L = u.get(C.id) ?? [], j = v(L), Z = et(j), ne = Z.reduce(
1106
- (J, oe) => Math.max(J, oe.stackIndex + 1),
1104
+ for (const N of D) {
1105
+ const L = d.get(N.id) ?? [], j = x(L), Z = et(j), ne = Z.reduce(
1106
+ (X, se) => Math.max(X, se.stackIndex + 1),
1107
1107
  0
1108
1108
  );
1109
1109
  i.push({
1110
- user: C,
1110
+ user: N,
1111
1111
  events: Z,
1112
1112
  maxStack: Math.max(ne, 1)
1113
1113
  });
1114
1114
  }
1115
- const N = u.get("unassigned") ?? [];
1116
- if (N.length > 0) {
1117
- const C = v(N), L = et(C), j = L.reduce(
1115
+ const b = d.get("unassigned") ?? [];
1116
+ if (b.length > 0) {
1117
+ const N = x(b), L = et(N), j = L.reduce(
1118
1118
  (Z, ne) => Math.max(Z, ne.stackIndex + 1),
1119
1119
  0
1120
1120
  );
@@ -1130,9 +1130,9 @@ function Te({
1130
1130
  });
1131
1131
  }
1132
1132
  if (o?.length) {
1133
- const C = new Set(i.map((L) => L.user.id));
1133
+ const N = new Set(i.map((L) => L.user.id));
1134
1134
  for (const L of o)
1135
- C.has(L.id) || (i.push({
1135
+ N.has(L.id) || (i.push({
1136
1136
  user: {
1137
1137
  id: L.id,
1138
1138
  name: L.name,
@@ -1141,7 +1141,7 @@ function Te({
1141
1141
  },
1142
1142
  events: [],
1143
1143
  maxStack: 1
1144
- }), C.add(L.id));
1144
+ }), N.add(L.id));
1145
1145
  }
1146
1146
  return i;
1147
1147
  }, [
@@ -1156,61 +1156,70 @@ function Te({
1156
1156
  o
1157
1157
  ]), te = ee(() => {
1158
1158
  const i = /* @__PURE__ */ new Map();
1159
- for (const u of T)
1160
- for (const v of u.events)
1161
- if (v.spanCols === 1) {
1162
- const N = i.get(v.startCol) ?? 0;
1163
- i.set(v.startCol, N + 1);
1159
+ for (const d of T)
1160
+ for (const x of d.events)
1161
+ if (x.spanCols <= 1) {
1162
+ const b = Math.floor(x.startCol), N = i.get(b) ?? 0;
1163
+ i.set(b, N + 1);
1164
1164
  }
1165
1165
  return i;
1166
- }, [T]), O = ee(() => {
1167
- const i = p.length, u = ze, v = [];
1168
- for (let N = 0; N < i; N++) {
1169
- const C = te.get(N) ?? 0;
1170
- C > Ze ? v.push(
1171
- Qe + (C - Ze) * 20
1172
- ) : C > 0 ? v.push(Math.max(u, Qe)) : v.push(u);
1166
+ }, [T]), _ = ee(() => {
1167
+ const i = p.length, d = ze, x = [];
1168
+ for (let b = 0; b < i; b++) {
1169
+ const N = te.get(b) ?? 0;
1170
+ N > Ze ? x.push(
1171
+ Qe + (N - Ze) * 20
1172
+ ) : N > 0 ? x.push(Math.max(d, Qe)) : x.push(d);
1173
1173
  }
1174
- return v;
1174
+ return x;
1175
1175
  }, [
1176
1176
  S,
1177
1177
  p.length,
1178
1178
  m.length,
1179
1179
  te
1180
- ]), q = (i) => Math.max(
1181
- nn,
1182
- i * (Fe + qe) + Xe * 2
1183
- ), re = Se + O.reduce((i, u) => i + u, 0), Q = ee(() => {
1180
+ ]), J = (i) => Math.max(
1181
+ rn,
1182
+ i * ($e + qe) + Xe * 2
1183
+ ), re = Le + _.reduce((i, d) => i + d, 0), q = ee(() => {
1184
1184
  const i = [0];
1185
- for (let u = 0; u < O.length; u++)
1186
- i.push(i[u] + O[u]);
1185
+ for (let d = 0; d < _.length; d++)
1186
+ i.push(i[d] + _[d]);
1187
1187
  return i;
1188
- }, [O]);
1189
- wt(() => {
1188
+ }, [_]), ve = $(
1189
+ (i) => {
1190
+ const d = q.length - 1;
1191
+ if (i <= 0) return q[0] ?? 0;
1192
+ if (i >= d) return q[d] ?? 0;
1193
+ const x = Math.floor(i), b = q[x] ?? 0, N = q[x + 1] ?? b;
1194
+ return b + (i - x) * (N - b);
1195
+ },
1196
+ [q]
1197
+ );
1198
+ bt(() => {
1190
1199
  const i = F.current;
1191
1200
  if (!i) return;
1192
- const u = () => {
1193
- let v = -1;
1194
- const C = (/* @__PURE__ */ new Date()).getHours();
1201
+ const d = () => {
1202
+ let x = -1;
1203
+ const N = (/* @__PURE__ */ new Date()).getHours();
1195
1204
  {
1196
1205
  for (let L = 0; L < p.length; L++) {
1197
1206
  const j = p[L];
1198
- if (j && de(j.date) && j.hour <= C && j.hour + 1 > C) {
1199
- v = L;
1207
+ if (j && ce(j.date) && j.hour <= N && j.hour + 1 > N) {
1208
+ x = L;
1200
1209
  break;
1201
1210
  }
1202
1211
  }
1203
- if (v === -1)
1212
+ if (x === -1)
1204
1213
  for (let L = 0; L < p.length; L++) {
1205
1214
  const j = p[L];
1206
- if (j && de(j.date)) {
1207
- v = L;
1215
+ if (j && ce(j.date)) {
1216
+ x = L;
1208
1217
  break;
1209
1218
  }
1210
1219
  }
1211
1220
  }
1212
- if (v !== -1) {
1213
- const L = (Q[v] ?? 0) + Se, j = i.clientWidth, Z = Math.max(0, L - j / 3);
1221
+ if (x !== -1) {
1222
+ const L = (q[x] ?? 0) + Le, j = i.clientWidth, Z = Math.max(0, L - j / 3);
1214
1223
  i.scrollTo({
1215
1224
  left: Z,
1216
1225
  behavior: "instant"
@@ -1218,104 +1227,104 @@ function Te({
1218
1227
  }
1219
1228
  };
1220
1229
  requestAnimationFrame(() => {
1221
- requestAnimationFrame(u);
1230
+ requestAnimationFrame(d);
1222
1231
  });
1223
- }, [V, p, m, Q, S]);
1224
- const we = _(
1225
- (i, u) => {
1226
- const v = u.getBoundingClientRect(), N = i - v.left + u.scrollLeft;
1227
- for (let C = 0; C < Q.length - 1; C++) {
1228
- const L = Q[C], j = Q[C + 1];
1229
- if (N >= L && N < j) {
1230
- const Z = (N - L) / (j - L), ne = Math.floor(Z * 60), J = Math.round(ne / 15) * 15;
1231
- return { colIndex: C, minute: Math.min(J, 45) };
1232
+ }, [V, p, m, q, S]);
1233
+ const we = $(
1234
+ (i, d) => {
1235
+ const x = d.getBoundingClientRect(), b = i - x.left + d.scrollLeft;
1236
+ for (let N = 0; N < q.length - 1; N++) {
1237
+ const L = q[N], j = q[N + 1];
1238
+ if (b >= L && b < j) {
1239
+ const Z = (b - L) / (j - L), ne = Math.floor(Z * 60), X = Math.round(ne / 15) * 15;
1240
+ return { colIndex: N, minute: Math.min(X, 45) };
1232
1241
  }
1233
1242
  }
1234
1243
  return null;
1235
1244
  },
1236
- [Q]
1237
- ), ae = _(
1238
- (i, u) => {
1245
+ [q]
1246
+ ), oe = $(
1247
+ (i, d) => {
1239
1248
  if (p[i]) {
1240
- const v = p[i], N = new Date(v.date);
1241
- return N.setHours(v.hour, u ?? 0, 0, 0), { date: N, hour: v.hour };
1249
+ const x = p[i], b = new Date(x.date);
1250
+ return b.setHours(x.hour, d ?? 0, 0, 0), { date: b, hour: x.hour };
1242
1251
  }
1243
1252
  return { date: /* @__PURE__ */ new Date() };
1244
1253
  },
1245
1254
  [S, p, m]
1246
- ), se = _(
1247
- (i, u) => {
1255
+ ), ke = $(
1256
+ (i, d) => {
1248
1257
  if (i.preventDefault(), i.dataTransfer.dropEffect = "move", !H?.isDragging || !H.dragState) return;
1249
- const v = i.currentTarget, N = we(i.clientX, v);
1250
- if (!N) return;
1251
- const { colIndex: C, minute: L } = N, { date: j, hour: Z } = ae(C, L);
1252
- H.updateDragPreview(j, Z, L, u);
1253
- const { originalStartDate: ne, originalEndDate: J } = H.dragState, oe = J.getTime() - ne.getTime(), ke = p.length;
1254
- let Ne;
1258
+ const x = i.currentTarget, b = we(i.clientX, x);
1259
+ if (!b) return;
1260
+ const { colIndex: N, minute: L } = b, { date: j, hour: Z } = oe(N, L);
1261
+ H.updateDragPreview(j, Z, L, d);
1262
+ const { originalStartDate: ne, originalEndDate: X } = H.dragState, se = X.getTime() - ne.getTime(), Ne = p.length;
1263
+ let Ce;
1255
1264
  {
1256
- const Ce = oe / 36e5;
1257
- Ne = Math.max(1, Math.ceil(Ce));
1265
+ const be = se / 36e5;
1266
+ Ce = Math.max(1, Math.ceil(be));
1258
1267
  }
1259
- Ne = Math.min(Ne, ke - C), M({ resourceId: u, colIndex: C, spanCols: Ne });
1268
+ Ce = Math.min(Ce, Ne - N), M({ resourceId: d, colIndex: N, spanCols: Ce });
1260
1269
  },
1261
- [H, we, ae, S, p.length, m.length]
1262
- ), ye = _(
1270
+ [H, we, oe, S, p.length, m.length]
1271
+ ), de = $(
1263
1272
  (i) => {
1264
- const u = i.relatedTarget;
1265
- i.currentTarget.contains(u) || M(null);
1273
+ const d = i.relatedTarget;
1274
+ i.currentTarget.contains(d) || M(null);
1266
1275
  },
1267
1276
  []
1268
- ), ue = _(
1269
- (i, u) => {
1277
+ ), u = $(
1278
+ (i, d) => {
1270
1279
  i.preventDefault(), M(null), H?.isDragging && H.endDrag();
1271
1280
  },
1272
1281
  [H]
1273
- ), d = _(
1274
- (i, u) => {
1275
- if (!k || k.resourceId !== i) return !1;
1276
- const v = Math.min(k.startCol, k.endCol), N = Math.max(k.startCol, k.endCol);
1277
- return u >= v && u <= N;
1282
+ ), I = $(
1283
+ (i, d) => {
1284
+ if (!C || C.resourceId !== i) return !1;
1285
+ const x = Math.min(C.startCol, C.endCol), b = Math.max(C.startCol, C.endCol);
1286
+ return d >= x && d <= b;
1278
1287
  },
1279
- [k]
1280
- ), I = _(
1281
- (i, u) => !Y || Y.resourceId !== i ? !1 : u >= Y.colIndex && u < Y.colIndex + Y.spanCols,
1288
+ [C]
1289
+ ), K = $(
1290
+ (i, d) => !Y || Y.resourceId !== i ? !1 : d >= Y.colIndex && d < Y.colIndex + Y.spanCols,
1282
1291
  [Y]
1283
- ), K = _(
1284
- (i, u, v) => {
1285
- v.button !== 0 && v.pointerType === "mouse" || (c || h) && (v.preventDefault(), R.current = !0, $({ resourceId: i, startCol: u, endCol: u, isSelecting: !0 }));
1292
+ ), le = $(
1293
+ (i, d, x) => {
1294
+ x.button !== 0 && x.pointerType === "mouse" || (c || h) && (x.preventDefault(), R.current = !0, O({ resourceId: i, startCol: d, endCol: d, isSelecting: !0 }));
1286
1295
  },
1287
1296
  [c, h]
1288
- ), ce = _(
1289
- (i, u, v) => {
1290
- if (R.current && !(!k || k.resourceId !== i)) {
1291
- if (v.buttons === 0) {
1297
+ ), Ie = $(
1298
+ (i, d, x) => {
1299
+ if (R.current && !(!C || C.resourceId !== i)) {
1300
+ if (x.buttons === 0) {
1292
1301
  R.current = !1;
1293
1302
  return;
1294
1303
  }
1295
- $((N) => N ? { ...N, endCol: u } : null);
1304
+ O((b) => b ? { ...b, endCol: d } : null);
1296
1305
  }
1297
1306
  },
1298
- [k]
1299
- ), Me = _(() => {
1300
- if (!R.current || !k) return;
1307
+ [C]
1308
+ ), Fe = $(() => {
1309
+ if (!R.current || !C) return;
1301
1310
  R.current = !1;
1302
- const i = Math.min(k.startCol, k.endCol), u = Math.max(k.startCol, k.endCol), v = ae(i), N = ae(u), C = new Date(v.date), L = new Date(N.date);
1303
- N.hour !== void 0 && L.setHours(N.hour + 1, 0, 0, 0);
1311
+ const i = Math.min(C.startCol, C.endCol), d = Math.max(C.startCol, C.endCol), x = oe(i), b = oe(d), N = new Date(x.date), L = new Date(b.date);
1312
+ b.hour !== void 0 && L.setHours(b.hour + 1, 0, 0, 0);
1304
1313
  const j = {
1305
- startDate: C,
1314
+ startDate: N,
1306
1315
  endDate: L,
1307
- resourceId: k.resourceId
1316
+ resourceId: C.resourceId
1308
1317
  };
1309
- i === u && h && h(v.date, v.hour, k.resourceId), c?.(j), $((Z) => Z ? { ...Z, isSelecting: !1 } : null), setTimeout(() => $(null), 150);
1310
- }, [k, ae, S, h, c]);
1311
- return he(() => {
1318
+ i === d && h && h(x.date, x.hour, C.resourceId), c?.(j), O((Z) => Z ? { ...Z, isSelecting: !1 } : null), setTimeout(() => O(null), 150);
1319
+ }, [C, oe, S, h, c]);
1320
+ return ue(() => {
1312
1321
  const i = () => {
1313
- R.current && Me();
1322
+ R.current && Fe();
1314
1323
  };
1315
1324
  return window.addEventListener("pointerup", i), window.addEventListener("pointercancel", i), () => {
1316
1325
  window.removeEventListener("pointerup", i), window.removeEventListener("pointercancel", i);
1317
1326
  };
1318
- }, [Me]), he(() => {
1327
+ }, [Fe]), ue(() => {
1319
1328
  H?.isDragging || M(null);
1320
1329
  }, [H?.isDragging]), /* @__PURE__ */ e("div", { className: g("flex h-full flex-col", P), children: /* @__PURE__ */ e("div", { className: "ic-timeline-scroll-container flex-1", ref: F, children: /* @__PURE__ */ r("div", { className: "relative", style: { minWidth: re }, children: [
1321
1330
  // Hour mode: Day headers + Hour sub-headers - sticky wrapper with flex child (sticky + flex breaks sticky)
@@ -1326,38 +1335,38 @@ function Te({
1326
1335
  "div",
1327
1336
  {
1328
1337
  className: "flex shrink-0 items-center justify-center border-r bg-background px-2 sticky left-0 z-10",
1329
- style: { width: Se },
1338
+ style: { width: Le },
1330
1339
  children: /* @__PURE__ */ e("span", { className: "text-[10px] font-medium uppercase text-muted-foreground", children: "Resources" })
1331
1340
  }
1332
1341
  ),
1333
1342
  /* @__PURE__ */ r("div", { className: "flex min-w-0 flex-col", children: [
1334
- /* @__PURE__ */ e("div", { className: "flex border-b", children: m.map((i, u) => {
1335
- const v = de(i), N = u * G, C = O.slice(N, N + G).reduce((L, j) => L + j, 0);
1343
+ /* @__PURE__ */ e("div", { className: "flex border-b", children: m.map((i, d) => {
1344
+ const x = ce(i), b = d * G, N = _.slice(b, b + G).reduce((L, j) => L + j, 0);
1336
1345
  return /* @__PURE__ */ e(
1337
1346
  "div",
1338
1347
  {
1339
1348
  className: g(
1340
1349
  "flex shrink-0 items-center justify-center border-r py-1.5 font-medium",
1341
- v ? "bg-primary/10 text-primary" : "bg-muted/30"
1350
+ x ? "bg-primary/10 text-primary" : "bg-muted/30"
1342
1351
  ),
1343
- style: { width: C },
1344
- children: /* @__PURE__ */ e("span", { className: "text-xs", children: cn(i) })
1352
+ style: { width: N },
1353
+ children: /* @__PURE__ */ e("span", { className: "text-xs", children: dn(i) })
1345
1354
  },
1346
1355
  `day-${i.toISOString()}`
1347
1356
  );
1348
1357
  }) }),
1349
- /* @__PURE__ */ e("div", { className: "flex", children: p.map((i, u) => {
1350
- const v = i.hour === z, N = de(i.date), C = O[u] ?? ze;
1358
+ /* @__PURE__ */ e("div", { className: "flex", children: p.map((i, d) => {
1359
+ const x = i.hour === z, b = ce(i.date), N = _[d] ?? ze;
1351
1360
  return /* @__PURE__ */ e(
1352
1361
  "div",
1353
1362
  {
1354
1363
  className: g(
1355
1364
  "flex shrink-0 items-center justify-center py-1.5 text-[10px] text-muted-foreground",
1356
- v && u > 0 ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1357
- N && "bg-primary/5"
1365
+ x && d > 0 ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1366
+ b && "bg-primary/5"
1358
1367
  ),
1359
- style: { width: C },
1360
- children: $e(i.hour)
1368
+ style: { width: N },
1369
+ children: Oe(i.hour)
1361
1370
  },
1362
1371
  `hour-${i.dayIndex}-${i.hour}`
1363
1372
  );
@@ -1371,22 +1380,22 @@ function Te({
1371
1380
  "div",
1372
1381
  {
1373
1382
  className: "flex shrink-0 items-center border-r bg-background px-2 py-2",
1374
- style: { width: Se },
1383
+ style: { width: Le },
1375
1384
  children: /* @__PURE__ */ e("span", { className: "text-[10px] font-medium uppercase text-muted-foreground", children: "Resources" })
1376
1385
  }
1377
1386
  ),
1378
- p.map((i, u) => {
1379
- const v = i.hour === z, N = de(i.date), C = O[u] ?? ze;
1387
+ p.map((i, d) => {
1388
+ const x = i.hour === z, b = ce(i.date), N = _[d] ?? ze;
1380
1389
  return /* @__PURE__ */ e(
1381
1390
  "div",
1382
1391
  {
1383
1392
  className: g(
1384
1393
  "flex shrink-0 items-center justify-center py-1.5 text-[10px] text-muted-foreground",
1385
- v && u > 0 ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1386
- N && "bg-primary/5"
1394
+ x && d > 0 ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1395
+ b && "bg-primary/5"
1387
1396
  ),
1388
- style: { width: C },
1389
- children: $e(i.hour)
1397
+ style: { width: N },
1398
+ children: Oe(i.hour)
1390
1399
  },
1391
1400
  `hour-${i.dayIndex}-${i.hour}`
1392
1401
  );
@@ -1394,7 +1403,7 @@ function Te({
1394
1403
  ] })
1395
1404
  ) }),
1396
1405
  T.map((i) => {
1397
- const u = q(i.maxStack);
1406
+ const d = J(i.maxStack);
1398
1407
  return /* @__PURE__ */ r(
1399
1408
  "div",
1400
1409
  {
@@ -1402,13 +1411,13 @@ function Te({
1402
1411
  "relative flex border-b",
1403
1412
  A?.resourceRow
1404
1413
  ),
1405
- style: { height: u },
1414
+ style: { height: d },
1406
1415
  children: [
1407
1416
  /* @__PURE__ */ e(
1408
1417
  "div",
1409
1418
  {
1410
1419
  className: "sticky left-0 z-10",
1411
- style: { width: Se },
1420
+ style: { width: Le },
1412
1421
  children: /* @__PURE__ */ r(
1413
1422
  "div",
1414
1423
  {
@@ -1418,7 +1427,7 @@ function Te({
1418
1427
  ),
1419
1428
  children: [
1420
1429
  /* @__PURE__ */ e(
1421
- dn,
1430
+ un,
1422
1431
  {
1423
1432
  className: "size-7",
1424
1433
  src: i.user.avatar,
@@ -1436,31 +1445,31 @@ function Te({
1436
1445
  "div",
1437
1446
  {
1438
1447
  className: "ic-timeline-grid relative flex",
1439
- onDragOver: (v) => se(v, i.user.id),
1440
- onDragLeave: ye,
1441
- onDrop: (v) => ue(v, i.user.id),
1448
+ onDragOver: (x) => ke(x, i.user.id),
1449
+ onDragLeave: de,
1450
+ onDrop: (x) => u(x, i.user.id),
1442
1451
  children: [
1443
1452
  // Hour mode cells — interactive buttons for slot selection
1444
- p.map((v, N) => {
1445
- const C = v.hour === z && N > 0, L = O[N] ?? ze, j = d(i.user.id, N), Z = I(i.user.id, N), ne = !!(c || h);
1453
+ p.map((x, b) => {
1454
+ const N = x.hour === z && b > 0, L = _[b] ?? ze, j = I(i.user.id, b), Z = K(i.user.id, b), ne = !!(c || h);
1446
1455
  return /* @__PURE__ */ e(
1447
1456
  "div",
1448
1457
  {
1449
1458
  role: ne ? "button" : void 0,
1450
1459
  tabIndex: ne ? 0 : void 0,
1451
- "aria-label": ne ? `Select ${$e(v.hour)} on ${v.date.toLocaleDateString()} for ${i.user.name}` : void 0,
1452
- onPointerDown: (J) => K(i.user.id, N, J),
1453
- onPointerEnter: (J) => ce(i.user.id, N, J),
1454
- onPointerUp: Me,
1455
- onKeyDown: (J) => {
1456
- if (ne && (J.key === "Enter" || J.key === " ")) {
1457
- J.preventDefault();
1458
- const oe = ae(N);
1459
- h?.(oe.date, oe.hour, i.user.id), c?.({
1460
- startDate: oe.date,
1460
+ "aria-label": ne ? `Select ${Oe(x.hour)} on ${x.date.toLocaleDateString()} for ${i.user.name}` : void 0,
1461
+ onPointerDown: (X) => le(i.user.id, b, X),
1462
+ onPointerEnter: (X) => Ie(i.user.id, b, X),
1463
+ onPointerUp: Fe,
1464
+ onKeyDown: (X) => {
1465
+ if (ne && (X.key === "Enter" || X.key === " ")) {
1466
+ X.preventDefault();
1467
+ const se = oe(b);
1468
+ h?.(se.date, se.hour, i.user.id), c?.({
1469
+ startDate: se.date,
1461
1470
  endDate: (() => {
1462
- const ke = new Date(oe.date);
1463
- return oe.hour !== void 0 && ke.setHours(oe.hour + 1, 0, 0, 0), ke;
1471
+ const Ne = new Date(se.date);
1472
+ return se.hour !== void 0 && Ne.setHours(se.hour + 1, 0, 0, 0), Ne;
1464
1473
  })(),
1465
1474
  resourceId: i.user.id
1466
1475
  });
@@ -1469,10 +1478,10 @@ function Te({
1469
1478
  className: g(
1470
1479
  "shrink-0 select-none touch-none transition-colors",
1471
1480
  ne && "cursor-pointer",
1472
- C ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1473
- de(v.date) && "bg-primary/5",
1481
+ N ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1482
+ ce(x.date) && "bg-primary/5",
1474
1483
  // Hover — subtle feedback (only when not selecting or dragging)
1475
- ne && !k?.isSelecting && !H?.isDragging && "hover:bg-blue-50/60",
1484
+ ne && !C?.isSelecting && !H?.isDragging && "hover:bg-blue-50/60",
1476
1485
  // Slot selection highlight
1477
1486
  j && "bg-blue-100/70",
1478
1487
  // Drop target highlight
@@ -1480,38 +1489,38 @@ function Te({
1480
1489
  ),
1481
1490
  style: { width: L }
1482
1491
  },
1483
- `cell-${v.dayIndex}-${v.hour}`
1492
+ `cell-${x.dayIndex}-${x.hour}`
1484
1493
  );
1485
1494
  }),
1486
- i.events.map((v) => {
1487
- const N = (Q[v.startCol] ?? 0) + 2, C = Q[v.startCol + v.spanCols] ?? Q[Q.length - 1] ?? 0, L = Q[v.startCol] ?? 0, j = C - L - 4, Z = Xe + v.stackIndex * (Fe + qe), ne = t === 1 ? "timeline-day" : t === 3 ? "timeline-3day" : "timeline-week", J = B?.eventCard;
1495
+ i.events.map((x) => {
1496
+ const b = ve(x.startCol), N = ve(x.startCol + x.spanCols), L = b + 2, j = N - b - 4, Z = Xe + x.stackIndex * ($e + qe), ne = t === 1 ? "timeline-day" : t === 3 ? "timeline-3day" : "timeline-week", X = B?.eventCard;
1488
1497
  return /* @__PURE__ */ e(
1489
1498
  "div",
1490
1499
  {
1491
1500
  className: "absolute",
1492
1501
  style: {
1493
- left: N,
1502
+ left: L,
1494
1503
  width: Math.max(j, 0),
1495
1504
  // No forced minimum - columns are guaranteed wide enough
1496
1505
  top: Z,
1497
- height: Fe
1506
+ height: $e
1498
1507
  },
1499
- children: J ? /* @__PURE__ */ e(
1500
- J,
1508
+ children: X ? /* @__PURE__ */ e(
1509
+ X,
1501
1510
  {
1502
- event: v.event,
1511
+ event: x.event,
1503
1512
  view: ne,
1504
1513
  isCompact: !0,
1505
- onClick: () => x?.(v.event)
1514
+ onClick: () => v?.(x.event)
1506
1515
  }
1507
1516
  ) : /* @__PURE__ */ e(
1508
- Ct,
1517
+ Dt,
1509
1518
  {
1510
- event: v.event,
1519
+ event: x.event,
1511
1520
  variant: "compact",
1512
1521
  enableDrag: W,
1513
- onClick: x,
1514
- renderPopover: y,
1522
+ onClick: v,
1523
+ renderPopover: k,
1515
1524
  className: g(
1516
1525
  "h-full w-full",
1517
1526
  A?.eventCardCompact
@@ -1519,7 +1528,7 @@ function Te({
1519
1528
  }
1520
1529
  )
1521
1530
  },
1522
- v.event.id
1531
+ x.event.id
1523
1532
  );
1524
1533
  })
1525
1534
  ]
@@ -1533,7 +1542,7 @@ function Te({
1533
1542
  T.length === 0 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-20 text-muted-foreground", children: "No users or events to display" })
1534
1543
  ] }) }) });
1535
1544
  }
1536
- const hn = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], mn = [
1545
+ const mn = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], fn = [
1537
1546
  "January",
1538
1547
  "February",
1539
1548
  "March",
@@ -1551,13 +1560,13 @@ function tt(t) {
1551
1560
  const n = t.hexColor;
1552
1561
  return n ? { backgroundColor: n } : {};
1553
1562
  }
1554
- function fn({ day: t, date: n, events: a, isCurrentMonth: o, onDayClick: s }) {
1555
- const l = de(n), x = 3, h = a.length;
1563
+ function gn({ day: t, date: n, events: s, isCurrentMonth: o, onDayClick: a }) {
1564
+ const l = ce(n), v = 3, h = s.length;
1556
1565
  return /* @__PURE__ */ r(
1557
1566
  "button",
1558
1567
  {
1559
1568
  type: "button",
1560
- onClick: () => s?.(n),
1569
+ onClick: () => a?.(n),
1561
1570
  className: g(
1562
1571
  "flex h-9 sm:h-11 flex-1 flex-col items-center justify-start gap-0.5 rounded-md pt-0.5 sm:pt-1",
1563
1572
  "hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
@@ -1575,15 +1584,15 @@ function fn({ day: t, date: n, events: a, isCurrentMonth: o, onDayClick: s }) {
1575
1584
  children: t
1576
1585
  }
1577
1586
  ),
1578
- h > 0 && /* @__PURE__ */ e("div", { className: "mt-0.5 flex items-center gap-0.5", children: h <= x ? a.map((c) => /* @__PURE__ */ e(
1587
+ h > 0 && /* @__PURE__ */ e("div", { className: "mt-0.5 flex items-center gap-0.5", children: h <= v ? s.map((c) => /* @__PURE__ */ e(
1579
1588
  "div",
1580
1589
  {
1581
1590
  className: "size-1 sm:size-1.5 rounded-full bg-primary",
1582
1591
  style: tt(c)
1583
1592
  },
1584
1593
  c.id
1585
- )) : /* @__PURE__ */ r(be, { children: [
1586
- a.slice(0, x).map((c) => /* @__PURE__ */ e(
1594
+ )) : /* @__PURE__ */ r(ye, { children: [
1595
+ s.slice(0, v).map((c) => /* @__PURE__ */ e(
1587
1596
  "div",
1588
1597
  {
1589
1598
  className: "size-1 sm:size-1.5 rounded-full bg-primary",
@@ -1593,43 +1602,43 @@ function fn({ day: t, date: n, events: a, isCurrentMonth: o, onDayClick: s }) {
1593
1602
  )),
1594
1603
  /* @__PURE__ */ r("span", { className: "text-[6px] sm:text-[7px] font-medium text-muted-foreground", children: [
1595
1604
  "+",
1596
- h - x
1605
+ h - v
1597
1606
  ] })
1598
1607
  ] }) })
1599
1608
  ]
1600
1609
  }
1601
1610
  );
1602
1611
  }
1603
- function gn({
1612
+ function pn({
1604
1613
  date: t,
1605
1614
  events: n,
1606
- onMonthClick: a,
1615
+ onMonthClick: s,
1607
1616
  onDayClick: o
1608
1617
  }) {
1609
- const s = ee(() => Pt(t, 0), [t]);
1618
+ const a = ee(() => Wt(t, 0), [t]);
1610
1619
  return /* @__PURE__ */ r("div", { className: "flex flex-col", children: [
1611
1620
  /* @__PURE__ */ e(
1612
1621
  "button",
1613
1622
  {
1614
1623
  type: "button",
1615
- onClick: () => a?.(t),
1624
+ onClick: () => s?.(t),
1616
1625
  className: g(
1617
1626
  "w-full rounded-t-lg border px-2 sm:px-3 py-1.5 sm:py-2 text-xs sm:text-sm font-semibold",
1618
1627
  "hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
1619
1628
  "transition-colors"
1620
1629
  ),
1621
- children: mn[t.getMonth()]
1630
+ children: fn[t.getMonth()]
1622
1631
  }
1623
1632
  ),
1624
1633
  /* @__PURE__ */ r("div", { className: "flex-1 space-y-1.5 sm:space-y-2 rounded-b-lg border border-t-0 p-2 sm:p-3", children: [
1625
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 text-center", children: hn.map((l, x) => /* @__PURE__ */ r("div", { className: "text-[9px] sm:text-xs font-medium text-muted-foreground", children: [
1634
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 text-center", children: mn.map((l, v) => /* @__PURE__ */ r("div", { className: "text-[9px] sm:text-xs font-medium text-muted-foreground", children: [
1626
1635
  /* @__PURE__ */ e("span", { className: "sm:hidden", children: l[0] }),
1627
1636
  /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: l })
1628
- ] }, x)) }),
1629
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 gap-y-1", children: s.map((l, x) => {
1630
- const h = Wt(n, l.date);
1637
+ ] }, v)) }),
1638
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 gap-y-1", children: a.map((l, v) => {
1639
+ const h = Ft(n, l.date);
1631
1640
  return /* @__PURE__ */ e(
1632
- fn,
1641
+ gn,
1633
1642
  {
1634
1643
  day: l.date.getDate(),
1635
1644
  date: l.date,
@@ -1637,38 +1646,38 @@ function gn({
1637
1646
  isCurrentMonth: l.isCurrentMonth,
1638
1647
  onDayClick: o
1639
1648
  },
1640
- `${x + 1}-${l.date.toISOString()}`
1649
+ `${v + 1}-${l.date.toISOString()}`
1641
1650
  );
1642
1651
  }) })
1643
1652
  ] })
1644
1653
  ] });
1645
1654
  }
1646
- function pn({
1655
+ function xn({
1647
1656
  events: t,
1648
1657
  year: n,
1649
- onMonthClick: a,
1658
+ onMonthClick: s,
1650
1659
  onDayClick: o,
1651
- className: s,
1660
+ className: a,
1652
1661
  slots: l,
1653
- classNames: x
1662
+ classNames: v
1654
1663
  }) {
1655
- const h = ee(() => At(n), [n]);
1656
- return /* @__PURE__ */ r("div", { className: g("flex flex-col h-full", s), children: [
1664
+ const h = ee(() => Pt(n), [n]);
1665
+ return /* @__PURE__ */ r("div", { className: g("flex flex-col h-full", a), children: [
1657
1666
  /* @__PURE__ */ e("div", { className: "flex items-center justify-center border-b px-4 py-3", children: /* @__PURE__ */ e("h2", { className: "text-lg font-semibold", children: n }) }),
1658
1667
  /* @__PURE__ */ e("div", { className: "flex-1 overflow-auto p-4", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4", children: h.map((c) => /* @__PURE__ */ e(
1659
- gn,
1668
+ pn,
1660
1669
  {
1661
1670
  date: c,
1662
1671
  events: t,
1663
- onMonthClick: a,
1672
+ onMonthClick: s,
1664
1673
  onDayClick: o
1665
1674
  },
1666
1675
  c.getMonth()
1667
1676
  )) }) })
1668
1677
  ] });
1669
1678
  }
1670
- const je = 200, xn = 60, vn = 300, wn = 7, nt = 2, Oe = 40, bn = 18;
1671
- function yn() {
1679
+ const je = 200, vn = 60, wn = 300, bn = 7, nt = 2, _e = 40, yn = 18;
1680
+ function kn() {
1672
1681
  return /* @__PURE__ */ e(
1673
1682
  "svg",
1674
1683
  {
@@ -1685,7 +1694,7 @@ function yn() {
1685
1694
  }
1686
1695
  );
1687
1696
  }
1688
- function kn() {
1697
+ function Nn() {
1689
1698
  return /* @__PURE__ */ e(
1690
1699
  "svg",
1691
1700
  {
@@ -1702,7 +1711,7 @@ function kn() {
1702
1711
  }
1703
1712
  );
1704
1713
  }
1705
- function Nn() {
1714
+ function Cn() {
1706
1715
  return /* @__PURE__ */ e(
1707
1716
  "svg",
1708
1717
  {
@@ -1719,7 +1728,7 @@ function Nn() {
1719
1728
  }
1720
1729
  );
1721
1730
  }
1722
- function Cn() {
1731
+ function Dn() {
1723
1732
  return /* @__PURE__ */ e(
1724
1733
  "svg",
1725
1734
  {
@@ -1736,51 +1745,51 @@ function Cn() {
1736
1745
  }
1737
1746
  );
1738
1747
  }
1739
- function Dn({
1748
+ function Mn({
1740
1749
  containerRef: t,
1741
1750
  currentDate: n,
1742
- className: a
1751
+ className: s
1743
1752
  }) {
1744
- const [o, s] = le({
1753
+ const [o, a] = ie({
1745
1754
  canUp: !1,
1746
1755
  canDown: !1,
1747
1756
  canLeft: !1,
1748
1757
  canRight: !1
1749
- }), [l, x] = le({ x: 0, y: 0 }), [h, c] = le(!1), w = o.canUp || o.canDown || o.canLeft || o.canRight, P = ie(null), b = ie(null), y = ie(null), B = ie(!1), A = ie({ x: 0, y: 0 }), W = ie({ x: 0, y: 0 }), F = ie(0), H = ie(null), k = _(() => {
1758
+ }), [l, v] = ie({ x: 0, y: 0 }), [h, c] = ie(!1), w = o.canUp || o.canDown || o.canLeft || o.canRight, P = ae(null), y = ae(null), k = ae(null), B = ae(!1), A = ae({ x: 0, y: 0 }), W = ae({ x: 0, y: 0 }), F = ae(0), H = ae(null), C = $(() => {
1750
1759
  const f = t.current;
1751
1760
  if (!f) return;
1752
1761
  const E = 4;
1753
- s({
1762
+ a({
1754
1763
  canUp: f.scrollTop > E,
1755
1764
  canDown: f.scrollTop + f.clientHeight < f.scrollHeight - E,
1756
1765
  canLeft: f.scrollLeft > E,
1757
1766
  canRight: f.scrollLeft + f.clientWidth < f.scrollWidth - E
1758
1767
  });
1759
1768
  }, [t]);
1760
- he(() => {
1769
+ ue(() => {
1761
1770
  const f = t.current;
1762
1771
  if (!f) return;
1763
- k(), f.addEventListener("scroll", k, { passive: !0 });
1764
- const E = new ResizeObserver(k);
1772
+ C(), f.addEventListener("scroll", C, { passive: !0 });
1773
+ const E = new ResizeObserver(C);
1765
1774
  E.observe(f);
1766
- const D = new MutationObserver(k);
1775
+ const D = new MutationObserver(C);
1767
1776
  return D.observe(f, { childList: !0, subtree: !0 }), () => {
1768
- f.removeEventListener("scroll", k), E.disconnect(), D.disconnect();
1777
+ f.removeEventListener("scroll", C), E.disconnect(), D.disconnect();
1769
1778
  };
1770
- }, [t, k]);
1771
- const $ = _(
1779
+ }, [t, C]);
1780
+ const O = $(
1772
1781
  (f, E) => {
1773
1782
  t.current?.scrollBy({ left: f, top: E, behavior: "smooth" });
1774
1783
  },
1775
1784
  [t]
1776
- ), R = _(() => $(0, -je), [$]), Y = _(() => $(0, je), [$]), M = _(() => $(-je, 0), [$]), V = _(() => $(je, 0), [$]), S = _(() => {
1777
- P.current && (clearTimeout(P.current), P.current = null), b.current && (clearInterval(b.current), b.current = null);
1778
- }, []), z = _((f) => {
1785
+ ), R = $(() => O(0, -je), [O]), Y = $(() => O(0, je), [O]), M = $(() => O(-je, 0), [O]), V = $(() => O(je, 0), [O]), S = $(() => {
1786
+ P.current && (clearTimeout(P.current), P.current = null), y.current && (clearInterval(y.current), y.current = null);
1787
+ }, []), z = $((f) => {
1779
1788
  f(), P.current = setTimeout(() => {
1780
- b.current = setInterval(f, xn);
1781
- }, vn);
1789
+ y.current = setInterval(f, vn);
1790
+ }, wn);
1782
1791
  }, []);
1783
- he(() => S, [S]), he(() => {
1792
+ ue(() => S, [S]), ue(() => {
1784
1793
  const f = t.current;
1785
1794
  if (!f) return;
1786
1795
  const E = (D) => {
@@ -1803,51 +1812,51 @@ function Dn({
1803
1812
  }
1804
1813
  };
1805
1814
  return f.addEventListener("keydown", E), () => f.removeEventListener("keydown", E);
1806
- }, [t, R, Y, M, V]), he(() => {
1815
+ }, [t, R, Y, M, V]), ue(() => {
1807
1816
  if (!w) return;
1808
1817
  const f = H.current;
1809
1818
  if (!f) return;
1810
1819
  let E = 0;
1811
1820
  const D = () => {
1812
- const q = f.offsetParent;
1813
- if (!q) return;
1814
- const re = q.getBoundingClientRect(), Q = window.innerHeight;
1815
- if (re.height <= Q) {
1821
+ const J = f.offsetParent;
1822
+ if (!J) return;
1823
+ const re = J.getBoundingClientRect(), q = window.innerHeight;
1824
+ if (re.height <= q) {
1816
1825
  f.style.removeProperty("top"), f.style.removeProperty("bottom");
1817
1826
  return;
1818
1827
  }
1819
- const ae = Math.min(re.bottom, Q) - re.top, se = f.offsetHeight, ye = ae - se - 12, ue = 12, d = q.clientHeight - se - 12, I = Math.max(ue, Math.min(ye, d));
1828
+ const we = Math.min(re.bottom, q) - re.top, oe = f.offsetHeight, ke = we - oe - 12, de = 12, u = J.clientHeight - oe - 12, I = Math.max(de, Math.min(ke, u));
1820
1829
  f.style.top = `${I}px`, f.style.bottom = "auto";
1821
1830
  }, T = () => {
1822
1831
  cancelAnimationFrame(E), E = requestAnimationFrame(D);
1823
1832
  }, te = [window];
1824
- let O = f.parentElement;
1825
- for (; O; ) {
1826
- const q = getComputedStyle(O);
1827
- /(auto|scroll)/.test(q.overflow + q.overflowY) && te.push(O), O = O.parentElement;
1833
+ let _ = f.parentElement;
1834
+ for (; _; ) {
1835
+ const J = getComputedStyle(_);
1836
+ /(auto|scroll)/.test(J.overflow + J.overflowY) && te.push(_), _ = _.parentElement;
1828
1837
  }
1829
- for (const q of te)
1830
- q.addEventListener("scroll", T, { passive: !0 });
1838
+ for (const J of te)
1839
+ J.addEventListener("scroll", T, { passive: !0 });
1831
1840
  return window.addEventListener("resize", T, { passive: !0 }), D(), () => {
1832
1841
  cancelAnimationFrame(E);
1833
- for (const q of te)
1834
- q.removeEventListener("scroll", T);
1842
+ for (const J of te)
1843
+ J.removeEventListener("scroll", T);
1835
1844
  window.removeEventListener("resize", T);
1836
1845
  };
1837
1846
  }, [w]);
1838
- const U = _(() => {
1839
- B.current = !1, c(!1), x({ x: 0, y: 0 }), W.current = { x: 0, y: 0 }, F.current && cancelAnimationFrame(F.current);
1840
- }, []), G = _(
1847
+ const U = $(() => {
1848
+ B.current = !1, c(!1), v({ x: 0, y: 0 }), W.current = { x: 0, y: 0 }, F.current && cancelAnimationFrame(F.current);
1849
+ }, []), G = $(
1841
1850
  (f) => {
1842
1851
  f.preventDefault(), B.current = !0, c(!0), A.current = { x: f.clientX, y: f.clientY }, W.current = { x: 0, y: 0 }, f.target.setPointerCapture(f.pointerId);
1843
1852
  const E = () => {
1844
1853
  if (!B.current) return;
1845
1854
  const D = t.current;
1846
1855
  if (D) {
1847
- const { x: T, y: te } = W.current, O = Math.sqrt(T * T + te * te);
1848
- if (O > nt) {
1849
- const re = Math.min(O / Oe, 1) * bn;
1850
- D.scrollLeft += T / O * re, D.scrollTop += te / O * re;
1856
+ const { x: T, y: te } = W.current, _ = Math.sqrt(T * T + te * te);
1857
+ if (_ > nt) {
1858
+ const re = Math.min(_ / _e, 1) * yn;
1859
+ D.scrollLeft += T / _ * re, D.scrollTop += te / _ * re;
1851
1860
  }
1852
1861
  }
1853
1862
  F.current = requestAnimationFrame(E);
@@ -1855,21 +1864,21 @@ function Dn({
1855
1864
  F.current = requestAnimationFrame(E);
1856
1865
  },
1857
1866
  [t]
1858
- ), X = _((f) => {
1867
+ ), Q = $((f) => {
1859
1868
  if (!B.current) return;
1860
1869
  const E = f.clientX - A.current.x, D = f.clientY - A.current.y;
1861
1870
  W.current = { x: E, y: D };
1862
1871
  const T = Math.sqrt(E * E + D * D);
1863
1872
  if (T < nt)
1864
- x({ x: 0, y: 0 });
1873
+ v({ x: 0, y: 0 });
1865
1874
  else {
1866
- const O = Math.min(T, Oe) / Oe * wn;
1867
- x({
1868
- x: E / T * O,
1869
- y: D / T * O
1875
+ const _ = Math.min(T, _e) / _e * bn;
1876
+ v({
1877
+ x: E / T * _,
1878
+ y: D / T * _
1870
1879
  });
1871
1880
  }
1872
- }, []), m = _(
1881
+ }, []), m = $(
1873
1882
  (f) => {
1874
1883
  switch (f.key) {
1875
1884
  case "ArrowUp":
@@ -1898,7 +1907,7 @@ function Dn({
1898
1907
  "div",
1899
1908
  {
1900
1909
  ref: H,
1901
- className: `inno-scroll-nav-wrapper ${a ?? ""}`,
1910
+ className: `inno-scroll-nav-wrapper ${s ?? ""}`,
1902
1911
  role: "toolbar",
1903
1912
  "aria-label": "Scroll navigation",
1904
1913
  onKeyDown: m,
@@ -1916,7 +1925,7 @@ function Dn({
1916
1925
  onPointerUp: S,
1917
1926
  onPointerLeave: S,
1918
1927
  tabIndex: o.canUp ? 0 : -1,
1919
- children: /* @__PURE__ */ e(yn, {})
1928
+ children: /* @__PURE__ */ e(kn, {})
1920
1929
  }
1921
1930
  ),
1922
1931
  /* @__PURE__ */ e(
@@ -1930,18 +1939,18 @@ function Dn({
1930
1939
  onPointerUp: S,
1931
1940
  onPointerLeave: S,
1932
1941
  tabIndex: o.canLeft ? 0 : -1,
1933
- children: /* @__PURE__ */ e(Nn, {})
1942
+ children: /* @__PURE__ */ e(Cn, {})
1934
1943
  }
1935
1944
  ),
1936
1945
  /* @__PURE__ */ e(
1937
1946
  "button",
1938
1947
  {
1939
- ref: y,
1948
+ ref: k,
1940
1949
  type: "button",
1941
1950
  className: `inno-scroll-nav-joystick ${h ? "inno-scroll-nav-joystick-active" : ""}`,
1942
1951
  "aria-label": "Drag to scroll freely",
1943
1952
  onPointerDown: G,
1944
- onPointerMove: X,
1953
+ onPointerMove: Q,
1945
1954
  onPointerUp: U,
1946
1955
  onPointerCancel: U,
1947
1956
  tabIndex: 0,
@@ -1967,7 +1976,7 @@ function Dn({
1967
1976
  onPointerUp: S,
1968
1977
  onPointerLeave: S,
1969
1978
  tabIndex: o.canRight ? 0 : -1,
1970
- children: /* @__PURE__ */ e(Cn, {})
1979
+ children: /* @__PURE__ */ e(Dn, {})
1971
1980
  }
1972
1981
  ),
1973
1982
  /* @__PURE__ */ e(
@@ -1981,7 +1990,7 @@ function Dn({
1981
1990
  onPointerUp: S,
1982
1991
  onPointerLeave: S,
1983
1992
  tabIndex: o.canDown ? 0 : -1,
1984
- children: /* @__PURE__ */ e(kn, {})
1993
+ children: /* @__PURE__ */ e(Nn, {})
1985
1994
  }
1986
1995
  )
1987
1996
  ] })
@@ -1989,7 +1998,7 @@ function Dn({
1989
1998
  }
1990
1999
  );
1991
2000
  }
1992
- function Mn(t) {
2001
+ function En(t) {
1993
2002
  switch (t) {
1994
2003
  case "day":
1995
2004
  case "week":
@@ -1998,27 +2007,27 @@ function Mn(t) {
1998
2007
  return "day";
1999
2008
  }
2000
2009
  }
2001
- function En({
2010
+ function Ln({
2002
2011
  onEventClick: t,
2003
2012
  onSlotClick: n,
2004
- onSlotSelect: a,
2013
+ onSlotSelect: s,
2005
2014
  onAddEvent: o,
2006
- alwaysShowResources: s,
2015
+ alwaysShowResources: a,
2007
2016
  className: l,
2008
- showHeader: x = !0,
2017
+ showHeader: v = !0,
2009
2018
  minSelectionMinutes: h = 30,
2010
2019
  showMoreMode: c,
2011
2020
  showMoreEventsInPopover: w = !1,
2012
2021
  isLoading: P = !1,
2013
- slots: b,
2014
- classNames: y,
2022
+ slots: y,
2023
+ classNames: k,
2015
2024
  settingsContent: B,
2016
2025
  filterContent: A,
2017
2026
  headerActions: W,
2018
2027
  renderPopover: F,
2019
2028
  calendarRef: H,
2020
- headerConfig: k,
2021
- eventDetailMode: $,
2029
+ headerConfig: C,
2030
+ eventDetailMode: O,
2022
2031
  renderEventDetail: R
2023
2032
  }) {
2024
2033
  const Y = c ?? (w ? "popover" : "expand"), {
@@ -2028,42 +2037,42 @@ function En({
2028
2037
  setSelectedDate: z,
2029
2038
  slotDuration: U,
2030
2039
  filteredEvents: G,
2031
- users: X,
2040
+ users: Q,
2032
2041
  visibleHours: m,
2033
2042
  workingHours: p,
2034
2043
  badgeVariant: f,
2035
2044
  showWorkingHoursOnly: E,
2036
2045
  clearFocusEventId: D
2037
- } = zt(), T = ee(() => {
2046
+ } = jt(), T = ee(() => {
2038
2047
  if (!E || !p)
2039
2048
  return {
2040
2049
  startHour: m.start,
2041
2050
  endHour: m.end
2042
2051
  };
2043
- let d = 24, I = 0;
2052
+ let u = 24, I = 0;
2044
2053
  for (const K of Object.keys(p)) {
2045
- const ce = p[Number(K)];
2046
- !ce || ce.enabled === !1 || (ce.from < d && (d = ce.from), ce.to > I && (I = ce.to));
2054
+ const le = p[Number(K)];
2055
+ !le || le.enabled === !1 || (le.from < u && (u = le.from), le.to > I && (I = le.to));
2047
2056
  }
2048
- return d >= I ? {
2057
+ return u >= I ? {
2049
2058
  startHour: m.start,
2050
2059
  endHour: m.end
2051
- } : { startHour: d, endHour: I };
2052
- }, [E, p, m]), te = T, O = ie(null);
2053
- bt(
2060
+ } : { startHour: u, endHour: I };
2061
+ }, [E, p, m]), te = T, _ = ae(null);
2062
+ yt(
2054
2063
  H,
2055
2064
  () => ({
2056
2065
  scrollToToday: () => {
2057
- const d = /* @__PURE__ */ new Date();
2058
- z(d, M), requestAnimationFrame(() => {
2066
+ const u = /* @__PURE__ */ new Date();
2067
+ z(u, M), requestAnimationFrame(() => {
2059
2068
  requestAnimationFrame(() => {
2060
- const I = O.current?.querySelector(
2069
+ const I = _.current?.querySelector(
2061
2070
  ".ic-timeline-scroll-container, [class*='overflow-auto']"
2062
2071
  );
2063
2072
  if (!I) return;
2064
- const Me = (d.getHours() - T.startHour) * 96;
2065
- Me > 0 && I.scrollTo({
2066
- top: Math.max(0, Me - 100),
2073
+ const Ie = (u.getHours() - T.startHour) * 96;
2074
+ Ie > 0 && I.scrollTo({
2075
+ top: Math.max(0, Ie - 100),
2067
2076
  // Offset to show some context
2068
2077
  behavior: "smooth"
2069
2078
  });
@@ -2071,33 +2080,33 @@ function En({
2071
2080
  });
2072
2081
  },
2073
2082
  scrollToWorkingHours: () => {
2074
- let d = 8;
2083
+ let u = 8;
2075
2084
  if (p)
2076
2085
  for (const I of Object.keys(p)) {
2077
2086
  const K = p[Number(I)];
2078
- K?.enabled && K.from < d && (d = Math.max(K.from - 1, 0));
2087
+ K?.enabled && K.from < u && (u = Math.max(K.from - 1, 0));
2079
2088
  }
2080
2089
  requestAnimationFrame(() => {
2081
2090
  requestAnimationFrame(() => {
2082
- const I = O.current?.querySelector(
2091
+ const I = _.current?.querySelector(
2083
2092
  ".ic-timeline-scroll-container, [class*='overflow-auto']"
2084
2093
  );
2085
2094
  if (!I) return;
2086
- const ce = (d - T.startHour) * 96;
2095
+ const le = (u - T.startHour) * 96;
2087
2096
  I.scrollTo({
2088
- top: Math.max(0, ce),
2097
+ top: Math.max(0, le),
2089
2098
  behavior: "smooth"
2090
2099
  });
2091
2100
  });
2092
2101
  });
2093
2102
  },
2094
- getViewRect: () => O.current?.getBoundingClientRect() ?? null,
2095
- focusEvent: (d) => {
2103
+ getViewRect: () => _.current?.getBoundingClientRect() ?? null,
2104
+ focusEvent: (u) => {
2096
2105
  D(), requestAnimationFrame(() => {
2097
2106
  D();
2098
2107
  });
2099
- const I = O.current?.querySelector(
2100
- `[data-event-id="${d}"]`
2108
+ const I = _.current?.querySelector(
2109
+ `[data-event-id="${u}"]`
2101
2110
  );
2102
2111
  I && setTimeout(() => I.click(), 150);
2103
2112
  }
@@ -2110,46 +2119,46 @@ function En({
2110
2119
  D
2111
2120
  ]
2112
2121
  );
2113
- const q = ee(() => Mn(M), [M]), re = _(
2114
- (d) => {
2115
- if (a) {
2116
- a(d);
2122
+ const J = ee(() => En(M), [M]), re = $(
2123
+ (u) => {
2124
+ if (s) {
2125
+ s(u);
2117
2126
  return;
2118
2127
  }
2119
2128
  if (n) {
2120
- const I = d.startDate.getHours();
2121
- n(d.startDate, I);
2129
+ const I = u.startDate.getHours();
2130
+ n(u.startDate, I);
2122
2131
  }
2123
2132
  },
2124
- [a, n]
2125
- ), Q = _(
2126
- (d) => {
2127
- V("day"), z(d, "day");
2133
+ [s, n]
2134
+ ), q = $(
2135
+ (u) => {
2136
+ V("day"), z(u, "day");
2128
2137
  },
2129
2138
  [z, V]
2130
- ), we = _(
2131
- (d) => {
2132
- V("month"), z(d, "month");
2139
+ ), ve = $(
2140
+ (u) => {
2141
+ V("month"), z(u, "month");
2133
2142
  },
2134
2143
  [z, V]
2135
- ), ae = _(
2136
- (d) => {
2137
- t?.(d);
2144
+ ), we = $(
2145
+ (u) => {
2146
+ t?.(u);
2138
2147
  },
2139
2148
  [t]
2140
- ), se = _(
2141
- (d, I, K) => {
2142
- n?.(d, I);
2149
+ ), oe = $(
2150
+ (u, I, K) => {
2151
+ n?.(u, I);
2143
2152
  },
2144
2153
  [n]
2145
- ), ye = () => {
2146
- const d = G, I = ae, K = F;
2154
+ ), ke = () => {
2155
+ const u = G, I = we, K = F;
2147
2156
  switch (M) {
2148
2157
  case "day":
2149
2158
  return /* @__PURE__ */ e(
2150
- Lt,
2159
+ St,
2151
2160
  {
2152
- events: d,
2161
+ events: u,
2153
2162
  date: S,
2154
2163
  visibleHours: te,
2155
2164
  workingHours: p,
@@ -2157,15 +2166,15 @@ function En({
2157
2166
  badgeVariant: f,
2158
2167
  onEventClick: I,
2159
2168
  renderPopover: K,
2160
- ...b && { slots: b },
2161
- ...y && { classNames: y }
2169
+ ...y && { slots: y },
2170
+ ...k && { classNames: k }
2162
2171
  }
2163
2172
  );
2164
2173
  case "week":
2165
2174
  return /* @__PURE__ */ e(
2166
- Et,
2175
+ Lt,
2167
2176
  {
2168
- events: d,
2177
+ events: u,
2169
2178
  date: S,
2170
2179
  visibleHours: te,
2171
2180
  workingHours: p,
@@ -2173,58 +2182,58 @@ function En({
2173
2182
  badgeVariant: f,
2174
2183
  onEventClick: I,
2175
2184
  renderPopover: K,
2176
- ...b && { slots: b },
2177
- ...y && { classNames: y }
2185
+ ...y && { slots: y },
2186
+ ...k && { classNames: k }
2178
2187
  }
2179
2188
  );
2180
2189
  case "month":
2181
2190
  return /* @__PURE__ */ e(
2182
2191
  Ye,
2183
2192
  {
2184
- events: d,
2193
+ events: u,
2185
2194
  date: S,
2186
2195
  badgeVariant: f,
2187
2196
  onEventClick: I,
2188
- onDayClick: Q,
2197
+ onDayClick: q,
2189
2198
  renderPopover: K,
2190
2199
  showMoreMode: Y,
2191
- ...b && { slots: b },
2192
- ...y && { classNames: y }
2200
+ ...y && { slots: y },
2201
+ ...k && { classNames: k }
2193
2202
  }
2194
2203
  );
2195
2204
  case "year":
2196
2205
  return /* @__PURE__ */ e(
2197
- pn,
2206
+ xn,
2198
2207
  {
2199
- events: d,
2208
+ events: u,
2200
2209
  year: S.getFullYear(),
2201
- onMonthClick: we,
2202
- onDayClick: Q,
2203
- ...b && { slots: b },
2204
- ...y && { classNames: y }
2210
+ onMonthClick: ve,
2211
+ onDayClick: q,
2212
+ ...y && { slots: y },
2213
+ ...k && { classNames: k }
2205
2214
  }
2206
2215
  );
2207
2216
  case "agenda":
2208
2217
  return /* @__PURE__ */ e(
2209
- Mt,
2218
+ Et,
2210
2219
  {
2211
- events: d,
2220
+ events: u,
2212
2221
  date: S,
2213
2222
  onEventClick: I,
2214
2223
  renderPopover: K,
2215
- ...b && { slots: b },
2216
- ...y && { classNames: y }
2224
+ ...y && { slots: y },
2225
+ ...k && { classNames: k }
2217
2226
  }
2218
2227
  );
2219
2228
  // Resource views — delegate to TimelineView with matching day count
2220
2229
  case "resource-day":
2221
2230
  return /* @__PURE__ */ e(
2222
- Te,
2231
+ Se,
2223
2232
  {
2224
2233
  daysToShow: 1,
2225
- events: d,
2226
- users: X,
2227
- ...s && { alwaysShowResources: s },
2234
+ events: u,
2235
+ users: Q,
2236
+ ...a && { alwaysShowResources: a },
2228
2237
  selectedDate: S,
2229
2238
  visibleHours: {
2230
2239
  from: T.startHour,
@@ -2232,20 +2241,20 @@ function En({
2232
2241
  },
2233
2242
  onEventClick: I,
2234
2243
  onSlotSelect: re,
2235
- onSlotClick: se,
2244
+ onSlotClick: oe,
2236
2245
  renderPopover: K,
2237
- ...b && { slots: b },
2238
- ...y && { classNames: y }
2246
+ ...y && { slots: y },
2247
+ ...k && { classNames: k }
2239
2248
  }
2240
2249
  );
2241
2250
  case "resource-week":
2242
2251
  return /* @__PURE__ */ e(
2243
- Te,
2252
+ Se,
2244
2253
  {
2245
2254
  daysToShow: 7,
2246
- events: d,
2247
- users: X,
2248
- ...s && { alwaysShowResources: s },
2255
+ events: u,
2256
+ users: Q,
2257
+ ...a && { alwaysShowResources: a },
2249
2258
  selectedDate: S,
2250
2259
  visibleHours: {
2251
2260
  from: T.startHour,
@@ -2253,21 +2262,21 @@ function En({
2253
2262
  },
2254
2263
  onEventClick: I,
2255
2264
  onSlotSelect: re,
2256
- onSlotClick: se,
2265
+ onSlotClick: oe,
2257
2266
  renderPopover: K,
2258
- ...b && { slots: b },
2259
- ...y && { classNames: y }
2267
+ ...y && { slots: y },
2268
+ ...k && { classNames: k }
2260
2269
  }
2261
2270
  );
2262
2271
  // Timeline views
2263
2272
  case "timeline-day":
2264
2273
  return /* @__PURE__ */ e(
2265
- Te,
2274
+ Se,
2266
2275
  {
2267
2276
  daysToShow: 1,
2268
- events: d,
2269
- users: X,
2270
- ...s && { alwaysShowResources: s },
2277
+ events: u,
2278
+ users: Q,
2279
+ ...a && { alwaysShowResources: a },
2271
2280
  selectedDate: S,
2272
2281
  visibleHours: {
2273
2282
  from: T.startHour,
@@ -2275,20 +2284,20 @@ function En({
2275
2284
  },
2276
2285
  onEventClick: I,
2277
2286
  onSlotSelect: re,
2278
- onSlotClick: se,
2287
+ onSlotClick: oe,
2279
2288
  renderPopover: K,
2280
- ...b && { slots: b },
2281
- ...y && { classNames: y }
2289
+ ...y && { slots: y },
2290
+ ...k && { classNames: k }
2282
2291
  }
2283
2292
  );
2284
2293
  case "timeline-3day":
2285
2294
  return /* @__PURE__ */ e(
2286
- Te,
2295
+ Se,
2287
2296
  {
2288
2297
  daysToShow: 3,
2289
- events: d,
2290
- users: X,
2291
- ...s && { alwaysShowResources: s },
2298
+ events: u,
2299
+ users: Q,
2300
+ ...a && { alwaysShowResources: a },
2292
2301
  selectedDate: S,
2293
2302
  visibleHours: {
2294
2303
  from: T.startHour,
@@ -2296,20 +2305,20 @@ function En({
2296
2305
  },
2297
2306
  onEventClick: I,
2298
2307
  onSlotSelect: re,
2299
- onSlotClick: se,
2308
+ onSlotClick: oe,
2300
2309
  renderPopover: K,
2301
- ...b && { slots: b },
2302
- ...y && { classNames: y }
2310
+ ...y && { slots: y },
2311
+ ...k && { classNames: k }
2303
2312
  }
2304
2313
  );
2305
2314
  case "timeline-week":
2306
2315
  return /* @__PURE__ */ e(
2307
- Te,
2316
+ Se,
2308
2317
  {
2309
2318
  daysToShow: 7,
2310
- events: d,
2311
- users: X,
2312
- ...s && { alwaysShowResources: s },
2319
+ events: u,
2320
+ users: Q,
2321
+ ...a && { alwaysShowResources: a },
2313
2322
  selectedDate: S,
2314
2323
  visibleHours: {
2315
2324
  from: T.startHour,
@@ -2317,48 +2326,48 @@ function En({
2317
2326
  },
2318
2327
  onEventClick: I,
2319
2328
  onSlotSelect: re,
2320
- onSlotClick: se,
2329
+ onSlotClick: oe,
2321
2330
  renderPopover: K,
2322
- ...b && { slots: b },
2323
- ...y && { classNames: y }
2331
+ ...y && { slots: y },
2332
+ ...k && { classNames: k }
2324
2333
  }
2325
2334
  );
2326
2335
  default:
2327
2336
  return /* @__PURE__ */ e(
2328
2337
  Ye,
2329
2338
  {
2330
- events: d,
2339
+ events: u,
2331
2340
  date: S,
2332
2341
  badgeVariant: f,
2333
2342
  onEventClick: I,
2334
- onDayClick: Q,
2335
- ...b && { slots: b },
2336
- ...y && { classNames: y }
2343
+ onDayClick: q,
2344
+ ...y && { slots: y },
2345
+ ...k && { classNames: k }
2337
2346
  }
2338
2347
  );
2339
2348
  }
2340
- }, ue = ie(null);
2341
- return he(() => {
2342
- O.current = ue.current;
2349
+ }, de = ae(null);
2350
+ return ue(() => {
2351
+ _.current = de.current;
2343
2352
  }), /* @__PURE__ */ e(
2344
- jt,
2353
+ At,
2345
2354
  {
2346
- mode: q,
2355
+ mode: J,
2347
2356
  onSelect: re,
2348
2357
  minDurationMinutes: h,
2349
2358
  slotDurationMinutes: U,
2350
- enabled: !!(a || n),
2359
+ enabled: !!(s || n),
2351
2360
  children: /* @__PURE__ */ r(
2352
2361
  "div",
2353
2362
  {
2354
2363
  className: g(
2355
2364
  "inno-calendar-root flex flex-col h-full p-4",
2356
- y?.root,
2365
+ k?.root,
2357
2366
  l
2358
2367
  ),
2359
2368
  children: [
2360
- x && /* @__PURE__ */ e(
2361
- Dt,
2369
+ v && /* @__PURE__ */ e(
2370
+ Mt,
2362
2371
  {
2363
2372
  currentDate: S,
2364
2373
  view: M,
@@ -2366,12 +2375,12 @@ function En({
2366
2375
  onViewChange: V,
2367
2376
  onNavigateToday: () => z(/* @__PURE__ */ new Date(), M),
2368
2377
  onNavigatePrev: () => {
2369
- const d = new Date(S);
2370
- M === "day" || M === "timeline-day" || M === "resource-day" ? d.setDate(d.getDate() - 1) : M === "timeline-3day" ? d.setDate(d.getDate() - 3) : M === "week" || M === "timeline-week" || M === "resource-week" ? d.setDate(d.getDate() - 7) : M === "month" ? d.setMonth(d.getMonth() - 1) : M === "year" ? d.setFullYear(d.getFullYear() - 1) : d.setDate(d.getDate() - 7), z(d, M);
2378
+ const u = new Date(S);
2379
+ M === "day" || M === "timeline-day" || M === "resource-day" ? u.setDate(u.getDate() - 1) : M === "timeline-3day" ? u.setDate(u.getDate() - 3) : M === "week" || M === "timeline-week" || M === "resource-week" ? u.setDate(u.getDate() - 7) : M === "month" ? u.setMonth(u.getMonth() - 1) : M === "year" ? u.setFullYear(u.getFullYear() - 1) : u.setDate(u.getDate() - 7), z(u, M);
2371
2380
  },
2372
2381
  onNavigateNext: () => {
2373
- const d = new Date(S);
2374
- M === "day" || M === "timeline-day" || M === "resource-day" ? d.setDate(d.getDate() + 1) : M === "timeline-3day" ? d.setDate(d.getDate() + 3) : M === "week" || M === "timeline-week" || M === "resource-week" ? d.setDate(d.getDate() + 7) : M === "month" ? d.setMonth(d.getMonth() + 1) : M === "year" ? d.setFullYear(d.getFullYear() + 1) : d.setDate(d.getDate() + 7), z(d, M);
2382
+ const u = new Date(S);
2383
+ M === "day" || M === "timeline-day" || M === "resource-day" ? u.setDate(u.getDate() + 1) : M === "timeline-3day" ? u.setDate(u.getDate() + 3) : M === "week" || M === "timeline-week" || M === "resource-week" ? u.setDate(u.getDate() + 7) : M === "month" ? u.setMonth(u.getMonth() + 1) : M === "year" ? u.setFullYear(u.getFullYear() + 1) : u.setDate(u.getDate() + 7), z(u, M);
2375
2384
  },
2376
2385
  availableViews: [
2377
2386
  "day",
@@ -2386,23 +2395,23 @@ function En({
2386
2395
  actions: W,
2387
2396
  settingsContent: B,
2388
2397
  filterContent: A,
2389
- ...k && { headerConfig: k }
2398
+ ...C && { headerConfig: C }
2390
2399
  }
2391
2400
  ),
2392
2401
  /* @__PURE__ */ r("div", { className: "relative flex-1 min-h-0", children: [
2393
2402
  /* @__PURE__ */ e(
2394
2403
  "div",
2395
2404
  {
2396
- ref: ue,
2405
+ ref: de,
2397
2406
  className: g(
2398
2407
  "h-full border rounded-lg bg-white overflow-x-auto",
2399
- y?.viewContainer
2408
+ k?.viewContainer
2400
2409
  ),
2401
- children: ye()
2410
+ children: ke()
2402
2411
  }
2403
2412
  ),
2404
2413
  P && /* @__PURE__ */ e("div", { className: "inno-calendar-loading-overlay", children: /* @__PURE__ */ e("div", { className: "inno-calendar-spinner" }) }),
2405
- /* @__PURE__ */ e(Dn, { containerRef: ue, currentDate: S })
2414
+ /* @__PURE__ */ e(Mn, { containerRef: de, currentDate: S })
2406
2415
  ] })
2407
2416
  ]
2408
2417
  }
@@ -2410,27 +2419,27 @@ function En({
2410
2419
  }
2411
2420
  );
2412
2421
  }
2413
- function Ln({
2422
+ function Sn({
2414
2423
  events: t,
2415
2424
  users: n = [],
2416
- alwaysShowResources: a,
2425
+ alwaysShowResources: s,
2417
2426
  scheduleTypes: o = [],
2418
- initialView: s = "week",
2427
+ initialView: a,
2419
2428
  initialDate: l,
2420
- initialSelectedUserId: x,
2429
+ initialSelectedUserId: v,
2421
2430
  initialScheduleTypeIds: h,
2422
2431
  initialParticipantIds: c,
2423
2432
  initialWorkingHoursView: w,
2424
2433
  initialSearchQuery: P,
2425
- preferencesConfig: b,
2426
- onEventClick: y,
2434
+ preferencesConfig: y,
2435
+ onEventClick: k,
2427
2436
  onSlotClick: B,
2428
2437
  onSlotSelect: A,
2429
2438
  onAddEvent: W,
2430
2439
  onEventDrop: F,
2431
2440
  onDateChange: H,
2432
- onViewChange: k,
2433
- className: $,
2441
+ onViewChange: C,
2442
+ className: O,
2434
2443
  showHeader: R = !0,
2435
2444
  minSelectionMinutes: Y = 30,
2436
2445
  showMoreMode: M,
@@ -2439,7 +2448,7 @@ function Ln({
2439
2448
  renderPopover: z,
2440
2449
  slots: U,
2441
2450
  classNames: G,
2442
- settingsContent: X,
2451
+ settingsContent: Q,
2443
2452
  filterContent: m,
2444
2453
  headerActions: p,
2445
2454
  focusEventId: f,
@@ -2447,33 +2456,33 @@ function Ln({
2447
2456
  eventDetailMode: D,
2448
2457
  renderEventDetail: T
2449
2458
  }, te) {
2450
- return /* @__PURE__ */ e(Ht, { ...F && { onEventDrop: F }, children: /* @__PURE__ */ e(
2451
- It,
2459
+ return /* @__PURE__ */ e(It, { ...F && { onEventDrop: F }, children: /* @__PURE__ */ e(
2460
+ zt,
2452
2461
  {
2453
2462
  initialEvents: t,
2454
2463
  initialUsers: n,
2455
2464
  initialScheduleTypes: o,
2456
- initialView: s,
2465
+ ...a && { initialView: a },
2457
2466
  ...l && { initialDate: l },
2458
- ...x && { initialSelectedUserId: x },
2467
+ ...v && { initialSelectedUserId: v },
2459
2468
  ...h && { initialScheduleTypeIds: h },
2460
2469
  ...c && { initialParticipantIds: c },
2461
2470
  ...w && { initialWorkingHoursView: w },
2462
2471
  ...P && { initialSearchQuery: P },
2463
- ...b && { preferencesConfig: b },
2472
+ ...y && { preferencesConfig: y },
2464
2473
  ...H && { onDateChange: H },
2465
- ...k && { onViewChange: k },
2474
+ ...C && { onViewChange: C },
2466
2475
  ...f && { initialFocusEventId: f },
2467
2476
  children: /* @__PURE__ */ e(
2468
- En,
2477
+ Ln,
2469
2478
  {
2470
- ...y && { onEventClick: y },
2479
+ ...k && { onEventClick: k },
2471
2480
  ...B && { onSlotClick: B },
2472
2481
  ...A && { onSlotSelect: A },
2473
2482
  ...W && { onAddEvent: W },
2474
- ...a && { alwaysShowResources: a },
2483
+ ...s && { alwaysShowResources: s },
2475
2484
  ...z && { renderPopover: z },
2476
- className: $,
2485
+ className: O,
2477
2486
  showHeader: R,
2478
2487
  minSelectionMinutes: Y,
2479
2488
  ...M && { showMoreMode: M },
@@ -2481,7 +2490,7 @@ function Ln({
2481
2490
  isLoading: S,
2482
2491
  ...U && { slots: U },
2483
2492
  ...G && { classNames: G },
2484
- settingsContent: X,
2493
+ settingsContent: Q,
2485
2494
  filterContent: m,
2486
2495
  headerActions: p,
2487
2496
  calendarRef: te,
@@ -2493,8 +2502,8 @@ function Ln({
2493
2502
  }
2494
2503
  ) });
2495
2504
  }
2496
- const Dr = Pe(Ln), ve = Pe(
2497
- ({ className: t, children: n, ...a }, o) => /* @__PURE__ */ e(
2505
+ const Mr = Pe(Sn), xe = Pe(
2506
+ ({ className: t, children: n, ...s }, o) => /* @__PURE__ */ e(
2498
2507
  "select",
2499
2508
  {
2500
2509
  ref: o,
@@ -2506,16 +2515,16 @@ const Dr = Pe(Ln), ve = Pe(
2506
2515
  "[&>option]:bg-background",
2507
2516
  t
2508
2517
  ),
2509
- ...a,
2518
+ ...s,
2510
2519
  children: n
2511
2520
  }
2512
2521
  )
2513
2522
  );
2514
- ve.displayName = "Select";
2515
- const me = Pe(({ className: t, ...n }, a) => /* @__PURE__ */ e(
2523
+ xe.displayName = "Select";
2524
+ const he = Pe(({ className: t, ...n }, s) => /* @__PURE__ */ e(
2516
2525
  "label",
2517
2526
  {
2518
- ref: a,
2527
+ ref: s,
2519
2528
  className: g(
2520
2529
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
2521
2530
  t
@@ -2523,8 +2532,8 @@ const me = Pe(({ className: t, ...n }, a) => /* @__PURE__ */ e(
2523
2532
  ...n
2524
2533
  }
2525
2534
  ));
2526
- me.displayName = "Label";
2527
- function Sn({ className: t }) {
2535
+ he.displayName = "Label";
2536
+ function Tn({ className: t }) {
2528
2537
  return /* @__PURE__ */ r(
2529
2538
  "svg",
2530
2539
  {
@@ -2546,7 +2555,7 @@ function Sn({ className: t }) {
2546
2555
  }
2547
2556
  );
2548
2557
  }
2549
- function Tn({ className: t }) {
2558
+ function Hn({ className: t }) {
2550
2559
  return /* @__PURE__ */ r(
2551
2560
  "svg",
2552
2561
  {
@@ -2567,50 +2576,50 @@ function Tn({ className: t }) {
2567
2576
  }
2568
2577
  );
2569
2578
  }
2570
- const Hn = [
2579
+ const In = [
2571
2580
  { value: 15, label: "15 minutes" },
2572
2581
  { value: 30, label: "30 minutes" },
2573
2582
  { value: 60, label: "1 hour" }
2574
2583
  ];
2575
- function Mr({
2584
+ function Er({
2576
2585
  value: t,
2577
2586
  onChange: n,
2578
- isLocked: a = !1,
2587
+ isLocked: s = !1,
2579
2588
  className: o,
2580
- labels: s = {}
2589
+ labels: a = {}
2581
2590
  }) {
2582
2591
  const l = {
2583
2592
  title: "Slot duration",
2584
2593
  lockedMessage: "This setting is locked by the administrator",
2585
2594
  infoMessage: "Set the time slot duration for day and week calendar views.",
2586
- ...s
2587
- }, x = (h) => {
2588
- a || n(Number(h.target.value));
2595
+ ...a
2596
+ }, v = (h) => {
2597
+ s || n(Number(h.target.value));
2589
2598
  };
2590
2599
  return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-3", o), children: [
2591
2600
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
2592
- /* @__PURE__ */ e(me, { className: "text-sm font-semibold", children: l.title }),
2593
- a ? /* @__PURE__ */ e(fe, { delayDuration: 100, children: /* @__PURE__ */ r(ge, { children: [
2594
- /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(Tn, { className: "size-3 text-muted-foreground" }) }),
2595
- /* @__PURE__ */ e(xe, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
2596
- ] }) }) : /* @__PURE__ */ e(fe, { delayDuration: 100, children: /* @__PURE__ */ r(ge, { children: [
2597
- /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(Sn, { className: "size-3 text-muted-foreground" }) }),
2598
- /* @__PURE__ */ e(xe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
2601
+ /* @__PURE__ */ e(he, { className: "text-sm font-semibold", children: l.title }),
2602
+ s ? /* @__PURE__ */ e(me, { delayDuration: 100, children: /* @__PURE__ */ r(fe, { children: [
2603
+ /* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(Hn, { className: "size-3 text-muted-foreground" }) }),
2604
+ /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
2605
+ ] }) }) : /* @__PURE__ */ e(me, { delayDuration: 100, children: /* @__PURE__ */ r(fe, { children: [
2606
+ /* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(Tn, { className: "size-3 text-muted-foreground" }) }),
2607
+ /* @__PURE__ */ e(pe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
2599
2608
  ] }) })
2600
2609
  ] }),
2601
2610
  /* @__PURE__ */ e(
2602
- ve,
2611
+ xe,
2603
2612
  {
2604
2613
  value: t.toString(),
2605
- onChange: x,
2606
- disabled: a,
2614
+ onChange: v,
2615
+ disabled: s,
2607
2616
  className: "h-9 w-[128px] text-sm",
2608
- children: Hn.map((h) => /* @__PURE__ */ e("option", { value: h.value.toString(), children: h.label }, h.value))
2617
+ children: In.map((h) => /* @__PURE__ */ e("option", { value: h.value.toString(), children: h.label }, h.value))
2609
2618
  }
2610
2619
  )
2611
2620
  ] });
2612
2621
  }
2613
- function In({ className: t }) {
2622
+ function zn({ className: t }) {
2614
2623
  return /* @__PURE__ */ r(
2615
2624
  "svg",
2616
2625
  {
@@ -2632,7 +2641,7 @@ function In({ className: t }) {
2632
2641
  }
2633
2642
  );
2634
2643
  }
2635
- function zn({ className: t }) {
2644
+ function jn({ className: t }) {
2636
2645
  return /* @__PURE__ */ r(
2637
2646
  "svg",
2638
2647
  {
@@ -2653,17 +2662,17 @@ function zn({ className: t }) {
2653
2662
  }
2654
2663
  );
2655
2664
  }
2656
- const jn = [
2665
+ const An = [
2657
2666
  { value: "dot", label: "Dot indicator" },
2658
2667
  { value: "colored", label: "Full color" },
2659
2668
  { value: "mixed", label: "Mixed" }
2660
2669
  ];
2661
- function Er({
2670
+ function Lr({
2662
2671
  value: t,
2663
2672
  onChange: n,
2664
- isLocked: a = !1,
2673
+ isLocked: s = !1,
2665
2674
  className: o,
2666
- labels: s = {}
2675
+ labels: a = {}
2667
2676
  }) {
2668
2677
  const l = {
2669
2678
  title: "Event display",
@@ -2674,34 +2683,34 @@ function Er({
2674
2683
  colored: "Full color",
2675
2684
  mixed: "Mixed"
2676
2685
  },
2677
- ...s
2678
- }, x = (c) => l.options?.[c] ?? c, h = (c) => {
2679
- a || n(c.target.value);
2686
+ ...a
2687
+ }, v = (c) => l.options?.[c] ?? c, h = (c) => {
2688
+ s || n(c.target.value);
2680
2689
  };
2681
2690
  return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-3", o), children: [
2682
2691
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
2683
- /* @__PURE__ */ e(me, { className: "text-sm font-semibold", children: l.title }),
2684
- a ? /* @__PURE__ */ e(fe, { delayDuration: 100, children: /* @__PURE__ */ r(ge, { children: [
2685
- /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(zn, { className: "size-3 text-muted-foreground" }) }),
2686
- /* @__PURE__ */ e(xe, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
2687
- ] }) }) : /* @__PURE__ */ e(fe, { delayDuration: 100, children: /* @__PURE__ */ r(ge, { children: [
2688
- /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(In, { className: "size-3 text-muted-foreground" }) }),
2689
- /* @__PURE__ */ e(xe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
2692
+ /* @__PURE__ */ e(he, { className: "text-sm font-semibold", children: l.title }),
2693
+ s ? /* @__PURE__ */ e(me, { delayDuration: 100, children: /* @__PURE__ */ r(fe, { children: [
2694
+ /* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(jn, { className: "size-3 text-muted-foreground" }) }),
2695
+ /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
2696
+ ] }) }) : /* @__PURE__ */ e(me, { delayDuration: 100, children: /* @__PURE__ */ r(fe, { children: [
2697
+ /* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(zn, { className: "size-3 text-muted-foreground" }) }),
2698
+ /* @__PURE__ */ e(pe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
2690
2699
  ] }) })
2691
2700
  ] }),
2692
2701
  /* @__PURE__ */ e(
2693
- ve,
2702
+ xe,
2694
2703
  {
2695
2704
  value: t,
2696
2705
  onChange: h,
2697
- disabled: a,
2706
+ disabled: s,
2698
2707
  className: "h-9 w-[128px] text-sm",
2699
- children: jn.map((c) => /* @__PURE__ */ e("option", { value: c.value, children: x(c.value) }, c.value))
2708
+ children: An.map((c) => /* @__PURE__ */ e("option", { value: c.value, children: v(c.value) }, c.value))
2700
2709
  }
2701
2710
  )
2702
2711
  ] });
2703
2712
  }
2704
- function An({ className: t }) {
2713
+ function Pn({ className: t }) {
2705
2714
  return /* @__PURE__ */ r(
2706
2715
  "svg",
2707
2716
  {
@@ -2723,7 +2732,7 @@ function An({ className: t }) {
2723
2732
  }
2724
2733
  );
2725
2734
  }
2726
- function Pn({ className: t }) {
2735
+ function Wn({ className: t }) {
2727
2736
  return /* @__PURE__ */ r(
2728
2737
  "svg",
2729
2738
  {
@@ -2744,18 +2753,18 @@ function Pn({ className: t }) {
2744
2753
  }
2745
2754
  );
2746
2755
  }
2747
- function Wn() {
2756
+ function Fn() {
2748
2757
  return Array.from({ length: 25 }, (t, n) => ({
2749
2758
  value: n,
2750
2759
  label: `${String(n).padStart(2, "0")}:00`
2751
2760
  }));
2752
2761
  }
2753
- function Lr({
2762
+ function Sr({
2754
2763
  value: t,
2755
2764
  onChange: n,
2756
- isLocked: a = !1,
2765
+ isLocked: s = !1,
2757
2766
  className: o,
2758
- labels: s = {}
2767
+ labels: a = {}
2759
2768
  }) {
2760
2769
  const l = {
2761
2770
  title: "Visible hours",
@@ -2763,38 +2772,38 @@ function Lr({
2763
2772
  to: "To",
2764
2773
  lockedMessage: "This setting is locked by the administrator",
2765
2774
  infoMessage: "Set the visible hour range for day and week views. Hours outside this range will be hidden.",
2766
- ...s
2767
- }, x = Wn(), h = (w) => {
2768
- if (a) return;
2775
+ ...a
2776
+ }, v = Fn(), h = (w) => {
2777
+ if (s) return;
2769
2778
  const P = Number(w.target.value);
2770
2779
  P < t.endHour && n({ ...t, startHour: P });
2771
2780
  }, c = (w) => {
2772
- if (a) return;
2781
+ if (s) return;
2773
2782
  const P = Number(w.target.value);
2774
2783
  P > t.startHour && n({ ...t, endHour: P });
2775
2784
  };
2776
2785
  return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-3", o), children: [
2777
2786
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
2778
- /* @__PURE__ */ e(me, { className: "text-sm font-semibold", children: l.title }),
2779
- a ? /* @__PURE__ */ e(fe, { delayDuration: 100, children: /* @__PURE__ */ r(ge, { children: [
2780
- /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(Pn, { className: "size-3 text-muted-foreground" }) }),
2781
- /* @__PURE__ */ e(xe, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
2782
- ] }) }) : /* @__PURE__ */ e(fe, { delayDuration: 100, children: /* @__PURE__ */ r(ge, { children: [
2783
- /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(An, { className: "size-3 text-muted-foreground" }) }),
2784
- /* @__PURE__ */ e(xe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
2787
+ /* @__PURE__ */ e(he, { className: "text-sm font-semibold", children: l.title }),
2788
+ s ? /* @__PURE__ */ e(me, { delayDuration: 100, children: /* @__PURE__ */ r(fe, { children: [
2789
+ /* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(Wn, { className: "size-3 text-muted-foreground" }) }),
2790
+ /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
2791
+ ] }) }) : /* @__PURE__ */ e(me, { delayDuration: 100, children: /* @__PURE__ */ r(fe, { children: [
2792
+ /* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(Pn, { className: "size-3 text-muted-foreground" }) }),
2793
+ /* @__PURE__ */ e(pe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
2785
2794
  ] }) })
2786
2795
  ] }),
2787
2796
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
2788
2797
  /* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
2789
- /* @__PURE__ */ e(me, { className: "text-xs text-muted-foreground", children: l.from }),
2798
+ /* @__PURE__ */ e(he, { className: "text-xs text-muted-foreground", children: l.from }),
2790
2799
  /* @__PURE__ */ e(
2791
- ve,
2800
+ xe,
2792
2801
  {
2793
2802
  value: t.startHour.toString(),
2794
2803
  onChange: h,
2795
- disabled: a,
2804
+ disabled: s,
2796
2805
  className: "h-9 w-[88px] text-sm",
2797
- children: x.map((w) => /* @__PURE__ */ e(
2806
+ children: v.map((w) => /* @__PURE__ */ e(
2798
2807
  "option",
2799
2808
  {
2800
2809
  value: w.value.toString(),
@@ -2808,15 +2817,15 @@ function Lr({
2808
2817
  ] }),
2809
2818
  /* @__PURE__ */ e("span", { className: "mt-5 text-muted-foreground", children: "—" }),
2810
2819
  /* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
2811
- /* @__PURE__ */ e(me, { className: "text-xs text-muted-foreground", children: l.to }),
2820
+ /* @__PURE__ */ e(he, { className: "text-xs text-muted-foreground", children: l.to }),
2812
2821
  /* @__PURE__ */ e(
2813
- ve,
2822
+ xe,
2814
2823
  {
2815
2824
  value: t.endHour.toString(),
2816
2825
  onChange: c,
2817
- disabled: a,
2826
+ disabled: s,
2818
2827
  className: "h-9 w-[88px] text-sm",
2819
- children: x.map((w) => /* @__PURE__ */ e(
2828
+ children: v.map((w) => /* @__PURE__ */ e(
2820
2829
  "option",
2821
2830
  {
2822
2831
  value: w.value.toString(),
@@ -2831,7 +2840,7 @@ function Lr({
2831
2840
  ] })
2832
2841
  ] });
2833
2842
  }
2834
- function Fn({ className: t }) {
2843
+ function $n({ className: t }) {
2835
2844
  return /* @__PURE__ */ r(
2836
2845
  "svg",
2837
2846
  {
@@ -2853,7 +2862,7 @@ function Fn({ className: t }) {
2853
2862
  }
2854
2863
  );
2855
2864
  }
2856
- function $n({ className: t }) {
2865
+ function On({ className: t }) {
2857
2866
  return /* @__PURE__ */ r(
2858
2867
  "svg",
2859
2868
  {
@@ -2874,7 +2883,7 @@ function $n({ className: t }) {
2874
2883
  }
2875
2884
  );
2876
2885
  }
2877
- function On({ className: t }) {
2886
+ function _n({ className: t }) {
2878
2887
  return /* @__PURE__ */ e(
2879
2888
  "svg",
2880
2889
  {
@@ -2892,7 +2901,7 @@ function On({ className: t }) {
2892
2901
  }
2893
2902
  );
2894
2903
  }
2895
- const _n = [
2904
+ const Bn = [
2896
2905
  "monday",
2897
2906
  "tuesday",
2898
2907
  "wednesday",
@@ -2901,7 +2910,7 @@ const _n = [
2901
2910
  "saturday",
2902
2911
  "sunday"
2903
2912
  ];
2904
- function Bn() {
2913
+ function Rn() {
2905
2914
  return Array.from({ length: 25 }, (t, n) => ({
2906
2915
  value: n,
2907
2916
  label: `${String(n).padStart(2, "0")}:00`
@@ -2916,17 +2925,17 @@ const rt = {
2916
2925
  friday: "Fri",
2917
2926
  saturday: "Sat"
2918
2927
  };
2919
- function Rn({ dayLabel: t, config: n, onChange: a, disabled: o, hourOptions: s }) {
2928
+ function Un({ dayLabel: t, config: n, onChange: s, disabled: o, hourOptions: a }) {
2920
2929
  const l = () => {
2921
- o || a({ ...n, enabled: !n.enabled });
2922
- }, x = (c) => {
2930
+ o || s({ ...n, enabled: !n.enabled });
2931
+ }, v = (c) => {
2923
2932
  if (o) return;
2924
2933
  const w = Number(c.target.value);
2925
- w < n.to && a({ ...n, from: w });
2934
+ w < n.to && s({ ...n, from: w });
2926
2935
  }, h = (c) => {
2927
2936
  if (o) return;
2928
2937
  const w = Number(c.target.value);
2929
- w > n.from && a({ ...n, to: w });
2938
+ w > n.from && s({ ...n, to: w });
2930
2939
  };
2931
2940
  return /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
2932
2941
  /* @__PURE__ */ e(
@@ -2943,74 +2952,74 @@ function Rn({ dayLabel: t, config: n, onChange: a, disabled: o, hourOptions: s }
2943
2952
  n.enabled ? "border-primary bg-primary text-primary-foreground" : "border-input bg-background",
2944
2953
  o && "cursor-not-allowed opacity-50"
2945
2954
  ),
2946
- children: n.enabled && /* @__PURE__ */ e(On, { className: "size-3" })
2955
+ children: n.enabled && /* @__PURE__ */ e(_n, { className: "size-3" })
2947
2956
  }
2948
2957
  ),
2949
2958
  /* @__PURE__ */ e("span", { className: g("w-10 text-sm", !n.enabled && "text-muted-foreground"), children: t }),
2950
2959
  /* @__PURE__ */ e(
2951
- ve,
2960
+ xe,
2952
2961
  {
2953
2962
  value: n.from.toString(),
2954
- onChange: x,
2963
+ onChange: v,
2955
2964
  disabled: o || !n.enabled,
2956
2965
  className: "h-8 w-[76px] text-xs",
2957
- children: s.map((c) => /* @__PURE__ */ e("option", { value: c.value.toString(), disabled: c.value >= n.to, children: c.label }, c.value))
2966
+ children: a.map((c) => /* @__PURE__ */ e("option", { value: c.value.toString(), disabled: c.value >= n.to, children: c.label }, c.value))
2958
2967
  }
2959
2968
  ),
2960
2969
  /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: "—" }),
2961
2970
  /* @__PURE__ */ e(
2962
- ve,
2971
+ xe,
2963
2972
  {
2964
2973
  value: n.to.toString(),
2965
2974
  onChange: h,
2966
2975
  disabled: o || !n.enabled,
2967
2976
  className: "h-8 w-[76px] text-xs",
2968
- children: s.map((c) => /* @__PURE__ */ e("option", { value: c.value.toString(), disabled: c.value <= n.from, children: c.label }, c.value))
2977
+ children: a.map((c) => /* @__PURE__ */ e("option", { value: c.value.toString(), disabled: c.value <= n.from, children: c.label }, c.value))
2969
2978
  }
2970
2979
  )
2971
2980
  ] });
2972
2981
  }
2973
- function Sr({
2982
+ function Tr({
2974
2983
  value: t,
2975
2984
  onChange: n,
2976
- isLocked: a = !1,
2985
+ isLocked: s = !1,
2977
2986
  className: o,
2978
- labels: s = {}
2987
+ labels: a = {}
2979
2988
  }) {
2980
2989
  const l = {
2981
2990
  title: "Working hours",
2982
2991
  lockedMessage: "This setting is locked by the administrator",
2983
2992
  infoMessage: "Configure working hours for each day of the week. Non-working hours will be grayed out in day and week views.",
2984
2993
  days: rt,
2985
- ...s
2986
- }, x = Bn(), h = (c, w) => {
2987
- a || n({ ...t, [c]: w });
2994
+ ...a
2995
+ }, v = Rn(), h = (c, w) => {
2996
+ s || n({ ...t, [c]: w });
2988
2997
  };
2989
2998
  return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-3", o), children: [
2990
2999
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
2991
- /* @__PURE__ */ e(me, { className: "text-sm font-semibold", children: l.title }),
2992
- a ? /* @__PURE__ */ e(fe, { delayDuration: 100, children: /* @__PURE__ */ r(ge, { children: [
2993
- /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e($n, { className: "size-3 text-muted-foreground" }) }),
2994
- /* @__PURE__ */ e(xe, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
2995
- ] }) }) : /* @__PURE__ */ e(fe, { delayDuration: 100, children: /* @__PURE__ */ r(ge, { children: [
2996
- /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e(Fn, { className: "size-3 text-muted-foreground" }) }),
2997
- /* @__PURE__ */ e(xe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
3000
+ /* @__PURE__ */ e(he, { className: "text-sm font-semibold", children: l.title }),
3001
+ s ? /* @__PURE__ */ e(me, { delayDuration: 100, children: /* @__PURE__ */ r(fe, { children: [
3002
+ /* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(On, { className: "size-3 text-muted-foreground" }) }),
3003
+ /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
3004
+ ] }) }) : /* @__PURE__ */ e(me, { delayDuration: 100, children: /* @__PURE__ */ r(fe, { children: [
3005
+ /* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e($n, { className: "size-3 text-muted-foreground" }) }),
3006
+ /* @__PURE__ */ e(pe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
2998
3007
  ] }) })
2999
3008
  ] }),
3000
- /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: _n.map((c) => /* @__PURE__ */ e(
3001
- Rn,
3009
+ /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: Bn.map((c) => /* @__PURE__ */ e(
3010
+ Un,
3002
3011
  {
3003
3012
  dayLabel: l.days?.[c] ?? rt[c],
3004
3013
  config: t[c],
3005
3014
  onChange: (w) => h(c, w),
3006
- disabled: a,
3007
- hourOptions: x
3015
+ disabled: s,
3016
+ hourOptions: v
3008
3017
  },
3009
3018
  c
3010
3019
  )) })
3011
3020
  ] });
3012
3021
  }
3013
- const Tr = {
3022
+ const Hr = {
3014
3023
  sunday: { enabled: !1, from: 8, to: 18 },
3015
3024
  monday: { enabled: !0, from: 8, to: 18 },
3016
3025
  tuesday: { enabled: !0, from: 8, to: 18 },
@@ -3019,7 +3028,7 @@ const Tr = {
3019
3028
  friday: { enabled: !0, from: 8, to: 18 },
3020
3029
  saturday: { enabled: !1, from: 8, to: 18 }
3021
3030
  };
3022
- function _e({ className: t }) {
3031
+ function Be({ className: t }) {
3023
3032
  return /* @__PURE__ */ e(
3024
3033
  "svg",
3025
3034
  {
@@ -3035,7 +3044,7 @@ function _e({ className: t }) {
3035
3044
  }
3036
3045
  );
3037
3046
  }
3038
- function Un({ className: t }) {
3047
+ function Vn({ className: t }) {
3039
3048
  return /* @__PURE__ */ r(
3040
3049
  "svg",
3041
3050
  {
@@ -3054,7 +3063,7 @@ function Un({ className: t }) {
3054
3063
  }
3055
3064
  );
3056
3065
  }
3057
- function Vn({ className: t }) {
3066
+ function Yn({ className: t }) {
3058
3067
  return /* @__PURE__ */ r(
3059
3068
  "svg",
3060
3069
  {
@@ -3073,7 +3082,7 @@ function Vn({ className: t }) {
3073
3082
  }
3074
3083
  );
3075
3084
  }
3076
- function Be({ checked: t, onCheckedChange: n, className: a, children: o }) {
3085
+ function Re({ checked: t, onCheckedChange: n, className: s, children: o }) {
3077
3086
  return /* @__PURE__ */ e(
3078
3087
  "button",
3079
3088
  {
@@ -3081,21 +3090,21 @@ function Be({ checked: t, onCheckedChange: n, className: a, children: o }) {
3081
3090
  role: "checkbox",
3082
3091
  "aria-checked": t,
3083
3092
  onClick: () => n(!t),
3084
- className: a,
3093
+ className: s,
3085
3094
  children: o
3086
3095
  }
3087
3096
  );
3088
3097
  }
3089
- function Yn({ src: t, alt: n, fallback: a, className: o }) {
3090
- const [s, l] = le(!1);
3091
- return !t || s ? /* @__PURE__ */ e(
3098
+ function Kn({ src: t, alt: n, fallback: s, className: o }) {
3099
+ const [a, l] = ie(!1);
3100
+ return !t || a ? /* @__PURE__ */ e(
3092
3101
  "div",
3093
3102
  {
3094
3103
  className: g(
3095
3104
  "flex items-center justify-center bg-zinc-200 text-zinc-600 font-medium text-sm",
3096
3105
  o
3097
3106
  ),
3098
- children: a || "?"
3107
+ children: s || "?"
3099
3108
  }
3100
3109
  ) : /* @__PURE__ */ e(
3101
3110
  "img",
@@ -3107,27 +3116,27 @@ function Yn({ src: t, alt: n, fallback: a, className: o }) {
3107
3116
  }
3108
3117
  );
3109
3118
  }
3110
- function ot({ value: t, onChange: n, placeholder: a, className: o }) {
3119
+ function ot({ value: t, onChange: n, placeholder: s, className: o }) {
3111
3120
  return /* @__PURE__ */ r("div", { className: g("relative", o), children: [
3112
- /* @__PURE__ */ e(Un, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
3121
+ /* @__PURE__ */ e(Vn, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
3113
3122
  /* @__PURE__ */ e(
3114
3123
  "input",
3115
3124
  {
3116
3125
  type: "text",
3117
3126
  value: t,
3118
- onChange: (s) => n(s.target.value),
3119
- placeholder: a,
3127
+ onChange: (a) => n(a.target.value),
3128
+ placeholder: s,
3120
3129
  className: "h-9 w-full rounded-lg border border-border bg-white pl-9 pr-3 text-sm placeholder:text-muted-foreground focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary"
3121
3130
  }
3122
3131
  )
3123
3132
  ] });
3124
3133
  }
3125
- function at(t, n, a, o = 0.3) {
3134
+ function st(t, n, s, o = 0.3) {
3126
3135
  if (!n.trim()) return t;
3127
- const s = n.toLowerCase();
3128
- return t.filter((l) => a(l).some((h) => h ? h.toLowerCase().includes(s) : !1));
3136
+ const a = n.toLowerCase();
3137
+ return t.filter((l) => s(l).some((h) => h ? h.toLowerCase().includes(a) : !1));
3129
3138
  }
3130
- const Kn = {
3139
+ const Gn = {
3131
3140
  title: "Filters",
3132
3141
  subtitle: "Filter calendar events",
3133
3142
  scheduleTypes: "Event Types",
@@ -3140,51 +3149,51 @@ const Kn = {
3140
3149
  noScheduleTypes: "No event types found",
3141
3150
  noParticipants: "No participants found"
3142
3151
  };
3143
- function Hr({
3152
+ function Ir({
3144
3153
  scheduleTypes: t,
3145
3154
  users: n,
3146
- selectedScheduleTypeIds: a,
3155
+ selectedScheduleTypeIds: s,
3147
3156
  onScheduleTypeChange: o,
3148
- selectedUserIds: s,
3157
+ selectedUserIds: a,
3149
3158
  onUserChange: l,
3150
- onClearAll: x,
3159
+ onClearAll: v,
3151
3160
  className: h,
3152
3161
  scheduleTypesLoading: c = !1,
3153
3162
  usersLoading: w = !1,
3154
3163
  labels: P,
3155
- getScheduleTypeName: b
3164
+ getScheduleTypeName: y
3156
3165
  }) {
3157
- const y = { ...Kn, ...P }, [B, A] = le(""), [W, F] = le(""), H = ee(() => B.trim() ? at(t, B, (m) => [
3166
+ const k = { ...Gn, ...P }, [B, A] = ie(""), [W, F] = ie(""), H = ee(() => B.trim() ? st(t, B, (m) => [
3158
3167
  m.name,
3159
- b?.(m) || m.name
3160
- ]) : t, [t, B, b]), k = ee(() => W.trim() ? at(n, W, (m) => [m.name, m.email || ""]) : n, [n, W]), $ = H.length > 0 && H.every((m) => a.includes(m.id)), R = k.length > 0 && k.every((m) => s.includes(m.id)), Y = a.length + s.length, M = (m, p) => {
3161
- const f = p ? [...a, m] : a.filter((E) => E !== m);
3168
+ y?.(m) || m.name
3169
+ ]) : t, [t, B, y]), C = ee(() => W.trim() ? st(n, W, (m) => [m.name, m.email || ""]) : n, [n, W]), O = H.length > 0 && H.every((m) => s.includes(m.id)), R = C.length > 0 && C.every((m) => a.includes(m.id)), Y = s.length + a.length, M = (m, p) => {
3170
+ const f = p ? [...s, m] : s.filter((E) => E !== m);
3162
3171
  o(f);
3163
3172
  }, V = () => {
3164
- if ($) {
3173
+ if (O) {
3165
3174
  const m = new Set(H.map((p) => p.id));
3166
- o(a.filter((p) => !m.has(p)));
3175
+ o(s.filter((p) => !m.has(p)));
3167
3176
  } else {
3168
3177
  const m = /* @__PURE__ */ new Set([
3169
- ...a,
3178
+ ...s,
3170
3179
  ...H.map((p) => p.id)
3171
3180
  ]);
3172
3181
  o(Array.from(m));
3173
3182
  }
3174
3183
  }, S = (m, p) => {
3175
- const f = p ? [...s, m] : s.filter((E) => E !== m);
3184
+ const f = p ? [...a, m] : a.filter((E) => E !== m);
3176
3185
  l(f);
3177
3186
  }, z = () => {
3178
3187
  if (R) {
3179
- const m = new Set(k.map((p) => p.id));
3180
- l(s.filter((p) => !m.has(p)));
3188
+ const m = new Set(C.map((p) => p.id));
3189
+ l(a.filter((p) => !m.has(p)));
3181
3190
  } else {
3182
- const m = /* @__PURE__ */ new Set([...s, ...k.map((p) => p.id)]);
3191
+ const m = /* @__PURE__ */ new Set([...a, ...C.map((p) => p.id)]);
3183
3192
  l(Array.from(m));
3184
3193
  }
3185
3194
  }, U = () => {
3186
- o([]), l([]), x?.();
3187
- }, G = (m) => b ? b(m) : m.name, X = (m) => m.colorHex || m.color || "#069AD7";
3195
+ o([]), l([]), v?.();
3196
+ }, G = (m) => y ? y(m) : m.name, Q = (m) => m.colorHex || m.color || "#069AD7";
3188
3197
  return /* @__PURE__ */ r(
3189
3198
  "div",
3190
3199
  {
@@ -3195,8 +3204,8 @@ function Hr({
3195
3204
  children: [
3196
3205
  /* @__PURE__ */ r("header", { className: "flex items-start justify-between gap-2 px-4 pb-2 pt-4", children: [
3197
3206
  /* @__PURE__ */ r("div", { className: "flex flex-col", children: [
3198
- /* @__PURE__ */ e("h3", { className: "text-base font-semibold text-foreground", children: y.title }),
3199
- /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: y.subtitle })
3207
+ /* @__PURE__ */ e("h3", { className: "text-base font-semibold text-foreground", children: k.title }),
3208
+ /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: k.subtitle })
3200
3209
  ] }),
3201
3210
  Y > 0 && /* @__PURE__ */ r(
3202
3211
  "button",
@@ -3205,8 +3214,8 @@ function Hr({
3205
3214
  onClick: U,
3206
3215
  className: "flex h-auto items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-destructive transition-colors hover:bg-destructive/10",
3207
3216
  children: [
3208
- /* @__PURE__ */ e(Vn, { className: "h-3.5 w-3.5" }),
3209
- y.clearAll
3217
+ /* @__PURE__ */ e(Yn, { className: "h-3.5 w-3.5" }),
3218
+ k.clearAll
3210
3219
  ]
3211
3220
  }
3212
3221
  )
@@ -3214,14 +3223,14 @@ function Hr({
3214
3223
  /* @__PURE__ */ e("div", { className: "h-px w-full bg-border/60" }),
3215
3224
  /* @__PURE__ */ r("section", { className: "flex flex-col", children: [
3216
3225
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between px-4 py-3", children: [
3217
- /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: y.scheduleTypes }),
3226
+ /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: k.scheduleTypes }),
3218
3227
  /* @__PURE__ */ e(
3219
3228
  "button",
3220
3229
  {
3221
3230
  type: "button",
3222
3231
  onClick: V,
3223
3232
  className: "text-xs font-medium text-primary transition-colors hover:text-primary/80",
3224
- children: $ ? y.unselectAll : y.selectAll
3233
+ children: O ? k.unselectAll : k.selectAll
3225
3234
  }
3226
3235
  )
3227
3236
  ] }),
@@ -3230,7 +3239,7 @@ function Hr({
3230
3239
  {
3231
3240
  value: B,
3232
3241
  onChange: A,
3233
- placeholder: y.searchScheduleTypes
3242
+ placeholder: k.searchScheduleTypes
3234
3243
  }
3235
3244
  ) }),
3236
3245
  /* @__PURE__ */ r("div", { className: "flex max-h-[220px] flex-col gap-2 overflow-y-auto px-4 pb-2 scrollbar-thin", children: [
@@ -3248,9 +3257,9 @@ function Hr({
3248
3257
  `skeleton-${p}`
3249
3258
  ))
3250
3259
  ) : H.map((m) => {
3251
- const p = a.includes(m.id), f = X(m);
3260
+ const p = s.includes(m.id), f = Q(m);
3252
3261
  return /* @__PURE__ */ r(
3253
- Be,
3262
+ Re,
3254
3263
  {
3255
3264
  checked: p,
3256
3265
  onCheckedChange: (E) => M(m.id, E),
@@ -3267,7 +3276,7 @@ function Hr({
3267
3276
  "flex h-4 w-4 items-center justify-center rounded border border-border text-xs transition-colors",
3268
3277
  p && "border-primary bg-primary text-primary-foreground"
3269
3278
  ),
3270
- children: p && /* @__PURE__ */ e(_e, { className: "h-3 w-3" })
3279
+ children: p && /* @__PURE__ */ e(Be, { className: "h-3 w-3" })
3271
3280
  }
3272
3281
  ),
3273
3282
  /* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: G(m) })
@@ -3287,15 +3296,15 @@ function Hr({
3287
3296
  m.id
3288
3297
  );
3289
3298
  }),
3290
- !c && H.length === 0 && /* @__PURE__ */ e("p", { className: "px-2 py-1 text-xs text-muted-foreground", children: y.noScheduleTypes })
3299
+ !c && H.length === 0 && /* @__PURE__ */ e("p", { className: "px-2 py-1 text-xs text-muted-foreground", children: k.noScheduleTypes })
3291
3300
  ] })
3292
3301
  ] }),
3293
3302
  /* @__PURE__ */ e("div", { className: "h-px w-full bg-border/60" }),
3294
3303
  /* @__PURE__ */ r("section", { className: "flex flex-col", children: [
3295
3304
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between px-4 py-3", children: [
3296
- /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: y.participants }),
3305
+ /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: k.participants }),
3297
3306
  /* @__PURE__ */ e(
3298
- Be,
3307
+ Re,
3299
3308
  {
3300
3309
  checked: R,
3301
3310
  onCheckedChange: () => z(),
@@ -3303,7 +3312,7 @@ function Hr({
3303
3312
  "flex h-5 w-5 items-center justify-center rounded border border-border bg-white transition-colors hover:border-primary/50",
3304
3313
  R && "border-primary bg-primary text-primary-foreground"
3305
3314
  ),
3306
- children: R && /* @__PURE__ */ e(_e, { className: "h-3.5 w-3.5" })
3315
+ children: R && /* @__PURE__ */ e(Be, { className: "h-3.5 w-3.5" })
3307
3316
  }
3308
3317
  )
3309
3318
  ] }),
@@ -3312,7 +3321,7 @@ function Hr({
3312
3321
  {
3313
3322
  value: W,
3314
3323
  onChange: F,
3315
- placeholder: y.searchParticipants
3324
+ placeholder: k.searchParticipants
3316
3325
  }
3317
3326
  ) }),
3318
3327
  /* @__PURE__ */ r("div", { className: "flex max-h-[400px] flex-col gap-2 overflow-y-auto px-4 pb-4 scrollbar-thin", children: [
@@ -3333,10 +3342,10 @@ function Hr({
3333
3342
  },
3334
3343
  `p-skeleton-${p}`
3335
3344
  ))
3336
- ) : k.map((m) => {
3337
- const p = s.includes(m.id);
3345
+ ) : C.map((m) => {
3346
+ const p = a.includes(m.id);
3338
3347
  return /* @__PURE__ */ r(
3339
- Be,
3348
+ Re,
3340
3349
  {
3341
3350
  checked: p,
3342
3351
  onCheckedChange: (f) => S(m.id, f),
@@ -3352,12 +3361,12 @@ function Hr({
3352
3361
  "flex h-4 w-4 flex-shrink-0 items-center justify-center rounded border border-border transition-colors",
3353
3362
  p && "border-primary bg-primary text-primary-foreground"
3354
3363
  ),
3355
- children: p && /* @__PURE__ */ e(_e, { className: "h-2.5 w-2.5" })
3364
+ children: p && /* @__PURE__ */ e(Be, { className: "h-2.5 w-2.5" })
3356
3365
  }
3357
3366
  ),
3358
3367
  /* @__PURE__ */ r("div", { className: "flex flex-1 items-start gap-2", children: [
3359
3368
  /* @__PURE__ */ e(
3360
- Yn,
3369
+ Kn,
3361
3370
  {
3362
3371
  src: m.avatar ?? null,
3363
3372
  alt: m.name,
@@ -3382,14 +3391,14 @@ function Hr({
3382
3391
  m.id
3383
3392
  );
3384
3393
  }),
3385
- !w && k.length === 0 && /* @__PURE__ */ e("p", { className: "px-4 text-xs text-muted-foreground", children: y.noParticipants })
3394
+ !w && C.length === 0 && /* @__PURE__ */ e("p", { className: "px-4 text-xs text-muted-foreground", children: k.noParticipants })
3386
3395
  ] })
3387
3396
  ] })
3388
3397
  ]
3389
3398
  }
3390
3399
  );
3391
3400
  }
3392
- function Gn({ className: t }) {
3401
+ function Jn({ className: t }) {
3393
3402
  return /* @__PURE__ */ r(
3394
3403
  "svg",
3395
3404
  {
@@ -3410,19 +3419,19 @@ function Gn({ className: t }) {
3410
3419
  }
3411
3420
  );
3412
3421
  }
3413
- function Ir({
3422
+ function zr({
3414
3423
  scheduleTypes: t,
3415
3424
  value: n,
3416
- onChange: a,
3425
+ onChange: s,
3417
3426
  allLabel: o = "All types",
3418
- className: s,
3427
+ className: a,
3419
3428
  label: l
3420
3429
  }) {
3421
- const x = (c) => {
3422
- a(c.target.value);
3430
+ const v = (c) => {
3431
+ s(c.target.value);
3423
3432
  }, h = t.find((c) => String(c.id) === n);
3424
- return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-1", s), children: [
3425
- l && /* @__PURE__ */ e(me, { className: "text-xs text-muted-foreground", children: l }),
3433
+ return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-1", a), children: [
3434
+ l && /* @__PURE__ */ e(he, { className: "text-xs text-muted-foreground", children: l }),
3426
3435
  /* @__PURE__ */ r("div", { className: "relative", children: [
3427
3436
  h ? /* @__PURE__ */ e(
3428
3437
  "span",
@@ -3430,12 +3439,12 @@ function Ir({
3430
3439
  className: "pointer-events-none absolute left-2.5 top-1/2 size-3 -translate-y-1/2 rounded-full",
3431
3440
  style: { backgroundColor: h.color }
3432
3441
  }
3433
- ) : /* @__PURE__ */ e(Gn, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
3442
+ ) : /* @__PURE__ */ e(Jn, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
3434
3443
  /* @__PURE__ */ r(
3435
- ve,
3444
+ xe,
3436
3445
  {
3437
3446
  value: n,
3438
- onChange: x,
3447
+ onChange: v,
3439
3448
  className: "h-9 w-full min-w-[140px] pl-8 pr-8 text-sm",
3440
3449
  children: [
3441
3450
  /* @__PURE__ */ e("option", { value: "all", children: o }),
@@ -3446,7 +3455,7 @@ function Ir({
3446
3455
  ] })
3447
3456
  ] });
3448
3457
  }
3449
- function Jn({ className: t }) {
3458
+ function qn({ className: t }) {
3450
3459
  return /* @__PURE__ */ r(
3451
3460
  "svg",
3452
3461
  {
@@ -3469,26 +3478,26 @@ function Jn({ className: t }) {
3469
3478
  }
3470
3479
  );
3471
3480
  }
3472
- function zr({
3481
+ function jr({
3473
3482
  users: t,
3474
3483
  value: n,
3475
- onChange: a,
3484
+ onChange: s,
3476
3485
  allLabel: o = "All users",
3477
- className: s,
3486
+ className: a,
3478
3487
  label: l
3479
3488
  }) {
3480
- const x = (h) => {
3481
- a(h.target.value);
3489
+ const v = (h) => {
3490
+ s(h.target.value);
3482
3491
  };
3483
- return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-1", s), children: [
3484
- l && /* @__PURE__ */ e(me, { className: "text-xs text-muted-foreground", children: l }),
3492
+ return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-1", a), children: [
3493
+ l && /* @__PURE__ */ e(he, { className: "text-xs text-muted-foreground", children: l }),
3485
3494
  /* @__PURE__ */ r("div", { className: "relative", children: [
3486
- /* @__PURE__ */ e(Jn, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
3495
+ /* @__PURE__ */ e(qn, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
3487
3496
  /* @__PURE__ */ r(
3488
- ve,
3497
+ xe,
3489
3498
  {
3490
3499
  value: n,
3491
- onChange: x,
3500
+ onChange: v,
3492
3501
  className: "h-9 w-full min-w-[120px] pl-8 pr-8 text-sm",
3493
3502
  children: [
3494
3503
  /* @__PURE__ */ e("option", { value: "all", children: o }),
@@ -3499,7 +3508,7 @@ function zr({
3499
3508
  ] })
3500
3509
  ] });
3501
3510
  }
3502
- function qn({ className: t }) {
3511
+ function Xn({ className: t }) {
3503
3512
  return /* @__PURE__ */ r(
3504
3513
  "svg",
3505
3514
  {
@@ -3526,7 +3535,7 @@ function qn({ className: t }) {
3526
3535
  }
3527
3536
  );
3528
3537
  }
3529
- function Xn({ className: t }) {
3538
+ function Qn({ className: t }) {
3530
3539
  return /* @__PURE__ */ r(
3531
3540
  "svg",
3532
3541
  {
@@ -3549,7 +3558,7 @@ function Xn({ className: t }) {
3549
3558
  }
3550
3559
  );
3551
3560
  }
3552
- function Qn({ className: t }) {
3561
+ function Zn({ className: t }) {
3553
3562
  return /* @__PURE__ */ e(
3554
3563
  "svg",
3555
3564
  {
@@ -3565,7 +3574,7 @@ function Qn({ className: t }) {
3565
3574
  }
3566
3575
  );
3567
3576
  }
3568
- function Zn({ className: t }) {
3577
+ function er({ className: t }) {
3569
3578
  return /* @__PURE__ */ r(
3570
3579
  "svg",
3571
3580
  {
@@ -3585,26 +3594,26 @@ function Zn({ className: t }) {
3585
3594
  }
3586
3595
  );
3587
3596
  }
3588
- function er(t) {
3589
- const n = t.getFullYear(), a = String(t.getMonth() + 1).padStart(2, "0"), o = String(t.getDate()).padStart(2, "0");
3590
- return `${n}-${a}-${o}`;
3591
- }
3592
- function st(t) {
3593
- const n = t.getHours(), a = t.getMinutes(), o = n >= 12 ? "PM" : "AM", s = n % 12 || 12, l = String(a).padStart(2, "0");
3594
- return `${s}:${l} ${o}`;
3595
- }
3596
3597
  function tr(t) {
3597
- const n = st(t.startDate), a = st(t.endDate);
3598
- return `${n} - ${a}`;
3598
+ const n = t.getFullYear(), s = String(t.getMonth() + 1).padStart(2, "0"), o = String(t.getDate()).padStart(2, "0");
3599
+ return `${n}-${s}-${o}`;
3600
+ }
3601
+ function at(t) {
3602
+ const n = t.getHours(), s = t.getMinutes(), o = n >= 12 ? "PM" : "AM", a = n % 12 || 12, l = String(s).padStart(2, "0");
3603
+ return `${a}:${l} ${o}`;
3599
3604
  }
3600
3605
  function nr(t) {
3606
+ const n = at(t.startDate), s = at(t.endDate);
3607
+ return `${n} - ${s}`;
3608
+ }
3609
+ function rr(t) {
3601
3610
  const n = mt(/* @__PURE__ */ new Date(), 1);
3602
3611
  return t.getFullYear() === n.getFullYear() && t.getMonth() === n.getMonth() && t.getDate() === n.getDate();
3603
3612
  }
3604
- function rr(t) {
3605
- if (de(t)) return "Today";
3606
- if (nr(t)) return "Tomorrow";
3607
- const n = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], a = [
3613
+ function or(t) {
3614
+ if (ce(t)) return "Today";
3615
+ if (rr(t)) return "Tomorrow";
3616
+ const n = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], s = [
3608
3617
  "Jan",
3609
3618
  "Feb",
3610
3619
  "Mar",
@@ -3617,35 +3626,35 @@ function rr(t) {
3617
3626
  "Oct",
3618
3627
  "Nov",
3619
3628
  "Dec"
3620
- ], o = n[t.getDay()], s = a[t.getMonth()], l = t.getDate();
3621
- return `${o}, ${s} ${l}`;
3629
+ ], o = n[t.getDay()], a = s[t.getMonth()], l = t.getDate();
3630
+ return `${o}, ${a} ${l}`;
3622
3631
  }
3623
- function or(t, n) {
3624
- const a = /* @__PURE__ */ new Map();
3632
+ function sr(t, n) {
3633
+ const s = /* @__PURE__ */ new Map();
3625
3634
  for (const o of t) {
3626
- const s = er(o.startDate), l = a.get(s) ?? [];
3627
- l.push(o), a.set(s, l);
3635
+ const a = tr(o.startDate), l = s.get(a) ?? [];
3636
+ l.push(o), s.set(a, l);
3628
3637
  }
3629
- return Array.from(a.entries()).map(([o, s]) => {
3630
- const l = [...s].sort(
3638
+ return Array.from(s.entries()).map(([o, a]) => {
3639
+ const l = [...a].sort(
3631
3640
  (h, c) => h.startDate.getTime() - c.startDate.getTime()
3632
- ), x = n > 0 ? l.slice(0, n) : l;
3641
+ ), v = n > 0 ? l.slice(0, n) : l;
3633
3642
  return {
3634
3643
  date: new Date(o),
3635
3644
  dateKey: o,
3636
- events: x,
3645
+ events: v,
3637
3646
  hasMore: n > 0 && l.length > n
3638
3647
  };
3639
- }).sort((o, s) => o.date.getTime() - s.date.getTime());
3648
+ }).sort((o, a) => o.date.getTime() - a.date.getTime());
3640
3649
  }
3641
3650
  function ar(t) {
3642
- const n = We(/* @__PURE__ */ new Date()), a = ht(/* @__PURE__ */ new Date());
3643
- return t.filter((o) => o.startDate >= n && o.startDate <= a).length;
3651
+ const n = We(/* @__PURE__ */ new Date()), s = ht(/* @__PURE__ */ new Date());
3652
+ return t.filter((o) => o.startDate >= n && o.startDate <= s).length;
3644
3653
  }
3645
- function Re({ className: t }) {
3654
+ function Ue({ className: t }) {
3646
3655
  return /* @__PURE__ */ e("div", { className: g("animate-pulse rounded-md bg-muted", t) });
3647
3656
  }
3648
- function sr({ event: t, onClick: n }) {
3657
+ function ir({ event: t, onClick: n }) {
3649
3658
  return /* @__PURE__ */ r(
3650
3659
  "button",
3651
3660
  {
@@ -3666,45 +3675,45 @@ function sr({ event: t, onClick: n }) {
3666
3675
  ),
3667
3676
  /* @__PURE__ */ r("div", { className: "min-w-0 flex-1", children: [
3668
3677
  /* @__PURE__ */ e("p", { className: "text-sm font-medium truncate", children: t.title }),
3669
- /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children: tr(t) })
3678
+ /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children: nr(t) })
3670
3679
  ] }),
3671
- n && /* @__PURE__ */ e(Qn, { className: "shrink-0 size-4 text-muted-foreground/50 mt-1" })
3680
+ n && /* @__PURE__ */ e(Zn, { className: "shrink-0 size-4 text-muted-foreground/50 mt-1" })
3672
3681
  ]
3673
3682
  }
3674
3683
  );
3675
3684
  }
3676
- function ir({ group: t, onEventClick: n }) {
3685
+ function lr({ group: t, onEventClick: n }) {
3677
3686
  return /* @__PURE__ */ r("div", { className: "space-y-1", children: [
3678
3687
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between px-2 py-1.5", children: [
3679
- /* @__PURE__ */ e("h3", { className: g("text-xs font-semibold", de(t.date) && "text-primary"), children: rr(t.date) }),
3688
+ /* @__PURE__ */ e("h3", { className: g("text-xs font-semibold", ce(t.date) && "text-primary"), children: or(t.date) }),
3680
3689
  t.hasMore && /* @__PURE__ */ r("span", { className: "text-[10px] text-muted-foreground", children: [
3681
3690
  "+",
3682
3691
  t.events.length,
3683
3692
  " more"
3684
3693
  ] })
3685
3694
  ] }),
3686
- /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((a) => /* @__PURE__ */ e(sr, { event: a, onClick: n }, a.id)) })
3695
+ /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((s) => /* @__PURE__ */ e(ir, { event: s, onClick: n }, s.id)) })
3687
3696
  ] });
3688
3697
  }
3689
- function jr({
3698
+ function Ar({
3690
3699
  events: t,
3691
3700
  isLoading: n = !1,
3692
- className: a,
3701
+ className: s,
3693
3702
  daysAhead: o = 7,
3694
- maxEventsPerDay: s = 3,
3703
+ maxEventsPerDay: a = 3,
3695
3704
  onEventClick: l,
3696
- onNavigateToAgenda: x
3705
+ onNavigateToAgenda: v
3697
3706
  }) {
3698
- const [h, c] = le(!1), w = ee(() => {
3707
+ const [h, c] = ie(!1), w = ee(() => {
3699
3708
  const A = We(/* @__PURE__ */ new Date()), W = mt(A, o);
3700
3709
  return t.filter((F) => F.endDate >= A && F.startDate < W);
3701
3710
  }, [t, o]), P = ee(
3702
- () => or(w, s),
3703
- [w, s]
3704
- ), b = ee(() => ar(t), [t]), y = (A) => {
3711
+ () => sr(w, a),
3712
+ [w, a]
3713
+ ), y = ee(() => ar(t), [t]), k = (A) => {
3705
3714
  c(!1), l?.(A);
3706
3715
  }, B = () => {
3707
- c(!1), x?.();
3716
+ c(!1), v?.();
3708
3717
  };
3709
3718
  return /* @__PURE__ */ r(ct, { open: h, onOpenChange: c, children: [
3710
3719
  /* @__PURE__ */ r(
@@ -3712,16 +3721,16 @@ function jr({
3712
3721
  {
3713
3722
  className: g(
3714
3723
  "relative rounded-xl hover:text-zinc-700 hover:!bg-zinc-300 !bg-zinc-200 text-zinc-600 shadow-none !px-2.5 p-2 max-h-10",
3715
- a
3724
+ s
3716
3725
  ),
3717
3726
  children: [
3718
- /* @__PURE__ */ e(qn, { className: "h-4 w-4" }),
3719
- b > 0 && /* @__PURE__ */ e(
3720
- St,
3727
+ /* @__PURE__ */ e(Xn, { className: "h-4 w-4" }),
3728
+ y > 0 && /* @__PURE__ */ e(
3729
+ Tt,
3721
3730
  {
3722
3731
  variant: "destructive",
3723
3732
  className: "absolute -right-4 -top-4 m-3 flex h-5 w-5 items-center justify-center rounded-full bg-primary p-0 text-[10px] font-medium hover:bg-primary",
3724
- children: b > 99 ? "99+" : b
3733
+ children: y > 99 ? "99+" : y
3725
3734
  }
3726
3735
  )
3727
3736
  ]
@@ -3731,9 +3740,9 @@ function jr({
3731
3740
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between border-b p-4", children: [
3732
3741
  /* @__PURE__ */ r("div", { children: [
3733
3742
  /* @__PURE__ */ e("h3", { className: "text-sm font-semibold", children: "Upcoming" }),
3734
- /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: b > 0 ? `${b} event${b > 1 ? "s" : ""} today` : "No events today" })
3743
+ /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: y > 0 ? `${y} event${y > 1 ? "s" : ""} today` : "No events today" })
3735
3744
  ] }),
3736
- x && /* @__PURE__ */ r(
3745
+ v && /* @__PURE__ */ r(
3737
3746
  "button",
3738
3747
  {
3739
3748
  type: "button",
@@ -3741,19 +3750,19 @@ function jr({
3741
3750
  className: "text-xs text-primary hover:underline flex items-center gap-1",
3742
3751
  children: [
3743
3752
  "View all",
3744
- /* @__PURE__ */ e(Zn, { className: "size-3" })
3753
+ /* @__PURE__ */ e(er, { className: "size-3" })
3745
3754
  ]
3746
3755
  }
3747
3756
  )
3748
3757
  ] }),
3749
3758
  /* @__PURE__ */ e("div", { className: "max-h-80 overflow-y-auto p-2", children: n ? /* @__PURE__ */ e("div", { className: "space-y-2 p-2", children: Array.from({ length: 3 }).map((A, W) => /* @__PURE__ */ r("div", { className: "flex space-x-3", children: [
3750
- /* @__PURE__ */ e(Re, { className: "h-2 w-2 rounded-full mt-2" }),
3759
+ /* @__PURE__ */ e(Ue, { className: "h-2 w-2 rounded-full mt-2" }),
3751
3760
  /* @__PURE__ */ r("div", { className: "flex-1 space-y-2", children: [
3752
- /* @__PURE__ */ e(Re, { className: "h-4 w-full" }),
3753
- /* @__PURE__ */ e(Re, { className: "h-3 w-3/4" })
3761
+ /* @__PURE__ */ e(Ue, { className: "h-4 w-full" }),
3762
+ /* @__PURE__ */ e(Ue, { className: "h-3 w-3/4" })
3754
3763
  ] })
3755
3764
  ] }, W)) }) : P.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-8 text-center", children: [
3756
- /* @__PURE__ */ e(Xn, { className: "mb-2 h-8 w-8 text-muted-foreground/50" }),
3765
+ /* @__PURE__ */ e(Qn, { className: "mb-2 h-8 w-8 text-muted-foreground/50" }),
3757
3766
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "No upcoming events" }),
3758
3767
  /* @__PURE__ */ r("p", { className: "text-xs text-muted-foreground/70", children: [
3759
3768
  "Your schedule is clear for the next ",
@@ -3761,17 +3770,17 @@ function jr({
3761
3770
  " days"
3762
3771
  ] })
3763
3772
  ] }) : /* @__PURE__ */ e("div", { className: "space-y-3 divide-y", children: P.map((A) => /* @__PURE__ */ e(
3764
- ir,
3773
+ lr,
3765
3774
  {
3766
3775
  group: A,
3767
- onEventClick: y
3776
+ onEventClick: k
3768
3777
  },
3769
3778
  A.dateKey
3770
3779
  )) }) })
3771
3780
  ] })
3772
3781
  ] });
3773
3782
  }
3774
- function lr({ className: t }) {
3783
+ function cr({ className: t }) {
3775
3784
  return /* @__PURE__ */ r(
3776
3785
  "svg",
3777
3786
  {
@@ -3814,47 +3823,47 @@ function gt({ className: t }) {
3814
3823
  }
3815
3824
  );
3816
3825
  }
3817
- function cr(t) {
3826
+ function dr(t) {
3818
3827
  const n = /* @__PURE__ */ new Date();
3819
3828
  return n.setDate(n.getDate() + 1), t.getFullYear() === n.getFullYear() && t.getMonth() === n.getMonth() && t.getDate() === n.getDate();
3820
3829
  }
3821
3830
  function it(t) {
3822
- const n = t.getHours(), a = t.getMinutes(), o = n >= 12 ? "PM" : "AM";
3823
- return `${n % 12 || 12}:${a.toString().padStart(2, "0")} ${o}`;
3831
+ const n = t.getHours(), s = t.getMinutes(), o = n >= 12 ? "PM" : "AM";
3832
+ return `${n % 12 || 12}:${s.toString().padStart(2, "0")} ${o}`;
3824
3833
  }
3825
- function dr(t) {
3834
+ function ur(t) {
3826
3835
  return new Intl.DateTimeFormat("en-US", {
3827
3836
  weekday: "long",
3828
3837
  month: "short",
3829
3838
  day: "numeric"
3830
3839
  }).format(t);
3831
3840
  }
3832
- function ur(t) {
3833
- const n = it(t.startDate), a = it(t.endDate);
3834
- return `${n} - ${a}`;
3835
- }
3836
3841
  function hr(t) {
3837
- return de(t) ? "Today" : cr(t) ? "Tomorrow" : dr(t);
3842
+ const n = it(t.startDate), s = it(t.endDate);
3843
+ return `${n} - ${s}`;
3844
+ }
3845
+ function mr(t) {
3846
+ return ce(t) ? "Today" : dr(t) ? "Tomorrow" : ur(t);
3838
3847
  }
3839
- function mr(t, n) {
3840
- const a = /* @__PURE__ */ new Map();
3848
+ function fr(t, n) {
3849
+ const s = /* @__PURE__ */ new Map();
3841
3850
  for (const o of t) {
3842
- const s = Ft(o.startDate), l = a.get(s) ?? [];
3843
- l.push(o), a.set(s, l);
3851
+ const a = $t(o.startDate), l = s.get(a) ?? [];
3852
+ l.push(o), s.set(a, l);
3844
3853
  }
3845
- return Array.from(a.entries()).map(([o, s]) => {
3846
- const l = [...s].sort(
3854
+ return Array.from(s.entries()).map(([o, a]) => {
3855
+ const l = [...a].sort(
3847
3856
  (h, c) => h.startDate.getTime() - c.startDate.getTime()
3848
- ), x = n > 0 ? l.slice(0, n) : l;
3857
+ ), v = n > 0 ? l.slice(0, n) : l;
3849
3858
  return {
3850
3859
  date: new Date(o),
3851
3860
  dateKey: o,
3852
- events: x,
3861
+ events: v,
3853
3862
  hasMore: n > 0 && l.length > n
3854
3863
  };
3855
- }).sort((o, s) => o.date.getTime() - s.date.getTime());
3864
+ }).sort((o, a) => o.date.getTime() - a.date.getTime());
3856
3865
  }
3857
- function fr({ event: t, onClick: n, compact: a }) {
3866
+ function gr({ event: t, onClick: n, compact: s }) {
3858
3867
  return /* @__PURE__ */ r(
3859
3868
  "button",
3860
3869
  {
@@ -3864,34 +3873,34 @@ function fr({ event: t, onClick: n, compact: a }) {
3864
3873
  "w-full text-left rounded-lg transition-colors",
3865
3874
  "hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
3866
3875
  "flex items-start gap-3",
3867
- a ? "p-2" : "p-3"
3876
+ s ? "p-2" : "p-3"
3868
3877
  ),
3869
3878
  children: [
3870
3879
  /* @__PURE__ */ e(
3871
3880
  "div",
3872
3881
  {
3873
- className: g("shrink-0 rounded-full mt-1", a ? "size-2" : "size-2.5"),
3882
+ className: g("shrink-0 rounded-full mt-1", s ? "size-2" : "size-2.5"),
3874
3883
  style: { backgroundColor: t.color ?? "#3b82f6" }
3875
3884
  }
3876
3885
  ),
3877
3886
  /* @__PURE__ */ r("div", { className: "min-w-0 flex-1", children: [
3878
- /* @__PURE__ */ e("p", { className: g("font-medium truncate", a ? "text-xs" : "text-sm"), children: t.title }),
3879
- /* @__PURE__ */ e("p", { className: g("text-muted-foreground truncate", a ? "text-[10px]" : "text-xs"), children: ur(t) })
3887
+ /* @__PURE__ */ e("p", { className: g("font-medium truncate", s ? "text-xs" : "text-sm"), children: t.title }),
3888
+ /* @__PURE__ */ e("p", { className: g("text-muted-foreground truncate", s ? "text-[10px]" : "text-xs"), children: hr(t) })
3880
3889
  ] }),
3881
3890
  n && /* @__PURE__ */ e(
3882
3891
  gt,
3883
3892
  {
3884
- className: g("shrink-0 text-muted-foreground/50", a ? "size-3" : "size-4")
3893
+ className: g("shrink-0 text-muted-foreground/50", s ? "size-3" : "size-4")
3885
3894
  }
3886
3895
  )
3887
3896
  ]
3888
3897
  }
3889
3898
  );
3890
3899
  }
3891
- function gr({
3900
+ function pr({
3892
3901
  group: t,
3893
3902
  onEventClick: n,
3894
- onViewMore: a,
3903
+ onViewMore: s,
3895
3904
  compact: o
3896
3905
  }) {
3897
3906
  return /* @__PURE__ */ r("div", { className: "space-y-1", children: [
@@ -3902,42 +3911,42 @@ function gr({
3902
3911
  className: g(
3903
3912
  "font-semibold",
3904
3913
  o ? "text-xs" : "text-sm",
3905
- de(t.date) && "text-primary"
3914
+ ce(t.date) && "text-primary"
3906
3915
  ),
3907
- children: hr(t.date)
3916
+ children: mr(t.date)
3908
3917
  }
3909
3918
  ),
3910
- t.hasMore && a && /* @__PURE__ */ e(
3919
+ t.hasMore && s && /* @__PURE__ */ e(
3911
3920
  "button",
3912
3921
  {
3913
3922
  type: "button",
3914
- onClick: () => a(t.date),
3923
+ onClick: () => s(t.date),
3915
3924
  className: g("text-primary hover:underline", o ? "text-[10px]" : "text-xs"),
3916
3925
  children: "+more"
3917
3926
  }
3918
3927
  )
3919
3928
  ] }),
3920
- /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((s) => /* @__PURE__ */ e(fr, { event: s, onClick: n, compact: o }, s.id)) })
3929
+ /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((a) => /* @__PURE__ */ e(gr, { event: a, onClick: n, compact: o }, a.id)) })
3921
3930
  ] });
3922
3931
  }
3923
- function Ar({
3932
+ function Pr({
3924
3933
  events: t,
3925
3934
  daysAhead: n = 7,
3926
- maxEventsPerDay: a = 3,
3935
+ maxEventsPerDay: s = 3,
3927
3936
  onEventClick: o,
3928
- onViewAll: s,
3937
+ onViewAll: a,
3929
3938
  className: l,
3930
- emptyState: x,
3939
+ emptyState: v,
3931
3940
  title: h = "Upcoming",
3932
3941
  showHeader: c = !0,
3933
3942
  compact: w = !1
3934
3943
  }) {
3935
- const P = lt(), b = P?.filteredEvents, y = P?.currentDate ?? /* @__PURE__ */ new Date(), B = t ?? b ?? [], A = ee(() => {
3936
- const H = We(y), k = new Date(H);
3937
- return k.setDate(k.getDate() + n), B.filter(($) => $.endDate >= H && $.startDate < k);
3938
- }, [B, n, y]), W = ee(
3939
- () => mr(A, a),
3940
- [A, a]
3944
+ const P = lt(), y = P?.filteredEvents, k = P?.currentDate ?? /* @__PURE__ */ new Date(), B = t ?? y ?? [], A = ee(() => {
3945
+ const H = We(k), C = new Date(H);
3946
+ return C.setDate(C.getDate() + n), B.filter((O) => O.endDate >= H && O.startDate < C);
3947
+ }, [B, n, k]), W = ee(
3948
+ () => fr(A, s),
3949
+ [A, s]
3941
3950
  ), F = A.length;
3942
3951
  return W.length === 0 ? /* @__PURE__ */ r("div", { className: g("rounded-lg border bg-card", l), children: [
3943
3952
  c && /* @__PURE__ */ e(
@@ -3957,9 +3966,9 @@ function Ar({
3957
3966
  "flex flex-col items-center justify-center text-center",
3958
3967
  w ? "py-6 px-4" : "py-10 px-6"
3959
3968
  ),
3960
- children: x ?? /* @__PURE__ */ r(be, { children: [
3969
+ children: v ?? /* @__PURE__ */ r(ye, { children: [
3961
3970
  /* @__PURE__ */ e(
3962
- lr,
3971
+ cr,
3963
3972
  {
3964
3973
  className: g("text-muted-foreground/50 mb-2", w ? "size-8" : "size-10")
3965
3974
  }
@@ -3990,11 +3999,11 @@ function Ar({
3990
3999
  }
3991
4000
  )
3992
4001
  ] }),
3993
- s && /* @__PURE__ */ r(
4002
+ a && /* @__PURE__ */ r(
3994
4003
  "button",
3995
4004
  {
3996
4005
  type: "button",
3997
- onClick: () => s(),
4006
+ onClick: () => a(),
3998
4007
  className: g(
3999
4008
  "text-primary hover:underline flex items-center gap-0.5",
4000
4009
  w ? "text-xs" : "text-sm"
@@ -4016,11 +4025,11 @@ function Ar({
4016
4025
  w ? "p-2 max-h-[280px]" : "p-3 max-h-[400px]"
4017
4026
  ),
4018
4027
  children: W.map((H) => /* @__PURE__ */ e(
4019
- gr,
4028
+ pr,
4020
4029
  {
4021
4030
  group: H,
4022
4031
  onEventClick: o,
4023
- onViewMore: s ? (k) => s(k) : void 0,
4032
+ onViewMore: a ? (C) => a(C) : void 0,
4024
4033
  compact: w
4025
4034
  },
4026
4035
  H.dateKey
@@ -4030,20 +4039,20 @@ function Ar({
4030
4039
  ] });
4031
4040
  }
4032
4041
  export {
4033
- jr as A,
4034
- Er as B,
4035
- Nr as C,
4036
- Tr as D,
4037
- Cr as E,
4038
- Dr as I,
4039
- Ir as S,
4040
- Te as T,
4041
- zr as U,
4042
- Lr as V,
4043
- Sr as W,
4044
- pn as Y,
4045
- Ar as a,
4046
- Hr as b,
4047
- Mr as c
4042
+ Ar as A,
4043
+ Lr as B,
4044
+ Cr as C,
4045
+ Hr as D,
4046
+ Dr as E,
4047
+ Mr as I,
4048
+ zr as S,
4049
+ Se as T,
4050
+ jr as U,
4051
+ Sr as V,
4052
+ Tr as W,
4053
+ xn as Y,
4054
+ Pr as a,
4055
+ Ir as b,
4056
+ Er as c
4048
4057
  };
4049
- //# sourceMappingURL=agenda-widget-CD_UoYWC.js.map
4058
+ //# sourceMappingURL=agenda-widget-nh_h1yy6.js.map