@alfadocs/ui-kit 1.149.1 → 1.150.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 (183) hide show
  1. package/dist/_chunks/{ai-summary-panel-Cdsve-XN.js → ai-summary-panel-D-RNe-_n.js} +3 -3
  2. package/dist/_chunks/{anamnesis-summary-rows-QCv6zW-J.js → anamnesis-summary-rows-CE-i9j-s.js} +2 -2
  3. package/dist/_chunks/{appointment-card-HOZrABrQ.js → appointment-card-BPZggqck.js} +2 -2
  4. package/dist/_chunks/{appointment-details-panel.history-BxNqcA-r.js → appointment-details-panel.history-BO31ZFQp.js} +2 -2
  5. package/dist/_chunks/{appointment-details-panel.identity--_j07UG1.js → appointment-details-panel.identity-C9kWtC6m.js} +90 -78
  6. package/dist/_chunks/appointment-peek-CGJ6kUvM.js +213 -0
  7. package/dist/_chunks/{appointment-timeline-CuZW-CGT.js → appointment-timeline-ynFqcw0S.js} +3 -3
  8. package/dist/_chunks/{appointment-tray-CFCxukwq.js → appointment-tray-Dx5VDREk.js} +2 -2
  9. package/dist/_chunks/{balance-badge-cell-BPz9bQAB.js → balance-badge-cell-DiyJQcmA.js} +2 -2
  10. package/dist/_chunks/{calendar-appointment-editor-dialog-fQleWmJE.js → calendar-appointment-editor-dialog-BfoEpFVx.js} +360 -356
  11. package/dist/_chunks/{calendar-editor-discard-host-DWS_kM-a.js → calendar-editor-discard-host-DO506cJu.js} +4 -4
  12. package/dist/_chunks/{calendar-waiting-list-panel-BKBHfBpn.js → calendar-waiting-list-panel-CyMTv2y3.js} +7 -7
  13. package/dist/_chunks/{calendar-workspace.model-4zmA3BFE.js → calendar-workspace.model-X3aXbDTo.js} +2 -2
  14. package/dist/_chunks/{calendar.sheets-lgAqJB34.js → calendar.sheets-C8x8kPb4.js} +10 -10
  15. package/dist/_chunks/{calls-panel-BTTfHnPD.js → calls-panel-Bpemmnpd.js} +4 -4
  16. package/dist/_chunks/{care-plan-card-2U2LuIJD.js → care-plan-card-DJXNWjKB.js} +3 -3
  17. package/dist/_chunks/{care-plan-entry-card-CUAlQv1c.js → care-plan-entry-card-W5QvNv8m.js} +2 -2
  18. package/dist/_chunks/{communications-panel-DDzUyoHi.js → communications-panel-Cd0TBEhL.js} +2 -2
  19. package/dist/_chunks/{control-room-rail-BQvaYowi.js → control-room-rail-4W1MFY-g.js} +3 -3
  20. package/dist/_chunks/{document-preview-oSuJsJ3k.js → document-preview-Zws6CHhK.js} +3 -3
  21. package/dist/_chunks/{editable-description-BsSjLnSx.js → editable-description-B2F54K4T.js} +34 -33
  22. package/dist/_chunks/{entity-summary-CZmGcWi2.js → entity-summary-BNnTP1F6.js} +62 -50
  23. package/dist/_chunks/feature-preview-switch-PKeLaFry.js +75 -0
  24. package/dist/_chunks/{file-manager-Cp3Z4VvM.js → file-manager-DzOCQBAO.js} +163 -178
  25. package/dist/_chunks/folder-CH9PJHou.js +36 -0
  26. package/dist/_chunks/{help-me-write-templates-DlA54nu5.js → help-me-write-templates-B_wMJ82X.js} +2 -2
  27. package/dist/_chunks/message-square-warning-DsGGfd0K.js +22 -0
  28. package/dist/_chunks/{notes-panel-Cw06dLDm.js → notes-panel-BguRX8VC.js} +374 -341
  29. package/dist/_chunks/{optical-prescription-DZvauMiM.js → optical-prescription-BzGnlIjq.js} +2 -2
  30. package/dist/_chunks/{panel-header-CbtlTe85.js → panel-header-DTc5OFUg.js} +78 -66
  31. package/dist/_chunks/{panel-subview-DjBwNV16.js → panel-subview-Om_yZvFG.js} +2 -2
  32. package/dist/_chunks/{patient-account-settings-Do0QbDJe.js → patient-account-settings-YKnBzmwE.js} +3 -3
  33. package/dist/_chunks/{patient-check-in-resume-Bxy1_Pfo.js → patient-check-in-resume-DERfQbp5.js} +5 -5
  34. package/dist/_chunks/{patient-details-Cj3dp9GB.js → patient-details-BUD0UbmT.js} +3 -3
  35. package/dist/_chunks/{patient-field-row-DDjsUsc_.js → patient-field-row-DytaHdGw.js} +201 -200
  36. package/dist/_chunks/{patient-summary-card-roM9Esfb.js → patient-summary-card-7Werxl48.js} +126 -139
  37. package/dist/_chunks/{payment-request-card-C9VglWsV.js → payment-request-card-BF3rakTQ.js} +2 -2
  38. package/dist/_chunks/{portal-details-CKF4yFHs.js → portal-details-C1QQGPQf.js} +3 -3
  39. package/dist/_chunks/{portal-documents-DvpAwmSI.js → portal-documents-CzEuCaqv.js} +3 -3
  40. package/dist/_chunks/{portal-parts-Cvu4PfIY.js → portal-parts-BMW4t57s.js} +2 -2
  41. package/dist/_chunks/{privacy-mask-zVh0ntm0.js → privacy-mask-CrjD5PYW.js} +2 -2
  42. package/dist/_chunks/{radiograph-panel.agent-BUZPsuSP.js → radiograph-panel.agent-Kl1M0dtT.js} +3 -3
  43. package/dist/_chunks/{registry-connection-panel-ACOsXu3F.js → registry-connection-panel-kdKbGQE6.js} +3 -3
  44. package/dist/_chunks/{reserved.agent-DjvapRF1.js → reserved.agent-CW0frsMv.js} +2 -2
  45. package/dist/_chunks/{reviews-panel-Cw5ygAxs.js → reviews-panel-54AFY6uy.js} +2 -2
  46. package/dist/_chunks/{rich-text-editor-eGdYDPK2.js → rich-text-editor-DCQEpaIv.js} +1398 -1280
  47. package/dist/_chunks/{task-editor-C-4I2sBa.js → task-editor-CIHQQRtP.js} +5 -5
  48. package/dist/_chunks/{tasks-panel-BDPQPOP6.js → tasks-panel-Bc_odkQN.js} +2 -2
  49. package/dist/_chunks/text-area-DbxGkpzE.js +269 -0
  50. package/dist/_chunks/{tool-rail-DjPEiBa2.js → tool-rail-CJBtqzMs.js} +337 -320
  51. package/dist/_chunks/{transaction-chip-CkYd-3ky.js → transaction-chip-6jToArJn.js} +45 -43
  52. package/dist/_chunks/{transcript-panel-Wr8e4Zgi.js → transcript-panel-Dc0fK4WO.js} +2 -2
  53. package/dist/_chunks/{treatment-receipt-BZzwvsnY.js → treatment-receipt-B6m47Jie.js} +44 -46
  54. package/dist/_chunks/{use-appointment-details-read-Bl1DHXQ2.js → use-appointment-details-read-HVHbR0Zl.js} +769 -745
  55. package/dist/agent-catalog.json +15 -1
  56. package/dist/appointment-editor-panel/index.js +4 -4
  57. package/dist/booking-tools-data/index.js +1 -1
  58. package/dist/browser-support.js +1 -1
  59. package/dist/calendar-action-buttons/index.js +1 -1
  60. package/dist/components/_shared/appointment-format.d.ts +4 -0
  61. package/dist/components/_shared/patient-field-row.d.ts +5 -1
  62. package/dist/components/ai-summary-panel/index.js +1 -1
  63. package/dist/components/appointment-card/index.js +2 -2
  64. package/dist/components/appointment-details-panel/appointment-details-panel.d.ts +5 -2
  65. package/dist/components/appointment-details-panel/appointment-details-panel.sections.d.ts +3 -1
  66. package/dist/components/appointment-details-panel/appointment-details-panel.types.d.ts +3 -0
  67. package/dist/components/appointment-details-panel/index.js +2 -2
  68. package/dist/components/appointment-peek/appointment-peek.d.ts +45 -1
  69. package/dist/components/appointment-peek/index.js +1 -1
  70. package/dist/components/appointment-timeline/index.js +1 -1
  71. package/dist/components/booking/index.js +1 -1
  72. package/dist/components/calls-panel/index.js +1 -1
  73. package/dist/components/care-plan-card/index.js +1 -1
  74. package/dist/components/care-plan-entry-card/index.js +1 -1
  75. package/dist/components/communications-panel/index.js +1 -1
  76. package/dist/components/control-room-rail/index.js +1 -1
  77. package/dist/components/document-preview/index.js +1 -1
  78. package/dist/components/editable-description/editable-description.d.ts +7 -0
  79. package/dist/components/editable-description/index.js +1 -1
  80. package/dist/components/entity-summary/index.js +1 -1
  81. package/dist/components/feature-preview-switch/feature-preview-switch.d.ts +55 -0
  82. package/dist/components/feature-preview-switch/index.d.ts +2 -0
  83. package/dist/components/feature-preview-switch/index.js +5 -0
  84. package/dist/components/file-manager/index.js +1 -1
  85. package/dist/components/index.d.ts +1 -0
  86. package/dist/components/notes-panel/index.js +1 -1
  87. package/dist/components/notes-panel/notes-panel.d.ts +20 -0
  88. package/dist/components/optical-prescription/index.js +1 -1
  89. package/dist/components/panel-header/index.js +1 -1
  90. package/dist/components/panel-header/panel-header.d.ts +8 -0
  91. package/dist/components/panel-subview/index.js +1 -1
  92. package/dist/components/patient-details/index.js +1 -1
  93. package/dist/components/patient-summary-card/index.js +1 -1
  94. package/dist/components/patient-summary-card/patient-summary-card.d.ts +9 -0
  95. package/dist/components/patient-table/index.js +1 -1
  96. package/dist/components/payment-card/index.js +1 -1
  97. package/dist/components/radiograph-panel/index.js +1 -1
  98. package/dist/components/registry-connection-panel/index.js +1 -1
  99. package/dist/components/reviews-panel/index.js +1 -1
  100. package/dist/components/rich-text-editor/editor-toolbar.d.ts +4 -1
  101. package/dist/components/rich-text-editor/index.js +1 -1
  102. package/dist/components/task-editor/index.js +1 -1
  103. package/dist/components/tasks-panel/index.js +1 -1
  104. package/dist/components/text-area/index.js +1 -1
  105. package/dist/components/text-area/text-area.d.ts +15 -0
  106. package/dist/components/tool-rail/index.js +1 -1
  107. package/dist/components/tool-rail/tool-rail.d.ts +12 -1
  108. package/dist/components/transaction-chip/index.js +1 -1
  109. package/dist/components/transaction-chip/transaction-chip.d.ts +7 -0
  110. package/dist/components/transcript-panel/index.js +1 -1
  111. package/dist/components/treatment-receipt/index.js +1 -1
  112. package/dist/core.css +1 -1
  113. package/dist/find-free-slots-panel/index.js +1 -1
  114. package/dist/host-legacy.css +51 -4
  115. package/dist/i18n/locales/ar.d.ts +9 -0
  116. package/dist/i18n/locales/ar.js +8 -2
  117. package/dist/i18n/locales/de.d.ts +9 -0
  118. package/dist/i18n/locales/de.js +8 -2
  119. package/dist/i18n/locales/el.d.ts +9 -0
  120. package/dist/i18n/locales/el.js +10 -1
  121. package/dist/i18n/locales/en.d.ts +9 -0
  122. package/dist/i18n/locales/en.js +11 -2
  123. package/dist/i18n/locales/es.d.ts +9 -0
  124. package/dist/i18n/locales/es.js +10 -1
  125. package/dist/i18n/locales/fr.d.ts +9 -0
  126. package/dist/i18n/locales/fr.js +10 -1
  127. package/dist/i18n/locales/hi.d.ts +9 -0
  128. package/dist/i18n/locales/hi.js +8 -2
  129. package/dist/i18n/locales/it.d.ts +19 -10
  130. package/dist/i18n/locales/it.js +20 -11
  131. package/dist/i18n/locales/ja.d.ts +9 -0
  132. package/dist/i18n/locales/ja.js +8 -2
  133. package/dist/i18n/locales/nl.d.ts +9 -0
  134. package/dist/i18n/locales/nl.js +8 -2
  135. package/dist/i18n/locales/pl.d.ts +9 -0
  136. package/dist/i18n/locales/pl.js +10 -1
  137. package/dist/i18n/locales/pt.d.ts +9 -0
  138. package/dist/i18n/locales/pt.js +10 -1
  139. package/dist/i18n/locales/ro.d.ts +9 -0
  140. package/dist/i18n/locales/ro.js +10 -1
  141. package/dist/i18n/locales/ru.d.ts +9 -0
  142. package/dist/i18n/locales/ru.js +8 -2
  143. package/dist/i18n/locales/sq.d.ts +9 -0
  144. package/dist/i18n/locales/sq.js +10 -1
  145. package/dist/i18n/locales/sv.d.ts +9 -0
  146. package/dist/i18n/locales/sv.js +8 -2
  147. package/dist/i18n/locales/tr.d.ts +9 -0
  148. package/dist/i18n/locales/tr.js +8 -2
  149. package/dist/i18n/locales/zh.d.ts +9 -0
  150. package/dist/i18n/locales/zh.js +8 -2
  151. package/dist/index.js +775 -773
  152. package/dist/locales/ar.json +10 -1
  153. package/dist/locales/de.json +10 -1
  154. package/dist/locales/el.json +10 -1
  155. package/dist/locales/en.json +11 -2
  156. package/dist/locales/es.json +10 -1
  157. package/dist/locales/fr.json +10 -1
  158. package/dist/locales/hi.json +10 -1
  159. package/dist/locales/it.json +20 -11
  160. package/dist/locales/ja.json +10 -1
  161. package/dist/locales/nl.json +10 -1
  162. package/dist/locales/pl.json +10 -1
  163. package/dist/locales/pt.json +10 -1
  164. package/dist/locales/ro.json +10 -1
  165. package/dist/locales/ru.json +10 -1
  166. package/dist/locales/sq.json +10 -1
  167. package/dist/locales/sv.json +10 -1
  168. package/dist/locales/tr.json +10 -1
  169. package/dist/locales/zh.json +10 -1
  170. package/dist/online-bookings-panel/index.js +2 -2
  171. package/dist/patterns/anamnesis/index.js +1 -1
  172. package/dist/patterns/calendar/index.js +4 -4
  173. package/dist/patterns/help-me-write-templates/index.js +1 -1
  174. package/dist/patterns/patient-account-settings/index.js +1 -1
  175. package/dist/patterns/patient-check-in/index.js +1 -1
  176. package/dist/patterns/patient-portal/index.js +2 -2
  177. package/dist/tokens.css +1 -1
  178. package/dist/waiting-list-panel/index.js +3 -3
  179. package/package.json +5 -1
  180. package/dist/_chunks/appointment-peek-B3raO90X.js +0 -123
  181. package/dist/_chunks/contact-round-DiSvB3LP.js +0 -18
  182. package/dist/_chunks/folder-BghC8_S2.js +0 -20
  183. package/dist/_chunks/text-area-COMVJ1yE.js +0 -258
