@alfadocs/ui-kit-debug 1.83.0 → 1.84.0

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,7 +1,7 @@
1
1
  import { jsx as n, jsxs as k, Fragment as oe } from "react/jsx-runtime";
2
- import { forwardRef as wn, useId as at, useRef as M, useCallback as ye, useState as H, useEffect as z, useMemo as q, Fragment as es, useLayoutEffect as ts, useImperativeHandle as ns } from "react";
2
+ import { forwardRef as Nn, useId as at, useRef as M, useCallback as be, useState as U, useEffect as z, useMemo as q, Fragment as es, useLayoutEffect as ts, useImperativeHandle as ns } from "react";
3
3
  import { c as Tt } from "./index-D2ZczOXr.js";
4
- import { useTranslation as Q, Trans as Cn } from "react-i18next";
4
+ import { useTranslation as Q, Trans as wn } from "react-i18next";
5
5
  import { u as ss } from "./registry-DvAUVLHh.js";
6
6
  import { A as ae } from "./alert-9kEwDza3.js";
7
7
  import { B as Ne } from "./button-DohK_Ak_.js";
@@ -16,26 +16,26 @@ import { P as ds } from "./phone-input-DJ4BN8tG.js";
16
16
  import { T as ls } from "./text-area-COMVJ1yE.js";
17
17
  import { T as $t } from "./text-input-CaG9ApoE.js";
18
18
  import { A as us } from "./address-fields-CfnXK8RT.js";
19
- import { S as Tn } from "./spinner-CoflYlEx.js";
19
+ import { S as Cn } from "./spinner-CoflYlEx.js";
20
20
  import { a as Wt } from "./format-price-BcFBa-WP.js";
21
21
  import { C as ms } from "./credit-card-D9XZsHGA.js";
22
22
  import { O as ps } from "./otp-input-gV1446Dw.js";
23
23
  import { i as fs } from "./safe-href-5dbsfbQn.js";
24
- import { B as An } from "./badge-BUk4RjTS.js";
25
- import { I as gn } from "./icon-button-S8_weU3g.js";
24
+ import { B as Tn } from "./badge-BUk4RjTS.js";
25
+ import { I as hn } from "./icon-button-S8_weU3g.js";
26
26
  import { S as Yt } from "./select-4S-eYZUf.js";
27
- import { C as cn } from "./combobox-CDPm_n0p.js";
28
- import { M as dn } from "./multi-select-i5MFRpXg.js";
27
+ import { C as dn } from "./combobox-CDPm_n0p.js";
28
+ import { M as ln } from "./multi-select-i5MFRpXg.js";
29
29
  import { c as gs } from "./option-row-Dc7BrbK8.js";
30
30
  import { S as Gt } from "./skeleton-tTWJpvAq.js";
31
- import { E as Dn } from "./empty-state-DwJ5YNzz.js";
31
+ import { E as An } from "./empty-state-DwJ5YNzz.js";
32
32
  import { S as hs } from "./stepper-accordion-DDTSOUHc.js";
33
33
  import { S as vs } from "./stepper-progress-D6H8wQiV.js";
34
34
  import { S as bs } from "./slot-grid-Bb13H9Rl.js";
35
- import { p as he } from "./parseISO-DZZ5a-zK.js";
35
+ import { p as ge } from "./parseISO-DZZ5a-zK.js";
36
36
  import { C as ys } from "./chevron-down-DWE7GSq9.js";
37
- import { s as vt, f as Ht, d as hn } from "./format--x5jypvH.js";
38
- import { x as On, a as bt, b as nn, i as ks, s as Ct, m as Ss, y as qt } from "./date-picker-variants-Dt6UbonG.js";
37
+ import { s as vt, f as Ht, d as vn } from "./format--x5jypvH.js";
38
+ import { x as Dn, a as bt, b as nn, i as ks, s as Ct, m as Ss, y as qt } from "./date-picker-variants-Dt6UbonG.js";
39
39
  import { s as xs } from "./subDays-DKISP2nE.js";
40
40
  import { C as Is } from "./chevron-left-B8cOyH-V.js";
41
41
  import { C as Ns } from "./chevron-right-I9AeSxH2.js";
@@ -44,10 +44,10 @@ import { M as ws, S as Cs } from "./sun-Bj9Mr553.js";
44
44
  import { S as Ts } from "./stethoscope-sZXGC43m.js";
45
45
  import { H as As } from "./heart-pulse-BCppJyN2.js";
46
46
  import { E as Ds } from "./eye-BjhN2nYf.js";
47
- import { B as Os } from "./baby-Dku-Xvg9.js";
48
- import { S as Ms } from "./scan-line-CNseIHQ0.js";
49
- import { A as Es } from "./astroid-BN4f5VXU.js";
50
- import { C as Fs } from "./clipboard-check-BeAGxDVT.js";
47
+ import { B as Ms } from "./baby-Dku-Xvg9.js";
48
+ import { S as Os } from "./scan-line-CNseIHQ0.js";
49
+ import { A as Fs } from "./astroid-BN4f5VXU.js";
50
+ import { C as Es } from "./clipboard-check-BeAGxDVT.js";
51
51
  /**
52
52
  * @license lucide-react v1.22.0 - ISC
53
53
  *
@@ -69,7 +69,7 @@ const _s = [
69
69
  * This source code is licensed under the ISC license.
70
70
  * See the LICENSE file in the root directory of this source tree.
71
71
  */
