@alfadocs/ui-kit 1.53.0 → 1.54.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 (712) hide show
  1. package/dist/_chunks/{Alfadocs_Logo_Mark-7o3L3WBI.js → Alfadocs_Logo_Mark-Z_b6ZI1g.js} +22 -9
  2. package/dist/_chunks/{actions-cell-renderer-DhmUGzRY.js → actions-cell-renderer-CjzSqMgn.js} +3 -3
  3. package/dist/_chunks/{address-autocomplete-Bp816Mb1.js → address-autocomplete-BBZ0u_U1.js} +99 -98
  4. package/dist/_chunks/address-fields-1pD-8hML.js +292 -0
  5. package/dist/_chunks/{agenda-tray-C2a8OfKC.js → agenda-tray-B8vuZKjH.js} +3 -3
  6. package/dist/_chunks/{ai-credits-notice-Da0fJPXO.js → ai-credits-notice-D9_qP2xc.js} +2 -2
  7. package/dist/_chunks/{ai-permission-notice-C5q_uHBA.js → ai-permission-notice-Cr6o1f0f.js} +3 -3
  8. package/dist/_chunks/{ai-prompt-input-IObcUWqB.js → ai-prompt-input-DkL8W-nt.js} +3 -3
  9. package/dist/_chunks/{alia-sidebar-DyQMsyiz.js → alia-sidebar-DSUQ2RpK.js} +6 -6
  10. package/dist/_chunks/{anamnesis-card-D4RWzQXP.js → anamnesis-card-BT1tMt5O.js} +2 -2
  11. package/dist/_chunks/{anamnesis-summary-rows-CnHxtht-.js → anamnesis-summary-rows-BMjSBqhS.js} +19 -19
  12. package/dist/_chunks/{appointment-peek-DpPzeYXm.js → appointment-peek-Cbrg36wj.js} +3 -3
  13. package/dist/_chunks/{appointment-timeline-By-EwmJU.js → appointment-timeline-CssAJLpL.js} +4 -4
  14. package/dist/_chunks/{appointment-tray-7Z3A3Xz9.js → appointment-tray-EQUjllVy.js} +3 -3
  15. package/dist/_chunks/{audio-recorder-BafA28cX.js → audio-recorder-BM68r6fe.js} +3 -3
  16. package/dist/_chunks/auth-form-parts-Celi-TLV.js +85 -0
  17. package/dist/_chunks/{autocomplete-IfLaXwyb.js → autocomplete-BXm1rnT0.js} +229 -220
  18. package/dist/_chunks/{balance-badge-cell-BtiFfFRY.js → balance-badge-cell-BDX1Krdv.js} +5 -5
  19. package/dist/_chunks/{bishop-score-BfDsm9HH.js → bishop-score-CGAVpIWL.js} +3 -3
  20. package/dist/_chunks/{bmi-calculator-BNtmMzQy.js → bmi-calculator-g_wjo4nq.js} +5 -5
  21. package/dist/_chunks/booking-BN7TXe27.js +3720 -0
  22. package/dist/_chunks/{button-group-DnSR6eN6.js → button-group-CpEycMps.js} +2 -2
  23. package/dist/_chunks/{calendar-workspace-LDuzo_Ie.js → calendar-workspace-BbZIx2PT.js} +32 -32
  24. package/dist/_chunks/{care-plan-card-BanlKJZn.js → care-plan-card-BqI-_B4T.js} +3 -3
  25. package/dist/_chunks/{care-plan-entry-card-ByqT84_P.js → care-plan-entry-card-CbsZmfQM.js} +2 -2
  26. package/dist/_chunks/{care-plan-header-BwfUHMgM.js → care-plan-header-BIS4CGcp.js} +3 -3
  27. package/dist/_chunks/{carousel.agent-WKODAYVw.js → carousel.agent-DW9iPLdy.js} +2 -2
  28. package/dist/_chunks/{chart-D37VAIa-.js → chart-C134Ibwm.js} +3 -3
  29. package/dist/_chunks/{chat-input-DA10w969.js → chat-input-Bg99kcl3.js} +2 -2
  30. package/dist/_chunks/{chat-message-DoMjMa-M.js → chat-message-D4rvLoIJ.js} +2 -2
  31. package/dist/_chunks/{checkbox-CZkipDn7.js → checkbox--ndmyokr.js} +19 -15
  32. package/dist/_chunks/{checkbox-group-C7czpHmJ.js → checkbox-group-B0oZHNT3.js} +2 -2
  33. package/dist/_chunks/{city-input-CAnTVgBZ.js → city-input-DyxVWSRQ.js} +10 -9
  34. package/dist/_chunks/{clinical-note-card-kvlUrmP-.js → clinical-note-card-gmWXEwSu.js} +2 -2
  35. package/dist/_chunks/{code-block-NtHjtagI.js → code-block-CRVa-Thh.js} +2 -2
  36. package/dist/_chunks/{color-picker-Yl99lHuF.js → color-picker-Bu0wM8xv.js} +50 -50
  37. package/dist/_chunks/combobox-DppVSuUm.js +614 -0
  38. package/dist/_chunks/{connection-status-Dz8o-Fui.js → connection-status-BwTnjnUj.js} +2 -2
  39. package/dist/_chunks/{contact-card-D2gXrxlL.js → contact-card-CIVCcicP.js} +2 -2
  40. package/dist/_chunks/{contact-profile-card-B7cXr8g5.js → contact-profile-card-B-HzocbB.js} +47 -49
  41. package/dist/_chunks/{control-room-rail-B446rHSL.js → control-room-rail-g4vNSPFi.js} +3 -3
  42. package/dist/_chunks/{country-select-BYa4BrEi.js → country-select-r3QC7cVA.js} +139 -113
  43. package/dist/_chunks/{cycle-calculator-D_5f9VSN.js → cycle-calculator-CwDEdmda.js} +4 -4
  44. package/dist/_chunks/{dashboard-grid-DWNP02Ff.js → dashboard-grid--rkojX6m.js} +2 -2
  45. package/dist/_chunks/{data-table-CiVyhNXx.js → data-table-DeUoJzNn.js} +8 -8
  46. package/dist/_chunks/{data-table-tabs-Dc6zvoI_.js → data-table-tabs-BfEmXvUk.js} +4 -4
  47. package/dist/_chunks/{date-picker-p9yz3pxc.js → date-picker-BnhBmcH6.js} +31 -31
  48. package/dist/_chunks/{date-range-picker-DIy8gNY0.js → date-range-picker-Dg050N1d.js} +65 -65
  49. package/dist/_chunks/{date-time-picker-C3UVzqOm.js → date-time-picker-Ckl6ezCL.js} +50 -49
  50. package/dist/_chunks/{description-list-9rchqp5q.js → description-list-BKQMUiXv.js} +2 -2
  51. package/dist/_chunks/dev-bypass-button-Y1s7gPSD.js +33 -0
  52. package/dist/_chunks/dev-bypass-button.agent-BJqFSTqE.js +17 -0
  53. package/dist/_chunks/{document-preview-VXOQZZvy.js → document-preview-C_6R_VZK.js} +4 -4
  54. package/dist/_chunks/{document-scanner-T5jHiraQ.js → document-scanner-pADVX447.js} +2 -2
  55. package/dist/_chunks/{due-date-calculator-iJXm6HOj.js → due-date-calculator-_0Dz_d7n.js} +6 -6
  56. package/dist/_chunks/{editable-currency-cell-renderer-DdMHme5y.js → editable-currency-cell-renderer-CfFp_1hI.js} +3 -3
  57. package/dist/_chunks/{editable-description-Cy3AZ5K2.js → editable-description-CCrAEJMq.js} +2 -2
  58. package/dist/_chunks/{editor-overlay-C0awV6ba.js → editor-overlay-CWV0chPV.js} +2 -2
  59. package/dist/_chunks/{email-input-ebdovOmh.js → email-input-Cmeo4zdT.js} +88 -86
  60. package/dist/_chunks/{empty-state-C62P_6kr.js → empty-state-CgvmPPvW.js} +44 -50
  61. package/dist/_chunks/{entity-summary-oW3_jFhU.js → entity-summary-C3E4JKVr.js} +3 -3
  62. package/dist/_chunks/{error-boundary-Cvs23EzK.js → error-boundary-Bzjk9Q2l.js} +2 -2
  63. package/dist/_chunks/error-page-CKFJlekz.js +275 -0
  64. package/dist/_chunks/error-page-illustration-QGJAvuFB.js +459 -0
  65. package/dist/_chunks/{face-scheme-Dg7KcbW2.js → face-scheme-pZgT26gB.js} +8 -8
  66. package/dist/_chunks/{fetal-weight-BoIkl2t1.js → fetal-weight-CbE61Uyk.js} +3 -3
  67. package/dist/_chunks/{field-array-BF2nCmvt.js → field-array-DGiIHCdy.js} +2 -2
  68. package/dist/_chunks/{file-manager-BfG3usGk.js → file-manager-DdsAd4TQ.js} +8 -8
  69. package/dist/_chunks/{file-upload-OMlGHz70.js → file-upload-CxjCs7TX.js} +46 -46
  70. package/dist/_chunks/{fiscal-code-input-CuuE8_dt.js → fiscal-code-input-DNA_SbQx.js} +69 -69
  71. package/dist/_chunks/forgot-password-form-DVVOBEGj.js +203 -0
  72. package/dist/_chunks/form-field-D9WfDpYB.js +165 -0
  73. package/dist/_chunks/form-field-context-DtiROUJV.js +36 -0
  74. package/dist/_chunks/{freemium-paywall-BhxKSEJD.js → freemium-paywall-CtUCj-ND.js} +2 -2
  75. package/dist/_chunks/{gestational-age-calculator-CjZ7v-8x.js → gestational-age-calculator-BMkoLJGR.js} +7 -7
  76. package/dist/_chunks/{hcg-doubling-BYMogA0e.js → hcg-doubling-BtW2pBJX.js} +4 -4
  77. package/dist/_chunks/{header-CzJbtTGQ.js → header--a4ZTiM5.js} +6 -3
  78. package/dist/_chunks/{header-settings-BqdBe4zk.js → header-settings-kkVm9VP3.js} +3 -3
  79. package/dist/_chunks/{help-me-write-templates-DcR-e_90.js → help-me-write-templates-Cy-iO5AU.js} +8 -8
  80. package/dist/_chunks/{hover-card-DEMPFs9M.js → hover-card-CcRSI4gy.js} +2 -2
  81. package/dist/_chunks/{iban-input-D88HRGZo.js → iban-input-CpOUMMR-.js} +35 -35
  82. package/dist/_chunks/{icon-button-group-DHRz90jY.js → icon-button-group-BsQkbCX4.js} +2 -2
  83. package/dist/_chunks/{icon-button-JAXAkqWC.js → icon-button-mKIvw90h.js} +31 -30
  84. package/dist/_chunks/{icon-picker-C5Fhx1-3.js → icon-picker-CSViTQL9.js} +3 -3
  85. package/dist/_chunks/{info-tip-DfmEvyAF.js → info-tip-Czh1izZ6.js} +2 -2
  86. package/dist/_chunks/is-development-CLUAnsU7.js +11 -0
  87. package/dist/_chunks/{key-value-pair-DZH8ESsc.js → key-value-pair-BkXjt88Z.js} +2 -2
  88. package/dist/_chunks/{kit-extensions-CF5mDF_Z.js → kit-extensions-Kca1tkfP.js} +6 -6
  89. package/dist/_chunks/{link-BlVUIKk1.js → link-2HokYuIi.js} +19 -18
  90. package/dist/_chunks/{link-cell-renderer-DvcbSHyp.js → link-cell-renderer-D-xv2HMS.js} +7 -7
  91. package/dist/_chunks/{locale-picker-DYDppQdZ.js → locale-picker-BhNIgeXA.js} +3 -3
  92. package/dist/_chunks/log-in-OQUEoGhX.js +16 -0
  93. package/dist/_chunks/login-dev-card-C7wo-Hv1.js +275 -0
  94. package/dist/_chunks/{logo-1FuSGx0n.js → logo-CuaqxTGK.js} +128 -77
  95. package/dist/_chunks/mark-pieces-m_rn1mAc.js +46 -0
  96. package/dist/_chunks/{marketplace-app-shell-rd1bSSm4.js → marketplace-app-shell-DbEfoNxe.js} +6 -6
  97. package/dist/_chunks/{message-card-Dub3790J.js → message-card-C1buKlzM.js} +2 -2
  98. package/dist/_chunks/{message-tray-CTd6CsnG.js → message-tray-DyBVqlGj.js} +3 -3
  99. package/dist/_chunks/{multi-select-Bx0_cgPI.js → multi-select-CVb6PJOK.js} +87 -85
  100. package/dist/_chunks/{muscle-scheme-X2bdmsQt.js → muscle-scheme-DfYQ0Z3v.js} +2 -2
  101. package/dist/_chunks/{nav-grid-BnY0Ilet.js → nav-grid-BPbmzHY0.js} +2 -2
  102. package/dist/_chunks/{note-attachment-CpPRIfSn.js → note-attachment-I1NLoeRZ.js} +2 -2
  103. package/dist/_chunks/{note-timeline-CZUmobcn.js → note-timeline-CsY8YOE7.js} +2 -2
  104. package/dist/_chunks/{notes-panel-CPfxz-1j.js → notes-panel-BPb-2ZnJ.js} +6 -6
  105. package/dist/_chunks/{notification-card-B39g86vM.js → notification-card-DubeUbVJ.js} +2 -2
  106. package/dist/_chunks/{notification-tray-WsP7c1jf.js → notification-tray-DJ0gtfu6.js} +3 -3
  107. package/dist/_chunks/{number-input-BLrx3utH.js → number-input-DRDRYZJg.js} +41 -41
  108. package/dist/_chunks/{optical-prescription-x--Rpmmx.js → optical-prescription-DBvebioV.js} +5 -5
  109. package/dist/_chunks/{otp-input-Dz8WMg4F.js → otp-input-BedEqmIV.js} +47 -45
  110. package/dist/_chunks/{panel-subview-DAY-ToM3.js → panel-subview-D8HGXaUa.js} +2 -2
  111. package/dist/_chunks/password-input-B7pQTk7l.js +447 -0
  112. package/dist/_chunks/{patient-details-BSAMAd3I.js → patient-details-BP9r_lNS.js} +3 -3
  113. package/dist/_chunks/{patient-field-row-dUF2cW2G.js → patient-field-row-BK9JjbzA.js} +19 -19
  114. package/dist/_chunks/{patient-search-CXl0FNfN.js → patient-search-Dm3w0jWw.js} +3 -3
  115. package/dist/_chunks/{patient-summary-card-DF-Mxcma.js → patient-summary-card-DGbRLzF1.js} +6 -6
  116. package/dist/_chunks/{payment-form-DxsjXYHJ.js → payment-form-B08gHZIY.js} +327 -295
  117. package/dist/_chunks/{payment-request-card-BFsmHLtf.js → payment-request-card-CR7SjsRs.js} +4 -4
  118. package/dist/_chunks/{pdf-viewer-hzfM5pZf.js → pdf-viewer-zv7pkUPA.js} +2 -2
  119. package/dist/_chunks/{periodontal-chart-Bvii6uOg.js → periodontal-chart-5nLsSuRM.js} +2 -2
  120. package/dist/_chunks/{periodontal-chart-card-DTbvFQO7.js → periodontal-chart-card-Djr3en8Q.js} +2 -2
  121. package/dist/_chunks/{periodontal-diagnosis-BqEo0usu.js → periodontal-diagnosis-DmVIqXtC.js} +4 -4
  122. package/dist/_chunks/{permission-matrix-DHKECaNW.js → permission-matrix-DuTkUHxe.js} +3 -3
  123. package/dist/_chunks/{phone-input-opMMHkyh.js → phone-input-BzeUr49H.js} +253 -204
  124. package/dist/_chunks/{popover-CGYPYIVi.js → popover-9_v-7fJc.js} +2 -2
  125. package/dist/_chunks/{postal-code-input-Dv02t5MD.js → postal-code-input-BmbqjkfD.js} +71 -71
  126. package/dist/_chunks/{practice-results-B9uV0TT8.js → practice-results-D3liWOz1.js} +4 -4
  127. package/dist/_chunks/{pregnancy-dating-CcPxK3S3.js → pregnancy-dating-DV3o2PPl.js} +8 -8
  128. package/dist/_chunks/{pregnancy-weight-gain-tGbbravi.js → pregnancy-weight-gain-BLjWgtS9.js} +5 -5
  129. package/dist/_chunks/{privacy-lock-Bh4O7Y7g.js → privacy-lock-KDPKiTpH.js} +3 -3
  130. package/dist/_chunks/{privacy-mask-CK-9sxeI.js → privacy-mask-H8yYwgIb.js} +2 -2
  131. package/dist/_chunks/{product-hub-panel-D87kbz5j.js → product-hub-panel-M5X3TYzq.js} +4 -4
  132. package/dist/_chunks/{province-select-BZtM0RSR.js → province-select-DtF2ukoC.js} +92 -79
  133. package/dist/_chunks/{public-footer.agent-CVYmHY94.js → public-footer-Bfs81Qzp.js} +188 -219
  134. package/dist/_chunks/public-footer.agent-CRZCrq3_.js +37 -0
  135. package/dist/_chunks/{public-header.agent-1mcrQqIM.js → public-header.agent-CrXkGtTF.js} +3 -3
  136. package/dist/_chunks/{qr-code-C3m9o7om.js → qr-code-Ofx7ryyu.js} +2 -2
  137. package/dist/_chunks/{radio-6fml-pWk.js → radio-BBbMdbE_.js} +15 -11
  138. package/dist/_chunks/{radio-group-CIjmyioi.js → radio-group-BT97ty7o.js} +2 -2
  139. package/dist/_chunks/{radiograph-panel.agent-BWBaxJ8e.js → radiograph-panel.agent-C4j6eoQn.js} +8 -8
  140. package/dist/_chunks/recaptcha-widget-CsvwlYTE.js +234 -0
  141. package/dist/_chunks/registration-form-CBDeXzlk.js +748 -0
  142. package/dist/_chunks/{reviews-panel-DUgqU-Wr.js → reviews-panel-CyxZ0VmZ.js} +3 -3
  143. package/dist/_chunks/{rich-text-editor-C7N4Cem6.js → rich-text-editor-CCCSEPlG.js} +13 -13
  144. package/dist/_chunks/safe-href-5dbsfbQn.js +22 -0
  145. package/dist/_chunks/{search-bar-Blq_QeSe.js → search-bar-D695TCDH.js} +2 -2
  146. package/dist/_chunks/{search-input-DfsAu3P2.js → search-input-Tl-RkS5x.js} +31 -31
  147. package/dist/_chunks/{select-Br88h070.js → select-DHPmASkG.js} +293 -228
  148. package/dist/_chunks/{sheet-BE6oi30q.js → sheet-BTgxkDJS.js} +2 -2
  149. package/dist/_chunks/{sign-document-Buw-zC_7.js → sign-document-B_3U-S6g.js} +2 -2
  150. package/dist/_chunks/{sign-in-with-alfadocs-button-Bd4VPGQh.js → sign-in-with-alfadocs-button-DFmgQuDo.js} +3 -3
  151. package/dist/_chunks/{signature-field-DBIGiY-J.js → signature-field-DLDznGnB.js} +2 -2
  152. package/dist/_chunks/{signature-request-DqZkn-iB.js → signature-request-BdolmJk4.js} +6 -6
  153. package/dist/_chunks/signed-out-frame-dz1rLJ65.js +171 -0
  154. package/dist/_chunks/{slider-BRq2lL-l.js → slider-pZ95bEm7.js} +50 -50
  155. package/dist/_chunks/{slot-grid-kq7bDdrx.js → slot-grid-kCDoV3k4.js} +3 -3
  156. package/dist/_chunks/{social-sign-in-button-Bb2UQpsA.js → social-sign-in-button-BMGNlUWs.js} +2 -2
  157. package/dist/_chunks/spinner-a0FTYX9Q.js +211 -0
  158. package/dist/_chunks/{streaming-text-D0IJeRBg.js → streaming-text-BAPn_sZs.js} +2 -2
  159. package/dist/_chunks/{switch-DXGD2Drz.js → switch-D--x7n6h.js} +29 -29
  160. package/dist/_chunks/{tabs-DLXVEDsa.js → tabs-yIY-RySP.js} +2 -2
  161. package/dist/_chunks/{task-card-Cfl08MCS.js → task-card-C02Km4Gb.js} +2 -2
  162. package/dist/_chunks/{task-editor-CxF-sBnu.js → task-editor-Dl27rI3J.js} +15 -15
  163. package/dist/_chunks/{task-tray-rAGslT2C.js → task-tray-By6DPwbT.js} +4 -4
  164. package/dist/_chunks/{tasks-panel-Dkm8SnmV.js → tasks-panel-BkN9sROF.js} +7 -7
  165. package/dist/_chunks/{text-area-Cjtw7mna.js → text-area-CDuItrvL.js} +23 -23
  166. package/dist/_chunks/{text-input-CLaItY93.js → text-input-lZ2-t-p2.js} +37 -37
  167. package/dist/_chunks/{theme-toggle-Byg0x2vB.js → theme-toggle-BAHz3itd.js} +4 -4
  168. package/dist/_chunks/{time-picker-BG7G3ujX.js → time-picker-DKKmpFh3.js} +28 -28
  169. package/dist/_chunks/{toast-6wbpghjF.js → toast-UMUvXFsA.js} +2 -2
  170. package/dist/_chunks/{tool-rail-CXcLzxPb.js → tool-rail-CwXN-sDC.js} +2 -2
  171. package/dist/_chunks/{tooth-scheme-BLbwUVer.js → tooth-scheme-BAMhwCZe.js} +3 -3
  172. package/dist/_chunks/{transcript-panel-Dve7bsm7.js → transcript-panel-CLgtyVbR.js} +2 -2
  173. package/dist/_chunks/{unit-converter-D8WnJbZm.js → unit-converter-CXNr5P4J.js} +4 -4
  174. package/dist/_chunks/{use-appointment-details-read-W6h4oTHx.js → use-appointment-details-read-BEbLseXW.js} +13 -13
  175. package/dist/_chunks/use-field-match-pdbEnKvO.js +28 -0
  176. package/dist/_chunks/use-password-requirements-C8DdwPEy.js +69 -0
  177. package/dist/_chunks/use-prism-DaspP8w-.js +55 -0
  178. package/dist/_chunks/use-registration-submit-DxCWic5_.js +141 -0
  179. package/dist/_chunks/{wallet-pay-button-C-GFl7RO.js → wallet-pay-button-Dew8Pmgq.js} +2 -2
  180. package/dist/_chunks/{warning-stack-CzKSeB5v.js → warning-stack-B_v_qMBI.js} +2 -2
  181. package/dist/_chunks/{widget-picker-b5NCHxFe.js → widget-picker-BCbwD5Z1.js} +2 -2
  182. package/dist/_chunks/{workflow-map-C1OjRhM3.js → workflow-map-PzamnfJK.js} +4 -4
  183. package/dist/agent-catalog.json +289 -103
  184. package/dist/agent-i18n/en.json +29 -8
  185. package/dist/brand/logo-asset/Alfadocs_Logo_Main.d.ts +2 -1
  186. package/dist/brand/logo-asset/Alfadocs_Logo_Mark.d.ts +2 -1
  187. package/dist/brand/logo-asset/Alfadocs_Logo_Neg.d.ts +2 -1
  188. package/dist/brand/logo-asset/index.d.ts +1 -0
  189. package/dist/brand/logo-asset/mark-piece.d.ts +10 -0
  190. package/dist/components/_shared/safe-href.d.ts +21 -0
  191. package/dist/components/address-autocomplete/index.js +1 -1
  192. package/dist/components/address-fields/address-fields.d.ts +7 -0
  193. package/dist/components/address-fields/index.js +1 -1
  194. package/dist/components/agenda-tray/index.js +1 -1
  195. package/dist/components/ai-credits-notice/index.js +1 -1
  196. package/dist/components/ai-permission-notice/index.js +1 -1
  197. package/dist/components/ai-prompt-input/index.js +1 -1
  198. package/dist/components/anamnesis-card/index.js +1 -1
  199. package/dist/components/appointment-card/index.js +1 -1
  200. package/dist/components/appointment-details-panel/index.js +1 -1
  201. package/dist/components/appointment-peek/index.js +1 -1
  202. package/dist/components/appointment-timeline/index.js +1 -1
  203. package/dist/components/audio-recorder/index.js +1 -1
  204. package/dist/components/autocomplete/autocomplete.d.ts +7 -0
  205. package/dist/components/autocomplete/index.js +1 -1
  206. package/dist/components/bishop-score/index.js +1 -1
  207. package/dist/components/bmi-calculator/index.js +1 -1
  208. package/dist/components/booking/booking-types.d.ts +71 -2
  209. package/dist/components/booking/booking.d.ts +1 -1
  210. package/dist/components/booking/details-form.d.ts +5 -0
  211. package/dist/components/booking/index.d.ts +1 -1
  212. package/dist/components/booking/index.js +1 -1
  213. package/dist/components/button/index.js +1 -1
  214. package/dist/components/button-group/index.js +1 -1
  215. package/dist/components/care-plan-card/index.js +1 -1
  216. package/dist/components/care-plan-entry-card/index.js +1 -1
  217. package/dist/components/care-plan-header/index.js +1 -1
  218. package/dist/components/carousel/index.js +1 -1
  219. package/dist/components/chart/index.js +1 -1
  220. package/dist/components/chat-input/index.js +1 -1
  221. package/dist/components/chat-message/index.js +1 -1
  222. package/dist/components/checkbox/index.js +1 -1
  223. package/dist/components/checkbox-group/index.js +1 -1
  224. package/dist/components/city-input/city-input.d.ts +2 -5
  225. package/dist/components/city-input/index.js +1 -1
  226. package/dist/components/clinical-note-card/index.js +1 -1
  227. package/dist/components/color-picker/index.js +1 -1
  228. package/dist/components/combobox/combobox.d.ts +10 -4
  229. package/dist/components/combobox/index.js +1 -1
  230. package/dist/components/command-palette/command-palette.d.ts +1 -1
  231. package/dist/components/connection-status/index.js +1 -1
  232. package/dist/components/contact-card/index.js +1 -1
  233. package/dist/components/contact-profile-card/index.js +1 -1
  234. package/dist/components/control-room-rail/index.js +1 -1
  235. package/dist/components/country-select/country-select.d.ts +3 -4
  236. package/dist/components/country-select/index.js +1 -1
  237. package/dist/components/cycle-calculator/index.js +1 -1
  238. package/dist/components/dashboard-grid/index.js +1 -1
  239. package/dist/components/data-table/index.js +4 -4
  240. package/dist/components/data-table-tabs/index.js +1 -1
  241. package/dist/components/date-picker/index.js +1 -1
  242. package/dist/components/date-range-picker/index.js +1 -1
  243. package/dist/components/date-time-picker/index.js +1 -1
  244. package/dist/components/description-list/index.js +1 -1
  245. package/dist/components/dev-bypass-button/dev-bypass-button.agent.d.ts +3 -0
  246. package/dist/components/dev-bypass-button/dev-bypass-button.d.ts +18 -0
  247. package/dist/components/dev-bypass-button/index.d.ts +4 -0
  248. package/dist/components/dev-bypass-button/index.js +7 -0
  249. package/dist/components/document-preview/index.js +1 -1
  250. package/dist/components/document-scanner/index.js +1 -1
  251. package/dist/components/due-date-calculator/index.js +1 -1
  252. package/dist/components/editable-description/index.js +1 -1
  253. package/dist/components/editor-overlay/index.js +1 -1
  254. package/dist/components/email-input/email-input.d.ts +13 -4
  255. package/dist/components/email-input/index.js +1 -1
  256. package/dist/components/empty-state/index.js +1 -1
  257. package/dist/components/entity-summary/index.js +1 -1
  258. package/dist/components/error-boundary/index.js +1 -1
  259. package/dist/components/face-scheme/index.js +1 -1
  260. package/dist/components/fetal-weight/index.js +1 -1
  261. package/dist/components/field-array/index.js +1 -1
  262. package/dist/components/file-manager/index.js +1 -1
  263. package/dist/components/file-upload/index.js +1 -1
  264. package/dist/components/fiscal-code-input/index.js +1 -1
  265. package/dist/components/form-field/form-field-context.d.ts +20 -0
  266. package/dist/components/form-field/index.d.ts +1 -1
  267. package/dist/components/form-field/index.js +7 -5
  268. package/dist/components/freemium-paywall/index.js +1 -1
  269. package/dist/components/gestational-age-calculator/index.js +1 -1
  270. package/dist/components/hcg-doubling/index.js +1 -1
  271. package/dist/components/header/index.js +1 -1
  272. package/dist/components/header-settings/index.js +1 -1
  273. package/dist/components/hover-card/index.js +1 -1
  274. package/dist/components/iban-input/index.js +1 -1
  275. package/dist/components/icon-button/index.js +1 -1
  276. package/dist/components/icon-button-group/index.js +1 -1
  277. package/dist/components/icon-picker/index.js +1 -1
  278. package/dist/components/index.d.ts +7 -2
  279. package/dist/components/info-tip/index.js +1 -1
  280. package/dist/components/key-value-pair/index.js +1 -1
  281. package/dist/components/link/index.js +1 -1
  282. package/dist/components/locale-picker/index.js +1 -1
  283. package/dist/components/logo/index.js +1 -1
  284. package/dist/components/logo/logo.d.ts +15 -0
  285. package/dist/components/message-card/index.js +1 -1
  286. package/dist/components/message-tray/index.js +1 -1
  287. package/dist/components/multi-select/index.js +1 -1
  288. package/dist/components/muscle-scheme/index.js +1 -1
  289. package/dist/components/nav-grid/index.js +1 -1
  290. package/dist/components/note-timeline/index.js +1 -1
  291. package/dist/components/notes-panel/index.js +1 -1
  292. package/dist/components/notification-card/index.js +1 -1
  293. package/dist/components/notification-tray/index.js +1 -1
  294. package/dist/components/number-input/index.js +1 -1
  295. package/dist/components/optical-prescription/index.js +1 -1
  296. package/dist/components/otp-input/index.js +1 -1
  297. package/dist/components/panel-subview/index.js +1 -1
  298. package/dist/components/password-input/index.js +3 -2
  299. package/dist/components/password-input/password-input.d.ts +6 -3
  300. package/dist/components/password-input/use-password-requirements.d.ts +9 -0
  301. package/dist/components/patient-details/index.js +1 -1
  302. package/dist/components/patient-search/index.js +1 -1
  303. package/dist/components/patient-summary-card/index.js +1 -1
  304. package/dist/components/patient-table/index.js +1 -1
  305. package/dist/components/payment-card/index.js +1 -1
  306. package/dist/components/payment-form/index.js +1 -1
  307. package/dist/components/payment-form/payment-form.d.ts +8 -0
  308. package/dist/components/pdf-viewer/index.js +1 -1
  309. package/dist/components/periodontal-chart/index.js +1 -1
  310. package/dist/components/periodontal-chart-card/index.js +1 -1
  311. package/dist/components/periodontal-diagnosis/index.js +1 -1
  312. package/dist/components/permission-matrix/index.js +1 -1
  313. package/dist/components/phone-input/index.js +1 -1
  314. package/dist/components/phone-input/phone-input.d.ts +13 -0
  315. package/dist/components/popover/index.js +1 -1
  316. package/dist/components/postal-code-input/index.js +1 -1
  317. package/dist/components/postal-code-input/postal-code-input.d.ts +3 -2
  318. package/dist/components/practice-results/index.js +1 -1
  319. package/dist/components/pregnancy-dating/index.js +1 -1
  320. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  321. package/dist/components/privacy-lock/index.js +1 -1
  322. package/dist/components/product-hub-tray/index.js +1 -1
  323. package/dist/components/province-select/index.js +1 -1
  324. package/dist/components/province-select/province-select.d.ts +3 -2
  325. package/dist/components/public-footer/index.js +6 -5
  326. package/dist/components/public-footer/public-footer.d.ts +8 -0
  327. package/dist/components/public-header/index.js +1 -1
  328. package/dist/components/qr-code/index.js +1 -1
  329. package/dist/components/radio/index.js +1 -1
  330. package/dist/components/radio-group/index.js +2 -2
  331. package/dist/components/radiograph-panel/index.js +1 -1
  332. package/dist/components/recaptcha-widget/index.js +1 -1
  333. package/dist/components/recaptcha-widget/recaptcha-widget.d.ts +13 -1
  334. package/dist/components/reviews-panel/index.js +1 -1
  335. package/dist/components/rich-text-editor/index.js +2 -2
  336. package/dist/components/search-bar/index.js +1 -1
  337. package/dist/components/search-input/index.js +1 -1
  338. package/dist/components/select/index.js +1 -1
  339. package/dist/components/select/select.d.ts +6 -2
  340. package/dist/components/sheet/index.js +1 -1
  341. package/dist/components/sign-document/index.js +1 -1
  342. package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
  343. package/dist/components/signature-field/index.js +1 -1
  344. package/dist/components/skeleton-scheme/index.js +1 -1
  345. package/dist/components/slider/index.js +1 -1
  346. package/dist/components/slot-grid/index.js +1 -1
  347. package/dist/components/social-sign-in-button/index.js +1 -1
  348. package/dist/components/spinner/index.js +1 -1
  349. package/dist/components/spinner/spinner.d.ts +1 -1
  350. package/dist/components/streaming-text/index.js +1 -1
  351. package/dist/components/switch/index.js +1 -1
  352. package/dist/components/tabs/index.js +1 -1
  353. package/dist/components/task-card/index.js +1 -1
  354. package/dist/components/task-editor/index.js +1 -1
  355. package/dist/components/task-tray/index.js +1 -1
  356. package/dist/components/tasks-panel/index.js +1 -1
  357. package/dist/components/text-area/index.js +1 -1
  358. package/dist/components/text-input/index.js +1 -1
  359. package/dist/components/theme-toggle/index.js +1 -1
  360. package/dist/components/time-picker/index.js +1 -1
  361. package/dist/components/toast/index.js +1 -1
  362. package/dist/components/tool-rail/index.js +1 -1
  363. package/dist/components/tooth-scheme/index.js +1 -1
  364. package/dist/components/transcript-panel/index.js +1 -1
  365. package/dist/components/unit-converter/index.js +1 -1
  366. package/dist/components/wallet-pay-button/index.js +1 -1
  367. package/dist/components/warning-stack/index.js +1 -1
  368. package/dist/components/widget-picker/index.js +1 -1
  369. package/dist/components/workflow/index.js +1 -1
  370. package/dist/error-pages/400.ar.html +1 -1
  371. package/dist/error-pages/400.de.html +1 -1
  372. package/dist/error-pages/400.el.html +1 -1
  373. package/dist/error-pages/400.en.html +1 -1
  374. package/dist/error-pages/400.es.html +1 -1
  375. package/dist/error-pages/400.fr.html +1 -1
  376. package/dist/error-pages/400.hi.html +1 -1
  377. package/dist/error-pages/400.html +1 -1
  378. package/dist/error-pages/400.it.html +1 -1
  379. package/dist/error-pages/400.ja.html +1 -1
  380. package/dist/error-pages/400.nl.html +1 -1
  381. package/dist/error-pages/400.pl.html +1 -1
  382. package/dist/error-pages/400.pt.html +1 -1
  383. package/dist/error-pages/400.ro.html +1 -1
  384. package/dist/error-pages/400.ru.html +1 -1
  385. package/dist/error-pages/400.sq.html +1 -1
  386. package/dist/error-pages/400.sv.html +1 -1
  387. package/dist/error-pages/400.tr.html +1 -1
  388. package/dist/error-pages/400.zh.html +1 -1
  389. package/dist/error-pages/401.ar.html +1 -1
  390. package/dist/error-pages/401.de.html +1 -1
  391. package/dist/error-pages/401.el.html +1 -1
  392. package/dist/error-pages/401.en.html +1 -1
  393. package/dist/error-pages/401.es.html +1 -1
  394. package/dist/error-pages/401.fr.html +1 -1
  395. package/dist/error-pages/401.hi.html +1 -1
  396. package/dist/error-pages/401.html +1 -1
  397. package/dist/error-pages/401.it.html +1 -1
  398. package/dist/error-pages/401.ja.html +1 -1
  399. package/dist/error-pages/401.nl.html +1 -1
  400. package/dist/error-pages/401.pl.html +1 -1
  401. package/dist/error-pages/401.pt.html +1 -1
  402. package/dist/error-pages/401.ro.html +1 -1
  403. package/dist/error-pages/401.ru.html +1 -1
  404. package/dist/error-pages/401.sq.html +1 -1
  405. package/dist/error-pages/401.sv.html +1 -1
  406. package/dist/error-pages/401.tr.html +1 -1
  407. package/dist/error-pages/401.zh.html +1 -1
  408. package/dist/error-pages/403.ar.html +1 -1
  409. package/dist/error-pages/403.de.html +1 -1
  410. package/dist/error-pages/403.el.html +1 -1
  411. package/dist/error-pages/403.en.html +1 -1
  412. package/dist/error-pages/403.es.html +1 -1
  413. package/dist/error-pages/403.fr.html +1 -1
  414. package/dist/error-pages/403.hi.html +1 -1
  415. package/dist/error-pages/403.html +1 -1
  416. package/dist/error-pages/403.it.html +1 -1
  417. package/dist/error-pages/403.ja.html +1 -1
  418. package/dist/error-pages/403.nl.html +1 -1
  419. package/dist/error-pages/403.pl.html +1 -1
  420. package/dist/error-pages/403.pt.html +1 -1
  421. package/dist/error-pages/403.ro.html +1 -1
  422. package/dist/error-pages/403.ru.html +1 -1
  423. package/dist/error-pages/403.sq.html +1 -1
  424. package/dist/error-pages/403.sv.html +1 -1
  425. package/dist/error-pages/403.tr.html +1 -1
  426. package/dist/error-pages/403.zh.html +1 -1
  427. package/dist/error-pages/404.ar.html +1 -1
  428. package/dist/error-pages/404.de.html +1 -1
  429. package/dist/error-pages/404.el.html +1 -1
  430. package/dist/error-pages/404.en.html +1 -1
  431. package/dist/error-pages/404.es.html +1 -1
  432. package/dist/error-pages/404.fr.html +1 -1
  433. package/dist/error-pages/404.hi.html +1 -1
  434. package/dist/error-pages/404.html +1 -1
  435. package/dist/error-pages/404.it.html +1 -1
  436. package/dist/error-pages/404.ja.html +1 -1
  437. package/dist/error-pages/404.nl.html +1 -1
  438. package/dist/error-pages/404.pl.html +1 -1
  439. package/dist/error-pages/404.pt.html +1 -1
  440. package/dist/error-pages/404.ro.html +1 -1
  441. package/dist/error-pages/404.ru.html +1 -1
  442. package/dist/error-pages/404.sq.html +1 -1
  443. package/dist/error-pages/404.sv.html +1 -1
  444. package/dist/error-pages/404.tr.html +1 -1
  445. package/dist/error-pages/404.zh.html +1 -1
  446. package/dist/error-pages/405.ar.html +1 -1
  447. package/dist/error-pages/405.de.html +1 -1
  448. package/dist/error-pages/405.el.html +1 -1
  449. package/dist/error-pages/405.en.html +1 -1
  450. package/dist/error-pages/405.es.html +1 -1
  451. package/dist/error-pages/405.fr.html +1 -1
  452. package/dist/error-pages/405.hi.html +1 -1
  453. package/dist/error-pages/405.html +1 -1
  454. package/dist/error-pages/405.it.html +1 -1
  455. package/dist/error-pages/405.ja.html +1 -1
  456. package/dist/error-pages/405.nl.html +1 -1
  457. package/dist/error-pages/405.pl.html +1 -1
  458. package/dist/error-pages/405.pt.html +1 -1
  459. package/dist/error-pages/405.ro.html +1 -1
  460. package/dist/error-pages/405.ru.html +1 -1
  461. package/dist/error-pages/405.sq.html +1 -1
  462. package/dist/error-pages/405.sv.html +1 -1
  463. package/dist/error-pages/405.tr.html +1 -1
  464. package/dist/error-pages/405.zh.html +1 -1
  465. package/dist/error-pages/410.ar.html +1 -1
  466. package/dist/error-pages/410.de.html +1 -1
  467. package/dist/error-pages/410.el.html +1 -1
  468. package/dist/error-pages/410.en.html +1 -1
  469. package/dist/error-pages/410.es.html +1 -1
  470. package/dist/error-pages/410.fr.html +1 -1
  471. package/dist/error-pages/410.hi.html +1 -1
  472. package/dist/error-pages/410.html +1 -1
  473. package/dist/error-pages/410.it.html +1 -1
  474. package/dist/error-pages/410.ja.html +1 -1
  475. package/dist/error-pages/410.nl.html +1 -1
  476. package/dist/error-pages/410.pl.html +1 -1
  477. package/dist/error-pages/410.pt.html +1 -1
  478. package/dist/error-pages/410.ro.html +1 -1
  479. package/dist/error-pages/410.ru.html +1 -1
  480. package/dist/error-pages/410.sq.html +1 -1
  481. package/dist/error-pages/410.sv.html +1 -1
  482. package/dist/error-pages/410.tr.html +1 -1
  483. package/dist/error-pages/410.zh.html +1 -1
  484. package/dist/error-pages/419.ar.html +1 -1
  485. package/dist/error-pages/419.de.html +1 -1
  486. package/dist/error-pages/419.el.html +1 -1
  487. package/dist/error-pages/419.en.html +1 -1
  488. package/dist/error-pages/419.es.html +1 -1
  489. package/dist/error-pages/419.fr.html +1 -1
  490. package/dist/error-pages/419.hi.html +1 -1
  491. package/dist/error-pages/419.html +1 -1
  492. package/dist/error-pages/419.it.html +1 -1
  493. package/dist/error-pages/419.ja.html +1 -1
  494. package/dist/error-pages/419.nl.html +1 -1
  495. package/dist/error-pages/419.pl.html +1 -1
  496. package/dist/error-pages/419.pt.html +1 -1
  497. package/dist/error-pages/419.ro.html +1 -1
  498. package/dist/error-pages/419.ru.html +1 -1
  499. package/dist/error-pages/419.sq.html +1 -1
  500. package/dist/error-pages/419.sv.html +1 -1
  501. package/dist/error-pages/419.tr.html +1 -1
  502. package/dist/error-pages/419.zh.html +1 -1
  503. package/dist/error-pages/429.ar.html +1 -1
  504. package/dist/error-pages/429.de.html +1 -1
  505. package/dist/error-pages/429.el.html +1 -1
  506. package/dist/error-pages/429.en.html +1 -1
  507. package/dist/error-pages/429.es.html +1 -1
  508. package/dist/error-pages/429.fr.html +1 -1
  509. package/dist/error-pages/429.hi.html +1 -1
  510. package/dist/error-pages/429.html +1 -1
  511. package/dist/error-pages/429.it.html +1 -1
  512. package/dist/error-pages/429.ja.html +1 -1
  513. package/dist/error-pages/429.nl.html +1 -1
  514. package/dist/error-pages/429.pl.html +1 -1
  515. package/dist/error-pages/429.pt.html +1 -1
  516. package/dist/error-pages/429.ro.html +1 -1
  517. package/dist/error-pages/429.ru.html +1 -1
  518. package/dist/error-pages/429.sq.html +1 -1
  519. package/dist/error-pages/429.sv.html +1 -1
  520. package/dist/error-pages/429.tr.html +1 -1
  521. package/dist/error-pages/429.zh.html +1 -1
  522. package/dist/error-pages/500.ar.html +1 -1
  523. package/dist/error-pages/500.de.html +1 -1
  524. package/dist/error-pages/500.el.html +1 -1
  525. package/dist/error-pages/500.en.html +1 -1
  526. package/dist/error-pages/500.es.html +1 -1
  527. package/dist/error-pages/500.fr.html +1 -1
  528. package/dist/error-pages/500.hi.html +1 -1
  529. package/dist/error-pages/500.html +1 -1
  530. package/dist/error-pages/500.it.html +1 -1
  531. package/dist/error-pages/500.ja.html +1 -1
  532. package/dist/error-pages/500.nl.html +1 -1
  533. package/dist/error-pages/500.pl.html +1 -1
  534. package/dist/error-pages/500.pt.html +1 -1
  535. package/dist/error-pages/500.ro.html +1 -1
  536. package/dist/error-pages/500.ru.html +1 -1
  537. package/dist/error-pages/500.sq.html +1 -1
  538. package/dist/error-pages/500.sv.html +1 -1
  539. package/dist/error-pages/500.tr.html +1 -1
  540. package/dist/error-pages/500.zh.html +1 -1
  541. package/dist/error-pages/502.ar.html +1 -1
  542. package/dist/error-pages/502.de.html +1 -1
  543. package/dist/error-pages/502.el.html +1 -1
  544. package/dist/error-pages/502.en.html +1 -1
  545. package/dist/error-pages/502.es.html +1 -1
  546. package/dist/error-pages/502.fr.html +1 -1
  547. package/dist/error-pages/502.hi.html +1 -1
  548. package/dist/error-pages/502.html +1 -1
  549. package/dist/error-pages/502.it.html +1 -1
  550. package/dist/error-pages/502.ja.html +1 -1
  551. package/dist/error-pages/502.nl.html +1 -1
  552. package/dist/error-pages/502.pl.html +1 -1
  553. package/dist/error-pages/502.pt.html +1 -1
  554. package/dist/error-pages/502.ro.html +1 -1
  555. package/dist/error-pages/502.ru.html +1 -1
  556. package/dist/error-pages/502.sq.html +1 -1
  557. package/dist/error-pages/502.sv.html +1 -1
  558. package/dist/error-pages/502.tr.html +1 -1
  559. package/dist/error-pages/502.zh.html +1 -1
  560. package/dist/error-pages/503.ar.html +1 -1
  561. package/dist/error-pages/503.de.html +1 -1
  562. package/dist/error-pages/503.el.html +1 -1
  563. package/dist/error-pages/503.en.html +1 -1
  564. package/dist/error-pages/503.es.html +1 -1
  565. package/dist/error-pages/503.fr.html +1 -1
  566. package/dist/error-pages/503.hi.html +1 -1
  567. package/dist/error-pages/503.html +1 -1
  568. package/dist/error-pages/503.it.html +1 -1
  569. package/dist/error-pages/503.ja.html +1 -1
  570. package/dist/error-pages/503.nl.html +1 -1
  571. package/dist/error-pages/503.pl.html +1 -1
  572. package/dist/error-pages/503.pt.html +1 -1
  573. package/dist/error-pages/503.ro.html +1 -1
  574. package/dist/error-pages/503.ru.html +1 -1
  575. package/dist/error-pages/503.sq.html +1 -1
  576. package/dist/error-pages/503.sv.html +1 -1
  577. package/dist/error-pages/503.tr.html +1 -1
  578. package/dist/error-pages/503.zh.html +1 -1
  579. package/dist/error-pages/504.ar.html +1 -1
  580. package/dist/error-pages/504.de.html +1 -1
  581. package/dist/error-pages/504.el.html +1 -1
  582. package/dist/error-pages/504.en.html +1 -1
  583. package/dist/error-pages/504.es.html +1 -1
  584. package/dist/error-pages/504.fr.html +1 -1
  585. package/dist/error-pages/504.hi.html +1 -1
  586. package/dist/error-pages/504.html +1 -1
  587. package/dist/error-pages/504.it.html +1 -1
  588. package/dist/error-pages/504.ja.html +1 -1
  589. package/dist/error-pages/504.nl.html +1 -1
  590. package/dist/error-pages/504.pl.html +1 -1
  591. package/dist/error-pages/504.pt.html +1 -1
  592. package/dist/error-pages/504.ro.html +1 -1
  593. package/dist/error-pages/504.ru.html +1 -1
  594. package/dist/error-pages/504.sq.html +1 -1
  595. package/dist/error-pages/504.sv.html +1 -1
  596. package/dist/error-pages/504.tr.html +1 -1
  597. package/dist/error-pages/504.zh.html +1 -1
  598. package/dist/error-pages/maintenance.ar.html +1 -1
  599. package/dist/error-pages/maintenance.de.html +1 -1
  600. package/dist/error-pages/maintenance.el.html +1 -1
  601. package/dist/error-pages/maintenance.en.html +1 -1
  602. package/dist/error-pages/maintenance.es.html +1 -1
  603. package/dist/error-pages/maintenance.fr.html +1 -1
  604. package/dist/error-pages/maintenance.hi.html +1 -1
  605. package/dist/error-pages/maintenance.html +1 -1
  606. package/dist/error-pages/maintenance.it.html +1 -1
  607. package/dist/error-pages/maintenance.ja.html +1 -1
  608. package/dist/error-pages/maintenance.nl.html +1 -1
  609. package/dist/error-pages/maintenance.pl.html +1 -1
  610. package/dist/error-pages/maintenance.pt.html +1 -1
  611. package/dist/error-pages/maintenance.ro.html +1 -1
  612. package/dist/error-pages/maintenance.ru.html +1 -1
  613. package/dist/error-pages/maintenance.sq.html +1 -1
  614. package/dist/error-pages/maintenance.sv.html +1 -1
  615. package/dist/error-pages/maintenance.tr.html +1 -1
  616. package/dist/error-pages/maintenance.zh.html +1 -1
  617. package/dist/hooks/index.d.ts +2 -0
  618. package/dist/hooks/index.js +89 -79
  619. package/dist/hooks/use-field-match.d.ts +71 -0
  620. package/dist/hooks/use-prism.d.ts +85 -0
  621. package/dist/host-compat.css +4 -1
  622. package/dist/i18n/locales/ar.d.ts +51 -0
  623. package/dist/i18n/locales/ar.js +51 -0
  624. package/dist/i18n/locales/de.d.ts +51 -0
  625. package/dist/i18n/locales/de.js +51 -0
  626. package/dist/i18n/locales/el.d.ts +51 -0
  627. package/dist/i18n/locales/el.js +51 -0
  628. package/dist/i18n/locales/en.d.ts +51 -0
  629. package/dist/i18n/locales/en.js +51 -0
  630. package/dist/i18n/locales/es.d.ts +51 -0
  631. package/dist/i18n/locales/es.js +51 -0
  632. package/dist/i18n/locales/fr.d.ts +51 -0
  633. package/dist/i18n/locales/fr.js +51 -0
  634. package/dist/i18n/locales/hi.d.ts +51 -0
  635. package/dist/i18n/locales/hi.js +51 -0
  636. package/dist/i18n/locales/it.d.ts +51 -0
  637. package/dist/i18n/locales/it.js +51 -0
  638. package/dist/i18n/locales/ja.d.ts +51 -0
  639. package/dist/i18n/locales/ja.js +51 -0
  640. package/dist/i18n/locales/nl.d.ts +51 -0
  641. package/dist/i18n/locales/nl.js +51 -0
  642. package/dist/i18n/locales/pl.d.ts +51 -0
  643. package/dist/i18n/locales/pl.js +51 -0
  644. package/dist/i18n/locales/pt.d.ts +51 -0
  645. package/dist/i18n/locales/pt.js +51 -0
  646. package/dist/i18n/locales/ro.d.ts +51 -0
  647. package/dist/i18n/locales/ro.js +51 -0
  648. package/dist/i18n/locales/ru.d.ts +51 -0
  649. package/dist/i18n/locales/ru.js +51 -0
  650. package/dist/i18n/locales/sq.d.ts +51 -0
  651. package/dist/i18n/locales/sq.js +51 -0
  652. package/dist/i18n/locales/sv.d.ts +51 -0
  653. package/dist/i18n/locales/sv.js +51 -0
  654. package/dist/i18n/locales/tr.d.ts +51 -0
  655. package/dist/i18n/locales/tr.js +51 -0
  656. package/dist/i18n/locales/zh.d.ts +51 -0
  657. package/dist/i18n/locales/zh.js +51 -0
  658. package/dist/index.js +1170 -1145
  659. package/dist/locales/ar.json +51 -0
  660. package/dist/locales/de.json +51 -0
  661. package/dist/locales/el.json +51 -0
  662. package/dist/locales/en.json +51 -0
  663. package/dist/locales/es.json +51 -0
  664. package/dist/locales/fr.json +51 -0
  665. package/dist/locales/hi.json +51 -0
  666. package/dist/locales/it.json +51 -0
  667. package/dist/locales/ja.json +51 -0
  668. package/dist/locales/nl.json +51 -0
  669. package/dist/locales/pl.json +51 -0
  670. package/dist/locales/pt.json +51 -0
  671. package/dist/locales/ro.json +51 -0
  672. package/dist/locales/ru.json +51 -0
  673. package/dist/locales/sq.json +51 -0
  674. package/dist/locales/sv.json +51 -0
  675. package/dist/locales/tr.json +51 -0
  676. package/dist/locales/zh.json +51 -0
  677. package/dist/patterns/_shared/auth-form-parts.d.ts +55 -0
  678. package/dist/patterns/_shared/brand-mark.d.ts +15 -0
  679. package/dist/patterns/_shared/mark-pieces.d.ts +15 -0
  680. package/dist/patterns/alia-assistant/index.js +1 -1
  681. package/dist/patterns/anamnesis/index.js +1 -1
  682. package/dist/patterns/calendar/index.js +1 -1
  683. package/dist/patterns/error-page/index.js +1 -1
  684. package/dist/patterns/forgot-password-form/forgot-password-form.d.ts +105 -0
  685. package/dist/patterns/forgot-password-form/index.d.ts +3 -0
  686. package/dist/patterns/forgot-password-form/index.js +6 -0
  687. package/dist/patterns/help-me-write-templates/index.js +1 -1
  688. package/dist/patterns/login-form/index.d.ts +5 -0
  689. package/dist/patterns/login-form/index.js +7 -0
  690. package/dist/patterns/login-form/login-dev-card.d.ts +27 -0
  691. package/dist/patterns/login-form/login-form.d.ts +120 -0
  692. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  693. package/dist/patterns/registration-form/index.d.ts +3 -0
  694. package/dist/patterns/registration-form/index.js +6 -0
  695. package/dist/patterns/registration-form/registration-form.d.ts +217 -0
  696. package/dist/patterns/registration-form/use-registration-submit.d.ts +59 -0
  697. package/dist/patterns/signature-request/index.js +1 -1
  698. package/dist/patterns/signed-out-frame/index.d.ts +5 -0
  699. package/dist/patterns/signed-out-frame/index.js +6 -0
  700. package/dist/patterns/signed-out-frame/signed-out-frame.d.ts +27 -0
  701. package/dist/patterns/signed-out-frame/signed-out-header.d.ts +23 -0
  702. package/dist/tokens.css +1 -1
  703. package/package.json +21 -1
  704. package/dist/_chunks/address-fields-BIL6cvLS.js +0 -246
  705. package/dist/_chunks/booking-CFR7vU8X.js +0 -3474
  706. package/dist/_chunks/combobox-Iel8y3u6.js +0 -578
  707. package/dist/_chunks/error-page-BtxEOL6g.js +0 -780
  708. package/dist/_chunks/form-field-YUJl_U5l.js +0 -131
  709. package/dist/_chunks/form-field-context-B3APVHKx.js +0 -21
  710. package/dist/_chunks/recaptcha-widget-BNAeSTCo.js +0 -228
  711. package/dist/_chunks/spinner-DxjSZLD-.js +0 -220
  712. package/dist/_chunks/use-password-requirements-DK4hV1Ik.js +0 -453
