@alfadocs/ui-kit 1.134.0 → 1.135.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 (125) hide show
  1. package/dist/_chunks/ai-summary-panel-B70S2lgC.js +455 -0
  2. package/dist/_chunks/{alia-sidebar-CK1zw_Bc.js → alia-sidebar-CtwhdASP.js} +3 -3
  3. package/dist/_chunks/{appointment-card-DG3m9yN-.js → appointment-card-BT1cMZIX.js} +2 -2
  4. package/dist/_chunks/{appointment-peek-BK0tDs4C.js → appointment-peek-BP_ACFz5.js} +2 -2
  5. package/dist/_chunks/{appointment-timeline-BiI2riRZ.js → appointment-timeline-Dy4YQJ17.js} +2 -2
  6. package/dist/_chunks/{appointment-tray-ClJCtYQj.js → appointment-tray-B3gSHL1j.js} +2 -2
  7. package/dist/_chunks/{calendar-appointment-editor-dialog-BSkIYGlW.js → calendar-appointment-editor-dialog-I5PfWudy.js} +8 -8
  8. package/dist/_chunks/{chat-container-B83b4hut.js → chat-container-CoOT7dzB.js} +37 -36
  9. package/dist/_chunks/{chat-input-DwQ4_WXK.js → chat-input-CX4dxBq7.js} +85 -84
  10. package/dist/_chunks/communications-panel-BKPHCiMB.js +973 -0
  11. package/dist/_chunks/{entity-summary-KHM0PnSI.js → entity-summary-CpNk6ybN.js} +70 -69
  12. package/dist/_chunks/get-error-message-DbFUzuja.js +7 -0
  13. package/dist/_chunks/handled-rejection-C-6Dq0As.js +9 -0
  14. package/dist/_chunks/megaphone-CzeTT9B3.js +22 -0
  15. package/dist/_chunks/{notes-panel-BAyPOr8N.js → notes-panel-BvjAo4RQ.js} +5 -4
  16. package/dist/_chunks/{patient-account-settings-BkAtIxJW.js → patient-account-settings-B2XbN_Fe.js} +2 -2
  17. package/dist/_chunks/{patient-check-in-resume-xhqjC6gf.js → patient-check-in-resume-B7NY-6KI.js} +4 -4
  18. package/dist/_chunks/{portal-details-CTEsm705.js → portal-details-DCIiGkHA.js} +2 -2
  19. package/dist/_chunks/{portal-documents-D8skew0h.js → portal-documents-DJOH8pZx.js} +2 -2
  20. package/dist/_chunks/{portal-parts-BdR29P7z.js → portal-parts-Br8wuala.js} +2 -2
  21. package/dist/_chunks/signing-end-screen-BdhbkPKO.js +1355 -0
  22. package/dist/_chunks/{task-editor-g1AGfxhr.js → task-editor-DvwqPfFR.js} +3 -2
  23. package/dist/_chunks/{tasks-panel-BE3zaayj.js → tasks-panel-6EzdnwT8.js} +155 -171
  24. package/dist/_chunks/{use-appointment-details-read-Dzc6fEzG.js → use-appointment-details-read-6_OmOwUs.js} +110 -109
  25. package/dist/_chunks/{workflow-status-D1WgGVTP.js → workflow-status-CO0mxXs2.js} +3 -2
  26. package/dist/agent-catalog.json +251 -1
  27. package/dist/agent-i18n/en.json +28 -0
  28. package/dist/browser-support.js +1 -1
  29. package/dist/components/_shared/sms-segments.d.ts +43 -0
  30. package/dist/components/ai-summary-panel/ai-summary-panel.agent.d.ts +4 -0
  31. package/dist/components/ai-summary-panel/ai-summary-panel.d.ts +71 -0
  32. package/dist/components/ai-summary-panel/index.d.ts +4 -0
  33. package/dist/components/ai-summary-panel/index.js +6 -0
  34. package/dist/components/appointment-card/index.js +2 -2
  35. package/dist/components/appointment-details-panel/index.js +1 -1
  36. package/dist/components/appointment-peek/index.js +1 -1
  37. package/dist/components/appointment-timeline/index.js +1 -1
  38. package/dist/components/chat-container/chat-container.d.ts +7 -0
  39. package/dist/components/chat-container/index.js +1 -1
  40. package/dist/components/chat-input/chat-input.d.ts +3 -0
  41. package/dist/components/chat-input/index.js +1 -1
  42. package/dist/components/communications-panel/communications-panel.agent.d.ts +4 -0
  43. package/dist/components/communications-panel/communications-panel.d.ts +136 -0
  44. package/dist/components/communications-panel/index.d.ts +6 -0
  45. package/dist/components/communications-panel/index.js +7 -0
  46. package/dist/components/entity-summary/entity-summary.d.ts +8 -0
  47. package/dist/components/entity-summary/index.js +1 -1
  48. package/dist/components/index.d.ts +2 -0
  49. package/dist/components/notes-panel/index.js +1 -1
  50. package/dist/components/task-editor/index.js +1 -1
  51. package/dist/components/tasks-panel/index.js +1 -1
  52. package/dist/components/workflow-status/index.js +1 -1
  53. package/dist/core.css +1 -1
  54. package/dist/host-compat.css +10 -4
  55. package/dist/i18n/locales/ar.d.ts +93 -0
  56. package/dist/i18n/locales/ar.js +94 -0
  57. package/dist/i18n/locales/de.d.ts +93 -0
  58. package/dist/i18n/locales/de.js +94 -0
  59. package/dist/i18n/locales/el.d.ts +93 -0
  60. package/dist/i18n/locales/el.js +94 -0
  61. package/dist/i18n/locales/en.d.ts +93 -0
  62. package/dist/i18n/locales/en.js +94 -0
  63. package/dist/i18n/locales/es.d.ts +93 -0
  64. package/dist/i18n/locales/es.js +94 -0
  65. package/dist/i18n/locales/fr.d.ts +93 -0
  66. package/dist/i18n/locales/fr.js +94 -0
  67. package/dist/i18n/locales/hi.d.ts +93 -0
  68. package/dist/i18n/locales/hi.js +94 -0
  69. package/dist/i18n/locales/it.d.ts +93 -0
  70. package/dist/i18n/locales/it.js +94 -0
  71. package/dist/i18n/locales/ja.d.ts +93 -0
  72. package/dist/i18n/locales/ja.js +94 -0
  73. package/dist/i18n/locales/nl.d.ts +93 -0
  74. package/dist/i18n/locales/nl.js +94 -0
  75. package/dist/i18n/locales/pl.d.ts +93 -0
  76. package/dist/i18n/locales/pl.js +94 -0
  77. package/dist/i18n/locales/pt.d.ts +93 -0
  78. package/dist/i18n/locales/pt.js +94 -0
  79. package/dist/i18n/locales/ro.d.ts +93 -0
  80. package/dist/i18n/locales/ro.js +94 -0
  81. package/dist/i18n/locales/ru.d.ts +93 -0
  82. package/dist/i18n/locales/ru.js +94 -0
  83. package/dist/i18n/locales/sq.d.ts +93 -0
  84. package/dist/i18n/locales/sq.js +94 -0
  85. package/dist/i18n/locales/sv.d.ts +93 -0
  86. package/dist/i18n/locales/sv.js +94 -0
  87. package/dist/i18n/locales/tr.d.ts +93 -0
  88. package/dist/i18n/locales/tr.js +94 -0
  89. package/dist/i18n/locales/zh.d.ts +93 -0
  90. package/dist/i18n/locales/zh.js +94 -0
  91. package/dist/index.js +893 -886
  92. package/dist/locales/ar.json +93 -0
  93. package/dist/locales/de.json +93 -0
  94. package/dist/locales/el.json +93 -0
  95. package/dist/locales/en.json +93 -0
  96. package/dist/locales/es.json +93 -0
  97. package/dist/locales/fr.json +93 -0
  98. package/dist/locales/hi.json +93 -0
  99. package/dist/locales/it.json +93 -0
  100. package/dist/locales/ja.json +93 -0
  101. package/dist/locales/nl.json +93 -0
  102. package/dist/locales/pl.json +93 -0
  103. package/dist/locales/pt.json +93 -0
  104. package/dist/locales/ro.json +93 -0
  105. package/dist/locales/ru.json +93 -0
  106. package/dist/locales/sq.json +93 -0
  107. package/dist/locales/sv.json +93 -0
  108. package/dist/locales/tr.json +93 -0
  109. package/dist/locales/zh.json +93 -0
  110. package/dist/patterns/alia-assistant/index.js +1 -1
  111. package/dist/patterns/calendar/calendar.journey.d.ts +7 -0
  112. package/dist/patterns/calendar/index.js +1 -1
  113. package/dist/patterns/patient-account-settings/index.js +1 -1
  114. package/dist/patterns/patient-check-in/index.js +1 -1
  115. package/dist/patterns/patient-portal/index.js +2 -2
  116. package/dist/patterns/signing/index.d.ts +1 -0
  117. package/dist/patterns/signing/index.js +1 -1
  118. package/dist/patterns/signing/multi-field-signer.d.ts +22 -1
  119. package/dist/patterns/signing/signing-checkbox-pill.d.ts +66 -0
  120. package/dist/patterns/signing/signing-checkbox-sheet.d.ts +16 -0
  121. package/dist/patterns/signing/signing-document-screen.d.ts +18 -1
  122. package/dist/tokens.css +1 -1
  123. package/package.json +9 -1
  124. package/dist/_chunks/handled-rejection-6gqCf5vt.js +0 -13
  125. package/dist/_chunks/signing-end-screen-an9P8DOT.js +0 -1041
