@alfadocs/ui-kit 0.31.0 → 0.31.2

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 (290) hide show
  1. package/dist/_chunks/{accordion-CNcodXuO.js → accordion-bSU21uTV.js} +3 -3
  2. package/dist/_chunks/{agenda-card-DO9_yogb.js → agenda-card-UJA6Arbs.js} +3 -3
  3. package/dist/_chunks/{agenda-tray-WLbfMip6.js → agenda-tray-1fAxNOMz.js} +4 -4
  4. package/dist/_chunks/{ai-prompt-input-BXlwNnWe.js → ai-prompt-input-C6sCr1Vi.js} +11 -10
  5. package/dist/_chunks/{alia-sidebar-C-232sD7.js → alia-sidebar-BEoMl6UL.js} +9 -9
  6. package/dist/_chunks/ar-CEpIJtcO.js +399 -0
  7. package/dist/_chunks/{audio-recorder-DL800PE_.js → audio-recorder-C1rhKhSN.js} +114 -114
  8. package/dist/_chunks/audio-visualiser-l6zPd0AG.js +162 -0
  9. package/dist/_chunks/{autocomplete-CUh0f7Dj.js → autocomplete-DIgdhCGJ.js} +2 -2
  10. package/dist/_chunks/{avatar-D_H4emLo.js → avatar-BNQNhoyL.js} +19 -18
  11. package/dist/_chunks/{badge-CIjQ1Us1.js → badge-CptERaHx.js} +2 -2
  12. package/dist/_chunks/{booking-Bhk9IYm3.js → booking-BIZ9GSer.js} +15 -15
  13. package/dist/_chunks/{breadcrumb--YI7lcHA.js → breadcrumb-CLlhx7qo.js} +2 -2
  14. package/dist/_chunks/{button-group-Bh2g_Ng-.js → button-group-Ciq6J4IW.js} +15 -14
  15. package/dist/_chunks/{calendar-WWNx448i.js → calendar-YHFknAGv.js} +22 -22
  16. package/dist/_chunks/{carousel.agent-C2Icc9_T.js → carousel.agent-DrX96W-1.js} +2 -2
  17. package/dist/_chunks/{chart-BLvFl169.js → chart-DLkVn_ex.js} +2 -2
  18. package/dist/_chunks/{chat-container-izziXViv.js → chat-container-ogB4OskO.js} +24 -23
  19. package/dist/_chunks/{chat-input-cyl_y9bh.js → chat-input-CQe7nR_v.js} +132 -118
  20. package/dist/_chunks/{chat-message-fg221-yx.js → chat-message-D53_fH2w.js} +2 -2
  21. package/dist/_chunks/{checkbox-Dgp_cfUr.js → checkbox-DRcOdmXv.js} +3 -3
  22. package/dist/_chunks/{checkbox-group-eVowqKcT.js → checkbox-group-CpUwlHug.js} +3 -3
  23. package/dist/_chunks/{collapsible-hHiyZp0b.js → collapsible-CERONory.js} +2 -2
  24. package/dist/_chunks/{color-picker-Bm-gzpsh.js → color-picker-9tL7pz5y.js} +192 -181
  25. package/dist/_chunks/{combobox-Da9eq00i.js → combobox-BC-DFx8G.js} +31 -30
  26. package/dist/_chunks/{command-palette-11BieSNq.js → command-palette-BiPAAno-.js} +125 -123
  27. package/dist/_chunks/{copy-field-BAF4mt9h.js → copy-field-CCq7j6Zc.js} +2 -2
  28. package/dist/_chunks/{date-picker-D0Ry1dMz.js → date-picker-B94HAV4A.js} +4 -4
  29. package/dist/_chunks/{date-range-picker-DYgHzMOo.js → date-range-picker-D4dgDlLU.js} +73 -73
  30. package/dist/_chunks/{date-time-picker-CGmGtcyc.js → date-time-picker-D1GEzf8p.js} +5 -5
  31. package/dist/_chunks/de-Dfbeau59.js +477 -0
  32. package/dist/_chunks/{description-list-CWjnaDGn.js → description-list-BEbK2g93.js} +2 -2
  33. package/dist/_chunks/{dialog-C-lTGVkB.js → dialog-Cee13rHU.js} +3 -3
  34. package/dist/_chunks/{dropdown-menu-DZxwF23X.js → dropdown-menu-BC5ZdOMo.js} +3 -3
  35. package/dist/_chunks/{editable-currency-cell-renderer-Od3Q-Y8J.js → editable-currency-cell-renderer-BpicmolK.js} +314 -317
  36. package/dist/_chunks/el-Dro3J7CP.js +373 -0
  37. package/dist/_chunks/{email-input-DvJ_kPKL.js → email-input-lQivsFrw.js} +3 -3
  38. package/dist/_chunks/es-Dvg8u70B.js +373 -0
  39. package/dist/_chunks/{file-upload-DxAQprcU.js → file-upload-CdozCPct.js} +226 -233
  40. package/dist/_chunks/fr-VOGjBSPP.js +338 -0
  41. package/dist/_chunks/{freemium-paywall-B9c8Ylww.js → freemium-paywall-D1N02Oam.js} +4 -4
  42. package/dist/_chunks/{header-DDj7uGD-.js → header-CTZWX-tm.js} +2 -2
  43. package/dist/_chunks/hi-BSDxWU_y.js +433 -0
  44. package/dist/_chunks/{icon-button-DPEqBKBQ.js → icon-button-CKEOrN37.js} +2 -2
  45. package/dist/_chunks/{icon-button-group-DeV3FpNY.js → icon-button-group-C48khLE0.js} +23 -22
  46. package/dist/_chunks/{isSameDay-DHG8Xade.js → isSameDay-DUEiAT0G.js} +2 -2
  47. package/dist/_chunks/isSameWeek-Dfzu29cW.js +14 -0
  48. package/dist/_chunks/it-CuonvcI_.js +401 -0
  49. package/dist/_chunks/ja-DO57gIOT.js +366 -0
  50. package/dist/_chunks/{key-value-pair-BvDY3zuc.js → key-value-pair-C8DaR3Xs.js} +2 -2
  51. package/dist/_chunks/{list-BdvDctBz.js → list-BOwqwy03.js} +44 -43
  52. package/dist/_chunks/{locale-picker-CY89MChR.js → locale-picker-D99UyZVJ.js} +4 -4
  53. package/dist/_chunks/{map-view-DyB8tr6c.js → map-view-WEWqXzof.js} +569 -557
  54. package/dist/_chunks/{message-card-D6iyPacd.js → message-card-BbRhZkDI.js} +3 -3
  55. package/dist/_chunks/{message-tray-Bh-0ra-Y.js → message-tray-B762TKuv.js} +11 -10
  56. package/dist/_chunks/{multi-select-dSe6Xtc4.js → multi-select-DOLO3K_z.js} +26 -25
  57. package/dist/_chunks/{navigation-menu-CyS1fBJ7.js → navigation-menu-C6lBYVv9.js} +3 -3
  58. package/dist/_chunks/nl-DjPaaWaW.js +326 -0
  59. package/dist/_chunks/{notification-card-vaMaA7Wa.js → notification-card-DMdO4g54.js} +2 -2
  60. package/dist/_chunks/{notification-tray-Cnum6LwM.js → notification-tray-Dl3FTleW.js} +17 -16
  61. package/dist/_chunks/{number-input-BZXu6bPY.js → number-input-Dj5L3pXK.js} +2 -2
  62. package/dist/_chunks/{otp-input-BDF_iNpa.js → otp-input-BEg_sn8A.js} +2 -2
  63. package/dist/_chunks/{pagination-BWaXF7W0.js → pagination-DQOgnxxw.js} +2 -2
  64. package/dist/_chunks/{parseISO-Dk4xa7q6.js → parseISO-DEpUNwxZ.js} +2 -2
  65. package/dist/_chunks/{patient-search-ZpHN-pgJ.js → patient-search-hFiYbqcl.js} +8 -8
  66. package/dist/_chunks/{patient-shell-CYaNkbA1.js → patient-shell-CDvMw_Nk.js} +6 -6
  67. package/dist/_chunks/{payment-form-Ds3rxvad.js → payment-form-D5rgnZu7.js} +2 -2
  68. package/dist/_chunks/{pdf-viewer-CIuaocnq.js → pdf-viewer-DvtEHcEP.js} +347 -320
  69. package/dist/_chunks/{phone-input-DKSHX7NQ.js → phone-input-DfZbPPvh.js} +217 -201
  70. package/dist/_chunks/pl-Cl4lOx2N.js +514 -0
  71. package/dist/_chunks/{popover-BfHSBEKq.js → popover-Devce-tT.js} +3 -3
  72. package/dist/_chunks/practice-results-JQunxBIg.js +1618 -0
  73. package/dist/_chunks/{privacy-lock-C6Ra5m3p.js → privacy-lock-DD-wHxBg.js} +3 -3
  74. package/dist/_chunks/{progress-B-PSO5OS.js → progress-kzIRcdaq.js} +11 -10
  75. package/dist/_chunks/pt-D7qO5CzD.js +370 -0
  76. package/dist/_chunks/{public-footer.agent-Bc99tE5Z.js → public-footer.agent-Bh0rnx4i.js} +21 -14
  77. package/dist/_chunks/{public-header.agent-B-B0WDAi.js → public-header.agent-B2dDg2_d.js} +3 -3
  78. package/dist/_chunks/{radio-i4ogu3cq.js → radio-TWf9Q-mp.js} +2 -2
  79. package/dist/_chunks/{radio-group-CTlGc36r.js → radio-group-BcF92GEF.js} +4 -4
  80. package/dist/_chunks/{react-day-picker-D3yzgvDB.js → react-day-picker-DsjfS7uI.js} +662 -615
  81. package/dist/_chunks/recaptcha-widget-CFYyLSEX.js +221 -0
  82. package/dist/_chunks/registry-nPAVE19X.js +21 -0
  83. package/dist/_chunks/{resizable-COV-cnth.js → resizable-3vzqDlg6.js} +29 -28
  84. package/dist/_chunks/{reviews-panel-bKEUKSic.js → reviews-panel-yanuBZs-.js} +4 -4
  85. package/dist/_chunks/{rich-text-editor-J-wAz9eN.js → rich-text-editor-CHmr9Bz8.js} +2 -2
  86. package/dist/_chunks/ro-CP2-VJ_O.js +361 -0
  87. package/dist/_chunks/ru-RPn9_Lpq.js +561 -0
  88. package/dist/_chunks/{scroll-area-DEDU-lp-.js → scroll-area-BWqCkEGz.js} +2 -2
  89. package/dist/_chunks/{search-bar-BRMW1-WG.js → search-bar-CP6wUJFY.js} +3 -3
  90. package/dist/_chunks/{search-input-CIA6pPfn.js → search-input-C1C3jQpD.js} +24 -23
  91. package/dist/_chunks/{select-C92AT_OZ.js → select-hsCaJSX3.js} +3 -3
  92. package/dist/_chunks/{sheet-D8Yl0nKR.js → sheet-BV-yuLE2.js} +3 -3
  93. package/dist/_chunks/{sidebar-DkyC6GvS.js → sidebar-BbR8f6oe.js} +3 -3
  94. package/dist/_chunks/{signature-capture-DjMlFOzS.js → signature-capture-C-fF71xI.js} +213 -205
  95. package/dist/_chunks/{slider-CfEzeseL.js → slider-BHWzXdjt.js} +3 -3
  96. package/dist/_chunks/{slot-grid-Q94gVmhn.js → slot-grid-Dz13dH82.js} +4 -4
  97. package/dist/_chunks/{sparkline-B5Ms55PZ.js → sparkline-DEROcSl0.js} +2 -2
  98. package/dist/_chunks/sq-AQvefouo.js +355 -0
  99. package/dist/_chunks/{stepper-progress-jFY8BSf7.js → stepper-progress-DDjq5nei.js} +16 -15
  100. package/dist/_chunks/streaming-text-GH07yIYh.js +127 -0
  101. package/dist/_chunks/sv-zkx9eBtD.js +376 -0
  102. package/dist/_chunks/{switch-D916VW86.js → switch-BJ6HD3Mn.js} +2 -2
  103. package/dist/_chunks/{tabs-aEQfQV3x.js → tabs-BpPYVme_.js} +4 -4
  104. package/dist/_chunks/{tag-bBPAvXyh.js → tag-CyoaEmf_.js} +2 -2
  105. package/dist/_chunks/{task-tray-6NlryfMJ.js → task-tray-DRK0b0Qb.js} +3 -3
  106. package/dist/_chunks/{text-area-D5GAe8pV.js → text-area-BIx0tZ05.js} +27 -26
  107. package/dist/_chunks/{text-input-CakysYnD.js → text-input-BaClJL8Y.js} +2 -2
  108. package/dist/_chunks/{theme-toggle-JoeMs_ws.js → theme-toggle-DpC28kt5.js} +6 -6
  109. package/dist/_chunks/{time-picker-DeVZkIY2.js → time-picker-B5umYwfv.js} +2 -2
  110. package/dist/_chunks/{timeline-CR7HjZCK.js → timeline-D0Wo7v_o.js} +3 -3
  111. package/dist/_chunks/{toast.agent-DVpKt38p.js → toast.agent-WHHfw5VX.js} +322 -320
  112. package/dist/_chunks/{tooltip-ClJd0ciy.js → tooltip-DvmfrNvB.js} +29 -20
  113. package/dist/_chunks/{tooth-scheme-3mITSXiZ.js → tooth-scheme-CxlsLjfN.js} +2 -2
  114. package/dist/_chunks/tr-Dmr412Ac.js +378 -0
  115. package/dist/_chunks/{transcript-panel-QUQ9XJmf.js → transcript-panel-DyhTpAP7.js} +21 -20
  116. package/dist/_chunks/{use-direction-D6rvvG9G.js → use-direction-Dp8h70PP.js} +7 -6
  117. package/dist/_chunks/use-isomorphic-layout-effect-BGfaCOP1.js +6 -0
  118. package/dist/_chunks/use-media-query-CcAx5SMM.js +16 -0
  119. package/dist/_chunks/{use-password-requirements-E0sSfx5X.js → use-password-requirements-DsgduV1x.js} +3 -3
  120. package/dist/_chunks/use-scroll-to-first-error-4Za-u5Nw.js +43 -0
  121. package/dist/_chunks/{workflow-map-DlWBJJBt.js → workflow-map-BSvQS3be.js} +6 -6
  122. package/dist/_chunks/zh-CN-DxVt64Zk.js +388 -0
  123. package/dist/agent/registry.d.ts +1 -6
  124. package/dist/agent-catalog.json +1 -1
  125. package/dist/components/_shared/date-locale.d.ts +7 -2
  126. package/dist/components/_shared/index.d.ts +1 -1
  127. package/dist/components/accordion/index.js +1 -1
  128. package/dist/components/agenda-card/index.js +1 -1
  129. package/dist/components/agenda-tray/index.js +1 -1
  130. package/dist/components/ai-prompt-input/index.js +1 -1
  131. package/dist/components/audio-recorder/index.js +1 -1
  132. package/dist/components/audio-visualiser/index.js +1 -1
  133. package/dist/components/autocomplete/index.js +1 -1
  134. package/dist/components/avatar/index.js +1 -1
  135. package/dist/components/badge/index.js +1 -1
  136. package/dist/components/booking/index.js +1 -1
  137. package/dist/components/breadcrumb/index.js +1 -1
  138. package/dist/components/button/index.js +1 -1
  139. package/dist/components/button-group/index.js +1 -1
  140. package/dist/components/calendar/index.js +1 -1
  141. package/dist/components/carousel/index.js +1 -1
  142. package/dist/components/chart/index.js +1 -1
  143. package/dist/components/chat-container/index.js +1 -1
  144. package/dist/components/chat-input/index.js +1 -1
  145. package/dist/components/chat-message/index.js +1 -1
  146. package/dist/components/checkbox/index.js +1 -1
  147. package/dist/components/checkbox-group/index.js +1 -1
  148. package/dist/components/collapsible/index.js +1 -1
  149. package/dist/components/color-picker/index.js +1 -1
  150. package/dist/components/combobox/index.js +1 -1
  151. package/dist/components/command-palette/index.js +1 -1
  152. package/dist/components/copy-field/index.js +1 -1
  153. package/dist/components/data-table/index.js +1 -1
  154. package/dist/components/date-picker/index.js +1 -1
  155. package/dist/components/date-range-picker/index.js +1 -1
  156. package/dist/components/date-time-picker/index.js +1 -1
  157. package/dist/components/description-list/index.js +1 -1
  158. package/dist/components/dialog/index.js +1 -1
  159. package/dist/components/dropdown-menu/index.js +1 -1
  160. package/dist/components/email-input/index.js +1 -1
  161. package/dist/components/file-upload/index.js +1 -1
  162. package/dist/components/freemium-paywall/index.js +1 -1
  163. package/dist/components/header/index.js +1 -1
  164. package/dist/components/header-settings/index.js +6 -6
  165. package/dist/components/icon-button/index.js +1 -1
  166. package/dist/components/icon-button-group/index.js +1 -1
  167. package/dist/components/key-value-pair/index.js +1 -1
  168. package/dist/components/list/index.js +1 -1
  169. package/dist/components/locale-picker/index.js +1 -1
  170. package/dist/components/map-view/index.js +1 -1
  171. package/dist/components/map-view/map-view.d.ts +10 -0
  172. package/dist/components/message-card/index.js +1 -1
  173. package/dist/components/message-tray/index.js +1 -1
  174. package/dist/components/multi-select/index.js +1 -1
  175. package/dist/components/navigation-menu/index.js +1 -1
  176. package/dist/components/notification-card/index.js +1 -1
  177. package/dist/components/notification-tray/index.js +1 -1
  178. package/dist/components/number-input/index.js +1 -1
  179. package/dist/components/otp-input/index.js +1 -1
  180. package/dist/components/pagination/index.js +1 -1
  181. package/dist/components/password-input/index.js +1 -1
  182. package/dist/components/patient-search/index.js +1 -1
  183. package/dist/components/payment-form/index.js +1 -1
  184. package/dist/components/pdf-viewer/index.js +1 -1
  185. package/dist/components/phone-input/index.js +1 -1
  186. package/dist/components/popover/index.js +1 -1
  187. package/dist/components/practice-results/index.js +1 -1
  188. package/dist/components/practice-results/practice-results.d.ts +23 -1
  189. package/dist/components/privacy-lock/index.js +1 -1
  190. package/dist/components/progress/index.js +1 -1
  191. package/dist/components/public-footer/index.js +1 -1
  192. package/dist/components/public-header/index.js +1 -1
  193. package/dist/components/radio/index.js +1 -1
  194. package/dist/components/radio-group/index.js +2 -2
  195. package/dist/components/recaptcha-widget/index.js +1 -1
  196. package/dist/components/resizable/index.js +1 -1
  197. package/dist/components/reviews-panel/index.js +1 -1
  198. package/dist/components/rich-text-editor/index.js +1 -1
  199. package/dist/components/scroll-area/index.js +1 -1
  200. package/dist/components/search-bar/index.js +1 -1
  201. package/dist/components/search-input/index.js +1 -1
  202. package/dist/components/select/index.js +1 -1
  203. package/dist/components/sheet/index.js +1 -1
  204. package/dist/components/sidebar/index.js +1 -1
  205. package/dist/components/signature-capture/index.js +1 -1
  206. package/dist/components/slider/index.js +1 -1
  207. package/dist/components/slot-grid/index.js +1 -1
  208. package/dist/components/sparkline/index.js +1 -1
  209. package/dist/components/stepper-progress/index.js +1 -1
  210. package/dist/components/streaming-text/index.js +1 -1
  211. package/dist/components/switch/index.js +1 -1
  212. package/dist/components/tabs/index.js +1 -1
  213. package/dist/components/tag/index.js +1 -1
  214. package/dist/components/task-tray/index.js +1 -1
  215. package/dist/components/text-area/index.js +1 -1
  216. package/dist/components/text-input/index.js +1 -1
  217. package/dist/components/theme-toggle/index.js +1 -1
  218. package/dist/components/time-picker/index.js +1 -1
  219. package/dist/components/timeline/index.js +1 -1
  220. package/dist/components/toast/index.js +1 -1
  221. package/dist/components/tooltip/index.js +1 -1
  222. package/dist/components/tooth-scheme/index.js +1 -1
  223. package/dist/components/transcript-panel/index.js +1 -1
  224. package/dist/components/workflow/index.js +1 -1
  225. package/dist/hooks/index.js +69 -66
  226. package/dist/i18n/locales/ar.d.ts +92 -0
  227. package/dist/i18n/locales/ar.js +82 -0
  228. package/dist/i18n/locales/de.d.ts +92 -0
  229. package/dist/i18n/locales/de.js +81 -0
  230. package/dist/i18n/locales/el.d.ts +92 -0
  231. package/dist/i18n/locales/el.js +82 -0
  232. package/dist/i18n/locales/en.d.ts +27 -0
  233. package/dist/i18n/locales/en.js +27 -0
  234. package/dist/i18n/locales/es.d.ts +92 -0
  235. package/dist/i18n/locales/es.js +81 -0
  236. package/dist/i18n/locales/fr.d.ts +92 -0
  237. package/dist/i18n/locales/fr.js +81 -0
  238. package/dist/i18n/locales/hi.d.ts +92 -0
  239. package/dist/i18n/locales/hi.js +82 -0
  240. package/dist/i18n/locales/it.d.ts +92 -0
  241. package/dist/i18n/locales/it.js +81 -0
  242. package/dist/i18n/locales/ja.d.ts +92 -0
  243. package/dist/i18n/locales/ja.js +82 -0
  244. package/dist/i18n/locales/nl.d.ts +92 -0
  245. package/dist/i18n/locales/nl.js +81 -0
  246. package/dist/i18n/locales/pl.d.ts +92 -0
  247. package/dist/i18n/locales/pl.js +82 -0
  248. package/dist/i18n/locales/pt.d.ts +92 -0
  249. package/dist/i18n/locales/pt.js +83 -0
  250. package/dist/i18n/locales/ro.d.ts +92 -0
  251. package/dist/i18n/locales/ro.js +82 -0
  252. package/dist/i18n/locales/ru.d.ts +92 -0
  253. package/dist/i18n/locales/ru.js +82 -0
  254. package/dist/i18n/locales/sq.d.ts +92 -0
  255. package/dist/i18n/locales/sq.js +82 -0
  256. package/dist/i18n/locales/sv.d.ts +92 -0
  257. package/dist/i18n/locales/sv.js +82 -0
  258. package/dist/i18n/locales/tr.d.ts +92 -0
  259. package/dist/i18n/locales/tr.js +82 -0
  260. package/dist/i18n/locales/zh.d.ts +92 -0
  261. package/dist/i18n/locales/zh.js +82 -0
  262. package/dist/index.js +541 -540
  263. package/dist/locales/ar.json +92 -0
  264. package/dist/locales/de.json +92 -0
  265. package/dist/locales/el.json +92 -0
  266. package/dist/locales/en.json +27 -0
  267. package/dist/locales/es.json +92 -0
  268. package/dist/locales/fr.json +92 -0
  269. package/dist/locales/hi.json +92 -0
  270. package/dist/locales/it.json +92 -0
  271. package/dist/locales/ja.json +92 -0
  272. package/dist/locales/nl.json +92 -0
  273. package/dist/locales/pl.json +92 -0
  274. package/dist/locales/pt.json +92 -0
  275. package/dist/locales/ro.json +92 -0
  276. package/dist/locales/ru.json +92 -0
  277. package/dist/locales/sq.json +92 -0
  278. package/dist/locales/sv.json +92 -0
  279. package/dist/locales/tr.json +92 -0
  280. package/dist/locales/zh.json +92 -0
  281. package/dist/patterns/alia-assistant/index.js +1 -1
  282. package/dist/patterns/patient-shell/index.js +1 -1
  283. package/dist/tokens.css +1 -1
  284. package/package.json +1 -2
  285. package/dist/_chunks/audio-visualiser-I-T4Z7EU.js +0 -145
  286. package/dist/_chunks/practice-results-CEKjwsgS.js +0 -1441
  287. package/dist/_chunks/recaptcha-widget-BtBNb6tB.js +0 -192
  288. package/dist/_chunks/registry-C9nwlNyL.js +0 -21
  289. package/dist/_chunks/streaming-text-BgjCTVOw.js +0 -105
  290. package/dist/_chunks/use-scroll-to-first-error-BrK7dKB_.js +0 -55
