@expofp/floorplan 3.44.8 → 3.45.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/browser/{Button-C1iQgU3z.js → Button-6lV64H09.js} +5 -5
- package/dist/browser/{CookieConsent-Dv1LCPG3.js → CookieConsent-k11VHxoM.js} +7 -7
- package/dist/browser/{Debug-DPy0A0cw.js → Debug-DbfbGWb0.js} +7 -7
- package/dist/browser/{DebugTools-Dp8d4gPZ.js → DebugTools-BjHOBi_k.js} +6 -6
- package/dist/browser/{Demo-CHH4a7sZ.js → Demo-CrFjKybB.js} +9 -9
- package/dist/browser/{Free-BidfuRjG.js → Free-4IN6GHrY.js} +10 -10
- package/dist/browser/{GalleryContainer-7IYWWKkK.js → GalleryContainer-BWd-8Nhp.js} +11 -11
- package/dist/browser/{GpsLoader-CrO61Fpj.js → GpsLoader-C43ADyfU.js} +13 -13
- package/dist/browser/{KioskStore-BE_V60tp.js → KioskStore-0xBjJ9AG.js} +14 -20
- package/dist/browser/{LayerStore-BM7GOQ3J.js → LayerStore-BifpIwHB.js} +3726 -3220
- package/dist/browser/{MaplibreAdapter-DmrCTw3Q.js → MaplibreAdapter-CxETR3-R.js} +2517 -2517
- package/dist/browser/{ModalContainer-DqsSRv60.js → ModalContainer-IvkrtwT_.js} +10 -10
- package/dist/browser/{PermissionNotice--Vn_MkaQ.js → PermissionNotice-C4Nu1dPO.js} +6 -6
- package/dist/browser/{RouteStore-D7G9YROM.js → RouteStore-ltbgXRLP.js} +28 -28
- package/dist/browser/{SetKioskMode-CMndo5d3.js → SetKioskMode-BWzFzO_Q.js} +12 -12
- package/dist/browser/{ShowKiosk-CUiprdS9.js → ShowKiosk-BYOTTOrX.js} +10 -10
- package/dist/browser/{UIState-D0GHKRf4.js → UIState-BG-A7rPb.js} +230 -230
- package/dist/browser/{ViewerMenuPanel-B7corw44.js → ViewerMenuPanel-DscD3jCY.js} +11 -11
- package/dist/browser/{add-debug-secret-listener-uMLIuPW5.js → add-debug-secret-listener-qgQOxLV_.js} +1 -1
- package/dist/browser/{adopt-global-settings-BVVdz-YX.js → adopt-global-settings-CB1YrOJs.js} +9 -9
- package/dist/browser/{boolean-editor-Dg3cfoLy.js → boolean-editor-DcFqYLg6.js} +9 -9
- package/dist/browser/{bootIntercom-7FTJ0piX.js → bootIntercom-DJEOZaFU.js} +2 -2
- package/dist/browser/bundle.json +87 -87
- package/dist/browser/{camera-events-DbYubA01.js → camera-events-BwP3bfY4.js} +1 -1
- package/dist/browser/{classnames-BryLpfgQ.js → classnames-C6CE8V3C.js} +2 -2
- package/dist/browser/{client-DnnJr0Ks.js → client-B42ooBdH.js} +5 -5
- package/dist/browser/{components-DHNMQbqJ.js → components-DelXq6ex.js} +461 -461
- package/dist/browser/{create-live-plan-BgCjK-Kh.js → create-live-plan-jO-YW94S.js} +263 -245
- package/dist/browser/{debug-context-BEABO7OL.js → debug-context-BFAUm0Rv.js} +5 -5
- package/dist/browser/{debug-overlay-Bv-C1rmT.js → debug-overlay-0pLu5_hz.js} +10 -10
- package/dist/browser/{debug-ui-FirQ0EQb.js → debug-ui-CPF3Fr0y.js} +6 -6
- package/dist/browser/{dist-sup8YcEL.js → dist-5MtJlmvC.js} +5 -5
- package/dist/browser/{dist-p14a9te8.js → dist-BImkgFoY.js} +6 -6
- package/dist/browser/{dist-DN5ATV5p.js → dist-D7lv86ly.js} +3 -3
- package/dist/browser/{efp-debug-init-DUPmVtYg.js → efp-debug-init-DBnQHIuj.js} +3 -3
- package/dist/browser/{enum-editor-g46R4Zq7.js → enum-editor-wagTer9Z.js} +4 -4
- package/dist/browser/{es5-D_WEVRPo.js → es5-ClZJZH3H.js} +2 -2
- package/dist/browser/{event-head-DBemDpob.js → event-head-Dvg64Dl9.js} +1 -1
- package/dist/browser/{event-not-found-m_QUX3nl.js → event-not-found-CmHnmais.js} +3 -3
- package/dist/browser/{event-scoped-cache-BpjbCC59.js → event-scoped-cache-blYstzYW.js} +2 -2
- package/dist/browser/{expofpUrl-CAOzqFzt.js → expofpUrl-D99TqyHD.js} +1 -1
- package/dist/browser/{exports-svWN4mLB.js → exports-BBJtyyI0.js} +1 -1
- package/dist/browser/{favicon-hR5BaEm4.js → favicon-Bac0ZnSB.js} +1 -1
- package/dist/browser/{fetch-retry.umd-DS-5XmpN.js → fetch-retry.umd-Dkr69k7z.js} +2 -2
- package/dist/browser/{flex-BAz1Zlx4.js → flex-2znF0sHW.js} +5 -5
- package/dist/browser/{floorplan.loader-DPHmWNvd.js → floorplan.loader-B2NptbPQ.js} +12 -12
- package/dist/browser/{floorplan.ready-clG372Lo.js → floorplan.ready-DTyG-lkM.js} +344 -335
- package/dist/browser/{freeBanner-D0nU1aT0.js → freeBanner-yyOqSdAy.js} +2 -2
- package/dist/browser/{fuse-DFf-hk6f.js → fuse-x_QTzSiL.js} +2 -2
- package/dist/browser/{i18n-CPJmxFQX.js → i18n-CLEztXjo.js} +6 -6
- package/dist/browser/index.js +17 -17
- package/dist/browser/{index.module-COSPv-bu.js → index.module-C9C4kJk7.js} +4 -4
- package/dist/browser/{init-ui-Cj38w8tb.js → init-ui-rxZzKF4X.js} +16 -16
- package/dist/browser/{integrateKiosk-Du5HThkw.js → integrateKiosk-DsU-d7uk.js} +5 -5
- package/dist/browser/{is-debug-CmeNjnvW.js → is-debug-Bnj4naYd.js} +4 -4
- package/dist/browser/{is-own-domain-z0V4JpKp.js → is-own-domain-DNjOZllq.js} +1 -1
- package/dist/browser/{is-webview-JHA9dtnx.js → is-webview-Drer0GOu.js} +1 -1
- package/dist/browser/{jsx-runtime-D-d_UIhH.js → jsx-runtime-DB8EwfzE.js} +2 -2
- package/dist/browser/{kiosk-mode-ZBMSIWbK.js → kiosk-mode-B89VL0oY.js} +3 -3
- package/dist/browser/{kiosk-record-Djd0ZbEF.js → kiosk-record-rnTon4Lp.js} +1 -1
- package/dist/browser/{kioskApi-CXqDoN71.js → kioskApi-opoHdUqq.js} +7 -7
- package/dist/browser/{lib-GyGKAKXf.js → lib-eiqwFHwk.js} +3 -3
- package/dist/browser/{loadImage-cnbZD9uN.js → loadImage-BS80HTUK.js} +1 -1
- package/dist/browser/{logDeviceInfo-BSf9sLzS.js → logDeviceInfo-BqSbYo5l.js} +9 -9
- package/dist/browser/{mobx-D3NQFhEq.js → mobx-9NGoPiek.js} +4 -4
- package/dist/browser/{mobx.module-CAKsDOYI.js → mobx.module-BP1vMHLz.js} +1 -1
- package/dist/browser/{optional-boolean-editor-IR9THgLK.js → optional-boolean-editor-D6hR19BE.js} +3 -3
- package/dist/browser/{optional-enum-editor-PRQn6yzK.js → optional-enum-editor-BQPM-fRt.js} +4 -4
- package/dist/browser/{optional-string-editor-bZCuZ1tn.js → optional-string-editor-DUXoDnXB.js} +4 -4
- package/dist/browser/{particles.min-CwWuVwyg.js → particles.min-CBeInmmW.js} +2 -2
- package/dist/browser/{react-DQVTc7xG.js → react-Dg88gKA7.js} +2 -2
- package/dist/browser/{react-dom-BsqqKfoG.js → react-dom-C3PpoQeD.js} +3 -3
- package/dist/browser/{rolldown-runtime-Cyn7iuGp.js → rolldown-runtime-C7pJ6q0h.js} +1 -1
- package/dist/browser/{scene-CqJCEbSr.js → scene-CV1XFwO9.js} +12 -12
- package/dist/browser/{scheduler-CVY86sNW.js → scheduler-D-EvNbvQ.js} +2 -2
- package/dist/browser/{select-Du3T8Mpj.js → select-CQPuihmE.js} +10 -10
- package/dist/browser/{settings-NB72PTux.js → settings-BBn9P5W0.js} +2 -2
- package/dist/browser/{settings-item-BIPeCHmD.js → settings-item-BOVedxqA.js} +6 -6
- package/dist/browser/{store-BvnDl4Sc.js → store-D73yMRu5.js} +2 -2
- package/dist/browser/{string-editor-o-TMbaK8.js → string-editor-Drmcb4Uw.js} +4 -4
- package/dist/browser/{text-field-BZ5346fV.js → text-field-CnzYOUfF.js} +5 -5
- package/dist/browser/{theme-CPcxdYz7.js → theme-B4d7ReQC.js} +8 -8
- package/dist/browser/{ui-CesJTtUW.js → ui-DQ22eDdk.js} +8 -8
- package/dist/browser/useManageTraffic-C-4Maw9l.js +1439 -0
- package/dist/browser/{useRenderTarget-DpLNpx1f.js → useRenderTarget-BaCkqntS.js} +4 -4
- package/dist/browser/{viewport-QrHclV_L.js → viewport-CcbGLmJI.js} +3 -3
- package/dist/browser/{wayfinding-v9-TVwHq.js → wayfinding-4TI6Xwmj.js} +416 -383
- package/dist/esm/components/Kiosk/KioskStore.d.ts +5 -0
- package/dist/esm/components/Kiosk/KioskStore.js +1 -1
- package/dist/esm/components/Map/drawing/config/TextFitter.d.ts +2 -2
- package/dist/esm/components/Map/drawing/config/TextFitter.js +1 -1
- package/dist/esm/components/Map/drawing/config/canvases.d.ts +90 -2
- package/dist/esm/components/Map/drawing/config/canvases.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-all.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-booth-badge.d.ts +3 -3
- package/dist/esm/components/Map/drawing/config/config-booth-bookmark.d.ts +1 -1
- package/dist/esm/components/Map/drawing/config/config-booth-bookmark.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-booth-labels-special.d.ts +3 -4
- package/dist/esm/components/Map/drawing/config/config-booth-labels-special.js +2 -2
- package/dist/esm/components/Map/drawing/config/config-booth-labels.d.ts +2 -2
- package/dist/esm/components/Map/drawing/config/config-booth-labels.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-markers.d.ts +17 -1
- package/dist/esm/components/Map/drawing/config/config-markers.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-pins.d.ts +40 -0
- package/dist/esm/components/Map/drawing/config/config-pins.js +1 -0
- package/dist/esm/components/Map/drawing/config/pin-geometry.d.ts +65 -0
- package/dist/esm/components/Map/drawing/config/pin-geometry.js +1 -0
- package/dist/esm/components/Map/traffic/useBuildRoute.d.ts +1 -1
- package/dist/esm/components/Map/traffic/useBuildRoute.js +4 -4
- package/dist/esm/components/Map/traffic/useManageTraffic.js +1 -1
- package/dist/esm/engine/defs.d.ts +5 -0
- package/dist/esm/engine/defs.js +3 -3
- package/dist/esm/engine/update-def.d.ts +13 -1
- package/dist/esm/engine/update-def.js +1 -1
- package/dist/esm/services/url-dispatch.js +1 -1
- package/dist/esm/store/init/init-heatmap.d.ts +1 -1
- package/dist/esm/store/init/init-heatmap.js +1 -1
- package/dist/esm/store/search-buttons/SearchButtonsActions.d.ts +9 -0
- package/dist/esm/store/search-buttons/SearchButtonsActions.js +1 -1
- package/dist/esm/store/search-buttons/SearchButtonsStore.d.ts +15 -0
- package/dist/esm/store/search-buttons/SearchButtonsStore.js +1 -1
- package/dist/esm/test/store-harness.d.ts +13 -0
- package/dist/esm/test/store-harness.js +1 -1
- package/dist/esm/utils/dimming.js +1 -1
- package/dist/esm/wayfinding/adapters/canvasIconProvider.js +1 -1
- package/dist/esm/wayfinding/handlers/kioskHandler.js +1 -1
- package/dist/esm/wayfinding/handlers/yahHandler.js +1 -1
- package/package.json +10 -10
- package/dist/browser/dimming-B7lpw_UN.js +0 -1214
- package/dist/esm/engine/canvases.d.ts +0 -5
- package/dist/esm/engine/canvases.js +0 -1
|
@@ -1,85 +1,85 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
try {
|
|
3
3
|
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
|
-
e.SENTRY_RELEASE = { id: "3.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.45.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "
|
|
6
|
+
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "87608407-0c87-4a9d-80e4-b8d7cec1d3f0", e._sentryDebugIdIdentifier = "sentry-dbid-87608407-0c87-4a9d-80e4-b8d7cec1d3f0");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e, t } from "./rolldown-runtime-
|
|
10
|
-
import { o as n } from "./is-debug-
|
|
11
|
-
import { i as r, l as i } from "./mobx.module-
|
|
12
|
-
import {
|
|
9
|
+
import { r as e, t } from "./rolldown-runtime-C7pJ6q0h.js";
|
|
10
|
+
import { o as n } from "./is-debug-Bnj4naYd.js";
|
|
11
|
+
import { i as r, l as i } from "./mobx.module-BP1vMHLz.js";
|
|
12
|
+
import { $t as a, Ct as o, Dt as s, Et as c, Ot as l, Ut as u, Wt as d, Xt as f, _t as p, an as m, cn as h, ft as g, nn as _, nt as v, on as y, rn as b, sn as x, tn as S, vt as C, wt as w, xt as T, yt as E } from "./LayerStore-BifpIwHB.js";
|
|
13
13
|
//#region ../geometry/src/lib/geo.ts
|
|
14
|
-
var
|
|
15
|
-
function
|
|
16
|
-
let n =
|
|
17
|
-
return
|
|
14
|
+
var D = 6371e3;
|
|
15
|
+
function O(e, t) {
|
|
16
|
+
let n = m(e.lat), r = m(t.lat), i = m(t.lat - e.lat), a = m(t.lng - e.lng), o = Math.sin(i / 2) * Math.sin(i / 2) + Math.cos(n) * Math.cos(r) * Math.sin(a / 2) * Math.sin(a / 2);
|
|
17
|
+
return D * (2 * Math.atan2(Math.sqrt(o), Math.sqrt(1 - o)));
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
let n =
|
|
21
|
-
return (
|
|
19
|
+
function k(e, t) {
|
|
20
|
+
let n = m(e.lat), r = m(t.lat), i = m(t.lng - e.lng), a = Math.sin(i) * Math.cos(r), o = Math.cos(n) * Math.sin(r) - Math.sin(n) * Math.cos(r) * Math.cos(i);
|
|
21
|
+
return (h(Math.atan2(a, o)) + 360) % 360;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
let r = t /
|
|
23
|
+
function A(e, t, n) {
|
|
24
|
+
let r = t / D, i = m(n), a = m(e.lat), o = m(e.lng), s = Math.asin(Math.sin(a) * Math.cos(r) + Math.cos(a) * Math.sin(r) * Math.cos(i)), c = o + Math.atan2(Math.sin(i) * Math.sin(r) * Math.cos(a), Math.cos(r) - Math.sin(a) * Math.sin(s));
|
|
25
25
|
return {
|
|
26
|
-
lat:
|
|
27
|
-
lng:
|
|
26
|
+
lat: h(s),
|
|
27
|
+
lng: h(x(c))
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
let r = n.local.x - t.local.x, i = n.local.y - t.local.y, a = Math.sqrt(r * r + i * i), o = e.x - t.local.x, s = e.y - t.local.y, c = Math.sqrt(o * o + s * s), l =
|
|
32
|
-
return
|
|
30
|
+
function j(e, t, n) {
|
|
31
|
+
let r = n.local.x - t.local.x, i = n.local.y - t.local.y, a = Math.sqrt(r * r + i * i), o = e.x - t.local.x, s = e.y - t.local.y, c = Math.sqrt(o * o + s * s), l = h(Math.atan2(i, r)), u = h(Math.atan2(s, o)) - l, d = (a === 0 ? 0 : c / a) * O(t.geo, n.geo), f = k(t.geo, n.geo);
|
|
32
|
+
return A(t.geo, d, f + u);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
let r =
|
|
34
|
+
function M(e, t, n) {
|
|
35
|
+
let r = O(t.geo, n.geo), i = k(t.geo, n.geo), a = O(t.geo, e), o = k(t.geo, e) - i, s = r === 0 ? 0 : a / r, c = n.local.x - t.local.x, l = n.local.y - t.local.y, u = Math.sqrt(c * c + l * l), d = Math.atan2(l, c), f = y(u * s, d + m(o));
|
|
36
36
|
return {
|
|
37
|
-
x: t.local.x +
|
|
38
|
-
y: t.local.y +
|
|
37
|
+
x: t.local.x + f.x,
|
|
38
|
+
y: t.local.y + f.y
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region ../geometry/src/lib/line.ts
|
|
43
|
-
function
|
|
44
|
-
return
|
|
43
|
+
function N(e) {
|
|
44
|
+
return _(e.p0, e.p1);
|
|
45
45
|
}
|
|
46
46
|
function ee(e, t) {
|
|
47
|
-
return
|
|
47
|
+
return b(e.p0, e.p1, .5, t);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function P(e, t) {
|
|
50
50
|
return Math.atan2(t.y - e.y, t.x - e.x);
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function F(e, t, n) {
|
|
53
53
|
var r;
|
|
54
|
-
let i = e.p0.x, a = e.p0.y, o = e.p1.x, s = e.p1.y, c = t.x, l = t.y, u = o - i,
|
|
55
|
-
|
|
56
|
-
let
|
|
54
|
+
let i = e.p0.x, a = e.p0.y, o = e.p1.x, s = e.p1.y, c = t.x, l = t.y, u = o - i, d = s - a, f = u * u + d * d, p;
|
|
55
|
+
f === 0 ? p = 0 : (p = ((c - i) * u + (l - a) * d) / f, p = p < 0 ? 0 : p > 1 ? 1 : p);
|
|
56
|
+
let m = (n == null ? new S() : n).set(i + u * p, a + d * p, (r = e.elevation) == null ? 0 : r), h = _({
|
|
57
57
|
x: c,
|
|
58
58
|
y: l
|
|
59
|
-
},
|
|
59
|
+
}, m);
|
|
60
60
|
return {
|
|
61
|
-
projected:
|
|
62
|
-
t:
|
|
63
|
-
distance:
|
|
61
|
+
projected: m,
|
|
62
|
+
t: p,
|
|
63
|
+
distance: h
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
66
|
//#endregion
|
|
67
67
|
//#region src/data/fpGeo.ts
|
|
68
|
-
function
|
|
69
|
-
return
|
|
68
|
+
function I() {
|
|
69
|
+
return u().__fpGeo;
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
72
|
//#region src/utils/planBearing.ts
|
|
73
|
-
function
|
|
73
|
+
function te(e) {
|
|
74
74
|
return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + e * Math.PI / 360))) / 360;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
let n = (Math.atan2(
|
|
76
|
+
function ne(e, t) {
|
|
77
|
+
let n = (Math.atan2(te(t.lat) - te(e.lat), (t.lng - e.lng) / 360) - Math.atan2(t.y - e.y, t.x - e.x)) * 180 / Math.PI % 360;
|
|
78
78
|
return Number.isFinite(n) ? (n + 360) % 360 : NaN;
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
|
81
81
|
//#region src/utils/gps.ts
|
|
82
|
-
function
|
|
82
|
+
function L(e) {
|
|
83
83
|
return [{
|
|
84
84
|
local: {
|
|
85
85
|
x: e.p0.x,
|
|
@@ -100,34 +100,34 @@ function ne(e) {
|
|
|
100
100
|
}
|
|
101
101
|
}];
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function R(e) {
|
|
104
104
|
return typeof e == "number" && Number.isFinite(e);
|
|
105
105
|
}
|
|
106
106
|
function re({ lat: e, lng: t, angle: r }, i) {
|
|
107
|
-
if (!(
|
|
108
|
-
let { p0: a, p2: o } = i, s =
|
|
109
|
-
if (!
|
|
107
|
+
if (!(R(e) && R(t))) return null;
|
|
108
|
+
let { p0: a, p2: o } = i, s = O(a, o);
|
|
109
|
+
if (!R(s) || s <= 0) return n.warn("Invalid GPS config: zero or negative distance", {
|
|
110
110
|
fullGpsDistance: s,
|
|
111
111
|
p0: a,
|
|
112
112
|
p2: o
|
|
113
113
|
}), null;
|
|
114
|
-
let [c, l] =
|
|
114
|
+
let [c, l] = L(i), u = M({
|
|
115
115
|
lat: e,
|
|
116
116
|
lng: t
|
|
117
117
|
}, c, l);
|
|
118
|
-
return
|
|
118
|
+
return N({
|
|
119
119
|
p0: u,
|
|
120
120
|
p1: ee({
|
|
121
121
|
p0: a,
|
|
122
122
|
p1: o
|
|
123
123
|
})
|
|
124
|
-
}) > 5 *
|
|
124
|
+
}) > 5 * _(a, o) ? (n.warn("Current position too far"), null) : {
|
|
125
125
|
...u,
|
|
126
126
|
angle: r
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
function ie(e, t, n) {
|
|
130
|
-
let [r, i] =
|
|
130
|
+
let [r, i] = L(n), { lat: a, lng: o } = j({
|
|
131
131
|
x: e,
|
|
132
132
|
y: t
|
|
133
133
|
}, r, i);
|
|
@@ -135,7 +135,7 @@ function ie(e, t, n) {
|
|
|
135
135
|
}
|
|
136
136
|
function ae(e) {
|
|
137
137
|
var t, n;
|
|
138
|
-
let r = (t =
|
|
138
|
+
let r = (t = I()) == null || (t = t.properties) == null ? void 0 : t.config, i = r ? ne(r.p0, r.p2) : NaN, a = Number.isFinite(i) ? i : (n = r == null ? void 0 : r.bearing) == null ? 0 : n;
|
|
139
139
|
return (e == null ? void 0 : e.angle) === null ? 0 : (((e.angle - a) % 360 + 360) % 360 - 90 + 360) % 360;
|
|
140
140
|
}
|
|
141
141
|
//#endregion
|
|
@@ -207,7 +207,7 @@ var se = /* @__PURE__ */ t(((e, t) => {
|
|
|
207
207
|
var n = se();
|
|
208
208
|
function r(e) {
|
|
209
209
|
if (e = e || {}, "uniqueLinkId" in e && (console.warn("ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\nUse `multigraph` option instead\n", "\n", "Note: there is also change in default behavior: From now on each graph\nis considered to be not a multigraph by default (each edge is unique)."), e.multigraph = e.uniqueLinkId), e.multigraph === void 0 && (e.multigraph = !1), typeof Map != "function") throw Error("ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph");
|
|
210
|
-
var t = /* @__PURE__ */ new Map(), r = [], l = {}, u = 0, d = e.multigraph ? E : T, f = [], p =
|
|
210
|
+
var t = /* @__PURE__ */ new Map(), r = [], l = {}, u = 0, d = e.multigraph ? E : T, f = [], p = I, m = I, h = I, g = I, _ = {
|
|
211
211
|
addNode: x,
|
|
212
212
|
addLink: w,
|
|
213
213
|
removeLink: A,
|
|
@@ -218,12 +218,12 @@ var se = /* @__PURE__ */ t(((e, t) => {
|
|
|
218
218
|
getLinksCount: O,
|
|
219
219
|
getNodesCount: D,
|
|
220
220
|
getLinks: k,
|
|
221
|
-
forEachNode:
|
|
222
|
-
forEachLinkedNode:
|
|
223
|
-
forEachLink:
|
|
221
|
+
forEachNode: L,
|
|
222
|
+
forEachLinkedNode: ee,
|
|
223
|
+
forEachLink: N,
|
|
224
224
|
beginUpdate: h,
|
|
225
225
|
endUpdate: g,
|
|
226
|
-
clear:
|
|
226
|
+
clear: M,
|
|
227
227
|
hasLink: j,
|
|
228
228
|
hasNode: S,
|
|
229
229
|
getLink: j
|
|
@@ -233,7 +233,7 @@ var se = /* @__PURE__ */ t(((e, t) => {
|
|
|
233
233
|
var e = _.on;
|
|
234
234
|
_.on = t;
|
|
235
235
|
function t() {
|
|
236
|
-
return _.beginUpdate = h =
|
|
236
|
+
return _.beginUpdate = h = te, _.endUpdate = g = ne, p = y, m = b, _.on = e, e.apply(_, arguments);
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
function y(e, t) {
|
|
@@ -312,39 +312,39 @@ var se = /* @__PURE__ */ t(((e, t) => {
|
|
|
312
312
|
}
|
|
313
313
|
return null;
|
|
314
314
|
}
|
|
315
|
-
function
|
|
316
|
-
h(),
|
|
315
|
+
function M() {
|
|
316
|
+
h(), L(function(e) {
|
|
317
317
|
C(e.id);
|
|
318
318
|
}), g();
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function N(e) {
|
|
321
321
|
var t, n;
|
|
322
322
|
if (typeof e == "function") for (t = 0, n = r.length; t < n; ++t) e(r[t]);
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function ee(e, t, n) {
|
|
325
325
|
var r = S(e);
|
|
326
|
-
if (r && r.links && typeof t == "function") return n ?
|
|
326
|
+
if (r && r.links && typeof t == "function") return n ? F(r.links, e, t) : P(r.links, e, t);
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function P(e, n, r) {
|
|
329
329
|
for (var i, a = 0; a < e.length; ++a) {
|
|
330
330
|
var o = e[a], s = o.fromId === n ? o.toId : o.fromId;
|
|
331
331
|
if (i = r(t.get(s), o), i) return !0;
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function F(e, n, r) {
|
|
335
335
|
for (var i, a = 0; a < e.length; ++a) {
|
|
336
336
|
var o = e[a];
|
|
337
337
|
if (o.fromId === n && (i = r(t.get(o.toId), o), i)) return !0;
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
function
|
|
341
|
-
function
|
|
340
|
+
function I() {}
|
|
341
|
+
function te() {
|
|
342
342
|
u += 1;
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function ne() {
|
|
345
345
|
--u, u === 0 && f.length > 0 && (_.fire("changed", f), f.length = 0);
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function L(e) {
|
|
348
348
|
if (typeof e != "function") throw Error("Function is expected to iterate over graph nodes. You passed " + e);
|
|
349
349
|
for (var n = t.values(), r = n.next(); !r.done;) {
|
|
350
350
|
if (e(r.value)) return !0;
|
|
@@ -371,20 +371,20 @@ var se = /* @__PURE__ */ t(((e, t) => {
|
|
|
371
371
|
function c(e, t) {
|
|
372
372
|
return e.toString() + "👉 " + t.toString();
|
|
373
373
|
}
|
|
374
|
-
})))(), 1),
|
|
374
|
+
})))(), 1), z = (e) => {
|
|
375
375
|
var t;
|
|
376
376
|
return `${(t = e.layer) == null ? "" : t}_${e.x}_${e.y}`;
|
|
377
|
-
}, le = 1,
|
|
377
|
+
}, le = 1, B = (e, t) => {
|
|
378
378
|
var n, r;
|
|
379
|
-
return ((n = e.layer) == null ? "" : n) === ((r = t.layer) == null ? "" : r) &&
|
|
380
|
-
}, ue = (e, t, n) =>
|
|
379
|
+
return ((n = e.layer) == null ? "" : n) === ((r = t.layer) == null ? "" : r) && _(e, t) <= le;
|
|
380
|
+
}, ue = (e, t, n) => B(e.p0, t) && B(e.p1, n) || B(e.p0, n) && B(e.p1, t);
|
|
381
381
|
function de(e, t, n) {
|
|
382
382
|
return e.find((e) => ue(e, t, n));
|
|
383
383
|
}
|
|
384
|
-
var fe =
|
|
384
|
+
var fe = m(5);
|
|
385
385
|
function pe(e, t) {
|
|
386
386
|
if (e.virtual !== t.virtual) return !1;
|
|
387
|
-
let n =
|
|
387
|
+
let n = P(e.p0, e.p1), r = P(t.p0, t.p1), i = Math.abs(r - n);
|
|
388
388
|
return i > Math.PI && (i = 2 * Math.PI - i), i <= fe;
|
|
389
389
|
}
|
|
390
390
|
function me(e, t) {
|
|
@@ -392,7 +392,7 @@ function me(e, t) {
|
|
|
392
392
|
for (let r = 1; r < e.length; r++) {
|
|
393
393
|
let i = e[r - 1], a = e[r], o = de(t, i, a);
|
|
394
394
|
if (!o) {
|
|
395
|
-
console.warn(`WF: buildRouteSegments — no line found between ${
|
|
395
|
+
console.warn(`WF: buildRouteSegments — no line found between ${z(i)} and ${z(a)}`);
|
|
396
396
|
continue;
|
|
397
397
|
}
|
|
398
398
|
let s = {
|
|
@@ -413,7 +413,7 @@ var he = 1e4, ge = 1.01;
|
|
|
413
413
|
//#endregion
|
|
414
414
|
//#region ../wayfinding/src/core/graph/linkCost.ts
|
|
415
415
|
function _e(e) {
|
|
416
|
-
return
|
|
416
|
+
return _(e.p0, e.p1) / (e.weight || 4);
|
|
417
417
|
}
|
|
418
418
|
function ve(e) {
|
|
419
419
|
var t, n;
|
|
@@ -428,7 +428,7 @@ function be(e, t) {
|
|
|
428
428
|
let { oriented: n, onlyAccessible: r } = t, i = (0, ce.default)();
|
|
429
429
|
for (let t of e) {
|
|
430
430
|
if (r && t.unaccessible) continue;
|
|
431
|
-
let e =
|
|
431
|
+
let e = z(t.p0), a = z(t.p1), o = ye(t);
|
|
432
432
|
i.addLink(e, a, { distance: o }), n && !t.unidirection && i.addLink(a, e, { distance: o });
|
|
433
433
|
}
|
|
434
434
|
return i;
|
|
@@ -437,7 +437,7 @@ function be(e, t) {
|
|
|
437
437
|
//#region ../wayfinding/src/core/graph/utils/a-star/defaultSettings.js
|
|
438
438
|
var xe = [];
|
|
439
439
|
typeof Object.freeze == "function" && Object.freeze(xe);
|
|
440
|
-
var
|
|
440
|
+
var V = {
|
|
441
441
|
heuristic: Se,
|
|
442
442
|
distance: Ce,
|
|
443
443
|
blocked: we,
|
|
@@ -497,8 +497,8 @@ function Me() {
|
|
|
497
497
|
}
|
|
498
498
|
//#endregion
|
|
499
499
|
//#region ../wayfinding/src/core/graph/utils/a-star/NodeHeap.js
|
|
500
|
-
function
|
|
501
|
-
if (!(this instanceof
|
|
500
|
+
function H(e, t) {
|
|
501
|
+
if (!(this instanceof H)) return new H(e, t);
|
|
502
502
|
if (Array.isArray(e) || (t = e, e = []), t = t || {}, this.data = e || [], this.length = this.data.length, this.compare = t.compare || Pe, this.setNodeId = t.setNodeId || Ne, this.length > 0) for (let e = this.length >> 1; e >= 0; e--) this._down(e);
|
|
503
503
|
if (t.setNodeId) for (let e = 0; e < this.length; ++e) this.setNodeId(this.data[e], e);
|
|
504
504
|
}
|
|
@@ -506,7 +506,7 @@ function Ne() {}
|
|
|
506
506
|
function Pe(e, t) {
|
|
507
507
|
return e - t;
|
|
508
508
|
}
|
|
509
|
-
|
|
509
|
+
H.prototype = {
|
|
510
510
|
push: function(e) {
|
|
511
511
|
this.data.push(e), this.setNodeId(e, this.length), this.length++, this._up(this.length - 1);
|
|
512
512
|
},
|
|
@@ -542,15 +542,15 @@ B.prototype = {
|
|
|
542
542
|
};
|
|
543
543
|
//#endregion
|
|
544
544
|
//#region ../wayfinding/src/core/graph/utils/a-star/a-star.js
|
|
545
|
-
var Fe =
|
|
545
|
+
var Fe = V.NO_PATH;
|
|
546
546
|
function Ie(e, t) {
|
|
547
547
|
t = t || {};
|
|
548
548
|
let n = t.oriented, r = t.blocked;
|
|
549
|
-
r || (r =
|
|
549
|
+
r || (r = V.blocked);
|
|
550
550
|
let i = t.heuristic;
|
|
551
|
-
i || (i =
|
|
551
|
+
i || (i = V.heuristic);
|
|
552
552
|
let a = t.distance;
|
|
553
|
-
a || (a =
|
|
553
|
+
a || (a = V.distance);
|
|
554
554
|
let o = Me();
|
|
555
555
|
return { find: s };
|
|
556
556
|
function s(t, s) {
|
|
@@ -559,9 +559,9 @@ function Ie(e, t) {
|
|
|
559
559
|
let l = e.getNode(s);
|
|
560
560
|
if (!l) throw Error("toId is not defined in this graph: " + s);
|
|
561
561
|
o.reset();
|
|
562
|
-
let u = /* @__PURE__ */ new Map(), d = new
|
|
563
|
-
compare:
|
|
564
|
-
setNodeId:
|
|
562
|
+
let u = /* @__PURE__ */ new Map(), d = new H({
|
|
563
|
+
compare: V.compareFScore,
|
|
564
|
+
setNodeId: V.setHeapIndex
|
|
565
565
|
}), f = o.createNewState(c);
|
|
566
566
|
u.set(t, f), f.fScore = i(c, l), f.distanceToSource = 0, d.push(f), f.open = 1;
|
|
567
567
|
let p;
|
|
@@ -588,7 +588,7 @@ function Re(e) {
|
|
|
588
588
|
}
|
|
589
589
|
//#endregion
|
|
590
590
|
//#region ../wayfinding/src/core/graph/pathfinder/parseNodeId.ts
|
|
591
|
-
function
|
|
591
|
+
function U(e) {
|
|
592
592
|
let t = e.lastIndexOf("_"), n = e.lastIndexOf("_", t - 1);
|
|
593
593
|
if (n === -1) throw Error(`WF: invalid node ID format "${e}", expected "{layer}_{x}_{y}"`);
|
|
594
594
|
return [
|
|
@@ -603,14 +603,14 @@ function ze() {
|
|
|
603
603
|
return function(e, t, n) {
|
|
604
604
|
let r = 1;
|
|
605
605
|
if (t.parent) {
|
|
606
|
-
let [, n, i] =
|
|
607
|
-
|
|
606
|
+
let [, n, i] = U(t.parent.node.id), [, a, o] = U(t.node.id), [, s, c] = U(e.id);
|
|
607
|
+
P({
|
|
608
608
|
x: n,
|
|
609
609
|
y: i
|
|
610
610
|
}, {
|
|
611
611
|
x: a,
|
|
612
612
|
y: o
|
|
613
|
-
}) !==
|
|
613
|
+
}) !== P({
|
|
614
614
|
x: a,
|
|
615
615
|
y: o
|
|
616
616
|
}, {
|
|
@@ -637,7 +637,7 @@ function Be() {
|
|
|
637
637
|
if (!e) return [];
|
|
638
638
|
let r = e.find(t, n);
|
|
639
639
|
return r.length ? r.map((e) => {
|
|
640
|
-
let [t, n, r] =
|
|
640
|
+
let [t, n, r] = U(e.id);
|
|
641
641
|
return {
|
|
642
642
|
id: e.id,
|
|
643
643
|
layer: t,
|
|
@@ -661,8 +661,8 @@ function Ve() {
|
|
|
661
661
|
}
|
|
662
662
|
//#endregion
|
|
663
663
|
//#region ../wayfinding/src/core/routing/getRouteLength.ts
|
|
664
|
-
function
|
|
665
|
-
return e.reduce((e, t) => e +
|
|
664
|
+
function W(e) {
|
|
665
|
+
return e.reduce((e, t) => e + _(t.p0, t.p1), 0);
|
|
666
666
|
}
|
|
667
667
|
//#endregion
|
|
668
668
|
//#region ../wayfinding/src/core/graph/findShortestPath.ts
|
|
@@ -684,7 +684,7 @@ function Ue(e, t) {
|
|
|
684
684
|
function We(e, t, n) {
|
|
685
685
|
let r = e.dataSource.getLines(), i = null, a = Infinity;
|
|
686
686
|
for (let o of t) for (let t of n) {
|
|
687
|
-
let n =
|
|
687
|
+
let n = z(o), s = z(t);
|
|
688
688
|
if (!e.finder.hasNode(n) || !e.finder.hasNode(s)) {
|
|
689
689
|
console.debug(`WF. findShortestPath: node not in graph, skipping pair ${n} → ${s}`);
|
|
690
690
|
continue;
|
|
@@ -696,33 +696,33 @@ function We(e, t, n) {
|
|
|
696
696
|
let d = Ue(l, r);
|
|
697
697
|
d < a && (a = d, i = {
|
|
698
698
|
lines: u,
|
|
699
|
-
distance:
|
|
699
|
+
distance: W(u)
|
|
700
700
|
});
|
|
701
701
|
}
|
|
702
702
|
return i;
|
|
703
703
|
}
|
|
704
704
|
//#endregion
|
|
705
705
|
//#region ../wayfinding/src/core/routing/routeResult.ts
|
|
706
|
-
var
|
|
706
|
+
var G = () => ({
|
|
707
707
|
lines: [],
|
|
708
708
|
totalDistance: 0
|
|
709
709
|
});
|
|
710
710
|
//#endregion
|
|
711
711
|
//#region ../wayfinding/src/core/routing/buildRoute.ts
|
|
712
712
|
function Ge(e, t, n) {
|
|
713
|
-
if (!t.length || !n.length) return
|
|
713
|
+
if (!t.length || !n.length) return G();
|
|
714
714
|
let r = We(e, t, n);
|
|
715
715
|
return r ? {
|
|
716
716
|
lines: r.lines,
|
|
717
717
|
totalDistance: r.distance
|
|
718
|
-
} :
|
|
718
|
+
} : G();
|
|
719
719
|
}
|
|
720
720
|
//#endregion
|
|
721
721
|
//#region ../wayfinding/src/core/routing/buildMultiPointRoute.ts
|
|
722
722
|
function Ke(e, t) {
|
|
723
|
-
if (t.length < 2) return
|
|
723
|
+
if (t.length < 2) return G();
|
|
724
724
|
let n = t.filter((e, n) => n === 0 || n === t.length - 1 || e.length > 0);
|
|
725
|
-
if (n.length < 2) return
|
|
725
|
+
if (n.length < 2) return G();
|
|
726
726
|
if (n.length === 2) return Ge(e, n[0], n[1]);
|
|
727
727
|
let r = [];
|
|
728
728
|
for (let t = 0; t < n.length - 1; t++) r.push(Ge(e, n[t], n[t + 1]));
|
|
@@ -783,7 +783,7 @@ function Qe(e, t) {
|
|
|
783
783
|
//#endregion
|
|
784
784
|
//#region ../wayfinding/src/core/geometry/projectPointOnSegment.ts
|
|
785
785
|
function $e(e, t, n) {
|
|
786
|
-
let { projected: r, distance: i, t: a } =
|
|
786
|
+
let { projected: r, distance: i, t: a } = F({
|
|
787
787
|
p0: t,
|
|
788
788
|
p1: n
|
|
789
789
|
}, e);
|
|
@@ -862,11 +862,11 @@ function at(e, t) {
|
|
|
862
862
|
}
|
|
863
863
|
//#endregion
|
|
864
864
|
//#region ../wayfinding/src/core/createWayfindingEngine.ts
|
|
865
|
-
var ot = 1e-6,
|
|
865
|
+
var ot = 1e-6, K = (e, t) => e.layer === t.layer && Math.abs(e.x - t.x) < ot && Math.abs(e.y - t.y) < ot;
|
|
866
866
|
function st(e, t) {
|
|
867
867
|
if (!e.length) return e;
|
|
868
|
-
let n = e[0], r = n.p0, i =
|
|
869
|
-
return
|
|
868
|
+
let n = e[0], r = n.p0, i = K(t.segment.p0, r) ? t.segment.p1 : t.segment.p0;
|
|
869
|
+
return K(n.p1, i) ? [{
|
|
870
870
|
...n,
|
|
871
871
|
p0: t.projection
|
|
872
872
|
}, ...e.slice(1)] : [{
|
|
@@ -877,8 +877,8 @@ function st(e, t) {
|
|
|
877
877
|
}
|
|
878
878
|
function ct(e, t) {
|
|
879
879
|
if (!e.length) return e;
|
|
880
|
-
let n = e[e.length - 1], r = n.p1, i =
|
|
881
|
-
return
|
|
880
|
+
let n = e[e.length - 1], r = n.p1, i = K(t.segment.p0, r) ? t.segment.p1 : t.segment.p0;
|
|
881
|
+
return K(n.p0, i) ? [...e.slice(0, -1), {
|
|
882
882
|
...n,
|
|
883
883
|
p1: t.projection
|
|
884
884
|
}] : [...e, {
|
|
@@ -899,7 +899,7 @@ function ut(e) {
|
|
|
899
899
|
let o = t.getOrBuild(e, (a = i == null ? void 0 : i.accessible) != null && a), s = at(o, n), c = at(o, r), l = Ge(o, s.candidates, c.candidates), u = !!s.offGraphEntry || !!c.offGraphEntry, d = lt(l.lines, s.offGraphEntry, c.offGraphEntry);
|
|
900
900
|
return {
|
|
901
901
|
lines: d,
|
|
902
|
-
distance: u ?
|
|
902
|
+
distance: u ? W(d) : l.totalDistance
|
|
903
903
|
};
|
|
904
904
|
},
|
|
905
905
|
buildWaypointsRoute(n, r) {
|
|
@@ -911,7 +911,7 @@ function ut(e) {
|
|
|
911
911
|
let a = t.getOrBuild(e, (i = r == null ? void 0 : r.accessible) != null && i), o = (r != null && r.fastest ? Xe(n) : n).map((e) => at(a, e)), s = Ke(a, o.map((e) => e.candidates)), c = o[0].offGraphEntry, l = o[o.length - 1].offGraphEntry, u = !!c || !!l, d = lt(s.lines, c, l);
|
|
912
912
|
return {
|
|
913
913
|
lines: d,
|
|
914
|
-
distance: u ?
|
|
914
|
+
distance: u ? W(d) : s.totalDistance
|
|
915
915
|
};
|
|
916
916
|
}
|
|
917
917
|
};
|
|
@@ -920,7 +920,7 @@ function ut(e) {
|
|
|
920
920
|
//#region ../wayfinding/src/core/rendering/computeTrailPoints.ts
|
|
921
921
|
var dt = .4, ft = 8;
|
|
922
922
|
function pt(e, t, n = ft, r = dt) {
|
|
923
|
-
let i =
|
|
923
|
+
let i = _(t, e);
|
|
924
924
|
if (i === 0 || n <= 0) return [];
|
|
925
925
|
let a = Math.max(Math.ceil(i / n) + 1, 2), o = {
|
|
926
926
|
x: (e.x + t.x) / 2,
|
|
@@ -941,30 +941,30 @@ function mt(e, t, n, r) {
|
|
|
941
941
|
}
|
|
942
942
|
//#endregion
|
|
943
943
|
//#region ../wayfinding/src/core/rendering/computeTransitionPoints.ts
|
|
944
|
-
function
|
|
944
|
+
function q(e, t) {
|
|
945
945
|
return e.toLowerCase() === t.toLowerCase();
|
|
946
946
|
}
|
|
947
947
|
function ht(e, t) {
|
|
948
|
-
return e.findIndex((e) =>
|
|
948
|
+
return e.findIndex((e) => q(e, t));
|
|
949
949
|
}
|
|
950
950
|
function gt(e, t, n) {
|
|
951
951
|
let r = ht(e, t), i = ht(e, n);
|
|
952
952
|
return r === -1 || i === -1 ? "neutral" : i > r ? "up" : "down";
|
|
953
953
|
}
|
|
954
954
|
function _t(e, t, n) {
|
|
955
|
-
return e.find((e) =>
|
|
955
|
+
return e.find((e) => q(e.p0.layer, t) ? !n.has(e.p1.layer.toLowerCase()) : q(e.p1.layer, t) ? !n.has(e.p0.layer.toLowerCase()) : !1);
|
|
956
956
|
}
|
|
957
957
|
function vt(e, t, n, r) {
|
|
958
958
|
if (t.has(r.toLowerCase())) return r;
|
|
959
959
|
let i = r, a = /* @__PURE__ */ new Set([n.toLowerCase(), i.toLowerCase()]), o = _t(e, i, a);
|
|
960
|
-
for (; o && (i =
|
|
960
|
+
for (; o && (i = q(o.p0.layer, i) ? o.p1.layer : o.p0.layer, !t.has(i.toLowerCase()));) a.add(i.toLowerCase()), o = _t(e, i, a);
|
|
961
961
|
return i;
|
|
962
962
|
}
|
|
963
963
|
function yt(e) {
|
|
964
|
-
let { routeLines: t, currentLayerName: n, floorOrder: r } = e, i = t.filter((e) => e.virtual && !
|
|
964
|
+
let { routeLines: t, currentLayerName: n, floorOrder: r } = e, i = t.filter((e) => e.virtual && !q(e.p0.layer, e.p1.layer)), a = /* @__PURE__ */ new Set();
|
|
965
965
|
for (let e of t) e.virtual || (a.add(e.p0.layer.toLowerCase()), a.add(e.p1.layer.toLowerCase()));
|
|
966
|
-
let o = (n ? i.filter((e) =>
|
|
967
|
-
let t = !n ||
|
|
966
|
+
let o = (n ? i.filter((e) => q(e.p0.layer, n) || q(e.p1.layer, n)) : i).map((e) => {
|
|
967
|
+
let t = !n || q(e.p0.layer, n), o = t ? e.p0 : e.p1, s = t ? e.p1 : e.p0, c = vt(i, a, o.layer, s.layer);
|
|
968
968
|
return {
|
|
969
969
|
x: o.x,
|
|
970
970
|
y: o.y,
|
|
@@ -982,13 +982,13 @@ function yt(e) {
|
|
|
982
982
|
//#endregion
|
|
983
983
|
//#region ../wayfinding/src/core/rendering/routeGeometry.ts
|
|
984
984
|
function bt(e) {
|
|
985
|
-
return
|
|
985
|
+
return f.fromPoints(e);
|
|
986
986
|
}
|
|
987
987
|
//#endregion
|
|
988
988
|
//#region ../wayfinding/src/core/position/gpsThreshold.ts
|
|
989
989
|
var xt = 7.5, St = 15, Ct = 20;
|
|
990
990
|
function wt(e, t) {
|
|
991
|
-
let { p0: n, p2: r } = t, i =
|
|
991
|
+
let { p0: n, p2: r } = t, i = O(n, r), a = _(n, r);
|
|
992
992
|
return !i || !a ? 0 : a / i * e;
|
|
993
993
|
}
|
|
994
994
|
var Tt = (e) => {
|
|
@@ -1011,7 +1011,7 @@ function Ot(e) {
|
|
|
1011
1011
|
//#region ../wayfinding/src/core/position/distanceToRoute.ts
|
|
1012
1012
|
function kt(e, t, n, r, i, a) {
|
|
1013
1013
|
let o = i - n, s = a - r, c = e - n, l = t - r, u = o * o + s * s;
|
|
1014
|
-
if (u === 0) return
|
|
1014
|
+
if (u === 0) return _({
|
|
1015
1015
|
x: e,
|
|
1016
1016
|
y: t
|
|
1017
1017
|
}, {
|
|
@@ -1020,13 +1020,13 @@ function kt(e, t, n, r, i, a) {
|
|
|
1020
1020
|
});
|
|
1021
1021
|
let d = (c * o + l * s) / u;
|
|
1022
1022
|
d < 0 ? d = 0 : d > 1 && (d = 1);
|
|
1023
|
-
let f = n + d * o,
|
|
1024
|
-
return
|
|
1023
|
+
let f = n + d * o, p = r + d * s;
|
|
1024
|
+
return _({
|
|
1025
1025
|
x: e,
|
|
1026
1026
|
y: t
|
|
1027
1027
|
}, {
|
|
1028
1028
|
x: f,
|
|
1029
|
-
y:
|
|
1029
|
+
y: p
|
|
1030
1030
|
});
|
|
1031
1031
|
}
|
|
1032
1032
|
function At(e, t) {
|
|
@@ -1054,7 +1054,7 @@ function Mt(e, t, { snapThreshold: n }) {
|
|
|
1054
1054
|
if (!r) return { snapped: !1 };
|
|
1055
1055
|
let i = e.layer || null, a = Infinity, o = null, s = 0, c = i == null;
|
|
1056
1056
|
for (let n = 0; n < r; n++) {
|
|
1057
|
-
let r = t[n], { p0: l, p1: u } = r, d =
|
|
1057
|
+
let r = t[n], { p0: l, p1: u } = r, d = _(l, u);
|
|
1058
1058
|
if (d === 0) continue;
|
|
1059
1059
|
if (i != null && String(l.layer) !== i) {
|
|
1060
1060
|
s += d;
|
|
@@ -1126,72 +1126,81 @@ function Nt(e, t) {
|
|
|
1126
1126
|
}
|
|
1127
1127
|
//#endregion
|
|
1128
1128
|
//#region ../wayfinding/src/renderer/iconManager.ts
|
|
1129
|
-
function Pt(e, t) {
|
|
1130
|
-
|
|
1131
|
-
|
|
1129
|
+
function Pt(e, t, n) {
|
|
1130
|
+
var r, i, a, o;
|
|
1131
|
+
let s = t == null ? parseFloat((r = (i = e.style) == null ? void 0 : i.width) == null ? "" : r) : t, c = n == null ? parseFloat((a = (o = e.style) == null ? void 0 : o.height) == null ? "" : a) : n;
|
|
1132
|
+
if (!(s > 0) || !(c > 0)) throw Error(`renderer: canvas "${e.id}" has no CSS size: pass width and height, or draw it on a canvas whose style records one`);
|
|
1133
|
+
return {
|
|
1134
|
+
width: s,
|
|
1135
|
+
height: c
|
|
1136
|
+
};
|
|
1132
1137
|
}
|
|
1133
|
-
function Ft(e, t, n
|
|
1134
|
-
let
|
|
1135
|
-
|
|
1138
|
+
function Ft(e, t, n) {
|
|
1139
|
+
let r = e.bounds, i = t.width * n, a = t.height * n;
|
|
1140
|
+
if (!(r.size.x === i && r.size.y === a)) return r.set(r.center.x, r.center.y, i, a, r.rotation, r.elevation), [e];
|
|
1141
|
+
}
|
|
1142
|
+
function It(e, t, n, r = !1) {
|
|
1143
|
+
let i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
|
|
1144
|
+
function l(e) {
|
|
1136
1145
|
return e.onTop ? n.currentPosition : n.icons;
|
|
1137
1146
|
}
|
|
1138
|
-
function
|
|
1147
|
+
function u(e, t) {
|
|
1139
1148
|
return t === void 0 ? e : `${e}#${t}`;
|
|
1140
1149
|
}
|
|
1141
|
-
function
|
|
1142
|
-
let n =
|
|
1143
|
-
n || (n = /* @__PURE__ */ new Set(),
|
|
1150
|
+
function d(e, t) {
|
|
1151
|
+
let n = o.get(e);
|
|
1152
|
+
n || (n = /* @__PURE__ */ new Set(), o.set(e, n)), n.add(t), s.set(t, e);
|
|
1144
1153
|
}
|
|
1145
|
-
function
|
|
1146
|
-
let t =
|
|
1154
|
+
function f(e) {
|
|
1155
|
+
let t = s.get(e);
|
|
1147
1156
|
if (!t) return;
|
|
1148
|
-
let n =
|
|
1149
|
-
n && n.delete(e),
|
|
1157
|
+
let n = o.get(t);
|
|
1158
|
+
n && n.delete(e), s.delete(e);
|
|
1150
1159
|
}
|
|
1151
|
-
function p(n,
|
|
1152
|
-
var
|
|
1153
|
-
let h =
|
|
1160
|
+
function p(n, o, s, u = s.rotation) {
|
|
1161
|
+
var f, p, m;
|
|
1162
|
+
let h = l(s), g = Pt(s.canvas, s.width, s.height), _ = (f = s.screenSpace) == null ? r : f;
|
|
1154
1163
|
e.touchLayer(h);
|
|
1155
|
-
let _ = {
|
|
1156
|
-
source: o.canvas,
|
|
1157
|
-
bounds: new f({
|
|
1158
|
-
x: o.x,
|
|
1159
|
-
y: o.y
|
|
1160
|
-
}, It, l),
|
|
1161
|
-
hidden: (p = o.hidden) != null && p,
|
|
1162
|
-
dim: +!!o.dimmed,
|
|
1163
|
-
origin: o.origin,
|
|
1164
|
-
screenSpace: g
|
|
1165
|
-
};
|
|
1166
|
-
o.cardinalSnap && !g && t.attachCardinalSnap(_), _.onScale = ({ pixelSize: e }) => Pt(_, e), h.children.push(_);
|
|
1167
1164
|
let v = {
|
|
1168
|
-
|
|
1165
|
+
source: s.canvas,
|
|
1166
|
+
bounds: new a({
|
|
1167
|
+
x: s.x,
|
|
1168
|
+
y: s.y
|
|
1169
|
+
}, Lt, u),
|
|
1170
|
+
hidden: (p = s.hidden) != null && p,
|
|
1171
|
+
dim: +!!s.dimmed,
|
|
1172
|
+
origin: s.origin,
|
|
1173
|
+
screenSpace: _
|
|
1174
|
+
};
|
|
1175
|
+
s.cardinalSnap && !_ && t.attachCardinalSnap(v), v.onScale = ({ pixelSize: e }) => Ft(v, g, e), h.children.push(v);
|
|
1176
|
+
let y = {
|
|
1177
|
+
imageDef: v,
|
|
1169
1178
|
layer: h,
|
|
1170
|
-
callback: (m =
|
|
1179
|
+
callback: (m = s.onClick) == null ? null : m
|
|
1171
1180
|
};
|
|
1172
|
-
return i.set(n,
|
|
1181
|
+
return i.set(n, y), c.set(v, y), d(o, n), y;
|
|
1173
1182
|
}
|
|
1174
1183
|
function m(t, n, r, a) {
|
|
1175
1184
|
var o;
|
|
1176
|
-
let
|
|
1177
|
-
r.imageDef.hidden = !0, e.touchDef(r.imageDef), l >= 0 &&
|
|
1185
|
+
let s = r.layer.children, l = s.indexOf(r.imageDef), u = (o = a.rotation) == null ? r.imageDef.bounds.rotation : o;
|
|
1186
|
+
r.imageDef.hidden = !0, e.touchDef(r.imageDef), l >= 0 && s.splice(l, 1), e.touchLayer(r.layer), i.delete(t), c.delete(r.imageDef), f(t), p(t, n, a, u);
|
|
1178
1187
|
}
|
|
1179
1188
|
function h(t, r, i, a) {
|
|
1180
|
-
var o, s,
|
|
1181
|
-
if (i.layer !==
|
|
1189
|
+
var o, s, c;
|
|
1190
|
+
if (i.layer !== l(a)) throw Error(`renderer: icon "${t}" cannot move between layers (was onTop=${i.layer === n.currentPosition}, got onTop=${!!a.onTop})`);
|
|
1182
1191
|
if (i.imageDef.source !== a.canvas) {
|
|
1183
1192
|
m(t, r, i, a);
|
|
1184
1193
|
return;
|
|
1185
1194
|
}
|
|
1186
1195
|
let u = i.imageDef.bounds, d = (o = a.rotation) == null ? u.rotation : o;
|
|
1187
|
-
u.set(a.x, a.y, u.size.x, u.size.y, d, u.elevation), i.imageDef.hidden = (s = a.hidden) != null && s, i.imageDef.dim = +!!a.dimmed, i.callback = (
|
|
1196
|
+
u.set(a.x, a.y, u.size.x, u.size.y, d, u.elevation), i.imageDef.hidden = (s = a.hidden) != null && s, i.imageDef.dim = +!!a.dimmed, i.callback = (c = a.onClick) == null ? null : c, e.touchDef(i.imageDef);
|
|
1188
1197
|
}
|
|
1189
1198
|
function g(t) {
|
|
1190
1199
|
t.imageDef.hidden = !0, t.callback = null, e.touchDef(t.imageDef);
|
|
1191
1200
|
}
|
|
1192
1201
|
return {
|
|
1193
1202
|
setIcon(e, t, n) {
|
|
1194
|
-
let r =
|
|
1203
|
+
let r = u(e, n);
|
|
1195
1204
|
if (t === null) {
|
|
1196
1205
|
let e = i.get(r);
|
|
1197
1206
|
e && g(e);
|
|
@@ -1203,7 +1212,7 @@ function Ft(e, t, n, r = !1) {
|
|
|
1203
1212
|
clearIcons(e) {
|
|
1204
1213
|
let t = typeof e == "string" ? [e] : e;
|
|
1205
1214
|
for (let e of t) {
|
|
1206
|
-
let t =
|
|
1215
|
+
let t = o.get(e);
|
|
1207
1216
|
if (t) for (let e of t) {
|
|
1208
1217
|
let t = i.get(e);
|
|
1209
1218
|
t && g(t);
|
|
@@ -1218,25 +1227,25 @@ function Ft(e, t, n, r = !1) {
|
|
|
1218
1227
|
let n = t.layer.children, r = n.indexOf(t.imageDef);
|
|
1219
1228
|
r >= 0 && n.splice(r, 1), e.touchLayer(t.layer);
|
|
1220
1229
|
}
|
|
1221
|
-
i.clear(),
|
|
1230
|
+
i.clear(), c.clear(), o.clear(), s.clear();
|
|
1222
1231
|
},
|
|
1223
1232
|
handleClick(e) {
|
|
1224
|
-
let t =
|
|
1233
|
+
let t = c.get(e);
|
|
1225
1234
|
return !(t != null && t.callback) || t.imageDef.hidden ? !1 : (t.callback(), !0);
|
|
1226
1235
|
},
|
|
1227
1236
|
handleHover(e) {
|
|
1228
|
-
let t =
|
|
1237
|
+
let t = c.get(e);
|
|
1229
1238
|
return !!(t != null && t.callback) && !(t != null && t.imageDef.hidden);
|
|
1230
1239
|
}
|
|
1231
1240
|
};
|
|
1232
1241
|
}
|
|
1233
|
-
var
|
|
1242
|
+
var Lt = {
|
|
1234
1243
|
x: 0,
|
|
1235
1244
|
y: 0
|
|
1236
1245
|
};
|
|
1237
1246
|
//#endregion
|
|
1238
1247
|
//#region ../wayfinding/src/renderer/layerManager.ts
|
|
1239
|
-
function
|
|
1248
|
+
function Rt(e) {
|
|
1240
1249
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
1241
1250
|
return {
|
|
1242
1251
|
touchLayer(e) {
|
|
@@ -1258,8 +1267,8 @@ function Lt(e) {
|
|
|
1258
1267
|
}
|
|
1259
1268
|
//#endregion
|
|
1260
1269
|
//#region ../wayfinding/src/renderer/lineAnimation.ts
|
|
1261
|
-
var
|
|
1262
|
-
function
|
|
1270
|
+
var zt = 1, Bt = 0;
|
|
1271
|
+
function Vt(e, t, n, r = 0) {
|
|
1263
1272
|
let i = 0, a = 0, o = null, s = null;
|
|
1264
1273
|
if (!e.length) return;
|
|
1265
1274
|
let c = e.map((e) => ({
|
|
@@ -1293,9 +1302,9 @@ function Bt(e, t, n, r = 0) {
|
|
|
1293
1302
|
if (u[t] === n) return;
|
|
1294
1303
|
u[t] = n;
|
|
1295
1304
|
let r = e[t], i = c[t];
|
|
1296
|
-
if (r.hidden = n <=
|
|
1305
|
+
if (r.hidden = n <= Bt, !r.hidden) {
|
|
1297
1306
|
let { p0: e, p1: t } = i;
|
|
1298
|
-
r.points = n >=
|
|
1307
|
+
r.points = n >= zt ? i : {
|
|
1299
1308
|
p0: e,
|
|
1300
1309
|
p1: {
|
|
1301
1310
|
x: e.x + (t.x - e.x) * n,
|
|
@@ -1309,9 +1318,9 @@ function Bt(e, t, n, r = 0) {
|
|
|
1309
1318
|
function g() {
|
|
1310
1319
|
d.length = 0;
|
|
1311
1320
|
let n = i;
|
|
1312
|
-
for (let e = 0; e < n; e++) h(e,
|
|
1313
|
-
h(n, Math.min(a / l[n],
|
|
1314
|
-
for (let t = n + 1; t < e.length; t++) h(t,
|
|
1321
|
+
for (let e = 0; e < n; e++) h(e, zt);
|
|
1322
|
+
h(n, Math.min(a / l[n], zt));
|
|
1323
|
+
for (let t = n + 1; t < e.length; t++) h(t, Bt);
|
|
1315
1324
|
d.length && t(d);
|
|
1316
1325
|
}
|
|
1317
1326
|
function _(t) {
|
|
@@ -1351,7 +1360,7 @@ function Bt(e, t, n, r = 0) {
|
|
|
1351
1360
|
}
|
|
1352
1361
|
//#endregion
|
|
1353
1362
|
//#region ../wayfinding/src/renderer/routeLineManager.ts
|
|
1354
|
-
function
|
|
1363
|
+
function Ht({ p0: e, p1: t }, n) {
|
|
1355
1364
|
return {
|
|
1356
1365
|
points: {
|
|
1357
1366
|
p0: {
|
|
@@ -1367,7 +1376,7 @@ function Vt({ p0: e, p1: t }, n) {
|
|
|
1367
1376
|
width: 10
|
|
1368
1377
|
};
|
|
1369
1378
|
}
|
|
1370
|
-
function
|
|
1379
|
+
function Ut(e, t, n, r) {
|
|
1371
1380
|
let i = r.lines, a = r.linesAnimated, o = null, s = 1;
|
|
1372
1381
|
function c(e) {
|
|
1373
1382
|
s = e;
|
|
@@ -1384,16 +1393,16 @@ function Ht(e, t, n, r) {
|
|
|
1384
1393
|
e.touchLayer(i), e.touchLayer(a), a.onScale = ({ pixelSize: e }) => c(e);
|
|
1385
1394
|
let m = (f = d == null ? void 0 : d.resetAnimation) == null || f, h = 0;
|
|
1386
1395
|
o && (m || (h = o.getProgress()), o.stop(), o = null), u(i), u(a);
|
|
1387
|
-
let g = r.map((e) =>
|
|
1396
|
+
let g = r.map((e) => Ht(e, t.passed)), _ = l.map((e) => Ht(e, t.remaining));
|
|
1388
1397
|
if (i.children = [...g, ..._], !_.length) {
|
|
1389
1398
|
a.children = [];
|
|
1390
1399
|
return;
|
|
1391
1400
|
}
|
|
1392
1401
|
let v = l.map((e) => ({
|
|
1393
|
-
...
|
|
1402
|
+
...Ht(e, t.active),
|
|
1394
1403
|
hidden: !0
|
|
1395
1404
|
}));
|
|
1396
|
-
a.children = v, o = (p =
|
|
1405
|
+
a.children = v, o = (p = Vt(v, (e) => n.update(...e), () => s, h)) == null ? null : p;
|
|
1397
1406
|
},
|
|
1398
1407
|
clearLines() {
|
|
1399
1408
|
o && (o.stop(), o = null), l(i), l(a);
|
|
@@ -1405,53 +1414,53 @@ function Ht(e, t, n, r) {
|
|
|
1405
1414
|
}
|
|
1406
1415
|
//#endregion
|
|
1407
1416
|
//#region ../wayfinding/src/renderer/trailManager.ts
|
|
1408
|
-
var
|
|
1409
|
-
function
|
|
1417
|
+
var Wt = 40;
|
|
1418
|
+
function Gt(e, t) {
|
|
1410
1419
|
let n = /* @__PURE__ */ new Map(), r = 1, i = !1;
|
|
1411
|
-
function
|
|
1420
|
+
function o(e) {
|
|
1412
1421
|
r = e;
|
|
1413
1422
|
let i = [], a = !1;
|
|
1414
1423
|
for (let e of n.values()) {
|
|
1415
|
-
let t =
|
|
1424
|
+
let t = l(e);
|
|
1416
1425
|
i.push(...t.changed), a || (a = t.membershipChanged);
|
|
1417
1426
|
}
|
|
1418
1427
|
return a && i.push(t), i.length ? i : void 0;
|
|
1419
1428
|
}
|
|
1420
|
-
function
|
|
1429
|
+
function s(n, r) {
|
|
1421
1430
|
if (!r.length) return;
|
|
1422
1431
|
let i = new Set(r);
|
|
1423
1432
|
for (let e of i) e.hidden = !0;
|
|
1424
1433
|
t.children = t.children.filter((e) => !i.has(e)), e.touchLayer(t);
|
|
1425
1434
|
}
|
|
1426
|
-
function
|
|
1427
|
-
i || (t.onScale = ({ pixelSize: e }) =>
|
|
1428
|
-
}
|
|
1429
|
-
function
|
|
1430
|
-
|
|
1431
|
-
let i =
|
|
1432
|
-
x:
|
|
1433
|
-
y:
|
|
1434
|
-
},
|
|
1435
|
-
for (let e = 0; e <
|
|
1436
|
-
let t =
|
|
1437
|
-
t.set(
|
|
1438
|
-
}
|
|
1439
|
-
if (
|
|
1440
|
-
let n =
|
|
1441
|
-
source:
|
|
1442
|
-
bounds: new
|
|
1435
|
+
function c() {
|
|
1436
|
+
i || (t.onScale = ({ pixelSize: e }) => o(e), i = !0, e.touchLayer(t));
|
|
1437
|
+
}
|
|
1438
|
+
function l(n) {
|
|
1439
|
+
c();
|
|
1440
|
+
let i = Wt * r, o = pt(n.from, n.to, i), l = n.canvas, u = {
|
|
1441
|
+
x: n.width * r,
|
|
1442
|
+
y: n.height * r
|
|
1443
|
+
}, d = n.dotDefs, f = Math.min(d.length, o.length), p = [];
|
|
1444
|
+
for (let e = 0; e < f; e++) {
|
|
1445
|
+
let t = d[e].bounds;
|
|
1446
|
+
t.set(o[e].x, o[e].y, u.x, u.y, t.rotation, t.elevation), p.push(d[e]);
|
|
1447
|
+
}
|
|
1448
|
+
if (o.length > f) {
|
|
1449
|
+
let n = o.slice(f).map((e) => ({
|
|
1450
|
+
source: l,
|
|
1451
|
+
bounds: new a({
|
|
1443
1452
|
x: e.x,
|
|
1444
1453
|
y: e.y
|
|
1445
|
-
},
|
|
1454
|
+
}, u)
|
|
1446
1455
|
}));
|
|
1447
|
-
return t.children.push(...n),
|
|
1456
|
+
return t.children.push(...n), d.push(...n), e.touchLayer(t), {
|
|
1448
1457
|
changed: p,
|
|
1449
1458
|
membershipChanged: !0
|
|
1450
1459
|
};
|
|
1451
1460
|
}
|
|
1452
|
-
if (
|
|
1453
|
-
let e =
|
|
1454
|
-
return
|
|
1461
|
+
if (d.length > f) {
|
|
1462
|
+
let e = d.splice(f);
|
|
1463
|
+
return s(n, e), p.push(...e), {
|
|
1455
1464
|
changed: p,
|
|
1456
1465
|
membershipChanged: !0
|
|
1457
1466
|
};
|
|
@@ -1461,56 +1470,58 @@ function Wt(e, t) {
|
|
|
1461
1470
|
membershipChanged: !1
|
|
1462
1471
|
};
|
|
1463
1472
|
}
|
|
1464
|
-
function
|
|
1473
|
+
function u(t) {
|
|
1465
1474
|
let r = n.get(t);
|
|
1466
1475
|
if (r) {
|
|
1467
|
-
|
|
1476
|
+
s(r, r.dotDefs);
|
|
1468
1477
|
for (let t of r.dotDefs) e.touchDef(t);
|
|
1469
1478
|
r.dotDefs = [], n.delete(t);
|
|
1470
1479
|
}
|
|
1471
1480
|
}
|
|
1472
|
-
function
|
|
1481
|
+
function d(t) {
|
|
1473
1482
|
for (let n of t.changed) e.touchDef(n);
|
|
1474
1483
|
}
|
|
1475
1484
|
return {
|
|
1476
1485
|
setTrail(e, t, r, i) {
|
|
1477
1486
|
if (t === null || r === null) {
|
|
1478
|
-
|
|
1487
|
+
u(e);
|
|
1479
1488
|
return;
|
|
1480
1489
|
}
|
|
1481
1490
|
if (!i) throw Error(`renderer: setTrail("${e}") requires options when from/to are non-null`);
|
|
1482
1491
|
let a = n.get(e);
|
|
1483
1492
|
if (a) {
|
|
1484
1493
|
if (a.canvas !== i.canvas) throw Error(`renderer: trail "${e}" cannot change canvas after first call`);
|
|
1485
|
-
a.from = t, a.to = r,
|
|
1494
|
+
a.from = t, a.to = r, d(l(a));
|
|
1486
1495
|
return;
|
|
1487
1496
|
}
|
|
1488
|
-
let o = {
|
|
1497
|
+
let { width: o, height: s } = Pt(i.canvas, i.width, i.height), c = {
|
|
1489
1498
|
from: t,
|
|
1490
1499
|
to: r,
|
|
1491
1500
|
canvas: i.canvas,
|
|
1501
|
+
width: o,
|
|
1502
|
+
height: s,
|
|
1492
1503
|
dotDefs: []
|
|
1493
1504
|
};
|
|
1494
|
-
n.set(e,
|
|
1505
|
+
n.set(e, c), d(l(c));
|
|
1495
1506
|
},
|
|
1496
1507
|
destroy() {
|
|
1497
|
-
for (let e of [...n.keys()])
|
|
1508
|
+
for (let e of [...n.keys()]) u(e);
|
|
1498
1509
|
t.onScale = void 0, i = !1;
|
|
1499
1510
|
}
|
|
1500
1511
|
};
|
|
1501
1512
|
}
|
|
1502
1513
|
//#endregion
|
|
1503
1514
|
//#region ../wayfinding/src/renderer/createWayfindingRenderer.ts
|
|
1504
|
-
var
|
|
1515
|
+
var Kt = {
|
|
1505
1516
|
passed: "#B5B7BC",
|
|
1506
1517
|
remaining: "#A4CCE2",
|
|
1507
1518
|
active: "#0794EA"
|
|
1508
1519
|
};
|
|
1509
|
-
function
|
|
1520
|
+
function qt(e, t, n = {}) {
|
|
1510
1521
|
let r = {
|
|
1511
|
-
...
|
|
1522
|
+
...Kt,
|
|
1512
1523
|
...n.colors
|
|
1513
|
-
}, i =
|
|
1524
|
+
}, i = Rt(e), a = It(i, e, t, n.screenSpaceIcons), o = Gt(i, t.trail), s = Ut(i, r, e, t), c = {
|
|
1514
1525
|
setIcon: (...e) => a.setIcon(...e),
|
|
1515
1526
|
clearIcons: (...e) => a.clearIcons(...e),
|
|
1516
1527
|
setTrail: (...e) => o.setTrail(...e),
|
|
@@ -1529,15 +1540,11 @@ function Kt(e, t, n = {}) {
|
|
|
1529
1540
|
}
|
|
1530
1541
|
//#endregion
|
|
1531
1542
|
//#region ../wayfinding/src/renderer/layers.ts
|
|
1532
|
-
var
|
|
1533
|
-
function
|
|
1543
|
+
var Jt = "wayfinding", Yt = "wf-trail-points", Xt = "wf-lines", Zt = "wf-lines-animated", Qt = "wf-points", $t = "wf-current-position";
|
|
1544
|
+
function en(e = {}) {
|
|
1534
1545
|
return {
|
|
1535
|
-
name:
|
|
1546
|
+
name: Jt,
|
|
1536
1547
|
children: [
|
|
1537
|
-
{
|
|
1538
|
-
name: Jt,
|
|
1539
|
-
children: []
|
|
1540
|
-
},
|
|
1541
1548
|
{
|
|
1542
1549
|
name: Yt,
|
|
1543
1550
|
children: []
|
|
@@ -1553,14 +1560,18 @@ function $t(e = {}) {
|
|
|
1553
1560
|
{
|
|
1554
1561
|
name: Qt,
|
|
1555
1562
|
children: []
|
|
1563
|
+
},
|
|
1564
|
+
{
|
|
1565
|
+
name: $t,
|
|
1566
|
+
children: []
|
|
1556
1567
|
}
|
|
1557
1568
|
],
|
|
1558
1569
|
dim: 0,
|
|
1559
1570
|
overlay: e.overlay
|
|
1560
1571
|
};
|
|
1561
1572
|
}
|
|
1562
|
-
function
|
|
1563
|
-
let t = e.children.find((e) => "name" in e && e.name ===
|
|
1573
|
+
function tn(e) {
|
|
1574
|
+
let t = e.children.find((e) => "name" in e && e.name === Jt && "children" in e);
|
|
1564
1575
|
if (!t) throw Error("The scene holds no wayfinding block — mount `root` first.");
|
|
1565
1576
|
let n = new Map(t.children.map((e) => [e.name, e]));
|
|
1566
1577
|
function r(e) {
|
|
@@ -1569,22 +1580,24 @@ function en(e) {
|
|
|
1569
1580
|
return t;
|
|
1570
1581
|
}
|
|
1571
1582
|
return {
|
|
1572
|
-
trail: r(
|
|
1573
|
-
lines: r(
|
|
1574
|
-
linesAnimated: r(
|
|
1575
|
-
icons: r(
|
|
1576
|
-
currentPosition: r(
|
|
1583
|
+
trail: r(Yt),
|
|
1584
|
+
lines: r(Xt),
|
|
1585
|
+
linesAnimated: r(Zt),
|
|
1586
|
+
icons: r(Qt),
|
|
1587
|
+
currentPosition: r($t)
|
|
1577
1588
|
};
|
|
1578
1589
|
}
|
|
1579
1590
|
//#endregion
|
|
1580
1591
|
//#region ../wayfinding/src/runtime/positionView.ts
|
|
1581
|
-
var
|
|
1582
|
-
function
|
|
1592
|
+
var nn = "current-position", rn = "position";
|
|
1593
|
+
function an({ renderer: e, iconProvider: t }) {
|
|
1583
1594
|
return {
|
|
1584
1595
|
place(n, r) {
|
|
1585
|
-
let i = Number.isFinite(n.heading), a = i ? "current_arrow" : "current", o = i ?
|
|
1586
|
-
e.setIcon(
|
|
1587
|
-
canvas:
|
|
1596
|
+
let i = Number.isFinite(n.heading), a = i ? "current_arrow" : "current", o = i ? m(n.heading) : void 0, s = t.getIcon(a);
|
|
1597
|
+
e.setIcon(rn, {
|
|
1598
|
+
canvas: s.canvas,
|
|
1599
|
+
width: s.width,
|
|
1600
|
+
height: s.height,
|
|
1588
1601
|
onTop: !0,
|
|
1589
1602
|
x: n.x,
|
|
1590
1603
|
y: n.y,
|
|
@@ -1596,29 +1609,33 @@ function rn({ renderer: e, iconProvider: t }) {
|
|
|
1596
1609
|
});
|
|
1597
1610
|
},
|
|
1598
1611
|
hide() {
|
|
1599
|
-
e.setIcon(
|
|
1612
|
+
e.setIcon(rn, null);
|
|
1600
1613
|
}
|
|
1601
1614
|
};
|
|
1602
1615
|
}
|
|
1603
1616
|
//#endregion
|
|
1604
1617
|
//#region ../wayfinding/src/runtime/endpointView.ts
|
|
1605
|
-
function
|
|
1618
|
+
function on(e, t) {
|
|
1606
1619
|
return !t || !e.bounds && e.id !== "current-position";
|
|
1607
1620
|
}
|
|
1608
|
-
function
|
|
1621
|
+
function sn({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
1609
1622
|
return {
|
|
1610
1623
|
place(r, i, a, o) {
|
|
1611
1624
|
if (!a.length) return;
|
|
1612
|
-
let s = n.isLayerVisible(r.layer), c = n.isLayerVisible(i.layer), l = a[0], u = a[a.length - 1], d = r.id === "current-position" && o;
|
|
1625
|
+
let s = n.isLayerVisible(r.layer), c = n.isLayerVisible(i.layer), l = a[0], u = a[a.length - 1], d = r.id === "current-position" && o, f = t.getIcon(d ? "source_inactive" : "source"), p = t.getIcon("destination");
|
|
1613
1626
|
e.setIcon("source", {
|
|
1614
|
-
canvas:
|
|
1627
|
+
canvas: f.canvas,
|
|
1628
|
+
width: f.width,
|
|
1629
|
+
height: f.height,
|
|
1615
1630
|
x: l.x,
|
|
1616
1631
|
y: l.y,
|
|
1617
|
-
hidden:
|
|
1632
|
+
hidden: on(r, s),
|
|
1618
1633
|
dimmed: !s,
|
|
1619
1634
|
cardinalSnap: !0
|
|
1620
1635
|
}), e.setIcon("destination", {
|
|
1621
|
-
canvas:
|
|
1636
|
+
canvas: p.canvas,
|
|
1637
|
+
width: p.width,
|
|
1638
|
+
height: p.height,
|
|
1622
1639
|
x: u.x,
|
|
1623
1640
|
y: u.y,
|
|
1624
1641
|
hidden: !c || !i.bounds,
|
|
@@ -1633,7 +1650,7 @@ function on({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
|
1633
1650
|
}
|
|
1634
1651
|
//#endregion
|
|
1635
1652
|
//#region ../wayfinding/src/runtime/getRouteLines.ts
|
|
1636
|
-
function
|
|
1653
|
+
function cn({ engine: e, from: t, to: n, waypoints: r, accessible: i }) {
|
|
1637
1654
|
return r != null && r.length ? e.buildWaypointsRoute([
|
|
1638
1655
|
t,
|
|
1639
1656
|
...r,
|
|
@@ -1642,7 +1659,7 @@ function sn({ engine: e, from: t, to: n, waypoints: r, accessible: i }) {
|
|
|
1642
1659
|
}
|
|
1643
1660
|
//#endregion
|
|
1644
1661
|
//#region ../wayfinding/src/runtime/snapPositionToRoute.ts
|
|
1645
|
-
function
|
|
1662
|
+
function ln(e, t, n) {
|
|
1646
1663
|
if (!(t != null && t.bounds)) return !1;
|
|
1647
1664
|
let r = n == null || !t.layer || t.layer === n, i = rt({
|
|
1648
1665
|
x: e.x,
|
|
@@ -1650,19 +1667,19 @@ function cn(e, t, n) {
|
|
|
1650
1667
|
}, t.bounds);
|
|
1651
1668
|
return r && i;
|
|
1652
1669
|
}
|
|
1653
|
-
function
|
|
1670
|
+
function un(e, t, n, r, i) {
|
|
1654
1671
|
if (!t.length) return { snapped: !1 };
|
|
1655
1672
|
let a = e.layer || null;
|
|
1656
|
-
if (
|
|
1673
|
+
if (ln(e, n, a)) {
|
|
1657
1674
|
let e = t[0];
|
|
1658
1675
|
return {
|
|
1659
1676
|
snapped: !0,
|
|
1660
1677
|
snappedPoint: e.p0,
|
|
1661
1678
|
snappedLine: e,
|
|
1662
|
-
distance:
|
|
1679
|
+
distance: W(t)
|
|
1663
1680
|
};
|
|
1664
1681
|
}
|
|
1665
|
-
if (
|
|
1682
|
+
if (ln(e, r, a)) {
|
|
1666
1683
|
let e = t[t.length - 1];
|
|
1667
1684
|
return {
|
|
1668
1685
|
snapped: !0,
|
|
@@ -1675,9 +1692,9 @@ function ln(e, t, n, r, i) {
|
|
|
1675
1692
|
}
|
|
1676
1693
|
//#endregion
|
|
1677
1694
|
//#region ../wayfinding/src/runtime/positionTrailView.ts
|
|
1678
|
-
var
|
|
1679
|
-
function
|
|
1680
|
-
let a =
|
|
1695
|
+
var dn = "trail";
|
|
1696
|
+
function fn({ renderer: e, iconProvider: t, floorContext: n, trails: r, snapThreshold: i }) {
|
|
1697
|
+
let a = an({
|
|
1681
1698
|
renderer: e,
|
|
1682
1699
|
iconProvider: t
|
|
1683
1700
|
});
|
|
@@ -1690,7 +1707,7 @@ function un({ renderer: e, iconProvider: t, floorContext: n, trails: r, snapThre
|
|
|
1690
1707
|
a.hide();
|
|
1691
1708
|
},
|
|
1692
1709
|
applyToRoute(e, t, r) {
|
|
1693
|
-
let o =
|
|
1710
|
+
let o = un(e, r, t.from, t.to, i), s = !n.isLayerVisible(e.layer);
|
|
1694
1711
|
return o.snapped ? a.place({
|
|
1695
1712
|
...e,
|
|
1696
1713
|
x: o.snappedPoint.x,
|
|
@@ -1698,16 +1715,16 @@ function un({ renderer: e, iconProvider: t, floorContext: n, trails: r, snapThre
|
|
|
1698
1715
|
}, s) : a.place(e, s), o;
|
|
1699
1716
|
},
|
|
1700
1717
|
setTrail(e, t) {
|
|
1701
|
-
e && t ? r.place(
|
|
1718
|
+
e && t ? r.place(dn, e, t) : r.clear(dn);
|
|
1702
1719
|
},
|
|
1703
1720
|
clearTrail() {
|
|
1704
|
-
r.clear(
|
|
1721
|
+
r.clear(dn);
|
|
1705
1722
|
}
|
|
1706
1723
|
};
|
|
1707
1724
|
}
|
|
1708
1725
|
//#endregion
|
|
1709
1726
|
//#region ../wayfinding/src/runtime/routeLinesView.ts
|
|
1710
|
-
function
|
|
1727
|
+
function pn({ renderer: e }) {
|
|
1711
1728
|
return {
|
|
1712
1729
|
draw({ passed: t, remaining: n }, r = !1) {
|
|
1713
1730
|
e.setRouteLines(t, n, { resetAnimation: !r });
|
|
@@ -1719,12 +1736,12 @@ function dn({ renderer: e }) {
|
|
|
1719
1736
|
}
|
|
1720
1737
|
//#endregion
|
|
1721
1738
|
//#region ../wayfinding/src/runtime/routeRenderData.ts
|
|
1722
|
-
function
|
|
1739
|
+
function mn({ routeLines: e, currentRouteLayer: t, snap: n }) {
|
|
1723
1740
|
let r = e.filter((e) => !e.virtual), i = (e) => t === null ? e : e.filter((e) => e.p0.layer === t);
|
|
1724
1741
|
if (!(n != null && n.snapped)) return {
|
|
1725
1742
|
passed: [],
|
|
1726
1743
|
remaining: i(r),
|
|
1727
|
-
distance:
|
|
1744
|
+
distance: W(r)
|
|
1728
1745
|
};
|
|
1729
1746
|
let { passed: a, remaining: o } = Nt(r, n.snappedPoint), s = o !== r && o.length > 0 && o[0].p0.layer === n.snappedPoint.layer ? [{
|
|
1730
1747
|
...o[0],
|
|
@@ -1738,7 +1755,7 @@ function fn({ routeLines: e, currentRouteLayer: t, snap: n }) {
|
|
|
1738
1755
|
}
|
|
1739
1756
|
//#endregion
|
|
1740
1757
|
//#region ../wayfinding/src/runtime/routeUpdate.ts
|
|
1741
|
-
function
|
|
1758
|
+
function hn(e, t) {
|
|
1742
1759
|
return {
|
|
1743
1760
|
lines: e.filter((e) => !e.virtual),
|
|
1744
1761
|
bounds: bt(t.flatMap((e) => [e.p0, e.p1]))
|
|
@@ -1746,7 +1763,7 @@ function pn(e, t) {
|
|
|
1746
1763
|
}
|
|
1747
1764
|
//#endregion
|
|
1748
1765
|
//#region ../wayfinding/src/runtime/trailView.ts
|
|
1749
|
-
function
|
|
1766
|
+
function gn({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
1750
1767
|
let r = /* @__PURE__ */ new Set();
|
|
1751
1768
|
function i(e, t) {
|
|
1752
1769
|
if (n.showAllFloors()) return !0;
|
|
@@ -1762,7 +1779,12 @@ function mn({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
|
1762
1779
|
a(n);
|
|
1763
1780
|
return;
|
|
1764
1781
|
}
|
|
1765
|
-
|
|
1782
|
+
let c = t.getIcon("trail");
|
|
1783
|
+
e.setTrail(n, o, s, {
|
|
1784
|
+
canvas: c.canvas,
|
|
1785
|
+
width: c.width,
|
|
1786
|
+
height: c.height
|
|
1787
|
+
}), r.add(n);
|
|
1766
1788
|
},
|
|
1767
1789
|
clear(e) {
|
|
1768
1790
|
a(e);
|
|
@@ -1775,11 +1797,11 @@ function mn({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
|
1775
1797
|
}
|
|
1776
1798
|
//#endregion
|
|
1777
1799
|
//#region ../wayfinding/src/runtime/transitionView.ts
|
|
1778
|
-
var
|
|
1779
|
-
function
|
|
1800
|
+
var _n = "transition";
|
|
1801
|
+
function vn({ renderer: e, iconProvider: t, floorContext: n, onTransitionClick: r }) {
|
|
1780
1802
|
return {
|
|
1781
1803
|
place(i) {
|
|
1782
|
-
e.clearIcons(
|
|
1804
|
+
e.clearIcons(_n);
|
|
1783
1805
|
let a;
|
|
1784
1806
|
if (n.showAllFloors()) a = null;
|
|
1785
1807
|
else {
|
|
@@ -1792,46 +1814,51 @@ function gn({ renderer: e, iconProvider: t, floorContext: n, onTransitionClick:
|
|
|
1792
1814
|
currentLayerName: a,
|
|
1793
1815
|
floorOrder: n.getFloorOrder()
|
|
1794
1816
|
});
|
|
1795
|
-
for (let [n, i] of o.entries())
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1817
|
+
for (let [n, i] of o.entries()) {
|
|
1818
|
+
let a = t.getIcon(yn(i.role, i.direction));
|
|
1819
|
+
e.setIcon(_n, {
|
|
1820
|
+
canvas: a.canvas,
|
|
1821
|
+
width: a.width,
|
|
1822
|
+
height: a.height,
|
|
1823
|
+
x: i.x,
|
|
1824
|
+
y: i.y,
|
|
1825
|
+
cardinalSnap: !0,
|
|
1826
|
+
onClick: i.role === "exit" ? () => r(i) : void 0
|
|
1827
|
+
}, n);
|
|
1828
|
+
}
|
|
1802
1829
|
},
|
|
1803
1830
|
clear() {
|
|
1804
|
-
e.clearIcons(
|
|
1831
|
+
e.clearIcons(_n);
|
|
1805
1832
|
}
|
|
1806
1833
|
};
|
|
1807
1834
|
}
|
|
1808
|
-
function
|
|
1835
|
+
function yn(e, t) {
|
|
1809
1836
|
return e === "entry" ? "transition_entry" : t === "up" ? "transition_up" : t === "down" ? "transition_down" : "transition";
|
|
1810
1837
|
}
|
|
1811
1838
|
//#endregion
|
|
1812
1839
|
//#region ../wayfinding/src/runtime/createWayfindingRuntime.ts
|
|
1813
|
-
var
|
|
1814
|
-
function
|
|
1815
|
-
let
|
|
1840
|
+
var bn = (e) => e.flatMap((e) => [e.p0, e.p1]);
|
|
1841
|
+
function xn({ engine: e, renderer: t, iconProvider: n, floorContext: r, snapThreshold: i, rerouteThreshold: a, onTransitionClick: o, onRouteUpdate: s, onRouteDistance: c }) {
|
|
1842
|
+
let l = jt(a), u = sn({
|
|
1816
1843
|
renderer: t,
|
|
1817
1844
|
iconProvider: n,
|
|
1818
1845
|
floorContext: r
|
|
1819
|
-
}),
|
|
1846
|
+
}), d = vn({
|
|
1820
1847
|
renderer: t,
|
|
1821
1848
|
iconProvider: n,
|
|
1822
1849
|
floorContext: r,
|
|
1823
1850
|
onTransitionClick: o
|
|
1824
|
-
}), p =
|
|
1851
|
+
}), p = fn({
|
|
1825
1852
|
renderer: t,
|
|
1826
1853
|
iconProvider: n,
|
|
1827
1854
|
floorContext: r,
|
|
1828
|
-
trails:
|
|
1855
|
+
trails: gn({
|
|
1829
1856
|
renderer: t,
|
|
1830
1857
|
iconProvider: n,
|
|
1831
1858
|
floorContext: r
|
|
1832
1859
|
}),
|
|
1833
1860
|
snapThreshold: i
|
|
1834
|
-
}), m =
|
|
1861
|
+
}), m = pn({ renderer: t }), h = [], g = null, _ = null, v = null, y = 0, b = !1, x = !1;
|
|
1835
1862
|
function S() {
|
|
1836
1863
|
return r.showAllFloors() ? null : r.getActiveFloor();
|
|
1837
1864
|
}
|
|
@@ -1840,7 +1867,7 @@ function yn({ engine: e, renderer: t, iconProvider: n, floorContext: r, snapThre
|
|
|
1840
1867
|
return e === null ? h.filter((e) => !e.virtual) : h.filter((t) => t.p0.layer === e && !t.virtual);
|
|
1841
1868
|
}
|
|
1842
1869
|
function w(e) {
|
|
1843
|
-
return
|
|
1870
|
+
return l.shouldReroute(e, h.filter((e) => !e.virtual));
|
|
1844
1871
|
}
|
|
1845
1872
|
function T() {
|
|
1846
1873
|
if (!g || !_) return null;
|
|
@@ -1848,13 +1875,13 @@ function yn({ engine: e, renderer: t, iconProvider: n, floorContext: r, snapThre
|
|
|
1848
1875
|
return e.length ? {
|
|
1849
1876
|
from: g,
|
|
1850
1877
|
to: _,
|
|
1851
|
-
routePoints:
|
|
1878
|
+
routePoints: bn(e),
|
|
1852
1879
|
visibleLines: e
|
|
1853
1880
|
} : null;
|
|
1854
1881
|
}
|
|
1855
1882
|
function E(e = null, t = !1) {
|
|
1856
1883
|
if (!g || !_) return;
|
|
1857
|
-
let n =
|
|
1884
|
+
let n = mn({
|
|
1858
1885
|
routeLines: h,
|
|
1859
1886
|
currentRouteLayer: S(),
|
|
1860
1887
|
snap: e
|
|
@@ -1882,41 +1909,41 @@ function yn({ engine: e, renderer: t, iconProvider: n, floorContext: r, snapThre
|
|
|
1882
1909
|
if (!g || !_) return;
|
|
1883
1910
|
let e = T();
|
|
1884
1911
|
if (!e) {
|
|
1885
|
-
|
|
1912
|
+
u.hide(), d.clear(), p.clearTrail(), E();
|
|
1886
1913
|
return;
|
|
1887
1914
|
}
|
|
1888
|
-
|
|
1915
|
+
u.place(g, _, e.routePoints, x), d.place(h), E(), D(null);
|
|
1889
1916
|
}
|
|
1890
1917
|
function k() {
|
|
1891
1918
|
if (!g || !_) return;
|
|
1892
1919
|
let e = T();
|
|
1893
|
-
e &&
|
|
1920
|
+
e && u.place(g, _, e.routePoints, x);
|
|
1894
1921
|
}
|
|
1895
1922
|
function A() {
|
|
1896
1923
|
if (x = !1, !v || !g || !_) return null;
|
|
1897
1924
|
let e = h.filter((e) => !e.virtual);
|
|
1898
1925
|
if (!e.length) return null;
|
|
1899
|
-
let t = T(), n = t ? p.applyToRoute(v, t, e) :
|
|
1926
|
+
let t = T(), n = t ? p.applyToRoute(v, t, e) : un(v, e, g, _, i);
|
|
1900
1927
|
return n.snapped && (b = !0), x = n.snapped, n;
|
|
1901
1928
|
}
|
|
1902
1929
|
function j() {
|
|
1903
|
-
let e =
|
|
1930
|
+
let e = hn(h, C());
|
|
1904
1931
|
return s(e.lines, e.bounds), e;
|
|
1905
1932
|
}
|
|
1906
|
-
function
|
|
1907
|
-
let o =
|
|
1933
|
+
function M({ from: n, to: r, waypoints: i, accessible: a }) {
|
|
1934
|
+
let o = cn({
|
|
1908
1935
|
engine: e,
|
|
1909
1936
|
from: n,
|
|
1910
1937
|
to: r,
|
|
1911
1938
|
waypoints: i,
|
|
1912
1939
|
accessible: a
|
|
1913
1940
|
});
|
|
1914
|
-
if (!o.length) return
|
|
1941
|
+
if (!o.length) return P(), !1;
|
|
1915
1942
|
b = !1, g = n, _ = r, h = o, O();
|
|
1916
1943
|
let { lines: s } = j(), l = A();
|
|
1917
|
-
return k(), D(l), l && E(l, !0), c(l ? y :
|
|
1944
|
+
return k(), D(l), l && E(l, !0), c(l ? y : W(s)), t.flush(), !0;
|
|
1918
1945
|
}
|
|
1919
|
-
function
|
|
1946
|
+
function N(e) {
|
|
1920
1947
|
let n = v !== null;
|
|
1921
1948
|
if (v = e, !e) {
|
|
1922
1949
|
x = !1, p.hideIcon(), D(null), n && k(), E(), c(y), t.flush();
|
|
@@ -1926,30 +1953,30 @@ function yn({ engine: e, renderer: t, iconProvider: n, floorContext: r, snapThre
|
|
|
1926
1953
|
let r = A();
|
|
1927
1954
|
k(), D(r), r && E(r, !0), c(y), t.flush();
|
|
1928
1955
|
}
|
|
1929
|
-
function
|
|
1956
|
+
function ee() {
|
|
1930
1957
|
O();
|
|
1931
1958
|
let e = A();
|
|
1932
1959
|
k(), D(e), e && E(e, !0), h.length && j(), c(y), t.flush();
|
|
1933
1960
|
}
|
|
1934
|
-
function N() {
|
|
1935
|
-
b = !1, h = [], g = null, _ = null, y = 0, d.hide(), f.clear(), p.clearTrail(), m.clear(), s([], new l()), c(0), t.flush();
|
|
1936
|
-
}
|
|
1937
1961
|
function P() {
|
|
1938
|
-
|
|
1962
|
+
b = !1, h = [], g = null, _ = null, y = 0, u.hide(), d.clear(), p.clearTrail(), m.clear(), s([], new f()), c(0), t.flush();
|
|
1963
|
+
}
|
|
1964
|
+
function F() {
|
|
1965
|
+
P(), v = null, t.destroy();
|
|
1939
1966
|
}
|
|
1940
1967
|
return {
|
|
1941
|
-
setRoute:
|
|
1942
|
-
onPositionChanged:
|
|
1943
|
-
onFloorChanged:
|
|
1968
|
+
setRoute: M,
|
|
1969
|
+
onPositionChanged: N,
|
|
1970
|
+
onFloorChanged: ee,
|
|
1944
1971
|
shouldReroute: w,
|
|
1945
|
-
clearRoute:
|
|
1946
|
-
destroy:
|
|
1972
|
+
clearRoute: P,
|
|
1973
|
+
destroy: F
|
|
1947
1974
|
};
|
|
1948
1975
|
}
|
|
1949
1976
|
//#endregion
|
|
1950
1977
|
//#region ../wayfinding/src/createWayfinding.ts
|
|
1951
|
-
function
|
|
1952
|
-
let { dataSource: t, renderer: n, iconProvider: r, floorContext: i, layers: a, gpsConfig: o } = e, s = ut(t), c =
|
|
1978
|
+
function Sn(e) {
|
|
1979
|
+
let { dataSource: t, renderer: n, iconProvider: r, floorContext: i, layers: a, gpsConfig: o } = e, s = ut(t), c = qt(n, a, { screenSpaceIcons: e.screenSpaceIcons }), l = xn({
|
|
1953
1980
|
engine: s,
|
|
1954
1981
|
renderer: c,
|
|
1955
1982
|
iconProvider: r,
|
|
@@ -1991,8 +2018,8 @@ function bn(e) {
|
|
|
1991
2018
|
}
|
|
1992
2019
|
//#endregion
|
|
1993
2020
|
//#region src/wayfinding/adapters/arbitraryPoint.ts
|
|
1994
|
-
var
|
|
1995
|
-
function
|
|
2021
|
+
var Cn = "Your Location", wn = "kiosk-anchor";
|
|
2022
|
+
function Tn(e, t, n) {
|
|
1996
2023
|
return {
|
|
1997
2024
|
id: n,
|
|
1998
2025
|
x: e.x,
|
|
@@ -2003,9 +2030,9 @@ function Cn(e, t, n) {
|
|
|
2003
2030
|
}
|
|
2004
2031
|
//#endregion
|
|
2005
2032
|
//#region src/wayfinding/adapters/boothToEndpoint.ts
|
|
2006
|
-
function
|
|
2033
|
+
function En(e) {
|
|
2007
2034
|
var t, n;
|
|
2008
|
-
let r = e.rect, i =
|
|
2035
|
+
let r = e.rect, i = a.fromMinMax(r.min, r.max, e.rotate).corners();
|
|
2009
2036
|
return {
|
|
2010
2037
|
x: r.center.x,
|
|
2011
2038
|
y: r.center.y,
|
|
@@ -2015,38 +2042,41 @@ function wn(e) {
|
|
|
2015
2042
|
}
|
|
2016
2043
|
//#endregion
|
|
2017
2044
|
//#region src/wayfinding/adapters/canvasIconProvider.ts
|
|
2018
|
-
var
|
|
2019
|
-
function
|
|
2045
|
+
var Dn = "#00A2FF", On = "#FF9F06", J = 34, kn = 4, An = 56;
|
|
2046
|
+
function Y(e, t, n, r, i, a) {
|
|
2020
2047
|
let o = e.get(t);
|
|
2021
|
-
return o ? (o.id = t,
|
|
2048
|
+
return o ? (o.id = t, w(o, n, r, i)) : a();
|
|
2022
2049
|
}
|
|
2023
|
-
function
|
|
2050
|
+
function X(e, t = l(e)) {
|
|
2024
2051
|
return {
|
|
2025
2052
|
canvas: e,
|
|
2026
|
-
width:
|
|
2027
|
-
height:
|
|
2053
|
+
width: t.width,
|
|
2054
|
+
height: t.height
|
|
2028
2055
|
};
|
|
2029
2056
|
}
|
|
2030
|
-
function
|
|
2057
|
+
function jn(e) {
|
|
2031
2058
|
var t, n;
|
|
2032
|
-
let { iconMap: r, pixelRatio: i } = e, a = (t = e.sourceColor) == null ?
|
|
2033
|
-
|
|
2034
|
-
let
|
|
2035
|
-
|
|
2036
|
-
let
|
|
2037
|
-
return
|
|
2038
|
-
|
|
2059
|
+
let { iconMap: r, pixelRatio: i } = e, a = (t = e.sourceColor) == null ? Dn : t, s = (n = e.destinationColor) == null ? On : n, l = /* @__PURE__ */ new Map();
|
|
2060
|
+
l.set("destination", X(Y(r, "destination", J, J, i, () => c(i, s)))), l.set("source", X(Y(r, "departure", J, J, i, () => o(i, a)))), l.set("source_inactive", X(Y(r, "departure_inactive", J, J, i, () => o(i, a))));
|
|
2061
|
+
let u = o(i, a);
|
|
2062
|
+
u.id = "current-location", l.set("current", X(u));
|
|
2063
|
+
let d = Y(r, "transition", J, J, i, () => o(i, a));
|
|
2064
|
+
return l.set("transition", X(d)), l.set("transition_up", X(Y(r, "transition_up", An, J, i, () => d))), l.set("transition_down", X(Y(r, "transition_down", An, J, i, () => d))), l.set("transition_entry", X(Y(r, "departure", J, J, i, () => o(i, a)))), l.set("current_arrow", X(Y(r, "direction", J, J, i, () => E(i, a)))), l.set("trail", X(T(kn, "#b5b7bc"), {
|
|
2065
|
+
width: C(kn),
|
|
2066
|
+
height: C(kn)
|
|
2067
|
+
})), { getIcon(e) {
|
|
2068
|
+
let t = l.get(e);
|
|
2039
2069
|
if (!t) throw Error(`Unknown icon: ${e}`);
|
|
2040
2070
|
return t;
|
|
2041
2071
|
} };
|
|
2042
2072
|
}
|
|
2043
2073
|
//#endregion
|
|
2044
2074
|
//#region src/wayfinding/adapters/floorContext.ts
|
|
2045
|
-
var
|
|
2046
|
-
function
|
|
2075
|
+
var Mn = 0;
|
|
2076
|
+
function Nn(e, t) {
|
|
2047
2077
|
return {
|
|
2048
2078
|
showAllFloors() {
|
|
2049
|
-
return e.mode ===
|
|
2079
|
+
return e.mode === Mn;
|
|
2050
2080
|
},
|
|
2051
2081
|
getActiveFloor() {
|
|
2052
2082
|
var n;
|
|
@@ -2064,39 +2094,39 @@ function An(e, t) {
|
|
|
2064
2094
|
}
|
|
2065
2095
|
//#endregion
|
|
2066
2096
|
//#region src/wayfinding/adapters/graphDataSource.ts
|
|
2067
|
-
function
|
|
2097
|
+
function Pn() {
|
|
2068
2098
|
return {
|
|
2069
2099
|
getLines: () => {
|
|
2070
2100
|
var e, t;
|
|
2071
|
-
return (e = (t =
|
|
2101
|
+
return (e = (t = d()) == null ? void 0 : t.lines) == null ? [] : e;
|
|
2072
2102
|
},
|
|
2073
2103
|
getLineEnds: () => {
|
|
2074
2104
|
var e, t;
|
|
2075
|
-
return (e = (t =
|
|
2105
|
+
return (e = (t = d()) == null ? void 0 : t.lineEnds) == null ? [] : e;
|
|
2076
2106
|
}
|
|
2077
2107
|
};
|
|
2078
2108
|
}
|
|
2079
2109
|
//#endregion
|
|
2080
2110
|
//#region src/utils/math.ts
|
|
2081
|
-
var
|
|
2082
|
-
function
|
|
2111
|
+
var Fn = /* @__PURE__ */ e(p(), 1);
|
|
2112
|
+
function Z(e, t) {
|
|
2083
2113
|
return e * (1 - t / 100);
|
|
2084
2114
|
}
|
|
2085
2115
|
//#endregion
|
|
2086
2116
|
//#region src/wayfinding/adapters/kioskCanvas.ts
|
|
2087
|
-
var
|
|
2088
|
-
function
|
|
2117
|
+
var In = 199, Ln = 152, Rn = 55, zn = "#ee4422";
|
|
2118
|
+
function Bn(e, t) {
|
|
2089
2119
|
let n = devicePixelRatio, r = e == null ? void 0 : e.get("kiosk");
|
|
2090
2120
|
if (r) {
|
|
2091
2121
|
r.id = "kiosk";
|
|
2092
2122
|
let e = t ? t / 100 : 1;
|
|
2093
|
-
return
|
|
2123
|
+
return w(r, Z(In * e, Rn), Z(Ln * e, Rn), n);
|
|
2094
2124
|
}
|
|
2095
|
-
return
|
|
2125
|
+
return E(n, (0, Fn.default)(zn).hex());
|
|
2096
2126
|
}
|
|
2097
2127
|
//#endregion
|
|
2098
2128
|
//#region src/wayfinding/adapters/positionInput.ts
|
|
2099
|
-
function
|
|
2129
|
+
function Vn(e) {
|
|
2100
2130
|
return {
|
|
2101
2131
|
x: e.x,
|
|
2102
2132
|
y: e.y,
|
|
@@ -2106,12 +2136,12 @@ function Rn(e) {
|
|
|
2106
2136
|
}
|
|
2107
2137
|
//#endregion
|
|
2108
2138
|
//#region src/wayfinding/bindMobxReactions.ts
|
|
2109
|
-
var
|
|
2110
|
-
function
|
|
2139
|
+
var Hn = (e) => "rect" in e ? En(e) : e;
|
|
2140
|
+
function Un({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStore: a, uiState: o, layerStore: s } }) {
|
|
2111
2141
|
let c = [];
|
|
2112
2142
|
function l() {
|
|
2113
2143
|
var t;
|
|
2114
|
-
let n = o.selectedRoute, r = n != null && n.from ?
|
|
2144
|
+
let n = o.selectedRoute, r = n != null && n.from ? Hn(n.from) : null, i = n != null && n.to ? Hn(n.to) : null;
|
|
2115
2145
|
if (!r || !i) {
|
|
2116
2146
|
e.clearRoute();
|
|
2117
2147
|
return;
|
|
@@ -2119,7 +2149,7 @@ function Bn({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
2119
2149
|
e.setRoute({
|
|
2120
2150
|
from: r,
|
|
2121
2151
|
to: i,
|
|
2122
|
-
waypoints: n == null || (t = n.waypoints) == null ? void 0 : t.map(
|
|
2152
|
+
waypoints: n == null || (t = n.waypoints) == null ? void 0 : t.map(En),
|
|
2123
2153
|
accessible: a.onlyAccessible
|
|
2124
2154
|
}) === !1 && console.error(/* @__PURE__ */ Error(`Route not found: (${r.x},${r.y}) → (${i.x},${i.y})`));
|
|
2125
2155
|
}
|
|
@@ -2129,7 +2159,7 @@ function Bn({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
2129
2159
|
e.setPosition(null), n(null);
|
|
2130
2160
|
return;
|
|
2131
2161
|
}
|
|
2132
|
-
let l =
|
|
2162
|
+
let l = Vn(t);
|
|
2133
2163
|
c ? (e.setPosition(null), n({
|
|
2134
2164
|
x: l.x,
|
|
2135
2165
|
y: l.y,
|
|
@@ -2140,8 +2170,8 @@ function Bn({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
2140
2170
|
var t;
|
|
2141
2171
|
let n = a.currentPosition, r = o.selectedRoute;
|
|
2142
2172
|
if (!n || !(r != null && r.to)) return;
|
|
2143
|
-
let i = !r.from, s = ((t = r.from) == null ? void 0 : t.id) === "current-position" && e.shouldReroute(
|
|
2144
|
-
!i && !s || a.rebuildRouteFromPosition(
|
|
2173
|
+
let i = !r.from, s = ((t = r.from) == null ? void 0 : t.id) === "current-position" && e.shouldReroute(Vn(n));
|
|
2174
|
+
!i && !s || a.rebuildRouteFromPosition(Tn(n, Cn, nn));
|
|
2145
2175
|
}
|
|
2146
2176
|
function f() {
|
|
2147
2177
|
var e, n;
|
|
@@ -2153,7 +2183,7 @@ function Bn({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
2153
2183
|
let t = o.selectedRoute, n = a.currentPosition;
|
|
2154
2184
|
if (!(t != null && t.to) || !n || ((e = t.from) == null ? void 0 : e.id) !== "current-position" || a.routeLines.length > 0) return;
|
|
2155
2185
|
let r = n.z == null ? "" : String(n.z);
|
|
2156
|
-
t.from.x === n.x && t.from.y === n.y && t.from.layer === r || a.rebuildRouteFromPosition(
|
|
2186
|
+
t.from.x === n.x && t.from.y === n.y && t.from.layer === r || a.rebuildRouteFromPosition(Tn(n, Cn, nn));
|
|
2157
2187
|
}
|
|
2158
2188
|
c.push(i(() => s.layersLoaded, () => {
|
|
2159
2189
|
l(), u();
|
|
@@ -2185,42 +2215,44 @@ function Bn({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
2185
2215
|
}
|
|
2186
2216
|
//#endregion
|
|
2187
2217
|
//#region src/wayfinding/handlers/kioskHandler.ts
|
|
2188
|
-
var
|
|
2189
|
-
function
|
|
2218
|
+
var Wn = "kiosk", Gn = 0;
|
|
2219
|
+
function Kn({ wayfinding: e, kioskIconMap: t }) {
|
|
2190
2220
|
let n = /* @__PURE__ */ new Map(), r = (e) => {
|
|
2191
2221
|
let r = e == null ? 100 : e, i = n.get(r);
|
|
2192
2222
|
if (i) return i;
|
|
2193
|
-
let a =
|
|
2223
|
+
let a = Bn(t, e);
|
|
2194
2224
|
return n.set(r, a), a;
|
|
2195
2225
|
};
|
|
2196
2226
|
return (t, n, i) => {
|
|
2197
2227
|
var a;
|
|
2198
2228
|
if (!t) {
|
|
2199
|
-
e.setIcon(
|
|
2229
|
+
e.setIcon(Wn, null), e.flush();
|
|
2200
2230
|
return;
|
|
2201
2231
|
}
|
|
2202
|
-
if (i !==
|
|
2203
|
-
e.setIcon(
|
|
2232
|
+
if (i !== Gn && t.z && n && t.z !== n) {
|
|
2233
|
+
e.setIcon(Wn, null), e.flush();
|
|
2204
2234
|
return;
|
|
2205
2235
|
}
|
|
2206
|
-
|
|
2207
|
-
|
|
2236
|
+
let o = r(t.iconSizePercent);
|
|
2237
|
+
e.setIcon(Wn, {
|
|
2238
|
+
canvas: o,
|
|
2239
|
+
...l(o),
|
|
2208
2240
|
x: t.x,
|
|
2209
2241
|
y: t.y,
|
|
2210
|
-
rotation:
|
|
2242
|
+
rotation: m((a = t.heading) == null ? 0 : a),
|
|
2211
2243
|
screenSpace: !1
|
|
2212
2244
|
}), e.flush();
|
|
2213
2245
|
};
|
|
2214
2246
|
}
|
|
2215
2247
|
//#endregion
|
|
2216
2248
|
//#region src/wayfinding/handlers/yahHandler.ts
|
|
2217
|
-
var Q = "yah",
|
|
2218
|
-
function
|
|
2249
|
+
var Q = "yah", qn = "#ff4343", Jn = 64, Yn = 90, Xn = 32;
|
|
2250
|
+
function Zn(e, t) {
|
|
2219
2251
|
let n = e.get(Q);
|
|
2220
|
-
return n ? (n.id = Q,
|
|
2252
|
+
return n ? (n.id = Q, w(n, Z(Jn, Xn), Z(Yn, Xn), t)) : s(t, qn);
|
|
2221
2253
|
}
|
|
2222
|
-
function
|
|
2223
|
-
let i =
|
|
2254
|
+
function Qn({ wayfinding: e, iconMap: t, pixelRatio: n, floorContext: r }) {
|
|
2255
|
+
let i = Zn(t, n);
|
|
2224
2256
|
return i.id = "current-location-2", (t) => {
|
|
2225
2257
|
if (!t) {
|
|
2226
2258
|
e.setIcon(Q, null), e.flush();
|
|
@@ -2229,6 +2261,7 @@ function Jn({ wayfinding: e, iconMap: t, pixelRatio: n, floorContext: r }) {
|
|
|
2229
2261
|
let n = r.isLayerVisible(t.layer);
|
|
2230
2262
|
e.setIcon(Q, {
|
|
2231
2263
|
canvas: i,
|
|
2264
|
+
...l(i),
|
|
2232
2265
|
x: t.x,
|
|
2233
2266
|
y: t.y,
|
|
2234
2267
|
hidden: !n,
|
|
@@ -2240,37 +2273,37 @@ function Jn({ wayfinding: e, iconMap: t, pixelRatio: n, floorContext: r }) {
|
|
|
2240
2273
|
//#endregion
|
|
2241
2274
|
//#region src/wayfinding/createWayfinding.ts
|
|
2242
2275
|
var $ = null;
|
|
2243
|
-
function
|
|
2276
|
+
function $n() {
|
|
2244
2277
|
return $ !== null;
|
|
2245
2278
|
}
|
|
2246
|
-
function
|
|
2279
|
+
function er() {
|
|
2247
2280
|
if (!$) throw Error("Wayfinding is not initialized — call createWayfinding() first.");
|
|
2248
2281
|
return $;
|
|
2249
2282
|
}
|
|
2250
|
-
function
|
|
2251
|
-
return
|
|
2283
|
+
function tr(e, t, n) {
|
|
2284
|
+
return er().wayfinding.buildRoute(e, t, n);
|
|
2252
2285
|
}
|
|
2253
|
-
function
|
|
2254
|
-
let { scene: t, store: n, canvas: r } = e, i =
|
|
2255
|
-
attachCardinalSnap:
|
|
2256
|
-
update:
|
|
2286
|
+
function nr(e) {
|
|
2287
|
+
let { scene: t, store: n, canvas: r } = e, i = tn(t.rootLayer), { wayfinding: a, dispose: o } = rr(n, i, {
|
|
2288
|
+
attachCardinalSnap: v,
|
|
2289
|
+
update: g
|
|
2257
2290
|
}), s = i.icons;
|
|
2258
|
-
return s.onClick = (e) =>
|
|
2259
|
-
s.onClick = void 0, s.onPointerMove = void 0, s.onPointerOut = void 0, r.current && (r.current.style.cursor = ""),
|
|
2291
|
+
return s.onClick = (e) => ar(a, e), s.onPointerMove = (e) => or(a, r, e), s.onPointerOut = () => or(a, r), g(s), () => {
|
|
2292
|
+
s.onClick = void 0, s.onPointerMove = void 0, s.onPointerOut = void 0, r.current && (r.current.style.cursor = ""), g(s), o();
|
|
2260
2293
|
};
|
|
2261
2294
|
}
|
|
2262
|
-
function
|
|
2295
|
+
function rr(e, t, n) {
|
|
2263
2296
|
var r;
|
|
2264
|
-
let i =
|
|
2297
|
+
let i = Pn(), a = jn({
|
|
2265
2298
|
iconMap: e.fp.icons,
|
|
2266
2299
|
pixelRatio: devicePixelRatio
|
|
2267
|
-
}), o =
|
|
2300
|
+
}), o = Nn(e.layerStore, e.routeStore), s = Sn({
|
|
2268
2301
|
dataSource: i,
|
|
2269
2302
|
renderer: n,
|
|
2270
2303
|
iconProvider: a,
|
|
2271
2304
|
floorContext: o,
|
|
2272
2305
|
layers: t,
|
|
2273
|
-
gpsConfig: (r =
|
|
2306
|
+
gpsConfig: (r = I()) == null || (r = r.properties) == null ? void 0 : r.config,
|
|
2274
2307
|
screenSpaceIcons: e.uiState.is3DView,
|
|
2275
2308
|
onTransitionClick: (t) => {
|
|
2276
2309
|
t.role === "exit" && e.layerStore.updateVisibility(t.targetLayer, !0);
|
|
@@ -2279,13 +2312,13 @@ function $n(e, t, n) {
|
|
|
2279
2312
|
e.routeStore.updateRoute([...t]), n.isEmpty() || (e.uiState.moveToRect = n);
|
|
2280
2313
|
},
|
|
2281
2314
|
onRouteDistance: (t) => e.routeStore.updateRouteDistance(t)
|
|
2282
|
-
}), c =
|
|
2315
|
+
}), c = Un({
|
|
2283
2316
|
wayfinding: s,
|
|
2284
|
-
kioskHandler:
|
|
2317
|
+
kioskHandler: Kn({
|
|
2285
2318
|
wayfinding: s,
|
|
2286
2319
|
kioskIconMap: e.fp.icons
|
|
2287
2320
|
}),
|
|
2288
|
-
yahHandler:
|
|
2321
|
+
yahHandler: Qn({
|
|
2289
2322
|
wayfinding: s,
|
|
2290
2323
|
iconMap: e.fp.icons,
|
|
2291
2324
|
pixelRatio: devicePixelRatio,
|
|
@@ -2302,21 +2335,21 @@ function $n(e, t, n) {
|
|
|
2302
2335
|
return $ = l, s.flush(), {
|
|
2303
2336
|
wayfinding: s,
|
|
2304
2337
|
dispose() {
|
|
2305
|
-
|
|
2338
|
+
ir(l) && ($ = null, e.routeStore.showAccessible = !1), c(), s.destroy();
|
|
2306
2339
|
}
|
|
2307
2340
|
};
|
|
2308
2341
|
}
|
|
2309
|
-
function
|
|
2342
|
+
function ir(e) {
|
|
2310
2343
|
return $ === e;
|
|
2311
2344
|
}
|
|
2312
|
-
function
|
|
2345
|
+
function ar(e, t) {
|
|
2313
2346
|
e.handleClick([t.def]) && t.stopPropagation();
|
|
2314
2347
|
}
|
|
2315
|
-
function
|
|
2348
|
+
function or(e, t, n) {
|
|
2316
2349
|
let r = t.current;
|
|
2317
2350
|
if (!r) return;
|
|
2318
2351
|
let i = n ? e.handleHover([n.def]) : !1;
|
|
2319
2352
|
r.style.cursor = i ? "pointer" : "";
|
|
2320
2353
|
}
|
|
2321
2354
|
//#endregion
|
|
2322
|
-
export {
|
|
2355
|
+
export { P as _, Cn as a, nn as c, ae as d, re as f, I as g, ne as h, En as i, en as l, R as m, nr as n, wn as o, ie as p, $n as r, Tn as s, tr as t, Ye as u, O as v };
|