@alfadocs/ui-kit 0.30.1 → 0.30.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,43 +1,43 @@
1
1
  import { jsxs as f, jsx as a, Fragment as Z } from "react/jsx-runtime";
2
- import { forwardRef as ze, useId as $e, useState as q, useCallback as te, useRef as de, useEffect as re, useMemo as w, useImperativeHandle as lt } from "react";
3
- import { c as xe } from "./index-D2ZczOXr.js";
4
- import { useTranslation as T, Trans as ct } from "react-i18next";
5
- import { u as mt } from "./registry-C9nwlNyL.js";
2
+ import { forwardRef as qe, useId as He, useState as H, useCallback as ae, useRef as te, useEffect as Q, useMemo as I, useImperativeHandle as pt } from "react";
3
+ import { c as Ie } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as T, Trans as gt } from "react-i18next";
5
+ import { u as ft } from "./registry-C9nwlNyL.js";
6
6
  import { A as F } from "./alert-ywPR59NE.js";
7
- import { B as ae } from "./button-DD_0Xdmr.js";
8
- import { C as Me } from "./checkbox-mwbrPZDY.js";
9
- import { C as ut } from "./checkbox-group-Bwmt1ovQ.js";
10
- import { D as pt } from "./date-picker-D0Ry1dMz.js";
11
- import { E as gt } from "./email-input-DvJ_kPKL.js";
7
+ import { B as se } from "./button-DD_0Xdmr.js";
8
+ import { C as Ae } from "./checkbox-mwbrPZDY.js";
9
+ import { C as ht } from "./checkbox-group-Bwmt1ovQ.js";
10
+ import { D as vt } from "./date-picker-D0Ry1dMz.js";
11
+ import { E as bt } from "./email-input-DvJ_kPKL.js";
12
12
  import { F as Y } from "./form-field-BOm9hK35.js";
13
- import { P as ft } from "./phone-input-DKSHX7NQ.js";
14
- import { T as ht } from "./text-area-D5GAe8pV.js";
15
- import { T as fe } from "./text-input-CakysYnD.js";
16
- import { S as vt } from "./spinner-CCByyvcb.js";
17
- import { I as Pe } from "./icon-button-BRHSSFmZ.js";
18
- import { S as Se } from "./select-C92AT_OZ.js";
19
- import { S as ye } from "./skeleton-CZbwyJAA.js";
20
- import { E as Ke } from "./empty-state-BLy7tigq.js";
21
- import { S as bt } from "./stepper-accordion-BfS6lUB9.js";
22
- import { S as yt } from "./stepper-progress-jFY8BSf7.js";
13
+ import { P as yt } from "./phone-input-DKSHX7NQ.js";
14
+ import { T as kt } from "./text-area-D5GAe8pV.js";
15
+ import { T as be } from "./text-input-CakysYnD.js";
16
+ import { S as xt } from "./spinner-CCByyvcb.js";
17
+ import { I as Re } from "./icon-button-BRHSSFmZ.js";
18
+ import { S as we } from "./select-C92AT_OZ.js";
19
+ import { S as Se } from "./skeleton-CZbwyJAA.js";
20
+ import { E as Ge } from "./empty-state-BLy7tigq.js";
21
+ import { S as St } from "./stepper-accordion-BfS6lUB9.js";
22
+ import { S as Nt } from "./stepper-progress-jFY8BSf7.js";
23
23
  import { p as ee } from "./parseISO-Dk4xa7q6.js";
24
- import { o as je, f as ue, d as kt, h as be, q as he } from "./react-day-picker-D3yzgvDB.js";
25
- import { C as xt } from "./chevron-left-CX1jqD2M.js";
26
- import { C as St } from "./chevron-right-BrpYejk0.js";
27
- import { i as Le } from "./isSameDay-DHG8Xade.js";
28
- import { c as B } from "./createLucideIcon-CrFbzy84.js";
29
- import { M as Nt, S as It } from "./sun-BuXE0xUS.js";
30
- import { S as wt } from "./stethoscope-DT5qCW8Y.js";
31
- import { H as Ct } from "./heart-pulse-CvuyFKHB.js";
32
- import { E as Mt } from "./eye-LHlSU38h.js";
33
- import { S as Dt } from "./sparkles-CuYXqQLg.js";
24
+ import { o as Ue, f as fe, d as It, h as xe, q as ye } from "./react-day-picker-D3yzgvDB.js";
25
+ import { C as wt } from "./chevron-left-CX1jqD2M.js";
26
+ import { C as Ct } from "./chevron-right-BrpYejk0.js";
27
+ import { i as ze } from "./isSameDay-DHG8Xade.js";
28
+ import { c as O } from "./createLucideIcon-CrFbzy84.js";
29
+ import { M as Mt, S as Dt } from "./sun-BuXE0xUS.js";
30
+ import { S as Tt } from "./stethoscope-DT5qCW8Y.js";
31
+ import { H as _t } from "./heart-pulse-CvuyFKHB.js";
32
+ import { E as At } from "./eye-LHlSU38h.js";
33
+ import { S as Bt } from "./sparkles-CuYXqQLg.js";
34
34
  /**
35
35
  * @license lucide-react v1.8.0 - ISC
36
36
  *
37
37
  * This source code is licensed under the ISC license.
38
38
  * See the LICENSE file in the root directory of this source tree.
39
39
  */
