@mieweb/ui 0.11.0-dev.0 → 0.11.0-dev.10

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 (195) hide show
  1. package/dist/ag-grid.cjs +11 -2
  2. package/dist/ag-grid.cjs.map +1 -1
  3. package/dist/ag-grid.d.cts +8 -0
  4. package/dist/ag-grid.d.ts +8 -0
  5. package/dist/ag-grid.js +11 -2
  6. package/dist/ag-grid.js.map +1 -1
  7. package/dist/brands/index.cjs +12 -12
  8. package/dist/brands/index.js +3 -3
  9. package/dist/{chunk-U2RS574O.cjs → chunk-2GBVJHWN.cjs} +120 -63
  10. package/dist/chunk-2GBVJHWN.cjs.map +1 -0
  11. package/dist/{chunk-7UTBDFFL.cjs → chunk-2S76TRBJ.cjs} +4 -4
  12. package/dist/{chunk-7UTBDFFL.cjs.map → chunk-2S76TRBJ.cjs.map} +1 -1
  13. package/dist/{chunk-IJYTASQQ.cjs → chunk-3AD4HFYI.cjs} +15 -7
  14. package/dist/chunk-3AD4HFYI.cjs.map +1 -0
  15. package/dist/{chunk-J2CKXXOW.js → chunk-4I6BW3FB.js} +8 -5
  16. package/dist/chunk-4I6BW3FB.js.map +1 -0
  17. package/dist/{chunk-CFI3TQMA.cjs → chunk-56C7K4MV.cjs} +9 -4
  18. package/dist/chunk-56C7K4MV.cjs.map +1 -0
  19. package/dist/{chunk-TNUL4LGG.js → chunk-5ILCNY74.js} +15 -7
  20. package/dist/chunk-5ILCNY74.js.map +1 -0
  21. package/dist/{chunk-ECYIDXG6.cjs → chunk-5K7PRPSV.cjs} +32 -2
  22. package/dist/chunk-5K7PRPSV.cjs.map +1 -0
  23. package/dist/{chunk-FBN2VHUV.cjs → chunk-5VA2HJ5B.cjs} +8 -8
  24. package/dist/{chunk-FBN2VHUV.cjs.map → chunk-5VA2HJ5B.cjs.map} +1 -1
  25. package/dist/{chunk-XHK5VZ4L.cjs → chunk-6ZA574PU.cjs} +8 -5
  26. package/dist/chunk-6ZA574PU.cjs.map +1 -0
  27. package/dist/{chunk-PJ6CC53R.cjs → chunk-AKMTPCLC.cjs} +13 -8
  28. package/dist/chunk-AKMTPCLC.cjs.map +1 -0
  29. package/dist/{chunk-OODVC2UD.cjs → chunk-AWSSWNJY.cjs} +2 -2
  30. package/dist/{chunk-OODVC2UD.cjs.map → chunk-AWSSWNJY.cjs.map} +1 -1
  31. package/dist/chunk-BFVYM6IT.cjs +345 -0
  32. package/dist/chunk-BFVYM6IT.cjs.map +1 -0
  33. package/dist/{chunk-VVDE4CHU.js → chunk-C4GEPUE7.js} +13 -8
  34. package/dist/chunk-C4GEPUE7.js.map +1 -0
  35. package/dist/{chunk-TJ4GWQPM.js → chunk-DAAJ3B2T.js} +121 -65
  36. package/dist/chunk-DAAJ3B2T.js.map +1 -0
  37. package/dist/{chunk-QJ2L5RU6.js → chunk-DSQCYX7L.js} +2 -2
  38. package/dist/{chunk-QJ2L5RU6.js.map → chunk-DSQCYX7L.js.map} +1 -1
  39. package/dist/{chunk-NUB5HRKS.js → chunk-DT3X3RBM.js} +3 -3
  40. package/dist/{chunk-NUB5HRKS.js.map → chunk-DT3X3RBM.js.map} +1 -1
  41. package/dist/{chunk-KVTKSPX5.js → chunk-EBQG3NGT.js} +32 -2
  42. package/dist/chunk-EBQG3NGT.js.map +1 -0
  43. package/dist/{chunk-OW3SQJ7P.js → chunk-EI4JU5JF.js} +3 -3
  44. package/dist/{chunk-OW3SQJ7P.js.map → chunk-EI4JU5JF.js.map} +1 -1
  45. package/dist/{chunk-MYAU2ZUC.cjs → chunk-GDKOYVX3.cjs} +14 -10
  46. package/dist/chunk-GDKOYVX3.cjs.map +1 -0
  47. package/dist/{chunk-JSXIB6EJ.cjs → chunk-GLG6UE2H.cjs} +12 -7
  48. package/dist/chunk-GLG6UE2H.cjs.map +1 -0
  49. package/dist/{chunk-JTSKPDPH.cjs → chunk-HIYQ3M5V.cjs} +4 -3
  50. package/dist/chunk-HIYQ3M5V.cjs.map +1 -0
  51. package/dist/{chunk-7IBZA7G6.js → chunk-I6Y2KLTZ.js} +5 -2
  52. package/dist/chunk-I6Y2KLTZ.js.map +1 -0
  53. package/dist/chunk-IZY4CMOO.js +715 -0
  54. package/dist/chunk-IZY4CMOO.js.map +1 -0
  55. package/dist/{chunk-753ENNB6.js → chunk-J3QEMZCH.js} +2 -2
  56. package/dist/{chunk-753ENNB6.js.map → chunk-J3QEMZCH.js.map} +1 -1
  57. package/dist/{chunk-S2JZL4JC.js → chunk-JM4YFLO4.js} +22 -15
  58. package/dist/chunk-JM4YFLO4.js.map +1 -0
  59. package/dist/{chunk-H3ROMJYI.cjs → chunk-KY67AMQ5.cjs} +4 -4
  60. package/dist/{chunk-H3ROMJYI.cjs.map → chunk-KY67AMQ5.cjs.map} +1 -1
  61. package/dist/{chunk-QX6AAVDE.cjs → chunk-L4APW65W.cjs} +15 -6
  62. package/dist/chunk-L4APW65W.cjs.map +1 -0
  63. package/dist/{chunk-OHKO5THF.cjs → chunk-MGFRGPWI.cjs} +3 -2
  64. package/dist/chunk-MGFRGPWI.cjs.map +1 -0
  65. package/dist/{chunk-RM2HPQIC.js → chunk-MQ5WJ3NO.js} +4 -4
  66. package/dist/chunk-MQ5WJ3NO.js.map +1 -0
  67. package/dist/{chunk-VNWJTCBQ.js → chunk-MQOYDQTF.js} +4 -3
  68. package/dist/chunk-MQOYDQTF.js.map +1 -0
  69. package/dist/chunk-MZA2LDS4.js +321 -0
  70. package/dist/chunk-MZA2LDS4.js.map +1 -0
  71. package/dist/{chunk-EBKE4DLU.js → chunk-N6XBE47W.js} +4 -4
  72. package/dist/{chunk-EBKE4DLU.js.map → chunk-N6XBE47W.js.map} +1 -1
  73. package/dist/{chunk-T5BBZQ66.js → chunk-OTIKWEFZ.js} +9 -4
  74. package/dist/chunk-OTIKWEFZ.js.map +1 -0
  75. package/dist/{chunk-YZCM7CXK.js → chunk-OZKJYLN6.js} +3 -3
  76. package/dist/{chunk-YZCM7CXK.js.map → chunk-OZKJYLN6.js.map} +1 -1
  77. package/dist/{chunk-ZSGEGISB.cjs → chunk-PHUTJKHL.cjs} +5 -2
  78. package/dist/chunk-PHUTJKHL.cjs.map +1 -0
  79. package/dist/{chunk-FMEA6WAY.cjs → chunk-Q6QLGCL7.cjs} +9 -9
  80. package/dist/{chunk-FMEA6WAY.cjs.map → chunk-Q6QLGCL7.cjs.map} +1 -1
  81. package/dist/{chunk-XOIIUO6O.js → chunk-QDNHN7R2.js} +3 -2
  82. package/dist/chunk-QDNHN7R2.js.map +1 -0
  83. package/dist/{chunk-XRVMYT5G.cjs → chunk-QKW2QCGI.cjs} +5 -5
  84. package/dist/chunk-QKW2QCGI.cjs.map +1 -0
  85. package/dist/{chunk-NAH65KPK.cjs → chunk-TOJ56HKQ.cjs} +2 -2
  86. package/dist/{chunk-NAH65KPK.cjs.map → chunk-TOJ56HKQ.cjs.map} +1 -1
  87. package/dist/chunk-TRZLN32I.cjs +740 -0
  88. package/dist/chunk-TRZLN32I.cjs.map +1 -0
  89. package/dist/{chunk-O6XDA3SI.js → chunk-UY2EZYIC.js} +15 -6
  90. package/dist/chunk-UY2EZYIC.js.map +1 -0
  91. package/dist/{chunk-2BPIVWAK.js → chunk-V5VPECJI.js} +14 -10
  92. package/dist/chunk-V5VPECJI.js.map +1 -0
  93. package/dist/{chunk-O6BJMVGT.cjs → chunk-XZNHS7YQ.cjs} +24 -17
  94. package/dist/chunk-XZNHS7YQ.cjs.map +1 -0
  95. package/dist/{chunk-7X6R3JIA.js → chunk-YFWDS6MX.js} +12 -7
  96. package/dist/chunk-YFWDS6MX.js.map +1 -0
  97. package/dist/components/AudioPlayer/index.cjs +7 -6
  98. package/dist/components/AudioPlayer/index.js +2 -1
  99. package/dist/components/CollabStatus/index.cjs +5 -4
  100. package/dist/components/CollabStatus/index.js +2 -1
  101. package/dist/components/CountryCodeDropdown/index.cjs +4 -4
  102. package/dist/components/CountryCodeDropdown/index.js +1 -1
  103. package/dist/components/DateInput/index.cjs +2 -2
  104. package/dist/components/DateInput/index.js +1 -1
  105. package/dist/components/DictationButton/index.cjs +23 -0
  106. package/dist/components/DictationButton/index.cjs.map +1 -0
  107. package/dist/components/DictationButton/index.d.cts +78 -0
  108. package/dist/components/DictationButton/index.d.ts +78 -0
  109. package/dist/components/DictationButton/index.js +6 -0
  110. package/dist/components/DictationButton/index.js.map +1 -0
  111. package/dist/components/Markdown/index.cjs +10 -10
  112. package/dist/components/Markdown/index.js +2 -2
  113. package/dist/components/MediaEditor/index.cjs +8 -7
  114. package/dist/components/MediaEditor/index.js +3 -2
  115. package/dist/components/MegaMenu/index.cjs +5 -4
  116. package/dist/components/MegaMenu/index.js +2 -1
  117. package/dist/components/PhoneInput/index.cjs +3 -3
  118. package/dist/components/PhoneInput/index.js +1 -1
  119. package/dist/components/RecordButton/index.cjs +4 -4
  120. package/dist/components/RecordButton/index.js +1 -1
  121. package/dist/components/Slider/index.cjs +6 -5
  122. package/dist/components/Slider/index.js +2 -1
  123. package/dist/components/SliderCalculator/index.cjs +5 -4
  124. package/dist/components/SliderCalculator/index.js +3 -2
  125. package/dist/components/SuperChat/index.cjs +14 -14
  126. package/dist/components/SuperChat/index.cjs.map +1 -1
  127. package/dist/components/SuperChat/index.d.cts +10 -6
  128. package/dist/components/SuperChat/index.d.ts +10 -6
  129. package/dist/components/SuperChat/index.js +4 -4
  130. package/dist/components/SuperChat/index.js.map +1 -1
  131. package/dist/components/SuperChat/plugins/index.cjs +3 -3
  132. package/dist/components/SuperChat/plugins/index.d.cts +2 -2
  133. package/dist/components/SuperChat/plugins/index.d.ts +2 -2
  134. package/dist/components/SuperChat/plugins/index.js +2 -2
  135. package/dist/components/Table/index.cjs +9 -9
  136. package/dist/components/Table/index.d.cts +17 -1
  137. package/dist/components/Table/index.d.ts +17 -1
  138. package/dist/components/Table/index.js +1 -1
  139. package/dist/components/ThemeProvider/index.cjs +9 -8
  140. package/dist/components/ThemeProvider/index.js +3 -2
  141. package/dist/components/Tooltip/index.cjs +3 -2
  142. package/dist/components/Tooltip/index.d.cts +6 -2
  143. package/dist/components/Tooltip/index.d.ts +6 -2
  144. package/dist/components/Tooltip/index.js +2 -1
  145. package/dist/deck.cjs +1 -1
  146. package/dist/deck.cjs.map +1 -1
  147. package/dist/deck.js +1 -1
  148. package/dist/deck.js.map +1 -1
  149. package/dist/esheet.cjs +6 -6
  150. package/dist/esheet.js +3 -3
  151. package/dist/index.cjs +629 -1163
  152. package/dist/index.cjs.map +1 -1
  153. package/dist/index.d.cts +160 -16
  154. package/dist/index.d.ts +160 -16
  155. package/dist/index.js +235 -839
  156. package/dist/index.js.map +1 -1
  157. package/dist/styles/init.css +39 -0
  158. package/dist/styles.css +1 -1
  159. package/dist/tailwind-preset.cjs +4 -4
  160. package/dist/tailwind-preset.js +1 -1
  161. package/dist/{types-Cx1FHLq2.d.cts → types-DSWbrVkM.d.cts} +1 -1
  162. package/dist/{types-Cx1FHLq2.d.ts → types-DSWbrVkM.d.ts} +1 -1
  163. package/dist/whisperTranscribe-AV752TZI.cjs +81 -0
  164. package/dist/whisperTranscribe-AV752TZI.cjs.map +1 -0
  165. package/dist/whisperTranscribe-UBNUWXUQ.js +4 -0
  166. package/dist/whisperTranscribe-UBNUWXUQ.js.map +1 -0
  167. package/package.json +1 -1
  168. package/dist/chunk-2BPIVWAK.js.map +0 -1
  169. package/dist/chunk-7IBZA7G6.js.map +0 -1
  170. package/dist/chunk-7X6R3JIA.js.map +0 -1
  171. package/dist/chunk-CFI3TQMA.cjs.map +0 -1
  172. package/dist/chunk-ECYIDXG6.cjs.map +0 -1
  173. package/dist/chunk-IJYTASQQ.cjs.map +0 -1
  174. package/dist/chunk-J2CKXXOW.js.map +0 -1
  175. package/dist/chunk-JSXIB6EJ.cjs.map +0 -1
  176. package/dist/chunk-JTSKPDPH.cjs.map +0 -1
  177. package/dist/chunk-KVTKSPX5.js.map +0 -1
  178. package/dist/chunk-MYAU2ZUC.cjs.map +0 -1
  179. package/dist/chunk-O6BJMVGT.cjs.map +0 -1
  180. package/dist/chunk-O6XDA3SI.js.map +0 -1
  181. package/dist/chunk-OHKO5THF.cjs.map +0 -1
  182. package/dist/chunk-PJ6CC53R.cjs.map +0 -1
  183. package/dist/chunk-QX6AAVDE.cjs.map +0 -1
  184. package/dist/chunk-RM2HPQIC.js.map +0 -1
  185. package/dist/chunk-S2JZL4JC.js.map +0 -1
  186. package/dist/chunk-T5BBZQ66.js.map +0 -1
  187. package/dist/chunk-TJ4GWQPM.js.map +0 -1
  188. package/dist/chunk-TNUL4LGG.js.map +0 -1
  189. package/dist/chunk-U2RS574O.cjs.map +0 -1
  190. package/dist/chunk-VNWJTCBQ.js.map +0 -1
  191. package/dist/chunk-VVDE4CHU.js.map +0 -1
  192. package/dist/chunk-XHK5VZ4L.cjs.map +0 -1
  193. package/dist/chunk-XOIIUO6O.js.map +0 -1
  194. package/dist/chunk-XRVMYT5G.cjs.map +0 -1
  195. package/dist/chunk-ZSGEGISB.cjs.map +0 -1
