@alfadocs/ui-kit 0.0.20 → 0.1.1

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 (549) hide show
  1. package/dist/_chunks/accordion-BJD1aM67.js +117 -0
  2. package/dist/_chunks/accordion-BJD1aM67.js.map +1 -0
  3. package/dist/_chunks/agenda-card-Bld47Eul.js +130 -0
  4. package/dist/_chunks/agenda-card-Bld47Eul.js.map +1 -0
  5. package/dist/_chunks/agenda-tray-D86cNIJ0.js +119 -0
  6. package/dist/_chunks/agenda-tray-D86cNIJ0.js.map +1 -0
  7. package/dist/_chunks/ai-prompt-input-CdYwt2VP.js +379 -0
  8. package/dist/_chunks/ai-prompt-input-CdYwt2VP.js.map +1 -0
  9. package/dist/_chunks/{alert-C5ud6CfE.js → alert-ETrF7Q8J.js} +51 -51
  10. package/dist/_chunks/alert-ETrF7Q8J.js.map +1 -0
  11. package/dist/_chunks/apexcharts-theme-BkSShpEy.js +48 -0
  12. package/dist/_chunks/apexcharts-theme-BkSShpEy.js.map +1 -0
  13. package/dist/_chunks/{app-frame-CmIUp9BD.js → app-frame-uq2Gy0vs.js} +37 -37
  14. package/dist/_chunks/app-frame-uq2Gy0vs.js.map +1 -0
  15. package/dist/_chunks/aspect-ratio-BqU4itGW.js +56 -0
  16. package/dist/_chunks/aspect-ratio-BqU4itGW.js.map +1 -0
  17. package/dist/_chunks/{audio-recorder-GkGNtW2X.js → audio-recorder-D2UEBF9B.js} +98 -98
  18. package/dist/_chunks/audio-recorder-D2UEBF9B.js.map +1 -0
  19. package/dist/_chunks/{audio-visualiser-CIO3yy23.js → audio-visualiser-B4u4goV5.js} +46 -46
  20. package/dist/_chunks/audio-visualiser-B4u4goV5.js.map +1 -0
  21. package/dist/_chunks/{autocomplete.agent-kb0nmr6F.js → autocomplete.agent-Bi6CiRKa.js} +111 -111
  22. package/dist/_chunks/autocomplete.agent-Bi6CiRKa.js.map +1 -0
  23. package/dist/_chunks/{avatar-BsV7vRA6.js → avatar-BAhxbDEu.js} +38 -38
  24. package/dist/_chunks/avatar-BAhxbDEu.js.map +1 -0
  25. package/dist/_chunks/badge-zDghajh8.js +104 -0
  26. package/dist/_chunks/badge-zDghajh8.js.map +1 -0
  27. package/dist/_chunks/{balance-cell-renderer-BQwN51rT.js → balance-cell-renderer-BGyvZWjB.js} +123 -124
  28. package/dist/_chunks/balance-cell-renderer-BGyvZWjB.js.map +1 -0
  29. package/dist/_chunks/{breadcrumb-DnO6eHSS.js → breadcrumb-pdUacgm1.js} +40 -40
  30. package/dist/_chunks/breadcrumb-pdUacgm1.js.map +1 -0
  31. package/dist/_chunks/button-DmiGFnNA.js +119 -0
  32. package/dist/_chunks/button-DmiGFnNA.js.map +1 -0
  33. package/dist/_chunks/{button-group-CI7LFxt3.js → button-group-BtTHSyU0.js} +24 -24
  34. package/dist/_chunks/button-group-BtTHSyU0.js.map +1 -0
  35. package/dist/_chunks/{calendar-BIXVzhkL.js → calendar-BkDeDTaX.js} +333 -290
  36. package/dist/_chunks/calendar-BkDeDTaX.js.map +1 -0
  37. package/dist/_chunks/card-DeItIBcV.js +158 -0
  38. package/dist/_chunks/card-DeItIBcV.js.map +1 -0
  39. package/dist/_chunks/{chart.agent-DkmVXNsI.js → chart.agent-BdS-_8MO.js} +66 -64
  40. package/dist/_chunks/chart.agent-BdS-_8MO.js.map +1 -0
  41. package/dist/_chunks/chat-container-Co8HpB64.js +174 -0
  42. package/dist/_chunks/chat-container-Co8HpB64.js.map +1 -0
  43. package/dist/_chunks/{chat-input-aphxDjZL.js → chat-input-3rstZhHR.js} +57 -57
  44. package/dist/_chunks/chat-input-3rstZhHR.js.map +1 -0
  45. package/dist/_chunks/{chat-message-CdJSD18D.js → chat-message-dDMVSYBs.js} +66 -66
  46. package/dist/_chunks/chat-message-dDMVSYBs.js.map +1 -0
  47. package/dist/_chunks/checkbox-DMzgtnqw.js +116 -0
  48. package/dist/_chunks/checkbox-DMzgtnqw.js.map +1 -0
  49. package/dist/_chunks/{checkbox-group-D1aqVI0-.js → checkbox-group-DBnIBRT_.js} +34 -34
  50. package/dist/_chunks/checkbox-group-DBnIBRT_.js.map +1 -0
  51. package/dist/_chunks/{collapsible-jBFm7Ah8.js → collapsible-DPGQnHZh.js} +16 -16
  52. package/dist/_chunks/collapsible-DPGQnHZh.js.map +1 -0
  53. package/dist/_chunks/{color-picker-CiotzQJF.js → color-picker-OKKF3Dww.js} +158 -158
  54. package/dist/_chunks/color-picker-OKKF3Dww.js.map +1 -0
  55. package/dist/_chunks/{combobox.agent-B6RwDSct.js → combobox.agent-CfeB-IZ1.js} +107 -107
  56. package/dist/_chunks/combobox.agent-CfeB-IZ1.js.map +1 -0
  57. package/dist/_chunks/{command-palette.agent-B87_OkmC.js → command-palette.agent-XLfSGHCL.js} +27 -27
  58. package/dist/_chunks/command-palette.agent-XLfSGHCL.js.map +1 -0
  59. package/dist/_chunks/{date-picker-CdPuI3dK.js → date-picker-DXx8oSJb.js} +5 -5
  60. package/dist/_chunks/{date-picker-CdPuI3dK.js.map → date-picker-DXx8oSJb.js.map} +1 -1
  61. package/dist/_chunks/{date-range-picker-DfK4cjln.js → date-range-picker-C3CbY__H.js} +29 -29
  62. package/dist/_chunks/{date-range-picker-DfK4cjln.js.map → date-range-picker-C3CbY__H.js.map} +1 -1
  63. package/dist/_chunks/{date-time-picker-CX_FMsLG.js → date-time-picker-Bn3FPeAc.js} +58 -58
  64. package/dist/_chunks/date-time-picker-Bn3FPeAc.js.map +1 -0
  65. package/dist/_chunks/description-list-B1CL3RTG.js +187 -0
  66. package/dist/_chunks/description-list-B1CL3RTG.js.map +1 -0
  67. package/dist/_chunks/{dialog.agent-B276rAQF.js → dialog.agent-D9WeIWi2.js} +39 -39
  68. package/dist/_chunks/dialog.agent-D9WeIWi2.js.map +1 -0
  69. package/dist/_chunks/dropdown-menu-BnVUeVG3.js +210 -0
  70. package/dist/_chunks/dropdown-menu-BnVUeVG3.js.map +1 -0
  71. package/dist/_chunks/{empty-state-DiG7vYBM.js → empty-state-DV96gCnp.js} +37 -37
  72. package/dist/_chunks/empty-state-DV96gCnp.js.map +1 -0
  73. package/dist/_chunks/{file-upload.agent-BMow5yDY.js → file-upload.agent-DYFnqdxw.js} +185 -185
  74. package/dist/_chunks/file-upload.agent-DYFnqdxw.js.map +1 -0
  75. package/dist/_chunks/{flag-ChP784EM.js → flag-C3BUEwHH.js} +14 -14
  76. package/dist/_chunks/{flag-ChP784EM.js.map → flag-C3BUEwHH.js.map} +1 -1
  77. package/dist/_chunks/floating-action-button-RigP2E7o.js +95 -0
  78. package/dist/_chunks/floating-action-button-RigP2E7o.js.map +1 -0
  79. package/dist/_chunks/form-field-DI5LY5aG.js +121 -0
  80. package/dist/_chunks/form-field-DI5LY5aG.js.map +1 -0
  81. package/dist/_chunks/freemium-paywall-D0GiUFOe.js +197 -0
  82. package/dist/_chunks/freemium-paywall-D0GiUFOe.js.map +1 -0
  83. package/dist/_chunks/{header-BpKaSL_v.js → header-CW2oRd5H.js} +111 -111
  84. package/dist/_chunks/header-CW2oRd5H.js.map +1 -0
  85. package/dist/_chunks/icon-button-C482ii4y.js +45 -0
  86. package/dist/_chunks/icon-button-C482ii4y.js.map +1 -0
  87. package/dist/_chunks/{icon-button-group-tERESY-n.js → icon-button-group-BnhkUWUg.js} +56 -56
  88. package/dist/_chunks/icon-button-group-BnhkUWUg.js.map +1 -0
  89. package/dist/_chunks/{kbd-0iPlQjgC.js → kbd-DTcIjYA7.js} +52 -52
  90. package/dist/_chunks/kbd-DTcIjYA7.js.map +1 -0
  91. package/dist/_chunks/{key-value-pair--Je59tAF.js → key-value-pair-DDhSYdDL.js} +26 -26
  92. package/dist/_chunks/key-value-pair-DDhSYdDL.js.map +1 -0
  93. package/dist/_chunks/leo-sidebar-gXXcGPKk.js +755 -0
  94. package/dist/_chunks/leo-sidebar-gXXcGPKk.js.map +1 -0
  95. package/dist/_chunks/{list-n8vI8Yvn.js → list-Cwe8mcmh.js} +96 -96
  96. package/dist/_chunks/list-Cwe8mcmh.js.map +1 -0
  97. package/dist/_chunks/live-region-COggO6x6.js +57 -0
  98. package/dist/_chunks/live-region-COggO6x6.js.map +1 -0
  99. package/dist/_chunks/{logo-UNWYb9p7.js → logo-3wrZGpwg.js} +29 -29
  100. package/dist/_chunks/logo-3wrZGpwg.js.map +1 -0
  101. package/dist/_chunks/{matrix-rain-Q7xTEpKu.js → matrix-rain-gsHqSvW7.js} +75 -75
  102. package/dist/_chunks/matrix-rain-gsHqSvW7.js.map +1 -0
  103. package/dist/_chunks/message-card-DID3cXUW.js +275 -0
  104. package/dist/_chunks/message-card-DID3cXUW.js.map +1 -0
  105. package/dist/_chunks/message-tray-CVMLBnVp.js +302 -0
  106. package/dist/_chunks/message-tray-CVMLBnVp.js.map +1 -0
  107. package/dist/_chunks/{multi-select.agent-Cf4pU636.js → multi-select.agent-BUKYZJfp.js} +126 -126
  108. package/dist/_chunks/multi-select.agent-BUKYZJfp.js.map +1 -0
  109. package/dist/_chunks/{navigation-menu-DBDsAmXc.js → navigation-menu-NjwxyshT.js} +68 -97
  110. package/dist/_chunks/navigation-menu-NjwxyshT.js.map +1 -0
  111. package/dist/_chunks/notification-card-BZ33fq8H.js +255 -0
  112. package/dist/_chunks/notification-card-BZ33fq8H.js.map +1 -0
  113. package/dist/_chunks/{notification-tray-CNWPuPZp.js → notification-tray-CnEd7B2q.js} +96 -96
  114. package/dist/_chunks/notification-tray-CnEd7B2q.js.map +1 -0
  115. package/dist/_chunks/{number-input-B1Th0DdC.js → number-input-D7rSa_ef.js} +73 -73
  116. package/dist/_chunks/number-input-D7rSa_ef.js.map +1 -0
  117. package/dist/_chunks/{otp-input-CmoBuZ4K.js → otp-input-C9R9sC74.js} +42 -42
  118. package/dist/_chunks/otp-input-C9R9sC74.js.map +1 -0
  119. package/dist/_chunks/{pagination.agent-B5KLDCMN.js → pagination.agent-D75FB6XP.js} +106 -106
  120. package/dist/_chunks/pagination.agent-D75FB6XP.js.map +1 -0
  121. package/dist/_chunks/{password-input-DnjNh-hQ.js → password-input-C6PvKyQV.js} +59 -59
  122. package/dist/_chunks/password-input-C6PvKyQV.js.map +1 -0
  123. package/dist/_chunks/{patient-shell-D0RaWDMR.js → patient-shell-CGsmI5LJ.js} +9 -9
  124. package/dist/_chunks/{patient-shell-D0RaWDMR.js.map → patient-shell-CGsmI5LJ.js.map} +1 -1
  125. package/dist/_chunks/{payment-form-Cf7U6r5L.js → payment-form-l3j-gA-t.js} +108 -108
  126. package/dist/_chunks/payment-form-l3j-gA-t.js.map +1 -0
  127. package/dist/_chunks/{pdf-viewer.agent-DXjgDItg.js → pdf-viewer.agent-DuGfSoep.js} +234 -233
  128. package/dist/_chunks/pdf-viewer.agent-DuGfSoep.js.map +1 -0
  129. package/dist/_chunks/{phone-input-C2dtIuxW.js → phone-input-ZWa_FU4R.js} +112 -112
  130. package/dist/_chunks/phone-input-ZWa_FU4R.js.map +1 -0
  131. package/dist/_chunks/{popover-D1woU9mP.js → popover-CMr1pTPO.js} +58 -58
  132. package/dist/_chunks/popover-CMr1pTPO.js.map +1 -0
  133. package/dist/_chunks/{privacy-lock-C1X42Sit.js → privacy-lock-DdpkKNM2.js} +37 -36
  134. package/dist/_chunks/privacy-lock-DdpkKNM2.js.map +1 -0
  135. package/dist/_chunks/{progress-DL3-izuO.js → progress-D4ELgHG3.js} +43 -43
  136. package/dist/_chunks/progress-D4ELgHG3.js.map +1 -0
  137. package/dist/_chunks/radio-B_gvGU29.js +106 -0
  138. package/dist/_chunks/radio-B_gvGU29.js.map +1 -0
  139. package/dist/_chunks/radio-group-Bn8Wt0yc.js +88 -0
  140. package/dist/_chunks/radio-group-Bn8Wt0yc.js.map +1 -0
  141. package/dist/_chunks/{react-day-picker-DQKDiJ37.js → react-day-picker-d0MHsyCj.js} +174 -174
  142. package/dist/_chunks/{react-day-picker-DQKDiJ37.js.map → react-day-picker-d0MHsyCj.js.map} +1 -1
  143. package/dist/_chunks/{resizable.agent-DVk_jJur.js → resizable.agent-DBpPGNdy.js} +122 -122
  144. package/dist/_chunks/resizable.agent-DBpPGNdy.js.map +1 -0
  145. package/dist/_chunks/{rich-text-editor.agent-BOjF4Xao.js → rich-text-editor.agent-C1_E7_7t.js} +225 -225
  146. package/dist/_chunks/rich-text-editor.agent-C1_E7_7t.js.map +1 -0
  147. package/dist/_chunks/scroll-area-Ba99pJ_R.js +144 -0
  148. package/dist/_chunks/scroll-area-Ba99pJ_R.js.map +1 -0
  149. package/dist/_chunks/{search-bar-DgSOAajC.js → search-bar-VoTqJhRp.js} +131 -131
  150. package/dist/_chunks/search-bar-VoTqJhRp.js.map +1 -0
  151. package/dist/_chunks/search-input-D6rarD0_.js +197 -0
  152. package/dist/_chunks/search-input-D6rarD0_.js.map +1 -0
  153. package/dist/_chunks/select-DbxWF3O_.js +320 -0
  154. package/dist/_chunks/select-DbxWF3O_.js.map +1 -0
  155. package/dist/_chunks/{separator-DExI4amU.js → separator-BRQHi8s0.js} +17 -17
  156. package/dist/_chunks/separator-BRQHi8s0.js.map +1 -0
  157. package/dist/_chunks/sheet-DyWqluiS.js +188 -0
  158. package/dist/_chunks/sheet-DyWqluiS.js.map +1 -0
  159. package/dist/_chunks/sidebar-B52iGGNV.js +1076 -0
  160. package/dist/_chunks/sidebar-B52iGGNV.js.map +1 -0
  161. package/dist/_chunks/{sign-in-with-alfadocs-button-BBL11-Rt.js → sign-in-with-alfadocs-button-BU7MP5Hg.js} +4 -4
  162. package/dist/_chunks/{sign-in-with-alfadocs-button-BBL11-Rt.js.map → sign-in-with-alfadocs-button-BU7MP5Hg.js.map} +1 -1
  163. package/dist/_chunks/{signature-capture.agent-L_1_-zVR.js → signature-capture.agent-4htVctJ2.js} +163 -163
  164. package/dist/_chunks/signature-capture.agent-4htVctJ2.js.map +1 -0
  165. package/dist/_chunks/skeleton-ClO1v5GE.js +95 -0
  166. package/dist/_chunks/skeleton-ClO1v5GE.js.map +1 -0
  167. package/dist/_chunks/skip-link-CASJkBOe.js +68 -0
  168. package/dist/_chunks/skip-link-CASJkBOe.js.map +1 -0
  169. package/dist/_chunks/slider-n8JWpJvT.js +273 -0
  170. package/dist/_chunks/slider-n8JWpJvT.js.map +1 -0
  171. package/dist/_chunks/slot-grid-BRAkqChA.js +491 -0
  172. package/dist/_chunks/slot-grid-BRAkqChA.js.map +1 -0
  173. package/dist/_chunks/{sparkline.agent-BDTXzTy9.js → sparkline.agent-BLY1IMyW.js} +45 -45
  174. package/dist/_chunks/sparkline.agent-BLY1IMyW.js.map +1 -0
  175. package/dist/_chunks/{spinner-77xUGpuX.js → spinner-CoAOGcDa.js} +40 -40
  176. package/dist/_chunks/spinner-CoAOGcDa.js.map +1 -0
  177. package/dist/_chunks/stat-D76MNHzK.js +208 -0
  178. package/dist/_chunks/stat-D76MNHzK.js.map +1 -0
  179. package/dist/_chunks/{stepper-accordion-BkvqQWPI.js → stepper-accordion-DHQ80A4v.js} +33 -33
  180. package/dist/_chunks/stepper-accordion-DHQ80A4v.js.map +1 -0
  181. package/dist/_chunks/{stepper-calendar-BQMjrwzo.js → stepper-calendar-vtWwa2bY.js} +159 -159
  182. package/dist/_chunks/stepper-calendar-vtWwa2bY.js.map +1 -0
  183. package/dist/_chunks/stepper-progress-DMZ5w5VR.js +128 -0
  184. package/dist/_chunks/stepper-progress-DMZ5w5VR.js.map +1 -0
  185. package/dist/_chunks/streaming-text-D0cW8pwq.js +104 -0
  186. package/dist/_chunks/streaming-text-D0cW8pwq.js.map +1 -0
  187. package/dist/_chunks/suggestion-chip-BgNFpPEE.js +157 -0
  188. package/dist/_chunks/suggestion-chip-BgNFpPEE.js.map +1 -0
  189. package/dist/_chunks/switch-DtLPKO0p.js +137 -0
  190. package/dist/_chunks/switch-DtLPKO0p.js.map +1 -0
  191. package/dist/_chunks/{tabs.agent-FsGU3sZL.js → tabs.agent-BDUlyPbJ.js} +101 -101
  192. package/dist/_chunks/tabs.agent-BDUlyPbJ.js.map +1 -0
  193. package/dist/_chunks/tag-CfSZZN2f.js +194 -0
  194. package/dist/_chunks/tag-CfSZZN2f.js.map +1 -0
  195. package/dist/_chunks/task-card-B5xfiFg5.js +112 -0
  196. package/dist/_chunks/task-card-B5xfiFg5.js.map +1 -0
  197. package/dist/_chunks/task-tray-BnpiodZ4.js +99 -0
  198. package/dist/_chunks/task-tray-BnpiodZ4.js.map +1 -0
  199. package/dist/_chunks/text-area-BqbruBWx.js +152 -0
  200. package/dist/_chunks/text-area-BqbruBWx.js.map +1 -0
  201. package/dist/_chunks/text-input-lh6kRXZS.js +187 -0
  202. package/dist/_chunks/text-input-lh6kRXZS.js.map +1 -0
  203. package/dist/_chunks/theme-toggle-BHKMiORD.js +326 -0
  204. package/dist/_chunks/theme-toggle-BHKMiORD.js.map +1 -0
  205. package/dist/_chunks/{time-picker-BapZq0OY.js → time-picker-DbpAmPux.js} +102 -102
  206. package/dist/_chunks/time-picker-DbpAmPux.js.map +1 -0
  207. package/dist/_chunks/timeline-vjsUeuq1.js +219 -0
  208. package/dist/_chunks/timeline-vjsUeuq1.js.map +1 -0
  209. package/dist/_chunks/{timestamp-BLM-jjdw.js → timestamp-DmSt92P1.js} +30 -30
  210. package/dist/_chunks/timestamp-DmSt92P1.js.map +1 -0
  211. package/dist/_chunks/{toast-DSCqnDRl.js → toast-DllSITLf.js} +151 -151
  212. package/dist/_chunks/{toast-DSCqnDRl.js.map → toast-DllSITLf.js.map} +1 -1
  213. package/dist/_chunks/{tooltip-DF6WjD1r.js → tooltip-Dp3u8jGz.js} +30 -30
  214. package/dist/_chunks/tooltip-Dp3u8jGz.js.map +1 -0
  215. package/dist/_chunks/{tooth-scheme.agent-CFKl3iQr.js → tooth-scheme.agent-BRqxWa1D.js} +75 -75
  216. package/dist/_chunks/tooth-scheme.agent-BRqxWa1D.js.map +1 -0
  217. package/dist/_chunks/transcript-panel-Bg1BTMSr.js +265 -0
  218. package/dist/_chunks/transcript-panel-Bg1BTMSr.js.map +1 -0
  219. package/dist/_chunks/typing-indicator-BRg22Rqr.js +81 -0
  220. package/dist/_chunks/typing-indicator-BRg22Rqr.js.map +1 -0
  221. package/dist/_chunks/use-locale-BuXR_Zl9.js +32 -0
  222. package/dist/_chunks/use-locale-BuXR_Zl9.js.map +1 -0
  223. package/dist/_chunks/visually-hidden-Y3jcdCv-.js +21 -0
  224. package/dist/_chunks/visually-hidden-Y3jcdCv-.js.map +1 -0
  225. package/dist/_chunks/{warning-stack-Cyf_81SL.js → warning-stack-B9N9yWet.js} +38 -38
  226. package/dist/_chunks/warning-stack-B9N9yWet.js.map +1 -0
  227. package/dist/_chunks/{workflow-map-Uf-hHAO3.js → workflow-map-gBhL_Wrs.js} +385 -385
  228. package/dist/_chunks/workflow-map-gBhL_Wrs.js.map +1 -0
  229. package/dist/agent-catalog.json +1 -1
  230. package/dist/components/_shared/index.d.ts +2 -0
  231. package/dist/components/_shared/index.d.ts.map +1 -1
  232. package/dist/components/_shared/use-focus-trap.d.ts +32 -0
  233. package/dist/components/_shared/use-focus-trap.d.ts.map +1 -0
  234. package/dist/components/_shared/use-neutralize-hidden-focus.d.ts +3 -0
  235. package/dist/components/_shared/use-neutralize-hidden-focus.d.ts.map +1 -0
  236. package/dist/components/accordion/index.js +1 -1
  237. package/dist/components/agenda-card/index.js +1 -1
  238. package/dist/components/agenda-tray/index.js +1 -1
  239. package/dist/components/ai-prompt-input/index.js +1 -1
  240. package/dist/components/alert/index.js +1 -1
  241. package/dist/components/app-frame/index.js +1 -1
  242. package/dist/components/aspect-ratio/index.js +1 -1
  243. package/dist/components/audio-recorder/index.js +1 -1
  244. package/dist/components/audio-visualiser/index.js +1 -1
  245. package/dist/components/autocomplete/index.js +1 -1
  246. package/dist/components/avatar/index.js +1 -1
  247. package/dist/components/badge/index.js +1 -1
  248. package/dist/components/breadcrumb/index.js +1 -1
  249. package/dist/components/button/index.js +2 -2
  250. package/dist/components/button-group/index.js +1 -1
  251. package/dist/components/calendar/calendar.d.ts.map +1 -1
  252. package/dist/components/calendar/index.js +1 -1
  253. package/dist/components/card/index.js +1 -1
  254. package/dist/components/chart/chart.d.ts.map +1 -1
  255. package/dist/components/chart/index.js +1 -1
  256. package/dist/components/chat-container/index.js +1 -1
  257. package/dist/components/chat-input/index.js +1 -1
  258. package/dist/components/chat-message/index.js +1 -1
  259. package/dist/components/checkbox/index.js +1 -1
  260. package/dist/components/checkbox-group/index.js +1 -1
  261. package/dist/components/collapsible/index.js +1 -1
  262. package/dist/components/color-picker/index.js +1 -1
  263. package/dist/components/combobox/index.js +1 -1
  264. package/dist/components/command-palette/index.js +1 -1
  265. package/dist/components/data-table/index.js +1 -1
  266. package/dist/components/data-table/toolbar.d.ts.map +1 -1
  267. package/dist/components/date-picker/index.js +1 -1
  268. package/dist/components/date-range-picker/index.js +1 -1
  269. package/dist/components/date-time-picker/index.js +1 -1
  270. package/dist/components/description-list/index.js +1 -1
  271. package/dist/components/dialog/index.js +1 -1
  272. package/dist/components/dropdown-menu/index.js +1 -1
  273. package/dist/components/empty-state/index.js +1 -1
  274. package/dist/components/file-upload/index.js +1 -1
  275. package/dist/components/flag/index.js +1 -1
  276. package/dist/components/floating-action-button/index.js +1 -1
  277. package/dist/components/form-field/index.js +1 -1
  278. package/dist/components/freemium-paywall/index.js +1 -1
  279. package/dist/components/header/index.js +1 -1
  280. package/dist/components/icon-button/index.d.ts +3 -0
  281. package/dist/components/icon-button/index.d.ts.map +1 -0
  282. package/dist/components/icon-button/index.js +5 -0
  283. package/dist/components/icon-button/index.js.map +1 -0
  284. package/dist/components/icon-button-group/index.js +1 -1
  285. package/dist/components/index.d.ts +8 -2
  286. package/dist/components/index.d.ts.map +1 -1
  287. package/dist/components/kbd/index.js +1 -1
  288. package/dist/components/key-value-pair/index.js +1 -1
  289. package/dist/components/list/index.js +1 -1
  290. package/dist/components/live-region/index.d.ts +3 -0
  291. package/dist/components/live-region/index.d.ts.map +1 -0
  292. package/dist/components/live-region/index.js +5 -0
  293. package/dist/components/live-region/index.js.map +1 -0
  294. package/dist/components/live-region/live-region.d.ts +49 -0
  295. package/dist/components/live-region/live-region.d.ts.map +1 -0
  296. package/dist/components/logo/index.js +1 -1
  297. package/dist/components/matrix-rain/index.js +1 -1
  298. package/dist/components/message-card/index.js +1 -1
  299. package/dist/components/message-tray/index.js +1 -1
  300. package/dist/components/multi-select/index.js +1 -1
  301. package/dist/components/navigation-menu/index.d.ts +4 -2
  302. package/dist/components/navigation-menu/index.d.ts.map +1 -1
  303. package/dist/components/navigation-menu/index.js +3 -2
  304. package/dist/components/navigation-menu/index.js.map +1 -1
  305. package/dist/components/navigation-menu/navigation-menu.d.ts +2 -6
  306. package/dist/components/navigation-menu/navigation-menu.d.ts.map +1 -1
  307. package/dist/components/notification-card/index.js +1 -1
  308. package/dist/components/notification-tray/index.js +1 -1
  309. package/dist/components/number-input/index.js +1 -1
  310. package/dist/components/otp-input/index.js +1 -1
  311. package/dist/components/pagination/index.js +1 -1
  312. package/dist/components/password-input/index.js +1 -1
  313. package/dist/components/payment-form/index.js +1 -1
  314. package/dist/components/pdf-viewer/index.js +1 -1
  315. package/dist/components/pdf-viewer/pdf-viewer.d.ts.map +1 -1
  316. package/dist/components/phone-input/index.js +1 -1
  317. package/dist/components/popover/index.js +1 -1
  318. package/dist/components/privacy-lock/index.js +1 -1
  319. package/dist/components/privacy-lock/privacy-lock.d.ts.map +1 -1
  320. package/dist/components/progress/index.js +1 -1
  321. package/dist/components/radio/index.d.ts +3 -0
  322. package/dist/components/radio/index.d.ts.map +1 -0
  323. package/dist/components/radio/index.js +5 -0
  324. package/dist/components/radio/index.js.map +1 -0
  325. package/dist/components/radio-group/index.js +4 -3
  326. package/dist/components/radio-group/index.js.map +1 -1
  327. package/dist/components/resizable/index.js +1 -1
  328. package/dist/components/rich-text-editor/index.js +1 -1
  329. package/dist/components/scroll-area/index.js +1 -1
  330. package/dist/components/search-bar/index.js +1 -1
  331. package/dist/components/search-input/index.js +1 -1
  332. package/dist/components/select/index.js +1 -1
  333. package/dist/components/separator/index.js +1 -1
  334. package/dist/components/sheet/index.js +1 -1
  335. package/dist/components/sidebar/index.js +1 -1
  336. package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
  337. package/dist/components/signature-capture/index.js +1 -1
  338. package/dist/components/skeleton/index.js +1 -1
  339. package/dist/components/skip-link/index.d.ts +2 -0
  340. package/dist/components/skip-link/index.d.ts.map +1 -0
  341. package/dist/components/skip-link/index.js +5 -0
  342. package/dist/components/skip-link/index.js.map +1 -0
  343. package/dist/components/skip-link/skip-link.d.ts +34 -0
  344. package/dist/components/skip-link/skip-link.d.ts.map +1 -0
  345. package/dist/components/slider/index.js +1 -1
  346. package/dist/components/slot-grid/index.js +1 -1
  347. package/dist/components/sparkline/index.js +1 -1
  348. package/dist/components/sparkline/sparkline.d.ts.map +1 -1
  349. package/dist/components/spinner/index.js +1 -1
  350. package/dist/components/stat/index.js +1 -1
  351. package/dist/components/stepper-accordion/index.js +1 -1
  352. package/dist/components/stepper-calendar/index.js +1 -1
  353. package/dist/components/stepper-progress/index.js +1 -1
  354. package/dist/components/streaming-text/index.js +1 -1
  355. package/dist/components/suggestion-chip/index.js +1 -1
  356. package/dist/components/switch/index.js +1 -1
  357. package/dist/components/tabs/index.js +1 -1
  358. package/dist/components/tag/index.js +1 -1
  359. package/dist/components/task-card/index.js +1 -1
  360. package/dist/components/task-tray/index.js +1 -1
  361. package/dist/components/text-area/index.js +1 -1
  362. package/dist/components/text-input/index.js +1 -1
  363. package/dist/components/theme-toggle/index.d.ts +3 -0
  364. package/dist/components/theme-toggle/index.d.ts.map +1 -0
  365. package/dist/components/theme-toggle/index.js +5 -0
  366. package/dist/components/theme-toggle/index.js.map +1 -0
  367. package/dist/components/theme-toggle/theme-toggle.d.ts +34 -0
  368. package/dist/components/theme-toggle/theme-toggle.d.ts.map +1 -0
  369. package/dist/components/time-picker/index.js +1 -1
  370. package/dist/components/timeline/index.js +1 -1
  371. package/dist/components/timestamp/index.js +1 -1
  372. package/dist/components/toast/index.js +1 -1
  373. package/dist/components/tooltip/index.js +1 -1
  374. package/dist/components/tooth-scheme/index.js +1 -1
  375. package/dist/components/transcript-panel/index.js +1 -1
  376. package/dist/components/typing-indicator/index.js +1 -1
  377. package/dist/components/visually-hidden/index.d.ts +2 -0
  378. package/dist/components/visually-hidden/index.d.ts.map +1 -0
  379. package/dist/components/visually-hidden/index.js +5 -0
  380. package/dist/components/visually-hidden/index.js.map +1 -0
  381. package/dist/components/visually-hidden/visually-hidden.d.ts +11 -0
  382. package/dist/components/visually-hidden/visually-hidden.d.ts.map +1 -0
  383. package/dist/components/warning-stack/index.js +1 -1
  384. package/dist/components/workflow/index.js +1 -1
  385. package/dist/hooks/index.d.ts +3 -0
  386. package/dist/hooks/index.d.ts.map +1 -1
  387. package/dist/hooks/index.js +10 -7
  388. package/dist/hooks/index.js.map +1 -1
  389. package/dist/hooks/use-locale.d.ts +27 -0
  390. package/dist/hooks/use-locale.d.ts.map +1 -0
  391. package/dist/hooks/use-media-query.d.ts +17 -0
  392. package/dist/hooks/use-media-query.d.ts.map +1 -0
  393. package/dist/i18n/config.js +59 -2
  394. package/dist/i18n/config.js.map +1 -1
  395. package/dist/i18n/resources.d.ts +57 -0
  396. package/dist/i18n/resources.d.ts.map +1 -1
  397. package/dist/index.js +442 -431
  398. package/dist/index.js.map +1 -1
  399. package/dist/locales/de.json +19 -0
  400. package/dist/locales/en.json +19 -0
  401. package/dist/locales/it.json +19 -0
  402. package/dist/patterns/leo-assistant/index.js +1 -1
  403. package/dist/patterns/patient-shell/index.js +1 -1
  404. package/dist/tokens.css +2 -2
  405. package/package.json +4 -2
  406. package/dist/_chunks/accordion-Dgcd38U_.js +0 -117
  407. package/dist/_chunks/accordion-Dgcd38U_.js.map +0 -1
  408. package/dist/_chunks/agenda-card-B2gq-gTq.js +0 -130
  409. package/dist/_chunks/agenda-card-B2gq-gTq.js.map +0 -1
  410. package/dist/_chunks/agenda-tray-twa8g_87.js +0 -119
  411. package/dist/_chunks/agenda-tray-twa8g_87.js.map +0 -1
  412. package/dist/_chunks/ai-prompt-input-C6IY_Eds.js +0 -379
  413. package/dist/_chunks/ai-prompt-input-C6IY_Eds.js.map +0 -1
  414. package/dist/_chunks/alert-C5ud6CfE.js.map +0 -1
  415. package/dist/_chunks/apexcharts-theme-cpBYmCcr.js +0 -17
  416. package/dist/_chunks/apexcharts-theme-cpBYmCcr.js.map +0 -1
  417. package/dist/_chunks/app-frame-CmIUp9BD.js.map +0 -1
  418. package/dist/_chunks/aspect-ratio-Bo3cZXmR.js +0 -56
  419. package/dist/_chunks/aspect-ratio-Bo3cZXmR.js.map +0 -1
  420. package/dist/_chunks/audio-recorder-GkGNtW2X.js.map +0 -1
  421. package/dist/_chunks/audio-visualiser-CIO3yy23.js.map +0 -1
  422. package/dist/_chunks/autocomplete.agent-kb0nmr6F.js.map +0 -1
  423. package/dist/_chunks/avatar-BsV7vRA6.js.map +0 -1
  424. package/dist/_chunks/badge--CmSr7ok.js +0 -104
  425. package/dist/_chunks/badge--CmSr7ok.js.map +0 -1
  426. package/dist/_chunks/balance-cell-renderer-BQwN51rT.js.map +0 -1
  427. package/dist/_chunks/breadcrumb-DnO6eHSS.js.map +0 -1
  428. package/dist/_chunks/button-CXL8bA8G.js +0 -119
  429. package/dist/_chunks/button-CXL8bA8G.js.map +0 -1
  430. package/dist/_chunks/button-group-CI7LFxt3.js.map +0 -1
  431. package/dist/_chunks/calendar-BIXVzhkL.js.map +0 -1
  432. package/dist/_chunks/card-n97MNPP2.js +0 -158
  433. package/dist/_chunks/card-n97MNPP2.js.map +0 -1
  434. package/dist/_chunks/chart.agent-DkmVXNsI.js.map +0 -1
  435. package/dist/_chunks/chat-container-SR3UWxbL.js +0 -174
  436. package/dist/_chunks/chat-container-SR3UWxbL.js.map +0 -1
  437. package/dist/_chunks/chat-input-aphxDjZL.js.map +0 -1
  438. package/dist/_chunks/chat-message-CdJSD18D.js.map +0 -1
  439. package/dist/_chunks/checkbox-CfiZ0FZc.js +0 -116
  440. package/dist/_chunks/checkbox-CfiZ0FZc.js.map +0 -1
  441. package/dist/_chunks/checkbox-group-D1aqVI0-.js.map +0 -1
  442. package/dist/_chunks/collapsible-jBFm7Ah8.js.map +0 -1
  443. package/dist/_chunks/color-picker-CiotzQJF.js.map +0 -1
  444. package/dist/_chunks/combobox.agent-B6RwDSct.js.map +0 -1
  445. package/dist/_chunks/command-palette.agent-B87_OkmC.js.map +0 -1
  446. package/dist/_chunks/date-time-picker-CX_FMsLG.js.map +0 -1
  447. package/dist/_chunks/description-list-C5UPZgX6.js +0 -187
  448. package/dist/_chunks/description-list-C5UPZgX6.js.map +0 -1
  449. package/dist/_chunks/dialog.agent-B276rAQF.js.map +0 -1
  450. package/dist/_chunks/dropdown-menu-CJKvK7VG.js +0 -210
  451. package/dist/_chunks/dropdown-menu-CJKvK7VG.js.map +0 -1
  452. package/dist/_chunks/empty-state-DiG7vYBM.js.map +0 -1
  453. package/dist/_chunks/file-upload.agent-BMow5yDY.js.map +0 -1
  454. package/dist/_chunks/floating-action-button-BM9ib-Wf.js +0 -95
  455. package/dist/_chunks/floating-action-button-BM9ib-Wf.js.map +0 -1
  456. package/dist/_chunks/form-field-B4bwrccN.js +0 -121
  457. package/dist/_chunks/form-field-B4bwrccN.js.map +0 -1
  458. package/dist/_chunks/freemium-paywall-DVyNsQHS.js +0 -197
  459. package/dist/_chunks/freemium-paywall-DVyNsQHS.js.map +0 -1
  460. package/dist/_chunks/header-BpKaSL_v.js.map +0 -1
  461. package/dist/_chunks/icon-button-C1vpylg3.js +0 -45
  462. package/dist/_chunks/icon-button-C1vpylg3.js.map +0 -1
  463. package/dist/_chunks/icon-button-group-tERESY-n.js.map +0 -1
  464. package/dist/_chunks/kbd-0iPlQjgC.js.map +0 -1
  465. package/dist/_chunks/key-value-pair--Je59tAF.js.map +0 -1
  466. package/dist/_chunks/leo-sidebar-9A9AWBxX.js +0 -755
  467. package/dist/_chunks/leo-sidebar-9A9AWBxX.js.map +0 -1
  468. package/dist/_chunks/list-n8vI8Yvn.js.map +0 -1
  469. package/dist/_chunks/logo-UNWYb9p7.js.map +0 -1
  470. package/dist/_chunks/matrix-rain-Q7xTEpKu.js.map +0 -1
  471. package/dist/_chunks/message-card-g5VS5Q80.js +0 -275
  472. package/dist/_chunks/message-card-g5VS5Q80.js.map +0 -1
  473. package/dist/_chunks/message-tray-CAk-iibU.js +0 -302
  474. package/dist/_chunks/message-tray-CAk-iibU.js.map +0 -1
  475. package/dist/_chunks/multi-select.agent-Cf4pU636.js.map +0 -1
  476. package/dist/_chunks/navigation-menu-DBDsAmXc.js.map +0 -1
  477. package/dist/_chunks/notification-card-CQxJporb.js +0 -255
  478. package/dist/_chunks/notification-card-CQxJporb.js.map +0 -1
  479. package/dist/_chunks/notification-tray-CNWPuPZp.js.map +0 -1
  480. package/dist/_chunks/number-input-B1Th0DdC.js.map +0 -1
  481. package/dist/_chunks/otp-input-CmoBuZ4K.js.map +0 -1
  482. package/dist/_chunks/pagination.agent-B5KLDCMN.js.map +0 -1
  483. package/dist/_chunks/password-input-DnjNh-hQ.js.map +0 -1
  484. package/dist/_chunks/payment-form-Cf7U6r5L.js.map +0 -1
  485. package/dist/_chunks/pdf-viewer.agent-DXjgDItg.js.map +0 -1
  486. package/dist/_chunks/phone-input-C2dtIuxW.js.map +0 -1
  487. package/dist/_chunks/popover-D1woU9mP.js.map +0 -1
  488. package/dist/_chunks/privacy-lock-C1X42Sit.js.map +0 -1
  489. package/dist/_chunks/progress-DL3-izuO.js.map +0 -1
  490. package/dist/_chunks/radio-group-CXN9qNPe.js +0 -185
  491. package/dist/_chunks/radio-group-CXN9qNPe.js.map +0 -1
  492. package/dist/_chunks/resizable.agent-DVk_jJur.js.map +0 -1
  493. package/dist/_chunks/rich-text-editor.agent-BOjF4Xao.js.map +0 -1
  494. package/dist/_chunks/scroll-area-DXn-YWHY.js +0 -144
  495. package/dist/_chunks/scroll-area-DXn-YWHY.js.map +0 -1
  496. package/dist/_chunks/search-bar-DgSOAajC.js.map +0 -1
  497. package/dist/_chunks/search-input-D4tC_Prn.js +0 -197
  498. package/dist/_chunks/search-input-D4tC_Prn.js.map +0 -1
  499. package/dist/_chunks/select-B4m4upMg.js +0 -320
  500. package/dist/_chunks/select-B4m4upMg.js.map +0 -1
  501. package/dist/_chunks/separator-DExI4amU.js.map +0 -1
  502. package/dist/_chunks/sheet-D6XOx0fK.js +0 -188
  503. package/dist/_chunks/sheet-D6XOx0fK.js.map +0 -1
  504. package/dist/_chunks/sidebar-r645O-k9.js +0 -1076
  505. package/dist/_chunks/sidebar-r645O-k9.js.map +0 -1
  506. package/dist/_chunks/signature-capture.agent-L_1_-zVR.js.map +0 -1
  507. package/dist/_chunks/skeleton-vbTWUntB.js +0 -95
  508. package/dist/_chunks/skeleton-vbTWUntB.js.map +0 -1
  509. package/dist/_chunks/slider-B3DBwmcm.js +0 -273
  510. package/dist/_chunks/slider-B3DBwmcm.js.map +0 -1
  511. package/dist/_chunks/slot-grid-DL_Tuj0p.js +0 -491
  512. package/dist/_chunks/slot-grid-DL_Tuj0p.js.map +0 -1
  513. package/dist/_chunks/sparkline.agent-BDTXzTy9.js.map +0 -1
  514. package/dist/_chunks/spinner-77xUGpuX.js.map +0 -1
  515. package/dist/_chunks/stat-CrumvZWf.js +0 -208
  516. package/dist/_chunks/stat-CrumvZWf.js.map +0 -1
  517. package/dist/_chunks/stepper-accordion-BkvqQWPI.js.map +0 -1
  518. package/dist/_chunks/stepper-calendar-BQMjrwzo.js.map +0 -1
  519. package/dist/_chunks/stepper-progress-Bwfl-0rV.js +0 -128
  520. package/dist/_chunks/stepper-progress-Bwfl-0rV.js.map +0 -1
  521. package/dist/_chunks/streaming-text-Cu9YQe_1.js +0 -104
  522. package/dist/_chunks/streaming-text-Cu9YQe_1.js.map +0 -1
  523. package/dist/_chunks/suggestion-chip-XkxDJiPW.js +0 -157
  524. package/dist/_chunks/suggestion-chip-XkxDJiPW.js.map +0 -1
  525. package/dist/_chunks/switch-DyC0ThNT.js +0 -137
  526. package/dist/_chunks/switch-DyC0ThNT.js.map +0 -1
  527. package/dist/_chunks/tabs.agent-FsGU3sZL.js.map +0 -1
  528. package/dist/_chunks/tag-BucAvfTX.js +0 -194
  529. package/dist/_chunks/tag-BucAvfTX.js.map +0 -1
  530. package/dist/_chunks/task-card-uxjApfcg.js +0 -112
  531. package/dist/_chunks/task-card-uxjApfcg.js.map +0 -1
  532. package/dist/_chunks/task-tray-BdfM3p8N.js +0 -99
  533. package/dist/_chunks/task-tray-BdfM3p8N.js.map +0 -1
  534. package/dist/_chunks/text-area-CKxZ7cS3.js +0 -152
  535. package/dist/_chunks/text-area-CKxZ7cS3.js.map +0 -1
  536. package/dist/_chunks/text-input-D16CcMlL.js +0 -187
  537. package/dist/_chunks/text-input-D16CcMlL.js.map +0 -1
  538. package/dist/_chunks/time-picker-BapZq0OY.js.map +0 -1
  539. package/dist/_chunks/timeline-D3VOf4RT.js +0 -219
  540. package/dist/_chunks/timeline-D3VOf4RT.js.map +0 -1
  541. package/dist/_chunks/timestamp-BLM-jjdw.js.map +0 -1
  542. package/dist/_chunks/tooltip-DF6WjD1r.js.map +0 -1
  543. package/dist/_chunks/tooth-scheme.agent-CFKl3iQr.js.map +0 -1
  544. package/dist/_chunks/transcript-panel-aI14fHYA.js +0 -265
  545. package/dist/_chunks/transcript-panel-aI14fHYA.js.map +0 -1
  546. package/dist/_chunks/typing-indicator-BTVDEpnd.js +0 -81
  547. package/dist/_chunks/typing-indicator-BTVDEpnd.js.map +0 -1
  548. package/dist/_chunks/warning-stack-Cyf_81SL.js.map +0 -1
  549. package/dist/_chunks/workflow-map-Uf-hHAO3.js.map +0 -1
