@factorialco/f0-react 10.13.0 → 10.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ChatPostComposerDialog-Dxf_Nbbb.js → ChatPostComposerDialog-CIKfoH8G.js} +3 -3
- package/dist/{CoachmarkProvider-ByfCE0-j.js → CoachmarkProvider-BQGJN9Eq.js} +16122 -16128
- package/dist/{DocumentToolbar-UFkOiw8e.js → DocumentToolbar-C7Hoqt2k.js} +5 -5
- package/dist/{DocxViewer-BjmzL4sn.js → DocxViewer-lSeezeTM.js} +2 -2
- package/dist/{F0AiProcessingOverlay-B2kWuLdK.js → F0AiProcessingOverlay-mGAGIMhR.js} +467 -466
- package/dist/{F0CanvasPanel-9PijExob.js → F0CanvasPanel-DpK3VDqw.js} +7373 -7340
- package/dist/{F0DocumentViewer-hMDS3Kpg.js → F0DocumentViewer-3dkTQl5F.js} +9 -9
- package/dist/F0DocumentViewer-BXXUyUaZ.js +3 -0
- package/dist/{F0Map-CznQg3YF.js → F0Map-CbaCGcqg.js} +845 -607
- package/dist/{F0Select-By_QpX1S.js → F0Select-CFbVOJB3.js} +73 -73
- package/dist/{F0Box-CYL5_Zhb.js → F0Text-eOwHoc51.js} +104 -96
- package/dist/{F0VideoPlayer-BByW1cIV.js → F0VideoPlayer-BdQ7J79i.js} +279 -279
- package/dist/F0VideoPlayer-pCo7xxqk.js +1 -0
- package/dist/{Map-DZ1yBUGL.js → Map-CqeYx7ZH.js} +53 -52
- package/dist/{PdfThumbnail-Dkwm6GDn.js → PdfThumbnail-BrRRXFmm.js} +1 -1
- package/dist/{SheetViewer-DT6WypD8.js → SheetViewer-i-Apnmgp.js} +4 -4
- package/dist/{TextViewer-D8MLMNev.js → TextViewer-DZmOqOxb.js} +2 -2
- package/dist/ai.d.ts +3 -3
- package/dist/ai.js +4 -4
- package/dist/component-status.js +28 -28
- package/dist/{dist-CUsub1Mu.js → dist-Ck_UA8Lz.js} +1 -1
- package/dist/{dist-CSP_0yKt.js → dist-Cuwaibqg.js} +2 -1
- package/dist/experimental.d.ts +216 -115
- package/dist/experimental.js +5917 -4716
- package/dist/{exports-0B2luDkl.d.ts → exports-CUQ_f1Aq.d.ts} +1 -1
- package/dist/f0.d.ts +12 -7
- package/dist/f0.js +704 -704
- package/dist/{google-B7uAYsxU.js → google-D1V0swd7.js} +1 -1
- package/dist/{i18n-provider-defaults-BA2_-hRH.js → i18n-provider-defaults-Ch0JDGbK.js} +12 -3
- package/dist/{i18n-provider-defaults-m88KkXdP.d.ts → i18n-provider-defaults-D1lWzbYx.d.ts} +14 -1
- package/dist/i18n-provider-defaults.d.ts +1 -1
- package/dist/i18n-provider-defaults.js +1 -1
- package/dist/{index-Bdpf44A3.d.ts → index--CBjax6U.d.ts} +2 -2
- package/dist/{index-s5SdT3uE.d.ts → index-2J8R9Uml.d.ts} +3 -1
- package/dist/{maplibre-GffVTD0r.js → maplibre-C6hlLglQ.js} +2 -2
- package/dist/{pdfWorker-C3UVNtZV.js → pdfWorker-DR5Zoo3d.js} +2 -2
- package/dist/{popover-B7fqB9lu.js → popover-DNcAIP25.js} +20 -20
- package/dist/styles.css +1 -1
- package/dist/{tooltip-TOvfXq9F.js → tooltip-BX4dSfeL.js} +338 -247
- package/dist/{useData-CAl9SKtE.js → useData-zygrn6e-.js} +950 -949
- package/package.json +2 -2
- package/dist/F0DocumentViewer-DDaXV0U3.js +0 -3
- package/dist/F0VideoPlayer-DerqL5g5.js +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { a as e,
|
|
2
|
-
import { Ht as r, Lt as i, Mt as a, Zn as o, b as s, gn as c, in as l, ir as u, mn as d, rn as f } from "./popover-
|
|
3
|
-
import {
|
|
4
|
-
import { n as h,
|
|
5
|
-
import {
|
|
6
|
-
import { J as
|
|
7
|
-
import { n as te, t as
|
|
8
|
-
import { createContext as
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { createPortal as
|
|
1
|
+
import { a as e, ni as t, o as n } from "./CoachmarkProvider-BQGJN9Eq.js";
|
|
2
|
+
import { Ht as r, Lt as i, Mt as a, Zn as o, b as s, gn as c, in as l, ir as u, mn as d, rn as f } from "./popover-DNcAIP25.js";
|
|
3
|
+
import { L as p, R as m } from "./tooltip-BX4dSfeL.js";
|
|
4
|
+
import { n as h, r as g } from "./F0Text-eOwHoc51.js";
|
|
5
|
+
import { Fo as _, X as v, gs as y, io as b } from "./F0CanvasPanel-DpK3VDqw.js";
|
|
6
|
+
import { J as x, W as S, j as ee, y as C } from "./useData-zygrn6e-.js";
|
|
7
|
+
import { a as w, n as T, o as te, s as ne, t as E } from "./dist-Cuwaibqg.js";
|
|
8
|
+
import { createContext as D, forwardRef as O, useCallback as k, useContext as A, useEffect as j, useId as re, useImperativeHandle as ie, useLayoutEffect as ae, useMemo as M, useRef as N, useState as P } from "react";
|
|
9
|
+
import { Fragment as oe, jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
10
|
+
import { createPortal as se } from "react-dom";
|
|
11
11
|
//#region src/addons/map/F0Map/camera.ts
|
|
12
12
|
var ce = (e, t) => ({
|
|
13
13
|
top: Math.max(e?.top ?? 0, t?.top ?? 0),
|
|
14
14
|
right: Math.max(e?.right ?? 0, t?.right ?? 0),
|
|
15
15
|
bottom: Math.max(e?.bottom ?? 0, t?.bottom ?? 0),
|
|
16
16
|
left: Math.max(e?.left ?? 0, t?.left ?? 0)
|
|
17
|
-
}),
|
|
17
|
+
}), le = (e, { width: t, height: n }) => {
|
|
18
18
|
let r = t > 0 && e.left + e.right >= t, i = n > 0 && e.top + e.bottom >= n;
|
|
19
19
|
return {
|
|
20
20
|
top: i ? 0 : e.top,
|
|
@@ -22,18 +22,18 @@ var ce = (e, t) => ({
|
|
|
22
22
|
left: r ? 0 : e.left,
|
|
23
23
|
right: r ? 0 : e.right
|
|
24
24
|
};
|
|
25
|
-
},
|
|
25
|
+
}, ue = (e) => ({
|
|
26
26
|
x: (e.left - e.right) / 2,
|
|
27
27
|
y: (e.top - e.bottom) / 2
|
|
28
|
-
}),
|
|
29
|
-
let i =
|
|
28
|
+
}), de = (e, t, n, r = e.getZoom()) => {
|
|
29
|
+
let i = ue(n), a = e.project(t);
|
|
30
30
|
if (!a || i.x === 0 && i.y === 0) return t;
|
|
31
31
|
let o = 2 ** (e.getZoom() - r);
|
|
32
32
|
return e.unproject({
|
|
33
33
|
x: a.x - i.x * o,
|
|
34
34
|
y: a.y - i.y * o
|
|
35
35
|
}) ?? t;
|
|
36
|
-
},
|
|
36
|
+
}, fe = ({ adapter: e, coordinates: t, inset: n, size: r, gutter: i, maxZoom: a }) => {
|
|
37
37
|
let o = e.cameraForCoordinates(t, { gutter: i });
|
|
38
38
|
if (!o) return null;
|
|
39
39
|
let s = (e, t, n) => e > 2 * i ? (e - t - n - 2 * i) / (e - 2 * i) : 1, c = Math.min(s(r.width, n.left, n.right), s(r.height, n.top, n.bottom)), l = o.zoom ?? e.getZoom();
|
|
@@ -43,17 +43,17 @@ var ce = (e, t) => ({
|
|
|
43
43
|
};
|
|
44
44
|
let u = Math.min(l + Math.log2(c), a);
|
|
45
45
|
return {
|
|
46
|
-
center:
|
|
46
|
+
center: de(e, o.center, n, u),
|
|
47
47
|
zoom: u
|
|
48
48
|
};
|
|
49
|
-
},
|
|
50
|
-
let [r, i] = e, a =
|
|
49
|
+
}, pe = 6371008.8, me = (e) => e * Math.PI / 180, he = (e) => e * 180 / Math.PI, ge = (e, t, n = 64) => {
|
|
50
|
+
let [r, i] = e, a = me(i), o = me(r), s = Math.max(t, 0) / pe, c = [];
|
|
51
51
|
for (let e = 0; e < n; e++) {
|
|
52
52
|
let t = 2 * Math.PI * e / n, r = Math.asin(Math.sin(a) * Math.cos(s) + Math.cos(a) * Math.sin(s) * Math.cos(t)), i = o + Math.atan2(Math.sin(t) * Math.sin(s) * Math.cos(a), Math.cos(s) - Math.sin(a) * Math.sin(r));
|
|
53
|
-
c.push([
|
|
53
|
+
c.push([he(i), he(r)]);
|
|
54
54
|
}
|
|
55
55
|
return c.push(c[0]), c;
|
|
56
|
-
},
|
|
56
|
+
}, _e = [
|
|
57
57
|
"neutral",
|
|
58
58
|
"grey",
|
|
59
59
|
"radical",
|
|
@@ -71,15 +71,15 @@ var ce = (e, t) => ({
|
|
|
71
71
|
"army",
|
|
72
72
|
"smoke",
|
|
73
73
|
"barbie"
|
|
74
|
-
].filter((e) => e !== "neutral" && e !== "grey"),
|
|
75
|
-
neutral:
|
|
76
|
-
grey:
|
|
77
|
-
...Object.fromEntries(
|
|
78
|
-
},
|
|
79
|
-
neutral:
|
|
74
|
+
].filter((e) => e !== "neutral" && e !== "grey"), ve = {
|
|
75
|
+
neutral: E.grey[100],
|
|
76
|
+
grey: E.grey.solid[50],
|
|
77
|
+
...Object.fromEntries(_e.map((e) => [e, E[e][50]]))
|
|
78
|
+
}, ye = (e) => `hsl(${ve[e]})`, be = {
|
|
79
|
+
neutral: E.grey[100],
|
|
80
80
|
grey: "218 14% 30%",
|
|
81
|
-
...Object.fromEntries(
|
|
82
|
-
},
|
|
81
|
+
...Object.fromEntries(_e.map((e) => [e, E[e][70]]))
|
|
82
|
+
}, xe = (e, t) => t ? be[e] : ve[e], Se = E.grey[100], Ce = {
|
|
83
83
|
sm: {
|
|
84
84
|
d: 16,
|
|
85
85
|
border: 1.5,
|
|
@@ -140,96 +140,96 @@ var ce = (e, t) => ({
|
|
|
140
140
|
icon: "lg",
|
|
141
141
|
avatar: "lg"
|
|
142
142
|
}
|
|
143
|
-
},
|
|
144
|
-
let e =
|
|
145
|
-
return -(e.d - e.caretOverlap + e.caretH +
|
|
146
|
-
},
|
|
147
|
-
let { size: r = "md", selected: i = !1, collapsed: a = !1, label: s, showLabel: d = !0, labelPlacement: f = "right", onClick: h, ariaLabel: g, presentational: _ = !1, dataTestId: v, className: y } = e, b = e.variant ?? "color",
|
|
143
|
+
}, L = (e) => Ce[e], R = 5.6, we = 1.5, Te = () => {
|
|
144
|
+
let e = Ce.xl;
|
|
145
|
+
return -(e.d - e.caretOverlap + e.caretH + R + we) + 3;
|
|
146
|
+
}, z = "hsl(var(--white-100))", B = O(function(e, n) {
|
|
147
|
+
let { size: r = "md", selected: i = !1, collapsed: a = !1, label: s, showLabel: d = !0, labelPlacement: f = "right", onClick: h, ariaLabel: g, presentational: _ = !1, dataTestId: v, className: y } = e, b = e.variant ?? "color", x = Ce[i ? "xl" : r], S = !!h, w = b === "color" || b === "icon" || b === "letter", T = b === "person" && "firstName" in e ? e.firstName + e.lastName : (b === "team" || b === "company") && "name" in e ? e.name : null, te = w ? e.color ?? "radical" : T ? b === "person" && "src" in e && e.src ? "grey" : ee(T) ?? "grey" : "neutral", ne = t(), E = i ? 32 : {
|
|
148
148
|
xs: 12,
|
|
149
149
|
sm: 16,
|
|
150
150
|
md: 20,
|
|
151
151
|
lg: 24
|
|
152
|
-
}[
|
|
152
|
+
}[x.icon], D = {
|
|
153
153
|
xs: 20,
|
|
154
154
|
sm: 24,
|
|
155
155
|
md: 32,
|
|
156
156
|
lg: 40
|
|
157
|
-
},
|
|
157
|
+
}, O = Ce[r].avatar, k = i ? D[x.avatar] / D[O] : 1, A = (e) => /* @__PURE__ */ F("span", {
|
|
158
158
|
className: "flex shrink-0 items-center justify-center transition-transform duration-200 ease-out",
|
|
159
|
-
style: { transform: `scale(${
|
|
159
|
+
style: { transform: `scale(${k})` },
|
|
160
160
|
children: e
|
|
161
|
-
}),
|
|
161
|
+
}), j = b === "color" ? null : b === "icon" && "icon" in e ? /* @__PURE__ */ F(l, {
|
|
162
162
|
icon: e.icon,
|
|
163
|
-
size:
|
|
163
|
+
size: x.icon,
|
|
164
164
|
color: "#ffffff",
|
|
165
165
|
style: {
|
|
166
|
-
width:
|
|
167
|
-
height:
|
|
166
|
+
width: E,
|
|
167
|
+
height: E,
|
|
168
168
|
transition: "width 200ms ease-out, height 200ms ease-out"
|
|
169
169
|
}
|
|
170
|
-
}) : b === "letter" && "letter" in e ? /* @__PURE__ */
|
|
170
|
+
}) : b === "letter" && "letter" in e ? /* @__PURE__ */ F("span", {
|
|
171
171
|
"aria-hidden": !0,
|
|
172
172
|
className: "font-semibold leading-none",
|
|
173
173
|
style: {
|
|
174
|
-
color:
|
|
175
|
-
fontSize: Math.round(
|
|
174
|
+
color: z,
|
|
175
|
+
fontSize: Math.round(E * .78),
|
|
176
176
|
transition: "font-size 200ms ease-out"
|
|
177
177
|
},
|
|
178
178
|
children: e.letter.charAt(0).toUpperCase()
|
|
179
|
-
}) : b === "person" && "firstName" in e ?
|
|
179
|
+
}) : b === "person" && "firstName" in e ? A(/* @__PURE__ */ F(C, {
|
|
180
180
|
avatar: {
|
|
181
181
|
type: "person",
|
|
182
182
|
firstName: e.firstName,
|
|
183
183
|
lastName: e.lastName,
|
|
184
184
|
src: e.src
|
|
185
185
|
},
|
|
186
|
-
size:
|
|
187
|
-
})) : b === "team" && "name" in e ?
|
|
186
|
+
size: O
|
|
187
|
+
})) : b === "team" && "name" in e ? A(/* @__PURE__ */ F(C, {
|
|
188
188
|
avatar: {
|
|
189
189
|
type: "team",
|
|
190
190
|
name: e.name,
|
|
191
191
|
src: e.src
|
|
192
192
|
},
|
|
193
|
-
size:
|
|
194
|
-
})) : b === "company" && "name" in e ?
|
|
193
|
+
size: O
|
|
194
|
+
})) : b === "company" && "name" in e ? A(/* @__PURE__ */ F(C, {
|
|
195
195
|
avatar: {
|
|
196
196
|
type: "company",
|
|
197
197
|
name: e.name,
|
|
198
198
|
src: e.src
|
|
199
199
|
},
|
|
200
|
-
size:
|
|
201
|
-
})) : b === "image" && "src" in e ? /* @__PURE__ */
|
|
200
|
+
size: O
|
|
201
|
+
})) : b === "image" && "src" in e ? /* @__PURE__ */ F("img", {
|
|
202
202
|
src: e.src,
|
|
203
203
|
alt: "alt" in e ? e.alt ?? "" : "",
|
|
204
204
|
className: "h-full w-full object-cover"
|
|
205
|
-
}) : null,
|
|
205
|
+
}) : null, re = b === "team" || b === "company" || b === "icon", ie = /* @__PURE__ */ F("span", {
|
|
206
206
|
className: "relative z-[1] flex shrink-0 items-center justify-center overflow-hidden border-solid transition-all duration-200 ease-out",
|
|
207
207
|
style: {
|
|
208
|
-
width:
|
|
209
|
-
height:
|
|
210
|
-
borderRadius:
|
|
211
|
-
borderWidth:
|
|
212
|
-
borderColor:
|
|
213
|
-
backgroundColor:
|
|
214
|
-
},
|
|
215
|
-
children: b === "color" ? /* @__PURE__ */
|
|
208
|
+
width: x.d,
|
|
209
|
+
height: x.d,
|
|
210
|
+
borderRadius: re ? Math.round(x.d * .3) : 9999,
|
|
211
|
+
borderWidth: x.border,
|
|
212
|
+
borderColor: z,
|
|
213
|
+
backgroundColor: w ? ye(te) : z
|
|
214
|
+
},
|
|
215
|
+
children: b === "color" ? /* @__PURE__ */ F("span", {
|
|
216
216
|
className: "rounded-full transition-all duration-200 ease-out",
|
|
217
217
|
style: {
|
|
218
|
-
width:
|
|
219
|
-
height:
|
|
220
|
-
backgroundColor:
|
|
221
|
-
}
|
|
222
|
-
}) :
|
|
223
|
-
}),
|
|
224
|
-
width:
|
|
225
|
-
height:
|
|
218
|
+
width: x.d * .36,
|
|
219
|
+
height: x.d * .36,
|
|
220
|
+
backgroundColor: z
|
|
221
|
+
}
|
|
222
|
+
}) : j
|
|
223
|
+
}), ae = /* @__PURE__ */ F(o, { children: i ? /* @__PURE__ */ F(c.svg, {
|
|
224
|
+
width: x.caretW,
|
|
225
|
+
height: x.caretH,
|
|
226
226
|
viewBox: "0 0 16 13",
|
|
227
227
|
"aria-hidden": !0,
|
|
228
228
|
className: "absolute left-1/2",
|
|
229
229
|
style: {
|
|
230
|
-
top:
|
|
231
|
-
marginLeft: -
|
|
232
|
-
fill:
|
|
230
|
+
top: x.d - x.caretOverlap - 3,
|
|
231
|
+
marginLeft: -x.caretW / 2,
|
|
232
|
+
fill: z,
|
|
233
233
|
transformOrigin: "50% 0%"
|
|
234
234
|
},
|
|
235
235
|
initial: {
|
|
@@ -244,85 +244,85 @@ var ce = (e, t) => ({
|
|
|
244
244
|
scaleY: 0,
|
|
245
245
|
opacity: 0
|
|
246
246
|
},
|
|
247
|
-
transition:
|
|
247
|
+
transition: ne ? { duration: 0 } : {
|
|
248
248
|
duration: .18,
|
|
249
249
|
ease: "easeOut",
|
|
250
250
|
opacity: { duration: .1 }
|
|
251
251
|
},
|
|
252
|
-
children: /* @__PURE__ */
|
|
253
|
-
}, "caret") : null }),
|
|
252
|
+
children: /* @__PURE__ */ F("path", { d: "M0 0h16c-4.2 3-6.6 6.9-7.4 11.7a0.62 0.62 0 0 1-1.2 0C6.6 6.9 4.2 3 0 0Z" })
|
|
253
|
+
}, "caret") : null }), M = /* @__PURE__ */ I("span", {
|
|
254
254
|
className: "relative inline-flex",
|
|
255
|
-
style: { filter: `drop-shadow(0 ${
|
|
256
|
-
children: [
|
|
257
|
-
}), N =
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
`0 1px 2px ${
|
|
261
|
-
`0 -1px 2px ${
|
|
262
|
-
`1px 0 2px ${
|
|
263
|
-
`-1px 0 2px ${
|
|
264
|
-
].join(","),
|
|
255
|
+
style: { filter: `drop-shadow(0 ${x.shadowY}px ${x.shadowBlur / 2}px hsl(${Se} / 0.3))` },
|
|
256
|
+
children: [ae, ie]
|
|
257
|
+
}), N = Ce[r], P = x.d / 2, se = R, ce = i ? Te() : -P, le = i ? "bottom" : f, ue = `0 0 ${Math.max(2, Math.round(N.label * .28))}px ${z}`, de = [
|
|
258
|
+
ue,
|
|
259
|
+
ue,
|
|
260
|
+
`0 1px 2px ${z}`,
|
|
261
|
+
`0 -1px 2px ${z}`,
|
|
262
|
+
`1px 0 2px ${z}`,
|
|
263
|
+
`-1px 0 2px ${z}`
|
|
264
|
+
].join(","), fe = !i && (le === "top" || le === "bottom"), pe = fe ? "line-clamp-4 text-center" : i ? "whitespace-nowrap text-center" : "whitespace-nowrap", me = N.d / 2, he = {
|
|
265
265
|
right: {
|
|
266
|
-
transform: `translate(${
|
|
266
|
+
transform: `translate(${me}px, -50%)`,
|
|
267
267
|
style: { paddingLeft: N.gap }
|
|
268
268
|
},
|
|
269
269
|
left: {
|
|
270
|
-
transform: `translate(calc(-100% - ${
|
|
270
|
+
transform: `translate(calc(-100% - ${me}px), -50%)`,
|
|
271
271
|
style: {
|
|
272
272
|
paddingRight: N.gap,
|
|
273
273
|
textAlign: "right"
|
|
274
274
|
}
|
|
275
275
|
},
|
|
276
276
|
top: {
|
|
277
|
-
transform: `translate(-50%, calc(-100% - ${
|
|
277
|
+
transform: `translate(-50%, calc(-100% - ${me}px))`,
|
|
278
278
|
style: { paddingBottom: N.gap }
|
|
279
279
|
},
|
|
280
280
|
bottom: {
|
|
281
|
-
transform: `translate(-50%, ${i ?
|
|
281
|
+
transform: `translate(-50%, ${i ? se : me}px)`,
|
|
282
282
|
style: { paddingTop: N.gap + (i ? 4 : 0) }
|
|
283
283
|
}
|
|
284
|
-
}[
|
|
285
|
-
className: p("absolute left-0 top-0 font-semibold leading-tight transition-all duration-200 ease-out",
|
|
284
|
+
}[le], ge = s && d && !a && /* @__PURE__ */ F("span", {
|
|
285
|
+
className: p("absolute left-0 top-0 font-semibold leading-tight transition-all duration-200 ease-out", pe),
|
|
286
286
|
style: {
|
|
287
|
-
color: `hsl(${
|
|
287
|
+
color: `hsl(${be[te]})`,
|
|
288
288
|
fontSize: N.label,
|
|
289
|
-
textShadow:
|
|
290
|
-
transform:
|
|
291
|
-
maxWidth:
|
|
292
|
-
...
|
|
289
|
+
textShadow: de,
|
|
290
|
+
transform: he.transform,
|
|
291
|
+
maxWidth: fe ? N.maxLabelW : void 0,
|
|
292
|
+
...he.style
|
|
293
293
|
},
|
|
294
294
|
children: s
|
|
295
|
-
}),
|
|
295
|
+
}), _e = /* @__PURE__ */ F("span", {
|
|
296
296
|
"aria-hidden": !0,
|
|
297
297
|
className: "absolute left-0 top-0 rounded-full border-solid transition-all duration-200 ease-out",
|
|
298
298
|
style: {
|
|
299
|
-
width:
|
|
300
|
-
height:
|
|
299
|
+
width: se * 2,
|
|
300
|
+
height: se * 2,
|
|
301
301
|
marginLeft: -5.6,
|
|
302
302
|
marginTop: -5.6,
|
|
303
303
|
borderWidth: 1.5,
|
|
304
|
-
borderColor:
|
|
305
|
-
backgroundColor:
|
|
306
|
-
boxShadow: `0 1px 2px hsl(${
|
|
304
|
+
borderColor: z,
|
|
305
|
+
backgroundColor: ye(te),
|
|
306
|
+
boxShadow: `0 1px 2px hsl(${Se} / 0.3)`,
|
|
307
307
|
transform: `scale(${i || a ? 1 : 0})`,
|
|
308
308
|
opacity: i || a ? 1 : 0
|
|
309
309
|
}
|
|
310
|
-
}),
|
|
311
|
-
|
|
312
|
-
/* @__PURE__ */
|
|
310
|
+
}), ve = /* @__PURE__ */ I(oe, { children: [
|
|
311
|
+
_e,
|
|
312
|
+
/* @__PURE__ */ F("span", {
|
|
313
313
|
className: "absolute left-0 top-0 transition-all duration-200 ease-out",
|
|
314
314
|
style: {
|
|
315
|
-
transform: `translate(-50%, ${
|
|
315
|
+
transform: `translate(-50%, ${ce}px) scale(${+!a})`,
|
|
316
316
|
opacity: +!a
|
|
317
317
|
},
|
|
318
|
-
children:
|
|
318
|
+
children: M
|
|
319
319
|
}),
|
|
320
|
-
|
|
320
|
+
ge
|
|
321
321
|
] });
|
|
322
|
-
return /* @__PURE__ */
|
|
322
|
+
return /* @__PURE__ */ F(u, {
|
|
323
323
|
dataTestId: v,
|
|
324
|
-
children:
|
|
325
|
-
ref:
|
|
324
|
+
children: S ? /* @__PURE__ */ F("button", {
|
|
325
|
+
ref: n,
|
|
326
326
|
type: "button",
|
|
327
327
|
..._ ? {
|
|
328
328
|
tabIndex: -1,
|
|
@@ -333,98 +333,98 @@ var ce = (e, t) => ({
|
|
|
333
333
|
},
|
|
334
334
|
onClick: h,
|
|
335
335
|
className: p("relative inline-flex cursor-pointer border-0 bg-transparent p-0", "transition-transform duration-150 hover:scale-[1.05]", m("rounded-full"), y),
|
|
336
|
-
children:
|
|
337
|
-
}) : /* @__PURE__ */
|
|
336
|
+
children: ve
|
|
337
|
+
}) : /* @__PURE__ */ F("span", {
|
|
338
338
|
role: "img",
|
|
339
339
|
"aria-label": g,
|
|
340
340
|
className: p("relative inline-flex", y),
|
|
341
|
-
children:
|
|
341
|
+
children: ve
|
|
342
342
|
})
|
|
343
343
|
});
|
|
344
344
|
});
|
|
345
|
-
|
|
346
|
-
var
|
|
345
|
+
B.displayName = "BaseMapMarker";
|
|
346
|
+
var Ee = B, V = (e, t) => `hsl(${xe(e, t).replace(/ /g, ", ")})`, De = (e, t) => ({
|
|
347
347
|
id: e.id,
|
|
348
|
-
ring:
|
|
349
|
-
color: e.color ??
|
|
348
|
+
ring: ge(e.center, e.radiusMeters),
|
|
349
|
+
color: e.color ?? V(e.variant ?? "malibu", t),
|
|
350
350
|
fillOpacity: .15,
|
|
351
351
|
strokeWidth: 2
|
|
352
|
-
}),
|
|
353
|
-
let r =
|
|
354
|
-
return
|
|
352
|
+
}), Oe = ({ adapter: e, areas: t, isDark: n }) => {
|
|
353
|
+
let r = M(() => t.map((e) => De(e, n)), [t, n]);
|
|
354
|
+
return j(function() {
|
|
355
355
|
e.setAreas(r);
|
|
356
|
-
}, [e, r]),
|
|
356
|
+
}, [e, r]), j(function() {
|
|
357
357
|
return () => e.setAreas([]);
|
|
358
358
|
}, [e]), null;
|
|
359
|
-
},
|
|
359
|
+
}, ke = {
|
|
360
360
|
background: "transparent",
|
|
361
361
|
border: "default",
|
|
362
362
|
borderStyle: "solid",
|
|
363
363
|
borderColor: "secondary"
|
|
364
|
-
},
|
|
364
|
+
}, H = {
|
|
365
365
|
control: "md",
|
|
366
366
|
panel: "xl"
|
|
367
|
-
},
|
|
367
|
+
}, Ae = {
|
|
368
368
|
md: "rounded-md backdrop-blur-md bg-f1-background-inverse-secondary dark:bg-f1-background-tertiary",
|
|
369
369
|
xl: "rounded-xl backdrop-blur-md bg-f1-background-inverse-secondary dark:bg-f1-background-tertiary"
|
|
370
|
-
},
|
|
370
|
+
}, je = (e) => Ae[e], U = {
|
|
371
371
|
inset: 8,
|
|
372
372
|
gap: 8,
|
|
373
373
|
listWidth: 214,
|
|
374
374
|
detailWidth: 344,
|
|
375
375
|
toggleSize: 38
|
|
376
|
-
},
|
|
376
|
+
}, Me = "cubic-bezier(0.77, 0, 0.175, 1)", W = {
|
|
377
377
|
enter: {
|
|
378
378
|
duration: "175ms",
|
|
379
|
-
easing:
|
|
379
|
+
easing: Me
|
|
380
380
|
},
|
|
381
381
|
exit: {
|
|
382
382
|
duration: "250ms",
|
|
383
|
-
easing:
|
|
383
|
+
easing: Me
|
|
384
384
|
}
|
|
385
|
-
},
|
|
386
|
-
className:
|
|
387
|
-
children: /* @__PURE__ */
|
|
388
|
-
...
|
|
389
|
-
borderRadius:
|
|
385
|
+
}, Ne = ({ children: e }) => /* @__PURE__ */ F("div", {
|
|
386
|
+
className: je(H.control),
|
|
387
|
+
children: /* @__PURE__ */ F(h, {
|
|
388
|
+
...ke,
|
|
389
|
+
borderRadius: H.control,
|
|
390
390
|
padding: "none",
|
|
391
|
-
children: /* @__PURE__ */
|
|
391
|
+
children: /* @__PURE__ */ F("div", {
|
|
392
392
|
className: "flex flex-col items-center gap-1 p-0.5",
|
|
393
393
|
children: e
|
|
394
394
|
})
|
|
395
395
|
})
|
|
396
|
-
}),
|
|
397
|
-
let c = f(), l = !!(r || n), d = !!(e || t), p = (e) => /* @__PURE__ */
|
|
398
|
-
return /* @__PURE__ */
|
|
396
|
+
}), Pe = O(({ onZoomIn: e, onZoomOut: t, onFit: n, onLocate: r, labels: i, dataTestId: a }, o) => {
|
|
397
|
+
let c = f(), l = !!(r || n), d = !!(e || t), p = (e) => /* @__PURE__ */ F(Ne, { children: e });
|
|
398
|
+
return /* @__PURE__ */ F(u, {
|
|
399
399
|
dataTestId: a,
|
|
400
|
-
children: /* @__PURE__ */
|
|
400
|
+
children: /* @__PURE__ */ I("div", {
|
|
401
401
|
ref: o,
|
|
402
402
|
role: "toolbar",
|
|
403
403
|
"aria-orientation": "vertical",
|
|
404
404
|
"aria-label": c.map.navigation,
|
|
405
405
|
className: "flex flex-col items-center gap-2",
|
|
406
|
-
children: [l ? p(/* @__PURE__ */
|
|
406
|
+
children: [l ? p(/* @__PURE__ */ I(oe, { children: [n ? /* @__PURE__ */ F(s, {
|
|
407
407
|
variant: "ghost",
|
|
408
408
|
size: "md",
|
|
409
409
|
label: i?.fit ?? c.map.controls.fit,
|
|
410
|
-
icon:
|
|
410
|
+
icon: y,
|
|
411
411
|
hideLabel: !0,
|
|
412
412
|
onClick: n
|
|
413
|
-
}) : null, r ? /* @__PURE__ */
|
|
413
|
+
}) : null, r ? /* @__PURE__ */ F(s, {
|
|
414
414
|
variant: "ghost",
|
|
415
415
|
size: "md",
|
|
416
416
|
label: i?.locate ?? c.map.controls.locate,
|
|
417
|
-
icon:
|
|
417
|
+
icon: b,
|
|
418
418
|
hideLabel: !0,
|
|
419
419
|
onClick: r
|
|
420
|
-
}) : null] })) : null, d ? p(/* @__PURE__ */
|
|
420
|
+
}) : null] })) : null, d ? p(/* @__PURE__ */ I(oe, { children: [e ? /* @__PURE__ */ F(s, {
|
|
421
421
|
variant: "ghost",
|
|
422
422
|
size: "md",
|
|
423
423
|
label: i?.zoomIn ?? c.map.controls.zoomIn,
|
|
424
|
-
icon:
|
|
424
|
+
icon: x,
|
|
425
425
|
hideLabel: !0,
|
|
426
426
|
onClick: e
|
|
427
|
-
}) : null, t ? /* @__PURE__ */
|
|
427
|
+
}) : null, t ? /* @__PURE__ */ F(s, {
|
|
428
428
|
variant: "ghost",
|
|
429
429
|
size: "md",
|
|
430
430
|
label: i?.zoomOut ?? c.map.controls.zoomOut,
|
|
@@ -435,10 +435,10 @@ var Te = L, R = (e, t) => `hsl(${ve(e, t).replace(/ /g, ", ")})`, z = (e, t) =>
|
|
|
435
435
|
})
|
|
436
436
|
});
|
|
437
437
|
});
|
|
438
|
-
|
|
438
|
+
Pe.displayName = "F0MapControls";
|
|
439
439
|
//#endregion
|
|
440
440
|
//#region src/addons/map/F0Map/components/F0MapList/F0MapList.tsx
|
|
441
|
-
var
|
|
441
|
+
var G = (e, t) => {
|
|
442
442
|
if (e.label) return e.label;
|
|
443
443
|
switch (e.variant) {
|
|
444
444
|
case "employee": return `${e.firstName} ${e.lastName}`.trim();
|
|
@@ -446,41 +446,41 @@ var Me = (e, t) => {
|
|
|
446
446
|
case "stop": return e.letter.charAt(0).toUpperCase();
|
|
447
447
|
default: return t;
|
|
448
448
|
}
|
|
449
|
-
},
|
|
449
|
+
}, Fe = O(function({ points: e, selectedId: t, onSelect: n, visible: r = !1, label: i, id: a, dataTestId: o, className: s }, c) {
|
|
450
450
|
let l = f(), d = i ?? l.map.listLabel;
|
|
451
|
-
return /* @__PURE__ */
|
|
451
|
+
return /* @__PURE__ */ F(u, {
|
|
452
452
|
dataTestId: o,
|
|
453
|
-
children: /* @__PURE__ */
|
|
453
|
+
children: /* @__PURE__ */ I("nav", {
|
|
454
454
|
ref: c,
|
|
455
455
|
id: a,
|
|
456
456
|
"aria-label": d,
|
|
457
457
|
tabIndex: -1,
|
|
458
458
|
className: p("outline-none", r ? "absolute inset-0 z-20 overflow-auto bg-f1-background p-4" : "sr-only", s),
|
|
459
|
-
children: [r ? /* @__PURE__ */
|
|
459
|
+
children: [r ? /* @__PURE__ */ F("h2", {
|
|
460
460
|
className: "text-f1-foreground mb-2 text-base font-medium",
|
|
461
461
|
children: d
|
|
462
|
-
}) : null, /* @__PURE__ */
|
|
462
|
+
}) : null, /* @__PURE__ */ F("ul", {
|
|
463
463
|
className: r ? "flex flex-col gap-0.5" : void 0,
|
|
464
|
-
children: e.map((e) => /* @__PURE__ */
|
|
464
|
+
children: e.map((e) => /* @__PURE__ */ F("li", { children: /* @__PURE__ */ F("button", {
|
|
465
465
|
type: "button",
|
|
466
466
|
"aria-current": e.id === t || void 0,
|
|
467
467
|
onClick: () => n(e.id),
|
|
468
468
|
className: p("w-full text-left", r && "text-f1-foreground hover:bg-f1-background-hover aria-[current=true]:bg-f1-background-selected rounded-md px-3 py-2 text-sm"),
|
|
469
|
-
children:
|
|
469
|
+
children: G(e, l.map.unnamedLocation)
|
|
470
470
|
}) }, e.id))
|
|
471
471
|
})]
|
|
472
472
|
})
|
|
473
473
|
});
|
|
474
474
|
});
|
|
475
|
-
|
|
475
|
+
Fe.displayName = "F0MapList";
|
|
476
476
|
//#endregion
|
|
477
477
|
//#region src/addons/map/F0Map/hooks/useClusters.ts
|
|
478
|
-
var
|
|
479
|
-
let [a, o] =
|
|
478
|
+
var Ie = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i = 164 }) => {
|
|
479
|
+
let [a, o] = P({
|
|
480
480
|
clusters: [],
|
|
481
481
|
singles: t
|
|
482
482
|
});
|
|
483
|
-
return
|
|
483
|
+
return j(() => {
|
|
484
484
|
if (!e || !n) {
|
|
485
485
|
o({
|
|
486
486
|
clusters: [],
|
|
@@ -555,13 +555,13 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
555
555
|
r,
|
|
556
556
|
i
|
|
557
557
|
]), a;
|
|
558
|
-
},
|
|
558
|
+
}, Le = 4, Re = 4, ze = [
|
|
559
559
|
"right",
|
|
560
560
|
"bottom",
|
|
561
561
|
"left",
|
|
562
562
|
"top"
|
|
563
|
-
],
|
|
564
|
-
let a =
|
|
563
|
+
], Be = 1.7, Ve = (e, t) => e.x < t.x + t.w && e.x + e.w > t.x && e.y < t.y + t.h && e.y + e.h > t.y, K = null, He = (e, t) => (!K && typeof document < "u" && (K = document.createElement("canvas").getContext("2d")), K ? (K.font = `600 ${t}px Inter, system-ui, sans-serif`, K.measureText(e).width) : e.length * t * .55), Ue = ({ placement: e, cx: t, cy: n, point: r, size: i }) => {
|
|
564
|
+
let a = L(i), o = He(r.label ?? "", a.label) + 2, s = a.d / 2;
|
|
565
565
|
if (e === "right" || e === "left") {
|
|
566
566
|
let r = o, i = a.lineH;
|
|
567
567
|
return {
|
|
@@ -571,22 +571,22 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
571
571
|
h: i
|
|
572
572
|
};
|
|
573
573
|
}
|
|
574
|
-
let c = Math.min(o, a.maxLabelW), l = Math.min(Math.ceil(o / a.maxLabelW),
|
|
574
|
+
let c = Math.min(o, a.maxLabelW), l = Math.min(Math.ceil(o / a.maxLabelW), Re) * a.lineH, u = a.gap + Le, d = e === "bottom" ? n + s + u : n - s - a.gap - l;
|
|
575
575
|
return {
|
|
576
576
|
x: t - c / 2,
|
|
577
577
|
y: d,
|
|
578
578
|
w: c,
|
|
579
579
|
h: l
|
|
580
580
|
};
|
|
581
|
-
},
|
|
582
|
-
let [r, i] =
|
|
583
|
-
return
|
|
581
|
+
}, We = (e, t, n = "md") => {
|
|
582
|
+
let [r, i] = P({});
|
|
583
|
+
return j(() => {
|
|
584
584
|
if (!e) {
|
|
585
585
|
i({});
|
|
586
586
|
return;
|
|
587
587
|
}
|
|
588
588
|
let r = 0, a = () => {
|
|
589
|
-
let r =
|
|
589
|
+
let r = L(n).d, a = [], o = [];
|
|
590
590
|
for (let n of t) {
|
|
591
591
|
let t = e.project(n.coordinates);
|
|
592
592
|
if (!t) return;
|
|
@@ -603,7 +603,7 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
603
603
|
let s = t.length, c = Array.from({ length: s }, (e, t) => t), l = (e) => {
|
|
604
604
|
for (; c[e] !== e;) e = c[e] = c[c[e]];
|
|
605
605
|
return e;
|
|
606
|
-
}, u = (r *
|
|
606
|
+
}, u = (r * Be) ** 2;
|
|
607
607
|
for (let e = 0; e < s; e++) for (let t = e + 1; t < s; t++) {
|
|
608
608
|
let n = o[e].x - o[t].x, r = o[e].y - o[t].y;
|
|
609
609
|
if (n * n + r * r <= u) {
|
|
@@ -615,15 +615,15 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
615
615
|
for (let e = 0; e < s; e++) {
|
|
616
616
|
let r = t[e];
|
|
617
617
|
if (!r.label) continue;
|
|
618
|
-
let i = o[e], s = "right", c = [s, ...
|
|
618
|
+
let i = o[e], s = "right", c = [s, ...ze.filter((e) => e !== s)], l = null;
|
|
619
619
|
for (let e of c) {
|
|
620
|
-
let t =
|
|
620
|
+
let t = Ue({
|
|
621
621
|
placement: e,
|
|
622
622
|
cx: i.x,
|
|
623
623
|
cy: i.y,
|
|
624
624
|
point: r,
|
|
625
625
|
size: n
|
|
626
|
-
}), o = a.some((e) =>
|
|
626
|
+
}), o = a.some((e) => Ve(t, e)), s = f.some((e) => Ve(t, e));
|
|
627
627
|
if (!o && !s) {
|
|
628
628
|
l = e, f.push(t);
|
|
629
629
|
break;
|
|
@@ -655,19 +655,19 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
655
655
|
t,
|
|
656
656
|
n
|
|
657
657
|
]), r;
|
|
658
|
-
},
|
|
659
|
-
let a =
|
|
658
|
+
}, q = 3, Ge = ({ adapter: e, el: t, markerRef: n, coordinates: r, drag: i }) => {
|
|
659
|
+
let a = N({
|
|
660
660
|
coordinates: r,
|
|
661
661
|
drag: i
|
|
662
662
|
});
|
|
663
|
-
|
|
663
|
+
ae(function() {
|
|
664
664
|
a.current = {
|
|
665
665
|
coordinates: r,
|
|
666
666
|
drag: i
|
|
667
667
|
};
|
|
668
668
|
});
|
|
669
669
|
let o = !!i;
|
|
670
|
-
|
|
670
|
+
j(function() {
|
|
671
671
|
if (!o) return;
|
|
672
672
|
let r = null, i = !1, s = null, c = (t) => r ? e.unproject({
|
|
673
673
|
x: r.at.x + t.clientX - r.x,
|
|
@@ -682,7 +682,7 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
682
682
|
}, u = (e) => {
|
|
683
683
|
if (!r) return;
|
|
684
684
|
let t = Math.hypot(e.clientX - r.x, e.clientY - r.y);
|
|
685
|
-
!i && t <
|
|
685
|
+
!i && t < q || (i = !0, s = c(e), s && (n.current?.setPosition(s), a.current.drag?.onDrag?.(s)));
|
|
686
686
|
}, d = (e) => {
|
|
687
687
|
t.releasePointerCapture?.(e.pointerId), t.style.setProperty("cursor", "grab"), r = null;
|
|
688
688
|
}, f = () => n.current?.setPosition(a.current.coordinates), p = (e) => {
|
|
@@ -701,9 +701,9 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
701
701
|
n,
|
|
702
702
|
o
|
|
703
703
|
]);
|
|
704
|
-
},
|
|
705
|
-
let [n, r] =
|
|
706
|
-
return
|
|
704
|
+
}, J = (e, t) => {
|
|
705
|
+
let [n, r] = P(() => e ? e.getZoom() >= t : !1);
|
|
706
|
+
return j(() => {
|
|
707
707
|
if (!e) {
|
|
708
708
|
r(!1);
|
|
709
709
|
return;
|
|
@@ -711,13 +711,13 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
711
711
|
let n = () => r(e.getZoom() >= t);
|
|
712
712
|
return n(), e.on("zoom", n);
|
|
713
713
|
}, [e, t]), n;
|
|
714
|
-
},
|
|
714
|
+
}, Ke = [
|
|
715
715
|
"default",
|
|
716
716
|
"workplace",
|
|
717
717
|
"employee",
|
|
718
718
|
"company",
|
|
719
719
|
"stop"
|
|
720
|
-
],
|
|
720
|
+
], qe = "malibu", Je = "radical", Ye = (e) => {
|
|
721
721
|
switch (e.variant) {
|
|
722
722
|
case "employee": return { variant: {
|
|
723
723
|
variant: "person",
|
|
@@ -735,20 +735,20 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
735
735
|
variant: "icon",
|
|
736
736
|
icon: _
|
|
737
737
|
},
|
|
738
|
-
color:
|
|
738
|
+
color: qe
|
|
739
739
|
};
|
|
740
740
|
case "stop": return {
|
|
741
741
|
variant: {
|
|
742
742
|
variant: "letter",
|
|
743
743
|
letter: e.letter
|
|
744
744
|
},
|
|
745
|
-
color:
|
|
745
|
+
color: Je
|
|
746
746
|
};
|
|
747
747
|
default: return { variant: { variant: "color" } };
|
|
748
748
|
}
|
|
749
|
-
},
|
|
750
|
-
let { variant: n, color: r } =
|
|
751
|
-
return /* @__PURE__ */
|
|
749
|
+
}, Xe = O(function(e, t) {
|
|
750
|
+
let { variant: n, color: r } = Ye(e);
|
|
751
|
+
return /* @__PURE__ */ F(Ee, {
|
|
752
752
|
ref: t,
|
|
753
753
|
...n,
|
|
754
754
|
color: r,
|
|
@@ -765,8 +765,8 @@ var Pe = ({ adapter: e, points: t, enabled: n, radius: r = 12, clusterRadius: i
|
|
|
765
765
|
className: e.className
|
|
766
766
|
});
|
|
767
767
|
});
|
|
768
|
-
|
|
769
|
-
var
|
|
768
|
+
Xe.displayName = "F0MapMarker";
|
|
769
|
+
var Y = Xe, Ze = 4, Qe = 3, $e = 1.3, et = 1.08, X = "cubic-bezier(0.16, 1, 0.3, 1)", tt = 72, nt = {
|
|
770
770
|
1: [[0, 0]],
|
|
771
771
|
2: [[-8, 0], [8, 0]],
|
|
772
772
|
3: [
|
|
@@ -780,17 +780,17 @@ var Je = qe, Ye = 4, Xe = 3, Ze = 1.3, J = 1.08, Qe = "cubic-bezier(0.16, 1, 0.3
|
|
|
780
780
|
[-8, 8],
|
|
781
781
|
[8, 8]
|
|
782
782
|
]
|
|
783
|
-
},
|
|
784
|
-
let s = f(), [c, l] =
|
|
783
|
+
}, rt = O(function({ count: e, members: t, onClick: n, ariaLabel: r, dataTestId: i, className: a }, o) {
|
|
784
|
+
let s = f(), [c, l] = P(!1), d = t.slice(0, e <= Ze ? Ze : Qe), m = Math.max(0, e - d.length), h = m > 0, g = m > 99 ? "+99" : `+${m}`, _ = nt[d.length + +!!h] ?? nt[4], v = c ? $e : 1, y = c ? et : 1, b = (e) => {
|
|
785
785
|
let [t, n] = _[e] ?? [0, 0];
|
|
786
786
|
return {
|
|
787
787
|
transform: `translate(${t * v}px, ${n * v}px) scale(${y})`,
|
|
788
|
-
transition: `transform 240ms ${
|
|
788
|
+
transition: `transform 240ms ${X}`
|
|
789
789
|
};
|
|
790
790
|
};
|
|
791
|
-
return /* @__PURE__ */
|
|
791
|
+
return /* @__PURE__ */ F(u, {
|
|
792
792
|
dataTestId: i,
|
|
793
|
-
children: /* @__PURE__ */
|
|
793
|
+
children: /* @__PURE__ */ I("div", {
|
|
794
794
|
ref: o,
|
|
795
795
|
role: "button",
|
|
796
796
|
tabIndex: 0,
|
|
@@ -805,41 +805,41 @@ var Je = qe, Ye = 4, Xe = 3, Ze = 1.3, J = 1.08, Qe = "cubic-bezier(0.16, 1, 0.3
|
|
|
805
805
|
onBlur: () => l(!1),
|
|
806
806
|
className: p("group relative h-0 w-0 cursor-pointer outline-none", a),
|
|
807
807
|
children: [
|
|
808
|
-
/* @__PURE__ */
|
|
808
|
+
/* @__PURE__ */ F("span", {
|
|
809
809
|
"aria-hidden": !0,
|
|
810
810
|
className: "absolute rounded-lg group-focus-visible:ring-1 group-focus-visible:ring-f1-special-ring group-focus-visible:ring-offset-1",
|
|
811
811
|
style: {
|
|
812
812
|
left: -36,
|
|
813
813
|
top: -36,
|
|
814
|
-
width:
|
|
815
|
-
height:
|
|
814
|
+
width: tt,
|
|
815
|
+
height: tt
|
|
816
816
|
}
|
|
817
817
|
}),
|
|
818
|
-
d.map((e, t) => /* @__PURE__ */
|
|
818
|
+
d.map((e, t) => /* @__PURE__ */ F("span", {
|
|
819
819
|
className: "absolute left-0 top-0 flex leading-none",
|
|
820
820
|
style: {
|
|
821
821
|
zIndex: t,
|
|
822
822
|
...b(t)
|
|
823
823
|
},
|
|
824
|
-
children: /* @__PURE__ */
|
|
824
|
+
children: /* @__PURE__ */ F(Y, {
|
|
825
825
|
...e,
|
|
826
826
|
showLabel: !1
|
|
827
827
|
})
|
|
828
828
|
}, t)),
|
|
829
829
|
h ? (() => {
|
|
830
830
|
let [e, t] = _[d.length] ?? [0, 0];
|
|
831
|
-
return /* @__PURE__ */
|
|
831
|
+
return /* @__PURE__ */ I("span", {
|
|
832
832
|
className: p("absolute left-0 top-0 flex h-6 min-w-6 items-center justify-center overflow-hidden rounded-full px-1.5", "border border-solid border-f1-border-secondary", "text-f1-foreground-secondary text-sm font-medium leading-none"),
|
|
833
833
|
style: {
|
|
834
|
-
zIndex:
|
|
834
|
+
zIndex: Qe,
|
|
835
835
|
backgroundColor: "hsl(var(--white-90))",
|
|
836
836
|
transform: `translate(${e * v}px, ${t * v}px) translate(-50%, -50%) scale(${y})`,
|
|
837
|
-
transition: `transform 240ms ${
|
|
837
|
+
transition: `transform 240ms ${X}`
|
|
838
838
|
},
|
|
839
|
-
children: [/* @__PURE__ */
|
|
839
|
+
children: [/* @__PURE__ */ F("span", {
|
|
840
840
|
"aria-hidden": !0,
|
|
841
841
|
className: "absolute inset-0 bg-f1-background-hover"
|
|
842
|
-
}), /* @__PURE__ */
|
|
842
|
+
}), /* @__PURE__ */ F("span", {
|
|
843
843
|
className: "relative",
|
|
844
844
|
children: g
|
|
845
845
|
})]
|
|
@@ -849,18 +849,18 @@ var Je = qe, Ye = 4, Xe = 3, Ze = 1.3, J = 1.08, Qe = "cubic-bezier(0.16, 1, 0.3
|
|
|
849
849
|
})
|
|
850
850
|
});
|
|
851
851
|
});
|
|
852
|
-
|
|
853
|
-
var
|
|
852
|
+
rt.displayName = "F0MapCluster";
|
|
853
|
+
var Z = rt, it = 16, Q = (e, t, n, r) => {
|
|
854
854
|
let i = e.project(t.coordinates);
|
|
855
855
|
if (!i) return null;
|
|
856
|
-
let a =
|
|
856
|
+
let a = L("xl"), o = L(r), s = i.y + Te(), c = {
|
|
857
857
|
x: i.x - a.d / 2,
|
|
858
858
|
y: s,
|
|
859
859
|
w: a.d,
|
|
860
860
|
h: a.d
|
|
861
|
-
}, l = t.label ?
|
|
861
|
+
}, l = t.label ? He(t.label, o.label) : 0, u = {
|
|
862
862
|
x: i.x - l / 2,
|
|
863
|
-
y: i.y +
|
|
863
|
+
y: i.y + R,
|
|
864
864
|
w: l,
|
|
865
865
|
h: o.lineH
|
|
866
866
|
}, d = o.d, f = /* @__PURE__ */ new Set();
|
|
@@ -873,18 +873,18 @@ var Y = tt, nt = 16, rt = (e, t, n, r) => {
|
|
|
873
873
|
w: d,
|
|
874
874
|
h: d
|
|
875
875
|
};
|
|
876
|
-
(
|
|
876
|
+
(Ve(r, c) || l > 0 && Ve(r, u)) && f.add(t.id);
|
|
877
877
|
}
|
|
878
878
|
return f;
|
|
879
|
-
},
|
|
880
|
-
let [i, a] =
|
|
881
|
-
return
|
|
879
|
+
}, at = (e, t, n, r) => {
|
|
880
|
+
let [i, a] = P(null);
|
|
881
|
+
return j(() => {
|
|
882
882
|
if (!t || !n.some((e) => e.id === t.id)) {
|
|
883
883
|
a(null);
|
|
884
884
|
return;
|
|
885
885
|
}
|
|
886
886
|
let i = 0, o = () => {
|
|
887
|
-
let i =
|
|
887
|
+
let i = Q(e, t, n.filter((e) => e.id !== t.id), r);
|
|
888
888
|
i && a((e) => e !== null && e.size === i.size && [...i].every((t) => e.has(t)) ? e : i);
|
|
889
889
|
}, s = () => {
|
|
890
890
|
cancelAnimationFrame(i), i = requestAnimationFrame(o);
|
|
@@ -900,35 +900,35 @@ var Y = tt, nt = 16, rt = (e, t, n, r) => {
|
|
|
900
900
|
n,
|
|
901
901
|
r
|
|
902
902
|
]), i;
|
|
903
|
-
},
|
|
903
|
+
}, ot = (e) => {
|
|
904
904
|
let { id: t, coordinates: n, label: r, draggable: i, ...a } = e;
|
|
905
905
|
return a;
|
|
906
|
-
},
|
|
907
|
-
let [a] =
|
|
908
|
-
return
|
|
906
|
+
}, $ = ({ adapter: e, coordinates: t, selected: n, drag: r, children: i }) => {
|
|
907
|
+
let [a] = P(() => document.createElement("div")), o = N(null);
|
|
908
|
+
return j(() => {
|
|
909
909
|
let n = (e) => e.stopPropagation();
|
|
910
910
|
a.style.cursor = "pointer", a.addEventListener("click", n);
|
|
911
911
|
let r = e.addDomMarker(a, t);
|
|
912
912
|
return o.current = r, () => {
|
|
913
913
|
a.removeEventListener("click", n), r.remove(), o.current = null;
|
|
914
914
|
};
|
|
915
|
-
}, [e, a]),
|
|
915
|
+
}, [e, a]), j(() => {
|
|
916
916
|
o.current?.setPosition(t);
|
|
917
|
-
}, [t]),
|
|
917
|
+
}, [t]), Ge({
|
|
918
918
|
adapter: e,
|
|
919
919
|
el: a,
|
|
920
920
|
markerRef: o,
|
|
921
921
|
coordinates: t,
|
|
922
922
|
drag: r
|
|
923
|
-
}),
|
|
923
|
+
}), j(() => {
|
|
924
924
|
a.style.zIndex = n ? "2" : "";
|
|
925
|
-
}, [a, n]),
|
|
926
|
-
},
|
|
927
|
-
let u = f(), d = !!s, p =
|
|
925
|
+
}, [a, n]), se(i, a);
|
|
926
|
+
}, st = ({ adapter: e, points: t, selectedId: n, highlightedId: r, onSelect: i, onMarkerDrag: a, onMarkerDragEnd: s, onClusterExpand: l }) => {
|
|
927
|
+
let u = f(), d = !!s, p = M(() => d ? t.filter((e) => !e.draggable) : t, [t, d]), m = Ie({
|
|
928
928
|
adapter: e,
|
|
929
929
|
points: p,
|
|
930
930
|
enabled: !0
|
|
931
|
-
}), { clusters: h } = m, g =
|
|
931
|
+
}), { clusters: h } = m, g = M(() => {
|
|
932
932
|
if (p === t) return m.singles;
|
|
933
933
|
let e = new Set(m.singles);
|
|
934
934
|
return t.filter((t) => t.draggable || e.has(t));
|
|
@@ -936,12 +936,12 @@ var Y = tt, nt = 16, rt = (e, t, n, r) => {
|
|
|
936
936
|
m.singles,
|
|
937
937
|
p,
|
|
938
938
|
t
|
|
939
|
-
]), _ =
|
|
940
|
-
return /* @__PURE__ */
|
|
939
|
+
]), _ = J(e, it) ? "lg" : "md", v = We(e, g, _), y = new Map(t.map((e) => [e.id, e])), b = h.length > 0, x = at(e, n ? y.get(n) : void 0, g, _);
|
|
940
|
+
return /* @__PURE__ */ I(o, { children: [h.map((t) => /* @__PURE__ */ F($, {
|
|
941
941
|
adapter: e,
|
|
942
942
|
coordinates: t.coordinates,
|
|
943
943
|
selected: !1,
|
|
944
|
-
children: /* @__PURE__ */
|
|
944
|
+
children: /* @__PURE__ */ F(c.span, {
|
|
945
945
|
initial: {
|
|
946
946
|
scale: .8,
|
|
947
947
|
opacity: 0
|
|
@@ -965,15 +965,15 @@ var Y = tt, nt = 16, rt = (e, t, n, r) => {
|
|
|
965
965
|
]
|
|
966
966
|
},
|
|
967
967
|
className: "absolute left-0 top-0 flex leading-none",
|
|
968
|
-
children: /* @__PURE__ */
|
|
968
|
+
children: /* @__PURE__ */ F(Z, {
|
|
969
969
|
count: t.count,
|
|
970
|
-
members: t.pointIds.map((e) => y.get(e)).filter((e) => !!e).map(
|
|
970
|
+
members: t.pointIds.map((e) => y.get(e)).filter((e) => !!e).map(ot),
|
|
971
971
|
onClick: () => l(t.bounds)
|
|
972
972
|
})
|
|
973
973
|
})
|
|
974
974
|
}, t.id)), g.map((t) => {
|
|
975
975
|
let l = v[t.id], d = x?.has(t.id) ?? !1, f = r === t.id;
|
|
976
|
-
return /* @__PURE__ */
|
|
976
|
+
return /* @__PURE__ */ F($, {
|
|
977
977
|
adapter: e,
|
|
978
978
|
coordinates: t.coordinates,
|
|
979
979
|
selected: n === t.id || f,
|
|
@@ -981,7 +981,7 @@ var Y = tt, nt = 16, rt = (e, t, n, r) => {
|
|
|
981
981
|
onDrag: a && ((e) => a(t.id, e)),
|
|
982
982
|
onDragEnd: (e) => s(t.id, e)
|
|
983
983
|
} : void 0,
|
|
984
|
-
children: /* @__PURE__ */
|
|
984
|
+
children: /* @__PURE__ */ F(c.span, {
|
|
985
985
|
initial: { opacity: 0 },
|
|
986
986
|
animate: { opacity: 1 },
|
|
987
987
|
exit: {
|
|
@@ -996,9 +996,9 @@ var Y = tt, nt = 16, rt = (e, t, n, r) => {
|
|
|
996
996
|
ease: "easeOut"
|
|
997
997
|
},
|
|
998
998
|
className: "absolute left-0 top-0",
|
|
999
|
-
children: /* @__PURE__ */
|
|
999
|
+
children: /* @__PURE__ */ F(o, {
|
|
1000
1000
|
initial: !1,
|
|
1001
|
-
children: /* @__PURE__ */
|
|
1001
|
+
children: /* @__PURE__ */ F(c.span, {
|
|
1002
1002
|
initial: { opacity: 0 },
|
|
1003
1003
|
animate: { opacity: 1 },
|
|
1004
1004
|
exit: { opacity: 0 },
|
|
@@ -1007,8 +1007,8 @@ var Y = tt, nt = 16, rt = (e, t, n, r) => {
|
|
|
1007
1007
|
ease: "easeOut"
|
|
1008
1008
|
},
|
|
1009
1009
|
className: "absolute left-0 top-0 flex leading-none",
|
|
1010
|
-
children: /* @__PURE__ */
|
|
1011
|
-
...
|
|
1010
|
+
children: /* @__PURE__ */ F(Y, {
|
|
1011
|
+
...ot(t),
|
|
1012
1012
|
size: _,
|
|
1013
1013
|
label: t.label,
|
|
1014
1014
|
showLabel: n === t.id || f || !b && l !== null,
|
|
@@ -1024,8 +1024,8 @@ var Y = tt, nt = 16, rt = (e, t, n, r) => {
|
|
|
1024
1024
|
})
|
|
1025
1025
|
}, t.id);
|
|
1026
1026
|
})] });
|
|
1027
|
-
},
|
|
1028
|
-
let m = f(),
|
|
1027
|
+
}, ct = ({ children: e, open: t, offsetX: n, offsetY: r = U.inset, width: i, entrance: o = "slide", headerStart: s, headerEnd: c, ariaLabel: l, dataTestId: d }) => {
|
|
1028
|
+
let m = f(), g = a(), _ = t ? W.enter : W.exit, v = n - U.inset, y = N({
|
|
1029
1029
|
from: v,
|
|
1030
1030
|
to: v
|
|
1031
1031
|
});
|
|
@@ -1033,48 +1033,48 @@ var Y = tt, nt = 16, rt = (e, t, n, r) => {
|
|
|
1033
1033
|
from: y.current.to,
|
|
1034
1034
|
to: v
|
|
1035
1035
|
});
|
|
1036
|
-
let b = v > y.current.from ?
|
|
1037
|
-
return /* @__PURE__ */
|
|
1036
|
+
let b = v > y.current.from ? W.enter : W.exit, x = o === "grow" ? "translateX(-10%) scale(0.97)" : `translateX(calc(-100% - ${U.inset}px))`;
|
|
1037
|
+
return /* @__PURE__ */ F(u, {
|
|
1038
1038
|
dataTestId: d,
|
|
1039
|
-
children: /* @__PURE__ */
|
|
1039
|
+
children: /* @__PURE__ */ F("div", {
|
|
1040
1040
|
className: "pointer-events-none absolute bottom-2 z-10",
|
|
1041
1041
|
style: {
|
|
1042
|
-
left:
|
|
1042
|
+
left: U.inset,
|
|
1043
1043
|
top: r,
|
|
1044
1044
|
width: i,
|
|
1045
1045
|
transform: `translateX(${v}px)`,
|
|
1046
|
-
transitionProperty:
|
|
1046
|
+
transitionProperty: g ? "none" : "transform, top",
|
|
1047
1047
|
transitionDuration: b.duration,
|
|
1048
1048
|
transitionTimingFunction: b.easing
|
|
1049
1049
|
},
|
|
1050
|
-
children: /* @__PURE__ */
|
|
1050
|
+
children: /* @__PURE__ */ F("div", {
|
|
1051
1051
|
role: "complementary",
|
|
1052
1052
|
"aria-label": l ?? m.map.panel,
|
|
1053
1053
|
ref: (e) => {
|
|
1054
1054
|
t ? e?.removeAttribute("inert") : e?.setAttribute("inert", "");
|
|
1055
1055
|
},
|
|
1056
|
-
className: p("relative h-full overflow-hidden text-base",
|
|
1056
|
+
className: p("relative h-full overflow-hidden text-base", je(H.panel), t ? "pointer-events-auto" : "opacity-0"),
|
|
1057
1057
|
style: {
|
|
1058
|
-
transform: t ||
|
|
1058
|
+
transform: t || g ? "translateX(0px) scale(1)" : x,
|
|
1059
1059
|
transformOrigin: o === "grow" ? "left center" : void 0,
|
|
1060
|
-
transitionProperty:
|
|
1060
|
+
transitionProperty: g ? "opacity" : "transform, opacity",
|
|
1061
1061
|
transitionDuration: _.duration,
|
|
1062
1062
|
transitionTimingFunction: _.easing
|
|
1063
1063
|
},
|
|
1064
|
-
children: /* @__PURE__ */
|
|
1065
|
-
...
|
|
1066
|
-
borderRadius:
|
|
1064
|
+
children: /* @__PURE__ */ F(h, {
|
|
1065
|
+
...ke,
|
|
1066
|
+
borderRadius: H.panel,
|
|
1067
1067
|
padding: "none",
|
|
1068
1068
|
height: "full",
|
|
1069
|
-
children: /* @__PURE__ */
|
|
1069
|
+
children: /* @__PURE__ */ I("div", {
|
|
1070
1070
|
className: "flex h-full flex-col",
|
|
1071
|
-
children: [s || c ? /* @__PURE__ */
|
|
1071
|
+
children: [s || c ? /* @__PURE__ */ I("div", {
|
|
1072
1072
|
className: "flex shrink-0 items-center justify-between gap-1 p-0.5",
|
|
1073
|
-
children: [/* @__PURE__ */
|
|
1073
|
+
children: [/* @__PURE__ */ F("div", {
|
|
1074
1074
|
className: "flex min-w-0 flex-1 justify-start",
|
|
1075
1075
|
children: s
|
|
1076
1076
|
}), c]
|
|
1077
|
-
}) : null, /* @__PURE__ */
|
|
1077
|
+
}) : null, /* @__PURE__ */ F("div", {
|
|
1078
1078
|
className: "min-h-0 flex-1",
|
|
1079
1079
|
children: e
|
|
1080
1080
|
})]
|
|
@@ -1083,11 +1083,147 @@ var Y = tt, nt = 16, rt = (e, t, n, r) => {
|
|
|
1083
1083
|
})
|
|
1084
1084
|
})
|
|
1085
1085
|
});
|
|
1086
|
-
},
|
|
1087
|
-
|
|
1086
|
+
}, lt = (e, t, n = 320) => Math.max(216, Math.min(n, e - t - te.mainHardMin)), ut = (e, t = 320) => Math.min(t, Math.max(216, Math.round(e))), dt = 500, ft = "f0-secondary-sidebar-width", pt = (e) => e === null || typeof e == "number" && Number.isFinite(e), mt = D(null), ht = () => A(mt);
|
|
1087
|
+
function gt() {
|
|
1088
|
+
let [e, t] = P(!1), n = N(0), r = k(function() {
|
|
1089
|
+
t(!0), cancelAnimationFrame(n.current), n.current = requestAnimationFrame(function() {
|
|
1090
|
+
n.current = requestAnimationFrame(function() {
|
|
1091
|
+
t(!1);
|
|
1092
|
+
});
|
|
1093
|
+
});
|
|
1094
|
+
}, []);
|
|
1095
|
+
return j(function() {
|
|
1096
|
+
return () => cancelAnimationFrame(n.current);
|
|
1097
|
+
}, []), {
|
|
1098
|
+
isInstant: e,
|
|
1099
|
+
landInstantly: r
|
|
1100
|
+
};
|
|
1101
|
+
}
|
|
1102
|
+
function _t() {
|
|
1103
|
+
let [e, t] = P(() => window.innerWidth);
|
|
1104
|
+
return j(function() {
|
|
1105
|
+
let e = () => t(window.innerWidth);
|
|
1106
|
+
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
1107
|
+
}, []), e;
|
|
1108
|
+
}
|
|
1109
|
+
function vt({ enabled: e, children: t, ...n }) {
|
|
1110
|
+
return e ? /* @__PURE__ */ F(yt, {
|
|
1111
|
+
...n,
|
|
1112
|
+
children: t
|
|
1113
|
+
}) : /* @__PURE__ */ F(mt.Provider, {
|
|
1114
|
+
value: null,
|
|
1115
|
+
children: t
|
|
1116
|
+
});
|
|
1117
|
+
}
|
|
1118
|
+
function yt({ hasSecondarySidebar: e, topBarHeight: t, children: n }) {
|
|
1119
|
+
let { isInstant: r, landInstantly: a } = gt(), o = _t(), [s, c] = P(ne.primary), [l, u] = P(ne.panel), [d, f] = v({
|
|
1120
|
+
key: ft,
|
|
1121
|
+
fallback: null,
|
|
1122
|
+
validate: pt,
|
|
1123
|
+
debounceMs: 200
|
|
1124
|
+
}), p = lt(o, s, Math.max(320, l)), m = Math.min(l, p), h = d === null ? m : ut(d, p), g = k(function(e) {
|
|
1125
|
+
c(e);
|
|
1126
|
+
}, []), _ = N(l), y = k(function(e) {
|
|
1127
|
+
e !== _.current && (_.current = e, a(), u(e));
|
|
1128
|
+
}, [a]), b = k(function(e) {
|
|
1129
|
+
a(), f(e);
|
|
1130
|
+
}, [a, f]), x = k(function() {
|
|
1131
|
+
a(), f(null);
|
|
1132
|
+
}, [a, f]), S = i(`(max-width: ${s + (e ? m : ne.panel) + te.mainMin - 1}px)`, { initializeWithValue: !0 }) ? "overlay" : "docked", [ee, C] = P(!1), w = N(0), T = k(function() {
|
|
1133
|
+
C(!1);
|
|
1134
|
+
}, []);
|
|
1135
|
+
ae(function() {
|
|
1136
|
+
a(), S === "docked" && T();
|
|
1137
|
+
}, [
|
|
1138
|
+
S,
|
|
1139
|
+
a,
|
|
1140
|
+
T
|
|
1141
|
+
]);
|
|
1142
|
+
let E = S === "overlay" && ee && e;
|
|
1143
|
+
ae(function() {
|
|
1144
|
+
a(), e || T();
|
|
1145
|
+
}, [
|
|
1146
|
+
e,
|
|
1147
|
+
a,
|
|
1148
|
+
T
|
|
1149
|
+
]);
|
|
1150
|
+
let D = N(e);
|
|
1151
|
+
ae(function() {
|
|
1152
|
+
D.current = e;
|
|
1153
|
+
});
|
|
1154
|
+
let O = N(null);
|
|
1155
|
+
j(function() {
|
|
1156
|
+
return () => {
|
|
1157
|
+
O.current && clearTimeout(O.current);
|
|
1158
|
+
};
|
|
1159
|
+
}, []);
|
|
1160
|
+
let A = k(function() {
|
|
1161
|
+
S !== "docked" && (w.current = Date.now(), C(!0), O.current && clearTimeout(O.current), O.current = setTimeout(function() {
|
|
1162
|
+
D.current || C(!1);
|
|
1163
|
+
}, dt));
|
|
1164
|
+
}, [S]), re = T, ie = k(function() {
|
|
1165
|
+
E || (w.current = Date.now()), C(!E);
|
|
1166
|
+
}, [E]);
|
|
1167
|
+
j(function() {
|
|
1168
|
+
if (!E) return;
|
|
1169
|
+
let e = (e) => {
|
|
1170
|
+
e.key === "Escape" && !e.defaultPrevented && C(!1);
|
|
1171
|
+
};
|
|
1172
|
+
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
1173
|
+
}, [E]);
|
|
1174
|
+
let oe = k(function() {
|
|
1175
|
+
Date.now() - w.current < dt || C(!1);
|
|
1176
|
+
}, []), I = M(function() {
|
|
1177
|
+
return {
|
|
1178
|
+
primarySidebarWidth: s,
|
|
1179
|
+
reportPrimarySidebarWidth: g,
|
|
1180
|
+
hasSecondarySidebar: e,
|
|
1181
|
+
secondarySidebarWidth: h,
|
|
1182
|
+
secondarySidebarMaxWidth: p,
|
|
1183
|
+
declareSecondarySidebarWidth: y,
|
|
1184
|
+
resizeSecondarySidebar: b,
|
|
1185
|
+
resetSecondarySidebarWidth: x,
|
|
1186
|
+
navigationMode: S,
|
|
1187
|
+
isOpenOverPage: E,
|
|
1188
|
+
openOverPage: A,
|
|
1189
|
+
toggleOverPage: ie,
|
|
1190
|
+
closeOverPage: re,
|
|
1191
|
+
closeOverPageAfterRouteChange: oe,
|
|
1192
|
+
topBarHeight: t,
|
|
1193
|
+
isInstant: r,
|
|
1194
|
+
landInstantly: a
|
|
1195
|
+
};
|
|
1196
|
+
}, [
|
|
1197
|
+
s,
|
|
1198
|
+
g,
|
|
1199
|
+
e,
|
|
1200
|
+
h,
|
|
1201
|
+
p,
|
|
1202
|
+
y,
|
|
1203
|
+
b,
|
|
1204
|
+
x,
|
|
1205
|
+
S,
|
|
1206
|
+
E,
|
|
1207
|
+
A,
|
|
1208
|
+
ie,
|
|
1209
|
+
re,
|
|
1210
|
+
oe,
|
|
1211
|
+
t,
|
|
1212
|
+
r,
|
|
1213
|
+
a
|
|
1214
|
+
]);
|
|
1215
|
+
return /* @__PURE__ */ F(mt.Provider, {
|
|
1216
|
+
value: I,
|
|
1217
|
+
children: n
|
|
1218
|
+
});
|
|
1219
|
+
}
|
|
1220
|
+
//#endregion
|
|
1221
|
+
//#region src/blocks/ApplicationFrame/FrameProvider.tsx
|
|
1222
|
+
var bt = "one_sidebar_locked", xt = D(void 0), St = /* @__PURE__ */ new WeakSet(), Ct = (e) => {
|
|
1223
|
+
St.add(e.nativeEvent);
|
|
1088
1224
|
};
|
|
1089
|
-
function
|
|
1090
|
-
let e =
|
|
1225
|
+
function wt() {
|
|
1226
|
+
let e = A(xt);
|
|
1091
1227
|
return e === void 0 ? {
|
|
1092
1228
|
isSmallScreen: !1,
|
|
1093
1229
|
isLastToggleInvokedByUser: !0,
|
|
@@ -1096,64 +1232,97 @@ function ut() {
|
|
|
1096
1232
|
toggleSidebar: () => {},
|
|
1097
1233
|
hideSidebar: () => {},
|
|
1098
1234
|
setForceFloat: () => {},
|
|
1099
|
-
|
|
1100
|
-
hasRail: !1,
|
|
1101
|
-
setRailWidth: () => {}
|
|
1235
|
+
hasPrimarySidebar: !1
|
|
1102
1236
|
} : e;
|
|
1103
1237
|
}
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1238
|
+
var Tt = (e, t) => e.navigationMode === "overlay" ? e.isOpenOverPage ? "unlocked" : "hidden" : t ? "locked" : "hidden", Et = (e, t, n) => e || !t ? n ? "unlocked" : "hidden" : "locked";
|
|
1239
|
+
function Dt({ children: e }) {
|
|
1240
|
+
let { currentPath: t } = d(), n = ht(), [r, a] = P(!1), [o, s] = P(!1), c = r ? T.xl : T.md, l = i(`(max-width: ${c}px)`, { initializeWithValue: !0 }), [u, f] = P(() => {
|
|
1241
|
+
let e = localStorage.getItem(bt);
|
|
1107
1242
|
return e === null || !!e;
|
|
1108
|
-
}), [
|
|
1109
|
-
|
|
1243
|
+
}), [p, m] = P(!1), [h, g] = P(null), _ = k(function() {
|
|
1244
|
+
n ? n.closeOverPage() : m(!1);
|
|
1245
|
+
}, [n]), v = k(function({ isInvokedByUser: e } = { isInvokedByUser: !0 }) {
|
|
1246
|
+
n?.navigationMode === "overlay" ? n.toggleOverPage() : (s(e ?? !0), l && !n && m(!p), f(!u));
|
|
1110
1247
|
}, [
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
f,
|
|
1248
|
+
n,
|
|
1249
|
+
l,
|
|
1114
1250
|
p,
|
|
1115
|
-
|
|
1116
|
-
]),
|
|
1117
|
-
|
|
1251
|
+
u
|
|
1252
|
+
]), y = k(function(e) {
|
|
1253
|
+
l || n || St.has(e.nativeEvent) || (e.clientX < 32 && m(!0), e.clientX > 280 && m(!1));
|
|
1254
|
+
}, [l, n]), b = n ? Tt(n, u) : Et(l, u, p), x = n?.closeOverPageAfterRouteChange;
|
|
1255
|
+
j(function() {
|
|
1256
|
+
m(!1), x?.();
|
|
1257
|
+
}, [t, x]), j(function() {
|
|
1258
|
+
o && localStorage.setItem(bt, u ? "1" : "");
|
|
1259
|
+
}, [u, o]), j(function() {
|
|
1260
|
+
return () => {
|
|
1261
|
+
g(b);
|
|
1262
|
+
};
|
|
1263
|
+
}, [b]);
|
|
1264
|
+
let S = n !== null, ee = M(function() {
|
|
1265
|
+
return {
|
|
1266
|
+
isSmallScreen: l,
|
|
1267
|
+
isLastToggleInvokedByUser: o,
|
|
1268
|
+
sidebarState: b,
|
|
1269
|
+
hideSidebar: _,
|
|
1270
|
+
toggleSidebar: v,
|
|
1271
|
+
prevSidebarState: h,
|
|
1272
|
+
setForceFloat: a,
|
|
1273
|
+
hasPrimarySidebar: S
|
|
1274
|
+
};
|
|
1118
1275
|
}, [
|
|
1119
|
-
|
|
1276
|
+
l,
|
|
1277
|
+
o,
|
|
1278
|
+
b,
|
|
1279
|
+
_,
|
|
1280
|
+
v,
|
|
1120
1281
|
h,
|
|
1121
|
-
|
|
1122
|
-
]), x = D(() => u ? m ? "unlocked" : "hidden" : !f && !m ? "hidden" : !f && m ? "unlocked" : "locked", [
|
|
1123
|
-
u,
|
|
1124
|
-
m,
|
|
1125
|
-
f
|
|
1282
|
+
S
|
|
1126
1283
|
]);
|
|
1127
|
-
return
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
}, [f, s]), E(() => () => {
|
|
1132
|
-
_(x);
|
|
1133
|
-
}, [x]), /* @__PURE__ */ A(Q.Provider, {
|
|
1134
|
-
value: {
|
|
1135
|
-
isSmallScreen: u,
|
|
1136
|
-
isLastToggleInvokedByUser: s,
|
|
1137
|
-
sidebarState: x,
|
|
1138
|
-
hideSidebar: v,
|
|
1139
|
-
toggleSidebar: y,
|
|
1140
|
-
prevSidebarState: g,
|
|
1141
|
-
setForceFloat: r,
|
|
1142
|
-
railWidth: a,
|
|
1143
|
-
hasRail: a > 0,
|
|
1144
|
-
setRailWidth: o
|
|
1145
|
-
},
|
|
1146
|
-
children: /* @__PURE__ */ A("div", {
|
|
1147
|
-
onPointerMove: b,
|
|
1284
|
+
return /* @__PURE__ */ F(xt.Provider, {
|
|
1285
|
+
value: ee,
|
|
1286
|
+
children: /* @__PURE__ */ F("div", {
|
|
1287
|
+
onPointerMove: y,
|
|
1148
1288
|
className: "h-screen w-screen",
|
|
1149
1289
|
children: e
|
|
1150
1290
|
})
|
|
1151
1291
|
});
|
|
1152
1292
|
}
|
|
1153
1293
|
//#endregion
|
|
1154
|
-
//#region src/blocks/
|
|
1155
|
-
|
|
1156
|
-
|
|
1294
|
+
//#region src/blocks/ApplicationFrame/layoutTransition.ts
|
|
1295
|
+
var { duration: Ot, ease: kt, settleMs: At } = w, jt = At, Mt = {
|
|
1296
|
+
duration: Ot.base,
|
|
1297
|
+
ease: kt.outSwift
|
|
1298
|
+
}, Nt = {
|
|
1299
|
+
duration: Ot.reveal,
|
|
1300
|
+
ease: kt.outSwift
|
|
1301
|
+
}, Pt = { duration: 0 }, Ft = (e, t = !1) => e || t ? Pt : Mt, It = (e, t, n = !1) => e || n ? Pt : t ? Nt : Mt, Lt = ({ coversFrame: e, isFullscreen: t, isClosingFromFullscreen: n, isActivePanel: r, reservedWidth: i }) => e || (t || n) && r ? "100%" : i, Rt = "duration-base ease-out-swift motion-reduce:transition-none", zt = D("classic"), Bt = zt.Provider, Vt = () => A(zt), Ht = "M10.417 10L14.167 10M10.417 10L12.0837 8.33337M10.417 10L12.0837 11.6667", Ut = {
|
|
1302
|
+
open: {
|
|
1303
|
+
rest: {
|
|
1304
|
+
arrow: "opacity-0 translate-x-0",
|
|
1305
|
+
line: "opacity-100 translate-x-0"
|
|
1306
|
+
},
|
|
1307
|
+
hover: {
|
|
1308
|
+
arrow: "opacity-100 -translate-x-1",
|
|
1309
|
+
line: "opacity-0 -translate-x-0.5"
|
|
1310
|
+
}
|
|
1311
|
+
},
|
|
1312
|
+
closed: {
|
|
1313
|
+
rest: {
|
|
1314
|
+
arrow: "opacity-100 translate-x-0",
|
|
1315
|
+
line: "opacity-0 -translate-x-0.5"
|
|
1316
|
+
},
|
|
1317
|
+
hover: {
|
|
1318
|
+
arrow: "opacity-100 translate-x-[3px]",
|
|
1319
|
+
line: "opacity-100 translate-x-0"
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
}, Wt = "[transform-box:view-box] transition-[transform,opacity]";
|
|
1323
|
+
function Gt({ isExpanded: e, isHovered: t = !1 }) {
|
|
1324
|
+
let n = Ut[e ? "open" : "closed"][t ? "hover" : "rest"];
|
|
1325
|
+
return /* @__PURE__ */ I("svg", {
|
|
1157
1326
|
width: "20",
|
|
1158
1327
|
height: "20",
|
|
1159
1328
|
viewBox: "0 0 20 20",
|
|
@@ -1161,7 +1330,7 @@ function ft({ isExpanded: e }) {
|
|
|
1161
1330
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1162
1331
|
className: "text-f1-icon-bold",
|
|
1163
1332
|
children: [
|
|
1164
|
-
/* @__PURE__ */
|
|
1333
|
+
/* @__PURE__ */ F("rect", {
|
|
1165
1334
|
id: "container",
|
|
1166
1335
|
x: "3.33325",
|
|
1167
1336
|
y: "5",
|
|
@@ -1171,7 +1340,72 @@ function ft({ isExpanded: e }) {
|
|
|
1171
1340
|
strokeWidth: "1.3",
|
|
1172
1341
|
className: "stroke-current"
|
|
1173
1342
|
}),
|
|
1174
|
-
/* @__PURE__ */
|
|
1343
|
+
/* @__PURE__ */ F("path", {
|
|
1344
|
+
id: "arrow",
|
|
1345
|
+
d: Ht,
|
|
1346
|
+
strokeWidth: "1.3",
|
|
1347
|
+
strokeLinecap: "round",
|
|
1348
|
+
strokeLinejoin: "round",
|
|
1349
|
+
className: p("stroke-current", Wt, Rt, "origin-[10.5835px_10px]", e ? "scale-x-100" : "-scale-x-100", n.arrow)
|
|
1350
|
+
}),
|
|
1351
|
+
/* @__PURE__ */ F("path", {
|
|
1352
|
+
id: "line",
|
|
1353
|
+
d: "M7.5 5L7.5 15",
|
|
1354
|
+
strokeWidth: "1.3",
|
|
1355
|
+
strokeLinecap: "round",
|
|
1356
|
+
className: p("stroke-current", Wt, Rt, n.line)
|
|
1357
|
+
})
|
|
1358
|
+
]
|
|
1359
|
+
});
|
|
1360
|
+
}
|
|
1361
|
+
function Kt() {
|
|
1362
|
+
let { prevSidebarState: e, sidebarState: t, toggleSidebar: n } = wt(), i = N(null), [a, o] = P(!1), s = Vt() === "two-level";
|
|
1363
|
+
j(function() {
|
|
1364
|
+
s && e === "hidden" && t !== "hidden" && i.current?.focus();
|
|
1365
|
+
}, [
|
|
1366
|
+
s,
|
|
1367
|
+
e,
|
|
1368
|
+
t
|
|
1369
|
+
]);
|
|
1370
|
+
let c = f(), l = t !== "hidden", u = l ? c.navigation.sidebar.closePanel : c.navigation.sidebar.openPanel;
|
|
1371
|
+
return /* @__PURE__ */ F(r, {
|
|
1372
|
+
variant: "ghost",
|
|
1373
|
+
size: "md",
|
|
1374
|
+
onClick: () => n(),
|
|
1375
|
+
className: "hover:bg-f1-background-hover",
|
|
1376
|
+
title: u,
|
|
1377
|
+
ref: i,
|
|
1378
|
+
compact: !0,
|
|
1379
|
+
"aria-label": u,
|
|
1380
|
+
"aria-expanded": l,
|
|
1381
|
+
onMouseEnter: () => o(!0),
|
|
1382
|
+
onMouseLeave: () => o(!1),
|
|
1383
|
+
children: /* @__PURE__ */ F(Gt, {
|
|
1384
|
+
isExpanded: l,
|
|
1385
|
+
isHovered: a
|
|
1386
|
+
})
|
|
1387
|
+
});
|
|
1388
|
+
}
|
|
1389
|
+
function qt({ isExpanded: e }) {
|
|
1390
|
+
return /* @__PURE__ */ I("svg", {
|
|
1391
|
+
width: "20",
|
|
1392
|
+
height: "20",
|
|
1393
|
+
viewBox: "0 0 20 20",
|
|
1394
|
+
fill: "none",
|
|
1395
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1396
|
+
className: "text-f1-icon-bold",
|
|
1397
|
+
children: [
|
|
1398
|
+
/* @__PURE__ */ F("rect", {
|
|
1399
|
+
id: "container",
|
|
1400
|
+
x: "3.33325",
|
|
1401
|
+
y: "5",
|
|
1402
|
+
width: "13.3333",
|
|
1403
|
+
height: "10",
|
|
1404
|
+
rx: "3",
|
|
1405
|
+
strokeWidth: "1.3",
|
|
1406
|
+
className: "stroke-current"
|
|
1407
|
+
}),
|
|
1408
|
+
/* @__PURE__ */ F("path", {
|
|
1175
1409
|
id: "arrow",
|
|
1176
1410
|
d: e ? "M10.417 10L14.167 10M10.417 10L12.0837 8.33337M10.417 10L12.0837 11.6667" : "M10.75 10L7 10M10.75 10L9.08333 8.33337M10.75 10L9.08333 11.6667",
|
|
1177
1411
|
strokeWidth: "1.3",
|
|
@@ -1179,7 +1413,7 @@ function ft({ isExpanded: e }) {
|
|
|
1179
1413
|
strokeLinejoin: "round",
|
|
1180
1414
|
className: p("translate-x-0 stroke-current transition-all duration-200 ease-out motion-reduce:transition-none", e ? "opacity-0 group-hover:-translate-x-1 group-hover:opacity-100" : "opacity-1 group-hover:translate-x-[3px]")
|
|
1181
1415
|
}),
|
|
1182
|
-
/* @__PURE__ */
|
|
1416
|
+
/* @__PURE__ */ F("path", {
|
|
1183
1417
|
id: "line",
|
|
1184
1418
|
d: "M7.5 5L7.5 15",
|
|
1185
1419
|
strokeWidth: "1.3",
|
|
@@ -1189,11 +1423,11 @@ function ft({ isExpanded: e }) {
|
|
|
1189
1423
|
]
|
|
1190
1424
|
});
|
|
1191
1425
|
}
|
|
1192
|
-
function
|
|
1193
|
-
let { prevSidebarState: e, sidebarState: t, toggleSidebar: n, isSmallScreen: i } =
|
|
1194
|
-
return
|
|
1426
|
+
function Jt() {
|
|
1427
|
+
let { prevSidebarState: e, sidebarState: t, toggleSidebar: n, isSmallScreen: i } = wt(), a = N(null);
|
|
1428
|
+
return j(() => {
|
|
1195
1429
|
e === "hidden" && t === "locked" && a.current?.focus();
|
|
1196
|
-
}, [e, t]), /* @__PURE__ */
|
|
1430
|
+
}, [e, t]), /* @__PURE__ */ I(r, {
|
|
1197
1431
|
variant: "ghost",
|
|
1198
1432
|
size: "md",
|
|
1199
1433
|
onClick: () => n(),
|
|
@@ -1202,22 +1436,26 @@ function pt() {
|
|
|
1202
1436
|
ref: a,
|
|
1203
1437
|
compact: !0,
|
|
1204
1438
|
"aria-label": "Close Sidebar",
|
|
1205
|
-
children: [/* @__PURE__ */
|
|
1439
|
+
children: [/* @__PURE__ */ F("div", {
|
|
1206
1440
|
className: p("hidden", { flex: !i }),
|
|
1207
|
-
children: /* @__PURE__ */
|
|
1208
|
-
}), /* @__PURE__ */
|
|
1441
|
+
children: /* @__PURE__ */ F(qt, { isExpanded: t === "locked" })
|
|
1442
|
+
}), /* @__PURE__ */ F("div", {
|
|
1209
1443
|
className: p("hidden", { flex: i }),
|
|
1210
|
-
children: /* @__PURE__ */
|
|
1211
|
-
icon:
|
|
1444
|
+
children: /* @__PURE__ */ F(l, {
|
|
1445
|
+
icon: g,
|
|
1212
1446
|
size: "md"
|
|
1213
1447
|
})
|
|
1214
1448
|
})]
|
|
1215
1449
|
});
|
|
1216
1450
|
}
|
|
1451
|
+
function Yt() {
|
|
1452
|
+
let { hasPrimarySidebar: e } = wt();
|
|
1453
|
+
return F(e ? Kt : Jt, {});
|
|
1454
|
+
}
|
|
1217
1455
|
//#endregion
|
|
1218
1456
|
//#region src/addons/map/F0Map/components/F0MapSidebarToggle/F0MapSidebarToggle.tsx
|
|
1219
|
-
var
|
|
1220
|
-
let s = f(), c = n ?? (e ? s.map.controls.hidePanel : s.map.controls.showPanel), l = /* @__PURE__ */
|
|
1457
|
+
var Xt = O(({ expanded: e, onToggle: t, label: n, bare: i = !1, dataTestId: a }, o) => {
|
|
1458
|
+
let s = f(), c = n ?? (e ? s.map.controls.hidePanel : s.map.controls.showPanel), l = /* @__PURE__ */ F(r, {
|
|
1221
1459
|
ref: o,
|
|
1222
1460
|
variant: "ghost",
|
|
1223
1461
|
size: "md",
|
|
@@ -1227,29 +1465,29 @@ var mt = w(({ expanded: e, onToggle: t, label: n, bare: i = !1, dataTestId: a },
|
|
|
1227
1465
|
title: c,
|
|
1228
1466
|
"aria-label": c,
|
|
1229
1467
|
"aria-expanded": e,
|
|
1230
|
-
children: /* @__PURE__ */
|
|
1468
|
+
children: /* @__PURE__ */ F(qt, { isExpanded: e })
|
|
1231
1469
|
});
|
|
1232
|
-
return /* @__PURE__ */
|
|
1470
|
+
return /* @__PURE__ */ F(u, {
|
|
1233
1471
|
dataTestId: a,
|
|
1234
|
-
children: i ? l : /* @__PURE__ */
|
|
1472
|
+
children: i ? l : /* @__PURE__ */ F(Ne, { children: l })
|
|
1235
1473
|
});
|
|
1236
1474
|
});
|
|
1237
|
-
|
|
1475
|
+
Xt.displayName = "F0MapSidebarToggle";
|
|
1238
1476
|
//#endregion
|
|
1239
1477
|
//#region src/addons/map/F0Map/utils/arc.ts
|
|
1240
|
-
var
|
|
1478
|
+
var Zt = (e, t, n = .3, r = 64) => {
|
|
1241
1479
|
let [i, a] = e, [o, s] = t, c = (i + o) / 2, l = (a + s) / 2, u = c - (s - a) * n, d = l + (o - i) * n, f = [];
|
|
1242
1480
|
for (let e = 0; e <= r; e++) {
|
|
1243
1481
|
let t = e / r, n = 1 - t, c = n * n, l = 2 * n * t, p = t * t;
|
|
1244
1482
|
f.push([c * i + l * u + p * o, c * a + l * d + p * s]);
|
|
1245
1483
|
}
|
|
1246
1484
|
return f;
|
|
1247
|
-
},
|
|
1485
|
+
}, Qt = (e, t) => e.color ?? V(e.variant ?? "radical", t), $t = (e, t) => e.color ?? V(e.variant ?? "radical", !t), en = ({ id: e, kind: t, coordinates: n, style: r, isDark: i }) => {
|
|
1248
1486
|
let a = r.width ?? 3;
|
|
1249
1487
|
return {
|
|
1250
1488
|
id: e,
|
|
1251
1489
|
coordinates: n,
|
|
1252
|
-
color:
|
|
1490
|
+
color: Qt(r, i),
|
|
1253
1491
|
width: a,
|
|
1254
1492
|
opacity: r.opacity ?? 1,
|
|
1255
1493
|
dashed: r.dashed ?? !1,
|
|
@@ -1257,28 +1495,28 @@ var ht = (e, t, n = .3, r = 64) => {
|
|
|
1257
1495
|
width: a * 1.6,
|
|
1258
1496
|
opacity: 1
|
|
1259
1497
|
} : {
|
|
1260
|
-
color:
|
|
1498
|
+
color: $t(r, i),
|
|
1261
1499
|
opacity: 1
|
|
1262
1500
|
}
|
|
1263
1501
|
};
|
|
1264
|
-
},
|
|
1265
|
-
let o =
|
|
1502
|
+
}, tn = ({ adapter: e, routes: t, arcs: n, isDark: r, onRouteClick: i, onArcClick: a }) => {
|
|
1503
|
+
let o = M(() => [...t.map((e) => en({
|
|
1266
1504
|
id: e.id,
|
|
1267
1505
|
kind: "route",
|
|
1268
1506
|
coordinates: e.coordinates,
|
|
1269
1507
|
style: e,
|
|
1270
1508
|
isDark: r
|
|
1271
|
-
})), ...n.map((e) =>
|
|
1509
|
+
})), ...n.map((e) => en({
|
|
1272
1510
|
id: e.id,
|
|
1273
1511
|
kind: "arc",
|
|
1274
|
-
coordinates:
|
|
1512
|
+
coordinates: Zt(e.from, e.to, e.curvature),
|
|
1275
1513
|
style: e,
|
|
1276
1514
|
isDark: r
|
|
1277
1515
|
}))], [
|
|
1278
1516
|
t,
|
|
1279
1517
|
n,
|
|
1280
1518
|
r
|
|
1281
|
-
]), s =
|
|
1519
|
+
]), s = M(() => new Map([...t.map((e) => [e.id, "route"]), ...n.map((e) => [e.id, "arc"])]), [t, n]), c = N({
|
|
1282
1520
|
onRouteClick: i,
|
|
1283
1521
|
onArcClick: a,
|
|
1284
1522
|
kinds: s
|
|
@@ -1289,7 +1527,7 @@ var ht = (e, t, n = .3, r = 64) => {
|
|
|
1289
1527
|
kinds: s
|
|
1290
1528
|
};
|
|
1291
1529
|
let l = !!(i || a);
|
|
1292
|
-
return
|
|
1530
|
+
return j(() => {
|
|
1293
1531
|
e.setLines(o, l ? { onClick: (e) => {
|
|
1294
1532
|
let { onRouteClick: t, onArcClick: n, kinds: r } = c.current;
|
|
1295
1533
|
r.get(e) === "arc" ? n?.(e) : t?.(e);
|
|
@@ -1298,25 +1536,25 @@ var ht = (e, t, n = .3, r = 64) => {
|
|
|
1298
1536
|
e,
|
|
1299
1537
|
o,
|
|
1300
1538
|
l
|
|
1301
|
-
]),
|
|
1302
|
-
},
|
|
1539
|
+
]), j(() => () => e.setLines([]), [e]), null;
|
|
1540
|
+
}, nn = ({ adapter: e, coords: t }) => (j(() => {
|
|
1303
1541
|
e.setCurrentLocation(t);
|
|
1304
|
-
}, [e, t]),
|
|
1305
|
-
|
|
1542
|
+
}, [e, t]), j(() => () => e.setCurrentLocation(null), [e]), null);
|
|
1543
|
+
nn.displayName = "CurrentLocationLayer";
|
|
1306
1544
|
//#endregion
|
|
1307
1545
|
//#region src/addons/map/F0Map/constants.ts
|
|
1308
|
-
var
|
|
1546
|
+
var rn = {
|
|
1309
1547
|
curve: 1.42,
|
|
1310
1548
|
duration: 1400
|
|
1311
|
-
},
|
|
1549
|
+
}, an = 200, on = ({ dataTestId: e, className: t }) => /* @__PURE__ */ F(u, {
|
|
1312
1550
|
dataTestId: e,
|
|
1313
|
-
children: /* @__PURE__ */
|
|
1551
|
+
children: /* @__PURE__ */ F("div", {
|
|
1314
1552
|
"aria-busy": "true",
|
|
1315
1553
|
"aria-live": "polite",
|
|
1316
1554
|
className: p("h-full w-full animate-pulse bg-f1-background-secondary", t)
|
|
1317
1555
|
})
|
|
1318
|
-
}),
|
|
1319
|
-
let [t, n] =
|
|
1556
|
+
}), sn = (e) => {
|
|
1557
|
+
let [t, n] = P(null), r = k((t) => {
|
|
1320
1558
|
e && typeof navigator < "u" && navigator.geolocation && navigator.geolocation.getCurrentPosition((e) => {
|
|
1321
1559
|
let r = [e.coords.longitude, e.coords.latitude];
|
|
1322
1560
|
n(r), t?.(r);
|
|
@@ -1326,7 +1564,7 @@ var xt = {
|
|
|
1326
1564
|
maximumAge: 6e4
|
|
1327
1565
|
});
|
|
1328
1566
|
}, [e]);
|
|
1329
|
-
return
|
|
1567
|
+
return j(() => {
|
|
1330
1568
|
e && !t && typeof navigator < "u" && navigator.permissions?.query({ name: "geolocation" }).then((e) => {
|
|
1331
1569
|
e.state === "granted" && r();
|
|
1332
1570
|
}).catch(() => {});
|
|
@@ -1338,8 +1576,8 @@ var xt = {
|
|
|
1338
1576
|
coords: t,
|
|
1339
1577
|
request: r
|
|
1340
1578
|
};
|
|
1341
|
-
},
|
|
1342
|
-
let [e, t] =
|
|
1579
|
+
}, cn = () => {
|
|
1580
|
+
let [e, t] = P(!1), n = N(null), r = k((e) => {
|
|
1343
1581
|
if (n.current?.disconnect(), n.current = null, !e) return;
|
|
1344
1582
|
let r = () => t(e.closest(".dark") !== null);
|
|
1345
1583
|
r();
|
|
@@ -1350,21 +1588,21 @@ var xt = {
|
|
|
1350
1588
|
});
|
|
1351
1589
|
n.current = i;
|
|
1352
1590
|
}, []);
|
|
1353
|
-
return
|
|
1591
|
+
return j(() => () => n.current?.disconnect(), []), {
|
|
1354
1592
|
containerRef: r,
|
|
1355
1593
|
isDark: e
|
|
1356
1594
|
};
|
|
1357
|
-
},
|
|
1358
|
-
maplibre: async () => (await import("./maplibre-
|
|
1359
|
-
google: async (e) => (await import("./google-
|
|
1360
|
-
},
|
|
1361
|
-
let n =
|
|
1595
|
+
}, ln = {
|
|
1596
|
+
maplibre: async () => (await import("./maplibre-C6hlLglQ.js")).createMaplibreAdapter,
|
|
1597
|
+
google: async (e) => (await import("./google-D1V0swd7.js")).loadGoogleAdapter(e)
|
|
1598
|
+
}, un = /* @__PURE__ */ new Map(), dn = (e, t) => {
|
|
1599
|
+
let n = un.get(e);
|
|
1362
1600
|
if (n) return n;
|
|
1363
|
-
let r =
|
|
1364
|
-
throw
|
|
1601
|
+
let r = ln[e](t).catch((t) => {
|
|
1602
|
+
throw un.delete(e), t;
|
|
1365
1603
|
});
|
|
1366
|
-
return
|
|
1367
|
-
},
|
|
1604
|
+
return un.set(e, r), r;
|
|
1605
|
+
}, fn = {
|
|
1368
1606
|
version: 8,
|
|
1369
1607
|
sources: { openmaptiles: {
|
|
1370
1608
|
type: "vector",
|
|
@@ -6252,7 +6490,7 @@ var xt = {
|
|
|
6252
6490
|
],
|
|
6253
6491
|
name: "f0-dark",
|
|
6254
6492
|
metadata: { "f0:generated": !0 }
|
|
6255
|
-
},
|
|
6493
|
+
}, pn = {
|
|
6256
6494
|
version: 8,
|
|
6257
6495
|
sources: { openmaptiles: {
|
|
6258
6496
|
type: "vector",
|
|
@@ -11140,7 +11378,7 @@ var xt = {
|
|
|
11140
11378
|
],
|
|
11141
11379
|
name: "f0-light",
|
|
11142
11380
|
metadata: { "f0:generated": !0 }
|
|
11143
|
-
},
|
|
11381
|
+
}, mn = [
|
|
11144
11382
|
{
|
|
11145
11383
|
featureType: "landscape",
|
|
11146
11384
|
elementType: "geometry.fill",
|
|
@@ -11296,7 +11534,7 @@ var xt = {
|
|
|
11296
11534
|
elementType: "labels.icon",
|
|
11297
11535
|
stylers: [{ visibility: "off" }]
|
|
11298
11536
|
}
|
|
11299
|
-
],
|
|
11537
|
+
], hn = [
|
|
11300
11538
|
{
|
|
11301
11539
|
featureType: "landscape",
|
|
11302
11540
|
elementType: "geometry.fill",
|
|
@@ -11452,44 +11690,44 @@ var xt = {
|
|
|
11452
11690
|
elementType: "labels.icon",
|
|
11453
11691
|
stylers: [{ visibility: "off" }]
|
|
11454
11692
|
}
|
|
11455
|
-
],
|
|
11693
|
+
], gn = {
|
|
11456
11694
|
provider: "maplibre",
|
|
11457
|
-
light:
|
|
11458
|
-
dark:
|
|
11459
|
-
},
|
|
11695
|
+
light: pn,
|
|
11696
|
+
dark: fn
|
|
11697
|
+
}, _n = {
|
|
11460
11698
|
provider: "google",
|
|
11461
|
-
light:
|
|
11462
|
-
dark:
|
|
11463
|
-
},
|
|
11699
|
+
light: hn,
|
|
11700
|
+
dark: mn
|
|
11701
|
+
}, vn = (e, t) => ({
|
|
11464
11702
|
featureType: e,
|
|
11465
11703
|
elementType: t,
|
|
11466
11704
|
stylers: [{ visibility: "off" }]
|
|
11467
|
-
}),
|
|
11468
|
-
|
|
11469
|
-
|
|
11470
|
-
|
|
11471
|
-
],
|
|
11705
|
+
}), yn = [
|
|
11706
|
+
vn("poi", "labels"),
|
|
11707
|
+
vn("transit", "labels"),
|
|
11708
|
+
vn("road", "labels.icon")
|
|
11709
|
+
], bn = {
|
|
11472
11710
|
provider: "google",
|
|
11473
|
-
light:
|
|
11474
|
-
dark:
|
|
11475
|
-
},
|
|
11711
|
+
light: yn,
|
|
11712
|
+
dark: yn
|
|
11713
|
+
}, xn = (e) => e === "google" ? bn : gn, Sn = (e, t, n) => {
|
|
11476
11714
|
let r = e.on(t, () => {
|
|
11477
11715
|
r(), n();
|
|
11478
11716
|
});
|
|
11479
11717
|
return r;
|
|
11480
|
-
},
|
|
11718
|
+
}, Cn = {
|
|
11481
11719
|
center: [2.154, 41.39],
|
|
11482
11720
|
zoom: 11
|
|
11483
|
-
},
|
|
11721
|
+
}, wn = (e, t, n, r) => [
|
|
11484
11722
|
...e.map((e) => e.coordinates),
|
|
11485
11723
|
...t.flatMap((e) => e.coordinates),
|
|
11486
11724
|
...n.flatMap((e) => [e.from, e.to]),
|
|
11487
|
-
...r.flatMap((e) =>
|
|
11488
|
-
],
|
|
11489
|
-
let l =
|
|
11725
|
+
...r.flatMap((e) => ge(e.center, e.radiusMeters))
|
|
11726
|
+
], Tn = (e) => e.top === 0 && e.right === 0 && e.bottom === 0 && e.left === 0, En = ({ adapter: e, points: t, animate: n, routes: r = [], arcs: i = [], areas: a = [], gutter: o = 64, inset: s, size: c }) => {
|
|
11727
|
+
let l = wn(t, r, i, a);
|
|
11490
11728
|
if (l.length === 0) return;
|
|
11491
11729
|
let u = a.length > 0 ? 17 : 15;
|
|
11492
|
-
if (l.length > 1 &&
|
|
11730
|
+
if (l.length > 1 && Tn(s)) {
|
|
11493
11731
|
e.fitCoordinates(l, {
|
|
11494
11732
|
gutter: o,
|
|
11495
11733
|
maxZoom: u,
|
|
@@ -11498,9 +11736,9 @@ var xt = {
|
|
|
11498
11736
|
return;
|
|
11499
11737
|
}
|
|
11500
11738
|
let d = l.length === 1 ? {
|
|
11501
|
-
center:
|
|
11739
|
+
center: de(e, l[0], s, 14),
|
|
11502
11740
|
zoom: 14
|
|
11503
|
-
} :
|
|
11741
|
+
} : fe({
|
|
11504
11742
|
adapter: e,
|
|
11505
11743
|
coordinates: l,
|
|
11506
11744
|
inset: s,
|
|
@@ -11509,383 +11747,383 @@ var xt = {
|
|
|
11509
11747
|
maxZoom: u
|
|
11510
11748
|
});
|
|
11511
11749
|
d && (n ? e.easeTo(d, { animate: n }) : e.jumpTo(d, { animate: n }));
|
|
11512
|
-
},
|
|
11513
|
-
let
|
|
11514
|
-
|
|
11515
|
-
}, [
|
|
11516
|
-
|
|
11517
|
-
|
|
11750
|
+
}, Dn = (e) => `${e.top},${e.right},${e.bottom},${e.left}`, On = O(function({ markers: t = [], routes: r = [], arcs: i = [], areas: o = [], onRouteClick: s, onArcClick: c, selectedMarkerId: l, defaultSelectedMarkerId: d = null, onMarkerSelect: m, onMarkerDrag: h, onMarkerDragEnd: g, highlightedId: _ = null, viewportInset: v, centerOnMarkerClick: y = !1, fitToMarkers: b, initialViewport: x, mapStyle: S, interactive: ee = !0, gestureHandling: C, minZoom: w, maxZoom: T = 18, showControls: te = !0, controlLabels: ne, showCurrentLocation: E = !1, fullScreen: D = !1, onSidebarToggle: O, sidebarExpanded: A = !1, sidebarToggleAddon: ae, sidebarHeaderStart: M, sidebar: se, detail: pe, detailOpen: me = !1, clearSelectionOnBackgroundClick: he = !0, projection: ge = "mercator", provider: _e, loading: ve = !1, ariaLabel: ye, dataTestId: be, className: xe }, Se) {
|
|
11751
|
+
let Ce = C ?? (D ? "greedy" : "cooperative"), L = f(), R = e(_e), we = n(), Te = N(null), z = N(null), [B, Ee] = P(null), [V, De] = P(!1), [ke, H] = P(!1), [Ae, je] = P(0), Me = re(), G = a(), { containerRef: Ie, isDark: Le } = cn(), Re = k((e) => {
|
|
11752
|
+
Te.current = e, Ie(e);
|
|
11753
|
+
}, [Ie]), ze = Le, Be = !S || S.provider === R, Ve = Be ? S ?? xn(R) : xn(R), K = ze ? Ve.dark : Ve.light, He = N(!1);
|
|
11754
|
+
j(() => {
|
|
11755
|
+
Be || He.current || (He.current = !0, console.warn(`F0Map: ignoring a "${S?.provider}" mapStyle on the "${R}" engine - the shapes are not interchangeable. Pass a "${R}" style, or none for its default look.`));
|
|
11518
11756
|
}, [
|
|
11519
|
-
|
|
11757
|
+
Be,
|
|
11520
11758
|
S?.provider,
|
|
11521
|
-
|
|
11759
|
+
R
|
|
11522
11760
|
]);
|
|
11523
|
-
let [
|
|
11524
|
-
l === void 0 &&
|
|
11525
|
-
}, [l, m]),
|
|
11526
|
-
|
|
11527
|
-
let
|
|
11528
|
-
|
|
11529
|
-
let
|
|
11530
|
-
|
|
11531
|
-
let
|
|
11532
|
-
|
|
11533
|
-
let
|
|
11534
|
-
|
|
11535
|
-
let
|
|
11536
|
-
|
|
11537
|
-
let
|
|
11538
|
-
|
|
11539
|
-
let
|
|
11540
|
-
|
|
11541
|
-
let
|
|
11542
|
-
|
|
11543
|
-
let
|
|
11761
|
+
let [Ue, We] = P(d), q = l === void 0 ? Ue : l, Ge = k((e) => {
|
|
11762
|
+
l === void 0 && We(e), m?.(e);
|
|
11763
|
+
}, [l, m]), J = A && !!O, Ke = me && !!pe, qe = J ? U.inset + U.listWidth + U.gap : U.inset, Je = J ? U.inset : U.inset + U.toggleSize + U.gap, Ye = Ke ? qe + U.detailWidth : J ? U.inset + U.listWidth : null, Xe = ce(v, { left: Ye === null ? 0 : Ye + U.gap }), Y = N(t);
|
|
11764
|
+
Y.current = t;
|
|
11765
|
+
let Ze = N(r);
|
|
11766
|
+
Ze.current = r;
|
|
11767
|
+
let Qe = N(i);
|
|
11768
|
+
Qe.current = i;
|
|
11769
|
+
let $e = N(o);
|
|
11770
|
+
$e.current = o;
|
|
11771
|
+
let et = N(ge);
|
|
11772
|
+
et.current = ge;
|
|
11773
|
+
let X = N(Ge);
|
|
11774
|
+
X.current = Ge;
|
|
11775
|
+
let tt = N(q);
|
|
11776
|
+
tt.current = q;
|
|
11777
|
+
let nt = N(Xe);
|
|
11778
|
+
nt.current = Xe;
|
|
11779
|
+
let rt = N(he);
|
|
11780
|
+
rt.current = he;
|
|
11781
|
+
let Z = N(null), it = b ?? x === void 0, Q = k(() => {
|
|
11544
11782
|
let e = {
|
|
11545
|
-
width:
|
|
11546
|
-
height:
|
|
11783
|
+
width: Te.current?.clientWidth ?? 0,
|
|
11784
|
+
height: Te.current?.clientHeight ?? 0
|
|
11547
11785
|
};
|
|
11548
11786
|
return {
|
|
11549
|
-
inset:
|
|
11787
|
+
inset: le(nt.current, e),
|
|
11550
11788
|
size: e
|
|
11551
11789
|
};
|
|
11552
|
-
}, []),
|
|
11553
|
-
|
|
11790
|
+
}, []), at = k((e, t) => {
|
|
11791
|
+
Z.current = { kind: "fit" }, En({
|
|
11554
11792
|
adapter: e,
|
|
11555
|
-
points:
|
|
11793
|
+
points: Y.current,
|
|
11556
11794
|
animate: t,
|
|
11557
|
-
routes:
|
|
11558
|
-
arcs:
|
|
11559
|
-
areas:
|
|
11560
|
-
...
|
|
11795
|
+
routes: Ze.current,
|
|
11796
|
+
arcs: Qe.current,
|
|
11797
|
+
areas: $e.current,
|
|
11798
|
+
...Q()
|
|
11561
11799
|
});
|
|
11562
|
-
}, [
|
|
11563
|
-
|
|
11564
|
-
let
|
|
11800
|
+
}, [Q]), ot = N(at);
|
|
11801
|
+
ot.current = at;
|
|
11802
|
+
let $ = k((e, t) => {
|
|
11565
11803
|
let n = Math.max(e.getZoom(), 15);
|
|
11566
|
-
|
|
11804
|
+
Z.current = {
|
|
11567
11805
|
kind: "flight",
|
|
11568
11806
|
zoom: n
|
|
11569
11807
|
};
|
|
11570
|
-
let { inset: r } =
|
|
11808
|
+
let { inset: r } = Q();
|
|
11571
11809
|
e.easeTo({
|
|
11572
|
-
center:
|
|
11810
|
+
center: de(e, t.coordinates, r, n),
|
|
11573
11811
|
zoom: n
|
|
11574
|
-
}, { animate: !
|
|
11575
|
-
}, [
|
|
11576
|
-
let t = z.current, n =
|
|
11577
|
-
if (
|
|
11578
|
-
let { inset: e } =
|
|
11579
|
-
t.easeTo({ center:
|
|
11812
|
+
}, { animate: !G });
|
|
11813
|
+
}, [Q, G]), lt = k((e) => {
|
|
11814
|
+
let t = z.current, n = Y.current.find((t) => t.id === e);
|
|
11815
|
+
if (Z.current = null, y && t && n) {
|
|
11816
|
+
let { inset: e } = Q();
|
|
11817
|
+
t.easeTo({ center: de(t, n.coordinates, e) }, { animate: !G });
|
|
11580
11818
|
}
|
|
11581
|
-
|
|
11819
|
+
X.current(e);
|
|
11582
11820
|
}, [
|
|
11583
11821
|
y,
|
|
11584
|
-
|
|
11585
|
-
|
|
11586
|
-
]),
|
|
11587
|
-
|
|
11588
|
-
|
|
11589
|
-
}, [
|
|
11590
|
-
let { coords:
|
|
11591
|
-
|
|
11592
|
-
}, []),
|
|
11593
|
-
|
|
11594
|
-
}, []),
|
|
11595
|
-
z.current &&
|
|
11596
|
-
}, [
|
|
11597
|
-
|
|
11822
|
+
Q,
|
|
11823
|
+
G
|
|
11824
|
+
]), ut = N(!1);
|
|
11825
|
+
j(() => {
|
|
11826
|
+
ut.current || t.length <= 200 || (ut.current = !0, console.warn(`F0Map: ${t.length} markers exceeds the recommended maximum of 200. Markers are DOM elements - pan/zoom will degrade. Aggregate or filter the data, or wait for a GL clustering path.`));
|
|
11827
|
+
}, [t.length]);
|
|
11828
|
+
let { coords: dt, request: ft } = sn(E), pt = k(() => {
|
|
11829
|
+
Z.current = null, z.current?.zoomIn();
|
|
11830
|
+
}, []), mt = k(() => {
|
|
11831
|
+
Z.current = null, z.current?.zoomOut();
|
|
11832
|
+
}, []), ht = k(() => {
|
|
11833
|
+
z.current && at(z.current, !G);
|
|
11834
|
+
}, [at, G]), gt = k(() => {
|
|
11835
|
+
ft((e) => {
|
|
11598
11836
|
let t = z.current;
|
|
11599
11837
|
if (!t) return;
|
|
11600
|
-
|
|
11601
|
-
let n = Math.max(t.getZoom(), 13), { inset: r } =
|
|
11838
|
+
Z.current = null;
|
|
11839
|
+
let n = Math.max(t.getZoom(), 13), { inset: r } = Q();
|
|
11602
11840
|
t.flyTo({
|
|
11603
|
-
center:
|
|
11841
|
+
center: de(t, e, r, n),
|
|
11604
11842
|
zoom: n
|
|
11605
|
-
}, { animate: !
|
|
11843
|
+
}, { animate: !G });
|
|
11606
11844
|
});
|
|
11607
11845
|
}, [
|
|
11608
|
-
|
|
11609
|
-
|
|
11610
|
-
|
|
11611
|
-
]),
|
|
11846
|
+
ft,
|
|
11847
|
+
Q,
|
|
11848
|
+
G
|
|
11849
|
+
]), _t = k((e) => {
|
|
11612
11850
|
let t = z.current;
|
|
11613
11851
|
if (!t) return;
|
|
11614
|
-
|
|
11615
|
-
let n =
|
|
11852
|
+
Z.current = null;
|
|
11853
|
+
let n = fe({
|
|
11616
11854
|
adapter: t,
|
|
11617
11855
|
coordinates: e,
|
|
11618
|
-
...
|
|
11856
|
+
...Q(),
|
|
11619
11857
|
gutter: 64,
|
|
11620
11858
|
maxZoom: 16
|
|
11621
11859
|
});
|
|
11622
|
-
n && (
|
|
11623
|
-
}, [
|
|
11624
|
-
let t = z.current, n =
|
|
11625
|
-
t && n &&
|
|
11626
|
-
}, [
|
|
11627
|
-
|
|
11628
|
-
if (!
|
|
11860
|
+
n && (G ? t.jumpTo(n, { animate: !1 }) : t.flyTo(n));
|
|
11861
|
+
}, [Q, G]), vt = k((e) => {
|
|
11862
|
+
let t = z.current, n = Y.current.find((t) => t.id === e);
|
|
11863
|
+
t && n && $(t, n), Ge(e);
|
|
11864
|
+
}, [$, Ge]);
|
|
11865
|
+
j(() => {
|
|
11866
|
+
if (!Ke || q === null) return;
|
|
11629
11867
|
let e = (e) => {
|
|
11630
|
-
e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(),
|
|
11631
|
-
}, t =
|
|
11868
|
+
e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(), X.current(null));
|
|
11869
|
+
}, t = Te.current?.ownerDocument ?? document;
|
|
11632
11870
|
return t.addEventListener("keydown", e), () => t.removeEventListener("keydown", e);
|
|
11633
|
-
}, [
|
|
11871
|
+
}, [Ke, q]), ie(Se, () => ({
|
|
11634
11872
|
getNativeMap: () => z.current?.native() ?? null,
|
|
11635
11873
|
focusMarker: (e) => {
|
|
11636
|
-
let t = z.current, n =
|
|
11637
|
-
t && n && (
|
|
11874
|
+
let t = z.current, n = Y.current.find((t) => t.id === e);
|
|
11875
|
+
t && n && ($(t, n), X.current(e));
|
|
11638
11876
|
},
|
|
11639
11877
|
fitToMarkers: () => {
|
|
11640
|
-
z.current &&
|
|
11878
|
+
z.current && at(z.current, !G);
|
|
11641
11879
|
},
|
|
11642
|
-
clearSelection: () =>
|
|
11880
|
+
clearSelection: () => X.current(null)
|
|
11643
11881
|
}), [
|
|
11644
|
-
|
|
11645
|
-
|
|
11646
|
-
|
|
11882
|
+
at,
|
|
11883
|
+
$,
|
|
11884
|
+
G
|
|
11647
11885
|
]);
|
|
11648
|
-
let
|
|
11649
|
-
|
|
11650
|
-
let
|
|
11651
|
-
|
|
11652
|
-
let
|
|
11653
|
-
|
|
11654
|
-
if (
|
|
11655
|
-
let e =
|
|
11886
|
+
let yt = N(K);
|
|
11887
|
+
yt.current = K;
|
|
11888
|
+
let bt = N(we);
|
|
11889
|
+
bt.current = we;
|
|
11890
|
+
let xt = N(null), St = N(x ?? Cn);
|
|
11891
|
+
j(() => {
|
|
11892
|
+
if (ve) return;
|
|
11893
|
+
let e = Te.current;
|
|
11656
11894
|
if (!e) return;
|
|
11657
|
-
|
|
11658
|
-
let t =
|
|
11659
|
-
return
|
|
11895
|
+
xt.current = yt.current;
|
|
11896
|
+
let t = St.current, n = null, r = !1, i = [];
|
|
11897
|
+
return dn(R, bt.current).then((i) => {
|
|
11660
11898
|
if (!r) {
|
|
11661
11899
|
try {
|
|
11662
11900
|
n = i({
|
|
11663
11901
|
container: e,
|
|
11664
|
-
style:
|
|
11902
|
+
style: yt.current,
|
|
11665
11903
|
center: t.center,
|
|
11666
|
-
zoom: t.zoom ??
|
|
11667
|
-
minZoom:
|
|
11668
|
-
maxZoom:
|
|
11904
|
+
zoom: t.zoom ?? Cn.zoom,
|
|
11905
|
+
minZoom: w,
|
|
11906
|
+
maxZoom: T,
|
|
11669
11907
|
interactive: ee,
|
|
11670
|
-
cooperativeGestures:
|
|
11908
|
+
cooperativeGestures: Ce === "cooperative"
|
|
11671
11909
|
});
|
|
11672
11910
|
} catch {
|
|
11673
|
-
|
|
11911
|
+
De(!0);
|
|
11674
11912
|
return;
|
|
11675
11913
|
}
|
|
11676
11914
|
a(n);
|
|
11677
11915
|
}
|
|
11678
11916
|
}).catch((e) => {
|
|
11679
|
-
console.error("[F0Map] could not load the map engine", e), r ||
|
|
11917
|
+
console.error("[F0Map] could not load the map engine", e), r || H(!0);
|
|
11680
11918
|
}), () => {
|
|
11681
|
-
r = !0, i.forEach((e) => e()), n && (z.current = null,
|
|
11919
|
+
r = !0, i.forEach((e) => e()), n && (z.current = null, Ee(null), n.destroy());
|
|
11682
11920
|
};
|
|
11683
11921
|
function a(e) {
|
|
11684
|
-
z.current = e,
|
|
11922
|
+
z.current = e, Ee(e), De(!1);
|
|
11685
11923
|
let t = !1;
|
|
11686
|
-
i.push(
|
|
11687
|
-
t = !0,
|
|
11924
|
+
i.push(Sn(e, "ready", () => {
|
|
11925
|
+
t = !0, H(!1), e.resize(), it && En({
|
|
11688
11926
|
adapter: e,
|
|
11689
|
-
points:
|
|
11927
|
+
points: Y.current,
|
|
11690
11928
|
animate: !1,
|
|
11691
|
-
routes:
|
|
11692
|
-
arcs:
|
|
11693
|
-
areas:
|
|
11694
|
-
...
|
|
11695
|
-
}), e.setGlobeProjection(
|
|
11929
|
+
routes: Ze.current,
|
|
11930
|
+
arcs: Qe.current,
|
|
11931
|
+
areas: $e.current,
|
|
11932
|
+
...Q()
|
|
11933
|
+
}), e.setGlobeProjection(et.current === "globe");
|
|
11696
11934
|
}), e.on("error", () => {
|
|
11697
|
-
t ||
|
|
11935
|
+
t || H(!0);
|
|
11698
11936
|
}), e.on("click", () => {
|
|
11699
|
-
|
|
11937
|
+
rt.current && X.current(null);
|
|
11700
11938
|
}));
|
|
11701
11939
|
}
|
|
11702
11940
|
}, [
|
|
11703
|
-
|
|
11941
|
+
ve,
|
|
11704
11942
|
ee,
|
|
11705
|
-
|
|
11706
|
-
|
|
11707
|
-
|
|
11708
|
-
|
|
11709
|
-
|
|
11710
|
-
|
|
11711
|
-
]),
|
|
11943
|
+
Ce,
|
|
11944
|
+
w,
|
|
11945
|
+
T,
|
|
11946
|
+
it,
|
|
11947
|
+
R,
|
|
11948
|
+
Ae
|
|
11949
|
+
]), j(() => {
|
|
11712
11950
|
let e = z.current;
|
|
11713
|
-
e &&
|
|
11714
|
-
}, [
|
|
11715
|
-
z.current?.setGlobeProjection(
|
|
11716
|
-
}, [
|
|
11717
|
-
let
|
|
11718
|
-
|
|
11951
|
+
e && xt.current !== K && (xt.current = K, e.applyStyle(K), Sn(e, "styled", () => e.setGlobeProjection(et.current === "globe")));
|
|
11952
|
+
}, [K]), j(() => {
|
|
11953
|
+
z.current?.setGlobeProjection(ge === "globe");
|
|
11954
|
+
}, [ge]);
|
|
11955
|
+
let Ct = N($);
|
|
11956
|
+
Ct.current = $, j(() => {
|
|
11719
11957
|
if (!_) return;
|
|
11720
|
-
let e = z.current, t =
|
|
11721
|
-
e && t &&
|
|
11958
|
+
let e = z.current, t = Y.current.find((e) => e.id === _);
|
|
11959
|
+
e && t && Ct.current(e, t);
|
|
11722
11960
|
}, [_]);
|
|
11723
|
-
let
|
|
11724
|
-
|
|
11725
|
-
let e =
|
|
11726
|
-
|
|
11961
|
+
let wt = Dn(Xe), Tt = N(null);
|
|
11962
|
+
j(() => {
|
|
11963
|
+
let e = Tt.current;
|
|
11964
|
+
Tt.current = nt.current;
|
|
11727
11965
|
let t = z.current;
|
|
11728
11966
|
if (!e || !t) return;
|
|
11729
|
-
let { inset: n, size: r } =
|
|
11967
|
+
let { inset: n, size: r } = Q(), i = Z.current, a = !G, o = Y.current.find((e) => e.id === tt.current);
|
|
11730
11968
|
if (o) {
|
|
11731
11969
|
let e = i?.kind === "flight" ? i.zoom : void 0;
|
|
11732
11970
|
t.easeTo({
|
|
11733
|
-
center:
|
|
11971
|
+
center: de(t, o.coordinates, n, e),
|
|
11734
11972
|
zoom: e
|
|
11735
11973
|
}, { animate: a });
|
|
11736
11974
|
return;
|
|
11737
11975
|
}
|
|
11738
11976
|
if (i?.kind === "fit") {
|
|
11739
|
-
|
|
11977
|
+
ot.current(t, a);
|
|
11740
11978
|
return;
|
|
11741
11979
|
}
|
|
11742
|
-
let s = le(
|
|
11980
|
+
let s = ue(le(e, r)), c = ue(n), l = t.project(t.getCenter()), u = l && t.unproject({
|
|
11743
11981
|
x: l.x + s.x - c.x,
|
|
11744
11982
|
y: l.y + s.y - c.y
|
|
11745
11983
|
});
|
|
11746
11984
|
u && t.easeTo({ center: u }, { animate: a });
|
|
11747
|
-
}, [
|
|
11748
|
-
let
|
|
11749
|
-
from:
|
|
11750
|
-
to:
|
|
11985
|
+
}, [wt, Q]);
|
|
11986
|
+
let Et = r.length > 0 || i.length > 0, Dt = Ye === null ? 0 : Ye + U.gap - U.inset, Ot = N({
|
|
11987
|
+
from: Dt,
|
|
11988
|
+
to: Dt
|
|
11751
11989
|
});
|
|
11752
|
-
|
|
11753
|
-
from:
|
|
11754
|
-
to:
|
|
11990
|
+
Ot.current.to !== Dt && (Ot.current = {
|
|
11991
|
+
from: Ot.current.to,
|
|
11992
|
+
to: Dt
|
|
11755
11993
|
});
|
|
11756
|
-
let
|
|
11757
|
-
return /* @__PURE__ */
|
|
11758
|
-
dataTestId:
|
|
11759
|
-
children:
|
|
11760
|
-
ref:
|
|
11994
|
+
let kt = Dt > Ot.current.from ? W.enter : W.exit, At = J ? W.enter : W.exit;
|
|
11995
|
+
return /* @__PURE__ */ F(u, {
|
|
11996
|
+
dataTestId: be,
|
|
11997
|
+
children: ve ? /* @__PURE__ */ F(on, { className: xe }) : /* @__PURE__ */ I("div", {
|
|
11998
|
+
ref: Re,
|
|
11761
11999
|
role: "region",
|
|
11762
|
-
"aria-label":
|
|
11763
|
-
className: p("f0-map relative h-full w-full overflow-hidden",
|
|
12000
|
+
"aria-label": ye ?? L.map.region,
|
|
12001
|
+
className: p("f0-map relative h-full w-full overflow-hidden", ze && "dark", !D && "rounded-2xl border border-solid border-f1-border-secondary", xe),
|
|
11764
12002
|
children: [
|
|
11765
|
-
/* @__PURE__ */
|
|
11766
|
-
href: `#${
|
|
12003
|
+
/* @__PURE__ */ F("a", {
|
|
12004
|
+
href: `#${Me}`,
|
|
11767
12005
|
className: "sr-only rounded-md focus:not-sr-only focus:absolute focus:left-2 focus:top-2 focus:z-30 focus:bg-f1-background focus:px-3 focus:py-2 focus:text-sm focus:text-f1-foreground focus:shadow-md focus:outline-none focus:ring-1 focus:ring-f1-special-ring",
|
|
11768
|
-
children:
|
|
12006
|
+
children: L.map.skipToList
|
|
11769
12007
|
}),
|
|
11770
|
-
/* @__PURE__ */
|
|
12008
|
+
/* @__PURE__ */ F("div", {
|
|
11771
12009
|
role: "status",
|
|
11772
12010
|
"aria-live": "polite",
|
|
11773
12011
|
className: "sr-only",
|
|
11774
|
-
children: `${
|
|
12012
|
+
children: `${t.length} ${t.length === 1 ? L.map.location : L.map.locations}`
|
|
11775
12013
|
}),
|
|
11776
|
-
!V && B && o.length > 0 ? /* @__PURE__ */
|
|
12014
|
+
!V && B && o.length > 0 ? /* @__PURE__ */ F(Oe, {
|
|
11777
12015
|
adapter: B,
|
|
11778
12016
|
areas: o,
|
|
11779
|
-
isDark:
|
|
12017
|
+
isDark: ze
|
|
11780
12018
|
}) : null,
|
|
11781
|
-
!V && B &&
|
|
12019
|
+
!V && B && dt ? /* @__PURE__ */ I(oe, { children: [/* @__PURE__ */ F(nn, {
|
|
11782
12020
|
adapter: B,
|
|
11783
|
-
coords:
|
|
11784
|
-
}), /* @__PURE__ */
|
|
12021
|
+
coords: dt
|
|
12022
|
+
}), /* @__PURE__ */ F("span", {
|
|
11785
12023
|
className: "sr-only",
|
|
11786
|
-
children:
|
|
12024
|
+
children: L.map.currentLocation
|
|
11787
12025
|
})] }) : null,
|
|
11788
|
-
!V && B &&
|
|
12026
|
+
!V && B && Et ? /* @__PURE__ */ F(tn, {
|
|
11789
12027
|
adapter: B,
|
|
11790
12028
|
routes: r,
|
|
11791
12029
|
arcs: i,
|
|
11792
|
-
isDark:
|
|
12030
|
+
isDark: ze,
|
|
11793
12031
|
onRouteClick: s,
|
|
11794
12032
|
onArcClick: c
|
|
11795
12033
|
}) : null,
|
|
11796
|
-
!V && B &&
|
|
12034
|
+
!V && B && t.length > 0 ? /* @__PURE__ */ F(st, {
|
|
11797
12035
|
adapter: B,
|
|
11798
|
-
points:
|
|
11799
|
-
selectedId:
|
|
12036
|
+
points: t,
|
|
12037
|
+
selectedId: q,
|
|
11800
12038
|
highlightedId: _,
|
|
11801
|
-
onSelect:
|
|
12039
|
+
onSelect: lt,
|
|
11802
12040
|
onMarkerDrag: h,
|
|
11803
12041
|
onMarkerDragEnd: g,
|
|
11804
|
-
onClusterExpand:
|
|
12042
|
+
onClusterExpand: _t
|
|
11805
12043
|
}) : null,
|
|
11806
|
-
!V && B &&
|
|
11807
|
-
open:
|
|
11808
|
-
offsetX:
|
|
11809
|
-
offsetY:
|
|
11810
|
-
width:
|
|
12044
|
+
!V && B && pe ? /* @__PURE__ */ F(ct, {
|
|
12045
|
+
open: Ke,
|
|
12046
|
+
offsetX: qe,
|
|
12047
|
+
offsetY: Je,
|
|
12048
|
+
width: U.detailWidth,
|
|
11811
12049
|
entrance: "grow",
|
|
11812
|
-
ariaLabel:
|
|
11813
|
-
children:
|
|
12050
|
+
ariaLabel: L.map.detailPanel,
|
|
12051
|
+
children: pe
|
|
11814
12052
|
}) : null,
|
|
11815
|
-
!V && B &&
|
|
11816
|
-
className: p("absolute left-2 top-2 z-10",
|
|
12053
|
+
!V && B && O ? /* @__PURE__ */ F("div", {
|
|
12054
|
+
className: p("absolute left-2 top-2 z-10", J && "opacity-0"),
|
|
11817
12055
|
style: {
|
|
11818
|
-
transitionProperty:
|
|
11819
|
-
transitionDuration:
|
|
11820
|
-
transitionTimingFunction:
|
|
12056
|
+
transitionProperty: G ? "none" : "opacity",
|
|
12057
|
+
transitionDuration: At.duration,
|
|
12058
|
+
transitionTimingFunction: At.easing
|
|
11821
12059
|
},
|
|
11822
|
-
children: /* @__PURE__ */
|
|
12060
|
+
children: /* @__PURE__ */ I("div", {
|
|
11823
12061
|
className: "flex items-start gap-2",
|
|
11824
|
-
"aria-hidden":
|
|
12062
|
+
"aria-hidden": J || void 0,
|
|
11825
12063
|
ref: (e) => {
|
|
11826
|
-
|
|
12064
|
+
J ? e?.setAttribute("inert", "") : e?.removeAttribute("inert");
|
|
11827
12065
|
},
|
|
11828
|
-
children: [/* @__PURE__ */
|
|
12066
|
+
children: [/* @__PURE__ */ F(Xt, {
|
|
11829
12067
|
expanded: !1,
|
|
11830
|
-
onToggle:
|
|
11831
|
-
}),
|
|
12068
|
+
onToggle: O
|
|
12069
|
+
}), ae ? /* @__PURE__ */ F(Ne, { children: ae }) : null]
|
|
11832
12070
|
})
|
|
11833
12071
|
}) : null,
|
|
11834
|
-
!V && B &&
|
|
11835
|
-
open:
|
|
11836
|
-
offsetX:
|
|
11837
|
-
width:
|
|
11838
|
-
headerStart:
|
|
11839
|
-
headerEnd: /* @__PURE__ */
|
|
12072
|
+
!V && B && O ? /* @__PURE__ */ F(ct, {
|
|
12073
|
+
open: J,
|
|
12074
|
+
offsetX: U.inset,
|
|
12075
|
+
width: U.listWidth,
|
|
12076
|
+
headerStart: M,
|
|
12077
|
+
headerEnd: /* @__PURE__ */ F(Xt, {
|
|
11840
12078
|
expanded: !0,
|
|
11841
|
-
onToggle:
|
|
12079
|
+
onToggle: O,
|
|
11842
12080
|
bare: !0,
|
|
11843
12081
|
dataTestId: "map-panel-toggle-open"
|
|
11844
12082
|
}),
|
|
11845
|
-
children:
|
|
12083
|
+
children: se
|
|
11846
12084
|
}) : null,
|
|
11847
|
-
!V && B &&
|
|
11848
|
-
className: p("absolute left-2 z-10",
|
|
12085
|
+
!V && B && te && ee ? /* @__PURE__ */ F("div", {
|
|
12086
|
+
className: p("absolute left-2 z-10", R === "google" ? "bottom-8" : "bottom-2"),
|
|
11849
12087
|
style: {
|
|
11850
|
-
transform: `translateX(${
|
|
11851
|
-
transitionProperty:
|
|
11852
|
-
transitionDuration:
|
|
11853
|
-
transitionTimingFunction:
|
|
12088
|
+
transform: `translateX(${Dt}px)`,
|
|
12089
|
+
transitionProperty: G ? "none" : "transform",
|
|
12090
|
+
transitionDuration: kt.duration,
|
|
12091
|
+
transitionTimingFunction: kt.easing
|
|
11854
12092
|
},
|
|
11855
|
-
children: /* @__PURE__ */
|
|
11856
|
-
onZoomIn:
|
|
11857
|
-
onZoomOut:
|
|
11858
|
-
onFit:
|
|
11859
|
-
onLocate:
|
|
11860
|
-
labels:
|
|
12093
|
+
children: /* @__PURE__ */ F(Pe, {
|
|
12094
|
+
onZoomIn: pt,
|
|
12095
|
+
onZoomOut: mt,
|
|
12096
|
+
onFit: t.length > 0 || Et || o.length > 0 ? ht : void 0,
|
|
12097
|
+
onLocate: gt,
|
|
12098
|
+
labels: ne
|
|
11861
12099
|
})
|
|
11862
12100
|
}) : null,
|
|
11863
|
-
ke && !V ? /* @__PURE__ */
|
|
12101
|
+
ke && !V ? /* @__PURE__ */ I("div", {
|
|
11864
12102
|
className: "absolute inset-x-0 top-0 z-30 flex items-center justify-between gap-3 border-b border-solid border-f1-border-secondary bg-f1-background px-4 py-2 text-sm text-f1-foreground",
|
|
11865
|
-
children: [/* @__PURE__ */
|
|
12103
|
+
children: [/* @__PURE__ */ F("span", { children: L.map.loadError }), /* @__PURE__ */ F("button", {
|
|
11866
12104
|
type: "button",
|
|
11867
12105
|
onClick: () => {
|
|
11868
|
-
|
|
12106
|
+
H(!1);
|
|
11869
12107
|
let e = z.current;
|
|
11870
|
-
e ? e.applyStyle(
|
|
12108
|
+
e ? e.applyStyle(yt.current) : je((e) => e + 1);
|
|
11871
12109
|
},
|
|
11872
12110
|
className: "font-medium underline",
|
|
11873
|
-
children:
|
|
12111
|
+
children: L.map.retry
|
|
11874
12112
|
})]
|
|
11875
12113
|
}) : null,
|
|
11876
|
-
/* @__PURE__ */
|
|
11877
|
-
id:
|
|
11878
|
-
label:
|
|
11879
|
-
points:
|
|
11880
|
-
selectedId:
|
|
11881
|
-
onSelect:
|
|
12114
|
+
/* @__PURE__ */ F(Fe, {
|
|
12115
|
+
id: Me,
|
|
12116
|
+
label: L.map.listLabel,
|
|
12117
|
+
points: t,
|
|
12118
|
+
selectedId: q,
|
|
12119
|
+
onSelect: vt,
|
|
11882
12120
|
visible: V
|
|
11883
12121
|
})
|
|
11884
12122
|
]
|
|
11885
12123
|
})
|
|
11886
12124
|
});
|
|
11887
12125
|
});
|
|
11888
|
-
|
|
11889
|
-
var
|
|
12126
|
+
On.displayName = "F0Map";
|
|
12127
|
+
var kn = On;
|
|
11890
12128
|
//#endregion
|
|
11891
|
-
export {
|
|
12129
|
+
export { wt as C, Ke as D, ct as E, Fe as O, Ct as S, ht as T, Rt as _, bn as a, Lt as b, an as c, qt as d, Bt as f, jt as g, Pt as h, _n as i, Pe as k, Xt as l, Mt as m, xn as n, on as o, Vt as p, gn as r, rn as s, kn as t, Yt as u, Ft as v, vt as w, Dt as x, It as y };
|