@alfadocs/ui-kit 0.33.7 → 0.33.9

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
- import { jsxs as f, jsx as a, Fragment as Z } from "react/jsx-runtime";
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";
1
+ import { jsxs as g, jsx as a, Fragment as Y } from "react/jsx-runtime";
2
+ import { forwardRef as Ge, useId as Ue, useState as q, useCallback as ie, useRef as se, useEffect as te, useMemo as C, useImperativeHandle as ft } from "react";
3
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-nPAVE19X.js";
4
+ import { useTranslation as _, Trans as ht } from "react-i18next";
5
+ import { u as vt } from "./registry-nPAVE19X.js";
6
6
  import { A as L } from "./alert-ywPR59NE.js";
7
- import { B as se } from "./button-DD_0Xdmr.js";
8
- import { C as Ae } from "./checkbox-DRcOdmXv.js";
9
- import { C as ht } from "./checkbox-group-CpUwlHug.js";
10
- import { D as vt } from "./date-picker-B94HAV4A.js";
11
- import { E as bt } from "./email-input-lQivsFrw.js";
12
- import { F as Y } from "./form-field-BOm9hK35.js";
13
- import { P as yt } from "./phone-input-DfZbPPvh.js";
14
- import { T as kt } from "./text-area-BIx0tZ05.js";
7
+ import { B as ne } from "./button-DD_0Xdmr.js";
8
+ import { C as Be } from "./checkbox-DRcOdmXv.js";
9
+ import { C as bt } from "./checkbox-group-CpUwlHug.js";
10
+ import { D as yt } from "./date-picker-B94HAV4A.js";
11
+ import { E as kt } from "./email-input-lQivsFrw.js";
12
+ import { F as U } from "./form-field-BOm9hK35.js";
13
+ import { P as xt } from "./phone-input-DfZbPPvh.js";
14
+ import { T as St } from "./text-area-BIx0tZ05.js";
15
15
  import { T as be } from "./text-input-BaClJL8Y.js";
16
- import { S as xt } from "./spinner-CCByyvcb.js";
17
- import { I as Fe } from "./icon-button-CKEOrN37.js";
16
+ import { S as Nt } from "./spinner-CCByyvcb.js";
17
+ import { I as $e } from "./icon-button-CKEOrN37.js";
18
18
  import { S as we } from "./select-hsCaJSX3.js";