@@ -1,30 +1,31 @@
1
- import { jsxs as b, jsx as a, Fragment as Dn } from "react/jsx-runtime";
2
- import { forwardRef as _n, useRef as u, useState as T, useId as Mn, useEffect as S, useCallback as W, useMemo as wt, useImperativeHandle as zn } from "react";
3
- import { c as Nt } from "./index-D2ZczOXr.js";
4
- import { useTranslation as Hn } from "react-i18next";
5
- import { g as yt } from "./get-error-message-DbFUzuja.js";
6
- import { useSaveOutcomeUnknownMessage as Wn, isSaveOutcomeUnknownError as Me } from "../save-outcome/index.js";
7
- import { h as At } from "./handled-rejection-C-6Dq0As.js";
8
- import { u as $n } from "./registry-DvAUVLHh.js";
9
- import { C as Bn } from "./clinical-note-card-D-9xmRpf.js";
10
- import { R as Kn } from "./rich-text-editor-eGdYDPK2.js";
11
- import { T as Un } from "./text-area-COMVJ1yE.js";
1
+ import { jsxs as y, jsx as a, Fragment as $n } from "react/jsx-runtime";
2
+ import { forwardRef as Bn, useRef as u, useState as T, useId as Pt, useEffect as S, useCallback as W, useMemo as xt, useImperativeHandle as Kn } from "react";
3
+ import { c as jt } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as Un } from "react-i18next";
5
+ import { g as Tt } from "./get-error-message-DbFUzuja.js";
6
+ import { useSaveOutcomeUnknownMessage as In, isSaveOutcomeUnknownError as He } from "../save-outcome/index.js";
7
+ import { h as Vt } from "./handled-rejection-C-6Dq0As.js";
8
+ import { u as Yn } from "./registry-DvAUVLHh.js";
9
+ import { A as Gn } from "./avatar-Dp5apm1d.js";
10
+ import { C as Jn } from "./clinical-note-card-D-9xmRpf.js";
11
+ import { R as Qn } from "./rich-text-editor-DCQEpaIv.js";
12
+ import { T as Xn } from "./text-area-DbxGkpzE.js";
12
13
  import { A } from "./alert-C4WKViaS.js";
13
14
  import { B as re } from "./button-Dp4j9ygh.js";
14
- import { I as bt } from "./icon-button-u9VMQn3x.js";
15
- import { S as In } from "./switch-DO6uC4HJ.js";
16
- import { T as Yn } from "./tooltip-uEBdD1-5.js";
17
- import { C as Pt } from "./card-n6W6LW-N.js";
18
- import { C as Gn, S as ye } from "./skeleton-tTWJpvAq.js";
15
+ import { I as St } from "./icon-button-u9VMQn3x.js";
16
+ import { S as Zn } from "./switch-DO6uC4HJ.js";
17
+ import { T as er } from "./tooltip-uEBdD1-5.js";
18
+ import { C as Ct } from "./card-n6W6LW-N.js";
19
+ import { C as tr, S as be } from "./skeleton-tTWJpvAq.js";
19
20
  import { D as L } from "./dialog-239Geb7Z.js";