package/dist/index.js CHANGED
@@ -1,20 +1,24 @@
1
1
  import { getModelBytes } from './chunk-6I7IDZ4A.js';
2
+ import { registerModelServiceWorker, warmWhisper, transcribeSegments, decodeTo16kMono, isOzwellConfigured, askOzwell, subscribeDictationLoad, getDictationLoad, toOzwellMessages, askOzwellStream, transcribeSamples, trimTrailingStopPhrase, stripStopPhrase, transcribeBlob, transcribeServer } from './chunk-IZY4CMOO.js';
3
+ export { askOzwell, askOzwellStream, decodeTo16kMono, endsWithDone, getDictationLoad, getOzwellConfig, isOzwellConfigured, isWhisperLoaded, stripStopPhrase, subscribeDictationLoad, toOzwellMessages, transcribeBlob, transcribeGate, transcribeSamples, transcribeSegments, transcribeServer, trimTrailingStopPhrase, warmStopGate, warmWhisper } from './chunk-IZY4CMOO.js';
2
4
  import { loadWhatPrints, saveWhatPrints, clearWhatPrints } from './chunk-74ENCTIK.js';
3
5
  export { clearVoiceprints, clearWhatPrints, getVoiceprints, loadWhatPrints, saveWhatPrints, setVoiceprints } from './chunk-74ENCTIK.js';
6
+ export { Rating, ReviewCard, defaultRatingLabels, defaultReviewCardLabels } from './chunk-CBBKWRLG.js';
4
7
  export { RecordHeader, defaultRecordHeaderLabels } from './chunk-DXFP53KF.js';
5
8
  export { RecordLayout, defaultRecordLayoutLabels } from './chunk-EGPDT7SM.js';
6
9
  export { TagEditor, defaultTagEditorLabels } from './chunk-DGHS5IVD.js';
7
10
  export { UserPicker, defaultUserPickerLabels } from './chunk-SZSRGUVO.js';
8
- export { brands } from './chunk-753ENNB6.js';
11
+ export { brands } from './chunk-J3QEMZCH.js';
12
+ export { defaultBrand } from './chunk-PSTGFXQG.js';
9
13
  export { enterpriseHealthBrand } from './chunk-Q77TE5DZ.js';
10
14
  export { miewebBrand } from './chunk-NERS5ZT6.js';
11
15
  export { wagglelineBrand } from './chunk-2NTYAALC.js';
12
16
  export { webchartBrand } from './chunk-CW66SO5O.js';
17
+ export { ccmeBrand } from './chunk-SCQRJPSV.js';
13
18
  export { ozwellBrand } from './chunk-5YUBQIC7.js';
14
- export { defaultBrand } from './chunk-PSTGFXQG.js';
15
19
  export { createBrandPreset, generateBrandCSS, generateTailwindTheme } from './chunk-5GOWFNQ6.js';
16
20
  export { bluehiveBrand } from './chunk-PJEL5ZZV.js';
17
- export { ccmeBrand } from './chunk-SCQRJPSV.js';
21
+ import './chunk-GY5SP4ST.js';
18
22
  export { CalendarHeatmap, defaultCalendarHeatmapLabels } from './chunk-EPCUPHEO.js';
19
23
  export { CompletenessMeter, defaultCompletenessMeterLabels, getCompleteness } from './chunk-RLVYWUXG.js';
20
24
  export { FieldHistory, defaultFieldHistoryLabels } from './chunk-6N7NMOSV.js';
@@ -22,7 +26,7 @@ export { LogoUploader, defaultLogoUploaderLabels } from './chunk-WQHBMZSC.js';
22
26
  export { PhiMask, defaultPhiMaskLabels } from './chunk-DHGCLPFZ.js';
23
27
  export { PropertyList, defaultPropertyListLabels } from './chunk-7HUTR6RX.js';
24
28
  export { InlineEdit, defaultInlineEditLabels } from './chunk-M3VPGJMV.js';
25
- export { Rating, ReviewCard, defaultRatingLabels, defaultReviewCardLabels } from './chunk-CBBKWRLG.js';
29
+ export { ViewSet } from './chunk-4RI3CQGE.js';
26
30
  export { TranscriptView, formatTimestampMs } from './chunk-LAEIVOIY.js';
27
31
  export { PlayButton, VideoCard } from './chunk-43K7OQ3E.js';
28
32
  export { VisuallyHidden } from './chunk-H2CIKJQI.js';
@@ -33,43 +37,42 @@ import './chunk-YGS2TRMP.js';
33
37
  export { AssociationList, defaultAssociationListLabels } from './chunk-5HKZR6UG.js';
34
38
  import './chunk-FTEZNCRI.js';
35
39
  import './chunk-Y424YL55.js';
36
- import './chunk-GY5SP4ST.js';
40
+ import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from './chunk-5ILCNY74.js';
41
+ export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from './chunk-5ILCNY74.js';
37
42
  import { Text } from './chunk-3YSIZ2CK.js';
38
43
  export { SmallMuted, Text, textVariants } from './chunk-3YSIZ2CK.js';
39
- export { ThemeProvider, ThemeProviderContext, ThemeToggle, themeToggleIconVariants, themeToggleVariants, useThemeContext } from './chunk-OW3SQJ7P.js';
44
+ export { ThemeProvider, ThemeProviderContext, ThemeToggle, themeToggleIconVariants, themeToggleVariants, useThemeContext } from './chunk-EI4JU5JF.js';
40
45
  export { Toggle, toggleVariants } from './chunk-PTZB2GKL.js';
41
- export { ViewSet } from './chunk-4RI3CQGE.js';
42
46
  export { ViewSwitcher, viewSwitcherVariants } from './chunk-2W73UQ3T.js';
47
+ import { Skeleton } from './chunk-ZIUADGAR.js';
48
+ export { Skeleton, SkeletonCard, SkeletonTable, SkeletonText, skeletonVariants } from './chunk-ZIUADGAR.js';
43
49
  export { SourceTip } from './chunk-KFEN2SRZ.js';
44
50
  export { Sparkline } from './chunk-CG4ZKJLE.js';
45
- import { ButtonGroup, SparklesIcon, RefreshIcon, CloseIcon, JumpToBottomButton, AIMessageDisplay } from './chunk-RM2HPQIC.js';
46
- export { AILogoIcon, AIMessageDisplay, AITypingIndicator, ButtonGroup, ChatBubble, ChevronIcon, CloseIcon, CollapsiblePill, MCPToolCallDisplay, MessageAvatar, RefreshIcon, ResourceLink, SendIcon, SparklesIcon, SpinnerIcon, ToolStatusIcon, getToolIcon } from './chunk-RM2HPQIC.js';
47
- import { useTypingEmulation, EmptyState } from './chunk-YZCM7CXK.js';
48
- export { AttachmentPreview, ConversationHeader, ConversationListItem, ConversationListSkeleton, DateSeparator, EmptyState, LightboxModal, LoadMoreButton, MessageBubble, MessageList, MessageStatusIcon, MessageThread, MessagingSplitView, ReadReceiptIndicator, SkeletonMessage, TypingIndicator, bubbleVariants, formatDateLabel, formatFileSize, formatLastSeen, getConversationSubtitle, getConversationTitle, groupMessagesByDate, headerVariants, isSameSenderGroup, useMessageScroll, useMessages, useReadReceipts, useTypingEmulation, useTypingIndicator } from './chunk-YZCM7CXK.js';
49
- import { notifyComposerMigrationOnce, ChatComposer, DEFAULT_MAX_FILE_SIZE, DEFAULT_ACCEPTED_FILE_TYPES } from './chunk-TJ4GWQPM.js';
50
- export { AttachmentPicker, AttachmentPreviewItem, CameraButton, ChatComposer, ComposerModelSelector, DragDropZone, generateAttachmentId, getFileType, validateFile } from './chunk-TJ4GWQPM.js';
51
- import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from './chunk-TNUL4LGG.js';
52
- export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from './chunk-TNUL4LGG.js';
51
+ import { ButtonGroup, SparklesIcon, RefreshIcon, CloseIcon, JumpToBottomButton, AIMessageDisplay } from './chunk-MQ5WJ3NO.js';
52
+ export { AILogoIcon, AIMessageDisplay, AITypingIndicator, ButtonGroup, ChatBubble, ChevronIcon, CloseIcon, CollapsiblePill, MCPToolCallDisplay, MessageAvatar, RefreshIcon, ResourceLink, SendIcon, SparklesIcon, SpinnerIcon, ToolStatusIcon, getToolIcon } from './chunk-MQ5WJ3NO.js';
53
+ import { useTypingEmulation, EmptyState } from './chunk-OZKJYLN6.js';
54
+ export { AttachmentPreview, ConversationHeader, ConversationListItem, ConversationListSkeleton, DateSeparator, EmptyState, LightboxModal, LoadMoreButton, MessageBubble, MessageList, MessageStatusIcon, MessageThread, MessagingSplitView, ReadReceiptIndicator, SkeletonMessage, TypingIndicator, bubbleVariants, formatDateLabel, formatFileSize, formatLastSeen, getConversationSubtitle, getConversationTitle, groupMessagesByDate, headerVariants, isSameSenderGroup, useMessageScroll, useMessages, useReadReceipts, useTypingEmulation, useTypingIndicator } from './chunk-OZKJYLN6.js';
55
+ import { notifyComposerMigrationOnce, ChatComposer, DEFAULT_MAX_FILE_SIZE, DEFAULT_ACCEPTED_FILE_TYPES, ComposerSelector } from './chunk-DAAJ3B2T.js';
56
+ export { AttachmentPicker, AttachmentPreviewItem, CameraButton, ChatComposer, ComposerModelSelector, DragDropZone, generateAttachmentId, getFileType, validateFile } from './chunk-DAAJ3B2T.js';
53
57
  export { DateButton, DatePicker, RadioOption, SchedulePicker, TimeButton, TimePicker, dateButtonVariants, radioOptionVariants, timeButtonVariants } from './chunk-23AYDOCH.js';
54
58
  export { ScrollArea, scrollAreaVariants } from './chunk-HS25RPDW.js';
55
59
  export { SectionSpyNav } from './chunk-FIKO4WR6.js';
56
- export { AnimatedNumber, SliderCalculator } from './chunk-NUB5HRKS.js';
57
- import { Skeleton } from './chunk-ZIUADGAR.js';
58
- export { Skeleton, SkeletonCard, SkeletonTable, SkeletonText, skeletonVariants } from './chunk-ZIUADGAR.js';
59
- export { PhoneInput, PhoneInputGroup } from './chunk-XOIIUO6O.js';
60
+ export { AnimatedNumber, SliderCalculator } from './chunk-DT3X3RBM.js';
61
+ export { PhoneInput, PhoneInputGroup } from './chunk-QDNHN7R2.js';
60
62
  import { Progress } from './chunk-P4E3K3ND.js';
61
63
  export { CircularProgress, Progress, circularProgressVariants, progressBarFillVariants, progressBarTrackVariants } from './chunk-P4E3K3ND.js';
62
64
  export { QuickAction, QuickActionGroup, QuickActionIcons, quickActionIconVariants, quickActionVariants } from './chunk-TQDZLRIE.js';
63
65
  export { ReadingProgressBar } from './chunk-WKSUL2ZN.js';
64
- import { RecordButton } from './chunk-VNWJTCBQ.js';
65
- export { RecordButton, formatDuration, recordButtonVariants } from './chunk-VNWJTCBQ.js';
66
- export { FillerWordsModal, MediaEditor, SilenceSettingsModal, SpeedMarkerMenu, WordEditorModal } from './chunk-S2JZL4JC.js';
67
- export { Slider, sliderRangeVariants, sliderThumbVariants, sliderTrackVariants } from './chunk-2BPIVWAK.js';
66
+ export { DictationButton, defaultDictationLabels, useDictation } from './chunk-MZA2LDS4.js';
67
+ import { RecordButton } from './chunk-MQOYDQTF.js';
68
+ export { RecordButton, formatDuration, recordButtonVariants } from './chunk-MQOYDQTF.js';
69
+ export { FillerWordsModal, MediaEditor, SilenceSettingsModal, SpeedMarkerMenu, WordEditorModal } from './chunk-JM4YFLO4.js';
70
+ export { Slider, sliderRangeVariants, sliderThumbVariants, sliderTrackVariants } from './chunk-V5VPECJI.js';
68
71
  export { MediaFeed } from './chunk-2X54ZLT6.js';
69
72
  import './chunk-RISZWWEQ.js';
70
73
  export { MediaPlayer, inferMediaKind, mediaPlayerVariants } from './chunk-N54FYWG6.js';
71
- import { normalizePath, MegaMenuBar } from './chunk-J2CKXXOW.js';
72
- export { MegaMenu, MegaMenuBar, normalizePath } from './chunk-J2CKXXOW.js';
74
+ import { normalizePath, MegaMenuBar } from './chunk-4I6BW3FB.js';
75
+ export { MegaMenu, MegaMenuBar, normalizePath } from './chunk-4I6BW3FB.js';
73
76
  export { OrbitRing } from './chunk-SUS3WFY3.js';
74
77
  export { RadialExplorer } from './chunk-VOEXGDL5.js';
75
78
  export { Pagination, SimplePagination, paginationButtonVariants } from './chunk-PFKRHNYV.js';
@@ -78,15 +81,15 @@ export { GanttView, defaultGanttLabels } from './chunk-Y4QNLW7W.js';
78
81
  export { GlossaryTooltip } from './chunk-SRMTRD7F.js';
79
82
  export { Kbd, KeyboardShortcutsOverlay } from './chunk-JMAZ2GKT.js';
80
83
  export { ListView, itemVariants as listViewItemVariants } from './chunk-UNFDIBKJ.js';
81
- export { CodeBlock, MarkdownRenderer, highlightCode, useMarkdown } from './chunk-QJ2L5RU6.js';
84
+ export { CodeBlock, MarkdownRenderer, highlightCode, useMarkdown } from './chunk-DSQCYX7L.js';
85
+ export { SurveyBlock } from './chunk-RSJGTWLM.js';
82
86
  export { CsvBlock } from './chunk-P7D7BYFE.js';
