@alfadocs/ui-kit-debug 1.49.1 → 1.50.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/dist/_chunks/appointment-peek-Dk11UOVW.js +123 -0
  2. package/dist/_chunks/appointment-peek-Dk11UOVW.js.map +1 -0
  3. package/dist/_chunks/{booking-BF9pVa2n.js → booking-Cdzd8kyY.js} +1515 -1400
  4. package/dist/_chunks/booking-Cdzd8kyY.js.map +1 -0
  5. package/dist/_chunks/calendar-event-card-DplPh1wv.js +600 -0
  6. package/dist/_chunks/calendar-event-card-DplPh1wv.js.map +1 -0
  7. package/dist/_chunks/{calendar-workspace-iwyXajja.js → calendar-workspace-CWRH4x15.js} +3937 -3829
  8. package/dist/_chunks/calendar-workspace-CWRH4x15.js.map +1 -0
  9. package/dist/_chunks/{calendar-Bt44KMNO.js → calendar-zpE9qTM4.js} +437 -399
  10. package/dist/_chunks/calendar-zpE9qTM4.js.map +1 -0
  11. package/dist/agent-catalog.json +2 -2
  12. package/dist/agent-i18n/en.json +1 -1
  13. package/dist/components/appointment-peek/appointment-peek.d.ts +2 -0
  14. package/dist/components/appointment-peek/appointment-peek.d.ts.map +1 -1
  15. package/dist/components/appointment-peek/index.js +1 -1
  16. package/dist/components/booking/booking-types.d.ts +36 -0
  17. package/dist/components/booking/booking-types.d.ts.map +1 -1
  18. package/dist/components/booking/booking.d.ts +1 -1
  19. package/dist/components/booking/booking.d.ts.map +1 -1
  20. package/dist/components/booking/details-form.d.ts +8 -2
  21. package/dist/components/booking/details-form.d.ts.map +1 -1
  22. package/dist/components/booking/index.d.ts +1 -1
  23. package/dist/components/booking/index.d.ts.map +1 -1
  24. package/dist/components/booking/index.js +1 -1
  25. package/dist/components/booking/linkify.d.ts +11 -0
  26. package/dist/components/booking/linkify.d.ts.map +1 -0
  27. package/dist/components/calendar/calendar.d.ts +15 -0
  28. package/dist/components/calendar/calendar.d.ts.map +1 -1
  29. package/dist/components/calendar/index.js +1 -1
  30. package/dist/components/calendar-event-card/calendar-event-card.d.ts +46 -4
  31. package/dist/components/calendar-event-card/calendar-event-card.d.ts.map +1 -1
  32. package/dist/components/calendar-event-card/index.js +1 -1
  33. package/dist/i18n/locales/ar.d.ts +12 -0
  34. package/dist/i18n/locales/ar.d.ts.map +1 -1
  35. package/dist/i18n/locales/ar.js +12 -0
  36. package/dist/i18n/locales/ar.js.map +1 -1
  37. package/dist/i18n/locales/de.d.ts +12 -0
  38. package/dist/i18n/locales/de.d.ts.map +1 -1
  39. package/dist/i18n/locales/de.js +12 -0
  40. package/dist/i18n/locales/de.js.map +1 -1
  41. package/dist/i18n/locales/el.d.ts +12 -0
  42. package/dist/i18n/locales/el.d.ts.map +1 -1
  43. package/dist/i18n/locales/el.js +12 -0
  44. package/dist/i18n/locales/el.js.map +1 -1
  45. package/dist/i18n/locales/en.d.ts +12 -0
  46. package/dist/i18n/locales/en.d.ts.map +1 -1
  47. package/dist/i18n/locales/en.js +12 -0
  48. package/dist/i18n/locales/en.js.map +1 -1
  49. package/dist/i18n/locales/es.d.ts +12 -0
  50. package/dist/i18n/locales/es.d.ts.map +1 -1
  51. package/dist/i18n/locales/es.js +12 -0
  52. package/dist/i18n/locales/es.js.map +1 -1
  53. package/dist/i18n/locales/fr.d.ts +12 -0
  54. package/dist/i18n/locales/fr.d.ts.map +1 -1
  55. package/dist/i18n/locales/fr.js +12 -0
  56. package/dist/i18n/locales/fr.js.map +1 -1
  57. package/dist/i18n/locales/hi.d.ts +12 -0
  58. package/dist/i18n/locales/hi.d.ts.map +1 -1
  59. package/dist/i18n/locales/hi.js +12 -0
  60. package/dist/i18n/locales/hi.js.map +1 -1
  61. package/dist/i18n/locales/it.d.ts +12 -0
  62. package/dist/i18n/locales/it.d.ts.map +1 -1
  63. package/dist/i18n/locales/it.js +12 -0
  64. package/dist/i18n/locales/it.js.map +1 -1
  65. package/dist/i18n/locales/ja.d.ts +12 -0
  66. package/dist/i18n/locales/ja.d.ts.map +1 -1
  67. package/dist/i18n/locales/ja.js +12 -0
  68. package/dist/i18n/locales/ja.js.map +1 -1
  69. package/dist/i18n/locales/nl.d.ts +12 -0
  70. package/dist/i18n/locales/nl.d.ts.map +1 -1
  71. package/dist/i18n/locales/nl.js +12 -0
  72. package/dist/i18n/locales/nl.js.map +1 -1
  73. package/dist/i18n/locales/pl.d.ts +12 -0
  74. package/dist/i18n/locales/pl.d.ts.map +1 -1
  75. package/dist/i18n/locales/pl.js +12 -0
  76. package/dist/i18n/locales/pl.js.map +1 -1
  77. package/dist/i18n/locales/pt.d.ts +12 -0
  78. package/dist/i18n/locales/pt.d.ts.map +1 -1
  79. package/dist/i18n/locales/pt.js +12 -0
  80. package/dist/i18n/locales/pt.js.map +1 -1
  81. package/dist/i18n/locales/ro.d.ts +12 -0
  82. package/dist/i18n/locales/ro.d.ts.map +1 -1
  83. package/dist/i18n/locales/ro.js +12 -0
  84. package/dist/i18n/locales/ro.js.map +1 -1
  85. package/dist/i18n/locales/ru.d.ts +12 -0
  86. package/dist/i18n/locales/ru.d.ts.map +1 -1
  87. package/dist/i18n/locales/ru.js +12 -0
  88. package/dist/i18n/locales/ru.js.map +1 -1
  89. package/dist/i18n/locales/sq.d.ts +12 -0
  90. package/dist/i18n/locales/sq.d.ts.map +1 -1
  91. package/dist/i18n/locales/sq.js +12 -0
  92. package/dist/i18n/locales/sq.js.map +1 -1
  93. package/dist/i18n/locales/sv.d.ts +12 -0
  94. package/dist/i18n/locales/sv.d.ts.map +1 -1
  95. package/dist/i18n/locales/sv.js +12 -0
  96. package/dist/i18n/locales/sv.js.map +1 -1
  97. package/dist/i18n/locales/tr.d.ts +12 -0
  98. package/dist/i18n/locales/tr.d.ts.map +1 -1
  99. package/dist/i18n/locales/tr.js +12 -0
  100. package/dist/i18n/locales/tr.js.map +1 -1
  101. package/dist/i18n/locales/zh.d.ts +12 -0
  102. package/dist/i18n/locales/zh.d.ts.map +1 -1
  103. package/dist/i18n/locales/zh.js +12 -0
  104. package/dist/i18n/locales/zh.js.map +1 -1
  105. package/dist/index.js +5 -5
  106. package/dist/locales/ar.json +12 -0
  107. package/dist/locales/de.json +12 -0
  108. package/dist/locales/el.json +12 -0
  109. package/dist/locales/en.json +12 -0
  110. package/dist/locales/es.json +12 -0
  111. package/dist/locales/fr.json +12 -0
  112. package/dist/locales/hi.json +12 -0
  113. package/dist/locales/it.json +12 -0
  114. package/dist/locales/ja.json +12 -0
  115. package/dist/locales/nl.json +12 -0
  116. package/dist/locales/pl.json +12 -0
  117. package/dist/locales/pt.json +12 -0
  118. package/dist/locales/ro.json +12 -0
  119. package/dist/locales/ru.json +12 -0
  120. package/dist/locales/sq.json +12 -0
  121. package/dist/locales/sv.json +12 -0
  122. package/dist/locales/tr.json +12 -0
  123. package/dist/locales/zh.json +12 -0
  124. package/dist/patterns/calendar/calendar.model.d.ts +7 -1
  125. package/dist/patterns/calendar/calendar.model.d.ts.map +1 -1
  126. package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
  127. package/dist/patterns/calendar/index.js +1 -1
  128. package/dist/tokens.css +45 -42
  129. package/package.json +1 -1
  130. package/dist/_chunks/appointment-peek-BDiCIBb-.js +0 -115
  131. package/dist/_chunks/appointment-peek-BDiCIBb-.js.map +0 -1
  132. package/dist/_chunks/booking-BF9pVa2n.js.map +0 -1
  133. package/dist/_chunks/calendar-Bt44KMNO.js.map +0 -1
  134. package/dist/_chunks/calendar-event-card-BUbKBPv_.js +0 -403
  135. package/dist/_chunks/calendar-event-card-BUbKBPv_.js.map +0 -1
  136. package/dist/_chunks/calendar-workspace-iwyXajja.js.map +0 -1
@@ -1,53 +1,53 @@
1
- import { jsxs as b, jsx as s, Fragment as ce } from "react/jsx-runtime";
2
- import { forwardRef as Zt, useId as gt, useRef as L, useState as ie, useCallback as ke, useEffect as z, useMemo as M, useImperativeHandle as Ds } from "react";
3
- import { c as ht } from "./index-D2ZczOXr.js";
4
- import { useTranslation as q, Trans as Ms } from "react-i18next";
5
- import { u as Ts } from "./registry-DvAUVLHh.js";
6
- import { A as X } from "./alert-CiQ5Pa3Q.js";
7
- import { B as Ve } from "./button-18oBsI3n.js";
8
- import { C as et } from "./checkbox-CZkipDn7.js";
9
- import { C as Os } from "./checkbox-group-DomUzpkF.js";
10
- import { D as Bs } from "./date-picker-6tFnKFty.js";
11
- import { E as _s } from "./email-input-Dpe63k0K.js";
12
- import { F as Be } from "./form-field-CahJzTxp.js";
13
- import { P as Rs } from "./phone-input-sQj-zi59.js";
14
- import { T as Es } from "./text-area-Bt3p7Pt0.js";
15
- import { T as ot } from "./text-input-CUvCb6ST.js";
16
- import { S as Xt } from "./spinner-hbwuKwMf.js";
17
- import { a as st } from "./format-price-DAbh61Lz.js";
18
- import { B as Qt } from "./badge-BAkd6_Pj.js";
19
- import { I as qt } from "./icon-button-CY7GU_Se.js";
20
- import { S as vt } from "./select-upNAltly.js";
21
- import { C as Ct } from "./combobox-B_rLwmSv.js";
22
- import { M as At } from "./multi-select-N4Smh-gj.js";
23
- import { S as mt } from "./skeleton-B1KTdJ4N.js";
24
- import { E as es } from "./empty-state-DTBZ1ENT.js";
25
- import { S as Ls } from "./stepper-accordion-jMR8NaOB.js";
26
- import { S as Ps } from "./stepper-progress-Bv0njx4g.js";
27
- import { S as Fs } from "./slot-grid-4fWH3Euk.js";
28
- import { p as le } from "./parseISO-fOGpHKXm.js";
29
- import { C as Vs } from "./chevron-down-DWE7GSq9.js";
30
- import { l as qe, f as pt, b as Jt } from "./format-4HNwNGrN.js";
31
- import { w as ts, c as Je, a as xt, i as $s, s as tt, l as Ks, x as dt } from "./date-picker-variants-B9NLAfUK.js";
32
- import { s as zs } from "./subDays-HPvBuvq3.js";
33
- import { C as js } from "./chevron-left-B8cOyH-V.js";
34
- import { C as qs } from "./chevron-right-I9AeSxH2.js";
1
+ import { jsxs as y, jsx as s, Fragment as ne } from "react/jsx-runtime";
2
+ import { forwardRef as ss, useId as yt, useRef as F, useState as ee, useCallback as Ne, useEffect as $, useMemo as M, Fragment as _s, useImperativeHandle as Bs } from "react";
3
+ import { c as kt } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as j, Trans as Fs } from "react-i18next";
5
+ import { u as Es } from "./registry-DvAUVLHh.js";
6
+ import { A as Q } from "./alert-CiQ5Pa3Q.js";
7
+ import { B as $e } from "./button-18oBsI3n.js";
8
+ import { C as qe } from "./checkbox-CZkipDn7.js";
9
+ import { C as Ls } from "./checkbox-group-DomUzpkF.js";
10
+ import { D as Rs } from "./date-picker-6tFnKFty.js";
11
+ import { E as Ps } from "./email-input-Dpe63k0K.js";
12
+ import { F as Le } from "./form-field-CahJzTxp.js";
13
+ import { P as Vs } from "./phone-input-sQj-zi59.js";
14
+ import { T as $s } from "./text-area-Bt3p7Pt0.js";
15
+ import { T as lt } from "./text-input-CUvCb6ST.js";
16
+ import { S as ns } from "./spinner-hbwuKwMf.js";
17
+ import { a as nt } from "./format-price-DAbh61Lz.js";
18
+ import { B as is } from "./badge-BAkd6_Pj.js";
19
+ import { I as Gt } from "./icon-button-CY7GU_Se.js";
20
+ import { S as St } from "./select-upNAltly.js";
21
+ import { C as Ot } from "./combobox-B_rLwmSv.js";
22
+ import { M as _t } from "./multi-select-N4Smh-gj.js";
23
+ import { S as vt } from "./skeleton-B1KTdJ4N.js";
24
+ import { E as rs } from "./empty-state-DTBZ1ENT.js";
25
+ import { S as Ks } from "./stepper-accordion-jMR8NaOB.js";
26
+ import { S as zs } from "./stepper-progress-Bv0njx4g.js";
27
+ import { S as js } from "./slot-grid-4fWH3Euk.js";
28
+ import { p as ce } from "./parseISO-fOGpHKXm.js";
29
+ import { C as qs } from "./chevron-down-DWE7GSq9.js";
30
+ import { l as He, f as ht, b as Yt } from "./format-4HNwNGrN.js";
31
+ import { w as as, c as Je, a as Ct, i as Hs, s as st, l as Js, x as ut } from "./date-picker-variants-B9NLAfUK.js";
32
+ import { s as Us } from "./subDays-HPvBuvq3.js";
33
+ import { C as Gs } from "./chevron-left-B8cOyH-V.js";
34
+ import { C as Ys } from "./chevron-right-I9AeSxH2.js";
35
35
  import { c as ge } from "./createLucideIcon-DhHxpK9K.js";
36
- import { M as Js, S as Hs } from "./sun-Bj9Mr553.js";
37
- import { S as Gs } from "./stethoscope-sZXGC43m.js";
38
- import { H as Us } from "./heart-pulse-BCppJyN2.js";
39
- import { E as Ys } from "./eye-BjhN2nYf.js";
40
- import { B as Ws } from "./baby-Dku-Xvg9.js";
41
- import { S as Zs } from "./scan-line-CNseIHQ0.js";
42
- import { A as Xs } from "./astroid-BN4f5VXU.js";
43
- import { C as Qs } from "./clipboard-check-BeAGxDVT.js";
36
+ import { M as Zs, S as Ws } from "./sun-Bj9Mr553.js";
37
+ import { S as Xs } from "./stethoscope-sZXGC43m.js";
38
+ import { H as Qs } from "./heart-pulse-BCppJyN2.js";
39
+ import { E as en } from "./eye-BjhN2nYf.js";
40
+ import { B as tn } from "./baby-Dku-Xvg9.js";
41
+ import { S as sn } from "./scan-line-CNseIHQ0.js";
42
+ import { A as nn } from "./astroid-BN4f5VXU.js";
43
+ import { C as rn } from "./clipboard-check-BeAGxDVT.js";
44
44
  /**
45
45
  * @license lucide-react v1.22.0 - ISC
46
46
  *
47
47
  * This source code is licensed under the ISC license.
48
48
  * See the LICENSE file in the root directory of this source tree.
49
49
  */