20
- import { P as Jn } from "./panel-header-CbtlTe85.js";
21
- import { a as Qn, u as Xn, R as Zn } from "./use-list-reflow-C7O4Uqnl.js";
22
- import { u as er } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
23
- import { u as tr } from "./use-resolved-theme-B0f1_oyq.js";
24
- import { N as nr } from "./notebook-pen-CO7HoM-W.js";
25
- import { P as rr } from "./pencil-B1sKKyuT.js";
26
- import { T as sr } from "./trash-2-uumy3fy1.js";
27
- const ar = {
21
+ import { P as nr } from "./panel-header-DTc5OFUg.js";
22
+ import { a as rr, u as sr, R as ar } from "./use-list-reflow-C7O4Uqnl.js";
23
+ import { u as ir } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
24
+ import { u as lr } from "./use-resolved-theme-B0f1_oyq.js";
25
+ import { N as or } from "./notebook-pen-CO7HoM-W.js";
26
+ import { P as dr } from "./pencil-B1sKKyuT.js";
27
+ import { T as cr } from "./trash-2-uumy3fy1.js";
28
+ const ur = {
28
29
  id: "notes-panel",
29
30
  // 'submit' backs add_note (compose + commit a note). pin / flag are toggles
30
31
  // with no dedicated capability in the closed vocabulary.
@@ -139,7 +140,7 @@ const ar = {
139
140
  description: "Stable note id on each rendered note row. Row controls carry data-note-action: edit, delete, pin or flag."
140
141
  }
141
142
  }
142
- }, ir = "ds:isolate ds:[&_[data-component=card]>*]:relative ds:[&_[data-component=card]>*]:z-[1]", lr = Nt(
143
+ }, fr = "ds:isolate ds:[&_[data-component=card]>*]:relative ds:[&_[data-component=card]>*]:z-[1]", gr = jt(
143
144
  "ds:relative ds:flex ds:flex-col ds:rounded-[var(--radius-lg)]",
144
145
  {
145
146
  variants: {
@@ -147,11 +148,11 @@ const ar = {
147
148
  true: "ds:focus:outline-[length:var(--focus-ring-width)] ds:focus:outline-solid ds:focus:outline-[color:var(--ring)] ds:focus:outline-offset-[length:var(--focus-ring-offset)]",
148
149
  false: ""
149
150
  },
150
- washed: { true: ir, false: "" }
151
+ washed: { true: fr, false: "" }
151
152
  },
152
153
  defaultVariants: { current: !1, washed: !1 }
153
154
  }
154
- ), xt = Nt(
155
+ ), Et = jt(
155
156
  "ds:pointer-events-none ds:absolute ds:inset-0 ds:rounded-[var(--radius-lg)] ds:bg-[color:var(--accent)]",
156
157
  {
157
158
  variants: {
@@ -167,39 +168,39 @@ const ar = {
167
168
  }
168
169
  }
169
170
  }
170
- ), Ft = [
171
+ ), Lt = [
171
172
  "ds:rounded-[var(--radius-lg)] ds:outline-none",
172
173
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
173
174
  "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
174
- ].join(" "), or = ["ds:flex ds:flex-col", Ft].join(" "), dr = "ds:opacity-0", cr = [
175
+ ].join(" "), hr = ["ds:flex ds:flex-col", Lt].join(" "), pr = "ds:opacity-0", mr = [
175
176
  "ds:transition-opacity ds:duration-[var(--animation-duration)]",
176
177
  "ds:ease-[var(--ease-out)] ds:motion-reduce:transition-none"
177
- ].join(" "), ur = [3, 2, 3];
178
- function Tt(o) {
178
+ ].join(" "), vr = [3, 2, 3];
179
+ function Rt(o) {
179
180
  return o ? /<img\b/i.test(o) ? !0 : o.replace(/<[^>]*>/g, "").replace(/&nbsp;/gi, " ").trim().length > 0 : !1;
180
181
  }
