@alfadocs/ui-kit 0.33.8 → 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
|
|
2
|
-
import { forwardRef as
|
|
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
|
|
5
|
-
import { u as
|
|
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
|
|
8
|
-
import { C as
|
|
9
|
-
import { C as
|
|
10
|
-
import { D as
|
|
11
|
-
import { E as
|
|
12
|
-
import { F as
|
|
13
|
-
import { P as
|
|
14
|
-
import { T as
|
|
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
|
|
17
|
-
import { I as
|
|
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
|
|
21
|
-
import { S as
|
|
22
|
-
import { S as
|
|
23
|
-
import { p as
|
|
24
|
-
import { w as
|
|
25
|
-
import { C as
|
|
26
|
-
import { C as
|
|
27
|
-
import { i as
|
|
28
|
-
import { c as
|
|
29
|
-
import { M as
|
|
30
|
-
import { S as
|
|
31
|
-
import { H as
|
|
32
|
-
import { E as
|
|
33
|
-
import { S as
|
|
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
|
|
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
|
-
],
|
|
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
|
|
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
|
-
],
|
|
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
|
|
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
|
-
],
|
|
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
|
|
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
|
-
],
|
|
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
|
|
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
|
-
],
|
|
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
|
|
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
|
-
],
|
|
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
|
|
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
|
-
],
|
|
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
|
|
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
|
-
],
|
|
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
|
|
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
|
-
],
|
|
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
|
|
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
|
-
],
|
|
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
|
|
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
|
-
],
|
|
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
|
|
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
|
-
],
|
|
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
|
|
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
|
-
],
|
|
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
|
|
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
|
-
],
|
|
236
|
-
function
|
|
237
|
-
return
|
|
235
|
+
], je = B("syringe", ra);
|
|
236
|
+
function da(e, t, s) {
|
|
237
|
+
return Ze(e, -1, s);
|
|
238
238
|
}
|
|
239
|
-
const
|
|
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
|
-
},
|
|
281
|
+
}, Ee = [
|
|
282
282
|
"email",
|
|
283
283
|
"whatsapp",
|
|
284
284
|
"sms"
|
|
285
|
-
],
|
|
286
|
-
function
|
|
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
|
|
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
|
|
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
|
|
329
|
-
const s = e.country ===
|
|
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:
|
|
334
|
-
operator:
|
|
333
|
+
service: c,
|
|
334
|
+
operator: f,
|
|
335
335
|
date: u,
|
|
336
|
-
slot:
|
|
337
|
-
details:
|
|
336
|
+
slot: k,
|
|
337
|
+
details: v,
|
|
338
338
|
onboardingIncomplete: w
|
|
339
339
|
};
|
|
340
340
|
}
|
|
341
|
-
function
|
|
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
|
|
359
|
+
function ha(e) {
|
|
360
360
|
const t = {
|
|
361
|
-
specialties:
|
|
362
|
-
services:
|
|
363
|
-
operators:
|
|
364
|
-
}, 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
|
|
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:
|
|
378
|
-
durationMin:
|
|
377
|
+
isReadyToSubmit: c,
|
|
378
|
+
durationMin: m == null ? void 0 : m.durationMin,
|
|
379
379
|
selectedSlot: o
|
|
380
380
|
};
|
|
381
381
|
}
|
|
382
|
-
function
|
|
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
|
|
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
|
|
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 ?
|
|
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
|
|
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
|
|
436
|
+
function et(e, t) {
|
|
437
437
|
return {
|
|
438
438
|
...e,
|
|
439
439
|
slotKey: t
|
|
440
440
|
};
|
|
441
441
|
}
|
|
442
|
-
function
|
|
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:
|
|
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
|
|
451
|
-
if (e.operatorId && e.operatorId !==
|
|
450
|
+
function Pe(e) {
|
|
451
|
+
if (e.operatorId && e.operatorId !== pe)
|
|
452
452
|
return e.operatorId;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
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
|
|
459
|
+
function tt(e) {
|
|
460
460
|
const t = e && e.length > 0 ? e : ["email"], s = new Set(t);
|
|
461
|
-
return
|
|
461
|
+
return Ee.filter((i) => s.has(i));
|
|
462
462
|
}
|
|
463
|
-
function
|
|
464
|
-
const i =
|
|
463
|
+
function ya(e, t, s) {
|
|
464
|
+
const i = tt(e), n = new Set(i);
|
|
465
465
|
if (s)
|
|
466
|
-
return
|
|
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
|
|
472
|
-
|
|
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
|
|
474
|
+
return Ee.filter((p) => d.has(p));
|
|
475
475
|
}
|
|
476
|
-
const
|
|
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:
|
|
485
|
-
showNote:
|
|
484
|
+
insuranceType: m,
|
|
485
|
+
showNote: c = !1,
|
|
486
486
|
showReturningPatientFlag: d = !1,
|
|
487
487
|
privacyPolicyUrl: p,
|
|
488
|
-
termsUrl:
|
|
488
|
+
termsUrl: f,
|
|
489
489
|
validateCodiceFiscale: u,
|
|
490
490
|
validateInsuranceNumber: x,
|
|
491
|
-
submitting:
|
|
492
|
-
summarySlot:
|
|
493
|
-
defaultPhoneCountry:
|
|
491
|
+
submitting: k = !1,
|
|
492
|
+
summarySlot: h,
|
|
493
|
+
defaultPhoneCountry: v,
|
|
494
494
|
confirmationChannels: w,
|
|
495
|
-
defaultConfirmationChannels:
|
|
495
|
+
defaultConfirmationChannels: N,
|
|
496
496
|
submitError: S
|
|
497
|
-
},
|
|
498
|
-
var
|
|
499
|
-
const { t: r } =
|
|
500
|
-
(
|
|
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 =
|
|
502
|
+
), z = se(null), H = se(
|
|
503
503
|
null
|
|
504
504
|
);
|
|
505
|
-
|
|
505
|
+
te(
|
|
506
506
|
() => () => {
|
|
507
|
-
z.current && clearTimeout(z.current),
|
|
507
|
+
z.current && clearTimeout(z.current), H.current && clearTimeout(H.current);
|
|
508
508
|
},
|
|
509
509
|
[]
|
|
510
510
|
);
|
|
511
|
-
const
|
|
512
|
-
(
|
|
511
|
+
const T = ie(
|
|
512
|
+
(l) => t({ ...e, ...l }),
|
|
513
513
|
[e, t]
|
|
514
|
-
),
|
|
515
|
-
() =>
|
|
514
|
+
), J = C(
|
|
515
|
+
() => tt(w),
|
|
516
516
|
[w]
|
|
517
|
-
),
|
|
518
|
-
|
|
519
|
-
if (!
|
|
520
|
-
e.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
|
-
|
|
524
|
+
fe.current = !0;
|
|
525
525
|
return;
|
|
526
526
|
}
|
|
527
|
-
const
|
|
528
|
-
|
|
527
|
+
const l = ya(
|
|
528
|
+
J,
|
|
529
529
|
e.mobilePhone,
|
|
530
|
-
|
|
530
|
+
N
|
|
531
531
|
);
|
|
532
|
-
|
|
532
|
+
fe.current = !0, T({ confirmationChannels: l });
|
|
533
533
|
}, [
|
|
534
|
-
|
|
535
|
-
|
|
534
|
+
K,
|
|
535
|
+
J,
|
|
536
536
|
e.mobilePhone,
|
|
537
|
-
|
|
537
|
+
N
|
|
538
538
|
]);
|
|
539
|
-
const
|
|
539
|
+
const X = C(
|
|
540
540
|
() => e.confirmationChannels ?? [],
|
|
541
541
|
[e.confirmationChannels]
|
|
542
|
-
),
|
|
543
|
-
|
|
544
|
-
const
|
|
545
|
-
if (!i || !u || !
|
|
546
|
-
|
|
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 (!
|
|
550
|
-
|
|
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
|
-
|
|
557
|
-
u(
|
|
558
|
-
(
|
|
559
|
-
|
|
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
|
-
() =>
|
|
562
|
+
() => y({
|
|
563
563
|
state: "invalid",
|
|
564
564
|
hint: r("booking.details.codiceFiscale.unavailable")
|
|
565
565
|
})
|
|
566
566
|
);
|
|
567
|
-
},
|
|
567
|
+
}, He);
|
|
568
568
|
}, [i, u, e.codiceFiscale, r]);
|
|
569
|
-
const
|
|
570
|
-
|
|
571
|
-
const
|
|
572
|
-
if (!
|
|
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" }),
|
|
577
|
-
x(
|
|
578
|
-
(
|
|
579
|
-
|
|
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
|
-
},
|
|
588
|
-
}, [
|
|
589
|
-
const
|
|
590
|
-
() => !!(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
|
-
),
|
|
592
|
+
), oe = C(
|
|
593
593
|
() => !!(e.mobilePhone && e.mobilePhone.length >= 6),
|
|
594
594
|
[e.mobilePhone]
|
|
595
|
-
),
|
|
596
|
-
var
|
|
597
|
-
return !(!((
|
|
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
|
-
|
|
602
|
-
|
|
601
|
+
Q,
|
|
602
|
+
oe,
|
|
603
603
|
i,
|
|
604
|
-
|
|
604
|
+
D.state,
|
|
605
605
|
n,
|
|
606
606
|
e.dateOfBirth,
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
]),
|
|
610
|
-
if (
|
|
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
|
-
}), !
|
|
619
|
-
const
|
|
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:
|
|
634
|
+
confirmationChannels: K ? X : void 0
|
|
635
635
|
};
|
|
636
|
-
s(
|
|
637
|
-
},
|
|
638
|
-
const
|
|
639
|
-
return
|
|
640
|
-
|
|
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:
|
|
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:
|
|
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(
|
|
663
|
+
) : r(l);
|
|
664
664
|
};
|
|
665
|
-
return /* @__PURE__ */
|
|
665
|
+
return /* @__PURE__ */ g(
|
|
666
666
|
"form",
|
|
667
667
|
{
|
|
668
|
-
ref:
|
|
669
|
-
id:
|
|
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
|
-
|
|
675
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
677
|
+
U,
|
|
678
678
|
{
|
|
679
679
|
label: r("booking.details.firstName.label"),
|
|
680
680
|
required: !0,
|
|
681
|
-
error:
|
|
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: (
|
|
688
|
-
onBlur: () =>
|
|
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
|
-
|
|
694
|
+
U,
|
|
695
695
|
{
|
|
696
696
|
label: r("booking.details.lastName.label"),
|
|
697
697
|
required: !0,
|
|
698
|
-
error:
|
|
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: (
|
|
705
|
-
onBlur: () =>
|
|
704
|
+
onChange: (l) => T({ lastName: l.target.value }),
|
|
705
|
+
onBlur: () => E("lastName")
|
|
706
706
|
}
|
|
707
707
|
)
|
|
708
708
|
}
|
|
709
709
|
)
|
|
710
710
|
] }),
|
|
711
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
713
|
+
U,
|
|
714
714
|
{
|
|
715
715
|
label: r("booking.details.email.label"),
|
|
716
716
|
required: !0,
|
|
717
|
-
error:
|
|
717
|
+
error: A.email && !Q ? r("booking.details.email.invalid") : void 0,
|
|
718
718
|
children: /* @__PURE__ */ a(
|
|
719
|
-
|
|
719
|
+
kt,
|
|
720
720
|
{
|
|
721
721
|
value: e.email ?? "",
|
|
722
|
-
onChange: (
|
|
723
|
-
onBlur: () =>
|
|
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
|
-
|
|
729
|
+
U,
|
|
730
730
|
{
|
|
731
731
|
label: r("booking.details.mobilePhone.label"),
|
|
732
732
|
required: !0,
|
|
733
|
-
error:
|
|
733
|
+
error: A.mobilePhone && !oe ? r("booking.details.mobilePhone.invalid") : void 0,
|
|
734
734
|
children: /* @__PURE__ */ a(
|
|
735
|
-
|
|
735
|
+
xt,
|
|
736
736
|
{
|
|
737
737
|
value: e.mobilePhone ?? "",
|
|
738
|
-
defaultCountry:
|
|
739
|
-
onChange: (
|
|
740
|
-
|
|
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__ */
|
|
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
|
-
|
|
749
|
+
U,
|
|
750
750
|
{
|
|
751
751
|
label: r("booking.details.codiceFiscale.label"),
|
|
752
752
|
required: !0,
|
|
753
|
-
description:
|
|
754
|
-
error:
|
|
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: (
|
|
761
|
-
codiceFiscale:
|
|
760
|
+
onChange: (l) => T({
|
|
761
|
+
codiceFiscale: l.target.value.slice(0, 16).toUpperCase()
|
|
762
762
|
}),
|
|
763
|
-
onBlur: () =>
|
|
763
|
+
onBlur: () => E("codiceFiscale")
|
|
764
764
|
}
|
|
765
765
|
)
|
|
766
766
|
}
|
|
767
767
|
) : null,
|
|
768
768
|
n ? /* @__PURE__ */ a(
|
|
769
|
-
|
|
769
|
+
U,
|
|
770
770
|
{
|
|
771
771
|
label: r("booking.details.dateOfBirth.label"),
|
|
772
772
|
required: !0,
|
|
773
|
-
error:
|
|
773
|
+
error: A.dateOfBirth && !e.dateOfBirth ? r("booking.details.dateOfBirth.required") : void 0,
|
|
774
774
|
children: /* @__PURE__ */ a(
|
|
775
|
-
|
|
775
|
+
yt,
|
|
776
776
|
{
|
|
777
777
|
value: e.dateOfBirth ? new Date(e.dateOfBirth) : void 0,
|
|
778
|
-
onChange: (
|
|
779
|
-
|
|
780
|
-
dateOfBirth:
|
|
781
|
-
}),
|
|
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
|
-
|
|
789
|
-
|
|
788
|
+
W ? /* @__PURE__ */ a(
|
|
789
|
+
U,
|
|
790
790
|
{
|
|
791
791
|
label: r("booking.details.insuranceNumber.label"),
|
|
792
792
|
required: !0,
|
|
793
|
-
description:
|
|
794
|
-
error:
|
|
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: (
|
|
800
|
-
onBlur: () =>
|
|
799
|
+
onChange: (l) => T({ insuranceNumber: l.target.value }),
|
|
800
|
+
onBlur: () => E("insuranceNumber")
|
|
801
801
|
}
|
|
802
802
|
)
|
|
803
803
|
}
|
|
804
804
|
) : null,
|
|
805
|
-
|
|
806
|
-
|
|
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:
|
|
810
|
+
max: qe
|
|
811
811
|
}),
|
|
812
812
|
children: /* @__PURE__ */ a(
|
|
813
|
-
|
|
813
|
+
St,
|
|
814
814
|
{
|
|
815
815
|
value: e.note ?? "",
|
|
816
|
-
maxLength:
|
|
816
|
+
maxLength: qe,
|
|
817
817
|
rows: 3,
|
|
818
|
-
onChange: (
|
|
818
|
+
onChange: (l) => T({ note: l.target.value })
|
|
819
819
|
}
|
|
820
820
|
)
|
|
821
821
|
}
|
|
822
822
|
) : null,
|
|
823
823
|
d ? /* @__PURE__ */ a(
|
|
824
|
-
|
|
824
|
+
Be,
|
|
825
825
|
{
|
|
826
826
|
checked: !!e.returningPatient,
|
|
827
|
-
onCheckedChange: (
|
|
827
|
+
onCheckedChange: (l) => T({ returningPatient: l === !0 }),
|
|
828
828
|
label: r("booking.details.returningPatient.label")
|
|
829
829
|
}
|
|
830
830
|
) : null,
|
|
831
|
-
/* @__PURE__ */
|
|
831
|
+
/* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
832
832
|
/* @__PURE__ */ a(
|
|
833
|
-
|
|
833
|
+
Be,
|
|
834
834
|
{
|
|
835
835
|
checked: !!e.privacyConsent,
|
|
836
|
-
onCheckedChange: (
|
|
837
|
-
label: /* @__PURE__ */
|
|
838
|
-
|
|
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
|
-
|
|
854
|
+
Be,
|
|
855
855
|
{
|
|
856
856
|
checked: !!e.termsConsent,
|
|
857
|
-
onCheckedChange: (
|
|
858
|
-
label: /* @__PURE__ */
|
|
859
|
-
|
|
857
|
+
onCheckedChange: (l) => T({ termsConsent: l === !0 }),
|
|
858
|
+
label: /* @__PURE__ */ g(Y, { children: [
|
|
859
|
+
ee(
|
|
860
860
|
"booking.details.consent.terms.label",
|
|
861
|
-
|
|
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
|
-
|
|
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
|
-
|
|
881
|
+
bt,
|
|
882
882
|
{
|
|
883
883
|
label: r("booking.confirmation.heading"),
|
|
884
884
|
helperText: r("booking.confirmation.helper"),
|
|
885
|
-
value:
|
|
886
|
-
onChange: (
|
|
887
|
-
confirmationChannels:
|
|
885
|
+
value: X,
|
|
886
|
+
onChange: (l) => T({
|
|
887
|
+
confirmationChannels: l
|
|
888
888
|
}),
|
|
889
889
|
orientation: "vertical",
|
|
890
|
-
options:
|
|
891
|
-
value:
|
|
892
|
-
label: r(`booking.confirmation.channel.${
|
|
890
|
+
options: J.map((l) => ({
|
|
891
|
+
value: l,
|
|
892
|
+
label: r(`booking.confirmation.channel.${l}`)
|
|
893
893
|
})),
|
|
894
|
-
error:
|
|
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
|
-
|
|
901
|
+
ne,
|
|
902
902
|
{
|
|
903
903
|
intent: "primary",
|
|
904
904
|
size: "md",
|
|
905
905
|
type: "submit",
|
|
906
|
-
disabled: !
|
|
907
|
-
startIcon:
|
|
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
|
-
|
|
917
|
-
const
|
|
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
|
-
),
|
|
945
|
+
), Na = [
|
|
946
946
|
[
|
|
947
947
|
/\b(estetic|aesthetic|botox|filler|mesoterap|chirurgia\s*plastic)/i,
|
|
948
|
-
|
|
948
|
+
je
|
|
949
949
|
],
|
|
950
|
-
[/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i,
|
|
951
|
-
[/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i,
|
|
952
|
-
[/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i,
|
|
953
|
-
[/\b(otorin|udito|orecchi|hearing|ear)/i,
|
|
954
|
-
[/\b(neuro|brain|cervello)/i,
|
|
955
|
-
[/\b(pediatr|child|bambin)/i,
|
|
956
|
-
[/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i,
|
|
957
|
-
[/\b(lab|analis|test|sang|esami)/i,
|
|
958
|
-
[/\b(farmaco|pharm|pillol|refill)/i,
|
|
959
|
-
[/\b(chirurg|surg|intervent|operat)/i,
|
|
960
|
-
[/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i,
|
|
961
|
-
[/\b(vacc|inject|inie|punto)/i,
|
|
962
|
-
[/\b(derma|skin|pelle)/i,
|
|
963
|
-
[/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i,
|
|
964
|
-
[/\b(general|medicin|family|control|check[-\s]?up)/i,
|
|
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
|
|
967
|
-
for (const [t, s] of
|
|
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
|
|
972
|
-
const t =
|
|
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
|
|
975
|
+
function Oe(e) {
|
|
976
976
|
return xe(e, "yyyy-MM-dd");
|
|
977
977
|
}
|
|
978
|
-
const
|
|
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(" "),
|
|
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
|
|
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 } =
|
|
1007
|
-
const S =
|
|
1008
|
-
for (let
|
|
1009
|
-
const
|
|
1010
|
-
|
|
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
|
|
1013
|
-
const
|
|
1014
|
-
|
|
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 (;
|
|
1017
|
-
const
|
|
1018
|
-
|
|
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
|
|
1021
|
-
}, [
|
|
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(
|
|
1026
|
+
}).format(c);
|
|
1027
1027
|
} catch {
|
|
1028
|
-
return xe(
|
|
1028
|
+
return xe(c, "MMMM yyyy");
|
|
1029
1029
|
}
|
|
1030
|
-
}, [
|
|
1030
|
+
}, [c, i]), k = C(() => {
|
|
1031
1031
|
const S = new Date(2024, 0, 7);
|
|
1032
|
-
return Array.from({ length: 7 }, (
|
|
1033
|
-
const
|
|
1034
|
-
|
|
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(
|
|
1036
|
+
return new Intl.DateTimeFormat(i, { weekday: "short" }).format(O);
|
|
1037
1037
|
} catch {
|
|
1038
|
-
return xe(
|
|
1038
|
+
return xe(O, "EEE");
|
|
1039
1039
|
}
|
|
1040
1040
|
});
|
|
1041
|
-
}, [i]),
|
|
1042
|
-
(S) =>
|
|
1043
|
-
[
|
|
1044
|
-
), w =
|
|
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
|
|
1046
|
+
if (t) return ae(t);
|
|
1047
1047
|
const S = u.find(
|
|
1048
|
-
(
|
|
1048
|
+
(b) => ye(b, c) && v(b)
|
|
1049
1049
|
);
|
|
1050
|
-
return S || (u.find((
|
|
1051
|
-
}, [p, t, u,
|
|
1052
|
-
(S,
|
|
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(
|
|
1056
|
+
r = new Date(b), r.setDate(b.getDate() - 1);
|
|
1057
1057
|
break;
|
|
1058
1058
|
case "ArrowRight":
|
|
1059
|
-
r = new Date(
|
|
1059
|
+
r = new Date(b), r.setDate(b.getDate() + 1);
|
|
1060
1060
|
break;
|
|
1061
1061
|
case "ArrowUp":
|
|
1062
|
-
r = new Date(
|
|
1062
|
+
r = new Date(b), r.setDate(b.getDate() - 7);
|
|
1063
1063
|
break;
|
|
1064
1064
|
case "ArrowDown":
|
|
1065
|
-
r = new Date(
|
|
1065
|
+
r = new Date(b), r.setDate(b.getDate() + 7);
|
|
1066
1066
|
break;
|
|
1067
1067
|
case "Home":
|
|
1068
|
-
r = new Date(
|
|
1068
|
+
r = new Date(b), r.setDate(b.getDate() - b.getDay());
|
|
1069
1069
|
break;
|
|
1070
1070
|
case "End":
|
|
1071
|
-
r = new Date(
|
|
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(),
|
|
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,
|
|
1081
|
+
r && (S.preventDefault(), ye(r, c) || d(ue(r)), f(r));
|
|
1082
1082
|
},
|
|
1083
|
-
[
|
|
1083
|
+
[v, s, c]
|
|
1084
1084
|
);
|
|
1085
|
-
return n ? /* @__PURE__ */
|
|
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,
|
|
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__ */
|
|
1098
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
1100
|
+
$e,
|
|
1101
1101
|
{
|
|
1102
|
-
icon: /* @__PURE__ */ a(
|
|
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) =>
|
|
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
|
-
|
|
1121
|
+
$e,
|
|
1122
1122
|
{
|
|
1123
|
-
icon: /* @__PURE__ */ a(
|
|
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) =>
|
|
1129
|
+
d((S) => Ze(S, 1)), f(null);
|
|
1130
1130
|
}
|
|
1131
1131
|
}
|
|
1132
1132
|
)
|
|
1133
1133
|
] }),
|
|
1134
|
-
/* @__PURE__ */
|
|
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:
|
|
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-${
|
|
1153
|
+
`wd-${b}`
|
|
1154
1154
|
))
|
|
1155
1155
|
}
|
|
1156
1156
|
),
|
|
1157
|
-
Array.from({ length: 6 }, (S,
|
|
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(
|
|
1163
|
-
const
|
|
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":
|
|
1177
|
+
"aria-label": E,
|
|
1178
1178
|
"aria-selected": F || void 0,
|
|
1179
|
-
"aria-disabled": !
|
|
1180
|
-
tabIndex:
|
|
1181
|
-
disabled: !
|
|
1179
|
+
"aria-disabled": !I || void 0,
|
|
1180
|
+
tabIndex: Z ? 0 : -1,
|
|
1181
|
+
disabled: !I,
|
|
1182
1182
|
onClick: () => {
|
|
1183
|
-
|
|
1183
|
+
I && s(Oe(r));
|
|
1184
1184
|
},
|
|
1185
|
-
onKeyDown: (z) =>
|
|
1186
|
-
className:
|
|
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-${
|
|
1189
|
+
`mg-cell-${D}`
|
|
1190
1190
|
);
|
|
1191
1191
|
})
|
|
1192
1192
|
},
|
|
1193
|
-
`mg-row-${
|
|
1193
|
+
`mg-row-${b}`
|
|
1194
1194
|
))
|
|
1195
1195
|
]
|
|
1196
1196
|
}
|
|
1197
1197
|
)
|
|
1198
1198
|
] });
|
|
1199
1199
|
}
|
|
1200
|
-
const
|
|
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
|
|
1226
|
+
function Ta({
|
|
1227
1227
|
services: e,
|
|
1228
1228
|
selectedServiceId: t,
|
|
1229
1229
|
onSelect: s
|
|
1230
1230
|
}) {
|
|
1231
|
-
const { t: i } =
|
|
1231
|
+
const { t: i } = _(), n = Ue(), [o, m] = q(() => {
|
|
1232
1232
|
if (t) {
|
|
1233
|
-
const
|
|
1234
|
-
if (
|
|
1233
|
+
const f = e.findIndex((u) => u.id === t);
|
|
1234
|
+
if (f >= 0) return f;
|
|
1235
1235
|
}
|
|
1236
1236
|
return 0;
|
|
1237
|
-
}),
|
|
1237
|
+
}), c = se(/* @__PURE__ */ new Map()), d = ie((f) => {
|
|
1238
1238
|
var u;
|
|
1239
|
-
(u =
|
|
1240
|
-
}, []), p =
|
|
1241
|
-
(
|
|
1242
|
-
const
|
|
1243
|
-
if (
|
|
1244
|
-
switch (
|
|
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
|
-
|
|
1248
|
-
const
|
|
1249
|
-
|
|
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
|
-
|
|
1255
|
-
const
|
|
1256
|
-
|
|
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
|
-
|
|
1260
|
+
f.preventDefault(), m(0), d(0);
|
|
1261
1261
|
break;
|
|
1262
1262
|
}
|
|
1263
1263
|
case "End": {
|
|
1264
|
-
|
|
1265
|
-
const
|
|
1266
|
-
|
|
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
|
-
|
|
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((
|
|
1286
|
-
const x = t ===
|
|
1287
|
-
label:
|
|
1288
|
-
duration:
|
|
1289
|
-
}),
|
|
1290
|
-
return /* @__PURE__ */
|
|
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 ?
|
|
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":
|
|
1300
|
-
tabIndex:
|
|
1301
|
-
onClick: () => s(
|
|
1302
|
-
onFocus: () =>
|
|
1303
|
-
onKeyDown: (w) => p(w, u,
|
|
1304
|
-
className:
|
|
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:
|
|
1313
|
+
children: v
|
|
1314
1314
|
}
|
|
1315
1315
|
),
|
|
1316
|
-
/* @__PURE__ */
|
|
1317
|
-
/* @__PURE__ */ a("span", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]", children:
|
|
1318
|
-
/* @__PURE__ */ a("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: i("booking.serviceSummary", { minutes:
|
|
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
|
-
|
|
1322
|
+
f.id
|
|
1323
1323
|
);
|
|
1324
1324
|
})
|
|
1325
1325
|
}
|
|
1326
1326
|
);
|
|
1327
1327
|
}
|
|
1328
|
-
const
|
|
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
|
|
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
|
|
1359
|
-
morning:
|
|
1360
|
-
afternoon:
|
|
1361
|
-
evening:
|
|
1358
|
+
const Ba = {
|
|
1359
|
+
morning: _t,
|
|
1360
|
+
afternoon: oa,
|
|
1361
|
+
evening: Tt
|
|
1362
1362
|
};
|
|
1363
|
-
function
|
|
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:
|
|
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(
|
|
1377
|
+
}).format(ae(e));
|
|
1378
1378
|
} catch {
|
|
1379
1379
|
return e;
|
|
1380
1380
|
}
|
|
1381
|
-
}, [e, o]), d =
|
|
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[
|
|
1388
|
+
u[Aa(x.time)].push(x);
|
|
1389
1389
|
return u;
|
|
1390
|
-
}, [t]), p = t.filter((u) => u.available).length,
|
|
1391
|
-
return n ? /* @__PURE__ */
|
|
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(
|
|
1402
|
-
/* @__PURE__ */
|
|
1403
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
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:
|
|
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:
|
|
1413
|
+
/* @__PURE__ */ a("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: m("booking.slotsAvailable", { count: p }) })
|
|
1414
1414
|
] }),
|
|
1415
|
-
|
|
1415
|
+
f.map((u) => {
|
|
1416
1416
|
const x = d[u];
|
|
1417
1417
|
if (x.length === 0) return null;
|
|
1418
|
-
const
|
|
1419
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
1425
|
-
/* @__PURE__ */ a(
|
|
1426
|
-
/* @__PURE__ */ a("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children:
|
|
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":
|
|
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((
|
|
1435
|
-
const
|
|
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":
|
|
1441
|
-
disabled: !
|
|
1442
|
-
"aria-pressed":
|
|
1443
|
-
"aria-label":
|
|
1444
|
-
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: () =>
|
|
1447
|
-
className:
|
|
1448
|
-
children:
|
|
1446
|
+
onClick: () => h.available && i(h),
|
|
1447
|
+
className: _a({ state: w }),
|
|
1448
|
+
children: h.time
|
|
1449
1449
|
},
|
|
1450
|
-
|
|
1450
|
+
h.key
|
|
1451
1451
|
);
|
|
1452
1452
|
})
|
|
1453
1453
|
}
|
|
@@ -1459,12 +1459,12 @@ function tt({
|
|
|
1459
1459
|
})
|
|
1460
1460
|
] });
|
|
1461
1461
|
}
|
|
1462
|
-
function
|
|
1463
|
-
const { t: s } =
|
|
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__ */
|
|
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
|
|
1484
|
-
const { t: i } =
|
|
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__ */
|
|
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
|
|
1503
|
-
const { t: n } =
|
|
1502
|
+
function ot({ services: e, value: t, onChange: s, compact: i }) {
|
|
1503
|
+
const { t: n } = _();
|
|
1504
1504
|
if (i) {
|
|
1505
|
-
const o = e.map((
|
|
1506
|
-
value:
|
|
1507
|
-
label: `${
|
|
1508
|
-
minutes:
|
|
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__ */
|
|
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: (
|
|
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__ */
|
|
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
|
-
|
|
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
|
|
1538
|
-
const { t: i } =
|
|
1539
|
-
{ value:
|
|
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__ */
|
|
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 ??
|
|
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
|
|
1556
|
+
function dt({
|
|
1557
1557
|
customSlot: e
|
|
1558
1558
|
}) {
|
|
1559
|
-
const { t } =
|
|
1560
|
-
return e ? /* @__PURE__ */ a(
|
|
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
|
|
1565
|
+
function lt({
|
|
1566
1566
|
nextAvailableDate: e,
|
|
1567
1567
|
onJump: t,
|
|
1568
1568
|
locale: s
|
|
1569
1569
|
}) {
|
|
1570
|
-
const { t: i } =
|
|
1570
|
+
const { t: i } = _(), n = C(() => {
|
|
1571
1571
|
try {
|
|
1572
1572
|
return new Intl.DateTimeFormat(s, { dateStyle: "long" }).format(
|
|
1573
|
-
|
|
1573
|
+
ae(e)
|
|
1574
1574
|
);
|
|
1575
1575
|
} catch {
|
|
1576
1576
|
return e;
|
|
1577
1577
|
}
|
|
1578
1578
|
}, [e, s]);
|
|
1579
|
-
return /* @__PURE__ */
|
|
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(
|
|
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
|
|
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:
|
|
1592
|
-
onReset:
|
|
1591
|
+
showModify: m,
|
|
1592
|
+
onReset: c,
|
|
1593
1593
|
onModify: d
|
|
1594
1594
|
}) {
|
|
1595
|
-
const { t: p } =
|
|
1596
|
-
(
|
|
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] }),
|
|
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(
|
|
1606
|
+
}).format(ae(e.date));
|
|
1607
1607
|
} catch {
|
|
1608
1608
|
return e.date;
|
|
1609
1609
|
}
|
|
1610
|
-
}, [e.date, n]),
|
|
1611
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
1622
|
-
|
|
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:
|
|
1624
|
+
/* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: v.label })
|
|
1625
1625
|
] }) : null,
|
|
1626
|
-
w ? /* @__PURE__ */
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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:
|
|
1638
|
+
/* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: h.name })
|
|
1639
1639
|
] }) : null
|
|
1640
1640
|
] }) }),
|
|
1641
|
-
/* @__PURE__ */
|
|
1642
|
-
/* @__PURE__ */ a(
|
|
1643
|
-
|
|
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
|
|
1650
|
-
const { t } =
|
|
1651
|
-
return e ? /* @__PURE__ */ a(
|
|
1652
|
-
|
|
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
|
|
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:
|
|
1668
|
-
onboardingIncompleteSlot:
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
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
|
-
|
|
1678
|
+
it,
|
|
1677
1679
|
{
|
|
1678
1680
|
value: i.insuranceType,
|
|
1679
|
-
onChange: (
|
|
1681
|
+
onChange: (v) => n(Je(i, v))
|
|
1680
1682
|
}
|
|
1681
1683
|
) : null,
|
|
1682
1684
|
t.gates.specialty ? /* @__PURE__ */ a(
|
|
1683
|
-
|
|
1685
|
+
nt,
|
|
1684
1686
|
{
|
|
1685
1687
|
specialties: t.filtered.specialties,
|
|
1686
1688
|
value: i.specialtyId,
|
|
1687
|
-
onChange: (
|
|
1689
|
+
onChange: (v) => n(Xe(i, v))
|
|
1688
1690
|
}
|
|
1689
1691
|
) : null,
|
|
1690
|
-
t.gates.service ? t.filtered.services.length === 0 ? /* @__PURE__ */ a(
|
|
1691
|
-
|
|
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: (
|
|
1697
|
+
onChange: (v) => n(We(i, v))
|
|
1696
1698
|
}
|
|
1697
1699
|
) : null,
|
|
1698
|
-
t.gates.onboardingIncomplete ? /* @__PURE__ */ a(
|
|
1700
|
+
t.gates.onboardingIncomplete ? /* @__PURE__ */ a(dt, { customSlot: c }) : null,
|
|
1699
1701
|
t.gates.operator ? /* @__PURE__ */ a(
|
|
1700
|
-
|
|
1702
|
+
rt,
|
|
1701
1703
|
{
|
|
1702
1704
|
operators: t.filtered.operators,
|
|
1703
1705
|
value: i.operatorId,
|
|
1704
|
-
onChange: (
|
|
1706
|
+
onChange: (v) => n(Qe(i, v))
|
|
1705
1707
|
}
|
|
1706
1708
|
) : null,
|
|
1707
|
-
t.gates.date ? /* @__PURE__ */
|
|
1708
|
-
/* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children:
|
|
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
|
-
|
|
1712
|
+
lt,
|
|
1711
1713
|
{
|
|
1712
1714
|
nextAvailableDate: s.nextAvailableDate,
|
|
1713
1715
|
onJump: () => n(Ne(i, s.nextAvailableDate)),
|
|
1714
|
-
locale:
|
|
1716
|
+
locale: x
|
|
1715
1717
|
}
|
|
1716
1718
|
) : /* @__PURE__ */ a(
|
|
1717
|
-
|
|
1719
|
+
at,
|
|
1718
1720
|
{
|
|
1719
1721
|
availableDates: s.availableDates,
|
|
1720
1722
|
selectedDate: i.date,
|
|
1721
|
-
onSelectDate: (
|
|
1722
|
-
|
|
1723
|
-
|
|
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__ */
|
|
1728
|
-
/* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children:
|
|
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
|
-
|
|
1734
|
+
st,
|
|
1731
1735
|
{
|
|
1732
1736
|
date: i.date,
|
|
1733
1737
|
slots: s.availableSlots[i.date] ?? [],
|
|
1734
1738
|
selectedSlotKey: i.slotKey,
|
|
1735
|
-
onSelect: (
|
|
1736
|
-
loading:
|
|
1737
|
-
locale:
|
|
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
|
-
|
|
1746
|
+
Ve,
|
|
1743
1747
|
{
|
|
1744
|
-
...
|
|
1748
|
+
...k,
|
|
1745
1749
|
value: i.details ?? {},
|
|
1746
|
-
onChange: (
|
|
1750
|
+
onChange: (v) => n({ ...i, details: v }),
|
|
1747
1751
|
onSubmit: o,
|
|
1748
|
-
submitting:
|
|
1752
|
+
submitting: u,
|
|
1749
1753
|
defaultPhoneCountry: e.policy.country
|
|
1750
1754
|
}
|
|
1751
1755
|
) : null
|
|
1752
1756
|
] });
|
|
1753
1757
|
}
|
|
1754
|
-
function
|
|
1758
|
+
function $(e, t, s = {}) {
|
|
1755
1759
|
const {
|
|
1756
1760
|
cascade: i,
|
|
1757
1761
|
inputs: n,
|
|
1758
1762
|
value: o,
|
|
1759
|
-
onChange:
|
|
1760
|
-
onSubmit:
|
|
1763
|
+
onChange: m,
|
|
1764
|
+
onSubmit: c,
|
|
1761
1765
|
emptyServicesSlot: d,
|
|
1762
1766
|
onboardingIncompleteSlot: p,
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
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
|
-
|
|
1778
|
+
it,
|
|
1773
1779
|
{
|
|
1774
1780
|
value: o.insuranceType,
|
|
1775
|
-
onChange: (
|
|
1781
|
+
onChange: (N) => m(Je(o, N))
|
|
1776
1782
|
}
|
|
1777
1783
|
);
|
|
1778
1784
|
case 2:
|
|
1779
1785
|
return /* @__PURE__ */ a(
|
|
1780
|
-
|
|
1786
|
+
nt,
|
|
1781
1787
|
{
|
|
1782
1788
|
specialties: i.filtered.specialties,
|
|
1783
1789
|
value: o.specialtyId,
|
|
1784
|
-
onChange: (
|
|
1790
|
+
onChange: (N) => m(Xe(o, N))
|
|
1785
1791
|
}
|
|
1786
1792
|
);
|
|
1787
1793
|
case 3:
|
|
1788
|
-
return i.filtered.services.length === 0 ? /* @__PURE__ */ a(
|
|
1789
|
-
|
|
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: (
|
|
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
|
-
|
|
1805
|
+
rt,
|
|
1800
1806
|
{
|
|
1801
1807
|
operators: i.filtered.operators,
|
|
1802
1808
|
value: o.operatorId,
|
|
1803
|
-
onChange: (
|
|
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
|
-
|
|
1814
|
+
lt,
|
|
1809
1815
|
{
|
|
1810
1816
|
nextAvailableDate: n.nextAvailableDate,
|
|
1811
|
-
onJump: () =>
|
|
1812
|
-
locale:
|
|
1817
|
+
onJump: () => m(Ne(o, n.nextAvailableDate)),
|
|
1818
|
+
locale: h
|
|
1813
1819
|
}
|
|
1814
1820
|
) : /* @__PURE__ */ a(
|
|
1815
|
-
|
|
1821
|
+
at,
|
|
1816
1822
|
{
|
|
1817
1823
|
availableDates: n.availableDates,
|
|
1818
1824
|
selectedDate: o.date,
|
|
1819
|
-
onSelectDate: (
|
|
1820
|
-
|
|
1821
|
-
|
|
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
|
-
|
|
1834
|
+
st,
|
|
1827
1835
|
{
|
|
1828
1836
|
date: o.date,
|
|
1829
1837
|
slots: n.availableSlots[o.date] ?? [],
|
|
1830
1838
|
selectedSlotKey: o.slotKey,
|
|
1831
|
-
onSelect: (
|
|
1832
|
-
loading:
|
|
1833
|
-
locale:
|
|
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
|
-
|
|
1846
|
+
Ve,
|
|
1839
1847
|
{
|
|
1840
|
-
...
|
|
1848
|
+
...v,
|
|
1841
1849
|
value: o.details ?? {},
|
|
1842
|
-
onChange: (
|
|
1843
|
-
onSubmit:
|
|
1844
|
-
submitting:
|
|
1845
|
-
defaultPhoneCountry:
|
|
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
|
|
1854
|
-
const { t: e } =
|
|
1855
|
-
return
|
|
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
|
|
1869
|
-
const { cascade: t, value: s, activeStep: i, setActiveStep: n } = e, o =
|
|
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:
|
|
1873
|
-
status:
|
|
1874
|
-
content:
|
|
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
|
-
),
|
|
1885
|
+
), c = Math.max(0, t.visibleSteps.indexOf(i));
|
|
1878
1886
|
return /* @__PURE__ */ a(
|
|
1879
|
-
|
|
1887
|
+
It,
|
|
1880
1888
|
{
|
|
1881
|
-
activeStep:
|
|
1882
|
-
steps:
|
|
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
|
|
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
|
|
1916
|
+
function mt(e, t, s) {
|
|
1909
1917
|
var i;
|
|
1910
|
-
if (
|
|
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 =
|
|
1935
|
+
const n = Pe(t);
|
|
1928
1936
|
if (!n) return;
|
|
1929
|
-
const o = s.filtered.operators.find((
|
|
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
|
|
1941
|
-
const { cascade: t, value: s, setActiveStep: i } = e, { t: n } =
|
|
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
|
-
),
|
|
1944
|
-
(d) => !
|
|
1951
|
+
), c = m.some(
|
|
1952
|
+
(d) => !ge(d, s)
|
|
1945
1953
|
);
|
|
1946
|
-
return /* @__PURE__ */
|
|
1947
|
-
|
|
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:
|
|
1954
|
-
const p =
|
|
1955
|
-
return p ? /* @__PURE__ */
|
|
1956
|
-
|
|
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
|
-
!
|
|
1973
|
-
/* @__PURE__ */ a("div", { className: "ds:min-w-0", children:
|
|
1974
|
-
/* @__PURE__ */ a("div", { className: "ds:min-w-0", children: s.date ?
|
|
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:
|
|
1984
|
+
t.gates.details ? /* @__PURE__ */ a("div", { children: $(7, e) }) : null
|
|
1977
1985
|
] });
|
|
1978
1986
|
}
|
|
1979
|
-
function
|
|
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__ */
|
|
1984
|
-
/* @__PURE__ */
|
|
1985
|
-
/* @__PURE__ */ a("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: s.map((i) => /* @__PURE__ */ a("div", { children:
|
|
1986
|
-
/* @__PURE__ */
|
|
1987
|
-
t.gates.date ?
|
|
1988
|
-
t.gates.slot && e.value.date ?
|
|
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 ?
|
|
1999
|
+
t.gates.details ? $(7, e) : null
|
|
1992
2000
|
] });
|
|
1993
2001
|
}
|
|
1994
|
-
function
|
|
1995
|
-
const { cascade: t, value: s, activeStep: i, setActiveStep: n } = e, { t: o } =
|
|
1996
|
-
() =>
|
|
1997
|
-
[
|
|
1998
|
-
), u = d > 0, x = d < p - 1 &&
|
|
1999
|
-
return /* @__PURE__ */
|
|
2000
|
-
/* @__PURE__ */ a(
|
|
2001
|
-
/* @__PURE__ */ a("div", { children:
|
|
2002
|
-
/* @__PURE__ */
|
|
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
|
-
|
|
2012
|
+
ne,
|
|
2005
2013
|
{
|
|
2006
2014
|
intent: "ghost",
|
|
2007
2015
|
size: "md",
|
|
2008
2016
|
disabled: !u,
|
|
2009
2017
|
onClick: () => {
|
|
2010
|
-
const
|
|
2011
|
-
|
|
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
|
-
|
|
2025
|
+
ne,
|
|
2018
2026
|
{
|
|
2019
2027
|
intent: "primary",
|
|
2020
2028
|
size: "md",
|
|
2021
2029
|
disabled: !x,
|
|
2022
2030
|
onClick: () => {
|
|
2023
|
-
const
|
|
2024
|
-
|
|
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
|
|
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:
|
|
2044
|
-
services:
|
|
2051
|
+
specialties: m,
|
|
2052
|
+
services: c,
|
|
2045
2053
|
operators: d,
|
|
2046
2054
|
availableDates: p,
|
|
2047
|
-
availableSlots:
|
|
2055
|
+
availableSlots: f,
|
|
2048
2056
|
nextAvailableDate: u,
|
|
2049
2057
|
requireCodiceFiscale: x,
|
|
2050
|
-
requireDateOfBirth:
|
|
2051
|
-
requireInsuranceNumber:
|
|
2052
|
-
showNote:
|
|
2058
|
+
requireDateOfBirth: k,
|
|
2059
|
+
requireInsuranceNumber: h,
|
|
2060
|
+
showNote: v,
|
|
2053
2061
|
showReturningPatientFlag: w,
|
|
2054
|
-
privacyPolicyUrl:
|
|
2062
|
+
privacyPolicyUrl: N,
|
|
2055
2063
|
termsUrl: S,
|
|
2056
|
-
validateCodiceFiscale:
|
|
2064
|
+
validateCodiceFiscale: b,
|
|
2057
2065
|
validateInsuranceNumber: r,
|
|
2058
|
-
confirmationChannels:
|
|
2059
|
-
defaultConfirmationChannels:
|
|
2060
|
-
value:
|
|
2061
|
-
onChange:
|
|
2066
|
+
confirmationChannels: O,
|
|
2067
|
+
defaultConfirmationChannels: D,
|
|
2068
|
+
value: y,
|
|
2069
|
+
onChange: I,
|
|
2062
2070
|
onSubmit: F,
|
|
2063
|
-
onStepChange:
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
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:
|
|
2093
|
+
specialties: R,
|
|
2094
|
+
services: c
|
|
2085
2095
|
});
|
|
2086
|
-
(
|
|
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
|
-
|
|
2101
|
+
R,
|
|
2102
|
+
c
|
|
2093
2103
|
]);
|
|
2094
|
-
const
|
|
2095
|
-
() =>
|
|
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:
|
|
2102
|
-
operators:
|
|
2103
|
-
availableSlots:
|
|
2104
|
-
value:
|
|
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
|
-
|
|
2114
|
-
|
|
2122
|
+
R,
|
|
2123
|
+
c,
|
|
2124
|
+
j,
|
|
2115
2125
|
p,
|
|
2116
|
-
|
|
2117
|
-
|
|
2126
|
+
f,
|
|
2127
|
+
y
|
|
2118
2128
|
]
|
|
2119
|
-
), [
|
|
2120
|
-
|
|
2121
|
-
),
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
}, [
|
|
2125
|
-
const [
|
|
2126
|
-
async (
|
|
2127
|
-
if (!
|
|
2128
|
-
const
|
|
2129
|
-
slot:
|
|
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
|
-
...
|
|
2132
|
-
details:
|
|
2133
|
-
operatorId:
|
|
2141
|
+
...y,
|
|
2142
|
+
details: P,
|
|
2143
|
+
operatorId: Pe(y) ?? y.operatorId
|
|
2134
2144
|
},
|
|
2135
|
-
details:
|
|
2145
|
+
details: P
|
|
2136
2146
|
};
|
|
2137
|
-
|
|
2147
|
+
le("submitting");
|
|
2138
2148
|
try {
|
|
2139
|
-
await F(
|
|
2140
|
-
slot:
|
|
2141
|
-
details:
|
|
2142
|
-
specialtyId:
|
|
2143
|
-
serviceId:
|
|
2144
|
-
insuranceType:
|
|
2145
|
-
operatorId:
|
|
2146
|
-
date:
|
|
2147
|
-
}),
|
|
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
|
|
2159
|
+
throw le("error"), new Error("Booking submission failed");
|
|
2150
2160
|
}
|
|
2151
2161
|
},
|
|
2152
|
-
[
|
|
2153
|
-
),
|
|
2154
|
-
|
|
2155
|
-
const
|
|
2156
|
-
|
|
2157
|
-
if (
|
|
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
|
-
|
|
2169
|
+
ce.current.scrollIntoView({
|
|
2160
2170
|
behavior: "smooth",
|
|
2161
2171
|
block: "start"
|
|
2162
2172
|
});
|
|
2163
2173
|
} catch {
|
|
2164
|
-
|
|
2174
|
+
ce.current.scrollIntoView();
|
|
2165
2175
|
}
|
|
2166
|
-
}, [
|
|
2167
|
-
const
|
|
2176
|
+
}, [me, A]);
|
|
2177
|
+
const _e = C(
|
|
2168
2178
|
() => ({
|
|
2169
|
-
getVariant: () =>
|
|
2179
|
+
getVariant: () => V,
|
|
2170
2180
|
reset: () => {
|
|
2171
|
-
|
|
2181
|
+
I({}), Te(null), le("idle"), G(1);
|
|
2172
2182
|
},
|
|
2173
|
-
goToStep: (
|
|
2174
|
-
|
|
2183
|
+
goToStep: (P) => {
|
|
2184
|
+
G(P);
|
|
2175
2185
|
}
|
|
2176
2186
|
}),
|
|
2177
|
-
[
|
|
2187
|
+
[V, I]
|
|
2178
2188
|
);
|
|
2179
|
-
|
|
2180
|
-
const
|
|
2181
|
-
|
|
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:
|
|
2184
|
-
operators:
|
|
2185
|
-
specialties:
|
|
2186
|
-
services:
|
|
2187
|
-
locale:
|
|
2188
|
-
mode:
|
|
2189
|
-
showModify:
|
|
2190
|
-
onReset: () =>
|
|
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
|
-
|
|
2202
|
+
Te(null), le("idle"), G(7);
|
|
2193
2203
|
}
|
|
2194
2204
|
}
|
|
2195
2205
|
), [
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
]),
|
|
2206
|
-
if (
|
|
2207
|
-
const
|
|
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:
|
|
2212
|
-
operators:
|
|
2220
|
+
specialties: R,
|
|
2221
|
+
services: c,
|
|
2222
|
+
operators: j,
|
|
2213
2223
|
availableDates: p,
|
|
2214
|
-
availableSlots:
|
|
2224
|
+
availableSlots: f,
|
|
2215
2225
|
nextAvailableDate: u
|
|
2216
2226
|
},
|
|
2217
|
-
value:
|
|
2218
|
-
onChange:
|
|
2219
|
-
onSubmit:
|
|
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:
|
|
2224
|
-
requireInsuranceNumber:
|
|
2225
|
-
insuranceType:
|
|
2226
|
-
showNote:
|
|
2233
|
+
requireDateOfBirth: k,
|
|
2234
|
+
requireInsuranceNumber: h,
|
|
2235
|
+
insuranceType: y.insuranceType,
|
|
2236
|
+
showNote: v,
|
|
2227
2237
|
showReturningPatientFlag: w,
|
|
2228
|
-
privacyPolicyUrl:
|
|
2238
|
+
privacyPolicyUrl: N,
|
|
2229
2239
|
termsUrl: S,
|
|
2230
|
-
validateCodiceFiscale:
|
|
2240
|
+
validateCodiceFiscale: b,
|
|
2231
2241
|
validateInsuranceNumber: r,
|
|
2232
|
-
confirmationChannels:
|
|
2233
|
-
defaultConfirmationChannels:
|
|
2234
|
-
submitError:
|
|
2242
|
+
confirmationChannels: O,
|
|
2243
|
+
defaultConfirmationChannels: D,
|
|
2244
|
+
submitError: T
|
|
2235
2245
|
},
|
|
2236
|
-
emptyServicesSlot:
|
|
2237
|
-
onboardingIncompleteSlot:
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
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(
|
|
2256
|
+
return /* @__PURE__ */ a(P, { ...Ae });
|
|
2245
2257
|
}, [
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
_,
|
|
2249
|
-
$,
|
|
2258
|
+
de,
|
|
2259
|
+
V,
|
|
2250
2260
|
l,
|
|
2251
|
-
|
|
2261
|
+
R,
|
|
2262
|
+
c,
|
|
2263
|
+
j,
|
|
2252
2264
|
p,
|
|
2253
|
-
|
|
2265
|
+
f,
|
|
2254
2266
|
u,
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2267
|
+
y,
|
|
2268
|
+
I,
|
|
2269
|
+
Fe,
|
|
2258
2270
|
t,
|
|
2259
2271
|
n,
|
|
2260
2272
|
x,
|
|
2261
|
-
g,
|
|
2262
2273
|
k,
|
|
2263
|
-
|
|
2264
|
-
|
|
2274
|
+
h,
|
|
2275
|
+
T,
|
|
2276
|
+
v,
|
|
2265
2277
|
w,
|
|
2266
|
-
|
|
2278
|
+
N,
|
|
2267
2279
|
S,
|
|
2268
|
-
|
|
2280
|
+
b,
|
|
2269
2281
|
r,
|
|
2282
|
+
O,
|
|
2283
|
+
D,
|
|
2284
|
+
X,
|
|
2285
|
+
he,
|
|
2270
2286
|
E,
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
W,
|
|
2277
|
-
me
|
|
2287
|
+
z,
|
|
2288
|
+
Z,
|
|
2289
|
+
H,
|
|
2290
|
+
ee,
|
|
2291
|
+
M
|
|
2278
2292
|
]);
|
|
2279
|
-
return /* @__PURE__ */
|
|
2293
|
+
return /* @__PURE__ */ g(
|
|
2280
2294
|
"div",
|
|
2281
2295
|
{
|
|
2282
|
-
ref:
|
|
2296
|
+
ref: ce,
|
|
2283
2297
|
role: "region",
|
|
2284
|
-
"aria-label":
|
|
2285
|
-
id:
|
|
2298
|
+
"aria-label": ut,
|
|
2299
|
+
id: Q,
|
|
2286
2300
|
"data-component": "booking",
|
|
2287
|
-
"data-component-id":
|
|
2288
|
-
"data-variant":
|
|
2289
|
-
className:
|
|
2290
|
-
variant:
|
|
2291
|
-
surface:
|
|
2292
|
-
className:
|
|
2301
|
+
"data-component-id": Q,
|
|
2302
|
+
"data-variant": V,
|
|
2303
|
+
className: Sa({
|
|
2304
|
+
variant: V,
|
|
2305
|
+
surface: fe,
|
|
2306
|
+
className: oe
|
|
2293
2307
|
}),
|
|
2294
|
-
...
|
|
2308
|
+
...Ce,
|
|
2295
2309
|
children: [
|
|
2296
|
-
/* @__PURE__ */
|
|
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:
|
|
2309
|
-
/* @__PURE__ */ a("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children:
|
|
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
|
-
|
|
2327
|
+
pt ?? gt
|
|
2314
2328
|
]
|
|
2315
2329
|
}
|
|
2316
2330
|
);
|
|
2317
2331
|
}
|
|
2318
2332
|
);
|
|
2319
|
-
|
|
2333
|
+
$a.displayName = "Booking";
|
|
2320
2334
|
export {
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2335
|
+
$a as B,
|
|
2336
|
+
Ee as C,
|
|
2337
|
+
pe as O,
|
|
2338
|
+
la as b
|
|
2325
2339
|
};
|
|
2326
|
-
//# sourceMappingURL=booking-
|
|
2340
|
+
//# sourceMappingURL=booking-CbdbYvWp.js.map
|