@alfadocs/ui-kit 1.137.0 → 1.138.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 (88) hide show
  1. package/dist/_chunks/{appointment-card-BT1cMZIX.js → appointment-card-CaxFXtSn.js} +196 -184
  2. package/dist/_chunks/{appointment-timeline-Dy4YQJ17.js → appointment-timeline-BEwgbYyG.js} +113 -110
  3. package/dist/_chunks/{appointment-tray-B3gSHL1j.js → appointment-tray-DPpeR9JT.js} +8 -8
  4. package/dist/_chunks/{calendar-appointment-editor-dialog-D0n_bVsT.js → calendar-appointment-editor-dialog-SxSkOTnO.js} +534 -533
  5. package/dist/_chunks/{calendar-editor-discard-host-1UfmMOEb.js → calendar-editor-discard-host-DjUhoFr2.js} +2 -2
  6. package/dist/_chunks/{calendar-waiting-list-panel-Ckd6tSeu.js → calendar-waiting-list-panel-331vzAdl.js} +3 -3
  7. package/dist/_chunks/{calendar-workspace.model-DrOoxY1b.js → calendar-workspace.model-B8yPwuBv.js} +2 -2
  8. package/dist/_chunks/{calendar.sheets-Datc0-IT.js → calendar.sheets-aodjllWd.js} +4 -4
  9. package/dist/_chunks/{patient-account-settings-COybehKx.js → patient-account-settings-Cs9y-pVA.js} +2 -2
  10. package/dist/_chunks/{patient-check-in-resume-DZnyYDKH.js → patient-check-in-resume-4qi_klQV.js} +4 -4
  11. package/dist/_chunks/{portal-details-DdzvroYP.js → portal-details-BGc_FLQk.js} +2 -2
  12. package/dist/_chunks/{portal-documents-CNmoYWFc.js → portal-documents-BSI1U5lI.js} +2 -2
  13. package/dist/_chunks/{portal-parts-Br8wuala.js → portal-parts-C99CreYO.js} +2 -2
  14. package/dist/agent-catalog.json +2 -2
  15. package/dist/appointment-editor-panel/index.js +2 -2
  16. package/dist/booking-tools-data/index.js +1 -1
  17. package/dist/browser-support.js +1 -1
  18. package/dist/calendar-action-buttons/index.js +1 -1
  19. package/dist/components/appointment-card/appointment-card.d.ts +5 -2
  20. package/dist/components/appointment-card/index.js +2 -2
  21. package/dist/components/appointment-timeline/appointment-timeline.d.ts +6 -0
  22. package/dist/components/appointment-timeline/index.js +1 -1
  23. package/dist/core.css +1 -1
  24. package/dist/find-free-slots-panel/index.js +1 -1
  25. package/dist/host-legacy.css +16 -0
  26. package/dist/i18n/locales/ar.d.ts +0 -1
  27. package/dist/i18n/locales/ar.js +0 -1
  28. package/dist/i18n/locales/de.d.ts +0 -1
  29. package/dist/i18n/locales/de.js +0 -1
  30. package/dist/i18n/locales/el.d.ts +0 -1
  31. package/dist/i18n/locales/el.js +0 -1
  32. package/dist/i18n/locales/en.d.ts +0 -1
  33. package/dist/i18n/locales/en.js +0 -1
  34. package/dist/i18n/locales/es.d.ts +0 -1
  35. package/dist/i18n/locales/es.js +0 -1
  36. package/dist/i18n/locales/fr.d.ts +0 -1
  37. package/dist/i18n/locales/fr.js +0 -1
  38. package/dist/i18n/locales/hi.d.ts +0 -1
  39. package/dist/i18n/locales/hi.js +0 -1
  40. package/dist/i18n/locales/it.d.ts +0 -1
  41. package/dist/i18n/locales/it.js +0 -1
  42. package/dist/i18n/locales/ja.d.ts +0 -1
  43. package/dist/i18n/locales/ja.js +0 -1
  44. package/dist/i18n/locales/nl.d.ts +0 -1
  45. package/dist/i18n/locales/nl.js +0 -1
  46. package/dist/i18n/locales/pl.d.ts +0 -1
  47. package/dist/i18n/locales/pl.js +0 -1
  48. package/dist/i18n/locales/pt.d.ts +0 -1
  49. package/dist/i18n/locales/pt.js +0 -1
  50. package/dist/i18n/locales/ro.d.ts +0 -1
  51. package/dist/i18n/locales/ro.js +0 -1
  52. package/dist/i18n/locales/ru.d.ts +0 -1
  53. package/dist/i18n/locales/ru.js +0 -1
  54. package/dist/i18n/locales/sq.d.ts +0 -1
  55. package/dist/i18n/locales/sq.js +0 -1
  56. package/dist/i18n/locales/sv.d.ts +0 -1
  57. package/dist/i18n/locales/sv.js +0 -1
  58. package/dist/i18n/locales/tr.d.ts +0 -1
  59. package/dist/i18n/locales/tr.js +0 -1
  60. package/dist/i18n/locales/zh.d.ts +0 -1
  61. package/dist/i18n/locales/zh.js +0 -1
  62. package/dist/index.js +11 -11
  63. package/dist/locales/ar.json +0 -1
  64. package/dist/locales/de.json +0 -1
  65. package/dist/locales/el.json +0 -1
  66. package/dist/locales/en.json +0 -1
  67. package/dist/locales/es.json +0 -1
  68. package/dist/locales/fr.json +0 -1
  69. package/dist/locales/hi.json +0 -1
  70. package/dist/locales/it.json +0 -1
  71. package/dist/locales/ja.json +0 -1
  72. package/dist/locales/nl.json +0 -1
  73. package/dist/locales/pl.json +0 -1
  74. package/dist/locales/pt.json +0 -1
  75. package/dist/locales/ro.json +0 -1
  76. package/dist/locales/ru.json +0 -1
  77. package/dist/locales/sq.json +0 -1
  78. package/dist/locales/sv.json +0 -1
  79. package/dist/locales/tr.json +0 -1
  80. package/dist/locales/zh.json +0 -1
  81. package/dist/online-bookings-panel/index.js +2 -2
  82. package/dist/patterns/calendar/index.js +4 -4
  83. package/dist/patterns/patient-account-settings/index.js +1 -1
  84. package/dist/patterns/patient-check-in/index.js +1 -1
  85. package/dist/patterns/patient-portal/index.js +2 -2
  86. package/dist/tokens.css +1 -1
  87. package/dist/waiting-list-panel/index.js +2 -2
  88. package/package.json +1 -1
@@ -1,15 +1,15 @@
1
1
  import { jsxs as I, jsx as n, Fragment as Sn } from "react/jsx-runtime";
2
- import { useState as _, useMemo as B, useRef as $, useEffect as V, useCallback as m, Fragment as Vs, useLayoutEffect as Qa } from "react";
2
+ import { useState as _, useMemo as B, useRef as $, useEffect as G, useCallback as m, Fragment as Vs, useLayoutEffect as Qa } from "react";
3
3
  import { useTranslation as gt } from "react-i18next";
4
4
  import { u as js } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
5
5
  import { C as Ys, b as Xs, a as Js } from "./collapsible-DVPM46bq.js";
6
- import { A as Zs } from "./appointment-timeline-Dy4YQJ17.js";
6
+ import { A as Zs } from "./appointment-timeline-BEwgbYyG.js";
7
7
  import { a as Qs } from "./workflow-status-CO0mxXs2.js";
8
8
  import { A as qa, g as ei } from "./avatar-Dp5apm1d.js";
9
9
  import { B as Br } from "./badge-BUk4RjTS.js";
10
10
  import { S as es, C as ti } from "./skeleton-tTWJpvAq.js";
11
11
  import { u as Cr, a as ni, C as As, c as ri, E as Ws } from "./calendar-editor-guard-9fShhNIA.js";
12
- import { ag as ai, ah as si, ai as ii, v as oi, aj as ci, ak as ts, al as ns, S as li, am as rs, an as as, I as vr, W as y, ao as di, u as ra, ap as ss, C as kr, aq as ui, ar as pi, m as Os, as as is, at as mi, au as hi, av as fi, y as os, K as Pr, aw as vi, ax as gi, ay as ki, az as cs, aA as Ci, aB as Ii, aC as bi, aD as ls, aE as yi, aF as Di, aG as Ti, aH as Ni, aI as wi, aJ as Ei, aK as ya, h as Si, aL as Lr, aM as Ls, aN as Ka, aO as $a, aP as xi, M as ds, aQ as us, X as Qr, aR as ga, aS as ea, aT as Ta, aU as Ga, aV as Ai, a7 as ps, aW as Wi, aX as Oi, aY as Li, aZ as Fi, aa as Ra, ab as Bi, b as ms, a_ as Pi, p as Va, O as hs, a$ as _i, R as Fs, b0 as $i, a3 as fs, q as Ri, b1 as Bs, a as ja, c as zi, b2 as Ps, b3 as Hi, b4 as Ui, b5 as Ya, o as Mi, b6 as qi, b7 as Ki, b8 as Gi, b9 as Vi } from "./calendar-workspace.model-DrOoxY1b.js";
12
+ import { ag as ai, ah as si, ai as ii, v as oi, aj as ci, ak as ts, al as ns, S as li, am as rs, an as as, I as vr, W as y, ao as di, u as ra, ap as ss, C as kr, aq as ui, ar as pi, m as Os, as as is, at as mi, au as hi, av as fi, y as os, K as Pr, aw as vi, ax as gi, ay as ki, az as cs, aA as Ci, aB as Ii, aC as bi, aD as ls, aE as yi, aF as Di, aG as Ti, aH as Ni, aI as wi, aJ as Ei, aK as ya, h as Si, aL as Lr, aM as Ls, aN as Ka, aO as $a, aP as xi, M as ds, aQ as us, X as Qr, aR as ga, aS as ea, aT as Ta, aU as Ga, aV as Ai, a7 as ps, aW as Wi, aX as Oi, aY as Li, aZ as Fi, aa as Ra, ab as Bi, b as ms, a_ as Pi, p as Va, O as hs, a$ as _i, R as Fs, b0 as $i, a3 as fs, q as Ri, b1 as Bs, a as ja, c as zi, b2 as Ps, b3 as Hi, b4 as Ui, b5 as Ya, o as Mi, b6 as qi, b7 as Ki, b8 as Gi, b9 as Vi } from "./calendar-workspace.model-B8yPwuBv.js";
13
13
  import { S as ji } from "./stethoscope-sZXGC43m.js";
14
14
  import { C as _s } from "./chevron-down-DWE7GSq9.js";
15
15
  import { a as Yi } from "./entity-card-p-LANpYt.js";
@@ -20,9 +20,9 @@ import { A as eo, u as to } from "./app-frame-context-CPszhDDb.js";
20
20
  import { u as no } from "./use-media-query-CcAx5SMM.js";
21
21
  import { c as vs, a as ro, d as hn, b as fn } from "./toast-DQ1Zu1kk.js";
22
22
  import { T as za, a as Rs } from "./tooltip-uEBdD1-5.js";
23
- import { d as ao, e as so, f as gs, c as io, r as oo, g as co, u as lo } from "./calendar-editor-discard-host-1UfmMOEb.js";
23
+ import { d as ao, e as so, f as gs, c as io, r as oo, g as co, u as lo } from "./calendar-editor-discard-host-DjUhoFr2.js";
24
24
  import { A as zs, u as uo, D as ka } from "./use-appointment-details-read-jGkJalX8.js";
25
- import { c as po, b as mo, u as ho, i as fo, d as ks, A as Xa, e as vo, f as go, B as ko, F as Co, P as Io, S as Hs } from "./calendar.sheets-Datc0-IT.js";
25
+ import { c as po, b as mo, u as ho, i as fo, d as ks, A as Xa, e as vo, f as go, B as ko, F as Co, P as Io, S as Hs } from "./calendar.sheets-aodjllWd.js";
26
26
  import { B as Ve } from "./button-DohK_Ak_.js";
27
27
  import { D as te } from "./dialog-CVTxyR0v.js";
28
28
  import { R as Ja } from "./radio-BZQs6_36.js";
@@ -58,7 +58,7 @@ import { U as Po } from "./user-cog-BTn98Arm.js";
58
58
  import { R as _o } from "./rotate-ccw-BBQnIVTr.js";
59
59
  import { C as $o } from "./chevron-left-B8cOyH-V.js";
60
60
  import { C as Ro } from "./chevron-right-I9AeSxH2.js";
61
- import { W as zo } from "./calendar-waiting-list-panel-Ckd6tSeu.js";
61
+ import { W as zo } from "./calendar-waiting-list-panel-331vzAdl.js";
62
62
  import { C as Ho } from "./calendar-days-BGWklvE-.js";
63
63
  import { C as Ha } from "./calendar-clock-hbObjfGY.js";
64
64
  import { P as Ia } from "./privacy-mask-C2ZLKrMh.js";
