@alfadocs/ui-kit 0.33.10 → 0.33.11
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,44 +1,44 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { u as
|
|
6
|
-
import { A as
|
|
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
|
|
15
|
-
import { T as
|
|
16
|
-
import { S as
|
|
17
|
-
import { I as
|
|
18
|
-
import { S as
|
|
19
|
-
import { S as
|
|
20
|
-
import { E as
|
|
1
|
+
import { jsxs as b, jsx as s, Fragment as W } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Qe, useId as et, useState as j, useCallback as q, useRef as ae, useEffect as G, useMemo as C, useImperativeHandle as xt } from "react";
|
|
3
|
+
import { c as Me } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as B, Trans as St } from "react-i18next";
|
|
5
|
+
import { u as Nt } from "./registry-nPAVE19X.js";
|
|
6
|
+
import { A as K } from "./alert-ywPR59NE.js";
|
|
7
|
+
import { B as se } from "./button-DD_0Xdmr.js";
|
|
8
|
+
import { C as Ve } from "./checkbox-DRcOdmXv.js";
|
|
9
|
+
import { C as It } from "./checkbox-group-CpUwlHug.js";
|
|
10
|
+
import { D as wt } from "./date-picker-B94HAV4A.js";
|
|
11
|
+
import { E as Ct } from "./email-input-lQivsFrw.js";
|
|
12
|
+
import { F as Z } from "./form-field-BOm9hK35.js";
|
|
13
|
+
import { P as Mt } from "./phone-input-DfZbPPvh.js";
|
|
14
|
+
import { T as Dt } from "./text-area-BIx0tZ05.js";
|
|
15
|
+
import { T as xe } from "./text-input-BaClJL8Y.js";
|
|
16
|
+
import { S as At } from "./spinner-CCByyvcb.js";
|
|
17
|
+
import { I as Ye } from "./icon-button-CKEOrN37.js";
|
|
18
|
+
import { S as De } from "./select-hsCaJSX3.js";
|
|
19
|
+
import { S as Ce } from "./skeleton-CZbwyJAA.js";
|
|
20
|
+
import { E as tt } from "./empty-state-BLy7tigq.js";
|
|
21
21
|
import { S as _t } from "./stepper-accordion-BfS6lUB9.js";
|
|
22
22
|
import { S as Tt } from "./stepper-progress-DDjq5nei.js";
|
|
23
|
-
import { p as
|
|
24
|
-
import { s as
|
|
25
|
-
import { w as
|
|
26
|
-
import { s as
|
|
27
|
-
import { C as
|
|
28
|
-
import { C as
|
|
29
|
-
import { c as
|
|
30
|
-
import { M as
|
|
31
|
-
import { S as
|
|
32
|
-
import { H as
|
|
33
|
-
import { E as
|
|
34
|
-
import { S as
|
|
23
|
+
import { p as $, S as Bt } from "./slot-grid-BlHHP9Qy.js";
|
|
24
|
+
import { s as ne, i as Je } from "./isSameDay-DUEiAT0G.js";
|
|
25
|
+
import { w as at, n as oe, a as Le, m as Ot, f as he, d as Pt, h as we, x as Se } from "./react-day-picker-DsjfS7uI.js";
|
|
26
|
+
import { s as Et } from "./subDays-CANHP9hz.js";
|
|
27
|
+
import { C as Rt } from "./chevron-left-CX1jqD2M.js";
|
|
28
|
+
import { C as Vt } from "./chevron-right-BrpYejk0.js";
|
|
29
|
+
import { c as V } from "./createLucideIcon-CrFbzy84.js";
|
|
30
|
+
import { M as Lt, S as Ft } from "./sun-BuXE0xUS.js";
|
|
31
|
+
import { S as $t } from "./stethoscope-DT5qCW8Y.js";
|
|
32
|
+
import { H as zt } from "./heart-pulse-CvuyFKHB.js";
|
|
33
|
+
import { E as Kt } from "./eye-LHlSU38h.js";
|
|
34
|
+
import { S as jt } from "./sparkles-CuYXqQLg.js";
|
|
35
35
|
/**
|
|
36
36
|
* @license lucide-react v1.8.0 - ISC
|
|
37
37
|
*
|
|
38
38
|
* This source code is licensed under the ISC license.
|
|
39
39
|
* See the LICENSE file in the root directory of this source tree.
|
|
40
40
|
*/
|
|
41
|
-
const
|
|
41
|
+
const qt = [
|
|
42
42
|
[
|
|
43
43
|
"path",
|
|
44
44
|
{
|
|
@@ -46,14 +46,14 @@ const Kt = [
|
|
|
46
46
|
key: "169zse"
|
|
47
47
|
}
|
|
48
48
|
]
|
|
49
|
-
],
|
|
49
|
+
], Ht = V("activity", qt);
|
|
50
50
|
/**
|
|
51
51
|
* @license lucide-react v1.8.0 - ISC
|
|
52
52
|
*
|
|
53
53
|
* This source code is licensed under the ISC license.
|
|
54
54
|
* See the LICENSE file in the root directory of this source tree.
|
|
55
55
|
*/
|
|
56
|
-
const
|
|
56
|
+
const Gt = [
|
|
57
57
|
["path", { d: "M10 16c.5.3 1.2.5 2 .5s1.5-.2 2-.5", key: "1u7htd" }],
|
|
58
58
|
["path", { d: "M15 12h.01", key: "1k8ypt" }],
|
|
59
59
|
[
|
|
@@ -64,14 +64,14 @@ const qt = [
|
|
|
64
64
|
}
|
|
65
65
|
],
|
|
66
66
|
["path", { d: "M9 12h.01", key: "157uk2" }]
|
|
67
|
-
],
|
|
67
|
+
], Ut = V("baby", Gt);
|
|
68
68
|
/**
|
|
69
69
|
* @license lucide-react v1.8.0 - ISC
|
|
70
70
|
*
|
|
71
71
|
* This source code is licensed under the ISC license.
|
|
72
72
|
* See the LICENSE file in the root directory of this source tree.
|
|
73
73
|
*/
|
|
74
|
-
const
|
|
74
|
+
const Yt = [
|
|
75
75
|
[
|
|
76
76
|
"path",
|
|
77
77
|
{
|
|
@@ -79,14 +79,14 @@ const Gt = [
|
|
|
79
79
|
key: "w610uw"
|
|
80
80
|
}
|
|
81
81
|
]
|
|
82
|
-
],
|
|
82
|
+
], Jt = V("bone", Yt);
|
|
83
83
|
/**
|
|
84
84
|
* @license lucide-react v1.8.0 - ISC
|
|
85
85
|
*
|
|
86
86
|
* This source code is licensed under the ISC license.
|
|
87
87
|
* See the LICENSE file in the root directory of this source tree.
|
|
88
88
|
*/
|
|
89
|
-
const
|
|
89
|
+
const Zt = [
|
|
90
90
|
["path", { d: "M12 18V5", key: "adv99a" }],
|
|
91
91
|
["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
|
|
92
92
|
["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
|
|
@@ -95,14 +95,14 @@ const Yt = [
|
|
|
95
95
|
["path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517", key: "1gq6am" }],
|
|
96
96
|
["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
|
|
97
97
|
["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
|
|
98
|
-
], Wt =
|
|
98
|
+
], Wt = V("brain", Zt);
|
|
99
99
|
/**
|
|
100
100
|
* @license lucide-react v1.8.0 - ISC
|
|
101
101
|
*
|
|
102
102
|
* This source code is licensed under the ISC license.
|
|
103
103
|
* See the LICENSE file in the root directory of this source tree.
|
|
104
104
|
*/
|
|
105
|
-
const
|
|
105
|
+
const Xt = [
|
|
106
106
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
107
107
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
108
108
|
["path", { d: "M3 10h18", key: "8toen8" }],
|
|
@@ -111,14 +111,14 @@ const Zt = [
|
|
|
111
111
|
["path", { d: "M13 18H7", key: "bb0bb7" }],
|
|
112
112
|
["path", { d: "M7 14h.01", key: "1qa3f1" }],
|
|
113
113
|
["path", { d: "M17 18h.01", key: "1bdyru" }]
|
|
114
|
-
],
|
|
114
|
+
], Qt = V("calendar-range", Xt);
|
|
115
115
|
/**
|
|
116
116
|
* @license lucide-react v1.8.0 - ISC
|
|
117
117
|
*
|
|
118
118
|
* This source code is licensed under the ISC license.
|
|
119
119
|
* See the LICENSE file in the root directory of this source tree.
|
|
120
120
|
*/
|
|
121
|
-
const
|
|
121
|
+
const ea = [
|
|
122
122
|
["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
|
|
123
123
|
[
|
|
124
124
|
"path",
|
|
@@ -128,89 +128,89 @@ const Xt = [
|
|
|
128
128
|
}
|
|
129
129
|
],
|
|
130
130
|
["path", { d: "m9 14 2 2 4-4", key: "df797q" }]
|
|
131
|
-
],
|
|
131
|
+
], ta = V("clipboard-check", ea);
|
|
132
132
|
/**
|
|
133
133
|
* @license lucide-react v1.8.0 - ISC
|
|
134
134
|
*
|
|
135
135
|
* This source code is licensed under the ISC license.
|
|
136
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
137
137
|
*/
|
|
138
|
-
const
|
|
138
|
+
const aa = [
|
|
139
139
|
["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" }],
|
|
140
140
|
["path", { d: "M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4", key: "1qnva7" }]
|
|
141
|
-
],
|
|
141
|
+
], sa = V("ear", aa);
|
|
142
142
|
/**
|
|
143
143
|
* @license lucide-react v1.8.0 - ISC
|
|
144
144
|
*
|
|
145
145
|
* This source code is licensed under the ISC license.
|
|
146
146
|
* See the LICENSE file in the root directory of this source tree.
|
|
147
147
|
*/
|
|
148
|
-
const
|
|
148
|
+
const ia = [
|
|
149
149
|
["path", { d: "M6 18h8", key: "1borvv" }],
|
|
150
150
|
["path", { d: "M3 22h18", key: "8prr45" }],
|
|
151
151
|
["path", { d: "M14 22a7 7 0 1 0 0-14h-1", key: "1jwaiy" }],
|
|
152
152
|
["path", { d: "M9 14h2", key: "197e7h" }],
|
|
153
153
|
["path", { d: "M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z", key: "1bmzmy" }],
|
|
154
154
|
["path", { d: "M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3", key: "1drr47" }]
|
|
155
|
-
],
|
|
155
|
+
], na = V("microscope", ia);
|
|
156
156
|
/**
|
|
157
157
|
* @license lucide-react v1.8.0 - ISC
|
|
158
158
|
*
|
|
159
159
|
* This source code is licensed under the ISC license.
|
|
160
160
|
* See the LICENSE file in the root directory of this source tree.
|
|
161
161
|
*/
|
|
162
|
-
const
|
|
162
|
+
const oa = [
|
|
163
163
|
[
|
|
164
164
|
"path",
|
|
165
165
|
{ 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" }
|
|
166
166
|
],
|
|
167
167
|
["path", { d: "m8.5 8.5 7 7", key: "rvfmvr" }]
|
|
168
|
-
],
|
|
168
|
+
], ra = V("pill", oa);
|
|
169
169
|
/**
|
|
170
170
|
* @license lucide-react v1.8.0 - ISC
|
|
171
171
|
*
|
|
172
172
|
* This source code is licensed under the ISC license.
|
|
173
173
|
* See the LICENSE file in the root directory of this source tree.
|
|
174
174
|
*/
|
|
175
|
-
const
|
|
175
|
+
const da = [
|
|
176
176
|
["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
|
|
177
177
|
["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
|
|
178
178
|
["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
|
|
179
179
|
["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2", key: "ioqczr" }],
|
|
180
180
|
["path", { d: "M7 12h10", key: "b7w52i" }]
|
|
181
|
-
],
|
|
181
|
+
], la = V("scan-line", da);
|
|
182
182
|
/**
|
|
183
183
|
* @license lucide-react v1.8.0 - ISC
|
|
184
184
|
*
|
|
185
185
|
* This source code is licensed under the ISC license.
|
|
186
186
|
* See the LICENSE file in the root directory of this source tree.
|
|
187
187
|
*/
|
|
188
|
-
const
|
|
188
|
+
const ca = [
|
|
189
189
|
["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
|
|
190
190
|
["path", { d: "M8.12 8.12 12 12", key: "1alkpv" }],
|
|
191
191
|
["path", { d: "M20 4 8.12 15.88", key: "xgtan2" }],
|
|
192
192
|
["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
|
|
193
193
|
["path", { d: "M14.8 14.8 20 20", key: "ptml3r" }]
|
|
194
|
-
],
|
|
194
|
+
], ua = V("scissors", ca);
|
|
195
195
|
/**
|
|
196
196
|
* @license lucide-react v1.8.0 - ISC
|
|
197
197
|
*
|
|
198
198
|
* This source code is licensed under the ISC license.
|
|
199
199
|
* See the LICENSE file in the root directory of this source tree.
|
|
200
200
|
*/
|
|
201
|
-
const
|
|
201
|
+
const ma = [
|
|
202
202
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
203
203
|
["path", { d: "M8 14s1.5 2 4 2 4-2 4-2", key: "1y1vjs" }],
|
|
204
204
|
["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
|
|
205
205
|
["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
|
|
206
|
-
],
|
|
206
|
+
], pa = V("smile", ma);
|
|
207
207
|
/**
|
|
208
208
|
* @license lucide-react v1.8.0 - ISC
|
|
209
209
|
*
|
|
210
210
|
* This source code is licensed under the ISC license.
|
|
211
211
|
* See the LICENSE file in the root directory of this source tree.
|
|
212
212
|
*/
|
|
213
|
-
const
|
|
213
|
+
const ga = [
|
|
214
214
|
["path", { d: "M12 10V2", key: "16sf7g" }],
|
|
215
215
|
["path", { d: "m4.93 10.93 1.41 1.41", key: "2a7f42" }],
|
|
216
216
|
["path", { d: "M2 18h2", key: "j10viu" }],
|
|
@@ -219,25 +219,25 @@ const ma = [
|
|
|
219
219
|
["path", { d: "M22 22H2", key: "19qnx5" }],
|
|
220
220
|
["path", { d: "m16 6-4 4-4-4", key: "6wukr" }],
|
|
221
221
|
["path", { d: "M16 18a4 4 0 0 0-8 0", key: "1lzouq" }]
|
|
222
|
-
],
|
|
222
|
+
], fa = V("sunset", ga);
|
|
223
223
|
/**
|
|
224
224
|
* @license lucide-react v1.8.0 - ISC
|
|
225
225
|
*
|
|
226
226
|
* This source code is licensed under the ISC license.
|
|
227
227
|
* See the LICENSE file in the root directory of this source tree.
|
|
228
228
|
*/
|
|
229
|
-
const
|
|
229
|
+
const ha = [
|
|
230
230
|
["path", { d: "m18 2 4 4", key: "22kx64" }],
|
|
231
231
|
["path", { d: "m17 7 3-3", key: "1w1zoj" }],
|
|
232
232
|
["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" }],
|
|
233
233
|
["path", { d: "m9 11 4 4", key: "rovt3i" }],
|
|
234
234
|
["path", { d: "m5 19-3 3", key: "59f2uf" }],
|
|
235
235
|
["path", { d: "m14 4 6 6", key: "yqp9t2" }]
|
|
236
|
-
],
|
|
237
|
-
function
|
|
238
|
-
return
|
|
236
|
+
], Ze = V("syringe", ha);
|
|
237
|
+
function va(e, t, a) {
|
|
238
|
+
return at(e, -1, a);
|
|
239
239
|
}
|
|
240
|
-
const
|
|
240
|
+
const ba = {
|
|
241
241
|
id: "booking",
|
|
242
242
|
capabilities: ["navigate", "view_change"],
|
|
243
243
|
state: {
|
|
@@ -283,8 +283,8 @@ const ha = {
|
|
|
283
283
|
"email",
|
|
284
284
|
"whatsapp",
|
|
285
285
|
"sms"
|
|
286
|
-
],
|
|
287
|
-
function
|
|
286
|
+
], ve = "all", ya = "de";
|
|
287
|
+
function ka(e) {
|
|
288
288
|
return [...e.lockedOperatorId ? e.specialties.filter(
|
|
289
289
|
(a) => {
|
|
290
290
|
var i;
|
|
@@ -295,7 +295,7 @@ function ba(e) {
|
|
|
295
295
|
return n - o;
|
|
296
296
|
});
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function xa(e) {
|
|
299
299
|
let t = e.services;
|
|
300
300
|
return e.lockedOperatorId && (t = t.filter(
|
|
301
301
|
(i) => {
|
|
@@ -304,7 +304,7 @@ function ya(e) {
|
|
|
304
304
|
}
|
|
305
305
|
)), (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && e.value.specialtyId && (t = t.filter((i) => i.specialtyId === e.value.specialtyId)), t;
|
|
306
306
|
}
|
|
307
|
-
function
|
|
307
|
+
function Sa(e) {
|
|
308
308
|
const t = e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties;
|
|
309
309
|
if (t && e.value.specialtyId) {
|
|
310
310
|
const a = e.value.specialtyId;
|
|
@@ -326,20 +326,20 @@ function ka(e) {
|
|
|
326
326
|
}
|
|
327
327
|
return [];
|
|
328
328
|
}
|
|
329
|
-
function
|
|
330
|
-
const a = e.country ===
|
|
329
|
+
function Na(e, t) {
|
|
330
|
+
const a = e.country === ya, i = !a || e.value.insuranceType !== void 0, o = (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && i, p = !o || e.value.specialtyId !== void 0, c = !p || e.value.serviceId !== void 0, l = t.operators, d = !!e.allowOperatorSelection && c && e.value.serviceId !== void 0 && !e.lockedOperatorId && l.length > 1, m = c && e.value.serviceId !== void 0, S = (!m || e.value.date !== void 0) && e.value.date !== void 0, w = (!S || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, N = !!e.value.serviceId && l.length === 0;
|
|
331
331
|
return {
|
|
332
332
|
insurance: a,
|
|
333
333
|
specialty: o,
|
|
334
|
-
service:
|
|
335
|
-
operator:
|
|
336
|
-
date:
|
|
337
|
-
slot:
|
|
338
|
-
details:
|
|
339
|
-
onboardingIncomplete:
|
|
334
|
+
service: p,
|
|
335
|
+
operator: d,
|
|
336
|
+
date: m,
|
|
337
|
+
slot: S,
|
|
338
|
+
details: w,
|
|
339
|
+
onboardingIncomplete: N
|
|
340
340
|
};
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function Ia(e, t) {
|
|
343
343
|
const a = [];
|
|
344
344
|
t.insurance && a.push(1), t.specialty && a.push(2), a.push(3), t.operator && a.push(4), a.push(5), a.push(6), a.push(7);
|
|
345
345
|
const i = {
|
|
@@ -357,30 +357,30 @@ function Sa(e, t) {
|
|
|
357
357
|
visibleSteps: a
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function wa(e) {
|
|
361
361
|
const t = {
|
|
362
|
-
specialties:
|
|
363
|
-
services:
|
|
364
|
-
operators:
|
|
365
|
-
}, a =
|
|
362
|
+
specialties: ka(e),
|
|
363
|
+
services: xa(e),
|
|
364
|
+
operators: Sa(e)
|
|
365
|
+
}, a = Na(e, t), { currentStep: i, visibleSteps: n } = Ia(e, a);
|
|
366
366
|
let o;
|
|
367
367
|
if (e.value.date && e.value.slotKey) {
|
|
368
|
-
const
|
|
369
|
-
|
|
368
|
+
const c = e.availableSlots[e.value.date];
|
|
369
|
+
c && (o = c.find((l) => l.key === e.value.slotKey));
|
|
370
370
|
}
|
|
371
|
-
const
|
|
371
|
+
const u = e.value.serviceId ? e.services.find((c) => c.id === e.value.serviceId) : void 0, p = e.value.serviceId !== void 0 && e.value.date !== void 0 && e.value.slotKey !== void 0 && (!a.insurance || e.value.insuranceType !== void 0) && (!a.specialty || e.value.specialtyId !== void 0);
|
|
372
372
|
return {
|
|
373
373
|
gates: a,
|
|
374
374
|
filtered: t,
|
|
375
375
|
currentStep: i,
|
|
376
376
|
totalSteps: n.length,
|
|
377
377
|
visibleSteps: n,
|
|
378
|
-
isReadyToSubmit:
|
|
379
|
-
durationMin:
|
|
378
|
+
isReadyToSubmit: p,
|
|
379
|
+
durationMin: u == null ? void 0 : u.durationMin,
|
|
380
380
|
selectedSlot: o
|
|
381
381
|
};
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function st(e, t) {
|
|
384
384
|
return {
|
|
385
385
|
...e,
|
|
386
386
|
insuranceType: t,
|
|
@@ -392,7 +392,7 @@ function tt(e, t) {
|
|
|
392
392
|
details: void 0
|
|
393
393
|
};
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function it(e, t) {
|
|
396
396
|
return {
|
|
397
397
|
...e,
|
|
398
398
|
specialtyId: t,
|
|
@@ -403,20 +403,20 @@ function at(e, t) {
|
|
|
403
403
|
details: void 0
|
|
404
404
|
};
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function nt(e, t) {
|
|
407
407
|
return {
|
|
408
408
|
...e,
|
|
409
409
|
serviceId: t,
|
|
410
410
|
// Default the operator to the "All operators" sentinel so a patient
|
|
411
411
|
// who doesn't care about picking lands on a satisfied step 4 without
|
|
412
412
|
// any further input.
|
|
413
|
-
operatorId: t ?
|
|
413
|
+
operatorId: t ? ve : void 0,
|
|
414
414
|
date: void 0,
|
|
415
415
|
slotKey: void 0,
|
|
416
416
|
details: void 0
|
|
417
417
|
};
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function ot(e, t) {
|
|
420
420
|
return {
|
|
421
421
|
...e,
|
|
422
422
|
operatorId: t,
|
|
@@ -425,7 +425,7 @@ function it(e, t) {
|
|
|
425
425
|
details: void 0
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function Ae(e, t) {
|
|
429
429
|
return {
|
|
430
430
|
...e,
|
|
431
431
|
date: t,
|
|
@@ -434,47 +434,47 @@ function Me(e, t) {
|
|
|
434
434
|
// since the user has already filled some fields.
|
|
435
435
|
};
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function rt(e, t) {
|
|
438
438
|
return {
|
|
439
439
|
...e,
|
|
440
440
|
slotKey: t
|
|
441
441
|
};
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function Ca(e, t) {
|
|
444
444
|
let a = e;
|
|
445
445
|
if (t.lockedOperatorId && a.operatorId !== t.lockedOperatorId && (a = { ...a, operatorId: t.lockedOperatorId }), (t.useSpecialties === void 0 ? t.specialties.length > 0 : t.useSpecialties) && t.specialties.length === 1 && a.specialtyId === void 0 && (a = { ...a, specialtyId: t.specialties[0].id }), t.autoSelectSingleService) {
|
|
446
446
|
const n = a.specialtyId ? t.services.filter((o) => o.specialtyId === a.specialtyId) : t.services;
|
|
447
|
-
n.length === 1 && a.serviceId === void 0 && (a = { ...a, serviceId: n[0].id }, a.operatorId === void 0 && (a = { ...a, operatorId:
|
|
447
|
+
n.length === 1 && a.serviceId === void 0 && (a = { ...a, serviceId: n[0].id }, a.operatorId === void 0 && (a = { ...a, operatorId: ve }));
|
|
448
448
|
}
|
|
449
449
|
return a;
|
|
450
450
|
}
|
|
451
451
|
function $e(e) {
|
|
452
|
-
if (e.operatorId && e.operatorId !==
|
|
452
|
+
if (e.operatorId && e.operatorId !== ve)
|
|
453
453
|
return e.operatorId;
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function Ma(e) {
|
|
456
456
|
if (!e) return !1;
|
|
457
457
|
const t = e.trim();
|
|
458
458
|
return /^\+?\d[\d\s\-()]{6,}$/.test(t);
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function dt(e) {
|
|
461
461
|
const t = e && e.length > 0 ? e : ["email"], a = new Set(t);
|
|
462
462
|
return Fe.filter((i) => a.has(i));
|
|
463
463
|
}
|
|
464
|
-
function
|
|
465
|
-
const i =
|
|
464
|
+
function Da(e, t, a) {
|
|
465
|
+
const i = dt(e), n = new Set(i);
|
|
466
466
|
if (a)
|
|
467
467
|
return Fe.filter(
|
|
468
|
-
(
|
|
468
|
+
(l) => a.includes(l) && n.has(l)
|
|
469
469
|
);
|
|
470
470
|
const o = [];
|
|
471
471
|
n.has("email") && o.push("email");
|
|
472
|
-
const
|
|
473
|
-
|
|
474
|
-
const
|
|
475
|
-
return Fe.filter((
|
|
472
|
+
const u = Ma(t), p = n.has("whatsapp");
|
|
473
|
+
p && u && o.push("whatsapp"), !p && n.has("sms") && o.push("sms");
|
|
474
|
+
const c = new Set(o);
|
|
475
|
+
return Fe.filter((l) => c.has(l));
|
|
476
476
|
}
|
|
477
|
-
const We = 500,
|
|
477
|
+
const We = 500, Aa = /^[A-Z0-9]{16}$/, _a = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Xe = 300, Ne = { state: "idle" }, ze = Qe(
|
|
478
478
|
({
|
|
479
479
|
value: e,
|
|
480
480
|
onChange: t,
|
|
@@ -482,133 +482,133 @@ const We = 500, Ma = /^[A-Z0-9]{16}$/, Da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ze = 3
|
|
|
482
482
|
requireCodiceFiscale: i = !1,
|
|
483
483
|
requireDateOfBirth: n = !1,
|
|
484
484
|
requireInsuranceNumber: o = !1,
|
|
485
|
-
insuranceType:
|
|
486
|
-
showNote:
|
|
487
|
-
showReturningPatientFlag:
|
|
488
|
-
privacyPolicyUrl:
|
|
489
|
-
termsUrl:
|
|
490
|
-
validateCodiceFiscale:
|
|
491
|
-
validateInsuranceNumber:
|
|
492
|
-
submitting:
|
|
485
|
+
insuranceType: u,
|
|
486
|
+
showNote: p = !1,
|
|
487
|
+
showReturningPatientFlag: c = !1,
|
|
488
|
+
privacyPolicyUrl: l,
|
|
489
|
+
termsUrl: d,
|
|
490
|
+
validateCodiceFiscale: m,
|
|
491
|
+
validateInsuranceNumber: y,
|
|
492
|
+
submitting: S = !1,
|
|
493
493
|
summarySlot: h,
|
|
494
|
-
defaultPhoneCountry:
|
|
495
|
-
confirmationChannels:
|
|
496
|
-
defaultConfirmationChannels:
|
|
497
|
-
submitError:
|
|
498
|
-
},
|
|
499
|
-
var
|
|
500
|
-
const { t: r } =
|
|
501
|
-
(g) =>
|
|
494
|
+
defaultPhoneCountry: w,
|
|
495
|
+
confirmationChannels: N,
|
|
496
|
+
defaultConfirmationChannels: I,
|
|
497
|
+
submitError: k
|
|
498
|
+
}, v) => {
|
|
499
|
+
var L, ee;
|
|
500
|
+
const { t: r } = B(), O = et(), [A, f] = j(Ne), [x, _] = j(Ne), [D, U] = j({}), E = q(
|
|
501
|
+
(g) => U((M) => ({ ...M, [g]: !0 })),
|
|
502
502
|
[]
|
|
503
|
-
),
|
|
503
|
+
), R = ae(null), Y = ae(
|
|
504
504
|
null
|
|
505
505
|
);
|
|
506
|
-
|
|
506
|
+
G(
|
|
507
507
|
() => () => {
|
|
508
|
-
|
|
508
|
+
R.current && clearTimeout(R.current), Y.current && clearTimeout(Y.current);
|
|
509
509
|
},
|
|
510
510
|
[]
|
|
511
511
|
);
|
|
512
512
|
const T = q(
|
|
513
513
|
(g) => t({ ...e, ...g }),
|
|
514
514
|
[e, t]
|
|
515
|
-
),
|
|
516
|
-
() =>
|
|
517
|
-
[
|
|
518
|
-
), H =
|
|
519
|
-
|
|
515
|
+
), X = C(
|
|
516
|
+
() => dt(N),
|
|
517
|
+
[N]
|
|
518
|
+
), H = X.length >= 2, re = ae(!1);
|
|
519
|
+
G(() => {
|
|
520
520
|
if (!H) {
|
|
521
521
|
e.confirmationChannels !== void 0 && T({ confirmationChannels: void 0 });
|
|
522
522
|
return;
|
|
523
523
|
}
|
|
524
524
|
if (e.confirmationChannels !== void 0) {
|
|
525
|
-
|
|
525
|
+
re.current = !0;
|
|
526
526
|
return;
|
|
527
527
|
}
|
|
528
|
-
const g =
|
|
529
|
-
|
|
528
|
+
const g = Da(
|
|
529
|
+
X,
|
|
530
530
|
e.mobilePhone,
|
|
531
|
-
|
|
531
|
+
I
|
|
532
532
|
);
|
|
533
|
-
|
|
533
|
+
re.current = !0, T({ confirmationChannels: g });
|
|
534
534
|
}, [
|
|
535
535
|
H,
|
|
536
|
-
|
|
536
|
+
X,
|
|
537
537
|
e.mobilePhone,
|
|
538
|
-
|
|
538
|
+
I
|
|
539
539
|
]);
|
|
540
|
-
const
|
|
540
|
+
const Q = C(
|
|
541
541
|
() => e.confirmationChannels ?? [],
|
|
542
542
|
[e.confirmationChannels]
|
|
543
|
-
),
|
|
544
|
-
|
|
543
|
+
), _e = H && Q.length === 0;
|
|
544
|
+
G(() => {
|
|
545
545
|
const g = e.codiceFiscale;
|
|
546
|
-
if (!i || !
|
|
547
|
-
|
|
546
|
+
if (!i || !m || !g) {
|
|
547
|
+
f(Ne);
|
|
548
548
|
return;
|
|
549
549
|
}
|
|
550
|
-
if (!
|
|
551
|
-
|
|
550
|
+
if (!Aa.test(g)) {
|
|
551
|
+
f({
|
|
552
552
|
state: "invalid",
|
|
553
553
|
hint: r("booking.details.codiceFiscale.invalidFormat")
|
|
554
554
|
});
|
|
555
555
|
return;
|
|
556
556
|
}
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
(
|
|
560
|
-
|
|
557
|
+
f({ state: "pending" }), R.current && clearTimeout(R.current), R.current = setTimeout(() => {
|
|
558
|
+
m(g).then(
|
|
559
|
+
(M) => f(
|
|
560
|
+
M.valid ? { state: "valid" } : { state: "invalid", hint: M.hint }
|
|
561
561
|
)
|
|
562
562
|
).catch(
|
|
563
|
-
() =>
|
|
563
|
+
() => f({
|
|
564
564
|
state: "invalid",
|
|
565
565
|
hint: r("booking.details.codiceFiscale.unavailable")
|
|
566
566
|
})
|
|
567
567
|
);
|
|
568
|
-
},
|
|
569
|
-
}, [i,
|
|
570
|
-
const
|
|
571
|
-
|
|
568
|
+
}, Xe);
|
|
569
|
+
}, [i, m, e.codiceFiscale, r]);
|
|
570
|
+
const J = o && u === "public";
|
|
571
|
+
G(() => {
|
|
572
572
|
const g = e.insuranceNumber;
|
|
573
|
-
if (!
|
|
574
|
-
|
|
573
|
+
if (!J || !y || !g) {
|
|
574
|
+
_(Ne);
|
|
575
575
|
return;
|
|
576
576
|
}
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
(
|
|
580
|
-
|
|
577
|
+
_({ state: "pending" }), Y.current && clearTimeout(Y.current), Y.current = setTimeout(() => {
|
|
578
|
+
y(g).then(
|
|
579
|
+
(M) => _(
|
|
580
|
+
M.valid ? { state: "valid" } : { state: "invalid", hint: M.hint }
|
|
581
581
|
)
|
|
582
582
|
).catch(
|
|
583
|
-
() =>
|
|
583
|
+
() => _({
|
|
584
584
|
state: "invalid",
|
|
585
585
|
hint: r("booking.details.insuranceNumber.unavailable")
|
|
586
586
|
})
|
|
587
587
|
);
|
|
588
|
-
},
|
|
589
|
-
}, [
|
|
590
|
-
const
|
|
591
|
-
() => !!(e.email &&
|
|
588
|
+
}, Xe);
|
|
589
|
+
}, [J, y, e.insuranceNumber, r]);
|
|
590
|
+
const ie = C(
|
|
591
|
+
() => !!(e.email && _a.test(e.email)),
|
|
592
592
|
[e.email]
|
|
593
|
-
),
|
|
593
|
+
), de = C(
|
|
594
594
|
() => !!(e.mobilePhone && e.mobilePhone.length >= 6),
|
|
595
595
|
[e.mobilePhone]
|
|
596
|
-
),
|
|
597
|
-
var g,
|
|
598
|
-
return !(!((g = e.firstName) != null && g.trim()) || !((
|
|
596
|
+
), le = C(() => {
|
|
597
|
+
var g, M;
|
|
598
|
+
return !(!((g = e.firstName) != null && g.trim()) || !((M = e.lastName) != null && M.trim()) || !ie || !de || i && A.state !== "valid" || n && !e.dateOfBirth || J && x.state !== "valid");
|
|
599
599
|
}, [
|
|
600
600
|
e.firstName,
|
|
601
601
|
e.lastName,
|
|
602
|
-
|
|
603
|
-
|
|
602
|
+
ie,
|
|
603
|
+
de,
|
|
604
604
|
i,
|
|
605
|
-
|
|
605
|
+
A.state,
|
|
606
606
|
n,
|
|
607
607
|
e.dateOfBirth,
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
]),
|
|
611
|
-
if (g.preventDefault(),
|
|
608
|
+
J,
|
|
609
|
+
x.state
|
|
610
|
+
]), Te = !!(e.privacyConsent && e.termsConsent), Be = !H || Q.length > 0, ye = le && Te && Be && !S, ce = (g) => {
|
|
611
|
+
if (g.preventDefault(), U({
|
|
612
612
|
firstName: !0,
|
|
613
613
|
lastName: !0,
|
|
614
614
|
email: !0,
|
|
@@ -616,8 +616,8 @@ const We = 500, Ma = /^[A-Z0-9]{16}$/, Da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ze = 3
|
|
|
616
616
|
codiceFiscale: !0,
|
|
617
617
|
dateOfBirth: !0,
|
|
618
618
|
insuranceNumber: !0
|
|
619
|
-
}), !
|
|
620
|
-
const
|
|
619
|
+
}), !ye) return;
|
|
620
|
+
const M = {
|
|
621
621
|
firstName: e.firstName.trim(),
|
|
622
622
|
lastName: e.lastName.trim(),
|
|
623
623
|
email: e.email.trim(),
|
|
@@ -632,13 +632,13 @@ const We = 500, Ma = /^[A-Z0-9]{16}$/, Da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ze = 3
|
|
|
632
632
|
// Only include when the picker was visible; otherwise the single
|
|
633
633
|
// implicit channel is inferred backend-side from the practice
|
|
634
634
|
// config.
|
|
635
|
-
confirmationChannels: H ?
|
|
635
|
+
confirmationChannels: H ? Q : void 0
|
|
636
636
|
};
|
|
637
|
-
a(
|
|
638
|
-
},
|
|
639
|
-
const
|
|
640
|
-
return
|
|
641
|
-
|
|
637
|
+
a(M);
|
|
638
|
+
}, ke = (g, M) => {
|
|
639
|
+
const P = M && /^https?:\/\//i.test(M) ? M : void 0;
|
|
640
|
+
return P ? /* @__PURE__ */ s(
|
|
641
|
+
St,
|
|
642
642
|
{
|
|
643
643
|
i18nKey: g,
|
|
644
644
|
components: {
|
|
@@ -652,7 +652,7 @@ const We = 500, Ma = /^[A-Z0-9]{16}$/, Da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ze = 3
|
|
|
652
652
|
/* @__PURE__ */ s(
|
|
653
653
|
"a",
|
|
654
654
|
{
|
|
655
|
-
href:
|
|
655
|
+
href: P,
|
|
656
656
|
target: "_blank",
|
|
657
657
|
rel: "noopener noreferrer",
|
|
658
658
|
className: "ds:underline ds:text-[var(--primary)]"
|
|
@@ -663,25 +663,25 @@ const We = 500, Ma = /^[A-Z0-9]{16}$/, Da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ze = 3
|
|
|
663
663
|
}
|
|
664
664
|
) : r(g);
|
|
665
665
|
};
|
|
666
|
-
return /* @__PURE__ */
|
|
666
|
+
return /* @__PURE__ */ b(
|
|
667
667
|
"form",
|
|
668
668
|
{
|
|
669
|
-
ref:
|
|
670
|
-
id:
|
|
669
|
+
ref: v,
|
|
670
|
+
id: O,
|
|
671
671
|
noValidate: !0,
|
|
672
|
-
onSubmit:
|
|
672
|
+
onSubmit: ce,
|
|
673
673
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
674
674
|
children: [
|
|
675
675
|
h,
|
|
676
|
-
/* @__PURE__ */
|
|
676
|
+
/* @__PURE__ */ b("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
|
|
677
677
|
/* @__PURE__ */ s(
|
|
678
|
-
|
|
678
|
+
Z,
|
|
679
679
|
{
|
|
680
680
|
label: r("booking.details.firstName.label"),
|
|
681
681
|
required: !0,
|
|
682
|
-
error:
|
|
682
|
+
error: D.firstName && !((L = e.firstName) != null && L.trim()) ? r("booking.details.firstName.required") : void 0,
|
|
683
683
|
children: /* @__PURE__ */ s(
|
|
684
|
-
|
|
684
|
+
xe,
|
|
685
685
|
{
|
|
686
686
|
autoComplete: "given-name",
|
|
687
687
|
value: e.firstName ?? "",
|
|
@@ -692,13 +692,13 @@ const We = 500, Ma = /^[A-Z0-9]{16}$/, Da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ze = 3
|
|
|
692
692
|
}
|
|
693
693
|
),
|
|
694
694
|
/* @__PURE__ */ s(
|
|
695
|
-
|
|
695
|
+
Z,
|
|
696
696
|
{
|
|
697
697
|
label: r("booking.details.lastName.label"),
|
|
698
698
|
required: !0,
|
|
699
|
-
error:
|
|
699
|
+
error: D.lastName && !((ee = e.lastName) != null && ee.trim()) ? r("booking.details.lastName.required") : void 0,
|
|
700
700
|
children: /* @__PURE__ */ s(
|
|
701
|
-
|
|
701
|
+
xe,
|
|
702
702
|
{
|
|
703
703
|
autoComplete: "family-name",
|
|
704
704
|
value: e.lastName ?? "",
|
|
@@ -709,15 +709,15 @@ const We = 500, Ma = /^[A-Z0-9]{16}$/, Da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ze = 3
|
|
|
709
709
|
}
|
|
710
710
|
)
|
|
711
711
|
] }),
|
|
712
|
-
/* @__PURE__ */
|
|
712
|
+
/* @__PURE__ */ b("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
|
|
713
713
|
/* @__PURE__ */ s(
|
|
714
|
-
|
|
714
|
+
Z,
|
|
715
715
|
{
|
|
716
716
|
label: r("booking.details.email.label"),
|
|
717
717
|
required: !0,
|
|
718
|
-
error:
|
|
718
|
+
error: D.email && !ie ? r("booking.details.email.invalid") : void 0,
|
|
719
719
|
children: /* @__PURE__ */ s(
|
|
720
|
-
|
|
720
|
+
Ct,
|
|
721
721
|
{
|
|
722
722
|
value: e.email ?? "",
|
|
723
723
|
onChange: (g) => T({ email: g.target.value }),
|
|
@@ -727,16 +727,16 @@ const We = 500, Ma = /^[A-Z0-9]{16}$/, Da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ze = 3
|
|
|
727
727
|
}
|
|
728
728
|
),
|
|
729
729
|
/* @__PURE__ */ s(
|
|
730
|
-
|
|
730
|
+
Z,
|
|
731
731
|
{
|
|
732
732
|
label: r("booking.details.mobilePhone.label"),
|
|
733
733
|
required: !0,
|
|
734
|
-
error:
|
|
734
|
+
error: D.mobilePhone && !de ? r("booking.details.mobilePhone.invalid") : void 0,
|
|
735
735
|
children: /* @__PURE__ */ s(
|
|
736
|
-
|
|
736
|
+
Mt,
|
|
737
737
|
{
|
|
738
738
|
value: e.mobilePhone ?? "",
|
|
739
|
-
defaultCountry:
|
|
739
|
+
defaultCountry: w == null ? void 0 : w.toUpperCase(),
|
|
740
740
|
onChange: (g) => {
|
|
741
741
|
T({ mobilePhone: g }), E("mobilePhone");
|
|
742
742
|
}
|
|
@@ -745,16 +745,16 @@ const We = 500, Ma = /^[A-Z0-9]{16}$/, Da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ze = 3
|
|
|
745
745
|
}
|
|
746
746
|
)
|
|
747
747
|
] }),
|
|
748
|
-
i || n ? /* @__PURE__ */
|
|
748
|
+
i || n ? /* @__PURE__ */ b("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
|
|
749
749
|
i ? /* @__PURE__ */ s(
|
|
750
|
-
|
|
750
|
+
Z,
|
|
751
751
|
{
|
|
752
752
|
label: r("booking.details.codiceFiscale.label"),
|
|
753
753
|
required: !0,
|
|
754
|
-
description:
|
|
755
|
-
error:
|
|
754
|
+
description: A.state === "pending" ? r("booking.details.codiceFiscale.checking") : r("booking.details.codiceFiscale.helper"),
|
|
755
|
+
error: D.codiceFiscale && A.state === "invalid" ? A.hint ?? r("booking.details.codiceFiscale.invalid") : void 0,
|
|
756
756
|
children: /* @__PURE__ */ s(
|
|
757
|
-
|
|
757
|
+
xe,
|
|
758
758
|
{
|
|
759
759
|
value: e.codiceFiscale ?? "",
|
|
760
760
|
maxLength: 16,
|
|
@@ -767,13 +767,13 @@ const We = 500, Ma = /^[A-Z0-9]{16}$/, Da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ze = 3
|
|
|
767
767
|
}
|
|
768
768
|
) : null,
|
|
769
769
|
n ? /* @__PURE__ */ s(
|
|
770
|
-
|
|
770
|
+
Z,
|
|
771
771
|
{
|
|
772
772
|
label: r("booking.details.dateOfBirth.label"),
|
|
773
773
|
required: !0,
|
|
774
|
-
error:
|
|
774
|
+
error: D.dateOfBirth && !e.dateOfBirth ? r("booking.details.dateOfBirth.required") : void 0,
|
|
775
775
|
children: /* @__PURE__ */ s(
|
|
776
|
-
|
|
776
|
+
wt,
|
|
777
777
|
{
|
|
778
778
|
value: e.dateOfBirth ? new Date(e.dateOfBirth) : void 0,
|
|
779
779
|
onChange: (g) => {
|
|
@@ -786,15 +786,15 @@ const We = 500, Ma = /^[A-Z0-9]{16}$/, Da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ze = 3
|
|
|
786
786
|
}
|
|
787
787
|
) : null
|
|
788
788
|
] }) : null,
|
|
789
|
-
|
|
790
|
-
|
|
789
|
+
J ? /* @__PURE__ */ s(
|
|
790
|
+
Z,
|
|
791
791
|
{
|
|
792
792
|
label: r("booking.details.insuranceNumber.label"),
|
|
793
793
|
required: !0,
|
|
794
|
-
description:
|
|
795
|
-
error:
|
|
794
|
+
description: x.state === "pending" ? r("booking.details.insuranceNumber.checking") : void 0,
|
|
795
|
+
error: D.insuranceNumber && x.state === "invalid" ? x.hint ?? r("booking.details.insuranceNumber.invalid") : void 0,
|
|
796
796
|
children: /* @__PURE__ */ s(
|
|
797
|
-
|
|
797
|
+
xe,
|
|
798
798
|
{
|
|
799
799
|
value: e.insuranceNumber ?? "",
|
|
800
800
|
onChange: (g) => T({ insuranceNumber: g.target.value }),
|
|
@@ -803,15 +803,15 @@ const We = 500, Ma = /^[A-Z0-9]{16}$/, Da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ze = 3
|
|
|
803
803
|
)
|
|
804
804
|
}
|
|
805
805
|
) : null,
|
|
806
|
-
|
|
807
|
-
|
|
806
|
+
p ? /* @__PURE__ */ s(
|
|
807
|
+
Z,
|
|
808
808
|
{
|
|
809
809
|
label: r("booking.details.note.label"),
|
|
810
810
|
description: r("booking.details.note.helper", {
|
|
811
811
|
max: We
|
|
812
812
|
}),
|
|
813
813
|
children: /* @__PURE__ */ s(
|
|
814
|
-
|
|
814
|
+
Dt,
|
|
815
815
|
{
|
|
816
816
|
value: e.note ?? "",
|
|
817
817
|
maxLength: We,
|
|
@@ -821,24 +821,24 @@ const We = 500, Ma = /^[A-Z0-9]{16}$/, Da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ze = 3
|
|
|
821
821
|
)
|
|
822
822
|
}
|
|
823
823
|
) : null,
|
|
824
|
-
|
|
825
|
-
|
|
824
|
+
c ? /* @__PURE__ */ s(
|
|
825
|
+
Ve,
|
|
826
826
|
{
|
|
827
827
|
checked: !!e.returningPatient,
|
|
828
828
|
onCheckedChange: (g) => T({ returningPatient: g === !0 }),
|
|
829
829
|
label: r("booking.details.returningPatient.label")
|
|
830
830
|
}
|
|
831
831
|
) : null,
|
|
832
|
-
/* @__PURE__ */
|
|
832
|
+
/* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
833
833
|
/* @__PURE__ */ s(
|
|
834
|
-
|
|
834
|
+
Ve,
|
|
835
835
|
{
|
|
836
836
|
checked: !!e.privacyConsent,
|
|
837
837
|
onCheckedChange: (g) => T({ privacyConsent: g === !0 }),
|
|
838
|
-
label: /* @__PURE__ */
|
|
839
|
-
|
|
838
|
+
label: /* @__PURE__ */ b(W, { children: [
|
|
839
|
+
ke(
|
|
840
840
|
"booking.details.consent.privacy.label",
|
|
841
|
-
|
|
841
|
+
l
|
|
842
842
|
),
|
|
843
843
|
/* @__PURE__ */ s(
|
|
844
844
|
"span",
|
|
@@ -852,14 +852,14 @@ const We = 500, Ma = /^[A-Z0-9]{16}$/, Da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ze = 3
|
|
|
852
852
|
}
|
|
853
853
|
),
|
|
854
854
|
/* @__PURE__ */ s(
|
|
855
|
-
|
|
855
|
+
Ve,
|
|
856
856
|
{
|
|
857
857
|
checked: !!e.termsConsent,
|
|
858
858
|
onCheckedChange: (g) => T({ termsConsent: g === !0 }),
|
|
859
|
-
label: /* @__PURE__ */
|
|
860
|
-
|
|
859
|
+
label: /* @__PURE__ */ b(W, { children: [
|
|
860
|
+
ke(
|
|
861
861
|
"booking.details.consent.terms.label",
|
|
862
|
-
|
|
862
|
+
d
|
|
863
863
|
),
|
|
864
864
|
/* @__PURE__ */ s(
|
|
865
865
|
"span",
|
|
@@ -879,33 +879,33 @@ const We = 500, Ma = /^[A-Z0-9]{16}$/, Da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ze = 3
|
|
|
879
879
|
"data-component": "booking-confirmation-channels",
|
|
880
880
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
881
881
|
children: /* @__PURE__ */ s(
|
|
882
|
-
|
|
882
|
+
It,
|
|
883
883
|
{
|
|
884
884
|
label: r("booking.confirmation.heading"),
|
|
885
885
|
helperText: r("booking.confirmation.helper"),
|
|
886
|
-
value:
|
|
886
|
+
value: Q,
|
|
887
887
|
onChange: (g) => T({
|
|
888
888
|
confirmationChannels: g
|
|
889
889
|
}),
|
|
890
890
|
orientation: "vertical",
|
|
891
|
-
options:
|
|
891
|
+
options: X.map((g) => ({
|
|
892
892
|
value: g,
|
|
893
893
|
label: r(`booking.confirmation.channel.${g}`)
|
|
894
894
|
})),
|
|
895
|
-
error:
|
|
895
|
+
error: _e ? r("booking.confirmation.atLeastOne") : void 0
|
|
896
896
|
}
|
|
897
897
|
)
|
|
898
898
|
}
|
|
899
899
|
) : null,
|
|
900
|
-
|
|
900
|
+
k ? /* @__PURE__ */ s(K, { variant: "error", children: /* @__PURE__ */ s(K.Description, { children: k }) }) : null,
|
|
901
901
|
/* @__PURE__ */ s(
|
|
902
|
-
|
|
902
|
+
se,
|
|
903
903
|
{
|
|
904
904
|
intent: "primary",
|
|
905
905
|
size: "md",
|
|
906
906
|
type: "submit",
|
|
907
|
-
disabled: !
|
|
908
|
-
startIcon:
|
|
907
|
+
disabled: !ye,
|
|
908
|
+
startIcon: S ? /* @__PURE__ */ s(At, { size: "sm" }) : void 0,
|
|
909
909
|
children: r("booking.details.submit")
|
|
910
910
|
}
|
|
911
911
|
)
|
|
@@ -915,7 +915,7 @@ const We = 500, Ma = /^[A-Z0-9]{16}$/, Da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ze = 3
|
|
|
915
915
|
}
|
|
916
916
|
);
|
|
917
917
|
ze.displayName = "BookingDetailsForm";
|
|
918
|
-
const
|
|
918
|
+
const Ta = Me(
|
|
919
919
|
"ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)]",
|
|
920
920
|
{
|
|
921
921
|
variants: {
|
|
@@ -943,40 +943,40 @@ const _a = we(
|
|
|
943
943
|
},
|
|
944
944
|
defaultVariants: { variant: "inline-list", surface: "flat" }
|
|
945
945
|
}
|
|
946
|
-
),
|
|
946
|
+
), Ba = [
|
|
947
947
|
[
|
|
948
948
|
/\b(estetic|aesthetic|botox|filler|mesoterap|chirurgia\s*plastic)/i,
|
|
949
|
-
|
|
949
|
+
Ze
|
|
950
950
|
],
|
|
951
|
-
[/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i,
|
|
952
|
-
[/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i,
|
|
953
|
-
[/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i,
|
|
954
|
-
[/\b(otorin|udito|orecchi|hearing|ear)/i,
|
|
951
|
+
[/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i, zt],
|
|
952
|
+
[/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i, pa],
|
|
953
|
+
[/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i, Kt],
|
|
954
|
+
[/\b(otorin|udito|orecchi|hearing|ear)/i, sa],
|
|
955
955
|
[/\b(neuro|brain|cervello)/i, Wt],
|
|
956
|
-
[/\b(pediatr|child|bambin)/i,
|
|
957
|
-
[/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i,
|
|
958
|
-
[/\b(lab|analis|test|sang|esami)/i,
|
|
959
|
-
[/\b(farmaco|pharm|pillol|refill)/i,
|
|
960
|
-
[/\b(chirurg|surg|intervent|operat)/i,
|
|
961
|
-
[/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i,
|
|
962
|
-
[/\b(vacc|inject|inie|punto)/i,
|
|
963
|
-
[/\b(derma|skin|pelle)/i,
|
|
964
|
-
[/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i,
|
|
965
|
-
[/\b(general|medicin|family|control|check[-\s]?up)/i,
|
|
956
|
+
[/\b(pediatr|child|bambin)/i, Ut],
|
|
957
|
+
[/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, Jt],
|
|
958
|
+
[/\b(lab|analis|test|sang|esami)/i, na],
|
|
959
|
+
[/\b(farmaco|pharm|pillol|refill)/i, ra],
|
|
960
|
+
[/\b(chirurg|surg|intervent|operat)/i, ua],
|
|
961
|
+
[/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, la],
|
|
962
|
+
[/\b(vacc|inject|inie|punto)/i, Ze],
|
|
963
|
+
[/\b(derma|skin|pelle)/i, jt],
|
|
964
|
+
[/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, ta],
|
|
965
|
+
[/\b(general|medicin|family|control|check[-\s]?up)/i, Ht]
|
|
966
966
|
];
|
|
967
|
-
function
|
|
968
|
-
for (const [t, a] of
|
|
967
|
+
function Oa(e) {
|
|
968
|
+
for (const [t, a] of Ba)
|
|
969
969
|
if (t.test(e)) return a;
|
|
970
970
|
return null;
|
|
971
971
|
}
|
|
972
|
-
function
|
|
973
|
-
const t =
|
|
972
|
+
function Pa(e) {
|
|
973
|
+
const t = Oa(e.label) ?? $t;
|
|
974
974
|
return /* @__PURE__ */ s(t, { "aria-hidden": "true", className: "ds:size-5" });
|
|
975
975
|
}
|
|
976
|
-
function
|
|
977
|
-
return
|
|
976
|
+
function te(e) {
|
|
977
|
+
return we(e, "yyyy-MM-dd");
|
|
978
978
|
}
|
|
979
|
-
const
|
|
979
|
+
const Ea = [
|
|
980
980
|
"ds:relative ds:flex ds:items-center ds:justify-center",
|
|
981
981
|
"ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
|
|
982
982
|
"ds:rounded-[var(--radius-sm)]",
|
|
@@ -986,7 +986,7 @@ const Oa = [
|
|
|
986
986
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
987
987
|
"ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
988
988
|
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
989
|
-
].join(" "),
|
|
989
|
+
].join(" "), Ra = Me(Ea, {
|
|
990
990
|
variants: {
|
|
991
991
|
state: {
|
|
992
992
|
available: "ds:cursor-pointer ds:text-[var(--foreground)] ds:hover:bg-[var(--muted)]/30",
|
|
@@ -997,93 +997,93 @@ const Oa = [
|
|
|
997
997
|
},
|
|
998
998
|
defaultVariants: { state: "unavailable" }
|
|
999
999
|
});
|
|
1000
|
-
function
|
|
1000
|
+
function Va({
|
|
1001
1001
|
availableDates: e,
|
|
1002
1002
|
selectedDate: t,
|
|
1003
1003
|
onSelectDate: a,
|
|
1004
1004
|
locale: i,
|
|
1005
1005
|
loading: n
|
|
1006
1006
|
}) {
|
|
1007
|
-
const { t: o } =
|
|
1008
|
-
const
|
|
1009
|
-
for (let
|
|
1010
|
-
const
|
|
1011
|
-
|
|
1007
|
+
const { t: o } = B(), u = C(() => t ? he($(t)) : e.length > 0 ? he($(e[0])) : he(/* @__PURE__ */ new Date()), [t, e]), [p, c] = j(u), [l, d] = j(null), m = C(() => {
|
|
1008
|
+
const k = he(p), v = Pt(p), r = k.getDay(), O = v.getDate(), A = [];
|
|
1009
|
+
for (let f = r; f > 0; f -= 1) {
|
|
1010
|
+
const x = new Date(k);
|
|
1011
|
+
x.setDate(k.getDate() - f), A.push(x);
|
|
1012
1012
|
}
|
|
1013
|
-
for (let
|
|
1014
|
-
const
|
|
1015
|
-
|
|
1013
|
+
for (let f = 0; f < O; f += 1) {
|
|
1014
|
+
const x = new Date(k);
|
|
1015
|
+
x.setDate(k.getDate() + f), A.push(x);
|
|
1016
1016
|
}
|
|
1017
|
-
for (;
|
|
1018
|
-
const
|
|
1019
|
-
|
|
1017
|
+
for (; A.length < 42; ) {
|
|
1018
|
+
const f = A[A.length - 1], x = new Date(f);
|
|
1019
|
+
x.setDate(f.getDate() + 1), A.push(x);
|
|
1020
1020
|
}
|
|
1021
|
-
return
|
|
1022
|
-
}, [
|
|
1021
|
+
return A;
|
|
1022
|
+
}, [p]), y = C(() => {
|
|
1023
1023
|
try {
|
|
1024
1024
|
return new Intl.DateTimeFormat(i, {
|
|
1025
1025
|
month: "long",
|
|
1026
1026
|
year: "numeric"
|
|
1027
|
-
}).format(
|
|
1027
|
+
}).format(p);
|
|
1028
1028
|
} catch {
|
|
1029
|
-
return
|
|
1029
|
+
return we(p, "MMMM yyyy");
|
|
1030
1030
|
}
|
|
1031
|
-
}, [
|
|
1032
|
-
const
|
|
1033
|
-
return Array.from({ length: 7 }, (
|
|
1034
|
-
const
|
|
1035
|
-
|
|
1031
|
+
}, [p, i]), S = C(() => {
|
|
1032
|
+
const k = new Date(2024, 0, 7);
|
|
1033
|
+
return Array.from({ length: 7 }, (v, r) => {
|
|
1034
|
+
const O = new Date(k);
|
|
1035
|
+
O.setDate(k.getDate() + r);
|
|
1036
1036
|
try {
|
|
1037
|
-
return new Intl.DateTimeFormat(i, { weekday: "short" }).format(
|
|
1037
|
+
return new Intl.DateTimeFormat(i, { weekday: "short" }).format(O);
|
|
1038
1038
|
} catch {
|
|
1039
|
-
return
|
|
1039
|
+
return we(O, "EEE");
|
|
1040
1040
|
}
|
|
1041
1041
|
});
|
|
1042
|
-
}, [i]), h =
|
|
1043
|
-
(
|
|
1042
|
+
}, [i]), h = C(() => new Set(e), [e]), w = q(
|
|
1043
|
+
(k) => h.has(te(k)),
|
|
1044
1044
|
[h]
|
|
1045
|
-
),
|
|
1046
|
-
if (
|
|
1047
|
-
if (t) return
|
|
1048
|
-
const
|
|
1049
|
-
(
|
|
1045
|
+
), N = C(() => {
|
|
1046
|
+
if (l) return l;
|
|
1047
|
+
if (t) return $(t);
|
|
1048
|
+
const k = m.find(
|
|
1049
|
+
(v) => Se(v, p) && w(v)
|
|
1050
1050
|
);
|
|
1051
|
-
return
|
|
1052
|
-
}, [
|
|
1053
|
-
(
|
|
1051
|
+
return k || (m.find((v) => Se(v, p)) ?? null);
|
|
1052
|
+
}, [l, t, m, p, w]), I = q(
|
|
1053
|
+
(k, v) => {
|
|
1054
1054
|
let r = null;
|
|
1055
|
-
switch (
|
|
1055
|
+
switch (k.key) {
|
|
1056
1056
|
case "ArrowLeft":
|
|
1057
|
-
r = new Date(
|
|
1057
|
+
r = new Date(v), r.setDate(v.getDate() - 1);
|
|
1058
1058
|
break;
|
|
1059
1059
|
case "ArrowRight":
|
|
1060
|
-
r = new Date(
|
|
1060
|
+
r = new Date(v), r.setDate(v.getDate() + 1);
|
|
1061
1061
|
break;
|
|
1062
1062
|
case "ArrowUp":
|
|
1063
|
-
r = new Date(
|
|
1063
|
+
r = new Date(v), r.setDate(v.getDate() - 7);
|
|
1064
1064
|
break;
|
|
1065
1065
|
case "ArrowDown":
|
|
1066
|
-
r = new Date(
|
|
1066
|
+
r = new Date(v), r.setDate(v.getDate() + 7);
|
|
1067
1067
|
break;
|
|
1068
1068
|
case "Home":
|
|
1069
|
-
r = new Date(
|
|
1069
|
+
r = new Date(v), r.setDate(v.getDate() - v.getDay());
|
|
1070
1070
|
break;
|
|
1071
1071
|
case "End":
|
|
1072
|
-
r = new Date(
|
|
1072
|
+
r = new Date(v), r.setDate(v.getDate() + (6 - v.getDay()));
|
|
1073
1073
|
break;
|
|
1074
1074
|
case "Enter":
|
|
1075
1075
|
case " ": {
|
|
1076
|
-
|
|
1076
|
+
k.preventDefault(), w(v) && a(te(v));
|
|
1077
1077
|
return;
|
|
1078
1078
|
}
|
|
1079
1079
|
default:
|
|
1080
1080
|
return;
|
|
1081
1081
|
}
|
|
1082
|
-
r && (
|
|
1082
|
+
r && (k.preventDefault(), Se(r, p) || c(he(r)), d(r));
|
|
1083
1083
|
},
|
|
1084
|
-
[
|
|
1084
|
+
[w, a, p]
|
|
1085
1085
|
);
|
|
1086
|
-
return n ? /* @__PURE__ */
|
|
1086
|
+
return n ? /* @__PURE__ */ b(
|
|
1087
1087
|
"div",
|
|
1088
1088
|
{
|
|
1089
1089
|
role: "status",
|
|
@@ -1091,22 +1091,22 @@ function Ea({
|
|
|
1091
1091
|
"aria-label": o("common.loading"),
|
|
1092
1092
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
1093
1093
|
children: [
|
|
1094
|
-
/* @__PURE__ */ s(
|
|
1095
|
-
/* @__PURE__ */ s("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (
|
|
1094
|
+
/* @__PURE__ */ s(Ce, { variant: "text", width: "40%" }),
|
|
1095
|
+
/* @__PURE__ */ s("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (k, v) => /* @__PURE__ */ s(Ce, { variant: "rounded", height: "2.5rem" }, `mg-skel-${v}`)) })
|
|
1096
1096
|
]
|
|
1097
1097
|
}
|
|
1098
|
-
) : /* @__PURE__ */
|
|
1099
|
-
/* @__PURE__ */
|
|
1098
|
+
) : /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1099
|
+
/* @__PURE__ */ b("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
1100
1100
|
/* @__PURE__ */ s(
|
|
1101
|
-
|
|
1101
|
+
Ye,
|
|
1102
1102
|
{
|
|
1103
|
-
icon: /* @__PURE__ */ s(
|
|
1103
|
+
icon: /* @__PURE__ */ s(Rt, {}),
|
|
1104
1104
|
"aria-label": o("booking.previousMonth"),
|
|
1105
1105
|
size: "sm",
|
|
1106
1106
|
intent: "ghost",
|
|
1107
1107
|
flipIconInRtl: !0,
|
|
1108
1108
|
onClick: () => {
|
|
1109
|
-
|
|
1109
|
+
c((k) => va(k)), d(null);
|
|
1110
1110
|
}
|
|
1111
1111
|
}
|
|
1112
1112
|
),
|
|
@@ -1115,24 +1115,24 @@ function Ea({
|
|
|
1115
1115
|
{
|
|
1116
1116
|
className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]",
|
|
1117
1117
|
"aria-live": "polite",
|
|
1118
|
-
children:
|
|
1118
|
+
children: y
|
|
1119
1119
|
}
|
|
1120
1120
|
),
|
|
1121
1121
|
/* @__PURE__ */ s(
|
|
1122
|
-
|
|
1122
|
+
Ye,
|
|
1123
1123
|
{
|
|
1124
|
-
icon: /* @__PURE__ */ s(
|
|
1124
|
+
icon: /* @__PURE__ */ s(Vt, {}),
|
|
1125
1125
|
"aria-label": o("booking.nextMonth"),
|
|
1126
1126
|
size: "sm",
|
|
1127
1127
|
intent: "ghost",
|
|
1128
1128
|
flipIconInRtl: !0,
|
|
1129
1129
|
onClick: () => {
|
|
1130
|
-
|
|
1130
|
+
c((k) => at(k, 1)), d(null);
|
|
1131
1131
|
}
|
|
1132
1132
|
}
|
|
1133
1133
|
)
|
|
1134
1134
|
] }),
|
|
1135
|
-
/* @__PURE__ */
|
|
1135
|
+
/* @__PURE__ */ b(
|
|
1136
1136
|
"div",
|
|
1137
1137
|
{
|
|
1138
1138
|
role: "grid",
|
|
@@ -1144,30 +1144,30 @@ function Ea({
|
|
|
1144
1144
|
{
|
|
1145
1145
|
role: "row",
|
|
1146
1146
|
className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
|
|
1147
|
-
children:
|
|
1147
|
+
children: S.map((k, v) => /* @__PURE__ */ s(
|
|
1148
1148
|
"div",
|
|
1149
1149
|
{
|
|
1150
1150
|
role: "columnheader",
|
|
1151
1151
|
className: "type-meta ds:text-center ds:text-[var(--muted-foreground)] ds:font-[var(--font-weight-medium)]",
|
|
1152
|
-
children:
|
|
1152
|
+
children: k
|
|
1153
1153
|
},
|
|
1154
|
-
`wd-${
|
|
1154
|
+
`wd-${v}`
|
|
1155
1155
|
))
|
|
1156
1156
|
}
|
|
1157
1157
|
),
|
|
1158
|
-
Array.from({ length: 6 }, (
|
|
1158
|
+
Array.from({ length: 6 }, (k, v) => /* @__PURE__ */ s(
|
|
1159
1159
|
"div",
|
|
1160
1160
|
{
|
|
1161
1161
|
role: "row",
|
|
1162
1162
|
className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
|
|
1163
|
-
children:
|
|
1164
|
-
const
|
|
1163
|
+
children: m.slice(v * 7, v * 7 + 7).map((r, O) => {
|
|
1164
|
+
const A = v * 7 + O, f = Se(r, p), x = f && w(r), _ = t ? Je(r, $(t)) : !1, D = f ? _ ? "selected" : x ? "available" : "unavailable" : "outside", U = N ? Je(N, r) : !1, E = (() => {
|
|
1165
1165
|
try {
|
|
1166
1166
|
return new Intl.DateTimeFormat(i, {
|
|
1167
1167
|
dateStyle: "full"
|
|
1168
1168
|
}).format(r);
|
|
1169
1169
|
} catch {
|
|
1170
|
-
return
|
|
1170
|
+
return we(r, "PPP");
|
|
1171
1171
|
}
|
|
1172
1172
|
})();
|
|
1173
1173
|
return /* @__PURE__ */ s(
|
|
@@ -1176,29 +1176,29 @@ function Ea({
|
|
|
1176
1176
|
type: "button",
|
|
1177
1177
|
role: "gridcell",
|
|
1178
1178
|
"aria-label": E,
|
|
1179
|
-
"aria-selected":
|
|
1180
|
-
"aria-disabled": !
|
|
1181
|
-
tabIndex:
|
|
1182
|
-
disabled: !
|
|
1179
|
+
"aria-selected": _ || void 0,
|
|
1180
|
+
"aria-disabled": !x || void 0,
|
|
1181
|
+
tabIndex: U ? 0 : -1,
|
|
1182
|
+
disabled: !x,
|
|
1183
1183
|
onClick: () => {
|
|
1184
|
-
|
|
1184
|
+
x && a(te(r));
|
|
1185
1185
|
},
|
|
1186
|
-
onKeyDown: (
|
|
1187
|
-
className:
|
|
1186
|
+
onKeyDown: (R) => I(R, r),
|
|
1187
|
+
className: Ra({ state: D }),
|
|
1188
1188
|
children: /* @__PURE__ */ s("span", { "aria-hidden": "true", children: r.getDate() })
|
|
1189
1189
|
},
|
|
1190
|
-
`mg-cell-${
|
|
1190
|
+
`mg-cell-${A}`
|
|
1191
1191
|
);
|
|
1192
1192
|
})
|
|
1193
1193
|
},
|
|
1194
|
-
`mg-row-${
|
|
1194
|
+
`mg-row-${v}`
|
|
1195
1195
|
))
|
|
1196
1196
|
]
|
|
1197
1197
|
}
|
|
1198
1198
|
)
|
|
1199
1199
|
] });
|
|
1200
1200
|
}
|
|
1201
|
-
const
|
|
1201
|
+
const La = Me(
|
|
1202
1202
|
[
|
|
1203
1203
|
"ds:relative ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-md)]",
|
|
1204
1204
|
"ds:min-h-[var(--min-target-size)]",
|
|
@@ -1224,57 +1224,57 @@ const Ra = we(
|
|
|
1224
1224
|
defaultVariants: { state: "idle" }
|
|
1225
1225
|
}
|
|
1226
1226
|
);
|
|
1227
|
-
function
|
|
1227
|
+
function Fa({
|
|
1228
1228
|
services: e,
|
|
1229
1229
|
selectedServiceId: t,
|
|
1230
1230
|
onSelect: a
|
|
1231
1231
|
}) {
|
|
1232
|
-
const { t: i } =
|
|
1232
|
+
const { t: i } = B(), n = et(), [o, u] = j(() => {
|
|
1233
1233
|
if (t) {
|
|
1234
|
-
const
|
|
1235
|
-
if (
|
|
1234
|
+
const d = e.findIndex((m) => m.id === t);
|
|
1235
|
+
if (d >= 0) return d;
|
|
1236
1236
|
}
|
|
1237
1237
|
return 0;
|
|
1238
|
-
}),
|
|
1239
|
-
var
|
|
1240
|
-
(
|
|
1241
|
-
}, []),
|
|
1242
|
-
(
|
|
1243
|
-
const
|
|
1244
|
-
if (
|
|
1245
|
-
switch (
|
|
1238
|
+
}), p = ae(/* @__PURE__ */ new Map()), c = q((d) => {
|
|
1239
|
+
var m;
|
|
1240
|
+
(m = p.current.get(d)) == null || m.focus();
|
|
1241
|
+
}, []), l = q(
|
|
1242
|
+
(d, m, y) => {
|
|
1243
|
+
const S = e.length;
|
|
1244
|
+
if (S !== 0)
|
|
1245
|
+
switch (d.key) {
|
|
1246
1246
|
case "ArrowDown":
|
|
1247
1247
|
case "ArrowRight": {
|
|
1248
|
-
|
|
1249
|
-
const h = (
|
|
1250
|
-
|
|
1248
|
+
d.preventDefault();
|
|
1249
|
+
const h = (m + 1) % S;
|
|
1250
|
+
u(h), c(h);
|
|
1251
1251
|
break;
|
|
1252
1252
|
}
|
|
1253
1253
|
case "ArrowUp":
|
|
1254
1254
|
case "ArrowLeft": {
|
|
1255
|
-
|
|
1256
|
-
const h = (
|
|
1257
|
-
|
|
1255
|
+
d.preventDefault();
|
|
1256
|
+
const h = (m - 1 + S) % S;
|
|
1257
|
+
u(h), c(h);
|
|
1258
1258
|
break;
|
|
1259
1259
|
}
|
|
1260
1260
|
case "Home": {
|
|
1261
|
-
|
|
1261
|
+
d.preventDefault(), u(0), c(0);
|
|
1262
1262
|
break;
|
|
1263
1263
|
}
|
|
1264
1264
|
case "End": {
|
|
1265
|
-
|
|
1266
|
-
const h =
|
|
1267
|
-
|
|
1265
|
+
d.preventDefault();
|
|
1266
|
+
const h = S - 1;
|
|
1267
|
+
u(h), c(h);
|
|
1268
1268
|
break;
|
|
1269
1269
|
}
|
|
1270
1270
|
case "Enter":
|
|
1271
1271
|
case " ": {
|
|
1272
|
-
|
|
1272
|
+
d.preventDefault(), a(y);
|
|
1273
1273
|
break;
|
|
1274
1274
|
}
|
|
1275
1275
|
}
|
|
1276
1276
|
},
|
|
1277
|
-
[e.length,
|
|
1277
|
+
[e.length, c, a]
|
|
1278
1278
|
);
|
|
1279
1279
|
return e.length === 0 ? null : /* @__PURE__ */ s(
|
|
1280
1280
|
"div",
|
|
@@ -1283,27 +1283,27 @@ function Va({
|
|
|
1283
1283
|
"aria-label": i("booking.serviceListLabel"),
|
|
1284
1284
|
id: n,
|
|
1285
1285
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
1286
|
-
children: e.map((
|
|
1287
|
-
const
|
|
1288
|
-
label:
|
|
1289
|
-
duration:
|
|
1290
|
-
}),
|
|
1291
|
-
return /* @__PURE__ */
|
|
1286
|
+
children: e.map((d, m) => {
|
|
1287
|
+
const y = t === d.id, S = o === m, h = i("booking.serviceCardLabel", {
|
|
1288
|
+
label: d.label,
|
|
1289
|
+
duration: d.durationMin
|
|
1290
|
+
}), w = Pa(d);
|
|
1291
|
+
return /* @__PURE__ */ b(
|
|
1292
1292
|
"button",
|
|
1293
1293
|
{
|
|
1294
|
-
ref: (
|
|
1295
|
-
|
|
1294
|
+
ref: (N) => {
|
|
1295
|
+
N ? p.current.set(m, N) : p.current.delete(m);
|
|
1296
1296
|
},
|
|
1297
1297
|
type: "button",
|
|
1298
1298
|
role: "radio",
|
|
1299
|
-
"aria-checked":
|
|
1299
|
+
"aria-checked": y,
|
|
1300
1300
|
"aria-label": h,
|
|
1301
|
-
tabIndex:
|
|
1302
|
-
onClick: () => a(
|
|
1303
|
-
onFocus: () =>
|
|
1304
|
-
onKeyDown: (
|
|
1305
|
-
className:
|
|
1306
|
-
state:
|
|
1301
|
+
tabIndex: S ? 0 : -1,
|
|
1302
|
+
onClick: () => a(d.id),
|
|
1303
|
+
onFocus: () => u(m),
|
|
1304
|
+
onKeyDown: (N) => l(N, m, d.id),
|
|
1305
|
+
className: La({
|
|
1306
|
+
state: y ? "selected" : "idle"
|
|
1307
1307
|
}),
|
|
1308
1308
|
children: [
|
|
1309
1309
|
/* @__PURE__ */ s(
|
|
@@ -1311,22 +1311,22 @@ function Va({
|
|
|
1311
1311
|
{
|
|
1312
1312
|
"aria-hidden": "true",
|
|
1313
1313
|
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)]",
|
|
1314
|
-
children:
|
|
1314
|
+
children: w
|
|
1315
1315
|
}
|
|
1316
1316
|
),
|
|
1317
|
-
/* @__PURE__ */
|
|
1318
|
-
/* @__PURE__ */ s("span", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]", children:
|
|
1319
|
-
/* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: i("booking.serviceSummary", { minutes:
|
|
1317
|
+
/* @__PURE__ */ b("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
1318
|
+
/* @__PURE__ */ s("span", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]", children: d.label }),
|
|
1319
|
+
/* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: i("booking.serviceSummary", { minutes: d.durationMin }) })
|
|
1320
1320
|
] })
|
|
1321
1321
|
]
|
|
1322
1322
|
},
|
|
1323
|
-
|
|
1323
|
+
d.id
|
|
1324
1324
|
);
|
|
1325
1325
|
})
|
|
1326
1326
|
}
|
|
1327
1327
|
);
|
|
1328
1328
|
}
|
|
1329
|
-
const
|
|
1329
|
+
const $a = Me(
|
|
1330
1330
|
[
|
|
1331
1331
|
"ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-2xs)]",
|
|
1332
1332
|
"ds:min-h-[var(--min-target-size)]",
|
|
@@ -1352,16 +1352,16 @@ const La = we(
|
|
|
1352
1352
|
defaultVariants: { state: "idle" }
|
|
1353
1353
|
}
|
|
1354
1354
|
);
|
|
1355
|
-
function
|
|
1355
|
+
function za(e) {
|
|
1356
1356
|
const [t] = e.split(":").map((i) => parseInt(i, 10)), a = Number.isFinite(t) ? t : 0;
|
|
1357
1357
|
return a < 12 ? "morning" : a < 17 ? "afternoon" : "evening";
|
|
1358
1358
|
}
|
|
1359
|
-
const
|
|
1360
|
-
morning:
|
|
1361
|
-
afternoon:
|
|
1362
|
-
evening:
|
|
1359
|
+
const Ka = {
|
|
1360
|
+
morning: Ft,
|
|
1361
|
+
afternoon: fa,
|
|
1362
|
+
evening: Lt
|
|
1363
1363
|
};
|
|
1364
|
-
function
|
|
1364
|
+
function ja({
|
|
1365
1365
|
date: e,
|
|
1366
1366
|
slots: t,
|
|
1367
1367
|
selectedSlotKey: a,
|
|
@@ -1369,83 +1369,83 @@ function za({
|
|
|
1369
1369
|
loading: n,
|
|
1370
1370
|
locale: o
|
|
1371
1371
|
}) {
|
|
1372
|
-
const { t:
|
|
1372
|
+
const { t: u } = B(), p = C(() => {
|
|
1373
1373
|
try {
|
|
1374
1374
|
return new Intl.DateTimeFormat(o, {
|
|
1375
1375
|
weekday: "long",
|
|
1376
1376
|
day: "numeric",
|
|
1377
1377
|
month: "long"
|
|
1378
|
-
}).format(
|
|
1378
|
+
}).format($(e));
|
|
1379
1379
|
} catch {
|
|
1380
1380
|
return e;
|
|
1381
1381
|
}
|
|
1382
|
-
}, [e, o]),
|
|
1383
|
-
const
|
|
1382
|
+
}, [e, o]), c = C(() => {
|
|
1383
|
+
const m = {
|
|
1384
1384
|
morning: [],
|
|
1385
1385
|
afternoon: [],
|
|
1386
1386
|
evening: []
|
|
1387
1387
|
};
|
|
1388
|
-
for (const
|
|
1389
|
-
|
|
1390
|
-
return
|
|
1391
|
-
}, [t]),
|
|
1392
|
-
return n ? /* @__PURE__ */
|
|
1393
|
-
/* @__PURE__ */ s(
|
|
1394
|
-
[0, 1].map((
|
|
1388
|
+
for (const y of t)
|
|
1389
|
+
m[za(y.time)].push(y);
|
|
1390
|
+
return m;
|
|
1391
|
+
}, [t]), l = t.filter((m) => m.available).length, d = ["morning", "afternoon", "evening"];
|
|
1392
|
+
return n ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1393
|
+
/* @__PURE__ */ s(Ce, { variant: "text", width: "60%" }),
|
|
1394
|
+
[0, 1].map((m) => /* @__PURE__ */ s(
|
|
1395
1395
|
"div",
|
|
1396
1396
|
{
|
|
1397
1397
|
className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)]",
|
|
1398
|
-
children: [0, 1, 2].map((
|
|
1398
|
+
children: [0, 1, 2].map((y) => /* @__PURE__ */ s(Ce, { variant: "rounded", height: "44px" }, y))
|
|
1399
1399
|
},
|
|
1400
|
-
|
|
1400
|
+
m
|
|
1401
1401
|
))
|
|
1402
|
-
] }) :
|
|
1403
|
-
/* @__PURE__ */
|
|
1404
|
-
/* @__PURE__ */
|
|
1402
|
+
] }) : l === 0 ? /* @__PURE__ */ s(tt, { variant: "no-results", title: u("booking.noSlotsForDate") }) : /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1403
|
+
/* @__PURE__ */ b("div", { className: "ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
1404
|
+
/* @__PURE__ */ b("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
1405
1405
|
/* @__PURE__ */ s(
|
|
1406
|
-
|
|
1406
|
+
Qt,
|
|
1407
1407
|
{
|
|
1408
1408
|
"aria-hidden": "true",
|
|
1409
1409
|
className: "ds:size-4 ds:text-[color:var(--accent)]"
|
|
1410
1410
|
}
|
|
1411
1411
|
),
|
|
1412
|
-
/* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children:
|
|
1412
|
+
/* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: p })
|
|
1413
1413
|
] }),
|
|
1414
|
-
/* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children:
|
|
1414
|
+
/* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: u("booking.slotsAvailable", { count: l }) })
|
|
1415
1415
|
] }),
|
|
1416
|
-
|
|
1417
|
-
const
|
|
1418
|
-
if (
|
|
1419
|
-
const
|
|
1420
|
-
return /* @__PURE__ */
|
|
1416
|
+
d.map((m) => {
|
|
1417
|
+
const y = c[m];
|
|
1418
|
+
if (y.length === 0) return null;
|
|
1419
|
+
const S = Ka[m];
|
|
1420
|
+
return /* @__PURE__ */ b(
|
|
1421
1421
|
"div",
|
|
1422
1422
|
{
|
|
1423
1423
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
1424
1424
|
children: [
|
|
1425
|
-
/* @__PURE__ */
|
|
1426
|
-
/* @__PURE__ */ s(
|
|
1427
|
-
/* @__PURE__ */ s("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children:
|
|
1425
|
+
/* @__PURE__ */ b("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
|
|
1426
|
+
/* @__PURE__ */ s(S, { "aria-hidden": "true", className: "ds:size-3.5" }),
|
|
1427
|
+
/* @__PURE__ */ s("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children: u(`booking.timeOfDay.${m}`) })
|
|
1428
1428
|
] }),
|
|
1429
1429
|
/* @__PURE__ */ s(
|
|
1430
1430
|
"div",
|
|
1431
1431
|
{
|
|
1432
1432
|
role: "group",
|
|
1433
|
-
"aria-label":
|
|
1433
|
+
"aria-label": u(`booking.timeOfDay.${m}`),
|
|
1434
1434
|
className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)] ds:sm:grid-cols-4",
|
|
1435
|
-
children:
|
|
1436
|
-
const
|
|
1435
|
+
children: y.map((h) => {
|
|
1436
|
+
const w = h.key === a, N = h.available ? w ? "selected" : "idle" : "unavailable";
|
|
1437
1437
|
return /* @__PURE__ */ s(
|
|
1438
1438
|
"button",
|
|
1439
1439
|
{
|
|
1440
1440
|
type: "button",
|
|
1441
1441
|
"data-slot-id": h.key,
|
|
1442
1442
|
disabled: !h.available,
|
|
1443
|
-
"aria-pressed":
|
|
1444
|
-
"aria-label":
|
|
1443
|
+
"aria-pressed": w,
|
|
1444
|
+
"aria-label": u("booking.slotAvailableLabel", {
|
|
1445
1445
|
time: h.time
|
|
1446
1446
|
}),
|
|
1447
1447
|
onClick: () => h.available && i(h),
|
|
1448
|
-
className:
|
|
1448
|
+
className: $a({ state: N }),
|
|
1449
1449
|
children: h.time
|
|
1450
1450
|
},
|
|
1451
1451
|
h.key
|
|
@@ -1455,139 +1455,160 @@ function za({
|
|
|
1455
1455
|
)
|
|
1456
1456
|
]
|
|
1457
1457
|
},
|
|
1458
|
-
|
|
1458
|
+
m
|
|
1459
1459
|
);
|
|
1460
1460
|
})
|
|
1461
1461
|
] });
|
|
1462
1462
|
}
|
|
1463
|
-
const
|
|
1464
|
-
function
|
|
1463
|
+
const Ie = 4;
|
|
1464
|
+
function qa({
|
|
1465
1465
|
availableDates: e,
|
|
1466
1466
|
availableSlots: t,
|
|
1467
1467
|
value: a,
|
|
1468
1468
|
onChange: i,
|
|
1469
1469
|
onDateSelect: n,
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1470
|
+
onWindowChange: o,
|
|
1471
|
+
loadingDates: u,
|
|
1472
|
+
loadingSlots: p,
|
|
1473
|
+
locale: c
|
|
1473
1474
|
}) {
|
|
1474
|
-
const
|
|
1475
|
+
const l = C(() => ne(/* @__PURE__ */ new Date()), []), [d, m] = j(() => {
|
|
1475
1476
|
if (a.date) {
|
|
1476
|
-
const f =
|
|
1477
|
-
if (!
|
|
1477
|
+
const f = ne($(a.date));
|
|
1478
|
+
if (!oe(l, f)) return f;
|
|
1478
1479
|
}
|
|
1479
1480
|
if (e.length > 0) {
|
|
1480
|
-
const f =
|
|
1481
|
-
if (
|
|
1481
|
+
const f = ne($(e[0]));
|
|
1482
|
+
if (oe(f, l)) return f;
|
|
1482
1483
|
}
|
|
1483
|
-
return
|
|
1484
|
-
}),
|
|
1485
|
-
() => Le(
|
|
1486
|
-
[
|
|
1487
|
-
), S =
|
|
1488
|
-
const _ = Le(
|
|
1489
|
-
id:
|
|
1484
|
+
return l;
|
|
1485
|
+
}), y = C(
|
|
1486
|
+
() => Le(d, Ie - 1),
|
|
1487
|
+
[d]
|
|
1488
|
+
), S = C(() => Array.from({ length: Ie }, (f, x) => {
|
|
1489
|
+
const _ = Le(d, x), D = te(_), E = (t[D] ?? []).map((R) => ({
|
|
1490
|
+
id: R.key,
|
|
1490
1491
|
// SlotGrid formats `start` as a time via Intl.DateTimeFormat —
|
|
1491
1492
|
// compose a full ISO from the column's date + the slot's HH:mm
|
|
1492
1493
|
// so the locale-formatter has a real timestamp to work with.
|
|
1493
|
-
start: `${
|
|
1494
|
-
available:
|
|
1494
|
+
start: `${D}T${R.time}:00`,
|
|
1495
|
+
available: R.available
|
|
1495
1496
|
}));
|
|
1496
|
-
return { date:
|
|
1497
|
-
}), [
|
|
1498
|
-
(
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
p((f) => {
|
|
1502
|
-
const r = Ot(f, Se);
|
|
1503
|
-
return pe(d, r) ? d : r;
|
|
1497
|
+
return { date: D, slots: E };
|
|
1498
|
+
}), [d, t]), h = oe(d, l), w = !0, N = q(() => {
|
|
1499
|
+
m((f) => {
|
|
1500
|
+
const x = Et(f, Ie);
|
|
1501
|
+
return oe(l, x) ? l : x;
|
|
1504
1502
|
});
|
|
1505
|
-
}, [
|
|
1506
|
-
|
|
1507
|
-
}, [])
|
|
1508
|
-
|
|
1509
|
-
|
|
1503
|
+
}, [l]), I = q(() => {
|
|
1504
|
+
m((f) => Le(f, Ie));
|
|
1505
|
+
}, []);
|
|
1506
|
+
G(() => {
|
|
1507
|
+
if (e.length === 0) return;
|
|
1508
|
+
const f = ne($(e[0]));
|
|
1509
|
+
!oe(f, l) || e.some((_) => {
|
|
1510
|
+
const D = ne($(_));
|
|
1511
|
+
return !oe(D, y) && !Ot(D, d);
|
|
1512
|
+
}) || m(f);
|
|
1513
|
+
}, [e]), G(() => {
|
|
1514
|
+
o == null || o(te(d), te(y));
|
|
1515
|
+
}, [d, y, o]);
|
|
1516
|
+
const k = q(
|
|
1517
|
+
(f, x) => {
|
|
1518
|
+
const _ = typeof x.date == "string" ? x.date : te(x.date);
|
|
1510
1519
|
i({
|
|
1511
|
-
...
|
|
1520
|
+
...rt(Ae(a, _), f.id)
|
|
1512
1521
|
}), n == null || n(_);
|
|
1513
1522
|
},
|
|
1514
1523
|
[i, n, a]
|
|
1515
|
-
);
|
|
1516
|
-
return /* @__PURE__ */
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1524
|
+
), v = u || p ? "loading" : "default", r = S.some((f) => f.slots.length > 0), O = e[0];
|
|
1525
|
+
return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1526
|
+
!r && !!O ? /* @__PURE__ */ s(
|
|
1527
|
+
Ke,
|
|
1528
|
+
{
|
|
1529
|
+
nextAvailableDate: O,
|
|
1530
|
+
onJump: () => m(ne($(O))),
|
|
1531
|
+
locale: c
|
|
1532
|
+
}
|
|
1533
|
+
) : null,
|
|
1534
|
+
/* @__PURE__ */ s(
|
|
1535
|
+
Bt,
|
|
1536
|
+
{
|
|
1537
|
+
days: S,
|
|
1538
|
+
state: v,
|
|
1539
|
+
selectedSlotId: a.slotKey,
|
|
1540
|
+
maxInitialSlotsPerDay: 6,
|
|
1541
|
+
locale: c,
|
|
1542
|
+
hasPrevious: h,
|
|
1543
|
+
hasNext: w,
|
|
1544
|
+
onSlotSelect: k,
|
|
1545
|
+
onPreviousDays: N,
|
|
1546
|
+
onNextDays: I
|
|
1547
|
+
}
|
|
1548
|
+
)
|
|
1549
|
+
] });
|
|
1531
1550
|
}
|
|
1532
|
-
function
|
|
1551
|
+
function lt(e) {
|
|
1533
1552
|
const {
|
|
1534
1553
|
inputs: t,
|
|
1535
1554
|
value: a,
|
|
1536
1555
|
onChange: i,
|
|
1537
1556
|
onDateSelect: n,
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1557
|
+
onWindowChange: o,
|
|
1558
|
+
loadingDates: u,
|
|
1559
|
+
loadingSlots: p,
|
|
1560
|
+
locale: c,
|
|
1561
|
+
datePickerStyle: l
|
|
1542
1562
|
} = e;
|
|
1543
|
-
return
|
|
1544
|
-
|
|
1563
|
+
return l === "four-day-grid" ? /* @__PURE__ */ s(
|
|
1564
|
+
qa,
|
|
1545
1565
|
{
|
|
1546
1566
|
availableDates: t.availableDates,
|
|
1547
1567
|
availableSlots: t.availableSlots,
|
|
1548
1568
|
value: a,
|
|
1549
1569
|
onChange: i,
|
|
1550
1570
|
onDateSelect: n,
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1571
|
+
onWindowChange: o,
|
|
1572
|
+
loadingDates: u,
|
|
1573
|
+
loadingSlots: p,
|
|
1574
|
+
locale: c
|
|
1554
1575
|
}
|
|
1555
1576
|
) : /* @__PURE__ */ s(
|
|
1556
|
-
|
|
1577
|
+
Va,
|
|
1557
1578
|
{
|
|
1558
1579
|
availableDates: t.availableDates,
|
|
1559
1580
|
selectedDate: a.date,
|
|
1560
|
-
onSelectDate: (
|
|
1561
|
-
i(
|
|
1581
|
+
onSelectDate: (d) => {
|
|
1582
|
+
i(Ae(a, d)), n == null || n(d);
|
|
1562
1583
|
},
|
|
1563
|
-
locale:
|
|
1564
|
-
loading:
|
|
1584
|
+
locale: c,
|
|
1585
|
+
loading: u ?? p
|
|
1565
1586
|
}
|
|
1566
1587
|
);
|
|
1567
1588
|
}
|
|
1568
|
-
function
|
|
1569
|
-
const { inputs: t, value: a, onChange: i, loadingSlots: n, locale: o, datePickerStyle:
|
|
1570
|
-
return
|
|
1571
|
-
|
|
1589
|
+
function ct(e) {
|
|
1590
|
+
const { inputs: t, value: a, onChange: i, loadingSlots: n, locale: o, datePickerStyle: u } = e;
|
|
1591
|
+
return u === "four-day-grid" || !a.date ? null : /* @__PURE__ */ s(
|
|
1592
|
+
ja,
|
|
1572
1593
|
{
|
|
1573
1594
|
date: a.date,
|
|
1574
1595
|
slots: t.availableSlots[a.date] ?? [],
|
|
1575
1596
|
selectedSlotKey: a.slotKey,
|
|
1576
|
-
onSelect: (
|
|
1597
|
+
onSelect: (p) => i(rt(a, p.key)),
|
|
1577
1598
|
loading: n,
|
|
1578
1599
|
locale: o
|
|
1579
1600
|
}
|
|
1580
1601
|
);
|
|
1581
1602
|
}
|
|
1582
|
-
function
|
|
1583
|
-
const { t: a } =
|
|
1603
|
+
function ut({ value: e, onChange: t }) {
|
|
1604
|
+
const { t: a } = B(), i = [
|
|
1584
1605
|
{ value: "private", label: a("booking.insurance.private") },
|
|
1585
1606
|
{ value: "public", label: a("booking.insurance.public") }
|
|
1586
1607
|
];
|
|
1587
|
-
return /* @__PURE__ */
|
|
1608
|
+
return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1588
1609
|
/* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: a("booking.insurance.heading") }),
|
|
1589
1610
|
/* @__PURE__ */ s(
|
|
1590
|
-
|
|
1611
|
+
De,
|
|
1591
1612
|
{
|
|
1592
1613
|
options: i,
|
|
1593
1614
|
value: e ?? "",
|
|
@@ -1600,15 +1621,15 @@ function lt({ value: e, onChange: t }) {
|
|
|
1600
1621
|
)
|
|
1601
1622
|
] });
|
|
1602
1623
|
}
|
|
1603
|
-
function
|
|
1604
|
-
const { t: i } =
|
|
1624
|
+
function mt({ specialties: e, value: t, onChange: a }) {
|
|
1625
|
+
const { t: i } = B(), n = e.map((o) => ({
|
|
1605
1626
|
value: o.id,
|
|
1606
1627
|
label: o.label
|
|
1607
1628
|
}));
|
|
1608
|
-
return /* @__PURE__ */
|
|
1629
|
+
return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1609
1630
|
/* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: i("booking.specialty.heading") }),
|
|
1610
1631
|
/* @__PURE__ */ s(
|
|
1611
|
-
|
|
1632
|
+
De,
|
|
1612
1633
|
{
|
|
1613
1634
|
options: n,
|
|
1614
1635
|
value: t ?? "",
|
|
@@ -1619,33 +1640,33 @@ function ct({ specialties: e, value: t, onChange: a }) {
|
|
|
1619
1640
|
)
|
|
1620
1641
|
] });
|
|
1621
1642
|
}
|
|
1622
|
-
function
|
|
1623
|
-
const { t: n } =
|
|
1643
|
+
function pt({ services: e, value: t, onChange: a, compact: i }) {
|
|
1644
|
+
const { t: n } = B();
|
|
1624
1645
|
if (i) {
|
|
1625
|
-
const o = e.map((
|
|
1626
|
-
value:
|
|
1627
|
-
label: `${
|
|
1628
|
-
minutes:
|
|
1646
|
+
const o = e.map((u) => ({
|
|
1647
|
+
value: u.id,
|
|
1648
|
+
label: `${u.label} · ${n("booking.serviceSummary", {
|
|
1649
|
+
minutes: u.durationMin
|
|
1629
1650
|
})}`
|
|
1630
1651
|
}));
|
|
1631
|
-
return /* @__PURE__ */
|
|
1652
|
+
return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1632
1653
|
/* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: n("booking.service.heading") }),
|
|
1633
1654
|
/* @__PURE__ */ s(
|
|
1634
|
-
|
|
1655
|
+
De,
|
|
1635
1656
|
{
|
|
1636
1657
|
options: o,
|
|
1637
1658
|
value: t ?? "",
|
|
1638
|
-
onValueChange: (
|
|
1659
|
+
onValueChange: (u) => a(u),
|
|
1639
1660
|
placeholder: n("booking.service.placeholder"),
|
|
1640
1661
|
"aria-label": n("booking.service.heading")
|
|
1641
1662
|
}
|
|
1642
1663
|
)
|
|
1643
1664
|
] });
|
|
1644
1665
|
}
|
|
1645
|
-
return /* @__PURE__ */
|
|
1666
|
+
return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1646
1667
|
/* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: n("booking.service.heading") }),
|
|
1647
1668
|
/* @__PURE__ */ s(
|
|
1648
|
-
|
|
1669
|
+
Fa,
|
|
1649
1670
|
{
|
|
1650
1671
|
services: e,
|
|
1651
1672
|
selectedServiceId: t,
|
|
@@ -1654,18 +1675,18 @@ function ut({ services: e, value: t, onChange: a, compact: i }) {
|
|
|
1654
1675
|
)
|
|
1655
1676
|
] });
|
|
1656
1677
|
}
|
|
1657
|
-
function
|
|
1658
|
-
const { t: i } =
|
|
1659
|
-
{ value:
|
|
1678
|
+
function gt({ operators: e, value: t, onChange: a }) {
|
|
1679
|
+
const { t: i } = B(), n = [
|
|
1680
|
+
{ value: ve, label: i("booking.operator.all") },
|
|
1660
1681
|
...e.map((o) => ({ value: o.id, label: o.name }))
|
|
1661
1682
|
];
|
|
1662
|
-
return /* @__PURE__ */
|
|
1683
|
+
return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1663
1684
|
/* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: i("booking.operator.heading") }),
|
|
1664
1685
|
/* @__PURE__ */ s(
|
|
1665
|
-
|
|
1686
|
+
De,
|
|
1666
1687
|
{
|
|
1667
1688
|
options: n,
|
|
1668
|
-
value: t ??
|
|
1689
|
+
value: t ?? ve,
|
|
1669
1690
|
onValueChange: (o) => a(o),
|
|
1670
1691
|
placeholder: i("booking.operator.placeholder"),
|
|
1671
1692
|
"aria-label": i("booking.operator.heading")
|
|
@@ -1673,103 +1694,103 @@ function mt({ operators: e, value: t, onChange: a }) {
|
|
|
1673
1694
|
)
|
|
1674
1695
|
] });
|
|
1675
1696
|
}
|
|
1676
|
-
function
|
|
1697
|
+
function ft({
|
|
1677
1698
|
customSlot: e
|
|
1678
1699
|
}) {
|
|
1679
|
-
const { t } =
|
|
1680
|
-
return e ? /* @__PURE__ */ s(W, { children: e }) : /* @__PURE__ */
|
|
1681
|
-
/* @__PURE__ */ s(
|
|
1682
|
-
/* @__PURE__ */ s(
|
|
1700
|
+
const { t } = B();
|
|
1701
|
+
return e ? /* @__PURE__ */ s(W, { children: e }) : /* @__PURE__ */ b(K, { variant: "warning", children: [
|
|
1702
|
+
/* @__PURE__ */ s(K.Title, { as: "h4", children: t("booking.onboardingIncomplete.title") }),
|
|
1703
|
+
/* @__PURE__ */ s(K.Description, { children: t("booking.onboardingIncomplete.description") })
|
|
1683
1704
|
] });
|
|
1684
1705
|
}
|
|
1685
|
-
function
|
|
1706
|
+
function Ke({
|
|
1686
1707
|
nextAvailableDate: e,
|
|
1687
1708
|
onJump: t,
|
|
1688
1709
|
locale: a
|
|
1689
1710
|
}) {
|
|
1690
|
-
const { t: i } =
|
|
1711
|
+
const { t: i } = B(), n = C(() => {
|
|
1691
1712
|
try {
|
|
1692
1713
|
return new Intl.DateTimeFormat(a, { dateStyle: "long" }).format(
|
|
1693
|
-
|
|
1714
|
+
$(e)
|
|
1694
1715
|
);
|
|
1695
1716
|
} catch {
|
|
1696
1717
|
return e;
|
|
1697
1718
|
}
|
|
1698
1719
|
}, [e, a]);
|
|
1699
|
-
return /* @__PURE__ */
|
|
1700
|
-
/* @__PURE__ */ s(
|
|
1701
|
-
/* @__PURE__ */ s(
|
|
1720
|
+
return /* @__PURE__ */ b(K, { variant: "info", children: [
|
|
1721
|
+
/* @__PURE__ */ s(K.Description, { children: i("booking.nextAvailable.description", { date: n }) }),
|
|
1722
|
+
/* @__PURE__ */ s(K.Action, { children: /* @__PURE__ */ s(se, { intent: "secondary", size: "sm", onClick: t, children: i("booking.nextAvailable.cta") }) })
|
|
1702
1723
|
] });
|
|
1703
1724
|
}
|
|
1704
|
-
function
|
|
1725
|
+
function Ha({
|
|
1705
1726
|
snapshot: e,
|
|
1706
1727
|
operators: t,
|
|
1707
1728
|
specialties: a,
|
|
1708
1729
|
services: i,
|
|
1709
1730
|
locale: n,
|
|
1710
1731
|
mode: o,
|
|
1711
|
-
showModify:
|
|
1712
|
-
onReset:
|
|
1713
|
-
onModify:
|
|
1732
|
+
showModify: u,
|
|
1733
|
+
onReset: p,
|
|
1734
|
+
onModify: c
|
|
1714
1735
|
}) {
|
|
1715
|
-
const { t:
|
|
1716
|
-
(
|
|
1717
|
-
),
|
|
1718
|
-
channels:
|
|
1719
|
-
}) :
|
|
1736
|
+
const { t: l } = B(), m = (e.details.confirmationChannels ?? ["email"]).map(
|
|
1737
|
+
(I) => l(`booking.confirmation.channel.${I}`)
|
|
1738
|
+
), y = o === "demo" ? l("booking.success.descriptionDemo") : m.length > 1 ? l("booking.success.descriptionMultiple", {
|
|
1739
|
+
channels: m.join(" · ")
|
|
1740
|
+
}) : l("booking.success.descriptionSingle", { channel: m[0] }), S = C(() => {
|
|
1720
1741
|
if (e.date)
|
|
1721
1742
|
try {
|
|
1722
1743
|
return new Intl.DateTimeFormat(n, {
|
|
1723
1744
|
weekday: "long",
|
|
1724
1745
|
day: "numeric",
|
|
1725
1746
|
month: "long"
|
|
1726
|
-
}).format(
|
|
1747
|
+
}).format($(e.date));
|
|
1727
1748
|
} catch {
|
|
1728
1749
|
return e.date;
|
|
1729
1750
|
}
|
|
1730
|
-
}, [e.date, n]), h = e.operatorId ? t.find((
|
|
1731
|
-
return /* @__PURE__ */
|
|
1751
|
+
}, [e.date, n]), h = e.operatorId ? t.find((I) => I.id === e.operatorId) : void 0, w = e.specialtyId ? a.find((I) => I.id === e.specialtyId) : void 0, N = e.serviceId ? i.find((I) => I.id === e.serviceId) : void 0;
|
|
1752
|
+
return /* @__PURE__ */ b(
|
|
1732
1753
|
"div",
|
|
1733
1754
|
{
|
|
1734
1755
|
"data-component": "booking-success",
|
|
1735
1756
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
1736
1757
|
children: [
|
|
1737
|
-
/* @__PURE__ */
|
|
1738
|
-
/* @__PURE__ */ s(
|
|
1739
|
-
/* @__PURE__ */ s(
|
|
1758
|
+
/* @__PURE__ */ b(K, { variant: "success", children: [
|
|
1759
|
+
/* @__PURE__ */ s(K.Title, { as: "h3", children: l("booking.success.heading") }),
|
|
1760
|
+
/* @__PURE__ */ s(K.Description, { children: y })
|
|
1740
1761
|
] }),
|
|
1741
|
-
/* @__PURE__ */ s("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[var(--secondary)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */
|
|
1742
|
-
|
|
1743
|
-
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children:
|
|
1744
|
-
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children:
|
|
1762
|
+
/* @__PURE__ */ s("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[var(--secondary)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ b("dl", { className: "ds:grid ds:grid-cols-[auto_minmax(0,1fr)] ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)] ds:m-0", children: [
|
|
1763
|
+
w ? /* @__PURE__ */ b(W, { children: [
|
|
1764
|
+
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summarySpecialty") }),
|
|
1765
|
+
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: w.label })
|
|
1745
1766
|
] }) : null,
|
|
1746
|
-
|
|
1747
|
-
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children:
|
|
1748
|
-
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children:
|
|
1767
|
+
N ? /* @__PURE__ */ b(W, { children: [
|
|
1768
|
+
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summaryService") }),
|
|
1769
|
+
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: N.label })
|
|
1749
1770
|
] }) : null,
|
|
1750
|
-
|
|
1751
|
-
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children:
|
|
1752
|
-
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children:
|
|
1771
|
+
S ? /* @__PURE__ */ b(W, { children: [
|
|
1772
|
+
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summaryDate") }),
|
|
1773
|
+
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: S })
|
|
1753
1774
|
] }) : null,
|
|
1754
|
-
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children:
|
|
1775
|
+
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summaryTime") }),
|
|
1755
1776
|
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: e.slot.time }),
|
|
1756
|
-
h ? /* @__PURE__ */
|
|
1757
|
-
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children:
|
|
1777
|
+
h ? /* @__PURE__ */ b(W, { children: [
|
|
1778
|
+
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summaryProvider") }),
|
|
1758
1779
|
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: h.name })
|
|
1759
1780
|
] }) : null
|
|
1760
1781
|
] }) }),
|
|
1761
|
-
/* @__PURE__ */
|
|
1762
|
-
/* @__PURE__ */ s(
|
|
1763
|
-
|
|
1782
|
+
/* @__PURE__ */ b("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
1783
|
+
/* @__PURE__ */ s(se, { intent: "secondary", size: "md", onClick: p, children: l("booking.success.bookAnother") }),
|
|
1784
|
+
u ? /* @__PURE__ */ s(se, { intent: "ghost", size: "md", onClick: c, children: l("booking.success.modifyBooking") }) : null
|
|
1764
1785
|
] })
|
|
1765
1786
|
]
|
|
1766
1787
|
}
|
|
1767
1788
|
);
|
|
1768
1789
|
}
|
|
1769
|
-
function
|
|
1770
|
-
const { t } =
|
|
1790
|
+
function ht({ customSlot: e }) {
|
|
1791
|
+
const { t } = B();
|
|
1771
1792
|
return e ? /* @__PURE__ */ s(W, { children: e }) : /* @__PURE__ */ s(
|
|
1772
|
-
|
|
1793
|
+
tt,
|
|
1773
1794
|
{
|
|
1774
1795
|
variant: "no-results",
|
|
1775
1796
|
title: t("booking.emptyServices.title"),
|
|
@@ -1777,93 +1798,95 @@ function ft({ customSlot: e }) {
|
|
|
1777
1798
|
}
|
|
1778
1799
|
);
|
|
1779
1800
|
}
|
|
1780
|
-
function
|
|
1801
|
+
function Ga(e) {
|
|
1781
1802
|
const {
|
|
1782
1803
|
cascade: t,
|
|
1783
1804
|
inputs: a,
|
|
1784
1805
|
value: i,
|
|
1785
1806
|
onChange: n,
|
|
1786
1807
|
onSubmit: o,
|
|
1787
|
-
emptyServicesSlot:
|
|
1788
|
-
onboardingIncompleteSlot:
|
|
1789
|
-
loadingDates:
|
|
1790
|
-
loadingSlots:
|
|
1791
|
-
onDateSelect:
|
|
1792
|
-
|
|
1808
|
+
emptyServicesSlot: u,
|
|
1809
|
+
onboardingIncompleteSlot: p,
|
|
1810
|
+
loadingDates: c,
|
|
1811
|
+
loadingSlots: l,
|
|
1812
|
+
onDateSelect: d,
|
|
1813
|
+
onWindowChange: m,
|
|
1814
|
+
datePickerStyle: y,
|
|
1793
1815
|
submitting: S,
|
|
1794
|
-
locale:
|
|
1795
|
-
detailsProps:
|
|
1796
|
-
} = e, { t: N } =
|
|
1797
|
-
return /* @__PURE__ */
|
|
1816
|
+
locale: h,
|
|
1817
|
+
detailsProps: w
|
|
1818
|
+
} = e, { t: N } = B();
|
|
1819
|
+
return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1798
1820
|
t.gates.insurance ? /* @__PURE__ */ s(
|
|
1799
|
-
|
|
1821
|
+
ut,
|
|
1800
1822
|
{
|
|
1801
1823
|
value: i.insuranceType,
|
|
1802
|
-
onChange: (
|
|
1824
|
+
onChange: (I) => n(st(i, I))
|
|
1803
1825
|
}
|
|
1804
1826
|
) : null,
|
|
1805
1827
|
t.gates.specialty ? /* @__PURE__ */ s(
|
|
1806
|
-
|
|
1828
|
+
mt,
|
|
1807
1829
|
{
|
|
1808
1830
|
specialties: t.filtered.specialties,
|
|
1809
1831
|
value: i.specialtyId,
|
|
1810
|
-
onChange: (
|
|
1832
|
+
onChange: (I) => n(it(i, I))
|
|
1811
1833
|
}
|
|
1812
1834
|
) : null,
|
|
1813
|
-
t.gates.service ? t.filtered.services.length === 0 ? /* @__PURE__ */ s(
|
|
1814
|
-
|
|
1835
|
+
t.gates.service ? t.filtered.services.length === 0 ? /* @__PURE__ */ s(ht, { customSlot: u }) : /* @__PURE__ */ s(
|
|
1836
|
+
pt,
|
|
1815
1837
|
{
|
|
1816
1838
|
services: t.filtered.services,
|
|
1817
1839
|
value: i.serviceId,
|
|
1818
|
-
onChange: (
|
|
1840
|
+
onChange: (I) => n(nt(i, I))
|
|
1819
1841
|
}
|
|
1820
1842
|
) : null,
|
|
1821
|
-
t.gates.onboardingIncomplete ? /* @__PURE__ */ s(
|
|
1843
|
+
t.gates.onboardingIncomplete ? /* @__PURE__ */ s(ft, { customSlot: p }) : null,
|
|
1822
1844
|
t.gates.operator ? /* @__PURE__ */ s(
|
|
1823
|
-
|
|
1845
|
+
gt,
|
|
1824
1846
|
{
|
|
1825
1847
|
operators: t.filtered.operators,
|
|
1826
1848
|
value: i.operatorId,
|
|
1827
|
-
onChange: (
|
|
1849
|
+
onChange: (I) => n(ot(i, I))
|
|
1828
1850
|
}
|
|
1829
1851
|
) : null,
|
|
1830
|
-
t.gates.date ? /* @__PURE__ */
|
|
1852
|
+
t.gates.date ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1831
1853
|
/* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: N("booking.date.heading") }),
|
|
1832
1854
|
a.availableDates.length === 0 && a.nextAvailableDate ? /* @__PURE__ */ s(
|
|
1833
|
-
|
|
1855
|
+
Ke,
|
|
1834
1856
|
{
|
|
1835
1857
|
nextAvailableDate: a.nextAvailableDate,
|
|
1836
|
-
onJump: () => n(
|
|
1837
|
-
locale:
|
|
1858
|
+
onJump: () => n(Ae(i, a.nextAvailableDate)),
|
|
1859
|
+
locale: h
|
|
1838
1860
|
}
|
|
1839
|
-
) :
|
|
1861
|
+
) : lt({
|
|
1840
1862
|
inputs: a,
|
|
1841
1863
|
value: i,
|
|
1842
1864
|
onChange: n,
|
|
1843
|
-
onDateSelect:
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1865
|
+
onDateSelect: d,
|
|
1866
|
+
onWindowChange: m,
|
|
1867
|
+
loadingDates: c,
|
|
1868
|
+
loadingSlots: l,
|
|
1869
|
+
locale: h,
|
|
1870
|
+
datePickerStyle: y
|
|
1848
1871
|
})
|
|
1849
1872
|
] }) : null,
|
|
1850
|
-
t.gates.slot && i.date &&
|
|
1873
|
+
t.gates.slot && i.date && y === "month-calendar" ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1851
1874
|
/* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: N("booking.slot.heading") }),
|
|
1852
|
-
|
|
1875
|
+
ct({
|
|
1853
1876
|
inputs: a,
|
|
1854
1877
|
value: i,
|
|
1855
1878
|
onChange: n,
|
|
1856
|
-
loadingSlots:
|
|
1857
|
-
locale:
|
|
1858
|
-
datePickerStyle:
|
|
1879
|
+
loadingSlots: l,
|
|
1880
|
+
locale: h,
|
|
1881
|
+
datePickerStyle: y
|
|
1859
1882
|
})
|
|
1860
1883
|
] }) : null,
|
|
1861
1884
|
t.gates.details && t.selectedSlot ? /* @__PURE__ */ s(
|
|
1862
1885
|
ze,
|
|
1863
1886
|
{
|
|
1864
|
-
...
|
|
1887
|
+
...w,
|
|
1865
1888
|
value: i.details ?? {},
|
|
1866
|
-
onChange: (
|
|
1889
|
+
onChange: (I) => n({ ...i, details: I }),
|
|
1867
1890
|
onSubmit: o,
|
|
1868
1891
|
submitting: S,
|
|
1869
1892
|
defaultPhoneCountry: e.policy.country
|
|
@@ -1871,98 +1894,100 @@ function qa(e) {
|
|
|
1871
1894
|
) : null
|
|
1872
1895
|
] });
|
|
1873
1896
|
}
|
|
1874
|
-
function
|
|
1897
|
+
function z(e, t, a = {}) {
|
|
1875
1898
|
const {
|
|
1876
1899
|
cascade: i,
|
|
1877
1900
|
inputs: n,
|
|
1878
1901
|
value: o,
|
|
1879
|
-
onChange:
|
|
1880
|
-
onSubmit:
|
|
1881
|
-
emptyServicesSlot:
|
|
1882
|
-
onboardingIncompleteSlot:
|
|
1883
|
-
loadingDates:
|
|
1884
|
-
loadingSlots:
|
|
1885
|
-
onDateSelect:
|
|
1886
|
-
|
|
1887
|
-
|
|
1902
|
+
onChange: u,
|
|
1903
|
+
onSubmit: p,
|
|
1904
|
+
emptyServicesSlot: c,
|
|
1905
|
+
onboardingIncompleteSlot: l,
|
|
1906
|
+
loadingDates: d,
|
|
1907
|
+
loadingSlots: m,
|
|
1908
|
+
onDateSelect: y,
|
|
1909
|
+
onWindowChange: S,
|
|
1910
|
+
datePickerStyle: h,
|
|
1911
|
+
submitting: w,
|
|
1888
1912
|
locale: N,
|
|
1889
|
-
detailsProps:
|
|
1890
|
-
policy:
|
|
1913
|
+
detailsProps: I,
|
|
1914
|
+
policy: k
|
|
1891
1915
|
} = t;
|
|
1892
1916
|
switch (e) {
|
|
1893
1917
|
case 1:
|
|
1894
1918
|
return /* @__PURE__ */ s(
|
|
1895
|
-
|
|
1919
|
+
ut,
|
|
1896
1920
|
{
|
|
1897
1921
|
value: o.insuranceType,
|
|
1898
|
-
onChange: (
|
|
1922
|
+
onChange: (v) => u(st(o, v))
|
|
1899
1923
|
}
|
|
1900
1924
|
);
|
|
1901
1925
|
case 2:
|
|
1902
1926
|
return /* @__PURE__ */ s(
|
|
1903
|
-
|
|
1927
|
+
mt,
|
|
1904
1928
|
{
|
|
1905
1929
|
specialties: i.filtered.specialties,
|
|
1906
1930
|
value: o.specialtyId,
|
|
1907
|
-
onChange: (
|
|
1931
|
+
onChange: (v) => u(it(o, v))
|
|
1908
1932
|
}
|
|
1909
1933
|
);
|
|
1910
1934
|
case 3:
|
|
1911
|
-
return i.filtered.services.length === 0 ? /* @__PURE__ */ s(
|
|
1912
|
-
|
|
1935
|
+
return i.filtered.services.length === 0 ? /* @__PURE__ */ s(ht, { customSlot: c }) : i.gates.onboardingIncomplete ? /* @__PURE__ */ s(ft, { customSlot: l }) : /* @__PURE__ */ s(
|
|
1936
|
+
pt,
|
|
1913
1937
|
{
|
|
1914
1938
|
services: i.filtered.services,
|
|
1915
1939
|
value: o.serviceId,
|
|
1916
|
-
onChange: (
|
|
1940
|
+
onChange: (v) => u(nt(o, v)),
|
|
1917
1941
|
compact: a.compactService
|
|
1918
1942
|
}
|
|
1919
1943
|
);
|
|
1920
1944
|
case 4:
|
|
1921
1945
|
return /* @__PURE__ */ s(
|
|
1922
|
-
|
|
1946
|
+
gt,
|
|
1923
1947
|
{
|
|
1924
1948
|
operators: i.filtered.operators,
|
|
1925
1949
|
value: o.operatorId,
|
|
1926
|
-
onChange: (
|
|
1950
|
+
onChange: (v) => u(ot(o, v))
|
|
1927
1951
|
}
|
|
1928
1952
|
);
|
|
1929
1953
|
case 5:
|
|
1930
1954
|
return n.availableDates.length === 0 && n.nextAvailableDate ? /* @__PURE__ */ s(
|
|
1931
|
-
|
|
1955
|
+
Ke,
|
|
1932
1956
|
{
|
|
1933
1957
|
nextAvailableDate: n.nextAvailableDate,
|
|
1934
|
-
onJump: () =>
|
|
1958
|
+
onJump: () => u(Ae(o, n.nextAvailableDate)),
|
|
1935
1959
|
locale: N
|
|
1936
1960
|
}
|
|
1937
|
-
) :
|
|
1961
|
+
) : lt({
|
|
1938
1962
|
inputs: n,
|
|
1939
1963
|
value: o,
|
|
1940
|
-
onChange:
|
|
1941
|
-
onDateSelect:
|
|
1942
|
-
|
|
1943
|
-
|
|
1964
|
+
onChange: u,
|
|
1965
|
+
onDateSelect: y,
|
|
1966
|
+
onWindowChange: S,
|
|
1967
|
+
loadingDates: d,
|
|
1968
|
+
loadingSlots: m,
|
|
1944
1969
|
locale: N,
|
|
1945
|
-
datePickerStyle:
|
|
1970
|
+
datePickerStyle: h
|
|
1946
1971
|
});
|
|
1947
1972
|
case 6:
|
|
1948
|
-
return
|
|
1973
|
+
return ct({
|
|
1949
1974
|
inputs: n,
|
|
1950
1975
|
value: o,
|
|
1951
|
-
onChange:
|
|
1952
|
-
loadingSlots:
|
|
1976
|
+
onChange: u,
|
|
1977
|
+
loadingSlots: m,
|
|
1953
1978
|
locale: N,
|
|
1954
|
-
datePickerStyle:
|
|
1979
|
+
datePickerStyle: h
|
|
1955
1980
|
});
|
|
1956
1981
|
case 7:
|
|
1957
1982
|
return i.selectedSlot ? /* @__PURE__ */ s(
|
|
1958
1983
|
ze,
|
|
1959
1984
|
{
|
|
1960
|
-
...
|
|
1985
|
+
...I,
|
|
1961
1986
|
value: o.details ?? {},
|
|
1962
|
-
onChange: (
|
|
1963
|
-
onSubmit:
|
|
1964
|
-
submitting:
|
|
1965
|
-
defaultPhoneCountry:
|
|
1987
|
+
onChange: (v) => u({ ...o, details: v }),
|
|
1988
|
+
onSubmit: p,
|
|
1989
|
+
submitting: w,
|
|
1990
|
+
defaultPhoneCountry: k.country
|
|
1966
1991
|
}
|
|
1967
1992
|
) : null;
|
|
1968
1993
|
/* c8 ignore next 2 */
|
|
@@ -1970,9 +1995,9 @@ function F(e, t, a = {}) {
|
|
|
1970
1995
|
return null;
|
|
1971
1996
|
}
|
|
1972
1997
|
}
|
|
1973
|
-
function
|
|
1974
|
-
const { t: e } =
|
|
1975
|
-
return
|
|
1998
|
+
function je() {
|
|
1999
|
+
const { t: e } = B();
|
|
2000
|
+
return C(
|
|
1976
2001
|
() => ({
|
|
1977
2002
|
1: e("booking.insurance.heading"),
|
|
1978
2003
|
2: e("booking.specialty.heading"),
|
|
@@ -1985,32 +2010,32 @@ function Ke() {
|
|
|
1985
2010
|
[e]
|
|
1986
2011
|
);
|
|
1987
2012
|
}
|
|
1988
|
-
function
|
|
1989
|
-
const { cascade: t, value: a, activeStep: i, setActiveStep: n, datePickerStyle: o } = e,
|
|
1990
|
-
() => o === "four-day-grid" ? t.visibleSteps.filter((
|
|
2013
|
+
function Ua(e) {
|
|
2014
|
+
const { cascade: t, value: a, activeStep: i, setActiveStep: n, datePickerStyle: o } = e, u = je(), p = C(
|
|
2015
|
+
() => o === "four-day-grid" ? t.visibleSteps.filter((d) => d !== 6) : t.visibleSteps,
|
|
1991
2016
|
[t.visibleSteps, o]
|
|
1992
|
-
),
|
|
1993
|
-
() =>
|
|
1994
|
-
label:
|
|
1995
|
-
summary:
|
|
1996
|
-
status:
|
|
1997
|
-
content:
|
|
2017
|
+
), c = C(
|
|
2018
|
+
() => p.map((d) => ({
|
|
2019
|
+
label: u[d],
|
|
2020
|
+
summary: vt(d, a, t),
|
|
2021
|
+
status: be(d, a) && d < t.currentStep ? "completed" : void 0,
|
|
2022
|
+
content: z(d, e, { compactService: !0 })
|
|
1998
2023
|
})),
|
|
1999
|
-
[
|
|
2000
|
-
),
|
|
2024
|
+
[p, a, u, t, e]
|
|
2025
|
+
), l = Math.max(0, t.visibleSteps.indexOf(i));
|
|
2001
2026
|
return /* @__PURE__ */ s(
|
|
2002
2027
|
_t,
|
|
2003
2028
|
{
|
|
2004
|
-
activeStep:
|
|
2005
|
-
steps:
|
|
2006
|
-
onStepChange: (
|
|
2007
|
-
const
|
|
2008
|
-
|
|
2029
|
+
activeStep: l,
|
|
2030
|
+
steps: c,
|
|
2031
|
+
onStepChange: (d) => {
|
|
2032
|
+
const m = t.visibleSteps[d];
|
|
2033
|
+
m && n(m);
|
|
2009
2034
|
}
|
|
2010
2035
|
}
|
|
2011
2036
|
);
|
|
2012
2037
|
}
|
|
2013
|
-
function
|
|
2038
|
+
function be(e, t) {
|
|
2014
2039
|
switch (e) {
|
|
2015
2040
|
case 1:
|
|
2016
2041
|
return t.insuranceType !== void 0;
|
|
@@ -2028,9 +2053,9 @@ function ve(e, t) {
|
|
|
2028
2053
|
return !1;
|
|
2029
2054
|
}
|
|
2030
2055
|
}
|
|
2031
|
-
function
|
|
2056
|
+
function vt(e, t, a) {
|
|
2032
2057
|
var i;
|
|
2033
|
-
if (
|
|
2058
|
+
if (be(e, t))
|
|
2034
2059
|
switch (e) {
|
|
2035
2060
|
case 1:
|
|
2036
2061
|
return t.insuranceType;
|
|
@@ -2049,7 +2074,7 @@ function ht(e, t, a) {
|
|
|
2049
2074
|
case 4: {
|
|
2050
2075
|
const n = $e(t);
|
|
2051
2076
|
if (!n) return;
|
|
2052
|
-
const o = a.filtered.operators.find((
|
|
2077
|
+
const o = a.filtered.operators.find((u) => u.id === n);
|
|
2053
2078
|
return o == null ? void 0 : o.name;
|
|
2054
2079
|
}
|
|
2055
2080
|
case 5:
|
|
@@ -2060,108 +2085,108 @@ function ht(e, t, a) {
|
|
|
2060
2085
|
return;
|
|
2061
2086
|
}
|
|
2062
2087
|
}
|
|
2063
|
-
function
|
|
2064
|
-
const { cascade: t, value: a, setActiveStep: i } = e, { t: n } =
|
|
2065
|
-
(
|
|
2066
|
-
),
|
|
2067
|
-
(
|
|
2088
|
+
function Ya(e) {
|
|
2089
|
+
const { cascade: t, value: a, setActiveStep: i } = e, { t: n } = B(), o = je(), u = t.visibleSteps.filter(
|
|
2090
|
+
(c) => c === 1 || c === 2 || c === 3 || c === 4
|
|
2091
|
+
), p = u.some(
|
|
2092
|
+
(c) => !be(c, a)
|
|
2068
2093
|
);
|
|
2069
|
-
return /* @__PURE__ */
|
|
2070
|
-
|
|
2094
|
+
return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
2095
|
+
p ? u.filter((c) => !be(c, a)).slice(0, 1).map((c) => /* @__PURE__ */ s("div", { children: z(c, e, { compactService: !0 }) }, `csf-${c}`)) : /* @__PURE__ */ s(
|
|
2071
2096
|
"div",
|
|
2072
2097
|
{
|
|
2073
2098
|
role: "group",
|
|
2074
2099
|
"aria-label": n("booking.regionLabel"),
|
|
2075
2100
|
className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
2076
|
-
children:
|
|
2077
|
-
const
|
|
2078
|
-
return
|
|
2079
|
-
|
|
2101
|
+
children: u.map((c) => {
|
|
2102
|
+
const l = vt(c, a, t);
|
|
2103
|
+
return l ? /* @__PURE__ */ b(
|
|
2104
|
+
se,
|
|
2080
2105
|
{
|
|
2081
2106
|
intent: "tonal",
|
|
2082
2107
|
size: "sm",
|
|
2083
|
-
onClick: () => i(
|
|
2108
|
+
onClick: () => i(c),
|
|
2084
2109
|
children: [
|
|
2085
|
-
o[
|
|
2110
|
+
o[c],
|
|
2086
2111
|
": ",
|
|
2087
|
-
|
|
2112
|
+
l
|
|
2088
2113
|
]
|
|
2089
2114
|
},
|
|
2090
|
-
`csc-${
|
|
2115
|
+
`csc-${c}`
|
|
2091
2116
|
) : null;
|
|
2092
2117
|
})
|
|
2093
2118
|
}
|
|
2094
2119
|
),
|
|
2095
|
-
!
|
|
2120
|
+
!p && t.gates.date ? (
|
|
2096
2121
|
// four-day-grid embeds slots inline with the day strip — the
|
|
2097
2122
|
// historic 2-col date|slot split collapses to a single column
|
|
2098
2123
|
// so the picker spans the full width instead of orphaning an
|
|
2099
2124
|
// empty right cell.
|
|
2100
|
-
e.datePickerStyle === "four-day-grid" ? /* @__PURE__ */ s("div", { children:
|
|
2101
|
-
/* @__PURE__ */ s("div", { className: "ds:min-w-0", children:
|
|
2102
|
-
/* @__PURE__ */ s("div", { className: "ds:min-w-0", children: a.date ?
|
|
2125
|
+
e.datePickerStyle === "four-day-grid" ? /* @__PURE__ */ s("div", { children: z(5, e) }) : /* @__PURE__ */ b("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
|
|
2126
|
+
/* @__PURE__ */ s("div", { className: "ds:min-w-0", children: z(5, e) }),
|
|
2127
|
+
/* @__PURE__ */ s("div", { className: "ds:min-w-0", children: a.date ? z(6, e) : null })
|
|
2103
2128
|
] })
|
|
2104
2129
|
) : null,
|
|
2105
|
-
t.gates.details ? /* @__PURE__ */ s("div", { children:
|
|
2130
|
+
t.gates.details ? /* @__PURE__ */ s("div", { children: z(7, e) }) : null
|
|
2106
2131
|
] });
|
|
2107
2132
|
}
|
|
2108
|
-
function
|
|
2133
|
+
function Ja(e) {
|
|
2109
2134
|
const { cascade: t } = e, a = t.visibleSteps.filter(
|
|
2110
2135
|
(i) => i === 1 || i === 2 || i === 3 || i === 4
|
|
2111
2136
|
);
|
|
2112
|
-
return /* @__PURE__ */
|
|
2113
|
-
/* @__PURE__ */
|
|
2114
|
-
/* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: a.map((i) => /* @__PURE__ */ s("div", { children:
|
|
2115
|
-
/* @__PURE__ */
|
|
2116
|
-
t.gates.date ?
|
|
2117
|
-
t.gates.slot && e.value.date ?
|
|
2137
|
+
return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
2138
|
+
/* @__PURE__ */ b("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
|
|
2139
|
+
/* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: a.map((i) => /* @__PURE__ */ s("div", { children: z(i, e, { compactService: !0 }) }, `fbf-${i}`)) }),
|
|
2140
|
+
/* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
2141
|
+
t.gates.date ? z(5, e) : null,
|
|
2142
|
+
t.gates.slot && e.value.date ? z(6, e) : null
|
|
2118
2143
|
] })
|
|
2119
2144
|
] }),
|
|
2120
|
-
t.gates.details ?
|
|
2145
|
+
t.gates.details ? z(7, e) : null
|
|
2121
2146
|
] });
|
|
2122
2147
|
}
|
|
2123
|
-
function
|
|
2124
|
-
const { cascade: t, value: a, activeStep: i, setActiveStep: n, datePickerStyle: o } = e, { t:
|
|
2148
|
+
function Za(e) {
|
|
2149
|
+
const { cascade: t, value: a, activeStep: i, setActiveStep: n, datePickerStyle: o } = e, { t: u } = B(), p = je(), c = C(
|
|
2125
2150
|
() => o === "four-day-grid" ? t.visibleSteps.filter((h) => h !== 6) : t.visibleSteps,
|
|
2126
2151
|
[t.visibleSteps, o]
|
|
2127
|
-
),
|
|
2128
|
-
() =>
|
|
2129
|
-
[
|
|
2130
|
-
),
|
|
2131
|
-
return /* @__PURE__ */
|
|
2132
|
-
/* @__PURE__ */ s(Tt, { activeStep:
|
|
2133
|
-
/* @__PURE__ */ s("div", { children:
|
|
2134
|
-
/* @__PURE__ */
|
|
2152
|
+
), l = Math.max(0, c.indexOf(i)), d = c.length, m = C(
|
|
2153
|
+
() => c.map((h) => ({ label: p[h] })),
|
|
2154
|
+
[c, p]
|
|
2155
|
+
), y = l > 0, S = l < d - 1 && be(i, a);
|
|
2156
|
+
return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
2157
|
+
/* @__PURE__ */ s(Tt, { activeStep: l, steps: m }),
|
|
2158
|
+
/* @__PURE__ */ s("div", { children: z(i, e, { compactService: !0 }) }),
|
|
2159
|
+
/* @__PURE__ */ b("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
2135
2160
|
/* @__PURE__ */ s(
|
|
2136
|
-
|
|
2161
|
+
se,
|
|
2137
2162
|
{
|
|
2138
2163
|
intent: "ghost",
|
|
2139
2164
|
size: "md",
|
|
2140
|
-
disabled: !
|
|
2165
|
+
disabled: !y,
|
|
2141
2166
|
onClick: () => {
|
|
2142
|
-
const h =
|
|
2167
|
+
const h = c[l - 1];
|
|
2143
2168
|
h && n(h);
|
|
2144
2169
|
},
|
|
2145
|
-
children:
|
|
2170
|
+
children: u("booking.actions.back")
|
|
2146
2171
|
}
|
|
2147
2172
|
),
|
|
2148
2173
|
i < 7 ? /* @__PURE__ */ s(
|
|
2149
|
-
|
|
2174
|
+
se,
|
|
2150
2175
|
{
|
|
2151
2176
|
intent: "primary",
|
|
2152
2177
|
size: "md",
|
|
2153
|
-
disabled: !
|
|
2178
|
+
disabled: !S,
|
|
2154
2179
|
onClick: () => {
|
|
2155
|
-
const h =
|
|
2180
|
+
const h = c[l + 1];
|
|
2156
2181
|
h && n(h);
|
|
2157
2182
|
},
|
|
2158
|
-
children:
|
|
2183
|
+
children: u("booking.actions.next")
|
|
2159
2184
|
}
|
|
2160
2185
|
) : null
|
|
2161
2186
|
] })
|
|
2162
2187
|
] });
|
|
2163
2188
|
}
|
|
2164
|
-
const Wa = [],
|
|
2189
|
+
const Wa = [], Xa = [], Qa = Qe(
|
|
2165
2190
|
({
|
|
2166
2191
|
variant: e = "inline-list",
|
|
2167
2192
|
country: t,
|
|
@@ -2172,71 +2197,72 @@ const Wa = [], Za = [], Ja = Je(
|
|
|
2172
2197
|
allowOperatorSelection: i = !1,
|
|
2173
2198
|
lockedOperatorId: n,
|
|
2174
2199
|
autoSelectSingleService: o = !1,
|
|
2175
|
-
specialties:
|
|
2176
|
-
services:
|
|
2177
|
-
operators:
|
|
2178
|
-
availableDates:
|
|
2179
|
-
availableSlots:
|
|
2180
|
-
nextAvailableDate:
|
|
2181
|
-
requireCodiceFiscale:
|
|
2182
|
-
requireDateOfBirth:
|
|
2200
|
+
specialties: u,
|
|
2201
|
+
services: p,
|
|
2202
|
+
operators: c,
|
|
2203
|
+
availableDates: l,
|
|
2204
|
+
availableSlots: d,
|
|
2205
|
+
nextAvailableDate: m,
|
|
2206
|
+
requireCodiceFiscale: y,
|
|
2207
|
+
requireDateOfBirth: S,
|
|
2183
2208
|
requireInsuranceNumber: h,
|
|
2184
|
-
showNote:
|
|
2185
|
-
showReturningPatientFlag:
|
|
2186
|
-
privacyPolicyUrl:
|
|
2187
|
-
termsUrl:
|
|
2188
|
-
validateCodiceFiscale:
|
|
2209
|
+
showNote: w,
|
|
2210
|
+
showReturningPatientFlag: N,
|
|
2211
|
+
privacyPolicyUrl: I,
|
|
2212
|
+
termsUrl: k,
|
|
2213
|
+
validateCodiceFiscale: v,
|
|
2189
2214
|
validateInsuranceNumber: r,
|
|
2190
|
-
confirmationChannels:
|
|
2191
|
-
defaultConfirmationChannels:
|
|
2192
|
-
value:
|
|
2193
|
-
onChange:
|
|
2194
|
-
onSubmit:
|
|
2195
|
-
onStepChange:
|
|
2196
|
-
onDateSelect:
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
+
confirmationChannels: O,
|
|
2216
|
+
defaultConfirmationChannels: A,
|
|
2217
|
+
value: f,
|
|
2218
|
+
onChange: x,
|
|
2219
|
+
onSubmit: _,
|
|
2220
|
+
onStepChange: D,
|
|
2221
|
+
onDateSelect: U,
|
|
2222
|
+
onWindowChange: E,
|
|
2223
|
+
datePickerStyle: R = "month-calendar",
|
|
2224
|
+
loadingDates: Y,
|
|
2225
|
+
loadingSlots: T,
|
|
2226
|
+
submitting: X,
|
|
2227
|
+
submitError: H,
|
|
2228
|
+
mode: re = "live",
|
|
2229
|
+
showModifyOnSuccess: Q = !0,
|
|
2230
|
+
surface: _e = "flat",
|
|
2231
|
+
emptyServicesSlot: J,
|
|
2232
|
+
onboardingIncompleteSlot: ie,
|
|
2233
|
+
"aria-label": de,
|
|
2234
|
+
id: le,
|
|
2235
|
+
className: Te,
|
|
2236
|
+
...Be
|
|
2237
|
+
}, ye) => {
|
|
2238
|
+
const { t: ce, i18n: ke } = B(), L = e ?? "inline-list", ee = ke.language ?? "en", g = u ?? Wa, M = c ?? Xa;
|
|
2239
|
+
G(() => {
|
|
2240
|
+
const F = Ca(f, {
|
|
2215
2241
|
useSpecialties: a,
|
|
2216
2242
|
lockedOperatorId: n,
|
|
2217
2243
|
autoSelectSingleService: o,
|
|
2218
|
-
specialties:
|
|
2219
|
-
services:
|
|
2244
|
+
specialties: g,
|
|
2245
|
+
services: p
|
|
2220
2246
|
});
|
|
2221
|
-
(
|
|
2247
|
+
(F.specialtyId !== f.specialtyId || F.operatorId !== f.operatorId || F.serviceId !== f.serviceId) && x(F);
|
|
2222
2248
|
}, [
|
|
2223
2249
|
n,
|
|
2224
2250
|
a,
|
|
2225
2251
|
o,
|
|
2226
|
-
|
|
2227
|
-
|
|
2252
|
+
g,
|
|
2253
|
+
p
|
|
2228
2254
|
]);
|
|
2229
|
-
const
|
|
2230
|
-
() =>
|
|
2255
|
+
const P = C(
|
|
2256
|
+
() => wa({
|
|
2231
2257
|
country: t,
|
|
2232
2258
|
useSpecialties: a,
|
|
2233
2259
|
allowOperatorSelection: i,
|
|
2234
2260
|
lockedOperatorId: n,
|
|
2235
|
-
specialties:
|
|
2236
|
-
services:
|
|
2237
|
-
operators:
|
|
2238
|
-
availableSlots:
|
|
2239
|
-
value:
|
|
2261
|
+
specialties: g,
|
|
2262
|
+
services: p,
|
|
2263
|
+
operators: M,
|
|
2264
|
+
availableSlots: d,
|
|
2265
|
+
value: f
|
|
2240
2266
|
}),
|
|
2241
2267
|
[
|
|
2242
2268
|
t,
|
|
@@ -2244,197 +2270,199 @@ const Wa = [], Za = [], Ja = Je(
|
|
|
2244
2270
|
i,
|
|
2245
2271
|
n,
|
|
2246
2272
|
o,
|
|
2247
|
-
L,
|
|
2248
|
-
m,
|
|
2249
2273
|
g,
|
|
2250
|
-
c,
|
|
2251
2274
|
p,
|
|
2252
|
-
|
|
2275
|
+
M,
|
|
2276
|
+
l,
|
|
2277
|
+
d,
|
|
2278
|
+
f
|
|
2253
2279
|
]
|
|
2254
|
-
), [
|
|
2255
|
-
|
|
2256
|
-
),
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
}, [
|
|
2260
|
-
const [
|
|
2261
|
-
async (
|
|
2262
|
-
if (!
|
|
2263
|
-
const
|
|
2264
|
-
slot:
|
|
2280
|
+
), [qe, ue] = j(
|
|
2281
|
+
P.currentStep
|
|
2282
|
+
), He = ae(P.currentStep);
|
|
2283
|
+
G(() => {
|
|
2284
|
+
P.currentStep > He.current && ue(P.currentStep), He.current = P.currentStep;
|
|
2285
|
+
}, [P.currentStep]);
|
|
2286
|
+
const [me, pe] = j("idle"), [Oe, Pe] = j(null), Ge = q(
|
|
2287
|
+
async (F) => {
|
|
2288
|
+
if (!P.selectedSlot) return;
|
|
2289
|
+
const Re = {
|
|
2290
|
+
slot: P.selectedSlot,
|
|
2265
2291
|
value: {
|
|
2266
|
-
...
|
|
2267
|
-
details:
|
|
2268
|
-
operatorId: $e(
|
|
2292
|
+
...f,
|
|
2293
|
+
details: F,
|
|
2294
|
+
operatorId: $e(f) ?? f.operatorId
|
|
2269
2295
|
},
|
|
2270
|
-
details:
|
|
2296
|
+
details: F
|
|
2271
2297
|
};
|
|
2272
|
-
|
|
2298
|
+
pe("submitting");
|
|
2273
2299
|
try {
|
|
2274
|
-
await
|
|
2275
|
-
slot:
|
|
2276
|
-
details:
|
|
2277
|
-
specialtyId:
|
|
2278
|
-
serviceId:
|
|
2279
|
-
insuranceType:
|
|
2280
|
-
operatorId: $e(
|
|
2281
|
-
date:
|
|
2282
|
-
}),
|
|
2300
|
+
await _(Re), Pe({
|
|
2301
|
+
slot: P.selectedSlot,
|
|
2302
|
+
details: F,
|
|
2303
|
+
specialtyId: f.specialtyId,
|
|
2304
|
+
serviceId: f.serviceId,
|
|
2305
|
+
insuranceType: f.insuranceType,
|
|
2306
|
+
operatorId: $e(f),
|
|
2307
|
+
date: f.date
|
|
2308
|
+
}), pe("success");
|
|
2283
2309
|
} catch {
|
|
2284
|
-
throw
|
|
2310
|
+
throw pe("error"), new Error("Booking submission failed");
|
|
2285
2311
|
}
|
|
2286
2312
|
},
|
|
2287
|
-
[
|
|
2288
|
-
),
|
|
2289
|
-
|
|
2290
|
-
const
|
|
2291
|
-
|
|
2292
|
-
if (
|
|
2313
|
+
[P.selectedSlot, _, f]
|
|
2314
|
+
), ge = ae(null);
|
|
2315
|
+
xt(ye, () => ge.current, []);
|
|
2316
|
+
const fe = me === "success" ? 8 : P.currentStep, Ue = ae(null);
|
|
2317
|
+
G(() => {
|
|
2318
|
+
if (fe !== Ue.current && (Ue.current = fe, D == null || D(fe), fe === 8 && ge.current))
|
|
2293
2319
|
try {
|
|
2294
|
-
|
|
2320
|
+
ge.current.scrollIntoView({
|
|
2295
2321
|
behavior: "smooth",
|
|
2296
2322
|
block: "start"
|
|
2297
2323
|
});
|
|
2298
2324
|
} catch {
|
|
2299
|
-
|
|
2325
|
+
ge.current.scrollIntoView();
|
|
2300
2326
|
}
|
|
2301
|
-
}, [
|
|
2302
|
-
const
|
|
2327
|
+
}, [fe, D]);
|
|
2328
|
+
const Ee = C(
|
|
2303
2329
|
() => ({
|
|
2304
|
-
getVariant: () =>
|
|
2330
|
+
getVariant: () => L,
|
|
2305
2331
|
reset: () => {
|
|
2306
|
-
|
|
2332
|
+
x({}), Pe(null), pe("idle"), ue(1);
|
|
2307
2333
|
},
|
|
2308
|
-
goToStep: (
|
|
2309
|
-
|
|
2334
|
+
goToStep: (F) => {
|
|
2335
|
+
ue(F);
|
|
2310
2336
|
}
|
|
2311
2337
|
}),
|
|
2312
|
-
[
|
|
2338
|
+
[L, x]
|
|
2313
2339
|
);
|
|
2314
|
-
|
|
2315
|
-
const
|
|
2316
|
-
|
|
2340
|
+
Nt(ba, Ee, le);
|
|
2341
|
+
const bt = de ?? ce("booking.regionLabel"), yt = C(() => me !== "success" || !Oe ? null : /* @__PURE__ */ s(
|
|
2342
|
+
Ha,
|
|
2317
2343
|
{
|
|
2318
|
-
snapshot:
|
|
2319
|
-
operators:
|
|
2320
|
-
specialties:
|
|
2321
|
-
services:
|
|
2322
|
-
locale:
|
|
2323
|
-
mode:
|
|
2324
|
-
showModify:
|
|
2325
|
-
onReset: () =>
|
|
2344
|
+
snapshot: Oe,
|
|
2345
|
+
operators: M,
|
|
2346
|
+
specialties: g,
|
|
2347
|
+
services: p,
|
|
2348
|
+
locale: ee,
|
|
2349
|
+
mode: re,
|
|
2350
|
+
showModify: Q,
|
|
2351
|
+
onReset: () => Ee.reset(),
|
|
2326
2352
|
onModify: () => {
|
|
2327
|
-
|
|
2353
|
+
Pe(null), pe("idle"), ue(7);
|
|
2328
2354
|
}
|
|
2329
2355
|
}
|
|
2330
2356
|
), [
|
|
2331
|
-
|
|
2332
|
-
|
|
2357
|
+
me,
|
|
2358
|
+
Oe,
|
|
2359
|
+
M,
|
|
2333
2360
|
g,
|
|
2334
|
-
|
|
2335
|
-
|
|
2361
|
+
p,
|
|
2362
|
+
ee,
|
|
2363
|
+
re,
|
|
2336
2364
|
Q,
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
const V = R === "accordion" ? Ha : R === "calendar" ? Ga : R === "flexible" ? Ua : R === "progress" ? Ya : qa, Ee = {
|
|
2343
|
-
cascade: I,
|
|
2365
|
+
Ee
|
|
2366
|
+
]), kt = C(() => {
|
|
2367
|
+
if (me === "success") return null;
|
|
2368
|
+
const F = L === "accordion" ? Ua : L === "calendar" ? Ya : L === "flexible" ? Ja : L === "progress" ? Za : Ga, Re = {
|
|
2369
|
+
cascade: P,
|
|
2344
2370
|
inputs: {
|
|
2345
|
-
specialties:
|
|
2346
|
-
services:
|
|
2347
|
-
operators:
|
|
2348
|
-
availableDates:
|
|
2349
|
-
availableSlots:
|
|
2350
|
-
nextAvailableDate:
|
|
2371
|
+
specialties: g,
|
|
2372
|
+
services: p,
|
|
2373
|
+
operators: M,
|
|
2374
|
+
availableDates: l,
|
|
2375
|
+
availableSlots: d,
|
|
2376
|
+
nextAvailableDate: m
|
|
2351
2377
|
},
|
|
2352
|
-
value:
|
|
2353
|
-
onChange:
|
|
2354
|
-
onSubmit:
|
|
2378
|
+
value: f,
|
|
2379
|
+
onChange: x,
|
|
2380
|
+
onSubmit: Ge,
|
|
2355
2381
|
policy: { country: t, lockedOperatorId: n },
|
|
2356
2382
|
detailsProps: {
|
|
2357
|
-
requireCodiceFiscale:
|
|
2358
|
-
requireDateOfBirth:
|
|
2383
|
+
requireCodiceFiscale: y,
|
|
2384
|
+
requireDateOfBirth: S,
|
|
2359
2385
|
requireInsuranceNumber: h,
|
|
2360
|
-
insuranceType:
|
|
2361
|
-
showNote:
|
|
2362
|
-
showReturningPatientFlag:
|
|
2363
|
-
privacyPolicyUrl:
|
|
2364
|
-
termsUrl:
|
|
2365
|
-
validateCodiceFiscale:
|
|
2386
|
+
insuranceType: f.insuranceType,
|
|
2387
|
+
showNote: w,
|
|
2388
|
+
showReturningPatientFlag: N,
|
|
2389
|
+
privacyPolicyUrl: I,
|
|
2390
|
+
termsUrl: k,
|
|
2391
|
+
validateCodiceFiscale: v,
|
|
2366
2392
|
validateInsuranceNumber: r,
|
|
2367
|
-
confirmationChannels:
|
|
2368
|
-
defaultConfirmationChannels:
|
|
2369
|
-
submitError:
|
|
2393
|
+
confirmationChannels: O,
|
|
2394
|
+
defaultConfirmationChannels: A,
|
|
2395
|
+
submitError: H
|
|
2370
2396
|
},
|
|
2371
|
-
emptyServicesSlot:
|
|
2372
|
-
onboardingIncompleteSlot:
|
|
2373
|
-
loadingDates:
|
|
2374
|
-
loadingSlots:
|
|
2375
|
-
onDateSelect:
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2397
|
+
emptyServicesSlot: J,
|
|
2398
|
+
onboardingIncompleteSlot: ie,
|
|
2399
|
+
loadingDates: Y,
|
|
2400
|
+
loadingSlots: T,
|
|
2401
|
+
onDateSelect: U,
|
|
2402
|
+
onWindowChange: E,
|
|
2403
|
+
datePickerStyle: R,
|
|
2404
|
+
submitting: X,
|
|
2405
|
+
locale: ee,
|
|
2406
|
+
activeStep: qe,
|
|
2407
|
+
setActiveStep: ue
|
|
2381
2408
|
};
|
|
2382
|
-
return /* @__PURE__ */ s(
|
|
2409
|
+
return /* @__PURE__ */ s(F, { ...Re });
|
|
2383
2410
|
}, [
|
|
2384
|
-
|
|
2385
|
-
R,
|
|
2386
|
-
I,
|
|
2411
|
+
me,
|
|
2387
2412
|
L,
|
|
2388
|
-
|
|
2413
|
+
P,
|
|
2389
2414
|
g,
|
|
2390
|
-
c,
|
|
2391
2415
|
p,
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2416
|
+
M,
|
|
2417
|
+
l,
|
|
2418
|
+
d,
|
|
2419
|
+
m,
|
|
2420
|
+
f,
|
|
2421
|
+
x,
|
|
2422
|
+
Ge,
|
|
2396
2423
|
t,
|
|
2397
2424
|
n,
|
|
2425
|
+
y,
|
|
2398
2426
|
S,
|
|
2399
|
-
k,
|
|
2400
2427
|
h,
|
|
2401
|
-
|
|
2428
|
+
H,
|
|
2429
|
+
w,
|
|
2402
2430
|
N,
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
f,
|
|
2431
|
+
I,
|
|
2432
|
+
k,
|
|
2433
|
+
v,
|
|
2407
2434
|
r,
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2435
|
+
O,
|
|
2436
|
+
A,
|
|
2437
|
+
J,
|
|
2438
|
+
ie,
|
|
2439
|
+
Y,
|
|
2440
|
+
T,
|
|
2411
2441
|
U,
|
|
2412
|
-
z,
|
|
2413
|
-
G,
|
|
2414
|
-
Z,
|
|
2415
2442
|
E,
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2443
|
+
R,
|
|
2444
|
+
X,
|
|
2445
|
+
ee,
|
|
2446
|
+
qe
|
|
2419
2447
|
]);
|
|
2420
|
-
return /* @__PURE__ */
|
|
2448
|
+
return /* @__PURE__ */ b(
|
|
2421
2449
|
"div",
|
|
2422
2450
|
{
|
|
2423
|
-
ref:
|
|
2451
|
+
ref: ge,
|
|
2424
2452
|
role: "region",
|
|
2425
|
-
"aria-label":
|
|
2426
|
-
id:
|
|
2453
|
+
"aria-label": bt,
|
|
2454
|
+
id: le,
|
|
2427
2455
|
"data-component": "booking",
|
|
2428
|
-
"data-component-id":
|
|
2429
|
-
"data-variant":
|
|
2430
|
-
className:
|
|
2431
|
-
variant:
|
|
2432
|
-
surface:
|
|
2433
|
-
className:
|
|
2456
|
+
"data-component-id": le,
|
|
2457
|
+
"data-variant": L,
|
|
2458
|
+
className: Ta({
|
|
2459
|
+
variant: L,
|
|
2460
|
+
surface: _e,
|
|
2461
|
+
className: Te
|
|
2434
2462
|
}),
|
|
2435
|
-
...
|
|
2463
|
+
...Be,
|
|
2436
2464
|
children: [
|
|
2437
|
-
/* @__PURE__ */
|
|
2465
|
+
/* @__PURE__ */ b(
|
|
2438
2466
|
"div",
|
|
2439
2467
|
{
|
|
2440
2468
|
className: [
|
|
@@ -2446,22 +2474,22 @@ const Wa = [], Za = [], Ja = Je(
|
|
|
2446
2474
|
"ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]"
|
|
2447
2475
|
].join(" "),
|
|
2448
2476
|
children: [
|
|
2449
|
-
/* @__PURE__ */ s("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children:
|
|
2450
|
-
/* @__PURE__ */ s("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children:
|
|
2477
|
+
/* @__PURE__ */ s("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: ce("booking.regionLabel") }),
|
|
2478
|
+
/* @__PURE__ */ s("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children: ce("booking.headingSubtitle") })
|
|
2451
2479
|
]
|
|
2452
2480
|
}
|
|
2453
2481
|
),
|
|
2454
|
-
|
|
2482
|
+
yt ?? kt
|
|
2455
2483
|
]
|
|
2456
2484
|
}
|
|
2457
2485
|
);
|
|
2458
2486
|
}
|
|
2459
2487
|
);
|
|
2460
|
-
|
|
2488
|
+
Qa.displayName = "Booking";
|
|
2461
2489
|
export {
|
|
2462
|
-
|
|
2490
|
+
Qa as B,
|
|
2463
2491
|
Fe as C,
|
|
2464
|
-
|
|
2465
|
-
|
|
2492
|
+
ve as O,
|
|
2493
|
+
ba as b
|
|
2466
2494
|
};
|
|
2467
|
-
//# sourceMappingURL=booking-
|
|
2495
|
+
//# sourceMappingURL=booking-Db4BQ9eH.js.map
|