@@ -0,0 +1,3720 @@
1
+ import { jsx as s, jsxs as v, Fragment as ne } from "react/jsx-runtime";
2
+ import { forwardRef as us, useId as Pt, useRef as E, useCallback as ue, useState as Q, useEffect as q, useMemo as R, Fragment as Ps, useImperativeHandle as Vs } from "react";
3
+ import { c as bt } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as G, Trans as $s } from "react-i18next";
5
+ import { u as qs } from "./registry-DvAUVLHh.js";
6
+ import { A as ee } from "./alert-BhCstf2h.js";
7
+ import { B as Xe } from "./button-CYPx2xFq.js";
8
+ import { C as rt } from "./checkbox--ndmyokr.js";
9
+ import { C as Ks } from "./checkbox-group-B0oZHNT3.js";
10
+ import { D as zs } from "./date-picker-BnhBmcH6.js";
11
+ import { E as js } from "./email-input-Cmeo4zdT.js";
12
+ import { F as Ue } from "./form-field-D9WfDpYB.js";
13
+ import { P as Us } from "./phone-input-BzeUr49H.js";
14
+ import { T as Gs } from "./text-area-CDuItrvL.js";
15
+ import { T as Dt } from "./text-input-lZ2-t-p2.js";
16
+ import { A as Hs } from "./address-fields-1pD-8hML.js";
17
+ import { S as ps } from "./spinner-a0FTYX9Q.js";
18
+ import { a as yt } from "./format-price-DAbh61Lz.js";
19
+ import { C as Js } from "./credit-card-D9XZsHGA.js";
20
+ import { B as ms } from "./badge-hnBt8o7n.js";
21
+ import { I as ns } from "./icon-button-mKIvw90h.js";
22
+ import { S as Vt } from "./select-DHPmASkG.js";
23
+ import { C as Yt } from "./combobox-DppVSuUm.js";
24
+ import { M as Zt } from "./multi-select-CVb6PJOK.js";
25
+ import { S as Et } from "./skeleton-B1KTdJ4N.js";
26
+ import { E as fs } from "./empty-state-CgvmPPvW.js";
27
+ import { S as Ws } from "./stepper-accordion-BPNS6J6B.js";
28
+ import { S as Ys } from "./stepper-progress-D6H8wQiV.js";
29
+ import { S as Zs } from "./slot-grid-kCDoV3k4.js";
30
+ import { p as le } from "./parseISO-y3LncvfO.js";
31
+ import { C as Xs } from "./chevron-down-DWE7GSq9.js";
32
+ import { r as at, f as Bt, b as is } from "./format-D-1gTdHF.js";
33
+ import { x as gs, d as ot, a as Ut, i as Qs, s as ht, m as en, y as Ot } from "./date-picker-variants-B3AFKDSu.js";
34
+ import { s as tn } from "./subDays-XBMBTVOO.js";
35
+ import { C as sn } from "./chevron-left-B8cOyH-V.js";
36
+ import { C as nn } from "./chevron-right-I9AeSxH2.js";
37
+ import { c as ke } from "./createLucideIcon-DhHxpK9K.js";
38
+ import { M as rn, S as an } from "./sun-Bj9Mr553.js";
39
+ import { S as on } from "./stethoscope-sZXGC43m.js";
40
+ import { H as cn } from "./heart-pulse-BCppJyN2.js";
41
+ import { E as dn } from "./eye-BjhN2nYf.js";
42
+ import { B as ln } from "./baby-Dku-Xvg9.js";
43
+ import { S as un } from "./scan-line-CNseIHQ0.js";
44
+ import { A as pn } from "./astroid-BN4f5VXU.js";
45
+ import { C as mn } from "./clipboard-check-BeAGxDVT.js";
46
+ /**
47
+ * @license lucide-react v1.22.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */
52
+ const fn = [
53
+ [
54
+ "path",
55
+ {
56
+ d: "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",
57
+ key: "169zse"
58
+ }
59
+ ]
60
+ ], gn = ke("activity", fn);
61
+ /**
62
+ * @license lucide-react v1.22.0 - ISC
63
+ *
64
+ * This source code is licensed under the ISC license.
65
+ * See the LICENSE file in the root directory of this source tree.
66
+ */
67
+ const hn = [
68
+ [
69
+ "path",
70
+ {
71
+ d: "M17 10c.7-.7 1.69 0 2.5 0a2.5 2.5 0 1 0 0-5 .5.5 0 0 1-.5-.5 2.5 2.5 0 1 0-5 0c0 .81.7 1.8 0 2.5l-7 7c-.7.7-1.69 0-2.5 0a2.5 2.5 0 0 0 0 5c.28 0 .5.22.5.5a2.5 2.5 0 1 0 5 0c0-.81-.7-1.8 0-2.5Z",
72
+ key: "w610uw"
73
+ }
74
+ ]
75
+ ], vn = ke("bone", hn);
76
+ /**
77
+ * @license lucide-react v1.22.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */
82
+ const bn = [
83
+ ["path", { d: "M12 18V5", key: "adv99a" }],
84
+ ["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
85
+ ["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
86
+ ["path", { d: "M17.997 5.125a4 4 0 0 1 2.526 5.77", key: "iwvgf7" }],
87
+ ["path", { d: "M18 18a4 4 0 0 0 2-7.464", key: "efp6ie" }],
88
+ ["path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517", key: "1gq6am" }],
89
+ ["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
90
+ ["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
91
+ ], yn = ke("brain", bn);
92
+ /**
93
+ * @license lucide-react v1.22.0 - ISC
94
+ *
95
+ * This source code is licensed under the ISC license.
96
+ * See the LICENSE file in the root directory of this source tree.
97
+ */
98
+ const kn = [
99
+ ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
100
+ ["path", { d: "M16 2v4", key: "4m81vk" }],
101
+ ["path", { d: "M3 10h18", key: "8toen8" }],
102
+ ["path", { d: "M8 2v4", key: "1cmpym" }],
103
+ ["path", { d: "M17 14h-6", key: "bkmgh3" }],
104
+ ["path", { d: "M13 18H7", key: "bb0bb7" }],
105
+ ["path", { d: "M7 14h.01", key: "1qa3f1" }],
106
+ ["path", { d: "M17 18h.01", key: "1bdyru" }]
107
+ ], Sn = ke("calendar-range", kn);
108
+ /**
109
+ * @license lucide-react v1.22.0 - ISC
110
+ *
111
+ * This source code is licensed under the ISC license.
112
+ * See the LICENSE file in the root directory of this source tree.
113
+ */
114
+ const xn = [
115
+ ["path", { d: "M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0", key: "1dfaln" }],
116
+ ["path", { d: "M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4", key: "1qnva7" }]
117
+ ], In = ke("ear", xn);
118
+ /**
119
+ * @license lucide-react v1.22.0 - ISC
120
+ *
121
+ * This source code is licensed under the ISC license.
122
+ * See the LICENSE file in the root directory of this source tree.
123
+ */
124
+ const Nn = [
125
+ ["path", { d: "M6 18h8", key: "1borvv" }],
126
+ ["path", { d: "M3 22h18", key: "8prr45" }],
127
+ ["path", { d: "M14 22a7 7 0 1 0 0-14h-1", key: "1jwaiy" }],
128
+ ["path", { d: "M9 14h2", key: "197e7h" }],
129
+ ["path", { d: "M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z", key: "1bmzmy" }],
130
+ ["path", { d: "M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3", key: "1drr47" }]
131
+ ], wn = ke("microscope", Nn);
132
+ /**
133
+ * @license lucide-react v1.22.0 - ISC
134
+ *
135
+ * This source code is licensed under the ISC license.
136
+ * See the LICENSE file in the root directory of this source tree.
137
+ */
138
+ const Cn = [
139
+ [
140
+ "path",
141
+ { d: "m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z", key: "wa1lgi" }
142
+ ],
143
+ ["path", { d: "m8.5 8.5 7 7", key: "rvfmvr" }]
144
+ ], An = ke("pill", Cn);
145
+ /**
146
+ * @license lucide-react v1.22.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */
151
+ const Tn = [
152
+ ["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
153
+ ["path", { d: "M8.12 8.12 12 12", key: "1alkpv" }],
154
+ ["path", { d: "M20 4 8.12 15.88", key: "xgtan2" }],
155
+ ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
156
+ ["path", { d: "M14.8 14.8 20 20", key: "ptml3r" }]
157
+ ], Dn = ke("scissors", Tn);
158
+ /**
159
+ * @license lucide-react v1.22.0 - ISC
160
+ *
161
+ * This source code is licensed under the ISC license.
162
+ * See the LICENSE file in the root directory of this source tree.
163
+ */
164
+ const On = [
165
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
166
+ ["path", { d: "M8 14s1.5 2 4 2 4-2 4-2", key: "1y1vjs" }],
167
+ ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
168
+ ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
169
+ ], Mn = ke("smile", On);
170
+ /**
171
+ * @license lucide-react v1.22.0 - ISC
172
+ *
173
+ * This source code is licensed under the ISC license.
174
+ * See the LICENSE file in the root directory of this source tree.
175
+ */
176
+ const Fn = [
177
+ ["path", { d: "M12 10V2", key: "16sf7g" }],
178
+ ["path", { d: "m4.93 10.93 1.41 1.41", key: "2a7f42" }],
179
+ ["path", { d: "M2 18h2", key: "j10viu" }],
180
+ ["path", { d: "M20 18h2", key: "wocana" }],
181
+ ["path", { d: "m19.07 10.93-1.41 1.41", key: "15zs5n" }],
182
+ ["path", { d: "M22 22H2", key: "19qnx5" }],
183
+ ["path", { d: "m16 6-4 4-4-4", key: "6wukr" }],
184
+ ["path", { d: "M16 18a4 4 0 0 0-8 0", key: "1lzouq" }]
185
+ ], _n = ke("sunset", Fn);
186
+ /**
187
+ * @license lucide-react v1.22.0 - ISC
188
+ *
189
+ * This source code is licensed under the ISC license.
190
+ * See the LICENSE file in the root directory of this source tree.
191
+ */
192
+ const Ln = [
193
+ ["path", { d: "m18 2 4 4", key: "22kx64" }],
194
+ ["path", { d: "m17 7 3-3", key: "1w1zoj" }],
195
+ ["path", { d: "M19 9 8.7 19.3c-1 1-2.5 1-3.4 0l-.6-.6c-1-1-1-2.5 0-3.4L15 5", key: "1exhtz" }],
196
+ ["path", { d: "m9 11 4 4", key: "rovt3i" }],
197
+ ["path", { d: "m5 19-3 3", key: "59f2uf" }],
198
+ ["path", { d: "m14 4 6 6", key: "yqp9t2" }]
199
+ ], rs = ke("syringe", Ln);
200
+ function Bn(e, t, n) {
201
+ return gs(e, -1, n);
202
+ }
203
+ const En = {
204
+ id: "booking",
205
+ // `view_change` removed (0.69): the layout `variant` is a fixed prop — the
206
+ // handle exposes only `getVariant` (state), no action mutates it. The flow's
207
+ // only navigation is step-to-step (`goto_step` → `navigate`).
208
+ capabilities: ["navigate"],
209
+ state: {
210
+ variant: {
211
+ type: "string",
212
+ descriptionKey: "ui.agent.booking.state.variant",
213
+ description: "Active variant — one of `inline-list`, `accordion`, `calendar`, `flexible`, `progress`.",
214
+ read: (e) => e.getVariant()
215
+ },
216
+ currentStep: {
217
+ type: "number",
218
+ descriptionKey: "ui.agent.booking.state.currentStep",
219
+ description: "The step the flow is on — 1 insurance, 2 specialty, 3 service, 4 provider, 5 date, 6 time, 7 patient details, 8 confirmation (after a successful submit). Read this back after `goto_step` to see where the clamp landed.",
220
+ read: (e) => e.getCurrentStep()
221
+ }
222
+ },
223
+ actions: {
224
+ reset: {
225
+ // destructive: clears the whole in-progress booking value (patient
226
+ // identity, contact, slot choice) — irreversibly loses user input.
227
+ safety: "destructive",
228
+ idempotent: !0,
229
+ descriptionKey: "ui.agent.booking.actions.reset",
230
+ description: "Clear the booking value back to an empty state. Use to abandon an in-progress flow.",
231
+ errors: [
232
+ "Resetting after submit has no effect — the flow is on step 8.",
233
+ "Refused while a payment session is open (step 7): the consumer must cancel the hold first."
234
+ ],
235
+ invoke: (e) => {
236
+ e.reset();
237
+ }
238
+ },
239
+ goto_step: {
240
+ safety: "read",
241
+ argsType: "{ step: 1 | 2 | 3 | 4 | 5 | 6 | 7 }",
242
+ argsSchema: {
243
+ type: "object",
244
+ properties: {
245
+ step: {
246
+ type: "integer",
247
+ enum: [1, 2, 3, 4, 5, 6, 7],
248
+ description: "Target step (1-7)."
249
+ }
250
+ },
251
+ required: ["step"]
252
+ },
253
+ idempotent: !0,
254
+ descriptionKey: "ui.agent.booking.actions.gotoStep",
255
+ description: "Jump to the given step. A step that is hidden for this practice, or that sits ahead of the first incomplete step, clamps to that first incomplete step — read `currentStep` back to see where it landed.",
256
+ errors: [
257
+ "Requested step is not yet reachable — clamped to the first incomplete step.",
258
+ "Requested step is hidden for this practice (e.g. insurance outside Germany, or provider choice turned off) — clamped to the first incomplete step."
259
+ ],
260
+ examples: [{ args: { step: 1 }, note: "Return to the first step." }],
261
+ invoke: (e, t) => {
262
+ e.goToStep(t.step);
263
+ }
264
+ }
265
+ },
266
+ domHooks: {
267
+ root: {
268
+ attr: "data-component",
269
+ value: "booking",
270
+ description: "Marks the Booking root region."
271
+ },
272
+ instanceId: {
273
+ attr: "data-component-id",
274
+ sourceProp: "id",
275
+ description: "Sourced from the id prop."
276
+ }
277
+ }
278
+ }, Jt = [
279
+ "email",
280
+ "whatsapp",
281
+ "sms"
282
+ ], Ce = "all", Rn = "de";
283
+ function Pn(e) {
284
+ const t = e.lockedOperatorId;
285
+ return [...t ? e.operatorsByService ? e.specialties.filter(
286
+ (r) => e.services.some(
287
+ (i) => {
288
+ var a;
289
+ return i.specialtyId === r.id && ((a = i.operatorIds) == null ? void 0 : a.includes(t));
290
+ }
291
+ )
292
+ ) : e.specialties.filter((r) => {
293
+ var i;
294
+ return (i = r.operatorIds) == null ? void 0 : i.includes(t);
295
+ }) : e.specialties].sort((r, i) => {
296
+ const a = r.sequenceNumber ?? Number.POSITIVE_INFINITY, c = i.sequenceNumber ?? Number.POSITIVE_INFINITY;
297
+ return a - c;
298
+ });
299
+ }
300
+ function Vn(e) {
301
+ let t = e.services;
302
+ if (e.lockedOperatorId && (t = t.filter(
303
+ (r) => {
304
+ var i;
305
+ return (i = r.operatorIds) == null ? void 0 : i.includes(e.lockedOperatorId);
306
+ }
307
+ )), e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) {
308
+ const r = Ge(e.value);
309
+ r.length > 0 && (t = t.filter(
310
+ (i) => i.specialtyId !== void 0 && r.includes(i.specialtyId)
311
+ ));
312
+ }
313
+ return t;
314
+ }
315
+ function $n(e) {
316
+ const t = e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties, n = _e(e.value);
317
+ if ((!t || e.operatorsByService) && n.length > 0)
318
+ return e.operators.filter(
319
+ (r) => {
320
+ var i;
321
+ return (i = r.appointmentBookingReasonIds) == null ? void 0 : i.some((a) => n.includes(a));
322
+ }
323
+ );
324
+ if (t) {
325
+ const r = Ge(e.value);
326
+ if (r.length > 0)
327
+ return e.operators.filter(
328
+ (i) => {
329
+ var a;
330
+ return (a = i.specialtyIds) == null ? void 0 : a.some((c) => r.includes(c));
331
+ }
332
+ );
333
+ }
334
+ return [];
335
+ }
336
+ function qn(e, t) {
337
+ const n = e.country === Rn, r = !n || e.value.insuranceType !== void 0, a = (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && r, c = Ge(e.value).length > 0, p = !a || c, m = _e(e.value).length > 0, g = !p || m, l = t.operators, o = !!e.allowOperatorSelection && g && m && !e.lockedOperatorId && l.length > 1, u = g && m, I = (!u || e.value.date !== void 0) && e.value.date !== void 0, M = (!I || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, w = m && l.length === 0;
338
+ return {
339
+ insurance: n,
340
+ specialty: a,
341
+ service: p,
342
+ operator: o,
343
+ date: u,
344
+ slot: I,
345
+ details: M,
346
+ onboardingIncomplete: w
347
+ };
348
+ }
349
+ function Kn(e, t) {
350
+ const n = [];
351
+ return t.insurance && n.push(1), t.specialty && n.push(2), n.push(3), t.operator && n.push(4), n.push(5), n.push(6), n.push(7), {
352
+ currentStep: n.find(
353
+ (i) => !Fe(i, e.value)
354
+ ) ?? 7,
355
+ visibleSteps: n
356
+ };
357
+ }
358
+ function Fe(e, t) {
359
+ switch (e) {
360
+ case 1:
361
+ return t.insuranceType !== void 0;
362
+ // 0.34.0: array-or-single — satisfied when EITHER form is present.
363
+ case 2:
364
+ return Ge(t).length > 0;
365
+ case 3:
366
+ return _e(t).length > 0;
367
+ // Always satisfied, like its gate: "no preference" is a valid answer,
368
+ // whether it is the `'all'` sentinel or an empty multi-select.
369
+ case 4:
370
+ return !0;
371
+ case 5:
372
+ return t.date !== void 0;
373
+ case 6:
374
+ return t.slotKey !== void 0;
375
+ // Details fulfilment is owned by the form's own validation.
376
+ case 7:
377
+ return !1;
378
+ }
379
+ }
380
+ function zn(e) {
381
+ const t = {
382
+ specialties: Pn(e),
383
+ services: Vn(e),
384
+ operators: $n(e)
385
+ }, n = qn(e, t), { currentStep: r, visibleSteps: i } = Kn(e, n);
386
+ let a;
387
+ if (e.value.date && e.value.slotKey) {
388
+ const g = e.availableSlots[e.value.date];
389
+ g && (a = g.find((l) => l.key === e.value.slotKey));
390
+ }
391
+ const c = _e(e.value), f = c.length > 0 ? e.services.find((g) => g.id === c[0]) : void 0, p = Ge(e.value).length > 0, m = c.length > 0 && e.value.date !== void 0 && e.value.slotKey !== void 0 && (!n.insurance || e.value.insuranceType !== void 0) && (!n.specialty || p);
392
+ return {
393
+ gates: n,
394
+ filtered: t,
395
+ currentStep: r,
396
+ totalSteps: i.length,
397
+ visibleSteps: i,
398
+ isReadyToSubmit: m,
399
+ durationMin: f == null ? void 0 : f.durationMin,
400
+ selectedSlot: a
401
+ };
402
+ }
403
+ function hs(e, t) {
404
+ return {
405
+ ...e,
406
+ insuranceType: t,
407
+ specialtyId: void 0,
408
+ serviceId: void 0,
409
+ operatorId: void 0,
410
+ date: void 0,
411
+ slotKey: void 0,
412
+ details: void 0
413
+ };
414
+ }
415
+ function vs(e, t) {
416
+ return {
417
+ ...e,
418
+ specialtyId: t,
419
+ specialtyIds: void 0,
420
+ serviceId: void 0,
421
+ serviceIds: void 0,
422
+ operatorId: void 0,
423
+ operatorIds: void 0,
424
+ date: void 0,
425
+ slotKey: void 0,
426
+ details: void 0
427
+ };
428
+ }
429
+ function bs(e, t) {
430
+ return {
431
+ ...e,
432
+ specialtyId: void 0,
433
+ specialtyIds: t,
434
+ serviceId: void 0,
435
+ serviceIds: void 0,
436
+ operatorId: void 0,
437
+ operatorIds: void 0,
438
+ date: void 0,
439
+ slotKey: void 0,
440
+ details: void 0
441
+ };
442
+ }
443
+ function ys(e, t) {
444
+ return {
445
+ ...e,
446
+ serviceId: t,
447
+ serviceIds: void 0,
448
+ // Default the operator to the "All operators" sentinel so a patient
449
+ // who doesn't care about picking lands on a satisfied step 4 without
450
+ // any further input.
451
+ operatorId: t ? Ce : void 0,
452
+ operatorIds: void 0,
453
+ date: void 0,
454
+ slotKey: void 0,
455
+ details: void 0
456
+ };
457
+ }
458
+ function ks(e, t) {
459
+ const n = !!t && t.length > 0;
460
+ return {
461
+ ...e,
462
+ serviceId: void 0,
463
+ serviceIds: t,
464
+ operatorId: n ? Ce : void 0,
465
+ operatorIds: void 0,
466
+ date: void 0,
467
+ slotKey: void 0,
468
+ details: void 0
469
+ };
470
+ }
471
+ function Ss(e, t) {
472
+ return {
473
+ ...e,
474
+ operatorId: t,
475
+ operatorIds: void 0,
476
+ date: void 0,
477
+ slotKey: void 0,
478
+ details: void 0
479
+ };
480
+ }
481
+ function xs(e, t) {
482
+ return {
483
+ ...e,
484
+ operatorId: void 0,
485
+ operatorIds: t,
486
+ date: void 0,
487
+ slotKey: void 0,
488
+ details: void 0
489
+ };
490
+ }
491
+ function Ge(e) {
492
+ return e.specialtyIds && e.specialtyIds.length > 0 ? e.specialtyIds : e.specialtyId ? [e.specialtyId] : [];
493
+ }
494
+ function _e(e) {
495
+ return e.serviceIds && e.serviceIds.length > 0 ? e.serviceIds : e.serviceId ? [e.serviceId] : [];
496
+ }
497
+ function Wt(e) {
498
+ return e.operatorIds && e.operatorIds.length > 0 ? e.operatorIds : e.operatorId ? [e.operatorId] : [];
499
+ }
500
+ function $t(e, t) {
501
+ return {
502
+ ...e,
503
+ date: t,
504
+ slotKey: void 0
505
+ // Keep details — date/slot changes shouldn't wipe the patient form
506
+ // since the user has already filled some fields.
507
+ };
508
+ }
509
+ function Is(e, t) {
510
+ return {
511
+ ...e,
512
+ slotKey: t
513
+ };
514
+ }
515
+ function jn(e, t) {
516
+ let n = e;
517
+ if (t.lockedOperatorId && n.operatorId !== t.lockedOperatorId && (n = { ...n, operatorId: t.lockedOperatorId }), (t.useSpecialties === void 0 ? t.specialties.length > 0 : t.useSpecialties) && t.specialties.length === 1 && n.specialtyId === void 0 && n.specialtyIds === void 0 && (n = { ...n, specialtyId: t.specialties[0].id }), t.autoSelectSingleService) {
518
+ const i = Ge(n), a = i.length > 0 ? t.services.filter(
519
+ (c) => c.specialtyId && i.includes(c.specialtyId)
520
+ ) : t.services;
521
+ a.length === 1 && n.serviceId === void 0 && n.serviceIds === void 0 && (n = { ...n, serviceId: a[0].id }, n.operatorId === void 0 && n.operatorIds === void 0 && (n = { ...n, operatorId: Ce }));
522
+ }
523
+ return n;
524
+ }
525
+ function Ns(e) {
526
+ if (e.operatorId && e.operatorId !== Ce)
527
+ return e.operatorId;
528
+ }
529
+ function Un(e) {
530
+ if (!e) return !1;
531
+ const t = e.trim();
532
+ return /^\+?\d[\d\s\-()]{6,}$/.test(t);
533
+ }
534
+ function ws(e) {
535
+ const t = e && e.length > 0 ? e : ["email"], n = new Set(t);
536
+ return Jt.filter((r) => n.has(r));
537
+ }
538
+ function Gn(e, t, n) {
539
+ const r = ws(e), i = new Set(r);
540
+ if (n)
541
+ return Jt.filter(
542
+ (m) => n.includes(m) && i.has(m)
543
+ );
544
+ const a = [];
545
+ i.has("email") && a.push("email");
546
+ const c = Un(t), f = i.has("whatsapp");
547
+ f && c && a.push("whatsapp"), !f && i.has("sms") && a.push("sms");
548
+ const p = new Set(a);
549
+ return Jt.filter((m) => p.has(m));
550
+ }
551
+ const Hn = /https?:\/\/(?:(?![.,;:!?'»›]https?:\/\/)[^\s<>"\u060C\u061B\u061F\u06D4\u2000-\u206F\u3000-\u303F\uFF00-\uFFEF])+/gi, Jn = /* @__PURE__ */ new Set([
552
+ ".",
553
+ ",",
554
+ ";",
555
+ ":",
556
+ "!",
557
+ "?",
558
+ "'",
559
+ "»",
560
+ "›"
561
+ ]), Wn = { ")": "(", "]": "[", "}": "{" }, as = (e, t) => e.split(t).length - 1;
562
+ function Yn(e) {
563
+ const t = {};
564
+ for (const [r, i] of Object.entries(Wn))
565
+ t[r] = as(e, r) - as(e, i);
566
+ let n = e.length;
567
+ for (; n > 0; ) {
568
+ const r = e[n - 1];
569
+ if (Jn.has(r))
570
+ n -= 1;
571
+ else if (r in t && t[r] > 0)
572
+ t[r] -= 1, n -= 1;
573
+ else
574
+ break;
575
+ }
576
+ return e.slice(0, n);
577
+ }
578
+ const Zn = /[\u0600-\u06FF\u3040-\u30FF\u3400-\u9FFF\uAC00-\uD7AF]/, Xn = /[A-Za-z0-9]/;
579
+ function Qn(e) {
580
+ const t = e.search(Zn);
581
+ return t > 0 && Xn.test(e[t - 1]) ? e.slice(0, t) : e;
582
+ }
583
+ function ei(e) {
584
+ try {
585
+ const { protocol: t, hostname: n } = new URL(e);
586
+ return (t === "http:" || t === "https:") && n !== "";
587
+ } catch {
588
+ return !1;
589
+ }
590
+ }
591
+ function ti(e) {
592
+ const t = [];
593
+ let n = 0;
594
+ const r = (i) => {
595
+ if (i === "") return;
596
+ const a = t[t.length - 1];
597
+ (a == null ? void 0 : a.kind) === "text" ? a.text += i : t.push({ kind: "text", text: i });
598
+ };
599
+ for (const i of e.matchAll(Hn)) {
600
+ const a = i.index ?? 0, c = Yn(Qn(i[0]));
601
+ ei(c) && (r(e.slice(n, a)), t.push({ kind: "link", text: c, href: c }), n = a + c.length);
602
+ }
603
+ return r(e.slice(n)), t;
604
+ }
605
+ const os = 500, si = /^[A-Z0-9]{16}$/, ni = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, cs = 300, Gt = "ds:rounded-[var(--radius-sm)] ds:underline ds:text-[var(--foreground)] ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]", Mt = (e) => e && /^https?:\/\//i.test(e) ? e : void 0, ii = (e, t) => ({
606
+ street: (e == null ? void 0 : e.address.line1) ?? "",
607
+ city: (e == null ? void 0 : e.address.city) ?? "",
608
+ postcode: (e == null ? void 0 : e.address.postalCode) ?? "",
609
+ province: (e == null ? void 0 : e.address.state) ?? "",
610
+ // The practice's country only until the patient has an address at all.
611
+ country: (e ? e.address.country : t).toLowerCase(),
612
+ formatted: ""
613
+ }), ri = (e, t, n = null) => ({
614
+ name: t,
615
+ address: {
616
+ line1: e.street,
617
+ line2: n,
618
+ city: e.city,
619
+ state: e.province,
620
+ postalCode: e.postcode,
621
+ country: e.country.toUpperCase()
622
+ }
623
+ }), ai = bt("ds:flex ds:flex-col ds:border", {
624
+ variants: {
625
+ noticeStyle: {
626
+ plain: "ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-md)] ds:border-[var(--border)] ds:bg-[var(--muted)] ds:p-[var(--spacing-sm)]",
627
+ highlighted: "ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-lg)] ds:border-[color-mix(in_srgb,var(--primary)_30%,var(--border))] ds:bg-[color-mix(in_srgb,var(--primary)_8%,var(--card))] ds:p-[var(--spacing-md)]"
628
+ }
629
+ },
630
+ defaultVariants: { noticeStyle: "plain" }
631
+ }), oi = ["it", "ch", "de", "at", "fr", "sm"], vt = {
632
+ country: "billing.country",
633
+ street: "billing.street",
634
+ city: "billing.city",
635
+ postcode: "billing.postcode",
636
+ province: "billing.province"
637
+ }, Cs = /^\d{5}$/, ci = (e) => {
638
+ if (!e) return !1;
639
+ const { line1: t, city: n, postalCode: r, country: i, state: a } = e.address;
640
+ return !t.trim() || !n.trim() || !r.trim() || !i.trim() ? !1 : i.toUpperCase() !== "IT" ? !0 : !!a.trim() && Cs.test(r.trim());
641
+ }, di = (e, t) => {
642
+ var n;
643
+ return {
644
+ name: t,
645
+ address: {
646
+ line1: e.address.line1.trim(),
647
+ line2: ((n = e.address.line2) == null ? void 0 : n.trim()) || null,
648
+ city: e.address.city.trim(),
649
+ state: e.address.state.trim(),
650
+ postalCode: e.address.postalCode.trim(),
651
+ country: e.address.country.trim().toUpperCase()
652
+ }
653
+ };
654
+ }, Ft = { state: "idle" }, Xt = us(
655
+ ({
656
+ value: e,
657
+ onChange: t,
658
+ onSubmit: n,
659
+ requireCodiceFiscale: r = !1,
660
+ requireDateOfBirth: i = !1,
661
+ requireInsuranceNumber: a = !1,
662
+ insuranceType: c,
663
+ showNote: f = !1,
664
+ showReturningPatientFlag: p = !1,
665
+ privacyPolicyUrl: m,
666
+ termsUrl: g,
667
+ practiceConsent: l,
668
+ payment: o,
669
+ paymentTermsUrl: u,
670
+ paymentBlocked: k = !1,
671
+ billingInDetails: I = !1,
672
+ paymentNoticeStyle: N = "plain",
673
+ criticalInformationToAccept: M,
674
+ validateCodiceFiscale: w,
675
+ validateInsuranceNumber: x,
676
+ submitting: S = !1,
677
+ summarySlot: A,
678
+ defaultPhoneCountry: D,
679
+ confirmationChannels: T,
680
+ defaultConfirmationChannels: h,
681
+ submitError: C
682
+ }, $) => {
683
+ var je, Ct, ft, At, gt;
684
+ const { t: b, i18n: pe } = G("ui"), F = Pt(), z = E(null), _ = ue(
685
+ (d) => {
686
+ z.current = d, typeof $ == "function" ? $(d) : $ && ($.current = d);
687
+ },
688
+ [$]
689
+ ), [me, dt] = Q(0);
690
+ q(() => {
691
+ var O;
692
+ if (me === 0) return;
693
+ const d = (O = z.current) == null ? void 0 : O.querySelectorAll(
694
+ '[aria-invalid="true"], [role="checkbox"][aria-required="true"][aria-checked="false"], [data-unanswered] [role="checkbox"]'
695
+ );
696
+ for (const y of d ?? [])
697
+ if (y.focus(), document.activeElement === y) return;
698
+ }, [me]);
699
+ const fe = E(!1), [He, Le] = Q(!1), [H, Be] = Q(!1), ge = S || He, [J, ae] = Q(Ft), [he, Se] = Q(Ft), [W, Ae] = Q({}), ie = ue(
700
+ (d) => Ae((O) => ({ ...O, [d]: !0 })),
701
+ []
702
+ ), oe = E(null), te = E(
703
+ null
704
+ );
705
+ q(
706
+ () => () => {
707
+ oe.current && clearTimeout(oe.current), te.current && clearTimeout(te.current);
708
+ },
709
+ []
710
+ );
711
+ const L = ue(
712
+ (d) => {
713
+ Be(!1), t({ ...e, ...d });
714
+ },
715
+ [e, t]
716
+ ), xe = o ? JSON.stringify([
717
+ o.serviceId,
718
+ o.kind,
719
+ o.amountCents,
720
+ o.currencyCode,
721
+ u
722
+ ]) : void 0, [Kt, Ee] = Q(
723
+ () => e.paymentAccepted ? xe : void 0
724
+ ), kt = E(xe), Qe = !!(o && e.paymentAccepted && Kt === xe);
725
+ q(() => {
726
+ kt.current !== xe && (kt.current = xe, Ee(void 0), e.paymentAccepted !== void 0 && L({ paymentAccepted: o ? !1 : void 0 }));
727
+ }, [xe, o, L, e.paymentAccepted]);
728
+ const Re = typeof (l == null ? void 0 : l.label) == "string" && l.label.trim() !== "", Ie = l && Re ? JSON.stringify([
729
+ l.label,
730
+ l.url ?? null,
731
+ l.required
732
+ ]) : void 0, [zt, Z] = Q(
733
+ () => e.practiceConsentAccepted ? Ie : void 0
734
+ ), St = E(Ie), se = !!(Ie !== void 0 && e.practiceConsentAccepted && zt === Ie);
735
+ q(() => {
736
+ St.current !== Ie && (St.current = Ie, Z(void 0), e.practiceConsentAccepted !== void 0 && L({ practiceConsentAccepted: void 0 }));
737
+ }, [Ie, L, e.practiceConsentAccepted]);
738
+ const Te = o ? yt(o.amountCents, o.currencyCode, pe.language) : "", Ne = Mt(u), ve = I && !!o && !k, B = r, et = (D || "it").toLowerCase(), Je = !ve || ci(e.billing), We = ii(e.billing, et), X = We.country === "it", we = E(null), Pe = E(
739
+ null
740
+ ), Ve = (je = e.billing) == null ? void 0 : je.address.line1.trim(), ce = ((ft = (Ct = e.billing) == null ? void 0 : Ct.address.line2) == null ? void 0 : ft.trim()) || null;
741
+ q(() => {
742
+ var d;
743
+ Ve !== void 0 && ce ? Pe.current = { street: Ve, line2: ce } : (Ve === void 0 || Ve === ((d = Pe.current) == null ? void 0 : d.street)) && (Pe.current = null);
744
+ }, [Ve, ce]);
745
+ const De = (d) => W[vt[d]] ? We[d].trim() ? (
746
+ // The one format the block itself checks: an Italian CAP.
747
+ d === "postcode" && X && !Cs.test(We.postcode.trim()) ? b("inputs.postalCode.invalid") : void 0
748
+ ) : b("booking.details.fieldRequired") : void 0, xt = ue(
749
+ () => Ae(
750
+ (d) => d[vt.province] ? d : {
751
+ ...d,
752
+ codiceFiscale: !0,
753
+ ...Object.fromEntries(
754
+ Object.values(vt).map((O) => [O, !0])
755
+ )
756
+ }
757
+ ),
758
+ []
759
+ ), tt = R(
760
+ () => ws(T),
761
+ [T]
762
+ ), $e = !o && !k && tt.length >= 2, qe = E(!1);
763
+ q(() => {
764
+ if (o || k) return;
765
+ if (!$e) {
766
+ e.confirmationChannels !== void 0 && L({ confirmationChannels: void 0 });
767
+ return;
768
+ }
769
+ if (e.confirmationChannels !== void 0) {
770
+ qe.current = !0;
771
+ return;
772
+ }
773
+ const d = Gn(
774
+ tt,
775
+ e.mobilePhone,
776
+ h
777
+ );
778
+ qe.current = !0, L({ confirmationChannels: d });
779
+ }, [
780
+ $e,
781
+ o,
782
+ k,
783
+ tt,
784
+ e.mobilePhone,
785
+ h
786
+ ]);
787
+ const Oe = R(
788
+ () => e.confirmationChannels ?? [],
789
+ [e.confirmationChannels]
790
+ ), K = $e && Oe.length === 0, j = E(w), lt = E(x);
791
+ q(() => {
792
+ j.current = w, lt.current = x;
793
+ }, [w, x]);
794
+ const st = !!w, ut = !!x;
795
+ q(() => {
796
+ const d = e.codiceFiscale;
797
+ if (!B || !st || !d) {
798
+ ae(Ft);
799
+ return;
800
+ }
801
+ if (!si.test(d)) {
802
+ ae({
803
+ state: "invalid",
804
+ hint: b("booking.details.codiceFiscale.invalidFormat")
805
+ });
806
+ return;
807
+ }
808
+ ae({ state: "pending" });
809
+ let O = !0;
810
+ return oe.current && clearTimeout(oe.current), oe.current = setTimeout(async () => {
811
+ try {
812
+ const y = j.current;
813
+ if (!y) return;
814
+ const P = await y(d);
815
+ O && ae({
816
+ state: P.valid ? "valid" : "invalid",
817
+ hint: P.hint,
818
+ value: d
819
+ });
820
+ } catch {
821
+ O && ae({
822
+ state: "invalid",
823
+ hint: b("booking.details.codiceFiscale.unavailable"),
824
+ value: d
825
+ });
826
+ }
827
+ }, cs), () => {
828
+ O = !1, oe.current && clearTimeout(oe.current);
829
+ };
830
+ }, [B, st, e.codiceFiscale, b]);
831
+ const Ke = a && c === "public";
832
+ q(() => {
833
+ const d = e.insuranceNumber;
834
+ if (!Ke || !ut || !d) {
835
+ Se(Ft);
836
+ return;
837
+ }
838
+ Se({ state: "pending" }), te.current && clearTimeout(te.current), te.current = setTimeout(() => {
839
+ const O = lt.current;
840
+ O && O(d).then(
841
+ (y) => Se(
842
+ y.valid ? { state: "valid" } : { state: "invalid", hint: y.hint }
843
+ )
844
+ ).catch(
845
+ () => Se({
846
+ state: "invalid",
847
+ hint: b("booking.details.insuranceNumber.unavailable")
848
+ })
849
+ );
850
+ }, cs);
851
+ }, [Ke, ut, e.insuranceNumber, b]);
852
+ const nt = R(
853
+ () => !!(e.email && ni.test(e.email)),
854
+ [e.email]
855
+ ), it = R(
856
+ () => !!(e.mobilePhone && e.mobilePhone.length >= 6),
857
+ [e.mobilePhone]
858
+ ), It = R(() => {
859
+ var d, O;
860
+ return !(!((d = e.firstName) != null && d.trim()) || !((O = e.lastName) != null && O.trim()) || !nt || !it || B && (J.state !== "valid" || J.value !== e.codiceFiscale) || !Je || i && !e.dateOfBirth || Ke && he.state !== "valid");
861
+ }, [
862
+ e.firstName,
863
+ e.lastName,
864
+ nt,
865
+ it,
866
+ B,
867
+ Je,
868
+ J.state,
869
+ J.value,
870
+ e.codiceFiscale,
871
+ i,
872
+ e.dateOfBirth,
873
+ Ke,
874
+ he.state
875
+ ]), Me = M != null && M.trim() ? M : void 0, pt = Me !== void 0, Ye = !pt || !!e.criticalInformationAccepted, Nt = !Re || !(l != null && l.required) || se, jt = !!(e.privacyConsent && e.termsConsent && Ye && Nt), be = !$e || Oe.length > 0, wt = It && jt && be && (!o || Qe) && !k && !ge, mt = async (d) => {
876
+ if (d.preventDefault(), Ae({
877
+ firstName: !0,
878
+ lastName: !0,
879
+ email: !0,
880
+ mobilePhone: !0,
881
+ codiceFiscale: !0,
882
+ dateOfBirth: !0,
883
+ insuranceNumber: !0,
884
+ ...Object.fromEntries(
885
+ Object.values(vt).map((y) => [y, !0])
886
+ )
887
+ }), ge || fe.current) return;
888
+ if (!wt) {
889
+ dt((y) => y + 1);
890
+ return;
891
+ }
892
+ const O = {
893
+ firstName: e.firstName.trim(),
894
+ lastName: e.lastName.trim(),
895
+ email: e.email.trim(),
896
+ mobilePhone: e.mobilePhone,
897
+ privacyConsent: !0,
898
+ termsConsent: !0,
899
+ // Only present when the service carried text to accept — a
900
+ // reason without it leaves the key out of the payload entirely.
901
+ ...pt ? { criticalInformationAccepted: !0 } : {},
902
+ // Sent whenever the practice's box is shown, ticked or not, so the
903
+ // server can record the answer; left out when there is no box.
904
+ ...Re ? { practiceConsentAccepted: se } : {},
905
+ ...o ? { paymentAccepted: !0 } : {},
906
+ codiceFiscale: e.codiceFiscale,
907
+ dateOfBirth: e.dateOfBirth,
908
+ insuranceNumber: e.insuranceNumber,
909
+ note: e.note,
910
+ returningPatient: e.returningPatient,
911
+ // Only include when the picker was visible; otherwise the single
912
+ // implicit channel is inferred backend-side from the practice
913
+ // config.
914
+ confirmationChannels: $e ? Oe : void 0,
915
+ ...ve && e.billing ? {
916
+ billing: di(
917
+ e.billing,
918
+ `${e.firstName.trim()} ${e.lastName.trim()}`
919
+ )
920
+ } : {}
921
+ };
922
+ fe.current = !0, Le(!0), Be(!1);
923
+ try {
924
+ await n(O);
925
+ } catch {
926
+ Be(!0);
927
+ } finally {
928
+ fe.current = !1, Le(!1);
929
+ }
930
+ }, ze = /* @__PURE__ */ s(
931
+ Ue,
932
+ {
933
+ label: b("booking.details.codiceFiscale.label"),
934
+ required: !0,
935
+ description: J.state === "pending" ? b("booking.details.codiceFiscale.checking") : b("booking.details.codiceFiscale.helper"),
936
+ error: W.codiceFiscale && J.state === "invalid" ? J.hint ?? b("booking.details.codiceFiscale.invalid") : W.codiceFiscale && !e.codiceFiscale ? b("booking.details.fieldRequired") : void 0,
937
+ children: /* @__PURE__ */ s(
938
+ Dt,
939
+ {
940
+ value: e.codiceFiscale ?? "",
941
+ maxLength: 16,
942
+ onChange: (d) => L({
943
+ codiceFiscale: d.target.value.slice(0, 16).toUpperCase()
944
+ }),
945
+ onBlur: () => ie("codiceFiscale")
946
+ }
947
+ )
948
+ }
949
+ ), re = (d, O) => {
950
+ const y = Mt(O);
951
+ return y ? /* @__PURE__ */ s(
952
+ $s,
953
+ {
954
+ ns: "ui",
955
+ i18nKey: d,
956
+ components: {
957
+ // The `<Trans>` runtime injects link text from the i18n
958
+ // string. The anchor renders empty at static-analysis time,
959
+ // so `jsx-a11y/anchor-has-content` would false-flag — silence
960
+ // it; the runtime content is the localised policy / terms
961
+ // label.
962
+ policyLink: (
963
+ // eslint-disable-next-line jsx-a11y/anchor-has-content
964
+ /* @__PURE__ */ s(
965
+ "a",
966
+ {
967
+ href: y,
968
+ target: "_blank",
969
+ rel: "noopener noreferrer",
970
+ className: Gt
971
+ }
972
+ )
973
+ )
974
+ }
975
+ }
976
+ ) : b(d);
977
+ };
978
+ return /* @__PURE__ */ v(
979
+ "form",
980
+ {
981
+ ref: _,
982
+ id: F,
983
+ noValidate: !0,
984
+ onSubmit: mt,
985
+ onFocus: (d) => {
986
+ const O = we.current;
987
+ !O || !d.currentTarget.contains(d.target) || !O.contains(d.target) && O.compareDocumentPosition(d.target) & Node.DOCUMENT_POSITION_FOLLOWING && xt();
988
+ },
989
+ "aria-busy": ge || void 0,
990
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
991
+ children: [
992
+ A,
993
+ /* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
994
+ /* @__PURE__ */ s(
995
+ Ue,
996
+ {
997
+ label: b("booking.details.firstName.label"),
998
+ required: !0,
999
+ error: W.firstName && !((At = e.firstName) != null && At.trim()) ? b("booking.details.firstName.required") : void 0,
1000
+ children: /* @__PURE__ */ s(
1001
+ Dt,
1002
+ {
1003
+ autoComplete: "given-name",
1004
+ value: e.firstName ?? "",
1005
+ onChange: (d) => L({ firstName: d.target.value }),
1006
+ onBlur: () => ie("firstName")
1007
+ }
1008
+ )
1009
+ }
1010
+ ),
1011
+ /* @__PURE__ */ s(
1012
+ Ue,
1013
+ {
1014
+ label: b("booking.details.lastName.label"),
1015
+ required: !0,
1016
+ error: W.lastName && !((gt = e.lastName) != null && gt.trim()) ? b("booking.details.lastName.required") : void 0,
1017
+ children: /* @__PURE__ */ s(
1018
+ Dt,
1019
+ {
1020
+ autoComplete: "family-name",
1021
+ value: e.lastName ?? "",
1022
+ onChange: (d) => L({ lastName: d.target.value }),
1023
+ onBlur: () => ie("lastName")
1024
+ }
1025
+ )
1026
+ }
1027
+ )
1028
+ ] }),
1029
+ /* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
1030
+ /* @__PURE__ */ s(
1031
+ Ue,
1032
+ {
1033
+ label: b("booking.details.email.label"),
1034
+ required: !0,
1035
+ error: W.email && !nt ? b("booking.details.email.invalid") : void 0,
1036
+ children: /* @__PURE__ */ s(
1037
+ js,
1038
+ {
1039
+ value: e.email ?? "",
1040
+ onChange: (d) => L({ email: d.target.value }),
1041
+ onBlur: () => ie("email")
1042
+ }
1043
+ )
1044
+ }
1045
+ ),
1046
+ /* @__PURE__ */ s(
1047
+ Ue,
1048
+ {
1049
+ label: b("booking.details.mobilePhone.label"),
1050
+ required: !0,
1051
+ error: W.mobilePhone && !it ? b("booking.details.mobilePhone.invalid") : void 0,
1052
+ children: /* @__PURE__ */ s(
1053
+ Us,
1054
+ {
1055
+ value: e.mobilePhone ?? "",
1056
+ defaultCountry: D == null ? void 0 : D.toUpperCase(),
1057
+ onChange: (d) => {
1058
+ L({ mobilePhone: d }), ie("mobilePhone");
1059
+ }
1060
+ }
1061
+ )
1062
+ }
1063
+ )
1064
+ ] }),
1065
+ B && !ve || i ? /* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
1066
+ B && !ve ? ze : null,
1067
+ i ? /* @__PURE__ */ s(
1068
+ Ue,
1069
+ {
1070
+ label: b("booking.details.dateOfBirth.label"),
1071
+ required: !0,
1072
+ error: W.dateOfBirth && !e.dateOfBirth ? b("booking.details.dateOfBirth.required") : void 0,
1073
+ children: /* @__PURE__ */ s(
1074
+ zs,
1075
+ {
1076
+ value: e.dateOfBirth ? new Date(e.dateOfBirth) : void 0,
1077
+ onChange: (d) => {
1078
+ L({
1079
+ dateOfBirth: d ? d.toISOString().slice(0, 10) : void 0
1080
+ }), ie("dateOfBirth");
1081
+ }
1082
+ }
1083
+ )
1084
+ }
1085
+ ) : null
1086
+ ] }) : null,
1087
+ Ke ? /* @__PURE__ */ s(
1088
+ Ue,
1089
+ {
1090
+ label: b("booking.details.insuranceNumber.label"),
1091
+ required: !0,
1092
+ description: he.state === "pending" ? b("booking.details.insuranceNumber.checking") : void 0,
1093
+ error: W.insuranceNumber && he.state === "invalid" ? he.hint ?? b("booking.details.insuranceNumber.invalid") : void 0,
1094
+ children: /* @__PURE__ */ s(
1095
+ Dt,
1096
+ {
1097
+ value: e.insuranceNumber ?? "",
1098
+ onChange: (d) => L({ insuranceNumber: d.target.value }),
1099
+ onBlur: () => ie("insuranceNumber")
1100
+ }
1101
+ )
1102
+ }
1103
+ ) : null,
1104
+ ve ? /* @__PURE__ */ v(
1105
+ "div",
1106
+ {
1107
+ ref: we,
1108
+ "data-component": "booking-billing",
1109
+ role: "group",
1110
+ "aria-labelledby": `${F}-billing-heading`,
1111
+ "aria-describedby": `${F}-billing-intro`,
1112
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-md)] ds:border ds:border-[var(--border)] ds:p-[var(--spacing-sm)]",
1113
+ onBlur: (d) => {
1114
+ var y;
1115
+ const O = (y = d.target.closest("[data-address-field]")) == null ? void 0 : y.getAttribute("data-address-field");
1116
+ (O === "street" || O === "city" || O === "postcode") && ie(vt[O]);
1117
+ },
1118
+ children: [
1119
+ /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
1120
+ /* @__PURE__ */ s(
1121
+ "h3",
1122
+ {
1123
+ id: `${F}-billing-heading`,
1124
+ className: "type-label ds:m-0 ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]",
1125
+ children: b("booking.details.billing.heading")
1126
+ }
1127
+ ),
1128
+ /* @__PURE__ */ s(
1129
+ "p",
1130
+ {
1131
+ id: `${F}-billing-intro`,
1132
+ className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]",
1133
+ children: b("booking.details.billing.intro")
1134
+ }
1135
+ )
1136
+ ] }),
1137
+ B ? ze : null,
1138
+ /* @__PURE__ */ s(
1139
+ Hs,
1140
+ {
1141
+ value: We,
1142
+ onChange: (d) => {
1143
+ var O;
1144
+ return (
1145
+ // The name is set from the patient's own on submit.
1146
+ L({
1147
+ billing: ri(
1148
+ d,
1149
+ "",
1150
+ // A second line belongs to its street: it goes when the
1151
+ // patient writes another, and returns with the first.
1152
+ d.street.trim() === ((O = Pe.current) == null ? void 0 : O.street) ? Pe.current.line2 : null
1153
+ )
1154
+ })
1155
+ );
1156
+ },
1157
+ popularCountries: oi,
1158
+ layout: "grid",
1159
+ fields: X ? void 0 : ["street", "city", "postcode"],
1160
+ required: X ? ["country", "street", "city", "postcode", "province"] : ["country", "street", "city", "postcode"],
1161
+ errors: {
1162
+ country: De("country"),
1163
+ street: De("street"),
1164
+ city: De("city"),
1165
+ postcode: De("postcode"),
1166
+ province: X ? De("province") : void 0
1167
+ }
1168
+ }
1169
+ )
1170
+ ]
1171
+ }
1172
+ ) : null,
1173
+ f ? /* @__PURE__ */ s(
1174
+ Ue,
1175
+ {
1176
+ label: b("booking.details.note.label"),
1177
+ description: b("booking.details.note.helper", {
1178
+ max: os
1179
+ }),
1180
+ children: /* @__PURE__ */ s(
1181
+ Gs,
1182
+ {
1183
+ value: e.note ?? "",
1184
+ maxLength: os,
1185
+ rows: 3,
1186
+ onChange: (d) => L({ note: d.target.value })
1187
+ }
1188
+ )
1189
+ }
1190
+ ) : null,
1191
+ p ? /* @__PURE__ */ s(
1192
+ rt,
1193
+ {
1194
+ checked: !!e.returningPatient,
1195
+ onCheckedChange: (d) => L({ returningPatient: d === !0 }),
1196
+ label: b("booking.details.returningPatient.label")
1197
+ }
1198
+ ) : null,
1199
+ Me !== void 0 ? /* @__PURE__ */ v(
1200
+ "div",
1201
+ {
1202
+ "data-component": "booking-critical-information",
1203
+ role: "group",
1204
+ "aria-labelledby": `${F}-critical-information-heading`,
1205
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-md)] ds:border ds:border-[var(--border)] ds:bg-[var(--muted)] ds:p-[var(--spacing-sm)]",
1206
+ children: [
1207
+ /* @__PURE__ */ s(
1208
+ "h3",
1209
+ {
1210
+ id: `${F}-critical-information-heading`,
1211
+ className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0",
1212
+ children: b("booking.details.criticalInformation.heading")
1213
+ }
1214
+ ),
1215
+ /* @__PURE__ */ s("p", { className: "type-body-sm ds:m-0 ds:whitespace-pre-wrap ds:break-words ds:text-[var(--foreground)]", children: ti(Me).map(
1216
+ (d, O) => d.kind === "link" ? /* @__PURE__ */ s(
1217
+ "a",
1218
+ {
1219
+ href: d.href,
1220
+ target: "_blank",
1221
+ rel: "noopener noreferrer",
1222
+ className: Gt,
1223
+ children: d.text
1224
+ },
1225
+ O
1226
+ ) : /* @__PURE__ */ s(Ps, { children: d.text }, O)
1227
+ ) }),
1228
+ /* @__PURE__ */ s(
1229
+ rt,
1230
+ {
1231
+ checked: !!e.criticalInformationAccepted,
1232
+ onCheckedChange: (d) => L({ criticalInformationAccepted: d === !0 }),
1233
+ "aria-required": !0,
1234
+ label: /* @__PURE__ */ v(ne, { children: [
1235
+ b("booking.details.criticalInformation.accept"),
1236
+ /* @__PURE__ */ s(
1237
+ "span",
1238
+ {
1239
+ "aria-hidden": "true",
1240
+ className: "ds:text-[var(--destructive)] ds:ms-[var(--spacing-2xs)]",
1241
+ children: "*"
1242
+ }
1243
+ )
1244
+ ] })
1245
+ }
1246
+ )
1247
+ ]
1248
+ }
1249
+ ) : null,
1250
+ o ? /* @__PURE__ */ v(
1251
+ "div",
1252
+ {
1253
+ "data-component": "booking-payment-notice",
1254
+ role: "group",
1255
+ "aria-labelledby": `${F}-payment-heading`,
1256
+ "data-notice-style": N,
1257
+ className: ai({
1258
+ noticeStyle: N
1259
+ }),
1260
+ children: [
1261
+ N === "highlighted" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
1262
+ /* @__PURE__ */ s("span", { className: "ds:flex ds:size-9 ds:shrink-0 ds:items-center ds:justify-center ds:rounded-full ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)]", children: /* @__PURE__ */ s(Js, { "aria-hidden": "true", className: "ds:size-5" }) }),
1263
+ /* @__PURE__ */ s(
1264
+ "h3",
1265
+ {
1266
+ id: `${F}-payment-heading`,
1267
+ className: "type-title-item ds:m-0 ds:flex-1",
1268
+ children: b("booking.payment.noticeTitle")
1269
+ }
1270
+ ),
1271
+ /* @__PURE__ */ s(
1272
+ "span",
1273
+ {
1274
+ "aria-hidden": "true",
1275
+ className: "type-title-card ds:shrink-0 ds:text-[var(--foreground)]",
1276
+ children: Te
1277
+ }
1278
+ )
1279
+ ] }) : /* @__PURE__ */ s(
1280
+ "h3",
1281
+ {
1282
+ id: `${F}-payment-heading`,
1283
+ className: "type-label ds:m-0",
1284
+ children: b("booking.payment.noticeTitle")
1285
+ }
1286
+ ),
1287
+ /* @__PURE__ */ s("p", { className: "type-body-sm ds:m-0", children: b("booking.payment.noticeBody", { amount: Te }) }),
1288
+ Ne ? /* @__PURE__ */ s(
1289
+ "a",
1290
+ {
1291
+ href: Ne,
1292
+ target: "_blank",
1293
+ rel: "noopener noreferrer",
1294
+ className: "type-body-sm ds:inline-flex ds:items-center ds:self-start ds:min-h-[var(--min-target-size)] ds:rounded-[var(--radius-sm)] ds:underline ds:text-[var(--foreground)] ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1295
+ children: b("booking.payment.terms")
1296
+ }
1297
+ ) : null,
1298
+ /* @__PURE__ */ s(
1299
+ rt,
1300
+ {
1301
+ checked: Qe,
1302
+ onCheckedChange: (d) => {
1303
+ Ee(
1304
+ d === !0 ? xe : void 0
1305
+ ), L({ paymentAccepted: d === !0 });
1306
+ },
1307
+ "aria-required": !0,
1308
+ label: /* @__PURE__ */ v(ne, { children: [
1309
+ b("booking.payment.accept", { amount: Te }),
1310
+ /* @__PURE__ */ s(
1311
+ "span",
1312
+ {
1313
+ "aria-hidden": "true",
1314
+ className: "ds:text-[var(--destructive)] ds:ms-[var(--spacing-2xs)]",
1315
+ children: "*"
1316
+ }
1317
+ )
1318
+ ] })
1319
+ }
1320
+ )
1321
+ ]
1322
+ }
1323
+ ) : null,
1324
+ /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
1325
+ /* @__PURE__ */ s(
1326
+ rt,
1327
+ {
1328
+ checked: !!e.privacyConsent,
1329
+ onCheckedChange: (d) => L({ privacyConsent: d === !0 }),
1330
+ "aria-required": !0,
1331
+ label: /* @__PURE__ */ v(ne, { children: [
1332
+ re(
1333
+ "booking.details.consent.privacy.label",
1334
+ m
1335
+ ),
1336
+ /* @__PURE__ */ s(
1337
+ "span",
1338
+ {
1339
+ "aria-hidden": "true",
1340
+ className: "ds:text-[var(--destructive)] ds:ms-[var(--spacing-2xs)]",
1341
+ children: "*"
1342
+ }
1343
+ )
1344
+ ] })
1345
+ }
1346
+ ),
1347
+ /* @__PURE__ */ s(
1348
+ rt,
1349
+ {
1350
+ checked: !!e.termsConsent,
1351
+ onCheckedChange: (d) => L({ termsConsent: d === !0 }),
1352
+ "aria-required": !0,
1353
+ label: /* @__PURE__ */ v(ne, { children: [
1354
+ re(
1355
+ "booking.details.consent.terms.label",
1356
+ g
1357
+ ),
1358
+ /* @__PURE__ */ s(
1359
+ "span",
1360
+ {
1361
+ "aria-hidden": "true",
1362
+ className: "ds:text-[var(--destructive)] ds:ms-[var(--spacing-2xs)]",
1363
+ children: "*"
1364
+ }
1365
+ )
1366
+ ] })
1367
+ }
1368
+ ),
1369
+ l && Re ? /* @__PURE__ */ s(
1370
+ rt,
1371
+ {
1372
+ checked: se,
1373
+ onCheckedChange: (d) => {
1374
+ Z(
1375
+ d === !0 ? Ie : void 0
1376
+ ), L({ practiceConsentAccepted: d === !0 });
1377
+ },
1378
+ "aria-required": l.required || void 0,
1379
+ label: /* @__PURE__ */ v(ne, { children: [
1380
+ Mt(l.url) ? /* @__PURE__ */ s(
1381
+ "a",
1382
+ {
1383
+ href: Mt(l.url),
1384
+ target: "_blank",
1385
+ rel: "noopener noreferrer",
1386
+ className: Gt,
1387
+ children: l.label
1388
+ }
1389
+ ) : l.label,
1390
+ l.required ? /* @__PURE__ */ s(
1391
+ "span",
1392
+ {
1393
+ "aria-hidden": "true",
1394
+ className: "ds:text-[var(--destructive)] ds:ms-[var(--spacing-2xs)]",
1395
+ children: "*"
1396
+ }
1397
+ ) : null
1398
+ ] })
1399
+ }
1400
+ ) : null
1401
+ ] }),
1402
+ $e ? /* @__PURE__ */ s(
1403
+ "div",
1404
+ {
1405
+ "data-component": "booking-confirmation-channels",
1406
+ "data-unanswered": K || void 0,
1407
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
1408
+ children: /* @__PURE__ */ s(
1409
+ Ks,
1410
+ {
1411
+ label: b("booking.confirmation.heading"),
1412
+ helperText: b("booking.confirmation.helper"),
1413
+ value: Oe,
1414
+ onChange: (d) => L({
1415
+ confirmationChannels: d
1416
+ }),
1417
+ orientation: "vertical",
1418
+ options: tt.map((d) => ({
1419
+ value: d,
1420
+ label: b(`booking.confirmation.channel.${d}`)
1421
+ })),
1422
+ error: K ? b("booking.confirmation.atLeastOne") : void 0
1423
+ }
1424
+ )
1425
+ }
1426
+ ) : null,
1427
+ C || H || k ? /* @__PURE__ */ s(ee, { variant: "error", children: /* @__PURE__ */ s(ee.Description, { children: C ?? b(
1428
+ k ? "booking.payment.unavailable" : "booking.payment.submitFailed"
1429
+ ) }) }) : null,
1430
+ /* @__PURE__ */ s(
1431
+ Xe,
1432
+ {
1433
+ intent: "primary",
1434
+ size: "md",
1435
+ type: "submit",
1436
+ disabled: ge || k,
1437
+ "aria-disabled": !wt || void 0,
1438
+ startIcon: ge ? /* @__PURE__ */ s(ps, { variant: "pulse", size: "sm" }) : void 0,
1439
+ children: o ? b("booking.payment.submit", { amount: Te }) : b("booking.details.submit")
1440
+ }
1441
+ )
1442
+ ]
1443
+ }
1444
+ );
1445
+ }
1446
+ );
1447
+ Xt.displayName = "BookingDetailsForm";
1448
+ function Qt(e) {
1449
+ const t = e.payment;
1450
+ if (!t) return;
1451
+ const n = (t.currencyCode ?? "EUR").toUpperCase();
1452
+ if (!(!Number.isSafeInteger(t.amountCents) || t.amountCents <= 0 || !["full", "deposit"].includes(t.kind) || !/^[A-Z]{3}$/.test(n)))
1453
+ return {
1454
+ serviceId: e.id,
1455
+ kind: t.kind,
1456
+ amountCents: t.amountCents,
1457
+ currencyCode: n
1458
+ };
1459
+ }
1460
+ function li(e, t, n) {
1461
+ const r = e.filter(
1462
+ (a) => t.includes(a.id)
1463
+ ), i = (n == null ? void 0 : n.serviceId) ?? (t.length === 1 ? t[0] : void 0);
1464
+ if (i) {
1465
+ const a = r.find((f) => f.id === i);
1466
+ if (!a) return { blocked: !0 };
1467
+ const c = Qt(a);
1468
+ return { payment: c, blocked: !!(a.payment && !c) };
1469
+ }
1470
+ return { blocked: r.some((a) => !!a.payment) };
1471
+ }
1472
+ function _t(e) {
1473
+ return e ? JSON.stringify([
1474
+ e.serviceId,
1475
+ e.kind,
1476
+ e.amountCents,
1477
+ e.currencyCode
1478
+ ]) : "";
1479
+ }
1480
+ function ui({
1481
+ services: e,
1482
+ value: t,
1483
+ availableSlots: n,
1484
+ onSubmit: r,
1485
+ onChange: i,
1486
+ paymentState: a,
1487
+ submitting: c,
1488
+ paymentTermsUrl: f,
1489
+ renderPayment: p
1490
+ }) {
1491
+ var fe, He, Le;
1492
+ const m = JSON.stringify([
1493
+ t.insuranceType,
1494
+ t.specialtyId,
1495
+ t.specialtyIds,
1496
+ _e(t),
1497
+ t.operatorId,
1498
+ t.operatorIds,
1499
+ t.date,
1500
+ t.slotKey
1501
+ ]), g = E(
1502
+ void 0
1503
+ ), o = (t.date ? (fe = n[t.date]) == null ? void 0 : fe.find((H) => H.key === t.slotKey) : void 0) ?? (((He = g.current) == null ? void 0 : He.selection) === m ? g.current.slot : void 0), u = li(
1504
+ e,
1505
+ _e(t),
1506
+ o
1507
+ ), k = u.blocked || !!(u.payment && !p), I = JSON.stringify([
1508
+ m,
1509
+ o == null ? void 0 : o.serviceId,
1510
+ _t(u.payment),
1511
+ f,
1512
+ k
1513
+ ]), N = u.payment ? JSON.stringify([_t(u.payment), f]) : "", M = E(void 0), w = !!((Le = t.details) != null && Le.paymentAccepted);
1514
+ q(() => {
1515
+ if (!w) M.current = void 0;
1516
+ else if (N) M.current === void 0 ? M.current = N : M.current !== N && (M.current = void 0, i({
1517
+ ...t,
1518
+ details: { ...t.details, paymentAccepted: !1 }
1519
+ }));
1520
+ else return;
1521
+ }, [w, N, i, t]);
1522
+ const x = E(I);
1523
+ x.current = I;
1524
+ const [S, A] = Q({ status: "idle" }), D = E(0), T = E(!1), h = E(!0), C = E(!1), $ = E(void 0), b = E(I);
1525
+ q(() => (h.current = !0, () => {
1526
+ h.current = !1, D.current += 1;
1527
+ }), []);
1528
+ const pe = S.status === "payment" || S.status === "success";
1529
+ q(() => {
1530
+ b.current === I || C.current || pe || (b.current = I, D.current += 1, T.current = !1, A({ status: "idle" }));
1531
+ }, [I, pe]);
1532
+ const F = pe || b.current === I ? S.session : void 0, z = R(
1533
+ () => F && (a == null ? void 0 : a.sessionId) === F.id ? a : F ? { sessionId: F.id, status: "ready" } : void 0,
1534
+ [F, a]
1535
+ );
1536
+ F && z && "phase" in z && z.phase === "completion" && ($.current = F.id);
1537
+ const _ = R(
1538
+ () => F && $.current === F.id && z && z.status !== "paid" && (!("phase" in z) || z.phase !== "completion") ? {
1539
+ sessionId: F.id,
1540
+ status: "processing",
1541
+ phase: "completion"
1542
+ } : z,
1543
+ [F, z]
1544
+ );
1545
+ q(() => {
1546
+ !F || !_ || C.current || (_.status === "paid" ? (C.current = !0, A((H) => ({ ...H, status: "success" }))) : _.status === "cancelled" && (D.current += 1, T.current = !1, g.current = void 0, i({
1547
+ ...t,
1548
+ details: { ...t.details, paymentAccepted: !1 }
1549
+ }), A({ status: "idle", cancelled: !0 })));
1550
+ }, [F, _, i, t]);
1551
+ const me = () => {
1552
+ D.current += 1, T.current = !1, C.current = !1, $.current = void 0, g.current = void 0, b.current = x.current, A({ status: "idle" });
1553
+ }, dt = async (H) => {
1554
+ var Se, W, Ae, ie, oe;
1555
+ if (!(o != null && o.available) || k || c || T.current || S.status === "payment" || C.current || u.payment && !H.paymentAccepted) return;
1556
+ T.current = !0, g.current = { selection: m, slot: { ...o } };
1557
+ const Be = ++D.current, ge = I;
1558
+ b.current = ge;
1559
+ const J = {
1560
+ slot: { ...o, meta: o.meta ? { ...o.meta } : void 0 },
1561
+ value: {
1562
+ ...t,
1563
+ serviceIds: (Se = t.serviceIds) == null ? void 0 : Se.slice(),
1564
+ specialtyIds: (W = t.specialtyIds) == null ? void 0 : W.slice(),
1565
+ operatorIds: (Ae = t.operatorIds) == null ? void 0 : Ae.slice(),
1566
+ operatorId: Ns(t) ?? t.operatorId,
1567
+ details: { ...H }
1568
+ },
1569
+ details: {
1570
+ ...H,
1571
+ confirmationChannels: (ie = H.confirmationChannels) == null ? void 0 : ie.slice()
1572
+ },
1573
+ ...u.payment ? { payment: { ...u.payment } } : {}
1574
+ }, ae = () => h.current && D.current === Be && x.current === ge;
1575
+ A({ status: "submitting" });
1576
+ let he = !1;
1577
+ try {
1578
+ const te = await r(J);
1579
+ if (!ae()) return;
1580
+ if (J.payment) {
1581
+ const L = te == null ? void 0 : te.paymentSession;
1582
+ if (!((oe = L == null ? void 0 : L.id) != null && oe.trim()) || _t(L.payment) !== _t(J.payment)) {
1583
+ A({ status: "error" });
1584
+ return;
1585
+ }
1586
+ he = !0, A({
1587
+ status: "payment",
1588
+ snapshot: J,
1589
+ session: { id: L.id, payment: { ...L.payment } }
1590
+ });
1591
+ } else te != null && te.paymentSession ? A({ status: "error" }) : (C.current = !0, A({ status: "success", snapshot: J }));
1592
+ } catch {
1593
+ ae() && A({ status: "error" });
1594
+ } finally {
1595
+ ae() && !he && (T.current = !1);
1596
+ }
1597
+ };
1598
+ return {
1599
+ ...S,
1600
+ payment: u.payment,
1601
+ blocked: k,
1602
+ state: _,
1603
+ activeSession: F,
1604
+ submit: dt,
1605
+ reset: me
1606
+ };
1607
+ }
1608
+ const pi = bt(
1609
+ "ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)]",
1610
+ {
1611
+ variants: {
1612
+ variant: {
1613
+ "inline-list": "ds:gap-[var(--spacing-md)]",
1614
+ accordion: "ds:gap-[var(--spacing-md)]",
1615
+ calendar: "ds:gap-[var(--spacing-md)]",
1616
+ flexible: "ds:gap-[var(--spacing-lg)]",
1617
+ progress: "ds:gap-[var(--spacing-sm)]"
1618
+ },
1619
+ // `surface="elevated"` matches `Card variant="elevated"` — same
1620
+ // tokens, same padding, same boundary behaviour — so consumers can
1621
+ // drop their own Card wraps without a double-card look. Default
1622
+ // `'flat'` preserves 0.30.x rendering.
1623
+ surface: {
1624
+ flat: "",
1625
+ elevated: [
1626
+ "ds:rounded-[var(--radius-lg)]",
1627
+ "ds:bg-[var(--card)] ds:text-[var(--card-foreground)]",
1628
+ "ds:border ds:border-[color:var(--card-border)]",
1629
+ "ds:shadow-[var(--shadow-card)]",
1630
+ "ds:p-[var(--spacing-md)]"
1631
+ ].join(" ")
1632
+ }
1633
+ },
1634
+ defaultVariants: { variant: "inline-list", surface: "flat" }
1635
+ }
1636
+ ), mi = [
1637
+ [
1638
+ /\b(estetic|aesthetic|botox|filler|mesoterap|chirurgia\s*plastic)/i,
1639
+ rs
1640
+ ],
1641
+ [/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i, cn],
1642
+ [/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i, Mn],
1643
+ [/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i, dn],
1644
+ [/\b(otorin|udito|orecchi|hearing|ear)/i, In],
1645
+ [/\b(neuro|brain|cervello)/i, yn],
1646
+ [/\b(pediatr|child|bambin)/i, ln],
1647
+ [/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, vn],
1648
+ [/\b(lab|analis|test|sang|esami)/i, wn],
1649
+ [/\b(farmaco|pharm|pillol|refill)/i, An],
1650
+ [/\b(chirurg|surg|intervent|operat)/i, Dn],
1651
+ [/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, un],
1652
+ [/\b(vacc|inject|inie|punto)/i, rs],
1653
+ [/\b(derma|skin|pelle)/i, pn],
1654
+ [/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, mn],
1655
+ [/\b(general|medicin|family|control|check[-\s]?up)/i, gn]
1656
+ ];
1657
+ function fi(e) {
1658
+ for (const [t, n] of mi)
1659
+ if (t.test(e)) return n;
1660
+ return null;
1661
+ }
1662
+ function gi(e) {
1663
+ const t = fi(e.label) ?? on;
1664
+ return /* @__PURE__ */ s(t, { "aria-hidden": "true", className: "ds:size-5" });
1665
+ }
1666
+ function As(e) {
1667
+ var t;
1668
+ return (t = e.priceLabel) != null && t.trim() ? e.priceLabel : void 0;
1669
+ }
1670
+ function Ze(e) {
1671
+ return Bt(e, "yyyy-MM-dd");
1672
+ }
1673
+ const hi = [
1674
+ "ds:relative ds:flex ds:items-center ds:justify-center",
1675
+ "ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
1676
+ "ds:rounded-[var(--radius-sm)]",
1677
+ "ds:text-[length:var(--font-size-sm)]",
1678
+ "ds:transition-colors ds:duration-[var(--animation-duration)]",
1679
+ "ds:motion-reduce:transition-none",
1680
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
1681
+ "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1682
+ "ds:forced-colors:focus-visible:outline-[CanvasText]"
1683
+ ].join(" "), vi = bt(hi, {
1684
+ variants: {
1685
+ state: {
1686
+ available: "ds:cursor-pointer ds:text-[var(--foreground)] ds:hover:bg-[var(--muted)]/30",
1687
+ unavailable: "ds:cursor-not-allowed ds:text-[var(--muted-foreground)]/60",
1688
+ selected: "ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)] ds:font-[var(--font-weight-semibold)]",
1689
+ outside: "ds:text-[var(--muted-foreground)]/40"
1690
+ }
1691
+ },
1692
+ defaultVariants: { state: "unavailable" }
1693
+ });
1694
+ function bi({
1695
+ availableDates: e,
1696
+ selectedDate: t,
1697
+ onSelectDate: n,
1698
+ locale: r,
1699
+ loading: i
1700
+ }) {
1701
+ const { t: a } = G("ui"), c = R(() => t ? ht(le(t)) : e.length > 0 ? ht(le(e[0])) : ht(/* @__PURE__ */ new Date()), [t, e]), [f, p] = Q(c), [m, g] = Q(null), l = R(() => {
1702
+ const w = ht(f), x = en(f), S = w.getDay(), A = x.getDate(), D = [];
1703
+ for (let T = S; T > 0; T -= 1) {
1704
+ const h = new Date(w);
1705
+ h.setDate(w.getDate() - T), D.push(h);
1706
+ }
1707
+ for (let T = 0; T < A; T += 1) {
1708
+ const h = new Date(w);
1709
+ h.setDate(w.getDate() + T), D.push(h);
1710
+ }
1711
+ for (; D.length < 42; ) {
1712
+ const T = D[D.length - 1], h = new Date(T);
1713
+ h.setDate(T.getDate() + 1), D.push(h);
1714
+ }
1715
+ return D;
1716
+ }, [f]), o = R(() => {
1717
+ try {
1718
+ return new Intl.DateTimeFormat(r, {
1719
+ month: "long",
1720
+ year: "numeric"
1721
+ }).format(f);
1722
+ } catch {
1723
+ return Bt(f, "MMMM yyyy");
1724
+ }
1725
+ }, [f, r]), u = R(() => {
1726
+ const w = new Date(2024, 0, 7);
1727
+ return Array.from({ length: 7 }, (x, S) => {
1728
+ const A = new Date(w);
1729
+ A.setDate(w.getDate() + S);
1730
+ try {
1731
+ return new Intl.DateTimeFormat(r, { weekday: "short" }).format(A);
1732
+ } catch {
1733
+ return Bt(A, "EEE");
1734
+ }
1735
+ });
1736
+ }, [r]), k = R(() => new Set(e), [e]), I = ue(
1737
+ (w) => k.has(Ze(w)),
1738
+ [k]
1739
+ ), N = R(() => {
1740
+ if (m) return m;
1741
+ if (t) return le(t);
1742
+ const w = l.find(
1743
+ (x) => Ot(x, f) && I(x)
1744
+ );
1745
+ return w || (l.find((x) => Ot(x, f)) ?? null);
1746
+ }, [m, t, l, f, I]), M = ue(
1747
+ (w, x) => {
1748
+ let S = null;
1749
+ switch (w.key) {
1750
+ case "ArrowLeft":
1751
+ S = new Date(x), S.setDate(x.getDate() - 1);
1752
+ break;
1753
+ case "ArrowRight":
1754
+ S = new Date(x), S.setDate(x.getDate() + 1);
1755
+ break;
1756
+ case "ArrowUp":
1757
+ S = new Date(x), S.setDate(x.getDate() - 7);
1758
+ break;
1759
+ case "ArrowDown":
1760
+ S = new Date(x), S.setDate(x.getDate() + 7);
1761
+ break;
1762
+ case "Home":
1763
+ S = new Date(x), S.setDate(x.getDate() - x.getDay());
1764
+ break;
1765
+ case "End":
1766
+ S = new Date(x), S.setDate(x.getDate() + (6 - x.getDay()));
1767
+ break;
1768
+ case "Enter":
1769
+ case " ": {
1770
+ w.preventDefault(), I(x) && n(Ze(x));
1771
+ return;
1772
+ }
1773
+ default:
1774
+ return;
1775
+ }
1776
+ S && (w.preventDefault(), Ot(S, f) || p(ht(S)), g(S));
1777
+ },
1778
+ [I, n, f]
1779
+ );
1780
+ return i ? /* @__PURE__ */ v(
1781
+ "div",
1782
+ {
1783
+ role: "status",
1784
+ "aria-live": "polite",
1785
+ "aria-label": a("common.loading"),
1786
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
1787
+ children: [
1788
+ /* @__PURE__ */ s(Et, { variant: "text", width: "40%" }),
1789
+ /* @__PURE__ */ s("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (w, x) => /* @__PURE__ */ s(Et, { variant: "rounded", height: "2.5rem" }, `mg-skel-${x}`)) })
1790
+ ]
1791
+ }
1792
+ ) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1793
+ /* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1794
+ /* @__PURE__ */ s(
1795
+ ns,
1796
+ {
1797
+ icon: /* @__PURE__ */ s(sn, {}),
1798
+ "aria-label": a("booking.previousMonth"),
1799
+ size: "sm",
1800
+ intent: "ghost",
1801
+ flipIconInRtl: !0,
1802
+ onClick: () => {
1803
+ p((w) => Bn(w)), g(null);
1804
+ }
1805
+ }
1806
+ ),
1807
+ /* @__PURE__ */ s(
1808
+ "span",
1809
+ {
1810
+ className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]",
1811
+ "aria-live": "polite",
1812
+ children: o
1813
+ }
1814
+ ),
1815
+ /* @__PURE__ */ s(
1816
+ ns,
1817
+ {
1818
+ icon: /* @__PURE__ */ s(nn, {}),
1819
+ "aria-label": a("booking.nextMonth"),
1820
+ size: "sm",
1821
+ intent: "ghost",
1822
+ flipIconInRtl: !0,
1823
+ onClick: () => {
1824
+ p((w) => gs(w, 1)), g(null);
1825
+ }
1826
+ }
1827
+ )
1828
+ ] }),
1829
+ /* @__PURE__ */ v(
1830
+ "div",
1831
+ {
1832
+ role: "grid",
1833
+ "aria-label": a("booking.monthGridLabel"),
1834
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
1835
+ children: [
1836
+ /* @__PURE__ */ s(
1837
+ "div",
1838
+ {
1839
+ role: "row",
1840
+ className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
1841
+ children: u.map((w, x) => /* @__PURE__ */ s(
1842
+ "div",
1843
+ {
1844
+ role: "columnheader",
1845
+ className: "type-meta ds:text-center ds:text-[var(--muted-foreground)] ds:font-[var(--font-weight-medium)]",
1846
+ children: w
1847
+ },
1848
+ `wd-${x}`
1849
+ ))
1850
+ }
1851
+ ),
1852
+ Array.from({ length: 6 }, (w, x) => /* @__PURE__ */ s(
1853
+ "div",
1854
+ {
1855
+ role: "row",
1856
+ className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
1857
+ children: l.slice(x * 7, x * 7 + 7).map((S, A) => {
1858
+ const D = x * 7 + A, T = Ot(S, f), h = T && I(S), C = t ? is(S, le(t)) : !1, $ = T ? C ? "selected" : h ? "available" : "unavailable" : "outside", b = N ? is(N, S) : !1, pe = (() => {
1859
+ try {
1860
+ return new Intl.DateTimeFormat(r, {
1861
+ dateStyle: "full"
1862
+ }).format(S);
1863
+ } catch {
1864
+ return Bt(S, "PPP");
1865
+ }
1866
+ })();
1867
+ return /* @__PURE__ */ s(
1868
+ "button",
1869
+ {
1870
+ type: "button",
1871
+ role: "gridcell",
1872
+ "aria-label": pe,
1873
+ "aria-selected": C || void 0,
1874
+ "aria-disabled": !h || void 0,
1875
+ tabIndex: b ? 0 : -1,
1876
+ disabled: !h,
1877
+ onClick: () => {
1878
+ h && n(Ze(S));
1879
+ },
1880
+ onKeyDown: (F) => M(F, S),
1881
+ className: vi({ state: $ }),
1882
+ children: /* @__PURE__ */ s("span", { "aria-hidden": "true", children: S.getDate() })
1883
+ },
1884
+ `mg-cell-${D}`
1885
+ );
1886
+ })
1887
+ },
1888
+ `mg-row-${x}`
1889
+ ))
1890
+ ]
1891
+ }
1892
+ )
1893
+ ] });
1894
+ }
1895
+ const yi = bt(
1896
+ [
1897
+ "ds:relative ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-md)]",
1898
+ "ds:min-h-[var(--min-target-size)]",
1899
+ "ds:rounded-[var(--radius-md)]",
1900
+ "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
1901
+ "ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]",
1902
+ "ds:text-start",
1903
+ "ds:transition-[background-color,box-shadow]",
1904
+ "ds:duration-[var(--animation-duration)]",
1905
+ "ds:motion-reduce:transition-none",
1906
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
1907
+ "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1908
+ "ds:forced-colors:[outline:1px_solid_CanvasText]",
1909
+ "ds:cursor-pointer"
1910
+ ].join(" "),
1911
+ {
1912
+ variants: {
1913
+ state: {
1914
+ idle: "ds:bg-[var(--card)] ds:shadow-[var(--shadow-sm)] ds:hover:shadow-[var(--shadow-md)]",
1915
+ selected: "ds:bg-[color-mix(in_srgb,var(--primary)_8%,var(--card))] ds:shadow-[var(--shadow-sm)]"
1916
+ }
1917
+ },
1918
+ defaultVariants: { state: "idle" }
1919
+ }
1920
+ );
1921
+ function ki({
1922
+ services: e,
1923
+ selectedServiceId: t,
1924
+ onSelect: n,
1925
+ showDuration: r
1926
+ }) {
1927
+ const { t: i, i18n: a } = G("ui"), c = Pt(), [f, p] = Q(() => {
1928
+ if (t) {
1929
+ const o = e.findIndex((u) => u.id === t);
1930
+ if (o >= 0) return o;
1931
+ }
1932
+ return 0;
1933
+ }), m = E(/* @__PURE__ */ new Map()), g = ue((o) => {
1934
+ var u;
1935
+ (u = m.current.get(o)) == null || u.focus();
1936
+ }, []), l = ue(
1937
+ (o, u, k) => {
1938
+ const I = e.length;
1939
+ if (I !== 0)
1940
+ switch (o.key) {
1941
+ case "ArrowDown":
1942
+ case "ArrowRight": {
1943
+ o.preventDefault();
1944
+ const N = (u + 1) % I;
1945
+ p(N), g(N);
1946
+ break;
1947
+ }
1948
+ case "ArrowUp":
1949
+ case "ArrowLeft": {
1950
+ o.preventDefault();
1951
+ const N = (u - 1 + I) % I;
1952
+ p(N), g(N);
1953
+ break;
1954
+ }
1955
+ case "Home": {
1956
+ o.preventDefault(), p(0), g(0);
1957
+ break;
1958
+ }
1959
+ case "End": {
1960
+ o.preventDefault();
1961
+ const N = I - 1;
1962
+ p(N), g(N);
1963
+ break;
1964
+ }
1965
+ case "Enter":
1966
+ case " ": {
1967
+ o.preventDefault(), n(k);
1968
+ break;
1969
+ }
1970
+ }
1971
+ },
1972
+ [e.length, g, n]
1973
+ );
1974
+ return e.length === 0 ? null : /* @__PURE__ */ s(
1975
+ "div",
1976
+ {
1977
+ role: "radiogroup",
1978
+ "aria-label": i("booking.serviceListLabel"),
1979
+ id: c,
1980
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
1981
+ children: e.map((o, u) => {
1982
+ const k = t === o.id, I = f === u, N = Qt(o), M = o.payment ? N ? i(`booking.payment.${N.kind}`, {
1983
+ amount: yt(
1984
+ N.amountCents,
1985
+ N.currencyCode,
1986
+ a.language
1987
+ )
1988
+ }) : i("booking.payment.unavailable") : As(o), w = M ? i("booking.serviceCardLabelPrice", {
1989
+ label: o.label,
1990
+ price: M
1991
+ }) : r ? i("booking.serviceCardLabel", {
1992
+ label: o.label,
1993
+ duration: o.durationMin
1994
+ }) : o.label, x = gi(o);
1995
+ return /* @__PURE__ */ v(
1996
+ "button",
1997
+ {
1998
+ ref: (S) => {
1999
+ S ? m.current.set(u, S) : m.current.delete(u);
2000
+ },
2001
+ type: "button",
2002
+ role: "radio",
2003
+ "aria-checked": k,
2004
+ "aria-label": w,
2005
+ tabIndex: I ? 0 : -1,
2006
+ onClick: () => n(o.id),
2007
+ onFocus: () => p(u),
2008
+ onKeyDown: (S) => l(S, u, o.id),
2009
+ className: yi({
2010
+ state: k ? "selected" : "idle"
2011
+ }),
2012
+ children: [
2013
+ /* @__PURE__ */ s(
2014
+ "span",
2015
+ {
2016
+ "aria-hidden": "true",
2017
+ className: "ds:flex ds:size-10 ds:shrink-0 ds:items-center ds:justify-center ds:rounded-[var(--radius-sm)] ds:bg-[var(--primary)]/10 ds:text-[var(--primary)]",
2018
+ children: x
2019
+ }
2020
+ ),
2021
+ /* @__PURE__ */ v("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
2022
+ /* @__PURE__ */ s("span", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]", children: o.label }),
2023
+ M || !r ? null : /* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: i("booking.serviceSummary", {
2024
+ minutes: o.durationMin
2025
+ }) })
2026
+ ] }),
2027
+ M ? /* @__PURE__ */ s(
2028
+ "span",
2029
+ {
2030
+ "aria-hidden": "true",
2031
+ className: "ds:inline-flex ds:shrink-0 ds:items-center ds:ms-auto",
2032
+ children: /* @__PURE__ */ s(ms, { variant: "accentSoft", size: "lg", children: M })
2033
+ }
2034
+ ) : null
2035
+ ]
2036
+ },
2037
+ o.id
2038
+ );
2039
+ })
2040
+ }
2041
+ );
2042
+ }
2043
+ const Si = bt(
2044
+ [
2045
+ "ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-2xs)]",
2046
+ "ds:min-h-[var(--min-target-size)]",
2047
+ "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
2048
+ "ds:pt-[var(--spacing-2xs)] ds:pb-[var(--spacing-2xs)]",
2049
+ "ds:rounded-[var(--radius-md)]",
2050
+ "ds:text-[length:var(--font-size-sm)] ds:font-[var(--font-weight-medium)]",
2051
+ "ds:transition-[background-color,color,box-shadow] ds:duration-[var(--animation-duration)]",
2052
+ "ds:motion-reduce:transition-none",
2053
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
2054
+ "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
2055
+ "ds:disabled:cursor-not-allowed ds:disabled:opacity-50",
2056
+ "ds:forced-colors:[border:1px_solid_ButtonText] ds:forced-colors:text-[ButtonText]"
2057
+ ].join(" "),
2058
+ {
2059
+ variants: {
2060
+ state: {
2061
+ idle: "ds:bg-[color:var(--card)] ds:text-[color:var(--foreground)] ds:shadow-[var(--shadow-sm)] ds:hover:enabled:bg-[color:var(--muted)]/40 ds:hover:enabled:shadow-[var(--shadow-md)]",
2062
+ selected: "ds:bg-[color:var(--primary)] ds:text-[color:var(--primary-foreground)] ds:shadow-[var(--shadow-sm)]",
2063
+ unavailable: "ds:[outline:1px_dashed_color:var(--border)] ds:[outline-offset:-1px] ds:bg-transparent ds:text-[color:var(--muted-foreground)]"
2064
+ }
2065
+ },
2066
+ defaultVariants: { state: "idle" }
2067
+ }
2068
+ );
2069
+ function xi(e) {
2070
+ const [t] = e.split(":").map((r) => parseInt(r, 10)), n = Number.isFinite(t) ? t : 0;
2071
+ return n < 12 ? "morning" : n < 17 ? "afternoon" : "evening";
2072
+ }
2073
+ const Ii = {
2074
+ morning: an,
2075
+ afternoon: _n,
2076
+ evening: rn
2077
+ };
2078
+ function Ni({
2079
+ date: e,
2080
+ slots: t,
2081
+ selectedSlotKey: n,
2082
+ onSelect: r,
2083
+ loading: i,
2084
+ locale: a
2085
+ }) {
2086
+ const { t: c } = G("ui"), f = R(() => {
2087
+ try {
2088
+ return new Intl.DateTimeFormat(a, {
2089
+ weekday: "long",
2090
+ day: "numeric",
2091
+ month: "long"
2092
+ }).format(le(e));
2093
+ } catch {
2094
+ return e;
2095
+ }
2096
+ }, [e, a]), p = R(() => {
2097
+ const l = {
2098
+ morning: [],
2099
+ afternoon: [],
2100
+ evening: []
2101
+ };
2102
+ for (const o of t)
2103
+ l[xi(o.time)].push(o);
2104
+ return l;
2105
+ }, [t]), m = t.filter((l) => l.available).length, g = ["morning", "afternoon", "evening"];
2106
+ return i ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2107
+ /* @__PURE__ */ s(Et, { variant: "text", width: "60%" }),
2108
+ [0, 1].map((l) => /* @__PURE__ */ s(
2109
+ "div",
2110
+ {
2111
+ className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)]",
2112
+ children: [0, 1, 2].map((o) => /* @__PURE__ */ s(Et, { variant: "rounded", height: "44px" }, o))
2113
+ },
2114
+ l
2115
+ ))
2116
+ ] }) : m === 0 ? /* @__PURE__ */ s(fs, { variant: "no-results", title: c("booking.noSlotsForDate") }) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2117
+ /* @__PURE__ */ v("div", { className: "ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
2118
+ /* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
2119
+ /* @__PURE__ */ s(
2120
+ Sn,
2121
+ {
2122
+ "aria-hidden": "true",
2123
+ className: "ds:size-4 ds:text-[color:var(--accent)]"
2124
+ }
2125
+ ),
2126
+ /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: f })
2127
+ ] }),
2128
+ /* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: c("booking.slotsAvailable", { count: m }) })
2129
+ ] }),
2130
+ g.map((l) => {
2131
+ const o = p[l];
2132
+ if (o.length === 0) return null;
2133
+ const u = Ii[l];
2134
+ return /* @__PURE__ */ v(
2135
+ "div",
2136
+ {
2137
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
2138
+ children: [
2139
+ /* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
2140
+ /* @__PURE__ */ s(u, { "aria-hidden": "true", className: "ds:size-3.5" }),
2141
+ /* @__PURE__ */ s("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children: c(`booking.timeOfDay.${l}`) })
2142
+ ] }),
2143
+ /* @__PURE__ */ s(
2144
+ "div",
2145
+ {
2146
+ role: "group",
2147
+ "aria-label": c(`booking.timeOfDay.${l}`),
2148
+ className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)] ds:sm:grid-cols-4",
2149
+ children: o.map((k) => {
2150
+ const I = k.key === n, N = k.available ? I ? "selected" : "idle" : "unavailable";
2151
+ return /* @__PURE__ */ s(
2152
+ "button",
2153
+ {
2154
+ type: "button",
2155
+ "data-slot-id": k.key,
2156
+ disabled: !k.available,
2157
+ "aria-pressed": I,
2158
+ "aria-label": c("booking.slotAvailableLabel", {
2159
+ time: k.time
2160
+ }),
2161
+ onClick: () => k.available && r(k),
2162
+ className: Si({ state: N }),
2163
+ children: k.time
2164
+ },
2165
+ k.key
2166
+ );
2167
+ })
2168
+ }
2169
+ )
2170
+ ]
2171
+ },
2172
+ l
2173
+ );
2174
+ })
2175
+ ] });
2176
+ }
2177
+ const Lt = 4;
2178
+ function wi({
2179
+ availableDates: e,
2180
+ availableSlots: t,
2181
+ value: n,
2182
+ onChange: r,
2183
+ onDateSelect: i,
2184
+ onWindowChange: a,
2185
+ loadingDates: c,
2186
+ loadingSlots: f,
2187
+ locale: p,
2188
+ agentIdBase: m
2189
+ }) {
2190
+ const g = R(() => at(/* @__PURE__ */ new Date()), []), [l, o] = Q(() => {
2191
+ if (n.date) {
2192
+ const h = at(le(n.date));
2193
+ if (!ot(g, h)) return h;
2194
+ }
2195
+ if (e.length > 0) {
2196
+ const h = at(le(e[0]));
2197
+ if (ot(h, g)) return h;
2198
+ }
2199
+ return g;
2200
+ }), u = R(
2201
+ () => Ut(l, Lt - 1),
2202
+ [l]
2203
+ ), k = R(() => Array.from({ length: Lt }, (h, C) => {
2204
+ const $ = Ut(l, C), b = Ze($), F = (t[b] ?? []).map((z) => ({
2205
+ id: z.key,
2206
+ // SlotGrid formats `start` as a time via Intl.DateTimeFormat —
2207
+ // compose a full ISO from the column's date + the slot's HH:mm
2208
+ // so the locale-formatter has a real timestamp to work with.
2209
+ start: `${b}T${z.time}:00`,
2210
+ available: z.available
2211
+ }));
2212
+ return { date: b, slots: F };
2213
+ }), [l, t]), I = ot(l, g), N = !0, M = ue(() => {
2214
+ o((h) => {
2215
+ const C = tn(h, Lt);
2216
+ return ot(g, C) ? g : C;
2217
+ });
2218
+ }, [g]), w = ue(() => {
2219
+ o((h) => Ut(h, Lt));
2220
+ }, []);
2221
+ q(() => {
2222
+ if (e.length === 0) return;
2223
+ const h = at(le(e[0]));
2224
+ !ot(h, g) || e.some(($) => {
2225
+ const b = at(le($));
2226
+ return !ot(b, u) && !Qs(b, l);
2227
+ }) || o(h);
2228
+ }, [e]), q(() => {
2229
+ a == null || a(Ze(l), Ze(u));
2230
+ }, [l, u, a]);
2231
+ const x = ue(
2232
+ (h, C) => {
2233
+ const $ = typeof C.date == "string" ? C.date : Ze(C.date);
2234
+ r({
2235
+ ...Is($t(n, $), h.id)
2236
+ }), i == null || i($);
2237
+ },
2238
+ [r, i, n]
2239
+ ), S = c || f ? "loading" : "default", A = k.some((h) => h.slots.length > 0), D = e[0];
2240
+ return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2241
+ !A && !!D ? /* @__PURE__ */ s(
2242
+ es,
2243
+ {
2244
+ nextAvailableDate: D,
2245
+ onJump: () => o(at(le(D))),
2246
+ locale: p
2247
+ }
2248
+ ) : null,
2249
+ /* @__PURE__ */ s(
2250
+ Zs,
2251
+ {
2252
+ id: m ? `${m}-slots` : void 0,
2253
+ days: k,
2254
+ state: S,
2255
+ selectedSlotId: n.slotKey,
2256
+ maxInitialSlotsPerDay: 6,
2257
+ locale: p,
2258
+ hasPrevious: I,
2259
+ hasNext: N,
2260
+ onSlotSelect: x,
2261
+ onPreviousDays: M,
2262
+ onNextDays: w
2263
+ }
2264
+ )
2265
+ ] });
2266
+ }
2267
+ function Ts(e) {
2268
+ const {
2269
+ inputs: t,
2270
+ value: n,
2271
+ onChange: r,
2272
+ onDateSelect: i,
2273
+ onWindowChange: a,
2274
+ loadingDates: c,
2275
+ loadingSlots: f,
2276
+ locale: p,
2277
+ datePickerStyle: m,
2278
+ agentIdBase: g
2279
+ } = e;
2280
+ return m === "four-day-grid" ? /* @__PURE__ */ s(
2281
+ wi,
2282
+ {
2283
+ availableDates: t.availableDates,
2284
+ availableSlots: t.availableSlots,
2285
+ value: n,
2286
+ onChange: r,
2287
+ onDateSelect: i,
2288
+ onWindowChange: a,
2289
+ loadingDates: c,
2290
+ loadingSlots: f,
2291
+ locale: p,
2292
+ agentIdBase: g
2293
+ }
2294
+ ) : /* @__PURE__ */ s(
2295
+ bi,
2296
+ {
2297
+ availableDates: t.availableDates,
2298
+ selectedDate: n.date,
2299
+ onSelectDate: (l) => {
2300
+ r($t(n, l)), i == null || i(l);
2301
+ },
2302
+ locale: p,
2303
+ loading: c ?? f
2304
+ }
2305
+ );
2306
+ }
2307
+ function Ds(e) {
2308
+ const { inputs: t, value: n, onChange: r, loadingSlots: i, locale: a, datePickerStyle: c } = e;
2309
+ return c === "four-day-grid" || !n.date ? null : /* @__PURE__ */ s(
2310
+ Ni,
2311
+ {
2312
+ date: n.date,
2313
+ slots: t.availableSlots[n.date] ?? [],
2314
+ selectedSlotKey: n.slotKey,
2315
+ onSelect: (f) => r(Is(n, f.key)),
2316
+ loading: i,
2317
+ locale: a
2318
+ }
2319
+ );
2320
+ }
2321
+ function Os({ value: e, onChange: t }) {
2322
+ const { t: n } = G("ui"), r = [
2323
+ { value: "private", label: n("booking.insurance.private") },
2324
+ { value: "public", label: n("booking.insurance.public") }
2325
+ ];
2326
+ return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2327
+ /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: n("booking.insurance.heading") }),
2328
+ /* @__PURE__ */ s(
2329
+ Vt,
2330
+ {
2331
+ options: r,
2332
+ value: e ?? "",
2333
+ onValueChange: (i) => {
2334
+ (i === "private" || i === "public") && t(i);
2335
+ },
2336
+ placeholder: n("booking.insurance.placeholder"),
2337
+ "aria-label": n("booking.insurance.heading")
2338
+ }
2339
+ )
2340
+ ] });
2341
+ }
2342
+ function Ms({
2343
+ specialties: e,
2344
+ value: t,
2345
+ valueIds: n,
2346
+ onChange: r,
2347
+ onChangeIds: i,
2348
+ pickerStyle: a = "select"
2349
+ }) {
2350
+ const { t: c } = G("ui"), f = e.map((m) => ({
2351
+ value: m.id,
2352
+ label: m.label
2353
+ })), p = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: c("booking.specialty.heading") });
2354
+ return a === "multi-select" && i ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2355
+ p,
2356
+ /* @__PURE__ */ s(
2357
+ Zt,
2358
+ {
2359
+ options: f,
2360
+ value: n ?? [],
2361
+ onChange: i,
2362
+ placeholder: c("booking.specialty.placeholder"),
2363
+ "aria-label": c("booking.specialty.heading"),
2364
+ allowClear: !0
2365
+ }
2366
+ )
2367
+ ] }) : a === "combobox" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2368
+ p,
2369
+ /* @__PURE__ */ s(
2370
+ Yt,
2371
+ {
2372
+ options: f,
2373
+ value: t ?? "",
2374
+ onValueChange: (m) => r(m === "" ? "" : m),
2375
+ placeholder: c("booking.specialty.placeholder"),
2376
+ "aria-label": c("booking.specialty.heading"),
2377
+ clearable: !0
2378
+ }
2379
+ )
2380
+ ] }) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2381
+ p,
2382
+ /* @__PURE__ */ s(
2383
+ Vt,
2384
+ {
2385
+ options: f,
2386
+ value: t ?? "",
2387
+ onValueChange: (m) => r(m),
2388
+ placeholder: c("booking.specialty.placeholder"),
2389
+ "aria-label": c("booking.specialty.heading")
2390
+ }
2391
+ )
2392
+ ] });
2393
+ }
2394
+ function Fs({
2395
+ services: e,
2396
+ value: t,
2397
+ valueIds: n,
2398
+ onChange: r,
2399
+ onChangeIds: i,
2400
+ pickerStyle: a,
2401
+ compact: c,
2402
+ showDuration: f
2403
+ }) {
2404
+ const { t: p, i18n: m } = G("ui"), g = a ?? (c ? "select" : "cards"), l = e.map((u) => {
2405
+ const k = Qt(u), I = u.payment ? k ? p(`booking.payment.${k.kind}`, {
2406
+ amount: yt(
2407
+ k.amountCents,
2408
+ k.currencyCode,
2409
+ m.language
2410
+ )
2411
+ }) : p("booking.payment.unavailable") : As(u);
2412
+ return I ? {
2413
+ value: u.id,
2414
+ label: u.label,
2415
+ endContent: /* @__PURE__ */ s(ms, { variant: "accentSoft", size: "lg", children: I })
2416
+ } : {
2417
+ value: u.id,
2418
+ label: f ? `${u.label} · ${p("booking.serviceSummary", {
2419
+ minutes: u.durationMin
2420
+ })}` : u.label
2421
+ };
2422
+ }), o = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: p("booking.service.heading") });
2423
+ return g === "multi-select" && i ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2424
+ o,
2425
+ /* @__PURE__ */ s(
2426
+ Zt,
2427
+ {
2428
+ options: l,
2429
+ value: n ?? [],
2430
+ onChange: i,
2431
+ placeholder: p("booking.service.placeholder"),
2432
+ "aria-label": p("booking.service.heading"),
2433
+ allowClear: !0
2434
+ }
2435
+ )
2436
+ ] }) : g === "combobox" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2437
+ o,
2438
+ /* @__PURE__ */ s(
2439
+ Yt,
2440
+ {
2441
+ options: l,
2442
+ value: t ?? "",
2443
+ onValueChange: (u) => r(u === "" ? "" : u),
2444
+ placeholder: p("booking.service.placeholder"),
2445
+ "aria-label": p("booking.service.heading"),
2446
+ clearable: !0
2447
+ }
2448
+ )
2449
+ ] }) : g === "select" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2450
+ o,
2451
+ /* @__PURE__ */ s(
2452
+ Vt,
2453
+ {
2454
+ options: l,
2455
+ value: t ?? "",
2456
+ onValueChange: (u) => r(u),
2457
+ placeholder: p("booking.service.placeholder"),
2458
+ "aria-label": p("booking.service.heading")
2459
+ }
2460
+ )
2461
+ ] }) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2462
+ o,
2463
+ /* @__PURE__ */ s(
2464
+ ki,
2465
+ {
2466
+ services: e,
2467
+ selectedServiceId: t,
2468
+ onSelect: r,
2469
+ showDuration: f
2470
+ }
2471
+ )
2472
+ ] });
2473
+ }
2474
+ function _s({
2475
+ operators: e,
2476
+ value: t,
2477
+ valueIds: n,
2478
+ onChange: r,
2479
+ onChangeIds: i,
2480
+ pickerStyle: a = "select"
2481
+ }) {
2482
+ const { t: c } = G("ui"), f = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: c("booking.operator.heading") });
2483
+ if (a === "multi-select" && i) {
2484
+ const m = e.map((g) => ({
2485
+ value: g.id,
2486
+ label: g.name
2487
+ }));
2488
+ return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2489
+ f,
2490
+ /* @__PURE__ */ s(
2491
+ Zt,
2492
+ {
2493
+ options: m,
2494
+ value: n ?? [],
2495
+ onChange: i,
2496
+ placeholder: c("booking.operator.placeholder"),
2497
+ "aria-label": c("booking.operator.heading"),
2498
+ allowClear: !0
2499
+ }
2500
+ )
2501
+ ] });
2502
+ }
2503
+ const p = [
2504
+ { value: Ce, label: c("booking.operator.all") },
2505
+ ...e.map((m) => ({ value: m.id, label: m.name }))
2506
+ ];
2507
+ return a === "combobox" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2508
+ f,
2509
+ /* @__PURE__ */ s(
2510
+ Yt,
2511
+ {
2512
+ options: p,
2513
+ value: t ?? Ce,
2514
+ onValueChange: (m) => r(m === "" ? Ce : m),
2515
+ placeholder: c("booking.operator.placeholder"),
2516
+ "aria-label": c("booking.operator.heading"),
2517
+ clearable: !0
2518
+ }
2519
+ )
2520
+ ] }) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2521
+ f,
2522
+ /* @__PURE__ */ s(
2523
+ Vt,
2524
+ {
2525
+ options: p,
2526
+ value: t ?? Ce,
2527
+ onValueChange: (m) => r(m),
2528
+ placeholder: c("booking.operator.placeholder"),
2529
+ "aria-label": c("booking.operator.heading")
2530
+ }
2531
+ )
2532
+ ] });
2533
+ }
2534
+ function Ls({
2535
+ customSlot: e
2536
+ }) {
2537
+ const { t } = G("ui");
2538
+ return e ? /* @__PURE__ */ s(ne, { children: e }) : /* @__PURE__ */ v(ee, { variant: "warning", children: [
2539
+ /* @__PURE__ */ s(ee.Title, { as: "h4", children: t("booking.onboardingIncomplete.title") }),
2540
+ /* @__PURE__ */ s(ee.Description, { children: t("booking.onboardingIncomplete.description") })
2541
+ ] });
2542
+ }
2543
+ function es({
2544
+ nextAvailableDate: e,
2545
+ onJump: t,
2546
+ locale: n
2547
+ }) {
2548
+ const { t: r } = G("ui"), i = R(() => {
2549
+ try {
2550
+ return new Intl.DateTimeFormat(n, { dateStyle: "long" }).format(
2551
+ le(e)
2552
+ );
2553
+ } catch {
2554
+ return e;
2555
+ }
2556
+ }, [e, n]);
2557
+ return /* @__PURE__ */ v(ee, { variant: "info", children: [
2558
+ /* @__PURE__ */ s(ee.Description, { children: r("booking.nextAvailable.description", { date: i }) }),
2559
+ /* @__PURE__ */ s(ee.Action, { children: /* @__PURE__ */ s(Xe, { intent: "secondary", size: "sm", onClick: t, children: r("booking.nextAvailable.cta") }) })
2560
+ ] });
2561
+ }
2562
+ function Ci({
2563
+ payment: e,
2564
+ snapshot: t,
2565
+ operators: n,
2566
+ specialties: r,
2567
+ services: i,
2568
+ locale: a,
2569
+ mode: c,
2570
+ showModify: f,
2571
+ onReset: p,
2572
+ onModify: m,
2573
+ focusWasLost: g
2574
+ }) {
2575
+ const { t: l } = G("ui"), o = E(null);
2576
+ q(() => {
2577
+ const A = o.current, D = document.activeElement, T = A == null ? void 0 : A.closest('[data-component="booking"]');
2578
+ !e || !A || (D && (T != null && T.contains(D)) || g()) && A.focus();
2579
+ }, []);
2580
+ const k = (t.details.confirmationChannels ?? ["email"]).map(
2581
+ (A) => l(`booking.confirmation.channel.${A}`)
2582
+ ), I = e ? yt(e.amountCents, e.currencyCode, a) : "", N = e ? l(
2583
+ c === "demo" ? "booking.payment.paidDemo" : "booking.payment.paidBody",
2584
+ { amount: I }
2585
+ ) : c === "demo" ? l("booking.success.descriptionDemo") : k.length > 1 ? l("booking.success.descriptionMultiple", {
2586
+ channels: k.join(" · ")
2587
+ }) : l("booking.success.descriptionSingle", { channel: k[0] }), M = R(() => {
2588
+ if (t.date)
2589
+ try {
2590
+ return new Intl.DateTimeFormat(a, {
2591
+ weekday: "long",
2592
+ day: "numeric",
2593
+ month: "long"
2594
+ }).format(le(t.date));
2595
+ } catch {
2596
+ return t.date;
2597
+ }
2598
+ }, [t.date, a]), w = R(() => {
2599
+ const D = (t.operatorIds && t.operatorIds.length > 0 ? t.operatorIds : t.operatorId ? [t.operatorId] : []).filter((T) => T !== Ce).map((T) => {
2600
+ var h;
2601
+ return (h = n.find((C) => C.id === T)) == null ? void 0 : h.name;
2602
+ }).filter((T) => T !== void 0);
2603
+ if (D.length === 0) return "";
2604
+ try {
2605
+ return new Intl.ListFormat(a === "en" ? "en-GB" : a, {
2606
+ style: "long",
2607
+ type: "conjunction"
2608
+ }).format(D);
2609
+ } catch {
2610
+ return D.join(", ");
2611
+ }
2612
+ }, [t.operatorIds, t.operatorId, n, a]), x = t.specialtyId ? r.find((A) => A.id === t.specialtyId) : void 0, S = t.serviceId ? i.find((A) => A.id === t.serviceId) : void 0;
2613
+ return /* @__PURE__ */ v(
2614
+ "div",
2615
+ {
2616
+ "data-component": "booking-success",
2617
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
2618
+ children: [
2619
+ /* @__PURE__ */ v(ee, { variant: "success", children: [
2620
+ /* @__PURE__ */ s(
2621
+ ee.Title,
2622
+ {
2623
+ as: "h3",
2624
+ ref: o,
2625
+ tabIndex: e ? -1 : void 0,
2626
+ className: e ? Rt : void 0,
2627
+ children: l(
2628
+ e ? c === "demo" ? "booking.payment.paidDemoTitle" : "booking.payment.paidTitle" : "booking.success.heading"
2629
+ )
2630
+ }
2631
+ ),
2632
+ /* @__PURE__ */ s(ee.Description, { children: N })
2633
+ ] }),
2634
+ /* @__PURE__ */ s("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[var(--secondary)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ v("dl", { className: "ds:grid ds:grid-cols-[auto_minmax(0,1fr)] ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)] ds:m-0", children: [
2635
+ e && c !== "demo" ? /* @__PURE__ */ v(ne, { children: [
2636
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.payment.summaryPaid") }),
2637
+ /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: I })
2638
+ ] }) : null,
2639
+ x ? /* @__PURE__ */ v(ne, { children: [
2640
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summarySpecialty") }),
2641
+ /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: x.label })
2642
+ ] }) : null,
2643
+ S ? /* @__PURE__ */ v(ne, { children: [
2644
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summaryService") }),
2645
+ /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: S.label })
2646
+ ] }) : null,
2647
+ M ? /* @__PURE__ */ v(ne, { children: [
2648
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summaryDate") }),
2649
+ /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: M })
2650
+ ] }) : null,
2651
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summaryTime") }),
2652
+ /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: t.slot.time }),
2653
+ w ? /* @__PURE__ */ v(ne, { children: [
2654
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summaryProvider") }),
2655
+ /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: w })
2656
+ ] }) : null
2657
+ ] }) }),
2658
+ /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
2659
+ /* @__PURE__ */ s(Xe, { intent: "secondary", size: "md", onClick: p, children: l("booking.success.bookAnother") }),
2660
+ f ? /* @__PURE__ */ s(Xe, { intent: "ghost", size: "md", onClick: m, children: l("booking.success.modifyBooking") }) : null
2661
+ ] })
2662
+ ]
2663
+ }
2664
+ );
2665
+ }
2666
+ function Bs({ customSlot: e }) {
2667
+ const { t } = G("ui");
2668
+ return e ? /* @__PURE__ */ s(ne, { children: e }) : /* @__PURE__ */ s(
2669
+ fs,
2670
+ {
2671
+ variant: "no-results",
2672
+ title: t("booking.emptyServices.title"),
2673
+ description: t("booking.emptyServices.description")
2674
+ }
2675
+ );
2676
+ }
2677
+ const Es = "data-booking-step-active", Ai = `[${Es}]`, Rt = [
2678
+ "ds:focus-visible:outline-[length:var(--focus-ring-width)]",
2679
+ "ds:focus-visible:outline-solid",
2680
+ "ds:focus-visible:outline-[var(--ring)]",
2681
+ "ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
2682
+ "ds:forced-colors:focus-visible:outline-[CanvasText]"
2683
+ ].join(" ");
2684
+ function U({
2685
+ step: e,
2686
+ active: t,
2687
+ className: n,
2688
+ id: r,
2689
+ children: i
2690
+ }) {
2691
+ return /* @__PURE__ */ s(
2692
+ "div",
2693
+ {
2694
+ id: r,
2695
+ "data-booking-step": String(e),
2696
+ ...t ? { [Es]: "" } : null,
2697
+ tabIndex: -1,
2698
+ className: n ? `${n} ${Rt}` : Rt,
2699
+ children: i
2700
+ }
2701
+ );
2702
+ }
2703
+ function ts(e, t) {
2704
+ return t === "four-day-grid" ? e.filter((n) => n !== 6) : e;
2705
+ }
2706
+ function Ti(e) {
2707
+ const {
2708
+ cascade: t,
2709
+ inputs: n,
2710
+ value: r,
2711
+ onChange: i,
2712
+ onSubmit: a,
2713
+ emptyServicesSlot: c,
2714
+ onboardingIncompleteSlot: f,
2715
+ loadingDates: p,
2716
+ loadingSlots: m,
2717
+ onDateSelect: g,
2718
+ onWindowChange: l,
2719
+ datePickerStyle: o,
2720
+ specialtyPickerStyle: u,
2721
+ servicePickerStyle: k,
2722
+ showServiceDuration: I,
2723
+ operatorPickerStyle: N,
2724
+ submitting: M,
2725
+ locale: w,
2726
+ detailsProps: x,
2727
+ agentIdBase: S,
2728
+ activeStep: A
2729
+ } = e, { t: D } = G("ui"), T = ct(A, o), h = (C, $) => ({
2730
+ step: C,
2731
+ active: C === T,
2732
+ className: $
2733
+ });
2734
+ return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2735
+ t.gates.insurance ? /* @__PURE__ */ s(U, { ...h(1), children: /* @__PURE__ */ s(
2736
+ Os,
2737
+ {
2738
+ value: r.insuranceType,
2739
+ onChange: (C) => i(hs(r, C))
2740
+ }
2741
+ ) }) : null,
2742
+ t.gates.specialty ? /* @__PURE__ */ s(U, { ...h(2), children: /* @__PURE__ */ s(
2743
+ Ms,
2744
+ {
2745
+ specialties: t.filtered.specialties,
2746
+ value: r.specialtyId,
2747
+ valueIds: r.specialtyIds,
2748
+ onChange: (C) => i(vs(r, C)),
2749
+ onChangeIds: (C) => i(bs(r, C)),
2750
+ pickerStyle: u
2751
+ }
2752
+ ) }) : null,
2753
+ t.gates.service ? /* @__PURE__ */ s(U, { ...h(3), children: t.filtered.services.length === 0 ? /* @__PURE__ */ s(Bs, { customSlot: c }) : /* @__PURE__ */ s(
2754
+ Fs,
2755
+ {
2756
+ services: t.filtered.services,
2757
+ value: r.serviceId,
2758
+ valueIds: r.serviceIds,
2759
+ onChange: (C) => i(ys(r, C)),
2760
+ onChangeIds: (C) => i(ks(r, C)),
2761
+ pickerStyle: k,
2762
+ showDuration: I
2763
+ }
2764
+ ) }) : null,
2765
+ t.gates.onboardingIncomplete ? /* @__PURE__ */ s(Ls, { customSlot: f }) : null,
2766
+ t.gates.operator ? /* @__PURE__ */ s(U, { ...h(4), children: /* @__PURE__ */ s(
2767
+ _s,
2768
+ {
2769
+ operators: t.filtered.operators,
2770
+ value: r.operatorId,
2771
+ valueIds: r.operatorIds,
2772
+ onChange: (C) => i(Ss(r, C)),
2773
+ onChangeIds: (C) => i(xs(r, C)),
2774
+ pickerStyle: N
2775
+ }
2776
+ ) }) : null,
2777
+ t.gates.date ? /* @__PURE__ */ v(
2778
+ U,
2779
+ {
2780
+ ...h(5, "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"),
2781
+ children: [
2782
+ /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: D("booking.date.heading") }),
2783
+ n.availableDates.length === 0 && n.nextAvailableDate ? /* @__PURE__ */ s(
2784
+ es,
2785
+ {
2786
+ nextAvailableDate: n.nextAvailableDate,
2787
+ onJump: () => i($t(r, n.nextAvailableDate)),
2788
+ locale: w
2789
+ }
2790
+ ) : Ts({
2791
+ inputs: n,
2792
+ value: r,
2793
+ onChange: i,
2794
+ onDateSelect: g,
2795
+ onWindowChange: l,
2796
+ loadingDates: p,
2797
+ loadingSlots: m,
2798
+ locale: w,
2799
+ datePickerStyle: o,
2800
+ agentIdBase: S
2801
+ })
2802
+ ]
2803
+ }
2804
+ ) : null,
2805
+ t.gates.slot && r.date && o === "month-calendar" ? /* @__PURE__ */ v(
2806
+ U,
2807
+ {
2808
+ ...h(6, "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"),
2809
+ children: [
2810
+ /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: D("booking.slot.heading") }),
2811
+ Ds({
2812
+ inputs: n,
2813
+ value: r,
2814
+ onChange: i,
2815
+ loadingSlots: m,
2816
+ locale: w,
2817
+ datePickerStyle: o
2818
+ })
2819
+ ]
2820
+ }
2821
+ ) : null,
2822
+ t.gates.details && t.selectedSlot ? /* @__PURE__ */ s(U, { ...h(7), children: /* @__PURE__ */ s(
2823
+ Xt,
2824
+ {
2825
+ ...x,
2826
+ value: r.details ?? {},
2827
+ onChange: (C) => i({ ...r, details: C }),
2828
+ onSubmit: a,
2829
+ submitting: M,
2830
+ defaultPhoneCountry: e.policy.country
2831
+ }
2832
+ ) }) : null
2833
+ ] });
2834
+ }
2835
+ function ye(e, t, n = {}) {
2836
+ const {
2837
+ cascade: r,
2838
+ inputs: i,
2839
+ value: a,
2840
+ onChange: c,
2841
+ onSubmit: f,
2842
+ emptyServicesSlot: p,
2843
+ onboardingIncompleteSlot: m,
2844
+ loadingDates: g,
2845
+ loadingSlots: l,
2846
+ onDateSelect: o,
2847
+ onWindowChange: u,
2848
+ datePickerStyle: k,
2849
+ specialtyPickerStyle: I,
2850
+ servicePickerStyle: N,
2851
+ showServiceDuration: M,
2852
+ operatorPickerStyle: w,
2853
+ submitting: x,
2854
+ locale: S,
2855
+ detailsProps: A,
2856
+ policy: D,
2857
+ agentIdBase: T
2858
+ } = t;
2859
+ switch (e) {
2860
+ case 1:
2861
+ return /* @__PURE__ */ s(
2862
+ Os,
2863
+ {
2864
+ value: a.insuranceType,
2865
+ onChange: (h) => c(hs(a, h))
2866
+ }
2867
+ );
2868
+ case 2:
2869
+ return /* @__PURE__ */ s(
2870
+ Ms,
2871
+ {
2872
+ specialties: r.filtered.specialties,
2873
+ value: a.specialtyId,
2874
+ valueIds: a.specialtyIds,
2875
+ onChange: (h) => c(vs(a, h)),
2876
+ onChangeIds: (h) => c(bs(a, h)),
2877
+ pickerStyle: I
2878
+ }
2879
+ );
2880
+ case 3:
2881
+ return r.filtered.services.length === 0 ? /* @__PURE__ */ s(Bs, { customSlot: p }) : r.gates.onboardingIncomplete ? /* @__PURE__ */ s(Ls, { customSlot: m }) : /* @__PURE__ */ s(
2882
+ Fs,
2883
+ {
2884
+ services: r.filtered.services,
2885
+ value: a.serviceId,
2886
+ valueIds: a.serviceIds,
2887
+ onChange: (h) => c(ys(a, h)),
2888
+ onChangeIds: (h) => c(ks(a, h)),
2889
+ pickerStyle: N,
2890
+ compact: n.compactService,
2891
+ showDuration: M
2892
+ }
2893
+ );
2894
+ case 4:
2895
+ return /* @__PURE__ */ s(
2896
+ _s,
2897
+ {
2898
+ operators: r.filtered.operators,
2899
+ value: a.operatorId,
2900
+ valueIds: a.operatorIds,
2901
+ onChange: (h) => c(Ss(a, h)),
2902
+ onChangeIds: (h) => c(xs(a, h)),
2903
+ pickerStyle: w
2904
+ }
2905
+ );
2906
+ case 5:
2907
+ return i.availableDates.length === 0 && i.nextAvailableDate ? /* @__PURE__ */ s(
2908
+ es,
2909
+ {
2910
+ nextAvailableDate: i.nextAvailableDate,
2911
+ onJump: () => c($t(a, i.nextAvailableDate)),
2912
+ locale: S
2913
+ }
2914
+ ) : Ts({
2915
+ inputs: i,
2916
+ value: a,
2917
+ onChange: c,
2918
+ onDateSelect: o,
2919
+ onWindowChange: u,
2920
+ loadingDates: g,
2921
+ loadingSlots: l,
2922
+ locale: S,
2923
+ datePickerStyle: k,
2924
+ agentIdBase: T
2925
+ });
2926
+ case 6:
2927
+ return Ds({
2928
+ inputs: i,
2929
+ value: a,
2930
+ onChange: c,
2931
+ loadingSlots: l,
2932
+ locale: S,
2933
+ datePickerStyle: k
2934
+ });
2935
+ case 7:
2936
+ return r.selectedSlot ? /* @__PURE__ */ s(
2937
+ Xt,
2938
+ {
2939
+ ...A,
2940
+ value: a.details ?? {},
2941
+ onChange: (h) => c({ ...a, details: h }),
2942
+ onSubmit: f,
2943
+ submitting: x,
2944
+ defaultPhoneCountry: D.country
2945
+ }
2946
+ ) : null;
2947
+ /* c8 ignore next 2 */
2948
+ default:
2949
+ return null;
2950
+ }
2951
+ }
2952
+ function qt() {
2953
+ const { t: e } = G("ui");
2954
+ return R(
2955
+ () => ({
2956
+ 1: e("booking.insurance.heading"),
2957
+ 2: e("booking.specialty.heading"),
2958
+ 3: e("booking.service.heading"),
2959
+ 4: e("booking.operator.heading"),
2960
+ 5: e("booking.date.heading"),
2961
+ 6: e("booking.slot.heading"),
2962
+ 7: e("booking.details.heading")
2963
+ }),
2964
+ [e]
2965
+ );
2966
+ }
2967
+ function ct(e, t) {
2968
+ return t === "four-day-grid" && e === 6 ? 5 : e;
2969
+ }
2970
+ function Di(e) {
2971
+ const { cascade: t, value: n, activeStep: r, setActiveStep: i, datePickerStyle: a } = e, c = qt(), { t: f } = G("ui"), p = f("booking.operator.all"), m = R(
2972
+ () => ts(t.visibleSteps, a),
2973
+ [t.visibleSteps, a]
2974
+ ), g = ct(r, a), l = Math.max(0, m.indexOf(g)), o = R(
2975
+ () => m.map((u) => ({
2976
+ label: c[u],
2977
+ summary: Rs(u, n, t, p),
2978
+ status: Oi(u, n, t),
2979
+ content: /* @__PURE__ */ s(U, { step: u, active: u === g, children: ye(u, e, { compactService: !0 }) })
2980
+ })),
2981
+ [
2982
+ m,
2983
+ n,
2984
+ c,
2985
+ t,
2986
+ e,
2987
+ g,
2988
+ p
2989
+ ]
2990
+ );
2991
+ return /* @__PURE__ */ s(
2992
+ Ws,
2993
+ {
2994
+ activeStep: l,
2995
+ steps: o,
2996
+ onStepChange: (u) => {
2997
+ const k = m[u];
2998
+ k && i(k);
2999
+ }
3000
+ }
3001
+ );
3002
+ }
3003
+ function Oi(e, t, n) {
3004
+ return Fe(e, t) && e < n.currentStep ? "completed" : e <= n.currentStep ? "unlocked" : void 0;
3005
+ }
3006
+ function ds(e, t) {
3007
+ return e !== 4 ? Fe(e, t) : t.operatorIds && t.operatorIds.length > 0 ? !0 : Ns(t) !== void 0;
3008
+ }
3009
+ function Ht(e, t) {
3010
+ const n = e.map((r) => {
3011
+ var i;
3012
+ return (i = t.find((a) => a.id === r)) == null ? void 0 : i.label;
3013
+ }).filter((r) => r !== void 0);
3014
+ return n.length > 0 ? n.join(", ") : void 0;
3015
+ }
3016
+ function Rs(e, t, n, r) {
3017
+ var i;
3018
+ if (Fe(e, t))
3019
+ switch (e) {
3020
+ case 1:
3021
+ return t.insuranceType;
3022
+ case 2:
3023
+ return Ht(
3024
+ Ge(t),
3025
+ n.filtered.specialties
3026
+ );
3027
+ case 3:
3028
+ return Ht(_e(t), n.filtered.services);
3029
+ case 4: {
3030
+ const c = Wt(t).filter((p) => p !== Ce), f = Ht(
3031
+ c,
3032
+ n.filtered.operators.map((p) => ({
3033
+ id: p.id,
3034
+ label: p.name
3035
+ }))
3036
+ );
3037
+ return f !== void 0 ? f : c.length === 0 ? r : void 0;
3038
+ }
3039
+ case 5:
3040
+ return t.date;
3041
+ case 6:
3042
+ return (i = n.selectedSlot) == null ? void 0 : i.time;
3043
+ case 7:
3044
+ return;
3045
+ }
3046
+ }
3047
+ function Mi(e) {
3048
+ const { cascade: t, value: n, activeStep: r, setActiveStep: i } = e, { t: a } = G("ui"), c = qt(), f = a("booking.operator.all"), p = `${Pt()}-filter`, m = ct(r, e.datePickerStyle), g = t.visibleSteps.filter(
3049
+ (u) => u === 1 || u === 2 || u === 3 || u === 4
3050
+ ), l = g.some(
3051
+ (u) => !Fe(u, n)
3052
+ ), o = g.some(
3053
+ (u) => u === r
3054
+ ) ? r : g.find((u) => !Fe(u, n));
3055
+ return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
3056
+ g.length > 0 ? /* @__PURE__ */ s(
3057
+ "div",
3058
+ {
3059
+ role: "group",
3060
+ "aria-label": a("booking.filtersLabel"),
3061
+ className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
3062
+ children: g.map((u) => {
3063
+ const k = Rs(
3064
+ u,
3065
+ n,
3066
+ t,
3067
+ f
3068
+ ), I = u === o, N = Fe(u, n);
3069
+ return /* @__PURE__ */ s(
3070
+ Xe,
3071
+ {
3072
+ intent: I ? "primary" : "outline",
3073
+ size: "sm",
3074
+ endIcon: /* @__PURE__ */ s(
3075
+ Xs,
3076
+ {
3077
+ "aria-hidden": "true",
3078
+ className: I ? "ds:rotate-180" : void 0
3079
+ }
3080
+ ),
3081
+ "aria-expanded": N ? I : void 0,
3082
+ "aria-controls": N && I ? p : void 0,
3083
+ "aria-current": !N && I ? "step" : void 0,
3084
+ onClick: () => i(
3085
+ N && I ? t.currentStep : u
3086
+ ),
3087
+ children: k ? /* @__PURE__ */ v(ne, { children: [
3088
+ c[u],
3089
+ ": ",
3090
+ k
3091
+ ] }) : c[u]
3092
+ },
3093
+ `csc-${u}`
3094
+ );
3095
+ })
3096
+ }
3097
+ ) : null,
3098
+ o !== void 0 ? /* @__PURE__ */ s(
3099
+ U,
3100
+ {
3101
+ step: o,
3102
+ active: o === m,
3103
+ id: p,
3104
+ children: ye(o, e, { compactService: !0 })
3105
+ }
3106
+ ) : null,
3107
+ !l && t.gates.date ? (
3108
+ // four-day-grid embeds slots inline with the day strip — the
3109
+ // historic 2-col date|slot split collapses to a single column
3110
+ // so the picker spans the full width instead of orphaning an
3111
+ // empty right cell.
3112
+ e.datePickerStyle === "four-day-grid" ? /* @__PURE__ */ s(U, { step: 5, active: m === 5, children: ye(5, e) }) : /* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
3113
+ /* @__PURE__ */ s(
3114
+ U,
3115
+ {
3116
+ step: 5,
3117
+ active: m === 5,
3118
+ className: "ds:min-w-0",
3119
+ children: ye(5, e)
3120
+ }
3121
+ ),
3122
+ n.date ? /* @__PURE__ */ s(
3123
+ U,
3124
+ {
3125
+ step: 6,
3126
+ active: m === 6,
3127
+ className: "ds:min-w-0",
3128
+ children: ye(6, e)
3129
+ }
3130
+ ) : /* @__PURE__ */ s("div", { className: "ds:min-w-0" })
3131
+ ] })
3132
+ ) : null,
3133
+ t.gates.details ? /* @__PURE__ */ s(U, { step: 7, active: m === 7, children: ye(7, e) }) : null
3134
+ ] });
3135
+ }
3136
+ function Fi(e) {
3137
+ const { cascade: t, datePickerStyle: n, activeStep: r } = e, i = ct(r, n), a = t.visibleSteps.filter(
3138
+ (f) => f === 1 || f === 2 || f === 3 || f === 4
3139
+ );
3140
+ return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
3141
+ /* @__PURE__ */ v(
3142
+ "div",
3143
+ {
3144
+ className: n === "four-day-grid" ? "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]" : "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2",
3145
+ children: [
3146
+ /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: a.map((f) => /* @__PURE__ */ s(U, { step: f, active: f === i, children: ye(f, e, { compactService: !0 }) }, `fbf-${f}`)) }),
3147
+ /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
3148
+ t.gates.date ? /* @__PURE__ */ s(U, { step: 5, active: i === 5, children: ye(5, e) }) : null,
3149
+ t.gates.slot && e.value.date && n === "month-calendar" ? /* @__PURE__ */ s(U, { step: 6, active: i === 6, children: ye(6, e) }) : null
3150
+ ] })
3151
+ ]
3152
+ }
3153
+ ),
3154
+ t.gates.details ? /* @__PURE__ */ s(U, { step: 7, active: i === 7, children: ye(7, e) }) : null
3155
+ ] });
3156
+ }
3157
+ function _i(e) {
3158
+ const { cascade: t, value: n, activeStep: r, setActiveStep: i, datePickerStyle: a } = e, { t: c } = G("ui"), f = qt(), p = R(
3159
+ () => ts(t.visibleSteps, a),
3160
+ [t.visibleSteps, a]
3161
+ ), m = ct(r, a), g = Math.max(0, p.indexOf(m)), l = p.length, o = R(
3162
+ () => p.map((N) => ({ label: f[N] })),
3163
+ [p, f]
3164
+ ), u = g > 0, k = m === 5 && a === "four-day-grid", I = g < l - 1 && Fe(m, n) && (!k || Fe(6, n));
3165
+ return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
3166
+ /* @__PURE__ */ s(Ys, { activeStep: g, steps: o }),
3167
+ /* @__PURE__ */ s(U, { step: m, active: !0, children: ye(m, e, { compactService: !0 }) }),
3168
+ /* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
3169
+ /* @__PURE__ */ s(
3170
+ Xe,
3171
+ {
3172
+ intent: "ghost",
3173
+ size: "md",
3174
+ disabled: !u,
3175
+ onClick: () => {
3176
+ const N = p[g - 1];
3177
+ N && i(N);
3178
+ },
3179
+ children: c("booking.actions.back")
3180
+ }
3181
+ ),
3182
+ m < 7 ? /* @__PURE__ */ s(
3183
+ Xe,
3184
+ {
3185
+ intent: "primary",
3186
+ size: "md",
3187
+ disabled: !I,
3188
+ onClick: () => {
3189
+ const N = p[g + 1];
3190
+ N && i(N);
3191
+ },
3192
+ children: c("booking.actions.next")
3193
+ }
3194
+ ) : null
3195
+ ] })
3196
+ ] });
3197
+ }
3198
+ const Li = [], Bi = [];
3199
+ function ls() {
3200
+ return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
3201
+ }
3202
+ const Ei = us(
3203
+ ({
3204
+ variant: e = "inline-list",
3205
+ country: t,
3206
+ // No default — the cascade engine treats `undefined` as "auto-on
3207
+ // when `specialties` has items" so consumers who pass specialty
3208
+ // data without the explicit flag still get the step.
3209
+ useSpecialties: n,
3210
+ allowOperatorSelection: r = !1,
3211
+ lockedOperatorId: i,
3212
+ operatorsByService: a = !1,
3213
+ autoSelectSingleService: c = !1,
3214
+ specialties: f,
3215
+ services: p,
3216
+ operators: m,
3217
+ availableDates: g,
3218
+ availableSlots: l,
3219
+ nextAvailableDate: o,
3220
+ requireCodiceFiscale: u,
3221
+ requireDateOfBirth: k,
3222
+ requireInsuranceNumber: I,
3223
+ billingInDetails: N = !1,
3224
+ paymentNoticeStyle: M = "plain",
3225
+ showNote: w,
3226
+ showReturningPatientFlag: x,
3227
+ privacyPolicyUrl: S,
3228
+ termsUrl: A,
3229
+ practiceConsent: D,
3230
+ paymentTermsUrl: T,
3231
+ paymentState: h,
3232
+ renderPayment: C,
3233
+ renderPaymentCompletion: $,
3234
+ validateCodiceFiscale: b,
3235
+ validateInsuranceNumber: pe,
3236
+ confirmationChannels: F,
3237
+ defaultConfirmationChannels: z,
3238
+ value: _,
3239
+ onChange: me,
3240
+ onSubmit: dt,
3241
+ onStepChange: fe,
3242
+ onDateSelect: He,
3243
+ onWindowChange: Le,
3244
+ datePickerStyle: H = "month-calendar",
3245
+ specialtyPickerStyle: Be,
3246
+ servicePickerStyle: ge,
3247
+ showServiceDuration: J = !0,
3248
+ operatorPickerStyle: ae,
3249
+ loadingDates: he,
3250
+ loadingSlots: Se,
3251
+ submitting: W,
3252
+ submitError: Ae,
3253
+ mode: ie = "live",
3254
+ showModifyOnSuccess: oe = !0,
3255
+ surface: te = "flat",
3256
+ emptyServicesSlot: L,
3257
+ onboardingIncompleteSlot: xe,
3258
+ "aria-label": Kt,
3259
+ id: Ee,
3260
+ className: kt,
3261
+ onFocus: Qe,
3262
+ onBlur: Re,
3263
+ ...Ie
3264
+ }, zt) => {
3265
+ var gt, d, O;
3266
+ const { t: Z, i18n: St } = G("ui"), se = e ?? "inline-list", Te = St.language ?? "en", Ne = f ?? Li, ve = m ?? Bi;
3267
+ q(() => {
3268
+ const y = jn(_, {
3269
+ useSpecialties: n,
3270
+ lockedOperatorId: i,
3271
+ autoSelectSingleService: c,
3272
+ specialties: Ne,
3273
+ services: p
3274
+ });
3275
+ (y.specialtyId !== _.specialtyId || y.operatorId !== _.operatorId || y.serviceId !== _.serviceId) && me(y);
3276
+ }, [
3277
+ i,
3278
+ n,
3279
+ c,
3280
+ Ne,
3281
+ p
3282
+ ]);
3283
+ const B = R(
3284
+ () => zn({
3285
+ country: t,
3286
+ useSpecialties: n,
3287
+ allowOperatorSelection: r,
3288
+ lockedOperatorId: i,
3289
+ operatorsByService: a,
3290
+ specialties: Ne,
3291
+ services: p,
3292
+ operators: ve,
3293
+ availableSlots: l,
3294
+ value: _
3295
+ }),
3296
+ [
3297
+ t,
3298
+ n,
3299
+ r,
3300
+ i,
3301
+ a,
3302
+ c,
3303
+ Ne,
3304
+ p,
3305
+ ve,
3306
+ g,
3307
+ l,
3308
+ _
3309
+ ]
3310
+ ), et = R(
3311
+ () => [
3312
+ JSON.stringify(_.insuranceType),
3313
+ JSON.stringify(Ge(_)),
3314
+ JSON.stringify(_e(_)),
3315
+ JSON.stringify(Wt(_)),
3316
+ JSON.stringify(_.date),
3317
+ JSON.stringify(_.slotKey)
3318
+ ],
3319
+ [_]
3320
+ ), Je = se === "progress", We = ue(
3321
+ (y) => {
3322
+ if (y === 4 && B.visibleSteps.includes(4) && Wt(_).length === 0)
3323
+ return Math.min(4, B.currentStep);
3324
+ if (!Je) return B.currentStep;
3325
+ const P = B.visibleSteps.find(
3326
+ (V) => V > y && !ds(V, _)
3327
+ );
3328
+ return P === void 0 ? B.currentStep : Math.min(P, B.currentStep);
3329
+ },
3330
+ [Je, B.visibleSteps, B.currentStep, _]
3331
+ ), [X, we] = Q(
3332
+ B.currentStep
3333
+ ), Pe = E(et), Ve = E(B.visibleSteps);
3334
+ q(() => {
3335
+ const y = Pe.current, P = Ve.current;
3336
+ Pe.current = et, Ve.current = B.visibleSteps;
3337
+ const V = et.findIndex(
3338
+ (de, ss) => de !== y[ss]
3339
+ );
3340
+ if (V !== -1) {
3341
+ we(We(V + 1));
3342
+ return;
3343
+ }
3344
+ const Y = Je ? B.visibleSteps.find(
3345
+ (de) => de < X && !P.includes(de) && !ds(de, _)
3346
+ ) : void 0;
3347
+ if (Y !== void 0) {
3348
+ we(Y);
3349
+ return;
3350
+ }
3351
+ B.visibleSteps.includes(X) || we(B.currentStep);
3352
+ }, [
3353
+ et,
3354
+ We,
3355
+ Je,
3356
+ B.currentStep,
3357
+ B.visibleSteps,
3358
+ X,
3359
+ _
3360
+ ]);
3361
+ const ce = E(null), De = R(
3362
+ () => ts(B.visibleSteps, H),
3363
+ [B.visibleSteps, H]
3364
+ ), xt = qt(), [tt, $e] = Q(""), qe = E(null), Oe = E(null);
3365
+ q(() => {
3366
+ const y = ct(X, H);
3367
+ if (Oe.current === null) {
3368
+ Oe.current = y;
3369
+ return;
3370
+ }
3371
+ if (Oe.current === y) return;
3372
+ Oe.current = y;
3373
+ const P = De.indexOf(y);
3374
+ $e(
3375
+ P === -1 ? "" : Z("booking.stepAnnouncement", {
3376
+ current: P + 1,
3377
+ total: De.length,
3378
+ label: xt[y]
3379
+ })
3380
+ );
3381
+ const V = qe.current;
3382
+ if (!V || V.isConnected) return;
3383
+ const Y = ce.current;
3384
+ if (!Y) return;
3385
+ const de = document.activeElement;
3386
+ if (!(de === null || de === document.body || !Y.contains(de))) return;
3387
+ const Tt = Y.querySelector(Ai) ?? Y;
3388
+ if (Tt.focus({ preventScroll: !0 }), typeof Tt.scrollIntoView == "function")
3389
+ try {
3390
+ Tt.scrollIntoView({
3391
+ behavior: ls() ? "auto" : "smooth",
3392
+ block: "nearest"
3393
+ });
3394
+ } catch {
3395
+ Tt.scrollIntoView();
3396
+ }
3397
+ }, [X, H, De, xt, Z]);
3398
+ const K = ui({
3399
+ services: p,
3400
+ value: _,
3401
+ availableSlots: l,
3402
+ onSubmit: dt,
3403
+ onChange: me,
3404
+ paymentState: h,
3405
+ submitting: W,
3406
+ paymentTermsUrl: T,
3407
+ renderPayment: C
3408
+ }), j = K.status, lt = K.submit, st = E(K.reset);
3409
+ st.current = K.reset;
3410
+ const ut = Pt(), Ke = E(null), nt = E(null), it = ((gt = K.state) == null ? void 0 : gt.status) === "failed", It = K.state && "phase" in K.state && K.state.phase === "completion";
3411
+ q(() => {
3412
+ var y, P;
3413
+ if (j === "payment") {
3414
+ const V = document.activeElement;
3415
+ (!It || !V || V === document.body || !((y = ce.current) != null && y.contains(V))) && ((P = Ke.current) == null || P.focus());
3416
+ }
3417
+ }, [j, It]), q(() => {
3418
+ var y;
3419
+ j === "payment" && it && ((y = nt.current) == null || y.focus());
3420
+ }, [j, it]), Vs(zt, () => ce.current, []);
3421
+ const Me = j === "success" ? 8 : j === "payment" ? 7 : B.currentStep, pt = E(null);
3422
+ q(() => {
3423
+ if (Me !== pt.current && (pt.current = Me, fe == null || fe(Me), Me === 8 && ce.current))
3424
+ try {
3425
+ ce.current.scrollIntoView({
3426
+ behavior: ls() ? "auto" : "smooth",
3427
+ block: "start"
3428
+ });
3429
+ } catch {
3430
+ ce.current.scrollIntoView();
3431
+ }
3432
+ }, [Me, fe]);
3433
+ const Ye = E({ activeStep: X, cascade: B, submitState: j });
3434
+ q(() => {
3435
+ Ye.current = { activeStep: X, cascade: B, submitState: j };
3436
+ }, [X, B, j]);
3437
+ const Nt = R(
3438
+ () => ({
3439
+ getVariant: () => se,
3440
+ getCurrentStep: () => {
3441
+ const y = Ye.current;
3442
+ return y.submitState === "success" ? 8 : y.submitState === "payment" ? 7 : y.activeStep;
3443
+ },
3444
+ reset: () => {
3445
+ Ye.current.submitState !== "payment" && (me({}), st.current(), we(1));
3446
+ },
3447
+ goToStep: (y) => {
3448
+ const P = Ye.current, V = P.cascade.visibleSteps.includes(y), Y = P.cascade.currentStep, de = P.submitState === "payment" ? 7 : !V || y > Y ? Y : y;
3449
+ Ye.current = { ...P, activeStep: de }, we(de);
3450
+ }
3451
+ }),
3452
+ [se, me]
3453
+ );
3454
+ qs(En, Nt, Ee);
3455
+ const jt = Kt ?? Z("booking.regionLabel"), be = K.snapshot, wt = j === "success" && be ? /* @__PURE__ */ s(
3456
+ Ci,
3457
+ {
3458
+ payment: be.payment,
3459
+ snapshot: {
3460
+ ...be.value,
3461
+ slot: be.slot,
3462
+ details: be.details,
3463
+ serviceId: ((d = be.payment) == null ? void 0 : d.serviceId) ?? be.slot.serviceId ?? be.value.serviceId
3464
+ },
3465
+ operators: ve,
3466
+ specialties: Ne,
3467
+ services: p,
3468
+ locale: Te,
3469
+ mode: ie,
3470
+ showModify: oe && !be.payment,
3471
+ onReset: () => Nt.reset(),
3472
+ focusWasLost: () => {
3473
+ const y = qe.current, P = document.activeElement;
3474
+ return !!(y && !y.isConnected) && (!P || P === document.body);
3475
+ },
3476
+ onModify: () => {
3477
+ st.current(), we(7);
3478
+ }
3479
+ }
3480
+ ) : null, mt = K.activeSession, ze = K.state, re = mt && ze ? {
3481
+ session: mt,
3482
+ payment: mt.payment,
3483
+ state: ze,
3484
+ billing: (O = K.snapshot) == null ? void 0 : O.details.billing
3485
+ } : void 0, je = ze && "phase" in ze && ze.phase === "completion", Ct = j === "payment" && re ? /* @__PURE__ */ v(
3486
+ "section",
3487
+ {
3488
+ "aria-labelledby": ut,
3489
+ "data-component": "booking-payment",
3490
+ "data-payment-status": re.state.status,
3491
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
3492
+ children: [
3493
+ /* @__PURE__ */ s(
3494
+ "h3",
3495
+ {
3496
+ ref: Ke,
3497
+ id: ut,
3498
+ tabIndex: -1,
3499
+ className: "type-title-card ds:m-0",
3500
+ children: Z(
3501
+ je ? "booking.payment.confirming" : "booking.payment.heading"
3502
+ )
3503
+ }
3504
+ ),
3505
+ je ? null : /* @__PURE__ */ s("p", { className: "type-body ds:m-0", children: Z("booking.payment.noticeBody", {
3506
+ amount: yt(
3507
+ re.payment.amountCents,
3508
+ re.payment.currencyCode,
3509
+ Te
3510
+ )
3511
+ }) }),
3512
+ /* @__PURE__ */ s(
3513
+ "p",
3514
+ {
3515
+ role: "status",
3516
+ className: re.state.status === "processing" ? "type-body ds:m-0 ds:flex ds:items-center ds:gap-[var(--spacing-sm)]" : "ds:sr-only",
3517
+ children: re.state.status === "processing" ? /* @__PURE__ */ v(ne, { children: [
3518
+ /* @__PURE__ */ s(ps, { variant: "pulse", size: "lg", "aria-hidden": "true" }),
3519
+ /* @__PURE__ */ s("span", { children: Z(
3520
+ je ? "booking.payment.confirming" : "booking.payment.processing"
3521
+ ) })
3522
+ ] }) : null
3523
+ }
3524
+ ),
3525
+ re.state.status === "failed" ? /* @__PURE__ */ s(
3526
+ ee,
3527
+ {
3528
+ ref: nt,
3529
+ variant: "error",
3530
+ tabIndex: -1,
3531
+ className: Rt,
3532
+ children: /* @__PURE__ */ s(ee.Description, { children: re.state.error ?? Z(
3533
+ je ? "booking.payment.completionFailed" : "booking.payment.failed"
3534
+ ) })
3535
+ }
3536
+ ) : null,
3537
+ je ? $ == null ? void 0 : $(re) : C == null ? void 0 : C(re)
3538
+ ]
3539
+ }
3540
+ ) : null, ft = R(() => {
3541
+ const y = new Set(_e(_)), P = p.filter((V) => y.has(V.id)).map((V) => {
3542
+ var Y;
3543
+ return {
3544
+ label: V.label,
3545
+ text: ((Y = V.criticalInformationToAccept) == null ? void 0 : Y.trim()) ?? ""
3546
+ };
3547
+ }).filter((V) => V.text.length > 0);
3548
+ if (P.length !== 0)
3549
+ return P.length === 1 ? P[0].text : P.map((V) => `${V.label}: ${V.text}`).join(`
3550
+
3551
+ `);
3552
+ }, [p, _]), At = R(() => {
3553
+ if (j === "success" || j === "payment") return null;
3554
+ const y = se === "accordion" ? Di : se === "calendar" ? Mi : se === "flexible" ? Fi : se === "progress" ? _i : Ti, P = {
3555
+ cascade: B,
3556
+ inputs: {
3557
+ specialties: Ne,
3558
+ services: p,
3559
+ operators: ve,
3560
+ availableDates: g,
3561
+ availableSlots: l,
3562
+ nextAvailableDate: o
3563
+ },
3564
+ value: _,
3565
+ onChange: me,
3566
+ onSubmit: lt,
3567
+ policy: { country: t, lockedOperatorId: i },
3568
+ detailsProps: {
3569
+ requireCodiceFiscale: u,
3570
+ requireDateOfBirth: k,
3571
+ requireInsuranceNumber: I,
3572
+ insuranceType: _.insuranceType,
3573
+ showNote: w,
3574
+ showReturningPatientFlag: x,
3575
+ privacyPolicyUrl: S,
3576
+ termsUrl: A,
3577
+ practiceConsent: D,
3578
+ criticalInformationToAccept: ft,
3579
+ payment: K.payment,
3580
+ paymentTermsUrl: T,
3581
+ paymentBlocked: K.blocked,
3582
+ billingInDetails: N,
3583
+ paymentNoticeStyle: M,
3584
+ validateCodiceFiscale: b,
3585
+ validateInsuranceNumber: pe,
3586
+ confirmationChannels: F,
3587
+ defaultConfirmationChannels: z,
3588
+ submitError: Ae ?? (j === "error" ? Z("booking.payment.submitFailed") : void 0)
3589
+ },
3590
+ emptyServicesSlot: L,
3591
+ onboardingIncompleteSlot: xe,
3592
+ loadingDates: he,
3593
+ loadingSlots: Se,
3594
+ onDateSelect: He,
3595
+ onWindowChange: Le,
3596
+ datePickerStyle: H,
3597
+ specialtyPickerStyle: Be,
3598
+ servicePickerStyle: ge,
3599
+ showServiceDuration: J,
3600
+ operatorPickerStyle: ae,
3601
+ submitting: W || j === "submitting",
3602
+ locale: Te,
3603
+ activeStep: X,
3604
+ setActiveStep: we,
3605
+ agentIdBase: Ee
3606
+ };
3607
+ return /* @__PURE__ */ s(y, { ...P });
3608
+ }, [
3609
+ j,
3610
+ K.payment,
3611
+ K.blocked,
3612
+ T,
3613
+ Z,
3614
+ se,
3615
+ B,
3616
+ Ne,
3617
+ p,
3618
+ ve,
3619
+ g,
3620
+ l,
3621
+ o,
3622
+ _,
3623
+ me,
3624
+ lt,
3625
+ t,
3626
+ i,
3627
+ u,
3628
+ k,
3629
+ I,
3630
+ N,
3631
+ M,
3632
+ Ae,
3633
+ w,
3634
+ x,
3635
+ S,
3636
+ A,
3637
+ D,
3638
+ ft,
3639
+ b,
3640
+ pe,
3641
+ F,
3642
+ z,
3643
+ L,
3644
+ xe,
3645
+ he,
3646
+ Se,
3647
+ He,
3648
+ Le,
3649
+ H,
3650
+ Be,
3651
+ ge,
3652
+ J,
3653
+ ae,
3654
+ W,
3655
+ Te,
3656
+ X,
3657
+ Ee
3658
+ ]);
3659
+ return /* @__PURE__ */ v(
3660
+ "div",
3661
+ {
3662
+ ref: ce,
3663
+ role: "region",
3664
+ "aria-label": jt,
3665
+ id: Ee,
3666
+ "data-component": "booking",
3667
+ "data-component-id": Ee,
3668
+ "data-variant": se,
3669
+ className: pi({
3670
+ variant: se,
3671
+ surface: te,
3672
+ className: kt
3673
+ }),
3674
+ tabIndex: -1,
3675
+ onFocus: (y) => {
3676
+ qe.current = y.target, Qe == null || Qe(y);
3677
+ },
3678
+ onBlur: (y) => {
3679
+ const P = y.target;
3680
+ window.setTimeout(() => {
3681
+ var Y;
3682
+ const V = document.activeElement;
3683
+ qe.current === P && P.isConnected && !(V && ((Y = ce.current) != null && Y.contains(V))) && (qe.current = null);
3684
+ }), Re == null || Re(y);
3685
+ },
3686
+ ...Ie,
3687
+ children: [
3688
+ /* @__PURE__ */ s("div", { role: "status", className: "ds:sr-only", children: tt }),
3689
+ /* @__PURE__ */ v(
3690
+ "div",
3691
+ {
3692
+ className: [
3693
+ "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
3694
+ "ds:rounded-[var(--radius-md)]",
3695
+ "ds:bg-[color-mix(in_srgb,var(--primary)_35%,var(--background))]",
3696
+ "ds:bg-[image:var(--gradient-hero-brand)]",
3697
+ "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)]",
3698
+ "ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]"
3699
+ ].join(" "),
3700
+ children: [
3701
+ /* @__PURE__ */ s("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: Z("booking.regionLabel") }),
3702
+ /* @__PURE__ */ s("p", { className: "type-body-sm ds:text-[var(--foreground)] ds:m-0", children: Z("booking.headingSubtitle") })
3703
+ ]
3704
+ }
3705
+ ),
3706
+ K.cancelled ? /* @__PURE__ */ s(ee, { variant: "info", children: /* @__PURE__ */ s(ee.Description, { children: Z("booking.payment.cancelled") }) }) : null,
3707
+ wt ?? Ct ?? At
3708
+ ]
3709
+ }
3710
+ );
3711
+ }
3712
+ );
3713
+ Ei.displayName = "Booking";
3714
+ export {
3715
+ Ei as B,
3716
+ Jt as C,
3717
+ Ce as O,
3718
+ En as b
3719
+ };
3720
+ //# sourceMappingURL=booking-BN7TXe27.js.map