@@ -0,0 +1,455 @@
1
+ import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
+ import { forwardRef as Pe, useId as xe, useRef as o, useImperativeHandle as Te, useState as M, useEffect as F, useCallback as O, useMemo as le } from "react";
3
+ import { c as be } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as ce } from "react-i18next";
5
+ import { u as Ne } from "./registry-DvAUVLHh.js";
6
+ import { g as Ae } from "./get-error-message-DbFUzuja.js";
7
+ import { A as Ce } from "./ai-permission-notice-C-xR2_iS.js";
8
+ import { A as Ee } from "./ai-credits-exhausted-notice-Lws3113e.js";
9
+ import { A as l } from "./alert-C4WKViaS.js";
10
+ import { B as te } from "./button-DohK_Ak_.js";
11
+ import { E as b } from "./empty-state-DwJ5YNzz.js";
12
+ import { E as Re } from "./entity-summary-CpNk6ybN.js";
13
+ import { P as ne } from "./panel-header-CbtlTe85.js";
14
+ import { S as ie } from "./skeleton-tTWJpvAq.js";
15
+ import { A as se } from "./astroid-BN4f5VXU.js";
16
+ import { R as ke } from "./refresh-cw-DnI0cLFC.js";
17
+ import { C as Be } from "./clock-Drd4Wtis.js";
18
+ const De = {
19
+ id: "ai-summary-panel",
20
+ // 'confirm' backs grant_consent. generate and regenerate have no dedicated
21
+ // capability in the closed vocabulary.
22
+ capabilities: ["confirm"],
23
+ state: {
24
+ status: {
25
+ type: "'consent-required' | 'loading' | 'ready' | 'stale' | 'insufficient-data' | 'credits-exhausted' | 'error'",
26
+ descriptionKey: "ui.agent.aiSummaryPanel.state.status",
27
+ description: "The face the panel shows.",
28
+ read: (t) => t.getState().status
29
+ },
30
+ ageBand: {
31
+ type: "'fresh' | 'old' | 'very-old' | null",
32
+ descriptionKey: "ui.agent.aiSummaryPanel.state.ageBand",
33
+ description: "How old the summary is: fresh (under 6 hours), old (6 to 24 hours) or very-old (over 24 hours). Null when there is no summary.",
34
+ read: (t) => t.getState().ageBand
35
+ },
36
+ sectionCount: {
37
+ type: "number",
38
+ descriptionKey: "ui.agent.aiSummaryPanel.state.sectionCount",
39
+ description: "How many sections the summary holds. A count only.",
40
+ read: (t) => t.getState().sectionCount
41
+ }
42
+ },
43
+ actions: {
44
+ grant_consent: {
45
+ safety: "write",
46
+ openWorld: !0,
47
+ idempotent: !0,
48
+ errors: [
49
+ "The panel is not asking for consent, is read-only or privacy mode is on.",
50
+ "The host could not save the consent. The panel shows the host's message."
51
+ ],
52
+ descriptionKey: "ui.agent.aiSummaryPanel.actions.grantConsent",
53
+ description: "Record that the patient was told and agrees, then ask for the first summary. The summary spends AI credits. Only call this when the user says the patient agreed. Settles with the host's answer.",
54
+ invoke: (t) => t.grantConsent()
55
+ },
56
+ generate: {
57
+ safety: "write",
58
+ openWorld: !0,
59
+ errors: [
60
+ "The panel is not in the error or not-enough-data face, is read-only or privacy mode is on.",
61
+ "A request is already in flight."
62
+ ],
63
+ descriptionKey: "ui.agent.aiSummaryPanel.actions.generate",
64
+ description: "Ask for a summary again after an error or when data was added. Spends AI credits. Settles with the host's answer.",
65
+ invoke: (t) => t.generate()
66
+ },
67
+ regenerate: {
68
+ safety: "write",
69
+ openWorld: !0,
70
+ errors: [
71
+ "The panel shows no summary, is read-only or privacy mode is on.",
72
+ "A request is already in flight."
73
+ ],
74
+ descriptionKey: "ui.agent.aiSummaryPanel.actions.regenerate",
75
+ description: "Replace the summary with a new one. Spends AI credits. Settles with the host's answer.",
76
+ invoke: (t) => t.regenerate()
77
+ }
78
+ },
79
+ domHooks: {
80
+ root: {
81
+ attr: "data-component",
82
+ value: "ai-summary-panel",
83
+ description: "Marks the AiSummaryPanel region."
84
+ },
85
+ instanceId: {
86
+ attr: "data-component-id",
87
+ sourceProp: "id",
88
+ description: "Sourced from the id prop. Required to address a specific panel from the agent."
89
+ }
90
+ }
91
+ }, qe = be(
92
+ "ds:flex ds:h-full ds:min-h-0 ds:min-w-0 ds:flex-col ds:bg-[color:var(--card)]"
93
+ ), W = "ds:px-[var(--spacing-md)] ds:pt-[var(--spacing-md)]", oe = 36e5, de = 6, ue = 24, He = {
94
+ note: "aiSummaryPanel.minNote",
95
+ "plan-entry": "aiSummaryPanel.minPlanEntry",
96
+ appointment: "aiSummaryPanel.minAppointment",
97
+ anamnesis: "aiSummaryPanel.minAnamnesis"
98
+ };
99
+ function Ie(t, s) {
100
+ const d = new Date(s).getTime() - new Date(t).getTime();
101
+ return Number.isFinite(d) ? d > ue * oe ? "very-old" : d > de * oe ? "old" : "fresh" : "fresh";
102
+ }
103
+ const Le = Pe(
104
+ ({
105
+ id: t,
106
+ title: s,
107
+ "aria-label": d,
108
+ locale: y,
109
+ nowIso: N,
110
+ status: n,
111
+ patientName: p,
112
+ patientHref: A,
113
+ generatedAtIso: g,
114
+ stats: me,
115
+ sections: C = [],
116
+ minimumData: E,
117
+ errorMessage: j,
118
+ privacy: m = !1,
119
+ readOnly: v = !1,
120
+ onGrantConsent: R,
121
+ onGenerate: k,
122
+ onRetry: U,
123
+ onOpenPatient: V,
124
+ className: fe,
125
+ ...he
126
+ }, ye) => {
127
+ const { t: a, i18n: pe } = ce("ui"), B = xe(), Y = s ?? a("aiSummaryPanel.title"), $ = y ?? pe.language, D = o(null);
128
+ Te(ye, () => D.current, []);
129
+ const [q, J] = M(!1), S = o(!1), [Q, X] = M(null), w = o(!0);
130
+ F(() => (w.current = !0, () => {
131
+ w.current = !1;
132
+ }), []);
133
+ const H = (n === "ready" || n === "stale") && g ? Ie(g, N) : null, P = o(R);
134
+ P.current = R;
135
+ const f = o(k);
136
+ f.current = k;
137
+ const x = O(
138
+ async (r, i) => {
139
+ if (!S.current) {
140
+ S.current = !0, J(!0), X(null);
141
+ try {
142
+ await r();
143
+ } catch (u) {
144
+ throw w.current && X(Ae(u, i())), u;
145
+ } finally {
146
+ S.current = !1, w.current && J(!1);
147
+ }
148
+ }
149
+ },
150
+ []
151
+ ), I = O(() => {
152
+ let r = "grant";
153
+ return x(
154
+ async () => {
155
+ var i, u;
156
+ await ((i = P.current) == null ? void 0 : i.call(P)), r = "generate", await ((u = f.current) == null ? void 0 : u.call(f, { regenerate: !1 }));
157
+ },
158
+ () => a(r === "grant" ? "aiSummaryPanel.consentSaveFailed" : "aiSummaryPanel.errorTitle")
159
+ );
160
+ }, [x, a]), T = O(
161
+ (r) => x(
162
+ async () => {
163
+ var i;
164
+ await ((i = f.current) == null ? void 0 : i.call(f, { regenerate: r }));
165
+ },
166
+ () => a("aiSummaryPanel.errorTitle")
167
+ ),
168
+ [x, a]
169
+ ), h = o({ status: n, ageBand: H, sectionCount: C.length });
170
+ h.current = { status: n, ageBand: H, sectionCount: C.length };
171
+ const L = o({ readOnly: v, privacy: m });
172
+ L.current = { readOnly: v, privacy: m };
173
+ const ge = le(() => {
174
+ const r = async (i) => {
175
+ if (L.current.privacy)
176
+ throw new Error("The summary is hidden by privacy mode.");
177
+ if (L.current.readOnly)
178
+ throw new Error("The panel is read-only.");
179
+ if (!i.includes(h.current.status))
180
+ throw new Error(
181
+ `The panel is in the ${h.current.status} face, which does not offer this.`
182
+ );
183
+ if (S.current) throw new Error("A request is already in flight.");
184
+ };
185
+ return {
186
+ getState: () => ({
187
+ status: h.current.status,
188
+ ageBand: h.current.ageBand,
189
+ sectionCount: h.current.sectionCount
190
+ }),
191
+ grantConsent: async () => {
192
+ await r(["consent-required"]), await I();
193
+ },
194
+ generate: async () => {
195
+ await r(["error", "insufficient-data"]), await T(!1);
196
+ },
197
+ regenerate: async () => {
198
+ await r(["ready", "stale"]), await T(!0);
199
+ }
200
+ };
201
+ }, [I, T]);
202
+ Ne(De, ge, t);
203
+ const Z = o(!1), z = o(!1);
204
+ F(() => {
205
+ const r = D.current;
206
+ if (!r) return;
207
+ const i = z.current && (!document.activeElement || document.activeElement === document.body);
208
+ if (Z.current && !i) return;
209
+ Z.current = !0;
210
+ const u = m ? null : r.querySelector('[role="checkbox"]');
211
+ if (n === "consent-required" && u && !i) {
212
+ u.focus({ preventScroll: !0 });
213
+ return;
214
+ }
215
+ const _ = r.querySelector("h2");
216
+ _ && (_.setAttribute("tabindex", "-1"), _.focus({ preventScroll: !0, focusVisible: !1 }));
217
+ }, [m, n]);
218
+ const G = m ? a("aiSummaryPanel.privacyTitle") : q && (n === "ready" || n === "stale") ? a("aiSummaryPanel.loading") : {
219
+ "consent-required": a("aiSummaryPanel.consentTitle"),
220
+ loading: a("aiSummaryPanel.loading"),
221
+ ready: a("aiSummaryPanel.statusReady"),
222
+ stale: a("aiSummaryPanel.staleTitle"),
223
+ "insufficient-data": a("aiSummaryPanel.insufficientTitle"),
224
+ "credits-exhausted": a("aiSummaryPanel.creditsExhausted"),
225
+ error: a("aiSummaryPanel.errorTitle")
226
+ }[n], [ee, ve] = M("");
227
+ F(() => {
228
+ ve(G);
229
+ }, [G]);
230
+ const Se = (r) => {
231
+ if (!V || !A) return;
232
+ const i = r.target.closest("a");
233
+ i && i.getAttribute("href") === A && (r.preventDefault(), V());
234
+ }, ae = {
235
+ ref: D,
236
+ "data-component": "ai-summary-panel",
237
+ "data-component-id": t,
238
+ "data-status": m ? "privacy" : n,
239
+ onFocusCapture: () => {
240
+ z.current = !0;
241
+ },
242
+ onBlurCapture: (r) => {
243
+ r.relatedTarget && (z.current = !1);
244
+ },
245
+ // The summary inside is its own region named by the title, so this
246
+ // region carries the longer name: two regions may not share one.
247
+ "aria-label": d ?? a("aiSummaryPanel.regionLabel"),
248
+ className: [qe(), fe].filter(Boolean).join(" "),
249
+ ...he
250
+ };
251
+ if (m)
252
+ return /* @__PURE__ */ c("section", { ...ae, children: [
253
+ /* @__PURE__ */ e(
254
+ ne,
255
+ {
256
+ title: Y,
257
+ icon: /* @__PURE__ */ e(se, { "aria-hidden": "true" }),
258
+ headingId: B,
259
+ divider: !0
260
+ }
261
+ ),
262
+ /* @__PURE__ */ e("span", { role: "status", className: "ds:sr-only", children: ee }),
263
+ /* @__PURE__ */ e("div", { className: "ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ e(
264
+ b,
265
+ {
266
+ variant: "first-use",
267
+ size: "sm",
268
+ title: a("aiSummaryPanel.privacyTitle"),
269
+ description: a("aiSummaryPanel.privacyDescription")
270
+ }
271
+ ) })
272
+ ] });
273
+ const K = n === "ready" || n === "stale", we = K && !v && !!k, re = K && g ? /* @__PURE__ */ e(
274
+ ze,
275
+ {
276
+ generatedAtIso: g,
277
+ band: H ?? "fresh",
278
+ lang: $
279
+ }
280
+ ) : null;
281
+ return /* @__PURE__ */ c("section", { ...ae, children: [
282
+ /* @__PURE__ */ e(
283
+ ne,
284
+ {
285
+ title: Y,
286
+ icon: /* @__PURE__ */ e(se, { "aria-hidden": "true" }),
287
+ headingId: B,
288
+ divider: !0,
289
+ actions: we ? /* @__PURE__ */ e(
290
+ te,
291
+ {
292
+ type: "button",
293
+ size: "sm",
294
+ intent: "ghost",
295
+ startIcon: /* @__PURE__ */ e(ke, { "aria-hidden": "true" }),
296
+ loading: q,
297
+ onClick: () => {
298
+ T(!0).catch(() => {
299
+ });
300
+ },
301
+ children: a("aiSummaryPanel.regenerate")
302
+ }
303
+ ) : void 0
304
+ }
305
+ ),
306
+ /* @__PURE__ */ e("span", { role: "status", className: "ds:sr-only", children: ee }),
307
+ /* @__PURE__ */ c(
308
+ "div",
309
+ {
310
+ tabIndex: 0,
311
+ role: "group",
312
+ "aria-labelledby": B,
313
+ onClick: Se,
314
+ className: "ds:min-h-0 ds:flex-1 ds:overflow-y-auto ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
315
+ children: [
316
+ n === "consent-required" ? /* @__PURE__ */ e("div", { className: "ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ e(
317
+ Ce,
318
+ {
319
+ granted: !1,
320
+ canGrant: !v && !!R,
321
+ pending: q,
322
+ headingLevel: 3,
323
+ className: "ds:[&_p:not(:last-child)]:mb-[var(--spacing-sm)]",
324
+ copy: {
325
+ title: a("aiSummaryPanel.consentTitle"),
326
+ descriptionRequired: a("aiSummaryPanel.consentDescription"),
327
+ confirmLabel: a("aiSummaryPanel.consentCheckbox"),
328
+ grantButton: a("aiSummaryPanel.generate"),
329
+ pendingLabel: a("aiSummaryPanel.loading")
330
+ },
331
+ onGrantConsent: () => {
332
+ I().catch(() => {
333
+ });
334
+ }
335
+ }
336
+ ) }) : null,
337
+ n === "loading" ? /* @__PURE__ */ e(
338
+ "div",
339
+ {
340
+ "data-ai-summary-state": "loading",
341
+ "aria-hidden": "true",
342
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]",
343
+ children: ["a", "b", "c"].map((r, i) => /* @__PURE__ */ c(
344
+ "div",
345
+ {
346
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
347
+ children: [
348
+ /* @__PURE__ */ e(ie, { variant: "text", size: "sm", width: "40%", stagger: i }),
349
+ /* @__PURE__ */ e(ie, { variant: "text", size: "sm", lines: 3, stagger: i })
350
+ ]
351
+ },
352
+ r
353
+ ))
354
+ }
355
+ ) : null,
356
+ n === "stale" ? /* @__PURE__ */ e("div", { className: W, children: /* @__PURE__ */ c(l, { variant: "warning", announce: "off", "data-ai-summary-stale": "", children: [
357
+ /* @__PURE__ */ e(l.Title, { as: "h3", children: a("aiSummaryPanel.staleTitle") }),
358
+ /* @__PURE__ */ e(l.Description, { children: a("aiSummaryPanel.staleDescription") })
359
+ ] }) }) : null,
360
+ re ? /* @__PURE__ */ e("div", { className: W, children: re }) : null,
361
+ K ? /* @__PURE__ */ e(
362
+ Re,
363
+ {
364
+ showHeader: !1,
365
+ entityName: p,
366
+ entityHref: A,
367
+ stats: me,
368
+ sections: C,
369
+ locale: $,
370
+ disclaimer: a("aiSummaryPanel.disclaimer")
371
+ }
372
+ ) : null,
373
+ n === "insufficient-data" ? /* @__PURE__ */ e(
374
+ "div",
375
+ {
376
+ "data-ai-summary-state": "insufficient-data",
377
+ className: "ds:p-[var(--spacing-md)]",
378
+ children: /* @__PURE__ */ c(b, { variant: "first-use", size: "sm", headingLevel: 3, children: [
379
+ /* @__PURE__ */ e(b.Title, { children: a("aiSummaryPanel.insufficientTitle") }),
380
+ /* @__PURE__ */ e(b.Description, { children: a("aiSummaryPanel.insufficientDescription") }),
381
+ E && E.length > 0 ? /* @__PURE__ */ e("ul", { className: "ds:m-0 ds:flex ds:list-disc ds:flex-col ds:gap-[var(--spacing-2xs)] ds:ps-[var(--spacing-md)] ds:text-start type-body-sm", children: E.map((r) => /* @__PURE__ */ e("li", { children: a(He[r]) }, r)) }) : null
382
+ ] })
383
+ }
384
+ ) : null,
385
+ n === "credits-exhausted" ? /* @__PURE__ */ e(
386
+ "div",
387
+ {
388
+ "data-ai-summary-state": "credits-exhausted",
389
+ className: "ds:p-[var(--spacing-md)]",
390
+ children: /* @__PURE__ */ e(Ee, { headingLevel: 3, announce: "off" })
391
+ }
392
+ ) : null,
393
+ n === "error" ? /* @__PURE__ */ e(
394
+ "div",
395
+ {
396
+ "data-ai-summary-state": "error",
397
+ className: "ds:p-[var(--spacing-md)]",
398
+ children: /* @__PURE__ */ c(l, { variant: "error", announce: "off", children: [
399
+ /* @__PURE__ */ e(l.Title, { as: "h3", children: a("aiSummaryPanel.errorTitle") }),
400
+ j ? /* @__PURE__ */ e(l.Description, { children: j }) : null,
401
+ U ? /* @__PURE__ */ e(l.Action, { children: /* @__PURE__ */ e(
402
+ te,
403
+ {
404
+ type: "button",
405
+ intent: "secondary",
406
+ size: "sm",
407
+ onClick: U,
408
+ children: a("aiSummaryPanel.retry")
409
+ }
410
+ ) }) : null
411
+ ] })
412
+ }
413
+ ) : null,
414
+ Q ? /* @__PURE__ */ e("div", { className: W, children: /* @__PURE__ */ e(l, { variant: "error", "data-ai-summary-action-error": "", children: /* @__PURE__ */ e(l.Description, { children: Q }) }) }) : null
415
+ ]
416
+ }
417
+ )
418
+ ] });
419
+ }
420
+ );
421
+ Le.displayName = "AiSummaryPanel";
422
+ function ze({
423
+ generatedAtIso: t,
424
+ band: s,
425
+ lang: d
426
+ }) {
427
+ const { t: y } = ce("ui"), N = le(() => {
428
+ const p = new Date(t);
429
+ return Number.isNaN(p.getTime()) ? "" : new Intl.DateTimeFormat(d, {
430
+ dateStyle: "medium",
431
+ timeStyle: "short"
432
+ }).format(p);
433
+ }, [t, d]);
434
+ return /* @__PURE__ */ c(
435
+ "div",
436
+ {
437
+ "data-ai-summary-age": s,
438
+ className: `ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] type-meta ${s === "very-old" ? "ds:text-[color:var(--destructive)]" : s === "old" ? "ds:text-[color:var(--warning-foreground)]" : "ds:text-[color:var(--muted-foreground)]"}`,
439
+ children: [
440
+ /* @__PURE__ */ c("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
441
+ /* @__PURE__ */ e(Be, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" }),
442
+ /* @__PURE__ */ e("span", { children: y("aiSummaryPanel.generatedAt", { date: N }) })
443
+ ] }),
444
+ s !== "fresh" ? /* @__PURE__ */ e("span", { children: y("aiSummaryPanel.ageNotice", {
445
+ hours: s === "very-old" ? ue : de
446
+ }) }) : null
447
+ ]
448
+ }
449
+ );
450
+ }
451
+ export {
452
+ Le as A,
453
+ De as a
454
+ };
455
+ //# sourceMappingURL=ai-summary-panel-B70S2lgC.js.map
@@ -10,9 +10,9 @@ import { A as ls } from "./astroid-BN4f5VXU.js";
10
10
  import { AliaAsteroidIcon as he } from "../alia-asteroid-icon/index.js";
