@alfadocs/ui-kit 1.43.0 → 1.45.0

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 (113) hide show
  1. package/dist/_chunks/ai-sparkle-DXeP_6a0.js +52 -0
  2. package/dist/_chunks/{calendar-ChJQzRw-.js → calendar-U6N0F99w.js} +383 -359
  3. package/dist/_chunks/calendar-workspace-B7KvZ1_D.js +12161 -0
  4. package/dist/_chunks/{face-scheme-Dg6ZyLKb.js → face-scheme-Bm6pe7R8.js} +265 -275
  5. package/dist/_chunks/help-me-write-templates-GUeEn3Ff.js +741 -0
  6. package/dist/_chunks/{notes-panel-CRAovkjx.js → notes-panel-Dkk9QPPX.js} +159 -152
  7. package/dist/_chunks/{panel-subview-PMBRPFOa.js → panel-subview-CYnuX-KR.js} +61 -40
  8. package/dist/_chunks/rich-text-editor-BrAvNajV.js +3779 -0
  9. package/dist/_chunks/undo-2-CYNAzclj.js +26 -0
  10. package/dist/_chunks/use-ai-sparkle-CyQSRTCe.js +103 -0
  11. package/dist/_chunks/variables-menu-vXUaSBj4.js +401 -0
  12. package/dist/agent-catalog.json +84 -3
  13. package/dist/agent-i18n/en.json +14 -3
  14. package/dist/components/ai-sparkle/ai-sparkle.d.ts +24 -0
  15. package/dist/components/ai-sparkle/index.d.ts +3 -0
  16. package/dist/components/ai-sparkle/index.js +5 -0
  17. package/dist/components/calendar/calendar.d.ts +6 -0
  18. package/dist/components/calendar/index.js +1 -1
  19. package/dist/components/face-scheme/index.js +1 -1
  20. package/dist/components/index.d.ts +4 -2
  21. package/dist/components/notes-panel/index.js +1 -1
  22. package/dist/components/notes-panel/notes-panel.d.ts +4 -0
  23. package/dist/components/panel-subview/index.js +1 -1
  24. package/dist/components/panel-subview/panel-subview.d.ts +6 -0
  25. package/dist/components/rich-text-editor/editor-toolbar.d.ts +35 -3
  26. package/dist/components/rich-text-editor/index.d.ts +1 -1
  27. package/dist/components/rich-text-editor/index.js +1 -1
  28. package/dist/components/rich-text-editor/rich-text-editor.d.ts +98 -15
  29. package/dist/components/variables-menu/index.d.ts +4 -0
  30. package/dist/components/variables-menu/index.js +6 -0
  31. package/dist/components/variables-menu/variables-menu.agent.d.ts +10 -0
  32. package/dist/components/variables-menu/variables-menu.d.ts +53 -0
  33. package/dist/hooks/index.d.ts +1 -0
  34. package/dist/hooks/index.js +64 -56
  35. package/dist/hooks/use-ai-sparkle.d.ts +109 -0
  36. package/dist/host-compat.css +5 -5
  37. package/dist/i18n/locales/ar.d.ts +77 -6
  38. package/dist/i18n/locales/ar.js +78 -7
  39. package/dist/i18n/locales/de.d.ts +77 -6
  40. package/dist/i18n/locales/de.js +78 -7
  41. package/dist/i18n/locales/el.d.ts +77 -6
  42. package/dist/i18n/locales/el.js +78 -7
  43. package/dist/i18n/locales/en.d.ts +77 -6
  44. package/dist/i18n/locales/en.js +85 -7
  45. package/dist/i18n/locales/es.d.ts +77 -6
  46. package/dist/i18n/locales/es.js +78 -7
  47. package/dist/i18n/locales/fr.d.ts +77 -6
  48. package/dist/i18n/locales/fr.js +78 -7
  49. package/dist/i18n/locales/hi.d.ts +77 -6
  50. package/dist/i18n/locales/hi.js +78 -7
  51. package/dist/i18n/locales/it.d.ts +77 -6
  52. package/dist/i18n/locales/it.js +78 -7
  53. package/dist/i18n/locales/ja.d.ts +77 -6
  54. package/dist/i18n/locales/ja.js +78 -7
  55. package/dist/i18n/locales/nl.d.ts +77 -6
  56. package/dist/i18n/locales/nl.js +78 -7
  57. package/dist/i18n/locales/pl.d.ts +77 -6
  58. package/dist/i18n/locales/pl.js +78 -7
  59. package/dist/i18n/locales/pt.d.ts +77 -6
  60. package/dist/i18n/locales/pt.js +78 -7
  61. package/dist/i18n/locales/ro.d.ts +77 -6
  62. package/dist/i18n/locales/ro.js +78 -7
  63. package/dist/i18n/locales/ru.d.ts +77 -6
  64. package/dist/i18n/locales/ru.js +78 -7
  65. package/dist/i18n/locales/sq.d.ts +77 -6
  66. package/dist/i18n/locales/sq.js +78 -7
  67. package/dist/i18n/locales/sv.d.ts +77 -6
  68. package/dist/i18n/locales/sv.js +78 -7
  69. package/dist/i18n/locales/tr.d.ts +77 -6
  70. package/dist/i18n/locales/tr.js +78 -7
  71. package/dist/i18n/locales/zh.d.ts +77 -6
  72. package/dist/i18n/locales/zh.js +78 -7
  73. package/dist/index.js +1106 -1099
  74. package/dist/locales/ar.json +78 -7
  75. package/dist/locales/de.json +78 -7
  76. package/dist/locales/el.json +78 -7
  77. package/dist/locales/en.json +78 -7
  78. package/dist/locales/es.json +78 -7
  79. package/dist/locales/fr.json +78 -7
  80. package/dist/locales/hi.json +78 -7
  81. package/dist/locales/it.json +78 -7
  82. package/dist/locales/ja.json +78 -7
  83. package/dist/locales/nl.json +78 -7
  84. package/dist/locales/pl.json +78 -7
  85. package/dist/locales/pt.json +78 -7
  86. package/dist/locales/ro.json +78 -7
  87. package/dist/locales/ru.json +78 -7
  88. package/dist/locales/sq.json +78 -7
  89. package/dist/locales/sv.json +78 -7
  90. package/dist/locales/tr.json +78 -7
  91. package/dist/locales/zh.json +78 -7
  92. package/dist/patterns/calendar/calendar-bookings-panel.d.ts +8 -3
  93. package/dist/patterns/calendar/calendar-care-rules.d.ts +49 -0
  94. package/dist/patterns/calendar/calendar-task-editor.d.ts +31 -0
  95. package/dist/patterns/calendar/calendar-workspace.d.ts +8 -1
  96. package/dist/patterns/calendar/calendar-workspace.model.d.ts +39 -12
  97. package/dist/patterns/calendar/calendar.data.d.ts +9 -0
  98. package/dist/patterns/calendar/calendar.journey.d.ts +35 -3
  99. package/dist/patterns/calendar/calendar.model.d.ts +23 -1
  100. package/dist/patterns/calendar/calendar.sheets.d.ts +21 -3
  101. package/dist/patterns/calendar/calendar.surface.d.ts +6 -1
  102. package/dist/patterns/calendar/calendar.types.d.ts +32 -1
  103. package/dist/patterns/calendar/index.js +1 -1
  104. package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts +58 -26
  105. package/dist/patterns/help-me-write-templates/index.d.ts +1 -1
  106. package/dist/patterns/help-me-write-templates/index.js +1 -1
  107. package/dist/tokens.css +6 -6
  108. package/package.json +5 -1
  109. package/dist/_chunks/calendar-workspace-DhXqqu-D.js +0 -11392
  110. package/dist/_chunks/help-me-write-templates-B-m7zgJa.js +0 -775
  111. package/dist/_chunks/highlighter-DSkckT2Q.js +0 -15
  112. package/dist/_chunks/rich-text-editor-DUMeifwc.js +0 -3176
  113. package/dist/_chunks/wand-sparkles-DAjKyhz7.js +0 -27
@@ -1,27 +1,27 @@
1
- import { jsxs as S, jsx as d } from "react/jsx-runtime";
2
- import { forwardRef as He, useRef as p, useEffect as v, useState as le, useMemo as u, useImperativeHandle as er, useCallback as h } from "react";
1
+ import { jsxs as R, jsx as o } from "react/jsx-runtime";
2
+ import { forwardRef as $e, useRef as p, useEffect as h, useState as le, useMemo as u, useImperativeHandle as rr, useCallback as g } from "react";
3
3
  import { useTranslation as xe } from "react-i18next";