83
87
  export { HtmlPreviewBlock } from './chunk-FGLIP6YR.js';
84
88
  export { MermaidBlock } from './chunk-7QW6TU4X.js';
85
- export { SurveyBlock } from './chunk-RSJGTWLM.js';
86
89
  export { FenceBlock } from './chunk-HDY7YQFX.js';
87
90
  export { CopyButton } from './chunk-5QZ73PZC.js';
88
- import { CountryDropdownBase } from './chunk-T5BBZQ66.js';
89
- export { CountryCodeDropdown, formatE164, validatePhoneNumber } from './chunk-T5BBZQ66.js';
91
+ import { CountryDropdownBase } from './chunk-OTIKWEFZ.js';
92
+ export { CountryCodeDropdown, formatE164, validatePhoneNumber } from './chunk-OTIKWEFZ.js';
90
93
  export { CustomizableDashboard, DashboardCustomizePanel, consolidateColumns, mergeColumnOrder, moveAcrossColumns, reorderOnDrop, requiredColumns } from './chunk-F6W62K4J.js';
91
94
  export { Sheet, SheetBody, SheetClose, SheetDescription, SheetFooter, SheetHeader, SheetTitle, sheetContentVariants, sheetOverlayVariants } from './chunk-LMBXJZLG.js';
92
95
  export { EMAIL_BLOCK_TYPES, EmailEditor, createDefaultDesignSettings, createEmailBlock, createEmailHtmlSanitizer, createEmptyEmailContentTree, defaultEmailEditorLabels, generateEmailBlockId, renderEmailMjml } from './chunk-LAN5VWGC.js';
@@ -109,13 +112,13 @@ import { Checkbox } from './chunk-753Z3NXL.js';
109
112
  export { Checkbox, CheckboxGroup, checkboxVariants } from './chunk-753Z3NXL.js';
110
113
  import './chunk-XXA4NZUC.js';
111
114
  export { ClampedText } from './chunk-VU3ZMJBN.js';
112
- export { CollabStatus, defaultCollabStatusLabels, useYjsCollabStatus } from './chunk-O6XDA3SI.js';
115
+ export { CollabStatus, defaultCollabStatusLabels, useYjsCollabStatus } from './chunk-UY2EZYIC.js';
113
116
  export { Collapsible, CollapsibleContent, CollapsibleTrigger } from './chunk-VSRO4PAI.js';
114
117
  import { Alert, AlertTitle, AlertDescription } from './chunk-3JWAABYI.js';
115
118
  export { Alert, AlertDescription, AlertTitle, alertVariants } from './chunk-3JWAABYI.js';
116
119
  import { AlertDialog } from './chunk-56VTM4OX.js';
117
120
  export { AlertDialog, ConfirmDialogProvider, defaultAlertDialogLabels, useConfirm } from './chunk-56VTM4OX.js';
118
- export { AudioPlayer, ProgressBar, audioPlayerVariants, formatTime as formatAudioTime, playButtonVariants } from './chunk-VVDE4CHU.js';
121
+ export { AudioPlayer, ProgressBar, audioPlayerVariants, formatTime as formatAudioTime, playButtonVariants } from './chunk-C4GEPUE7.js';
119
122
  export { AudioRecorder, audioRecorderVariants, controlButtonVariants, formatTime, waveformContainerVariants } from './chunk-2DW4PUJD.js';
120
123
  export { Autocomplete } from './chunk-UBOVDAD7.js';
121
124
  export { BoardView, cardVariants as boardViewCardVariants, defaultBoardLabels } from './chunk-F7SZSOB3.js';
@@ -137,7 +140,7 @@ export { useUrlTab } from './chunk-CVNPNZMX.js';
137
140
  import './chunk-7XUN3OQT.js';
138
141
  export { formatPhoneNumber, isPhoneNumberEmpty, isValidPhoneNumber, unformatPhoneNumber } from './chunk-ZVPJ2MH6.js';
139
142
  export { isHtmlEmpty, stripHtmlTags } from './chunk-ERLPVXOV.js';
140
- export { miewebUIPreset, miewebUISafelist } from './chunk-KVTKSPX5.js';
143
+ export { miewebUIPreset, miewebUISafelist } from './chunk-EBQG3NGT.js';
141
144
  export { Accordion } from './chunk-JUJGWUAN.js';
142
145
  import './chunk-H2Y7HZV5.js';
143
146
  export { AvatarGroup, defaultAvatarGroupLabels } from './chunk-DVDT7TX7.js';
@@ -148,16 +151,16 @@ import { Spinner, SpinnerWithLabel } from './chunk-UA7E7PDS.js';
148
151
  export { FullPageSpinner, Spinner, SpinnerWithLabel, spinnerVariants } from './chunk-UA7E7PDS.js';
149
152
  import { evaluateDue, completedKeys, normalizeOrders } from './chunk-Y5KEFV5O.js';
150
153
  export { buildChartOrderRows, buildEncounterOrderRows, dueForOrder, evaluateDue, evaluateProgram, isApplicable } from './chunk-Y5KEFV5O.js';
151
- import { useCodeLookupConfig, RowActionToolbar, RowIconButton, toolbarKeyNav, parseSig, labelToMedicationFields, MedicationEditor } from './chunk-EBKE4DLU.js';
152
- export { ALLERGY_TYPE_LABELS, AllergyList, AllergyManager, CodeLookupProvider, MEDICATION_STATUS_LABELS, MedicationEditor, MedicationList, MedicationReconciliation, RowActionToolbar, RowIconButton, labelToMedicationFields, lookupToMedicationFields, parseMedicationLabel, parseSig, toolbarKeyNav, useCodeLookupConfig } from './chunk-EBKE4DLU.js';
153
- import { Tooltip } from './chunk-7X6R3JIA.js';
154
- export { Tooltip } from './chunk-7X6R3JIA.js';
154
+ import { useCodeLookupConfig, RowActionToolbar, RowIconButton, toolbarKeyNav, parseSig, labelToMedicationFields, MedicationEditor } from './chunk-N6XBE47W.js';
155
+ export { ALLERGY_TYPE_LABELS, AllergyList, AllergyManager, CodeLookupProvider, MEDICATION_STATUS_LABELS, MedicationEditor, MedicationList, MedicationReconciliation, RowActionToolbar, RowIconButton, labelToMedicationFields, lookupToMedicationFields, parseMedicationLabel, parseSig, toolbarKeyNav, useCodeLookupConfig } from './chunk-N6XBE47W.js';
156
+ import { Tooltip } from './chunk-YFWDS6MX.js';
157
+ export { Tooltip } from './chunk-YFWDS6MX.js';
155
158
  import { RadioGroup, Radio } from './chunk-EPSB4WTL.js';
156
159
  export { Radio, RadioGroup, radioVariants } from './chunk-EPSB4WTL.js';
157
160
  import { Label } from './chunk-I3WGZPI6.js';
158
161
  export { Label, labelVariants } from './chunk-I3WGZPI6.js';
159
- import { DateInput } from './chunk-7IBZA7G6.js';
160
- export { DateInput } from './chunk-7IBZA7G6.js';
162
+ import { DateInput } from './chunk-I6Y2KLTZ.js';
163
+ export { DateInput } from './chunk-I6Y2KLTZ.js';
161
164
  import { Textarea } from './chunk-H3YO5GBM.js';
162
165
  export { Textarea, textareaVariants } from './chunk-H3YO5GBM.js';
163
166
  import { Select } from './chunk-VCI2Y7ST.js';
@@ -185,7 +188,7 @@ import { dateToDisplayFormat, isValidDate, displayFormatToDateString } from './c
185
188
  export { calculateAge, dateToDisplayFormat, displayFormatToDateString, formatDateValue, isDateEmpty, isDateInFuture, isDateInPast, isValidDate, isValidDrivingAge, parseDateValue } from './chunk-RC2YMOMS.js';
186
189
  import { isStorybookDocsMode } from './chunk-VSQF22GL.js';
187
190
  export { isStorybookDocsMode } from './chunk-VSQF22GL.js';
188
- import { Plus, RefreshCw, Pencil, GripVertical, Trash2, AlertCircle, ArrowLeft, Users, FilePlus, CheckCircle, ChevronDown, Clock, FileText, ClipboardList, Stethoscope, Mail, Phone, ClipboardCheck, Eye, Info, Link, ChevronUp, History, StickyNote, ExternalLink, MoreVertical, Send, Scan, TestTube2, Pill, Share, User, Download, ChevronRight, Calendar, Printer, ClipboardPlus, FileCheck, Wheat, Bell, FileHeart, HeartPulse, Paperclip, HelpCircle, MoreHorizontal, AlertTriangle, Upload as Upload$1, Camera, Check as Check$1, X as X$1, ScanLine, Image } from './chunk-BKSPDTX4.js';
191
+ import { AlertTriangle, Loader2, Plus, RefreshCw, Pencil, GripVertical, Trash2, AlertCircle, ArrowLeft, Users, FilePlus, CheckCircle, ChevronDown, Clock, FileText, ClipboardList, Stethoscope, Mail, Phone, ClipboardCheck, Eye, Info, Link, ChevronUp, History, StickyNote, ExternalLink, MoreVertical, Send, Scan, TestTube2, Pill, Share, User, Download, ChevronRight, Calendar, Printer, ClipboardPlus, FileCheck, Wheat, Bell, FileHeart, HeartPulse, Paperclip, HelpCircle, MoreHorizontal, Settings, Upload as Upload$1, Camera, Check as Check$1, X as X$1, ScanLine, Image } from './chunk-BKSPDTX4.js';
189
192
  export { Accessibility as AccessibilityIcon, Activity as ActivityIcon, AlertCircle as AlertCircleIcon, AlertTriangle as AlertTriangleIcon, Wheat as AllergyIcon, WheatOff as AllergyOffIcon, Ambulance as AmbulanceIcon, ArrowLeft as ArrowLeftIcon, ArrowRight as ArrowRightIcon, ArrowUpDown as ArrowUpDownIcon, ArrowUp as ArrowUpIcon, AtSign as AtSignIcon, Baby as BabyIcon, BadgeAlert as BadgeAlertIcon, BadgeCheck as BadgeCheckIcon, BadgeMinus as BadgeMinusIcon, BadgePlus as BadgePlusIcon, BadgeX as BadgeXIcon, Ban as BanIcon, Bandage as BandageIcon, BedDouble as BedDoubleIcon, Bed as BedIcon, BedSingle as BedSingleIcon, Bell as BellIcon, BellOff as BellOffIcon, Biohazard as BiohazardIcon, Bone as BoneIcon, BookOpenCheck as BookOpenCheckIcon, BookOpen as BookOpenIcon, Bookmark as BookmarkIcon, Bot as BotIcon, Brain as BrainIcon, Briefcase as BriefcaseIcon, BriefcaseMedical as BriefcaseMedicalIcon, Building as BuildingIcon, CalendarCheck as CalendarCheckIcon, Calendar as CalendarIcon, Camera as CameraIcon, Cannabis as CannabisIcon, BarChart3 as ChartIcon, CheckCircle as CheckCircleIcon, Check as CheckIcon, ChevronDown as ChevronDownIcon, ChevronLeft as ChevronLeftIcon, ChevronRight as ChevronRightIcon, ChevronUp as ChevronUpIcon, Cigarette as CigaretteIcon, CigaretteOff as CigaretteOffIcon, CircleDotDashed as CircleDotDashedIcon, CircleDot as CircleDotIcon, CircleUser as CircleUserIcon, ClipboardCheck as ClipboardCheckIcon, Clipboard as ClipboardIcon, ClipboardList as ClipboardListIcon, ClipboardPlus as ClipboardPlusIcon, Clock as ClockIcon, Cog as CogIcon, Columns as ColumnsIcon, Copy as CopyIcon, CreditCard as CreditCardIcon, Cross as CrossIcon, Dna as DnaIcon, DollarSign as DollarSignIcon, Download as DownloadIcon, Droplet as DropletIcon, Droplets as DropletsIcon, Ear as EarIcon, ExternalLink as ExternalLinkIcon, Eye as EyeIcon, EyeOff as EyeOffIcon, FileCheck2 as FileCheck2Icon, FileCheck as FileCheckIcon, FileHeart as FileHeartIcon, File as FileIcon, FilePlus2 as FilePlus2Icon, FilePlus as FilePlusIcon, FileText as FileTextIcon, Filter as FilterIcon, Fingerprint as FingerprintIcon, Flag as FlagIcon, FlaskConical as FlaskIcon, FlaskRound as FlaskRoundIcon, Folder as FolderIcon, FolderOpen as FolderOpenIcon, Footprints as FootprintsIcon, Glasses as GlassesIcon, Globe as GlobeIcon, LayoutGrid as GridIcon, GripVertical as GripVerticalIcon, Hand as HandIcon, HandMetal as HandMetalIcon, Hash as HashIcon, Heart as HeartIcon, HeartOff as HeartOffIcon, HeartPulse as HeartPulseIcon, HelpCircle as HelpCircleIcon, History as HistoryIcon, Home as HomeIcon, Hospital as HospitalIcon, Image as ImageIcon, Info as InfoIcon, Key as KeyIcon, Link as LinkIcon, List as ListIcon, Loader2 as LoaderIcon, Lock as LockIcon, LogIn as LogInIcon, LogOut as LogOutIcon, Mail as MailIcon, MapPin as MapPinIcon, Maximize as MaximizeIcon, Menu as MenuIcon, MessageSquare as MessageIcon, Mic as MicIcon, Microscope as MicroscopeIcon, Minimize as MinimizeIcon, Minus as MinusIcon, Monitor as MonitorIcon, Moon as MoonIcon, MoreHorizontal as MoreHorizontalIcon, MoreVertical as MoreVerticalIcon, NotebookPen as NotebookPenIcon, Palette as PaletteIcon, Paperclip as PaperclipIcon, CircleUserRound as PatientIcon, Pencil as PencilIcon, UserRound as PersonIcon, Phone as PhoneIcon, PieChart as PieChartIcon, Pill as PillIcon, Plus as PlusIcon, Printer as PrinterIcon, Radiation as RadiationIcon, Ruler as RulerIcon, Save as SaveIcon, Scale as ScaleIcon, Scaling as ScalingIcon, ScanEye as ScanEyeIcon, Scan as ScanIcon, ScanLine as ScanLineIcon, Search as SearchIcon, Settings as SettingsIcon, Share as ShareIcon, ShieldCheck as ShieldCheckIcon, Shield as ShieldIcon, ShieldPlus as ShieldPlusIcon, Sliders as SlidersIcon, Sparkle as SparkleIcon, Star as StarIcon, Stethoscope as StethoscopeIcon, StickyNote as StickyNoteIcon, Square as StopIcon, Sun as SunIcon, Syringe as SyringeIcon, Table as TableIcon, Tablets as TabletsIcon, Tag as TagIcon, TestTube2 as TestTubeIcon, TestTubes as TestTubesIcon, Thermometer as ThermometerIcon, ThermometerSun as ThermometerSunIcon, ThumbsDown as ThumbsDownIcon, ThumbsUp as ThumbsUpIcon, Timer as TimerIcon, Trash2 as TrashIcon, TrendingDown as TrendingDownIcon, TrendingUp as TrendingUpIcon, Truck as TruckIcon, Unlock as UnlockIcon, Upload as UploadIcon, UserCheck as UserCheckIcon, User as UserIcon, UserMinus as UserMinusIcon, UserPlus as UserPlusIcon, UserRoundCheck as UserRoundCheckIcon, UserRoundMinus as UserRoundMinusIcon, UserRoundPlus as UserRoundPlusIcon, UserRoundX as UserRoundXIcon, Users as UsersIcon, Weight as WeightIcon, Wrench as WrenchIcon, XCircle as XCircleIcon, X2 as XIcon, Zap as ZapIcon } from './chunk-BKSPDTX4.js';
