@alfadocs/ui-kit 1.147.0 → 1.147.2

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 (86) hide show
  1. package/dist/_chunks/{appointment-details-panel.history-eqPMKmW0.js → appointment-details-panel.history-BxNqcA-r.js} +109 -110
  2. package/dist/_chunks/{calendar-appointment-editor-dialog-sY-k0GGW.js → calendar-appointment-editor-dialog-CoIFwj9g.js} +4 -4
  3. package/dist/_chunks/{calendar-waiting-list-panel-Bm7NAZdk.js → calendar-waiting-list-panel-DuALuqLD.js} +2 -2
  4. package/dist/_chunks/{calendar.sheets-CCvdZF-R.js → calendar.sheets-CueyPkTT.js} +3 -3
  5. package/dist/_chunks/editable-description-BsSjLnSx.js +193 -0
  6. package/dist/_chunks/{editable-description.agent-Bm_LBV2j.js → editable-description.agent-zyyR_hxB.js} +2 -2
  7. package/dist/_chunks/{notes-panel-C9aB1Cma.js → notes-panel-BHMnLbEH.js} +2 -2
  8. package/dist/_chunks/registry-connection-panel-ACOsXu3F.js +529 -0
  9. package/dist/_chunks/{rich-text-editor-CJXc5GgH.js → rich-text-editor-BAcJq1PO.js} +445 -437
  10. package/dist/_chunks/{use-appointment-details-read-Dod21IxM.js → use-appointment-details-read-CC74Y-r5.js} +417 -422
  11. package/dist/agent-catalog.json +5 -5
  12. package/dist/agent-i18n/en.json +2 -2
  13. package/dist/appointment-editor-panel/index.js +1 -1
  14. package/dist/browser-support.js +1 -1
  15. package/dist/components/appointment-details-panel/appointment-details-panel.history.d.ts +4 -6
  16. package/dist/components/appointment-details-panel/index.js +1 -1
  17. package/dist/components/editable-description/editable-description.d.ts +2 -1
  18. package/dist/components/editable-description/index.js +2 -2
  19. package/dist/components/notes-panel/index.js +1 -1
  20. package/dist/components/registry-connection-panel/index.js +1 -1
  21. package/dist/components/registry-connection-panel/registry-connection-panel.d.ts +14 -0
  22. package/dist/components/rich-text-editor/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/i18n/locales/ar.d.ts +0 -1
  26. package/dist/i18n/locales/ar.js +1 -2
  27. package/dist/i18n/locales/de.d.ts +0 -1
  28. package/dist/i18n/locales/de.js +1 -2
  29. package/dist/i18n/locales/el.d.ts +0 -1
  30. package/dist/i18n/locales/el.js +1 -2
  31. package/dist/i18n/locales/en.d.ts +0 -1
  32. package/dist/i18n/locales/en.js +1 -2
  33. package/dist/i18n/locales/es.d.ts +0 -1
  34. package/dist/i18n/locales/es.js +1 -2
  35. package/dist/i18n/locales/fr.d.ts +0 -1
  36. package/dist/i18n/locales/fr.js +1 -2
  37. package/dist/i18n/locales/hi.d.ts +0 -1
  38. package/dist/i18n/locales/hi.js +1 -2
  39. package/dist/i18n/locales/it.d.ts +0 -1
  40. package/dist/i18n/locales/it.js +1 -2
  41. package/dist/i18n/locales/ja.d.ts +0 -1
  42. package/dist/i18n/locales/ja.js +1 -2
  43. package/dist/i18n/locales/nl.d.ts +0 -1
  44. package/dist/i18n/locales/nl.js +1 -2
  45. package/dist/i18n/locales/pl.d.ts +0 -1
  46. package/dist/i18n/locales/pl.js +1 -2
  47. package/dist/i18n/locales/pt.d.ts +0 -1
  48. package/dist/i18n/locales/pt.js +1 -2
  49. package/dist/i18n/locales/ro.d.ts +0 -1
  50. package/dist/i18n/locales/ro.js +1 -2
  51. package/dist/i18n/locales/ru.d.ts +0 -1
  52. package/dist/i18n/locales/ru.js +1 -2
  53. package/dist/i18n/locales/sq.d.ts +0 -1
  54. package/dist/i18n/locales/sq.js +1 -2
  55. package/dist/i18n/locales/sv.d.ts +0 -1
  56. package/dist/i18n/locales/sv.js +1 -2
  57. package/dist/i18n/locales/tr.d.ts +0 -1
  58. package/dist/i18n/locales/tr.js +1 -2
  59. package/dist/i18n/locales/zh.d.ts +0 -1
  60. package/dist/i18n/locales/zh.js +1 -2
  61. package/dist/index.js +8 -8
  62. package/dist/locales/ar.json +1 -2
  63. package/dist/locales/de.json +1 -2
  64. package/dist/locales/el.json +1 -2
  65. package/dist/locales/en.json +1 -2
  66. package/dist/locales/es.json +1 -2
  67. package/dist/locales/fr.json +1 -2
  68. package/dist/locales/hi.json +1 -2
  69. package/dist/locales/it.json +1 -2
  70. package/dist/locales/ja.json +1 -2
  71. package/dist/locales/nl.json +1 -2
  72. package/dist/locales/pl.json +1 -2
  73. package/dist/locales/pt.json +1 -2
  74. package/dist/locales/ro.json +1 -2
  75. package/dist/locales/ru.json +1 -2
  76. package/dist/locales/sq.json +1 -2
  77. package/dist/locales/sv.json +1 -2
  78. package/dist/locales/tr.json +1 -2
  79. package/dist/locales/zh.json +1 -2
  80. package/dist/online-bookings-panel/index.js +1 -1
  81. package/dist/patterns/calendar/index.js +2 -2
  82. package/dist/tokens.css +1 -1
  83. package/dist/waiting-list-panel/index.js +2 -2
  84. package/package.json +1 -1
  85. package/dist/_chunks/editable-description-BQauSuCG.js +0 -142
  86. package/dist/_chunks/registry-connection-panel-BEAkwivy.js +0 -503
@@ -1,32 +1,33 @@
1
- import { jsxs as v, jsx as e, Fragment as ie } from "react/jsx-runtime";
1
+ import { jsxs as b, jsx as e, Fragment as ne } from "react/jsx-runtime";
2
2
  import { c as lt } from "./index-D2ZczOXr.js";
3
- import { useId as je, useRef as R, forwardRef as Zt, useEffect as Ae, useMemo as kt, useState as H, useCallback as en } from "react";
4
- import { useTranslation as J } from "react-i18next";
5
- import { u as tn } from "./registry-DvAUVLHh.js";
6
- import { u as ue } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
7
- import { c as nn } from "./compose-refs-C0k0tdqF.js";
3
+ import { useId as tt, useRef as R, forwardRef as Qt, useEffect as Se, useMemo as kt, useState as F, useCallback as Zt } from "react";
4
+ import { useTranslation as G } from "react-i18next";
5
+ import { u as en } from "./registry-DvAUVLHh.js";
6
+ import { u as de } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
7
+ import { c as tn } from "./compose-refs-C0k0tdqF.js";
8
8
  import { g as nt } from "./get-error-message-DbFUzuja.js";
9
- import { h as Ze } from "./handled-rejection-C-6Dq0As.js";
10
- import { c as an, a as wt } from "./privacy-mask-zVh0ntm0.js";
11
- import { A as X } from "./alert-C4WKViaS.js";
9
+ import { h as Qe } from "./handled-rejection-C-6Dq0As.js";
10
+ import { c as nn, a as wt } from "./privacy-mask-zVh0ntm0.js";
11
+ import { A as ce } from "./alert-C4WKViaS.js";
12
12
  import { B as C } from "./button-Dp4j9ygh.js";
13
- import { I as Mt } from "./icon-button-u9VMQn3x.js";
14
- import { B as sn } from "./button-group-N60L3HMa.js";
13
+ import { I as Ht } from "./icon-button-u9VMQn3x.js";
14
+ import { B as an } from "./button-group-N60L3HMa.js";
15
15
  import { D as $e } from "./dropdown-menu-Bm1KALnk.js";
16
- import { E as Ft } from "./editable-description-BQauSuCG.js";
16
+ import { E as Mt } from "./editable-description-BsSjLnSx.js";
17
17
  import { N as at } from "./note-timeline-BbjHMhkL.js";
18
18
  import { P as Wt } from "./panel-header-CbtlTe85.js";
19
- import { P as et } from "./panel-subview-DjBwNV16.js";
19
+ import { P as Ze } from "./panel-subview-DjBwNV16.js";
20
20
  import { P as Bt } from "./patient-summary-card-roM9Esfb.js";
21
- import { S as pe } from "./section-card-CYfeQ6EQ.js";
22
- import { C as on, S as Se } from "./skeleton-tTWJpvAq.js";
21
+ import { S as ue } from "./section-card-CYfeQ6EQ.js";
22
+ import { C as sn, S as we } from "./skeleton-tTWJpvAq.js";
23
+ import { F as on } from "./form-field-CyHfOVKF.js";
23
24
  import { T as rn } from "./text-area-COMVJ1yE.js";
24
25
  import { T as ln } from "./tooltip-uEBdD1-5.js";
25
26
  import { T as Ut } from "./treatment-receipt-BZzwvsnY.js";
26
- import { a as tt } from "./whatsapp-button-XbozeDl_.js";
27
+ import { a as et } from "./whatsapp-button-XbozeDl_.js";
27
28
  import { W as dn, a as cn } from "./workflow-status-Cg7yjnye.js";
28
29
  import { a as St, u as un, i as pn } from "./appointment-workflow-status-S-lx81Yz.js";
29
- import { M as mn, C as At, A as hn } from "./appointment-details-panel.history-eqPMKmW0.js";
30
+ import { M as mn, C as At, A as hn } from "./appointment-details-panel.history-BxNqcA-r.js";
30
31
  import { R as fn, a as xt, b as it, e as gn, g as vn, c as yn, d as bn, h as kn, D as Nt, f as wn, i as Sn, p as An } from "./appointment-details-panel.identity--_j07UG1.js";
31
32
  import { A as Tt } from "./avatar-Dp5apm1d.js";
32
33
  import { B as $t } from "./badge-BUk4RjTS.js";
@@ -34,7 +35,7 @@ import { C as xn } from "./counter-WsvRuum1.js";
34
35
  import { D as qe } from "./description-list-DA4TgL_I.js";
35
36
  import { T as Et } from "./timestamp-UMF1llBs.js";
36
37
  import { T as Nn } from "./transaction-chip-CkYd-3ky.js";
37
- import { H as xe } from "./hover-card-CS8ulBf9.js";
38
+ import { H as Ae } from "./hover-card-CS8ulBf9.js";
38
39
  import { c as qt } from "./createLucideIcon-DhHxpK9K.js";
39
40
  import { S as Ct } from "./smartphone-C0rFF2if.js";
40
41
  import { P as Tn } from "./phone-FceYcIFQ.js";
@@ -47,11 +48,11 @@ import { C as Pn } from "./credit-card-D9XZsHGA.js";
47
48
  import { H as Ln } from "./heart-pulse-BCppJyN2.js";
48
49
  import { R as On } from "./refresh-cw-DnI0cLFC.js";
49
50
  import { C as _n } from "./calendar-days-BGWklvE-.js";
50
- import { C as Hn } from "./clock-Drd4Wtis.js";
51
- import { H as Mn } from "./hourglass-BEAzW1wE.js";
51
+ import { C as Fn } from "./clock-Drd4Wtis.js";
52
+ import { H as Hn } from "./hourglass-BEAzW1wE.js";
52
53
  import { V as zt } from "./video-BheNGvsu.js";
53
54
  import { A as It } from "./armchair-BaLDW6Hz.js";
54
- import { B as Fn } from "./building-2-D33bLCWL.js";
55
+ import { B as Mn } from "./building-2-D33bLCWL.js";
55
56
  import { R as Wn } from "./repeat-CvQa5rZt.js";
56
57
  import { N as Bn } from "./notebook-pen-CO7HoM-W.js";
57
58
  import { C as st } from "./clipboard-list-rSzfIYZB.js";
