@alfadocs/ui-kit-debug 1.90.1 → 1.90.2
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/address-autocomplete-DR4Xn23Z.js +519 -0
- package/dist/_chunks/address-autocomplete-DR4Xn23Z.js.map +1 -0
- package/dist/_chunks/{address-fields-CfnXK8RT.js → address-fields-qxQkGwPf.js} +5 -5
- package/dist/_chunks/{address-fields-CfnXK8RT.js.map → address-fields-qxQkGwPf.js.map} +1 -1
- package/dist/_chunks/{ai-permission-notice-CoW22jx1.js → ai-permission-notice-VNh3W57L.js} +2 -2
- package/dist/_chunks/{ai-permission-notice-CoW22jx1.js.map → ai-permission-notice-VNh3W57L.js.map} +1 -1
- package/dist/_chunks/{anamnesis-summary-rows-fbEQwcuW.js → anamnesis-summary-rows-EKPfVCmh.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-fbEQwcuW.js.map → anamnesis-summary-rows-EKPfVCmh.js.map} +1 -1
- package/dist/_chunks/autocomplete-BXMcNoa3.js +562 -0
- package/dist/_chunks/autocomplete-BXMcNoa3.js.map +1 -0
- package/dist/_chunks/{balance-badge-cell-C4FYwmrZ.js → balance-badge-cell-D9VhFp0L.js} +3 -3
- package/dist/_chunks/{balance-badge-cell-C4FYwmrZ.js.map → balance-badge-cell-D9VhFp0L.js.map} +1 -1
- package/dist/_chunks/{booking-C0FoW8Yx.js → booking-CcE_oviI.js} +1896 -1859
- package/dist/_chunks/booking-CcE_oviI.js.map +1 -0
- package/dist/_chunks/{calendar-appointment-editor-dialog-C1v2MNE4.js → calendar-appointment-editor-dialog-CiAGAX2t.js} +7 -7
- package/dist/_chunks/{calendar-appointment-editor-dialog-C1v2MNE4.js.map → calendar-appointment-editor-dialog-CiAGAX2t.js.map} +1 -1
- package/dist/_chunks/{checkbox-BjDv-r3o.js → checkbox-a7Sh-dXb.js} +32 -31
- package/dist/_chunks/checkbox-a7Sh-dXb.js.map +1 -0
- package/dist/_chunks/{checkbox-group-Cw2H5qaq.js → checkbox-group-eGdv9fZc.js} +2 -2
- package/dist/_chunks/{checkbox-group-Cw2H5qaq.js.map → checkbox-group-eGdv9fZc.js.map} +1 -1
- package/dist/_chunks/{city-input-CJVGswxp.js → city-input-CA59CjnV.js} +2 -2
- package/dist/_chunks/{city-input-CJVGswxp.js.map → city-input-CA59CjnV.js.map} +1 -1
- package/dist/_chunks/{combobox-CDPm_n0p.js → combobox-D-gpgEDy.js} +314 -294
- package/dist/_chunks/combobox-D-gpgEDy.js.map +1 -0
- package/dist/_chunks/{country-select-DQ8q7ypA.js → country-select-BfmX9y5i.js} +2 -2
- package/dist/_chunks/{country-select-DQ8q7ypA.js.map → country-select-BfmX9y5i.js.map} +1 -1
- package/dist/_chunks/{data-table-B_IcS0Ke.js → data-table-CqQgoNsU.js} +2 -2
- package/dist/_chunks/{data-table-B_IcS0Ke.js.map → data-table-CqQgoNsU.js.map} +1 -1
- package/dist/_chunks/{face-scheme-BgJGFDTa.js → face-scheme-BKSE98bo.js} +2 -2
- package/dist/_chunks/{face-scheme-BgJGFDTa.js.map → face-scheme-BKSE98bo.js.map} +1 -1
- package/dist/_chunks/{file-manager-C9YOT-Dn.js → file-manager-BnI1ZWZu.js} +2 -2
- package/dist/_chunks/{file-manager-C9YOT-Dn.js.map → file-manager-BnI1ZWZu.js.map} +1 -1
- package/dist/_chunks/{header-settings-BVhjndtV.js → header-settings-BeA2fnol.js} +24 -23
- package/dist/_chunks/header-settings-BeA2fnol.js.map +1 -0
- package/dist/_chunks/{heatmap-HTz3Jvzy.js → heatmap-fCxwNz2o.js} +2 -2
- package/dist/_chunks/{heatmap-HTz3Jvzy.js.map → heatmap-fCxwNz2o.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-C0ynDik7.js → link-cell-renderer-CnCgudvq.js} +3 -3
- package/dist/_chunks/{link-cell-renderer-C0ynDik7.js.map → link-cell-renderer-CnCgudvq.js.map} +1 -1
- package/dist/_chunks/{login-dev-card-DYwbL5sD.js → login-dev-card-BZBR58mu.js} +2 -2
- package/dist/_chunks/{login-dev-card-DYwbL5sD.js.map → login-dev-card-BZBR58mu.js.map} +1 -1
- package/dist/_chunks/{map-view-Bvi06RVh.js → map-view-UrNgxBy3.js} +260 -237
- package/dist/_chunks/map-view-UrNgxBy3.js.map +1 -0
- package/dist/_chunks/{index.modern-BeRXQVdc.js → maps-core-gate-DkNqGkm3.js} +360 -319
- package/dist/_chunks/maps-core-gate-DkNqGkm3.js.map +1 -0
- package/dist/_chunks/{marketplace-app-shell-x_abo_ye.js → marketplace-app-shell-CmZx0Oam.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-x_abo_ye.js.map → marketplace-app-shell-CmZx0Oam.js.map} +1 -1
- package/dist/_chunks/{notes-panel-CZO1qsD-.js → notes-panel-Dywo6R55.js} +2 -2
- package/dist/_chunks/{notes-panel-CZO1qsD-.js.map → notes-panel-Dywo6R55.js.map} +1 -1
- package/dist/_chunks/{patient-details-D0P5eog5.js → patient-details-BUr7Oemx.js} +2 -2
- package/dist/_chunks/{patient-details-D0P5eog5.js.map → patient-details-BUr7Oemx.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-R73dZJY6.js → patient-field-row-bJk8Q_qr.js} +5 -5
- package/dist/_chunks/{patient-field-row-R73dZJY6.js.map → patient-field-row-bJk8Q_qr.js.map} +1 -1
- package/dist/_chunks/patient-search-Ca9j5cWb.js +1306 -0
- package/dist/_chunks/patient-search-Ca9j5cWb.js.map +1 -0
- package/dist/_chunks/{patient-summary-card-6U74-ivO.js → patient-summary-card-CCQZ8X37.js} +2 -2
- package/dist/_chunks/{patient-summary-card-6U74-ivO.js.map → patient-summary-card-CCQZ8X37.js.map} +1 -1
- package/dist/_chunks/{periodontal-diagnosis-B9YmmVmM.js → periodontal-diagnosis-DD3hrg9X.js} +2 -2
- package/dist/_chunks/{periodontal-diagnosis-B9YmmVmM.js.map → periodontal-diagnosis-DD3hrg9X.js.map} +1 -1
- package/dist/_chunks/{permission-matrix-BoQjENGV.js → permission-matrix-BJ6sg3Zp.js} +3 -3
- package/dist/_chunks/{permission-matrix-BoQjENGV.js.map → permission-matrix-BJ6sg3Zp.js.map} +1 -1
- package/dist/_chunks/{practice-results-B61krlwu.js → practice-results-DQuOfqej.js} +2 -2
- package/dist/_chunks/{practice-results-B61krlwu.js.map → practice-results-DQuOfqej.js.map} +1 -1
- package/dist/_chunks/{province-select-CPdTwEob.js → province-select-D64whw0m.js} +2 -2
- package/dist/_chunks/{province-select-CPdTwEob.js.map → province-select-D64whw0m.js.map} +1 -1
- package/dist/_chunks/{registration-form-DmP3YUfp.js → registration-form-CRm6DaB9.js} +2 -2
- package/dist/_chunks/{registration-form-DmP3YUfp.js.map → registration-form-CRm6DaB9.js.map} +1 -1
- package/dist/_chunks/{reviews-panel-UzQQLb-z.js → reviews-panel-B7InBORU.js} +42 -41
- package/dist/_chunks/reviews-panel-B7InBORU.js.map +1 -0
- package/dist/_chunks/{rich-text-editor-BZTyxQBd.js → rich-text-editor-BfEu57dk.js} +3 -3
- package/dist/_chunks/{rich-text-editor-BZTyxQBd.js.map → rich-text-editor-BfEu57dk.js.map} +1 -1
- package/dist/_chunks/{slot-grid-Bb13H9Rl.js → slot-grid-DrwynKeN.js} +91 -89
- package/dist/_chunks/{slot-grid-Bb13H9Rl.js.map → slot-grid-DrwynKeN.js.map} +1 -1
- package/dist/_chunks/{task-editor-BOETWbjU.js → task-editor-CI1SKUNc.js} +2 -2
- package/dist/_chunks/{task-editor-BOETWbjU.js.map → task-editor-CI1SKUNc.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-CWN-nJCZ.js → use-appointment-details-read-BytPq3Ux.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-CWN-nJCZ.js.map → use-appointment-details-read-BytPq3Ux.js.map} +1 -1
- package/dist/_chunks/{voice-control-panel-BziKE-KK.js → voice-control-panel-BP0otrID.js} +2 -2
- package/dist/_chunks/{voice-control-panel-BziKE-KK.js.map → voice-control-panel-BP0otrID.js.map} +1 -1
- package/dist/_chunks/{workflow-webhook-action-DulCpCRz.js → workflow-webhook-action-B_nBJ_ht.js} +2 -2
- package/dist/_chunks/{workflow-webhook-action-DulCpCRz.js.map → workflow-webhook-action-B_nBJ_ht.js.map} +1 -1
- package/dist/agent-catalog.json +2 -2
- package/dist/agent-i18n/en.json +1 -1
- package/dist/components/_shared/maps-core-gate.d.ts +18 -0
- package/dist/components/_shared/maps-core-gate.d.ts.map +1 -0
- package/dist/components/address-autocomplete/address-autocomplete.d.ts.map +1 -1
- package/dist/components/address-autocomplete/index.js +1 -1
- package/dist/components/address-fields/index.js +1 -1
- package/dist/components/ai-permission-notice/index.js +1 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/autocomplete/autocomplete.agent.d.ts.map +1 -1
- package/dist/components/autocomplete/autocomplete.d.ts.map +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/booking/booking.d.ts.map +1 -1
- package/dist/components/booking/details-form.d.ts.map +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/city-input/index.js +1 -1
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/index.js +1 -1
- package/dist/components/country-select/index.js +1 -1
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/header-settings/header-settings.d.ts +2 -1
- package/dist/components/header-settings/header-settings.d.ts.map +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/heatmap/index.js +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.d.ts.map +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-search/patient-search.d.ts.map +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/periodontal-diagnosis/index.js +1 -1
- package/dist/components/permission-matrix/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/province-select/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/reviews-panel/reviews-panel.d.ts.map +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/slot-grid/slot-grid.d.ts.map +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/components/voice-control-panel/index.js +1 -1
- package/dist/host-compat.css +1 -10
- package/dist/index.js +37 -37
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/registration-form/index.js +1 -1
- package/dist/patterns/workflow-webhook-action/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/address-autocomplete-bPR2mNBt.js +0 -498
- package/dist/_chunks/address-autocomplete-bPR2mNBt.js.map +0 -1
- package/dist/_chunks/autocomplete-CnB1mHGc.js +0 -539
- package/dist/_chunks/autocomplete-CnB1mHGc.js.map +0 -1
- package/dist/_chunks/booking-C0FoW8Yx.js.map +0 -1
- package/dist/_chunks/checkbox-BjDv-r3o.js.map +0 -1
- package/dist/_chunks/combobox-CDPm_n0p.js.map +0 -1
- package/dist/_chunks/header-settings-BVhjndtV.js.map +0 -1
- package/dist/_chunks/index.modern-BeRXQVdc.js.map +0 -1
- package/dist/_chunks/map-view-Bvi06RVh.js.map +0 -1
- package/dist/_chunks/patient-search-CCOUZABE.js +0 -1196
- package/dist/_chunks/patient-search-CCOUZABE.js.map +0 -1
- package/dist/_chunks/reviews-panel-UzQQLb-z.js.map +0 -1
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as r, jsxs as x } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as ce, useMemo as L, useRef as y, useId as pe, useState as D, useEffect as I, useCallback as R, useImperativeHandle as ue } from "react";
|
|
3
3
|
import { c as G } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import {
|
|
6
|
-
import { B as
|
|
7
|
-
import { S as
|
|
8
|
-
import { V as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
4
|
+
import { useTranslation as C } from "react-i18next";
|
|
5
|
+
import { M as me, A as he, a as ge, b as fe, P as be, c as ve, u as ye, d as B, e as J } from "./maps-core-gate-DkNqGkm3.js";
|
|
6
|
+
import { B as we } from "./button-DohK_Ak_.js";
|
|
7
|
+
import { S as Me } from "./skeleton-tTWJpvAq.js";
|
|
8
|
+
import { V as ze } from "./visually-hidden-BHxEUGyT.js";
|
|
9
|
+
import { E as Ve } from "./error-boundary-tAn_GuCu.js";
|
|
10
|
+
import { u as ke } from "./registry-DvAUVLHh.js";
|
|
11
|
+
import { l as Ie } from "./length-token-DwMnGEYT.js";
|
|
12
|
+
import { M as Le } from "./map-pin-BaY37-Km.js";
|
|
13
|
+
import { E as xe } from "./external-link-CY6zAXXU.js";
|
|
14
|
+
const Ge = {
|
|
14
15
|
id: "map-view",
|
|
15
16
|
// pan → scroll (viewport move); set_zoom → set_value; select_marker → pick
|
|
16
17
|
// (NON-persisting marker focus, no value state slot).
|
|
@@ -152,7 +153,7 @@ const ke = {
|
|
|
152
153
|
description: "Sourced from the id prop."
|
|
153
154
|
}
|
|
154
155
|
}
|
|
155
|
-
},
|
|
156
|
+
}, Se = G(
|
|
156
157
|
["ds:relative ds:overflow-hidden ds:block", "ds:bg-[var(--muted)]"].join(" "),
|
|
157
158
|
{
|
|
158
159
|
variants: {
|
|
@@ -176,7 +177,7 @@ const ke = {
|
|
|
176
177
|
},
|
|
177
178
|
defaultVariants: { size: "md", surface: "bordered" }
|
|
178
179
|
}
|
|
179
|
-
),
|
|
180
|
+
), Te = G("ds:block ds:inline-size-full", {
|
|
180
181
|
variants: {
|
|
181
182
|
size: {
|
|
182
183
|
sm: "ds:[block-size:var(--map-block-size)]",
|
|
@@ -186,7 +187,7 @@ const ke = {
|
|
|
186
187
|
}
|
|
187
188
|
},
|
|
188
189
|
defaultVariants: { size: "md" }
|
|
189
|
-
}),
|
|
190
|
+
}), Ne = G(
|
|
190
191
|
[
|
|
191
192
|
"ds:absolute ds:inset-0",
|
|
192
193
|
"ds:flex ds:flex-col ds:items-center ds:justify-center",
|
|
@@ -195,173 +196,173 @@ const ke = {
|
|
|
195
196
|
"ds:bg-[var(--muted)] ds:text-[var(--foreground)]",
|
|
196
197
|
"ds:text-center"
|
|
197
198
|
].join(" ")
|
|
198
|
-
),
|
|
199
|
+
), Pe = G("type-heading-3 ds:m-0"), F = G(
|
|
199
200
|
"type-body-sm ds:text-[var(--muted-foreground)] ds:[max-inline-size:28rem] ds:m-0"
|
|
200
201
|
);
|
|
201
|
-
function
|
|
202
|
+
function Re({
|
|
202
203
|
onHandleReady: e,
|
|
203
204
|
onMarkerSelect: s
|
|
204
205
|
}) {
|
|
205
|
-
const o =
|
|
206
|
+
const o = J();
|
|
206
207
|
return I(() => {
|
|
207
208
|
if (o)
|
|
208
209
|
return e({
|
|
209
|
-
panTo: (
|
|
210
|
-
setZoom: (
|
|
211
|
-
jumpTo: (
|
|
212
|
-
selectMarker: (
|
|
210
|
+
panTo: (n) => o.panTo(n),
|
|
211
|
+
setZoom: (n) => o.setZoom(n),
|
|
212
|
+
jumpTo: (n, i) => o.moveCamera({ center: n, zoom: i }),
|
|
213
|
+
selectMarker: (n) => s(n),
|
|
213
214
|
// Read straight off the live map: Google clamps `setZoom` to the
|
|
214
215
|
// map type's range and animates `panTo`, so requested and applied
|
|
215
216
|
// are not the same value.
|
|
216
217
|
getCenter: () => {
|
|
217
|
-
var
|
|
218
|
-
return ((
|
|
218
|
+
var n;
|
|
219
|
+
return ((n = o.getCenter()) == null ? void 0 : n.toJSON()) ?? null;
|
|
219
220
|
},
|
|
220
221
|
getZoom: () => o.getZoom() ?? null
|
|
221
222
|
}), () => e(null);
|
|
222
223
|
}, [o, e, s]), null;
|
|
223
224
|
}
|
|
224
|
-
const
|
|
225
|
-
function
|
|
226
|
-
const s = Math.min(Math.max(Math.sin(
|
|
225
|
+
const Ce = 256, Ze = (e) => e * Math.PI / 180;
|
|
226
|
+
function K(e) {
|
|
227
|
+
const s = Math.min(Math.max(Math.sin(Ze(e)), -0.9999), 0.9999);
|
|
227
228
|
return Math.log((1 + s) / (1 - s)) / 2;
|
|
228
229
|
}
|
|
229
|
-
const
|
|
230
|
-
function
|
|
231
|
-
let s = -90, o = 90,
|
|
232
|
-
for (const { lat: l, lng:
|
|
233
|
-
s = Math.max(s, l), o = Math.min(o, l),
|
|
234
|
-
return { north: s, south: o, east:
|
|
230
|
+
const je = (e) => Math.atan(Math.sinh(e)) * 180 / Math.PI;
|
|
231
|
+
function _e(e) {
|
|
232
|
+
let s = -90, o = 90, n = -180, i = 180;
|
|
233
|
+
for (const { lat: l, lng: a } of e)
|
|
234
|
+
s = Math.max(s, l), o = Math.min(o, l), n = Math.max(n, a), i = Math.min(i, a);
|
|
235
|
+
return { north: s, south: o, east: n, west: i };
|
|
235
236
|
}
|
|
236
|
-
function
|
|
237
|
-
const { north: l, south:
|
|
238
|
-
if (l ===
|
|
239
|
-
return { center: { lat: l, lng:
|
|
240
|
-
const
|
|
241
|
-
lat:
|
|
242
|
-
lng: (
|
|
243
|
-
}, b = (w, M) => M > 0 ? Math.log2(Math.max(w, 1) /
|
|
244
|
-
b(s - 2 *
|
|
245
|
-
b(o - 2 *
|
|
246
|
-
|
|
237
|
+
function Ee(e, s, o, n, i) {
|
|
238
|
+
const { north: l, south: a, east: p, west: m } = _e(e);
|
|
239
|
+
if (l === a && p === m)
|
|
240
|
+
return { center: { lat: l, lng: p }, zoom: i };
|
|
241
|
+
const d = K(l), h = K(a), u = {
|
|
242
|
+
lat: je((d + h) / 2),
|
|
243
|
+
lng: (p + m) / 2
|
|
244
|
+
}, b = (w, M) => M > 0 ? Math.log2(Math.max(w, 1) / Ce / M) : i, g = Math.min(
|
|
245
|
+
b(s - 2 * n, (p - m) / 360),
|
|
246
|
+
b(o - 2 * n, (d - h) / (2 * Math.PI)),
|
|
247
|
+
i
|
|
247
248
|
);
|
|
248
|
-
return { center: u, zoom: Math.max(0, Math.floor(
|
|
249
|
+
return { center: u, zoom: Math.max(0, Math.floor(g)) };
|
|
249
250
|
}
|
|
250
|
-
const
|
|
251
|
-
function
|
|
252
|
-
const
|
|
251
|
+
const U = ({ id: e, lat: s, lng: o }) => e != null ? `id:${e}` : `at:${s},${o}`;
|
|
252
|
+
function Oe({ points: e, fitKey: s, maxZoom: o }) {
|
|
253
|
+
const n = J(), i = y(null), l = y(!1), a = y(null);
|
|
253
254
|
return I(() => {
|
|
254
|
-
if (!
|
|
255
|
-
const
|
|
256
|
-
var
|
|
257
|
-
const
|
|
258
|
-
|
|
255
|
+
if (!n) return;
|
|
256
|
+
const p = () => {
|
|
257
|
+
var g;
|
|
258
|
+
const d = a.current, h = (g = n.getCenter()) == null ? void 0 : g.toJSON(), u = n.getZoom();
|
|
259
|
+
d != null && u === d.zoom && h != null && Math.abs(h.lat - d.center.lat) < 1e-6 && Math.abs(h.lng - d.center.lng) < 1e-6 || (l.current = !0);
|
|
259
260
|
}, m = [
|
|
260
|
-
|
|
261
|
+
n.addListener("dragstart", () => {
|
|
261
262
|
l.current = !0;
|
|
262
263
|
}),
|
|
263
|
-
|
|
264
|
-
|
|
264
|
+
n.addListener("center_changed", p),
|
|
265
|
+
n.addListener("zoom_changed", p)
|
|
265
266
|
];
|
|
266
|
-
return () => m.forEach((
|
|
267
|
-
}, [
|
|
267
|
+
return () => m.forEach((d) => d.remove());
|
|
268
|
+
}, [n]), I(() => {
|
|
268
269
|
var M;
|
|
269
|
-
if (!
|
|
270
|
-
const
|
|
271
|
-
if ((
|
|
272
|
-
const m = new Set(e.map(
|
|
273
|
-
|
|
270
|
+
if (!n) return;
|
|
271
|
+
const p = ((M = i.current) == null ? void 0 : M.map) === n ? i.current : null;
|
|
272
|
+
if ((p == null ? void 0 : p.key) === s) return;
|
|
273
|
+
const m = new Set(e.map(U)), d = (f, z) => {
|
|
274
|
+
a.current = { center: f, zoom: z }, n.moveCamera({ center: f, zoom: z }), l.current = !1;
|
|
274
275
|
};
|
|
275
276
|
if (e.length === 0) {
|
|
276
|
-
|
|
277
|
+
i.current = { map: n, key: s, points: m };
|
|
277
278
|
return;
|
|
278
279
|
}
|
|
279
|
-
if (
|
|
280
|
-
|
|
280
|
+
if (p != null && p.points.size > 0 && [...p.points].every((f) => m.has(f)) && l.current) {
|
|
281
|
+
i.current = { map: n, key: s, points: m };
|
|
281
282
|
return;
|
|
282
283
|
}
|
|
283
|
-
const u =
|
|
284
|
+
const u = n.getDiv();
|
|
284
285
|
if (!(u instanceof Element)) return;
|
|
285
286
|
const b = () => {
|
|
286
|
-
|
|
287
|
-
const
|
|
288
|
-
|
|
287
|
+
i.current = { map: n, key: s, points: m };
|
|
288
|
+
const f = Math.min(
|
|
289
|
+
Ie("--spacing-2xl", u, 48),
|
|
289
290
|
u.clientWidth / 4,
|
|
290
291
|
u.clientHeight / 4
|
|
291
|
-
), { center: z, zoom:
|
|
292
|
+
), { center: z, zoom: P } = Ee(
|
|
292
293
|
e,
|
|
293
294
|
u.clientWidth,
|
|
294
295
|
u.clientHeight,
|
|
295
|
-
|
|
296
|
+
f,
|
|
296
297
|
o
|
|
297
298
|
);
|
|
298
|
-
|
|
299
|
-
},
|
|
300
|
-
if (
|
|
299
|
+
d(z, P);
|
|
300
|
+
}, g = () => u.clientWidth > 0 && u.clientHeight > 0;
|
|
301
|
+
if (g() || typeof ResizeObserver > "u") {
|
|
301
302
|
b();
|
|
302
303
|
return;
|
|
303
304
|
}
|
|
304
305
|
const w = new ResizeObserver(() => {
|
|
305
|
-
|
|
306
|
+
g() && (w.disconnect(), b());
|
|
306
307
|
});
|
|
307
308
|
return w.observe(u), () => w.disconnect();
|
|
308
|
-
}, [
|
|
309
|
+
}, [n, s, e, o]), null;
|
|
309
310
|
}
|
|
310
|
-
const
|
|
311
|
+
const X = (e) => {
|
|
311
312
|
var s, o;
|
|
312
313
|
return typeof ((o = (s = globalThis.google) == null ? void 0 : s.maps) == null ? void 0 : o[e]) == "function";
|
|
313
314
|
};
|
|
314
|
-
function
|
|
315
|
-
const { t: e } =
|
|
316
|
-
return /* @__PURE__ */
|
|
315
|
+
function Y() {
|
|
316
|
+
const { t: e } = C("ui");
|
|
317
|
+
return /* @__PURE__ */ x(
|
|
317
318
|
"div",
|
|
318
319
|
{
|
|
319
320
|
role: "status",
|
|
320
321
|
"data-testid": "map-view-loading",
|
|
321
322
|
className: "ds:[inline-size:100%] ds:[block-size:100%]",
|
|
322
323
|
children: [
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ r(Me, { variant: "rectangular", width: "100%", height: "100%" }),
|
|
325
|
+
/* @__PURE__ */ r(ze, { children: e("common.loading") })
|
|
325
326
|
]
|
|
326
327
|
}
|
|
327
328
|
);
|
|
328
329
|
}
|
|
329
|
-
function
|
|
330
|
-
const s =
|
|
331
|
-
return
|
|
330
|
+
function $e({ children: e }) {
|
|
331
|
+
const s = ye();
|
|
332
|
+
return B("maps") || !s || X("Map") ? e : /* @__PURE__ */ r(Y, {});
|
|
332
333
|
}
|
|
333
|
-
function
|
|
334
|
-
return
|
|
334
|
+
function qe({ children: e }) {
|
|
335
|
+
return B("marker") || X("Marker") ? e : null;
|
|
335
336
|
}
|
|
336
|
-
function
|
|
337
|
+
function W({
|
|
337
338
|
address: e,
|
|
338
339
|
description: s,
|
|
339
340
|
onLoadMap: o,
|
|
340
|
-
openInGoogleMapsHref:
|
|
341
|
-
consentCta:
|
|
341
|
+
openInGoogleMapsHref: n,
|
|
342
|
+
consentCta: i
|
|
342
343
|
}) {
|
|
343
|
-
const { t: l } =
|
|
344
|
-
return /* @__PURE__ */
|
|
345
|
-
/* @__PURE__ */
|
|
346
|
-
|
|
344
|
+
const { t: l } = C("ui");
|
|
345
|
+
return /* @__PURE__ */ x("div", { className: Ne(), "data-testid": "map-view-consent", children: [
|
|
346
|
+
/* @__PURE__ */ r(
|
|
347
|
+
Le,
|
|
347
348
|
{
|
|
348
349
|
"aria-hidden": "true",
|
|
349
350
|
className: "ds:size-6 ds:text-[var(--muted-foreground)]"
|
|
350
351
|
}
|
|
351
352
|
),
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
-
e ? /* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ r("p", { className: Pe(), children: l("mapView.consentTitle") }),
|
|
354
|
+
e ? /* @__PURE__ */ r(
|
|
354
355
|
"p",
|
|
355
356
|
{
|
|
356
|
-
className:
|
|
357
|
+
className: F(),
|
|
357
358
|
"data-testid": "map-view-address",
|
|
358
359
|
children: e
|
|
359
360
|
}
|
|
360
361
|
) : null,
|
|
361
|
-
/* @__PURE__ */
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
-
|
|
364
|
-
|
|
362
|
+
/* @__PURE__ */ r("p", { className: F(), children: s }),
|
|
363
|
+
/* @__PURE__ */ x("div", { className: "ds:flex ds:gap-[var(--spacing-sm)] ds:flex-wrap ds:items-center ds:justify-center", children: [
|
|
364
|
+
i ?? /* @__PURE__ */ r(
|
|
365
|
+
we,
|
|
365
366
|
{
|
|
366
367
|
type: "button",
|
|
367
368
|
intent: "primary",
|
|
@@ -371,73 +372,73 @@ function $e({
|
|
|
371
372
|
children: l("mapView.consentCta")
|
|
372
373
|
}
|
|
373
374
|
),
|
|
374
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ x(
|
|
375
376
|
"a",
|
|
376
377
|
{
|
|
377
|
-
href:
|
|
378
|
+
href: n,
|
|
378
379
|
target: "_blank",
|
|
379
380
|
rel: "noopener noreferrer",
|
|
380
381
|
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)] ds:text-[var(--primary-readable)] ds:underline ds:underline-offset-2",
|
|
381
382
|
children: [
|
|
382
383
|
l("mapView.openInGoogleMaps"),
|
|
383
|
-
/* @__PURE__ */
|
|
384
|
+
/* @__PURE__ */ r(xe, { "aria-hidden": "true", className: "ds:size-3" })
|
|
384
385
|
]
|
|
385
386
|
}
|
|
386
387
|
)
|
|
387
388
|
] })
|
|
388
389
|
] });
|
|
389
390
|
}
|
|
390
|
-
const
|
|
391
|
+
const He = ce(
|
|
391
392
|
({
|
|
392
393
|
id: e,
|
|
393
394
|
apiKey: s,
|
|
394
395
|
center: o,
|
|
395
|
-
zoom:
|
|
396
|
-
markers:
|
|
396
|
+
zoom: n = 15,
|
|
397
|
+
markers: i,
|
|
397
398
|
selectedMarkerId: l,
|
|
398
|
-
onMarkerClick:
|
|
399
|
-
consentGranted:
|
|
399
|
+
onMarkerClick: a,
|
|
400
|
+
consentGranted: p = !1,
|
|
400
401
|
onConsentRequest: m,
|
|
401
|
-
address:
|
|
402
|
-
consentDescription:
|
|
402
|
+
address: d,
|
|
403
|
+
consentDescription: h,
|
|
403
404
|
consentCta: u,
|
|
404
405
|
mapId: b,
|
|
405
|
-
size:
|
|
406
|
+
size: g,
|
|
406
407
|
surface: w,
|
|
407
408
|
ariaLabel: M,
|
|
408
|
-
fitToPoints:
|
|
409
|
+
fitToPoints: f,
|
|
409
410
|
fitKey: z,
|
|
410
|
-
fitMaxZoom:
|
|
411
|
-
className:
|
|
412
|
-
...
|
|
413
|
-
},
|
|
414
|
-
const { t:
|
|
415
|
-
() => z ??
|
|
416
|
-
[z,
|
|
417
|
-
), V =
|
|
418
|
-
() => `map-${
|
|
419
|
-
[
|
|
420
|
-
), [_,
|
|
411
|
+
fitMaxZoom: P = 15,
|
|
412
|
+
className: Q,
|
|
413
|
+
...ee
|
|
414
|
+
}, te) => {
|
|
415
|
+
const { t: S, i18n: ne } = C("ui"), T = L(() => f ?? [], [f]), se = L(
|
|
416
|
+
() => z ?? T.map((t) => `${U(t)}@${t.lat},${t.lng}`).sort().join("|"),
|
|
417
|
+
[z, T]
|
|
418
|
+
), V = T.length > 0, Z = y(V), j = pe(), oe = L(
|
|
419
|
+
() => `map-${j.replace(/[^a-zA-Z0-9-_]/g, "")}`,
|
|
420
|
+
[j]
|
|
421
|
+
), [_, re] = D(!1);
|
|
421
422
|
I(() => {
|
|
422
423
|
if (typeof window > "u") return;
|
|
423
|
-
const
|
|
424
|
-
return
|
|
424
|
+
const t = window.matchMedia("(prefers-reduced-motion: reduce)"), c = () => re(t.matches);
|
|
425
|
+
return c(), t.addEventListener("change", c), () => t.removeEventListener("change", c);
|
|
425
426
|
}, []);
|
|
426
|
-
const
|
|
427
|
-
v.current =
|
|
428
|
-
}, []), O = y(!1), $ = y(null), q = y(0),
|
|
427
|
+
const E = L(() => `https://www.google.com/maps/search/?api=1&query=${d ? encodeURIComponent(d) : `${o.lat},${o.lng}`}`, [d, o.lat, o.lng]), v = y(null), ae = R((t) => {
|
|
428
|
+
v.current = t;
|
|
429
|
+
}, []), O = y(!1), $ = y(null), q = y(0), N = R(
|
|
429
430
|
() => ({
|
|
430
|
-
panTo: (
|
|
431
|
-
var
|
|
432
|
-
return (
|
|
431
|
+
panTo: (t) => {
|
|
432
|
+
var c;
|
|
433
|
+
return (c = v.current) == null ? void 0 : c.panTo(t);
|
|
433
434
|
},
|
|
434
|
-
setZoom: (
|
|
435
|
-
var
|
|
436
|
-
return (
|
|
435
|
+
setZoom: (t) => {
|
|
436
|
+
var c;
|
|
437
|
+
return (c = v.current) == null ? void 0 : c.setZoom(t);
|
|
437
438
|
},
|
|
438
|
-
selectMarker: (
|
|
439
|
-
var
|
|
440
|
-
return (
|
|
439
|
+
selectMarker: (t) => {
|
|
440
|
+
var c;
|
|
441
|
+
return (c = v.current) == null ? void 0 : c.selectMarker(t);
|
|
441
442
|
},
|
|
442
443
|
// Without `isConsentGranted` an agent has no way to learn that
|
|
443
444
|
// its pan / zoom / select was swallowed by the GDPR gate rather
|
|
@@ -446,138 +447,160 @@ const qe = le(
|
|
|
446
447
|
// into nothing.
|
|
447
448
|
isConsentGranted: () => O.current,
|
|
448
449
|
getCenter: () => {
|
|
449
|
-
var
|
|
450
|
-
return ((
|
|
450
|
+
var t;
|
|
451
|
+
return ((t = v.current) == null ? void 0 : t.getCenter()) ?? null;
|
|
451
452
|
},
|
|
452
453
|
getZoom: () => {
|
|
453
|
-
var
|
|
454
|
-
return ((
|
|
454
|
+
var t;
|
|
455
|
+
return ((t = v.current) == null ? void 0 : t.getZoom()) ?? null;
|
|
455
456
|
},
|
|
456
457
|
getSelectedMarkerId: () => $.current,
|
|
457
458
|
getMarkerCount: () => q.current
|
|
458
459
|
}),
|
|
459
460
|
[]
|
|
460
461
|
);
|
|
461
|
-
|
|
462
|
-
const
|
|
463
|
-
() =>
|
|
464
|
-
[
|
|
462
|
+
ue(te, N, [N]);
|
|
463
|
+
const ie = L(
|
|
464
|
+
() => N(),
|
|
465
|
+
[N]
|
|
465
466
|
);
|
|
466
|
-
|
|
467
|
-
var
|
|
468
|
-
const
|
|
469
|
-
if (
|
|
470
|
-
if (
|
|
471
|
-
(
|
|
467
|
+
ke(Ge, ie, e), I(() => {
|
|
468
|
+
var c, k;
|
|
469
|
+
const t = Z.current && !V;
|
|
470
|
+
if (Z.current = V, !V) {
|
|
471
|
+
if (t) {
|
|
472
|
+
(c = v.current) == null || c.jumpTo(o, n);
|
|
472
473
|
return;
|
|
473
474
|
}
|
|
474
475
|
_ || (k = v.current) == null || k.panTo(o);
|
|
475
476
|
}
|
|
476
477
|
}, [o.lat, o.lng, _, V]), I(() => {
|
|
477
|
-
var
|
|
478
|
-
V || (
|
|
479
|
-
}, [
|
|
480
|
-
const [
|
|
481
|
-
O.current = A, $.current = l ?? null, q.current = (
|
|
482
|
-
const
|
|
478
|
+
var t;
|
|
479
|
+
V || (t = v.current) == null || t.setZoom(n);
|
|
480
|
+
}, [n, V]);
|
|
481
|
+
const [le, H] = D(!1), A = p || le;
|
|
482
|
+
O.current = A, $.current = l ?? null, q.current = (i ?? []).length;
|
|
483
|
+
const de = R(() => {
|
|
483
484
|
if (m) {
|
|
484
485
|
m(), H(!0);
|
|
485
486
|
return;
|
|
486
487
|
}
|
|
487
488
|
H(!0);
|
|
488
489
|
}, [m]);
|
|
489
|
-
return /* @__PURE__ */
|
|
490
|
+
return /* @__PURE__ */ r(
|
|
490
491
|
"div",
|
|
491
492
|
{
|
|
492
|
-
className:
|
|
493
|
+
className: Se({ size: g, surface: w, className: Q }),
|
|
493
494
|
"data-component": "map-view",
|
|
494
|
-
"data-component-id": e ??
|
|
495
|
+
"data-component-id": e ?? oe,
|
|
495
496
|
role: "region",
|
|
496
|
-
"aria-label": M ??
|
|
497
|
-
...
|
|
498
|
-
children: /* @__PURE__ */
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
497
|
+
"aria-label": M ?? S("mapView.label"),
|
|
498
|
+
...ee,
|
|
499
|
+
children: /* @__PURE__ */ r("div", { className: Te({ size: g }), children: A ? (
|
|
500
|
+
// A provider failure shows the consent placeholder (its "Open in
|
|
501
|
+
// Google Maps" link needs no script) with "Load map" as the
|
|
502
|
+
// retry, instead of unmounting the host's React tree. The gate
|
|
503
|
+
// starts the provider only once Google's `core` and `maps`
|
|
504
|
+
// libraries have arrived.
|
|
505
|
+
/* @__PURE__ */ r(
|
|
506
|
+
Ve,
|
|
507
|
+
{
|
|
508
|
+
fallback: ({ reset: t }) => /* @__PURE__ */ r(
|
|
509
|
+
W,
|
|
510
|
+
{
|
|
511
|
+
address: d,
|
|
512
|
+
description: h ?? S("mapView.consentDescription"),
|
|
513
|
+
onLoadMap: t,
|
|
514
|
+
consentCta: void 0,
|
|
515
|
+
openInGoogleMapsHref: E
|
|
516
|
+
}
|
|
517
|
+
),
|
|
518
|
+
children: /* @__PURE__ */ r(me, { libraries: ["maps"], pending: /* @__PURE__ */ r(Y, {}), children: /* @__PURE__ */ r(
|
|
519
|
+
he,
|
|
520
|
+
{
|
|
521
|
+
apiKey: s,
|
|
522
|
+
language: ne.language,
|
|
523
|
+
children: /* @__PURE__ */ r($e, { children: /* @__PURE__ */ x(
|
|
524
|
+
ge,
|
|
516
525
|
{
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
}
|
|
528
|
-
) : null,
|
|
529
|
-
/* @__PURE__ */ i(Oe, { children: (a ?? []).map((n) => {
|
|
530
|
-
const d = l != null && l === n.id, k = P("mapView.markerLabel", {
|
|
531
|
-
label: n.label ?? n.id
|
|
532
|
-
});
|
|
533
|
-
return b ? /* @__PURE__ */ i(
|
|
534
|
-
me,
|
|
535
|
-
{
|
|
536
|
-
position: n.position,
|
|
537
|
-
title: k,
|
|
538
|
-
"aria-label": k,
|
|
539
|
-
"data-selected": d ? "true" : "false",
|
|
540
|
-
onClick: () => r == null ? void 0 : r(n.id),
|
|
541
|
-
children: /* @__PURE__ */ i(
|
|
542
|
-
he,
|
|
526
|
+
defaultCenter: o,
|
|
527
|
+
defaultZoom: n,
|
|
528
|
+
mapId: b,
|
|
529
|
+
gestureHandling: "cooperative",
|
|
530
|
+
disableDefaultUI: !1,
|
|
531
|
+
onClick: () => a == null ? void 0 : a(null),
|
|
532
|
+
className: "ds:[inline-size:100%] ds:[block-size:100%]",
|
|
533
|
+
children: [
|
|
534
|
+
/* @__PURE__ */ r(
|
|
535
|
+
Re,
|
|
543
536
|
{
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
glyphColor: "var(--primary-foreground)"
|
|
537
|
+
onHandleReady: ae,
|
|
538
|
+
onMarkerSelect: (t) => a == null ? void 0 : a(t)
|
|
547
539
|
}
|
|
548
|
-
)
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
540
|
+
),
|
|
541
|
+
f ? /* @__PURE__ */ r(
|
|
542
|
+
Oe,
|
|
543
|
+
{
|
|
544
|
+
points: T,
|
|
545
|
+
fitKey: se,
|
|
546
|
+
maxZoom: P
|
|
547
|
+
}
|
|
548
|
+
) : null,
|
|
549
|
+
/* @__PURE__ */ r(qe, { children: (i ?? []).map((t) => {
|
|
550
|
+
const c = l != null && l === t.id, k = S("mapView.markerLabel", {
|
|
551
|
+
label: t.label ?? t.id
|
|
552
|
+
});
|
|
553
|
+
return b ? /* @__PURE__ */ r(
|
|
554
|
+
fe,
|
|
555
|
+
{
|
|
556
|
+
position: t.position,
|
|
557
|
+
title: k,
|
|
558
|
+
"aria-label": k,
|
|
559
|
+
"data-selected": c ? "true" : "false",
|
|
560
|
+
onClick: () => a == null ? void 0 : a(t.id),
|
|
561
|
+
children: /* @__PURE__ */ r(
|
|
562
|
+
be,
|
|
563
|
+
{
|
|
564
|
+
background: "var(--primary)",
|
|
565
|
+
borderColor: "var(--primary)",
|
|
566
|
+
glyphColor: "var(--primary-foreground)"
|
|
567
|
+
}
|
|
568
|
+
)
|
|
569
|
+
},
|
|
570
|
+
t.id
|
|
571
|
+
) : /* @__PURE__ */ r(
|
|
572
|
+
ve,
|
|
573
|
+
{
|
|
574
|
+
position: t.position,
|
|
575
|
+
title: k,
|
|
576
|
+
onClick: () => a == null ? void 0 : a(t.id)
|
|
577
|
+
},
|
|
578
|
+
t.id
|
|
579
|
+
);
|
|
580
|
+
}) })
|
|
581
|
+
]
|
|
582
|
+
}
|
|
583
|
+
) })
|
|
584
|
+
}
|
|
585
|
+
) })
|
|
586
|
+
}
|
|
587
|
+
)
|
|
588
|
+
) : /* @__PURE__ */ r(
|
|
589
|
+
W,
|
|
567
590
|
{
|
|
568
|
-
address:
|
|
569
|
-
description:
|
|
570
|
-
onLoadMap:
|
|
591
|
+
address: d,
|
|
592
|
+
description: h ?? S("mapView.consentDescription"),
|
|
593
|
+
onLoadMap: de,
|
|
571
594
|
consentCta: u,
|
|
572
|
-
openInGoogleMapsHref:
|
|
595
|
+
openInGoogleMapsHref: E
|
|
573
596
|
}
|
|
574
597
|
) })
|
|
575
598
|
}
|
|
576
599
|
);
|
|
577
600
|
}
|
|
578
601
|
);
|
|
579
|
-
|
|
602
|
+
He.displayName = "MapView";
|
|
580
603
|
export {
|
|
581
|
-
|
|
604
|
+
He as M
|
|
582
605
|
};
|
|
583
|
-
//# sourceMappingURL=map-view-
|
|
606
|
+
//# sourceMappingURL=map-view-UrNgxBy3.js.map
|