50
- const en = [
50
+ const an = [
51
51
  [
52
52
  "path",
53
53
  {
@@ -55,14 +55,14 @@ const en = [
55
55
  key: "169zse"
56
56
  }
57
57
  ]
58
- ], tn = ge("activity", en);
58
+ ], on = ge("activity", an);
59
59
  /**
60
60
  * @license lucide-react v1.22.0 - ISC
61
61
  *
62
62
  * This source code is licensed under the ISC license.
63
63
  * See the LICENSE file in the root directory of this source tree.
64
64
  */
65
- const sn = [
65
+ const cn = [
66
66
  [
67
67
  "path",
68
68
  {
@@ -70,14 +70,14 @@ const sn = [
70
70
  key: "w610uw"
71
71
  }
72
72
  ]
73
- ], nn = ge("bone", sn);
73
+ ], dn = ge("bone", cn);
74
74
  /**
75
75
  * @license lucide-react v1.22.0 - ISC
76
76
  *
77
77
  * This source code is licensed under the ISC license.
78
78
  * See the LICENSE file in the root directory of this source tree.
79
79
  */
80
- const an = [
80
+ const ln = [
81
81
  ["path", { d: "M12 18V5", key: "adv99a" }],
82
82
  ["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
83
83
  ["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
@@ -86,14 +86,14 @@ const an = [
86
86
  ["path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517", key: "1gq6am" }],
87
87
  ["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
88
88
  ["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
89
- ], rn = ge("brain", an);
89
+ ], un = ge("brain", ln);
90
90
  /**
91
91
  * @license lucide-react v1.22.0 - ISC
92
92
  *
93
93
  * This source code is licensed under the ISC license.
94
94
  * See the LICENSE file in the root directory of this source tree.
95
95
  */
96
- const on = [
96
+ const pn = [
97
97
  ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
98
98
  ["path", { d: "M16 2v4", key: "4m81vk" }],
99
99
  ["path", { d: "M3 10h18", key: "8toen8" }],
@@ -102,76 +102,76 @@ const on = [
102
102
  ["path", { d: "M13 18H7", key: "bb0bb7" }],
103
103
  ["path", { d: "M7 14h.01", key: "1qa3f1" }],
104
104
  ["path", { d: "M17 18h.01", key: "1bdyru" }]
105
- ], dn = ge("calendar-range", on);
105
+ ], mn = ge("calendar-range", pn);
106
106
  /**
107
107
  * @license lucide-react v1.22.0 - ISC
108
108
  *
109
109
  * This source code is licensed under the ISC license.
110
110
  * See the LICENSE file in the root directory of this source tree.
111
111
  */
112
- const cn = [
112
+ const fn = [
113
113
  ["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" }],
114
114
  ["path", { d: "M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4", key: "1qnva7" }]
115
- ], ln = ge("ear", cn);
115
+ ], gn = ge("ear", fn);
116
116
  /**
117
117
  * @license lucide-react v1.22.0 - ISC
118
118
  *
119
119
  * This source code is licensed under the ISC license.
120
120
  * See the LICENSE file in the root directory of this source tree.
121
121
  */
122
- const un = [
122
+ const hn = [
123
123
  ["path", { d: "M6 18h8", key: "1borvv" }],
124
124
  ["path", { d: "M3 22h18", key: "8prr45" }],
125
125
  ["path", { d: "M14 22a7 7 0 1 0 0-14h-1", key: "1jwaiy" }],
126
126
  ["path", { d: "M9 14h2", key: "197e7h" }],
127
127
  ["path", { d: "M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z", key: "1bmzmy" }],
128
128
  ["path", { d: "M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3", key: "1drr47" }]
129
- ], pn = ge("microscope", un);
129
+ ], vn = ge("microscope", hn);
130
130
  /**
131
131
  * @license lucide-react v1.22.0 - ISC
132
132
  *
133
133
  * This source code is licensed under the ISC license.
134
134
  * See the LICENSE file in the root directory of this source tree.
135
135
  */
136
- const mn = [
136
+ const bn = [
137
137
  [
138
138
  "path",
139
139
  { 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" }
140
140
  ],
141
141
  ["path", { d: "m8.5 8.5 7 7", key: "rvfmvr" }]
142
- ], fn = ge("pill", mn);
142
+ ], yn = ge("pill", bn);
143
143
  /**
144
144
  * @license lucide-react v1.22.0 - ISC
145
145
  *
146
146
  * This source code is licensed under the ISC license.
147
147
  * See the LICENSE file in the root directory of this source tree.
148
148
  */
149
- const gn = [
149
+ const kn = [
150
150
  ["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
151
151
  ["path", { d: "M8.12 8.12 12 12", key: "1alkpv" }],
152
152
  ["path", { d: "M20 4 8.12 15.88", key: "xgtan2" }],
153
153
  ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
154
154
  ["path", { d: "M14.8 14.8 20 20", key: "ptml3r" }]
155
- ], hn = ge("scissors", gn);
155
+ ], Sn = ge("scissors", kn);
156
156
  /**
157
157
  * @license lucide-react v1.22.0 - ISC
158
158
  *
159
159
  * This source code is licensed under the ISC license.
160
160
  * See the LICENSE file in the root directory of this source tree.
161
161
  */
162
- const vn = [
162
+ const xn = [
163
163
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
164
164
  ["path", { d: "M8 14s1.5 2 4 2 4-2 4-2", key: "1y1vjs" }],
165
165
  ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
166
166
  ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
167
- ], bn = ge("smile", vn);
167
+ ], In = ge("smile", xn);
168
168
  /**
169
169
  * @license lucide-react v1.22.0 - ISC
170
170
  *
171
171
  * This source code is licensed under the ISC license.
172
172
  * See the LICENSE file in the root directory of this source tree.
173
173
  */
174
- const yn = [
174
+ const Nn = [
175
175
  ["path", { d: "M12 10V2", key: "16sf7g" }],
176
176
  ["path", { d: "m4.93 10.93 1.41 1.41", key: "2a7f42" }],
177
177
  ["path", { d: "M2 18h2", key: "j10viu" }],
@@ -180,25 +180,25 @@ const yn = [
180
180
  ["path", { d: "M22 22H2", key: "19qnx5" }],
181
181
  ["path", { d: "m16 6-4 4-4-4", key: "6wukr" }],
182
182
  ["path", { d: "M16 18a4 4 0 0 0-8 0", key: "1lzouq" }]
183
- ], kn = ge("sunset", yn);
183
+ ], wn = ge("sunset", Nn);
184
184
  /**
185
185
  * @license lucide-react v1.22.0 - ISC
186
186
  *
187
187
  * This source code is licensed under the ISC license.
188
188
  * See the LICENSE file in the root directory of this source tree.
189
189
  */
190
- const Sn = [
190
+ const Cn = [
191
191
  ["path", { d: "m18 2 4 4", key: "22kx64" }],
192
192
  ["path", { d: "m17 7 3-3", key: "1w1zoj" }],
193
193
  ["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" }],
194
194
  ["path", { d: "m9 11 4 4", key: "rovt3i" }],
195
195
  ["path", { d: "m5 19-3 3", key: "59f2uf" }],
196
196
  ["path", { d: "m14 4 6 6", key: "yqp9t2" }]
197
- ], Ht = ge("syringe", Sn);
198
- function xn(e, t, n) {
199
- return ts(e, -1, n);
197
+ ], Zt = ge("syringe", Cn);
198
+ function An(e, t, n) {
199
+ return as(e, -1, n);
200
200
  }
201
- const In = {
201
+ const Dn = {
202
202
  id: "booking",
203
203
  // `view_change` removed (0.69): the layout `variant` is a fixed prop — the
204
204
  // handle exposes only `getVariant` (state), no action mutates it. The flow's
@@ -273,95 +273,95 @@ const In = {
273
273
  description: "Sourced from the id prop."
274
274
  }
275
275
  }
276
- }, Nt = [
276
+ }, Tt = [
277
277
  "email",
278
278
  "whatsapp",
279
279
  "sms"
280
- ], ye = "all", Nn = "de";
281
- function wn(e) {
280
+ ], Ie = "all", Tn = "de";
281
+ function Mn(e) {
282
282
  const t = e.lockedOperatorId;
283
283
  return [...t ? e.operatorsByService ? e.specialties.filter(
284
284
  (i) => e.services.some(
285
- (a) => {
286
- var o;
287
- return a.specialtyId === i.id && ((o = a.operatorIds) == null ? void 0 : o.includes(t));
285
+ (r) => {
286
+ var a;
287
+ return r.specialtyId === i.id && ((a = r.operatorIds) == null ? void 0 : a.includes(t));
288
288
  }
289
289
  )
290
290
  ) : e.specialties.filter((i) => {
291
- var a;
292
- return (a = i.operatorIds) == null ? void 0 : a.includes(t);
293
- }) : e.specialties].sort((i, a) => {
294
- const o = i.sequenceNumber ?? Number.POSITIVE_INFINITY, c = a.sequenceNumber ?? Number.POSITIVE_INFINITY;
295
- return o - c;
291
+ var r;
292
+ return (r = i.operatorIds) == null ? void 0 : r.includes(t);
293
+ }) : e.specialties].sort((i, r) => {
294
+ const a = i.sequenceNumber ?? Number.POSITIVE_INFINITY, c = r.sequenceNumber ?? Number.POSITIVE_INFINITY;
295
+ return a - c;
296
296
  });
297
297
  }
298
- function Cn(e) {
298
+ function On(e) {
299
299
  let t = e.services;
300
300
  if (e.lockedOperatorId && (t = t.filter(
301
301
  (i) => {
302
- var a;
303
- return (a = i.operatorIds) == null ? void 0 : a.includes(e.lockedOperatorId);
302
+ var r;
303
+ return (r = i.operatorIds) == null ? void 0 : r.includes(e.lockedOperatorId);
304
304
  }
305
305
  )), e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) {
306
- const i = _e(e.value);
306
+ const i = Re(e.value);
307
307
  i.length > 0 && (t = t.filter(
308
- (a) => a.specialtyId !== void 0 && i.includes(a.specialtyId)
308
+ (r) => r.specialtyId !== void 0 && i.includes(r.specialtyId)
309
309
  ));
310
310
  }
311
311
  return t;
312
312
  }
313
- function An(e) {
314
- const t = e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties, n = Ce(e.value);
313
+ function _n(e) {
314
+ const t = e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties, n = Te(e.value);
315
315
  if ((!t || e.operatorsByService) && n.length > 0)
316
316
  return e.operators.filter(
317
317
  (i) => {
318
- var a;
319
- return (a = i.appointmentBookingReasonIds) == null ? void 0 : a.some((o) => n.includes(o));
318
+ var r;
319
+ return (r = i.appointmentBookingReasonIds) == null ? void 0 : r.some((a) => n.includes(a));
320
320
  }
321
321
  );
322
322
  if (t) {
323
- const i = _e(e.value);
323
+ const i = Re(e.value);
324
324
  if (i.length > 0)
325
325
  return e.operators.filter(
326
- (a) => {
327
- var o;
328
- return (o = a.specialtyIds) == null ? void 0 : o.some((c) => i.includes(c));
326
+ (r) => {
327
+ var a;
328
+ return (a = r.specialtyIds) == null ? void 0 : a.some((c) => i.includes(c));
329
329
  }
330
330
  );
331
331
  }
332
332
  return [];
333
333
  }
334
- function Dn(e, t) {
335
- const n = e.country === Nn, i = !n || e.value.insuranceType !== void 0, o = (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && i, c = _e(e.value).length > 0, f = !o || c, u = Ce(e.value).length > 0, g = !f || u, r = t.operators, p = !!e.allowOperatorSelection && g && u && !e.lockedOperatorId && r.length > 1, m = g && u, y = (!m || e.value.date !== void 0) && e.value.date !== void 0, _ = (!y || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, I = u && r.length === 0;
334
+ function Bn(e, t) {
335
+ const n = e.country === Tn, i = !n || e.value.insuranceType !== void 0, a = (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && i, c = Re(e.value).length > 0, f = !a || c, u = Te(e.value).length > 0, g = !f || u, o = t.operators, d = !!e.allowOperatorSelection && g && u && !e.lockedOperatorId && o.length > 1, m = g && u, k = (!m || e.value.date !== void 0) && e.value.date !== void 0, O = (!k || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, N = u && o.length === 0;
336
336
  return {
337
337
  insurance: n,
338
- specialty: o,
338
+ specialty: a,
339
339
  service: f,
340
- operator: p,
340
+ operator: d,
341
341
  date: m,
342
- slot: y,
343
- details: _,
344
- onboardingIncomplete: I
342
+ slot: k,
343
+ details: O,
344
+ onboardingIncomplete: N
345
345
  };
346
346
  }
347
- function Mn(e, t) {
347
+ function Fn(e, t) {
348
348
  const n = [];
349
349
  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), {
350
350
  currentStep: n.find(
351
- (a) => !we(a, e.value)
351
+ (r) => !De(r, e.value)
352
352
  ) ?? 7,
353
353
  visibleSteps: n
354
354
  };
355
355
  }
356
- function we(e, t) {
356
+ function De(e, t) {
357
357
  switch (e) {
358
358
  case 1:
359
359
  return t.insuranceType !== void 0;
360
360
  // 0.34.0: array-or-single — satisfied when EITHER form is present.
361
361
  case 2:
362
- return _e(t).length > 0;
362
+ return Re(t).length > 0;
363
363
  case 3:
364
- return Ce(t).length > 0;
364
+ return Te(t).length > 0;
365
365
  // Always satisfied, like its gate: "no preference" is a valid answer,
366
366
  // whether it is the `'all'` sentinel or an empty multi-select.
367
367
  case 4:
@@ -375,30 +375,30 @@ function we(e, t) {
375
375
  return !1;
376
376
  }
377
377
  }
378
- function Tn(e) {
378
+ function En(e) {
379
379
  const t = {
380
- specialties: wn(e),
381
- services: Cn(e),
382
- operators: An(e)
383
- }, n = Dn(e, t), { currentStep: i, visibleSteps: a } = Mn(e, n);
384
- let o;
380
+ specialties: Mn(e),
381
+ services: On(e),
382
+ operators: _n(e)
383
+ }, n = Bn(e, t), { currentStep: i, visibleSteps: r } = Fn(e, n);
384
+ let a;
385
385
  if (e.value.date && e.value.slotKey) {
386
386
  const g = e.availableSlots[e.value.date];
387
- g && (o = g.find((r) => r.key === e.value.slotKey));
387
+ g && (a = g.find((o) => o.key === e.value.slotKey));
388
388
  }
389
- const c = Ce(e.value), l = c.length > 0 ? e.services.find((g) => g.id === c[0]) : void 0, f = _e(e.value).length > 0, u = c.length > 0 && e.value.date !== void 0 && e.value.slotKey !== void 0 && (!n.insurance || e.value.insuranceType !== void 0) && (!n.specialty || f);
389
+ const c = Te(e.value), l = c.length > 0 ? e.services.find((g) => g.id === c[0]) : void 0, f = Re(e.value).length > 0, u = c.length > 0 && e.value.date !== void 0 && e.value.slotKey !== void 0 && (!n.insurance || e.value.insuranceType !== void 0) && (!n.specialty || f);
390
390
  return {
391
391
  gates: n,
392
392
  filtered: t,
393
393
  currentStep: i,
394
- totalSteps: a.length,
395
- visibleSteps: a,
394
+ totalSteps: r.length,
395
+ visibleSteps: r,
396
396
  isReadyToSubmit: u,
397
397
  durationMin: l == null ? void 0 : l.durationMin,
398
- selectedSlot: o
398
+ selectedSlot: a
399
399
  };
400
400
  }
401
- function ss(e, t) {
401
+ function os(e, t) {
402
402
  return {
403
403
  ...e,
404
404
  insuranceType: t,
@@ -410,7 +410,7 @@ function ss(e, t) {
410
410
  details: void 0
411
411
  };
412
412
  }
413
- function ns(e, t) {
413
+ function cs(e, t) {
414
414
  return {
415
415
  ...e,
416
416
  specialtyId: t,
@@ -424,7 +424,7 @@ function ns(e, t) {
424
424
  details: void 0
425
425
  };
426
426
  }
427
- function is(e, t) {
427
+ function ds(e, t) {
428
428
  return {
429
429
  ...e,
430
430
  specialtyId: void 0,
@@ -438,7 +438,7 @@ function is(e, t) {
438
438
  details: void 0
439
439
  };
440
440
  }
441
- function as(e, t) {
441
+ function ls(e, t) {
442
442
  return {
443
443
  ...e,
444
444
  serviceId: t,
@@ -446,27 +446,27 @@ function as(e, t) {
446
446
  // Default the operator to the "All operators" sentinel so a patient
447
447
  // who doesn't care about picking lands on a satisfied step 4 without
448
448
  // any further input.
449
- operatorId: t ? ye : void 0,
449
+ operatorId: t ? Ie : void 0,
450
450
  operatorIds: void 0,
451
451
  date: void 0,
452
452
  slotKey: void 0,
453
453
  details: void 0
454
454
  };
455
455
  }
456
- function rs(e, t) {
456
+ function us(e, t) {
457
457
  const n = !!t && t.length > 0;
458
458
  return {
459
459
  ...e,
460
460
  serviceId: void 0,
461
461
  serviceIds: t,
462
- operatorId: n ? ye : void 0,
462
+ operatorId: n ? Ie : void 0,
463
463
  operatorIds: void 0,
464
464
  date: void 0,
465
465
  slotKey: void 0,
466
466
  details: void 0
467
467
  };
468
468
  }
469
- function os(e, t) {
469
+ function ps(e, t) {
470
470
  return {
471
471
  ...e,
472
472
  operatorId: t,
@@ -476,7 +476,7 @@ function os(e, t) {
476
476
  details: void 0
477
477
  };
478
478
  }
479
- function ds(e, t) {
479
+ function ms(e, t) {
480
480
  return {
481
481
  ...e,
482
482
  operatorId: void 0,
@@ -486,16 +486,16 @@ function ds(e, t) {
486
486
  details: void 0
487
487
  };
488
488
  }
489
- function _e(e) {
489
+ function Re(e) {
490
490
  return e.specialtyIds && e.specialtyIds.length > 0 ? e.specialtyIds : e.specialtyId ? [e.specialtyId] : [];
491
491
  }
492
- function Ce(e) {
492
+ function Te(e) {
493
493
  return e.serviceIds && e.serviceIds.length > 0 ? e.serviceIds : e.serviceId ? [e.serviceId] : [];
494
494
  }
495
- function wt(e) {
495
+ function Mt(e) {
496
496
  return e.operatorIds && e.operatorIds.length > 0 ? e.operatorIds : e.operatorId ? [e.operatorId] : [];
497
497
  }
498
- function bt(e, t) {
498
+ function xt(e, t) {
499
499
  return {
500
500
  ...e,
501
501
  date: t,
@@ -504,214 +504,279 @@ function bt(e, t) {
504
504
  // since the user has already filled some fields.
505
505
  };
506
506
  }
507
- function cs(e, t) {
507
+ function fs(e, t) {
508
508
  return {
509
509
  ...e,
510
510
  slotKey: t
511
511
  };
512
512
  }
513
- function On(e, t) {
513
+ function Ln(e, t) {
514
514
  let n = e;
515
515
  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) {
516
- const a = _e(n), o = a.length > 0 ? t.services.filter(
517
- (c) => c.specialtyId && a.includes(c.specialtyId)
516
+ const r = Re(n), a = r.length > 0 ? t.services.filter(
517
+ (c) => c.specialtyId && r.includes(c.specialtyId)
518
518
  ) : t.services;
519
- o.length === 1 && n.serviceId === void 0 && n.serviceIds === void 0 && (n = { ...n, serviceId: o[0].id }, n.operatorId === void 0 && n.operatorIds === void 0 && (n = { ...n, operatorId: ye }));
519
+ 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: Ie }));
520
520
  }
521
521
  return n;
522
522
  }
523
- function ls(e) {
524
- if (e.operatorId && e.operatorId !== ye)
523
+ function gs(e) {
524
+ if (e.operatorId && e.operatorId !== Ie)
525
525
  return e.operatorId;
526
526
  }
527
- function Bn(e) {
527
+ function Rn(e) {
528
528
  if (!e) return !1;
529
529
  const t = e.trim();
530
530
  return /^\+?\d[\d\s\-()]{6,}$/.test(t);
531
531
  }
532
- function us(e) {
532
+ function hs(e) {
533
533
  const t = e && e.length > 0 ? e : ["email"], n = new Set(t);
534
- return Nt.filter((i) => n.has(i));
534
+ return Tt.filter((i) => n.has(i));
535
535
  }
536
- function _n(e, t, n) {
537
- const i = us(e), a = new Set(i);
536
+ function Pn(e, t, n) {
537
+ const i = hs(e), r = new Set(i);
538
538
  if (n)
539
- return Nt.filter(
540
- (u) => n.includes(u) && a.has(u)
539
+ return Tt.filter(
540
+ (u) => n.includes(u) && r.has(u)
541
541
  );
542
- const o = [];
543
- a.has("email") && o.push("email");
544
- const c = Bn(t), l = a.has("whatsapp");
545
- l && c && o.push("whatsapp"), !l && a.has("sms") && o.push("sms");
546
- const f = new Set(o);
547
- return Nt.filter((u) => f.has(u));
548
- }
549
- const Gt = 500, Rn = /^[A-Z0-9]{16}$/, En = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ut = 300, ct = { state: "idle" }, Dt = Zt(
542
+ const a = [];
543
+ r.has("email") && a.push("email");
544
+ const c = Rn(t), l = r.has("whatsapp");
545
+ l && c && a.push("whatsapp"), !l && r.has("sms") && a.push("sms");
546
+ const f = new Set(a);
547
+ return Tt.filter((u) => f.has(u));
548
+ }
549
+ const Vn = /https?:\/\/(?:(?![.,;:!?'»›]https?:\/\/)[^\s<>"\u060C\u061B\u061F\u06D4\u2000-\u206F\u3000-\u303F\uFF00-\uFFEF])+/gi, $n = /* @__PURE__ */ new Set([
550
+ ".",
551
+ ",",
552
+ ";",
553
+ ":",
554
+ "!",
555
+ "?",
556
+ "'",
557
+ "»",
558
+ "›"
559
+ ]), Kn = { ")": "(", "]": "[", "}": "{" }, Wt = (e, t) => e.split(t).length - 1;
560
+ function zn(e) {
561
+ const t = {};
562
+ for (const [i, r] of Object.entries(Kn))
563
+ t[i] = Wt(e, i) - Wt(e, r);
564
+ let n = e.length;
565
+ for (; n > 0; ) {
566
+ const i = e[n - 1];
567
+ if ($n.has(i))
568
+ n -= 1;
569
+ else if (i in t && t[i] > 0)
570
+ t[i] -= 1, n -= 1;
571
+ else
572
+ break;
573
+ }
574
+ return e.slice(0, n);
575
+ }
576
+ const jn = /[\u0600-\u06FF\u3040-\u30FF\u3400-\u9FFF\uAC00-\uD7AF]/, qn = /[A-Za-z0-9]/;
577
+ function Hn(e) {
578
+ const t = e.search(jn);
579
+ return t > 0 && qn.test(e[t - 1]) ? e.slice(0, t) : e;
580
+ }
581
+ function Jn(e) {
582
+ try {
583
+ const { protocol: t, hostname: n } = new URL(e);
584
+ return (t === "http:" || t === "https:") && n !== "";
585
+ } catch {
586
+ return !1;
587
+ }
588
+ }
589
+ function Un(e) {
590
+ const t = [];
591
+ let n = 0;
592
+ const i = (r) => {
593
+ if (r === "") return;
594
+ const a = t[t.length - 1];
595
+ (a == null ? void 0 : a.kind) === "text" ? a.text += r : t.push({ kind: "text", text: r });
596
+ };
597
+ for (const r of e.matchAll(Vn)) {
598
+ const a = r.index ?? 0, c = zn(Hn(r[0]));
599
+ Jn(c) && (i(e.slice(n, a)), t.push({ kind: "link", text: c, href: c }), n = a + c.length);
600
+ }
601
+ return i(e.slice(n)), t;
602
+ }
603
+ const Xt = 500, Gn = /^[A-Z0-9]{16}$/, Yn = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Qt = 300, At = "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)]", pt = (e) => e && /^https?:\/\//i.test(e) ? e : void 0, mt = { state: "idle" }, Bt = ss(
550
604
  ({
551
605
  value: e,
552
606
  onChange: t,
553
607
  onSubmit: n,
554
608
  requireCodiceFiscale: i = !1,
555
- requireDateOfBirth: a = !1,
556
- requireInsuranceNumber: o = !1,
609
+ requireDateOfBirth: r = !1,
610
+ requireInsuranceNumber: a = !1,
557
611
  insuranceType: c,
558
612
  showNote: l = !1,
559
613
  showReturningPatientFlag: f = !1,
560
614
  privacyPolicyUrl: u,
561
615
  termsUrl: g,
562
- payment: r,
563
- paymentTermsUrl: p,
564
- paymentBlocked: m = !1,
565
- criticalInformationToAccept: S,
566
- validateCodiceFiscale: y,
567
- validateInsuranceNumber: N,
568
- submitting: _ = !1,
569
- summarySlot: I,
570
- defaultPhoneCountry: v,
571
- confirmationChannels: x,
572
- defaultConfirmationChannels: w,
573
- submitError: A
574
- }, h) => {
575
- var Ue, me;
576
- const { t: d, i18n: T } = q(), F = gt(), V = L(!1), [D, O] = ie(!1), [J, Q] = ie(!1), Ae = _ || D, [ae, Z] = ie(ct), [ue, he] = ie(ct), [K, Re] = ie({}), se = ke(
577
- (k) => Re(($) => ({ ...$, [k]: !0 })),
616
+ practiceConsent: o,
617
+ payment: d,
618
+ paymentTermsUrl: m,
619
+ paymentBlocked: S = !1,
620
+ criticalInformationToAccept: k,
621
+ validateCodiceFiscale: A,
622
+ validateInsuranceNumber: O,
623
+ submitting: N = !1,
624
+ summarySlot: x,
625
+ defaultPhoneCountry: I,
626
+ confirmationChannels: w,
627
+ defaultConfirmationChannels: T,
628
+ submitError: v
629
+ }, b) => {
630
+ var Pe, K;
631
+ const { t: h, i18n: q } = j(), R = yt(), te = F(!1), [C, P] = ee(!1), [we, he] = ee(!1), Me = N || C, [se, Z] = ee(mt), [de, J] = ee(mt), [ie, Oe] = ee({}), U = Ne(
632
+ (p) => Oe((V) => ({ ...V, [p]: !0 })),
578
633
  []
579
- ), H = L(null), re = L(
634
+ ), W = F(null), le = F(
580
635
  null
581
636
  );
582
- z(
637
+ $(
583
638
  () => () => {
584
- H.current && clearTimeout(H.current), re.current && clearTimeout(re.current);
639
+ W.current && clearTimeout(W.current), le.current && clearTimeout(le.current);
585
640
  },
586
641
  []
587
642
  );
588
- const P = ke(
589
- (k) => {
590
- Q(!1), t({ ...e, ...k });
643
+ const E = Ne(
644
+ (p) => {
645
+ he(!1), t({ ...e, ...p });
591
646
  },
592
647
  [e, t]
593
- ), oe = r ? JSON.stringify([
594
- r.serviceId,
595
- r.kind,
596
- r.amountCents,
597
- r.currencyCode,
598
- p
599
- ]) : void 0, [$e, De] = ie(
600
- () => e.paymentAccepted ? oe : void 0
601
- ), Me = L(oe), Ee = !!(r && e.paymentAccepted && $e === oe);
602
- z(() => {
603
- Me.current !== oe && (Me.current = oe, De(void 0), e.paymentAccepted !== void 0 && P({ paymentAccepted: r ? !1 : void 0 }));
604
- }, [oe, r, P, e.paymentAccepted]);
605
- const G = r ? st(r.amountCents, r.currencyCode, T.language) : "", pe = p && /^https?:\/\//i.test(p) ? p : void 0, Te = M(
606
- () => us(x),
607
- [x]
608
- ), ve = !r && !m && Te.length >= 2, nt = L(!1);
609
- z(() => {
610
- if (r || m) return;
611
- if (!ve) {
612
- e.confirmationChannels !== void 0 && P({ confirmationChannels: void 0 });
648
+ ), re = d ? JSON.stringify([
649
+ d.serviceId,
650
+ d.kind,
651
+ d.amountCents,
652
+ d.currencyCode,
653
+ m
654
+ ]) : void 0, [Ke, _e] = ee(
655
+ () => e.paymentAccepted ? re : void 0
656
+ ), Be = F(re), ue = !!(d && e.paymentAccepted && Ke === re);
657
+ $(() => {
658
+ Be.current !== re && (Be.current = re, _e(void 0), e.paymentAccepted !== void 0 && E({ paymentAccepted: d ? !1 : void 0 }));
659
+ }, [re, d, E, e.paymentAccepted]);
660
+ const H = typeof (o == null ? void 0 : o.label) == "string" && o.label.trim() !== "", ve = o && H ? JSON.stringify([
661
+ o.label,
662
+ o.url ?? null,
663
+ o.required
664
+ ]) : void 0, [Ge, ze] = ee(
665
+ () => e.practiceConsentAccepted ? ve : void 0
666
+ ), it = F(ve), Ye = !!(ve !== void 0 && e.practiceConsentAccepted && Ge === ve);
667
+ $(() => {
668
+ it.current !== ve && (it.current = ve, ze(void 0), e.practiceConsentAccepted !== void 0 && E({ practiceConsentAccepted: void 0 }));
669
+ }, [ve, E, e.practiceConsentAccepted]);
670
+ const G = d ? nt(d.amountCents, d.currencyCode, q.language) : "", rt = pt(m), X = M(
671
+ () => hs(w),
672
+ [w]
673
+ ), pe = !d && !S && X.length >= 2, be = F(!1);
674
+ $(() => {
675
+ if (d || S) return;
676
+ if (!pe) {
677
+ e.confirmationChannels !== void 0 && E({ confirmationChannels: void 0 });
613
678
  return;
614
679
  }
615
680
  if (e.confirmationChannels !== void 0) {
616
- nt.current = !0;
681
+ be.current = !0;
617
682
  return;
618
683
  }
619
- const k = _n(
620
- Te,
684
+ const p = Pn(
685
+ X,
621
686
  e.mobilePhone,
622
- w
687
+ T
623
688
  );
624
- nt.current = !0, P({ confirmationChannels: k });
689
+ be.current = !0, E({ confirmationChannels: p });
625
690
  }, [
626
- ve,
627
- r,
628
- m,
629
- Te,
691
+ pe,
692
+ d,
693
+ S,
694
+ X,
630
695
  e.mobilePhone,
631
- w
696
+ T
632
697
  ]);
633
- const Ke = M(
698
+ const ye = M(
634
699
  () => e.confirmationChannels ?? [],
635
700
  [e.confirmationChannels]
636
- ), ee = ve && Ke.length === 0;
637
- z(() => {
638
- const k = e.codiceFiscale;
639
- if (!i || !y || !k) {
640
- Z(ct);
701
+ ), L = pe && ye.length === 0;
702
+ $(() => {
703
+ const p = e.codiceFiscale;
704
+ if (!i || !A || !p) {
705
+ Z(mt);
641
706
  return;
642
707
  }
643
- if (!Rn.test(k)) {
708
+ if (!Gn.test(p)) {
644
709
  Z({
645
710
  state: "invalid",
646
- hint: d("booking.details.codiceFiscale.invalidFormat")
711
+ hint: h("booking.details.codiceFiscale.invalidFormat")
647
712
  });
648
713
  return;
649
714
  }
650
715
  Z({ state: "pending" });
651
- let $ = !0;
652
- return H.current && clearTimeout(H.current), H.current = setTimeout(async () => {
716
+ let V = !0;
717
+ return W.current && clearTimeout(W.current), W.current = setTimeout(async () => {
653
718
  try {
654
- const Pe = await y(k);
655
- $ && Z({
656
- state: Pe.valid ? "valid" : "invalid",
657
- hint: Pe.hint,
658
- value: k
719
+ const Ce = await A(p);
720
+ V && Z({
721
+ state: Ce.valid ? "valid" : "invalid",
722
+ hint: Ce.hint,
723
+ value: p
659
724
  });
660
725
  } catch {
661
- $ && Z({
726
+ V && Z({
662
727
  state: "invalid",
663
- hint: d("booking.details.codiceFiscale.unavailable"),
664
- value: k
728
+ hint: h("booking.details.codiceFiscale.unavailable"),
729
+ value: p
665
730
  });
666
731
  }
667
- }, Ut), () => {
668
- $ = !1, H.current && clearTimeout(H.current);
732
+ }, Qt), () => {
733
+ V = !1, W.current && clearTimeout(W.current);
669
734
  };
670
- }, [i, y, e.codiceFiscale, d]);
671
- const Le = o && c === "public";
672
- z(() => {
673
- const k = e.insuranceNumber;
674
- if (!Le || !N || !k) {
675
- he(ct);
735
+ }, [i, A, e.codiceFiscale, h]);
736
+ const ke = a && c === "public";
737
+ $(() => {
738
+ const p = e.insuranceNumber;
739
+ if (!ke || !O || !p) {
740
+ J(mt);
676
741
  return;
677
742
  }
678
- he({ state: "pending" }), re.current && clearTimeout(re.current), re.current = setTimeout(() => {
679
- N(k).then(
680
- ($) => he(
681
- $.valid ? { state: "valid" } : { state: "invalid", hint: $.hint }
743
+ J({ state: "pending" }), le.current && clearTimeout(le.current), le.current = setTimeout(() => {
744
+ O(p).then(
745
+ (V) => J(
746
+ V.valid ? { state: "valid" } : { state: "invalid", hint: V.hint }
682
747
  )
683
748
  ).catch(
684
- () => he({
749
+ () => J({
685
750
  state: "invalid",
686
- hint: d("booking.details.insuranceNumber.unavailable")
751
+ hint: h("booking.details.insuranceNumber.unavailable")
687
752
  })
688
753
  );
689
- }, Ut);
690
- }, [Le, N, e.insuranceNumber, d]);
691
- const te = M(
692
- () => !!(e.email && En.test(e.email)),
754
+ }, Qt);
755
+ }, [ke, O, e.insuranceNumber, h]);
756
+ const Fe = M(
757
+ () => !!(e.email && Yn.test(e.email)),
693
758
  [e.email]
694
- ), Oe = M(
759
+ ), je = M(
695
760
  () => !!(e.mobilePhone && e.mobilePhone.length >= 6),
696
761
  [e.mobilePhone]
697
- ), Se = M(() => {
698
- var k, $;
699
- return !(!((k = e.firstName) != null && k.trim()) || !(($ = e.lastName) != null && $.trim()) || !te || !Oe || i && (ae.state !== "valid" || ae.value !== e.codiceFiscale) || a && !e.dateOfBirth || Le && ue.state !== "valid");
762
+ ), ae = M(() => {
763
+ var p, V;
764
+ return !(!((p = e.firstName) != null && p.trim()) || !((V = e.lastName) != null && V.trim()) || !Fe || !je || i && (se.state !== "valid" || se.value !== e.codiceFiscale) || r && !e.dateOfBirth || ke && de.state !== "valid");
700
765
  }, [
701
766
  e.firstName,
702
767
  e.lastName,
703
- te,
704
- Oe,
768
+ Fe,
769
+ je,
705
770
  i,
706
- ae.state,
707
- ae.value,
771
+ se.state,
772
+ se.value,
708
773
  e.codiceFiscale,
709
- a,
774
+ r,
710
775
  e.dateOfBirth,
711
- Le,
712
- ue.state
713
- ]), xe = S != null && S.trim() ? S : void 0, R = xe !== void 0, ze = !R || !!e.criticalInformationAccepted, je = !!(e.privacyConsent && e.termsConsent && ze), it = !ve || Ke.length > 0, ne = Se && je && it && (!r || Ee) && !m && !Ae, Ie = async (k) => {
714
- if (k.preventDefault(), Re({
776
+ ke,
777
+ de.state
778
+ ]), me = k != null && k.trim() ? k : void 0, Ze = me !== void 0, at = !Ze || !!e.criticalInformationAccepted, Se = !H || !(o != null && o.required) || Ye, We = !!(e.privacyConsent && e.termsConsent && at && Se), ot = !pe || ye.length > 0, ct = ae && We && ot && (!d || ue) && !S && !Me, Nt = async (p) => {
779
+ if (p.preventDefault(), Oe({
715
780
  firstName: !0,
716
781
  lastName: !0,
717
782
  email: !0,
@@ -719,8 +784,8 @@ const Gt = 500, Rn = /^[A-Z0-9]{16}$/, En = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ut = 3
719
784
  codiceFiscale: !0,
720
785
  dateOfBirth: !0,
721
786
  insuranceNumber: !0
722
- }), !ne || V.current) return;
723
- const $ = {
787
+ }), !ct || te.current) return;
788
+ const V = {
724
789
  firstName: e.firstName.trim(),
725
790
  lastName: e.lastName.trim(),
726
791
  email: e.email.trim(),
@@ -729,8 +794,11 @@ const Gt = 500, Rn = /^[A-Z0-9]{16}$/, En = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ut = 3
729
794
  termsConsent: !0,
730
795
  // Only present when the service carried text to accept — a
731
796
  // reason without it leaves the key out of the payload entirely.
732
- ...R ? { criticalInformationAccepted: !0 } : {},
733
- ...r ? { paymentAccepted: !0 } : {},
797
+ ...Ze ? { criticalInformationAccepted: !0 } : {},
798
+ // Sent whenever the practice's box is shown, ticked or not, so the
799
+ // server can record the answer; left out when there is no box.
800
+ ...H ? { practiceConsentAccepted: Ye } : {},
801
+ ...d ? { paymentAccepted: !0 } : {},
734
802
  codiceFiscale: e.codiceFiscale,
735
803
  dateOfBirth: e.dateOfBirth,
736
804
  insuranceNumber: e.insuranceNumber,
@@ -739,22 +807,22 @@ const Gt = 500, Rn = /^[A-Z0-9]{16}$/, En = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ut = 3
739
807
  // Only include when the picker was visible; otherwise the single
740
808
  // implicit channel is inferred backend-side from the practice
741
809
  // config.
742
- confirmationChannels: ve ? Ke : void 0
810
+ confirmationChannels: pe ? ye : void 0
743
811
  };
744
- V.current = !0, O(!0), Q(!1);
812
+ te.current = !0, P(!0), he(!1);
745
813
  try {
746
- await n($);
814
+ await n(V);
747
815
  } catch {
748
- Q(!0);
816
+ he(!0);
749
817
  } finally {
750
- V.current = !1, O(!1);
818
+ te.current = !1, P(!1);
751
819
  }
752
- }, Ge = (k, $) => {
753
- const Pe = $ && /^https?:\/\//i.test($) ? $ : void 0;
754
- return Pe ? /* @__PURE__ */ s(
755
- Ms,
820
+ }, Ee = (p, V) => {
821
+ const Ce = pt(V);
822
+ return Ce ? /* @__PURE__ */ s(
823
+ Fs,
756
824
  {
757
- i18nKey: k,
825
+ i18nKey: p,
758
826
  components: {
759
827
  // The `<Trans>` runtime injects link text from the i18n
760
828
  // string. The anchor renders empty at static-analysis time,
@@ -766,209 +834,221 @@ const Gt = 500, Rn = /^[A-Z0-9]{16}$/, En = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ut = 3
766
834
  /* @__PURE__ */ s(
767
835
  "a",
768
836
  {
769
- href: Pe,
837
+ href: Ce,
770
838
  target: "_blank",
771
839
  rel: "noopener noreferrer",
772
- className: "ds:underline ds:text-[var(--primary)]"
840
+ className: At
773
841
  }
774
842
  )
775
843
  )
776
844
  }
777
845
  }
778
- ) : d(k);
846
+ ) : h(p);
779
847
  };
780
- return /* @__PURE__ */ b(
848
+ return /* @__PURE__ */ y(
781
849
  "form",
782
850
  {
783
- ref: h,
784
- id: F,
851
+ ref: b,
852
+ id: R,
785
853
  noValidate: !0,
786
- onSubmit: Ie,
787
- "aria-busy": Ae || void 0,
854
+ onSubmit: Nt,
855
+ "aria-busy": Me || void 0,
788
856
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
789
857
  children: [
790
- I,
791
- /* @__PURE__ */ b("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
858
+ x,
859
+ /* @__PURE__ */ y("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
792
860
  /* @__PURE__ */ s(
793
- Be,
861
+ Le,
794
862
  {
795
- label: d("booking.details.firstName.label"),
863
+ label: h("booking.details.firstName.label"),
796
864
  required: !0,
797
- error: K.firstName && !((Ue = e.firstName) != null && Ue.trim()) ? d("booking.details.firstName.required") : void 0,
865
+ error: ie.firstName && !((Pe = e.firstName) != null && Pe.trim()) ? h("booking.details.firstName.required") : void 0,
798
866
  children: /* @__PURE__ */ s(
799
- ot,
867
+ lt,
800
868
  {
801
869
  autoComplete: "given-name",
802
870
  value: e.firstName ?? "",
803
- onChange: (k) => P({ firstName: k.target.value }),
804
- onBlur: () => se("firstName")
871
+ onChange: (p) => E({ firstName: p.target.value }),
872
+ onBlur: () => U("firstName")
805
873
  }
806
874
  )
807
875
  }
808
876
  ),
809
877
  /* @__PURE__ */ s(
810
- Be,
878
+ Le,
811
879
  {
812
- label: d("booking.details.lastName.label"),
880
+ label: h("booking.details.lastName.label"),
813
881
  required: !0,
814
- error: K.lastName && !((me = e.lastName) != null && me.trim()) ? d("booking.details.lastName.required") : void 0,
882
+ error: ie.lastName && !((K = e.lastName) != null && K.trim()) ? h("booking.details.lastName.required") : void 0,
815
883
  children: /* @__PURE__ */ s(
816
- ot,
884
+ lt,
817
885
  {
818
886
  autoComplete: "family-name",
819
887
  value: e.lastName ?? "",
820
- onChange: (k) => P({ lastName: k.target.value }),
821
- onBlur: () => se("lastName")
888
+ onChange: (p) => E({ lastName: p.target.value }),
889
+ onBlur: () => U("lastName")
822
890
  }
823
891
  )
824
892
  }
825
893
  )
826
894
  ] }),
827
- /* @__PURE__ */ b("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
895
+ /* @__PURE__ */ y("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
828
896
  /* @__PURE__ */ s(
829
- Be,
897
+ Le,
830
898
  {
831
- label: d("booking.details.email.label"),
899
+ label: h("booking.details.email.label"),
832
900
  required: !0,
833
- error: K.email && !te ? d("booking.details.email.invalid") : void 0,
901
+ error: ie.email && !Fe ? h("booking.details.email.invalid") : void 0,
834
902
  children: /* @__PURE__ */ s(
835
- _s,
903
+ Ps,
836
904
  {
837
905
  value: e.email ?? "",
838
- onChange: (k) => P({ email: k.target.value }),
839
- onBlur: () => se("email")
906
+ onChange: (p) => E({ email: p.target.value }),
907
+ onBlur: () => U("email")
840
908
  }
841
909
  )
842
910
  }
843
911
  ),
844
912
  /* @__PURE__ */ s(
845
- Be,
913
+ Le,
846
914
  {
847
- label: d("booking.details.mobilePhone.label"),
915
+ label: h("booking.details.mobilePhone.label"),
848
916
  required: !0,
849
- error: K.mobilePhone && !Oe ? d("booking.details.mobilePhone.invalid") : void 0,
917
+ error: ie.mobilePhone && !je ? h("booking.details.mobilePhone.invalid") : void 0,
850
918
  children: /* @__PURE__ */ s(
851
- Rs,
919
+ Vs,
852
920
  {
853
921
  value: e.mobilePhone ?? "",
854
- defaultCountry: v == null ? void 0 : v.toUpperCase(),
855
- onChange: (k) => {
856
- P({ mobilePhone: k }), se("mobilePhone");
922
+ defaultCountry: I == null ? void 0 : I.toUpperCase(),
923
+ onChange: (p) => {
924
+ E({ mobilePhone: p }), U("mobilePhone");
857
925
  }
858
926
  }
859
927
  )
860
928
  }
861
929
  )
862
930
  ] }),
863
- i || a ? /* @__PURE__ */ b("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
931
+ i || r ? /* @__PURE__ */ y("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
864
932
  i ? /* @__PURE__ */ s(
865
- Be,
933
+ Le,
866
934
  {
867
- label: d("booking.details.codiceFiscale.label"),
935
+ label: h("booking.details.codiceFiscale.label"),
868
936
  required: !0,
869
- description: ae.state === "pending" ? d("booking.details.codiceFiscale.checking") : d("booking.details.codiceFiscale.helper"),
870
- error: K.codiceFiscale && ae.state === "invalid" ? ae.hint ?? d("booking.details.codiceFiscale.invalid") : void 0,
937
+ description: se.state === "pending" ? h("booking.details.codiceFiscale.checking") : h("booking.details.codiceFiscale.helper"),
938
+ error: ie.codiceFiscale && se.state === "invalid" ? se.hint ?? h("booking.details.codiceFiscale.invalid") : void 0,
871
939
  children: /* @__PURE__ */ s(
872
- ot,
940
+ lt,
873
941
  {
874
942
  value: e.codiceFiscale ?? "",
875
943
  maxLength: 16,
876
- onChange: (k) => P({
877
- codiceFiscale: k.target.value.slice(0, 16).toUpperCase()
944
+ onChange: (p) => E({
945
+ codiceFiscale: p.target.value.slice(0, 16).toUpperCase()
878
946
  }),
879
- onBlur: () => se("codiceFiscale")
947
+ onBlur: () => U("codiceFiscale")
880
948
  }
881
949
  )
882
950
  }
883
951
  ) : null,
884
- a ? /* @__PURE__ */ s(
885
- Be,
952
+ r ? /* @__PURE__ */ s(
953
+ Le,
886
954
  {
887
- label: d("booking.details.dateOfBirth.label"),
955
+ label: h("booking.details.dateOfBirth.label"),
888
956
  required: !0,
889
- error: K.dateOfBirth && !e.dateOfBirth ? d("booking.details.dateOfBirth.required") : void 0,
957
+ error: ie.dateOfBirth && !e.dateOfBirth ? h("booking.details.dateOfBirth.required") : void 0,
890
958
  children: /* @__PURE__ */ s(
891
- Bs,
959
+ Rs,
892
960
  {
893
961
  value: e.dateOfBirth ? new Date(e.dateOfBirth) : void 0,
894
- onChange: (k) => {
895
- P({
896
- dateOfBirth: k ? k.toISOString().slice(0, 10) : void 0
897
- }), se("dateOfBirth");
962
+ onChange: (p) => {
963
+ E({
964
+ dateOfBirth: p ? p.toISOString().slice(0, 10) : void 0
965
+ }), U("dateOfBirth");
898
966
  }
899
967
  }
900
968
  )
901
969
  }
902
970
  ) : null
903
971
  ] }) : null,
904
- Le ? /* @__PURE__ */ s(
905
- Be,
972
+ ke ? /* @__PURE__ */ s(
973
+ Le,
906
974
  {
907
- label: d("booking.details.insuranceNumber.label"),
975
+ label: h("booking.details.insuranceNumber.label"),
908
976
  required: !0,
909
- description: ue.state === "pending" ? d("booking.details.insuranceNumber.checking") : void 0,
910
- error: K.insuranceNumber && ue.state === "invalid" ? ue.hint ?? d("booking.details.insuranceNumber.invalid") : void 0,
977
+ description: de.state === "pending" ? h("booking.details.insuranceNumber.checking") : void 0,
978
+ error: ie.insuranceNumber && de.state === "invalid" ? de.hint ?? h("booking.details.insuranceNumber.invalid") : void 0,
911
979
  children: /* @__PURE__ */ s(
912
- ot,
980
+ lt,
913
981
  {
914
982
  value: e.insuranceNumber ?? "",
915
- onChange: (k) => P({ insuranceNumber: k.target.value }),
916
- onBlur: () => se("insuranceNumber")
983
+ onChange: (p) => E({ insuranceNumber: p.target.value }),
984
+ onBlur: () => U("insuranceNumber")
917
985
  }
918
986
  )
919
987
  }
920
988
  ) : null,
921
989
  l ? /* @__PURE__ */ s(
922
- Be,
990
+ Le,
923
991
  {
924
- label: d("booking.details.note.label"),
925
- description: d("booking.details.note.helper", {
926
- max: Gt
992
+ label: h("booking.details.note.label"),
993
+ description: h("booking.details.note.helper", {
994
+ max: Xt
927
995
  }),
928
996
  children: /* @__PURE__ */ s(
929
- Es,
997
+ $s,
930
998
  {
931
999
  value: e.note ?? "",
932
- maxLength: Gt,
1000
+ maxLength: Xt,
933
1001
  rows: 3,
934
- onChange: (k) => P({ note: k.target.value })
1002
+ onChange: (p) => E({ note: p.target.value })
935
1003
  }
936
1004
  )
937
1005
  }
938
1006
  ) : null,
939
1007
  f ? /* @__PURE__ */ s(
940
- et,
1008
+ qe,
941
1009
  {
942
1010
  checked: !!e.returningPatient,
943
- onCheckedChange: (k) => P({ returningPatient: k === !0 }),
944
- label: d("booking.details.returningPatient.label")
1011
+ onCheckedChange: (p) => E({ returningPatient: p === !0 }),
1012
+ label: h("booking.details.returningPatient.label")
945
1013
  }
946
1014
  ) : null,
947
- xe !== void 0 ? /* @__PURE__ */ b(
1015
+ me !== void 0 ? /* @__PURE__ */ y(
948
1016
  "div",
949
1017
  {
950
1018
  "data-component": "booking-critical-information",
951
1019
  role: "group",
952
- "aria-labelledby": `${F}-critical-information-heading`,
1020
+ "aria-labelledby": `${R}-critical-information-heading`,
953
1021
  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)]",
954
1022
  children: [
955
1023
  /* @__PURE__ */ s(
956
1024
  "h3",
957
1025
  {
958
- id: `${F}-critical-information-heading`,
1026
+ id: `${R}-critical-information-heading`,
959
1027
  className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0",
960
- children: d("booking.details.criticalInformation.heading")
1028
+ children: h("booking.details.criticalInformation.heading")
961
1029
  }
962
1030
  ),
963
- /* @__PURE__ */ s("p", { className: "type-body-sm ds:m-0 ds:whitespace-pre-wrap ds:break-words ds:text-[var(--foreground)]", children: xe }),
1031
+ /* @__PURE__ */ s("p", { className: "type-body-sm ds:m-0 ds:whitespace-pre-wrap ds:break-words ds:text-[var(--foreground)]", children: Un(me).map(
1032
+ (p, V) => p.kind === "link" ? /* @__PURE__ */ s(
1033
+ "a",
1034
+ {
1035
+ href: p.href,
1036
+ target: "_blank",
1037
+ rel: "noopener noreferrer",
1038
+ className: At,
1039
+ children: p.text
1040
+ },
1041
+ V
1042
+ ) : /* @__PURE__ */ s(_s, { children: p.text }, V)
1043
+ ) }),
964
1044
  /* @__PURE__ */ s(
965
- et,
1045
+ qe,
966
1046
  {
967
1047
  checked: !!e.criticalInformationAccepted,
968
- onCheckedChange: (k) => P({ criticalInformationAccepted: k === !0 }),
1048
+ onCheckedChange: (p) => E({ criticalInformationAccepted: p === !0 }),
969
1049
  "aria-required": !0,
970
- label: /* @__PURE__ */ b(ce, { children: [
971
- d("booking.details.criticalInformation.accept"),
1050
+ label: /* @__PURE__ */ y(ne, { children: [
1051
+ h("booking.details.criticalInformation.accept"),
972
1052
  /* @__PURE__ */ s(
973
1053
  "span",
974
1054
  {
@@ -983,50 +1063,50 @@ const Gt = 500, Rn = /^[A-Z0-9]{16}$/, En = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ut = 3
983
1063
  ]
984
1064
  }
985
1065
  ) : null,
986
- r ? /* @__PURE__ */ b(
1066
+ d ? /* @__PURE__ */ y(
987
1067
  "div",
988
1068
  {
989
1069
  "data-component": "booking-payment-notice",
990
1070
  role: "group",
991
- "aria-labelledby": `${F}-payment-heading`,
1071
+ "aria-labelledby": `${R}-payment-heading`,
992
1072
  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)]",
993
1073
  children: [
994
- /* @__PURE__ */ s("h3", { id: `${F}-payment-heading`, className: "type-label ds:m-0", children: d("booking.payment.noticeTitle") }),
995
- /* @__PURE__ */ s("p", { className: "type-body-sm ds:m-0", children: d("booking.payment.noticeBody", { amount: G }) }),
996
- pe ? /* @__PURE__ */ s(
1074
+ /* @__PURE__ */ s("h3", { id: `${R}-payment-heading`, className: "type-label ds:m-0", children: h("booking.payment.noticeTitle") }),
1075
+ /* @__PURE__ */ s("p", { className: "type-body-sm ds:m-0", children: h("booking.payment.noticeBody", { amount: G }) }),
1076
+ rt ? /* @__PURE__ */ s(
997
1077
  "a",
998
1078
  {
999
- href: pe,
1079
+ href: rt,
1000
1080
  target: "_blank",
1001
1081
  rel: "noopener noreferrer",
1002
1082
  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)]",
1003
- children: d("booking.payment.terms")
1083
+ children: h("booking.payment.terms")
1004
1084
  }
1005
1085
  ) : null,
1006
1086
  /* @__PURE__ */ s(
1007
- et,
1087
+ qe,
1008
1088
  {
1009
- checked: Ee,
1010
- onCheckedChange: (k) => {
1011
- De(
1012
- k === !0 ? oe : void 0
1013
- ), P({ paymentAccepted: k === !0 });
1089
+ checked: ue,
1090
+ onCheckedChange: (p) => {
1091
+ _e(
1092
+ p === !0 ? re : void 0
1093
+ ), E({ paymentAccepted: p === !0 });
1014
1094
  },
1015
1095
  "aria-required": !0,
1016
- label: d("booking.payment.accept", { amount: G })
1096
+ label: h("booking.payment.accept", { amount: G })
1017
1097
  }
1018
1098
  )
1019
1099
  ]
1020
1100
  }
1021
1101
  ) : null,
1022
- /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
1102
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
1023
1103
  /* @__PURE__ */ s(
1024
- et,
1104
+ qe,
1025
1105
  {
1026
1106
  checked: !!e.privacyConsent,
1027
- onCheckedChange: (k) => P({ privacyConsent: k === !0 }),
1028
- label: /* @__PURE__ */ b(ce, { children: [
1029
- Ge(
1107
+ onCheckedChange: (p) => E({ privacyConsent: p === !0 }),
1108
+ label: /* @__PURE__ */ y(ne, { children: [
1109
+ Ee(
1030
1110
  "booking.details.consent.privacy.label",
1031
1111
  u
1032
1112
  ),
@@ -1042,12 +1122,12 @@ const Gt = 500, Rn = /^[A-Z0-9]{16}$/, En = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ut = 3
1042
1122
  }
1043
1123
  ),
1044
1124
  /* @__PURE__ */ s(
1045
- et,
1125
+ qe,
1046
1126
  {
1047
1127
  checked: !!e.termsConsent,
1048
- onCheckedChange: (k) => P({ termsConsent: k === !0 }),
1049
- label: /* @__PURE__ */ b(ce, { children: [
1050
- Ge(
1128
+ onCheckedChange: (p) => E({ termsConsent: p === !0 }),
1129
+ label: /* @__PURE__ */ y(ne, { children: [
1130
+ Ee(
1051
1131
  "booking.details.consent.terms.label",
1052
1132
  g
1053
1133
  ),
@@ -1061,44 +1141,76 @@ const Gt = 500, Rn = /^[A-Z0-9]{16}$/, En = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ut = 3
1061
1141
  )
1062
1142
  ] })
1063
1143
  }
1064
- )
1144
+ ),
1145
+ o && H ? /* @__PURE__ */ s(
1146
+ qe,
1147
+ {
1148
+ checked: Ye,
1149
+ onCheckedChange: (p) => {
1150
+ ze(
1151
+ p === !0 ? ve : void 0
1152
+ ), E({ practiceConsentAccepted: p === !0 });
1153
+ },
1154
+ "aria-required": o.required || void 0,
1155
+ label: /* @__PURE__ */ y(ne, { children: [
1156
+ pt(o.url) ? /* @__PURE__ */ s(
1157
+ "a",
1158
+ {
1159
+ href: pt(o.url),
1160
+ target: "_blank",
1161
+ rel: "noopener noreferrer",
1162
+ className: At,
1163
+ children: o.label
1164
+ }
1165
+ ) : o.label,
1166
+ o.required ? /* @__PURE__ */ s(
1167
+ "span",
1168
+ {
1169
+ "aria-hidden": "true",
1170
+ className: "ds:text-[var(--destructive)] ds:ms-[var(--spacing-2xs)]",
1171
+ children: "*"
1172
+ }
1173
+ ) : null
1174
+ ] })
1175
+ }
1176
+ ) : null
1065
1177
  ] }),
1066
- ve ? /* @__PURE__ */ s(
1178
+ pe ? /* @__PURE__ */ s(
1067
1179
  "div",
1068
1180
  {
1069
1181
  "data-component": "booking-confirmation-channels",
1070
1182
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
1071
1183
  children: /* @__PURE__ */ s(
1072
- Os,
1184
+ Ls,
1073
1185
  {
1074
- label: d("booking.confirmation.heading"),
1075
- helperText: d("booking.confirmation.helper"),
1076
- value: Ke,
1077
- onChange: (k) => P({
1078
- confirmationChannels: k
1186
+ label: h("booking.confirmation.heading"),
1187
+ helperText: h("booking.confirmation.helper"),
1188
+ value: ye,
1189
+ onChange: (p) => E({
1190
+ confirmationChannels: p
1079
1191
  }),
1080
1192
  orientation: "vertical",
1081
- options: Te.map((k) => ({
1082
- value: k,
1083
- label: d(`booking.confirmation.channel.${k}`)
1193
+ options: X.map((p) => ({
1194
+ value: p,
1195
+ label: h(`booking.confirmation.channel.${p}`)
1084
1196
  })),
1085
- error: ee ? d("booking.confirmation.atLeastOne") : void 0
1197
+ error: L ? h("booking.confirmation.atLeastOne") : void 0
1086
1198
  }
1087
1199
  )
1088
1200
  }
1089
1201
  ) : null,
1090
- A || J || m ? /* @__PURE__ */ s(X, { variant: "error", children: /* @__PURE__ */ s(X.Description, { children: A ?? d(
1091
- m ? "booking.payment.unavailable" : "booking.payment.submitFailed"
1202
+ v || we || S ? /* @__PURE__ */ s(Q, { variant: "error", children: /* @__PURE__ */ s(Q.Description, { children: v ?? h(
1203
+ S ? "booking.payment.unavailable" : "booking.payment.submitFailed"
1092
1204
  ) }) }) : null,
1093
1205
  /* @__PURE__ */ s(
1094
- Ve,
1206
+ $e,
1095
1207
  {
1096
1208
  intent: "primary",
1097
1209
  size: "md",
1098
1210
  type: "submit",
1099
- disabled: !ne,
1100
- startIcon: Ae ? /* @__PURE__ */ s(Xt, { variant: "pulse", size: "sm" }) : void 0,
1101
- children: r ? d("booking.payment.submit", { amount: G }) : d("booking.details.submit")
1211
+ disabled: !ct,
1212
+ startIcon: Me ? /* @__PURE__ */ s(ns, { variant: "pulse", size: "sm" }) : void 0,
1213
+ children: d ? h("booking.payment.submit", { amount: G }) : h("booking.details.submit")
1102
1214
  }
1103
1215
  )
1104
1216
  ]
@@ -1106,8 +1218,8 @@ const Gt = 500, Rn = /^[A-Z0-9]{16}$/, En = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ut = 3
1106
1218
  );
1107
1219
  }
1108
1220
  );
1109
- Dt.displayName = "BookingDetailsForm";
1110
- function Mt(e) {
1221
+ Bt.displayName = "BookingDetailsForm";
1222
+ function Ft(e) {
1111
1223
  const t = e.payment;
1112
1224
  if (!t) return;
1113
1225
  const n = (t.currencyCode ?? "EUR").toUpperCase();
@@ -1119,19 +1231,19 @@ function Mt(e) {
1119
1231
  currencyCode: n
1120
1232
  };
1121
1233
  }
1122
- function Ln(e, t, n) {
1234
+ function Zn(e, t, n) {
1123
1235
  const i = e.filter(
1124
- (o) => t.includes(o.id)
1125
- ), a = (n == null ? void 0 : n.serviceId) ?? (t.length === 1 ? t[0] : void 0);
1126
- if (a) {
1127
- const o = i.find((l) => l.id === a);
1128
- if (!o) return { blocked: !0 };
1129
- const c = Mt(o);
1130
- return { payment: c, blocked: !!(o.payment && !c) };
1236
+ (a) => t.includes(a.id)
1237
+ ), r = (n == null ? void 0 : n.serviceId) ?? (t.length === 1 ? t[0] : void 0);
1238
+ if (r) {
1239
+ const a = i.find((l) => l.id === r);
1240
+ if (!a) return { blocked: !0 };
1241
+ const c = Ft(a);
1242
+ return { payment: c, blocked: !!(a.payment && !c) };
1131
1243
  }
1132
- return { blocked: i.some((o) => !!o.payment) };
1244
+ return { blocked: i.some((a) => !!a.payment) };
1133
1245
  }
1134
- function lt(e) {
1246
+ function ft(e) {
1135
1247
  return e ? JSON.stringify([
1136
1248
  e.serviceId,
1137
1249
  e.kind,
@@ -1139,135 +1251,135 @@ function lt(e) {
1139
1251
  e.currencyCode
1140
1252
  ]) : "";
1141
1253
  }
1142
- function Pn({
1254
+ function Wn({
1143
1255
  services: e,
1144
1256
  value: t,
1145
1257
  availableSlots: n,
1146
1258
  onSubmit: i,
1147
- onChange: a,
1148
- paymentState: o,
1259
+ onChange: r,
1260
+ paymentState: a,
1149
1261
  submitting: c,
1150
1262
  paymentTermsUrl: l,
1151
1263
  renderPayment: f
1152
1264
  }) {
1153
- var Z, ue, he;
1265
+ var se, Z, de;
1154
1266
  const u = JSON.stringify([
1155
1267
  t.insuranceType,
1156
1268
  t.specialtyId,
1157
1269
  t.specialtyIds,
1158
- Ce(t),
1270
+ Te(t),
1159
1271
  t.operatorId,
1160
1272
  t.operatorIds,
1161
1273
  t.date,
1162
1274
  t.slotKey
1163
- ]), g = L(
1275
+ ]), g = F(
1164
1276
  void 0
1165
- ), p = (t.date ? (Z = n[t.date]) == null ? void 0 : Z.find((K) => K.key === t.slotKey) : void 0) ?? (((ue = g.current) == null ? void 0 : ue.selection) === u ? g.current.slot : void 0), m = Ln(
1277
+ ), d = (t.date ? (se = n[t.date]) == null ? void 0 : se.find((J) => J.key === t.slotKey) : void 0) ?? (((Z = g.current) == null ? void 0 : Z.selection) === u ? g.current.slot : void 0), m = Zn(
1166
1278
  e,
1167
- Ce(t),
1168
- p
1169
- ), S = m.blocked || !!(m.payment && !f), y = JSON.stringify([
1279
+ Te(t),
1280
+ d
1281
+ ), S = m.blocked || !!(m.payment && !f), k = JSON.stringify([
1170
1282
  u,
1171
- p == null ? void 0 : p.serviceId,
1172
- lt(m.payment),
1283
+ d == null ? void 0 : d.serviceId,
1284
+ ft(m.payment),
1173
1285
  l,
1174
1286
  S
1175
- ]), N = m.payment ? JSON.stringify([lt(m.payment), l]) : "", _ = L(void 0), I = !!((he = t.details) != null && he.paymentAccepted);
1176
- z(() => {
1177
- if (!I) _.current = void 0;
1178
- else if (N) _.current === void 0 ? _.current = N : _.current !== N && (_.current = void 0, a({
1287
+ ]), A = m.payment ? JSON.stringify([ft(m.payment), l]) : "", O = F(void 0), N = !!((de = t.details) != null && de.paymentAccepted);
1288
+ $(() => {
1289
+ if (!N) O.current = void 0;
1290
+ else if (A) O.current === void 0 ? O.current = A : O.current !== A && (O.current = void 0, r({
1179
1291
  ...t,
1180
1292
  details: { ...t.details, paymentAccepted: !1 }
1181
1293
  }));
1182
1294
  else return;
1183
- }, [I, N, a, t]);
1184
- const v = L(y);
1185
- v.current = y;
1186
- const [x, w] = ie({ status: "idle" }), A = L(0), h = L(!1), d = L(!0), T = L(!1), F = L(void 0), V = L(y);
1187
- z(() => (d.current = !0, () => {
1188
- d.current = !1, A.current += 1;
1295
+ }, [N, A, r, t]);
1296
+ const x = F(k);
1297
+ x.current = k;
1298
+ const [I, w] = ee({ status: "idle" }), T = F(0), v = F(!1), b = F(!0), h = F(!1), q = F(void 0), R = F(k);
1299
+ $(() => (b.current = !0, () => {
1300
+ b.current = !1, T.current += 1;
1189
1301
  }), []);
1190
- const D = x.status === "payment" || x.status === "success";
1191
- z(() => {
1192
- V.current === y || T.current || D || (V.current = y, A.current += 1, h.current = !1, w({ status: "idle" }));
1193
- }, [y, D]);
1194
- const O = D || V.current === y ? x.session : void 0, J = M(
1195
- () => O && (o == null ? void 0 : o.sessionId) === O.id ? o : O ? { sessionId: O.id, status: "ready" } : void 0,
1196
- [O, o]
1302
+ const te = I.status === "payment" || I.status === "success";
1303
+ $(() => {
1304
+ R.current === k || h.current || te || (R.current = k, T.current += 1, v.current = !1, w({ status: "idle" }));
1305
+ }, [k, te]);
1306
+ const C = te || R.current === k ? I.session : void 0, P = M(
1307
+ () => C && (a == null ? void 0 : a.sessionId) === C.id ? a : C ? { sessionId: C.id, status: "ready" } : void 0,
1308
+ [C, a]
1197
1309
  );
1198
- O && J && "phase" in J && J.phase === "completion" && (F.current = O.id);
1199
- const Q = M(
1200
- () => O && F.current === O.id && J && J.status !== "paid" && (!("phase" in J) || J.phase !== "completion") ? {
1201
- sessionId: O.id,
1310
+ C && P && "phase" in P && P.phase === "completion" && (q.current = C.id);
1311
+ const we = M(
1312
+ () => C && q.current === C.id && P && P.status !== "paid" && (!("phase" in P) || P.phase !== "completion") ? {
1313
+ sessionId: C.id,
1202
1314
  status: "processing",
1203
1315
  phase: "completion"
1204
- } : J,
1205
- [O, J]
1316
+ } : P,
1317
+ [C, P]
1206
1318
  );
1207
- z(() => {
1208
- !O || !Q || T.current || (Q.status === "paid" ? (T.current = !0, w((K) => ({ ...K, status: "success" }))) : Q.status === "cancelled" && (A.current += 1, h.current = !1, g.current = void 0, a({
1319
+ $(() => {
1320
+ !C || !we || h.current || (we.status === "paid" ? (h.current = !0, w((J) => ({ ...J, status: "success" }))) : we.status === "cancelled" && (T.current += 1, v.current = !1, g.current = void 0, r({
1209
1321
  ...t,
1210
1322
  details: { ...t.details, paymentAccepted: !1 }
1211
1323
  }), w({ status: "idle", cancelled: !0 })));
1212
- }, [O, Q, a, t]);
1213
- const Ae = () => {
1214
- A.current += 1, h.current = !1, T.current = !1, F.current = void 0, g.current = void 0, V.current = v.current, w({ status: "idle" });
1215
- }, ae = async (K) => {
1216
- var oe, $e, De, Me, Ee;
1217
- if (!(p != null && p.available) || S || c || h.current || x.status === "payment" || T.current || m.payment && !K.paymentAccepted) return;
1218
- h.current = !0, g.current = { selection: u, slot: { ...p } };
1219
- const Re = ++A.current, se = y;
1220
- V.current = se;
1221
- const H = {
1222
- slot: { ...p, meta: p.meta ? { ...p.meta } : void 0 },
1324
+ }, [C, we, r, t]);
1325
+ const he = () => {
1326
+ T.current += 1, v.current = !1, h.current = !1, q.current = void 0, g.current = void 0, R.current = x.current, w({ status: "idle" });
1327
+ }, Me = async (J) => {
1328
+ var E, re, Ke, _e, Be;
1329
+ if (!(d != null && d.available) || S || c || v.current || I.status === "payment" || h.current || m.payment && !J.paymentAccepted) return;
1330
+ v.current = !0, g.current = { selection: u, slot: { ...d } };
1331
+ const ie = ++T.current, Oe = k;
1332
+ R.current = Oe;
1333
+ const U = {
1334
+ slot: { ...d, meta: d.meta ? { ...d.meta } : void 0 },
1223
1335
  value: {
1224
1336
  ...t,
1225
- serviceIds: (oe = t.serviceIds) == null ? void 0 : oe.slice(),
1226
- specialtyIds: ($e = t.specialtyIds) == null ? void 0 : $e.slice(),
1227
- operatorIds: (De = t.operatorIds) == null ? void 0 : De.slice(),
1228
- operatorId: ls(t) ?? t.operatorId,
1229
- details: { ...K }
1337
+ serviceIds: (E = t.serviceIds) == null ? void 0 : E.slice(),
1338
+ specialtyIds: (re = t.specialtyIds) == null ? void 0 : re.slice(),
1339
+ operatorIds: (Ke = t.operatorIds) == null ? void 0 : Ke.slice(),
1340
+ operatorId: gs(t) ?? t.operatorId,
1341
+ details: { ...J }
1230
1342
  },
1231
1343
  details: {
1232
- ...K,
1233
- confirmationChannels: (Me = K.confirmationChannels) == null ? void 0 : Me.slice()
1344
+ ...J,
1345
+ confirmationChannels: (_e = J.confirmationChannels) == null ? void 0 : _e.slice()
1234
1346
  },
1235
1347
  ...m.payment ? { payment: { ...m.payment } } : {}
1236
- }, re = () => d.current && A.current === Re && v.current === se;
1348
+ }, W = () => b.current && T.current === ie && x.current === Oe;
1237
1349
  w({ status: "submitting" });
1238
- let P = !1;
1350
+ let le = !1;
1239
1351
  try {
1240
- const G = await i(H);
1241
- if (!re()) return;
1242
- if (H.payment) {
1243
- const pe = G == null ? void 0 : G.paymentSession;
1244
- if (!((Ee = pe == null ? void 0 : pe.id) != null && Ee.trim()) || lt(pe.payment) !== lt(H.payment)) {
1352
+ const ue = await i(U);
1353
+ if (!W()) return;
1354
+ if (U.payment) {
1355
+ const H = ue == null ? void 0 : ue.paymentSession;
1356
+ if (!((Be = H == null ? void 0 : H.id) != null && Be.trim()) || ft(H.payment) !== ft(U.payment)) {
1245
1357
  w({ status: "error" });
1246
1358
  return;
1247
1359
  }
1248
- P = !0, w({
1360
+ le = !0, w({
1249
1361
  status: "payment",
1250
- snapshot: H,
1251
- session: { id: pe.id, payment: { ...pe.payment } }
1362
+ snapshot: U,
1363
+ session: { id: H.id, payment: { ...H.payment } }
1252
1364
  });
1253
- } else G != null && G.paymentSession ? w({ status: "error" }) : (T.current = !0, w({ status: "success", snapshot: H }));
1365
+ } else ue != null && ue.paymentSession ? w({ status: "error" }) : (h.current = !0, w({ status: "success", snapshot: U }));
1254
1366
  } catch {
1255
- re() && w({ status: "error" });
1367
+ W() && w({ status: "error" });
1256
1368
  } finally {
1257
- re() && !P && (h.current = !1);
1369
+ W() && !le && (v.current = !1);
1258
1370
  }
1259
1371
  };
1260
1372
  return {
1261
- ...x,
1373
+ ...I,
1262
1374
  payment: m.payment,
1263
1375
  blocked: S,
1264
- state: Q,
1265
- activeSession: O,
1266
- submit: ae,
1267
- reset: Ae
1376
+ state: we,
1377
+ activeSession: C,
1378
+ submit: Me,
1379
+ reset: he
1268
1380
  };
1269
1381
  }
1270
- const Fn = ht(
1382
+ const Xn = kt(
1271
1383
  "ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)]",
1272
1384
  {
1273
1385
  variants: {
@@ -1295,44 +1407,44 @@ const Fn = ht(
1295
1407
  },
1296
1408
  defaultVariants: { variant: "inline-list", surface: "flat" }
1297
1409
  }
1298
- ), Vn = [
1410
+ ), Qn = [
1299
1411
  [
1300
1412
  /\b(estetic|aesthetic|botox|filler|mesoterap|chirurgia\s*plastic)/i,
1301
- Ht
1413
+ Zt
1302
1414
  ],
1303
- [/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i, Us],
1304
- [/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i, bn],
1305
- [/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i, Ys],
1306
- [/\b(otorin|udito|orecchi|hearing|ear)/i, ln],
1307
- [/\b(neuro|brain|cervello)/i, rn],
1308
- [/\b(pediatr|child|bambin)/i, Ws],
1309
- [/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, nn],
1310
- [/\b(lab|analis|test|sang|esami)/i, pn],
1311
- [/\b(farmaco|pharm|pillol|refill)/i, fn],
1312
- [/\b(chirurg|surg|intervent|operat)/i, hn],
1313
- [/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, Zs],
1314
- [/\b(vacc|inject|inie|punto)/i, Ht],
1315
- [/\b(derma|skin|pelle)/i, Xs],
1316
- [/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, Qs],
1317
- [/\b(general|medicin|family|control|check[-\s]?up)/i, tn]
1415
+ [/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i, Qs],
1416
+ [/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i, In],
1417
+ [/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i, en],
1418
+ [/\b(otorin|udito|orecchi|hearing|ear)/i, gn],
1419
+ [/\b(neuro|brain|cervello)/i, un],
1420
+ [/\b(pediatr|child|bambin)/i, tn],
1421
+ [/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, dn],
1422
+ [/\b(lab|analis|test|sang|esami)/i, vn],
1423
+ [/\b(farmaco|pharm|pillol|refill)/i, yn],
1424
+ [/\b(chirurg|surg|intervent|operat)/i, Sn],
1425
+ [/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, sn],
1426
+ [/\b(vacc|inject|inie|punto)/i, Zt],
1427
+ [/\b(derma|skin|pelle)/i, nn],
1428
+ [/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, rn],
1429
+ [/\b(general|medicin|family|control|check[-\s]?up)/i, on]
1318
1430
  ];
1319
- function $n(e) {
1320
- for (const [t, n] of Vn)
1431
+ function ei(e) {
1432
+ for (const [t, n] of Qn)
1321
1433
  if (t.test(e)) return n;
1322
1434
  return null;
1323
1435
  }
1324
- function Kn(e) {
1325
- const t = $n(e.label) ?? Gs;
1436
+ function ti(e) {
1437
+ const t = ei(e.label) ?? Xs;
1326
1438
  return /* @__PURE__ */ s(t, { "aria-hidden": "true", className: "ds:size-5" });
1327
1439
  }
1328
- function ps(e) {
1440
+ function vs(e) {
1329
1441
  var t;
1330
1442
  return (t = e.priceLabel) != null && t.trim() ? e.priceLabel : void 0;
1331
1443
  }
1332
- function Fe(e) {
1333
- return pt(e, "yyyy-MM-dd");
1444
+ function Ve(e) {
1445
+ return ht(e, "yyyy-MM-dd");
1334
1446
  }
1335
- const zn = [
1447
+ const si = [
1336
1448
  "ds:relative ds:flex ds:items-center ds:justify-center",
1337
1449
  "ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
1338
1450
  "ds:rounded-[var(--radius-sm)]",
@@ -1342,7 +1454,7 @@ const zn = [
1342
1454
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
1343
1455
  "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1344
1456
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
1345
- ].join(" "), jn = ht(zn, {
1457
+ ].join(" "), ni = kt(si, {
1346
1458
  variants: {
1347
1459
  state: {
1348
1460
  available: "ds:cursor-pointer ds:text-[var(--foreground)] ds:hover:bg-[var(--muted)]/30",
@@ -1353,116 +1465,116 @@ const zn = [
1353
1465
  },
1354
1466
  defaultVariants: { state: "unavailable" }
1355
1467
  });
1356
- function qn({
1468
+ function ii({
1357
1469
  availableDates: e,
1358
1470
  selectedDate: t,
1359
1471
  onSelectDate: n,
1360
1472
  locale: i,
1361
- loading: a
1473
+ loading: r
1362
1474
  }) {
1363
- const { t: o } = q(), c = M(() => t ? tt(le(t)) : e.length > 0 ? tt(le(e[0])) : tt(/* @__PURE__ */ new Date()), [t, e]), [l, f] = ie(c), [u, g] = ie(null), r = M(() => {
1364
- const I = tt(l), v = Ks(l), x = I.getDay(), w = v.getDate(), A = [];
1365
- for (let h = x; h > 0; h -= 1) {
1366
- const d = new Date(I);
1367
- d.setDate(I.getDate() - h), A.push(d);
1475
+ const { t: a } = j(), c = M(() => t ? st(ce(t)) : e.length > 0 ? st(ce(e[0])) : st(/* @__PURE__ */ new Date()), [t, e]), [l, f] = ee(c), [u, g] = ee(null), o = M(() => {
1476
+ const N = st(l), x = Js(l), I = N.getDay(), w = x.getDate(), T = [];
1477
+ for (let v = I; v > 0; v -= 1) {
1478
+ const b = new Date(N);
1479
+ b.setDate(N.getDate() - v), T.push(b);
1368
1480
  }
1369
- for (let h = 0; h < w; h += 1) {
1370
- const d = new Date(I);
1371
- d.setDate(I.getDate() + h), A.push(d);
1481
+ for (let v = 0; v < w; v += 1) {
1482
+ const b = new Date(N);
1483
+ b.setDate(N.getDate() + v), T.push(b);
1372
1484
  }
1373
- for (; A.length < 42; ) {
1374
- const h = A[A.length - 1], d = new Date(h);
1375
- d.setDate(h.getDate() + 1), A.push(d);
1485
+ for (; T.length < 42; ) {
1486
+ const v = T[T.length - 1], b = new Date(v);
1487
+ b.setDate(v.getDate() + 1), T.push(b);
1376
1488
  }
1377
- return A;
1378
- }, [l]), p = M(() => {
1489
+ return T;
1490
+ }, [l]), d = M(() => {
1379
1491
  try {
1380
1492
  return new Intl.DateTimeFormat(i, {
1381
1493
  month: "long",
1382
1494
  year: "numeric"
1383
1495
  }).format(l);
1384
1496
  } catch {
1385
- return pt(l, "MMMM yyyy");
1497
+ return ht(l, "MMMM yyyy");
1386
1498
  }
1387
1499
  }, [l, i]), m = M(() => {
1388
- const I = new Date(2024, 0, 7);
1389
- return Array.from({ length: 7 }, (v, x) => {
1390
- const w = new Date(I);
1391
- w.setDate(I.getDate() + x);
1500
+ const N = new Date(2024, 0, 7);
1501
+ return Array.from({ length: 7 }, (x, I) => {
1502
+ const w = new Date(N);
1503
+ w.setDate(N.getDate() + I);
1392
1504
  try {
1393
1505
  return new Intl.DateTimeFormat(i, { weekday: "short" }).format(w);
1394
1506
  } catch {
1395
- return pt(w, "EEE");
1507
+ return ht(w, "EEE");
1396
1508
  }
1397
1509
  });
1398
- }, [i]), S = M(() => new Set(e), [e]), y = ke(
1399
- (I) => S.has(Fe(I)),
1510
+ }, [i]), S = M(() => new Set(e), [e]), k = Ne(
1511
+ (N) => S.has(Ve(N)),
1400
1512
  [S]
1401
- ), N = M(() => {
1513
+ ), A = M(() => {
1402
1514
  if (u) return u;
1403
- if (t) return le(t);
1404
- const I = r.find(
1405
- (v) => dt(v, l) && y(v)
1515
+ if (t) return ce(t);
1516
+ const N = o.find(
1517
+ (x) => ut(x, l) && k(x)
1406
1518
  );
1407
- return I || (r.find((v) => dt(v, l)) ?? null);
1408
- }, [u, t, r, l, y]), _ = ke(
1409
- (I, v) => {
1410
- let x = null;
1411
- switch (I.key) {
1519
+ return N || (o.find((x) => ut(x, l)) ?? null);
1520
+ }, [u, t, o, l, k]), O = Ne(
1521
+ (N, x) => {
1522
+ let I = null;
1523
+ switch (N.key) {
1412
1524
  case "ArrowLeft":
1413
- x = new Date(v), x.setDate(v.getDate() - 1);
1525
+ I = new Date(x), I.setDate(x.getDate() - 1);
1414
1526
  break;
1415
1527
  case "ArrowRight":
1416
- x = new Date(v), x.setDate(v.getDate() + 1);
1528
+ I = new Date(x), I.setDate(x.getDate() + 1);
1417
1529
  break;
1418
1530
  case "ArrowUp":
1419
- x = new Date(v), x.setDate(v.getDate() - 7);
1531
+ I = new Date(x), I.setDate(x.getDate() - 7);
1420
1532
  break;
1421
1533
  case "ArrowDown":
1422
- x = new Date(v), x.setDate(v.getDate() + 7);
1534
+ I = new Date(x), I.setDate(x.getDate() + 7);
1423
1535
  break;
1424
1536
  case "Home":
1425
- x = new Date(v), x.setDate(v.getDate() - v.getDay());
1537
+ I = new Date(x), I.setDate(x.getDate() - x.getDay());
1426
1538
  break;
1427
1539
  case "End":
1428
- x = new Date(v), x.setDate(v.getDate() + (6 - v.getDay()));
1540
+ I = new Date(x), I.setDate(x.getDate() + (6 - x.getDay()));
1429
1541
  break;
1430
1542
  case "Enter":
1431
1543
  case " ": {
1432
- I.preventDefault(), y(v) && n(Fe(v));
1544
+ N.preventDefault(), k(x) && n(Ve(x));
1433
1545
  return;
1434
1546
  }
1435
1547
  default:
1436
1548
  return;
1437
1549
  }
1438
- x && (I.preventDefault(), dt(x, l) || f(tt(x)), g(x));
1550
+ I && (N.preventDefault(), ut(I, l) || f(st(I)), g(I));
1439
1551
  },
1440
- [y, n, l]
1552
+ [k, n, l]
1441
1553
  );
1442
- return a ? /* @__PURE__ */ b(
1554
+ return r ? /* @__PURE__ */ y(
1443
1555
  "div",
1444
1556
  {
1445
1557
  role: "status",
1446
1558
  "aria-live": "polite",
1447
- "aria-label": o("common.loading"),
1559
+ "aria-label": a("common.loading"),
1448
1560
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
1449
1561
  children: [
1450
- /* @__PURE__ */ s(mt, { variant: "text", width: "40%" }),
1451
- /* @__PURE__ */ s("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (I, v) => /* @__PURE__ */ s(mt, { variant: "rounded", height: "2.5rem" }, `mg-skel-${v}`)) })
1562
+ /* @__PURE__ */ s(vt, { variant: "text", width: "40%" }),
1563
+ /* @__PURE__ */ s("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (N, x) => /* @__PURE__ */ s(vt, { variant: "rounded", height: "2.5rem" }, `mg-skel-${x}`)) })
1452
1564
  ]
1453
1565
  }
1454
- ) : /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1455
- /* @__PURE__ */ b("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1566
+ ) : /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1567
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1456
1568
  /* @__PURE__ */ s(
1457
- qt,
1569
+ Gt,
1458
1570
  {
1459
- icon: /* @__PURE__ */ s(js, {}),
1460
- "aria-label": o("booking.previousMonth"),
1571
+ icon: /* @__PURE__ */ s(Gs, {}),
1572
+ "aria-label": a("booking.previousMonth"),
1461
1573
  size: "sm",
1462
1574
  intent: "ghost",
1463
1575
  flipIconInRtl: !0,
1464
1576
  onClick: () => {
1465
- f((I) => xn(I)), g(null);
1577
+ f((N) => An(N)), g(null);
1466
1578
  }
1467
1579
  }
1468
1580
  ),
@@ -1471,28 +1583,28 @@ function qn({
1471
1583
  {
1472
1584
  className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]",
1473
1585
  "aria-live": "polite",
1474
- children: p
1586
+ children: d
1475
1587
  }
1476
1588
  ),
1477
1589
  /* @__PURE__ */ s(
1478
- qt,
1590
+ Gt,
1479
1591
  {
1480
- icon: /* @__PURE__ */ s(qs, {}),
1481
- "aria-label": o("booking.nextMonth"),
1592
+ icon: /* @__PURE__ */ s(Ys, {}),
1593
+ "aria-label": a("booking.nextMonth"),
1482
1594
  size: "sm",
1483
1595
  intent: "ghost",
1484
1596
  flipIconInRtl: !0,
1485
1597
  onClick: () => {
1486
- f((I) => ts(I, 1)), g(null);
1598
+ f((N) => as(N, 1)), g(null);
1487
1599
  }
1488
1600
  }
1489
1601
  )
1490
1602
  ] }),
1491
- /* @__PURE__ */ b(
1603
+ /* @__PURE__ */ y(
1492
1604
  "div",
1493
1605
  {
1494
1606
  role: "grid",
1495
- "aria-label": o("booking.monthGridLabel"),
1607
+ "aria-label": a("booking.monthGridLabel"),
1496
1608
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
1497
1609
  children: [
1498
1610
  /* @__PURE__ */ s(
@@ -1500,30 +1612,30 @@ function qn({
1500
1612
  {
1501
1613
  role: "row",
1502
1614
  className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
1503
- children: m.map((I, v) => /* @__PURE__ */ s(
1615
+ children: m.map((N, x) => /* @__PURE__ */ s(
1504
1616
  "div",
1505
1617
  {
1506
1618
  role: "columnheader",
1507
1619
  className: "type-meta ds:text-center ds:text-[var(--muted-foreground)] ds:font-[var(--font-weight-medium)]",
1508
- children: I
1620
+ children: N
1509
1621
  },
1510
- `wd-${v}`
1622
+ `wd-${x}`
1511
1623
  ))
1512
1624
  }
1513
1625
  ),
1514
- Array.from({ length: 6 }, (I, v) => /* @__PURE__ */ s(
1626
+ Array.from({ length: 6 }, (N, x) => /* @__PURE__ */ s(
1515
1627
  "div",
1516
1628
  {
1517
1629
  role: "row",
1518
1630
  className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
1519
- children: r.slice(v * 7, v * 7 + 7).map((x, w) => {
1520
- const A = v * 7 + w, h = dt(x, l), d = h && y(x), T = t ? Jt(x, le(t)) : !1, F = h ? T ? "selected" : d ? "available" : "unavailable" : "outside", V = N ? Jt(N, x) : !1, D = (() => {
1631
+ children: o.slice(x * 7, x * 7 + 7).map((I, w) => {
1632
+ const T = x * 7 + w, v = ut(I, l), b = v && k(I), h = t ? Yt(I, ce(t)) : !1, q = v ? h ? "selected" : b ? "available" : "unavailable" : "outside", R = A ? Yt(A, I) : !1, te = (() => {
1521
1633
  try {
1522
1634
  return new Intl.DateTimeFormat(i, {
1523
1635
  dateStyle: "full"
1524
- }).format(x);
1636
+ }).format(I);
1525
1637
  } catch {
1526
- return pt(x, "PPP");
1638
+ return ht(I, "PPP");
1527
1639
  }
1528
1640
  })();
1529
1641
  return /* @__PURE__ */ s(
@@ -1531,30 +1643,30 @@ function qn({
1531
1643
  {
1532
1644
  type: "button",
1533
1645
  role: "gridcell",
1534
- "aria-label": D,
1535
- "aria-selected": T || void 0,
1536
- "aria-disabled": !d || void 0,
1537
- tabIndex: V ? 0 : -1,
1538
- disabled: !d,
1646
+ "aria-label": te,
1647
+ "aria-selected": h || void 0,
1648
+ "aria-disabled": !b || void 0,
1649
+ tabIndex: R ? 0 : -1,
1650
+ disabled: !b,
1539
1651
  onClick: () => {
1540
- d && n(Fe(x));
1652
+ b && n(Ve(I));
1541
1653
  },
1542
- onKeyDown: (O) => _(O, x),
1543
- className: jn({ state: F }),
1544
- children: /* @__PURE__ */ s("span", { "aria-hidden": "true", children: x.getDate() })
1654
+ onKeyDown: (C) => O(C, I),
1655
+ className: ni({ state: q }),
1656
+ children: /* @__PURE__ */ s("span", { "aria-hidden": "true", children: I.getDate() })
1545
1657
  },
1546
- `mg-cell-${A}`
1658
+ `mg-cell-${T}`
1547
1659
  );
1548
1660
  })
1549
1661
  },
1550
- `mg-row-${v}`
1662
+ `mg-row-${x}`
1551
1663
  ))
1552
1664
  ]
1553
1665
  }
1554
1666
  )
1555
1667
  ] });
1556
1668
  }
1557
- const Jn = ht(
1669
+ const ri = kt(
1558
1670
  [
1559
1671
  "ds:relative ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-md)]",
1560
1672
  "ds:min-h-[var(--min-target-size)]",
@@ -1580,52 +1692,52 @@ const Jn = ht(
1580
1692
  defaultVariants: { state: "idle" }
1581
1693
  }
1582
1694
  );
1583
- function Hn({
1695
+ function ai({
1584
1696
  services: e,
1585
1697
  selectedServiceId: t,
1586
1698
  onSelect: n
1587
1699
  }) {
1588
- const { t: i, i18n: a } = q(), o = gt(), [c, l] = ie(() => {
1700
+ const { t: i, i18n: r } = j(), a = yt(), [c, l] = ee(() => {
1589
1701
  if (t) {
1590
- const r = e.findIndex((p) => p.id === t);
1591
- if (r >= 0) return r;
1702
+ const o = e.findIndex((d) => d.id === t);
1703
+ if (o >= 0) return o;
1592
1704
  }
1593
1705
  return 0;
1594
- }), f = L(/* @__PURE__ */ new Map()), u = ke((r) => {
1595
- var p;
1596
- (p = f.current.get(r)) == null || p.focus();
1597
- }, []), g = ke(
1598
- (r, p, m) => {
1706
+ }), f = F(/* @__PURE__ */ new Map()), u = Ne((o) => {
1707
+ var d;
1708
+ (d = f.current.get(o)) == null || d.focus();
1709
+ }, []), g = Ne(
1710
+ (o, d, m) => {
1599
1711
  const S = e.length;
1600
1712
  if (S !== 0)
1601
- switch (r.key) {
1713
+ switch (o.key) {
1602
1714
  case "ArrowDown":
1603
1715
  case "ArrowRight": {
1604
- r.preventDefault();
1605
- const y = (p + 1) % S;
1606
- l(y), u(y);
1716
+ o.preventDefault();
1717
+ const k = (d + 1) % S;
1718
+ l(k), u(k);
1607
1719
  break;
1608
1720
  }
1609
1721
  case "ArrowUp":
1610
1722
  case "ArrowLeft": {
1611
- r.preventDefault();
1612
- const y = (p - 1 + S) % S;
1613
- l(y), u(y);
1723
+ o.preventDefault();
1724
+ const k = (d - 1 + S) % S;
1725
+ l(k), u(k);
1614
1726
  break;
1615
1727
  }
1616
1728
  case "Home": {
1617
- r.preventDefault(), l(0), u(0);
1729
+ o.preventDefault(), l(0), u(0);
1618
1730
  break;
1619
1731
  }
1620
1732
  case "End": {
1621
- r.preventDefault();
1622
- const y = S - 1;
1623
- l(y), u(y);
1733
+ o.preventDefault();
1734
+ const k = S - 1;
1735
+ l(k), u(k);
1624
1736
  break;
1625
1737
  }
1626
1738
  case "Enter":
1627
1739
  case " ": {
1628
- r.preventDefault(), n(m);
1740
+ o.preventDefault(), n(m);
1629
1741
  break;
1630
1742
  }
1631
1743
  }
@@ -1637,37 +1749,37 @@ function Hn({
1637
1749
  {
1638
1750
  role: "radiogroup",
1639
1751
  "aria-label": i("booking.serviceListLabel"),
1640
- id: o,
1752
+ id: a,
1641
1753
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
1642
- children: e.map((r, p) => {
1643
- const m = t === r.id, S = c === p, y = Mt(r), N = r.payment ? y ? i(`booking.payment.${y.kind}`, {
1644
- amount: st(
1645
- y.amountCents,
1646
- y.currencyCode,
1647
- a.language
1754
+ children: e.map((o, d) => {
1755
+ const m = t === o.id, S = c === d, k = Ft(o), A = o.payment ? k ? i(`booking.payment.${k.kind}`, {
1756
+ amount: nt(
1757
+ k.amountCents,
1758
+ k.currencyCode,
1759
+ r.language
1648
1760
  )
1649
- }) : i("booking.payment.unavailable") : ps(r), _ = N ? i("booking.serviceCardLabelPrice", {
1650
- label: r.label,
1651
- price: N
1761
+ }) : i("booking.payment.unavailable") : vs(o), O = A ? i("booking.serviceCardLabelPrice", {
1762
+ label: o.label,
1763
+ price: A
1652
1764
  }) : i("booking.serviceCardLabel", {
1653
- label: r.label,
1654
- duration: r.durationMin
1655
- }), I = Kn(r);
1656
- return /* @__PURE__ */ b(
1765
+ label: o.label,
1766
+ duration: o.durationMin
1767
+ }), N = ti(o);
1768
+ return /* @__PURE__ */ y(
1657
1769
  "button",
1658
1770
  {
1659
- ref: (v) => {
1660
- v ? f.current.set(p, v) : f.current.delete(p);
1771
+ ref: (x) => {
1772
+ x ? f.current.set(d, x) : f.current.delete(d);
1661
1773
  },
1662
1774
  type: "button",
1663
1775
  role: "radio",
1664
1776
  "aria-checked": m,
1665
- "aria-label": _,
1777
+ "aria-label": O,
1666
1778
  tabIndex: S ? 0 : -1,
1667
- onClick: () => n(r.id),
1668
- onFocus: () => l(p),
1669
- onKeyDown: (v) => g(v, p, r.id),
1670
- className: Jn({
1779
+ onClick: () => n(o.id),
1780
+ onFocus: () => l(d),
1781
+ onKeyDown: (x) => g(x, d, o.id),
1782
+ className: ri({
1671
1783
  state: m ? "selected" : "idle"
1672
1784
  }),
1673
1785
  children: [
@@ -1676,32 +1788,32 @@ function Hn({
1676
1788
  {
1677
1789
  "aria-hidden": "true",
1678
1790
  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)]",
1679
- children: I
1791
+ children: N
1680
1792
  }
1681
1793
  ),
1682
- /* @__PURE__ */ b("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
1683
- /* @__PURE__ */ s("span", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]", children: r.label }),
1684
- N ? null : /* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: i("booking.serviceSummary", {
1685
- minutes: r.durationMin
1794
+ /* @__PURE__ */ y("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
1795
+ /* @__PURE__ */ s("span", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]", children: o.label }),
1796
+ A ? null : /* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: i("booking.serviceSummary", {
1797
+ minutes: o.durationMin
1686
1798
  }) })
1687
1799
  ] }),
1688
- N ? /* @__PURE__ */ s(
1800
+ A ? /* @__PURE__ */ s(
1689
1801
  "span",
1690
1802
  {
1691
1803
  "aria-hidden": "true",
1692
1804
  className: "ds:inline-flex ds:shrink-0 ds:items-center ds:ms-auto",
1693
- children: /* @__PURE__ */ s(Qt, { variant: "accentSoft", size: "lg", children: N })
1805
+ children: /* @__PURE__ */ s(is, { variant: "accentSoft", size: "lg", children: A })
1694
1806
  }
1695
1807
  ) : null
1696
1808
  ]
1697
1809
  },
1698
- r.id
1810
+ o.id
1699
1811
  );
1700
1812
  })
1701
1813
  }
1702
1814
  );
1703
1815
  }
1704
- const Gn = ht(
1816
+ const oi = kt(
1705
1817
  [
1706
1818
  "ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-2xs)]",
1707
1819
  "ds:min-h-[var(--min-target-size)]",
@@ -1727,58 +1839,58 @@ const Gn = ht(
1727
1839
  defaultVariants: { state: "idle" }
1728
1840
  }
1729
1841
  );
1730
- function Un(e) {
1842
+ function ci(e) {
1731
1843
  const [t] = e.split(":").map((i) => parseInt(i, 10)), n = Number.isFinite(t) ? t : 0;
1732
1844
  return n < 12 ? "morning" : n < 17 ? "afternoon" : "evening";
1733
1845
  }
1734
- const Yn = {
1735
- morning: Hs,
1736
- afternoon: kn,
1737
- evening: Js
1846
+ const di = {
1847
+ morning: Ws,
1848
+ afternoon: wn,
1849
+ evening: Zs
1738
1850
  };
1739
- function Wn({
1851
+ function li({
1740
1852
  date: e,
1741
1853
  slots: t,
1742
1854
  selectedSlotKey: n,
1743
1855
  onSelect: i,
1744
- loading: a,
1745
- locale: o
1856
+ loading: r,
1857
+ locale: a
1746
1858
  }) {
1747
- const { t: c } = q(), l = M(() => {
1859
+ const { t: c } = j(), l = M(() => {
1748
1860
  try {
1749
- return new Intl.DateTimeFormat(o, {
1861
+ return new Intl.DateTimeFormat(a, {
1750
1862
  weekday: "long",
1751
1863
  day: "numeric",
1752
1864
  month: "long"
1753
- }).format(le(e));
1865
+ }).format(ce(e));
1754
1866
  } catch {
1755
1867
  return e;
1756
1868
  }
1757
- }, [e, o]), f = M(() => {
1758
- const r = {
1869
+ }, [e, a]), f = M(() => {
1870
+ const o = {
1759
1871
  morning: [],
1760
1872
  afternoon: [],
1761
1873
  evening: []
1762
1874
  };
1763
- for (const p of t)
1764
- r[Un(p.time)].push(p);
1765
- return r;
1766
- }, [t]), u = t.filter((r) => r.available).length, g = ["morning", "afternoon", "evening"];
1767
- return a ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1768
- /* @__PURE__ */ s(mt, { variant: "text", width: "60%" }),
1769
- [0, 1].map((r) => /* @__PURE__ */ s(
1875
+ for (const d of t)
1876
+ o[ci(d.time)].push(d);
1877
+ return o;
1878
+ }, [t]), u = t.filter((o) => o.available).length, g = ["morning", "afternoon", "evening"];
1879
+ return r ? /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1880
+ /* @__PURE__ */ s(vt, { variant: "text", width: "60%" }),
1881
+ [0, 1].map((o) => /* @__PURE__ */ s(
1770
1882
  "div",
1771
1883
  {
1772
1884
  className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)]",
1773
- children: [0, 1, 2].map((p) => /* @__PURE__ */ s(mt, { variant: "rounded", height: "44px" }, p))
1885
+ children: [0, 1, 2].map((d) => /* @__PURE__ */ s(vt, { variant: "rounded", height: "44px" }, d))
1774
1886
  },
1775
- r
1887
+ o
1776
1888
  ))
1777
- ] }) : u === 0 ? /* @__PURE__ */ s(es, { variant: "no-results", title: c("booking.noSlotsForDate") }) : /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1778
- /* @__PURE__ */ b("div", { className: "ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1779
- /* @__PURE__ */ b("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
1889
+ ] }) : u === 0 ? /* @__PURE__ */ s(rs, { variant: "no-results", title: c("booking.noSlotsForDate") }) : /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1890
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1891
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
1780
1892
  /* @__PURE__ */ s(
1781
- dn,
1893
+ mn,
1782
1894
  {
1783
1895
  "aria-hidden": "true",
1784
1896
  className: "ds:size-4 ds:text-[color:var(--accent)]"
@@ -1788,39 +1900,39 @@ function Wn({
1788
1900
  ] }),
1789
1901
  /* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: c("booking.slotsAvailable", { count: u }) })
1790
1902
  ] }),
1791
- g.map((r) => {
1792
- const p = f[r];
1793
- if (p.length === 0) return null;
1794
- const m = Yn[r];
1795
- return /* @__PURE__ */ b(
1903
+ g.map((o) => {
1904
+ const d = f[o];
1905
+ if (d.length === 0) return null;
1906
+ const m = di[o];
1907
+ return /* @__PURE__ */ y(
1796
1908
  "div",
1797
1909
  {
1798
1910
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
1799
1911
  children: [
1800
- /* @__PURE__ */ b("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
1912
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
1801
1913
  /* @__PURE__ */ s(m, { "aria-hidden": "true", className: "ds:size-3.5" }),
1802
- /* @__PURE__ */ s("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children: c(`booking.timeOfDay.${r}`) })
1914
+ /* @__PURE__ */ s("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children: c(`booking.timeOfDay.${o}`) })
1803
1915
  ] }),
1804
1916
  /* @__PURE__ */ s(
1805
1917
  "div",
1806
1918
  {
1807
1919
  role: "group",
1808
- "aria-label": c(`booking.timeOfDay.${r}`),
1920
+ "aria-label": c(`booking.timeOfDay.${o}`),
1809
1921
  className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)] ds:sm:grid-cols-4",
1810
- children: p.map((S) => {
1811
- const y = S.key === n, N = S.available ? y ? "selected" : "idle" : "unavailable";
1922
+ children: d.map((S) => {
1923
+ const k = S.key === n, A = S.available ? k ? "selected" : "idle" : "unavailable";
1812
1924
  return /* @__PURE__ */ s(
1813
1925
  "button",
1814
1926
  {
1815
1927
  type: "button",
1816
1928
  "data-slot-id": S.key,
1817
1929
  disabled: !S.available,
1818
- "aria-pressed": y,
1930
+ "aria-pressed": k,
1819
1931
  "aria-label": c("booking.slotAvailableLabel", {
1820
1932
  time: S.time
1821
1933
  }),
1822
1934
  onClick: () => S.available && i(S),
1823
- className: Gn({ state: N }),
1935
+ className: oi({ state: A }),
1824
1936
  children: S.time
1825
1937
  },
1826
1938
  S.key
@@ -1830,108 +1942,108 @@ function Wn({
1830
1942
  )
1831
1943
  ]
1832
1944
  },
1833
- r
1945
+ o
1834
1946
  );
1835
1947
  })
1836
1948
  ] });
1837
1949
  }
1838
- const ut = 4;
1839
- function Zn({
1950
+ const gt = 4;
1951
+ function ui({
1840
1952
  availableDates: e,
1841
1953
  availableSlots: t,
1842
1954
  value: n,
1843
1955
  onChange: i,
1844
- onDateSelect: a,
1845
- onWindowChange: o,
1956
+ onDateSelect: r,
1957
+ onWindowChange: a,
1846
1958
  loadingDates: c,
1847
1959
  loadingSlots: l,
1848
1960
  locale: f,
1849
1961
  agentIdBase: u
1850
1962
  }) {
1851
- const g = M(() => qe(/* @__PURE__ */ new Date()), []), [r, p] = ie(() => {
1963
+ const g = M(() => He(/* @__PURE__ */ new Date()), []), [o, d] = ee(() => {
1852
1964
  if (n.date) {
1853
- const d = qe(le(n.date));
1854
- if (!Je(g, d)) return d;
1965
+ const b = He(ce(n.date));
1966
+ if (!Je(g, b)) return b;
1855
1967
  }
1856
1968
  if (e.length > 0) {
1857
- const d = qe(le(e[0]));
1858
- if (Je(d, g)) return d;
1969
+ const b = He(ce(e[0]));
1970
+ if (Je(b, g)) return b;
1859
1971
  }
1860
1972
  return g;
1861
1973
  }), m = M(
1862
- () => xt(r, ut - 1),
1863
- [r]
1864
- ), S = M(() => Array.from({ length: ut }, (d, T) => {
1865
- const F = xt(r, T), V = Fe(F), O = (t[V] ?? []).map((J) => ({
1866
- id: J.key,
1974
+ () => Ct(o, gt - 1),
1975
+ [o]
1976
+ ), S = M(() => Array.from({ length: gt }, (b, h) => {
1977
+ const q = Ct(o, h), R = Ve(q), C = (t[R] ?? []).map((P) => ({
1978
+ id: P.key,
1867
1979
  // SlotGrid formats `start` as a time via Intl.DateTimeFormat —
1868
1980
  // compose a full ISO from the column's date + the slot's HH:mm
1869
1981
  // so the locale-formatter has a real timestamp to work with.
1870
- start: `${V}T${J.time}:00`,
1871
- available: J.available
1982
+ start: `${R}T${P.time}:00`,
1983
+ available: P.available
1872
1984
  }));
1873
- return { date: V, slots: O };
1874
- }), [r, t]), y = Je(r, g), N = !0, _ = ke(() => {
1875
- p((d) => {
1876
- const T = zs(d, ut);
1877
- return Je(g, T) ? g : T;
1985
+ return { date: R, slots: C };
1986
+ }), [o, t]), k = Je(o, g), A = !0, O = Ne(() => {
1987
+ d((b) => {
1988
+ const h = Us(b, gt);
1989
+ return Je(g, h) ? g : h;
1878
1990
  });
1879
- }, [g]), I = ke(() => {
1880
- p((d) => xt(d, ut));
1991
+ }, [g]), N = Ne(() => {
1992
+ d((b) => Ct(b, gt));
1881
1993
  }, []);
1882
- z(() => {
1994
+ $(() => {
1883
1995
  if (e.length === 0) return;
1884
- const d = qe(le(e[0]));
1885
- !Je(d, g) || e.some((F) => {
1886
- const V = qe(le(F));
1887
- return !Je(V, m) && !$s(V, r);
1888
- }) || p(d);
1889
- }, [e]), z(() => {
1890
- o == null || o(Fe(r), Fe(m));
1891
- }, [r, m, o]);
1892
- const v = ke(
1893
- (d, T) => {
1894
- const F = typeof T.date == "string" ? T.date : Fe(T.date);
1996
+ const b = He(ce(e[0]));
1997
+ !Je(b, g) || e.some((q) => {
1998
+ const R = He(ce(q));
1999
+ return !Je(R, m) && !Hs(R, o);
2000
+ }) || d(b);
2001
+ }, [e]), $(() => {
2002
+ a == null || a(Ve(o), Ve(m));
2003
+ }, [o, m, a]);
2004
+ const x = Ne(
2005
+ (b, h) => {
2006
+ const q = typeof h.date == "string" ? h.date : Ve(h.date);
1895
2007
  i({
1896
- ...cs(bt(n, F), d.id)
1897
- }), a == null || a(F);
2008
+ ...fs(xt(n, q), b.id)
2009
+ }), r == null || r(q);
1898
2010
  },
1899
- [i, a, n]
1900
- ), x = c || l ? "loading" : "default", w = S.some((d) => d.slots.length > 0), A = e[0];
1901
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1902
- !w && !!A ? /* @__PURE__ */ s(
1903
- Tt,
2011
+ [i, r, n]
2012
+ ), I = c || l ? "loading" : "default", w = S.some((b) => b.slots.length > 0), T = e[0];
2013
+ return /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2014
+ !w && !!T ? /* @__PURE__ */ s(
2015
+ Et,
1904
2016
  {
1905
- nextAvailableDate: A,
1906
- onJump: () => p(qe(le(A))),
2017
+ nextAvailableDate: T,
2018
+ onJump: () => d(He(ce(T))),
1907
2019
  locale: f
1908
2020
  }
1909
2021
  ) : null,
1910
2022
  /* @__PURE__ */ s(
1911
- Fs,
2023
+ js,
1912
2024
  {
1913
2025
  id: u ? `${u}-slots` : void 0,
1914
2026
  days: S,
1915
- state: x,
2027
+ state: I,
1916
2028
  selectedSlotId: n.slotKey,
1917
2029
  maxInitialSlotsPerDay: 6,
1918
2030
  locale: f,
1919
- hasPrevious: y,
1920
- hasNext: N,
1921
- onSlotSelect: v,
1922
- onPreviousDays: _,
1923
- onNextDays: I
2031
+ hasPrevious: k,
2032
+ hasNext: A,
2033
+ onSlotSelect: x,
2034
+ onPreviousDays: O,
2035
+ onNextDays: N
1924
2036
  }
1925
2037
  )
1926
2038
  ] });
1927
2039
  }
1928
- function ms(e) {
2040
+ function bs(e) {
1929
2041
  const {
1930
2042
  inputs: t,
1931
2043
  value: n,
1932
2044
  onChange: i,
1933
- onDateSelect: a,
1934
- onWindowChange: o,
2045
+ onDateSelect: r,
2046
+ onWindowChange: a,
1935
2047
  loadingDates: c,
1936
2048
  loadingSlots: l,
1937
2049
  locale: f,
@@ -1939,60 +2051,60 @@ function ms(e) {
1939
2051
  agentIdBase: g
1940
2052
  } = e;
1941
2053
  return u === "four-day-grid" ? /* @__PURE__ */ s(
1942
- Zn,
2054
+ ui,
1943
2055
  {
1944
2056
  availableDates: t.availableDates,
1945
2057
  availableSlots: t.availableSlots,
1946
2058
  value: n,
1947
2059
  onChange: i,
1948
- onDateSelect: a,
1949
- onWindowChange: o,
2060
+ onDateSelect: r,
2061
+ onWindowChange: a,
1950
2062
  loadingDates: c,
1951
2063
  loadingSlots: l,
1952
2064
  locale: f,
1953
2065
  agentIdBase: g
1954
2066
  }
1955
2067
  ) : /* @__PURE__ */ s(
1956
- qn,
2068
+ ii,
1957
2069
  {
1958
2070
  availableDates: t.availableDates,
1959
2071
  selectedDate: n.date,
1960
- onSelectDate: (r) => {
1961
- i(bt(n, r)), a == null || a(r);
2072
+ onSelectDate: (o) => {
2073
+ i(xt(n, o)), r == null || r(o);
1962
2074
  },
1963
2075
  locale: f,
1964
2076
  loading: c ?? l
1965
2077
  }
1966
2078
  );
1967
2079
  }
1968
- function fs(e) {
1969
- const { inputs: t, value: n, onChange: i, loadingSlots: a, locale: o, datePickerStyle: c } = e;
2080
+ function ys(e) {
2081
+ const { inputs: t, value: n, onChange: i, loadingSlots: r, locale: a, datePickerStyle: c } = e;
1970
2082
  return c === "four-day-grid" || !n.date ? null : /* @__PURE__ */ s(
1971
- Wn,
2083
+ li,
1972
2084
  {
1973
2085
  date: n.date,
1974
2086
  slots: t.availableSlots[n.date] ?? [],
1975
2087
  selectedSlotKey: n.slotKey,
1976
- onSelect: (l) => i(cs(n, l.key)),
1977
- loading: a,
1978
- locale: o
2088
+ onSelect: (l) => i(fs(n, l.key)),
2089
+ loading: r,
2090
+ locale: a
1979
2091
  }
1980
2092
  );
1981
2093
  }
1982
- function gs({ value: e, onChange: t }) {
1983
- const { t: n } = q(), i = [
2094
+ function ks({ value: e, onChange: t }) {
2095
+ const { t: n } = j(), i = [
1984
2096
  { value: "private", label: n("booking.insurance.private") },
1985
2097
  { value: "public", label: n("booking.insurance.public") }
1986
2098
  ];
1987
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2099
+ return /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1988
2100
  /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: n("booking.insurance.heading") }),
1989
2101
  /* @__PURE__ */ s(
1990
- vt,
2102
+ St,
1991
2103
  {
1992
2104
  options: i,
1993
2105
  value: e ?? "",
1994
- onValueChange: (a) => {
1995
- (a === "private" || a === "public") && t(a);
2106
+ onValueChange: (r) => {
2107
+ (r === "private" || r === "public") && t(r);
1996
2108
  },
1997
2109
  placeholder: n("booking.insurance.placeholder"),
1998
2110
  "aria-label": n("booking.insurance.heading")
@@ -2000,35 +2112,35 @@ function gs({ value: e, onChange: t }) {
2000
2112
  )
2001
2113
  ] });
2002
2114
  }
2003
- function hs({
2115
+ function Ss({
2004
2116
  specialties: e,
2005
2117
  value: t,
2006
2118
  valueIds: n,
2007
2119
  onChange: i,
2008
- onChangeIds: a,
2009
- pickerStyle: o = "select"
2120
+ onChangeIds: r,
2121
+ pickerStyle: a = "select"
2010
2122
  }) {
2011
- const { t: c } = q(), l = e.map((u) => ({
2123
+ const { t: c } = j(), l = e.map((u) => ({
2012
2124
  value: u.id,
2013
2125
  label: u.label
2014
2126
  })), f = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: c("booking.specialty.heading") });
2015
- return o === "multi-select" && a ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2127
+ return a === "multi-select" && r ? /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2016
2128
  f,
2017
2129
  /* @__PURE__ */ s(
2018
- At,
2130
+ _t,
2019
2131
  {
2020
2132
  options: l,
2021
2133
  value: n ?? [],
2022
- onChange: a,
2134
+ onChange: r,
2023
2135
  placeholder: c("booking.specialty.placeholder"),
2024
2136
  "aria-label": c("booking.specialty.heading"),
2025
2137
  allowClear: !0
2026
2138
  }
2027
2139
  )
2028
- ] }) : o === "combobox" ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2140
+ ] }) : a === "combobox" ? /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2029
2141
  f,
2030
2142
  /* @__PURE__ */ s(
2031
- Ct,
2143
+ Ot,
2032
2144
  {
2033
2145
  options: l,
2034
2146
  value: t ?? "",
@@ -2038,10 +2150,10 @@ function hs({
2038
2150
  clearable: !0
2039
2151
  }
2040
2152
  )
2041
- ] }) : /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2153
+ ] }) : /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2042
2154
  f,
2043
2155
  /* @__PURE__ */ s(
2044
- vt,
2156
+ St,
2045
2157
  {
2046
2158
  options: l,
2047
2159
  value: t ?? "",
@@ -2052,76 +2164,76 @@ function hs({
2052
2164
  )
2053
2165
  ] });
2054
2166
  }
2055
- function vs({
2167
+ function xs({
2056
2168
  services: e,
2057
2169
  value: t,
2058
2170
  valueIds: n,
2059
2171
  onChange: i,
2060
- onChangeIds: a,
2061
- pickerStyle: o,
2172
+ onChangeIds: r,
2173
+ pickerStyle: a,
2062
2174
  compact: c
2063
2175
  }) {
2064
- const { t: l, i18n: f } = q(), u = o ?? (c ? "select" : "cards"), g = e.map((p) => {
2065
- const m = Mt(p), S = p.payment ? m ? l(`booking.payment.${m.kind}`, {
2066
- amount: st(
2176
+ const { t: l, i18n: f } = j(), u = a ?? (c ? "select" : "cards"), g = e.map((d) => {
2177
+ const m = Ft(d), S = d.payment ? m ? l(`booking.payment.${m.kind}`, {
2178
+ amount: nt(
2067
2179
  m.amountCents,
2068
2180
  m.currencyCode,
2069
2181
  f.language
2070
2182
  )
2071
- }) : l("booking.payment.unavailable") : ps(p);
2183
+ }) : l("booking.payment.unavailable") : vs(d);
2072
2184
  return S ? {
2073
- value: p.id,
2074
- label: p.label,
2075
- endContent: /* @__PURE__ */ s(Qt, { variant: "accentSoft", size: "lg", children: S })
2185
+ value: d.id,
2186
+ label: d.label,
2187
+ endContent: /* @__PURE__ */ s(is, { variant: "accentSoft", size: "lg", children: S })
2076
2188
  } : {
2077
- value: p.id,
2078
- label: `${p.label} · ${l("booking.serviceSummary", {
2079
- minutes: p.durationMin
2189
+ value: d.id,
2190
+ label: `${d.label} · ${l("booking.serviceSummary", {
2191
+ minutes: d.durationMin
2080
2192
  })}`
2081
2193
  };
2082
- }), r = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: l("booking.service.heading") });
2083
- return u === "multi-select" && a ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2084
- r,
2194
+ }), o = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: l("booking.service.heading") });
2195
+ return u === "multi-select" && r ? /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2196
+ o,
2085
2197
  /* @__PURE__ */ s(
2086
- At,
2198
+ _t,
2087
2199
  {
2088
2200
  options: g,
2089
2201
  value: n ?? [],
2090
- onChange: a,
2202
+ onChange: r,
2091
2203
  placeholder: l("booking.service.placeholder"),
2092
2204
  "aria-label": l("booking.service.heading"),
2093
2205
  allowClear: !0
2094
2206
  }
2095
2207
  )
2096
- ] }) : u === "combobox" ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2097
- r,
2208
+ ] }) : u === "combobox" ? /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2209
+ o,
2098
2210
  /* @__PURE__ */ s(
2099
- Ct,
2211
+ Ot,
2100
2212
  {
2101
2213
  options: g,
2102
2214
  value: t ?? "",
2103
- onValueChange: (p) => i(p === "" ? "" : p),
2215
+ onValueChange: (d) => i(d === "" ? "" : d),
2104
2216
  placeholder: l("booking.service.placeholder"),
2105
2217
  "aria-label": l("booking.service.heading"),
2106
2218
  clearable: !0
2107
2219
  }
2108
2220
  )
2109
- ] }) : u === "select" ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2110
- r,
2221
+ ] }) : u === "select" ? /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2222
+ o,
2111
2223
  /* @__PURE__ */ s(
2112
- vt,
2224
+ St,
2113
2225
  {
2114
2226
  options: g,
2115
2227
  value: t ?? "",
2116
- onValueChange: (p) => i(p),
2228
+ onValueChange: (d) => i(d),
2117
2229
  placeholder: l("booking.service.placeholder"),
2118
2230
  "aria-label": l("booking.service.heading")
2119
2231
  }
2120
2232
  )
2121
- ] }) : /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2122
- r,
2233
+ ] }) : /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2234
+ o,
2123
2235
  /* @__PURE__ */ s(
2124
- Hn,
2236
+ ai,
2125
2237
  {
2126
2238
  services: e,
2127
2239
  selectedServiceId: t,
@@ -2130,28 +2242,28 @@ function vs({
2130
2242
  )
2131
2243
  ] });
2132
2244
  }
2133
- function bs({
2245
+ function Is({
2134
2246
  operators: e,
2135
2247
  value: t,
2136
2248
  valueIds: n,
2137
2249
  onChange: i,
2138
- onChangeIds: a,
2139
- pickerStyle: o = "select"
2250
+ onChangeIds: r,
2251
+ pickerStyle: a = "select"
2140
2252
  }) {
2141
- const { t: c } = q(), l = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: c("booking.operator.heading") });
2142
- if (o === "multi-select" && a) {
2253
+ const { t: c } = j(), l = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: c("booking.operator.heading") });
2254
+ if (a === "multi-select" && r) {
2143
2255
  const u = e.map((g) => ({
2144
2256
  value: g.id,
2145
2257
  label: g.name
2146
2258
  }));
2147
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2259
+ return /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2148
2260
  l,
2149
2261
  /* @__PURE__ */ s(
2150
- At,
2262
+ _t,
2151
2263
  {
2152
2264
  options: u,
2153
2265
  value: n ?? [],
2154
- onChange: a,
2266
+ onChange: r,
2155
2267
  placeholder: c("booking.operator.placeholder"),
2156
2268
  "aria-label": c("booking.operator.heading"),
2157
2269
  allowClear: !0
@@ -2160,29 +2272,29 @@ function bs({
2160
2272
  ] });
2161
2273
  }
2162
2274
  const f = [
2163
- { value: ye, label: c("booking.operator.all") },
2275
+ { value: Ie, label: c("booking.operator.all") },
2164
2276
  ...e.map((u) => ({ value: u.id, label: u.name }))
2165
2277
  ];
2166
- return o === "combobox" ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2278
+ return a === "combobox" ? /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2167
2279
  l,
2168
2280
  /* @__PURE__ */ s(
2169
- Ct,
2281
+ Ot,
2170
2282
  {
2171
2283
  options: f,
2172
- value: t ?? ye,
2173
- onValueChange: (u) => i(u === "" ? ye : u),
2284
+ value: t ?? Ie,
2285
+ onValueChange: (u) => i(u === "" ? Ie : u),
2174
2286
  placeholder: c("booking.operator.placeholder"),
2175
2287
  "aria-label": c("booking.operator.heading"),
2176
2288
  clearable: !0
2177
2289
  }
2178
2290
  )
2179
- ] }) : /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2291
+ ] }) : /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2180
2292
  l,
2181
2293
  /* @__PURE__ */ s(
2182
- vt,
2294
+ St,
2183
2295
  {
2184
2296
  options: f,
2185
- value: t ?? ye,
2297
+ value: t ?? Ie,
2186
2298
  onValueChange: (u) => i(u),
2187
2299
  placeholder: c("booking.operator.placeholder"),
2188
2300
  "aria-label": c("booking.operator.heading")
@@ -2190,142 +2302,142 @@ function bs({
2190
2302
  )
2191
2303
  ] });
2192
2304
  }
2193
- function ys({
2305
+ function Ns({
2194
2306
  customSlot: e
2195
2307
  }) {
2196
- const { t } = q();
2197
- return e ? /* @__PURE__ */ s(ce, { children: e }) : /* @__PURE__ */ b(X, { variant: "warning", children: [
2198
- /* @__PURE__ */ s(X.Title, { as: "h4", children: t("booking.onboardingIncomplete.title") }),
2199
- /* @__PURE__ */ s(X.Description, { children: t("booking.onboardingIncomplete.description") })
2308
+ const { t } = j();
2309
+ return e ? /* @__PURE__ */ s(ne, { children: e }) : /* @__PURE__ */ y(Q, { variant: "warning", children: [
2310
+ /* @__PURE__ */ s(Q.Title, { as: "h4", children: t("booking.onboardingIncomplete.title") }),
2311
+ /* @__PURE__ */ s(Q.Description, { children: t("booking.onboardingIncomplete.description") })
2200
2312
  ] });
2201
2313
  }
2202
- function Tt({
2314
+ function Et({
2203
2315
  nextAvailableDate: e,
2204
2316
  onJump: t,
2205
2317
  locale: n
2206
2318
  }) {
2207
- const { t: i } = q(), a = M(() => {
2319
+ const { t: i } = j(), r = M(() => {
2208
2320
  try {
2209
2321
  return new Intl.DateTimeFormat(n, { dateStyle: "long" }).format(
2210
- le(e)
2322
+ ce(e)
2211
2323
  );
2212
2324
  } catch {
2213
2325
  return e;
2214
2326
  }
2215
2327
  }, [e, n]);
2216
- return /* @__PURE__ */ b(X, { variant: "info", children: [
2217
- /* @__PURE__ */ s(X.Description, { children: i("booking.nextAvailable.description", { date: a }) }),
2218
- /* @__PURE__ */ s(X.Action, { children: /* @__PURE__ */ s(Ve, { intent: "secondary", size: "sm", onClick: t, children: i("booking.nextAvailable.cta") }) })
2328
+ return /* @__PURE__ */ y(Q, { variant: "info", children: [
2329
+ /* @__PURE__ */ s(Q.Description, { children: i("booking.nextAvailable.description", { date: r }) }),
2330
+ /* @__PURE__ */ s(Q.Action, { children: /* @__PURE__ */ s($e, { intent: "secondary", size: "sm", onClick: t, children: i("booking.nextAvailable.cta") }) })
2219
2331
  ] });
2220
2332
  }
2221
- function Xn({
2333
+ function pi({
2222
2334
  payment: e,
2223
2335
  snapshot: t,
2224
2336
  operators: n,
2225
2337
  specialties: i,
2226
- services: a,
2227
- locale: o,
2338
+ services: r,
2339
+ locale: a,
2228
2340
  mode: c,
2229
2341
  showModify: l,
2230
2342
  onReset: f,
2231
2343
  onModify: u,
2232
2344
  focusWasLost: g
2233
2345
  }) {
2234
- const { t: r } = q(), p = L(null);
2235
- z(() => {
2236
- const w = p.current, A = document.activeElement, h = w == null ? void 0 : w.closest('[data-component="booking"]');
2237
- !e || !w || (A && (h != null && h.contains(A)) || g()) && w.focus();
2346
+ const { t: o } = j(), d = F(null);
2347
+ $(() => {
2348
+ const w = d.current, T = document.activeElement, v = w == null ? void 0 : w.closest('[data-component="booking"]');
2349
+ !e || !w || (T && (v != null && v.contains(T)) || g()) && w.focus();
2238
2350
  }, []);
2239
2351
  const S = (t.details.confirmationChannels ?? ["email"]).map(
2240
- (w) => r(`booking.confirmation.channel.${w}`)
2241
- ), y = e ? st(e.amountCents, e.currencyCode, o) : "", N = e ? r(
2352
+ (w) => o(`booking.confirmation.channel.${w}`)
2353
+ ), k = e ? nt(e.amountCents, e.currencyCode, a) : "", A = e ? o(
2242
2354
  c === "demo" ? "booking.payment.paidDemo" : "booking.payment.paidBody",
2243
- { amount: y }
2244
- ) : c === "demo" ? r("booking.success.descriptionDemo") : S.length > 1 ? r("booking.success.descriptionMultiple", {
2355
+ { amount: k }
2356
+ ) : c === "demo" ? o("booking.success.descriptionDemo") : S.length > 1 ? o("booking.success.descriptionMultiple", {
2245
2357
  channels: S.join(" · ")
2246
- }) : r("booking.success.descriptionSingle", { channel: S[0] }), _ = M(() => {
2358
+ }) : o("booking.success.descriptionSingle", { channel: S[0] }), O = M(() => {
2247
2359
  if (t.date)
2248
2360
  try {
2249
- return new Intl.DateTimeFormat(o, {
2361
+ return new Intl.DateTimeFormat(a, {
2250
2362
  weekday: "long",
2251
2363
  day: "numeric",
2252
2364
  month: "long"
2253
- }).format(le(t.date));
2365
+ }).format(ce(t.date));
2254
2366
  } catch {
2255
2367
  return t.date;
2256
2368
  }
2257
- }, [t.date, o]), I = M(() => {
2258
- const A = (t.operatorIds && t.operatorIds.length > 0 ? t.operatorIds : t.operatorId ? [t.operatorId] : []).filter((h) => h !== ye).map((h) => {
2259
- var d;
2260
- return (d = n.find((T) => T.id === h)) == null ? void 0 : d.name;
2261
- }).filter((h) => h !== void 0);
2262
- if (A.length === 0) return "";
2369
+ }, [t.date, a]), N = M(() => {
2370
+ const T = (t.operatorIds && t.operatorIds.length > 0 ? t.operatorIds : t.operatorId ? [t.operatorId] : []).filter((v) => v !== Ie).map((v) => {
2371
+ var b;
2372
+ return (b = n.find((h) => h.id === v)) == null ? void 0 : b.name;
2373
+ }).filter((v) => v !== void 0);
2374
+ if (T.length === 0) return "";
2263
2375
  try {
2264
- return new Intl.ListFormat(o === "en" ? "en-GB" : o, {
2376
+ return new Intl.ListFormat(a === "en" ? "en-GB" : a, {
2265
2377
  style: "long",
2266
2378
  type: "conjunction"
2267
- }).format(A);
2379
+ }).format(T);
2268
2380
  } catch {
2269
- return A.join(", ");
2381
+ return T.join(", ");
2270
2382
  }
2271
- }, [t.operatorIds, t.operatorId, n, o]), v = t.specialtyId ? i.find((w) => w.id === t.specialtyId) : void 0, x = t.serviceId ? a.find((w) => w.id === t.serviceId) : void 0;
2272
- return /* @__PURE__ */ b(
2383
+ }, [t.operatorIds, t.operatorId, n, a]), x = t.specialtyId ? i.find((w) => w.id === t.specialtyId) : void 0, I = t.serviceId ? r.find((w) => w.id === t.serviceId) : void 0;
2384
+ return /* @__PURE__ */ y(
2273
2385
  "div",
2274
2386
  {
2275
2387
  "data-component": "booking-success",
2276
2388
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
2277
2389
  children: [
2278
- /* @__PURE__ */ b(X, { variant: "success", children: [
2390
+ /* @__PURE__ */ y(Q, { variant: "success", children: [
2279
2391
  /* @__PURE__ */ s(
2280
- X.Title,
2392
+ Q.Title,
2281
2393
  {
2282
2394
  as: "h3",
2283
- ref: p,
2395
+ ref: d,
2284
2396
  tabIndex: e ? -1 : void 0,
2285
- className: e ? ft : void 0,
2286
- children: r(
2397
+ className: e ? bt : void 0,
2398
+ children: o(
2287
2399
  e ? c === "demo" ? "booking.payment.paidDemoTitle" : "booking.payment.paidTitle" : "booking.success.heading"
2288
2400
  )
2289
2401
  }
2290
2402
  ),
2291
- /* @__PURE__ */ s(X.Description, { children: N })
2403
+ /* @__PURE__ */ s(Q.Description, { children: A })
2292
2404
  ] }),
2293
- /* @__PURE__ */ s("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[var(--secondary)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ b("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: [
2294
- e && c !== "demo" ? /* @__PURE__ */ b(ce, { children: [
2295
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: r("booking.payment.summaryPaid") }),
2296
- /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: y })
2297
- ] }) : null,
2298
- v ? /* @__PURE__ */ b(ce, { children: [
2299
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: r("booking.success.summarySpecialty") }),
2300
- /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: v.label })
2405
+ /* @__PURE__ */ s("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[var(--secondary)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ y("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: [
2406
+ e && c !== "demo" ? /* @__PURE__ */ y(ne, { children: [
2407
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.payment.summaryPaid") }),
2408
+ /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: k })
2301
2409
  ] }) : null,
2302
- x ? /* @__PURE__ */ b(ce, { children: [
2303
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: r("booking.success.summaryService") }),
2410
+ x ? /* @__PURE__ */ y(ne, { children: [
2411
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.success.summarySpecialty") }),
2304
2412
  /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: x.label })
2305
2413
  ] }) : null,
2306
- _ ? /* @__PURE__ */ b(ce, { children: [
2307
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: r("booking.success.summaryDate") }),
2308
- /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: _ })
2414
+ I ? /* @__PURE__ */ y(ne, { children: [
2415
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.success.summaryService") }),
2416
+ /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: I.label })
2417
+ ] }) : null,
2418
+ O ? /* @__PURE__ */ y(ne, { children: [
2419
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.success.summaryDate") }),
2420
+ /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: O })
2309
2421
  ] }) : null,
2310
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: r("booking.success.summaryTime") }),
2422
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.success.summaryTime") }),
2311
2423
  /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: t.slot.time }),
2312
- I ? /* @__PURE__ */ b(ce, { children: [
2313
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: r("booking.success.summaryProvider") }),
2314
- /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: I })
2424
+ N ? /* @__PURE__ */ y(ne, { children: [
2425
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.success.summaryProvider") }),
2426
+ /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: N })
2315
2427
  ] }) : null
2316
2428
  ] }) }),
2317
- /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
2318
- /* @__PURE__ */ s(Ve, { intent: "secondary", size: "md", onClick: f, children: r("booking.success.bookAnother") }),
2319
- l ? /* @__PURE__ */ s(Ve, { intent: "ghost", size: "md", onClick: u, children: r("booking.success.modifyBooking") }) : null
2429
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
2430
+ /* @__PURE__ */ s($e, { intent: "secondary", size: "md", onClick: f, children: o("booking.success.bookAnother") }),
2431
+ l ? /* @__PURE__ */ s($e, { intent: "ghost", size: "md", onClick: u, children: o("booking.success.modifyBooking") }) : null
2320
2432
  ] })
2321
2433
  ]
2322
2434
  }
2323
2435
  );
2324
2436
  }
2325
- function ks({ customSlot: e }) {
2326
- const { t } = q();
2327
- return e ? /* @__PURE__ */ s(ce, { children: e }) : /* @__PURE__ */ s(
2328
- es,
2437
+ function ws({ customSlot: e }) {
2438
+ const { t } = j();
2439
+ return e ? /* @__PURE__ */ s(ne, { children: e }) : /* @__PURE__ */ s(
2440
+ rs,
2329
2441
  {
2330
2442
  variant: "no-results",
2331
2443
  title: t("booking.emptyServices.title"),
@@ -2333,157 +2445,157 @@ function ks({ customSlot: e }) {
2333
2445
  }
2334
2446
  );
2335
2447
  }
2336
- const Ss = "data-booking-step-active", Qn = `[${Ss}]`, ft = [
2448
+ const Cs = "data-booking-step-active", mi = `[${Cs}]`, bt = [
2337
2449
  "ds:focus-visible:outline-[length:var(--focus-ring-width)]",
2338
2450
  "ds:focus-visible:outline-solid",
2339
2451
  "ds:focus-visible:outline-[var(--ring)]",
2340
2452
  "ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
2341
2453
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
2342
2454
  ].join(" ");
2343
- function j({
2455
+ function z({
2344
2456
  step: e,
2345
2457
  active: t,
2346
2458
  className: n,
2347
2459
  id: i,
2348
- children: a
2460
+ children: r
2349
2461
  }) {
2350
2462
  return /* @__PURE__ */ s(
2351
2463
  "div",
2352
2464
  {
2353
2465
  id: i,
2354
2466
  "data-booking-step": String(e),
2355
- ...t ? { [Ss]: "" } : null,
2467
+ ...t ? { [Cs]: "" } : null,
2356
2468
  tabIndex: -1,
2357
- className: n ? `${n} ${ft}` : ft,
2358
- children: a
2469
+ className: n ? `${n} ${bt}` : bt,
2470
+ children: r
2359
2471
  }
2360
2472
  );
2361
2473
  }
2362
- function Ot(e, t) {
2474
+ function Lt(e, t) {
2363
2475
  return t === "four-day-grid" ? e.filter((n) => n !== 6) : e;
2364
2476
  }
2365
- function ei(e) {
2477
+ function fi(e) {
2366
2478
  const {
2367
2479
  cascade: t,
2368
2480
  inputs: n,
2369
2481
  value: i,
2370
- onChange: a,
2371
- onSubmit: o,
2482
+ onChange: r,
2483
+ onSubmit: a,
2372
2484
  emptyServicesSlot: c,
2373
2485
  onboardingIncompleteSlot: l,
2374
2486
  loadingDates: f,
2375
2487
  loadingSlots: u,
2376
2488
  onDateSelect: g,
2377
- onWindowChange: r,
2378
- datePickerStyle: p,
2489
+ onWindowChange: o,
2490
+ datePickerStyle: d,
2379
2491
  specialtyPickerStyle: m,
2380
2492
  servicePickerStyle: S,
2381
- operatorPickerStyle: y,
2382
- submitting: N,
2383
- locale: _,
2384
- detailsProps: I,
2385
- agentIdBase: v,
2386
- activeStep: x
2387
- } = e, { t: w } = q(), A = He(x, p), h = (d, T) => ({
2388
- step: d,
2389
- active: d === A,
2390
- className: T
2493
+ operatorPickerStyle: k,
2494
+ submitting: A,
2495
+ locale: O,
2496
+ detailsProps: N,
2497
+ agentIdBase: x,
2498
+ activeStep: I
2499
+ } = e, { t: w } = j(), T = Ue(I, d), v = (b, h) => ({
2500
+ step: b,
2501
+ active: b === T,
2502
+ className: h
2391
2503
  });
2392
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2393
- t.gates.insurance ? /* @__PURE__ */ s(j, { ...h(1), children: /* @__PURE__ */ s(
2394
- gs,
2504
+ return /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2505
+ t.gates.insurance ? /* @__PURE__ */ s(z, { ...v(1), children: /* @__PURE__ */ s(
2506
+ ks,
2395
2507
  {
2396
2508
  value: i.insuranceType,
2397
- onChange: (d) => a(ss(i, d))
2509
+ onChange: (b) => r(os(i, b))
2398
2510
  }
2399
2511
  ) }) : null,
2400
- t.gates.specialty ? /* @__PURE__ */ s(j, { ...h(2), children: /* @__PURE__ */ s(
2401
- hs,
2512
+ t.gates.specialty ? /* @__PURE__ */ s(z, { ...v(2), children: /* @__PURE__ */ s(
2513
+ Ss,
2402
2514
  {
2403
2515
  specialties: t.filtered.specialties,
2404
2516
  value: i.specialtyId,
2405
2517
  valueIds: i.specialtyIds,
2406
- onChange: (d) => a(ns(i, d)),
2407
- onChangeIds: (d) => a(is(i, d)),
2518
+ onChange: (b) => r(cs(i, b)),
2519
+ onChangeIds: (b) => r(ds(i, b)),
2408
2520
  pickerStyle: m
2409
2521
  }
2410
2522
  ) }) : null,
2411
- t.gates.service ? /* @__PURE__ */ s(j, { ...h(3), children: t.filtered.services.length === 0 ? /* @__PURE__ */ s(ks, { customSlot: c }) : /* @__PURE__ */ s(
2412
- vs,
2523
+ t.gates.service ? /* @__PURE__ */ s(z, { ...v(3), children: t.filtered.services.length === 0 ? /* @__PURE__ */ s(ws, { customSlot: c }) : /* @__PURE__ */ s(
2524
+ xs,
2413
2525
  {
2414
2526
  services: t.filtered.services,
2415
2527
  value: i.serviceId,
2416
2528
  valueIds: i.serviceIds,
2417
- onChange: (d) => a(as(i, d)),
2418
- onChangeIds: (d) => a(rs(i, d)),
2529
+ onChange: (b) => r(ls(i, b)),
2530
+ onChangeIds: (b) => r(us(i, b)),
2419
2531
  pickerStyle: S
2420
2532
  }
2421
2533
  ) }) : null,
2422
- t.gates.onboardingIncomplete ? /* @__PURE__ */ s(ys, { customSlot: l }) : null,
2423
- t.gates.operator ? /* @__PURE__ */ s(j, { ...h(4), children: /* @__PURE__ */ s(
2424
- bs,
2534
+ t.gates.onboardingIncomplete ? /* @__PURE__ */ s(Ns, { customSlot: l }) : null,
2535
+ t.gates.operator ? /* @__PURE__ */ s(z, { ...v(4), children: /* @__PURE__ */ s(
2536
+ Is,
2425
2537
  {
2426
2538
  operators: t.filtered.operators,
2427
2539
  value: i.operatorId,
2428
2540
  valueIds: i.operatorIds,
2429
- onChange: (d) => a(os(i, d)),
2430
- onChangeIds: (d) => a(ds(i, d)),
2431
- pickerStyle: y
2541
+ onChange: (b) => r(ps(i, b)),
2542
+ onChangeIds: (b) => r(ms(i, b)),
2543
+ pickerStyle: k
2432
2544
  }
2433
2545
  ) }) : null,
2434
- t.gates.date ? /* @__PURE__ */ b(
2435
- j,
2546
+ t.gates.date ? /* @__PURE__ */ y(
2547
+ z,
2436
2548
  {
2437
- ...h(5, "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"),
2549
+ ...v(5, "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"),
2438
2550
  children: [
2439
2551
  /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: w("booking.date.heading") }),
2440
2552
  n.availableDates.length === 0 && n.nextAvailableDate ? /* @__PURE__ */ s(
2441
- Tt,
2553
+ Et,
2442
2554
  {
2443
2555
  nextAvailableDate: n.nextAvailableDate,
2444
- onJump: () => a(bt(i, n.nextAvailableDate)),
2445
- locale: _
2556
+ onJump: () => r(xt(i, n.nextAvailableDate)),
2557
+ locale: O
2446
2558
  }
2447
- ) : ms({
2559
+ ) : bs({
2448
2560
  inputs: n,
2449
2561
  value: i,
2450
- onChange: a,
2562
+ onChange: r,
2451
2563
  onDateSelect: g,
2452
- onWindowChange: r,
2564
+ onWindowChange: o,
2453
2565
  loadingDates: f,
2454
2566
  loadingSlots: u,
2455
- locale: _,
2456
- datePickerStyle: p,
2457
- agentIdBase: v
2567
+ locale: O,
2568
+ datePickerStyle: d,
2569
+ agentIdBase: x
2458
2570
  })
2459
2571
  ]
2460
2572
  }
2461
2573
  ) : null,
2462
- t.gates.slot && i.date && p === "month-calendar" ? /* @__PURE__ */ b(
2463
- j,
2574
+ t.gates.slot && i.date && d === "month-calendar" ? /* @__PURE__ */ y(
2575
+ z,
2464
2576
  {
2465
- ...h(6, "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"),
2577
+ ...v(6, "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"),
2466
2578
  children: [
2467
2579
  /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: w("booking.slot.heading") }),
2468
- fs({
2580
+ ys({
2469
2581
  inputs: n,
2470
2582
  value: i,
2471
- onChange: a,
2583
+ onChange: r,
2472
2584
  loadingSlots: u,
2473
- locale: _,
2474
- datePickerStyle: p
2585
+ locale: O,
2586
+ datePickerStyle: d
2475
2587
  })
2476
2588
  ]
2477
2589
  }
2478
2590
  ) : null,
2479
- t.gates.details && t.selectedSlot ? /* @__PURE__ */ s(j, { ...h(7), children: /* @__PURE__ */ s(
2480
- Dt,
2591
+ t.gates.details && t.selectedSlot ? /* @__PURE__ */ s(z, { ...v(7), children: /* @__PURE__ */ s(
2592
+ Bt,
2481
2593
  {
2482
- ...I,
2594
+ ...N,
2483
2595
  value: i.details ?? {},
2484
- onChange: (d) => a({ ...i, details: d }),
2485
- onSubmit: o,
2486
- submitting: N,
2596
+ onChange: (b) => r({ ...i, details: b }),
2597
+ onSubmit: a,
2598
+ submitting: A,
2487
2599
  defaultPhoneCountry: e.policy.country
2488
2600
  }
2489
2601
  ) }) : null
@@ -2492,110 +2604,110 @@ function ei(e) {
2492
2604
  function fe(e, t, n = {}) {
2493
2605
  const {
2494
2606
  cascade: i,
2495
- inputs: a,
2496
- value: o,
2607
+ inputs: r,
2608
+ value: a,
2497
2609
  onChange: c,
2498
2610
  onSubmit: l,
2499
2611
  emptyServicesSlot: f,
2500
2612
  onboardingIncompleteSlot: u,
2501
2613
  loadingDates: g,
2502
- loadingSlots: r,
2503
- onDateSelect: p,
2614
+ loadingSlots: o,
2615
+ onDateSelect: d,
2504
2616
  onWindowChange: m,
2505
2617
  datePickerStyle: S,
2506
- specialtyPickerStyle: y,
2507
- servicePickerStyle: N,
2508
- operatorPickerStyle: _,
2509
- submitting: I,
2510
- locale: v,
2511
- detailsProps: x,
2618
+ specialtyPickerStyle: k,
2619
+ servicePickerStyle: A,
2620
+ operatorPickerStyle: O,
2621
+ submitting: N,
2622
+ locale: x,
2623
+ detailsProps: I,
2512
2624
  policy: w,
2513
- agentIdBase: A
2625
+ agentIdBase: T
2514
2626
  } = t;
2515
2627
  switch (e) {
2516
2628
  case 1:
2517
2629
  return /* @__PURE__ */ s(
2518
- gs,
2630
+ ks,
2519
2631
  {
2520
- value: o.insuranceType,
2521
- onChange: (h) => c(ss(o, h))
2632
+ value: a.insuranceType,
2633
+ onChange: (v) => c(os(a, v))
2522
2634
  }
2523
2635
  );
2524
2636
  case 2:
2525
2637
  return /* @__PURE__ */ s(
2526
- hs,
2638
+ Ss,
2527
2639
  {
2528
2640
  specialties: i.filtered.specialties,
2529
- value: o.specialtyId,
2530
- valueIds: o.specialtyIds,
2531
- onChange: (h) => c(ns(o, h)),
2532
- onChangeIds: (h) => c(is(o, h)),
2533
- pickerStyle: y
2641
+ value: a.specialtyId,
2642
+ valueIds: a.specialtyIds,
2643
+ onChange: (v) => c(cs(a, v)),
2644
+ onChangeIds: (v) => c(ds(a, v)),
2645
+ pickerStyle: k
2534
2646
  }
2535
2647
  );
2536
2648
  case 3:
2537
- return i.filtered.services.length === 0 ? /* @__PURE__ */ s(ks, { customSlot: f }) : i.gates.onboardingIncomplete ? /* @__PURE__ */ s(ys, { customSlot: u }) : /* @__PURE__ */ s(
2538
- vs,
2649
+ return i.filtered.services.length === 0 ? /* @__PURE__ */ s(ws, { customSlot: f }) : i.gates.onboardingIncomplete ? /* @__PURE__ */ s(Ns, { customSlot: u }) : /* @__PURE__ */ s(
2650
+ xs,
2539
2651
  {
2540
2652
  services: i.filtered.services,
2541
- value: o.serviceId,
2542
- valueIds: o.serviceIds,
2543
- onChange: (h) => c(as(o, h)),
2544
- onChangeIds: (h) => c(rs(o, h)),
2545
- pickerStyle: N,
2653
+ value: a.serviceId,
2654
+ valueIds: a.serviceIds,
2655
+ onChange: (v) => c(ls(a, v)),
2656
+ onChangeIds: (v) => c(us(a, v)),
2657
+ pickerStyle: A,
2546
2658
  compact: n.compactService
2547
2659
  }
2548
2660
  );
2549
2661
  case 4:
2550
2662
  return /* @__PURE__ */ s(
2551
- bs,
2663
+ Is,
2552
2664
  {
2553
2665
  operators: i.filtered.operators,
2554
- value: o.operatorId,
2555
- valueIds: o.operatorIds,
2556
- onChange: (h) => c(os(o, h)),
2557
- onChangeIds: (h) => c(ds(o, h)),
2558
- pickerStyle: _
2666
+ value: a.operatorId,
2667
+ valueIds: a.operatorIds,
2668
+ onChange: (v) => c(ps(a, v)),
2669
+ onChangeIds: (v) => c(ms(a, v)),
2670
+ pickerStyle: O
2559
2671
  }
2560
2672
  );
2561
2673
  case 5:
2562
- return a.availableDates.length === 0 && a.nextAvailableDate ? /* @__PURE__ */ s(
2563
- Tt,
2674
+ return r.availableDates.length === 0 && r.nextAvailableDate ? /* @__PURE__ */ s(
2675
+ Et,
2564
2676
  {
2565
- nextAvailableDate: a.nextAvailableDate,
2566
- onJump: () => c(bt(o, a.nextAvailableDate)),
2567
- locale: v
2677
+ nextAvailableDate: r.nextAvailableDate,
2678
+ onJump: () => c(xt(a, r.nextAvailableDate)),
2679
+ locale: x
2568
2680
  }
2569
- ) : ms({
2570
- inputs: a,
2571
- value: o,
2681
+ ) : bs({
2682
+ inputs: r,
2683
+ value: a,
2572
2684
  onChange: c,
2573
- onDateSelect: p,
2685
+ onDateSelect: d,
2574
2686
  onWindowChange: m,
2575
2687
  loadingDates: g,
2576
- loadingSlots: r,
2577
- locale: v,
2688
+ loadingSlots: o,
2689
+ locale: x,
2578
2690
  datePickerStyle: S,
2579
- agentIdBase: A
2691
+ agentIdBase: T
2580
2692
  });
2581
2693
  case 6:
2582
- return fs({
2583
- inputs: a,
2584
- value: o,
2694
+ return ys({
2695
+ inputs: r,
2696
+ value: a,
2585
2697
  onChange: c,
2586
- loadingSlots: r,
2587
- locale: v,
2698
+ loadingSlots: o,
2699
+ locale: x,
2588
2700
  datePickerStyle: S
2589
2701
  });
2590
2702
  case 7:
2591
2703
  return i.selectedSlot ? /* @__PURE__ */ s(
2592
- Dt,
2704
+ Bt,
2593
2705
  {
2594
- ...x,
2595
- value: o.details ?? {},
2596
- onChange: (h) => c({ ...o, details: h }),
2706
+ ...I,
2707
+ value: a.details ?? {},
2708
+ onChange: (v) => c({ ...a, details: v }),
2597
2709
  onSubmit: l,
2598
- submitting: I,
2710
+ submitting: N,
2599
2711
  defaultPhoneCountry: w.country
2600
2712
  }
2601
2713
  ) : null;
@@ -2604,8 +2716,8 @@ function fe(e, t, n = {}) {
2604
2716
  return null;
2605
2717
  }
2606
2718
  }
2607
- function yt() {
2608
- const { t: e } = q();
2719
+ function It() {
2720
+ const { t: e } = j();
2609
2721
  return M(
2610
2722
  () => ({
2611
2723
  1: e("booking.insurance.heading"),
@@ -2619,19 +2731,19 @@ function yt() {
2619
2731
  [e]
2620
2732
  );
2621
2733
  }
2622
- function He(e, t) {
2734
+ function Ue(e, t) {
2623
2735
  return t === "four-day-grid" && e === 6 ? 5 : e;
2624
2736
  }
2625
- function ti(e) {
2626
- const { cascade: t, value: n, activeStep: i, setActiveStep: a, datePickerStyle: o } = e, c = yt(), { t: l } = q(), f = l("booking.operator.all"), u = M(
2627
- () => Ot(t.visibleSteps, o),
2628
- [t.visibleSteps, o]
2629
- ), g = He(i, o), r = Math.max(0, u.indexOf(g)), p = M(
2737
+ function gi(e) {
2738
+ const { cascade: t, value: n, activeStep: i, setActiveStep: r, datePickerStyle: a } = e, c = It(), { t: l } = j(), f = l("booking.operator.all"), u = M(
2739
+ () => Lt(t.visibleSteps, a),
2740
+ [t.visibleSteps, a]
2741
+ ), g = Ue(i, a), o = Math.max(0, u.indexOf(g)), d = M(
2630
2742
  () => u.map((m) => ({
2631
2743
  label: c[m],
2632
- summary: xs(m, n, t, f),
2633
- status: si(m, n, t),
2634
- content: /* @__PURE__ */ s(j, { step: m, active: m === g, children: fe(m, e, { compactService: !0 }) })
2744
+ summary: As(m, n, t, f),
2745
+ status: hi(m, n, t),
2746
+ content: /* @__PURE__ */ s(z, { step: m, active: m === g, children: fe(m, e, { compactService: !0 }) })
2635
2747
  })),
2636
2748
  [
2637
2749
  u,
@@ -2644,45 +2756,45 @@ function ti(e) {
2644
2756
  ]
2645
2757
  );
2646
2758
  return /* @__PURE__ */ s(
2647
- Ls,
2759
+ Ks,
2648
2760
  {
2649
- activeStep: r,
2650
- steps: p,
2761
+ activeStep: o,
2762
+ steps: d,
2651
2763
  onStepChange: (m) => {
2652
2764
  const S = u[m];
2653
- S && a(S);
2765
+ S && r(S);
2654
2766
  }
2655
2767
  }
2656
2768
  );
2657
2769
  }
2658
- function si(e, t, n) {
2659
- return we(e, t) && e < n.currentStep ? "completed" : e <= n.currentStep ? "unlocked" : void 0;
2770
+ function hi(e, t, n) {
2771
+ return De(e, t) && e < n.currentStep ? "completed" : e <= n.currentStep ? "unlocked" : void 0;
2660
2772
  }
2661
- function Yt(e, t) {
2662
- return e !== 4 ? we(e, t) : t.operatorIds && t.operatorIds.length > 0 ? !0 : ls(t) !== void 0;
2773
+ function es(e, t) {
2774
+ return e !== 4 ? De(e, t) : t.operatorIds && t.operatorIds.length > 0 ? !0 : gs(t) !== void 0;
2663
2775
  }
2664
- function It(e, t) {
2776
+ function Dt(e, t) {
2665
2777
  const n = e.map((i) => {
2666
- var a;
2667
- return (a = t.find((o) => o.id === i)) == null ? void 0 : a.label;
2778
+ var r;
2779
+ return (r = t.find((a) => a.id === i)) == null ? void 0 : r.label;
2668
2780
  }).filter((i) => i !== void 0);
2669
2781
  return n.length > 0 ? n.join(", ") : void 0;
2670
2782
  }
2671
- function xs(e, t, n, i) {
2672
- var a;
2673
- if (we(e, t))
2783
+ function As(e, t, n, i) {
2784
+ var r;
2785
+ if (De(e, t))
2674
2786
  switch (e) {
2675
2787
  case 1:
2676
2788
  return t.insuranceType;
2677
2789
  case 2:
2678
- return It(
2679
- _e(t),
2790
+ return Dt(
2791
+ Re(t),
2680
2792
  n.filtered.specialties
2681
2793
  );
2682
2794
  case 3:
2683
- return It(Ce(t), n.filtered.services);
2795
+ return Dt(Te(t), n.filtered.services);
2684
2796
  case 4: {
2685
- const c = wt(t).filter((f) => f !== ye), l = It(
2797
+ const c = Mt(t).filter((f) => f !== Ie), l = Dt(
2686
2798
  c,
2687
2799
  n.filtered.operators.map((f) => ({
2688
2800
  id: f.id,
@@ -2694,52 +2806,52 @@ function xs(e, t, n, i) {
2694
2806
  case 5:
2695
2807
  return t.date;
2696
2808
  case 6:
2697
- return (a = n.selectedSlot) == null ? void 0 : a.time;
2809
+ return (r = n.selectedSlot) == null ? void 0 : r.time;
2698
2810
  case 7:
2699
2811
  return;
2700
2812
  }
2701
2813
  }
2702
- function ni(e) {
2703
- const { cascade: t, value: n, activeStep: i, setActiveStep: a } = e, { t: o } = q(), c = yt(), l = o("booking.operator.all"), f = `${gt()}-filter`, u = He(i, e.datePickerStyle), g = t.visibleSteps.filter(
2814
+ function vi(e) {
2815
+ const { cascade: t, value: n, activeStep: i, setActiveStep: r } = e, { t: a } = j(), c = It(), l = a("booking.operator.all"), f = `${yt()}-filter`, u = Ue(i, e.datePickerStyle), g = t.visibleSteps.filter(
2704
2816
  (m) => m === 1 || m === 2 || m === 3 || m === 4
2705
- ), r = g.some(
2706
- (m) => !we(m, n)
2707
- ), p = g.some(
2817
+ ), o = g.some(
2818
+ (m) => !De(m, n)
2819
+ ), d = g.some(
2708
2820
  (m) => m === i
2709
- ) ? i : g.find((m) => !we(m, n));
2710
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2821
+ ) ? i : g.find((m) => !De(m, n));
2822
+ return /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2711
2823
  g.length > 0 ? /* @__PURE__ */ s(
2712
2824
  "div",
2713
2825
  {
2714
2826
  role: "group",
2715
- "aria-label": o("booking.filtersLabel"),
2827
+ "aria-label": a("booking.filtersLabel"),
2716
2828
  className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
2717
2829
  children: g.map((m) => {
2718
- const S = xs(
2830
+ const S = As(
2719
2831
  m,
2720
2832
  n,
2721
2833
  t,
2722
2834
  l
2723
- ), y = m === p, N = we(m, n);
2835
+ ), k = m === d, A = De(m, n);
2724
2836
  return /* @__PURE__ */ s(
2725
- Ve,
2837
+ $e,
2726
2838
  {
2727
- intent: y ? "primary" : "outline",
2839
+ intent: k ? "primary" : "outline",
2728
2840
  size: "sm",
2729
2841
  endIcon: /* @__PURE__ */ s(
2730
- Vs,
2842
+ qs,
2731
2843
  {
2732
2844
  "aria-hidden": "true",
2733
- className: y ? "ds:rotate-180" : void 0
2845
+ className: k ? "ds:rotate-180" : void 0
2734
2846
  }
2735
2847
  ),
2736
- "aria-expanded": N ? y : void 0,
2737
- "aria-controls": N && y ? f : void 0,
2738
- "aria-current": !N && y ? "step" : void 0,
2739
- onClick: () => a(
2740
- N && y ? t.currentStep : m
2848
+ "aria-expanded": A ? k : void 0,
2849
+ "aria-controls": A && k ? f : void 0,
2850
+ "aria-current": !A && k ? "step" : void 0,
2851
+ onClick: () => r(
2852
+ A && k ? t.currentStep : m
2741
2853
  ),
2742
- children: S ? /* @__PURE__ */ b(ce, { children: [
2854
+ children: S ? /* @__PURE__ */ y(ne, { children: [
2743
2855
  c[m],
2744
2856
  ": ",
2745
2857
  S
@@ -2750,23 +2862,23 @@ function ni(e) {
2750
2862
  })
2751
2863
  }
2752
2864
  ) : null,
2753
- p !== void 0 ? /* @__PURE__ */ s(
2754
- j,
2865
+ d !== void 0 ? /* @__PURE__ */ s(
2866
+ z,
2755
2867
  {
2756
- step: p,
2757
- active: p === u,
2868
+ step: d,
2869
+ active: d === u,
2758
2870
  id: f,
2759
- children: fe(p, e, { compactService: !0 })
2871
+ children: fe(d, e, { compactService: !0 })
2760
2872
  }
2761
2873
  ) : null,
2762
- !r && t.gates.date ? (
2874
+ !o && t.gates.date ? (
2763
2875
  // four-day-grid embeds slots inline with the day strip — the
2764
2876
  // historic 2-col date|slot split collapses to a single column
2765
2877
  // so the picker spans the full width instead of orphaning an
2766
2878
  // empty right cell.
2767
- e.datePickerStyle === "four-day-grid" ? /* @__PURE__ */ s(j, { step: 5, active: u === 5, children: fe(5, e) }) : /* @__PURE__ */ b("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
2879
+ e.datePickerStyle === "four-day-grid" ? /* @__PURE__ */ s(z, { step: 5, active: u === 5, children: fe(5, e) }) : /* @__PURE__ */ y("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
2768
2880
  /* @__PURE__ */ s(
2769
- j,
2881
+ z,
2770
2882
  {
2771
2883
  step: 5,
2772
2884
  active: u === 5,
@@ -2775,7 +2887,7 @@ function ni(e) {
2775
2887
  }
2776
2888
  ),
2777
2889
  n.date ? /* @__PURE__ */ s(
2778
- j,
2890
+ z,
2779
2891
  {
2780
2892
  step: 6,
2781
2893
  active: u === 6,
@@ -2785,64 +2897,64 @@ function ni(e) {
2785
2897
  ) : /* @__PURE__ */ s("div", { className: "ds:min-w-0" })
2786
2898
  ] })
2787
2899
  ) : null,
2788
- t.gates.details ? /* @__PURE__ */ s(j, { step: 7, active: u === 7, children: fe(7, e) }) : null
2900
+ t.gates.details ? /* @__PURE__ */ s(z, { step: 7, active: u === 7, children: fe(7, e) }) : null
2789
2901
  ] });
2790
2902
  }
2791
- function ii(e) {
2792
- const { cascade: t, datePickerStyle: n, activeStep: i } = e, a = He(i, n), o = t.visibleSteps.filter(
2903
+ function bi(e) {
2904
+ const { cascade: t, datePickerStyle: n, activeStep: i } = e, r = Ue(i, n), a = t.visibleSteps.filter(
2793
2905
  (l) => l === 1 || l === 2 || l === 3 || l === 4
2794
2906
  );
2795
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2796
- /* @__PURE__ */ b(
2907
+ return /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2908
+ /* @__PURE__ */ y(
2797
2909
  "div",
2798
2910
  {
2799
2911
  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",
2800
2912
  children: [
2801
- /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: o.map((l) => /* @__PURE__ */ s(j, { step: l, active: l === a, children: fe(l, e, { compactService: !0 }) }, `fbf-${l}`)) }),
2802
- /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2803
- t.gates.date ? /* @__PURE__ */ s(j, { step: 5, active: a === 5, children: fe(5, e) }) : null,
2804
- t.gates.slot && e.value.date && n === "month-calendar" ? /* @__PURE__ */ s(j, { step: 6, active: a === 6, children: fe(6, e) }) : null
2913
+ /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: a.map((l) => /* @__PURE__ */ s(z, { step: l, active: l === r, children: fe(l, e, { compactService: !0 }) }, `fbf-${l}`)) }),
2914
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2915
+ t.gates.date ? /* @__PURE__ */ s(z, { step: 5, active: r === 5, children: fe(5, e) }) : null,
2916
+ t.gates.slot && e.value.date && n === "month-calendar" ? /* @__PURE__ */ s(z, { step: 6, active: r === 6, children: fe(6, e) }) : null
2805
2917
  ] })
2806
2918
  ]
2807
2919
  }
2808
2920
  ),
2809
- t.gates.details ? /* @__PURE__ */ s(j, { step: 7, active: a === 7, children: fe(7, e) }) : null
2921
+ t.gates.details ? /* @__PURE__ */ s(z, { step: 7, active: r === 7, children: fe(7, e) }) : null
2810
2922
  ] });
2811
2923
  }
2812
- function ai(e) {
2813
- const { cascade: t, value: n, activeStep: i, setActiveStep: a, datePickerStyle: o } = e, { t: c } = q(), l = yt(), f = M(
2814
- () => Ot(t.visibleSteps, o),
2815
- [t.visibleSteps, o]
2816
- ), u = He(i, o), g = Math.max(0, f.indexOf(u)), r = f.length, p = M(
2817
- () => f.map((N) => ({ label: l[N] })),
2924
+ function yi(e) {
2925
+ const { cascade: t, value: n, activeStep: i, setActiveStep: r, datePickerStyle: a } = e, { t: c } = j(), l = It(), f = M(
2926
+ () => Lt(t.visibleSteps, a),
2927
+ [t.visibleSteps, a]
2928
+ ), u = Ue(i, a), g = Math.max(0, f.indexOf(u)), o = f.length, d = M(
2929
+ () => f.map((A) => ({ label: l[A] })),
2818
2930
  [f, l]
2819
- ), m = g > 0, S = u === 5 && o === "four-day-grid", y = g < r - 1 && we(u, n) && (!S || we(6, n));
2820
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2821
- /* @__PURE__ */ s(Ps, { activeStep: g, steps: p }),
2822
- /* @__PURE__ */ s(j, { step: u, active: !0, children: fe(u, e, { compactService: !0 }) }),
2823
- /* @__PURE__ */ b("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
2931
+ ), m = g > 0, S = u === 5 && a === "four-day-grid", k = g < o - 1 && De(u, n) && (!S || De(6, n));
2932
+ return /* @__PURE__ */ y("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2933
+ /* @__PURE__ */ s(zs, { activeStep: g, steps: d }),
2934
+ /* @__PURE__ */ s(z, { step: u, active: !0, children: fe(u, e, { compactService: !0 }) }),
2935
+ /* @__PURE__ */ y("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
2824
2936
  /* @__PURE__ */ s(
2825
- Ve,
2937
+ $e,
2826
2938
  {
2827
2939
  intent: "ghost",
2828
2940
  size: "md",
2829
2941
  disabled: !m,
2830
2942
  onClick: () => {
2831
- const N = f[g - 1];
2832
- N && a(N);
2943
+ const A = f[g - 1];
2944
+ A && r(A);
2833
2945
  },
2834
2946
  children: c("booking.actions.back")
2835
2947
  }
2836
2948
  ),
2837
2949
  u < 7 ? /* @__PURE__ */ s(
2838
- Ve,
2950
+ $e,
2839
2951
  {
2840
2952
  intent: "primary",
2841
2953
  size: "md",
2842
- disabled: !y,
2954
+ disabled: !k,
2843
2955
  onClick: () => {
2844
- const N = f[g + 1];
2845
- N && a(N);
2956
+ const A = f[g + 1];
2957
+ A && r(A);
2846
2958
  },
2847
2959
  children: c("booking.actions.next")
2848
2960
  }
@@ -2850,11 +2962,11 @@ function ai(e) {
2850
2962
  ] })
2851
2963
  ] });
2852
2964
  }
2853
- const ri = [], oi = [];
2854
- function Wt() {
2965
+ const ki = [], Si = [];
2966
+ function ts() {
2855
2967
  return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2856
2968
  }
2857
- const di = Zt(
2969
+ const xi = ss(
2858
2970
  ({
2859
2971
  variant: e = "inline-list",
2860
2972
  country: t,
@@ -2863,468 +2975,471 @@ const di = Zt(
2863
2975
  // data without the explicit flag still get the step.
2864
2976
  useSpecialties: n,
2865
2977
  allowOperatorSelection: i = !1,
2866
- lockedOperatorId: a,
2867
- operatorsByService: o = !1,
2978
+ lockedOperatorId: r,
2979
+ operatorsByService: a = !1,
2868
2980
  autoSelectSingleService: c = !1,
2869
2981
  specialties: l,
2870
2982
  services: f,
2871
2983
  operators: u,
2872
2984
  availableDates: g,
2873
- availableSlots: r,
2874
- nextAvailableDate: p,
2985
+ availableSlots: o,
2986
+ nextAvailableDate: d,
2875
2987
  requireCodiceFiscale: m,
2876
2988
  requireDateOfBirth: S,
2877
- requireInsuranceNumber: y,
2878
- showNote: N,
2879
- showReturningPatientFlag: _,
2880
- privacyPolicyUrl: I,
2881
- termsUrl: v,
2882
- paymentTermsUrl: x,
2883
- paymentState: w,
2884
- renderPayment: A,
2885
- renderPaymentCompletion: h,
2886
- validateCodiceFiscale: d,
2887
- validateInsuranceNumber: T,
2888
- confirmationChannels: F,
2889
- defaultConfirmationChannels: V,
2890
- value: D,
2891
- onChange: O,
2892
- onSubmit: J,
2893
- onStepChange: Q,
2894
- onDateSelect: Ae,
2895
- onWindowChange: ae,
2989
+ requireInsuranceNumber: k,
2990
+ showNote: A,
2991
+ showReturningPatientFlag: O,
2992
+ privacyPolicyUrl: N,
2993
+ termsUrl: x,
2994
+ practiceConsent: I,
2995
+ paymentTermsUrl: w,
2996
+ paymentState: T,
2997
+ renderPayment: v,
2998
+ renderPaymentCompletion: b,
2999
+ validateCodiceFiscale: h,
3000
+ validateInsuranceNumber: q,
3001
+ confirmationChannels: R,
3002
+ defaultConfirmationChannels: te,
3003
+ value: C,
3004
+ onChange: P,
3005
+ onSubmit: we,
3006
+ onStepChange: he,
3007
+ onDateSelect: Me,
3008
+ onWindowChange: se,
2896
3009
  datePickerStyle: Z = "month-calendar",
2897
- specialtyPickerStyle: ue,
2898
- servicePickerStyle: he,
2899
- operatorPickerStyle: K,
2900
- loadingDates: Re,
2901
- loadingSlots: se,
2902
- submitting: H,
2903
- submitError: re,
2904
- mode: P = "live",
2905
- showModifyOnSuccess: oe = !0,
2906
- surface: $e = "flat",
2907
- emptyServicesSlot: De,
2908
- onboardingIncompleteSlot: Me,
2909
- "aria-label": Ee,
2910
- id: G,
2911
- className: pe,
2912
- onFocus: Te,
2913
- onBlur: ve,
2914
- ...nt
2915
- }, Ke) => {
2916
- var Kt, zt;
2917
- const { t: ee, i18n: Le } = q(), te = e ?? "inline-list", Oe = Le.language ?? "en", Se = l ?? ri, xe = u ?? oi;
2918
- z(() => {
2919
- const C = On(D, {
3010
+ specialtyPickerStyle: de,
3011
+ servicePickerStyle: J,
3012
+ operatorPickerStyle: ie,
3013
+ loadingDates: Oe,
3014
+ loadingSlots: U,
3015
+ submitting: W,
3016
+ submitError: le,
3017
+ mode: E = "live",
3018
+ showModifyOnSuccess: re = !0,
3019
+ surface: Ke = "flat",
3020
+ emptyServicesSlot: _e,
3021
+ onboardingIncompleteSlot: Be,
3022
+ "aria-label": ue,
3023
+ id: H,
3024
+ className: ve,
3025
+ onFocus: Ge,
3026
+ onBlur: ze,
3027
+ ...it
3028
+ }, Ye) => {
3029
+ var Ht, Jt;
3030
+ const { t: G, i18n: rt } = j(), X = e ?? "inline-list", pe = rt.language ?? "en", be = l ?? ki, ye = u ?? Si;
3031
+ $(() => {
3032
+ const D = Ln(C, {
2920
3033
  useSpecialties: n,
2921
- lockedOperatorId: a,
3034
+ lockedOperatorId: r,
2922
3035
  autoSelectSingleService: c,
2923
- specialties: Se,
3036
+ specialties: be,
2924
3037
  services: f
2925
3038
  });
2926
- (C.specialtyId !== D.specialtyId || C.operatorId !== D.operatorId || C.serviceId !== D.serviceId) && O(C);
3039
+ (D.specialtyId !== C.specialtyId || D.operatorId !== C.operatorId || D.serviceId !== C.serviceId) && P(D);
2927
3040
  }, [
2928
- a,
3041
+ r,
2929
3042
  n,
2930
3043
  c,
2931
- Se,
3044
+ be,
2932
3045
  f
2933
3046
  ]);
2934
- const R = M(
2935
- () => Tn({
3047
+ const L = M(
3048
+ () => En({
2936
3049
  country: t,
2937
3050
  useSpecialties: n,
2938
3051
  allowOperatorSelection: i,
2939
- lockedOperatorId: a,
2940
- operatorsByService: o,
2941
- specialties: Se,
3052
+ lockedOperatorId: r,
3053
+ operatorsByService: a,
3054
+ specialties: be,
2942
3055
  services: f,
2943
- operators: xe,
2944
- availableSlots: r,
2945
- value: D
3056
+ operators: ye,
3057
+ availableSlots: o,
3058
+ value: C
2946
3059
  }),
2947
3060
  [
2948
3061
  t,
2949
3062
  n,
2950
3063
  i,
3064
+ r,
2951
3065
  a,
2952
- o,
2953
3066
  c,
2954
- Se,
3067
+ be,
2955
3068
  f,
2956
- xe,
3069
+ ye,
2957
3070
  g,
2958
- r,
2959
- D
3071
+ o,
3072
+ C
2960
3073
  ]
2961
- ), ze = M(
3074
+ ), ke = M(
2962
3075
  () => [
2963
- JSON.stringify(D.insuranceType),
2964
- JSON.stringify(_e(D)),
2965
- JSON.stringify(Ce(D)),
2966
- JSON.stringify(wt(D)),
2967
- JSON.stringify(D.date),
2968
- JSON.stringify(D.slotKey)
3076
+ JSON.stringify(C.insuranceType),
3077
+ JSON.stringify(Re(C)),
3078
+ JSON.stringify(Te(C)),
3079
+ JSON.stringify(Mt(C)),
3080
+ JSON.stringify(C.date),
3081
+ JSON.stringify(C.slotKey)
2969
3082
  ],
2970
- [D]
2971
- ), je = te === "progress", it = ke(
2972
- (C) => {
2973
- if (C === 4 && R.visibleSteps.includes(4) && wt(D).length === 0)
2974
- return Math.min(4, R.currentStep);
2975
- if (!je) return R.currentStep;
2976
- const B = R.visibleSteps.find(
2977
- (E) => E > C && !Yt(E, D)
3083
+ [C]
3084
+ ), Fe = X === "progress", je = Ne(
3085
+ (D) => {
3086
+ if (D === 4 && L.visibleSteps.includes(4) && Mt(C).length === 0)
3087
+ return Math.min(4, L.currentStep);
3088
+ if (!Fe) return L.currentStep;
3089
+ const _ = L.visibleSteps.find(
3090
+ (B) => B > D && !es(B, C)
2978
3091
  );
2979
- return B === void 0 ? R.currentStep : Math.min(B, R.currentStep);
3092
+ return _ === void 0 ? L.currentStep : Math.min(_, L.currentStep);
2980
3093
  },
2981
- [je, R.visibleSteps, R.currentStep, D]
2982
- ), [ne, Ie] = ie(
2983
- R.currentStep
2984
- ), Ge = L(ze), Ue = L(R.visibleSteps);
2985
- z(() => {
2986
- const C = Ge.current, B = Ue.current;
2987
- Ge.current = ze, Ue.current = R.visibleSteps;
2988
- const E = ze.findIndex(
2989
- (de, jt) => de !== C[jt]
3094
+ [Fe, L.visibleSteps, L.currentStep, C]
3095
+ ), [ae, me] = ee(
3096
+ L.currentStep
3097
+ ), Ze = F(ke), at = F(L.visibleSteps);
3098
+ $(() => {
3099
+ const D = Ze.current, _ = at.current;
3100
+ Ze.current = ke, at.current = L.visibleSteps;
3101
+ const B = ke.findIndex(
3102
+ (oe, Ut) => oe !== D[Ut]
2990
3103
  );
2991
- if (E !== -1) {
2992
- Ie(it(E + 1));
3104
+ if (B !== -1) {
3105
+ me(je(B + 1));
2993
3106
  return;
2994
3107
  }
2995
- const W = je ? R.visibleSteps.find(
2996
- (de) => de < ne && !B.includes(de) && !Yt(de, D)
3108
+ const Y = Fe ? L.visibleSteps.find(
3109
+ (oe) => oe < ae && !_.includes(oe) && !es(oe, C)
2997
3110
  ) : void 0;
2998
- if (W !== void 0) {
2999
- Ie(W);
3111
+ if (Y !== void 0) {
3112
+ me(Y);
3000
3113
  return;
3001
3114
  }
3002
- R.visibleSteps.includes(ne) || Ie(R.currentStep);
3115
+ L.visibleSteps.includes(ae) || me(L.currentStep);
3003
3116
  }, [
3004
- ze,
3005
- it,
3117
+ ke,
3006
3118
  je,
3007
- R.currentStep,
3008
- R.visibleSteps,
3009
- ne,
3010
- D
3119
+ Fe,
3120
+ L.currentStep,
3121
+ L.visibleSteps,
3122
+ ae,
3123
+ C
3011
3124
  ]);
3012
- const me = L(null), k = M(
3013
- () => Ot(R.visibleSteps, Z),
3014
- [R.visibleSteps, Z]
3015
- ), $ = yt(), [Pe, Is] = ie(""), Ye = L(null), at = L(null);
3016
- z(() => {
3017
- const C = He(ne, Z);
3018
- if (at.current === null) {
3019
- at.current = C;
3125
+ const Se = F(null), We = M(
3126
+ () => Lt(L.visibleSteps, Z),
3127
+ [L.visibleSteps, Z]
3128
+ ), ot = It(), [ct, Nt] = ee(""), Ee = F(null), Pe = F(null);
3129
+ $(() => {
3130
+ const D = Ue(ae, Z);
3131
+ if (Pe.current === null) {
3132
+ Pe.current = D;
3020
3133
  return;
3021
3134
  }
3022
- if (at.current === C) return;
3023
- at.current = C;
3024
- const B = k.indexOf(C);
3025
- Is(
3026
- B === -1 ? "" : ee("booking.stepAnnouncement", {
3027
- current: B + 1,
3028
- total: k.length,
3029
- label: $[C]
3135
+ if (Pe.current === D) return;
3136
+ Pe.current = D;
3137
+ const _ = We.indexOf(D);
3138
+ Nt(
3139
+ _ === -1 ? "" : G("booking.stepAnnouncement", {
3140
+ current: _ + 1,
3141
+ total: We.length,
3142
+ label: ot[D]
3030
3143
  })
3031
3144
  );
3032
- const E = Ye.current;
3033
- if (!E || E.isConnected) return;
3034
- const W = me.current;
3035
- if (!W) return;
3036
- const de = document.activeElement;
3037
- if (!(de === null || de === document.body || !W.contains(de))) return;
3038
- const rt = W.querySelector(Qn) ?? W;
3039
- if (rt.focus({ preventScroll: !0 }), typeof rt.scrollIntoView == "function")
3145
+ const B = Ee.current;
3146
+ if (!B || B.isConnected) return;
3147
+ const Y = Se.current;
3148
+ if (!Y) return;
3149
+ const oe = document.activeElement;
3150
+ if (!(oe === null || oe === document.body || !Y.contains(oe))) return;
3151
+ const dt = Y.querySelector(mi) ?? Y;
3152
+ if (dt.focus({ preventScroll: !0 }), typeof dt.scrollIntoView == "function")
3040
3153
  try {
3041
- rt.scrollIntoView({
3042
- behavior: Wt() ? "auto" : "smooth",
3154
+ dt.scrollIntoView({
3155
+ behavior: ts() ? "auto" : "smooth",
3043
3156
  block: "nearest"
3044
3157
  });
3045
3158
  } catch {
3046
- rt.scrollIntoView();
3159
+ dt.scrollIntoView();
3047
3160
  }
3048
- }, [ne, Z, k, $, ee]);
3049
- const U = Pn({
3161
+ }, [ae, Z, We, ot, G]);
3162
+ const K = Wn({
3050
3163
  services: f,
3051
- value: D,
3052
- availableSlots: r,
3053
- onSubmit: J,
3054
- onChange: O,
3055
- paymentState: w,
3056
- submitting: H,
3057
- paymentTermsUrl: x,
3058
- renderPayment: A
3059
- }), Y = U.status, Bt = U.submit, kt = L(U.reset);
3060
- kt.current = U.reset;
3061
- const _t = gt(), Rt = L(null), Et = L(null), Lt = ((Kt = U.state) == null ? void 0 : Kt.status) === "failed", Pt = U.state && "phase" in U.state && U.state.phase === "completion";
3062
- z(() => {
3063
- var C, B;
3064
- if (Y === "payment") {
3065
- const E = document.activeElement;
3066
- (!Pt || !E || E === document.body || !((C = me.current) != null && C.contains(E))) && ((B = Rt.current) == null || B.focus());
3164
+ value: C,
3165
+ availableSlots: o,
3166
+ onSubmit: we,
3167
+ onChange: P,
3168
+ paymentState: T,
3169
+ submitting: W,
3170
+ paymentTermsUrl: w,
3171
+ renderPayment: v
3172
+ }), p = K.status, V = K.submit, Ce = F(K.reset);
3173
+ Ce.current = K.reset;
3174
+ const Rt = yt(), Pt = F(null), Vt = F(null), $t = ((Ht = K.state) == null ? void 0 : Ht.status) === "failed", Kt = K.state && "phase" in K.state && K.state.phase === "completion";
3175
+ $(() => {
3176
+ var D, _;
3177
+ if (p === "payment") {
3178
+ const B = document.activeElement;
3179
+ (!Kt || !B || B === document.body || !((D = Se.current) != null && D.contains(B))) && ((_ = Pt.current) == null || _.focus());
3067
3180
  }
3068
- }, [Y, Pt]), z(() => {
3069
- var C;
3070
- Y === "payment" && Lt && ((C = Et.current) == null || C.focus());
3071
- }, [Y, Lt]), Ds(Ke, () => me.current, []);
3072
- const We = Y === "success" ? 8 : Y === "payment" ? 7 : R.currentStep, Ft = L(null);
3073
- z(() => {
3074
- if (We !== Ft.current && (Ft.current = We, Q == null || Q(We), We === 8 && me.current))
3181
+ }, [p, Kt]), $(() => {
3182
+ var D;
3183
+ p === "payment" && $t && ((D = Vt.current) == null || D.focus());
3184
+ }, [p, $t]), Bs(Ye, () => Se.current, []);
3185
+ const Xe = p === "success" ? 8 : p === "payment" ? 7 : L.currentStep, zt = F(null);
3186
+ $(() => {
3187
+ if (Xe !== zt.current && (zt.current = Xe, he == null || he(Xe), Xe === 8 && Se.current))
3075
3188
  try {
3076
- me.current.scrollIntoView({
3077
- behavior: Wt() ? "auto" : "smooth",
3189
+ Se.current.scrollIntoView({
3190
+ behavior: ts() ? "auto" : "smooth",
3078
3191
  block: "start"
3079
3192
  });
3080
3193
  } catch {
3081
- me.current.scrollIntoView();
3194
+ Se.current.scrollIntoView();
3082
3195
  }
3083
- }, [We, Q]);
3084
- const Ze = L({ activeStep: ne, cascade: R, submitState: Y });
3085
- z(() => {
3086
- Ze.current = { activeStep: ne, cascade: R, submitState: Y };
3087
- }, [ne, R, Y]);
3088
- const Vt = M(
3196
+ }, [Xe, he]);
3197
+ const Qe = F({ activeStep: ae, cascade: L, submitState: p });
3198
+ $(() => {
3199
+ Qe.current = { activeStep: ae, cascade: L, submitState: p };
3200
+ }, [ae, L, p]);
3201
+ const jt = M(
3089
3202
  () => ({
3090
- getVariant: () => te,
3203
+ getVariant: () => X,
3091
3204
  getCurrentStep: () => {
3092
- const C = Ze.current;
3093
- return C.submitState === "success" ? 8 : C.submitState === "payment" ? 7 : C.activeStep;
3205
+ const D = Qe.current;
3206
+ return D.submitState === "success" ? 8 : D.submitState === "payment" ? 7 : D.activeStep;
3094
3207
  },
3095
3208
  reset: () => {
3096
- Ze.current.submitState !== "payment" && (O({}), kt.current(), Ie(1));
3209
+ Qe.current.submitState !== "payment" && (P({}), Ce.current(), me(1));
3097
3210
  },
3098
- goToStep: (C) => {
3099
- const B = Ze.current, E = B.cascade.visibleSteps.includes(C), W = B.cascade.currentStep, de = B.submitState === "payment" ? 7 : !E || C > W ? W : C;
3100
- Ze.current = { ...B, activeStep: de }, Ie(de);
3211
+ goToStep: (D) => {
3212
+ const _ = Qe.current, B = _.cascade.visibleSteps.includes(D), Y = _.cascade.currentStep, oe = _.submitState === "payment" ? 7 : !B || D > Y ? Y : D;
3213
+ Qe.current = { ..._, activeStep: oe }, me(oe);
3101
3214
  }
3102
3215
  }),
3103
- [te, O]
3216
+ [X, P]
3104
3217
  );
3105
- Ts(In, Vt, G);
3106
- const Ns = Ee ?? ee("booking.regionLabel"), Ne = U.snapshot, ws = Y === "success" && Ne ? /* @__PURE__ */ s(
3107
- Xn,
3218
+ Es(Dn, jt, H);
3219
+ const Ds = ue ?? G("booking.regionLabel"), Ae = K.snapshot, Ts = p === "success" && Ae ? /* @__PURE__ */ s(
3220
+ pi,
3108
3221
  {
3109
- payment: Ne.payment,
3222
+ payment: Ae.payment,
3110
3223
  snapshot: {
3111
- ...Ne.value,
3112
- slot: Ne.slot,
3113
- details: Ne.details,
3114
- serviceId: ((zt = Ne.payment) == null ? void 0 : zt.serviceId) ?? Ne.slot.serviceId ?? Ne.value.serviceId
3224
+ ...Ae.value,
3225
+ slot: Ae.slot,
3226
+ details: Ae.details,
3227
+ serviceId: ((Jt = Ae.payment) == null ? void 0 : Jt.serviceId) ?? Ae.slot.serviceId ?? Ae.value.serviceId
3115
3228
  },
3116
- operators: xe,
3117
- specialties: Se,
3229
+ operators: ye,
3230
+ specialties: be,
3118
3231
  services: f,
3119
- locale: Oe,
3120
- mode: P,
3121
- showModify: oe && !Ne.payment,
3122
- onReset: () => Vt.reset(),
3232
+ locale: pe,
3233
+ mode: E,
3234
+ showModify: re && !Ae.payment,
3235
+ onReset: () => jt.reset(),
3123
3236
  focusWasLost: () => {
3124
- const C = Ye.current, B = document.activeElement;
3125
- return !!(C && !C.isConnected) && (!B || B === document.body);
3237
+ const D = Ee.current, _ = document.activeElement;
3238
+ return !!(D && !D.isConnected) && (!_ || _ === document.body);
3126
3239
  },
3127
3240
  onModify: () => {
3128
- kt.current(), Ie(7);
3241
+ Ce.current(), me(7);
3129
3242
  }
3130
3243
  }
3131
- ) : null, St = U.activeSession, Xe = U.state, be = St && Xe ? { session: St, payment: St.payment, state: Xe } : void 0, Qe = Xe && "phase" in Xe && Xe.phase === "completion", Cs = Y === "payment" && be ? /* @__PURE__ */ b(
3244
+ ) : null, wt = K.activeSession, et = K.state, xe = wt && et ? { session: wt, payment: wt.payment, state: et } : void 0, tt = et && "phase" in et && et.phase === "completion", Ms = p === "payment" && xe ? /* @__PURE__ */ y(
3132
3245
  "section",
3133
3246
  {
3134
- "aria-labelledby": _t,
3247
+ "aria-labelledby": Rt,
3135
3248
  "data-component": "booking-payment",
3136
- "data-payment-status": be.state.status,
3249
+ "data-payment-status": xe.state.status,
3137
3250
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
3138
3251
  children: [
3139
3252
  /* @__PURE__ */ s(
3140
3253
  "h3",
3141
3254
  {
3142
- ref: Rt,
3143
- id: _t,
3255
+ ref: Pt,
3256
+ id: Rt,
3144
3257
  tabIndex: -1,
3145
3258
  className: "type-title-card ds:m-0",
3146
- children: ee(
3147
- Qe ? "booking.payment.confirming" : "booking.payment.heading"
3259
+ children: G(
3260
+ tt ? "booking.payment.confirming" : "booking.payment.heading"
3148
3261
  )
3149
3262
  }
3150
3263
  ),
3151
- Qe ? null : /* @__PURE__ */ s("p", { className: "type-body ds:m-0", children: ee("booking.payment.noticeBody", {
3152
- amount: st(
3153
- be.payment.amountCents,
3154
- be.payment.currencyCode,
3155
- Oe
3264
+ tt ? null : /* @__PURE__ */ s("p", { className: "type-body ds:m-0", children: G("booking.payment.noticeBody", {
3265
+ amount: nt(
3266
+ xe.payment.amountCents,
3267
+ xe.payment.currencyCode,
3268
+ pe
3156
3269
  )
3157
3270
  }) }),
3158
3271
  /* @__PURE__ */ s(
3159
3272
  "p",
3160
3273
  {
3161
3274
  role: "status",
3162
- className: be.state.status === "processing" ? "type-body ds:m-0 ds:flex ds:items-center ds:gap-[var(--spacing-sm)]" : "ds:sr-only",
3163
- children: be.state.status === "processing" ? /* @__PURE__ */ b(ce, { children: [
3164
- /* @__PURE__ */ s(Xt, { variant: "pulse", size: "lg", "aria-hidden": "true" }),
3165
- /* @__PURE__ */ s("span", { children: ee(
3166
- Qe ? "booking.payment.confirming" : "booking.payment.processing"
3275
+ className: xe.state.status === "processing" ? "type-body ds:m-0 ds:flex ds:items-center ds:gap-[var(--spacing-sm)]" : "ds:sr-only",
3276
+ children: xe.state.status === "processing" ? /* @__PURE__ */ y(ne, { children: [
3277
+ /* @__PURE__ */ s(ns, { variant: "pulse", size: "lg", "aria-hidden": "true" }),
3278
+ /* @__PURE__ */ s("span", { children: G(
3279
+ tt ? "booking.payment.confirming" : "booking.payment.processing"
3167
3280
  ) })
3168
3281
  ] }) : null
3169
3282
  }
3170
3283
  ),
3171
- be.state.status === "failed" ? /* @__PURE__ */ s(
3172
- X,
3284
+ xe.state.status === "failed" ? /* @__PURE__ */ s(
3285
+ Q,
3173
3286
  {
3174
- ref: Et,
3287
+ ref: Vt,
3175
3288
  variant: "error",
3176
3289
  tabIndex: -1,
3177
- className: ft,
3178
- children: /* @__PURE__ */ s(X.Description, { children: be.state.error ?? ee(
3179
- Qe ? "booking.payment.completionFailed" : "booking.payment.failed"
3290
+ className: bt,
3291
+ children: /* @__PURE__ */ s(Q.Description, { children: xe.state.error ?? G(
3292
+ tt ? "booking.payment.completionFailed" : "booking.payment.failed"
3180
3293
  ) })
3181
3294
  }
3182
3295
  ) : null,
3183
- Qe ? h == null ? void 0 : h(be) : A == null ? void 0 : A(be)
3296
+ tt ? b == null ? void 0 : b(xe) : v == null ? void 0 : v(xe)
3184
3297
  ]
3185
3298
  }
3186
- ) : null, $t = M(() => {
3187
- const C = new Set(Ce(D)), B = f.filter((E) => C.has(E.id)).map((E) => {
3188
- var W;
3299
+ ) : null, qt = M(() => {
3300
+ const D = new Set(Te(C)), _ = f.filter((B) => D.has(B.id)).map((B) => {
3301
+ var Y;
3189
3302
  return {
3190
- label: E.label,
3191
- text: ((W = E.criticalInformationToAccept) == null ? void 0 : W.trim()) ?? ""
3303
+ label: B.label,
3304
+ text: ((Y = B.criticalInformationToAccept) == null ? void 0 : Y.trim()) ?? ""
3192
3305
  };
3193
- }).filter((E) => E.text.length > 0);
3194
- if (B.length !== 0)
3195
- return B.length === 1 ? B[0].text : B.map((E) => `${E.label}: ${E.text}`).join(`
3306
+ }).filter((B) => B.text.length > 0);
3307
+ if (_.length !== 0)
3308
+ return _.length === 1 ? _[0].text : _.map((B) => `${B.label}: ${B.text}`).join(`
3196
3309
 
3197
3310
  `);
3198
- }, [f, D]), As = M(() => {
3199
- if (Y === "success" || Y === "payment") return null;
3200
- const C = te === "accordion" ? ti : te === "calendar" ? ni : te === "flexible" ? ii : te === "progress" ? ai : ei, B = {
3201
- cascade: R,
3311
+ }, [f, C]), Os = M(() => {
3312
+ if (p === "success" || p === "payment") return null;
3313
+ const D = X === "accordion" ? gi : X === "calendar" ? vi : X === "flexible" ? bi : X === "progress" ? yi : fi, _ = {
3314
+ cascade: L,
3202
3315
  inputs: {
3203
- specialties: Se,
3316
+ specialties: be,
3204
3317
  services: f,
3205
- operators: xe,
3318
+ operators: ye,
3206
3319
  availableDates: g,
3207
- availableSlots: r,
3208
- nextAvailableDate: p
3320
+ availableSlots: o,
3321
+ nextAvailableDate: d
3209
3322
  },
3210
- value: D,
3211
- onChange: O,
3212
- onSubmit: Bt,
3213
- policy: { country: t, lockedOperatorId: a },
3323
+ value: C,
3324
+ onChange: P,
3325
+ onSubmit: V,
3326
+ policy: { country: t, lockedOperatorId: r },
3214
3327
  detailsProps: {
3215
3328
  requireCodiceFiscale: m,
3216
3329
  requireDateOfBirth: S,
3217
- requireInsuranceNumber: y,
3218
- insuranceType: D.insuranceType,
3219
- showNote: N,
3220
- showReturningPatientFlag: _,
3221
- privacyPolicyUrl: I,
3222
- termsUrl: v,
3223
- criticalInformationToAccept: $t,
3224
- payment: U.payment,
3225
- paymentTermsUrl: x,
3226
- paymentBlocked: U.blocked,
3227
- validateCodiceFiscale: d,
3228
- validateInsuranceNumber: T,
3229
- confirmationChannels: F,
3230
- defaultConfirmationChannels: V,
3231
- submitError: re ?? (Y === "error" ? ee("booking.payment.submitFailed") : void 0)
3330
+ requireInsuranceNumber: k,
3331
+ insuranceType: C.insuranceType,
3332
+ showNote: A,
3333
+ showReturningPatientFlag: O,
3334
+ privacyPolicyUrl: N,
3335
+ termsUrl: x,
3336
+ practiceConsent: I,
3337
+ criticalInformationToAccept: qt,
3338
+ payment: K.payment,
3339
+ paymentTermsUrl: w,
3340
+ paymentBlocked: K.blocked,
3341
+ validateCodiceFiscale: h,
3342
+ validateInsuranceNumber: q,
3343
+ confirmationChannels: R,
3344
+ defaultConfirmationChannels: te,
3345
+ submitError: le ?? (p === "error" ? G("booking.payment.submitFailed") : void 0)
3232
3346
  },
3233
- emptyServicesSlot: De,
3234
- onboardingIncompleteSlot: Me,
3235
- loadingDates: Re,
3236
- loadingSlots: se,
3237
- onDateSelect: Ae,
3238
- onWindowChange: ae,
3347
+ emptyServicesSlot: _e,
3348
+ onboardingIncompleteSlot: Be,
3349
+ loadingDates: Oe,
3350
+ loadingSlots: U,
3351
+ onDateSelect: Me,
3352
+ onWindowChange: se,
3239
3353
  datePickerStyle: Z,
3240
- specialtyPickerStyle: ue,
3241
- servicePickerStyle: he,
3242
- operatorPickerStyle: K,
3243
- submitting: H || Y === "submitting",
3244
- locale: Oe,
3245
- activeStep: ne,
3246
- setActiveStep: Ie,
3247
- agentIdBase: G
3354
+ specialtyPickerStyle: de,
3355
+ servicePickerStyle: J,
3356
+ operatorPickerStyle: ie,
3357
+ submitting: W || p === "submitting",
3358
+ locale: pe,
3359
+ activeStep: ae,
3360
+ setActiveStep: me,
3361
+ agentIdBase: H
3248
3362
  };
3249
- return /* @__PURE__ */ s(C, { ...B });
3363
+ return /* @__PURE__ */ s(D, { ..._ });
3250
3364
  }, [
3251
- Y,
3252
- U.payment,
3253
- U.blocked,
3254
- x,
3255
- ee,
3256
- te,
3257
- R,
3258
- Se,
3365
+ p,
3366
+ K.payment,
3367
+ K.blocked,
3368
+ w,
3369
+ G,
3370
+ X,
3371
+ L,
3372
+ be,
3259
3373
  f,
3260
- xe,
3374
+ ye,
3261
3375
  g,
3262
- r,
3263
- p,
3264
- D,
3265
- O,
3266
- Bt,
3376
+ o,
3377
+ d,
3378
+ C,
3379
+ P,
3380
+ V,
3267
3381
  t,
3268
- a,
3382
+ r,
3269
3383
  m,
3270
3384
  S,
3271
- y,
3272
- re,
3385
+ k,
3386
+ le,
3387
+ A,
3388
+ O,
3273
3389
  N,
3274
- _,
3390
+ x,
3275
3391
  I,
3276
- v,
3277
- $t,
3278
- d,
3279
- T,
3280
- F,
3281
- V,
3282
- De,
3392
+ qt,
3393
+ h,
3394
+ q,
3395
+ R,
3396
+ te,
3397
+ _e,
3398
+ Be,
3399
+ Oe,
3400
+ U,
3283
3401
  Me,
3284
- Re,
3285
3402
  se,
3286
- Ae,
3287
- ae,
3288
3403
  Z,
3289
- ue,
3290
- he,
3291
- K,
3292
- H,
3293
- Oe,
3294
- ne,
3295
- G
3404
+ de,
3405
+ J,
3406
+ ie,
3407
+ W,
3408
+ pe,
3409
+ ae,
3410
+ H
3296
3411
  ]);
3297
- return /* @__PURE__ */ b(
3412
+ return /* @__PURE__ */ y(
3298
3413
  "div",
3299
3414
  {
3300
- ref: me,
3415
+ ref: Se,
3301
3416
  role: "region",
3302
- "aria-label": Ns,
3303
- id: G,
3417
+ "aria-label": Ds,
3418
+ id: H,
3304
3419
  "data-component": "booking",
3305
- "data-component-id": G,
3306
- "data-variant": te,
3307
- className: Fn({
3308
- variant: te,
3309
- surface: $e,
3310
- className: pe
3420
+ "data-component-id": H,
3421
+ "data-variant": X,
3422
+ className: Xn({
3423
+ variant: X,
3424
+ surface: Ke,
3425
+ className: ve
3311
3426
  }),
3312
3427
  tabIndex: -1,
3313
- onFocus: (C) => {
3314
- Ye.current = C.target, Te == null || Te(C);
3428
+ onFocus: (D) => {
3429
+ Ee.current = D.target, Ge == null || Ge(D);
3315
3430
  },
3316
- onBlur: (C) => {
3317
- const B = C.target;
3431
+ onBlur: (D) => {
3432
+ const _ = D.target;
3318
3433
  window.setTimeout(() => {
3319
- var W;
3320
- const E = document.activeElement;
3321
- Ye.current === B && B.isConnected && !(E && ((W = me.current) != null && W.contains(E))) && (Ye.current = null);
3322
- }), ve == null || ve(C);
3434
+ var Y;
3435
+ const B = document.activeElement;
3436
+ Ee.current === _ && _.isConnected && !(B && ((Y = Se.current) != null && Y.contains(B))) && (Ee.current = null);
3437
+ }), ze == null || ze(D);
3323
3438
  },
3324
- ...nt,
3439
+ ...it,
3325
3440
  children: [
3326
- /* @__PURE__ */ s("div", { role: "status", className: "ds:sr-only", children: Pe }),
3327
- /* @__PURE__ */ b(
3441
+ /* @__PURE__ */ s("div", { role: "status", className: "ds:sr-only", children: ct }),
3442
+ /* @__PURE__ */ y(
3328
3443
  "div",
3329
3444
  {
3330
3445
  className: [
@@ -3336,23 +3451,23 @@ const di = Zt(
3336
3451
  "ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]"
3337
3452
  ].join(" "),
3338
3453
  children: [
3339
- /* @__PURE__ */ s("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: ee("booking.regionLabel") }),
3340
- /* @__PURE__ */ s("p", { className: "type-body-sm ds:text-[var(--foreground)] ds:m-0", children: ee("booking.headingSubtitle") })
3454
+ /* @__PURE__ */ s("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: G("booking.regionLabel") }),
3455
+ /* @__PURE__ */ s("p", { className: "type-body-sm ds:text-[var(--foreground)] ds:m-0", children: G("booking.headingSubtitle") })
3341
3456
  ]
3342
3457
  }
3343
3458
  ),
3344
- U.cancelled ? /* @__PURE__ */ s(X, { variant: "info", children: /* @__PURE__ */ s(X.Description, { children: ee("booking.payment.cancelled") }) }) : null,
3345
- ws ?? Cs ?? As
3459
+ K.cancelled ? /* @__PURE__ */ s(Q, { variant: "info", children: /* @__PURE__ */ s(Q.Description, { children: G("booking.payment.cancelled") }) }) : null,
3460
+ Ts ?? Ms ?? Os
3346
3461
  ]
3347
3462
  }
3348
3463
  );
3349
3464
  }
3350
3465
  );
3351
- di.displayName = "Booking";
3466
+ xi.displayName = "Booking";
3352
3467
  export {
3353
- di as B,
3354
- Nt as C,
3355
- ye as O,
3356
- In as b
3468
+ xi as B,
3469
+ Tt as C,
3470
+ Ie as O,
3471
+ Dn as b
3357
3472
  };
3358
- //# sourceMappingURL=booking-BF9pVa2n.js.map
3473
+ //# sourceMappingURL=booking-Cdzd8kyY.js.map