@@ -227,11 +228,11 @@ function ot(t) {
227
228
  const n = document.activeElement;
228
229
  n && n !== document.body || t == null || t.focus({ preventScroll: !0 });
229
230
  }
230
- function He(t) {
231
+ function _e(t) {
231
232
  const n = document.getElementById(t);
232
233
  n && !n.hasAttribute("tabindex") && (n.tabIndex = -1), ot(n);
233
234
  }
234
- const ce = {
235
+ const le = {
235
236
  advancedSignature: "setup-advanced-signature",
236
237
  requestSignature: "request-signature",
237
238
  signOnDevice: "sign-on-device",
@@ -289,42 +290,42 @@ function da(t, n, i) {
289
290
  function ca(t, n, i, d) {
290
291
  const c = fn[i.frequency];
291
292
  if (!c) return;
292
- const l = (b) => `calendarWorkspace.editor.${b}`, u = (b) => `calendarWorkspace.details.${b}`, p = oa[i.frequency], r = p && (i.interval ?? 1) > 1 ? t(l(p), { count: i.interval }) : t(l(c)), a = (i.byDay ?? []).map((b) => la.exec(b)).filter((b) => b !== null), o = i.frequency === "weekly" ? sa.filter(
293
- (b) => a.some(([, m, N]) => !m && N === b)
294
- ) : [], f = i.frequency === "monthly" || i.frequency === "yearly" ? a.find(([, b]) => b) : void 0;
295
- let y = r;
293
+ const l = (y) => `calendarWorkspace.editor.${y}`, u = (y) => `calendarWorkspace.details.${y}`, p = oa[i.frequency], r = p && (i.interval ?? 1) > 1 ? t(l(p), { count: i.interval }) : t(l(c)), a = (i.byDay ?? []).map((y) => la.exec(y)).filter((y) => y !== null), o = i.frequency === "weekly" ? sa.filter(
294
+ (y) => a.some(([, m, N]) => !m && N === y)
295
+ ) : [], f = i.frequency === "monthly" || i.frequency === "yearly" ? a.find(([, y]) => y) : void 0;
296
+ let v = r;
296
297
  if (o.length > 0)
297
- y = t(u("seriesOnDays"), {
298
+ v = t(u("seriesOnDays"), {
298
299
  every: r,
299
300
  days: new Intl.ListFormat(n, { type: "conjunction" }).format(
300
- o.map((b) => Pt(b, n))
301
+ o.map((y) => Pt(y, n))
301
302
  )
302
303
  });
303
304
  else if (f) {
304
- const [, b, m] = f, N = Pt(m, n);
305
- y = b === "-1" ? t(u("seriesOnLast"), { every: r, weekday: N }) : t(u("seriesOnNth"), {
305
+ const [, y, m] = f, N = Pt(m, n);
306
+ v = y === "-1" ? t(u("seriesOnLast"), { every: r, weekday: N }) : t(u("seriesOnNth"), {
306
307
  every: r,
307
308
  weekday: N,
308
- ordinal: t(l(ra[b]))
309
+ ordinal: t(l(ra[y]))
309
310
  });
310
311
  }
311
312
  if (i.count !== void 0)
312
313
  return t(u("seriesRule"), {
313
- frequency: y,
314
+ frequency: v,
314
315
  count: i.count
315
316
  });
316
317
  const k = i.untilIso ? da(n, i.untilIso, d) : void 0;
317
- return k ? t(u("seriesUntil"), { rule: y, date: k }) : y;
318
+ return k ? t(u("seriesUntil"), { rule: v, date: k }) : v;
318
319
  }
319
320
  function rt({
320
321
  eyebrow: t,
321
322
  heading: n,
322
323
  facts: i
323
324
  }) {
324
- return /* @__PURE__ */ v(ie, { children: [
325
- /* @__PURE__ */ e(xe.Eyebrow, { children: t }),
326
- /* @__PURE__ */ e(xe.Heading, { children: n }),
327
- i && i.length > 0 ? /* @__PURE__ */ e(xe.Body, { children: /* @__PURE__ */ e("ul", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-2xs)] ds:p-0 type-body-sm", children: i.map((d, c) => /* @__PURE__ */ e(
325
+ return /* @__PURE__ */ b(ne, { children: [
326
+ /* @__PURE__ */ e(Ae.Eyebrow, { children: t }),
327
+ /* @__PURE__ */ e(Ae.Heading, { children: n }),
328
+ i && i.length > 0 ? /* @__PURE__ */ e(Ae.Body, { children: /* @__PURE__ */ e("ul", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-2xs)] ds:p-0 type-body-sm", children: i.map((d, c) => /* @__PURE__ */ e(
328
329
  "li",
329
330
  {
330
331
  className: d.muted ? "ds:text-[color:var(--muted-foreground)]" : void 0,
@@ -342,9 +343,9 @@ function Lt({
342
343
  facts: d,
343
344
  children: c
344
345
  }) {
345
- return /* @__PURE__ */ v(xe, { children: [
346
- /* @__PURE__ */ e(xe.Trigger, { asChild: !0, children: /* @__PURE__ */ e("button", { type: "button", "data-chip-hover": t, className: ua, children: c }) }),
347
- /* @__PURE__ */ e(xe.Content, { side: "bottom", align: "start", size: "sm", children: /* @__PURE__ */ e(rt, { eyebrow: n, heading: i, facts: d }) })
346
+ return /* @__PURE__ */ b(Ae, { children: [
347
+ /* @__PURE__ */ e(Ae.Trigger, { asChild: !0, children: /* @__PURE__ */ e("button", { type: "button", "data-chip-hover": t, className: ua, children: c }) }),
348
+ /* @__PURE__ */ e(Ae.Content, { side: "bottom", align: "start", size: "sm", children: /* @__PURE__ */ e(rt, { eyebrow: n, heading: i, facts: d }) })
348
349
  ] });
349
350
  }
350
351
  const s = (t) => `calendarWorkspace.details.${t}`, pa = {
@@ -373,7 +374,7 @@ function Ke({
373
374
  }
374
375
  function Ot({ rows: t }) {
375
376
  const n = t.filter((i) => !!i);
376
- return n.length === 0 ? null : /* @__PURE__ */ e(qe, { layout: "inline", density: "compact", children: n.map((i) => /* @__PURE__ */ v(
377
+ return n.length === 0 ? null : /* @__PURE__ */ e(qe, { layout: "inline", density: "compact", children: n.map((i) => /* @__PURE__ */ b(
377
378
  qe.Row,
378
379
  {
379
380
  "data-row": i.id,
@@ -397,25 +398,25 @@ function ma({
397
398
  onSignOnDevice: p,
398
399
  onOpenPatient: r
399
400
  }) {
400
- const { t: a } = J("ui"), { patient: o, signing: f, money: y, booking: k } = t;
401
+ const { t: a } = G("ui"), { patient: o, signing: f, money: v, booking: k } = t;
401
402
  if (!o) return null;
402
- const b = (f == null ? void 0 : f.consents) ?? [], m = f && (f.required > 0 || b.length > 0) ? f : void 0, N = ((m == null ? void 0 : m.toComplete) ?? 0) > 0, L = m ? [
403
+ const y = (f == null ? void 0 : f.consents) ?? [], m = f && (f.required > 0 || y.length > 0) ? f : void 0, N = ((m == null ? void 0 : m.toComplete) ?? 0) > 0, L = m ? [
403
404
  {
404
405
  text: N ? m.requestedVia === "sms" ? a(s("signingRequestedSms")) : m.requestedVia === "email" ? a(s("signingRequestedEmail")) : a(s("signingNotRequested")) : a(s("signingAllSigned"))
405
406
  },
406
407
  ...m.aesSetUp ? [] : [{ text: a(s("aesMissing")), muted: !0 }]
407
- ] : [], P = ((f == null ? void 0 : f.required) ?? 0) > 0 && N, T = !!(l != null && l.advancedSignatureUrl) && ((f == null ? void 0 : f.required) ?? 0) > 0 && !(f != null && f.aesSetUp), M = !!u && P, E = !!p && P, I = o.highlightedAnamnesisCount ?? 0, F = o.expiredAnamnesisCount ?? 0, z = (o.highlightedAnamnesisAnswers ?? []).map((x) => ({
408
+ ] : [], P = ((f == null ? void 0 : f.required) ?? 0) > 0 && N, T = !!(l != null && l.advancedSignatureUrl) && ((f == null ? void 0 : f.required) ?? 0) > 0 && !(f != null && f.aesSetUp), H = !!u && P, E = !!p && P, I = o.highlightedAnamnesisCount ?? 0, M = o.expiredAnamnesisCount ?? 0, q = (o.highlightedAnamnesisAnswers ?? []).map((x) => ({
408
409
  text: [
409
410
  x.question,
410
411
  a(s(x.yes ? "anamnesisYes" : "anamnesisNo")),
411
412
  x.answer,
412
413
  it(n, x.interviewIso)
413
414
  ].filter(Boolean).join(" · ")
414
- })), Q = gn(o), se = vn(o) || Q, K = b.map((x) => ({
415
+ })), X = gn(o), ae = vn(o) || X, z = y.map((x) => ({
415
416
  id: `consent-${x.id}`,
416
417
  label: x.name,
417
418
  value: a(s(pa[x.state]))
418
- })), j = [
419
+ })), K = [
419
420
  ...o.dobIso ? [
420
421
  {
421
422
  id: "dob",
@@ -429,11 +430,11 @@ function ma({
429
430
  )}`
430
431
  }
431
432
  ] : [],
432
- ...bn(o).map((x, V) => {
433
- const te = x.label === "mobile" || x.label === "home" || x.label === "work";
433
+ ...bn(o).map((x, Y) => {
434
+ const Z = x.label === "mobile" || x.label === "home" || x.label === "work";
434
435
  return {
435
- id: `phone-${V}`,
436
- label: a(te ? `calendarWorkspace.print.phoneLabels.${x.label}` : s("phone")),
436
+ id: `phone-${Y}`,
437
+ label: a(Z ? `calendarWorkspace.print.phoneLabels.${x.label}` : s("phone")),
437
438
  icon: x.label === "mobile" ? /* @__PURE__ */ e(Ct, {}) : /* @__PURE__ */ e(Tn, {}),
438
439
  value: jt(x.number)
439
440
  };
@@ -448,7 +449,7 @@ function ma({
448
449
  ] : [],
449
450
  /* P27: hidden patient details leave the address out, and with it the
450
451
  row: no map link and no empty "address" line. */
451
- ...c && Q ? [
452
+ ...c && X ? [
452
453
  {
453
454
  id: "address",
454
455
  label: a(s("address")),
@@ -459,32 +460,32 @@ function ma({
459
460
  href: kn(o),
460
461
  target: "_blank",
461
462
  rel: "noopener noreferrer",
462
- "aria-label": `${a(s("mapsLink"))}: ${se}`,
463
- children: se
463
+ "aria-label": `${a(s("mapsLink"))}: ${ae}`,
464
+ children: ae
464
465
  }
465
466
  )
466
467
  }
467
468
  ] : []
468
- ], W = (y == null ? void 0 : y.unpaidAmount) ?? 0, Y = (y == null ? void 0 : y.billableAmount) ?? 0, Z = (k == null ? void 0 : k.paidOnlineAmount) ?? 0, ee = (x, V, te, Ne, Te, me) => /* @__PURE__ */ e(
469
+ ], W = (v == null ? void 0 : v.unpaidAmount) ?? 0, j = (v == null ? void 0 : v.billableAmount) ?? 0, J = (k == null ? void 0 : k.paidOnlineAmount) ?? 0, Q = (x, Y, Z, xe, Ne, pe) => /* @__PURE__ */ e(
469
470
  Lt,
470
471
  {
471
- id: te,
472
+ id: Z,
472
473
  eyebrow: a(s("hoverBilling")),
473
- heading: a(s(Ne), {
474
- amount: Vt(n, V, i)
474
+ heading: a(s(xe), {
475
+ amount: Vt(n, Y, i)
475
476
  }),
476
- facts: [{ text: a(s(Te)) }],
477
+ facts: [{ text: a(s(Ne)) }],
477
478
  children: /* @__PURE__ */ e(
478
479
  Nn,
479
480
  {
480
- "data-chip": te,
481
+ "data-chip": Z,
481
482
  state: x,
482
- amount: V,
483
+ amount: Y,
483
484
  currency: i,
484
485
  locale: n,
485
486
  size: "md",
486
487
  showLabel: !0,
487
- label: me,
488
+ label: pe,
488
489
  showIcon: !1
489
490
  }
490
491
  )
@@ -521,29 +522,29 @@ function ma({
521
522
  {
522
523
  eyebrow: a(s("anamnesisTitle")),
523
524
  heading: a(s("anamnesisHighlighted"), { n: I }),
524
- facts: z
525
+ facts: q
525
526
  }
526
527
  )
527
528
  },
528
- extraChips: W > 0 || Y > 0 || Z > 0 || F > 0 || T || M || E || r ? /* @__PURE__ */ v(ie, { children: [
529
- /* @__PURE__ */ v("span", { className: "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
530
- W > 0 ? ee(
529
+ extraChips: W > 0 || j > 0 || J > 0 || M > 0 || T || H || E || r ? /* @__PURE__ */ b(ne, { children: [
530
+ /* @__PURE__ */ b("span", { className: "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
531
+ W > 0 ? Q(
531
532
  "debt",
532
533
  W,
533
534
  "unpaid",
534
535
  "hoverUnpaidHeading",
535
536
  "hoverUnpaidFact"
536
537
  ) : null,
537
- Y > 0 ? ee(
538
+ j > 0 ? Q(
538
539
  "to-invoice",
539
- Y,
540
+ j,
540
541
  "billable",
541
542
  "hoverBillableHeading",
542
543
  "hoverBillableFact"
543
544
  ) : null,
544
- Z > 0 ? ee(
545
+ J > 0 ? Q(
545
546
  "settled",
546
- Z,
547
+ J,
547
548
  "paidOnline",
548
549
  "hoverPaidOnlineHeading",
549
550
  "hoverPaidOnlineFact",
@@ -552,12 +553,12 @@ function ma({
552
553
  a(s("paidOnline"))
553
554
  ) : null
554
555
  ] }),
555
- M ? /* @__PURE__ */ e(
556
+ H ? /* @__PURE__ */ e(
556
557
  C,
557
558
  {
558
559
  size: "sm",
559
560
  intent: "outline",
560
- "data-action": ce.requestSignature,
561
+ "data-action": le.requestSignature,
561
562
  startIcon: /* @__PURE__ */ e(In, { "aria-hidden": "true" }),
562
563
  onClick: () => u(t.eventId),
563
564
  children: a(s("signingRequest"))
@@ -568,7 +569,7 @@ function ma({
568
569
  {
569
570
  size: "sm",
570
571
  intent: "outline",
571
- "data-action": ce.signOnDevice,
572
+ "data-action": le.signOnDevice,
572
573
  "aria-label": `${a(s("signingRequest"))}: ${a(s("signingOnDevice"))}`,
573
574
  startIcon: /* @__PURE__ */ e(Ct, { "aria-hidden": "true" }),
574
575
  onClick: () => p(t.eventId),
@@ -580,7 +581,7 @@ function ma({
580
581
  {
581
582
  size: "sm",
582
583
  intent: "outline",
583
- "data-action": ce.openPatient,
584
+ "data-action": le.openPatient,
584
585
  startIcon: /* @__PURE__ */ e(Dn, { "aria-hidden": "true" }),
585
586
  onClick: () => r(t.eventId),
586
587
  children: a(s("openPatient"))
@@ -590,26 +591,26 @@ function ma({
590
591
  Ke,
591
592
  {
592
593
  href: l.advancedSignatureUrl,
593
- action: ce.advancedSignature,
594
+ action: le.advancedSignature,
594
595
  icon: /* @__PURE__ */ e(Rn, { "aria-hidden": "true" }),
595
596
  children: a(s("aesSetUp"))
596
597
  }
597
598
  ) : null,
598
- l != null && l.unlockPaymentsUrl && (W > 0 || Y > 0) ? /* @__PURE__ */ e(
599
+ l != null && l.unlockPaymentsUrl && (W > 0 || j > 0) ? /* @__PURE__ */ e(
599
600
  Ke,
600
601
  {
601
602
  href: l.unlockPaymentsUrl,
602
- action: ce.unlockPayments,
603
+ action: le.unlockPayments,
603
604
  icon: /* @__PURE__ */ e(Pn, { "aria-hidden": "true" }),
604
605
  children: a(s("unlockPayments"))
605
606
  }
606
607
  ) : null,
607
- F > 0 ? /* @__PURE__ */ e(
608
+ M > 0 ? /* @__PURE__ */ e(
608
609
  Lt,
609
610
  {
610
611
  id: "anamnesisExpired",
611
612
  eyebrow: a(s("anamnesisTitle")),
612
- heading: a(s("anamnesisExpired"), { n: F }),
613
+ heading: a(s("anamnesisExpired"), { n: M }),
613
614
  facts: [{ text: a(s("hoverAnamnesisExpiredFact")) }],
614
615
  children: /* @__PURE__ */ e(
615
616
  $t,
@@ -618,29 +619,29 @@ function ma({
618
619
  variant: "warning",
619
620
  size: "md",
620
621
  leading: /* @__PURE__ */ e(Ln, {}),
621
- children: a(s("anamnesisExpired"), { n: F })
622
+ children: a(s("anamnesisExpired"), { n: M })
622
623
  }
623
624
  )
624
625
  }
625
626
  ) : null,
626
- F > 0 && (l != null && l.renewAnamnesisUrl) ? /* @__PURE__ */ e(
627
+ M > 0 && (l != null && l.renewAnamnesisUrl) ? /* @__PURE__ */ e(
627
628
  Ke,
628
629
  {
629
630
  href: l.renewAnamnesisUrl,
630
- action: ce.renewAnamnesis,
631
+ action: le.renewAnamnesis,
631
632
  icon: /* @__PURE__ */ e(On, { "aria-hidden": "true" }),
632
633
  children: a(s("anamnesisRenew"))
633
634
  }
634
635
  ) : null
635
636
  ] }) : void 0,
636
- visibleFieldOrder: [...j, ...K].map((x) => x.id),
637
- sections: j.length > 0 || K.length > 0 ? [
638
- ...j.length > 0 ? [{ id: "contact", heading: a(s("sectionPatient")), fields: j }] : [],
639
- ...K.length > 0 ? [
637
+ visibleFieldOrder: [...K, ...z].map((x) => x.id),
638
+ sections: K.length > 0 || z.length > 0 ? [
639
+ ...K.length > 0 ? [{ id: "contact", heading: a(s("sectionPatient")), fields: K }] : [],
640
+ ...z.length > 0 ? [
640
641
  {
641
642
  id: "consents",
642
643
  heading: a(s("sectionSigning")),
643
- fields: K
644
+ fields: z
644
645
  }
645
646
  ] : []
646
647
  ] : void 0
@@ -657,7 +658,7 @@ function ha({
657
658
  privacy: u = !1,
658
659
  history: p
659
660
  }) {
660
- const { t: r } = J("ui"), { appointment: a, booking: o, patient: f } = t, y = (I) => r(`calendarWorkspace.editor.${I}`), k = new Date(a.startIso), b = new Date(k.getTime() + a.durationMin * 6e4), m = Number.isFinite(k.getTime()), { recurrence: N } = a, L = N && ca(r, n, N, a.startIso), P = o ? [
661
+ const { t: r } = G("ui"), { appointment: a, booking: o, patient: f } = t, v = (I) => r(`calendarWorkspace.editor.${I}`), k = new Date(a.startIso), y = new Date(k.getTime() + a.durationMin * 6e4), m = Number.isFinite(k.getTime()), { recurrence: N } = a, L = N && ca(r, n, N, a.startIso), P = o ? [
661
662
  o.bookedAtIso && {
662
663
  id: "bookedAt",
663
664
  label: r(s("bookedAt")),
@@ -698,11 +699,11 @@ function ha({
698
699
  label: r(s("paidOnline")),
699
700
  value: Vt(n, o.paidOnlineAmount, i)
700
701
  }
701
- ] : [], T = u ? P.filter((I) => I && I.id === "bookedAt") : P, M = T.some(Boolean), E = o || a.bookedOnline || p == null ? void 0 : p.filter(
702
+ ] : [], T = u ? P.filter((I) => I && I.id === "bookedAt") : P, H = T.some(Boolean), E = o || a.bookedOnline || p == null ? void 0 : p.filter(
702
703
  (I) => (I.kind === "created" || I.kind === "copied") && I.actor.trim() !== ""
703
- ).sort((I, F) => Date.parse(I.atIso) - Date.parse(F.atIso))[0];
704
- return /* @__PURE__ */ v(
705
- pe,
704
+ ).sort((I, M) => Date.parse(I.atIso) - Date.parse(M.atIso))[0];
705
+ return /* @__PURE__ */ b(
706
+ ue,
706
707
  {
707
708
  "data-card": "appointment",
708
709
  title: r(s("sectionAppointment")),
@@ -715,27 +716,27 @@ function ha({
715
716
  rows: [
716
717
  m && {
717
718
  id: "date",
718
- label: y("date"),
719
+ label: v("date"),
719
720
  icon: /* @__PURE__ */ e(_n, {}),
720
721
  value: it(n, k)
721
722
  },
722
723
  m && {
723
724
  id: "time",
724
725
  label: r(s("time")),
725
- icon: /* @__PURE__ */ e(Hn, {}),
726
- value: a.allDay ? y("allDay") : wn(n, k, b)
726
+ icon: /* @__PURE__ */ e(Fn, {}),
727
+ value: a.allDay ? v("allDay") : wn(n, k, y)
727
728
  },
728
729
  !a.allDay && {
729
730
  id: "duration",
730
- label: y("duration"),
731
- icon: /* @__PURE__ */ e(Mn, {}),
732
- value: `${a.durationMin} ${y("durationUnit")}`
731
+ label: v("duration"),
732
+ icon: /* @__PURE__ */ e(Hn, {}),
733
+ value: `${a.durationMin} ${v("durationUnit")}`
733
734
  },
734
735
  a.isTelehealth && {
735
736
  id: "type",
736
- label: y("type"),
737
+ label: v("type"),
737
738
  icon: /* @__PURE__ */ e(zt, {}),
738
- value: y("typeTelehealth")
739
+ value: v("typeTelehealth")
739
740
  },
740
741
  d && {
741
742
  id: "operator",
@@ -752,15 +753,15 @@ function ha({
752
753
  },
753
754
  a.branchLabel && {
754
755
  id: "branch",
755
- label: y("branch"),
756
- icon: /* @__PURE__ */ e(Fn, {}),
756
+ label: v("branch"),
757
+ icon: /* @__PURE__ */ e(Mn, {}),
757
758
  value: a.branchLabel
758
759
  },
759
760
  E && {
760
761
  id: "createdBy",
761
762
  label: r(s("createdBy")),
762
763
  icon: /* @__PURE__ */ e(Tt, { name: E.actor, size: "xs" }),
763
- value: /* @__PURE__ */ v("span", { className: "ds:inline-flex ds:flex-wrap ds:items-baseline ds:gap-x-[var(--spacing-xs)]", children: [
764
+ value: /* @__PURE__ */ b("span", { className: "ds:inline-flex ds:flex-wrap ds:items-baseline ds:gap-x-[var(--spacing-xs)]", children: [
764
765
  /* @__PURE__ */ e("span", { children: E.actor }),
765
766
  " ",
766
767
  /* @__PURE__ */ e("span", { className: "ds:text-[color:var(--muted-foreground)]", children: /* @__PURE__ */ e(
@@ -784,7 +785,7 @@ function ha({
784
785
  ]
785
786
  }
786
787
  ),
787
- M ? /* @__PURE__ */ v(
788
+ H ? /* @__PURE__ */ b(
788
789
  "div",
789
790
  {
790
791
  "data-block": "booking",
@@ -806,16 +807,16 @@ function fa({
806
807
  privacy: d = !1,
807
808
  carePlanUrl: c
808
809
  }) {
809
- const { t: l } = J("ui"), { care: u } = t, p = d || u == null ? void 0 : u.plan;
810
- return !u || !p && u.lines.length === 0 ? null : /* @__PURE__ */ v(
811
- pe,
810
+ const { t: l } = G("ui"), { care: u } = t, p = d || u == null ? void 0 : u.plan;
811
+ return !u || !p && u.lines.length === 0 ? null : /* @__PURE__ */ b(
812
+ ue,
812
813
  {
813
814
  "data-card": "treatments",
814
815
  title: l(s("sectionTreatments")),
815
816
  headingLevel: 3,
816
817
  children: [
817
- p ? /* @__PURE__ */ v("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-xs)]", children: [
818
- /* @__PURE__ */ v("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] type-title-item", children: [
818
+ p ? /* @__PURE__ */ b("span", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-xs)]", children: [
819
+ /* @__PURE__ */ b("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] type-title-item", children: [
819
820
  /* @__PURE__ */ e(
820
821
  st,
821
822
  {
@@ -829,7 +830,7 @@ function fa({
829
830
  Ke,
830
831
  {
831
832
  href: c,
832
- action: ce.carePlan,
833
+ action: le.carePlan,
833
834
  icon: /* @__PURE__ */ e(st, { "aria-hidden": "true" }),
834
835
  children: l(s("openCarePlan"))
835
836
  }
@@ -856,21 +857,21 @@ function ga({
856
857
  onOpenNotes: n,
857
858
  locale: i
858
859
  }) {
859
- const { t: d } = J("ui"), c = je(), l = t.status ?? "ready", u = R(!1);
860
- ue(() => {
861
- u.current && (l !== "loading" && (u.current = !1), He(c));
860
+ const { t: d } = G("ui"), c = tt(), l = t.status ?? "ready", u = R(!1);
861
+ de(() => {
862
+ u.current && (l !== "loading" && (u.current = !1), _e(c));
862
863
  }, [l, c]);
863
864
  const p = t.total ?? (l === "ready" ? t.notes.length : null), r = Math.max(0, (p ?? 0) - _t), a = r > 0 ? d(s("notesMore"), { n: r }) : d(s("notesPreviewOpen"));
864
- return /* @__PURE__ */ v(
865
- pe,
865
+ return /* @__PURE__ */ b(
866
+ ue,
866
867
  {
867
868
  "data-card": "notes",
868
869
  headingId: c,
869
870
  headingLevel: 3,
870
871
  title: p === null ? d("notesPanel.title") : d(s("notesPreviewTitle"), { count: p }),
871
- headerAction: n && (p ?? 0) > 0 ? /* @__PURE__ */ v("span", { className: "ds:relative ds:inline-flex", children: [
872
+ headerAction: n && (p ?? 0) > 0 ? /* @__PURE__ */ b("span", { className: "ds:relative ds:inline-flex", children: [
872
873
  /* @__PURE__ */ e(
873
- Mt,
874
+ Ht,
874
875
  {
875
876
  icon: /* @__PURE__ */ e(Bn, { "aria-hidden": "true" }),
876
877
  intent: "outline",
@@ -897,9 +898,9 @@ function ga({
897
898
  ) : null
898
899
  ] }) : void 0,
899
900
  children: [
900
- l === "error" ? /* @__PURE__ */ v(X, { variant: "error", children: [
901
- /* @__PURE__ */ e(X.Description, { children: d("notesPanel.loadError") }),
902
- t.onRetry ? /* @__PURE__ */ e(X.Action, { children: /* @__PURE__ */ e(
901
+ l === "error" ? /* @__PURE__ */ b(ce, { variant: "error", children: [
902
+ /* @__PURE__ */ e(ce.Description, { children: d("notesPanel.loadError") }),
903
+ t.onRetry ? /* @__PURE__ */ e(ce.Action, { children: /* @__PURE__ */ e(
903
904
  C,
904
905
  {
905
906
  intent: "secondary",
@@ -912,7 +913,7 @@ function ga({
912
913
  }
913
914
  ) }) : null
914
915
  ] }) : null,
915
- t.notes.length === 0 && l === "loading" ? /* @__PURE__ */ v(ie, { children: [
916
+ t.notes.length === 0 && l === "loading" ? /* @__PURE__ */ b(ne, { children: [
916
917
  /* @__PURE__ */ e("span", { role: "status", className: "ds:sr-only", children: d("notesPanel.loading") }),
917
918
  /* @__PURE__ */ e(at, { notes: [], loading: !0, loadingRows: 2 })
918
919
  ] }) : l !== "error" || t.notes.length > 0 ? (
@@ -963,7 +964,7 @@ const va = lt("ds:flex ds:h-full ds:min-h-0 ds:flex-col"), ya = lt(
963
964
  identification: /* @__PURE__ */ e(ta, { "aria-hidden": "true" }),
964
965
  webcam: /* @__PURE__ */ e(Yn, { "aria-hidden": "true" })
965
966
  }, S = (t) => `calendarWorkspace.details.${t}`;
966
- function Ht({
967
+ function Ft({
967
968
  children: t,
968
969
  startIcon: n,
969
970
  overflowItems: i,
@@ -973,7 +974,7 @@ function Ht({
973
974
  size: u,
974
975
  hideLabel: p
975
976
  }) {
976
- return /* @__PURE__ */ v($e.Root, { children: [
977
+ return /* @__PURE__ */ b($e.Root, { children: [
977
978
  /* @__PURE__ */ e(ln, { label: t, side: "top", children: /* @__PURE__ */ e($e.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
978
979
  C,
979
980
  {
@@ -1001,10 +1002,10 @@ function Ht({
1001
1002
  ] });
1002
1003
  }
1003
1004
  function xa() {
1004
- const { t } = J("ui");
1005
- return /* @__PURE__ */ v(ie, { children: [
1005
+ const { t } = G("ui");
1006
+ return /* @__PURE__ */ b(ne, { children: [
1006
1007
  /* @__PURE__ */ e("span", { role: "status", className: "ds:sr-only", children: t("common.loading") }),
1007
- /* @__PURE__ */ v(
1008
+ /* @__PURE__ */ b(
1008
1009
  "div",
1009
1010
  {
1010
1011
  "aria-hidden": "true",
@@ -1019,15 +1020,15 @@ function xa() {
1019
1020
  density: "compact"
1020
1021
  }
1021
1022
  ),
1022
- /* @__PURE__ */ v(pe, { title: t(S("sectionAppointment")), headingLevel: 3, children: [
1023
- /* @__PURE__ */ e(Ft, { loading: !0, maxLines: 2 }),
1024
- /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: Gt.map((n, i) => /* @__PURE__ */ v(
1023
+ /* @__PURE__ */ b(ue, { title: t(S("sectionAppointment")), headingLevel: 3, children: [
1024
+ /* @__PURE__ */ e(Mt, { loading: !0, maxLines: 2 }),
1025
+ /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: Gt.map((n, i) => /* @__PURE__ */ b(
1025
1026
  "div",
1026
1027
  {
1027
1028
  className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
1028
1029
  children: [
1029
1030
  /* @__PURE__ */ e(
1030
- Se,
1031
+ we,
1031
1032
  {
1032
1033
  variant: "rounded",
1033
1034
  stagger: i + 2,
@@ -1037,7 +1038,7 @@ function xa() {
1037
1038
  }
1038
1039
  ),
1039
1040
  /* @__PURE__ */ e(
1040
- Se,
1041
+ we,
1041
1042
  {
1042
1043
  variant: "text",
1043
1044
  size: "sm",
@@ -1050,20 +1051,20 @@ function xa() {
1050
1051
  n
1051
1052
  )) })
1052
1053
  ] }),
1053
- /* @__PURE__ */ e(pe, { title: t("notesPanel.title"), headingLevel: 3, children: /* @__PURE__ */ e(at, { notes: [], loading: !0, loadingRows: 2 }) }),
1054
- /* @__PURE__ */ e(pe, { title: t(S("sectionTreatments")), headingLevel: 3, children: /* @__PURE__ */ e(Ut, { lines: [], loading: !0 }) })
1054
+ /* @__PURE__ */ e(ue, { title: t("notesPanel.title"), headingLevel: 3, children: /* @__PURE__ */ e(at, { notes: [], loading: !0, loadingRows: 2 }) }),
1055
+ /* @__PURE__ */ e(ue, { title: t(S("sectionTreatments")), headingLevel: 3, children: /* @__PURE__ */ e(Ut, { lines: [], loading: !0 }) })
1055
1056
  ]
1056
1057
  }
1057
1058
  ),
1058
- /* @__PURE__ */ v(
1059
+ /* @__PURE__ */ b(
1059
1060
  "div",
1060
1061
  {
1061
1062
  "aria-hidden": "true",
1062
1063
  className: "ds:flex ds:shrink-0 ds:items-center ds:gap-[var(--spacing-sm)] ds:border-t ds:border-[color:var(--border)] ds:p-[var(--spacing-md)]",
1063
1064
  children: [
1064
- /* @__PURE__ */ e(Se, { variant: "rounded", width: "33%", height: "var(--spacing-xl)" }),
1065
+ /* @__PURE__ */ e(we, { variant: "rounded", width: "33%", height: "var(--spacing-xl)" }),
1065
1066
  /* @__PURE__ */ e(
1066
- Se,
1067
+ we,
1067
1068
  {
1068
1069
  variant: "rounded",
1069
1070
  stagger: 1,
@@ -1084,13 +1085,13 @@ function Na({
1084
1085
  privacy: c
1085
1086
  }) {
1086
1087
  var k;
1087
- const { t: l } = J("ui"), u = t.status ?? (t.entries ? "ready" : "loading"), p = u === "error" ? void 0 : t.entries, r = u === "loading" || u !== "error" && !p, [a, o] = H(!1);
1088
- Ae(() => o(!0), []);
1088
+ const { t: l } = G("ui"), u = t.status ?? (t.entries ? "ready" : "loading"), p = u === "error" ? void 0 : t.entries, r = u === "loading" || u !== "error" && !p, [a, o] = F(!1);
1089
+ Se(() => o(!0), []);
1089
1090
  let f = "";
1090
1091
  r ? f = l("common.loading") : p && (f = p.length === 0 ? l(S("historyEmpty")) : l(S("historyLoaded"), { n: p.length }));
1091
- let y;
1092
- return u === "error" ? y = /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1093
- /* @__PURE__ */ e(X, { variant: "error", children: /* @__PURE__ */ e(X.Description, { children: ((k = t.message) == null ? void 0 : k.trim()) || l("emptyState.error.description") }) }),
1092
+ let v;
1093
+ return u === "error" ? v = /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1094
+ /* @__PURE__ */ e(ce, { variant: "error", children: /* @__PURE__ */ e(ce.Description, { children: ((k = t.message) == null ? void 0 : k.trim()) || l("emptyState.error.description") }) }),
1094
1095
  i ? /* @__PURE__ */ e(
1095
1096
  C,
1096
1097
  {
@@ -1100,18 +1101,18 @@ function Na({
1100
1101
  children: l("emptyState.error.cta")
1101
1102
  }
1102
1103
  ) : null
1103
- ] }) : r || !p ? y = /* @__PURE__ */ e(
1104
+ ] }) : r || !p ? v = /* @__PURE__ */ e(
1104
1105
  "div",
1105
1106
  {
1106
1107
  "aria-hidden": "true",
1107
1108
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
1108
- children: Gt.slice(0, 3).map((b, m) => /* @__PURE__ */ v(
1109
+ children: Gt.slice(0, 3).map((y, m) => /* @__PURE__ */ b(
1109
1110
  "div",
1110
1111
  {
1111
1112
  className: "ds:flex ds:items-start ds:gap-[var(--spacing-sm)]",
1112
1113
  children: [
1113
1114
  /* @__PURE__ */ e(
1114
- Se,
1115
+ we,
1115
1116
  {
1116
1117
  variant: "circular",
1117
1118
  stagger: m,
@@ -1121,20 +1122,20 @@ function Na({
1121
1122
  }
1122
1123
  ),
1123
1124
  /* @__PURE__ */ e(
1124
- Se,
1125
+ we,
1125
1126
  {
1126
1127
  variant: "rounded",
1127
1128
  stagger: m,
1128
- width: b,
1129
+ width: y,
1129
1130
  height: "var(--spacing-2xl)"
1130
1131
  }
1131
1132
  )
1132
1133
  ]
1133
1134
  },
1134
- b
1135
+ y
1135
1136
  ))
1136
1137
  }
1137
- ) : y = /* @__PURE__ */ e(
1138
+ ) : v = /* @__PURE__ */ e(
1138
1139
  hn,
1139
1140
  {
1140
1141
  history: p,
@@ -1142,9 +1143,9 @@ function Na({
1142
1143
  noteUnrecordedEdits: d,
1143
1144
  privacy: c
1144
1145
  }
1145
- ), /* @__PURE__ */ v(ie, { children: [
1146
+ ), /* @__PURE__ */ b(ne, { children: [
1146
1147
  /* @__PURE__ */ e("span", { role: "status", className: "ds:sr-only", children: a ? f : "" }),
1147
- y
1148
+ v
1148
1149
  ] });
1149
1150
  }
1150
1151
  function Ta({
@@ -1158,123 +1159,123 @@ function Ta({
1158
1159
  enter: p,
1159
1160
  live: r,
1160
1161
  statusControl: a,
1161
- patientId: o = ((Me) => (Me = t.patient) == null ? void 0 : Me.id)(),
1162
+ patientId: o = ((Fe) => (Fe = t.patient) == null ? void 0 : Fe.id)(),
1162
1163
  operator: f,
1163
- chair: y,
1164
+ chair: v,
1164
1165
  privacy: k = !1,
1165
- privacyTitle: b,
1166
+ privacyTitle: y,
1166
1167
  mapsLink: m,
1167
1168
  notesPreview: N,
1168
1169
  onOpenNotes: L,
1169
1170
  history: P,
1170
1171
  onOpenHistory: T,
1171
- noteUnrecordedEdits: M = !1,
1172
+ noteUnrecordedEdits: H = !1,
1172
1173
  readOnly: E = !1,
1173
1174
  onStatusChange: I,
1174
- allowedStatuses: F = St,
1175
- onDescriptionChange: z,
1176
- descriptionMaxLength: Q,
1177
- onAssignPatient: se,
1178
- onEdit: K,
1179
- onMove: j,
1175
+ allowedStatuses: M = St,
1176
+ onDescriptionChange: q,
1177
+ descriptionMaxLength: X,
1178
+ onAssignPatient: ae,
1179
+ onEdit: z,
1180
+ onMove: K,
1180
1181
  onCopy: W,
1181
- onDelete: Y,
1182
- onJoinTelehealth: Z,
1183
- onWhatsApp: ee,
1182
+ onDelete: j,
1183
+ onJoinTelehealth: J,
1184
+ onWhatsApp: Q,
1184
1185
  whatsappUrl: x,
1185
- onBuyWhatsApp: V,
1186
- createTaskUrl: te,
1187
- onRequestSignature: Ne,
1188
- onSignOnDevice: Te,
1189
- onOpenPatient: me,
1190
- shortcuts: he,
1191
- documents: oe
1186
+ onBuyWhatsApp: Y,
1187
+ createTaskUrl: Z,
1188
+ onRequestSignature: xe,
1189
+ onSignOnDevice: Ne,
1190
+ onOpenPatient: pe,
1191
+ shortcuts: me,
1192
+ documents: ie
1192
1193
  }) {
1193
1194
  var vt, yt;
1194
- const { t: h } = J("ui"), { eventId: D } = t, [Ye] = H(p), fe = { details: t, locale: c, currency: i }, w = P ? P.eventId !== void 0 && P.eventId !== D ? { status: "loading" } : P : t.history ? { entries: t.history } : void 0, Fe = (N == null ? void 0 : N.patientId) === void 0 || N.patientId === o, ge = N ? Fe ? N : o ? { notes: [], status: "loading", total: null } : void 0 : void 0, re = !!z && !E && !k, [Ee, ne] = H(!1), [Ce, G] = H(!1), le = Ee && w !== void 0, We = Ce && re, Ie = () => {
1195
- le || !w || (ne(!0), T == null || T(D));
1196
- }, Be = R({ history: !1, editor: !1 });
1197
- ue(() => {
1198
- const g = Be.current;
1199
- Be.current = { history: le, editor: We };
1200
- const we = g.history && w === void 0, bt = g.editor && !re;
1201
- we && ne(!1), bt && G(!1), (we || bt) && He(u);
1195
+ const { t: h } = G("ui"), { eventId: D } = t, [je] = F(p), he = { details: t, locale: c, currency: i }, w = P ? P.eventId !== void 0 && P.eventId !== D ? { status: "loading" } : P : t.history ? { entries: t.history } : void 0, He = (N == null ? void 0 : N.patientId) === void 0 || N.patientId === o, fe = N ? He ? N : o ? { notes: [], status: "loading", total: null } : void 0 : void 0, se = !!q && !E && !k, [Te, ee] = F(!1), [Ee, V] = F(!1), oe = Te && w !== void 0, Me = Ee && se, Ce = () => {
1196
+ oe || !w || (ee(!0), T == null || T(D));
1197
+ }, We = R({ history: !1, editor: !1 });
1198
+ de(() => {
1199
+ const g = We.current;
1200
+ We.current = { history: oe, editor: Me };
1201
+ const ke = g.history && w === void 0, bt = g.editor && !se;
1202
+ ke && ee(!1), bt && V(!1), (ke || bt) && _e(u);
1202
1203
  });
1203
- const ve = R(null), O = R(!1), De = (w == null ? void 0 : w.status) ?? (w != null && w.entries ? "ready" : "loading");
1204
- ue(() => {
1205
- O.current && (De !== "loading" && (O.current = !1), ot(ve.current));
1206
- }, [De]);
1207
- const [$, Re] = H(t.appointment.name ?? "");
1208
- Ae(() => {
1209
- Re(t.appointment.name ?? "");
1204
+ const ge = R(null), O = R(!1), Ie = (w == null ? void 0 : w.status) ?? (w != null && w.entries ? "ready" : "loading");
1205
+ de(() => {
1206
+ O.current && (Ie !== "loading" && (O.current = !1), ot(ge.current));
1207
+ }, [Ie]);
1208
+ const [$, De] = F(t.appointment.name ?? "");
1209
+ Se(() => {
1210
+ De(t.appointment.name ?? "");
1210
1211
  }, [t.appointment.name]);
1211
- const [ye, de] = H(""), [be, Pe] = H(!1), [A, B] = H(), ke = R(null), Le = je(), q = Q !== void 0 && ye.trim().length > Q;
1212
- Ae(() => {
1213
- Ce && (de($), B(void 0));
1214
- }, [Ce]);
1215
- const Xt = async () => {
1216
- if (!z) return;
1217
- const g = ye.trim();
1218
- Pe(!0), B(void 0);
1212
+ const [ve, re] = F(""), [ye, Re] = F(!1), [A, B] = F(), be = R(null), Pe = X !== void 0 && ve.trim().length > X;
1213
+ Se(() => {
1214
+ Ee && (re($), B(void 0));
1215
+ }, [Ee]);
1216
+ const Be = async () => {
1217
+ if (!q) return;
1218
+ const g = ve.trim();
1219
+ Re(!0), B(void 0);
1219
1220
  try {
1220
- await z(g, D), Re(g), G(!1);
1221
- } catch (we) {
1221
+ await q(g, D), De(g), V(!1);
1222
+ } catch (ke) {
1222
1223
  B(
1223
- nt(we, h(S("descriptionSaveFailed")))
1224
+ nt(ke, h(S("descriptionSaveFailed")))
1224
1225
  );
1225
1226
  } finally {
1226
- Pe(!1);
1227
+ Re(!1);
1227
1228
  }
1228
- }, [ae, Ve] = H(t.appointment.status);
1229
- Ae(() => {
1230
- Ve(t.appointment.status);
1229
+ }, [te, Ye] = F(t.appointment.status);
1230
+ Se(() => {
1231
+ Ye(t.appointment.status);
1231
1232
  }, [t.appointment.status]);
1232
1233
  const dt = R(n);
1233
- ue(() => {
1234
+ de(() => {
1234
1235
  const g = dt.current && !n;
1235
- dt.current = n, g && (Ve(t.appointment.status), Re(t.appointment.name ?? ""));
1236
+ dt.current = n, g && (Ye(t.appointment.status), De(t.appointment.name ?? ""));
1236
1237
  }, [n]);
1237
1238
  const Ue = St.filter(
1238
- (g) => F.includes(g)
1239
- ), Oe = un(ae, {
1239
+ (g) => M.includes(g)
1240
+ ), Le = un(te, {
1240
1241
  statuses: Ue,
1241
1242
  /* Shown so the control can say it, but not a choice. */
1242
- disabledStatuses: ae && !Ue.includes(ae) ? [ae] : []
1243
- }), _e = !!I && !E && Ue.some((g) => g !== ae), Jt = async (g) => {
1243
+ disabledStatuses: te && !Ue.includes(te) ? [te] : []
1244
+ }), Oe = !!I && !E && Ue.some((g) => g !== te), Xt = async (g) => {
1244
1245
  if (!(!I || !pn(g))) {
1245
1246
  try {
1246
1247
  await I(g, D);
1247
- } catch (we) {
1248
- throw new Error(nt(we, h(S("statusSaveFailed"))));
1248
+ } catch (ke) {
1249
+ throw new Error(nt(ke, h(S("statusSaveFailed"))));
1249
1250
  }
1250
- Ve(g);
1251
+ Ye(g);
1251
1252
  }
1252
1253
  }, ct = k ? void 0 : x, ut = Sa.filter(
1253
- (g) => oe == null ? void 0 : oe.kinds.includes(g)
1254
- ), Qt = (((vt = t.care) == null ? void 0 : vt.lines.length) ?? 0) > 0, Ge = o !== void 0 && o !== "", Xe = h(S("status")), pt = `${Xe}: ${Oe.option.label}`, Je = R(null), mt = R(_e);
1255
- ue(() => {
1256
- const g = mt.current && !_e;
1257
- mt.current = _e, g && (Je.current ? ot(Je.current) : He(u));
1254
+ (g) => ie == null ? void 0 : ie.kinds.includes(g)
1255
+ ), Jt = (((vt = t.care) == null ? void 0 : vt.lines.length) ?? 0) > 0, Ve = o !== void 0 && o !== "", Ge = h(S("status")), pt = `${Ge}: ${Le.option.label}`, Xe = R(null), mt = R(Oe);
1256
+ de(() => {
1257
+ const g = mt.current && !Oe;
1258
+ mt.current = Oe, g && (Xe.current ? ot(Xe.current) : _e(u));
1258
1259
  });
1259
- const ht = _e ? /* @__PURE__ */ e(
1260
+ const ht = Oe ? /* @__PURE__ */ e(
1260
1261
  dn,
1261
1262
  {
1262
1263
  ref: a,
1263
- value: Oe.value,
1264
- options: Oe.options,
1264
+ value: Le.value,
1265
+ options: Le.options,
1265
1266
  size: "sm",
1266
- workflowLabel: Xe,
1267
+ workflowLabel: Ge,
1267
1268
  className: `ds:[&>button]:bg-[color:var(--background)] ${ka}`,
1268
1269
  "aria-label": pt,
1269
- onValueChange: Jt
1270
+ onValueChange: Xt
1270
1271
  }
1271
- ) : ae ? (
1272
+ ) : te ? (
1272
1273
  /* Named as the control is, "Status: Confirmed": the small display
1273
1274
  prints the value alone. */
1274
1275
  /* @__PURE__ */ e(
1275
1276
  "div",
1276
1277
  {
1277
- ref: Je,
1278
+ ref: Xe,
1278
1279
  role: "group",
1279
1280
  "aria-label": pt,
1280
1281
  tabIndex: -1,
@@ -1283,16 +1284,16 @@ function Ta({
1283
1284
  children: /* @__PURE__ */ e(
1284
1285
  cn,
1285
1286
  {
1286
- value: Oe.value,
1287
+ value: Le.value,
1287
1288
  size: "sm",
1288
- workflowLabel: Xe,
1289
- option: Oe.option
1289
+ workflowLabel: Ge,
1290
+ option: Le.option
1290
1291
  }
1291
1292
  )
1292
1293
  }
1293
1294
  )
1294
1295
  ) : null, _ = [];
1295
- !E && se && !Ge && _.push([
1296
+ !E && ae && !Ve && _.push([
1296
1297
  "assign-patient",
1297
1298
  /* @__PURE__ */ e(
1298
1299
  C,
@@ -1301,12 +1302,12 @@ function Ta({
1301
1302
  "data-action": "assign-patient",
1302
1303
  className: U,
1303
1304
  startIcon: /* @__PURE__ */ e(Un, { "aria-hidden": "true" }),
1304
- onClick: () => se(D),
1305
+ onClick: () => ae(D),
1305
1306
  children: h("calendarWorkspace.inc1.bookings.assignPatient")
1306
1307
  },
1307
1308
  "assign"
1308
1309
  )
1309
- ]), Z && _.push([
1310
+ ]), J && _.push([
1310
1311
  "join-telehealth",
1311
1312
  /* @__PURE__ */ e(
1312
1313
  C,
@@ -1315,12 +1316,12 @@ function Ta({
1315
1316
  "data-action": "join-telehealth",
1316
1317
  className: U,
1317
1318
  startIcon: /* @__PURE__ */ e(zt, { "aria-hidden": "true" }),
1318
- onClick: () => Z(D),
1319
+ onClick: () => J(D),
1319
1320
  children: h(S("joinTelehealth"))
1320
1321
  },
1321
1322
  "join"
1322
1323
  )
1323
- ]), !E && K && _.push([
1324
+ ]), !E && z && _.push([
1324
1325
  "edit-appointment",
1325
1326
  /* @__PURE__ */ e(
1326
1327
  C,
@@ -1328,12 +1329,12 @@ function Ta({
1328
1329
  "data-action": "edit-appointment",
1329
1330
  className: U,
1330
1331
  startIcon: /* @__PURE__ */ e(Dt, { "aria-hidden": "true" }),
1331
- onClick: () => K(D),
1332
+ onClick: () => z(D),
1332
1333
  children: h("calendarWorkspace.editor.editTitle")
1333
1334
  },
1334
1335
  "edit"
1335
1336
  )
1336
- ]), !E && j && _.push([
1337
+ ]), !E && K && _.push([
1337
1338
  "move-appointment",
1338
1339
  /* @__PURE__ */ e(
1339
1340
  C,
@@ -1341,15 +1342,15 @@ function Ta({
1341
1342
  "data-action": "move-appointment",
1342
1343
  className: U,
1343
1344
  startIcon: /* @__PURE__ */ e(mn, { "aria-hidden": "true" }),
1344
- onClick: () => j(D),
1345
+ onClick: () => K(D),
1345
1346
  children: h(S("move"))
1346
1347
  },
1347
1348
  "move"
1348
1349
  )
1349
1350
  ]), !E && W && _.push([
1350
1351
  "copy-appointment",
1351
- Qt ? /* @__PURE__ */ e(
1352
- Ht,
1352
+ Jt ? /* @__PURE__ */ e(
1353
+ Ft,
1353
1354
  {
1354
1355
  "data-action": "copy-appointment",
1355
1356
  "data-overflow-tip": !1,
@@ -1382,10 +1383,10 @@ function Ta({
1382
1383
  },
1383
1384
  "copy"
1384
1385
  )
1385
- ]), oe && ut.length > 0 && _.push([
1386
+ ]), ie && ut.length > 0 && _.push([
1386
1387
  "open-create-document",
1387
1388
  /* @__PURE__ */ e(
1388
- Ht,
1389
+ Ft,
1389
1390
  {
1390
1391
  "data-action": "open-create-document",
1391
1392
  "data-overflow-tip": !1,
@@ -1394,21 +1395,21 @@ function Ta({
1394
1395
  label: h(S(`documents.${g}`)),
1395
1396
  icon: Aa[g],
1396
1397
  action: `create-document-${g}`,
1397
- onSelect: () => oe.onCreate(g, D)
1398
+ onSelect: () => ie.onCreate(g, D)
1398
1399
  })),
1399
1400
  children: h(S("documents.label"))
1400
1401
  },
1401
1402
  "documents"
1402
1403
  )
1403
- ]), ee ? _.push([
1404
+ ]), Q ? _.push([
1404
1405
  "open-whatsapp",
1405
1406
  /* @__PURE__ */ e(
1406
1407
  C,
1407
1408
  {
1408
1409
  "data-action": "open-whatsapp",
1409
1410
  className: U,
1410
- startIcon: /* @__PURE__ */ e(tt, { "aria-hidden": "true" }),
1411
- onClick: () => ee(D),
1411
+ startIcon: /* @__PURE__ */ e(et, { "aria-hidden": "true" }),
1412
+ onClick: () => Q(D),
1412
1413
  children: h(S("remindWhatsApp"))
1413
1414
  },
1414
1415
  "whatsapp"
@@ -1421,7 +1422,7 @@ function Ta({
1421
1422
  asChild: !0,
1422
1423
  "data-action": "open-whatsapp",
1423
1424
  className: U,
1424
- startIcon: /* @__PURE__ */ e(tt, { "aria-hidden": "true" }),
1425
+ startIcon: /* @__PURE__ */ e(et, { "aria-hidden": "true" }),
1425
1426
  children: /* @__PURE__ */ e(
1426
1427
  "a",
1427
1428
  {
@@ -1434,21 +1435,21 @@ function Ta({
1434
1435
  },
1435
1436
  "whatsapp"
1436
1437
  )
1437
- ]) : V && !x && _.push([
1438
+ ]) : Y && !x && _.push([
1438
1439
  "buy-whatsapp",
1439
1440
  /* @__PURE__ */ e(
1440
1441
  C,
1441
1442
  {
1442
1443
  "data-action": "buy-whatsapp",
1443
1444
  className: U,
1444
- startIcon: /* @__PURE__ */ e(tt, { "aria-hidden": "true" }),
1445
- onClick: () => V(D),
1445
+ startIcon: /* @__PURE__ */ e(et, { "aria-hidden": "true" }),
1446
+ onClick: () => Y(D),
1446
1447
  children: h(S("buyWhatsApp"))
1447
1448
  },
1448
1449
  "buy-whatsapp"
1449
1450
  )
1450
1451
  ]);
1451
- const ft = ze(te);
1452
+ const ft = ze(Z);
1452
1453
  ft && _.push([
1453
1454
  "create-task",
1454
1455
  /* @__PURE__ */ e(
@@ -1462,7 +1463,7 @@ function Ta({
1462
1463
  },
1463
1464
  "task"
1464
1465
  )
1465
- ]), !E && Y && _.push([
1466
+ ]), !E && j && _.push([
1466
1467
  "delete-appointment",
1467
1468
  /* @__PURE__ */ e(
1468
1469
  C,
@@ -1471,28 +1472,28 @@ function Ta({
1471
1472
  "data-action": "delete-appointment",
1472
1473
  className: U,
1473
1474
  startIcon: /* @__PURE__ */ e(Kn, { "aria-hidden": "true" }),
1474
- onClick: () => Y(D),
1475
+ onClick: () => j(D),
1475
1476
  children: h("calendarWorkspace.editor.delete")
1476
1477
  },
1477
1478
  "delete"
1478
1479
  )
1479
1480
  ]);
1480
- const Qe = _.map(([, g]) => g);
1481
+ const Je = _.map(([, g]) => g);
1481
1482
  r.current = {
1482
- status: ae ?? null,
1483
- allowed: _e ? Ue : [],
1483
+ status: te ?? null,
1484
+ allowed: Oe ? Ue : [],
1484
1485
  offered: _.map(([g]) => g),
1485
1486
  historyAvailable: w !== void 0,
1486
- historyOpen: le,
1487
- openHistory: Ie,
1488
- closeHistory: () => ne(!1)
1487
+ historyOpen: oe,
1488
+ openHistory: Ce,
1489
+ closeHistory: () => ee(!1)
1489
1490
  };
1490
1491
  const gt = h(S("historyBack"));
1491
1492
  return /* @__PURE__ */ e(
1492
1493
  "div",
1493
1494
  {
1494
- className: `ds:flex ds:min-h-0 ds:flex-1 ds:flex-col ${Ye ? on : ""}`,
1495
- children: /* @__PURE__ */ v(et.Host, { children: [
1495
+ className: `ds:flex ds:min-h-0 ds:flex-1 ds:flex-col ${je ? sn : ""}`,
1496
+ children: /* @__PURE__ */ b(Ze.Host, { children: [
1496
1497
  /* @__PURE__ */ e(
1497
1498
  Wt,
1498
1499
  {
@@ -1502,7 +1503,7 @@ function Ta({
1502
1503
  sticky: !0,
1503
1504
  divider: !0,
1504
1505
  actions: w ? /* @__PURE__ */ e(
1505
- Mt,
1506
+ Ht,
1506
1507
  {
1507
1508
  size: "sm",
1508
1509
  intent: "ghost",
@@ -1510,7 +1511,7 @@ function Ta({
1510
1511
  "aria-label": h(S("historyAction")),
1511
1512
  tooltip: h(S("historyAction")),
1512
1513
  "data-action": "open-history",
1513
- onClick: Ie
1514
+ onClick: Ce
1514
1515
  }
1515
1516
  ) : void 0
1516
1517
  }
@@ -1521,17 +1522,17 @@ function Ta({
1521
1522
  tabIndex: 0,
1522
1523
  "aria-busy": n || void 0,
1523
1524
  className: "ds:[min-block-size:0] ds:flex-1 ds:overflow-y-auto",
1524
- children: /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]", children: [
1525
- k ? /* @__PURE__ */ e(an, { mask: b }) : t.patient ? /* @__PURE__ */ e(
1525
+ children: /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]", children: [
1526
+ k ? /* @__PURE__ */ e(nn, { mask: y }) : t.patient ? /* @__PURE__ */ e(
1526
1527
  ma,
1527
1528
  {
1528
- ...fe,
1529
+ ...he,
1529
1530
  now: d,
1530
1531
  mapsLink: m,
1531
- shortcuts: he,
1532
- onRequestSignature: Ne,
1533
- onSignOnDevice: Te,
1534
- onOpenPatient: me
1532
+ shortcuts: me,
1533
+ onRequestSignature: xe,
1534
+ onSignOnDevice: Ne,
1535
+ onOpenPatient: pe
1535
1536
  }
1536
1537
  ) : (
1537
1538
  /* No patient card to carry the identity: a patient-less, an
@@ -1540,13 +1541,13 @@ function Ta({
1540
1541
  Sn,
1541
1542
  {
1542
1543
  name: t.appointment.title.trim() ? t.appointment.title : h(S("patientNotLoaded")),
1543
- unresolved: Ge,
1544
- status: ae,
1544
+ unresolved: Ve,
1545
+ status: te,
1545
1546
  flags: {
1546
1547
  isTelehealth: t.appointment.isTelehealth,
1547
1548
  isBookedOnline: t.appointment.bookedOnline,
1548
1549
  isRecurring: t.appointment.recurrence !== void 0,
1549
- hasUnassignedPatient: t.appointment.bookedOnline && !Ge,
1550
+ hasUnassignedPatient: t.appointment.bookedOnline && !Ve,
1550
1551
  hasHighlightedAnamnesis: !1,
1551
1552
  hasBillableAmount: (((yt = t.money) == null ? void 0 : yt.billableAmount) ?? 0) > 0
1552
1553
  },
@@ -1557,9 +1558,9 @@ function Ta({
1557
1558
  /* @__PURE__ */ e(
1558
1559
  ha,
1559
1560
  {
1560
- ...fe,
1561
+ ...he,
1561
1562
  operator: f,
1562
- chair: y,
1563
+ chair: v,
1563
1564
  privacy: k,
1564
1565
  history: (w == null ? void 0 : w.status) === "error" || w == null ? void 0 : w.entries,
1565
1566
  description: (
@@ -1567,56 +1568,56 @@ function Ta({
1567
1568
  so the sub-view can hand focus back to it. An empty
1568
1569
  read-only description prints nothing. Privacy hides the
1569
1570
  text and the pencil. */
1570
- k ? $ ? /* @__PURE__ */ e(wt, { block: "description" }) : void 0 : $ || z && !E ? /* @__PURE__ */ e(
1571
- Ft,
1571
+ k ? $ ? /* @__PURE__ */ e(wt, { block: "description" }) : void 0 : $ || q && !E ? /* @__PURE__ */ e(
1572
+ Mt,
1572
1573
  {
1573
1574
  "data-block": "description",
1574
1575
  role: "group",
1575
1576
  "aria-label": h("calendarWorkspace.editor.description"),
1576
1577
  value: $,
1577
1578
  editLabel: h(S("editDescription")),
1578
- onEdit: z && !E ? () => G(!0) : void 0
1579
+ onEdit: q && !E ? () => V(!0) : void 0
1579
1580
  }
1580
1581
  ) : void 0
1581
1582
  )
1582
1583
  }
1583
1584
  ),
1584
- ge && k ? /* @__PURE__ */ e(
1585
- pe,
1585
+ fe && k ? /* @__PURE__ */ e(
1586
+ ue,
1586
1587
  {
1587
1588
  "data-card": "notes",
1588
1589
  title: h("notesPanel.title"),
1589
1590
  headingLevel: 3,
1590
1591
  children: /* @__PURE__ */ e(wt, {})
1591
1592
  }
1592
- ) : ge ? /* @__PURE__ */ e(
1593
+ ) : fe ? /* @__PURE__ */ e(
1593
1594
  ga,
1594
1595
  {
1595
- preview: ge,
1596
- onOpenNotes: Fe ? L : void 0,
1596
+ preview: fe,
1597
+ onOpenNotes: He ? L : void 0,
1597
1598
  locale: c
1598
1599
  }
1599
1600
  ) : null,
1600
1601
  /* @__PURE__ */ e(
1601
1602
  fa,
1602
1603
  {
1603
- ...fe,
1604
+ ...he,
1604
1605
  privacy: k,
1605
- carePlanUrl: he == null ? void 0 : he.carePlanUrl
1606
+ carePlanUrl: me == null ? void 0 : me.carePlanUrl
1606
1607
  }
1607
1608
  )
1608
1609
  ] })
1609
1610
  }
1610
1611
  ),
1611
- ht || Qe.length > 0 ? (
1612
+ ht || Je.length > 0 ? (
1612
1613
  /* The body scrolls; the status and the actions stay put. The
1613
1614
  status keeps its own segment and never folds. The actions fold
1614
1615
  to icons, then into More, never onto a second line. Only a
1615
1616
  refused status change adds a line, for its message. */
1616
- /* @__PURE__ */ v("div", { className: ya(), children: [
1617
+ /* @__PURE__ */ b("div", { className: ya(), children: [
1617
1618
  ht,
1618
- Qe.length > 0 ? /* @__PURE__ */ e(
1619
- sn,
1619
+ Je.length > 0 ? /* @__PURE__ */ e(
1620
+ an,
1620
1621
  {
1621
1622
  label: h(S("actionsLabel")),
1622
1623
  overflow: "menu",
@@ -1624,28 +1625,28 @@ function Ta({
1624
1625
  background: "surface",
1625
1626
  size: "sm",
1626
1627
  className: `ds:min-w-0 ds:flex-1 ds:text-end ${wa}`,
1627
- children: Qe
1628
+ children: Je
1628
1629
  }
1629
1630
  ) : null
1630
1631
  ] })
1631
1632
  ) : null,
1632
1633
  w ? /* @__PURE__ */ e(
1633
- et,
1634
+ Ze,
1634
1635
  {
1635
- ref: ve,
1636
- open: le,
1636
+ ref: ge,
1637
+ open: oe,
1637
1638
  icon: /* @__PURE__ */ e(Rt, { "aria-hidden": "true" }),
1638
1639
  title: h(S("historyTitle")),
1639
1640
  backLabel: gt,
1640
1641
  headingLevel: 3,
1641
- onBack: () => ne(!1),
1642
+ onBack: () => ee(!1),
1642
1643
  "data-details-subview": "history",
1643
1644
  children: /* @__PURE__ */ e("div", { className: "ds:-m-[var(--panel-subview-inset)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ e(
1644
1645
  Na,
1645
1646
  {
1646
1647
  history: w,
1647
1648
  locale: c,
1648
- noteUnrecordedEdits: M,
1649
+ noteUnrecordedEdits: H,
1649
1650
  privacy: k,
1650
1651
  onRetry: w.onRetry ? () => {
1651
1652
  var g;
@@ -1655,26 +1656,26 @@ function Ta({
1655
1656
  ) })
1656
1657
  }
1657
1658
  ) : null,
1658
- re ? /* @__PURE__ */ e(
1659
- et,
1659
+ se ? /* @__PURE__ */ e(
1660
+ Ze,
1660
1661
  {
1661
- open: We,
1662
+ open: Me,
1662
1663
  icon: /* @__PURE__ */ e(Dt, { "aria-hidden": "true" }),
1663
1664
  title: h(S("editDescription")),
1664
1665
  backLabel: gt,
1665
1666
  headingLevel: 3,
1666
- initialFocusRef: ke,
1667
+ initialFocusRef: be,
1667
1668
  onBack: () => {
1668
- be || G(!1);
1669
+ ye || V(!1);
1669
1670
  },
1670
1671
  "data-details-subview": "description",
1671
- footer: /* @__PURE__ */ v(ie, { children: [
1672
+ footer: /* @__PURE__ */ b(ne, { children: [
1672
1673
  /* @__PURE__ */ e(
1673
1674
  C,
1674
1675
  {
1675
1676
  intent: "secondary",
1676
- disabled: be,
1677
- onClick: () => G(!1),
1677
+ disabled: ye,
1678
+ onClick: () => V(!1),
1678
1679
  children: h(S("noteCancel"))
1679
1680
  }
1680
1681
  ),
@@ -1683,45 +1684,39 @@ function Ta({
1683
1684
  {
1684
1685
  intent: "primary",
1685
1686
  "data-action": "save-description",
1686
- loading: be,
1687
- disabled: q,
1688
- onClick: () => void Xt(),
1687
+ loading: ye,
1688
+ disabled: Pe,
1689
+ onClick: () => void Be(),
1689
1690
  children: h(S("descriptionSave"))
1690
1691
  }
1691
1692
  )
1692
1693
  ] }),
1693
- children: /* @__PURE__ */ v("div", { className: "ds:-m-[var(--panel-subview-inset)] ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]", children: [
1694
- A || q ? /* @__PURE__ */ e(X, { variant: "error", children: /* @__PURE__ */ e(
1695
- X.Description,
1696
- {
1697
- id: q ? Le : void 0,
1698
- children: q ? h("calendarWorkspace.editor.descriptionTooLong", {
1699
- max: Q
1700
- }) : A
1701
- }
1702
- ) }) : null,
1703
- /* @__PURE__ */ e(
1704
- rn,
1705
- {
1706
- ref: ke,
1707
- value: ye,
1708
- tone: q ? "error" : "default",
1709
- minRows: 6,
1710
- autoResize: !0,
1711
- "aria-label": h("calendarWorkspace.editor.description"),
1712
- "aria-invalid": q || void 0,
1713
- "aria-describedby": q ? Le : void 0,
1714
- onChange: (g) => de(g.target.value)
1715
- }
1716
- )
1717
- ] })
1694
+ children: /* @__PURE__ */ e("div", { className: "ds:-m-[var(--panel-subview-inset)] ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ e(
1695
+ on,
1696
+ {
1697
+ label: h("calendarWorkspace.editor.description"),
1698
+ error: Pe ? h("calendarWorkspace.editor.descriptionTooLong", {
1699
+ max: X
1700
+ }) : A,
1701
+ children: /* @__PURE__ */ e(
1702
+ rn,
1703
+ {
1704
+ ref: be,
1705
+ value: ve,
1706
+ minRows: 6,
1707
+ autoResize: !0,
1708
+ onChange: (g) => re(g.target.value)
1709
+ }
1710
+ )
1711
+ }
1712
+ ) })
1718
1713
  }
1719
1714
  ) : null
1720
1715
  ] })
1721
1716
  }
1722
1717
  );
1723
1718
  }
1724
- const Ea = Zt(function({
1719
+ const Ea = Qt(function({
1725
1720
  state: n,
1726
1721
  onRetry: i,
1727
1722
  patientId: d,
@@ -1733,54 +1728,54 @@ const Ea = Zt(function({
1733
1728
  title: a,
1734
1729
  privacy: o = !1,
1735
1730
  privacyTitle: f,
1736
- mapsLink: y,
1731
+ mapsLink: v,
1737
1732
  notesPreview: k,
1738
- onOpenNotes: b,
1733
+ onOpenNotes: y,
1739
1734
  history: m,
1740
1735
  onOpenHistory: N,
1741
1736
  noteUnrecordedEdits: L,
1742
1737
  readOnly: P = !1,
1743
1738
  onStatusChange: T,
1744
- allowedStatuses: M,
1739
+ allowedStatuses: H,
1745
1740
  onDescriptionChange: E,
1746
1741
  descriptionMaxLength: I,
1747
- onAssignPatient: F,
1748
- onEdit: z,
1749
- onMove: Q,
1750
- onCopy: se,
1751
- onDelete: K,
1752
- onJoinTelehealth: j,
1742
+ onAssignPatient: M,
1743
+ onEdit: q,
1744
+ onMove: X,
1745
+ onCopy: ae,
1746
+ onDelete: z,
1747
+ onJoinTelehealth: K,
1753
1748
  onWhatsApp: W,
1754
- whatsappUrl: Y,
1755
- onBuyWhatsApp: Z,
1756
- createTaskUrl: ee,
1749
+ whatsappUrl: j,
1750
+ onBuyWhatsApp: J,
1751
+ createTaskUrl: Q,
1757
1752
  onRequestSignature: x,
1758
- onSignOnDevice: V,
1759
- onOpenPatient: te,
1760
- shortcuts: Ne,
1761
- documents: Te,
1762
- id: me,
1763
- className: he,
1764
- ...oe
1765
- }, Me) {
1766
- var be, Pe;
1767
- const { t: h, i18n: D } = J("ui"), Ye = je(), fe = me ?? Ye, w = je(), Fe = r ?? D.language, ge = !o && (a != null && a.trim()) ? a : h(S("region")), re = n.status === "ready" ? n.read : void 0, Ee = n.status === "ready" ? n.read.eventId : n.eventId, ne = R(
1753
+ onSignOnDevice: Y,
1754
+ onOpenPatient: Z,
1755
+ shortcuts: xe,
1756
+ documents: Ne,
1757
+ id: pe,
1758
+ className: me,
1759
+ ...ie
1760
+ }, Fe) {
1761
+ var ye, Re;
1762
+ const { t: h, i18n: D } = G("ui"), je = tt(), he = pe ?? je, w = tt(), He = r ?? D.language, fe = !o && (a != null && a.trim()) ? a : h(S("region")), se = n.status === "ready" ? n.read : void 0, Te = n.status === "ready" ? n.read.eventId : n.eventId, ee = R(
1768
1763
  void 0
1769
- ), Ce = ne.current !== void 0 && ne.current !== "ready";
1770
- Ae(() => {
1771
- ne.current = n.status;
1764
+ ), Ee = ee.current !== void 0 && ee.current !== "ready";
1765
+ Se(() => {
1766
+ ee.current = n.status;
1772
1767
  }, [n.status]);
1773
- const G = !!i && (n.status === "error" || n.status === "refused" && n.retryable === !0), le = R(null), We = kt(() => nn(Me, le), [Me]), Ie = R(!1);
1774
- typeof document < "u" && (Ie.current = ((be = le.current) == null ? void 0 : be.contains(document.activeElement)) ?? !1);
1775
- const Be = re ? `ready:${re.eventId}` : n.status, ve = R(!1);
1776
- ue(() => {
1777
- ve.current ? (n.status !== "loading" && (ve.current = !1), He(w)) : Ie.current && He(w);
1778
- }, [Be, w]);
1768
+ const V = !!i && (n.status === "error" || n.status === "refused" && n.retryable === !0), oe = R(null), Me = kt(() => tn(Fe, oe), [Fe]), Ce = R(!1);
1769
+ typeof document < "u" && (Ce.current = ((ye = oe.current) == null ? void 0 : ye.contains(document.activeElement)) ?? !1);
1770
+ const We = se ? `ready:${se.eventId}` : n.status, ge = R(!1);
1771
+ de(() => {
1772
+ ge.current ? (n.status !== "loading" && (ge.current = !1), _e(w)) : Ce.current && _e(w);
1773
+ }, [We, w]);
1779
1774
  const O = R(null);
1780
- re || (O.current = null);
1781
- const De = R(null), $ = R({ state: n, eventId: Ee, privacy: o, retryOffered: G, onRetry: i });
1782
- $.current = { state: n, eventId: Ee, privacy: o, retryOffered: G, onRetry: i };
1783
- const Re = kt(
1775
+ se || (O.current = null);
1776
+ const Ie = R(null), $ = R({ state: n, eventId: Te, privacy: o, retryOffered: V, onRetry: i });
1777
+ $.current = { state: n, eventId: Te, privacy: o, retryOffered: V, onRetry: i };
1778
+ const De = kt(
1784
1779
  () => ({
1785
1780
  getEventId: () => $.current.eventId ?? null,
1786
1781
  getLoadStatus: () => $.current.state.status,
@@ -1812,22 +1807,22 @@ const Ea = Zt(function({
1812
1807
  (A = O.current) == null || A.closeHistory();
1813
1808
  },
1814
1809
  setAppointmentStatus: (A) => {
1815
- const B = O.current, ke = De.current;
1816
- if (!B || !ke || B.allowed.length === 0)
1817
- return Ze(
1810
+ const B = O.current, be = Ie.current;
1811
+ if (!B || !be || B.allowed.length === 0)
1812
+ return Qe(
1818
1813
  new Error("AppointmentDetailsPanel: the status is read-only.")
1819
1814
  );
1820
1815
  if (A === B.status) return Promise.resolve();
1821
1816
  if (!B.allowed.includes(A))
1822
- return Ze(
1817
+ return Qe(
1823
1818
  new Error(`AppointmentDetailsPanel: "${A}" is not allowed.`)
1824
1819
  );
1825
- const Le = () => Ze(
1820
+ const Pe = () => Qe(
1826
1821
  new Error("AppointmentDetailsPanel: a status save is in flight.")
1827
1822
  );
1828
- if (ke.getIsSaving()) return Le();
1829
- const q = ke.setValue(A);
1830
- return q === void 0 ? Le() : q;
1823
+ if (be.getIsSaving()) return Pe();
1824
+ const Be = be.setValue(A);
1825
+ return Be === void 0 ? Pe() : Be;
1831
1826
  },
1832
1827
  retry: () => {
1833
1828
  const { retryOffered: A, onRetry: B } = $.current;
@@ -1838,78 +1833,78 @@ const Ea = Zt(function({
1838
1833
  }),
1839
1834
  []
1840
1835
  );
1841
- tn(aa, Re, fe);
1842
- const ye = /* @__PURE__ */ e(
1836
+ en(aa, De, he);
1837
+ const ve = /* @__PURE__ */ e(
1843
1838
  Wt,
1844
1839
  {
1845
- title: ge,
1840
+ title: fe,
1846
1841
  headingId: w,
1847
1842
  icon: /* @__PURE__ */ e(Kt, { "aria-hidden": "true" }),
1848
1843
  sticky: !0,
1849
1844
  divider: !0
1850
1845
  }
1851
1846
  );
1852
- let de;
1853
- return n.status === "ready" ? de = /* @__PURE__ */ e(
1847
+ let re;
1848
+ return n.status === "ready" ? re = /* @__PURE__ */ e(
1854
1849
  Ta,
1855
1850
  {
1856
1851
  read: n.read,
1857
1852
  refreshing: n.refreshing === !0,
1858
1853
  currency: u,
1859
1854
  now: p ?? /* @__PURE__ */ new Date(),
1860
- locale: Fe,
1861
- shownTitle: ge,
1855
+ locale: He,
1856
+ shownTitle: fe,
1862
1857
  headingId: w,
1863
- enter: Ce,
1858
+ enter: Ee,
1864
1859
  live: O,
1865
- statusControl: De,
1860
+ statusControl: Ie,
1866
1861
  patientId: d,
1867
1862
  operator: c,
1868
1863
  chair: l,
1869
1864
  privacy: o,
1870
1865
  privacyTitle: f,
1871
- mapsLink: y,
1866
+ mapsLink: v,
1872
1867
  notesPreview: k,
1873
- onOpenNotes: b,
1868
+ onOpenNotes: y,
1874
1869
  history: m,
1875
1870
  onOpenHistory: N,
1876
1871
  noteUnrecordedEdits: L,
1877
1872
  readOnly: P,
1878
1873
  onStatusChange: T,
1879
- allowedStatuses: M,
1874
+ allowedStatuses: H,
1880
1875
  onDescriptionChange: E,
1881
1876
  descriptionMaxLength: I,
1882
- onAssignPatient: F,
1883
- onEdit: z,
1884
- onMove: Q,
1885
- onCopy: se,
1886
- onDelete: K,
1887
- onJoinTelehealth: j,
1877
+ onAssignPatient: M,
1878
+ onEdit: q,
1879
+ onMove: X,
1880
+ onCopy: ae,
1881
+ onDelete: z,
1882
+ onJoinTelehealth: K,
1888
1883
  onWhatsApp: W,
1889
- whatsappUrl: Y,
1890
- onBuyWhatsApp: Z,
1891
- createTaskUrl: ee,
1884
+ whatsappUrl: j,
1885
+ onBuyWhatsApp: J,
1886
+ createTaskUrl: Q,
1892
1887
  onRequestSignature: x,
1893
- onSignOnDevice: V,
1894
- onOpenPatient: te,
1895
- shortcuts: Ne,
1896
- documents: Te
1888
+ onSignOnDevice: Y,
1889
+ onOpenPatient: Z,
1890
+ shortcuts: xe,
1891
+ documents: Ne
1897
1892
  },
1898
1893
  n.read.eventId
1899
- ) : n.status === "loading" ? de = /* @__PURE__ */ v(ie, { children: [
1900
- ye,
1894
+ ) : n.status === "loading" ? re = /* @__PURE__ */ b(ne, { children: [
1895
+ ve,
1901
1896
  /* @__PURE__ */ e(xa, {})
1902
- ] }) : de = /* @__PURE__ */ v(ie, { children: [
1903
- ye,
1904
- /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]", children: [
1905
- /* @__PURE__ */ e(X, { variant: n.status === "error" ? "error" : "warning", children: /* @__PURE__ */ e(X.Description, { children: n.status === "error" ? ((Pe = n.message) == null ? void 0 : Pe.trim()) || h("emptyState.error.description") : n.reason }) }),
1906
- G ? /* @__PURE__ */ e(
1897
+ ] }) : re = /* @__PURE__ */ b(ne, { children: [
1898
+ ve,
1899
+ /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]", children: [
1900
+ /* @__PURE__ */ e(ce, { variant: n.status === "error" ? "error" : "warning", children: /* @__PURE__ */ e(ce.Description, { children: n.status === "error" ? ((Re = n.message) == null ? void 0 : Re.trim()) || h("emptyState.error.description") : n.reason }) }),
1901
+ V ? /* @__PURE__ */ e(
1907
1902
  C,
1908
1903
  {
1909
1904
  intent: "outline",
1910
1905
  "data-action": "retry-load",
1911
1906
  onClick: () => {
1912
- ve.current = !0, i == null || i();
1907
+ ge.current = !0, i == null || i();
1913
1908
  },
1914
1909
  children: h("emptyState.error.cta")
1915
1910
  }
@@ -1918,33 +1913,33 @@ const Ea = Zt(function({
1918
1913
  ] }), /* @__PURE__ */ e(
1919
1914
  "div",
1920
1915
  {
1921
- ref: We,
1922
- id: me,
1916
+ ref: Me,
1917
+ id: pe,
1923
1918
  "data-component": "appointment-details-panel",
1924
- "data-component-id": fe,
1925
- "data-event-id": Ee,
1919
+ "data-component-id": he,
1920
+ "data-event-id": Te,
1926
1921
  "data-status": n.status,
1927
1922
  "aria-busy": n.status === "loading" || void 0,
1928
- className: va({ className: he }),
1929
- ...oe,
1930
- children: de
1923
+ className: va({ className: me }),
1924
+ ...ie,
1925
+ children: re
1931
1926
  }
1932
1927
  );
1933
1928
  });
1934
1929
  Ea.displayName = "AppointmentDetailsPanel";
1935
- function Ki({
1930
+ function ji({
1936
1931
  eventId: t,
1937
1932
  load: n,
1938
1933
  reloadKey: i
1939
1934
  }) {
1940
- const { t: d } = J("ui"), c = R("");
1935
+ const { t: d } = G("ui"), c = R("");
1941
1936
  c.current = d("emptyState.error.description");
1942
1937
  const l = R(n);
1943
- ue(() => {
1938
+ de(() => {
1944
1939
  l.current = n;
1945
1940
  });
1946
- const [u, p] = H(0), [r, a] = H(), o = JSON.stringify([i ?? null, u]), [f, y] = H({ eventId: t, count: 0 }), k = f.eventId === t ? f.count : f.count + 1;
1947
- f.eventId !== t && y({ eventId: t, count: k }), Ae(() => {
1941
+ const [u, p] = F(0), [r, a] = F(), o = JSON.stringify([i ?? null, u]), [f, v] = F({ eventId: t, count: 0 }), k = f.eventId === t ? f.count : f.count + 1;
1942
+ f.eventId !== t && v({ eventId: t, count: k }), Se(() => {
1948
1943
  if (t === null) {
1949
1944
  a(void 0);
1950
1945
  return;
@@ -1953,7 +1948,7 @@ function Ki({
1953
1948
  L.signal.aborted || a({ eventId: t, selection: k, request: o, value: T });
1954
1949
  };
1955
1950
  return Promise.resolve().then(() => l.current(t, { signal: L.signal })).then((T) => {
1956
- var M, E;
1951
+ var H, E;
1957
1952
  if (T.status !== "ready") {
1958
1953
  P({
1959
1954
  status: "refused",
@@ -1963,7 +1958,7 @@ function Ki({
1963
1958
  });
1964
1959
  return;
1965
1960
  }
1966
- if (((M = T.details) == null ? void 0 : M.eventId) !== t || !An((E = T.details.appointment) == null ? void 0 : E.startIso))
1961
+ if (((H = T.details) == null ? void 0 : H.eventId) !== t || !An((E = T.details.appointment) == null ? void 0 : E.startIso))
1967
1962
  throw new Error(c.current);
1968
1963
  P({ status: "ready", read: T.details });
1969
1964
  }).catch((T) => {
@@ -1974,16 +1969,16 @@ function Ki({
1974
1969
  });
1975
1970
  }), () => L.abort();
1976
1971
  }, [t, k, o]);
1977
- const b = en(() => p((L) => L + 1), []);
1978
- if (t === null) return { state: null, retry: b };
1972
+ const y = Zt(() => p((L) => L + 1), []);
1973
+ if (t === null) return { state: null, retry: y };
1979
1974
  const m = (r == null ? void 0 : r.eventId) === t && r.selection === k ? r : void 0;
1980
1975
  let N = { status: "loading", eventId: t };
1981
- return (m == null ? void 0 : m.request) === o ? N = m.value : (m == null ? void 0 : m.value.status) === "ready" && (N = { status: "ready", read: m.value.read, refreshing: !0 }), { state: N, retry: b };
1976
+ return (m == null ? void 0 : m.request) === o ? N = m.value : (m == null ? void 0 : m.value.status) === "ready" && (N = { status: "ready", read: m.value.read, refreshing: !0 }), { state: N, retry: y };
1982
1977
  }
1983
1978
  export {
1984
1979
  Ea as A,
1985
- ce as D,
1980
+ le as D,
1986
1981
  aa as a,
1987
- Ki as u
1982
+ ji as u
1988
1983
  };
1989
- //# sourceMappingURL=use-appointment-details-read-Dod21IxM.js.map
1984
+ //# sourceMappingURL=use-appointment-details-read-CC74Y-r5.js.map