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