11
11
  import { A as te } from "./avatar-Dp5apm1d.js";
12
12
  import { B as H } from "./button-DohK_Ak_.js";
13
- import { C as os } from "./chat-container-B83b4hut.js";
13
+ import { C as os } from "./chat-container-CoOT7dzB.js";
14
14
  import { C as cs } from "./chat-message-CfIyXrxA.js";
15
- import { C as Se, P as ms } from "./chat-input-DwQ4_WXK.js";
15
+ import { C as Se, P as ms } from "./chat-input-CX4dxBq7.js";
16
16
  import { S as us } from "./streaming-text-Nb3Q7L94.js";
17
17
  import { a as Re, S as _e } from "./suggestion-chip-BNRWZL51.js";
18
18
  import { T as Ue } from "./typing-indicator-B1RkE8jD.js";
@@ -1320,4 +1320,4 @@ export {
1320
1320
  Ks as b,
1321
1321
  Gs as c
1322
1322
  };
1323
- //# sourceMappingURL=alia-sidebar-CK1zw_Bc.js.map
1323
+ //# sourceMappingURL=alia-sidebar-CtwhdASP.js.map
@@ -10,7 +10,7 @@ import { T as sa } from "./transaction-chip-CkYd-3ky.js";
10
10
  import { i as Ta } from "./is-development-CLUAnsU7.js";
