@alfadocs/ui-kit-debug 1.5.0 → 1.6.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.
- package/dist/_chunks/{booking-CGKof8QU.js → booking-D84O6H2X.js} +553 -546
- package/dist/_chunks/booking-D84O6H2X.js.map +1 -0
- package/dist/_chunks/practice-profile-hero-Bdd0bFqC.js +187 -0
- package/dist/_chunks/practice-profile-hero-Bdd0bFqC.js.map +1 -0
- package/dist/_chunks/{practice-results-DWUZRm2x.js → practice-results-CKoLD_x5.js} +220 -206
- package/dist/_chunks/practice-results-CKoLD_x5.js.map +1 -0
- package/dist/agent-catalog.json +33 -36
- package/dist/agent-i18n/en.json +6 -5
- package/dist/components/booking/booking-types.d.ts +9 -0
- package/dist/components/booking/booking-types.d.ts.map +1 -1
- package/dist/components/booking/booking.d.ts.map +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/practice-profile-hero/index.d.ts +4 -0
- package/dist/components/practice-profile-hero/index.d.ts.map +1 -0
- package/dist/components/practice-profile-hero/index.js +6 -0
- package/dist/components/practice-profile-hero/index.js.map +1 -0
- package/dist/components/practice-profile-hero/practice-profile-hero.agent.d.ts +4 -0
- package/dist/components/practice-profile-hero/practice-profile-hero.agent.d.ts.map +1 -0
- package/dist/components/practice-profile-hero/practice-profile-hero.d.ts +60 -0
- package/dist/components/practice-profile-hero/practice-profile-hero.d.ts.map +1 -0
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.d.ts +15 -1
- package/dist/components/practice-results/practice-results.d.ts.map +1 -1
- package/dist/host-compat.css +1 -4
- package/dist/i18n/locales/ar.d.ts +1 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +1 -0
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +1 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +1 -0
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +1 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +1 -0
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +1 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +1 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +1 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +1 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +1 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +1 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +1 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +1 -0
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +1 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +1 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +1 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +1 -0
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +1 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +1 -0
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +1 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +1 -0
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +1 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +1 -0
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +1 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +1 -0
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +1 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +1 -0
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +1 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +1 -0
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +1 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +1 -0
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +1 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +1 -0
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +1 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +1 -0
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +346 -343
- package/dist/index.js.map +1 -1
- package/dist/locales/ar.json +1 -0
- package/dist/locales/de.json +1 -0
- package/dist/locales/el.json +1 -0
- package/dist/locales/en.json +1 -0
- package/dist/locales/es.json +1 -0
- package/dist/locales/fr.json +1 -0
- package/dist/locales/hi.json +1 -0
- package/dist/locales/it.json +1 -0
- package/dist/locales/ja.json +1 -0
- package/dist/locales/nl.json +1 -0
- package/dist/locales/pl.json +1 -0
- package/dist/locales/pt.json +1 -0
- package/dist/locales/ro.json +1 -0
- package/dist/locales/ru.json +1 -0
- package/dist/locales/sq.json +1 -0
- package/dist/locales/sv.json +1 -0
- package/dist/locales/tr.json +1 -0
- package/dist/locales/zh.json +1 -0
- package/dist/tokens.css +1 -1
- package/package.json +5 -1
- package/dist/_chunks/booking-CGKof8QU.js.map +0 -1
- package/dist/_chunks/practice-results-DWUZRm2x.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t, jsxs as m, Fragment as Ge } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as Ze, useState as pe, useRef as _, useMemo as D, useImperativeHandle as Qe, useCallback as
|
|
2
|
+
import { forwardRef as Ze, useState as pe, useRef as _, useMemo as D, useImperativeHandle as Qe, useCallback as B, useEffect as J } from "react";
|
|
3
3
|
import { c as Z } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as C } from "react-i18next";
|
|
5
5
|
import { A as Y } from "./alert-CiJT540z.js";
|
|
@@ -21,8 +21,8 @@ import { C as Se } from "./chevron-down-DWE7GSq9.js";
|
|
|
21
21
|
import { M as te } from "./map-pin-BaY37-Km.js";
|
|
22
22
|
import { L as Ne } from "./languages-CGLX6Qpe.js";
|
|
23
23
|
import { S as Pe } from "./shield-check-DCJALLVh.js";
|
|
24
|
-
import { H as
|
|
25
|
-
import { C as
|
|
24
|
+
import { H as Ae } from "./heart--qCA4ffe.js";
|
|
25
|
+
import { C as Me } from "./calendar-clock-hbObjfGY.js";
|
|
26
26
|
/**
|
|
27
27
|
* @license lucide-react v1.22.0 - ISC
|
|
28
28
|
*
|
|
@@ -118,7 +118,7 @@ const st = [
|
|
|
118
118
|
description: "Stable result id emitted on each rendered result card. Used by scroll_to_result / focus_pin to address a single result."
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
},
|
|
121
|
+
}, ot = 13, lt = [
|
|
122
122
|
"distance",
|
|
123
123
|
"rating",
|
|
124
124
|
"next-available",
|
|
@@ -143,40 +143,51 @@ function W(e, n, s, r) {
|
|
|
143
143
|
a && (H("serp_result_clicked", { resultId: n, source: s, position: i }), r(a, s));
|
|
144
144
|
}
|
|
145
145
|
function ct(e, n) {
|
|
146
|
-
const r = (n.lat - e.lat) * Math.PI / 180, i = (n.lng - e.lng) * Math.PI / 180, a = e.lat * Math.PI / 180, c = n.lat * Math.PI / 180, d = Math.sin(r / 2),
|
|
146
|
+
const r = (n.lat - e.lat) * Math.PI / 180, i = (n.lng - e.lng) * Math.PI / 180, a = e.lat * Math.PI / 180, c = n.lat * Math.PI / 180, d = Math.sin(r / 2), o = Math.sin(i / 2), g = d * d + Math.cos(a) * Math.cos(c) * o * o;
|
|
147
147
|
return 2 * 6371 * Math.asin(Math.min(1, Math.sqrt(g)));
|
|
148
148
|
}
|
|
149
149
|
function dt(e, n, s) {
|
|
150
|
+
var i;
|
|
151
|
+
const r = [];
|
|
152
|
+
for (const a of e) {
|
|
153
|
+
const c = a.field ?? a.key, d = (((i = s == null ? void 0 : s[a.key]) == null ? void 0 : i.length) ?? 0) > 0, o = a.type === "boolean" || a.type !== "options" && a.options.length === 0 && (d || n.some(
|
|
154
|
+
(g) => typeof g[c] == "boolean"
|
|
155
|
+
));
|
|
156
|
+
!o && a.options.length === 0 || r.push({ ...a, boolean: o, booleanField: c });
|
|
157
|
+
}
|
|
158
|
+
return r;
|
|
159
|
+
}
|
|
160
|
+
function ut(e, n, s) {
|
|
150
161
|
return !n || Object.keys(n).length === 0 ? e : e.filter((r) => {
|
|
151
162
|
for (const i of s) {
|
|
152
163
|
const a = n[i.key];
|
|
153
164
|
if (!a || a.length === 0) continue;
|
|
154
|
-
if (i.
|
|
155
|
-
if (r[i.
|
|
165
|
+
if (i.boolean) {
|
|
166
|
+
if (r[i.booleanField] !== !0) return !1;
|
|
156
167
|
continue;
|
|
157
168
|
}
|
|
158
169
|
const c = i.key === "insurance" ? r.insurances : i.key === "language" ? r.languages : r[i.key];
|
|
159
|
-
if (!Array.isArray(c) || !(i.multi ? a.some((
|
|
170
|
+
if (!Array.isArray(c) || !(i.multi ? a.some((o) => c.includes(o)) : c.includes(a[0]))) return !1;
|
|
160
171
|
}
|
|
161
172
|
return !0;
|
|
162
173
|
});
|
|
163
174
|
}
|
|
164
|
-
function
|
|
175
|
+
function pt(e, n, s) {
|
|
165
176
|
const r = e.map((a) => {
|
|
166
177
|
const c = a.location ? a.location.distanceKm ?? (s ? ct(s, a.location) : void 0) : void 0;
|
|
167
178
|
return { result: a, distanceKm: c };
|
|
168
179
|
}), i = (a, c) => {
|
|
169
|
-
var d,
|
|
180
|
+
var d, o, g, l;
|
|
170
181
|
switch (n) {
|
|
171
182
|
case "distance":
|
|
172
183
|
return a.distanceKm == null && c.distanceKm == null ? 0 : a.distanceKm == null ? 1 : c.distanceKm == null ? -1 : a.distanceKm - c.distanceKm;
|
|
173
184
|
case "rating": {
|
|
174
|
-
const
|
|
175
|
-
return (((
|
|
185
|
+
const p = ((d = a.result.rating) == null ? void 0 : d.value) ?? -1;
|
|
186
|
+
return (((o = c.result.rating) == null ? void 0 : o.value) ?? -1) - p;
|
|
176
187
|
}
|
|
177
188
|
case "next-available": {
|
|
178
|
-
const
|
|
179
|
-
return !
|
|
189
|
+
const p = ((g = a.result.nextAvailableSlot) == null ? void 0 : g.dateTime) ?? "", h = ((l = c.result.nextAvailableSlot) == null ? void 0 : l.dateTime) ?? "";
|
|
190
|
+
return !p && !h ? 0 : p ? h ? p.localeCompare(h) : -1 : 1;
|
|
180
191
|
}
|
|
181
192
|
case "relevance":
|
|
182
193
|
default:
|
|
@@ -195,13 +206,13 @@ function Re(e) {
|
|
|
195
206
|
for (const c of e) {
|
|
196
207
|
if (!c.location) continue;
|
|
197
208
|
a = !0;
|
|
198
|
-
const { lat: d, lng:
|
|
199
|
-
d > n && (n = d), d < s && (s = d),
|
|
209
|
+
const { lat: d, lng: o } = c.location;
|
|
210
|
+
d > n && (n = d), d < s && (s = d), o > r && (r = o), o < i && (i = o);
|
|
200
211
|
}
|
|
201
212
|
if (a)
|
|
202
213
|
return { north: n, south: s, east: r, west: i };
|
|
203
214
|
}
|
|
204
|
-
const
|
|
215
|
+
const mt = Z(
|
|
205
216
|
"ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)] ds:gap-[var(--spacing-md)]",
|
|
206
217
|
{
|
|
207
218
|
variants: {
|
|
@@ -261,7 +272,7 @@ const ee = Z(
|
|
|
261
272
|
},
|
|
262
273
|
defaultVariants: { state: "idle" }
|
|
263
274
|
}
|
|
264
|
-
),
|
|
275
|
+
), ft = Z(
|
|
265
276
|
"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
266
277
|
{
|
|
267
278
|
variants: {
|
|
@@ -280,7 +291,7 @@ const ee = Z(
|
|
|
280
291
|
},
|
|
281
292
|
defaultVariants: { placement: "inline" }
|
|
282
293
|
}
|
|
283
|
-
),
|
|
294
|
+
), ht = Z(
|
|
284
295
|
[
|
|
285
296
|
"ds:ms-[var(--spacing-xs)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
286
297
|
"ds:min-h-[var(--min-target-size)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]",
|
|
@@ -298,19 +309,19 @@ function ze({
|
|
|
298
309
|
floating: r
|
|
299
310
|
}) {
|
|
300
311
|
const { t: i } = C(), a = D(() => n ?? {}, [n]), c = D(
|
|
301
|
-
() => Object.values(a).some((
|
|
312
|
+
() => Object.values(a).some((l) => l && l.length > 0),
|
|
302
313
|
[a]
|
|
303
|
-
), d = (
|
|
314
|
+
), d = (l, p) => {
|
|
304
315
|
const h = { ...a };
|
|
305
|
-
|
|
306
|
-
},
|
|
316
|
+
p.length === 0 ? delete h[l] : h[l] = p, s(h), H("serp_filter_changed", { key: l, values: p });
|
|
317
|
+
}, o = (l) => {
|
|
307
318
|
var h;
|
|
308
|
-
const
|
|
309
|
-
d(
|
|
310
|
-
}, g = (
|
|
311
|
-
const h = a[
|
|
319
|
+
const p = (((h = a[l]) == null ? void 0 : h.length) ?? 0) > 0;
|
|
320
|
+
d(l, p ? [] : ["true"]);
|
|
321
|
+
}, g = (l, p) => {
|
|
322
|
+
const h = a[l.key] ?? [], x = h.includes(p);
|
|
312
323
|
let v;
|
|
313
|
-
|
|
324
|
+
l.multi ? v = x ? h.filter((u) => u !== p) : [...h, p] : v = x ? [] : [p], d(l.key, v);
|
|
314
325
|
};
|
|
315
326
|
return e.length === 0 ? null : /* @__PURE__ */ m(
|
|
316
327
|
"div",
|
|
@@ -318,26 +329,26 @@ function ze({
|
|
|
318
329
|
"data-component": "practice-results-filters",
|
|
319
330
|
role: "group",
|
|
320
331
|
"aria-label": i("practiceResults.filters.label"),
|
|
321
|
-
className:
|
|
332
|
+
className: ft({
|
|
322
333
|
placement: r ? "floating" : "inline"
|
|
323
334
|
}),
|
|
324
335
|
children: [
|
|
325
|
-
e.map((
|
|
326
|
-
const
|
|
327
|
-
if (
|
|
336
|
+
e.map((l) => {
|
|
337
|
+
const p = l.boolean, h = a[l.key] ?? [], x = h.length > 0;
|
|
338
|
+
if (p)
|
|
328
339
|
return /* @__PURE__ */ t(
|
|
329
340
|
"button",
|
|
330
341
|
{
|
|
331
342
|
type: "button",
|
|
332
343
|
"aria-pressed": x,
|
|
333
|
-
"aria-label":
|
|
334
|
-
onClick: () => l
|
|
344
|
+
"aria-label": l.label,
|
|
345
|
+
onClick: () => o(l.key),
|
|
335
346
|
className: ee({
|
|
336
347
|
state: x ? "active" : "idle"
|
|
337
348
|
}),
|
|
338
|
-
children: /* @__PURE__ */ t("span", { children:
|
|
349
|
+
children: /* @__PURE__ */ t("span", { children: l.label })
|
|
339
350
|
},
|
|
340
|
-
|
|
351
|
+
l.key
|
|
341
352
|
);
|
|
342
353
|
const v = x ? ` (${h.length})` : "";
|
|
343
354
|
return /* @__PURE__ */ m($.Root, { children: [
|
|
@@ -345,13 +356,13 @@ function ze({
|
|
|
345
356
|
"button",
|
|
346
357
|
{
|
|
347
358
|
type: "button",
|
|
348
|
-
"aria-label": `${
|
|
359
|
+
"aria-label": `${l.label}${v}`,
|
|
349
360
|
className: ee({
|
|
350
361
|
state: x ? "active" : "idle"
|
|
351
362
|
}),
|
|
352
363
|
children: [
|
|
353
364
|
/* @__PURE__ */ m("span", { children: [
|
|
354
|
-
|
|
365
|
+
l.label,
|
|
355
366
|
v
|
|
356
367
|
] }),
|
|
357
368
|
/* @__PURE__ */ t(
|
|
@@ -364,18 +375,18 @@ function ze({
|
|
|
364
375
|
]
|
|
365
376
|
}
|
|
366
377
|
) }),
|
|
367
|
-
/* @__PURE__ */ t($.Content, { sideOffset: 8, align: "start", children:
|
|
378
|
+
/* @__PURE__ */ t($.Content, { sideOffset: 8, align: "start", children: l.options.map((u) => /* @__PURE__ */ t(
|
|
368
379
|
$.CheckboxItem,
|
|
369
380
|
{
|
|
370
|
-
checked: h.includes(
|
|
381
|
+
checked: h.includes(u.value),
|
|
371
382
|
onSelect: (f) => {
|
|
372
|
-
|
|
383
|
+
l.multi && f.preventDefault(), g(l, u.value);
|
|
373
384
|
},
|
|
374
|
-
children:
|
|
385
|
+
children: u.label
|
|
375
386
|
},
|
|
376
|
-
|
|
387
|
+
u.value
|
|
377
388
|
)) })
|
|
378
|
-
] },
|
|
389
|
+
] }, l.key);
|
|
379
390
|
}),
|
|
380
391
|
c ? /* @__PURE__ */ t(
|
|
381
392
|
"button",
|
|
@@ -384,7 +395,7 @@ function ze({
|
|
|
384
395
|
onClick: () => {
|
|
385
396
|
s({}), H("serp_filter_changed", { key: "*", values: [] });
|
|
386
397
|
},
|
|
387
|
-
className:
|
|
398
|
+
className: ht(),
|
|
388
399
|
children: i("practiceResults.filters.clear")
|
|
389
400
|
}
|
|
390
401
|
) : null
|
|
@@ -431,7 +442,7 @@ function de({ value: e, onChange: n }) {
|
|
|
431
442
|
const a = i;
|
|
432
443
|
a !== e && (n(a), H("serp_sort_changed", { sort: a }));
|
|
433
444
|
},
|
|
434
|
-
children:
|
|
445
|
+
children: lt.map((i) => /* @__PURE__ */ t($.RadioItem, { value: i, children: r(i) }, i))
|
|
435
446
|
}
|
|
436
447
|
) })
|
|
437
448
|
] });
|
|
@@ -465,12 +476,12 @@ const we = Z(
|
|
|
465
476
|
defaultVariants: { state: "placeholder" }
|
|
466
477
|
}
|
|
467
478
|
);
|
|
468
|
-
function
|
|
479
|
+
function gt() {
|
|
469
480
|
if (typeof document > "u") return "4945a3";
|
|
470
481
|
const e = getComputedStyle(document.documentElement).getPropertyValue("--map-marker-color").trim(), n = /^#?([0-9a-fA-F]{6})$/.exec(e);
|
|
471
482
|
return n ? n[1] : "4945a3";
|
|
472
483
|
}
|
|
473
|
-
function
|
|
484
|
+
function vt({
|
|
474
485
|
apiKey: e,
|
|
475
486
|
center: n,
|
|
476
487
|
zoom: s = 14,
|
|
@@ -489,7 +500,7 @@ function gt({
|
|
|
489
500
|
]
|
|
490
501
|
}
|
|
491
502
|
);
|
|
492
|
-
const a =
|
|
503
|
+
const a = gt(), c = `https://maps.googleapis.com/maps/api/staticmap?center=${n.lat},${n.lng}&zoom=${s}&size=240x160&scale=2&markers=color:0x${a}%7C${n.lat},${n.lng}&key=${encodeURIComponent(e)}`;
|
|
493
504
|
return /* @__PURE__ */ t(
|
|
494
505
|
"img",
|
|
495
506
|
{
|
|
@@ -532,7 +543,7 @@ const Fe = Z(
|
|
|
532
543
|
defaultVariants: { density: "compact" }
|
|
533
544
|
}
|
|
534
545
|
);
|
|
535
|
-
function
|
|
546
|
+
function bt({
|
|
536
547
|
result: e,
|
|
537
548
|
highlighted: n,
|
|
538
549
|
onSelect: s,
|
|
@@ -541,12 +552,12 @@ function vt({
|
|
|
541
552
|
density: a = "compact",
|
|
542
553
|
openLabel: c,
|
|
543
554
|
nextSlotText: d,
|
|
544
|
-
maxInsuranceChips:
|
|
555
|
+
maxInsuranceChips: o = 3,
|
|
545
556
|
maxLanguageChips: g = 4,
|
|
546
|
-
children:
|
|
557
|
+
children: l
|
|
547
558
|
}) {
|
|
548
|
-
var T, P, q, U, O,
|
|
549
|
-
const { t:
|
|
559
|
+
var T, P, q, U, O, K;
|
|
560
|
+
const { t: p, i18n: h } = C(), x = e.rating, v = (T = e.location) == null ? void 0 : T.distanceKm, u = (((P = e.languages) == null ? void 0 : P.length) ?? 0) > 0, f = (((q = e.insurances) == null ? void 0 : q.length) ?? 0) > 0, y = e.specializedInFearPatients, N = u || f || y, R = (e.languages ?? []).slice(0, g), A = (((U = e.languages) == null ? void 0 : U.length) ?? 0) - R.length, M = (e.insurances ?? []).slice(0, o), z = (((O = e.insurances) == null ? void 0 : O.length) ?? 0) - M.length;
|
|
550
561
|
return (
|
|
551
562
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events -- card is role="group" by design (axe nested-interactive); click handler is mouse-only sync.
|
|
552
563
|
/* @__PURE__ */ m(
|
|
@@ -577,7 +588,7 @@ function vt({
|
|
|
577
588
|
v != null ? /* @__PURE__ */ t(Te, { distanceKm: v }) : null
|
|
578
589
|
] }),
|
|
579
590
|
e.subtitle ? /* @__PURE__ */ t("span", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: e.subtitle }) : null,
|
|
580
|
-
(
|
|
591
|
+
(K = e.location) != null && K.address ? /* @__PURE__ */ m("span", { className: "type-meta ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
581
592
|
/* @__PURE__ */ t(te, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" }),
|
|
582
593
|
e.location.address
|
|
583
594
|
] }) : null
|
|
@@ -596,12 +607,12 @@ function vt({
|
|
|
596
607
|
{
|
|
597
608
|
variant: "neutral",
|
|
598
609
|
leading: /* @__PURE__ */ t(Ne, { "aria-hidden": "true" }),
|
|
599
|
-
children: _e(S,
|
|
610
|
+
children: _e(S, p, h)
|
|
600
611
|
},
|
|
601
612
|
`lang-${S}`
|
|
602
613
|
)),
|
|
603
|
-
|
|
604
|
-
|
|
614
|
+
A > 0 ? /* @__PURE__ */ t(L, { variant: "neutral", children: `+${A}` }) : null,
|
|
615
|
+
M.map((S) => /* @__PURE__ */ t(
|
|
605
616
|
L,
|
|
606
617
|
{
|
|
607
618
|
variant: "info",
|
|
@@ -611,18 +622,18 @@ function vt({
|
|
|
611
622
|
`ins-${S}`
|
|
612
623
|
)),
|
|
613
624
|
z > 0 ? /* @__PURE__ */ t(L, { variant: "neutral", children: `+${z}` }) : null,
|
|
614
|
-
y ? /* @__PURE__ */ t(L, { variant: "info", leading: /* @__PURE__ */ t(
|
|
625
|
+
y ? /* @__PURE__ */ t(L, { variant: "info", leading: /* @__PURE__ */ t(Ae, { "aria-hidden": "true" }), children: p("practiceResults.fearPatient.label") }) : null
|
|
615
626
|
] }) : null,
|
|
616
627
|
e.nextAvailableSlot && d ? /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
617
628
|
/* @__PURE__ */ m("span", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
618
629
|
/* @__PURE__ */ t(
|
|
619
|
-
|
|
630
|
+
Me,
|
|
620
631
|
{
|
|
621
632
|
"aria-hidden": "true",
|
|
622
633
|
className: "ds:size-4 ds:text-[var(--primary)]"
|
|
623
634
|
}
|
|
624
635
|
),
|
|
625
|
-
|
|
636
|
+
p("practiceResults.nextSlot.summary", { time: d })
|
|
626
637
|
] }),
|
|
627
638
|
/* @__PURE__ */ t(
|
|
628
639
|
G,
|
|
@@ -638,13 +649,13 @@ function vt({
|
|
|
638
649
|
{
|
|
639
650
|
href: e.nextAvailableSlot.bookingHref,
|
|
640
651
|
"data-component": "practice-result-next-slot-cta",
|
|
641
|
-
children:
|
|
652
|
+
children: p("practiceResults.nextSlot.cta", { time: d })
|
|
642
653
|
}
|
|
643
654
|
)
|
|
644
655
|
}
|
|
645
656
|
)
|
|
646
657
|
] }) : null,
|
|
647
|
-
|
|
658
|
+
l,
|
|
648
659
|
/* @__PURE__ */ t("div", { className: "ds:mt-[var(--spacing-xs)] ds:flex ds:justify-end", children: /* @__PURE__ */ t(
|
|
649
660
|
G,
|
|
650
661
|
{
|
|
@@ -663,7 +674,7 @@ function vt({
|
|
|
663
674
|
)
|
|
664
675
|
);
|
|
665
676
|
}
|
|
666
|
-
function
|
|
677
|
+
function xt({
|
|
667
678
|
result: e,
|
|
668
679
|
apiKey: n,
|
|
669
680
|
highlighted: s,
|
|
@@ -672,11 +683,11 @@ function bt({
|
|
|
672
683
|
onHover: a,
|
|
673
684
|
openLabel: c
|
|
674
685
|
}) {
|
|
675
|
-
var
|
|
676
|
-
const { t: d, i18n:
|
|
686
|
+
var u, f, y, N;
|
|
687
|
+
const { t: d, i18n: o } = C(), g = D(() => {
|
|
677
688
|
if (e.nextAvailableSlot)
|
|
678
689
|
try {
|
|
679
|
-
return new Intl.DateTimeFormat(
|
|
690
|
+
return new Intl.DateTimeFormat(o.language, {
|
|
680
691
|
weekday: "short",
|
|
681
692
|
hour: "numeric",
|
|
682
693
|
minute: "numeric"
|
|
@@ -684,7 +695,7 @@ function bt({
|
|
|
684
695
|
} catch {
|
|
685
696
|
return e.nextAvailableSlot.dateTime;
|
|
686
697
|
}
|
|
687
|
-
}, [e.nextAvailableSlot,
|
|
698
|
+
}, [e.nextAvailableSlot, o.language]), l = (((u = e.languages) == null ? void 0 : u.length) ?? 0) > 0, p = (((f = e.insurances) == null ? void 0 : f.length) ?? 0) > 0, h = e.specializedInFearPatients, x = l || p || h, v = (y = e.location) == null ? void 0 : y.distanceKm;
|
|
688
699
|
return (
|
|
689
700
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events -- card is role="group" by design (axe nested-interactive); click handler is mouse-only sync.
|
|
690
701
|
/* @__PURE__ */ m(
|
|
@@ -702,7 +713,7 @@ function bt({
|
|
|
702
713
|
className: Fe({ density: "rich" }),
|
|
703
714
|
children: [
|
|
704
715
|
e.location ? /* @__PURE__ */ t(
|
|
705
|
-
|
|
716
|
+
vt,
|
|
706
717
|
{
|
|
707
718
|
apiKey: n,
|
|
708
719
|
center: {
|
|
@@ -749,16 +760,16 @@ function bt({
|
|
|
749
760
|
) : null
|
|
750
761
|
] }),
|
|
751
762
|
x ? /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
752
|
-
|
|
763
|
+
l ? (e.languages ?? []).map((R) => /* @__PURE__ */ t(
|
|
753
764
|
L,
|
|
754
765
|
{
|
|
755
766
|
variant: "neutral",
|
|
756
767
|
leading: /* @__PURE__ */ t(Ne, { "aria-hidden": "true" }),
|
|
757
|
-
children: _e(R, d,
|
|
768
|
+
children: _e(R, d, o)
|
|
758
769
|
},
|
|
759
770
|
`lang-${R}`
|
|
760
771
|
)) : null,
|
|
761
|
-
|
|
772
|
+
p ? (e.insurances ?? []).map((R) => /* @__PURE__ */ t(
|
|
762
773
|
L,
|
|
763
774
|
{
|
|
764
775
|
variant: "info",
|
|
@@ -767,12 +778,12 @@ function bt({
|
|
|
767
778
|
},
|
|
768
779
|
`ins-${R}`
|
|
769
780
|
)) : null,
|
|
770
|
-
h ? /* @__PURE__ */ t(L, { variant: "info", leading: /* @__PURE__ */ t(
|
|
781
|
+
h ? /* @__PURE__ */ t(L, { variant: "info", leading: /* @__PURE__ */ t(Ae, { "aria-hidden": "true" }), children: d("practiceResults.fearPatient.label") }) : null
|
|
771
782
|
] }) : null,
|
|
772
783
|
e.nextAvailableSlot && g ? /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
773
784
|
/* @__PURE__ */ m("span", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
774
785
|
/* @__PURE__ */ t(
|
|
775
|
-
|
|
786
|
+
Me,
|
|
776
787
|
{
|
|
777
788
|
"aria-hidden": "true",
|
|
778
789
|
className: "ds:size-4 ds:text-[var(--primary)]"
|
|
@@ -827,17 +838,17 @@ function me({
|
|
|
827
838
|
openLabel: a,
|
|
828
839
|
formatNextSlot: c,
|
|
829
840
|
onLoadMore: d,
|
|
830
|
-
loadingMore:
|
|
841
|
+
loadingMore: o,
|
|
831
842
|
loadingSkeletons: g,
|
|
832
|
-
density:
|
|
833
|
-
apiKey:
|
|
843
|
+
density: l = "compact",
|
|
844
|
+
apiKey: p,
|
|
834
845
|
containerRef: h
|
|
835
846
|
}) {
|
|
836
847
|
const { t: x } = C(), v = _(null);
|
|
837
848
|
return J(() => {
|
|
838
849
|
if (!d) return;
|
|
839
|
-
const
|
|
840
|
-
if (!
|
|
850
|
+
const u = v.current;
|
|
851
|
+
if (!u || typeof IntersectionObserver > "u") return;
|
|
841
852
|
const f = new IntersectionObserver(
|
|
842
853
|
(y) => {
|
|
843
854
|
for (const N of y)
|
|
@@ -847,7 +858,7 @@ function me({
|
|
|
847
858
|
},
|
|
848
859
|
{ root: null, rootMargin: "200px" }
|
|
849
860
|
);
|
|
850
|
-
return f.observe(
|
|
861
|
+
return f.observe(u), () => f.disconnect();
|
|
851
862
|
}, [d, e.length]), g ? /* @__PURE__ */ t(
|
|
852
863
|
"div",
|
|
853
864
|
{
|
|
@@ -855,11 +866,11 @@ function me({
|
|
|
855
866
|
"aria-live": "polite",
|
|
856
867
|
"aria-label": x("practiceResults.loading"),
|
|
857
868
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
858
|
-
children: Array.from({ length: 4 }).map((
|
|
869
|
+
children: Array.from({ length: 4 }).map((u, f) => /* @__PURE__ */ t(
|
|
859
870
|
Xe,
|
|
860
871
|
{
|
|
861
872
|
variant: "rounded",
|
|
862
|
-
height:
|
|
873
|
+
height: l === "rich" ? "11rem" : "7rem"
|
|
863
874
|
},
|
|
864
875
|
`pr-skel-${f}`
|
|
865
876
|
))
|
|
@@ -873,36 +884,36 @@ function me({
|
|
|
873
884
|
"aria-label": x("practiceResults.list.label"),
|
|
874
885
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:overflow-y-auto",
|
|
875
886
|
children: [
|
|
876
|
-
e.map((
|
|
877
|
-
|
|
887
|
+
e.map((u) => /* @__PURE__ */ t("div", { role: "listitem", children: l === "rich" ? /* @__PURE__ */ t(
|
|
888
|
+
xt,
|
|
878
889
|
{
|
|
879
|
-
result:
|
|
880
|
-
apiKey:
|
|
881
|
-
highlighted: n ===
|
|
882
|
-
onSelect: () => r(
|
|
883
|
-
onOpenClick: () => i(
|
|
884
|
-
onHover: () => s(
|
|
890
|
+
result: u,
|
|
891
|
+
apiKey: p,
|
|
892
|
+
highlighted: n === u.id,
|
|
893
|
+
onSelect: () => r(u.id),
|
|
894
|
+
onOpenClick: () => i(u.id),
|
|
895
|
+
onHover: () => s(u.id),
|
|
885
896
|
openLabel: a
|
|
886
897
|
}
|
|
887
898
|
) : /* @__PURE__ */ t(
|
|
888
|
-
|
|
899
|
+
bt,
|
|
889
900
|
{
|
|
890
|
-
result:
|
|
891
|
-
highlighted: n ===
|
|
892
|
-
onSelect: () => r(
|
|
893
|
-
onOpenClick: () => i(
|
|
894
|
-
onHover: () => s(
|
|
901
|
+
result: u,
|
|
902
|
+
highlighted: n === u.id,
|
|
903
|
+
onSelect: () => r(u.id),
|
|
904
|
+
onOpenClick: () => i(u.id),
|
|
905
|
+
onHover: () => s(u.id),
|
|
895
906
|
openLabel: a,
|
|
896
|
-
nextSlotText: c(
|
|
907
|
+
nextSlotText: c(u)
|
|
897
908
|
}
|
|
898
|
-
) },
|
|
909
|
+
) }, u.id)),
|
|
899
910
|
d ? /* @__PURE__ */ t(
|
|
900
911
|
"div",
|
|
901
912
|
{
|
|
902
913
|
ref: v,
|
|
903
914
|
"aria-hidden": "true",
|
|
904
915
|
className: "ds:flex ds:items-center ds:justify-center ds:py-[var(--spacing-md)]",
|
|
905
|
-
children:
|
|
916
|
+
children: o ? /* @__PURE__ */ t(Ye, { size: "md", variant: "pulse" }) : /* @__PURE__ */ t("span", { className: "ds:size-1" })
|
|
906
917
|
}
|
|
907
918
|
) : null
|
|
908
919
|
]
|
|
@@ -918,10 +929,10 @@ function ue({
|
|
|
918
929
|
highlightedId: a,
|
|
919
930
|
onPinClick: c,
|
|
920
931
|
onPinHover: d,
|
|
921
|
-
onPinFirstInteract:
|
|
932
|
+
onPinFirstInteract: o,
|
|
922
933
|
onBoundsChange: g,
|
|
923
|
-
consentGranted:
|
|
924
|
-
onConsentRequest:
|
|
934
|
+
consentGranted: l,
|
|
935
|
+
onConsentRequest: p,
|
|
925
936
|
mapHandleRef: h
|
|
926
937
|
}) {
|
|
927
938
|
const { t: x } = C(), v = D(
|
|
@@ -936,7 +947,7 @@ function ue({
|
|
|
936
947
|
label: f.name
|
|
937
948
|
})),
|
|
938
949
|
[e]
|
|
939
|
-
),
|
|
950
|
+
), u = D(() => {
|
|
940
951
|
if (n) return n;
|
|
941
952
|
const f = Re(e);
|
|
942
953
|
return f ? {
|
|
@@ -959,14 +970,14 @@ function ue({
|
|
|
959
970
|
ref: h,
|
|
960
971
|
apiKey: r ?? "",
|
|
961
972
|
mapId: i,
|
|
962
|
-
center:
|
|
973
|
+
center: u,
|
|
963
974
|
zoom: s,
|
|
964
975
|
markers: v,
|
|
965
976
|
selectedMarkerId: a,
|
|
966
|
-
consentGranted: !!
|
|
967
|
-
onConsentRequest:
|
|
977
|
+
consentGranted: !!l,
|
|
978
|
+
onConsentRequest: p,
|
|
968
979
|
onMarkerClick: (f) => {
|
|
969
|
-
f != null && (d(f),
|
|
980
|
+
f != null && (d(f), o(f), c(f));
|
|
970
981
|
},
|
|
971
982
|
ariaLabel: x("practiceResults.map.label"),
|
|
972
983
|
size: "fill",
|
|
@@ -997,21 +1008,21 @@ function fe({
|
|
|
997
1008
|
{
|
|
998
1009
|
facets: n,
|
|
999
1010
|
value: s.facets,
|
|
1000
|
-
onChange: (
|
|
1011
|
+
onChange: (o) => r({ ...s, facets: o })
|
|
1001
1012
|
}
|
|
1002
1013
|
),
|
|
1003
1014
|
/* @__PURE__ */ t(
|
|
1004
1015
|
de,
|
|
1005
1016
|
{
|
|
1006
1017
|
value: s.sort ?? "relevance",
|
|
1007
|
-
onChange: (
|
|
1018
|
+
onChange: (o) => r({ ...s, sort: o })
|
|
1008
1019
|
}
|
|
1009
1020
|
)
|
|
1010
1021
|
] }) : /* @__PURE__ */ t("div", { className: "ds:flex ds:justify-end", children: /* @__PURE__ */ t(
|
|
1011
1022
|
de,
|
|
1012
1023
|
{
|
|
1013
1024
|
value: s.sort ?? "relevance",
|
|
1014
|
-
onChange: (
|
|
1025
|
+
onChange: (o) => r({ ...s, sort: o })
|
|
1015
1026
|
}
|
|
1016
1027
|
) })
|
|
1017
1028
|
] });
|
|
@@ -1044,7 +1055,7 @@ function ge({ onRetry: e }) {
|
|
|
1044
1055
|
) }) : null
|
|
1045
1056
|
] });
|
|
1046
1057
|
}
|
|
1047
|
-
function
|
|
1058
|
+
function yt(e) {
|
|
1048
1059
|
const {
|
|
1049
1060
|
results: n,
|
|
1050
1061
|
apiKey: s,
|
|
@@ -1053,19 +1064,19 @@ function xt(e) {
|
|
|
1053
1064
|
searchCentre: a,
|
|
1054
1065
|
onLoadMore: c,
|
|
1055
1066
|
loadingMore: d,
|
|
1056
|
-
loadingSkeletons:
|
|
1067
|
+
loadingSkeletons: o,
|
|
1057
1068
|
emptyResultsSlot: g,
|
|
1058
|
-
errorSlot:
|
|
1059
|
-
error:
|
|
1069
|
+
errorSlot: l,
|
|
1070
|
+
error: p,
|
|
1060
1071
|
onRetry: h,
|
|
1061
1072
|
highlightedId: x,
|
|
1062
1073
|
onCardHover: v,
|
|
1063
|
-
onPinClick:
|
|
1074
|
+
onPinClick: u,
|
|
1064
1075
|
consentGranted: f,
|
|
1065
1076
|
onConsentRequest: y,
|
|
1066
1077
|
onBoundsChange: N,
|
|
1067
1078
|
listContainerRef: R
|
|
1068
|
-
} = e, { t:
|
|
1079
|
+
} = e, { t: A } = C(), [M, z] = pe(!1), T = p ? l ?? /* @__PURE__ */ t(ge, { onRetry: h }) : n.length === 0 && !o ? g ?? /* @__PURE__ */ t(he, {}) : /* @__PURE__ */ t(
|
|
1069
1080
|
me,
|
|
1070
1081
|
{
|
|
1071
1082
|
results: n,
|
|
@@ -1077,7 +1088,7 @@ function xt(e) {
|
|
|
1077
1088
|
formatNextSlot: e.formatNextSlot,
|
|
1078
1089
|
onLoadMore: c,
|
|
1079
1090
|
loadingMore: d,
|
|
1080
|
-
loadingSkeletons:
|
|
1091
|
+
loadingSkeletons: o,
|
|
1081
1092
|
density: "compact",
|
|
1082
1093
|
containerRef: R
|
|
1083
1094
|
}
|
|
@@ -1096,7 +1107,7 @@ function xt(e) {
|
|
|
1096
1107
|
mapId: r,
|
|
1097
1108
|
highlightedId: x,
|
|
1098
1109
|
onPinClick: (P) => {
|
|
1099
|
-
W(n, P, "pin", e.onResultSelect),
|
|
1110
|
+
W(n, P, "pin", e.onResultSelect), u(P);
|
|
1100
1111
|
},
|
|
1101
1112
|
onPinHover: v,
|
|
1102
1113
|
onPinFirstInteract: e.onPinFirstInteract,
|
|
@@ -1114,13 +1125,13 @@ function xt(e) {
|
|
|
1114
1125
|
size: "md",
|
|
1115
1126
|
startIcon: /* @__PURE__ */ t(it, { "aria-hidden": "true" }),
|
|
1116
1127
|
onClick: () => z(!0),
|
|
1117
|
-
children:
|
|
1128
|
+
children: A("practiceResults.viewMap")
|
|
1118
1129
|
}
|
|
1119
1130
|
) }),
|
|
1120
|
-
/* @__PURE__ */ t(I.Root, { open:
|
|
1121
|
-
/* @__PURE__ */ t(I.Header, { children: /* @__PURE__ */ t(I.Title, { children:
|
|
1131
|
+
/* @__PURE__ */ t(I.Root, { open: M, onOpenChange: z, children: /* @__PURE__ */ m(I.Content, { side: "bottom", size: "lg", children: [
|
|
1132
|
+
/* @__PURE__ */ t(I.Header, { children: /* @__PURE__ */ t(I.Title, { children: A("practiceResults.map.label") }) }),
|
|
1122
1133
|
/* @__PURE__ */ m(I.Body, { children: [
|
|
1123
|
-
/* @__PURE__ */ t(I.Description, { className: "ds:sr-only", children:
|
|
1134
|
+
/* @__PURE__ */ t(I.Description, { className: "ds:sr-only", children: A("practiceResults.sheet.description") }),
|
|
1124
1135
|
/* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1125
1136
|
/* @__PURE__ */ t("div", { className: "ds:h-[20rem]", children: /* @__PURE__ */ t(
|
|
1126
1137
|
ue,
|
|
@@ -1132,7 +1143,7 @@ function xt(e) {
|
|
|
1132
1143
|
mapId: r,
|
|
1133
1144
|
highlightedId: x,
|
|
1134
1145
|
onPinClick: (P) => {
|
|
1135
|
-
W(n, P, "pin", e.onResultSelect),
|
|
1146
|
+
W(n, P, "pin", e.onResultSelect), u(P);
|
|
1136
1147
|
},
|
|
1137
1148
|
onPinHover: v,
|
|
1138
1149
|
onPinFirstInteract: e.onPinFirstInteract,
|
|
@@ -1148,7 +1159,7 @@ function xt(e) {
|
|
|
1148
1159
|
] }) })
|
|
1149
1160
|
] });
|
|
1150
1161
|
}
|
|
1151
|
-
const
|
|
1162
|
+
const Rt = {
|
|
1152
1163
|
peek: "sm",
|
|
1153
1164
|
half: "md",
|
|
1154
1165
|
full: "lg"
|
|
@@ -1157,35 +1168,35 @@ const yt = {
|
|
|
1157
1168
|
"half",
|
|
1158
1169
|
"full"
|
|
1159
1170
|
];
|
|
1160
|
-
function
|
|
1171
|
+
function wt({ value: e, onChange: n }) {
|
|
1161
1172
|
const { t: s, i18n: r } = C(), i = r.dir() === "rtl", a = _(
|
|
1162
1173
|
/* @__PURE__ */ new Map()
|
|
1163
|
-
), c =
|
|
1174
|
+
), c = B((o) => {
|
|
1164
1175
|
var g;
|
|
1165
|
-
(g = a.current.get(
|
|
1166
|
-
}, []), d =
|
|
1167
|
-
(
|
|
1168
|
-
const
|
|
1176
|
+
(g = a.current.get(o)) == null || g.focus();
|
|
1177
|
+
}, []), d = B(
|
|
1178
|
+
(o, g) => {
|
|
1179
|
+
const l = V.indexOf(g), p = V.length, h = i ? "ArrowLeft" : "ArrowRight", x = i ? "ArrowRight" : "ArrowLeft";
|
|
1169
1180
|
let v = null;
|
|
1170
|
-
switch (
|
|
1181
|
+
switch (o.key) {
|
|
1171
1182
|
case h:
|
|
1172
1183
|
case "ArrowDown":
|
|
1173
|
-
v = V[(
|
|
1184
|
+
v = V[(l + 1) % p];
|
|
1174
1185
|
break;
|
|
1175
1186
|
case x:
|
|
1176
1187
|
case "ArrowUp":
|
|
1177
|
-
v = V[(
|
|
1188
|
+
v = V[(l - 1 + p) % p];
|
|
1178
1189
|
break;
|
|
1179
1190
|
case "Home":
|
|
1180
1191
|
v = V[0];
|
|
1181
1192
|
break;
|
|
1182
1193
|
case "End":
|
|
1183
|
-
v = V[
|
|
1194
|
+
v = V[p - 1];
|
|
1184
1195
|
break;
|
|
1185
1196
|
default:
|
|
1186
1197
|
return;
|
|
1187
1198
|
}
|
|
1188
|
-
|
|
1199
|
+
o.preventDefault(), v && v !== g && n(v), v && c(v);
|
|
1189
1200
|
},
|
|
1190
1201
|
[c, i, n]
|
|
1191
1202
|
);
|
|
@@ -1195,33 +1206,33 @@ function Rt({ value: e, onChange: n }) {
|
|
|
1195
1206
|
role: "radiogroup",
|
|
1196
1207
|
"aria-label": s("practiceResults.sheet.snap.label"),
|
|
1197
1208
|
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]",
|
|
1198
|
-
children: V.map((
|
|
1199
|
-
const g = e ===
|
|
1209
|
+
children: V.map((o) => {
|
|
1210
|
+
const g = e === o;
|
|
1200
1211
|
return /* @__PURE__ */ t(
|
|
1201
1212
|
"button",
|
|
1202
1213
|
{
|
|
1203
|
-
ref: (
|
|
1204
|
-
|
|
1214
|
+
ref: (l) => {
|
|
1215
|
+
l ? a.current.set(o, l) : a.current.delete(o);
|
|
1205
1216
|
},
|
|
1206
1217
|
type: "button",
|
|
1207
1218
|
role: "radio",
|
|
1208
1219
|
"aria-checked": g,
|
|
1209
|
-
"aria-label": s(`practiceResults.sheet.snap.${
|
|
1220
|
+
"aria-label": s(`practiceResults.sheet.snap.${o}`),
|
|
1210
1221
|
tabIndex: g ? 0 : -1,
|
|
1211
|
-
onClick: () => n(
|
|
1212
|
-
onKeyDown: (
|
|
1222
|
+
onClick: () => n(o),
|
|
1223
|
+
onKeyDown: (l) => d(l, o),
|
|
1213
1224
|
className: ee({
|
|
1214
1225
|
state: g ? "active" : "idle"
|
|
1215
1226
|
}),
|
|
1216
|
-
children: s(`practiceResults.sheet.snap.${
|
|
1227
|
+
children: s(`practiceResults.sheet.snap.${o}`)
|
|
1217
1228
|
},
|
|
1218
|
-
|
|
1229
|
+
o
|
|
1219
1230
|
);
|
|
1220
1231
|
})
|
|
1221
1232
|
}
|
|
1222
1233
|
);
|
|
1223
1234
|
}
|
|
1224
|
-
function
|
|
1235
|
+
function kt(e) {
|
|
1225
1236
|
const {
|
|
1226
1237
|
results: n,
|
|
1227
1238
|
apiKey: s,
|
|
@@ -1230,22 +1241,22 @@ function wt(e) {
|
|
|
1230
1241
|
searchCentre: a,
|
|
1231
1242
|
onLoadMore: c,
|
|
1232
1243
|
loadingMore: d,
|
|
1233
|
-
loadingSkeletons:
|
|
1244
|
+
loadingSkeletons: o,
|
|
1234
1245
|
emptyResultsSlot: g,
|
|
1235
|
-
errorSlot:
|
|
1236
|
-
error:
|
|
1246
|
+
errorSlot: l,
|
|
1247
|
+
error: p,
|
|
1237
1248
|
onRetry: h,
|
|
1238
1249
|
highlightedId: x,
|
|
1239
1250
|
onCardHover: v,
|
|
1240
|
-
onPinClick:
|
|
1251
|
+
onPinClick: u,
|
|
1241
1252
|
consentGranted: f,
|
|
1242
1253
|
onConsentRequest: y,
|
|
1243
1254
|
onBoundsChange: N,
|
|
1244
1255
|
listContainerRef: R,
|
|
1245
|
-
facets:
|
|
1246
|
-
value:
|
|
1256
|
+
facets: A,
|
|
1257
|
+
value: M,
|
|
1247
1258
|
onChange: z
|
|
1248
|
-
} = e, { t: T } = C(), [P, q] = pe("half"), U =
|
|
1259
|
+
} = e, { t: T } = C(), [P, q] = pe("half"), U = Rt[P], O = et("(min-width: 1024px)"), K = p ? l ?? /* @__PURE__ */ t(ge, { onRetry: h }) : n.length === 0 && !o ? g ?? /* @__PURE__ */ t(he, {}) : /* @__PURE__ */ t(
|
|
1249
1260
|
me,
|
|
1250
1261
|
{
|
|
1251
1262
|
results: n,
|
|
@@ -1257,7 +1268,7 @@ function wt(e) {
|
|
|
1257
1268
|
formatNextSlot: e.formatNextSlot,
|
|
1258
1269
|
onLoadMore: c,
|
|
1259
1270
|
loadingMore: d,
|
|
1260
|
-
loadingSkeletons:
|
|
1271
|
+
loadingSkeletons: o,
|
|
1261
1272
|
density: "compact",
|
|
1262
1273
|
apiKey: s,
|
|
1263
1274
|
containerRef: R
|
|
@@ -1272,7 +1283,7 @@ function wt(e) {
|
|
|
1272
1283
|
mapId: r,
|
|
1273
1284
|
highlightedId: x,
|
|
1274
1285
|
onPinClick: (w) => {
|
|
1275
|
-
W(n, w, "pin", e.onResultSelect),
|
|
1286
|
+
W(n, w, "pin", e.onResultSelect), u(w);
|
|
1276
1287
|
},
|
|
1277
1288
|
onPinHover: v,
|
|
1278
1289
|
onPinFirstInteract: e.onPinFirstInteract,
|
|
@@ -1281,12 +1292,12 @@ function wt(e) {
|
|
|
1281
1292
|
onConsentRequest: y,
|
|
1282
1293
|
mapHandleRef: e.mapHandleRef
|
|
1283
1294
|
}
|
|
1284
|
-
), ne =
|
|
1295
|
+
), ne = A.length > 0 ? /* @__PURE__ */ t("div", { className: "ds:absolute ds:start-[var(--spacing-md)] ds:top-[var(--spacing-md)] ds:max-w-[calc(100%-var(--spacing-lg))]", children: /* @__PURE__ */ t(
|
|
1285
1296
|
ze,
|
|
1286
1297
|
{
|
|
1287
|
-
facets:
|
|
1288
|
-
value:
|
|
1289
|
-
onChange: (w) => z({ ...
|
|
1298
|
+
facets: A,
|
|
1299
|
+
value: M.facets,
|
|
1300
|
+
onChange: (w) => z({ ...M, facets: w }),
|
|
1290
1301
|
floating: !0
|
|
1291
1302
|
}
|
|
1292
1303
|
) }) : null;
|
|
@@ -1312,7 +1323,7 @@ function wt(e) {
|
|
|
1312
1323
|
/* @__PURE__ */ t(fe, { variantBodyProps: e }),
|
|
1313
1324
|
/* @__PURE__ */ m("div", { className: "ds:grid ds:grid-cols-[65fr_35fr] ds:gap-[var(--spacing-lg)] ds:items-start", children: [
|
|
1314
1325
|
/* @__PURE__ */ t("div", { className: "ds:sticky ds:top-[var(--spacing-md)] ds:h-[44rem]", children: S }),
|
|
1315
|
-
/* @__PURE__ */ t("div", { className: "ds:min-w-0", children:
|
|
1326
|
+
/* @__PURE__ */ t("div", { className: "ds:min-w-0", children: K })
|
|
1316
1327
|
] })
|
|
1317
1328
|
] })
|
|
1318
1329
|
) : (
|
|
@@ -1351,7 +1362,7 @@ function wt(e) {
|
|
|
1351
1362
|
count: e.totalCount ?? n.length
|
|
1352
1363
|
}) }),
|
|
1353
1364
|
/* @__PURE__ */ t(
|
|
1354
|
-
|
|
1365
|
+
wt,
|
|
1355
1366
|
{
|
|
1356
1367
|
value: P,
|
|
1357
1368
|
onChange: q
|
|
@@ -1361,18 +1372,18 @@ function wt(e) {
|
|
|
1361
1372
|
/* @__PURE__ */ t("div", { className: "ds:pb-[var(--spacing-sm)]", children: /* @__PURE__ */ t(
|
|
1362
1373
|
de,
|
|
1363
1374
|
{
|
|
1364
|
-
value:
|
|
1365
|
-
onChange: (w) => z({ ...
|
|
1375
|
+
value: M.sort ?? "relevance",
|
|
1376
|
+
onChange: (w) => z({ ...M, sort: w })
|
|
1366
1377
|
}
|
|
1367
1378
|
) }),
|
|
1368
|
-
|
|
1379
|
+
K
|
|
1369
1380
|
] })
|
|
1370
1381
|
}
|
|
1371
1382
|
) })
|
|
1372
1383
|
] })
|
|
1373
1384
|
) });
|
|
1374
1385
|
}
|
|
1375
|
-
function
|
|
1386
|
+
function Ct(e) {
|
|
1376
1387
|
const {
|
|
1377
1388
|
results: n,
|
|
1378
1389
|
apiKey: s,
|
|
@@ -1381,17 +1392,17 @@ function kt(e) {
|
|
|
1381
1392
|
loadingSkeletons: a,
|
|
1382
1393
|
emptyResultsSlot: c,
|
|
1383
1394
|
errorSlot: d,
|
|
1384
|
-
error:
|
|
1395
|
+
error: o,
|
|
1385
1396
|
onRetry: g,
|
|
1386
|
-
highlightedId:
|
|
1387
|
-
onCardHover:
|
|
1397
|
+
highlightedId: l,
|
|
1398
|
+
onCardHover: p,
|
|
1388
1399
|
listContainerRef: h
|
|
1389
|
-
} = e, x =
|
|
1400
|
+
} = e, x = o ? d ?? /* @__PURE__ */ t(ge, { onRetry: g }) : n.length === 0 && !a ? c ?? /* @__PURE__ */ t(he, {}) : /* @__PURE__ */ t(
|
|
1390
1401
|
me,
|
|
1391
1402
|
{
|
|
1392
1403
|
results: n,
|
|
1393
|
-
highlightedId:
|
|
1394
|
-
onCardHover:
|
|
1404
|
+
highlightedId: l,
|
|
1405
|
+
onCardHover: p,
|
|
1395
1406
|
onCardSelect: e.onCardSelect,
|
|
1396
1407
|
onCardOpenClick: e.onCardOpenClick,
|
|
1397
1408
|
openLabel: e.openLabel,
|
|
@@ -1409,7 +1420,7 @@ function kt(e) {
|
|
|
1409
1420
|
x
|
|
1410
1421
|
] });
|
|
1411
1422
|
}
|
|
1412
|
-
const
|
|
1423
|
+
const St = Ze(function({
|
|
1413
1424
|
variant: n = "split-list-map",
|
|
1414
1425
|
results: s,
|
|
1415
1426
|
totalCount: r,
|
|
@@ -1417,27 +1428,27 @@ const Ct = Ze(function({
|
|
|
1417
1428
|
facets: a,
|
|
1418
1429
|
googleMapsApiKey: c,
|
|
1419
1430
|
mapId: d,
|
|
1420
|
-
defaultZoom:
|
|
1431
|
+
defaultZoom: o = ot,
|
|
1421
1432
|
onBoundsChange: g,
|
|
1422
|
-
consentGranted:
|
|
1423
|
-
onConsentRequest:
|
|
1433
|
+
consentGranted: l,
|
|
1434
|
+
onConsentRequest: p,
|
|
1424
1435
|
skipConsentGate: h = !1,
|
|
1425
1436
|
onLoadMore: x,
|
|
1426
1437
|
loadingMore: v,
|
|
1427
|
-
value:
|
|
1438
|
+
value: u,
|
|
1428
1439
|
onChange: f,
|
|
1429
1440
|
onResultSelect: y,
|
|
1430
1441
|
loading: N,
|
|
1431
1442
|
emptyResultsSlot: R,
|
|
1432
|
-
errorSlot:
|
|
1433
|
-
error:
|
|
1443
|
+
errorSlot: A,
|
|
1444
|
+
error: M,
|
|
1434
1445
|
onRetry: z,
|
|
1435
1446
|
heading: T,
|
|
1436
1447
|
intro: P,
|
|
1437
1448
|
cardOpenButtonLabel: q,
|
|
1438
1449
|
"aria-label": U,
|
|
1439
1450
|
id: O,
|
|
1440
|
-
className:
|
|
1451
|
+
className: K,
|
|
1441
1452
|
...S
|
|
1442
1453
|
}, ne) {
|
|
1443
1454
|
const { t: w, i18n: ve } = C(), [He, Q] = pe(null), X = _(/* @__PURE__ */ new Set()), ae = _(/* @__PURE__ */ new Set()), $e = _(null), se = _(null), ie = D(
|
|
@@ -1458,7 +1469,7 @@ const Ct = Ze(function({
|
|
|
1458
1469
|
[n]
|
|
1459
1470
|
);
|
|
1460
1471
|
Qe(ne, () => ie, [ie]), tt(rt, ie, O);
|
|
1461
|
-
const Le = q ?? w("practiceResults.card.open"), De =
|
|
1472
|
+
const Le = q ?? w("practiceResults.card.open"), De = B(
|
|
1462
1473
|
(b) => {
|
|
1463
1474
|
if (b.nextAvailableSlot)
|
|
1464
1475
|
try {
|
|
@@ -1479,16 +1490,19 @@ const Ct = Ze(function({
|
|
|
1479
1490
|
totalCount: r ?? s.length
|
|
1480
1491
|
}), X.current = /* @__PURE__ */ new Set(), ae.current = /* @__PURE__ */ new Set());
|
|
1481
1492
|
}, [n]);
|
|
1482
|
-
const re = _(!1),
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1493
|
+
const re = _(!1), oe = D(
|
|
1494
|
+
() => dt(a ?? [], s, u.facets),
|
|
1495
|
+
[a, s, u.facets]
|
|
1496
|
+
), le = u.sort ?? (i ? "distance" : "relevance"), j = D(() => {
|
|
1497
|
+
const b = ut(s, u.facets, oe);
|
|
1498
|
+
return pt(b, le, i);
|
|
1499
|
+
}, [s, u.facets, oe, le, i]);
|
|
1486
1500
|
J(() => {
|
|
1487
1501
|
const b = j.length === 0;
|
|
1488
1502
|
b && !re.current ? (H("serp_empty_results", {
|
|
1489
|
-
appliedFacets:
|
|
1503
|
+
appliedFacets: u.facets ?? {}
|
|
1490
1504
|
}), re.current = !0) : b || (re.current = !1);
|
|
1491
|
-
}, [j.length,
|
|
1505
|
+
}, [j.length, u.facets]);
|
|
1492
1506
|
const E = _(null), xe = _(null);
|
|
1493
1507
|
J(
|
|
1494
1508
|
() => () => {
|
|
@@ -1496,11 +1510,11 @@ const Ct = Ze(function({
|
|
|
1496
1510
|
},
|
|
1497
1511
|
[]
|
|
1498
1512
|
);
|
|
1499
|
-
const Oe =
|
|
1513
|
+
const Oe = B((b) => {
|
|
1500
1514
|
Q(b), !X.current.has(b) && (xe.current === b && E.current || (E.current && clearTimeout(E.current), xe.current = b, E.current = setTimeout(() => {
|
|
1501
1515
|
X.current.has(b) || (X.current.add(b), H("serp_result_hovered_card", { resultId: b })), E.current = null;
|
|
1502
1516
|
}, 500)));
|
|
1503
|
-
}, []), je =
|
|
1517
|
+
}, []), je = B((b) => {
|
|
1504
1518
|
Q(b);
|
|
1505
1519
|
const F = se.current;
|
|
1506
1520
|
if (!F) return;
|
|
@@ -1508,9 +1522,9 @@ const Ct = Ze(function({
|
|
|
1508
1522
|
`[data-component="practice-result-card"][data-result-id="${CSS.escape(b)}"]`
|
|
1509
1523
|
);
|
|
1510
1524
|
k == null || k.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
1511
|
-
}, []),
|
|
1525
|
+
}, []), Be = B((b) => {
|
|
1512
1526
|
ae.current.has(b) || (ae.current.add(b), H("serp_result_hovered_pin", { resultId: b }));
|
|
1513
|
-
}, []), ye = _(null),
|
|
1527
|
+
}, []), ye = _(null), Ke = B(
|
|
1514
1528
|
(b) => {
|
|
1515
1529
|
Q(b);
|
|
1516
1530
|
const F = j.find((k) => k.id === b);
|
|
@@ -1526,7 +1540,7 @@ const Ct = Ze(function({
|
|
|
1526
1540
|
}
|
|
1527
1541
|
},
|
|
1528
1542
|
[j, y]
|
|
1529
|
-
), Ee =
|
|
1543
|
+
), Ee = B(
|
|
1530
1544
|
(b) => {
|
|
1531
1545
|
W(
|
|
1532
1546
|
j,
|
|
@@ -1540,35 +1554,35 @@ const Ct = Ze(function({
|
|
|
1540
1554
|
results: j,
|
|
1541
1555
|
totalCount: r,
|
|
1542
1556
|
searchCentre: i,
|
|
1543
|
-
facets:
|
|
1544
|
-
value: { ...
|
|
1557
|
+
facets: oe,
|
|
1558
|
+
value: { ...u, sort: le },
|
|
1545
1559
|
onChange: f,
|
|
1546
1560
|
onResultSelect: y,
|
|
1547
1561
|
onLoadMore: x,
|
|
1548
1562
|
loadingMore: v,
|
|
1549
1563
|
apiKey: c,
|
|
1550
1564
|
mapId: d,
|
|
1551
|
-
zoom:
|
|
1565
|
+
zoom: o,
|
|
1552
1566
|
// 0.31.4: when `skipConsentGate` is true the kit synthesises
|
|
1553
1567
|
// `consentGranted=true` for every internal MapView; the consumer's
|
|
1554
1568
|
// CMP at the page level is responsible for whether the Google Maps
|
|
1555
1569
|
// loader script is present at all. `onConsentRequest` is dropped
|
|
1556
1570
|
// because no placeholder renders — nothing to fire it from.
|
|
1557
|
-
consentGranted: h ? !0 :
|
|
1558
|
-
onConsentRequest: h ? void 0 :
|
|
1571
|
+
consentGranted: h ? !0 : l,
|
|
1572
|
+
onConsentRequest: h ? void 0 : p,
|
|
1559
1573
|
onBoundsChange: g,
|
|
1560
1574
|
loadingSkeletons: Ve,
|
|
1561
1575
|
emptyResultsSlot: R,
|
|
1562
|
-
errorSlot:
|
|
1563
|
-
error:
|
|
1576
|
+
errorSlot: A,
|
|
1577
|
+
error: M,
|
|
1564
1578
|
onRetry: z,
|
|
1565
1579
|
heading: T,
|
|
1566
1580
|
intro: P,
|
|
1567
1581
|
highlightedId: He,
|
|
1568
1582
|
onCardHover: Oe,
|
|
1569
1583
|
onPinClick: je,
|
|
1570
|
-
onPinFirstInteract:
|
|
1571
|
-
onCardSelect:
|
|
1584
|
+
onPinFirstInteract: Be,
|
|
1585
|
+
onCardSelect: Ke,
|
|
1572
1586
|
onCardOpenClick: Ee,
|
|
1573
1587
|
openLabel: Le,
|
|
1574
1588
|
formatNextSlot: De,
|
|
@@ -1577,12 +1591,12 @@ const Ct = Ze(function({
|
|
|
1577
1591
|
}, qe = (() => {
|
|
1578
1592
|
switch (n) {
|
|
1579
1593
|
case "map-first":
|
|
1580
|
-
return /* @__PURE__ */ t(wt, { ...ce });
|
|
1581
|
-
case "rich-cards":
|
|
1582
1594
|
return /* @__PURE__ */ t(kt, { ...ce });
|
|
1595
|
+
case "rich-cards":
|
|
1596
|
+
return /* @__PURE__ */ t(Ct, { ...ce });
|
|
1583
1597
|
case "split-list-map":
|
|
1584
1598
|
default:
|
|
1585
|
-
return /* @__PURE__ */ t(
|
|
1599
|
+
return /* @__PURE__ */ t(yt, { ...ce });
|
|
1586
1600
|
}
|
|
1587
1601
|
})(), Ue = U ?? w("practiceResults.regionLabel");
|
|
1588
1602
|
return /* @__PURE__ */ t(
|
|
@@ -1595,15 +1609,15 @@ const Ct = Ze(function({
|
|
|
1595
1609
|
"data-component": "practice-results",
|
|
1596
1610
|
"data-component-id": O,
|
|
1597
1611
|
"data-variant": n,
|
|
1598
|
-
className:
|
|
1612
|
+
className: mt({ variant: n, className: K }),
|
|
1599
1613
|
...S,
|
|
1600
1614
|
children: qe
|
|
1601
1615
|
}
|
|
1602
1616
|
);
|
|
1603
1617
|
});
|
|
1604
|
-
|
|
1618
|
+
St.displayName = "PracticeResults";
|
|
1605
1619
|
export {
|
|
1606
|
-
|
|
1620
|
+
St as P,
|
|
1607
1621
|
rt as p
|
|
1608
1622
|
};
|
|
1609
|
-
//# sourceMappingURL=practice-results-
|
|
1623
|
+
//# sourceMappingURL=practice-results-CKoLD_x5.js.map
|