@@ -77,7 +77,7 @@ function jo(r) {
77
77
  const s = $({ iso: r, wallMs: Date.now() });
78
78
  s.current.iso !== r && (s.current = { iso: r, wallMs: Date.now() });
79
79
  const [, i] = _(0);
80
- V(() => {
80
+ G(() => {
81
81
  var k;
82
82
  let g;
83
83
  const b = () => {
@@ -121,15 +121,15 @@ function Zo({
121
121
  stateSinceByEventId: g,
122
122
  loading: b = !1
123
123
  }) {
124
- const { t: p } = gt("ui"), N = Cr(), [k, l] = _(ai), le = jo(N.nowIso).getTime(), j = ws(N.nowIso), xe = p(
124
+ const { t: p } = gt("ui"), N = Cr(), [k, l] = _(ai), le = jo(N.nowIso).getTime(), V = ws(N.nowIso), xe = p(
125
125
  "calendarWorkspace.details.patientNotLoaded"
126
126
  ), se = B(
127
127
  () => si(
128
128
  r,
129
129
  ii(N.nowIso, k)
130
130
  ).map(
131
- (E) => oi(
132
- E,
131
+ (x) => oi(
132
+ x,
133
133
  i,
134
134
  N,
135
135
  xe,
@@ -138,30 +138,30 @@ function Zo({
138
138
  ),
139
139
  [r, k, i, N, xe, p]
140
140
  ), U = B(
141
- () => se.filter((E) => ws(E.startIso) === j),
142
- [se, j]
141
+ () => se.filter((x) => ws(x.startIso) === V),
142
+ [se, V]
143
143
  ), Be = B(
144
- () => U.filter((E) => E.state === "waiting" || E.state === "in_care").sort((E, J) => +new Date(E.startIso) - +new Date(J.startIso)).map((E) => ({
145
- item: E,
146
- sinceIso: g == null ? void 0 : g[E.id]
144
+ () => U.filter((x) => x.state === "waiting" || x.state === "in_care").sort((x, J) => +new Date(x.startIso) - +new Date(J.startIso)).map((x) => ({
145
+ item: x,
146
+ sinceIso: g == null ? void 0 : g[x.id]
147
147
  })),
148
148
  [U, g]
149
149
  ), Ne = B(
150
- () => new Set(Be.map((E) => E.item.id)),
150
+ () => new Set(Be.map((x) => x.item.id)),
151
151
  [Be]
152
152
  ), O = B(
153
153
  () => se.find(
154
- (E) => !Ne.has(E.id) && +new Date(E.startIso) >= le
154
+ (x) => !Ne.has(x.id) && +new Date(x.startIso) >= le
155
155
  ),
156
156
  [se, Ne, le]
157
- ), he = B(
158
- () => se.filter((E) => !Ne.has(E.id)).map((E) => ({
159
- ...E,
160
- dimmed: E.state === "done" || E.state === "absent",
161
- next: E.id === (O == null ? void 0 : O.id)
157
+ ), ve = B(
158
+ () => se.filter((x) => !Ne.has(x.id)).map((x) => ({
159
+ ...x,
160
+ dimmed: x.state === "done" || x.state === "absent",
161
+ next: x.id === (O == null ? void 0 : O.id)
162
162
  })),
163
163
  [se, Ne, O]
164
- ), x = /* @__PURE__ */ I(
164
+ ), S = /* @__PURE__ */ I(
165
165
  "div",
166
166
  {
167
167
  "data-component": "calendar-upcoming-summary",
@@ -231,52 +231,52 @@ function Zo({
231
231
  {
232
232
  role: "list",
233
233
  className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-xs)] ds:p-0 ds:pb-[var(--spacing-2xs)]",
234
- children: Be.map(({ item: E, sinceIso: J }) => {
235
- var ae;
236
- const ge = Yi(E.state), Ft = ge.Icon, G = p(`appointmentCard.state.${E.state}`), K = J ? Xo(new Date(J).getTime(), le, s) : void 0;
234
+ children: Be.map(({ item: x, sinceIso: J }) => {
235
+ var ue;
236
+ const he = x.state ?? "waiting", Nt = Yi(he), j = Nt.Icon, K = p(`appointmentCard.state.${he}`), ae = J ? Xo(new Date(J).getTime(), le, s) : void 0;
237
237
  return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ I(
238
238
  "button",
239
239
  {
240
240
  type: "button",
241
- onClick: () => v(E.id),
241
+ onClick: () => v(x.id),
242
242
  "data-component": "calendar-upcoming-live-row",
243
- "data-appointment-id": E.id,
243
+ "data-appointment-id": x.id,
244
244
  className: "ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--card-border)] ds:bg-[color:color-mix(in_srgb,var(--info)_8%,var(--card))] ds:p-[var(--spacing-sm)] ds:text-start ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:hover:bg-[color:color-mix(in_srgb,var(--info)_14%,var(--card))] ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)]",
245
245
  children: [
246
- E.patient ? /* @__PURE__ */ n(
246
+ x.patient ? /* @__PURE__ */ n(
247
247
  qa,
248
248
  {
249
- name: E.patient.name,
250
- src: E.patient.avatarUrl,
249
+ name: x.patient.name,
250
+ src: x.patient.avatarUrl,
251
251
  size: "sm",
252
252
  "aria-hidden": "true",
253
253
  role: "presentation",
254
254
  "aria-label": void 0
255
255
  }
256
256
  ) : null,
257
- /* @__PURE__ */ n("span", { className: "ds:min-w-0 ds:flex-1", children: /* @__PURE__ */ n("span", { className: "ds:block ds:truncate type-title-item", children: ((ae = E.patient) == null ? void 0 : ae.name) ?? p("appointmentCard.noPatient") }) }),
257
+ /* @__PURE__ */ n("span", { className: "ds:min-w-0 ds:flex-1", children: /* @__PURE__ */ n("span", { className: "ds:block ds:truncate type-title-item", children: ((ue = x.patient) == null ? void 0 : ue.name) ?? p("appointmentCard.noPatient") }) }),
258
258
  /* @__PURE__ */ n(
259
259
  Qs,
260
260
  {
261
261
  size: "sm",
262
- value: E.state,
262
+ value: he,
263
263
  option: {
264
- value: E.state,
265
- label: K ? p(
264
+ value: he,
265
+ label: ae ? p(
266
266
  "calendarWorkspace.inc1.rail.upcomingLiveElapsed",
267
267
  {
268
- state: G,
269
- elapsed: K
268
+ state: K,
269
+ elapsed: ae
270
270
  }
271
- ) : G,
272
- icon: /* @__PURE__ */ n(Ft, { "aria-hidden": "true" }),
273
- tone: ge.tone
271
+ ) : K,
272
+ icon: /* @__PURE__ */ n(j, { "aria-hidden": "true" }),
273
+ tone: Nt.tone
274
274
  }
275
275
  }
276
276
  )
277
277
  ]
278
278
  }
279
- ) }, E.id);
279
+ ) }, x.id);
280
280
  })
281
281
  }
282
282
  ) })
@@ -290,24 +290,24 @@ function Zo({
290
290
  {
291
291
  "aria-hidden": "true",
292
292
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:p-[var(--spacing-sm)]",
293
- children: [0, 1, 2].map((E) => /* @__PURE__ */ I(
293
+ children: [0, 1, 2].map((x) => /* @__PURE__ */ I(
294
294
  "div",
295
295
  {
296
296
  className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
297
297
  children: [
298
- /* @__PURE__ */ n(es, { variant: "circular", size: "sm", stagger: E * 2 }),
298
+ /* @__PURE__ */ n(es, { variant: "circular", size: "sm", stagger: x * 2 }),
299
299
  /* @__PURE__ */ n(
300
300
  es,
301
301
  {
302
302
  variant: "text",
303
303
  size: "sm",
304
- stagger: E * 2 + 1,
304
+ stagger: x * 2 + 1,
305
305
  width: "70%"
306
306
  }
307
307
  )
308
308
  ]
309
309
  },
310
- E
310
+ x
311
311
  ))
312
312
  }
313
313
  );
@@ -320,27 +320,28 @@ function Zo({
320
320
  children: b ? X : /* @__PURE__ */ n(
321
321
  Zs,
322
322
  {
323
- items: he,
323
+ items: ve,
324
324
  nowIso: N.nowIso,
325
325
  locale: s,
326
326
  showPatient: !0,
327
327
  hideDefaultStatus: !0,
328
+ wrapText: !0,
328
329
  title: p("calendarWorkspace.inc1.rail.appointmentsTitle"),
329
330
  emptyTitle: p("calendarWorkspace.inc1.rail.appointmentsEmpty"),
330
331
  emptyDescription: p(
331
332
  "calendarWorkspace.inc1.rail.appointmentsEmptyBody"
332
333
  ),
333
334
  headerExtra: /* @__PURE__ */ I(Sn, { children: [
334
- x,
335
+ S,
335
336
  ie
336
337
  ] }),
337
- onOpenAppointment: (E) => v(E.id),
338
- onLoadEarlier: () => l((E) => ns(E, "earlier")),
339
- onLoadLater: () => l((E) => ns(E, "later")),
338
+ onOpenAppointment: (x) => v(x.id),
339
+ onLoadEarlier: () => l((x) => ns(x, "earlier")),
340
+ onLoadLater: () => l((x) => ns(x, "later")),
340
341
  hasMoreEarlier: k.backDays < ts,
341
342
  hasMoreLater: k.forwardDays < ts,
342
- onJumpToDate: (E) => l(
343
- (J) => ci(J, N.nowIso, E)
343
+ onJumpToDate: (x) => l(
344
+ (J) => ci(J, N.nowIso, x)
344
345
  )
345
346
  }
346
347
  )
@@ -478,7 +479,7 @@ function ac(r, s) {
478
479
  }
479
480
  function sc({
480
481
  details: r,
481
- patientId: s = ((E) => (E = r.patient) == null ? void 0 : E.id)(),
482
+ patientId: s = ((x) => (x = r.patient) == null ? void 0 : x.id)(),
482
483
  notesSeam: i,
483
484
  onOpenNotes: v,
484
485
  readOnly: g = !1,
@@ -489,45 +490,45 @@ function sc({
489
490
  onMove: l,
490
491
  onCopy: P,
491
492
  onDelete: le,
492
- deleteConfirm: j,
493
+ deleteConfirm: V,
493
494
  onDeleteInitiated: xe,
494
495
  onDocumentCreateClicked: se,
495
496
  onDetailsActionUsed: U,
496
497
  onStatusChange: Be,
497
498
  onDescriptionChange: Ne,
498
499
  mapsLink: O,
499
- noteUnrecordedEdits: he,
500
- privacy: x = !1,
500
+ noteUnrecordedEdits: ve,
501
+ privacy: S = !1,
501
502
  privacyTitle: ie,
502
503
  locale: X
503
504
  }) {
504
- var Nt;
505
- const J = Cr(), { appointment: ge } = r, [Ft, G] = _(!1), [K, ae] = _(), ke = $(null), st = (w) => (ce) => {
506
- const me = (Vt) => {
507
- var wt;
505
+ var wt;
506
+ const J = Cr(), { appointment: he } = r, [Nt, j] = _(!1), [K, ae] = _(), ue = $(null), st = (w) => (ce) => {
507
+ const fe = (Vt) => {
508
+ var Et;
508
509
  return [
509
- ...((wt = ke.current) == null ? void 0 : wt.querySelectorAll(Vt)) ?? []
510
+ ...((Et = ue.current) == null ? void 0 : Et.querySelectorAll(Vt)) ?? []
510
511
  ].find((oe) => !oe.closest("[inert]"));
511
- }, Ye = me(`[data-action="${w}"]`) ?? me('button[aria-haspopup="menu"]:has(svg.lucide-ellipsis)');
512
+ }, Ye = fe(`[data-action="${w}"]`) ?? fe('button[aria-haspopup="menu"]:has(svg.lucide-ellipsis)');
512
513
  Ye && (ce.preventDefault(), Ye.focus());
513
514
  }, Ie = (w) => U == null ? void 0 : U({ action: w }), je = (w) => {
514
515
  const ce = w.target.closest(
515
516
  "a[data-action]"
516
517
  );
517
518
  (ce == null ? void 0 : ce.dataset.action) === "create-task" && Ie("task"), (ce == null ? void 0 : ce.dataset.action) === "open-whatsapp" && Ie("whatsapp");
518
- const me = (ce == null ? void 0 : ce.dataset.action) && rc[ce.dataset.action];
519
- me && Ie(me);
520
- }, Oe = J.operators.find((w) => w.id === ge.operatorId), en = J.chairs.find((w) => w.id === ge.chairId), Q = i && s ? s : void 0, Te = Q !== void 0 && !x, _e = $(i);
519
+ const fe = (ce == null ? void 0 : ce.dataset.action) && rc[ce.dataset.action];
520
+ fe && Ie(fe);
521
+ }, Oe = J.operators.find((w) => w.id === he.operatorId), en = J.chairs.find((w) => w.id === he.chairId), Q = i && s ? s : void 0, Te = Q !== void 0 && !S, _e = $(i);
521
522
  _e.current = i;
522
523
  const Bt = !!(i != null && i.onLoad);
523
- return V(() => {
524
+ return G(() => {
524
525
  var ce;
525
526
  const w = _e.current;
526
527
  Te && w && w.notes.length === 0 && w.status !== "loading" && w.complete !== !0 && ((ce = w.onLoad) == null || ce.call(w, "preview"));
527
528
  }, [Te, Q, Bt, r.eventId]), /* @__PURE__ */ I(
528
529
  "div",
529
530
  {
530
- ref: ke,
531
+ ref: ue,
531
532
  "data-component": "calendar-appointment-details",
532
533
  "data-event-id": r.eventId,
533
534
  className: "ds:flex ds:h-full ds:min-h-0 ds:flex-col",
@@ -546,10 +547,10 @@ function sc({
546
547
  currency: J.currency ?? "EUR",
547
548
  now: J.nowIso,
548
549
  locale: X,
549
- privacy: x,
550
+ privacy: S,
550
551
  privacyTitle: ie,
551
552
  mapsLink: O,
552
- noteUnrecordedEdits: he,
553
+ noteUnrecordedEdits: ve,
553
554
  notesPreview: Q && i ? ac(i, Q) : void 0,
554
555
  onOpenNotes: Q && v ? (w) => v(Q, w) : void 0,
555
556
  readOnly: g,
@@ -568,7 +569,7 @@ function sc({
568
569
  P(w), Ie("copy");
569
570
  }),
570
571
  onDelete: le && (() => {
571
- xe == null || xe(), G(!0);
572
+ xe == null || xe(), j(!0);
572
573
  }),
573
574
  onJoinTelehealth: r.onJoinTelehealth && (() => {
574
575
  var w;
@@ -601,8 +602,8 @@ function sc({
601
602
  documents: r.documents && {
602
603
  kinds: r.documents.kinds,
603
604
  onCreate: (w) => {
604
- var ce, me, Ye;
605
- if (se == null || se(w), (me = (ce = r.documents) == null ? void 0 : ce.seriesScope) != null && me.kinds.includes(w)) {
605
+ var ce, fe, Ye;
606
+ if (se == null || se(w), (fe = (ce = r.documents) == null ? void 0 : ce.seriesScope) != null && fe.kinds.includes(w)) {
606
607
  ae(w);
607
608
  return;
608
609
  }
@@ -611,7 +612,7 @@ function sc({
611
612
  }
612
613
  }
613
614
  ),
614
- (Nt = r.documents) != null && Nt.seriesScope ? /* @__PURE__ */ n(
615
+ (wt = r.documents) != null && wt.seriesScope ? /* @__PURE__ */ n(
615
616
  tc,
616
617
  {
617
618
  open: K !== void 0,
@@ -628,10 +629,10 @@ function sc({
628
629
  le && !g ? /* @__PURE__ */ n(
629
630
  po,
630
631
  {
631
- open: Ft,
632
- onOpenChange: G,
633
- scopes: j == null ? void 0 : j.scopes,
634
- offersCarePlanCleanup: j == null ? void 0 : j.offersCarePlanCleanup,
632
+ open: Nt,
633
+ onOpenChange: j,
634
+ scopes: V == null ? void 0 : V.scopes,
635
+ offersCarePlanCleanup: V == null ? void 0 : V.offersCarePlanCleanup,
635
636
  onCloseAutoFocus: st("delete-appointment"),
636
637
  onConfirm: async (w) => {
637
638
  await le(w), Ie("delete");
@@ -649,7 +650,7 @@ function ic({
649
650
  request: v
650
651
  }) {
651
652
  const [g, b] = _(i), p = $(null);
652
- return V(() => {
653
+ return G(() => {
653
654
  var N, k;
654
655
  i && (b(!0), (N = p.current) != null && N.contains(document.activeElement) || (k = p.current) == null || k.focus());
655
656
  }, [i, v]), /* @__PURE__ */ I(Sn, { children: [
@@ -671,7 +672,7 @@ function oc({
671
672
  patientId: r,
672
673
  onChange: s
673
674
  }) {
674
- return V(() => {
675
+ return G(() => {
675
676
  s(r);
676
677
  }, [r, s]), null;
677
678
  }
@@ -805,7 +806,7 @@ const mc = [
805
806
  ], hc = (r, s) => r === s || !!r && !!s && Ks.every((i) => r[i] === s[i]);
806
807
  function fc(r, s) {
807
808
  const [i, v] = _(null);
808
- return V(() => {
809
+ return G(() => {
809
810
  const g = s.current;
810
811
  if (!r || !g) return;
811
812
  const b = () => {
@@ -918,7 +919,7 @@ function yc({
918
919
  colId: "time",
919
920
  headerName: k(P("columns.time")),
920
921
  width: 110,
921
- valueGetter: (he) => he.data ? he.data.allDay ? l("calendar.allDay") : _r(p, he.data.start, he.data.end) : ""
922
+ valueGetter: (ve) => ve.data ? ve.data.allDay ? l("calendar.allDay") : _r(p, ve.data.start, ve.data.end) : ""
922
923
  },
923
924
  {
924
925
  colId: "patient",
@@ -937,23 +938,23 @@ function yc({
937
938
  colId: "operator",
938
939
  headerName: k(P("columns.operator")),
939
940
  width: 132,
940
- valueGetter: (he) => {
941
- var x;
942
- return ((x = N.operators.find((ie) => {
941
+ valueGetter: (ve) => {
942
+ var S;
943
+ return ((S = N.operators.find((ie) => {
943
944
  var X;
944
- return ie.id === ((X = he.data) == null ? void 0 : X.operatorId);
945
- })) == null ? void 0 : x.title) ?? "—";
945
+ return ie.id === ((X = ve.data) == null ? void 0 : X.operatorId);
946
+ })) == null ? void 0 : S.title) ?? "—";
946
947
  }
947
948
  }) : i === "operator" ? O.push({
948
949
  colId: "chair",
949
950
  headerName: k(P("columns.chair")),
950
951
  width: 64,
951
- valueGetter: (he) => {
952
- var x;
953
- return ((x = N.chairs.find((ie) => {
952
+ valueGetter: (ve) => {
953
+ var S;
954
+ return ((S = N.chairs.find((ie) => {
954
955
  var X;
955
- return ie.id === ((X = he.data) == null ? void 0 : X.chairId);
956
- })) == null ? void 0 : x.title) ?? "—";
956
+ return ie.id === ((X = ve.data) == null ? void 0 : X.chairId);
957
+ })) == null ? void 0 : S.title) ?? "—";
957
958
  }
958
959
  }) : O.push({
959
960
  colId: "allocation",
@@ -964,18 +965,18 @@ function yc({
964
965
  colId: "status",
965
966
  headerName: k(P("columns.status")),
966
967
  width: 90,
967
- valueGetter: (he) => {
968
- var x;
969
- return (x = he.data) != null && x.status ? l(li[he.data.status]) : "";
968
+ valueGetter: (ve) => {
969
+ var S;
970
+ return (S = ve.data) != null && S.status ? l(li[ve.data.status]) : "";
970
971
  }
971
972
  }), O;
972
- }, [i, p, k, l, N]), j = i === "none" ? 2 : 1, xe = B(
973
+ }, [i, p, k, l, N]), V = i === "none" ? 2 : 1, xe = B(
973
974
  () => ({
974
975
  domLayout: "print",
975
976
  suppressColumnVirtualisation: !0,
976
977
  suppressCellFocus: !0,
977
978
  getRowId: (O) => O.data.id,
978
- getRowHeight: (O) => O.data ? as(O.data, j) : null,
979
+ getRowHeight: (O) => O.data ? as(O.data, V) : null,
979
980
  defaultColDef: {
980
981
  sortable: !1,
981
982
  resizable: !1,
@@ -987,11 +988,11 @@ function yc({
987
988
  headerClass: rs
988
989
  }
989
990
  }),
990
- [j]
991
+ [V]
991
992
  );
992
993
  if (typeof document > "u") return null;
993
994
  const se = v.length >= N.chairs.length ? k(P("allChairs")) : N.chairs.filter((O) => v.includes(O.id)).map((O) => O.title).join(", "), U = mo(N), Be = g.length >= U.length ? k(P("allOperators")) : U.filter((O) => g.includes(O.id)).map((O) => O.title).join(", "), Ne = (O) => {
994
- var he;
995
+ var ve;
995
996
  switch (O.kind) {
996
997
  case "closed":
997
998
  return k("calendarWorkspace.print.closedDay");
@@ -1002,8 +1003,8 @@ function yc({
1002
1003
  case "nonWorking":
1003
1004
  return k(P("closedDay"));
1004
1005
  case "absence": {
1005
- const x = ((he = N.operators.find((ie) => ie.id === O.operatorId)) == null ? void 0 : he.title) ?? "";
1006
- return O.title ? k(P("absenceTitled"), { name: x, title: O.title }) : k(P("absence"), { name: x });
1006
+ const S = ((ve = N.operators.find((ie) => ie.id === O.operatorId)) == null ? void 0 : ve.title) ?? "";
1007
+ return O.title ? k(P("absenceTitled"), { name: S, title: O.title }) : k(P("absence"), { name: S });
1007
1008
  }
1008
1009
  }
1009
1010
  };
@@ -1027,13 +1028,13 @@ function yc({
1027
1028
  Be
1028
1029
  ] }),
1029
1030
  b ? /* @__PURE__ */ n("p", { className: "type-body-sm", children: k(P("privacyNote")) }) : null,
1030
- r.map((O, he) => {
1031
- const x = vr(O.date), ie = O.groups.some((X) => X.rows.length > 0);
1031
+ r.map((O, ve) => {
1032
+ const S = vr(O.date), ie = O.groups.some((X) => X.rows.length > 0);
1032
1033
  return /* @__PURE__ */ I(
1033
1034
  "section",
1034
1035
  {
1035
- "data-print-day": x,
1036
- className: ie && he > 0 ? "ds:break-before-page" : void 0,
1036
+ "data-print-day": S,
1037
+ className: ie && ve > 0 ? "ds:break-before-page" : void 0,
1037
1038
  children: [
1038
1039
  /* @__PURE__ */ n("h2", { className: "type-title-section ds:mt-[var(--spacing-md)]", children: gr(p, O.date) }),
1039
1040
  ie ? O.groups.map((X) => /* @__PURE__ */ I(
@@ -1054,10 +1055,10 @@ function yc({
1054
1055
  printMode: !0,
1055
1056
  density: "compact",
1056
1057
  bordered: !0,
1057
- gridId: `print-${x}-${X.id}`,
1058
+ gridId: `print-${S}-${X.id}`,
1058
1059
  gridOptions: xe
1059
1060
  },
1060
- X.rows.map((E) => as(E, j)).join(".")
1061
+ X.rows.map((x) => as(x, V)).join(".")
1061
1062
  )
1062
1063
  )
1063
1064
  ]
@@ -1083,7 +1084,7 @@ function yc({
1083
1084
  ))
1084
1085
  ]
1085
1086
  },
1086
- x
1087
+ S
1087
1088
  );
1088
1089
  })
1089
1090
  ]
@@ -1106,25 +1107,25 @@ function Sc({
1106
1107
  onOpenWaitingList: l,
1107
1108
  onAddWaitingEntry: P,
1108
1109
  onOpenOnlineBookings: le,
1109
- onlineBookingsCount: j,
1110
+ onlineBookingsCount: V,
1110
1111
  waitingBadgeCount: xe,
1111
1112
  onVisibleRangeChange: se,
1112
1113
  onRetryLoad: U,
1113
1114
  selectedEventId: Be,
1114
1115
  gotoRequest: Ne,
1115
1116
  onBookSlot: O,
1116
- onBookSlotFromFinder: he,
1117
- display: x,
1117
+ onBookSlotFromFinder: ve,
1118
+ display: S,
1118
1119
  setDisplay: ie,
1119
1120
  defaultDisplay: X,
1120
- onHistory: E,
1121
+ onHistory: x,
1121
1122
  readOnly: J = !1,
1122
- reviewOnlyEventIds: ge,
1123
- detailsOnEveryClick: Ft = !1,
1124
- gridHeld: G = !1,
1123
+ reviewOnlyEventIds: he,
1124
+ detailsOnEveryClick: Nt = !1,
1125
+ gridHeld: j = !1,
1125
1126
  placement: K = null,
1126
1127
  onPlacementEnd: ae,
1127
- createMode: ke = null,
1128
+ createMode: ue = null,
1128
1129
  onCreateModeEnd: st,
1129
1130
  focusScroll: Ie = null,
1130
1131
  saveNotice: je = null,
@@ -1134,13 +1135,13 @@ function Sc({
1134
1135
  availabilityContext: Te,
1135
1136
  availableTools: _e,
1136
1137
  schedulerLicenseKey: Bt,
1137
- id: Nt = Dc,
1138
+ id: wt = Dc,
1138
1139
  preferences: w,
1139
1140
  onMoveOccurrence: ce,
1140
- onMoveAppointment: me,
1141
+ onMoveAppointment: fe,
1141
1142
  onResizeAppointment: Ye,
1142
1143
  onCopyAppointment: Vt,
1143
- onDeleteAppointment: wt,
1144
+ onDeleteAppointment: Et,
1144
1145
  onRecurringScopeChosen: oe,
1145
1146
  onViewChange: ar,
1146
1147
  initialView: jt,
@@ -1151,8 +1152,8 @@ function Sc({
1151
1152
  onToggleSettings: sr,
1152
1153
  onSettingChanged: Ue,
1153
1154
  onHoursOpened: kn,
1154
- practiceSettings: Et,
1155
- onMoveDropped: St,
1155
+ practiceSettings: St,
1156
+ onMoveDropped: xt,
1156
1157
  onPrintUsed: An,
1157
1158
  onJumpToDateUsed: zn,
1158
1159
  calendarArchive: Hn,
@@ -1167,15 +1168,15 @@ function Sc({
1167
1168
  ),
1168
1169
  [_e]
1169
1170
  ), f = Cr(), { t: it } = gt("ui"), { open: Wn } = ho(), D = (e) => `calendarWorkspace.${e}`, L = (e) => `calendarWorkspace.inc1.${e}`, et = $(null), [ee, ot] = _(null);
1170
- V(() => {
1171
+ G(() => {
1171
1172
  if (!ee) return;
1172
1173
  const e = new MutationObserver(() => {
1173
1174
  ee.el.isConnected || ot(null);
1174
1175
  }), c = ee.el.closest('[data-component="calendar"]');
1175
1176
  return c && e.observe(c, { childList: !0, subtree: !0 }), () => e.disconnect();
1176
- }, [ee]), V(
1177
+ }, [ee]), G(
1177
1178
  () => ot(null),
1178
- [Q, x.resourceKind, x.orientation]
1179
+ [Q, S.resourceKind, S.orientation]
1179
1180
  );
1180
1181
  const On = B(() => {
1181
1182
  if (!ee || Q !== ee.source) return [];
@@ -1192,13 +1193,13 @@ function Sc({
1192
1193
  )
1193
1194
  );
1194
1195
  return Q.filter(
1195
- (C) => T.delete(h(C)) && C.start.getTime() === e && C.start.getTime() + C.durationMin * 6e4 === c && (!ee.event.resourceId || (x.resourceKind === "operator" ? C.operatorId : C.chairId) === ee.event.resourceId)
1196
+ (C) => T.delete(h(C)) && C.start.getTime() === e && C.start.getTime() + C.durationMin * 6e4 === c && (!ee.event.resourceId || (S.resourceKind === "operator" ? C.operatorId : C.chairId) === ee.event.resourceId)
1196
1197
  );
1197
- }, [Q, ee, x.resourceKind]), xt = (e) => {
1198
+ }, [Q, ee, S.resourceKind]), At = (e) => {
1198
1199
  if (J || !ee || Q !== ee.source || !ee.el.isConnected)
1199
1200
  return;
1200
1201
  const c = f.cares.find((h) => h.id === e.careId);
1201
- ot(null), he({
1202
+ ot(null), ve({
1202
1203
  date: e.start,
1203
1204
  time: { hours: e.start.getHours(), minutes: e.start.getMinutes() },
1204
1205
  durationMin: e.durationMin,
@@ -1211,12 +1212,12 @@ function Sc({
1211
1212
  /* Keyboard and screen-reader users land on the next field to fill. */
1212
1213
  initialFocus: Te != null && Te.patientId ? "operator" : "patient"
1213
1214
  }), Wn("appointment-editor");
1214
- }, nn = On.length === 1 ? On[0] : void 0, At = $(xt);
1215
- At.current = xt, V(() => {
1216
- nn && !J && At.current(nn);
1215
+ }, nn = On.length === 1 ? On[0] : void 0, Wt = $(At);
1216
+ Wt.current = At, G(() => {
1217
+ nn && !J && Wt.current(nn);
1217
1218
  }, [nn, J]);
1218
1219
  const ct = $(null), Yt = fc(
1219
- x.colorAssociation === "status",
1220
+ S.colorAssociation === "status",
1220
1221
  ct
1221
1222
  ), lt = $(null);
1222
1223
  Qa(() => {
@@ -1266,26 +1267,26 @@ function Sc({
1266
1267
  () => os(f.initialDateIso, f.nowIso)
1267
1268
  ), tt = $(We), [Un, an] = _(We), [sn, Bn] = _(!0), [ut, lr] = _(!1), [Mn, qn] = _(!1), [In, bn] = _(!1), [Pn, Zt] = _(!1), [yn, Dn] = _(
1268
1269
  () => os(f.initialDateIso, f.nowIso)
1269
- ), [_t, Tn] = _(!1), [dr, ur] = _(""), [M, Le] = _(null), [A, bt] = _(null), [Wt, on] = _(null), [$t, Ot] = _(!1), [fe, Kn] = _(!1), [pr, yt] = _(""), [ve, Rt] = _("this"), _n = $(0), zt = m(
1270
+ ), [_t, Tn] = _(!1), [dr, ur] = _(""), [M, Le] = _(null), [A, bt] = _(null), [Ot, on] = _(null), [$t, Lt] = _(!1), [ge, Kn] = _(!1), [pr, yt] = _(""), [ke, Rt] = _("this"), _n = $(0), zt = m(
1270
1271
  (e) => {
1271
1272
  var c, h;
1272
1273
  return ce !== void 0 && e.isRecurrenceParent === !0 && !((h = (c = r.find((T) => T.event.id === e.id)) == null ? void 0 : c.series) != null && h.detached);
1273
1274
  },
1274
1275
  [ce, r]
1275
1276
  ), Gn = m(
1276
- (e, c, h) => me !== void 0 && Pr(e.patientId, f).assigned && (!c || h === "this"),
1277
- [f, me]
1277
+ (e, c, h) => fe !== void 0 && Pr(e.patientId, f).assigned && (!c || h === "this"),
1278
+ [f, fe]
1278
1279
  ), cn = $(null), [Ht, yr] = _(null), Vn = m((e) => {
1279
1280
  const c = cn.current;
1280
1281
  if (!c) return !1;
1281
1282
  const h = e.getTime();
1282
1283
  return h >= c.start && h < c.end;
1283
1284
  }, []);
1284
- V(() => {
1285
+ G(() => {
1285
1286
  var e;
1286
1287
  Ne && !Vn(Ne.date) && ((e = et.current) == null || e.gotoDate(Ne.date));
1287
1288
  }, [Ne, Vn]);
1288
- const we = vi[Pe], de = we === "Month", z = de ? "none" : x.resourceKind, Nn = de ? "dayGridMonth" : z === "none" ? `timeGrid${we}` : `resourceTimeGrid${we}${z === "operator" ? "Operator" : "Chair"}`, $n = $({ view: "day", axis: void 0 });
1289
+ const we = vi[Pe], de = we === "Month", z = de ? "none" : S.resourceKind, Nn = de ? "dayGridMonth" : z === "none" ? `timeGrid${we}` : `resourceTimeGrid${we}${z === "operator" ? "Operator" : "Chair"}`, $n = $({ view: "day", axis: void 0 });
1289
1290
  $n.current = {
1290
1291
  view: Pe,
1291
1292
  axis: de || Me ? void 0 : z
@@ -1329,7 +1330,7 @@ function Sc({
1329
1330
  e[C] === "error" ? Ct.includes(T.getDay()) || h.push(C) : e[C] !== "ready" && c.push(C), T.setDate(T.getDate() + 1);
1330
1331
  }
1331
1332
  return { loadingDates: c, errorDates: h };
1332
- }, [f.dayLoadState, Ht, Ct]), $e = Ci(x.window, f), mt = B(() => {
1333
+ }, [f.dayLoadState, Ht, Ct]), $e = Ci(S.window, f), mt = B(() => {
1333
1334
  const e = new Date(yn);
1334
1335
  return e.setHours(0, 0, 0, 0), [e];
1335
1336
  }, [yn]), rt = B(
@@ -1354,14 +1355,14 @@ function Sc({
1354
1355
  f
1355
1356
  ]
1356
1357
  );
1357
- V(() => {
1358
+ G(() => {
1358
1359
  _t && (Tn(!1), window.print());
1359
1360
  }, [_t]);
1360
1361
  const Xn = m(
1361
1362
  (e) => {
1362
1363
  var T;
1363
1364
  const c = { contextLabel: void 0, contextName: void 0 };
1364
- if (!x.showCardContext) return c;
1365
+ if (!S.showCardContext) return c;
1365
1366
  if (z === "operator")
1366
1367
  return {
1367
1368
  contextLabel: (T = f.chairs.find((C) => C.id === e.chairId)) == null ? void 0 : T.title,
@@ -1375,18 +1376,18 @@ function Sc({
1375
1376
  contextName: h.title
1376
1377
  } : c;
1377
1378
  },
1378
- [x.showCardContext, z, f.chairs, f.operators]
1379
+ [S.showCardContext, z, f.chairs, f.operators]
1379
1380
  ), Jn = B(() => {
1380
1381
  const e = r.filter(
1381
1382
  (R) => (!R.chairId || Ut.includes(R.chairId)) && (!R.operatorId || Mt.includes(R.operatorId))
1382
- ).filter((R) => x.showCancelled || R.event.status !== "cancelled").map((R) => ({
1383
+ ).filter((R) => S.showCancelled || R.event.status !== "cancelled").map((R) => ({
1383
1384
  ...R.event,
1384
- ...ls(R, x.colorAssociation, f, Yt),
1385
+ ...ls(R, S.colorAssociation, f, Yt),
1385
1386
  ...Xn(R),
1386
1387
  resourceId: z === "operator" ? R.operatorId : R.chairId,
1387
1388
  suffix: bi(
1388
1389
  { description: R.description, cares: R.cares },
1389
- x.careDescription
1390
+ S.careDescription
1390
1391
  ),
1391
1392
  /* Per-event `editable: true` is the COMPONENT's documented escape
1392
1393
  hatch from a calendar-level `editable={false}` — so host row
@@ -1394,7 +1395,7 @@ function Sc({
1394
1395
  `readOnly` is a permission, not a default, and a permission
1395
1396
  nothing in the payload may widen: both flags are overwritten
1396
1397
  AFTER the spread. */
1397
- ...It || ge != null && ge.has(R.event.id) ? { editable: !1, startEditable: !1 } : {},
1398
+ ...It || he != null && he.has(R.event.id) ? { editable: !1, startEditable: !1 } : {},
1398
1399
  /* A shown cancelled appointment steps back and cannot move or
1399
1400
  resize, whatever the row says: same overwrite-after-spread rule.
1400
1401
  It still opens in details on click. */
@@ -1403,7 +1404,7 @@ function Sc({
1403
1404
  c.setDate(c.getDate() - (de ? 42 : 7));
1404
1405
  const h = new Date(We);
1405
1406
  h.setDate(h.getDate() + (de ? 42 : 13));
1406
- const T = sn && x.orientation === "vertical" && !de, C = yi(
1407
+ const T = sn && S.orientation === "vertical" && !de, C = yi(
1407
1408
  {
1408
1409
  axisKind: z,
1409
1410
  rangeStart: c,
@@ -1431,7 +1432,7 @@ function Sc({
1431
1432
  ...!J && R.slotCount === 1 ? { bookable: !0 } : {},
1432
1433
  ...R.resourceId ? { resourceId: R.resourceId } : {}
1433
1434
  });
1434
- const S = nt ? [] : Ti(
1435
+ const E = nt ? [] : Ti(
1435
1436
  {
1436
1437
  axisKind: z,
1437
1438
  rangeStart: c,
@@ -1467,7 +1468,7 @@ function Sc({
1467
1468
  ...e,
1468
1469
  ...Y,
1469
1470
  ...W,
1470
- ...S,
1471
+ ...E,
1471
1472
  ...C
1472
1473
  ];
1473
1474
  }, [
@@ -1480,14 +1481,14 @@ function Sc({
1480
1481
  Mt,
1481
1482
  We,
1482
1483
  sn,
1483
- x.orientation,
1484
- x.careDescription,
1485
- x.colorAssociation,
1486
- x.showCancelled,
1484
+ S.orientation,
1485
+ S.careDescription,
1486
+ S.colorAssociation,
1487
+ S.showCancelled,
1487
1488
  Yt,
1488
1489
  de,
1489
1490
  It,
1490
- ge,
1491
+ he,
1491
1492
  J,
1492
1493
  o,
1493
1494
  f,
@@ -1502,34 +1503,34 @@ function Sc({
1502
1503
  would corrupt them. */
1503
1504
  title: Ni(
1504
1505
  e,
1505
- f.inactiveOperatorIds.includes(e.id) && x.operatorNameDisplay !== "initials",
1506
+ f.inactiveOperatorIds.includes(e.id) && S.operatorNameDisplay !== "initials",
1506
1507
  o(L("filters.disabledOperator"))
1507
1508
  ),
1508
1509
  ...sn ? { hiddenDates: f.operatorAbsences[e.id] } : {}
1509
1510
  })) : f.chairs.filter((e) => Ut.includes(e.id)).map((e) => ({
1510
1511
  ...e,
1511
- title: wi(e, x.chairNameDisplay)
1512
+ title: wi(e, S.chairNameDisplay)
1512
1513
  })), Re = K ? r.find((e) => e.event.id === K.eventId) : void 0;
1513
- V(() => {
1514
+ G(() => {
1514
1515
  K && !Re && (ae == null || ae());
1515
1516
  }, [K, Re, ae]);
1516
- const un = K && Re ? K.kind : ke ? "create" : "default", ht = K && Re ? ls(
1517
+ const un = K && Re ? K.kind : ue ? "create" : "default", ht = K && Re ? ls(
1517
1518
  Re,
1518
- x.colorAssociation,
1519
+ S.colorAssociation,
1519
1520
  f,
1520
1521
  Yt
1521
- ).backgroundColor ?? Re.event.backgroundColor : ke == null ? void 0 : ke.prefill.colorHex, Zn = Ei(ht), Tr = K && Re ? o(L(`placement.${K.kind}Banner`), {
1522
+ ).backgroundColor ?? Re.event.backgroundColor : ue == null ? void 0 : ue.prefill.colorHex, Zn = Ei(ht), Tr = K && Re ? o(L(`placement.${K.kind}Banner`), {
1522
1523
  name: ya(Re.event, Oe)
1523
- }) : ke ? ke.patientName && !Oe ? o(L("placement.createBannerNamed"), {
1524
- name: ke.patientName
1525
- }) : o(L("placement.createBanner")) : void 0, ue = m(() => {
1524
+ }) : ue ? ue.patientName && !Oe ? o(L("placement.createBannerNamed"), {
1525
+ name: ue.patientName
1526
+ }) : o(L("placement.createBanner")) : void 0, pe = m(() => {
1526
1527
  if (K) {
1527
1528
  ae == null || ae();
1528
1529
  return;
1529
1530
  }
1530
1531
  st == null || st();
1531
1532
  }, [K, ae, st]), Qn = $(0);
1532
- V(() => {
1533
+ G(() => {
1533
1534
  if (!Ie || Ie.tick === Qn.current || !r.some((c) => c.event.id === Ie.eventId)) return;
1534
1535
  Qn.current = Ie.tick;
1535
1536
  const e = window.setTimeout(
@@ -1542,7 +1543,7 @@ function Sc({
1542
1543
  return () => window.clearTimeout(e);
1543
1544
  }, [Ie, r]);
1544
1545
  const Ge = $(0);
1545
- V(() => {
1546
+ G(() => {
1546
1547
  if (!je || je.tick === Ge.current) return;
1547
1548
  Ge.current = je.tick;
1548
1549
  const e = Si(je, {
@@ -1566,7 +1567,7 @@ function Sc({
1566
1567
  var T;
1567
1568
  if (e.includes("chair") && Pt([]), e.includes("operator") && Jt([]), e.includes("day")) {
1568
1569
  const C = je.date.getDay();
1569
- Ln((W) => W.filter((S) => S !== C));
1570
+ Ln((W) => W.filter((E) => E !== C));
1570
1571
  }
1571
1572
  (T = et.current) == null || T.gotoDate(je.date);
1572
1573
  }
@@ -1586,19 +1587,19 @@ function Sc({
1586
1587
  const er = m(
1587
1588
  (e) => {
1588
1589
  if (Le(null), K) return;
1589
- if (ge != null && ge.has(e.id)) {
1590
+ if (he != null && he.has(e.id)) {
1590
1591
  b({ kind: "appointment", eventId: e.id });
1591
1592
  return;
1592
1593
  }
1593
1594
  const c = r.find((h) => h.event.id === e.id);
1594
- if (c && Ft) {
1595
+ if (c && Nt) {
1595
1596
  b({ kind: "appointment", eventId: e.id });
1596
1597
  return;
1597
1598
  }
1598
1599
  if (!(c != null && c.event.detailsPending)) {
1599
1600
  if (Lr(e.patientId) === "") {
1600
1601
  if (!c) return;
1601
- if (G) {
1602
+ if (j) {
1602
1603
  b({ kind: "appointment", eventId: e.id });
1603
1604
  return;
1604
1605
  }
@@ -1617,9 +1618,9 @@ function Sc({
1617
1618
  Wn,
1618
1619
  K,
1619
1620
  f,
1620
- ge,
1621
- Ft,
1622
- G
1621
+ he,
1622
+ Nt,
1623
+ j
1623
1624
  ]
1624
1625
  ), ze = ni(), u = m(
1625
1626
  (e) => {
@@ -1639,10 +1640,10 @@ function Sc({
1639
1640
  be.current = vn;
1640
1641
  const Fe = m(
1641
1642
  (e) => {
1642
- var S;
1643
+ var E;
1643
1644
  tt.current = e.currentDate;
1644
1645
  const { view: c, axis: h } = $n.current, T = vr(e.currentDate), C = `${c}|${h ?? ""}|${T}`;
1645
- F.current !== null && F.current !== C && ((S = be.current) == null || S.call(be, { view: c, date: T, ...h ? { axis: h } : {} })), F.current = C, cn.current = {
1646
+ F.current !== null && F.current !== C && ((E = be.current) == null || E.call(be, { view: c, date: T, ...h ? { axis: h } : {} })), F.current = C, cn.current = {
1646
1647
  start: e.start.getTime(),
1647
1648
  end: e.end.getTime()
1648
1649
  }, ur(e.title);
@@ -1659,21 +1660,21 @@ function Sc({
1659
1660
  const T = r.find((W) => W.event.id === h);
1660
1661
  if (!T || Lr(T.event.patientId) === "") continue;
1661
1662
  const C = new Date(T.event.start);
1662
- E(h, {
1663
+ x(h, {
1663
1664
  kind: "moved",
1664
1665
  fromIso: C.toISOString(),
1665
1666
  toIso: new Date(C.getTime() + c).toISOString()
1666
1667
  });
1667
1668
  }
1668
1669
  },
1669
- [r, E]
1670
+ [r, x]
1670
1671
  ), Je = m(
1671
1672
  (e) => {
1672
1673
  const c = /* @__PURE__ */ new WeakMap(), h = e.newStart.getTime() - e.oldStart.getTime(), T = /* @__PURE__ */ new Set([e.eventId, ...e.alsoIds ?? []]);
1673
1674
  return s(
1674
1675
  (C) => C.map((W) => {
1675
1676
  if (!T.has(W.event.id)) return W;
1676
- const S = W.event.id === e.eventId, Y = S ? e.newStart : new Date(new Date(W.event.start).getTime() + h), ye = S && e.newEnd ? e.newEnd : W.event.end ? new Date(new Date(W.event.end).getTime() + h) : void 0, R = {
1677
+ const E = W.event.id === e.eventId, Y = E ? e.newStart : new Date(new Date(W.event.start).getTime() + h), ye = E && e.newEnd ? e.newEnd : W.event.end ? new Date(new Date(W.event.end).getTime() + h) : void 0, R = {
1677
1678
  ...W,
1678
1679
  ...e.resourceId ? z === "operator" ? { operatorId: e.resourceId } : { chairId: e.resourceId } : {},
1679
1680
  event: {
@@ -1693,19 +1694,19 @@ function Sc({
1693
1694
  () => T == null ? void 0 : T(),
1694
1695
  (W) => {
1695
1696
  s(c);
1696
- const S = W instanceof Error && W.message.trim() ? W.message : h;
1697
- C !== void 0 && yt(C), S && ro(S);
1697
+ const E = W instanceof Error && W.message.trim() ? W.message : h;
1698
+ C !== void 0 && yt(C), E && ro(E);
1698
1699
  }
1699
1700
  );
1700
1701
  },
1701
1702
  [s]
1702
1703
  ), pn = m(
1703
1704
  (e, c, h) => {
1704
- if (!me) {
1705
+ if (!fe) {
1705
1706
  Je(e);
1706
1707
  return;
1707
1708
  }
1708
- const T = e.resourceId, C = me({
1709
+ const T = e.resourceId, C = fe({
1709
1710
  eventId: e.eventId,
1710
1711
  scope: c,
1711
1712
  alsoEventIds: e.alsoIds ?? [],
@@ -1724,14 +1725,14 @@ function Sc({
1724
1725
  o(D("moveConfirm.revertReadout"))
1725
1726
  );
1726
1727
  },
1727
- [me, Je, z, Ze, Ce, o]
1728
+ [fe, Je, z, Ze, Ce, o]
1728
1729
  ), mn = m(
1729
1730
  (e, c) => {
1730
1731
  const h = /* @__PURE__ */ new WeakMap();
1731
1732
  return s((T) => {
1732
1733
  const C = xi(T, e, c);
1733
- return C.forEach((W, S) => {
1734
- W !== T[S] && h.set(W, T[S]);
1734
+ return C.forEach((W, E) => {
1735
+ W !== T[E] && h.set(W, T[E]);
1735
1736
  }), C;
1736
1737
  }), (T) => T.map((C) => h.get(C) ?? C);
1737
1738
  },
@@ -1741,42 +1742,42 @@ function Sc({
1741
1742
  const h = r.find((W) => W.event.id === e);
1742
1743
  return { rollback: mn(e, c), record: () => {
1743
1744
  if (h != null && h.event.end && Lr(h.event.patientId) !== "") {
1744
- const W = ea(h.event.start, h.event.end), S = ea(h.event.start, c);
1745
- W !== S && E(e, { kind: "resized", fromMin: W, toMin: S });
1745
+ const W = ea(h.event.start, h.event.end), E = ea(h.event.start, c);
1746
+ W !== E && x(e, { kind: "resized", fromMin: W, toMin: E });
1746
1747
  }
1747
1748
  } };
1748
1749
  },
1749
- [mn, r, E]
1750
- ), vt = Et == null ? void 0 : Et.value.patientNotices, wn = (vt == null ? void 0 : vt.moved) !== !1, En = (vt == null ? void 0 : vt.reminderSms) === !0, ia = (vt == null ? void 0 : vt.reminderEmail) === !0, Nr = m(
1750
+ [mn, r, x]
1751
+ ), vt = St == null ? void 0 : St.value.patientNotices, wn = (vt == null ? void 0 : vt.moved) !== !1, En = (vt == null ? void 0 : vt.reminderSms) === !0, ia = (vt == null ? void 0 : vt.reminderEmail) === !0, Nr = m(
1751
1752
  (e) => {
1752
1753
  const c = ds(Pr(e, f));
1753
- Ot(us(c.sms) && En), Kn(us(c.email) && ia);
1754
+ Lt(us(c.sms) && En), Kn(us(c.email) && ia);
1754
1755
  },
1755
1756
  [f, En, ia]
1756
1757
  ), tr = m(
1757
1758
  (e) => {
1758
1759
  var T, C, W;
1759
1760
  if (e.event.id === Ma) {
1760
- const S = new Date(e.newStart), Y = e.newResourceId, ye = () => {
1761
+ const E = new Date(e.newStart), Y = e.newResourceId, ye = () => {
1761
1762
  var De;
1762
1763
  (De = e.revert) == null || De.call(e), v == null || v({
1763
1764
  date: new Date(
1764
- S.getFullYear(),
1765
- S.getMonth(),
1766
- S.getDate()
1765
+ E.getFullYear(),
1766
+ E.getMonth(),
1767
+ E.getDate()
1767
1768
  ),
1768
1769
  /* A Month drop lands on a day, not a slot: keep the time. */
1769
- time: de && i ? i.time : { hours: S.getHours(), minutes: S.getMinutes() },
1770
+ time: de && i ? i.time : { hours: E.getHours(), minutes: E.getMinutes() },
1770
1771
  ...Y && z === "operator" ? { operatorId: Y } : {},
1771
1772
  ...Y && z === "chair" ? { chairId: Y } : {}
1772
1773
  });
1773
1774
  }, R = f.closureOn(
1774
- vr(S),
1775
+ vr(E),
1775
1776
  z === "operator" ? Y : i == null ? void 0 : i.operatorId
1776
1777
  );
1777
1778
  if (R) {
1778
1779
  on({
1779
- reason: Qr(o, p, R, S, f),
1780
+ reason: Qr(o, p, R, E, f),
1780
1781
  action: "move",
1781
1782
  onConfirm: ye,
1782
1783
  onCancel: () => {
@@ -1789,7 +1790,7 @@ function Sc({
1789
1790
  ye();
1790
1791
  return;
1791
1792
  }
1792
- if (ge != null && ge.has(e.event.id)) {
1793
+ if (he != null && he.has(e.event.id)) {
1793
1794
  (T = e.revert) == null || T.call(e);
1794
1795
  return;
1795
1796
  }
@@ -1797,13 +1798,13 @@ function Sc({
1797
1798
  (C = e.revert) == null || C.call(e), J && hn(o(L("readOnly.changeBlocked")));
1798
1799
  return;
1799
1800
  }
1800
- St == null || St(e.event.id);
1801
- const c = z === "operator" ? e.newResourceId ?? e.event.resourceId : (W = r.find((S) => S.event.id === e.event.id)) == null ? void 0 : W.operatorId, h = f.closureOn(
1801
+ xt == null || xt(e.event.id);
1802
+ const c = z === "operator" ? e.newResourceId ?? e.event.resourceId : (W = r.find((E) => E.event.id === e.event.id)) == null ? void 0 : W.operatorId, h = f.closureOn(
1802
1803
  vr(e.newStart),
1803
1804
  c
1804
1805
  );
1805
1806
  if (ga(e.event) && !zt(e.event)) {
1806
- const S = () => {
1807
+ const E = () => {
1807
1808
  pn(
1808
1809
  {
1809
1810
  eventId: e.event.id,
@@ -1820,7 +1821,7 @@ function Sc({
1820
1821
  on({
1821
1822
  reason: Qr(o, p, h, e.newStart, f),
1822
1823
  action: "move",
1823
- onConfirm: S,
1824
+ onConfirm: E,
1824
1825
  onCancel: () => {
1825
1826
  var Y;
1826
1827
  return (Y = e.revert) == null ? void 0 : Y.call(e);
@@ -1828,7 +1829,7 @@ function Sc({
1828
1829
  });
1829
1830
  return;
1830
1831
  }
1831
- S();
1832
+ E();
1832
1833
  return;
1833
1834
  }
1834
1835
  yt(""), Rt("this"), Nr(Lr(e.event.patientId)), bt({
@@ -1853,23 +1854,23 @@ function Sc({
1853
1854
  f,
1854
1855
  J,
1855
1856
  It,
1856
- ge,
1857
- St,
1857
+ he,
1858
+ xt,
1858
1859
  v,
1859
1860
  i,
1860
1861
  de
1861
1862
  ]
1862
1863
  ), Ea = m(
1863
1864
  (e) => {
1864
- var S, Y, ye;
1865
+ var E, Y, ye;
1865
1866
  if (e.event.id === Ma) {
1866
- if ((S = e.revert) == null || S.call(e), de || i != null && i.allDay) return;
1867
+ if ((E = e.revert) == null || E.call(e), de || i != null && i.allDay) return;
1867
1868
  g == null || g(
1868
1869
  Math.max(5, ea(e.event.start, e.newEnd))
1869
1870
  );
1870
1871
  return;
1871
1872
  }
1872
- if (ge != null && ge.has(e.event.id)) {
1873
+ if (he != null && he.has(e.event.id)) {
1873
1874
  (Y = e.revert) == null || Y.call(e);
1874
1875
  return;
1875
1876
  }
@@ -1886,7 +1887,7 @@ function Sc({
1886
1887
  label: o(L("resize.undo")),
1887
1888
  onClick: () => {
1888
1889
  const Dt = mn(c, h), Gt = () => {
1889
- E(c, {
1890
+ x(c, {
1890
1891
  kind: "resized",
1891
1892
  fromMin: R,
1892
1893
  toMin: De
@@ -1919,22 +1920,22 @@ function Sc({
1919
1920
  Ze,
1920
1921
  Ye,
1921
1922
  Oe,
1922
- E,
1923
+ x,
1923
1924
  o,
1924
1925
  J,
1925
1926
  It,
1926
- ge,
1927
+ he,
1927
1928
  g,
1928
1929
  de,
1929
1930
  i
1930
1931
  ]
1931
1932
  ), Sa = m(() => {
1932
1933
  if (!A) return;
1933
- const { event: e, oldStart: c, newStart: h, newEnd: T } = A, C = zt(e), W = r.find((De) => De.event.id === e.id), S = C || Ta(W);
1934
- if (S && (oe == null || oe({ action: "move", scope: ve })), ce && C && ve !== "this") {
1934
+ const { event: e, oldStart: c, newStart: h, newEnd: T } = A, C = zt(e), W = r.find((De) => De.event.id === e.id), E = C || Ta(W);
1935
+ if (E && (oe == null || oe({ action: "move", scope: ke })), ce && C && ke !== "this") {
1935
1936
  const De = A.newResourceId ?? e.resourceId, Kt = ce({
1936
1937
  eventId: e.id,
1937
- scope: ve,
1938
+ scope: ke,
1938
1939
  oldStart: c,
1939
1940
  newStart: h,
1940
1941
  newEnd: T,
@@ -1962,10 +1963,10 @@ function Sc({
1962
1963
  const Y = Ga(
1963
1964
  r,
1964
1965
  A.event.id,
1965
- ve
1966
- ).filter((De) => De !== A.event.id), ye = wn && Gn(e, S, ve) ? {
1966
+ ke
1967
+ ).filter((De) => De !== A.event.id), ye = wn && Gn(e, E, ke) ? {
1967
1968
  sms: $t,
1968
- email: fe
1969
+ email: ge
1969
1970
  } : ba;
1970
1971
  pn(
1971
1972
  {
@@ -1976,7 +1977,7 @@ function Sc({
1976
1977
  newEnd: A.newEnd,
1977
1978
  alsoIds: Y
1978
1979
  },
1979
- ve,
1980
+ ke,
1980
1981
  ye
1981
1982
  );
1982
1983
  const R = [
@@ -1991,7 +1992,7 @@ function Sc({
1991
1992
  }, [
1992
1993
  A,
1993
1994
  $t,
1994
- fe,
1995
+ ge,
1995
1996
  wn,
1996
1997
  Je,
1997
1998
  pn,
@@ -2000,7 +2001,7 @@ function Sc({
2000
2001
  Gn,
2001
2002
  o,
2002
2003
  r,
2003
- ve,
2004
+ ke,
2004
2005
  zt,
2005
2006
  ce,
2006
2007
  oe,
@@ -2025,8 +2026,8 @@ function Sc({
2025
2026
  ae == null || ae(!1), hn(o(L("readOnly.changeBlocked")));
2026
2027
  return;
2027
2028
  }
2028
- const S = Re, Y = new Date(S.event.start), ye = new Date(e.date);
2029
- if (e.allDay && !S.event.allDay && ye.setHours(
2029
+ const E = Re, Y = new Date(E.event.start), ye = new Date(e.date);
2030
+ if (e.allDay && !E.event.allDay && ye.setHours(
2030
2031
  Y.getHours(),
2031
2032
  Y.getMinutes(),
2032
2033
  0,
@@ -2034,35 +2035,35 @@ function Sc({
2034
2035
  ), K.kind === "copy") {
2035
2036
  _n.current += 1;
2036
2037
  const Kt = `apt-copy-${_n.current}`, Dt = Ai(
2037
- S,
2038
+ E,
2038
2039
  { start: ye },
2039
2040
  Kt,
2040
2041
  K.withTreatments === !0
2041
2042
  );
2042
2043
  s((re) => [...re, Dt]);
2043
2044
  let Gt = Kt, t = !1;
2044
- const a = f.metaById[S.event.id], d = Vt == null ? void 0 : Vt({
2045
- sourceId: S.event.id,
2045
+ const a = f.metaById[E.event.id], d = Vt == null ? void 0 : Vt({
2046
+ sourceId: E.event.id,
2046
2047
  row: Dt,
2047
2048
  withTreatments: K.withTreatments === !0,
2048
2049
  ...(a == null ? void 0 : a.emailReminder) !== void 0 ? { emailReminder: a.emailReminder } : {},
2049
2050
  ...(a == null ? void 0 : a.smsReminder) !== void 0 ? { smsReminder: a.smsReminder } : {}
2050
2051
  }), q = () => {
2051
- t || E(Gt, { kind: "created" });
2052
+ t || x(Gt, { kind: "created" });
2052
2053
  };
2053
2054
  d ? Ze(
2054
2055
  d.then((re) => {
2055
2056
  !re || re.id === Kt || (Gt = re.id, s(
2056
- (pe) => pe.map(
2057
+ (me) => me.map(
2057
2058
  (Se) => Se.event.id === Kt ? { ...Se, event: { ...Se.event, id: re.id } } : Se
2058
2059
  )
2059
2060
  ));
2060
2061
  }),
2061
- (re) => re.filter((pe) => pe.event.id !== Gt),
2062
+ (re) => re.filter((me) => me.event.id !== Gt),
2062
2063
  o(L("placement.copyFailed")),
2063
2064
  q
2064
2065
  ) : q();
2065
- const Ee = !Vt || wt !== void 0;
2066
+ const Ee = !Vt || Et !== void 0;
2066
2067
  fn(
2067
2068
  o(L("placement.copied"), { date: gr(p, ye) }),
2068
2069
  Ee ? {
@@ -2070,13 +2071,13 @@ function Sc({
2070
2071
  label: o(L("placement.undo")),
2071
2072
  onClick: () => {
2072
2073
  if (t = !0, s(
2073
- (pe) => pe.filter((Se) => Se.event.id !== Gt)
2074
- ), !d || !wt) {
2074
+ (me) => me.filter((Se) => Se.event.id !== Gt)
2075
+ ), !d || !Et) {
2075
2076
  fn(o(L("placement.copyUndone")));
2076
2077
  return;
2077
2078
  }
2078
- const re = (pe) => pe.some((Se) => Se.event.id === Gt) ? pe : [
2079
- ...pe,
2079
+ const re = (me) => me.some((Se) => Se.event.id === Gt) ? me : [
2080
+ ...me,
2080
2081
  {
2081
2082
  ...Dt,
2082
2083
  event: { ...Dt.event, id: Gt }
@@ -2085,7 +2086,7 @@ function Sc({
2085
2086
  d.then(
2086
2087
  () => Ze(
2087
2088
  new Promise(
2088
- (pe) => pe(wt(Gt))
2089
+ (me) => me(Et(Gt))
2089
2090
  ),
2090
2091
  re,
2091
2092
  "",
@@ -2100,11 +2101,11 @@ function Sc({
2100
2101
  ), ae == null || ae(!0);
2101
2102
  return;
2102
2103
  }
2103
- const R = S.event.end ? new Date(S.event.end).getTime() - Y.getTime() : 0, De = S.event.end ? new Date(ye.getTime() + R) : void 0;
2104
- if (ga(S.event) && !zt(S.event)) {
2104
+ const R = E.event.end ? new Date(E.event.end).getTime() - Y.getTime() : 0, De = E.event.end ? new Date(ye.getTime() + R) : void 0;
2105
+ if (ga(E.event) && !zt(E.event)) {
2105
2106
  pn(
2106
2107
  {
2107
- eventId: S.event.id,
2108
+ eventId: E.event.id,
2108
2109
  resourceId: e.resourceId,
2109
2110
  oldStart: Y,
2110
2111
  newStart: ye,
@@ -2115,10 +2116,10 @@ function Sc({
2115
2116
  ), ae == null || ae(!0);
2116
2117
  return;
2117
2118
  }
2118
- yt(""), Rt("this"), Nr(Lr(S.event.patientId)), bt({
2119
+ yt(""), Rt("this"), Nr(Lr(E.event.patientId)), bt({
2119
2120
  event: {
2120
- ...S.event,
2121
- resourceId: z === "operator" ? S.operatorId : S.chairId
2121
+ ...E.event,
2122
+ resourceId: z === "operator" ? E.operatorId : E.chairId
2122
2123
  },
2123
2124
  kind: "drop",
2124
2125
  oldStart: Y,
@@ -2137,16 +2138,16 @@ function Sc({
2137
2138
  Le(null), hn(o(L("readOnly.createBlocked")));
2138
2139
  return;
2139
2140
  }
2140
- if (Le(null), b(null), G && !ke) {
2141
+ if (Le(null), b(null), j && !ue) {
2141
2142
  c !== void 0 && ((W = (C = (T = et.current) == null ? void 0 : T.getApi()) == null ? void 0 : C.unselect) == null || W.call(C));
2142
2143
  return;
2143
2144
  }
2144
2145
  O({
2145
- ...(ke == null ? void 0 : ke.prefill) ?? {},
2146
+ ...(ue == null ? void 0 : ue.prefill) ?? {},
2146
2147
  date: e.date,
2147
2148
  /* A dragged range brings its own length; a click has none and takes
2148
2149
  the cog's default. */
2149
- durationMin: c ?? (ke == null ? void 0 : ke.prefill.durationMin) ?? x.defaultDurationMin,
2150
+ durationMin: c ?? (ue == null ? void 0 : ue.prefill.durationMin) ?? S.defaultDurationMin,
2150
2151
  ...e.allDay ? { allDay: !0 } : {
2151
2152
  time: {
2152
2153
  hours: e.date.getHours(),
@@ -2155,7 +2156,7 @@ function Sc({
2155
2156
  },
2156
2157
  ...z === "chair" && e.resourceId ? { chairId: e.resourceId } : {},
2157
2158
  ...z === "operator" && e.resourceId ? { operatorId: e.resourceId } : {}
2158
- }), ke && (st == null || st());
2159
+ }), ue && (st == null || st());
2159
2160
  },
2160
2161
  [
2161
2162
  z,
@@ -2165,29 +2166,29 @@ function Sc({
2165
2166
  p,
2166
2167
  de,
2167
2168
  hr,
2168
- x.defaultDurationMin,
2169
+ S.defaultDurationMin,
2169
2170
  J,
2170
2171
  Q,
2171
2172
  nt,
2172
2173
  K,
2173
2174
  Re,
2174
- ke,
2175
+ ue,
2175
2176
  st,
2176
2177
  s,
2177
- E,
2178
+ x,
2178
2179
  Nr,
2179
2180
  zt,
2180
2181
  ae,
2181
- G,
2182
+ j,
2182
2183
  Vt,
2183
2184
  f.metaById,
2184
- wt,
2185
+ Et,
2185
2186
  Ze,
2186
2187
  pn
2187
2188
  ]
2188
2189
  ), $r = m(
2189
2190
  (e, c) => {
2190
- const T = (!de || K) && !J && !(nt && Q) && !(G && !ke && !K) ? f.closureOn(
2191
+ const T = (!de || K) && !J && !(nt && Q) && !(j && !ue && !K) ? f.closureOn(
2191
2192
  vr(e.date),
2192
2193
  z === "operator" ? e.resourceId : void 0
2193
2194
  ) : null;
@@ -2204,8 +2205,8 @@ function Sc({
2204
2205
  action: (K == null ? void 0 : K.kind) === "move" ? "move" : "book",
2205
2206
  onConfirm: () => wr(e, c),
2206
2207
  onCancel: () => {
2207
- var W, S, Y;
2208
- c !== void 0 && ((Y = (S = (W = et.current) == null ? void 0 : W.getApi()) == null ? void 0 : S.unselect) == null || Y.call(S));
2208
+ var W, E, Y;
2209
+ c !== void 0 && ((Y = (E = (W = et.current) == null ? void 0 : W.getApi()) == null ? void 0 : E.unselect) == null || Y.call(E));
2209
2210
  }
2210
2211
  });
2211
2212
  },
@@ -2216,8 +2217,8 @@ function Sc({
2216
2217
  J,
2217
2218
  nt,
2218
2219
  Q,
2219
- G,
2220
- ke,
2220
+ j,
2221
+ ue,
2221
2222
  f,
2222
2223
  z,
2223
2224
  wr,
@@ -2247,7 +2248,7 @@ function Sc({
2247
2248
  },
2248
2249
  [qe]
2249
2250
  );
2250
- V(() => {
2251
+ G(() => {
2251
2252
  const e = (c) => {
2252
2253
  const h = $i(c);
2253
2254
  !h || Me && h === "threeDays" || (c.preventDefault(), Rr(h));
@@ -2288,7 +2289,7 @@ function Sc({
2288
2289
  lr(e), !e && Jt(
2289
2290
  (c) => c.filter((h) => !f.inactiveOperatorIds.includes(h))
2290
2291
  );
2291
- }, qt = ca && x.operatorListMode === "flat", Hr = Li(Ke, Xe), Wa = () => {
2292
+ }, qt = ca && S.operatorListMode === "flat", Hr = Li(Ke, Xe), Wa = () => {
2292
2293
  var e;
2293
2294
  (e = Xt.current) == null || e.focus(), Pt([]), Jt([]), lr(!1), Bn(!0);
2294
2295
  }, Er = o(D(`view.${Pe}`)), da = Fi(f), Oa = (e, c) => {
@@ -2298,9 +2299,9 @@ function Sc({
2298
2299
  }, Fa = () => {
2299
2300
  an(tt.current), ie((e) => ({ ...X, resourceKind: e.resourceKind })), Ln([...is]), Ue == null || Ue({ setting: "reset", section: "personal" });
2300
2301
  };
2301
- V(() => {
2302
+ G(() => {
2302
2303
  He == null || He.publish({
2303
- display: x,
2304
+ display: S,
2304
2305
  onChange: Oa,
2305
2306
  hiddenDays: Ct,
2306
2307
  onHiddenDaysChange: La,
@@ -2312,11 +2313,11 @@ function Sc({
2312
2313
  isMonth: de,
2313
2314
  hasOperatorGroups: ca,
2314
2315
  academyHref: Cn == null ? void 0 : Cn.academyHref,
2315
- practiceSettings: Et,
2316
+ practiceSettings: St,
2316
2317
  onPracticeSettingChanged: (e) => Ue == null ? void 0 : Ue({ setting: e, section: "practice" }),
2317
2318
  onHoursOpened: kn
2318
2319
  });
2319
- }), V(() => () => He == null ? void 0 : He.publish(null), [He]);
2320
+ }), G(() => () => He == null ? void 0 : He.publish(null), [He]);
2320
2321
  const Ur = (e) => /* @__PURE__ */ n(
2321
2322
  ta,
2322
2323
  {
@@ -2365,7 +2366,7 @@ function Sc({
2365
2366
  readOnly: J,
2366
2367
  availableTools: kt,
2367
2368
  waitingCount: xe,
2368
- toCompleteCount: j,
2369
+ toCompleteCount: V,
2369
2370
  onNewAppointment: N,
2370
2371
  onOpenFindSlots: () => Wn("find-slots"),
2371
2372
  onOpenWaitingList: l,
@@ -2634,7 +2635,7 @@ function Sc({
2634
2635
  /* @__PURE__ */ I(
2635
2636
  Qt.RadioGroup,
2636
2637
  {
2637
- value: x.resourceKind,
2638
+ value: S.resourceKind,
2638
2639
  onValueChange: (e) => Aa(e),
2639
2640
  children: [
2640
2641
  /* @__PURE__ */ n(Qt.RadioItem, { value: "none", disabled: de, children: o(L("view.axisNone")) }),
@@ -2699,11 +2700,11 @@ function Sc({
2699
2700
  ] })
2700
2701
  ]
2701
2702
  }
2702
- ), Lt = M ? f.metaById[M.event.id] : void 0, at = M ? r.find((e) => e.event.id === M.event.id) : void 0, Mr = ((fa = at == null ? void 0 : at.careLink) == null ? void 0 : fa.kind) === "plan" ? f.carePlanById(at.careLink.planId) : void 0, qr = Pr(M == null ? void 0 : M.event.patientId, f).record, Kr = f.chairs.find(
2703
- (e) => e.id === ((at == null ? void 0 : at.chairId) ?? (Lt == null ? void 0 : Lt.chairId))
2703
+ ), Ft = M ? f.metaById[M.event.id] : void 0, at = M ? r.find((e) => e.event.id === M.event.id) : void 0, Mr = ((fa = at == null ? void 0 : at.careLink) == null ? void 0 : fa.kind) === "plan" ? f.carePlanById(at.careLink.planId) : void 0, qr = Pr(M == null ? void 0 : M.event.patientId, f).record, Kr = f.chairs.find(
2704
+ (e) => e.id === ((at == null ? void 0 : at.chairId) ?? (Ft == null ? void 0 : Ft.chairId))
2704
2705
  ), Sr = f.operators.find(
2705
- (e) => e.id === ((at == null ? void 0 : at.operatorId) ?? (Lt == null ? void 0 : Lt.operatorId) ?? String((M == null ? void 0 : M.event.operatorId) ?? ""))
2706
- ), Qe = A ? r.find((e) => e.event.id === A.event.id) : void 0, Gr = Pr(A == null ? void 0 : A.event.patientId, f), Ba = A ? zt(A.event) : !1, Vr = Ta(Qe) || Ba, ma = A ? Gn(A.event, Vr, ve) && wn : !1, jr = Gr.assigned ? Oe && A ? (
2706
+ (e) => e.id === ((at == null ? void 0 : at.operatorId) ?? (Ft == null ? void 0 : Ft.operatorId) ?? String((M == null ? void 0 : M.event.operatorId) ?? ""))
2707
+ ), Qe = A ? r.find((e) => e.event.id === A.event.id) : void 0, Gr = Pr(A == null ? void 0 : A.event.patientId, f), Ba = A ? zt(A.event) : !1, Vr = Ta(Qe) || Ba, ma = A ? Gn(A.event, Vr, ke) && wn : !1, jr = Gr.assigned ? Oe && A ? (
2707
2708
  /* The dialog sits over the grid: the same mask as the card. */
2708
2709
  ya((Qe == null ? void 0 : Qe.event) ?? A.event, !0)
2709
2710
  ) : Va(
@@ -2726,14 +2727,14 @@ function Sc({
2726
2727
  return ((ye = (z === "operator" ? f.operators : f.chairs).find(
2727
2728
  (R) => R.id === Y
2728
2729
  )) == null ? void 0 : ye.title) ?? null;
2729
- }, S = !!A.event.allDay;
2730
+ }, E = !!A.event.allDay;
2730
2731
  Yr = [
2731
2732
  gr(p, A.oldStart),
2732
- S ? null : _r(p, A.oldStart, e),
2733
+ E ? null : _r(p, A.oldStart, e),
2733
2734
  C ? W(h) : null
2734
2735
  ].filter((Y) => !!Y).join(" · "), Xr = [
2735
2736
  gr(p, A.newStart),
2736
- S ? null : _r(p, A.newStart, c),
2737
+ E ? null : _r(p, A.newStart, c),
2737
2738
  C ? W(T) : null
2738
2739
  ].filter((Y) => !!Y).join(" · ");
2739
2740
  }
@@ -2812,7 +2813,7 @@ function Sc({
2812
2813
  {
2813
2814
  intent: "primary",
2814
2815
  size: "sm",
2815
- onClick: () => xt(e),
2816
+ onClick: () => At(e),
2816
2817
  children: o(D("findSlots.book"))
2817
2818
  }
2818
2819
  )
@@ -2858,7 +2859,7 @@ function Sc({
2858
2859
  /* @__PURE__ */ n("div", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-md)]", children: /* @__PURE__ */ n("div", { className: "ds:min-w-0 ds:flex-1", children: /* @__PURE__ */ n(
2859
2860
  bo,
2860
2861
  {
2861
- id: Nt,
2862
+ id: wt,
2862
2863
  ref: et,
2863
2864
  onBackgroundEventClick: nt ? (e, c) => {
2864
2865
  Q && e.id.startsWith("avail-") && (Le(null), ot({
@@ -2871,12 +2872,12 @@ function Sc({
2871
2872
  resources: dn,
2872
2873
  view: Nn,
2873
2874
  schedulerLicenseKey: Bt,
2874
- resourceLayout: x.orientation,
2875
+ resourceLayout: S.orientation,
2875
2876
  resourceLabelVariant: "chip",
2876
2877
  selectedEventId: Be,
2877
2878
  className: `ds:[--fc-bg-event-color:var(--muted-foreground)] ${Nc} ${wc} ${Ec}`,
2878
- showResourceInitials: z === "operator" && x.operatorNameDisplay === "initials",
2879
- verticalResourceLabels: we === "Week" && x.orientation === "vertical",
2879
+ showResourceInitials: z === "operator" && S.operatorNameDisplay === "initials",
2880
+ verticalResourceLabels: we === "Week" && S.orientation === "vertical",
2880
2881
  resourceAreaHeader: z === "operator" ? "operators" : "chairs",
2881
2882
  resourceAreaWidth: "14%",
2882
2883
  initialDate: Un,
@@ -2887,12 +2888,12 @@ function Sc({
2887
2888
  modeLabel: Tr,
2888
2889
  modeBannerColor: ht,
2889
2890
  modeBannerTextColor: Zn,
2890
- onModeCancel: ue,
2891
- eventColorStyle: x.eventColorStyle ?? "tinted",
2892
- slotDensity: x.slotDensity ?? "compact",
2891
+ onModeCancel: pe,
2892
+ eventColorStyle: S.eventColorStyle ?? "tinted",
2893
+ slotDensity: S.slotDensity ?? "compact",
2893
2894
  slotEventOverlap: !1,
2894
- showTime: x.showTime,
2895
- zebraRows: x.zebraRows,
2895
+ showTime: S.showTime,
2896
+ zebraRows: S.zebraRows,
2896
2897
  hiddenDays: Ct,
2897
2898
  loadingDates: Dr,
2898
2899
  errorDates: Yn,
@@ -2900,9 +2901,9 @@ function Sc({
2900
2901
  eventDurationEditable: !de && !It,
2901
2902
  slotMinTime: $e.min,
2902
2903
  slotMaxTime: $e.max,
2903
- slotDuration: x.slotDuration,
2904
- snapDuration: _i(x.slotDuration),
2905
- defaultTimedEventDuration: x.defaultDurationMin,
2904
+ slotDuration: S.slotDuration,
2905
+ snapDuration: _i(S.slotDuration),
2906
+ defaultTimedEventDuration: S.defaultDurationMin,
2906
2907
  nowIndicator: !0,
2907
2908
  toolbar: !1,
2908
2909
  stickyHeaderDates: !0,
@@ -2922,7 +2923,7 @@ function Sc({
2922
2923
  onNavLinkDayClick: de ? hr : void 0,
2923
2924
  onDatesSet: Fe
2924
2925
  },
2925
- `${Pe}-${z}-${x.orientation}`
2926
+ `${Pe}-${z}-${S.orientation}`
2926
2927
  ) }) })
2927
2928
  ]
2928
2929
  }
@@ -2990,7 +2991,7 @@ function Sc({
2990
2991
  new Date(M.event.end ?? M.event.start)
2991
2992
  ),
2992
2993
  location: M.event.isTelehealth ? o("calendarWorkspace.editor.typeTelehealth") : Kr == null ? void 0 : Kr.title,
2993
- treatment: (Lt == null ? void 0 : Lt.care) || M.event.suffix,
2994
+ treatment: (Ft == null ? void 0 : Ft.care) || M.event.suffix,
2994
2995
  telehealth: !!M.event.isTelehealth,
2995
2996
  status: M.event.status,
2996
2997
  details: [
@@ -3094,7 +3095,7 @@ function Sc({
3094
3095
  Us,
3095
3096
  {
3096
3097
  label: o(D("moveConfirm.scope")),
3097
- value: ve,
3098
+ value: ke,
3098
3099
  onValueChange: (e) => Rt(e),
3099
3100
  children: Fs.map((e) => /* @__PURE__ */ n(
3100
3101
  Ja,
@@ -3108,7 +3109,7 @@ function Sc({
3108
3109
  ))
3109
3110
  }
3110
3111
  ) : null,
3111
- Vr && ve === "all" ? /* @__PURE__ */ n(xn, { variant: "warning", announce: "polite", children: /* @__PURE__ */ n(xn.Description, { children: o(D("editor.seriesAllDiscardsOverrides")) }) }) : null,
3112
+ Vr && ke === "all" ? /* @__PURE__ */ n(xn, { variant: "warning", announce: "polite", children: /* @__PURE__ */ n(xn.Description, { children: o(D("editor.seriesAllDiscardsOverrides")) }) }) : null,
3112
3113
  ma ? /* @__PURE__ */ I(Sn, { children: [
3113
3114
  /* @__PURE__ */ n(
3114
3115
  ta,
@@ -3117,14 +3118,14 @@ function Sc({
3117
3118
  checked: $t,
3118
3119
  disabled: !Pa,
3119
3120
  disabledReason: Ar === null ? void 0 : o(D(Ar)),
3120
- onCheckedChange: (e) => Ot(e === !0)
3121
+ onCheckedChange: (e) => Lt(e === !0)
3121
3122
  }
3122
3123
  ),
3123
3124
  /* @__PURE__ */ n(
3124
3125
  ta,
3125
3126
  {
3126
3127
  label: Wr === null ? o(D("moveConfirm.notifyEmail")) : `${o(D("moveConfirm.notifyEmail"))} — ${o(D(Wr))}`,
3127
- checked: fe,
3128
+ checked: ge,
3128
3129
  disabled: !ha,
3129
3130
  disabledReason: Wr === null ? void 0 : o(D(Wr)),
3130
3131
  onCheckedChange: (e) => Kn(e === !0)
@@ -3139,18 +3140,18 @@ function Sc({
3139
3140
  ] })
3140
3141
  }
3141
3142
  ) : null,
3142
- Wt ? /* @__PURE__ */ n(
3143
+ Ot ? /* @__PURE__ */ n(
3143
3144
  te,
3144
3145
  {
3145
3146
  open: !0,
3146
3147
  onOpenChange: (e) => {
3147
3148
  var c;
3148
- e || ((c = Wt.onCancel) == null || c.call(Wt), on(null));
3149
+ e || ((c = Ot.onCancel) == null || c.call(Ot), on(null));
3149
3150
  },
3150
3151
  children: /* @__PURE__ */ I(te.Content, { size: "sm", variant: "confirmation", children: [
3151
3152
  /* @__PURE__ */ I(te.Header, { children: [
3152
3153
  /* @__PURE__ */ n(te.Title, { children: o(D("closures.warnTitle")) }),
3153
- /* @__PURE__ */ n(te.Description, { children: Wt.reason })
3154
+ /* @__PURE__ */ n(te.Description, { children: Ot.reason })
3154
3155
  ] }),
3155
3156
  /* @__PURE__ */ I(te.Footer, { children: [
3156
3157
  /* @__PURE__ */ n(
@@ -3160,7 +3161,7 @@ function Sc({
3160
3161
  intent: "secondary",
3161
3162
  onClick: () => {
3162
3163
  var e;
3163
- (e = Wt.onCancel) == null || e.call(Wt), on(null);
3164
+ (e = Ot.onCancel) == null || e.call(Ot), on(null);
3164
3165
  },
3165
3166
  children: o(D("moveConfirm.cancel"))
3166
3167
  }
@@ -3171,12 +3172,12 @@ function Sc({
3171
3172
  type: "button",
3172
3173
  intent: "primary",
3173
3174
  onClick: () => {
3174
- const { onConfirm: e } = Wt;
3175
+ const { onConfirm: e } = Ot;
3175
3176
  on(null), e();
3176
3177
  },
3177
3178
  children: o(
3178
3179
  D(
3179
- Wt.action === "move" ? "closures.moveAnyway" : "closures.bookAnyway"
3180
+ Ot.action === "move" ? "closures.moveAnyway" : "closures.bookAnyway"
3180
3181
  )
3181
3182
  )
3182
3183
  }
@@ -3327,25 +3328,25 @@ function Pc({
3327
3328
  selectedRow: l,
3328
3329
  patientRef: P,
3329
3330
  onOpenSheet: le,
3330
- onAnnounce: j,
3331
+ onAnnounce: V,
3331
3332
  editorMode: xe,
3332
3333
  onEditorModeChange: se,
3333
3334
  editorSeed: U,
3334
3335
  slotPatch: Be,
3335
3336
  loadAppointmentEditor: Ne,
3336
3337
  loadAppointmentDetails: O,
3337
- waitingList: he,
3338
- waitingSeedTick: x,
3338
+ waitingList: ve,
3339
+ waitingSeedTick: S,
3339
3340
  findSlotsSeed: ie,
3340
3341
  history: X,
3341
- signRequests: E,
3342
+ signRequests: x,
3342
3343
  mapsLink: J,
3343
- defaultDurationMin: ge,
3344
- noteUnrecordedEdits: Ft,
3345
- recurrence: G,
3344
+ defaultDurationMin: he,
3345
+ noteUnrecordedEdits: Nt,
3346
+ recurrence: j,
3346
3347
  consentsForCares: K,
3347
3348
  medicalDevicesForCares: ae,
3348
- sameDayReminders: ke,
3349
+ sameDayReminders: ue,
3349
3350
  signatureCredits: st,
3350
3351
  createPatientFromBooking: Ie,
3351
3352
  createPatient: je,
@@ -3355,13 +3356,13 @@ function Pc({
3355
3356
  notesSeamFor: Te,
3356
3357
  businessHours: _e,
3357
3358
  onSave: Bt,
3358
- onDelete: Nt,
3359
+ onDelete: wt,
3359
3360
  onRecurringScopeChosen: w,
3360
3361
  onDetailsActionUsed: ce,
3361
- onMove: me,
3362
+ onMove: fe,
3362
3363
  onCopy: Ye,
3363
3364
  onEditOpened: Vt,
3364
- onDeleteInitiated: wt,
3365
+ onDeleteInitiated: Et,
3365
3366
  onDocumentCreateClicked: oe,
3366
3367
  onWhatsAppClicked: ar,
3367
3368
  onStatusChange: jt,
@@ -3372,8 +3373,8 @@ function Pc({
3372
3373
  onDetailsDocked: sr,
3373
3374
  onRequestSignature: Ue,
3374
3375
  onRequestSignatureOnDevice: kn,
3375
- onOpenPatient: Et,
3376
- onOpenScheduler: St,
3376
+ onOpenPatient: St,
3377
+ onOpenScheduler: xt,
3377
3378
  onSaveAndReturn: An,
3378
3379
  onWaitingListFilterUsed: zn,
3379
3380
  onWaitingListAdvancedFilterToggled: Hn,
@@ -3389,9 +3390,9 @@ function Pc({
3389
3390
  bookingQueue: ee,
3390
3391
  backlogFilters: ot,
3391
3392
  onBacklogFiltersChange: On,
3392
- waitingListState: xt,
3393
+ waitingListState: At,
3393
3394
  stateSinceByEventId: nn,
3394
- reviewOnlyEventIds: At,
3395
+ reviewOnlyEventIds: Wt,
3395
3396
  bookingsSeedTick: ct,
3396
3397
  bookingRequest: Yt,
3397
3398
  onCompleteBooking: lt,
@@ -3409,7 +3410,7 @@ function Pc({
3409
3410
  editorGuard: cr
3410
3411
  }) {
3411
3412
  var Qn, Ge, er, ze;
3412
- const { t: Z } = gt("ui"), Ae = Cr(), { openTool: Pe } = Na(), qe = Gs(j), Ke = xe === "create" ? `create-${U.tick}` : `${(l == null ? void 0 : l.event.id) ?? ""}:${P.id}`, [Xe, It] = _({}), rn = m(
3413
+ const { t: Z } = gt("ui"), Ae = Cr(), { openTool: Pe } = Na(), qe = Gs(V), Ke = xe === "create" ? `create-${U.tick}` : `${(l == null ? void 0 : l.event.id) ?? ""}:${P.id}`, [Xe, It] = _({}), rn = m(
3413
3414
  (u) => {
3414
3415
  It(
3415
3416
  (H) => H.key === Ke && H.id === u ? H : { key: Ke, id: u }
@@ -3417,16 +3418,16 @@ function Pc({
3417
3418
  },
3418
3419
  [Ke]
3419
3420
  ), We = Xe.key === Ke ? Xe.id : xe === "create" ? (Qn = U.prefill) == null ? void 0 : Qn.patientId : P.id || void 0, dt = v.has(y.notes) && !!We, [tt, Un] = _({ tick: 0 }), an = $(i);
3420
- V(() => {
3421
+ G(() => {
3421
3422
  const u = an.current === y.notes && i !== y.notes;
3422
3423
  an.current = i, Un(
3423
3424
  (H) => H.patientId && (u || H.patientId !== We) ? { tick: H.tick } : H
3424
3425
  );
3425
3426
  }, [i, We]);
3426
3427
  const sn = $(0);
3427
- V(() => () => cancelAnimationFrame(sn.current), []);
3428
+ G(() => () => cancelAnimationFrame(sn.current), []);
3428
3429
  const Bn = $(0);
3429
- V(() => () => cancelAnimationFrame(Bn.current), []);
3430
+ G(() => () => cancelAnimationFrame(Bn.current), []);
3430
3431
  const ut = m(() => {
3431
3432
  k(), cancelAnimationFrame(Bn.current), Bn.current = requestAnimationFrame(() => {
3432
3433
  var H, ne;
@@ -3439,9 +3440,9 @@ function Pc({
3439
3440
  patientId: u,
3440
3441
  noteId: H,
3441
3442
  tick: ne.tick + 1
3442
- })), gn.current = "appointment_panel", Pe(y.notes), gn.current = null, j(Z("calendarWorkspace.rail.notes")));
3443
+ })), gn.current = "appointment_panel", Pe(y.notes), gn.current = null, V(Z("calendarWorkspace.rail.notes")));
3443
3444
  },
3444
- [dt, We, Pe, j, Z, gn]
3445
+ [dt, We, Pe, V, Z, gn]
3445
3446
  ), qn = B(() => Gi(b), [b]), In = Z(
3446
3447
  "calendarWorkspace.details.patientNotLoaded"
3447
3448
  ), bn = P.id, Pn = N && l ? ya(l.event, !0) : Va(
@@ -3458,20 +3459,20 @@ function Pc({
3458
3459
  unsignedRequiredDocs: yn,
3459
3460
  consentsForCares: K,
3460
3461
  medicalDevicesForCares: ae,
3461
- sameDayReminders: ke,
3462
+ sameDayReminders: ue,
3462
3463
  signatureCredits: st,
3463
3464
  createPatientFromBooking: Ie,
3464
3465
  createPatient: je,
3465
3466
  rows: b,
3466
3467
  submitOnEnter: !0,
3467
3468
  reminderChannels: xc,
3468
- recurrenceExtras: (G == null ? void 0 : G.endDate) !== !1,
3469
- recurrenceSkipClosedDays: (G == null ? void 0 : G.skipClosedDays) !== !1,
3470
- recurrenceSkipClosedDaysDefault: G == null ? void 0 : G.skipClosedDaysDefault,
3469
+ recurrenceExtras: (j == null ? void 0 : j.endDate) !== !1,
3470
+ recurrenceSkipClosedDays: (j == null ? void 0 : j.skipClosedDays) !== !1,
3471
+ recurrenceSkipClosedDaysDefault: j == null ? void 0 : j.skipClosedDaysDefault,
3471
3472
  /* The Custom rule (HTP-4261, PRD 03 rule D1): every N days, weeks,
3472
3473
  months or years, chosen weekdays, the Nth or last weekday. On unless
3473
3474
  the host cannot save `interval` and `byDay`. */
3474
- recurrenceCustom: (G == null ? void 0 : G.custom) !== !1,
3475
+ recurrenceCustom: (j == null ? void 0 : j.custom) !== !1,
3475
3476
  /* The platform modal's own rules: an away operator warns and saves,
3476
3477
  reminders and the first-visit question hang off the patient,
3477
3478
  price-list rows carry phases and lock once invoiced, and a
@@ -3495,7 +3496,7 @@ function Pc({
3495
3496
  yn,
3496
3497
  K,
3497
3498
  ae,
3498
- ke,
3499
+ ue,
3499
3500
  st,
3500
3501
  Ie,
3501
3502
  je,
@@ -3545,18 +3546,18 @@ function Pc({
3545
3546
  /* The advisory's link goes to the host's hours editor. The finder
3546
3547
  guards on the prop, so without it the advisory still states which
3547
3548
  hours are missing and just does not offer to open the page. */
3548
- onOpenScheduler: St
3549
+ onOpenScheduler: xt
3549
3550
  }),
3550
3551
  [
3551
- St,
3552
+ xt,
3552
3553
  Zt,
3553
3554
  Ae.operatorGroups,
3554
3555
  _e == null ? void 0 : _e.practice,
3555
3556
  _e == null ? void 0 : _e.operators,
3556
- G == null ? void 0 : G.endDate,
3557
- G == null ? void 0 : G.custom,
3558
- G == null ? void 0 : G.skipClosedDays,
3559
- G == null ? void 0 : G.skipClosedDaysDefault
3557
+ j == null ? void 0 : j.endDate,
3558
+ j == null ? void 0 : j.custom,
3559
+ j == null ? void 0 : j.skipClosedDays,
3560
+ j == null ? void 0 : j.skipClosedDaysDefault
3560
3561
  ]
3561
3562
  ), ur = B(
3562
3563
  () => ({
@@ -3577,14 +3578,14 @@ function Pc({
3577
3578
  )
3578
3579
  }),
3579
3580
  [b, p, N, nn, He, Z]
3580
- ), M = xe !== "create" && l !== null, Le = M && O !== void 0, A = Le && xe === "edit", bt = Q || !!(l && At.has(l.event.id)), [Wt, on] = _(!1), $t = M ? !!(l != null && l.event.isTask) : !!((Ge = U.prefill) != null && Ge.isTask) || Wt, Ot = M ? l == null ? void 0 : l.event.id : (er = U.prefill) != null && er.isTask ? (ze = U.prefill) == null ? void 0 : ze.editEventId : void 0, fe = U.prefill, Kn = B(
3581
- () => fe != null && fe.editEventId ? fe : {
3582
- ...fe,
3583
- durationMin: (fe == null ? void 0 : fe.durationMin) ?? ge
3581
+ ), M = xe !== "create" && l !== null, Le = M && O !== void 0, A = Le && xe === "edit", bt = Q || !!(l && Wt.has(l.event.id)), [Ot, on] = _(!1), $t = M ? !!(l != null && l.event.isTask) : !!((Ge = U.prefill) != null && Ge.isTask) || Ot, Lt = M ? l == null ? void 0 : l.event.id : (er = U.prefill) != null && er.isTask ? (ze = U.prefill) == null ? void 0 : ze.editEventId : void 0, ge = U.prefill, Kn = B(
3582
+ () => ge != null && ge.editEventId ? ge : {
3583
+ ...ge,
3584
+ durationMin: (ge == null ? void 0 : ge.durationMin) ?? he
3584
3585
  },
3585
- [fe, ge]
3586
- ), pr = !$t && N && (M ? !Le || A : !!(fe != null && fe.editEventId || fe != null && fe.patientId || fe != null && fe.bookingContact)), yt = $(null), ve = $(null), [Rt, _n] = _(null), zt = l == null ? void 0 : l.event.id;
3587
- V(() => {
3586
+ [ge, he]
3587
+ ), pr = !$t && N && (M ? !Le || A : !!(ge != null && ge.editEventId || ge != null && ge.patientId || ge != null && ge.bookingContact)), yt = $(null), ke = $(null), [Rt, _n] = _(null), zt = l == null ? void 0 : l.event.id;
3588
+ G(() => {
3588
3589
  _n(null);
3589
3590
  }, [zt]);
3590
3591
  const [Gn, cn] = _(0), Ht = m(
@@ -3594,33 +3595,33 @@ function Pc({
3594
3595
  [Bt]
3595
3596
  ), yr = m(
3596
3597
  (u, H) => {
3597
- yt.current = "deleted", Promise.resolve(Nt(u, H)).catch(
3598
+ yt.current = "deleted", Promise.resolve(wt(u, H)).catch(
3598
3599
  () => hn(Z("emptyState.error.title"))
3599
3600
  );
3600
3601
  },
3601
- [Nt, Z]
3602
+ [wt, Z]
3602
3603
  ), Vn = m(() => {
3603
3604
  const u = yt.current;
3604
3605
  if (yt.current = null, _n(null), se("details"), u === "deleted") {
3605
3606
  qe();
3606
3607
  return;
3607
3608
  }
3608
- u === "saved" && cn((H) => H + 1), j(
3609
+ u === "saved" && cn((H) => H + 1), V(
3609
3610
  Z("calendarWorkspace.details.docked", { name: Pn })
3610
3611
  );
3611
- }, [se, qe, j, Pn, Z]), we = m(() => {
3612
+ }, [se, qe, V, Pn, Z]), we = m(() => {
3612
3613
  qe();
3613
3614
  }, [qe]), de = m(() => {
3614
3615
  if (!l) return;
3615
3616
  const { event: u } = l;
3616
3617
  if (u.hasUnassignedPatient && u.isBookedOnline)
3617
3618
  return lt(l);
3618
- _n(null), yt.current = null, ve.current = { id: u.id, action: "edit-appointment" }, se("edit");
3619
+ _n(null), yt.current = null, ke.current = { id: u.id, action: "edit-appointment" }, se("edit");
3619
3620
  }, [l, lt, se]), z = !Q && (!ee || ee.canComplete === !0 && !!Ne), Nn = m(() => {
3620
3621
  if (!l) return;
3621
3622
  const { event: u } = l;
3622
3623
  if (u.isBookedOnline) return lt(l, "patient");
3623
- _n(u.id), yt.current = null, ve.current = { id: u.id, action: "assign-patient" }, se("edit");
3624
+ _n(u.id), yt.current = null, ke.current = { id: u.id, action: "assign-patient" }, se("edit");
3624
3625
  }, [l, lt, se]), $n = m(
3625
3626
  (u) => {
3626
3627
  var ft;
@@ -3633,9 +3634,9 @@ function Pc({
3633
3634
  {
3634
3635
  className: "ds:contents",
3635
3636
  ref: (F) => {
3636
- const be = ve.current;
3637
+ const be = ke.current;
3637
3638
  if (!F || !be || be.id !== u.eventId) return;
3638
- ve.current = null;
3639
+ ke.current = null;
3639
3640
  const Fe = (Je) => [
3640
3641
  ...F.querySelectorAll(
3641
3642
  `[data-action="${Je}"]`
@@ -3674,17 +3675,17 @@ function Pc({
3674
3675
  notesSeam: H ? Te(H) : void 0,
3675
3676
  readOnly: bt,
3676
3677
  onAssignPatient: l != null && l.event.isBookedOnline && !z ? void 0 : Nn,
3677
- onOpenPatient: Et,
3678
+ onOpenPatient: St,
3678
3679
  onSignOnDevice: kn && (() => kn(u.eventId)),
3679
3680
  onEdit: () => {
3680
3681
  Vt(u.eventId), de();
3681
3682
  },
3682
- onDeleteInitiated: () => wt(u.eventId, "panel"),
3683
+ onDeleteInitiated: () => Et(u.eventId, "panel"),
3683
3684
  onDocumentCreateClicked: (F) => oe(u.eventId, F),
3684
- onMove: () => me("panel"),
3685
+ onMove: () => fe("panel"),
3685
3686
  onCopy: (F) => Ye(F, "panel"),
3686
3687
  onDelete: async (F) => {
3687
- await Nt(u.eventId, F), ne != null && ne.scopes && w({
3688
+ await wt(u.eventId, F), ne != null && ne.scopes && w({
3688
3689
  action: "delete",
3689
3690
  scope: F.scope
3690
3691
  }), qe(), ks(
@@ -3705,7 +3706,7 @@ function Pc({
3705
3706
  onStatusChange: jt ? (F) => jt(u.eventId, F) : void 0,
3706
3707
  onDescriptionChange: vn ? (F) => vn(u.eventId, F) : void 0,
3707
3708
  mapsLink: J,
3708
- noteUnrecordedEdits: Ft,
3709
+ noteUnrecordedEdits: Nt,
3709
3710
  privacy: N,
3710
3711
  privacyTitle: l == null ? void 0 : l.event.privacyModeTitle,
3711
3712
  locale: p
@@ -3728,25 +3729,25 @@ function Pc({
3728
3729
  Nn,
3729
3730
  z,
3730
3731
  de,
3731
- Et,
3732
+ St,
3732
3733
  kn,
3733
- me,
3734
+ fe,
3734
3735
  Ye,
3735
3736
  Vt,
3736
- wt,
3737
+ Et,
3737
3738
  oe,
3738
- Nt,
3739
+ wt,
3739
3740
  w,
3740
3741
  ce,
3741
3742
  _t,
3742
3743
  Pe,
3743
- j,
3744
+ V,
3744
3745
  s,
3745
3746
  Z,
3746
3747
  jt,
3747
3748
  vn,
3748
3749
  J,
3749
- Ft,
3750
+ Nt,
3750
3751
  p
3751
3752
  ]
3752
3753
  ), pt = B(
@@ -3755,7 +3756,7 @@ function Pc({
3755
3756
  return {
3756
3757
  id: y.editor,
3757
3758
  label: Z(
3758
- $t ? Ot ? "calendarWorkspace.taskEditor.editTitle" : "calendarWorkspace.taskEditor.title" : M ? "calendarWorkspace.details.region" : (u = U.prefill) != null && u.editEventId ? "calendarWorkspace.editor.editTitle" : "calendarWorkspace.editor.title"
3759
+ $t ? Lt ? "calendarWorkspace.taskEditor.editTitle" : "calendarWorkspace.taskEditor.title" : M ? "calendarWorkspace.details.region" : (u = U.prefill) != null && u.editEventId ? "calendarWorkspace.editor.editTitle" : "calendarWorkspace.editor.title"
3759
3760
  ),
3760
3761
  icon: $t ? /* @__PURE__ */ n(Uo, { "aria-hidden": "true" }) : M ? /* @__PURE__ */ n(Ha, { "aria-hidden": "true" }) : /* @__PURE__ */ n(Mo, { "aria-hidden": "true" }),
3761
3762
  /* fill: the panel owns its scroll so its save footer stays pinned. */
@@ -3767,7 +3768,7 @@ function Pc({
3767
3768
  Ia,
3768
3769
  {
3769
3770
  title: Z(
3770
- M && !A ? "calendarWorkspace.details.region" : M || fe != null && fe.editEventId ? "calendarWorkspace.editor.editTitle" : "calendarWorkspace.editor.title"
3771
+ M && !A ? "calendarWorkspace.details.region" : M || ge != null && ge.editEventId ? "calendarWorkspace.editor.editTitle" : "calendarWorkspace.editor.title"
3771
3772
  ),
3772
3773
  icon: /* @__PURE__ */ n(Ha, { "aria-hidden": "true" }),
3773
3774
  onTurnOff: ut
@@ -3776,7 +3777,7 @@ function Pc({
3776
3777
  openNotes: dt ? Mn : void 0,
3777
3778
  editorGuard: cr,
3778
3779
  onOpenSheet: le,
3779
- onAnnounce: j,
3780
+ onAnnounce: V,
3780
3781
  onClose: $t ? we : A ? Vn : void 0,
3781
3782
  details: !$t && Le && l && O ? {
3782
3783
  eventId: l.event.id,
@@ -3792,9 +3793,9 @@ function Pc({
3792
3793
  /* @__PURE__ */ n(
3793
3794
  Qo,
3794
3795
  {
3795
- mode: Ot ? "edit" : "create",
3796
- taskId: Ot,
3797
- initialDate: !Ot && ((H = U.prefill) != null && H.isTask) ? (ne = U.prefill) == null ? void 0 : ne.date : void 0,
3796
+ mode: Lt ? "edit" : "create",
3797
+ taskId: Lt,
3798
+ initialDate: !Lt && ((H = U.prefill) != null && H.isTask) ? (ne = U.prefill) == null ? void 0 : ne.date : void 0,
3798
3799
  onCancel: we,
3799
3800
  onSaved: we,
3800
3801
  onDeleted: we,
@@ -3805,7 +3806,7 @@ function Pc({
3805
3806
  loadTask: br,
3806
3807
  privacy: N
3807
3808
  },
3808
- Ot ? `task-edit-${Ot}` : `task-create-${U.tick}-${Pt}`
3809
+ Lt ? `task-edit-${Lt}` : `task-create-${U.tick}-${Pt}`
3809
3810
  )
3810
3811
  ) : /* @__PURE__ */ n(
3811
3812
  io,
@@ -3853,7 +3854,7 @@ function Pc({
3853
3854
  row: Ce,
3854
3855
  patientRef: be,
3855
3856
  showAge: !0,
3856
- onOpenPatient: Et,
3857
+ onOpenPatient: St,
3857
3858
  anamnesisAnswers: Fe == null ? void 0 : Fe.highlightedAnamnesisAnswers
3858
3859
  }
3859
3860
  )
@@ -3864,7 +3865,7 @@ function Pc({
3864
3865
  row: Ce,
3865
3866
  patient: Fe,
3866
3867
  locale: p,
3867
- signRequestedVia: E[Ce.event.id] ?? ((Je = Ae.metaById[Ce.event.id]) == null ? void 0 : Je.signRequestedVia),
3868
+ signRequestedVia: x[Ce.event.id] ?? ((Je = Ae.metaById[Ce.event.id]) == null ? void 0 : Je.signRequestedVia),
3868
3869
  onRequestSignature: Ue,
3869
3870
  onRequestSignatureOnDevice: kn && (() => kn(Ce.event.id)),
3870
3871
  readOnly: bt,
@@ -3877,11 +3878,11 @@ function Pc({
3877
3878
  history: Ao(
3878
3879
  X[Ce.event.id] ?? []
3879
3880
  ),
3880
- noteUnrecordedEdits: Ft,
3881
+ noteUnrecordedEdits: Nt,
3881
3882
  onSave: A ? Ht : Bt,
3882
- onDelete: A ? yr : Nt,
3883
- onDeleteInitiated: (En) => wt(En, "editor"),
3884
- onMove: () => me("editor"),
3883
+ onDelete: A ? yr : wt,
3884
+ onDeleteInitiated: (En) => Et(En, "editor"),
3885
+ onMove: () => fe("editor"),
3885
3886
  onCopy: (En) => Ye(En, "editor"),
3886
3887
  readOnly: bt,
3887
3888
  platform: _t,
@@ -3908,9 +3909,9 @@ function Pc({
3908
3909
  series: F == null ? void 0 : F.series,
3909
3910
  onRecurringScopeChosen: w,
3910
3911
  onSave: Bt,
3911
- onDelete: Nt,
3912
- onDeleteInitiated: (En) => wt(En, "editor"),
3913
- readOnly: Q || !!((wn = U.prefill) != null && wn.editEventId && At.has(
3912
+ onDelete: wt,
3913
+ onDeleteInitiated: (En) => Et(En, "editor"),
3914
+ readOnly: Q || !!((wn = U.prefill) != null && wn.editEventId && Wt.has(
3914
3915
  U.prefill.editEventId
3915
3916
  )),
3916
3917
  locale: p,
@@ -3930,12 +3931,12 @@ function Pc({
3930
3931
  [
3931
3932
  r,
3932
3933
  pr,
3933
- fe,
3934
+ ge,
3934
3935
  Kn,
3935
3936
  Be,
3936
3937
  ut,
3937
3938
  M,
3938
- Ft,
3939
+ Nt,
3939
3940
  dt,
3940
3941
  Mn,
3941
3942
  rn,
@@ -3949,7 +3950,7 @@ function Pc({
3949
3950
  $n,
3950
3951
  bt,
3951
3952
  Ne,
3952
- At,
3953
+ Wt,
3953
3954
  In,
3954
3955
  Ae,
3955
3956
  l,
@@ -3957,16 +3958,16 @@ function Pc({
3957
3958
  P,
3958
3959
  U,
3959
3960
  le,
3960
- j,
3961
+ V,
3961
3962
  Bt,
3962
- Nt,
3963
+ wt,
3963
3964
  w,
3964
- me,
3965
+ fe,
3965
3966
  Ye,
3966
3967
  Ue,
3967
3968
  kn,
3968
- Et,
3969
- E,
3969
+ St,
3970
+ x,
3970
3971
  X,
3971
3972
  Q,
3972
3973
  Tn,
@@ -3976,7 +3977,7 @@ function Pc({
3976
3977
  qn,
3977
3978
  Z,
3978
3979
  $t,
3979
- Ot,
3980
+ Lt,
3980
3981
  Pt,
3981
3982
  we,
3982
3983
  Ir,
@@ -3988,7 +3989,7 @@ function Pc({
3988
3989
  cr
3989
3990
  ]
3990
3991
  ), [nt, ln] = _({ tick: 0 }), jn = Yt.id !== void 0 && et.some((u) => u.event.id === Yt.id);
3991
- V(() => {
3992
+ G(() => {
3992
3993
  if (i !== y.bookings) {
3993
3994
  ln((u) => u.id ? { tick: u.tick } : u);
3994
3995
  return;
@@ -4016,7 +4017,7 @@ function Pc({
4016
4017
  label: Z("calendarWorkspace.inc1.bookings.title"),
4017
4018
  icon: /* @__PURE__ */ n(qo, { "aria-hidden": "true" }),
4018
4019
  badgeCount: et.length,
4019
- panel: /* @__PURE__ */ n(sa, { onOpenSheet: le, onAnnounce: j, children: /* @__PURE__ */ n(
4020
+ panel: /* @__PURE__ */ n(sa, { onOpenSheet: le, onAnnounce: V, children: /* @__PURE__ */ n(
4020
4021
  ko,
4021
4022
  {
4022
4023
  bookings: et,
@@ -4048,7 +4049,7 @@ function Pc({
4048
4049
  p,
4049
4050
  N,
4050
4051
  le,
4051
- j,
4052
+ V,
4052
4053
  He,
4053
4054
  lt,
4054
4055
  Z
@@ -4058,7 +4059,7 @@ function Pc({
4058
4059
  id: y.waitingList,
4059
4060
  label: Z("calendarWorkspace.waitingList.tool"),
4060
4061
  icon: /* @__PURE__ */ n(Ts, { "aria-hidden": "true" }),
4061
- badgeCount: he.length,
4062
+ badgeCount: ve.length,
4062
4063
  /* fill: the panel owns its scroll (its own internal ScrollArea) so
4063
4064
  the entry form's PanelSubview footer stays pinned — the rail's
4064
4065
  own ScrollArea would otherwise size this panel to its CONTENT
@@ -4070,7 +4071,7 @@ function Pc({
4070
4071
  /* SUB-VIEW, not a dialog: the entry form is a four-field FORM, so
4071
4072
  it docks in the rail like every other panel and the header's
4072
4073
  back arrow returns to the list (the History / Notes idiom). */
4073
- panel: /* @__PURE__ */ n(sa, { onOpenSheet: le, onAnnounce: j, children: kt != null && kt.entry && N ? (
4074
+ panel: /* @__PURE__ */ n(sa, { onOpenSheet: le, onAnnounce: V, children: kt != null && kt.entry && N ? (
4074
4075
  /* Editing an entry opens its patient and free text in fields. */
4075
4076
  /* @__PURE__ */ n(
4076
4077
  Ia,
@@ -4083,12 +4084,12 @@ function Pc({
4083
4084
  ) : /* @__PURE__ */ n(
4084
4085
  zo,
4085
4086
  {
4086
- entries: he,
4087
+ entries: ve,
4087
4088
  rows: b,
4088
4089
  locale: p,
4089
4090
  privacy: N,
4090
- status: xt == null ? void 0 : xt.status,
4091
- onRetry: xt == null ? void 0 : xt.onRetry,
4091
+ status: At == null ? void 0 : At.status,
4092
+ onRetry: At == null ? void 0 : At.onRetry,
4092
4093
  readOnly: Q,
4093
4094
  onPlaceWaiting: Xt,
4094
4095
  onFindSlotsForWaiting: Xt,
@@ -4098,7 +4099,7 @@ function Pc({
4098
4099
  onSaveEntry: f,
4099
4100
  onCreatePatient: je,
4100
4101
  onCancelEntry: it,
4101
- onOpenPatient: Et,
4102
+ onOpenPatient: St,
4102
4103
  onFilterUsed: zn,
4103
4104
  onWhatsAppClick: (u) => ar(u.id),
4104
4105
  onAdvancedFilterToggled: Hn,
@@ -4113,17 +4114,17 @@ function Pc({
4113
4114
  f,
4114
4115
  it,
4115
4116
  je,
4116
- he,
4117
- xt,
4117
+ ve,
4118
+ At,
4118
4119
  b,
4119
4120
  p,
4120
4121
  le,
4121
- j,
4122
+ V,
4122
4123
  Xt,
4123
4124
  Cn,
4124
4125
  o,
4125
4126
  He,
4126
- Et,
4127
+ St,
4127
4128
  zn,
4128
4129
  ar,
4129
4130
  Hn,
@@ -4146,7 +4147,7 @@ function Pc({
4146
4147
  panel: (
4147
4148
  /* Keyed by the seed tick so a waiting-list hand-off re-seeds a
4148
4149
  fresh, prefilled, auto-searched panel. */
4149
- /* @__PURE__ */ n(sa, { onOpenSheet: le, onAnnounce: j, children: /* @__PURE__ */ n(
4150
+ /* @__PURE__ */ n(sa, { onOpenSheet: le, onAnnounce: V, children: /* @__PURE__ */ n(
4150
4151
  Co,
4151
4152
  {
4152
4153
  rows: b,
@@ -4169,7 +4170,7 @@ function Pc({
4169
4170
  ie,
4170
4171
  L,
4171
4172
  le,
4172
- j,
4173
+ V,
4173
4174
  tn,
4174
4175
  Wn,
4175
4176
  D,
@@ -4272,24 +4273,24 @@ function Pc({
4272
4273
  const rt = m(
4273
4274
  (u) => {
4274
4275
  const H = v.has(u) ? u : y.appointments;
4275
- Pe(H), j(wa(H, Z));
4276
+ Pe(H), V(wa(H, Z));
4276
4277
  },
4277
- [v, Pe, j, Z]
4278
+ [v, Pe, V, Z]
4278
4279
  ), Xn = $(!1);
4279
- V(() => {
4280
+ G(() => {
4280
4281
  Xn.current || (Xn.current = !0, qe(!1));
4281
4282
  }, [qe]);
4282
4283
  const Jn = $(g), dn = $(!1);
4283
4284
  dn.current = Fn.some(
4284
4285
  (u) => u.hold === !0 && u.id === i
4285
- ), V(() => {
4286
+ ), G(() => {
4286
4287
  const u = Jn.current;
4287
4288
  if (u !== g && (Jn.current = g, !dn.current)) {
4288
4289
  if (!g) {
4289
4290
  u && qe();
4290
4291
  return;
4291
4292
  }
4292
- if (At.has(g.eventId)) {
4293
+ if (Wt.has(g.eventId)) {
4293
4294
  rt(y.bookings);
4294
4295
  return;
4295
4296
  }
@@ -4298,14 +4299,14 @@ function Pc({
4298
4299
  rt(y.editor);
4299
4300
  return;
4300
4301
  }
4301
- se("details"), gn.current = "selection", Pe(y.editor), gn.current = null, sr(g.eventId), j(
4302
+ se("details"), gn.current = "selection", Pe(y.editor), gn.current = null, sr(g.eventId), V(
4302
4303
  Z("calendarWorkspace.details.docked", { name: Pn })
4303
4304
  );
4304
4305
  }
4305
4306
  }
4306
4307
  }, [
4307
4308
  g,
4308
- At,
4309
+ Wt,
4309
4310
  bn,
4310
4311
  Pn,
4311
4312
  O,
@@ -4313,32 +4314,32 @@ function Pc({
4313
4314
  rt,
4314
4315
  Pe,
4315
4316
  se,
4316
- j,
4317
+ V,
4317
4318
  Z,
4318
4319
  gn,
4319
4320
  sr
4320
4321
  ]);
4321
4322
  const Re = $(U.tick);
4322
- V(() => {
4323
+ G(() => {
4323
4324
  Re.current !== U.tick && (Re.current = U.tick, on(!1), se("create"), rt(y.editor));
4324
4325
  }, [U.tick, se, rt]);
4325
4326
  const un = $(Pt);
4326
- V(() => {
4327
+ G(() => {
4327
4328
  un.current !== Pt && (un.current = Pt, on(!0), se("create"), rt(y.editor));
4328
4329
  }, [Pt, se, rt]);
4329
4330
  const ht = $((ie == null ? void 0 : ie.tick) ?? 0);
4330
- V(() => {
4331
+ G(() => {
4331
4332
  const u = (ie == null ? void 0 : ie.tick) ?? 0;
4332
4333
  ht.current !== u && (ht.current = u, rt(y.findSlots));
4333
4334
  }, [ie == null ? void 0 : ie.tick, rt]);
4334
4335
  const Zn = $(ct);
4335
- V(() => {
4336
+ G(() => {
4336
4337
  Zn.current !== ct && (Zn.current = ct, rt(y.bookings));
4337
4338
  }, [ct, rt]);
4338
- const Tr = $(x);
4339
- V(() => {
4340
- Tr.current !== x && (Tr.current = x, rt(y.waitingList));
4341
- }, [x, rt]), V(() => {
4339
+ const Tr = $(S);
4340
+ G(() => {
4341
+ Tr.current !== S && (Tr.current = S, rt(y.waitingList));
4342
+ }, [S, rt]), G(() => {
4342
4343
  if (i !== y.notes) {
4343
4344
  i && (lr.current = i);
4344
4345
  return;
@@ -4358,18 +4359,18 @@ function Pc({
4358
4359
  Pe,
4359
4360
  s
4360
4361
  ]);
4361
- const ue = $(null);
4362
- return V(() => {
4362
+ const pe = $(null);
4363
+ return G(() => {
4363
4364
  if (!i) {
4364
- ue.current = null;
4365
+ pe.current = null;
4365
4366
  return;
4366
4367
  }
4367
4368
  if (mt.has(i)) {
4368
- ue.current = i;
4369
+ pe.current = i;
4369
4370
  return;
4370
4371
  }
4371
4372
  if (i === y.notes) return;
4372
- const u = ue.current === y.appointments;
4373
+ const u = pe.current === y.appointments;
4373
4374
  qe(!u);
4374
4375
  }, [i, mt, qe]), null;
4375
4376
  }
@@ -4394,25 +4395,25 @@ function _c({
4394
4395
  practiceSettings: l,
4395
4396
  focusAppointmentId: P,
4396
4397
  focusBookingId: le,
4397
- focusBookingKey: j,
4398
+ focusBookingKey: V,
4398
4399
  createParameters: xe,
4399
4400
  freeSlot: se,
4400
4401
  businessHours: U,
4401
4402
  availableTools: Be,
4402
4403
  schedulerLicenseKey: Ne,
4403
4404
  noteUnrecordedEdits: O = !1,
4404
- recurrence: he,
4405
- consentsForCares: x,
4405
+ recurrence: ve,
4406
+ consentsForCares: S,
4406
4407
  medicalDevicesForCares: ie,
4407
4408
  sameDayReminders: X,
4408
- signatureCredits: E,
4409
+ signatureCredits: x,
4409
4410
  createPatientFromBooking: J,
4410
- createPatient: ge,
4411
- proposeFirstVisit: Ft,
4412
- preferences: G,
4411
+ createPatient: he,
4412
+ proposeFirstVisit: Nt,
4413
+ preferences: j,
4413
4414
  onFinderSearchRange: K,
4414
4415
  loadAppointmentEditor: ae,
4415
- loadAppointmentDetails: ke,
4416
+ loadAppointmentDetails: ue,
4416
4417
  id: st,
4417
4418
  backlogFilters: Ie,
4418
4419
  onBacklogFiltersChange: je,
@@ -4422,32 +4423,32 @@ function _c({
4422
4423
  onOpenPatient: Te,
4423
4424
  onOpenScheduler: _e,
4424
4425
  onSaveAndReturn: Bt,
4425
- onRequestSignatureOnDevice: Nt,
4426
+ onRequestSignatureOnDevice: wt,
4426
4427
  extraTools: w,
4427
4428
  onPrivacyChange: ce,
4428
- calendarArchive: me,
4429
+ calendarArchive: fe,
4429
4430
  prompts: Ye,
4430
4431
  initialView: Vt,
4431
- onViewChange: wt
4432
+ onViewChange: Et
4432
4433
  }) {
4433
4434
  const { t: oe, i18n: ar } = gt("ui"), jt = l == null ? void 0 : l.value.patientNotices, vn = jt == null ? void 0 : jt.reminderSms, tn = jt == null ? void 0 : jt.reminderEmail, He = B(
4434
4435
  () => vn === void 0 && tn === void 0 ? void 0 : { sms: vn, email: tn },
4435
4436
  [vn, tn]
4436
4437
  ), [gn, sr] = _(
4437
4438
  zi
4438
- ), Ue = Ie ?? gn, kn = je ?? sr, Et = p ?? ar.language ?? "en", [St, An] = _(null), [zn, Hn] = _(null), Cn = $(null), o = (Be ?? Ps).join("|"), kt = B(
4439
+ ), Ue = Ie ?? gn, kn = je ?? sr, St = p ?? ar.language ?? "en", [xt, An] = _(null), [zn, Hn] = _(null), Cn = $(null), o = (Be ?? Ps).join("|"), kt = B(
4439
4440
  () => Hi(o.split("|")),
4440
4441
  [o]
4441
4442
  ), f = (k == null ? void 0 : k.editAppointment) === !1, it = B(
4442
4443
  () => Ui(w ?? Wc),
4443
4444
  [w]
4444
4445
  ), Wn = it.tools.some(
4445
- (t) => t.hold === !0 && t.id === St
4446
+ (t) => t.hold === !0 && t.id === xt
4446
4447
  ), D = B(
4447
4448
  () => new Set(it.tools.map((t) => t.id)),
4448
4449
  [it]
4449
4450
  ), L = $(/* @__PURE__ */ new Set()), et = it.rejected.map(({ id: t, reason: a }) => `"${t}" (${a})`).join(", ");
4450
- V(() => {
4451
+ G(() => {
4451
4452
  }, [et]);
4452
4453
  const ee = B(
4453
4454
  () => ({ ...ja, ...N }),
@@ -4459,13 +4460,13 @@ function _c({
4459
4460
  const a = Bs(t);
4460
4461
  return a ? { ...a, ...N } : void 0;
4461
4462
  },
4462
- G
4463
- ), xt = B(
4464
- () => me && ot.resourceKind !== "none" ? { ...ot, resourceKind: "none" } : ot,
4465
- [me, ot]
4463
+ j
4464
+ ), At = B(
4465
+ () => fe && ot.resourceKind !== "none" ? { ...ot, resourceKind: "none" } : ot,
4466
+ [fe, ot]
4466
4467
  ), {
4467
4468
  rows: nn,
4468
- setRows: At,
4469
+ setRows: Wt,
4469
4470
  focus: ct,
4470
4471
  setFocus: Yt,
4471
4472
  waitingList: lt,
@@ -4514,18 +4515,18 @@ function _c({
4514
4515
  noteComposerExtrasFor: Le,
4515
4516
  handleCreateTask: A,
4516
4517
  handleUpdateTask: bt,
4517
- handleDeleteTask: Wt,
4518
+ handleDeleteTask: Ot,
4518
4519
  handleSetTaskDone: on,
4519
4520
  loadTask: $t
4520
- } = r, [Ot, fe] = _(null), Kn = $(0), pr = m(
4521
+ } = r, [Lt, ge] = _(null), Kn = $(0), pr = m(
4521
4522
  (t) => {
4522
- Kn.current += 1, fe({
4523
+ Kn.current += 1, ge({
4523
4524
  seed: Ct.tick,
4524
4525
  patch: { tick: Kn.current, ...t }
4525
4526
  });
4526
4527
  },
4527
4528
  [Ct.tick]
4528
- ), yt = Ot && Ot.seed === Ct.tick ? Ot.patch : null, ve = m(
4529
+ ), yt = Lt && Lt.seed === Ct.tick ? Lt.patch : null, ke = m(
4529
4530
  (t) => {
4530
4531
  var a;
4531
4532
  return (a = nn.find((d) => d.event.id === t)) == null ? void 0 : a.archiveId;
@@ -4533,10 +4534,10 @@ function _c({
4533
4534
  [nn]
4534
4535
  ), Rt = m(
4535
4536
  (t) => {
4536
- const a = ve(t);
4537
+ const a = ke(t);
4537
4538
  return a ? [a] : [];
4538
4539
  },
4539
- [ve]
4540
+ [ke]
4540
4541
  ), _n = m(
4541
4542
  (t, a) => Jt(t, a, ...Rt(t)),
4542
4543
  [Jt, Rt]
@@ -4559,58 +4560,58 @@ function _c({
4559
4560
  [We, Rt, oe]
4560
4561
  ), Gn = B(
4561
4562
  () => qe ? (t) => {
4562
- const a = ve(t.eventId);
4563
+ const a = ke(t.eventId);
4563
4564
  return qe(
4564
4565
  a ? { ...t, archiveId: a } : t
4565
4566
  );
4566
4567
  } : void 0,
4567
- [qe, ve]
4568
+ [qe, ke]
4568
4569
  ), cn = m(
4569
4570
  (t, a) => {
4570
- const d = ve(t);
4571
+ const d = ke(t);
4571
4572
  return d ? Pe(t, {
4572
4573
  scope: "this",
4573
4574
  ...a,
4574
4575
  archiveId: d
4575
4576
  }) : a ? Pe(t, a) : Pe(t);
4576
4577
  },
4577
- [Pe, ve]
4578
+ [Pe, ke]
4578
4579
  ), Ht = B(
4579
4580
  () => Ke ? (t) => {
4580
- const a = ve(t.eventId);
4581
+ const a = ke(t.eventId);
4581
4582
  return Ke(
4582
4583
  a ? { ...t, archiveId: a } : t
4583
4584
  );
4584
4585
  } : void 0,
4585
- [Ke, ve]
4586
+ [Ke, ke]
4586
4587
  ), yr = B(
4587
4588
  () => Xe ? (t) => {
4588
- const a = ve(t.eventId);
4589
+ const a = ke(t.eventId);
4589
4590
  return Xe(
4590
4591
  a ? { ...t, archiveId: a } : t
4591
4592
  );
4592
4593
  } : void 0,
4593
- [Xe, ve]
4594
+ [Xe, ke]
4594
4595
  ), Vn = B(
4595
4596
  () => It ? (t) => {
4596
- const a = ve(t.sourceId);
4597
+ const a = ke(t.sourceId);
4597
4598
  return It(
4598
4599
  a ? { ...t, archiveId: a } : t
4599
4600
  );
4600
4601
  } : void 0,
4601
- [It, ve]
4602
+ [It, ke]
4602
4603
  ), [we] = _(ri), [de, z] = _(null), Nn = $(null), $n = $(void 0);
4603
- V(() => {
4604
+ G(() => {
4604
4605
  var t;
4605
4606
  $n.current = (t = Nn.current) == null ? void 0 : t.id, Nn.current = null;
4606
4607
  }, [Ct.tick]);
4607
4608
  const pt = m(
4608
4609
  (t) => {
4609
4610
  we.ask(() => {
4610
- me ? z(() => t) : t();
4611
+ fe ? z(() => t) : t();
4611
4612
  });
4612
4613
  },
4613
- [me, we]
4614
+ [fe, we]
4614
4615
  ), nt = m(
4615
4616
  () => pt(Me),
4616
4617
  [pt, Me]
@@ -4624,13 +4625,13 @@ function _c({
4624
4625
  we.ask(() => Ut((t) => t + 1));
4625
4626
  }, [we]), Dr = B(
4626
4627
  () => rn ? async (t, a) => {
4627
- await rn(t, a, ...Rt(t)), At(
4628
+ await rn(t, a, ...Rt(t)), Wt(
4628
4629
  (d) => d.map(
4629
4630
  (q) => q.event.id === t ? { ...q, event: { ...q.event, status: a } } : q
4630
4631
  )
4631
4632
  );
4632
4633
  } : void 0,
4633
- [rn, At, Rt]
4634
+ [rn, Wt, Rt]
4634
4635
  ), Yn = m(
4635
4636
  (t) => ({
4636
4637
  notes: qn[t] ?? s.patientNotes(t),
@@ -4698,27 +4699,27 @@ function _c({
4698
4699
  () => Zn(!1),
4699
4700
  [Zn]
4700
4701
  );
4701
- V(() => {
4702
+ G(() => {
4702
4703
  var t;
4703
4704
  return un.current && ((t = ht.current) == null || t.call(ht, !0)), () => {
4704
4705
  var a;
4705
4706
  un.current && ((a = ht.current) == null || a.call(ht, !1));
4706
4707
  };
4707
4708
  }, []);
4708
- const ue = $(Q);
4709
- ue.current = Q;
4709
+ const pe = $(Q);
4710
+ pe.current = Q;
4710
4711
  const Qn = $(Bt);
4711
4712
  Qn.current = Bt;
4712
4713
  const Ge = $("timeGridWeek"), er = m((t) => {
4713
4714
  Ge.current = t;
4714
4715
  }, []), ze = $(null), u = $(null), H = $(null), ne = $(null), ft = $(null), F = m(
4715
4716
  (t, a) => {
4716
- var d, q, Ee, re, pe, Se;
4717
- ne.current = t, t === y.settings ? (q = (d = ue.current) == null ? void 0 : d.onSettingsOpened) == null || q.call(d) : Ya(t) ? (re = (Ee = ue.current) == null ? void 0 : Ee.onToolOpen) == null || re.call(Ee, {
4717
+ var d, q, Ee, re, me, Se;
4718
+ ne.current = t, t === y.settings ? (q = (d = pe.current) == null ? void 0 : d.onSettingsOpened) == null || q.call(d) : Ya(t) ? (re = (Ee = pe.current) == null ? void 0 : Ee.onToolOpen) == null || re.call(Ee, {
4718
4719
  toolId: t,
4719
4720
  source: a,
4720
4721
  view: Ge.current
4721
- }) : (Se = (pe = ue.current) == null ? void 0 : pe.onExtraToolOpen) == null || Se.call(pe, {
4722
+ }) : (Se = (me = pe.current) == null ? void 0 : me.onExtraToolOpen) == null || Se.call(me, {
4722
4723
  toolId: t,
4723
4724
  /* Only the strip and the host's own code open a host tool. */
4724
4725
  source: a === "rail" ? "rail" : "system",
@@ -4741,7 +4742,7 @@ function _c({
4741
4742
  }),
4742
4743
  [Je, be]
4743
4744
  ), [mn, Rn] = _(null), [vt, wn] = _(null);
4744
- V(() => {
4745
+ G(() => {
4745
4746
  we.ask = (t) => {
4746
4747
  if (!we.dirty) {
4747
4748
  t();
@@ -4786,8 +4787,8 @@ function _c({
4786
4787
  }
4787
4788
  )
4788
4789
  );
4789
- const pe = Ze.current && re === y.appointments;
4790
- if (re && !pe && L.current.has(re)) {
4790
+ const me = Ze.current && re === y.appointments;
4791
+ if (re && !me && L.current.has(re)) {
4791
4792
  ze.current = null, u.current = re, ne.current = re, An(re), Ya(re) && Jn(wa(re, oe));
4792
4793
  return;
4793
4794
  }
@@ -4803,16 +4804,16 @@ function _c({
4803
4804
  ), ia = m(() => {
4804
4805
  u.current === y.settings ? Ce() : Fe(y.settings);
4805
4806
  }, [Fe, Ce]);
4806
- V(() => {
4807
+ G(() => {
4807
4808
  const t = ft.current;
4808
- !t || t.id !== St || (ft.current = null, L.current.has(t.id) && F(t.id, t.source));
4809
- }, [St, F]);
4809
+ !t || t.id !== xt || (ft.current = null, L.current.has(t.id) && F(t.id, t.source));
4810
+ }, [xt, F]);
4810
4811
  const Nr = m((t) => {
4811
4812
  t.target instanceof Element && t.target.closest("[data-tool-id]") && (ze.current = "rail", queueMicrotask(() => {
4812
4813
  ze.current === "rail" && (ze.current = null);
4813
4814
  }));
4814
4815
  }, []), tr = $(null);
4815
- V(() => {
4816
+ G(() => {
4816
4817
  tr.current = null;
4817
4818
  }, [ct]);
4818
4819
  const Ea = m(
@@ -4828,7 +4829,7 @@ function _c({
4828
4829
  ), oa = m((t) => {
4829
4830
  var d, q;
4830
4831
  const a = tr.current;
4831
- tr.current = null, (q = (d = ue.current) == null ? void 0 : d.onAppointmentDetailsOpen) == null || q.call(d, {
4832
+ tr.current = null, (q = (d = pe.current) == null ? void 0 : d.onAppointmentDetailsOpen) == null || q.call(d, {
4832
4833
  eventId: t,
4833
4834
  source: (a == null ? void 0 : a.eventId) === t ? a.source : "host",
4834
4835
  view: Ge.current
@@ -4836,18 +4837,18 @@ function _c({
4836
4837
  }, []), hr = m(
4837
4838
  (t) => {
4838
4839
  var a, d;
4839
- return (d = (a = ue.current) == null ? void 0 : a.onRecurringScopeChosen) == null ? void 0 : d.call(a, t);
4840
+ return (d = (a = pe.current) == null ? void 0 : a.onRecurringScopeChosen) == null ? void 0 : d.call(a, t);
4840
4841
  },
4841
4842
  []
4842
4843
  ), wr = m(
4843
4844
  (t) => {
4844
4845
  var a, d;
4845
- return (d = (a = ue.current) == null ? void 0 : a.onDetailsActionUsed) == null ? void 0 : d.call(a, t);
4846
+ return (d = (a = pe.current) == null ? void 0 : a.onDetailsActionUsed) == null ? void 0 : d.call(a, t);
4846
4847
  },
4847
4848
  []
4848
4849
  ), $r = m((t) => {
4849
4850
  var a, d;
4850
- (d = (a = ue.current) == null ? void 0 : a.onAppointmentPreviewOpen) == null || d.call(a, {
4851
+ (d = (a = pe.current) == null ? void 0 : a.onAppointmentPreviewOpen) == null || d.call(a, {
4851
4852
  eventId: t,
4852
4853
  view: Ge.current,
4853
4854
  privacy: un.current
@@ -4855,27 +4856,27 @@ function _c({
4855
4856
  }, []), xa = m(
4856
4857
  (t) => {
4857
4858
  var a, d;
4858
- (d = (a = ue.current) == null ? void 0 : a.onSettingChanged) == null || d.call(a, t);
4859
+ (d = (a = pe.current) == null ? void 0 : a.onSettingChanged) == null || d.call(a, t);
4859
4860
  },
4860
4861
  []
4861
4862
  ), Rr = m(() => {
4862
4863
  var t, a;
4863
- (a = (t = ue.current) == null ? void 0 : t.onHoursOpened) == null || a.call(t);
4864
+ (a = (t = pe.current) == null ? void 0 : t.onHoursOpened) == null || a.call(t);
4864
4865
  }, []), Aa = m(
4865
4866
  (t, a) => {
4866
4867
  var d, q;
4867
- a && ((q = (d = ue.current) == null ? void 0 : d.onToolPreferencesChange) == null || q.call(d, a));
4868
+ a && ((q = (d = pe.current) == null ? void 0 : d.onToolPreferencesChange) == null || q.call(d, a));
4868
4869
  },
4869
4870
  []
4870
4871
  ), fr = m(() => {
4871
4872
  var a, d;
4872
4873
  const t = u.current;
4873
- !en || !t || (d = (a = ue.current) == null ? void 0 : a.onToolPreferencesChange) == null || d.call(a, {
4874
+ !en || !t || (d = (a = pe.current) == null ? void 0 : a.onToolPreferencesChange) == null || d.call(a, {
4874
4875
  action: "resize",
4875
4876
  toolId: t
4876
4877
  });
4877
4878
  }, [en]);
4878
- V(() => {
4879
+ G(() => {
4879
4880
  dn && Xn("");
4880
4881
  }, [dn]);
4881
4882
  const [ca, zr] = _("create"), la = m(
@@ -4897,7 +4898,7 @@ function _c({
4897
4898
  const d = t.editEventId ? $e.find((nr) => nr.event.id === t.editEventId) : void 0, q = Ta(d), Ee = d ? d.archiveId : $n.current, re = Ee ? { ...t, archiveId: Ee } : t;
4898
4899
  await (q ? Un(re) : Un(re, a)), $n.current = void 0;
4899
4900
  try {
4900
- !t.editEventId && t.recurrence && ((Jr = (Se = ue.current) == null ? void 0 : Se.onRecurringCreated) == null || Jr.call(Se, {
4901
+ !t.editEventId && t.recurrence && ((Jr = (Se = pe.current) == null ? void 0 : Se.onRecurringCreated) == null || Jr.call(Se, {
4901
4902
  rule: fo(t.recurrence) ? "custom" : "preset",
4902
4903
  end: t.recurrence.ends === "until" ? "date" : "count",
4903
4904
  skipClosedDays: t.recurrence.skipClosedDays === !0
@@ -4910,7 +4911,7 @@ function _c({
4910
4911
  nr
4911
4912
  ).filter((Or) => Or !== d.event.id);
4912
4913
  if (va.length > 0) {
4913
- At(
4914
+ Wt(
4914
4915
  (Zr) => qi(Zr, d, t, va, s)
4915
4916
  );
4916
4917
  const Or = Ki(d, t, s).find(
@@ -4940,10 +4941,10 @@ function _c({
4940
4941
  } catch {
4941
4942
  hn(oe("emptyState.error.title"));
4942
4943
  }
4943
- const pe = new Date(t.date);
4944
- t.allDay || pe.setHours(t.time.hours, t.time.minutes), Oa((nr) => ({
4944
+ const me = new Date(t.date);
4945
+ t.allDay || me.setHours(t.time.hours, t.time.minutes), Oa((nr) => ({
4945
4946
  tick: ((nr == null ? void 0 : nr.tick) ?? 0) + 1,
4946
- date: pe,
4947
+ date: me,
4947
4948
  chairId: t.chairId ?? void 0,
4948
4949
  operatorId: t.operatorId ?? void 0
4949
4950
  }));
@@ -4951,7 +4952,7 @@ function _c({
4951
4952
  [
4952
4953
  $e,
4953
4954
  Un,
4954
- At,
4955
+ Wt,
4955
4956
  Fn,
4956
4957
  s,
4957
4958
  oe,
@@ -4966,29 +4967,29 @@ function _c({
4966
4967
  hn(oe("calendarWorkspace.inc1.readOnly.changeBlocked"));
4967
4968
  return;
4968
4969
  }
4969
- const d = (re = $e.find((pe) => pe.event.id === t)) != null && re.series ? Ga($e, t, (a == null ? void 0 : a.scope) ?? "this") : null, q = d ? d.map((pe) => cn(pe)) : [cn(t, a)], Ee = () => {
4970
+ const d = (re = $e.find((me) => me.event.id === t)) != null && re.series ? Ga($e, t, (a == null ? void 0 : a.scope) ?? "this") : null, q = d ? d.map((me) => cn(me)) : [cn(t, a)], Ee = () => {
4970
4971
  d && d.length > 1 && fn(
4971
4972
  oe("calendarWorkspace.inc1.save.seriesDeleted", {
4972
4973
  count: d.length
4973
4974
  })
4974
4975
  ), a != null && a.removeFromCarePlan && fn(oe("calendarWorkspace.inc1.save.carePlanRemoved"));
4975
4976
  };
4976
- return q.every((pe) => !pe) ? Ee() : Promise.all(q).then(Ee);
4977
+ return q.every((me) => !me) ? Ee() : Promise.all(q).then(Ee);
4977
4978
  },
4978
4979
  [$e, cn, oe, f, mt]
4979
4980
  ), [Ur, ua] = _(null), pa = $(null);
4980
4981
  pa.current = Ur;
4981
- const Lt = m(
4982
+ const Ft = m(
4982
4983
  (t, a, d) => {
4983
- var re, pe, Se, Jr;
4984
+ var re, me, Se, Jr;
4984
4985
  if (!qt || mt.has(qt.event.id)) return;
4985
4986
  ua({ kind: t, eventId: qt.event.id, withTreatments: d });
4986
4987
  const q = qt.event.id, Ee = Ge.current;
4987
- t === "move" ? (pe = (re = ue.current) == null ? void 0 : re.onAppointmentMoveInitiated) == null || pe.call(re, {
4988
+ t === "move" ? (me = (re = pe.current) == null ? void 0 : re.onAppointmentMoveInitiated) == null || me.call(re, {
4988
4989
  eventId: q,
4989
4990
  surface: a,
4990
4991
  view: Ee
4991
- }) : (Jr = (Se = ue.current) == null ? void 0 : Se.onAppointmentCopyInitiated) == null || Jr.call(Se, {
4992
+ }) : (Jr = (Se = pe.current) == null ? void 0 : Se.onAppointmentCopyInitiated) == null || Jr.call(Se, {
4992
4993
  eventId: q,
4993
4994
  withTreatments: d === !0,
4994
4995
  surface: a,
@@ -4997,14 +4998,14 @@ function _c({
4997
4998
  },
4998
4999
  [qt, mt]
4999
5000
  ), at = m(
5000
- (t) => Lt("move", t),
5001
- [Lt]
5001
+ (t) => Ft("move", t),
5002
+ [Ft]
5002
5003
  ), Mr = m(
5003
- (t, a) => Lt("copy", a, t),
5004
- [Lt]
5004
+ (t, a) => Ft("copy", a, t),
5005
+ [Ft]
5005
5006
  ), qr = m((t) => {
5006
5007
  var a, d;
5007
- (d = (a = ue.current) == null ? void 0 : a.onAppointmentEditOpened) == null || d.call(a, {
5008
+ (d = (a = pe.current) == null ? void 0 : a.onAppointmentEditOpened) == null || d.call(a, {
5008
5009
  eventId: t,
5009
5010
  surface: "panel",
5010
5011
  view: Ge.current
@@ -5012,7 +5013,7 @@ function _c({
5012
5013
  }, []), Kr = m(
5013
5014
  (t, a) => {
5014
5015
  var d, q;
5015
- (q = (d = ue.current) == null ? void 0 : d.onAppointmentDeleteInitiated) == null || q.call(d, {
5016
+ (q = (d = pe.current) == null ? void 0 : d.onAppointmentDeleteInitiated) == null || q.call(d, {
5016
5017
  eventId: t,
5017
5018
  surface: a,
5018
5019
  view: Ge.current
@@ -5022,7 +5023,7 @@ function _c({
5022
5023
  ), Sr = m(
5023
5024
  (t, a) => {
5024
5025
  var d, q;
5025
- (q = (d = ue.current) == null ? void 0 : d.onDocumentCreateClicked) == null || q.call(d, {
5026
+ (q = (d = pe.current) == null ? void 0 : d.onDocumentCreateClicked) == null || q.call(d, {
5026
5027
  eventId: t,
5027
5028
  kind: a,
5028
5029
  surface: "panel",
@@ -5032,34 +5033,34 @@ function _c({
5032
5033
  []
5033
5034
  ), Qe = m((t) => {
5034
5035
  var a, d;
5035
- (d = (a = ue.current) == null ? void 0 : a.onWaitingListWhatsAppClicked) == null || d.call(a, {
5036
+ (d = (a = pe.current) == null ? void 0 : a.onWaitingListWhatsAppClicked) == null || d.call(a, {
5036
5037
  entryId: t,
5037
5038
  surface: "rail",
5038
5039
  view: Ge.current
5039
5040
  });
5040
5041
  }, []), Gr = m((t) => {
5041
5042
  var a, d;
5042
- (d = (a = ue.current) == null ? void 0 : a.onAppointmentMoveInitiated) == null || d.call(a, {
5043
+ (d = (a = pe.current) == null ? void 0 : a.onAppointmentMoveInitiated) == null || d.call(a, {
5043
5044
  eventId: t,
5044
5045
  surface: "grid",
5045
5046
  view: Ge.current
5046
5047
  });
5047
5048
  }, []), Ba = m(() => {
5048
5049
  var t, a;
5049
- (a = (t = ue.current) == null ? void 0 : t.onPrintUsed) == null || a.call(t, { view: Ge.current });
5050
+ (a = (t = pe.current) == null ? void 0 : t.onPrintUsed) == null || a.call(t, { view: Ge.current });
5050
5051
  }, []), Vr = m(() => {
5051
5052
  var t, a;
5052
- (a = (t = ue.current) == null ? void 0 : t.onJumpToDateUsed) == null || a.call(t, { view: Ge.current });
5053
+ (a = (t = pe.current) == null ? void 0 : t.onJumpToDateUsed) == null || a.call(t, { view: Ge.current });
5053
5054
  }, []), ma = m(
5054
5055
  (t) => {
5055
5056
  var a, d;
5056
- return (d = (a = ue.current) == null ? void 0 : a.onWaitingListFilterUsed) == null ? void 0 : d.call(a, { filter: t });
5057
+ return (d = (a = pe.current) == null ? void 0 : a.onWaitingListFilterUsed) == null ? void 0 : d.call(a, { filter: t });
5057
5058
  },
5058
5059
  []
5059
5060
  ), jr = m(
5060
5061
  (t) => {
5061
5062
  var a, d;
5062
- return (d = (a = ue.current) == null ? void 0 : a.onWaitingListAdvancedFilterToggled) == null ? void 0 : d.call(a, { action: t });
5063
+ return (d = (a = pe.current) == null ? void 0 : a.onWaitingListAdvancedFilterToggled) == null ? void 0 : d.call(a, { action: t });
5063
5064
  },
5064
5065
  []
5065
5066
  ), xr = m(
@@ -5083,21 +5084,21 @@ function _c({
5083
5084
  ), [fa, e] = _(0), c = m(() => {
5084
5085
  e((t) => t + 1);
5085
5086
  }, []), [h, T] = _({ tick: 0 });
5086
- V(() => {
5087
+ G(() => {
5087
5088
  le && (T((t) => ({ tick: t.tick + 1, id: le })), e((t) => t + 1));
5088
- }, [le, j]);
5089
- const [C, W] = _(null), S = $(null), Y = m(
5089
+ }, [le, V]);
5090
+ const [C, W] = _(null), E = $(null), Y = m(
5090
5091
  (t) => {
5091
- S.current = t ? t.id : "add", W({ entry: t }), Z("waiting");
5092
+ E.current = t ? t.id : "add", W({ entry: t }), Z("waiting");
5092
5093
  },
5093
5094
  [Z]
5094
5095
  ), ye = m(() => W(null), []), R = $(C);
5095
- V(() => {
5096
+ G(() => {
5096
5097
  var re;
5097
5098
  const t = R.current !== null;
5098
5099
  if (R.current = C, !t || C !== null) return;
5099
- const a = S.current;
5100
- S.current = null;
5100
+ const a = E.current;
5101
+ E.current = null;
5101
5102
  const d = document.querySelector(
5102
5103
  `[data-active-tool="${y.waitingList}"]`
5103
5104
  ), q = document.activeElement;
@@ -5140,7 +5141,7 @@ function _c({
5140
5141
  },
5141
5142
  [an]
5142
5143
  ), Gt = $(!1);
5143
- return V(() => {
5144
+ return G(() => {
5144
5145
  if (!Gt.current) {
5145
5146
  if (Gt.current = !0, P) {
5146
5147
  tr.current = {
@@ -5178,11 +5179,11 @@ function _c({
5178
5179
  {
5179
5180
  onDraftChange: Hn,
5180
5181
  workspaceRef: Cn,
5181
- activeToolId: St,
5182
+ activeToolId: xt,
5182
5183
  availableTools: kt,
5183
5184
  focus: ct,
5184
5185
  rows: $e,
5185
- locale: Et,
5186
+ locale: St,
5186
5187
  privacy: dn,
5187
5188
  onPrivacyOff: Tr,
5188
5189
  selectedRow: qt,
@@ -5194,7 +5195,7 @@ function _c({
5194
5195
  editorSeed: Ct,
5195
5196
  slotPatch: yt,
5196
5197
  loadAppointmentEditor: ae,
5197
- loadAppointmentDetails: ke,
5198
+ loadAppointmentDetails: ue,
5198
5199
  waitingList: lt,
5199
5200
  waitingSeedTick: Ln.tick,
5200
5201
  findSlotsSeed: Pt,
@@ -5203,15 +5204,15 @@ function _c({
5203
5204
  mapsLink: ot.mapsLink,
5204
5205
  defaultDurationMin: ot.defaultDurationMin,
5205
5206
  noteUnrecordedEdits: O,
5206
- recurrence: he,
5207
- consentsForCares: x,
5207
+ recurrence: ve,
5208
+ consentsForCares: S,
5208
5209
  medicalDevicesForCares: ie,
5209
5210
  sameDayReminders: X,
5210
- signatureCredits: E,
5211
+ signatureCredits: x,
5211
5212
  createPatientFromBooking: J,
5212
- createPatient: ge,
5213
+ createPatient: he,
5213
5214
  defaultReminders: He,
5214
- proposeFirstVisit: Ft,
5215
+ proposeFirstVisit: Nt,
5215
5216
  readOnly: f,
5216
5217
  notesSeamFor: Yn,
5217
5218
  businessHours: U,
@@ -5225,13 +5226,13 @@ function _c({
5225
5226
  onDeleteInitiated: Kr,
5226
5227
  onDocumentCreateClicked: Sr,
5227
5228
  onWhatsAppClicked: Qe,
5228
- onStatusChange: me ? void 0 : Dr,
5229
+ onStatusChange: fe ? void 0 : Dr,
5229
5230
  onDescriptionChange: zt,
5230
5231
  onRevealAppointment: Sa,
5231
5232
  toolSourceRef: ze,
5232
5233
  onDetailsDocked: oa,
5233
5234
  onRequestSignature: _n,
5234
- onRequestSignatureOnDevice: Nt,
5235
+ onRequestSignatureOnDevice: wt,
5235
5236
  onOpenPatient: Te,
5236
5237
  onOpenScheduler: _e,
5237
5238
  onSaveAndReturn: Bt,
@@ -5245,7 +5246,7 @@ function _c({
5245
5246
  onBookSlotFromFinder: jn,
5246
5247
  onShowAvailability: Mn,
5247
5248
  onFinderSearchRange: K,
5248
- gridAxis: xt.resourceKind,
5249
+ gridAxis: At.resourceKind,
5249
5250
  bookings: Er,
5250
5251
  bookingQueue: i,
5251
5252
  backlogFilters: Ue,
@@ -5259,7 +5260,7 @@ function _c({
5259
5260
  onPlaceWaiting: Dt,
5260
5261
  onCreateTask: A,
5261
5262
  onUpdateTask: bt,
5262
- onDeleteTask: Wt,
5263
+ onDeleteTask: Ot,
5263
5264
  onSetTaskDone: on,
5264
5265
  loadTask: $t,
5265
5266
  taskComposeTick: mr,
@@ -5301,14 +5302,14 @@ function _c({
5301
5302
  }
5302
5303
  }
5303
5304
  ) : null,
5304
- me && de ? /* @__PURE__ */ n(
5305
+ fe && de ? /* @__PURE__ */ n(
5305
5306
  lc,
5306
5307
  {
5307
- archive: me,
5308
+ archive: fe,
5308
5309
  onCancel: () => z(null),
5309
5310
  onChoose: (t) => {
5310
5311
  Nn.current = {
5311
- id: t === "archive" ? me.id : void 0
5312
+ id: t === "archive" ? fe.id : void 0
5312
5313
  }, z(null), de();
5313
5314
  }
5314
5315
  }
@@ -5328,17 +5329,17 @@ function _c({
5328
5329
  id: st,
5329
5330
  availableTools: kt,
5330
5331
  schedulerLicenseKey: Ne,
5331
- preferences: G,
5332
+ preferences: j,
5332
5333
  rows: $e,
5333
- setRows: At,
5334
- display: xt,
5334
+ setRows: Wt,
5335
+ display: At,
5335
5336
  setDisplay: On,
5336
- calendarArchive: me,
5337
+ calendarArchive: fe,
5337
5338
  prompts: Ye,
5338
5339
  defaultDisplay: ee,
5339
5340
  onFocus: Ea,
5340
- detailsOnEveryClick: ke !== void 0,
5341
- locale: Et,
5341
+ detailsOnEveryClick: ue !== void 0,
5342
+ locale: St,
5342
5343
  readOnly: f,
5343
5344
  placement: Ur,
5344
5345
  onPlacementEnd: xr,
@@ -5383,10 +5384,10 @@ function _c({
5383
5384
  onRecurringScopeChosen: hr,
5384
5385
  onViewChange: er,
5385
5386
  initialView: Vt,
5386
- onNavigate: wt,
5387
+ onNavigate: Et,
5387
5388
  onPeekOpen: $r,
5388
5389
  settingsBridge: be,
5389
- settingsOpen: St === y.settings,
5390
+ settingsOpen: xt === y.settings,
5390
5391
  onToggleSettings: ia,
5391
5392
  onSettingChanged: xa,
5392
5393
  onHoursOpened: Rr,
@@ -5406,7 +5407,7 @@ function _c({
5406
5407
  children: /* @__PURE__ */ n(
5407
5408
  Zi,
5408
5409
  {
5409
- activeToolId: St,
5410
+ activeToolId: xt,
5410
5411
  onActiveToolChange: En,
5411
5412
  onFavoriteIdsChange: Aa,
5412
5413
  onPanelWidthChange: fr,
@@ -5455,7 +5456,7 @@ function id({
5455
5456
  guard: l,
5456
5457
  requestClose: P,
5457
5458
  discardDialog: le
5458
- } = lo(), j = m(
5459
+ } = lo(), V = m(
5459
5460
  () => P(k),
5460
5461
  [P, k]
5461
5462
  ), xe = B(
@@ -5474,7 +5475,7 @@ function id({
5474
5475
  intent: "ghost",
5475
5476
  size: "sm",
5476
5477
  "aria-label": N("common.close", "Close"),
5477
- onClick: j
5478
+ onClick: V
5478
5479
  }
5479
5480
  );
5480
5481
  return /* @__PURE__ */ I(Sn, { children: [
@@ -5482,7 +5483,7 @@ function id({
5482
5483
  te,
5483
5484
  {
5484
5485
  open: r,
5485
- onOpenChange: (O) => O ? s(!0) : j(),
5486
+ onOpenChange: (O) => O ? s(!0) : V(),
5486
5487
  id: v,
5487
5488
  children: /* @__PURE__ */ I(te.Content, { flush: !0, hideCloseButton: !0, "aria-describedby": void 0, children: [
5488
5489
  /* @__PURE__ */ n(te.Title, { asChild: !0, children: /* @__PURE__ */ n("span", { className: "ds:sr-only", children: U }) }),
@@ -5515,4 +5516,4 @@ export {
5515
5516
  sd as C,
5516
5517
  ad as i
5517
5518
  };
5518
- //# sourceMappingURL=calendar-appointment-editor-dialog-D0n_bVsT.js.map
5519
+ //# sourceMappingURL=calendar-appointment-editor-dialog-SxSkOTnO.js.map