@innosolutions/inno-calendar 1.0.21 → 1.0.22

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-dropdown-D8rfvI3Q.js → agenda-dropdown-CXEm80us.js} +665 -661
  2. package/dist/agenda-dropdown-CXEm80us.js.map +1 -0
  3. package/dist/agenda-dropdown-DscR56sP.cjs +2 -0
  4. package/dist/agenda-dropdown-DscR56sP.cjs.map +1 -0
  5. package/dist/agenda-view-CVYk83hH.cjs +11 -0
  6. package/dist/{agenda-view-BotvTTEB.cjs.map → agenda-view-CVYk83hH.cjs.map} +1 -1
  7. package/dist/{agenda-view-CRI1J_KB.js → agenda-view-DM01Fpvr.js} +795 -733
  8. package/dist/{agenda-view-CRI1J_KB.js.map → agenda-view-DM01Fpvr.js.map} +1 -1
  9. package/dist/components/index.cjs +1 -1
  10. package/dist/components/index.mjs +2 -2
  11. package/dist/components/inno-calendar.d.ts +7 -1
  12. package/dist/components/inno-calendar.d.ts.map +1 -1
  13. package/dist/components/views/month-view.d.ts +7 -1
  14. package/dist/components/views/month-view.d.ts.map +1 -1
  15. package/dist/components/views/timeline-view.d.ts +1 -1
  16. package/dist/components/views/timeline-view.d.ts.map +1 -1
  17. package/dist/index.cjs +1 -1
  18. package/dist/index.mjs +3 -3
  19. package/dist/presets/index.cjs +1 -1
  20. package/dist/presets/index.mjs +1 -1
  21. package/dist/{tailwind-calendar-CQBD-ljO.cjs → tailwind-calendar-BvdxZ56F.cjs} +2 -2
  22. package/dist/{tailwind-calendar-CQBD-ljO.cjs.map → tailwind-calendar-BvdxZ56F.cjs.map} +1 -1
  23. package/dist/{tailwind-calendar-Y9dn5uKm.js → tailwind-calendar-DtZENWzv.js} +2 -2
  24. package/dist/{tailwind-calendar-Y9dn5uKm.js.map → tailwind-calendar-DtZENWzv.js.map} +1 -1
  25. package/package.json +1 -1
  26. package/dist/agenda-dropdown-D8rfvI3Q.js.map +0 -1
  27. package/dist/agenda-dropdown-oY4qocpp.cjs +0 -2
  28. package/dist/agenda-dropdown-oY4qocpp.cjs.map +0 -1
  29. package/dist/agenda-view-BotvTTEB.cjs +0 -11
@@ -1,41 +1,41 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
- import { a as nt, c as m } from "./index-DtaLkIY8.js";
2
+ import { a as nt, c as u } from "./index-DtaLkIY8.js";
3
3
  import * as K from "react";
4
- import { forwardRef as Ce, createElement as Ne, useMemo as B, useState as le, useCallback as S, useRef as ne, useEffect as rt, useLayoutEffect as Pe } from "react";
5
- import * as I from "@radix-ui/react-dropdown-menu";
6
- import { a7 as at, ad as ot, aY as Se, av as Ee, a8 as Me, aJ as Ve, w as Fe, ah as Ue, az as Z, aZ as ze, aB as qe, V as xe, ai as st, aQ as it, Z as lt, ao as dt } from "./slot-selection-context-CZjfJAcp.js";
4
+ import { forwardRef as Se, createElement as Ne, useMemo as P, useState as ne, useCallback as z, useRef as oe, useEffect as rt, useLayoutEffect as Fe } from "react";
5
+ import * as j from "@radix-ui/react-dropdown-menu";
6
+ import { a7 as at, ad as ot, aY as Me, av as $e, a8 as ze, aJ as Ve, w as Ue, ah as qe, az as Q, aZ as Te, aB as Ke, V as be, ai as st, aQ as it, Z as lt, ao as dt } from "./slot-selection-context-CZjfJAcp.js";
7
7
  import * as de from "@radix-ui/react-popover";
8
8
  import * as me from "@radix-ui/react-tooltip";
