@innosolutions/inno-calendar 1.0.46 → 1.0.47

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.
@@ -1,9 +1,9 @@
1
1
  import { jsx as e, jsxs as r, Fragment as pt } from "react/jsx-runtime";
2
2
  import * as ee from "react";
3
- import { useState as J, useCallback as W, useRef as te, forwardRef as $e, createElement as Le, useMemo as F, useLayoutEffect as Ie, useEffect as Ae } from "react";
3
+ import { useState as J, useCallback as W, useRef as te, forwardRef as $e, createElement as Ae, useMemo as F, useLayoutEffect as Ie, useEffect as ze } from "react";
4
4
  import { c as d, a as ft } from "./index-DtaLkIY8.js";
5
5
  import * as V from "@radix-ui/react-dropdown-menu";
6
- import { formatEventTimeDisplay as X, getEventsCountInView as gt, getRangeText as xt, groupEventsByDate as yt, isToday as ce, detectAllDayEvent as De, isSameDay as le, getEventsForDay as He, separateEventsByDuration as rt, calculateOverlappingPositions as ot, getVisibleHoursArray as at, isWorkingHour as it, formatHourLabel as Ce, generateMonthGrid as bt, startOfDay as Ge, getWeekDays as wt } from "./utils.mjs";
6
+ import { formatEventTimeDisplay as X, getEventsCountInView as gt, getRangeText as xt, groupEventsByDate as yt, isToday as ce, detectAllDayEvent as De, isSameDay as le, getEventsForDay as He, separateEventsByDuration as nt, calculateOverlappingPositions as rt, getVisibleHoursArray as ot, isWorkingHour as at, formatHourLabel as Ce, generateMonthGrid as bt, startOfDay as Ve, getWeekDays as wt } from "./utils.mjs";
7
7
  import { a as Re, b as Oe } from "./slot-selection-context-D2eu2o-7.js";
8
8
  import * as pe from "@radix-ui/react-popover";
9
9
  import * as be from "@radix-ui/react-tooltip";
@@ -118,7 +118,7 @@ function de(t) {
118
118
  }
119
119
  }[t ?? "blue"];
120
120
  }
121
- function je(t) {
121
+ function it(t) {
122
122
  const n = new Date(t);
123
123
  return n.setHours(0, 0, 0, 0), n;
124
124
  }
@@ -131,37 +131,37 @@ function Se({
131
131
  showTime: f = !0,
132
132
  showDescription: s = !1,
133
133
  showParticipants: x = !1,
134
- style: N,
134
+ style: v,
135
135
  disablePopover: l = !1,
136
136
  renderPopover: y,
137
- enableDrag: v = !1,
137
+ enableDrag: w = !1,
138
138
  enablePageTransition: m = !1,
139
139
  pageTransitionDuration: g = 400
140
140
  }) {
141
- const u = de(t.color), [b, w] = J(!1), [L, T] = J(!1), [A, O] = J(!1), [B, E] = J(null), M = te(null), I = Re(), S = t.endDate < je(/* @__PURE__ */ new Date()), $ = t.isCanceled ?? !1, q = v && I && !$ && !S, D = t.data, h = D?.meetingTookPlace ?? t.meetingTookPlace ?? !1, _ = $ ? /* @__PURE__ */ e(Nt, { className: "h-3 w-3 text-zinc-800 dark:text-zinc-200" }) : h ? /* @__PURE__ */ e(vt, { className: d("h-3 w-3", u.text) }) : null, R = t.scheduleTypeName || D?.scheduleTypeName || D?.typeName, P = D?.productName, k = D?.nrParticipant, c = D?.siteName, p = D?.siteCity, C = [c, p].filter(Boolean).join(", "), H = W(() => {
142
- if (!L) {
141
+ const u = de(t.color), [b, N] = J(!1), [_, M] = J(!1), [L, O] = J(!1), [E, A] = J(null), S = te(null), I = Re(), B = t.endDate < it(/* @__PURE__ */ new Date()), $ = t.isCanceled ?? !1, q = w && I && !$ && !B, D = t.data, h = D?.meetingTookPlace ?? t.meetingTookPlace ?? !1, z = $ ? /* @__PURE__ */ e(Nt, { className: "h-3 w-3 text-zinc-800 dark:text-zinc-200" }) : h ? /* @__PURE__ */ e(vt, { className: d("h-3 w-3", u.text) }) : null, R = t.scheduleTypeName || D?.scheduleTypeName || D?.typeName, P = D?.productName, k = D?.nrParticipant, c = D?.siteName, p = D?.siteCity, C = [c, p].filter(Boolean).join(", "), H = W(() => {
142
+ if (!_) {
143
143
  if (l && a) {
144
144
  a(t);
145
145
  return;
146
146
  }
147
- if (m && M.current) {
148
- const U = M.current.getBoundingClientRect();
149
- E(U), O(!0);
150
- } else l || w(!0);
147
+ if (m && S.current) {
148
+ const U = S.current.getBoundingClientRect();
149
+ A(U), O(!0);
150
+ } else l || N(!0);
151
151
  }
152
- }, [L, l, a, t, m]);
152
+ }, [_, l, a, t, m]);
153
153
  W(() => {
154
- O(!1), E(null), l || w(!0);
154
+ O(!1), A(null), l || N(!0);
155
155
  }, [l]);
156
- const z = W(() => {
157
- w(!1);
156
+ const T = W(() => {
157
+ N(!1);
158
158
  }, []), Y = W(
159
159
  (U) => {
160
- q && (U.dataTransfer.effectAllowed = "move", U.dataTransfer.setData("text/plain", t.id), T(!0), I?.startDrag?.(t));
160
+ q && (U.dataTransfer.effectAllowed = "move", U.dataTransfer.setData("text/plain", t.id), M(!0), I?.startDrag?.(t));
161
161
  },
162
162
  [q, t, I]
163
163
  ), j = W(() => {
164
- T(!1), I?.isDragging && I.endDrag?.();
164
+ M(!1), I?.isDragging && I.endDrag?.();
165
165
  }, [I]);
166
166
  if (n === "dot") {
167
167
  const U = /* @__PURE__ */ e(
@@ -171,11 +171,11 @@ function Se({
171
171
  onClick: H,
172
172
  className: d(
173
173
  "size-2 rounded-full cursor-pointer transition-opacity",
174
- S ? "bg-gray-400" : u.dot,
174
+ u.dot,
175
175
  t.isCanceled && "opacity-50",
176
176
  i
177
177
  ),
178
- style: N,
178
+ style: v,
179
179
  "aria-label": t.title
180
180
  }
181
181
  );
@@ -185,12 +185,12 @@ function Se({
185
185
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
186
186
  /* @__PURE__ */ e("div", { className: "text-xs opacity-80", children: X(t) })
187
187
  ] }) })
188
- ] }) : /* @__PURE__ */ r(re, { open: b, onOpenChange: w, children: [
188
+ ] }) : /* @__PURE__ */ r(re, { open: b, onOpenChange: N, children: [
189
189
  /* @__PURE__ */ e(oe, { asChild: !0, children: /* @__PURE__ */ r(ie, { children: [
190
190
  /* @__PURE__ */ e(se, { asChild: !0, children: U }),
191
191
  /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }) })
192
192
  ] }) }),
193
- /* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: z }) : /* @__PURE__ */ e(ye, { event: t, onClose: z }) })
193
+ /* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: T }) : /* @__PURE__ */ e(ye, { event: t, onClose: T }) })
194
194
  ] });
195
195
  }
196
196
  if (n === "compact") {
@@ -209,19 +209,18 @@ function Se({
209
209
  className: d(
210
210
  "group flex w-full relative items-center shadow-[0_0_1px_rgba(0,0,0,0.3)] gap-0 rounded px-1.5 py-1 text-left text-xs transition-colors hover:opacity-80",
211
211
  q ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
212
- L && "opacity-50",
212
+ _ && "opacity-50",
213
213
  // Cancelled events get gray background with strikethrough
214
- $ || // Past events get neutral zinc styling
215
- S ? "bg-zinc-100 dark:bg-zinc-800 text-zinc-500 dark:text-zinc-400 line-through" : [
214
+ $ ? "bg-zinc-100 dark:bg-zinc-800 text-zinc-500 dark:text-zinc-400 line-through" : [
216
215
  o === "colored" && [u.bg, u.text],
217
216
  o === "mixed" && [u.bg, u.text],
218
217
  o === "dot" && "bg-muted/50"
219
218
  ],
220
219
  i
221
220
  ),
222
- style: N,
221
+ style: v,
223
222
  children: [
224
- ["dot", "mixed"].includes(o) && !S && /* @__PURE__ */ e(
223
+ ["dot", "mixed"].includes(o) && !$ && /* @__PURE__ */ e(
225
224
  "svg",
226
225
  {
227
226
  width: "8",
@@ -255,13 +254,13 @@ function Se({
255
254
  {
256
255
  className: d(
257
256
  "w-fit mt-0.5 text-[10px] px-1 py-0.5 border border-dashed rounded-full font-medium",
258
- S ? "border-zinc-400 dark:border-zinc-600" : u.border
257
+ u.border
259
258
  ),
260
259
  children: X(t)
261
260
  }
262
261
  )
263
262
  ] }) }),
264
- /* @__PURE__ */ e("div", { className: "flex gap-0.5", children: _ })
263
+ /* @__PURE__ */ e("div", { className: "flex gap-0.5", children: z })
265
264
  ]
266
265
  }
267
266
  );
@@ -271,9 +270,9 @@ function Se({
271
270
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
272
271
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t) })
273
272
  ] }) })
274
- ] }) : /* @__PURE__ */ r(re, { open: b, onOpenChange: w, children: [
273
+ ] }) : /* @__PURE__ */ r(re, { open: b, onOpenChange: N, children: [
275
274
  /* @__PURE__ */ e(oe, { asChild: !0, children: U }),
276
- /* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: z }) : /* @__PURE__ */ e(ye, { event: t, onClose: z }) })
275
+ /* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: T }) : /* @__PURE__ */ e(ye, { event: t, onClose: T }) })
277
276
  ] });
278
277
  }
279
278
  const G = /* @__PURE__ */ r(
@@ -286,8 +285,7 @@ function Se({
286
285
  "shadow-[0_1px_3px_rgba(0,0,0,0.08)] hover:shadow-[0_2px_6px_rgba(0,0,0,0.12)]",
287
286
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
288
287
  // Cancelled events get gray background with strikethrough
289
- $ || // Past events get neutral zinc styling with strikethrough
290
- S ? "bg-zinc-100 dark:bg-zinc-800 border-l-zinc-400 dark:border-l-zinc-600 text-zinc-500 dark:text-zinc-400 line-through" : [
288
+ $ ? "bg-zinc-100 dark:bg-zinc-800 border-l-zinc-400 dark:border-l-zinc-600 text-zinc-500 dark:text-zinc-400 line-through" : [
291
289
  o === "colored" && [
292
290
  u.bg,
293
291
  u.accentBorder,
@@ -302,11 +300,11 @@ function Se({
302
300
  ],
303
301
  i
304
302
  ),
305
- style: N,
303
+ style: v,
306
304
  children: [
307
305
  /* @__PURE__ */ r("div", { className: "flex items-start justify-between gap-1", children: [
308
306
  /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 min-w-0", children: [
309
- ["dot", "mixed"].includes(o) && !S && !$ && /* @__PURE__ */ e(
307
+ ["dot", "mixed"].includes(o) && !$ && /* @__PURE__ */ e(
310
308
  "svg",
311
309
  {
312
310
  width: "8",
@@ -323,7 +321,7 @@ function Se({
323
321
  {
324
322
  className: d(
325
323
  "text-sm font-medium truncate",
326
- !S && !$ && o !== "dot" && u.text,
324
+ !$ && o !== "dot" && u.text,
327
325
  $ && "line-through"
328
326
  ),
329
327
  children: [
@@ -337,7 +335,7 @@ function Se({
337
335
  }
338
336
  )
339
337
  ] }),
340
- _
338
+ z
341
339
  ] }),
342
340
  P && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children: P }),
343
341
  k != null && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
@@ -349,7 +347,7 @@ function Se({
349
347
  ] })
350
348
  ] }),
351
349
  f && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
352
- /* @__PURE__ */ e(Pe, { className: "h-3 w-3 shrink-0" }),
350
+ /* @__PURE__ */ e(je, { className: "h-3 w-3 shrink-0" }),
353
351
  /* @__PURE__ */ e("span", { children: X(t) })
354
352
  ] }),
355
353
  C && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
@@ -370,12 +368,12 @@ function Se({
370
368
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
371
369
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t) })
372
370
  ] }) })
373
- ] }) : /* @__PURE__ */ r(re, { open: b, onOpenChange: w, children: [
371
+ ] }) : /* @__PURE__ */ r(re, { open: b, onOpenChange: N, children: [
374
372
  /* @__PURE__ */ e(oe, { asChild: !0, children: G }),
375
- /* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: z }) : /* @__PURE__ */ e(ye, { event: t, onClose: z }) })
373
+ /* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: T }) : /* @__PURE__ */ e(ye, { event: t, onClose: T }) })
376
374
  ] });
377
375
  }