19
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-DDjq5nei.js";
23
- import { p as ee } from "./parseISO-DEpUNwxZ.js";
24
- import { w as Ue, f as fe, d as It, h as xe, x as ye } from "./react-day-picker-DsjfS7uI.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-DUEiAT0G.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";
20
+ import { E as Ye } from "./empty-state-BLy7tigq.js";
21
+ import { S as It } from "./stepper-accordion-BfS6lUB9.js";
22
+ import { S as wt } from "./stepper-progress-DDjq5nei.js";
23
+ import { p as ae } from "./parseISO-DEpUNwxZ.js";
24
+ import { w as Ze, f as ue, d as Ct, h as xe, x as ye } from "./react-day-picker-DsjfS7uI.js";
25
+ import { C as Mt } from "./chevron-left-CX1jqD2M.js";
26
+ import { C as Dt } from "./chevron-right-BrpYejk0.js";
27
+ import { i as Ke } from "./isSameDay-DUEiAT0G.js";
28
+ import { c as B } from "./createLucideIcon-CrFbzy84.js";
29
+ import { M as Tt, S as _t } from "./sun-BuXE0xUS.js";
30
+ import { S as At } from "./stethoscope-DT5qCW8Y.js";
31
+ import { H as Bt } from "./heart-pulse-CvuyFKHB.js";
32
+ import { E as Ot } from "./eye-LHlSU38h.js";
33
+ import { S as Et } 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 Ot = [
40
+ const Pt = [
41
41
  [
42
42
  "path",
43
43
  {
@@ -45,14 +45,14 @@ const Ot = [
45
45
  key: "169zse"
46
46
  }
47
47
  ]
48
- ], Et = O("activity", Ot);
48
+ ], Vt = B("activity", Pt);
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 Pt = [
55
+ const Rt = [
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 Pt = [
63
63
  }
64
64
  ],
65
65
  ["path", { d: "M9 12h.01", key: "157uk2" }]
66
- ], Vt = O("baby", Pt);
66
+ ], Lt = B("baby", Rt);
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 Rt = [
73
+ const Ft = [
74
74
  [
75
75
  "path",
76
76
  {
@@ -78,14 +78,14 @@ const Rt = [
78
78
  key: "w610uw"
79
79
  }
80
80
  ]
81
- ], Lt = O("bone", Rt);
81
+ ], zt = B("bone", Ft);
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 Ft = [
88
+ const $t = [
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 Ft = [
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
- ], zt = O("brain", Ft);
97
+ ], Kt = B("brain", $t);
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 $t = [
104
+ const jt = [
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 $t = [
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
- ], Kt = O("calendar-range", $t);
113
+ ], qt = B("calendar-range", jt);
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 jt = [
120
+ const Ht = [
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 jt = [
127
127
  }
128
128
  ],
129
129
  ["path", { d: "m9 14 2 2 4-4", key: "df797q" }]
130
- ], qt = O("clipboard-check", jt);
130
+ ], Gt = B("clipboard-check", Ht);
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 Ht = [
137
+ const Ut = [
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
- ], Gt = O("ear", Ht);
140
+ ], Yt = B("ear", Ut);
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 Ut = [
147
+ const Zt = [
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
- ], Yt = O("microscope", Ut);
154
+ ], Jt = B("microscope", Zt);
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 Zt = [
161
+ const Xt = [
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
- ], Jt = O("pill", Zt);
167
+ ], Wt = B("pill", Xt);
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 Xt = [
174
+ const Qt = [
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
- ], Wt = O("scan-line", Xt);
180
+ ], ea = B("scan-line", Qt);
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 Qt = [
187
+ const ta = [
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
- ], ea = O("scissors", Qt);
193
+ ], aa = B("scissors", ta);
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 ta = [
200
+ const sa = [
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
- ], aa = O("smile", ta);
205
+ ], ia = B("smile", sa);
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 sa = [
212
+ const na = [
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 sa = [
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
- ], ia = O("sunset", sa);
221
+ ], oa = B("sunset", na);
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 na = [
228
+ const ra = [
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
- ], $e = O("syringe", na);
236
- function oa(e, t, s) {
237
- return Ue(e, -1, s);
235
+ ], je = B("syringe", ra);
236
+ function da(e, t, s) {
237
+ return Ze(e, -1, s);
238
238
  }
239
- const ra = {
239
+ const la = {
240
240
  id: "booking",
241
241
  capabilities: ["navigate", "view_change"],
242
242
  state: {
@@ -278,12 +278,12 @@ const ra = {
278
278
  description: "Sourced from the id prop."
279
279
  }
280
280
  }
281
- }, Oe = [
281
+ }, Ee = [
282
282
  "email",
283
283
  "whatsapp",
284
284
  "sms"
285
- ], he = "all", da = "de";
286
- function la(e) {
285
+ ], pe = "all", ca = "de";
286
+ function ma(e) {
287
287
  return [...e.lockedOperatorId ? e.specialties.filter(
288
288
  (s) => {
289
289
  var i;
@@ -294,7 +294,7 @@ function la(e) {
294
294
  return n - o;
295
295
  });
296
296
  }
297
- function ca(e) {
297
+ function ua(e) {
298
298
  let t = e.services;
299
299
  return e.lockedOperatorId && (t = t.filter(
300
300
  (i) => {
@@ -303,7 +303,7 @@ function ca(e) {
303
303
  }
304
304
  )), (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && e.value.specialtyId && (t = t.filter((i) => i.specialtyId === e.value.specialtyId)), t;
305
305
  }
306
- function ma(e) {
306
+ function pa(e) {
307
307
  const t = e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties;
308
308
  if (t && e.value.specialtyId) {
309
309
  const s = e.value.specialtyId;
@@ -325,20 +325,20 @@ function ma(e) {
325
325
  }
326
326
  return [];
327
327
  }
328
- function ua(e, t) {
329
- const s = e.country === da, i = !s || e.value.insuranceType !== void 0, o = (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && i, l = !o || e.value.specialtyId !== void 0, d = !l || e.value.serviceId !== void 0, p = t.operators, h = !!e.allowOperatorSelection && d && e.value.serviceId !== void 0 && !e.lockedOperatorId && p.length > 1, u = d && e.value.serviceId !== void 0, g = (!u || e.value.date !== void 0) && e.value.date !== void 0, y = (!g || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, w = !!e.value.serviceId && p.length === 0;
328
+ function ga(e, t) {
329
+ const s = e.country === ca, i = !s || e.value.insuranceType !== void 0, o = (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && i, c = !o || e.value.specialtyId !== void 0, d = !c || e.value.serviceId !== void 0, p = t.operators, f = !!e.allowOperatorSelection && d && e.value.serviceId !== void 0 && !e.lockedOperatorId && p.length > 1, u = d && e.value.serviceId !== void 0, k = (!u || e.value.date !== void 0) && e.value.date !== void 0, v = (!k || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, w = !!e.value.serviceId && p.length === 0;
330
330
  return {
331
331
  insurance: s,
332
332
  specialty: o,
333
- service: l,
334
- operator: h,
333
+ service: c,
334
+ operator: f,
335
335
  date: u,
336
- slot: g,
337
- details: y,
336
+ slot: k,
337
+ details: v,
338
338
  onboardingIncomplete: w
339
339
  };
340
340
  }
341
- function pa(e, t) {
341
+ function fa(e, t) {
342
342
  const s = [];
343
343
  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);
344
344
  const i = {
@@ -356,30 +356,30 @@ function pa(e, t) {
356
356
  visibleSteps: s
357
357
  };
358
358
  }
359
- function ga(e) {
359
+ function ha(e) {
360
360
  const t = {
361
- specialties: la(e),
362
- services: ca(e),
363
- operators: ma(e)
364
- }, s = ua(e, t), { currentStep: i, visibleSteps: n } = pa(e, s);
361
+ specialties: ma(e),
362
+ services: ua(e),
363
+ operators: pa(e)
364
+ }, s = ga(e, t), { currentStep: i, visibleSteps: n } = fa(e, s);
365
365
  let o;
366
366
  if (e.value.date && e.value.slotKey) {
367
367
  const d = e.availableSlots[e.value.date];
368
368
  d && (o = d.find((p) => p.key === e.value.slotKey));
369
369
  }
370
- const c = e.value.serviceId ? e.services.find((d) => d.id === e.value.serviceId) : void 0, l = e.value.serviceId !== void 0 && e.value.date !== void 0 && e.value.slotKey !== void 0 && (!s.insurance || e.value.insuranceType !== void 0) && (!s.specialty || e.value.specialtyId !== void 0);
370
+ const m = e.value.serviceId ? e.services.find((d) => d.id === e.value.serviceId) : void 0, c = e.value.serviceId !== void 0 && e.value.date !== void 0 && e.value.slotKey !== void 0 && (!s.insurance || e.value.insuranceType !== void 0) && (!s.specialty || e.value.specialtyId !== void 0);
371
371
  return {
372
372
  gates: s,
373
373
  filtered: t,
374
374
  currentStep: i,
375
375
  totalSteps: n.length,
376
376
  visibleSteps: n,
377
- isReadyToSubmit: l,
378
- durationMin: c == null ? void 0 : c.durationMin,
377
+ isReadyToSubmit: c,
378
+ durationMin: m == null ? void 0 : m.durationMin,
379
379
  selectedSlot: o
380
380
  };
381
381
  }
382
- function Ye(e, t) {
382
+ function Je(e, t) {
383
383
  return {
384
384
  ...e,
385
385
  insuranceType: t,
@@ -391,7 +391,7 @@ function Ye(e, t) {
391
391
  details: void 0
392
392
  };
393
393
  }
394
- function Ze(e, t) {
394
+ function Xe(e, t) {
395
395
  return {
396
396
  ...e,
397
397
  specialtyId: t,
@@ -402,20 +402,20 @@ function Ze(e, t) {
402
402
  details: void 0
403
403
  };
404
404
  }
405
- function Je(e, t) {
405
+ function We(e, t) {
406
406
  return {
407
407
  ...e,
408
408
  serviceId: t,
409
409
  // Default the operator to the "All operators" sentinel so a patient
410
410
  // who doesn't care about picking lands on a satisfied step 4 without
411
411
  // any further input.
412
- operatorId: t ? he : void 0,
412
+ operatorId: t ? pe : void 0,
413
413
  date: void 0,
414
414
  slotKey: void 0,
415
415
  details: void 0
416
416
  };
417
417
  }
418
- function Xe(e, t) {
418
+ function Qe(e, t) {
419
419
  return {
420
420
  ...e,
421
421
  operatorId: t,
@@ -433,47 +433,47 @@ function Ne(e, t) {
433
433
  // since the user has already filled some fields.
434
434
  };
435
435
  }
436
- function We(e, t) {
436
+ function et(e, t) {
437
437
  return {
438
438
  ...e,
439
439
  slotKey: t
440
440
  };
441
441
  }
442
- function fa(e, t) {
442
+ function va(e, t) {
443
443
  let s = e;
444
444
  if (t.lockedOperatorId && s.operatorId !== t.lockedOperatorId && (s = { ...s, operatorId: t.lockedOperatorId }), (t.useSpecialties === void 0 ? t.specialties.length > 0 : t.useSpecialties) && t.specialties.length === 1 && s.specialtyId === void 0 && (s = { ...s, specialtyId: t.specialties[0].id }), t.autoSelectSingleService) {
445
445
  const n = s.specialtyId ? t.services.filter((o) => o.specialtyId === s.specialtyId) : t.services;
446
- n.length === 1 && s.serviceId === void 0 && (s = { ...s, serviceId: n[0].id }, s.operatorId === void 0 && (s = { ...s, operatorId: he }));
446
+ n.length === 1 && s.serviceId === void 0 && (s = { ...s, serviceId: n[0].id }, s.operatorId === void 0 && (s = { ...s, operatorId: pe }));
447
447
  }
448
448
  return s;
449
449
  }
450
- function Ee(e) {
451
- if (e.operatorId && e.operatorId !== he)
450
+ function Pe(e) {
451
+ if (e.operatorId && e.operatorId !== pe)
452
452
  return e.operatorId;
453
453
  }
454
- function ha(e) {
454
+ function ba(e) {
455
455
  if (!e) return !1;
456
456
  const t = e.trim();
457
457
  return /^\+?\d[\d\s\-()]{6,}$/.test(t);
458
458
  }
459
- function Qe(e) {
459
+ function tt(e) {
460
460
  const t = e && e.length > 0 ? e : ["email"], s = new Set(t);
461
- return Oe.filter((i) => s.has(i));
461
+ return Ee.filter((i) => s.has(i));
462
462
  }
463
- function va(e, t, s) {
464
- const i = Qe(e), n = new Set(i);
463
+ function ya(e, t, s) {
464
+ const i = tt(e), n = new Set(i);
465
465
  if (s)
466
- return Oe.filter(
466
+ return Ee.filter(
467
467
  (p) => s.includes(p) && n.has(p)
468
468
  );
469
469
  const o = [];
470
470
  n.has("email") && o.push("email");
471
- const c = ha(t), l = n.has("whatsapp");
472
- l && c && o.push("whatsapp"), !l && n.has("sms") && o.push("sms");
471
+ const m = ba(t), c = n.has("whatsapp");
472
+ c && m && o.push("whatsapp"), !c && n.has("sms") && o.push("sms");
473
473
  const d = new Set(o);
474
- return Oe.filter((p) => d.has(p));
474
+ return Ee.filter((p) => d.has(p));
475
475
  }
476
- const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 300, ke = { state: "idle" }, Pe = qe(
476
+ const qe = 500, ka = /^[A-Z0-9]{16}$/, xa = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, He = 300, ke = { state: "idle" }, Ve = Ge(
477
477
  ({
478
478
  value: e,
479
479
  onChange: t,
@@ -481,102 +481,102 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
481
481
  requireCodiceFiscale: i = !1,
482
482
  requireDateOfBirth: n = !1,
483
483
  requireInsuranceNumber: o = !1,
484
- insuranceType: c,
485
- showNote: l = !1,
484
+ insuranceType: m,
485
+ showNote: c = !1,
486
486
  showReturningPatientFlag: d = !1,
487
487
  privacyPolicyUrl: p,
488
- termsUrl: h,
488
+ termsUrl: f,
489
489
  validateCodiceFiscale: u,
490
490
  validateInsuranceNumber: x,
491
- submitting: g = !1,
492
- summarySlot: k,
493
- defaultPhoneCountry: y,
491
+ submitting: k = !1,
492
+ summarySlot: h,
493
+ defaultPhoneCountry: v,
494
494
  confirmationChannels: w,
495
- defaultConfirmationChannels: A,
495
+ defaultConfirmationChannels: N,
496
496
  submitError: S
497
- }, v) => {
498
- var _, me;
499
- const { t: r } = T(), E = He(), [M, b] = H(ke), [N, F] = H(ke), [B, J] = H({}), P = ae(
500
- (m) => J((C) => ({ ...C, [m]: !0 })),
497
+ }, b) => {
498
+ var R, j;
499
+ const { t: r } = _(), O = Ue(), [D, y] = q(ke), [I, F] = q(ke), [A, Z] = q({}), E = ie(
500
+ (l) => Z((M) => ({ ...M, [l]: !0 })),
501
501
  []
502
- ), z = te(null), G = te(
502
+ ), z = se(null), H = se(
503
503
  null
504
504
  );
505
- Q(
505
+ te(
506
506
  () => () => {
507
- z.current && clearTimeout(z.current), G.current && clearTimeout(G.current);
507
+ z.current && clearTimeout(z.current), H.current && clearTimeout(H.current);
508
508
  },
509
509
  []
510
510
  );
511
- const D = ae(
512
- (m) => t({ ...e, ...m }),
511
+ const T = ie(
512
+ (l) => t({ ...e, ...l }),
513
513
  [e, t]
514
- ), ie = I(
515
- () => Qe(w),
514
+ ), J = C(
515
+ () => tt(w),
516
516
  [w]
517
- ), j = ie.length >= 2, oe = te(!1);
518
- Q(() => {
519
- if (!j) {
520
- e.confirmationChannels !== void 0 && D({ confirmationChannels: void 0 });
517
+ ), K = J.length >= 2, fe = se(!1);
518
+ te(() => {
519
+ if (!K) {
520
+ e.confirmationChannels !== void 0 && T({ confirmationChannels: void 0 });
521
521
  return;
522
522
  }
523
523
  if (e.confirmationChannels !== void 0) {
524
- oe.current = !0;
524
+ fe.current = !0;
525
525
  return;
526
526
  }
527
- const m = va(
528
- ie,
527
+ const l = ya(
528
+ J,
529
529
  e.mobilePhone,
530
- A
530
+ N
531
531
  );
532
- oe.current = !0, D({ confirmationChannels: m });
532
+ fe.current = !0, T({ confirmationChannels: l });
533
533
  }, [
534
- j,
535
- ie,
534
+ K,
535
+ J,
536
536
  e.mobilePhone,
537
- A
537
+ N
538
538
  ]);
539
- const ne = I(
539
+ const X = C(
540
540
  () => e.confirmationChannels ?? [],
541
541
  [e.confirmationChannels]
542
- ), re = j && ne.length === 0;
543
- Q(() => {
544
- const m = e.codiceFiscale;
545
- if (!i || !u || !m) {
546
- b(ke);
542
+ ), he = K && X.length === 0;
543
+ te(() => {
544
+ const l = e.codiceFiscale;
545
+ if (!i || !u || !l) {
546
+ y(ke);
547
547
  return;
548
548
  }
549
- if (!ba.test(m)) {
550
- b({
549
+ if (!ka.test(l)) {
550
+ y({
551
551
  state: "invalid",
552
552
  hint: r("booking.details.codiceFiscale.invalidFormat")
553
553
  });
554
554
  return;
555
555
  }
556
- b({ state: "pending" }), z.current && clearTimeout(z.current), z.current = setTimeout(() => {
557
- u(m).then(
558
- (C) => b(
559
- C.valid ? { state: "valid" } : { state: "invalid", hint: C.hint }
556
+ y({ state: "pending" }), z.current && clearTimeout(z.current), z.current = setTimeout(() => {
557
+ u(l).then(
558
+ (M) => y(
559
+ M.valid ? { state: "valid" } : { state: "invalid", hint: M.hint }
560
560
  )
561
561
  ).catch(
562
- () => b({
562
+ () => y({
563
563
  state: "invalid",
564
564
  hint: r("booking.details.codiceFiscale.unavailable")
565
565
  })
566
566
  );
567
- }, je);
567
+ }, He);
568
568
  }, [i, u, e.codiceFiscale, r]);
569
- const X = o && c === "public";
570
- Q(() => {
571
- const m = e.insuranceNumber;
572
- if (!X || !x || !m) {
569
+ const W = o && m === "public";
570
+ te(() => {
571
+ const l = e.insuranceNumber;
572
+ if (!W || !x || !l) {
573
573
  F(ke);
574
574
  return;
575
575
  }
576
- F({ state: "pending" }), G.current && clearTimeout(G.current), G.current = setTimeout(() => {
577
- x(m).then(
578
- (C) => F(
579
- C.valid ? { state: "valid" } : { state: "invalid", hint: C.hint }
576
+ F({ state: "pending" }), H.current && clearTimeout(H.current), H.current = setTimeout(() => {
577
+ x(l).then(
578
+ (M) => F(
579
+ M.valid ? { state: "valid" } : { state: "invalid", hint: M.hint }
580
580
  )
581
581
  ).catch(
582
582
  () => F({
@@ -584,30 +584,30 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
584
584
  hint: r("booking.details.insuranceNumber.unavailable")
585
585
  })
586
586
  );
587
- }, je);
588
- }, [X, x, e.insuranceNumber, r]);
589
- const de = I(
590
- () => !!(e.email && ya.test(e.email)),
587
+ }, He);
588
+ }, [W, x, e.insuranceNumber, r]);
589
+ const Q = C(
590
+ () => !!(e.email && xa.test(e.email)),
591
591
  [e.email]
592
- ), le = I(
592
+ ), oe = C(
593
593
  () => !!(e.mobilePhone && e.mobilePhone.length >= 6),
594
594
  [e.mobilePhone]
595
- ), ce = I(() => {
596
- var m, C;
597
- return !(!((m = e.firstName) != null && m.trim()) || !((C = e.lastName) != null && C.trim()) || !de || !le || i && M.state !== "valid" || n && !e.dateOfBirth || X && N.state !== "valid");
595
+ ), Ce = C(() => {
596
+ var l, M;
597
+ return !(!((l = e.firstName) != null && l.trim()) || !((M = e.lastName) != null && M.trim()) || !Q || !oe || i && D.state !== "valid" || n && !e.dateOfBirth || W && I.state !== "valid");
598
598
  }, [
599
599
  e.firstName,
600
600
  e.lastName,
601
- de,
602
- le,
601
+ Q,
602
+ oe,
603
603
  i,
604
- M.state,
604
+ D.state,
605
605
  n,
606
606
  e.dateOfBirth,
607
- X,
608
- N.state
609
- ]), Ce = !!(e.privacyConsent && e.termsConsent), R = !j || ne.length > 0, W = ce && Ce && R && !g, $ = (m) => {
610
- if (m.preventDefault(), J({
607
+ W,
608
+ I.state
609
+ ]), Me = !!(e.privacyConsent && e.termsConsent), re = !K || X.length > 0, ve = Ce && Me && re && !k, V = (l) => {
610
+ if (l.preventDefault(), Z({
611
611
  firstName: !0,
612
612
  lastName: !0,
613
613
  email: !0,
@@ -615,8 +615,8 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
615
615
  codiceFiscale: !0,
616
616
  dateOfBirth: !0,
617
617
  insuranceNumber: !0
618
- }), !W) return;
619
- const C = {
618
+ }), !ve) return;
619
+ const M = {
620
620
  firstName: e.firstName.trim(),
621
621
  lastName: e.lastName.trim(),
622
622
  email: e.email.trim(),
@@ -631,15 +631,15 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
631
631
  // Only include when the picker was visible; otherwise the single
632
632
  // implicit channel is inferred backend-side from the practice
633
633
  // config.
634
- confirmationChannels: j ? ne : void 0
634
+ confirmationChannels: K ? X : void 0
635
635
  };
636
- s(C);
637
- }, q = (m, C) => {
638
- const U = C && /^https?:\/\//i.test(C) ? C : void 0;
639
- return U ? /* @__PURE__ */ a(
640
- gt,
636
+ s(M);
637
+ }, ee = (l, M) => {
638
+ const G = M && /^https?:\/\//i.test(M) ? M : void 0;
639
+ return G ? /* @__PURE__ */ a(
640
+ ht,
641
641
  {
642
- i18nKey: m,
642
+ i18nKey: l,
643
643
  components: {
644
644
  // The `<Trans>` runtime injects link text from the i18n
645
645
  // string. The anchor renders empty at static-analysis time,
@@ -651,7 +651,7 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
651
651
  /* @__PURE__ */ a(
652
652
  "a",
653
653
  {
654
- href: U,
654
+ href: G,
655
655
  target: "_blank",
656
656
  rel: "noopener noreferrer",
657
657
  className: "ds:underline ds:text-[var(--primary)]"
@@ -660,182 +660,182 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
660
660
  )
661
661
  }
662
662
  }
663
- ) : r(m);
663
+ ) : r(l);
664
664
  };
665
- return /* @__PURE__ */ f(
665
+ return /* @__PURE__ */ g(
666
666
  "form",
667
667
  {
668
- ref: v,
669
- id: E,
668
+ ref: b,
669
+ id: O,
670
670
  noValidate: !0,
671
- onSubmit: $,
671
+ onSubmit: V,
672
672
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
673
673
  children: [
674
- k,
675
- /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
674
+ h,
675
+ /* @__PURE__ */ g("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
676
676
  /* @__PURE__ */ a(
677
- Y,
677
+ U,
678
678
  {
679
679
  label: r("booking.details.firstName.label"),
680
680
  required: !0,
681
- error: B.firstName && !((_ = e.firstName) != null && _.trim()) ? r("booking.details.firstName.required") : void 0,
681
+ error: A.firstName && !((R = e.firstName) != null && R.trim()) ? r("booking.details.firstName.required") : void 0,
682
682
  children: /* @__PURE__ */ a(
683
683
  be,
684
684
  {
685
685
  autoComplete: "given-name",
686
686
  value: e.firstName ?? "",
687
- onChange: (m) => D({ firstName: m.target.value }),
688
- onBlur: () => P("firstName")
687
+ onChange: (l) => T({ firstName: l.target.value }),
688
+ onBlur: () => E("firstName")
689
689
  }
690
690
  )
691
691
  }
692
692
  ),
693
693
  /* @__PURE__ */ a(
694
- Y,
694
+ U,
695
695
  {
696
696
  label: r("booking.details.lastName.label"),
697
697
  required: !0,
698
- error: B.lastName && !((me = e.lastName) != null && me.trim()) ? r("booking.details.lastName.required") : void 0,
698
+ error: A.lastName && !((j = e.lastName) != null && j.trim()) ? r("booking.details.lastName.required") : void 0,
699
699
  children: /* @__PURE__ */ a(
700
700
  be,
701
701
  {
702
702
  autoComplete: "family-name",
703
703
  value: e.lastName ?? "",
704
- onChange: (m) => D({ lastName: m.target.value }),
705
- onBlur: () => P("lastName")
704
+ onChange: (l) => T({ lastName: l.target.value }),
705
+ onBlur: () => E("lastName")
706
706
  }
707
707
  )
708
708
  }
709
709
  )
710
710
  ] }),
711
- /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
711
+ /* @__PURE__ */ g("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
712
712
  /* @__PURE__ */ a(
713
- Y,
713
+ U,
714
714
  {
715
715
  label: r("booking.details.email.label"),
716
716
  required: !0,
717
- error: B.email && !de ? r("booking.details.email.invalid") : void 0,
717
+ error: A.email && !Q ? r("booking.details.email.invalid") : void 0,
718
718
  children: /* @__PURE__ */ a(
719
- bt,
719
+ kt,
720
720
  {
721
721
  value: e.email ?? "",
722
- onChange: (m) => D({ email: m.target.value }),
723
- onBlur: () => P("email")
722
+ onChange: (l) => T({ email: l.target.value }),
723
+ onBlur: () => E("email")
724
724
  }
725
725
  )
726
726
  }
727
727
  ),
728
728
  /* @__PURE__ */ a(
729
- Y,
729
+ U,
730
730
  {
731
731
  label: r("booking.details.mobilePhone.label"),
732
732
  required: !0,
733
- error: B.mobilePhone && !le ? r("booking.details.mobilePhone.invalid") : void 0,
733
+ error: A.mobilePhone && !oe ? r("booking.details.mobilePhone.invalid") : void 0,
734
734
  children: /* @__PURE__ */ a(
735
- yt,
735
+ xt,
736
736
  {
737
737
  value: e.mobilePhone ?? "",
738
- defaultCountry: y == null ? void 0 : y.toUpperCase(),
739
- onChange: (m) => {
740
- D({ mobilePhone: m }), P("mobilePhone");
738
+ defaultCountry: v == null ? void 0 : v.toUpperCase(),
739
+ onChange: (l) => {
740
+ T({ mobilePhone: l }), E("mobilePhone");
741
741
  }
742
742
  }
743
743
  )
744
744
  }
745
745
  )
746
746
  ] }),
747
- i || n ? /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
747
+ i || n ? /* @__PURE__ */ g("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
748
748
  i ? /* @__PURE__ */ a(
749
- Y,
749
+ U,
750
750
  {
751
751
  label: r("booking.details.codiceFiscale.label"),
752
752
  required: !0,
753
- description: M.state === "pending" ? r("booking.details.codiceFiscale.checking") : r("booking.details.codiceFiscale.helper"),
754
- error: B.codiceFiscale && M.state === "invalid" ? M.hint ?? r("booking.details.codiceFiscale.invalid") : void 0,
753
+ description: D.state === "pending" ? r("booking.details.codiceFiscale.checking") : r("booking.details.codiceFiscale.helper"),
754
+ error: A.codiceFiscale && D.state === "invalid" ? D.hint ?? r("booking.details.codiceFiscale.invalid") : void 0,
755
755
  children: /* @__PURE__ */ a(
756
756
  be,
757
757
  {
758
758
  value: e.codiceFiscale ?? "",
759
759
  maxLength: 16,
760
- onChange: (m) => D({
761
- codiceFiscale: m.target.value.slice(0, 16).toUpperCase()
760
+ onChange: (l) => T({
761
+ codiceFiscale: l.target.value.slice(0, 16).toUpperCase()
762
762
  }),
763
- onBlur: () => P("codiceFiscale")
763
+ onBlur: () => E("codiceFiscale")
764
764
  }
765
765
  )
766
766
  }
767
767
  ) : null,
768
768
  n ? /* @__PURE__ */ a(
769
- Y,
769
+ U,
770
770
  {
771
771
  label: r("booking.details.dateOfBirth.label"),
772
772
  required: !0,
773
- error: B.dateOfBirth && !e.dateOfBirth ? r("booking.details.dateOfBirth.required") : void 0,
773
+ error: A.dateOfBirth && !e.dateOfBirth ? r("booking.details.dateOfBirth.required") : void 0,
774
774
  children: /* @__PURE__ */ a(
775
- vt,
775
+ yt,
776
776
  {
777
777
  value: e.dateOfBirth ? new Date(e.dateOfBirth) : void 0,
778
- onChange: (m) => {
779
- D({
780
- dateOfBirth: m ? m.toISOString().slice(0, 10) : void 0
781
- }), P("dateOfBirth");
778
+ onChange: (l) => {
779
+ T({
780
+ dateOfBirth: l ? l.toISOString().slice(0, 10) : void 0
781
+ }), E("dateOfBirth");
782
782
  }
783
783
  }
784
784
  )
785
785
  }
786
786
  ) : null
787
787
  ] }) : null,
788
- X ? /* @__PURE__ */ a(
789
- Y,
788
+ W ? /* @__PURE__ */ a(
789
+ U,
790
790
  {
791
791
  label: r("booking.details.insuranceNumber.label"),
792
792
  required: !0,
793
- description: N.state === "pending" ? r("booking.details.insuranceNumber.checking") : void 0,
794
- error: B.insuranceNumber && N.state === "invalid" ? N.hint ?? r("booking.details.insuranceNumber.invalid") : void 0,
793
+ description: I.state === "pending" ? r("booking.details.insuranceNumber.checking") : void 0,
794
+ error: A.insuranceNumber && I.state === "invalid" ? I.hint ?? r("booking.details.insuranceNumber.invalid") : void 0,
795
795
  children: /* @__PURE__ */ a(
796
796
  be,
797
797
  {
798
798
  value: e.insuranceNumber ?? "",
799
- onChange: (m) => D({ insuranceNumber: m.target.value }),
800
- onBlur: () => P("insuranceNumber")
799
+ onChange: (l) => T({ insuranceNumber: l.target.value }),
800
+ onBlur: () => E("insuranceNumber")
801
801
  }
802
802
  )
803
803
  }
804
804
  ) : null,
805
- l ? /* @__PURE__ */ a(
806
- Y,
805
+ c ? /* @__PURE__ */ a(
806
+ U,
807
807
  {
808
808
  label: r("booking.details.note.label"),
809
809
  description: r("booking.details.note.helper", {
810
- max: Ke
810
+ max: qe
811
811
  }),
812
812
  children: /* @__PURE__ */ a(
813
- kt,
813
+ St,
814
814
  {
815
815
  value: e.note ?? "",
816
- maxLength: Ke,
816
+ maxLength: qe,
817
817
  rows: 3,
818
- onChange: (m) => D({ note: m.target.value })
818
+ onChange: (l) => T({ note: l.target.value })
819
819
  }
820
820
  )
821
821
  }
822
822
  ) : null,
823
823
  d ? /* @__PURE__ */ a(
824
- Ae,
824
+ Be,
825
825
  {
826
826
  checked: !!e.returningPatient,
827
- onCheckedChange: (m) => D({ returningPatient: m === !0 }),
827
+ onCheckedChange: (l) => T({ returningPatient: l === !0 }),
828
828
  label: r("booking.details.returningPatient.label")
829
829
  }
830
830
  ) : null,
831
- /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
831
+ /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
832
832
  /* @__PURE__ */ a(
833
- Ae,
833
+ Be,
834
834
  {
835
835
  checked: !!e.privacyConsent,
836
- onCheckedChange: (m) => D({ privacyConsent: m === !0 }),
837
- label: /* @__PURE__ */ f(Z, { children: [
838
- q(
836
+ onCheckedChange: (l) => T({ privacyConsent: l === !0 }),
837
+ label: /* @__PURE__ */ g(Y, { children: [
838
+ ee(
839
839
  "booking.details.consent.privacy.label",
840
840
  p
841
841
  ),
@@ -851,14 +851,14 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
851
851
  }
852
852
  ),
853
853
  /* @__PURE__ */ a(
854
- Ae,
854
+ Be,
855
855
  {
856
856
  checked: !!e.termsConsent,
857
- onCheckedChange: (m) => D({ termsConsent: m === !0 }),
858
- label: /* @__PURE__ */ f(Z, { children: [
859
- q(
857
+ onCheckedChange: (l) => T({ termsConsent: l === !0 }),
858
+ label: /* @__PURE__ */ g(Y, { children: [
859
+ ee(
860
860
  "booking.details.consent.terms.label",
861
- h
861
+ f
862
862
  ),
863
863
  /* @__PURE__ */ a(
864
864
  "span",
@@ -872,39 +872,39 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
872
872
  }
873
873
  )
874
874
  ] }),
875
- j ? /* @__PURE__ */ a(
875
+ K ? /* @__PURE__ */ a(
876
876
  "div",
877
877
  {
878
878
  "data-component": "booking-confirmation-channels",
879
879
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
880
880
  children: /* @__PURE__ */ a(
881
- ht,
881
+ bt,
882
882
  {
883
883
  label: r("booking.confirmation.heading"),
884
884
  helperText: r("booking.confirmation.helper"),
885
- value: ne,
886
- onChange: (m) => D({
887
- confirmationChannels: m
885
+ value: X,
886
+ onChange: (l) => T({
887
+ confirmationChannels: l
888
888
  }),
889
889
  orientation: "vertical",
890
- options: ie.map((m) => ({
891
- value: m,
892
- label: r(`booking.confirmation.channel.${m}`)
890
+ options: J.map((l) => ({
891
+ value: l,
892
+ label: r(`booking.confirmation.channel.${l}`)
893
893
  })),
894
- error: re ? r("booking.confirmation.atLeastOne") : void 0
894
+ error: he ? r("booking.confirmation.atLeastOne") : void 0
895
895
  }
896
896
  )
897
897
  }
898
898
  ) : null,
899
899
  S ? /* @__PURE__ */ a(L, { variant: "error", children: /* @__PURE__ */ a(L.Description, { children: S }) }) : null,
900
900
  /* @__PURE__ */ a(
901
- se,
901
+ ne,
902
902
  {
903
903
  intent: "primary",
904
904
  size: "md",
905
905
  type: "submit",
906
- disabled: !W,
907
- startIcon: g ? /* @__PURE__ */ a(xt, { size: "sm" }) : void 0,
906
+ disabled: !ve,
907
+ startIcon: k ? /* @__PURE__ */ a(Nt, { size: "sm" }) : void 0,
908
908
  children: r("booking.details.submit")
909
909
  }
910
910
  )
@@ -913,8 +913,8 @@ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 3
913
913
  );
914
914
  }
915
915
  );
916
- Pe.displayName = "BookingDetailsForm";
917
- const ka = Ie(
916
+ Ve.displayName = "BookingDetailsForm";
917
+ const Sa = Ie(
918
918
  "ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)]",
919
919
  {
920
920
  variants: {
@@ -942,40 +942,40 @@ const ka = Ie(
942
942
  },
943
943
  defaultVariants: { variant: "inline-list", surface: "flat" }
944
944
  }
945
- ), xa = [
945
+ ), Na = [
946
946
  [
947
947
  /\b(estetic|aesthetic|botox|filler|mesoterap|chirurgia\s*plastic)/i,
948
- $e
948
+ je
949
949
  ],
950
- [/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i, _t],
951
- [/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i, aa],
952
- [/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i, At],
953
- [/\b(otorin|udito|orecchi|hearing|ear)/i, Gt],
954
- [/\b(neuro|brain|cervello)/i, zt],
955
- [/\b(pediatr|child|bambin)/i, Vt],
956
- [/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, Lt],
957
- [/\b(lab|analis|test|sang|esami)/i, Yt],
958
- [/\b(farmaco|pharm|pillol|refill)/i, Jt],
959
- [/\b(chirurg|surg|intervent|operat)/i, ea],
960
- [/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, Wt],
961
- [/\b(vacc|inject|inie|punto)/i, $e],
962
- [/\b(derma|skin|pelle)/i, Bt],
963
- [/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, qt],
964
- [/\b(general|medicin|family|control|check[-\s]?up)/i, Et]
950
+ [/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i, Bt],
951
+ [/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i, ia],
952
+ [/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i, Ot],
953
+ [/\b(otorin|udito|orecchi|hearing|ear)/i, Yt],
954
+ [/\b(neuro|brain|cervello)/i, Kt],
955
+ [/\b(pediatr|child|bambin)/i, Lt],
956
+ [/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, zt],
957
+ [/\b(lab|analis|test|sang|esami)/i, Jt],
958
+ [/\b(farmaco|pharm|pillol|refill)/i, Wt],
959
+ [/\b(chirurg|surg|intervent|operat)/i, aa],
960
+ [/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, ea],
961
+ [/\b(vacc|inject|inie|punto)/i, je],
962
+ [/\b(derma|skin|pelle)/i, Et],
963
+ [/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, Gt],
964
+ [/\b(general|medicin|family|control|check[-\s]?up)/i, Vt]
965
965
  ];
966
- function Sa(e) {
967
- for (const [t, s] of xa)
966
+ function Ia(e) {
967
+ for (const [t, s] of Na)
968
968
  if (t.test(e)) return s;
969
969
  return null;
970
970
  }
971
- function Na(e) {
972
- const t = Sa(e.label) ?? Tt;
971
+ function wa(e) {
972
+ const t = Ia(e.label) ?? At;
973
973
  return /* @__PURE__ */ a(t, { "aria-hidden": "true", className: "ds:size-5" });
974
974
  }
975
- function Be(e) {
975
+ function Oe(e) {
976
976
  return xe(e, "yyyy-MM-dd");
977
977
  }
978
- const Ia = [
978
+ const Ca = [
979
979
  "ds:relative ds:flex ds:items-center ds:justify-center",
980
980
  "ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
981
981
  "ds:rounded-[var(--radius-sm)]",
@@ -985,7 +985,7 @@ const Ia = [
985
985
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
986
986
  "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
987
987
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
988
- ].join(" "), wa = Ie(Ia, {
988
+ ].join(" "), Ma = Ie(Ca, {
989
989
  variants: {
990
990
  state: {
991
991
  available: "ds:cursor-pointer ds:text-[var(--foreground)] ds:hover:bg-[var(--muted)]/30",
@@ -996,93 +996,93 @@ const Ia = [
996
996
  },
997
997
  defaultVariants: { state: "unavailable" }
998
998
  });
999
- function et({
999
+ function at({
1000
1000
  availableDates: e,
1001
1001
  selectedDate: t,
1002
1002
  onSelectDate: s,
1003
1003
  locale: i,
1004
1004
  loading: n
1005
1005
  }) {
1006
- const { t: o } = T(), c = I(() => t ? fe(ee(t)) : e.length > 0 ? fe(ee(e[0])) : fe(/* @__PURE__ */ new Date()), [t, e]), [l, d] = H(c), [p, h] = H(null), u = I(() => {
1007
- const S = fe(l), v = It(l), r = S.getDay(), E = v.getDate(), M = [];
1008
- for (let b = r; b > 0; b -= 1) {
1009
- const N = new Date(S);
1010
- N.setDate(S.getDate() - b), M.push(N);
1006
+ const { t: o } = _(), m = C(() => t ? ue(ae(t)) : e.length > 0 ? ue(ae(e[0])) : ue(/* @__PURE__ */ new Date()), [t, e]), [c, d] = q(m), [p, f] = q(null), u = C(() => {
1007
+ const S = ue(c), b = Ct(c), r = S.getDay(), O = b.getDate(), D = [];
1008
+ for (let y = r; y > 0; y -= 1) {
1009
+ const I = new Date(S);
1010
+ I.setDate(S.getDate() - y), D.push(I);
1011
1011
  }
1012
- for (let b = 0; b < E; b += 1) {
1013
- const N = new Date(S);
1014
- N.setDate(S.getDate() + b), M.push(N);
1012
+ for (let y = 0; y < O; y += 1) {
1013
+ const I = new Date(S);
1014
+ I.setDate(S.getDate() + y), D.push(I);
1015
1015
  }
1016
- for (; M.length < 42; ) {
1017
- const b = M[M.length - 1], N = new Date(b);
1018
- N.setDate(b.getDate() + 1), M.push(N);
1016
+ for (; D.length < 42; ) {
1017
+ const y = D[D.length - 1], I = new Date(y);
1018
+ I.setDate(y.getDate() + 1), D.push(I);
1019
1019
  }
1020
- return M;
1021
- }, [l]), x = I(() => {
1020
+ return D;
1021
+ }, [c]), x = C(() => {
1022
1022
  try {
1023
1023
  return new Intl.DateTimeFormat(i, {
1024
1024
  month: "long",
1025
1025
  year: "numeric"
1026
- }).format(l);
1026
+ }).format(c);
1027
1027
  } catch {
1028
- return xe(l, "MMMM yyyy");
1028
+ return xe(c, "MMMM yyyy");
1029
1029
  }
1030
- }, [l, i]), g = I(() => {
1030
+ }, [c, i]), k = C(() => {
1031
1031
  const S = new Date(2024, 0, 7);
1032
- return Array.from({ length: 7 }, (v, r) => {
1033
- const E = new Date(S);
1034
- E.setDate(S.getDate() + r);
1032
+ return Array.from({ length: 7 }, (b, r) => {
1033
+ const O = new Date(S);
1034
+ O.setDate(S.getDate() + r);
1035
1035
  try {
1036
- return new Intl.DateTimeFormat(i, { weekday: "short" }).format(E);
1036
+ return new Intl.DateTimeFormat(i, { weekday: "short" }).format(O);
1037
1037
  } catch {
1038
- return xe(E, "EEE");
1038
+ return xe(O, "EEE");
1039
1039
  }
1040
1040
  });
1041
- }, [i]), k = I(() => new Set(e), [e]), y = ae(
1042
- (S) => k.has(Be(S)),
1043
- [k]
1044
- ), w = I(() => {
1041
+ }, [i]), h = C(() => new Set(e), [e]), v = ie(
1042
+ (S) => h.has(Oe(S)),
1043
+ [h]
1044
+ ), w = C(() => {
1045
1045
  if (p) return p;
1046
- if (t) return ee(t);
1046
+ if (t) return ae(t);
1047
1047
  const S = u.find(
1048
- (v) => ye(v, l) && y(v)
1048
+ (b) => ye(b, c) && v(b)
1049
1049
  );
1050
- return S || (u.find((v) => ye(v, l)) ?? null);
1051
- }, [p, t, u, l, y]), A = ae(
1052
- (S, v) => {
1050
+ return S || (u.find((b) => ye(b, c)) ?? null);
1051
+ }, [p, t, u, c, v]), N = ie(
1052
+ (S, b) => {
1053
1053
  let r = null;
1054
1054
  switch (S.key) {
1055
1055
  case "ArrowLeft":
1056
- r = new Date(v), r.setDate(v.getDate() - 1);
1056
+ r = new Date(b), r.setDate(b.getDate() - 1);
1057
1057
  break;
1058
1058
  case "ArrowRight":
1059
- r = new Date(v), r.setDate(v.getDate() + 1);
1059
+ r = new Date(b), r.setDate(b.getDate() + 1);
1060
1060
  break;
1061
1061
  case "ArrowUp":
1062
- r = new Date(v), r.setDate(v.getDate() - 7);
1062
+ r = new Date(b), r.setDate(b.getDate() - 7);
1063
1063
  break;
1064
1064
  case "ArrowDown":
1065
- r = new Date(v), r.setDate(v.getDate() + 7);
1065
+ r = new Date(b), r.setDate(b.getDate() + 7);
1066
1066
  break;
1067
1067
  case "Home":
1068
- r = new Date(v), r.setDate(v.getDate() - v.getDay());
1068
+ r = new Date(b), r.setDate(b.getDate() - b.getDay());
1069
1069
  break;
1070
1070
  case "End":
1071
- r = new Date(v), r.setDate(v.getDate() + (6 - v.getDay()));
1071
+ r = new Date(b), r.setDate(b.getDate() + (6 - b.getDay()));
1072
1072
  break;
1073
1073
  case "Enter":
1074
1074
  case " ": {
1075
- S.preventDefault(), y(v) && s(Be(v));
1075
+ S.preventDefault(), v(b) && s(Oe(b));
1076
1076
  return;
1077
1077
  }
1078
1078
  default:
1079
1079
  return;
1080
1080
  }
1081
- r && (S.preventDefault(), ye(r, l) || d(fe(r)), h(r));
1081
+ r && (S.preventDefault(), ye(r, c) || d(ue(r)), f(r));
1082
1082
  },
1083
- [y, s, l]
1083
+ [v, s, c]
1084
1084
  );
1085
- return n ? /* @__PURE__ */ f(
1085
+ return n ? /* @__PURE__ */ g(
1086
1086
  "div",
1087
1087
  {
1088
1088
  role: "status",
@@ -1091,21 +1091,21 @@ function et({
1091
1091
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
1092
1092
  children: [
1093
1093
  /* @__PURE__ */ a(Se, { variant: "text", width: "40%" }),
1094
- /* @__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}`)) })
1094
+ /* @__PURE__ */ a("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (S, b) => /* @__PURE__ */ a(Se, { variant: "rounded", height: "2.5rem" }, `mg-skel-${b}`)) })
1095
1095
  ]
1096
1096
  }
1097
- ) : /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1098
- /* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1097
+ ) : /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1098
+ /* @__PURE__ */ g("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1099
1099
  /* @__PURE__ */ a(
1100
- Fe,
1100
+ $e,
1101
1101
  {
1102
- icon: /* @__PURE__ */ a(wt, {}),
1102
+ icon: /* @__PURE__ */ a(Mt, {}),
1103
1103
  "aria-label": o("booking.previousMonth"),
1104
1104
  size: "sm",
1105
1105
  intent: "ghost",
1106
1106
  flipIconInRtl: !0,
1107
1107
  onClick: () => {
1108
- d((S) => oa(S)), h(null);
1108
+ d((S) => da(S)), f(null);
1109
1109
  }
1110
1110
  }
1111
1111
  ),
@@ -1118,20 +1118,20 @@ function et({
1118
1118
  }
1119
1119
  ),
1120
1120
  /* @__PURE__ */ a(
1121
- Fe,
1121
+ $e,
1122
1122
  {
1123
- icon: /* @__PURE__ */ a(Ct, {}),
1123
+ icon: /* @__PURE__ */ a(Dt, {}),
1124
1124
  "aria-label": o("booking.nextMonth"),
1125
1125
  size: "sm",
1126
1126
  intent: "ghost",
1127
1127
  flipIconInRtl: !0,
1128
1128
  onClick: () => {
1129
- d((S) => Ue(S, 1)), h(null);
1129
+ d((S) => Ze(S, 1)), f(null);
1130
1130
  }
1131
1131
  }
1132
1132
  )
1133
1133
  ] }),
1134
- /* @__PURE__ */ f(
1134
+ /* @__PURE__ */ g(
1135
1135
  "div",
1136
1136
  {
1137
1137
  role: "grid",
@@ -1143,24 +1143,24 @@ function et({
1143
1143
  {
1144
1144
  role: "row",
1145
1145
  className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
1146
- children: g.map((S, v) => /* @__PURE__ */ a(
1146
+ children: k.map((S, b) => /* @__PURE__ */ a(
1147
1147
  "div",
1148
1148
  {
1149
1149
  role: "columnheader",
1150
1150
  className: "type-meta ds:text-center ds:text-[var(--muted-foreground)] ds:font-[var(--font-weight-medium)]",
1151
1151
  children: S
1152
1152
  },
1153
- `wd-${v}`
1153
+ `wd-${b}`
1154
1154
  ))
1155
1155
  }
1156
1156
  ),
1157
- Array.from({ length: 6 }, (S, v) => /* @__PURE__ */ a(
1157
+ Array.from({ length: 6 }, (S, b) => /* @__PURE__ */ a(
1158
1158
  "div",
1159
1159
  {
1160
1160
  role: "row",
1161
1161
  className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
1162
- children: u.slice(v * 7, v * 7 + 7).map((r, E) => {
1163
- const M = v * 7 + E, b = ye(r, l), N = b && y(r), F = t ? ze(r, ee(t)) : !1, B = b ? F ? "selected" : N ? "available" : "unavailable" : "outside", J = w ? ze(w, r) : !1, P = (() => {
1162
+ children: u.slice(b * 7, b * 7 + 7).map((r, O) => {
1163
+ const D = b * 7 + O, y = ye(r, c), I = y && v(r), F = t ? Ke(r, ae(t)) : !1, A = y ? F ? "selected" : I ? "available" : "unavailable" : "outside", Z = w ? Ke(w, r) : !1, E = (() => {
1164
1164
  try {
1165
1165
  return new Intl.DateTimeFormat(i, {
1166
1166
  dateStyle: "full"
@@ -1174,30 +1174,30 @@ function et({
1174
1174
  {
1175
1175
  type: "button",
1176
1176
  role: "gridcell",
1177
- "aria-label": P,
1177
+ "aria-label": E,
1178
1178
  "aria-selected": F || void 0,
1179
- "aria-disabled": !N || void 0,
1180
- tabIndex: J ? 0 : -1,
1181
- disabled: !N,
1179
+ "aria-disabled": !I || void 0,
1180
+ tabIndex: Z ? 0 : -1,
1181
+ disabled: !I,
1182
1182
  onClick: () => {
1183
- N && s(Be(r));
1183
+ I && s(Oe(r));
1184
1184
  },
1185
- onKeyDown: (z) => A(z, r),
1186
- className: wa({ state: B }),
1185
+ onKeyDown: (z) => N(z, r),
1186
+ className: Ma({ state: A }),
1187
1187
  children: /* @__PURE__ */ a("span", { "aria-hidden": "true", children: r.getDate() })
1188
1188
  },
1189
- `mg-cell-${M}`
1189
+ `mg-cell-${D}`
1190
1190
  );
1191
1191
  })
1192
1192
  },
1193
- `mg-row-${v}`
1193
+ `mg-row-${b}`
1194
1194
  ))
1195
1195
  ]
1196
1196
  }
1197
1197
  )
1198
1198
  ] });
1199
1199
  }
1200
- const Ca = Ie(
1200
+ const Da = Ie(
1201
1201
  [
1202
1202
  "ds:relative ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-md)]",
1203
1203
  "ds:min-h-[var(--min-target-size)]",
@@ -1223,52 +1223,52 @@ const Ca = Ie(
1223
1223
  defaultVariants: { state: "idle" }
1224
1224
  }
1225
1225
  );
1226
- function Ma({
1226
+ function Ta({
1227
1227
  services: e,
1228
1228
  selectedServiceId: t,
1229
1229
  onSelect: s
1230
1230
  }) {
1231
- const { t: i } = T(), n = He(), [o, c] = H(() => {
1231
+ const { t: i } = _(), n = Ue(), [o, m] = q(() => {
1232
1232
  if (t) {
1233
- const h = e.findIndex((u) => u.id === t);
1234
- if (h >= 0) return h;
1233
+ const f = e.findIndex((u) => u.id === t);
1234
+ if (f >= 0) return f;
1235
1235
  }
1236
1236
  return 0;
1237
- }), l = te(/* @__PURE__ */ new Map()), d = ae((h) => {
1237
+ }), c = se(/* @__PURE__ */ new Map()), d = ie((f) => {
1238
1238
  var u;
1239
- (u = l.current.get(h)) == null || u.focus();
1240
- }, []), p = ae(
1241
- (h, u, x) => {
1242
- const g = e.length;
1243
- if (g !== 0)
1244
- switch (h.key) {
1239
+ (u = c.current.get(f)) == null || u.focus();
1240
+ }, []), p = ie(
1241
+ (f, u, x) => {
1242
+ const k = e.length;
1243
+ if (k !== 0)
1244
+ switch (f.key) {
1245
1245
  case "ArrowDown":
1246
1246
  case "ArrowRight": {
1247
- h.preventDefault();
1248
- const k = (u + 1) % g;
1249
- c(k), d(k);
1247
+ f.preventDefault();
1248
+ const h = (u + 1) % k;
1249
+ m(h), d(h);
1250
1250
  break;
1251
1251
  }
1252
1252
  case "ArrowUp":
1253
1253
  case "ArrowLeft": {
1254
- h.preventDefault();
1255
- const k = (u - 1 + g) % g;
1256
- c(k), d(k);
1254
+ f.preventDefault();
1255
+ const h = (u - 1 + k) % k;
1256
+ m(h), d(h);
1257
1257
  break;
1258
1258
  }
1259
1259
  case "Home": {
1260
- h.preventDefault(), c(0), d(0);
1260
+ f.preventDefault(), m(0), d(0);
1261
1261
  break;
1262
1262
  }
1263
1263
  case "End": {
1264
- h.preventDefault();
1265
- const k = g - 1;
1266
- c(k), d(k);
1264
+ f.preventDefault();
1265
+ const h = k - 1;
1266
+ m(h), d(h);
1267
1267
  break;
1268
1268
  }
1269
1269
  case "Enter":
1270
1270
  case " ": {
1271
- h.preventDefault(), s(x);
1271
+ f.preventDefault(), s(x);
1272
1272
  break;
1273
1273
  }
1274
1274
  }
@@ -1282,26 +1282,26 @@ function Ma({
1282
1282
  "aria-label": i("booking.serviceListLabel"),
1283
1283
  id: n,
1284
1284
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
1285
- children: e.map((h, u) => {
1286
- const x = t === h.id, g = o === u, k = i("booking.serviceCardLabel", {
1287
- label: h.label,
1288
- duration: h.durationMin
1289
- }), y = Na(h);
1290
- return /* @__PURE__ */ f(
1285
+ children: e.map((f, u) => {
1286
+ const x = t === f.id, k = o === u, h = i("booking.serviceCardLabel", {
1287
+ label: f.label,
1288
+ duration: f.durationMin
1289
+ }), v = wa(f);
1290
+ return /* @__PURE__ */ g(
1291
1291
  "button",
1292
1292
  {
1293
1293
  ref: (w) => {
1294
- w ? l.current.set(u, w) : l.current.delete(u);
1294
+ w ? c.current.set(u, w) : c.current.delete(u);
1295
1295
  },
1296
1296
  type: "button",
1297
1297
  role: "radio",
1298
1298
  "aria-checked": x,
1299
- "aria-label": k,
1300
- tabIndex: g ? 0 : -1,
1301
- onClick: () => s(h.id),
1302
- onFocus: () => c(u),
1303
- onKeyDown: (w) => p(w, u, h.id),
1304
- className: Ca({
1299
+ "aria-label": h,
1300
+ tabIndex: k ? 0 : -1,
1301
+ onClick: () => s(f.id),
1302
+ onFocus: () => m(u),
1303
+ onKeyDown: (w) => p(w, u, f.id),
1304
+ className: Da({
1305
1305
  state: x ? "selected" : "idle"
1306
1306
  }),
1307
1307
  children: [
@@ -1310,22 +1310,22 @@ function Ma({
1310
1310
  {
1311
1311
  "aria-hidden": "true",
1312
1312
  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)]",
1313
- children: y
1313
+ children: v
1314
1314
  }
1315
1315
  ),
1316
- /* @__PURE__ */ f("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
1317
- /* @__PURE__ */ a("span", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]", children: h.label }),
1318
- /* @__PURE__ */ a("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: i("booking.serviceSummary", { minutes: h.durationMin }) })
1316
+ /* @__PURE__ */ g("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
1317
+ /* @__PURE__ */ a("span", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]", children: f.label }),
1318
+ /* @__PURE__ */ a("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: i("booking.serviceSummary", { minutes: f.durationMin }) })
1319
1319
  ] })
1320
1320
  ]
1321
1321
  },
1322
- h.id
1322
+ f.id
1323
1323
  );
1324
1324
  })
1325
1325
  }
1326
1326
  );
1327
1327
  }
1328
- const Da = Ie(
1328
+ const _a = Ie(
1329
1329
  [
1330
1330
  "ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-2xs)]",
1331
1331
  "ds:min-h-[var(--min-target-size)]",
@@ -1351,16 +1351,16 @@ const Da = Ie(
1351
1351
  defaultVariants: { state: "idle" }
1352
1352
  }
1353
1353
  );
1354
- function Ta(e) {
1354
+ function Aa(e) {
1355
1355
  const [t] = e.split(":").map((i) => parseInt(i, 10)), s = Number.isFinite(t) ? t : 0;
1356
1356
  return s < 12 ? "morning" : s < 17 ? "afternoon" : "evening";
1357
1357
  }
1358
- const _a = {
1359
- morning: Dt,
1360
- afternoon: ia,
1361
- evening: Mt
1358
+ const Ba = {
1359
+ morning: _t,
1360
+ afternoon: oa,
1361
+ evening: Tt
1362
1362
  };
1363
- function tt({
1363
+ function st({
1364
1364
  date: e,
1365
1365
  slots: t,
1366
1366
  selectedSlotKey: s,
@@ -1368,27 +1368,27 @@ function tt({
1368
1368
  loading: n,
1369
1369
  locale: o
1370
1370
  }) {
1371
- const { t: c } = T(), l = I(() => {
1371
+ const { t: m } = _(), c = C(() => {
1372
1372
  try {
1373
1373
  return new Intl.DateTimeFormat(o, {
1374
1374
  weekday: "long",
1375
1375
  day: "numeric",
1376
1376
  month: "long"
1377
- }).format(ee(e));
1377
+ }).format(ae(e));
1378
1378
  } catch {
1379
1379
  return e;
1380
1380
  }
1381
- }, [e, o]), d = I(() => {
1381
+ }, [e, o]), d = C(() => {
1382
1382
  const u = {
1383
1383
  morning: [],
1384
1384
  afternoon: [],
1385
1385
  evening: []
1386
1386
  };
1387
1387
  for (const x of t)
1388
- u[Ta(x.time)].push(x);
1388
+ u[Aa(x.time)].push(x);
1389
1389
  return u;
1390
- }, [t]), p = t.filter((u) => u.available).length, h = ["morning", "afternoon", "evening"];
1391
- return n ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1390
+ }, [t]), p = t.filter((u) => u.available).length, f = ["morning", "afternoon", "evening"];
1391
+ return n ? /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1392
1392
  /* @__PURE__ */ a(Se, { variant: "text", width: "60%" }),
1393
1393
  [0, 1].map((u) => /* @__PURE__ */ a(
1394
1394
  "div",
@@ -1398,56 +1398,56 @@ function tt({
1398
1398
  },
1399
1399
  u
1400
1400
  ))
1401
- ] }) : p === 0 ? /* @__PURE__ */ a(Ge, { variant: "no-results", title: c("booking.noSlotsForDate") }) : /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1402
- /* @__PURE__ */ f("div", { className: "ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1403
- /* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
1401
+ ] }) : p === 0 ? /* @__PURE__ */ a(Ye, { variant: "no-results", title: m("booking.noSlotsForDate") }) : /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1402
+ /* @__PURE__ */ g("div", { className: "ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1403
+ /* @__PURE__ */ g("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
1404
1404
  /* @__PURE__ */ a(
1405
- Kt,
1405
+ qt,
1406
1406
  {
1407
1407
  "aria-hidden": "true",
1408
1408
  className: "ds:size-4 ds:text-[color:var(--accent)]"
1409
1409
  }
1410
1410
  ),
1411
- /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: l })
1411
+ /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: c })
1412
1412
  ] }),
1413
- /* @__PURE__ */ a("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: c("booking.slotsAvailable", { count: p }) })
1413
+ /* @__PURE__ */ a("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: m("booking.slotsAvailable", { count: p }) })
1414
1414
  ] }),
1415
- h.map((u) => {
1415
+ f.map((u) => {
1416
1416
  const x = d[u];
1417
1417
  if (x.length === 0) return null;
1418
- const g = _a[u];
1419
- return /* @__PURE__ */ f(
1418
+ const k = Ba[u];
1419
+ return /* @__PURE__ */ g(
1420
1420
  "div",
1421
1421
  {
1422
1422
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
1423
1423
  children: [
1424
- /* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
1425
- /* @__PURE__ */ a(g, { "aria-hidden": "true", className: "ds:size-3.5" }),
1426
- /* @__PURE__ */ a("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children: c(`booking.timeOfDay.${u}`) })
1424
+ /* @__PURE__ */ g("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
1425
+ /* @__PURE__ */ a(k, { "aria-hidden": "true", className: "ds:size-3.5" }),
1426
+ /* @__PURE__ */ a("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children: m(`booking.timeOfDay.${u}`) })
1427
1427
  ] }),
1428
1428
  /* @__PURE__ */ a(
1429
1429
  "div",
1430
1430
  {
1431
1431
  role: "group",
1432
- "aria-label": c(`booking.timeOfDay.${u}`),
1432
+ "aria-label": m(`booking.timeOfDay.${u}`),
1433
1433
  className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)] ds:sm:grid-cols-4",
1434
- children: x.map((k) => {
1435
- const y = k.key === s, w = k.available ? y ? "selected" : "idle" : "unavailable";
1434
+ children: x.map((h) => {
1435
+ const v = h.key === s, w = h.available ? v ? "selected" : "idle" : "unavailable";
1436
1436
  return /* @__PURE__ */ a(
1437
1437
  "button",
1438
1438
  {
1439
1439
  type: "button",
1440
- "data-slot-id": k.key,
1441
- disabled: !k.available,
1442
- "aria-pressed": y,
1443
- "aria-label": c("booking.slotAvailableLabel", {
1444
- time: k.time
1440
+ "data-slot-id": h.key,
1441
+ disabled: !h.available,
1442
+ "aria-pressed": v,
1443
+ "aria-label": m("booking.slotAvailableLabel", {
1444
+ time: h.time
1445
1445
  }),
1446
- onClick: () => k.available && i(k),
1447
- className: Da({ state: w }),
1448
- children: k.time
1446
+ onClick: () => h.available && i(h),
1447
+ className: _a({ state: w }),
1448
+ children: h.time
1449
1449
  },
1450
- k.key
1450
+ h.key
1451
1451
  );
1452
1452
  })
1453
1453
  }
@@ -1459,12 +1459,12 @@ function tt({
1459
1459
  })
1460
1460
  ] });
1461
1461
  }
1462
- function at({ value: e, onChange: t }) {
1463
- const { t: s } = T(), i = [
1462
+ function it({ value: e, onChange: t }) {
1463
+ const { t: s } = _(), i = [
1464
1464
  { value: "private", label: s("booking.insurance.private") },
1465
1465
  { value: "public", label: s("booking.insurance.public") }
1466
1466
  ];
1467
- return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1467
+ return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1468
1468
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: s("booking.insurance.heading") }),
1469
1469
  /* @__PURE__ */ a(
1470
1470
  we,
@@ -1480,12 +1480,12 @@ function at({ value: e, onChange: t }) {
1480
1480
  )
1481
1481
  ] });
1482
1482
  }
1483
- function st({ specialties: e, value: t, onChange: s }) {
1484
- const { t: i } = T(), n = e.map((o) => ({
1483
+ function nt({ specialties: e, value: t, onChange: s }) {
1484
+ const { t: i } = _(), n = e.map((o) => ({
1485
1485
  value: o.id,
1486
1486
  label: o.label
1487
1487
  }));
1488
- return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1488
+ return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1489
1489
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: i("booking.specialty.heading") }),
1490
1490
  /* @__PURE__ */ a(
1491
1491
  we,
@@ -1499,33 +1499,33 @@ function st({ specialties: e, value: t, onChange: s }) {
1499
1499
  )
1500
1500
  ] });
1501
1501
  }
1502
- function it({ services: e, value: t, onChange: s, compact: i }) {
1503
- const { t: n } = T();
1502
+ function ot({ services: e, value: t, onChange: s, compact: i }) {
1503
+ const { t: n } = _();
1504
1504
  if (i) {
1505
- const o = e.map((c) => ({
1506
- value: c.id,
1507
- label: `${c.label} · ${n("booking.serviceSummary", {
1508
- minutes: c.durationMin
1505
+ const o = e.map((m) => ({
1506
+ value: m.id,
1507
+ label: `${m.label} · ${n("booking.serviceSummary", {
1508
+ minutes: m.durationMin
1509
1509
  })}`
1510
1510
  }));
1511
- return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1511
+ return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1512
1512
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: n("booking.service.heading") }),
1513
1513
  /* @__PURE__ */ a(
1514
1514
  we,
1515
1515
  {
1516
1516
  options: o,
1517
1517
  value: t ?? "",
1518
- onValueChange: (c) => s(c),
1518
+ onValueChange: (m) => s(m),
1519
1519
  placeholder: n("booking.service.placeholder"),
1520
1520
  "aria-label": n("booking.service.heading")
1521
1521
  }
1522
1522
  )
1523
1523
  ] });
1524
1524
  }
1525
- return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1525
+ return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1526
1526
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: n("booking.service.heading") }),
1527
1527
  /* @__PURE__ */ a(
1528
- Ma,
1528
+ Ta,
1529
1529
  {
1530
1530
  services: e,
1531
1531
  selectedServiceId: t,
@@ -1534,18 +1534,18 @@ function it({ services: e, value: t, onChange: s, compact: i }) {
1534
1534
  )
1535
1535
  ] });
1536
1536
  }
1537
- function nt({ operators: e, value: t, onChange: s }) {
1538
- const { t: i } = T(), n = [
1539
- { value: he, label: i("booking.operator.all") },
1537
+ function rt({ operators: e, value: t, onChange: s }) {
1538
+ const { t: i } = _(), n = [
1539
+ { value: pe, label: i("booking.operator.all") },
1540
1540
  ...e.map((o) => ({ value: o.id, label: o.name }))
1541
1541
  ];
1542
- return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1542
+ return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1543
1543
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: i("booking.operator.heading") }),
1544
1544
  /* @__PURE__ */ a(
1545
1545
  we,
1546
1546
  {
1547
1547
  options: n,
1548
- value: t ?? he,
1548
+ value: t ?? pe,
1549
1549
  onValueChange: (o) => s(o),
1550
1550
  placeholder: i("booking.operator.placeholder"),
1551
1551
  "aria-label": i("booking.operator.heading")
@@ -1553,103 +1553,103 @@ function nt({ operators: e, value: t, onChange: s }) {
1553
1553
  )
1554
1554
  ] });
1555
1555
  }
1556
- function ot({
1556
+ function dt({
1557
1557
  customSlot: e
1558
1558
  }) {
1559
- const { t } = T();
1560
- return e ? /* @__PURE__ */ a(Z, { children: e }) : /* @__PURE__ */ f(L, { variant: "warning", children: [
1559
+ const { t } = _();
1560
+ return e ? /* @__PURE__ */ a(Y, { children: e }) : /* @__PURE__ */ g(L, { variant: "warning", children: [
1561
1561
  /* @__PURE__ */ a(L.Title, { as: "h4", children: t("booking.onboardingIncomplete.title") }),
1562
1562
  /* @__PURE__ */ a(L.Description, { children: t("booking.onboardingIncomplete.description") })
1563
1563
  ] });
1564
1564
  }
1565
- function rt({
1565
+ function lt({
1566
1566
  nextAvailableDate: e,
1567
1567
  onJump: t,
1568
1568
  locale: s
1569
1569
  }) {
1570
- const { t: i } = T(), n = I(() => {
1570
+ const { t: i } = _(), n = C(() => {
1571
1571
  try {
1572
1572
  return new Intl.DateTimeFormat(s, { dateStyle: "long" }).format(
1573
- ee(e)
1573
+ ae(e)
1574
1574
  );
1575
1575
  } catch {
1576
1576
  return e;
1577
1577
  }
1578
1578
  }, [e, s]);
1579
- return /* @__PURE__ */ f(L, { variant: "info", children: [
1579
+ return /* @__PURE__ */ g(L, { variant: "info", children: [
1580
1580
  /* @__PURE__ */ a(L.Description, { children: i("booking.nextAvailable.description", { date: n }) }),
1581
- /* @__PURE__ */ a(L.Action, { children: /* @__PURE__ */ a(se, { intent: "secondary", size: "sm", onClick: t, children: i("booking.nextAvailable.cta") }) })
1581
+ /* @__PURE__ */ a(L.Action, { children: /* @__PURE__ */ a(ne, { intent: "secondary", size: "sm", onClick: t, children: i("booking.nextAvailable.cta") }) })
1582
1582
  ] });
1583
1583
  }
1584
- function Aa({
1584
+ function Oa({
1585
1585
  snapshot: e,
1586
1586
  operators: t,
1587
1587
  specialties: s,
1588
1588
  services: i,
1589
1589
  locale: n,
1590
1590
  mode: o,
1591
- showModify: c,
1592
- onReset: l,
1591
+ showModify: m,
1592
+ onReset: c,
1593
1593
  onModify: d
1594
1594
  }) {
1595
- const { t: p } = T(), u = (e.details.confirmationChannels ?? ["email"]).map(
1596
- (A) => p(`booking.confirmation.channel.${A}`)
1595
+ const { t: p } = _(), u = (e.details.confirmationChannels ?? ["email"]).map(
1596
+ (N) => p(`booking.confirmation.channel.${N}`)
1597
1597
  ), x = o === "demo" ? p("booking.success.descriptionDemo") : u.length > 1 ? p("booking.success.descriptionMultiple", {
1598
1598
  channels: u.join(" · ")
1599
- }) : p("booking.success.descriptionSingle", { channel: u[0] }), g = I(() => {
1599
+ }) : p("booking.success.descriptionSingle", { channel: u[0] }), k = C(() => {
1600
1600
  if (e.date)
1601
1601
  try {
1602
1602
  return new Intl.DateTimeFormat(n, {
1603
1603
  weekday: "long",
1604
1604
  day: "numeric",
1605
1605
  month: "long"
1606
- }).format(ee(e.date));
1606
+ }).format(ae(e.date));
1607
1607
  } catch {
1608
1608
  return e.date;
1609
1609
  }
1610
- }, [e.date, n]), k = e.operatorId ? t.find((A) => A.id === e.operatorId) : void 0, y = e.specialtyId ? s.find((A) => A.id === e.specialtyId) : void 0, w = e.serviceId ? i.find((A) => A.id === e.serviceId) : void 0;
1611
- return /* @__PURE__ */ f(
1610
+ }, [e.date, n]), h = e.operatorId ? t.find((N) => N.id === e.operatorId) : void 0, v = e.specialtyId ? s.find((N) => N.id === e.specialtyId) : void 0, w = e.serviceId ? i.find((N) => N.id === e.serviceId) : void 0;
1611
+ return /* @__PURE__ */ g(
1612
1612
  "div",
1613
1613
  {
1614
1614
  "data-component": "booking-success",
1615
1615
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
1616
1616
  children: [
1617
- /* @__PURE__ */ f(L, { variant: "success", children: [
1617
+ /* @__PURE__ */ g(L, { variant: "success", children: [
1618
1618
  /* @__PURE__ */ a(L.Title, { as: "h3", children: p("booking.success.heading") }),
1619
1619
  /* @__PURE__ */ a(L.Description, { children: x })
1620
1620
  ] }),
1621
- /* @__PURE__ */ a("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[var(--secondary)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ f("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: [
1622
- y ? /* @__PURE__ */ f(Z, { children: [
1621
+ /* @__PURE__ */ a("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[var(--secondary)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ g("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: [
1622
+ v ? /* @__PURE__ */ g(Y, { children: [
1623
1623
  /* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: p("booking.success.summarySpecialty") }),
1624
- /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: y.label })
1624
+ /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: v.label })
1625
1625
  ] }) : null,
1626
- w ? /* @__PURE__ */ f(Z, { children: [
1626
+ w ? /* @__PURE__ */ g(Y, { children: [
1627
1627
  /* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: p("booking.success.summaryService") }),
1628
1628
  /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: w.label })
1629
1629
  ] }) : null,
1630
- g ? /* @__PURE__ */ f(Z, { children: [
1630
+ k ? /* @__PURE__ */ g(Y, { children: [
1631
1631
  /* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: p("booking.success.summaryDate") }),
1632
- /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: g })
1632
+ /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: k })
1633
1633
  ] }) : null,
1634
1634
  /* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: p("booking.success.summaryTime") }),
1635
1635
  /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: e.slot.time }),
1636
- k ? /* @__PURE__ */ f(Z, { children: [
1636
+ h ? /* @__PURE__ */ g(Y, { children: [
1637
1637
  /* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: p("booking.success.summaryProvider") }),
1638
- /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: k.name })
1638
+ /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: h.name })
1639
1639
  ] }) : null
1640
1640
  ] }) }),
1641
- /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
1642
- /* @__PURE__ */ a(se, { intent: "secondary", size: "md", onClick: l, children: p("booking.success.bookAnother") }),
1643
- c ? /* @__PURE__ */ a(se, { intent: "ghost", size: "md", onClick: d, children: p("booking.success.modifyBooking") }) : null
1641
+ /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
1642
+ /* @__PURE__ */ a(ne, { intent: "secondary", size: "md", onClick: c, children: p("booking.success.bookAnother") }),
1643
+ m ? /* @__PURE__ */ a(ne, { intent: "ghost", size: "md", onClick: d, children: p("booking.success.modifyBooking") }) : null
1644
1644
  ] })
1645
1645
  ]
1646
1646
  }
1647
1647
  );
1648
1648
  }
1649
- function dt({ customSlot: e }) {
1650
- const { t } = T();
1651
- return e ? /* @__PURE__ */ a(Z, { children: e }) : /* @__PURE__ */ a(
1652
- Ge,
1649
+ function ct({ customSlot: e }) {
1650
+ const { t } = _();
1651
+ return e ? /* @__PURE__ */ a(Y, { children: e }) : /* @__PURE__ */ a(
1652
+ Ye,
1653
1653
  {
1654
1654
  variant: "no-results",
1655
1655
  title: t("booking.emptyServices.title"),
@@ -1657,192 +1657,200 @@ function dt({ customSlot: e }) {
1657
1657
  }
1658
1658
  );
1659
1659
  }
1660
- function Ba(e) {
1660
+ function Ea(e) {
1661
1661
  const {
1662
1662
  cascade: t,
1663
1663
  inputs: s,
1664
1664
  value: i,
1665
1665
  onChange: n,
1666
1666
  onSubmit: o,
1667
- emptyServicesSlot: c,
1668
- onboardingIncompleteSlot: l,
1669
- loadingSlots: d,
1670
- submitting: p,
1671
- locale: h,
1672
- detailsProps: u
1673
- } = e, { t: x } = T();
1674
- return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1667
+ emptyServicesSlot: m,
1668
+ onboardingIncompleteSlot: c,
1669
+ loadingDates: d,
1670
+ loadingSlots: p,
1671
+ onDateSelect: f,
1672
+ submitting: u,
1673
+ locale: x,
1674
+ detailsProps: k
1675
+ } = e, { t: h } = _();
1676
+ return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1675
1677
  t.gates.insurance ? /* @__PURE__ */ a(
1676
- at,
1678
+ it,
1677
1679
  {
1678
1680
  value: i.insuranceType,
1679
- onChange: (g) => n(Ye(i, g))
1681
+ onChange: (v) => n(Je(i, v))
1680
1682
  }
1681
1683
  ) : null,
1682
1684
  t.gates.specialty ? /* @__PURE__ */ a(
1683
- st,
1685
+ nt,
1684
1686
  {
1685
1687
  specialties: t.filtered.specialties,
1686
1688
  value: i.specialtyId,
1687
- onChange: (g) => n(Ze(i, g))
1689
+ onChange: (v) => n(Xe(i, v))
1688
1690
  }
1689
1691
  ) : null,
1690
- t.gates.service ? t.filtered.services.length === 0 ? /* @__PURE__ */ a(dt, { customSlot: c }) : /* @__PURE__ */ a(
1691
- it,
1692
+ t.gates.service ? t.filtered.services.length === 0 ? /* @__PURE__ */ a(ct, { customSlot: m }) : /* @__PURE__ */ a(
1693
+ ot,
1692
1694
  {
1693
1695
  services: t.filtered.services,
1694
1696
  value: i.serviceId,
1695
- onChange: (g) => n(Je(i, g))
1697
+ onChange: (v) => n(We(i, v))
1696
1698
  }
1697
1699
  ) : null,
1698
- t.gates.onboardingIncomplete ? /* @__PURE__ */ a(ot, { customSlot: l }) : null,
1700
+ t.gates.onboardingIncomplete ? /* @__PURE__ */ a(dt, { customSlot: c }) : null,
1699
1701
  t.gates.operator ? /* @__PURE__ */ a(
1700
- nt,
1702
+ rt,
1701
1703
  {
1702
1704
  operators: t.filtered.operators,
1703
1705
  value: i.operatorId,
1704
- onChange: (g) => n(Xe(i, g))
1706
+ onChange: (v) => n(Qe(i, v))
1705
1707
  }
1706
1708
  ) : null,
1707
- t.gates.date ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1708
- /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: x("booking.date.heading") }),
1709
+ t.gates.date ? /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1710
+ /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: h("booking.date.heading") }),
1709
1711
  s.availableDates.length === 0 && s.nextAvailableDate ? /* @__PURE__ */ a(
1710
- rt,
1712
+ lt,
1711
1713
  {
1712
1714
  nextAvailableDate: s.nextAvailableDate,
1713
1715
  onJump: () => n(Ne(i, s.nextAvailableDate)),
1714
- locale: h
1716
+ locale: x
1715
1717
  }
1716
1718
  ) : /* @__PURE__ */ a(
1717
- et,
1719
+ at,
1718
1720
  {
1719
1721
  availableDates: s.availableDates,
1720
1722
  selectedDate: i.date,
1721
- onSelectDate: (g) => n(Ne(i, g)),
1722
- locale: h,
1723
- loading: d
1723
+ onSelectDate: (v) => {
1724
+ n(Ne(i, v)), f == null || f(v);
1725
+ },
1726
+ locale: x,
1727
+ loading: d ?? p
1724
1728
  }
1725
1729
  )
1726
1730
  ] }) : null,
1727
- t.gates.slot && i.date ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1728
- /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: x("booking.slot.heading") }),
1731
+ t.gates.slot && i.date ? /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1732
+ /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: h("booking.slot.heading") }),
1729
1733
  /* @__PURE__ */ a(
1730
- tt,
1734
+ st,
1731
1735
  {
1732
1736
  date: i.date,
1733
1737
  slots: s.availableSlots[i.date] ?? [],
1734
1738
  selectedSlotKey: i.slotKey,
1735
- onSelect: (g) => n(We(i, g.key)),
1736
- loading: d,
1737
- locale: h
1739
+ onSelect: (v) => n(et(i, v.key)),
1740
+ loading: p,
1741
+ locale: x
1738
1742
  }
1739
1743
  )
1740
1744
  ] }) : null,
1741
1745
  t.gates.details && t.selectedSlot ? /* @__PURE__ */ a(
1742
- Pe,
1746
+ Ve,
1743
1747
  {
1744
- ...u,
1748
+ ...k,
1745
1749
  value: i.details ?? {},
1746
- onChange: (g) => n({ ...i, details: g }),
1750
+ onChange: (v) => n({ ...i, details: v }),
1747
1751
  onSubmit: o,
1748
- submitting: p,
1752
+ submitting: u,
1749
1753
  defaultPhoneCountry: e.policy.country
1750
1754
  }
1751
1755
  ) : null
1752
1756
  ] });
1753
1757
  }
1754
- function K(e, t, s = {}) {
1758
+ function $(e, t, s = {}) {
1755
1759
  const {
1756
1760
  cascade: i,
1757
1761
  inputs: n,
1758
1762
  value: o,
1759
- onChange: c,
1760
- onSubmit: l,
1763
+ onChange: m,
1764
+ onSubmit: c,
1761
1765
  emptyServicesSlot: d,
1762
1766
  onboardingIncompleteSlot: p,
1763
- loadingSlots: h,
1764
- submitting: u,
1765
- locale: x,
1766
- detailsProps: g,
1767
- policy: k
1767
+ loadingDates: f,
1768
+ loadingSlots: u,
1769
+ onDateSelect: x,
1770
+ submitting: k,
1771
+ locale: h,
1772
+ detailsProps: v,
1773
+ policy: w
1768
1774
  } = t;
1769
1775
  switch (e) {
1770
1776
  case 1:
1771
1777
  return /* @__PURE__ */ a(
1772
- at,
1778
+ it,
1773
1779
  {
1774
1780
  value: o.insuranceType,
1775
- onChange: (y) => c(Ye(o, y))
1781
+ onChange: (N) => m(Je(o, N))
1776
1782
  }
1777
1783
  );
1778
1784
  case 2:
1779
1785
  return /* @__PURE__ */ a(
1780
- st,
1786
+ nt,
1781
1787
  {
1782
1788
  specialties: i.filtered.specialties,
1783
1789
  value: o.specialtyId,
1784
- onChange: (y) => c(Ze(o, y))
1790
+ onChange: (N) => m(Xe(o, N))
1785
1791
  }
1786
1792
  );
1787
1793
  case 3:
1788
- return i.filtered.services.length === 0 ? /* @__PURE__ */ a(dt, { customSlot: d }) : i.gates.onboardingIncomplete ? /* @__PURE__ */ a(ot, { customSlot: p }) : /* @__PURE__ */ a(
1789
- it,
1794
+ return i.filtered.services.length === 0 ? /* @__PURE__ */ a(ct, { customSlot: d }) : i.gates.onboardingIncomplete ? /* @__PURE__ */ a(dt, { customSlot: p }) : /* @__PURE__ */ a(
1795
+ ot,
1790
1796
  {
1791
1797
  services: i.filtered.services,
1792
1798
  value: o.serviceId,
1793
- onChange: (y) => c(Je(o, y)),
1799
+ onChange: (N) => m(We(o, N)),
1794
1800
  compact: s.compactService
1795
1801
  }
1796
1802
  );
1797
1803
  case 4:
1798
1804
  return /* @__PURE__ */ a(
1799
- nt,
1805
+ rt,
1800
1806
  {
1801
1807
  operators: i.filtered.operators,
1802
1808
  value: o.operatorId,
1803
- onChange: (y) => c(Xe(o, y))
1809
+ onChange: (N) => m(Qe(o, N))
1804
1810
  }
1805
1811
  );
1806
1812
  case 5:
1807
1813
  return n.availableDates.length === 0 && n.nextAvailableDate ? /* @__PURE__ */ a(
1808
- rt,
1814
+ lt,
1809
1815
  {
1810
1816
  nextAvailableDate: n.nextAvailableDate,
1811
- onJump: () => c(Ne(o, n.nextAvailableDate)),
1812
- locale: x
1817
+ onJump: () => m(Ne(o, n.nextAvailableDate)),
1818
+ locale: h
1813
1819
  }
1814
1820
  ) : /* @__PURE__ */ a(
1815
- et,
1821
+ at,
1816
1822
  {
1817
1823
  availableDates: n.availableDates,
1818
1824
  selectedDate: o.date,
1819
- onSelectDate: (y) => c(Ne(o, y)),
1820
- locale: x,
1821
- loading: h
1825
+ onSelectDate: (N) => {
1826
+ m(Ne(o, N)), x == null || x(N);
1827
+ },
1828
+ locale: h,
1829
+ loading: f ?? u
1822
1830
  }
1823
1831
  );
1824
1832
  case 6:
1825
1833
  return o.date ? /* @__PURE__ */ a(
1826
- tt,
1834
+ st,
1827
1835
  {
1828
1836
  date: o.date,
1829
1837
  slots: n.availableSlots[o.date] ?? [],
1830
1838
  selectedSlotKey: o.slotKey,
1831
- onSelect: (y) => c(We(o, y.key)),
1832
- loading: h,
1833
- locale: x
1839
+ onSelect: (N) => m(et(o, N.key)),
1840
+ loading: u,
1841
+ locale: h
1834
1842
  }
1835
1843
  ) : null;
1836
1844
  case 7:
1837
1845
  return i.selectedSlot ? /* @__PURE__ */ a(
1838
- Pe,
1846
+ Ve,
1839
1847
  {
1840
- ...g,
1848
+ ...v,
1841
1849
  value: o.details ?? {},
1842
- onChange: (y) => c({ ...o, details: y }),
1843
- onSubmit: l,
1844
- submitting: u,
1845
- defaultPhoneCountry: k.country
1850
+ onChange: (N) => m({ ...o, details: N }),
1851
+ onSubmit: c,
1852
+ submitting: k,
1853
+ defaultPhoneCountry: w.country
1846
1854
  }
1847
1855
  ) : null;
1848
1856
  /* c8 ignore next 2 */
@@ -1850,9 +1858,9 @@ function K(e, t, s = {}) {
1850
1858
  return null;
1851
1859
  }
1852
1860
  }
1853
- function Ve() {
1854
- const { t: e } = T();
1855
- return I(
1861
+ function Re() {
1862
+ const { t: e } = _();
1863
+ return C(
1856
1864
  () => ({
1857
1865
  1: e("booking.insurance.heading"),
1858
1866
  2: e("booking.specialty.heading"),
@@ -1865,21 +1873,21 @@ function Ve() {
1865
1873
  [e]
1866
1874
  );
1867
1875
  }
1868
- function Oa(e) {
1869
- const { cascade: t, value: s, activeStep: i, setActiveStep: n } = e, o = Ve(), c = I(
1876
+ function Pa(e) {
1877
+ const { cascade: t, value: s, activeStep: i, setActiveStep: n } = e, o = Re(), m = C(
1870
1878
  () => t.visibleSteps.map((d) => ({
1871
1879
  label: o[d],
1872
- summary: lt(d, s, t),
1873
- status: ve(d, s) && d < t.currentStep ? "completed" : void 0,
1874
- content: K(d, e, { compactService: !0 })
1880
+ summary: mt(d, s, t),
1881
+ status: ge(d, s) && d < t.currentStep ? "completed" : void 0,
1882
+ content: $(d, e, { compactService: !0 })
1875
1883
  })),
1876
1884
  [t, s, o, e]
1877
- ), l = Math.max(0, t.visibleSteps.indexOf(i));
1885
+ ), c = Math.max(0, t.visibleSteps.indexOf(i));
1878
1886
  return /* @__PURE__ */ a(
1879
- St,
1887
+ It,
1880
1888
  {
1881
- activeStep: l,
1882
- steps: c,
1889
+ activeStep: c,
1890
+ steps: m,
1883
1891
  onStepChange: (d) => {
1884
1892
  const p = t.visibleSteps[d];
1885
1893
  p && n(p);
@@ -1887,7 +1895,7 @@ function Oa(e) {
1887
1895
  }
1888
1896
  );
1889
1897
  }
1890
- function ve(e, t) {
1898
+ function ge(e, t) {
1891
1899
  switch (e) {
1892
1900
  case 1:
1893
1901
  return t.insuranceType !== void 0;
@@ -1905,9 +1913,9 @@ function ve(e, t) {
1905
1913
  return !1;
1906
1914
  }
1907
1915
  }
1908
- function lt(e, t, s) {
1916
+ function mt(e, t, s) {
1909
1917
  var i;
1910
- if (ve(e, t))
1918
+ if (ge(e, t))
1911
1919
  switch (e) {
1912
1920
  case 1:
1913
1921
  return t.insuranceType;
@@ -1924,9 +1932,9 @@ function lt(e, t, s) {
1924
1932
  return n == null ? void 0 : n.label;
1925
1933
  }
1926
1934
  case 4: {
1927
- const n = Ee(t);
1935
+ const n = Pe(t);
1928
1936
  if (!n) return;
1929
- const o = s.filtered.operators.find((c) => c.id === n);
1937
+ const o = s.filtered.operators.find((m) => m.id === n);
1930
1938
  return o == null ? void 0 : o.name;
1931
1939
  }
1932
1940
  case 5:
@@ -1937,23 +1945,23 @@ function lt(e, t, s) {
1937
1945
  return;
1938
1946
  }
1939
1947
  }
1940
- function Ea(e) {
1941
- const { cascade: t, value: s, setActiveStep: i } = e, { t: n } = T(), o = Ve(), c = t.visibleSteps.filter(
1948
+ function Va(e) {
1949
+ const { cascade: t, value: s, setActiveStep: i } = e, { t: n } = _(), o = Re(), m = t.visibleSteps.filter(
1942
1950
  (d) => d === 1 || d === 2 || d === 3 || d === 4
1943
- ), l = c.some(
1944
- (d) => !ve(d, s)
1951
+ ), c = m.some(
1952
+ (d) => !ge(d, s)
1945
1953
  );
1946
- return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1947
- l ? c.filter((d) => !ve(d, s)).slice(0, 1).map((d) => /* @__PURE__ */ a("div", { children: K(d, e, { compactService: !0 }) }, `csf-${d}`)) : /* @__PURE__ */ a(
1954
+ return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1955
+ c ? m.filter((d) => !ge(d, s)).slice(0, 1).map((d) => /* @__PURE__ */ a("div", { children: $(d, e, { compactService: !0 }) }, `csf-${d}`)) : /* @__PURE__ */ a(
1948
1956
  "div",
1949
1957
  {
1950
1958
  role: "group",
1951
1959
  "aria-label": n("booking.regionLabel"),
1952
1960
  className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
1953
- children: c.map((d) => {
1954
- const p = lt(d, s, t);
1955
- return p ? /* @__PURE__ */ f(
1956
- se,
1961
+ children: m.map((d) => {
1962
+ const p = mt(d, s, t);
1963
+ return p ? /* @__PURE__ */ g(
1964
+ ne,
1957
1965
  {
1958
1966
  intent: "tonal",
1959
1967
  size: "sm",
@@ -1969,59 +1977,59 @@ function Ea(e) {
1969
1977
  })
1970
1978
  }
1971
1979
  ),
1972
- !l && t.gates.date ? /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
1973
- /* @__PURE__ */ a("div", { className: "ds:min-w-0", children: K(5, e) }),
1974
- /* @__PURE__ */ a("div", { className: "ds:min-w-0", children: s.date ? K(6, e) : null })
1980
+ !c && t.gates.date ? /* @__PURE__ */ g("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
1981
+ /* @__PURE__ */ a("div", { className: "ds:min-w-0", children: $(5, e) }),
1982
+ /* @__PURE__ */ a("div", { className: "ds:min-w-0", children: s.date ? $(6, e) : null })
1975
1983
  ] }) : null,
1976
- t.gates.details ? /* @__PURE__ */ a("div", { children: K(7, e) }) : null
1984
+ t.gates.details ? /* @__PURE__ */ a("div", { children: $(7, e) }) : null
1977
1985
  ] });
1978
1986
  }
1979
- function Pa(e) {
1987
+ function Ra(e) {
1980
1988
  const { cascade: t } = e, s = t.visibleSteps.filter(
1981
1989
  (i) => i === 1 || i === 2 || i === 3 || i === 4
1982
1990
  );
1983
- return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1984
- /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
1985
- /* @__PURE__ */ a("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: s.map((i) => /* @__PURE__ */ a("div", { children: K(i, e, { compactService: !0 }) }, `fbf-${i}`)) }),
1986
- /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1987
- t.gates.date ? K(5, e) : null,
1988
- t.gates.slot && e.value.date ? K(6, e) : null
1991
+ return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1992
+ /* @__PURE__ */ g("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
1993
+ /* @__PURE__ */ a("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: s.map((i) => /* @__PURE__ */ a("div", { children: $(i, e, { compactService: !0 }) }, `fbf-${i}`)) }),
1994
+ /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1995
+ t.gates.date ? $(5, e) : null,
1996
+ t.gates.slot && e.value.date ? $(6, e) : null
1989
1997
  ] })
1990
1998
  ] }),
1991
- t.gates.details ? K(7, e) : null
1999
+ t.gates.details ? $(7, e) : null
1992
2000
  ] });
1993
2001
  }
1994
- function Va(e) {
1995
- const { cascade: t, value: s, activeStep: i, setActiveStep: n } = e, { t: o } = T(), c = Ve(), l = t.visibleSteps, d = Math.max(0, l.indexOf(i)), p = l.length, h = I(
1996
- () => l.map((g) => ({ label: c[g] })),
1997
- [l, c]
1998
- ), u = d > 0, x = d < p - 1 && ve(i, s);
1999
- return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2000
- /* @__PURE__ */ a(Nt, { activeStep: d, steps: h }),
2001
- /* @__PURE__ */ a("div", { children: K(i, e, { compactService: !0 }) }),
2002
- /* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
2002
+ function La(e) {
2003
+ const { cascade: t, value: s, activeStep: i, setActiveStep: n } = e, { t: o } = _(), m = Re(), c = t.visibleSteps, d = Math.max(0, c.indexOf(i)), p = c.length, f = C(
2004
+ () => c.map((k) => ({ label: m[k] })),
2005
+ [c, m]
2006
+ ), u = d > 0, x = d < p - 1 && ge(i, s);
2007
+ return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2008
+ /* @__PURE__ */ a(wt, { activeStep: d, steps: f }),
2009
+ /* @__PURE__ */ a("div", { children: $(i, e, { compactService: !0 }) }),
2010
+ /* @__PURE__ */ g("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
2003
2011
  /* @__PURE__ */ a(
2004
- se,
2012
+ ne,
2005
2013
  {
2006
2014
  intent: "ghost",
2007
2015
  size: "md",
2008
2016
  disabled: !u,
2009
2017
  onClick: () => {
2010
- const g = l[d - 1];
2011
- g && n(g);
2018
+ const k = c[d - 1];
2019
+ k && n(k);
2012
2020
  },
2013
2021
  children: o("booking.actions.back")
2014
2022
  }
2015
2023
  ),
2016
2024
  i < 7 ? /* @__PURE__ */ a(
2017
- se,
2025
+ ne,
2018
2026
  {
2019
2027
  intent: "primary",
2020
2028
  size: "md",
2021
2029
  disabled: !x,
2022
2030
  onClick: () => {
2023
- const g = l[d + 1];
2024
- g && n(g);
2031
+ const k = c[d + 1];
2032
+ k && n(k);
2025
2033
  },
2026
2034
  children: o("booking.actions.next")
2027
2035
  }
@@ -2029,7 +2037,7 @@ function Va(e) {
2029
2037
  ] })
2030
2038
  ] });
2031
2039
  }
2032
- const Ra = [], La = [], Fa = qe(
2040
+ const Fa = [], za = [], $a = Ge(
2033
2041
  ({
2034
2042
  variant: e = "inline-list",
2035
2043
  country: t,
@@ -2040,68 +2048,70 @@ const Ra = [], La = [], Fa = qe(
2040
2048
  allowOperatorSelection: i = !1,
2041
2049
  lockedOperatorId: n,
2042
2050
  autoSelectSingleService: o = !1,
2043
- specialties: c,
2044
- services: l,
2051
+ specialties: m,
2052
+ services: c,
2045
2053
  operators: d,
2046
2054
  availableDates: p,
2047
- availableSlots: h,
2055
+ availableSlots: f,
2048
2056
  nextAvailableDate: u,
2049
2057
  requireCodiceFiscale: x,
2050
- requireDateOfBirth: g,
2051
- requireInsuranceNumber: k,
2052
- showNote: y,
2058
+ requireDateOfBirth: k,
2059
+ requireInsuranceNumber: h,
2060
+ showNote: v,
2053
2061
  showReturningPatientFlag: w,
2054
- privacyPolicyUrl: A,
2062
+ privacyPolicyUrl: N,
2055
2063
  termsUrl: S,
2056
- validateCodiceFiscale: v,
2064
+ validateCodiceFiscale: b,
2057
2065
  validateInsuranceNumber: r,
2058
- confirmationChannels: E,
2059
- defaultConfirmationChannels: M,
2060
- value: b,
2061
- onChange: N,
2066
+ confirmationChannels: O,
2067
+ defaultConfirmationChannels: D,
2068
+ value: y,
2069
+ onChange: I,
2062
2070
  onSubmit: F,
2063
- onStepChange: B,
2064
- loadingSlots: J,
2065
- submitting: P,
2066
- submitError: z,
2067
- mode: G = "live",
2068
- showModifyOnSuccess: D = !0,
2069
- surface: ie = "flat",
2070
- emptyServicesSlot: j,
2071
- onboardingIncompleteSlot: oe,
2072
- "aria-label": ne,
2073
- id: re,
2074
- className: X,
2075
- ...de
2076
- }, le) => {
2077
- const { t: ce, i18n: Ce } = T(), R = e ?? "inline-list", W = Ce.language ?? "en", $ = c ?? Ra, q = d ?? La;
2078
- Q(() => {
2079
- const V = fa(b, {
2071
+ onStepChange: A,
2072
+ onDateSelect: Z,
2073
+ loadingDates: E,
2074
+ loadingSlots: z,
2075
+ submitting: H,
2076
+ submitError: T,
2077
+ mode: J = "live",
2078
+ showModifyOnSuccess: K = !0,
2079
+ surface: fe = "flat",
2080
+ emptyServicesSlot: X,
2081
+ onboardingIncompleteSlot: he,
2082
+ "aria-label": W,
2083
+ id: Q,
2084
+ className: oe,
2085
+ ...Ce
2086
+ }, Me) => {
2087
+ const { t: re, i18n: ve } = _(), V = e ?? "inline-list", ee = ve.language ?? "en", R = m ?? Fa, j = d ?? za;
2088
+ te(() => {
2089
+ const P = va(y, {
2080
2090
  useSpecialties: s,
2081
2091
  lockedOperatorId: n,
2082
2092
  autoSelectSingleService: o,
2083
- specialties: $,
2084
- services: l
2093
+ specialties: R,
2094
+ services: c
2085
2095
  });
2086
- (V.specialtyId !== b.specialtyId || V.operatorId !== b.operatorId || V.serviceId !== b.serviceId) && N(V);
2096
+ (P.specialtyId !== y.specialtyId || P.operatorId !== y.operatorId || P.serviceId !== y.serviceId) && I(P);
2087
2097
  }, [
2088
2098
  n,
2089
2099
  s,
2090
2100
  o,
2091
- $,
2092
- l
2101
+ R,
2102
+ c
2093
2103
  ]);
2094
- const _ = I(
2095
- () => ga({
2104
+ const l = C(
2105
+ () => ha({
2096
2106
  country: t,
2097
2107
  useSpecialties: s,
2098
2108
  allowOperatorSelection: i,
2099
2109
  lockedOperatorId: n,
2100
- specialties: $,
2101
- services: l,
2102
- operators: q,
2103
- availableSlots: h,
2104
- value: b
2110
+ specialties: R,
2111
+ services: c,
2112
+ operators: j,
2113
+ availableSlots: f,
2114
+ value: y
2105
2115
  }),
2106
2116
  [
2107
2117
  t,
@@ -2109,191 +2119,195 @@ const Ra = [], La = [], Fa = qe(
2109
2119
  i,
2110
2120
  n,
2111
2121
  o,
2112
- $,
2113
- l,
2114
- q,
2122
+ R,
2123
+ c,
2124
+ j,
2115
2125
  p,
2116
- h,
2117
- b
2126
+ f,
2127
+ y
2118
2128
  ]
2119
- ), [me, m] = H(
2120
- _.currentStep
2121
- ), C = te(_.currentStep);
2122
- Q(() => {
2123
- _.currentStep > C.current && m(_.currentStep), C.current = _.currentStep;
2124
- }, [_.currentStep]);
2125
- const [U, ue] = H("idle"), [Me, De] = H(null), Re = ae(
2126
- async (V) => {
2127
- if (!_.selectedSlot) return;
2128
- const _e = {
2129
- slot: _.selectedSlot,
2129
+ ), [M, G] = q(
2130
+ l.currentStep
2131
+ ), Le = se(l.currentStep);
2132
+ te(() => {
2133
+ l.currentStep > Le.current && G(l.currentStep), Le.current = l.currentStep;
2134
+ }, [l.currentStep]);
2135
+ const [de, le] = q("idle"), [De, Te] = q(null), Fe = ie(
2136
+ async (P) => {
2137
+ if (!l.selectedSlot) return;
2138
+ const Ae = {
2139
+ slot: l.selectedSlot,
2130
2140
  value: {
2131
- ...b,
2132
- details: V,
2133
- operatorId: Ee(b) ?? b.operatorId
2141
+ ...y,
2142
+ details: P,
2143
+ operatorId: Pe(y) ?? y.operatorId
2134
2144
  },
2135
- details: V
2145
+ details: P
2136
2146
  };
2137
- ue("submitting");
2147
+ le("submitting");
2138
2148
  try {
2139
- await F(_e), De({
2140
- slot: _.selectedSlot,
2141
- details: V,
2142
- specialtyId: b.specialtyId,
2143
- serviceId: b.serviceId,
2144
- insuranceType: b.insuranceType,
2145
- operatorId: Ee(b),
2146
- date: b.date
2147
- }), ue("success");
2149
+ await F(Ae), Te({
2150
+ slot: l.selectedSlot,
2151
+ details: P,
2152
+ specialtyId: y.specialtyId,
2153
+ serviceId: y.serviceId,
2154
+ insuranceType: y.insuranceType,
2155
+ operatorId: Pe(y),
2156
+ date: y.date
2157
+ }), le("success");
2148
2158
  } catch {
2149
- throw ue("error"), new Error("Booking submission failed");
2159
+ throw le("error"), new Error("Booking submission failed");
2150
2160
  }
2151
2161
  },
2152
- [_.selectedSlot, F, b]
2153
- ), pe = te(null);
2154
- pt(le, () => pe.current, []);
2155
- const ge = U === "success" ? 8 : _.currentStep, Le = te(null);
2156
- Q(() => {
2157
- if (ge !== Le.current && (Le.current = ge, B == null || B(ge), ge === 8 && pe.current))
2162
+ [l.selectedSlot, F, y]
2163
+ ), ce = se(null);
2164
+ ft(Me, () => ce.current, []);
2165
+ const me = de === "success" ? 8 : l.currentStep, ze = se(null);
2166
+ te(() => {
2167
+ if (me !== ze.current && (ze.current = me, A == null || A(me), me === 8 && ce.current))
2158
2168
  try {
2159
- pe.current.scrollIntoView({
2169
+ ce.current.scrollIntoView({
2160
2170
  behavior: "smooth",
2161
2171
  block: "start"
2162
2172
  });
2163
2173
  } catch {
2164
- pe.current.scrollIntoView();
2174
+ ce.current.scrollIntoView();
2165
2175
  }
2166
- }, [ge, B]);
2167
- const Te = I(
2176
+ }, [me, A]);
2177
+ const _e = C(
2168
2178
  () => ({
2169
- getVariant: () => R,
2179
+ getVariant: () => V,
2170
2180
  reset: () => {
2171
- N({}), De(null), ue("idle"), m(1);
2181
+ I({}), Te(null), le("idle"), G(1);
2172
2182
  },
2173
- goToStep: (V) => {
2174
- m(V);
2183
+ goToStep: (P) => {
2184
+ G(P);
2175
2185
  }
2176
2186
  }),
2177
- [R, N]
2187
+ [V, I]
2178
2188
  );
2179
- ft(ra, Te, re);
2180
- const ct = ne ?? ce("booking.regionLabel"), mt = I(() => U !== "success" || !Me ? null : /* @__PURE__ */ a(
2181
- Aa,
2189
+ vt(la, _e, Q);
2190
+ const ut = W ?? re("booking.regionLabel"), pt = C(() => de !== "success" || !De ? null : /* @__PURE__ */ a(
2191
+ Oa,
2182
2192
  {
2183
- snapshot: Me,
2184
- operators: q,
2185
- specialties: $,
2186
- services: l,
2187
- locale: W,
2188
- mode: G,
2189
- showModify: D,
2190
- onReset: () => Te.reset(),
2193
+ snapshot: De,
2194
+ operators: j,
2195
+ specialties: R,
2196
+ services: c,
2197
+ locale: ee,
2198
+ mode: J,
2199
+ showModify: K,
2200
+ onReset: () => _e.reset(),
2191
2201
  onModify: () => {
2192
- De(null), ue("idle"), m(7);
2202
+ Te(null), le("idle"), G(7);
2193
2203
  }
2194
2204
  }
2195
2205
  ), [
2196
- U,
2197
- Me,
2198
- q,
2199
- $,
2200
- l,
2201
- W,
2202
- G,
2203
- D,
2204
- Te
2205
- ]), ut = I(() => {
2206
- if (U === "success") return null;
2207
- const V = R === "accordion" ? Oa : R === "calendar" ? Ea : R === "flexible" ? Pa : R === "progress" ? Va : Ba, _e = {
2208
- cascade: _,
2206
+ de,
2207
+ De,
2208
+ j,
2209
+ R,
2210
+ c,
2211
+ ee,
2212
+ J,
2213
+ K,
2214
+ _e
2215
+ ]), gt = C(() => {
2216
+ if (de === "success") return null;
2217
+ const P = V === "accordion" ? Pa : V === "calendar" ? Va : V === "flexible" ? Ra : V === "progress" ? La : Ea, Ae = {
2218
+ cascade: l,
2209
2219
  inputs: {
2210
- specialties: $,
2211
- services: l,
2212
- operators: q,
2220
+ specialties: R,
2221
+ services: c,
2222
+ operators: j,
2213
2223
  availableDates: p,
2214
- availableSlots: h,
2224
+ availableSlots: f,
2215
2225
  nextAvailableDate: u
2216
2226
  },
2217
- value: b,
2218
- onChange: N,
2219
- onSubmit: Re,
2227
+ value: y,
2228
+ onChange: I,
2229
+ onSubmit: Fe,
2220
2230
  policy: { country: t, lockedOperatorId: n },
2221
2231
  detailsProps: {
2222
2232
  requireCodiceFiscale: x,
2223
- requireDateOfBirth: g,
2224
- requireInsuranceNumber: k,
2225
- insuranceType: b.insuranceType,
2226
- showNote: y,
2233
+ requireDateOfBirth: k,
2234
+ requireInsuranceNumber: h,
2235
+ insuranceType: y.insuranceType,
2236
+ showNote: v,
2227
2237
  showReturningPatientFlag: w,
2228
- privacyPolicyUrl: A,
2238
+ privacyPolicyUrl: N,
2229
2239
  termsUrl: S,
2230
- validateCodiceFiscale: v,
2240
+ validateCodiceFiscale: b,
2231
2241
  validateInsuranceNumber: r,
2232
- confirmationChannels: E,
2233
- defaultConfirmationChannels: M,
2234
- submitError: z
2242
+ confirmationChannels: O,
2243
+ defaultConfirmationChannels: D,
2244
+ submitError: T
2235
2245
  },
2236
- emptyServicesSlot: j,
2237
- onboardingIncompleteSlot: oe,
2238
- loadingSlots: J,
2239
- submitting: P,
2240
- locale: W,
2241
- activeStep: me,
2242
- setActiveStep: m
2246
+ emptyServicesSlot: X,
2247
+ onboardingIncompleteSlot: he,
2248
+ loadingDates: E,
2249
+ loadingSlots: z,
2250
+ onDateSelect: Z,
2251
+ submitting: H,
2252
+ locale: ee,
2253
+ activeStep: M,
2254
+ setActiveStep: G
2243
2255
  };
2244
- return /* @__PURE__ */ a(V, { ..._e });
2256
+ return /* @__PURE__ */ a(P, { ...Ae });
2245
2257
  }, [
2246
- U,
2247
- R,
2248
- _,
2249
- $,
2258
+ de,
2259
+ V,
2250
2260
  l,
2251
- q,
2261
+ R,
2262
+ c,
2263
+ j,
2252
2264
  p,
2253
- h,
2265
+ f,
2254
2266
  u,
2255
- b,
2256
- N,
2257
- Re,
2267
+ y,
2268
+ I,
2269
+ Fe,
2258
2270
  t,
2259
2271
  n,
2260
2272
  x,
2261
- g,
2262
2273
  k,
2263
- z,
2264
- y,
2274
+ h,
2275
+ T,
2276
+ v,
2265
2277
  w,
2266
- A,
2278
+ N,
2267
2279
  S,
2268
- v,
2280
+ b,
2269
2281
  r,
2282
+ O,
2283
+ D,
2284
+ X,
2285
+ he,
2270
2286
  E,
2271
- M,
2272
- j,
2273
- oe,
2274
- J,
2275
- P,
2276
- W,
2277
- me
2287
+ z,
2288
+ Z,
2289
+ H,
2290
+ ee,
2291
+ M
2278
2292
  ]);
2279
- return /* @__PURE__ */ f(
2293
+ return /* @__PURE__ */ g(
2280
2294
  "div",
2281
2295
  {
2282
- ref: pe,
2296
+ ref: ce,
2283
2297
  role: "region",
2284
- "aria-label": ct,
2285
- id: re,
2298
+ "aria-label": ut,
2299
+ id: Q,
2286
2300
  "data-component": "booking",
2287
- "data-component-id": re,
2288
- "data-variant": R,
2289
- className: ka({
2290
- variant: R,
2291
- surface: ie,
2292
- className: X
2301
+ "data-component-id": Q,
2302
+ "data-variant": V,
2303
+ className: Sa({
2304
+ variant: V,
2305
+ surface: fe,
2306
+ className: oe
2293
2307
  }),
2294
- ...de,
2308
+ ...Ce,
2295
2309
  children: [
2296
- /* @__PURE__ */ f(
2310
+ /* @__PURE__ */ g(
2297
2311
  "div",
2298
2312
  {
2299
2313
  className: [
@@ -2305,22 +2319,22 @@ const Ra = [], La = [], Fa = qe(
2305
2319
  "ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]"
2306
2320
  ].join(" "),
2307
2321
  children: [
2308
- /* @__PURE__ */ a("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: ce("booking.regionLabel") }),
2309
- /* @__PURE__ */ a("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children: ce("booking.headingSubtitle") })
2322
+ /* @__PURE__ */ a("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: re("booking.regionLabel") }),
2323
+ /* @__PURE__ */ a("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children: re("booking.headingSubtitle") })
2310
2324
  ]
2311
2325
  }
2312
2326
  ),
2313
- mt ?? ut
2327
+ pt ?? gt
2314
2328
  ]
2315
2329
  }
2316
2330
  );
2317
2331
  }
2318
2332
  );
2319
- Fa.displayName = "Booking";
2333
+ $a.displayName = "Booking";
2320
2334
  export {
2321
- Fa as B,
2322
- Oe as C,
2323
- he as O,
2324
- ra as b
2335
+ $a as B,
2336
+ Ee as C,
2337
+ pe as O,
2338
+ la as b
2325
2339
  };
2326
- //# sourceMappingURL=booking-h_kBZM6M.js.map
2340
+ //# sourceMappingURL=booking-CbdbYvWp.js.map