11
11
  import { V as Sa } from "./visually-hidden-BHxEUGyT.js";
12
12
  import { p as Ma } from "./privacy-mask-text-B8YfzB7L.js";
13
- import { a as Ra } from "./workflow-status-D1WgGVTP.js";
13
+ import { a as Ra } from "./workflow-status-CO0mxXs2.js";
14
14
  import { i as Aa } from "./is-safe-url-CEy9CEml.js";
15
15
  import { a as Da, b as Va, c as _a } from "./entity-card-p-LANpYt.js";
16
16
  import { V as Ia } from "./video-BheNGvsu.js";
@@ -501,4 +501,4 @@ ee.displayName = "AppointmentCard";
501
501
  export {
502
502
  ee as A
503
503
  };
504
- //# sourceMappingURL=appointment-card-DG3m9yN-.js.map
504
+ //# sourceMappingURL=appointment-card-BT1cMZIX.js.map
@@ -5,7 +5,7 @@ import { useTranslation as y } from "react-i18next";
5
5
  import { A as z } from "./avatar-Dp5apm1d.js";
6
6
  import { D as l } from "./description-list-BxzDN9o2.js";
7
7
  import { H as E } from "./hover-card-CuRIA4wN.js";
8
- import { a as H } from "./workflow-status-D1WgGVTP.js";
8
+ import { a as H } from "./workflow-status-CO0mxXs2.js";
9
9
  import { C as I } from "./clock-Drd4Wtis.js";
