@alfadocs/ui-kit 1.66.0 → 1.68.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 (305) hide show
  1. package/dist/_chunks/{address-fields-CJtu7LQU.js → address-fields-BUPRs3n-.js} +3 -3
  2. package/dist/_chunks/{agenda-card-DR9gDdKp.js → agenda-card-BDuvreCe.js} +2 -2
  3. package/dist/_chunks/{agenda-tray-DGB1Zup-.js → agenda-tray-CfwylhWf.js} +3 -3
  4. package/dist/_chunks/ai-credits-exhausted-notice-Bg8NpW2K.js +287 -0
  5. package/dist/_chunks/ai-credits-exhausted-notice.agent-DgTSTgez.js +43 -0
  6. package/dist/_chunks/ai-credits-notice-DQ-r3iQU.js +191 -0
  7. package/dist/_chunks/{ai-permission-notice-DpRmZ9Q3.js → ai-permission-notice-C00i6VhY.js} +2 -2
  8. package/dist/_chunks/{ai-prompt-input-DSGSe4LH.js → ai-prompt-input-DzgyoKyk.js} +141 -139
  9. package/dist/_chunks/{alert-DdDpOi-P.js → alert-9kEwDza3.js} +122 -111
  10. package/dist/_chunks/{alia-sidebar-qe0quZkB.js → alia-sidebar-B06ZSOaF.js} +3 -3
  11. package/dist/_chunks/{anamnesis-summary-card-CMzBLTiN.js → anamnesis-summary-card-DQ3iE1gD.js} +2 -2
  12. package/dist/_chunks/{anamnesis-summary-rows-BIfw890v.js → anamnesis-summary-rows-CNK0fIJk.js} +392 -388
  13. package/dist/_chunks/{appointment-card-CL32sux-.js → appointment-card-5JMWi9_f.js} +2 -2
  14. package/dist/_chunks/{appointment-peek-B5mcDcXt.js → appointment-peek-D5XCfYKu.js} +2 -2
  15. package/dist/_chunks/{appointment-timeline-CCqjORFb.js → appointment-timeline-VFP6HoXT.js} +4 -4
  16. package/dist/_chunks/{appointment-tray-qtpJt8e0.js → appointment-tray-B3PDER3I.js} +3 -3
  17. package/dist/_chunks/{audio-recorder-DR-u1qbl.js → audio-recorder-4Ll0pwYK.js} +3 -3
  18. package/dist/_chunks/{auth-form-parts-Cmb41LSQ.js → auth-form-parts-B40zvD-a.js} +2 -2
  19. package/dist/_chunks/avatar-BPiPL7ND.js +199 -0
  20. package/dist/_chunks/{balance-badge-cell-DZNthHO1.js → balance-badge-cell-BG3DMly4.js} +4 -4
  21. package/dist/_chunks/{bishop-score-CaNTrikJ.js → bishop-score-Df8nF1qg.js} +2 -2
  22. package/dist/_chunks/{booking-DkjatiXc.js → booking-B1pDbERi.js} +377 -335
  23. package/dist/_chunks/{calendar-BhN-jisv.js → calendar-BvOM8rG3.js} +2 -2
  24. package/dist/_chunks/{calendar-workspace-Cp8yTZ1g.js → calendar-workspace-CYK1M83j.js} +19 -19
  25. package/dist/_chunks/{chat-message-fRLZ95O5.js → chat-message-Be-9vIIQ.js} +2 -2
  26. package/dist/_chunks/{clinical-note-card-BnFTIs6x.js → clinical-note-card-Caidqcwa.js} +2 -2
  27. package/dist/_chunks/{color-picker-BsggJovx.js → color-picker-AcaWuKah.js} +99 -95
  28. package/dist/_chunks/{combobox-U5yfO6o0.js → combobox-vF9O-QoG.js} +92 -83
  29. package/dist/_chunks/{contact-profile-card-C4-OCshj.js → contact-profile-card-CAwwOqHl.js} +40 -40
  30. package/dist/_chunks/{control-room-rail-DUerqHeo.js → control-room-rail-BB6rCDWI.js} +3 -3
  31. package/dist/_chunks/{country-select-DF5Bd_mn.js → country-select-CSE2Zm_s.js} +2 -2
  32. package/dist/_chunks/dashboard-grid-7JzaiKnk.js +1487 -0
  33. package/dist/_chunks/{data-table-COoCQ4n_.js → data-table-Cty4-Jht.js} +3 -3
  34. package/dist/_chunks/{dependent-selector-DBr1AhLg.js → dependent-selector-C4kOgO8b.js} +2 -2
  35. package/dist/_chunks/{document-preview-B1dQm292.js → document-preview-513f3iPn.js} +4 -4
  36. package/dist/_chunks/{document-scanner-CVPVLK7z.js → document-scanner-Bd3wbzpI.js} +2 -2
  37. package/dist/_chunks/{editable-description-ChGNdYY8.js → editable-description-DnAFi360.js} +2 -2
  38. package/dist/_chunks/{entity-summary-BQ9_KA8S.js → entity-summary-C2B8yNmc.js} +4 -4
  39. package/dist/_chunks/{error-summary-DrUfuKu1.js → error-summary-mGxIyDAY.js} +2 -2
  40. package/dist/_chunks/{face-scheme-DAD-mXzM.js → face-scheme-CSJdRNad.js} +248 -244
  41. package/dist/_chunks/{file-manager-RiV7-OEE.js → file-manager-D4cPnRhL.js} +3 -3
  42. package/dist/_chunks/{forgot-password-form-CgZkEvZy.js → forgot-password-form-Dqi7R-NL.js} +4 -4
  43. package/dist/_chunks/format-number-DdzqwMs1.js +13 -0
  44. package/dist/_chunks/{freemium-paywall-DKJHRFpp.js → freemium-paywall-C73C8Rgd.js} +2 -2
  45. package/dist/_chunks/{gestational-age-calculator-CZYa2D6m.js → gestational-age-calculator-Du53p8MH.js} +2 -2
  46. package/dist/_chunks/{header-settings-BSH9Gk0J.js → header-settings-DlUbvAUx.js} +37 -36
  47. package/dist/_chunks/{heatmap-C1TeC7wT.js → heatmap-DbZIQg14.js} +4 -4
  48. package/dist/_chunks/help-me-write-templates-5WkUfvc_.js +687 -0
  49. package/dist/_chunks/hourglass-BEAzW1wE.js +26 -0
  50. package/dist/_chunks/{kit-extensions-DWs1UEXb.js → kit-extensions-CYvLL4ee.js} +3 -3
  51. package/dist/_chunks/length-token-DwMnGEYT.js +24 -0
  52. package/dist/_chunks/{link-cell-renderer-CtTsvfPY.js → link-cell-renderer-DtIsQWDO.js} +4 -4
  53. package/dist/_chunks/{login-dev-card-PnADNcI9.js → login-dev-card-vEL-o5wq.js} +3 -3
  54. package/dist/_chunks/{map-view-BuVfJMEa.js → map-view-CtohteZD.js} +300 -191
  55. package/dist/_chunks/{marketplace-app-shell-C-2e4eCD.js → marketplace-app-shell-CcLQ0Dn-.js} +4 -4
  56. package/dist/_chunks/{message-card-A3mJNqfy.js → message-card-C_ksqIYM.js} +2 -2
  57. package/dist/_chunks/{message-tray-Ft6vSr71.js → message-tray-DCoQ4GQb.js} +3 -3
  58. package/dist/_chunks/{multi-select-CMaAQQgb.js → multi-select-BOad3za9.js} +110 -98
  59. package/dist/_chunks/{muscle-scheme-YoN3rYXV.js → muscle-scheme-C66WlCxG.js} +2 -2
  60. package/dist/_chunks/{note-timeline-DDqNU46n.js → note-timeline-KzL52MmB.js} +2 -2
  61. package/dist/_chunks/{notes-panel-uEGIL7mi.js → notes-panel-BXN46XkF.js} +6 -6
  62. package/dist/_chunks/notice-group-DkYzKyAZ.js +291 -0
  63. package/dist/_chunks/{notification-tray-BR3seWA7.js → notification-tray-Cp18MW5b.js} +2 -2
  64. package/dist/_chunks/{operator-hero-3_RG4Dkj.js → operator-hero-6aAIQaFZ.js} +83 -66
  65. package/dist/_chunks/{optical-prescription-CxfMsbxi.js → optical-prescription-ulXnDbBe.js} +525 -509
  66. package/dist/_chunks/panel-header-CbtlTe85.js +190 -0
  67. package/dist/_chunks/{panel-subview-yP4qIbKS.js → panel-subview-BPU7220K.js} +2 -2
  68. package/dist/_chunks/{patient-details-4P1vA9Ls.js → patient-details-C4Dyo7Ck.js} +4 -4
  69. package/dist/_chunks/{patient-field-row-CBXhlfGD.js → patient-field-row-DROvUkFu.js} +155 -176
  70. package/dist/_chunks/{patient-search-DOnDUVsl.js → patient-search-BADdx3M1.js} +2 -2
  71. package/dist/_chunks/{patient-summary-card-CuDLo8MP.js → patient-summary-card-CAimxbuI.js} +4 -4
  72. package/dist/_chunks/{payment-automation-upsell-C8MEu0t6.js → payment-automation-upsell-CiwF5UrC.js} +2 -2
  73. package/dist/_chunks/{payment-form-C3dGY7v4.js → payment-form-PBuh8PIa.js} +2 -2
  74. package/dist/_chunks/{pdf-viewer-DJ9VN7cu.js → pdf-viewer-gAsNUsA8.js} +2 -2
  75. package/dist/_chunks/{periodontal-risk-chart-CPy7CNFe.js → periodontal-risk-chart-B7S9OmPC.js} +97 -89
  76. package/dist/_chunks/practice-profile-hero-qfrsFQI_.js +236 -0
  77. package/dist/_chunks/{practice-results-8h2Utpt3.js → practice-results-BzThnpnm.js} +328 -298
  78. package/dist/_chunks/{pregnancy-dating-B8wo4l_r.js → pregnancy-dating-EFcFUJkQ.js} +2 -2
  79. package/dist/_chunks/{privacy-mask-Ch7743uk.js → privacy-mask-CCz9zuIh.js} +2 -2
  80. package/dist/_chunks/{product-hub-panel-C_ZosrBt.js → product-hub-panel-YuFbNPlT.js} +2 -2
  81. package/dist/_chunks/progress-notice-DiHWZ8Ms.js +279 -0
  82. package/dist/_chunks/{province-select-Bd20Z9Br.js → province-select-CDjs5obD.js} +2 -2
  83. package/dist/_chunks/{radiograph-panel.agent-8Ewv8-d7.js → radiograph-panel.agent-4UllIoTQ.js} +2 -2
  84. package/dist/_chunks/{rating-C1Vrmpsi.js → rating-CGYpg5dj.js} +43 -44
  85. package/dist/_chunks/{registration-form-BQyT_kBX.js → registration-form-1B0PTDal.js} +4 -4
  86. package/dist/_chunks/{reviews-panel-AvsVgtJu.js → reviews-panel-CosDZyow.js} +29 -7
  87. package/dist/_chunks/{rich-text-editor-M2gT_E7f.js → rich-text-editor-56dSsyZI.js} +1653 -1743
  88. package/dist/_chunks/{select-k4gBdS8N.js → select-4S-eYZUf.js} +244 -214
  89. package/dist/_chunks/{sign-document-CY7xTXbm.js → sign-document-BiOTs1P4.js} +2 -2
  90. package/dist/_chunks/{signature-request-BMCHy2ZO.js → signature-request-DAmNj_uq.js} +5 -5
  91. package/dist/_chunks/skeleton-tTWJpvAq.js +415 -0
  92. package/dist/_chunks/{slot-grid-dj5f6R2w.js → slot-grid-D_gix9mJ.js} +2 -2
  93. package/dist/_chunks/{tabs-2x3L13jn.js → tabs-BTj-2qMZ.js} +2 -2
  94. package/dist/_chunks/{task-card-BS7Uqevr.js → task-card-Ci2XbLmq.js} +2 -2
  95. package/dist/_chunks/{task-editor-CifOznfq.js → task-editor-BomyxGoZ.js} +8 -8
  96. package/dist/_chunks/{task-tray-eQU4KJcA.js → task-tray-Dnc72nl-.js} +3 -3
  97. package/dist/_chunks/{tasks-panel-8nLwBw6P.js → tasks-panel-ATz9JDy8.js} +6 -6
  98. package/dist/_chunks/{theme-toggle-Ctb77x6O.js → theme-toggle-DT_Jn4DC.js} +147 -138
  99. package/dist/_chunks/{timeline-DEIuHrWz.js → timeline-wUuTDFY_.js} +2 -2
  100. package/dist/_chunks/{tool-rail-C-03rH2I.js → tool-rail-C-M3eVdY.js} +2 -2
  101. package/dist/_chunks/{transcript-panel-XudW5l6l.js → transcript-panel-CoHHpcFg.js} +2 -2
  102. package/dist/_chunks/{treatment-receipt-Cpm8tqQN.js → treatment-receipt-pFqWFyD_.js} +2 -2
  103. package/dist/_chunks/{unit-converter-BPZ0Ldkb.js → unit-converter-CIoTmCmP.js} +2 -2
  104. package/dist/_chunks/{use-appointment-details-read-B-FEWbQM.js → use-appointment-details-read-CUGfE0hV.js} +13 -13
  105. package/dist/_chunks/use-dismissed-CTOWqA0e.js +177 -0
  106. package/dist/_chunks/voice-control-panel-B8Lrk0C4.js +1148 -0
  107. package/dist/_chunks/{warning-stack-HYWAytZV.js → warning-stack-BhHUmRiD.js} +2 -2
  108. package/dist/_chunks/{workflow-map-C2B2qIr1.js → workflow-map-ln4_OG8A.js} +2 -2
  109. package/dist/agent-catalog.json +221 -6
  110. package/dist/agent-i18n/en.json +32 -5
  111. package/dist/components/_shared/format-number.d.ts +20 -0
  112. package/dist/components/_shared/length-token.d.ts +12 -0
  113. package/dist/components/_shared/option.d.ts +1 -0
  114. package/dist/components/address-fields/index.js +1 -1
  115. package/dist/components/agenda-card/index.js +1 -1
  116. package/dist/components/agenda-tray/index.js +1 -1
  117. package/dist/components/ai-credits-notice/ai-credits-exhausted-notice.agent.d.ts +4 -0
  118. package/dist/components/ai-credits-notice/ai-credits-exhausted-notice.d.ts +96 -0
  119. package/dist/components/ai-credits-notice/ai-credits-notice.d.ts +30 -4
  120. package/dist/components/ai-credits-notice/index.d.ts +3 -0
  121. package/dist/components/ai-credits-notice/index.js +10 -4
  122. package/dist/components/ai-permission-notice/index.js +1 -1
  123. package/dist/components/ai-prompt-input/index.js +1 -1
  124. package/dist/components/alert/alert.d.ts +26 -0
  125. package/dist/components/alert/index.js +1 -1
  126. package/dist/components/anamnesis-summary-card/index.js +1 -1
  127. package/dist/components/appointment-card/index.js +2 -2
  128. package/dist/components/appointment-details-panel/index.js +1 -1
  129. package/dist/components/appointment-peek/index.js +1 -1
  130. package/dist/components/appointment-timeline/index.js +1 -1
  131. package/dist/components/audio-recorder/index.js +1 -1
  132. package/dist/components/avatar/avatar.d.ts +2 -0
  133. package/dist/components/avatar/index.js +1 -1
  134. package/dist/components/bishop-score/index.js +1 -1
  135. package/dist/components/booking/index.js +1 -1
  136. package/dist/components/calendar/index.js +1 -1
  137. package/dist/components/chat-message/index.js +1 -1
  138. package/dist/components/clinical-note-card/index.js +1 -1
  139. package/dist/components/color-picker/index.js +1 -1
  140. package/dist/components/combobox/index.js +1 -1
  141. package/dist/components/contact-profile-card/index.js +1 -1
  142. package/dist/components/control-room-rail/index.js +1 -1
  143. package/dist/components/country-select/index.js +1 -1
  144. package/dist/components/dashboard-grid/dashboard-grid.d.ts +20 -1
  145. package/dist/components/dashboard-grid/index.js +1 -1
  146. package/dist/components/data-table/index.js +2 -2
  147. package/dist/components/dependent-selector/index.js +1 -1
  148. package/dist/components/document-preview/index.js +1 -1
  149. package/dist/components/document-scanner/index.js +1 -1
  150. package/dist/components/editable-description/index.js +1 -1
  151. package/dist/components/entity-summary/index.js +1 -1
  152. package/dist/components/error-summary/index.js +1 -1
  153. package/dist/components/face-scheme/index.js +1 -1
  154. package/dist/components/file-manager/index.js +1 -1
  155. package/dist/components/freemium-paywall/index.js +1 -1
  156. package/dist/components/gestational-age-calculator/index.js +1 -1
  157. package/dist/components/header-settings/index.js +1 -1
  158. package/dist/components/heatmap/index.js +1 -1
  159. package/dist/components/index.d.ts +4 -2
  160. package/dist/components/map-view/index.d.ts +1 -1
  161. package/dist/components/map-view/index.js +1 -1
  162. package/dist/components/map-view/map-view.d.ts +51 -0
  163. package/dist/components/message-card/index.js +1 -1
  164. package/dist/components/message-tray/index.js +1 -1
  165. package/dist/components/multi-select/index.js +1 -1
  166. package/dist/components/muscle-scheme/index.js +1 -1
  167. package/dist/components/note-timeline/index.js +1 -1
  168. package/dist/components/notes-panel/index.js +1 -1
  169. package/dist/components/notice-group/index.d.ts +3 -0
  170. package/dist/components/notice-group/index.js +6 -0
  171. package/dist/components/notice-group/notice-group.agent.d.ts +4 -0
  172. package/dist/components/notice-group/notice-group.d.ts +43 -0
  173. package/dist/components/notification-tray/index.js +1 -1
  174. package/dist/components/operator-hero/index.js +1 -1
  175. package/dist/components/optical-prescription/index.js +1 -1
  176. package/dist/components/optical-prescription/optical-prescription-data.d.ts +8 -8
  177. package/dist/components/panel-header/index.js +1 -1
  178. package/dist/components/panel-header/panel-header.d.ts +10 -0
  179. package/dist/components/panel-subview/index.js +1 -1
  180. package/dist/components/patient-details/index.js +1 -1
  181. package/dist/components/patient-search/index.js +1 -1
  182. package/dist/components/patient-summary-card/index.js +1 -1
  183. package/dist/components/patient-table/index.js +1 -1
  184. package/dist/components/payment-form/index.js +1 -1
  185. package/dist/components/pdf-viewer/index.js +1 -1
  186. package/dist/components/periodontal-risk-chart/index.js +1 -1
  187. package/dist/components/practice-profile-hero/index.js +1 -1
  188. package/dist/components/practice-profile-hero/practice-profile-hero.d.ts +4 -1
  189. package/dist/components/practice-results/index.js +1 -1
  190. package/dist/components/practice-results/practice-results.d.ts +10 -2
  191. package/dist/components/pregnancy-dating/index.js +1 -1
  192. package/dist/components/product-hub-tray/index.js +1 -1
  193. package/dist/components/progress-notice/index.d.ts +3 -0
  194. package/dist/components/progress-notice/index.js +6 -0
  195. package/dist/components/progress-notice/progress-notice.agent.d.ts +4 -0
  196. package/dist/components/progress-notice/progress-notice.d.ts +81 -0
  197. package/dist/components/province-select/index.js +1 -1
  198. package/dist/components/radiograph-panel/index.js +1 -1
  199. package/dist/components/rating/index.js +1 -1
  200. package/dist/components/reviews-panel/index.js +1 -1
  201. package/dist/components/rich-text-editor/index.js +2 -2
  202. package/dist/components/select/index.js +1 -1
  203. package/dist/components/select/select.d.ts +6 -0
  204. package/dist/components/sign-document/index.js +1 -1
  205. package/dist/components/skeleton/index.d.ts +1 -1
  206. package/dist/components/skeleton/index.js +1 -1
  207. package/dist/components/skeleton/skeleton.d.ts +41 -1
  208. package/dist/components/skeleton-scheme/index.js +1 -1
  209. package/dist/components/slot-grid/index.js +1 -1
  210. package/dist/components/tabs/index.js +1 -1
  211. package/dist/components/task-card/index.js +1 -1
  212. package/dist/components/task-editor/index.js +1 -1
  213. package/dist/components/task-tray/index.js +1 -1
  214. package/dist/components/tasks-panel/index.js +1 -1
  215. package/dist/components/theme-toggle/index.js +1 -1
  216. package/dist/components/timeline/index.js +1 -1
  217. package/dist/components/tool-rail/index.js +1 -1
  218. package/dist/components/transcript-panel/index.js +1 -1
  219. package/dist/components/treatment-receipt/index.js +1 -1
  220. package/dist/components/unit-converter/index.js +1 -1
  221. package/dist/components/voice-control-panel/index.d.ts +2 -1
  222. package/dist/components/voice-control-panel/index.js +1 -1
  223. package/dist/components/voice-control-panel/voice-control-panel.d.ts +43 -3
  224. package/dist/components/warning-stack/index.js +1 -1
  225. package/dist/components/workflow/index.js +1 -1
  226. package/dist/hooks/index.d.ts +1 -0
  227. package/dist/hooks/index.js +81 -76
  228. package/dist/hooks/use-dismissed.d.ts +58 -0
  229. package/dist/i18n/locales/ar.d.ts +49 -12
  230. package/dist/i18n/locales/ar.js +49 -12
  231. package/dist/i18n/locales/de.d.ts +49 -12
  232. package/dist/i18n/locales/de.js +49 -12
  233. package/dist/i18n/locales/el.d.ts +49 -12
  234. package/dist/i18n/locales/el.js +49 -12
  235. package/dist/i18n/locales/en.d.ts +49 -12
  236. package/dist/i18n/locales/en.js +49 -12
  237. package/dist/i18n/locales/es.d.ts +49 -12
  238. package/dist/i18n/locales/es.js +49 -12
  239. package/dist/i18n/locales/fr.d.ts +49 -12
  240. package/dist/i18n/locales/fr.js +49 -12
  241. package/dist/i18n/locales/hi.d.ts +49 -12
  242. package/dist/i18n/locales/hi.js +49 -12
  243. package/dist/i18n/locales/it.d.ts +49 -12
  244. package/dist/i18n/locales/it.js +49 -12
  245. package/dist/i18n/locales/ja.d.ts +49 -12
  246. package/dist/i18n/locales/ja.js +49 -12
  247. package/dist/i18n/locales/nl.d.ts +49 -12
  248. package/dist/i18n/locales/nl.js +49 -12
  249. package/dist/i18n/locales/pl.d.ts +49 -12
  250. package/dist/i18n/locales/pl.js +49 -12
  251. package/dist/i18n/locales/pt.d.ts +49 -12
  252. package/dist/i18n/locales/pt.js +49 -12
  253. package/dist/i18n/locales/ro.d.ts +49 -12
  254. package/dist/i18n/locales/ro.js +49 -12
  255. package/dist/i18n/locales/ru.d.ts +49 -12
  256. package/dist/i18n/locales/ru.js +49 -12
  257. package/dist/i18n/locales/sq.d.ts +49 -12
  258. package/dist/i18n/locales/sq.js +49 -12
  259. package/dist/i18n/locales/sv.d.ts +49 -12
  260. package/dist/i18n/locales/sv.js +49 -12
  261. package/dist/i18n/locales/tr.d.ts +49 -12
  262. package/dist/i18n/locales/tr.js +49 -12
  263. package/dist/i18n/locales/zh.d.ts +49 -12
  264. package/dist/i18n/locales/zh.js +49 -12
  265. package/dist/index.js +1193 -1177
  266. package/dist/locales/ar.json +49 -12
  267. package/dist/locales/de.json +49 -12
  268. package/dist/locales/el.json +49 -12
  269. package/dist/locales/en.json +49 -12
  270. package/dist/locales/es.json +49 -12
  271. package/dist/locales/fr.json +49 -12
  272. package/dist/locales/hi.json +49 -12
  273. package/dist/locales/it.json +49 -12
  274. package/dist/locales/ja.json +49 -12
  275. package/dist/locales/nl.json +49 -12
  276. package/dist/locales/pl.json +49 -12
  277. package/dist/locales/pt.json +49 -12
  278. package/dist/locales/ro.json +49 -12
  279. package/dist/locales/ru.json +49 -12
  280. package/dist/locales/sq.json +49 -12
  281. package/dist/locales/sv.json +49 -12
  282. package/dist/locales/tr.json +49 -12
  283. package/dist/locales/zh.json +49 -12
  284. package/dist/patterns/alia-assistant/index.js +1 -1
  285. package/dist/patterns/anamnesis/index.js +1 -1
  286. package/dist/patterns/calendar/index.js +1 -1
  287. package/dist/patterns/forgot-password-form/index.js +1 -1
  288. package/dist/patterns/help-me-write-templates/help-me-write-templates.d.ts +6 -23
  289. package/dist/patterns/help-me-write-templates/index.js +8 -7
  290. package/dist/patterns/login-form/index.js +1 -1
  291. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  292. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  293. package/dist/patterns/registration-form/index.js +1 -1
  294. package/dist/patterns/signature-request/index.js +1 -1
  295. package/dist/tokens.css +1 -1
  296. package/package.json +9 -1
  297. package/dist/_chunks/ai-credits-notice-pK9BOmEz.js +0 -90
  298. package/dist/_chunks/ai-credits-notice.agent-C9L7orrP.js +0 -17
  299. package/dist/_chunks/avatar-WZY3eGE7.js +0 -123
  300. package/dist/_chunks/dashboard-grid-B2MB7SRS.js +0 -1428
  301. package/dist/_chunks/help-me-write-templates-DFmqnsAa.js +0 -747
  302. package/dist/_chunks/panel-header-BJkaUwnl.js +0 -128
  303. package/dist/_chunks/practice-profile-hero-Dfc0F60y.js +0 -193
  304. package/dist/_chunks/skeleton-B1KTdJ4N.js +0 -116
  305. package/dist/_chunks/voice-control-panel-C0BfY23Y.js +0 -1009