@@ -1,33 +1,33 @@
1
- import { jsxs as p, jsx as i } from "react/jsx-runtime";
1
+ import { jsxs as p, jsx as s } from "react/jsx-runtime";
2
2
  import { forwardRef as j, useId as q, useMemo as c, useRef as J, useState as A, useEffect as L, useImperativeHandle as K } from "react";
3
3
  import { c as Q } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as X } from "react-i18next";
5
5
  import tt from "react-apexcharts";
6
6
  import O from "apexcharts";
7
- import { g as E } from "./apexcharts-theme-cpBYmCcr.js";
8
- import { u as et } from "./use-prefers-reduced-motion-BMwIQRjB.js";
9
- const rt = Q("relative block w-full", {
7
+ import { u as et, g as E } from "./apexcharts-theme-BkSShpEy.js";
8
+ import { u as rt } from "./use-prefers-reduced-motion-BMwIQRjB.js";
9
+ const ot = Q("ds:relative ds:block ds:w-full", {
10
10
  variants: {
11
11
  density: {
12
- compact: "min-h-[var(--chart-min-height-compact)]",
13
- comfortable: "min-h-[var(--chart-min-height-comfortable)]"
12
+ compact: "ds:min-h-[var(--chart-min-height-compact)]",
13
+ comfortable: "ds:min-h-[var(--chart-min-height-comfortable)]"
14
14
  }
15
15
  },
16
16
  defaultVariants: { density: "comfortable" }
17
- }), ot = [
17
+ }), at = [
18
18
  "verticalLines",
19
19
  "horizontalLines",
20
20
  "slantedLines",
21
21
  "squares",
22
22
  "circles"
23
- ], at = ["line", "bar", "area"], nt = ["pie", "donut", "radialBar"];
23
+ ], nt = ["line", "bar", "area"], st = ["pie", "donut", "radialBar"];
24
24
  function b(a) {
25
- return nt.includes(a);
25
+ return st.includes(a);
26
26
  }