378
- function Pe({ className: t }) {
376
+ function je({ className: t }) {
379
377
  return /* @__PURE__ */ r(
380
378
  "svg",
381
379
  {
@@ -489,7 +487,7 @@ function ye({
489
487
  }
490
488
  ),
491
489
  /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-sm text-muted-foreground mt-1", children: [
492
- /* @__PURE__ */ e(Pe, { className: "h-4 w-4 shrink-0" }),
490
+ /* @__PURE__ */ e(je, { className: "h-4 w-4 shrink-0" }),
493
491
  /* @__PURE__ */ e("span", { className: "tabular-nums", children: X(t) })
494
492
  ] })
495
493
  ] })
@@ -520,29 +518,29 @@ function lt({
520
518
  className: f,
521
519
  disablePopover: s = !1,
522
520
  renderPopover: x,
523
- enableDrag: N = !0
521
+ enableDrag: v = !0
524
522
  }) {
525
- const l = de(t.color), [y, v] = J(!1), [m, g] = J(!1), u = Re(), b = (t.endDate.getTime() - t.startDate.getTime()) / (1e3 * 60), w = b / 60 * o - 8, L = t.endDate < je(/* @__PURE__ */ new Date()), T = t.isCanceled ?? !1, A = N && u && !T && !L, O = b < 35, B = b > 25, E = b >= 45, M = t.data, I = t.scheduleTypeName || M?.scheduleTypeName || M?.typeName, S = M?.productName, $ = M?.nrParticipant, q = M?.siteName, D = M?.siteCity, h = [q, D].filter(Boolean).join(", "), _ = a === "dot", R = W(() => {
526
- m || (s && i ? i(t) : s || v(!0));
523
+ const l = de(t.color), [y, w] = J(!1), [m, g] = J(!1), u = Re(), b = (t.endDate.getTime() - t.startDate.getTime()) / (1e3 * 60), N = b / 60 * o - 8, _ = t.endDate < it(/* @__PURE__ */ new Date()), M = t.isCanceled ?? !1, L = v && u && !M && !_, O = b < 35, E = b > 25, A = b >= 45, S = t.data, I = t.scheduleTypeName || S?.scheduleTypeName || S?.typeName, B = S?.productName, $ = S?.nrParticipant, q = S?.siteName, D = S?.siteCity, h = [q, D].filter(Boolean).join(", "), z = a === "dot", R = W(() => {
524
+ m || (s && i ? i(t) : s || w(!0));
527
525
  }, [m, s, i, t]), P = W(() => {
528
- v(!1);
526
+ w(!1);
529
527
  }, []), k = W(
530
- (z) => {
531
- if (!A) return;
532
- z.dataTransfer.effectAllowed = "move", z.dataTransfer.setData("text/plain", t.id);
533
- const Y = z.currentTarget, j = Y.getBoundingClientRect();
534
- z.dataTransfer.setDragImage(
528
+ (T) => {
529
+ if (!L) return;
530
+ T.dataTransfer.effectAllowed = "move", T.dataTransfer.setData("text/plain", t.id);
531
+ const Y = T.currentTarget, j = Y.getBoundingClientRect();
532
+ T.dataTransfer.setDragImage(
535
533
  Y,
536
- z.clientX - j.left,
537
- z.clientY - j.top
534
+ T.clientX - j.left,
535
+ T.clientY - j.top
538
536
  ), g(!0), u?.startDrag?.(t);
539
537
  },
540
- [A, t, u]
538
+ [L, t, u]
541
539
  ), c = W(() => {
542
540
  g(!1), u?.isDragging && u.endDrag?.();
543
541
  }, [u]), p = W(
544
- (z) => {
545
- (z.key === "Enter" || z.key === " ") && (z.preventDefault(), R());
542
+ (T) => {
543
+ (T.key === "Enter" || T.key === " ") && (T.preventDefault(), R());
546
544
  },
547
545
  [R]
548
546
  ), C = /* @__PURE__ */ r(
@@ -550,7 +548,7 @@ function lt({
550
548
  {
551
549
  role: "button",
552
550
  tabIndex: 0,
553
- draggable: !!A,
551
+ draggable: !!L,
554
552
  onDragStart: k,
555
553
  onDragEnd: c,
556
554
  onKeyDown: p,
@@ -560,28 +558,27 @@ function lt({
560
558
  "shadow-[0_1px_3px_rgba(0,0,0,0.08)] hover:shadow-[0_2px_6px_rgba(0,0,0,0.12)]",
561
559
  "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
562
560
  "transition-all",
563
- A ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
561
+ L ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
564
562
  m && "opacity-50",
565
563
  // Cancelled events get gray background with strikethrough
566
- T || // Past events get neutral zinc styling with strikethrough
567
- L ? "bg-zinc-100 dark:bg-zinc-800 border-l-zinc-400 dark:border-l-zinc-600 text-zinc-500 dark:text-zinc-400 line-through" : [
564
+ M ? "bg-zinc-100 dark:bg-zinc-800 border-l-zinc-400 dark:border-l-zinc-600 text-zinc-500 dark:text-zinc-400 line-through" : [
568
565
  // Colored/mixed variants
569
- !_ && [
566
+ !z && [
570
567
  l.bg,
571
568
  l.accentBorder,
572
569
  l.text
573
570
  ],
574
571
  // Dot variant - neutral background
575
- _ && "bg-neutral-50 dark:bg-neutral-900 border-l-neutral-400 dark:border-l-neutral-600"
572
+ z && "bg-neutral-50 dark:bg-neutral-900 border-l-neutral-400 dark:border-l-neutral-600"
576
573
  ],
577
574
  // Short events center content
578
575
  O && "py-0 justify-center",
579
576
  f
580
577
  ),
581
- style: { height: `${Math.max(w, 20)}px` },
578
+ style: { height: `${Math.max(N, 20)}px` },
582
579
  children: [
583
580
  /* @__PURE__ */ r("div", { className: "flex items-start gap-1.5 min-w-0", children: [
584
- ["mixed", "dot"].includes(a) && !L && !T && /* @__PURE__ */ e(
581
+ ["mixed", "dot"].includes(a) && !M && /* @__PURE__ */ e(
585
582
  "svg",
586
583
  {
587
584
  width: "8",
@@ -598,7 +595,7 @@ function lt({
598
595
  {
599
596
  className: d(
600
597
  "font-semibold truncate leading-tight",
601
- !L && !T && _ && "text-foreground"
598
+ !M && z && "text-foreground"
602
599
  ),
603
600
  children: [
604
601
  t.title,
@@ -611,22 +608,22 @@ function lt({
611
608
  }
612
609
  ) })
613
610
  ] }),
614
- E && S && /* @__PURE__ */ e(
611
+ A && B && /* @__PURE__ */ e(
615
612
  "p",
616
613
  {
617
614
  className: d(
618
615
  "text-[11px] truncate leading-tight",
619
- _ ? "text-muted-foreground" : "opacity-80"
616
+ z ? "text-muted-foreground" : "opacity-80"
620
617
  ),
621
- children: S
618
+ children: B
622
619
  }
623
620
  ),
624
- E && $ != null && /* @__PURE__ */ r(
621
+ A && $ != null && /* @__PURE__ */ r(
625
622
  "div",
626
623
  {
627
624
  className: d(
628
625
  "flex items-center gap-1 text-[11px] leading-tight",
629
- _ ? "text-muted-foreground" : "opacity-80"
626
+ z ? "text-muted-foreground" : "opacity-80"
630
627
  ),
631
628
  children: [
632
629
  /* @__PURE__ */ e(Ee, { className: "h-3 w-3 shrink-0" }),
@@ -638,25 +635,25 @@ function lt({
638
635
  ]
639
636
  }
640
637
  ),
641
- B && /* @__PURE__ */ r(
638
+ E && /* @__PURE__ */ r(
642
639
  "div",
643
640
  {
644
641
  className: d(
645
642
  "flex items-center gap-1 text-[11px] tabular-nums leading-tight",
646
- _ ? "text-muted-foreground" : "opacity-90"
643
+ z ? "text-muted-foreground" : "opacity-90"
647
644
  ),
648
645
  children: [
649
- /* @__PURE__ */ e(Pe, { className: "h-3 w-3 shrink-0" }),
646
+ /* @__PURE__ */ e(je, { className: "h-3 w-3 shrink-0" }),
650
647
  /* @__PURE__ */ e("span", { children: X(t) })
651
648
  ]
652
649
  }
653
650
  ),
654
- E && h && /* @__PURE__ */ r(
651
+ A && h && /* @__PURE__ */ r(
655
652
  "div",
656
653
  {
657
654
  className: d(
658
655
  "flex items-center gap-1 text-[11px] truncate leading-tight",
659
- _ ? "text-muted-foreground" : "opacity-80"
656
+ z ? "text-muted-foreground" : "opacity-80"
660
657
  ),
661
658
  children: [
662
659
  /* @__PURE__ */ e(st, { className: "h-3 w-3 shrink-0" }),
@@ -675,7 +672,7 @@ function lt({
675
672
  I
676
673
  ] })
677
674
  ] }),
678
- S && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: S }),
675
+ B && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: B }),
679
676
  $ != null && /* @__PURE__ */ r("div", { className: "text-xs text-muted-foreground", children: [
680
677
  $,
681
678
  " participant",
@@ -709,7 +706,7 @@ function lt({
709
706
  width: n.minWidth ? `max(${n.minWidth}px, ${n.width}%)` : `${n.width}%`,
710
707
  minWidth: n.minWidth ? `${n.minWidth}px` : void 0
711
708
  },
712
- children: /* @__PURE__ */ r(re, { open: y, onOpenChange: v, children: [
709
+ children: /* @__PURE__ */ r(re, { open: y, onOpenChange: w, children: [
713
710
  /* @__PURE__ */ e(oe, { asChild: !0, children: C }),
714
711
  /* @__PURE__ */ e(Q, { className: "w-80", children: x ? x({ event: t, onClose: P }) : /* @__PURE__ */ e(ye, { event: t, onClose: P }) })
715
712
  ] })
@@ -726,20 +723,19 @@ function Dn({
726
723
  disablePopover: s = !1,
727
724
  renderPopover: x
728
725
  }) {
729
- const N = de(t.color), [l, y] = J(!1), v = t.endDate < je(/* @__PURE__ */ new Date()), m = t.isCanceled ?? !1, g = W(() => {
726
+ const v = de(t.color), [l, y] = J(!1), w = t.isCanceled ?? !1, m = W(() => {
730
727
  s && i ? i(t) : s || y(!0);
731
- }, [s, i, t]), u = W(() => {
728
+ }, [s, i, t]), g = W(() => {
732
729
  y(!1);
733
- }, []), b = /* @__PURE__ */ e(
730
+ }, []), u = /* @__PURE__ */ e(
734
731
  "button",
735
732
  {
736
733
  type: "button",
737
- onClick: g,
734
+ onClick: m,
738
735
  className: d(
739
736
  "flex h-5 items-center px-1.5 text-xs font-medium transition-opacity hover:opacity-80",
740
737
  // Cancelled events get gray background with strikethrough
741
- m || // Past events get neutral zinc styling with strikethrough
742
- v ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [N.dot, "text-white"],
738
+ w ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [v.dot, "text-white"],
743
739
  o && "rounded-l",
744
740
  a && "rounded-r",
745
741
  !o && "border-l-0",
@@ -749,16 +745,16 @@ function Dn({
749
745
  style: { width: `${n * 100}%` },
750
746
  children: o && /* @__PURE__ */ e("span", { className: "truncate", children: t.title })
751
747
  }
752
- ), w = /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
748
+ ), b = /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
753
749
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
754
750
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t) })
755
751
  ] }) });
756
752
  return s ? /* @__PURE__ */ r(ie, { children: [
757
- /* @__PURE__ */ e(se, { asChild: !0, children: b }),
758
- w
753
+ /* @__PURE__ */ e(se, { asChild: !0, children: u }),
754
+ b
759
755
  ] }) : /* @__PURE__ */ r(re, { open: l, onOpenChange: y, children: [
760
- /* @__PURE__ */ e(oe, { asChild: !0, children: b }),
761
- /* @__PURE__ */ e(Q, { className: "w-80", children: x ? x({ event: t, onClose: u }) : /* @__PURE__ */ e(ye, { event: t, onClose: u }) })
756
+ /* @__PURE__ */ e(oe, { asChild: !0, children: u }),
757
+ /* @__PURE__ */ e(Q, { className: "w-80", children: x ? x({ event: t, onClose: g }) : /* @__PURE__ */ e(ye, { event: t, onClose: g }) })
762
758
  ] });
763
759
  }
764
760
  if (typeof window < "u" && !document.getElementById("inno-calendar-event-marquee-style")) {
@@ -774,35 +770,35 @@ if (typeof window < "u" && !document.getElementById("inno-calendar-event-marquee
774
770
  }
775
771
  `, document.head.appendChild(t);
776
772
  }
777
- const Ue = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, qe = ft, dt = (t, n) => (o) => {
773
+ const Ge = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Ue = ft, dt = (t, n) => (o) => {
778
774
  var a;
779
- if (n?.variants == null) return qe(t, o?.class, o?.className);
775
+ if (n?.variants == null) return Ue(t, o?.class, o?.className);
780
776
  const { variants: i, defaultVariants: f } = n, s = Object.keys(i).map((l) => {
781
- const y = o?.[l], v = f?.[l];
777
+ const y = o?.[l], w = f?.[l];
782
778
  if (y === null) return null;
783
- const m = Ue(y) || Ue(v);
779
+ const m = Ge(y) || Ge(w);
784
780
  return i[l][m];
785
781
  }), x = o && Object.entries(o).reduce((l, y) => {
786
- let [v, m] = y;
787
- return m === void 0 || (l[v] = m), l;
788
- }, {}), N = n == null || (a = n.compoundVariants) === null || a === void 0 ? void 0 : a.reduce((l, y) => {
789
- let { class: v, className: m, ...g } = y;
782
+ let [w, m] = y;
783
+ return m === void 0 || (l[w] = m), l;
784
+ }, {}), v = n == null || (a = n.compoundVariants) === null || a === void 0 ? void 0 : a.reduce((l, y) => {
785
+ let { class: w, className: m, ...g } = y;
790
786
  return Object.entries(g).every((u) => {
791
- let [b, w] = u;
792
- return Array.isArray(w) ? w.includes({
787
+ let [b, N] = u;
788
+ return Array.isArray(N) ? N.includes({
793
789
  ...f,
794
790
  ...x
795
791
  }[b]) : {
796
792
  ...f,
797
793
  ...x
798
- }[b] === w;
794
+ }[b] === N;
799
795
  }) ? [
800
796
  ...l,
801
- v,
797
+ w,
802
798
  m
803
799
  ] : l;
804
800
  }, []);
805
- return qe(t, s, N, o?.class, o?.className);
801
+ return Ue(t, s, v, o?.class, o?.className);
806
802
  }, kt = dt(
807
803
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
808
804
  {
@@ -878,7 +874,7 @@ const Ct = (t) => t.replace(
878
874
  /^([A-Z])|[\s-_]+(\w)/g,
879
875
  (n, o, a) => a ? a.toUpperCase() : o.toLowerCase()
880
876
  );
881
- const Ke = (t) => {
877
+ const qe = (t) => {
882
878
  const n = Ct(t);
883
879
  return n.charAt(0).toUpperCase() + n.slice(1);
884
880
  };
@@ -909,10 +905,10 @@ const Tt = $e(
909
905
  children: f,
910
906
  iconNode: s,
911
907
  ...x
912
- }, N) => Le(
908
+ }, v) => Ae(
913
909
  "svg",
914
910
  {
915
- ref: N,
911
+ ref: v,
916
912
  ...St,
917
913
  width: n,
918
914
  height: n,
@@ -923,29 +919,29 @@ const Tt = $e(
923
919
  ...x
924
920
  },
925
921
  [
926
- ...s.map(([l, y]) => Le(l, y)),
922
+ ...s.map(([l, y]) => Ae(l, y)),
927
923
  ...Array.isArray(f) ? f : [f]
928
924
  ]
929
925
  )
930
926
  );
931
- const Fe = (t, n) => {
927
+ const Pe = (t, n) => {
932
928
  const o = $e(
933
- ({ className: a, ...i }, f) => Le(Tt, {
929
+ ({ className: a, ...i }, f) => Ae(Tt, {
934
930
  ref: f,
935
931
  iconNode: n,
936
932
  className: ct(
937
- `lucide-${Dt(Ke(t))}`,
933
+ `lucide-${Dt(qe(t))}`,
938
934
  `lucide-${t}`,
939
935
  a
940
936
  ),
941
937
  ...i
942
938
  })
943
939
  );
944
- return o.displayName = Ke(t), o;
940
+ return o.displayName = qe(t), o;
945
941
  };
946
- const zt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], Wt = Fe("check", zt);
947
- const Lt = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], At = Fe("chevron-right", Lt);
948
- const Et = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], _t = Fe("circle", Et), Xe = V.Root, Ye = V.Trigger, Bt = ee.forwardRef(({ className: t, inset: n, children: o, ...a }, i) => /* @__PURE__ */ r(
942
+ const Wt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], Lt = Pe("check", Wt);
943
+ const At = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], zt = Pe("chevron-right", At);
944
+ const Et = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], _t = Pe("circle", Et), Ke = V.Root, Xe = V.Trigger, Bt = ee.forwardRef(({ className: t, inset: n, children: o, ...a }, i) => /* @__PURE__ */ r(
949
945
  V.SubTrigger,
950
946
  {
951
947
  ref: i,
@@ -957,7 +953,7 @@ const Et = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], _t = Fe
957
953
  ...a,
958
954
  children: [
959
955
  o,
960
- /* @__PURE__ */ e(At, { className: "ml-auto h-4 w-4" })
956
+ /* @__PURE__ */ e(zt, { className: "ml-auto h-4 w-4" })
961
957
  ]
962
958
  }
963
959
  ));
@@ -1011,7 +1007,7 @@ const It = ee.forwardRef(({ className: t, children: n, checked: o = !1, ...a },
1011
1007
  checked: o,
1012
1008
  ...a,
1013
1009
  children: [
1014
- /* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(V.ItemIndicator, { children: /* @__PURE__ */ e(Wt, { className: "h-4 w-4" }) }) }),
1010
+ /* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(V.ItemIndicator, { children: /* @__PURE__ */ e(Lt, { className: "h-4 w-4" }) }) }),
1015
1011
  n
1016
1012
  ]
1017
1013
  }
@@ -1128,11 +1124,11 @@ function Ut({
1128
1124
  showEventCount: s = !0,
1129
1125
  className: x
1130
1126
  }) {
1131
- const N = Gt[t.getMonth()], l = t.getFullYear(), y = s ? gt(o, t, n, f) : 0, v = xt(t, n);
1127
+ const v = Gt[t.getMonth()], l = t.getFullYear(), y = s ? gt(o, t, n, f) : 0, w = xt(t, n);
1132
1128
  return /* @__PURE__ */ r("div", { className: d("min-w-0 flex-1", x), children: [
1133
1129
  /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 sm:gap-2 flex-wrap", children: [
1134
1130
  /* @__PURE__ */ r("span", { className: "text-base sm:text-lg font-semibold truncate", children: [
1135
- N,
1131
+ v,
1136
1132
  " ",
1137
1133
  l
1138
1134
  ] }),
@@ -1149,7 +1145,7 @@ function Ut({
1149
1145
  children: /* @__PURE__ */ e(Ft, {})
1150
1146
  }
1151
1147
  ),
1152
- /* @__PURE__ */ e("p", { className: "text-xs sm:text-sm text-muted-foreground truncate", children: v }),
1148
+ /* @__PURE__ */ e("p", { className: "text-xs sm:text-sm text-muted-foreground truncate", children: w }),
1153
1149
  /* @__PURE__ */ e(
1154
1150
  me,
1155
1151
  {
@@ -1249,7 +1245,7 @@ function he({ className: t }) {
1249
1245
  }
1250
1246
  );
1251
1247
  }
1252
- function Je({ className: t }) {
1248
+ function Ye({ className: t }) {
1253
1249
  return /* @__PURE__ */ e(
1254
1250
  "svg",
1255
1251
  {
@@ -1288,7 +1284,7 @@ function Yt({ className: t }) {
1288
1284
  }
1289
1285
  );
1290
1286
  }
1291
- function Ze({ className: t }) {
1287
+ function Je({ className: t }) {
1292
1288
  return /* @__PURE__ */ r(
1293
1289
  "svg",
1294
1290
  {
@@ -1407,7 +1403,7 @@ const tn = [
1407
1403
  { value: "month", label: "Month", icon: Qt },
1408
1404
  { value: "year", label: "Year", icon: en }
1409
1405
  // { value: 'agenda', label: 'Agenda', icon: ListIcon }, NOTE: Not needed currently
1410
- ], Qe = [
1406
+ ], Ze = [
1411
1407
  { value: "timeline-day", label: "1 Day", icon: he },
1412
1408
  { value: "timeline-3day", label: "3 Days", icon: he },
1413
1409
  { value: "timeline-week", label: "7 Days", icon: he }
@@ -1424,39 +1420,39 @@ function Cn({
1424
1420
  onNavigateNext: f,
1425
1421
  onNavigate: s,
1426
1422
  onViewChange: x,
1427
- onAddEvent: N,
1423
+ onAddEvent: v,
1428
1424
  availableViews: l = ["day", "week", "month", "agenda"],
1429
1425
  showTimelineViews: y = !1,
1430
- timelineViews: v,
1426
+ timelineViews: w,
1431
1427
  settingsContent: m,
1432
1428
  showSettings: g = !1,
1433
1429
  filterContent: u,
1434
1430
  actions: b,
1435
- className: w,
1436
- weekStartsOn: L = 1,
1437
- labels: T = {}
1431
+ className: N,
1432
+ weekStartsOn: _ = 1,
1433
+ labels: M = {}
1438
1434
  }) {
1439
- const A = F(
1435
+ const L = F(
1440
1436
  () => ({
1441
1437
  today: "Today",
1442
1438
  addEvent: "Add Event",
1443
1439
  calendarView: "Calendar View",
1444
1440
  resourceView: "Resource View",
1445
- ...T
1441
+ ...M
1446
1442
  }),
1447
- [T]
1443
+ [M]
1448
1444
  ), O = () => {
1449
1445
  a?.(), s?.("today");
1450
- }, B = () => {
1451
- i?.(), s?.("prev");
1452
1446
  }, E = () => {
1447
+ i?.(), s?.("prev");
1448
+ }, A = () => {
1453
1449
  f?.(), s?.("next");
1454
- }, M = ["day", "week", "month", "year", "agenda"].includes(
1450
+ }, S = ["day", "week", "month", "year", "agenda"].includes(
1455
1451
  n
1456
- ), I = n.startsWith("timeline-") || n.startsWith("resource-"), S = tn.filter(
1452
+ ), I = n.startsWith("timeline-") || n.startsWith("resource-"), B = tn.filter(
1457
1453
  (h) => l.includes(h.value)
1458
- ), $ = M ? S.find((h) => h.value === n) : null, q = [...Qe, ...nn], D = I ? q.find((h) => h.value === n) : null;
1459
- return /* @__PURE__ */ r("div", { className: d("flex flex-col w-full gap-3 mb-2", w), children: [
1454
+ ), $ = S ? B.find((h) => h.value === n) : null, q = [...Ze, ...nn], D = I ? q.find((h) => h.value === n) : null;
1455
+ return /* @__PURE__ */ r("div", { className: d("flex flex-col w-full gap-3 mb-2", N), children: [
1460
1456
  /* @__PURE__ */ r("div", { className: "flex lg:flex-row flex-col w-full justify-between gap-3", children: [
1461
1457
  /* @__PURE__ */ r("div", { className: "flex items-center justify-between gap-2", children: [
1462
1458
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2 sm:gap-3 min-w-0", children: [
@@ -1467,41 +1463,41 @@ function Cn({
1467
1463
  date: t,
1468
1464
  view: n,
1469
1465
  events: o,
1470
- onNavigatePrev: B,
1471
- onNavigateNext: E,
1472
- weekStartsOn: L
1466
+ onNavigatePrev: E,
1467
+ onNavigateNext: A,
1468
+ weekStartsOn: _
1473
1469
  }
1474
1470
  )
1475
1471
  ] }),
1476
- N && /* @__PURE__ */ e(
1472
+ v && /* @__PURE__ */ e(
1477
1473
  me,
1478
1474
  {
1479
1475
  size: "icon",
1480
1476
  className: "shrink-0 lg:hidden",
1481
- onClick: N,
1482
- children: /* @__PURE__ */ e(Ze, { className: "size-4" })
1477
+ onClick: v,
1478
+ children: /* @__PURE__ */ e(Je, { className: "size-4" })
1483
1479
  }
1484
1480
  )
1485
1481
  ] }),
1486
1482
  /* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 sm:gap-2 overflow-x-auto pb-1 -mb-1 scrollbar-none", children: [
1487
- x && S.length > 0 && /* @__PURE__ */ r(Xe, { children: [
1483
+ x && B.length > 0 && /* @__PURE__ */ r(Ke, { children: [
1488
1484
  /* @__PURE__ */ r(
1489
- Ye,
1485
+ Xe,
1490
1486
  {
1491
1487
  className: d(
1492
1488
  "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors",
1493
1489
  "h-10 px-2 sm:px-3 gap-1 sm:gap-1.5 shrink-0",
1494
- M ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-background hover:bg-accent hover:text-accent-foreground"
1490
+ S ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-background hover:bg-accent hover:text-accent-foreground"
1495
1491
  ),
1496
1492
  children: [
1497
1493
  /* @__PURE__ */ e(Xt, { className: "size-4" }),
1498
- /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: $?.label ?? A.calendarView }),
1499
- /* @__PURE__ */ e(Je, { className: "size-3 opacity-60" })
1494
+ /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: $?.label ?? L.calendarView }),
1495
+ /* @__PURE__ */ e(Ye, { className: "size-3 opacity-60" })
1500
1496
  ]
1501
1497
  }
1502
1498
  ),
1503
- /* @__PURE__ */ e(_e, { align: "start", className: "min-w-[120px]", children: S.map((h) => {
1504
- const _ = h.icon;
1499
+ /* @__PURE__ */ e(_e, { align: "start", className: "min-w-[120px]", children: B.map((h) => {
1500
+ const z = h.icon;
1505
1501
  return /* @__PURE__ */ r(
1506
1502
  Be,
1507
1503
  {
@@ -1511,7 +1507,7 @@ function Cn({
1511
1507
  n === h.value && "bg-accent"
1512
1508
  ),
1513
1509
  children: [
1514
- /* @__PURE__ */ e(_, { className: "size-4" }),
1510
+ /* @__PURE__ */ e(z, { className: "size-4" }),
1515
1511
  /* @__PURE__ */ e("span", { children: h.label })
1516
1512
  ]
1517
1513
  },
@@ -1519,9 +1515,9 @@ function Cn({
1519
1515
  );
1520
1516
  }) })
1521
1517
  ] }),
1522
- y && x && /* @__PURE__ */ r(Xe, { children: [
1518
+ y && x && /* @__PURE__ */ r(Ke, { children: [
1523
1519
  /* @__PURE__ */ r(
1524
- Ye,
1520
+ Xe,
1525
1521
  {
1526
1522
  className: d(
1527
1523
  "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors",
@@ -1530,13 +1526,13 @@ function Cn({
1530
1526
  ),
1531
1527
  children: [
1532
1528
  /* @__PURE__ */ e(he, { className: "size-4" }),
1533
- /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: D?.label ?? A.resourceView }),
1534
- /* @__PURE__ */ e(Je, { className: "size-3 opacity-60" })
1529
+ /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: D?.label ?? L.resourceView }),
1530
+ /* @__PURE__ */ e(Ye, { className: "size-3 opacity-60" })
1535
1531
  ]
1536
1532
  }
1537
1533
  ),
1538
- /* @__PURE__ */ e(_e, { align: "start", className: "min-w-[120px]", children: Qe.map((h) => {
1539
- const _ = h.icon;
1534
+ /* @__PURE__ */ e(_e, { align: "start", className: "min-w-[120px]", children: Ze.map((h) => {
1535
+ const z = h.icon;
1540
1536
  return /* @__PURE__ */ r(
1541
1537
  Be,
1542
1538
  {
@@ -1546,7 +1542,7 @@ function Cn({
1546
1542
  n === h.value && "bg-accent"
1547
1543
  ),
1548
1544
  children: [
1549
- /* @__PURE__ */ e(_, { className: "size-4" }),
1545
+ /* @__PURE__ */ e(z, { className: "size-4" }),
1550
1546
  /* @__PURE__ */ e("span", { children: h.label })
1551
1547
  ]
1552
1548
  },
@@ -1575,14 +1571,14 @@ function Cn({
1575
1571
  )
1576
1572
  ] }),
1577
1573
  b,
1578
- N && /* @__PURE__ */ r(
1574
+ v && /* @__PURE__ */ r(
1579
1575
  me,
1580
1576
  {
1581
1577
  className: "hidden lg:flex shrink-0 max-h-10",
1582
- onClick: N,
1578
+ onClick: v,
1583
1579
  children: [
1584
- /* @__PURE__ */ e(Ze, { className: "size-4" }),
1585
- A.addEvent
1580
+ /* @__PURE__ */ e(Je, { className: "size-4" }),
1581
+ L.addEvent
1586
1582
  ]
1587
1583
  }
1588
1584
  )
@@ -1600,7 +1596,7 @@ function Sn({
1600
1596
  className: f,
1601
1597
  renderEvent: s,
1602
1598
  renderPopover: x,
1603
- slots: N,
1599
+ slots: v,
1604
1600
  classNames: l
1605
1601
  }) {
1606
1602
  const y = F(() => {
@@ -1608,7 +1604,7 @@ function Sn({
1608
1604
  m.setHours(0, 0, 0, 0);
1609
1605
  const g = new Date(m);
1610
1606
  return g.setDate(g.getDate() + o), t.filter((u) => u.endDate >= m && u.startDate <= g);
1611
- }, [t, o, n]), v = F(() => {
1607
+ }, [t, o, n]), w = F(() => {
1612
1608
  const m = yt(y), g = [];
1613
1609
  for (const [u, b] of m)
1614
1610
  g.push({
@@ -1618,7 +1614,7 @@ function Sn({
1618
1614
  });
1619
1615
  return g.sort((u, b) => u.date.getTime() - b.date.getTime()), g;
1620
1616
  }, [y]);
1621
- return v.length === 0 ? /* @__PURE__ */ e("div", { className: d("flex flex-col items-center justify-center h-full py-12", f), children: /* @__PURE__ */ r("div", { className: "text-center", children: [
1617
+ return w.length === 0 ? /* @__PURE__ */ e("div", { className: d("flex flex-col items-center justify-center h-full py-12", f), children: /* @__PURE__ */ r("div", { className: "text-center", children: [
1622
1618
  /* @__PURE__ */ e("p", { className: "text-muted-foreground", children: "No events found" }),
1623
1619
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground/70", children: "No events scheduled for this period" })
1624
1620
  ] }) }) : /* @__PURE__ */ r("div", { className: d("flex flex-col h-full overflow-auto", l?.agendaList, f), children: [
@@ -1630,8 +1626,8 @@ function Sn({
1630
1626
  y.length !== 1 ? "s" : ""
1631
1627
  ] })
1632
1628
  ] }) }),
1633
- /* @__PURE__ */ e("div", { className: "flex-1", children: v.map(({ date: m, dateKey: g, events: u }) => {
1634
- const b = ce(m), w = m.toLocaleDateString([], { weekday: "short" }), L = m.getDate(), T = m.toLocaleDateString([], { month: "short" });
1629
+ /* @__PURE__ */ e("div", { className: "flex-1", children: w.map(({ date: m, dateKey: g, events: u }) => {
1630
+ const b = ce(m), N = m.toLocaleDateString([], { weekday: "short" }), _ = m.getDate(), M = m.toLocaleDateString([], { month: "short" });
1635
1631
  return /* @__PURE__ */ r("div", { className: d("", l?.agendaDayGroup), children: [
1636
1632
  /* @__PURE__ */ e(
1637
1633
  "div",
@@ -1649,7 +1645,7 @@ function Sn({
1649
1645
  "text-[11px] font-medium uppercase tracking-wide",
1650
1646
  b ? "text-primary" : "text-muted-foreground"
1651
1647
  ),
1652
- children: w
1648
+ children: N
1653
1649
  }
1654
1650
  ),
1655
1651
  /* @__PURE__ */ e(
@@ -1660,12 +1656,12 @@ function Sn({
1660
1656
  "size-10 text-xl font-normal",
1661
1657
  b ? "bg-primary text-primary-foreground" : "text-foreground"
1662
1658
  ),
1663
- children: L
1659
+ children: _
1664
1660
  }
1665
1661
  )
1666
1662
  ] }),
1667
1663
  /* @__PURE__ */ r("span", { className: "text-sm text-muted-foreground", children: [
1668
- T,
1664
+ M,
1669
1665
  " ",
1670
1666
  m.getFullYear()
1671
1667
  ] })
@@ -1673,10 +1669,10 @@ function Sn({
1673
1669
  }
1674
1670
  ),
1675
1671
  /* @__PURE__ */ e("div", { className: "px-4 py-3 space-y-2 border-b last:border-b-0", children: u.map(
1676
- (A) => s ? /* @__PURE__ */ e("div", { children: s({ event: A, variant: "full" }) }, A.id) : /* @__PURE__ */ e(
1672
+ (L) => s ? /* @__PURE__ */ e("div", { children: s({ event: L, variant: "full" }) }, L.id) : /* @__PURE__ */ e(
1677
1673
  Se,
1678
1674
  {
1679
- event: A,
1675
+ event: L,
1680
1676
  variant: "full",
1681
1677
  badgeVariant: a,
1682
1678
  onClick: i,
@@ -1687,7 +1683,7 @@ function Sn({
1687
1683
  showParticipants: !0,
1688
1684
  ...l?.eventCard && { className: l.eventCard }
1689
1685
  },
1690
- A.id
1686
+ L.id
1691
1687
  )
1692
1688
  ) })
1693
1689
  ] }, g);
@@ -1704,20 +1700,20 @@ function rn({
1704
1700
  badgeVariant: f = "colored",
1705
1701
  onEventClick: s,
1706
1702
  renderEvent: x,
1707
- renderPopover: N,
1703
+ renderPopover: v,
1708
1704
  className: l
1709
1705
  }) {
1710
- const y = te(null), v = te(null), [m, g] = J("closed"), u = F(
1711
- () => [...a].sort((B, E) => B.startDate.getTime() - E.startDate.getTime()),
1706
+ const y = te(null), w = te(null), [m, g] = J("closed"), u = F(
1707
+ () => [...a].sort((E, A) => E.startDate.getTime() - A.startDate.getTime()),
1712
1708
  [a]
1713
1709
  ), b = F(() => {
1714
1710
  if (!i) return { top: 0, left: 0, width: we, maxHeight: ve };
1715
- const B = typeof window < "u" ? window.innerWidth : 1200, E = typeof window < "u" ? window.innerHeight : 800;
1716
- let M = i.left + i.width / 2 - we / 2;
1717
- M = Math.max(16, Math.min(M, B - we - 16));
1711
+ const E = typeof window < "u" ? window.innerWidth : 1200, A = typeof window < "u" ? window.innerHeight : 800;
1712
+ let S = i.left + i.width / 2 - we / 2;
1713
+ S = Math.max(16, Math.min(S, E - we - 16));
1718
1714
  const I = Math.min(a.length * 68 + 80, ve);
1719
- let S = i.top + i.height / 2 - I / 2;
1720
- return S = Math.max(16, Math.min(S, E - I - 16)), { top: S, left: M, width: we, maxHeight: ve };
1715
+ let B = i.top + i.height / 2 - I / 2;
1716
+ return B = Math.max(16, Math.min(B, A - I - 16)), { top: B, left: S, width: we, maxHeight: ve };
1721
1717
  }, [i, a.length]);
1722
1718
  Ie(() => {
1723
1719
  if (t && i)
@@ -1728,28 +1724,28 @@ function rn({
1728
1724
  });
1729
1725
  else if (!t && m === "open") {
1730
1726
  g("exiting");
1731
- const B = setTimeout(() => {
1727
+ const E = setTimeout(() => {
1732
1728
  g("closed");
1733
1729
  }, Te);
1734
- return () => clearTimeout(B);
1730
+ return () => clearTimeout(E);
1735
1731
  }
1736
- }, [t, i]), Ae(() => {
1732
+ }, [t, i]), ze(() => {
1737
1733
  if (m === "closed") return;
1738
- const B = (E) => {
1739
- E.key === "Escape" && (E.stopPropagation(), n());
1734
+ const E = (A) => {
1735
+ A.key === "Escape" && (A.stopPropagation(), n());
1740
1736
  };
1741
- return document.addEventListener("keydown", B), () => document.removeEventListener("keydown", B);
1742
- }, [m, n]), Ae(() => {
1743
- m === "open" && v.current && v.current.focus();
1737
+ return document.addEventListener("keydown", E), () => document.removeEventListener("keydown", E);
1738
+ }, [m, n]), ze(() => {
1739
+ m === "open" && w.current && w.current.focus();
1744
1740
  }, [m]);
1745
- const w = W(
1746
- (B) => {
1747
- B.target === y.current && n();
1741
+ const N = W(
1742
+ (E) => {
1743
+ E.target === y.current && n();
1748
1744
  },
1749
1745
  [n]
1750
1746
  );
1751
1747
  if (m === "closed") return null;
1752
- const L = m === "entering" || m === "exiting", T = L && i ? {
1748
+ const _ = m === "entering" || m === "exiting", M = _ && i ? {
1753
1749
  // Collapsed state: match the day cell exactly
1754
1750
  position: "fixed",
1755
1751
  top: i.top,
@@ -1770,7 +1766,7 @@ function rn({
1770
1766
  opacity: 1,
1771
1767
  transform: "scale(1)",
1772
1768
  borderRadius: "12px"
1773
- }, A = L ? 0 : 1, O = o.toLocaleDateString(void 0, {
1769
+ }, L = _ ? 0 : 1, O = o.toLocaleDateString(void 0, {
1774
1770
  weekday: "long",
1775
1771
  month: "long",
1776
1772
  day: "numeric"
@@ -1781,14 +1777,14 @@ function rn({
1781
1777
  {
1782
1778
  ref: y,
1783
1779
  role: "presentation",
1784
- onClick: w,
1780
+ onClick: N,
1785
1781
  className: "ic-expansion-backdrop",
1786
1782
  style: {
1787
1783
  position: "fixed",
1788
1784
  inset: 0,
1789
1785
  zIndex: 50,
1790
1786
  backgroundColor: "rgba(0, 0, 0, 0.2)",
1791
- opacity: A,
1787
+ opacity: L,
1792
1788
  transition: `opacity ${Te}ms cubic-bezier(0.32, 0.72, 0, 1)`
1793
1789
  }
1794
1790
  }
@@ -1796,7 +1792,7 @@ function rn({
1796
1792
  /* @__PURE__ */ r(
1797
1793
  "div",
1798
1794
  {
1799
- ref: v,
1795
+ ref: w,
1800
1796
  role: "dialog",
1801
1797
  "aria-modal": "true",
1802
1798
  "aria-label": `Events for ${O}`,
@@ -1808,7 +1804,7 @@ function rn({
1808
1804
  l
1809
1805
  ),
1810
1806
  style: {
1811
- ...T,
1807
+ ...M,
1812
1808
  zIndex: 51,
1813
1809
  transition: `all ${Te}ms cubic-bezier(0.32, 0.72, 0, 1)`,
1814
1810
  willChange: "top, left, width, height, max-height, opacity, border-radius"
@@ -1856,26 +1852,26 @@ function rn({
1856
1852
  className: "overflow-y-auto px-3 py-2 space-y-1.5",
1857
1853
  style: { maxHeight: `${ve - 64}px` },
1858
1854
  children: [
1859
- u.map((B) => /* @__PURE__ */ e(
1855
+ u.map((E) => /* @__PURE__ */ e(
1860
1856
  "div",
1861
1857
  {
1862
- onPointerDown: (E) => E.stopPropagation(),
1863
- children: x ? x({ event: B, variant: "compact" }) : /* @__PURE__ */ e(
1858
+ onPointerDown: (A) => A.stopPropagation(),
1859
+ children: x ? x({ event: E, variant: "compact" }) : /* @__PURE__ */ e(
1864
1860
  Se,
1865
1861
  {
1866
- event: B,
1862
+ event: E,
1867
1863
  variant: "compact",
1868
1864
  badgeVariant: f,
1869
- onClick: (E) => {
1870
- n(), s?.(E);
1865
+ onClick: (A) => {
1866
+ n(), s?.(A);
1871
1867
  },
1872
- disablePopover: !!s && !N,
1873
- renderPopover: N,
1868
+ disablePopover: !!s && !v,
1869
+ renderPopover: v,
1874
1870
  showTime: !0
1875
1871
  }
1876
1872
  )
1877
1873
  },
1878
- B.id
1874
+ E.id
1879
1875
  )),
1880
1876
  a.length === 0 && /* @__PURE__ */ e("div", { className: "py-6 text-center text-sm text-muted-foreground", children: "No events" })
1881
1877
  ]
@@ -1893,7 +1889,7 @@ function on({
1893
1889
  disablePopover: a,
1894
1890
  renderPopover: i
1895
1891
  }) {
1896
- const [f, s] = J(!1), x = de(t.color), N = De(t), l = le(t.startDate, n), y = le(t.endDate, n), v = N && le(t.startDate, t.endDate), m = W(() => {
1892
+ const [f, s] = J(!1), x = de(t.color), v = De(t), l = le(t.startDate, n), y = le(t.endDate, n), w = v && le(t.startDate, t.endDate), m = W(() => {
1897
1893
  a && o ? o(t) : a || s(!0);
1898
1894
  }, [a, o, t]), g = W(() => {
1899
1895
  s(!1);
@@ -1911,11 +1907,11 @@ function on({
1911
1907
  t.isCanceled && "opacity-60 line-through"
1912
1908
  ),
1913
1909
  children: [
1914
- !v && l && !y && "→ ",
1915
- !v && !l && y && " ←",
1916
- !v && !l && !y && "↔ ",
1910
+ !w && l && !y && "→ ",
1911
+ !w && !l && y && " ←",
1912
+ !w && !l && !y && "↔ ",
1917
1913
  /* @__PURE__ */ e("span", { className: "truncate max-w-24 sm:max-w-32", children: t.title }),
1918
- v && /* @__PURE__ */ e("span", { className: "text-[9px] opacity-70 sm:text-[10px]", children: "All day" })
1914
+ w && /* @__PURE__ */ e("span", { className: "text-[9px] opacity-70 sm:text-[10px]", children: "All day" })
1919
1915
  ]
1920
1916
  }
1921
1917
  ), b = /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
@@ -1970,9 +1966,9 @@ function sn({
1970
1966
  if (t.length === 0) return null;
1971
1967
  const s = t.some((l) => De(l) && le(l.startDate, l.endDate)), x = t.some(
1972
1968
  (l) => !le(l.startDate, l.endDate) || De(l) && !le(l.startDate, l.endDate)
1973
- ), N = s && x ? "All day / Multi-day" : s ? "All day" : "Multi-day";
1969
+ ), v = s && x ? "All day / Multi-day" : s ? "All day" : "Multi-day";
1974
1970
  return /* @__PURE__ */ r("div", { className: d("border-b bg-muted/20 px-2 py-1.5 space-y-1", "sm:px-4 sm:py-2", f), children: [
1975
- /* @__PURE__ */ e("span", { className: "text-[10px] font-medium text-muted-foreground sm:text-xs", children: N }),
1971
+ /* @__PURE__ */ e("span", { className: "text-[10px] font-medium text-muted-foreground sm:text-xs", children: v }),
1976
1972
  /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: t.map((l) => /* @__PURE__ */ e(
1977
1973
  on,
1978
1974
  {
@@ -1996,48 +1992,48 @@ function ut({
1996
1992
  isSelecting: f = !1,
1997
1993
  disabled: s = !1,
1998
1994
  ariaLabel: x,
1999
- children: N,
1995
+ children: v,
2000
1996
  className: l,
2001
1997
  height: y,
2002
- style: v,
1998
+ style: w,
2003
1999
  dataAttributes: m
2004
2000
  }) {
2005
- const g = te(null), u = te(!1), b = te(!1), w = te(null), [L, T] = J(!1), A = Re(), O = W(
2001
+ const g = te(null), u = te(!1), b = te(!1), N = te(null), [_, M] = J(!1), L = Re(), O = W(
2006
2002
  (D) => {
2007
2003
  s || D.button !== 0 && D.pointerType === "mouse" || (D.preventDefault(), g.current = { x: D.clientX, y: D.clientY }, u.current = !1, b.current = !0, n?.(t));
2008
2004
  },
2009
2005
  [s, t, n]
2010
- ), B = W(
2006
+ ), E = W(
2011
2007
  (D) => {
2012
2008
  if (!(g.current && b.current && !s)) return;
2013
- const h = D.clientX - g.current.x, _ = D.clientY - g.current.y;
2014
- Math.sqrt(h * h + _ * _) >= ln && (u.current = !0);
2009
+ const h = D.clientX - g.current.x, z = D.clientY - g.current.y;
2010
+ Math.sqrt(h * h + z * z) >= ln && (u.current = !0);
2015
2011
  },
2016
2012
  [s]
2017
- ), E = W(
2013
+ ), A = W(
2018
2014
  (D) => {
2019
2015
  s || (D.buttons > 0 || f) && o?.(t);
2020
2016
  },
2021
2017
  [s, f, t, o]
2022
- ), M = W(() => {
2018
+ ), S = W(() => {
2023
2019
  s || (a?.(), g.current = null, u.current = !1, b.current = !1);
2024
2020
  }, [s, a]), I = W(
2025
2021
  (D) => {
2026
- if (!A?.isDragging || s) return;
2027
- D.preventDefault(), D.dataTransfer.dropEffect = "move", T(!0);
2028
- const h = /* @__PURE__ */ new Date(), _ = t.hour ?? h.getHours(), R = t.minute ?? (h.getMinutes() >= 30 ? 30 : 0);
2029
- A.updateDragPreview?.(t.date, _, R);
2022
+ if (!L?.isDragging || s) return;
2023
+ D.preventDefault(), D.dataTransfer.dropEffect = "move", M(!0);
2024
+ const h = /* @__PURE__ */ new Date(), z = t.hour ?? h.getHours(), R = t.minute ?? (h.getMinutes() >= 30 ? 30 : 0);
2025
+ L.updateDragPreview?.(t.date, z, R);
2030
2026
  },
2031
- [A, s, t]
2032
- ), S = W(() => {
2033
- T(!1);
2027
+ [L, s, t]
2028
+ ), B = W(() => {
2029
+ M(!1);
2034
2030
  }, []), $ = W(
2035
2031
  (D) => {
2036
- D.preventDefault(), T(!1), !(!A?.isDragging || s) && A.endDrag?.();
2032
+ D.preventDefault(), M(!1), !(!L?.isDragging || s) && L.endDrag?.();
2037
2033
  },
2038
- [A, s]
2034
+ [L, s]
2039
2035
  );
2040
- Ae(() => {
2036
+ ze(() => {
2041
2037
  const D = () => {
2042
2038
  b.current && (b.current = !1, g.current = null, u.current = !1);
2043
2039
  };
@@ -2054,19 +2050,19 @@ function ut({
2054
2050
  return /* @__PURE__ */ e(
2055
2051
  "button",
2056
2052
  {
2057
- ref: w,
2053
+ ref: N,
2058
2054
  type: "button",
2059
2055
  "aria-label": x,
2060
2056
  "aria-disabled": s,
2061
2057
  "aria-pressed": i,
2062
2058
  disabled: s,
2063
2059
  onPointerDown: O,
2064
- onPointerMove: B,
2065
- onPointerUp: M,
2066
- onPointerEnter: E,
2060
+ onPointerMove: E,
2061
+ onPointerUp: S,
2062
+ onPointerEnter: A,
2067
2063
  onKeyDown: q,
2068
2064
  onDragOver: I,
2069
- onDragLeave: S,
2065
+ onDragLeave: B,
2070
2066
  onDrop: $,
2071
2067
  className: d(
2072
2068
  "select-none touch-none cursor-pointer transition-colors",
@@ -2076,14 +2072,14 @@ function ut({
2076
2072
  // Selection state — blue tint matching the primary color
2077
2073
  i && "bg-blue-100/70",
2078
2074
  // Drag over state - visual feedback when event is dragged over
2079
- L && "bg-primary/20 ring-2 ring-primary ring-inset",
2075
+ _ && "bg-primary/20 ring-2 ring-primary ring-inset",
2080
2076
  // Disabled state
2081
2077
  s && "cursor-not-allowed opacity-50",
2082
2078
  l
2083
2079
  ),
2084
- style: { height: y, ...v },
2080
+ style: { height: y, ...w },
2085
2081
  ...m,
2086
- children: N
2082
+ children: v
2087
2083
  }
2088
2084
  );
2089
2085
  }
@@ -2102,7 +2098,7 @@ function dn({ slot: t, date: n, ariaLabel: o, ...a }) {
2102
2098
  const i = t ?? { date: n }, f = o ?? `Select ${i.date.toLocaleDateString()}`;
2103
2099
  return /* @__PURE__ */ e(ut, { slot: i, ariaLabel: f, ...a });
2104
2100
  }
2105
- const fe = 96, ze = 72, We = 80;
2101
+ const fe = 96, We = 72, Le = 80;
2106
2102
  function Mn({
2107
2103
  events: t,
2108
2104
  date: n,
@@ -2112,10 +2108,10 @@ function Mn({
2112
2108
  badgeVariant: f = "colored",
2113
2109
  onEventClick: s,
2114
2110
  onSlotSelect: x,
2115
- className: N,
2111
+ className: v,
2116
2112
  renderEvent: l,
2117
2113
  renderPopover: y,
2118
- slots: v,
2114
+ slots: w,
2119
2115
  classNames: m
2120
2116
  }) {
2121
2117
  const g = 60 / i, u = 100 / g, b = F(() => {
@@ -2123,27 +2119,27 @@ function Mn({
2123
2119
  for (let c = 0; c < g; c++)
2124
2120
  k.push(c * i);
2125
2121
  return k;
2126
- }, [g, i]), w = F(() => He(t, n), [t, n]), { singleDay: L, multiDay: T } = F(() => rt(w), [w]), A = F(() => {
2127
- const k = ot(L, n, o, fe), c = /* @__PURE__ */ new Map();
2122
+ }, [g, i]), N = F(() => He(t, n), [t, n]), { singleDay: _, multiDay: M } = F(() => nt(N), [N]), L = F(() => {
2123
+ const k = rt(_, n, o, fe), c = /* @__PURE__ */ new Map();
2128
2124
  for (const p of k)
2129
2125
  c.set(p.event.id, p.position);
2130
2126
  return c;
2131
- }, [L, n, o]), O = F(() => at(o), [o]), B = /* @__PURE__ */ new Date(), E = ce(n), M = F(() => {
2132
- if (!E) return 0;
2133
- const k = B.getHours() + B.getMinutes() / 60;
2127
+ }, [_, n, o]), O = F(() => ot(o), [o]), E = /* @__PURE__ */ new Date(), A = ce(n), S = F(() => {
2128
+ if (!A) return 0;
2129
+ const k = E.getHours() + E.getMinutes() / 60;
2134
2130
  return k < o.startHour || k > o.endHour ? -1 : (k - o.startHour) * fe;
2135
- }, [E, o, B]), I = te(null);
2131
+ }, [A, o, E]), I = te(null);
2136
2132
  Ie(() => {
2137
2133
  const k = I.current;
2138
2134
  if (!k) return;
2139
2135
  const c = () => {
2140
2136
  let p;
2141
- if (E) {
2137
+ if (A) {
2142
2138
  const H = (/* @__PURE__ */ new Date()).getHours();
2143
2139
  p = Math.max(H - 1, o.startHour);
2144
2140
  } else {
2145
- const H = n.getDay(), z = a?.[H];
2146
- z?.enabled && z.from > 0 ? p = Math.max(z.from - 1, o.startHour) : p = Math.max(7, o.startHour);
2141
+ const H = n.getDay(), T = a?.[H];
2142
+ T?.enabled && T.from > 0 ? p = Math.max(T.from - 1, o.startHour) : p = Math.max(7, o.startHour);
2147
2143
  }
2148
2144
  const C = (p - o.startHour) * fe;
2149
2145
  k.scrollTo({
@@ -2154,26 +2150,26 @@ function Mn({
2154
2150
  requestAnimationFrame(() => {
2155
2151
  requestAnimationFrame(c);
2156
2152
  });
2157
- }, [n, a, o, E]);
2158
- const S = Oe(), $ = W(
2153
+ }, [n, a, o, A]);
2154
+ const B = Oe(), $ = W(
2159
2155
  (k) => {
2160
- S?.startSelection(k);
2156
+ B?.startSelection(k);
2161
2157
  },
2162
- [S]
2158
+ [B]
2163
2159
  ), q = W(
2164
2160
  (k) => {
2165
- S?.updateSelection(k);
2161
+ B?.updateSelection(k);
2166
2162
  },
2167
- [S]
2163
+ [B]
2168
2164
  ), D = W(() => {
2169
- S?.endSelection();
2170
- }, [S]), h = W(
2165
+ B?.endSelection();
2166
+ }, [B]), h = W(
2171
2167
  (k) => {
2172
2168
  s?.(k);
2173
2169
  },
2174
2170
  [s]
2175
- ), _ = n.toLocaleDateString([], { weekday: "short" }), R = n.getDate(), P = ce(n);
2176
- return /* @__PURE__ */ r("div", { className: d("flex flex-col h-full", N), children: [
2171
+ ), z = n.toLocaleDateString([], { weekday: "short" }), R = n.getDate(), P = ce(n);
2172
+ return /* @__PURE__ */ r("div", { className: d("flex flex-col h-full", v), children: [
2177
2173
  /* @__PURE__ */ e(
2178
2174
  "div",
2179
2175
  {
@@ -2190,7 +2186,7 @@ function Mn({
2190
2186
  "text-[11px] font-medium uppercase tracking-wide",
2191
2187
  P ? "text-primary" : "text-muted-foreground"
2192
2188
  ),
2193
- children: _
2189
+ children: z
2194
2190
  }
2195
2191
  ),
2196
2192
  /* @__PURE__ */ e(
@@ -2207,10 +2203,10 @@ function Mn({
2207
2203
  ] })
2208
2204
  }
2209
2205
  ),
2210
- T.length > 0 && /* @__PURE__ */ e(
2206
+ M.length > 0 && /* @__PURE__ */ e(
2211
2207
  sn,
2212
2208
  {
2213
- events: T,
2209
+ events: M,
2214
2210
  date: n,
2215
2211
  onEventClick: h,
2216
2212
  disablePopover: !!s && !y,
@@ -2225,7 +2221,7 @@ function Mn({
2225
2221
  className: d("flex-1", m?.scrollContainer),
2226
2222
  children: /* @__PURE__ */ r("div", { className: "relative min-h-full", children: [
2227
2223
  O.map((k, c) => {
2228
- const C = !it(n, k, a);
2224
+ const C = !at(n, k, a);
2229
2225
  return /* @__PURE__ */ r(
2230
2226
  "div",
2231
2227
  {
@@ -2244,7 +2240,7 @@ function Mn({
2244
2240
  "relative flex-shrink-0 border-r border-border/50 bg-zinc-50 dark:bg-zinc-900",
2245
2241
  m?.timeGutter
2246
2242
  ),
2247
- style: { width: ze },
2243
+ style: { width: We },
2248
2244
  children: /* @__PURE__ */ e("div", { className: "absolute -top-2.5 right-1 sm:right-2 flex h-5 items-center", children: c !== 0 && /* @__PURE__ */ e(
2249
2245
  "span",
2250
2246
  {
@@ -2258,7 +2254,7 @@ function Mn({
2258
2254
  }
2259
2255
  ),
2260
2256
  /* @__PURE__ */ r("div", { className: "relative flex-1", children: [
2261
- E && !C && /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-primary/5" }),
2257
+ A && !C && /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-primary/5" }),
2262
2258
  c !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
2263
2259
  b.slice(1).map((H) => /* @__PURE__ */ e(
2264
2260
  "div",
@@ -2268,7 +2264,7 @@ function Mn({
2268
2264
  },
2269
2265
  H
2270
2266
  )),
2271
- b.map((H, z) => {
2267
+ b.map((H, T) => {
2272
2268
  const Y = { date: n, hour: k, minute: H };
2273
2269
  return /* @__PURE__ */ e(
2274
2270
  mt,
@@ -2277,12 +2273,12 @@ function Mn({
2277
2273
  onSelectionStart: $,
2278
2274
  onSelectionMove: q,
2279
2275
  onSelectionEnd: D,
2280
- isSelected: S?.isSlotSelected(Y) ?? !1,
2281
- isSelecting: S?.isSelecting ?? !1,
2276
+ isSelected: B?.isSlotSelected(Y) ?? !1,
2277
+ isSelecting: B?.isSelecting ?? !1,
2282
2278
  disabled: C,
2283
2279
  className: "absolute inset-x-0",
2284
2280
  style: {
2285
- top: `${z * u}%`,
2281
+ top: `${T * u}%`,
2286
2282
  height: `${u}%`
2287
2283
  },
2288
2284
  ariaLabel: `Add event at ${Ce(k)}:${String(H).padStart(2, "0")}`
@@ -2300,11 +2296,11 @@ function Mn({
2300
2296
  "div",
2301
2297
  {
2302
2298
  className: "absolute top-0 bottom-0 right-0 pointer-events-none",
2303
- style: { left: ze },
2304
- children: L.map((k) => {
2305
- const c = A.get(k.id);
2299
+ style: { left: We },
2300
+ children: _.map((k) => {
2301
+ const c = L.get(k.id);
2306
2302
  if (!c) return null;
2307
- const p = `calc(${c.width}% - 2px)`, C = `max(${We}px, ${p})`;
2303
+ const p = `calc(${c.width}% - 2px)`, C = `max(${Le}px, ${p})`;
2308
2304
  return l ? /* @__PURE__ */ e(
2309
2305
  "div",
2310
2306
  {
@@ -2313,7 +2309,7 @@ function Mn({
2313
2309
  top: `${c.top}px`,
2314
2310
  left: `${c.left}%`,
2315
2311
  width: C,
2316
- minWidth: `${We}px`
2312
+ minWidth: `${Le}px`
2317
2313
  },
2318
2314
  children: l({ event: k, position: c })
2319
2315
  },
@@ -2326,7 +2322,7 @@ function Mn({
2326
2322
  top: c.top,
2327
2323
  left: c.left,
2328
2324
  width: c.width,
2329
- minWidth: We
2325
+ minWidth: Le
2330
2326
  },
2331
2327
  hourHeight: fe,
2332
2328
  badgeVariant: f,
@@ -2340,7 +2336,7 @@ function Mn({
2340
2336
  })
2341
2337
  }
2342
2338
  ),
2343
- E && M >= 0 && /* @__PURE__ */ r(
2339
+ A && S >= 0 && /* @__PURE__ */ r(
2344
2340
  "div",
2345
2341
  {
2346
2342
  className: d(
@@ -2348,8 +2344,8 @@ function Mn({
2348
2344
  m?.currentTimeIndicator
2349
2345
  ),
2350
2346
  style: {
2351
- top: M,
2352
- left: ze
2347
+ top: S,
2348
+ left: We
2353
2349
  },
2354
2350
  children: [
2355
2351
  /* @__PURE__ */ e("div", { className: "h-2.5 w-2.5 -ml-1 rounded-full bg-red-500" }),
@@ -2388,33 +2384,33 @@ function Tn({
2388
2384
  onSlotSelect: f,
2389
2385
  onDayClick: s,
2390
2386
  className: x,
2391
- renderEvent: N,
2387
+ renderEvent: v,
2392
2388
  renderPopover: l,
2393
2389
  showMoreMode: y,
2394
- showMoreEventsInPopover: v = !1,
2390
+ showMoreEventsInPopover: w = !1,
2395
2391
  slots: m,
2396
2392
  classNames: g
2397
2393
  }) {
2398
- const u = y ?? (v ? "popover" : "expand"), b = m?.dayCellHeader, w = m?.dayCellFooter, [L, T] = J(null), [A, O] = J(null), B = F(() => bt(n, o), [n, o]), E = F(() => {
2394
+ const u = y ?? (w ? "popover" : "expand"), b = m?.dayCellHeader, N = m?.dayCellFooter, [_, M] = J(null), [L, O] = J(null), E = F(() => bt(n, o), [n, o]), A = F(() => {
2399
2395
  const h = /* @__PURE__ */ new Map();
2400
- for (const _ of B) {
2401
- const R = _.date.toDateString(), P = He(t, _.date);
2396
+ for (const z of E) {
2397
+ const R = z.date.toDateString(), P = He(t, z.date);
2402
2398
  P.sort((k, c) => k.startDate.getTime() - c.startDate.getTime()), h.set(R, P);
2403
2399
  }
2404
2400
  return h;
2405
- }, [B, t]), M = Oe(), I = W(
2401
+ }, [E, t]), S = Oe(), I = W(
2406
2402
  (h) => {
2407
- M?.startSelection(h);
2403
+ S?.startSelection(h);
2408
2404
  },
2409
- [M]
2410
- ), S = W(
2405
+ [S]
2406
+ ), B = W(
2411
2407
  (h) => {
2412
- M?.updateSelection(h);
2408
+ S?.updateSelection(h);
2413
2409
  },
2414
- [M]
2410
+ [S]
2415
2411
  ), $ = W(() => {
2416
- M?.endSelection();
2417
- }, [M]), q = W(
2412
+ S?.endSelection();
2413
+ }, [S]), q = W(
2418
2414
  (h) => {
2419
2415
  s?.(h);
2420
2416
  },
@@ -2429,12 +2425,12 @@ function Tn({
2429
2425
  "grid grid-cols-7 border-b !sticky !top-0 bg-background z-10",
2430
2426
  g?.weekdayHeader
2431
2427
  ),
2432
- children: D.map((h, _) => /* @__PURE__ */ r(
2428
+ children: D.map((h, z) => /* @__PURE__ */ r(
2433
2429
  "div",
2434
2430
  {
2435
2431
  className: d(
2436
2432
  "py-2 sm:py-2.5 text-center text-[11px] uppercase font-medium tracking-wide text-muted-foreground",
2437
- _ >= 5 && "text-muted-foreground/70",
2433
+ z >= 5 && "text-muted-foreground/70",
2438
2434
  // Weekend
2439
2435
  g?.weekdayLabel
2440
2436
  ),
@@ -2447,18 +2443,18 @@ function Tn({
2447
2443
  ))
2448
2444
  }
2449
2445
  ),
2450
- /* @__PURE__ */ e("div", { className: d("grid grid-cols-7 auto-rows-min", g?.monthGrid), children: B.map((h) => {
2451
- const _ = h.date.toDateString(), R = E.get(_) || [], P = ce(h.date), k = h.date.getDay() === 0 || h.date.getDay() === 6, c = R.length > ge;
2446
+ /* @__PURE__ */ e("div", { className: d("grid grid-cols-7 auto-rows-min", g?.monthGrid), children: E.map((h) => {
2447
+ const z = h.date.toDateString(), R = A.get(z) || [], P = ce(h.date), k = h.date.getDay() === 0 || h.date.getDay() === 6, c = R.length > ge;
2452
2448
  return /* @__PURE__ */ r(
2453
2449
  dn,
2454
2450
  {
2455
2451
  date: h.date,
2456
- dataAttributes: { "data-day-key": _ },
2452
+ dataAttributes: { "data-day-key": z },
2457
2453
  onSelectionStart: I,
2458
- onSelectionMove: S,
2454
+ onSelectionMove: B,
2459
2455
  onSelectionEnd: $,
2460
- isSelected: M?.isSlotSelected({ date: h.date }) ?? !1,
2461
- isSelecting: M?.isSelecting ?? !1,
2456
+ isSelected: S?.isSlotSelected({ date: h.date }) ?? !1,
2457
+ isSelecting: S?.isSelecting ?? !1,
2462
2458
  className: d(
2463
2459
  "relative flex flex-col border-r border-b text-left min-h-[80px] sm:min-h-[100px] overflow-hidden",
2464
2460
  "[&:nth-child(7n)]:border-r-0",
@@ -2521,7 +2517,7 @@ function Tn({
2521
2517
  onPointerDown: (C) => {
2522
2518
  C.stopPropagation();
2523
2519
  },
2524
- children: N ? N({ event: p, variant: "compact" }) : /* @__PURE__ */ e(
2520
+ children: v ? v({ event: p, variant: "compact" }) : /* @__PURE__ */ e(
2525
2521
  Se,
2526
2522
  {
2527
2523
  event: p,
@@ -2547,7 +2543,7 @@ function Tn({
2547
2543
  onPointerDown: (p) => p.stopPropagation(),
2548
2544
  onClick: (p) => {
2549
2545
  p.stopPropagation();
2550
- const C = document.querySelector(`[data-day-key="${_}"]`);
2546
+ const C = document.querySelector(`[data-day-key="${z}"]`);
2551
2547
  O({
2552
2548
  date: h.date,
2553
2549
  events: R,
@@ -2568,8 +2564,8 @@ function Tn({
2568
2564
  c && u === "popover" && /* @__PURE__ */ r(
2569
2565
  re,
2570
2566
  {
2571
- open: L === _,
2572
- onOpenChange: (p) => T(p ? _ : null),
2567
+ open: _ === z,
2568
+ onOpenChange: (p) => M(p ? z : null),
2573
2569
  children: [
2574
2570
  /* @__PURE__ */ e(oe, { asChild: !0, children: /* @__PURE__ */ r(
2575
2571
  "button",
@@ -2577,7 +2573,7 @@ function Tn({
2577
2573
  type: "button",
2578
2574
  onPointerDown: (p) => p.stopPropagation(),
2579
2575
  onClick: (p) => {
2580
- p.stopPropagation(), T(_);
2576
+ p.stopPropagation(), M(z);
2581
2577
  },
2582
2578
  className: d(
2583
2579
  "w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
@@ -2610,14 +2606,14 @@ function Tn({
2610
2606
  " events"
2611
2607
  ] })
2612
2608
  ] }),
2613
- /* @__PURE__ */ e("div", { className: "space-y-1.5", children: R.map((p) => /* @__PURE__ */ e("div", { children: N ? N({ event: p, variant: "compact" }) : /* @__PURE__ */ e(
2609
+ /* @__PURE__ */ e("div", { className: "space-y-1.5", children: R.map((p) => /* @__PURE__ */ e("div", { children: v ? v({ event: p, variant: "compact" }) : /* @__PURE__ */ e(
2614
2610
  Se,
2615
2611
  {
2616
2612
  event: p,
2617
2613
  variant: "compact",
2618
2614
  badgeVariant: a,
2619
2615
  onClick: (C) => {
2620
- T(null), i?.(C);
2616
+ M(null), i?.(C);
2621
2617
  },
2622
2618
  disablePopover: !!i && !l,
2623
2619
  renderPopover: l,
@@ -2650,8 +2646,8 @@ function Tn({
2650
2646
  ]
2651
2647
  }
2652
2648
  ),
2653
- w && /* @__PURE__ */ e(
2654
- w,
2649
+ N && /* @__PURE__ */ e(
2650
+ N,
2655
2651
  {
2656
2652
  date: h.date,
2657
2653
  events: R,
@@ -2663,35 +2659,35 @@ function Tn({
2663
2659
  )
2664
2660
  ]
2665
2661
  },
2666
- _
2662
+ z
2667
2663
  );
2668
2664
  }) })
2669
2665
  ] }) }),
2670
2666
  /* @__PURE__ */ e(
2671
2667
  rn,
2672
2668
  {
2673
- isOpen: A !== null,
2669
+ isOpen: L !== null,
2674
2670
  onClose: () => O(null),
2675
- date: A?.date ?? /* @__PURE__ */ new Date(),
2676
- events: A?.events ?? [],
2677
- anchorRect: A?.rect ?? null,
2671
+ date: L?.date ?? /* @__PURE__ */ new Date(),
2672
+ events: L?.events ?? [],
2673
+ anchorRect: L?.rect ?? null,
2678
2674
  badgeVariant: a,
2679
2675
  onEventClick: i,
2680
- renderEvent: N,
2676
+ renderEvent: v,
2681
2677
  renderPopover: l
2682
2678
  }
2683
2679
  )
2684
2680
  ] });
2685
2681
  }
2686
- const Me = 26, et = 2, Ne = 4;
2687
- function tt(t, n) {
2688
- const o = Ge(t);
2682
+ const Me = 26, Qe = 2, Ne = 4;
2683
+ function et(t, n) {
2684
+ const o = Ve(t);
2689
2685
  for (let i = 0; i < n.length; i++) {
2690
2686
  const f = n[i];
2691
2687
  if (f && le(o, f)) return i;
2692
2688
  }
2693
2689
  const a = n[0];
2694
- return a && o < Ge(a) ? -1 : 7;
2690
+ return a && o < Ve(a) ? -1 : 7;
2695
2691
  }
2696
2692
  function mn(t) {
2697
2693
  const n = [...t].sort((a, i) => {
@@ -2703,13 +2699,13 @@ function mn(t) {
2703
2699
  for (let s = 0; s < o.length; s++) {
2704
2700
  const x = o[s];
2705
2701
  if (!x) continue;
2706
- let N = !0;
2702
+ let v = !0;
2707
2703
  for (let l = a.startCol; l <= a.endCol; l++)
2708
2704
  if (x[l]) {
2709
- N = !1;
2705
+ v = !1;
2710
2706
  break;
2711
2707
  }
2712
- if (N) {
2708
+ if (v) {
2713
2709
  i = s;
2714
2710
  break;
2715
2711
  }
@@ -2730,7 +2726,7 @@ function hn({
2730
2726
  }) {
2731
2727
  const [i, f] = J(!1), s = de(t.event.color), x = W(() => {
2732
2728
  o && n ? n(t.event) : o || f(!0);
2733
- }, [o, n, t.event]), N = W(() => {
2729
+ }, [o, n, t.event]), v = W(() => {
2734
2730
  f(!1);
2735
2731
  }, []), l = /* @__PURE__ */ r(
2736
2732
  "button",
@@ -2762,16 +2758,16 @@ function hn({
2762
2758
  ), y = /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
2763
2759
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.event.title }),
2764
2760
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t.event) })
2765
- ] }) }), v = {
2761
+ ] }) }), w = {
2766
2762
  gridColumn: `${t.startCol + 2} / ${t.endCol + 3}`,
2767
2763
  gridRow: t.row + 1
2768
2764
  };
2769
- return o ? /* @__PURE__ */ e("div", { style: v, children: /* @__PURE__ */ r(ie, { children: [
2765
+ return o ? /* @__PURE__ */ e("div", { style: w, children: /* @__PURE__ */ r(ie, { children: [
2770
2766
  /* @__PURE__ */ e(se, { asChild: !0, children: l }),
2771
2767
  y
2772
- ] }) }) : /* @__PURE__ */ e("div", { style: v, children: /* @__PURE__ */ r(re, { open: i, onOpenChange: f, children: [
2768
+ ] }) }) : /* @__PURE__ */ e("div", { style: w, children: /* @__PURE__ */ r(re, { open: i, onOpenChange: f, children: [
2773
2769
  /* @__PURE__ */ e(oe, { asChild: !0, children: l }),
2774
- /* @__PURE__ */ e(Q, { className: "w-80", children: a ? a({ event: t.event, onClose: N }) : /* @__PURE__ */ e(pn, { event: t.event, onClose: N }) })
2770
+ /* @__PURE__ */ e(Q, { className: "w-80", children: a ? a({ event: t.event, onClose: v }) : /* @__PURE__ */ e(pn, { event: t.event, onClose: v }) })
2775
2771
  ] }) });
2776
2772
  }
2777
2773
  function pn({
@@ -2821,42 +2817,42 @@ function fn({
2821
2817
  onEventClick: f,
2822
2818
  disablePopover: s = !1,
2823
2819
  renderPopover: x,
2824
- className: N
2820
+ className: v
2825
2821
  }) {
2826
2822
  const l = F(() => {
2827
2823
  if (t.length === 0) return [];
2828
- const w = t.map((L) => {
2829
- const T = tt(L.startDate, n), A = tt(L.endDate, n), O = Math.max(0, T), B = Math.min(6, A);
2830
- if (O > 6 || B < 0) return null;
2831
- const E = T < 0, M = A > 6, S = De(L) && le(L.startDate, L.endDate);
2824
+ const N = t.map((_) => {
2825
+ const M = et(_.startDate, n), L = et(_.endDate, n), O = Math.max(0, M), E = Math.min(6, L);
2826
+ if (O > 6 || E < 0) return null;
2827
+ const A = M < 0, S = L > 6, B = De(_) && le(_.startDate, _.endDate);
2832
2828
  return {
2833
- event: L,
2829
+ event: _,
2834
2830
  startCol: O,
2835
- endCol: B,
2836
- continuesBefore: E,
2837
- continuesAfter: M,
2838
- isSingleDayAllDay: S
2831
+ endCol: E,
2832
+ continuesBefore: A,
2833
+ continuesAfter: S,
2834
+ isSingleDayAllDay: B
2839
2835
  };
2840
2836
  }).filter(Boolean);
2841
- return mn(w);
2837
+ return mn(N);
2842
2838
  }, [t, n]);
2843
2839
  if (l.length === 0) return null;
2844
- const y = Math.max(...l.map((w) => w.row)) + 1, v = Math.min(y, Ne), m = y > Ne, g = m ? l.filter((w) => w.row >= Ne).length : 0, u = [
2840
+ const y = Math.max(...l.map((N) => N.row)) + 1, w = Math.min(y, Ne), m = y > Ne, g = m ? l.filter((N) => N.row >= Ne).length : 0, u = [
2845
2841
  `${o}px`,
2846
- ...i.map((w) => w > a ? `${w}px` : `minmax(${a}px, 1fr)`)
2847
- ].join(" "), b = v * Me + (v - 1) * et + 8;
2842
+ ...i.map((N) => N > a ? `${N}px` : `minmax(${a}px, 1fr)`)
2843
+ ].join(" "), b = w * Me + (w - 1) * Qe + 8;
2848
2844
  return /* @__PURE__ */ r(
2849
2845
  "div",
2850
2846
  {
2851
2847
  className: d(
2852
2848
  "ic-all-day-row border-b bg-muted/20 relative",
2853
- N
2849
+ v
2854
2850
  ),
2855
2851
  style: {
2856
2852
  display: "grid",
2857
2853
  gridTemplateColumns: u,
2858
- gridTemplateRows: `repeat(${v}, ${Me}px)`,
2859
- gap: `${et}px 0`,
2854
+ gridTemplateRows: `repeat(${w}, ${Me}px)`,
2855
+ gap: `${Qe}px 0`,
2860
2856
  paddingTop: 4,
2861
2857
  paddingBottom: 4,
2862
2858
  minHeight: b
@@ -2868,31 +2864,31 @@ function fn({
2868
2864
  className: "flex items-start justify-center pt-1 text-[10px] font-medium text-muted-foreground",
2869
2865
  style: {
2870
2866
  gridColumn: 1,
2871
- gridRow: `1 / span ${v}`
2867
+ gridRow: `1 / span ${w}`
2872
2868
  },
2873
2869
  children: /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: "All day" })
2874
2870
  }
2875
2871
  ),
2876
- n.map((w, L) => /* @__PURE__ */ e(
2872
+ n.map((N, _) => /* @__PURE__ */ e(
2877
2873
  "div",
2878
2874
  {
2879
2875
  className: "pointer-events-none border-r last:border-r-0",
2880
2876
  style: {
2881
- gridColumn: L + 2,
2882
- gridRow: `1 / span ${v}`
2877
+ gridColumn: _ + 2,
2878
+ gridRow: `1 / span ${w}`
2883
2879
  }
2884
2880
  },
2885
- w.toDateString()
2881
+ N.toDateString()
2886
2882
  )),
2887
- l.filter((w) => w.row < Ne).map((w) => /* @__PURE__ */ e(
2883
+ l.filter((N) => N.row < Ne).map((N) => /* @__PURE__ */ e(
2888
2884
  hn,
2889
2885
  {
2890
- pe: w,
2886
+ pe: N,
2891
2887
  onEventClick: f,
2892
2888
  disablePopover: s,
2893
2889
  renderPopover: x
2894
2890
  },
2895
- w.event.id
2891
+ N.event.id
2896
2892
  )),
2897
2893
  m && /* @__PURE__ */ r(
2898
2894
  "div",
@@ -2900,7 +2896,7 @@ function fn({
2900
2896
  className: "text-[10px] text-muted-foreground font-medium px-2 flex items-center",
2901
2897
  style: {
2902
2898
  gridColumn: `2 / ${n.length + 2}`,
2903
- gridRow: v
2899
+ gridRow: w
2904
2900
  },
2905
2901
  children: [
2906
2902
  "+",
@@ -2913,8 +2909,8 @@ function fn({
2913
2909
  }
2914
2910
  );
2915
2911
  }
2916
- const ue = 96, xe = 56, nt = 72, Z = 120, ke = 100, gn = 3;
2917
- function zn({
2912
+ const ue = 96, xe = 56, tt = 72, Z = 120, ke = 100, gn = 3;
2913
+ function Wn({
2918
2914
  events: t,
2919
2915
  date: n,
2920
2916
  weekStartsOn: o = 1,
@@ -2923,30 +2919,30 @@ function zn({
2923
2919
  slotDuration: f = 30,
2924
2920
  badgeVariant: s = "colored",
2925
2921
  onEventClick: x,
2926
- onSlotSelect: N,
2922
+ onSlotSelect: v,
2927
2923
  onDayClick: l,
2928
2924
  className: y,
2929
- renderEvent: v,
2925
+ renderEvent: w,
2930
2926
  renderPopover: m,
2931
2927
  slots: g,
2932
2928
  classNames: u
2933
2929
  }) {
2934
- const b = 60 / f, w = 100 / b, L = F(() => {
2930
+ const b = 60 / f, N = 100 / b, _ = F(() => {
2935
2931
  const c = [];
2936
2932
  for (let p = 0; p < b; p++)
2937
2933
  c.push(p * f);
2938
2934
  return c;
2939
- }, [b, f]), T = F(
2935
+ }, [b, f]), M = F(
2940
2936
  () => wt(n, o),
2941
2937
  [n, o]
2942
- ), A = F(
2943
- () => at(a),
2938
+ ), L = F(
2939
+ () => ot(a),
2944
2940
  [a]
2945
2941
  ), O = F(() => {
2946
2942
  const c = /* @__PURE__ */ new Map();
2947
- for (const p of T) {
2948
- const C = p.toDateString(), H = He(t, p), { singleDay: z, multiDay: Y } = rt(H), j = ot(
2949
- z,
2943
+ for (const p of M) {
2944
+ const C = p.toDateString(), H = He(t, p), { singleDay: T, multiDay: Y } = nt(H), j = rt(
2945
+ T,
2950
2946
  p,
2951
2947
  a,
2952
2948
  ue
@@ -2958,32 +2954,32 @@ function zn({
2958
2954
  U = Math.max(U, ae);
2959
2955
  }
2960
2956
  c.set(C, {
2961
- singleDay: z,
2957
+ singleDay: T,
2962
2958
  multiDay: Y,
2963
2959
  positions: G,
2964
2960
  maxOverlapping: U
2965
2961
  });
2966
2962
  }
2967
2963
  return c;
2968
- }, [T, t, a]), B = F(() => {
2964
+ }, [M, t, a]), E = F(() => {
2969
2965
  const c = /* @__PURE__ */ new Map();
2970
2966
  for (const { multiDay: p } of O.values())
2971
2967
  for (const C of p)
2972
2968
  c.set(C.id, C);
2973
2969
  return Array.from(c.values());
2974
- }, [O]), E = /* @__PURE__ */ new Date(), M = T.findIndex((c) => ce(c)), I = F(() => {
2975
- if (M < 0) return -1;
2976
- const c = E.getHours() + E.getMinutes() / 60;
2970
+ }, [O]), A = /* @__PURE__ */ new Date(), S = M.findIndex((c) => ce(c)), I = F(() => {
2971
+ if (S < 0) return -1;
2972
+ const c = A.getHours() + A.getMinutes() / 60;
2977
2973
  return c < a.startHour || c > a.endHour ? -1 : (c - a.startHour) * ue;
2978
- }, [M, a, E]), S = te(null);
2974
+ }, [S, a, A]), B = te(null);
2979
2975
  Ie(() => {
2980
- const c = S.current;
2976
+ const c = B.current;
2981
2977
  if (!c) return;
2982
2978
  const p = () => {
2983
2979
  let C;
2984
- if (M !== -1) {
2985
- const z = (/* @__PURE__ */ new Date()).getHours();
2986
- C = Math.max(z - 1, a.startHour);
2980
+ if (S !== -1) {
2981
+ const T = (/* @__PURE__ */ new Date()).getHours();
2982
+ C = Math.max(T - 1, a.startHour);
2987
2983
  } else {
2988
2984
  const Y = (/* @__PURE__ */ new Date()).getDay();
2989
2985
  let j = i?.[Y];
@@ -3005,7 +3001,7 @@ function zn({
3005
3001
  requestAnimationFrame(() => {
3006
3002
  requestAnimationFrame(p);
3007
3003
  });
3008
- }, [n, i, a, M]);
3004
+ }, [n, i, a, S]);
3009
3005
  const $ = Oe(), q = W(
3010
3006
  (c) => {
3011
3007
  $?.startSelection(c);
@@ -3018,31 +3014,31 @@ function zn({
3018
3014
  [$]
3019
3015
  ), h = W(() => {
3020
3016
  $?.endSelection();
3021
- }, [$]), _ = W(
3017
+ }, [$]), z = W(
3022
3018
  (c) => {
3023
3019
  x?.(c);
3024
3020
  },
3025
3021
  [x]
3026
3022
  ), R = xe + 7 * Z, P = F(() => {
3027
3023
  const c = [];
3028
- for (const p of T) {
3029
- const C = p.toDateString(), z = O.get(C)?.maxOverlapping ?? 1;
3030
- z > gn ? c.push(
3031
- Math.max(Z, z * ke)
3024
+ for (const p of M) {
3025
+ const C = p.toDateString(), T = O.get(C)?.maxOverlapping ?? 1;
3026
+ T > gn ? c.push(
3027
+ Math.max(Z, T * ke)
3032
3028
  ) : c.push(Z);
3033
3029
  }
3034
3030
  return c;
3035
- }, [T, O]), k = xe + P.reduce((c, p) => c + p, 0);
3031
+ }, [M, O]), k = xe + P.reduce((c, p) => c + p, 0);
3036
3032
  return /* @__PURE__ */ r("div", { className: d("ic-week-view flex flex-col h-full", y), children: [
3037
- B.length > 0 && /* @__PURE__ */ e(
3033
+ E.length > 0 && /* @__PURE__ */ e(
3038
3034
  fn,
3039
3035
  {
3040
- events: B,
3041
- weekDays: T,
3036
+ events: E,
3037
+ weekDays: M,
3042
3038
  hourColumnWidth: xe,
3043
3039
  minDayColumnWidth: Z,
3044
3040
  dayColumnWidths: P,
3045
- onEventClick: _,
3041
+ onEventClick: z,
3046
3042
  disablePopover: !!x && !m,
3047
3043
  renderPopover: m,
3048
3044
  ...u?.multiDayBanner && {
@@ -3053,7 +3049,7 @@ function zn({
3053
3049
  /* @__PURE__ */ e(
3054
3050
  "div",
3055
3051
  {
3056
- ref: S,
3052
+ ref: B,
3057
3053
  className: d(
3058
3054
  "ic-week-scroll-container flex-1",
3059
3055
  u?.scrollContainer
@@ -3064,7 +3060,7 @@ function zn({
3064
3060
  "div",
3065
3061
  {
3066
3062
  className: "flex-shrink-0 flex items-end justify-center pb-2 text-[10px] text-muted-foreground/70",
3067
- style: { width: xe, height: nt },
3063
+ style: { width: xe, height: tt },
3068
3064
  children: /* @__PURE__ */ r("span", { className: "hidden sm:inline", children: [
3069
3065
  "GMT",
3070
3066
  (() => {
@@ -3074,8 +3070,8 @@ function zn({
3074
3070
  ] })
3075
3071
  }
3076
3072
  ),
3077
- T.map((c, p) => {
3078
- const C = ce(c), H = P[p] ?? Z, z = H > Z;
3073
+ M.map((c, p) => {
3074
+ const C = ce(c), H = P[p] ?? Z, T = H > Z;
3079
3075
  return /* @__PURE__ */ r(
3080
3076
  "div",
3081
3077
  {
@@ -3085,8 +3081,8 @@ function zn({
3085
3081
  C && u?.columnHeaderToday
3086
3082
  ),
3087
3083
  style: {
3088
- height: nt,
3089
- minWidth: z ? H : Z
3084
+ height: tt,
3085
+ minWidth: T ? H : Z
3090
3086
  },
3091
3087
  children: [
3092
3088
  /* @__PURE__ */ e(
@@ -3127,7 +3123,7 @@ function zn({
3127
3123
  u?.timeGutter
3128
3124
  ),
3129
3125
  style: { width: xe },
3130
- children: A.map((c, p) => /* @__PURE__ */ e(
3126
+ children: L.map((c, p) => /* @__PURE__ */ e(
3131
3127
  "div",
3132
3128
  {
3133
3129
  className: "relative",
@@ -3147,18 +3143,18 @@ function zn({
3147
3143
  ))
3148
3144
  }
3149
3145
  ),
3150
- /* @__PURE__ */ e("div", { className: "ic-week-grid relative flex-1", children: /* @__PURE__ */ e("div", { className: "flex divide-x", children: T.map((c, p) => {
3151
- const C = c.toDateString(), H = O.get(C), z = P[p] ?? Z, Y = z > Z;
3146
+ /* @__PURE__ */ e("div", { className: "ic-week-grid relative flex-1", children: /* @__PURE__ */ e("div", { className: "flex divide-x", children: M.map((c, p) => {
3147
+ const C = c.toDateString(), H = O.get(C), T = P[p] ?? Z, Y = T > Z;
3152
3148
  return /* @__PURE__ */ r(
3153
3149
  "div",
3154
3150
  {
3155
3151
  className: "ic-day-column relative flex-1",
3156
3152
  style: {
3157
- minWidth: Y ? z : Z
3153
+ minWidth: Y ? T : Z
3158
3154
  },
3159
3155
  children: [
3160
- A.map((j, G) => {
3161
- const K = !it(
3156
+ L.map((j, G) => {
3157
+ const K = !at(
3162
3158
  c,
3163
3159
  j,
3164
3160
  i
@@ -3176,7 +3172,7 @@ function zn({
3176
3172
  style: { height: ue },
3177
3173
  children: [
3178
3174
  G !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
3179
- L.slice(1).map((ae) => /* @__PURE__ */ e(
3175
+ _.slice(1).map((ae) => /* @__PURE__ */ e(
3180
3176
  "div",
3181
3177
  {
3182
3178
  className: "pointer-events-none absolute inset-x-0 border-b border-dashed border-border/30",
@@ -3184,8 +3180,8 @@ function zn({
3184
3180
  },
3185
3181
  ae
3186
3182
  )),
3187
- L.map((ae, ht) => {
3188
- const Ve = {
3183
+ _.map((ae, ht) => {
3184
+ const Fe = {
3189
3185
  date: c,
3190
3186
  hour: j,
3191
3187
  minute: ae
@@ -3193,17 +3189,17 @@ function zn({
3193
3189
  return /* @__PURE__ */ e(
3194
3190
  mt,
3195
3191
  {
3196
- slot: Ve,
3192
+ slot: Fe,
3197
3193
  onSelectionStart: q,
3198
3194
  onSelectionMove: D,
3199
3195
  onSelectionEnd: h,
3200
- isSelected: $?.isSlotSelected(Ve) ?? !1,
3196
+ isSelected: $?.isSlotSelected(Fe) ?? !1,
3201
3197
  isSelecting: $?.isSelecting ?? !1,
3202
3198
  disabled: K,
3203
3199
  className: "absolute inset-x-0",
3204
3200
  style: {
3205
- top: `${ht * w}%`,
3206
- height: `${w}%`
3201
+ top: `${ht * N}%`,
3202
+ height: `${N}%`
3207
3203
  },
3208
3204
  ariaLabel: `Add event on ${c.toLocaleDateString()} at ${Ce(j)}:${String(ae).padStart(2, "0")}`
3209
3205
  },
@@ -3219,7 +3215,7 @@ function zn({
3219
3215
  const G = H.positions.get(j.id);
3220
3216
  if (!G) return null;
3221
3217
  const U = `calc(${G.width}% - 2px)`, K = `max(${ke}px, ${U})`;
3222
- return v ? /* @__PURE__ */ e(
3218
+ return w ? /* @__PURE__ */ e(
3223
3219
  "div",
3224
3220
  {
3225
3221
  className: "absolute pointer-events-auto p-0.5",
@@ -3229,7 +3225,7 @@ function zn({
3229
3225
  width: K,
3230
3226
  minWidth: `${ke}px`
3231
3227
  },
3232
- children: v({ event: j, position: G })
3228
+ children: w({ event: j, position: G })
3233
3229
  },
3234
3230
  j.id
3235
3231
  ) : /* @__PURE__ */ e(
@@ -3255,7 +3251,7 @@ function zn({
3255
3251
  j.id
3256
3252
  );
3257
3253
  }),
3258
- p === M && I >= 0 && /* @__PURE__ */ r(
3254
+ p === S && I >= 0 && /* @__PURE__ */ r(
3259
3255
  "div",
3260
3256
  {
3261
3257
  className: d(
@@ -3289,7 +3285,7 @@ export {
3289
3285
  Tn as M,
3290
3286
  re as P,
3291
3287
  mt as T,
3292
- zn as W,
3288
+ Wn as W,
3293
3289
  rn as a,
3294
3290
  dn as b,
3295
3291
  Mn as c,
@@ -3306,10 +3302,10 @@ export {
3306
3302
  se as n,
3307
3303
  kt as o,
3308
3304
  de as p,
3309
- Xe as q,
3310
- Ye as r,
3305
+ Ke as q,
3306
+ Xe as r,
3311
3307
  _e as s,
3312
3308
  Be as t,
3313
3309
  Pt as u
3314
3310
  };
3315
- //# sourceMappingURL=week-view-DbktCaJh.js.map
3311
+ //# sourceMappingURL=week-view-C4YFlrPS.js.map