@@ -0,0 +1,1148 @@
1
+ import { jsxs as c, jsx as o, Fragment as Me } from "react/jsx-runtime";
2
+ import { forwardRef as on, useId as $e, useState as I, useRef as r, useMemo as je, useEffect as x, useCallback as k } from "react";
3
+ import { c as K } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as sn, Trans as rn } from "react-i18next";
5
+ import { u as an, w as cn } from "./ai-credits-notice-DQ-r3iQU.js";
6
+ import { A as ln, a as dn } from "./ai-credits-exhausted-notice-Bg8NpW2K.js";
7
+ import { A as un } from "./ai-permission-notice-C00i6VhY.js";
8
+ import { A as fn } from "./ai-sparkle-D23NT8Z_.js";
9
+ import { B as pn } from "./badge-BUk4RjTS.js";
10
+ import { B as qe } from "./button-D-MQxsA_.js";
11
+ import { I as mn } from "./icon-button-C_1TgRiK.js";
12
+ import { C as gn, b as vn, a as hn } from "./collapsible-DVPM46bq.js";
13
+ import { F as yn } from "./form-field-Ani72sVY.js";
14
+ import { K as bn } from "./kbd-Bx7eQv9f.js";
15
+ import { L as pe } from "./list-CNnn7DOD.js";
16
+ import { L as xn } from "./live-region-C41SO3cA.js";
17
+ import { S as wn } from "./select-4S-eYZUf.js";
18
+ import { a as Nn, b as Ct, c as Cn, d as kn } from "./ai-fab-pill-BOu96kCx.js";
19
+ import { c as An } from "./compose-refs-C0k0tdqF.js";
20
+ import { g as Rn, a as En } from "./glass-surface-CPok0jEe.js";
21
+ import { p as kt } from "./floating-clearance-nIx9fFLy.js";
22
+ import { u as On } from "./registry-DvAUVLHh.js";
23
+ import { u as Sn } from "./use-ai-sparkle-Cf4yVTLB.js";
24
+ import { u as Pn } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
25
+ import { C as St } from "./circle-alert-rGDZ73Wh.js";
26
+ import { T as In } from "./triangle-alert-CBnO6nq_.js";
27
+ import { C as Kn } from "./circle-check-BN6rz4NV.js";
28
+ import { I as We } from "./info-CGn22peZ.js";
29
+ import { X as Tn } from "./x-B5YnXwCz.js";
30
+ import { L as At } from "./loader-circle-BECIU_8N.js";
31
+ import { S as Rt } from "./square-DASBRZ0U.js";
32
+ import { c as _n } from "./createLucideIcon-DhHxpK9K.js";
33
+ import { C as zn } from "./chevron-down-DWE7GSq9.js";
34
+ import { S as Ln } from "./sliders-horizontal-D-F97cnE.js";
35
+ /**
36
+ * @license lucide-react v1.22.0 - ISC
37
+ *
38
+ * This source code is licensed under the ISC license.
39
+ * See the LICENSE file in the root directory of this source tree.
40
+ */
41
+ const Bn = [
42
+ ["path", { d: "M2 10v3", key: "1fnikh" }],
43
+ ["path", { d: "M6 6v11", key: "11sgs0" }],
44
+ ["path", { d: "M10 3v18", key: "yhl04a" }],
45
+ ["path", { d: "M14 8v7", key: "3a1oy3" }],
46
+ ["path", { d: "M18 5v13", key: "123xd1" }],
47
+ ["path", { d: "M22 10v3", key: "154ddg" }]
48
+ ], Et = _n("audio-lines", Bn), Gn = {
49
+ id: "voice-control-panel",
50
+ capabilities: ["capture", "pick", "expand", "open", "close"],
51
+ state: {
52
+ status: {
53
+ type: "'idle' | 'starting' | 'listening' | 'paused' | 'error'",
54
+ descriptionKey: "ui.agent.voiceControlPanel.state.status",
55
+ description: "Where the host voice session is: idle, starting, listening, paused or error.",
56
+ read: (t) => t.getStatus()
57
+ },
58
+ candidateIds: {
59
+ type: "string[]",
60
+ descriptionKey: "ui.agent.voiceControlPanel.state.candidateIds",
61
+ description: "Ids of the matches currently offered, in spoken order (option 1 first). Empty when there is nothing to choose.",
62
+ read: (t) => t.getCandidateIds()
63
+ },
64
+ commandsOpen: {
65
+ type: "boolean",
66
+ descriptionKey: "ui.agent.voiceControlPanel.state.commandsOpen",
67
+ description: "True when the voice commands list is expanded.",
68
+ read: (t) => t.isCommandsOpen()
69
+ },
70
+ panelOpen: {
71
+ type: "boolean",
72
+ descriptionKey: "ui.agent.voiceControlPanel.state.panelOpen",
73
+ description: "Floating layout: true when the panel above the pill is open. Always false inline.",
74
+ read: (t) => t.isPanelOpen()
75
+ },
76
+ creditsExhausted: {
77
+ type: "boolean",
78
+ descriptionKey: "ui.agent.voiceControlPanel.state.creditsExhausted",
79
+ description: "True when the practice is out of AI credits: every start shows the out-of-credits notice instead of listening.",
80
+ read: (t) => t.isCreditsExhausted()
81
+ },
82
+ creditsNoticeOpen: {
83
+ type: "boolean",
84
+ descriptionKey: "ui.agent.voiceControlPanel.state.creditsNoticeOpen",
85
+ description: "True when the out-of-credits notice is showing in the panel, in place of the controls.",
86
+ read: (t) => t.isCreditsNoticeOpen()
87
+ }
88
+ },
89
+ actions: {
90
+ start_listening: {
91
+ safety: "write",
92
+ idempotent: !0,
93
+ // The host streams the patient's audio to its transcription service.
94
+ openWorld: !0,
95
+ descriptionKey: "ui.agent.voiceControlPanel.actions.startListening",
96
+ description: "Ask the host to start listening (it opens the microphone). Does nothing when already starting or listening, or while the panel is disabled. Without patient AI consent it shows the consent banner instead; out of AI credits (creditsExhausted) it shows the out-of-credits notice instead.",
97
+ errors: ["Microphone permission denied", "Speech service unavailable"],
98
+ invoke: (t) => {
99
+ t.start();
100
+ }
101
+ },
102
+ stop_listening: {
103
+ safety: "write",
104
+ idempotent: !0,
105
+ descriptionKey: "ui.agent.voiceControlPanel.actions.stopListening",
106
+ description: "Ask the host to stop listening, cancel a start or end a paused session. Never gated by consent or AI credits. Does nothing when idle or stopped.",
107
+ invoke: (t) => {
108
+ t.stop();
109
+ }
110
+ },
111
+ pick_candidate: {
112
+ // The host turns the pick into a write on the patient's record (the
113
+ // care plan adds a treatment line), so it is gated as PHI.
114
+ safety: "phi",
115
+ argsType: "{ id: string }",
116
+ argsSchema: {
117
+ type: "object",
118
+ properties: {
119
+ id: {
120
+ type: "string",
121
+ description: "One of the ids in the candidateIds state slot."
122
+ }
123
+ },
124
+ required: ["id"],
125
+ additionalProperties: !1
126
+ },
127
+ descriptionKey: "ui.agent.voiceControlPanel.actions.pickCandidate",
128
+ description: "Pick one of the offered matches by id, the same as saying its option number or pressing it. Unknown ids are ignored.",
129
+ examples: [
130
+ { args: { id: "otve" }, note: "Pick the match with id otve." }
131
+ ],
132
+ invoke: (t, v) => {
133
+ t.pickCandidate(v.id);
134
+ }
135
+ },
136
+ open_commands: {
137
+ safety: "read",
138
+ idempotent: !0,
139
+ descriptionKey: "ui.agent.voiceControlPanel.actions.openCommands",
140
+ description: "Expand the voice commands list.",
141
+ invoke: (t) => {
142
+ t.openCommands();
143
+ }
144
+ },
145
+ close_commands: {
146
+ safety: "read",
147
+ idempotent: !0,
148
+ descriptionKey: "ui.agent.voiceControlPanel.actions.closeCommands",
149
+ description: "Collapse the voice commands list.",
150
+ invoke: (t) => {
151
+ t.closeCommands();
152
+ }
153
+ },
154
+ open_panel: {
155
+ safety: "read",
156
+ idempotent: !0,
157
+ descriptionKey: "ui.agent.voiceControlPanel.actions.openPanel",
158
+ description: "Floating layout: open the panel above the pill. Does nothing inline.",
159
+ invoke: (t) => {
160
+ t.openPanel();
161
+ }
162
+ },
163
+ close_panel: {
164
+ safety: "read",
165
+ idempotent: !0,
166
+ descriptionKey: "ui.agent.voiceControlPanel.actions.closePanel",
167
+ description: "Floating layout: close the panel above the pill. Listening carries on. Does nothing inline.",
168
+ invoke: (t) => {
169
+ t.closePanel();
170
+ }
171
+ },
172
+ close_credits_notice: {
173
+ safety: "read",
174
+ idempotent: !0,
175
+ descriptionKey: "ui.agent.voiceControlPanel.actions.closeCreditsNotice",
176
+ description: "Close the out-of-credits notice and go back to the controls. Credits stay out: the next start shows it again.",
177
+ invoke: (t) => {
178
+ t.closeCreditsNotice();
179
+ }
180
+ }
181
+ },
182
+ domHooks: {
183
+ root: {
184
+ attr: "data-component",
185
+ value: "voice-control-panel",
186
+ description: "Marks the VoiceControlPanel root."
187
+ },
188
+ instanceId: {
189
+ attr: "data-component-id",
190
+ sourceProp: "id",
191
+ description: "Sourced from the id prop on VoiceControlPanel."
192
+ },
193
+ item: {
194
+ attr: "data-candidate-id",
195
+ description: "On each match button, the candidate id that pick_candidate takes."
196
+ }
197
+ }
198
+ }, Vn = K(
199
+ [
200
+ // The container query lives on the root and is read by descendants only,
201
+ // never by a flex parent of its own (see the grid below).
202
+ "ds:@container/voice-control",
203
+ "ds:block ds:w-full ds:min-w-0",
204
+ // The edge is --surface-border-width (1px, 2px in the accessible themes),
205
+ // at zero specificity so the nearest theme root decides it.
206
+ "ds:rounded-[var(--radius-lg)] ds:[:where(&)]:border-[length:var(--surface-border-width,var(--border-width-sm))]",
207
+ "ds:bg-[var(--card)] ds:text-[color:var(--foreground)]",
208
+ "ds:p-[var(--spacing-md)]",
209
+ "ds:print:hidden"
210
+ ].join(" "),
211
+ {
212
+ variants: {
213
+ // The border colour lives only here, never beside a base colour, so
214
+ // the listening ring can't lose a race on stylesheet order.
215
+ status: {
216
+ idle: "ds:border-[color:var(--card-border)]",
217
+ starting: "ds:border-[color:var(--card-border)]",
218
+ listening: "ds:border-[color:var(--ring)]",
219
+ paused: "ds:border-[color:var(--card-border)]",
220
+ error: "ds:border-[color:var(--card-border)]"
221
+ }
222
+ },
223
+ defaultVariants: { status: "idle" }
224
+ }
225
+ ), Fn = K(
226
+ [
227
+ "ds:relative ds:inline-flex ds:size-2.5 ds:shrink-0 ds:rounded-[var(--radius-full)]",
228
+ "ds:forced-colors:border ds:forced-colors:border-[CanvasText]"
229
+ ].join(" "),
230
+ {
231
+ variants: {
232
+ status: {
233
+ idle: "ds:border ds:border-[color:var(--muted-foreground)]",
234
+ starting: "ds:bg-[color:var(--muted-foreground)]",
235
+ listening: "ds:bg-[color:var(--destructive)]",
236
+ paused: "ds:bg-[color:var(--warning)]",
237
+ error: "ds:bg-[color:var(--error)]"
238
+ }
239
+ },
240
+ defaultVariants: { status: "idle" }
241
+ }
242
+ ), Ot = K(
243
+ "ds:m-0 ds:flex ds:items-start ds:gap-[var(--spacing-xs)] type-body-sm",
244
+ {
245
+ variants: {
246
+ tone: {
247
+ info: "ds:text-[color:var(--info-foreground)]",
248
+ success: "ds:text-[color:var(--success-foreground)]",
249
+ warning: "ds:text-[color:var(--warning-foreground)]",
250
+ error: "ds:text-[color:var(--error-foreground)]"
251
+ }
252
+ },
253
+ defaultVariants: { tone: "info" }
254
+ }
255
+ ), me = "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)] ds:forced-colors:focus-visible:outline-[CanvasText]", Dn = K(
256
+ [
257
+ "ds:flex ds:w-full ds:items-center",
258
+ "ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)]",
259
+ "ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:py-[var(--spacing-2xs)]",
260
+ "ds:text-start ds:text-[color:var(--foreground)] ds:cursor-pointer",
261
+ "ds:hover:bg-[color:var(--muted)] ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
262
+ "ds:disabled:cursor-not-allowed ds:disabled:opacity-50",
263
+ me
264
+ ].join(" ")
265
+ ), Mn = K(
266
+ [
267
+ "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
268
+ "ds:min-h-[var(--min-target-size)] ds:py-[var(--spacing-2xs)]",
269
+ "ds:rounded-[var(--radius-sm)] type-meta ds:text-[color:var(--muted-foreground)] ds:text-start",
270
+ "ds:hover:text-[color:var(--foreground)] ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
271
+ me
272
+ ].join(" ")
273
+ ), $n = K(
274
+ [
275
+ "ds:fixed ds:z-[var(--z-fixed)]",
276
+ // `--voice-control-offset` (default: the kit's corner gap) lifts the
277
+ // cluster, for example above the page's own floating button; the
278
+ // panel's height cap below reads the same property.
279
+ "ds:bottom-[calc(var(--voice-control-offset,var(--spacing-lg))+env(safe-area-inset-bottom,0px))]",
280
+ "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
281
+ "ds:pointer-events-none ds:[&>*]:pointer-events-auto",
282
+ "ds:print:hidden"
283
+ ].join(" "),
284
+ {
285
+ variants: {
286
+ position: {
287
+ "bottom-end": "ds:end-[var(--spacing-lg)] ds:items-end",
288
+ "bottom-start": "ds:start-[var(--spacing-lg)] ds:items-start"
289
+ }
290
+ },
291
+ defaultVariants: { position: "bottom-end" }
292
+ }
293
+ ), jn = K(
294
+ [
295
+ "ds:@container/voice-control",
296
+ // Closed is `hidden`: never let a display utility win over it.
297
+ "ds:min-w-0 ds:[&[hidden]]:hidden",
298
+ "ds:[inline-size:min(24rem,calc(100vw-(var(--spacing-lg)*2)))]",
299
+ "ds:[max-block-size:calc(100dvh-var(--min-target-size)-var(--voice-control-offset,var(--spacing-lg))-var(--spacing-lg)-var(--spacing-sm)-env(safe-area-inset-bottom,0px))]",
300
+ // On a phone the panel spans the screen, so it stops at half the height
301
+ // (scrolling inside) and the voice cursor row above it stays in view.
302
+ "ds:max-sm:[max-block-size:calc(50dvh-var(--min-target-size)-var(--voice-control-offset,var(--spacing-lg))-var(--spacing-lg)-var(--spacing-sm)-env(safe-area-inset-bottom,0px))]",
303
+ "ds:overflow-y-auto ds:overscroll-contain",
304
+ Rn,
305
+ En,
306
+ "ds:text-[color:var(--foreground)]",
307
+ me
308
+ ].join(" "),
309
+ {
310
+ variants: {
311
+ position: {
312
+ "bottom-end": "ds:origin-bottom-right ds:rtl:origin-bottom-left",
313
+ "bottom-start": "ds:origin-bottom-left ds:rtl:origin-bottom-right"
314
+ }
315
+ },
316
+ defaultVariants: { position: "bottom-end" }
317
+ }
318
+ ), qn = K(
319
+ "ds:disabled:cursor-not-allowed ds:disabled:opacity-50",
320
+ {
321
+ variants: {
322
+ extended: {
323
+ true: "ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-md)]",
324
+ false: ""
325
+ }
326
+ },
327
+ defaultVariants: { extended: !1 }
328
+ }
329
+ ), Hn = {
330
+ alt: "Alt",
331
+ option: "Alt",
332
+ ctrl: "Control",
333
+ control: "Control",
334
+ shift: "Shift",
335
+ meta: "Meta",
336
+ cmd: "Meta",
337
+ command: "Meta"
338
+ };
339
+ function Wn(t) {
340
+ const v = t.split("+").map((T) => T.trim()).filter(Boolean);
341
+ if (v.length === 0) return null;
342
+ const p = v[v.length - 1], M = /* @__PURE__ */ new Set();
343
+ for (const T of v.slice(0, -1)) {
344
+ const ee = Hn[T.toLowerCase()];
345
+ if (!ee) return null;
346
+ M.add(ee);
347
+ }
348
+ const $ = p.length === 1 ? p.toUpperCase() : p, j = ["Control", "Alt", "Shift", "Meta"].filter(
349
+ (T) => M.has(T)
350
+ );
351
+ return {
352
+ modifiers: M,
353
+ key: $,
354
+ aria: [...j, $].join("+"),
355
+ keys: [...j, $]
356
+ };
357
+ }
358
+ function Un(t, v) {
359
+ if (t.altKey !== v.modifiers.has("Alt") || t.ctrlKey !== v.modifiers.has("Control") || t.shiftKey !== v.modifiers.has("Shift") || t.metaKey !== v.modifiers.has("Meta")) return !1;
360
+ const { key: p } = v;
361
+ return /^[A-Z]$/.test(p) ? t.code === `Key${p}` : /^[0-9]$/.test(p) ? t.code === `Digit${p}` : t.key.toLowerCase() === p.toLowerCase();
362
+ }
363
+ function Jn({ keys: t }) {
364
+ return /* @__PURE__ */ o(bn, { keys: t, separator: "plus", size: "sm" });
365
+ }
366
+ const Qn = {
367
+ info: We,
368
+ success: Kn,
369
+ warning: In,
370
+ error: St
371
+ }, Xn = [], He = "ds:min-h-[var(--min-target-size)]", Zn = "ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]", Yn = /[.!?…:。.!?؟।]$/u, eo = 1e4, to = " ", no = on(
372
+ ({
373
+ status: t,
374
+ onToggle: v,
375
+ disabled: p = !1,
376
+ title: M,
377
+ beta: $ = !1,
378
+ betaNotice: j,
379
+ language: T,
380
+ languages: ee,
381
+ onLanguageChange: ge,
382
+ extraControls: ve,
383
+ target: he,
384
+ transcript: u,
385
+ message: m,
386
+ error: A,
387
+ candidates: q = Xn,
388
+ candidatesLabel: L,
389
+ onCandidatePick: H,
390
+ commands: ye,
391
+ defaultCommandsOpen: Pt = !1,
392
+ shortcut: te = "Alt+V",
393
+ id: W,
394
+ layout: It = "inline",
395
+ position: be = "bottom-end",
396
+ open: Ue,
397
+ defaultOpen: Kt = !1,
398
+ onOpenChange: Je,
399
+ aiSparkle: Tt = !0,
400
+ aiConsent: i,
401
+ aiConsentHeadingLevel: Qe,
402
+ aiCredits: B,
403
+ aiCreditsNotice: _t,
404
+ className: Xe,
405
+ ...Ze
406
+ }, Ye) => {
407
+ const { t: l } = sn("ui"), xe = $e(), et = $e(), tt = $e(), [we, Ne] = I(Pt), g = It === "floating", Ce = r(null), nt = je(() => An(Ye, Ce), [Ye]), ne = r(null), ot = r(null), oe = r(null), se = r(null), ke = r(null), st = r(null), w = je(
408
+ () => te === !1 ? null : Wn(te),
409
+ [te]
410
+ );
411
+ x(() => {
412
+ }, [te, w]);
413
+ const [zt, Lt] = I(Kt), Ae = Ue !== void 0, y = g && (Ae ? Ue : zt), U = i !== void 0 && !i.granted, [Re, Ee] = I(!1), Bt = Re && U, re = r(!1), J = r(!1), [Gt, rt] = I(!1), Vt = ((i == null ? void 0 : i.pending) ?? !1) || Gt, R = (B == null ? void 0 : B.exhausted) === !0, [Q, _] = I(!1), Oe = Q && R, Se = r(!1), [Ft, Dt] = I(0), X = r(Q);
414
+ X.current = Q;
415
+ const it = r(null), G = r(!1), a = r({
416
+ status: t,
417
+ onToggle: v,
418
+ disabled: p,
419
+ candidates: q,
420
+ onCandidatePick: H,
421
+ commandsOpen: we,
422
+ aiBlocked: U,
423
+ creditsBlocked: R,
424
+ showCredits: Oe,
425
+ floating: g,
426
+ panelOpen: y,
427
+ controlled: Ae,
428
+ onOpenChange: Je
429
+ });
430
+ a.current = {
431
+ status: t,
432
+ onToggle: v,
433
+ disabled: p,
434
+ candidates: q,
435
+ onCandidatePick: H,
436
+ commandsOpen: we,
437
+ aiBlocked: U,
438
+ creditsBlocked: R,
439
+ showCredits: Oe,
440
+ floating: g,
441
+ panelOpen: y,
442
+ controlled: Ae,
443
+ onOpenChange: Je
444
+ };
445
+ const Z = r(null), [, Mt] = I(0), f = k((e) => {
446
+ Z.current = e, Mt((n) => n + 1);
447
+ }, []), E = r(null), Pe = r(!1), b = k((e) => {
448
+ var s;
449
+ const n = a.current;
450
+ !n.floating || n.panelOpen === e || (n.controlled || Lt(e), (s = n.onOpenChange) == null || s.call(n, e));
451
+ }, []), ie = k(() => {
452
+ re.current = !1, J.current = !1, Ee(!1);
453
+ }, []), ae = k(() => {
454
+ const e = typeof document > "u" ? null : document.activeElement;
455
+ E.current = e instanceof HTMLElement && e !== document.body ? e : null;
456
+ }, []), at = k(() => {
457
+ ae(), re.current = !0, _(!1), Ee(!0), b(!0), f("gate");
458
+ }, [ae, b, f]), Ie = k(() => {
459
+ var n;
460
+ if (typeof document > "u") return !1;
461
+ const e = document.activeElement;
462
+ return !e || e === document.body || !!((n = it.current) != null && n.contains(e));
463
+ }, []), Ke = k(() => {
464
+ var n;
465
+ const e = !!((n = oe.current) != null && n.contains(document.activeElement));
466
+ G.current = !1, _(!1), e && f("toggle");
467
+ }, [f]), ce = k(
468
+ (e = !1) => {
469
+ e || ae(), X.current = !0, _(!0), b(!0), f("credits");
470
+ },
471
+ [ae, b, f]
472
+ ), le = k(() => {
473
+ const {
474
+ status: e,
475
+ disabled: n,
476
+ aiBlocked: s,
477
+ creditsBlocked: d
478
+ } = a.current;
479
+ if (e === "starting" || e === "listening") {
480
+ a.current.onToggle("stop");
481
+ return;
482
+ }
483
+ if (!n) {
484
+ if (s) {
485
+ at();
486
+ return;
487
+ }
488
+ if (d) {
489
+ ce();
490
+ return;
491
+ }
492
+ a.current.onToggle("start");
493
+ }
494
+ }, [at, ce]), Te = r(le);
495
+ Te.current = le;
496
+ const $t = k(() => {
497
+ var n;
498
+ J.current = !0;
499
+ const e = (n = i == null ? void 0 : i.onGrant) == null ? void 0 : n.call(i);
500
+ e && typeof e.then == "function" && (rt(!0), Promise.resolve(e).catch(() => {
501
+ J.current = !1;
502
+ }).finally(() => rt(!1)));
503
+ }, [i]), ct = r((i == null ? void 0 : i.granted) ?? !0);
504
+ x(() => {
505
+ const e = ct.current, n = (i == null ? void 0 : i.granted) ?? !0;
506
+ if (ct.current = n, e || !n) return;
507
+ const s = re.current, d = J.current;
508
+ if (re.current = !1, J.current = !1, Ee(!1), !s) return;
509
+ const C = typeof document > "u" || !document.activeElement || document.activeElement === document.body;
510
+ if (d) {
511
+ const {
512
+ status: O,
513
+ disabled: S,
514
+ creditsBlocked: P
515
+ } = a.current;
516
+ if (!S && O !== "starting" && O !== "listening") {
517
+ if (P) {
518
+ ce(!0);
519
+ return;
520
+ }
521
+ a.current.onToggle("start");
522
+ }
523
+ E.current = null, f("toggle");
524
+ } else C && f("toggle");
525
+ }, [i == null ? void 0 : i.granted, f, ce]), x(() => {
526
+ if (!(t === "starting" || t === "listening" || t === "paused") || !(U || R)) {
527
+ Pe.current = !1;
528
+ return;
529
+ }
530
+ Pe.current || (Pe.current = !0, a.current.onToggle("stop"));
531
+ }, [U, R, t]);
532
+ const jt = r({ live: !1, endedAt: -1 / 0 }), _e = r(!1);
533
+ x(() => {
534
+ const e = jt.current;
535
+ if (t === "starting" || t === "listening" || t === "paused" ? e.live = !0 : e.live && (e.live = !1, e.endedAt = Date.now()), !R) {
536
+ _e.current = !1, X.current && (G.current && Ie() && f("toggle"), G.current = !1, E.current = null, _(!1));
537
+ return;
538
+ }
539
+ _e.current || t === "starting" || t === "listening" || !(t === "paused" || Date.now() - e.endedAt <= eo) || (_e.current = !0, E.current = null, Ie() && document.activeElement !== document.body ? f("credits") : (G.current = !1, Se.current = !0, Dt((d) => d + 1)), X.current = !0, _(!0), b(!0));
540
+ }, [R, t, b, Ie, f]), x(() => {
541
+ g && !y && Re && ie(), g && !y && Q && _(!1);
542
+ }, [g, y, Re, ie, Q]), x(() => {
543
+ if (!w || typeof document > "u") return;
544
+ const e = (n) => {
545
+ if (n.defaultPrevented || n.repeat || n.isComposing || !Un(n, w)) return;
546
+ const { status: s, disabled: d } = a.current;
547
+ d && s !== "starting" && s !== "listening" || (n.preventDefault(), Te.current());
548
+ };
549
+ return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
550
+ }, [w]);
551
+ const qt = je(
552
+ () => ({
553
+ getStatus: () => a.current.status,
554
+ start: () => {
555
+ const { status: e, disabled: n } = a.current;
556
+ n || e === "starting" || e === "listening" || Te.current();
557
+ },
558
+ stop: () => {
559
+ const { status: e } = a.current;
560
+ e !== "starting" && e !== "listening" && e !== "paused" || a.current.onToggle("stop");
561
+ },
562
+ getCandidateIds: () => a.current.candidates.map((e) => e.id),
563
+ pickCandidate: (e) => {
564
+ var n, s;
565
+ a.current.disabled || a.current.candidates.some((d) => d.id === e) && ((s = (n = a.current).onCandidatePick) == null || s.call(n, e));
566
+ },
567
+ isCommandsOpen: () => a.current.commandsOpen,
568
+ openCommands: () => Ne(!0),
569
+ closeCommands: () => Ne(!1),
570
+ isPanelOpen: () => a.current.panelOpen,
571
+ openPanel: () => b(!0),
572
+ closePanel: () => b(!1),
573
+ isCreditsExhausted: () => a.current.creditsBlocked,
574
+ isCreditsNoticeOpen: () => a.current.showCredits,
575
+ closeCreditsNotice: () => Ke()
576
+ }),
577
+ [b, Ke]
578
+ );
579
+ On(Gn, qt, W);
580
+ const V = l(`voiceControl.status.${t}`), z = A ? l(`voiceControl.error.${A}`) : "", de = (m == null ? void 0 : m.text) ?? "", F = de ? `${(m == null ? void 0 : m.id) ?? ""}\0${de}` : "", ze = q.length > 0, N = q.map((e) => e.id).join("\0"), lt = t === "starting" || t === "listening", ue = l(t === "listening" ? "voiceControl.action.stop" : t === "starting" ? "common.cancel" : t === "paused" ? "voiceControl.action.resume" : "voiceControl.action.start"), [Le, Ht] = I({ text: "", count: 0 }), dt = r({
581
+ status: t,
582
+ errorText: z,
583
+ messageKey: F,
584
+ candidatesKey: N
585
+ });
586
+ x(() => {
587
+ const e = dt.current, n = [];
588
+ t !== e.status && n.push(V), z && z !== e.errorText && n.push(z), F && F !== e.messageKey && n.push(de), N && N !== e.candidatesKey && n.push(L || l("voiceControl.candidates")), Se.current && (Se.current = !1, n.push(l("aiCredits.title"))), dt.current = { status: t, errorText: z, messageKey: F, candidatesKey: N }, n.length > 0 && Ht((s) => ({
589
+ // A sentence break between parts gives the screen reader a pause:
590
+ // "Stopped. Microphone access is blocked…". The break is a
591
+ // translated template (Japanese ends a sentence with 。), skipped
592
+ // when a part already ends one.
593
+ text: n.reduce(
594
+ (d, C) => Yn.test(d) ? `${d} ${C}` : l("voiceControl.announcementJoin", {
595
+ first: d,
596
+ next: C
597
+ })
598
+ ),
599
+ count: s.count + 1
600
+ }));
601
+ }, [
602
+ l,
603
+ t,
604
+ V,
605
+ z,
606
+ F,
607
+ de,
608
+ N,
609
+ L,
610
+ Ft
611
+ ]);
612
+ const ut = r({ error: A, candidatesKey: N });
613
+ x(() => {
614
+ const e = ut.current;
615
+ ut.current = { error: A, candidatesKey: N }, g && (A && A !== e.error || N && N !== e.candidatesKey) && b(!0);
616
+ }, [g, A, N, b]), x(() => {
617
+ const e = Ce.current;
618
+ if (!g || !e) return;
619
+ const n = {}, s = () => {
620
+ var D;
621
+ const C = window.getComputedStyle(e), O = Number.parseFloat(C.rowGap) || 0, S = (Number.parseFloat(C.bottom) || 0) + (((D = st.current) == null ? void 0 : D.offsetHeight) ?? 0) + O, P = ne.current, h = P && !P.hidden ? P.offsetHeight : 0;
622
+ kt(
623
+ n,
624
+ h > 0 ? Math.max(
625
+ S,
626
+ Math.min(S + h + O, window.innerHeight / 2)
627
+ ) : S
628
+ );
629
+ };
630
+ s();
631
+ const d = typeof ResizeObserver > "u" ? null : new ResizeObserver(s);
632
+ return d == null || d.observe(e), window.addEventListener("resize", s), () => {
633
+ d == null || d.disconnect(), window.removeEventListener("resize", s), kt(n, null);
634
+ };
635
+ }, [g]);
636
+ const Wt = an(
637
+ g ? _t : void 0
638
+ ), Be = g && Tt, {
639
+ state: ft,
640
+ props: pt,
641
+ land: mt
642
+ } = Sn({ enabled: Be }), Y = (m == null ? void 0 : m.tone) === "success" ? F : "", gt = r(Y);
643
+ x(() => {
644
+ Y !== gt.current && (gt.current = Y, Be && Y && mt());
645
+ }, [Be, Y, mt]);
646
+ const Ge = r(!1);
647
+ x(() => {
648
+ var n;
649
+ if (ze || !Ge.current) return;
650
+ Ge.current = !1;
651
+ const e = typeof document > "u" ? null : document.activeElement;
652
+ (!e || e === document.body) && ((n = se.current) == null || n.focus());
653
+ }, [ze]);
654
+ const vt = r(() => {
655
+ });
656
+ x(() => {
657
+ const e = Ce.current;
658
+ if (!g || !e) return;
659
+ const n = (s) => {
660
+ s.key !== "Escape" || s.defaultPrevented || a.current.panelOpen && (s.preventDefault(), vt.current(!0));
661
+ };
662
+ return e.addEventListener("keydown", n), () => e.removeEventListener("keydown", n);
663
+ }, [g]);
664
+ const ht = r(y);
665
+ Pn(() => {
666
+ var s;
667
+ const e = ht.current;
668
+ if (ht.current = y, !e || y || Z.current) return;
669
+ const n = document.activeElement;
670
+ n && ((s = ne.current) != null && s.contains(n)) && f("launcher");
671
+ }, [y, f]), x(() => {
672
+ var n, s, d, C, O, S, P;
673
+ const e = Z.current;
674
+ if (e) {
675
+ if (e === "credits" && !oe.current) {
676
+ (!a.current.creditsBlocked || !X.current) && (Z.current = null);
677
+ return;
678
+ }
679
+ if (Z.current = null, e === "gate") {
680
+ const h = ot.current, D = (h == null ? void 0 : h.querySelector(
681
+ '[role="checkbox"]:not([disabled])'
682
+ )) ?? (h == null ? void 0 : h.querySelector(
683
+ '[data-component="ai-consent-banner"]'
684
+ ));
685
+ D == null || D.focus();
686
+ } else if (e === "credits")
687
+ (s = (n = oe.current) == null ? void 0 : n.querySelector(
688
+ '[data-component="ai-credits-exhausted-notice"]'
689
+ )) == null || s.focus();
690
+ else if (e === "return") {
691
+ const h = E.current;
692
+ E.current = null, h != null && h.isConnected && h.getClientRects().length > 0 ? h.focus() : a.current.floating && !a.current.panelOpen ? (d = ke.current) == null || d.focus() : (C = se.current) == null || C.focus();
693
+ } else e === "panel" ? (O = ne.current) == null || O.focus() : e === "toggle" ? (S = se.current) == null || S.focus() : (P = ke.current) == null || P.focus();
694
+ }
695
+ });
696
+ const yt = (ee ?? []).map((e) => ({
697
+ value: e.value,
698
+ label: e.label
699
+ })), bt = yt.length > 1, Ut = bt || ve != null && ve !== !1, Jt = !!(u != null && u.final) || !!(u != null && u.partial), fe = t === "starting", Qt = m ? Qn[m.tone] : We, Ve = (e) => {
700
+ b(!1), ie(), _(!1), e && f(E.current ? "return" : "launcher");
701
+ };
702
+ vt.current = Ve;
703
+ const Xt = /* @__PURE__ */ c("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-x-[var(--spacing-xs)] ds:gap-y-[var(--spacing-2xs)]", children: [
704
+ /* @__PURE__ */ o(
705
+ "p",
706
+ {
707
+ id: xe,
708
+ className: "ds:m-0 type-label ds:font-semibold ds:text-[color:var(--foreground)]",
709
+ children: M ?? l("voiceControl.title")
710
+ }
711
+ ),
712
+ $ ? /* @__PURE__ */ o(pn, { variant: "brand", size: "sm", children: l("voiceControl.beta") }) : null,
713
+ /* @__PURE__ */ c("span", { className: "ds:ms-auto ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)] type-meta ds:text-[color:var(--muted-foreground)]", children: [
714
+ /* @__PURE__ */ o("span", { "aria-hidden": "true", className: Fn({ status: t }), children: t === "listening" ? /* @__PURE__ */ o(
715
+ "span",
716
+ {
717
+ className: [
718
+ "ds:absolute ds:inset-0 ds:rounded-[var(--radius-full)]",
719
+ "ds:bg-[color:var(--destructive)]",
720
+ // No pulse in the accessible themes (--accessible-off).
721
+ "ds:motion-safe:animate-[var(--accessible-off,recorder-pulse_1.2s_ease-out_infinite)]"
722
+ ].join(" ")
723
+ }
724
+ ) : null }),
725
+ /* @__PURE__ */ o("span", { "data-voice-status": "", children: V })
726
+ ] }),
727
+ g ? /* @__PURE__ */ o(
728
+ mn,
729
+ {
730
+ intent: "ghost",
731
+ size: "md",
732
+ icon: /* @__PURE__ */ o(Tn, {}),
733
+ "aria-label": l("common.close"),
734
+ onClick: () => Ve(!0),
735
+ className: Zn,
736
+ "data-voice-close": ""
737
+ }
738
+ ) : null
739
+ ] }), Zt = j ? /* @__PURE__ */ c("p", { className: "ds:m-0 ds:flex ds:items-start ds:gap-[var(--spacing-2xs)] type-meta ds:text-[color:var(--muted-foreground)]", children: [
740
+ /* @__PURE__ */ o(We, { "aria-hidden": "true", className: "ds:mt-px ds:size-4 ds:shrink-0" }),
741
+ /* @__PURE__ */ o("span", { children: j })
742
+ ] }) : null, xt = Bt && i ? /* @__PURE__ */ c(
743
+ "div",
744
+ {
745
+ ref: ot,
746
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
747
+ "data-voice-consent": "",
748
+ children: [
749
+ /* @__PURE__ */ o(
750
+ un,
751
+ {
752
+ tabIndex: -1,
753
+ granted: i.granted,
754
+ grantedAt: i.grantedAt,
755
+ grantedBy: i.grantedBy,
756
+ canGrant: (i.canGrant ?? !0) && i.onGrant !== void 0,
757
+ pending: Vt,
758
+ onGrantConsent: $t,
759
+ headingLevel: Qe
760
+ }
761
+ ),
762
+ /* @__PURE__ */ o("div", { className: "ds:flex ds:justify-end", children: /* @__PURE__ */ o(
763
+ qe,
764
+ {
765
+ intent: "ghost",
766
+ size: "md",
767
+ onClick: () => {
768
+ ie(), f("return");
769
+ },
770
+ className: He,
771
+ children: l("common.close")
772
+ }
773
+ ) })
774
+ ]
775
+ }
776
+ ) : null, Yt = Oe && !xt ? /* @__PURE__ */ c(
777
+ "div",
778
+ {
779
+ ref: oe,
780
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
781
+ "data-voice-credits": "",
782
+ onFocusCapture: () => {
783
+ G.current = !0;
784
+ },
785
+ onBlurCapture: () => {
786
+ G.current = !1;
787
+ },
788
+ children: [
789
+ /* @__PURE__ */ o(
790
+ ln,
791
+ {
792
+ tabIndex: -1,
793
+ className: me,
794
+ credits: B,
795
+ headingLevel: Qe ?? 5,
796
+ announce: "off"
797
+ }
798
+ ),
799
+ /* @__PURE__ */ o("div", { className: "ds:flex ds:justify-end", children: /* @__PURE__ */ o(
800
+ qe,
801
+ {
802
+ intent: "ghost",
803
+ size: "md",
804
+ onClick: () => {
805
+ Ke(), f("return");
806
+ },
807
+ className: He,
808
+ children: l("common.close")
809
+ }
810
+ ) })
811
+ ]
812
+ }
813
+ ) : null, en = B ? /* @__PURE__ */ o(dn, { credits: B, exhausted: R }) : null, tn = /* @__PURE__ */ c(Me, { children: [
814
+ /* @__PURE__ */ c("div", { className: "ds:grid ds:grid-cols-1 ds:items-start ds:gap-[var(--spacing-sm)] ds:@[560px]/voice-control:grid-cols-[auto_minmax(0,1fr)_auto]", children: [
815
+ /* @__PURE__ */ o(
816
+ qe,
817
+ {
818
+ ref: se,
819
+ intent: t === "listening" ? "outline" : "primary",
820
+ background: "surface",
821
+ size: "md",
822
+ disabled: p && !lt,
823
+ "aria-busy": fe || void 0,
824
+ "aria-keyshortcuts": w == null ? void 0 : w.aria,
825
+ onClick: () => le(),
826
+ startIcon: fe ? /* @__PURE__ */ o(At, { className: "ds:animate-[var(--accessible-off,spin_1s_linear_infinite)] ds:motion-reduce:animate-none" }) : t === "listening" ? /* @__PURE__ */ o(Rt, { className: "ds:fill-current" }) : /* @__PURE__ */ o(Et, {}),
827
+ className: `${He} ds:w-full ds:@[560px]/voice-control:w-auto`,
828
+ "data-voice-toggle": "",
829
+ children: ue
830
+ }
831
+ ),
832
+ /* @__PURE__ */ c("div", { className: "ds:flex ds:min-w-0 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
833
+ he != null && he !== "" ? /* @__PURE__ */ o("p", { className: "ds:m-0 type-body-sm ds:font-semibold ds:[overflow-wrap:anywhere]", children: he }) : null,
834
+ Jt ? /* @__PURE__ */ c(
835
+ "p",
836
+ {
837
+ className: "ds:m-0 type-body-sm ds:[overflow-wrap:anywhere]",
838
+ "data-voice-transcript": "",
839
+ children: [
840
+ /* @__PURE__ */ c("span", { className: "ds:sr-only", children: [
841
+ l("voiceControl.heard"),
842
+ " "
843
+ ] }),
844
+ u != null && u.final ? /* @__PURE__ */ o("span", { className: "ds:text-[color:var(--foreground)]", children: u.final }) : null,
845
+ u != null && u.final && (u != null && u.partial) ? " " : null,
846
+ u != null && u.partial ? /* @__PURE__ */ o(
847
+ "span",
848
+ {
849
+ className: "ds:italic ds:text-[color:var(--muted-foreground)]",
850
+ "data-voice-partial": "",
851
+ children: u.partial
852
+ }
853
+ ) : null
854
+ ]
855
+ }
856
+ ) : t === "listening" ? (
857
+ // Holds the line while nothing has been heard yet, so the first
858
+ // words do not push the panel down.
859
+ /* @__PURE__ */ o(
860
+ "p",
861
+ {
862
+ "aria-hidden": "true",
863
+ className: "ds:m-0 type-body-sm ds:min-h-[1lh]"
864
+ }
865
+ )
866
+ ) : null,
867
+ A ? /* @__PURE__ */ c("p", { className: Ot({ tone: "error" }), children: [
868
+ /* @__PURE__ */ o(
869
+ St,
870
+ {
871
+ "aria-hidden": "true",
872
+ className: "ds:mt-px ds:size-4 ds:shrink-0"
873
+ }
874
+ ),
875
+ /* @__PURE__ */ o("span", { children: z })
876
+ ] }) : null,
877
+ m && m.text ? /* @__PURE__ */ c(
878
+ "p",
879
+ {
880
+ className: Ot({ tone: m.tone }),
881
+ "data-tone": m.tone,
882
+ children: [
883
+ /* @__PURE__ */ o(
884
+ Qt,
885
+ {
886
+ "aria-hidden": "true",
887
+ className: "ds:mt-px ds:size-4 ds:shrink-0"
888
+ }
889
+ ),
890
+ /* @__PURE__ */ o("span", { children: m.text })
891
+ ]
892
+ }
893
+ ) : null
894
+ ] }),
895
+ Ut ? /* @__PURE__ */ c("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:@[560px]/voice-control:flex-row ds:@[560px]/voice-control:flex-wrap ds:@[560px]/voice-control:items-end", children: [
896
+ bt ? (
897
+ // A visible, associated label (the kit FormField pattern).
898
+ /* @__PURE__ */ o(yn, { label: l("voiceControl.language"), children: /* @__PURE__ */ o(
899
+ wn,
900
+ {
901
+ options: yt,
902
+ value: T ?? "",
903
+ onValueChange: (e) => {
904
+ e && (ge == null || ge(e));
905
+ },
906
+ disabled: p
907
+ }
908
+ ) })
909
+ ) : null,
910
+ ve
911
+ ] }) : null
912
+ ] }),
913
+ ze ? /* @__PURE__ */ c(
914
+ "div",
915
+ {
916
+ role: "group",
917
+ "aria-labelledby": L ? et : void 0,
918
+ "aria-label": L ? void 0 : l("voiceControl.candidates"),
919
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
920
+ "data-voice-candidates": "",
921
+ children: [
922
+ L ? /* @__PURE__ */ o(
923
+ "p",
924
+ {
925
+ id: et,
926
+ className: "ds:m-0 type-body-sm ds:text-[color:var(--foreground)]",
927
+ children: L
928
+ }
929
+ ) : null,
930
+ /* @__PURE__ */ o(pe, { as: "ol", density: "compact", children: q.map((e, n) => /* @__PURE__ */ o(
931
+ pe.Item,
932
+ {
933
+ title: /* @__PURE__ */ o(
934
+ "button",
935
+ {
936
+ type: "button",
937
+ disabled: p,
938
+ onClick: () => {
939
+ Ge.current = !0, H == null || H(e.id);
940
+ },
941
+ className: Dn(),
942
+ "data-candidate-id": e.id,
943
+ children: /* @__PURE__ */ c("span", { children: [
944
+ /* @__PURE__ */ o("span", { className: "ds:sr-only", children: l("voiceControl.candidate", {
945
+ number: n + 1
946
+ }) }),
947
+ " ",
948
+ /* @__PURE__ */ o("span", { className: "ds:font-medium", children: e.label }),
949
+ e.detail ? /* @__PURE__ */ c(Me, { children: [
950
+ " ",
951
+ /* @__PURE__ */ o("span", { className: "ds:ms-[var(--spacing-2xs)] type-meta ds:text-[color:var(--muted-foreground)]", children: e.detail })
952
+ ] }) : null
953
+ ] })
954
+ }
955
+ )
956
+ },
957
+ e.id
958
+ )) })
959
+ ]
960
+ }
961
+ ) : null,
962
+ ye && ye.length > 0 ? /* @__PURE__ */ c(gn, { open: we, onOpenChange: Ne, children: [
963
+ /* @__PURE__ */ c(vn, { className: Mn(), children: [
964
+ /* @__PURE__ */ o(
965
+ zn,
966
+ {
967
+ "aria-hidden": "true",
968
+ className: "ds:size-4 ds:shrink-0 ds:transition-transform ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none ds:[[data-state=open]_&]:rotate-180"
969
+ }
970
+ ),
971
+ /* @__PURE__ */ o("span", { children: w ? /* @__PURE__ */ o(
972
+ rn,
973
+ {
974
+ ns: "ui",
975
+ i18nKey: "voiceControl.commandsWithShortcut",
976
+ components: {
977
+ shortcut: /* @__PURE__ */ o(Jn, { keys: w.keys })
978
+ }
979
+ }
980
+ ) : l("voiceControl.commands") })
981
+ ] }),
982
+ /* @__PURE__ */ o(
983
+ hn,
984
+ {
985
+ "aria-label": l("voiceControl.commands"),
986
+ className: "ds:pt-[var(--spacing-xs)]",
987
+ children: /* @__PURE__ */ o(pe, { density: "compact", children: ye.map((e, n) => /* @__PURE__ */ o(
988
+ pe.Item,
989
+ {
990
+ title: e.phrase,
991
+ description: e.description
992
+ },
993
+ n
994
+ )) })
995
+ }
996
+ )
997
+ ] }) : null
998
+ ] }), wt = /* @__PURE__ */ c("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
999
+ Xt,
1000
+ Zt,
1001
+ /* @__PURE__ */ o("div", { ref: it, className: "ds:contents", children: xt ?? Yt ?? /* @__PURE__ */ c(Me, { children: [
1002
+ en,
1003
+ tn
1004
+ ] }) })
1005
+ ] }), Nt = /* @__PURE__ */ o(xn, { politeness: "polite", "data-voice-announcer": "", children: Le.text ? (
1006
+ // Alternate a trailing no-break space so the same words said
1007
+ // twice in a row still change the region and are announced.
1008
+ `${Le.text}${Le.count % 2 ? to : ""}`
1009
+ ) : "" });
1010
+ if (!g)
1011
+ return /* @__PURE__ */ c(
1012
+ "div",
1013
+ {
1014
+ ref: nt,
1015
+ role: "group",
1016
+ "aria-labelledby": xe,
1017
+ "data-component": "voice-control-panel",
1018
+ "data-component-id": W,
1019
+ "data-status": t,
1020
+ id: W,
1021
+ ...Ze,
1022
+ className: Vn({ status: t, className: Xe }),
1023
+ children: [
1024
+ wt,
1025
+ Nt
1026
+ ]
1027
+ }
1028
+ );
1029
+ const Fe = t === "listening", De = Fe || t === "paused", nn = De && !ue.toLocaleLowerCase().includes(V.toLocaleLowerCase()) ? l("voiceControl.statusWithAction", {
1030
+ status: V,
1031
+ action: ue
1032
+ }) : ue;
1033
+ return /* @__PURE__ */ c(
1034
+ "div",
1035
+ {
1036
+ ref: nt,
1037
+ "data-component": "voice-control-panel",
1038
+ "data-component-id": W,
1039
+ "data-status": t,
1040
+ "data-layout": "floating",
1041
+ "data-position": be,
1042
+ "data-open": y ? "" : void 0,
1043
+ id: W,
1044
+ ...Ze,
1045
+ className: $n({ position: be, className: Xe }),
1046
+ children: [
1047
+ /* @__PURE__ */ o(
1048
+ "div",
1049
+ {
1050
+ ref: ne,
1051
+ id: tt,
1052
+ role: "group",
1053
+ "aria-labelledby": xe,
1054
+ tabIndex: -1,
1055
+ hidden: !y,
1056
+ className: jn({ position: be }),
1057
+ "data-voice-panel": "",
1058
+ children: wt
1059
+ }
1060
+ ),
1061
+ /* @__PURE__ */ c(
1062
+ "div",
1063
+ {
1064
+ ref: st,
1065
+ className: "ds:relative",
1066
+ "data-ai-sparkle": pt["data-ai-sparkle"],
1067
+ children: [
1068
+ /* @__PURE__ */ c("div", { className: Nn, "data-voice-pill": "", children: [
1069
+ cn(
1070
+ /* @__PURE__ */ c(
1071
+ "button",
1072
+ {
1073
+ type: "button",
1074
+ onClick: () => le(),
1075
+ disabled: p && !lt || void 0,
1076
+ "aria-label": nn,
1077
+ "aria-busy": fe || void 0,
1078
+ "aria-keyshortcuts": w == null ? void 0 : w.aria,
1079
+ className: Ct({
1080
+ // The word on the red needs 7:1 in the accessible themes:
1081
+ // `labelled` holds the hover red there.
1082
+ recording: Fe ? "labelled" : !1,
1083
+ className: qn({ extended: De })
1084
+ }),
1085
+ "data-voice-mic": "",
1086
+ children: [
1087
+ fe ? /* @__PURE__ */ o(
1088
+ At,
1089
+ {
1090
+ "aria-hidden": "true",
1091
+ className: "ds:size-5 ds:animate-[var(--accessible-off,spin_1s_linear_infinite)] ds:motion-reduce:animate-none"
1092
+ }
1093
+ ) : Fe ? /* @__PURE__ */ o(
1094
+ Rt,
1095
+ {
1096
+ "aria-hidden": "true",
1097
+ className: "ds:size-5 ds:fill-current"
1098
+ }
1099
+ ) : /* @__PURE__ */ o(Et, { "aria-hidden": "true", className: "ds:size-5" }),
1100
+ De ? /* @__PURE__ */ o("span", { className: "type-label ds:whitespace-nowrap", children: V }) : null
1101
+ ]
1102
+ }
1103
+ ),
1104
+ Wt,
1105
+ // The pill sits at the foot of the viewport: the card opens up.
1106
+ "top"
1107
+ ),
1108
+ /* @__PURE__ */ o("span", { "aria-hidden": "true", className: Cn }),
1109
+ /* @__PURE__ */ o(
1110
+ "button",
1111
+ {
1112
+ ref: ke,
1113
+ type: "button",
1114
+ onClick: () => {
1115
+ y ? Ve(!1) : (E.current = null, b(!0), f("panel"));
1116
+ },
1117
+ "aria-label": l("voiceControl.panelToggle"),
1118
+ "aria-expanded": y,
1119
+ "aria-controls": tt,
1120
+ className: Ct({ recording: !1 }),
1121
+ "data-voice-launcher": "",
1122
+ children: /* @__PURE__ */ o(Ln, { "aria-hidden": "true", className: "ds:size-5" })
1123
+ }
1124
+ ),
1125
+ ft ? /* @__PURE__ */ o(
1126
+ "span",
1127
+ {
1128
+ "aria-hidden": "true",
1129
+ className: `${kn} ${pt.className}`
1130
+ }
1131
+ ) : null
1132
+ ] }),
1133
+ /* @__PURE__ */ o(fn, { state: ft })
1134
+ ]
1135
+ }
1136
+ ),
1137
+ Nt
1138
+ ]
1139
+ }
1140
+ );
1141
+ }
1142
+ );
1143
+ no.displayName = "VoiceControlPanel";
1144
+ export {
1145
+ no as V,
1146
+ Gn as v
1147
+ };
1148
+ //# sourceMappingURL=voice-control-panel-B8Lrk0C4.js.map