190
193
  import { usePrefersReducedMotion } from './chunk-XDU65GLW.js';
191
194
  export { usePrefersReducedMotion } from './chunk-XDU65GLW.js';
@@ -206,11 +209,11 @@ export { cn, miewebUITwMergeConflicts } from './chunk-TQONQSJO.js';
206
209
  import './chunk-PX6F3LHL.js';
207
210
  import * as React13 from 'react';
208
211
  import React13__default, { createContext, useState, useEffect, useCallback, useMemo, useContext, useRef, useId } from 'react';
209
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
212
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
210
213
  import { cva } from 'class-variance-authority';
214
+ import { AudioWaveform, FileUp, X, AlertCircle as AlertCircle$1, Calendar as Calendar$1, ChevronLeft, ChevronRight as ChevronRight$1, ChevronDown as ChevronDown$1, Maximize2, Minimize2, FolderUp, Upload, Edit2, Check, ChevronUp as ChevronUp$1, Phone as Phone$1, Mail as Mail$1, Clock as Clock$1, MapPin, Shield, Building2, SlidersHorizontal, Trash2 as Trash2$1, Pencil as Pencil$1, Plus as Plus$1, ExternalLink as ExternalLink$1, Link as Link$1, AlertTriangle as AlertTriangle$1, RefreshCw as RefreshCw$1 } from 'lucide-react';
211
215
  import * as ReactDOM from 'react-dom';
212
216
  import { createPortal } from 'react-dom';
213
- import { FileUp, X, AlertCircle as AlertCircle$1, Calendar as Calendar$1, ChevronLeft, ChevronRight as ChevronRight$1, ChevronDown as ChevronDown$1, Maximize2, Minimize2, FolderUp, Upload, Edit2, Check, ChevronUp as ChevronUp$1, Phone as Phone$1, Mail as Mail$1, Clock as Clock$1, MapPin, Shield, Building2, SlidersHorizontal, Trash2 as Trash2$1, Pencil as Pencil$1, Plus as Plus$1, ExternalLink as ExternalLink$1, Link as Link$1, AlertTriangle as AlertTriangle$1, RefreshCw as RefreshCw$1 } from 'lucide-react';
214
217
 
215
218
  var SEX_OPTIONS = [
216
219
  { value: "F", label: "Female" },
@@ -2869,6 +2872,7 @@ function HeyOzwellToggle({
2869
2872
  "aria-hidden": "true",
2870
2873
  style: {
2871
2874
  position: "absolute",
2875
+ // rtl-ignore -- symmetric centering: left:50% + translate(-50%) is direction-independent
2872
2876
  left: "50%",
2873
2877
  top: "50%",
2874
2878
  width: size * 1.7,
@@ -2916,6 +2920,91 @@ function HeyOzwellToggle({
2916
2920
  }
2917
2921
  );
2918
2922
  }
2923
+ var defaultHeyOzwellSelectorLabels = {
2924
+ name: "Hey Ozwell",
2925
+ activate: "Activate",
2926
+ activateDescription: 'Listen for "Hey Ozwell"',
2927
+ disable: "Disable",
2928
+ disableDescription: "Wake word off",
2929
+ settings: "Voice settings\u2026",
2930
+ off: "Hey Ozwell is off",
2931
+ loading: "Hey Ozwell is starting",
2932
+ listening: 'Listening for "Hey Ozwell"',
2933
+ error: "Hey Ozwell could not start"
2934
+ };
2935
+ var iconClasses = "h-3.5 w-3.5 shrink-0";
2936
+ var phaseIcons = {
2937
+ off: /* @__PURE__ */ jsx(AudioWaveform, { className: iconClasses, "aria-hidden": "true" }),
2938
+ loading: /* @__PURE__ */ jsx(
2939
+ Loader2,
2940
+ {
2941
+ className: cn(iconClasses, "animate-spin"),
2942
+ "aria-hidden": "true"
2943
+ }
2944
+ ),
2945
+ listening: /* @__PURE__ */ jsx(
2946
+ AudioWaveform,
2947
+ {
2948
+ className: cn(iconClasses, "text-success"),
2949
+ "aria-hidden": "true"
2950
+ }
2951
+ ),
2952
+ error: /* @__PURE__ */ jsx(
2953
+ AlertTriangle,
2954
+ {
2955
+ className: cn(iconClasses, "text-destructive"),
2956
+ "aria-hidden": "true"
2957
+ }
2958
+ )
2959
+ };
2960
+ function HeyOzwellSelector({
2961
+ phase,
2962
+ onChange,
2963
+ onOpenSettings,
2964
+ error,
2965
+ disabled,
2966
+ labels: labelOverrides
2967
+ }) {
2968
+ const labels = { ...defaultHeyOzwellSelectorLabels, ...labelOverrides };
2969
+ const active = phase !== "off";
2970
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
2971
+ /* @__PURE__ */ jsx(
2972
+ ComposerSelector,
2973
+ {
2974
+ options: [
2975
+ {
2976
+ id: "on",
2977
+ label: labels.activate,
2978
+ description: phase === "error" ? error ?? labels.error : labels.activateDescription
2979
+ },
2980
+ {
2981
+ id: "off",
2982
+ label: labels.disable,
2983
+ description: labels.disableDescription
2984
+ }
2985
+ ],
2986
+ value: active ? "on" : "off",
2987
+ onChange: (id) => {
2988
+ const next = id === "on";
2989
+ if (next !== active || phase === "error") onChange(next);
2990
+ },
2991
+ actions: onOpenSettings && [
2992
+ {
2993
+ id: "settings",
2994
+ label: labels.settings,
2995
+ icon: /* @__PURE__ */ jsx(Settings, { className: "h-4 w-4", "aria-hidden": "true" }),
2996
+ onSelect: onOpenSettings
2997
+ }
2998
+ ],
2999
+ label: labels.name,
3000
+ triggerLabel: labels.name,
3001
+ icon: phaseIcons[phase],
3002
+ disabled
3003
+ }
3004
+ ),
3005
+ /* @__PURE__ */ jsx("span", { role: "status", className: "sr-only", children: labels[phase] })
3006
+ ] });
3007
+ }
2919
3008
 
2920
3009
  // src/components/AI/HeyOzwell/modelManifest.ts
2921
3010
  var MODEL_MANIFEST = [
@@ -3127,27 +3216,6 @@ function OzwellSettingsMenu({
3127
3216
  }
3128
3217
  );
3129
3218
  }
3130
-
3131
- // src/components/AI/modelCache.ts
3132
- var registered = /* @__PURE__ */ new Set();
3133
- function registerModelServiceWorker(swUrl = "/ozwell-model-sw.js") {
3134
- if (typeof navigator === "undefined" || !("serviceWorker" in navigator))
3135
- return;
3136
- if (registered.has(swUrl)) return;
3137
- registered.add(swUrl);
3138
- navigator.serviceWorker.register(swUrl).then(
3139
- () => console.log("[modelCache] model service worker registered"),
3140
- (e) => {
3141
- registered.delete(swUrl);
3142
- console.warn(
3143
- "[modelCache] SW registration failed (models will still load, just not cached):",
3144
- e
3145
- );
3146
- }
3147
- );
3148
- }
3149
-
3150
- // src/components/AI/HeyOzwell/WakeWord/useWakeWord.ts
3151
3219
  var DEFAULT_ASSET_BASE = "https://huggingface.co/jlocala/ozwell-voice-assets/resolve/main";
3152
3220
  var DEFAULT_ASSET = `${DEFAULT_ASSET_BASE}/wakeword`;
3153
3221
  var PHRASES = ["hey-ozwell", "ozwell-i'm-done"];
@@ -3426,679 +3494,6 @@ function useWakeWord(opts = {}) {
3426
3494
  }
3427
3495
  };
3428
3496
  }