181
- function St(o, f, y) {
182
- const v = o == null ? void 0 : o.toggle(f, y), w = v ? v.refusal : "the panel is not mounted";
183
- return w === void 0 ? v == null ? void 0 : v.result : At(new Error(`NotesPanel: ${y} refused (${w}).`));
182
+ function kt(o, f, b) {
183
+ const v = o == null ? void 0 : o.toggle(f, b), w = v ? v.refusal : "the panel is not mounted";
184
+ return w === void 0 ? v == null ? void 0 : v.result : Vt(new Error(`NotesPanel: ${b} refused (${w}).`));
184
185
  }
185
- const Ct = /* @__PURE__ */ new Map(), Et = /* @__PURE__ */ new Set();
186
- function be(o) {
186
+ const Nt = /* @__PURE__ */ new Map(), At = /* @__PURE__ */ new Set();
187
+ function Pe(o) {
187
188
  return o.map(
188
189
  (f) => `${f.id ?? ""}:${f.pinned ? 1 : 0}${f.flagged ? 1 : 0}${f.deleted ? 1 : 0}`
189
190
  ).join("|");
190
191
  }
191
- function Rt(o) {
192
+ function Ft(o) {
192
193
  return typeof (o == null ? void 0 : o.then) == "function";
193
194
  }
194
- function kt(o, f, y) {
195
- const v = o.indexOf(y);
195
+ function Ot(o, f, b) {
196
+ const v = o.indexOf(b);
196
197
  if (v >= 0) return v;
197
- const w = f.indexOf(y);
198
+ const w = f.indexOf(b);
198
199
  if (w < 0) return -1;
199
200
  const se = new Set(o);
200
201
  return f.slice(0, w).filter((C) => se.has(C)).length;
201
202
  }
202
- function fr(o) {
203
+ function wr(o) {
203
204
  if (o.hasAttribute("tabindex")) {
204
205
  o.focus();
205
206
  return;
@@ -207,132 +208,135 @@ function fr(o) {
207
208
  const f = () => o.removeAttribute("tabindex");
208
209
  o.setAttribute("tabindex", "-1"), o.focus(), document.activeElement === o ? o.addEventListener("blur", f, { once: !0 }) : f();
209
210
  }
210
- const Mr = _n(
211
+ const Ur = Bn(
211
212
  function({
212
213
  id: f,
213
- notes: y,
214
+ notes: b,
214
215
  onAddNote: v,
215
216
  status: w = "ready",
216
217
  onRetry: se,
217
218
  currentNoteId: C,
218
- currentNoteKey: ze,
219
+ currentNoteKey: We,
219
220
  composer: F = "rich",
220
- editorToolbar: Ot = "standard",
221
- redactor: jt,
222
- imageUploadUrl: Vt,
223
- showClinicalToggle: Lt = !0,
221
+ editorToolbar: qt = "standard",
222
+ redactor: Dt,
223
+ imageUploadUrl: _t,
224
+ editorPlugins: Mt,
225
+ showClinicalToggle: zt = !0,
224
226
  canAddClinicalNote: ae = !0,
225
- clinicalGatedReason: qt,
227
+ clinicalGatedReason: Ht,
226
228
  defaultClinical: $ = !1,
227
- onRequestAiDraft: Dt,
228
- aiDraftFormat: _t,
229
- aiPrivacyNotice: Mt,
230
- onDictate: zt,
231
- onProofread: Ht,
232
- onAutoFormat: Wt,
233
- aiConsent: $t,
234
- variables: Bt,
235
- validateVariable: Kt,
236
- onVariableValidityChange: Ut,
237
- renderHelpMeWrite: It,
238
- aiTemplates: Yt,
239
- onAiApplied: Gt,
240
- onUploadImage: Jt,
241
- onAiCreditsExhausted: Qt,
242
- showExtensions: Xt,
243
- aiCreditsNotice: Zt,
244
- extensions: en,
245
- extensionContext: tn,
246
- onExtensionRun: nn,
247
- composerBefore: rn,
248
- composerAfter: sn,
249
- onTogglePin: He,
250
- onToggleFlag: We,
251
- noteActions: $e,
229
+ onRequestAiDraft: Wt,
230
+ aiDraftFormat: $t,
231
+ aiPrivacyNotice: Bt,
232
+ onDictate: Kt,
233
+ onProofread: Ut,
234
+ onAutoFormat: It,
235
+ aiConsent: Yt,
236
+ variables: Gt,
237
+ validateVariable: Jt,
238
+ onVariableValidityChange: Qt,
239
+ renderHelpMeWrite: Xt,
240
+ aiTemplates: Zt,
241
+ onAiApplied: en,
242
+ onUploadImage: tn,
243
+ onAiCreditsExhausted: nn,
244
+ showExtensions: rn,
245
+ aiCreditsNotice: sn,
246
+ extensions: an,
247
+ extensionContext: ln,
248
+ onExtensionRun: on,
249
+ composerBefore: dn,
250
+ composerAfter: cn,
251
+ onTogglePin: $e,
252
+ onToggleFlag: Be,
253
+ noteActions: Ke,
252
254
  onEditNote: B,
253
- editClinical: an = !1,
255
+ editClinical: un = !1,
254
256
  onDeleteNote: K,
255
- onWriteError: Be,
256
- confirmDelete: Ke = !0,
257
- title: ln,
258
- composerPlaceholder: on,
259
- addNoteLabel: dn,
260
- emptyState: cn,
261
- className: un,
262
- "aria-label": Pe,
263
- ...fn
264
- }, gn) {
265
- var vt;
266
- const { t: l, i18n: Ue } = Hn("ui"), xe = Wn(), q = u(null), [_, U] = T(""), [ie, le] = T($), [P, Ie] = T(!1), [I, oe] = T(null), [g, Te] = T(null), Ye = u(g);
267
- Ye.current = g;
268
- const Ge = u(!1);
269
- w === "loading" && (Ge.current = !0);
270
- const hn = Ge.current ? Gn : "", pn = ln ?? l("notesPanel.title", { defaultValue: "Notes" }), Je = Mn(), Qe = on ?? l("notesPanel.placeholder", { defaultValue: "Add a note…" }), Xe = g !== null ? l("notesPanel.edit", { defaultValue: "Edit note" }) : l("notesPanel.composerLabel", { defaultValue: "New note" }), mn = F === "rich" ? Tt(_) : _.trim().length > 0, E = u(y);
271
- E.current = y;
272
- const [Y, vn] = T(Ct), R = u(Ct), [wn, yn] = T(Et), G = u(Et), O = u(!0);
257
+ onWriteError: Ue,
258
+ confirmDelete: Ie = !0,
259
+ title: fn,
260
+ patientName: xe,
261
+ patientAvatarSrc: gn,
262
+ composerPlaceholder: hn,
263
+ addNoteLabel: pn,
264
+ emptyState: mn,
265
+ className: vn,
266
+ "aria-label": Te,
267
+ ...wn
268
+ }, yn) {
269
+ var bt;
270
+ const { t: l, i18n: Ye } = Un("ui"), Se = In(), q = u(null), [_, U] = T(""), [ie, le] = T($), [P, Ge] = T(!1), [I, oe] = T(null), [g, Ce] = T(null), Je = u(g);
271
+ Je.current = g;
272
+ const Qe = u(!1);
273
+ w === "loading" && (Qe.current = !0);
274
+ const bn = Qe.current ? tr : "", Pn = fn ?? l("notesPanel.title", { defaultValue: "Notes" }), Xe = Pt(), Ze = Pt(), de = (xe == null ? void 0 : xe.trim()) || void 0, et = hn ?? l("notesPanel.placeholder", { defaultValue: "Add a note…" }), tt = g !== null ? l("notesPanel.edit", { defaultValue: "Edit note" }) : l("notesPanel.composerLabel", { defaultValue: "New note" }), xn = F === "rich" ? Rt(_) : _.trim().length > 0, E = u(b);
275
+ E.current = b;
276
+ const [Y, Tn] = T(Nt), R = u(Nt), [Sn, Cn] = T(At), G = u(At), O = u(!0);
273
277
  S(() => (O.current = !0, () => {
274
278
  O.current = !1;
275
279
  }), []);
276
- const j = u(null), D = u(Be);
277
- D.current = Be;
278
- const Se = W(() => {
280
+ const j = u(null), D = u(Ue);
281
+ D.current = Ue;
282
+ const Ee = W(() => {
279
283
  const e = j.current;
280
284
  return !O.current || !e || e.closest('[hidden],[inert],[aria-hidden="true"]') ? !1 : typeof e.checkVisibility == "function" ? e.checkVisibility() : !0;
281
- }, []), J = u([]), [bn, Pn] = T(0), Ce = W((e) => {
285
+ }, []), J = u([]), [En, Rn] = T(0), Re = W((e) => {
282
286
  if (!O.current) {
283
287
  e(!1);
284
288
  return;
285
289
  }
286
- J.current.push(e), Pn((t) => t + 1);
290
+ J.current.push(e), Rn((t) => t + 1);
287
291
  }, []);
288
292
  S(() => {
289
293
  const e = J.current;
290
294
  J.current = [], e.forEach((t) => t(!0));
291
- }, [bn]), S(
295
+ }, [En]), S(
292
296
  () => () => {
293
297
  const e = J.current;
294
298
  J.current = [], e.forEach((t) => t(!1));
295
299
  },
296
300
  []
297
301
  );
298
- const Ze = (e) => {
302
+ const nt = (e) => {
299
303
  const t = new Map(R.current);
300
- e(t), R.current = t, vn(t);
301
- }, Ee = (e) => {
304
+ e(t), R.current = t, Tn(t);
305
+ }, ke = (e) => {
302
306
  const t = new Set(G.current);
303
- e(t), G.current = t, yn(t);
304
- }, de = (e, t) => {
307
+ e(t), G.current = t, Cn(t);
308
+ }, ce = (e, t) => {
305
309
  var n;
306
310
  return (n = R.current.get(e)) == null ? void 0 : n[t];
307
- }, Q = (e, t, n) => Ze((i) => {
311
+ }, Q = (e, t, n) => nt((i) => {
308
312
  const s = { ...i.get(e) };
309
313
  n ? s[t] = n : delete s[t], Object.keys(s).length > 0 ? i.set(e, s) : i.delete(e);
310
- }), et = (e) => {
314
+ }), rt = (e) => {
311
315
  var t;
312
316
  return e != null && !!((t = R.current.get(e)) != null && t.delete);
313
- }, xn = W(() => {
317
+ }, kn = W(() => {
314
318
  var h;
315
319
  if (!(g !== null ? B : v) || P) return;
316
320
  const t = F === "rich", n = t ? ((h = q.current) == null ? void 0 : h.getHTML()) ?? _ : _.trim();
317
- if (t ? !Tt(n) : !n) return;
321
+ if (t ? !Rt(n) : !n) return;
318
322
  const i = () => {
319
323
  var c;
320
- t && ((c = q.current) == null || c.clear()), U(""), le($), Te(null);
324
+ t && ((c = q.current) == null || c.clear()), U(""), le($), Ce(null);
321
325
  };
322
326
  oe(null);
323
- const s = g, r = (c) => Ce((m) => {
327
+ const s = g, r = (c) => Re((m) => {
324
328
  var k;
325
- const x = m && (s === null || Ye.current === s && E.current.some((ne) => ne.id === s && !ne.deleted));
329
+ const x = m && (s === null || Je.current === s && E.current.some((ne) => ne.id === s && !ne.deleted));
326
330
  x && oe(
327
- Me(c) ? { text: xe, unknown: !0 } : {
328
- text: yt(c, l("notesPanel.addFailed")),
331
+ He(c) ? { text: Se, unknown: !0 } : {
332
+ text: Tt(c, l("notesPanel.addFailed")),
329
333
  unknown: !1
330
334
  }
331
335
  ), (k = D.current) == null || k.call(D, {
332
336
  kind: s !== null ? "edit" : "add",
333
337
  noteId: s ?? void 0,
334
338
  error: c,
335
- shown: x && Se()
339
+ shown: x && Ee()
336
340
  });
337
341
  });
338
342
  let d;
@@ -343,24 +347,24 @@ const Mr = _n(
343
347
  return;
344
348
  }
345
349
  if (!d || typeof d.then != "function") return i();
346
- Ie(!0), Promise.resolve(d).then(i, r).finally(() => Ie(!1));
350
+ Ge(!0), Promise.resolve(d).then(i, r).finally(() => Ge(!1));
347
351
  }, [
348
352
  F,
349
353
  _,
350
354
  ie,
351
355
  $,
352
356
  g,
353
- Ce,
357
+ Re,
354
358
  v,
355
359
  B,
356
- Se,
360
+ Ee,
357
361
  P,
358
- xe,
362
+ Se,
359
363
  l
360
- ]), tt = Lt && (g === null || an), Tn = g !== null && !!((vt = Y.get(g)) != null && vt.delete), ce = W(
364
+ ]), st = zt && (g === null || un), Nn = g !== null && !!((bt = Y.get(g)) != null && bt.delete), ue = W(
361
365
  (e) => {
362
366
  try {
363
- return new Intl.DateTimeFormat(Ue.language, {
367
+ return new Intl.DateTimeFormat(Ye.language, {
364
368
  day: "numeric",
365
369
  month: "long",
366
370
  year: "numeric",
@@ -371,57 +375,57 @@ const Mr = _n(
371
375
  return e.dateIso;
372
376
  }
373
377
  },
374
- [Ue.language]
375
- ), Sn = W(
378
+ [Ye.language]
379
+ ), An = W(
376
380
  (e) => {
377
381
  var n, i, s, r;
378
382
  if (!e.id || P || (n = R.current.get(e.id)) != null && n.delete) return;
379
383
  const t = e.content ?? "";
380
- oe(null), Te(e.id), le(e.clinical ?? !1), U(t), F === "rich" && ((i = q.current) == null || i.clear(), (s = q.current) == null || s.insertAtCursor(t, { asHtml: !0 })), (r = q.current) == null || r.focus();
384
+ oe(null), Ce(e.id), le(e.clinical ?? !1), U(t), F === "rich" && ((i = q.current) == null || i.clear(), (s = q.current) == null || s.insertAtCursor(t, { asHtml: !0 })), (r = q.current) == null || r.focus();
381
385
  },
382
386
  [F, P]
383
- ), ue = W(() => {
387
+ ), fe = W(() => {
384
388
  var e;
385
- F === "rich" && ((e = q.current) == null || e.clear()), U(""), le($), oe(null), Te(null);
386
- }, [F, $]), nt = g === null || y.some((e) => e.id === g && !e.deleted);
389
+ F === "rich" && ((e = q.current) == null || e.clear()), U(""), le($), oe(null), Ce(null);
390
+ }, [F, $]), at = g === null || b.some((e) => e.id === g && !e.deleted);
387
391
  S(() => {
388
- nt || ue();
389
- }, [nt, ue]);
390
- const Re = (e) => {
392
+ at || fe();
393
+ }, [at, fe]);
394
+ const Ne = (e) => {
391
395
  var t, n;
392
396
  return (e.id ? (n = (t = Y.get(e.id)) == null ? void 0 : t.pin) == null ? void 0 : n.next : void 0) ?? !!e.pinned;
393
- }, Cn = (e) => {
397
+ }, Fn = (e) => {
394
398
  var t, n;
395
399
  return (e.id ? (n = (t = Y.get(e.id)) == null ? void 0 : t.flag) == null ? void 0 : n.next : void 0) ?? !!e.flagged;
396
- }, M = y.filter((e) => !e.id || !wn.has(e.id)).sort((e, t) => Number(Re(t)) - Number(Re(e))), rt = M.flatMap((e) => e.id ? [e.id] : []), z = u([]);
397
- z.current = rt.filter(
400
+ }, M = b.filter((e) => !e.id || !Sn.has(e.id)).sort((e, t) => Number(Ne(t)) - Number(Ne(e))), it = M.flatMap((e) => e.id ? [e.id] : []), z = u([]);
401
+ z.current = it.filter(
398
402
  (e) => {
399
403
  var t;
400
404
  return !((t = Y.get(e)) != null && t.delete);
401
405
  }
402
406
  );
403
- const ke = u([]);
404
- ke.current = rt;
405
- const { isAccessible: En } = tr(j), st = En || void 0, { containerRef: Rn } = Qn({
407
+ const Ae = u([]);
408
+ Ae.current = it;
409
+ const { isAccessible: On } = lr(j), lt = On || void 0, { containerRef: jn } = rr({
406
410
  key: M.map((e) => e.id).join(),
407
- reduceMotion: st
408
- }), fe = Xn({ reduceMotion: st }), [p, ge] = T(null), at = u(0), Ne = u(0), it = () => {
409
- Ne.current += 1, ge(null);
410
- }, he = (e, t, n, i = !0) => {
411
- const s = Ne.current;
412
- Ce((r) => {
411
+ reduceMotion: lt
412
+ }), ge = sr({ reduceMotion: lt }), [p, he] = T(null), ot = u(0), Fe = u(0), dt = () => {
413
+ Fe.current += 1, he(null);
414
+ }, pe = (e, t, n, i = !0) => {
415
+ const s = Fe.current;
416
+ Re((r) => {
413
417
  var h;
414
- const d = r && i && s === Ne.current && Se() && E.current.some((c) => c.id === t) && (e === "delete" || !et(t) && !G.current.has(t));
415
- d && (at.current += 1, ge({
418
+ const d = r && i && s === Fe.current && Ee() && E.current.some((c) => c.id === t) && (e === "delete" || !rt(t) && !G.current.has(t));
419
+ d && (ot.current += 1, he({
416
420
  kind: e,
417
421
  noteId: t,
418
- message: yt(n, ""),
419
- unknown: Me(n),
420
- seq: at.current
422
+ message: Tt(n, ""),
423
+ unknown: He(n),
424
+ seq: ot.current
421
425
  })), (h = D.current) == null || h.call(D, { kind: e, noteId: t, error: n, shown: d });
422
426
  });
423
- }, kn = (e) => {
424
- const t = y.find((i) => i.id === e.noteId), n = t != null && t.dateIso ? ce(t) : "";
427
+ }, Vn = (e) => {
428
+ const t = b.find((i) => i.id === e.noteId), n = t != null && t.dateIso ? ue(t) : "";
425
429
  if (n)
426
430
  switch (e.kind) {
427
431
  case "delete":
@@ -447,23 +451,23 @@ const Mr = _n(
447
451
  default:
448
452
  return l("notesPanel.unflagFailed");
449
453
  }
450
- }, pe = p !== null && y.some((e) => e.id === p.noteId), lt = u(null);
451
- p && pe && (lt.current = p), S(() => {
452
- p && !pe && ge(null);
453
- }, [p, pe]);
454
- const [Ae, ot] = T({ text: "", seq: 0 }), Fe = u(void 0), dt = (e) => {
455
- ot((t) => ({ text: e, seq: t.seq + 1 })), window.clearTimeout(Fe.current), Fe.current = window.setTimeout(
456
- () => ot((t) => ({ ...t, text: "" })),
454
+ }, me = p !== null && b.some((e) => e.id === p.noteId), ct = u(null);
455
+ p && me && (ct.current = p), S(() => {
456
+ p && !me && he(null);
457
+ }, [p, me]);
458
+ const [Oe, ut] = T({ text: "", seq: 0 }), je = u(void 0), ft = (e) => {
459
+ ut((t) => ({ text: e, seq: t.seq + 1 })), window.clearTimeout(je.current), je.current = window.setTimeout(
460
+ () => ut((t) => ({ ...t, text: "" })),
457
461
  1e3
458
462
  );
459
463
  };
460
- S(() => () => window.clearTimeout(Fe.current), []);
461
- const ct = () => dt(l("notesPanel.deleted")), me = u(0), ut = u(w);
464
+ S(() => () => window.clearTimeout(je.current), []);
465
+ const gt = () => ft(l("notesPanel.deleted")), ve = u(0), ht = u(w);
462
466
  S(() => {
463
- ut.current === "loading" && w === "ready" && (me.current += 1), ut.current = w;
467
+ ht.current === "loading" && w === "ready" && (ve.current += 1), ht.current = w;
464
468
  }, [w]);
465
- const ft = () => {
466
- const e = E.current, t = be(e), n = new Map(e.map((r) => [r.id, r])), i = [];
469
+ const pt = () => {
470
+ const e = E.current, t = Pe(e), n = new Map(e.map((r) => [r.id, r])), i = [];
467
471
  if (R.current.forEach((r, d) => {
468
472
  const h = n.get(d);
469
473
  Object.keys(r).forEach((c) => {
@@ -474,30 +478,30 @@ const Mr = _n(
474
478
  return;
475
479
  }
476
480
  if (!m.settled) return;
477
- const x = c === "delete" ? h.deleted === !0 : (c === "pin" ? !!h.pinned : !!h.flagged) === m.next, k = me.current > m.edgeAtSettle || c !== "delete" && t !== m.sigAtSettle;
481
+ const x = c === "delete" ? h.deleted === !0 : (c === "pin" ? !!h.pinned : !!h.flagged) === m.next, k = ve.current > m.edgeAtSettle || c !== "delete" && t !== m.sigAtSettle;
478
482
  (x || k) && i.push([d, c]);
479
483
  });
480
484
  }), i.length === 0) return;
481
- Ze(
485
+ nt(
482
486
  (r) => i.forEach(([d, h]) => {
483
487
  const c = { ...r.get(d) };
484
488
  delete c[h], Object.keys(c).length > 0 ? r.set(d, c) : r.delete(d);
485
489
  })
486
490
  );
487
491
  const s = i.filter(([, r]) => r === "delete").map(([r]) => r);
488
- s.some((r) => G.current.has(r)) && Ee((r) => s.forEach((d) => r.delete(d))), s.forEach((r) => fe.cancel(r));
489
- }, Oe = (e, t, n) => de(e, t) !== n ? !1 : (Q(e, t, {
492
+ s.some((r) => G.current.has(r)) && ke((r) => s.forEach((d) => r.delete(d))), s.forEach((r) => ge.cancel(r));
493
+ }, Ve = (e, t, n) => ce(e, t) !== n ? !1 : (Q(e, t, {
490
494
  ...n,
491
495
  settled: !0,
492
- edgeAtSettle: me.current,
493
- sigAtSettle: be(E.current)
494
- }), ft(), !0), gt = (e, t, n) => de(e, t) !== n ? !1 : (Q(e, t, void 0), t !== "delete" || (G.current.has(e) && Ee((i) => i.delete(e)), fe.cancel(e)), !0), Nn = wt(() => be(y), [y]);
496
+ edgeAtSettle: ve.current,
497
+ sigAtSettle: Pe(E.current)
498
+ }), pt(), !0), mt = (e, t, n) => ce(e, t) !== n ? !1 : (Q(e, t, void 0), t !== "delete" || (G.current.has(e) && ke((i) => i.delete(e)), ge.cancel(e)), !0), Ln = xt(() => Pe(b), [b]);
495
499
  S(() => {
496
- ft();
497
- }, [Nn, w]);
498
- const je = (e, t) => {
500
+ pt();
501
+ }, [Ln, w]);
502
+ const Le = (e, t) => {
499
503
  var k, ne;
500
- const n = t === "pin" ? He : We, i = (N) => ({
504
+ const n = t === "pin" ? $e : Be, i = (N) => ({
501
505
  started: !1,
502
506
  refusal: N
503
507
  });
@@ -515,14 +519,14 @@ const Mr = _n(
515
519
  if (r != null && r[t])
516
520
  return i(`a ${t} write for this note is still pending`);
517
521
  const d = !(t === "pin" ? s.pinned : s.flagged), h = t === "pin" ? d ? "pin" : "unpin" : d ? "flag" : "unflag";
518
- it();
522
+ dt();
519
523
  let c;
520
524
  try {
521
525
  c = n(e, d);
522
526
  } catch (N) {
523
- return he(h, e, N), { started: !1, result: At(N) };
527
+ return pe(h, e, N), { started: !1, result: Vt(N) };
524
528
  }
525
- if (!Rt(c)) return { started: !0, result: c };
529
+ if (!Ft(c)) return { started: !0, result: c };
526
530
  const m = {
527
531
  next: d,
528
532
  settled: !1,
@@ -533,95 +537,95 @@ const Mr = _n(
533
537
  const x = Promise.resolve(c);
534
538
  return x.then(
535
539
  () => {
536
- O.current && Oe(e, t, m);
540
+ O.current && Ve(e, t, m);
537
541
  },
538
542
  (N) => {
539
- const qn = O.current && (Me(N) ? Oe(e, t, m) : gt(e, t, m));
540
- he(h, e, N, qn);
543
+ const Wn = O.current && (He(N) ? Ve(e, t, m) : mt(e, t, m));
544
+ pe(h, e, N, Wn);
541
545
  }
542
546
  ), { started: !0, result: x };
543
- }, ht = (e) => {
547
+ }, vt = (e) => {
544
548
  var i;
545
549
  if (!K) return !1;
546
550
  const t = E.current.find((s) => s.id === e);
547
- if (!t || t.deleted || ((i = t.actions) == null ? void 0 : i.delete) === !1 || de(e, "delete")) return !1;
548
- it();
551
+ if (!t || t.deleted || ((i = t.actions) == null ? void 0 : i.delete) === !1 || ce(e, "delete")) return !1;
552
+ dt();
549
553
  let n;
550
554
  try {
551
555
  n = K(e);
552
556
  } catch (s) {
553
- return he("delete", e, s), !1;
557
+ return pe("delete", e, s), !1;
554
558
  }
555
- if (Rt(n)) {
559
+ if (Ft(n)) {
556
560
  const s = {
557
561
  settled: !1,
558
562
  edgeAtSettle: 0,
559
563
  sigAtSettle: ""
560
564
  };
561
- Q(e, "delete", s), t.keptOnDelete && dt(
562
- t.dateIso ? l("notesPanel.deletingNamed", { date: ce(t) }) : l("notesPanel.deleting")
565
+ Q(e, "delete", s), t.keptOnDelete && ft(
566
+ t.dateIso ? l("notesPanel.deletingNamed", { date: ue(t) }) : l("notesPanel.deleting")
563
567
  ), Promise.resolve(n).then(
564
568
  () => {
565
- O.current && (ct(), Oe(e, "delete", s));
569
+ O.current && (gt(), Ve(e, "delete", s));
566
570
  },
567
571
  (r) => {
568
- const d = O.current && gt(e, "delete", s);
569
- he("delete", e, r, d);
572
+ const d = O.current && mt(e, "delete", s);
573
+ pe("delete", e, r, d);
570
574
  }
571
575
  );
572
576
  } else
573
577
  Q(e, "delete", {
574
578
  settled: !0,
575
- edgeAtSettle: me.current,
576
- sigAtSettle: be(E.current)
577
- }), ct();
578
- return t.keptOnDelete || fe.leave(e, () => {
579
- de(e, "delete") && Ee((s) => s.add(e));
579
+ edgeAtSettle: ve.current,
580
+ sigAtSettle: Pe(E.current)
581
+ }), gt();
582
+ return t.keptOnDelete || ge.leave(e, () => {
583
+ ce(e, "delete") && ke((s) => s.add(e));
580
584
  }), !0;
581
- }, [X, Z] = T(null), ve = u(null), An = (e) => {
582
- if (!(!K || et(e)) && !(P && g === e)) {
583
- if (!Ke) {
584
- ht(e);
585
+ }, [X, Z] = T(null), we = u(null), qn = (e) => {
586
+ if (!(!K || rt(e)) && !(P && g === e)) {
587
+ if (!Ie) {
588
+ vt(e);
585
589
  return;
586
590
  }
587
- ve.current = { noteId: e, index: -1, started: !1 }, Z(e);
591
+ we.current = { noteId: e, index: -1, started: !1 }, Z(e);
588
592
  }
589
- }, Fn = () => {
593
+ }, Dn = () => {
590
594
  const e = X;
591
595
  if (!e) return;
592
596
  const t = z.current.indexOf(e);
593
- ht(e) && (ve.current = { noteId: e, index: t, started: !0 }), Z(null);
594
- }, Ve = X !== null && y.some((e) => e.id === X && !e.deleted);
597
+ vt(e) && (we.current = { noteId: e, index: t, started: !0 }), Z(null);
598
+ }, qe = X !== null && b.some((e) => e.id === X && !e.deleted);
595
599
  S(() => {
596
- X !== null && !Ve && Z(null);
597
- }, [X, Ve]), zn(gn, () => j.current, []);
600
+ X !== null && !qe && Z(null);
601
+ }, [X, qe]), Kn(yn, () => j.current, []);
598
602
  const V = (e, t) => {
599
603
  var n;
600
604
  return e ? ((n = j.current) == null ? void 0 : n.querySelector(
601
605
  `[data-note-id="${CSS.escape(e)}"] ${t ? `[data-note-action="${CSS.escape(t)}"]` : "[data-note-action]"}`
602
606
  )) ?? null : null;
603
- }, we = (e, t) => {
607
+ }, ye = (e, t) => {
604
608
  const n = z.current;
605
609
  return V(n[e], t) ?? V(n[e - 1], t) ?? V(n[e], null) ?? V(n[e - 1], null);
606
- }, On = () => {
610
+ }, _n = () => {
607
611
  const e = j.current, t = (e == null ? void 0 : e.querySelector("[data-notes-panel-empty]")) ?? e;
608
- t && fr(t);
612
+ t && wr(t);
609
613
  }, ee = (e) => {
610
- e ? e.focus() : On();
611
- }, jn = (e) => {
612
- const t = ve.current;
613
- if (ve.current = null, !t || e.defaultPrevented) return;
614
+ e ? e.focus() : _n();
615
+ }, Mn = (e) => {
616
+ const t = we.current;
617
+ if (we.current = null, !t || e.defaultPrevented) return;
614
618
  e.preventDefault();
615
619
  const n = V(t.noteId, "delete");
616
620
  ee(
617
- t.started ? we(t.index, "delete") ?? n : n
621
+ t.started ? ye(t.index, "delete") ?? n : n
618
622
  );
619
- }, Le = u(null), pt = (e) => {
623
+ }, De = u(null), wt = (e) => {
620
624
  const t = e.kind === "delete" ? "delete" : e.kind.endsWith("pin") ? "pin" : "flag", n = z.current.indexOf(e.noteId);
621
- return V(e.noteId, t) ?? V(e.noteId, null) ?? (n >= 0 ? we(n, t) : null);
622
- }, Vn = (e) => {
625
+ return V(e.noteId, t) ?? V(e.noteId, null) ?? (n >= 0 ? ye(n, t) : null);
626
+ }, zn = (e) => {
623
627
  var t;
624
- (t = Le.current) != null && t.contains(document.activeElement) && ee(pt(e)), ge(null);
628
+ (t = De.current) != null && t.contains(document.activeElement) && ee(wt(e)), he(null);
625
629
  }, H = u(null);
626
630
  S(() => {
627
631
  const e = j.current;
@@ -635,7 +639,7 @@ const Mr = _n(
635
639
  el: s,
636
640
  noteId: r,
637
641
  action: ((h = s.closest("[data-note-action]")) == null ? void 0 : h.dataset.noteAction) ?? null,
638
- index: r ? kt(z.current, ke.current, r) : -1,
642
+ index: r ? Ot(z.current, Ae.current, r) : -1,
639
643
  inWriteError: !!s.closest("[data-notes-panel-write-error]")
640
644
  };
641
645
  }, n = (i) => {
@@ -653,14 +657,14 @@ const Mr = _n(
653
657
  return e.addEventListener("focusin", t), e.addEventListener("focusout", n), () => {
654
658
  e.removeEventListener("focusin", t), e.removeEventListener("focusout", n);
655
659
  };
656
- }, []), er(() => {
660
+ }, []), ir(() => {
657
661
  var i;
658
662
  const e = H.current;
659
663
  if (!e || !j.current) return;
660
664
  if (e.el.isConnected) {
661
- const s = e.noteId ? kt(
665
+ const s = e.noteId ? Ot(
662
666
  z.current,
663
- ke.current,
667
+ Ae.current,
664
668
  e.noteId
665
669
  ) : -1;
666
670
  s >= 0 && (e.index = s);
@@ -672,30 +676,30 @@ const Mr = _n(
672
676
  const n = e.action ? V(e.noteId, e.action) : null;
673
677
  if (n) n.focus();
674
678
  else if (e.noteId)
675
- ee(we(e.index, e.action));
679
+ ee(ye(e.index, e.action));
676
680
  else if (e.el.hasAttribute("data-notes-panel-empty"))
677
- ee(we(0, "delete"));
681
+ ee(ye(0, "delete"));
678
682
  else if (e.inWriteError) {
679
- const s = (i = Le.current) == null ? void 0 : i.querySelector(
683
+ const s = (i = De.current) == null ? void 0 : i.querySelector(
680
684
  "[data-alert-dismiss]"
681
- ), r = lt.current;
682
- s ? s.focus() : ee(r ? pt(r) : null);
685
+ ), r = ct.current;
686
+ s ? s.focus() : ee(r ? wt(r) : null);
683
687
  }
684
688
  });
685
- const qe = u(null);
689
+ const _e = u(null);
686
690
  S(() => {
687
691
  var e, t;
688
- C && ((e = qe.current) == null || e.scrollIntoView({ block: "center" }), (t = qe.current) == null || t.focus());
689
- }, [C, ze]);
692
+ C && ((e = _e.current) == null || e.scrollIntoView({ block: "center" }), (t = _e.current) == null || t.focus());
693
+ }, [C, We]);
690
694
  const te = u(v);
691
695
  te.current = v;
692
- const De = u(ae);
693
- De.current = ae;
694
- const mt = u(C);
695
- mt.current = C;
696
- const _e = u(null);
697
- _e.current = { toggle: je };
698
- const Ln = wt(
696
+ const Me = u(ae);
697
+ Me.current = ae;
698
+ const yt = u(C);
699
+ yt.current = C;
700
+ const ze = u(null);
701
+ ze.current = { toggle: Le };
702
+ const Hn = xt(
699
703
  () => ({
700
704
  // Ids + flags only — never the note body or author (both PHI).
701
705
  getNotes: () => E.current.filter((e) => {
@@ -713,107 +717,136 @@ const Mr = _n(
713
717
  };
714
718
  }),
715
719
  canAddNote: () => !!te.current,
716
- canAddClinical: () => De.current,
717
- getCurrentNoteId: () => mt.current ?? null,
720
+ canAddClinical: () => Me.current,
721
+ getCurrentNoteId: () => yt.current ?? null,
718
722
  addNote: (e) => {
719
723
  var t;
720
- if (!(e.clinical && !De.current))
724
+ if (!(e.clinical && !Me.current))
721
725
  return (t = te.current) == null ? void 0 : t.call(te, e);
722
726
  },
723
- togglePin: (e) => St(_e.current, e, "pin"),
724
- toggleFlag: (e) => St(_e.current, e, "flag")
727
+ togglePin: (e) => kt(ze.current, e, "pin"),
728
+ toggleFlag: (e) => kt(ze.current, e, "flag")
725
729
  }),
726
730
  []
727
731
  );
728
- return $n(ar, Ln, f), /* @__PURE__ */ b(
732
+ return Yn(ur, Hn, f), /* @__PURE__ */ y(
729
733
  "section",
730
734
  {
731
735
  ref: j,
732
736
  "data-component": "notes-panel",
733
737
  "data-component-id": f,
734
- "aria-labelledby": Pe ? void 0 : Je,
735
- "aria-label": Pe,
736
- className: [or, un].filter(Boolean).join(" "),
737
- ...fn,
738
+ "aria-labelledby": Te ? void 0 : Xe,
739
+ "aria-label": Te,
740
+ "aria-describedby": de ? Ze : void 0,
741
+ className: [hr, vn].filter(Boolean).join(" "),
742
+ ...wn,
738
743
  children: [
739
744
  /* @__PURE__ */ a(
740
- Jn,
745
+ nr,
741
746
  {
742
- title: pn,
743
- icon: /* @__PURE__ */ a(nr, { "aria-hidden": "true" }),
744
- headingId: Pe ? void 0 : Je,
747
+ title: Pn,
748
+ icon: /* @__PURE__ */ a(or, { "aria-hidden": "true" }),
749
+ headingId: Te ? void 0 : Xe,
750
+ subtitle: de ? (
751
+ /* The kit's one way to show a person: avatar, then name. The
752
+ name is the text; the avatar repeats it, so it is hidden
753
+ from assistive technology. */
754
+ /* @__PURE__ */ y("span", { className: "ds:inline-flex ds:max-w-full ds:items-center ds:gap-[var(--spacing-xs)]", children: [
755
+ /* @__PURE__ */ a(
756
+ Gn,
757
+ {
758
+ size: "xs",
759
+ name: de,
760
+ src: gn,
761
+ "aria-hidden": "true",
762
+ className: "ds:shrink-0"
763
+ }
764
+ ),
765
+ /* @__PURE__ */ a(
766
+ "span",
767
+ {
768
+ "data-slot": "patient-name",
769
+ dir: "auto",
770
+ className: "ds:min-w-0 ds:[overflow-wrap:anywhere]",
771
+ children: de
772
+ }
773
+ )
774
+ ] })
775
+ ) : void 0,
776
+ subtitleId: Ze,
745
777
  sticky: !0,
746
778
  divider: !0
747
779
  }
748
780
  ),
749
- /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
750
- v || g !== null ? /* @__PURE__ */ b(
781
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
782
+ v || g !== null ? /* @__PURE__ */ y(
751
783
  "div",
752
784
  {
753
785
  "data-notes-panel-composer": g !== null ? "edit" : "add",
754
786
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
755
787
  children: [
756
- rn,
788
+ dn,
757
789
  F === "rich" ? /* @__PURE__ */ a(
758
- Kn,
790
+ Qn,
759
791
  {
760
792
  ref: q,
761
- ariaLabel: Xe,
762
- placeholder: Qe,
763
- toolbar: Ot,
793
+ ariaLabel: tt,
794
+ placeholder: et,
795
+ toolbar: qt,
764
796
  minHeight: "fill",
765
- redactor: jt,
766
- imageUploadUrl: Vt,
797
+ redactor: Dt,
798
+ imageUploadUrl: _t,
799
+ plugins: Mt,
767
800
  readOnly: P,
768
801
  onChange: ({ html: e }) => U(e),
769
- onRequestAiDraft: Dt,
770
- aiDraftFormat: _t,
771
- aiPrivacyNotice: Mt,
772
- onDictate: zt,
773
- onProofread: Ht,
774
- onAutoFormat: Wt,
775
- aiConsent: $t,
776
- variables: Bt,
777
- validateVariable: Kt,
778
- onVariableValidityChange: Ut,
779
- renderHelpMeWrite: It,
780
- aiTemplates: Yt,
781
- onAiApplied: Gt,
782
- onUploadImage: Jt,
783
- onAiCreditsExhausted: Qt,
784
- showExtensions: Xt,
785
- aiCreditsNotice: Zt,
786
- extensions: en,
787
- extensionContext: tn,
788
- onExtensionRun: nn,
802
+ onRequestAiDraft: Wt,
803
+ aiDraftFormat: $t,
804
+ aiPrivacyNotice: Bt,
805
+ onDictate: Kt,
806
+ onProofread: Ut,
807
+ onAutoFormat: It,
808
+ aiConsent: Yt,
809
+ variables: Gt,
810
+ validateVariable: Jt,
811
+ onVariableValidityChange: Qt,
812
+ renderHelpMeWrite: Xt,
813
+ aiTemplates: Zt,
814
+ onAiApplied: en,
815
+ onUploadImage: tn,
816
+ onAiCreditsExhausted: nn,
817
+ showExtensions: rn,
818
+ aiCreditsNotice: sn,
819
+ extensions: an,
820
+ extensionContext: ln,
821
+ onExtensionRun: on,
789
822
  aiConsentHeadingLevel: 3
790
823
  }
791
824
  ) : /* @__PURE__ */ a(
792
- Un,
825
+ Xn,
793
826
  {
794
827
  value: _,
795
828
  readOnly: P,
796
829
  onChange: (e) => U(e.target.value),
797
- placeholder: Qe,
830
+ placeholder: et,
798
831
  autoResize: !0,
799
832
  minRows: 2,
800
833
  maxRows: 6,
801
- "aria-label": Xe
834
+ "aria-label": tt
802
835
  }
803
836
  ),
804
- /* @__PURE__ */ b(
837
+ /* @__PURE__ */ y(
805
838
  "div",
806
839
  {
807
840
  className: [
808
841
  "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
809
- tt ? "ds:justify-between" : "ds:justify-end"
842
+ st ? "ds:justify-between" : "ds:justify-end"
810
843
  ].join(" "),
811
844
  children: [
812
- tt ? (() => {
813
- const e = P || !ae, t = ae ? void 0 : qt ?? l("notesPanel.clinicalGated", {
845
+ st ? (() => {
846
+ const e = P || !ae, t = ae ? void 0 : Ht ?? l("notesPanel.clinicalGated", {
814
847
  defaultValue: "You do not have permission to write clinical notes."
815
848
  }), n = /* @__PURE__ */ a(
816
- In,
849
+ Zn,
817
850
  {
818
851
  size: "sm",
819
852
  label: l("notesPanel.clinicalToggle", {
@@ -824,16 +857,16 @@ const Mr = _n(
824
857
  disabled: e
825
858
  }
826
859
  );
827
- return e && t ? /* @__PURE__ */ a(Yn, { label: t, children: /* @__PURE__ */ a("span", { tabIndex: 0, children: n }) }) : n;
860
+ return e && t ? /* @__PURE__ */ a(er, { label: t, children: /* @__PURE__ */ a("span", { tabIndex: 0, children: n }) }) : n;
828
861
  })() : null,
829
- /* @__PURE__ */ b("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
862
+ /* @__PURE__ */ y("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
830
863
  g !== null ? /* @__PURE__ */ a(
831
864
  re,
832
865
  {
833
866
  type: "button",
834
867
  size: "sm",
835
868
  intent: "ghost",
836
- onClick: ue,
869
+ onClick: fe,
837
870
  disabled: P,
838
871
  children: l("notesPanel.cancelEdit", { defaultValue: "Cancel" })
839
872
  }
@@ -843,10 +876,10 @@ const Mr = _n(
843
876
  {
844
877
  type: "button",
845
878
  size: "sm",
846
- onClick: xn,
847
- disabled: !mn || Tn,
879
+ onClick: kn,
880
+ disabled: !xn || Nn,
848
881
  loading: P,
849
- children: g !== null ? l("notesPanel.saveEdit", { defaultValue: "Save note" }) : dn ?? l("notesPanel.add", { defaultValue: "Add note" })
882
+ children: g !== null ? l("notesPanel.saveEdit", { defaultValue: "Save note" }) : pn ?? l("notesPanel.add", { defaultValue: "Add note" })
850
883
  }
851
884
  )
852
885
  ] })
@@ -863,7 +896,7 @@ const Mr = _n(
863
896
  children: /* @__PURE__ */ a(A.Description, { children: I.text })
864
897
  }
865
898
  ) : null,
866
- sn
899
+ cn
867
900
  ]
868
901
  }
869
902
  ) : null,
@@ -871,7 +904,7 @@ const Mr = _n(
871
904
  /* Note-shaped placeholders, not a spinner: the reader sees where
872
905
  the notes will land and how many to expect. The status text is
873
906
  for assistive tech only; sighted readers get the motion. */
874
- /* @__PURE__ */ b(
907
+ /* @__PURE__ */ y(
875
908
  "div",
876
909
  {
877
910
  "data-notes-panel-loading": "",
@@ -879,19 +912,19 @@ const Mr = _n(
879
912
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
880
913
  children: [
881
914
  /* @__PURE__ */ a("span", { role: "status", className: "ds:sr-only", children: l("notesPanel.loading") }),
882
- ur.map((e, t) => /* @__PURE__ */ a(Pt, { variant: "elevated", "aria-hidden": "true", children: /* @__PURE__ */ a(Pt.Body, { children: /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
883
- /* @__PURE__ */ b("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
915
+ vr.map((e, t) => /* @__PURE__ */ a(Ct, { variant: "elevated", "aria-hidden": "true", children: /* @__PURE__ */ a(Ct.Body, { children: /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
916
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
884
917
  /* @__PURE__ */ a(
885
- ye,
918
+ be,
886
919
  {
887
920
  variant: "circular",
888
921
  size: "sm",
889
922
  stagger: t * 2
890
923
  }
891
924
  ),
892
- /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
925
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
893
926
  /* @__PURE__ */ a(
894
- ye,
927
+ be,
895
928
  {
896
929
  variant: "text",
897
930
  size: "sm",
@@ -900,7 +933,7 @@ const Mr = _n(
900
933
  }
901
934
  ),
902
935
  /* @__PURE__ */ a(
903
- ye,
936
+ be,
904
937
  {
905
938
  variant: "text",
906
939
  size: "sm",
@@ -911,7 +944,7 @@ const Mr = _n(
911
944
  ] })
912
945
  ] }),
913
946
  /* @__PURE__ */ a(
914
- ye,
947
+ be,
915
948
  {
916
949
  variant: "text",
917
950
  size: "sm",
@@ -923,24 +956,24 @@ const Mr = _n(
923
956
  ]
924
957
  }
925
958
  )
926
- ) : w === "error" ? /* @__PURE__ */ b(A, { variant: "error", children: [
959
+ ) : w === "error" ? /* @__PURE__ */ y(A, { variant: "error", children: [
927
960
  /* @__PURE__ */ a(A.Description, { children: l("notesPanel.loadError") }),
928
961
  se ? /* @__PURE__ */ a(A.Action, { children: /* @__PURE__ */ a(re, { intent: "secondary", size: "sm", onClick: se, children: l("notesPanel.retry") }) }) : null
929
962
  ] }) : null,
930
- p && pe ? /* @__PURE__ */ b(
963
+ p && me ? /* @__PURE__ */ y(
931
964
  A,
932
965
  {
933
- ref: Le,
966
+ ref: De,
934
967
  variant: p.unknown ? "warning" : "error",
935
968
  announce: p.unknown ? "assertive" : void 0,
936
969
  dismissible: !0,
937
970
  onOpenChange: (e) => {
938
- e || Vn(p);
971
+ e || zn(p);
939
972
  },
940
973
  "data-notes-panel-write-error": p.kind,
941
974
  "data-outcome": p.unknown ? "unknown" : void 0,
942
975
  children: [
943
- p.unknown ? /* @__PURE__ */ a(A.Description, { children: xe }) : /* @__PURE__ */ a(A.Title, { as: "p", children: kn(p) }),
976
+ p.unknown ? /* @__PURE__ */ a(A.Description, { children: Se }) : /* @__PURE__ */ a(A.Title, { as: "p", children: Vn(p) }),
944
977
  !p.unknown && p.message ? /* @__PURE__ */ a(A.Description, { children: p.message }) : null
945
978
  ]
946
979
  },
@@ -953,22 +986,22 @@ const Mr = _n(
953
986
  "aria-atomic": "true",
954
987
  "data-notes-panel-announcer": "",
955
988
  className: "ds:sr-only",
956
- children: Ae.text ? /* @__PURE__ */ a("span", { children: Ae.text }, Ae.seq) : null
989
+ children: Oe.text ? /* @__PURE__ */ a("span", { children: Oe.text }, Oe.seq) : null
957
990
  }
958
991
  ),
959
992
  w === "loading" && M.length > 0 ? /* @__PURE__ */ a("span", { role: "status", className: "ds:sr-only", children: l("notesPanel.loading") }) : null,
960
993
  M.length > 0 ? /* @__PURE__ */ a(
961
994
  "ul",
962
995
  {
963
- ref: Rn,
996
+ ref: jn,
964
997
  "aria-busy": w === "loading" || void 0,
965
- className: `ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0 ${hn}`.trim(),
998
+ className: `ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-0 ${bn}`.trim(),
966
999
  children: M.map(({ actions: e, keptOnDelete: t, ...n }, i) => {
967
- const s = C != null && n.id === C, r = n.id, d = r != null && g === r, h = r != null && fe.isLeaving(r), c = r ? Y.get(r) : void 0, m = !!(c != null && c.delete), x = m && !!t, k = P && d;
968
- return /* @__PURE__ */ b(
1000
+ const s = C != null && n.id === C, r = n.id, d = r != null && g === r, h = r != null && ge.isLeaving(r), c = r ? Y.get(r) : void 0, m = !!(c != null && c.delete), x = m && !!t, k = P && d;
1001
+ return /* @__PURE__ */ y(
969
1002
  "li",
970
1003
  {
971
- ref: s ? qe : void 0,
1004
+ ref: s ? _e : void 0,
972
1005
  "data-note-id": r,
973
1006
  tabIndex: s ? -1 : void 0,
974
1007
  "aria-current": s ? "true" : void 0,
@@ -977,13 +1010,13 @@ const Mr = _n(
977
1010
  "data-editing": d ? "" : void 0,
978
1011
  "aria-busy": x || void 0,
979
1012
  className: [
980
- lr({
1013
+ gr({
981
1014
  current: s,
982
1015
  washed: s || d
983
1016
  }),
984
- cr,
985
- Zn,
986
- h ? dr : ""
1017
+ mr,
1018
+ ar,
1019
+ h ? pr : ""
987
1020
  ].filter(Boolean).join(" "),
988
1021
  children: [
989
1022
  s ? /* @__PURE__ */ a("span", { className: "ds:sr-only", children: l("notesPanel.current", {
@@ -995,35 +1028,35 @@ const Mr = _n(
995
1028
  {
996
1029
  "aria-hidden": "true",
997
1030
  "data-notes-panel-wash": "editing",
998
- className: xt({ state: "editing" })
1031
+ className: Et({ state: "editing" })
999
1032
  }
1000
1033
  ) : s ? /* @__PURE__ */ a(
1001
1034
  "span",
1002
1035
  {
1003
1036
  "aria-hidden": "true",
1004
1037
  "data-notes-panel-wash": "addressed",
1005
- className: xt({ state: "addressed" })
1038
+ className: Et({ state: "addressed" })
1006
1039
  },
1007
- `${C}:${ze ?? ""}`
1040
+ `${C}:${We ?? ""}`
1008
1041
  ) : null,
1009
1042
  /* @__PURE__ */ a(
1010
- Bn,
1043
+ Jn,
1011
1044
  {
1012
1045
  surface: "elevated",
1013
1046
  truncate: !s,
1014
- headerActions: /* @__PURE__ */ b(Dn, { children: [
1015
- $e ? $e(
1047
+ headerActions: /* @__PURE__ */ y($n, { children: [
1048
+ Ke ? Ke(
1016
1049
  { ...n, actions: e, keptOnDelete: t },
1017
1050
  { deleting: m }
1018
1051
  ) : null,
1019
1052
  B && r && !n.deleted && (e == null ? void 0 : e.edit) !== !1 ? /* @__PURE__ */ a(
1020
- bt,
1053
+ St,
1021
1054
  {
1022
- icon: /* @__PURE__ */ a(rr, {}),
1055
+ icon: /* @__PURE__ */ a(dr, {}),
1023
1056
  intent: "ghost",
1024
1057
  size: "sm",
1025
1058
  "aria-label": l("notesPanel.editNamed", {
1026
- date: ce(n),
1059
+ date: ue(n),
1027
1060
  defaultValue: "Edit note · {{date}}"
1028
1061
  }),
1029
1062
  tooltip: l("notesPanel.edit", {
@@ -1033,17 +1066,17 @@ const Mr = _n(
1033
1066
  disabled: P || m,
1034
1067
  "data-notes-panel-edit": "",
1035
1068
  "data-note-action": "edit",
1036
- onClick: () => g === r ? ue() : Sn(n)
1069
+ onClick: () => g === r ? fe() : An(n)
1037
1070
  }
1038
1071
  ) : null,
1039
1072
  K && r && !n.deleted && (e == null ? void 0 : e.delete) !== !1 ? /* @__PURE__ */ a(
1040
- bt,
1073
+ St,
1041
1074
  {
1042
- icon: /* @__PURE__ */ a(sr, {}),
1075
+ icon: /* @__PURE__ */ a(cr, {}),
1043
1076
  intent: "ghost",
1044
1077
  size: "sm",
1045
1078
  "aria-label": l("notesPanel.deleteNamed", {
1046
- date: ce(n),
1079
+ date: ue(n),
1047
1080
  defaultValue: "Delete note · {{date}}"
1048
1081
  }),
1049
1082
  tooltip: l("notesPanel.delete", {
@@ -1052,17 +1085,17 @@ const Mr = _n(
1052
1085
  "data-note-action": "delete",
1053
1086
  "aria-disabled": x || k || void 0,
1054
1087
  "aria-busy": x || void 0,
1055
- onClick: () => An(r)
1088
+ onClick: () => qn(r)
1056
1089
  }
1057
1090
  ) : null
1058
1091
  ] }),
1059
1092
  ...n,
1060
- pinned: Re(n),
1061
- flagged: Cn(n),
1093
+ pinned: Ne(n),
1094
+ flagged: Fn(n),
1062
1095
  pinPending: !!(c != null && c.pin) || m,
1063
1096
  flagPending: !!(c != null && c.flag) || m,
1064
- onTogglePin: He && r && (e == null ? void 0 : e.pin) !== !1 && !n.deleted ? () => je(r, "pin") : void 0,
1065
- onToggleFlag: We && r && (e == null ? void 0 : e.flag) !== !1 && !n.deleted ? () => je(r, "flag") : void 0
1097
+ onTogglePin: $e && r && (e == null ? void 0 : e.pin) !== !1 && !n.deleted ? () => Le(r, "pin") : void 0,
1098
+ onToggleFlag: Be && r && (e == null ? void 0 : e.flag) !== !1 && !n.deleted ? () => Le(r, "flag") : void 0
1066
1099
  }
1067
1100
  )
1068
1101
  ]
@@ -1073,21 +1106,21 @@ const Mr = _n(
1073
1106
  }
1074
1107
  ) : w !== "ready" ? null : (
1075
1108
  /* Where focus lands, from script, when the last note leaves. */
1076
- /* @__PURE__ */ a("div", { "data-notes-panel-empty": "", className: Ft, children: cn ?? /* @__PURE__ */ a("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: l("notesPanel.empty", { defaultValue: "No notes yet." }) }) })
1109
+ /* @__PURE__ */ a("div", { "data-notes-panel-empty": "", className: Lt, children: mn ?? /* @__PURE__ */ a("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: l("notesPanel.empty", { defaultValue: "No notes yet." }) }) })
1077
1110
  )
1078
1111
  ] }),
1079
- K && Ke ? /* @__PURE__ */ a(
1112
+ K && Ie ? /* @__PURE__ */ a(
1080
1113
  L,
1081
1114
  {
1082
1115
  scope: "container",
1083
- open: Ve,
1116
+ open: qe,
1084
1117
  onOpenChange: (e) => !e && Z(null),
1085
- children: /* @__PURE__ */ b(
1118
+ children: /* @__PURE__ */ y(
1086
1119
  L.Content,
1087
1120
  {
1088
1121
  variant: "alert",
1089
1122
  size: "sm",
1090
- onCloseAutoFocus: jn,
1123
+ onCloseAutoFocus: Mn,
1091
1124
  children: [
1092
1125
  /* @__PURE__ */ a(L.Header, { children: /* @__PURE__ */ a(L.Title, { children: l("notesPanel.deleteConfirmTitle", {
1093
1126
  defaultValue: "Delete this note?"
@@ -1095,7 +1128,7 @@ const Mr = _n(
1095
1128
  /* @__PURE__ */ a(L.Body, { children: /* @__PURE__ */ a(L.Description, { children: l("notesPanel.deleteConfirmBody", {
1096
1129
  defaultValue: "The note will be removed from the record."
1097
1130
  }) }) }),
1098
- /* @__PURE__ */ b(L.Footer, { children: [
1131
+ /* @__PURE__ */ y(L.Footer, { children: [
1099
1132
  /* @__PURE__ */ a(L.Close, { asChild: !0, children: /* @__PURE__ */ a(
1100
1133
  re,
1101
1134
  {
@@ -1112,7 +1145,7 @@ const Mr = _n(
1112
1145
  {
1113
1146
  intent: "destructive",
1114
1147
  size: "sm",
1115
- onClick: Fn,
1148
+ onClick: Dn,
1116
1149
  children: l("notesPanel.deleteConfirmAction", {
1117
1150
  defaultValue: "Delete"
1118
1151
  })
@@ -1130,6 +1163,6 @@ const Mr = _n(
1130
1163
  }
1131
1164
  );
1132
1165
  export {
1133
- Mr as N
1166
+ Ur as N
1134
1167
  };
1135
- //# sourceMappingURL=notes-panel-Cw06dLDm.js.map
1168
+ //# sourceMappingURL=notes-panel-BguRX8VC.js.map