40
- const Tt = [
40
+ const Ot = [
41
41
  [
42
42
  "path",
43
43
  {
@@ -45,14 +45,14 @@ const Tt = [
45
45
  key: "169zse"
46
46
  }
47
47
  ]
48
- ], _t = B("activity", Tt);
48
+ ], Et = O("activity", Ot);
49
49
  /**
50
50
  * @license lucide-react v1.8.0 - ISC
51
51
  *
52
52
  * This source code is licensed under the ISC license.
53
53
  * See the LICENSE file in the root directory of this source tree.
54
54
  */
55
- const At = [
55
+ const Pt = [
56
56
  ["path", { d: "M10 16c.5.3 1.2.5 2 .5s1.5-.2 2-.5", key: "1u7htd" }],
57
57
  ["path", { d: "M15 12h.01", key: "1k8ypt" }],
58
58
  [
@@ -63,14 +63,14 @@ const At = [
63
63
  }
64
64
  ],
65
65
  ["path", { d: "M9 12h.01", key: "157uk2" }]
66
- ], Bt = B("baby", At);
66
+ ], Vt = O("baby", Pt);
67
67
  /**
68
68
  * @license lucide-react v1.8.0 - ISC
69
69
  *
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
72
  */
73
- const Ot = [
73
+ const Lt = [
74
74
  [
75
75
  "path",
76
76
  {
@@ -78,14 +78,14 @@ const Ot = [
78
78
  key: "w610uw"
79
79
  }
80
80
  ]
81
- ], Et = B("bone", Ot);
81
+ ], Ft = O("bone", Lt);
82
82
  /**
83
83
  * @license lucide-react v1.8.0 - ISC
84
84
  *
85
85
  * This source code is licensed under the ISC license.
86
86
  * See the LICENSE file in the root directory of this source tree.
87
87
  */
88
- const Pt = [
88
+ const Rt = [
89
89
  ["path", { d: "M12 18V5", key: "adv99a" }],
90
90
  ["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
91
91
  ["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
@@ -94,14 +94,14 @@ const Pt = [
94
94
  ["path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517", key: "1gq6am" }],
95
95
  ["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
96
96
  ["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
97
- ], Lt = B("brain", Pt);
97
+ ], zt = O("brain", Rt);
98
98
  /**
99
99
  * @license lucide-react v1.8.0 - ISC
100
100
  *
101
101
  * This source code is licensed under the ISC license.
102
102
  * See the LICENSE file in the root directory of this source tree.
103
103
  */
104
- const Vt = [
104
+ const $t = [
105
105
  ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
106
106
  ["path", { d: "M16 2v4", key: "4m81vk" }],
107
107
  ["path", { d: "M3 10h18", key: "8toen8" }],
@@ -110,14 +110,14 @@ const Vt = [
110
110
  ["path", { d: "M13 18H7", key: "bb0bb7" }],
111
111
  ["path", { d: "M7 14h.01", key: "1qa3f1" }],
112
112
  ["path", { d: "M17 18h.01", key: "1bdyru" }]
113
- ], Ft = B("calendar-range", Vt);
113
+ ], Kt = O("calendar-range", $t);
114
114
  /**
115
115
  * @license lucide-react v1.8.0 - ISC
116
116
  *
117
117
  * This source code is licensed under the ISC license.
118
118
  * See the LICENSE file in the root directory of this source tree.
119
119
  */
120
- const Rt = [
120
+ const jt = [
121
121
  ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
122
122
  [
123
123
  "path",
@@ -127,89 +127,89 @@ const Rt = [
127
127
  }
128
128
  ],
129
129
  ["path", { d: "m9 14 2 2 4-4", key: "df797q" }]
130
- ], zt = B("clipboard-check", Rt);
130
+ ], qt = O("clipboard-check", jt);
131
131
  /**
132
132
  * @license lucide-react v1.8.0 - ISC
133
133
  *
134
134
  * This source code is licensed under the ISC license.
135
135
  * See the LICENSE file in the root directory of this source tree.
136
136
  */
137
- const $t = [
137
+ const Ht = [
138
138
  ["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" }],
139
139
  ["path", { d: "M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4", key: "1qnva7" }]
140
- ], Kt = B("ear", $t);
140
+ ], Gt = O("ear", Ht);
141
141
  /**
142
142
  * @license lucide-react v1.8.0 - ISC
143
143
  *
144
144
  * This source code is licensed under the ISC license.
145
145
  * See the LICENSE file in the root directory of this source tree.
146
146
  */
147
- const jt = [
147
+ const Ut = [
148
148
  ["path", { d: "M6 18h8", key: "1borvv" }],
149
149
  ["path", { d: "M3 22h18", key: "8prr45" }],
150
150
  ["path", { d: "M14 22a7 7 0 1 0 0-14h-1", key: "1jwaiy" }],
151
151
  ["path", { d: "M9 14h2", key: "197e7h" }],
152
152
  ["path", { d: "M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z", key: "1bmzmy" }],
153
153
  ["path", { d: "M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3", key: "1drr47" }]
154
- ], qt = B("microscope", jt);
154
+ ], Yt = O("microscope", Ut);
155
155
  /**
156
156
  * @license lucide-react v1.8.0 - ISC
157
157
  *
158
158
  * This source code is licensed under the ISC license.
159
159
  * See the LICENSE file in the root directory of this source tree.
160
160
  */
161
- const Ht = [
161
+ const Zt = [
162
162
  [
163
163
  "path",
164
164
  { 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" }
165
165
  ],
166
166
  ["path", { d: "m8.5 8.5 7 7", key: "rvfmvr" }]
167
- ], Gt = B("pill", Ht);
167
+ ], Jt = O("pill", Zt);
168
168
  /**
169
169
  * @license lucide-react v1.8.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 Ut = [
174
+ const Xt = [
175
175
  ["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
176
176
  ["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
177
177
  ["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
178
178
  ["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2", key: "ioqczr" }],
179
179
  ["path", { d: "M7 12h10", key: "b7w52i" }]
180
- ], Yt = B("scan-line", Ut);
180
+ ], Wt = O("scan-line", Xt);
181
181
  /**
182
182
  * @license lucide-react v1.8.0 - ISC
183
183
  *
184
184
  * This source code is licensed under the ISC license.
185
185
  * See the LICENSE file in the root directory of this source tree.
186
186
  */
187
- const Zt = [
187
+ const Qt = [
188
188
  ["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
189
189
  ["path", { d: "M8.12 8.12 12 12", key: "1alkpv" }],
190
190
  ["path", { d: "M20 4 8.12 15.88", key: "xgtan2" }],
191
191
  ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
192
192
  ["path", { d: "M14.8 14.8 20 20", key: "ptml3r" }]
193
- ], Jt = B("scissors", Zt);
193
+ ], ea = O("scissors", Qt);
194
194
  /**
195
195
  * @license lucide-react v1.8.0 - ISC
196
196
  *
197
197
  * This source code is licensed under the ISC license.
198
198
  * See the LICENSE file in the root directory of this source tree.
199
199
  */
200
- const Xt = [
200
+ const ta = [
201
201
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
202
202
  ["path", { d: "M8 14s1.5 2 4 2 4-2 4-2", key: "1y1vjs" }],
203
203
  ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
204
204
  ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
205
- ], Wt = B("smile", Xt);
205
+ ], aa = O("smile", ta);
206
206
  /**
207
207
  * @license lucide-react v1.8.0 - ISC
208
208
  *
209
209
  * This source code is licensed under the ISC license.
210
210
  * See the LICENSE file in the root directory of this source tree.
211
211
  */
212
- const Qt = [
212
+ const sa = [
213
213
  ["path", { d: "M12 10V2", key: "16sf7g" }],
214
214
  ["path", { d: "m4.93 10.93 1.41 1.41", key: "2a7f42" }],
215
215
  ["path", { d: "M2 18h2", key: "j10viu" }],
@@ -218,25 +218,25 @@ const Qt = [
218
218
  ["path", { d: "M22 22H2", key: "19qnx5" }],
219
219
  ["path", { d: "m16 6-4 4-4-4", key: "6wukr" }],
220
220
  ["path", { d: "M16 18a4 4 0 0 0-8 0", key: "1lzouq" }]
221
- ], ea = B("sunset", Qt);
221
+ ], na = O("sunset", sa);
222
222
  /**
223
223
  * @license lucide-react v1.8.0 - ISC
224
224
  *
225
225
  * This source code is licensed under the ISC license.
226
226
  * See the LICENSE file in the root directory of this source tree.
227
227
  */
228
- const ta = [
228
+ const ia = [
229
229
  ["path", { d: "m18 2 4 4", key: "22kx64" }],
230
230
  ["path", { d: "m17 7 3-3", key: "1w1zoj" }],
231
231
  ["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" }],
232
232
  ["path", { d: "m9 11 4 4", key: "rovt3i" }],
233
233
  ["path", { d: "m5 19-3 3", key: "59f2uf" }],
234
234
  ["path", { d: "m14 4 6 6", key: "yqp9t2" }]
235
- ], Ve = B("syringe", ta);
236
- function aa(e, t, s) {
237
- return je(e, -1, s);
235
+ ], $e = O("syringe", ia);
236
+ function oa(e, t, s) {
237
+ return Ue(e, -1, s);
238
238
  }
239
- const sa = {
239
+ const ra = {
240
240
  id: "booking",
241
241
  capabilities: ["navigate", "view_change"],
242
242
  state: {
@@ -278,12 +278,12 @@ const sa = {
278
278
  description: "Sourced from the id prop."
279
279
  }
280
280
  }
281
- }, Te = [
281
+ }, Oe = [
282
282
  "email",
283
283
  "whatsapp",
284
284
  "sms"
285
- ], pe = "all", na = "de";
286
- function ia(e) {
285
+ ], he = "all", da = "de";
286
+ function la(e) {
287
287
  return [...e.lockedOperatorId ? e.specialties.filter(
288
288
  (s) => {
289
289
  var n;
@@ -294,7 +294,7 @@ function ia(e) {
294
294
  return i - o;
295
295
  });
296
296
  }
297
- function oa(e) {
297
+ function ca(e) {
298
298
  let t = e.services;
299
299
  return e.lockedOperatorId && (t = t.filter(
300
300
  (s) => {
@@ -303,7 +303,7 @@ function oa(e) {
303
303
  }
304
304
  )), e.useSpecialties && e.value.specialtyId && (t = t.filter((s) => s.specialtyId === e.value.specialtyId)), t;
305
305
  }
306
- function ra(e) {
306
+ function ma(e) {
307
307
  if (e.useSpecialties && e.value.specialtyId) {
308
308
  const t = e.value.specialtyId;
309
309
  return e.operators.filter(
@@ -324,8 +324,8 @@ function ra(e) {
324
324
  }
325
325
  return [];
326
326
  }
327
- function da(e, t) {
328
- const s = e.country === na, n = !s || e.value.insuranceType !== void 0, i = !!e.useSpecialties && n, l = !i || e.value.specialtyId !== void 0, c = !l || e.value.serviceId !== void 0, d = t.operators, p = !!e.allowOperatorSelection && c && e.value.serviceId !== void 0 && !e.lockedOperatorId && d.length > 1, g = c && e.value.serviceId !== void 0, k = (!g || e.value.date !== void 0) && e.value.date !== void 0, x = (!k || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, y = !!e.value.serviceId && d.length === 0;
327
+ function ua(e, t) {
328
+ const s = e.country === da, n = !s || e.value.insuranceType !== void 0, i = !!e.useSpecialties && n, l = !i || e.value.specialtyId !== void 0, c = !l || e.value.serviceId !== void 0, d = t.operators, p = !!e.allowOperatorSelection && c && e.value.serviceId !== void 0 && !e.lockedOperatorId && d.length > 1, g = c && e.value.serviceId !== void 0, k = (!g || e.value.date !== void 0) && e.value.date !== void 0, x = (!k || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, y = !!e.value.serviceId && d.length === 0;
329
329
  return {
330
330
  insurance: s,
331
331
  specialty: i,
@@ -337,7 +337,7 @@ function da(e, t) {
337
337
  onboardingIncomplete: y
338
338
  };
339
339
  }
340
- function la(e, t) {
340
+ function pa(e, t) {
341
341
  const s = [];
342
342
  t.insurance && s.push(1), t.specialty && s.push(2), s.push(3), t.operator && s.push(4), s.push(5), s.push(6), s.push(7);
343
343
  const n = {
@@ -355,12 +355,12 @@ function la(e, t) {
355
355
  visibleSteps: s
356
356
  };
357
357
  }
358
- function ca(e) {
358
+ function ga(e) {
359
359
  const t = {
360
- specialties: ia(e),
361
- services: oa(e),
362
- operators: ra(e)
363
- }, s = da(e, t), { currentStep: n, visibleSteps: i } = la(e, s);
360
+ specialties: la(e),
361
+ services: ca(e),
362
+ operators: ma(e)
363
+ }, s = ua(e, t), { currentStep: n, visibleSteps: i } = pa(e, s);
364
364
  let o;
365
365
  if (e.value.date && e.value.slotKey) {
366
366
  const d = e.availableSlots[e.value.date];
@@ -378,7 +378,7 @@ function ca(e) {
378
378
  selectedSlot: o
379
379
  };
380
380
  }
381
- function qe(e, t) {
381
+ function Ye(e, t) {
382
382
  return {
383
383
  ...e,
384
384
  insuranceType: t,
@@ -390,7 +390,7 @@ function qe(e, t) {
390
390
  details: void 0
391
391
  };
392
392
  }
393
- function He(e, t) {
393
+ function Ze(e, t) {
394
394
  return {
395
395
  ...e,
396
396
  specialtyId: t,
@@ -401,20 +401,20 @@ function He(e, t) {
401
401
  details: void 0
402
402
  };
403
403
  }
404
- function Ge(e, t) {
404
+ function Je(e, t) {
405
405
  return {
406
406
  ...e,
407
407
  serviceId: t,
408
408
  // Default the operator to the "All operators" sentinel so a patient
409
409
  // who doesn't care about picking lands on a satisfied step 4 without
410
410
  // any further input.
411
- operatorId: t ? pe : void 0,
411
+ operatorId: t ? he : void 0,
412
412
  date: void 0,
413
413
  slotKey: void 0,
414
414
  details: void 0
415
415
  };
416
416
  }
417
- function Ue(e, t) {
417
+ function Xe(e, t) {
418
418
  return {
419
419
  ...e,
420
420
  operatorId: t,
@@ -423,7 +423,7 @@ function Ue(e, t) {
423
423
  details: void 0
424
424
  };
425
425
  }
426
- function ke(e, t) {
426
+ function Ne(e, t) {
427
427
  return {
428
428
  ...e,
429
429
  date: t,
@@ -432,47 +432,47 @@ function ke(e, t) {
432
432
  // since the user has already filled some fields.
433
433
  };
434
434
  }
435
- function Ye(e, t) {
435
+ function We(e, t) {
436
436
  return {
437
437
  ...e,
438
438
  slotKey: t
439
439
  };
440
440
  }
441
- function ma(e, t) {
441
+ function fa(e, t) {
442
442
  let s = e;
443
443
  if (t.lockedOperatorId && s.operatorId !== t.lockedOperatorId && (s = { ...s, operatorId: t.lockedOperatorId }), t.useSpecialties && t.specialties.length === 1 && s.specialtyId === void 0 && (s = { ...s, specialtyId: t.specialties[0].id }), t.autoSelectSingleService) {
444
444
  const n = s.specialtyId ? t.services.filter((i) => i.specialtyId === s.specialtyId) : t.services;
445
- n.length === 1 && s.serviceId === void 0 && (s = { ...s, serviceId: n[0].id }, s.operatorId === void 0 && (s = { ...s, operatorId: pe }));
445
+ n.length === 1 && s.serviceId === void 0 && (s = { ...s, serviceId: n[0].id }, s.operatorId === void 0 && (s = { ...s, operatorId: he }));
446
446
  }
447
447
  return s;
448
448
  }
449
- function _e(e) {
450
- if (e.operatorId && e.operatorId !== pe)
449
+ function Ee(e) {
450
+ if (e.operatorId && e.operatorId !== he)
451
451
  return e.operatorId;
452
452
  }
453
- function ua(e) {
453
+ function ha(e) {
454
454
  if (!e) return !1;
455
455
  const t = e.trim();
456
456
  return /^\+?\d[\d\s\-()]{6,}$/.test(t);
457
457
  }
458
- function Ze(e) {
458
+ function Qe(e) {
459
459
  const t = e && e.length > 0 ? e : ["email"], s = new Set(t);
460
- return Te.filter((n) => s.has(n));
460
+ return Oe.filter((n) => s.has(n));
461
461
  }
462
- function pa(e, t, s) {
463
- const n = Ze(e), i = new Set(n);
462
+ function va(e, t, s) {
463
+ const n = Qe(e), i = new Set(n);
464
464
  if (s)
465
- return Te.filter(
465
+ return Oe.filter(
466
466
  (p) => s.includes(p) && i.has(p)
467
467
  );
468
468
  const o = [];
469
469
  i.has("email") && o.push("email");
470
- const l = ua(t), c = i.has("whatsapp");
470
+ const l = ha(t), c = i.has("whatsapp");
471
471
  c && l && o.push("whatsapp"), !c && i.has("sms") && o.push("sms");
472
472
  const d = new Set(o);
473
- return Te.filter((p) => d.has(p));
473
+ return Oe.filter((p) => d.has(p));
474
474
  }
475
- const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 300, ve = { state: "idle" }, Ae = ze(
475
+ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 300, ke = { state: "idle" }, Pe = qe(
476
476
  ({
477
477
  value: e,
478
478
  onChange: t,
@@ -491,61 +491,61 @@ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 3
491
491
  summarySlot: x,
492
492
  defaultPhoneCountry: y,
493
493
  confirmationChannels: C,
494
- defaultConfirmationChannels: _,
494
+ defaultConfirmationChannels: A,
495
495
  submitError: S
496
496
  }, v) => {
497
- var U, me;
498
- const { t: r } = T(), O = $e(), [M, b] = q(ve), [N, R] = q(ve), [E, J] = q({}), P = te(
499
- (m) => J((I) => ({ ...I, [m]: !0 })),
497
+ var _, me;
498
+ const { t: r } = T(), E = He(), [M, b] = H(ke), [N, R] = H(ke), [B, J] = H({}), P = ae(
499
+ (m) => J((w) => ({ ...w, [m]: !0 })),
500
500
  []
501
- ), z = de(null), H = de(
501
+ ), z = te(null), G = te(
502
502
  null
503
503
  );
504
- re(
504
+ Q(
505
505
  () => () => {
506
- z.current && clearTimeout(z.current), H.current && clearTimeout(H.current);
506
+ z.current && clearTimeout(z.current), G.current && clearTimeout(G.current);
507
507
  },
508
508
  []
509
509
  );
510
- const D = te(
510
+ const D = ae(
511
511
  (m) => t({ ...e, ...m }),
512
512
  [e, t]
513
- ), X = w(
514
- () => Ze(C),
513
+ ), ne = I(
514
+ () => Qe(C),
515
515
  [C]
516
- ), G = X.length >= 2, se = de(!1);
517
- re(() => {
518
- if (!G) {
516
+ ), j = ne.length >= 2, oe = te(!1);
517
+ Q(() => {
518
+ if (!j) {
519
519
  e.confirmationChannels !== void 0 && D({ confirmationChannels: void 0 });
520
520
  return;
521
521
  }
522
522
  if (e.confirmationChannels !== void 0) {
523
- se.current = !0;
523
+ oe.current = !0;
524
524
  return;
525
525
  }
526
- const m = pa(
527
- X,
526
+ const m = va(
527
+ ne,
528
528
  e.mobilePhone,
529
- _
529
+ A
530
530
  );
531
- se.current = !0, D({ confirmationChannels: m });
531
+ oe.current = !0, D({ confirmationChannels: m });
532
532
  }, [
533
- G,
534
- X,
533
+ j,
534
+ ne,
535
535
  e.mobilePhone,
536
- _
536
+ A
537
537
  ]);
538
- const ne = w(
538
+ const ie = I(
539
539
  () => e.confirmationChannels ?? [],
540
540
  [e.confirmationChannels]
541
- ), Ne = G && ne.length === 0;
542
- re(() => {
541
+ ), re = j && ie.length === 0;
542
+ Q(() => {
543
543
  const m = e.codiceFiscale;
544
544
  if (!n || !u || !m) {
545
- b(ve);
545
+ b(ke);
546
546
  return;
547
547
  }
548
- if (!ga.test(m)) {
548
+ if (!ba.test(m)) {
549
549
  b({
550
550
  state: "invalid",
551
551
  hint: r("booking.details.codiceFiscale.invalidFormat")
@@ -554,8 +554,8 @@ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 3
554
554
  }
555
555
  b({ state: "pending" }), z.current && clearTimeout(z.current), z.current = setTimeout(() => {
556
556
  u(m).then(
557
- (I) => b(
558
- I.valid ? { state: "valid" } : { state: "invalid", hint: I.hint }
557
+ (w) => b(
558
+ w.valid ? { state: "valid" } : { state: "invalid", hint: w.hint }
559
559
  )
560
560
  ).catch(
561
561
  () => b({
@@ -563,19 +563,19 @@ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 3
563
563
  hint: r("booking.details.codiceFiscale.unavailable")
564
564
  })
565
565
  );
566
- }, Re);
566
+ }, je);
567
567
  }, [n, u, e.codiceFiscale, r]);
568
- const W = o && l === "public";
569
- re(() => {
568
+ const X = o && l === "public";
569
+ Q(() => {
570
570
  const m = e.insuranceNumber;
571
- if (!W || !k || !m) {
572
- R(ve);
571
+ if (!X || !k || !m) {
572
+ R(ke);
573
573
  return;
574
574
  }
575
- R({ state: "pending" }), H.current && clearTimeout(H.current), H.current = setTimeout(() => {
575
+ R({ state: "pending" }), G.current && clearTimeout(G.current), G.current = setTimeout(() => {
576
576
  k(m).then(
577
- (I) => R(
578
- I.valid ? { state: "valid" } : { state: "invalid", hint: I.hint }
577
+ (w) => R(
578
+ w.valid ? { state: "valid" } : { state: "invalid", hint: w.hint }
579
579
  )
580
580
  ).catch(
581
581
  () => R({
@@ -583,29 +583,29 @@ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 3
583
583
  hint: r("booking.details.insuranceNumber.unavailable")
584
584
  })
585
585
  );
586
- }, Re);
587
- }, [W, k, e.insuranceNumber, r]);
588
- const Q = w(
589
- () => !!(e.email && fa.test(e.email)),
586
+ }, je);
587
+ }, [X, k, e.insuranceNumber, r]);
588
+ const de = I(
589
+ () => !!(e.email && ya.test(e.email)),
590
590
  [e.email]
591
- ), le = w(
591
+ ), le = I(
592
592
  () => !!(e.mobilePhone && e.mobilePhone.length >= 6),
593
593
  [e.mobilePhone]
594
- ), L = w(() => {
595
- var m, I;
596
- return !(!((m = e.firstName) != null && m.trim()) || !((I = e.lastName) != null && I.trim()) || !Q || !le || n && M.state !== "valid" || i && !e.dateOfBirth || W && N.state !== "valid");
594
+ ), ce = I(() => {
595
+ var m, w;
596
+ return !(!((m = e.firstName) != null && m.trim()) || !((w = e.lastName) != null && w.trim()) || !de || !le || n && M.state !== "valid" || i && !e.dateOfBirth || X && N.state !== "valid");
597
597
  }, [
598
598
  e.firstName,
599
599
  e.lastName,
600
- Q,
600
+ de,
601
601
  le,
602
602
  n,
603
603
  M.state,
604
604
  i,
605
605
  e.dateOfBirth,
606
- W,
606
+ X,
607
607
  N.state
608
- ]), ie = !!(e.privacyConsent && e.termsConsent), $ = !G || ne.length > 0, j = L && ie && $ && !h, A = (m) => {
608
+ ]), Ce = !!(e.privacyConsent && e.termsConsent), V = !j || ie.length > 0, W = ce && Ce && V && !h, $ = (m) => {
609
609
  if (m.preventDefault(), J({
610
610
  firstName: !0,
611
611
  lastName: !0,
@@ -614,8 +614,8 @@ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 3
614
614
  codiceFiscale: !0,
615
615
  dateOfBirth: !0,
616
616
  insuranceNumber: !0
617
- }), !j) return;
618
- const I = {
617
+ }), !W) return;
618
+ const w = {
619
619
  firstName: e.firstName.trim(),
620
620
  lastName: e.lastName.trim(),
621
621
  email: e.email.trim(),
@@ -630,13 +630,13 @@ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 3
630
630
  // Only include when the picker was visible; otherwise the single
631
631
  // implicit channel is inferred backend-side from the practice
632
632
  // config.
633
- confirmationChannels: G ? ne : void 0
633
+ confirmationChannels: j ? ie : void 0
634
634
  };
635
- s(I);
636
- }, ce = (m, I) => {
637
- const oe = I && /^https?:\/\//i.test(I) ? I : void 0;
638
- return oe ? /* @__PURE__ */ a(
639
- ct,
635
+ s(w);
636
+ }, q = (m, w) => {
637
+ const U = w && /^https?:\/\//i.test(w) ? w : void 0;
638
+ return U ? /* @__PURE__ */ a(
639
+ gt,
640
640
  {
641
641
  i18nKey: m,
642
642
  components: {
@@ -650,7 +650,7 @@ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 3
650
650
  /* @__PURE__ */ a(
651
651
  "a",
652
652
  {
653
- href: oe,
653
+ href: U,
654
654
  target: "_blank",
655
655
  rel: "noopener noreferrer",
656
656
  className: "ds:underline ds:text-[var(--primary)]"
@@ -665,9 +665,9 @@ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 3
665
665
  "form",
666
666
  {
667
667
  ref: v,
668
- id: O,
668
+ id: E,
669
669
  noValidate: !0,
670
- onSubmit: A,
670
+ onSubmit: $,
671
671
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
672
672
  children: [
673
673
  x,
@@ -677,9 +677,9 @@ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 3
677
677
  {
678
678
  label: r("booking.details.firstName.label"),
679
679
  required: !0,
680
- error: E.firstName && !((U = e.firstName) != null && U.trim()) ? r("booking.details.firstName.required") : void 0,
680
+ error: B.firstName && !((_ = e.firstName) != null && _.trim()) ? r("booking.details.firstName.required") : void 0,
681
681
  children: /* @__PURE__ */ a(
682
- fe,
682
+ be,
683
683
  {
684
684
  autoComplete: "given-name",
685
685
  value: e.firstName ?? "",
@@ -694,9 +694,9 @@ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 3
694
694
  {
695
695
  label: r("booking.details.lastName.label"),
696
696
  required: !0,
697
- error: E.lastName && !((me = e.lastName) != null && me.trim()) ? r("booking.details.lastName.required") : void 0,
697
+ error: B.lastName && !((me = e.lastName) != null && me.trim()) ? r("booking.details.lastName.required") : void 0,
698
698
  children: /* @__PURE__ */ a(
699
- fe,
699
+ be,
700
700
  {
701
701
  autoComplete: "family-name",
702
702
  value: e.lastName ?? "",
@@ -713,9 +713,9 @@ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 3
713
713
  {
714
714
  label: r("booking.details.email.label"),
715
715
  required: !0,
716
- error: E.email && !Q ? r("booking.details.email.invalid") : void 0,
716
+ error: B.email && !de ? r("booking.details.email.invalid") : void 0,
717
717
  children: /* @__PURE__ */ a(
718
- gt,
718
+ bt,
719
719
  {
720
720
  value: e.email ?? "",
721
721
  onChange: (m) => D({ email: m.target.value }),
@@ -729,9 +729,9 @@ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 3
729
729
  {
730
730
  label: r("booking.details.mobilePhone.label"),
731
731
  required: !0,
732
- error: E.mobilePhone && !le ? r("booking.details.mobilePhone.invalid") : void 0,
732
+ error: B.mobilePhone && !le ? r("booking.details.mobilePhone.invalid") : void 0,
733
733
  children: /* @__PURE__ */ a(
734
- ft,
734
+ yt,
735
735
  {
736
736
  value: e.mobilePhone ?? "",
737
737
  defaultCountry: y == null ? void 0 : y.toUpperCase(),
@@ -750,9 +750,9 @@ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 3
750
750
  label: r("booking.details.codiceFiscale.label"),
751
751
  required: !0,
752
752
  description: M.state === "pending" ? r("booking.details.codiceFiscale.checking") : r("booking.details.codiceFiscale.helper"),
753
- error: E.codiceFiscale && M.state === "invalid" ? M.hint ?? r("booking.details.codiceFiscale.invalid") : void 0,
753
+ error: B.codiceFiscale && M.state === "invalid" ? M.hint ?? r("booking.details.codiceFiscale.invalid") : void 0,
754
754
  children: /* @__PURE__ */ a(
755
- fe,
755
+ be,
756
756
  {
757
757
  value: e.codiceFiscale ?? "",
758
758
  maxLength: 16,
@@ -769,9 +769,9 @@ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 3
769
769
  {
770
770
  label: r("booking.details.dateOfBirth.label"),
771
771
  required: !0,
772
- error: E.dateOfBirth && !e.dateOfBirth ? r("booking.details.dateOfBirth.required") : void 0,
772
+ error: B.dateOfBirth && !e.dateOfBirth ? r("booking.details.dateOfBirth.required") : void 0,
773
773
  children: /* @__PURE__ */ a(
774
- pt,
774
+ vt,
775
775
  {
776
776
  value: e.dateOfBirth ? new Date(e.dateOfBirth) : void 0,
777
777
  onChange: (m) => {
@@ -784,15 +784,15 @@ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 3
784
784
  }
785
785
  ) : null
786
786
  ] }) : null,
787
- W ? /* @__PURE__ */ a(
787
+ X ? /* @__PURE__ */ a(
788
788
  Y,
789
789
  {
790
790
  label: r("booking.details.insuranceNumber.label"),
791
791
  required: !0,
792
792
  description: N.state === "pending" ? r("booking.details.insuranceNumber.checking") : void 0,
793
- error: E.insuranceNumber && N.state === "invalid" ? N.hint ?? r("booking.details.insuranceNumber.invalid") : void 0,
793
+ error: B.insuranceNumber && N.state === "invalid" ? N.hint ?? r("booking.details.insuranceNumber.invalid") : void 0,
794
794
  children: /* @__PURE__ */ a(
795
- fe,
795
+ be,
796
796
  {
797
797
  value: e.insuranceNumber ?? "",
798
798
  onChange: (m) => D({ insuranceNumber: m.target.value }),
@@ -806,13 +806,13 @@ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 3
806
806
  {
807
807
  label: r("booking.details.note.label"),
808
808
  description: r("booking.details.note.helper", {
809
- max: Fe
809
+ max: Ke
810
810
  }),
811
811
  children: /* @__PURE__ */ a(
812
- ht,
812
+ kt,
813
813
  {
814
814
  value: e.note ?? "",
815
- maxLength: Fe,
815
+ maxLength: Ke,
816
816
  rows: 3,
817
817
  onChange: (m) => D({ note: m.target.value })
818
818
  }
@@ -820,7 +820,7 @@ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 3
820
820
  }
821
821
  ) : null,
822
822
  d ? /* @__PURE__ */ a(
823
- Me,
823
+ Ae,
824
824
  {
825
825
  checked: !!e.returningPatient,
826
826
  onCheckedChange: (m) => D({ returningPatient: m === !0 }),
@@ -829,12 +829,12 @@ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 3
829
829
  ) : null,
830
830
  /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
831
831
  /* @__PURE__ */ a(
832
- Me,
832
+ Ae,
833
833
  {
834
834
  checked: !!e.privacyConsent,
835
835
  onCheckedChange: (m) => D({ privacyConsent: m === !0 }),
836
836
  label: /* @__PURE__ */ f(Z, { children: [
837
- ce(
837
+ q(
838
838
  "booking.details.consent.privacy.label",
839
839
  p
840
840
  ),
@@ -850,12 +850,12 @@ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 3
850
850
  }
851
851
  ),
852
852
  /* @__PURE__ */ a(
853
- Me,
853
+ Ae,
854
854
  {
855
855
  checked: !!e.termsConsent,
856
856
  onCheckedChange: (m) => D({ termsConsent: m === !0 }),
857
857
  label: /* @__PURE__ */ f(Z, { children: [
858
- ce(
858
+ q(
859
859
  "booking.details.consent.terms.label",
860
860
  g
861
861
  ),
@@ -871,39 +871,39 @@ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 3
871
871
  }
872
872
  )
873
873
  ] }),
874
- G ? /* @__PURE__ */ a(
874
+ j ? /* @__PURE__ */ a(
875
875
  "div",
876
876
  {
877
877
  "data-component": "booking-confirmation-channels",
878
878
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
879
879
  children: /* @__PURE__ */ a(
880
- ut,
880
+ ht,
881
881
  {
882
882
  label: r("booking.confirmation.heading"),
883
883
  helperText: r("booking.confirmation.helper"),
884
- value: ne,
884
+ value: ie,
885
885
  onChange: (m) => D({
886
886
  confirmationChannels: m
887
887
  }),
888
888
  orientation: "vertical",
889
- options: X.map((m) => ({
889
+ options: ne.map((m) => ({
890
890
  value: m,
891
891
  label: r(`booking.confirmation.channel.${m}`)
892
892
  })),
893
- error: Ne ? r("booking.confirmation.atLeastOne") : void 0
893
+ error: re ? r("booking.confirmation.atLeastOne") : void 0
894
894
  }
895
895
  )
896
896
  }
897
897
  ) : null,
898
898
  S ? /* @__PURE__ */ a(F, { variant: "error", children: /* @__PURE__ */ a(F.Description, { children: S }) }) : null,
899
899
  /* @__PURE__ */ a(
900
- ae,
900
+ se,
901
901
  {
902
902
  intent: "primary",
903
903
  size: "md",
904
904
  type: "submit",
905
- disabled: !j,
906
- startIcon: h ? /* @__PURE__ */ a(vt, { size: "sm" }) : void 0,
905
+ disabled: !W,
906
+ startIcon: h ? /* @__PURE__ */ a(xt, { size: "sm" }) : void 0,
907
907
  children: r("booking.details.submit")
908
908
  }
909
909
  )
@@ -912,8 +912,8 @@ const Fe = 500, ga = /^[A-Z0-9]{16}$/, fa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Re = 3
912
912
  );
913
913
  }
914
914
  );
915
- Ae.displayName = "BookingDetailsForm";
916
- const ha = xe(
915
+ Pe.displayName = "BookingDetailsForm";
916
+ const ka = Ie(
917
917
  "ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)]",
918
918
  {
919
919
  variants: {
@@ -923,44 +923,58 @@ const ha = xe(
923
923
  calendar: "ds:gap-[var(--spacing-md)]",
924
924
  flexible: "ds:gap-[var(--spacing-lg)]",
925
925
  progress: "ds:gap-[var(--spacing-sm)]"
926
+ },
927
+ // `surface="elevated"` matches `Card variant="elevated"` — same
928
+ // tokens, same padding, same boundary behaviour — so consumers can
929
+ // drop their own Card wraps without a double-card look. Default
930
+ // `'flat'` preserves 0.30.x rendering.
931
+ surface: {
932
+ flat: "",
933
+ elevated: [
934
+ "ds:rounded-[var(--radius-lg)]",
935
+ "ds:bg-[var(--card)] ds:text-[var(--card-foreground)]",
936
+ "ds:border ds:border-[color:var(--card-border)]",
937
+ "ds:shadow-[var(--shadow-card)]",
938
+ "ds:p-[var(--spacing-md)]"
939
+ ].join(" ")
926
940
  }
927
941
  },
928
- defaultVariants: { variant: "inline-list" }
942
+ defaultVariants: { variant: "inline-list", surface: "flat" }
929
943
  }
930
- ), va = [
944
+ ), xa = [
931
945
  [
932
946
  /\b(estetic|aesthetic|botox|filler|mesoterap|chirurgia\s*plastic)/i,
933
- Ve
947
+ $e
934
948
  ],
935
- [/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i, Ct],
936
- [/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i, Wt],
937
- [/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i, Mt],
938
- [/\b(otorin|udito|orecchi|hearing|ear)/i, Kt],
939
- [/\b(neuro|brain|cervello)/i, Lt],
940
- [/\b(pediatr|child|bambin)/i, Bt],
941
- [/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, Et],
942
- [/\b(lab|analis|test|sang|esami)/i, qt],
943
- [/\b(farmaco|pharm|pillol|refill)/i, Gt],
944
- [/\b(chirurg|surg|intervent|operat)/i, Jt],
945
- [/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, Yt],
946
- [/\b(vacc|inject|inie|punto)/i, Ve],
947
- [/\b(derma|skin|pelle)/i, Dt],
948
- [/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, zt],
949
- [/\b(general|medicin|family|control|check[-\s]?up)/i, _t]
949
+ [/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i, _t],
950
+ [/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i, aa],
951
+ [/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i, At],
952
+ [/\b(otorin|udito|orecchi|hearing|ear)/i, Gt],
953
+ [/\b(neuro|brain|cervello)/i, zt],
954
+ [/\b(pediatr|child|bambin)/i, Vt],
955
+ [/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, Ft],
956
+ [/\b(lab|analis|test|sang|esami)/i, Yt],
957
+ [/\b(farmaco|pharm|pillol|refill)/i, Jt],
958
+ [/\b(chirurg|surg|intervent|operat)/i, ea],
959
+ [/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, Wt],
960
+ [/\b(vacc|inject|inie|punto)/i, $e],
961
+ [/\b(derma|skin|pelle)/i, Bt],
962
+ [/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, qt],
963
+ [/\b(general|medicin|family|control|check[-\s]?up)/i, Et]
950
964
  ];
951
- function ba(e) {
952
- for (const [t, s] of va)
965
+ function Sa(e) {
966
+ for (const [t, s] of xa)
953
967
  if (t.test(e)) return s;
954
968
  return null;
955
969
  }
956
- function ya(e) {
957
- const t = ba(e.label) ?? wt;
970
+ function Na(e) {
971
+ const t = Sa(e.label) ?? Tt;
958
972
  return /* @__PURE__ */ a(t, { "aria-hidden": "true", className: "ds:size-5" });
959
973
  }
960
- function De(e) {
961
- return be(e, "yyyy-MM-dd");
974
+ function Be(e) {
975
+ return xe(e, "yyyy-MM-dd");
962
976
  }
963
- const ka = [
977
+ const Ia = [
964
978
  "ds:relative ds:flex ds:items-center ds:justify-center",
965
979
  "ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
966
980
  "ds:rounded-[var(--radius-sm)]",
@@ -970,7 +984,7 @@ const ka = [
970
984
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
971
985
  "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
972
986
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
973
- ].join(" "), xa = xe(ka, {
987
+ ].join(" "), wa = Ie(Ia, {
974
988
  variants: {
975
989
  state: {
976
990
  available: "ds:cursor-pointer ds:text-[var(--foreground)] ds:hover:bg-[var(--muted)]/30",
@@ -981,20 +995,20 @@ const ka = [
981
995
  },
982
996
  defaultVariants: { state: "unavailable" }
983
997
  });
984
- function Je({
998
+ function et({
985
999
  availableDates: e,
986
1000
  selectedDate: t,
987
1001
  onSelectDate: s,
988
1002
  locale: n,
989
1003
  loading: i
990
1004
  }) {
991
- const { t: o } = T(), l = w(() => t ? ue(ee(t)) : e.length > 0 ? ue(ee(e[0])) : ue(/* @__PURE__ */ new Date()), [t, e]), [c, d] = q(l), [p, g] = q(null), u = w(() => {
992
- const S = ue(c), v = kt(c), r = S.getDay(), O = v.getDate(), M = [];
1005
+ const { t: o } = T(), l = I(() => t ? fe(ee(t)) : e.length > 0 ? fe(ee(e[0])) : fe(/* @__PURE__ */ new Date()), [t, e]), [c, d] = H(l), [p, g] = H(null), u = I(() => {
1006
+ const S = fe(c), v = It(c), r = S.getDay(), E = v.getDate(), M = [];
993
1007
  for (let b = r; b > 0; b -= 1) {
994
1008
  const N = new Date(S);
995
1009
  N.setDate(S.getDate() - b), M.push(N);
996
1010
  }
997
- for (let b = 0; b < O; b += 1) {
1011
+ for (let b = 0; b < E; b += 1) {
998
1012
  const N = new Date(S);
999
1013
  N.setDate(S.getDate() + b), M.push(N);
1000
1014
  }
@@ -1003,37 +1017,37 @@ function Je({
1003
1017
  N.setDate(b.getDate() + 1), M.push(N);
1004
1018
  }
1005
1019
  return M;
1006
- }, [c]), k = w(() => {
1020
+ }, [c]), k = I(() => {
1007
1021
  try {
1008
1022
  return new Intl.DateTimeFormat(n, {
1009
1023
  month: "long",
1010
1024
  year: "numeric"
1011
1025
  }).format(c);
1012
1026
  } catch {
1013
- return be(c, "MMMM yyyy");
1027
+ return xe(c, "MMMM yyyy");
1014
1028
  }
1015
- }, [c, n]), h = w(() => {
1029
+ }, [c, n]), h = I(() => {
1016
1030
  const S = new Date(2024, 0, 7);
1017
1031
  return Array.from({ length: 7 }, (v, r) => {
1018
- const O = new Date(S);
1019
- O.setDate(S.getDate() + r);
1032
+ const E = new Date(S);
1033
+ E.setDate(S.getDate() + r);
1020
1034
  try {
1021
- return new Intl.DateTimeFormat(n, { weekday: "short" }).format(O);
1035
+ return new Intl.DateTimeFormat(n, { weekday: "short" }).format(E);
1022
1036
  } catch {
1023
- return be(O, "EEE");
1037
+ return xe(E, "EEE");
1024
1038
  }
1025
1039
  });
1026
- }, [n]), x = w(() => new Set(e), [e]), y = te(
1027
- (S) => x.has(De(S)),
1040
+ }, [n]), x = I(() => new Set(e), [e]), y = ae(
1041
+ (S) => x.has(Be(S)),
1028
1042
  [x]
1029
- ), C = w(() => {
1043
+ ), C = I(() => {
1030
1044
  if (p) return p;
1031
1045
  if (t) return ee(t);
1032
1046
  const S = u.find(
1033
- (v) => he(v, c) && y(v)
1047
+ (v) => ye(v, c) && y(v)
1034
1048
  );
1035
- return S || (u.find((v) => he(v, c)) ?? null);
1036
- }, [p, t, u, c, y]), _ = te(
1049
+ return S || (u.find((v) => ye(v, c)) ?? null);
1050
+ }, [p, t, u, c, y]), A = ae(
1037
1051
  (S, v) => {
1038
1052
  let r = null;
1039
1053
  switch (S.key) {
@@ -1057,13 +1071,13 @@ function Je({
1057
1071
  break;
1058
1072
  case "Enter":
1059
1073
  case " ": {
1060
- S.preventDefault(), y(v) && s(De(v));
1074
+ S.preventDefault(), y(v) && s(Be(v));
1061
1075
  return;
1062
1076
  }
1063
1077
  default:
1064
1078
  return;
1065
1079
  }
1066
- r && (S.preventDefault(), he(r, c) || d(ue(r)), g(r));
1080
+ r && (S.preventDefault(), ye(r, c) || d(fe(r)), g(r));
1067
1081
  },
1068
1082
  [y, s, c]
1069
1083
  );
@@ -1075,22 +1089,22 @@ function Je({
1075
1089
  "aria-label": o("common.loading"),
1076
1090
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
1077
1091
  children: [
1078
- /* @__PURE__ */ a(ye, { variant: "text", width: "40%" }),
1079
- /* @__PURE__ */ a("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (S, v) => /* @__PURE__ */ a(ye, { variant: "rounded", height: "2.5rem" }, `mg-skel-${v}`)) })
1092
+ /* @__PURE__ */ a(Se, { variant: "text", width: "40%" }),
1093
+ /* @__PURE__ */ a("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (S, v) => /* @__PURE__ */ a(Se, { variant: "rounded", height: "2.5rem" }, `mg-skel-${v}`)) })
1080
1094
  ]
1081
1095
  }
1082
1096
  ) : /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1083
1097
  /* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1084
1098
  /* @__PURE__ */ a(
1085
- Pe,
1099
+ Re,
1086
1100
  {
1087
- icon: /* @__PURE__ */ a(xt, {}),
1101
+ icon: /* @__PURE__ */ a(wt, {}),
1088
1102
  "aria-label": o("booking.previousMonth"),
1089
1103
  size: "sm",
1090
1104
  intent: "ghost",
1091
1105
  flipIconInRtl: !0,
1092
1106
  onClick: () => {
1093
- d((S) => aa(S)), g(null);
1107
+ d((S) => oa(S)), g(null);
1094
1108
  }
1095
1109
  }
1096
1110
  ),
@@ -1103,15 +1117,15 @@ function Je({
1103
1117
  }
1104
1118
  ),
1105
1119
  /* @__PURE__ */ a(
1106
- Pe,
1120
+ Re,
1107
1121
  {
1108
- icon: /* @__PURE__ */ a(St, {}),
1122
+ icon: /* @__PURE__ */ a(Ct, {}),
1109
1123
  "aria-label": o("booking.nextMonth"),
1110
1124
  size: "sm",
1111
1125
  intent: "ghost",
1112
1126
  flipIconInRtl: !0,
1113
1127
  onClick: () => {
1114
- d((S) => je(S, 1)), g(null);
1128
+ d((S) => Ue(S, 1)), g(null);
1115
1129
  }
1116
1130
  }
1117
1131
  )
@@ -1144,14 +1158,14 @@ function Je({
1144
1158
  {
1145
1159
  role: "row",
1146
1160
  className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
1147
- children: u.slice(v * 7, v * 7 + 7).map((r, O) => {
1148
- const M = v * 7 + O, b = he(r, c), N = b && y(r), R = t ? Le(r, ee(t)) : !1, E = b ? R ? "selected" : N ? "available" : "unavailable" : "outside", J = C ? Le(C, r) : !1, P = (() => {
1161
+ children: u.slice(v * 7, v * 7 + 7).map((r, E) => {
1162
+ const M = v * 7 + E, b = ye(r, c), N = b && y(r), R = t ? ze(r, ee(t)) : !1, B = b ? R ? "selected" : N ? "available" : "unavailable" : "outside", J = C ? ze(C, r) : !1, P = (() => {
1149
1163
  try {
1150
1164
  return new Intl.DateTimeFormat(n, {
1151
1165
  dateStyle: "full"
1152
1166
  }).format(r);
1153
1167
  } catch {
1154
- return be(r, "PPP");
1168
+ return xe(r, "PPP");
1155
1169
  }
1156
1170
  })();
1157
1171
  return /* @__PURE__ */ a(
@@ -1165,10 +1179,10 @@ function Je({
1165
1179
  tabIndex: J ? 0 : -1,
1166
1180
  disabled: !N,
1167
1181
  onClick: () => {
1168
- N && s(De(r));
1182
+ N && s(Be(r));
1169
1183
  },
1170
- onKeyDown: (z) => _(z, r),
1171
- className: xa({ state: E }),
1184
+ onKeyDown: (z) => A(z, r),
1185
+ className: wa({ state: B }),
1172
1186
  children: /* @__PURE__ */ a("span", { "aria-hidden": "true", children: r.getDate() })
1173
1187
  },
1174
1188
  `mg-cell-${M}`
@@ -1182,7 +1196,7 @@ function Je({
1182
1196
  )
1183
1197
  ] });
1184
1198
  }
1185
- const Sa = xe(
1199
+ const Ca = Ie(
1186
1200
  [
1187
1201
  "ds:relative ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-md)]",
1188
1202
  "ds:min-h-[var(--min-target-size)]",
@@ -1208,21 +1222,21 @@ const Sa = xe(
1208
1222
  defaultVariants: { state: "idle" }
1209
1223
  }
1210
1224
  );
1211
- function Na({
1225
+ function Ma({
1212
1226
  services: e,
1213
1227
  selectedServiceId: t,
1214
1228
  onSelect: s
1215
1229
  }) {
1216
- const { t: n } = T(), i = $e(), [o, l] = q(() => {
1230
+ const { t: n } = T(), i = He(), [o, l] = H(() => {
1217
1231
  if (t) {
1218
1232
  const g = e.findIndex((u) => u.id === t);
1219
1233
  if (g >= 0) return g;
1220
1234
  }
1221
1235
  return 0;
1222
- }), c = de(/* @__PURE__ */ new Map()), d = te((g) => {
1236
+ }), c = te(/* @__PURE__ */ new Map()), d = ae((g) => {
1223
1237
  var u;
1224
1238
  (u = c.current.get(g)) == null || u.focus();
1225
- }, []), p = te(
1239
+ }, []), p = ae(
1226
1240
  (g, u, k) => {
1227
1241
  const h = e.length;
1228
1242
  if (h !== 0)
@@ -1271,7 +1285,7 @@ function Na({
1271
1285
  const k = t === g.id, h = o === u, x = n("booking.serviceCardLabel", {
1272
1286
  label: g.label,
1273
1287
  duration: g.durationMin
1274
- }), y = ya(g);
1288
+ }), y = Na(g);
1275
1289
  return /* @__PURE__ */ f(
1276
1290
  "button",
1277
1291
  {
@@ -1286,7 +1300,7 @@ function Na({
1286
1300
  onClick: () => s(g.id),
1287
1301
  onFocus: () => l(u),
1288
1302
  onKeyDown: (C) => p(C, u, g.id),
1289
- className: Sa({
1303
+ className: Ca({
1290
1304
  state: k ? "selected" : "idle"
1291
1305
  }),
1292
1306
  children: [
@@ -1310,7 +1324,7 @@ function Na({
1310
1324
  }
1311
1325
  );
1312
1326
  }
1313
- const Ia = xe(
1327
+ const Da = Ie(
1314
1328
  [
1315
1329
  "ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-2xs)]",
1316
1330
  "ds:min-h-[var(--min-target-size)]",
@@ -1336,16 +1350,16 @@ const Ia = xe(
1336
1350
  defaultVariants: { state: "idle" }
1337
1351
  }
1338
1352
  );
1339
- function wa(e) {
1353
+ function Ta(e) {
1340
1354
  const [t] = e.split(":").map((n) => parseInt(n, 10)), s = Number.isFinite(t) ? t : 0;
1341
1355
  return s < 12 ? "morning" : s < 17 ? "afternoon" : "evening";
1342
1356
  }
1343
- const Ca = {
1344
- morning: It,
1345
- afternoon: ea,
1346
- evening: Nt
1357
+ const _a = {
1358
+ morning: Dt,
1359
+ afternoon: na,
1360
+ evening: Mt
1347
1361
  };
1348
- function Xe({
1362
+ function tt({
1349
1363
  date: e,
1350
1364
  slots: t,
1351
1365
  selectedSlotKey: s,
@@ -1353,7 +1367,7 @@ function Xe({
1353
1367
  loading: i,
1354
1368
  locale: o
1355
1369
  }) {
1356
- const { t: l } = T(), c = w(() => {
1370
+ const { t: l } = T(), c = I(() => {
1357
1371
  try {
1358
1372
  return new Intl.DateTimeFormat(o, {
1359
1373
  weekday: "long",
@@ -1363,31 +1377,31 @@ function Xe({
1363
1377
  } catch {
1364
1378
  return e;
1365
1379
  }
1366
- }, [e, o]), d = w(() => {
1380
+ }, [e, o]), d = I(() => {
1367
1381
  const u = {
1368
1382
  morning: [],
1369
1383
  afternoon: [],
1370
1384
  evening: []
1371
1385
  };
1372
1386
  for (const k of t)
1373
- u[wa(k.time)].push(k);
1387
+ u[Ta(k.time)].push(k);
1374
1388
  return u;
1375
1389
  }, [t]), p = t.filter((u) => u.available).length, g = ["morning", "afternoon", "evening"];
1376
1390
  return i ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1377
- /* @__PURE__ */ a(ye, { variant: "text", width: "60%" }),
1391
+ /* @__PURE__ */ a(Se, { variant: "text", width: "60%" }),
1378
1392
  [0, 1].map((u) => /* @__PURE__ */ a(
1379
1393
  "div",
1380
1394
  {
1381
1395
  className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)]",
1382
- children: [0, 1, 2].map((k) => /* @__PURE__ */ a(ye, { variant: "rounded", height: "44px" }, k))
1396
+ children: [0, 1, 2].map((k) => /* @__PURE__ */ a(Se, { variant: "rounded", height: "44px" }, k))
1383
1397
  },
1384
1398
  u
1385
1399
  ))
1386
- ] }) : p === 0 ? /* @__PURE__ */ a(Ke, { variant: "no-results", title: l("booking.noSlotsForDate") }) : /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1400
+ ] }) : p === 0 ? /* @__PURE__ */ a(Ge, { variant: "no-results", title: l("booking.noSlotsForDate") }) : /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1387
1401
  /* @__PURE__ */ f("div", { className: "ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1388
1402
  /* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
1389
1403
  /* @__PURE__ */ a(
1390
- Ft,
1404
+ Kt,
1391
1405
  {
1392
1406
  "aria-hidden": "true",
1393
1407
  className: "ds:size-4 ds:text-[color:var(--accent)]"
@@ -1400,7 +1414,7 @@ function Xe({
1400
1414
  g.map((u) => {
1401
1415
  const k = d[u];
1402
1416
  if (k.length === 0) return null;
1403
- const h = Ca[u];
1417
+ const h = _a[u];
1404
1418
  return /* @__PURE__ */ f(
1405
1419
  "div",
1406
1420
  {
@@ -1429,7 +1443,7 @@ function Xe({
1429
1443
  time: x.time
1430
1444
  }),
1431
1445
  onClick: () => x.available && n(x),
1432
- className: Ia({ state: C }),
1446
+ className: Da({ state: C }),
1433
1447
  children: x.time
1434
1448
  },
1435
1449
  x.key
@@ -1444,7 +1458,7 @@ function Xe({
1444
1458
  })
1445
1459
  ] });
1446
1460
  }
1447
- function We({ value: e, onChange: t }) {
1461
+ function at({ value: e, onChange: t }) {
1448
1462
  const { t: s } = T(), n = [
1449
1463
  { value: "private", label: s("booking.insurance.private") },
1450
1464
  { value: "public", label: s("booking.insurance.public") }
@@ -1452,7 +1466,7 @@ function We({ value: e, onChange: t }) {
1452
1466
  return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1453
1467
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: s("booking.insurance.heading") }),
1454
1468
  /* @__PURE__ */ a(
1455
- Se,
1469
+ we,
1456
1470
  {
1457
1471
  options: n,
1458
1472
  value: e ?? "",
@@ -1465,7 +1479,7 @@ function We({ value: e, onChange: t }) {
1465
1479
  )
1466
1480
  ] });
1467
1481
  }
1468
- function Qe({ specialties: e, value: t, onChange: s }) {
1482
+ function st({ specialties: e, value: t, onChange: s }) {
1469
1483
  const { t: n } = T(), i = e.map((o) => ({
1470
1484
  value: o.id,
1471
1485
  label: o.label
@@ -1473,7 +1487,7 @@ function Qe({ specialties: e, value: t, onChange: s }) {
1473
1487
  return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1474
1488
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: n("booking.specialty.heading") }),
1475
1489
  /* @__PURE__ */ a(
1476
- Se,
1490
+ we,
1477
1491
  {
1478
1492
  options: i,
1479
1493
  value: t ?? "",
@@ -1484,7 +1498,7 @@ function Qe({ specialties: e, value: t, onChange: s }) {
1484
1498
  )
1485
1499
  ] });
1486
1500
  }
1487
- function et({ services: e, value: t, onChange: s, compact: n }) {
1501
+ function nt({ services: e, value: t, onChange: s, compact: n }) {
1488
1502
  const { t: i } = T();
1489
1503
  if (n) {
1490
1504
  const o = e.map((l) => ({
@@ -1496,7 +1510,7 @@ function et({ services: e, value: t, onChange: s, compact: n }) {
1496
1510
  return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1497
1511
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: i("booking.service.heading") }),
1498
1512
  /* @__PURE__ */ a(
1499
- Se,
1513
+ we,
1500
1514
  {
1501
1515
  options: o,
1502
1516
  value: t ?? "",
@@ -1510,7 +1524,7 @@ function et({ services: e, value: t, onChange: s, compact: n }) {
1510
1524
  return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1511
1525
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: i("booking.service.heading") }),
1512
1526
  /* @__PURE__ */ a(
1513
- Na,
1527
+ Ma,
1514
1528
  {
1515
1529
  services: e,
1516
1530
  selectedServiceId: t,
@@ -1519,18 +1533,18 @@ function et({ services: e, value: t, onChange: s, compact: n }) {
1519
1533
  )
1520
1534
  ] });
1521
1535
  }
1522
- function tt({ operators: e, value: t, onChange: s }) {
1536
+ function it({ operators: e, value: t, onChange: s }) {
1523
1537
  const { t: n } = T(), i = [
1524
- { value: pe, label: n("booking.operator.all") },
1538
+ { value: he, label: n("booking.operator.all") },
1525
1539
  ...e.map((o) => ({ value: o.id, label: o.name }))
1526
1540
  ];
1527
1541
  return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1528
1542
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: n("booking.operator.heading") }),
1529
1543
  /* @__PURE__ */ a(
1530
- Se,
1544
+ we,
1531
1545
  {
1532
1546
  options: i,
1533
- value: t ?? pe,
1547
+ value: t ?? he,
1534
1548
  onValueChange: (o) => s(o),
1535
1549
  placeholder: n("booking.operator.placeholder"),
1536
1550
  "aria-label": n("booking.operator.heading")
@@ -1538,7 +1552,7 @@ function tt({ operators: e, value: t, onChange: s }) {
1538
1552
  )
1539
1553
  ] });
1540
1554
  }
1541
- function at({
1555
+ function ot({
1542
1556
  customSlot: e
1543
1557
  }) {
1544
1558
  const { t } = T();
@@ -1547,12 +1561,12 @@ function at({
1547
1561
  /* @__PURE__ */ a(F.Description, { children: t("booking.onboardingIncomplete.description") })
1548
1562
  ] });
1549
1563
  }
1550
- function st({
1564
+ function rt({
1551
1565
  nextAvailableDate: e,
1552
1566
  onJump: t,
1553
1567
  locale: s
1554
1568
  }) {
1555
- const { t: n } = T(), i = w(() => {
1569
+ const { t: n } = T(), i = I(() => {
1556
1570
  try {
1557
1571
  return new Intl.DateTimeFormat(s, { dateStyle: "long" }).format(
1558
1572
  ee(e)
@@ -1563,10 +1577,10 @@ function st({
1563
1577
  }, [e, s]);
1564
1578
  return /* @__PURE__ */ f(F, { variant: "info", children: [
1565
1579
  /* @__PURE__ */ a(F.Description, { children: n("booking.nextAvailable.description", { date: i }) }),
1566
- /* @__PURE__ */ a(F.Action, { children: /* @__PURE__ */ a(ae, { intent: "secondary", size: "sm", onClick: t, children: n("booking.nextAvailable.cta") }) })
1580
+ /* @__PURE__ */ a(F.Action, { children: /* @__PURE__ */ a(se, { intent: "secondary", size: "sm", onClick: t, children: n("booking.nextAvailable.cta") }) })
1567
1581
  ] });
1568
1582
  }
1569
- function Ma({
1583
+ function Aa({
1570
1584
  snapshot: e,
1571
1585
  operators: t,
1572
1586
  specialties: s,
@@ -1578,10 +1592,10 @@ function Ma({
1578
1592
  onModify: d
1579
1593
  }) {
1580
1594
  const { t: p } = T(), u = (e.details.confirmationChannels ?? ["email"]).map(
1581
- (_) => p(`booking.confirmation.channel.${_}`)
1595
+ (A) => p(`booking.confirmation.channel.${A}`)
1582
1596
  ), k = o === "demo" ? p("booking.success.descriptionDemo") : u.length > 1 ? p("booking.success.descriptionMultiple", {
1583
1597
  channels: u.join(" · ")
1584
- }) : p("booking.success.descriptionSingle", { channel: u[0] }), h = w(() => {
1598
+ }) : p("booking.success.descriptionSingle", { channel: u[0] }), h = I(() => {
1585
1599
  if (e.date)
1586
1600
  try {
1587
1601
  return new Intl.DateTimeFormat(i, {
@@ -1592,7 +1606,7 @@ function Ma({
1592
1606
  } catch {
1593
1607
  return e.date;
1594
1608
  }
1595
- }, [e.date, i]), x = e.operatorId ? t.find((_) => _.id === e.operatorId) : void 0, y = e.specialtyId ? s.find((_) => _.id === e.specialtyId) : void 0, C = e.serviceId ? n.find((_) => _.id === e.serviceId) : void 0;
1609
+ }, [e.date, i]), x = e.operatorId ? t.find((A) => A.id === e.operatorId) : void 0, y = e.specialtyId ? s.find((A) => A.id === e.specialtyId) : void 0, C = e.serviceId ? n.find((A) => A.id === e.serviceId) : void 0;
1596
1610
  return /* @__PURE__ */ f(
1597
1611
  "div",
1598
1612
  {
@@ -1624,17 +1638,17 @@ function Ma({
1624
1638
  ] }) : null
1625
1639
  ] }) }),
1626
1640
  /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
1627
- /* @__PURE__ */ a(ae, { intent: "secondary", size: "md", onClick: c, children: p("booking.success.bookAnother") }),
1628
- l ? /* @__PURE__ */ a(ae, { intent: "ghost", size: "md", onClick: d, children: p("booking.success.modifyBooking") }) : null
1641
+ /* @__PURE__ */ a(se, { intent: "secondary", size: "md", onClick: c, children: p("booking.success.bookAnother") }),
1642
+ l ? /* @__PURE__ */ a(se, { intent: "ghost", size: "md", onClick: d, children: p("booking.success.modifyBooking") }) : null
1629
1643
  ] })
1630
1644
  ]
1631
1645
  }
1632
1646
  );
1633
1647
  }
1634
- function nt({ customSlot: e }) {
1648
+ function dt({ customSlot: e }) {
1635
1649
  const { t } = T();
1636
1650
  return e ? /* @__PURE__ */ a(Z, { children: e }) : /* @__PURE__ */ a(
1637
- Ke,
1651
+ Ge,
1638
1652
  {
1639
1653
  variant: "no-results",
1640
1654
  title: t("booking.emptyServices.title"),
@@ -1642,7 +1656,7 @@ function nt({ customSlot: e }) {
1642
1656
  }
1643
1657
  );
1644
1658
  }
1645
- function Da(e) {
1659
+ function Ba(e) {
1646
1660
  const {
1647
1661
  cascade: t,
1648
1662
  inputs: s,
@@ -1658,52 +1672,52 @@ function Da(e) {
1658
1672
  } = e, { t: k } = T();
1659
1673
  return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1660
1674
  t.gates.insurance ? /* @__PURE__ */ a(
1661
- We,
1675
+ at,
1662
1676
  {
1663
1677
  value: n.insuranceType,
1664
- onChange: (h) => i(qe(n, h))
1678
+ onChange: (h) => i(Ye(n, h))
1665
1679
  }
1666
1680
  ) : null,
1667
1681
  t.gates.specialty ? /* @__PURE__ */ a(
1668
- Qe,
1682
+ st,
1669
1683
  {
1670
1684
  specialties: t.filtered.specialties,
1671
1685
  value: n.specialtyId,
1672
- onChange: (h) => i(He(n, h))
1686
+ onChange: (h) => i(Ze(n, h))
1673
1687
  }
1674
1688
  ) : null,
1675
- t.gates.service ? t.filtered.services.length === 0 ? /* @__PURE__ */ a(nt, { customSlot: l }) : /* @__PURE__ */ a(
1676
- et,
1689
+ t.gates.service ? t.filtered.services.length === 0 ? /* @__PURE__ */ a(dt, { customSlot: l }) : /* @__PURE__ */ a(
1690
+ nt,
1677
1691
  {
1678
1692
  services: t.filtered.services,
1679
1693
  value: n.serviceId,
1680
- onChange: (h) => i(Ge(n, h))
1694
+ onChange: (h) => i(Je(n, h))
1681
1695
  }
1682
1696
  ) : null,
1683
- t.gates.onboardingIncomplete ? /* @__PURE__ */ a(at, { customSlot: c }) : null,
1697
+ t.gates.onboardingIncomplete ? /* @__PURE__ */ a(ot, { customSlot: c }) : null,
1684
1698
  t.gates.operator ? /* @__PURE__ */ a(
1685
- tt,
1699
+ it,
1686
1700
  {
1687
1701
  operators: t.filtered.operators,
1688
1702
  value: n.operatorId,
1689
- onChange: (h) => i(Ue(n, h))
1703
+ onChange: (h) => i(Xe(n, h))
1690
1704
  }
1691
1705
  ) : null,
1692
1706
  t.gates.date ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1693
1707
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: k("booking.date.heading") }),
1694
1708
  s.availableDates.length === 0 && s.nextAvailableDate ? /* @__PURE__ */ a(
1695
- st,
1709
+ rt,
1696
1710
  {
1697
1711
  nextAvailableDate: s.nextAvailableDate,
1698
- onJump: () => i(ke(n, s.nextAvailableDate)),
1712
+ onJump: () => i(Ne(n, s.nextAvailableDate)),
1699
1713
  locale: g
1700
1714
  }
1701
1715
  ) : /* @__PURE__ */ a(
1702
- Je,
1716
+ et,
1703
1717
  {
1704
1718
  availableDates: s.availableDates,
1705
1719
  selectedDate: n.date,
1706
- onSelectDate: (h) => i(ke(n, h)),
1720
+ onSelectDate: (h) => i(Ne(n, h)),
1707
1721
  locale: g,
1708
1722
  loading: d
1709
1723
  }
@@ -1712,19 +1726,19 @@ function Da(e) {
1712
1726
  t.gates.slot && n.date ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1713
1727
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: k("booking.slot.heading") }),
1714
1728
  /* @__PURE__ */ a(
1715
- Xe,
1729
+ tt,
1716
1730
  {
1717
1731
  date: n.date,
1718
1732
  slots: s.availableSlots[n.date] ?? [],
1719
1733
  selectedSlotKey: n.slotKey,
1720
- onSelect: (h) => i(Ye(n, h.key)),
1734
+ onSelect: (h) => i(We(n, h.key)),
1721
1735
  loading: d,
1722
1736
  locale: g
1723
1737
  }
1724
1738
  )
1725
1739
  ] }) : null,
1726
1740
  t.gates.details && t.selectedSlot ? /* @__PURE__ */ a(
1727
- Ae,
1741
+ Pe,
1728
1742
  {
1729
1743
  ...u,
1730
1744
  value: n.details ?? {},
@@ -1754,73 +1768,73 @@ function K(e, t, s = {}) {
1754
1768
  switch (e) {
1755
1769
  case 1:
1756
1770
  return /* @__PURE__ */ a(
1757
- We,
1771
+ at,
1758
1772
  {
1759
1773
  value: o.insuranceType,
1760
- onChange: (y) => l(qe(o, y))
1774
+ onChange: (y) => l(Ye(o, y))
1761
1775
  }
1762
1776
  );
1763
1777
  case 2:
1764
1778
  return /* @__PURE__ */ a(
1765
- Qe,
1779
+ st,
1766
1780
  {
1767
1781
  specialties: n.filtered.specialties,
1768
1782
  value: o.specialtyId,
1769
- onChange: (y) => l(He(o, y))
1783
+ onChange: (y) => l(Ze(o, y))
1770
1784
  }
1771
1785
  );
1772
1786
  case 3:
1773
- return n.filtered.services.length === 0 ? /* @__PURE__ */ a(nt, { customSlot: d }) : n.gates.onboardingIncomplete ? /* @__PURE__ */ a(at, { customSlot: p }) : /* @__PURE__ */ a(
1774
- et,
1787
+ return n.filtered.services.length === 0 ? /* @__PURE__ */ a(dt, { customSlot: d }) : n.gates.onboardingIncomplete ? /* @__PURE__ */ a(ot, { customSlot: p }) : /* @__PURE__ */ a(
1788
+ nt,
1775
1789
  {
1776
1790
  services: n.filtered.services,
1777
1791
  value: o.serviceId,
1778
- onChange: (y) => l(Ge(o, y)),
1792
+ onChange: (y) => l(Je(o, y)),
1779
1793
  compact: s.compactService
1780
1794
  }
1781
1795
  );
1782
1796
  case 4:
1783
1797
  return /* @__PURE__ */ a(
1784
- tt,
1798
+ it,
1785
1799
  {
1786
1800
  operators: n.filtered.operators,
1787
1801
  value: o.operatorId,
1788
- onChange: (y) => l(Ue(o, y))
1802
+ onChange: (y) => l(Xe(o, y))
1789
1803
  }
1790
1804
  );
1791
1805
  case 5:
1792
1806
  return i.availableDates.length === 0 && i.nextAvailableDate ? /* @__PURE__ */ a(
1793
- st,
1807
+ rt,
1794
1808
  {
1795
1809
  nextAvailableDate: i.nextAvailableDate,
1796
- onJump: () => l(ke(o, i.nextAvailableDate)),
1810
+ onJump: () => l(Ne(o, i.nextAvailableDate)),
1797
1811
  locale: k
1798
1812
  }
1799
1813
  ) : /* @__PURE__ */ a(
1800
- Je,
1814
+ et,
1801
1815
  {
1802
1816
  availableDates: i.availableDates,
1803
1817
  selectedDate: o.date,
1804
- onSelectDate: (y) => l(ke(o, y)),
1818
+ onSelectDate: (y) => l(Ne(o, y)),
1805
1819
  locale: k,
1806
1820
  loading: g
1807
1821
  }
1808
1822
  );
1809
1823
  case 6:
1810
1824
  return o.date ? /* @__PURE__ */ a(
1811
- Xe,
1825
+ tt,
1812
1826
  {
1813
1827
  date: o.date,
1814
1828
  slots: i.availableSlots[o.date] ?? [],
1815
1829
  selectedSlotKey: o.slotKey,
1816
- onSelect: (y) => l(Ye(o, y.key)),
1830
+ onSelect: (y) => l(We(o, y.key)),
1817
1831
  loading: g,
1818
1832
  locale: k
1819
1833
  }
1820
1834
  ) : null;
1821
1835
  case 7:
1822
1836
  return n.selectedSlot ? /* @__PURE__ */ a(
1823
- Ae,
1837
+ Pe,
1824
1838
  {
1825
1839
  ...h,
1826
1840
  value: o.details ?? {},
@@ -1835,9 +1849,9 @@ function K(e, t, s = {}) {
1835
1849
  return null;
1836
1850
  }
1837
1851
  }
1838
- function Be() {
1852
+ function Ve() {
1839
1853
  const { t: e } = T();
1840
- return w(
1854
+ return I(
1841
1855
  () => ({
1842
1856
  1: e("booking.insurance.heading"),
1843
1857
  2: e("booking.specialty.heading"),
@@ -1850,18 +1864,18 @@ function Be() {
1850
1864
  [e]
1851
1865
  );
1852
1866
  }
1853
- function Ta(e) {
1854
- const { cascade: t, value: s, activeStep: n, setActiveStep: i } = e, o = Be(), l = w(
1867
+ function Oa(e) {
1868
+ const { cascade: t, value: s, activeStep: n, setActiveStep: i } = e, o = Ve(), l = I(
1855
1869
  () => t.visibleSteps.map((d) => ({
1856
1870
  label: o[d],
1857
- summary: it(d, s, t),
1858
- status: ge(d, s) && d < t.currentStep ? "completed" : void 0,
1871
+ summary: lt(d, s, t),
1872
+ status: ve(d, s) && d < t.currentStep ? "completed" : void 0,
1859
1873
  content: K(d, e, { compactService: !0 })
1860
1874
  })),
1861
1875
  [t, s, o, e]
1862
1876
  ), c = Math.max(0, t.visibleSteps.indexOf(n));
1863
1877
  return /* @__PURE__ */ a(
1864
- bt,
1878
+ St,
1865
1879
  {
1866
1880
  activeStep: c,
1867
1881
  steps: l,
@@ -1872,7 +1886,7 @@ function Ta(e) {
1872
1886
  }
1873
1887
  );
1874
1888
  }
1875
- function ge(e, t) {
1889
+ function ve(e, t) {
1876
1890
  switch (e) {
1877
1891
  case 1:
1878
1892
  return t.insuranceType !== void 0;
@@ -1890,9 +1904,9 @@ function ge(e, t) {
1890
1904
  return !1;
1891
1905
  }
1892
1906
  }
1893
- function it(e, t, s) {
1907
+ function lt(e, t, s) {
1894
1908
  var n;
1895
- if (ge(e, t))
1909
+ if (ve(e, t))
1896
1910
  switch (e) {
1897
1911
  case 1:
1898
1912
  return t.insuranceType;
@@ -1909,7 +1923,7 @@ function it(e, t, s) {
1909
1923
  return i == null ? void 0 : i.label;
1910
1924
  }
1911
1925
  case 4: {
1912
- const i = _e(t);
1926
+ const i = Ee(t);
1913
1927
  if (!i) return;
1914
1928
  const o = s.filtered.operators.find((l) => l.id === i);
1915
1929
  return o == null ? void 0 : o.name;
@@ -1922,23 +1936,23 @@ function it(e, t, s) {
1922
1936
  return;
1923
1937
  }
1924
1938
  }
1925
- function _a(e) {
1926
- const { cascade: t, value: s, setActiveStep: n } = e, { t: i } = T(), o = Be(), l = t.visibleSteps.filter(
1939
+ function Ea(e) {
1940
+ const { cascade: t, value: s, setActiveStep: n } = e, { t: i } = T(), o = Ve(), l = t.visibleSteps.filter(
1927
1941
  (d) => d === 1 || d === 2 || d === 3 || d === 4
1928
1942
  ), c = l.some(
1929
- (d) => !ge(d, s)
1943
+ (d) => !ve(d, s)
1930
1944
  );
1931
1945
  return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1932
- c ? l.filter((d) => !ge(d, s)).slice(0, 1).map((d) => /* @__PURE__ */ a("div", { children: K(d, e, { compactService: !0 }) }, `csf-${d}`)) : /* @__PURE__ */ a(
1946
+ c ? l.filter((d) => !ve(d, s)).slice(0, 1).map((d) => /* @__PURE__ */ a("div", { children: K(d, e, { compactService: !0 }) }, `csf-${d}`)) : /* @__PURE__ */ a(
1933
1947
  "div",
1934
1948
  {
1935
1949
  role: "group",
1936
1950
  "aria-label": i("booking.regionLabel"),
1937
1951
  className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
1938
1952
  children: l.map((d) => {
1939
- const p = it(d, s, t);
1953
+ const p = lt(d, s, t);
1940
1954
  return p ? /* @__PURE__ */ f(
1941
- ae,
1955
+ se,
1942
1956
  {
1943
1957
  intent: "tonal",
1944
1958
  size: "sm",
@@ -1961,7 +1975,7 @@ function _a(e) {
1961
1975
  t.gates.details ? /* @__PURE__ */ a("div", { children: K(7, e) }) : null
1962
1976
  ] });
1963
1977
  }
1964
- function Aa(e) {
1978
+ function Pa(e) {
1965
1979
  const { cascade: t } = e, s = t.visibleSteps.filter(
1966
1980
  (n) => n === 1 || n === 2 || n === 3 || n === 4
1967
1981
  );
@@ -1976,17 +1990,17 @@ function Aa(e) {
1976
1990
  t.gates.details ? K(7, e) : null
1977
1991
  ] });
1978
1992
  }
1979
- function Ba(e) {
1980
- const { cascade: t, value: s, activeStep: n, setActiveStep: i } = e, { t: o } = T(), l = Be(), c = t.visibleSteps, d = Math.max(0, c.indexOf(n)), p = c.length, g = w(
1993
+ function Va(e) {
1994
+ const { cascade: t, value: s, activeStep: n, setActiveStep: i } = e, { t: o } = T(), l = Ve(), c = t.visibleSteps, d = Math.max(0, c.indexOf(n)), p = c.length, g = I(
1981
1995
  () => c.map((h) => ({ label: l[h] })),
1982
1996
  [c, l]
1983
- ), u = d > 0, k = d < p - 1 && ge(n, s);
1997
+ ), u = d > 0, k = d < p - 1 && ve(n, s);
1984
1998
  return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1985
- /* @__PURE__ */ a(yt, { activeStep: d, steps: g }),
1999
+ /* @__PURE__ */ a(Nt, { activeStep: d, steps: g }),
1986
2000
  /* @__PURE__ */ a("div", { children: K(n, e, { compactService: !0 }) }),
1987
2001
  /* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1988
2002
  /* @__PURE__ */ a(
1989
- ae,
2003
+ se,
1990
2004
  {
1991
2005
  intent: "ghost",
1992
2006
  size: "md",
@@ -1999,7 +2013,7 @@ function Ba(e) {
1999
2013
  }
2000
2014
  ),
2001
2015
  n < 7 ? /* @__PURE__ */ a(
2002
- ae,
2016
+ se,
2003
2017
  {
2004
2018
  intent: "primary",
2005
2019
  size: "md",
@@ -2014,7 +2028,7 @@ function Ba(e) {
2014
2028
  ] })
2015
2029
  ] });
2016
2030
  }
2017
- const Oa = [], Ea = [], Pa = ze(
2031
+ const La = [], Fa = [], Ra = qe(
2018
2032
  ({
2019
2033
  variant: e = "inline-list",
2020
2034
  country: t,
@@ -2033,37 +2047,39 @@ const Oa = [], Ea = [], Pa = ze(
2033
2047
  requireInsuranceNumber: x,
2034
2048
  showNote: y,
2035
2049
  showReturningPatientFlag: C,
2036
- privacyPolicyUrl: _,
2050
+ privacyPolicyUrl: A,
2037
2051
  termsUrl: S,
2038
2052
  validateCodiceFiscale: v,
2039
2053
  validateInsuranceNumber: r,
2040
- confirmationChannels: O,
2054
+ confirmationChannels: E,
2041
2055
  defaultConfirmationChannels: M,
2042
2056
  value: b,
2043
2057
  onChange: N,
2044
2058
  onSubmit: R,
2045
- loadingSlots: E,
2046
- submitting: J,
2047
- submitError: P,
2048
- mode: z = "live",
2049
- showModifyOnSuccess: H = !0,
2050
- emptyServicesSlot: D,
2051
- onboardingIncompleteSlot: X,
2052
- "aria-label": G,
2053
- id: se,
2054
- className: ne,
2055
- ...Ne
2056
- }, W) => {
2057
- const { t: Q, i18n: le } = T(), L = e ?? "inline-list", ie = le.language ?? "en", $ = l ?? Oa, j = d ?? Ea;
2058
- re(() => {
2059
- const V = ma(b, {
2059
+ onStepChange: B,
2060
+ loadingSlots: J,
2061
+ submitting: P,
2062
+ submitError: z,
2063
+ mode: G = "live",
2064
+ showModifyOnSuccess: D = !0,
2065
+ surface: ne = "flat",
2066
+ emptyServicesSlot: j,
2067
+ onboardingIncompleteSlot: oe,
2068
+ "aria-label": ie,
2069
+ id: re,
2070
+ className: X,
2071
+ ...de
2072
+ }, le) => {
2073
+ const { t: ce, i18n: Ce } = T(), V = e ?? "inline-list", W = Ce.language ?? "en", $ = l ?? La, q = d ?? Fa;
2074
+ Q(() => {
2075
+ const L = fa(b, {
2060
2076
  useSpecialties: s,
2061
2077
  lockedOperatorId: i,
2062
2078
  autoSelectSingleService: o,
2063
2079
  specialties: $,
2064
2080
  services: c
2065
2081
  });
2066
- (V.specialtyId !== b.specialtyId || V.operatorId !== b.operatorId || V.serviceId !== b.serviceId) && N(V);
2082
+ (L.specialtyId !== b.specialtyId || L.operatorId !== b.operatorId || L.serviceId !== b.serviceId) && N(L);
2067
2083
  }, [
2068
2084
  i,
2069
2085
  s,
@@ -2071,15 +2087,15 @@ const Oa = [], Ea = [], Pa = ze(
2071
2087
  $,
2072
2088
  c
2073
2089
  ]);
2074
- const A = w(
2075
- () => ca({
2090
+ const _ = I(
2091
+ () => ga({
2076
2092
  country: t,
2077
2093
  useSpecialties: s,
2078
2094
  allowOperatorSelection: n,
2079
2095
  lockedOperatorId: i,
2080
2096
  specialties: $,
2081
2097
  services: c,
2082
- operators: j,
2098
+ operators: q,
2083
2099
  availableSlots: g,
2084
2100
  value: b
2085
2101
  }),
@@ -2091,100 +2107,112 @@ const Oa = [], Ea = [], Pa = ze(
2091
2107
  o,
2092
2108
  $,
2093
2109
  c,
2094
- j,
2110
+ q,
2095
2111
  p,
2096
2112
  g,
2097
2113
  b
2098
2114
  ]
2099
- ), [ce, U] = q(
2100
- A.currentStep
2101
- ), me = de(A.currentStep);
2102
- re(() => {
2103
- A.currentStep > me.current && U(A.currentStep), me.current = A.currentStep;
2104
- }, [A.currentStep]);
2105
- const [m, I] = q("idle"), [oe, Ie] = q(null), Oe = te(
2106
- async (V) => {
2107
- if (!A.selectedSlot) return;
2108
- const Ce = {
2109
- slot: A.selectedSlot,
2115
+ ), [me, m] = H(
2116
+ _.currentStep
2117
+ ), w = te(_.currentStep);
2118
+ Q(() => {
2119
+ _.currentStep > w.current && m(_.currentStep), w.current = _.currentStep;
2120
+ }, [_.currentStep]);
2121
+ const [U, ue] = H("idle"), [Me, De] = H(null), Le = ae(
2122
+ async (L) => {
2123
+ if (!_.selectedSlot) return;
2124
+ const _e = {
2125
+ slot: _.selectedSlot,
2110
2126
  value: {
2111
2127
  ...b,
2112
- details: V,
2113
- operatorId: _e(b) ?? b.operatorId
2128
+ details: L,
2129
+ operatorId: Ee(b) ?? b.operatorId
2114
2130
  },
2115
- details: V
2131
+ details: L
2116
2132
  };
2117
- I("submitting");
2133
+ ue("submitting");
2118
2134
  try {
2119
- await R(Ce), Ie({
2120
- slot: A.selectedSlot,
2121
- details: V,
2135
+ await R(_e), De({
2136
+ slot: _.selectedSlot,
2137
+ details: L,
2122
2138
  specialtyId: b.specialtyId,
2123
2139
  serviceId: b.serviceId,
2124
2140
  insuranceType: b.insuranceType,
2125
- operatorId: _e(b),
2141
+ operatorId: Ee(b),
2126
2142
  date: b.date
2127
- }), I("success");
2143
+ }), ue("success");
2128
2144
  } catch {
2129
- throw I("error"), new Error("Booking submission failed");
2145
+ throw ue("error"), new Error("Booking submission failed");
2130
2146
  }
2131
2147
  },
2132
- [A.selectedSlot, R, b]
2133
- ), Ee = de(null);
2134
- lt(W, () => Ee.current, []);
2135
- const we = w(
2148
+ [_.selectedSlot, R, b]
2149
+ ), pe = te(null);
2150
+ pt(le, () => pe.current, []);
2151
+ const ge = U === "success" ? 8 : _.currentStep, Fe = te(null);
2152
+ Q(() => {
2153
+ if (ge !== Fe.current && (Fe.current = ge, B == null || B(ge), ge === 8 && pe.current))
2154
+ try {
2155
+ pe.current.scrollIntoView({
2156
+ behavior: "smooth",
2157
+ block: "start"
2158
+ });
2159
+ } catch {
2160
+ pe.current.scrollIntoView();
2161
+ }
2162
+ }, [ge, B]);
2163
+ const Te = I(
2136
2164
  () => ({
2137
- getVariant: () => L,
2165
+ getVariant: () => V,
2138
2166
  reset: () => {
2139
- N({}), Ie(null), I("idle"), U(1);
2167
+ N({}), De(null), ue("idle"), m(1);
2140
2168
  },
2141
- goToStep: (V) => {
2142
- U(V);
2169
+ goToStep: (L) => {
2170
+ m(L);
2143
2171
  }
2144
2172
  }),
2145
- [L, N]
2173
+ [V, N]
2146
2174
  );
2147
- mt(sa, we, se);
2148
- const ot = G ?? Q("booking.regionLabel"), rt = w(() => m !== "success" || !oe ? null : /* @__PURE__ */ a(
2149
- Ma,
2175
+ ft(ra, Te, re);
2176
+ const ct = ie ?? ce("booking.regionLabel"), mt = I(() => U !== "success" || !Me ? null : /* @__PURE__ */ a(
2177
+ Aa,
2150
2178
  {
2151
- snapshot: oe,
2152
- operators: j,
2179
+ snapshot: Me,
2180
+ operators: q,
2153
2181
  specialties: $,
2154
2182
  services: c,
2155
- locale: ie,
2156
- mode: z,
2157
- showModify: H,
2158
- onReset: () => we.reset(),
2183
+ locale: W,
2184
+ mode: G,
2185
+ showModify: D,
2186
+ onReset: () => Te.reset(),
2159
2187
  onModify: () => {
2160
- Ie(null), I("idle"), U(7);
2188
+ De(null), ue("idle"), m(7);
2161
2189
  }
2162
2190
  }
2163
2191
  ), [
2164
- m,
2165
- oe,
2166
- j,
2192
+ U,
2193
+ Me,
2194
+ q,
2167
2195
  $,
2168
2196
  c,
2169
- ie,
2170
- z,
2171
- H,
2172
- we
2173
- ]), dt = w(() => {
2174
- if (m === "success") return null;
2175
- const V = L === "accordion" ? Ta : L === "calendar" ? _a : L === "flexible" ? Aa : L === "progress" ? Ba : Da, Ce = {
2176
- cascade: A,
2197
+ W,
2198
+ G,
2199
+ D,
2200
+ Te
2201
+ ]), ut = I(() => {
2202
+ if (U === "success") return null;
2203
+ const L = V === "accordion" ? Oa : V === "calendar" ? Ea : V === "flexible" ? Pa : V === "progress" ? Va : Ba, _e = {
2204
+ cascade: _,
2177
2205
  inputs: {
2178
2206
  specialties: $,
2179
2207
  services: c,
2180
- operators: j,
2208
+ operators: q,
2181
2209
  availableDates: p,
2182
2210
  availableSlots: g,
2183
2211
  nextAvailableDate: u
2184
2212
  },
2185
2213
  value: b,
2186
2214
  onChange: N,
2187
- onSubmit: Oe,
2215
+ onSubmit: Le,
2188
2216
  policy: { country: t, lockedOperatorId: i },
2189
2217
  detailsProps: {
2190
2218
  requireCodiceFiscale: k,
@@ -2193,76 +2221,80 @@ const Oa = [], Ea = [], Pa = ze(
2193
2221
  insuranceType: b.insuranceType,
2194
2222
  showNote: y,
2195
2223
  showReturningPatientFlag: C,
2196
- privacyPolicyUrl: _,
2224
+ privacyPolicyUrl: A,
2197
2225
  termsUrl: S,
2198
2226
  validateCodiceFiscale: v,
2199
2227
  validateInsuranceNumber: r,
2200
- confirmationChannels: O,
2228
+ confirmationChannels: E,
2201
2229
  defaultConfirmationChannels: M,
2202
- submitError: P
2230
+ submitError: z
2203
2231
  },
2204
- emptyServicesSlot: D,
2205
- onboardingIncompleteSlot: X,
2206
- loadingSlots: E,
2207
- submitting: J,
2208
- locale: ie,
2209
- activeStep: ce,
2210
- setActiveStep: U
2232
+ emptyServicesSlot: j,
2233
+ onboardingIncompleteSlot: oe,
2234
+ loadingSlots: J,
2235
+ submitting: P,
2236
+ locale: W,
2237
+ activeStep: me,
2238
+ setActiveStep: m
2211
2239
  };
2212
- return /* @__PURE__ */ a(V, { ...Ce });
2240
+ return /* @__PURE__ */ a(L, { ..._e });
2213
2241
  }, [
2214
- m,
2215
- L,
2216
- A,
2242
+ U,
2243
+ V,
2244
+ _,
2217
2245
  $,
2218
2246
  c,
2219
- j,
2247
+ q,
2220
2248
  p,
2221
2249
  g,
2222
2250
  u,
2223
2251
  b,
2224
2252
  N,
2225
- Oe,
2253
+ Le,
2226
2254
  t,
2227
2255
  i,
2228
2256
  k,
2229
2257
  h,
2230
2258
  x,
2231
- P,
2259
+ z,
2232
2260
  y,
2233
2261
  C,
2234
- _,
2262
+ A,
2235
2263
  S,
2236
2264
  v,
2237
2265
  r,
2238
- O,
2239
- M,
2240
- D,
2241
- X,
2242
2266
  E,
2267
+ M,
2268
+ j,
2269
+ oe,
2243
2270
  J,
2244
- ie,
2245
- ce
2271
+ P,
2272
+ W,
2273
+ me
2246
2274
  ]);
2247
2275
  return /* @__PURE__ */ f(
2248
2276
  "div",
2249
2277
  {
2250
- ref: Ee,
2278
+ ref: pe,
2251
2279
  role: "region",
2252
- "aria-label": ot,
2253
- id: se,
2280
+ "aria-label": ct,
2281
+ id: re,
2254
2282
  "data-component": "booking",
2255
- "data-component-id": se,
2256
- "data-variant": L,
2257
- className: ha({ variant: L, className: ne }),
2258
- ...Ne,
2283
+ "data-component-id": re,
2284
+ "data-variant": V,
2285
+ className: ka({
2286
+ variant: V,
2287
+ surface: ne,
2288
+ className: X
2289
+ }),
2290
+ ...de,
2259
2291
  children: [
2260
2292
  /* @__PURE__ */ f(
2261
2293
  "div",
2262
2294
  {
2263
2295
  className: [
2264
2296
  "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
2265
- L === "inline-list" ? [
2297
+ V === "inline-list" ? [
2266
2298
  "ds:rounded-[var(--radius-md)]",
2267
2299
  "ds:bg-[color-mix(in_srgb,var(--primary)_35%,var(--background))]",
2268
2300
  "ds:bg-[image:var(--gradient-hero-brand)]",
@@ -2271,22 +2303,22 @@ const Oa = [], Ea = [], Pa = ze(
2271
2303
  ].join(" ") : ""
2272
2304
  ].filter(Boolean).join(" "),
2273
2305
  children: [
2274
- /* @__PURE__ */ a("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: Q("booking.regionLabel") }),
2275
- /* @__PURE__ */ a("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children: Q("booking.headingSubtitle") })
2306
+ /* @__PURE__ */ a("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: ce("booking.regionLabel") }),
2307
+ /* @__PURE__ */ a("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children: ce("booking.headingSubtitle") })
2276
2308
  ]
2277
2309
  }
2278
2310
  ),
2279
- rt ?? dt
2311
+ mt ?? ut
2280
2312
  ]
2281
2313
  }
2282
2314
  );
2283
2315
  }
2284
2316
  );
2285
- Pa.displayName = "Booking";
2317
+ Ra.displayName = "Booking";
2286
2318
  export {
2287
- Pa as B,
2288
- Te as C,
2289
- pe as O,
2290
- sa as b
2319
+ Ra as B,
2320
+ Oe as C,
2321
+ he as O,
2322
+ ra as b
2291
2323
  };
2292
- //# sourceMappingURL=booking-Bw9eOU4k.js.map
2324
+ //# sourceMappingURL=booking-CBaSujVP.js.map