10
10
  import { V as S } from "./video-BheNGvsu.js";
11
11
  import { A as W } from "./armchair-BaLDW6Hz.js";
@@ -120,4 +120,4 @@ T.displayName = "AppointmentPeek";
120
120
  export {
121
121
  T as A
122
122
  };
123
- //# sourceMappingURL=appointment-peek-BK0tDs4C.js.map
123
+ //# sourceMappingURL=appointment-peek-BP_ACFz5.js.map
@@ -2,7 +2,7 @@ import { jsxs as x, jsx as o, Fragment as He } from "react/jsx-runtime";
2
2
  import { forwardRef as Me, useId as Ne, useMemo as j, useRef as y, useState as $, useEffect as Fe, useCallback as b, useImperativeHandle as _e } from "react";
3
3
  import { c as ze } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as Ae } from "react-i18next";
5
- import { A as ne } from "./appointment-card-DG3m9yN-.js";
5
+ import { A as ne } from "./appointment-card-BT1cMZIX.js";
6
6
  import { B as P } from "./button-DohK_Ak_.js";
7
7
  import { B as Be } from "./button-group-DuQuuulC.js";
8
8
  import { D as Ke } from "./date-picker-BmVBVpVu.js";
@@ -449,4 +449,4 @@ export {
449
449
  Ze as A,
450
450
  Oe as a
451
451
  };
