@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
@@ -3,7 +3,7 @@ import { o as Fe, c as Ge, C as Ke, I as Je, j as Xe } from "./inno-calendar-pro
3
3
  import { c as h } from "./index-DtaLkIY8.js";
4
4
  import { useMemo as I, useRef as Qe, useCallback as ee, forwardRef as ye, useState as te, useEffect as be } from "react";
5
5
  import { an as Ze, Z as qe, a8 as et, az as J, aO as me, I as Pe, h as tt, S as rt, U as nt, o as _e } from "./slot-selection-context-CZjfJAcp.js";
6
- import { c as st, C as at, M as ke, A as ot, W as it, b as lt, P as Oe, h as Ve, g as Re, l as V, p as ct, q as dt, B as q, r as ut, s as Ce, j as R, m as U, k as Y, t as ht } from "./agenda-view-CRI1J_KB.js";
6
+ import { c as st, C as at, M as ke, A as ot, W as it, b as lt, P as Oe, h as Ve, g as Re, l as V, p as ct, q as dt, B as q, r as ut, s as Ce, j as R, m as U, k as Y, t as ht } from "./agenda-view-DM01Fpvr.js";
7
7
  function mt({ view: t, className: r = "" }) {
8
8
  return /* @__PURE__ */ e(
9
9
  "div",
@@ -36,39 +36,39 @@ function Pr(t) {
36
36
  events: r,
37
37
  resources: s,
38
38
  scheduleTypes: a,
39
- initialView: i = "week",
40
- initialDate: l,
39
+ initialView: l = "week",
40
+ initialDate: c,
41
41
  initialFilters: m,
42
42
  preferences: f,
43
- locale: c,
44
- slots: x,
45
- renderEvent: p,
46
- onViewChange: N,
47
- onDateChange: v,
48
- onEventClick: b,
49
- onSlotSelect: k,
50
- onFiltersChange: D,
43
+ locale: u,
44
+ slots: g,
45
+ renderEvent: M,
46
+ onViewChange: x,
47
+ onDateChange: b,
48
+ onEventClick: p,
49
+ onSlotSelect: v,
50
+ onFiltersChange: C,
51
51
  className: z,
52
- children: w
53
- } = t, M = Fe();
54
- if (M)
55
- return /* @__PURE__ */ e("div", { className: z, style: { position: "relative" }, children: w ?? /* @__PURE__ */ e(De, { view: M.view, className: z }) });
56
- const L = Ge({
52
+ children: N
53
+ } = t, y = Fe();
54
+ if (y)
55
+ return /* @__PURE__ */ e("div", { className: z, style: { position: "relative" }, children: N ?? /* @__PURE__ */ e(De, { view: y.view, className: z }) });
56
+ const T = Ge({
57
57
  events: r,
58
58
  resources: s,
59
59
  scheduleTypes: a,
60
- initialView: i,
61
- initialDate: l,
60
+ initialView: l,
61
+ initialDate: c,
62
62
  initialFilters: m,
63
63
  preferences: f,
64
- locale: c,
65
- onViewChange: N,
66
- onDateChange: v,
67
- onEventClick: b,
68
- onSlotSelect: k,
69
- onFiltersChange: D
64
+ locale: u,
65
+ onViewChange: x,
66
+ onDateChange: b,
67
+ onEventClick: p,
68
+ onSlotSelect: v,
69
+ onFiltersChange: C
70
70
  });
71
- return /* @__PURE__ */ e(Ke, { value: L, children: /* @__PURE__ */ e("div", { className: z, style: { position: "relative" }, children: w ?? /* @__PURE__ */ e(De, { view: L.view, className: z }) }) });
71
+ return /* @__PURE__ */ e(Ke, { value: T, children: /* @__PURE__ */ e("div", { className: z, style: { position: "relative" }, children: N ?? /* @__PURE__ */ e(De, { view: T.view, className: z }) }) });
72
72
  }
73
73
  const ft = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], gt = [
74
74
  "January",
@@ -93,14 +93,14 @@ function xt({
93
93
  date: r,
94
94
  events: s,
95
95
  isCurrentMonth: a,
96
- onDayClick: i
96
+ onDayClick: l
97
97
  }) {
98
- const l = J(r), m = 3, f = s.length;
98
+ const c = J(r), m = 3, f = s.length;
99
99
  return /* @__PURE__ */ n(
100
100
  "button",
101
101
  {
102
102
  type: "button",
103
- onClick: () => i?.(r),
103
+ onClick: () => l?.(r),
104
104
  className: h(
105
105
  "flex h-9 sm:h-11 flex-1 flex-col items-center justify-start gap-0.5 rounded-md pt-0.5 sm:pt-1",
106
106
  "hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
@@ -113,26 +113,26 @@ function xt({
113
113
  {
114
114
  className: h(
115
115
  "flex size-5 sm:size-6 items-center justify-center rounded-full text-[10px] sm:text-xs font-medium",
116
- l && "bg-primary font-semibold text-primary-foreground"
116
+ c && "bg-primary font-semibold text-primary-foreground"
117
117
  ),
118
118
  children: t
119
119
  }
120
120
  ),
121
- f > 0 && /* @__PURE__ */ e("div", { className: "mt-0.5 flex items-center gap-0.5", children: f <= m ? s.map((c) => /* @__PURE__ */ e(
121
+ f > 0 && /* @__PURE__ */ e("div", { className: "mt-0.5 flex items-center gap-0.5", children: f <= m ? s.map((u) => /* @__PURE__ */ e(
122
122
  "div",
123
123
  {
124
124
  className: "size-1 sm:size-1.5 rounded-full bg-primary",
125
- style: Me(c)
125
+ style: Me(u)
126
126
  },
127
- c.id
127
+ u.id
128
128
  )) : /* @__PURE__ */ n(K, { children: [
129
- s.slice(0, m).map((c) => /* @__PURE__ */ e(
129
+ s.slice(0, m).map((u) => /* @__PURE__ */ e(
130
130
  "div",
131
131
  {
132
132
  className: "size-1 sm:size-1.5 rounded-full bg-primary",
133
- style: Me(c)
133
+ style: Me(u)
134
134
  },
135
- c.id
135
+ u.id
136
136
  )),
137
137
  /* @__PURE__ */ n("span", { className: "text-[6px] sm:text-[7px] font-medium text-muted-foreground", children: [
138
138
  "+",
@@ -149,7 +149,7 @@ function pt({
149
149
  onMonthClick: s,
150
150
  onDayClick: a
151
151
  }) {
152
- const i = I(() => qe(t, 0), [t]);
152
+ const l = I(() => qe(t, 0), [t]);
153
153
  return /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
154
154
  /* @__PURE__ */ e(
155
155
  "button",
@@ -165,29 +165,29 @@ function pt({
165
165
  }
166
166
  ),
167
167
  /* @__PURE__ */ n("div", { className: "flex-1 space-y-1.5 sm:space-y-2 rounded-b-lg border border-t-0 p-2 sm:p-3", children: [
168
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 text-center", children: ft.map((l, m) => /* @__PURE__ */ n(
168
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 text-center", children: ft.map((c, m) => /* @__PURE__ */ n(
169
169
  "div",
170
170
  {
171
171
  className: "text-[9px] sm:text-xs font-medium text-muted-foreground",
172
172
  children: [
173
- /* @__PURE__ */ e("span", { className: "sm:hidden", children: l[0] }),
174
- /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: l })
173
+ /* @__PURE__ */ e("span", { className: "sm:hidden", children: c[0] }),
174
+ /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: c })
175
175
  ]
176
176
  },
177
177
  m
178
178
  )) }),
179
- /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 gap-y-1", children: i.map((l, m) => {
180
- const f = et(r, l.date);
179
+ /* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 gap-y-1", children: l.map((c, m) => {
180
+ const f = et(r, c.date);
181
181
  return /* @__PURE__ */ e(
182
182
  xt,
183
183
  {
184
- day: l.date.getDate(),
185
- date: l.date,
184
+ day: c.date.getDate(),
185
+ date: c.date,
186
186
  events: f,
187
- isCurrentMonth: l.isCurrentMonth,
187
+ isCurrentMonth: c.isCurrentMonth,
188
188
  onDayClick: a
189
189
  },
190
- `${m + 1}-${l.date.toISOString()}`
190
+ `${m + 1}-${c.date.toISOString()}`
191
191
  );
192
192
  }) })
193
193
  ] })
@@ -198,12 +198,12 @@ function vt({
198
198
  year: r,
199
199
  onMonthClick: s,
200
200
  onDayClick: a,
201
- className: i
201
+ className: l
202
202
  }) {
203
- const l = I(() => Ze(r), [r]);
204
- return /* @__PURE__ */ n("div", { className: h("flex flex-col h-full", i), children: [
203
+ const c = I(() => Ze(r), [r]);
204
+ return /* @__PURE__ */ n("div", { className: h("flex flex-col h-full", l), children: [
205
205
  /* @__PURE__ */ e("div", { className: "flex items-center justify-center border-b px-4 py-3", children: /* @__PURE__ */ e("h2", { className: "text-lg font-semibold", children: r }) }),
206
- /* @__PURE__ */ e("div", { className: "flex-1 overflow-auto p-4", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4", children: l.map((m) => /* @__PURE__ */ e(
206
+ /* @__PURE__ */ e("div", { className: "flex-1 overflow-auto p-4", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4", children: c.map((m) => /* @__PURE__ */ e(
207
207
  pt,
208
208
  {
209
209
  date: m,
@@ -222,16 +222,16 @@ function Nt(t) {
222
222
  function kt(t, r) {
223
223
  const s = [];
224
224
  for (let a = 0; a < r; a++) {
225
- const i = new Date(t);
226
- i.setDate(i.getDate() + a), s.push(i);
225
+ const l = new Date(t);
226
+ l.setDate(l.getDate() + a), s.push(l);
227
227
  }
228
228
  return s;
229
229
  }
230
230
  function Ct(t, r, s) {
231
231
  const a = [];
232
- return t.forEach((i, l) => {
232
+ return t.forEach((l, c) => {
233
233
  for (let m = r; m < s; m++)
234
- a.push({ hour: m, dayIndex: l, date: i });
234
+ a.push({ hour: m, dayIndex: c, date: l });
235
235
  }), a;
236
236
  }
237
237
  function Dt(t) {
@@ -245,14 +245,14 @@ function Mt(t) {
245
245
  });
246
246
  }
247
247
  function Te(t) {
248
- const r = [...t].sort((i, l) => i.startCol !== l.startCol ? i.startCol - l.startCol : l.spanCols - i.spanCols), s = [], a = [];
249
- for (const i of r) {
250
- let l = 0;
251
- for (; a[l] !== void 0 && a[l] > i.startCol; )
252
- l++;
253
- a[l] = i.startCol + i.spanCols, s.push({
254
- ...i,
255
- stackIndex: l
248
+ const r = [...t].sort((l, c) => l.startCol !== c.startCol ? l.startCol - c.startCol : c.spanCols - l.spanCols), s = [], a = [];
249
+ for (const l of r) {
250
+ let c = 0;
251
+ for (; a[c] !== void 0 && a[c] > l.startCol; )
252
+ c++;
253
+ a[c] = l.startCol + l.spanCols, s.push({
254
+ ...l,
255
+ stackIndex: c
256
256
  });
257
257
  }
258
258
  return s;
@@ -282,78 +282,78 @@ function xe({
282
282
  events: r,
283
283
  users: s = [],
284
284
  selectedDate: a,
285
- onDateChange: i,
286
- onEventClick: l,
285
+ onDateChange: l,
286
+ onEventClick: c,
287
287
  visibleHours: m,
288
288
  className: f,
289
- getEventUserId: c,
290
- renderPopover: x
289
+ getEventUserId: u,
290
+ renderPopover: g
291
291
  }) {
292
- const p = Qe(null), N = a ?? /* @__PURE__ */ new Date(), v = !0, b = m?.from ?? bt, k = m?.to ?? yt, D = k - b, z = I(() => {
293
- const u = new Date(N);
292
+ const M = Qe(null), x = a ?? /* @__PURE__ */ new Date(), b = !0, p = m?.from ?? bt, v = m?.to ?? yt, C = v - p, z = I(() => {
293
+ const i = new Date(x);
294
294
  if (t === 1 || t === 3)
295
- return u.setHours(0, 0, 0, 0), u;
296
- const o = u.getDay(), d = o === 0 ? -6 : 1 - o;
297
- return u.setDate(u.getDate() + d), u.setHours(0, 0, 0, 0), u;
298
- }, [N, t]), w = I(
295
+ return i.setHours(0, 0, 0, 0), i;
296
+ const o = i.getDay(), d = o === 0 ? -6 : 1 - o;
297
+ return i.setDate(i.getDate() + d), i.setHours(0, 0, 0, 0), i;
298
+ }, [x, t]), N = I(
299
299
  () => kt(z, t),
300
300
  [z, t]
301
- ), M = I(
302
- () => Ct(w, b, k),
303
- [v, w, b, k]
304
- ), T = c ?? ((u) => {
305
- if (u.user?.id) return u.user.id;
306
- const o = u.data;
301
+ ), y = I(
302
+ () => Ct(N, p, v),
303
+ [b, N, p, v]
304
+ ), S = u ?? ((i) => {
305
+ if (i.user?.id) return i.user.id;
306
+ const o = i.data;
307
307
  if (o?.userId) return String(o.userId);
308
308
  if (o?.user && typeof o.user == "object" && o.user.id)
309
309
  return String(o.user.id);
310
- if (u.participants?.[0]?.id) return u.participants[0].id;
311
- }), H = I(() => {
312
- const u = /* @__PURE__ */ new Map();
310
+ if (i.participants?.[0]?.id) return i.participants[0].id;
311
+ }), W = I(() => {
312
+ const i = /* @__PURE__ */ new Map();
313
313
  for (const o of s)
314
- u.set(o.id, {
314
+ i.set(o.id, {
315
315
  id: o.id,
316
316
  name: o.name,
317
317
  avatar: o.avatar ?? void 0,
318
318
  email: o.email
319
319
  });
320
320
  for (const o of r) {
321
- o.user?.id && !u.has(o.user.id) && u.set(o.user.id, {
321
+ o.user?.id && !i.has(o.user.id) && i.set(o.user.id, {
322
322
  id: o.user.id,
323
323
  name: o.user.name,
324
324
  avatar: o.user.avatar ?? void 0,
325
325
  email: o.user.email
326
326
  });
327
327
  for (const d of o.participants || [])
328
- d.id && !u.has(d.id) && u.set(d.id, {
328
+ d.id && !i.has(d.id) && i.set(d.id, {
329
329
  id: d.id,
330
330
  name: d.name,
331
331
  avatar: d.avatar ?? void 0,
332
332
  email: d.email
333
333
  });
334
334
  }
335
- return Array.from(u.values());
336
- }, [s, r]), W = I(() => {
337
- const u = [], o = /* @__PURE__ */ new Map();
338
- for (const y of H)
339
- o.set(y.id, []);
335
+ return Array.from(i.values());
336
+ }, [s, r]), j = I(() => {
337
+ const i = [], o = /* @__PURE__ */ new Map();
338
+ for (const w of W)
339
+ o.set(w.id, []);
340
340
  o.set("unassigned", []);
341
- for (const y of r) {
342
- const E = T(y) ?? "unassigned";
343
- (o.get(E) ?? o.get("unassigned")).push(y);
341
+ for (const w of r) {
342
+ const D = S(w) ?? "unassigned";
343
+ (o.get(D) ?? o.get("unassigned")).push(w);
344
344
  }
345
- const d = (y) => {
346
- const E = [];
347
- for (const S of y) {
348
- const _ = S.startDate.getHours() + S.startDate.getMinutes() / 60, X = S.endDate.getHours() + S.endDate.getMinutes() / 60;
349
- for (let $ = 0; $ < w.length; $++) {
350
- const re = w[$], ce = me(re), se = Pe(re);
351
- if (S.startDate <= se && S.endDate >= ce) {
352
- let Q = b, Z = k;
353
- if (S.startDate >= ce && (Q = Math.max(b, _)), S.endDate <= se && (Z = Math.min(k, X)), Q = Math.max(b, Math.min(k, Q)), Z = Math.max(b, Math.min(k, Z)), Z > Q) {
354
- const de = $ * D + Math.floor(Q - b), ue = $ * D + Math.ceil(Z - b);
355
- E.push({
356
- event: S,
345
+ const d = (w) => {
346
+ const D = [];
347
+ for (const E of w) {
348
+ const _ = E.startDate.getHours() + E.startDate.getMinutes() / 60, X = E.endDate.getHours() + E.endDate.getMinutes() / 60;
349
+ for (let $ = 0; $ < N.length; $++) {
350
+ const re = N[$], ce = me(re), se = Pe(re);
351
+ if (E.startDate <= se && E.endDate >= ce) {
352
+ let Q = p, Z = v;
353
+ if (E.startDate >= ce && (Q = Math.max(p, _)), E.endDate <= se && (Z = Math.min(v, X)), Q = Math.max(p, Math.min(v, Q)), Z = Math.max(p, Math.min(v, Z)), Z > Q) {
354
+ const de = $ * C + Math.floor(Q - p), ue = $ * C + Math.ceil(Z - p);
355
+ D.push({
356
+ event: E,
357
357
  startCol: de,
358
358
  spanCols: Math.max(1, ue - de)
359
359
  });
@@ -361,63 +361,63 @@ function xe({
361
361
  }
362
362
  }
363
363
  }
364
- return E;
364
+ return D;
365
365
  };
366
- for (const y of H) {
367
- const E = o.get(y.id) ?? [], S = d(E), _ = Te(S), X = _.reduce(
366
+ for (const w of W) {
367
+ const D = o.get(w.id) ?? [], E = d(D), _ = Te(E), X = _.reduce(
368
368
  ($, re) => Math.max($, re.stackIndex + 1),
369
369
  0
370
370
  );
371
- u.push({
372
- user: y,
371
+ i.push({
372
+ user: w,
373
373
  events: _,
374
374
  maxStack: Math.max(X, 1)
375
375
  });
376
376
  }
377
- const C = o.get("unassigned") ?? [];
378
- if (C.length > 0) {
379
- const y = d(C), E = Te(y), S = E.reduce(
377
+ const k = o.get("unassigned") ?? [];
378
+ if (k.length > 0) {
379
+ const w = d(k), D = Te(w), E = D.reduce(
380
380
  (_, X) => Math.max(_, X.stackIndex + 1),
381
381
  0
382
382
  );
383
- u.push({
383
+ i.push({
384
384
  user: {
385
385
  id: "unassigned",
386
386
  name: "Unassigned",
387
387
  avatar: void 0,
388
388
  email: void 0
389
389
  },
390
- events: E,
391
- maxStack: Math.max(S, 1)
390
+ events: D,
391
+ maxStack: Math.max(E, 1)
392
392
  });
393
393
  }
394
- return u.filter((y) => y.events.length > 0);
395
- }, [H, r, w, v, D, b, k, T]), A = I(() => {
396
- const u = /* @__PURE__ */ new Map();
397
- for (const o of W)
394
+ return i.filter((w) => w.events.length > 0);
395
+ }, [W, r, N, b, C, p, v, S]), A = I(() => {
396
+ const i = /* @__PURE__ */ new Map();
397
+ for (const o of j)
398
398
  for (const d of o.events)
399
399
  if (d.spanCols === 1) {
400
- const C = u.get(d.startCol) ?? 0;
401
- u.set(d.startCol, C + 1);
400
+ const k = i.get(d.startCol) ?? 0;
401
+ i.set(d.startCol, k + 1);
402
402
  }
403
- return u;
404
- }, [W]), j = I(() => {
405
- const u = M.length, o = ge, d = [];
406
- for (let C = 0; C < u; C++) {
407
- const y = A.get(C) ?? 0;
408
- y > Le ? d.push(Se + (y - Le) * 20) : y > 0 ? d.push(Math.max(o, Se)) : d.push(o);
403
+ return i;
404
+ }, [j]), L = I(() => {
405
+ const i = y.length, o = ge, d = [];
406
+ for (let k = 0; k < i; k++) {
407
+ const w = A.get(k) ?? 0;
408
+ w > Le ? d.push(Se + (w - Le) * 20) : w > 0 ? d.push(Math.max(o, Se)) : d.push(o);
409
409
  }
410
410
  return d;
411
- }, [v, M.length, w.length, A]), F = (u) => Math.max(
411
+ }, [b, y.length, N.length, A]), F = (i) => Math.max(
412
412
  wt,
413
- u * (fe + ze) + Ee * 2
414
- ), P = oe + j.reduce((u, o) => u + o, 0), g = I(() => {
415
- const u = [0];
416
- for (let o = 0; o < j.length; o++)
417
- u.push(u[o] + j[o]);
418
- return u;
419
- }, [j]);
420
- return /* @__PURE__ */ e("div", { className: h("flex h-full flex-col", f), children: /* @__PURE__ */ e("div", { className: "ic-timeline-scroll-container flex-1", ref: p, children: /* @__PURE__ */ n("div", { className: "relative", style: { minWidth: P }, children: [
413
+ i * (fe + ze) + Ee * 2
414
+ ), P = oe + L.reduce((i, o) => i + o, 0), H = I(() => {
415
+ const i = [0];
416
+ for (let o = 0; o < L.length; o++)
417
+ i.push(i[o] + L[o]);
418
+ return i;
419
+ }, [L]);
420
+ return /* @__PURE__ */ e("div", { className: h("flex h-full flex-col", f), children: /* @__PURE__ */ e("div", { className: "ic-timeline-scroll-container flex-1", ref: M, children: /* @__PURE__ */ n("div", { className: "relative", style: { minWidth: P }, children: [
421
421
  // Hour mode: Day headers + Hour sub-headers - sticky wrapper with flex child (sticky + flex breaks sticky)
422
422
  /* @__PURE__ */ e("div", { className: "ic-timeline-header sticky top-0 z-20 border-b bg-background", children: /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
423
423
  t > 1 && /* @__PURE__ */ n("div", { className: "flex border-b", children: [
@@ -429,8 +429,8 @@ function xe({
429
429
  children: /* @__PURE__ */ e("span", { className: "text-[10px] font-medium uppercase text-muted-foreground", children: "Resources" })
430
430
  }
431
431
  ),
432
- w.map((u, o) => {
433
- const d = J(u), C = o * D, y = j.slice(C, C + D).reduce((E, S) => E + S, 0);
432
+ N.map((i, o) => {
433
+ const d = J(i), k = o * C, w = L.slice(k, k + C).reduce((D, E) => D + E, 0);
434
434
  return /* @__PURE__ */ e(
435
435
  "div",
436
436
  {
@@ -438,10 +438,10 @@ function xe({
438
438
  "flex shrink-0 items-center justify-center border-r py-1.5 font-medium",
439
439
  d ? "bg-primary/10 text-primary" : "bg-muted/30"
440
440
  ),
441
- style: { width: y },
442
- children: /* @__PURE__ */ e("span", { className: "text-xs", children: Mt(u) })
441
+ style: { width: w },
442
+ children: /* @__PURE__ */ e("span", { className: "text-xs", children: Mt(i) })
443
443
  },
444
- `day-${u.toISOString()}`
444
+ `day-${i.toISOString()}`
445
445
  );
446
446
  })
447
447
  ] }),
@@ -461,26 +461,26 @@ function xe({
461
461
  style: { width: oe }
462
462
  }
463
463
  ),
464
- M.map((u, o) => {
465
- const d = u.hour === b, C = J(u.date), y = j[o] ?? ge;
464
+ y.map((i, o) => {
465
+ const d = i.hour === p, k = J(i.date), w = L[o] ?? ge;
466
466
  return /* @__PURE__ */ e(
467
467
  "div",
468
468
  {
469
469
  className: h(
470
470
  "flex shrink-0 items-center justify-center py-1.5 text-[10px] text-muted-foreground",
471
471
  d && o > 0 ? "border-l-2 border-l-border" : "border-r border-r-border/50",
472
- C && "bg-primary/5"
472
+ k && "bg-primary/5"
473
473
  ),
474
- style: { width: y },
475
- children: Dt(u.hour)
474
+ style: { width: w },
475
+ children: Dt(i.hour)
476
476
  },
477
- `hour-${u.dayIndex}-${u.hour}`
477
+ `hour-${i.dayIndex}-${i.hour}`
478
478
  );
479
479
  })
480
480
  ] })
481
481
  ] }) }),
482
- W.map((u) => {
483
- const o = F(u.maxStack);
482
+ j.map((i) => {
483
+ const o = F(i.maxStack);
484
484
  return /* @__PURE__ */ n(
485
485
  "div",
486
486
  {
@@ -497,41 +497,41 @@ function xe({
497
497
  zt,
498
498
  {
499
499
  className: "size-7",
500
- src: u.user.avatar,
501
- alt: u.user.name,
502
- fallback: Nt(u.user.name)
500
+ src: i.user.avatar,
501
+ alt: i.user.name,
502
+ fallback: Nt(i.user.name)
503
503
  }
504
504
  ),
505
- /* @__PURE__ */ e("span", { className: "truncate text-xs sm:text-sm font-medium", children: u.user.name })
505
+ /* @__PURE__ */ e("span", { className: "truncate text-xs sm:text-sm font-medium", children: i.user.name })
506
506
  ] })
507
507
  }
508
508
  ),
509
509
  /* @__PURE__ */ n("div", { className: "relative flex", children: [
510
510
  // Hour mode cells
511
- M.map((d, C) => {
512
- const y = d.hour === b && C > 0, E = j[C] ?? ge;
511
+ y.map((d, k) => {
512
+ const w = d.hour === p && k > 0, D = L[k] ?? ge;
513
513
  return /* @__PURE__ */ e(
514
514
  "div",
515
515
  {
516
516
  className: h(
517
517
  "shrink-0",
518
- y ? "border-l-2 border-l-border" : "border-r border-r-border/50",
518
+ w ? "border-l-2 border-l-border" : "border-r border-r-border/50",
519
519
  J(d.date) && "bg-primary/5"
520
520
  ),
521
- style: { width: E }
521
+ style: { width: D }
522
522
  },
523
523
  `cell-${d.dayIndex}-${d.hour}`
524
524
  );
525
525
  }),
526
- u.events.map((d) => {
527
- const C = (g[d.startCol] ?? 0) + 2, y = g[d.startCol + d.spanCols] ?? g[g.length - 1] ?? 0, E = g[d.startCol] ?? 0, S = y - E - 4, _ = Ee + d.stackIndex * (fe + ze);
526
+ i.events.map((d) => {
527
+ const k = (H[d.startCol] ?? 0) + 2, w = H[d.startCol + d.spanCols] ?? H[H.length - 1] ?? 0, D = H[d.startCol] ?? 0, E = w - D - 4, _ = Ee + d.stackIndex * (fe + ze);
528
528
  return /* @__PURE__ */ e(
529
529
  "div",
530
530
  {
531
531
  className: "absolute",
532
532
  style: {
533
- left: C,
534
- width: Math.max(S, 0),
533
+ left: k,
534
+ width: Math.max(E, 0),
535
535
  // No forced minimum - columns are guaranteed wide enough
536
536
  top: _,
537
537
  height: fe
@@ -541,8 +541,8 @@ function xe({
541
541
  {
542
542
  event: d.event,
543
543
  variant: "compact",
544
- onClick: l,
545
- renderPopover: x,
544
+ onClick: c,
545
+ renderPopover: g,
546
546
  className: "h-full w-full"
547
547
  }
548
548
  )
@@ -553,10 +553,10 @@ function xe({
553
553
  ] })
554
554
  ]
555
555
  },
556
- u.user.id
556
+ i.user.id
557
557
  );
558
558
  }),
559
- W.length === 0 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-20 text-muted-foreground", children: "No users or events to display" })
559
+ j.length === 0 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-20 text-muted-foreground", children: "No users or events to display" })
560
560
  ] }) }) });
561
561
  }
562
562
  function St(t) {
@@ -573,118 +573,120 @@ function Lt({
573
573
  onSlotClick: r,
574
574
  onSlotSelect: s,
575
575
  onAddEvent: a,
576
- className: i,
577
- showHeader: l = !0,
576
+ className: l,
577
+ showHeader: c = !0,
578
578
  minSelectionMinutes: m = 30,
579
- settingsContent: f,
580
- filterContent: c,
581
- renderPopover: x
579
+ showMoreEventsInPopover: f = !1,
580
+ settingsContent: u,
581
+ filterContent: g,
582
+ renderPopover: M
582
583
  }) {
583
584
  const {
584
- view: p,
585
- setView: N,
586
- selectedDate: v,
587
- setSelectedDate: b,
588
- slotDuration: k,
589
- filteredEvents: D,
590
- users: z,
591
- visibleHours: w,
592
- workingHours: M,
593
- badgeVariant: L
594
- } = Xe(), T = I(
585
+ view: x,
586
+ setView: b,
587
+ selectedDate: p,
588
+ setSelectedDate: v,
589
+ slotDuration: C,
590
+ filteredEvents: z,
591
+ users: N,
592
+ visibleHours: y,
593
+ workingHours: T,
594
+ badgeVariant: S
595
+ } = Xe(), W = I(
595
596
  () => ({
596
- startHour: w.start,
597
- endHour: w.end
597
+ startHour: y.start,
598
+ endHour: y.end
598
599
  }),
599
- [w]
600
- ), H = I(() => St(p), [p]), W = ee(
601
- (g) => {
600
+ [y]
601
+ ), j = I(() => St(x), [x]), A = ee(
602
+ (i) => {
602
603
  if (s) {
603
- s(g);
604
+ s(i);
604
605
  return;
605
606
  }
606
607
  if (r) {
607
- const u = g.startDate.getHours();
608
- r(g.startDate, u);
608
+ const o = i.startDate.getHours();
609
+ r(i.startDate, o);
609
610
  }
610
611
  },
611
612
  [s, r]
612
- ), A = ee(
613
- (g) => {
614
- N("day"), b(g, "day");
613
+ ), L = ee(
614
+ (i) => {
615
+ b("day"), v(i, "day");
615
616
  },
616
- [b, N]
617
- ), j = ee(
618
- (g) => {
619
- N("month"), b(g, "month");
620
- },
621
- [b, N]
617
+ [v, b]
622
618
  ), F = ee(
623
- (g) => {
624
- t?.(g);
619
+ (i) => {
620
+ b("month"), v(i, "month");
621
+ },
622
+ [v, b]
623
+ ), P = ee(
624
+ (i) => {
625
+ t?.(i);
625
626
  },
626
627
  [t]
627
- ), P = () => {
628
- const g = D, u = F, o = x;
629
- switch (p) {
628
+ ), H = () => {
629
+ const i = z, o = P, d = M;
630
+ switch (x) {
630
631
  case "day":
631
632
  return /* @__PURE__ */ e(
632
633
  lt,
633
634
  {
634
- events: g,
635
- date: v,
636
- visibleHours: T,
637
- workingHours: M,
638
- slotDuration: k,
639
- badgeVariant: L,
640
- onEventClick: u,
641
- renderPopover: o
635
+ events: i,
636
+ date: p,
637
+ visibleHours: W,
638
+ workingHours: T,
639
+ slotDuration: C,
640
+ badgeVariant: S,
641
+ onEventClick: o,
642
+ renderPopover: d
642
643
  }
643
644
  );
644
645
  case "week":
645
646
  return /* @__PURE__ */ e(
646
647
  it,
647
648
  {
648
- events: g,
649
- date: v,
650
- visibleHours: T,
651
- workingHours: M,
652
- slotDuration: k,
653
- badgeVariant: L,
654
- onEventClick: u,
655
- renderPopover: o
649
+ events: i,
650
+ date: p,
651
+ visibleHours: W,
652
+ workingHours: T,
653
+ slotDuration: C,
654
+ badgeVariant: S,
655
+ onEventClick: o,
656
+ renderPopover: d
656
657
  }
657
658
  );
658
659
  case "month":
659
660
  return /* @__PURE__ */ e(
660
661
  ke,
661
662
  {
662
- events: g,
663
- date: v,
664
- badgeVariant: L,
665
- onEventClick: u,
666
- onDayClick: A,
667
- renderPopover: o
663
+ events: i,
664
+ date: p,
665
+ badgeVariant: S,
666
+ onEventClick: o,
667
+ onDayClick: L,
668
+ renderPopover: d,
669
+ showMoreEventsInPopover: f
668
670
  }
669
671
  );
670
672
  case "year":
671
673
  return /* @__PURE__ */ e(
672
674
  vt,
673
675
  {
674
- events: g,
675
- year: v.getFullYear(),
676
- onMonthClick: j,
677
- onDayClick: A
676
+ events: i,
677
+ year: p.getFullYear(),
678
+ onMonthClick: F,
679
+ onDayClick: L
678
680
  }
679
681
  );
680
682
  case "agenda":
681
683
  return /* @__PURE__ */ e(
682
684
  ot,
683
685
  {
684
- events: g,
685
- date: v,
686
- onEventClick: u,
687
- renderPopover: o
686
+ events: i,
687
+ date: p,
688
+ onEventClick: o,
689
+ renderPopover: d
688
690
  }
689
691
  );
690
692
  // Timeline views
@@ -693,15 +695,15 @@ function Lt({
693
695
  xe,
694
696
  {
695
697
  daysToShow: 1,
696
- events: g,
697
- users: z,
698
- selectedDate: v,
698
+ events: i,
699
+ users: N,
700
+ selectedDate: p,
699
701
  visibleHours: {
700
- from: w.start,
701
- to: w.end
702
+ from: y.start,
703
+ to: y.end
702
704
  },
703
- onEventClick: u,
704
- renderPopover: o
705
+ onEventClick: o,
706
+ renderPopover: d
705
707
  }
706
708
  );
707
709
  case "timeline-3day":
@@ -709,15 +711,15 @@ function Lt({
709
711
  xe,
710
712
  {
711
713
  daysToShow: 3,
712
- events: g,
713
- users: z,
714
- selectedDate: v,
714
+ events: i,
715
+ users: N,
716
+ selectedDate: p,
715
717
  visibleHours: {
716
- from: w.start,
717
- to: w.end
718
+ from: y.start,
719
+ to: y.end
718
720
  },
719
- onEventClick: u,
720
- renderPopover: o
721
+ onEventClick: o,
722
+ renderPopover: d
721
723
  }
722
724
  );
723
725
  case "timeline-week":
@@ -725,26 +727,26 @@ function Lt({
725
727
  xe,
726
728
  {
727
729
  daysToShow: 7,
728
- events: g,
729
- users: z,
730
- selectedDate: v,
730
+ events: i,
731
+ users: N,
732
+ selectedDate: p,
731
733
  visibleHours: {
732
- from: w.start,
733
- to: w.end
734
+ from: y.start,
735
+ to: y.end
734
736
  },
735
- onEventClick: u,
736
- renderPopover: o
737
+ onEventClick: o,
738
+ renderPopover: d
737
739
  }
738
740
  );
739
741
  default:
740
742
  return /* @__PURE__ */ e(
741
743
  ke,
742
744
  {
743
- events: g,
744
- date: v,
745
- badgeVariant: L,
746
- onEventClick: u,
747
- onDayClick: A
745
+ events: i,
746
+ date: p,
747
+ badgeVariant: S,
748
+ onEventClick: o,
749
+ onDayClick: L
748
750
  }
749
751
  );
750
752
  }
@@ -752,27 +754,27 @@ function Lt({
752
754
  return /* @__PURE__ */ e(
753
755
  rt,
754
756
  {
755
- mode: H,
756
- onSelect: W,
757
+ mode: j,
758
+ onSelect: A,
757
759
  minDurationMinutes: m,
758
- slotDurationMinutes: k,
760
+ slotDurationMinutes: C,
759
761
  enabled: !!(s || r),
760
- children: /* @__PURE__ */ n("div", { className: h("flex flex-col h-full p-4", i), children: [
761
- l && /* @__PURE__ */ e(
762
+ children: /* @__PURE__ */ n("div", { className: h("flex flex-col h-full p-4", l), children: [
763
+ c && /* @__PURE__ */ e(
762
764
  at,
763
765
  {
764
- currentDate: v,
765
- view: p,
766
- events: D,
767
- onViewChange: N,
768
- onNavigateToday: () => b(/* @__PURE__ */ new Date(), p),
766
+ currentDate: p,
767
+ view: x,
768
+ events: z,
769
+ onViewChange: b,
770
+ onNavigateToday: () => v(/* @__PURE__ */ new Date(), x),
769
771
  onNavigatePrev: () => {
770
- const g = new Date(v);
771
- p === "day" || p === "timeline-day" ? g.setDate(g.getDate() - 1) : p === "timeline-3day" ? g.setDate(g.getDate() - 3) : p === "week" || p === "timeline-week" ? g.setDate(g.getDate() - 7) : p === "month" ? g.setMonth(g.getMonth() - 1) : p === "year" ? g.setFullYear(g.getFullYear() - 1) : g.setDate(g.getDate() - 7), b(g, p);
772
+ const i = new Date(p);
773
+ x === "day" || x === "timeline-day" ? i.setDate(i.getDate() - 1) : x === "timeline-3day" ? i.setDate(i.getDate() - 3) : x === "week" || x === "timeline-week" ? i.setDate(i.getDate() - 7) : x === "month" ? i.setMonth(i.getMonth() - 1) : x === "year" ? i.setFullYear(i.getFullYear() - 1) : i.setDate(i.getDate() - 7), v(i, x);
772
774
  },
773
775
  onNavigateNext: () => {
774
- const g = new Date(v);
775
- p === "day" || p === "timeline-day" ? g.setDate(g.getDate() + 1) : p === "timeline-3day" ? g.setDate(g.getDate() + 3) : p === "week" || p === "timeline-week" ? g.setDate(g.getDate() + 7) : p === "month" ? g.setMonth(g.getMonth() + 1) : p === "year" ? g.setFullYear(g.getFullYear() + 1) : g.setDate(g.getDate() + 7), b(g, p);
776
+ const i = new Date(p);
777
+ x === "day" || x === "timeline-day" ? i.setDate(i.getDate() + 1) : x === "timeline-3day" ? i.setDate(i.getDate() + 3) : x === "week" || x === "timeline-week" ? i.setDate(i.getDate() + 7) : x === "month" ? i.setMonth(i.getMonth() + 1) : x === "year" ? i.setFullYear(i.getFullYear() + 1) : i.setDate(i.getDate() + 7), v(i, x);
776
778
  },
777
779
  availableViews: [
778
780
  "day",
@@ -782,13 +784,13 @@ function Lt({
782
784
  "agenda"
783
785
  ],
784
786
  showTimelineViews: !0,
785
- showSettings: !!f,
787
+ showSettings: !!u,
786
788
  ...a && { onAddEvent: a },
787
- settingsContent: f,
788
- filterContent: c
789
+ settingsContent: u,
790
+ filterContent: g
789
791
  }
790
792
  ),
791
- /* @__PURE__ */ e("div", { className: "flex-1 border rounded-lg bg-white overflow-x-auto", children: P() })
793
+ /* @__PURE__ */ e("div", { className: "flex-1 border rounded-lg bg-white overflow-x-auto", children: H() })
792
794
  ] })
793
795
  }
794
796
  );
@@ -798,56 +800,58 @@ function _r({
798
800
  users: r = [],
799
801
  scheduleTypes: s = [],
800
802
  initialView: a = "week",
801
- initialDate: i,
802
- initialSelectedUserId: l,
803
+ initialDate: l,
804
+ initialSelectedUserId: c,
803
805
  initialScheduleTypeIds: m,
804
806
  initialParticipantIds: f,
805
- initialWorkingHoursView: c,
806
- initialSearchQuery: x,
807
- preferencesConfig: p,
808
- onEventClick: N,
809
- onSlotClick: v,
810
- onSlotSelect: b,
811
- onAddEvent: k,
812
- onEventDrop: D,
807
+ initialWorkingHoursView: u,
808
+ initialSearchQuery: g,
809
+ preferencesConfig: M,
810
+ onEventClick: x,
811
+ onSlotClick: b,
812
+ onSlotSelect: p,
813
+ onAddEvent: v,
814
+ onEventDrop: C,
813
815
  onDateChange: z,
814
- onViewChange: w,
815
- className: M,
816
- showHeader: L = !0,
817
- minSelectionMinutes: T = 30,
818
- renderPopover: H,
819
- settingsContent: W,
820
- filterContent: A
816
+ onViewChange: N,
817
+ className: y,
818
+ showHeader: T = !0,
819
+ minSelectionMinutes: S = 30,
820
+ showMoreEventsInPopover: W = !1,
821
+ renderPopover: j,
822
+ settingsContent: A,
823
+ filterContent: L
821
824
  }) {
822
- return /* @__PURE__ */ e(tt, { ...D && { onEventDrop: D }, children: /* @__PURE__ */ e(
825
+ return /* @__PURE__ */ e(tt, { ...C && { onEventDrop: C }, children: /* @__PURE__ */ e(
823
826
  Je,
824
827
  {
825
828
  initialEvents: t,
826
829
  initialUsers: r,
827
830
  initialScheduleTypes: s,
828
831
  initialView: a,
829
- ...i && { initialDate: i },
830
- ...l && { initialSelectedUserId: l },
832
+ ...l && { initialDate: l },
833
+ ...c && { initialSelectedUserId: c },
831
834
  ...m && { initialScheduleTypeIds: m },
832
835
  ...f && { initialParticipantIds: f },
833
- ...c && { initialWorkingHoursView: c },
834
- ...x && { initialSearchQuery: x },
835
- ...p && { preferencesConfig: p },
836
+ ...u && { initialWorkingHoursView: u },
837
+ ...g && { initialSearchQuery: g },
838
+ ...M && { preferencesConfig: M },
836
839
  ...z && { onDateChange: z },
837
- ...w && { onViewChange: w },
840
+ ...N && { onViewChange: N },
838
841
  children: /* @__PURE__ */ e(
839
842
  Lt,
840
843
  {
841
- ...N && { onEventClick: N },
842
- ...v && { onSlotClick: v },
843
- ...b && { onSlotSelect: b },
844
- ...k && { onAddEvent: k },
845
- ...H && { renderPopover: H },
846
- className: M,
847
- showHeader: L,
848
- minSelectionMinutes: T,
849
- settingsContent: W,
850
- filterContent: A
844
+ ...x && { onEventClick: x },
845
+ ...b && { onSlotClick: b },
846
+ ...p && { onSlotSelect: p },
847
+ ...v && { onAddEvent: v },
848
+ ...j && { renderPopover: j },
849
+ className: y,
850
+ showHeader: T,
851
+ minSelectionMinutes: S,
852
+ showMoreEventsInPopover: W,
853
+ settingsContent: A,
854
+ filterContent: L
851
855
  }
852
856
  )
853
857
  }
@@ -1141,7 +1145,7 @@ const Ft = {
1141
1145
  deleteConfirmTitle: "Delete Event",
1142
1146
  deleteConfirmDescription: "Are you sure you want to delete this event? This action cannot be undone."
1143
1147
  }, le = ye(
1144
- ({ onClick: t, label: r, children: s, className: a, variant: i = "ghost", ...l }, m) => /* @__PURE__ */ n(R, { children: [
1148
+ ({ onClick: t, label: r, children: s, className: a, variant: l = "ghost", ...c }, m) => /* @__PURE__ */ n(R, { children: [
1145
1149
  /* @__PURE__ */ e(U, { asChild: !0, children: /* @__PURE__ */ e(
1146
1150
  "button",
1147
1151
  {
@@ -1150,12 +1154,12 @@ const Ft = {
1150
1154
  onClick: t,
1151
1155
  className: h(
1152
1156
  "h-8 w-8 rounded-full flex items-center justify-center transition-colors",
1153
- i === "ghost" && "hover:bg-zinc-100 dark:hover:bg-zinc-800 text-zinc-600 dark:text-zinc-400",
1154
- i === "destructive" && "hover:bg-red-50 dark:hover:bg-red-950/30 text-zinc-600 dark:text-zinc-400 hover:text-red-600",
1157
+ l === "ghost" && "hover:bg-zinc-100 dark:hover:bg-zinc-800 text-zinc-600 dark:text-zinc-400",
1158
+ l === "destructive" && "hover:bg-red-50 dark:hover:bg-red-950/30 text-zinc-600 dark:text-zinc-400 hover:text-red-600",
1155
1159
  a
1156
1160
  ),
1157
1161
  "aria-label": r,
1158
- ...l,
1162
+ ...c,
1159
1163
  children: s
1160
1164
  }
1161
1165
  ) }),
@@ -1163,8 +1167,8 @@ const Ft = {
1163
1167
  ] })
1164
1168
  );
1165
1169
  le.displayName = "IconButton";
1166
- function Pt({ src: t, alt: r, initials: s, className: a, isClient: i }) {
1167
- const [l, m] = te(!1);
1170
+ function Pt({ src: t, alt: r, initials: s, className: a, isClient: l }) {
1171
+ const [c, m] = te(!1);
1168
1172
  return /* @__PURE__ */ e(
1169
1173
  "div",
1170
1174
  {
@@ -1172,7 +1176,7 @@ function Pt({ src: t, alt: r, initials: s, className: a, isClient: i }) {
1172
1176
  "relative h-7 w-7 rounded-full overflow-hidden shrink-0",
1173
1177
  a
1174
1178
  ),
1175
- children: t && !l ? /* @__PURE__ */ e(
1179
+ children: t && !c ? /* @__PURE__ */ e(
1176
1180
  "img",
1177
1181
  {
1178
1182
  src: t,
@@ -1185,7 +1189,7 @@ function Pt({ src: t, alt: r, initials: s, className: a, isClient: i }) {
1185
1189
  {
1186
1190
  className: h(
1187
1191
  "h-full w-full flex items-center justify-center text-[10px] font-medium",
1188
- i ? "bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300" : "bg-zinc-200 dark:bg-zinc-700 text-zinc-700 dark:text-zinc-300"
1192
+ l ? "bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300" : "bg-zinc-200 dark:bg-zinc-700 text-zinc-700 dark:text-zinc-300"
1189
1193
  ),
1190
1194
  children: s
1191
1195
  }
@@ -1198,27 +1202,27 @@ function Ie({
1198
1202
  isEventCanceled: r = !1,
1199
1203
  labels: s
1200
1204
  }) {
1201
- const a = t.name || "Unknown", i = a.split(" ").map((v) => v[0]).join("").toUpperCase().slice(0, 2), l = t.isOrganizer ?? !1, m = t.isConfirmed, f = m === !0, c = m === !1, x = t.isClient ?? !1, p = t.profilePicture || t.avatar, N = r;
1205
+ const a = t.name || "Unknown", l = a.split(" ").map((b) => b[0]).join("").toUpperCase().slice(0, 2), c = t.isOrganizer ?? !1, m = t.isConfirmed, f = m === !0, u = m === !1, g = t.isClient ?? !1, M = t.profilePicture || t.avatar, x = r;
1202
1206
  return /* @__PURE__ */ n(
1203
1207
  "div",
1204
1208
  {
1205
1209
  className: h(
1206
1210
  "flex items-center gap-3 py-0",
1207
- N && "opacity-60"
1211
+ x && "opacity-60"
1208
1212
  ),
1209
1213
  children: [
1210
1214
  /* @__PURE__ */ n("div", { className: "relative", children: [
1211
1215
  /* @__PURE__ */ e(
1212
1216
  Pt,
1213
1217
  {
1214
- src: p,
1218
+ src: M,
1215
1219
  alt: a,
1216
- initials: i,
1217
- isClient: x,
1218
- className: h(N && "grayscale")
1220
+ initials: l,
1221
+ isClient: g,
1222
+ className: h(x && "grayscale")
1219
1223
  }
1220
1224
  ),
1221
- N || c ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-red-100 dark:bg-red-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(he, { className: "h-2 w-2 text-red-600 dark:text-red-400 stroke-[3]" }) }) }) : f ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-green-100 dark:bg-green-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(ie, { className: "h-2 w-2 text-green-600 dark:text-green-400 stroke-[3]" }) }) }) : null
1225
+ x || u ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-red-100 dark:bg-red-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(he, { className: "h-2 w-2 text-red-600 dark:text-red-400 stroke-[3]" }) }) }) : f ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-green-100 dark:bg-green-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(ie, { className: "h-2 w-2 text-green-600 dark:text-green-400 stroke-[3]" }) }) }) : null
1222
1226
  ] }),
1223
1227
  /* @__PURE__ */ n("div", { className: "!h-fit min-w-0 gap-0", children: [
1224
1228
  /* @__PURE__ */ e("div", { className: "gap-0", children: /* @__PURE__ */ e(
@@ -1226,13 +1230,13 @@ function Ie({
1226
1230
  {
1227
1231
  className: h(
1228
1232
  "text-sm text-zinc-900 dark:text-zinc-100 truncate",
1229
- N && "line-through text-zinc-500 dark:text-zinc-500"
1233
+ x && "line-through text-zinc-500 dark:text-zinc-500"
1230
1234
  ),
1231
1235
  children: a
1232
1236
  }
1233
1237
  ) }),
1234
- x && /* @__PURE__ */ e("div", { className: "text-[10px] px-1.5 w-fit py-0.5 rounded bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300 font-medium", children: s.client }),
1235
- l && !N && /* @__PURE__ */ e("div", { className: "text-xs text-zinc-500", children: s.organizer })
1238
+ g && /* @__PURE__ */ e("div", { className: "text-[10px] px-1.5 w-fit py-0.5 rounded bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300 font-medium", children: s.client }),
1239
+ c && !x && /* @__PURE__ */ e("div", { className: "text-xs text-zinc-500", children: s.organizer })
1236
1240
  ] })
1237
1241
  ]
1238
1242
  }
@@ -1241,10 +1245,10 @@ function Ie({
1241
1245
  function _t({ open: t, onOpenChange: r, title: s, children: a }) {
1242
1246
  return be(() => {
1243
1247
  if (!t) return;
1244
- const i = (l) => {
1245
- l.key === "Escape" && r(!1);
1248
+ const l = (c) => {
1249
+ c.key === "Escape" && r(!1);
1246
1250
  };
1247
- return document.addEventListener("keydown", i), () => document.removeEventListener("keydown", i);
1251
+ return document.addEventListener("keydown", l), () => document.removeEventListener("keydown", l);
1248
1252
  }, [t, r]), be(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
1249
1253
  document.body.style.overflow = "";
1250
1254
  }), [t]), t ? /* @__PURE__ */ n("div", { className: "fixed inset-0 z-50", children: [
@@ -1253,8 +1257,8 @@ function _t({ open: t, onOpenChange: r, title: s, children: a }) {
1253
1257
  {
1254
1258
  className: "fixed inset-0 bg-black/50 backdrop-blur-sm",
1255
1259
  onClick: () => r(!1),
1256
- onKeyDown: (i) => {
1257
- (i.key === "Enter" || i.key === " ") && r(!1);
1260
+ onKeyDown: (l) => {
1261
+ (l.key === "Enter" || l.key === " ") && r(!1);
1258
1262
  }
1259
1263
  }
1260
1264
  ),
@@ -1269,8 +1273,8 @@ function Ot({
1269
1273
  onOpenChange: r,
1270
1274
  title: s,
1271
1275
  description: a,
1272
- cancelLabel: i,
1273
- confirmLabel: l,
1276
+ cancelLabel: l,
1277
+ confirmLabel: c,
1274
1278
  onConfirm: m,
1275
1279
  isLoading: f
1276
1280
  }) {
@@ -1280,8 +1284,8 @@ function Ot({
1280
1284
  {
1281
1285
  className: "fixed inset-0 bg-black/50 backdrop-blur-sm",
1282
1286
  onClick: () => r(!1),
1283
- onKeyDown: (c) => {
1284
- (c.key === "Enter" || c.key === " ") && r(!1);
1287
+ onKeyDown: (u) => {
1288
+ (u.key === "Enter" || u.key === " ") && r(!1);
1285
1289
  }
1286
1290
  }
1287
1291
  ),
@@ -1295,7 +1299,7 @@ function Ot({
1295
1299
  variant: "outline",
1296
1300
  size: "sm",
1297
1301
  onClick: () => r(!1),
1298
- children: i
1302
+ children: l
1299
1303
  }
1300
1304
  ),
1301
1305
  /* @__PURE__ */ n(
@@ -1308,7 +1312,7 @@ function Ot({
1308
1312
  children: [
1309
1313
  f && /* @__PURE__ */ e(ne, { className: "h-4 w-4 mr-2" }),
1310
1314
  /* @__PURE__ */ e(Ue, { className: "h-4 w-4 mr-2" }),
1311
- l
1315
+ c
1312
1316
  ]
1313
1317
  }
1314
1318
  )
@@ -1344,8 +1348,8 @@ function Yt(t) {
1344
1348
  const [r, s] = te(() => typeof window < "u" ? window.matchMedia(t).matches : !1);
1345
1349
  return be(() => {
1346
1350
  if (typeof window > "u") return;
1347
- const a = window.matchMedia(t), i = (l) => s(l.matches);
1348
- return a.addEventListener("change", i), () => a.removeEventListener("change", i);
1351
+ const a = window.matchMedia(t), l = (c) => s(c.matches);
1352
+ return a.addEventListener("change", l), () => a.removeEventListener("change", l);
1349
1353
  }, [t]), r;
1350
1354
  }
1351
1355
  function je({
@@ -1353,44 +1357,44 @@ function je({
1353
1357
  labels: r,
1354
1358
  isLoading: s,
1355
1359
  onClose: a,
1356
- onEdit: i,
1357
- onDelete: l,
1360
+ onEdit: l,
1361
+ onDelete: c,
1358
1362
  onCancel: m,
1359
1363
  onAccept: f,
1360
- onDecline: c,
1361
- onConfirmMeeting: x,
1362
- canEdit: p = !0,
1363
- canDelete: N = !1,
1364
- canCancel: v = !0,
1365
- isCurrentUserParticipant: b = !1,
1366
- isCurrentUserClient: k = !1,
1367
- currentUserAcceptStatus: D,
1364
+ onDecline: u,
1365
+ onConfirmMeeting: g,
1366
+ canEdit: M = !0,
1367
+ canDelete: x = !1,
1368
+ canCancel: b = !0,
1369
+ isCurrentUserParticipant: p = !1,
1370
+ isCurrentUserClient: v = !1,
1371
+ currentUserAcceptStatus: C,
1368
1372
  isAcceptLoading: z = !1,
1369
- isDeclineLoading: w = !1,
1370
- isConfirmLoading: M = !1,
1371
- isDeleteLoading: L = !1,
1372
- renderParticipant: T,
1373
- renderHeaderActions: H,
1374
- renderCancelReason: W,
1373
+ isDeclineLoading: N = !1,
1374
+ isConfirmLoading: y = !1,
1375
+ isDeleteLoading: T = !1,
1376
+ renderParticipant: S,
1377
+ renderHeaderActions: W,
1378
+ renderCancelReason: j,
1375
1379
  renderDeleteConfirmation: A,
1376
- formatDate: j = Vt,
1380
+ formatDate: L = Vt,
1377
1381
  formatTimeRange: F = Rt
1378
1382
  }) {
1379
- const [P, g] = te(!1), u = !(t.isCanceled || t.meetingTookPlace), o = t.isRecurring ?? !1, d = t.participantDetails, C = t.participantsNames || [], y = d && d.length > 0, E = D === !0, S = D === !1, _ = b && !k && u, X = y ? d.filter((B) => B.isConfirmed).length : t.isAccepted ? C.length : 0, $ = y ? d.length : C.length, re = t.scheduleTypeColor || t.hexColor || "#039BE5", ce = ee(() => t.startDate ? j(t.startDate) : r.noDateProvided, [t.startDate, j, r.noDateProvided]), se = ee(() => t.startDate && t.endDate ? F(t.startDate, t.endDate) : null, [t.startDate, t.endDate, F]), Q = () => {
1380
- a(), i?.(t);
1383
+ const [P, H] = te(!1), i = !(t.isCanceled || t.meetingTookPlace), o = t.isRecurring ?? !1, d = t.participantDetails, k = t.participantsNames || [], w = d && d.length > 0, D = C === !0, E = C === !1, _ = p && !v && i, X = w ? d.filter((B) => B.isConfirmed).length : t.isAccepted ? k.length : 0, $ = w ? d.length : k.length, re = t.scheduleTypeColor || t.hexColor || "#039BE5", ce = ee(() => t.startDate ? L(t.startDate) : r.noDateProvided, [t.startDate, L, r.noDateProvided]), se = ee(() => t.startDate && t.endDate ? F(t.startDate, t.endDate) : null, [t.startDate, t.endDate, F]), Q = () => {
1384
+ a(), l?.(t);
1381
1385
  }, Z = () => {
1382
1386
  a(), m?.(t);
1383
1387
  }, de = () => {
1384
- g(!0);
1388
+ H(!0);
1385
1389
  }, ue = () => {
1386
- l?.(t), g(!1);
1390
+ c?.(t), H(!1);
1387
1391
  };
1388
1392
  return s ? /* @__PURE__ */ e("div", { className: "flex h-48 items-center justify-center", children: /* @__PURE__ */ e(ne, { className: "h-6 w-6 text-zinc-400" }) }) : /* @__PURE__ */ n(V, { delayDuration: 300, children: [
1389
1393
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5 p-3", children: [
1390
- /* @__PURE__ */ e("div", { className: "flex items-start justify-end gap-0.5", children: H ? H({ onClose: a }) : /* @__PURE__ */ n(K, { children: [
1391
- u && p && i && /* @__PURE__ */ e(le, { onClick: Q, label: r.edit, children: /* @__PURE__ */ e(Tt, { className: "h-[18px] w-[18px]" }) }),
1392
- u && v && m && /* @__PURE__ */ e(le, { onClick: Z, label: r.cancel, children: /* @__PURE__ */ e(It, { className: "h-[18px] w-[18px]" }) }),
1393
- N && l && /* @__PURE__ */ e(
1394
+ /* @__PURE__ */ e("div", { className: "flex items-start justify-end gap-0.5", children: W ? W({ onClose: a }) : /* @__PURE__ */ n(K, { children: [
1395
+ i && M && l && /* @__PURE__ */ e(le, { onClick: Q, label: r.edit, children: /* @__PURE__ */ e(Tt, { className: "h-[18px] w-[18px]" }) }),
1396
+ i && b && m && /* @__PURE__ */ e(le, { onClick: Z, label: r.cancel, children: /* @__PURE__ */ e(It, { className: "h-[18px] w-[18px]" }) }),
1397
+ x && c && /* @__PURE__ */ e(
1394
1398
  le,
1395
1399
  {
1396
1400
  onClick: de,
@@ -1440,7 +1444,7 @@ function je({
1440
1444
  o && t.recurrenceSummary && /* @__PURE__ */ e("div", { className: "text-sm text-zinc-500 dark:text-zinc-500", children: t.recurrenceSummary })
1441
1445
  ] })
1442
1446
  ] }) }),
1443
- t.isCanceled && /* @__PURE__ */ e("div", { className: "mx-4 p-3 rounded-lg bg-red-50 dark:bg-red-950/30", children: W ? W(t) : /* @__PURE__ */ e("div", { className: "flex items-start gap-0", children: /* @__PURE__ */ n("div", { className: "flex-1 min-w-0", children: [
1447
+ t.isCanceled && /* @__PURE__ */ e("div", { className: "mx-4 p-3 rounded-lg bg-red-50 dark:bg-red-950/30", children: j ? j(t) : /* @__PURE__ */ e("div", { className: "flex items-start gap-0", children: /* @__PURE__ */ n("div", { className: "flex-1 min-w-0", children: [
1444
1448
  /* @__PURE__ */ e("div", { className: "text-sm font-medium text-red-700 dark:text-red-400", children: r.cancellationNote }),
1445
1449
  t.cancelReason && /* @__PURE__ */ n("div", { className: "mt-1 text-sm text-red-600/80 dark:text-red-400/80 italic", children: [
1446
1450
  '"',
@@ -1458,7 +1462,7 @@ function je({
1458
1462
  /* @__PURE__ */ e(At, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
1459
1463
  /* @__PURE__ */ e("span", { className: "text-sm text-zinc-700 dark:text-zinc-300", children: t.address })
1460
1464
  ] }),
1461
- (y || C.length > 0) && /* @__PURE__ */ n("div", { className: "flex items-start gap-2 py-0", children: [
1465
+ (w || k.length > 0) && /* @__PURE__ */ n("div", { className: "flex items-start gap-2 py-0", children: [
1462
1466
  /* @__PURE__ */ e(Wt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
1463
1467
  /* @__PURE__ */ n("div", { className: "flex-1", children: [
1464
1468
  /* @__PURE__ */ n("div", { className: "flex items-center gap-0", children: [
@@ -1476,8 +1480,8 @@ function je({
1476
1480
  ] })
1477
1481
  ] }),
1478
1482
  /* @__PURE__ */ n("div", { className: "mt-2 space-y-2", children: [
1479
- y ? d.slice(0, 6).map(
1480
- (B, ae) => T ? T(B, ae) : /* @__PURE__ */ e(
1483
+ w ? d.slice(0, 6).map(
1484
+ (B, ae) => S ? S(B, ae) : /* @__PURE__ */ e(
1481
1485
  Ie,
1482
1486
  {
1483
1487
  participant: B,
@@ -1486,7 +1490,7 @@ function je({
1486
1490
  },
1487
1491
  B.id
1488
1492
  )
1489
- ) : C.slice(0, 6).map((B, ae) => {
1493
+ ) : k.slice(0, 6).map((B, ae) => {
1490
1494
  const Ne = {
1491
1495
  id: String(ae),
1492
1496
  name: B,
@@ -1495,7 +1499,7 @@ function je({
1495
1499
  isOrganizer: ae === 0,
1496
1500
  isClient: !1
1497
1501
  };
1498
- return T ? T(Ne, ae) : /* @__PURE__ */ e(
1502
+ return S ? S(Ne, ae) : /* @__PURE__ */ e(
1499
1503
  Ie,
1500
1504
  {
1501
1505
  participant: Ne,
@@ -1520,10 +1524,10 @@ function je({
1520
1524
  ] }),
1521
1525
  /* @__PURE__ */ n("div", { className: "flex items-start gap-2", children: [
1522
1526
  /* @__PURE__ */ e($t, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
1523
- /* @__PURE__ */ e("div", { className: "text-sm text-zinc-700 dark:text-zinc-300", children: y && d.find((B) => B.isOrganizer)?.name || C[0] || "Calendar" })
1527
+ /* @__PURE__ */ e("div", { className: "text-sm text-zinc-700 dark:text-zinc-300", children: w && d.find((B) => B.isOrganizer)?.name || k[0] || "Calendar" })
1524
1528
  ] })
1525
1529
  ] }),
1526
- _ && f && c && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 mt-3 py-3", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1530
+ _ && f && u && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 mt-3 py-3", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1527
1531
  o ? /* @__PURE__ */ n(ct, { children: [
1528
1532
  /* @__PURE__ */ e(dt, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "flex", children: [
1529
1533
  /* @__PURE__ */ e(
@@ -1533,14 +1537,14 @@ function je({
1533
1537
  variant: "outline",
1534
1538
  className: h(
1535
1539
  "rounded-r-none gap-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
1536
- E && "!bg-green-700 !text-white hover:!bg-green-700"
1540
+ D && "!bg-green-700 !text-white hover:!bg-green-700"
1537
1541
  ),
1538
1542
  onClick: (B) => {
1539
- B.stopPropagation(), E || f(t);
1543
+ B.stopPropagation(), D || f(t);
1540
1544
  },
1541
1545
  disabled: z,
1542
1546
  children: z ? /* @__PURE__ */ e(ne, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(K, { children: [
1543
- E && /* @__PURE__ */ e(ie, { className: "h-3.5 w-3.5" }),
1547
+ D && /* @__PURE__ */ e(ie, { className: "h-3.5 w-3.5" }),
1544
1548
  r.going
1545
1549
  ] })
1546
1550
  }
@@ -1552,7 +1556,7 @@ function je({
1552
1556
  variant: "outline",
1553
1557
  className: h(
1554
1558
  "rounded-l-none px-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
1555
- E && "!bg-green-700 !text-white hover:!bg-green-700"
1559
+ D && "!bg-green-700 !text-white hover:!bg-green-700"
1556
1560
  ),
1557
1561
  children: /* @__PURE__ */ e(Ht, { className: "h-3.5 w-3.5" })
1558
1562
  }
@@ -1564,7 +1568,7 @@ function je({
1564
1568
  {
1565
1569
  className: h(
1566
1570
  "gap-1.5 h-8 !border-none !bg-green-50 text-green-800 hover:!bg-green-100",
1567
- E && "!bg-green-700 !text-white hover:!bg-green-700"
1571
+ D && "!bg-green-700 !text-white hover:!bg-green-700"
1568
1572
  ),
1569
1573
  onClick: () => f(t),
1570
1574
  children: [
@@ -1585,14 +1589,14 @@ function je({
1585
1589
  variant: "outline",
1586
1590
  className: h(
1587
1591
  "gap-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
1588
- E && "!bg-green-700 !text-white hover:!bg-green-700"
1592
+ D && "!bg-green-700 !text-white hover:!bg-green-700"
1589
1593
  ),
1590
1594
  onClick: () => {
1591
- E || f(t);
1595
+ D || f(t);
1592
1596
  },
1593
1597
  disabled: z,
1594
1598
  children: z ? /* @__PURE__ */ e(ne, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(K, { children: [
1595
- E && /* @__PURE__ */ e(ie, { className: "h-3.5 w-3.5" }),
1599
+ D && /* @__PURE__ */ e(ie, { className: "h-3.5 w-3.5" }),
1596
1600
  r.going
1597
1601
  ] })
1598
1602
  }
@@ -1604,29 +1608,29 @@ function je({
1604
1608
  variant: "outline",
1605
1609
  className: h(
1606
1610
  "gap-1.5 h-8 !border-none !bg-rose-100 text-rose-800 hover:!bg-rose-200",
1607
- S && "!bg-rose-700 !text-white hover:!bg-rose-700"
1611
+ E && "!bg-rose-700 !text-white hover:!bg-rose-700"
1608
1612
  ),
1609
1613
  onClick: () => {
1610
- S || c(t);
1614
+ E || u(t);
1611
1615
  },
1612
- disabled: w,
1613
- children: w ? /* @__PURE__ */ e(ne, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(K, { children: [
1614
- S && /* @__PURE__ */ e(he, { className: "h-3.5 w-3.5" }),
1616
+ disabled: N,
1617
+ children: N ? /* @__PURE__ */ e(ne, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(K, { children: [
1618
+ E && /* @__PURE__ */ e(he, { className: "h-3.5 w-3.5" }),
1615
1619
  r.notGoing
1616
1620
  ] })
1617
1621
  }
1618
1622
  )
1619
1623
  ] }) }),
1620
- b && E && !t.meetingTookPlace && !t.isCanceled && x && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 py-3", children: /* @__PURE__ */ n(
1624
+ p && D && !t.meetingTookPlace && !t.isCanceled && g && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 py-3", children: /* @__PURE__ */ n(
1621
1625
  q,
1622
1626
  {
1623
1627
  size: "sm",
1624
1628
  variant: "outline",
1625
1629
  className: "w-full h-9 hover:!bg-green-100 hover:text-green-700 text-green-700 !bg-green-100 !border-none dark:text-green-400 dark:hover:bg-green-950/30",
1626
- onClick: () => x(t),
1627
- disabled: M,
1630
+ onClick: () => g(t),
1631
+ disabled: y,
1628
1632
  children: [
1629
- M && /* @__PURE__ */ e(ne, { className: "h-4 w-4 mr-2" }),
1633
+ y && /* @__PURE__ */ e(ne, { className: "h-4 w-4 mr-2" }),
1630
1634
  r.confirmMeeting
1631
1635
  ]
1632
1636
  }
@@ -1634,19 +1638,19 @@ function je({
1634
1638
  ] }),
1635
1639
  A ? P && A({
1636
1640
  onConfirm: ue,
1637
- onCancel: () => g(!1),
1638
- isLoading: L
1641
+ onCancel: () => H(!1),
1642
+ isLoading: T
1639
1643
  }) : /* @__PURE__ */ e(
1640
1644
  Ot,
1641
1645
  {
1642
1646
  open: P,
1643
- onOpenChange: g,
1647
+ onOpenChange: H,
1644
1648
  title: r.deleteConfirmTitle,
1645
1649
  description: r.deleteConfirmDescription,
1646
1650
  cancelLabel: r.cancel,
1647
1651
  confirmLabel: r.delete,
1648
1652
  onConfirm: ue,
1649
- isLoading: L
1653
+ isLoading: T
1650
1654
  }
1651
1655
  )
1652
1656
  ] });
@@ -1656,62 +1660,62 @@ function Or({
1656
1660
  children: r,
1657
1661
  open: s,
1658
1662
  onOpenChange: a,
1659
- isLoading: i,
1660
- labels: l,
1663
+ isLoading: l,
1664
+ labels: c,
1661
1665
  onEdit: m,
1662
1666
  onDelete: f,
1663
- onCancel: c,
1664
- onAccept: x,
1665
- onDecline: p,
1666
- onConfirmMeeting: N,
1667
- canEdit: v = !0,
1668
- canDelete: b = !1,
1669
- canCancel: k = !0,
1670
- isCurrentUserParticipant: D,
1667
+ onCancel: u,
1668
+ onAccept: g,
1669
+ onDecline: M,
1670
+ onConfirmMeeting: x,
1671
+ canEdit: b = !0,
1672
+ canDelete: p = !1,
1673
+ canCancel: v = !0,
1674
+ isCurrentUserParticipant: C,
1671
1675
  isCurrentUserClient: z,
1672
- currentUserAcceptStatus: w,
1673
- isAcceptLoading: M,
1674
- isDeclineLoading: L,
1675
- isConfirmLoading: T,
1676
- isDeleteLoading: H,
1677
- renderParticipant: W,
1676
+ currentUserAcceptStatus: N,
1677
+ isAcceptLoading: y,
1678
+ isDeclineLoading: T,
1679
+ isConfirmLoading: S,
1680
+ isDeleteLoading: W,
1681
+ renderParticipant: j,
1678
1682
  renderHeaderActions: A,
1679
- renderCancelReason: j,
1683
+ renderCancelReason: L,
1680
1684
  renderDeleteConfirmation: F,
1681
1685
  formatDate: P,
1682
- formatTimeRange: g,
1683
- className: u,
1686
+ formatTimeRange: H,
1687
+ className: i,
1684
1688
  width: o = 360
1685
1689
  }) {
1686
- const d = Yt("(min-width: 768px)"), C = { ...Ft, ...l }, y = ee(() => {
1690
+ const d = Yt("(min-width: 768px)"), k = { ...Ft, ...c }, w = ee(() => {
1687
1691
  a?.(!1);
1688
- }, [a]), E = {
1692
+ }, [a]), D = {
1689
1693
  event: t,
1690
- labels: C,
1691
- isLoading: i,
1692
- onClose: y,
1694
+ labels: k,
1695
+ isLoading: l,
1696
+ onClose: w,
1693
1697
  onEdit: m,
1694
1698
  onDelete: f,
1695
- onCancel: c,
1696
- onAccept: x,
1697
- onDecline: p,
1698
- onConfirmMeeting: N,
1699
- canEdit: v,
1700
- canDelete: b,
1701
- canCancel: k,
1702
- isCurrentUserParticipant: D,
1699
+ onCancel: u,
1700
+ onAccept: g,
1701
+ onDecline: M,
1702
+ onConfirmMeeting: x,
1703
+ canEdit: b,
1704
+ canDelete: p,
1705
+ canCancel: v,
1706
+ isCurrentUserParticipant: C,
1703
1707
  isCurrentUserClient: z,
1704
- currentUserAcceptStatus: w,
1705
- isAcceptLoading: M,
1706
- isDeclineLoading: L,
1707
- isConfirmLoading: T,
1708
- isDeleteLoading: H,
1709
- renderParticipant: W,
1708
+ currentUserAcceptStatus: N,
1709
+ isAcceptLoading: y,
1710
+ isDeclineLoading: T,
1711
+ isConfirmLoading: S,
1712
+ isDeleteLoading: W,
1713
+ renderParticipant: j,
1710
1714
  renderHeaderActions: A,
1711
- renderCancelReason: j,
1715
+ renderCancelReason: L,
1712
1716
  renderDeleteConfirmation: F,
1713
1717
  formatDate: P,
1714
- formatTimeRange: g
1718
+ formatTimeRange: H
1715
1719
  };
1716
1720
  return d ? /* @__PURE__ */ n(Oe, { open: s ?? !1, onOpenChange: a ?? (() => {
1717
1721
  }), children: [
@@ -1721,19 +1725,19 @@ function Or({
1721
1725
  {
1722
1726
  className: h(
1723
1727
  "p-0 shadow-lg !rounded-2xl bg-white dark:bg-zinc-900 overflow-hidden border z-50",
1724
- u
1728
+ i
1725
1729
  ),
1726
1730
  style: { width: o },
1727
1731
  align: "center",
1728
1732
  side: "bottom",
1729
1733
  sideOffset: 4,
1730
- children: /* @__PURE__ */ e(je, { ...E })
1734
+ children: /* @__PURE__ */ e(je, { ...D })
1731
1735
  }
1732
1736
  )
1733
1737
  ] }) : /* @__PURE__ */ n(K, { children: [
1734
1738
  r,
1735
1739
  /* @__PURE__ */ e(_t, { open: s ?? !1, onOpenChange: a ?? (() => {
1736
- }), title: t.title, children: /* @__PURE__ */ e(je, { ...E }) })
1740
+ }), title: t.title, children: /* @__PURE__ */ e(je, { ...D }) })
1737
1741
  ] });
1738
1742
  }
1739
1743
  function Gt({ className: t }) {
@@ -1789,25 +1793,25 @@ function Vr({
1789
1793
  onChange: r,
1790
1794
  isLocked: s = !1,
1791
1795
  className: a,
1792
- labels: i = {}
1796
+ labels: l = {}
1793
1797
  }) {
1794
- const l = {
1798
+ const c = {
1795
1799
  title: "Slot duration",
1796
1800
  lockedMessage: "This setting is locked by the administrator",
1797
1801
  infoMessage: "Set the time slot duration for day and week calendar views.",
1798
- ...i
1802
+ ...l
1799
1803
  }, m = (f) => {
1800
1804
  s || r(Number(f.target.value));
1801
1805
  };
1802
1806
  return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-3", a), children: [
1803
1807
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1804
- /* @__PURE__ */ e(O, { className: "text-sm font-semibold", children: l.title }),
1808
+ /* @__PURE__ */ e(O, { className: "text-sm font-semibold", children: c.title }),
1805
1809
  s ? /* @__PURE__ */ e(V, { delayDuration: 100, children: /* @__PURE__ */ n(R, { children: [
1806
1810
  /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(Kt, { className: "size-3 text-muted-foreground" }) }),
1807
- /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
1811
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e("p", { children: c.lockedMessage }) })
1808
1812
  ] }) }) : /* @__PURE__ */ e(V, { delayDuration: 100, children: /* @__PURE__ */ n(R, { children: [
1809
1813
  /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(Gt, { className: "size-3 text-muted-foreground" }) }),
1810
- /* @__PURE__ */ e(Y, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
1814
+ /* @__PURE__ */ e(Y, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: c.infoMessage }) })
1811
1815
  ] }) })
1812
1816
  ] }),
1813
1817
  /* @__PURE__ */ e(
@@ -1876,38 +1880,38 @@ function Rr({
1876
1880
  onChange: r,
1877
1881
  isLocked: s = !1,
1878
1882
  className: a,
1879
- labels: i = {}
1883
+ labels: l = {}
1880
1884
  }) {
1881
- const l = {
1885
+ const c = {
1882
1886
  title: "Visible hours",
1883
1887
  from: "From",
1884
1888
  to: "To",
1885
1889
  lockedMessage: "This setting is locked by the administrator",
1886
1890
  infoMessage: "Set the visible hour range for day and week views. Hours outside this range will be hidden.",
1887
- ...i
1888
- }, m = Zt(), f = (x) => {
1891
+ ...l
1892
+ }, m = Zt(), f = (g) => {
1889
1893
  if (s) return;
1890
- const p = Number(x.target.value);
1891
- p < t.endHour && r({ ...t, startHour: p });
1892
- }, c = (x) => {
1894
+ const M = Number(g.target.value);
1895
+ M < t.endHour && r({ ...t, startHour: M });
1896
+ }, u = (g) => {
1893
1897
  if (s) return;
1894
- const p = Number(x.target.value);
1895
- p > t.startHour && r({ ...t, endHour: p });
1898
+ const M = Number(g.target.value);
1899
+ M > t.startHour && r({ ...t, endHour: M });
1896
1900
  };
1897
1901
  return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-3", a), children: [
1898
1902
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1899
- /* @__PURE__ */ e(O, { className: "text-sm font-semibold", children: l.title }),
1903
+ /* @__PURE__ */ e(O, { className: "text-sm font-semibold", children: c.title }),
1900
1904
  s ? /* @__PURE__ */ e(V, { delayDuration: 100, children: /* @__PURE__ */ n(R, { children: [
1901
1905
  /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(Qt, { className: "size-3 text-muted-foreground" }) }),
1902
- /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
1906
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e("p", { children: c.lockedMessage }) })
1903
1907
  ] }) }) : /* @__PURE__ */ e(V, { delayDuration: 100, children: /* @__PURE__ */ n(R, { children: [
1904
1908
  /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(Xt, { className: "size-3 text-muted-foreground" }) }),
1905
- /* @__PURE__ */ e(Y, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
1909
+ /* @__PURE__ */ e(Y, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: c.infoMessage }) })
1906
1910
  ] }) })
1907
1911
  ] }),
1908
1912
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1909
1913
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
1910
- /* @__PURE__ */ e(O, { className: "text-xs text-muted-foreground", children: l.from }),
1914
+ /* @__PURE__ */ e(O, { className: "text-xs text-muted-foreground", children: c.from }),
1911
1915
  /* @__PURE__ */ e(
1912
1916
  G,
1913
1917
  {
@@ -1915,36 +1919,36 @@ function Rr({
1915
1919
  onChange: f,
1916
1920
  disabled: s,
1917
1921
  className: "h-9 w-[88px] text-sm",
1918
- children: m.map((x) => /* @__PURE__ */ e(
1922
+ children: m.map((g) => /* @__PURE__ */ e(
1919
1923
  "option",
1920
1924
  {
1921
- value: x.value.toString(),
1922
- disabled: x.value >= t.endHour,
1923
- children: x.label
1925
+ value: g.value.toString(),
1926
+ disabled: g.value >= t.endHour,
1927
+ children: g.label
1924
1928
  },
1925
- x.value
1929
+ g.value
1926
1930
  ))
1927
1931
  }
1928
1932
  )
1929
1933
  ] }),
1930
1934
  /* @__PURE__ */ e("span", { className: "mt-5 text-muted-foreground", children: "—" }),
1931
1935
  /* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
1932
- /* @__PURE__ */ e(O, { className: "text-xs text-muted-foreground", children: l.to }),
1936
+ /* @__PURE__ */ e(O, { className: "text-xs text-muted-foreground", children: c.to }),
1933
1937
  /* @__PURE__ */ e(
1934
1938
  G,
1935
1939
  {
1936
1940
  value: t.endHour.toString(),
1937
- onChange: c,
1941
+ onChange: u,
1938
1942
  disabled: s,
1939
1943
  className: "h-9 w-[88px] text-sm",
1940
- children: m.map((x) => /* @__PURE__ */ e(
1944
+ children: m.map((g) => /* @__PURE__ */ e(
1941
1945
  "option",
1942
1946
  {
1943
- value: x.value.toString(),
1944
- disabled: x.value <= t.startHour,
1945
- children: x.label
1947
+ value: g.value.toString(),
1948
+ disabled: g.value <= t.startHour,
1949
+ children: g.label
1946
1950
  },
1947
- x.value
1951
+ g.value
1948
1952
  ))
1949
1953
  }
1950
1954
  )
@@ -2005,9 +2009,9 @@ function Ur({
2005
2009
  onChange: r,
2006
2010
  isLocked: s = !1,
2007
2011
  className: a,
2008
- labels: i = {}
2012
+ labels: l = {}
2009
2013
  }) {
2010
- const l = {
2014
+ const c = {
2011
2015
  title: "Event display",
2012
2016
  lockedMessage: "This setting is locked by the administrator",
2013
2017
  infoMessage: "Choose how events are displayed. Dot shows a small indicator, colored fills the entire event, mixed uses both.",
@@ -2016,19 +2020,19 @@ function Ur({
2016
2020
  colored: "Full color",
2017
2021
  mixed: "Mixed"
2018
2022
  },
2019
- ...i
2020
- }, m = (c) => l.options?.[c] ?? c, f = (c) => {
2021
- s || r(c.target.value);
2023
+ ...l
2024
+ }, m = (u) => c.options?.[u] ?? u, f = (u) => {
2025
+ s || r(u.target.value);
2022
2026
  };
2023
2027
  return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-3", a), children: [
2024
2028
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
2025
- /* @__PURE__ */ e(O, { className: "text-sm font-semibold", children: l.title }),
2029
+ /* @__PURE__ */ e(O, { className: "text-sm font-semibold", children: c.title }),
2026
2030
  s ? /* @__PURE__ */ e(V, { delayDuration: 100, children: /* @__PURE__ */ n(R, { children: [
2027
2031
  /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(er, { className: "size-3 text-muted-foreground" }) }),
2028
- /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
2032
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e("p", { children: c.lockedMessage }) })
2029
2033
  ] }) }) : /* @__PURE__ */ e(V, { delayDuration: 100, children: /* @__PURE__ */ n(R, { children: [
2030
2034
  /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(qt, { className: "size-3 text-muted-foreground" }) }),
2031
- /* @__PURE__ */ e(Y, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
2035
+ /* @__PURE__ */ e(Y, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: c.infoMessage }) })
2032
2036
  ] }) })
2033
2037
  ] }),
2034
2038
  /* @__PURE__ */ e(
@@ -2038,7 +2042,7 @@ function Ur({
2038
2042
  onChange: f,
2039
2043
  disabled: s,
2040
2044
  className: "h-9 w-[128px] text-sm",
2041
- children: tr.map((c) => /* @__PURE__ */ e("option", { value: c.value, children: m(c.value) }, c.value))
2045
+ children: tr.map((u) => /* @__PURE__ */ e("option", { value: u.value, children: m(u.value) }, u.value))
2042
2046
  }
2043
2047
  )
2044
2048
  ] });
@@ -2133,18 +2137,18 @@ function ir({
2133
2137
  config: r,
2134
2138
  onChange: s,
2135
2139
  disabled: a,
2136
- hourOptions: i
2140
+ hourOptions: l
2137
2141
  }) {
2138
- const l = () => {
2142
+ const c = () => {
2139
2143
  a || s({ ...r, enabled: !r.enabled });
2140
- }, m = (c) => {
2144
+ }, m = (u) => {
2141
2145
  if (a) return;
2142
- const x = Number(c.target.value);
2143
- x < r.to && s({ ...r, from: x });
2144
- }, f = (c) => {
2146
+ const g = Number(u.target.value);
2147
+ g < r.to && s({ ...r, from: g });
2148
+ }, f = (u) => {
2145
2149
  if (a) return;
2146
- const x = Number(c.target.value);
2147
- x > r.from && s({ ...r, to: x });
2150
+ const g = Number(u.target.value);
2151
+ g > r.from && s({ ...r, to: g });
2148
2152
  };
2149
2153
  return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
2150
2154
  /* @__PURE__ */ e(
@@ -2154,7 +2158,7 @@ function ir({
2154
2158
  role: "checkbox",
2155
2159
  "aria-checked": r.enabled,
2156
2160
  "aria-label": `Enable ${t}`,
2157
- onClick: l,
2161
+ onClick: c,
2158
2162
  disabled: a,
2159
2163
  className: h(
2160
2164
  "flex size-5 shrink-0 items-center justify-center rounded border transition-colors",
@@ -2181,14 +2185,14 @@ function ir({
2181
2185
  onChange: m,
2182
2186
  disabled: a || !r.enabled,
2183
2187
  className: "h-8 w-[76px] text-xs",
2184
- children: i.map((c) => /* @__PURE__ */ e(
2188
+ children: l.map((u) => /* @__PURE__ */ e(
2185
2189
  "option",
2186
2190
  {
2187
- value: c.value.toString(),
2188
- disabled: c.value >= r.to,
2189
- children: c.label
2191
+ value: u.value.toString(),
2192
+ disabled: u.value >= r.to,
2193
+ children: u.label
2190
2194
  },
2191
- c.value
2195
+ u.value
2192
2196
  ))
2193
2197
  }
2194
2198
  ),
@@ -2200,14 +2204,14 @@ function ir({
2200
2204
  onChange: f,
2201
2205
  disabled: a || !r.enabled,
2202
2206
  className: "h-8 w-[76px] text-xs",
2203
- children: i.map((c) => /* @__PURE__ */ e(
2207
+ children: l.map((u) => /* @__PURE__ */ e(
2204
2208
  "option",
2205
2209
  {
2206
- value: c.value.toString(),
2207
- disabled: c.value <= r.from,
2208
- children: c.label
2210
+ value: u.value.toString(),
2211
+ disabled: u.value <= r.from,
2212
+ children: u.label
2209
2213
  },
2210
- c.value
2214
+ u.value
2211
2215
  ))
2212
2216
  }
2213
2217
  )
@@ -2218,38 +2222,38 @@ function Yr({
2218
2222
  onChange: r,
2219
2223
  isLocked: s = !1,
2220
2224
  className: a,
2221
- labels: i = {}
2225
+ labels: l = {}
2222
2226
  }) {
2223
- const l = {
2227
+ const c = {
2224
2228
  title: "Working hours",
2225
2229
  lockedMessage: "This setting is locked by the administrator",
2226
2230
  infoMessage: "Configure working hours for each day of the week. Non-working hours will be grayed out in day and week views.",
2227
2231
  days: He,
2228
- ...i
2229
- }, m = or(), f = (c, x) => {
2230
- s || r({ ...t, [c]: x });
2232
+ ...l
2233
+ }, m = or(), f = (u, g) => {
2234
+ s || r({ ...t, [u]: g });
2231
2235
  };
2232
2236
  return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-3", a), children: [
2233
2237
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
2234
- /* @__PURE__ */ e(O, { className: "text-sm font-semibold", children: l.title }),
2238
+ /* @__PURE__ */ e(O, { className: "text-sm font-semibold", children: c.title }),
2235
2239
  s ? /* @__PURE__ */ e(V, { delayDuration: 100, children: /* @__PURE__ */ n(R, { children: [
2236
2240
  /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(nr, { className: "size-3 text-muted-foreground" }) }),
2237
- /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
2241
+ /* @__PURE__ */ e(Y, { children: /* @__PURE__ */ e("p", { children: c.lockedMessage }) })
2238
2242
  ] }) }) : /* @__PURE__ */ e(V, { delayDuration: 100, children: /* @__PURE__ */ n(R, { children: [
2239
2243
  /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e(rr, { className: "size-3 text-muted-foreground" }) }),
2240
- /* @__PURE__ */ e(Y, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
2244
+ /* @__PURE__ */ e(Y, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: c.infoMessage }) })
2241
2245
  ] }) })
2242
2246
  ] }),
2243
- /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: ar.map((c) => /* @__PURE__ */ e(
2247
+ /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: ar.map((u) => /* @__PURE__ */ e(
2244
2248
  ir,
2245
2249
  {
2246
- dayLabel: l.days?.[c] ?? He[c],
2247
- config: t[c],
2248
- onChange: (x) => f(c, x),
2250
+ dayLabel: c.days?.[u] ?? He[u],
2251
+ config: t[u],
2252
+ onChange: (g) => f(u, g),
2249
2253
  disabled: s,
2250
2254
  hourOptions: m
2251
2255
  },
2252
- c
2256
+ u
2253
2257
  )) })
2254
2258
  ] });
2255
2259
  }
@@ -2290,14 +2294,14 @@ function Kr({
2290
2294
  value: r,
2291
2295
  onChange: s,
2292
2296
  allLabel: a = "All users",
2293
- className: i,
2294
- label: l
2297
+ className: l,
2298
+ label: c
2295
2299
  }) {
2296
2300
  const m = (f) => {
2297
2301
  s(f.target.value);
2298
2302
  };
2299
- return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-1", i), children: [
2300
- l && /* @__PURE__ */ e(O, { className: "text-xs text-muted-foreground", children: l }),
2303
+ return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-1", l), children: [
2304
+ c && /* @__PURE__ */ e(O, { className: "text-xs text-muted-foreground", children: c }),
2301
2305
  /* @__PURE__ */ n("div", { className: "relative", children: [
2302
2306
  /* @__PURE__ */ e(lr, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
2303
2307
  /* @__PURE__ */ n(
@@ -2341,16 +2345,16 @@ function Jr({
2341
2345
  value: r,
2342
2346
  onChange: s,
2343
2347
  allLabel: a = "All types",
2344
- className: i,
2345
- label: l
2348
+ className: l,
2349
+ label: c
2346
2350
  }) {
2347
- const m = (c) => {
2348
- s(c.target.value);
2351
+ const m = (u) => {
2352
+ s(u.target.value);
2349
2353
  }, f = t.find(
2350
- (c) => String(c.id) === r
2354
+ (u) => String(u.id) === r
2351
2355
  );
2352
- return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-1", i), children: [
2353
- l && /* @__PURE__ */ e(O, { className: "text-xs text-muted-foreground", children: l }),
2356
+ return /* @__PURE__ */ n("div", { className: h("flex flex-col gap-1", l), children: [
2357
+ c && /* @__PURE__ */ e(O, { className: "text-xs text-muted-foreground", children: c }),
2354
2358
  /* @__PURE__ */ n("div", { className: "relative", children: [
2355
2359
  f ? /* @__PURE__ */ e(
2356
2360
  "span",
@@ -2367,7 +2371,7 @@ function Jr({
2367
2371
  className: "h-9 w-full min-w-[140px] pl-8 pr-8 text-sm",
2368
2372
  children: [
2369
2373
  /* @__PURE__ */ e("option", { value: "all", children: a }),
2370
- t.map((c) => /* @__PURE__ */ e("option", { value: String(c.id), children: c.label }, c.id))
2374
+ t.map((u) => /* @__PURE__ */ e("option", { value: String(u.id), children: u.label }, u.id))
2371
2375
  ]
2372
2376
  }
2373
2377
  )
@@ -2442,8 +2446,8 @@ function ve({ checked: t, onCheckedChange: r, className: s, children: a }) {
2442
2446
  );
2443
2447
  }
2444
2448
  function hr({ src: t, alt: r, fallback: s, className: a }) {
2445
- const [i, l] = te(!1);
2446
- return !t || i ? /* @__PURE__ */ e(
2449
+ const [l, c] = te(!1);
2450
+ return !t || l ? /* @__PURE__ */ e(
2447
2451
  "div",
2448
2452
  {
2449
2453
  className: h(
@@ -2458,7 +2462,7 @@ function hr({ src: t, alt: r, fallback: s, className: a }) {
2458
2462
  src: t,
2459
2463
  alt: r || "",
2460
2464
  className: h("object-cover", a),
2461
- onError: () => l(!0)
2465
+ onError: () => c(!0)
2462
2466
  }
2463
2467
  );
2464
2468
  }
@@ -2470,7 +2474,7 @@ function We({ value: t, onChange: r, placeholder: s, className: a }) {
2470
2474
  {
2471
2475
  type: "text",
2472
2476
  value: t,
2473
- onChange: (i) => r(i.target.value),
2477
+ onChange: (l) => r(l.target.value),
2474
2478
  placeholder: s,
2475
2479
  className: "h-9 w-full rounded-lg border border-border bg-white pl-9 pr-3 text-sm placeholder:text-muted-foreground focus:border-primary focus:outline-none focus:ring-1 focus:ring-primary"
2476
2480
  }
@@ -2479,8 +2483,8 @@ function We({ value: t, onChange: r, placeholder: s, className: a }) {
2479
2483
  }
2480
2484
  function Ae(t, r, s, a = 0.3) {
2481
2485
  if (!r.trim()) return t;
2482
- const i = r.toLowerCase();
2483
- return t.filter((l) => s(l).some((f) => f ? f.toLowerCase().includes(i) : !1));
2486
+ const l = r.toLowerCase();
2487
+ return t.filter((c) => s(c).some((f) => f ? f.toLowerCase().includes(l) : !1));
2484
2488
  }
2485
2489
  const mr = {
2486
2490
  title: "Filters",
@@ -2500,52 +2504,52 @@ function Xr({
2500
2504
  users: r,
2501
2505
  selectedScheduleTypeIds: s,
2502
2506
  onScheduleTypeChange: a,
2503
- selectedUserIds: i,
2504
- onUserChange: l,
2507
+ selectedUserIds: l,
2508
+ onUserChange: c,
2505
2509
  onClearAll: m,
2506
2510
  className: f,
2507
- scheduleTypesLoading: c = !1,
2508
- usersLoading: x = !1,
2509
- labels: p,
2510
- getScheduleTypeName: N
2511
+ scheduleTypesLoading: u = !1,
2512
+ usersLoading: g = !1,
2513
+ labels: M,
2514
+ getScheduleTypeName: x
2511
2515
  }) {
2512
- const v = { ...mr, ...p }, [b, k] = te(""), [D, z] = te(""), w = I(() => b.trim() ? Ae(t, b, (o) => [
2516
+ const b = { ...mr, ...M }, [p, v] = te(""), [C, z] = te(""), N = I(() => p.trim() ? Ae(t, p, (o) => [
2513
2517
  o.name,
2514
- N?.(o) || o.name
2515
- ]) : t, [t, b, N]), M = I(() => D.trim() ? Ae(r, D, (o) => [
2518
+ x?.(o) || o.name
2519
+ ]) : t, [t, p, x]), y = I(() => C.trim() ? Ae(r, C, (o) => [
2516
2520
  o.name,
2517
2521
  o.email || ""
2518
- ]) : r, [r, D]), L = w.length > 0 && w.every((o) => s.includes(o.id)), T = M.length > 0 && M.every((o) => i.includes(o.id)), H = s.length + i.length, W = (o, d) => {
2519
- const C = d ? [...s, o] : s.filter((y) => y !== o);
2520
- a(C);
2522
+ ]) : r, [r, C]), T = N.length > 0 && N.every((o) => s.includes(o.id)), S = y.length > 0 && y.every((o) => l.includes(o.id)), W = s.length + l.length, j = (o, d) => {
2523
+ const k = d ? [...s, o] : s.filter((w) => w !== o);
2524
+ a(k);
2521
2525
  }, A = () => {
2522
- if (L) {
2523
- const o = new Set(w.map((d) => d.id));
2526
+ if (T) {
2527
+ const o = new Set(N.map((d) => d.id));
2524
2528
  a(s.filter((d) => !o.has(d)));
2525
2529
  } else {
2526
2530
  const o = /* @__PURE__ */ new Set([
2527
2531
  ...s,
2528
- ...w.map((d) => d.id)
2532
+ ...N.map((d) => d.id)
2529
2533
  ]);
2530
2534
  a(Array.from(o));
2531
2535
  }
2532
- }, j = (o, d) => {
2533
- const C = d ? [...i, o] : i.filter((y) => y !== o);
2534
- l(C);
2536
+ }, L = (o, d) => {
2537
+ const k = d ? [...l, o] : l.filter((w) => w !== o);
2538
+ c(k);
2535
2539
  }, F = () => {
2536
- if (T) {
2537
- const o = new Set(M.map((d) => d.id));
2538
- l(i.filter((d) => !o.has(d)));
2540
+ if (S) {
2541
+ const o = new Set(y.map((d) => d.id));
2542
+ c(l.filter((d) => !o.has(d)));
2539
2543
  } else {
2540
2544
  const o = /* @__PURE__ */ new Set([
2541
- ...i,
2542
- ...M.map((d) => d.id)
2545
+ ...l,
2546
+ ...y.map((d) => d.id)
2543
2547
  ]);
2544
- l(Array.from(o));
2548
+ c(Array.from(o));
2545
2549
  }
2546
2550
  }, P = () => {
2547
- a([]), l([]), m?.();
2548
- }, g = (o) => N ? N(o) : o.name, u = (o) => o.colorHex || o.color || "#069AD7";
2551
+ a([]), c([]), m?.();
2552
+ }, H = (o) => x ? x(o) : o.name, i = (o) => o.colorHex || o.color || "#069AD7";
2549
2553
  return /* @__PURE__ */ n(
2550
2554
  "div",
2551
2555
  {
@@ -2556,10 +2560,10 @@ function Xr({
2556
2560
  children: [
2557
2561
  /* @__PURE__ */ n("header", { className: "flex items-start justify-between gap-2 px-4 pb-2 pt-4", children: [
2558
2562
  /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
2559
- /* @__PURE__ */ e("h3", { className: "text-base font-semibold text-foreground", children: v.title }),
2560
- /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: v.subtitle })
2563
+ /* @__PURE__ */ e("h3", { className: "text-base font-semibold text-foreground", children: b.title }),
2564
+ /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: b.subtitle })
2561
2565
  ] }),
2562
- H > 0 && /* @__PURE__ */ n(
2566
+ W > 0 && /* @__PURE__ */ n(
2563
2567
  "button",
2564
2568
  {
2565
2569
  type: "button",
@@ -2567,7 +2571,7 @@ function Xr({
2567
2571
  className: "flex h-auto items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-destructive transition-colors hover:bg-destructive/10",
2568
2572
  children: [
2569
2573
  /* @__PURE__ */ e(ur, { className: "h-3.5 w-3.5" }),
2570
- v.clearAll
2574
+ b.clearAll
2571
2575
  ]
2572
2576
  }
2573
2577
  )
@@ -2575,27 +2579,27 @@ function Xr({
2575
2579
  /* @__PURE__ */ e("div", { className: "h-px w-full bg-border/60" }),
2576
2580
  /* @__PURE__ */ n("section", { className: "flex flex-col", children: [
2577
2581
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between px-4 py-3", children: [
2578
- /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: v.scheduleTypes }),
2582
+ /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: b.scheduleTypes }),
2579
2583
  /* @__PURE__ */ e(
2580
2584
  "button",
2581
2585
  {
2582
2586
  type: "button",
2583
2587
  onClick: A,
2584
2588
  className: "text-xs font-medium text-primary transition-colors hover:text-primary/80",
2585
- children: L ? v.unselectAll : v.selectAll
2589
+ children: T ? b.unselectAll : b.selectAll
2586
2590
  }
2587
2591
  )
2588
2592
  ] }),
2589
2593
  t.length > 6 && /* @__PURE__ */ e("div", { className: "px-4 pb-3", children: /* @__PURE__ */ e(
2590
2594
  We,
2591
2595
  {
2592
- value: b,
2593
- onChange: k,
2594
- placeholder: v.searchScheduleTypes
2596
+ value: p,
2597
+ onChange: v,
2598
+ placeholder: b.searchScheduleTypes
2595
2599
  }
2596
2600
  ) }),
2597
2601
  /* @__PURE__ */ n("div", { className: "flex max-h-[220px] flex-col gap-2 overflow-y-auto px-4 pb-2 scrollbar-thin", children: [
2598
- c ? (
2602
+ u ? (
2599
2603
  // Loading skeletons
2600
2604
  Array.from({ length: 4 }).map((o, d) => /* @__PURE__ */ n(
2601
2605
  "div",
@@ -2608,13 +2612,13 @@ function Xr({
2608
2612
  },
2609
2613
  `skeleton-${d}`
2610
2614
  ))
2611
- ) : w.map((o) => {
2612
- const d = s.includes(o.id), C = u(o);
2615
+ ) : N.map((o) => {
2616
+ const d = s.includes(o.id), k = i(o);
2613
2617
  return /* @__PURE__ */ n(
2614
2618
  ve,
2615
2619
  {
2616
2620
  checked: d,
2617
- onCheckedChange: (y) => W(o.id, y),
2621
+ onCheckedChange: (w) => j(o.id, w),
2618
2622
  className: h(
2619
2623
  "relative flex w-full cursor-pointer items-center justify-between gap-3 rounded-md border border-border bg-white px-3 py-2 transition-colors hover:border-primary/50",
2620
2624
  d && "border-primary bg-primary/5"
@@ -2631,15 +2635,15 @@ function Xr({
2631
2635
  children: d && /* @__PURE__ */ e(pe, { className: "h-3 w-3" })
2632
2636
  }
2633
2637
  ),
2634
- /* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: g(o) })
2638
+ /* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: H(o) })
2635
2639
  ] }),
2636
2640
  /* @__PURE__ */ e(
2637
2641
  "div",
2638
2642
  {
2639
2643
  className: "h-4 w-4 rounded-full border",
2640
2644
  style: {
2641
- backgroundColor: C,
2642
- borderColor: C
2645
+ backgroundColor: k,
2646
+ borderColor: k
2643
2647
  }
2644
2648
  }
2645
2649
  )
@@ -2648,36 +2652,36 @@ function Xr({
2648
2652
  o.id
2649
2653
  );
2650
2654
  }),
2651
- !c && w.length === 0 && /* @__PURE__ */ e("p", { className: "px-2 py-1 text-xs text-muted-foreground", children: v.noScheduleTypes })
2655
+ !u && N.length === 0 && /* @__PURE__ */ e("p", { className: "px-2 py-1 text-xs text-muted-foreground", children: b.noScheduleTypes })
2652
2656
  ] })
2653
2657
  ] }),
2654
2658
  /* @__PURE__ */ e("div", { className: "h-px w-full bg-border/60" }),
2655
2659
  /* @__PURE__ */ n("section", { className: "flex flex-col", children: [
2656
2660
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between px-4 py-3", children: [
2657
- /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: v.participants }),
2661
+ /* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: b.participants }),
2658
2662
  /* @__PURE__ */ e(
2659
2663
  ve,
2660
2664
  {
2661
- checked: T,
2665
+ checked: S,
2662
2666
  onCheckedChange: () => F(),
2663
2667
  className: h(
2664
2668
  "flex h-5 w-5 items-center justify-center rounded border border-border bg-white transition-colors hover:border-primary/50",
2665
- T && "border-primary bg-primary text-primary-foreground"
2669
+ S && "border-primary bg-primary text-primary-foreground"
2666
2670
  ),
2667
- children: T && /* @__PURE__ */ e(pe, { className: "h-3.5 w-3.5" })
2671
+ children: S && /* @__PURE__ */ e(pe, { className: "h-3.5 w-3.5" })
2668
2672
  }
2669
2673
  )
2670
2674
  ] }),
2671
2675
  /* @__PURE__ */ e("div", { className: "px-4 pb-3", children: /* @__PURE__ */ e(
2672
2676
  We,
2673
2677
  {
2674
- value: D,
2678
+ value: C,
2675
2679
  onChange: z,
2676
- placeholder: v.searchParticipants
2680
+ placeholder: b.searchParticipants
2677
2681
  }
2678
2682
  ) }),
2679
2683
  /* @__PURE__ */ n("div", { className: "flex max-h-[400px] flex-col gap-2 overflow-y-auto px-4 pb-4 scrollbar-thin", children: [
2680
- x ? (
2684
+ g ? (
2681
2685
  // Loading skeletons
2682
2686
  Array.from({ length: 4 }).map((o, d) => /* @__PURE__ */ n(
2683
2687
  "div",
@@ -2694,13 +2698,13 @@ function Xr({
2694
2698
  },
2695
2699
  `p-skeleton-${d}`
2696
2700
  ))
2697
- ) : M.map((o) => {
2698
- const d = i.includes(o.id);
2701
+ ) : y.map((o) => {
2702
+ const d = l.includes(o.id);
2699
2703
  return /* @__PURE__ */ n(
2700
2704
  ve,
2701
2705
  {
2702
2706
  checked: d,
2703
- onCheckedChange: (C) => j(o.id, C),
2707
+ onCheckedChange: (k) => L(o.id, k),
2704
2708
  className: h(
2705
2709
  "relative flex w-full cursor-pointer items-start gap-2 rounded-lg border border-border bg-white p-2 transition-colors hover:border-primary/50",
2706
2710
  d && "border-primary bg-zinc-50"
@@ -2743,7 +2747,7 @@ function Xr({
2743
2747
  o.id
2744
2748
  );
2745
2749
  }),
2746
- !x && M.length === 0 && /* @__PURE__ */ e("p", { className: "px-4 text-xs text-muted-foreground", children: v.noParticipants })
2750
+ !g && y.length === 0 && /* @__PURE__ */ e("p", { className: "px-4 text-xs text-muted-foreground", children: b.noParticipants })
2747
2751
  ] })
2748
2752
  ] })
2749
2753
  ]
@@ -2818,20 +2822,20 @@ function vr(t) {
2818
2822
  function wr(t, r) {
2819
2823
  const s = /* @__PURE__ */ new Map();
2820
2824
  for (const a of t) {
2821
- const i = nt(a.startDate), l = s.get(i) ?? [];
2822
- l.push(a), s.set(i, l);
2825
+ const l = nt(a.startDate), c = s.get(l) ?? [];
2826
+ c.push(a), s.set(l, c);
2823
2827
  }
2824
- return Array.from(s.entries()).map(([a, i]) => {
2825
- const l = [...i].sort(
2826
- (f, c) => f.startDate.getTime() - c.startDate.getTime()
2827
- ), m = r > 0 ? l.slice(0, r) : l;
2828
+ return Array.from(s.entries()).map(([a, l]) => {
2829
+ const c = [...l].sort(
2830
+ (f, u) => f.startDate.getTime() - u.startDate.getTime()
2831
+ ), m = r > 0 ? c.slice(0, r) : c;
2828
2832
  return {
2829
2833
  date: new Date(a),
2830
2834
  dateKey: a,
2831
2835
  events: m,
2832
- hasMore: r > 0 && l.length > r
2836
+ hasMore: r > 0 && c.length > r
2833
2837
  };
2834
- }).sort((a, i) => a.date.getTime() - i.date.getTime());
2838
+ }).sort((a, l) => a.date.getTime() - l.date.getTime());
2835
2839
  }
2836
2840
  function br({ event: t, onClick: r, compact: s }) {
2837
2841
  return /* @__PURE__ */ n(
@@ -2920,14 +2924,14 @@ function yr({
2920
2924
  ]
2921
2925
  }
2922
2926
  ),
2923
- /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((i) => /* @__PURE__ */ e(
2927
+ /* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((l) => /* @__PURE__ */ e(
2924
2928
  br,
2925
2929
  {
2926
- event: i,
2930
+ event: l,
2927
2931
  onClick: r,
2928
2932
  compact: a
2929
2933
  },
2930
- i.id
2934
+ l.id
2931
2935
  )) })
2932
2936
  ] });
2933
2937
  }
@@ -2936,29 +2940,29 @@ function Qr({
2936
2940
  daysAhead: r = 7,
2937
2941
  maxEventsPerDay: s = 3,
2938
2942
  onEventClick: a,
2939
- onViewAll: i,
2940
- className: l,
2943
+ onViewAll: l,
2944
+ className: c,
2941
2945
  emptyState: m,
2942
2946
  title: f = "Upcoming",
2943
- showHeader: c = !0,
2944
- compact: x = !1
2947
+ showHeader: u = !0,
2948
+ compact: g = !1
2945
2949
  }) {
2946
- const p = Fe(), N = p?.filteredEvents, v = p?.currentDate ?? /* @__PURE__ */ new Date(), b = t ?? N ?? [], k = I(() => {
2947
- const w = me(v), M = new Date(w);
2948
- return M.setDate(M.getDate() + r), b.filter((L) => L.endDate >= w && L.startDate < M);
2949
- }, [b, r, v]), D = I(
2950
- () => wr(k, s),
2951
- [k, s]
2952
- ), z = k.length;
2953
- return D.length === 0 ? /* @__PURE__ */ n("div", { className: h("rounded-lg border bg-card", l), children: [
2954
- c && /* @__PURE__ */ e(
2950
+ const M = Fe(), x = M?.filteredEvents, b = M?.currentDate ?? /* @__PURE__ */ new Date(), p = t ?? x ?? [], v = I(() => {
2951
+ const N = me(b), y = new Date(N);
2952
+ return y.setDate(y.getDate() + r), p.filter((T) => T.endDate >= N && T.startDate < y);
2953
+ }, [p, r, b]), C = I(
2954
+ () => wr(v, s),
2955
+ [v, s]
2956
+ ), z = v.length;
2957
+ return C.length === 0 ? /* @__PURE__ */ n("div", { className: h("rounded-lg border bg-card", c), children: [
2958
+ u && /* @__PURE__ */ e(
2955
2959
  "div",
2956
2960
  {
2957
2961
  className: h(
2958
2962
  "border-b px-4 flex items-center justify-between",
2959
- x ? "py-2" : "py-3"
2963
+ g ? "py-2" : "py-3"
2960
2964
  ),
2961
- children: /* @__PURE__ */ e("h2", { className: h("font-semibold", x ? "text-sm" : "text-base"), children: f })
2965
+ children: /* @__PURE__ */ e("h2", { className: h("font-semibold", g ? "text-sm" : "text-base"), children: f })
2962
2966
  }
2963
2967
  ),
2964
2968
  /* @__PURE__ */ e(
@@ -2966,7 +2970,7 @@ function Qr({
2966
2970
  {
2967
2971
  className: h(
2968
2972
  "flex flex-col items-center justify-center text-center",
2969
- x ? "py-6 px-4" : "py-10 px-6"
2973
+ g ? "py-6 px-4" : "py-10 px-6"
2970
2974
  ),
2971
2975
  children: m ?? /* @__PURE__ */ n(K, { children: [
2972
2976
  /* @__PURE__ */ e(
@@ -2974,7 +2978,7 @@ function Qr({
2974
2978
  {
2975
2979
  className: h(
2976
2980
  "text-muted-foreground/50 mb-2",
2977
- x ? "size-8" : "size-10"
2981
+ g ? "size-8" : "size-10"
2978
2982
  )
2979
2983
  }
2980
2984
  ),
@@ -2983,7 +2987,7 @@ function Qr({
2983
2987
  {
2984
2988
  className: h(
2985
2989
  "text-muted-foreground",
2986
- x ? "text-xs" : "text-sm"
2990
+ g ? "text-xs" : "text-sm"
2987
2991
  ),
2988
2992
  children: "No upcoming events"
2989
2993
  }
@@ -2991,36 +2995,36 @@ function Qr({
2991
2995
  ] })
2992
2996
  }
2993
2997
  )
2994
- ] }) : /* @__PURE__ */ n("div", { className: h("rounded-lg border bg-card overflow-hidden", l), children: [
2995
- c && /* @__PURE__ */ n(
2998
+ ] }) : /* @__PURE__ */ n("div", { className: h("rounded-lg border bg-card overflow-hidden", c), children: [
2999
+ u && /* @__PURE__ */ n(
2996
3000
  "div",
2997
3001
  {
2998
3002
  className: h(
2999
3003
  "border-b px-4 flex items-center justify-between",
3000
- x ? "py-2" : "py-3"
3004
+ g ? "py-2" : "py-3"
3001
3005
  ),
3002
3006
  children: [
3003
3007
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
3004
- /* @__PURE__ */ e("h2", { className: h("font-semibold", x ? "text-sm" : "text-base"), children: f }),
3008
+ /* @__PURE__ */ e("h2", { className: h("font-semibold", g ? "text-sm" : "text-base"), children: f }),
3005
3009
  /* @__PURE__ */ e(
3006
3010
  "span",
3007
3011
  {
3008
3012
  className: h(
3009
3013
  "text-muted-foreground bg-muted rounded-full px-2",
3010
- x ? "text-[10px] py-0" : "text-xs py-0.5"
3014
+ g ? "text-[10px] py-0" : "text-xs py-0.5"
3011
3015
  ),
3012
3016
  children: z
3013
3017
  }
3014
3018
  )
3015
3019
  ] }),
3016
- i && /* @__PURE__ */ n(
3020
+ l && /* @__PURE__ */ n(
3017
3021
  "button",
3018
3022
  {
3019
3023
  type: "button",
3020
- onClick: () => i(),
3024
+ onClick: () => l(),
3021
3025
  className: h(
3022
3026
  "text-primary hover:underline flex items-center gap-0.5",
3023
- x ? "text-xs" : "text-sm"
3027
+ g ? "text-xs" : "text-sm"
3024
3028
  ),
3025
3029
  children: [
3026
3030
  "View all",
@@ -3036,17 +3040,17 @@ function Qr({
3036
3040
  {
3037
3041
  className: h(
3038
3042
  "divide-y overflow-auto",
3039
- x ? "p-2 max-h-[280px]" : "p-3 max-h-[400px]"
3043
+ g ? "p-2 max-h-[280px]" : "p-3 max-h-[400px]"
3040
3044
  ),
3041
- children: D.map((w) => /* @__PURE__ */ e(
3045
+ children: C.map((N) => /* @__PURE__ */ e(
3042
3046
  yr,
3043
3047
  {
3044
- group: w,
3048
+ group: N,
3045
3049
  onEventClick: a,
3046
- onViewMore: i ? (M) => i(M) : void 0,
3047
- compact: x
3050
+ onViewMore: l ? (y) => l(y) : void 0,
3051
+ compact: g
3048
3052
  },
3049
- w.dateKey
3053
+ N.dateKey
3050
3054
  ))
3051
3055
  }
3052
3056
  )
@@ -3143,8 +3147,8 @@ function Mr(t) {
3143
3147
  return `${r}-${s}-${a}`;
3144
3148
  }
3145
3149
  function Be(t) {
3146
- const r = t.getHours(), s = t.getMinutes(), a = r >= 12 ? "PM" : "AM", i = r % 12 || 12, l = String(s).padStart(2, "0");
3147
- return `${i}:${l} ${a}`;
3150
+ const r = t.getHours(), s = t.getMinutes(), a = r >= 12 ? "PM" : "AM", l = r % 12 || 12, c = String(s).padStart(2, "0");
3151
+ return `${l}:${c} ${a}`;
3148
3152
  }
3149
3153
  function zr(t) {
3150
3154
  const r = Be(t.startDate), s = Be(t.endDate);
@@ -3157,26 +3161,26 @@ function Er(t) {
3157
3161
  function Sr(t) {
3158
3162
  if (J(t)) return "Today";
3159
3163
  if (Er(t)) return "Tomorrow";
3160
- const r = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], s = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], a = r[t.getDay()], i = s[t.getMonth()], l = t.getDate();
3161
- return `${a}, ${i} ${l}`;
3164
+ const r = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], s = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], a = r[t.getDay()], l = s[t.getMonth()], c = t.getDate();
3165
+ return `${a}, ${l} ${c}`;
3162
3166
  }
3163
3167
  function Lr(t, r) {
3164
3168
  const s = /* @__PURE__ */ new Map();
3165
3169
  for (const a of t) {
3166
- const i = Mr(a.startDate), l = s.get(i) ?? [];
3167
- l.push(a), s.set(i, l);
3170
+ const l = Mr(a.startDate), c = s.get(l) ?? [];
3171
+ c.push(a), s.set(l, c);
3168
3172
  }
3169
- return Array.from(s.entries()).map(([a, i]) => {
3170
- const l = [...i].sort(
3171
- (f, c) => f.startDate.getTime() - c.startDate.getTime()
3172
- ), m = r > 0 ? l.slice(0, r) : l;
3173
+ return Array.from(s.entries()).map(([a, l]) => {
3174
+ const c = [...l].sort(
3175
+ (f, u) => f.startDate.getTime() - u.startDate.getTime()
3176
+ ), m = r > 0 ? c.slice(0, r) : c;
3173
3177
  return {
3174
3178
  date: new Date(a),
3175
3179
  dateKey: a,
3176
3180
  events: m,
3177
- hasMore: r > 0 && l.length > r
3181
+ hasMore: r > 0 && c.length > r
3178
3182
  };
3179
- }).sort((a, i) => a.date.getTime() - i.date.getTime());
3183
+ }).sort((a, l) => a.date.getTime() - l.date.getTime());
3180
3184
  }
3181
3185
  function Tr(t) {
3182
3186
  const r = me(/* @__PURE__ */ new Date()), s = Pe(/* @__PURE__ */ new Date());
@@ -3242,22 +3246,22 @@ function Zr({
3242
3246
  isLoading: r = !1,
3243
3247
  className: s,
3244
3248
  daysAhead: a = 7,
3245
- maxEventsPerDay: i = 3,
3246
- onEventClick: l,
3249
+ maxEventsPerDay: l = 3,
3250
+ onEventClick: c,
3247
3251
  onNavigateToAgenda: m
3248
3252
  }) {
3249
- const [f, c] = te(!1), x = I(() => {
3250
- const k = me(/* @__PURE__ */ new Date()), D = _e(k, a);
3251
- return t.filter((z) => z.endDate >= k && z.startDate < D);
3252
- }, [t, a]), p = I(
3253
- () => Lr(x, i),
3254
- [x, i]
3255
- ), N = I(() => Tr(t), [t]), v = (k) => {
3256
- c(!1), l?.(k);
3257
- }, b = () => {
3258
- c(!1), m?.();
3253
+ const [f, u] = te(!1), g = I(() => {
3254
+ const v = me(/* @__PURE__ */ new Date()), C = _e(v, a);
3255
+ return t.filter((z) => z.endDate >= v && z.startDate < C);
3256
+ }, [t, a]), M = I(
3257
+ () => Lr(g, l),
3258
+ [g, l]
3259
+ ), x = I(() => Tr(t), [t]), b = (v) => {
3260
+ u(!1), c?.(v);
3261
+ }, p = () => {
3262
+ u(!1), m?.();
3259
3263
  };
3260
- return /* @__PURE__ */ n(Oe, { open: f, onOpenChange: c, children: [
3264
+ return /* @__PURE__ */ n(Oe, { open: f, onOpenChange: u, children: [
3261
3265
  /* @__PURE__ */ n(
3262
3266
  Ve,
3263
3267
  {
@@ -3267,12 +3271,12 @@ function Zr({
3267
3271
  ),
3268
3272
  children: [
3269
3273
  /* @__PURE__ */ e(Nr, { className: "h-4 w-4" }),
3270
- N > 0 && /* @__PURE__ */ e(
3274
+ x > 0 && /* @__PURE__ */ e(
3271
3275
  ht,
3272
3276
  {
3273
3277
  variant: "destructive",
3274
3278
  className: "absolute -right-4 -top-4 m-3 flex h-5 w-5 items-center justify-center rounded-full bg-primary p-0 text-[10px] font-medium hover:bg-primary",
3275
- children: N > 99 ? "99+" : N
3279
+ children: x > 99 ? "99+" : x
3276
3280
  }
3277
3281
  )
3278
3282
  ]
@@ -3282,13 +3286,13 @@ function Zr({
3282
3286
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between border-b p-4", children: [
3283
3287
  /* @__PURE__ */ n("div", { children: [
3284
3288
  /* @__PURE__ */ e("h3", { className: "text-sm font-semibold", children: "Upcoming" }),
3285
- /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: N > 0 ? `${N} event${N > 1 ? "s" : ""} today` : "No events today" })
3289
+ /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: x > 0 ? `${x} event${x > 1 ? "s" : ""} today` : "No events today" })
3286
3290
  ] }),
3287
3291
  m && /* @__PURE__ */ n(
3288
3292
  "button",
3289
3293
  {
3290
3294
  type: "button",
3291
- onClick: b,
3295
+ onClick: p,
3292
3296
  className: "text-xs text-primary hover:underline flex items-center gap-1",
3293
3297
  children: [
3294
3298
  "View all",
@@ -3297,13 +3301,13 @@ function Zr({
3297
3301
  }
3298
3302
  )
3299
3303
  ] }),
3300
- /* @__PURE__ */ e("div", { className: "max-h-80 overflow-y-auto p-2", children: r ? /* @__PURE__ */ e("div", { className: "space-y-2 p-2", children: Array.from({ length: 3 }).map((k, D) => /* @__PURE__ */ n("div", { className: "flex space-x-3", children: [
3304
+ /* @__PURE__ */ e("div", { className: "max-h-80 overflow-y-auto p-2", children: r ? /* @__PURE__ */ e("div", { className: "space-y-2 p-2", children: Array.from({ length: 3 }).map((v, C) => /* @__PURE__ */ n("div", { className: "flex space-x-3", children: [
3301
3305
  /* @__PURE__ */ e(we, { className: "h-2 w-2 rounded-full mt-2" }),
3302
3306
  /* @__PURE__ */ n("div", { className: "flex-1 space-y-2", children: [
3303
3307
  /* @__PURE__ */ e(we, { className: "h-4 w-full" }),
3304
3308
  /* @__PURE__ */ e(we, { className: "h-3 w-3/4" })
3305
3309
  ] })
3306
- ] }, D)) }) : p.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-8 text-center", children: [
3310
+ ] }, C)) }) : M.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-8 text-center", children: [
3307
3311
  /* @__PURE__ */ e(kr, { className: "mb-2 h-8 w-8 text-muted-foreground/50" }),
3308
3312
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "No upcoming events" }),
3309
3313
  /* @__PURE__ */ n("p", { className: "text-xs text-muted-foreground/70", children: [
@@ -3311,13 +3315,13 @@ function Zr({
3311
3315
  a,
3312
3316
  " days"
3313
3317
  ] })
3314
- ] }) : /* @__PURE__ */ e("div", { className: "space-y-3 divide-y", children: p.map((k) => /* @__PURE__ */ e(
3318
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-3 divide-y", children: M.map((v) => /* @__PURE__ */ e(
3315
3319
  jr,
3316
3320
  {
3317
- group: k,
3318
- onEventClick: v
3321
+ group: v,
3322
+ onEventClick: b
3319
3323
  },
3320
- k.dateKey
3324
+ v.dateKey
3321
3325
  )) }) })
3322
3326
  ] })
3323
3327
  ] });
@@ -3339,4 +3343,4 @@ export {
3339
3343
  Xr as b,
3340
3344
  Vr as c
3341
3345
  };
3342
- //# sourceMappingURL=agenda-dropdown-D8rfvI3Q.js.map
3346
+ //# sourceMappingURL=agenda-dropdown-CXEm80us.js.map