4
- import tr from "@fullcalendar/react";
5
- import rr from "@fullcalendar/daygrid";
6
- import nr from "@fullcalendar/timegrid";
7
- import ir from "@fullcalendar/list";
8
- import ar from "@fullcalendar/resource";
9
- import sr from "@fullcalendar/resource-timegrid";
10
- import or from "@fullcalendar/resource-timeline";
11
- import dr from "@fullcalendar/timeline";
12
- import lr from "@fullcalendar/interaction";
13
- import { u as cr } from "./use-prefers-reduced-motion-BMwIQRjB.js";
14
- import { u as ur } from "./registry-DvAUVLHh.js";
15
- import { w as mr, C as fr } from "./calendar-event-card-DKUnT9Be.js";
16
- import { A as pr } from "./avatar-CkDeQOSI.js";
17
- import { B as vr } from "./button-CaUe1uyd.js";
18
- import { R as hr } from "./resource-chip-DYTG0IQQ.js";
19
- import { T as gr } from "./tooltip-Cp-PLePW.js";
20
- import { V as yr } from "./visually-hidden-BHxEUGyT.js";
21
- import { C as je } from "./check-DrFSN__t.js";
22
- import { C as _e } from "./chevron-right-I9AeSxH2.js";
23
- import { C as Ve } from "./chevron-left-B8cOyH-V.js";
24
- const br = {
4
+ import nr from "@fullcalendar/react";
5
+ import ir from "@fullcalendar/daygrid";
6
+ import ar from "@fullcalendar/timegrid";
7
+ import sr from "@fullcalendar/list";
8
+ import or from "@fullcalendar/resource";
9
+ import dr from "@fullcalendar/resource-timegrid";
10
+ import lr from "@fullcalendar/resource-timeline";
11
+ import cr from "@fullcalendar/timeline";
12
+ import ur from "@fullcalendar/interaction";
13
+ import { u as fr } from "./use-prefers-reduced-motion-BMwIQRjB.js";
14
+ import { u as mr } from "./registry-DvAUVLHh.js";
15
+ import { w as pr, C as vr } from "./calendar-event-card-DKUnT9Be.js";
16
+ import { A as hr } from "./avatar-CkDeQOSI.js";
17
+ import { B as gr } from "./button-CaUe1uyd.js";
18
+ import { R as yr } from "./resource-chip-DYTG0IQQ.js";
19
+ import { T as je } from "./tooltip-Cp-PLePW.js";
20
+ import { V as br } from "./visually-hidden-BHxEUGyT.js";
21
+ import { C as _e } from "./check-DrFSN__t.js";
22
+ import { C as Ve } from "./chevron-right-I9AeSxH2.js";
23
+ import { C as He } from "./chevron-left-B8cOyH-V.js";
24
+ const Tr = {
25
25
  id: "calendar",
26
26
  capabilities: ["view_change", "range_navigate", "pick"],
27
27
  state: {
@@ -176,7 +176,7 @@ const br = {
176
176
  description: 'Emitted on every rendered FullCalendar event by the kit event renderer. Used by focusEvent. Cards also carry data-kind="task"|"draft"|"pending-details"|"appointment" and data-status for classification.'
177
177
  }
178
178
  }
179
- }, Tr = {
179
+ }, Dr = {
180
180
  vertical: {
181
181
  Day: "resourceTimeGridDay",
182
182
  ThreeDays: "resourceTimeGridThreeDays",
@@ -187,35 +187,35 @@ const br = {
187
187
  ThreeDays: "resourceTimelineThreeDays",
188
188
  Week: "resourceTimelineWeek"
189
189
  }
190
- }, Dr = /* @__PURE__ */ new Set([
190
+ }, xr = /* @__PURE__ */ new Set([
191
191
  "dayGridMonth",
192
192
  "timeGridWeek",
193
193
  "timeGridThreeDays",
194
194
  "timeGridDay",
195
195
  "listWeek"
196
- ]), xr = {
196
+ ]), Cr = {
197
197
  timeGridDay: "timelineDay",
198
198
  timeGridThreeDays: "timelineThreeDays",
199
199
  timeGridWeek: "timelineWeek"
200
200
  };
201
201
  function be(n, s = "vertical") {
202
- if (Dr.has(n))
203
- return s === "horizontal" ? xr[n] ?? n : n;
204
- const l = n.replace(/^resourceTimeGrid/, "").replace(
202
+ if (xr.has(n))
203
+ return s === "horizontal" ? Cr[n] ?? n : n;
204
+ const c = n.replace(/^resourceTimeGrid/, "").replace(
205
205
  /(Chair|Operator)$/,
206
206
  ""
207
207
  );
208
- return Tr[s][l];
208
+ return Dr[s][c];
209
209
  }
210
210
  const de = {
211
211
  weekday: "long",
212
212
  day: "numeric",
213
213
  month: "long",
214
214
  year: "numeric"
215
- }, Cr = [
215
+ }, wr = [
216
216
  { weekday: "short", day: "numeric", month: "short" },
217
217
  { hour: "numeric", minute: "2-digit" }
218
- ], wr = {
218
+ ], Ar = {
219
219
  resourceTimeGridThreeDays: {
220
220
  type: "resourceTimeGrid",
221
221
  duration: { days: 3 }
@@ -234,80 +234,80 @@ const de = {
234
234
  type: "timeline",
235
235
  duration: { days: 3 }
236
236
  },
237
- timeline: { slotLabelFormat: Cr },
237
+ timeline: { slotLabelFormat: wr },
238
238
  timeGridDay: { titleFormat: de },
239
239
  resourceTimeGridDay: { titleFormat: de },
240
240
  timelineDay: { titleFormat: de },
241
241
  resourceTimelineDay: { titleFormat: de }
242
- }, Te = 5, Ar = {
242
+ }, Te = 5, kr = {
243
243
  create: "calendar.modeBanner.create",
244
244
  move: "calendar.modeBanner.move",
245
245
  copy: "calendar.modeBanner.copy"
246
246
  };
247
- function kr(n) {
247
+ function Ir(n) {
248
248
  try {
249
- const s = new Intl.Locale(n), o = typeof s.getWeekInfo == "function" ? s.getWeekInfo() : s.weekInfo;
250
- if (o && typeof o.firstDay == "number")
251
- return o.firstDay % 7;
249
+ const s = new Intl.Locale(n), d = typeof s.getWeekInfo == "function" ? s.getWeekInfo() : s.weekInfo;
250
+ if (d && typeof d.firstDay == "number")
251
+ return d.firstDay % 7;
252
252
  } catch {
253
253
  }
254
254
  return n.startsWith("en-US") || n.startsWith("he") || n.startsWith("ar-SA") ? 0 : 1;
255
255
  }
256
- const De = "calendar-col-hidden", Ir = "calendar-col-loading";
256
+ const De = "calendar-col-hidden", Sr = "calendar-col-loading";
257
257
  function F(n) {
258
- const s = n.getFullYear(), o = String(n.getMonth() + 1).padStart(2, "0"), l = String(n.getDate()).padStart(2, "0");
259
- return `${s}-${o}-${l}`;
258
+ const s = n.getFullYear(), d = String(n.getMonth() + 1).padStart(2, "0"), c = String(n.getDate()).padStart(2, "0");
259
+ return `${s}-${d}-${c}`;
260
260
  }
261
- function Sr(n, s) {
262
- const o = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map(), f = (n == null ? void 0 : n.length) ?? 0;
261
+ function Rr(n, s) {
262
+ const d = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map(), m = (n == null ? void 0 : n.length) ?? 0;
263
263
  if (n && s) {
264
264
  for (const T of n)
265
265
  if (T.hiddenDates)
266
- for (const g of T.hiddenDates) {
267
- const A = `${T.id}:${g}`;
268
- o.has(A) || (o.add(A), l.set(g, (l.get(g) ?? 0) + 1));
266
+ for (const y of T.hiddenDates) {
267
+ const A = `${T.id}:${y}`;
268
+ d.has(A) || (d.add(A), c.set(y, (c.get(y) ?? 0) + 1));
269
269
  }
270
270
  }
271
271
  return {
272
- hiddenCells: o,
273
- hiddenCountByDate: l,
274
- resourceCount: f,
275
- active: o.size > 0
272
+ hiddenCells: d,
273
+ hiddenCountByDate: c,
274
+ resourceCount: m,
275
+ active: d.size > 0
276
276
  };
277
277
  }
278
- function Rr() {
279
- const { i18n: n } = xe(), [s, o] = le(() => {
278
+ function Er() {
279
+ const { i18n: n } = xe(), [s, d] = le(() => {
280
280
  if (typeof document > "u") return !1;
281
- const l = document.documentElement.getAttribute("dir"), f = typeof n.dir == "function" ? n.dir() : "ltr";
282
- return l === "rtl" || f === "rtl";
281
+ const c = document.documentElement.getAttribute("dir"), m = typeof n.dir == "function" ? n.dir() : "ltr";
282
+ return c === "rtl" || m === "rtl";
283
283
  });
284
- return v(() => {
284
+ return h(() => {
285
285
  if (typeof document > "u") return;
286
- const l = new MutationObserver(() => {
287
- const f = document.documentElement.getAttribute("dir"), T = typeof n.dir == "function" ? n.dir() : "ltr";
288
- o(f === "rtl" || T === "rtl");
286
+ const c = new MutationObserver(() => {
287
+ const m = document.documentElement.getAttribute("dir"), T = typeof n.dir == "function" ? n.dir() : "ltr";
288
+ d(m === "rtl" || T === "rtl");
289
289
  });
290
- return l.observe(document.documentElement, {
290
+ return c.observe(document.documentElement, {
291
291
  attributes: !0,
292
292
  attributeFilter: ["dir", "lang"]
293
- }), () => l.disconnect();
293
+ }), () => c.disconnect();
294
294
  }, [n]), s;
295
295
  }
296
- function Er(n, s) {
297
- const o = n.event.start, l = n.event.end ?? n.event.start;
298
- if (!(!o || !l))
296
+ function qe(n, s) {
297
+ const d = n.event.start, c = n.event.end ?? n.event.start;
298
+ if (!(!d || !c))
299
299
  try {
300
- const f = new Intl.DateTimeFormat(s, {
300
+ const m = new Intl.DateTimeFormat(s, {
301
301
  hour: "2-digit",
302
302
  minute: "2-digit",
303
303
  hour12: !1
304
304
  });
305
- return typeof f.formatRange == "function" ? f.formatRange(o, l) : `${f.format(o)} – ${f.format(l)}`;
305
+ return typeof m.formatRange == "function" ? m.formatRange(d, c) : `${m.format(d)} – ${m.format(c)}`;
306
306
  } catch {
307
307
  return;
308
308
  }
309
309
  }
310
- const qe = [
310
+ const Ke = [
311
311
  "ds:inline-flex ds:items-center ds:justify-center",
312
312
  "ds:min-h-[var(--min-target-size)]",
313
313
  "ds:bg-[var(--background)] ds:text-[var(--foreground)]",
@@ -320,15 +320,15 @@ const qe = [
320
320
  "ds:focus-visible:outline-[var(--ring)]",
321
321
  "ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
322
322
  "ds:motion-reduce:transition-none"
323
- ].join(" "), Pr = [
324
- qe,
325
- "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]"
326
323
  ].join(" "), Nr = [
327
- qe,
324
+ Ke,
325
+ "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]"
326
+ ].join(" "), Pr = [
327
+ Ke,
328
328
  "ds:min-w-[var(--min-target-size)]"
329
- ].join(" "), Ce = He(
330
- ({ title: n, onToday: s, onPrev: o, onNext: l, end: f, className: T, maskClassName: g }, A) => {
331
- const { t: W } = xe(), Z = Rr(), D = Z ? _e : Ve, Q = Z ? Ve : _e, j = [
329
+ ].join(" "), Ce = $e(
330
+ ({ title: n, onToday: s, onPrev: d, onNext: c, end: m, className: T, maskClassName: y }, A) => {
331
+ const { t: W } = xe(), Z = Er(), D = Z ? Ve : He, Q = Z ? He : Ve, j = [
332
332
  "ds:calendar-toolbar",
333
333
  "ds:sticky ds:top-0 ds:z-20",
334
334
  "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
@@ -337,13 +337,13 @@ const qe = [
337
337
  "ds:bg-[var(--background)]",
338
338
  "ds:border-b ds:border-[var(--border)]",
339
339
  T
340
- ].filter(Boolean).join(" "), _ = [Pr, g].filter(Boolean).join(" "), N = [Nr, g].filter(Boolean).join(" "), G = [
340
+ ].filter(Boolean).join(" "), _ = [Nr, y].filter(Boolean).join(" "), P = [Pr, y].filter(Boolean).join(" "), G = [
341
341
  "ds:flex-1 ds:text-center ds:truncate type-title-card",
342
- g
343
- ].filter(Boolean).join(" "), x = ["ds:flex-1 ds:text-center", g].filter(Boolean).join(" ");
344
- return /* @__PURE__ */ S("div", { ref: A, className: j, children: [
345
- /* @__PURE__ */ S("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
346
- /* @__PURE__ */ d(
342
+ y
343
+ ].filter(Boolean).join(" "), x = ["ds:flex-1 ds:text-center", y].filter(Boolean).join(" ");
344
+ return /* @__PURE__ */ R("div", { ref: A, className: j, children: [
345
+ /* @__PURE__ */ R("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
346
+ /* @__PURE__ */ o(
347
347
  "button",
348
348
  {
349
349
  type: "button",
@@ -352,49 +352,49 @@ const qe = [
352
352
  children: W("calendar.today")
353
353
  }
354
354
  ),
355
- /* @__PURE__ */ d(
355
+ /* @__PURE__ */ o(
356
356
  "button",
357
357
  {
358
358
  type: "button",
359
- onClick: o,
359
+ onClick: d,
360
360
  "aria-label": W("calendar.previousPeriod"),
361
- className: N,
362
- children: /* @__PURE__ */ d(D, { size: 16, "aria-hidden": "true" })
361
+ className: P,
362
+ children: /* @__PURE__ */ o(D, { size: 16, "aria-hidden": "true" })
363
363
  }
364
364
  ),
365
- /* @__PURE__ */ d(
365
+ /* @__PURE__ */ o(
366
366
  "button",
367
367
  {
368
368
  type: "button",
369
- onClick: l,
369
+ onClick: c,
370
370
  "aria-label": W("calendar.nextPeriod"),
371
- className: N,
372
- children: /* @__PURE__ */ d(Q, { size: 16, "aria-hidden": "true" })
371
+ className: P,
372
+ children: /* @__PURE__ */ o(Q, { size: 16, "aria-hidden": "true" })
373
373
  }
374
374
  )
375
375
  ] }),
376
- n ? /* @__PURE__ */ d("h2", { "aria-live": "polite", className: G, children: n }) : (
376
+ n ? /* @__PURE__ */ o("h2", { "aria-live": "polite", className: G, children: n }) : (
377
377
  /* Keep the centering slot stable even before the first
378
378
  `datesSet` populates the title — an empty <h2> would trip
379
379
  axe's `empty-heading` rule, so we substitute a decorative
380
380
  spacer that matches the h2's flex sizing. Once `title` is
381
381
  non-empty the h2 renders in the same slot. */
382
- /* @__PURE__ */ d("div", { "aria-hidden": "true", className: x })
382
+ /* @__PURE__ */ o("div", { "aria-hidden": "true", className: x })
383
383
  ),
384
- f ? /* @__PURE__ */ d("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: f }) : null
384
+ m ? /* @__PURE__ */ o("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: m }) : null
385
385
  ] });
386
386
  }
387
387
  );
388
388
  Ce.displayName = "Calendar.Toolbar";
389
- const $e = He(
389
+ const Ue = $e(
390
390
  ({
391
391
  id: n,
392
392
  events: s,
393
- resources: o,
394
- view: l = "dayGridMonth",
395
- initialDate: f,
393
+ resources: d,
394
+ view: c = "dayGridMonth",
395
+ initialDate: m,
396
396
  locale: T,
397
- onEventDrop: g,
397
+ onEventDrop: y,
398
398
  onEventResize: A,
399
399
  onEventDragStart: W,
400
400
  onEventResizeStart: Z,
@@ -402,76 +402,76 @@ const $e = He(
402
402
  onBackgroundEventClick: Q,
403
403
  onEventMouseEnter: j,
404
404
  onEventMouseLeave: _,
405
- onDateSelect: N,
405
+ onDateSelect: P,
406
406
  onDatesSet: G,
407
407
  onDateClick: x,
408
408
  onNavLinkDayClick: we,
409
409
  editable: ee = !1,
410
- eventDurationEditable: Ke,
410
+ eventDurationEditable: Ye,
411
411
  selectable: Ae = !1,
412
- selectMirror: Ue,
412
+ selectMirror: Xe,
413
413
  unselectAuto: ke,
414
- height: Ye,
415
- className: Xe,
416
- privacyMode: y = !1,
417
- eventColorStyle: Je = "solid",
414
+ height: Je,
415
+ className: Ze,
416
+ privacyMode: b = !1,
417
+ eventColorStyle: Qe = "solid",
418
418
  mode: te = "default",
419
- modeLabel: Ze,
419
+ modeLabel: et,
420
420
  modeBannerColor: re,
421
421
  modeBannerTextColor: ne,
422
422
  onModeCancel: Ie,
423
- alertBanner: Qe,
423
+ alertBanner: tt,
424
424
  hiddenDays: Se,
425
425
  loadingDates: Re,
426
- slotMinTime: et,
427
- slotMaxTime: tt,
428
- slotDuration: rt,
426
+ slotMinTime: rt,
427
+ slotMaxTime: nt,
428
+ slotDuration: it,
429
429
  snapDuration: Ee,
430
- showTime: nt = !0,
430
+ showTime: at = !0,
431
431
  datesAboveResources: ce = !0,
432
- slotEventOverlap: it = !1,
433
- stickyHeaderDates: at = !0,
434
- nowIndicator: st = !0,
435
- dayMaxEvents: ot = !0,
436
- schedulerLicenseKey: dt = void 0,
437
- toolbar: lt = !0,
438
- toolbarEnd: ct,
432
+ slotEventOverlap: st = !1,
433
+ stickyHeaderDates: ot = !0,
434
+ nowIndicator: dt = !0,
435
+ dayMaxEvents: lt = !0,
436
+ schedulerLicenseKey: ct = void 0,
437
+ toolbar: ut = !0,
438
+ toolbarEnd: ft,
439
439
  resourceLayout: V = "vertical",
440
440
  showResourceInitials: ue = !1,
441
- resourceLabelVariant: Pe = "text",
442
- verticalResourceLabels: me = !1,
443
- selectedEventId: Ne,
444
- availabilityMode: ut = !1,
445
- resourceAreaWidth: mt,
441
+ resourceLabelVariant: Ne = "text",
442
+ verticalResourceLabels: fe = !1,
443
+ selectedEventId: Pe,
444
+ availabilityMode: mt = !1,
445
+ resourceAreaWidth: pt,
446
446
  resourceAreaHeader: H,
447
447
  defaultTimedEventDuration: q,
448
- zebraRows: ft = !1,
449
- maskClassName: M
450
- }, pt) => {
451
- const { t: m, i18n: B } = xe(), C = p(null), k = p(null), w = p(null), I = p(null), L = p(null), Ge = p(null), ie = p({
448
+ zebraRows: vt = !1,
449
+ maskClassName: B
450
+ }, ht) => {
451
+ const { t: f, i18n: M } = xe(), C = p(null), k = p(null), w = p(null), I = p(null), L = p(null), Ge = p(null), ie = p({
452
452
  id: 0,
453
453
  x: 0,
454
454
  y: 0
455
- }), Me = p(0), Be = p(0), R = T ?? B.language ?? "en";
456
- v(() => {
457
- }, [Se]), v(() => {
455
+ }), Be = p(0), Me = p(0), S = T ?? M.language ?? "en";
456
+ h(() => {
457
+ }, [Se]), h(() => {
458
458
  }, [q]);
459
- const [vt, ht] = le(() => {
459
+ const [gt, yt] = le(() => {
460
460
  if (typeof document > "u") return "ltr";
461
- const e = document.documentElement.getAttribute("dir"), t = typeof B.dir == "function" ? B.dir() : "ltr";
461
+ const e = document.documentElement.getAttribute("dir"), t = typeof M.dir == "function" ? M.dir() : "ltr";
462
462
  return e === "rtl" || t === "rtl" ? "rtl" : "ltr";
463
463
  });
464
- v(() => {
464
+ h(() => {
465
465
  if (typeof document > "u") return;
466
466
  const e = new MutationObserver(() => {
467
- const t = document.documentElement.getAttribute("dir"), r = typeof B.dir == "function" ? B.dir() : "ltr";
468
- ht(t === "rtl" || r === "rtl" ? "rtl" : "ltr");
467
+ const t = document.documentElement.getAttribute("dir"), r = typeof M.dir == "function" ? M.dir() : "ltr";
468
+ yt(t === "rtl" || r === "rtl" ? "rtl" : "ltr");
469
469
  });
470
470
  return e.observe(document.documentElement, {
471
471
  attributes: !0,
472
472
  attributeFilter: ["dir", "lang"]
473
473
  }), () => e.disconnect();
474
- }, [B]), v(() => {
474
+ }, [M]), h(() => {
475
475
  if (typeof document > "u") return;
476
476
  let e;
477
477
  const t = new MutationObserver(() => {
@@ -487,14 +487,14 @@ const $e = He(
487
487
  }), () => {
488
488
  clearTimeout(e), t.disconnect();
489
489
  };
490
- }, []), v(() => {
490
+ }, []), h(() => {
491
491
  const e = k.current;
492
492
  if (!e || typeof ResizeObserver > "u") return;
493
493
  let t = 0, r = e.getBoundingClientRect().width;
494
494
  const i = new ResizeObserver((a) => {
495
495
  var U, Y;
496
- const c = a[0], b = ((Y = (U = c == null ? void 0 : c.borderBoxSize) == null ? void 0 : U[0]) == null ? void 0 : Y.inlineSize) ?? (c == null ? void 0 : c.contentRect.width) ?? e.getBoundingClientRect().width;
497
- b !== r && (r = b, cancelAnimationFrame(t), t = requestAnimationFrame(() => {
496
+ const l = a[0], v = ((Y = (U = l == null ? void 0 : l.borderBoxSize) == null ? void 0 : U[0]) == null ? void 0 : Y.inlineSize) ?? (l == null ? void 0 : l.contentRect.width) ?? e.getBoundingClientRect().width;
497
+ v !== r && (r = v, cancelAnimationFrame(t), t = requestAnimationFrame(() => {
498
498
  var X, J;
499
499
  (J = (X = C.current) == null ? void 0 : X.getApi()) == null || J.updateSize();
500
500
  }));
@@ -502,7 +502,7 @@ const $e = He(
502
502
  return i.observe(e), () => {
503
503
  cancelAnimationFrame(t), i.disconnect();
504
504
  };
505
- }, []), v(() => {
505
+ }, []), h(() => {
506
506
  if (typeof document > "u") return;
507
507
  const e = k.current;
508
508
  if (!e) return;
@@ -527,12 +527,12 @@ const $e = He(
527
527
  attributes: !0,
528
528
  attributeFilter: ["aria-hidden"]
529
529
  }), () => r.disconnect();
530
- }, [m]);
531
- const ae = cr(), [gt, yt] = le(""), [O, bt] = le(
532
- () => be(l, V)
530
+ }, [f]);
531
+ const ae = fr(), [bt, Tt] = le(""), [O, Dt] = le(
532
+ () => be(c, V)
533
533
  ), Le = p(O);
534
534
  Le.current = O;
535
- const fe = u(() => {
535
+ const me = u(() => {
536
536
  const e = () => {
537
537
  var t;
538
538
  return (t = C.current) == null ? void 0 : t.getApi();
@@ -585,9 +585,9 @@ const $e = He(
585
585
  behavior: ae ? "auto" : "smooth",
586
586
  block: "center"
587
587
  }), a.classList.add("calendar-event-focused"), L.current = a, w.current) {
588
- const c = a.getAttribute("aria-label") ?? t, b = y ? "•••" : c;
589
- w.current.textContent = m("calendar.focusedEvent", {
590
- title: b
588
+ const l = a.getAttribute("aria-label") ?? t, v = b ? "•••" : l;
589
+ w.current.textContent = f("calendar.focusedEvent", {
590
+ title: v
591
591
  });
592
592
  }
593
593
  I.current = setTimeout(() => {
@@ -596,22 +596,22 @@ const $e = He(
596
596
  }
597
597
  }
598
598
  };
599
- }, [ae, y, m, V]);
600
- er(pt, () => fe, [fe]), ur(br, fe, n), v(
599
+ }, [ae, b, f, V]);
600
+ rr(ht, () => me, [me]), mr(Tr, me, n), h(
601
601
  () => () => {
602
602
  I.current && (clearTimeout(I.current), I.current = null);
603
603
  },
604
604
  []
605
605
  );
606
606
  const Oe = p(!0);
607
- v(() => {
607
+ h(() => {
608
608
  if (Oe.current) {
609
609
  Oe.current = !1;
610
610
  return;
611
611
  }
612
- w.current && (w.current.textContent = m(y ? "calendar.privacyModeOn" : "calendar.privacyModeOff"));
613
- }, [y, m]);
614
- const Tt = u(
612
+ w.current && (w.current.textContent = f(b ? "calendar.privacyModeOn" : "calendar.privacyModeOff"));
613
+ }, [b, f]);
614
+ const xt = u(
615
615
  () => s.map((e) => ({
616
616
  id: e.id,
617
617
  title: e.title,
@@ -667,28 +667,29 @@ const $e = He(
667
667
  isDraft: e.isDraft ?? !1,
668
668
  detailsPending: e.detailsPending ?? !1,
669
669
  patientId: e.patientId,
670
- operatorId: e.operatorId
670
+ operatorId: e.operatorId,
671
+ optionCount: e.optionCount
671
672
  }
672
673
  })),
673
674
  [s]
674
- ), Dt = u(
675
+ ), Ct = u(
675
676
  () => ({
676
677
  year: "numeric",
677
678
  month: "long"
678
679
  }),
679
680
  []
680
- ), xt = u(
681
+ ), wt = u(
681
682
  () => ({
682
683
  weekday: "short"
683
684
  }),
684
685
  []
685
- ), Ct = u(
686
+ ), At = u(
686
687
  () => ({
687
688
  hour: "numeric",
688
689
  minute: "2-digit"
689
690
  }),
690
691
  []
691
- ), wt = u(
692
+ ), kt = u(
692
693
  () => ({
693
694
  hour: "2-digit",
694
695
  minute: "2-digit",
@@ -702,46 +703,46 @@ const $e = He(
702
703
  [Re]
703
704
  ), pe = p(E);
704
705
  pe.current = E;
705
- const ve = p(!1), At = h(
706
+ const ve = p(!1), It = g(
706
707
  (e) => {
707
- const t = new Intl.DateTimeFormat(R, {
708
+ const t = new Intl.DateTimeFormat(S, {
708
709
  weekday: "short"
709
710
  }).format(e.date);
710
711
  if (e.view.type === "dayGridMonth" || e.view.type.startsWith("list"))
711
712
  return t;
712
- const r = new Intl.DateTimeFormat(R, {
713
+ const r = new Intl.DateTimeFormat(S, {
713
714
  day: "numeric"
714
715
  }).format(e.date);
715
- return /* @__PURE__ */ S("span", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-2xs)] ds:py-[var(--spacing-2xs)]", children: [
716
- /* @__PURE__ */ d("span", { className: "type-eyebrow ds:text-[color:var(--muted-foreground)]", children: t }),
717
- /* @__PURE__ */ d(
716
+ return /* @__PURE__ */ R("span", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-2xs)] ds:py-[var(--spacing-2xs)]", children: [
717
+ /* @__PURE__ */ o("span", { className: "type-eyebrow ds:text-[color:var(--muted-foreground)]", children: t }),
718
+ /* @__PURE__ */ o(
718
719
  "span",
719
720
  {
720
721
  className: e.isToday ? "ds:flex ds:size-7 ds:items-center ds:justify-center ds:rounded-full ds:bg-[var(--primary)] ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-semibold)] ds:leading-none ds:text-[color:var(--primary-foreground)]" : "ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-semibold)] ds:leading-none",
721
722
  children: r
722
723
  }
723
724
  ),
724
- E.has(F(e.date)) ? /* @__PURE__ */ d(yr, { children: m("calendar.loadingDay") }) : null
725
+ E.has(F(e.date)) ? /* @__PURE__ */ o(br, { children: f("calendar.loadingDay") }) : null
725
726
  ] });
726
727
  },
727
- [R, E, m]
728
+ [S, E, f]
728
729
  ), ze = u(
729
730
  () => typeof q == "number" ? { minutes: q } : q,
730
731
  [q]
731
732
  ), he = u(
732
- () => M ? M.split(/\s+/).filter(Boolean) : void 0,
733
- [M]
734
- ), kt = u(() => {
733
+ () => B ? B.split(/\s+/).filter(Boolean) : void 0,
734
+ [B]
735
+ ), St = u(() => {
735
736
  if (H !== void 0)
736
- return H === "chairs" ? m("calendar.resourceLabel.chairs") : H === "operators" ? m("calendar.resourceLabel.operators") : H;
737
- }, [H, m]), se = u(
738
- () => Sr(o, ce),
739
- [o, ce]
737
+ return H === "chairs" ? f("calendar.resourceLabel.chairs") : H === "operators" ? f("calendar.resourceLabel.operators") : H;
738
+ }, [H, f]), se = u(
739
+ () => Rr(d, ce),
740
+ [d, ce]
740
741
  ), z = p(se);
741
742
  z.current = se;
742
- const ge = p(!1), It = h(
743
+ const ge = p(!1), Rt = g(
743
744
  (e) => {
744
- const t = E.has(F(e.date)) ? [Ir] : [], r = z.current;
745
+ const t = E.has(F(e.date)) ? [Sr] : [], r = z.current;
745
746
  if (!r.active || !e.view.type.startsWith("resourceTimeGrid"))
746
747
  return t;
747
748
  const i = e.resource;
@@ -750,7 +751,7 @@ const $e = He(
750
751
  ) ? [...t, De] : t;
751
752
  },
752
753
  [E]
753
- ), St = h(
754
+ ), Et = g(
754
755
  (e) => {
755
756
  const t = z.current;
756
757
  if (!t.active || !e.view.type.startsWith("resourceTimeGrid"))
@@ -761,13 +762,13 @@ const $e = He(
761
762
  ) ? [De] : [];
762
763
  },
763
764
  []
764
- ), Rt = h(
765
+ ), Nt = g(
765
766
  (e) => {
766
767
  const t = z.current;
767
768
  return !t.active || !e.view.type.startsWith("resourceTimeGrid") ? [] : (t.hiddenCountByDate.get(F(e.date)) ?? 0) >= t.resourceCount ? [De] : [];
768
769
  },
769
770
  []
770
- ), Et = h((e) => {
771
+ ), Pt = g((e) => {
771
772
  const t = z.current;
772
773
  if (!t.active || !e.view.type.startsWith("resourceTimeGrid"))
773
774
  return;
@@ -775,9 +776,9 @@ const $e = He(
775
776
  if (!(r instanceof HTMLTableCellElement) || !r.classList.contains("fc-day")) return;
776
777
  const i = r.getAttribute("data-date");
777
778
  if (!i) return;
778
- const a = t.hiddenCountByDate.get(i) ?? 0, c = Math.max(1, t.resourceCount - a);
779
- r.colSpan !== c && (r.colSpan = c, ge.current = !0);
780
- }, []), $ = h(() => {
779
+ const a = t.hiddenCountByDate.get(i) ?? 0, l = Math.max(1, t.resourceCount - a);
780
+ r.colSpan !== l && (r.colSpan = l, ge.current = !0);
781
+ }, []), $ = g(() => {
781
782
  const e = k.current;
782
783
  if (!e || !Le.current.startsWith("resourceTimeGrid")) return;
783
784
  const t = z.current;
@@ -786,10 +787,10 @@ const $e = He(
786
787
  ).forEach((r) => {
787
788
  const i = r.getAttribute("data-date");
788
789
  if (!i) return;
789
- const a = t.active ? t.hiddenCountByDate.get(i) ?? 0 : 0, c = Math.max(1, t.resourceCount - a);
790
- r.colSpan !== c && (r.colSpan = c);
790
+ const a = t.active ? t.hiddenCountByDate.get(i) ?? 0 : 0, l = Math.max(1, t.resourceCount - a);
791
+ r.colSpan !== l && (r.colSpan = l);
791
792
  }), ge.current = t.active);
792
- }, []), K = h(() => {
793
+ }, []), K = g(() => {
793
794
  const e = k.current;
794
795
  if (!e) return;
795
796
  const t = pe.current;
@@ -797,12 +798,12 @@ const $e = He(
797
798
  const i = r.getAttribute("data-date");
798
799
  i && t.has(i) ? r.setAttribute("aria-busy", "true") : r.removeAttribute("aria-busy");
799
800
  }), ve.current = t.size > 0);
800
- }, []), Pt = h((e) => {
801
+ }, []), Gt = g((e) => {
801
802
  pe.current.has(F(e.date)) && (e.el.setAttribute("aria-busy", "true"), ve.current = !0);
802
803
  }, []);
803
- v(() => {
804
+ h(() => {
804
805
  }, [s, se]);
805
- const P = (e) => {
806
+ const N = (e) => {
806
807
  const t = e.extendedProps ?? {};
807
808
  return {
808
809
  id: e.id,
@@ -830,29 +831,30 @@ const $e = He(
830
831
  editable: t.editable,
831
832
  startEditable: t.startEditable,
832
833
  patientId: t.patientId,
833
- operatorId: t.operatorId
834
+ operatorId: t.operatorId,
835
+ optionCount: t.optionCount
834
836
  };
835
- }, Nt = u(() => {
836
- if (g)
837
+ }, Bt = u(() => {
838
+ if (y)
837
839
  return (e) => {
838
840
  var r, i;
839
841
  if (!e.event.start) return;
840
842
  const t = e.oldEvent.start;
841
- if (t && (g({
842
- event: P(e.event),
843
+ if (t && (y({
844
+ event: N(e.event),
843
845
  oldStart: t,
844
846
  newStart: e.event.start,
845
847
  oldResourceId: (r = e.oldResource) == null ? void 0 : r.id,
846
848
  newResourceId: (i = e.newResource) == null ? void 0 : i.id,
847
849
  revert: e.revert
848
850
  }), w.current)) {
849
- const a = e.event.extendedProps ?? {}, c = y ? a.privacyModeTitle ?? "•••" : e.event.title;
850
- w.current.textContent = m("calendar.eventMoved", {
851
- title: c
851
+ const a = e.event.extendedProps ?? {}, l = b ? a.privacyModeTitle ?? "•••" : e.event.title;
852
+ w.current.textContent = f("calendar.eventMoved", {
853
+ title: l
852
854
  });
853
855
  }
854
856
  };
855
- }, [g, y, m]), Gt = u(() => {
857
+ }, [y, b, f]), Mt = u(() => {
856
858
  if (A)
857
859
  return (e) => {
858
860
  if (!e.event.end) return;
@@ -861,69 +863,69 @@ const $e = He(
861
863
  return;
862
864
  const r = e.event.end, i = e.event.start ?? e.oldEvent.start ?? t;
863
865
  if (A({
864
- event: P(e.event),
866
+ event: N(e.event),
865
867
  oldEnd: t,
866
868
  newEnd: r,
867
869
  revert: e.revert
868
870
  }), w.current) {
869
871
  const a = Math.round(
870
872
  (r.getTime() - i.getTime()) / 6e4
871
- ), c = e.event.extendedProps ?? {}, b = y ? c.privacyModeTitle ?? "•••" : e.event.title;
872
- w.current.textContent = m("calendar.eventResized", {
873
- title: b,
873
+ ), l = e.event.extendedProps ?? {}, v = b ? l.privacyModeTitle ?? "•••" : e.event.title;
874
+ w.current.textContent = f("calendar.eventResized", {
875
+ title: v,
874
876
  duration: a
875
877
  });
876
878
  }
877
879
  };
878
- }, [A, y, m]), Mt = u(() => {
880
+ }, [A, b, f]), Lt = u(() => {
879
881
  if (D)
880
882
  return (e) => {
881
- e.event.start && (Ge.current = e.jsEvent, D(P(e.event), {
883
+ e.event.start && (Ge.current = e.jsEvent, D(N(e.event), {
882
884
  el: e.el,
883
885
  jsEvent: e.jsEvent
884
886
  }));
885
887
  };
886
- }, [D]), Bt = u(() => {
888
+ }, [D]), Ot = u(() => {
887
889
  if (j)
888
890
  return (e) => {
889
891
  if (!e.event.start || e.event.display === "background") return;
890
892
  const t = e.event.extendedProps ?? {};
891
- t.isDraft || t.detailsPending || j(P(e.event), {
893
+ t.isDraft || t.detailsPending || j(N(e.event), {
892
894
  el: e.el,
893
895
  jsEvent: e.jsEvent
894
896
  });
895
897
  };
896
- }, [j]), Lt = u(() => {
898
+ }, [j]), zt = u(() => {
897
899
  if (_)
898
900
  return (e) => {
899
- e.event.start && e.event.display !== "background" && _(P(e.event));
901
+ e.event.start && e.event.display !== "background" && _(N(e.event));
900
902
  };
901
- }, [_]), Ot = u(() => {
902
- if (N)
903
+ }, [_]), Ft = u(() => {
904
+ if (P)
903
905
  return (e) => {
904
906
  var t;
905
- N({
907
+ P({
906
908
  start: e.start,
907
909
  end: e.end,
908
910
  allDay: e.allDay,
909
911
  resourceId: (t = e.resource) == null ? void 0 : t.id
910
912
  });
911
913
  };
912
- }, [N]), zt = u(() => {
914
+ }, [P]), Wt = u(() => {
913
915
  if (x)
914
916
  return (e) => {
915
917
  var r;
916
918
  const t = ie.current.id;
917
- t !== 0 && Be.current === t || (t !== 0 && (Me.current = t), x({
919
+ t !== 0 && Me.current === t || (t !== 0 && (Be.current = t), x({
918
920
  date: e.date,
919
921
  allDay: e.allDay,
920
922
  resourceId: (r = e.resource) == null ? void 0 : r.id
921
923
  }));
922
924
  };
923
- }, [x]), Ft = h(
925
+ }, [x]), jt = g(
924
926
  (e) => {
925
- yt(e.view.title), bt(e.view.type), G == null || G({
926
- view: l,
927
+ Tt(e.view.title), Dt(e.view.type), G == null || G({
928
+ view: c,
927
929
  internalView: e.view.type,
928
930
  start: e.start,
929
931
  end: e.end,
@@ -933,24 +935,24 @@ const $e = He(
933
935
  title: e.view.title
934
936
  }), $(), K();
935
937
  },
936
- [G, l, $, K]
937
- ), Wt = u(() => kr(R), [R]), jt = u(
938
+ [G, c, $, K]
939
+ ), _t = u(() => Ir(S), [S]), Vt = u(
938
940
  () => [
939
- rr,
940
- nr,
941
941
  ir,
942
- lr,
943
942
  ar,
944
943
  sr,
944
+ ur,
945
945
  or,
946
- dr
946
+ dr,
947
+ lr,
948
+ cr
947
949
  ],
948
950
  []
949
- ), _t = u(
950
- () => be(l, V),
951
- [l, V]
951
+ ), Ht = u(
952
+ () => be(c, V),
953
+ [c, V]
952
954
  );
953
- v(() => {
955
+ h(() => {
954
956
  const e = k.current;
955
957
  if (!e) return;
956
958
  const t = (r) => {
@@ -961,7 +963,7 @@ const $e = He(
961
963
  };
962
964
  };
963
965
  return e.addEventListener("pointerdown", t, !0), () => e.removeEventListener("pointerdown", t, !0);
964
- }, []), v(() => {
966
+ }, []), h(() => {
965
967
  const e = k.current;
966
968
  if (!e || !O.startsWith("resourceTimeGrid") || !x && !D) return;
967
969
  const t = (r) => {
@@ -975,62 +977,62 @@ const $e = He(
975
977
  const a = ie.current;
976
978
  if (a.id !== 0 && (Math.abs(r.clientX - a.x) > Te || Math.abs(r.clientY - a.y) > Te))
977
979
  return;
978
- const c = i.closest("td.fc-daygrid-day[data-date]");
979
- if (!c) return;
980
- const b = i.closest("[data-event-id]");
981
- if (b) {
980
+ const l = i.closest("td.fc-daygrid-day[data-date]");
981
+ if (!l) return;
982
+ const v = i.closest("[data-event-id]");
983
+ if (v) {
982
984
  if (!D) return;
983
- const J = b.getAttribute("data-event-id"), ye = (X = C.current) == null ? void 0 : X.getApi(), oe = J ? ye == null ? void 0 : ye.getEventById(J) : null;
985
+ const J = v.getAttribute("data-event-id"), ye = (X = C.current) == null ? void 0 : X.getApi(), oe = J ? ye == null ? void 0 : ye.getEventById(J) : null;
984
986
  if (!oe || !oe.start) return;
985
987
  const We = oe.extendedProps ?? {};
986
988
  if (We.isInternal || We.isDraft) return;
987
- const Qt = i.closest(".fc-event") ?? b;
988
- D(P(oe), { el: Qt, jsEvent: r });
989
+ const tr = i.closest(".fc-event") ?? v;
990
+ D(N(oe), { el: tr, jsEvent: r });
989
991
  return;
990
992
  }
991
- if (!x || a.id !== 0 && Me.current === a.id)
993
+ if (!x || a.id !== 0 && Be.current === a.id)
992
994
  return;
993
- const U = c.getAttribute("data-date");
995
+ const U = l.getAttribute("data-date");
994
996
  if (!U) return;
995
997
  const Y = /* @__PURE__ */ new Date(`${U}T00:00:00`);
996
- Number.isNaN(Y.getTime()) || (a.id !== 0 && (Be.current = a.id), x({
998
+ Number.isNaN(Y.getTime()) || (a.id !== 0 && (Me.current = a.id), x({
997
999
  date: Y,
998
1000
  allDay: !0,
999
- resourceId: c.getAttribute("data-resource-id") ?? void 0
1001
+ resourceId: l.getAttribute("data-resource-id") ?? void 0
1000
1002
  }));
1001
1003
  };
1002
1004
  return e.addEventListener("click", t), () => e.removeEventListener("click", t);
1003
1005
  }, [O, x, D]);
1004
- const Vt = h(
1006
+ const qt = g(
1005
1007
  (e) => {
1006
- const t = e.resource.extendedProps, r = e.resource.title, i = t.color, a = t.shortTitleTextColor, c = i || a ? {
1008
+ const t = e.resource.extendedProps, r = e.resource.title, i = t.color, a = t.shortTitleTextColor, l = i || a ? {
1007
1009
  ...i ? { "--resource-color": i } : {},
1008
1010
  ...a ? {
1009
1011
  "--resource-initials-text-color": a
1010
1012
  } : {}
1011
1013
  } : void 0;
1012
- return Pe === "chip" && !ue ? /* @__PURE__ */ d(
1013
- hr,
1014
+ return Ne === "chip" && !ue ? /* @__PURE__ */ o(
1015
+ yr,
1014
1016
  {
1015
1017
  label: r,
1016
1018
  color: i,
1017
- orientation: me ? "vertical" : "horizontal"
1019
+ orientation: fe ? "vertical" : "horizontal"
1018
1020
  }
1019
- ) : ue ? /* @__PURE__ */ d(gr, { label: r, children: /* @__PURE__ */ d(pr, { size: "sm", name: r, src: t.avatarSrc }) }) : i ? (i && a && mr(i, a, `resource ${e.resource.id}`), /* @__PURE__ */ S("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
1020
- /* @__PURE__ */ d(
1021
+ ) : ue ? /* @__PURE__ */ o(je, { label: r, children: /* @__PURE__ */ o(hr, { size: "sm", name: r, src: t.avatarSrc }) }) : i ? (i && a && pr(i, a, `resource ${e.resource.id}`), /* @__PURE__ */ R("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
1022
+ /* @__PURE__ */ o(
1021
1023
  "span",
1022
1024
  {
1023
1025
  className: "resource-dot ds:[background-color:var(--resource-color)]",
1024
- style: c,
1026
+ style: l,
1025
1027
  "aria-hidden": "true"
1026
1028
  }
1027
1029
  ),
1028
- /* @__PURE__ */ d("span", { className: "ds:truncate ds:text-start", children: r })
1029
- ] })) : /* @__PURE__ */ d("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: /* @__PURE__ */ d("span", { className: "ds:truncate ds:text-start", children: r }) });
1030
+ /* @__PURE__ */ o("span", { className: "ds:truncate ds:text-start", children: r })
1031
+ ] })) : /* @__PURE__ */ o("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: /* @__PURE__ */ o("span", { className: "ds:truncate ds:text-start", children: r }) });
1030
1032
  },
1031
- [ue, Pe, me]
1033
+ [ue, Ne, fe]
1032
1034
  ), Fe = u(
1033
- () => o == null ? void 0 : o.map((e) => ({
1035
+ () => d == null ? void 0 : d.map((e) => ({
1034
1036
  id: e.id,
1035
1037
  title: e.title,
1036
1038
  sequenceNumber: e.sequenceNumber,
@@ -1042,37 +1044,37 @@ const $e = He(
1042
1044
  sequenceNumber: e.sequenceNumber
1043
1045
  }
1044
1046
  })),
1045
- [o]
1047
+ [d]
1046
1048
  );
1047
- v(() => {
1049
+ h(() => {
1048
1050
  $();
1049
1051
  const e = requestAnimationFrame($);
1050
1052
  return () => cancelAnimationFrame(e);
1051
- }, [se, Fe, O, $]), v(() => {
1053
+ }, [se, Fe, O, $]), h(() => {
1052
1054
  K();
1053
1055
  const e = requestAnimationFrame(K);
1054
1056
  return () => cancelAnimationFrame(e);
1055
1057
  }, [E, O, K]);
1056
- const Ht = h(() => {
1058
+ const $t = g(() => {
1057
1059
  var e, t;
1058
1060
  (t = (e = C.current) == null ? void 0 : e.getApi()) == null || t.today();
1059
- }, []), qt = h(() => {
1061
+ }, []), Kt = g(() => {
1060
1062
  var e, t;
1061
1063
  (t = (e = C.current) == null ? void 0 : e.getApi()) == null || t.prev();
1062
- }, []), $t = h(() => {
1064
+ }, []), Ut = g(() => {
1063
1065
  var e, t;
1064
1066
  (t = (e = C.current) == null ? void 0 : e.getApi()) == null || t.next();
1065
- }, []), Kt = u(
1067
+ }, []), Yt = u(
1066
1068
  () => s.some((e) => e.isDraft),
1067
1069
  [s]
1068
- ), Ut = [
1070
+ ), Xt = [
1069
1071
  "fc-theme-alfadocs",
1070
- ft ? "calendar-zebra-rows" : null,
1071
- me ? "calendar-vertical-resource-labels" : null,
1072
- ut ? "calendar-availability-mode" : null,
1072
+ vt ? "calendar-zebra-rows" : null,
1073
+ fe ? "calendar-vertical-resource-labels" : null,
1074
+ mt ? "calendar-availability-mode" : null,
1073
1075
  /* Composing: derived from the events themselves rather than a prop,
1074
1076
  so the dim can never disagree with what is on the grid. */
1075
- Kt ? "calendar-composing-mode" : null,
1077
+ Yt ? "calendar-composing-mode" : null,
1076
1078
  "ds:bg-background ds:text-foreground",
1077
1079
  /* The radius has to CLIP, not just round the box. FullCalendar draws the
1078
1080
  grid as a table with its own border, and that border squares off the
@@ -1089,11 +1091,11 @@ const $e = He(
1089
1091
  box, so the bridge zeroes FullCalendar's outer borders and this
1090
1092
  border follows the radius instead. */
1091
1093
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[var(--border)] ds:overflow-clip",
1092
- Xe
1093
- ].filter(Boolean).join(" "), Yt = re || ne ? {
1094
+ Ze
1095
+ ].filter(Boolean).join(" "), Jt = re || ne ? {
1094
1096
  ...re ? { "--calendar-mode-bg": re } : {},
1095
1097
  ...ne ? { "--calendar-mode-fg": ne } : {}
1096
- } : void 0, Xt = te !== "default" ? Ze ?? m(Ar[te]) : "", Jt = [
1098
+ } : void 0, Zt = te !== "default" ? et ?? f(kr[te]) : "", Qt = [
1097
1099
  "ds:sticky ds:top-0 ds:z-10",
1098
1100
  "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
1099
1101
  "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
@@ -1103,7 +1105,7 @@ const $e = He(
1103
1105
  doesn't supply a hex. */
1104
1106
  re ? "ds:[background-color:var(--calendar-mode-bg)]" : "ds:bg-[var(--muted)]",
1105
1107
  ne ? "ds:[color:var(--calendar-mode-fg)]" : "ds:text-[var(--muted-foreground)]"
1106
- ].filter(Boolean).join(" "), Zt = [
1108
+ ].filter(Boolean).join(" "), er = [
1107
1109
  "ds:inline-flex ds:items-center ds:justify-center",
1108
1110
  "ds:min-h-[var(--min-target-size)]",
1109
1111
  "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
@@ -1118,161 +1120,183 @@ const $e = He(
1118
1120
  "ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1119
1121
  "ds:motion-reduce:transition-none"
1120
1122
  ].join(" ");
1121
- return /* @__PURE__ */ S(
1123
+ return /* @__PURE__ */ R(
1122
1124
  "div",
1123
1125
  {
1124
1126
  ref: k,
1125
- className: Ut,
1127
+ className: Xt,
1126
1128
  role: "region",
1127
- "aria-label": m("calendar.ariaLabel"),
1129
+ "aria-label": f("calendar.ariaLabel"),
1128
1130
  "data-component": "calendar",
1129
1131
  "data-component-id": n,
1130
1132
  "data-mode": te,
1131
1133
  children: [
1132
- /* @__PURE__ */ d(
1134
+ /* @__PURE__ */ o(
1133
1135
  "div",
1134
1136
  {
1135
1137
  ref: w,
1136
1138
  "aria-live": "polite",
1137
1139
  "aria-atomic": "true",
1138
- className: ["ds:sr-only", M].filter(Boolean).join(" ")
1140
+ className: ["ds:sr-only", B].filter(Boolean).join(" ")
1139
1141
  }
1140
1142
  ),
1141
- Qe,
1142
- te !== "default" ? /* @__PURE__ */ S(
1143
+ tt,
1144
+ te !== "default" ? /* @__PURE__ */ R(
1143
1145
  "div",
1144
1146
  {
1145
- className: Jt,
1146
- style: Yt,
1147
+ className: Qt,
1148
+ style: Jt,
1147
1149
  role: "status",
1148
1150
  children: [
1149
- /* @__PURE__ */ d(
1151
+ /* @__PURE__ */ o(
1150
1152
  "span",
1151
1153
  {
1152
- className: ["ds:flex-1 ds:text-start", M].filter(Boolean).join(" "),
1153
- children: Xt
1154
+ className: ["ds:flex-1 ds:text-start", B].filter(Boolean).join(" "),
1155
+ children: Zt
1154
1156
  }
1155
1157
  ),
1156
- Ie ? /* @__PURE__ */ d(
1158
+ Ie ? /* @__PURE__ */ o(
1157
1159
  "button",
1158
1160
  {
1159
1161
  type: "button",
1160
1162
  onClick: Ie,
1161
- className: Zt,
1162
- children: m("calendar.modeBanner.cancel")
1163
+ className: er,
1164
+ children: f("calendar.modeBanner.cancel")
1163
1165
  }
1164
1166
  ) : null
1165
1167
  ]
1166
1168
  }
1167
1169
  ) : null,
1168
- lt !== !1 ? /* @__PURE__ */ d(
1170
+ ut !== !1 ? /* @__PURE__ */ o(
1169
1171
  Ce,
1170
1172
  {
1171
- title: gt,
1172
- onToday: Ht,
1173
- onPrev: qt,
1174
- onNext: $t,
1175
- end: ct,
1176
- maskClassName: M
1173
+ title: bt,
1174
+ onToday: $t,
1175
+ onPrev: Kt,
1176
+ onNext: Ut,
1177
+ end: ft,
1178
+ maskClassName: B
1177
1179
  }
1178
1180
  ) : null,
1179
- /* @__PURE__ */ d(
1180
- tr,
1181
+ /* @__PURE__ */ o(
1182
+ nr,
1181
1183
  {
1182
1184
  ref: C,
1183
- plugins: jt,
1184
- schedulerLicenseKey: dt,
1185
- initialView: _t,
1186
- views: wr,
1187
- initialDate: f,
1188
- locale: R,
1189
- direction: vt,
1190
- firstDay: Wt,
1185
+ plugins: Vt,
1186
+ schedulerLicenseKey: ct,
1187
+ initialView: Ht,
1188
+ views: Ar,
1189
+ initialDate: m,
1190
+ locale: S,
1191
+ direction: gt,
1192
+ firstDay: _t,
1191
1193
  editable: ee,
1192
- eventDurationEditable: ee === !1 ? !1 : Ke ?? ee,
1194
+ eventDurationEditable: ee === !1 ? !1 : Ye ?? ee,
1193
1195
  selectable: Ae,
1194
- selectMirror: Ue ?? Ae,
1196
+ selectMirror: Xe ?? Ae,
1195
1197
  ...ke === void 0 ? {} : { unselectAuto: ke },
1196
1198
  droppable: ee,
1197
- dayMaxEvents: ot,
1198
- height: Ye,
1199
+ dayMaxEvents: lt,
1200
+ height: Je,
1199
1201
  expandRows: !0,
1200
- events: Tt,
1202
+ events: xt,
1201
1203
  resources: Fe,
1202
1204
  resourceOrder: "sequenceNumber",
1203
- resourceLabelContent: Vt,
1204
- resourceAreaWidth: mt,
1205
- resourceAreaHeaderContent: kt,
1206
- dayCellClassNames: It,
1207
- dayCellDidMount: Pt,
1208
- dayHeaderClassNames: Rt,
1209
- resourceLabelClassNames: St,
1210
- dayHeaderDidMount: Et,
1205
+ resourceLabelContent: qt,
1206
+ resourceAreaWidth: pt,
1207
+ resourceAreaHeaderContent: St,
1208
+ dayCellClassNames: Rt,
1209
+ dayCellDidMount: Gt,
1210
+ dayHeaderClassNames: Nt,
1211
+ resourceLabelClassNames: Et,
1212
+ dayHeaderDidMount: Pt,
1211
1213
  ...he ? { slotLaneClassNames: he } : {},
1212
1214
  eventClassNames: (e) => {
1213
1215
  var t;
1214
1216
  return [
1215
1217
  ...he ?? [],
1216
- ...Ne && e.event.id === Ne ? ["calendar-event-selected"] : [],
1218
+ ...Pe && e.event.id === Pe ? ["calendar-event-selected"] : [],
1217
1219
  ...(t = e.event.extendedProps) != null && t.isDraft ? ["calendar-event-draft"] : []
1218
1220
  ];
1219
1221
  },
1220
1222
  headerToolbar: !1,
1221
- allDayText: m("calendar.allDay"),
1222
- noEventsText: m("calendar.noEvents"),
1223
- titleFormat: Dt,
1224
- dayHeaderFormat: xt,
1225
- dayHeaderContent: At,
1226
- eventTimeFormat: Ct,
1227
- slotLabelFormat: wt,
1228
- slotMinTime: et ?? "00:00:00",
1229
- slotMaxTime: tt ?? "24:00:00",
1230
- slotDuration: rt ?? "00:30:00",
1223
+ allDayText: f("calendar.allDay"),
1224
+ noEventsText: f("calendar.noEvents"),
1225
+ titleFormat: Ct,
1226
+ dayHeaderFormat: wt,
1227
+ dayHeaderContent: It,
1228
+ eventTimeFormat: At,
1229
+ slotLabelFormat: kt,
1230
+ slotMinTime: rt ?? "00:00:00",
1231
+ slotMaxTime: nt ?? "24:00:00",
1232
+ slotDuration: it ?? "00:30:00",
1231
1233
  ...Ee ? { snapDuration: Ee } : {},
1232
1234
  slotLabelInterval: "01:00:00",
1233
1235
  ...ze !== void 0 ? { defaultTimedEventDuration: ze } : {},
1234
1236
  hiddenDays: Se,
1235
1237
  datesAboveResources: ce,
1236
- slotEventOverlap: it,
1237
- stickyHeaderDates: at,
1238
- nowIndicator: st,
1238
+ slotEventOverlap: st,
1239
+ stickyHeaderDates: ot,
1240
+ nowIndicator: dt,
1239
1241
  eventLongPressDelay: ae ? 0 : 1e3,
1240
1242
  eventDragMinDistance: ae ? 0 : Te,
1241
1243
  eventContent: (e) => {
1242
1244
  var r;
1243
1245
  const t = e.event.extendedProps ?? {};
1244
- return t.isInternal ? e.event.title && Q ? /* @__PURE__ */ S(
1245
- vr,
1246
- {
1247
- intent: "ghost",
1248
- "data-event-id": e.event.id,
1249
- className: "calendar-bg-event-label ds:pointer-events-auto ds:h-full ds:w-full ds:[min-block-size:var(--min-target-size)] ds:[min-inline-size:var(--min-target-size)]",
1250
- onClick: (i) => {
1251
- i.stopPropagation(), Q(P(e.event), {
1252
- el: i.currentTarget,
1253
- jsEvent: i.nativeEvent
1254
- });
1255
- },
1256
- children: [
1257
- /* @__PURE__ */ d(je, { size: 12, "aria-hidden": "true" }),
1258
- e.event.title
1259
- ]
1246
+ if (t.isInternal) {
1247
+ if (e.event.title && Q) {
1248
+ const i = typeof t.optionCount == "number" ? f("calendarWorkspace.findSlots.freeOptions", {
1249
+ count: t.optionCount
1250
+ }) : void 0, a = i ? [
1251
+ e.event.title,
1252
+ qe(e, S),
1253
+ i
1254
+ ].filter(Boolean).join(", ") : e.event.title, l = /* @__PURE__ */ o(
1255
+ gr,
1256
+ {
1257
+ intent: "ghost",
1258
+ size: "sm",
1259
+ "data-event-id": e.event.id,
1260
+ "aria-label": a,
1261
+ className: "ds:pointer-events-auto ds:h-full ds:w-full ds:min-h-0 ds:justify-center ds:before:hidden",
1262
+ onClick: (v) => {
1263
+ v.stopPropagation(), Q(N(e.event), {
1264
+ el: v.currentTarget,
1265
+ jsEvent: v.nativeEvent
1266
+ });
1267
+ },
1268
+ children: /* @__PURE__ */ R(
1269
+ "span",
1270
+ {
1271
+ className: "calendar-bg-event-label",
1272
+ "aria-hidden": "true",
1273
+ children: [
1274
+ /* @__PURE__ */ o(_e, { size: 12, "aria-hidden": "true" }),
1275
+ e.event.title
1276
+ ]
1277
+ }
1278
+ )
1279
+ }
1280
+ );
1281
+ return i ? /* @__PURE__ */ o(je, { label: i, children: l }) : l;
1260
1282
  }
1261
- ) : e.event.title ? /* @__PURE__ */ S("span", { className: "calendar-bg-event-label", children: [
1262
- /* @__PURE__ */ d(je, { size: 12, "aria-hidden": "true" }),
1263
- e.event.title
1264
- ] }) : !0 : /* @__PURE__ */ d(
1265
- fr,
1283
+ return e.event.title ? /* @__PURE__ */ R("span", { className: "calendar-bg-event-label", children: [
1284
+ /* @__PURE__ */ o(_e, { size: 12, "aria-hidden": "true" }),
1285
+ e.event.title
1286
+ ] }) : !0;
1287
+ }
1288
+ return /* @__PURE__ */ o(
1289
+ vr,
1266
1290
  {
1267
1291
  eventId: e.event.id,
1268
- title: y ? t.privacyModeTitle ?? "•••" : e.event.title,
1269
- privacyMasked: y,
1292
+ title: b ? t.privacyModeTitle ?? "•••" : e.event.title,
1293
+ privacyMasked: b,
1270
1294
  suffix: t.suffix,
1271
- rangeText: Er(e, R),
1272
- showTime: nt,
1295
+ rangeText: qe(e, S),
1296
+ showTime: at,
1273
1297
  allDay: e.event.allDay,
1274
1298
  status: t.status,
1275
- colorStyle: Je,
1299
+ colorStyle: Qe,
1276
1300
  backgroundColor: t.backgroundColor,
1277
1301
  textColor: t.textColor,
1278
1302
  borderColor: t.borderColor,
@@ -1285,20 +1309,20 @@ const $e = He(
1285
1309
  isTask: t.isTask,
1286
1310
  isDraft: t.isDraft,
1287
1311
  detailsPending: t.detailsPending,
1288
- resourceLabel: t.resourceId ? (r = (o ?? []).find((i) => i.id === t.resourceId)) == null ? void 0 : r.title : void 0
1312
+ resourceLabel: t.resourceId ? (r = (d ?? []).find((i) => i.id === t.resourceId)) == null ? void 0 : r.title : void 0
1289
1313
  }
1290
1314
  );
1291
1315
  },
1292
- eventClick: Mt,
1293
- eventMouseEnter: Bt,
1294
- eventMouseLeave: Lt,
1295
- eventDrop: Nt,
1296
- eventResize: Gt,
1316
+ eventClick: Lt,
1317
+ eventMouseEnter: Ot,
1318
+ eventMouseLeave: zt,
1319
+ eventDrop: Bt,
1320
+ eventResize: Mt,
1297
1321
  eventDragStart: W,
1298
1322
  eventResizeStart: Z,
1299
- select: Ot,
1300
- dateClick: zt,
1301
- datesSet: Ft,
1323
+ select: Ft,
1324
+ dateClick: Wt,
1325
+ datesSet: jt,
1302
1326
  ...we ? {
1303
1327
  navLinks: !0,
1304
1328
  navLinkDayClick: (e, t) => we(e, t)
@@ -1310,12 +1334,12 @@ const $e = He(
1310
1334
  );
1311
1335
  }
1312
1336
  );
1313
- $e.displayName = "Calendar";
1314
- const Gr = $e;
1337
+ Ue.displayName = "Calendar";
1338
+ const Gr = Ue;
1315
1339
  Gr.Toolbar = Ce;
1316
1340
  export {
1317
1341
  Gr as C,
1318
- br as c,
1342
+ Tr as c,
1319
1343
  be as r
1320
1344
  };
1321
- //# sourceMappingURL=calendar-ChJQzRw-.js.map
1345
+ //# sourceMappingURL=calendar-U6N0F99w.js.map