@innosolutions/inno-calendar 1.0.28 → 1.0.30

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 (29) hide show
  1. package/dist/{agenda-widget-C0z2Ph-W.js → agenda-widget-CXPj7VIZ.js} +833 -787
  2. package/dist/agenda-widget-CXPj7VIZ.js.map +1 -0
  3. package/dist/agenda-widget-DTUbNsDW.cjs +2 -0
  4. package/dist/agenda-widget-DTUbNsDW.cjs.map +1 -0
  5. package/dist/components/header/calendar-header.d.ts +1 -1
  6. package/dist/components/header/calendar-header.d.ts.map +1 -1
  7. package/dist/components/index.cjs +1 -1
  8. package/dist/components/index.mjs +2 -2
  9. package/dist/components/inno-calendar.d.ts.map +1 -1
  10. package/dist/components/views/week-view.d.ts.map +1 -1
  11. package/dist/index.cjs +1 -1
  12. package/dist/index.mjs +3 -3
  13. package/dist/presets/index.cjs +1 -1
  14. package/dist/presets/index.mjs +1 -1
  15. package/dist/styles/index.css +1 -1
  16. package/dist/{tailwind-calendar-CCrFJy1T.cjs → tailwind-calendar-DOUuHppf.cjs} +2 -2
  17. package/dist/{tailwind-calendar-CCrFJy1T.cjs.map → tailwind-calendar-DOUuHppf.cjs.map} +1 -1
  18. package/dist/{tailwind-calendar-BILib2dM.js → tailwind-calendar-D_Tlo3dX.js} +2 -2
  19. package/dist/{tailwind-calendar-BILib2dM.js.map → tailwind-calendar-D_Tlo3dX.js.map} +1 -1
  20. package/dist/{week-view-CO_GA3pb.js → week-view-BSLUyXtw.js} +106 -30
  21. package/dist/week-view-BSLUyXtw.js.map +1 -0
  22. package/dist/{week-view-C3cKZngJ.cjs → week-view-DR2ICq3r.cjs} +2 -2
  23. package/dist/week-view-DR2ICq3r.cjs.map +1 -0
  24. package/package.json +1 -1
  25. package/dist/agenda-widget-C0z2Ph-W.js.map +0 -1
  26. package/dist/agenda-widget-C8cNwhYv.cjs +0 -2
  27. package/dist/agenda-widget-C8cNwhYv.cjs.map +0 -1
  28. package/dist/week-view-C3cKZngJ.cjs.map +0 -1
  29. package/dist/week-view-CO_GA3pb.js.map +0 -1
@@ -1,10 +1,10 @@
1
- import { jsx as e, jsxs as n, Fragment as Q } from "react/jsx-runtime";
2
- import { o as _e, c as Ge, C as Ke, I as Je, j as Xe } from "./use-calendar-QYGDcRjd.js";
3
- import { useCallback as se, useState as ae, useEffect as be, forwardRef as ye, useRef as Qe, useMemo as W } from "react";
1
+ import { jsx as e, jsxs as n, Fragment as q } from "react/jsx-runtime";
2
+ import { o as _e, c as Ke, C as Je, I as Xe, j as Qe } from "./use-calendar-QYGDcRjd.js";
3
+ import { useCallback as ee, useState as re, useEffect as me, forwardRef as ye, useRef as Fe, useMemo as B } from "react";
4
4
  import { c as h } from "./index-DtaLkIY8.js";
5
- import { P as Fe, h as Pe, g as Oe, l as U, p as Ze, q as qe, B as ne, r as et, s as Ne, j as Y, m as G, k as K, c as tt, C as rt, M as Ce, A as nt, W as st, b as at, t as ot } from "./week-view-CO_GA3pb.js";
5
+ import { P as Pe, h as Oe, g as Re, l as G, p as Ze, q as qe, B as oe, r as et, s as Ne, j as K, m as J, k as X, c as tt, C as rt, M as Ce, A as nt, W as st, b as ot, t as at } from "./week-view-BSLUyXtw.js";
6
6
  import { D as it, S as lt } from "./slot-selection-context-D2eu2o-7.js";