3429
-
3430
- // src/components/AI/ozwellChat.ts
3431
- var DEFAULT_BASE = "https://api.ozwell.ai";
3432
- var OLLAMA_BASE = "http://localhost:11434";
3433
- var DEFAULTS = {
3434
- model: "gpt-4o-mini",
3435
- system: "You are Ozwell, a concise and helpful clinical assistant. Answer briefly and clearly.",
3436
- temperature: 0.7
3437
- };
3438
- function readWindowGlobal() {
3439
- if (typeof window === "undefined") return {};
3440
- const get = (w) => {
3441
- try {
3442
- return w?.__ozwell;
3443
- } catch {
3444
- return void 0;
3445
- }
3446
- };
3447
- return get(window) || get(window.parent) || get(window.top) || {};
3448
- }
3449
- function sanitizeConfig(o) {
3450
- if (!o || typeof o !== "object") return {};
3451
- const out = {};
3452
- for (const k of Object.keys(o)) {
3453
- if (k === "__proto__" || k === "constructor" || k === "prototype") continue;
3454
- out[k] = o[k];
3455
- }
3456
- return out;
3457
- }
3458
- function readRaw() {
3459
- let stored = {};
3460
- try {
3461
- stored = sanitizeConfig(
3462
- JSON.parse(localStorage.getItem("ozwellConfig") || "{}")
3463
- );
3464
- } catch {
3465
- }
3466
- return { ...stored, ...sanitizeConfig(readWindowGlobal()) };
3467
- }
3468
- function getOzwellConfig() {
3469
- const c = readRaw();
3470
- const apiKey = c.apiKey || "";
3471
- const baseURL = c.baseURL || (apiKey === "ollama" ? OLLAMA_BASE : DEFAULT_BASE);
3472
- return {
3473
- baseURL,
3474
- apiKey,
3475
- model: c.model || DEFAULTS.model,
3476
- system: c.system ?? DEFAULTS.system,
3477
- // Coerce: temperature set via console/localStorage often arrives as a string; a string in the request
3478
- // body can be rejected by OpenAI-compatible servers. Fall back to the default if it's not a real number —
3479
- // and guard the empty/whitespace string explicitly, since Number('') is 0 (a valid-looking temperature)
3480
- // and would silently pin sampling to 0 instead of using the default.
3481
- temperature: c.temperature != null && String(c.temperature).trim() !== "" && Number.isFinite(Number(c.temperature)) ? Number(c.temperature) : DEFAULTS.temperature
3482
- };
3483
- }
3484
- function isOzwellConfigured() {
3485
- return !!getOzwellConfig().apiKey;
3486
- }
3487
- function toOzwellMessages(msgs) {
3488
- const out = [];
3489
- for (const m of msgs) {
3490
- if (m.role !== "user" && m.role !== "assistant") continue;
3491
- const text = (m.content || []).map((c) => c.text || "").join(" ").trim();
3492
- if (text) out.push({ role: m.role, content: text });
3493
- }
3494
- return out;
3495
- }
3496
- function withSystem(messages, system) {
3497
- if (!system || messages.some((m) => m.role === "system")) return messages;
3498
- return [{ role: "system", content: system }, ...messages];
3499
- }
3500
- function buildRequest(messages, cfg, stream) {
3501
- const msgs = typeof messages === "string" ? [{ role: "user", content: messages }] : messages;
3502
- return {
3503
- url: `${cfg.baseURL.replace(/\/$/, "")}/v1/chat/completions`,
3504
- headers: {
3505
- "Content-Type": "application/json",
3506
- // 'ollama' is a sentinel that points baseURL at the local Ollama server, not a real credential —
3507
- // don't send it as a Bearer token (some local OpenAI-compatible servers reject unexpected auth).
3508
- ...cfg.apiKey && cfg.apiKey !== "ollama" ? { Authorization: `Bearer ${cfg.apiKey}` } : {}
3509
- },
3510
- body: JSON.stringify({
3511
- model: cfg.model,
3512
- messages: withSystem(msgs, cfg.system),
3513
- temperature: cfg.temperature,
3514
- stream
3515
- })
3516
- };
3517
- }
3518
- function resolveConfig(opts) {
3519
- const cfg = { ...getOzwellConfig(), ...opts };
3520
- if (opts.apiKey && !opts.baseURL && !readRaw().baseURL) {
3521
- cfg.baseURL = cfg.apiKey === "ollama" ? OLLAMA_BASE : DEFAULT_BASE;
3522
- }
3523
- return cfg;
3524
- }
3525
- async function askOzwell(messages, opts = {}) {
3526
- const cfg = resolveConfig(opts);
3527
- const req = buildRequest(messages, cfg, false);
3528
- const res = await fetch(req.url, {
3529
- method: "POST",
3530
- headers: req.headers,
3531
- body: req.body,
3532
- signal: opts.signal
3533
- });
3534
- if (!res.ok) throw new Error(`Ozwell API ${res.status}: ${res.statusText}`);
3535
- const data = await res.json();
3536
- return (data?.choices?.[0]?.message?.content ?? "").trim();
3537
- }
3538
- async function askOzwellStream(messages, onToken, opts = {}) {
3539
- const cfg = resolveConfig(opts);
3540
- const req = buildRequest(messages, cfg, true);
3541
- const res = await fetch(req.url, {
3542
- method: "POST",
3543
- headers: req.headers,
3544
- body: req.body,
3545
- signal: opts.signal
3546
- });
3547
- if (!res.ok || !res.body)
3548
- throw new Error(`Ozwell API ${res.status}: ${res.statusText}`);
3549
- const reader = res.body.getReader();
3550
- const decoder = new TextDecoder();
3551
- let buf = "";
3552
- let full = "";
3553
- const processEvent = (ev) => {
3554
- for (const line of ev.split(/\r?\n/)) {
3555
- if (!line.startsWith("data:")) continue;
3556
- const payload = line.slice(5).trim();
3557
- if (payload === "[DONE]") return true;
3558
- try {
3559
- const json = JSON.parse(payload);
3560
- const delta = json?.choices?.[0]?.delta?.content || "";
3561
- if (delta) {
3562
- full += delta;
3563
- onToken(delta, full);
3564
- }
3565
- } catch {
3566
- }
3567
- }
3568
- return false;
3569
- };
3570
- try {
3571
- for (; ; ) {
3572
- const { done, value } = await reader.read();
3573
- if (done) break;
3574
- buf += decoder.decode(value, { stream: true });
3575
- const events = buf.split(/\r?\n\r?\n/);
3576
- buf = events.pop() || "";
3577
- for (const ev of events) if (processEvent(ev)) return full;
3578
- }
3579
- buf += decoder.decode();
3580
- if (buf.trim()) processEvent(buf);
3581
- } finally {
3582
- try {
3583
- await reader.cancel();
3584
- } catch {
3585
- }
3586
- }
3587
- return full;
3588
- }
3589
-
3590
- // src/components/AI/whisperTranscribe.ts
3591
- var HF_HOST = "https://huggingface.co";
3592
- var HF_PATH = "{model}/resolve/{revision}/";
3593
- var R2_HOST = "https://pub-64db68afc2cb4e108ff06e7e583f09d1.r2.dev";
3594
- function whisperHost() {
3595
- if (typeof window === "undefined") return R2_HOST;
3596
- const fromWin = (w) => {
3597
- try {
3598
- return w?.__ozwellWhisperHost;
3599
- } catch {
3600
- return void 0;
3601
- }
3602
- };
3603
- const win = fromWin(window) || fromWin(window.parent) || fromWin(window.top);
3604
- if (win) return win.replace(/\/$/, "");
3605
- try {
3606
- const h = JSON.parse(
3607
- localStorage.getItem("ozwellConfig") || "{}"
3608
- ).whisperHost;
3609
- if (h) return String(h).replace(/\/$/, "");
3610
- } catch {
3611
- }
3612
- return R2_HOST;
3613
- }
3614
- var SMALL_MODELS = {
3615
- tiny: "Xenova/whisper-tiny.en",
3616
- "tiny.en": "Xenova/whisper-tiny.en",
3617
- base: "Xenova/whisper-base.en",
3618
- "base.en": "Xenova/whisper-base.en",
3619
- small: "Xenova/whisper-small.en",
3620
- "small.en": "Xenova/whisper-small.en"
3621
- };
3622
- var GATE_MODEL = "Xenova/whisper-base.en";
3623
- function whisperPref() {
3624
- if (typeof window === "undefined") return null;
3625
- const fromWin = (w) => {
3626
- try {
3627
- return w?.__ozwell?.whisper;
3628
- } catch {
3629
- return void 0;
3630
- }
3631
- };
3632
- const win = fromWin(window) || fromWin(window.parent) || fromWin(window.top);
3633
- if (win) return win;
3634
- try {
3635
- return JSON.parse(localStorage.getItem("ozwellConfig") || "{}").whisper || null;
3636
- } catch {
3637
- return null;
3638
- }
3639
- }
3640
- function whisperDevice() {
3641
- if (typeof window === "undefined") return null;
3642
- const fromWin = (w) => {
3643
- try {
3644
- return w?.__ozwell?.whisperDevice;
3645
- } catch {
3646
- return void 0;
3647
- }
3648
- };
3649
- const win = fromWin(window) || fromWin(window.parent) || fromWin(window.top);
3650
- if (win) return win;
3651
- try {
3652
- return JSON.parse(localStorage.getItem("ozwellConfig") || "{}").whisperDevice || null;
3653
- } catch {
3654
- return null;
3655
- }
3656
- }
3657
- function whisperDtype() {
3658
- if (typeof window === "undefined") return null;
3659
- const fromWin = (w) => {
3660
- try {
3661
- return w?.__ozwell?.whisperDtype;
3662
- } catch {
3663
- return void 0;
3664
- }
3665
- };
3666
- const win = fromWin(window) || fromWin(window.parent) || fromWin(window.top);
3667
- if (win) return win;
3668
- try {
3669
- return JSON.parse(localStorage.getItem("ozwellConfig") || "{}").whisperDtype || null;
3670
- } catch {
3671
- return null;
3672
- }
3673
- }
3674
- var DEFAULT_TRANSFORMERS_URL = "https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.8.1";
3675
- function transformersUrl() {
3676
- try {
3677
- const w = window.__ozwellTransformersUrl;
3678
- if (w) return w;
3679
- const ls = localStorage.getItem("ozwellTransformersUrl");
3680
- if (ls) return ls;
3681
- } catch {
3682
- }
3683
- return DEFAULT_TRANSFORMERS_URL;
3684
- }
3685
- var dictationLoad = {
3686
- active: false,
3687
- progress: 0,
3688
- done: false
3689
- };
3690
- var loadListeners = /* @__PURE__ */ new Set();
3691
- function setDictationLoad(patch) {
3692
- dictationLoad = { ...dictationLoad, ...patch };
3693
- loadListeners.forEach((l) => l());
3694
- }
3695
- function getDictationLoad() {
3696
- return dictationLoad;
3697
- }
3698
- function subscribeDictationLoad(cb) {
3699
- loadListeners.add(cb);
3700
- return () => {
3701
- loadListeners.delete(cb);
3702
- };
3703
- }
3704
- var WORKER_SRC = `
3705
- let cfg = null, modP = null, pipeP = null, gateP = null, isMulti = false;
3706
- let chain = Promise.resolve();
3707
- const serialize = (fn) => { const r = chain.then(fn, fn); chain = r.then(() => {}, () => {}); return r; };
3708
-
3709
- function getMod() {
3710
- if (modP) return modP;
3711
- modP = (async () => {
3712
- const mod = await import(cfg.transformersUrl);
3713
- mod.env.allowLocalModels = false;
3714
- // transformers.js's OWN cache STREAMS the model straight to the Cache API (how whisper-web caches this
3715
- // 1.2GB turbo model). A hand-rolled SW that buffers the whole file chokes (QuotaExceeded).
3716
- mod.env.useBrowserCache = true;
3717
- mod.env.backends.onnx.wasm.numThreads = 1;
3718
- try { if (navigator.storage && navigator.storage.persist) await navigator.storage.persist(); } catch (e) {}
3719
- return mod;
3720
- })();
3721
- return modP;
3722
- }
3723
-
3724
- function progressCb() {
3725
- const frac = {};
3726
- const report = () => {
3727
- const v = Object.values(frac);
3728
- self.postMessage({ type: 'progress', frac: v.length ? v.reduce((a, b) => a + b, 0) / v.length : 0 });
3729
- };
3730
- return (p) => {
3731
- if (!p || !p.file) return;
3732
- if (p.status === 'initiate') { frac[p.file] = frac[p.file] || 0; report(); }
3733
- else if (p.status === 'done') { frac[p.file] = 1; report(); }
3734
- else if (p.status === 'progress' && typeof p.progress === 'number') { frac[p.file] = p.progress / 100; report(); }
3735
- };
3736
- }
3737
-
3738
- async function buildEnglish(modelId) {
3739
- const mod = await getMod();
3740
- mod.env.remoteHost = cfg.hfHost;
3741
- mod.env.remotePathTemplate = cfg.hfPath;
3742
- if ((cfg.whisperDevice || '').toLowerCase() !== 'wasm') {
3743
- try {
3744
- const gpuDtype = cfg.whisperDtype || 'q8';
3745
- const pipe = await mod.pipeline('automatic-speech-recognition', modelId, { device: 'webgpu', dtype: gpuDtype, progress_callback: progressCb() });
3746
- console.log('[whisper] ready (' + modelId + ' / WebGPU ' + gpuDtype + ', worker)');
3747
- return pipe;
3748
- } catch (e) { /* fall through to wasm */ }
3749
- }
3750
- const pipe = await mod.pipeline('automatic-speech-recognition', modelId, { dtype: 'q8', progress_callback: progressCb() });
3751
- console.log('[whisper] ready (' + modelId + ' / wasm, worker)');
3752
- return pipe;
3753
- }
3754
-
3755
- async function buildTurbo() {
3756
- const mod = await getMod();
3757
- mod.env.remoteHost = cfg.whisperHost;
3758
- mod.env.remotePathTemplate = '{model}/';
3759
- const pipe = await mod.pipeline('automatic-speech-recognition', 'whisper-turbo', {
3760
- device: 'webgpu',
3761
- dtype: { encoder_model: 'fp16', decoder_model_merged: 'q4' },
3762
- progress_callback: progressCb(),
3763
- });
3764
- isMulti = true;
3765
- console.log('[whisper] ready (turbo / worker)');
3766
- return pipe;
3767
- }
3768
-
3769
- function loadWhisper() {
3770
- if (pipeP) return pipeP;
3771
- self.postMessage({ type: 'loadState', patch: { active: true, progress: 0, done: false } });
3772
- pipeP = (async () => {
3773
- const pref = (cfg.whisperPref || '').toLowerCase();
3774
- if (pref && pref !== 'turbo' && cfg.smallModels[pref]) {
3775
- console.log('[whisper] loading ' + pref + ' (forced via ozwellConfig.whisper)\u2026');
3776
- return serialize(() => buildEnglish(cfg.smallModels[pref]));
3777
- }
3778
- console.log('[whisper] loading turbo\u2026');
3779
- try { return await serialize(() => buildTurbo()); }
3780
- catch (e) {
3781
- console.log('[whisper] turbo unavailable (' + (e && e.message ? e.message : e) + ') \u2192 base.en fallback');
3782
- return serialize(() => buildEnglish(cfg.gateModel));
3783
- }
3784
- })();
3785
- pipeP.then(
3786
- () => self.postMessage({ type: 'loadState', patch: { active: false, progress: 1, done: true } }),
3787
- () => { pipeP = null; self.postMessage({ type: 'loadState', patch: { active: false } }); }
3788
- );
3789
- return pipeP;
3790
- }
3791
-
3792
- function loadGate() {
3793
- if (gateP) return gateP;
3794
- console.log('[whisper] loading stop-confirm gate (base.en)\u2026');
3795
- gateP = serialize(() => buildEnglish(cfg.gateModel));
3796
- gateP.catch(() => { gateP = null; });
3797
- return gateP;
3798
- }
3799
-
3800
- self.onmessage = async (e) => {
3801
- const m = e.data;
3802
- if (!m) return;
3803
- if (m.type === 'init') { cfg = m.cfg; return; }
3804
- if (m.type === 'warm') { loadWhisper().catch(() => {}); return; }
3805
- if (m.type === 'warmGate') { loadGate().catch(() => {}); return; }
3806
- if (m.type === 'transcribe') {
3807
- try {
3808
- let pipe, opts;
3809
- if (m.want === 'gate') { pipe = await loadGate(); opts = { chunk_length_s: 30 }; }
3810
- else {
3811
- pipe = await loadWhisper();
3812
- if (m.want === 'segments' || m.want === 'words') opts = Object.assign({ chunk_length_s: 30, return_timestamps: m.want === 'words' ? 'word' : true }, isMulti ? { language: 'english', task: 'transcribe' } : {});
3813
- else opts = isMulti ? { chunk_length_s: 30, language: 'english', task: 'transcribe' } : { chunk_length_s: 30 };
3814
- }
3815
- const out = await pipe(m.samples, opts);
3816
- self.postMessage({ type: 'result', id: m.id, text: (out && out.text ? out.text : '').trim(), chunks: (out && out.chunks) || null });
3817
- } catch (err) {
3818
- self.postMessage({ type: 'error', id: m.id, message: err && err.message ? err.message : String(err) });
3819
- }
3820
- }
3821
- };
3822
- `;
3823
- var worker = null;
3824
- var reqId = 0;
3825
- var pending = /* @__PURE__ */ new Map();
3826
- function buildWorkerCfg() {
3827
- return {
3828
- transformersUrl: transformersUrl(),
3829
- whisperHost: whisperHost(),
3830
- whisperPref: whisperPref(),
3831
- whisperDevice: whisperDevice(),
3832
- whisperDtype: whisperDtype(),
3833
- hfHost: HF_HOST,
3834
- hfPath: HF_PATH,
3835
- smallModels: SMALL_MODELS,
3836
- gateModel: GATE_MODEL
3837
- };
3838
- }
3839
- function getWorker() {
3840
- if (worker) return worker;
3841
- registerModelServiceWorker();
3842
- const url = URL.createObjectURL(
3843
- new Blob([WORKER_SRC], { type: "application/javascript" })
3844
- );
3845
- const w = new Worker(url, { type: "module" });
3846
- w.onmessage = (e) => {
3847
- const m = e.data;
3848
- if (!m) return;
3849
- if (m.type === "loadState") {
3850
- setDictationLoad(m.patch);
3851
- return;
3852
- }
3853
- if (m.type === "progress") {
3854
- setDictationLoad({ progress: m.frac });
3855
- return;
3856
- }
3857
- if (m.type === "result") {
3858
- const p = pending.get(m.id);
3859
- if (p) {
3860
- pending.delete(m.id);
3861
- p.resolve({ text: m.text, chunks: m.chunks });
3862
- }
3863
- return;
3864
- }
3865
- if (m.type === "error") {
3866
- const p = pending.get(m.id);
3867
- if (p) {
3868
- pending.delete(m.id);
3869
- p.reject(new Error(m.message));
3870
- }
3871
- return;
3872
- }
3873
- };
3874
- w.onerror = (e) => {
3875
- const err = new Error(
3876
- `whisper worker error: ${e.message || "failed to load"}`
3877
- );
3878
- pending.forEach((p) => p.reject(err));
3879
- pending.clear();
3880
- setDictationLoad({ active: false });
3881
- };
3882
- w.postMessage({ type: "init", cfg: buildWorkerCfg() });
3883
- worker = w;
3884
- return worker;
3885
- }
3886
- function callWorker(want, samples) {
3887
- const w = getWorker();
3888
- const id = ++reqId;
3889
- return new Promise((resolve, reject) => {
3890
- pending.set(id, { resolve, reject });
3891
- w.postMessage({ type: "transcribe", id, want, samples }, [samples.buffer]);
3892
- });
3893
- }
3894
- function isWhisperLoaded() {
3895
- return getDictationLoad().done;
3896
- }
3897
- function warmWhisper() {
3898
- getWorker().postMessage({ type: "warm" });
3899
- }
3900
- function warmStopGate() {
3901
- getWorker().postMessage({ type: "warmGate" });
3902
- }
3903
- function downmixToMono(audio) {
3904
- if (audio.numberOfChannels <= 1) return audio.getChannelData(0);
3905
- const n = audio.length;
3906
- const out = new Float32Array(n);
3907
- for (let ch = 0; ch < audio.numberOfChannels; ch++) {
3908
- const data = audio.getChannelData(ch);
3909
- for (let i = 0; i < n; i++) out[i] += data[i];
3910
- }
3911
- for (let i = 0; i < n; i++) out[i] /= audio.numberOfChannels;
3912
- return out;
3913
- }
3914
- function resampleTo16kMono(src, sampleRate) {
3915
- const ratio = 16e3 / sampleRate;
3916
- const n = Math.round(src.length * ratio);
3917
- const out = new Float32Array(n);
3918
- for (let i = 0; i < n; i++) {
3919
- const t = i / ratio;
3920
- const i0 = Math.floor(t);
3921
- const i1 = Math.min(i0 + 1, src.length - 1);
3922
- out[i] = src[i0] + (src[i1] - src[i0]) * (t - i0);
3923
- }
3924
- return out;
3925
- }
3926
- async function decodeTo16kMono(blob) {
3927
- const Ctx = window.AudioContext || window.webkitAudioContext;
3928
- const ctx = new Ctx();
3929
- try {
3930
- const audio = await ctx.decodeAudioData(await blob.arrayBuffer());
3931
- return resampleTo16kMono(downmixToMono(audio), audio.sampleRate);
3932
- } finally {
3933
- void ctx.close();
3934
- }
3935
- }
3936
- function encodeWav16kMono(samples) {
3937
- const sr = 16e3;
3938
- const buf = new ArrayBuffer(44 + samples.length * 2);
3939
- const view = new DataView(buf);
3940
- const str = (o2, s) => {
3941
- for (let i = 0; i < s.length; i++) view.setUint8(o2 + i, s.charCodeAt(i));
3942
- };
3943
- str(0, "RIFF");
3944
- view.setUint32(4, 36 + samples.length * 2, true);
3945
- str(8, "WAVE");
3946
- str(12, "fmt ");
3947
- view.setUint32(16, 16, true);
3948
- view.setUint16(20, 1, true);
3949
- view.setUint16(22, 1, true);
3950
- view.setUint32(24, sr, true);
3951
- view.setUint32(28, sr * 2, true);
3952
- view.setUint16(32, 2, true);
3953
- view.setUint16(34, 16, true);
3954
- str(36, "data");
3955
- view.setUint32(40, samples.length * 2, true);
3956
- let o = 44;
3957
- for (let i = 0; i < samples.length; i++) {
3958
- const s = Math.max(-1, Math.min(1, samples[i]));
3959
- view.setInt16(o, s < 0 ? s * 32768 : s * 32767, true);
3960
- o += 2;
3961
- }
3962
- return new Blob([buf], { type: "audio/wav" });
3963
- }
3964
- async function trimTrailingStopPhrase(blob, phraseHintSec = 0) {
3965
- let samples;
3966
- try {
3967
- samples = await decodeTo16kMono(blob);
3968
- } catch {
3969
- return blob;
3970
- }
3971
- const SR2 = 16e3;
3972
- const n = samples.length;
3973
- if (n < SR2 * 0.8) return blob;
3974
- const fr = Math.round(SR2 * 0.03);
3975
- const nf = Math.ceil(n / fr);
3976
- const e = new Float32Array(nf);
3977
- let peak = 0;
3978
- for (let f = 0; f < nf; f++) {
3979
- const a = f * fr, b = Math.min(n, a + fr);
3980
- let s = 0;
3981
- for (let i = a; i < b; i++) s += samples[i] * samples[i];
3982
- e[f] = Math.sqrt(s / (b - a));
3983
- if (e[f] > peak) peak = e[f];
3984
- }
3985
- const sil = Math.max(8e-3, peak * 0.15);
3986
- const minGap = Math.max(1, Math.round(0.15 * SR2 / fr));
3987
- const maxTrimFrames = Math.round(2.2 * SR2 / fr);
3988
- const floor = Math.max(0, nf - maxTrimFrames);
3989
- let cutFrame;
3990
- if (phraseHintSec > 0.2) {
3991
- const anchor = Math.max(0, nf - Math.round(phraseHintSec * SR2 / fr));
3992
- const win = Math.round(0.35 * SR2 / fr);
3993
- let best = -1, bestDist = Infinity;
3994
- for (let f = Math.max(0, anchor - win); f <= Math.min(nf - 1, anchor + win); f++) {
3995
- if (e[f] < sil) {
3996
- const dist = Math.abs(f - anchor);
3997
- if (dist < bestDist) {
3998
- bestDist = dist;
3999
- best = f;
4000
- }
4001
- }
4002
- }
4003
- cutFrame = best >= 0 ? best : anchor;
4004
- } else {
4005
- let k = nf - 1;
4006
- while (k >= floor && e[k] < sil) k--;
4007
- cutFrame = -1;
4008
- while (k >= floor) {
4009
- if (e[k] < sil) {
4010
- let m = k;
4011
- while (m >= floor && e[m] < sil) m--;
4012
- if (k - m >= minGap) {
4013
- cutFrame = k + 1;
4014
- break;
4015
- }
4016
- k = m;
4017
- } else k--;
4018
- }
4019
- if (cutFrame < 0) cutFrame = Math.max(0, nf - Math.round(1.1 * SR2 / fr));
4020
- }
4021
- cutFrame = Math.max(cutFrame, floor);
4022
- const cutSample = Math.min(n, cutFrame * fr);
4023
- if (cutSample < SR2 * 0.2) return blob;
4024
- return encodeWav16kMono(samples.subarray(0, cutSample));
4025
- }
4026
- async function transcribeBlob(blob, trimEndSeconds = 0) {
4027
- let samples = await decodeTo16kMono(blob);
4028
- if (trimEndSeconds > 0) {
4029
- const cut = Math.round(trimEndSeconds * 16e3);
4030
- if (samples.length > cut + 16e3)
4031
- samples = samples.slice(0, samples.length - cut);
4032
- }
4033
- const out = await callWorker("text", samples);
4034
- return (out.text ?? "").trim();
4035
- }
4036
- async function transcribeSamples(samples, sampleRate) {
4037
- const out = await callWorker("text", resampleTo16kMono(samples, sampleRate));
4038
- return (out.text ?? "").trim();
4039
- }
4040
- function chunksToSegments(chunks) {
4041
- return (chunks ?? []).map((c) => ({
4042
- start: c.timestamp?.[0] ?? 0,
4043
- end: c.timestamp?.[1] ?? c.timestamp?.[0] ?? 0,
4044
- text: (c.text ?? "").trim()
4045
- })).filter((s) => s.text);
4046
- }
4047
- async function transcribeSegments(blob) {
4048
- const samples = await decodeTo16kMono(blob);
4049
- const out = await callWorker("segments", samples);
4050
- return chunksToSegments(out.chunks);
4051
- }
4052
- function serverAsrModel() {
4053
- try {
4054
- return JSON.parse(localStorage.getItem("ozwellConfig") || "{}").serverWhisper || "whisper-1";
4055
- } catch {
4056
- return "whisper-1";
4057
- }
4058
- }
4059
- async function transcribeServer(blob) {
4060
- const cfg = getOzwellConfig();
4061
- const form = new FormData();
4062
- form.append("file", blob, "audio.webm");
4063
- form.append("model", serverAsrModel());
4064
- const url = `${cfg.baseURL.replace(/\/$/, "")}/v1/audio/transcriptions`;
4065
- const headers = {};
4066
- if (cfg.apiKey && cfg.apiKey !== "ollama")
4067
- headers.Authorization = `Bearer ${cfg.apiKey}`;
4068
- const res = await fetch(url, { method: "POST", headers, body: form });
4069
- if (!res.ok) {
4070
- const body = await res.text().catch(() => "");
4071
- throw new Error(
4072
- `Server ASR ${res.status}: ${res.statusText || body.slice(0, 200) || "request failed"}`
4073
- );
4074
- }
4075
- const data = await res.json();
4076
- return (typeof data?.text === "string" ? data.text : "").trim();
4077
- }
4078
- async function transcribeGate(samples, sampleRate) {
4079
- const out = await callWorker("gate", resampleTo16kMono(samples, sampleRate));
4080
- return (out.text ?? "").trim();
4081
- }
4082
- function stripStopPhrase(text) {
4083
- const tail = /(?:\b(?:oz\s{0,4}well|all(?:['’]?s|\s{1,4}was)?\s{0,4}well|as\s{0,4}well|also|oswald)\b[\s,]{0,6}i(?:['’]?m|\s{1,4}am)\s{1,4}done\b|\b(?:oz\s{0,4}well|all(?:['’]?s|\s{1,4}was)?\s{0,4}well|oswald)\b|\bi(?:['’]?m|\s{1,4}am)\s{1,4}done\b|\b(?:that\s{1,4}was\s{1,4}|was\s{1,4})?well\s{1,4}done\b|\bthat['’]?s?\s{1,4}(?:was\s{1,4})?all\b|\bthank(?:s|\s{1,4}you)(?:\s{1,4}for\s{1,4}watching)?\b|\bbye\b)[\s.,!?-]{0,24}$/i;
4084
- let prev = null;
4085
- let t = text;
4086
- while (t !== prev && t) {
4087
- prev = t;
4088
- t = trimTrailingPunct(t.replace(tail, ""));
4089
- }
4090
- return t.trim();
4091
- }
4092
- function trimTrailingPunct(s) {
4093
- let end = s.length;
4094
- while (end > 0 && /[\s.,!?-]/.test(s[end - 1])) end--;
4095
- return end === s.length ? s : s.slice(0, end);
4096
- }
4097
- function endsWithDone(text) {
4098
- return /\b(?:i(?:['’]?m|\s{1,4}am)\s{1,4}|all\s{1,4}|well\s{1,4})?done\b[\s.,!?-]{0,24}$/i.test(
4099
- text
4100
- );
4101
- }
4102
3497
  function useSpeakerVerify(opts = {}) {
4103
3498
  const { enabled = true, voiceprintNamespace } = opts;
4104
3499
  const [ready, setReady] = React13.useState(false);
@@ -5441,6 +4836,7 @@ function VoiceSetup({
5441
4836
  {
5442
4837
  style: {
5443
4838
  position: "absolute",
4839
+ // rtl-ignore -- symmetric centering: left:50% + translate(-50%) is direction-independent
5444
4840
  left: "50%",
5445
4841
  top: "50%",
5446
4842
  width: 150,
@@ -5457,6 +4853,7 @@ function VoiceSetup({
5457
4853
  {
5458
4854
  style: {
5459
4855
  position: "absolute",
4856
+ // rtl-ignore -- symmetric centering: left:50% + translate(-50%) is direction-independent
5460
4857
  left: "50%",
5461
4858
  top: "50%",
5462
4859
  width: 180,
@@ -5525,7 +4922,7 @@ function VoiceSetup({
5525
4922
  {
5526
4923
  className: "absolute flex items-center justify-center rounded-full text-white",
5527
4924
  style: {
5528
- right: -2,
4925
+ insetInlineEnd: -2,
5529
4926
  bottom: -2,
5530
4927
  width: 36,
5531
4928
  height: 36,
@@ -5832,23 +5229,34 @@ function HandsFreeChat({
5832
5229
  const placeholder = !oz.active ? "Ozwell is off \u2014 tap the octopus to listen" : phase === "listening" ? ready ? "Say \u201Chey ozwell\u201D, or type\u2026" : error ? `\u26A0\uFE0F ${error}` : "\u2026 loading models" : oz.chatProps.inputPlaceholder;
5833
5230
  return /* @__PURE__ */ jsxs("div", { style: { height: "100vh", display: "flex", flexDirection: "column" }, children: [
5834
5231
  /* @__PURE__ */ jsxs("div", { style: { flex: 1, minHeight: 0, position: "relative" }, children: [
5835
- /* @__PURE__ */ jsx("div", { style: { position: "absolute", top: 11, right: 16, zIndex: 10 }, children: /* @__PURE__ */ jsx(
5836
- OzwellSettingsMenu,
5232
+ /* @__PURE__ */ jsx(
5233
+ "div",
5837
5234
  {
5838
- trigger: /* @__PURE__ */ jsx(
5839
- HeyOzwellToggle,
5235
+ style: {
5236
+ position: "absolute",
5237
+ top: 11,
5238
+ insetInlineEnd: 16,
5239
+ zIndex: 10
5240
+ },
5241
+ children: /* @__PURE__ */ jsx(
5242
+ OzwellSettingsMenu,
5840
5243
  {
5841
- ...oz.toggleProps,
5842
- logoSrc,
5843
- size: 34
5244
+ trigger: /* @__PURE__ */ jsx(
5245
+ HeyOzwellToggle,
5246
+ {
5247
+ ...oz.toggleProps,
5248
+ logoSrc,
5249
+ size: 34
5250
+ }
5251
+ ),
5252
+ open: oz.settingsOpen,
5253
+ onOpenChange: oz.setSettingsOpen,
5254
+ modelStatus: oz.modelStatus,
5255
+ onManageVoices: () => setVoicesOpen(true)
5844
5256
  }
5845
- ),
5846
- open: oz.settingsOpen,
5847
- onOpenChange: oz.setSettingsOpen,
5848
- modelStatus: oz.modelStatus,
5849
- onManageVoices: () => setVoicesOpen(true)
5257
+ )
5850
5258
  }
5851
- ) }),
5259
+ ),
5852
5260
  /* @__PURE__ */ jsx(
5853
5261
  AIChat,
5854
5262
  {
@@ -9957,7 +9365,7 @@ function ConsentSwitch({
9957
9365
  "data-slot": "consent-switch-thumb",
9958
9366
  className: cn(
9959
9367
  "pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow ring-0 transition-transform duration-200 ease-in-out",
9960
- checked ? "translate-x-5" : "translate-x-0.5"
9368
+ checked ? "translate-x-5 rtl:-translate-x-5" : "translate-x-0.5 rtl:-translate-x-0.5"
9961
9369
  )
9962
9370
  }
9963
9371
  )
@@ -12915,7 +12323,7 @@ function CheckrIntegration({
12915
12323
  viewReports = "View Reports",
12916
12324
  noReports = "No background checks yet",
12917
12325
  refresh = "Refresh",
12918
- pending: pending2 = "Pending",
12326
+ pending = "Pending",
12919
12327
  running = "Running",
12920
12328
  complete = "Complete",
12921
12329
  failed = "Failed",
@@ -12947,7 +12355,7 @@ function CheckrIntegration({
12947
12355
  setSelectedReports((prev) => prev.size > 0 ? /* @__PURE__ */ new Set() : prev);
12948
12356
  }, [reports, connected]);
12949
12357
  const statusLabels = {
12950
- pending: pending2,
12358
+ pending,
12951
12359
  running,
12952
12360
  complete,
12953
12361
  failed,
@@ -14552,9 +13960,20 @@ function RowActionMenu({
14552
13960
  actions
14553
13961
  }) {
14554
13962
  const [open, setOpen] = React13.useState(false);
14555
- const menuRef = React13.useRef(null);
14556
13963
  const buttonRef = React13.useRef(null);
14557
- const outsideRefs = React13.useMemo(() => [menuRef, buttonRef], []);
13964
+ const direction = useDirection(buttonRef);
13965
+ const {
13966
+ anchorRef,
13967
+ floatingRef,
13968
+ style: menuStyle
13969
+ } = useAnchoredPosition({
13970
+ open,
13971
+ placement: direction === "rtl" ? "bottom-start" : "bottom-end"
13972
+ });
13973
+ const outsideRefs = React13.useMemo(
13974
+ () => [floatingRef, buttonRef],
13975
+ [floatingRef]
13976
+ );
14558
13977
  useClickOutside(outsideRefs, () => setOpen(false), open);
14559
13978
  React13.useEffect(() => {
14560
13979
  if (!open) return;
@@ -14564,20 +13983,14 @@ function RowActionMenu({
14564
13983
  document.addEventListener("keydown", handleKey);
14565
13984
  return () => document.removeEventListener("keydown", handleKey);
14566
13985
  }, [open]);
14567
- const [menuPos, setMenuPos] = React13.useState(null);
14568
- React13.useLayoutEffect(() => {
14569
- if (!open || !buttonRef.current) return;
14570
- const rect = buttonRef.current.getBoundingClientRect();
14571
- setMenuPos({
14572
- top: rect.bottom + 4,
14573
- left: rect.right
14574
- });
14575
- }, [open]);
14576
13986
  return /* @__PURE__ */ jsxs("div", { className: "relative", children: [
14577
13987
  /* @__PURE__ */ jsx(
14578
13988
  "button",
14579
13989
  {
14580
- ref: buttonRef,
13990
+ ref: (el) => {
13991
+ buttonRef.current = el;
13992
+ anchorRef.current = el;
13993
+ },
14581
13994
  type: "button",
14582
13995
  onClick: (e) => {
14583
13996
  e.stopPropagation();
@@ -14596,18 +14009,14 @@ function RowActionMenu({
14596
14009
  children: /* @__PURE__ */ jsx(MoreHorizontal, { size: 14 })
14597
14010
  }
14598
14011
  ),
14599
- open && menuPos && ReactDOM.createPortal(
14012
+ open && ReactDOM.createPortal(
14600
14013
  /* @__PURE__ */ jsx(
14601
14014
  "div",
14602
14015
  {
14603
- ref: menuRef,
14016
+ ref: floatingRef,
14604
14017
  role: "menu",
14605
- style: {
14606
- position: "fixed",
14607
- top: menuPos.top,
14608
- left: menuPos.left,
14609
- transform: "translateX(-100%)"
14610
- },
14018
+ dir: direction,
14019
+ style: menuStyle,
14611
14020
  className: cn(
14612
14021
  "z-[9999] min-w-[10rem]",
14613
14022
  "rounded-lg border border-neutral-200 bg-white py-1 shadow-lg",
@@ -16324,18 +15733,26 @@ function WidgetRowActionMenu({
16324
15733
  actions
16325
15734
  }) {
16326
15735
  const [open, setOpen] = React13.useState(false);
16327
- const menuRef = React13.useRef(null);
16328
15736
  const buttonRef = React13.useRef(null);
15737
+ const direction = useDirection(buttonRef);
15738
+ const {
15739
+ anchorRef,
15740
+ floatingRef,
15741
+ style: menuStyle
15742
+ } = useAnchoredPosition({
15743
+ open,
15744
+ placement: direction === "rtl" ? "bottom-start" : "bottom-end"
15745
+ });
16329
15746
  React13.useEffect(() => {
16330
15747
  if (!open) return;
16331
15748
  function handleClick(e) {
16332
- if (menuRef.current && !menuRef.current.contains(e.target) && buttonRef.current && !buttonRef.current.contains(e.target)) {
15749
+ if (floatingRef.current && !floatingRef.current.contains(e.target) && buttonRef.current && !buttonRef.current.contains(e.target)) {
16333
15750
  setOpen(false);
16334
15751
  }
16335
15752
  }
16336
15753
  document.addEventListener("mousedown", handleClick);
16337
15754
  return () => document.removeEventListener("mousedown", handleClick);
16338
- }, [open]);
15755
+ }, [open, floatingRef]);
16339
15756
  React13.useEffect(() => {
16340
15757
  if (!open) return;
16341
15758
  function handleKey(e) {
@@ -16344,15 +15761,6 @@ function WidgetRowActionMenu({
16344
15761
  document.addEventListener("keydown", handleKey);
16345
15762
  return () => document.removeEventListener("keydown", handleKey);
16346
15763
  }, [open]);
16347
- const [menuPos, setMenuPos] = React13.useState(null);
16348
- React13.useLayoutEffect(() => {
16349
- if (!open || !buttonRef.current) return;
16350
- const rect = buttonRef.current.getBoundingClientRect();
16351
- setMenuPos({
16352
- top: rect.bottom + 4,
16353
- left: rect.right
16354
- });
16355
- }, [open]);
16356
15764
  const visibleActions = actions.filter(
16357
15765
  (action) => !action.hidden?.(row, rowIndex)
16358
15766
  );
@@ -16361,7 +15769,10 @@ function WidgetRowActionMenu({
16361
15769
  /* @__PURE__ */ jsx(
16362
15770
  "button",
16363
15771
  {
16364
- ref: buttonRef,
15772
+ ref: (el) => {
15773
+ buttonRef.current = el;
15774
+ anchorRef.current = el;
15775
+ },
16365
15776
  type: "button",
16366
15777
  onClick: (e) => {
16367
15778
  e.stopPropagation();
@@ -16380,18 +15791,14 @@ function WidgetRowActionMenu({
16380
15791
  children: /* @__PURE__ */ jsx(MoreHorizontal, { size: 14 })
16381
15792
  }
16382
15793
  ),
16383
- open && menuPos && createPortal(
15794
+ open && createPortal(
16384
15795
  /* @__PURE__ */ jsx(
16385
15796
  "div",
16386
15797
  {
16387
- ref: menuRef,
15798
+ ref: floatingRef,
16388
15799
  role: "menu",
16389
- style: {
16390
- position: "fixed",
16391
- top: menuPos.top,
16392
- left: menuPos.left,
16393
- transform: "translateX(-100%)"
16394
- },
15800
+ dir: direction,
15801
+ style: menuStyle,
16395
15802
  className: cn(
16396
15803
  "z-[9999] min-w-[10rem]",
16397
15804
  "rounded-lg border border-neutral-200 bg-white py-1 shadow-lg",
@@ -22775,21 +22182,21 @@ function ActionButton({ label, onClick, href, variant }) {
22775
22182
  );
22776
22183
  }
22777
22184
  function DefaultIllustration({ type }) {
22778
- const iconClasses = "h-24 w-24 text-muted-foreground";
22185
+ const iconClasses2 = "h-24 w-24 text-muted-foreground";
22779
22186
  switch (type) {
22780
22187
  case "404":
22781
- return /* @__PURE__ */ jsx(Search404Icon, { className: iconClasses });
22188
+ return /* @__PURE__ */ jsx(Search404Icon, { className: iconClasses2 });
22782
22189
  case "500":
22783
- return /* @__PURE__ */ jsx(ServerErrorIcon, { className: iconClasses });
22190
+ return /* @__PURE__ */ jsx(ServerErrorIcon, { className: iconClasses2 });
22784
22191
  case "403":
22785
22192
  case "401":
22786
- return /* @__PURE__ */ jsx(LockIcon, { className: iconClasses });
22193
+ return /* @__PURE__ */ jsx(LockIcon, { className: iconClasses2 });
22787
22194
  case "offline":
22788
- return /* @__PURE__ */ jsx(WifiOffIcon, { className: iconClasses });
22195
+ return /* @__PURE__ */ jsx(WifiOffIcon, { className: iconClasses2 });
22789
22196
  case "maintenance":
22790
- return /* @__PURE__ */ jsx(WrenchIcon, { className: iconClasses });
22197
+ return /* @__PURE__ */ jsx(WrenchIcon, { className: iconClasses2 });
22791
22198
  default:
22792
- return /* @__PURE__ */ jsx(AlertIcon, { className: iconClasses });
22199
+ return /* @__PURE__ */ jsx(AlertIcon, { className: iconClasses2 });
22793
22200
  }
22794
22201
  }
22795
22202
  function Search404Icon({ className }) {
@@ -23246,18 +22653,26 @@ function FileRowActionMenu({
23246
22653
  onDelete
23247
22654
  }) {
23248
22655
  const [open, setOpen] = React13.useState(false);
23249
- const menuRef = React13.useRef(null);
23250
22656
  const buttonRef = React13.useRef(null);
22657
+ const direction = useDirection(buttonRef);
22658
+ const {
22659
+ anchorRef,
22660
+ floatingRef,
22661
+ style: menuStyle
22662
+ } = useAnchoredPosition({
22663
+ open,
22664
+ placement: direction === "rtl" ? "bottom-start" : "bottom-end"
22665
+ });
23251
22666
  React13.useEffect(() => {
23252
22667
  if (!open) return;
23253
22668
  function handleClick(e) {
23254
- if (menuRef.current && !menuRef.current.contains(e.target) && buttonRef.current && !buttonRef.current.contains(e.target)) {
22669
+ if (floatingRef.current && !floatingRef.current.contains(e.target) && buttonRef.current && !buttonRef.current.contains(e.target)) {
23255
22670
  setOpen(false);
23256
22671
  }
23257
22672
  }
23258
22673
  document.addEventListener("mousedown", handleClick);
23259
22674
  return () => document.removeEventListener("mousedown", handleClick);
23260
- }, [open]);
22675
+ }, [open, floatingRef]);
23261
22676
  React13.useEffect(() => {
23262
22677
  if (!open) return;
23263
22678
  function handleKey(e) {
@@ -23266,25 +22681,6 @@ function FileRowActionMenu({
23266
22681
  document.addEventListener("keydown", handleKey);
23267
22682
  return () => document.removeEventListener("keydown", handleKey);
23268
22683
  }, [open]);
23269
- const [menuPos, setMenuPos] = React13.useState(null);
23270
- React13.useLayoutEffect(() => {
23271
- if (!open || !buttonRef.current) return;
23272
- function updatePosition() {
23273
- if (!buttonRef.current) return;
23274
- const rect = buttonRef.current.getBoundingClientRect();
23275
- setMenuPos({
23276
- top: rect.bottom + 4,
23277
- left: rect.right
23278
- });
23279
- }
23280
- updatePosition();
23281
- window.addEventListener("scroll", updatePosition, true);
23282
- window.addEventListener("resize", updatePosition);
23283
- return () => {
23284
- window.removeEventListener("scroll", updatePosition, true);
23285
- window.removeEventListener("resize", updatePosition);
23286
- };
23287
- }, [open]);
23288
22684
  const actions = [
23289
22685
  onPreview && {
23290
22686
  key: "preview",
@@ -23311,7 +22707,10 @@ function FileRowActionMenu({
23311
22707
  /* @__PURE__ */ jsx(
23312
22708
  "button",
23313
22709
  {
23314
- ref: buttonRef,
22710
+ ref: (el) => {
22711
+ buttonRef.current = el;
22712
+ anchorRef.current = el;
22713
+ },
23315
22714
  type: "button",
23316
22715
  onClick: (e) => {
23317
22716
  e.stopPropagation();
@@ -23330,18 +22729,14 @@ function FileRowActionMenu({
23330
22729
  children: /* @__PURE__ */ jsx(MoreHorizontal, { size: 14 })
23331
22730
  }
23332
22731
  ),
23333
- open && menuPos && createPortal(
22732
+ open && createPortal(
23334
22733
  /* @__PURE__ */ jsx(
23335
22734
  "div",
23336
22735
  {
23337
- ref: menuRef,
22736
+ ref: floatingRef,
23338
22737
  role: "menu",
23339
- style: {
23340
- position: "fixed",
23341
- top: menuPos.top,
23342
- left: menuPos.left,
23343
- transform: "translateX(-100%)"
23344
- },
22738
+ dir: direction,
22739
+ style: menuStyle,
23345
22740
  className: cn(
23346
22741
  "z-[9999] min-w-[10rem]",
23347
22742
  "rounded-lg border border-neutral-200 bg-white py-1 shadow-lg",
@@ -26308,7 +25703,7 @@ function LoadingBar({
26308
25703
  "div",
26309
25704
  {
26310
25705
  className: cn(
26311
- "animate-loading-bar h-full w-1/3 rounded-full",
25706
+ "animate-loading-bar rtl:animate-loading-bar-rtl h-full w-1/3 rounded-full",
26312
25707
  barColor
26313
25708
  )
26314
25709
  }
@@ -26430,7 +25825,7 @@ function LoadingSkeleton({
26430
25825
  const baseClasses = cn(
26431
25826
  "bg-gray-200 dark:bg-gray-700",
26432
25827
  animation === "pulse" && "animate-pulse",
26433
- animation === "wave" && "animate-shimmer bg-gradient-to-r from-gray-200 via-gray-100 to-gray-200 dark:from-gray-700 dark:via-gray-600 dark:to-gray-700 bg-[length:200%_100%]"
25828
+ animation === "wave" && "animate-shimmer rtl:animate-shimmer-rtl bg-gradient-to-r from-gray-200 via-gray-100 to-gray-200 dark:from-gray-700 dark:via-gray-600 dark:to-gray-700 bg-[length:200%_100%]"
26434
25829
  );
26435
25830
  const variantClasses = {
26436
25831
  text: "h-4 rounded",
@@ -39750,13 +39145,13 @@ var DEFAULT_SERVICE_PRICING_MANAGER_LABELS = {
39750
39145
  function ServiceNote({ service, onNoteChange, labels }) {
39751
39146
  const [editing, setEditing] = React13.useState(false);
39752
39147
  const [draft, setDraft] = React13.useState("");
39753
- const [pending2, setPending] = React13.useState(null);
39148
+ const [pending, setPending] = React13.useState(null);
39754
39149
  const [failed, setFailed] = React13.useState(false);
39755
39150
  const inputRef = React13.useRef(null);
39756
39151
  const buttonRef = React13.useRef(null);
39757
39152
  const cancelRef = React13.useRef(false);
39758
39153
  const refocusRef = React13.useRef(false);
39759
- const note = pending2 ?? service.note ?? "";
39154
+ const note = pending ?? service.note ?? "";
39760
39155
  React13.useEffect(() => {
39761
39156
  if (editing) inputRef.current?.focus();
39762
39157
  else if (refocusRef.current) {
@@ -39810,12 +39205,12 @@ function ServiceNote({ service, onNoteChange, labels }) {
39810
39205
  ref: buttonRef,
39811
39206
  type: "button",
39812
39207
  onClick: () => {
39813
- if (pending2 !== null) return;
39208
+ if (pending !== null) return;
39814
39209
  setDraft(note);
39815
39210
  setEditing(true);
39816
39211
  },
39817
- "aria-disabled": pending2 !== null,
39818
- "aria-busy": pending2 !== null,
39212
+ "aria-disabled": pending !== null,
39213
+ "aria-busy": pending !== null,
39819
39214
  "aria-label": `${labels.noteLabel(service.serviceName)}: ${note || labels.addNote}`,
39820
39215
  className: cn(
39821
39216
  "w-full truncate rounded text-start text-sm",
@@ -44649,6 +44044,7 @@ var WebsiteInput = React13.forwardRef(
44649
44044
  inputMode: "url",
44650
44045
  autoComplete: "url",
44651
44046
  placeholder: "https://example.com",
44047
+ dir: "ltr",
44652
44048
  value,
44653
44049
  onChange: handleChange,
44654
44050
  onBlur: handleBlur,
@@ -44854,6 +44250,6 @@ function WebsiteInputGroup({
44854
44250
  }
44855
44251
  WebsiteInputGroup.displayName = "WebsiteInputGroup";
44856
44252
 
44857
- export { AIChat, AIChatModal, AIChatTrigger, AIReconciliationPanel, AccessDeniedPage, ActionButton2 as ActionButton, ActionButtonsBar, ActiveFilters, AddContactModal, AddServiceCard, AdditionalFields, Address, AddressCard, AddressCompact, AddressDisplay, AddressForm, AddressInline, AppHeader, AppHeaderActions, AppHeaderBrand, AppHeaderDivider, AppHeaderIconButton, AppHeaderSearch, AppHeaderSection, AppHeaderTitle, AppHeaderUserMenu, Assessment, AuthButtons, AuthDialog, BUSINESS_HOURS_END_OF_DAY, BookAppointmentButton, BookingDialog, BusinessHours, BusinessHoursEditor, CHANGE_TYPE_LABELS, CONCERN_STATUS_LABELS, CSVColumnMapper, CSVFileUpload, CardSkeleton, CaseContextBar, CaseManagementHeader, CheckrIntegration, ClaimListingButton, ClaimProviderForm, CodingChips, CommandPalette, CommandPaletteProvider, CommandPaletteTrigger, CompactCookieBanner, CompactFilterBar, CompactHeader, CompactHours, CompactProviderHeader, ConditionEditor, ConnectionStatusBadge, ConnectionStatusBar, ConnectionStatusOverlay, ConsentSwitch, CookieConsentBanner, CopyrightText, CountBadge, CountryDropdown, CreateInvoiceModal, CreateReferralModal, DEFAULT_BUSINESS_HOURS_EDITOR_LABELS, DEFAULT_ERROR_CONFIGS, DEFAULT_LANGUAGES, DEFAULT_RADIUS_OPTIONS, DEFAULT_SERVICE_PRICING_MANAGER_LABELS, DEFAULT_SOCIAL_PROVIDERS, DOTBadge, DashboardWidget, DashboardWidgetActions, DashboardWidgetDataCards, DashboardWidgetInfo, DashboardWidgetTable, DateRangeFilter, DateRangePicker, DialogOverlay, DisclaimerText, DockablePanel, DocumentDetectionOverlay, DocumentScanner, DropZone, DropzoneOverlay, EditUserRoleModal, EmployeeForm, EmployeeProfileCard, EmployerContactCard, EmployerList, EmployerPricingCard, EmployerServiceModal, EmployerView, ErrorPage, FileManager, FilePreview, FloatingAIChat, FloatingInput, FooterLinkSection, SocialMediaLinks2 as FooterSocialLinks, HRISProviderSelector, HandsFreeChat, HealthSurveillance, HelpSupportPanel, HeroSearchBar, HeyOzwell, HeyOzwellToggle, HoursSummary, ImagingOrderEditor, InlineBookingForm, InventoryManager, InviteUserModal, InvoiceList, InvoicePaymentPage, InvoiceView, LabOrderEditor, LanguageSelector, LanguageSelectorInline, LanguageSelectorNative, LegalLinks, LoadingBar, LoadingDots, LoadingOverlay, LoadingPage, LoadingSkeleton, MODEL_MANIFEST, MaintenancePage, MobileBackButton, MobileMenuButton, MobileMenuPanel, ModelInfoList, NavLinks, NewsletterForm, NotFoundPage, NotificationCenter, ORDER_TYPE_META, ORDER_TYPE_SEARCH_DOMAINS, OfflinePage, OnboardingCompletion, OnboardingStepQuestion, OnboardingWizard, OpenStatusBadge, OrderCard, OrderConfirmation, OrderConfirmationWizard, OrderDetailSidebar, OrderEditor, OrderList, OrderLookupForm, OrderSidebar, OrderSidebarTabs, OzwellChat, OzwellSettingsMenu, PageHeader, PatientHeader, PaymentHistoryTable, PaymentMethodBank, PaymentMethodCard, PaymentMethodList, PendingClaimsTable, PermissionsEditor, PillSelect, PresentingProblems, ProblemList, ProcedureOrderEditor, ProductVersion, ProductVersionBadge, Breadcrumb2 as ProviderBreadcrumb, ProviderCard, ProviderCardGrid, ProviderCardSkeleton, ProviderDetailHeader, ProviderDetailHeaderSkeleton, ProviderLogo2 as ProviderLogo, ProviderOverview, ProviderSearchBar, ProviderSearchFilters, ProviderSelector, ProviderSettings, SocialMediaLinks as ProviderSocialLinks, ProviderUsersTable, QuickBookCard, QuickLinksCard, RELEVANCE_LABELS, RecurringServiceAddCard, RecurringServiceCard, RecurringServiceGrid, RecurringServiceSetupModal, ReferralEditor, RejectionModal, ReportDashboard, ReportDatePicker, ReportLink, ReportTimeRange, ResultsEntryCard, ResultsEntryForm, ResultsEntryModal, SSOConfigForm, ScheduleCalendar, SearchResultsMessage, SelectedServicesBadges, ServerErrorPage, ServiceAccordion, ServiceBadge, ServiceBadgeGroup, ServiceCard, ServiceCategoryBadge, ServiceGeneralSettings, ServiceGrid, ServiceLink, ServiceList, ServiceMultiSelect, ServicePicker, ServicePricingManager, ServiceSelect, ServiceShippingSettings, ServiceTagCloud, ServiceTagCloudBadges, SetupServiceModal, Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMobileToggle, SidebarNav, SidebarNavGroup, SidebarNavItem, SidebarProvider, SidebarSearch, SidebarToggle, SimpleFooter, SiteFooter, SiteHeader, SiteLogo, StepIndicator, StripeBadge, StripeSecureBadge, SuggestedActions, TableOfContents, TimelineEventList, TimelineProgress, Toast, ToastContainer, ToastProvider, UncertaintyBadge, UpdateAvailableOverlay, UserMenu, VerifiedBadge2 as VerifiedBadge, VisitScribe, VoiceManager, VoiceSetup, WEBSITE_TYPES, WebChartReportViewer, WebcamModal, WebsiteInput, WebsiteInputGroup, askOzwell, askOzwellStream, attributeSegments, calculateDateRange, centroid, chime, clusterEmbeddings, concernGroupKey, concernHistoryContent, cosine, countBadgeVariants, countChipVariants, create24HourSchedule, createDefaultSchedule, createWeekdaySchedule, currentAssertion, decodeTo16kMono, defaultCaseManagementHeaderLabels, defaultOrderTabs, defaultReconciliationIsEqual, endsWithDone, formatAddressLines, formatAddressSingleLine, formatCityState, formatCityStateZip, generateId, getDefaultPresets, getDictationLoad, getExtendedPresets, getGoogleMapsSearchUrl, getGoogleMapsUrl, getOzwellConfig, getWakeWarm, inferSpeakerRoles, isConditionCodetype, isOzwellConfigured, isValidUrl, isWhisperLoaded, labelClusters, medicationToOrder, mergeTurns, normalizeClosingTime, normalizeConditionCodingSystem, openRollingRecorder, orderToMedication, orderTypeForCodetype, parseTimeInput, panelVariants as reconciliationPanelVariants, stripStopPhrase, subscribeDictationLoad, subscribeWakeWarm, toOzwellMessages, transcribeBlob, transcribeGate, transcribeSamples, transcribeSegments, transcribeServer, trimTrailingStopPhrase, useCamera, useCommandPalette, useConnectionStatus, useCookieConsent, useDiarization, useDocumentDetection, useDropzone, useFileUpload, useHeyOzwell, useOptionalToast, useSidebar, useSpeakerVerify, useToast, useVisitScribe, useVoiceSetup, useWakeWord, warmStopGate, warmWakeModels, warmWhisper, widgetVariants };
44253
+ export { AIChat, AIChatModal, AIChatTrigger, AIReconciliationPanel, AccessDeniedPage, ActionButton2 as ActionButton, ActionButtonsBar, ActiveFilters, AddContactModal, AddServiceCard, AdditionalFields, Address, AddressCard, AddressCompact, AddressDisplay, AddressForm, AddressInline, AppHeader, AppHeaderActions, AppHeaderBrand, AppHeaderDivider, AppHeaderIconButton, AppHeaderSearch, AppHeaderSection, AppHeaderTitle, AppHeaderUserMenu, Assessment, AuthButtons, AuthDialog, BUSINESS_HOURS_END_OF_DAY, BookAppointmentButton, BookingDialog, BusinessHours, BusinessHoursEditor, CHANGE_TYPE_LABELS, CONCERN_STATUS_LABELS, CSVColumnMapper, CSVFileUpload, CardSkeleton, CaseContextBar, CaseManagementHeader, CheckrIntegration, ClaimListingButton, ClaimProviderForm, CodingChips, CommandPalette, CommandPaletteProvider, CommandPaletteTrigger, CompactCookieBanner, CompactFilterBar, CompactHeader, CompactHours, CompactProviderHeader, ConditionEditor, ConnectionStatusBadge, ConnectionStatusBar, ConnectionStatusOverlay, ConsentSwitch, CookieConsentBanner, CopyrightText, CountBadge, CountryDropdown, CreateInvoiceModal, CreateReferralModal, DEFAULT_BUSINESS_HOURS_EDITOR_LABELS, DEFAULT_ERROR_CONFIGS, DEFAULT_LANGUAGES, DEFAULT_RADIUS_OPTIONS, DEFAULT_SERVICE_PRICING_MANAGER_LABELS, DEFAULT_SOCIAL_PROVIDERS, DOTBadge, DashboardWidget, DashboardWidgetActions, DashboardWidgetDataCards, DashboardWidgetInfo, DashboardWidgetTable, DateRangeFilter, DateRangePicker, DialogOverlay, DisclaimerText, DockablePanel, DocumentDetectionOverlay, DocumentScanner, DropZone, DropzoneOverlay, EditUserRoleModal, EmployeeForm, EmployeeProfileCard, EmployerContactCard, EmployerList, EmployerPricingCard, EmployerServiceModal, EmployerView, ErrorPage, FileManager, FilePreview, FloatingAIChat, FloatingInput, FooterLinkSection, SocialMediaLinks2 as FooterSocialLinks, HRISProviderSelector, HandsFreeChat, HealthSurveillance, HelpSupportPanel, HeroSearchBar, HeyOzwell, HeyOzwellSelector, HeyOzwellToggle, HoursSummary, ImagingOrderEditor, InlineBookingForm, InventoryManager, InviteUserModal, InvoiceList, InvoicePaymentPage, InvoiceView, LabOrderEditor, LanguageSelector, LanguageSelectorInline, LanguageSelectorNative, LegalLinks, LoadingBar, LoadingDots, LoadingOverlay, LoadingPage, LoadingSkeleton, MODEL_MANIFEST, MaintenancePage, MobileBackButton, MobileMenuButton, MobileMenuPanel, ModelInfoList, NavLinks, NewsletterForm, NotFoundPage, NotificationCenter, ORDER_TYPE_META, ORDER_TYPE_SEARCH_DOMAINS, OfflinePage, OnboardingCompletion, OnboardingStepQuestion, OnboardingWizard, OpenStatusBadge, OrderCard, OrderConfirmation, OrderConfirmationWizard, OrderDetailSidebar, OrderEditor, OrderList, OrderLookupForm, OrderSidebar, OrderSidebarTabs, OzwellChat, OzwellSettingsMenu, PageHeader, PatientHeader, PaymentHistoryTable, PaymentMethodBank, PaymentMethodCard, PaymentMethodList, PendingClaimsTable, PermissionsEditor, PillSelect, PresentingProblems, ProblemList, ProcedureOrderEditor, ProductVersion, ProductVersionBadge, Breadcrumb2 as ProviderBreadcrumb, ProviderCard, ProviderCardGrid, ProviderCardSkeleton, ProviderDetailHeader, ProviderDetailHeaderSkeleton, ProviderLogo2 as ProviderLogo, ProviderOverview, ProviderSearchBar, ProviderSearchFilters, ProviderSelector, ProviderSettings, SocialMediaLinks as ProviderSocialLinks, ProviderUsersTable, QuickBookCard, QuickLinksCard, RELEVANCE_LABELS, RecurringServiceAddCard, RecurringServiceCard, RecurringServiceGrid, RecurringServiceSetupModal, ReferralEditor, RejectionModal, ReportDashboard, ReportDatePicker, ReportLink, ReportTimeRange, ResultsEntryCard, ResultsEntryForm, ResultsEntryModal, SSOConfigForm, ScheduleCalendar, SearchResultsMessage, SelectedServicesBadges, ServerErrorPage, ServiceAccordion, ServiceBadge, ServiceBadgeGroup, ServiceCard, ServiceCategoryBadge, ServiceGeneralSettings, ServiceGrid, ServiceLink, ServiceList, ServiceMultiSelect, ServicePicker, ServicePricingManager, ServiceSelect, ServiceShippingSettings, ServiceTagCloud, ServiceTagCloudBadges, SetupServiceModal, Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMobileToggle, SidebarNav, SidebarNavGroup, SidebarNavItem, SidebarProvider, SidebarSearch, SidebarToggle, SimpleFooter, SiteFooter, SiteHeader, SiteLogo, StepIndicator, StripeBadge, StripeSecureBadge, SuggestedActions, TableOfContents, TimelineEventList, TimelineProgress, Toast, ToastContainer, ToastProvider, UncertaintyBadge, UpdateAvailableOverlay, UserMenu, VerifiedBadge2 as VerifiedBadge, VisitScribe, VoiceManager, VoiceSetup, WEBSITE_TYPES, WebChartReportViewer, WebcamModal, WebsiteInput, WebsiteInputGroup, attributeSegments, calculateDateRange, centroid, chime, clusterEmbeddings, concernGroupKey, concernHistoryContent, cosine, countBadgeVariants, countChipVariants, create24HourSchedule, createDefaultSchedule, createWeekdaySchedule, currentAssertion, defaultCaseManagementHeaderLabels, defaultHeyOzwellSelectorLabels, defaultOrderTabs, defaultReconciliationIsEqual, formatAddressLines, formatAddressSingleLine, formatCityState, formatCityStateZip, generateId, getDefaultPresets, getExtendedPresets, getGoogleMapsSearchUrl, getGoogleMapsUrl, getWakeWarm, inferSpeakerRoles, isConditionCodetype, isValidUrl, labelClusters, medicationToOrder, mergeTurns, normalizeClosingTime, normalizeConditionCodingSystem, openRollingRecorder, orderToMedication, orderTypeForCodetype, parseTimeInput, panelVariants as reconciliationPanelVariants, subscribeWakeWarm, useCamera, useCommandPalette, useConnectionStatus, useCookieConsent, useDiarization, useDocumentDetection, useDropzone, useFileUpload, useHeyOzwell, useOptionalToast, useSidebar, useSpeakerVerify, useToast, useVisitScribe, useVoiceSetup, useWakeWord, warmWakeModels, widgetVariants };
44858
44254
  //# sourceMappingURL=index.js.map
44859
44255
  //# sourceMappingURL=index.js.map