452
- //# sourceMappingURL=appointment-timeline-BiI2riRZ.js.map
452
+ //# sourceMappingURL=appointment-timeline-Dy4YQJ17.js.map
@@ -5,7 +5,7 @@ import { useTranslation as q } from "react-i18next";
5
5
  import { I as K } from "./icon-button-S8_weU3g.js";
6
6
  import { S as V } from "./skeleton-tTWJpvAq.js";
7
7
  import { E as W } from "./empty-state-DwJ5YNzz.js";
8
- import { A as B } from "./appointment-card-DG3m9yN-.js";
8
+ import { A as B } from "./appointment-card-BT1cMZIX.js";
9
9
  import { u as D } from "./registry-DvAUVLHh.js";
10
10
  import { C as L } from "./calendar-days-BGWklvE-.js";
11
11
  import { P as _ } from "./plus-DzMQ_c6b.js";
@@ -197,4 +197,4 @@ export {
197
197
  it as a,
198
198
  F as b
199
199
  };
200
- //# sourceMappingURL=appointment-tray-ClJCtYQj.js.map
200
+ //# sourceMappingURL=appointment-tray-B3gSHL1j.js.map
@@ -3,15 +3,15 @@ import { createElement as bd, useContext as Hi, createContext as Vi, useState as
3
3
  import { useTranslation as Me } from "react-i18next";
4
4
  import { u as Id } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
5
5
  import { C as Zo, b as Qo, a as ec } from "./collapsible-DVPM46bq.js";
6
- import { A as Cd } from "./appointment-timeline-BiI2riRZ.js";
7
- import { a as tc } from "./workflow-status-D1WgGVTP.js";
6
+ import { A as Cd } from "./appointment-timeline-Dy4YQJ17.js";
7
+ import { a as tc } from "./workflow-status-CO0mxXs2.js";
8
8
  import { A as qa, g as Nd } from "./avatar-Dp5apm1d.js";
9
9
  import { B as wn } from "./badge-BUk4RjTS.js";
10
10
  import { S as xn, C as nc } from "./skeleton-tTWJpvAq.js";
11
11
  import { S as zr } from "./stethoscope-sZXGC43m.js";
12
12
  import { C as sc } from "./chevron-down-DWE7GSq9.js";
13
13
  import { A as po, a as ac } from "./entity-card-p-LANpYt.js";
14
- import { T as Dd, P as xd, S as wd } from "./task-editor-g1AGfxhr.js";
14
+ import { T as Dd, P as xd, S as wd } from "./task-editor-DvwqPfFR.js";
15
15
  import { C as Sd, u as ii, a as Td, d as Ed } from "./control-room-rail-DcJpHbp4.js";
16
16
  import { S as Ki } from "./scroll-area-CY5SLYNw.js";
17
17
  import { A as Ad, u as Ld } from "./app-frame-context-CPszhDDb.js";
@@ -20,7 +20,7 @@ import { d as fs, c as go, a as Rd, b as Us } from "./toast-DQ1Zu1kk.js";
20
20
  import { T as cr, a as rc } from "./tooltip-uEBdD1-5.js";
21
21
  import { A as ne } from "./alert-C4WKViaS.js";
22
22
  import { B as ue } from "./button-DohK_Ak_.js";
23
- import { f as rs, b as ur, c as Md, d as Wd, e as Pd, A as ic, u as _d, D as Rr, R as Hr, g as $d, h as oc, M as Fd, C as vo, i as Bd, j as zd, k as Hd, l as Vd, m as Ta, I as Kd, s as Ud } from "./use-appointment-details-read-Dzc6fEzG.js";
23
+ import { f as rs, b as ur, c as Md, d as Wd, e as Pd, A as ic, u as _d, D as Rr, R as Hr, g as $d, h as oc, M as Fd, C as vo, i as Bd, j as zd, k as Hd, l as Vd, m as Ta, I as Kd, s as Ud } from "./use-appointment-details-read-6_OmOwUs.js";
24
24
  import { D as fe } from "./dialog-CVTxyR0v.js";
25
25
  import { R as qn } from "./radio-BZQs6_36.js";
26
26
  import { R as ba } from "./radio-group-ChIKyeSJ.js";
@@ -39,7 +39,7 @@ import { D as ra } from "./date-picker-BmVBVpVu.js";
39
39
  import { D as $e } from "./dropdown-menu-DBWaW4pq.js";
40
40
  import { F as Pe } from "./form-field-CyHfOVKF.js";
41
41
  import { P as on } from "./popover-CN5IsOeS.js";
42
- import { A as Yd } from "./appointment-peek-BK0tDs4C.js";
42
+ import { A as Yd } from "./appointment-peek-BP_ACFz5.js";
43
43
  import { H as br } from "./hover-card-CuRIA4wN.js";
44
44
  import { C as Ui } from "./calendar-plus-BFrIRE4r.js";
45
45
  import { S as cc } from "./square-check-big-dj0o8yA3.js";
@@ -83,12 +83,12 @@ import { G as pr, h as yo, c as rl, A as il, C as fc } from "./color-picker-AcaW
83
83
  import { s as ol, S as cl } from "./signature-status-chip-DS9hHwIt.js";
84
84
  import { b as dl } from "./appointment-workflow-status-S-lx81Yz.js";
85
85
  import { T as ll } from "./token-insert-menu-BLtfMTJd.js";
86
- import { g as bc } from "./handled-rejection-6gqCf5vt.js";
86
+ import { g as bc } from "./get-error-message-DbFUzuja.js";
87
87
  import { C as ul } from "./copy-field-BaYEDJ9f.js";
88
88
  import { createPortal as ml } from "react-dom";
89
89
  import { u as hl } from "./form-field-context-DtiROUJV.js";
90
90
  import { i as yc } from "./treatment-receipt-BZzwvsnY.js";
91
- import { N as pl } from "./notes-panel-BAyPOr8N.js";
91
+ import { N as pl } from "./notes-panel-BvjAo4RQ.js";
92
92
  import { C as Xi } from "./combobox-BBCVQS-S.js";
93
93
  import { S as gl } from "./state-backed-text-input-DVETOhSS.js";
94
94
  import { N as Di } from "./number-input-DUSvP7Dq.js";
@@ -13770,4 +13770,4 @@ export {
13770
13770
  Uv as r,
13771
13771
  vn as u
13772
13772
  };
13773
- //# sourceMappingURL=calendar-appointment-editor-dialog-BSkIYGlW.js.map
13773
+ //# sourceMappingURL=calendar-appointment-editor-dialog-I5PfWudy.js.map