9
- const $e = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, _e = nt, Ke = (t, n) => (r) => {
9
+ const _e = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Ae = nt, Ye = (t, n) => (r) => {
10
10
  var o;
11
- if (n?.variants == null) return _e(t, r?.class, r?.className);
12
- const { variants: d, defaultVariants: f } = n, i = Object.keys(d).map((p) => {
13
- const h = r?.[p], b = f?.[p];
11
+ if (n?.variants == null) return Ae(t, r?.class, r?.className);
12
+ const { variants: i, defaultVariants: f } = n, l = Object.keys(i).map((m) => {
13
+ const h = r?.[m], y = f?.[m];
14
14
  if (h === null) return null;
15
- const l = $e(h) || $e(b);
16
- return d[p][l];
17
- }), g = r && Object.entries(r).reduce((p, h) => {
18
- let [b, l] = h;
19
- return l === void 0 || (p[b] = l), p;
20
- }, {}), D = n == null || (o = n.compoundVariants) === null || o === void 0 ? void 0 : o.reduce((p, h) => {
21
- let { class: b, className: l, ...w } = h;
22
- return Object.entries(w).every((v) => {
23
- let [k, M] = v;
24
- return Array.isArray(M) ? M.includes({
15
+ const d = _e(h) || _e(y);
16
+ return i[m][d];
17
+ }), x = r && Object.entries(r).reduce((m, h) => {
18
+ let [y, d] = h;
19
+ return d === void 0 || (m[y] = d), m;
20
+ }, {}), D = n == null || (o = n.compoundVariants) === null || o === void 0 ? void 0 : o.reduce((m, h) => {
21
+ let { class: y, className: d, ...w } = h;
22
+ return Object.entries(w).every((k) => {
23
+ let [b, W] = k;
24
+ return Array.isArray(W) ? W.includes({
25
25
  ...f,
26
- ...g
27
- }[k]) : {
26
+ ...x
27
+ }[b]) : {
28
28
  ...f,
29
- ...g
30
- }[k] === M;
29
+ ...x
30
+ }[b] === W;
31
31
  }) ? [
32
- ...p,
33
- b,
34
- l
35
- ] : p;
32
+ ...m,
33
+ y,
34
+ d
35
+ ] : m;
36
36
  }, []);
37
- return _e(t, i, D, r?.class, r?.className);
38
- }, ct = Ke(
37
+ return Ae(t, l, D, r?.class, r?.className);
38
+ }, ct = Ye(
39
39
  "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",
40
40
  {
41
41
  variants: {
@@ -59,14 +59,14 @@ const $e = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, _e = nt, K
59
59
  size: "default"
60
60
  }
61
61
  }
62
- ), oe = Ce(
63
- ({ className: t, variant: n, size: r, loading: o, disabled: d, children: f, ...i }, g) => /* @__PURE__ */ a(
62
+ ), le = Se(
63
+ ({ className: t, variant: n, size: r, loading: o, disabled: i, children: f, ...l }, x) => /* @__PURE__ */ a(
64
64
  "button",
65
65
  {
66
- className: m(ct({ variant: n, size: r, className: t })),
67
- ref: g,
68
- disabled: d || o,
69
- ...i,
66
+ className: u(ct({ variant: n, size: r, className: t })),
67
+ ref: x,
68
+ disabled: i || o,
69
+ ...l,
70
70
  children: [
71
71
  o && /* @__PURE__ */ a(
72
72
  "svg",
@@ -103,14 +103,14 @@ const $e = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, _e = nt, K
103
103
  }
104
104
  )
105
105
  );
106
- oe.displayName = "Button";
107
- const Ye = (...t) => t.filter((n, r, o) => !!n && n.trim() !== "" && o.indexOf(n) === r).join(" ").trim();
106
+ le.displayName = "Button";
107
+ const Ge = (...t) => t.filter((n, r, o) => !!n && n.trim() !== "" && o.indexOf(n) === r).join(" ").trim();
108
108
  const ut = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
109
109
  const mt = (t) => t.replace(
110
110
  /^([A-Z])|[\s-_]+(\w)/g,
111
111
  (n, r, o) => o ? o.toUpperCase() : r.toLowerCase()
112
112
  );
113
- const Ae = (t) => {
113
+ const Ie = (t) => {
114
114
  const n = mt(t);
115
115
  return n.charAt(0).toUpperCase() + n.slice(1);
116
116
  };
@@ -131,16 +131,16 @@ const ft = (t) => {
131
131
  return !0;
132
132
  return !1;
133
133
  };
134
- const pt = Ce(
134
+ const pt = Se(
135
135
  ({
136
136
  color: t = "currentColor",
137
137
  size: n = 24,
138
138
  strokeWidth: r = 2,
139
139
  absoluteStrokeWidth: o,
140
- className: d = "",
140
+ className: i = "",
141
141
  children: f,
142
- iconNode: i,
143
- ...g
142
+ iconNode: l,
143
+ ...x
144
144
  }, D) => Ne(
145
145
  "svg",
146
146
  {
@@ -150,38 +150,38 @@ const pt = Ce(
150
150
  height: n,
151
151
  stroke: t,
152
152
  strokeWidth: o ? Number(r) * 24 / Number(n) : r,
153
- className: Ye("lucide", d),
154
- ...!f && !ft(g) && { "aria-hidden": "true" },
155
- ...g
153
+ className: Ge("lucide", i),
154
+ ...!f && !ft(x) && { "aria-hidden": "true" },
155
+ ...x
156
156
  },
157
157
  [
158
- ...i.map(([p, h]) => Ne(p, h)),
158
+ ...l.map(([m, h]) => Ne(m, h)),
159
159
  ...Array.isArray(f) ? f : [f]
160
160
  ]
161
161
  )
162
162
  );
163
- const Te = (t, n) => {
164
- const r = Ce(
165
- ({ className: o, ...d }, f) => Ne(pt, {
163
+ const We = (t, n) => {
164
+ const r = Se(
165
+ ({ className: o, ...i }, f) => Ne(pt, {
166
166
  ref: f,
167
167
  iconNode: n,
168
- className: Ye(
169
- `lucide-${ut(Ae(t))}`,
168
+ className: Ge(
169
+ `lucide-${ut(Ie(t))}`,
170
170
  `lucide-${t}`,
171
171
  o
172
172
  ),
173
- ...d
173
+ ...i
174
174
  })
175
175
  );
176
- return r.displayName = Ae(t), r;
176
+ return r.displayName = Ie(t), r;
177
177
  };
178
- const gt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], xt = Te("check", gt);
179
- const bt = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], yt = Te("chevron-right", bt);
180
- const wt = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], vt = Te("circle", wt), Ie = I.Root, Re = I.Trigger, Nt = K.forwardRef(({ className: t, inset: n, children: r, ...o }, d) => /* @__PURE__ */ a(
181
- I.SubTrigger,
178
+ const gt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], xt = We("check", gt);
179
+ const bt = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], yt = We("chevron-right", bt);
180
+ const wt = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], vt = We("circle", wt), Re = j.Root, je = j.Trigger, Nt = K.forwardRef(({ className: t, inset: n, children: r, ...o }, i) => /* @__PURE__ */ a(
181
+ j.SubTrigger,
182
182
  {
183
- ref: d,
184
- className: m(
183
+ ref: i,
184
+ className: u(
185
185
  "flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
186
186
  n && "pl-8",
187
187
  t
@@ -193,37 +193,37 @@ const wt = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], vt = Te
193
193
  ]
194
194
  }
195
195
  ));
196
- Nt.displayName = I.SubTrigger.displayName;
196
+ Nt.displayName = j.SubTrigger.displayName;
197
197
  const kt = K.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
198
- I.SubContent,
198
+ j.SubContent,
199
199
  {
200
200
  ref: r,
201
- className: m(
201
+ className: u(
202
202
  "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
203
203
  t
204
204
  ),
205
205
  ...n
206
206
  }
207
207
  ));
208
- kt.displayName = I.SubContent.displayName;
209
- const ke = K.forwardRef(({ className: t, sideOffset: n = 4, ...r }, o) => /* @__PURE__ */ e(I.Portal, { children: /* @__PURE__ */ e(
210
- I.Content,
208
+ kt.displayName = j.SubContent.displayName;
209
+ const ke = K.forwardRef(({ className: t, sideOffset: n = 4, ...r }, o) => /* @__PURE__ */ e(j.Portal, { children: /* @__PURE__ */ e(
210
+ j.Content,
211
211
  {
212
212
  ref: o,
213
213
  sideOffset: n,
214
- className: m(
214
+ className: u(
215
215
  "z-50 rounded-xl border bg-popover p-1 text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
216
216
  t
217
217
  ),
218
218
  ...r
219
219
  }
220
220
  ) }));
221
- ke.displayName = I.Content.displayName;
221
+ ke.displayName = j.Content.displayName;
222
222
  const De = K.forwardRef(({ className: t, inset: n, ...r }, o) => /* @__PURE__ */ e(
223
- I.Item,
223
+ j.Item,
224
224
  {
225
225
  ref: o,
226
- className: m(
226
+ className: u(
227
227
  "relative flex cursor-pointer select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
228
228
  n && "pl-8",
229
229
  t
@@ -231,72 +231,72 @@ const De = K.forwardRef(({ className: t, inset: n, ...r }, o) => /* @__PURE__ */
231
231
  ...r
232
232
  }
233
233
  ));
234
- De.displayName = I.Item.displayName;
235
- const Dt = K.forwardRef(({ className: t, children: n, checked: r = !1, ...o }, d) => /* @__PURE__ */ a(
236
- I.CheckboxItem,
234
+ De.displayName = j.Item.displayName;
235
+ const Dt = K.forwardRef(({ className: t, children: n, checked: r = !1, ...o }, i) => /* @__PURE__ */ a(
236
+ j.CheckboxItem,
237
237
  {
238
- ref: d,
239
- className: m(
238
+ ref: i,
239
+ className: u(
240
240
  "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
241
241
  t
242
242
  ),
243
243
  checked: r,
244
244
  ...o,
245
245
  children: [
246
- /* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(I.ItemIndicator, { children: /* @__PURE__ */ e(xt, { className: "h-4 w-4" }) }) }),
246
+ /* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(j.ItemIndicator, { children: /* @__PURE__ */ e(xt, { className: "h-4 w-4" }) }) }),
247
247
  n
248
248
  ]
249
249
  }
250
250
  ));
251
- Dt.displayName = I.CheckboxItem.displayName;
251
+ Dt.displayName = j.CheckboxItem.displayName;
252
252
  const Ct = K.forwardRef(({ className: t, children: n, ...r }, o) => /* @__PURE__ */ a(
253
- I.RadioItem,
253
+ j.RadioItem,
254
254
  {
255
255
  ref: o,
256
- className: m(
256
+ className: u(
257
257
  "relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
258
258
  t
259
259
  ),
260
260
  ...r,
261
261
  children: [
262
- /* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(I.ItemIndicator, { children: /* @__PURE__ */ e(vt, { className: "h-2 w-2 fill-current" }) }) }),
262
+ /* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(j.ItemIndicator, { children: /* @__PURE__ */ e(vt, { className: "h-2 w-2 fill-current" }) }) }),
263
263
  n
264
264
  ]
265
265
  }
266
266
  ));
267
- Ct.displayName = I.RadioItem.displayName;
267
+ Ct.displayName = j.RadioItem.displayName;
268
268
  const St = K.forwardRef(({ className: t, inset: n, ...r }, o) => /* @__PURE__ */ e(
269
- I.Label,
269
+ j.Label,
270
270
  {
271
271
  ref: o,
272
- className: m("px-2 py-1.5 text-sm font-semibold", n && "pl-8", t),
272
+ className: u("px-2 py-1.5 text-sm font-semibold", n && "pl-8", t),
273
273
  ...r
274
274
  }
275
275
  ));
276
- St.displayName = I.Label.displayName;
276
+ St.displayName = j.Label.displayName;
277
277
  const Mt = K.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
278
- I.Separator,
278
+ j.Separator,
279
279
  {
280
280
  ref: r,
281
- className: m("-mx-1 my-1 h-px bg-muted", t),
281
+ className: u("-mx-1 my-1 h-px bg-muted", t),
282
282
  ...n
283
283
  }
284
284
  ));
285
- Mt.displayName = I.Separator.displayName;
286
- const se = de.Root, ie = de.Trigger, tn = de.Anchor, Q = K.forwardRef(({ className: t, align: n = "center", sideOffset: r = 4, ...o }, d) => /* @__PURE__ */ e(de.Portal, { children: /* @__PURE__ */ e(
285
+ Mt.displayName = j.Separator.displayName;
286
+ const ee = de.Root, te = de.Trigger, tn = de.Anchor, J = K.forwardRef(({ className: t, align: n = "center", sideOffset: r = 4, ...o }, i) => /* @__PURE__ */ e(de.Portal, { children: /* @__PURE__ */ e(
287
287
  de.Content,
288
288
  {
289
- ref: d,
289
+ ref: i,
290
290
  align: n,
291
291
  sideOffset: r,
292
- className: m(
292
+ className: u(
293
293
  "z-50 w-72 rounded-xl border bg-white text-popover-foreground outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
294
294
  t
295
295
  ),
296
296
  ...o
297
297
  }
298
298
  ) }));
299
- Q.displayName = de.Content.displayName;
299
+ J.displayName = de.Content.displayName;
300
300
  const zt = [
301
301
  "JAN",
302
302
  "FEB",
@@ -317,7 +317,7 @@ function Tt({ onClick: t, className: n }) {
317
317
  "button",
318
318
  {
319
319
  type: "button",
320
- className: m(
320
+ className: u(
321
321
  "flex size-11 sm:size-14 flex-col items-start overflow-hidden rounded-lg border shrink-0",
322
322
  "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
323
323
  "hover:bg-accent/50 transition-colors",
@@ -331,7 +331,7 @@ function Tt({ onClick: t, className: n }) {
331
331
  }
332
332
  );
333
333
  }
334
- const Wt = Ke(
334
+ const Wt = Ye(
335
335
  "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
336
336
  {
337
337
  variants: {
@@ -346,7 +346,7 @@ const Wt = Ke(
346
346
  }
347
347
  );
348
348
  function Lt({ className: t, variant: n, ...r }) {
349
- return /* @__PURE__ */ e("div", { className: m(Wt({ variant: n }), t), ...r });
349
+ return /* @__PURE__ */ e("div", { className: u(Wt({ variant: n }), t), ...r });
350
350
  }
351
351
  function Et({ className: t }) {
352
352
  return /* @__PURE__ */ e(
@@ -403,20 +403,20 @@ function At({
403
403
  view: n,
404
404
  events: r = [],
405
405
  onNavigatePrev: o,
406
- onNavigateNext: d,
406
+ onNavigateNext: i,
407
407
  weekStartsOn: f = 1,
408
- showEventCount: i = !0,
409
- className: g
408
+ showEventCount: l = !0,
409
+ className: x
410
410
  }) {
411
- const D = _t[t.getMonth()], p = t.getFullYear(), h = i ? at(r, t, n, f) : 0, b = ot(t, n);
412
- return /* @__PURE__ */ a("div", { className: m("min-w-0 flex-1", g), children: [
411
+ const D = _t[t.getMonth()], m = t.getFullYear(), h = l ? at(r, t, n, f) : 0, y = ot(t, n);
412
+ return /* @__PURE__ */ a("div", { className: u("min-w-0 flex-1", x), children: [
413
413
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1.5 sm:gap-2 flex-wrap", children: [
414
414
  /* @__PURE__ */ a("span", { className: "text-base sm:text-lg font-semibold truncate", children: [
415
415
  D,
416
416
  " ",
417
- p
417
+ m
418
418
  ] }),
419
- i && /* @__PURE__ */ e(
419
+ l && /* @__PURE__ */ e(
420
420
  Lt,
421
421
  {
422
422
  variant: "outline",
@@ -427,7 +427,7 @@ function At({
427
427
  ] }),
428
428
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1.5 sm:gap-2", children: [
429
429
  /* @__PURE__ */ e(
430
- oe,
430
+ le,
431
431
  {
432
432
  variant: "outline",
433
433
  size: "icon",
@@ -436,14 +436,14 @@ function At({
436
436
  children: /* @__PURE__ */ e(Et, {})
437
437
  }
438
438
  ),
439
- /* @__PURE__ */ e("p", { className: "text-xs sm:text-sm text-muted-foreground truncate", children: b }),
439
+ /* @__PURE__ */ e("p", { className: "text-xs sm:text-sm text-muted-foreground truncate", children: y }),
440
440
  /* @__PURE__ */ e(
441
- oe,
441
+ le,
442
442
  {
443
443
  variant: "outline",
444
444
  size: "icon",
445
445
  className: "size-5 sm:size-6 [&_svg]:size-3 sm:[&_svg]:size-4",
446
- onClick: d,
446
+ onClick: i,
447
447
  children: /* @__PURE__ */ e($t, {})
448
448
  }
449
449
  )
@@ -479,7 +479,7 @@ function It({ className: t }) {
479
479
  }
480
480
  );
481
481
  }
482
- function ge({ className: t }) {
482
+ function xe({ className: t }) {
483
483
  return /* @__PURE__ */ a(
484
484
  "svg",
485
485
  {
@@ -502,7 +502,7 @@ function ge({ className: t }) {
502
502
  }
503
503
  );
504
504
  }
505
- function je({ className: t }) {
505
+ function Pe({ className: t }) {
506
506
  return /* @__PURE__ */ e(
507
507
  "svg",
508
508
  {
@@ -587,7 +587,7 @@ function jt({ className: t }) {
587
587
  }
588
588
  );
589
589
  }
590
- function Bt({ className: t }) {
590
+ function Pt({ className: t }) {
591
591
  return /* @__PURE__ */ a(
592
592
  "svg",
593
593
  {
@@ -608,7 +608,7 @@ function Bt({ className: t }) {
608
608
  }
609
609
  );
610
610
  }
611
- function Ht({ className: t }) {
611
+ function Bt({ className: t }) {
612
612
  return /* @__PURE__ */ a(
613
613
  "svg",
614
614
  {
@@ -654,75 +654,75 @@ function Ot({ className: t }) {
654
654
  }
655
655
  );
656
656
  }
657
- const Pt = [
657
+ const Ht = [
658
658
  { value: "day", label: "Day", icon: jt },
659
- { value: "week", label: "Week", icon: Bt },
660
- { value: "month", label: "Month", icon: Ht },
659
+ { value: "week", label: "Week", icon: Pt },
660
+ { value: "month", label: "Month", icon: Bt },
661
661
  { value: "year", label: "Year", icon: Ot }
662
662
  // { value: 'agenda', label: 'Agenda', icon: ListIcon }, NOTE: Not needed currently
663
- ], He = [
664
- { value: "timeline-day", label: "1 Day", icon: ge },
665
- { value: "timeline-3day", label: "3 Days", icon: ge },
666
- { value: "timeline-week", label: "7 Days", icon: ge }
663
+ ], Oe = [
664
+ { value: "timeline-day", label: "1 Day", icon: xe },
665
+ { value: "timeline-3day", label: "3 Days", icon: xe },
666
+ { value: "timeline-week", label: "7 Days", icon: xe }
667
667
  ];
668
668
  function nn({
669
669
  currentDate: t,
670
670
  view: n,
671
671
  events: r = [],
672
672
  onNavigateToday: o,
673
- onNavigatePrev: d,
673
+ onNavigatePrev: i,
674
674
  onNavigateNext: f,
675
- onNavigate: i,
676
- onViewChange: g,
675
+ onNavigate: l,
676
+ onViewChange: x,
677
677
  onAddEvent: D,
678
- availableViews: p = ["day", "week", "month", "agenda"],
678
+ availableViews: m = ["day", "week", "month", "agenda"],
679
679
  showTimelineViews: h = !1,
680
- timelineViews: b,
681
- settingsContent: l,
680
+ timelineViews: y,
681
+ settingsContent: d,
682
682
  showSettings: w = !1,
683
- filterContent: v,
684
- actions: k,
685
- className: M,
686
- weekStartsOn: T = 1,
687
- labels: c = {}
683
+ filterContent: k,
684
+ actions: b,
685
+ className: W,
686
+ weekStartsOn: L = 1,
687
+ labels: M = {}
688
688
  }) {
689
- const x = B(
689
+ const C = P(
690
690
  () => ({
691
691
  today: "Today",
692
692
  addEvent: "Add Event",
693
693
  calendarView: "Calendar View",
694
694
  resourceView: "Resource View",
695
- ...c
695
+ ...M
696
696
  }),
697
- [c]
698
- ), W = () => {
699
- o?.(), i?.("today");
700
- }, R = () => {
701
- d?.(), i?.("prev");
702
- }, E = () => {
703
- f?.(), i?.("next");
704
- }, C = ["day", "week", "month", "year", "agenda"].includes(n), z = n.startsWith("timeline-") || n.startsWith("resource-"), O = Pt.filter(
705
- (u) => p.includes(u.value)
706
- ), F = C ? O.find((u) => u.value === n) : null, j = z ? He.find((u) => u.value === n) : null;
707
- return /* @__PURE__ */ a("div", { className: m("flex flex-col w-full gap-3 mb-2", M), children: [
697
+ [M]
698
+ ), A = () => {
699
+ o?.(), l?.("today");
700
+ }, p = () => {
701
+ i?.(), l?.("prev");
702
+ }, T = () => {
703
+ f?.(), l?.("next");
704
+ }, v = ["day", "week", "month", "year", "agenda"].includes(n), E = n.startsWith("timeline-") || n.startsWith("resource-"), B = Ht.filter(
705
+ (c) => m.includes(c.value)
706
+ ), O = v ? B.find((c) => c.value === n) : null, g = E ? Oe.find((c) => c.value === n) : null;
707
+ return /* @__PURE__ */ a("div", { className: u("flex flex-col w-full gap-3 mb-2", W), children: [
708
708
  /* @__PURE__ */ a("div", { className: "flex lg:flex-row flex-col w-full justify-between gap-3", children: [
709
709
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-2", children: [
710
710
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2 sm:gap-3 min-w-0", children: [
711
- /* @__PURE__ */ e(Tt, { onClick: W }),
711
+ /* @__PURE__ */ e(Tt, { onClick: A }),
712
712
  /* @__PURE__ */ e(
713
713
  At,
714
714
  {
715
715
  date: t,
716
716
  view: n,
717
717
  events: r,
718
- onNavigatePrev: R,
719
- onNavigateNext: E,
720
- weekStartsOn: T
718
+ onNavigatePrev: p,
719
+ onNavigateNext: T,
720
+ weekStartsOn: L
721
721
  }
722
722
  )
723
723
  ] }),
724
724
  D && /* @__PURE__ */ e(
725
- oe,
725
+ le,
726
726
  {
727
727
  size: "icon",
728
728
  className: "shrink-0 lg:hidden",
@@ -732,79 +732,79 @@ function nn({
732
732
  )
733
733
  ] }),
734
734
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1.5 sm:gap-2 overflow-x-auto pb-1 -mb-1 scrollbar-none", children: [
735
- g && O.length > 0 && /* @__PURE__ */ a(Ie, { children: [
735
+ x && B.length > 0 && /* @__PURE__ */ a(Re, { children: [
736
736
  /* @__PURE__ */ a(
737
- Re,
737
+ je,
738
738
  {
739
- className: m(
739
+ className: u(
740
740
  "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors",
741
741
  "h-10 px-2 sm:px-3 gap-1 sm:gap-1.5 shrink-0",
742
- C ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-background hover:bg-accent hover:text-accent-foreground"
742
+ v ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-background hover:bg-accent hover:text-accent-foreground"
743
743
  ),
744
744
  children: [
745
745
  /* @__PURE__ */ e(It, { className: "size-4" }),
746
- /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: F?.label ?? x.calendarView }),
747
- /* @__PURE__ */ e(je, { className: "size-3 opacity-60" })
746
+ /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: O?.label ?? C.calendarView }),
747
+ /* @__PURE__ */ e(Pe, { className: "size-3 opacity-60" })
748
748
  ]
749
749
  }
750
750
  ),
751
- /* @__PURE__ */ e(ke, { align: "start", className: "min-w-[120px]", children: O.map((u) => {
752
- const P = u.icon;
751
+ /* @__PURE__ */ e(ke, { align: "start", className: "min-w-[120px]", children: B.map((c) => {
752
+ const F = c.icon;
753
753
  return /* @__PURE__ */ a(
754
754
  De,
755
755
  {
756
- onClick: () => g(u.value),
757
- className: m(
756
+ onClick: () => x(c.value),
757
+ className: u(
758
758
  "gap-2",
759
- n === u.value && "bg-accent"
759
+ n === c.value && "bg-accent"
760
760
  ),
761
761
  children: [
762
- /* @__PURE__ */ e(P, { className: "size-4" }),
763
- /* @__PURE__ */ e("span", { children: u.label })
762
+ /* @__PURE__ */ e(F, { className: "size-4" }),
763
+ /* @__PURE__ */ e("span", { children: c.label })
764
764
  ]
765
765
  },
766
- u.value
766
+ c.value
767
767
  );
768
768
  }) })
769
769
  ] }),
770
- h && g && /* @__PURE__ */ a(Ie, { children: [
770
+ h && x && /* @__PURE__ */ a(Re, { children: [
771
771
  /* @__PURE__ */ a(
772
- Re,
772
+ je,
773
773
  {
774
- className: m(
774
+ className: u(
775
775
  "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors",
776
776
  "h-10 px-2 sm:px-3 gap-1 sm:gap-1.5 shrink-0",
777
- z ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-white hover:bg-zinc-50 hover:text-accent-foreground"
777
+ E ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-white hover:bg-zinc-50 hover:text-accent-foreground"
778
778
  ),
779
779
  children: [
780
- /* @__PURE__ */ e(ge, { className: "size-4" }),
781
- /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: j?.label ?? x.resourceView }),
782
- /* @__PURE__ */ e(je, { className: "size-3 opacity-60" })
780
+ /* @__PURE__ */ e(xe, { className: "size-4" }),
781
+ /* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: g?.label ?? C.resourceView }),
782
+ /* @__PURE__ */ e(Pe, { className: "size-3 opacity-60" })
783
783
  ]
784
784
  }
785
785
  ),
786
- /* @__PURE__ */ e(ke, { align: "start", className: "min-w-[120px]", children: He.map((u) => {
787
- const P = u.icon;
786
+ /* @__PURE__ */ e(ke, { align: "start", className: "min-w-[120px]", children: Oe.map((c) => {
787
+ const F = c.icon;
788
788
  return /* @__PURE__ */ a(
789
789
  De,
790
790
  {
791
- onClick: () => g(u.value),
792
- className: m(
791
+ onClick: () => x(c.value),
792
+ className: u(
793
793
  "gap-2",
794
- n === u.value && "bg-accent"
794
+ n === c.value && "bg-accent"
795
795
  ),
796
796
  children: [
797
- /* @__PURE__ */ e(P, { className: "size-4" }),
798
- /* @__PURE__ */ e("span", { children: u.label })
797
+ /* @__PURE__ */ e(F, { className: "size-4" }),
798
+ /* @__PURE__ */ e("span", { children: c.label })
799
799
  ]
800
800
  },
801
- u.value
801
+ c.value
802
802
  );
803
803
  }) })
804
804
  ] }),
805
- w && l && /* @__PURE__ */ a(se, { children: [
806
- /* @__PURE__ */ e(ie, { asChild: !0, children: /* @__PURE__ */ e(
807
- oe,
805
+ w && d && /* @__PURE__ */ a(ee, { children: [
806
+ /* @__PURE__ */ e(te, { asChild: !0, children: /* @__PURE__ */ e(
807
+ le,
808
808
  {
809
809
  variant: "outline",
810
810
  size: "icon",
@@ -813,38 +813,38 @@ function nn({
813
813
  }
814
814
  ) }),
815
815
  /* @__PURE__ */ e(
816
- Q,
816
+ J,
817
817
  {
818
818
  className: "w-auto min-w-80 p-0",
819
819
  align: "end",
820
820
  sideOffset: 8,
821
- children: /* @__PURE__ */ e("div", { className: "max-h-[70vh] overflow-y-auto p-4 space-y-6", children: l })
821
+ children: /* @__PURE__ */ e("div", { className: "max-h-[70vh] overflow-y-auto p-4 space-y-6", children: d })
822
822
  }
823
823
  )
824
824
  ] }),
825
- k,
826
- D && /* @__PURE__ */ a(oe, { className: "hidden lg:flex shrink-0 max-h-10", onClick: D, children: [
825
+ b,
826
+ D && /* @__PURE__ */ a(le, { className: "hidden lg:flex shrink-0 max-h-10", onClick: D, children: [
827
827
  /* @__PURE__ */ e(Be, { className: "size-4" }),
828
- x.addEvent
828
+ C.addEvent
829
829
  ] })
830
830
  ] })
831
831
  ] }),
832
- v && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 overflow-x-auto pb-1 -mb-1 scrollbar-none", children: v })
832
+ k && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 overflow-x-auto pb-1 -mb-1 scrollbar-none", children: k })
833
833
  ] });
834
834
  }
835
- const rn = me.Provider, re = me.Root, ae = me.Trigger, J = K.forwardRef(({ className: t, sideOffset: n = 4, ...r }, o) => /* @__PURE__ */ e(
835
+ const rn = me.Provider, se = me.Root, ie = me.Trigger, Z = K.forwardRef(({ className: t, sideOffset: n = 4, ...r }, o) => /* @__PURE__ */ e(
836
836
  me.Content,
837
837
  {
838
838
  ref: o,
839
839
  sideOffset: n,
840
- className: m(
840
+ className: u(
841
841
  "z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
842
842
  t
843
843
  ),
844
844
  ...r
845
845
  }
846
846
  ));
847
- J.displayName = me.Content.displayName;
847
+ Z.displayName = me.Content.displayName;
848
848
  function he(t) {
849
849
  return {
850
850
  blue: {
@@ -919,7 +919,7 @@ function he(t) {
919
919
  }
920
920
  }[t ?? "blue"];
921
921
  }
922
- function be(t) {
922
+ function ye(t) {
923
923
  return t.toLocaleTimeString([], {
924
924
  hour: "2-digit",
925
925
  minute: "2-digit",
@@ -927,97 +927,97 @@ function be(t) {
927
927
  });
928
928
  }
929
929
  function X(t, n) {
930
- return `${be(t)} - ${be(n)}`;
930
+ return `${ye(t)} - ${ye(n)}`;
931
931
  }
932
- function We(t) {
932
+ function Le(t) {
933
933
  const n = new Date(t);
934
934
  return n.setHours(0, 0, 0, 0), n;
935
935
  }
936
- function Ge({
936
+ function Ce({
937
937
  event: t,
938
938
  variant: n = "full",
939
939
  badgeVariant: r = "colored",
940
940
  onClick: o,
941
- className: d,
941
+ className: i,
942
942
  showTime: f = !0,
943
- showDescription: i = !1,
944
- showParticipants: g = !1,
943
+ showDescription: l = !1,
944
+ showParticipants: x = !1,
945
945
  style: D,
946
- disablePopover: p = !1,
946
+ disablePopover: m = !1,
947
947
  renderPopover: h,
948
- enableDrag: b = !1
948
+ enableDrag: y = !1
949
949
  }) {
950
- const l = he(t.color), [w, v] = le(!1), [k, M] = le(!1), T = Se(), c = t.endDate < We(/* @__PURE__ */ new Date()), x = t.isCanceled ?? !1, W = b && T && !x && !c, R = x ? /* @__PURE__ */ e(Ft, { className: "h-3 w-3 text-zinc-800 dark:text-zinc-200" }) : t.meetingTookPlace ? /* @__PURE__ */ e(Vt, { className: m("h-3 w-3", l.text) }) : null, E = S(() => {
951
- k || (p && o ? o(t) : p || v(!0));
952
- }, [k, p, o, t]), C = S(() => {
953
- v(!1);
954
- }, []), z = S(
955
- (j) => {
956
- W && (j.dataTransfer.effectAllowed = "move", j.dataTransfer.setData("text/plain", t.id), M(!0), T?.startDrag?.(t));
950
+ const d = he(t.color), [w, k] = ne(!1), [b, W] = ne(!1), L = Me(), M = t.endDate < Le(/* @__PURE__ */ new Date()), C = t.isCanceled ?? !1, A = y && L && !C && !M, p = C ? /* @__PURE__ */ e(Vt, { className: "h-3 w-3 text-zinc-800 dark:text-zinc-200" }) : t.meetingTookPlace ? /* @__PURE__ */ e(Ft, { className: u("h-3 w-3", d.text) }) : null, T = z(() => {
951
+ b || (m && o ? o(t) : m || k(!0));
952
+ }, [b, m, o, t]), v = z(() => {
953
+ k(!1);
954
+ }, []), E = z(
955
+ (g) => {
956
+ A && (g.dataTransfer.effectAllowed = "move", g.dataTransfer.setData("text/plain", t.id), W(!0), L?.startDrag?.(t));
957
957
  },
958
- [W, t, T]
959
- ), O = S(() => {
960
- M(!1), T?.isDragging && T.endDrag?.();
961
- }, [T]);
958
+ [A, t, L]
959
+ ), B = z(() => {
960
+ W(!1), L?.isDragging && L.endDrag?.();
961
+ }, [L]);
962
962
  if (n === "dot") {
963
- const j = /* @__PURE__ */ e(
963
+ const g = /* @__PURE__ */ e(
964
964
  "button",
965
965
  {
966
966
  type: "button",
967
- onClick: E,
968
- className: m(
967
+ onClick: T,
968
+ className: u(
969
969
  "size-2 rounded-full cursor-pointer transition-opacity",
970
- c ? "bg-gray-400" : l.dot,
970
+ M ? "bg-gray-400" : d.dot,
971
971
  t.isCanceled && "opacity-50",
972
- d
972
+ i
973
973
  ),
974
974
  style: D,
975
975
  "aria-label": t.title
976
976
  }
977
977
  );
978
- return p ? /* @__PURE__ */ a(re, { children: [
979
- /* @__PURE__ */ e(ae, { asChild: !0, children: j }),
980
- /* @__PURE__ */ e(J, { children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-0.5", children: [
978
+ return m ? /* @__PURE__ */ a(se, { children: [
979
+ /* @__PURE__ */ e(ie, { asChild: !0, children: g }),
980
+ /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-0.5", children: [
981
981
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
982
982
  /* @__PURE__ */ e("div", { className: "text-xs opacity-80", children: X(t.startDate, t.endDate) })
983
983
  ] }) })
984
- ] }) : /* @__PURE__ */ a(se, { open: w, onOpenChange: v, children: [
985
- /* @__PURE__ */ e(ie, { asChild: !0, children: /* @__PURE__ */ a(re, { children: [
986
- /* @__PURE__ */ e(ae, { asChild: !0, children: j }),
987
- /* @__PURE__ */ e(J, { children: /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }) })
984
+ ] }) : /* @__PURE__ */ a(ee, { open: w, onOpenChange: k, children: [
985
+ /* @__PURE__ */ e(te, { asChild: !0, children: /* @__PURE__ */ a(se, { children: [
986
+ /* @__PURE__ */ e(ie, { asChild: !0, children: g }),
987
+ /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }) })
988
988
  ] }) }),
989
- /* @__PURE__ */ e(Q, { className: "w-80", children: h ? h({ event: t, onClose: C }) : /* @__PURE__ */ e(ue, { event: t, onClose: C }) })
989
+ /* @__PURE__ */ e(J, { className: "w-80", children: h ? h({ event: t, onClose: v }) : /* @__PURE__ */ e(ue, { event: t, onClose: v }) })
990
990
  ] });
991
991
  }
992
992
  if (n === "compact") {
993
- const j = /* @__PURE__ */ a(
993
+ const g = /* @__PURE__ */ a(
994
994
  "div",
995
995
  {
996
996
  role: "button",
997
997
  tabIndex: 0,
998
- draggable: !!W,
999
- onDragStart: z,
1000
- onDragEnd: O,
1001
- onClick: p ? E : void 0,
1002
- onKeyDown: (u) => {
1003
- (u.key === "Enter" || u.key === " ") && (u.preventDefault(), E());
998
+ draggable: !!A,
999
+ onDragStart: E,
1000
+ onDragEnd: B,
1001
+ onClick: m ? T : void 0,
1002
+ onKeyDown: (c) => {
1003
+ (c.key === "Enter" || c.key === " ") && (c.preventDefault(), T());
1004
1004
  },
1005
- className: m(
1005
+ className: u(
1006
1006
  "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",
1007
- W ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
1008
- k && "opacity-50",
1007
+ A ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
1008
+ b && "opacity-50",
1009
1009
  // Cancelled events get gray background with strikethrough
1010
- x || // Past events get neutral zinc styling
1011
- c ? "bg-zinc-100 dark:bg-zinc-800 text-zinc-500 dark:text-zinc-400 line-through" : [
1012
- r === "colored" && [l.bg, l.text],
1013
- r === "mixed" && [l.bg, l.text],
1010
+ C || // Past events get neutral zinc styling
1011
+ M ? "bg-zinc-100 dark:bg-zinc-800 text-zinc-500 dark:text-zinc-400 line-through" : [
1012
+ r === "colored" && [d.bg, d.text],
1013
+ r === "mixed" && [d.bg, d.text],
1014
1014
  r === "dot" && "bg-muted/50"
1015
1015
  ],
1016
- d
1016
+ i
1017
1017
  ),
1018
1018
  style: D,
1019
1019
  children: [
1020
- ["dot", "mixed"].includes(r) && !c && /* @__PURE__ */ e(
1020
+ ["dot", "mixed"].includes(r) && !M && /* @__PURE__ */ e(
1021
1021
  "svg",
1022
1022
  {
1023
1023
  width: "8",
@@ -1026,7 +1026,7 @@ function Ge({
1026
1026
  className: "event-dot absolute -top-1 -left-1 shrink-0",
1027
1027
  "aria-hidden": "true",
1028
1028
  focusable: "false",
1029
- children: /* @__PURE__ */ e("circle", { cx: "4", cy: "4", r: "4", className: l.dotFill })
1029
+ children: /* @__PURE__ */ e("circle", { cx: "4", cy: "4", r: "4", className: d.dotFill })
1030
1030
  }
1031
1031
  ),
1032
1032
  /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 overflow-hidden", children: /* @__PURE__ */ a("span", { className: "", children: [
@@ -1049,51 +1049,51 @@ function Ge({
1049
1049
  /* @__PURE__ */ e(
1050
1050
  "div",
1051
1051
  {
1052
- className: m(
1052
+ className: u(
1053
1053
  "w-fit mt-0.5 text-[10px] px-1 py-0.5 border border-dashed rounded-full font-medium",
1054
- c ? "border-zinc-400 dark:border-zinc-600" : l.border
1054
+ M ? "border-zinc-400 dark:border-zinc-600" : d.border
1055
1055
  ),
1056
1056
  children: X(t.startDate, t.endDate)
1057
1057
  }
1058
1058
  )
1059
1059
  ] }) }),
1060
- /* @__PURE__ */ e("div", { className: "flex gap-0.5", children: R })
1060
+ /* @__PURE__ */ e("div", { className: "flex gap-0.5", children: p })
1061
1061
  ]
1062
1062
  }
1063
1063
  );
1064
- return p ? /* @__PURE__ */ a(re, { children: [
1065
- /* @__PURE__ */ e(ae, { asChild: !0, children: j }),
1066
- /* @__PURE__ */ e(J, { children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-0.5", children: [
1064
+ return m ? /* @__PURE__ */ a(se, { children: [
1065
+ /* @__PURE__ */ e(ie, { asChild: !0, children: g }),
1066
+ /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-0.5", children: [
1067
1067
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
1068
1068
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t.startDate, t.endDate) })
1069
1069
  ] }) })
1070
- ] }) : /* @__PURE__ */ a(se, { open: w, onOpenChange: v, children: [
1071
- /* @__PURE__ */ e(ie, { asChild: !0, children: j }),
1072
- /* @__PURE__ */ e(Q, { className: "w-80", children: h ? h({ event: t, onClose: C }) : /* @__PURE__ */ e(ue, { event: t, onClose: C }) })
1070
+ ] }) : /* @__PURE__ */ a(ee, { open: w, onOpenChange: k, children: [
1071
+ /* @__PURE__ */ e(te, { asChild: !0, children: g }),
1072
+ /* @__PURE__ */ e(J, { className: "w-80", children: h ? h({ event: t, onClose: v }) : /* @__PURE__ */ e(ue, { event: t, onClose: v }) })
1073
1073
  ] });
1074
1074
  }
1075
- const F = /* @__PURE__ */ a(
1075
+ const O = /* @__PURE__ */ a(
1076
1076
  "button",
1077
1077
  {
1078
1078
  type: "button",
1079
- onClick: E,
1080
- className: m(
1079
+ onClick: T,
1080
+ className: u(
1081
1081
  "group relative flex w-full flex-col gap-1 rounded-md border px-2 py-1.5 text-left transition-all hover:shadow-md",
1082
1082
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
1083
1083
  // Cancelled events get gray background with strikethrough
1084
- x || // Past events get neutral zinc styling with strikethrough
1085
- c ? "bg-zinc-100 dark:bg-zinc-800 border-zinc-300 dark:border-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [
1086
- r === "colored" && [l.bg, l.border, l.text],
1087
- r === "mixed" && [l.bg, l.border, l.text],
1084
+ C || // Past events get neutral zinc styling with strikethrough
1085
+ M ? "bg-zinc-100 dark:bg-zinc-800 border-zinc-300 dark:border-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [
1086
+ r === "colored" && [d.bg, d.border, d.text],
1087
+ r === "mixed" && [d.bg, d.border, d.text],
1088
1088
  r === "dot" && "bg-muted/50 border-border"
1089
1089
  ],
1090
- d
1090
+ i
1091
1091
  ),
1092
1092
  style: D,
1093
1093
  children: [
1094
1094
  /* @__PURE__ */ a("div", { className: "flex items-start justify-between gap-1", children: [
1095
1095
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1.5 min-w-0", children: [
1096
- ["dot", "mixed"].includes(r) && !c && !x && /* @__PURE__ */ e(
1096
+ ["dot", "mixed"].includes(r) && !M && !C && /* @__PURE__ */ e(
1097
1097
  "svg",
1098
1098
  {
1099
1099
  width: "8",
@@ -1102,38 +1102,38 @@ function Ge({
1102
1102
  className: "event-dot shrink-0",
1103
1103
  "aria-hidden": "true",
1104
1104
  focusable: "false",
1105
- children: /* @__PURE__ */ e("circle", { cx: "4", cy: "4", r: "4", className: l.dotFill })
1105
+ children: /* @__PURE__ */ e("circle", { cx: "4", cy: "4", r: "4", className: d.dotFill })
1106
1106
  }
1107
1107
  ),
1108
1108
  /* @__PURE__ */ e(
1109
1109
  "span",
1110
1110
  {
1111
- className: m(
1111
+ className: u(
1112
1112
  "text-sm font-medium truncate",
1113
- !c && !x && r !== "dot" && l.text,
1114
- x && "line-through"
1113
+ !M && !C && r !== "dot" && d.text,
1114
+ C && "line-through"
1115
1115
  ),
1116
1116
  children: t.title
1117
1117
  }
1118
1118
  )
1119
1119
  ] }),
1120
- R
1120
+ p
1121
1121
  ] }),
1122
1122
  f && /* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
1123
1123
  /* @__PURE__ */ e(Xe, { className: "h-3 w-3 shrink-0" }),
1124
1124
  /* @__PURE__ */ e("span", { children: X(t.startDate, t.endDate) })
1125
1125
  ] }),
1126
- i && t.description && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground line-clamp-2", children: t.description }),
1127
- g && t.participants && t.participants.length > 0 && /* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
1126
+ l && t.description && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground line-clamp-2", children: t.description }),
1127
+ x && t.participants && t.participants.length > 0 && /* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
1128
1128
  /* @__PURE__ */ e(Ut, { className: "h-3 w-3 shrink-0" }),
1129
- /* @__PURE__ */ e("span", { className: "truncate", children: t.participants.map((j) => j.name).join(", ") })
1129
+ /* @__PURE__ */ e("span", { className: "truncate", children: t.participants.map((g) => g.name).join(", ") })
1130
1130
  ] }),
1131
1131
  t.scheduleTypeName && /* @__PURE__ */ e(
1132
1132
  "span",
1133
1133
  {
1134
- className: m(
1134
+ className: u(
1135
1135
  "mt-1 inline-flex self-start rounded-full px-2 py-0.5 text-[10px] font-medium",
1136
- c ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400" : [l.bg, l.text]
1136
+ M ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400" : [d.bg, d.text]
1137
1137
  ),
1138
1138
  children: t.scheduleTypeName
1139
1139
  }
@@ -1141,15 +1141,15 @@ function Ge({
1141
1141
  ]
1142
1142
  }
1143
1143
  );
1144
- return p ? /* @__PURE__ */ a(re, { children: [
1145
- /* @__PURE__ */ e(ae, { asChild: !0, children: F }),
1146
- /* @__PURE__ */ e(J, { children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-0.5", children: [
1144
+ return m ? /* @__PURE__ */ a(se, { children: [
1145
+ /* @__PURE__ */ e(ie, { asChild: !0, children: O }),
1146
+ /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-0.5", children: [
1147
1147
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
1148
1148
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t.startDate, t.endDate) })
1149
1149
  ] }) })
1150
- ] }) : /* @__PURE__ */ a(se, { open: w, onOpenChange: v, children: [
1151
- /* @__PURE__ */ e(ie, { asChild: !0, children: F }),
1152
- /* @__PURE__ */ e(Q, { className: "w-80", children: h ? h({ event: t, onClose: C }) : /* @__PURE__ */ e(ue, { event: t, onClose: C }) })
1150
+ ] }) : /* @__PURE__ */ a(ee, { open: w, onOpenChange: k, children: [
1151
+ /* @__PURE__ */ e(te, { asChild: !0, children: O }),
1152
+ /* @__PURE__ */ e(J, { className: "w-80", children: h ? h({ event: t, onClose: v }) : /* @__PURE__ */ e(ue, { event: t, onClose: v }) })
1153
1153
  ] });
1154
1154
  }
1155
1155
  function Xe({ className: t }) {
@@ -1171,7 +1171,7 @@ function Xe({ className: t }) {
1171
1171
  }
1172
1172
  );
1173
1173
  }
1174
- function Vt({ className: t }) {
1174
+ function Ft({ className: t }) {
1175
1175
  return /* @__PURE__ */ e(
1176
1176
  "svg",
1177
1177
  {
@@ -1187,7 +1187,7 @@ function Vt({ className: t }) {
1187
1187
  }
1188
1188
  );
1189
1189
  }
1190
- function Ft({ className: t }) {
1190
+ function Vt({ className: t }) {
1191
1191
  return /* @__PURE__ */ a(
1192
1192
  "svg",
1193
1193
  {
@@ -1231,9 +1231,9 @@ function ue({ event: t, onClose: n }) {
1231
1231
  const r = he(t.color), o = t.isCanceled ?? !1;
1232
1232
  return /* @__PURE__ */ a("div", { className: "space-y-3", children: [
1233
1233
  /* @__PURE__ */ a("div", { className: "flex items-start gap-3", children: [
1234
- /* @__PURE__ */ e("div", { className: m("size-4 rounded shrink-0 mt-0.5", r.dot) }),
1234
+ /* @__PURE__ */ e("div", { className: u("size-4 rounded shrink-0 mt-0.5", r.dot) }),
1235
1235
  /* @__PURE__ */ a("div", { className: "flex-1 min-w-0", children: [
1236
- /* @__PURE__ */ e("h3", { className: m("font-semibold text-lg", o && "line-through opacity-50"), children: t.title }),
1236
+ /* @__PURE__ */ e("h3", { className: u("font-semibold text-lg", o && "line-through opacity-50"), children: t.title }),
1237
1237
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1 text-sm text-muted-foreground mt-1", children: [
1238
1238
  /* @__PURE__ */ e(Xe, { className: "h-4 w-4 shrink-0" }),
1239
1239
  /* @__PURE__ */ e("span", { className: "tabular-nums", children: X(t.startDate, t.endDate) })
@@ -1262,63 +1262,63 @@ function Je({
1262
1262
  position: n,
1263
1263
  hourHeight: r = 96,
1264
1264
  badgeVariant: o = "colored",
1265
- onClick: d,
1265
+ onClick: i,
1266
1266
  className: f,
1267
- disablePopover: i = !1,
1268
- renderPopover: g,
1267
+ disablePopover: l = !1,
1268
+ renderPopover: x,
1269
1269
  enableDrag: D = !0
1270
1270
  }) {
1271
- const p = he(t.color), [h, b] = le(!1), [l, w] = le(!1), v = Se(), k = (t.endDate.getTime() - t.startDate.getTime()) / (1e3 * 60), M = k / 60 * r - 8, T = t.endDate < We(/* @__PURE__ */ new Date()), c = t.isCanceled ?? !1, x = D && v && !c && !T, W = k < 35, R = k > 25, E = o === "dot", C = S(() => {
1272
- l || (i && d ? d(t) : i || b(!0));
1273
- }, [l, i, d, t]), z = S(() => {
1274
- b(!1);
1275
- }, []), O = S(
1276
- ($) => {
1277
- if (!x) return;
1278
- $.dataTransfer.effectAllowed = "move", $.dataTransfer.setData("text/plain", t.id);
1279
- const y = $.currentTarget, s = y.getBoundingClientRect();
1280
- $.dataTransfer.setDragImage(y, $.clientX - s.left, $.clientY - s.top), w(!0), v?.startDrag?.(t);
1271
+ const m = he(t.color), [h, y] = ne(!1), [d, w] = ne(!1), k = Me(), b = (t.endDate.getTime() - t.startDate.getTime()) / (1e3 * 60), W = b / 60 * r - 8, L = t.endDate < Le(/* @__PURE__ */ new Date()), M = t.isCanceled ?? !1, C = D && k && !M && !L, A = b < 35, p = b > 25, T = o === "dot", v = z(() => {
1272
+ d || (l && i ? i(t) : l || y(!0));
1273
+ }, [d, l, i, t]), E = z(() => {
1274
+ y(!1);
1275
+ }, []), B = z(
1276
+ (_) => {
1277
+ if (!C) return;
1278
+ _.dataTransfer.effectAllowed = "move", _.dataTransfer.setData("text/plain", t.id);
1279
+ const N = _.currentTarget, s = N.getBoundingClientRect();
1280
+ _.dataTransfer.setDragImage(N, _.clientX - s.left, _.clientY - s.top), w(!0), k?.startDrag?.(t);
1281
1281
  },
1282
- [x, t, v]
1283
- ), F = S(() => {
1284
- w(!1), v?.isDragging && v.endDrag?.();
1285
- }, [v]), j = S(
1286
- ($) => {
1287
- ($.key === "Enter" || $.key === " ") && ($.preventDefault(), C());
1282
+ [C, t, k]
1283
+ ), O = z(() => {
1284
+ w(!1), k?.isDragging && k.endDrag?.();
1285
+ }, [k]), g = z(
1286
+ (_) => {
1287
+ (_.key === "Enter" || _.key === " ") && (_.preventDefault(), v());
1288
1288
  },
1289
- [C]
1290
- ), u = /* @__PURE__ */ a(
1289
+ [v]
1290
+ ), c = /* @__PURE__ */ a(
1291
1291
  "div",
1292
1292
  {
1293
1293
  role: "button",
1294
1294
  tabIndex: 0,
1295
- draggable: !!x,
1296
- onDragStart: O,
1297
- onDragEnd: F,
1298
- onKeyDown: j,
1299
- onClick: l ? void 0 : C,
1300
- className: m(
1295
+ draggable: !!C,
1296
+ onDragStart: B,
1297
+ onDragEnd: O,
1298
+ onKeyDown: g,
1299
+ onClick: d ? void 0 : v,
1300
+ className: u(
1301
1301
  "group flex w-full select-none flex-col gap-0.5 overflow-hidden rounded-md border px-2 py-1.5 text-xs text-left",
1302
1302
  "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
1303
1303
  "transition-opacity",
1304
- x ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
1305
- l && "opacity-50",
1304
+ C ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
1305
+ d && "opacity-50",
1306
1306
  // Cancelled events get gray background with strikethrough
1307
- c || // Past events get neutral zinc styling with strikethrough
1308
- T ? "bg-zinc-100 dark:bg-zinc-800 border-zinc-300 dark:border-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [
1307
+ M || // Past events get neutral zinc styling with strikethrough
1308
+ L ? "bg-zinc-100 dark:bg-zinc-800 border-zinc-300 dark:border-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [
1309
1309
  // Colored/mixed variants
1310
- !E && [p.bg, p.border, p.text],
1310
+ !T && [m.bg, m.border, m.text],
1311
1311
  // Dot variant - neutral background
1312
- E && "bg-neutral-50 dark:bg-neutral-900 border-neutral-200 dark:border-neutral-700"
1312
+ T && "bg-neutral-50 dark:bg-neutral-900 border-neutral-200 dark:border-neutral-700"
1313
1313
  ],
1314
1314
  // Short events center content
1315
- W && "py-0 justify-center",
1315
+ A && "py-0 justify-center",
1316
1316
  f
1317
1317
  ),
1318
- style: { height: `${Math.max(M, 20)}px` },
1318
+ style: { height: `${Math.max(W, 20)}px` },
1319
1319
  children: [
1320
1320
  /* @__PURE__ */ a("div", { className: "flex items-start gap-1.5 min-w-0", children: [
1321
- ["mixed", "dot"].includes(o) && !T && !c && /* @__PURE__ */ e(
1321
+ ["mixed", "dot"].includes(o) && !L && !M && /* @__PURE__ */ e(
1322
1322
  "svg",
1323
1323
  {
1324
1324
  width: "8",
@@ -1327,41 +1327,41 @@ function Je({
1327
1327
  className: "event-dot shrink-0",
1328
1328
  "aria-hidden": "true",
1329
1329
  focusable: "false",
1330
- children: /* @__PURE__ */ e("circle", { cx: "4", cy: "4", r: "4", className: p.dotFill })
1330
+ children: /* @__PURE__ */ e("circle", { cx: "4", cy: "4", r: "4", className: m.dotFill })
1331
1331
  }
1332
1332
  ),
1333
1333
  /* @__PURE__ */ e("div", { className: "flex-1 min-w-0 overflow-hidden", children: /* @__PURE__ */ e(
1334
1334
  "p",
1335
1335
  {
1336
- className: m(
1336
+ className: u(
1337
1337
  "font-semibold whitespace-nowrap",
1338
- !T && !c && E && "text-foreground"
1338
+ !L && !M && T && "text-foreground"
1339
1339
  ),
1340
1340
  children: t.title
1341
1341
  }
1342
1342
  ) })
1343
1343
  ] }),
1344
- R && /* @__PURE__ */ a(
1344
+ p && /* @__PURE__ */ a(
1345
1345
  "p",
1346
1346
  {
1347
- className: m(
1347
+ className: u(
1348
1348
  "text-[11px] tabular-nums",
1349
- E ? "text-muted-foreground" : "opacity-90"
1349
+ T ? "text-muted-foreground" : "opacity-90"
1350
1350
  ),
1351
1351
  children: [
1352
- be(t.startDate),
1352
+ ye(t.startDate),
1353
1353
  " - ",
1354
- be(t.endDate)
1354
+ ye(t.endDate)
1355
1355
  ]
1356
1356
  }
1357
1357
  )
1358
1358
  ]
1359
1359
  }
1360
- ), P = /* @__PURE__ */ e(J, { children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-0.5", children: [
1360
+ ), F = /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-0.5", children: [
1361
1361
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
1362
1362
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t.startDate, t.endDate) })
1363
1363
  ] }) });
1364
- return i ? /* @__PURE__ */ e(
1364
+ return l ? /* @__PURE__ */ e(
1365
1365
  "div",
1366
1366
  {
1367
1367
  className: "absolute p-0.5",
@@ -1371,9 +1371,9 @@ function Je({
1371
1371
  width: n.minWidth ? `max(${n.minWidth}px, ${n.width}%)` : `${n.width}%`,
1372
1372
  minWidth: n.minWidth ? `${n.minWidth}px` : void 0
1373
1373
  },
1374
- children: /* @__PURE__ */ a(re, { children: [
1375
- /* @__PURE__ */ e(ae, { asChild: !0, children: u }),
1376
- P
1374
+ children: /* @__PURE__ */ a(se, { children: [
1375
+ /* @__PURE__ */ e(ie, { asChild: !0, children: c }),
1376
+ F
1377
1377
  ] })
1378
1378
  }
1379
1379
  ) : /* @__PURE__ */ e(
@@ -1386,9 +1386,9 @@ function Je({
1386
1386
  width: n.minWidth ? `max(${n.minWidth}px, ${n.width}%)` : `${n.width}%`,
1387
1387
  minWidth: n.minWidth ? `${n.minWidth}px` : void 0
1388
1388
  },
1389
- children: /* @__PURE__ */ a(se, { open: h, onOpenChange: b, children: [
1390
- /* @__PURE__ */ e(ie, { asChild: !0, children: u }),
1391
- /* @__PURE__ */ e(Q, { className: "w-80", children: g ? g({ event: t, onClose: z }) : /* @__PURE__ */ e(ue, { event: t, onClose: z }) })
1389
+ children: /* @__PURE__ */ a(ee, { open: h, onOpenChange: y, children: [
1390
+ /* @__PURE__ */ e(te, { asChild: !0, children: c }),
1391
+ /* @__PURE__ */ e(J, { className: "w-80", children: x ? x({ event: t, onClose: E }) : /* @__PURE__ */ e(ue, { event: t, onClose: E }) })
1392
1392
  ] })
1393
1393
  }
1394
1394
  );
@@ -1398,25 +1398,25 @@ function an({
1398
1398
  spanDays: n,
1399
1399
  isStart: r,
1400
1400
  isEnd: o,
1401
- onClick: d,
1401
+ onClick: i,
1402
1402
  className: f,
1403
- disablePopover: i = !1,
1404
- renderPopover: g
1403
+ disablePopover: l = !1,
1404
+ renderPopover: x
1405
1405
  }) {
1406
- const D = he(t.color), [p, h] = le(!1), b = t.endDate < We(/* @__PURE__ */ new Date()), l = t.isCanceled ?? !1, w = S(() => {
1407
- i && d ? d(t) : i || h(!0);
1408
- }, [i, d, t]), v = S(() => {
1406
+ const D = he(t.color), [m, h] = ne(!1), y = t.endDate < Le(/* @__PURE__ */ new Date()), d = t.isCanceled ?? !1, w = z(() => {
1407
+ l && i ? i(t) : l || h(!0);
1408
+ }, [l, i, t]), k = z(() => {
1409
1409
  h(!1);
1410
- }, []), k = /* @__PURE__ */ e(
1410
+ }, []), b = /* @__PURE__ */ e(
1411
1411
  "button",
1412
1412
  {
1413
1413
  type: "button",
1414
1414
  onClick: w,
1415
- className: m(
1415
+ className: u(
1416
1416
  "flex h-5 items-center px-1.5 text-xs font-medium transition-opacity hover:opacity-80",
1417
1417
  // Cancelled events get gray background with strikethrough
1418
- l || // Past events get neutral zinc styling with strikethrough
1419
- b ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [D.dot, "text-white"],
1418
+ d || // Past events get neutral zinc styling with strikethrough
1419
+ y ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [D.dot, "text-white"],
1420
1420
  r && "rounded-l",
1421
1421
  o && "rounded-r",
1422
1422
  !r && "border-l-0",
@@ -1426,16 +1426,16 @@ function an({
1426
1426
  style: { width: `${n * 100}%` },
1427
1427
  children: r && /* @__PURE__ */ e("span", { className: "truncate", children: t.title })
1428
1428
  }
1429
- ), M = /* @__PURE__ */ e(J, { children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-0.5", children: [
1429
+ ), W = /* @__PURE__ */ e(Z, { children: /* @__PURE__ */ a("div", { className: "flex flex-col gap-0.5", children: [
1430
1430
  /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
1431
1431
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t.startDate, t.endDate) })
1432
1432
  ] }) });
1433
- return i ? /* @__PURE__ */ a(re, { children: [
1434
- /* @__PURE__ */ e(ae, { asChild: !0, children: k }),
1435
- M
1436
- ] }) : /* @__PURE__ */ a(se, { open: p, onOpenChange: h, children: [
1437
- /* @__PURE__ */ e(ie, { asChild: !0, children: k }),
1438
- /* @__PURE__ */ e(Q, { className: "w-80", children: g ? g({ event: t, onClose: v }) : /* @__PURE__ */ e(ue, { event: t, onClose: v }) })
1433
+ return l ? /* @__PURE__ */ a(se, { children: [
1434
+ /* @__PURE__ */ e(ie, { asChild: !0, children: b }),
1435
+ W
1436
+ ] }) : /* @__PURE__ */ a(ee, { open: m, onOpenChange: h, children: [
1437
+ /* @__PURE__ */ e(te, { asChild: !0, children: b }),
1438
+ /* @__PURE__ */ e(J, { className: "w-80", children: x ? x({ event: t, onClose: k }) : /* @__PURE__ */ e(ue, { event: t, onClose: k }) })
1439
1439
  ] });
1440
1440
  }
1441
1441
  if (typeof window < "u" && !document.getElementById("inno-calendar-event-marquee-style")) {
@@ -1460,34 +1460,34 @@ function Ze({
1460
1460
  return t.length === 0 ? null : /* @__PURE__ */ a(
1461
1461
  "div",
1462
1462
  {
1463
- className: m(
1463
+ className: u(
1464
1464
  "border-b bg-muted/20 px-2 py-1.5 space-y-1",
1465
1465
  "sm:px-4 sm:py-2",
1466
1466
  o
1467
1467
  ),
1468
1468
  children: [
1469
1469
  /* @__PURE__ */ e("span", { className: "text-[10px] font-medium text-muted-foreground sm:text-xs", children: "All day / Multi-day" }),
1470
- /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: t.map((d) => {
1471
- const f = he(d.color), i = Ee(d.startDate, n), g = Ee(d.endDate, n);
1470
+ /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: t.map((i) => {
1471
+ const f = he(i.color), l = $e(i.startDate, n), x = $e(i.endDate, n);
1472
1472
  return /* @__PURE__ */ a(
1473
1473
  "button",
1474
1474
  {
1475
1475
  type: "button",
1476
- onClick: () => r?.(d),
1477
- className: m(
1476
+ onClick: () => r?.(i),
1477
+ className: u(
1478
1478
  "inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium transition-opacity hover:opacity-80",
1479
1479
  "sm:px-2 sm:py-1 sm:text-xs",
1480
1480
  f.bg,
1481
1481
  f.text,
1482
- d.isCanceled && "opacity-60 line-through"
1482
+ i.isCanceled && "opacity-60 line-through"
1483
1483
  ),
1484
1484
  children: [
1485
- i && "→ ",
1486
- /* @__PURE__ */ e("span", { className: "truncate max-w-24 sm:max-w-32", children: d.title }),
1487
- g && " →"
1485
+ l && "→ ",
1486
+ /* @__PURE__ */ e("span", { className: "truncate max-w-24 sm:max-w-32", children: i.title }),
1487
+ x && " →"
1488
1488
  ]
1489
1489
  },
1490
- d.id
1490
+ i.id
1491
1491
  );
1492
1492
  }) })
1493
1493
  ]
@@ -1500,151 +1500,151 @@ function Qe({
1500
1500
  onSelectionStart: n,
1501
1501
  onSelectionMove: r,
1502
1502
  onSelectionEnd: o,
1503
- isSelected: d = !1,
1503
+ isSelected: i = !1,
1504
1504
  isSelecting: f = !1,
1505
- disabled: i = !1,
1506
- ariaLabel: g,
1505
+ disabled: l = !1,
1506
+ ariaLabel: x,
1507
1507
  children: D,
1508
- className: p,
1508
+ className: m,
1509
1509
  height: h,
1510
- style: b,
1511
- dataAttributes: l
1510
+ style: y,
1511
+ dataAttributes: d
1512
1512
  }) {
1513
- const w = ne(null), v = ne(!1), k = ne(!1), M = ne(null), [T, c] = le(!1), x = Se(), W = S(
1514
- (u) => {
1515
- i || u.button !== 0 && u.pointerType === "mouse" || (u.preventDefault(), w.current = { x: u.clientX, y: u.clientY }, v.current = !1, k.current = !0, n?.(t));
1513
+ const w = oe(null), k = oe(!1), b = oe(!1), W = oe(null), [L, M] = ne(!1), C = Me(), A = z(
1514
+ (c) => {
1515
+ l || c.button !== 0 && c.pointerType === "mouse" || (c.preventDefault(), w.current = { x: c.clientX, y: c.clientY }, k.current = !1, b.current = !0, n?.(t));
1516
1516
  },
1517
- [i, t, n]
1518
- ), R = S(
1519
- (u) => {
1520
- if (!(w.current && k.current && !i)) return;
1521
- const P = u.clientX - w.current.x, $ = u.clientY - w.current.y;
1522
- Math.sqrt(P * P + $ * $) >= qt && (v.current = !0);
1517
+ [l, t, n]
1518
+ ), p = z(
1519
+ (c) => {
1520
+ if (!(w.current && b.current && !l)) return;
1521
+ const F = c.clientX - w.current.x, _ = c.clientY - w.current.y;
1522
+ Math.sqrt(F * F + _ * _) >= qt && (k.current = !0);
1523
1523
  },
1524
- [i]
1525
- ), E = S(
1526
- (u) => {
1527
- i || (u.buttons > 0 || f) && r?.(t);
1524
+ [l]
1525
+ ), T = z(
1526
+ (c) => {
1527
+ l || (c.buttons > 0 || f) && r?.(t);
1528
1528
  },
1529
- [i, f, t, r]
1530
- ), C = S(() => {
1531
- i || (o?.(), w.current = null, v.current = !1, k.current = !1);
1532
- }, [i, o]), z = S(
1533
- (u) => {
1534
- if (!x?.isDragging || i) return;
1535
- u.preventDefault(), u.dataTransfer.dropEffect = "move", c(!0);
1536
- const P = /* @__PURE__ */ new Date(), $ = t.hour ?? P.getHours(), y = t.minute ?? (P.getMinutes() >= 30 ? 30 : 0);
1537
- x.updateDragPreview?.(t.date, $, y);
1529
+ [l, f, t, r]
1530
+ ), v = z(() => {
1531
+ l || (o?.(), w.current = null, k.current = !1, b.current = !1);
1532
+ }, [l, o]), E = z(
1533
+ (c) => {
1534
+ if (!C?.isDragging || l) return;
1535
+ c.preventDefault(), c.dataTransfer.dropEffect = "move", M(!0);
1536
+ const F = /* @__PURE__ */ new Date(), _ = t.hour ?? F.getHours(), N = t.minute ?? (F.getMinutes() >= 30 ? 30 : 0);
1537
+ C.updateDragPreview?.(t.date, _, N);
1538
1538
  },
1539
- [x, i, t]
1540
- ), O = S(() => {
1541
- c(!1);
1542
- }, []), F = S(
1543
- (u) => {
1544
- u.preventDefault(), c(!1), !(!x?.isDragging || i) && x.endDrag?.();
1539
+ [C, l, t]
1540
+ ), B = z(() => {
1541
+ M(!1);
1542
+ }, []), O = z(
1543
+ (c) => {
1544
+ c.preventDefault(), M(!1), !(!C?.isDragging || l) && C.endDrag?.();
1545
1545
  },
1546
- [x, i]
1546
+ [C, l]
1547
1547
  );
1548
1548
  rt(() => {
1549
- const u = () => {
1550
- k.current && (k.current = !1, w.current = null, v.current = !1);
1549
+ const c = () => {
1550
+ b.current && (b.current = !1, w.current = null, k.current = !1);
1551
1551
  };
1552
- return window.addEventListener("pointerup", u), window.addEventListener("pointercancel", u), () => {
1553
- window.removeEventListener("pointerup", u), window.removeEventListener("pointercancel", u);
1552
+ return window.addEventListener("pointerup", c), window.addEventListener("pointercancel", c), () => {
1553
+ window.removeEventListener("pointerup", c), window.removeEventListener("pointercancel", c);
1554
1554
  };
1555
1555
  }, []);
1556
- const j = S(
1557
- (u) => {
1558
- i || (u.key === "Enter" || u.key === " ") && (u.preventDefault(), n?.(t), o?.());
1556
+ const g = z(
1557
+ (c) => {
1558
+ l || (c.key === "Enter" || c.key === " ") && (c.preventDefault(), n?.(t), o?.());
1559
1559
  },
1560
- [i, t, n, o]
1560
+ [l, t, n, o]
1561
1561
  );
1562
1562
  return /* @__PURE__ */ e(
1563
1563
  "button",
1564
1564
  {
1565
- ref: M,
1565
+ ref: W,
1566
1566
  type: "button",
1567
- "aria-label": g,
1568
- "aria-disabled": i,
1569
- "aria-pressed": d,
1570
- disabled: i,
1571
- onPointerDown: W,
1572
- onPointerMove: R,
1573
- onPointerUp: C,
1574
- onPointerEnter: E,
1575
- onKeyDown: j,
1576
- onDragOver: z,
1577
- onDragLeave: O,
1578
- onDrop: F,
1579
- className: m(
1567
+ "aria-label": x,
1568
+ "aria-disabled": l,
1569
+ "aria-pressed": i,
1570
+ disabled: l,
1571
+ onPointerDown: A,
1572
+ onPointerMove: p,
1573
+ onPointerUp: v,
1574
+ onPointerEnter: T,
1575
+ onKeyDown: g,
1576
+ onDragOver: E,
1577
+ onDragLeave: B,
1578
+ onDrop: O,
1579
+ className: u(
1580
1580
  "select-none touch-none cursor-pointer transition-colors",
1581
1581
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
1582
1582
  // Hover state (only when not in selection)
1583
- !(f || i) && "hover:bg-accent/50",
1583
+ !(f || l) && "hover:bg-accent/50",
1584
1584
  // Selection state
1585
- d && "bg-zinc-50",
1585
+ i && "bg-zinc-50",
1586
1586
  // Drag over state - visual feedback when event is dragged over
1587
- T && "bg-primary/20 ring-2 ring-primary ring-inset",
1587
+ L && "bg-primary/20 ring-2 ring-primary ring-inset",
1588
1588
  // Disabled state
1589
- i && "cursor-not-allowed opacity-50",
1590
- p
1589
+ l && "cursor-not-allowed opacity-50",
1590
+ m
1591
1591
  ),
1592
- style: { height: h, ...b },
1593
- ...l,
1592
+ style: { height: h, ...y },
1593
+ ...d,
1594
1594
  children: D
1595
1595
  }
1596
1596
  );
1597
1597
  }
1598
- function et({ slot: t, date: n, hour: r, minute: o, ariaLabel: d, ...f }) {
1599
- const i = t ?? { date: n, hour: r ?? 0, minute: o ?? 0 }, g = d ?? `Add event at ${(i.hour ?? 0).toString().padStart(2, "0")}:${(i.minute ?? 0).toString().padStart(2, "0")} on ${i.date.toLocaleDateString()}`;
1600
- return /* @__PURE__ */ e(Qe, { slot: i, ariaLabel: g, ...f });
1598
+ function et({ slot: t, date: n, hour: r, minute: o, ariaLabel: i, ...f }) {
1599
+ const l = t ?? { date: n, hour: r ?? 0, minute: o ?? 0 }, x = i ?? `Add event at ${(l.hour ?? 0).toString().padStart(2, "0")}:${(l.minute ?? 0).toString().padStart(2, "0")} on ${l.date.toLocaleDateString()}`;
1600
+ return /* @__PURE__ */ e(Qe, { slot: l, ariaLabel: x, ...f });
1601
1601
  }
1602
1602
  function Kt({ slot: t, date: n, ariaLabel: r, ...o }) {
1603
- const d = t ?? { date: n }, f = r ?? `Select ${d.date.toLocaleDateString()}`;
1604
- return /* @__PURE__ */ e(Qe, { slot: d, ariaLabel: f, ...o });
1603
+ const i = t ?? { date: n }, f = r ?? `Select ${i.date.toLocaleDateString()}`;
1604
+ return /* @__PURE__ */ e(Qe, { slot: i, ariaLabel: f, ...o });
1605
1605
  }
1606
- const ce = 96, ye = 72, we = 80;
1606
+ const ce = 96, we = 72, ve = 80;
1607
1607
  function on({
1608
1608
  events: t,
1609
1609
  date: n,
1610
1610
  visibleHours: r = { startHour: 0, endHour: 24 },
1611
1611
  workingHours: o,
1612
- slotDuration: d = 30,
1612
+ slotDuration: i = 30,
1613
1613
  badgeVariant: f = "colored",
1614
- onEventClick: i,
1615
- onSlotSelect: g,
1614
+ onEventClick: l,
1615
+ onSlotSelect: x,
1616
1616
  className: D,
1617
- renderEvent: p,
1617
+ renderEvent: m,
1618
1618
  renderPopover: h
1619
1619
  }) {
1620
- const b = 60 / d, l = 100 / b, w = B(() => {
1621
- const y = [];
1622
- for (let s = 0; s < b; s++)
1623
- y.push(s * d);
1624
- return y;
1625
- }, [b, d]), v = B(() => Me(t, n), [t, n]), { singleDay: k, multiDay: M } = B(
1626
- () => Ve(v),
1627
- [v]
1628
- ), T = B(() => {
1629
- const y = Fe(k, n, r, ce), s = /* @__PURE__ */ new Map();
1630
- for (const N of y)
1631
- s.set(N.event.id, N.position);
1620
+ const y = 60 / i, d = 100 / y, w = P(() => {
1621
+ const N = [];
1622
+ for (let s = 0; s < y; s++)
1623
+ N.push(s * i);
1624
+ return N;
1625
+ }, [y, i]), k = P(() => ze(t, n), [t, n]), { singleDay: b, multiDay: W } = P(
1626
+ () => Ve(k),
1627
+ [k]
1628
+ ), L = P(() => {
1629
+ const N = Ue(b, n, r, ce), s = /* @__PURE__ */ new Map();
1630
+ for (const S of N)
1631
+ s.set(S.event.id, S.position);
1632
1632
  return s;
1633
- }, [k, n, r]), c = B(() => Ue(r), [r]), x = /* @__PURE__ */ new Date(), W = Z(n), R = B(() => {
1634
- if (!W) return 0;
1635
- const y = x.getHours() + x.getMinutes() / 60;
1636
- return y < r.startHour || y > r.endHour ? -1 : (y - r.startHour) * ce;
1637
- }, [W, r, x]), E = ne(null);
1638
- Pe(() => {
1639
- const y = E.current;
1640
- if (!y) return;
1633
+ }, [b, n, r]), M = P(() => qe(r), [r]), C = /* @__PURE__ */ new Date(), A = Q(n), p = P(() => {
1634
+ if (!A) return 0;
1635
+ const N = C.getHours() + C.getMinutes() / 60;
1636
+ return N < r.startHour || N > r.endHour ? -1 : (N - r.startHour) * ce;
1637
+ }, [A, r, C]), T = oe(null);
1638
+ Fe(() => {
1639
+ const N = T.current;
1640
+ if (!N) return;
1641
1641
  const s = () => {
1642
- const N = n.getDay(), L = o?.[N];
1643
- let _;
1644
- L?.enabled && L.from > 0 ? _ = Math.max(L.from - 1, r.startHour) : _ = Math.max(7, r.startHour);
1645
- const A = (_ - r.startHour) * ce;
1646
- y.scrollTo({
1647
- top: A,
1642
+ const S = n.getDay(), $ = o?.[S];
1643
+ let I;
1644
+ $?.enabled && $.from > 0 ? I = Math.max($.from - 1, r.startHour) : I = Math.max(7, r.startHour);
1645
+ const R = (I - r.startHour) * ce;
1646
+ N.scrollTo({
1647
+ top: R,
1648
1648
  behavior: "instant"
1649
1649
  });
1650
1650
  };
@@ -1652,163 +1652,163 @@ function on({
1652
1652
  requestAnimationFrame(s);
1653
1653
  });
1654
1654
  }, [n, o, r]);
1655
- const C = ze(), z = S(
1656
- (y) => {
1657
- C?.startSelection(y);
1655
+ const v = Te(), E = z(
1656
+ (N) => {
1657
+ v?.startSelection(N);
1658
1658
  },
1659
- [C]
1660
- ), O = S(
1661
- (y) => {
1662
- C?.updateSelection(y);
1659
+ [v]
1660
+ ), B = z(
1661
+ (N) => {
1662
+ v?.updateSelection(N);
1663
1663
  },
1664
- [C]
1665
- ), F = S(() => {
1666
- C?.endSelection();
1667
- }, [C]), j = S(
1668
- (y) => {
1669
- i?.(y);
1664
+ [v]
1665
+ ), O = z(() => {
1666
+ v?.endSelection();
1667
+ }, [v]), g = z(
1668
+ (N) => {
1669
+ l?.(N);
1670
1670
  },
1671
- [i]
1672
- ), u = n.toLocaleDateString([], { weekday: "short" }), P = n.getDate(), $ = Z(n);
1673
- return /* @__PURE__ */ a("div", { className: m("flex flex-col h-full", D), children: [
1671
+ [l]
1672
+ ), c = n.toLocaleDateString([], { weekday: "short" }), F = n.getDate(), _ = Q(n);
1673
+ return /* @__PURE__ */ a("div", { className: u("flex flex-col h-full", D), children: [
1674
1674
  /* @__PURE__ */ e("div", { className: "flex items-center gap-3 border-b px-4 py-3", children: /* @__PURE__ */ a("div", { className: "flex flex-col items-center", children: [
1675
1675
  /* @__PURE__ */ e(
1676
1676
  "span",
1677
1677
  {
1678
- className: m(
1678
+ className: u(
1679
1679
  "text-[11px] font-medium uppercase tracking-wide",
1680
- $ ? "text-primary" : "text-muted-foreground"
1680
+ _ ? "text-primary" : "text-muted-foreground"
1681
1681
  ),
1682
- children: u
1682
+ children: c
1683
1683
  }
1684
1684
  ),
1685
1685
  /* @__PURE__ */ e(
1686
1686
  "span",
1687
1687
  {
1688
- className: m(
1688
+ className: u(
1689
1689
  "flex items-center justify-center rounded-full mt-0.5",
1690
1690
  "size-12 text-3xl font-normal",
1691
- $ ? "bg-primary text-primary-foreground" : "text-foreground"
1691
+ _ ? "bg-primary text-primary-foreground" : "text-foreground"
1692
1692
  ),
1693
- children: P
1693
+ children: F
1694
1694
  }
1695
1695
  )
1696
1696
  ] }) }),
1697
- M.length > 0 && /* @__PURE__ */ e(
1697
+ W.length > 0 && /* @__PURE__ */ e(
1698
1698
  Ze,
1699
1699
  {
1700
- events: M,
1700
+ events: W,
1701
1701
  date: n,
1702
- onEventClick: j
1702
+ onEventClick: g
1703
1703
  }
1704
1704
  ),
1705
- /* @__PURE__ */ e("div", { ref: E, className: "flex-1 overflow-auto", children: /* @__PURE__ */ a("div", { className: "relative min-h-full", children: [
1706
- c.map((y, s) => {
1707
- const L = !qe(n, y, o);
1705
+ /* @__PURE__ */ e("div", { ref: T, className: "flex-1 overflow-auto", children: /* @__PURE__ */ a("div", { className: "relative min-h-full", children: [
1706
+ M.map((N, s) => {
1707
+ const $ = !Ke(n, N, o);
1708
1708
  return /* @__PURE__ */ a(
1709
1709
  "div",
1710
1710
  {
1711
- className: m("relative flex", L && "bg-calendar-disabled-hour"),
1711
+ className: u("relative flex", $ && "bg-calendar-disabled-hour"),
1712
1712
  style: { height: ce },
1713
1713
  children: [
1714
1714
  /* @__PURE__ */ e(
1715
1715
  "div",
1716
1716
  {
1717
1717
  className: "relative flex-shrink-0 border-r border-border/50 bg-zinc-50 dark:bg-zinc-900",
1718
- style: { width: ye },
1719
- children: /* @__PURE__ */ e("div", { className: "absolute -top-2.5 right-1 sm:right-2 flex h-5 items-center", children: s !== 0 && /* @__PURE__ */ e("span", { className: "text-[10px] sm:text-xs text-muted-foreground", children: xe(y) }) })
1718
+ style: { width: we },
1719
+ children: /* @__PURE__ */ e("div", { className: "absolute -top-2.5 right-1 sm:right-2 flex h-5 items-center", children: s !== 0 && /* @__PURE__ */ e("span", { className: "text-[10px] sm:text-xs text-muted-foreground", children: be(N) }) })
1720
1720
  }
1721
1721
  ),
1722
1722
  /* @__PURE__ */ a("div", { className: "relative flex-1", children: [
1723
- W && !L && /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-primary/5" }),
1723
+ A && !$ && /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-primary/5" }),
1724
1724
  s !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
1725
- w.slice(1).map((_) => /* @__PURE__ */ e(
1725
+ w.slice(1).map((I) => /* @__PURE__ */ e(
1726
1726
  "div",
1727
1727
  {
1728
1728
  className: "pointer-events-none absolute inset-x-0 border-b border-dashed border-border/30",
1729
- style: { top: `${_ / 60 * 100}%` }
1729
+ style: { top: `${I / 60 * 100}%` }
1730
1730
  },
1731
- _
1731
+ I
1732
1732
  )),
1733
- w.map((_, A) => {
1734
- const U = { date: n, hour: y, minute: _ };
1733
+ w.map((I, R) => {
1734
+ const U = { date: n, hour: N, minute: I };
1735
1735
  return /* @__PURE__ */ e(
1736
1736
  et,
1737
1737
  {
1738
1738
  slot: U,
1739
- onSelectionStart: z,
1740
- onSelectionMove: O,
1741
- onSelectionEnd: F,
1742
- isSelected: C?.isSlotSelected(U) ?? !1,
1743
- isSelecting: C?.isSelecting ?? !1,
1744
- disabled: L,
1739
+ onSelectionStart: E,
1740
+ onSelectionMove: B,
1741
+ onSelectionEnd: O,
1742
+ isSelected: v?.isSlotSelected(U) ?? !1,
1743
+ isSelecting: v?.isSelecting ?? !1,
1744
+ disabled: $,
1745
1745
  className: "absolute inset-x-0",
1746
1746
  style: {
1747
- top: `${A * l}%`,
1748
- height: `${l}%`
1747
+ top: `${R * d}%`,
1748
+ height: `${d}%`
1749
1749
  },
1750
- ariaLabel: `Add event at ${xe(y)}:${String(_).padStart(2, "0")}`
1750
+ ariaLabel: `Add event at ${be(N)}:${String(I).padStart(2, "0")}`
1751
1751
  },
1752
- _
1752
+ I
1753
1753
  );
1754
1754
  })
1755
1755
  ] })
1756
1756
  ]
1757
1757
  },
1758
- y
1758
+ N
1759
1759
  );
1760
1760
  }),
1761
1761
  /* @__PURE__ */ e(
1762
1762
  "div",
1763
1763
  {
1764
1764
  className: "absolute top-0 bottom-0 right-0 pointer-events-none",
1765
- style: { left: ye },
1766
- children: k.map((y) => {
1767
- const s = T.get(y.id);
1765
+ style: { left: we },
1766
+ children: b.map((N) => {
1767
+ const s = L.get(N.id);
1768
1768
  if (!s) return null;
1769
- const N = `calc(${s.width}% - 2px)`, L = `max(${we}px, ${N})`;
1770
- return p ? /* @__PURE__ */ e(
1769
+ const S = `calc(${s.width}% - 2px)`, $ = `max(${ve}px, ${S})`;
1770
+ return m ? /* @__PURE__ */ e(
1771
1771
  "div",
1772
1772
  {
1773
1773
  className: "absolute pointer-events-auto p-0.5",
1774
1774
  style: {
1775
1775
  top: `${s.top}px`,
1776
1776
  left: `${s.left}%`,
1777
- width: L,
1778
- minWidth: `${we}px`
1777
+ width: $,
1778
+ minWidth: `${ve}px`
1779
1779
  },
1780
- children: p({ event: y, position: s })
1780
+ children: m({ event: N, position: s })
1781
1781
  },
1782
- y.id
1782
+ N.id
1783
1783
  ) : /* @__PURE__ */ e(
1784
1784
  Je,
1785
1785
  {
1786
- event: y,
1786
+ event: N,
1787
1787
  position: {
1788
1788
  top: s.top,
1789
1789
  left: s.left,
1790
1790
  width: s.width,
1791
- minWidth: we
1791
+ minWidth: ve
1792
1792
  },
1793
1793
  hourHeight: ce,
1794
1794
  badgeVariant: f,
1795
- onClick: i,
1796
- disablePopover: !!i && !h,
1795
+ onClick: l,
1796
+ disablePopover: !!l && !h,
1797
1797
  renderPopover: h,
1798
1798
  className: "pointer-events-auto"
1799
1799
  },
1800
- y.id
1800
+ N.id
1801
1801
  );
1802
1802
  })
1803
1803
  }
1804
1804
  ),
1805
- W && R >= 0 && /* @__PURE__ */ a(
1805
+ A && p >= 0 && /* @__PURE__ */ a(
1806
1806
  "div",
1807
1807
  {
1808
1808
  className: "absolute left-0 right-0 z-20 flex items-center pointer-events-none",
1809
1809
  style: {
1810
- top: R,
1811
- left: ye
1810
+ top: p,
1811
+ left: we
1812
1812
  },
1813
1813
  children: [
1814
1814
  /* @__PURE__ */ e("div", { className: "h-2.5 w-2.5 -ml-1 rounded-full bg-red-500" }),
@@ -1819,145 +1819,145 @@ function on({
1819
1819
  ] }) })
1820
1820
  ] });
1821
1821
  }
1822
- const te = 96, fe = 56, Oe = 72, Y = 120, pe = 100, Yt = 3;
1822
+ const ae = 96, fe = 56, He = 72, Y = 120, pe = 100, Yt = 3;
1823
1823
  function sn({
1824
1824
  events: t,
1825
1825
  date: n,
1826
1826
  weekStartsOn: r = 1,
1827
1827
  visibleHours: o = { startHour: 0, endHour: 24 },
1828
- workingHours: d,
1828
+ workingHours: i,
1829
1829
  slotDuration: f = 30,
1830
- badgeVariant: i = "colored",
1831
- onEventClick: g,
1830
+ badgeVariant: l = "colored",
1831
+ onEventClick: x,
1832
1832
  onSlotSelect: D,
1833
- onDayClick: p,
1833
+ onDayClick: m,
1834
1834
  className: h,
1835
- renderEvent: b,
1836
- renderPopover: l
1835
+ renderEvent: y,
1836
+ renderPopover: d
1837
1837
  }) {
1838
- const w = 60 / f, v = 100 / w, k = B(() => {
1838
+ const w = 60 / f, k = 100 / w, b = P(() => {
1839
1839
  const s = [];
1840
- for (let N = 0; N < w; N++)
1841
- s.push(N * f);
1840
+ for (let S = 0; S < w; S++)
1841
+ s.push(S * f);
1842
1842
  return s;
1843
- }, [w, f]), M = B(() => st(n, r), [n, r]), T = B(() => Ue(o), [o]), c = B(() => {
1843
+ }, [w, f]), W = P(() => st(n, r), [n, r]), L = P(() => qe(o), [o]), M = P(() => {
1844
1844
  const s = /* @__PURE__ */ new Map();
1845
- for (const N of M) {
1846
- const L = N.toDateString(), _ = Me(t, N), { singleDay: A, multiDay: U } = Ve(_), V = Fe(A, N, o, te), H = /* @__PURE__ */ new Map();
1847
- let ee = 1;
1845
+ for (const S of W) {
1846
+ const $ = S.toDateString(), I = ze(t, S), { singleDay: R, multiDay: U } = Ve(I), V = Ue(R, S, o, ae), H = /* @__PURE__ */ new Map();
1847
+ let re = 1;
1848
1848
  for (const q of V)
1849
1849
  if (H.set(q.event.id, q.position), q.position.width > 0) {
1850
1850
  const G = Math.round(100 / q.position.width);
1851
- ee = Math.max(ee, G);
1851
+ re = Math.max(re, G);
1852
1852
  }
1853
- s.set(L, {
1854
- singleDay: A,
1853
+ s.set($, {
1854
+ singleDay: R,
1855
1855
  multiDay: U,
1856
1856
  positions: H,
1857
- maxOverlapping: ee
1857
+ maxOverlapping: re
1858
1858
  });
1859
1859
  }
1860
1860
  return s;
1861
- }, [M, t, o]), x = B(() => {
1861
+ }, [W, t, o]), C = P(() => {
1862
1862
  const s = /* @__PURE__ */ new Map();
1863
- for (const { multiDay: N } of c.values())
1864
- for (const L of N)
1865
- s.set(L.id, L);
1863
+ for (const { multiDay: S } of M.values())
1864
+ for (const $ of S)
1865
+ s.set($.id, $);
1866
1866
  return Array.from(s.values());
1867
- }, [c]), W = /* @__PURE__ */ new Date(), R = M.findIndex((s) => Z(s)), E = B(() => {
1868
- if (R < 0) return -1;
1869
- const s = W.getHours() + W.getMinutes() / 60;
1870
- return s < o.startHour || s > o.endHour ? -1 : (s - o.startHour) * te;
1871
- }, [R, o, W]), C = ne(null);
1872
- Pe(() => {
1873
- const s = C.current;
1867
+ }, [M]), A = /* @__PURE__ */ new Date(), p = W.findIndex((s) => Q(s)), T = P(() => {
1868
+ if (p < 0) return -1;
1869
+ const s = A.getHours() + A.getMinutes() / 60;
1870
+ return s < o.startHour || s > o.endHour ? -1 : (s - o.startHour) * ae;
1871
+ }, [p, o, A]), v = oe(null);
1872
+ Fe(() => {
1873
+ const s = v.current;
1874
1874
  if (!s) return;
1875
- const N = () => {
1876
- const _ = (/* @__PURE__ */ new Date()).getDay();
1877
- let A = d?.[_];
1878
- if (!A?.enabled || A.from === 0) {
1879
- const H = d?.[1];
1880
- H?.enabled && (A = H);
1875
+ const S = () => {
1876
+ const I = (/* @__PURE__ */ new Date()).getDay();
1877
+ let R = i?.[I];
1878
+ if (!R?.enabled || R.from === 0) {
1879
+ const H = i?.[1];
1880
+ H?.enabled && (R = H);
1881
1881
  }
1882
1882
  let U;
1883
- A?.enabled && A.from > 0 ? U = Math.max(A.from - 1, o.startHour) : U = Math.max(7, o.startHour);
1884
- const V = (U - o.startHour) * te;
1883
+ R?.enabled && R.from > 0 ? U = Math.max(R.from - 1, o.startHour) : U = Math.max(7, o.startHour);
1884
+ const V = (U - o.startHour) * ae;
1885
1885
  s.scrollTo({
1886
1886
  top: V,
1887
1887
  behavior: "instant"
1888
1888
  });
1889
1889
  };
1890
1890
  requestAnimationFrame(() => {
1891
- requestAnimationFrame(N);
1891
+ requestAnimationFrame(S);
1892
1892
  });
1893
- }, [n, d, o]);
1894
- const z = ze(), O = S(
1893
+ }, [n, i, o]);
1894
+ const E = Te(), B = z(
1895
1895
  (s) => {
1896
- z?.startSelection(s);
1896
+ E?.startSelection(s);
1897
1897
  },
1898
- [z]
1899
- ), F = S(
1898
+ [E]
1899
+ ), O = z(
1900
1900
  (s) => {
1901
- z?.updateSelection(s);
1901
+ E?.updateSelection(s);
1902
1902
  },
1903
- [z]
1904
- ), j = S(() => {
1905
- z?.endSelection();
1906
- }, [z]), u = S(
1903
+ [E]
1904
+ ), g = z(() => {
1905
+ E?.endSelection();
1906
+ }, [E]), c = z(
1907
1907
  (s) => {
1908
- g?.(s);
1908
+ x?.(s);
1909
1909
  },
1910
- [g]
1911
- ), P = fe + 7 * Y, $ = B(() => {
1910
+ [x]
1911
+ ), F = fe + 7 * Y, _ = P(() => {
1912
1912
  const s = [];
1913
- for (const N of M) {
1914
- const L = N.toDateString(), A = c.get(L)?.maxOverlapping ?? 1;
1915
- A > Yt ? s.push(Math.max(Y, A * pe)) : s.push(Y);
1913
+ for (const S of W) {
1914
+ const $ = S.toDateString(), R = M.get($)?.maxOverlapping ?? 1;
1915
+ R > Yt ? s.push(Math.max(Y, R * pe)) : s.push(Y);
1916
1916
  }
1917
1917
  return s;
1918
- }, [M, c]), y = fe + $.reduce((s, N) => s + N, 0);
1919
- return /* @__PURE__ */ a("div", { className: m("ic-week-view flex flex-col h-full", h), children: [
1920
- x.length > 0 && /* @__PURE__ */ e(
1918
+ }, [W, M]), N = fe + _.reduce((s, S) => s + S, 0);
1919
+ return /* @__PURE__ */ a("div", { className: u("ic-week-view flex flex-col h-full", h), children: [
1920
+ C.length > 0 && /* @__PURE__ */ e(
1921
1921
  Ze,
1922
1922
  {
1923
- events: x,
1923
+ events: C,
1924
1924
  date: it(n, r),
1925
- onEventClick: u
1925
+ onEventClick: c
1926
1926
  }
1927
1927
  ),
1928
- /* @__PURE__ */ e("div", { ref: C, className: "ic-week-scroll-container flex-1", children: /* @__PURE__ */ a("div", { style: { minWidth: Math.max(P, y) }, children: [
1928
+ /* @__PURE__ */ e("div", { ref: v, className: "ic-week-scroll-container flex-1", children: /* @__PURE__ */ a("div", { style: { minWidth: Math.max(F, N) }, children: [
1929
1929
  /* @__PURE__ */ e("div", { className: "ic-week-header sticky top-0 z-20 border-b bg-background", children: /* @__PURE__ */ a("div", { className: "flex", children: [
1930
1930
  /* @__PURE__ */ e(
1931
1931
  "div",
1932
1932
  {
1933
1933
  className: "flex-shrink-0 flex items-end justify-center pb-2 text-[10px] text-muted-foreground/70",
1934
- style: { width: fe, height: Oe },
1934
+ style: { width: fe, height: He },
1935
1935
  children: /* @__PURE__ */ a("span", { className: "hidden sm:inline", children: [
1936
1936
  "GMT",
1937
1937
  (() => {
1938
- const s = (/* @__PURE__ */ new Date()).getTimezoneOffset(), N = Math.abs(Math.floor(s / 60)), L = s <= 0 ? "+" : "-";
1939
- return N > 0 ? `${L}${String(N).padStart(2, "0")}` : "";
1938
+ const s = (/* @__PURE__ */ new Date()).getTimezoneOffset(), S = Math.abs(Math.floor(s / 60)), $ = s <= 0 ? "+" : "-";
1939
+ return S > 0 ? `${$}${String(S).padStart(2, "0")}` : "";
1940
1940
  })()
1941
1941
  ] })
1942
1942
  }
1943
1943
  ),
1944
- M.map((s, N) => {
1945
- const L = Z(s), _ = $[N] ?? Y, A = _ > Y;
1944
+ W.map((s, S) => {
1945
+ const $ = Q(s), I = _[S] ?? Y, R = I > Y;
1946
1946
  return /* @__PURE__ */ a(
1947
1947
  "div",
1948
1948
  {
1949
1949
  className: "flex-1 flex flex-col items-center justify-center border-r last:border-r-0 py-2",
1950
1950
  style: {
1951
- height: Oe,
1952
- minWidth: A ? _ : Y
1951
+ height: He,
1952
+ minWidth: R ? I : Y
1953
1953
  },
1954
1954
  children: [
1955
1955
  /* @__PURE__ */ e(
1956
1956
  "span",
1957
1957
  {
1958
- className: m(
1958
+ className: u(
1959
1959
  "text-[11px] font-medium uppercase tracking-wide",
1960
- L ? "text-primary" : "text-muted-foreground"
1960
+ $ ? "text-primary" : "text-muted-foreground"
1961
1961
  ),
1962
1962
  children: s.toLocaleDateString([], { weekday: "short" })
1963
1963
  }
@@ -1966,11 +1966,11 @@ function sn({
1966
1966
  "button",
1967
1967
  {
1968
1968
  type: "button",
1969
- onClick: () => p?.(s),
1970
- className: m(
1969
+ onClick: () => m?.(s),
1970
+ className: u(
1971
1971
  "flex items-center justify-center rounded-full transition-colors mt-0.5",
1972
1972
  "size-10 text-2xl font-normal",
1973
- L ? "bg-primary text-primary-foreground" : "text-foreground hover:bg-muted"
1973
+ $ ? "bg-primary text-primary-foreground" : "text-foreground hover:bg-muted"
1974
1974
  ),
1975
1975
  children: s.getDate()
1976
1976
  }
@@ -1987,33 +1987,33 @@ function sn({
1987
1987
  {
1988
1988
  className: "ic-hour-column sticky left-0 z-10 bg-zinc-50 dark:bg-zinc-900 border-r",
1989
1989
  style: { width: fe },
1990
- children: T.map((s, N) => /* @__PURE__ */ e("div", { className: "relative", style: { height: te }, children: /* @__PURE__ */ e("div", { className: "absolute -top-2.5 right-1 sm:right-2 flex h-5 items-center", children: N !== 0 && /* @__PURE__ */ e("span", { className: "text-[10px] sm:text-xs text-muted-foreground", children: xe(s) }) }) }, s))
1990
+ children: L.map((s, S) => /* @__PURE__ */ e("div", { className: "relative", style: { height: ae }, children: /* @__PURE__ */ e("div", { className: "absolute -top-2.5 right-1 sm:right-2 flex h-5 items-center", children: S !== 0 && /* @__PURE__ */ e("span", { className: "text-[10px] sm:text-xs text-muted-foreground", children: be(s) }) }) }, s))
1991
1991
  }
1992
1992
  ),
1993
- /* @__PURE__ */ e("div", { className: "ic-week-grid relative flex-1", children: /* @__PURE__ */ e("div", { className: "flex divide-x", children: M.map((s, N) => {
1994
- const L = s.toDateString(), _ = c.get(L), A = $[N] ?? Y, U = A > Y;
1993
+ /* @__PURE__ */ e("div", { className: "ic-week-grid relative flex-1", children: /* @__PURE__ */ e("div", { className: "flex divide-x", children: W.map((s, S) => {
1994
+ const $ = s.toDateString(), I = M.get($), R = _[S] ?? Y, U = R > Y;
1995
1995
  return /* @__PURE__ */ a(
1996
1996
  "div",
1997
1997
  {
1998
1998
  className: "ic-day-column relative flex-1",
1999
1999
  style: {
2000
- minWidth: U ? A : Y
2000
+ minWidth: U ? R : Y
2001
2001
  },
2002
2002
  children: [
2003
- T.map((V, H) => {
2004
- const q = !qe(s, V, d);
2003
+ L.map((V, H) => {
2004
+ const q = !Ke(s, V, i);
2005
2005
  return /* @__PURE__ */ a(
2006
2006
  "div",
2007
2007
  {
2008
- className: m(
2008
+ className: u(
2009
2009
  "relative",
2010
2010
  q && "bg-calendar-disabled-hour",
2011
- Z(s) && !q && "bg-primary/5"
2011
+ Q(s) && !q && "bg-primary/5"
2012
2012
  ),
2013
- style: { height: te },
2013
+ style: { height: ae },
2014
2014
  children: [
2015
2015
  H !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
2016
- k.slice(1).map((G) => /* @__PURE__ */ e(
2016
+ b.slice(1).map((G) => /* @__PURE__ */ e(
2017
2017
  "div",
2018
2018
  {
2019
2019
  className: "pointer-events-none absolute inset-x-0 border-b border-dashed border-border/30",
@@ -2021,24 +2021,24 @@ function sn({
2021
2021
  },
2022
2022
  G
2023
2023
  )),
2024
- k.map((G, tt) => {
2025
- const Le = { date: s, hour: V, minute: G };
2024
+ b.map((G, tt) => {
2025
+ const Ee = { date: s, hour: V, minute: G };
2026
2026
  return /* @__PURE__ */ e(
2027
2027
  et,
2028
2028
  {
2029
- slot: Le,
2030
- onSelectionStart: O,
2031
- onSelectionMove: F,
2032
- onSelectionEnd: j,
2033
- isSelected: z?.isSlotSelected(Le) ?? !1,
2034
- isSelecting: z?.isSelecting ?? !1,
2029
+ slot: Ee,
2030
+ onSelectionStart: B,
2031
+ onSelectionMove: O,
2032
+ onSelectionEnd: g,
2033
+ isSelected: E?.isSlotSelected(Ee) ?? !1,
2034
+ isSelecting: E?.isSelecting ?? !1,
2035
2035
  disabled: q,
2036
2036
  className: "absolute inset-x-0",
2037
2037
  style: {
2038
- top: `${tt * v}%`,
2039
- height: `${v}%`
2038
+ top: `${tt * k}%`,
2039
+ height: `${k}%`
2040
2040
  },
2041
- ariaLabel: `Add event on ${s.toLocaleDateString()} at ${xe(V)}:${String(G).padStart(2, "0")}`
2041
+ ariaLabel: `Add event on ${s.toLocaleDateString()} at ${be(V)}:${String(G).padStart(2, "0")}`
2042
2042
  },
2043
2043
  G
2044
2044
  );
@@ -2048,11 +2048,11 @@ function sn({
2048
2048
  V
2049
2049
  );
2050
2050
  }),
2051
- _?.singleDay.map((V) => {
2052
- const H = _.positions.get(V.id);
2051
+ I?.singleDay.map((V) => {
2052
+ const H = I.positions.get(V.id);
2053
2053
  if (!H) return null;
2054
- const ee = `calc(${H.width}% - 2px)`, q = `max(${pe}px, ${ee})`;
2055
- return b ? /* @__PURE__ */ e(
2054
+ const re = `calc(${H.width}% - 2px)`, q = `max(${pe}px, ${re})`;
2055
+ return y ? /* @__PURE__ */ e(
2056
2056
  "div",
2057
2057
  {
2058
2058
  className: "absolute pointer-events-auto p-0.5",
@@ -2062,7 +2062,7 @@ function sn({
2062
2062
  width: q,
2063
2063
  minWidth: `${pe}px`
2064
2064
  },
2065
- children: b({ event: V, position: H })
2065
+ children: y({ event: V, position: H })
2066
2066
  },
2067
2067
  V.id
2068
2068
  ) : /* @__PURE__ */ e(
@@ -2075,21 +2075,21 @@ function sn({
2075
2075
  width: H.width,
2076
2076
  minWidth: pe
2077
2077
  },
2078
- hourHeight: te,
2079
- badgeVariant: i,
2080
- onClick: g,
2081
- disablePopover: !!g && !l,
2082
- renderPopover: l,
2078
+ hourHeight: ae,
2079
+ badgeVariant: l,
2080
+ onClick: x,
2081
+ disablePopover: !!x && !d,
2082
+ renderPopover: d,
2083
2083
  className: "pointer-events-auto"
2084
2084
  },
2085
2085
  V.id
2086
2086
  );
2087
2087
  }),
2088
- N === R && E >= 0 && /* @__PURE__ */ a(
2088
+ S === p && T >= 0 && /* @__PURE__ */ a(
2089
2089
  "div",
2090
2090
  {
2091
2091
  className: "absolute left-0 right-0 z-20 flex items-center pointer-events-none",
2092
- style: { top: E },
2092
+ style: { top: T },
2093
2093
  children: [
2094
2094
  /* @__PURE__ */ e("div", { className: "h-2 w-2 -ml-1 rounded-full bg-red-500" }),
2095
2095
  /* @__PURE__ */ e("div", { className: "flex-1 h-0.5 bg-red-500" })
@@ -2121,144 +2121,206 @@ const Gt = [
2121
2121
  { full: "Thursday", short: "Thu", tiny: "T" },
2122
2122
  { full: "Friday", short: "Fri", tiny: "F" },
2123
2123
  { full: "Saturday", short: "Sat", tiny: "S" }
2124
- ], ve = 3;
2124
+ ], ge = 3;
2125
2125
  function ln({
2126
2126
  events: t,
2127
2127
  date: n,
2128
2128
  weekStartsOn: r = 1,
2129
2129
  badgeVariant: o = "colored",
2130
- onEventClick: d,
2130
+ onEventClick: i,
2131
2131
  onSlotSelect: f,
2132
- onDayClick: i,
2133
- className: g,
2132
+ onDayClick: l,
2133
+ className: x,
2134
2134
  renderEvent: D,
2135
- renderPopover: p
2135
+ renderPopover: m,
2136
+ showMoreEventsInPopover: h = !1
2136
2137
  }) {
2137
- const h = B(() => lt(n, r), [n, r]), b = B(() => {
2138
- const c = /* @__PURE__ */ new Map();
2139
- for (const x of h) {
2140
- const W = x.date.toDateString(), R = Me(t, x.date);
2141
- R.sort((E, C) => E.startDate.getTime() - C.startDate.getTime()), c.set(W, R);
2138
+ const [y, d] = ne(null), w = P(() => lt(n, r), [n, r]), k = P(() => {
2139
+ const p = /* @__PURE__ */ new Map();
2140
+ for (const T of w) {
2141
+ const v = T.date.toDateString(), E = ze(t, T.date);
2142
+ E.sort((B, O) => B.startDate.getTime() - O.startDate.getTime()), p.set(v, E);
2142
2143
  }
2143
- return c;
2144
- }, [h, t]), l = ze(), w = S(
2145
- (c) => {
2146
- l?.startSelection(c);
2144
+ return p;
2145
+ }, [w, t]), b = Te(), W = z(
2146
+ (p) => {
2147
+ b?.startSelection(p);
2147
2148
  },
2148
- [l]
2149
- ), v = S(
2150
- (c) => {
2151
- l?.updateSelection(c);
2149
+ [b]
2150
+ ), L = z(
2151
+ (p) => {
2152
+ b?.updateSelection(p);
2152
2153
  },
2153
- [l]
2154
- ), k = S(() => {
2155
- l?.endSelection();
2156
- }, [l]), M = S(
2157
- (c) => {
2158
- i?.(c);
2154
+ [b]
2155
+ ), M = z(() => {
2156
+ b?.endSelection();
2157
+ }, [b]), C = z(
2158
+ (p) => {
2159
+ l?.(p);
2159
2160
  },
2160
- [i]
2161
- ), T = r === 0 ? Xt : Gt;
2162
- return /* @__PURE__ */ e("div", { className: m("flex flex-col h-full overflow-hidden", g), children: /* @__PURE__ */ e("div", { className: "flex flex-col flex-1 overflow-auto", children: /* @__PURE__ */ a("div", { className: "flex flex-col flex-1 min-w-[560px] sm:min-w-0", children: [
2163
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 border-b !sticky !top-0 bg-background z-10", children: T.map((c, x) => /* @__PURE__ */ a(
2161
+ [l]
2162
+ ), A = r === 0 ? Xt : Gt;
2163
+ return /* @__PURE__ */ e("div", { className: u("flex flex-col h-full overflow-hidden", x), children: /* @__PURE__ */ e("div", { className: "flex flex-col flex-1 overflow-auto", children: /* @__PURE__ */ a("div", { className: "flex flex-col flex-1 min-w-[560px] sm:min-w-0", children: [
2164
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 border-b !sticky !top-0 bg-background z-10", children: A.map((p, T) => /* @__PURE__ */ a(
2164
2165
  "div",
2165
2166
  {
2166
- className: m(
2167
+ className: u(
2167
2168
  "py-2 sm:py-2.5 text-center text-[11px] uppercase font-medium tracking-wide text-muted-foreground",
2168
- x >= 5 && "text-muted-foreground/70"
2169
+ T >= 5 && "text-muted-foreground/70"
2169
2170
  // Weekend
2170
2171
  ),
2171
2172
  children: [
2172
- /* @__PURE__ */ e("span", { className: "sm:hidden", children: c.short }),
2173
- /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: c.short })
2173
+ /* @__PURE__ */ e("span", { className: "sm:hidden", children: p.short }),
2174
+ /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: p.short })
2174
2175
  ]
2175
2176
  },
2176
- c.full
2177
+ p.full
2177
2178
  )) }),
2178
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 auto-rows-min", children: h.map((c) => {
2179
- const x = c.date.toDateString(), W = b.get(x) || [], R = Z(c.date), E = c.date.getDay() === 0 || c.date.getDay() === 6, C = W.length > ve;
2179
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 auto-rows-min", children: w.map((p) => {
2180
+ const T = p.date.toDateString(), v = k.get(T) || [], E = Q(p.date), B = p.date.getDay() === 0 || p.date.getDay() === 6, O = v.length > ge;
2180
2181
  return /* @__PURE__ */ a(
2181
2182
  Kt,
2182
2183
  {
2183
- date: c.date,
2184
- onSelectionStart: w,
2185
- onSelectionMove: v,
2186
- onSelectionEnd: k,
2187
- isSelected: l?.isSlotSelected({ date: c.date }) ?? !1,
2188
- isSelecting: l?.isSelecting ?? !1,
2189
- className: m(
2184
+ date: p.date,
2185
+ onSelectionStart: W,
2186
+ onSelectionMove: L,
2187
+ onSelectionEnd: M,
2188
+ isSelected: b?.isSlotSelected({ date: p.date }) ?? !1,
2189
+ isSelecting: b?.isSelecting ?? !1,
2190
+ className: u(
2190
2191
  "relative flex flex-col border-r border-b text-left min-h-[80px] sm:min-h-[100px] overflow-hidden",
2191
2192
  "[&:nth-child(7n)]:border-r-0",
2192
- !c.isCurrentMonth && "bg-muted/20",
2193
- E && c.isCurrentMonth && "bg-muted/10"
2193
+ !p.isCurrentMonth && "bg-muted/20",
2194
+ B && p.isCurrentMonth && "bg-muted/10"
2194
2195
  ),
2195
- ariaLabel: `${c.date.toLocaleDateString()} - ${W.length} events. Click to create event, double-click to view day.`,
2196
+ ariaLabel: `${p.date.toLocaleDateString()} - ${v.length} events. Click to create event, double-click to view day.`,
2196
2197
  children: [
2197
2198
  /* @__PURE__ */ e(
2198
2199
  "div",
2199
2200
  {
2200
- className: m(
2201
+ className: u(
2201
2202
  "flex items-center justify-center p-1",
2202
- !c.isCurrentMonth && "text-muted-foreground/40"
2203
+ !p.isCurrentMonth && "text-muted-foreground/40"
2203
2204
  ),
2204
2205
  children: /* @__PURE__ */ e(
2205
2206
  "button",
2206
2207
  {
2207
2208
  type: "button",
2208
- onClick: (z) => {
2209
- z.stopPropagation(), M(c.date);
2209
+ onClick: (g) => {
2210
+ g.stopPropagation(), C(p.date);
2210
2211
  },
2211
- className: m(
2212
+ className: u(
2212
2213
  "flex items-center justify-center rounded-full transition-colors",
2213
2214
  "size-7 text-sm font-normal",
2214
- R ? "bg-primary text-primary-foreground" : "hover:bg-muted"
2215
+ E ? "bg-primary text-primary-foreground" : "hover:bg-muted"
2215
2216
  ),
2216
- children: c.date.getDate()
2217
+ children: p.date.getDate()
2217
2218
  }
2218
2219
  )
2219
2220
  }
2220
2221
  ),
2221
2222
  /* @__PURE__ */ a("div", { className: "flex-1 overflow-hidden px-2 pt-1 pb-1 space-y-1", children: [
2222
- W.slice(0, ve).map((z) => /* @__PURE__ */ e(
2223
+ v.slice(0, ge).map((g) => /* @__PURE__ */ e(
2223
2224
  "div",
2224
2225
  {
2225
- onPointerDown: (O) => {
2226
- O.stopPropagation();
2226
+ onPointerDown: (c) => {
2227
+ c.stopPropagation();
2227
2228
  },
2228
- children: D ? D({ event: z, variant: "compact" }) : /* @__PURE__ */ e(
2229
- Ge,
2229
+ children: D ? D({ event: g, variant: "compact" }) : /* @__PURE__ */ e(
2230
+ Ce,
2230
2231
  {
2231
- event: z,
2232
+ event: g,
2232
2233
  variant: "compact",
2233
2234
  badgeVariant: o,
2234
- onClick: d,
2235
- disablePopover: !!d && !p,
2236
- renderPopover: p,
2235
+ onClick: i,
2236
+ disablePopover: !!i && !m,
2237
+ renderPopover: m,
2237
2238
  showTime: !1,
2238
2239
  enableDrag: !0
2239
2240
  }
2240
2241
  )
2241
2242
  },
2242
- z.id
2243
+ g.id
2243
2244
  )),
2244
- C && /* @__PURE__ */ a(
2245
+ O && (h ? /* @__PURE__ */ a(
2246
+ ee,
2247
+ {
2248
+ open: y === T,
2249
+ onOpenChange: (g) => d(g ? T : null),
2250
+ children: [
2251
+ /* @__PURE__ */ e(te, { asChild: !0, children: /* @__PURE__ */ a(
2252
+ "button",
2253
+ {
2254
+ type: "button",
2255
+ onPointerDown: (g) => g.stopPropagation(),
2256
+ onClick: (g) => {
2257
+ g.stopPropagation(), d(T);
2258
+ },
2259
+ className: "w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
2260
+ children: [
2261
+ "+",
2262
+ v.length - ge,
2263
+ " more"
2264
+ ]
2265
+ }
2266
+ ) }),
2267
+ /* @__PURE__ */ a(
2268
+ J,
2269
+ {
2270
+ align: "start",
2271
+ side: "right",
2272
+ sideOffset: 8,
2273
+ className: "w-72 max-h-80 overflow-y-auto p-2",
2274
+ onPointerDown: (g) => g.stopPropagation(),
2275
+ children: [
2276
+ /* @__PURE__ */ a("div", { className: "flex items-center justify-between mb-2 pb-2 border-b", children: [
2277
+ /* @__PURE__ */ e("span", { className: "text-sm font-medium", children: p.date.toLocaleDateString(void 0, {
2278
+ weekday: "short",
2279
+ month: "short",
2280
+ day: "numeric"
2281
+ }) }),
2282
+ /* @__PURE__ */ a("span", { className: "text-xs text-muted-foreground", children: [
2283
+ v.length,
2284
+ " events"
2285
+ ] })
2286
+ ] }),
2287
+ /* @__PURE__ */ e("div", { className: "space-y-1.5", children: v.map((g) => /* @__PURE__ */ e("div", { children: D ? D({ event: g, variant: "compact" }) : /* @__PURE__ */ e(
2288
+ Ce,
2289
+ {
2290
+ event: g,
2291
+ variant: "compact",
2292
+ badgeVariant: o,
2293
+ onClick: (c) => {
2294
+ d(null), i?.(c);
2295
+ },
2296
+ disablePopover: !!i && !m,
2297
+ renderPopover: m,
2298
+ showTime: !0
2299
+ }
2300
+ ) }, g.id)) })
2301
+ ]
2302
+ }
2303
+ )
2304
+ ]
2305
+ }
2306
+ ) : /* @__PURE__ */ a(
2245
2307
  "div",
2246
2308
  {
2247
- onPointerDown: (z) => {
2248
- z.stopPropagation(), M(c.date);
2309
+ onPointerDown: (g) => {
2310
+ g.stopPropagation(), C(p.date);
2249
2311
  },
2250
2312
  className: "w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
2251
2313
  children: [
2252
2314
  "+",
2253
- W.length - ve,
2315
+ v.length - ge,
2254
2316
  " more"
2255
2317
  ]
2256
2318
  }
2257
- )
2319
+ ))
2258
2320
  ] })
2259
2321
  ]
2260
2322
  },
2261
- x
2323
+ T
2262
2324
  );
2263
2325
  }) })
2264
2326
  ] }) }) });
@@ -2268,30 +2330,30 @@ function dn({
2268
2330
  date: n,
2269
2331
  daysAhead: r = 60,
2270
2332
  badgeVariant: o = "colored",
2271
- onEventClick: d,
2333
+ onEventClick: i,
2272
2334
  className: f,
2273
- renderEvent: i,
2274
- renderPopover: g
2335
+ renderEvent: l,
2336
+ renderPopover: x
2275
2337
  }) {
2276
- const D = B(() => {
2338
+ const D = P(() => {
2277
2339
  const h = new Date(n);
2278
2340
  h.setHours(0, 0, 0, 0);
2279
- const b = new Date(h);
2280
- return b.setDate(b.getDate() + r), t.filter((l) => l.endDate >= h && l.startDate <= b);
2281
- }, [t, r, n]), p = B(() => {
2282
- const h = dt(D), b = [];
2283
- for (const [l, w] of h)
2284
- b.push({
2285
- date: new Date(l),
2286
- dateKey: l,
2341
+ const y = new Date(h);
2342
+ return y.setDate(y.getDate() + r), t.filter((d) => d.endDate >= h && d.startDate <= y);
2343
+ }, [t, r, n]), m = P(() => {
2344
+ const h = dt(D), y = [];
2345
+ for (const [d, w] of h)
2346
+ y.push({
2347
+ date: new Date(d),
2348
+ dateKey: d,
2287
2349
  events: w
2288
2350
  });
2289
- return b.sort((l, w) => l.date.getTime() - w.date.getTime()), b;
2351
+ return y.sort((d, w) => d.date.getTime() - w.date.getTime()), y;
2290
2352
  }, [D]);
2291
- return p.length === 0 ? /* @__PURE__ */ e(
2353
+ return m.length === 0 ? /* @__PURE__ */ e(
2292
2354
  "div",
2293
2355
  {
2294
- className: m(
2356
+ className: u(
2295
2357
  "flex flex-col items-center justify-center h-full py-12",
2296
2358
  f
2297
2359
  ),
@@ -2300,7 +2362,7 @@ function dn({
2300
2362
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground/70", children: "No events scheduled for this period" })
2301
2363
  ] })
2302
2364
  }
2303
- ) : /* @__PURE__ */ a("div", { className: m("flex flex-col h-full overflow-auto", f), children: [
2365
+ ) : /* @__PURE__ */ a("div", { className: u("flex flex-col h-full overflow-auto", f), children: [
2304
2366
  /* @__PURE__ */ e("div", { className: "sticky top-0 z-10 bg-background border-b px-4 py-3", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
2305
2367
  /* @__PURE__ */ e("h2", { className: "text-lg font-medium", children: "Schedule" }),
2306
2368
  /* @__PURE__ */ a("span", { className: "text-sm text-muted-foreground", children: [
@@ -2309,13 +2371,13 @@ function dn({
2309
2371
  D.length !== 1 ? "s" : ""
2310
2372
  ] })
2311
2373
  ] }) }),
2312
- /* @__PURE__ */ e("div", { className: "flex-1", children: p.map(({ date: h, dateKey: b, events: l }) => {
2313
- const w = Z(h), v = h.toLocaleDateString([], { weekday: "short" }), k = h.getDate(), M = h.toLocaleDateString([], { month: "short" });
2374
+ /* @__PURE__ */ e("div", { className: "flex-1", children: m.map(({ date: h, dateKey: y, events: d }) => {
2375
+ const w = Q(h), k = h.toLocaleDateString([], { weekday: "short" }), b = h.getDate(), W = h.toLocaleDateString([], { month: "short" });
2314
2376
  return /* @__PURE__ */ a("div", { className: "", children: [
2315
2377
  /* @__PURE__ */ e(
2316
2378
  "div",
2317
2379
  {
2318
- className: m(
2380
+ className: u(
2319
2381
  "sticky top-[52px] z-10 bg-background px-4 py-3 border-b"
2320
2382
  ),
2321
2383
  children: /* @__PURE__ */ a("div", { className: "flex items-center gap-3", children: [
@@ -2323,83 +2385,83 @@ function dn({
2323
2385
  /* @__PURE__ */ e(
2324
2386
  "span",
2325
2387
  {
2326
- className: m(
2388
+ className: u(
2327
2389
  "text-[11px] font-medium uppercase tracking-wide",
2328
2390
  w ? "text-primary" : "text-muted-foreground"
2329
2391
  ),
2330
- children: v
2392
+ children: k
2331
2393
  }
2332
2394
  ),
2333
2395
  /* @__PURE__ */ e(
2334
2396
  "span",
2335
2397
  {
2336
- className: m(
2398
+ className: u(
2337
2399
  "flex items-center justify-center rounded-full mt-0.5",
2338
2400
  "size-10 text-xl font-normal",
2339
2401
  w ? "bg-primary text-primary-foreground" : "text-foreground"
2340
2402
  ),
2341
- children: k
2403
+ children: b
2342
2404
  }
2343
2405
  )
2344
2406
  ] }),
2345
2407
  /* @__PURE__ */ a("span", { className: "text-sm text-muted-foreground", children: [
2346
- M,
2408
+ W,
2347
2409
  " ",
2348
2410
  h.getFullYear()
2349
2411
  ] })
2350
2412
  ] })
2351
2413
  }
2352
2414
  ),
2353
- /* @__PURE__ */ e("div", { className: "px-4 py-3 space-y-2 border-b last:border-b-0", children: l.map(
2354
- (T) => i ? /* @__PURE__ */ e("div", { children: i({ event: T, variant: "full" }) }, T.id) : /* @__PURE__ */ e(
2355
- Ge,
2415
+ /* @__PURE__ */ e("div", { className: "px-4 py-3 space-y-2 border-b last:border-b-0", children: d.map(
2416
+ (L) => l ? /* @__PURE__ */ e("div", { children: l({ event: L, variant: "full" }) }, L.id) : /* @__PURE__ */ e(
2417
+ Ce,
2356
2418
  {
2357
- event: T,
2419
+ event: L,
2358
2420
  variant: "full",
2359
2421
  badgeVariant: o,
2360
- onClick: d,
2361
- disablePopover: !!d && !g,
2362
- renderPopover: g,
2422
+ onClick: i,
2423
+ disablePopover: !!i && !x,
2424
+ renderPopover: x,
2363
2425
  showTime: !0,
2364
2426
  showDescription: !0,
2365
2427
  showParticipants: !0
2366
2428
  },
2367
- T.id
2429
+ L.id
2368
2430
  )
2369
2431
  ) })
2370
- ] }, b);
2432
+ ] }, y);
2371
2433
  }) })
2372
2434
  ] });
2373
2435
  }
2374
2436
  export {
2375
2437
  dn as A,
2376
- oe as B,
2438
+ le as B,
2377
2439
  nn as C,
2378
2440
  At as D,
2379
2441
  Je as E,
2380
2442
  ln as M,
2381
- se as P,
2443
+ ee as P,
2382
2444
  et as T,
2383
2445
  sn as W,
2384
2446
  Kt as a,
2385
2447
  on as b,
2386
- Ge as c,
2448
+ Ce as c,
2387
2449
  Ze as d,
2388
2450
  an as e,
2389
2451
  tn as f,
2390
- Q as g,
2391
- ie as h,
2452
+ J as g,
2453
+ te as h,
2392
2454
  Tt as i,
2393
- re as j,
2394
- J as k,
2455
+ se as j,
2456
+ Z as k,
2395
2457
  rn as l,
2396
- ae as m,
2458
+ ie as m,
2397
2459
  ct as n,
2398
2460
  he as o,
2399
- Ie as p,
2400
- Re as q,
2461
+ Re as p,
2462
+ je as q,
2401
2463
  ke as r,
2402
2464
  De as s,
2403
2465
  Lt as t
2404
2466
  };
2405
- //# sourceMappingURL=agenda-view-CRI1J_KB.js.map
2467
+ //# sourceMappingURL=agenda-view-DM01Fpvr.js.map