72
- const Ls = [
72
+ const Bs = [
73
73
  [
74
74
  "path",
75
75
  {
@@ -77,7 +77,7 @@ const Ls = [
77
77
  key: "w610uw"
78
78
  }
79
79
  ]
80
- ], Bs = we("bone", Ls);
80
+ ], Ls = we("bone", Bs);
81
81
  /**
82
82
  * @license lucide-react v1.22.0 - ISC
83
83
  *
@@ -201,9 +201,9 @@ const er = [
201
201
  ["path", { d: "m9 11 4 4", key: "rovt3i" }],
202
202
  ["path", { d: "m5 19-3 3", key: "59f2uf" }],
203
203
  ["path", { d: "m14 4 6 6", key: "yqp9t2" }]
204
- ], vn = we("syringe", er);
204
+ ], bn = we("syringe", er);
205
205
  function tr(e, t, s) {
206
- return On(e, -1, s);
206
+ return Dn(e, -1, s);
207
207
  }
208
208
  const nr = {
209
209
  id: "booking",
@@ -285,7 +285,7 @@ const nr = {
285
285
  "email",
286
286
  "whatsapp",
287
287
  "sms"
288
- ], Ee = "all", sr = "de";
288
+ ], Fe = "all", sr = "de";
289
289
  function rr(e) {
290
290
  const t = e.lockedOperatorId;
291
291
  return [...t ? e.operatorsByService ? e.specialties.filter(
@@ -340,7 +340,7 @@ function or(e) {
340
340
  return [];
341
341
  }
342
342
  function ar(e, t) {
343
- const s = e.country === sr, i = !s || e.value.insuranceType !== void 0, a = (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && i, c = Qe(e.value).length > 0, m = !a || c, p = Ke(e.value).length > 0, f = !m || p, v = t.operators, h = !!e.allowOperatorSelection && f && p && !e.lockedOperatorId && v.length > 1, d = f && p, I = (!d || e.value.date !== void 0) && e.value.date !== void 0, F = (!I || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, N = p && v.length === 0;
343
+ const s = e.country === sr, i = !s || e.value.insuranceType !== void 0, a = (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && i, c = Qe(e.value).length > 0, m = !a || c, p = Ke(e.value).length > 0, f = !m || p, v = t.operators, h = !!e.allowOperatorSelection && f && p && !e.lockedOperatorId && v.length > 1, d = f && p, I = (!d || e.value.date !== void 0) && e.value.date !== void 0, E = (!I || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, N = p && v.length === 0;
344
344
  return {
345
345
  insurance: s,
346
346
  specialty: a,
@@ -348,7 +348,7 @@ function ar(e, t) {
348
348
  operator: h,
349
349
  date: d,
350
350
  slot: I,
351
- details: F,
351
+ details: E,
352
352
  onboardingIncomplete: N
353
353
  };
354
354
  }
@@ -418,7 +418,7 @@ function Mn(e, t) {
418
418
  details: void 0
419
419
  };
420
420
  }
421
- function En(e, t) {
421
+ function On(e, t) {
422
422
  return {
423
423
  ...e,
424
424
  specialtyId: t,
@@ -446,7 +446,7 @@ function Fn(e, t) {
446
446
  details: void 0
447
447
  };
448
448
  }
449
- function _n(e, t) {
449
+ function En(e, t) {
450
450
  return {
451
451
  ...e,
452
452
  serviceId: t,
@@ -454,27 +454,27 @@ function _n(e, t) {
454
454
  // Default the operator to the "All operators" sentinel so a patient
455
455
  // who doesn't care about picking lands on a satisfied step 4 without
456
456
  // any further input.
457
- operatorId: t ? Ee : void 0,
457
+ operatorId: t ? Fe : void 0,
458
458
  operatorIds: void 0,
459
459
  date: void 0,
460
460
  slotKey: void 0,
461
461
  details: void 0
462
462
  };
463
463
  }
464
- function Rn(e, t) {
464
+ function _n(e, t) {
465
465
  const s = !!t && t.length > 0;
466
466
  return {
467
467
  ...e,
468
468
  serviceId: void 0,
469
469
  serviceIds: t,
470
- operatorId: s ? Ee : void 0,
470
+ operatorId: s ? Fe : void 0,
471
471
  operatorIds: void 0,
472
472
  date: void 0,
473
473
  slotKey: void 0,
474
474
  details: void 0
475
475
  };
476
476
  }
477
- function Ln(e, t) {
477
+ function Rn(e, t) {
478
478
  return {
479
479
  ...e,
480
480
  operatorId: t,
@@ -512,7 +512,7 @@ function Zt(e, t) {
512
512
  // since the user has already filled some fields.
513
513
  };
514
514
  }
515
- function Pn(e, t) {
515
+ function Ln(e, t) {
516
516
  return {
517
517
  ...e,
518
518
  slotKey: t
@@ -524,12 +524,12 @@ function lr(e, t) {
524
524
  const r = Qe(s), a = r.length > 0 ? t.services.filter(
525
525
  (c) => c.specialtyId && r.includes(c.specialtyId)
526
526
  ) : t.services;
527
- a.length === 1 && s.serviceId === void 0 && s.serviceIds === void 0 && (s = { ...s, serviceId: a[0].id }, s.operatorId === void 0 && s.operatorIds === void 0 && (s = { ...s, operatorId: Ee }));
527
+ a.length === 1 && s.serviceId === void 0 && s.serviceIds === void 0 && (s = { ...s, serviceId: a[0].id }, s.operatorId === void 0 && s.operatorIds === void 0 && (s = { ...s, operatorId: Fe }));
528
528
  }
529
529
  return s;
530
530
  }
531
- function Vn(e) {
532
- if (e.operatorId && e.operatorId !== Ee)
531
+ function Pn(e) {
532
+ if (e.operatorId && e.operatorId !== Fe)
533
533
  return e.operatorId;
534
534
  }
535
535
  function ur(e) {
@@ -537,15 +537,15 @@ function ur(e) {
537
537
  const t = e.trim();
538
538
  return /^\+?\d[\d\s\-()]{6,}$/.test(t);
539
539
  }
540
- function ln(e) {
540
+ function un(e) {
541
541
  const t = e && e.length > 0 ? e : ["email"], s = new Set(t);
542
542
  return on.filter((i) => s.has(i));
543
543
  }
544
- function $n(e, t) {
544
+ function Vn(e, t) {
545
545
  return t ?? (e.length === 1 ? e : ["email"]);
546
546
  }
547
547
  function mr(e, t, s) {
548
- const i = ln(e), r = new Set(i);
548
+ const i = un(e), r = new Set(i);
549
549
  if (s)
550
550
  return on.filter(
551
551
  (p) => s.includes(p) && r.has(p)
@@ -567,11 +567,11 @@ const pr = /https?:\/\/(?:(?![.,;:!?'»›]https?:\/\/)[^\s<>"\u060C\u061B\u061F
567
567
  "'",
568
568
  "»",
569
569
  "›"
570
- ]), gr = { ")": "(", "]": "[", "}": "{" }, bn = (e, t) => e.split(t).length - 1;
570
+ ]), gr = { ")": "(", "]": "[", "}": "{" }, yn = (e, t) => e.split(t).length - 1;
571
571
  function hr(e) {
572
572
  const t = {};
573
573
  for (const [i, r] of Object.entries(gr))
574
- t[i] = bn(e, i) - bn(e, r);
574
+ t[i] = yn(e, i) - yn(e, r);
575
575
  let s = e.length;
576
576
  for (; s > 0; ) {
577
577
  const i = e[s - 1];
@@ -611,7 +611,7 @@ function Sr(e) {
611
611
  }
612
612
  return i(e.slice(s)), t;
613
613
  }
614
- const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 300, sn = "ds:rounded-[var(--radius-sm)] ds:underline ds:text-[var(--foreground)] ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]", zt = (e) => e && /^https?:\/\//i.test(e) ? e : void 0, Nr = (e, t) => ({
614
+ const kn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Sn = 300, sn = "ds:rounded-[var(--radius-sm)] ds:underline ds:text-[var(--foreground)] ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]", zt = (e) => e && /^https?:\/\//i.test(e) ? e : void 0, Nr = (e, t) => ({
615
615
  street: (e == null ? void 0 : e.address.line1) ?? "",
616
616
  city: (e == null ? void 0 : e.address.city) ?? "",
617
617
  postcode: (e == null ? void 0 : e.address.postalCode) ?? "",
@@ -637,16 +637,16 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
637
637
  }
638
638
  },
639
639
  defaultVariants: { noticeStyle: "highlighted" }
640
- }), Tr = ["it", "ch", "de", "at", "fr", "sm"], J = {
640
+ }), Tr = ["it", "ch", "de", "at", "fr", "sm"], H = {
641
641
  country: "billing.country",
642
642
  street: "billing.street",
643
643
  city: "billing.city",
644
644
  postcode: "billing.postcode",
645
645
  province: "billing.province"
646
- }, qn = /^\d{5}$/, Ar = (e) => {
646
+ }, $n = /^\d{5}$/, Ar = (e) => {
647
647
  if (!e) return !1;
648
648
  const { line1: t, city: s, postalCode: i, country: r, state: a } = e.address;
649
- return !t.trim() || !s.trim() || !i.trim() || !r.trim() ? !1 : r.toUpperCase() !== "IT" ? !0 : !!a.trim() && qn.test(i.trim());
649
+ return !t.trim() || !s.trim() || !i.trim() || !r.trim() ? !1 : r.toUpperCase() !== "IT" ? !0 : !!a.trim() && $n.test(i.trim());
650
650
  }, Dr = (e, t) => {
651
651
  var s;
652
652
  return {
@@ -660,7 +660,7 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
660
660
  country: e.address.country.trim().toUpperCase()
661
661
  }
662
662
  };
663
- }, Kt = { state: "idle" }, Sn = [
663
+ }, Kt = { state: "idle" }, xn = [
664
664
  "firstName",
665
665
  "lastName",
666
666
  "email",
@@ -668,12 +668,12 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
668
668
  "codiceFiscale",
669
669
  "dateOfBirth",
670
670
  "insuranceNumber",
671
- J.country,
672
- J.street,
673
- J.city,
674
- J.postcode,
675
- J.province
676
- ], Or = /* @__PURE__ */ new Set(), un = wn(
671
+ H.country,
672
+ H.street,
673
+ H.city,
674
+ H.postcode,
675
+ H.province
676
+ ], Mr = /* @__PURE__ */ new Set(), mn = Nn(
677
677
  ({
678
678
  value: e,
679
679
  onChange: t,
@@ -692,51 +692,51 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
692
692
  payment: g,
693
693
  paymentTermsUrl: I,
694
694
  paymentBlocked: u = !1,
695
- billingInDetails: F = !1,
695
+ billingInDetails: E = !1,
696
696
  paymentNoticeStyle: N = "highlighted",
697
697
  criticalInformationToAccept: w,
698
698
  validateCodiceFiscale: x,
699
- validateInsuranceNumber: A,
699
+ validateInsuranceNumber: O,
700
700
  submitting: _ = !1,
701
701
  locked: R = !1,
702
702
  summarySlot: b,
703
703
  defaultPhoneCountry: C,
704
704
  confirmationChannels: V,
705
- defaultConfirmationChannels: D,
706
- singleConfirmationChannel: B = !1,
705
+ defaultConfirmationChannels: A,
706
+ singleConfirmationChannel: L = !1,
707
707
  submitError: P
708
- }, O) => {
708
+ }, D) => {
709
709
  var xt, It, Nt, wt, T;
710
- const { t: y, i18n: X } = Q("ui"), ee = at(), Fe = M(null), _e = ye(
710
+ const { t: y, i18n: X } = Q("ui"), ee = at(), Ee = M(null), _e = be(
711
711
  (o) => {
712
- Fe.current = o, typeof O == "function" ? O(o) : O && (O.current = o);
712
+ Ee.current = o, typeof D == "function" ? D(o) : D && (D.current = o);
713
713
  },
714
- [O]
715
- ), [E, K] = H(0);
714
+ [D]
715
+ ), [F, W] = U(0);
716
716
  z(() => {
717
717
  var S;
718
- if (E === 0) return;
719
- const o = (S = Fe.current) == null ? void 0 : S.querySelectorAll(
718
+ if (F === 0) return;
719
+ const o = (S = Ee.current) == null ? void 0 : S.querySelectorAll(
720
720
  '[aria-invalid="true"], [role="checkbox"][aria-required="true"][aria-checked="false"], [data-unanswered] [role="checkbox"]'
721
721
  );
722
- for (const L of o ?? [])
723
- if (L.focus(), document.activeElement === L) return;
724
- }, [E]);
725
- const G = M(!1), [te, Re] = H(!1), [et, ve] = H(!1), se = _ || te, [fe, ke] = H(Kt), [Se, Ce] = H(Kt), [de, Le] = H({}), ne = ye(
726
- (o) => Le((S) => ({ ...S, [o]: !0 })),
722
+ for (const B of o ?? [])
723
+ if (B.focus(), document.activeElement === B) return;
724
+ }, [F]);
725
+ const Y = M(!1), [te, Re] = U(!1), [et, he] = U(!1), se = _ || te, [fe, ye] = U(Kt), [ke, Ce] = U(Kt), [de, Be] = U({}), ne = be(
726
+ (o) => Be((S) => ({ ...S, [o]: !0 })),
727
727
  []
728
- ), [ue, At] = H(Or), Be = M(null), tt = M(
728
+ ), [ue, At] = U(Mr), Le = M(null), tt = M(
729
729
  null
730
730
  );
731
731
  z(
732
732
  () => () => {
733
- Be.current && clearTimeout(Be.current), tt.current && clearTimeout(tt.current);
733
+ Le.current && clearTimeout(Le.current), tt.current && clearTimeout(tt.current);
734
734
  },
735
735
  []
736
736
  );
737
- const j = ye(
737
+ const K = be(
738
738
  (o) => {
739
- ve(!1), t({ ...e, ...o });
739
+ he(!1), t({ ...e, ...o });
740
740
  },
741
741
  [e, t]
742
742
  ), Te = g ? JSON.stringify([
@@ -745,140 +745,140 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
745
745
  g.amountCents,
746
746
  g.currencyCode,
747
747
  I
748
- ]) : void 0, [Qt, je] = H(
748
+ ]) : void 0, [Qt, je] = U(
749
749
  () => e.paymentAccepted ? Te : void 0
750
750
  ), Dt = M(Te), ct = !!(g && e.paymentAccepted && Qt === Te);
751
751
  z(() => {
752
- Dt.current !== Te && (Dt.current = Te, je(void 0), e.paymentAccepted !== void 0 && j({ paymentAccepted: g ? !1 : void 0 }));
753
- }, [Te, g, j, e.paymentAccepted]);
752
+ Dt.current !== Te && (Dt.current = Te, je(void 0), e.paymentAccepted !== void 0 && K({ paymentAccepted: g ? !1 : void 0 }));
753
+ }, [Te, g, K, e.paymentAccepted]);
754
754
  const Ue = typeof (d == null ? void 0 : d.label) == "string" && d.label.trim() !== "", Ae = d && Ue ? JSON.stringify([
755
755
  d.label,
756
756
  d.url ?? null,
757
757
  d.required
758
- ]) : void 0, [en, ce] = H(
758
+ ]) : void 0, [en, ce] = U(
759
759
  () => e.practiceConsentAccepted ? Ae : void 0
760
- ), Ot = M(Ae), me = !!(Ae !== void 0 && e.practiceConsentAccepted && en === Ae);
760
+ ), Mt = M(Ae), me = !!(Ae !== void 0 && e.practiceConsentAccepted && en === Ae);
761
761
  z(() => {
762
- Ot.current !== Ae && (Ot.current = Ae, ce(void 0), e.practiceConsentAccepted !== void 0 && j({ practiceConsentAccepted: void 0 }));
763
- }, [Ae, j, e.practiceConsentAccepted]);
764
- const Pe = g ? Wt(g.amountCents, g.currencyCode, X.language) : "", De = zt(I), be = F && !!g && !u, $ = a, dt = (C || "it").toLowerCase(), nt = !be || Ar(e.billing), st = Nr(e.billing, dt), le = st.country === "it", Oe = M(null), He = M(
762
+ Mt.current !== Ae && (Mt.current = Ae, ce(void 0), e.practiceConsentAccepted !== void 0 && K({ practiceConsentAccepted: void 0 }));
763
+ }, [Ae, K, e.practiceConsentAccepted]);
764
+ const Pe = g ? Wt(g.amountCents, g.currencyCode, X.language) : "", De = zt(I), ve = E && !!g && !u, $ = a, dt = (C || "it").toLowerCase(), nt = !ve || Ar(e.billing), st = Nr(e.billing, dt), le = st.country === "it", Me = M(null), He = M(
765
765
  null
766
- ), Ge = (xt = e.billing) == null ? void 0 : xt.address.line1.trim(), ge = ((Nt = (It = e.billing) == null ? void 0 : It.address.line2) == null ? void 0 : Nt.trim()) || null;
766
+ ), Ge = (xt = e.billing) == null ? void 0 : xt.address.line1.trim(), Se = ((Nt = (It = e.billing) == null ? void 0 : It.address.line2) == null ? void 0 : Nt.trim()) || null;
767
767
  z(() => {
768
768
  var o;
769
- Ge !== void 0 && ge ? He.current = { street: Ge, line2: ge } : (Ge === void 0 || Ge === ((o = He.current) == null ? void 0 : o.street)) && (He.current = null);
770
- }, [Ge, ge]);
769
+ Ge !== void 0 && Se ? He.current = { street: Ge, line2: Se } : (Ge === void 0 || Ge === ((o = He.current) == null ? void 0 : o.street)) && (He.current = null);
770
+ }, [Ge, Se]);
771
771
  const Ve = (o) => (
772
772
  // Nothing for a block not shown, nor for a province outside Italy.
773
- !be || !de[J[o]] || o === "province" && !le ? void 0 : st[o].trim() ? (
773
+ !ve || !de[H[o]] || o === "province" && !le ? void 0 : st[o].trim() ? (
774
774
  // The one format the block itself checks: an Italian CAP.
775
- o === "postcode" && le && !qn.test(st.postcode.trim()) ? y("inputs.postalCode.invalid") : void 0
775
+ o === "postcode" && le && !$n.test(st.postcode.trim()) ? y("inputs.postalCode.invalid") : void 0
776
776
  ) : y("booking.details.fieldRequired")
777
- ), Mt = ye(
778
- () => Le(
779
- (o) => o[J.province] ? o : {
777
+ ), Ot = be(
778
+ () => Be(
779
+ (o) => o[H.province] ? o : {
780
780
  ...o,
781
781
  codiceFiscale: !0,
782
782
  ...Object.fromEntries(
783
- Object.values(J).map((S) => [S, !0])
783
+ Object.values(H).map((S) => [S, !0])
784
784
  )
785
785
  }
786
786
  ),
787
787
  []
788
- ), Me = q(
789
- () => ln(V),
788
+ ), Oe = q(
789
+ () => un(V),
790
790
  [V]
791
- ), $e = !g && !u && Me.length >= 2, Je = M(!1);
791
+ ), $e = !g && !u && Oe.length >= 2, Je = M(!1);
792
792
  z(() => {
793
793
  if (g || u) return;
794
794
  if (!$e) {
795
- e.confirmationChannels !== void 0 && j({ confirmationChannels: void 0 });
795
+ e.confirmationChannels !== void 0 && K({ confirmationChannels: void 0 });
796
796
  return;
797
797
  }
798
798
  if (e.confirmationChannels !== void 0) {
799
- Je.current = !0, B && e.confirmationChannels.length > 1 && j({
799
+ Je.current = !0, L && e.confirmationChannels.length > 1 && K({
800
800
  confirmationChannels: e.confirmationChannels.slice(0, 1)
801
801
  });
802
802
  return;
803
803
  }
804
- const o = B ? [
805
- (D == null ? void 0 : D.find(
806
- (S) => Me.includes(S)
807
- )) ?? Me[0]
804
+ const o = L ? [
805
+ (A == null ? void 0 : A.find(
806
+ (S) => Oe.includes(S)
807
+ )) ?? Oe[0]
808
808
  ] : mr(
809
- Me,
809
+ Oe,
810
810
  e.mobilePhone,
811
- D
811
+ A
812
812
  );
813
- Je.current = !0, j({ confirmationChannels: o });
813
+ Je.current = !0, K({ confirmationChannels: o });
814
814
  }, [
815
815
  $e,
816
816
  g,
817
817
  u,
818
- Me,
818
+ Oe,
819
819
  e.mobilePhone,
820
- D,
821
- B
820
+ A,
821
+ L
822
822
  ]);
823
823
  const xe = q(
824
824
  () => e.confirmationChannels ?? [],
825
825
  [e.confirmationChannels]
826
- ), U = $e && xe.length === 0, W = $n(
827
- Me,
826
+ ), j = $e && xe.length === 0, G = Vn(
827
+ Oe,
828
828
  $e ? xe : void 0
829
- ), lt = !r || W.includes("email"), rt = M(x), ut = M(A);
829
+ ), lt = !r || G.includes("email"), rt = M(x), ut = M(O);
830
830
  z(() => {
831
- rt.current = x, ut.current = A;
832
- }, [x, A]);
833
- const Et = !!x, Ft = !!A;
831
+ rt.current = x, ut.current = O;
832
+ }, [x, O]);
833
+ const Ft = !!x, Et = !!O;
834
834
  z(() => {
835
835
  const o = e.codiceFiscale;
836
- if (!$ || !Et || !o) {
837
- ke(Kt);
836
+ if (!$ || !Ft || !o) {
837
+ ye(Kt);
838
838
  return;
839
839
  }
840
840
  if (!xr.test(o)) {
841
- ke({
841
+ ye({
842
842
  state: "invalid",
843
843
  hint: y("booking.details.codiceFiscale.invalidFormat")
844
844
  });
845
845
  return;
846
846
  }
847
- ke({ state: "pending" });
847
+ ye({ state: "pending" });
848
848
  let S = !0;
849
- return Be.current && clearTimeout(Be.current), Be.current = setTimeout(async () => {
849
+ return Le.current && clearTimeout(Le.current), Le.current = setTimeout(async () => {
850
850
  try {
851
- const L = rt.current;
852
- if (!L) return;
853
- const Z = await L(o);
854
- S && ke({
851
+ const B = rt.current;
852
+ if (!B) return;
853
+ const Z = await B(o);
854
+ S && ye({
855
855
  state: Z.valid ? "valid" : "invalid",
856
856
  hint: Z.hint,
857
857
  value: o
858
858
  });
859
859
  } catch {
860
- S && ke({
860
+ S && ye({
861
861
  state: "invalid",
862
862
  hint: y("booking.details.codiceFiscale.unavailable"),
863
863
  value: o
864
864
  });
865
865
  }
866
- }, kn), () => {
867
- S = !1, Be.current && clearTimeout(Be.current);
866
+ }, Sn), () => {
867
+ S = !1, Le.current && clearTimeout(Le.current);
868
868
  };
869
- }, [$, Et, e.codiceFiscale, y]);
869
+ }, [$, Ft, e.codiceFiscale, y]);
870
870
  const We = l && m === "public";
871
871
  z(() => {
872
872
  const o = e.insuranceNumber;
873
- if (!We || !Ft || !o) {
873
+ if (!We || !Et || !o) {
874
874
  Ce(Kt);
875
875
  return;
876
876
  }
877
877
  Ce({ state: "pending" }), tt.current && clearTimeout(tt.current), tt.current = setTimeout(() => {
878
878
  const S = ut.current;
879
879
  S && S(o).then(
880
- (L) => Ce(
881
- L.valid ? { state: "valid" } : { state: "invalid", hint: L.hint }
880
+ (B) => Ce(
881
+ B.valid ? { state: "valid" } : { state: "invalid", hint: B.hint }
882
882
  )
883
883
  ).catch(
884
884
  () => Ce({
@@ -886,8 +886,8 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
886
886
  hint: y("booking.details.insuranceNumber.unavailable")
887
887
  })
888
888
  );
889
- }, kn);
890
- }, [We, Ft, e.insuranceNumber, y]);
889
+ }, Sn);
890
+ }, [We, Et, e.insuranceNumber, y]);
891
891
  const mt = q(() => {
892
892
  var S;
893
893
  if (i) return !0;
@@ -898,7 +898,7 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
898
898
  [e.mobilePhone]
899
899
  ), _t = q(() => {
900
900
  var o, S;
901
- return !(!((o = e.firstName) != null && o.trim()) || !((S = e.lastName) != null && S.trim()) || !mt || !pt || $ && (fe.state !== "valid" || fe.value !== e.codiceFiscale) || !nt || c && !e.dateOfBirth || We && Se.state !== "valid");
901
+ return !(!((o = e.firstName) != null && o.trim()) || !((S = e.lastName) != null && S.trim()) || !mt || !pt || $ && (fe.state !== "valid" || fe.value !== e.codiceFiscale) || !nt || c && !e.dateOfBirth || We && ke.state !== "valid");
902
902
  }, [
903
903
  e.firstName,
904
904
  e.lastName,
@@ -912,33 +912,33 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
912
912
  c,
913
913
  e.dateOfBirth,
914
914
  We,
915
- Se.state
916
- ]), ft = w != null && w.trim() ? w : void 0, Ye = ft !== void 0, Rt = !Ye || !!e.criticalInformationAccepted, Ze = !Ue || !(d != null && d.required) || me, Lt = !!(e.privacyConsent && e.termsConsent && Rt && Ze), tn = !$e || xe.length > 0, pe = _t && Lt && tn && (!g || ct) && !u && !se, Bt = !pe && !se && !u, gt = `${ee}-submit-hint`, re = {
915
+ ke.state
916
+ ]), ft = w != null && w.trim() ? w : void 0, Ye = ft !== void 0, Rt = !Ye || !!e.criticalInformationAccepted, Ze = !Ue || !(d != null && d.required) || me, Bt = !!(e.privacyConsent && e.termsConsent && Rt && Ze), tn = !$e || xe.length > 0, pe = _t && Bt && tn && (!g || ct) && !u && !se, Lt = !pe && !se && !u, gt = `${ee}-submit-hint`, re = {
917
917
  firstName: de.firstName && !((wt = e.firstName) != null && wt.trim()) ? y("booking.details.firstName.required") : void 0,
918
918
  lastName: de.lastName && !((T = e.lastName) != null && T.trim()) ? y("booking.details.lastName.required") : void 0,
919
919
  email: !i && de.email && !mt ? y("booking.details.email.invalid") : void 0,
920
920
  mobilePhone: de.mobilePhone && !pt ? y("booking.details.mobilePhone.invalid") : void 0,
921
921
  codiceFiscale: de.codiceFiscale && fe.state === "invalid" ? fe.hint ?? y("booking.details.codiceFiscale.invalid") : de.codiceFiscale && !e.codiceFiscale ? y("booking.details.fieldRequired") : void 0,
922
922
  dateOfBirth: de.dateOfBirth && !e.dateOfBirth ? y("booking.details.dateOfBirth.required") : void 0,
923
- insuranceNumber: de.insuranceNumber && Se.state === "invalid" ? Se.hint ?? y("booking.details.insuranceNumber.invalid") : void 0,
924
- [J.country]: Ve("country"),
925
- [J.street]: Ve("street"),
926
- [J.city]: Ve("city"),
927
- [J.postcode]: Ve("postcode"),
928
- [J.province]: Ve("province")
929
- }, Xe = Sn.filter(
923
+ insuranceNumber: de.insuranceNumber && ke.state === "invalid" ? ke.hint ?? y("booking.details.insuranceNumber.invalid") : void 0,
924
+ [H.country]: Ve("country"),
925
+ [H.street]: Ve("street"),
926
+ [H.city]: Ve("city"),
927
+ [H.postcode]: Ve("postcode"),
928
+ [H.province]: Ve("province")
929
+ }, Xe = xn.filter(
930
930
  (o) => ue.has(o) && re[o] !== void 0
931
931
  );
932
932
  Xe.length !== ue.size && At(new Set(Xe));
933
- const Y = (o) => !ue.has(o), it = async (o) => {
934
- var L;
935
- if (o.preventDefault(), !se && !G.current && !pe && At(
933
+ const J = (o) => !ue.has(o), it = async (o) => {
934
+ var B;
935
+ if (o.preventDefault(), !se && !Y.current && !pe && At(
936
936
  new Set(
937
- Sn.filter(
937
+ xn.filter(
938
938
  (Z) => ue.has(Z) || !re[Z]
939
939
  )
940
940
  )
941
- ), Le({
941
+ ), Be({
942
942
  firstName: !0,
943
943
  lastName: !0,
944
944
  email: !i,
@@ -947,17 +947,17 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
947
947
  dateOfBirth: !0,
948
948
  insuranceNumber: !0,
949
949
  ...Object.fromEntries(
950
- Object.values(J).map((Z) => [Z, !0])
950
+ Object.values(H).map((Z) => [Z, !0])
951
951
  )
952
- }), se || G.current) return;
952
+ }), se || Y.current) return;
953
953
  if (!pe) {
954
- K((Z) => Z + 1);
954
+ W((Z) => Z + 1);
955
955
  return;
956
956
  }
957
957
  const S = {
958
958
  firstName: e.firstName.trim(),
959
959
  lastName: e.lastName.trim(),
960
- ...!i && ((L = e.email) != null && L.trim()) ? { email: e.email.trim() } : {},
960
+ ...!i && ((B = e.email) != null && B.trim()) ? { email: e.email.trim() } : {},
961
961
  mobilePhone: e.mobilePhone,
962
962
  privacyConsent: !0,
963
963
  termsConsent: !0,
@@ -977,20 +977,20 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
977
977
  // implicit channel is inferred backend-side from the practice
978
978
  // config.
979
979
  confirmationChannels: $e ? xe : void 0,
980
- ...be && e.billing ? {
980
+ ...ve && e.billing ? {
981
981
  billing: Dr(
982
982
  e.billing,
983
983
  `${e.firstName.trim()} ${e.lastName.trim()}`
984
984
  )
985
985
  } : {}
986
986
  };
987
- G.current = !0, Re(!0), ve(!1);
987
+ Y.current = !0, Re(!0), he(!1);
988
988
  try {
989
989
  await s(S);
990
990
  } catch {
991
- ve(!0);
991
+ he(!0);
992
992
  } finally {
993
- G.current = !1, Re(!1);
993
+ Y.current = !1, Re(!1);
994
994
  }
995
995
  }, Pt = /* @__PURE__ */ n(
996
996
  qe,
@@ -999,13 +999,13 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
999
999
  required: !0,
1000
1000
  description: fe.state === "pending" ? y("booking.details.codiceFiscale.checking") : y("booking.details.codiceFiscale.helper"),
1001
1001
  error: re.codiceFiscale,
1002
- announceError: Y("codiceFiscale"),
1002
+ announceError: J("codiceFiscale"),
1003
1003
  children: /* @__PURE__ */ n(
1004
1004
  $t,
1005
1005
  {
1006
1006
  value: e.codiceFiscale ?? "",
1007
1007
  maxLength: 16,
1008
- onChange: (o) => j({
1008
+ onChange: (o) => K({
1009
1009
  codiceFiscale: o.target.value.slice(0, 16).toUpperCase()
1010
1010
  }),
1011
1011
  onBlur: () => ne("codiceFiscale")
@@ -1013,9 +1013,9 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1013
1013
  )
1014
1014
  }
1015
1015
  ), St = (o, S) => {
1016
- const L = zt(S);
1017
- return L ? /* @__PURE__ */ n(
1018
- Cn,
1016
+ const B = zt(S);
1017
+ return B ? /* @__PURE__ */ n(
1018
+ wn,
1019
1019
  {
1020
1020
  ns: "ui",
1021
1021
  i18nKey: o,
@@ -1030,7 +1030,7 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1030
1030
  /* @__PURE__ */ n(
1031
1031
  "a",
1032
1032
  {
1033
- href: L,
1033
+ href: B,
1034
1034
  target: "_blank",
1035
1035
  rel: "noopener noreferrer",
1036
1036
  className: sn
@@ -1049,8 +1049,8 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1049
1049
  noValidate: !0,
1050
1050
  onSubmit: it,
1051
1051
  onFocus: (o) => {
1052
- const S = Oe.current;
1053
- !S || !o.currentTarget.contains(o.target) || !S.contains(o.target) && S.compareDocumentPosition(o.target) & Node.DOCUMENT_POSITION_FOLLOWING && Mt();
1052
+ const S = Me.current;
1053
+ !S || !o.currentTarget.contains(o.target) || !S.contains(o.target) && S.compareDocumentPosition(o.target) & Node.DOCUMENT_POSITION_FOLLOWING && Ot();
1054
1054
  },
1055
1055
  "aria-busy": se || void 0,
1056
1056
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
@@ -1063,13 +1063,13 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1063
1063
  label: y("booking.details.firstName.label"),
1064
1064
  required: !0,
1065
1065
  error: re.firstName,
1066
- announceError: Y("firstName"),
1066
+ announceError: J("firstName"),
1067
1067
  children: /* @__PURE__ */ n(
1068
1068
  $t,
1069
1069
  {
1070
1070
  autoComplete: "given-name",
1071
1071
  value: e.firstName ?? "",
1072
- onChange: (o) => j({ firstName: o.target.value }),
1072
+ onChange: (o) => K({ firstName: o.target.value }),
1073
1073
  onBlur: () => ne("firstName")
1074
1074
  }
1075
1075
  )
@@ -1081,13 +1081,13 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1081
1081
  label: y("booking.details.lastName.label"),
1082
1082
  required: !0,
1083
1083
  error: re.lastName,
1084
- announceError: Y("lastName"),
1084
+ announceError: J("lastName"),
1085
1085
  children: /* @__PURE__ */ n(
1086
1086
  $t,
1087
1087
  {
1088
1088
  autoComplete: "family-name",
1089
1089
  value: e.lastName ?? "",
1090
- onChange: (o) => j({ lastName: o.target.value }),
1090
+ onChange: (o) => K({ lastName: o.target.value }),
1091
1091
  onBlur: () => ne("lastName")
1092
1092
  }
1093
1093
  )
@@ -1105,13 +1105,13 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1105
1105
  label: y("booking.details.email.label"),
1106
1106
  ...lt ? { required: !0 } : { optional: !0 },
1107
1107
  error: re.email,
1108
- announceError: Y("email"),
1108
+ announceError: J("email"),
1109
1109
  children: /* @__PURE__ */ n(
1110
1110
  cs,
1111
1111
  {
1112
1112
  disableBuiltInValidation: r,
1113
1113
  value: e.email ?? "",
1114
- onChange: (o) => j({ email: o.target.value }),
1114
+ onChange: (o) => K({ email: o.target.value }),
1115
1115
  onBlur: () => ne("email")
1116
1116
  }
1117
1117
  )
@@ -1123,14 +1123,14 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1123
1123
  label: y("booking.details.mobilePhone.label"),
1124
1124
  required: !0,
1125
1125
  error: re.mobilePhone,
1126
- announceError: Y("mobilePhone"),
1126
+ announceError: J("mobilePhone"),
1127
1127
  children: /* @__PURE__ */ n(
1128
1128
  ds,
1129
1129
  {
1130
1130
  value: e.mobilePhone ?? "",
1131
1131
  defaultCountry: C == null ? void 0 : C.toUpperCase(),
1132
1132
  onChange: (o) => {
1133
- j({ mobilePhone: o }), ne("mobilePhone");
1133
+ K({ mobilePhone: o }), ne("mobilePhone");
1134
1134
  }
1135
1135
  }
1136
1136
  )
@@ -1139,21 +1139,21 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1139
1139
  ]
1140
1140
  }
1141
1141
  ),
1142
- $ && !be || c ? /* @__PURE__ */ k("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
1143
- $ && !be ? Pt : null,
1142
+ $ && !ve || c ? /* @__PURE__ */ k("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
1143
+ $ && !ve ? Pt : null,
1144
1144
  c ? /* @__PURE__ */ n(
1145
1145
  qe,
1146
1146
  {
1147
1147
  label: y("booking.details.dateOfBirth.label"),
1148
1148
  required: !0,
1149
1149
  error: re.dateOfBirth,
1150
- announceError: Y("dateOfBirth"),
1150
+ announceError: J("dateOfBirth"),
1151
1151
  children: /* @__PURE__ */ n(
1152
1152
  as,
1153
1153
  {
1154
1154
  value: e.dateOfBirth ? new Date(e.dateOfBirth) : void 0,
1155
1155
  onChange: (o) => {
1156
- j({
1156
+ K({
1157
1157
  dateOfBirth: o ? o.toISOString().slice(0, 10) : void 0
1158
1158
  }), ne("dateOfBirth");
1159
1159
  }
@@ -1167,32 +1167,32 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1167
1167
  {
1168
1168
  label: y("booking.details.insuranceNumber.label"),
1169
1169
  required: !0,
1170
- description: Se.state === "pending" ? y("booking.details.insuranceNumber.checking") : void 0,
1170
+ description: ke.state === "pending" ? y("booking.details.insuranceNumber.checking") : void 0,
1171
1171
  error: re.insuranceNumber,
1172
- announceError: Y("insuranceNumber"),
1172
+ announceError: J("insuranceNumber"),
1173
1173
  children: /* @__PURE__ */ n(
1174
1174
  $t,
1175
1175
  {
1176
1176
  value: e.insuranceNumber ?? "",
1177
- onChange: (o) => j({ insuranceNumber: o.target.value }),
1177
+ onChange: (o) => K({ insuranceNumber: o.target.value }),
1178
1178
  onBlur: () => ne("insuranceNumber")
1179
1179
  }
1180
1180
  )
1181
1181
  }
1182
1182
  ) : null,
1183
- be ? /* @__PURE__ */ k(
1183
+ ve ? /* @__PURE__ */ k(
1184
1184
  "div",
1185
1185
  {
1186
- ref: Oe,
1186
+ ref: Me,
1187
1187
  "data-component": "booking-billing",
1188
1188
  role: "group",
1189
1189
  "aria-labelledby": `${ee}-billing-heading`,
1190
1190
  "aria-describedby": `${ee}-billing-intro`,
1191
1191
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-md)] ds:border ds:border-[var(--border)] ds:p-[var(--spacing-sm)]",
1192
1192
  onBlur: (o) => {
1193
- var L;
1194
- const S = (L = o.target.closest("[data-address-field]")) == null ? void 0 : L.getAttribute("data-address-field");
1195
- (S === "street" || S === "city" || S === "postcode") && ne(J[S]);
1193
+ var B;
1194
+ const S = (B = o.target.closest("[data-address-field]")) == null ? void 0 : B.getAttribute("data-address-field");
1195
+ (S === "street" || S === "city" || S === "postcode") && ne(H[S]);
1196
1196
  },
1197
1197
  children: [
1198
1198
  /* @__PURE__ */ k("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
@@ -1222,7 +1222,7 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1222
1222
  var S;
1223
1223
  return (
1224
1224
  // The name is set from the patient's own on submit.
1225
- j({
1225
+ K({
1226
1226
  billing: wr(
1227
1227
  o,
1228
1228
  "",
@@ -1238,18 +1238,18 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1238
1238
  fields: le ? void 0 : ["street", "city", "postcode"],
1239
1239
  required: le ? ["country", "street", "city", "postcode", "province"] : ["country", "street", "city", "postcode"],
1240
1240
  errors: {
1241
- country: re[J.country],
1242
- street: re[J.street],
1243
- city: re[J.city],
1244
- postcode: re[J.postcode],
1245
- province: re[J.province]
1241
+ country: re[H.country],
1242
+ street: re[H.street],
1243
+ city: re[H.city],
1244
+ postcode: re[H.postcode],
1245
+ province: re[H.province]
1246
1246
  },
1247
1247
  announceErrors: {
1248
- country: Y(J.country),
1249
- street: Y(J.street),
1250
- city: Y(J.city),
1251
- postcode: Y(J.postcode),
1252
- province: Y(J.province)
1248
+ country: J(H.country),
1249
+ street: J(H.street),
1250
+ city: J(H.city),
1251
+ postcode: J(H.postcode),
1252
+ province: J(H.province)
1253
1253
  }
1254
1254
  }
1255
1255
  )
@@ -1261,15 +1261,15 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1261
1261
  {
1262
1262
  label: y("booking.details.note.label"),
1263
1263
  description: y("booking.details.note.helper", {
1264
- max: yn
1264
+ max: kn
1265
1265
  }),
1266
1266
  children: /* @__PURE__ */ n(
1267
1267
  ls,
1268
1268
  {
1269
1269
  value: e.note ?? "",
1270
- maxLength: yn,
1270
+ maxLength: kn,
1271
1271
  rows: 3,
1272
- onChange: (o) => j({ note: o.target.value })
1272
+ onChange: (o) => K({ note: o.target.value })
1273
1273
  }
1274
1274
  )
1275
1275
  }
@@ -1278,7 +1278,7 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1278
1278
  ht,
1279
1279
  {
1280
1280
  checked: !!e.returningPatient,
1281
- onCheckedChange: (o) => j({ returningPatient: o === !0 }),
1281
+ onCheckedChange: (o) => K({ returningPatient: o === !0 }),
1282
1282
  label: y("booking.details.returningPatient.label")
1283
1283
  }
1284
1284
  ) : null,
@@ -1323,7 +1323,7 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1323
1323
  ht,
1324
1324
  {
1325
1325
  checked: !!e.criticalInformationAccepted,
1326
- onCheckedChange: (o) => j({ criticalInformationAccepted: o === !0 }),
1326
+ onCheckedChange: (o) => K({ criticalInformationAccepted: o === !0 }),
1327
1327
  "aria-required": !0,
1328
1328
  label: /* @__PURE__ */ k(oe, { children: [
1329
1329
  y("booking.details.criticalInformation.accept"),
@@ -1396,7 +1396,7 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1396
1396
  onCheckedChange: (o) => {
1397
1397
  je(
1398
1398
  o === !0 ? Te : void 0
1399
- ), j({ paymentAccepted: o === !0 });
1399
+ ), K({ paymentAccepted: o === !0 });
1400
1400
  },
1401
1401
  "aria-required": !0,
1402
1402
  label: /* @__PURE__ */ k(oe, { children: [
@@ -1420,7 +1420,7 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1420
1420
  ht,
1421
1421
  {
1422
1422
  checked: !!e.privacyConsent,
1423
- onCheckedChange: (o) => j({ privacyConsent: o === !0 }),
1423
+ onCheckedChange: (o) => K({ privacyConsent: o === !0 }),
1424
1424
  "aria-required": !0,
1425
1425
  label: /* @__PURE__ */ k(oe, { children: [
1426
1426
  St(
@@ -1442,7 +1442,7 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1442
1442
  ht,
1443
1443
  {
1444
1444
  checked: !!e.termsConsent,
1445
- onCheckedChange: (o) => j({ termsConsent: o === !0 }),
1445
+ onCheckedChange: (o) => K({ termsConsent: o === !0 }),
1446
1446
  "aria-required": !0,
1447
1447
  label: /* @__PURE__ */ k(oe, { children: [
1448
1448
  St(
@@ -1467,7 +1467,7 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1467
1467
  onCheckedChange: (o) => {
1468
1468
  ce(
1469
1469
  o === !0 ? Ae : void 0
1470
- ), j({ practiceConsentAccepted: o === !0 });
1470
+ ), K({ practiceConsentAccepted: o === !0 });
1471
1471
  },
1472
1472
  "aria-required": d.required || void 0,
1473
1473
  label: /* @__PURE__ */ k(oe, { children: [
@@ -1498,19 +1498,19 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1498
1498
  "div",
1499
1499
  {
1500
1500
  "data-component": "booking-confirmation-channels",
1501
- "data-unanswered": U || void 0,
1501
+ "data-unanswered": j || void 0,
1502
1502
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
1503
- children: B ? /* @__PURE__ */ n(
1503
+ children: L ? /* @__PURE__ */ n(
1504
1504
  os,
1505
1505
  {
1506
1506
  variant: "horizontal",
1507
1507
  label: y("booking.confirmation.heading"),
1508
1508
  value: xe[0] ?? "",
1509
- onValueChange: (o) => j({
1509
+ onValueChange: (o) => K({
1510
1510
  confirmationChannels: [o]
1511
1511
  }),
1512
- error: U ? y("booking.confirmation.atLeastOne") : void 0,
1513
- children: Me.map((o) => /* @__PURE__ */ n(
1512
+ error: j ? y("booking.confirmation.atLeastOne") : void 0,
1513
+ children: Oe.map((o) => /* @__PURE__ */ n(
1514
1514
  is,
1515
1515
  {
1516
1516
  value: o,
@@ -1525,15 +1525,15 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1525
1525
  label: y("booking.confirmation.heading"),
1526
1526
  helperText: y("booking.confirmation.helper"),
1527
1527
  value: xe,
1528
- onChange: (o) => j({
1528
+ onChange: (o) => K({
1529
1529
  confirmationChannels: o
1530
1530
  }),
1531
1531
  orientation: "vertical",
1532
- options: Me.map((o) => ({
1532
+ options: Oe.map((o) => ({
1533
1533
  value: o,
1534
1534
  label: y(`booking.confirmation.channel.${o}`)
1535
1535
  })),
1536
- error: U ? y("booking.confirmation.atLeastOne") : void 0
1536
+ error: j ? y("booking.confirmation.atLeastOne") : void 0
1537
1537
  }
1538
1538
  )
1539
1539
  }
@@ -1542,7 +1542,7 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1542
1542
  u ? "booking.payment.unavailable" : "booking.payment.submitFailed"
1543
1543
  ) }) }) : null,
1544
1544
  R ? null : /* @__PURE__ */ k("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
1545
- Bt ? /* @__PURE__ */ n(
1545
+ Lt ? /* @__PURE__ */ n(
1546
1546
  "p",
1547
1547
  {
1548
1548
  id: gt,
@@ -1559,8 +1559,8 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1559
1559
  type: "submit",
1560
1560
  disabled: se || u,
1561
1561
  "aria-disabled": !pe || void 0,
1562
- "aria-describedby": Bt ? gt : void 0,
1563
- startIcon: se ? /* @__PURE__ */ n(Tn, { variant: "pulse", size: "sm" }) : void 0,
1562
+ "aria-describedby": Lt ? gt : void 0,
1563
+ startIcon: se ? /* @__PURE__ */ n(Cn, { variant: "pulse", size: "sm" }) : void 0,
1564
1564
  children: g ? y("booking.payment.submit", { amount: Pe }) : y("booking.details.submit")
1565
1565
  }
1566
1566
  )
@@ -1570,7 +1570,7 @@ const yn = 500, xr = /^[A-Z0-9]{16}$/, Ir = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, kn = 3
1570
1570
  );
1571
1571
  }
1572
1572
  );
1573
- un.displayName = "BookingDetailsForm";
1573
+ mn.displayName = "BookingDetailsForm";
1574
1574
  const yt = [
1575
1575
  "ds:focus-visible:outline-[length:var(--focus-ring-width)]",
1576
1576
  "ds:focus-visible:outline-solid",
@@ -1578,7 +1578,31 @@ const yt = [
1578
1578
  "ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1579
1579
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
1580
1580
  ].join(" ");
1581
- function Mr({
1581
+ function cn(e) {
1582
+ if (typeof window > "u") return !1;
1583
+ if (typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches)
1584
+ return !0;
1585
+ if (!e) return !1;
1586
+ if (e.closest(".theme-accessible")) return !0;
1587
+ const t = getComputedStyle(e).getPropertyValue(
1588
+ "--animation-duration"
1589
+ );
1590
+ return t.trim() !== "" && parseFloat(t) === 0;
1591
+ }
1592
+ function qn(e, t) {
1593
+ if (!e || typeof e.scrollIntoView != "function") return;
1594
+ const s = getComputedStyle(e), i = parseFloat(s.scrollMarginTop) || 0, r = parseFloat(s.scrollMarginBottom) || 0, a = e.getBoundingClientRect();
1595
+ if (!(a.top >= i && a.bottom <= window.innerHeight - r))
1596
+ try {
1597
+ e.scrollIntoView({
1598
+ behavior: cn(e) ? "auto" : "smooth",
1599
+ block: t
1600
+ });
1601
+ } catch {
1602
+ e.scrollIntoView();
1603
+ }
1604
+ }
1605
+ function Or({
1582
1606
  length: e = 5,
1583
1607
  onVerify: t,
1584
1608
  onResend: s,
@@ -1587,57 +1611,57 @@ function Mr({
1587
1611
  onVerified: a,
1588
1612
  onBusyChange: c
1589
1613
  }) {
1590
- const { t: l, i18n: m } = Q("ui"), p = at(), f = at(), v = M(null), h = M(null), d = M(null), g = M(null), I = M(!1), u = M(!1), [F, N] = H(null), [w, x] = H(!1), [A, _] = H(null), [R, b] = H(
1614
+ const { t: l, i18n: m } = Q("ui"), p = at(), f = at(), v = M(null), h = M(null), d = M(null), g = M(null), I = M(!1), u = M(!1), [E, N] = U(null), [w, x] = U(!1), [O, _] = U(null), [R, b] = U(
1591
1615
  null
1592
- ), [C, V] = H(0), D = Number.isFinite(i) ? Math.max(0, Math.ceil(i)) : 60, [B, P] = H(
1593
- () => Date.now() + D * 1e3
1594
- ), [O, y] = H(D), X = A === "too-many-attempts";
1616
+ ), [C, V] = U(0), A = Number.isFinite(i) ? Math.max(0, Math.ceil(i)) : 60, [L, P] = U(
1617
+ () => Date.now() + A * 1e3
1618
+ ), [D, y] = U(A), X = O === "too-many-attempts";
1595
1619
  z(() => {
1596
- c == null || c(!!F);
1597
- }, [F, c]), z(() => (I.current = !0, () => {
1620
+ c == null || c(!!E);
1621
+ }, [E, c]), z(() => (I.current = !0, () => {
1598
1622
  I.current = !1;
1599
1623
  }), []), z(() => {
1600
- var E, K, G;
1601
- (E = d.current) == null || E.focus({ preventScroll: !0 }), (G = (K = h.current) == null ? void 0 : K.scrollIntoView) == null || G.call(K, { block: "nearest" });
1624
+ var F;
1625
+ (F = d.current) == null || F.focus({ preventScroll: !0 }), qn(h.current, "center");
1602
1626
  }, [C]), z(() => {
1603
- var G, te;
1604
- if (F || !X && R !== "resend") return;
1605
- const E = document.activeElement, K = (G = v.current) == null ? void 0 : G.closest("section");
1606
- E && E !== document.body && !(K != null && K.contains(E)) || (g.current && !g.current.disabled ? g.current.focus() : (te = v.current) == null || te.focus());
1607
- }, [F, X, R]), z(() => {
1608
- if (O === 0) return;
1609
- const E = setTimeout(() => {
1610
- y(Math.max(0, Math.ceil((B - Date.now()) / 1e3)));
1627
+ var Y, te;
1628
+ if (E || !X && R !== "resend") return;
1629
+ const F = document.activeElement, W = (Y = v.current) == null ? void 0 : Y.closest("section");
1630
+ F && F !== document.body && !(W != null && W.contains(F)) || (g.current && !g.current.disabled ? g.current.focus() : (te = v.current) == null || te.focus());
1631
+ }, [E, X, R]), z(() => {
1632
+ if (D === 0) return;
1633
+ const F = setTimeout(() => {
1634
+ y(Math.max(0, Math.ceil((L - Date.now()) / 1e3)));
1611
1635
  }, 1e3);
1612
- return () => clearTimeout(E);
1613
- }, [B, O]);
1614
- const ee = async (E) => {
1636
+ return () => clearTimeout(F);
1637
+ }, [L, D]);
1638
+ const ee = async (F) => {
1615
1639
  if (!(u.current || X)) {
1616
1640
  u.current = !0, N("verify"), x(!1), _(null), b(null);
1617
1641
  try {
1618
- const K = await t(E);
1642
+ const W = await t(F);
1619
1643
  if (!I.current) return;
1620
- K.ok ? a(K.redirectUrl) : (_(K.reason), K.reason !== "too-many-attempts" && V((G) => G + 1));
1644
+ W.ok ? a(W.redirectUrl) : (_(W.reason), W.reason !== "too-many-attempts" && V((Y) => Y + 1));
1621
1645
  } catch {
1622
1646
  if (!I.current) return;
1623
- b("verify"), V((K) => K + 1);
1647
+ b("verify"), V((W) => W + 1);
1624
1648
  } finally {
1625
1649
  u.current = !1, I.current && N(null);
1626
1650
  }
1627
1651
  }
1628
- }, Fe = async () => {
1629
- if (!(u.current || Date.now() < B)) {
1652
+ }, Ee = async () => {
1653
+ if (!(u.current || Date.now() < L)) {
1630
1654
  u.current = !0, N("resend"), x(!1), b(null);
1631
1655
  try {
1632
1656
  if (await s(), !I.current) return;
1633
- P(Date.now() + D * 1e3), y(D), _(null), x(!0), V((E) => E + 1);
1657
+ P(Date.now() + A * 1e3), y(A), _(null), x(!0), V((F) => F + 1);
1634
1658
  } catch {
1635
1659
  I.current && b("resend");
1636
1660
  } finally {
1637
1661
  u.current = !1, I.current && N(null);
1638
1662
  }
1639
1663
  }
1640
- }, _e = A === "wrong" ? l("booking.code.wrong") : A === "expired" ? l("booking.code.expired") : X ? l("booking.code.tooManyAttempts") : void 0;
1664
+ }, _e = O === "wrong" ? l("booking.code.wrong") : O === "expired" ? l("booking.code.expired") : X ? l("booking.code.tooManyAttempts") : void 0;
1641
1665
  return /* @__PURE__ */ k(
1642
1666
  "section",
1643
1667
  {
@@ -1657,7 +1681,7 @@ function Mr({
1657
1681
  }
1658
1682
  ),
1659
1683
  /* @__PURE__ */ n("p", { id: f, className: "type-body ds:m-0", children: r ? /* @__PURE__ */ n(
1660
- Cn,
1684
+ wn,
1661
1685
  {
1662
1686
  t: l,
1663
1687
  ns: "ui",
@@ -1673,13 +1697,13 @@ function Mr({
1673
1697
  length: e,
1674
1698
  mode: "alphanumeric",
1675
1699
  "aria-describedby": f,
1676
- disabled: !!F || X,
1700
+ disabled: !!E || X,
1677
1701
  onComplete: ee
1678
1702
  },
1679
1703
  C
1680
1704
  ) }) }),
1681
1705
  R ? /* @__PURE__ */ n(ae, { variant: "error", children: /* @__PURE__ */ n(ae.Description, { children: l(R === "verify" ? "booking.code.verifyFailed" : "booking.code.resendFailed") }) }) : null,
1682
- /* @__PURE__ */ n("p", { role: "status", className: "type-body ds:m-0", children: F === "verify" ? l("booking.code.verifying") : w ? l("booking.code.resent") : null }),
1706
+ /* @__PURE__ */ n("p", { role: "status", className: "type-body ds:m-0", children: E === "verify" ? l("booking.code.verifying") : w ? l("booking.code.resent") : null }),
1683
1707
  /* @__PURE__ */ n(
1684
1708
  Ne,
1685
1709
  {
@@ -1687,11 +1711,11 @@ function Mr({
1687
1711
  type: "button",
1688
1712
  intent: "secondary",
1689
1713
  className: "ds:self-start",
1690
- disabled: O > 0 || !!F,
1691
- loading: F === "resend",
1692
- onClick: Fe,
1693
- children: O > 0 ? l("booking.code.resendCountdown", {
1694
- seconds: new Intl.NumberFormat(m.language).format(O)
1714
+ disabled: D > 0 || !!E,
1715
+ loading: E === "resend",
1716
+ onClick: Ee,
1717
+ children: D > 0 ? l("booking.code.resendCountdown", {
1718
+ seconds: new Intl.NumberFormat(m.language).format(D)
1695
1719
  }) : l("booking.code.resend")
1696
1720
  }
1697
1721
  )
@@ -1711,7 +1735,7 @@ function zn(e) {
1711
1735
  currencyCode: s
1712
1736
  };
1713
1737
  }
1714
- function Er(e) {
1738
+ function Fr(e) {
1715
1739
  var r;
1716
1740
  const t = (r = e.priceLabel) != null && r.trim() ? e.priceLabel : void 0, s = t ? { label: t } : void 0;
1717
1741
  if (!e.payment) return { price: s };
@@ -1721,7 +1745,7 @@ function Er(e) {
1721
1745
  payment: i
1722
1746
  } : { price: s, payment: "unavailable" };
1723
1747
  }
1724
- function Fr(e, t, s) {
1748
+ function Er(e, t, s) {
1725
1749
  const i = e.filter(
1726
1750
  (a) => t.includes(a.id)
1727
1751
  ), r = (s == null ? void 0 : s.serviceId) ?? (t.length === 1 ? t[0] : void 0);
@@ -1753,7 +1777,7 @@ function _r({
1753
1777
  renderPayment: m,
1754
1778
  codeStep: p
1755
1779
  }) {
1756
- var _e, E, K;
1780
+ var _e, F, W;
1757
1781
  const f = JSON.stringify([
1758
1782
  t.insuranceType,
1759
1783
  t.specialtyId,
@@ -1765,7 +1789,7 @@ function _r({
1765
1789
  t.slotKey
1766
1790
  ]), v = M(
1767
1791
  void 0
1768
- ), d = (t.date ? (_e = s[t.date]) == null ? void 0 : _e.find((G) => G.key === t.slotKey) : void 0) ?? (((E = v.current) == null ? void 0 : E.selection) === f ? v.current.slot : void 0), g = Fr(
1792
+ ), d = (t.date ? (_e = s[t.date]) == null ? void 0 : _e.find((Y) => Y.key === t.slotKey) : void 0) ?? (((F = v.current) == null ? void 0 : F.selection) === f ? v.current.slot : void 0), g = Er(
1769
1793
  e,
1770
1794
  Ke(t),
1771
1795
  d
@@ -1775,44 +1799,44 @@ function _r({
1775
1799
  jt(g.payment),
1776
1800
  l,
1777
1801
  I
1778
- ]), F = g.payment ? JSON.stringify([jt(g.payment), l]) : "", N = M(void 0), w = !!((K = t.details) != null && K.paymentAccepted);
1802
+ ]), E = g.payment ? JSON.stringify([jt(g.payment), l]) : "", N = M(void 0), w = !!((W = t.details) != null && W.paymentAccepted);
1779
1803
  z(() => {
1780
1804
  if (!w) N.current = void 0;
1781
- else if (F) N.current === void 0 ? N.current = F : N.current !== F && (N.current = void 0, r({
1805
+ else if (E) N.current === void 0 ? N.current = E : N.current !== E && (N.current = void 0, r({
1782
1806
  ...t,
1783
1807
  details: { ...t.details, paymentAccepted: !1 }
1784
1808
  }));
1785
1809
  else return;
1786
- }, [w, F, r, t]);
1810
+ }, [w, E, r, t]);
1787
1811
  const x = M(u);
1788
1812
  x.current = u;
1789
- const [A, _] = H({ status: "idle" }), R = M(0), b = M(!1), C = M(!0), V = M(!1), D = M(void 0), B = M(u);
1813
+ const [O, _] = U({ status: "idle" }), R = M(0), b = M(!1), C = M(!0), V = M(!1), A = M(void 0), L = M(u);
1790
1814
  z(() => (C.current = !0, () => {
1791
1815
  C.current = !1, R.current += 1;
1792
1816
  }), []);
1793
- const P = A.status === "payment" || A.status === "code" || A.status === "success";
1817
+ const P = O.status === "payment" || O.status === "code" || O.status === "success";
1794
1818
  z(() => {
1795
- B.current === u || V.current || P || (B.current = u, R.current += 1, b.current = !1, _({ status: "idle" }));
1819
+ L.current === u || V.current || P || (L.current = u, R.current += 1, b.current = !1, _({ status: "idle" }));
1796
1820
  }, [u, P]);
1797
- const O = P || B.current === u ? A.session : void 0, y = q(
1798
- () => O && (a == null ? void 0 : a.sessionId) === O.id ? a : O ? { sessionId: O.id, status: "ready" } : void 0,
1799
- [O, a]
1821
+ const D = P || L.current === u ? O.session : void 0, y = q(
1822
+ () => D && (a == null ? void 0 : a.sessionId) === D.id ? a : D ? { sessionId: D.id, status: "ready" } : void 0,
1823
+ [D, a]
1800
1824
  );
1801
- O && y && "phase" in y && y.phase === "completion" && (D.current = O.id);
1825
+ D && y && "phase" in y && y.phase === "completion" && (A.current = D.id);
1802
1826
  const X = q(
1803
- () => O && D.current === O.id && y && y.status !== "paid" && (!("phase" in y) || y.phase !== "completion") ? {
1804
- sessionId: O.id,
1827
+ () => D && A.current === D.id && y && y.status !== "paid" && (!("phase" in y) || y.phase !== "completion") ? {
1828
+ sessionId: D.id,
1805
1829
  status: "processing",
1806
1830
  phase: "completion"
1807
1831
  } : y,
1808
- [O, y]
1832
+ [D, y]
1809
1833
  );
1810
1834
  z(() => {
1811
- if (!(!O || !X || V.current))
1835
+ if (!(!D || !X || V.current))
1812
1836
  if (X.status === "paid") {
1813
- if (A.status !== "payment") return;
1814
- V.current = !0, _((G) => ({
1815
- ...G,
1837
+ if (O.status !== "payment") return;
1838
+ V.current = !0, _((Y) => ({
1839
+ ...Y,
1816
1840
  status: "success",
1817
1841
  redirectUrl: X.redirectUrl
1818
1842
  }));
@@ -1820,53 +1844,53 @@ function _r({
1820
1844
  ...t,
1821
1845
  details: { ...t.details, paymentAccepted: !1 }
1822
1846
  }), _({ status: "idle", cancelled: !0 }));
1823
- }, [O, X, r, t, A.status]);
1847
+ }, [D, X, r, t, O.status]);
1824
1848
  const ee = () => {
1825
- R.current += 1, b.current = !1, V.current = !1, D.current = void 0, v.current = void 0, B.current = x.current, _({ status: "idle" });
1826
- }, Fe = async (G) => {
1827
- var ke, Se, Ce, de, Le;
1828
- if (!(d != null && d.available) || I || c || b.current || A.status === "payment" || A.status === "code" || V.current || g.payment && !G.paymentAccepted) return;
1849
+ R.current += 1, b.current = !1, V.current = !1, A.current = void 0, v.current = void 0, L.current = x.current, _({ status: "idle" });
1850
+ }, Ee = async (Y) => {
1851
+ var ye, ke, Ce, de, Be;
1852
+ if (!(d != null && d.available) || I || c || b.current || O.status === "payment" || O.status === "code" || V.current || g.payment && !Y.paymentAccepted) return;
1829
1853
  b.current = !0;
1830
1854
  const te = p ? { ...p } : void 0;
1831
1855
  v.current = { selection: f, slot: { ...d } };
1832
1856
  const Re = ++R.current, et = u;
1833
- B.current = et;
1834
- const ve = {
1857
+ L.current = et;
1858
+ const he = {
1835
1859
  slot: { ...d, meta: d.meta ? { ...d.meta } : void 0 },
1836
1860
  value: {
1837
1861
  ...t,
1838
- serviceIds: (ke = t.serviceIds) == null ? void 0 : ke.slice(),
1839
- specialtyIds: (Se = t.specialtyIds) == null ? void 0 : Se.slice(),
1862
+ serviceIds: (ye = t.serviceIds) == null ? void 0 : ye.slice(),
1863
+ specialtyIds: (ke = t.specialtyIds) == null ? void 0 : ke.slice(),
1840
1864
  operatorIds: (Ce = t.operatorIds) == null ? void 0 : Ce.slice(),
1841
- operatorId: Vn(t) ?? t.operatorId,
1842
- details: { ...G }
1865
+ operatorId: Pn(t) ?? t.operatorId,
1866
+ details: { ...Y }
1843
1867
  },
1844
1868
  details: {
1845
- ...G,
1846
- confirmationChannels: (de = G.confirmationChannels) == null ? void 0 : de.slice()
1869
+ ...Y,
1870
+ confirmationChannels: (de = Y.confirmationChannels) == null ? void 0 : de.slice()
1847
1871
  },
1848
1872
  ...g.payment ? { payment: { ...g.payment } } : {}
1849
1873
  }, se = () => C.current && R.current === Re && x.current === et;
1850
1874
  _({ status: "submitting" });
1851
1875
  let fe = !1;
1852
1876
  try {
1853
- const ne = await i(ve);
1877
+ const ne = await i(he);
1854
1878
  if (!se()) return;
1855
- if (ve.payment) {
1879
+ if (he.payment) {
1856
1880
  const ue = ne == null ? void 0 : ne.paymentSession;
1857
- if (!((Le = ue == null ? void 0 : ue.id) != null && Le.trim()) || jt(ue.payment) !== jt(ve.payment)) {
1881
+ if (!((Be = ue == null ? void 0 : ue.id) != null && Be.trim()) || jt(ue.payment) !== jt(he.payment)) {
1858
1882
  _({ status: "error" });
1859
1883
  return;
1860
1884
  }
1861
1885
  fe = !0, _({
1862
1886
  status: te ? "code" : "payment",
1863
- snapshot: ve,
1887
+ snapshot: he,
1864
1888
  session: { id: ue.id, payment: { ...ue.payment } },
1865
1889
  codeStep: te
1866
1890
  });
1867
1891
  } else ne != null && ne.paymentSession ? _({ status: "error" }) : (V.current = !0, _({
1868
1892
  status: te ? "code" : "success",
1869
- snapshot: ve,
1893
+ snapshot: he,
1870
1894
  codeStep: te
1871
1895
  }));
1872
1896
  } catch {
@@ -1876,37 +1900,26 @@ function _r({
1876
1900
  }
1877
1901
  };
1878
1902
  return {
1879
- ...A,
1903
+ ...O,
1880
1904
  payment: g.payment,
1881
1905
  blocked: I,
1882
1906
  state: X,
1883
- activeSession: O,
1884
- submit: Fe,
1907
+ activeSession: D,
1908
+ submit: Ee,
1885
1909
  reset: ee,
1886
- completeCode: (G) => {
1910
+ completeCode: (Y) => {
1887
1911
  _(
1888
1912
  (te) => te.status !== "code" ? te : te.session ? { ...te, status: "payment", codeVerified: !0 } : {
1889
1913
  ...te,
1890
1914
  status: "success",
1891
1915
  codeVerified: !0,
1892
- redirectUrl: G
1916
+ redirectUrl: Y
1893
1917
  }
1894
1918
  );
1895
1919
  }
1896
1920
  };
1897
1921
  }
1898
- const Rr = 5e3, Lr = "ds:[stroke-dasharray:1] ds:[stroke-dashoffset:1] ds:animate-[stepper-icon-draw_calc(var(--animation-duration)*3)_var(--ease-out)_forwards]", Br = "ds:block ds:[block-size:100%] ds:rounded-full ds:bg-[var(--primary)] ds:animate-[reserved-bar-fill_linear_forwards] ds:[animation-duration:var(--handover-ms)]";
1899
- function xn(e) {
1900
- if (typeof window > "u") return !1;
1901
- if (typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches)
1902
- return !0;
1903
- if (!e) return !1;
1904
- if (e.closest(".theme-accessible")) return !0;
1905
- const t = getComputedStyle(e).getPropertyValue(
1906
- "--animation-duration"
1907
- );
1908
- return t.trim() !== "" && parseFloat(t) === 0;
1909
- }
1922
+ const Rr = 5e3, Br = "ds:[stroke-dasharray:1] ds:[stroke-dashoffset:1] ds:animate-[stepper-icon-draw_calc(var(--animation-duration)*3)_var(--ease-out)_forwards]", Lr = "ds:block ds:[block-size:100%] ds:rounded-full ds:bg-[var(--primary)] ds:animate-[reserved-bar-fill_linear_forwards] ds:[animation-duration:var(--handover-ms)]";
1910
1923
  function Pr({
1911
1924
  url: e,
1912
1925
  delayMs: t,
@@ -1916,7 +1929,7 @@ function Pr({
1916
1929
  details: a,
1917
1930
  shouldTakeFocus: c
1918
1931
  }) {
1919
- const { t: l } = Q("ui"), m = M(null), p = M(null), f = M(void 0), v = at(), h = M(null), [d, g] = H(!1), [I, u] = H(() => xn(null)), F = () => {
1932
+ const { t: l } = Q("ui"), m = M(null), p = M(null), f = M(void 0), v = at(), h = M(null), [d, g] = U(!1), [I, u] = U(() => cn(null)), E = () => {
1920
1933
  clearTimeout(f.current);
1921
1934
  try {
1922
1935
  s ? s(e) : window.location.assign(e);
@@ -1925,13 +1938,12 @@ function Pr({
1925
1938
  }, N = () => {
1926
1939
  var x;
1927
1940
  clearTimeout(f.current), g(!0), (x = h.current) == null || x.focus({ preventScroll: !0 });
1928
- }, w = M(F);
1929
- return w.current = F, ts(() => {
1930
- u(xn(m.current));
1941
+ }, w = M(E);
1942
+ return w.current = E, ts(() => {
1943
+ u(cn(m.current));
1931
1944
  }, []), z(() => {
1932
- var A;
1933
1945
  const x = p.current;
1934
- x && m.current && c(m.current) && (x.focus({ preventScroll: !0 }), (A = x.scrollIntoView) == null || A.call(x, { block: "nearest" }));
1946
+ x && m.current && c(m.current) && x.focus({ preventScroll: !0 });
1935
1947
  }, []), z(() => (f.current = setTimeout(() => w.current(), t), () => clearTimeout(f.current)), [e, t]), /* @__PURE__ */ k(
1936
1948
  "div",
1937
1949
  {
@@ -1954,7 +1966,7 @@ function Pr({
1954
1966
  strokeLinecap: "round",
1955
1967
  strokeLinejoin: "round",
1956
1968
  className: "ds:size-[var(--spacing-lg)]",
1957
- children: /* @__PURE__ */ n("path", { pathLength: "1", d: "M5 12l5 5L20 7", className: Lr })
1969
+ children: /* @__PURE__ */ n("path", { pathLength: "1", d: "M5 12l5 5L20 7", className: Br })
1958
1970
  }
1959
1971
  )
1960
1972
  }
@@ -1986,7 +1998,7 @@ function Pr({
1986
1998
  children: /* @__PURE__ */ n(
1987
1999
  "span",
1988
2000
  {
1989
- className: Br,
2001
+ className: Lr,
1990
2002
  style: { "--handover-ms": `${t}ms` }
1991
2003
  }
1992
2004
  )
@@ -2000,7 +2012,7 @@ function Pr({
2000
2012
  type: "button",
2001
2013
  intent: "secondary",
2002
2014
  size: "lg",
2003
- onClick: F,
2015
+ onClick: E,
2004
2016
  children: l("booking.reserved.goNow")
2005
2017
  }
2006
2018
  ),
@@ -2055,22 +2067,22 @@ const Kr = Tt(
2055
2067
  ), jr = [
2056
2068
  [
2057
2069
  /\b(estetic|aesthetic|botox|filler|mesoterap|chirurgia\s*plastic)/i,
2058
- vn
2070
+ bn
2059
2071
  ],
2060
2072
  [/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i, As],
2061
2073
  [/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i, Zs],
2062
2074
  [/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i, Ds],
2063
2075
  [/\b(otorin|udito|orecchi|hearing|ear)/i, Ks],
2064
2076
  [/\b(neuro|brain|cervello)/i, Vs],
2065
- [/\b(pediatr|child|bambin)/i, Os],
2066
- [/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, Bs],
2077
+ [/\b(pediatr|child|bambin)/i, Ms],
2078
+ [/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, Ls],
2067
2079
  [/\b(lab|analis|test|sang|esami)/i, Us],
2068
2080
  [/\b(farmaco|pharm|pillol|refill)/i, Gs],
2069
2081
  [/\b(chirurg|surg|intervent|operat)/i, Ws],
2070
- [/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, Ms],
2071
- [/\b(vacc|inject|inie|punto)/i, vn],
2072
- [/\b(derma|skin|pelle)/i, Es],
2073
- [/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, Fs],
2082
+ [/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, Os],
2083
+ [/\b(vacc|inject|inie|punto)/i, bn],
2084
+ [/\b(derma|skin|pelle)/i, Fs],
2085
+ [/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, Es],
2074
2086
  [/\b(general|medicin|family|control|check[-\s]?up)/i, Rs]
2075
2087
  ];
2076
2088
  function Ur(e) {
@@ -2085,7 +2097,7 @@ function Hr(e) {
2085
2097
  function Kn() {
2086
2098
  const { t: e, i18n: t } = Q("ui");
2087
2099
  return (s) => {
2088
- const i = Er(s), r = (c) => Wt(c.amountCents, c.currencyCode, t.language), a = i.price ? "label" in i.price ? i.price.label : r(i.price.amount) : void 0;
2100
+ const i = Fr(s), r = (c) => Wt(c.amountCents, c.currencyCode, t.language), a = i.price ? "label" in i.price ? i.price.label : r(i.price.amount) : void 0;
2089
2101
  return i.payment === "unavailable" ? {
2090
2102
  price: a,
2091
2103
  payment: e("booking.payment.unavailable"),
@@ -2130,13 +2142,13 @@ function Wr({
2130
2142
  locale: i,
2131
2143
  loading: r
2132
2144
  }) {
2133
- const { t: a } = Q("ui"), c = q(() => t ? Ct(he(t)) : e.length > 0 ? Ct(he(e[0])) : Ct(/* @__PURE__ */ new Date()), [t, e]), [l, m] = H(c), [p, f] = H(null), v = q(() => {
2134
- const N = Ct(l), w = Ss(l), x = N.getDay(), A = w.getDate(), _ = [];
2145
+ const { t: a } = Q("ui"), c = q(() => t ? Ct(ge(t)) : e.length > 0 ? Ct(ge(e[0])) : Ct(/* @__PURE__ */ new Date()), [t, e]), [l, m] = U(c), [p, f] = U(null), v = q(() => {
2146
+ const N = Ct(l), w = Ss(l), x = N.getDay(), O = w.getDate(), _ = [];
2135
2147
  for (let R = x; R > 0; R -= 1) {
2136
2148
  const b = new Date(N);
2137
2149
  b.setDate(N.getDate() - R), _.push(b);
2138
2150
  }
2139
- for (let R = 0; R < A; R += 1) {
2151
+ for (let R = 0; R < O; R += 1) {
2140
2152
  const b = new Date(N);
2141
2153
  b.setDate(N.getDate() + R), _.push(b);
2142
2154
  }
@@ -2157,25 +2169,25 @@ function Wr({
2157
2169
  }, [l, i]), d = q(() => {
2158
2170
  const N = new Date(2024, 0, 7);
2159
2171
  return Array.from({ length: 7 }, (w, x) => {
2160
- const A = new Date(N);
2161
- A.setDate(N.getDate() + x);
2172
+ const O = new Date(N);
2173
+ O.setDate(N.getDate() + x);
2162
2174
  try {
2163
- return new Intl.DateTimeFormat(i, { weekday: "short" }).format(A);
2175
+ return new Intl.DateTimeFormat(i, { weekday: "short" }).format(O);
2164
2176
  } catch {
2165
- return Ht(A, "EEE");
2177
+ return Ht(O, "EEE");
2166
2178
  }
2167
2179
  });
2168
- }, [i]), g = q(() => new Set(e), [e]), I = ye(
2180
+ }, [i]), g = q(() => new Set(e), [e]), I = be(
2169
2181
  (N) => g.has(ot(N)),
2170
2182
  [g]
2171
2183
  ), u = q(() => {
2172
2184
  if (p) return p;
2173
- if (t) return he(t);
2185
+ if (t) return ge(t);
2174
2186
  const N = v.find(
2175
2187
  (w) => qt(w, l) && I(w)
2176
2188
  );
2177
2189
  return N || (v.find((w) => qt(w, l)) ?? null);
2178
- }, [p, t, v, l, I]), F = ye(
2190
+ }, [p, t, v, l, I]), E = be(
2179
2191
  (N, w) => {
2180
2192
  let x = null;
2181
2193
  switch (N.key) {
@@ -2224,7 +2236,7 @@ function Wr({
2224
2236
  ) : /* @__PURE__ */ k("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2225
2237
  /* @__PURE__ */ k("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
2226
2238
  /* @__PURE__ */ n(
2227
- gn,
2239
+ hn,
2228
2240
  {
2229
2241
  icon: /* @__PURE__ */ n(Is, {}),
2230
2242
  "aria-label": a("booking.previousMonth"),
@@ -2245,7 +2257,7 @@ function Wr({
2245
2257
  }
2246
2258
  ),
2247
2259
  /* @__PURE__ */ n(
2248
- gn,
2260
+ hn,
2249
2261
  {
2250
2262
  icon: /* @__PURE__ */ n(Ns, {}),
2251
2263
  "aria-label": a("booking.nextMonth"),
@@ -2253,7 +2265,7 @@ function Wr({
2253
2265
  intent: "ghost",
2254
2266
  flipIconInRtl: !0,
2255
2267
  onClick: () => {
2256
- m((N) => On(N, 1)), f(null);
2268
+ m((N) => Dn(N, 1)), f(null);
2257
2269
  }
2258
2270
  }
2259
2271
  )
@@ -2286,8 +2298,8 @@ function Wr({
2286
2298
  {
2287
2299
  role: "row",
2288
2300
  className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
2289
- children: v.slice(w * 7, w * 7 + 7).map((x, A) => {
2290
- const _ = w * 7 + A, R = qt(x, l), b = R && I(x), C = t ? hn(x, he(t)) : !1, V = R ? C ? "selected" : b ? "available" : "unavailable" : "outside", D = u ? hn(u, x) : !1, B = (() => {
2301
+ children: v.slice(w * 7, w * 7 + 7).map((x, O) => {
2302
+ const _ = w * 7 + O, R = qt(x, l), b = R && I(x), C = t ? vn(x, ge(t)) : !1, V = R ? C ? "selected" : b ? "available" : "unavailable" : "outside", A = u ? vn(u, x) : !1, L = (() => {
2291
2303
  try {
2292
2304
  return new Intl.DateTimeFormat(i, {
2293
2305
  dateStyle: "full"
@@ -2301,15 +2313,15 @@ function Wr({
2301
2313
  {
2302
2314
  type: "button",
2303
2315
  role: "gridcell",
2304
- "aria-label": B,
2316
+ "aria-label": L,
2305
2317
  "aria-selected": C || void 0,
2306
2318
  "aria-disabled": !b || void 0,
2307
- tabIndex: D ? 0 : -1,
2319
+ tabIndex: A ? 0 : -1,
2308
2320
  disabled: !b,
2309
2321
  onClick: () => {
2310
2322
  b && s(ot(x));
2311
2323
  },
2312
- onKeyDown: (P) => F(P, x),
2324
+ onKeyDown: (P) => E(P, x),
2313
2325
  className: Jr({ state: V }),
2314
2326
  children: /* @__PURE__ */ n("span", { "aria-hidden": "true", children: x.getDate() })
2315
2327
  },
@@ -2356,16 +2368,16 @@ function Zr({
2356
2368
  onSelect: s,
2357
2369
  showDuration: i
2358
2370
  }) {
2359
- const { t: r } = Q("ui"), a = Kn(), c = at(), [l, m] = H(() => {
2371
+ const { t: r } = Q("ui"), a = Kn(), c = at(), [l, m] = U(() => {
2360
2372
  if (t) {
2361
2373
  const h = e.findIndex((d) => d.id === t);
2362
2374
  if (h >= 0) return h;
2363
2375
  }
2364
2376
  return 0;
2365
- }), p = M(/* @__PURE__ */ new Map()), f = ye((h) => {
2377
+ }), p = M(/* @__PURE__ */ new Map()), f = be((h) => {
2366
2378
  var d;
2367
2379
  (d = p.current.get(h)) == null || d.focus();
2368
- }, []), v = ye(
2380
+ }, []), v = be(
2369
2381
  (h, d, g) => {
2370
2382
  const I = e.length;
2371
2383
  if (I !== 0)
@@ -2411,16 +2423,16 @@ function Zr({
2411
2423
  id: c,
2412
2424
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
2413
2425
  children: e.map((h, d) => {
2414
- const g = t === h.id, I = l === d, { price: u, payment: F, paymentTone: N } = a(h), w = u ? F ? r("booking.serviceCardLabelPayment", {
2426
+ const g = t === h.id, I = l === d, { price: u, payment: E, paymentTone: N } = a(h), w = u ? E ? r("booking.serviceCardLabelPayment", {
2415
2427
  label: h.label,
2416
2428
  price: u,
2417
- payment: F
2429
+ payment: E
2418
2430
  }) : r("booking.serviceCardLabelPrice", {
2419
2431
  label: h.label,
2420
2432
  price: u
2421
- }) : F ? r("booking.serviceCardLabelPaymentNoPrice", {
2433
+ }) : E ? r("booking.serviceCardLabelPaymentNoPrice", {
2422
2434
  label: h.label,
2423
- payment: F
2435
+ payment: E
2424
2436
  }) : i ? r("booking.serviceCardLabel", {
2425
2437
  label: h.label,
2426
2438
  duration: h.durationMin
@@ -2428,8 +2440,8 @@ function Zr({
2428
2440
  return /* @__PURE__ */ k(
2429
2441
  "button",
2430
2442
  {
2431
- ref: (A) => {
2432
- A ? p.current.set(d, A) : p.current.delete(d);
2443
+ ref: (O) => {
2444
+ O ? p.current.set(d, O) : p.current.delete(d);
2433
2445
  },
2434
2446
  type: "button",
2435
2447
  role: "radio",
@@ -2438,7 +2450,7 @@ function Zr({
2438
2450
  tabIndex: I ? 0 : -1,
2439
2451
  onClick: () => s(h.id),
2440
2452
  onFocus: () => m(d),
2441
- onKeyDown: (A) => v(A, d, h.id),
2453
+ onKeyDown: (O) => v(O, d, h.id),
2442
2454
  className: Yr({
2443
2455
  state: g ? "selected" : "idle"
2444
2456
  }),
@@ -2460,11 +2472,11 @@ function Zr({
2460
2472
  children: h.label
2461
2473
  }
2462
2474
  ),
2463
- F ? /* @__PURE__ */ n(
2475
+ E ? /* @__PURE__ */ n(
2464
2476
  "span",
2465
2477
  {
2466
2478
  className: gs({ tone: N }),
2467
- children: F
2479
+ children: E
2468
2480
  }
2469
2481
  ) : u || !i ? null : /* @__PURE__ */ n("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: r("booking.serviceSummary", {
2470
2482
  minutes: h.durationMin
@@ -2475,7 +2487,7 @@ function Zr({
2475
2487
  {
2476
2488
  "aria-hidden": "true",
2477
2489
  className: "ds:inline-flex ds:shrink-0 ds:items-center ds:ms-auto",
2478
- children: /* @__PURE__ */ n(An, { variant: "accentSoft", size: "lg", children: u })
2490
+ children: /* @__PURE__ */ n(Tn, { variant: "accentSoft", size: "lg", children: u })
2479
2491
  }
2480
2492
  ) : null
2481
2493
  ]
@@ -2546,7 +2558,7 @@ function ti({
2546
2558
  weekday: "long",
2547
2559
  day: "numeric",
2548
2560
  month: "long"
2549
- }).format(he(e));
2561
+ }).format(ge(e));
2550
2562
  } catch {
2551
2563
  return e;
2552
2564
  }
@@ -2570,7 +2582,7 @@ function ti({
2570
2582
  },
2571
2583
  v
2572
2584
  ))
2573
- ] }) : p === 0 ? /* @__PURE__ */ n(Dn, { variant: "no-results", title: c("booking.noSlotsForDate") }) : /* @__PURE__ */ k("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2585
+ ] }) : p === 0 ? /* @__PURE__ */ n(An, { variant: "no-results", title: c("booking.noSlotsForDate") }) : /* @__PURE__ */ k("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2574
2586
  /* @__PURE__ */ k("div", { className: "ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
2575
2587
  /* @__PURE__ */ k("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
2576
2588
  /* @__PURE__ */ n(
@@ -2644,13 +2656,13 @@ function ni({
2644
2656
  locale: m,
2645
2657
  agentIdBase: p
2646
2658
  }) {
2647
- const f = q(() => vt(/* @__PURE__ */ new Date()), []), [v, h] = H(() => {
2659
+ const f = q(() => vt(/* @__PURE__ */ new Date()), []), [v, h] = U(() => {
2648
2660
  if (s.date) {
2649
- const b = vt(he(s.date));
2661
+ const b = vt(ge(s.date));
2650
2662
  if (!bt(f, b)) return b;
2651
2663
  }
2652
2664
  if (e.length > 0) {
2653
- const b = vt(he(e[0]));
2665
+ const b = vt(ge(e[0]));
2654
2666
  if (bt(b, f)) return b;
2655
2667
  }
2656
2668
  return f;
@@ -2658,48 +2670,48 @@ function ni({
2658
2670
  () => nn(v, Ut - 1),
2659
2671
  [v]
2660
2672
  ), g = q(() => Array.from({ length: Ut }, (b, C) => {
2661
- const V = nn(v, C), D = ot(V), P = (t[D] ?? []).map((O) => ({
2662
- id: O.key,
2673
+ const V = nn(v, C), A = ot(V), P = (t[A] ?? []).map((D) => ({
2674
+ id: D.key,
2663
2675
  // SlotGrid formats `start` as a time via Intl.DateTimeFormat —
2664
2676
  // compose a full ISO from the column's date + the slot's HH:mm
2665
2677
  // so the locale-formatter has a real timestamp to work with.
2666
- start: `${D}T${O.time}:00`,
2667
- available: O.available
2678
+ start: `${A}T${D.time}:00`,
2679
+ available: D.available
2668
2680
  }));
2669
- return { date: D, slots: P };
2670
- }), [v, t]), I = bt(v, f), u = !0, F = ye(() => {
2681
+ return { date: A, slots: P };
2682
+ }), [v, t]), I = bt(v, f), u = !0, E = be(() => {
2671
2683
  h((b) => {
2672
2684
  const C = xs(b, Ut);
2673
2685
  return bt(f, C) ? f : C;
2674
2686
  });
2675
- }, [f]), N = ye(() => {
2687
+ }, [f]), N = be(() => {
2676
2688
  h((b) => nn(b, Ut));
2677
2689
  }, []);
2678
2690
  z(() => {
2679
2691
  if (e.length === 0) return;
2680
- const b = vt(he(e[0]));
2692
+ const b = vt(ge(e[0]));
2681
2693
  !bt(b, f) || e.some((V) => {
2682
- const D = vt(he(V));
2683
- return !bt(D, d) && !ks(D, v);
2694
+ const A = vt(ge(V));
2695
+ return !bt(A, d) && !ks(A, v);
2684
2696
  }) || h(b);
2685
2697
  }, [e]), z(() => {
2686
2698
  a == null || a(ot(v), ot(d));
2687
2699
  }, [v, d, a]);
2688
- const w = ye(
2700
+ const w = be(
2689
2701
  (b, C) => {
2690
2702
  const V = typeof C.date == "string" ? C.date : ot(C.date);
2691
2703
  i({
2692
- ...Pn(Zt(s, V), b.id)
2704
+ ...Ln(Zt(s, V), b.id)
2693
2705
  }), r == null || r(V);
2694
2706
  },
2695
2707
  [i, r, s]
2696
- ), x = c || l ? "loading" : "default", A = g.some((b) => b.slots.length > 0), _ = e[0];
2708
+ ), x = c || l ? "loading" : "default", O = g.some((b) => b.slots.length > 0), _ = e[0];
2697
2709
  return /* @__PURE__ */ k("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2698
- x !== "loading" && !A && !!_ ? /* @__PURE__ */ n(
2699
- mn,
2710
+ x !== "loading" && !O && !!_ ? /* @__PURE__ */ n(
2711
+ pn,
2700
2712
  {
2701
2713
  nextAvailableDate: _,
2702
- onJump: () => h(vt(he(_))),
2714
+ onJump: () => h(vt(ge(_))),
2703
2715
  locale: m
2704
2716
  }
2705
2717
  ) : null,
@@ -2715,7 +2727,7 @@ function ni({
2715
2727
  hasPrevious: I,
2716
2728
  hasNext: u,
2717
2729
  onSlotSelect: w,
2718
- onPreviousDays: F,
2730
+ onPreviousDays: E,
2719
2731
  onNextDays: N
2720
2732
  }
2721
2733
  )
@@ -2769,7 +2781,7 @@ function Un(e) {
2769
2781
  date: s.date,
2770
2782
  slots: t.availableSlots[s.date] ?? [],
2771
2783
  selectedSlotKey: s.slotKey,
2772
- onSelect: (l) => i(Pn(s, l.key)),
2784
+ onSelect: (l) => i(Ln(s, l.key)),
2773
2785
  loading: r,
2774
2786
  locale: a
2775
2787
  }
@@ -2812,7 +2824,7 @@ function Gn({
2812
2824
  return a === "multi-select" && r ? /* @__PURE__ */ k("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2813
2825
  m,
2814
2826
  /* @__PURE__ */ n(
2815
- dn,
2827
+ ln,
2816
2828
  {
2817
2829
  options: l,
2818
2830
  value: s ?? [],
@@ -2825,7 +2837,7 @@ function Gn({
2825
2837
  ] }) : a === "combobox" ? /* @__PURE__ */ k("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2826
2838
  m,
2827
2839
  /* @__PURE__ */ n(
2828
- cn,
2840
+ dn,
2829
2841
  {
2830
2842
  options: l,
2831
2843
  value: t ?? "",
@@ -2870,7 +2882,7 @@ function Jn({
2870
2882
  minutes: d.durationMin
2871
2883
  })}`,
2872
2884
  ...g ? {
2873
- endContent: /* @__PURE__ */ n(An, { variant: "accentSoft", size: "lg", children: g })
2885
+ endContent: /* @__PURE__ */ n(Tn, { variant: "accentSoft", size: "lg", children: g })
2874
2886
  } : {},
2875
2887
  ...I ? { description: I, descriptionTone: u } : {}
2876
2888
  };
@@ -2878,7 +2890,7 @@ function Jn({
2878
2890
  return f === "multi-select" && r ? /* @__PURE__ */ k("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2879
2891
  h,
2880
2892
  /* @__PURE__ */ n(
2881
- dn,
2893
+ ln,
2882
2894
  {
2883
2895
  options: v,
2884
2896
  value: s ?? [],
@@ -2892,7 +2904,7 @@ function Jn({
2892
2904
  ] }) : f === "combobox" ? /* @__PURE__ */ k("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2893
2905
  h,
2894
2906
  /* @__PURE__ */ n(
2895
- cn,
2907
+ dn,
2896
2908
  {
2897
2909
  options: v,
2898
2910
  value: t ?? "",
@@ -2949,7 +2961,7 @@ function Wn({
2949
2961
  return /* @__PURE__ */ k("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2950
2962
  l,
2951
2963
  /* @__PURE__ */ n(
2952
- dn,
2964
+ ln,
2953
2965
  {
2954
2966
  options: p,
2955
2967
  value: s ?? [],
@@ -2962,7 +2974,7 @@ function Wn({
2962
2974
  ] });
2963
2975
  }
2964
2976
  const m = [
2965
- { value: Ee, label: c("booking.operator.all") },
2977
+ { value: Fe, label: c("booking.operator.all") },
2966
2978
  ...e.map(
2967
2979
  (p) => ({ value: p.id, label: p.name, dir: "auto" })
2968
2980
  )
@@ -2970,11 +2982,11 @@ function Wn({
2970
2982
  return a === "combobox" ? /* @__PURE__ */ k("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2971
2983
  l,
2972
2984
  /* @__PURE__ */ n(
2973
- cn,
2985
+ dn,
2974
2986
  {
2975
2987
  options: m,
2976
- value: t ?? Ee,
2977
- onValueChange: (p) => i(p === "" ? Ee : p),
2988
+ value: t ?? Fe,
2989
+ onValueChange: (p) => i(p === "" ? Fe : p),
2978
2990
  placeholder: c("booking.operator.placeholder"),
2979
2991
  "aria-label": c("booking.operator.heading"),
2980
2992
  clearable: !0
@@ -2986,7 +2998,7 @@ function Wn({
2986
2998
  Yt,
2987
2999
  {
2988
3000
  options: m,
2989
- value: t ?? Ee,
3001
+ value: t ?? Fe,
2990
3002
  onValueChange: (p) => i(p),
2991
3003
  placeholder: c("booking.operator.placeholder"),
2992
3004
  "aria-label": c("booking.operator.heading")
@@ -3003,7 +3015,7 @@ function Yn({
3003
3015
  /* @__PURE__ */ n(ae.Description, { children: t("booking.onboardingIncomplete.description") })
3004
3016
  ] });
3005
3017
  }
3006
- function mn({
3018
+ function pn({
3007
3019
  nextAvailableDate: e,
3008
3020
  onJump: t,
3009
3021
  locale: s
@@ -3011,7 +3023,7 @@ function mn({
3011
3023
  const { t: i } = Q("ui"), r = q(() => {
3012
3024
  try {
3013
3025
  return new Intl.DateTimeFormat(s, { dateStyle: "long" }).format(
3014
- he(e)
3026
+ ge(e)
3015
3027
  );
3016
3028
  } catch {
3017
3029
  return e;
@@ -3040,19 +3052,19 @@ function si({
3040
3052
  onModify: g,
3041
3053
  focusWasLost: I
3042
3054
  }) {
3043
- const { t: u } = Q("ui"), F = M(null);
3055
+ const { t: u } = Q("ui"), E = M(null);
3044
3056
  z(() => {
3045
- const D = F.current, B = document.activeElement, P = D == null ? void 0 : D.closest('[data-component="booking"]');
3046
- !r && !e || !D || (B && (P != null && P.contains(B)) || I()) && D.focus();
3057
+ const A = E.current, L = document.activeElement, P = A == null ? void 0 : A.closest('[data-component="booking"]');
3058
+ !r && !e || !A || (L && (P != null && P.contains(L)) || I()) && A.focus();
3047
3059
  }, []);
3048
- const N = ln(a), x = $n(
3060
+ const N = un(a), x = Vn(
3049
3061
  N,
3050
3062
  c.details.confirmationChannels
3051
3063
  ).map(
3052
- (D) => u(`booking.confirmation.channel.${D}`)
3053
- ), A = r ? Wt(r.amountCents, r.currencyCode, f) : "", _ = r ? u(
3064
+ (A) => u(`booking.confirmation.channel.${A}`)
3065
+ ), O = r ? Wt(r.amountCents, r.currencyCode, f) : "", _ = r ? u(
3054
3066
  v === "demo" ? "booking.payment.paidDemo" : "booking.payment.paidBody",
3055
- { amount: A }
3067
+ { amount: O }
3056
3068
  ) : e ? u(v === "demo" ? "booking.code.confirmedDemo" : "booking.code.confirmedBody") : v === "demo" ? u("booking.success.descriptionDemo") : x.length > 1 ? u("booking.success.descriptionMultiple", {
3057
3069
  channels: x.join(" · ")
3058
3070
  }) : u("booking.success.descriptionSingle", {
@@ -3064,42 +3076,42 @@ function si({
3064
3076
  weekday: "long",
3065
3077
  day: "numeric",
3066
3078
  month: "long"
3067
- }).format(he(c.date));
3079
+ }).format(ge(c.date));
3068
3080
  } catch {
3069
3081
  return c.date;
3070
3082
  }
3071
3083
  }, [c.date, f]), b = q(() => {
3072
- const B = (c.operatorIds && c.operatorIds.length > 0 ? c.operatorIds : c.operatorId ? [c.operatorId] : []).filter((P) => P !== Ee).map((P) => {
3073
- var O;
3074
- return (O = l.find((y) => y.id === P)) == null ? void 0 : O.name;
3084
+ const L = (c.operatorIds && c.operatorIds.length > 0 ? c.operatorIds : c.operatorId ? [c.operatorId] : []).filter((P) => P !== Fe).map((P) => {
3085
+ var D;
3086
+ return (D = l.find((y) => y.id === P)) == null ? void 0 : D.name;
3075
3087
  }).filter((P) => P !== void 0);
3076
- if (B.length === 0) return [];
3088
+ if (L.length === 0) return [];
3077
3089
  try {
3078
3090
  return new Intl.ListFormat(f === "en" ? "en-GB" : f, {
3079
3091
  style: "long",
3080
3092
  type: "conjunction"
3081
- }).formatToParts(B);
3093
+ }).formatToParts(L);
3082
3094
  } catch {
3083
- return B.flatMap((P, O) => [
3084
- ...O > 0 ? [{ type: "literal", value: ", " }] : [],
3095
+ return L.flatMap((P, D) => [
3096
+ ...D > 0 ? [{ type: "literal", value: ", " }] : [],
3085
3097
  { type: "element", value: P }
3086
3098
  ]);
3087
3099
  }
3088
- }, [c.operatorIds, c.operatorId, l, f]), C = c.specialtyId ? m.find((D) => D.id === c.specialtyId) : void 0, V = c.serviceId ? p.find((D) => D.id === c.serviceId) : void 0;
3100
+ }, [c.operatorIds, c.operatorId, l, f]), C = c.specialtyId ? m.find((A) => A.id === c.specialtyId) : void 0, V = c.serviceId ? p.find((A) => A.id === c.serviceId) : void 0;
3089
3101
  if (t) {
3090
- let D;
3102
+ let A;
3091
3103
  if (c.date)
3092
3104
  try {
3093
- D = new Intl.DateTimeFormat(f, {
3105
+ A = new Intl.DateTimeFormat(f, {
3094
3106
  weekday: "short",
3095
3107
  day: "numeric",
3096
3108
  month: "short"
3097
- }).format(he(c.date));
3109
+ }).format(ge(c.date));
3098
3110
  } catch {
3099
- D = c.date;
3111
+ A = c.date;
3100
3112
  }
3101
- const B = (V == null ? void 0 : V.label) ?? (C == null ? void 0 : C.label), P = b.map(
3102
- (O, y) => O.type === "element" ? /* @__PURE__ */ n("bdi", { children: O.value }, y) : O.value
3113
+ const L = (V == null ? void 0 : V.label) ?? (C == null ? void 0 : C.label), P = b.map(
3114
+ (D, y) => D.type === "element" ? /* @__PURE__ */ n("bdi", { children: D.value }, y) : D.value
3103
3115
  );
3104
3116
  return /* @__PURE__ */ n(
3105
3117
  Pr,
@@ -3107,15 +3119,15 @@ function si({
3107
3119
  url: t,
3108
3120
  delayMs: zr(s),
3109
3121
  onNavigate: i,
3110
- date: D,
3122
+ date: A,
3111
3123
  time: Jt(c.date, c.slot.time, f),
3112
- details: B || P.length > 0 ? /* @__PURE__ */ k(oe, { children: [
3113
- B ? /* @__PURE__ */ n("bdi", { children: B }) : null,
3114
- B && P.length > 0 ? " · " : null,
3124
+ details: L || P.length > 0 ? /* @__PURE__ */ k(oe, { children: [
3125
+ L ? /* @__PURE__ */ n("bdi", { children: L }) : null,
3126
+ L && P.length > 0 ? " · " : null,
3115
3127
  P
3116
3128
  ] }) : void 0,
3117
- shouldTakeFocus: (O) => {
3118
- const y = document.activeElement, X = O.closest('[data-component="booking"]');
3129
+ shouldTakeFocus: (D) => {
3130
+ const y = document.activeElement, X = D.closest('[data-component="booking"]');
3119
3131
  return !!(y && (X != null && X.contains(y)) || I());
3120
3132
  }
3121
3133
  }
@@ -3132,7 +3144,7 @@ function si({
3132
3144
  ae.Title,
3133
3145
  {
3134
3146
  as: "h3",
3135
- ref: F,
3147
+ ref: E,
3136
3148
  tabIndex: r || e ? -1 : void 0,
3137
3149
  className: r || e ? yt : void 0,
3138
3150
  children: u(
@@ -3145,7 +3157,7 @@ function si({
3145
3157
  /* @__PURE__ */ n("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[var(--secondary)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ k("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: [
3146
3158
  r && v !== "demo" ? /* @__PURE__ */ k(oe, { children: [
3147
3159
  /* @__PURE__ */ n("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: u("booking.payment.summaryPaid") }),
3148
- /* @__PURE__ */ n("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: A })
3160
+ /* @__PURE__ */ n("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: O })
3149
3161
  ] }) : null,
3150
3162
  C ? /* @__PURE__ */ k(oe, { children: [
3151
3163
  /* @__PURE__ */ n("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: u("booking.success.summarySpecialty") }),
@@ -3178,7 +3190,7 @@ function si({
3178
3190
  b.length > 0 ? /* @__PURE__ */ k(oe, { children: [
3179
3191
  /* @__PURE__ */ n("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: u("booking.success.summaryProvider") }),
3180
3192
  /* @__PURE__ */ n("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: b.map(
3181
- (D, B) => D.type === "element" ? /* @__PURE__ */ n("bdi", { children: D.value }, B) : D.value
3193
+ (A, L) => A.type === "element" ? /* @__PURE__ */ n("bdi", { children: A.value }, L) : A.value
3182
3194
  ) })
3183
3195
  ] }) : null
3184
3196
  ] }) }),
@@ -3193,7 +3205,7 @@ function si({
3193
3205
  function Zn({ customSlot: e }) {
3194
3206
  const { t } = Q("ui");
3195
3207
  return e ? /* @__PURE__ */ n(oe, { children: e }) : /* @__PURE__ */ n(
3196
- Dn,
3208
+ An,
3197
3209
  {
3198
3210
  variant: "no-results",
3199
3211
  title: t("booking.emptyServices.title"),
@@ -3221,7 +3233,7 @@ function ie({
3221
3233
  }
3222
3234
  );
3223
3235
  }
3224
- function pn(e, t) {
3236
+ function fn(e, t) {
3225
3237
  return t === "four-day-grid" ? e.filter((s) => s !== 6) : e;
3226
3238
  }
3227
3239
  function ii(e) {
@@ -3242,12 +3254,12 @@ function ii(e) {
3242
3254
  servicePickerStyle: g,
3243
3255
  showServiceDuration: I,
3244
3256
  operatorPickerStyle: u,
3245
- submitting: F,
3257
+ submitting: E,
3246
3258
  locale: N,
3247
3259
  detailsProps: w,
3248
3260
  agentIdBase: x,
3249
- activeStep: A
3250
- } = e, { t: _ } = Q("ui"), R = kt(A, h), b = (C, V) => ({
3261
+ activeStep: O
3262
+ } = e, { t: _ } = Q("ui"), R = kt(O, h), b = (C, V) => ({
3251
3263
  step: C,
3252
3264
  active: C === R,
3253
3265
  className: V
@@ -3266,7 +3278,7 @@ function ii(e) {
3266
3278
  specialties: t.filtered.specialties,
3267
3279
  value: i.specialtyId,
3268
3280
  valueIds: i.specialtyIds,
3269
- onChange: (C) => r(En(i, C)),
3281
+ onChange: (C) => r(On(i, C)),
3270
3282
  onChangeIds: (C) => r(Fn(i, C)),
3271
3283
  pickerStyle: d
3272
3284
  }
@@ -3277,8 +3289,8 @@ function ii(e) {
3277
3289
  services: t.filtered.services,
3278
3290
  value: i.serviceId,
3279
3291
  valueIds: i.serviceIds,
3280
- onChange: (C) => r(_n(i, C)),
3281
- onChangeIds: (C) => r(Rn(i, C)),
3292
+ onChange: (C) => r(En(i, C)),
3293
+ onChangeIds: (C) => r(_n(i, C)),
3282
3294
  pickerStyle: g,
3283
3295
  showDuration: I
3284
3296
  }
@@ -3290,7 +3302,7 @@ function ii(e) {
3290
3302
  operators: t.filtered.operators,
3291
3303
  value: i.operatorId,
3292
3304
  valueIds: i.operatorIds,
3293
- onChange: (C) => r(Ln(i, C)),
3305
+ onChange: (C) => r(Rn(i, C)),
3294
3306
  onChangeIds: (C) => r(Bn(i, C)),
3295
3307
  pickerStyle: u
3296
3308
  }
@@ -3302,7 +3314,7 @@ function ii(e) {
3302
3314
  children: [
3303
3315
  /* @__PURE__ */ n("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: _("booking.date.heading") }),
3304
3316
  s.availableDates.length === 0 && s.nextAvailableDate ? /* @__PURE__ */ n(
3305
- mn,
3317
+ pn,
3306
3318
  {
3307
3319
  nextAvailableDate: s.nextAvailableDate,
3308
3320
  onJump: () => r(Zt(i, s.nextAvailableDate)),
@@ -3341,13 +3353,13 @@ function ii(e) {
3341
3353
  }
3342
3354
  ) : null,
3343
3355
  t.gates.details && t.selectedSlot ? /* @__PURE__ */ n(ie, { ...b(7), children: /* @__PURE__ */ n(
3344
- un,
3356
+ mn,
3345
3357
  {
3346
3358
  ...w,
3347
3359
  value: i.details ?? {},
3348
3360
  onChange: (C) => r({ ...i, details: C }),
3349
3361
  onSubmit: a,
3350
- submitting: F,
3362
+ submitting: E,
3351
3363
  defaultPhoneCountry: e.policy.country
3352
3364
  }
3353
3365
  ) }) : null
@@ -3369,11 +3381,11 @@ function Ie(e, t, s = {}) {
3369
3381
  datePickerStyle: g,
3370
3382
  specialtyPickerStyle: I,
3371
3383
  servicePickerStyle: u,
3372
- showServiceDuration: F,
3384
+ showServiceDuration: E,
3373
3385
  operatorPickerStyle: N,
3374
3386
  submitting: w,
3375
3387
  locale: x,
3376
- detailsProps: A,
3388
+ detailsProps: O,
3377
3389
  policy: _,
3378
3390
  agentIdBase: R
3379
3391
  } = t;
@@ -3393,7 +3405,7 @@ function Ie(e, t, s = {}) {
3393
3405
  specialties: i.filtered.specialties,
3394
3406
  value: a.specialtyId,
3395
3407
  valueIds: a.specialtyIds,
3396
- onChange: (b) => c(En(a, b)),
3408
+ onChange: (b) => c(On(a, b)),
3397
3409
  onChangeIds: (b) => c(Fn(a, b)),
3398
3410
  pickerStyle: I
3399
3411
  }
@@ -3405,11 +3417,11 @@ function Ie(e, t, s = {}) {
3405
3417
  services: i.filtered.services,
3406
3418
  value: a.serviceId,
3407
3419
  valueIds: a.serviceIds,
3408
- onChange: (b) => c(_n(a, b)),
3409
- onChangeIds: (b) => c(Rn(a, b)),
3420
+ onChange: (b) => c(En(a, b)),
3421
+ onChangeIds: (b) => c(_n(a, b)),
3410
3422
  pickerStyle: u,
3411
3423
  compact: s.compactService,
3412
- showDuration: F
3424
+ showDuration: E
3413
3425
  }
3414
3426
  );
3415
3427
  case 4:
@@ -3419,14 +3431,14 @@ function Ie(e, t, s = {}) {
3419
3431
  operators: i.filtered.operators,
3420
3432
  value: a.operatorId,
3421
3433
  valueIds: a.operatorIds,
3422
- onChange: (b) => c(Ln(a, b)),
3434
+ onChange: (b) => c(Rn(a, b)),
3423
3435
  onChangeIds: (b) => c(Bn(a, b)),
3424
3436
  pickerStyle: N
3425
3437
  }
3426
3438
  );
3427
3439
  case 5:
3428
3440
  return r.availableDates.length === 0 && r.nextAvailableDate ? /* @__PURE__ */ n(
3429
- mn,
3441
+ pn,
3430
3442
  {
3431
3443
  nextAvailableDate: r.nextAvailableDate,
3432
3444
  onJump: () => c(Zt(a, r.nextAvailableDate)),
@@ -3455,9 +3467,9 @@ function Ie(e, t, s = {}) {
3455
3467
  });
3456
3468
  case 7:
3457
3469
  return i.selectedSlot ? /* @__PURE__ */ n(
3458
- un,
3470
+ mn,
3459
3471
  {
3460
- ...A,
3472
+ ...O,
3461
3473
  value: a.details ?? {},
3462
3474
  onChange: (b) => c({ ...a, details: b }),
3463
3475
  onSubmit: l,
@@ -3490,7 +3502,7 @@ function kt(e, t) {
3490
3502
  }
3491
3503
  function oi(e) {
3492
3504
  const { cascade: t, value: s, activeStep: i, setActiveStep: r, datePickerStyle: a } = e, c = Xt(), { t: l } = Q("ui"), m = l("booking.operator.all"), p = q(
3493
- () => pn(t.visibleSteps, a),
3505
+ () => fn(t.visibleSteps, a),
3494
3506
  [t.visibleSteps, a]
3495
3507
  ), f = kt(i, a), v = Math.max(0, p.indexOf(f)), h = q(
3496
3508
  () => p.map((d) => ({
@@ -3525,7 +3537,7 @@ function ai(e, t, s) {
3525
3537
  return ze(e, t) && e < s.currentStep ? "completed" : e <= s.currentStep ? "unlocked" : void 0;
3526
3538
  }
3527
3539
  function In(e, t) {
3528
- return e !== 4 ? ze(e, t) : t.operatorIds && t.operatorIds.length > 0 ? !0 : Vn(t) !== void 0;
3540
+ return e !== 4 ? ze(e, t) : t.operatorIds && t.operatorIds.length > 0 ? !0 : Pn(t) !== void 0;
3529
3541
  }
3530
3542
  function rn(e, t) {
3531
3543
  const s = e.map((i) => {
@@ -3548,7 +3560,7 @@ function Qn(e, t, s, i) {
3548
3560
  case 3:
3549
3561
  return rn(Ke(t), s.filtered.services);
3550
3562
  case 4: {
3551
- const c = an(t).filter((m) => m !== Ee), l = rn(
3563
+ const c = an(t).filter((m) => m !== Fe), l = rn(
3552
3564
  c,
3553
3565
  s.filtered.operators.map((m) => ({
3554
3566
  id: m.id,
@@ -3677,7 +3689,7 @@ function di(e) {
3677
3689
  }
3678
3690
  function li(e) {
3679
3691
  const { cascade: t, value: s, activeStep: i, setActiveStep: r, datePickerStyle: a } = e, { t: c } = Q("ui"), l = Xt(), m = q(
3680
- () => pn(t.visibleSteps, a),
3692
+ () => fn(t.visibleSteps, a),
3681
3693
  [t.visibleSteps, a]
3682
3694
  ), p = kt(i, a), f = Math.max(0, m.indexOf(p)), v = m.length, h = q(
3683
3695
  () => m.map((u) => ({ label: l[u] })),
@@ -3717,10 +3729,10 @@ function li(e) {
3717
3729
  ] });
3718
3730
  }
3719
3731
  const ui = [], mi = [];
3720
- function Nn() {
3732
+ function pi() {
3721
3733
  return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
3722
3734
  }
3723
- const pi = wn(
3735
+ const fi = Nn(
3724
3736
  ({
3725
3737
  variant: e = "inline-list",
3726
3738
  country: t,
@@ -3742,45 +3754,45 @@ const pi = wn(
3742
3754
  emailOptional: g = !1,
3743
3755
  requireCodiceFiscale: I,
3744
3756
  requireDateOfBirth: u,
3745
- requireInsuranceNumber: F,
3757
+ requireInsuranceNumber: E,
3746
3758
  billingInDetails: N = !1,
3747
3759
  paymentNoticeStyle: w = "highlighted",
3748
3760
  showNote: x,
3749
- showReturningPatientFlag: A,
3761
+ showReturningPatientFlag: O,
3750
3762
  privacyPolicyUrl: _,
3751
3763
  termsUrl: R,
3752
3764
  practiceConsent: b,
3753
3765
  paymentTermsUrl: C,
3754
3766
  paymentState: V,
3755
- handoverDelayMs: D,
3756
- onNavigate: B,
3767
+ handoverDelayMs: A,
3768
+ onNavigate: L,
3757
3769
  renderPayment: P,
3758
- renderPaymentCompletion: O,
3770
+ renderPaymentCompletion: D,
3759
3771
  validateCodiceFiscale: y,
3760
3772
  validateInsuranceNumber: X,
3761
3773
  confirmationChannels: ee,
3762
- defaultConfirmationChannels: Fe,
3774
+ defaultConfirmationChannels: Ee,
3763
3775
  singleConfirmationChannel: _e,
3764
- value: E,
3765
- onChange: K,
3766
- onSubmit: G,
3776
+ value: F,
3777
+ onChange: W,
3778
+ onSubmit: Y,
3767
3779
  codeStep: te,
3768
3780
  onStepChange: Re,
3769
3781
  onDateSelect: et,
3770
- onWindowChange: ve,
3782
+ onWindowChange: he,
3771
3783
  datePickerStyle: se = "month-calendar",
3772
3784
  specialtyPickerStyle: fe,
3773
- servicePickerStyle: ke,
3774
- showServiceDuration: Se = !0,
3785
+ servicePickerStyle: ye,
3786
+ showServiceDuration: ke = !0,
3775
3787
  operatorPickerStyle: Ce,
3776
3788
  loadingDates: de,
3777
- loadingSlots: Le,
3789
+ loadingSlots: Be,
3778
3790
  submitting: ne,
3779
3791
  submitError: ue,
3780
3792
  mode: At = "live",
3781
- showModifyOnSuccess: Be = !0,
3793
+ showModifyOnSuccess: Le = !0,
3782
3794
  surface: tt = "flat",
3783
- emptyServicesSlot: j,
3795
+ emptyServicesSlot: K,
3784
3796
  onboardingIncompleteSlot: Te,
3785
3797
  "aria-label": Qt,
3786
3798
  id: je,
@@ -3790,16 +3802,16 @@ const pi = wn(
3790
3802
  ...Ae
3791
3803
  }, en) => {
3792
3804
  var It, Nt, wt;
3793
- const { t: ce, i18n: Ot } = Q("ui"), me = e ?? "inline-list", Pe = Ot.language ?? "en", De = l ?? ui, be = p ?? mi;
3805
+ const { t: ce, i18n: Mt } = Q("ui"), me = e ?? "inline-list", Pe = Mt.language ?? "en", De = l ?? ui, ve = p ?? mi;
3794
3806
  z(() => {
3795
- const T = lr(E, {
3807
+ const T = lr(F, {
3796
3808
  useSpecialties: s,
3797
3809
  lockedOperatorId: r,
3798
3810
  autoSelectSingleService: c,
3799
3811
  specialties: De,
3800
3812
  services: m
3801
3813
  });
3802
- (T.specialtyId !== E.specialtyId || T.operatorId !== E.operatorId || T.serviceId !== E.serviceId) && K(T);
3814
+ (T.specialtyId !== F.specialtyId || T.operatorId !== F.operatorId || T.serviceId !== F.serviceId) && W(T);
3803
3815
  }, [
3804
3816
  r,
3805
3817
  s,
@@ -3816,9 +3828,9 @@ const pi = wn(
3816
3828
  operatorsByService: a,
3817
3829
  specialties: De,
3818
3830
  services: m,
3819
- operators: be,
3831
+ operators: ve,
3820
3832
  availableSlots: v,
3821
- value: E
3833
+ value: F
3822
3834
  }),
3823
3835
  [
3824
3836
  t,
@@ -3829,53 +3841,53 @@ const pi = wn(
3829
3841
  c,
3830
3842
  De,
3831
3843
  m,
3832
- be,
3844
+ ve,
3833
3845
  f,
3834
3846
  v,
3835
- E
3847
+ F
3836
3848
  ]
3837
3849
  ), dt = q(
3838
3850
  () => [
3839
- JSON.stringify(E.insuranceType),
3840
- JSON.stringify(Qe(E)),
3841
- JSON.stringify(Ke(E)),
3842
- JSON.stringify(an(E)),
3843
- JSON.stringify(E.date),
3844
- JSON.stringify(E.slotKey)
3851
+ JSON.stringify(F.insuranceType),
3852
+ JSON.stringify(Qe(F)),
3853
+ JSON.stringify(Ke(F)),
3854
+ JSON.stringify(an(F)),
3855
+ JSON.stringify(F.date),
3856
+ JSON.stringify(F.slotKey)
3845
3857
  ],
3846
- [E]
3847
- ), nt = me === "progress", st = ye(
3858
+ [F]
3859
+ ), nt = me === "progress", st = be(
3848
3860
  (T) => {
3849
- if (T === 4 && $.visibleSteps.includes(4) && an(E).length === 0)
3861
+ if (T === 4 && $.visibleSteps.includes(4) && an(F).length === 0)
3850
3862
  return Math.min(4, $.currentStep);
3851
3863
  if (!nt) return $.currentStep;
3852
3864
  const o = $.visibleSteps.find(
3853
- (S) => S > T && !In(S, E)
3865
+ (S) => S > T && !In(S, F)
3854
3866
  );
3855
3867
  return o === void 0 ? $.currentStep : Math.min(o, $.currentStep);
3856
3868
  },
3857
- [nt, $.visibleSteps, $.currentStep, E]
3858
- ), [le, Oe] = H(
3869
+ [nt, $.visibleSteps, $.currentStep, F]
3870
+ ), [le, Me] = U(
3859
3871
  $.currentStep
3860
3872
  ), He = M(dt), Ge = M($.visibleSteps);
3861
3873
  z(() => {
3862
3874
  const T = He.current, o = Ge.current;
3863
3875
  He.current = dt, Ge.current = $.visibleSteps;
3864
3876
  const S = dt.findIndex(
3865
- (Z, fn) => Z !== T[fn]
3877
+ (Z, gn) => Z !== T[gn]
3866
3878
  );
3867
3879
  if (S !== -1) {
3868
- Oe(st(S + 1));
3880
+ Me(st(S + 1));
3869
3881
  return;
3870
3882
  }
3871
- const L = nt ? $.visibleSteps.find(
3872
- (Z) => Z < le && !o.includes(Z) && !In(Z, E)
3883
+ const B = nt ? $.visibleSteps.find(
3884
+ (Z) => Z < le && !o.includes(Z) && !In(Z, F)
3873
3885
  ) : void 0;
3874
- if (L !== void 0) {
3875
- Oe(L);
3886
+ if (B !== void 0) {
3887
+ Me(B);
3876
3888
  return;
3877
3889
  }
3878
- $.visibleSteps.includes(le) || Oe($.currentStep);
3890
+ $.visibleSteps.includes(le) || Me($.currentStep);
3879
3891
  }, [
3880
3892
  dt,
3881
3893
  st,
@@ -3883,12 +3895,12 @@ const pi = wn(
3883
3895
  $.currentStep,
3884
3896
  $.visibleSteps,
3885
3897
  le,
3886
- E
3898
+ F
3887
3899
  ]);
3888
- const ge = M(null), Ve = q(
3889
- () => pn($.visibleSteps, se),
3900
+ const Se = M(null), Ve = q(
3901
+ () => fn($.visibleSteps, se),
3890
3902
  [$.visibleSteps, se]
3891
- ), Mt = Xt(), [Me, $e] = H(""), Je = M(null), xe = M(null);
3903
+ ), Ot = Xt(), [Oe, $e] = U(""), Je = M(null), xe = M(null);
3892
3904
  z(() => {
3893
3905
  const T = kt(le, se);
3894
3906
  if (xe.current === null) {
@@ -3902,77 +3914,69 @@ const pi = wn(
3902
3914
  o === -1 ? "" : ce("booking.stepAnnouncement", {
3903
3915
  current: o + 1,
3904
3916
  total: Ve.length,
3905
- label: Mt[T]
3917
+ label: Ot[T]
3906
3918
  })
3907
3919
  );
3908
3920
  const S = Je.current;
3909
3921
  if (!S || S.isConnected) return;
3910
- const L = ge.current;
3911
- if (!L) return;
3922
+ const B = Se.current;
3923
+ if (!B) return;
3912
3924
  const Z = document.activeElement;
3913
- if (!(Z === null || Z === document.body || !L.contains(Z))) return;
3914
- const Vt = L.querySelector(ri) ?? L;
3925
+ if (!(Z === null || Z === document.body || !B.contains(Z))) return;
3926
+ const Vt = B.querySelector(ri) ?? B;
3915
3927
  if (Vt.focus({ preventScroll: !0 }), typeof Vt.scrollIntoView == "function")
3916
3928
  try {
3917
3929
  Vt.scrollIntoView({
3918
- behavior: Nn() ? "auto" : "smooth",
3930
+ behavior: pi() ? "auto" : "smooth",
3919
3931
  block: "nearest"
3920
3932
  });
3921
3933
  } catch {
3922
3934
  Vt.scrollIntoView();
3923
3935
  }
3924
- }, [le, se, Ve, Mt, ce]);
3925
- const U = _r({
3936
+ }, [le, se, Ve, Ot, ce]);
3937
+ const j = _r({
3926
3938
  services: m,
3927
- value: E,
3939
+ value: F,
3928
3940
  availableSlots: v,
3929
- onSubmit: G,
3930
- onChange: K,
3941
+ onSubmit: Y,
3942
+ onChange: W,
3931
3943
  paymentState: V,
3932
3944
  submitting: ne,
3933
3945
  paymentTermsUrl: C,
3934
3946
  renderPayment: P,
3935
3947
  codeStep: te
3936
- }), W = U.status, lt = U.submit, rt = M(U.reset);
3937
- rt.current = U.reset;
3938
- const ut = M(!1), [Et, Ft] = H(!1);
3948
+ }), G = j.status, lt = j.submit, rt = M(j.reset);
3949
+ rt.current = j.reset;
3950
+ const ut = M(!1), [Ft, Et] = U(!1);
3939
3951
  z(() => {
3940
3952
  var o, S;
3941
- if (!ut.current || W !== "idle") return;
3953
+ if (!ut.current || G !== "idle") return;
3942
3954
  ut.current = !1;
3943
- const T = (o = ge.current) == null ? void 0 : o.querySelector(
3955
+ const T = (o = Se.current) == null ? void 0 : o.querySelector(
3944
3956
  'form input:not([type="hidden"]):not(:disabled), form select:not(:disabled), form textarea:not(:disabled)'
3945
3957
  );
3946
3958
  T && (T.focus({ preventScroll: !0 }), (S = T.scrollIntoView) == null || S.call(T, { block: "nearest" }));
3947
- }, [W]);
3948
- const We = at(), mt = M(null), pt = M(null), _t = ((It = U.state) == null ? void 0 : It.status) === "failed", ft = U.state && "phase" in U.state && U.state.phase === "completion";
3959
+ }, [G]);
3960
+ const We = at(), mt = M(null), pt = M(null), _t = ((It = j.state) == null ? void 0 : It.status) === "failed", ft = j.state && "phase" in j.state && j.state.phase === "completion";
3949
3961
  z(() => {
3950
3962
  var T, o;
3951
- if (W === "payment") {
3963
+ if (G === "payment") {
3952
3964
  const S = document.activeElement;
3953
- (!ft || !S || S === document.body || !((T = ge.current) != null && T.contains(S))) && ((o = mt.current) == null || o.focus());
3965
+ (!ft || !S || S === document.body || !((T = Se.current) != null && T.contains(S))) && ((o = mt.current) == null || o.focus());
3954
3966
  }
3955
- }, [W, ft]), z(() => {
3967
+ }, [G, ft]), z(() => {
3956
3968
  var T;
3957
- W === "payment" && _t && ((T = pt.current) == null || T.focus());
3958
- }, [W, _t]), ns(en, () => ge.current, []);
3959
- const Ye = W === "success" ? 8 : W === "payment" || W === "code" ? 7 : $.currentStep, Rt = M(null);
3969
+ G === "payment" && _t && ((T = pt.current) == null || T.focus());
3970
+ }, [G, _t]), ns(en, () => Se.current, []);
3971
+ const Ye = G === "success" ? 8 : G === "payment" || G === "code" ? 7 : $.currentStep, Rt = M(null);
3960
3972
  z(() => {
3961
- if (Ye !== Rt.current && (Rt.current = Ye, Re == null || Re(Ye), Ye === 8 && ge.current))
3962
- try {
3963
- ge.current.scrollIntoView({
3964
- behavior: Nn() ? "auto" : "smooth",
3965
- block: "start"
3966
- });
3967
- } catch {
3968
- ge.current.scrollIntoView();
3969
- }
3973
+ Ye !== Rt.current && (Rt.current = Ye, Re == null || Re(Ye), Ye === 8 && qn(Se.current, "start"));
3970
3974
  }, [Ye, Re]);
3971
- const Ze = M({ activeStep: le, cascade: $, submitState: W });
3975
+ const Ze = M({ activeStep: le, cascade: $, submitState: G });
3972
3976
  z(() => {
3973
- Ze.current = { activeStep: le, cascade: $, submitState: W };
3974
- }, [le, $, W]);
3975
- const Lt = q(
3977
+ Ze.current = { activeStep: le, cascade: $, submitState: G };
3978
+ }, [le, $, G]);
3979
+ const Bt = q(
3976
3980
  () => ({
3977
3981
  getVariant: () => me,
3978
3982
  getCurrentStep: () => {
@@ -3980,23 +3984,23 @@ const pi = wn(
3980
3984
  return T.submitState === "success" ? 8 : T.submitState === "payment" || T.submitState === "code" ? 7 : T.activeStep;
3981
3985
  },
3982
3986
  reset: () => {
3983
- Ze.current.submitState === "payment" || Ze.current.submitState === "code" || (K({}), rt.current(), Oe(1));
3987
+ Ze.current.submitState === "payment" || Ze.current.submitState === "code" || (W({}), rt.current(), Me(1));
3984
3988
  },
3985
3989
  goToStep: (T) => {
3986
- const o = Ze.current, S = o.cascade.visibleSteps.includes(T), L = o.cascade.currentStep, Z = o.submitState === "payment" || o.submitState === "code" ? 7 : !S || T > L ? L : T;
3987
- Ze.current = { ...o, activeStep: Z }, Oe(Z);
3990
+ const o = Ze.current, S = o.cascade.visibleSteps.includes(T), B = o.cascade.currentStep, Z = o.submitState === "payment" || o.submitState === "code" ? 7 : !S || T > B ? B : T;
3991
+ Ze.current = { ...o, activeStep: Z }, Me(Z);
3988
3992
  }
3989
3993
  }),
3990
- [me, K]
3994
+ [me, W]
3991
3995
  );
3992
- ss(nr, Lt, je);
3993
- const tn = Qt ?? ce("booking.regionLabel"), pe = U.snapshot, Bt = W === "success" && pe ? /* @__PURE__ */ n(
3996
+ ss(nr, Bt, je);
3997
+ const tn = Qt ?? ce("booking.regionLabel"), pe = j.snapshot, Lt = G === "success" && pe ? /* @__PURE__ */ n(
3994
3998
  si,
3995
3999
  {
3996
- codeVerified: U.codeVerified,
3997
- handoverUrl: $r(U.redirectUrl),
3998
- handoverDelayMs: D,
3999
- onNavigate: B,
4000
+ codeVerified: j.codeVerified,
4001
+ handoverUrl: $r(j.redirectUrl),
4002
+ handoverDelayMs: A,
4003
+ onNavigate: L,
4000
4004
  payment: pe.payment,
4001
4005
  confirmationChannels: ee,
4002
4006
  snapshot: {
@@ -4005,40 +4009,40 @@ const pi = wn(
4005
4009
  details: pe.details,
4006
4010
  serviceId: ((Nt = pe.payment) == null ? void 0 : Nt.serviceId) ?? pe.slot.serviceId ?? pe.value.serviceId
4007
4011
  },
4008
- operators: be,
4012
+ operators: ve,
4009
4013
  specialties: De,
4010
4014
  services: m,
4011
4015
  locale: Pe,
4012
4016
  mode: At,
4013
- showModify: Be && !pe.payment && !U.codeVerified,
4014
- onReset: () => Lt.reset(),
4017
+ showModify: Le && !pe.payment && !j.codeVerified,
4018
+ onReset: () => Bt.reset(),
4015
4019
  focusWasLost: () => {
4016
4020
  const T = Je.current, o = document.activeElement;
4017
4021
  return !!(T && !T.isConnected) && (!o || o === document.body);
4018
4022
  },
4019
4023
  onModify: () => {
4020
- rt.current(), Oe(7);
4024
+ rt.current(), Me(7);
4021
4025
  }
4022
4026
  }
4023
- ) : null, gt = W === "code" && U.codeStep ? /* @__PURE__ */ n(
4024
- Mr,
4027
+ ) : null, gt = G === "code" && j.codeStep ? /* @__PURE__ */ n(
4028
+ Or,
4025
4029
  {
4026
- ...U.codeStep,
4030
+ ...j.codeStep,
4027
4031
  ...te,
4028
- onVerified: U.completeCode,
4029
- onBusyChange: Ft
4032
+ onVerified: j.completeCode,
4033
+ onBusyChange: Et
4030
4034
  }
4031
- ) : null, re = U.activeSession, Xe = U.state, Y = re && Xe ? {
4035
+ ) : null, re = j.activeSession, Xe = j.state, J = re && Xe ? {
4032
4036
  session: re,
4033
4037
  payment: re.payment,
4034
4038
  state: Xe,
4035
- billing: (wt = U.snapshot) == null ? void 0 : wt.details.billing
4036
- } : void 0, it = Xe && "phase" in Xe && Xe.phase === "completion", Pt = W === "payment" && Y ? /* @__PURE__ */ k(
4039
+ billing: (wt = j.snapshot) == null ? void 0 : wt.details.billing
4040
+ } : void 0, it = Xe && "phase" in Xe && Xe.phase === "completion", Pt = G === "payment" && J ? /* @__PURE__ */ k(
4037
4041
  "section",
4038
4042
  {
4039
4043
  "aria-labelledby": We,
4040
4044
  "data-component": "booking-payment",
4041
- "data-payment-status": Y.state.status,
4045
+ "data-payment-status": J.state.status,
4042
4046
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
4043
4047
  children: [
4044
4048
  /* @__PURE__ */ n(
@@ -4055,8 +4059,8 @@ const pi = wn(
4055
4059
  ),
4056
4060
  it ? null : /* @__PURE__ */ n("p", { className: "type-body ds:m-0", children: ce("booking.payment.noticeBody", {
4057
4061
  amount: Wt(
4058
- Y.payment.amountCents,
4059
- Y.payment.currencyCode,
4062
+ J.payment.amountCents,
4063
+ J.payment.currencyCode,
4060
4064
  Pe
4061
4065
  )
4062
4066
  }) }),
@@ -4064,56 +4068,56 @@ const pi = wn(
4064
4068
  "p",
4065
4069
  {
4066
4070
  role: "status",
4067
- className: Y.state.status === "processing" ? "type-body ds:m-0 ds:flex ds:items-center ds:gap-[var(--spacing-sm)]" : "ds:sr-only",
4068
- children: Y.state.status === "processing" ? /* @__PURE__ */ k(oe, { children: [
4069
- /* @__PURE__ */ n(Tn, { variant: "pulse", size: "lg", "aria-hidden": "true" }),
4071
+ className: J.state.status === "processing" ? "type-body ds:m-0 ds:flex ds:items-center ds:gap-[var(--spacing-sm)]" : "ds:sr-only",
4072
+ children: J.state.status === "processing" ? /* @__PURE__ */ k(oe, { children: [
4073
+ /* @__PURE__ */ n(Cn, { variant: "pulse", size: "lg", "aria-hidden": "true" }),
4070
4074
  /* @__PURE__ */ n("span", { children: ce(
4071
4075
  it ? "booking.payment.confirming" : "booking.payment.processing"
4072
4076
  ) })
4073
4077
  ] }) : null
4074
4078
  }
4075
4079
  ),
4076
- Y.state.status === "failed" ? /* @__PURE__ */ n(
4080
+ J.state.status === "failed" ? /* @__PURE__ */ n(
4077
4081
  ae,
4078
4082
  {
4079
4083
  ref: pt,
4080
4084
  variant: "error",
4081
4085
  tabIndex: -1,
4082
4086
  className: yt,
4083
- children: /* @__PURE__ */ n(ae.Description, { children: Y.state.error ?? ce(
4087
+ children: /* @__PURE__ */ n(ae.Description, { children: J.state.error ?? ce(
4084
4088
  it ? "booking.payment.completionFailed" : "booking.payment.failed"
4085
4089
  ) })
4086
4090
  }
4087
4091
  ) : null,
4088
- it ? O == null ? void 0 : O(Y) : P == null ? void 0 : P(Y)
4092
+ it ? D == null ? void 0 : D(J) : P == null ? void 0 : P(J)
4089
4093
  ]
4090
4094
  }
4091
4095
  ) : null, St = q(() => {
4092
- const T = new Set(Ke(E)), o = m.filter((S) => T.has(S.id)).map((S) => {
4093
- var L;
4096
+ const T = new Set(Ke(F)), o = m.filter((S) => T.has(S.id)).map((S) => {
4097
+ var B;
4094
4098
  return {
4095
4099
  label: S.label,
4096
- text: ((L = S.criticalInformationToAccept) == null ? void 0 : L.trim()) ?? ""
4100
+ text: ((B = S.criticalInformationToAccept) == null ? void 0 : B.trim()) ?? ""
4097
4101
  };
4098
4102
  }).filter((S) => S.text.length > 0);
4099
4103
  if (o.length !== 0)
4100
4104
  return o.length === 1 ? o[0].text : o.map((S) => `${S.label}: ${S.text}`).join(`
4101
4105
 
4102
4106
  `);
4103
- }, [m, E]), xt = q(() => {
4104
- if (W === "success" || W === "payment") return null;
4107
+ }, [m, F]), xt = q(() => {
4108
+ if (G === "success" || G === "payment") return null;
4105
4109
  const T = me === "accordion" ? oi : me === "calendar" ? ci : me === "flexible" ? di : me === "progress" ? li : ii, o = {
4106
4110
  cascade: $,
4107
4111
  inputs: {
4108
4112
  specialties: De,
4109
4113
  services: m,
4110
- operators: be,
4114
+ operators: ve,
4111
4115
  availableDates: f,
4112
4116
  availableSlots: v,
4113
4117
  nextAvailableDate: h
4114
4118
  },
4115
- value: E,
4116
- onChange: K,
4119
+ value: F,
4120
+ onChange: W,
4117
4121
  onSubmit: lt,
4118
4122
  policy: { country: t, lockedOperatorId: r },
4119
4123
  detailsProps: {
@@ -4121,61 +4125,61 @@ const pi = wn(
4121
4125
  emailOptional: g,
4122
4126
  requireCodiceFiscale: I,
4123
4127
  requireDateOfBirth: u,
4124
- requireInsuranceNumber: F,
4125
- insuranceType: E.insuranceType,
4128
+ requireInsuranceNumber: E,
4129
+ insuranceType: F.insuranceType,
4126
4130
  showNote: x,
4127
- showReturningPatientFlag: A,
4131
+ showReturningPatientFlag: O,
4128
4132
  privacyPolicyUrl: _,
4129
4133
  termsUrl: R,
4130
4134
  practiceConsent: b,
4131
4135
  criticalInformationToAccept: St,
4132
- locked: W === "code",
4133
- payment: U.payment,
4136
+ locked: G === "code",
4137
+ payment: j.payment,
4134
4138
  paymentTermsUrl: C,
4135
- paymentBlocked: U.blocked,
4139
+ paymentBlocked: j.blocked,
4136
4140
  billingInDetails: N,
4137
4141
  paymentNoticeStyle: w,
4138
4142
  validateCodiceFiscale: y,
4139
4143
  validateInsuranceNumber: X,
4140
4144
  confirmationChannels: ee,
4141
- defaultConfirmationChannels: Fe,
4145
+ defaultConfirmationChannels: Ee,
4142
4146
  singleConfirmationChannel: _e,
4143
- submitError: ue ?? (W === "error" ? ce("booking.payment.submitFailed") : void 0)
4147
+ submitError: ue ?? (G === "error" ? ce("booking.payment.submitFailed") : void 0)
4144
4148
  },
4145
- emptyServicesSlot: j,
4149
+ emptyServicesSlot: K,
4146
4150
  onboardingIncompleteSlot: Te,
4147
4151
  loadingDates: de,
4148
- loadingSlots: Le,
4152
+ loadingSlots: Be,
4149
4153
  onDateSelect: et,
4150
- onWindowChange: ve,
4154
+ onWindowChange: he,
4151
4155
  datePickerStyle: se,
4152
4156
  specialtyPickerStyle: fe,
4153
- servicePickerStyle: ke,
4154
- showServiceDuration: Se,
4157
+ servicePickerStyle: ye,
4158
+ showServiceDuration: ke,
4155
4159
  operatorPickerStyle: Ce,
4156
- submitting: ne || W === "submitting",
4160
+ submitting: ne || G === "submitting",
4157
4161
  locale: Pe,
4158
4162
  activeStep: le,
4159
- setActiveStep: Oe,
4163
+ setActiveStep: Me,
4160
4164
  agentIdBase: je
4161
4165
  };
4162
4166
  return /* @__PURE__ */ n(T, { ...o });
4163
4167
  }, [
4164
- W,
4165
- U.payment,
4166
- U.blocked,
4168
+ G,
4169
+ j.payment,
4170
+ j.blocked,
4167
4171
  C,
4168
4172
  ce,
4169
4173
  me,
4170
4174
  $,
4171
4175
  De,
4172
4176
  m,
4173
- be,
4177
+ ve,
4174
4178
  f,
4175
4179
  v,
4176
4180
  h,
4177
- E,
4178
- K,
4181
+ F,
4182
+ W,
4179
4183
  lt,
4180
4184
  t,
4181
4185
  r,
@@ -4183,12 +4187,12 @@ const pi = wn(
4183
4187
  g,
4184
4188
  I,
4185
4189
  u,
4186
- F,
4190
+ E,
4187
4191
  N,
4188
4192
  w,
4189
4193
  ue,
4190
4194
  x,
4191
- A,
4195
+ O,
4192
4196
  _,
4193
4197
  R,
4194
4198
  b,
@@ -4196,18 +4200,18 @@ const pi = wn(
4196
4200
  y,
4197
4201
  X,
4198
4202
  ee,
4199
- Fe,
4203
+ Ee,
4200
4204
  _e,
4201
- j,
4205
+ K,
4202
4206
  Te,
4203
4207
  de,
4204
- Le,
4208
+ Be,
4205
4209
  et,
4206
- ve,
4210
+ he,
4207
4211
  se,
4208
4212
  fe,
4213
+ ye,
4209
4214
  ke,
4210
- Se,
4211
4215
  Ce,
4212
4216
  ne,
4213
4217
  Pe,
@@ -4217,7 +4221,7 @@ const pi = wn(
4217
4221
  return /* @__PURE__ */ k(
4218
4222
  "div",
4219
4223
  {
4220
- ref: ge,
4224
+ ref: Se,
4221
4225
  role: "region",
4222
4226
  "aria-label": tn,
4223
4227
  id: je,
@@ -4236,14 +4240,14 @@ const pi = wn(
4236
4240
  onBlur: (T) => {
4237
4241
  const o = T.target;
4238
4242
  window.setTimeout(() => {
4239
- var L;
4243
+ var B;
4240
4244
  const S = document.activeElement;
4241
- Je.current === o && o.isConnected && !(S && ((L = ge.current) != null && L.contains(S))) && (Je.current = null);
4245
+ Je.current === o && o.isConnected && !(S && ((B = Se.current) != null && B.contains(S))) && (Je.current = null);
4242
4246
  }), Ue == null || Ue(T);
4243
4247
  },
4244
4248
  ...Ae,
4245
4249
  children: [
4246
- /* @__PURE__ */ n("div", { role: "status", className: "ds:sr-only", children: Me }),
4250
+ /* @__PURE__ */ n("div", { role: "status", className: "ds:sr-only", children: Oe }),
4247
4251
  /* @__PURE__ */ k(
4248
4252
  "div",
4249
4253
  {
@@ -4261,8 +4265,8 @@ const pi = wn(
4261
4265
  ]
4262
4266
  }
4263
4267
  ),
4264
- U.cancelled ? /* @__PURE__ */ n(ae, { variant: "info", children: /* @__PURE__ */ n(ae.Description, { children: ce("booking.payment.cancelled") }) }) : null,
4265
- Bt ?? Pt ?? /* @__PURE__ */ k(oe, { children: [
4268
+ j.cancelled ? /* @__PURE__ */ n(ae, { variant: "info", children: /* @__PURE__ */ n(ae.Description, { children: ce("booking.payment.cancelled") }) }) : null,
4269
+ Lt ?? Pt ?? /* @__PURE__ */ k(oe, { children: [
4266
4270
  te ? /* @__PURE__ */ n(
4267
4271
  "fieldset",
4268
4272
  {
@@ -4279,7 +4283,7 @@ const pi = wn(
4279
4283
  type: "button",
4280
4284
  intent: "ghost",
4281
4285
  size: "md",
4282
- disabled: Et,
4286
+ disabled: Ft,
4283
4287
  onClick: () => {
4284
4288
  ut.current = !0, rt.current();
4285
4289
  },
@@ -4294,11 +4298,11 @@ const pi = wn(
4294
4298
  );
4295
4299
  }
4296
4300
  );
4297
- pi.displayName = "Booking";
4301
+ fi.displayName = "Booking";
4298
4302
  export {
4299
- pi as B,
4303
+ fi as B,
4300
4304
  on as C,
4301
- Ee as O,
4305
+ Fe as O,
4302
4306
  nr as b
4303
4307
  };
4304
- //# sourceMappingURL=booking-dsgiuhKg.js.map
4308
+ //# sourceMappingURL=booking-CsA9IIkg.js.map