@alfadocs/ui-kit 0.31.2 → 0.31.3
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-BIZ9GSer.js → booking-A4o9xI2n.js} +147 -136
- package/dist/_chunks/{practice-results-JQunxBIg.js → practice-results-RPL64j8E.js} +617 -653
- package/dist/agent-catalog.json +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/index.js +2 -2
- package/package.json +2 -1
- package/dist/_chunks/smile-BSYLAHy6.js +0 -17
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { forwardRef as Ue, useState as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
1
|
+
import { jsx as t, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Ue, useState as me, useRef as A, useMemo as H, useImperativeHandle as qe, useCallback as K, useEffect as J } from "react";
|
|
3
|
+
import { c as G } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as w } from "react-i18next";
|
|
5
5
|
import { A as Y } from "./alert-ywPR59NE.js";
|
|
6
6
|
import { A as Re } from "./avatar-BNQNhoyL.js";
|
|
7
|
-
import { B as
|
|
7
|
+
import { B as q } from "./button-DD_0Xdmr.js";
|
|
8
8
|
import { D as F } from "./dropdown-menu-BC5ZdOMo.js";
|
|
9
|
-
import { E as
|
|
9
|
+
import { E as Ge } from "./empty-state-BLy7tigq.js";
|
|
10
10
|
import { M as Ze } from "./map-view-WEWqXzof.js";
|
|
11
11
|
import { R as ke } from "./rating-BRD7O74e.js";
|
|
12
|
-
import { S as
|
|
12
|
+
import { S as _ } from "./sheet-BV-yuLE2.js";
|
|
13
13
|
import { S as Qe } from "./skeleton-CZbwyJAA.js";
|
|
14
14
|
import { S as Je } from "./spinner-CCByyvcb.js";
|
|
15
|
-
import {
|
|
15
|
+
import { B as D } from "./badge-CptERaHx.js";
|
|
16
16
|
import { u as We } from "./use-media-query-CcAx5SMM.js";
|
|
17
17
|
import { u as Xe } from "./registry-nPAVE19X.js";
|
|
18
|
-
import { c as
|
|
18
|
+
import { c as te } from "./createLucideIcon-CrFbzy84.js";
|
|
19
19
|
import { R as Ye } from "./refresh-cw-CC8jSKMr.js";
|
|
20
20
|
import { C as we } from "./chevron-down-BX_NP2Yh.js";
|
|
21
|
-
import { M as
|
|
22
|
-
import {
|
|
23
|
-
import { C as Ne } from "./calendar-clock-CYkcqdwl.js";
|
|
21
|
+
import { M as ne } from "./map-pin-B8STOPMJ.js";
|
|
22
|
+
import { C as Ce } from "./calendar-clock-CYkcqdwl.js";
|
|
24
23
|
/**
|
|
25
24
|
* @license lucide-react v1.8.0 - ISC
|
|
26
25
|
*
|
|
@@ -28,20 +27,35 @@ import { C as Ne } from "./calendar-clock-CYkcqdwl.js";
|
|
|
28
27
|
* See the LICENSE file in the root directory of this source tree.
|
|
29
28
|
*/
|
|
30
29
|
const et = [
|
|
30
|
+
[
|
|
31
|
+
"path",
|
|
32
|
+
{
|
|
33
|
+
d: "M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",
|
|
34
|
+
key: "mvr1a0"
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
], Ne = te("heart", et);
|
|
38
|
+
/**
|
|
39
|
+
* @license lucide-react v1.8.0 - ISC
|
|
40
|
+
*
|
|
41
|
+
* This source code is licensed under the ISC license.
|
|
42
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
43
|
+
*/
|
|
44
|
+
const tt = [
|
|
31
45
|
["path", { d: "m5 8 6 6", key: "1wu5hv" }],
|
|
32
46
|
["path", { d: "m4 14 6-6 2-3", key: "1k1g8d" }],
|
|
33
47
|
["path", { d: "M2 5h12", key: "or177f" }],
|
|
34
48
|
["path", { d: "M7 2h1", key: "1t2jsx" }],
|
|
35
49
|
["path", { d: "m22 22-5-10-5 10", key: "don7ne" }],
|
|
36
50
|
["path", { d: "M14 18h6", key: "1m8k6r" }]
|
|
37
|
-
], Se =
|
|
51
|
+
], Se = te("languages", tt);
|
|
38
52
|
/**
|
|
39
53
|
* @license lucide-react v1.8.0 - ISC
|
|
40
54
|
*
|
|
41
55
|
* This source code is licensed under the ISC license.
|
|
42
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
43
57
|
*/
|
|
44
|
-
const
|
|
58
|
+
const nt = [
|
|
45
59
|
[
|
|
46
60
|
"path",
|
|
47
61
|
{
|
|
@@ -51,14 +65,14 @@ const tt = [
|
|
|
51
65
|
],
|
|
52
66
|
["path", { d: "M15 5.764v15", key: "1pn4in" }],
|
|
53
67
|
["path", { d: "M9 3.236v15", key: "1uimfh" }]
|
|
54
|
-
],
|
|
68
|
+
], at = te("map", nt);
|
|
55
69
|
/**
|
|
56
70
|
* @license lucide-react v1.8.0 - ISC
|
|
57
71
|
*
|
|
58
72
|
* This source code is licensed under the ISC license.
|
|
59
73
|
* See the LICENSE file in the root directory of this source tree.
|
|
60
74
|
*/
|
|
61
|
-
const
|
|
75
|
+
const st = [
|
|
62
76
|
[
|
|
63
77
|
"path",
|
|
64
78
|
{
|
|
@@ -67,7 +81,7 @@ const at = [
|
|
|
67
81
|
}
|
|
68
82
|
],
|
|
69
83
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
70
|
-
], Pe =
|
|
84
|
+
], Pe = te("shield-check", st), it = {
|
|
71
85
|
id: "practice-results",
|
|
72
86
|
capabilities: ["navigate", "view_change"],
|
|
73
87
|
state: {
|
|
@@ -110,7 +124,7 @@ const at = [
|
|
|
110
124
|
description: "Sourced from the id prop."
|
|
111
125
|
}
|
|
112
126
|
}
|
|
113
|
-
},
|
|
127
|
+
}, rt = 13, lt = [
|
|
114
128
|
"distance",
|
|
115
129
|
"rating",
|
|
116
130
|
"next-available",
|
|
@@ -118,53 +132,53 @@ const at = [
|
|
|
118
132
|
];
|
|
119
133
|
function $(e, n) {
|
|
120
134
|
if (typeof window > "u") return;
|
|
121
|
-
const
|
|
135
|
+
const s = window.track;
|
|
122
136
|
try {
|
|
123
|
-
|
|
137
|
+
s == null || s(e, n);
|
|
124
138
|
} catch {
|
|
125
139
|
}
|
|
126
140
|
}
|
|
127
|
-
function W(e, n,
|
|
141
|
+
function W(e, n, s, o) {
|
|
128
142
|
const i = e.findIndex((d) => d.id === n);
|
|
129
143
|
if (i < 0) return;
|
|
130
|
-
const
|
|
131
|
-
|
|
144
|
+
const a = e[i];
|
|
145
|
+
a && ($("serp_result_clicked", { resultId: n, source: s, position: i }), o(a, s));
|
|
132
146
|
}
|
|
133
|
-
function
|
|
134
|
-
const o = (n.lat - e.lat) * Math.PI / 180, i = (n.lng - e.lng) * Math.PI / 180,
|
|
135
|
-
return 2 * 6371 * Math.asin(Math.min(1, Math.sqrt(
|
|
147
|
+
function ot(e, n) {
|
|
148
|
+
const o = (n.lat - e.lat) * Math.PI / 180, i = (n.lng - e.lng) * Math.PI / 180, a = e.lat * Math.PI / 180, d = n.lat * Math.PI / 180, u = Math.sin(o / 2), c = Math.sin(i / 2), g = u * u + Math.cos(a) * Math.cos(d) * c * c;
|
|
149
|
+
return 2 * 6371 * Math.asin(Math.min(1, Math.sqrt(g)));
|
|
136
150
|
}
|
|
137
|
-
function
|
|
151
|
+
function ct(e, n, s) {
|
|
138
152
|
return !n || Object.keys(n).length === 0 ? e : e.filter((o) => {
|
|
139
|
-
for (const i of
|
|
140
|
-
const
|
|
141
|
-
if (!
|
|
153
|
+
for (const i of s) {
|
|
154
|
+
const a = n[i.key];
|
|
155
|
+
if (!a || a.length === 0) continue;
|
|
142
156
|
if (i.options.length === 0) {
|
|
143
157
|
if (o[i.key] !== !0) return !1;
|
|
144
158
|
continue;
|
|
145
159
|
}
|
|
146
160
|
const d = i.key === "insurance" ? o.insurances : i.key === "language" ? o.languages : o[i.key];
|
|
147
|
-
if (!Array.isArray(d) || !(i.multi ?
|
|
161
|
+
if (!Array.isArray(d) || !(i.multi ? a.some((c) => d.includes(c)) : d.includes(a[0]))) return !1;
|
|
148
162
|
}
|
|
149
163
|
return !0;
|
|
150
164
|
});
|
|
151
165
|
}
|
|
152
|
-
function
|
|
153
|
-
const o = e.map((
|
|
154
|
-
const d =
|
|
155
|
-
return { result:
|
|
156
|
-
}), i = (
|
|
157
|
-
var
|
|
166
|
+
function dt(e, n, s) {
|
|
167
|
+
const o = e.map((a) => {
|
|
168
|
+
const d = a.location ? a.location.distanceKm ?? (s ? ot(s, a.location) : void 0) : void 0;
|
|
169
|
+
return { result: a, distanceKm: d };
|
|
170
|
+
}), i = (a, d) => {
|
|
171
|
+
var u, c, g, l;
|
|
158
172
|
switch (n) {
|
|
159
173
|
case "distance":
|
|
160
|
-
return
|
|
174
|
+
return a.distanceKm == null && d.distanceKm == null ? 0 : a.distanceKm == null ? 1 : d.distanceKm == null ? -1 : a.distanceKm - d.distanceKm;
|
|
161
175
|
case "rating": {
|
|
162
|
-
const
|
|
163
|
-
return (((
|
|
176
|
+
const f = ((u = a.result.rating) == null ? void 0 : u.value) ?? -1;
|
|
177
|
+
return (((c = d.result.rating) == null ? void 0 : c.value) ?? -1) - f;
|
|
164
178
|
}
|
|
165
179
|
case "next-available": {
|
|
166
|
-
const
|
|
167
|
-
return !
|
|
180
|
+
const f = ((g = a.result.nextAvailableSlot) == null ? void 0 : g.dateTime) ?? "", m = ((l = d.result.nextAvailableSlot) == null ? void 0 : l.dateTime) ?? "";
|
|
181
|
+
return !f && !m ? 0 : f ? m ? f.localeCompare(m) : -1 : 1;
|
|
168
182
|
}
|
|
169
183
|
case "relevance":
|
|
170
184
|
default:
|
|
@@ -172,24 +186,24 @@ function ct(e, n, a) {
|
|
|
172
186
|
}
|
|
173
187
|
};
|
|
174
188
|
return [...o].sort(i).map(
|
|
175
|
-
({ result:
|
|
176
|
-
...
|
|
177
|
-
location: { ...
|
|
178
|
-
} :
|
|
189
|
+
({ result: a, distanceKm: d }) => d != null && a.location ? {
|
|
190
|
+
...a,
|
|
191
|
+
location: { ...a.location, distanceKm: d }
|
|
192
|
+
} : a
|
|
179
193
|
);
|
|
180
194
|
}
|
|
181
|
-
function
|
|
182
|
-
let n = -1 / 0,
|
|
195
|
+
function be(e) {
|
|
196
|
+
let n = -1 / 0, s = 1 / 0, o = -1 / 0, i = 1 / 0, a = !1;
|
|
183
197
|
for (const d of e) {
|
|
184
198
|
if (!d.location) continue;
|
|
185
|
-
|
|
186
|
-
const { lat:
|
|
187
|
-
|
|
199
|
+
a = !0;
|
|
200
|
+
const { lat: u, lng: c } = d.location;
|
|
201
|
+
u > n && (n = u), u < s && (s = u), c > o && (o = c), c < i && (i = c);
|
|
188
202
|
}
|
|
189
|
-
if (
|
|
190
|
-
return { north: n, south:
|
|
203
|
+
if (a)
|
|
204
|
+
return { north: n, south: s, east: o, west: i };
|
|
191
205
|
}
|
|
192
|
-
const
|
|
206
|
+
const ut = G(
|
|
193
207
|
"ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)] ds:gap-[var(--spacing-md)]",
|
|
194
208
|
{
|
|
195
209
|
variants: {
|
|
@@ -202,32 +216,32 @@ const dt = q(
|
|
|
202
216
|
defaultVariants: { variant: "split-list-map" }
|
|
203
217
|
}
|
|
204
218
|
);
|
|
205
|
-
function
|
|
219
|
+
function Me({
|
|
206
220
|
heading: e,
|
|
207
221
|
intro: n,
|
|
208
|
-
totalCount:
|
|
222
|
+
totalCount: s,
|
|
209
223
|
searchCentreLabel: o
|
|
210
224
|
}) {
|
|
211
|
-
const { t: i } =
|
|
212
|
-
if (!e && !n &&
|
|
213
|
-
const
|
|
214
|
-
count:
|
|
225
|
+
const { t: i } = w();
|
|
226
|
+
if (!e && !n && s == null) return null;
|
|
227
|
+
const a = s != null ? o ? i("practiceResults.results.heading", {
|
|
228
|
+
count: s,
|
|
215
229
|
place: o
|
|
216
|
-
}) : i("practiceResults.results.summary", { count:
|
|
217
|
-
return /* @__PURE__ */
|
|
230
|
+
}) : i("practiceResults.results.summary", { count: s }) : void 0;
|
|
231
|
+
return /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
218
232
|
e ? /* @__PURE__ */ t("h2", { className: "type-title-section ds:m-0 ds:text-[var(--foreground)]", children: e }) : null,
|
|
219
233
|
n ? /* @__PURE__ */ t("p", { className: "type-body ds:m-0 ds:text-[var(--muted-foreground)]", children: n }) : null,
|
|
220
|
-
|
|
234
|
+
a ? /* @__PURE__ */ t(
|
|
221
235
|
"p",
|
|
222
236
|
{
|
|
223
237
|
className: "type-body-sm ds:m-0 ds:text-[var(--muted-foreground)]",
|
|
224
238
|
"aria-live": "polite",
|
|
225
|
-
children:
|
|
239
|
+
children: a
|
|
226
240
|
}
|
|
227
241
|
) : null
|
|
228
242
|
] });
|
|
229
243
|
}
|
|
230
|
-
const ee =
|
|
244
|
+
const ee = G(
|
|
231
245
|
[
|
|
232
246
|
"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
233
247
|
"ds:min-h-[var(--min-target-size)]",
|
|
@@ -249,7 +263,7 @@ const ee = q(
|
|
|
249
263
|
},
|
|
250
264
|
defaultVariants: { state: "idle" }
|
|
251
265
|
}
|
|
252
|
-
),
|
|
266
|
+
), mt = G(
|
|
253
267
|
"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
254
268
|
{
|
|
255
269
|
variants: {
|
|
@@ -268,7 +282,7 @@ const ee = q(
|
|
|
268
282
|
},
|
|
269
283
|
defaultVariants: { placement: "inline" }
|
|
270
284
|
}
|
|
271
|
-
),
|
|
285
|
+
), pt = G(
|
|
272
286
|
[
|
|
273
287
|
"ds:ms-[var(--spacing-xs)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
274
288
|
"ds:min-h-[var(--min-target-size)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]",
|
|
@@ -279,68 +293,68 @@ const ee = q(
|
|
|
279
293
|
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
|
|
280
294
|
].join(" ")
|
|
281
295
|
);
|
|
282
|
-
function
|
|
296
|
+
function Ae({
|
|
283
297
|
facets: e,
|
|
284
298
|
value: n,
|
|
285
|
-
onChange:
|
|
299
|
+
onChange: s,
|
|
286
300
|
floating: o
|
|
287
301
|
}) {
|
|
288
|
-
const { t: i } =
|
|
289
|
-
() => Object.values(
|
|
290
|
-
[
|
|
291
|
-
),
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
},
|
|
295
|
-
var
|
|
296
|
-
const
|
|
297
|
-
|
|
298
|
-
},
|
|
299
|
-
const
|
|
300
|
-
let
|
|
301
|
-
|
|
302
|
+
const { t: i } = w(), a = H(() => n ?? {}, [n]), d = H(
|
|
303
|
+
() => Object.values(a).some((l) => l && l.length > 0),
|
|
304
|
+
[a]
|
|
305
|
+
), u = (l, f) => {
|
|
306
|
+
const m = { ...a };
|
|
307
|
+
f.length === 0 ? delete m[l] : m[l] = f, s(m), $("serp_filter_changed", { key: l, values: f });
|
|
308
|
+
}, c = (l) => {
|
|
309
|
+
var m;
|
|
310
|
+
const f = (((m = a[l]) == null ? void 0 : m.length) ?? 0) > 0;
|
|
311
|
+
u(l, f ? [] : ["true"]);
|
|
312
|
+
}, g = (l, f) => {
|
|
313
|
+
const m = a[l.key] ?? [], h = m.includes(f);
|
|
314
|
+
let x;
|
|
315
|
+
l.multi ? x = h ? m.filter((r) => r !== f) : [...m, f] : x = h ? [] : [f], u(l.key, x);
|
|
302
316
|
};
|
|
303
|
-
return e.length === 0 ? null : /* @__PURE__ */
|
|
317
|
+
return e.length === 0 ? null : /* @__PURE__ */ p(
|
|
304
318
|
"div",
|
|
305
319
|
{
|
|
306
320
|
"data-component": "practice-results-filters",
|
|
307
321
|
role: "group",
|
|
308
322
|
"aria-label": i("practiceResults.filters.label"),
|
|
309
|
-
className:
|
|
323
|
+
className: mt({
|
|
310
324
|
placement: o ? "floating" : "inline"
|
|
311
325
|
}),
|
|
312
326
|
children: [
|
|
313
|
-
e.map((
|
|
314
|
-
const
|
|
315
|
-
if (
|
|
327
|
+
e.map((l) => {
|
|
328
|
+
const f = l.options.length === 0, m = a[l.key] ?? [], h = m.length > 0;
|
|
329
|
+
if (f)
|
|
316
330
|
return /* @__PURE__ */ t(
|
|
317
331
|
"button",
|
|
318
332
|
{
|
|
319
333
|
type: "button",
|
|
320
334
|
"aria-pressed": h,
|
|
321
|
-
"aria-label":
|
|
322
|
-
onClick: () => l
|
|
335
|
+
"aria-label": l.label,
|
|
336
|
+
onClick: () => c(l.key),
|
|
323
337
|
className: ee({
|
|
324
338
|
state: h ? "active" : "idle"
|
|
325
339
|
}),
|
|
326
|
-
children: /* @__PURE__ */ t("span", { children:
|
|
340
|
+
children: /* @__PURE__ */ t("span", { children: l.label })
|
|
327
341
|
},
|
|
328
|
-
|
|
342
|
+
l.key
|
|
329
343
|
);
|
|
330
|
-
const
|
|
331
|
-
return /* @__PURE__ */
|
|
332
|
-
/* @__PURE__ */ t(F.Trigger, { asChild: !0, children: /* @__PURE__ */
|
|
344
|
+
const x = h ? ` (${m.length})` : "";
|
|
345
|
+
return /* @__PURE__ */ p(F.Root, { children: [
|
|
346
|
+
/* @__PURE__ */ t(F.Trigger, { asChild: !0, children: /* @__PURE__ */ p(
|
|
333
347
|
"button",
|
|
334
348
|
{
|
|
335
349
|
type: "button",
|
|
336
|
-
"aria-label": `${
|
|
350
|
+
"aria-label": `${l.label}${x}`,
|
|
337
351
|
className: ee({
|
|
338
352
|
state: h ? "active" : "idle"
|
|
339
353
|
}),
|
|
340
354
|
children: [
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
-
|
|
343
|
-
|
|
355
|
+
/* @__PURE__ */ p("span", { children: [
|
|
356
|
+
l.label,
|
|
357
|
+
x
|
|
344
358
|
] }),
|
|
345
359
|
/* @__PURE__ */ t(
|
|
346
360
|
we,
|
|
@@ -352,27 +366,27 @@ function Me({
|
|
|
352
366
|
]
|
|
353
367
|
}
|
|
354
368
|
) }),
|
|
355
|
-
/* @__PURE__ */ t(F.Content, { sideOffset: 8, align: "start", children:
|
|
369
|
+
/* @__PURE__ */ t(F.Content, { sideOffset: 8, align: "start", children: l.options.map((r) => /* @__PURE__ */ t(
|
|
356
370
|
F.CheckboxItem,
|
|
357
371
|
{
|
|
358
|
-
checked:
|
|
359
|
-
onSelect: (
|
|
360
|
-
|
|
372
|
+
checked: m.includes(r.value),
|
|
373
|
+
onSelect: (y) => {
|
|
374
|
+
l.multi && y.preventDefault(), g(l, r.value);
|
|
361
375
|
},
|
|
362
|
-
children:
|
|
376
|
+
children: r.label
|
|
363
377
|
},
|
|
364
|
-
|
|
378
|
+
r.value
|
|
365
379
|
)) })
|
|
366
|
-
] },
|
|
380
|
+
] }, l.key);
|
|
367
381
|
}),
|
|
368
382
|
d ? /* @__PURE__ */ t(
|
|
369
383
|
"button",
|
|
370
384
|
{
|
|
371
385
|
type: "button",
|
|
372
386
|
onClick: () => {
|
|
373
|
-
|
|
387
|
+
s({}), $("serp_filter_changed", { key: "*", values: [] });
|
|
374
388
|
},
|
|
375
|
-
className:
|
|
389
|
+
className: pt(),
|
|
376
390
|
children: i("practiceResults.filters.clear")
|
|
377
391
|
}
|
|
378
392
|
) : null
|
|
@@ -380,30 +394,30 @@ function Me({
|
|
|
380
394
|
}
|
|
381
395
|
);
|
|
382
396
|
}
|
|
383
|
-
function
|
|
384
|
-
const { t:
|
|
397
|
+
function de({ value: e, onChange: n }) {
|
|
398
|
+
const { t: s } = w(), o = (i) => {
|
|
385
399
|
switch (i) {
|
|
386
400
|
case "distance":
|
|
387
|
-
return
|
|
401
|
+
return s("practiceResults.sort.distance");
|
|
388
402
|
case "rating":
|
|
389
|
-
return
|
|
403
|
+
return s("practiceResults.sort.rating");
|
|
390
404
|
case "next-available":
|
|
391
|
-
return
|
|
405
|
+
return s("practiceResults.sort.nextAvailable");
|
|
392
406
|
case "relevance":
|
|
393
407
|
default:
|
|
394
|
-
return
|
|
408
|
+
return s("practiceResults.sort.relevance");
|
|
395
409
|
}
|
|
396
410
|
};
|
|
397
|
-
return /* @__PURE__ */
|
|
398
|
-
/* @__PURE__ */ t(F.Trigger, { asChild: !0, children: /* @__PURE__ */
|
|
411
|
+
return /* @__PURE__ */ p(F.Root, { children: [
|
|
412
|
+
/* @__PURE__ */ t(F.Trigger, { asChild: !0, children: /* @__PURE__ */ p(
|
|
399
413
|
"button",
|
|
400
414
|
{
|
|
401
415
|
type: "button",
|
|
402
|
-
"aria-label": `${
|
|
416
|
+
"aria-label": `${s("practiceResults.sort.label")}: ${o(e)}`,
|
|
403
417
|
className: ee({ state: "idle" }),
|
|
404
418
|
children: [
|
|
405
|
-
/* @__PURE__ */
|
|
406
|
-
|
|
419
|
+
/* @__PURE__ */ p("span", { children: [
|
|
420
|
+
s("practiceResults.sort.label"),
|
|
407
421
|
": ",
|
|
408
422
|
o(e)
|
|
409
423
|
] }),
|
|
@@ -416,70 +430,68 @@ function ce({ value: e, onChange: n }) {
|
|
|
416
430
|
{
|
|
417
431
|
value: e,
|
|
418
432
|
onValueChange: (i) => {
|
|
419
|
-
const
|
|
420
|
-
|
|
433
|
+
const a = i;
|
|
434
|
+
a !== e && (n(a), $("serp_sort_changed", { sort: a }));
|
|
421
435
|
},
|
|
422
|
-
children:
|
|
436
|
+
children: lt.map((i) => /* @__PURE__ */ t(F.RadioItem, { value: i, children: o(i) }, i))
|
|
423
437
|
}
|
|
424
438
|
) })
|
|
425
439
|
] });
|
|
426
440
|
}
|
|
427
|
-
function
|
|
428
|
-
const { t: n, i18n:
|
|
441
|
+
function _e({ distanceKm: e }) {
|
|
442
|
+
const { t: n, i18n: s } = w(), o = H(() => {
|
|
429
443
|
if (e < 1) return n("practiceResults.distance.below");
|
|
430
|
-
const i = new Intl.NumberFormat(
|
|
444
|
+
const i = new Intl.NumberFormat(s.language, {
|
|
431
445
|
maximumFractionDigits: 1
|
|
432
446
|
}).format(e);
|
|
433
447
|
return n("practiceResults.distance.km", { distance: i });
|
|
434
|
-
}, [e, n,
|
|
435
|
-
return /* @__PURE__ */ t(
|
|
436
|
-
D,
|
|
437
|
-
{
|
|
438
|
-
label: o,
|
|
439
|
-
variant: "neutral",
|
|
440
|
-
fill: "outline",
|
|
441
|
-
size: "sm",
|
|
442
|
-
leading: /* @__PURE__ */ t(te, { "aria-hidden": "true" })
|
|
443
|
-
}
|
|
444
|
-
);
|
|
448
|
+
}, [e, n, s.language]);
|
|
449
|
+
return /* @__PURE__ */ t(D, { variant: "neutral", leading: /* @__PURE__ */ t(ne, { "aria-hidden": "true" }), children: o });
|
|
445
450
|
}
|
|
446
|
-
const ye =
|
|
451
|
+
const ye = G(
|
|
447
452
|
[
|
|
448
453
|
"ds:inline-size-[12rem] ds:block-size-[8rem] ds:shrink-0",
|
|
449
|
-
"ds:rounded-[var(--radius-md)]"
|
|
454
|
+
"ds:rounded-[var(--radius-md)] ds:overflow-hidden"
|
|
450
455
|
].join(" "),
|
|
451
456
|
{
|
|
452
457
|
variants: {
|
|
453
458
|
state: {
|
|
454
|
-
|
|
459
|
+
// Tonal address-block placeholder — renders the MapPin glyph
|
|
460
|
+
// + address text on a `--muted` surface. Used when the consumer
|
|
461
|
+
// hasn't provided `googleMapsApiKey`; carries the spatial cue
|
|
462
|
+
// (location is here, even if we can't draw the map).
|
|
463
|
+
placeholder: "ds:flex ds:flex-col ds:items-start ds:justify-end ds:gap-[var(--spacing-2xs)] ds:bg-[var(--muted)] ds:text-[var(--muted-foreground)] ds:p-[var(--spacing-sm)]",
|
|
455
464
|
image: "ds:[object-fit:cover]"
|
|
456
465
|
}
|
|
457
466
|
},
|
|
458
467
|
defaultVariants: { state: "placeholder" }
|
|
459
468
|
}
|
|
460
469
|
);
|
|
461
|
-
function
|
|
470
|
+
function ft() {
|
|
462
471
|
if (typeof document > "u") return "4945a3";
|
|
463
472
|
const e = getComputedStyle(document.documentElement).getPropertyValue("--map-marker-color").trim(), n = /^#?([0-9a-fA-F]{6})$/.exec(e);
|
|
464
473
|
return n ? n[1] : "4945a3";
|
|
465
474
|
}
|
|
466
|
-
function
|
|
475
|
+
function ht({
|
|
467
476
|
apiKey: e,
|
|
468
477
|
center: n,
|
|
469
|
-
zoom:
|
|
470
|
-
|
|
478
|
+
zoom: s = 14,
|
|
479
|
+
address: o
|
|
471
480
|
}) {
|
|
472
|
-
const { t: i } =
|
|
473
|
-
if (!
|
|
474
|
-
return /* @__PURE__ */
|
|
481
|
+
const { t: i } = w();
|
|
482
|
+
if (!e)
|
|
483
|
+
return /* @__PURE__ */ p(
|
|
475
484
|
"div",
|
|
476
485
|
{
|
|
477
|
-
"aria-hidden": "true",
|
|
486
|
+
"aria-hidden": o ? void 0 : "true",
|
|
478
487
|
className: ye({ state: "placeholder" }),
|
|
479
|
-
children:
|
|
488
|
+
children: [
|
|
489
|
+
/* @__PURE__ */ t(ne, { "aria-hidden": "true", className: "ds:size-5 ds:shrink-0" }),
|
|
490
|
+
o ? /* @__PURE__ */ t("span", { className: "type-meta ds:[overflow-wrap:anywhere]", children: o }) : null
|
|
491
|
+
]
|
|
480
492
|
}
|
|
481
493
|
);
|
|
482
|
-
const
|
|
494
|
+
const a = ft(), d = `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)}`;
|
|
483
495
|
return /* @__PURE__ */ t(
|
|
484
496
|
"img",
|
|
485
497
|
{
|
|
@@ -493,7 +505,7 @@ function ft({
|
|
|
493
505
|
}
|
|
494
506
|
);
|
|
495
507
|
}
|
|
496
|
-
const
|
|
508
|
+
const ze = G(
|
|
497
509
|
[
|
|
498
510
|
"ds:relative ds:flex ds:w-full ds:cursor-pointer",
|
|
499
511
|
"ds:rounded-[var(--radius-lg)]",
|
|
@@ -522,24 +534,24 @@ const _e = q(
|
|
|
522
534
|
defaultVariants: { density: "compact" }
|
|
523
535
|
}
|
|
524
536
|
);
|
|
525
|
-
function
|
|
537
|
+
function gt({
|
|
526
538
|
result: e,
|
|
527
539
|
highlighted: n,
|
|
528
|
-
onSelect:
|
|
540
|
+
onSelect: s,
|
|
529
541
|
onOpenClick: o,
|
|
530
542
|
onHover: i,
|
|
531
|
-
density:
|
|
543
|
+
density: a = "compact",
|
|
532
544
|
openLabel: d,
|
|
533
|
-
nextSlotText:
|
|
534
|
-
maxInsuranceChips:
|
|
535
|
-
maxLanguageChips:
|
|
536
|
-
children:
|
|
545
|
+
nextSlotText: u,
|
|
546
|
+
maxInsuranceChips: c = 3,
|
|
547
|
+
maxLanguageChips: g = 4,
|
|
548
|
+
children: l
|
|
537
549
|
}) {
|
|
538
|
-
var
|
|
539
|
-
const { t:
|
|
550
|
+
var I, P, E, O, U, j;
|
|
551
|
+
const { t: f } = w(), m = e.rating, h = (I = e.location) == null ? void 0 : I.distanceKm, x = (((P = e.languages) == null ? void 0 : P.length) ?? 0) > 0, r = (((E = e.insurances) == null ? void 0 : E.length) ?? 0) > 0, y = e.specializedInFearPatients, N = x || r || y, S = (e.languages ?? []).slice(0, g), b = (((O = e.languages) == null ? void 0 : O.length) ?? 0) - S.length, M = (e.insurances ?? []).slice(0, c), z = (((U = e.insurances) == null ? void 0 : U.length) ?? 0) - M.length;
|
|
540
552
|
return (
|
|
541
553
|
// 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.
|
|
542
|
-
/* @__PURE__ */
|
|
554
|
+
/* @__PURE__ */ p(
|
|
543
555
|
"div",
|
|
544
556
|
{
|
|
545
557
|
"data-component": "practice-result-card",
|
|
@@ -547,15 +559,15 @@ function ht({
|
|
|
547
559
|
"data-highlighted": n ? "true" : "false",
|
|
548
560
|
role: "group",
|
|
549
561
|
"aria-labelledby": `practice-result-${e.id}-name`,
|
|
550
|
-
onClick:
|
|
562
|
+
onClick: s,
|
|
551
563
|
onMouseEnter: i,
|
|
552
564
|
onFocus: i,
|
|
553
|
-
className:
|
|
565
|
+
className: ze({ density: a }),
|
|
554
566
|
children: [
|
|
555
567
|
/* @__PURE__ */ t(Re, { src: e.imageUrl, name: e.name, size: "lg" }),
|
|
556
|
-
/* @__PURE__ */
|
|
557
|
-
/* @__PURE__ */
|
|
558
|
-
/* @__PURE__ */
|
|
568
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
569
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
570
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
559
571
|
/* @__PURE__ */ t(
|
|
560
572
|
"span",
|
|
561
573
|
{
|
|
@@ -564,114 +576,85 @@ function ht({
|
|
|
564
576
|
children: e.name
|
|
565
577
|
}
|
|
566
578
|
),
|
|
567
|
-
h != null ? /* @__PURE__ */ t(
|
|
579
|
+
h != null ? /* @__PURE__ */ t(_e, { distanceKm: h }) : null
|
|
568
580
|
] }),
|
|
569
581
|
e.subtitle ? /* @__PURE__ */ t("span", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: e.subtitle }) : null,
|
|
570
|
-
(j = e.location) != null && j.address ? /* @__PURE__ */
|
|
571
|
-
/* @__PURE__ */ t(
|
|
582
|
+
(j = e.location) != null && j.address ? /* @__PURE__ */ p("span", { className: "type-meta ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
583
|
+
/* @__PURE__ */ t(ne, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" }),
|
|
572
584
|
e.location.address
|
|
573
585
|
] }) : null
|
|
574
586
|
] }),
|
|
575
|
-
|
|
587
|
+
m && m.count > 0 ? /* @__PURE__ */ t(
|
|
576
588
|
ke,
|
|
577
589
|
{
|
|
578
|
-
value:
|
|
579
|
-
reviews: { count:
|
|
590
|
+
value: m.value,
|
|
591
|
+
reviews: { count: m.count },
|
|
580
592
|
size: "sm"
|
|
581
593
|
}
|
|
582
594
|
) : null,
|
|
583
|
-
|
|
584
|
-
|
|
595
|
+
N ? /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
596
|
+
S.map((C) => /* @__PURE__ */ t(
|
|
585
597
|
D,
|
|
586
598
|
{
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
size: "sm",
|
|
591
|
-
leading: /* @__PURE__ */ t(Se, { "aria-hidden": "true" })
|
|
599
|
+
variant: "neutral",
|
|
600
|
+
leading: /* @__PURE__ */ t(Se, { "aria-hidden": "true" }),
|
|
601
|
+
children: C.toUpperCase()
|
|
592
602
|
},
|
|
593
|
-
`lang-${
|
|
603
|
+
`lang-${C}`
|
|
594
604
|
)),
|
|
595
|
-
|
|
605
|
+
b > 0 ? /* @__PURE__ */ t(D, { variant: "neutral", children: `+${b}` }) : null,
|
|
606
|
+
M.map((C) => /* @__PURE__ */ t(
|
|
596
607
|
D,
|
|
597
608
|
{
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
size: "sm"
|
|
602
|
-
}
|
|
603
|
-
) : null,
|
|
604
|
-
y.map((S) => /* @__PURE__ */ t(
|
|
605
|
-
D,
|
|
606
|
-
{
|
|
607
|
-
label: S,
|
|
608
|
-
variant: "brand",
|
|
609
|
-
fill: "outline",
|
|
610
|
-
size: "sm",
|
|
611
|
-
leading: /* @__PURE__ */ t(Pe, { "aria-hidden": "true" })
|
|
609
|
+
variant: "info",
|
|
610
|
+
leading: /* @__PURE__ */ t(Pe, { "aria-hidden": "true" }),
|
|
611
|
+
children: C
|
|
612
612
|
},
|
|
613
|
-
`ins-${
|
|
613
|
+
`ins-${C}`
|
|
614
614
|
)),
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
{
|
|
618
|
-
label: `+${_}`,
|
|
619
|
-
variant: "neutral",
|
|
620
|
-
fill: "outline",
|
|
621
|
-
size: "sm"
|
|
622
|
-
}
|
|
623
|
-
) : null,
|
|
624
|
-
x ? /* @__PURE__ */ t(
|
|
625
|
-
D,
|
|
626
|
-
{
|
|
627
|
-
label: p("practiceResults.fearPatient.label"),
|
|
628
|
-
variant: "success",
|
|
629
|
-
fill: "outline",
|
|
630
|
-
size: "sm",
|
|
631
|
-
leading: /* @__PURE__ */ t(Ce, { "aria-hidden": "true" })
|
|
632
|
-
}
|
|
633
|
-
) : null
|
|
615
|
+
z > 0 ? /* @__PURE__ */ t(D, { variant: "neutral", children: `+${z}` }) : null,
|
|
616
|
+
y ? /* @__PURE__ */ t(D, { variant: "info", leading: /* @__PURE__ */ t(Ne, { "aria-hidden": "true" }), children: f("practiceResults.fearPatient.label") }) : null
|
|
634
617
|
] }) : null,
|
|
635
|
-
e.nextAvailableSlot &&
|
|
636
|
-
/* @__PURE__ */
|
|
618
|
+
e.nextAvailableSlot && u ? /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
619
|
+
/* @__PURE__ */ p("span", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
637
620
|
/* @__PURE__ */ t(
|
|
638
|
-
|
|
621
|
+
Ce,
|
|
639
622
|
{
|
|
640
623
|
"aria-hidden": "true",
|
|
641
624
|
className: "ds:size-4 ds:text-[var(--primary)]"
|
|
642
625
|
}
|
|
643
626
|
),
|
|
644
|
-
|
|
627
|
+
f("practiceResults.nextSlot.summary", { time: u })
|
|
645
628
|
] }),
|
|
646
629
|
/* @__PURE__ */ t(
|
|
647
|
-
|
|
630
|
+
q,
|
|
648
631
|
{
|
|
649
632
|
intent: "primary",
|
|
650
633
|
size: "sm",
|
|
651
634
|
asChild: !0,
|
|
652
|
-
onClick: (
|
|
653
|
-
|
|
635
|
+
onClick: (C) => {
|
|
636
|
+
C.stopPropagation();
|
|
654
637
|
},
|
|
655
638
|
children: /* @__PURE__ */ t(
|
|
656
639
|
"a",
|
|
657
640
|
{
|
|
658
641
|
href: e.nextAvailableSlot.bookingHref,
|
|
659
642
|
"data-component": "practice-result-next-slot-cta",
|
|
660
|
-
children:
|
|
643
|
+
children: f("practiceResults.nextSlot.cta", { time: u })
|
|
661
644
|
}
|
|
662
645
|
)
|
|
663
646
|
}
|
|
664
647
|
)
|
|
665
648
|
] }) : null,
|
|
666
|
-
|
|
649
|
+
l,
|
|
667
650
|
/* @__PURE__ */ t("div", { className: "ds:mt-[var(--spacing-xs)] ds:flex ds:justify-end", children: /* @__PURE__ */ t(
|
|
668
|
-
|
|
651
|
+
q,
|
|
669
652
|
{
|
|
670
653
|
intent: "secondary",
|
|
671
654
|
size: "sm",
|
|
672
655
|
asChild: !0,
|
|
673
|
-
onClick: (
|
|
674
|
-
|
|
656
|
+
onClick: (C) => {
|
|
657
|
+
C.stopPropagation(), o();
|
|
675
658
|
},
|
|
676
659
|
children: /* @__PURE__ */ t("a", { href: e.href, "data-component": "practice-result-open-cta", children: d })
|
|
677
660
|
}
|
|
@@ -682,21 +665,20 @@ function ht({
|
|
|
682
665
|
)
|
|
683
666
|
);
|
|
684
667
|
}
|
|
685
|
-
function
|
|
668
|
+
function vt({
|
|
686
669
|
result: e,
|
|
687
670
|
apiKey: n,
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
openLabel: m
|
|
671
|
+
highlighted: s,
|
|
672
|
+
onSelect: o,
|
|
673
|
+
onOpenClick: i,
|
|
674
|
+
onHover: a,
|
|
675
|
+
openLabel: d
|
|
694
676
|
}) {
|
|
695
|
-
var
|
|
696
|
-
const { t:
|
|
677
|
+
var r, y, N, S;
|
|
678
|
+
const { t: u, i18n: c } = w(), g = H(() => {
|
|
697
679
|
if (e.nextAvailableSlot)
|
|
698
680
|
try {
|
|
699
|
-
return new Intl.DateTimeFormat(
|
|
681
|
+
return new Intl.DateTimeFormat(c.language, {
|
|
700
682
|
weekday: "short",
|
|
701
683
|
hour: "numeric",
|
|
702
684
|
minute: "numeric"
|
|
@@ -704,39 +686,39 @@ function gt({
|
|
|
704
686
|
} catch {
|
|
705
687
|
return e.nextAvailableSlot.dateTime;
|
|
706
688
|
}
|
|
707
|
-
}, [e.nextAvailableSlot,
|
|
689
|
+
}, [e.nextAvailableSlot, c.language]), l = (((r = e.languages) == null ? void 0 : r.length) ?? 0) > 0, f = (((y = e.insurances) == null ? void 0 : y.length) ?? 0) > 0, m = e.specializedInFearPatients, h = l || f || m, x = (N = e.location) == null ? void 0 : N.distanceKm;
|
|
708
690
|
return (
|
|
709
691
|
// 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.
|
|
710
|
-
/* @__PURE__ */
|
|
692
|
+
/* @__PURE__ */ p(
|
|
711
693
|
"div",
|
|
712
694
|
{
|
|
713
695
|
"data-component": "practice-result-card",
|
|
714
696
|
"data-result-id": e.id,
|
|
715
697
|
"data-density": "rich",
|
|
716
|
-
"data-highlighted":
|
|
698
|
+
"data-highlighted": s ? "true" : "false",
|
|
717
699
|
role: "group",
|
|
718
700
|
"aria-labelledby": `practice-result-${e.id}-name`,
|
|
719
|
-
onClick:
|
|
720
|
-
onMouseEnter:
|
|
721
|
-
onFocus:
|
|
722
|
-
className:
|
|
701
|
+
onClick: o,
|
|
702
|
+
onMouseEnter: a,
|
|
703
|
+
onFocus: a,
|
|
704
|
+
className: ze({ density: "rich" }),
|
|
723
705
|
children: [
|
|
724
706
|
e.location ? /* @__PURE__ */ t(
|
|
725
|
-
|
|
707
|
+
ht,
|
|
726
708
|
{
|
|
727
709
|
apiKey: n,
|
|
728
710
|
center: {
|
|
729
711
|
lat: e.location.lat,
|
|
730
712
|
lng: e.location.lng
|
|
731
713
|
},
|
|
732
|
-
|
|
714
|
+
address: e.location.address
|
|
733
715
|
}
|
|
734
716
|
) : null,
|
|
735
|
-
/* @__PURE__ */
|
|
736
|
-
/* @__PURE__ */
|
|
717
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
718
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-md)]", children: [
|
|
737
719
|
/* @__PURE__ */ t(Re, { src: e.imageUrl, name: e.name, size: "md" }),
|
|
738
|
-
/* @__PURE__ */
|
|
739
|
-
/* @__PURE__ */
|
|
720
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
721
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
740
722
|
/* @__PURE__ */ t(
|
|
741
723
|
"span",
|
|
742
724
|
{
|
|
@@ -745,12 +727,12 @@ function gt({
|
|
|
745
727
|
children: e.name
|
|
746
728
|
}
|
|
747
729
|
),
|
|
748
|
-
|
|
730
|
+
x != null ? /* @__PURE__ */ t(_e, { distanceKm: x }) : null
|
|
749
731
|
] }),
|
|
750
732
|
e.subtitle ? /* @__PURE__ */ t("span", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: e.subtitle }) : null,
|
|
751
|
-
(
|
|
733
|
+
(S = e.location) != null && S.address ? /* @__PURE__ */ p("span", { className: "type-meta ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
752
734
|
/* @__PURE__ */ t(
|
|
753
|
-
|
|
735
|
+
ne,
|
|
754
736
|
{
|
|
755
737
|
"aria-hidden": "true",
|
|
756
738
|
className: "ds:size-3.5 ds:shrink-0"
|
|
@@ -768,81 +750,68 @@ function gt({
|
|
|
768
750
|
}
|
|
769
751
|
) : null
|
|
770
752
|
] }),
|
|
771
|
-
|
|
772
|
-
|
|
753
|
+
h ? /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
754
|
+
l ? (e.languages ?? []).map((b) => /* @__PURE__ */ t(
|
|
773
755
|
D,
|
|
774
756
|
{
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
size: "sm",
|
|
779
|
-
leading: /* @__PURE__ */ t(Se, { "aria-hidden": "true" })
|
|
757
|
+
variant: "neutral",
|
|
758
|
+
leading: /* @__PURE__ */ t(Se, { "aria-hidden": "true" }),
|
|
759
|
+
children: b.toUpperCase()
|
|
780
760
|
},
|
|
781
|
-
`lang-${
|
|
761
|
+
`lang-${b}`
|
|
782
762
|
)) : null,
|
|
783
|
-
|
|
763
|
+
f ? (e.insurances ?? []).map((b) => /* @__PURE__ */ t(
|
|
784
764
|
D,
|
|
785
765
|
{
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
size: "sm",
|
|
790
|
-
leading: /* @__PURE__ */ t(Pe, { "aria-hidden": "true" })
|
|
766
|
+
variant: "info",
|
|
767
|
+
leading: /* @__PURE__ */ t(Pe, { "aria-hidden": "true" }),
|
|
768
|
+
children: b
|
|
791
769
|
},
|
|
792
|
-
`ins-${
|
|
770
|
+
`ins-${b}`
|
|
793
771
|
)) : null,
|
|
794
|
-
|
|
795
|
-
D,
|
|
796
|
-
{
|
|
797
|
-
label: l("practiceResults.fearPatient.label"),
|
|
798
|
-
variant: "success",
|
|
799
|
-
fill: "outline",
|
|
800
|
-
size: "sm",
|
|
801
|
-
leading: /* @__PURE__ */ t(Ce, { "aria-hidden": "true" })
|
|
802
|
-
}
|
|
803
|
-
) : null
|
|
772
|
+
m ? /* @__PURE__ */ t(D, { variant: "info", leading: /* @__PURE__ */ t(Ne, { "aria-hidden": "true" }), children: u("practiceResults.fearPatient.label") }) : null
|
|
804
773
|
] }) : null,
|
|
805
|
-
e.nextAvailableSlot &&
|
|
806
|
-
/* @__PURE__ */
|
|
774
|
+
e.nextAvailableSlot && g ? /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
775
|
+
/* @__PURE__ */ p("span", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
807
776
|
/* @__PURE__ */ t(
|
|
808
|
-
|
|
777
|
+
Ce,
|
|
809
778
|
{
|
|
810
779
|
"aria-hidden": "true",
|
|
811
780
|
className: "ds:size-4 ds:text-[var(--primary)]"
|
|
812
781
|
}
|
|
813
782
|
),
|
|
814
|
-
|
|
783
|
+
u("practiceResults.nextSlot.summary", { time: g })
|
|
815
784
|
] }),
|
|
816
785
|
/* @__PURE__ */ t(
|
|
817
|
-
|
|
786
|
+
q,
|
|
818
787
|
{
|
|
819
788
|
intent: "primary",
|
|
820
789
|
size: "sm",
|
|
821
790
|
asChild: !0,
|
|
822
|
-
onClick: (
|
|
823
|
-
|
|
791
|
+
onClick: (b) => {
|
|
792
|
+
b.stopPropagation();
|
|
824
793
|
},
|
|
825
794
|
children: /* @__PURE__ */ t(
|
|
826
795
|
"a",
|
|
827
796
|
{
|
|
828
797
|
href: e.nextAvailableSlot.bookingHref,
|
|
829
798
|
"data-component": "practice-result-next-slot-cta",
|
|
830
|
-
children:
|
|
799
|
+
children: u("practiceResults.nextSlot.cta", { time: g })
|
|
831
800
|
}
|
|
832
801
|
)
|
|
833
802
|
}
|
|
834
803
|
)
|
|
835
804
|
] }) : null,
|
|
836
805
|
/* @__PURE__ */ t("div", { className: "ds:mt-[var(--spacing-xs)] ds:flex ds:justify-end", children: /* @__PURE__ */ t(
|
|
837
|
-
|
|
806
|
+
q,
|
|
838
807
|
{
|
|
839
808
|
intent: "secondary",
|
|
840
809
|
size: "sm",
|
|
841
810
|
asChild: !0,
|
|
842
|
-
onClick: (
|
|
843
|
-
|
|
811
|
+
onClick: (b) => {
|
|
812
|
+
b.stopPropagation(), i();
|
|
844
813
|
},
|
|
845
|
-
children: /* @__PURE__ */ t("a", { href: e.href, "data-component": "practice-result-open-cta", children:
|
|
814
|
+
children: /* @__PURE__ */ t("a", { href: e.href, "data-component": "practice-result-open-cta", children: d })
|
|
846
815
|
}
|
|
847
816
|
) })
|
|
848
817
|
] })
|
|
@@ -854,135 +823,133 @@ function gt({
|
|
|
854
823
|
function pe({
|
|
855
824
|
results: e,
|
|
856
825
|
highlightedId: n,
|
|
857
|
-
onCardHover:
|
|
826
|
+
onCardHover: s,
|
|
858
827
|
onCardSelect: o,
|
|
859
828
|
onCardOpenClick: i,
|
|
860
|
-
openLabel:
|
|
829
|
+
openLabel: a,
|
|
861
830
|
formatNextSlot: d,
|
|
862
|
-
onLoadMore:
|
|
863
|
-
loadingMore:
|
|
864
|
-
loadingSkeletons:
|
|
865
|
-
density:
|
|
866
|
-
apiKey:
|
|
867
|
-
|
|
868
|
-
containerRef: h
|
|
831
|
+
onLoadMore: u,
|
|
832
|
+
loadingMore: c,
|
|
833
|
+
loadingSkeletons: g,
|
|
834
|
+
density: l = "compact",
|
|
835
|
+
apiKey: f,
|
|
836
|
+
containerRef: m
|
|
869
837
|
}) {
|
|
870
|
-
const { t:
|
|
838
|
+
const { t: h } = w(), x = A(null);
|
|
871
839
|
return J(() => {
|
|
872
|
-
if (!
|
|
873
|
-
const
|
|
874
|
-
if (!
|
|
875
|
-
const
|
|
876
|
-
(
|
|
877
|
-
for (const
|
|
878
|
-
|
|
840
|
+
if (!u) return;
|
|
841
|
+
const r = x.current;
|
|
842
|
+
if (!r || typeof IntersectionObserver > "u") return;
|
|
843
|
+
const y = new IntersectionObserver(
|
|
844
|
+
(N) => {
|
|
845
|
+
for (const S of N)
|
|
846
|
+
S.isIntersecting && ($("serp_load_more", {
|
|
879
847
|
currentCount: e.length
|
|
880
|
-
}),
|
|
848
|
+
}), u());
|
|
881
849
|
},
|
|
882
850
|
{ root: null, rootMargin: "200px" }
|
|
883
851
|
);
|
|
884
|
-
return
|
|
885
|
-
}, [
|
|
852
|
+
return y.observe(r), () => y.disconnect();
|
|
853
|
+
}, [u, e.length]), g ? /* @__PURE__ */ t(
|
|
886
854
|
"div",
|
|
887
855
|
{
|
|
888
856
|
role: "status",
|
|
889
857
|
"aria-live": "polite",
|
|
890
|
-
"aria-label":
|
|
858
|
+
"aria-label": h("practiceResults.loading"),
|
|
891
859
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
892
|
-
children: Array.from({ length: 4 }).map((
|
|
860
|
+
children: Array.from({ length: 4 }).map((r, y) => /* @__PURE__ */ t(
|
|
893
861
|
Qe,
|
|
894
862
|
{
|
|
895
863
|
variant: "rounded",
|
|
896
|
-
height:
|
|
864
|
+
height: l === "rich" ? "11rem" : "7rem"
|
|
897
865
|
},
|
|
898
|
-
`pr-skel-${
|
|
866
|
+
`pr-skel-${y}`
|
|
899
867
|
))
|
|
900
868
|
}
|
|
901
|
-
) : /* @__PURE__ */
|
|
869
|
+
) : /* @__PURE__ */ p(
|
|
902
870
|
"div",
|
|
903
871
|
{
|
|
904
|
-
ref:
|
|
872
|
+
ref: m,
|
|
905
873
|
"data-component": "practice-results-list",
|
|
906
874
|
role: "list",
|
|
907
|
-
"aria-label":
|
|
875
|
+
"aria-label": h("practiceResults.list.label"),
|
|
908
876
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:overflow-y-auto",
|
|
909
877
|
children: [
|
|
910
|
-
e.map((
|
|
911
|
-
|
|
878
|
+
e.map((r) => /* @__PURE__ */ t("div", { role: "listitem", children: l === "rich" ? /* @__PURE__ */ t(
|
|
879
|
+
vt,
|
|
912
880
|
{
|
|
913
|
-
result:
|
|
914
|
-
apiKey:
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
openLabel: s
|
|
881
|
+
result: r,
|
|
882
|
+
apiKey: f,
|
|
883
|
+
highlighted: n === r.id,
|
|
884
|
+
onSelect: () => o(r.id),
|
|
885
|
+
onOpenClick: () => i(r.id),
|
|
886
|
+
onHover: () => s(r.id),
|
|
887
|
+
openLabel: a
|
|
921
888
|
}
|
|
922
889
|
) : /* @__PURE__ */ t(
|
|
923
|
-
|
|
890
|
+
gt,
|
|
924
891
|
{
|
|
925
|
-
result:
|
|
926
|
-
highlighted: n ===
|
|
927
|
-
onSelect: () => o(
|
|
928
|
-
onOpenClick: () => i(
|
|
929
|
-
onHover: () =>
|
|
930
|
-
openLabel:
|
|
931
|
-
nextSlotText: d(
|
|
892
|
+
result: r,
|
|
893
|
+
highlighted: n === r.id,
|
|
894
|
+
onSelect: () => o(r.id),
|
|
895
|
+
onOpenClick: () => i(r.id),
|
|
896
|
+
onHover: () => s(r.id),
|
|
897
|
+
openLabel: a,
|
|
898
|
+
nextSlotText: d(r)
|
|
932
899
|
}
|
|
933
|
-
) },
|
|
934
|
-
|
|
900
|
+
) }, r.id)),
|
|
901
|
+
u ? /* @__PURE__ */ t(
|
|
935
902
|
"div",
|
|
936
903
|
{
|
|
937
|
-
ref:
|
|
904
|
+
ref: x,
|
|
938
905
|
"aria-hidden": "true",
|
|
939
906
|
className: "ds:flex ds:items-center ds:justify-center ds:py-[var(--spacing-md)]",
|
|
940
|
-
children:
|
|
907
|
+
children: c ? /* @__PURE__ */ t(Je, { size: "md", variant: "pulse" }) : /* @__PURE__ */ t("span", { className: "ds:size-1" })
|
|
941
908
|
}
|
|
942
909
|
) : null
|
|
943
910
|
]
|
|
944
911
|
}
|
|
945
912
|
);
|
|
946
913
|
}
|
|
947
|
-
function
|
|
914
|
+
function ue({
|
|
948
915
|
results: e,
|
|
949
916
|
searchCentre: n,
|
|
950
|
-
zoom:
|
|
917
|
+
zoom: s,
|
|
951
918
|
apiKey: o,
|
|
952
919
|
highlightedId: i,
|
|
953
|
-
onPinClick:
|
|
920
|
+
onPinClick: a,
|
|
954
921
|
onPinHover: d,
|
|
955
|
-
onPinFirstInteract:
|
|
956
|
-
onBoundsChange:
|
|
957
|
-
consentGranted:
|
|
958
|
-
onConsentRequest:
|
|
959
|
-
mapHandleRef:
|
|
922
|
+
onPinFirstInteract: u,
|
|
923
|
+
onBoundsChange: c,
|
|
924
|
+
consentGranted: g,
|
|
925
|
+
onConsentRequest: l,
|
|
926
|
+
mapHandleRef: f
|
|
960
927
|
}) {
|
|
961
|
-
const { t:
|
|
928
|
+
const { t: m } = w(), h = H(
|
|
962
929
|
() => e.filter(
|
|
963
|
-
(
|
|
964
|
-
).map((
|
|
965
|
-
id:
|
|
930
|
+
(r) => !!r.location
|
|
931
|
+
).map((r) => ({
|
|
932
|
+
id: r.id,
|
|
966
933
|
position: {
|
|
967
|
-
lat:
|
|
968
|
-
lng:
|
|
934
|
+
lat: r.location.lat,
|
|
935
|
+
lng: r.location.lng
|
|
969
936
|
},
|
|
970
|
-
label:
|
|
937
|
+
label: r.name
|
|
971
938
|
})),
|
|
972
939
|
[e]
|
|
973
|
-
),
|
|
940
|
+
), x = H(() => {
|
|
974
941
|
if (n) return n;
|
|
975
|
-
const
|
|
976
|
-
return
|
|
977
|
-
lat: (
|
|
978
|
-
lng: (
|
|
942
|
+
const r = be(e);
|
|
943
|
+
return r ? {
|
|
944
|
+
lat: (r.north + r.south) / 2,
|
|
945
|
+
lng: (r.east + r.west) / 2
|
|
979
946
|
} : { lat: 45.4642, lng: 9.19 };
|
|
980
947
|
}, [e, n]);
|
|
981
948
|
return J(() => {
|
|
982
|
-
if (!
|
|
983
|
-
const
|
|
984
|
-
|
|
985
|
-
}, [e,
|
|
949
|
+
if (!c) return;
|
|
950
|
+
const r = be(e);
|
|
951
|
+
r && (c(r), $("serp_map_panned", { bounds: r }));
|
|
952
|
+
}, [e, c]), /* @__PURE__ */ t(
|
|
986
953
|
"div",
|
|
987
954
|
{
|
|
988
955
|
"data-component": "practice-results-map-panel",
|
|
@@ -990,18 +957,18 @@ function de({
|
|
|
990
957
|
children: /* @__PURE__ */ t(
|
|
991
958
|
Ze,
|
|
992
959
|
{
|
|
993
|
-
ref:
|
|
960
|
+
ref: f,
|
|
994
961
|
apiKey: o ?? "",
|
|
995
|
-
center:
|
|
996
|
-
zoom:
|
|
962
|
+
center: x,
|
|
963
|
+
zoom: s,
|
|
997
964
|
markers: h,
|
|
998
965
|
selectedMarkerId: i,
|
|
999
|
-
consentGranted: !!
|
|
1000
|
-
onConsentRequest:
|
|
1001
|
-
onMarkerClick: (
|
|
1002
|
-
|
|
966
|
+
consentGranted: !!g,
|
|
967
|
+
onConsentRequest: l,
|
|
968
|
+
onMarkerClick: (r) => {
|
|
969
|
+
r != null && (d(r), u(r), a(r));
|
|
1003
970
|
},
|
|
1004
|
-
ariaLabel:
|
|
971
|
+
ariaLabel: m("practiceResults.map.label"),
|
|
1005
972
|
size: "lg",
|
|
1006
973
|
surface: "bordered",
|
|
1007
974
|
className: "ds:size-full"
|
|
@@ -1010,49 +977,49 @@ function de({
|
|
|
1010
977
|
}
|
|
1011
978
|
);
|
|
1012
979
|
}
|
|
1013
|
-
function
|
|
980
|
+
function Ie({
|
|
1014
981
|
variantBodyProps: e
|
|
1015
982
|
}) {
|
|
1016
|
-
const { facets: n, value:
|
|
1017
|
-
return /* @__PURE__ */
|
|
983
|
+
const { facets: n, value: s, onChange: o, heading: i, intro: a, totalCount: d, searchCentre: u } = e;
|
|
984
|
+
return /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1018
985
|
/* @__PURE__ */ t(
|
|
1019
|
-
|
|
986
|
+
Me,
|
|
1020
987
|
{
|
|
1021
988
|
heading: i,
|
|
1022
|
-
intro:
|
|
989
|
+
intro: a,
|
|
1023
990
|
totalCount: d,
|
|
1024
|
-
searchCentreLabel:
|
|
991
|
+
searchCentreLabel: u == null ? void 0 : u.label
|
|
1025
992
|
}
|
|
1026
993
|
),
|
|
1027
|
-
n.length > 0 ? /* @__PURE__ */
|
|
994
|
+
n.length > 0 ? /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
1028
995
|
/* @__PURE__ */ t(
|
|
1029
|
-
|
|
996
|
+
Ae,
|
|
1030
997
|
{
|
|
1031
998
|
facets: n,
|
|
1032
|
-
value:
|
|
1033
|
-
onChange: (
|
|
999
|
+
value: s.facets,
|
|
1000
|
+
onChange: (c) => o({ ...s, facets: c })
|
|
1034
1001
|
}
|
|
1035
1002
|
),
|
|
1036
1003
|
/* @__PURE__ */ t(
|
|
1037
|
-
|
|
1004
|
+
de,
|
|
1038
1005
|
{
|
|
1039
|
-
value:
|
|
1040
|
-
onChange: (
|
|
1006
|
+
value: s.sort ?? "relevance",
|
|
1007
|
+
onChange: (c) => o({ ...s, sort: c })
|
|
1041
1008
|
}
|
|
1042
1009
|
)
|
|
1043
1010
|
] }) : /* @__PURE__ */ t("div", { className: "ds:flex ds:justify-end", children: /* @__PURE__ */ t(
|
|
1044
|
-
|
|
1011
|
+
de,
|
|
1045
1012
|
{
|
|
1046
|
-
value:
|
|
1047
|
-
onChange: (
|
|
1013
|
+
value: s.sort ?? "relevance",
|
|
1014
|
+
onChange: (c) => o({ ...s, sort: c })
|
|
1048
1015
|
}
|
|
1049
1016
|
) })
|
|
1050
1017
|
] });
|
|
1051
1018
|
}
|
|
1052
1019
|
function fe() {
|
|
1053
|
-
const { t: e } =
|
|
1020
|
+
const { t: e } = w();
|
|
1054
1021
|
return /* @__PURE__ */ t(
|
|
1055
|
-
|
|
1022
|
+
Ge,
|
|
1056
1023
|
{
|
|
1057
1024
|
variant: "no-results",
|
|
1058
1025
|
title: e("practiceResults.empty.title"),
|
|
@@ -1061,12 +1028,12 @@ function fe() {
|
|
|
1061
1028
|
);
|
|
1062
1029
|
}
|
|
1063
1030
|
function he({ onRetry: e }) {
|
|
1064
|
-
const { t: n } =
|
|
1065
|
-
return /* @__PURE__ */
|
|
1031
|
+
const { t: n } = w();
|
|
1032
|
+
return /* @__PURE__ */ p(Y, { variant: "error", children: [
|
|
1066
1033
|
/* @__PURE__ */ t(Y.Title, { as: "h3", children: n("practiceResults.error.title") }),
|
|
1067
1034
|
/* @__PURE__ */ t(Y.Description, { children: n("practiceResults.error.description") }),
|
|
1068
1035
|
e ? /* @__PURE__ */ t(Y.Action, { children: /* @__PURE__ */ t(
|
|
1069
|
-
|
|
1036
|
+
q,
|
|
1070
1037
|
{
|
|
1071
1038
|
intent: "secondary",
|
|
1072
1039
|
size: "sm",
|
|
@@ -1077,102 +1044,102 @@ function he({ onRetry: e }) {
|
|
|
1077
1044
|
) }) : null
|
|
1078
1045
|
] });
|
|
1079
1046
|
}
|
|
1080
|
-
function
|
|
1047
|
+
function xt(e) {
|
|
1081
1048
|
const {
|
|
1082
1049
|
results: n,
|
|
1083
|
-
apiKey:
|
|
1050
|
+
apiKey: s,
|
|
1084
1051
|
zoom: o,
|
|
1085
1052
|
searchCentre: i,
|
|
1086
|
-
onLoadMore:
|
|
1053
|
+
onLoadMore: a,
|
|
1087
1054
|
loadingMore: d,
|
|
1088
|
-
loadingSkeletons:
|
|
1089
|
-
emptyResultsSlot:
|
|
1090
|
-
errorSlot:
|
|
1091
|
-
error:
|
|
1092
|
-
onRetry:
|
|
1093
|
-
highlightedId:
|
|
1055
|
+
loadingSkeletons: u,
|
|
1056
|
+
emptyResultsSlot: c,
|
|
1057
|
+
errorSlot: g,
|
|
1058
|
+
error: l,
|
|
1059
|
+
onRetry: f,
|
|
1060
|
+
highlightedId: m,
|
|
1094
1061
|
onCardHover: h,
|
|
1095
|
-
onPinClick:
|
|
1096
|
-
consentGranted:
|
|
1097
|
-
onConsentRequest:
|
|
1098
|
-
onBoundsChange:
|
|
1099
|
-
listContainerRef:
|
|
1100
|
-
} = e, { t:
|
|
1062
|
+
onPinClick: x,
|
|
1063
|
+
consentGranted: r,
|
|
1064
|
+
onConsentRequest: y,
|
|
1065
|
+
onBoundsChange: N,
|
|
1066
|
+
listContainerRef: S
|
|
1067
|
+
} = e, { t: b } = w(), [M, z] = me(!1), I = l ? g ?? /* @__PURE__ */ t(he, { onRetry: f }) : n.length === 0 && !u ? c ?? /* @__PURE__ */ t(fe, {}) : /* @__PURE__ */ t(
|
|
1101
1068
|
pe,
|
|
1102
1069
|
{
|
|
1103
1070
|
results: n,
|
|
1104
|
-
highlightedId:
|
|
1071
|
+
highlightedId: m,
|
|
1105
1072
|
onCardHover: h,
|
|
1106
1073
|
onCardSelect: e.onCardSelect,
|
|
1107
1074
|
onCardOpenClick: e.onCardOpenClick,
|
|
1108
1075
|
openLabel: e.openLabel,
|
|
1109
1076
|
formatNextSlot: e.formatNextSlot,
|
|
1110
|
-
onLoadMore:
|
|
1077
|
+
onLoadMore: a,
|
|
1111
1078
|
loadingMore: d,
|
|
1112
|
-
loadingSkeletons:
|
|
1079
|
+
loadingSkeletons: u,
|
|
1113
1080
|
density: "compact",
|
|
1114
|
-
containerRef:
|
|
1081
|
+
containerRef: S
|
|
1115
1082
|
}
|
|
1116
1083
|
);
|
|
1117
|
-
return /* @__PURE__ */
|
|
1118
|
-
/* @__PURE__ */ t(
|
|
1119
|
-
/* @__PURE__ */
|
|
1120
|
-
/* @__PURE__ */ t("div", { className: "ds:min-w-0 ds:lg:max-h-[40rem] ds:lg:overflow-hidden", children:
|
|
1084
|
+
return /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1085
|
+
/* @__PURE__ */ t(Ie, { variantBodyProps: e }),
|
|
1086
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:lg:grid ds:lg:grid-cols-[55%_45%] ds:lg:gap-[var(--spacing-lg)] ds:lg:items-start", children: [
|
|
1087
|
+
/* @__PURE__ */ t("div", { className: "ds:min-w-0 ds:lg:max-h-[40rem] ds:lg:overflow-hidden", children: I }),
|
|
1121
1088
|
/* @__PURE__ */ t("div", { className: "ds:hidden ds:lg:block ds:sticky ds:top-[var(--spacing-md)] ds:h-[40rem]", children: /* @__PURE__ */ t(
|
|
1122
|
-
|
|
1089
|
+
ue,
|
|
1123
1090
|
{
|
|
1124
1091
|
results: n,
|
|
1125
1092
|
searchCentre: i,
|
|
1126
1093
|
zoom: o,
|
|
1127
|
-
apiKey:
|
|
1128
|
-
highlightedId:
|
|
1129
|
-
onPinClick: (
|
|
1130
|
-
W(n,
|
|
1094
|
+
apiKey: s,
|
|
1095
|
+
highlightedId: m,
|
|
1096
|
+
onPinClick: (P) => {
|
|
1097
|
+
W(n, P, "pin", e.onResultSelect), x(P);
|
|
1131
1098
|
},
|
|
1132
1099
|
onPinHover: h,
|
|
1133
1100
|
onPinFirstInteract: e.onPinFirstInteract,
|
|
1134
|
-
onBoundsChange:
|
|
1135
|
-
consentGranted:
|
|
1136
|
-
onConsentRequest:
|
|
1101
|
+
onBoundsChange: N,
|
|
1102
|
+
consentGranted: r,
|
|
1103
|
+
onConsentRequest: y,
|
|
1137
1104
|
mapHandleRef: e.mapHandleRef
|
|
1138
1105
|
}
|
|
1139
1106
|
) })
|
|
1140
1107
|
] }),
|
|
1141
1108
|
/* @__PURE__ */ t("div", { className: "ds:flex ds:lg:hidden ds:sticky ds:bottom-[var(--spacing-md)] ds:justify-center", children: /* @__PURE__ */ t(
|
|
1142
|
-
|
|
1109
|
+
q,
|
|
1143
1110
|
{
|
|
1144
1111
|
intent: "primary",
|
|
1145
1112
|
size: "md",
|
|
1146
|
-
startIcon: /* @__PURE__ */ t(
|
|
1147
|
-
onClick: () =>
|
|
1148
|
-
children:
|
|
1113
|
+
startIcon: /* @__PURE__ */ t(at, { "aria-hidden": "true" }),
|
|
1114
|
+
onClick: () => z(!0),
|
|
1115
|
+
children: b("practiceResults.viewMap")
|
|
1149
1116
|
}
|
|
1150
1117
|
) }),
|
|
1151
|
-
/* @__PURE__ */ t(
|
|
1152
|
-
/* @__PURE__ */ t(
|
|
1153
|
-
/* @__PURE__ */
|
|
1154
|
-
/* @__PURE__ */ t(
|
|
1155
|
-
/* @__PURE__ */
|
|
1118
|
+
/* @__PURE__ */ t(_.Root, { open: M, onOpenChange: z, children: /* @__PURE__ */ p(_.Content, { side: "bottom", size: "lg", children: [
|
|
1119
|
+
/* @__PURE__ */ t(_.Header, { children: /* @__PURE__ */ t(_.Title, { children: b("practiceResults.map.label") }) }),
|
|
1120
|
+
/* @__PURE__ */ p(_.Body, { children: [
|
|
1121
|
+
/* @__PURE__ */ t(_.Description, { className: "ds:sr-only", children: b("practiceResults.sheet.description") }),
|
|
1122
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1156
1123
|
/* @__PURE__ */ t("div", { className: "ds:h-[20rem]", children: /* @__PURE__ */ t(
|
|
1157
|
-
|
|
1124
|
+
ue,
|
|
1158
1125
|
{
|
|
1159
1126
|
results: n,
|
|
1160
1127
|
searchCentre: i,
|
|
1161
1128
|
zoom: o,
|
|
1162
|
-
apiKey:
|
|
1163
|
-
highlightedId:
|
|
1164
|
-
onPinClick: (
|
|
1165
|
-
W(n,
|
|
1129
|
+
apiKey: s,
|
|
1130
|
+
highlightedId: m,
|
|
1131
|
+
onPinClick: (P) => {
|
|
1132
|
+
W(n, P, "pin", e.onResultSelect), x(P);
|
|
1166
1133
|
},
|
|
1167
1134
|
onPinHover: h,
|
|
1168
1135
|
onPinFirstInteract: e.onPinFirstInteract,
|
|
1169
|
-
onBoundsChange:
|
|
1170
|
-
consentGranted:
|
|
1171
|
-
onConsentRequest:
|
|
1136
|
+
onBoundsChange: N,
|
|
1137
|
+
consentGranted: r,
|
|
1138
|
+
onConsentRequest: y,
|
|
1172
1139
|
mapHandleRef: e.mapHandleRef
|
|
1173
1140
|
}
|
|
1174
1141
|
) }),
|
|
1175
|
-
|
|
1142
|
+
I
|
|
1176
1143
|
] })
|
|
1177
1144
|
] })
|
|
1178
1145
|
] }) })
|
|
@@ -1182,40 +1149,40 @@ const bt = {
|
|
|
1182
1149
|
peek: "sm",
|
|
1183
1150
|
half: "md",
|
|
1184
1151
|
full: "lg"
|
|
1185
|
-
},
|
|
1152
|
+
}, V = [
|
|
1186
1153
|
"peek",
|
|
1187
1154
|
"half",
|
|
1188
1155
|
"full"
|
|
1189
1156
|
];
|
|
1190
|
-
function
|
|
1191
|
-
const { t:
|
|
1157
|
+
function yt({ value: e, onChange: n }) {
|
|
1158
|
+
const { t: s, i18n: o } = w(), i = o.dir() === "rtl", a = A(
|
|
1192
1159
|
/* @__PURE__ */ new Map()
|
|
1193
|
-
), d = K((
|
|
1194
|
-
var
|
|
1195
|
-
(
|
|
1196
|
-
}, []),
|
|
1197
|
-
(
|
|
1198
|
-
const
|
|
1199
|
-
let
|
|
1200
|
-
switch (
|
|
1201
|
-
case
|
|
1160
|
+
), d = K((c) => {
|
|
1161
|
+
var g;
|
|
1162
|
+
(g = a.current.get(c)) == null || g.focus();
|
|
1163
|
+
}, []), u = K(
|
|
1164
|
+
(c, g) => {
|
|
1165
|
+
const l = V.indexOf(g), f = V.length, m = i ? "ArrowLeft" : "ArrowRight", h = i ? "ArrowRight" : "ArrowLeft";
|
|
1166
|
+
let x = null;
|
|
1167
|
+
switch (c.key) {
|
|
1168
|
+
case m:
|
|
1202
1169
|
case "ArrowDown":
|
|
1203
|
-
|
|
1170
|
+
x = V[(l + 1) % f];
|
|
1204
1171
|
break;
|
|
1205
1172
|
case h:
|
|
1206
1173
|
case "ArrowUp":
|
|
1207
|
-
|
|
1174
|
+
x = V[(l - 1 + f) % f];
|
|
1208
1175
|
break;
|
|
1209
1176
|
case "Home":
|
|
1210
|
-
|
|
1177
|
+
x = V[0];
|
|
1211
1178
|
break;
|
|
1212
1179
|
case "End":
|
|
1213
|
-
|
|
1180
|
+
x = V[f - 1];
|
|
1214
1181
|
break;
|
|
1215
1182
|
default:
|
|
1216
1183
|
return;
|
|
1217
1184
|
}
|
|
1218
|
-
|
|
1185
|
+
c.preventDefault(), x && x !== g && n(x), x && d(x);
|
|
1219
1186
|
},
|
|
1220
1187
|
[d, i, n]
|
|
1221
1188
|
);
|
|
@@ -1223,105 +1190,104 @@ function xt({ value: e, onChange: n }) {
|
|
|
1223
1190
|
"div",
|
|
1224
1191
|
{
|
|
1225
1192
|
role: "radiogroup",
|
|
1226
|
-
"aria-label":
|
|
1193
|
+
"aria-label": s("practiceResults.sheet.snap.label"),
|
|
1227
1194
|
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]",
|
|
1228
|
-
children:
|
|
1229
|
-
const
|
|
1195
|
+
children: V.map((c) => {
|
|
1196
|
+
const g = e === c;
|
|
1230
1197
|
return /* @__PURE__ */ t(
|
|
1231
1198
|
"button",
|
|
1232
1199
|
{
|
|
1233
|
-
ref: (
|
|
1234
|
-
|
|
1200
|
+
ref: (l) => {
|
|
1201
|
+
l ? a.current.set(c, l) : a.current.delete(c);
|
|
1235
1202
|
},
|
|
1236
1203
|
type: "button",
|
|
1237
1204
|
role: "radio",
|
|
1238
|
-
"aria-checked":
|
|
1239
|
-
"aria-label":
|
|
1240
|
-
tabIndex:
|
|
1241
|
-
onClick: () => n(
|
|
1242
|
-
onKeyDown: (
|
|
1205
|
+
"aria-checked": g,
|
|
1206
|
+
"aria-label": s(`practiceResults.sheet.snap.${c}`),
|
|
1207
|
+
tabIndex: g ? 0 : -1,
|
|
1208
|
+
onClick: () => n(c),
|
|
1209
|
+
onKeyDown: (l) => u(l, c),
|
|
1243
1210
|
className: ee({
|
|
1244
|
-
state:
|
|
1211
|
+
state: g ? "active" : "idle"
|
|
1245
1212
|
}),
|
|
1246
|
-
children:
|
|
1213
|
+
children: s(`practiceResults.sheet.snap.${c}`)
|
|
1247
1214
|
},
|
|
1248
|
-
|
|
1215
|
+
c
|
|
1249
1216
|
);
|
|
1250
1217
|
})
|
|
1251
1218
|
}
|
|
1252
1219
|
);
|
|
1253
1220
|
}
|
|
1254
|
-
function
|
|
1221
|
+
function Rt(e) {
|
|
1255
1222
|
const {
|
|
1256
1223
|
results: n,
|
|
1257
|
-
apiKey:
|
|
1224
|
+
apiKey: s,
|
|
1258
1225
|
zoom: o,
|
|
1259
1226
|
searchCentre: i,
|
|
1260
|
-
onLoadMore:
|
|
1227
|
+
onLoadMore: a,
|
|
1261
1228
|
loadingMore: d,
|
|
1262
|
-
loadingSkeletons:
|
|
1263
|
-
emptyResultsSlot:
|
|
1264
|
-
errorSlot:
|
|
1265
|
-
error:
|
|
1266
|
-
onRetry:
|
|
1267
|
-
highlightedId:
|
|
1229
|
+
loadingSkeletons: u,
|
|
1230
|
+
emptyResultsSlot: c,
|
|
1231
|
+
errorSlot: g,
|
|
1232
|
+
error: l,
|
|
1233
|
+
onRetry: f,
|
|
1234
|
+
highlightedId: m,
|
|
1268
1235
|
onCardHover: h,
|
|
1269
|
-
onPinClick:
|
|
1270
|
-
consentGranted:
|
|
1271
|
-
onConsentRequest:
|
|
1272
|
-
onBoundsChange:
|
|
1273
|
-
listContainerRef:
|
|
1274
|
-
facets:
|
|
1275
|
-
value:
|
|
1276
|
-
onChange:
|
|
1277
|
-
} = e, { t:
|
|
1236
|
+
onPinClick: x,
|
|
1237
|
+
consentGranted: r,
|
|
1238
|
+
onConsentRequest: y,
|
|
1239
|
+
onBoundsChange: N,
|
|
1240
|
+
listContainerRef: S,
|
|
1241
|
+
facets: b,
|
|
1242
|
+
value: M,
|
|
1243
|
+
onChange: z
|
|
1244
|
+
} = e, { t: I } = w(), [P, E] = me("half"), O = bt[P], U = We("(min-width: 1024px)"), j = l ? g ?? /* @__PURE__ */ t(he, { onRetry: f }) : n.length === 0 && !u ? c ?? /* @__PURE__ */ t(fe, {}) : /* @__PURE__ */ t(
|
|
1278
1245
|
pe,
|
|
1279
1246
|
{
|
|
1280
1247
|
results: n,
|
|
1281
|
-
highlightedId:
|
|
1248
|
+
highlightedId: m,
|
|
1282
1249
|
onCardHover: h,
|
|
1283
1250
|
onCardSelect: e.onCardSelect,
|
|
1284
1251
|
onCardOpenClick: e.onCardOpenClick,
|
|
1285
1252
|
openLabel: e.openLabel,
|
|
1286
1253
|
formatNextSlot: e.formatNextSlot,
|
|
1287
|
-
onLoadMore:
|
|
1254
|
+
onLoadMore: a,
|
|
1288
1255
|
loadingMore: d,
|
|
1289
|
-
loadingSkeletons:
|
|
1256
|
+
loadingSkeletons: u,
|
|
1290
1257
|
density: "compact",
|
|
1291
|
-
apiKey:
|
|
1292
|
-
|
|
1293
|
-
containerRef: P
|
|
1258
|
+
apiKey: s,
|
|
1259
|
+
containerRef: S
|
|
1294
1260
|
}
|
|
1295
|
-
),
|
|
1296
|
-
|
|
1261
|
+
), C = /* @__PURE__ */ t(
|
|
1262
|
+
ue,
|
|
1297
1263
|
{
|
|
1298
1264
|
results: n,
|
|
1299
1265
|
searchCentre: i,
|
|
1300
1266
|
zoom: o,
|
|
1301
|
-
apiKey:
|
|
1302
|
-
highlightedId:
|
|
1303
|
-
onPinClick: (
|
|
1304
|
-
W(n,
|
|
1267
|
+
apiKey: s,
|
|
1268
|
+
highlightedId: m,
|
|
1269
|
+
onPinClick: (R) => {
|
|
1270
|
+
W(n, R, "pin", e.onResultSelect), x(R);
|
|
1305
1271
|
},
|
|
1306
1272
|
onPinHover: h,
|
|
1307
1273
|
onPinFirstInteract: e.onPinFirstInteract,
|
|
1308
|
-
onBoundsChange:
|
|
1309
|
-
consentGranted:
|
|
1310
|
-
onConsentRequest:
|
|
1274
|
+
onBoundsChange: N,
|
|
1275
|
+
consentGranted: r,
|
|
1276
|
+
onConsentRequest: y,
|
|
1311
1277
|
mapHandleRef: e.mapHandleRef
|
|
1312
1278
|
}
|
|
1313
|
-
), Z =
|
|
1314
|
-
|
|
1279
|
+
), Z = b.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(
|
|
1280
|
+
Ae,
|
|
1315
1281
|
{
|
|
1316
|
-
facets:
|
|
1317
|
-
value:
|
|
1318
|
-
onChange: (
|
|
1282
|
+
facets: b,
|
|
1283
|
+
value: M.facets,
|
|
1284
|
+
onChange: (R) => z({ ...M, facets: R }),
|
|
1319
1285
|
floating: !0
|
|
1320
1286
|
}
|
|
1321
1287
|
) }) : null;
|
|
1322
|
-
return /* @__PURE__ */
|
|
1288
|
+
return /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1323
1289
|
/* @__PURE__ */ t(
|
|
1324
|
-
|
|
1290
|
+
Me,
|
|
1325
1291
|
{
|
|
1326
1292
|
heading: e.heading,
|
|
1327
1293
|
intro: e.intro,
|
|
@@ -1333,9 +1299,9 @@ function yt(e) {
|
|
|
1333
1299
|
// Desktop: 65/35 map left + scrollable card rail right. NO Sheet
|
|
1334
1300
|
// (the Sheet would portal to body and occlude the desktop
|
|
1335
1301
|
// layout regardless of the parent's `lg:hidden` class).
|
|
1336
|
-
/* @__PURE__ */
|
|
1337
|
-
/* @__PURE__ */
|
|
1338
|
-
|
|
1302
|
+
/* @__PURE__ */ p("div", { className: "ds:grid ds:grid-cols-[65%_35%] ds:gap-[var(--spacing-lg)] ds:items-start", children: [
|
|
1303
|
+
/* @__PURE__ */ p("div", { className: "ds:relative ds:h-[40rem]", children: [
|
|
1304
|
+
C,
|
|
1339
1305
|
Z
|
|
1340
1306
|
] }),
|
|
1341
1307
|
/* @__PURE__ */ t("div", { className: "ds:min-w-0 ds:max-h-[40rem] ds:overflow-y-auto", children: j })
|
|
@@ -1345,38 +1311,38 @@ function yt(e) {
|
|
|
1345
1311
|
// 'half' state. No X close button — the sheet is core to the
|
|
1346
1312
|
// layout, not dismissible. Patient cycles peek / half / full
|
|
1347
1313
|
// via the snap radiogroup at the top of the sheet body.
|
|
1348
|
-
/* @__PURE__ */
|
|
1349
|
-
/* @__PURE__ */
|
|
1350
|
-
|
|
1314
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1315
|
+
/* @__PURE__ */ p("div", { className: "ds:relative ds:h-[60vh] ds:min-h-[20rem]", children: [
|
|
1316
|
+
C,
|
|
1351
1317
|
Z
|
|
1352
1318
|
] }),
|
|
1353
|
-
/* @__PURE__ */ t(
|
|
1354
|
-
|
|
1319
|
+
/* @__PURE__ */ t(_.Root, { open: !0, children: /* @__PURE__ */ t(
|
|
1320
|
+
_.Content,
|
|
1355
1321
|
{
|
|
1356
1322
|
side: "bottom",
|
|
1357
|
-
size:
|
|
1358
|
-
onEscapeKeyDown: (
|
|
1359
|
-
onPointerDownOutside: (
|
|
1360
|
-
onInteractOutside: (
|
|
1361
|
-
children: /* @__PURE__ */
|
|
1362
|
-
/* @__PURE__ */ t(
|
|
1363
|
-
/* @__PURE__ */
|
|
1364
|
-
/* @__PURE__ */ t(
|
|
1323
|
+
size: O,
|
|
1324
|
+
onEscapeKeyDown: (R) => R.preventDefault(),
|
|
1325
|
+
onPointerDownOutside: (R) => R.preventDefault(),
|
|
1326
|
+
onInteractOutside: (R) => R.preventDefault(),
|
|
1327
|
+
children: /* @__PURE__ */ p(_.Body, { children: [
|
|
1328
|
+
/* @__PURE__ */ t(_.Description, { className: "ds:sr-only", children: I("practiceResults.sheet.descriptionMapFirst") }),
|
|
1329
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:items-start ds:justify-between ds:gap-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]", children: [
|
|
1330
|
+
/* @__PURE__ */ t(_.Title, { className: "type-title-card ds:m-0 ds:text-[var(--foreground)]", children: I("practiceResults.sheet.title", {
|
|
1365
1331
|
count: e.totalCount ?? n.length
|
|
1366
1332
|
}) }),
|
|
1367
1333
|
/* @__PURE__ */ t(
|
|
1368
|
-
|
|
1334
|
+
yt,
|
|
1369
1335
|
{
|
|
1370
|
-
value:
|
|
1371
|
-
onChange:
|
|
1336
|
+
value: P,
|
|
1337
|
+
onChange: E
|
|
1372
1338
|
}
|
|
1373
1339
|
)
|
|
1374
1340
|
] }),
|
|
1375
1341
|
/* @__PURE__ */ t("div", { className: "ds:pb-[var(--spacing-sm)]", children: /* @__PURE__ */ t(
|
|
1376
|
-
|
|
1342
|
+
de,
|
|
1377
1343
|
{
|
|
1378
|
-
value:
|
|
1379
|
-
onChange: (
|
|
1344
|
+
value: M.sort ?? "relevance",
|
|
1345
|
+
onChange: (R) => z({ ...M, sort: R })
|
|
1380
1346
|
}
|
|
1381
1347
|
) }),
|
|
1382
1348
|
j
|
|
@@ -1387,84 +1353,82 @@ function yt(e) {
|
|
|
1387
1353
|
)
|
|
1388
1354
|
] });
|
|
1389
1355
|
}
|
|
1390
|
-
function
|
|
1356
|
+
function kt(e) {
|
|
1391
1357
|
const {
|
|
1392
1358
|
results: n,
|
|
1393
|
-
apiKey:
|
|
1359
|
+
apiKey: s,
|
|
1394
1360
|
onLoadMore: o,
|
|
1395
1361
|
loadingMore: i,
|
|
1396
|
-
loadingSkeletons:
|
|
1362
|
+
loadingSkeletons: a,
|
|
1397
1363
|
emptyResultsSlot: d,
|
|
1398
|
-
errorSlot:
|
|
1399
|
-
error:
|
|
1400
|
-
onRetry:
|
|
1401
|
-
highlightedId:
|
|
1402
|
-
onCardHover:
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
} = e, g = l ? m ?? /* @__PURE__ */ t(he, { onRetry: b }) : n.length === 0 && !s ? d ?? /* @__PURE__ */ t(fe, {}) : /* @__PURE__ */ t(
|
|
1364
|
+
errorSlot: u,
|
|
1365
|
+
error: c,
|
|
1366
|
+
onRetry: g,
|
|
1367
|
+
highlightedId: l,
|
|
1368
|
+
onCardHover: f,
|
|
1369
|
+
listContainerRef: m
|
|
1370
|
+
} = e, h = c ? u ?? /* @__PURE__ */ t(he, { onRetry: g }) : n.length === 0 && !a ? d ?? /* @__PURE__ */ t(fe, {}) : /* @__PURE__ */ t(
|
|
1406
1371
|
pe,
|
|
1407
1372
|
{
|
|
1408
1373
|
results: n,
|
|
1409
|
-
highlightedId:
|
|
1410
|
-
onCardHover:
|
|
1374
|
+
highlightedId: l,
|
|
1375
|
+
onCardHover: f,
|
|
1411
1376
|
onCardSelect: e.onCardSelect,
|
|
1412
1377
|
onCardOpenClick: e.onCardOpenClick,
|
|
1413
1378
|
openLabel: e.openLabel,
|
|
1414
1379
|
formatNextSlot: e.formatNextSlot,
|
|
1415
1380
|
onLoadMore: o,
|
|
1416
1381
|
loadingMore: i,
|
|
1417
|
-
loadingSkeletons:
|
|
1382
|
+
loadingSkeletons: a,
|
|
1418
1383
|
density: "rich",
|
|
1419
|
-
apiKey:
|
|
1420
|
-
|
|
1421
|
-
containerRef: h
|
|
1384
|
+
apiKey: s,
|
|
1385
|
+
containerRef: m
|
|
1422
1386
|
}
|
|
1423
1387
|
);
|
|
1424
|
-
return /* @__PURE__ */
|
|
1425
|
-
/* @__PURE__ */ t(
|
|
1426
|
-
|
|
1388
|
+
return /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1389
|
+
/* @__PURE__ */ t(Ie, { variantBodyProps: e }),
|
|
1390
|
+
h
|
|
1427
1391
|
] });
|
|
1428
1392
|
}
|
|
1429
|
-
const
|
|
1393
|
+
const wt = Ue(function({
|
|
1430
1394
|
variant: n = "split-list-map",
|
|
1431
|
-
results:
|
|
1395
|
+
results: s,
|
|
1432
1396
|
totalCount: o,
|
|
1433
1397
|
searchCentre: i,
|
|
1434
|
-
facets:
|
|
1398
|
+
facets: a,
|
|
1435
1399
|
googleMapsApiKey: d,
|
|
1436
|
-
defaultZoom:
|
|
1437
|
-
onBoundsChange:
|
|
1438
|
-
consentGranted:
|
|
1439
|
-
onConsentRequest:
|
|
1440
|
-
onLoadMore:
|
|
1441
|
-
loadingMore:
|
|
1400
|
+
defaultZoom: u = rt,
|
|
1401
|
+
onBoundsChange: c,
|
|
1402
|
+
consentGranted: g,
|
|
1403
|
+
onConsentRequest: l,
|
|
1404
|
+
onLoadMore: f,
|
|
1405
|
+
loadingMore: m,
|
|
1442
1406
|
value: h,
|
|
1443
|
-
onChange:
|
|
1444
|
-
onResultSelect:
|
|
1445
|
-
loading:
|
|
1446
|
-
emptyResultsSlot:
|
|
1447
|
-
errorSlot:
|
|
1448
|
-
error:
|
|
1449
|
-
onRetry:
|
|
1450
|
-
heading:
|
|
1451
|
-
intro:
|
|
1452
|
-
cardOpenButtonLabel:
|
|
1453
|
-
"aria-label":
|
|
1454
|
-
id:
|
|
1407
|
+
onChange: x,
|
|
1408
|
+
onResultSelect: r,
|
|
1409
|
+
loading: y,
|
|
1410
|
+
emptyResultsSlot: N,
|
|
1411
|
+
errorSlot: S,
|
|
1412
|
+
error: b,
|
|
1413
|
+
onRetry: M,
|
|
1414
|
+
heading: z,
|
|
1415
|
+
intro: I,
|
|
1416
|
+
cardOpenButtonLabel: P,
|
|
1417
|
+
"aria-label": E,
|
|
1418
|
+
id: O,
|
|
1455
1419
|
className: U,
|
|
1456
1420
|
...j
|
|
1457
|
-
},
|
|
1458
|
-
const { t: Z, i18n:
|
|
1421
|
+
}, C) {
|
|
1422
|
+
const { t: Z, i18n: R } = w(), [Te, Q] = me(null), X = A(/* @__PURE__ */ new Set()), ae = A(/* @__PURE__ */ new Set()), $e = A(null), se = A(null), ie = H(
|
|
1459
1423
|
() => ({
|
|
1460
1424
|
getVariant: () => n,
|
|
1461
1425
|
scrollToResult: (v) => {
|
|
1462
|
-
const
|
|
1463
|
-
if (!
|
|
1464
|
-
const
|
|
1426
|
+
const T = se.current;
|
|
1427
|
+
if (!T) return;
|
|
1428
|
+
const k = T.querySelector(
|
|
1465
1429
|
`[data-component="practice-result-card"][data-result-id="${CSS.escape(v)}"]`
|
|
1466
1430
|
);
|
|
1467
|
-
|
|
1431
|
+
k && (k.scrollIntoView({ behavior: "smooth", block: "nearest" }), Q(v));
|
|
1468
1432
|
},
|
|
1469
1433
|
focusPin: (v) => {
|
|
1470
1434
|
Q(v);
|
|
@@ -1472,12 +1436,12 @@ const kt = Ue(function({
|
|
|
1472
1436
|
}),
|
|
1473
1437
|
[n]
|
|
1474
1438
|
);
|
|
1475
|
-
|
|
1476
|
-
const Fe =
|
|
1439
|
+
qe(C, () => ie, [ie]), Xe(it, ie, O);
|
|
1440
|
+
const Fe = P ?? Z("practiceResults.card.open"), De = K(
|
|
1477
1441
|
(v) => {
|
|
1478
1442
|
if (v.nextAvailableSlot)
|
|
1479
1443
|
try {
|
|
1480
|
-
return new Intl.DateTimeFormat(
|
|
1444
|
+
return new Intl.DateTimeFormat(R.language, {
|
|
1481
1445
|
weekday: "short",
|
|
1482
1446
|
hour: "numeric",
|
|
1483
1447
|
minute: "numeric"
|
|
@@ -1486,133 +1450,133 @@ const kt = Ue(function({
|
|
|
1486
1450
|
return v.nextAvailableSlot.dateTime;
|
|
1487
1451
|
}
|
|
1488
1452
|
},
|
|
1489
|
-
[
|
|
1490
|
-
), ge =
|
|
1453
|
+
[R.language]
|
|
1454
|
+
), ge = A(null);
|
|
1491
1455
|
J(() => {
|
|
1492
1456
|
ge.current !== n && (ge.current = n, $("serp_variant_exposed", {
|
|
1493
1457
|
variant: n,
|
|
1494
|
-
totalCount: o ??
|
|
1495
|
-
}), X.current = /* @__PURE__ */ new Set(),
|
|
1458
|
+
totalCount: o ?? s.length
|
|
1459
|
+
}), X.current = /* @__PURE__ */ new Set(), ae.current = /* @__PURE__ */ new Set());
|
|
1496
1460
|
}, [n]);
|
|
1497
|
-
const
|
|
1498
|
-
const v =
|
|
1499
|
-
return
|
|
1500
|
-
}, [
|
|
1461
|
+
const re = A(!1), le = H(() => a ?? [], [a]), oe = h.sort ?? (i ? "distance" : "relevance"), L = H(() => {
|
|
1462
|
+
const v = ct(s, h.facets, le);
|
|
1463
|
+
return dt(v, oe, i);
|
|
1464
|
+
}, [s, h.facets, le, oe, i]);
|
|
1501
1465
|
J(() => {
|
|
1502
1466
|
const v = L.length === 0;
|
|
1503
|
-
v && !
|
|
1467
|
+
v && !re.current ? ($("serp_empty_results", {
|
|
1504
1468
|
appliedFacets: h.facets ?? {}
|
|
1505
|
-
}),
|
|
1469
|
+
}), re.current = !0) : v || (re.current = !1);
|
|
1506
1470
|
}, [L.length, h.facets]);
|
|
1507
|
-
const
|
|
1471
|
+
const B = A(null), ve = A(null);
|
|
1508
1472
|
J(
|
|
1509
1473
|
() => () => {
|
|
1510
|
-
|
|
1474
|
+
B.current && clearTimeout(B.current);
|
|
1511
1475
|
},
|
|
1512
1476
|
[]
|
|
1513
1477
|
);
|
|
1514
|
-
const
|
|
1515
|
-
Q(v), !X.current.has(v) && (ve.current === v &&
|
|
1516
|
-
X.current.has(v) || (X.current.add(v), $("serp_result_hovered_card", { resultId: v })),
|
|
1478
|
+
const He = K((v) => {
|
|
1479
|
+
Q(v), !X.current.has(v) && (ve.current === v && B.current || (B.current && clearTimeout(B.current), ve.current = v, B.current = setTimeout(() => {
|
|
1480
|
+
X.current.has(v) || (X.current.add(v), $("serp_result_hovered_card", { resultId: v })), B.current = null;
|
|
1517
1481
|
}, 500)));
|
|
1518
|
-
}, []),
|
|
1482
|
+
}, []), Oe = K((v) => {
|
|
1519
1483
|
Q(v);
|
|
1520
|
-
const
|
|
1521
|
-
if (!
|
|
1522
|
-
const
|
|
1484
|
+
const T = se.current;
|
|
1485
|
+
if (!T) return;
|
|
1486
|
+
const k = T.querySelector(
|
|
1523
1487
|
`[data-component="practice-result-card"][data-result-id="${CSS.escape(v)}"]`
|
|
1524
1488
|
);
|
|
1525
|
-
|
|
1489
|
+
k == null || k.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
1526
1490
|
}, []), Le = K((v) => {
|
|
1527
|
-
|
|
1528
|
-
}, []),
|
|
1491
|
+
ae.current.has(v) || (ae.current.add(v), $("serp_result_hovered_pin", { resultId: v }));
|
|
1492
|
+
}, []), xe = A(null), Ke = K(
|
|
1529
1493
|
(v) => {
|
|
1530
1494
|
Q(v);
|
|
1531
|
-
const
|
|
1532
|
-
if (
|
|
1533
|
-
if (
|
|
1534
|
-
const
|
|
1535
|
-
|
|
1536
|
-
lat:
|
|
1537
|
-
lng:
|
|
1538
|
-
}),
|
|
1495
|
+
const T = L.find((k) => k.id === v);
|
|
1496
|
+
if (T) {
|
|
1497
|
+
if (T.location) {
|
|
1498
|
+
const k = xe.current;
|
|
1499
|
+
k == null || k.panTo({
|
|
1500
|
+
lat: T.location.lat,
|
|
1501
|
+
lng: T.location.lng
|
|
1502
|
+
}), k == null || k.setZoom(16);
|
|
1539
1503
|
}
|
|
1540
|
-
W(L, v, "card",
|
|
1504
|
+
W(L, v, "card", r);
|
|
1541
1505
|
}
|
|
1542
1506
|
},
|
|
1543
|
-
[L,
|
|
1507
|
+
[L, r]
|
|
1544
1508
|
), je = K(
|
|
1545
1509
|
(v) => {
|
|
1546
1510
|
W(
|
|
1547
1511
|
L,
|
|
1548
1512
|
v,
|
|
1549
1513
|
"open-button",
|
|
1550
|
-
|
|
1514
|
+
r
|
|
1551
1515
|
);
|
|
1552
1516
|
},
|
|
1553
|
-
[L,
|
|
1554
|
-
),
|
|
1517
|
+
[L, r]
|
|
1518
|
+
), Be = !!y && s.length === 0, ce = {
|
|
1555
1519
|
results: L,
|
|
1556
1520
|
totalCount: o,
|
|
1557
1521
|
searchCentre: i,
|
|
1558
|
-
facets:
|
|
1559
|
-
value: { ...h, sort:
|
|
1560
|
-
onChange:
|
|
1561
|
-
onResultSelect:
|
|
1562
|
-
onLoadMore:
|
|
1563
|
-
loadingMore:
|
|
1522
|
+
facets: le,
|
|
1523
|
+
value: { ...h, sort: oe },
|
|
1524
|
+
onChange: x,
|
|
1525
|
+
onResultSelect: r,
|
|
1526
|
+
onLoadMore: f,
|
|
1527
|
+
loadingMore: m,
|
|
1564
1528
|
apiKey: d,
|
|
1565
|
-
zoom:
|
|
1566
|
-
consentGranted:
|
|
1567
|
-
onConsentRequest:
|
|
1568
|
-
onBoundsChange:
|
|
1569
|
-
loadingSkeletons:
|
|
1570
|
-
emptyResultsSlot:
|
|
1571
|
-
errorSlot:
|
|
1572
|
-
error:
|
|
1573
|
-
onRetry:
|
|
1574
|
-
heading:
|
|
1575
|
-
intro:
|
|
1576
|
-
highlightedId:
|
|
1577
|
-
onCardHover:
|
|
1578
|
-
onPinClick:
|
|
1529
|
+
zoom: u,
|
|
1530
|
+
consentGranted: g,
|
|
1531
|
+
onConsentRequest: l,
|
|
1532
|
+
onBoundsChange: c,
|
|
1533
|
+
loadingSkeletons: Be,
|
|
1534
|
+
emptyResultsSlot: N,
|
|
1535
|
+
errorSlot: S,
|
|
1536
|
+
error: b,
|
|
1537
|
+
onRetry: M,
|
|
1538
|
+
heading: z,
|
|
1539
|
+
intro: I,
|
|
1540
|
+
highlightedId: Te,
|
|
1541
|
+
onCardHover: He,
|
|
1542
|
+
onPinClick: Oe,
|
|
1579
1543
|
onPinFirstInteract: Le,
|
|
1580
1544
|
onCardSelect: Ke,
|
|
1581
1545
|
onCardOpenClick: je,
|
|
1582
1546
|
openLabel: Fe,
|
|
1583
1547
|
formatNextSlot: De,
|
|
1584
1548
|
listContainerRef: $e,
|
|
1585
|
-
mapHandleRef:
|
|
1586
|
-
},
|
|
1549
|
+
mapHandleRef: xe
|
|
1550
|
+
}, Ve = (() => {
|
|
1587
1551
|
switch (n) {
|
|
1588
1552
|
case "map-first":
|
|
1589
|
-
return /* @__PURE__ */ t(
|
|
1553
|
+
return /* @__PURE__ */ t(Rt, { ...ce });
|
|
1590
1554
|
case "rich-cards":
|
|
1591
|
-
return /* @__PURE__ */ t(
|
|
1555
|
+
return /* @__PURE__ */ t(kt, { ...ce });
|
|
1592
1556
|
case "split-list-map":
|
|
1593
1557
|
default:
|
|
1594
|
-
return /* @__PURE__ */ t(
|
|
1558
|
+
return /* @__PURE__ */ t(xt, { ...ce });
|
|
1595
1559
|
}
|
|
1596
|
-
})(),
|
|
1560
|
+
})(), Ee = E ?? Z("practiceResults.regionLabel");
|
|
1597
1561
|
return /* @__PURE__ */ t(
|
|
1598
1562
|
"div",
|
|
1599
1563
|
{
|
|
1600
|
-
ref:
|
|
1564
|
+
ref: se,
|
|
1601
1565
|
role: "region",
|
|
1602
|
-
"aria-label":
|
|
1603
|
-
id:
|
|
1566
|
+
"aria-label": Ee,
|
|
1567
|
+
id: O,
|
|
1604
1568
|
"data-component": "practice-results",
|
|
1605
|
-
"data-component-id":
|
|
1569
|
+
"data-component-id": O,
|
|
1606
1570
|
"data-variant": n,
|
|
1607
|
-
className:
|
|
1571
|
+
className: ut({ variant: n, className: U }),
|
|
1608
1572
|
...j,
|
|
1609
|
-
children:
|
|
1573
|
+
children: Ve
|
|
1610
1574
|
}
|
|
1611
1575
|
);
|
|
1612
1576
|
});
|
|
1613
|
-
|
|
1577
|
+
wt.displayName = "PracticeResults";
|
|
1614
1578
|
export {
|
|
1615
|
-
|
|
1616
|
-
|
|
1579
|
+
wt as P,
|
|
1580
|
+
it as p
|
|
1617
1581
|
};
|
|
1618
|
-
//# sourceMappingURL=practice-results-
|
|
1582
|
+
//# sourceMappingURL=practice-results-RPL64j8E.js.map
|