7
- import { isToday as Z, startOfDay as me, endOfDay as Ve, getYearMonths as dt, generateMonthGrid as ct, getEventsForDay as ut, addDays as Re, formatDateISO as ht } from "./utils.mjs";
7
+ import { isToday as te, startOfDay as fe, endOfDay as Ve, getYearMonths as ct, generateMonthGrid as dt, getEventsForDay as ut, addDays as Ue, formatDateISO as ht } from "./utils.mjs";
8
8
  function mt({ view: t, className: r = "" }) {
9
9
  return /* @__PURE__ */ e(
10
10
  "div",
@@ -36,29 +36,29 @@ function Pr(t) {
36
36
  const {
37
37
  events: r,
38
38
  resources: s,
39
- scheduleTypes: a,
40
- initialView: o = "week",
39
+ scheduleTypes: o,
40
+ initialView: a = "week",
41
41
  initialDate: i,
42
42
  initialFilters: g,
43
43
  preferences: f,
44
44
  locale: l,
45
- slots: u,
46
- renderEvent: M,
45
+ slots: d,
46
+ renderEvent: z,
47
47
  onViewChange: N,
48
48
  onDateChange: C,
49
49
  onEventClick: L,
50
50
  onSlotSelect: v,
51
- onFiltersChange: y,
52
- className: b,
53
- children: k
54
- } = t, D = _e();
55
- if (D)
56
- return /* @__PURE__ */ e("div", { className: b, style: { position: "relative" }, children: k ?? /* @__PURE__ */ e(De, { view: D.view, className: b }) });
57
- const S = Ge({
51
+ onFiltersChange: b,
52
+ className: w,
53
+ children: y
54
+ } = t, M = _e();
55
+ if (M)
56
+ return /* @__PURE__ */ e("div", { className: w, style: { position: "relative" }, children: y ?? /* @__PURE__ */ e(De, { view: M.view, className: w }) });
57
+ const S = Ke({
58
58
  events: r,
59
59
  resources: s,
60
- scheduleTypes: a,
61
- initialView: o,
60
+ scheduleTypes: o,
61
+ initialView: a,
62
62
  initialDate: i,
63
63
  initialFilters: g,
64
64
  preferences: f,
@@ -67,9 +67,9 @@ function Pr(t) {
67
67
  onDateChange: C,
68
68
  onEventClick: L,
69
69
  onSlotSelect: v,
70
- onFiltersChange: y
70
+ onFiltersChange: b
71
71
  });
72
- return /* @__PURE__ */ e(Ke, { value: S, children: /* @__PURE__ */ e("div", { className: b, style: { position: "relative" }, children: k ?? /* @__PURE__ */ e(De, { view: S.view, className: b }) }) });
72
+ return /* @__PURE__ */ e(Je, { value: S, children: /* @__PURE__ */ e("div", { className: w, style: { position: "relative" }, children: y ?? /* @__PURE__ */ e(De, { view: S.view, className: w }) }) });
73
73
  }
74
74
  function ft({ className: t }) {
75
75
  return /* @__PURE__ */ n(
@@ -90,7 +90,7 @@ function ft({ className: t }) {
90
90
  }
91
91
  );
92
92
  }
93
- function Ue({ className: t }) {
93
+ function Ye({ className: t }) {
94
94
  return /* @__PURE__ */ n(
95
95
  "svg",
96
96
  {
@@ -150,7 +150,7 @@ function gt({ className: t }) {
150
150
  }
151
151
  );
152
152
  }
153
- function le({ className: t }) {
153
+ function de({ className: t }) {
154
154
  return /* @__PURE__ */ e(
155
155
  "svg",
156
156
  {
@@ -284,7 +284,7 @@ function yt({ className: t }) {
284
284
  }
285
285
  );
286
286
  }
287
- function oe({ className: t }) {
287
+ function le({ className: t }) {
288
288
  return /* @__PURE__ */ e(
289
289
  "svg",
290
290
  {
@@ -325,9 +325,9 @@ const kt = {
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
- }, de = ye(
329
- ({ onClick: t, label: r, children: s, className: a, variant: o = "ghost", ...i }, g) => /* @__PURE__ */ n(Y, { children: [
330
- /* @__PURE__ */ e(G, { asChild: !0, children: /* @__PURE__ */ e(
328
+ }, ue = ye(
329
+ ({ onClick: t, label: r, children: s, className: o, variant: a = "ghost", ...i }, g) => /* @__PURE__ */ n(K, { children: [
330
+ /* @__PURE__ */ e(J, { asChild: !0, children: /* @__PURE__ */ e(
331
331
  "button",
332
332
  {
333
333
  type: "button",
@@ -335,22 +335,22 @@ const kt = {
335
335
  onClick: t,
336
336
  className: h(
337
337
  "h-8 w-8 rounded-full flex items-center justify-center transition-colors",
338
- o === "ghost" && "hover:bg-zinc-100 dark:hover:bg-zinc-800 text-zinc-600 dark:text-zinc-400",
339
- o === "destructive" && "hover:bg-red-50 dark:hover:bg-red-950/30 text-zinc-600 dark:text-zinc-400 hover:text-red-600",
340
- a
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
+ o
341
341
  ),
342
342
  "aria-label": r,
343
343
  ...i,
344
344
  children: s
345
345
  }
346
346
  ) }),
347
- /* @__PURE__ */ e(K, { side: "bottom", className: "text-xs", children: r })
347
+ /* @__PURE__ */ e(X, { side: "bottom", className: "text-xs", children: r })
348
348
  ] })
349
349
  );
350
- de.displayName = "IconButton";
351
- function Nt({ src: t, alt: r, initials: s, className: a, isClient: o }) {
352
- const [i, g] = ae(!1);
353
- return /* @__PURE__ */ e("div", { className: h("relative h-7 w-7 rounded-full overflow-hidden shrink-0", a), children: t && !i ? /* @__PURE__ */ e(
350
+ ue.displayName = "IconButton";
351
+ function Nt({ src: t, alt: r, initials: s, className: o, isClient: a }) {
352
+ const [i, g] = re(!1);
353
+ return /* @__PURE__ */ e("div", { className: h("relative h-7 w-7 rounded-full overflow-hidden shrink-0", o), children: t && !i ? /* @__PURE__ */ e(
354
354
  "img",
355
355
  {
356
356
  src: t,
@@ -363,27 +363,27 @@ function Nt({ src: t, alt: r, initials: s, className: a, isClient: o }) {
363
363
  {
364
364
  className: h(
365
365
  "h-full w-full flex items-center justify-center text-[10px] font-medium",
366
- o ? "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"
366
+ 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"
367
367
  ),
368
368
  children: s
369
369
  }
370
370
  ) });
371
371
  }
372
372
  function Me({ participant: t, isEventCanceled: r = !1, labels: s }) {
373
- const a = t.name || "Unknown", o = a.split(" ").map((C) => C[0]).join("").toUpperCase().slice(0, 2), i = t.isOrganizer ?? !1, g = t.isConfirmed, f = g === !0, l = g === !1, u = t.isClient ?? !1, M = t.profilePicture || t.avatar, N = r;
373
+ const o = t.name || "Unknown", a = o.split(" ").map((C) => C[0]).join("").toUpperCase().slice(0, 2), i = t.isOrganizer ?? !1, g = t.isConfirmed, f = g === !0, l = g === !1, d = t.isClient ?? !1, z = t.profilePicture || t.avatar, N = r;
374
374
  return /* @__PURE__ */ n("div", { className: h("flex items-center gap-3 py-0", N && "opacity-60"), children: [
375
375
  /* @__PURE__ */ n("div", { className: "relative", children: [
376
376
  /* @__PURE__ */ e(
377
377
  Nt,
378
378
  {
379
- src: M,
380
- alt: a,
381
- initials: o,
382
- isClient: u,
379
+ src: z,
380
+ alt: o,
381
+ initials: a,
382
+ isClient: d,
383
383
  className: h(N && "grayscale")
384
384
  }
385
385
  ),
386
- N || l ? /* @__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(he, { className: "h-2 w-2 text-red-600 dark:text-red-400 stroke-[3]" }) }) }) : f ? /* @__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(le, { className: "h-2 w-2 text-green-600 dark:text-green-400 stroke-[3]" }) }) }) : null
386
+ N || l ? /* @__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(he, { className: "h-2 w-2 text-red-600 dark:text-red-400 stroke-[3]" }) }) }) : f ? /* @__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(de, { className: "h-2 w-2 text-green-600 dark:text-green-400 stroke-[3]" }) }) }) : null
387
387
  ] }),
388
388
  /* @__PURE__ */ n("div", { className: "!h-fit min-w-0 gap-0", children: [
389
389
  /* @__PURE__ */ e("div", { className: "gap-0", children: /* @__PURE__ */ e(
@@ -393,22 +393,22 @@ function Me({ participant: t, isEventCanceled: r = !1, labels: s }) {
393
393
  "text-sm text-zinc-900 dark:text-zinc-100 truncate",
394
394
  N && "line-through text-zinc-500 dark:text-zinc-500"
395
395
  ),
396
- children: a
396
+ children: o
397
397
  }
398
398
  ) }),
399
- u && /* @__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 }),
399
+ d && /* @__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 }),
400
400
  i && !N && /* @__PURE__ */ e("div", { className: "text-xs text-zinc-500", children: s.organizer })
401
401
  ] })
402
402
  ] });
403
403
  }
404
- function Ct({ open: t, onOpenChange: r, title: s, children: a }) {
405
- return be(() => {
404
+ function Ct({ open: t, onOpenChange: r, title: s, children: o }) {
405
+ return me(() => {
406
406
  if (!t) return;
407
- const o = (i) => {
407
+ const a = (i) => {
408
408
  i.key === "Escape" && r(!1);
409
409
  };
410
- return document.addEventListener("keydown", o), () => document.removeEventListener("keydown", o);
411
- }, [t, r]), be(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
410
+ return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
411
+ }, [t, r]), me(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
412
412
  document.body.style.overflow = "";
413
413
  }), [t]), t ? /* @__PURE__ */ n("div", { className: "fixed inset-0 z-50", children: [
414
414
  /* @__PURE__ */ e(
@@ -416,14 +416,14 @@ function Ct({ open: t, onOpenChange: r, title: s, children: a }) {
416
416
  {
417
417
  className: "fixed inset-0 bg-black/50 backdrop-blur-sm",
418
418
  onClick: () => r(!1),
419
- onKeyDown: (o) => {
420
- (o.key === "Enter" || o.key === " ") && r(!1);
419
+ onKeyDown: (a) => {
420
+ (a.key === "Enter" || a.key === " ") && r(!1);
421
421
  }
422
422
  }
423
423
  ),
424
424
  /* @__PURE__ */ e("div", { className: "fixed inset-x-4 top-[50%] translate-y-[-50%] max-w-md mx-auto", children: /* @__PURE__ */ n("div", { className: "bg-white dark:bg-zinc-900 rounded-2xl shadow-xl overflow-hidden", children: [
425
425
  s && /* @__PURE__ */ e("div", { className: "sr-only", children: s }),
426
- a
426
+ o
427
427
  ] }) })
428
428
  ] }) : null;
429
429
  }
@@ -431,8 +431,8 @@ function Dt({
431
431
  open: t,
432
432
  onOpenChange: r,
433
433
  title: s,
434
- description: a,
435
- cancelLabel: o,
434
+ description: o,
435
+ cancelLabel: a,
436
436
  confirmLabel: i,
437
437
  onConfirm: g,
438
438
  isLoading: f
@@ -450,12 +450,12 @@ function Dt({
450
450
  ),
451
451
  /* @__PURE__ */ e("div", { className: "fixed inset-x-4 top-[50%] translate-y-[-50%] max-w-md mx-auto", children: /* @__PURE__ */ n("div", { className: "bg-white dark:bg-zinc-900 rounded-lg shadow-xl p-6", children: [
452
452
  /* @__PURE__ */ e("h2", { className: "text-lg font-semibold text-zinc-900 dark:text-zinc-100", children: s }),
453
- /* @__PURE__ */ e("p", { className: "mt-2 text-sm text-zinc-600 dark:text-zinc-400", children: a }),
453
+ /* @__PURE__ */ e("p", { className: "mt-2 text-sm text-zinc-600 dark:text-zinc-400", children: o }),
454
454
  /* @__PURE__ */ n("div", { className: "mt-4 flex justify-end gap-3", children: [
455
- /* @__PURE__ */ e(ne, { variant: "outline", size: "sm", onClick: () => r(!1), children: o }),
456
- /* @__PURE__ */ n(ne, { variant: "destructive", size: "sm", onClick: g, disabled: f, children: [
457
- f && /* @__PURE__ */ e(oe, { className: "h-4 w-4 mr-2" }),
458
- /* @__PURE__ */ e(Ue, { className: "h-4 w-4 mr-2" }),
455
+ /* @__PURE__ */ e(oe, { variant: "outline", size: "sm", onClick: () => r(!1), children: a }),
456
+ /* @__PURE__ */ n(oe, { variant: "destructive", size: "sm", onClick: g, disabled: f, children: [
457
+ f && /* @__PURE__ */ e(le, { className: "h-4 w-4 mr-2" }),
458
+ /* @__PURE__ */ e(Ye, { className: "h-4 w-4 mr-2" }),
459
459
  i
460
460
  ] })
461
461
  ] })
@@ -469,7 +469,7 @@ function Mt(t, r) {
469
469
  day: "numeric"
470
470
  });
471
471
  }
472
- function zt(t, r) {
472
+ function Et(t, r) {
473
473
  const s = {
474
474
  hour: "2-digit",
475
475
  minute: "2-digit",
@@ -477,7 +477,7 @@ function zt(t, r) {
477
477
  };
478
478
  return `${t.toLocaleTimeString(void 0, s)} – ${r.toLocaleTimeString(void 0, s)}`;
479
479
  }
480
- function Et(t) {
480
+ function zt(t) {
481
481
  return t.toLocaleDateString(void 0, {
482
482
  day: "2-digit",
483
483
  month: "short",
@@ -487,64 +487,64 @@ function Et(t) {
487
487
  });
488
488
  }
489
489
  function St(t) {
490
- const [r, s] = ae(() => typeof window < "u" ? window.matchMedia(t).matches : !1);
491
- return be(() => {
490
+ const [r, s] = re(() => typeof window < "u" ? window.matchMedia(t).matches : !1);
491
+ return me(() => {
492
492
  if (typeof window > "u") return;
493
- const a = window.matchMedia(t), o = (i) => s(i.matches);
494
- return a.addEventListener("change", o), () => a.removeEventListener("change", o);
493
+ const o = window.matchMedia(t), a = (i) => s(i.matches);
494
+ return o.addEventListener("change", a), () => o.removeEventListener("change", a);
495
495
  }, [t]), r;
496
496
  }
497
- function ze({
497
+ function Ee({
498
498
  event: t,
499
499
  labels: r,
500
500
  isLoading: s,
501
- onClose: a,
502
- onEdit: o,
501
+ onClose: o,
502
+ onEdit: a,
503
503
  onDelete: i,
504
504
  onCancel: g,
505
505
  onAccept: f,
506
506
  onDecline: l,
507
- onConfirmMeeting: u,
508
- canEdit: M = !0,
507
+ onConfirmMeeting: d,
508
+ canEdit: z = !0,
509
509
  canDelete: N = !1,
510
510
  canCancel: C = !0,
511
511
  isCurrentUserParticipant: L = !1,
512
512
  isCurrentUserClient: v = !1,
513
- currentUserAcceptStatus: y,
514
- isAcceptLoading: b = !1,
515
- isDeclineLoading: k = !1,
516
- isConfirmLoading: D = !1,
513
+ currentUserAcceptStatus: b,
514
+ isAcceptLoading: w = !1,
515
+ isDeclineLoading: y = !1,
516
+ isConfirmLoading: M = !1,
517
517
  isDeleteLoading: S = !1,
518
- renderParticipant: T,
519
- renderHeaderActions: B,
520
- renderCancelReason: H,
521
- renderDeleteConfirmation: A,
522
- formatDate: $ = Mt,
523
- formatTimeRange: j = zt
518
+ renderParticipant: H,
519
+ renderHeaderActions: O,
520
+ renderCancelReason: I,
521
+ renderDeleteConfirmation: _,
522
+ formatDate: P = Mt,
523
+ formatTimeRange: W = Et
524
524
  }) {
525
- const [I, F] = ae(!1), O = !(t.isCanceled || t.meetingTookPlace), x = t.isRecurring ?? !1, d = t.participantDetails, m = t.participantsNames || [], p = d && d.length > 0, c = y === !0, w = y === !1, z = L && !v && O, E = p ? d.filter((_) => _.isConfirmed).length : t.isAccepted ? m.length : 0, P = p ? d.length : m.length, q = t.scheduleTypeColor || t.hexColor || "#039BE5", V = se(() => t.startDate ? $(t.startDate) : r.noDateProvided, [t.startDate, $, r.noDateProvided]), ee = se(() => t.startDate && t.endDate ? j(t.startDate, t.endDate) : null, [t.startDate, t.endDate, j]), ce = () => {
526
- a(), o?.(t);
527
- }, ue = () => {
528
- a(), g?.(t);
529
- }, te = () => {
530
- F(!0);
531
- }, X = () => {
532
- i?.(t), F(!1);
525
+ const [A, V] = re(!1), U = !(t.isCanceled || t.meetingTookPlace), x = t.isRecurring ?? !1, c = t.participantDetails, m = t.participantsNames || [], p = c && c.length > 0, k = b === !0, D = b === !1, $ = L && !v && U, j = p ? c.filter((R) => R.isConfirmed).length : t.isAccepted ? m.length : 0, u = p ? c.length : m.length, E = t.scheduleTypeColor || t.hexColor || "#039BE5", T = ee(() => t.startDate ? P(t.startDate) : r.noDateProvided, [t.startDate, P, r.noDateProvided]), F = ee(() => t.startDate && t.endDate ? W(t.startDate, t.endDate) : null, [t.startDate, t.endDate, W]), ae = () => {
526
+ o(), a?.(t);
527
+ }, ie = () => {
528
+ o(), g?.(t);
529
+ }, ne = () => {
530
+ V(!0);
531
+ }, Z = () => {
532
+ i?.(t), V(!1);
533
533
  };
534
- return s ? /* @__PURE__ */ e("div", { className: "flex h-48 items-center justify-center", children: /* @__PURE__ */ e(oe, { className: "h-6 w-6 text-zinc-400" }) }) : /* @__PURE__ */ n(U, { delayDuration: 300, children: [
534
+ return s ? /* @__PURE__ */ e("div", { className: "flex h-48 items-center justify-center", children: /* @__PURE__ */ e(le, { className: "h-6 w-6 text-zinc-400" }) }) : /* @__PURE__ */ n(G, { delayDuration: 300, children: [
535
535
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5 p-3", children: [
536
- /* @__PURE__ */ e("div", { className: "flex items-start justify-end gap-0.5", children: B ? B({ onClose: a }) : /* @__PURE__ */ n(Q, { children: [
537
- O && M && o && /* @__PURE__ */ e(de, { onClick: ce, label: r.edit, children: /* @__PURE__ */ e(ft, { className: "h-[18px] w-[18px]" }) }),
538
- O && C && g && /* @__PURE__ */ e(de, { onClick: ue, label: r.cancel, children: /* @__PURE__ */ e(gt, { className: "h-[18px] w-[18px]" }) }),
539
- N && i && /* @__PURE__ */ e(de, { onClick: te, label: r.delete, variant: "destructive", children: /* @__PURE__ */ e(Ue, { className: "h-[18px] w-[18px]" }) }),
540
- /* @__PURE__ */ e(de, { onClick: a, label: r.close, children: /* @__PURE__ */ e(he, { className: "h-[18px] w-[18px]" }) })
536
+ /* @__PURE__ */ e("div", { className: "flex items-start justify-end gap-0.5", children: O ? O({ onClose: o }) : /* @__PURE__ */ n(q, { children: [
537
+ U && z && a && /* @__PURE__ */ e(ue, { onClick: ae, label: r.edit, children: /* @__PURE__ */ e(ft, { className: "h-[18px] w-[18px]" }) }),
538
+ U && C && g && /* @__PURE__ */ e(ue, { onClick: ie, label: r.cancel, children: /* @__PURE__ */ e(gt, { className: "h-[18px] w-[18px]" }) }),
539
+ N && i && /* @__PURE__ */ e(ue, { onClick: ne, label: r.delete, variant: "destructive", children: /* @__PURE__ */ e(Ye, { className: "h-[18px] w-[18px]" }) }),
540
+ /* @__PURE__ */ e(ue, { onClick: o, label: r.close, children: /* @__PURE__ */ e(he, { className: "h-[18px] w-[18px]" }) })
541
541
  ] }) }),
542
542
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ n("div", { className: "flex items-start gap-2", children: [
543
543
  /* @__PURE__ */ e(
544
544
  "div",
545
545
  {
546
546
  className: "w-4 h-4 rounded mt-1 shrink-0",
547
- style: { backgroundColor: q }
547
+ style: { backgroundColor: E }
548
548
  }
549
549
  ),
550
550
  /* @__PURE__ */ n("div", { className: "flex-1 min-w-0", children: [
@@ -569,16 +569,16 @@ function ze({
569
569
  ] })
570
570
  ] }),
571
571
  /* @__PURE__ */ n("div", { className: "mt-1 text-sm text-zinc-600 dark:text-zinc-400", children: [
572
- /* @__PURE__ */ e("span", { children: V() }),
573
- ee() && /* @__PURE__ */ n(Q, { children: [
572
+ /* @__PURE__ */ e("span", { children: T() }),
573
+ F() && /* @__PURE__ */ n(q, { children: [
574
574
  /* @__PURE__ */ e("span", { className: "mx-1.5", children: "·" }),
575
- /* @__PURE__ */ e("span", { children: ee() })
575
+ /* @__PURE__ */ e("span", { children: F() })
576
576
  ] })
577
577
  ] }),
578
578
  x && t.recurrenceSummary && /* @__PURE__ */ e("div", { className: "text-sm text-zinc-500 dark:text-zinc-500", children: t.recurrenceSummary })
579
579
  ] })
580
580
  ] }) }),
581
- t.isCanceled && /* @__PURE__ */ e("div", { className: "mx-4 p-3 rounded-lg bg-red-50 dark:bg-red-950/30", children: H ? H(t) : /* @__PURE__ */ e("div", { className: "flex items-start gap-0", children: /* @__PURE__ */ n("div", { className: "flex-1 min-w-0", children: [
581
+ t.isCanceled && /* @__PURE__ */ e("div", { className: "mx-4 p-3 rounded-lg bg-red-50 dark:bg-red-950/30", children: I ? I(t) : /* @__PURE__ */ e("div", { className: "flex items-start gap-0", children: /* @__PURE__ */ n("div", { className: "flex-1 min-w-0", children: [
582
582
  /* @__PURE__ */ e("div", { className: "text-sm font-medium text-red-700 dark:text-red-400", children: r.cancellationNote }),
583
583
  t.cancelReason && /* @__PURE__ */ n("div", { className: "mt-1 text-sm text-red-600/80 dark:text-red-400/80 italic", children: [
584
584
  '"',
@@ -588,7 +588,7 @@ function ze({
588
588
  t.canceledDate && /* @__PURE__ */ n("div", { className: "mt-1.5 text-xs text-red-500/70 dark:text-red-400/60", children: [
589
589
  r.canceledOn,
590
590
  " ",
591
- Et(t.canceledDate)
591
+ zt(t.canceledDate)
592
592
  ] })
593
593
  ] }) }) }),
594
594
  /* @__PURE__ */ n("div", { className: "space-y-0.5", children: [
@@ -601,51 +601,51 @@ function ze({
601
601
  /* @__PURE__ */ n("div", { className: "flex-1", children: [
602
602
  /* @__PURE__ */ n("div", { className: "flex items-center gap-0", children: [
603
603
  /* @__PURE__ */ n("span", { className: "text-sm text-zinc-900 dark:text-zinc-100 font-medium", children: [
604
- P,
604
+ u,
605
605
  " ",
606
- P !== 1 ? r.guests : r.guest
606
+ u !== 1 ? r.guests : r.guest
607
607
  ] }),
608
- P > 0 && /* @__PURE__ */ n("span", { className: "text-xs text-zinc-500", children: [
608
+ u > 0 && /* @__PURE__ */ n("span", { className: "text-xs text-zinc-500", children: [
609
609
  "(",
610
- E,
610
+ j,
611
611
  " ",
612
612
  r.confirmed,
613
613
  ")"
614
614
  ] })
615
615
  ] }),
616
616
  /* @__PURE__ */ n("div", { className: "mt-2 space-y-2", children: [
617
- p ? d.slice(0, 6).map(
618
- (_, re) => T ? T(_, re) : /* @__PURE__ */ e(
617
+ p ? c.slice(0, 6).map(
618
+ (R, se) => H ? H(R, se) : /* @__PURE__ */ e(
619
619
  Me,
620
620
  {
621
- participant: _,
621
+ participant: R,
622
622
  isEventCanceled: t.isCanceled,
623
623
  labels: r
624
624
  },
625
- _.id
625
+ R.id
626
626
  )
627
- ) : m.slice(0, 6).map((_, re) => {
627
+ ) : m.slice(0, 6).map((R, se) => {
628
628
  const ke = {
629
- id: String(re),
630
- name: _,
629
+ id: String(se),
630
+ name: R,
631
631
  email: "",
632
632
  isConfirmed: t.isAccepted,
633
- isOrganizer: re === 0,
633
+ isOrganizer: se === 0,
634
634
  isClient: !1
635
635
  };
636
- return T ? T(ke, re) : /* @__PURE__ */ e(
636
+ return H ? H(ke, se) : /* @__PURE__ */ e(
637
637
  Me,
638
638
  {
639
639
  participant: ke,
640
640
  isEventCanceled: t.isCanceled,
641
641
  labels: r
642
642
  },
643
- _
643
+ R
644
644
  );
645
645
  }),
646
- P > 6 && /* @__PURE__ */ n("div", { className: "text-xs text-zinc-500 py-1.5 pl-10", children: [
646
+ u > 6 && /* @__PURE__ */ n("div", { className: "text-xs text-zinc-500 py-1.5 pl-10", children: [
647
647
  "+",
648
- P - 6,
648
+ u - 6,
649
649
  " ",
650
650
  r.more
651
651
  ] })
@@ -658,39 +658,39 @@ function ze({
658
658
  ] }),
659
659
  /* @__PURE__ */ n("div", { className: "flex items-start gap-2", children: [
660
660
  /* @__PURE__ */ e(bt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
661
- /* @__PURE__ */ e("div", { className: "text-sm text-zinc-700 dark:text-zinc-300", children: p && d.find((_) => _.isOrganizer)?.name || m[0] || "Calendar" })
661
+ /* @__PURE__ */ e("div", { className: "text-sm text-zinc-700 dark:text-zinc-300", children: p && c.find((R) => R.isOrganizer)?.name || m[0] || "Calendar" })
662
662
  ] })
663
663
  ] }),
664
- z && f && l && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 mt-3 py-3", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
664
+ $ && f && l && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 mt-3 py-3", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
665
665
  x ? /* @__PURE__ */ n(Ze, { children: [
666
666
  /* @__PURE__ */ e(qe, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "flex", children: [
667
667
  /* @__PURE__ */ e(
668
- ne,
668
+ oe,
669
669
  {
670
670
  size: "sm",
671
671
  variant: "outline",
672
672
  className: h(
673
673
  "rounded-r-none gap-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
674
- c && "!bg-green-700 !text-white hover:!bg-green-700"
674
+ k && "!bg-green-700 !text-white hover:!bg-green-700"
675
675
  ),
676
- onClick: (_) => {
677
- _.stopPropagation(), c || f(t);
676
+ onClick: (R) => {
677
+ R.stopPropagation(), k || f(t);
678
678
  },
679
- disabled: b,
680
- children: b ? /* @__PURE__ */ e(oe, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(Q, { children: [
681
- c && /* @__PURE__ */ e(le, { className: "h-3.5 w-3.5" }),
679
+ disabled: w,
680
+ children: w ? /* @__PURE__ */ e(le, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(q, { children: [
681
+ k && /* @__PURE__ */ e(de, { className: "h-3.5 w-3.5" }),
682
682
  r.going
683
683
  ] })
684
684
  }
685
685
  ),
686
686
  /* @__PURE__ */ e(
687
- ne,
687
+ oe,
688
688
  {
689
689
  size: "sm",
690
690
  variant: "outline",
691
691
  className: h(
692
692
  "rounded-l-none px-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
693
- c && "!bg-green-700 !text-white hover:!bg-green-700"
693
+ k && "!bg-green-700 !text-white hover:!bg-green-700"
694
694
  ),
695
695
  children: /* @__PURE__ */ e(pt, { className: "h-3.5 w-3.5" })
696
696
  }
@@ -702,88 +702,88 @@ function ze({
702
702
  {
703
703
  className: h(
704
704
  "gap-1.5 h-8 !border-none !bg-green-50 text-green-800 hover:!bg-green-100",
705
- c && "!bg-green-700 !text-white hover:!bg-green-700"
705
+ k && "!bg-green-700 !text-white hover:!bg-green-700"
706
706
  ),
707
707
  onClick: () => f(t),
708
708
  children: [
709
- /* @__PURE__ */ e(le, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
709
+ /* @__PURE__ */ e(de, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
710
710
  r.acceptThisEvent
711
711
  ]
712
712
  }
713
713
  ),
714
714
  /* @__PURE__ */ n(Ne, { onClick: () => f(t), children: [
715
- /* @__PURE__ */ e(le, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
715
+ /* @__PURE__ */ e(de, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
716
716
  r.acceptAllEvents
717
717
  ] })
718
718
  ] })
719
719
  ] }) : /* @__PURE__ */ e(
720
- ne,
720
+ oe,
721
721
  {
722
722
  size: "sm",
723
723
  variant: "outline",
724
724
  className: h(
725
725
  "gap-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
726
- c && "!bg-green-700 !text-white hover:!bg-green-700"
726
+ k && "!bg-green-700 !text-white hover:!bg-green-700"
727
727
  ),
728
728
  onClick: () => {
729
- c || f(t);
729
+ k || f(t);
730
730
  },
731
- disabled: b,
732
- children: b ? /* @__PURE__ */ e(oe, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(Q, { children: [
733
- c && /* @__PURE__ */ e(le, { className: "h-3.5 w-3.5" }),
731
+ disabled: w,
732
+ children: w ? /* @__PURE__ */ e(le, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(q, { children: [
733
+ k && /* @__PURE__ */ e(de, { className: "h-3.5 w-3.5" }),
734
734
  r.going
735
735
  ] })
736
736
  }
737
737
  ),
738
738
  /* @__PURE__ */ e(
739
- ne,
739
+ oe,
740
740
  {
741
741
  size: "sm",
742
742
  variant: "outline",
743
743
  className: h(
744
744
  "gap-1.5 h-8 !border-none !bg-rose-100 text-rose-800 hover:!bg-rose-200",
745
- w && "!bg-rose-700 !text-white hover:!bg-rose-700"
745
+ D && "!bg-rose-700 !text-white hover:!bg-rose-700"
746
746
  ),
747
747
  onClick: () => {
748
- w || l(t);
748
+ D || l(t);
749
749
  },
750
- disabled: k,
751
- children: k ? /* @__PURE__ */ e(oe, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(Q, { children: [
752
- w && /* @__PURE__ */ e(he, { className: "h-3.5 w-3.5" }),
750
+ disabled: y,
751
+ children: y ? /* @__PURE__ */ e(le, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(q, { children: [
752
+ D && /* @__PURE__ */ e(he, { className: "h-3.5 w-3.5" }),
753
753
  r.notGoing
754
754
  ] })
755
755
  }
756
756
  )
757
757
  ] }) }),
758
- L && c && !t.meetingTookPlace && !t.isCanceled && u && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 py-3", children: /* @__PURE__ */ n(
759
- ne,
758
+ L && k && !t.meetingTookPlace && !t.isCanceled && d && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 py-3", children: /* @__PURE__ */ n(
759
+ oe,
760
760
  {
761
761
  size: "sm",
762
762
  variant: "outline",
763
763
  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",
764
- onClick: () => u(t),
765
- disabled: D,
764
+ onClick: () => d(t),
765
+ disabled: M,
766
766
  children: [
767
- D && /* @__PURE__ */ e(oe, { className: "h-4 w-4 mr-2" }),
767
+ M && /* @__PURE__ */ e(le, { className: "h-4 w-4 mr-2" }),
768
768
  r.confirmMeeting
769
769
  ]
770
770
  }
771
771
  ) })
772
772
  ] }),
773
- A ? I && A({
774
- onConfirm: X,
775
- onCancel: () => F(!1),
773
+ _ ? A && _({
774
+ onConfirm: Z,
775
+ onCancel: () => V(!1),
776
776
  isLoading: S
777
777
  }) : /* @__PURE__ */ e(
778
778
  Dt,
779
779
  {
780
- open: I,
781
- onOpenChange: F,
780
+ open: A,
781
+ onOpenChange: V,
782
782
  title: r.deleteConfirmTitle,
783
783
  description: r.deleteConfirmDescription,
784
784
  cancelLabel: r.cancel,
785
785
  confirmLabel: r.delete,
786
- onConfirm: X,
786
+ onConfirm: Z,
787
787
  isLoading: S
788
788
  }
789
789
  )
@@ -793,113 +793,113 @@ function Or({
793
793
  event: t,
794
794
  children: r,
795
795
  open: s,
796
- onOpenChange: a,
797
- isLoading: o,
796
+ onOpenChange: o,
797
+ isLoading: a,
798
798
  labels: i,
799
799
  onEdit: g,
800
800
  onDelete: f,
801
801
  onCancel: l,
802
- onAccept: u,
803
- onDecline: M,
802
+ onAccept: d,
803
+ onDecline: z,
804
804
  onConfirmMeeting: N,
805
805
  canEdit: C = !0,
806
806
  canDelete: L = !1,
807
807
  canCancel: v = !0,
808
- isCurrentUserParticipant: y,
809
- isCurrentUserClient: b,
810
- currentUserAcceptStatus: k,
811
- isAcceptLoading: D,
808
+ isCurrentUserParticipant: b,
809
+ isCurrentUserClient: w,
810
+ currentUserAcceptStatus: y,
811
+ isAcceptLoading: M,
812
812
  isDeclineLoading: S,
813
- isConfirmLoading: T,
814
- isDeleteLoading: B,
815
- renderParticipant: H,
816
- renderHeaderActions: A,
817
- renderCancelReason: $,
818
- renderDeleteConfirmation: j,
819
- formatDate: I,
820
- formatTimeRange: F,
821
- className: O,
813
+ isConfirmLoading: H,
814
+ isDeleteLoading: O,
815
+ renderParticipant: I,
816
+ renderHeaderActions: _,
817
+ renderCancelReason: P,
818
+ renderDeleteConfirmation: W,
819
+ formatDate: A,
820
+ formatTimeRange: V,
821
+ className: U,
822
822
  width: x = 360
823
823
  }) {
824
- const d = St("(min-width: 768px)"), m = { ...kt, ...i }, p = se(() => {
825
- a?.(!1);
826
- }, [a]), c = {
824
+ const c = St("(min-width: 768px)"), m = { ...kt, ...i }, p = ee(() => {
825
+ o?.(!1);
826
+ }, [o]), k = {
827
827
  event: t,
828
828
  labels: m,
829
- isLoading: o,
829
+ isLoading: a,
830
830
  onClose: p,
831
831
  onEdit: g,
832
832
  onDelete: f,
833
833
  onCancel: l,
834
- onAccept: u,
835
- onDecline: M,
834
+ onAccept: d,
835
+ onDecline: z,
836
836
  onConfirmMeeting: N,
837
837
  canEdit: C,
838
838
  canDelete: L,
839
839
  canCancel: v,
840
- isCurrentUserParticipant: y,
841
- isCurrentUserClient: b,
842
- currentUserAcceptStatus: k,
843
- isAcceptLoading: D,
840
+ isCurrentUserParticipant: b,
841
+ isCurrentUserClient: w,
842
+ currentUserAcceptStatus: y,
843
+ isAcceptLoading: M,
844
844
  isDeclineLoading: S,
845
- isConfirmLoading: T,
846
- isDeleteLoading: B,
847
- renderParticipant: H,
848
- renderHeaderActions: A,
849
- renderCancelReason: $,
850
- renderDeleteConfirmation: j,
851
- formatDate: I,
852
- formatTimeRange: F
845
+ isConfirmLoading: H,
846
+ isDeleteLoading: O,
847
+ renderParticipant: I,
848
+ renderHeaderActions: _,
849
+ renderCancelReason: P,
850
+ renderDeleteConfirmation: W,
851
+ formatDate: A,
852
+ formatTimeRange: V
853
853
  };
854
- return d ? /* @__PURE__ */ n(Fe, { open: s ?? !1, onOpenChange: a ?? (() => {
854
+ return c ? /* @__PURE__ */ n(Pe, { open: s ?? !1, onOpenChange: o ?? (() => {
855
855
  }), children: [
856
- /* @__PURE__ */ e(Pe, { asChild: !0, children: r }),
856
+ /* @__PURE__ */ e(Oe, { asChild: !0, children: r }),
857
857
  /* @__PURE__ */ e(
858
- Oe,
858
+ Re,
859
859
  {
860
860
  className: h(
861
861
  "p-0 shadow-lg !rounded-2xl bg-white dark:bg-zinc-900 overflow-hidden border z-50",
862
- O
862
+ U
863
863
  ),
864
864
  style: { width: x },
865
865
  align: "center",
866
866
  side: "bottom",
867
867
  sideOffset: 4,
868
- children: /* @__PURE__ */ e(ze, { ...c })
868
+ children: /* @__PURE__ */ e(Ee, { ...k })
869
869
  }
870
870
  )
871
- ] }) : /* @__PURE__ */ n(Q, { children: [
871
+ ] }) : /* @__PURE__ */ n(q, { children: [
872
872
  r,
873
873
  /* @__PURE__ */ e(
874
874
  Ct,
875
875
  {
876
876
  open: s ?? !1,
877
- onOpenChange: a ?? (() => {
877
+ onOpenChange: o ?? (() => {
878
878
  }),
879
879
  title: t.title,
880
- children: /* @__PURE__ */ e(ze, { ...c })
880
+ children: /* @__PURE__ */ e(Ee, { ...k })
881
881
  }
882
882
  )
883
883
  ] });
884
884
  }
885
- const fe = 44, Ee = 4, Lt = 56, Se = 8, ge = 80, ie = 140, Le = 100, Te = 2, Tt = 8, Ht = 18;
885
+ const ge = 44, ze = 4, Lt = 56, Se = 8, xe = 80, ce = 140, Le = 100, Te = 2, Tt = 8, Ht = 18;
886
886
  function jt(t) {
887
887
  return t.split(" ").map((r) => r[0]).join("").toUpperCase().slice(0, 2);
888
888
  }
889
889
  function It(t, r) {
890
890
  const s = [];
891
- for (let a = 0; a < r; a++) {
892
- const o = new Date(t);
893
- o.setDate(o.getDate() + a), s.push(o);
891
+ for (let o = 0; o < r; o++) {
892
+ const a = new Date(t);
893
+ a.setDate(a.getDate() + o), s.push(a);
894
894
  }
895
895
  return s;
896
896
  }
897
897
  function Wt(t, r, s) {
898
- const a = [];
899
- return t.forEach((o, i) => {
898
+ const o = [];
899
+ return t.forEach((a, i) => {
900
900
  for (let g = r; g < s; g++)
901
- a.push({ hour: g, dayIndex: i, date: o });
902
- }), a;
901
+ o.push({ hour: g, dayIndex: i, date: a });
902
+ }), o;
903
903
  }
904
904
  function At(t) {
905
905
  return `${t.toString().padStart(2, "0")}:00`;
@@ -912,173 +912,173 @@ function $t(t) {
912
912
  });
913
913
  }
914
914
  function He(t) {
915
- const r = [...t].sort((o, i) => o.startCol !== i.startCol ? o.startCol - i.startCol : i.spanCols - o.spanCols), s = [], a = [];
916
- for (const o of r) {
915
+ const r = [...t].sort((a, i) => a.startCol !== i.startCol ? a.startCol - i.startCol : i.spanCols - a.spanCols), s = [], o = [];
916
+ for (const a of r) {
917
917
  let i = 0;
918
- for (; a[i] !== void 0 && a[i] > o.startCol; )
918
+ for (; o[i] !== void 0 && o[i] > a.startCol; )
919
919
  i++;
920
- a[i] = o.startCol + o.spanCols, s.push({
921
- ...o,
920
+ o[i] = a.startCol + a.spanCols, s.push({
921
+ ...a,
922
922
  stackIndex: i
923
923
  });
924
924
  }
925
925
  return s;
926
926
  }
927
- function Bt({ src: t, alt: r, fallback: s, className: a }) {
927
+ function Bt({ src: t, alt: r, fallback: s, className: o }) {
928
928
  return /* @__PURE__ */ e(
929
929
  "div",
930
930
  {
931
- className: h("relative flex shrink-0 overflow-hidden rounded-sm border bg-muted", a),
931
+ className: h("relative flex shrink-0 overflow-hidden rounded-sm border bg-muted", o),
932
932
  children: t ? /* @__PURE__ */ e("img", { src: t, alt: r, className: "aspect-square h-full w-full object-cover" }) : /* @__PURE__ */ e("div", { className: "flex h-full w-full items-center justify-center bg-muted text-muted-foreground", children: s })
933
933
  }
934
934
  );
935
935
  }
936
936
  const _t = 7;
937
- function xe({
937
+ function pe({
938
938
  daysToShow: t = _t,
939
939
  events: r,
940
940
  users: s = [],
941
- selectedDate: a,
942
- onDateChange: o,
941
+ selectedDate: o,
942
+ onDateChange: a,
943
943
  onEventClick: i,
944
944
  visibleHours: g,
945
945
  className: f,
946
946
  getEventUserId: l,
947
- renderPopover: u,
948
- slots: M,
947
+ renderPopover: d,
948
+ slots: z,
949
949
  classNames: N
950
950
  }) {
951
- const C = Qe(null), L = a ?? /* @__PURE__ */ new Date(), v = !0, y = g?.from ?? Tt, b = g?.to ?? Ht, k = b - y, D = W(() => {
952
- const d = new Date(L);
951
+ const C = Fe(null), L = o ?? /* @__PURE__ */ new Date(), v = !0, b = g?.from ?? Tt, w = g?.to ?? Ht, y = w - b, M = B(() => {
952
+ const c = new Date(L);
953
953
  if (t === 1 || t === 3)
954
- return d.setHours(0, 0, 0, 0), d;
955
- const m = d.getDay(), p = m === 0 ? -6 : 1 - m;
956
- return d.setDate(d.getDate() + p), d.setHours(0, 0, 0, 0), d;
957
- }, [L, t]), S = W(
958
- () => It(D, t),
959
- [D, t]
960
- ), T = W(
961
- () => Wt(S, y, b),
962
- [v, S, y, b]
963
- ), H = l ?? ((d) => {
964
- if (d.user?.id) return d.user.id;
965
- const m = d.data;
954
+ return c.setHours(0, 0, 0, 0), c;
955
+ const m = c.getDay(), p = m === 0 ? -6 : 1 - m;
956
+ return c.setDate(c.getDate() + p), c.setHours(0, 0, 0, 0), c;
957
+ }, [L, t]), S = B(
958
+ () => It(M, t),
959
+ [M, t]
960
+ ), H = B(
961
+ () => Wt(S, b, w),
962
+ [v, S, b, w]
963
+ ), I = l ?? ((c) => {
964
+ if (c.user?.id) return c.user.id;
965
+ const m = c.data;
966
966
  if (m?.userId) return String(m.userId);
967
967
  if (m?.user && typeof m.user == "object" && m.user.id)
968
968
  return String(m.user.id);
969
- if (d.participants?.[0]?.id) return d.participants[0].id;
970
- }), A = W(() => {
971
- const d = /* @__PURE__ */ new Map();
969
+ if (c.participants?.[0]?.id) return c.participants[0].id;
970
+ }), _ = B(() => {
971
+ const c = /* @__PURE__ */ new Map();
972
972
  for (const m of s)
973
- d.set(m.id, {
973
+ c.set(m.id, {
974
974
  id: m.id,
975
975
  name: m.name,
976
976
  avatar: m.avatar ?? void 0,
977
977
  email: m.email
978
978
  });
979
979
  for (const m of r) {
980
- m.user?.id && !d.has(m.user.id) && d.set(m.user.id, {
980
+ m.user?.id && !c.has(m.user.id) && c.set(m.user.id, {
981
981
  id: m.user.id,
982
982
  name: m.user.name,
983
983
  avatar: m.user.avatar ?? void 0,
984
984
  email: m.user.email
985
985
  });
986
986
  for (const p of m.participants || [])
987
- p.id && !d.has(p.id) && d.set(p.id, {
987
+ p.id && !c.has(p.id) && c.set(p.id, {
988
988
  id: p.id,
989
989
  name: p.name,
990
990
  avatar: p.avatar ?? void 0,
991
991
  email: p.email
992
992
  });
993
993
  }
994
- return Array.from(d.values());
995
- }, [s, r]), $ = W(() => {
996
- const d = [], m = /* @__PURE__ */ new Map();
997
- for (const w of A)
998
- m.set(w.id, []);
994
+ return Array.from(c.values());
995
+ }, [s, r]), P = B(() => {
996
+ const c = [], m = /* @__PURE__ */ new Map();
997
+ for (const D of _)
998
+ m.set(D.id, []);
999
999
  m.set("unassigned", []);
1000
- for (const w of r) {
1001
- const z = H(w) ?? "unassigned";
1002
- (m.get(z) ?? m.get("unassigned")).push(w);
1000
+ for (const D of r) {
1001
+ const $ = I(D) ?? "unassigned";
1002
+ (m.get($) ?? m.get("unassigned")).push(D);
1003
1003
  }
1004
- const p = (w) => {
1005
- const z = [];
1006
- for (const E of w) {
1007
- const P = E.startDate.getHours() + E.startDate.getMinutes() / 60, q = E.endDate.getHours() + E.endDate.getMinutes() / 60;
1008
- for (let V = 0; V < S.length; V++) {
1009
- const ee = S[V], ce = me(ee), ue = Ve(ee);
1010
- if (E.startDate <= ue && E.endDate >= ce) {
1011
- let te = y, X = b;
1012
- if (E.startDate >= ce && (te = Math.max(y, P)), E.endDate <= ue && (X = Math.min(b, q)), te = Math.max(y, Math.min(b, te)), X = Math.max(y, Math.min(b, X)), X > te) {
1013
- const _ = V * k + Math.floor(te - y), re = V * k + Math.ceil(X - y);
1014
- z.push({
1015
- event: E,
1016
- startCol: _,
1017
- spanCols: Math.max(1, re - _)
1004
+ const p = (D) => {
1005
+ const $ = [];
1006
+ for (const j of D) {
1007
+ const u = j.startDate.getHours() + j.startDate.getMinutes() / 60, E = j.endDate.getHours() + j.endDate.getMinutes() / 60;
1008
+ for (let T = 0; T < S.length; T++) {
1009
+ const F = S[T], ae = fe(F), ie = Ve(F);
1010
+ if (j.startDate <= ie && j.endDate >= ae) {
1011
+ let ne = b, Z = w;
1012
+ if (j.startDate >= ae && (ne = Math.max(b, u)), j.endDate <= ie && (Z = Math.min(w, E)), ne = Math.max(b, Math.min(w, ne)), Z = Math.max(b, Math.min(w, Z)), Z > ne) {
1013
+ const R = T * y + Math.floor(ne - b), se = T * y + Math.ceil(Z - b);
1014
+ $.push({
1015
+ event: j,
1016
+ startCol: R,
1017
+ spanCols: Math.max(1, se - R)
1018
1018
  });
1019
1019
  }
1020
1020
  }
1021
1021
  }
1022
1022
  }
1023
- return z;
1023
+ return $;
1024
1024
  };
1025
- for (const w of A) {
1026
- const z = m.get(w.id) ?? [], E = p(z), P = He(E), q = P.reduce((V, ee) => Math.max(V, ee.stackIndex + 1), 0);
1027
- d.push({
1028
- user: w,
1029
- events: P,
1030
- maxStack: Math.max(q, 1)
1025
+ for (const D of _) {
1026
+ const $ = m.get(D.id) ?? [], j = p($), u = He(j), E = u.reduce((T, F) => Math.max(T, F.stackIndex + 1), 0);
1027
+ c.push({
1028
+ user: D,
1029
+ events: u,
1030
+ maxStack: Math.max(E, 1)
1031
1031
  });
1032
1032
  }
1033
- const c = m.get("unassigned") ?? [];
1034
- if (c.length > 0) {
1035
- const w = p(c), z = He(w), E = z.reduce((P, q) => Math.max(P, q.stackIndex + 1), 0);
1036
- d.push({
1033
+ const k = m.get("unassigned") ?? [];
1034
+ if (k.length > 0) {
1035
+ const D = p(k), $ = He(D), j = $.reduce((u, E) => Math.max(u, E.stackIndex + 1), 0);
1036
+ c.push({
1037
1037
  user: {
1038
1038
  id: "unassigned",
1039
1039
  name: "Unassigned",
1040
1040
  avatar: void 0,
1041
1041
  email: void 0
1042
1042
  },
1043
- events: z,
1044
- maxStack: Math.max(E, 1)
1043
+ events: $,
1044
+ maxStack: Math.max(j, 1)
1045
1045
  });
1046
1046
  }
1047
- return d.filter((w) => w.events.length > 0);
1047
+ return c.filter((D) => D.events.length > 0);
1048
1048
  }, [
1049
- A,
1049
+ _,
1050
1050
  r,
1051
1051
  S,
1052
1052
  v,
1053
- k,
1054
1053
  y,
1055
1054
  b,
1056
- H
1057
- ]), j = W(() => {
1058
- const d = /* @__PURE__ */ new Map();
1059
- for (const m of $)
1055
+ w,
1056
+ I
1057
+ ]), W = B(() => {
1058
+ const c = /* @__PURE__ */ new Map();
1059
+ for (const m of P)
1060
1060
  for (const p of m.events)
1061
1061
  if (p.spanCols === 1) {
1062
- const c = d.get(p.startCol) ?? 0;
1063
- d.set(p.startCol, c + 1);
1062
+ const k = c.get(p.startCol) ?? 0;
1063
+ c.set(p.startCol, k + 1);
1064
1064
  }
1065
- return d;
1066
- }, [$]), I = W(() => {
1067
- const d = T.length, m = ge, p = [];
1068
- for (let c = 0; c < d; c++) {
1069
- const w = j.get(c) ?? 0;
1070
- w > Te ? p.push(
1071
- Le + (w - Te) * 20
1072
- ) : w > 0 ? p.push(Math.max(m, Le)) : p.push(m);
1065
+ return c;
1066
+ }, [P]), A = B(() => {
1067
+ const c = H.length, m = xe, p = [];
1068
+ for (let k = 0; k < c; k++) {
1069
+ const D = W.get(k) ?? 0;
1070
+ D > Te ? p.push(
1071
+ Le + (D - Te) * 20
1072
+ ) : D > 0 ? p.push(Math.max(m, Le)) : p.push(m);
1073
1073
  }
1074
1074
  return p;
1075
- }, [v, T.length, S.length, j]), F = (d) => Math.max(Lt, d * (fe + Ee) + Se * 2), O = ie + I.reduce((d, m) => d + m, 0), x = W(() => {
1076
- const d = [0];
1077
- for (let m = 0; m < I.length; m++)
1078
- d.push(d[m] + I[m]);
1079
- return d;
1080
- }, [I]);
1081
- return /* @__PURE__ */ e("div", { className: h("flex h-full flex-col", f), children: /* @__PURE__ */ e("div", { className: "ic-timeline-scroll-container flex-1", ref: C, children: /* @__PURE__ */ n("div", { className: "relative", style: { minWidth: O }, children: [
1075
+ }, [v, H.length, S.length, W]), V = (c) => Math.max(Lt, c * (ge + ze) + Se * 2), U = ce + A.reduce((c, m) => c + m, 0), x = B(() => {
1076
+ const c = [0];
1077
+ for (let m = 0; m < A.length; m++)
1078
+ c.push(c[m] + A[m]);
1079
+ return c;
1080
+ }, [A]);
1081
+ return /* @__PURE__ */ e("div", { className: h("flex h-full flex-col", f), children: /* @__PURE__ */ e("div", { className: "ic-timeline-scroll-container flex-1", ref: C, children: /* @__PURE__ */ n("div", { className: "relative", style: { minWidth: U }, children: [
1082
1082
  // Hour mode: Day headers + Hour sub-headers - sticky wrapper with flex child (sticky + flex breaks sticky)
1083
1083
  /* @__PURE__ */ e("div", { className: "ic-timeline-header sticky top-0 z-20 border-b bg-background", children: /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
1084
1084
  t > 1 && /* @__PURE__ */ n("div", { className: "flex border-b", children: [
@@ -1086,12 +1086,12 @@ function xe({
1086
1086
  "div",
1087
1087
  {
1088
1088
  className: "flex shrink-0 items-center border-r bg-background px-2 py-1",
1089
- style: { width: ie },
1089
+ style: { width: ce },
1090
1090
  children: /* @__PURE__ */ e("span", { className: "text-[10px] font-medium uppercase text-muted-foreground", children: "Resources" })
1091
1091
  }
1092
1092
  ),
1093
- S.map((d, m) => {
1094
- const p = Z(d), c = m * k, w = I.slice(c, c + k).reduce((z, E) => z + E, 0);
1093
+ S.map((c, m) => {
1094
+ const p = te(c), k = m * y, D = A.slice(k, k + y).reduce(($, j) => $ + j, 0);
1095
1095
  return /* @__PURE__ */ e(
1096
1096
  "div",
1097
1097
  {
@@ -1099,10 +1099,10 @@ function xe({
1099
1099
  "flex shrink-0 items-center justify-center border-r py-1.5 font-medium",
1100
1100
  p ? "bg-primary/10 text-primary" : "bg-muted/30"
1101
1101
  ),
1102
- style: { width: w },
1103
- children: /* @__PURE__ */ e("span", { className: "text-xs", children: $t(d) })
1102
+ style: { width: D },
1103
+ children: /* @__PURE__ */ e("span", { className: "text-xs", children: $t(c) })
1104
1104
  },
1105
- `day-${d.toISOString()}`
1105
+ `day-${c.toISOString()}`
1106
1106
  );
1107
1107
  })
1108
1108
  ] }),
@@ -1111,7 +1111,7 @@ function xe({
1111
1111
  "div",
1112
1112
  {
1113
1113
  className: "flex shrink-0 items-center border-r bg-background px-2 py-2",
1114
- style: { width: ie },
1114
+ style: { width: ce },
1115
1115
  children: /* @__PURE__ */ e("span", { className: "text-[10px] font-medium uppercase text-muted-foreground", children: "Resources" })
1116
1116
  }
1117
1117
  ),
@@ -1119,36 +1119,36 @@ function xe({
1119
1119
  "div",
1120
1120
  {
1121
1121
  className: "sticky left-0 z-10 border-r bg-background",
1122
- style: { width: ie }
1122
+ style: { width: ce }
1123
1123
  }
1124
1124
  ),
1125
- T.map((d, m) => {
1126
- const p = d.hour === y, c = Z(d.date), w = I[m] ?? ge;
1125
+ H.map((c, m) => {
1126
+ const p = c.hour === b, k = te(c.date), D = A[m] ?? xe;
1127
1127
  return /* @__PURE__ */ e(
1128
1128
  "div",
1129
1129
  {
1130
1130
  className: h(
1131
1131
  "flex shrink-0 items-center justify-center py-1.5 text-[10px] text-muted-foreground",
1132
1132
  p && m > 0 ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1133
- c && "bg-primary/5"
1133
+ k && "bg-primary/5"
1134
1134
  ),
1135
- style: { width: w },
1136
- children: At(d.hour)
1135
+ style: { width: D },
1136
+ children: At(c.hour)
1137
1137
  },
1138
- `hour-${d.dayIndex}-${d.hour}`
1138
+ `hour-${c.dayIndex}-${c.hour}`
1139
1139
  );
1140
1140
  })
1141
1141
  ] })
1142
1142
  ] }) }),
1143
- $.map((d) => {
1144
- const m = F(d.maxStack);
1143
+ P.map((c) => {
1144
+ const m = V(c.maxStack);
1145
1145
  return /* @__PURE__ */ n(
1146
1146
  "div",
1147
1147
  {
1148
1148
  className: h("relative flex border-b", N?.resourceRow),
1149
1149
  style: { height: m },
1150
1150
  children: [
1151
- /* @__PURE__ */ e("div", { className: "sticky left-0 z-10", style: { width: ie }, children: /* @__PURE__ */ n(
1151
+ /* @__PURE__ */ e("div", { className: "sticky left-0 z-10", style: { width: ce }, children: /* @__PURE__ */ n(
1152
1152
  "div",
1153
1153
  {
1154
1154
  className: h(
@@ -1160,44 +1160,44 @@ function xe({
1160
1160
  Bt,
1161
1161
  {
1162
1162
  className: "size-7",
1163
- src: d.user.avatar,
1164
- alt: d.user.name,
1165
- fallback: jt(d.user.name)
1163
+ src: c.user.avatar,
1164
+ alt: c.user.name,
1165
+ fallback: jt(c.user.name)
1166
1166
  }
1167
1167
  ),
1168
- /* @__PURE__ */ e("span", { className: "truncate text-xs sm:text-sm font-medium", children: d.user.name })
1168
+ /* @__PURE__ */ e("span", { className: "truncate text-xs sm:text-sm font-medium", children: c.user.name })
1169
1169
  ]
1170
1170
  }
1171
1171
  ) }),
1172
1172
  /* @__PURE__ */ n("div", { className: "relative flex", children: [
1173
1173
  // Hour mode cells
1174
- T.map((p, c) => {
1175
- const w = p.hour === y && c > 0, z = I[c] ?? ge;
1174
+ H.map((p, k) => {
1175
+ const D = p.hour === b && k > 0, $ = A[k] ?? xe;
1176
1176
  return /* @__PURE__ */ e(
1177
1177
  "div",
1178
1178
  {
1179
1179
  className: h(
1180
1180
  "shrink-0",
1181
- w ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1182
- Z(p.date) && "bg-primary/5"
1181
+ D ? "border-l-2 border-l-border" : "border-r border-r-border/50",
1182
+ te(p.date) && "bg-primary/5"
1183
1183
  ),
1184
- style: { width: z }
1184
+ style: { width: $ }
1185
1185
  },
1186
1186
  `cell-${p.dayIndex}-${p.hour}`
1187
1187
  );
1188
1188
  }),
1189
- d.events.map((p) => {
1190
- const c = (x[p.startCol] ?? 0) + 2, w = x[p.startCol + p.spanCols] ?? x[x.length - 1] ?? 0, z = x[p.startCol] ?? 0, E = w - z - 4, P = Se + p.stackIndex * (fe + Ee);
1189
+ c.events.map((p) => {
1190
+ const k = (x[p.startCol] ?? 0) + 2, D = x[p.startCol + p.spanCols] ?? x[x.length - 1] ?? 0, $ = x[p.startCol] ?? 0, j = D - $ - 4, u = Se + p.stackIndex * (ge + ze);
1191
1191
  return /* @__PURE__ */ e(
1192
1192
  "div",
1193
1193
  {
1194
1194
  className: "absolute",
1195
1195
  style: {
1196
- left: c,
1197
- width: Math.max(E, 0),
1196
+ left: k,
1197
+ width: Math.max(j, 0),
1198
1198
  // No forced minimum - columns are guaranteed wide enough
1199
- top: P,
1200
- height: fe
1199
+ top: u,
1200
+ height: ge
1201
1201
  },
1202
1202
  children: /* @__PURE__ */ e(
1203
1203
  tt,
@@ -1205,7 +1205,7 @@ function xe({
1205
1205
  event: p.event,
1206
1206
  variant: "compact",
1207
1207
  onClick: i,
1208
- renderPopover: u,
1208
+ renderPopover: d,
1209
1209
  className: h("h-full w-full", N?.eventCardCompact)
1210
1210
  }
1211
1211
  )
@@ -1216,10 +1216,10 @@ function xe({
1216
1216
  ] })
1217
1217
  ]
1218
1218
  },
1219
- d.user.id
1219
+ c.user.id
1220
1220
  );
1221
1221
  }),
1222
- $.length === 0 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-20 text-muted-foreground", children: "No users or events to display" })
1222
+ P.length === 0 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-20 text-muted-foreground", children: "No users or events to display" })
1223
1223
  ] }) }) });
1224
1224
  }
1225
1225
  const Ft = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], Pt = [
@@ -1240,18 +1240,18 @@ function je(t) {
1240
1240
  const r = t.hexColor;
1241
1241
  return r ? { backgroundColor: r } : {};
1242
1242
  }
1243
- function Ot({ day: t, date: r, events: s, isCurrentMonth: a, onDayClick: o }) {
1244
- const i = Z(r), g = 3, f = s.length;
1243
+ function Ot({ day: t, date: r, events: s, isCurrentMonth: o, onDayClick: a }) {
1244
+ const i = te(r), g = 3, f = s.length;
1245
1245
  return /* @__PURE__ */ n(
1246
1246
  "button",
1247
1247
  {
1248
1248
  type: "button",
1249
- onClick: () => o?.(r),
1249
+ onClick: () => a?.(r),
1250
1250
  className: h(
1251
1251
  "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",
1252
1252
  "hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
1253
1253
  "transition-colors",
1254
- !a && "opacity-40"
1254
+ !o && "opacity-40"
1255
1255
  ),
1256
1256
  children: [
1257
1257
  /* @__PURE__ */ e(
@@ -1271,7 +1271,7 @@ function Ot({ day: t, date: r, events: s, isCurrentMonth: a, onDayClick: o }) {
1271
1271
  style: je(l)
1272
1272
  },
1273
1273
  l.id
1274
- )) : /* @__PURE__ */ n(Q, { children: [
1274
+ )) : /* @__PURE__ */ n(q, { children: [
1275
1275
  s.slice(0, g).map((l) => /* @__PURE__ */ e(
1276
1276
  "div",
1277
1277
  {
@@ -1289,13 +1289,13 @@ function Ot({ day: t, date: r, events: s, isCurrentMonth: a, onDayClick: o }) {
1289
1289
  }
1290
1290
  );
1291
1291
  }
1292
- function Vt({
1292
+ function Rt({
1293
1293
  date: t,
1294
1294
  events: r,
1295
1295
  onMonthClick: s,
1296
- onDayClick: a
1296
+ onDayClick: o
1297
1297
  }) {
1298
- const o = W(() => ct(t, 0), [t]);
1298
+ const a = B(() => dt(t, 0), [t]);
1299
1299
  return /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
1300
1300
  /* @__PURE__ */ e(
1301
1301
  "button",
@@ -1315,7 +1315,7 @@ function Vt({
1315
1315
  /* @__PURE__ */ e("span", { className: "sm:hidden", children: i[0] }),
1316
1316
  /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: i })
1317
1317
  ] }, g)) }),
1318
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 gap-y-1", children: o.map((i, g) => {
1318
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 gap-y-1", children: a.map((i, g) => {
1319
1319
  const f = ut(r, i.date);
1320
1320
  return /* @__PURE__ */ e(
1321
1321
  Ot,
@@ -1324,7 +1324,7 @@ function Vt({
1324
1324
  date: i.date,
1325
1325
  events: f,
1326
1326
  isCurrentMonth: i.isCurrentMonth,
1327
- onDayClick: a
1327
+ onDayClick: o
1328
1328
  },
1329
1329
  `${g + 1}-${i.date.toISOString()}`
1330
1330
  );
@@ -1332,25 +1332,25 @@ function Vt({
1332
1332
  ] })
1333
1333
  ] });
1334
1334
  }
1335
- function Rt({
1335
+ function Vt({
1336
1336
  events: t,
1337
1337
  year: r,
1338
1338
  onMonthClick: s,
1339
- onDayClick: a,
1340
- className: o,
1339
+ onDayClick: o,
1340
+ className: a,
1341
1341
  slots: i,
1342
1342
  classNames: g
1343
1343
  }) {
1344
- const f = W(() => dt(r), [r]);
1345
- return /* @__PURE__ */ n("div", { className: h("flex flex-col h-full", o), children: [
1344
+ const f = B(() => ct(r), [r]);
1345
+ return /* @__PURE__ */ n("div", { className: h("flex flex-col h-full", a), children: [
1346
1346
  /* @__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: r }) }),
1347
1347
  /* @__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: f.map((l) => /* @__PURE__ */ e(
1348
- Vt,
1348
+ Rt,
1349
1349
  {
1350
1350
  date: l,
1351
1351
  events: t,
1352
1352
  onMonthClick: s,
1353
- onDayClick: a
1353
+ onDayClick: o
1354
1354
  },
1355
1355
  l.getMonth()
1356
1356
  )) }) })
@@ -1369,234 +1369,253 @@ function Yt({
1369
1369
  onEventClick: t,
1370
1370
  onSlotClick: r,
1371
1371
  onSlotSelect: s,
1372
- onAddEvent: a,
1373
- className: o,
1372
+ onAddEvent: o,
1373
+ className: a,
1374
1374
  showHeader: i = !0,
1375
1375
  minSelectionMinutes: g = 30,
1376
1376
  showMoreEventsInPopover: f = !1,
1377
1377
  slots: l,
1378
- classNames: u,
1379
- settingsContent: M,
1378
+ classNames: d,
1379
+ settingsContent: z,
1380
1380
  filterContent: N,
1381
1381
  headerActions: C,
1382
1382
  renderPopover: L
1383
1383
  }) {
1384
1384
  const {
1385
1385
  view: v,
1386
- setView: y,
1387
- selectedDate: b,
1388
- setSelectedDate: k,
1389
- slotDuration: D,
1386
+ setView: b,
1387
+ selectedDate: w,
1388
+ setSelectedDate: y,
1389
+ slotDuration: M,
1390
1390
  filteredEvents: S,
1391
- users: T,
1392
- visibleHours: B,
1393
- workingHours: H,
1394
- badgeVariant: A,
1395
- showWorkingHoursOnly: $
1396
- } = Xe(), j = W(() => {
1397
- if (!$ || !H)
1398
- return { startHour: B.start, endHour: B.end };
1399
- let c = 24, w = 0;
1400
- for (const z of Object.keys(H)) {
1401
- const E = H[Number(z)];
1402
- !E || E.enabled === !1 || (E.from < c && (c = E.from), E.to > w && (w = E.to));
1391
+ users: H,
1392
+ visibleHours: O,
1393
+ workingHours: I,
1394
+ badgeVariant: _,
1395
+ showWorkingHoursOnly: P
1396
+ } = Qe(), W = B(() => {
1397
+ if (!P || !I)
1398
+ return { startHour: O.start, endHour: O.end };
1399
+ let u = 24, E = 0;
1400
+ for (const T of Object.keys(I)) {
1401
+ const F = I[Number(T)];
1402
+ !F || F.enabled === !1 || (F.from < u && (u = F.from), F.to > E && (E = F.to));
1403
1403
  }
1404
- return c >= w ? { startHour: B.start, endHour: B.end } : { startHour: c, endHour: w };
1405
- }, [$, H, B]), I = j, F = W(() => Ut(v), [v]), O = se(
1406
- (c) => {
1404
+ return u >= E ? { startHour: O.start, endHour: O.end } : { startHour: u, endHour: E };
1405
+ }, [P, I, O]), A = W, V = B(() => Ut(v), [v]), U = ee(
1406
+ (u) => {
1407
1407
  if (s) {
1408
- s(c);
1408
+ s(u);
1409
1409
  return;
1410
1410
  }
1411
1411
  if (r) {
1412
- const w = c.startDate.getHours();
1413
- r(c.startDate, w);
1412
+ const E = u.startDate.getHours();
1413
+ r(u.startDate, E);
1414
1414
  }
1415
1415
  },
1416
1416
  [s, r]
1417
- ), x = se(
1418
- (c) => {
1419
- y("day"), k(c, "day");
1417
+ ), x = ee(
1418
+ (u) => {
1419
+ b("day"), y(u, "day");
1420
1420
  },
1421
- [k, y]
1422
- ), d = se(
1423
- (c) => {
1424
- y("month"), k(c, "month");
1421
+ [y, b]
1422
+ ), c = ee(
1423
+ (u) => {
1424
+ b("month"), y(u, "month");
1425
1425
  },
1426
- [k, y]
1427
- ), m = se(
1428
- (c) => {
1429
- t?.(c);
1426
+ [y, b]
1427
+ ), m = ee(
1428
+ (u) => {
1429
+ t?.(u);
1430
1430
  },
1431
1431
  [t]
1432
1432
  ), p = () => {
1433
- const c = S, w = m, z = L;
1433
+ const u = S, E = m, T = L;
1434
1434
  switch (v) {
1435
1435
  case "day":
1436
1436
  return /* @__PURE__ */ e(
1437
- at,
1437
+ ot,
1438
1438
  {
1439
- events: c,
1440
- date: b,
1441
- visibleHours: I,
1442
- workingHours: H,
1443
- slotDuration: D,
1444
- badgeVariant: A,
1445
- onEventClick: w,
1446
- renderPopover: z,
1439
+ events: u,
1440
+ date: w,
1441
+ visibleHours: A,
1442
+ workingHours: I,
1443
+ slotDuration: M,
1444
+ badgeVariant: _,
1445
+ onEventClick: E,
1446
+ renderPopover: T,
1447
1447
  ...l && { slots: l },
1448
- ...u && { classNames: u }
1448
+ ...d && { classNames: d }
1449
1449
  }
1450
1450
  );
1451
1451
  case "week":
1452
1452
  return /* @__PURE__ */ e(
1453
1453
  st,
1454
1454
  {
1455
- events: c,
1456
- date: b,
1457
- visibleHours: I,
1458
- workingHours: H,
1459
- slotDuration: D,
1460
- badgeVariant: A,
1461
- onEventClick: w,
1462
- renderPopover: z,
1455
+ events: u,
1456
+ date: w,
1457
+ visibleHours: A,
1458
+ workingHours: I,
1459
+ slotDuration: M,
1460
+ badgeVariant: _,
1461
+ onEventClick: E,
1462
+ renderPopover: T,
1463
1463
  ...l && { slots: l },
1464
- ...u && { classNames: u }
1464
+ ...d && { classNames: d }
1465
1465
  }
1466
1466
  );
1467
1467
  case "month":
1468
1468
  return /* @__PURE__ */ e(
1469
1469
  Ce,
1470
1470
  {
1471
- events: c,
1472
- date: b,
1473
- badgeVariant: A,
1474
- onEventClick: w,
1471
+ events: u,
1472
+ date: w,
1473
+ badgeVariant: _,
1474
+ onEventClick: E,
1475
1475
  onDayClick: x,
1476
- renderPopover: z,
1476
+ renderPopover: T,
1477
1477
  showMoreEventsInPopover: f,
1478
1478
  ...l && { slots: l },
1479
- ...u && { classNames: u }
1479
+ ...d && { classNames: d }
1480
1480
  }
1481
1481
  );
1482
1482
  case "year":
1483
1483
  return /* @__PURE__ */ e(
1484
- Rt,
1484
+ Vt,
1485
1485
  {
1486
- events: c,
1487
- year: b.getFullYear(),
1488
- onMonthClick: d,
1486
+ events: u,
1487
+ year: w.getFullYear(),
1488
+ onMonthClick: c,
1489
1489
  onDayClick: x,
1490
1490
  ...l && { slots: l },
1491
- ...u && { classNames: u }
1491
+ ...d && { classNames: d }
1492
1492
  }
1493
1493
  );
1494
1494
  case "agenda":
1495
1495
  return /* @__PURE__ */ e(
1496
1496
  nt,
1497
1497
  {
1498
- events: c,
1499
- date: b,
1500
- onEventClick: w,
1501
- renderPopover: z,
1498
+ events: u,
1499
+ date: w,
1500
+ onEventClick: E,
1501
+ renderPopover: T,
1502
1502
  ...l && { slots: l },
1503
- ...u && { classNames: u }
1503
+ ...d && { classNames: d }
1504
1504
  }
1505
1505
  );
1506
1506
  // Timeline views
1507
1507
  case "timeline-day":
1508
1508
  return /* @__PURE__ */ e(
1509
- xe,
1509
+ pe,
1510
1510
  {
1511
1511
  daysToShow: 1,
1512
- events: c,
1513
- users: T,
1514
- selectedDate: b,
1512
+ events: u,
1513
+ users: H,
1514
+ selectedDate: w,
1515
1515
  visibleHours: {
1516
- from: j.startHour,
1517
- to: j.endHour
1516
+ from: W.startHour,
1517
+ to: W.endHour
1518
1518
  },
1519
- onEventClick: w,
1520
- renderPopover: z,
1519
+ onEventClick: E,
1520
+ renderPopover: T,
1521
1521
  ...l && { slots: l },
1522
- ...u && { classNames: u }
1522
+ ...d && { classNames: d }
1523
1523
  }
1524
1524
  );
1525
1525
  case "timeline-3day":
1526
1526
  return /* @__PURE__ */ e(
1527
- xe,
1527
+ pe,
1528
1528
  {
1529
1529
  daysToShow: 3,
1530
- events: c,
1531
- users: T,
1532
- selectedDate: b,
1530
+ events: u,
1531
+ users: H,
1532
+ selectedDate: w,
1533
1533
  visibleHours: {
1534
- from: j.startHour,
1535
- to: j.endHour
1534
+ from: W.startHour,
1535
+ to: W.endHour
1536
1536
  },
1537
- onEventClick: w,
1538
- renderPopover: z,
1537
+ onEventClick: E,
1538
+ renderPopover: T,
1539
1539
  ...l && { slots: l },
1540
- ...u && { classNames: u }
1540
+ ...d && { classNames: d }
1541
1541
  }
1542
1542
  );
1543
1543
  case "timeline-week":
1544
1544
  return /* @__PURE__ */ e(
1545
- xe,
1545
+ pe,
1546
1546
  {
1547
1547
  daysToShow: 7,
1548
- events: c,
1549
- users: T,
1550
- selectedDate: b,
1548
+ events: u,
1549
+ users: H,
1550
+ selectedDate: w,
1551
1551
  visibleHours: {
1552
- from: j.startHour,
1553
- to: j.endHour
1552
+ from: W.startHour,
1553
+ to: W.endHour
1554
1554
  },
1555
- onEventClick: w,
1556
- renderPopover: z,
1555
+ onEventClick: E,
1556
+ renderPopover: T,
1557
1557
  ...l && { slots: l },
1558
- ...u && { classNames: u }
1558
+ ...d && { classNames: d }
1559
1559
  }
1560
1560
  );
1561
1561
  default:
1562
1562
  return /* @__PURE__ */ e(
1563
1563
  Ce,
1564
1564
  {
1565
- events: c,
1566
- date: b,
1567
- badgeVariant: A,
1568
- onEventClick: w,
1565
+ events: u,
1566
+ date: w,
1567
+ badgeVariant: _,
1568
+ onEventClick: E,
1569
1569
  onDayClick: x,
1570
1570
  ...l && { slots: l },
1571
- ...u && { classNames: u }
1571
+ ...d && { classNames: d }
1572
1572
  }
1573
1573
  );
1574
1574
  }
1575
- };
1575
+ }, k = Fe(null), [D, $] = re(!1);
1576
+ me(() => {
1577
+ const u = k.current;
1578
+ if (!u) return;
1579
+ const E = () => {
1580
+ const { scrollLeft: F, scrollWidth: ae, clientWidth: ie } = u;
1581
+ $(F + ie < ae - 2);
1582
+ };
1583
+ E(), u.addEventListener("scroll", E, { passive: !0 });
1584
+ const T = new ResizeObserver(E);
1585
+ T.observe(u);
1586
+ for (const F of Array.from(u.children))
1587
+ T.observe(F);
1588
+ return () => {
1589
+ u.removeEventListener("scroll", E), T.disconnect();
1590
+ };
1591
+ }, [v]);
1592
+ const j = ee(() => {
1593
+ k.current?.scrollBy({ left: 250, behavior: "smooth" });
1594
+ }, []);
1576
1595
  return /* @__PURE__ */ e(
1577
1596
  lt,
1578
1597
  {
1579
- mode: F,
1580
- onSelect: O,
1598
+ mode: V,
1599
+ onSelect: U,
1581
1600
  minDurationMinutes: g,
1582
- slotDurationMinutes: D,
1601
+ slotDurationMinutes: M,
1583
1602
  enabled: !!(s || r),
1584
- children: /* @__PURE__ */ n("div", { className: h("flex flex-col h-full p-4", u?.root, o), children: [
1603
+ children: /* @__PURE__ */ n("div", { className: h("inno-calendar-root flex flex-col h-full p-4", d?.root, a), children: [
1585
1604
  i && /* @__PURE__ */ e(
1586
1605
  rt,
1587
1606
  {
1588
- currentDate: b,
1607
+ currentDate: w,
1589
1608
  view: v,
1590
1609
  events: S,
1591
- onViewChange: y,
1592
- onNavigateToday: () => k(/* @__PURE__ */ new Date(), v),
1610
+ onViewChange: b,
1611
+ onNavigateToday: () => y(/* @__PURE__ */ new Date(), v),
1593
1612
  onNavigatePrev: () => {
1594
- const c = new Date(b);
1595
- v === "day" || v === "timeline-day" ? c.setDate(c.getDate() - 1) : v === "timeline-3day" ? c.setDate(c.getDate() - 3) : v === "week" || v === "timeline-week" ? c.setDate(c.getDate() - 7) : v === "month" ? c.setMonth(c.getMonth() - 1) : v === "year" ? c.setFullYear(c.getFullYear() - 1) : c.setDate(c.getDate() - 7), k(c, v);
1613
+ const u = new Date(w);
1614
+ v === "day" || v === "timeline-day" ? u.setDate(u.getDate() - 1) : v === "timeline-3day" ? u.setDate(u.getDate() - 3) : v === "week" || v === "timeline-week" ? u.setDate(u.getDate() - 7) : v === "month" ? u.setMonth(u.getMonth() - 1) : v === "year" ? u.setFullYear(u.getFullYear() - 1) : u.setDate(u.getDate() - 7), y(u, v);
1596
1615
  },
1597
1616
  onNavigateNext: () => {
1598
- const c = new Date(b);
1599
- v === "day" || v === "timeline-day" ? c.setDate(c.getDate() + 1) : v === "timeline-3day" ? c.setDate(c.getDate() + 3) : v === "week" || v === "timeline-week" ? c.setDate(c.getDate() + 7) : v === "month" ? c.setMonth(c.getMonth() + 1) : v === "year" ? c.setFullYear(c.getFullYear() + 1) : c.setDate(c.getDate() + 7), k(c, v);
1617
+ const u = new Date(w);
1618
+ v === "day" || v === "timeline-day" ? u.setDate(u.getDate() + 1) : v === "timeline-3day" ? u.setDate(u.getDate() + 3) : v === "week" || v === "timeline-week" ? u.setDate(u.getDate() + 7) : v === "month" ? u.setMonth(u.getMonth() + 1) : v === "year" ? u.setFullYear(u.getFullYear() + 1) : u.setDate(u.getDate() + 7), y(u, v);
1600
1619
  },
1601
1620
  availableViews: [
1602
1621
  "day",
@@ -1606,73 +1625,100 @@ function Yt({
1606
1625
  "agenda"
1607
1626
  ],
1608
1627
  showTimelineViews: !0,
1609
- showSettings: !!M,
1610
- ...!C && a && { onAddEvent: a },
1628
+ showSettings: !!z,
1629
+ ...!C && o && { onAddEvent: o },
1611
1630
  actions: C,
1612
- settingsContent: M,
1631
+ settingsContent: z,
1613
1632
  filterContent: N
1614
1633
  }
1615
1634
  ),
1616
- /* @__PURE__ */ e(
1617
- "div",
1618
- {
1619
- className: h(
1620
- "flex-1 border rounded-lg bg-white overflow-x-auto",
1621
- u?.viewContainer
1622
- ),
1623
- children: p()
1624
- }
1625
- )
1635
+ /* @__PURE__ */ n("div", { className: "relative flex-1 min-h-0", children: [
1636
+ /* @__PURE__ */ e(
1637
+ "div",
1638
+ {
1639
+ ref: k,
1640
+ className: h(
1641
+ "h-full border rounded-lg bg-white overflow-x-auto",
1642
+ d?.viewContainer
1643
+ ),
1644
+ children: p()
1645
+ }
1646
+ ),
1647
+ D && /* @__PURE__ */ e(
1648
+ "button",
1649
+ {
1650
+ type: "button",
1651
+ onClick: j,
1652
+ className: "inno-scroll-right-btn",
1653
+ "aria-label": "Scroll right",
1654
+ children: /* @__PURE__ */ e(
1655
+ "svg",
1656
+ {
1657
+ xmlns: "http://www.w3.org/2000/svg",
1658
+ width: "16",
1659
+ height: "16",
1660
+ viewBox: "0 0 24 24",
1661
+ fill: "none",
1662
+ stroke: "currentColor",
1663
+ strokeWidth: "2",
1664
+ strokeLinecap: "round",
1665
+ strokeLinejoin: "round",
1666
+ children: /* @__PURE__ */ e("path", { d: "m9 18 6-6-6-6" })
1667
+ }
1668
+ )
1669
+ }
1670
+ )
1671
+ ] })
1626
1672
  ] })
1627
1673
  }
1628
1674
  );
1629
1675
  }
1630
- function Vr({
1676
+ function Rr({
1631
1677
  events: t,
1632
1678
  users: r = [],
1633
1679
  scheduleTypes: s = [],
1634
- initialView: a = "week",
1635
- initialDate: o,
1680
+ initialView: o = "week",
1681
+ initialDate: a,
1636
1682
  initialSelectedUserId: i,
1637
1683
  initialScheduleTypeIds: g,
1638
1684
  initialParticipantIds: f,
1639
1685
  initialWorkingHoursView: l,
1640
- initialSearchQuery: u,
1641
- preferencesConfig: M,
1686
+ initialSearchQuery: d,
1687
+ preferencesConfig: z,
1642
1688
  onEventClick: N,
1643
1689
  onSlotClick: C,
1644
1690
  onSlotSelect: L,
1645
1691
  onAddEvent: v,
1646
- onEventDrop: y,
1647
- onDateChange: b,
1648
- onViewChange: k,
1649
- className: D,
1692
+ onEventDrop: b,
1693
+ onDateChange: w,
1694
+ onViewChange: y,
1695
+ className: M,
1650
1696
  showHeader: S = !0,
1651
- minSelectionMinutes: T = 30,
1652
- showMoreEventsInPopover: B = !1,
1653
- renderPopover: H,
1654
- slots: A,
1655
- classNames: $,
1656
- settingsContent: j,
1657
- filterContent: I,
1658
- headerActions: F
1697
+ minSelectionMinutes: H = 30,
1698
+ showMoreEventsInPopover: O = !1,
1699
+ renderPopover: I,
1700
+ slots: _,
1701
+ classNames: P,
1702
+ settingsContent: W,
1703
+ filterContent: A,
1704
+ headerActions: V
1659
1705
  }) {
1660
- return /* @__PURE__ */ e(it, { ...y && { onEventDrop: y }, children: /* @__PURE__ */ e(
1661
- Je,
1706
+ return /* @__PURE__ */ e(it, { ...b && { onEventDrop: b }, children: /* @__PURE__ */ e(
1707
+ Xe,
1662
1708
  {
1663
1709
  initialEvents: t,
1664
1710
  initialUsers: r,
1665
1711
  initialScheduleTypes: s,
1666
- initialView: a,
1667
- ...o && { initialDate: o },
1712
+ initialView: o,
1713
+ ...a && { initialDate: a },
1668
1714
  ...i && { initialSelectedUserId: i },
1669
1715
  ...g && { initialScheduleTypeIds: g },
1670
1716
  ...f && { initialParticipantIds: f },
1671
1717
  ...l && { initialWorkingHoursView: l },
1672
- ...u && { initialSearchQuery: u },
1673
- ...M && { preferencesConfig: M },
1674
- ...b && { onDateChange: b },
1675
- ...k && { onViewChange: k },
1718
+ ...d && { initialSearchQuery: d },
1719
+ ...z && { preferencesConfig: z },
1720
+ ...w && { onDateChange: w },
1721
+ ...y && { onViewChange: y },
1676
1722
  children: /* @__PURE__ */ e(
1677
1723
  Yt,
1678
1724
  {
@@ -1680,26 +1726,26 @@ function Vr({
1680
1726
  ...C && { onSlotClick: C },
1681
1727
  ...L && { onSlotSelect: L },
1682
1728
  ...v && { onAddEvent: v },
1683
- ...H && { renderPopover: H },
1684
- className: D,
1729
+ ...I && { renderPopover: I },
1730
+ className: M,
1685
1731
  showHeader: S,
1686
- minSelectionMinutes: T,
1687
- showMoreEventsInPopover: B,
1688
- ...A && { slots: A },
1689
- ...$ && { classNames: $ },
1690
- settingsContent: j,
1691
- filterContent: I,
1692
- headerActions: F
1732
+ minSelectionMinutes: H,
1733
+ showMoreEventsInPopover: O,
1734
+ ..._ && { slots: _ },
1735
+ ...P && { classNames: P },
1736
+ settingsContent: W,
1737
+ filterContent: A,
1738
+ headerActions: V
1693
1739
  }
1694
1740
  )
1695
1741
  }
1696
1742
  ) });
1697
1743
  }
1698
- const J = ye(
1699
- ({ className: t, children: r, ...s }, a) => /* @__PURE__ */ e(
1744
+ const Q = ye(
1745
+ ({ className: t, children: r, ...s }, o) => /* @__PURE__ */ e(
1700
1746
  "select",
1701
1747
  {
1702
- ref: a,
1748
+ ref: o,
1703
1749
  className: h(
1704
1750
  "flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm",
1705
1751
  "ring-offset-background",
@@ -1713,8 +1759,8 @@ const J = ye(
1713
1759
  }
1714
1760
  )
1715
1761
  );
1716
- J.displayName = "Select";
1717
- const R = ye(({ className: t, ...r }, s) => /* @__PURE__ */ e(
1762
+ Q.displayName = "Select";
1763
+ const Y = ye(({ className: t, ...r }, s) => /* @__PURE__ */ e(
1718
1764
  "label",
1719
1765
  {
1720
1766
  ref: s,
@@ -1725,7 +1771,7 @@ const R = ye(({ className: t, ...r }, s) => /* @__PURE__ */ e(
1725
1771
  ...r
1726
1772
  }
1727
1773
  ));
1728
- R.displayName = "Label";
1774
+ Y.displayName = "Label";
1729
1775
  function Gt({ className: t }) {
1730
1776
  return /* @__PURE__ */ n(
1731
1777
  "svg",
@@ -1774,34 +1820,34 @@ const Jt = [
1774
1820
  { value: 30, label: "30 minutes" },
1775
1821
  { value: 60, label: "1 hour" }
1776
1822
  ];
1777
- function Rr({
1823
+ function Vr({
1778
1824
  value: t,
1779
1825
  onChange: r,
1780
1826
  isLocked: s = !1,
1781
- className: a,
1782
- labels: o = {}
1827
+ className: o,
1828
+ labels: a = {}
1783
1829
  }) {
1784
1830
  const i = {
1785
1831
  title: "Slot duration",
1786
1832
  lockedMessage: "This setting is locked by the administrator",
1787
1833
  infoMessage: "Set the time slot duration for day and week calendar views.",
1788
- ...o
1834
+ ...a
1789
1835
  }, g = (f) => {
1790
1836
  s || r(Number(f.target.value));
1791
1837
  };
1792
- return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-3", a), children: [
1838
+ return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-3", o), children: [
1793
1839
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1794
- /* @__PURE__ */ e(R, { className: "text-sm font-semibold", children: i.title }),
1795
- s ? /* @__PURE__ */ e(U, { delayDuration: 100, children: /* @__PURE__ */ n(Y, { children: [
1796
- /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(Kt, { className: "size-3 text-muted-foreground" }) }),
1797
- /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
1798
- ] }) }) : /* @__PURE__ */ e(U, { delayDuration: 100, children: /* @__PURE__ */ n(Y, { children: [
1799
- /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(Gt, { className: "size-3 text-muted-foreground" }) }),
1800
- /* @__PURE__ */ e(K, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
1840
+ /* @__PURE__ */ e(Y, { className: "text-sm font-semibold", children: i.title }),
1841
+ s ? /* @__PURE__ */ e(G, { delayDuration: 100, children: /* @__PURE__ */ n(K, { children: [
1842
+ /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(Kt, { className: "size-3 text-muted-foreground" }) }),
1843
+ /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
1844
+ ] }) }) : /* @__PURE__ */ e(G, { delayDuration: 100, children: /* @__PURE__ */ n(K, { children: [
1845
+ /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(Gt, { className: "size-3 text-muted-foreground" }) }),
1846
+ /* @__PURE__ */ e(X, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
1801
1847
  ] }) })
1802
1848
  ] }),
1803
1849
  /* @__PURE__ */ e(
1804
- J,
1850
+ Q,
1805
1851
  {
1806
1852
  value: t.toString(),
1807
1853
  onChange: g,
@@ -1864,8 +1910,8 @@ function Ur({
1864
1910
  value: t,
1865
1911
  onChange: r,
1866
1912
  isLocked: s = !1,
1867
- className: a,
1868
- labels: o = {}
1913
+ className: o,
1914
+ labels: a = {}
1869
1915
  }) {
1870
1916
  const i = {
1871
1917
  title: "Event display",
@@ -1876,23 +1922,23 @@ function Ur({
1876
1922
  colored: "Full color",
1877
1923
  mixed: "Mixed"
1878
1924
  },
1879
- ...o
1925
+ ...a
1880
1926
  }, g = (l) => i.options?.[l] ?? l, f = (l) => {
1881
1927
  s || r(l.target.value);
1882
1928
  };
1883
- return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-3", a), children: [
1929
+ return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-3", o), children: [
1884
1930
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1885
- /* @__PURE__ */ e(R, { className: "text-sm font-semibold", children: i.title }),
1886
- s ? /* @__PURE__ */ e(U, { delayDuration: 100, children: /* @__PURE__ */ n(Y, { children: [
1887
- /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(Qt, { className: "size-3 text-muted-foreground" }) }),
1888
- /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
1889
- ] }) }) : /* @__PURE__ */ e(U, { delayDuration: 100, children: /* @__PURE__ */ n(Y, { children: [
1890
- /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(Xt, { className: "size-3 text-muted-foreground" }) }),
1891
- /* @__PURE__ */ e(K, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
1931
+ /* @__PURE__ */ e(Y, { className: "text-sm font-semibold", children: i.title }),
1932
+ s ? /* @__PURE__ */ e(G, { delayDuration: 100, children: /* @__PURE__ */ n(K, { children: [
1933
+ /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(Qt, { className: "size-3 text-muted-foreground" }) }),
1934
+ /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
1935
+ ] }) }) : /* @__PURE__ */ e(G, { delayDuration: 100, children: /* @__PURE__ */ n(K, { children: [
1936
+ /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(Xt, { className: "size-3 text-muted-foreground" }) }),
1937
+ /* @__PURE__ */ e(X, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
1892
1938
  ] }) })
1893
1939
  ] }),
1894
1940
  /* @__PURE__ */ e(
1895
- J,
1941
+ Q,
1896
1942
  {
1897
1943
  value: t,
1898
1944
  onChange: f,
@@ -1956,8 +2002,8 @@ function Yr({
1956
2002
  value: t,
1957
2003
  onChange: r,
1958
2004
  isLocked: s = !1,
1959
- className: a,
1960
- labels: o = {}
2005
+ className: o,
2006
+ labels: a = {}
1961
2007
  }) {
1962
2008
  const i = {
1963
2009
  title: "Visible hours",
@@ -1965,67 +2011,67 @@ function Yr({
1965
2011
  to: "To",
1966
2012
  lockedMessage: "This setting is locked by the administrator",
1967
2013
  infoMessage: "Set the visible hour range for day and week views. Hours outside this range will be hidden.",
1968
- ...o
1969
- }, g = tr(), f = (u) => {
2014
+ ...a
2015
+ }, g = tr(), f = (d) => {
1970
2016
  if (s) return;
1971
- const M = Number(u.target.value);
1972
- M < t.endHour && r({ ...t, startHour: M });
1973
- }, l = (u) => {
2017
+ const z = Number(d.target.value);
2018
+ z < t.endHour && r({ ...t, startHour: z });
2019
+ }, l = (d) => {
1974
2020
  if (s) return;
1975
- const M = Number(u.target.value);
1976
- M > t.startHour && r({ ...t, endHour: M });
2021
+ const z = Number(d.target.value);
2022
+ z > t.startHour && r({ ...t, endHour: z });
1977
2023
  };
1978
- return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-3", a), children: [
2024
+ return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-3", o), children: [
1979
2025
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1980
- /* @__PURE__ */ e(R, { className: "text-sm font-semibold", children: i.title }),
1981
- s ? /* @__PURE__ */ e(U, { delayDuration: 100, children: /* @__PURE__ */ n(Y, { children: [
1982
- /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(er, { className: "size-3 text-muted-foreground" }) }),
1983
- /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
1984
- ] }) }) : /* @__PURE__ */ e(U, { delayDuration: 100, children: /* @__PURE__ */ n(Y, { children: [
1985
- /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(qt, { className: "size-3 text-muted-foreground" }) }),
1986
- /* @__PURE__ */ e(K, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
2026
+ /* @__PURE__ */ e(Y, { className: "text-sm font-semibold", children: i.title }),
2027
+ s ? /* @__PURE__ */ e(G, { delayDuration: 100, children: /* @__PURE__ */ n(K, { children: [
2028
+ /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(er, { className: "size-3 text-muted-foreground" }) }),
2029
+ /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
2030
+ ] }) }) : /* @__PURE__ */ e(G, { delayDuration: 100, children: /* @__PURE__ */ n(K, { children: [
2031
+ /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(qt, { className: "size-3 text-muted-foreground" }) }),
2032
+ /* @__PURE__ */ e(X, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
1987
2033
  ] }) })
1988
2034
  ] }),
1989
2035
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1990
2036
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
1991
- /* @__PURE__ */ e(R, { className: "text-xs text-muted-foreground", children: i.from }),
2037
+ /* @__PURE__ */ e(Y, { className: "text-xs text-muted-foreground", children: i.from }),
1992
2038
  /* @__PURE__ */ e(
1993
- J,
2039
+ Q,
1994
2040
  {
1995
2041
  value: t.startHour.toString(),
1996
2042
  onChange: f,
1997
2043
  disabled: s,
1998
2044
  className: "h-9 w-[88px] text-sm",
1999
- children: g.map((u) => /* @__PURE__ */ e(
2045
+ children: g.map((d) => /* @__PURE__ */ e(
2000
2046
  "option",
2001
2047
  {
2002
- value: u.value.toString(),
2003
- disabled: u.value >= t.endHour,
2004
- children: u.label
2048
+ value: d.value.toString(),
2049
+ disabled: d.value >= t.endHour,
2050
+ children: d.label
2005
2051
  },
2006
- u.value
2052
+ d.value
2007
2053
  ))
2008
2054
  }
2009
2055
  )
2010
2056
  ] }),
2011
2057
  /* @__PURE__ */ e("span", { className: "mt-5 text-muted-foreground", children: "—" }),
2012
2058
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
2013
- /* @__PURE__ */ e(R, { className: "text-xs text-muted-foreground", children: i.to }),
2059
+ /* @__PURE__ */ e(Y, { className: "text-xs text-muted-foreground", children: i.to }),
2014
2060
  /* @__PURE__ */ e(
2015
- J,
2061
+ Q,
2016
2062
  {
2017
2063
  value: t.endHour.toString(),
2018
2064
  onChange: l,
2019
2065
  disabled: s,
2020
2066
  className: "h-9 w-[88px] text-sm",
2021
- children: g.map((u) => /* @__PURE__ */ e(
2067
+ children: g.map((d) => /* @__PURE__ */ e(
2022
2068
  "option",
2023
2069
  {
2024
- value: u.value.toString(),
2025
- disabled: u.value <= t.startHour,
2026
- children: u.label
2070
+ value: d.value.toString(),
2071
+ disabled: d.value <= t.startHour,
2072
+ children: d.label
2027
2073
  },
2028
- u.value
2074
+ d.value
2029
2075
  ))
2030
2076
  }
2031
2077
  )
@@ -2094,7 +2140,7 @@ function sr({ className: t }) {
2094
2140
  }
2095
2141
  );
2096
2142
  }
2097
- const ar = [
2143
+ const or = [
2098
2144
  "monday",
2099
2145
  "tuesday",
2100
2146
  "wednesday",
@@ -2103,7 +2149,7 @@ const ar = [
2103
2149
  "saturday",
2104
2150
  "sunday"
2105
2151
  ];
2106
- function or() {
2152
+ function ar() {
2107
2153
  return Array.from({ length: 25 }, (t, r) => ({
2108
2154
  value: r,
2109
2155
  label: `${String(r).padStart(2, "0")}:00`
@@ -2118,17 +2164,17 @@ const Ie = {
2118
2164
  friday: "Fri",
2119
2165
  saturday: "Sat"
2120
2166
  };
2121
- function ir({ dayLabel: t, config: r, onChange: s, disabled: a, hourOptions: o }) {
2167
+ function ir({ dayLabel: t, config: r, onChange: s, disabled: o, hourOptions: a }) {
2122
2168
  const i = () => {
2123
- a || s({ ...r, enabled: !r.enabled });
2169
+ o || s({ ...r, enabled: !r.enabled });
2124
2170
  }, g = (l) => {
2125
- if (a) return;
2126
- const u = Number(l.target.value);
2127
- u < r.to && s({ ...r, from: u });
2171
+ if (o) return;
2172
+ const d = Number(l.target.value);
2173
+ d < r.to && s({ ...r, from: d });
2128
2174
  }, f = (l) => {
2129
- if (a) return;
2130
- const u = Number(l.target.value);
2131
- u > r.from && s({ ...r, to: u });
2175
+ if (o) return;
2176
+ const d = Number(l.target.value);
2177
+ d > r.from && s({ ...r, to: d });
2132
2178
  };
2133
2179
  return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
2134
2180
  /* @__PURE__ */ e(
@@ -2139,35 +2185,35 @@ function ir({ dayLabel: t, config: r, onChange: s, disabled: a, hourOptions: o }
2139
2185
  "aria-checked": r.enabled,
2140
2186
  "aria-label": `Enable ${t}`,
2141
2187
  onClick: i,
2142
- disabled: a,
2188
+ disabled: o,
2143
2189
  className: h(
2144
2190
  "flex size-5 shrink-0 items-center justify-center rounded border transition-colors",
2145
2191
  r.enabled ? "border-primary bg-primary text-primary-foreground" : "border-input bg-background",
2146
- a && "cursor-not-allowed opacity-50"
2192
+ o && "cursor-not-allowed opacity-50"
2147
2193
  ),
2148
2194
  children: r.enabled && /* @__PURE__ */ e(sr, { className: "size-3" })
2149
2195
  }
2150
2196
  ),
2151
2197
  /* @__PURE__ */ e("span", { className: h("w-10 text-sm", !r.enabled && "text-muted-foreground"), children: t }),
2152
2198
  /* @__PURE__ */ e(
2153
- J,
2199
+ Q,
2154
2200
  {
2155
2201
  value: r.from.toString(),
2156
2202
  onChange: g,
2157
- disabled: a || !r.enabled,
2203
+ disabled: o || !r.enabled,
2158
2204
  className: "h-8 w-[76px] text-xs",
2159
- children: o.map((l) => /* @__PURE__ */ e("option", { value: l.value.toString(), disabled: l.value >= r.to, children: l.label }, l.value))
2205
+ children: a.map((l) => /* @__PURE__ */ e("option", { value: l.value.toString(), disabled: l.value >= r.to, children: l.label }, l.value))
2160
2206
  }
2161
2207
  ),
2162
2208
  /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: "—" }),
2163
2209
  /* @__PURE__ */ e(
2164
- J,
2210
+ Q,
2165
2211
  {
2166
2212
  value: r.to.toString(),
2167
2213
  onChange: f,
2168
- disabled: a || !r.enabled,
2214
+ disabled: o || !r.enabled,
2169
2215
  className: "h-8 w-[76px] text-xs",
2170
- children: o.map((l) => /* @__PURE__ */ e("option", { value: l.value.toString(), disabled: l.value <= r.from, children: l.label }, l.value))
2216
+ children: a.map((l) => /* @__PURE__ */ e("option", { value: l.value.toString(), disabled: l.value <= r.from, children: l.label }, l.value))
2171
2217
  }
2172
2218
  )
2173
2219
  ] });
@@ -2176,35 +2222,35 @@ function Gr({
2176
2222
  value: t,
2177
2223
  onChange: r,
2178
2224
  isLocked: s = !1,
2179
- className: a,
2180
- labels: o = {}
2225
+ className: o,
2226
+ labels: a = {}
2181
2227
  }) {
2182
2228
  const i = {
2183
2229
  title: "Working hours",
2184
2230
  lockedMessage: "This setting is locked by the administrator",
2185
2231
  infoMessage: "Configure working hours for each day of the week. Non-working hours will be grayed out in day and week views.",
2186
2232
  days: Ie,
2187
- ...o
2188
- }, g = or(), f = (l, u) => {
2189
- s || r({ ...t, [l]: u });
2233
+ ...a
2234
+ }, g = ar(), f = (l, d) => {
2235
+ s || r({ ...t, [l]: d });
2190
2236
  };
2191
- return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-3", a), children: [
2237
+ return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-3", o), children: [
2192
2238
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
2193
- /* @__PURE__ */ e(R, { className: "text-sm font-semibold", children: i.title }),
2194
- s ? /* @__PURE__ */ e(U, { delayDuration: 100, children: /* @__PURE__ */ n(Y, { children: [
2195
- /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(nr, { className: "size-3 text-muted-foreground" }) }),
2196
- /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
2197
- ] }) }) : /* @__PURE__ */ e(U, { delayDuration: 100, children: /* @__PURE__ */ n(Y, { children: [
2198
- /* @__PURE__ */ e(G, { children: /* @__PURE__ */ e(rr, { className: "size-3 text-muted-foreground" }) }),
2199
- /* @__PURE__ */ e(K, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
2239
+ /* @__PURE__ */ e(Y, { className: "text-sm font-semibold", children: i.title }),
2240
+ s ? /* @__PURE__ */ e(G, { delayDuration: 100, children: /* @__PURE__ */ n(K, { children: [
2241
+ /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(nr, { className: "size-3 text-muted-foreground" }) }),
2242
+ /* @__PURE__ */ e(X, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
2243
+ ] }) }) : /* @__PURE__ */ e(G, { delayDuration: 100, children: /* @__PURE__ */ n(K, { children: [
2244
+ /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(rr, { className: "size-3 text-muted-foreground" }) }),
2245
+ /* @__PURE__ */ e(X, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
2200
2246
  ] }) })
2201
2247
  ] }),
2202
- /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: ar.map((l) => /* @__PURE__ */ e(
2248
+ /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: or.map((l) => /* @__PURE__ */ e(
2203
2249
  ir,
2204
2250
  {
2205
2251
  dayLabel: i.days?.[l] ?? Ie[l],
2206
2252
  config: t[l],
2207
- onChange: (u) => f(l, u),
2253
+ onChange: (d) => f(l, d),
2208
2254
  disabled: s,
2209
2255
  hourOptions: g
2210
2256
  },
@@ -2221,7 +2267,7 @@ const Kr = {
2221
2267
  friday: { enabled: !0, from: 8, to: 18 },
2222
2268
  saturday: { enabled: !1, from: 8, to: 18 }
2223
2269
  };
2224
- function pe({ className: t }) {
2270
+ function ve({ className: t }) {
2225
2271
  return /* @__PURE__ */ e(
2226
2272
  "svg",
2227
2273
  {
@@ -2256,7 +2302,7 @@ function lr({ className: t }) {
2256
2302
  }
2257
2303
  );
2258
2304
  }
2259
- function dr({ className: t }) {
2305
+ function cr({ className: t }) {
2260
2306
  return /* @__PURE__ */ n(
2261
2307
  "svg",
2262
2308
  {
@@ -2275,7 +2321,7 @@ function dr({ className: t }) {
2275
2321
  }
2276
2322
  );
2277
2323
  }
2278
- function ve({ checked: t, onCheckedChange: r, className: s, children: a }) {
2324
+ function we({ checked: t, onCheckedChange: r, className: s, children: o }) {
2279
2325
  return /* @__PURE__ */ e(
2280
2326
  "button",
2281
2327
  {
@@ -2284,18 +2330,18 @@ function ve({ checked: t, onCheckedChange: r, className: s, children: a }) {
2284
2330
  "aria-checked": t,
2285
2331
  onClick: () => r(!t),
2286
2332
  className: s,
2287
- children: a
2333
+ children: o
2288
2334
  }
2289
2335
  );
2290
2336
  }
2291
- function cr({ src: t, alt: r, fallback: s, className: a }) {
2292
- const [o, i] = ae(!1);
2293
- return !t || o ? /* @__PURE__ */ e(
2337
+ function dr({ src: t, alt: r, fallback: s, className: o }) {
2338
+ const [a, i] = re(!1);
2339
+ return !t || a ? /* @__PURE__ */ e(
2294
2340
  "div",
2295
2341
  {
2296
2342
  className: h(
2297
2343
  "flex items-center justify-center bg-zinc-200 text-zinc-600 font-medium text-sm",
2298
- a
2344
+ o
2299
2345
  ),
2300
2346
  children: s || "?"
2301
2347
  }
@@ -2304,30 +2350,30 @@ function cr({ src: t, alt: r, fallback: s, className: a }) {
2304
2350
  {
2305
2351
  src: t,
2306
2352
  alt: r || "",
2307
- className: h("object-cover", a),
2353
+ className: h("object-cover", o),
2308
2354
  onError: () => i(!0)
2309
2355
  }
2310
2356
  );
2311
2357
  }
2312
- function We({ value: t, onChange: r, placeholder: s, className: a }) {
2313
- return /* @__PURE__ */ n("div", { className: h("relative", a), children: [
2358
+ function We({ value: t, onChange: r, placeholder: s, className: o }) {
2359
+ return /* @__PURE__ */ n("div", { className: h("relative", o), children: [
2314
2360
  /* @__PURE__ */ e(lr, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
2315
2361
  /* @__PURE__ */ e(
2316
2362
  "input",
2317
2363
  {
2318
2364
  type: "text",
2319
2365
  value: t,
2320
- onChange: (o) => r(o.target.value),
2366
+ onChange: (a) => r(a.target.value),
2321
2367
  placeholder: s,
2322
2368
  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"
2323
2369
  }
2324
2370
  )
2325
2371
  ] });
2326
2372
  }
2327
- function Ae(t, r, s, a = 0.3) {
2373
+ function Ae(t, r, s, o = 0.3) {
2328
2374
  if (!r.trim()) return t;
2329
- const o = r.toLowerCase();
2330
- return t.filter((i) => s(i).some((f) => f ? f.toLowerCase().includes(o) : !1));
2375
+ const a = r.toLowerCase();
2376
+ return t.filter((i) => s(i).some((f) => f ? f.toLowerCase().includes(a) : !1));
2331
2377
  }
2332
2378
  const ur = {
2333
2379
  title: "Filters",
@@ -2346,47 +2392,47 @@ function Jr({
2346
2392
  scheduleTypes: t,
2347
2393
  users: r,
2348
2394
  selectedScheduleTypeIds: s,
2349
- onScheduleTypeChange: a,
2350
- selectedUserIds: o,
2395
+ onScheduleTypeChange: o,
2396
+ selectedUserIds: a,
2351
2397
  onUserChange: i,
2352
2398
  onClearAll: g,
2353
2399
  className: f,
2354
2400
  scheduleTypesLoading: l = !1,
2355
- usersLoading: u = !1,
2356
- labels: M,
2401
+ usersLoading: d = !1,
2402
+ labels: z,
2357
2403
  getScheduleTypeName: N
2358
2404
  }) {
2359
- const C = { ...ur, ...M }, [L, v] = ae(""), [y, b] = ae(""), k = W(() => L.trim() ? Ae(t, L, (x) => [
2405
+ const C = { ...ur, ...z }, [L, v] = re(""), [b, w] = re(""), y = B(() => L.trim() ? Ae(t, L, (x) => [
2360
2406
  x.name,
2361
2407
  N?.(x) || x.name
2362
- ]) : t, [t, L, N]), D = W(() => y.trim() ? Ae(r, y, (x) => [x.name, x.email || ""]) : r, [r, y]), S = k.length > 0 && k.every((x) => s.includes(x.id)), T = D.length > 0 && D.every((x) => o.includes(x.id)), B = s.length + o.length, H = (x, d) => {
2363
- const m = d ? [...s, x] : s.filter((p) => p !== x);
2364
- a(m);
2365
- }, A = () => {
2408
+ ]) : t, [t, L, N]), M = B(() => b.trim() ? Ae(r, b, (x) => [x.name, x.email || ""]) : r, [r, b]), S = y.length > 0 && y.every((x) => s.includes(x.id)), H = M.length > 0 && M.every((x) => a.includes(x.id)), O = s.length + a.length, I = (x, c) => {
2409
+ const m = c ? [...s, x] : s.filter((p) => p !== x);
2410
+ o(m);
2411
+ }, _ = () => {
2366
2412
  if (S) {
2367
- const x = new Set(k.map((d) => d.id));
2368
- a(s.filter((d) => !x.has(d)));
2413
+ const x = new Set(y.map((c) => c.id));
2414
+ o(s.filter((c) => !x.has(c)));
2369
2415
  } else {
2370
2416
  const x = /* @__PURE__ */ new Set([
2371
2417
  ...s,
2372
- ...k.map((d) => d.id)
2418
+ ...y.map((c) => c.id)
2373
2419
  ]);
2374
- a(Array.from(x));
2420
+ o(Array.from(x));
2375
2421
  }
2376
- }, $ = (x, d) => {
2377
- const m = d ? [...o, x] : o.filter((p) => p !== x);
2422
+ }, P = (x, c) => {
2423
+ const m = c ? [...a, x] : a.filter((p) => p !== x);
2378
2424
  i(m);
2379
- }, j = () => {
2380
- if (T) {
2381
- const x = new Set(D.map((d) => d.id));
2382
- i(o.filter((d) => !x.has(d)));
2425
+ }, W = () => {
2426
+ if (H) {
2427
+ const x = new Set(M.map((c) => c.id));
2428
+ i(a.filter((c) => !x.has(c)));
2383
2429
  } else {
2384
- const x = /* @__PURE__ */ new Set([...o, ...D.map((d) => d.id)]);
2430
+ const x = /* @__PURE__ */ new Set([...a, ...M.map((c) => c.id)]);
2385
2431
  i(Array.from(x));
2386
2432
  }
2387
- }, I = () => {
2388
- a([]), i([]), g?.();
2389
- }, F = (x) => N ? N(x) : x.name, O = (x) => x.colorHex || x.color || "#069AD7";
2433
+ }, A = () => {
2434
+ o([]), i([]), g?.();
2435
+ }, V = (x) => N ? N(x) : x.name, U = (x) => x.colorHex || x.color || "#069AD7";
2390
2436
  return /* @__PURE__ */ n(
2391
2437
  "div",
2392
2438
  {
@@ -2400,14 +2446,14 @@ function Jr({
2400
2446
  /* @__PURE__ */ e("h3", { className: "text-base font-semibold text-foreground", children: C.title }),
2401
2447
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: C.subtitle })
2402
2448
  ] }),
2403
- B > 0 && /* @__PURE__ */ n(
2449
+ O > 0 && /* @__PURE__ */ n(
2404
2450
  "button",
2405
2451
  {
2406
2452
  type: "button",
2407
- onClick: I,
2453
+ onClick: A,
2408
2454
  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",
2409
2455
  children: [
2410
- /* @__PURE__ */ e(dr, { className: "h-3.5 w-3.5" }),
2456
+ /* @__PURE__ */ e(cr, { className: "h-3.5 w-3.5" }),
2411
2457
  C.clearAll
2412
2458
  ]
2413
2459
  }
@@ -2421,7 +2467,7 @@ function Jr({
2421
2467
  "button",
2422
2468
  {
2423
2469
  type: "button",
2424
- onClick: A,
2470
+ onClick: _,
2425
2471
  className: "text-xs font-medium text-primary transition-colors hover:text-primary/80",
2426
2472
  children: S ? C.unselectAll : C.selectAll
2427
2473
  }
@@ -2438,7 +2484,7 @@ function Jr({
2438
2484
  /* @__PURE__ */ n("div", { className: "flex max-h-[220px] flex-col gap-2 overflow-y-auto px-4 pb-2 scrollbar-thin", children: [
2439
2485
  l ? (
2440
2486
  // Loading skeletons
2441
- Array.from({ length: 4 }).map((x, d) => /* @__PURE__ */ n(
2487
+ Array.from({ length: 4 }).map((x, c) => /* @__PURE__ */ n(
2442
2488
  "div",
2443
2489
  {
2444
2490
  className: "flex animate-pulse items-center gap-2 rounded-md border border-border/60 bg-muted/40 p-2",
@@ -2447,18 +2493,18 @@ function Jr({
2447
2493
  /* @__PURE__ */ e("div", { className: "h-3 w-24 rounded bg-muted-foreground/20" })
2448
2494
  ]
2449
2495
  },
2450
- `skeleton-${d}`
2496
+ `skeleton-${c}`
2451
2497
  ))
2452
- ) : k.map((x) => {
2453
- const d = s.includes(x.id), m = O(x);
2498
+ ) : y.map((x) => {
2499
+ const c = s.includes(x.id), m = U(x);
2454
2500
  return /* @__PURE__ */ n(
2455
- ve,
2501
+ we,
2456
2502
  {
2457
- checked: d,
2458
- onCheckedChange: (p) => H(x.id, p),
2503
+ checked: c,
2504
+ onCheckedChange: (p) => I(x.id, p),
2459
2505
  className: h(
2460
2506
  "relative flex w-full cursor-pointer items-center justify-between gap-3 rounded-md border border-border bg-white px-3 py-2 transition-colors hover:border-primary/50",
2461
- d && "border-primary bg-primary/5"
2507
+ c && "border-primary bg-primary/5"
2462
2508
  ),
2463
2509
  children: [
2464
2510
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
@@ -2467,12 +2513,12 @@ function Jr({
2467
2513
  {
2468
2514
  className: h(
2469
2515
  "flex h-4 w-4 items-center justify-center rounded border border-border text-xs transition-colors",
2470
- d && "border-primary bg-primary text-primary-foreground"
2516
+ c && "border-primary bg-primary text-primary-foreground"
2471
2517
  ),
2472
- children: d && /* @__PURE__ */ e(pe, { className: "h-3 w-3" })
2518
+ children: c && /* @__PURE__ */ e(ve, { className: "h-3 w-3" })
2473
2519
  }
2474
2520
  ),
2475
- /* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: F(x) })
2521
+ /* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: V(x) })
2476
2522
  ] }),
2477
2523
  /* @__PURE__ */ e(
2478
2524
  "div",
@@ -2489,7 +2535,7 @@ function Jr({
2489
2535
  x.id
2490
2536
  );
2491
2537
  }),
2492
- !l && k.length === 0 && /* @__PURE__ */ e("p", { className: "px-2 py-1 text-xs text-muted-foreground", children: C.noScheduleTypes })
2538
+ !l && y.length === 0 && /* @__PURE__ */ e("p", { className: "px-2 py-1 text-xs text-muted-foreground", children: C.noScheduleTypes })
2493
2539
  ] })
2494
2540
  ] }),
2495
2541
  /* @__PURE__ */ e("div", { className: "h-px w-full bg-border/60" }),
@@ -2497,30 +2543,30 @@ function Jr({
2497
2543
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between px-4 py-3", children: [
2498
2544
  /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: C.participants }),
2499
2545
  /* @__PURE__ */ e(
2500
- ve,
2546
+ we,
2501
2547
  {
2502
- checked: T,
2503
- onCheckedChange: () => j(),
2548
+ checked: H,
2549
+ onCheckedChange: () => W(),
2504
2550
  className: h(
2505
2551
  "flex h-5 w-5 items-center justify-center rounded border border-border bg-white transition-colors hover:border-primary/50",
2506
- T && "border-primary bg-primary text-primary-foreground"
2552
+ H && "border-primary bg-primary text-primary-foreground"
2507
2553
  ),
2508
- children: T && /* @__PURE__ */ e(pe, { className: "h-3.5 w-3.5" })
2554
+ children: H && /* @__PURE__ */ e(ve, { className: "h-3.5 w-3.5" })
2509
2555
  }
2510
2556
  )
2511
2557
  ] }),
2512
2558
  /* @__PURE__ */ e("div", { className: "px-4 pb-3", children: /* @__PURE__ */ e(
2513
2559
  We,
2514
2560
  {
2515
- value: y,
2516
- onChange: b,
2561
+ value: b,
2562
+ onChange: w,
2517
2563
  placeholder: C.searchParticipants
2518
2564
  }
2519
2565
  ) }),
2520
2566
  /* @__PURE__ */ n("div", { className: "flex max-h-[400px] flex-col gap-2 overflow-y-auto px-4 pb-4 scrollbar-thin", children: [
2521
- u ? (
2567
+ d ? (
2522
2568
  // Loading skeletons
2523
- Array.from({ length: 4 }).map((x, d) => /* @__PURE__ */ n(
2569
+ Array.from({ length: 4 }).map((x, c) => /* @__PURE__ */ n(
2524
2570
  "div",
2525
2571
  {
2526
2572
  className: "flex animate-pulse items-center gap-3 rounded-md border border-border/60 bg-muted/40 p-3",
@@ -2533,18 +2579,18 @@ function Jr({
2533
2579
  ] })
2534
2580
  ]
2535
2581
  },
2536
- `p-skeleton-${d}`
2582
+ `p-skeleton-${c}`
2537
2583
  ))
2538
- ) : D.map((x) => {
2539
- const d = o.includes(x.id);
2584
+ ) : M.map((x) => {
2585
+ const c = a.includes(x.id);
2540
2586
  return /* @__PURE__ */ n(
2541
- ve,
2587
+ we,
2542
2588
  {
2543
- checked: d,
2544
- onCheckedChange: (m) => $(x.id, m),
2589
+ checked: c,
2590
+ onCheckedChange: (m) => P(x.id, m),
2545
2591
  className: h(
2546
2592
  "relative flex w-full cursor-pointer items-start gap-2 rounded-lg border border-border bg-white p-2 transition-colors hover:border-primary/50",
2547
- d && "border-primary bg-zinc-50"
2593
+ c && "border-primary bg-zinc-50"
2548
2594
  ),
2549
2595
  children: [
2550
2596
  /* @__PURE__ */ e(
@@ -2552,14 +2598,14 @@ function Jr({
2552
2598
  {
2553
2599
  className: h(
2554
2600
  "flex h-4 w-4 flex-shrink-0 items-center justify-center rounded border border-border transition-colors",
2555
- d && "border-primary bg-primary text-primary-foreground"
2601
+ c && "border-primary bg-primary text-primary-foreground"
2556
2602
  ),
2557
- children: d && /* @__PURE__ */ e(pe, { className: "h-2.5 w-2.5" })
2603
+ children: c && /* @__PURE__ */ e(ve, { className: "h-2.5 w-2.5" })
2558
2604
  }
2559
2605
  ),
2560
2606
  /* @__PURE__ */ n("div", { className: "flex flex-1 items-start gap-2", children: [
2561
2607
  /* @__PURE__ */ e(
2562
- cr,
2608
+ dr,
2563
2609
  {
2564
2610
  src: x.avatar ?? null,
2565
2611
  alt: x.name,
@@ -2584,7 +2630,7 @@ function Jr({
2584
2630
  x.id
2585
2631
  );
2586
2632
  }),
2587
- !u && D.length === 0 && /* @__PURE__ */ e("p", { className: "px-4 text-xs text-muted-foreground", children: C.noParticipants })
2633
+ !d && M.length === 0 && /* @__PURE__ */ e("p", { className: "px-4 text-xs text-muted-foreground", children: C.noParticipants })
2588
2634
  ] })
2589
2635
  ] })
2590
2636
  ]
@@ -2616,15 +2662,15 @@ function Xr({
2616
2662
  scheduleTypes: t,
2617
2663
  value: r,
2618
2664
  onChange: s,
2619
- allLabel: a = "All types",
2620
- className: o,
2665
+ allLabel: o = "All types",
2666
+ className: a,
2621
2667
  label: i
2622
2668
  }) {
2623
2669
  const g = (l) => {
2624
2670
  s(l.target.value);
2625
2671
  }, f = t.find((l) => String(l.id) === r);
2626
- return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-1", o), children: [
2627
- i && /* @__PURE__ */ e(R, { className: "text-xs text-muted-foreground", children: i }),
2672
+ return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-1", a), children: [
2673
+ i && /* @__PURE__ */ e(Y, { className: "text-xs text-muted-foreground", children: i }),
2628
2674
  /* @__PURE__ */ n("div", { className: "relative", children: [
2629
2675
  f ? /* @__PURE__ */ e(
2630
2676
  "span",
@@ -2634,13 +2680,13 @@ function Xr({
2634
2680
  }
2635
2681
  ) : /* @__PURE__ */ e(hr, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
2636
2682
  /* @__PURE__ */ n(
2637
- J,
2683
+ Q,
2638
2684
  {
2639
2685
  value: r,
2640
2686
  onChange: g,
2641
2687
  className: "h-9 w-full min-w-[140px] pl-8 pr-8 text-sm",
2642
2688
  children: [
2643
- /* @__PURE__ */ e("option", { value: "all", children: a }),
2689
+ /* @__PURE__ */ e("option", { value: "all", children: o }),
2644
2690
  t.map((l) => /* @__PURE__ */ e("option", { value: String(l.id), children: l.label }, l.id))
2645
2691
  ]
2646
2692
  }
@@ -2675,25 +2721,25 @@ function Qr({
2675
2721
  users: t,
2676
2722
  value: r,
2677
2723
  onChange: s,
2678
- allLabel: a = "All users",
2679
- className: o,
2724
+ allLabel: o = "All users",
2725
+ className: a,
2680
2726
  label: i
2681
2727
  }) {
2682
2728
  const g = (f) => {
2683
2729
  s(f.target.value);
2684
2730
  };
2685
- return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-1", o), children: [
2686
- i && /* @__PURE__ */ e(R, { className: "text-xs text-muted-foreground", children: i }),
2731
+ return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-1", a), children: [
2732
+ i && /* @__PURE__ */ e(Y, { className: "text-xs text-muted-foreground", children: i }),
2687
2733
  /* @__PURE__ */ n("div", { className: "relative", children: [
2688
2734
  /* @__PURE__ */ e(mr, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
2689
2735
  /* @__PURE__ */ n(
2690
- J,
2736
+ Q,
2691
2737
  {
2692
2738
  value: r,
2693
2739
  onChange: g,
2694
2740
  className: "h-9 w-full min-w-[120px] pl-8 pr-8 text-sm",
2695
2741
  children: [
2696
- /* @__PURE__ */ e("option", { value: "all", children: a }),
2742
+ /* @__PURE__ */ e("option", { value: "all", children: o }),
2697
2743
  t.map((f) => /* @__PURE__ */ e("option", { value: f.id, children: f.name }, f.id))
2698
2744
  ]
2699
2745
  }
@@ -2788,23 +2834,23 @@ function pr({ className: t }) {
2788
2834
  );
2789
2835
  }
2790
2836
  function vr(t) {
2791
- const r = t.getFullYear(), s = String(t.getMonth() + 1).padStart(2, "0"), a = String(t.getDate()).padStart(2, "0");
2792
- return `${r}-${s}-${a}`;
2837
+ const r = t.getFullYear(), s = String(t.getMonth() + 1).padStart(2, "0"), o = String(t.getDate()).padStart(2, "0");
2838
+ return `${r}-${s}-${o}`;
2793
2839
  }
2794
2840
  function $e(t) {
2795
- const r = t.getHours(), s = t.getMinutes(), a = r >= 12 ? "PM" : "AM", o = r % 12 || 12, i = String(s).padStart(2, "0");
2796
- return `${o}:${i} ${a}`;
2841
+ const r = t.getHours(), s = t.getMinutes(), o = r >= 12 ? "PM" : "AM", a = r % 12 || 12, i = String(s).padStart(2, "0");
2842
+ return `${a}:${i} ${o}`;
2797
2843
  }
2798
2844
  function wr(t) {
2799
2845
  const r = $e(t.startDate), s = $e(t.endDate);
2800
2846
  return `${r} - ${s}`;
2801
2847
  }
2802
2848
  function br(t) {
2803
- const r = Re(/* @__PURE__ */ new Date(), 1);
2849
+ const r = Ue(/* @__PURE__ */ new Date(), 1);
2804
2850
  return t.getFullYear() === r.getFullYear() && t.getMonth() === r.getMonth() && t.getDate() === r.getDate();
2805
2851
  }
2806
2852
  function yr(t) {
2807
- if (Z(t)) return "Today";
2853
+ if (te(t)) return "Today";
2808
2854
  if (br(t)) return "Tomorrow";
2809
2855
  const r = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], s = [
2810
2856
  "Jan",
@@ -2819,32 +2865,32 @@ function yr(t) {
2819
2865
  "Oct",
2820
2866
  "Nov",
2821
2867
  "Dec"
2822
- ], a = r[t.getDay()], o = s[t.getMonth()], i = t.getDate();
2823
- return `${a}, ${o} ${i}`;
2868
+ ], o = r[t.getDay()], a = s[t.getMonth()], i = t.getDate();
2869
+ return `${o}, ${a} ${i}`;
2824
2870
  }
2825
2871
  function kr(t, r) {
2826
2872
  const s = /* @__PURE__ */ new Map();
2827
- for (const a of t) {
2828
- const o = vr(a.startDate), i = s.get(o) ?? [];
2829
- i.push(a), s.set(o, i);
2873
+ for (const o of t) {
2874
+ const a = vr(o.startDate), i = s.get(a) ?? [];
2875
+ i.push(o), s.set(a, i);
2830
2876
  }
2831
- return Array.from(s.entries()).map(([a, o]) => {
2832
- const i = [...o].sort(
2877
+ return Array.from(s.entries()).map(([o, a]) => {
2878
+ const i = [...a].sort(
2833
2879
  (f, l) => f.startDate.getTime() - l.startDate.getTime()
2834
2880
  ), g = r > 0 ? i.slice(0, r) : i;
2835
2881
  return {
2836
- date: new Date(a),
2837
- dateKey: a,
2882
+ date: new Date(o),
2883
+ dateKey: o,
2838
2884
  events: g,
2839
2885
  hasMore: r > 0 && i.length > r
2840
2886
  };
2841
- }).sort((a, o) => a.date.getTime() - o.date.getTime());
2887
+ }).sort((o, a) => o.date.getTime() - a.date.getTime());
2842
2888
  }
2843
2889
  function Nr(t) {
2844
- const r = me(/* @__PURE__ */ new Date()), s = Ve(/* @__PURE__ */ new Date());
2845
- return t.filter((a) => a.startDate >= r && a.startDate <= s).length;
2890
+ const r = fe(/* @__PURE__ */ new Date()), s = Ve(/* @__PURE__ */ new Date());
2891
+ return t.filter((o) => o.startDate >= r && o.startDate <= s).length;
2846
2892
  }
2847
- function we({ className: t }) {
2893
+ function be({ className: t }) {
2848
2894
  return /* @__PURE__ */ e("div", { className: h("animate-pulse rounded-md bg-muted", t) });
2849
2895
  }
2850
2896
  function Cr({ event: t, onClick: r }) {
@@ -2878,7 +2924,7 @@ function Cr({ event: t, onClick: r }) {
2878
2924
  function Dr({ group: t, onEventClick: r }) {
2879
2925
  return /* @__PURE__ */ n("div", { className: "space-y-1", children: [
2880
2926
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between px-2 py-1.5", children: [
2881
- /* @__PURE__ */ e("h3", { className: h("text-xs font-semibold", Z(t.date) && "text-primary"), children: yr(t.date) }),
2927
+ /* @__PURE__ */ e("h3", { className: h("text-xs font-semibold", te(t.date) && "text-primary"), children: yr(t.date) }),
2882
2928
  t.hasMore && /* @__PURE__ */ n("span", { className: "text-[10px] text-muted-foreground", children: [
2883
2929
  "+",
2884
2930
  t.events.length,
@@ -2892,25 +2938,25 @@ function Zr({
2892
2938
  events: t,
2893
2939
  isLoading: r = !1,
2894
2940
  className: s,
2895
- daysAhead: a = 7,
2896
- maxEventsPerDay: o = 3,
2941
+ daysAhead: o = 7,
2942
+ maxEventsPerDay: a = 3,
2897
2943
  onEventClick: i,
2898
2944
  onNavigateToAgenda: g
2899
2945
  }) {
2900
- const [f, l] = ae(!1), u = W(() => {
2901
- const v = me(/* @__PURE__ */ new Date()), y = Re(v, a);
2902
- return t.filter((b) => b.endDate >= v && b.startDate < y);
2903
- }, [t, a]), M = W(
2904
- () => kr(u, o),
2905
- [u, o]
2906
- ), N = W(() => Nr(t), [t]), C = (v) => {
2946
+ const [f, l] = re(!1), d = B(() => {
2947
+ const v = fe(/* @__PURE__ */ new Date()), b = Ue(v, o);
2948
+ return t.filter((w) => w.endDate >= v && w.startDate < b);
2949
+ }, [t, o]), z = B(
2950
+ () => kr(d, a),
2951
+ [d, a]
2952
+ ), N = B(() => Nr(t), [t]), C = (v) => {
2907
2953
  l(!1), i?.(v);
2908
2954
  }, L = () => {
2909
2955
  l(!1), g?.();
2910
2956
  };
2911
- return /* @__PURE__ */ n(Fe, { open: f, onOpenChange: l, children: [
2957
+ return /* @__PURE__ */ n(Pe, { open: f, onOpenChange: l, children: [
2912
2958
  /* @__PURE__ */ n(
2913
- Pe,
2959
+ Oe,
2914
2960
  {
2915
2961
  className: h(
2916
2962
  "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",
@@ -2919,7 +2965,7 @@ function Zr({
2919
2965
  children: [
2920
2966
  /* @__PURE__ */ e(fr, { className: "h-4 w-4" }),
2921
2967
  N > 0 && /* @__PURE__ */ e(
2922
- ot,
2968
+ at,
2923
2969
  {
2924
2970
  variant: "destructive",
2925
2971
  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",
@@ -2929,7 +2975,7 @@ function Zr({
2929
2975
  ]
2930
2976
  }
2931
2977
  ),
2932
- /* @__PURE__ */ n(Oe, { className: "w-80 rounded-xl p-0", align: "end", side: "bottom", sideOffset: 8, children: [
2978
+ /* @__PURE__ */ n(Re, { className: "w-80 rounded-xl p-0", align: "end", side: "bottom", sideOffset: 8, children: [
2933
2979
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between border-b p-4", children: [
2934
2980
  /* @__PURE__ */ n("div", { children: [
2935
2981
  /* @__PURE__ */ e("h3", { className: "text-sm font-semibold", children: "Upcoming" }),
@@ -2948,21 +2994,21 @@ function Zr({
2948
2994
  }
2949
2995
  )
2950
2996
  ] }),
2951
- /* @__PURE__ */ e("div", { className: "max-h-80 overflow-y-auto p-2", children: r ? /* @__PURE__ */ e("div", { className: "space-y-2 p-2", children: Array.from({ length: 3 }).map((v, y) => /* @__PURE__ */ n("div", { className: "flex space-x-3", children: [
2952
- /* @__PURE__ */ e(we, { className: "h-2 w-2 rounded-full mt-2" }),
2997
+ /* @__PURE__ */ e("div", { className: "max-h-80 overflow-y-auto p-2", children: r ? /* @__PURE__ */ e("div", { className: "space-y-2 p-2", children: Array.from({ length: 3 }).map((v, b) => /* @__PURE__ */ n("div", { className: "flex space-x-3", children: [
2998
+ /* @__PURE__ */ e(be, { className: "h-2 w-2 rounded-full mt-2" }),
2953
2999
  /* @__PURE__ */ n("div", { className: "flex-1 space-y-2", children: [
2954
- /* @__PURE__ */ e(we, { className: "h-4 w-full" }),
2955
- /* @__PURE__ */ e(we, { className: "h-3 w-3/4" })
3000
+ /* @__PURE__ */ e(be, { className: "h-4 w-full" }),
3001
+ /* @__PURE__ */ e(be, { className: "h-3 w-3/4" })
2956
3002
  ] })
2957
- ] }, y)) }) : M.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-8 text-center", children: [
3003
+ ] }, b)) }) : z.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-8 text-center", children: [
2958
3004
  /* @__PURE__ */ e(gr, { className: "mb-2 h-8 w-8 text-muted-foreground/50" }),
2959
3005
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "No upcoming events" }),
2960
3006
  /* @__PURE__ */ n("p", { className: "text-xs text-muted-foreground/70", children: [
2961
3007
  "Your schedule is clear for the next ",
2962
- a,
3008
+ o,
2963
3009
  " days"
2964
3010
  ] })
2965
- ] }) : /* @__PURE__ */ e("div", { className: "space-y-3 divide-y", children: M.map((v) => /* @__PURE__ */ e(
3011
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-3 divide-y", children: z.map((v) => /* @__PURE__ */ e(
2966
3012
  Dr,
2967
3013
  {
2968
3014
  group: v,
@@ -2998,7 +3044,7 @@ function Mr({ className: t }) {
2998
3044
  }
2999
3045
  );
3000
3046
  }
3001
- function Ye({ className: t }) {
3047
+ function Ge({ className: t }) {
3002
3048
  return /* @__PURE__ */ e(
3003
3049
  "svg",
3004
3050
  {
@@ -3016,15 +3062,15 @@ function Ye({ className: t }) {
3016
3062
  }
3017
3063
  );
3018
3064
  }
3019
- function zr(t) {
3065
+ function Er(t) {
3020
3066
  const r = /* @__PURE__ */ new Date();
3021
3067
  return r.setDate(r.getDate() + 1), t.getFullYear() === r.getFullYear() && t.getMonth() === r.getMonth() && t.getDate() === r.getDate();
3022
3068
  }
3023
3069
  function Be(t) {
3024
- const r = t.getHours(), s = t.getMinutes(), a = r >= 12 ? "PM" : "AM";
3025
- return `${r % 12 || 12}:${s.toString().padStart(2, "0")} ${a}`;
3070
+ const r = t.getHours(), s = t.getMinutes(), o = r >= 12 ? "PM" : "AM";
3071
+ return `${r % 12 || 12}:${s.toString().padStart(2, "0")} ${o}`;
3026
3072
  }
3027
- function Er(t) {
3073
+ function zr(t) {
3028
3074
  return new Intl.DateTimeFormat("en-US", {
3029
3075
  weekday: "long",
3030
3076
  month: "short",
@@ -3036,25 +3082,25 @@ function Sr(t) {
3036
3082
  return `${r} - ${s}`;
3037
3083
  }
3038
3084
  function Lr(t) {
3039
- return Z(t) ? "Today" : zr(t) ? "Tomorrow" : Er(t);
3085
+ return te(t) ? "Today" : Er(t) ? "Tomorrow" : zr(t);
3040
3086
  }
3041
3087
  function Tr(t, r) {
3042
3088
  const s = /* @__PURE__ */ new Map();
3043
- for (const a of t) {
3044
- const o = ht(a.startDate), i = s.get(o) ?? [];
3045
- i.push(a), s.set(o, i);
3089
+ for (const o of t) {
3090
+ const a = ht(o.startDate), i = s.get(a) ?? [];
3091
+ i.push(o), s.set(a, i);
3046
3092
  }
3047
- return Array.from(s.entries()).map(([a, o]) => {
3048
- const i = [...o].sort(
3093
+ return Array.from(s.entries()).map(([o, a]) => {
3094
+ const i = [...a].sort(
3049
3095
  (f, l) => f.startDate.getTime() - l.startDate.getTime()
3050
3096
  ), g = r > 0 ? i.slice(0, r) : i;
3051
3097
  return {
3052
- date: new Date(a),
3053
- dateKey: a,
3098
+ date: new Date(o),
3099
+ dateKey: o,
3054
3100
  events: g,
3055
3101
  hasMore: r > 0 && i.length > r
3056
3102
  };
3057
- }).sort((a, o) => a.date.getTime() - o.date.getTime());
3103
+ }).sort((o, a) => o.date.getTime() - a.date.getTime());
3058
3104
  }
3059
3105
  function Hr({ event: t, onClick: r, compact: s }) {
3060
3106
  return /* @__PURE__ */ n(
@@ -3081,7 +3127,7 @@ function Hr({ event: t, onClick: r, compact: s }) {
3081
3127
  /* @__PURE__ */ e("p", { className: h("text-muted-foreground truncate", s ? "text-[10px]" : "text-xs"), children: Sr(t) })
3082
3128
  ] }),
3083
3129
  r && /* @__PURE__ */ e(
3084
- Ye,
3130
+ Ge,
3085
3131
  {
3086
3132
  className: h("shrink-0 text-muted-foreground/50", s ? "size-3" : "size-4")
3087
3133
  }
@@ -3094,17 +3140,17 @@ function jr({
3094
3140
  group: t,
3095
3141
  onEventClick: r,
3096
3142
  onViewMore: s,
3097
- compact: a
3143
+ compact: o
3098
3144
  }) {
3099
3145
  return /* @__PURE__ */ n("div", { className: "space-y-1", children: [
3100
- /* @__PURE__ */ n("div", { className: h("flex items-center justify-between px-2", a ? "py-1" : "py-1.5"), children: [
3146
+ /* @__PURE__ */ n("div", { className: h("flex items-center justify-between px-2", o ? "py-1" : "py-1.5"), children: [
3101
3147
  /* @__PURE__ */ e(
3102
3148
  "h3",
3103
3149
  {
3104
3150
  className: h(
3105
3151
  "font-semibold",
3106
- a ? "text-xs" : "text-sm",
3107
- Z(t.date) && "text-primary"
3152
+ o ? "text-xs" : "text-sm",
3153
+ te(t.date) && "text-primary"
3108
3154
  ),
3109
3155
  children: Lr(t.date)
3110
3156
  }
@@ -3114,42 +3160,42 @@ function jr({
3114
3160
  {
3115
3161
  type: "button",
3116
3162
  onClick: () => s(t.date),
3117
- className: h("text-primary hover:underline", a ? "text-[10px]" : "text-xs"),
3163
+ className: h("text-primary hover:underline", o ? "text-[10px]" : "text-xs"),
3118
3164
  children: "+more"
3119
3165
  }
3120
3166
  )
3121
3167
  ] }),
3122
- /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((o) => /* @__PURE__ */ e(Hr, { event: o, onClick: r, compact: a }, o.id)) })
3168
+ /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((a) => /* @__PURE__ */ e(Hr, { event: a, onClick: r, compact: o }, a.id)) })
3123
3169
  ] });
3124
3170
  }
3125
3171
  function qr({
3126
3172
  events: t,
3127
3173
  daysAhead: r = 7,
3128
3174
  maxEventsPerDay: s = 3,
3129
- onEventClick: a,
3130
- onViewAll: o,
3175
+ onEventClick: o,
3176
+ onViewAll: a,
3131
3177
  className: i,
3132
3178
  emptyState: g,
3133
3179
  title: f = "Upcoming",
3134
3180
  showHeader: l = !0,
3135
- compact: u = !1
3181
+ compact: d = !1
3136
3182
  }) {
3137
- const M = _e(), N = M?.filteredEvents, C = M?.currentDate ?? /* @__PURE__ */ new Date(), L = t ?? N ?? [], v = W(() => {
3138
- const k = me(C), D = new Date(k);
3139
- return D.setDate(D.getDate() + r), L.filter((S) => S.endDate >= k && S.startDate < D);
3140
- }, [L, r, C]), y = W(
3183
+ const z = _e(), N = z?.filteredEvents, C = z?.currentDate ?? /* @__PURE__ */ new Date(), L = t ?? N ?? [], v = B(() => {
3184
+ const y = fe(C), M = new Date(y);
3185
+ return M.setDate(M.getDate() + r), L.filter((S) => S.endDate >= y && S.startDate < M);
3186
+ }, [L, r, C]), b = B(
3141
3187
  () => Tr(v, s),
3142
3188
  [v, s]
3143
- ), b = v.length;
3144
- return y.length === 0 ? /* @__PURE__ */ n("div", { className: h("rounded-lg border bg-card", i), children: [
3189
+ ), w = v.length;
3190
+ return b.length === 0 ? /* @__PURE__ */ n("div", { className: h("rounded-lg border bg-card", i), children: [
3145
3191
  l && /* @__PURE__ */ e(
3146
3192
  "div",
3147
3193
  {
3148
3194
  className: h(
3149
3195
  "border-b px-4 flex items-center justify-between",
3150
- u ? "py-2" : "py-3"
3196
+ d ? "py-2" : "py-3"
3151
3197
  ),
3152
- children: /* @__PURE__ */ e("h2", { className: h("font-semibold", u ? "text-sm" : "text-base"), children: f })
3198
+ children: /* @__PURE__ */ e("h2", { className: h("font-semibold", d ? "text-sm" : "text-base"), children: f })
3153
3199
  }
3154
3200
  ),
3155
3201
  /* @__PURE__ */ e(
@@ -3157,16 +3203,16 @@ function qr({
3157
3203
  {
3158
3204
  className: h(
3159
3205
  "flex flex-col items-center justify-center text-center",
3160
- u ? "py-6 px-4" : "py-10 px-6"
3206
+ d ? "py-6 px-4" : "py-10 px-6"
3161
3207
  ),
3162
- children: g ?? /* @__PURE__ */ n(Q, { children: [
3208
+ children: g ?? /* @__PURE__ */ n(q, { children: [
3163
3209
  /* @__PURE__ */ e(
3164
3210
  Mr,
3165
3211
  {
3166
- className: h("text-muted-foreground/50 mb-2", u ? "size-8" : "size-10")
3212
+ className: h("text-muted-foreground/50 mb-2", d ? "size-8" : "size-10")
3167
3213
  }
3168
3214
  ),
3169
- /* @__PURE__ */ e("p", { className: h("text-muted-foreground", u ? "text-xs" : "text-sm"), children: "No upcoming events" })
3215
+ /* @__PURE__ */ e("p", { className: h("text-muted-foreground", d ? "text-xs" : "text-sm"), children: "No upcoming events" })
3170
3216
  ] })
3171
3217
  }
3172
3218
  )
@@ -3176,34 +3222,34 @@ function qr({
3176
3222
  {
3177
3223
  className: h(
3178
3224
  "border-b px-4 flex items-center justify-between",
3179
- u ? "py-2" : "py-3"
3225
+ d ? "py-2" : "py-3"
3180
3226
  ),
3181
3227
  children: [
3182
3228
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
3183
- /* @__PURE__ */ e("h2", { className: h("font-semibold", u ? "text-sm" : "text-base"), children: f }),
3229
+ /* @__PURE__ */ e("h2", { className: h("font-semibold", d ? "text-sm" : "text-base"), children: f }),
3184
3230
  /* @__PURE__ */ e(
3185
3231
  "span",
3186
3232
  {
3187
3233
  className: h(
3188
3234
  "text-muted-foreground bg-muted rounded-full px-2",
3189
- u ? "text-[10px] py-0" : "text-xs py-0.5"
3235
+ d ? "text-[10px] py-0" : "text-xs py-0.5"
3190
3236
  ),
3191
- children: b
3237
+ children: w
3192
3238
  }
3193
3239
  )
3194
3240
  ] }),
3195
- o && /* @__PURE__ */ n(
3241
+ a && /* @__PURE__ */ n(
3196
3242
  "button",
3197
3243
  {
3198
3244
  type: "button",
3199
- onClick: () => o(),
3245
+ onClick: () => a(),
3200
3246
  className: h(
3201
3247
  "text-primary hover:underline flex items-center gap-0.5",
3202
- u ? "text-xs" : "text-sm"
3248
+ d ? "text-xs" : "text-sm"
3203
3249
  ),
3204
3250
  children: [
3205
3251
  "View all",
3206
- /* @__PURE__ */ e(Ye, { className: "size-3" })
3252
+ /* @__PURE__ */ e(Ge, { className: "size-3" })
3207
3253
  ]
3208
3254
  }
3209
3255
  )
@@ -3215,17 +3261,17 @@ function qr({
3215
3261
  {
3216
3262
  className: h(
3217
3263
  "divide-y overflow-auto",
3218
- u ? "p-2 max-h-[280px]" : "p-3 max-h-[400px]"
3264
+ d ? "p-2 max-h-[280px]" : "p-3 max-h-[400px]"
3219
3265
  ),
3220
- children: y.map((k) => /* @__PURE__ */ e(
3266
+ children: b.map((y) => /* @__PURE__ */ e(
3221
3267
  jr,
3222
3268
  {
3223
- group: k,
3224
- onEventClick: a,
3225
- onViewMore: o ? (D) => o(D) : void 0,
3226
- compact: u
3269
+ group: y,
3270
+ onEventClick: o,
3271
+ onViewMore: a ? (M) => a(M) : void 0,
3272
+ compact: d
3227
3273
  },
3228
- k.dateKey
3274
+ y.dateKey
3229
3275
  ))
3230
3276
  }
3231
3277
  )
@@ -3237,15 +3283,15 @@ export {
3237
3283
  Pr as C,
3238
3284
  Kr as D,
3239
3285
  Or as E,
3240
- Vr as I,
3286
+ Rr as I,
3241
3287
  Xr as S,
3242
- xe as T,
3288
+ pe as T,
3243
3289
  Qr as U,
3244
3290
  Yr as V,
3245
3291
  Gr as W,
3246
- Rt as Y,
3292
+ Vt as Y,
3247
3293
  qr as a,
3248
3294
  Jr as b,
3249
- Rr as c
3295
+ Vr as c
3250
3296
  };
3251
- //# sourceMappingURL=agenda-widget-C0z2Ph-W.js.map
3297
+ //# sourceMappingURL=agenda-widget-CXPj7VIZ.js.map