27
27
  function it(a) {
28
- return at.includes(a);
28
+ return nt.includes(a);
29
29
  }
30
- function st(a, r) {
30
+ function ct(a, r) {
31
31
  return b(r) ? [
32
32
  {
33
33
  name: "",
@@ -35,25 +35,27 @@ function st(a, r) {
35
35
  }
36
36
  ] : a;
37
37
  }
38
- const ct = j(
38
+ const lt = j(
39
39
  ({
40
40
  title: a,
41
41
  type: r,
42
42
  series: l,
43
- categories: u,
43
+ categories: h,
44
44
  labels: f,
45
45
  height: N,
46
46
  width: $,
47
- patterns: y = !1,
47
+ patterns: R = !1,
48
48
  toolbar: g = !1,
49
49
  locale: P,
50
50
  density: k,
51
51
  className: G
52
52
  }, V) => {
53
- const { t: o, i18n: _ } = X(), R = q(), m = c(
54
- () => `chart-${R.replace(/[^a-zA-Z0-9-_]/g, "")}`,
55
- [R]
56
- ), v = `${m}-summary`, S = J(null), [I, M] = A(0), d = P ?? _.language ?? "en", [C, U] = A(() => {
53
+ const { t: o, i18n: _ } = X(), S = q(), m = c(
54
+ () => `chart-${S.replace(/[^a-zA-Z0-9-_]/g, "")}`,
55
+ [S]
56
+ ), v = `${m}-summary`, T = J(null), [I, F] = A(0);
57
+ et(T);
58
+ const d = P ?? _.language ?? "en", [C, H] = A(() => {
57
59
  try {
58
60
  return E();
59
61
  } catch {
@@ -66,7 +68,7 @@ const ct = j(
66
68
  const e = new MutationObserver(() => {
67
69
  clearTimeout(t), t = setTimeout(() => {
68
70
  try {
69
- U(E());
71
+ H(E());
70
72
  } catch {
71
73
  }
72
74
  }, 50);
@@ -78,11 +80,11 @@ const ct = j(
78
80
  clearTimeout(t), e.disconnect();
79
81
  };
80
82
  }, []), L(() => {
81
- const t = S.current;
83
+ const t = T.current;
82
84
  if (!t || typeof ResizeObserver > "u") return;
83
85
  const e = new ResizeObserver((n) => {
84
- const s = n[0];
85
- s && M(Math.floor(s.contentRect.width));
86
+ const i = n[0];
87
+ i && F(Math.floor(i.contentRect.width));
86
88
  });
87
89
  return e.observe(t), () => e.disconnect();
88
90
  }, []), K(V, () => ({
@@ -95,10 +97,10 @@ const ct = j(
95
97
  e && (b(r), e.updateSeries(t));
96
98
  }
97
99
  }));
98
- const T = typeof document < "u" && document.documentElement.dir === "rtl", w = c(
99
- () => st(l, r),
100
+ const x = typeof document < "u" && document.documentElement.dir === "rtl", w = c(
101
+ () => ct(l, r),
100
102
  [l, r]
101
- ), h = c(
103
+ ), u = c(
102
104
  () => new Intl.NumberFormat(d),
103
105
  [d]
104
106
  ), z = c(
@@ -120,7 +122,7 @@ const ct = j(
120
122
  }
121
123
  }),
122
124
  [d, o]
123
- ), x = et(), D = c(() => {
125
+ ), y = rt(), M = c(() => {
124
126
  const t = C, e = {
125
127
  ...t,
126
128
  chart: {
@@ -129,8 +131,8 @@ const ct = j(
129
131
  toolbar: { show: g },
130
132
  zoom: { enabled: g },
131
133
  animations: {
132
- enabled: !x,
133
- dynamicAnimation: { enabled: !x }
134
+ enabled: !y,
135
+ dynamicAnimation: { enabled: !y }
134
136
  },
135
137
  locales: [z],
136
138
  defaultLocale: d,
@@ -144,13 +146,13 @@ const ct = j(
144
146
  // to the chart's own text flow. For RTL we flip via `yaxis.opposite`
145
147
  // and ApexCharts' own `direction: 'rtl'` handling; legend stays anchored
146
148
  // to the inline-start by asking for 'left' on LTR and 'right' on RTL.
147
- horizontalAlign: T ? "right" : "left",
149
+ horizontalAlign: x ? "right" : "left",
148
150
  fontFamily: "inherit"
149
151
  },
150
152
  tooltip: {
151
153
  ...t.tooltip,
152
154
  y: {
153
- formatter: (n) => h.format(n)
155
+ formatter: (n) => u.format(n)
154
156
  }
155
157
  },
156
158
  noData: {
@@ -159,21 +161,21 @@ const ct = j(
159
161
  };
160
162
  return it(r) && (e.xaxis = {
161
163
  ...t.xaxis,
162
- categories: u ?? []
164
+ categories: h ?? []
163
165
  }, e.yaxis = {
164
166
  ...t.yaxis,
165
- opposite: T,
167
+ opposite: x,
166
168
  labels: {
167
- formatter: (n) => h.format(n)
169
+ formatter: (n) => u.format(n)
168
170
  }
169
171
  }, e.stroke = {
170
172
  curve: "smooth",
171
173
  width: r === "bar" ? 0 : 2
172
- }, e.dataLabels = { enabled: !1 }), y ? e.fill = {
174
+ }, e.dataLabels = { enabled: !1 }), R ? e.fill = {
173
175
  type: "pattern",
174
176
  opacity: r === "area" ? 0.3 : 1,
175
177
  pattern: {
176
- style: [...ot],
178
+ style: [...at],
177
179
  strokeWidth: 2
178
180
  }
179
181
  } : r === "area" && (e.fill = {
@@ -184,49 +186,49 @@ const ct = j(
184
186
  C,
185
187
  m,
186
188
  g,
187
- x,
189
+ y,
188
190
  z,
189
191
  d,
190
192
  f,
191
- h,
193
+ u,
192
194
  o,
193
195
  r,
194
- u,
195
- T,
196
- y
197
- ]), F = $ ?? (I > 0 ? I : "100%"), H = N ?? 320, W = c(() => {
198
- const t = b(r) ? f ?? [] : u ?? [], e = w;
199
- return /* @__PURE__ */ p("table", { id: v, className: "sr-only", children: [
200
- /* @__PURE__ */ i("caption", { children: a }),
201
- /* @__PURE__ */ i("thead", { children: /* @__PURE__ */ p("tr", { children: [
202
- /* @__PURE__ */ i("th", { scope: "col", children: o("chart.table.series") }),
203
- t.map((n, s) => /* @__PURE__ */ i("th", { scope: "col", children: n }, `${n}-${s}`))
196
+ h,
197
+ x,
198
+ R
199
+ ]), U = $ ?? (I > 0 ? I : "100%"), D = N ?? 320, W = c(() => {
200
+ const t = b(r) ? f ?? [] : h ?? [], e = w;
201
+ return /* @__PURE__ */ p("table", { id: v, className: "ds:sr-only", children: [
202
+ /* @__PURE__ */ s("caption", { children: a }),
203
+ /* @__PURE__ */ s("thead", { children: /* @__PURE__ */ p("tr", { children: [
204
+ /* @__PURE__ */ s("th", { scope: "col", children: o("chart.table.series") }),
205
+ t.map((n, i) => /* @__PURE__ */ s("th", { scope: "col", children: n }, `${n}-${i}`))
204
206
  ] }) }),
205
- /* @__PURE__ */ i("tbody", { children: e.map((n, s) => /* @__PURE__ */ p("tr", { children: [
206
- /* @__PURE__ */ i("th", { scope: "row", children: n.name || o("chart.table.value") }),
207
- n.data.map((Y, Z) => /* @__PURE__ */ i("td", { children: h.format(Y) }, `${s}-${Z}`))
208
- ] }, `${n.name}-${s}`)) })
207
+ /* @__PURE__ */ s("tbody", { children: e.map((n, i) => /* @__PURE__ */ p("tr", { children: [
208
+ /* @__PURE__ */ s("th", { scope: "row", children: n.name || o("chart.table.value") }),
209
+ n.data.map((Y, Z) => /* @__PURE__ */ s("td", { children: u.format(Y) }, `${i}-${Z}`))
210
+ ] }, `${n.name}-${i}`)) })
209
211
  ] });
210
- }, [r, w, f, u, v, a, o, h]), B = c(() => (b(r), l), [l, r]);
212
+ }, [r, w, f, h, v, a, o, u]), B = c(() => (b(r), l), [l, r]);
211
213
  return /* @__PURE__ */ p(
212
214
  "div",
213
215
  {
214
- ref: S,
216
+ ref: T,
215
217
  role: "img",
216
218
  "aria-label": a,
217
219
  "aria-describedby": v,
218
- className: rt({ density: k, className: G }),
220
+ className: ot({ density: k, className: G }),
219
221
  "data-component": "chart",
220
222
  children: [
221
223
  W,
222
- /* @__PURE__ */ i(
224
+ /* @__PURE__ */ s(
223
225
  tt,
224
226
  {
225
227
  type: r,
226
228
  series: B,
227
- options: D,
228
- width: F,
229
- height: H,
229
+ options: M,
230
+ width: U,
231
+ height: D,
230
232
  "aria-hidden": "true"
231
233
  }
232
234
  )
@@ -235,8 +237,8 @@ const ct = j(
235
237
  );
236
238
  }
237
239
  );
238
- ct.displayName = "Chart";
239
- const gt = {
240
+ lt.displayName = "Chart";
241
+ const vt = {
240
242
  id: "chart",
241
243
  capabilities: [],
242
244
  state: {},
@@ -260,8 +262,8 @@ const gt = {
260
262
  }
261
263
  };
262
264
  export {
263
- ct as C,
264
- rt as a,
265
- gt as c
265
+ lt as C,
266
+ ot as a,
267
+ vt as c
266
268
  };
267
- //# sourceMappingURL=chart.agent-DkmVXNsI.js.map
269
+ //# sourceMappingURL=chart.agent-BdS-_8MO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chart.agent-BdS-_8MO.js","sources":["../../src/components/chart/chart.tsx","../../src/components/chart/chart.agent.ts"],"sourcesContent":["/* ------------------------------------------------------------------ */\n/* Chart — thin, typed wrapper over ApexCharts (react-apexcharts). */\n/* */\n/* - All chrome, colours, and fonts flow from */\n/* `src/tokens/apexcharts-theme.ts` — never hex literals in user */\n/* code. A MutationObserver on `<html class>` re-reads the bridge so */\n/* theme changes repaint without remount. */\n/* - A ResizeObserver on the wrapper keeps the chart responsive */\n/* without listening on `window.resize`. */\n/* - Accessibility: the wrapper carries `role=\"img\"` + `aria-label` */\n/* (required `title` prop) + `aria-describedby` pointing at a */\n/* visually-hidden `<table>` that mirrors series × categories. */\n/* - Colour-blind users: `patterns` prop flips `fill.type` to pattern */\n/* using ApexCharts' built-in pattern presets. */\n/* - Numbers format via `Intl.NumberFormat(locale)` — no hand-rolled */\n/* `toFixed()`. */\n/* ------------------------------------------------------------------ */\n\nimport {\n forwardRef,\n useEffect,\n useId,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport ReactApexChart from 'react-apexcharts';\nimport ApexCharts from 'apexcharts';\nimport { getApexChartsTheme } from '../../tokens/apexcharts-theme';\nimport { usePrefersReducedMotion } from '../../hooks';\nimport { useNeutraliseHiddenFocus } from '../_shared/use-neutralize-hidden-focus';\n\n/* ------------------------------------------------------------------ */\n/* CVA */\n/* ------------------------------------------------------------------ */\n\nconst chartVariants = cva('ds:relative ds:block ds:w-full', {\n variants: {\n density: {\n compact: 'ds:min-h-[var(--chart-min-height-compact)]',\n comfortable: 'ds:min-h-[var(--chart-min-height-comfortable)]',\n },\n },\n defaultVariants: { density: 'comfortable' },\n});\n\n/* ------------------------------------------------------------------ */\n/* Public types */\n/* ------------------------------------------------------------------ */\n\nexport type ChartType = 'line' | 'bar' | 'pie' | 'donut' | 'area' | 'radialBar';\n\nexport interface ChartSeries {\n name: string;\n data: number[];\n}\n\nexport interface ChartProps extends VariantProps<typeof chartVariants> {\n /** Required — drives aria-label and sr-only table caption. */\n title: string;\n /** Chart visual type. */\n type: ChartType;\n /**\n * For `line` / `bar` / `area`: an array of `ChartSeries`.\n * For `pie` / `donut` / `radialBar`: an array of numbers matched to `labels`.\n */\n series: ChartSeries[] | number[];\n /** Category axis labels (line / bar / area). */\n categories?: string[];\n /** Slice labels (pie / donut / radialBar). */\n labels?: string[];\n /** Height override. Defaults to 320px. */\n height?: number | string;\n /** Width override. Defaults to 100% of container. */\n width?: number | string;\n /** Opt-in pattern fills for colour-blind users. */\n patterns?: boolean;\n /** Show the ApexCharts toolbar. Defaults to false. */\n toolbar?: boolean;\n /** Locale override — defaults to the active i18next language. */\n locale?: string;\n /** Extra class names on the wrapper. */\n className?: string;\n}\n\nexport interface ChartHandle {\n /** Returns a PNG data URI for the chart. */\n dataURI: () => Promise<string>;\n /** Updates series without remounting. */\n updateSeries: (next: ChartProps['series']) => void;\n}\n\n/* ------------------------------------------------------------------ */\n/* Constants */\n/* ------------------------------------------------------------------ */\n\nconst PATTERN_STYLES = [\n 'verticalLines',\n 'horizontalLines',\n 'slantedLines',\n 'squares',\n 'circles',\n] as const;\n\n/** Types where `categories` belong on an x-axis. */\nconst CATEGORICAL_TYPES: ReadonlyArray<ChartType> = ['line', 'bar', 'area'];\n\n/** Types where `series` is a flat `number[]` paired with `labels`. */\nconst SLICE_TYPES: ReadonlyArray<ChartType> = ['pie', 'donut', 'radialBar'];\n\n/* ------------------------------------------------------------------ */\n/* Helpers */\n/* ------------------------------------------------------------------ */\n\nfunction isSliceType(type: ChartType): boolean {\n return SLICE_TYPES.includes(type);\n}\n\nfunction isCategoricalType(type: ChartType): boolean {\n return CATEGORICAL_TYPES.includes(type);\n}\n\n/** Coerce `series` into `ChartSeries[]` for shared logic (table, aria). */\nfunction normaliseSeries(\n series: ChartSeries[] | number[],\n type: ChartType,\n): ChartSeries[] {\n if (isSliceType(type)) {\n const nums = series as number[];\n return [\n {\n name: '',\n data: nums,\n },\n ];\n }\n return series as ChartSeries[];\n}\n\n/* ------------------------------------------------------------------ */\n/* Chart component */\n/* ------------------------------------------------------------------ */\n\nexport const Chart = forwardRef<ChartHandle, ChartProps>(\n (\n {\n title,\n type,\n series,\n categories,\n labels,\n height,\n width,\n patterns = false,\n toolbar = false,\n locale: localeProp,\n density,\n className,\n },\n ref,\n ) => {\n const { t, i18n } = useTranslation();\n const rawId = useId();\n const chartId = useMemo(\n () => `chart-${rawId.replace(/[^a-zA-Z0-9-_]/g, '')}`,\n [rawId],\n );\n const summaryId = `${chartId}-summary`;\n\n const wrapperRef = useRef<HTMLDivElement>(null);\n const [containerWidth, setContainerWidth] = useState(0);\n\n /* ApexCharts injects focusable canvases inside the `aria-hidden` */\n /* chart wrapper. Neutralise their tabindex so axe's */\n /* `aria-hidden-focus` rule passes. Same hook used in Sparkline. */\n useNeutraliseHiddenFocus(wrapperRef);\n\n const locale = localeProp ?? i18n.language ?? 'en';\n\n /* ---- dev warning if title missing ------------------------------ */\n if (import.meta.env.DEV && !title) {\n // eslint-disable-next-line no-console\n console.warn(\n 'Chart: `title` prop is required. It drives aria-label and the screen-reader summary table.',\n );\n }\n\n /* ---- theme-reactive state -------------------------------------- */\n const [themeOptions, setThemeOptions] = useState<ApexCharts.ApexOptions>(() => {\n try {\n return getApexChartsTheme();\n } catch {\n return {};\n }\n });\n\n /* ---- MutationObserver: re-read theme on class change ------------ */\n useEffect(() => {\n if (typeof document === 'undefined') return undefined;\n let timer: ReturnType<typeof setTimeout>;\n const observer = new MutationObserver(() => {\n clearTimeout(timer);\n timer = setTimeout(() => {\n try {\n setThemeOptions(getApexChartsTheme());\n } catch {\n /* no-op in non-browser environments */\n }\n }, 50);\n });\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['class'],\n });\n return () => {\n clearTimeout(timer);\n observer.disconnect();\n };\n }, []);\n\n /* ---- ResizeObserver: track container width --------------------- */\n useEffect(() => {\n const el = wrapperRef.current;\n if (!el || typeof ResizeObserver === 'undefined') return undefined;\n const ro = new ResizeObserver((entries) => {\n const entry = entries[0];\n if (entry) setContainerWidth(Math.floor(entry.contentRect.width));\n });\n ro.observe(el);\n return () => ro.disconnect();\n }, []);\n\n /* ---- imperative handle ----------------------------------------- */\n useImperativeHandle(ref, () => ({\n async dataURI(): Promise<string> {\n const instance = ApexCharts.getChartByID(chartId);\n if (!instance) return '';\n const result = await instance.dataURI();\n return (result as { imgURI: string }).imgURI;\n },\n updateSeries(next) {\n const instance = ApexCharts.getChartByID(chartId);\n if (!instance) return;\n if (isSliceType(type)) {\n instance.updateSeries(next as number[]);\n } else {\n instance.updateSeries(next as ChartSeries[]);\n }\n },\n }));\n\n /* ---- RTL detection --------------------------------------------- */\n const isRtl =\n typeof document !== 'undefined' && document.documentElement.dir === 'rtl';\n\n /* ---- normalised series for sr-only table ----------------------- */\n const tableSeries = useMemo(\n () => normaliseSeries(series, type),\n [series, type],\n );\n\n /* ---- Intl formatter -------------------------------------------- */\n const numberFormatter = useMemo(\n () => new Intl.NumberFormat(locale),\n [locale],\n );\n\n /* ---- toolbar localisation -------------------------------------- */\n const toolbarLocale = useMemo(\n () => ({\n name: locale,\n options: {\n toolbar: {\n download: t('chart.toolbar.download'),\n selection: t('chart.toolbar.selection'),\n selectionZoom: t('chart.toolbar.selectionZoom'),\n zoomIn: t('chart.toolbar.zoomIn'),\n zoomOut: t('chart.toolbar.zoomOut'),\n pan: t('chart.toolbar.pan'),\n reset: t('chart.toolbar.reset'),\n exportToSVG: t('chart.toolbar.exportToSVG'),\n exportToPNG: t('chart.toolbar.exportToPNG'),\n exportToCSV: t('chart.toolbar.exportToCSV'),\n },\n },\n }),\n [locale, t],\n );\n\n /* ---- build ApexOptions ----------------------------------------- */\n const reducedMotion = usePrefersReducedMotion();\n\n const chartOptions: ApexCharts.ApexOptions = useMemo(() => {\n const base = themeOptions;\n\n const options: ApexCharts.ApexOptions = {\n ...base,\n chart: {\n ...base.chart,\n id: chartId,\n toolbar: { show: toolbar },\n zoom: { enabled: toolbar },\n animations: {\n enabled: !reducedMotion,\n dynamicAnimation: { enabled: !reducedMotion },\n },\n locales: [toolbarLocale],\n defaultLocale: locale,\n parentHeightOffset: 0,\n },\n labels: labels,\n legend: {\n ...base.legend,\n position: 'bottom',\n // ApexCharts legend.horizontalAlign is a physical prop mapped internally\n // to the chart's own text flow. For RTL we flip via `yaxis.opposite`\n // and ApexCharts' own `direction: 'rtl'` handling; legend stays anchored\n // to the inline-start by asking for 'left' on LTR and 'right' on RTL.\n horizontalAlign: isRtl ? 'right' : 'left',\n fontFamily: 'inherit',\n },\n tooltip: {\n ...base.tooltip,\n y: {\n formatter: (value: number) => numberFormatter.format(value),\n },\n },\n noData: {\n text: t('chart.noData'),\n },\n };\n\n if (isCategoricalType(type)) {\n options.xaxis = {\n ...base.xaxis,\n categories: categories ?? [],\n };\n options.yaxis = {\n ...base.yaxis,\n opposite: isRtl,\n labels: {\n formatter: (value: number) => numberFormatter.format(value),\n },\n };\n options.stroke = {\n curve: 'smooth',\n width: type === 'bar' ? 0 : 2,\n };\n options.dataLabels = { enabled: false };\n }\n\n if (patterns) {\n options.fill = {\n type: 'pattern',\n opacity: type === 'area' ? 0.3 : 1,\n pattern: {\n style: [...PATTERN_STYLES],\n strokeWidth: 2,\n },\n };\n } else if (type === 'area') {\n options.fill = {\n type: 'gradient',\n opacity: 0.3,\n };\n }\n\n return options;\n }, [\n themeOptions,\n chartId,\n toolbar,\n reducedMotion,\n toolbarLocale,\n locale,\n labels,\n numberFormatter,\n t,\n type,\n categories,\n isRtl,\n patterns,\n ]);\n\n /* ---- resolved dimensions --------------------------------------- */\n const resolvedWidth = width ?? (containerWidth > 0 ? containerWidth : '100%');\n const resolvedHeight = height ?? 320;\n\n /* ---- sr-only data table --------------------------------------- */\n const srTable = useMemo(() => {\n const columnLabels = isSliceType(type)\n ? (labels ?? [])\n : (categories ?? []);\n const rows = tableSeries;\n return (\n <table id={summaryId} className=\"ds:sr-only\">\n <caption>{title}</caption>\n <thead>\n <tr>\n <th scope=\"col\">{t('chart.table.series')}</th>\n {columnLabels.map((col, i) => (\n <th key={`${col}-${i}`} scope=\"col\">\n {col}\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {rows.map((row, rowIndex) => (\n <tr key={`${row.name}-${rowIndex}`}>\n <th scope=\"row\">{row.name || t('chart.table.value')}</th>\n {row.data.map((value, colIndex) => (\n <td key={`${rowIndex}-${colIndex}`}>\n {numberFormatter.format(value)}\n </td>\n ))}\n </tr>\n ))}\n </tbody>\n </table>\n );\n }, [type, tableSeries, labels, categories, summaryId, title, t, numberFormatter]);\n\n /* ---- ApexCharts `series` prop shape ----------------------------- */\n const apexSeries = useMemo(() => {\n if (isSliceType(type)) {\n return series as number[];\n }\n return series as ChartSeries[];\n }, [series, type]);\n\n return (\n <div\n ref={wrapperRef}\n role=\"img\"\n aria-label={title}\n aria-describedby={summaryId}\n className={chartVariants({ density, className })}\n data-component=\"chart\"\n >\n {srTable}\n <ReactApexChart\n type={type}\n series={apexSeries as ApexCharts.ApexOptions['series']}\n options={chartOptions}\n width={resolvedWidth}\n height={resolvedHeight}\n aria-hidden=\"true\"\n />\n </div>\n );\n },\n);\n\nChart.displayName = 'Chart';\n\n/* ------------------------------------------------------------------ */\n/* Re-export internal helper for downstream theming (kept narrow). */\n/* ------------------------------------------------------------------ */\n\nexport { chartVariants };\n","import type { AgentAdapter } from '../../agent/types';\nimport type { ChartHandle } from './chart';\n\nexport const chartAgent: AgentAdapter<ChartHandle> = {\n id: 'chart',\n capabilities: [],\n state: {},\n actions: {\n update_series: {\n safety: 'read',\n argsType: 'series',\n description: 'Replace the chart series without remounting.',\n invoke: (handle, args: { series: Parameters<ChartHandle['updateSeries']>[0] }) => {\n handle.updateSeries(args.series);\n },\n },\n export_png: {\n safety: 'read',\n description: 'Return a PNG data URI of the chart for export or screenshotting.',\n invoke: (handle) => handle.dataURI(),\n },\n },\n domHooks: {\n root: { attr: 'data-component', value: 'chart' },\n },\n};\n"],"names":["chartVariants","cva","PATTERN_STYLES","CATEGORICAL_TYPES","SLICE_TYPES","isSliceType","type","isCategoricalType","normaliseSeries","series","Chart","forwardRef","title","categories","labels","height","width","patterns","toolbar","localeProp","density","className","ref","t","i18n","useTranslation","rawId","useId","chartId","useMemo","summaryId","wrapperRef","useRef","containerWidth","setContainerWidth","useState","useNeutraliseHiddenFocus","locale","themeOptions","setThemeOptions","getApexChartsTheme","useEffect","timer","observer","el","ro","entries","entry","useImperativeHandle","instance","ApexCharts","next","isRtl","tableSeries","numberFormatter","toolbarLocale","reducedMotion","usePrefersReducedMotion","chartOptions","base","options","value","resolvedWidth","resolvedHeight","srTable","columnLabels","rows","jsx","jsxs","col","row","rowIndex","colIndex","apexSeries","ReactApexChart","chartAgent","handle","args"],"mappings":";;;;;;;;AA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E,gBAAA8D;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAKrC;AAAA,QACL,MAAK;AAAA,QACL,cAAYnB;AAAA,QACZ,oBAAkBkB;AAAA,QAClB,WAAW9B,GAAc,EAAE,SAAAoB,GAAS,WAAAC,GAAW;AAAA,QAC/C,kBAAe;AAAA,QAEd,UAAA;AAAA,UAAA2C;AAAA,UACD,gBAAAG;AAAA,YAACO;AAAA,YAAA;AAAA,cACC,MAAApE;AAAA,cACA,QAAQmE;AAAA,cACR,SAASf;AAAA,cACT,OAAOI;AAAA,cACP,QAAQC;AAAA,cACR,eAAY;AAAA,YAAA;AAAA,UAAA;AAAA,QACd;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AAEArD,GAAM,cAAc;ACtcb,MAAMiE,KAAwC;AAAA,EACnD,IAAI;AAAA,EACJ,cAAc,CAAA;AAAA,EACd,OAAO,CAAA;AAAA,EACP,SAAS;AAAA,IACP,eAAe;AAAA,MACb,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,aAAa;AAAA,MACb,QAAQ,CAACC,GAAQC,MAAiE;AAChF,QAAAD,EAAO,aAAaC,EAAK,MAAM;AAAA,MACjC;AAAA,IAAA;AAAA,IAEF,YAAY;AAAA,MACV,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,QAAQ,CAACD,MAAWA,EAAO,QAAA;AAAA,IAAQ;AAAA,EACrC;AAAA,EAEF,UAAU;AAAA,IACR,MAAM,EAAE,MAAM,kBAAkB,OAAO,QAAA;AAAA,EAAQ;AAEnD;"}
@@ -0,0 +1,174 @@
1
+ import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
+ import { forwardRef as z, useRef as h, useState as R, useCallback as V, useImperativeHandle as L, useEffect as B, useLayoutEffect as C } from "react";
3
+ import { c as b } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as E } from "react-i18next";
5
+ import { u as O } from "./index-CJE9uQmb.js";
6
+ import { F as j } from "./floating-action-button-RigP2E7o.js";
7
+ import { u as H } from "./use-prefers-reduced-motion-BMwIQRjB.js";
8
+ import { C as M } from "./chevron-down-BX_NP2Yh.js";
9
+ const S = b(
10
+ "ds:relative ds:flex ds:w-full ds:flex-col ds:overflow-hidden ds:bg-background",
11
+ {
12
+ variants: {
13
+ density: {
14
+ default: "ds:gap-[var(--spacing-md)]",
15
+ compact: "ds:gap-[var(--spacing-sm)]"
16
+ }
17
+ },
18
+ defaultVariants: { density: "default" }
19
+ }
20
+ ), $ = b(
21
+ [
22
+ "ds:flex-1 ds:min-h-0 ds:overflow-y-auto ds:overflow-x-hidden",
23
+ "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
24
+ "ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]",
25
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
26
+ "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
27
+ "ds:scroll-smooth ds:motion-reduce:scroll-auto ds:[.theme-accessible_&]:scroll-auto",
28
+ // Edge fade — content near the scroll boundaries fades into the
29
+ // container surface instead of clipping abruptly against the header
30
+ // or composer, so avatars / bubbles don't look "cut in half" as they
31
+ // pass the viewport edge. Fade width matches the viewport padding so
32
+ // a row can slide fully behind the mask before disappearing.
33
+ // Disabled under HCM (mask strips content), reduced motion (less
34
+ // decoration when motion is off), and the accessible theme.
35
+ "ds:[mask-image:linear-gradient(to_bottom,transparent_0,black_var(--spacing-md),black_calc(100%-var(--spacing-md)),transparent_100%)]",
36
+ "ds:motion-reduce:[mask-image:none]",
37
+ "ds:[.theme-accessible_&]:[mask-image:none]",
38
+ "ds:forced-colors:[mask-image:none]"
39
+ ].join(" ")
40
+ ), D = 100, F = 48, K = z(
41
+ ({
42
+ messages: a,
43
+ composer: m,
44
+ density: x = "default",
45
+ className: w,
46
+ onAutoScrollChange: o,
47
+ showScrollToLatest: N = !1,
48
+ ...k
49
+ }, I) => {
50
+ const { t: u } = E(), n = h(null), f = h(null), [d, y] = R(!0), p = H(), r = V(
51
+ (s) => {
52
+ const e = n.current;
53
+ if (!e) return;
54
+ const i = ((s == null ? void 0 : s.smooth) ?? !0) && !p;
55
+ e.scrollTo({ top: e.scrollHeight, behavior: i ? "smooth" : "auto" });
56
+ },
57
+ [p]
58
+ );
59
+ L(
60
+ I,
61
+ () => ({
62
+ scrollToBottom: r,
63
+ getScrollViewport: () => n.current
64
+ }),
65
+ [r]
66
+ ), B(() => {
67
+ const s = n.current, e = f.current;
68
+ if (!s || !e) return;
69
+ const i = new IntersectionObserver(
70
+ (_) => {
71
+ const g = _[0];
72
+ y(g.isIntersecting), o == null || o(g.isIntersecting);
73
+ },
74
+ {
75
+ root: s,
76
+ // Fire when the sentinel is within BOTTOM_SLACK_PX of being visible.
77
+ rootMargin: `0px 0px ${F}px 0px`,
78
+ threshold: 0
79
+ }
80
+ );
81
+ return i.observe(e), () => i.disconnect();
82
+ }, [o]);
83
+ const T = a.length;
84
+ C(() => {
85
+ d && r({ smooth: !1 });
86
+ }, [T, d, r]);
87
+ const v = a.length > D, l = O({
88
+ count: v ? a.length : 0,
89
+ getScrollElement: () => n.current,
90
+ estimateSize: () => 80,
91
+ overscan: 6,
92
+ getItemKey: (s) => {
93
+ var e;
94
+ return ((e = a[s]) == null ? void 0 : e.id) ?? s;
95
+ }
96
+ });
97
+ return /* @__PURE__ */ c("div", { className: S({ density: x, className: w }), "data-component": "chat-container", ...k, children: [
98
+ /* @__PURE__ */ c("div", { className: "ds:relative ds:flex-1 ds:min-h-0 ds:flex ds:flex-col", children: [
99
+ /* @__PURE__ */ c(
100
+ "div",
101
+ {
102
+ ref: n,
103
+ role: "log",
104
+ "aria-live": "polite",
105
+ "aria-relevant": "additions",
106
+ "aria-label": u("ui.chat.container"),
107
+ tabIndex: 0,
108
+ className: $(),
109
+ children: [
110
+ v ? /* @__PURE__ */ t(
111
+ "ol",
112
+ {
113
+ className: "ds:relative ds:list-none ds:ps-0 ds:m-0",
114
+ style: { blockSize: `${l.getTotalSize()}px` },
115
+ children: l.getVirtualItems().map((s) => {
116
+ const e = a[s.index];
117
+ return e ? /* @__PURE__ */ t(
118
+ "li",
119
+ {
120
+ "data-index": s.index,
121
+ ref: l.measureElement,
122
+ className: "ds:absolute ds:start-0 ds:end-0 ds:top-0 ds:w-full",
123
+ style: { transform: `translateY(${s.start}px)` },
124
+ children: /* @__PURE__ */ t("div", { className: "ds:pt-[var(--spacing-xs)] ds:pb-[var(--spacing-xs)]", children: e.node })
125
+ },
126
+ e.id
127
+ ) : null;
128
+ })
129
+ }
130
+ ) : /* @__PURE__ */ t("ol", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:list-none ds:ps-0 ds:m-0", children: a.map((s) => /* @__PURE__ */ t("li", { children: s.node }, s.id)) }),
131
+ /* @__PURE__ */ t("div", { ref: f, "aria-hidden": "true", className: "ds:h-1 ds:w-full" })
132
+ ]
133
+ }
134
+ ),
135
+ N && !d ? /* @__PURE__ */ t(
136
+ "div",
137
+ {
138
+ className: [
139
+ "ds:pointer-events-none ds:absolute ds:inset-inline-end-0",
140
+ // `bottom` is measured from the bottom of the scroll
141
+ // column (i.e. the top edge of the composer slot). A
142
+ // small spacing-md gap keeps the FAB clear of the
143
+ // divider border above the composer.
144
+ "ds:bottom-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
145
+ // Enter animation — fade + scale in from 95%. The FAB only
146
+ // unmounts when the user returns to bottom, so an exit
147
+ // animation isn't justified (abrupt disappearance reads as
148
+ // "task complete" when they've scrolled back).
149
+ "ds:motion-safe:animate-in ds:motion-safe:fade-in-0 ds:motion-safe:zoom-in-95",
150
+ "ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]"
151
+ ].join(" "),
152
+ children: /* @__PURE__ */ t("div", { className: "ds:pointer-events-auto", children: /* @__PURE__ */ t(
153
+ j,
154
+ {
155
+ icon: /* @__PURE__ */ t(M, {}),
156
+ "aria-label": u("ui.chat.scrollToLatest"),
157
+ size: "sm",
158
+ variant: "secondary",
159
+ position: "static",
160
+ onClick: () => r({ smooth: !0 })
161
+ }
162
+ ) })
163
+ }
164
+ ) : null
165
+ ] }),
166
+ m ? /* @__PURE__ */ t("div", { className: "ds:shrink-0 ds:border-t ds:border-border ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)] ds:bg-background", children: m }) : null
167
+ ] });
168
+ }
169
+ );
170
+ K.displayName = "ChatContainer";
171
+ export {
172
+ K as C
173
+ };
174
+ //# sourceMappingURL=chat-container-Co8HpB64.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat-container-Co8HpB64.js","sources":["../../src/components/chat-container/chat-container.tsx"],"sourcesContent":["import {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useLayoutEffect,\n useRef,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { useTranslation } from 'react-i18next';\nimport { ChevronDown } from 'lucide-react';\nimport { useVirtualizer } from '@tanstack/react-virtual';\nimport { FloatingActionButton } from '../floating-action-button/floating-action-button';\nimport { usePrefersReducedMotion } from '../../hooks';\n\nconst rootVariants = cva(\n 'ds:relative ds:flex ds:w-full ds:flex-col ds:overflow-hidden ds:bg-background',\n {\n variants: {\n density: {\n default: 'ds:gap-[var(--spacing-md)]',\n compact: 'ds:gap-[var(--spacing-sm)]',\n },\n },\n defaultVariants: { density: 'default' },\n },\n);\n\nconst scrollViewportVariants = cva(\n [\n 'ds:flex-1 ds:min-h-0 ds:overflow-y-auto ds:overflow-x-hidden',\n 'ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n 'ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]',\n 'ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid',\n 'ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]',\n 'ds:scroll-smooth ds:motion-reduce:scroll-auto ds:[.theme-accessible_&]:scroll-auto',\n // Edge fade — content near the scroll boundaries fades into the\n // container surface instead of clipping abruptly against the header\n // or composer, so avatars / bubbles don't look \"cut in half\" as they\n // pass the viewport edge. Fade width matches the viewport padding so\n // a row can slide fully behind the mask before disappearing.\n // Disabled under HCM (mask strips content), reduced motion (less\n // decoration when motion is off), and the accessible theme.\n 'ds:[mask-image:linear-gradient(to_bottom,transparent_0,black_var(--spacing-md),black_calc(100%-var(--spacing-md)),transparent_100%)]',\n 'ds:motion-reduce:[mask-image:none]',\n 'ds:[.theme-accessible_&]:[mask-image:none]',\n 'ds:forced-colors:[mask-image:none]',\n ].join(' '),\n);\n\nconst VIRTUALIZATION_THRESHOLD = 100;\n/** Pixel slack against the bottom edge that still counts as \"at bottom\". */\nconst BOTTOM_SLACK_PX = 48;\n\nexport interface ChatContainerHandle {\n scrollToBottom: (opts?: { smooth?: boolean }) => void;\n getScrollViewport: () => HTMLDivElement | null;\n}\n\nexport interface ChatContainerProps\n extends Omit<HTMLAttributes<HTMLDivElement>, 'children'>,\n VariantProps<typeof rootVariants> {\n /** Array of messages to render. When the array exceeds 100 items the\n * list is virtualised via @tanstack/react-virtual. */\n messages: Array<{ id: string; node: ReactNode }>;\n /** Composer slot pinned to the block-end. */\n composer?: ReactNode;\n /** Fires when the user's auto-scroll preference flips. */\n onAutoScrollChange?: (isAtBottom: boolean) => void;\n /**\n * When true, renders a \"scroll to latest\" FloatingActionButton in the\n * bottom-end of the scroll column whenever the user has scrolled\n * away from the newest message. Defaults to `false` because the\n * affordance is only useful in long-form chat surfaces (fullscreen\n * assistants, dedicated messaging views); in compact docks — e.g. the\n * Leo side-panel — conversations rarely exceed one screen and the FAB\n * just adds visual noise. Turn on for fullscreen chat surfaces.\n */\n showScrollToLatest?: boolean;\n}\n\nexport const ChatContainer = forwardRef<ChatContainerHandle, ChatContainerProps>(\n (\n {\n messages,\n composer,\n density = 'default',\n className,\n onAutoScrollChange,\n showScrollToLatest = false,\n ...rest\n },\n ref,\n ) => {\n const { t } = useTranslation();\n const viewportRef = useRef<HTMLDivElement | null>(null);\n const sentinelRef = useRef<HTMLDivElement | null>(null);\n const [isAtBottom, setIsAtBottom] = useState(true);\n\n const prefersReducedMotion = usePrefersReducedMotion();\n\n const scrollToBottom = useCallback(\n (opts?: { smooth?: boolean }) => {\n const el = viewportRef.current;\n if (!el) return;\n const smooth = (opts?.smooth ?? true) && !prefersReducedMotion;\n el.scrollTo({ top: el.scrollHeight, behavior: smooth ? 'smooth' : 'auto' });\n },\n [prefersReducedMotion],\n );\n\n useImperativeHandle(\n ref,\n () => ({\n scrollToBottom,\n getScrollViewport: () => viewportRef.current,\n }),\n [scrollToBottom],\n );\n\n /* ── Intersection observer: track \"at bottom\" via a sentinel ── */\n useEffect(() => {\n const root = viewportRef.current;\n const sentinel = sentinelRef.current;\n if (!root || !sentinel) return;\n const observer = new IntersectionObserver(\n (entries) => {\n const entry = entries[0];\n setIsAtBottom(entry.isIntersecting);\n onAutoScrollChange?.(entry.isIntersecting);\n },\n {\n root,\n // Fire when the sentinel is within BOTTOM_SLACK_PX of being visible.\n rootMargin: `0px 0px ${BOTTOM_SLACK_PX}px 0px`,\n threshold: 0,\n },\n );\n observer.observe(sentinel);\n return () => observer.disconnect();\n }, [onAutoScrollChange]);\n\n /* ── Auto-scroll on new messages when at bottom ── */\n const messagesLength = messages.length;\n useLayoutEffect(() => {\n // `smooth: false` — when we're already pinned to the bottom and a\n // new message appends, the user doesn't perceive any scroll motion\n // (the sentinel just slides a few px). But a smooth animation DOES\n // give the IntersectionObserver a window in which the sentinel is\n // temporarily outside the rootMargin zone — that's what causes the\n // scroll-to-latest FAB to flicker in and out on every new message.\n // Instant scroll settles in one frame; FAB state stays stable.\n // The user-initiated FAB click below still uses smooth because the\n // jump is large and the motion communicates the travel.\n if (isAtBottom) scrollToBottom({ smooth: false });\n // Intentionally watching only length — individual node updates (streaming)\n // are driven by their own scroll decisions.\n }, [messagesLength, isAtBottom, scrollToBottom]);\n\n const virtualized = messages.length > VIRTUALIZATION_THRESHOLD;\n\n const virtualizer = useVirtualizer({\n count: virtualized ? messages.length : 0,\n getScrollElement: () => viewportRef.current,\n estimateSize: () => 80,\n overscan: 6,\n getItemKey: (i) => messages[i]?.id ?? i,\n });\n\n return (\n <div className={rootVariants({ density, className })} data-component=\"chat-container\" {...rest}>\n {/* Scroll column wraps the viewport AND the FAB together so the\n FAB's absolute `bottom` is measured from the top of the\n composer (this wrapper's end edge), not from the root — which\n would drop the FAB inside the composer/suggestion-chip area. */}\n <div className=\"ds:relative ds:flex-1 ds:min-h-0 ds:flex ds:flex-col\">\n <div\n ref={viewportRef}\n role=\"log\"\n aria-live=\"polite\"\n aria-relevant=\"additions\"\n aria-label={t('ui.chat.container')}\n tabIndex={0}\n className={scrollViewportVariants()}\n >\n {virtualized ? (\n <ol\n className=\"ds:relative ds:list-none ds:ps-0 ds:m-0\"\n // Inline style — permitted per 23-constraints\n // §Runtime-computed dimensions (virtualizer total size).\n style={{ blockSize: `${virtualizer.getTotalSize()}px` }}\n >\n {virtualizer.getVirtualItems().map((vi) => {\n const msg = messages[vi.index];\n if (!msg) return null;\n return (\n <li\n key={msg.id}\n data-index={vi.index}\n ref={virtualizer.measureElement}\n className=\"ds:absolute ds:start-0 ds:end-0 ds:top-0 ds:w-full\"\n // Inline style — permitted per 23-constraints\n // §Runtime-computed dimensions (virtualizer translateY).\n style={{ transform: `translateY(${vi.start}px)` }}\n >\n <div className=\"ds:pt-[var(--spacing-xs)] ds:pb-[var(--spacing-xs)]\">\n {msg.node}\n </div>\n </li>\n );\n })}\n </ol>\n ) : (\n <ol className=\"ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:list-none ds:ps-0 ds:m-0\">\n {messages.map((m) => (\n <li key={m.id}>{m.node}</li>\n ))}\n </ol>\n )}\n <div ref={sentinelRef} aria-hidden=\"true\" className=\"ds:h-1 ds:w-full\" />\n </div>\n\n {showScrollToLatest && !isAtBottom ? (\n <div\n className={[\n 'ds:pointer-events-none ds:absolute ds:inset-inline-end-0',\n // `bottom` is measured from the bottom of the scroll\n // column (i.e. the top edge of the composer slot). A\n // small spacing-md gap keeps the FAB clear of the\n // divider border above the composer.\n 'ds:bottom-[var(--spacing-md)] ds:pe-[var(--spacing-md)]',\n // Enter animation — fade + scale in from 95%. The FAB only\n // unmounts when the user returns to bottom, so an exit\n // animation isn't justified (abrupt disappearance reads as\n // \"task complete\" when they've scrolled back).\n 'ds:motion-safe:animate-in ds:motion-safe:fade-in-0 ds:motion-safe:zoom-in-95',\n 'ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]',\n ].join(' ')}\n >\n <div className=\"ds:pointer-events-auto\">\n <FloatingActionButton\n icon={<ChevronDown />}\n aria-label={t('ui.chat.scrollToLatest')}\n size=\"sm\"\n variant=\"secondary\"\n // `position=\"static\"` — the wrapper is already\n // absolutely-positioned. Without this, FAB's default\n // `bottom-end` variant applies `position: fixed` and\n // pins the button to the browser viewport corner,\n // escaping the container and appearing as an orphan\n // circle that stays put while the chat scrolls.\n position=\"static\"\n onClick={() => scrollToBottom({ smooth: true })}\n />\n </div>\n </div>\n ) : null}\n </div>\n\n {composer ? (\n <div className=\"ds:shrink-0 ds:border-t ds:border-border ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)] ds:bg-background\">\n {composer}\n </div>\n ) : null}\n </div>\n );\n },\n);\n\nChatContainer.displayName = 'ChatContainer';\n"],"names":["rootVariants","cva","scrollViewportVariants","VIRTUALIZATION_THRESHOLD","BOTTOM_SLACK_PX","ChatContainer","forwardRef","messages","composer","density","className","onAutoScrollChange","showScrollToLatest","rest","ref","t","useTranslation","viewportRef","useRef","sentinelRef","isAtBottom","setIsAtBottom","useState","prefersReducedMotion","usePrefersReducedMotion","scrollToBottom","useCallback","opts","el","smooth","useImperativeHandle","useEffect","root","sentinel","observer","entries","entry","messagesLength","useLayoutEffect","virtualized","virtualizer","useVirtualizer","i","_a","jsxs","jsx","vi","msg","m","FloatingActionButton","ChevronDown"],"mappings":";;;;;;;;AAkBA,MAAMA,IAAeC;AAAA,EACnB;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,IAEF,iBAAiB,EAAE,SAAS,UAAA;AAAA,EAAU;AAE1C,GAEMC,IAAyBD;AAAA,EAC7B;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,EACA,KAAK,GAAG;AACZ,GAEME,IAA2B,KAE3BC,IAAkB,IA6BXC,IAAgBC;AAAA,EAC3B,CACE;AAAA,IACE,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,WAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,oBAAAC,IAAqB;AAAA,IACrB,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAM,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACRC,IAAcC,EAA8B,IAAI,GAChDC,IAAcD,EAA8B,IAAI,GAChD,CAACE,GAAYC,CAAa,IAAIC,EAAS,EAAI,GAE3CC,IAAuBC,EAAA,GAEvBC,IAAiBC;AAAA,MACrB,CAACC,MAAgC;AAC/B,cAAMC,IAAKX,EAAY;AACvB,YAAI,CAACW,EAAI;AACT,cAAMC,MAAUF,KAAA,gBAAAA,EAAM,WAAU,OAAS,CAACJ;AAC1C,QAAAK,EAAG,SAAS,EAAE,KAAKA,EAAG,cAAc,UAAUC,IAAS,WAAW,QAAQ;AAAA,MAC5E;AAAA,MACA,CAACN,CAAoB;AAAA,IAAA;AAGvB,IAAAO;AAAA,MACEh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