@@ -0,0 +1,1618 @@
1
+ import { jsx as t, jsxs as f } from "react/jsx-runtime";
2
+ import { forwardRef as Ue, useState as ue, useRef as M, useMemo as O, useImperativeHandle as Ge, useCallback as K, useEffect as J } from "react";
3
+ import { c as q } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as N } from "react-i18next";
5
+ import { A as Y } from "./alert-ywPR59NE.js";
6
+ import { A as Re } from "./avatar-BNQNhoyL.js";
7
+ import { B as G } from "./button-DD_0Xdmr.js";
8
+ import { D as F } from "./dropdown-menu-BC5ZdOMo.js";
9
+ import { E as qe } from "./empty-state-BLy7tigq.js";
10
+ import { M as Ze } from "./map-view-WEWqXzof.js";
11
+ import { R as ke } from "./rating-BRD7O74e.js";
12
+ import { S as A } from "./sheet-BV-yuLE2.js";
13
+ import { S as Qe } from "./skeleton-CZbwyJAA.js";
14
+ import { S as Je } from "./spinner-CCByyvcb.js";
15
+ import { T as D } from "./tag-CyoaEmf_.js";
16
+ import { u as We } from "./use-media-query-CcAx5SMM.js";
17
+ import { u as Xe } from "./registry-nPAVE19X.js";
18
+ import { c as me } from "./createLucideIcon-CrFbzy84.js";
19
+ import { R as Ye } from "./refresh-cw-CC8jSKMr.js";
20
+ import { C as we } from "./chevron-down-BX_NP2Yh.js";
21
+ import { M as te } from "./map-pin-B8STOPMJ.js";
22
+ import { S as Ce } from "./smile-BSYLAHy6.js";
23
+ import { C as Ne } from "./calendar-clock-CYkcqdwl.js";
24
+ /**
25
+ * @license lucide-react v1.8.0 - ISC
26
+ *
27
+ * This source code is licensed under the ISC license.
28
+ * See the LICENSE file in the root directory of this source tree.
29
+ */
30
+ const et = [
31
+ ["path", { d: "m5 8 6 6", key: "1wu5hv" }],
32
+ ["path", { d: "m4 14 6-6 2-3", key: "1k1g8d" }],
33
+ ["path", { d: "M2 5h12", key: "or177f" }],
34
+ ["path", { d: "M7 2h1", key: "1t2jsx" }],
35
+ ["path", { d: "m22 22-5-10-5 10", key: "don7ne" }],
36
+ ["path", { d: "M14 18h6", key: "1m8k6r" }]
37
+ ], Se = me("languages", et);
38
+ /**
39
+ * @license lucide-react v1.8.0 - ISC
40
+ *
41
+ * This source code is licensed under the ISC license.
42
+ * See the LICENSE file in the root directory of this source tree.
43
+ */
44
+ const tt = [
45
+ [
46
+ "path",
47
+ {
48
+ d: "M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",
49
+ key: "169xi5"
50
+ }
51
+ ],
52
+ ["path", { d: "M15 5.764v15", key: "1pn4in" }],
53
+ ["path", { d: "M9 3.236v15", key: "1uimfh" }]
54
+ ], nt = me("map", tt);
55
+ /**
56
+ * @license lucide-react v1.8.0 - ISC
57
+ *
58
+ * This source code is licensed under the ISC license.
59
+ * See the LICENSE file in the root directory of this source tree.
60
+ */
61
+ const at = [
62
+ [
63
+ "path",
64
+ {
65
+ d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
66
+ key: "oel41y"
67
+ }
68
+ ],
69
+ ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
70
+ ], Pe = me("shield-check", at), st = {
71
+ id: "practice-results",
72
+ capabilities: ["navigate", "view_change"],
73
+ state: {
74
+ variant: {
75
+ type: "string",
76
+ descriptionKey: "ui.agent.practiceResults.state.variant",
77
+ description: "Active variant — one of `split-list-map`, `map-first`, `rich-cards`.",
78
+ read: (e) => e.getVariant()
79
+ }
80
+ },
81
+ actions: {
82
+ scroll_to_result: {
83
+ safety: "read",
84
+ argsType: "{ id: string }",
85
+ descriptionKey: "ui.agent.practiceResults.actions.scrollToResult",
86
+ description: "Scroll the result card with the given id into the visible viewport.",
87
+ invoke: (e, n) => {
88
+ e.scrollToResult(n.id);
89
+ }
90
+ },
91
+ focus_pin: {
92
+ safety: "read",
93
+ argsType: "{ id: string }",
94
+ descriptionKey: "ui.agent.practiceResults.actions.focusPin",
95
+ description: "Highlight the map pin for the given result id (no-op on rich-cards).",
96
+ invoke: (e, n) => {
97
+ e.focusPin(n.id);
98
+ }
99
+ }
100
+ },
101
+ domHooks: {
102
+ root: {
103
+ attr: "data-component",
104
+ value: "practice-results",
105
+ description: "Marks the PracticeResults root region."
106
+ },
107
+ instanceId: {
108
+ attr: "data-component-id",
109
+ sourceProp: "id",
110
+ description: "Sourced from the id prop."
111
+ }
112
+ }
113
+ }, it = 13, rt = [
114
+ "distance",
115
+ "rating",
116
+ "next-available",
117
+ "relevance"
118
+ ];
119
+ function $(e, n) {
120
+ if (typeof window > "u") return;
121
+ const a = window.track;
122
+ try {
123
+ a == null || a(e, n);
124
+ } catch {
125
+ }
126
+ }
127
+ function W(e, n, a, o) {
128
+ const i = e.findIndex((d) => d.id === n);
129
+ if (i < 0) return;
130
+ const s = e[i];
131
+ s && ($("serp_result_clicked", { resultId: n, source: a, position: i }), o(s, a));
132
+ }
133
+ function lt(e, n) {
134
+ const o = (n.lat - e.lat) * Math.PI / 180, i = (n.lng - e.lng) * Math.PI / 180, s = e.lat * Math.PI / 180, d = n.lat * Math.PI / 180, m = Math.sin(o / 2), l = Math.sin(i / 2), b = m * m + Math.cos(s) * Math.cos(d) * l * l;
135
+ return 2 * 6371 * Math.asin(Math.min(1, Math.sqrt(b)));
136
+ }
137
+ function ot(e, n, a) {
138
+ return !n || Object.keys(n).length === 0 ? e : e.filter((o) => {
139
+ for (const i of a) {
140
+ const s = n[i.key];
141
+ if (!s || s.length === 0) continue;
142
+ if (i.options.length === 0) {
143
+ if (o[i.key] !== !0) return !1;
144
+ continue;
145
+ }
146
+ const d = i.key === "insurance" ? o.insurances : i.key === "language" ? o.languages : o[i.key];
147
+ if (!Array.isArray(d) || !(i.multi ? s.some((l) => d.includes(l)) : d.includes(s[0]))) return !1;
148
+ }
149
+ return !0;
150
+ });
151
+ }
152
+ function ct(e, n, a) {
153
+ const o = e.map((s) => {
154
+ const d = s.location ? s.location.distanceKm ?? (a ? lt(a, s.location) : void 0) : void 0;
155
+ return { result: s, distanceKm: d };
156
+ }), i = (s, d) => {
157
+ var m, l, b, r;
158
+ switch (n) {
159
+ case "distance":
160
+ return s.distanceKm == null && d.distanceKm == null ? 0 : s.distanceKm == null ? 1 : d.distanceKm == null ? -1 : s.distanceKm - d.distanceKm;
161
+ case "rating": {
162
+ const p = ((m = s.result.rating) == null ? void 0 : m.value) ?? -1;
163
+ return (((l = d.result.rating) == null ? void 0 : l.value) ?? -1) - p;
164
+ }
165
+ case "next-available": {
166
+ const p = ((b = s.result.nextAvailableSlot) == null ? void 0 : b.dateTime) ?? "", u = ((r = d.result.nextAvailableSlot) == null ? void 0 : r.dateTime) ?? "";
167
+ return !p && !u ? 0 : p ? u ? p.localeCompare(u) : -1 : 1;
168
+ }
169
+ case "relevance":
170
+ default:
171
+ return 0;
172
+ }
173
+ };
174
+ return [...o].sort(i).map(
175
+ ({ result: s, distanceKm: d }) => d != null && s.location ? {
176
+ ...s,
177
+ location: { ...s.location, distanceKm: d }
178
+ } : s
179
+ );
180
+ }
181
+ function xe(e) {
182
+ let n = -1 / 0, a = 1 / 0, o = -1 / 0, i = 1 / 0, s = !1;
183
+ for (const d of e) {
184
+ if (!d.location) continue;
185
+ s = !0;
186
+ const { lat: m, lng: l } = d.location;
187
+ m > n && (n = m), m < a && (a = m), l > o && (o = l), l < i && (i = l);
188
+ }
189
+ if (s)
190
+ return { north: n, south: a, east: o, west: i };
191
+ }
192
+ const dt = q(
193
+ "ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)] ds:gap-[var(--spacing-md)]",
194
+ {
195
+ variants: {
196
+ variant: {
197
+ "split-list-map": "",
198
+ "map-first": "",
199
+ "rich-cards": ""
200
+ }
201
+ },
202
+ defaultVariants: { variant: "split-list-map" }
203
+ }
204
+ );
205
+ function ze({
206
+ heading: e,
207
+ intro: n,
208
+ totalCount: a,
209
+ searchCentreLabel: o
210
+ }) {
211
+ const { t: i } = N();
212
+ if (!e && !n && a == null) return null;
213
+ const s = a != null ? o ? i("practiceResults.results.heading", {
214
+ count: a,
215
+ place: o
216
+ }) : i("practiceResults.results.summary", { count: a }) : void 0;
217
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
218
+ e ? /* @__PURE__ */ t("h2", { className: "type-title-section ds:m-0 ds:text-[var(--foreground)]", children: e }) : null,
219
+ n ? /* @__PURE__ */ t("p", { className: "type-body ds:m-0 ds:text-[var(--muted-foreground)]", children: n }) : null,
220
+ s ? /* @__PURE__ */ t(
221
+ "p",
222
+ {
223
+ className: "type-body-sm ds:m-0 ds:text-[var(--muted-foreground)]",
224
+ "aria-live": "polite",
225
+ children: s
226
+ }
227
+ ) : null
228
+ ] });
229
+ }
230
+ const ee = q(
231
+ [
232
+ "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
233
+ "ds:min-h-[var(--min-target-size)]",
234
+ "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
235
+ "ds:pt-[var(--spacing-xs)] ds:pb-[var(--spacing-xs)]",
236
+ "ds:rounded-[var(--radius-full)]",
237
+ "type-label",
238
+ "ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
239
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
240
+ "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
241
+ "ds:forced-colors:focus-visible:outline-[CanvasText]"
242
+ ].join(" "),
243
+ {
244
+ variants: {
245
+ state: {
246
+ idle: "ds:bg-[var(--secondary)] ds:text-[var(--foreground)] ds:border ds:border-[color:var(--border)] ds:hover:bg-[color-mix(in_srgb,var(--primary)_8%,var(--secondary))]",
247
+ active: "ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)] ds:border ds:border-transparent ds:font-[var(--font-weight-semibold)]"
248
+ }
249
+ },
250
+ defaultVariants: { state: "idle" }
251
+ }
252
+ ), ut = q(
253
+ "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
254
+ {
255
+ variants: {
256
+ placement: {
257
+ inline: "",
258
+ // Floating chrome on map-first: soft `--popover` surface so chips
259
+ // read over the map without losing contrast. Same surface as
260
+ // dropdowns / sheets — themed and forced-colors safe.
261
+ floating: [
262
+ "ds:rounded-[var(--radius-full)]",
263
+ "ds:bg-[var(--popover)] ds:shadow-[var(--shadow-md)]",
264
+ "ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)]",
265
+ "ds:pt-[var(--spacing-2xs)] ds:pb-[var(--spacing-2xs)]"
266
+ ].join(" ")
267
+ }
268
+ },
269
+ defaultVariants: { placement: "inline" }
270
+ }
271
+ ), mt = q(
272
+ [
273
+ "ds:ms-[var(--spacing-xs)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
274
+ "ds:min-h-[var(--min-target-size)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]",
275
+ "type-label ds:text-[color:var(--muted-foreground)]",
276
+ "ds:rounded-[var(--radius-sm)]",
277
+ "ds:hover:text-[color:var(--foreground)]",
278
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
279
+ "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
280
+ ].join(" ")
281
+ );
282
+ function Me({
283
+ facets: e,
284
+ value: n,
285
+ onChange: a,
286
+ floating: o
287
+ }) {
288
+ const { t: i } = N(), s = O(() => n ?? {}, [n]), d = O(
289
+ () => Object.values(s).some((r) => r && r.length > 0),
290
+ [s]
291
+ ), m = (r, p) => {
292
+ const u = { ...s };
293
+ p.length === 0 ? delete u[r] : u[r] = p, a(u), $("serp_filter_changed", { key: r, values: p });
294
+ }, l = (r) => {
295
+ var u;
296
+ const p = (((u = s[r]) == null ? void 0 : u.length) ?? 0) > 0;
297
+ m(r, p ? [] : ["true"]);
298
+ }, b = (r, p) => {
299
+ const u = s[r.key] ?? [], h = u.includes(p);
300
+ let g;
301
+ r.multi ? g = h ? u.filter((c) => c !== p) : [...u, p] : g = h ? [] : [p], m(r.key, g);
302
+ };
303
+ return e.length === 0 ? null : /* @__PURE__ */ f(
304
+ "div",
305
+ {
306
+ "data-component": "practice-results-filters",
307
+ role: "group",
308
+ "aria-label": i("practiceResults.filters.label"),
309
+ className: ut({
310
+ placement: o ? "floating" : "inline"
311
+ }),
312
+ children: [
313
+ e.map((r) => {
314
+ const p = r.options.length === 0, u = s[r.key] ?? [], h = u.length > 0;
315
+ if (p)
316
+ return /* @__PURE__ */ t(
317
+ "button",
318
+ {
319
+ type: "button",
320
+ "aria-pressed": h,
321
+ "aria-label": r.label,
322
+ onClick: () => l(r.key),
323
+ className: ee({
324
+ state: h ? "active" : "idle"
325
+ }),
326
+ children: /* @__PURE__ */ t("span", { children: r.label })
327
+ },
328
+ r.key
329
+ );
330
+ const g = h ? ` (${u.length})` : "";
331
+ return /* @__PURE__ */ f(F.Root, { children: [
332
+ /* @__PURE__ */ t(F.Trigger, { asChild: !0, children: /* @__PURE__ */ f(
333
+ "button",
334
+ {
335
+ type: "button",
336
+ "aria-label": `${r.label}${g}`,
337
+ className: ee({
338
+ state: h ? "active" : "idle"
339
+ }),
340
+ children: [
341
+ /* @__PURE__ */ f("span", { children: [
342
+ r.label,
343
+ g
344
+ ] }),
345
+ /* @__PURE__ */ t(
346
+ we,
347
+ {
348
+ "aria-hidden": "true",
349
+ className: "ds:size-3.5 ds:shrink-0"
350
+ }
351
+ )
352
+ ]
353
+ }
354
+ ) }),
355
+ /* @__PURE__ */ t(F.Content, { sideOffset: 8, align: "start", children: r.options.map((c) => /* @__PURE__ */ t(
356
+ F.CheckboxItem,
357
+ {
358
+ checked: u.includes(c.value),
359
+ onSelect: (x) => {
360
+ r.multi && x.preventDefault(), b(r, c.value);
361
+ },
362
+ children: c.label
363
+ },
364
+ c.value
365
+ )) })
366
+ ] }, r.key);
367
+ }),
368
+ d ? /* @__PURE__ */ t(
369
+ "button",
370
+ {
371
+ type: "button",
372
+ onClick: () => {
373
+ a({}), $("serp_filter_changed", { key: "*", values: [] });
374
+ },
375
+ className: mt(),
376
+ children: i("practiceResults.filters.clear")
377
+ }
378
+ ) : null
379
+ ]
380
+ }
381
+ );
382
+ }
383
+ function ce({ value: e, onChange: n }) {
384
+ const { t: a } = N(), o = (i) => {
385
+ switch (i) {
386
+ case "distance":
387
+ return a("practiceResults.sort.distance");
388
+ case "rating":
389
+ return a("practiceResults.sort.rating");
390
+ case "next-available":
391
+ return a("practiceResults.sort.nextAvailable");
392
+ case "relevance":
393
+ default:
394
+ return a("practiceResults.sort.relevance");
395
+ }
396
+ };
397
+ return /* @__PURE__ */ f(F.Root, { children: [
398
+ /* @__PURE__ */ t(F.Trigger, { asChild: !0, children: /* @__PURE__ */ f(
399
+ "button",
400
+ {
401
+ type: "button",
402
+ "aria-label": `${a("practiceResults.sort.label")}: ${o(e)}`,
403
+ className: ee({ state: "idle" }),
404
+ children: [
405
+ /* @__PURE__ */ f("span", { children: [
406
+ a("practiceResults.sort.label"),
407
+ ": ",
408
+ o(e)
409
+ ] }),
410
+ /* @__PURE__ */ t(we, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" })
411
+ ]
412
+ }
413
+ ) }),
414
+ /* @__PURE__ */ t(F.Content, { sideOffset: 8, align: "end", children: /* @__PURE__ */ t(
415
+ F.RadioGroup,
416
+ {
417
+ value: e,
418
+ onValueChange: (i) => {
419
+ const s = i;
420
+ s !== e && (n(s), $("serp_sort_changed", { sort: s }));
421
+ },
422
+ children: rt.map((i) => /* @__PURE__ */ t(F.RadioItem, { value: i, children: o(i) }, i))
423
+ }
424
+ ) })
425
+ ] });
426
+ }
427
+ function Ae({ distanceKm: e }) {
428
+ const { t: n, i18n: a } = N(), o = O(() => {
429
+ if (e < 1) return n("practiceResults.distance.below");
430
+ const i = new Intl.NumberFormat(a.language, {
431
+ maximumFractionDigits: 1
432
+ }).format(e);
433
+ return n("practiceResults.distance.km", { distance: i });
434
+ }, [e, n, a.language]);
435
+ return /* @__PURE__ */ t(
436
+ D,
437
+ {
438
+ label: o,
439
+ variant: "neutral",
440
+ fill: "outline",
441
+ size: "sm",
442
+ leading: /* @__PURE__ */ t(te, { "aria-hidden": "true" })
443
+ }
444
+ );
445
+ }
446
+ const ye = q(
447
+ [
448
+ "ds:inline-size-[12rem] ds:block-size-[8rem] ds:shrink-0",
449
+ "ds:rounded-[var(--radius-md)]"
450
+ ].join(" "),
451
+ {
452
+ variants: {
453
+ state: {
454
+ placeholder: "ds:flex ds:items-center ds:justify-center ds:bg-[var(--muted)] ds:text-[var(--muted-foreground)]",
455
+ image: "ds:[object-fit:cover]"
456
+ }
457
+ },
458
+ defaultVariants: { state: "placeholder" }
459
+ }
460
+ );
461
+ function pt() {
462
+ if (typeof document > "u") return "4945a3";
463
+ const e = getComputedStyle(document.documentElement).getPropertyValue("--map-marker-color").trim(), n = /^#?([0-9a-fA-F]{6})$/.exec(e);
464
+ return n ? n[1] : "4945a3";
465
+ }
466
+ function ft({
467
+ apiKey: e,
468
+ center: n,
469
+ zoom: a = 14,
470
+ consentGranted: o
471
+ }) {
472
+ const { t: i } = N();
473
+ if (!o || !e)
474
+ return /* @__PURE__ */ t(
475
+ "div",
476
+ {
477
+ "aria-hidden": "true",
478
+ className: ye({ state: "placeholder" }),
479
+ children: /* @__PURE__ */ t(te, { "aria-hidden": "true", className: "ds:size-6" })
480
+ }
481
+ );
482
+ const s = pt(), d = `https://maps.googleapis.com/maps/api/staticmap?center=${n.lat},${n.lng}&zoom=${a}&size=240x160&scale=2&markers=color:0x${s}%7C${n.lat},${n.lng}&key=${encodeURIComponent(e)}`;
483
+ return /* @__PURE__ */ t(
484
+ "img",
485
+ {
486
+ src: d,
487
+ alt: i("practiceResults.thumbnail.alt"),
488
+ loading: "lazy",
489
+ decoding: "async",
490
+ width: 240,
491
+ height: 160,
492
+ className: ye({ state: "image" })
493
+ }
494
+ );
495
+ }
496
+ const _e = q(
497
+ [
498
+ "ds:relative ds:flex ds:w-full ds:cursor-pointer",
499
+ "ds:rounded-[var(--radius-lg)]",
500
+ "ds:bg-[var(--card)] ds:text-[var(--card-foreground)]",
501
+ "ds:border ds:border-[color:var(--card-border)]",
502
+ "ds:p-[var(--spacing-md)]",
503
+ "ds:gap-[var(--spacing-md)]",
504
+ "ds:transition-[box-shadow,border-color] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
505
+ "ds:hover:shadow-[var(--shadow-md)]",
506
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
507
+ "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
508
+ "ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
509
+ // Use `data-highlighted` for the pin↔card sync visual so consumers
510
+ // can override (e.g. dim siblings) without fighting the kit.
511
+ "ds:data-[highlighted=true]:border-[color:var(--primary)]",
512
+ "ds:data-[highlighted=true]:shadow-[var(--shadow-md)]",
513
+ "ds:forced-colors:focus-visible:outline-[CanvasText]"
514
+ ].join(" "),
515
+ {
516
+ variants: {
517
+ density: {
518
+ compact: "",
519
+ rich: "ds:p-[var(--spacing-lg)] ds:gap-[var(--spacing-lg)]"
520
+ }
521
+ },
522
+ defaultVariants: { density: "compact" }
523
+ }
524
+ );
525
+ function ht({
526
+ result: e,
527
+ highlighted: n,
528
+ onSelect: a,
529
+ onOpenClick: o,
530
+ onHover: i,
531
+ density: s = "compact",
532
+ openLabel: d,
533
+ nextSlotText: m,
534
+ maxInsuranceChips: l = 3,
535
+ maxLanguageChips: b = 4,
536
+ children: r
537
+ }) {
538
+ var T, z, B, H, U, j;
539
+ const { t: p } = N(), u = e.rating, h = (T = e.location) == null ? void 0 : T.distanceKm, g = (((z = e.languages) == null ? void 0 : z.length) ?? 0) > 0, c = (((B = e.insurances) == null ? void 0 : B.length) ?? 0) > 0, x = e.specializedInFearPatients, R = g || c || x, P = (e.languages ?? []).slice(0, b), k = (((H = e.languages) == null ? void 0 : H.length) ?? 0) - P.length, y = (e.insurances ?? []).slice(0, l), _ = (((U = e.insurances) == null ? void 0 : U.length) ?? 0) - y.length;
540
+ return (
541
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events -- card is role="group" by design (axe nested-interactive); click handler is mouse-only sync.
542
+ /* @__PURE__ */ f(
543
+ "div",
544
+ {
545
+ "data-component": "practice-result-card",
546
+ "data-result-id": e.id,
547
+ "data-highlighted": n ? "true" : "false",
548
+ role: "group",
549
+ "aria-labelledby": `practice-result-${e.id}-name`,
550
+ onClick: a,
551
+ onMouseEnter: i,
552
+ onFocus: i,
553
+ className: _e({ density: s }),
554
+ children: [
555
+ /* @__PURE__ */ t(Re, { src: e.imageUrl, name: e.name, size: "lg" }),
556
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
557
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
558
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
559
+ /* @__PURE__ */ t(
560
+ "span",
561
+ {
562
+ id: `practice-result-${e.id}-name`,
563
+ className: "type-title-card ds:text-[var(--foreground)]",
564
+ children: e.name
565
+ }
566
+ ),
567
+ h != null ? /* @__PURE__ */ t(Ae, { distanceKm: h }) : null
568
+ ] }),
569
+ e.subtitle ? /* @__PURE__ */ t("span", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: e.subtitle }) : null,
570
+ (j = e.location) != null && j.address ? /* @__PURE__ */ f("span", { className: "type-meta ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
571
+ /* @__PURE__ */ t(te, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" }),
572
+ e.location.address
573
+ ] }) : null
574
+ ] }),
575
+ u && u.count > 0 ? /* @__PURE__ */ t(
576
+ ke,
577
+ {
578
+ value: u.value,
579
+ reviews: { count: u.count },
580
+ size: "sm"
581
+ }
582
+ ) : null,
583
+ R ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
584
+ P.map((S) => /* @__PURE__ */ t(
585
+ D,
586
+ {
587
+ label: S.toUpperCase(),
588
+ variant: "info",
589
+ fill: "outline",
590
+ size: "sm",
591
+ leading: /* @__PURE__ */ t(Se, { "aria-hidden": "true" })
592
+ },
593
+ `lang-${S}`
594
+ )),
595
+ k > 0 ? /* @__PURE__ */ t(
596
+ D,
597
+ {
598
+ label: `+${k}`,
599
+ variant: "neutral",
600
+ fill: "outline",
601
+ size: "sm"
602
+ }
603
+ ) : null,
604
+ y.map((S) => /* @__PURE__ */ t(
605
+ D,
606
+ {
607
+ label: S,
608
+ variant: "brand",
609
+ fill: "outline",
610
+ size: "sm",
611
+ leading: /* @__PURE__ */ t(Pe, { "aria-hidden": "true" })
612
+ },
613
+ `ins-${S}`
614
+ )),
615
+ _ > 0 ? /* @__PURE__ */ t(
616
+ D,
617
+ {
618
+ label: `+${_}`,
619
+ variant: "neutral",
620
+ fill: "outline",
621
+ size: "sm"
622
+ }
623
+ ) : null,
624
+ x ? /* @__PURE__ */ t(
625
+ D,
626
+ {
627
+ label: p("practiceResults.fearPatient.label"),
628
+ variant: "success",
629
+ fill: "outline",
630
+ size: "sm",
631
+ leading: /* @__PURE__ */ t(Ce, { "aria-hidden": "true" })
632
+ }
633
+ ) : null
634
+ ] }) : null,
635
+ e.nextAvailableSlot && m ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
636
+ /* @__PURE__ */ f("span", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
637
+ /* @__PURE__ */ t(
638
+ Ne,
639
+ {
640
+ "aria-hidden": "true",
641
+ className: "ds:size-4 ds:text-[var(--primary)]"
642
+ }
643
+ ),
644
+ p("practiceResults.nextSlot.summary", { time: m })
645
+ ] }),
646
+ /* @__PURE__ */ t(
647
+ G,
648
+ {
649
+ intent: "primary",
650
+ size: "sm",
651
+ asChild: !0,
652
+ onClick: (S) => {
653
+ S.stopPropagation();
654
+ },
655
+ children: /* @__PURE__ */ t(
656
+ "a",
657
+ {
658
+ href: e.nextAvailableSlot.bookingHref,
659
+ "data-component": "practice-result-next-slot-cta",
660
+ children: p("practiceResults.nextSlot.cta", { time: m })
661
+ }
662
+ )
663
+ }
664
+ )
665
+ ] }) : null,
666
+ r,
667
+ /* @__PURE__ */ t("div", { className: "ds:mt-[var(--spacing-xs)] ds:flex ds:justify-end", children: /* @__PURE__ */ t(
668
+ G,
669
+ {
670
+ intent: "secondary",
671
+ size: "sm",
672
+ asChild: !0,
673
+ onClick: (S) => {
674
+ S.stopPropagation(), o();
675
+ },
676
+ children: /* @__PURE__ */ t("a", { href: e.href, "data-component": "practice-result-open-cta", children: d })
677
+ }
678
+ ) })
679
+ ] })
680
+ ]
681
+ }
682
+ )
683
+ );
684
+ }
685
+ function gt({
686
+ result: e,
687
+ apiKey: n,
688
+ consentGranted: a,
689
+ highlighted: o,
690
+ onSelect: i,
691
+ onOpenClick: s,
692
+ onHover: d,
693
+ openLabel: m
694
+ }) {
695
+ var x, R, P, k;
696
+ const { t: l, i18n: b } = N(), r = O(() => {
697
+ if (e.nextAvailableSlot)
698
+ try {
699
+ return new Intl.DateTimeFormat(b.language, {
700
+ weekday: "short",
701
+ hour: "numeric",
702
+ minute: "numeric"
703
+ }).format(new Date(e.nextAvailableSlot.dateTime));
704
+ } catch {
705
+ return e.nextAvailableSlot.dateTime;
706
+ }
707
+ }, [e.nextAvailableSlot, b.language]), p = (((x = e.languages) == null ? void 0 : x.length) ?? 0) > 0, u = (((R = e.insurances) == null ? void 0 : R.length) ?? 0) > 0, h = e.specializedInFearPatients, g = p || u || h, c = (P = e.location) == null ? void 0 : P.distanceKm;
708
+ return (
709
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events -- card is role="group" by design (axe nested-interactive); click handler is mouse-only sync.
710
+ /* @__PURE__ */ f(
711
+ "div",
712
+ {
713
+ "data-component": "practice-result-card",
714
+ "data-result-id": e.id,
715
+ "data-density": "rich",
716
+ "data-highlighted": o ? "true" : "false",
717
+ role: "group",
718
+ "aria-labelledby": `practice-result-${e.id}-name`,
719
+ onClick: i,
720
+ onMouseEnter: d,
721
+ onFocus: d,
722
+ className: _e({ density: "rich" }),
723
+ children: [
724
+ e.location ? /* @__PURE__ */ t(
725
+ ft,
726
+ {
727
+ apiKey: n,
728
+ center: {
729
+ lat: e.location.lat,
730
+ lng: e.location.lng
731
+ },
732
+ consentGranted: a
733
+ }
734
+ ) : null,
735
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
736
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-md)]", children: [
737
+ /* @__PURE__ */ t(Re, { src: e.imageUrl, name: e.name, size: "md" }),
738
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
739
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
740
+ /* @__PURE__ */ t(
741
+ "span",
742
+ {
743
+ id: `practice-result-${e.id}-name`,
744
+ className: "type-title-card ds:text-[var(--foreground)]",
745
+ children: e.name
746
+ }
747
+ ),
748
+ c != null ? /* @__PURE__ */ t(Ae, { distanceKm: c }) : null
749
+ ] }),
750
+ e.subtitle ? /* @__PURE__ */ t("span", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: e.subtitle }) : null,
751
+ (k = e.location) != null && k.address ? /* @__PURE__ */ f("span", { className: "type-meta ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
752
+ /* @__PURE__ */ t(
753
+ te,
754
+ {
755
+ "aria-hidden": "true",
756
+ className: "ds:size-3.5 ds:shrink-0"
757
+ }
758
+ ),
759
+ e.location.address
760
+ ] }) : null
761
+ ] }),
762
+ e.rating && e.rating.count > 0 ? /* @__PURE__ */ t(
763
+ ke,
764
+ {
765
+ value: e.rating.value,
766
+ reviews: { count: e.rating.count },
767
+ size: "md"
768
+ }
769
+ ) : null
770
+ ] }),
771
+ g ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
772
+ p ? (e.languages ?? []).map((y) => /* @__PURE__ */ t(
773
+ D,
774
+ {
775
+ label: y.toUpperCase(),
776
+ variant: "info",
777
+ fill: "outline",
778
+ size: "sm",
779
+ leading: /* @__PURE__ */ t(Se, { "aria-hidden": "true" })
780
+ },
781
+ `lang-${y}`
782
+ )) : null,
783
+ u ? (e.insurances ?? []).map((y) => /* @__PURE__ */ t(
784
+ D,
785
+ {
786
+ label: y,
787
+ variant: "brand",
788
+ fill: "outline",
789
+ size: "sm",
790
+ leading: /* @__PURE__ */ t(Pe, { "aria-hidden": "true" })
791
+ },
792
+ `ins-${y}`
793
+ )) : null,
794
+ h ? /* @__PURE__ */ t(
795
+ D,
796
+ {
797
+ label: l("practiceResults.fearPatient.label"),
798
+ variant: "success",
799
+ fill: "outline",
800
+ size: "sm",
801
+ leading: /* @__PURE__ */ t(Ce, { "aria-hidden": "true" })
802
+ }
803
+ ) : null
804
+ ] }) : null,
805
+ e.nextAvailableSlot && r ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
806
+ /* @__PURE__ */ f("span", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
807
+ /* @__PURE__ */ t(
808
+ Ne,
809
+ {
810
+ "aria-hidden": "true",
811
+ className: "ds:size-4 ds:text-[var(--primary)]"
812
+ }
813
+ ),
814
+ l("practiceResults.nextSlot.summary", { time: r })
815
+ ] }),
816
+ /* @__PURE__ */ t(
817
+ G,
818
+ {
819
+ intent: "primary",
820
+ size: "sm",
821
+ asChild: !0,
822
+ onClick: (y) => {
823
+ y.stopPropagation();
824
+ },
825
+ children: /* @__PURE__ */ t(
826
+ "a",
827
+ {
828
+ href: e.nextAvailableSlot.bookingHref,
829
+ "data-component": "practice-result-next-slot-cta",
830
+ children: l("practiceResults.nextSlot.cta", { time: r })
831
+ }
832
+ )
833
+ }
834
+ )
835
+ ] }) : null,
836
+ /* @__PURE__ */ t("div", { className: "ds:mt-[var(--spacing-xs)] ds:flex ds:justify-end", children: /* @__PURE__ */ t(
837
+ G,
838
+ {
839
+ intent: "secondary",
840
+ size: "sm",
841
+ asChild: !0,
842
+ onClick: (y) => {
843
+ y.stopPropagation(), s();
844
+ },
845
+ children: /* @__PURE__ */ t("a", { href: e.href, "data-component": "practice-result-open-cta", children: m })
846
+ }
847
+ ) })
848
+ ] })
849
+ ]
850
+ }
851
+ )
852
+ );
853
+ }
854
+ function pe({
855
+ results: e,
856
+ highlightedId: n,
857
+ onCardHover: a,
858
+ onCardSelect: o,
859
+ onCardOpenClick: i,
860
+ openLabel: s,
861
+ formatNextSlot: d,
862
+ onLoadMore: m,
863
+ loadingMore: l,
864
+ loadingSkeletons: b,
865
+ density: r = "compact",
866
+ apiKey: p,
867
+ consentGranted: u = !1,
868
+ containerRef: h
869
+ }) {
870
+ const { t: g } = N(), c = M(null);
871
+ return J(() => {
872
+ if (!m) return;
873
+ const x = c.current;
874
+ if (!x || typeof IntersectionObserver > "u") return;
875
+ const R = new IntersectionObserver(
876
+ (P) => {
877
+ for (const k of P)
878
+ k.isIntersecting && ($("serp_load_more", {
879
+ currentCount: e.length
880
+ }), m());
881
+ },
882
+ { root: null, rootMargin: "200px" }
883
+ );
884
+ return R.observe(x), () => R.disconnect();
885
+ }, [m, e.length]), b ? /* @__PURE__ */ t(
886
+ "div",
887
+ {
888
+ role: "status",
889
+ "aria-live": "polite",
890
+ "aria-label": g("practiceResults.loading"),
891
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
892
+ children: Array.from({ length: 4 }).map((x, R) => /* @__PURE__ */ t(
893
+ Qe,
894
+ {
895
+ variant: "rounded",
896
+ height: r === "rich" ? "11rem" : "7rem"
897
+ },
898
+ `pr-skel-${R}`
899
+ ))
900
+ }
901
+ ) : /* @__PURE__ */ f(
902
+ "div",
903
+ {
904
+ ref: h,
905
+ "data-component": "practice-results-list",
906
+ role: "list",
907
+ "aria-label": g("practiceResults.list.label"),
908
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:overflow-y-auto",
909
+ children: [
910
+ e.map((x) => /* @__PURE__ */ t("div", { role: "listitem", children: r === "rich" ? /* @__PURE__ */ t(
911
+ gt,
912
+ {
913
+ result: x,
914
+ apiKey: p,
915
+ consentGranted: u,
916
+ highlighted: n === x.id,
917
+ onSelect: () => o(x.id),
918
+ onOpenClick: () => i(x.id),
919
+ onHover: () => a(x.id),
920
+ openLabel: s
921
+ }
922
+ ) : /* @__PURE__ */ t(
923
+ ht,
924
+ {
925
+ result: x,
926
+ highlighted: n === x.id,
927
+ onSelect: () => o(x.id),
928
+ onOpenClick: () => i(x.id),
929
+ onHover: () => a(x.id),
930
+ openLabel: s,
931
+ nextSlotText: d(x)
932
+ }
933
+ ) }, x.id)),
934
+ m ? /* @__PURE__ */ t(
935
+ "div",
936
+ {
937
+ ref: c,
938
+ "aria-hidden": "true",
939
+ className: "ds:flex ds:items-center ds:justify-center ds:py-[var(--spacing-md)]",
940
+ children: l ? /* @__PURE__ */ t(Je, { size: "md", variant: "pulse" }) : /* @__PURE__ */ t("span", { className: "ds:size-1" })
941
+ }
942
+ ) : null
943
+ ]
944
+ }
945
+ );
946
+ }
947
+ function de({
948
+ results: e,
949
+ searchCentre: n,
950
+ zoom: a,
951
+ apiKey: o,
952
+ highlightedId: i,
953
+ onPinClick: s,
954
+ onPinHover: d,
955
+ onPinFirstInteract: m,
956
+ onBoundsChange: l,
957
+ consentGranted: b,
958
+ onConsentRequest: r,
959
+ mapHandleRef: p
960
+ }) {
961
+ const { t: u } = N(), h = O(
962
+ () => e.filter(
963
+ (c) => !!c.location
964
+ ).map((c) => ({
965
+ id: c.id,
966
+ position: {
967
+ lat: c.location.lat,
968
+ lng: c.location.lng
969
+ },
970
+ label: c.name
971
+ })),
972
+ [e]
973
+ ), g = O(() => {
974
+ if (n) return n;
975
+ const c = xe(e);
976
+ return c ? {
977
+ lat: (c.north + c.south) / 2,
978
+ lng: (c.east + c.west) / 2
979
+ } : { lat: 45.4642, lng: 9.19 };
980
+ }, [e, n]);
981
+ return J(() => {
982
+ if (!l) return;
983
+ const c = xe(e);
984
+ c && (l(c), $("serp_map_panned", { bounds: c }));
985
+ }, [e, l]), /* @__PURE__ */ t(
986
+ "div",
987
+ {
988
+ "data-component": "practice-results-map-panel",
989
+ className: "ds:relative ds:flex ds:size-full ds:min-h-[24rem] ds:flex-col",
990
+ children: /* @__PURE__ */ t(
991
+ Ze,
992
+ {
993
+ ref: p,
994
+ apiKey: o ?? "",
995
+ center: g,
996
+ zoom: a,
997
+ markers: h,
998
+ selectedMarkerId: i,
999
+ consentGranted: !!b,
1000
+ onConsentRequest: r,
1001
+ onMarkerClick: (c) => {
1002
+ c != null && (d(c), m(c), s(c));
1003
+ },
1004
+ ariaLabel: u("practiceResults.map.label"),
1005
+ size: "lg",
1006
+ surface: "bordered",
1007
+ className: "ds:size-full"
1008
+ }
1009
+ )
1010
+ }
1011
+ );
1012
+ }
1013
+ function Te({
1014
+ variantBodyProps: e
1015
+ }) {
1016
+ const { facets: n, value: a, onChange: o, heading: i, intro: s, totalCount: d, searchCentre: m } = e;
1017
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1018
+ /* @__PURE__ */ t(
1019
+ ze,
1020
+ {
1021
+ heading: i,
1022
+ intro: s,
1023
+ totalCount: d,
1024
+ searchCentreLabel: m == null ? void 0 : m.label
1025
+ }
1026
+ ),
1027
+ n.length > 0 ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1028
+ /* @__PURE__ */ t(
1029
+ Me,
1030
+ {
1031
+ facets: n,
1032
+ value: a.facets,
1033
+ onChange: (l) => o({ ...a, facets: l })
1034
+ }
1035
+ ),
1036
+ /* @__PURE__ */ t(
1037
+ ce,
1038
+ {
1039
+ value: a.sort ?? "relevance",
1040
+ onChange: (l) => o({ ...a, sort: l })
1041
+ }
1042
+ )
1043
+ ] }) : /* @__PURE__ */ t("div", { className: "ds:flex ds:justify-end", children: /* @__PURE__ */ t(
1044
+ ce,
1045
+ {
1046
+ value: a.sort ?? "relevance",
1047
+ onChange: (l) => o({ ...a, sort: l })
1048
+ }
1049
+ ) })
1050
+ ] });
1051
+ }
1052
+ function fe() {
1053
+ const { t: e } = N();
1054
+ return /* @__PURE__ */ t(
1055
+ qe,
1056
+ {
1057
+ variant: "no-results",
1058
+ title: e("practiceResults.empty.title"),
1059
+ description: e("practiceResults.empty.description")
1060
+ }
1061
+ );
1062
+ }
1063
+ function he({ onRetry: e }) {
1064
+ const { t: n } = N();
1065
+ return /* @__PURE__ */ f(Y, { variant: "error", children: [
1066
+ /* @__PURE__ */ t(Y.Title, { as: "h3", children: n("practiceResults.error.title") }),
1067
+ /* @__PURE__ */ t(Y.Description, { children: n("practiceResults.error.description") }),
1068
+ e ? /* @__PURE__ */ t(Y.Action, { children: /* @__PURE__ */ t(
1069
+ G,
1070
+ {
1071
+ intent: "secondary",
1072
+ size: "sm",
1073
+ startIcon: /* @__PURE__ */ t(Ye, { "aria-hidden": "true" }),
1074
+ onClick: e,
1075
+ children: n("practiceResults.error.retry")
1076
+ }
1077
+ ) }) : null
1078
+ ] });
1079
+ }
1080
+ function vt(e) {
1081
+ const {
1082
+ results: n,
1083
+ apiKey: a,
1084
+ zoom: o,
1085
+ searchCentre: i,
1086
+ onLoadMore: s,
1087
+ loadingMore: d,
1088
+ loadingSkeletons: m,
1089
+ emptyResultsSlot: l,
1090
+ errorSlot: b,
1091
+ error: r,
1092
+ onRetry: p,
1093
+ highlightedId: u,
1094
+ onCardHover: h,
1095
+ onPinClick: g,
1096
+ consentGranted: c,
1097
+ onConsentRequest: x,
1098
+ onBoundsChange: R,
1099
+ listContainerRef: P
1100
+ } = e, { t: k } = N(), [y, _] = ue(!1), T = r ? b ?? /* @__PURE__ */ t(he, { onRetry: p }) : n.length === 0 && !m ? l ?? /* @__PURE__ */ t(fe, {}) : /* @__PURE__ */ t(
1101
+ pe,
1102
+ {
1103
+ results: n,
1104
+ highlightedId: u,
1105
+ onCardHover: h,
1106
+ onCardSelect: e.onCardSelect,
1107
+ onCardOpenClick: e.onCardOpenClick,
1108
+ openLabel: e.openLabel,
1109
+ formatNextSlot: e.formatNextSlot,
1110
+ onLoadMore: s,
1111
+ loadingMore: d,
1112
+ loadingSkeletons: m,
1113
+ density: "compact",
1114
+ containerRef: P
1115
+ }
1116
+ );
1117
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1118
+ /* @__PURE__ */ t(Te, { variantBodyProps: e }),
1119
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:lg:grid ds:lg:grid-cols-[55%_45%] ds:lg:gap-[var(--spacing-lg)] ds:lg:items-start", children: [
1120
+ /* @__PURE__ */ t("div", { className: "ds:min-w-0 ds:lg:max-h-[40rem] ds:lg:overflow-hidden", children: T }),
1121
+ /* @__PURE__ */ t("div", { className: "ds:hidden ds:lg:block ds:sticky ds:top-[var(--spacing-md)] ds:h-[40rem]", children: /* @__PURE__ */ t(
1122
+ de,
1123
+ {
1124
+ results: n,
1125
+ searchCentre: i,
1126
+ zoom: o,
1127
+ apiKey: a,
1128
+ highlightedId: u,
1129
+ onPinClick: (z) => {
1130
+ W(n, z, "pin", e.onResultSelect), g(z);
1131
+ },
1132
+ onPinHover: h,
1133
+ onPinFirstInteract: e.onPinFirstInteract,
1134
+ onBoundsChange: R,
1135
+ consentGranted: c,
1136
+ onConsentRequest: x,
1137
+ mapHandleRef: e.mapHandleRef
1138
+ }
1139
+ ) })
1140
+ ] }),
1141
+ /* @__PURE__ */ t("div", { className: "ds:flex ds:lg:hidden ds:sticky ds:bottom-[var(--spacing-md)] ds:justify-center", children: /* @__PURE__ */ t(
1142
+ G,
1143
+ {
1144
+ intent: "primary",
1145
+ size: "md",
1146
+ startIcon: /* @__PURE__ */ t(nt, { "aria-hidden": "true" }),
1147
+ onClick: () => _(!0),
1148
+ children: k("practiceResults.viewMap")
1149
+ }
1150
+ ) }),
1151
+ /* @__PURE__ */ t(A.Root, { open: y, onOpenChange: _, children: /* @__PURE__ */ f(A.Content, { side: "bottom", size: "lg", children: [
1152
+ /* @__PURE__ */ t(A.Header, { children: /* @__PURE__ */ t(A.Title, { children: k("practiceResults.map.label") }) }),
1153
+ /* @__PURE__ */ f(A.Body, { children: [
1154
+ /* @__PURE__ */ t(A.Description, { className: "ds:sr-only", children: k("practiceResults.sheet.description") }),
1155
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1156
+ /* @__PURE__ */ t("div", { className: "ds:h-[20rem]", children: /* @__PURE__ */ t(
1157
+ de,
1158
+ {
1159
+ results: n,
1160
+ searchCentre: i,
1161
+ zoom: o,
1162
+ apiKey: a,
1163
+ highlightedId: u,
1164
+ onPinClick: (z) => {
1165
+ W(n, z, "pin", e.onResultSelect), g(z);
1166
+ },
1167
+ onPinHover: h,
1168
+ onPinFirstInteract: e.onPinFirstInteract,
1169
+ onBoundsChange: R,
1170
+ consentGranted: c,
1171
+ onConsentRequest: x,
1172
+ mapHandleRef: e.mapHandleRef
1173
+ }
1174
+ ) }),
1175
+ T
1176
+ ] })
1177
+ ] })
1178
+ ] }) })
1179
+ ] });
1180
+ }
1181
+ const bt = {
1182
+ peek: "sm",
1183
+ half: "md",
1184
+ full: "lg"
1185
+ }, E = [
1186
+ "peek",
1187
+ "half",
1188
+ "full"
1189
+ ];
1190
+ function xt({ value: e, onChange: n }) {
1191
+ const { t: a, i18n: o } = N(), i = o.dir() === "rtl", s = M(
1192
+ /* @__PURE__ */ new Map()
1193
+ ), d = K((l) => {
1194
+ var b;
1195
+ (b = s.current.get(l)) == null || b.focus();
1196
+ }, []), m = K(
1197
+ (l, b) => {
1198
+ const r = E.indexOf(b), p = E.length, u = i ? "ArrowLeft" : "ArrowRight", h = i ? "ArrowRight" : "ArrowLeft";
1199
+ let g = null;
1200
+ switch (l.key) {
1201
+ case u:
1202
+ case "ArrowDown":
1203
+ g = E[(r + 1) % p];
1204
+ break;
1205
+ case h:
1206
+ case "ArrowUp":
1207
+ g = E[(r - 1 + p) % p];
1208
+ break;
1209
+ case "Home":
1210
+ g = E[0];
1211
+ break;
1212
+ case "End":
1213
+ g = E[p - 1];
1214
+ break;
1215
+ default:
1216
+ return;
1217
+ }
1218
+ l.preventDefault(), g && g !== b && n(g), g && d(g);
1219
+ },
1220
+ [d, i, n]
1221
+ );
1222
+ return /* @__PURE__ */ t(
1223
+ "div",
1224
+ {
1225
+ role: "radiogroup",
1226
+ "aria-label": a("practiceResults.sheet.snap.label"),
1227
+ className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]",
1228
+ children: E.map((l) => {
1229
+ const b = e === l;
1230
+ return /* @__PURE__ */ t(
1231
+ "button",
1232
+ {
1233
+ ref: (r) => {
1234
+ r ? s.current.set(l, r) : s.current.delete(l);
1235
+ },
1236
+ type: "button",
1237
+ role: "radio",
1238
+ "aria-checked": b,
1239
+ "aria-label": a(`practiceResults.sheet.snap.${l}`),
1240
+ tabIndex: b ? 0 : -1,
1241
+ onClick: () => n(l),
1242
+ onKeyDown: (r) => m(r, l),
1243
+ className: ee({
1244
+ state: b ? "active" : "idle"
1245
+ }),
1246
+ children: a(`practiceResults.sheet.snap.${l}`)
1247
+ },
1248
+ l
1249
+ );
1250
+ })
1251
+ }
1252
+ );
1253
+ }
1254
+ function yt(e) {
1255
+ const {
1256
+ results: n,
1257
+ apiKey: a,
1258
+ zoom: o,
1259
+ searchCentre: i,
1260
+ onLoadMore: s,
1261
+ loadingMore: d,
1262
+ loadingSkeletons: m,
1263
+ emptyResultsSlot: l,
1264
+ errorSlot: b,
1265
+ error: r,
1266
+ onRetry: p,
1267
+ highlightedId: u,
1268
+ onCardHover: h,
1269
+ onPinClick: g,
1270
+ consentGranted: c,
1271
+ onConsentRequest: x,
1272
+ onBoundsChange: R,
1273
+ listContainerRef: P,
1274
+ facets: k,
1275
+ value: y,
1276
+ onChange: _
1277
+ } = e, { t: T } = N(), [z, B] = ue("half"), H = bt[z], U = We("(min-width: 1024px)"), j = r ? b ?? /* @__PURE__ */ t(he, { onRetry: p }) : n.length === 0 && !m ? l ?? /* @__PURE__ */ t(fe, {}) : /* @__PURE__ */ t(
1278
+ pe,
1279
+ {
1280
+ results: n,
1281
+ highlightedId: u,
1282
+ onCardHover: h,
1283
+ onCardSelect: e.onCardSelect,
1284
+ onCardOpenClick: e.onCardOpenClick,
1285
+ openLabel: e.openLabel,
1286
+ formatNextSlot: e.formatNextSlot,
1287
+ onLoadMore: s,
1288
+ loadingMore: d,
1289
+ loadingSkeletons: m,
1290
+ density: "compact",
1291
+ apiKey: a,
1292
+ consentGranted: c,
1293
+ containerRef: P
1294
+ }
1295
+ ), S = /* @__PURE__ */ t(
1296
+ de,
1297
+ {
1298
+ results: n,
1299
+ searchCentre: i,
1300
+ zoom: o,
1301
+ apiKey: a,
1302
+ highlightedId: u,
1303
+ onPinClick: (w) => {
1304
+ W(n, w, "pin", e.onResultSelect), g(w);
1305
+ },
1306
+ onPinHover: h,
1307
+ onPinFirstInteract: e.onPinFirstInteract,
1308
+ onBoundsChange: R,
1309
+ consentGranted: c,
1310
+ onConsentRequest: x,
1311
+ mapHandleRef: e.mapHandleRef
1312
+ }
1313
+ ), Z = k.length > 0 ? /* @__PURE__ */ t("div", { className: "ds:absolute ds:start-[var(--spacing-md)] ds:top-[var(--spacing-md)] ds:max-w-[calc(100%-var(--spacing-lg))]", children: /* @__PURE__ */ t(
1314
+ Me,
1315
+ {
1316
+ facets: k,
1317
+ value: y.facets,
1318
+ onChange: (w) => _({ ...y, facets: w }),
1319
+ floating: !0
1320
+ }
1321
+ ) }) : null;
1322
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1323
+ /* @__PURE__ */ t(
1324
+ ze,
1325
+ {
1326
+ heading: e.heading,
1327
+ intro: e.intro,
1328
+ totalCount: e.totalCount,
1329
+ searchCentreLabel: i == null ? void 0 : i.label
1330
+ }
1331
+ ),
1332
+ U ? (
1333
+ // Desktop: 65/35 map left + scrollable card rail right. NO Sheet
1334
+ // (the Sheet would portal to body and occlude the desktop
1335
+ // layout regardless of the parent's `lg:hidden` class).
1336
+ /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-[65%_35%] ds:gap-[var(--spacing-lg)] ds:items-start", children: [
1337
+ /* @__PURE__ */ f("div", { className: "ds:relative ds:h-[40rem]", children: [
1338
+ S,
1339
+ Z
1340
+ ] }),
1341
+ /* @__PURE__ */ t("div", { className: "ds:min-w-0 ds:max-h-[40rem] ds:overflow-y-auto", children: j })
1342
+ ] })
1343
+ ) : (
1344
+ // Mobile: full-bleed map + persistent bottom sheet defaulting to
1345
+ // 'half' state. No X close button — the sheet is core to the
1346
+ // layout, not dismissible. Patient cycles peek / half / full
1347
+ // via the snap radiogroup at the top of the sheet body.
1348
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1349
+ /* @__PURE__ */ f("div", { className: "ds:relative ds:h-[60vh] ds:min-h-[20rem]", children: [
1350
+ S,
1351
+ Z
1352
+ ] }),
1353
+ /* @__PURE__ */ t(A.Root, { open: !0, children: /* @__PURE__ */ t(
1354
+ A.Content,
1355
+ {
1356
+ side: "bottom",
1357
+ size: H,
1358
+ onEscapeKeyDown: (w) => w.preventDefault(),
1359
+ onPointerDownOutside: (w) => w.preventDefault(),
1360
+ onInteractOutside: (w) => w.preventDefault(),
1361
+ children: /* @__PURE__ */ f(A.Body, { children: [
1362
+ /* @__PURE__ */ t(A.Description, { className: "ds:sr-only", children: T("practiceResults.sheet.descriptionMapFirst") }),
1363
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:items-start ds:justify-between ds:gap-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]", children: [
1364
+ /* @__PURE__ */ t(A.Title, { className: "type-title-card ds:m-0 ds:text-[var(--foreground)]", children: T("practiceResults.sheet.title", {
1365
+ count: e.totalCount ?? n.length
1366
+ }) }),
1367
+ /* @__PURE__ */ t(
1368
+ xt,
1369
+ {
1370
+ value: z,
1371
+ onChange: B
1372
+ }
1373
+ )
1374
+ ] }),
1375
+ /* @__PURE__ */ t("div", { className: "ds:pb-[var(--spacing-sm)]", children: /* @__PURE__ */ t(
1376
+ ce,
1377
+ {
1378
+ value: y.sort ?? "relevance",
1379
+ onChange: (w) => _({ ...y, sort: w })
1380
+ }
1381
+ ) }),
1382
+ j
1383
+ ] })
1384
+ }
1385
+ ) })
1386
+ ] })
1387
+ )
1388
+ ] });
1389
+ }
1390
+ function Rt(e) {
1391
+ const {
1392
+ results: n,
1393
+ apiKey: a,
1394
+ onLoadMore: o,
1395
+ loadingMore: i,
1396
+ loadingSkeletons: s,
1397
+ emptyResultsSlot: d,
1398
+ errorSlot: m,
1399
+ error: l,
1400
+ onRetry: b,
1401
+ highlightedId: r,
1402
+ onCardHover: p,
1403
+ consentGranted: u,
1404
+ listContainerRef: h
1405
+ } = e, g = l ? m ?? /* @__PURE__ */ t(he, { onRetry: b }) : n.length === 0 && !s ? d ?? /* @__PURE__ */ t(fe, {}) : /* @__PURE__ */ t(
1406
+ pe,
1407
+ {
1408
+ results: n,
1409
+ highlightedId: r,
1410
+ onCardHover: p,
1411
+ onCardSelect: e.onCardSelect,
1412
+ onCardOpenClick: e.onCardOpenClick,
1413
+ openLabel: e.openLabel,
1414
+ formatNextSlot: e.formatNextSlot,
1415
+ onLoadMore: o,
1416
+ loadingMore: i,
1417
+ loadingSkeletons: s,
1418
+ density: "rich",
1419
+ apiKey: a,
1420
+ consentGranted: u,
1421
+ containerRef: h
1422
+ }
1423
+ );
1424
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1425
+ /* @__PURE__ */ t(Te, { variantBodyProps: e }),
1426
+ g
1427
+ ] });
1428
+ }
1429
+ const kt = Ue(function({
1430
+ variant: n = "split-list-map",
1431
+ results: a,
1432
+ totalCount: o,
1433
+ searchCentre: i,
1434
+ facets: s,
1435
+ googleMapsApiKey: d,
1436
+ defaultZoom: m = it,
1437
+ onBoundsChange: l,
1438
+ consentGranted: b,
1439
+ onConsentRequest: r,
1440
+ onLoadMore: p,
1441
+ loadingMore: u,
1442
+ value: h,
1443
+ onChange: g,
1444
+ onResultSelect: c,
1445
+ loading: x,
1446
+ emptyResultsSlot: R,
1447
+ errorSlot: P,
1448
+ error: k,
1449
+ onRetry: y,
1450
+ heading: _,
1451
+ intro: T,
1452
+ cardOpenButtonLabel: z,
1453
+ "aria-label": B,
1454
+ id: H,
1455
+ className: U,
1456
+ ...j
1457
+ }, S) {
1458
+ const { t: Z, i18n: w } = N(), [Ie, Q] = ue(null), X = M(/* @__PURE__ */ new Set()), ne = M(/* @__PURE__ */ new Set()), $e = M(null), ae = M(null), se = O(
1459
+ () => ({
1460
+ getVariant: () => n,
1461
+ scrollToResult: (v) => {
1462
+ const I = ae.current;
1463
+ if (!I) return;
1464
+ const C = I.querySelector(
1465
+ `[data-component="practice-result-card"][data-result-id="${CSS.escape(v)}"]`
1466
+ );
1467
+ C && (C.scrollIntoView({ behavior: "smooth", block: "nearest" }), Q(v));
1468
+ },
1469
+ focusPin: (v) => {
1470
+ Q(v);
1471
+ }
1472
+ }),
1473
+ [n]
1474
+ );
1475
+ Ge(S, () => se, [se]), Xe(st, se, H);
1476
+ const Fe = z ?? Z("practiceResults.card.open"), De = K(
1477
+ (v) => {
1478
+ if (v.nextAvailableSlot)
1479
+ try {
1480
+ return new Intl.DateTimeFormat(w.language, {
1481
+ weekday: "short",
1482
+ hour: "numeric",
1483
+ minute: "numeric"
1484
+ }).format(new Date(v.nextAvailableSlot.dateTime));
1485
+ } catch {
1486
+ return v.nextAvailableSlot.dateTime;
1487
+ }
1488
+ },
1489
+ [w.language]
1490
+ ), ge = M(null);
1491
+ J(() => {
1492
+ ge.current !== n && (ge.current = n, $("serp_variant_exposed", {
1493
+ variant: n,
1494
+ totalCount: o ?? a.length
1495
+ }), X.current = /* @__PURE__ */ new Set(), ne.current = /* @__PURE__ */ new Set());
1496
+ }, [n]);
1497
+ const ie = M(!1), re = O(() => s ?? [], [s]), le = h.sort ?? (i ? "distance" : "relevance"), L = O(() => {
1498
+ const v = ot(a, h.facets, re);
1499
+ return ct(v, le, i);
1500
+ }, [a, h.facets, re, le, i]);
1501
+ J(() => {
1502
+ const v = L.length === 0;
1503
+ v && !ie.current ? ($("serp_empty_results", {
1504
+ appliedFacets: h.facets ?? {}
1505
+ }), ie.current = !0) : v || (ie.current = !1);
1506
+ }, [L.length, h.facets]);
1507
+ const V = M(null), ve = M(null);
1508
+ J(
1509
+ () => () => {
1510
+ V.current && clearTimeout(V.current);
1511
+ },
1512
+ []
1513
+ );
1514
+ const Oe = K((v) => {
1515
+ Q(v), !X.current.has(v) && (ve.current === v && V.current || (V.current && clearTimeout(V.current), ve.current = v, V.current = setTimeout(() => {
1516
+ X.current.has(v) || (X.current.add(v), $("serp_result_hovered_card", { resultId: v })), V.current = null;
1517
+ }, 500)));
1518
+ }, []), He = K((v) => {
1519
+ Q(v);
1520
+ const I = ae.current;
1521
+ if (!I) return;
1522
+ const C = I.querySelector(
1523
+ `[data-component="practice-result-card"][data-result-id="${CSS.escape(v)}"]`
1524
+ );
1525
+ C == null || C.scrollIntoView({ behavior: "smooth", block: "nearest" });
1526
+ }, []), Le = K((v) => {
1527
+ ne.current.has(v) || (ne.current.add(v), $("serp_result_hovered_pin", { resultId: v }));
1528
+ }, []), be = M(null), Ke = K(
1529
+ (v) => {
1530
+ Q(v);
1531
+ const I = L.find((C) => C.id === v);
1532
+ if (I) {
1533
+ if (I.location) {
1534
+ const C = be.current;
1535
+ C == null || C.panTo({
1536
+ lat: I.location.lat,
1537
+ lng: I.location.lng
1538
+ }), C == null || C.setZoom(16);
1539
+ }
1540
+ W(L, v, "card", c);
1541
+ }
1542
+ },
1543
+ [L, c]
1544
+ ), je = K(
1545
+ (v) => {
1546
+ W(
1547
+ L,
1548
+ v,
1549
+ "open-button",
1550
+ c
1551
+ );
1552
+ },
1553
+ [L, c]
1554
+ ), Ve = !!x && a.length === 0, oe = {
1555
+ results: L,
1556
+ totalCount: o,
1557
+ searchCentre: i,
1558
+ facets: re,
1559
+ value: { ...h, sort: le },
1560
+ onChange: g,
1561
+ onResultSelect: c,
1562
+ onLoadMore: p,
1563
+ loadingMore: u,
1564
+ apiKey: d,
1565
+ zoom: m,
1566
+ consentGranted: b,
1567
+ onConsentRequest: r,
1568
+ onBoundsChange: l,
1569
+ loadingSkeletons: Ve,
1570
+ emptyResultsSlot: R,
1571
+ errorSlot: P,
1572
+ error: k,
1573
+ onRetry: y,
1574
+ heading: _,
1575
+ intro: T,
1576
+ highlightedId: Ie,
1577
+ onCardHover: Oe,
1578
+ onPinClick: He,
1579
+ onPinFirstInteract: Le,
1580
+ onCardSelect: Ke,
1581
+ onCardOpenClick: je,
1582
+ openLabel: Fe,
1583
+ formatNextSlot: De,
1584
+ listContainerRef: $e,
1585
+ mapHandleRef: be
1586
+ }, Ee = (() => {
1587
+ switch (n) {
1588
+ case "map-first":
1589
+ return /* @__PURE__ */ t(yt, { ...oe });
1590
+ case "rich-cards":
1591
+ return /* @__PURE__ */ t(Rt, { ...oe });
1592
+ case "split-list-map":
1593
+ default:
1594
+ return /* @__PURE__ */ t(vt, { ...oe });
1595
+ }
1596
+ })(), Be = B ?? Z("practiceResults.regionLabel");
1597
+ return /* @__PURE__ */ t(
1598
+ "div",
1599
+ {
1600
+ ref: ae,
1601
+ role: "region",
1602
+ "aria-label": Be,
1603
+ id: H,
1604
+ "data-component": "practice-results",
1605
+ "data-component-id": H,
1606
+ "data-variant": n,
1607
+ className: dt({ variant: n, className: U }),
1608
+ ...j,
1609
+ children: Ee
1610
+ }
1611
+ );
1612
+ });
1613
+ kt.displayName = "PracticeResults";
1614
+ export {
1615
+ kt as P,
1616
+ st as p
1617
+ };
1618
+ //# sourceMappingURL=practice-results-JQunxBIg.js.map