@expofp/floorplan 3.42.1 → 3.43.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-CFOilpWS.js → Button-Bs_UxgiQ.js} +6 -6
- package/dist/browser/{CookieConsent-7xtFQUAC.js → CookieConsent-Dyu43_hP.js} +8 -8
- package/dist/browser/{Debug-Ccq8j5HJ.js → Debug-BsTTWQvE.js} +10 -10
- package/dist/browser/{DebugTools-dIItZaUb.js → DebugTools-aXs-5eza.js} +7 -7
- package/dist/browser/{Demo-waaMiBvy.js → Demo-B-7KGDMJ.js} +13 -13
- package/dist/browser/{Free-DdCaOZ8Q.js → Free-CNL5OIgo.js} +16 -15
- package/dist/browser/{GalleryContainer-DlucEORI.js → GalleryContainer-vKUdXOJc.js} +470 -469
- package/dist/browser/{GpsLoader-cqPoX_Zr.js → GpsLoader-CTx41t_T.js} +40 -37
- package/dist/browser/{KioskStore-BJwAcVii.js → KioskStore-DryCUldq.js} +52 -48
- package/dist/browser/{store-DKVnQzpY.js → LayerStore-KA0vMV1s.js} +21374 -31265
- package/dist/browser/{MaplibreAdapter-BZD4cOe-.js → MaplibreAdapter-VThms9qo.js} +290 -285
- package/dist/browser/{ModalContainer-BSvSFPr9.js → ModalContainer-BnQWgJFk.js} +11 -11
- package/dist/browser/{PermissionNotice-DXt-j2f7.js → PermissionNotice-C6o0LjTv.js} +7 -7
- package/dist/browser/RouteStore-dygrca38.js +1203 -0
- package/dist/browser/SetKioskMode-BlUF1qvU.js +50 -0
- package/dist/browser/{ShowKiosk-BhS74u62.js → ShowKiosk-DFoRzTZf.js} +18 -17
- package/dist/browser/UIState-DOeFZ2L0.js +2026 -0
- package/dist/browser/{ViewerMenuPanel-BYTeVxTR.js → ViewerMenuPanel-BTQx7alw.js} +25 -24
- package/dist/browser/{add-debug-secret-listener-B3Oo6_V2.js → add-debug-secret-listener-DEG-kL4W.js} +1 -1
- package/dist/browser/{adopt-global-settings-Yr-a_0F-.js → adopt-global-settings-CbCj9y4x.js} +10 -10
- package/dist/browser/{boolean-editor-BA7H18pG.js → boolean-editor-MewBldvq.js} +10 -10
- package/dist/browser/{bootIntercom-BEZV9AQ2.js → bootIntercom-Dhf8kEsO.js} +3 -3
- package/dist/browser/bundle.json +110 -71
- package/dist/browser/{camera-events-CJhSKz2q.js → camera-events-BGPhoW-g.js} +1 -1
- package/dist/browser/{classnames-D4c_D7C1.js → classnames-CjOzT3Et.js} +2 -2
- package/dist/browser/{client-DGjMk9A1.js → client-B7ipF6CH.js} +6 -6
- package/dist/browser/{components-MaSv6j2M.js → components-z1AUvMqv.js} +1245 -1228
- package/dist/browser/create-live-plan-BV3wMQvQ.js +3650 -0
- package/dist/browser/{debug-context-C2PWyEVT.js → debug-context-DHcoFmUh.js} +6 -6
- package/dist/browser/{debug-overlay-BXHh1LRW.js → debug-overlay-DyWRfHNB.js} +11 -11
- package/dist/browser/{debug-ui-CO-3GLEU.js → debug-ui--YQc14iG.js} +7 -7
- package/dist/browser/{dimming-kPNlXUew.js → dimming-B3eCxIBl.js} +277 -270
- package/dist/browser/{dist-DEm0E-fN.js → dist-CFpNRHGA.js} +6 -6
- package/dist/browser/{dist-3gOjtf_f.js → dist-DZnPa7Gt.js} +3 -3
- package/dist/browser/{dist-B3PLpTVy.js → dist-d1mv4aS_.js} +7 -7
- package/dist/browser/{efp-debug-init-DkOOpU1g.js → efp-debug-init-Fe6M60if.js} +4 -4
- package/dist/browser/{enum-editor-DPAX_cAI.js → enum-editor-Bpqhj_kX.js} +5 -5
- package/dist/browser/{es5-CpN6LQeU.js → es5-Tm811jgW.js} +2 -2
- package/dist/browser/{event-head-oYEDbvk3.js → event-head-DUUPR6gG.js} +1 -1
- package/dist/browser/{event-not-found-C7GLCJX7.js → event-not-found-payUnjNK.js} +4 -4
- package/dist/browser/event-scoped-cache-C5u7vr_A.js +22 -0
- package/dist/browser/{exports-3uPTDFG9.js → exports-DqGDS1fu.js} +1 -1
- package/dist/browser/{favicon-CQpg641Z.js → favicon-DsfOrGNO.js} +1 -1
- package/dist/browser/{fetch-retry.umd-Chmlkexp.js → fetch-retry.umd-CC5xe8w5.js} +2 -2
- package/dist/browser/{flex--99NWgQk.js → flex-CezZmi5f.js} +6 -6
- package/dist/browser/{floorplan.loader-Ci226yql.js → floorplan.loader-Dlxv8xv-.js} +658 -707
- package/dist/browser/{floorplan.ready-y0hYLknK.js → floorplan.ready-Bet-4Pmf.js} +373 -359
- package/dist/browser/freeBanner-D8r4eSMx.js +31 -0
- package/dist/browser/{fuse-BuFi3LTO.js → fuse-hqr4jkDB.js} +2 -2
- package/dist/browser/{i18n-BAQekIFF.js → i18n-CbKfwktv.js} +1821 -3872
- package/dist/browser/index.js +131 -47
- package/dist/browser/{index.module-CXN9GK4C.js → index.module-BbVqiHXM.js} +17 -17
- package/dist/browser/init-ui-BqvkD2nz.js +286 -0
- package/dist/browser/integrateKiosk-DaSOYn36.js +35 -0
- package/dist/browser/{loadImage-xbueiJmr.js → is-debug-dWXc5YUy.js} +30 -14
- package/dist/browser/{is-own-domain-DPJZoBiw.js → is-own-domain-D8anlQ_Q.js} +1 -1
- package/dist/browser/{is-webview-Bs8mxX94.js → is-webview-fqXWp538.js} +1 -1
- package/dist/browser/{jsx-runtime-BXbSNrYY.js → jsx-runtime-DO7PmxNL.js} +2 -2
- package/dist/browser/kiosk-mode-7b7iDbkP.js +33 -0
- package/dist/browser/{kiosk-record-CaWjqNGY.js → kiosk-record-UJxF1fjj.js} +1 -1
- package/dist/browser/kioskApi-CgpMBKhv.js +440 -0
- package/dist/browser/{lib-jJ4yMeEA.js → lib-Czk5Lszd.js} +3 -3
- package/dist/browser/loadImage-CFo9-YJJ.js +17 -0
- package/dist/browser/{logDeviceInfo-DSmmt_FU.js → logDeviceInfo-DJjhYuqu.js} +9 -9
- package/dist/browser/{mobx-BQA2EJH7.js → mobx-C81AIECP.js} +11 -11
- package/dist/browser/mobx.module-CWCYJWja.js +2064 -0
- package/dist/browser/{optional-boolean-editor-Y_exy4JL.js → optional-boolean-editor-B62ChR7X.js} +4 -4
- package/dist/browser/{optional-enum-editor-CKfj0OB9.js → optional-enum-editor-BBO6A0hj.js} +5 -5
- package/dist/browser/{optional-string-editor-DeavwcWv.js → optional-string-editor-7Q9UPGmg.js} +5 -5
- package/dist/browser/{particles.min-BJkirBpN.js → particles.min-BKHVPr2d.js} +2 -2
- package/dist/browser/{react-CV1gH7Zp.js → react-Cg2OORRh.js} +2 -2
- package/dist/browser/{react-dom-BEwgcqEB.js → react-dom-Ty-lfgLt.js} +3 -3
- package/dist/browser/{rolldown-runtime-BiAnyumg.js → rolldown-runtime-CWnoF_DQ.js} +1 -1
- package/dist/browser/scene-C5l_d13f.js +108 -0
- package/dist/browser/{scheduler-CcNpP8xn.js → scheduler-BU0IIfqL.js} +2 -2
- package/dist/browser/{select-B13QBWfy.js → select-BzHMeDb4.js} +11 -11
- package/dist/browser/{settings-DJUw3GyU.js → settings-BtJgR42s.js} +2 -2
- package/dist/browser/{settings-item-VzMuDMX6.js → settings-item-DdFFETI3.js} +7 -7
- package/dist/browser/store-BTr1tlEV.js +58 -0
- package/dist/browser/{string-editor-B6mio7nq.js → string-editor-BEEQ6kcc.js} +5 -5
- package/dist/browser/{text-field-7dZmg829.js → text-field-DoMqPokj.js} +6 -6
- package/dist/browser/{theme-BotlxmwW.js → theme-BvRXg3tc.js} +9 -9
- package/dist/browser/{ui-Dn5rbA7O.js → ui-CjqBOwnM.js} +9 -9
- package/dist/browser/{useRenderTarget-Rz0x5k4l.js → useRenderTarget-CaMfMKd3.js} +5 -5
- package/dist/browser/{viewport-DOIlU3cR.js → viewport-D1DrneSN.js} +4 -3
- package/dist/browser/wayfinding-BFQ3ZTEN.js +2322 -0
- package/dist/esm/components/GalleryContainer.js +1 -1
- package/dist/esm/components/Kiosk/integrateKiosk.js +1 -1
- package/dist/esm/components/LogoOverlay.js +1 -1
- package/dist/esm/components/Map/Map.js +1 -1
- package/dist/esm/components/Map/MapCamera.js +1 -1
- package/dist/esm/components/Map/booth-by-xy.d.ts +8 -10
- package/dist/esm/components/Map/booth-by-xy.js +1 -1
- package/dist/esm/components/Map/drawing/config/BoothShape.d.ts +0 -1
- package/dist/esm/components/Map/drawing/config/BoothShape.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-booth-bg.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-booth-bookmark.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-booth-border.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-booth-labels-special.js +2 -2
- package/dist/esm/components/Map/drawing/config/config-booth-labels.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-booths.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-markers.js +1 -1
- package/dist/esm/components/Map/drawing/config/layer-images.d.ts +7 -2
- package/dist/esm/components/Map/drawing/config/layer-images.js +1 -1
- package/dist/esm/components/Map/traffic/useManageTraffic.js +1 -1
- package/dist/esm/components/Maplibre/MaplibreAdapter.js +1 -1
- package/dist/esm/components/Maplibre/useCameraReactions.js +1 -1
- package/dist/esm/components/Maplibre/utils/geo-config.js +1 -1
- package/dist/esm/components/Maplibre/utils/map-helpers.js +1 -1
- package/dist/esm/components/Menu.js +1 -1
- package/dist/esm/data/fpGeo.d.ts +6 -1
- package/dist/esm/data/fpGeo.js +1 -1
- package/dist/esm/data/index.d.ts +9 -4
- package/dist/esm/data/index.js +1 -1
- package/dist/esm/data/svg.d.ts +15 -13
- package/dist/esm/data/svg.js +1 -1
- package/dist/esm/floorplan.loader.d.ts +6 -1
- package/dist/esm/floorplan.loader.js +1 -1
- package/dist/esm/floorplan.ready.d.ts +8 -2
- package/dist/esm/floorplan.ready.js +1 -1
- package/dist/esm/load.js +11 -11
- package/dist/esm/plan-lifecycle.d.ts +65 -0
- package/dist/esm/plan-lifecycle.js +1 -0
- package/dist/esm/services/URLFilterManager.js +1 -1
- package/dist/esm/services/url-dispatch.js +1 -1
- package/dist/esm/services/url-sync.d.ts +5 -1
- package/dist/esm/services/url-sync.js +1 -1
- package/dist/esm/store/MaplibreStore.js +1 -1
- package/dist/esm/store/OverlayStore.d.ts +15 -2
- package/dist/esm/store/OverlayStore.js +1 -1
- package/dist/esm/store/RouteStore.js +1 -1
- package/dist/esm/store/UIState.js +1 -1
- package/dist/esm/store/create-live-plan.d.ts +13 -0
- package/dist/esm/store/create-live-plan.js +1 -0
- package/dist/esm/store/index.d.ts +2 -13
- package/dist/esm/store/index.js +1 -1
- package/dist/esm/store/init/init-booths.js +1 -1
- package/dist/esm/store/init/init-events.js +1 -1
- package/dist/esm/store/init/init-exhibitors.js +1 -1
- package/dist/esm/store/init/init-layers.js +1 -1
- package/dist/esm/store/init/init-speakers.js +1 -1
- package/dist/esm/store/init/init-ui.d.ts +4 -6
- package/dist/esm/store/init/init-ui.js +1 -1
- package/dist/esm/store/live-store.d.ts +19 -0
- package/dist/esm/store/live-store.js +1 -0
- package/dist/esm/store/search-buttons/SearchButtonsStore.js +1 -1
- package/dist/esm/tools/event-scoped-cache.d.ts +13 -0
- package/dist/esm/tools/event-scoped-cache.js +1 -0
- package/dist/esm/tools/gtag.d.ts +15 -1
- package/dist/esm/tools/gtag.js +1 -1
- package/dist/esm/tools/reset.js +1 -1
- package/dist/esm/tools/settings.d.ts +7 -2
- package/dist/esm/tools/settings.js +1 -1
- package/dist/esm/tools/slug.js +1 -1
- package/dist/esm/tools/style-registry.d.ts +28 -0
- package/dist/esm/tools/style-registry.js +1 -0
- package/dist/esm/tools/track-event.js +1 -1
- package/dist/esm/types.d.ts +7 -1
- package/dist/esm/utils/entity-storage.js +1 -1
- package/dist/esm/utils/gps.js +1 -1
- package/dist/esm/utils/plan-reactions.d.ts +20 -0
- package/dist/esm/utils/plan-reactions.js +1 -0
- package/dist/esm/utils/preview-exhibitor.d.ts +9 -2
- package/dist/esm/utils/preview-exhibitor.js +1 -1
- package/dist/esm/utils/swappable-proxy.d.ts +28 -0
- package/dist/esm/utils/swappable-proxy.js +1 -0
- package/dist/esm/wayfinding/createWayfinding.js +1 -1
- package/package.json +32 -10
- package/dist/browser/SetKioskMode-CCZNdKum.js +0 -48
- package/dist/browser/integrateKiosk-DjIKsfAy.js +0 -34
|
@@ -0,0 +1,2322 @@
|
|
|
1
|
+
(function() {
|
|
2
|
+
try {
|
|
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.43.0" };
|
|
5
|
+
var t = new e.Error().stack;
|
|
6
|
+
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "d0fd9aca-06ea-42f4-8cae-70b74bc88ff4", e._sentryDebugIdIdentifier = "sentry-dbid-d0fd9aca-06ea-42f4-8cae-70b74bc88ff4");
|
|
7
|
+
} catch {}
|
|
8
|
+
})();
|
|
9
|
+
import { r as e, t } from "./rolldown-runtime-CWnoF_DQ.js";
|
|
10
|
+
import { o as n } from "./is-debug-dWXc5YUy.js";
|
|
11
|
+
import { i as r, l as i } from "./mobx.module-CWCYJWja.js";
|
|
12
|
+
import { Bt as a, Ft as o, Gt as s, Ht as c, Kt as l, Ot as u, Rt as d, Vt as f, Wt as p, Z as m, _t as h, bt as g, ft as _, gt as v, ht as y, kt as b, pt as x, qt as S, st as C, yt as ee } from "./LayerStore-KA0vMV1s.js";
|
|
13
|
+
//#region ../geometry/src/lib/geo.ts
|
|
14
|
+
var w = 6371e3;
|
|
15
|
+
function T(e, t) {
|
|
16
|
+
let n = p(e.lat), r = p(t.lat), i = p(t.lat - e.lat), a = p(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 w * (2 * Math.atan2(Math.sqrt(o), Math.sqrt(1 - o)));
|
|
18
|
+
}
|
|
19
|
+
function E(e, t) {
|
|
20
|
+
let n = p(e.lat), r = p(t.lat), i = p(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 (S(Math.atan2(a, o)) + 360) % 360;
|
|
22
|
+
}
|
|
23
|
+
function D(e, t, n) {
|
|
24
|
+
let r = t / w, i = p(n), a = p(e.lat), o = p(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
|
+
return {
|
|
26
|
+
lat: S(s),
|
|
27
|
+
lng: S(l(c))
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function O(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 = S(Math.atan2(i, r)), u = S(Math.atan2(s, o)) - l, d = (a === 0 ? 0 : c / a) * T(t.geo, n.geo), f = E(t.geo, n.geo);
|
|
32
|
+
return D(t.geo, d, f + u);
|
|
33
|
+
}
|
|
34
|
+
function k(e, t, n) {
|
|
35
|
+
let r = T(t.geo, n.geo), i = E(t.geo, n.geo), a = T(t.geo, e), o = E(t.geo, e) - i, c = r === 0 ? 0 : a / r, l = n.local.x - t.local.x, u = n.local.y - t.local.y, d = Math.sqrt(l * l + u * u), f = Math.atan2(u, l), m = s(d * c, f + p(o));
|
|
36
|
+
return {
|
|
37
|
+
x: t.local.x + m.x,
|
|
38
|
+
y: t.local.y + m.y
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region ../geometry/src/lib/line.ts
|
|
43
|
+
function A(e) {
|
|
44
|
+
return f(e.p0, e.p1);
|
|
45
|
+
}
|
|
46
|
+
function te(e, t) {
|
|
47
|
+
return c(e.p0, e.p1, .5, t);
|
|
48
|
+
}
|
|
49
|
+
function j(e, t) {
|
|
50
|
+
return Math.atan2(t.y - e.y, t.x - e.x);
|
|
51
|
+
}
|
|
52
|
+
function ne(e, t, n) {
|
|
53
|
+
var r;
|
|
54
|
+
let i = e.p0.x, o = e.p0.y, s = e.p1.x, c = e.p1.y, l = t.x, u = t.y, d = s - i, p = c - o, m = d * d + p * p, h;
|
|
55
|
+
m === 0 ? h = 0 : (h = ((l - i) * d + (u - o) * p) / m, h = h < 0 ? 0 : h > 1 ? 1 : h);
|
|
56
|
+
let g = (n == null ? new a() : n).set(i + d * h, o + p * h, (r = e.elevation) == null ? 0 : r), _ = f({
|
|
57
|
+
x: l,
|
|
58
|
+
y: u
|
|
59
|
+
}, g);
|
|
60
|
+
return {
|
|
61
|
+
projected: g,
|
|
62
|
+
t: h,
|
|
63
|
+
distance: _
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region src/data/fpGeo.ts
|
|
68
|
+
function M() {
|
|
69
|
+
return u().__fpGeo;
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/utils/planBearing.ts
|
|
73
|
+
function N(e) {
|
|
74
|
+
return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + e * Math.PI / 360))) / 360;
|
|
75
|
+
}
|
|
76
|
+
function P(e, t) {
|
|
77
|
+
let n = (Math.atan2(N(t.lat) - N(e.lat), (t.lng - e.lng) / 360) - Math.atan2(t.y - e.y, t.x - e.x)) * 180 / Math.PI % 360;
|
|
78
|
+
return Number.isFinite(n) ? (n + 360) % 360 : NaN;
|
|
79
|
+
}
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region src/utils/gps.ts
|
|
82
|
+
function re(e) {
|
|
83
|
+
return [{
|
|
84
|
+
local: {
|
|
85
|
+
x: e.p0.x,
|
|
86
|
+
y: e.p0.y
|
|
87
|
+
},
|
|
88
|
+
geo: {
|
|
89
|
+
lat: e.p0.lat,
|
|
90
|
+
lng: e.p0.lng
|
|
91
|
+
}
|
|
92
|
+
}, {
|
|
93
|
+
local: {
|
|
94
|
+
x: e.p2.x,
|
|
95
|
+
y: e.p2.y
|
|
96
|
+
},
|
|
97
|
+
geo: {
|
|
98
|
+
lat: e.p2.lat,
|
|
99
|
+
lng: e.p2.lng
|
|
100
|
+
}
|
|
101
|
+
}];
|
|
102
|
+
}
|
|
103
|
+
function F(e) {
|
|
104
|
+
return typeof e == "number" && Number.isFinite(e);
|
|
105
|
+
}
|
|
106
|
+
function ie({ lat: e, lng: t, angle: r }, i) {
|
|
107
|
+
if (!(F(e) && F(t))) return null;
|
|
108
|
+
let { p0: a, p2: o } = i, s = T(a, o);
|
|
109
|
+
if (!F(s) || s <= 0) return n.warn("Invalid GPS config: zero or negative distance", {
|
|
110
|
+
fullGpsDistance: s,
|
|
111
|
+
p0: a,
|
|
112
|
+
p2: o
|
|
113
|
+
}), null;
|
|
114
|
+
let [c, l] = re(i), u = k({
|
|
115
|
+
lat: e,
|
|
116
|
+
lng: t
|
|
117
|
+
}, c, l);
|
|
118
|
+
return A({
|
|
119
|
+
p0: u,
|
|
120
|
+
p1: te({
|
|
121
|
+
p0: a,
|
|
122
|
+
p1: o
|
|
123
|
+
})
|
|
124
|
+
}) > 5 * f(a, o) ? (n.warn("Current position too far"), null) : {
|
|
125
|
+
...u,
|
|
126
|
+
angle: r
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
function ae(e, t, n) {
|
|
130
|
+
let [r, i] = re(n), { lat: a, lng: o } = O({
|
|
131
|
+
x: e,
|
|
132
|
+
y: t
|
|
133
|
+
}, r, i);
|
|
134
|
+
return [o, a];
|
|
135
|
+
}
|
|
136
|
+
function oe(e) {
|
|
137
|
+
var t, n;
|
|
138
|
+
let r = (t = M()) == null || (t = t.properties) == null ? void 0 : t.config, i = r ? P(r.p0, r.p2) : NaN, a = Number.isFinite(i) ? i : (n = r == null ? void 0 : r.bearing) == null ? 0 : n;
|
|
139
|
+
return (e == null ? void 0 : e.angle) === null ? 0 : (((e.angle - a) % 360 + 360) % 360 - 90 + 360) % 360;
|
|
140
|
+
}
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region ../wayfinding/src/core/graph/buildGraph.ts
|
|
143
|
+
function se(e, t, n) {
|
|
144
|
+
var r, i;
|
|
145
|
+
return t.build(e.getLines(), {
|
|
146
|
+
oriented: (r = n.oriented) == null || r,
|
|
147
|
+
onlyAccessible: (i = n.onlyAccessible) != null && i
|
|
148
|
+
}), {
|
|
149
|
+
finder: t,
|
|
150
|
+
dataSource: e,
|
|
151
|
+
options: n
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
//#endregion
|
|
155
|
+
//#region ../../node_modules/.pnpm/ngraph.events@1.4.0/node_modules/ngraph.events/dist/ngraph.events.cjs
|
|
156
|
+
var ce = /* @__PURE__ */ t(((e, t) => {
|
|
157
|
+
function n(e) {
|
|
158
|
+
i(e);
|
|
159
|
+
let t = r(e);
|
|
160
|
+
return e.on = t.on, e.off = t.off, e.fire = t.fire, e;
|
|
161
|
+
}
|
|
162
|
+
function r(e) {
|
|
163
|
+
let t = Object.create(null);
|
|
164
|
+
return {
|
|
165
|
+
on: function(n, r, i) {
|
|
166
|
+
if (typeof r != "function") throw Error("callback is expected to be a function");
|
|
167
|
+
let a = t[n];
|
|
168
|
+
return a || (a = t[n] = []), a.push({
|
|
169
|
+
callback: r,
|
|
170
|
+
ctx: i
|
|
171
|
+
}), e;
|
|
172
|
+
},
|
|
173
|
+
off: function(n, r) {
|
|
174
|
+
if (typeof n > "u") return t = Object.create(null), e;
|
|
175
|
+
if (t[n]) if (typeof r != "function") delete t[n];
|
|
176
|
+
else {
|
|
177
|
+
let e = t[n];
|
|
178
|
+
for (let t = 0; t < e.length; ++t) e[t].callback === r && e.splice(t, 1);
|
|
179
|
+
}
|
|
180
|
+
return e;
|
|
181
|
+
},
|
|
182
|
+
fire: function(n) {
|
|
183
|
+
let r = t[n];
|
|
184
|
+
if (!r) return e;
|
|
185
|
+
let i;
|
|
186
|
+
arguments.length > 1 && (i = Array.prototype.slice.call(arguments, 1));
|
|
187
|
+
for (let e = 0; e < r.length; ++e) {
|
|
188
|
+
let t = r[e];
|
|
189
|
+
t.callback.apply(t.ctx, i);
|
|
190
|
+
}
|
|
191
|
+
return e;
|
|
192
|
+
}
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
function i(e) {
|
|
196
|
+
if (!e) throw Error("Eventify cannot use falsy object as events subject");
|
|
197
|
+
let t = [
|
|
198
|
+
"on",
|
|
199
|
+
"fire",
|
|
200
|
+
"off"
|
|
201
|
+
];
|
|
202
|
+
for (let n = 0; n < t.length; ++n) if (e.hasOwnProperty(t[n])) throw Error("Subject cannot be eventified, since it already has property '" + t[n] + "'");
|
|
203
|
+
}
|
|
204
|
+
t.exports = n;
|
|
205
|
+
})), le = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
206
|
+
t.exports = r;
|
|
207
|
+
var n = ce();
|
|
208
|
+
function r(e) {
|
|
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 ? T : w, f = [], p = P, m = P, h = P, g = P, _ = {
|
|
211
|
+
addNode: x,
|
|
212
|
+
addLink: ee,
|
|
213
|
+
removeLink: k,
|
|
214
|
+
removeNode: C,
|
|
215
|
+
getNode: S,
|
|
216
|
+
getNodeCount: E,
|
|
217
|
+
getLinkCount: D,
|
|
218
|
+
getLinksCount: D,
|
|
219
|
+
getNodesCount: E,
|
|
220
|
+
getLinks: O,
|
|
221
|
+
forEachNode: ie,
|
|
222
|
+
forEachLinkedNode: ne,
|
|
223
|
+
forEachLink: j,
|
|
224
|
+
beginUpdate: h,
|
|
225
|
+
endUpdate: g,
|
|
226
|
+
clear: te,
|
|
227
|
+
hasLink: A,
|
|
228
|
+
hasNode: S,
|
|
229
|
+
getLink: A
|
|
230
|
+
};
|
|
231
|
+
return n(_), v(), _;
|
|
232
|
+
function v() {
|
|
233
|
+
var e = _.on;
|
|
234
|
+
_.on = t;
|
|
235
|
+
function t() {
|
|
236
|
+
return _.beginUpdate = h = re, _.endUpdate = g = F, p = y, m = b, _.on = e, e.apply(_, arguments);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
function y(e, t) {
|
|
240
|
+
f.push({
|
|
241
|
+
link: e,
|
|
242
|
+
changeType: t
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
function b(e, t) {
|
|
246
|
+
f.push({
|
|
247
|
+
node: e,
|
|
248
|
+
changeType: t
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
function x(e, n) {
|
|
252
|
+
if (e === void 0) throw Error("Invalid node identifier");
|
|
253
|
+
h();
|
|
254
|
+
var r = S(e);
|
|
255
|
+
return r ? (r.data = n, m(r, "update")) : (r = new a(e, n), m(r, "add")), t.set(e, r), g(), r;
|
|
256
|
+
}
|
|
257
|
+
function S(e) {
|
|
258
|
+
return t.get(e);
|
|
259
|
+
}
|
|
260
|
+
function C(e) {
|
|
261
|
+
var n = S(e);
|
|
262
|
+
if (!n) return !1;
|
|
263
|
+
h();
|
|
264
|
+
var r = n.links;
|
|
265
|
+
if (r) {
|
|
266
|
+
n.links = null;
|
|
267
|
+
for (var i = 0; i < r.length; ++i) k(r[i]);
|
|
268
|
+
}
|
|
269
|
+
return t.delete(e), m(n, "remove"), g(), !0;
|
|
270
|
+
}
|
|
271
|
+
function ee(e, t, n) {
|
|
272
|
+
h();
|
|
273
|
+
var i = S(e) || x(e), a = S(t) || x(t), s = d(e, t, n);
|
|
274
|
+
return r.push(s), o(i, s), e !== t && o(a, s), p(s, "add"), g(), s;
|
|
275
|
+
}
|
|
276
|
+
function w(e, t, n) {
|
|
277
|
+
return new s(e, t, n, c(e, t));
|
|
278
|
+
}
|
|
279
|
+
function T(e, t, n) {
|
|
280
|
+
var r = c(e, t), i = l.hasOwnProperty(r);
|
|
281
|
+
if (i || A(e, t)) {
|
|
282
|
+
i || (l[r] = 0);
|
|
283
|
+
var a = "@" + ++l[r];
|
|
284
|
+
r = c(e + a, t + a);
|
|
285
|
+
}
|
|
286
|
+
return new s(e, t, n, r);
|
|
287
|
+
}
|
|
288
|
+
function E() {
|
|
289
|
+
return t.size;
|
|
290
|
+
}
|
|
291
|
+
function D() {
|
|
292
|
+
return r.length;
|
|
293
|
+
}
|
|
294
|
+
function O(e) {
|
|
295
|
+
var t = S(e);
|
|
296
|
+
return t ? t.links : null;
|
|
297
|
+
}
|
|
298
|
+
function k(e) {
|
|
299
|
+
if (!e) return !1;
|
|
300
|
+
var t = i(e, r);
|
|
301
|
+
if (t < 0) return !1;
|
|
302
|
+
h(), r.splice(t, 1);
|
|
303
|
+
var n = S(e.fromId), a = S(e.toId);
|
|
304
|
+
return n && (t = i(e, n.links), t >= 0 && n.links.splice(t, 1)), a && (t = i(e, a.links), t >= 0 && a.links.splice(t, 1)), p(e, "remove"), g(), !0;
|
|
305
|
+
}
|
|
306
|
+
function A(e, t) {
|
|
307
|
+
var n = S(e), r;
|
|
308
|
+
if (!n || !n.links) return null;
|
|
309
|
+
for (r = 0; r < n.links.length; ++r) {
|
|
310
|
+
var i = n.links[r];
|
|
311
|
+
if (i.fromId === e && i.toId === t) return i;
|
|
312
|
+
}
|
|
313
|
+
return null;
|
|
314
|
+
}
|
|
315
|
+
function te() {
|
|
316
|
+
h(), ie(function(e) {
|
|
317
|
+
C(e.id);
|
|
318
|
+
}), g();
|
|
319
|
+
}
|
|
320
|
+
function j(e) {
|
|
321
|
+
var t, n;
|
|
322
|
+
if (typeof e == "function") for (t = 0, n = r.length; t < n; ++t) e(r[t]);
|
|
323
|
+
}
|
|
324
|
+
function ne(e, t, n) {
|
|
325
|
+
var r = S(e);
|
|
326
|
+
if (r && r.links && typeof t == "function") return n ? N(r.links, e, t) : M(r.links, e, t);
|
|
327
|
+
}
|
|
328
|
+
function M(e, n, r) {
|
|
329
|
+
for (var i, a = 0; a < e.length; ++a) {
|
|
330
|
+
var o = e[a], s = o.fromId === n ? o.toId : o.fromId;
|
|
331
|
+
if (i = r(t.get(s), o), i) return !0;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
function N(e, n, r) {
|
|
335
|
+
for (var i, a = 0; a < e.length; ++a) {
|
|
336
|
+
var o = e[a];
|
|
337
|
+
if (o.fromId === n && (i = r(t.get(o.toId), o), i)) return !0;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
function P() {}
|
|
341
|
+
function re() {
|
|
342
|
+
u += 1;
|
|
343
|
+
}
|
|
344
|
+
function F() {
|
|
345
|
+
--u, u === 0 && f.length > 0 && (_.fire("changed", f), f.length = 0);
|
|
346
|
+
}
|
|
347
|
+
function ie(e) {
|
|
348
|
+
if (typeof e != "function") throw Error("Function is expected to iterate over graph nodes. You passed " + e);
|
|
349
|
+
for (var n = t.values(), r = n.next(); !r.done;) {
|
|
350
|
+
if (e(r.value)) return !0;
|
|
351
|
+
r = n.next();
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
function i(e, t) {
|
|
356
|
+
if (!t) return -1;
|
|
357
|
+
if (t.indexOf) return t.indexOf(e);
|
|
358
|
+
var n = t.length, r;
|
|
359
|
+
for (r = 0; r < n; r += 1) if (t[r] === e) return r;
|
|
360
|
+
return -1;
|
|
361
|
+
}
|
|
362
|
+
function a(e, t) {
|
|
363
|
+
this.id = e, this.links = null, this.data = t;
|
|
364
|
+
}
|
|
365
|
+
function o(e, t) {
|
|
366
|
+
e.links ? e.links.push(t) : e.links = [t];
|
|
367
|
+
}
|
|
368
|
+
function s(e, t, n, r) {
|
|
369
|
+
this.fromId = e, this.toId = t, this.data = n, this.id = r;
|
|
370
|
+
}
|
|
371
|
+
function c(e, t) {
|
|
372
|
+
return e.toString() + "👉 " + t.toString();
|
|
373
|
+
}
|
|
374
|
+
})))(), 1), I = (e) => {
|
|
375
|
+
var t;
|
|
376
|
+
return `${(t = e.layer) == null ? "" : t}_${e.x}_${e.y}`;
|
|
377
|
+
}, ue = 1, L = (e, t) => {
|
|
378
|
+
var n, r;
|
|
379
|
+
return ((n = e.layer) == null ? "" : n) === ((r = t.layer) == null ? "" : r) && f(e, t) <= ue;
|
|
380
|
+
}, de = (e, t, n) => L(e.p0, t) && L(e.p1, n) || L(e.p0, n) && L(e.p1, t);
|
|
381
|
+
function fe(e, t, n) {
|
|
382
|
+
return e.find((e) => de(e, t, n));
|
|
383
|
+
}
|
|
384
|
+
var pe = p(5);
|
|
385
|
+
function me(e, t) {
|
|
386
|
+
if (e.virtual !== t.virtual) return !1;
|
|
387
|
+
let n = j(e.p0, e.p1), r = j(t.p0, t.p1), i = Math.abs(r - n);
|
|
388
|
+
return i > Math.PI && (i = 2 * Math.PI - i), i <= pe;
|
|
389
|
+
}
|
|
390
|
+
function he(e, t) {
|
|
391
|
+
let n = [];
|
|
392
|
+
for (let r = 1; r < e.length; r++) {
|
|
393
|
+
let i = e[r - 1], a = e[r], o = fe(t, i, a);
|
|
394
|
+
if (!o) {
|
|
395
|
+
console.warn(`WF: buildRouteSegments — no line found between ${I(i)} and ${I(a)}`);
|
|
396
|
+
continue;
|
|
397
|
+
}
|
|
398
|
+
let s = {
|
|
399
|
+
p0: i,
|
|
400
|
+
p1: a,
|
|
401
|
+
virtual: o.virtual
|
|
402
|
+
}, c = n[n.length - 1];
|
|
403
|
+
c && me(c, s) ? n[n.length - 1] = {
|
|
404
|
+
...c,
|
|
405
|
+
p1: s.p1
|
|
406
|
+
} : n.push(s);
|
|
407
|
+
}
|
|
408
|
+
return n;
|
|
409
|
+
}
|
|
410
|
+
//#endregion
|
|
411
|
+
//#region ../wayfinding/src/core/graph/constants.ts
|
|
412
|
+
var ge = 1e4, _e = 1.01;
|
|
413
|
+
//#endregion
|
|
414
|
+
//#region ../wayfinding/src/core/graph/linkCost.ts
|
|
415
|
+
function ve(e) {
|
|
416
|
+
return f(e.p0, e.p1) / (e.weight || 4);
|
|
417
|
+
}
|
|
418
|
+
function ye(e) {
|
|
419
|
+
var t, n;
|
|
420
|
+
return ((t = e.p0.layer) == null ? "" : t) !== ((n = e.p1.layer) == null ? "" : n);
|
|
421
|
+
}
|
|
422
|
+
function be(e) {
|
|
423
|
+
return e.virtual ? e.virtualLength == null ? ye(e) ? ge : 0 : e.virtualLength : ve(e);
|
|
424
|
+
}
|
|
425
|
+
//#endregion
|
|
426
|
+
//#region ../wayfinding/src/core/graph/buildNGraph.ts
|
|
427
|
+
function xe(e, t) {
|
|
428
|
+
let { oriented: n, onlyAccessible: r } = t, i = (0, le.default)();
|
|
429
|
+
for (let t of e) {
|
|
430
|
+
if (r && t.unaccessible) continue;
|
|
431
|
+
let e = I(t.p0), a = I(t.p1), o = be(t);
|
|
432
|
+
i.addLink(e, a, { distance: o }), n && !t.unidirection && i.addLink(a, e, { distance: o });
|
|
433
|
+
}
|
|
434
|
+
return i;
|
|
435
|
+
}
|
|
436
|
+
//#endregion
|
|
437
|
+
//#region ../wayfinding/src/core/graph/utils/a-star/defaultSettings.js
|
|
438
|
+
var Se = [];
|
|
439
|
+
typeof Object.freeze == "function" && Object.freeze(Se);
|
|
440
|
+
var R = {
|
|
441
|
+
heuristic: Ce,
|
|
442
|
+
distance: we,
|
|
443
|
+
blocked: Te,
|
|
444
|
+
compareFScore: Ee,
|
|
445
|
+
NO_PATH: Se,
|
|
446
|
+
setHeapIndex: De,
|
|
447
|
+
setH1: Ae,
|
|
448
|
+
setH2: je,
|
|
449
|
+
compareF1Score: Oe,
|
|
450
|
+
compareF2Score: ke
|
|
451
|
+
};
|
|
452
|
+
function Ce() {
|
|
453
|
+
return 0;
|
|
454
|
+
}
|
|
455
|
+
function we() {
|
|
456
|
+
return 1;
|
|
457
|
+
}
|
|
458
|
+
function Te() {
|
|
459
|
+
return !1;
|
|
460
|
+
}
|
|
461
|
+
function Ee(e, t) {
|
|
462
|
+
return e.fScore - t.fScore;
|
|
463
|
+
}
|
|
464
|
+
function De(e, t) {
|
|
465
|
+
e.heapIndex = t;
|
|
466
|
+
}
|
|
467
|
+
function Oe(e, t) {
|
|
468
|
+
return e.f1 - t.f1;
|
|
469
|
+
}
|
|
470
|
+
function ke(e, t) {
|
|
471
|
+
return e.f2 - t.f2;
|
|
472
|
+
}
|
|
473
|
+
function Ae(e, t) {
|
|
474
|
+
e.h1 = t;
|
|
475
|
+
}
|
|
476
|
+
function je(e, t) {
|
|
477
|
+
e.h2 = t;
|
|
478
|
+
}
|
|
479
|
+
//#endregion
|
|
480
|
+
//#region ../wayfinding/src/core/graph/utils/a-star/makeSearchStatePool.js
|
|
481
|
+
function Me(e) {
|
|
482
|
+
this.node = e, this.parent = null, this.closed = !1, this.open = 0, this.distanceToSource = Infinity, this.fScore = Infinity, this.heapIndex = -1;
|
|
483
|
+
}
|
|
484
|
+
function Ne() {
|
|
485
|
+
let e = 0, t = [];
|
|
486
|
+
return {
|
|
487
|
+
createNewState: r,
|
|
488
|
+
reset: n
|
|
489
|
+
};
|
|
490
|
+
function n() {
|
|
491
|
+
e = 0;
|
|
492
|
+
}
|
|
493
|
+
function r(n) {
|
|
494
|
+
let r = t[e];
|
|
495
|
+
return r ? (r.node = n, r.parent = null, r.closed = !1, r.open = 0, r.distanceToSource = Infinity, r.fScore = Infinity, r.heapIndex = -1) : (r = new Me(n), t[e] = r), e++, r;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
//#endregion
|
|
499
|
+
//#region ../wayfinding/src/core/graph/utils/a-star/NodeHeap.js
|
|
500
|
+
function z(e, t) {
|
|
501
|
+
if (!(this instanceof z)) return new z(e, t);
|
|
502
|
+
if (Array.isArray(e) || (t = e, e = []), t = t || {}, this.data = e || [], this.length = this.data.length, this.compare = t.compare || Fe, this.setNodeId = t.setNodeId || Pe, this.length > 0) for (let e = this.length >> 1; e >= 0; e--) this._down(e);
|
|
503
|
+
if (t.setNodeId) for (let e = 0; e < this.length; ++e) this.setNodeId(this.data[e], e);
|
|
504
|
+
}
|
|
505
|
+
function Pe() {}
|
|
506
|
+
function Fe(e, t) {
|
|
507
|
+
return e - t;
|
|
508
|
+
}
|
|
509
|
+
z.prototype = {
|
|
510
|
+
push: function(e) {
|
|
511
|
+
this.data.push(e), this.setNodeId(e, this.length), this.length++, this._up(this.length - 1);
|
|
512
|
+
},
|
|
513
|
+
pop: function() {
|
|
514
|
+
if (this.length === 0) return;
|
|
515
|
+
let e = this.data[0];
|
|
516
|
+
return this.length--, this.length > 0 && (this.data[0] = this.data[this.length], this.setNodeId(this.data[0], 0), this._down(0)), this.data.pop(), e;
|
|
517
|
+
},
|
|
518
|
+
peek: function() {
|
|
519
|
+
return this.data[0];
|
|
520
|
+
},
|
|
521
|
+
updateItem: function(e) {
|
|
522
|
+
this._down(e), this._up(e);
|
|
523
|
+
},
|
|
524
|
+
_up: function(e) {
|
|
525
|
+
let t = this.data, n = this.compare, r = this.setNodeId, i = t[e];
|
|
526
|
+
for (; e > 0;) {
|
|
527
|
+
let a = e - 1 >> 1, o = t[a];
|
|
528
|
+
if (n(i, o) >= 0) break;
|
|
529
|
+
t[e] = o, r(o, e), e = a;
|
|
530
|
+
}
|
|
531
|
+
t[e] = i, r(i, e);
|
|
532
|
+
},
|
|
533
|
+
_down: function(e) {
|
|
534
|
+
let t = this.data, n = this.compare, r = this.length >> 1, i = t[e], a = this.setNodeId;
|
|
535
|
+
for (; e < r;) {
|
|
536
|
+
let r = (e << 1) + 1, o = r + 1, s = t[r];
|
|
537
|
+
if (o < this.length && n(t[o], s) < 0 && (r = o, s = t[o]), n(s, i) >= 0) break;
|
|
538
|
+
t[e] = s, a(s, e), e = r;
|
|
539
|
+
}
|
|
540
|
+
t[e] = i, a(i, e);
|
|
541
|
+
}
|
|
542
|
+
};
|
|
543
|
+
//#endregion
|
|
544
|
+
//#region ../wayfinding/src/core/graph/utils/a-star/a-star.js
|
|
545
|
+
var Ie = R.NO_PATH;
|
|
546
|
+
function Le(e, t) {
|
|
547
|
+
t = t || {};
|
|
548
|
+
let n = t.oriented, r = t.blocked;
|
|
549
|
+
r || (r = R.blocked);
|
|
550
|
+
let i = t.heuristic;
|
|
551
|
+
i || (i = R.heuristic);
|
|
552
|
+
let a = t.distance;
|
|
553
|
+
a || (a = R.distance);
|
|
554
|
+
let o = Ne();
|
|
555
|
+
return { find: s };
|
|
556
|
+
function s(t, s) {
|
|
557
|
+
let c = e.getNode(t);
|
|
558
|
+
if (!c) throw Error("fromId is not defined in this graph: " + t);
|
|
559
|
+
let l = e.getNode(s);
|
|
560
|
+
if (!l) throw Error("toId is not defined in this graph: " + s);
|
|
561
|
+
o.reset();
|
|
562
|
+
let u = /* @__PURE__ */ new Map(), d = new z({
|
|
563
|
+
compare: R.compareFScore,
|
|
564
|
+
setNodeId: R.setHeapIndex
|
|
565
|
+
}), f = o.createNewState(c);
|
|
566
|
+
u.set(t, f), f.fScore = i(c, l), f.distanceToSource = 0, d.push(f), f.open = 1;
|
|
567
|
+
let p;
|
|
568
|
+
for (; d.length > 0;) {
|
|
569
|
+
if (p = d.pop(), Re(p, l)) return ze(p);
|
|
570
|
+
p.closed = !0, e.forEachLinkedNode(p.node.id, m, n);
|
|
571
|
+
}
|
|
572
|
+
return Ie;
|
|
573
|
+
function m(e, t) {
|
|
574
|
+
let n = u.get(e.id);
|
|
575
|
+
if (n || (n = o.createNewState(e), u.set(e.id, n)), n.closed || (n.open === 0 && (d.push(n), n.open = 1), r(e, p.node, t))) return;
|
|
576
|
+
let s = p.distanceToSource + a(e, p, t);
|
|
577
|
+
s >= n.distanceToSource || (n.parent = p, n.distanceToSource = s, n.fScore = s + i(n.node, l), d.updateItem(n.heapIndex));
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
function Re(e, t) {
|
|
582
|
+
return e.node === t;
|
|
583
|
+
}
|
|
584
|
+
function ze(e) {
|
|
585
|
+
let t = [e.node], n = e.parent;
|
|
586
|
+
for (; n;) t.push(n.node), n = n.parent;
|
|
587
|
+
return t;
|
|
588
|
+
}
|
|
589
|
+
//#endregion
|
|
590
|
+
//#region ../wayfinding/src/core/graph/pathfinder/parseNodeId.ts
|
|
591
|
+
function B(e) {
|
|
592
|
+
let t = e.lastIndexOf("_"), n = e.lastIndexOf("_", t - 1);
|
|
593
|
+
if (n === -1) throw Error(`WF: invalid node ID format "${e}", expected "{layer}_{x}_{y}"`);
|
|
594
|
+
return [
|
|
595
|
+
e.substring(0, n),
|
|
596
|
+
parseFloat(e.substring(n + 1, t)),
|
|
597
|
+
parseFloat(e.substring(t + 1))
|
|
598
|
+
];
|
|
599
|
+
}
|
|
600
|
+
//#endregion
|
|
601
|
+
//#region ../wayfinding/src/core/graph/pathfinder/aStarPathFinder.ts
|
|
602
|
+
function Be() {
|
|
603
|
+
return function(e, t, n) {
|
|
604
|
+
let r = 1;
|
|
605
|
+
if (t.parent) {
|
|
606
|
+
let [, n, i] = B(t.parent.node.id), [, a, o] = B(t.node.id), [, s, c] = B(e.id);
|
|
607
|
+
j({
|
|
608
|
+
x: n,
|
|
609
|
+
y: i
|
|
610
|
+
}, {
|
|
611
|
+
x: a,
|
|
612
|
+
y: o
|
|
613
|
+
}) !== j({
|
|
614
|
+
x: a,
|
|
615
|
+
y: o
|
|
616
|
+
}, {
|
|
617
|
+
x: s,
|
|
618
|
+
y: c
|
|
619
|
+
}) && (r = _e);
|
|
620
|
+
}
|
|
621
|
+
return r * n.data.distance;
|
|
622
|
+
};
|
|
623
|
+
}
|
|
624
|
+
function Ve() {
|
|
625
|
+
let e = null, t = null;
|
|
626
|
+
return {
|
|
627
|
+
build(n, r) {
|
|
628
|
+
t = xe(n, r), e = Le(t, {
|
|
629
|
+
oriented: r.oriented,
|
|
630
|
+
distance: Be()
|
|
631
|
+
});
|
|
632
|
+
},
|
|
633
|
+
hasNode(e) {
|
|
634
|
+
return t ? !!t.hasNode(e) : !1;
|
|
635
|
+
},
|
|
636
|
+
find(t, n) {
|
|
637
|
+
if (!e) return [];
|
|
638
|
+
let r = e.find(t, n);
|
|
639
|
+
return r.length ? r.map((e) => {
|
|
640
|
+
let [t, n, r] = B(e.id);
|
|
641
|
+
return {
|
|
642
|
+
id: e.id,
|
|
643
|
+
layer: t,
|
|
644
|
+
x: n,
|
|
645
|
+
y: r
|
|
646
|
+
};
|
|
647
|
+
}).reverse() : [];
|
|
648
|
+
}
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
//#endregion
|
|
652
|
+
//#region ../wayfinding/src/core/graph/graphCache.ts
|
|
653
|
+
function He() {
|
|
654
|
+
let e = null, t = !1;
|
|
655
|
+
return { getOrBuild(n, r) {
|
|
656
|
+
return e && t === r ? e : (e = se(n, Ve(), {
|
|
657
|
+
oriented: !0,
|
|
658
|
+
onlyAccessible: r
|
|
659
|
+
}), t = r, e);
|
|
660
|
+
} };
|
|
661
|
+
}
|
|
662
|
+
//#endregion
|
|
663
|
+
//#region ../wayfinding/src/core/routing/getRouteLength.ts
|
|
664
|
+
function V(e) {
|
|
665
|
+
return e.reduce((e, t) => e + f(t.p0, t.p1), 0);
|
|
666
|
+
}
|
|
667
|
+
//#endregion
|
|
668
|
+
//#region ../wayfinding/src/core/graph/findShortestPath.ts
|
|
669
|
+
function Ue(e, t, n) {
|
|
670
|
+
return {
|
|
671
|
+
layer: e,
|
|
672
|
+
x: t,
|
|
673
|
+
y: n
|
|
674
|
+
};
|
|
675
|
+
}
|
|
676
|
+
function We(e, t) {
|
|
677
|
+
let n = 0;
|
|
678
|
+
for (let r = 1; r < e.length; r++) {
|
|
679
|
+
let i = fe(t, e[r - 1], e[r]);
|
|
680
|
+
i && (n += be(i));
|
|
681
|
+
}
|
|
682
|
+
return n;
|
|
683
|
+
}
|
|
684
|
+
function Ge(e, t, n) {
|
|
685
|
+
let r = e.dataSource.getLines(), i = null, a = Infinity;
|
|
686
|
+
for (let o of t) for (let t of n) {
|
|
687
|
+
let n = I(o), s = I(t);
|
|
688
|
+
if (!e.finder.hasNode(n) || !e.finder.hasNode(s)) {
|
|
689
|
+
console.debug(`WF. findShortestPath: node not in graph, skipping pair ${n} → ${s}`);
|
|
690
|
+
continue;
|
|
691
|
+
}
|
|
692
|
+
let c = e.finder.find(n, s);
|
|
693
|
+
if (!c.length) continue;
|
|
694
|
+
let l = c.map((e) => Ue(e.layer, e.x, e.y)), u = he(l, r);
|
|
695
|
+
if (!u.length) continue;
|
|
696
|
+
let d = We(l, r);
|
|
697
|
+
d < a && (a = d, i = {
|
|
698
|
+
lines: u,
|
|
699
|
+
distance: V(u)
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
return i;
|
|
703
|
+
}
|
|
704
|
+
//#endregion
|
|
705
|
+
//#region ../wayfinding/src/core/routing/routeResult.ts
|
|
706
|
+
var H = () => ({
|
|
707
|
+
lines: [],
|
|
708
|
+
totalDistance: 0
|
|
709
|
+
});
|
|
710
|
+
//#endregion
|
|
711
|
+
//#region ../wayfinding/src/core/routing/buildRoute.ts
|
|
712
|
+
function Ke(e, t, n) {
|
|
713
|
+
if (!t.length || !n.length) return H();
|
|
714
|
+
let r = Ge(e, t, n);
|
|
715
|
+
return r ? {
|
|
716
|
+
lines: r.lines,
|
|
717
|
+
totalDistance: r.distance
|
|
718
|
+
} : H();
|
|
719
|
+
}
|
|
720
|
+
//#endregion
|
|
721
|
+
//#region ../wayfinding/src/core/routing/buildMultiPointRoute.ts
|
|
722
|
+
function qe(e, t) {
|
|
723
|
+
if (t.length < 2) return H();
|
|
724
|
+
let n = t.filter((e, n) => n === 0 || n === t.length - 1 || e.length > 0);
|
|
725
|
+
if (n.length < 2) return H();
|
|
726
|
+
if (n.length === 2) return Ke(e, n[0], n[1]);
|
|
727
|
+
let r = [];
|
|
728
|
+
for (let t = 0; t < n.length - 1; t++) r.push(Ke(e, n[t], n[t + 1]));
|
|
729
|
+
return {
|
|
730
|
+
lines: r.flatMap((e) => e.lines),
|
|
731
|
+
totalDistance: r.reduce((e, t) => e + t.totalDistance, 0)
|
|
732
|
+
};
|
|
733
|
+
}
|
|
734
|
+
//#endregion
|
|
735
|
+
//#region ../wayfinding/src/core/routing/optimizeWaypointOrder.ts
|
|
736
|
+
var Je = 100, Ye = -.01;
|
|
737
|
+
function Xe(e) {
|
|
738
|
+
let t = new Map(e), n = Array.from(t.keys());
|
|
739
|
+
if (n.length <= 2) return n;
|
|
740
|
+
let r = Qe(n, t);
|
|
741
|
+
return r.length < 4 ? r : $e(r, t);
|
|
742
|
+
}
|
|
743
|
+
function Ze(e) {
|
|
744
|
+
if (e.length <= 3) return e;
|
|
745
|
+
let t = e[0], n = e[e.length - 1], r = e.slice(1, -1);
|
|
746
|
+
return [
|
|
747
|
+
t,
|
|
748
|
+
...Xe(r.map((e, t) => [String(t), {
|
|
749
|
+
x: e.x,
|
|
750
|
+
y: e.y
|
|
751
|
+
}])).map((e) => r[Number(e)]),
|
|
752
|
+
n
|
|
753
|
+
];
|
|
754
|
+
}
|
|
755
|
+
function Qe(e, t) {
|
|
756
|
+
let n = [e[0]], r = new Set(e), i = e[0];
|
|
757
|
+
for (r.delete(e[0]); r.size > 0;) {
|
|
758
|
+
let e = t.get(i), a = "", o = Infinity;
|
|
759
|
+
for (let n of r) {
|
|
760
|
+
let r = t.get(n), i = Math.abs(e.x - r.x) + Math.abs(e.y - r.y);
|
|
761
|
+
i < o && (o = i, a = n);
|
|
762
|
+
}
|
|
763
|
+
if (!a) break;
|
|
764
|
+
n.push(a), r.delete(a), i = a;
|
|
765
|
+
}
|
|
766
|
+
return n;
|
|
767
|
+
}
|
|
768
|
+
function $e(e, t) {
|
|
769
|
+
let n = [...e], r = !0;
|
|
770
|
+
for (let e = 0; r && e < Je; e++) {
|
|
771
|
+
r = !1;
|
|
772
|
+
scan: for (let e = 1; e < n.length - 2; e++) for (let i = e + 1; i < n.length - 1; i++) {
|
|
773
|
+
let a = t.get(n[e - 1]), o = t.get(n[e]), s = t.get(n[i]), c = t.get(n[i + 1]);
|
|
774
|
+
if (Math.abs(a.x - s.x) + Math.abs(a.y - s.y) + Math.abs(o.x - c.x) + Math.abs(o.y - c.y) - (Math.abs(a.x - o.x) + Math.abs(a.y - o.y)) - (Math.abs(s.x - c.x) + Math.abs(s.y - c.y)) < Ye) {
|
|
775
|
+
for (let t = e, r = i; t < r; t++, r--) [n[t], n[r]] = [n[r], n[t]];
|
|
776
|
+
r = !0;
|
|
777
|
+
break scan;
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
return n;
|
|
782
|
+
}
|
|
783
|
+
//#endregion
|
|
784
|
+
//#region ../wayfinding/src/core/geometry/projectPointOnSegment.ts
|
|
785
|
+
function et(e, t, n) {
|
|
786
|
+
let { projected: r, distance: i, t: a } = ne({
|
|
787
|
+
p0: t,
|
|
788
|
+
p1: n
|
|
789
|
+
}, e);
|
|
790
|
+
return {
|
|
791
|
+
projected: {
|
|
792
|
+
x: r.x,
|
|
793
|
+
y: r.y
|
|
794
|
+
},
|
|
795
|
+
distance: i,
|
|
796
|
+
t: a
|
|
797
|
+
};
|
|
798
|
+
}
|
|
799
|
+
//#endregion
|
|
800
|
+
//#region ../wayfinding/src/core/geometry/pointInPolygon.ts
|
|
801
|
+
var tt = .01;
|
|
802
|
+
function nt(e, t, n) {
|
|
803
|
+
return Math.abs(.5 * (e.x * (t.y - n.y) + t.x * (n.y - e.y) + n.x * (e.y - t.y)));
|
|
804
|
+
}
|
|
805
|
+
function rt(e) {
|
|
806
|
+
if (e.length < 3) return 0;
|
|
807
|
+
let t = 0;
|
|
808
|
+
for (let n = 1; n < e.length - 1; n++) t += nt(e[0], e[n], e[n + 1]);
|
|
809
|
+
return t;
|
|
810
|
+
}
|
|
811
|
+
function it(e, t, n = rt(t)) {
|
|
812
|
+
if (n === 0) return !1;
|
|
813
|
+
let r = 0;
|
|
814
|
+
for (let n = 0, i = t.length - 1; n < t.length; i = n++) r += nt(e, t[i], t[n]);
|
|
815
|
+
return Math.abs(n - r) < n * tt;
|
|
816
|
+
}
|
|
817
|
+
//#endregion
|
|
818
|
+
//#region ../wayfinding/src/core/routing/graphPointResolvers.ts
|
|
819
|
+
function at(e, t, n) {
|
|
820
|
+
let r = rt(t);
|
|
821
|
+
return e.getLineEnds().filter((e) => (!n || e.layer === n) && it(e, t, r));
|
|
822
|
+
}
|
|
823
|
+
//#endregion
|
|
824
|
+
//#region ../wayfinding/src/core/routing/resolveWaypointCandidates.ts
|
|
825
|
+
function ot(e, t) {
|
|
826
|
+
var n;
|
|
827
|
+
if ((n = t.bounds) != null && n.length) return {
|
|
828
|
+
candidates: at(e.dataSource, t.bounds, t.layer),
|
|
829
|
+
offGraphEntry: null
|
|
830
|
+
};
|
|
831
|
+
let r = null, i = Infinity;
|
|
832
|
+
for (let n of e.dataSource.getLines()) {
|
|
833
|
+
if (n.virtual || t.layer && n.p0.layer !== t.layer || n.p0.x === n.p1.x && n.p0.y === n.p1.y) continue;
|
|
834
|
+
let e = et(t, n.p0, n.p1);
|
|
835
|
+
e.distance < i && (i = e.distance, r = {
|
|
836
|
+
segment: n,
|
|
837
|
+
proj: e
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
if (!r) return {
|
|
841
|
+
candidates: [],
|
|
842
|
+
offGraphEntry: null
|
|
843
|
+
};
|
|
844
|
+
let { segment: a, proj: o } = r;
|
|
845
|
+
return o.t === 0 ? {
|
|
846
|
+
candidates: [a.p0],
|
|
847
|
+
offGraphEntry: null
|
|
848
|
+
} : o.t === 1 ? {
|
|
849
|
+
candidates: [a.p1],
|
|
850
|
+
offGraphEntry: null
|
|
851
|
+
} : {
|
|
852
|
+
candidates: [a.p0, a.p1],
|
|
853
|
+
offGraphEntry: {
|
|
854
|
+
segment: a,
|
|
855
|
+
projection: {
|
|
856
|
+
layer: a.p0.layer,
|
|
857
|
+
x: o.projected.x,
|
|
858
|
+
y: o.projected.y
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
//#endregion
|
|
864
|
+
//#region ../wayfinding/src/core/createWayfindingEngine.ts
|
|
865
|
+
var st = 1e-6, U = (e, t) => e.layer === t.layer && Math.abs(e.x - t.x) < st && Math.abs(e.y - t.y) < st;
|
|
866
|
+
function ct(e, t) {
|
|
867
|
+
if (!e.length) return e;
|
|
868
|
+
let n = e[0], r = n.p0, i = U(t.segment.p0, r) ? t.segment.p1 : t.segment.p0;
|
|
869
|
+
return U(n.p1, i) ? [{
|
|
870
|
+
...n,
|
|
871
|
+
p0: t.projection
|
|
872
|
+
}, ...e.slice(1)] : [{
|
|
873
|
+
...t.segment,
|
|
874
|
+
p0: t.projection,
|
|
875
|
+
p1: r
|
|
876
|
+
}, ...e];
|
|
877
|
+
}
|
|
878
|
+
function lt(e, t) {
|
|
879
|
+
if (!e.length) return e;
|
|
880
|
+
let n = e[e.length - 1], r = n.p1, i = U(t.segment.p0, r) ? t.segment.p1 : t.segment.p0;
|
|
881
|
+
return U(n.p0, i) ? [...e.slice(0, -1), {
|
|
882
|
+
...n,
|
|
883
|
+
p1: t.projection
|
|
884
|
+
}] : [...e, {
|
|
885
|
+
...t.segment,
|
|
886
|
+
p0: r,
|
|
887
|
+
p1: t.projection
|
|
888
|
+
}];
|
|
889
|
+
}
|
|
890
|
+
function ut(e, t, n) {
|
|
891
|
+
let r = e;
|
|
892
|
+
return t && (r = ct(r, t)), n && (r = lt(r, n)), r;
|
|
893
|
+
}
|
|
894
|
+
function dt(e) {
|
|
895
|
+
let t = He();
|
|
896
|
+
return {
|
|
897
|
+
buildRoute(n, r, i) {
|
|
898
|
+
var a;
|
|
899
|
+
let o = t.getOrBuild(e, (a = i == null ? void 0 : i.accessible) != null && a), s = ot(o, n), c = ot(o, r), l = Ke(o, s.candidates, c.candidates), u = !!s.offGraphEntry || !!c.offGraphEntry, d = ut(l.lines, s.offGraphEntry, c.offGraphEntry);
|
|
900
|
+
return {
|
|
901
|
+
lines: d,
|
|
902
|
+
distance: u ? V(d) : l.totalDistance
|
|
903
|
+
};
|
|
904
|
+
},
|
|
905
|
+
buildWaypointsRoute(n, r) {
|
|
906
|
+
var i;
|
|
907
|
+
if (n.length < 2) return {
|
|
908
|
+
lines: [],
|
|
909
|
+
distance: 0
|
|
910
|
+
};
|
|
911
|
+
let a = t.getOrBuild(e, (i = r == null ? void 0 : r.accessible) != null && i), o = (r != null && r.fastest ? Ze(n) : n).map((e) => ot(a, e)), s = qe(a, o.map((e) => e.candidates)), c = o[0].offGraphEntry, l = o[o.length - 1].offGraphEntry, u = !!c || !!l, d = ut(s.lines, c, l);
|
|
912
|
+
return {
|
|
913
|
+
lines: d,
|
|
914
|
+
distance: u ? V(d) : s.totalDistance
|
|
915
|
+
};
|
|
916
|
+
}
|
|
917
|
+
};
|
|
918
|
+
}
|
|
919
|
+
//#endregion
|
|
920
|
+
//#region ../wayfinding/src/core/rendering/computeTrailPoints.ts
|
|
921
|
+
var ft = .4, pt = 8;
|
|
922
|
+
function mt(e, t, n = pt, r = ft) {
|
|
923
|
+
let i = f(t, e);
|
|
924
|
+
if (i === 0 || n <= 0) return [];
|
|
925
|
+
let a = Math.max(Math.ceil(i / n) + 1, 2), o = {
|
|
926
|
+
x: (e.x + t.x) / 2,
|
|
927
|
+
y: (e.y + t.y) / 2 - i * r
|
|
928
|
+
}, s = [];
|
|
929
|
+
for (let n = 0; n < a; n++) {
|
|
930
|
+
let r = n / (a - 1);
|
|
931
|
+
s.push(ht(e, o, t, r));
|
|
932
|
+
}
|
|
933
|
+
return s;
|
|
934
|
+
}
|
|
935
|
+
function ht(e, t, n, r) {
|
|
936
|
+
let i = 1 - r;
|
|
937
|
+
return {
|
|
938
|
+
x: i * i * e.x + 2 * i * r * t.x + r * r * n.x,
|
|
939
|
+
y: i * i * e.y + 2 * i * r * t.y + r * r * n.y
|
|
940
|
+
};
|
|
941
|
+
}
|
|
942
|
+
//#endregion
|
|
943
|
+
//#region ../wayfinding/src/core/rendering/computeTransitionPoints.ts
|
|
944
|
+
function W(e, t) {
|
|
945
|
+
return e.toLowerCase() === t.toLowerCase();
|
|
946
|
+
}
|
|
947
|
+
function gt(e, t) {
|
|
948
|
+
return e.findIndex((e) => W(e, t));
|
|
949
|
+
}
|
|
950
|
+
function _t(e, t, n) {
|
|
951
|
+
let r = gt(e, t), i = gt(e, n);
|
|
952
|
+
return r === -1 || i === -1 ? "neutral" : i > r ? "up" : "down";
|
|
953
|
+
}
|
|
954
|
+
function vt(e, t, n) {
|
|
955
|
+
return e.find((e) => W(e.p0.layer, t) ? !n.has(e.p1.layer.toLowerCase()) : W(e.p1.layer, t) ? !n.has(e.p0.layer.toLowerCase()) : !1);
|
|
956
|
+
}
|
|
957
|
+
function yt(e, t, n, r) {
|
|
958
|
+
if (t.has(r.toLowerCase())) return r;
|
|
959
|
+
let i = r, a = /* @__PURE__ */ new Set([n.toLowerCase(), i.toLowerCase()]), o = vt(e, i, a);
|
|
960
|
+
for (; o && (i = W(o.p0.layer, i) ? o.p1.layer : o.p0.layer, !t.has(i.toLowerCase()));) a.add(i.toLowerCase()), o = vt(e, i, a);
|
|
961
|
+
return i;
|
|
962
|
+
}
|
|
963
|
+
function bt(e) {
|
|
964
|
+
let { routeLines: t, currentLayerName: n, floorOrder: r } = e, i = t.filter((e) => e.virtual && !W(e.p0.layer, e.p1.layer)), a = /* @__PURE__ */ new Set();
|
|
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) => W(e.p0.layer, n) || W(e.p1.layer, n)) : i).map((e) => {
|
|
967
|
+
let t = !n || W(e.p0.layer, n), o = t ? e.p0 : e.p1, s = t ? e.p1 : e.p0, c = yt(i, a, o.layer, s.layer);
|
|
968
|
+
return {
|
|
969
|
+
x: o.x,
|
|
970
|
+
y: o.y,
|
|
971
|
+
layer: o.layer,
|
|
972
|
+
targetLayer: c,
|
|
973
|
+
direction: _t(r, o.layer, c),
|
|
974
|
+
role: n ? t ? "exit" : "entry" : "exit"
|
|
975
|
+
};
|
|
976
|
+
}), s = new Set(o.filter((e) => e.role === "exit").map((e) => `${e.x}:${e.y}`)), c = /* @__PURE__ */ new Set();
|
|
977
|
+
return o.filter((e) => {
|
|
978
|
+
let t = `${e.x}:${e.y}`;
|
|
979
|
+
return e.role === "entry" && s.has(t) || c.has(t) ? !1 : (c.add(t), !0);
|
|
980
|
+
});
|
|
981
|
+
}
|
|
982
|
+
//#endregion
|
|
983
|
+
//#region ../wayfinding/src/core/rendering/routeGeometry.ts
|
|
984
|
+
function xt(e) {
|
|
985
|
+
return o.fromPoints(e);
|
|
986
|
+
}
|
|
987
|
+
//#endregion
|
|
988
|
+
//#region ../wayfinding/src/core/position/gpsThreshold.ts
|
|
989
|
+
var St = 7.5, Ct = 15, wt = 20;
|
|
990
|
+
function Tt(e, t) {
|
|
991
|
+
let { p0: n, p2: r } = t, i = T(n, r), a = f(n, r);
|
|
992
|
+
return !i || !a ? 0 : a / i * e;
|
|
993
|
+
}
|
|
994
|
+
var Et = (e) => {
|
|
995
|
+
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
996
|
+
}, Dt = (e, t) => {
|
|
997
|
+
let n = Et(e);
|
|
998
|
+
return n === void 0 || n === 0 ? t : n;
|
|
999
|
+
};
|
|
1000
|
+
function Ot({ thresholdInMeters: e, gpsConfig: t }) {
|
|
1001
|
+
let n = 0;
|
|
1002
|
+
return e && t && (n = Tt(e, t)), n || (n = wt), n;
|
|
1003
|
+
}
|
|
1004
|
+
function kt(e) {
|
|
1005
|
+
return Ot({
|
|
1006
|
+
thresholdInMeters: Dt(e == null ? void 0 : e.rerouteThreshold, Ct),
|
|
1007
|
+
gpsConfig: e
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
1010
|
+
//#endregion
|
|
1011
|
+
//#region ../wayfinding/src/core/position/distanceToRoute.ts
|
|
1012
|
+
function At(e, t, n, r, i, a) {
|
|
1013
|
+
let o = i - n, s = a - r, c = e - n, l = t - r, u = o * o + s * s;
|
|
1014
|
+
if (u === 0) return f({
|
|
1015
|
+
x: e,
|
|
1016
|
+
y: t
|
|
1017
|
+
}, {
|
|
1018
|
+
x: n,
|
|
1019
|
+
y: r
|
|
1020
|
+
});
|
|
1021
|
+
let d = (c * o + l * s) / u;
|
|
1022
|
+
d < 0 ? d = 0 : d > 1 && (d = 1);
|
|
1023
|
+
let p = n + d * o, m = r + d * s;
|
|
1024
|
+
return f({
|
|
1025
|
+
x: e,
|
|
1026
|
+
y: t
|
|
1027
|
+
}, {
|
|
1028
|
+
x: p,
|
|
1029
|
+
y: m
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
1032
|
+
function jt(e, t) {
|
|
1033
|
+
let n = Infinity;
|
|
1034
|
+
for (let r of t) {
|
|
1035
|
+
if (e.layer && (r.p0.layer !== e.layer || r.p1.layer !== e.layer)) continue;
|
|
1036
|
+
let t = At(e.x, e.y, r.p0.x, r.p0.y, r.p1.x, r.p1.y);
|
|
1037
|
+
t < n && (n = t);
|
|
1038
|
+
}
|
|
1039
|
+
return n;
|
|
1040
|
+
}
|
|
1041
|
+
//#endregion
|
|
1042
|
+
//#region ../wayfinding/src/core/position/rerouteController.ts
|
|
1043
|
+
function Mt(e) {
|
|
1044
|
+
return { shouldReroute(t, n) {
|
|
1045
|
+
if (!n.length) return !1;
|
|
1046
|
+
let r = t.layer;
|
|
1047
|
+
return r && !n.some((e) => e.p0.layer === r && e.p1.layer === r) ? !0 : jt(t, n) > e;
|
|
1048
|
+
} };
|
|
1049
|
+
}
|
|
1050
|
+
//#endregion
|
|
1051
|
+
//#region ../wayfinding/src/core/position/snapToRoute.ts
|
|
1052
|
+
function Nt(e, t, { snapThreshold: n }) {
|
|
1053
|
+
let r = t.length;
|
|
1054
|
+
if (!r) return { snapped: !1 };
|
|
1055
|
+
let i = e.layer || null, a = Infinity, o = null, s = 0, c = i == null;
|
|
1056
|
+
for (let n = 0; n < r; n++) {
|
|
1057
|
+
let r = t[n], { p0: l, p1: u } = r, d = f(l, u);
|
|
1058
|
+
if (d === 0) continue;
|
|
1059
|
+
if (i != null && String(l.layer) !== i) {
|
|
1060
|
+
s += d;
|
|
1061
|
+
continue;
|
|
1062
|
+
}
|
|
1063
|
+
c = !0;
|
|
1064
|
+
let p = et({
|
|
1065
|
+
x: e.x,
|
|
1066
|
+
y: e.y
|
|
1067
|
+
}, l, u);
|
|
1068
|
+
p.distance < a && (a = p.distance, o = {
|
|
1069
|
+
point: {
|
|
1070
|
+
layer: l.layer,
|
|
1071
|
+
x: p.projected.x,
|
|
1072
|
+
y: p.projected.y
|
|
1073
|
+
},
|
|
1074
|
+
line: r,
|
|
1075
|
+
fromStart: s + d * p.t
|
|
1076
|
+
}), s += d;
|
|
1077
|
+
}
|
|
1078
|
+
return i != null && !c || !o || a > n ? { snapped: !1 } : {
|
|
1079
|
+
snapped: !0,
|
|
1080
|
+
snappedPoint: o.point,
|
|
1081
|
+
snappedLine: o.line,
|
|
1082
|
+
distance: s - o.fromStart
|
|
1083
|
+
};
|
|
1084
|
+
}
|
|
1085
|
+
//#endregion
|
|
1086
|
+
//#region ../wayfinding/src/core/position/splitRouteByPoint.ts
|
|
1087
|
+
function Pt(e, t) {
|
|
1088
|
+
let n = 1e-6, r = -1, i = 0, a = Infinity;
|
|
1089
|
+
for (let n = 0; n < e.length; n++) {
|
|
1090
|
+
let o = e[n];
|
|
1091
|
+
if (o.p0.layer !== t.layer) continue;
|
|
1092
|
+
let s = o.p1.x - o.p0.x, c = o.p1.y - o.p0.y, l = s * s + c * c;
|
|
1093
|
+
if (l === 0) continue;
|
|
1094
|
+
let u = ((t.x - o.p0.x) * s + (t.y - o.p0.y) * c) / l;
|
|
1095
|
+
if (u < -1e-6 || u > 1.000001) continue;
|
|
1096
|
+
let d = Math.min(1, Math.max(0, u)), f = o.p0.x + d * s, p = o.p0.y + d * c, m = (t.x - f) ** 2 + (t.y - p) ** 2;
|
|
1097
|
+
m < a && (a = m, r = n, i = d);
|
|
1098
|
+
}
|
|
1099
|
+
if (r === -1) return {
|
|
1100
|
+
passed: [],
|
|
1101
|
+
remaining: e
|
|
1102
|
+
};
|
|
1103
|
+
if (i < n) return {
|
|
1104
|
+
passed: e.slice(0, r),
|
|
1105
|
+
remaining: e.slice(r)
|
|
1106
|
+
};
|
|
1107
|
+
if (i > 1 - n) return {
|
|
1108
|
+
passed: e.slice(0, r + 1),
|
|
1109
|
+
remaining: e.slice(r + 1)
|
|
1110
|
+
};
|
|
1111
|
+
let o = e[r], s = {
|
|
1112
|
+
layer: o.p0.layer,
|
|
1113
|
+
x: o.p0.x + i * (o.p1.x - o.p0.x),
|
|
1114
|
+
y: o.p0.y + i * (o.p1.y - o.p0.y)
|
|
1115
|
+
};
|
|
1116
|
+
return {
|
|
1117
|
+
passed: [...e.slice(0, r), {
|
|
1118
|
+
...o,
|
|
1119
|
+
p1: s
|
|
1120
|
+
}],
|
|
1121
|
+
remaining: [{
|
|
1122
|
+
...o,
|
|
1123
|
+
p0: s
|
|
1124
|
+
}, ...e.slice(r + 1)]
|
|
1125
|
+
};
|
|
1126
|
+
}
|
|
1127
|
+
//#endregion
|
|
1128
|
+
//#region ../wayfinding/src/renderer/iconManager.ts
|
|
1129
|
+
function Ft(e, t) {
|
|
1130
|
+
let n = e.bounds, r = e.source, i = r.width * t, a = r.height * t;
|
|
1131
|
+
if (!(n.size.x === i && n.size.y === a)) return n.set(n.center.x, n.center.y, i, a, n.rotation, n.elevation), [e];
|
|
1132
|
+
}
|
|
1133
|
+
function It(e, t, n, r = !1) {
|
|
1134
|
+
let i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
|
|
1135
|
+
function c(e) {
|
|
1136
|
+
return e.onTop ? n.currentPosition : n.icons;
|
|
1137
|
+
}
|
|
1138
|
+
function l(e, t) {
|
|
1139
|
+
return t === void 0 ? e : `${e}#${t}`;
|
|
1140
|
+
}
|
|
1141
|
+
function u(e, t) {
|
|
1142
|
+
let n = a.get(e);
|
|
1143
|
+
n || (n = /* @__PURE__ */ new Set(), a.set(e, n)), n.add(t), o.set(t, e);
|
|
1144
|
+
}
|
|
1145
|
+
function f(e) {
|
|
1146
|
+
let t = o.get(e);
|
|
1147
|
+
if (!t) return;
|
|
1148
|
+
let n = a.get(t);
|
|
1149
|
+
n && n.delete(e), o.delete(e);
|
|
1150
|
+
}
|
|
1151
|
+
function p(n, a, o, l = o.rotation) {
|
|
1152
|
+
var f, p, m;
|
|
1153
|
+
let h = c(o), g = (f = o.screenSpace) == null ? r : f;
|
|
1154
|
+
e.touchLayer(h);
|
|
1155
|
+
let _ = {
|
|
1156
|
+
source: o.canvas,
|
|
1157
|
+
bounds: new d({
|
|
1158
|
+
x: o.x,
|
|
1159
|
+
y: o.y
|
|
1160
|
+
}, Lt, 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 }) => Ft(_, e), h.children.push(_);
|
|
1167
|
+
let v = {
|
|
1168
|
+
imageDef: _,
|
|
1169
|
+
layer: h,
|
|
1170
|
+
callback: (m = o.onClick) == null ? null : m
|
|
1171
|
+
};
|
|
1172
|
+
return i.set(n, v), s.set(_, v), u(a, n), v;
|
|
1173
|
+
}
|
|
1174
|
+
function m(t, n, r, a) {
|
|
1175
|
+
var o;
|
|
1176
|
+
let c = r.layer.children, l = c.indexOf(r.imageDef), u = (o = a.rotation) == null ? r.imageDef.bounds.rotation : o;
|
|
1177
|
+
r.imageDef.hidden = !0, e.touchDef(r.imageDef), l >= 0 && c.splice(l, 1), e.touchLayer(r.layer), i.delete(t), s.delete(r.imageDef), f(t), p(t, n, a, u);
|
|
1178
|
+
}
|
|
1179
|
+
function h(t, r, i, a) {
|
|
1180
|
+
var o, s, l;
|
|
1181
|
+
if (i.layer !== c(a)) throw Error(`renderer: icon "${t}" cannot move between layers (was onTop=${i.layer === n.currentPosition}, got onTop=${!!a.onTop})`);
|
|
1182
|
+
if (i.imageDef.source !== a.canvas) {
|
|
1183
|
+
m(t, r, i, a);
|
|
1184
|
+
return;
|
|
1185
|
+
}
|
|
1186
|
+
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 = (l = a.onClick) == null ? null : l, e.touchDef(i.imageDef);
|
|
1188
|
+
}
|
|
1189
|
+
function g(t) {
|
|
1190
|
+
t.imageDef.hidden = !0, t.callback = null, e.touchDef(t.imageDef);
|
|
1191
|
+
}
|
|
1192
|
+
return {
|
|
1193
|
+
setIcon(e, t, n) {
|
|
1194
|
+
let r = l(e, n);
|
|
1195
|
+
if (t === null) {
|
|
1196
|
+
let e = i.get(r);
|
|
1197
|
+
e && g(e);
|
|
1198
|
+
return;
|
|
1199
|
+
}
|
|
1200
|
+
let a = i.get(r);
|
|
1201
|
+
a ? h(r, e, a, t) : p(r, e, t);
|
|
1202
|
+
},
|
|
1203
|
+
clearIcons(e) {
|
|
1204
|
+
let t = typeof e == "string" ? [e] : e;
|
|
1205
|
+
for (let e of t) {
|
|
1206
|
+
let t = a.get(e);
|
|
1207
|
+
if (t) for (let e of t) {
|
|
1208
|
+
let t = i.get(e);
|
|
1209
|
+
t && g(t);
|
|
1210
|
+
}
|
|
1211
|
+
}
|
|
1212
|
+
},
|
|
1213
|
+
hideAll() {
|
|
1214
|
+
for (let e of i.values()) g(e);
|
|
1215
|
+
},
|
|
1216
|
+
destroy() {
|
|
1217
|
+
for (let t of i.values()) {
|
|
1218
|
+
let n = t.layer.children, r = n.indexOf(t.imageDef);
|
|
1219
|
+
r >= 0 && n.splice(r, 1), e.touchLayer(t.layer);
|
|
1220
|
+
}
|
|
1221
|
+
i.clear(), s.clear(), a.clear(), o.clear();
|
|
1222
|
+
},
|
|
1223
|
+
handleClick(e) {
|
|
1224
|
+
let t = s.get(e);
|
|
1225
|
+
return !(t != null && t.callback) || t.imageDef.hidden ? !1 : (t.callback(), !0);
|
|
1226
|
+
},
|
|
1227
|
+
handleHover(e) {
|
|
1228
|
+
let t = s.get(e);
|
|
1229
|
+
return !!(t != null && t.callback) && !(t != null && t.imageDef.hidden);
|
|
1230
|
+
}
|
|
1231
|
+
};
|
|
1232
|
+
}
|
|
1233
|
+
var Lt = {
|
|
1234
|
+
x: 0,
|
|
1235
|
+
y: 0
|
|
1236
|
+
};
|
|
1237
|
+
//#endregion
|
|
1238
|
+
//#region ../wayfinding/src/renderer/layerManager.ts
|
|
1239
|
+
function Rt(e) {
|
|
1240
|
+
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
1241
|
+
return {
|
|
1242
|
+
touchLayer(e) {
|
|
1243
|
+
t.add(e);
|
|
1244
|
+
},
|
|
1245
|
+
touchDef(e) {
|
|
1246
|
+
n.add(e);
|
|
1247
|
+
},
|
|
1248
|
+
flush() {
|
|
1249
|
+
if (!(t.size === 0 && n.size === 0)) {
|
|
1250
|
+
for (let e of t) e.children = [...e.children];
|
|
1251
|
+
e.update(...t, ...n), t.clear(), n.clear();
|
|
1252
|
+
}
|
|
1253
|
+
},
|
|
1254
|
+
destroy() {
|
|
1255
|
+
t.clear(), n.clear();
|
|
1256
|
+
}
|
|
1257
|
+
};
|
|
1258
|
+
}
|
|
1259
|
+
//#endregion
|
|
1260
|
+
//#region ../wayfinding/src/renderer/lineAnimation.ts
|
|
1261
|
+
var zt = 1, Bt = 0;
|
|
1262
|
+
function Vt(e, t, n, r = 0) {
|
|
1263
|
+
let i = 0, a = 0, o = null, s = null;
|
|
1264
|
+
if (!e.length) return;
|
|
1265
|
+
let c = e.map((e) => ({
|
|
1266
|
+
p0: {
|
|
1267
|
+
x: e.points.p0.x,
|
|
1268
|
+
y: e.points.p0.y
|
|
1269
|
+
},
|
|
1270
|
+
p1: {
|
|
1271
|
+
x: e.points.p1.x,
|
|
1272
|
+
y: e.points.p1.y
|
|
1273
|
+
},
|
|
1274
|
+
elevation: e.points.elevation
|
|
1275
|
+
})), l = c.map((e) => {
|
|
1276
|
+
let t = e.p1.x - e.p0.x, n = e.p1.y - e.p0.y;
|
|
1277
|
+
return Math.sqrt(t * t + n * n);
|
|
1278
|
+
}), u = e.map(() => -1), d = [], f = l.reduce((e, t) => e + t, 0);
|
|
1279
|
+
if (!f) return;
|
|
1280
|
+
let p = Math.max(20, Math.min(f / 2, 300));
|
|
1281
|
+
function m(e) {
|
|
1282
|
+
let t = e % 1 * f, n = 0;
|
|
1283
|
+
i = 0, a = 0;
|
|
1284
|
+
for (let e = 0; e < l.length; e++) {
|
|
1285
|
+
if (n + l[e] > t) {
|
|
1286
|
+
i = e, a = t - n;
|
|
1287
|
+
break;
|
|
1288
|
+
}
|
|
1289
|
+
n += l[e], e === l.length - 1 && (i = 0, a = 0);
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
function h(t, n) {
|
|
1293
|
+
if (u[t] === n) return;
|
|
1294
|
+
u[t] = n;
|
|
1295
|
+
let r = e[t], i = c[t];
|
|
1296
|
+
if (r.hidden = n <= Bt, !r.hidden) {
|
|
1297
|
+
let { p0: e, p1: t } = i;
|
|
1298
|
+
r.points = n >= zt ? i : {
|
|
1299
|
+
p0: e,
|
|
1300
|
+
p1: {
|
|
1301
|
+
x: e.x + (t.x - e.x) * n,
|
|
1302
|
+
y: e.y + (t.y - e.y) * n
|
|
1303
|
+
},
|
|
1304
|
+
elevation: i.elevation
|
|
1305
|
+
};
|
|
1306
|
+
}
|
|
1307
|
+
d.push(r);
|
|
1308
|
+
}
|
|
1309
|
+
function g() {
|
|
1310
|
+
d.length = 0;
|
|
1311
|
+
let n = i;
|
|
1312
|
+
for (let e = 0; e < n; e++) h(e, zt);
|
|
1313
|
+
h(n, Math.min(a / l[n], zt));
|
|
1314
|
+
for (let t = n + 1; t < e.length; t++) h(t, Bt);
|
|
1315
|
+
d.length && t(d);
|
|
1316
|
+
}
|
|
1317
|
+
function _(t) {
|
|
1318
|
+
o != null || (o = t);
|
|
1319
|
+
let r = (t - o) / 1e3;
|
|
1320
|
+
o = t;
|
|
1321
|
+
let c = n();
|
|
1322
|
+
if (!(Number.isFinite(c) && c > 0)) {
|
|
1323
|
+
s = requestAnimationFrame(_);
|
|
1324
|
+
return;
|
|
1325
|
+
}
|
|
1326
|
+
let u = p * Math.sqrt(c);
|
|
1327
|
+
for (a += u * r, a %= f; a >= l[i];) a -= l[i], i++, i >= e.length && (i = 0);
|
|
1328
|
+
g(), s = requestAnimationFrame(_);
|
|
1329
|
+
}
|
|
1330
|
+
function v() {
|
|
1331
|
+
y(), r <= 0 && (i = 0, a = 0), o = null, s = requestAnimationFrame(_);
|
|
1332
|
+
}
|
|
1333
|
+
function y() {
|
|
1334
|
+
s && (cancelAnimationFrame(s), s = null, o = null);
|
|
1335
|
+
}
|
|
1336
|
+
function b() {
|
|
1337
|
+
if (f <= 0) return 0;
|
|
1338
|
+
let e = 0;
|
|
1339
|
+
for (let t = 0; t < i; t++) e += l[t];
|
|
1340
|
+
return e += a, e / f;
|
|
1341
|
+
}
|
|
1342
|
+
function x() {
|
|
1343
|
+
document.visibilityState === "visible" ? v() : y();
|
|
1344
|
+
}
|
|
1345
|
+
return r > 0 && m(r), document.addEventListener("visibilitychange", x), v(), {
|
|
1346
|
+
stop: () => {
|
|
1347
|
+
y(), document.removeEventListener("visibilitychange", x);
|
|
1348
|
+
},
|
|
1349
|
+
getProgress: b
|
|
1350
|
+
};
|
|
1351
|
+
}
|
|
1352
|
+
//#endregion
|
|
1353
|
+
//#region ../wayfinding/src/renderer/routeLineManager.ts
|
|
1354
|
+
function Ht({ p0: e, p1: t }, n) {
|
|
1355
|
+
return {
|
|
1356
|
+
points: {
|
|
1357
|
+
p0: {
|
|
1358
|
+
x: e.x,
|
|
1359
|
+
y: e.y
|
|
1360
|
+
},
|
|
1361
|
+
p1: {
|
|
1362
|
+
x: t.x,
|
|
1363
|
+
y: t.y
|
|
1364
|
+
}
|
|
1365
|
+
},
|
|
1366
|
+
color: n,
|
|
1367
|
+
width: 10
|
|
1368
|
+
};
|
|
1369
|
+
}
|
|
1370
|
+
function Ut(e, t, n, r) {
|
|
1371
|
+
let i = r.lines, a = r.linesAnimated, o = null, s = 1;
|
|
1372
|
+
function c(e) {
|
|
1373
|
+
s = e;
|
|
1374
|
+
}
|
|
1375
|
+
function l(t) {
|
|
1376
|
+
u(t), t.children = [], e.touchLayer(t);
|
|
1377
|
+
}
|
|
1378
|
+
function u(t) {
|
|
1379
|
+
for (let n of t.children) n.hidden = !0, e.touchDef(n);
|
|
1380
|
+
}
|
|
1381
|
+
return {
|
|
1382
|
+
setRouteLines(r, l, d) {
|
|
1383
|
+
var f, p;
|
|
1384
|
+
e.touchLayer(i), e.touchLayer(a), a.onScale = ({ pixelSize: e }) => c(e);
|
|
1385
|
+
let m = (f = d == null ? void 0 : d.resetAnimation) == null || f, h = 0;
|
|
1386
|
+
o && (m || (h = o.getProgress()), o.stop(), o = null), u(i), u(a);
|
|
1387
|
+
let g = r.map((e) => Ht(e, t.passed)), _ = l.map((e) => Ht(e, t.remaining));
|
|
1388
|
+
if (i.children = [...g, ..._], !_.length) {
|
|
1389
|
+
a.children = [];
|
|
1390
|
+
return;
|
|
1391
|
+
}
|
|
1392
|
+
let v = l.map((e) => ({
|
|
1393
|
+
...Ht(e, t.active),
|
|
1394
|
+
hidden: !0
|
|
1395
|
+
}));
|
|
1396
|
+
a.children = v, o = (p = Vt(v, (e) => n.update(...e), () => s, h)) == null ? null : p;
|
|
1397
|
+
},
|
|
1398
|
+
clearLines() {
|
|
1399
|
+
o && (o.stop(), o = null), l(i), l(a);
|
|
1400
|
+
},
|
|
1401
|
+
destroy() {
|
|
1402
|
+
this.clearLines(), a.onScale = void 0;
|
|
1403
|
+
}
|
|
1404
|
+
};
|
|
1405
|
+
}
|
|
1406
|
+
//#endregion
|
|
1407
|
+
//#region ../wayfinding/src/renderer/trailManager.ts
|
|
1408
|
+
var Wt = 40;
|
|
1409
|
+
function Gt(e, t) {
|
|
1410
|
+
let n = /* @__PURE__ */ new Map(), r = 1, i = !1;
|
|
1411
|
+
function a(e) {
|
|
1412
|
+
r = e;
|
|
1413
|
+
let i = [], a = !1;
|
|
1414
|
+
for (let e of n.values()) {
|
|
1415
|
+
let t = c(e);
|
|
1416
|
+
i.push(...t.changed), a || (a = t.membershipChanged);
|
|
1417
|
+
}
|
|
1418
|
+
return a && i.push(t), i.length ? i : void 0;
|
|
1419
|
+
}
|
|
1420
|
+
function o(n, r) {
|
|
1421
|
+
if (!r.length) return;
|
|
1422
|
+
let i = new Set(r);
|
|
1423
|
+
for (let e of i) e.hidden = !0;
|
|
1424
|
+
t.children = t.children.filter((e) => !i.has(e)), e.touchLayer(t);
|
|
1425
|
+
}
|
|
1426
|
+
function s() {
|
|
1427
|
+
i || (t.onScale = ({ pixelSize: e }) => a(e), i = !0, e.touchLayer(t));
|
|
1428
|
+
}
|
|
1429
|
+
function c(n) {
|
|
1430
|
+
s();
|
|
1431
|
+
let i = Wt * r, a = mt(n.from, n.to, i), c = n.canvas, l = {
|
|
1432
|
+
x: c.width * r,
|
|
1433
|
+
y: c.height * r
|
|
1434
|
+
}, u = n.dotDefs, f = Math.min(u.length, a.length), p = [];
|
|
1435
|
+
for (let e = 0; e < f; e++) {
|
|
1436
|
+
let t = u[e].bounds;
|
|
1437
|
+
t.set(a[e].x, a[e].y, l.x, l.y, t.rotation, t.elevation), p.push(u[e]);
|
|
1438
|
+
}
|
|
1439
|
+
if (a.length > f) {
|
|
1440
|
+
let n = a.slice(f).map((e) => ({
|
|
1441
|
+
source: c,
|
|
1442
|
+
bounds: new d({
|
|
1443
|
+
x: e.x,
|
|
1444
|
+
y: e.y
|
|
1445
|
+
}, l)
|
|
1446
|
+
}));
|
|
1447
|
+
return t.children.push(...n), u.push(...n), e.touchLayer(t), {
|
|
1448
|
+
changed: p,
|
|
1449
|
+
membershipChanged: !0
|
|
1450
|
+
};
|
|
1451
|
+
}
|
|
1452
|
+
if (u.length > f) {
|
|
1453
|
+
let e = u.splice(f);
|
|
1454
|
+
return o(n, e), p.push(...e), {
|
|
1455
|
+
changed: p,
|
|
1456
|
+
membershipChanged: !0
|
|
1457
|
+
};
|
|
1458
|
+
}
|
|
1459
|
+
return {
|
|
1460
|
+
changed: p,
|
|
1461
|
+
membershipChanged: !1
|
|
1462
|
+
};
|
|
1463
|
+
}
|
|
1464
|
+
function l(t) {
|
|
1465
|
+
let r = n.get(t);
|
|
1466
|
+
if (r) {
|
|
1467
|
+
o(r, r.dotDefs);
|
|
1468
|
+
for (let t of r.dotDefs) e.touchDef(t);
|
|
1469
|
+
r.dotDefs = [], n.delete(t);
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
function u(t) {
|
|
1473
|
+
for (let n of t.changed) e.touchDef(n);
|
|
1474
|
+
}
|
|
1475
|
+
return {
|
|
1476
|
+
setTrail(e, t, r, i) {
|
|
1477
|
+
if (t === null || r === null) {
|
|
1478
|
+
l(e);
|
|
1479
|
+
return;
|
|
1480
|
+
}
|
|
1481
|
+
if (!i) throw Error(`renderer: setTrail("${e}") requires options when from/to are non-null`);
|
|
1482
|
+
let a = n.get(e);
|
|
1483
|
+
if (a) {
|
|
1484
|
+
if (a.canvas !== i.canvas) throw Error(`renderer: trail "${e}" cannot change canvas after first call`);
|
|
1485
|
+
a.from = t, a.to = r, u(c(a));
|
|
1486
|
+
return;
|
|
1487
|
+
}
|
|
1488
|
+
let o = {
|
|
1489
|
+
from: t,
|
|
1490
|
+
to: r,
|
|
1491
|
+
canvas: i.canvas,
|
|
1492
|
+
dotDefs: []
|
|
1493
|
+
};
|
|
1494
|
+
n.set(e, o), u(c(o));
|
|
1495
|
+
},
|
|
1496
|
+
destroy() {
|
|
1497
|
+
for (let e of [...n.keys()]) l(e);
|
|
1498
|
+
t.onScale = void 0, i = !1;
|
|
1499
|
+
}
|
|
1500
|
+
};
|
|
1501
|
+
}
|
|
1502
|
+
//#endregion
|
|
1503
|
+
//#region ../wayfinding/src/renderer/createWayfindingRenderer.ts
|
|
1504
|
+
var Kt = {
|
|
1505
|
+
passed: "#B5B7BC",
|
|
1506
|
+
remaining: "#A4CCE2",
|
|
1507
|
+
active: "#0794EA"
|
|
1508
|
+
};
|
|
1509
|
+
function qt(e, t, n = {}) {
|
|
1510
|
+
let r = {
|
|
1511
|
+
...Kt,
|
|
1512
|
+
...n.colors
|
|
1513
|
+
}, i = Rt(e), a = It(i, e, t, n.screenSpaceIcons), o = Gt(i, t.trail), s = Ut(i, r, e, t), c = {
|
|
1514
|
+
setIcon: (...e) => a.setIcon(...e),
|
|
1515
|
+
clearIcons: (...e) => a.clearIcons(...e),
|
|
1516
|
+
setTrail: (...e) => o.setTrail(...e),
|
|
1517
|
+
setRouteLines: (...e) => s.setRouteLines(...e),
|
|
1518
|
+
handleClick: (e) => a.handleClick(e),
|
|
1519
|
+
handleHover: (e) => a.handleHover(e),
|
|
1520
|
+
clearRoute() {
|
|
1521
|
+
s.clearLines(), o.destroy(), a.hideAll();
|
|
1522
|
+
},
|
|
1523
|
+
flush: () => i.flush(),
|
|
1524
|
+
destroy() {
|
|
1525
|
+
c.clearRoute(), a.destroy(), o.destroy(), s.destroy(), i.flush(), i.destroy();
|
|
1526
|
+
}
|
|
1527
|
+
};
|
|
1528
|
+
return c;
|
|
1529
|
+
}
|
|
1530
|
+
//#endregion
|
|
1531
|
+
//#region ../wayfinding/src/renderer/layers.ts
|
|
1532
|
+
var Jt = "wayfinding", Yt = "wf-trail-points", Xt = "wf-lines", Zt = "wf-lines-animated", Qt = "wf-points", $t = "wf-current-position";
|
|
1533
|
+
function en(e = {}) {
|
|
1534
|
+
return {
|
|
1535
|
+
name: Jt,
|
|
1536
|
+
children: [
|
|
1537
|
+
{
|
|
1538
|
+
name: Yt,
|
|
1539
|
+
children: []
|
|
1540
|
+
},
|
|
1541
|
+
{
|
|
1542
|
+
name: Xt,
|
|
1543
|
+
children: []
|
|
1544
|
+
},
|
|
1545
|
+
{
|
|
1546
|
+
name: Zt,
|
|
1547
|
+
children: []
|
|
1548
|
+
},
|
|
1549
|
+
{
|
|
1550
|
+
name: Qt,
|
|
1551
|
+
children: []
|
|
1552
|
+
},
|
|
1553
|
+
{
|
|
1554
|
+
name: $t,
|
|
1555
|
+
children: []
|
|
1556
|
+
}
|
|
1557
|
+
],
|
|
1558
|
+
dim: 0,
|
|
1559
|
+
overlay: e.overlay
|
|
1560
|
+
};
|
|
1561
|
+
}
|
|
1562
|
+
function tn(e) {
|
|
1563
|
+
let t = e.children.find((e) => "name" in e && e.name === Jt && "children" in e);
|
|
1564
|
+
if (!t) throw Error("The scene holds no wayfinding block — mount `root` first.");
|
|
1565
|
+
let n = new Map(t.children.map((e) => [e.name, e]));
|
|
1566
|
+
function r(e) {
|
|
1567
|
+
let t = n.get(e);
|
|
1568
|
+
if (!t) throw Error(`The wayfinding block is missing its \`${e}\` layer.`);
|
|
1569
|
+
return t;
|
|
1570
|
+
}
|
|
1571
|
+
return {
|
|
1572
|
+
trail: r(Yt),
|
|
1573
|
+
lines: r(Xt),
|
|
1574
|
+
linesAnimated: r(Zt),
|
|
1575
|
+
icons: r(Qt),
|
|
1576
|
+
currentPosition: r($t)
|
|
1577
|
+
};
|
|
1578
|
+
}
|
|
1579
|
+
//#endregion
|
|
1580
|
+
//#region ../wayfinding/src/runtime/positionView.ts
|
|
1581
|
+
var G = "current-position", nn = "position";
|
|
1582
|
+
function rn({ renderer: e, iconProvider: t }) {
|
|
1583
|
+
return {
|
|
1584
|
+
place(n, r) {
|
|
1585
|
+
let i = Number.isFinite(n.heading), a = i ? "current_arrow" : "current", o = i ? p(n.heading) : void 0;
|
|
1586
|
+
e.setIcon(nn, {
|
|
1587
|
+
canvas: t.getIcon(a).canvas,
|
|
1588
|
+
onTop: !0,
|
|
1589
|
+
x: n.x,
|
|
1590
|
+
y: n.y,
|
|
1591
|
+
rotation: o,
|
|
1592
|
+
screenSpace: !i && void 0,
|
|
1593
|
+
hidden: r,
|
|
1594
|
+
dimmed: r,
|
|
1595
|
+
origin: [.5, .5]
|
|
1596
|
+
});
|
|
1597
|
+
},
|
|
1598
|
+
hide() {
|
|
1599
|
+
e.setIcon(nn, null);
|
|
1600
|
+
}
|
|
1601
|
+
};
|
|
1602
|
+
}
|
|
1603
|
+
//#endregion
|
|
1604
|
+
//#region ../wayfinding/src/runtime/endpointView.ts
|
|
1605
|
+
function an(e, t) {
|
|
1606
|
+
return !t || !e.bounds && e.id !== "current-position";
|
|
1607
|
+
}
|
|
1608
|
+
function on({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
1609
|
+
return {
|
|
1610
|
+
place(r, i, a, o) {
|
|
1611
|
+
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;
|
|
1613
|
+
e.setIcon("source", {
|
|
1614
|
+
canvas: t.getIcon(d ? "source_inactive" : "source").canvas,
|
|
1615
|
+
x: l.x,
|
|
1616
|
+
y: l.y,
|
|
1617
|
+
hidden: an(r, s),
|
|
1618
|
+
dimmed: !s,
|
|
1619
|
+
cardinalSnap: !0
|
|
1620
|
+
}), e.setIcon("destination", {
|
|
1621
|
+
canvas: t.getIcon("destination").canvas,
|
|
1622
|
+
x: u.x,
|
|
1623
|
+
y: u.y,
|
|
1624
|
+
hidden: !c || !i.bounds,
|
|
1625
|
+
dimmed: !c,
|
|
1626
|
+
cardinalSnap: !0
|
|
1627
|
+
});
|
|
1628
|
+
},
|
|
1629
|
+
hide() {
|
|
1630
|
+
e.setIcon("source", null), e.setIcon("destination", null);
|
|
1631
|
+
}
|
|
1632
|
+
};
|
|
1633
|
+
}
|
|
1634
|
+
//#endregion
|
|
1635
|
+
//#region ../wayfinding/src/runtime/getRouteLines.ts
|
|
1636
|
+
function sn({ engine: e, from: t, to: n, waypoints: r, accessible: i }) {
|
|
1637
|
+
return r != null && r.length ? e.buildWaypointsRoute([
|
|
1638
|
+
t,
|
|
1639
|
+
...r,
|
|
1640
|
+
n
|
|
1641
|
+
], { accessible: i }).lines : e.buildRoute(t, n, { accessible: i }).lines;
|
|
1642
|
+
}
|
|
1643
|
+
//#endregion
|
|
1644
|
+
//#region ../wayfinding/src/runtime/snapPositionToRoute.ts
|
|
1645
|
+
function cn(e, t, n) {
|
|
1646
|
+
if (!(t != null && t.bounds)) return !1;
|
|
1647
|
+
let r = n == null || !t.layer || t.layer === n, i = it({
|
|
1648
|
+
x: e.x,
|
|
1649
|
+
y: e.y
|
|
1650
|
+
}, t.bounds);
|
|
1651
|
+
return r && i;
|
|
1652
|
+
}
|
|
1653
|
+
function ln(e, t, n, r, i) {
|
|
1654
|
+
if (!t.length) return { snapped: !1 };
|
|
1655
|
+
let a = e.layer || null;
|
|
1656
|
+
if (cn(e, n, a)) {
|
|
1657
|
+
let e = t[0];
|
|
1658
|
+
return {
|
|
1659
|
+
snapped: !0,
|
|
1660
|
+
snappedPoint: e.p0,
|
|
1661
|
+
snappedLine: e,
|
|
1662
|
+
distance: V(t)
|
|
1663
|
+
};
|
|
1664
|
+
}
|
|
1665
|
+
if (cn(e, r, a)) {
|
|
1666
|
+
let e = t[t.length - 1];
|
|
1667
|
+
return {
|
|
1668
|
+
snapped: !0,
|
|
1669
|
+
snappedPoint: e.p1,
|
|
1670
|
+
snappedLine: e,
|
|
1671
|
+
distance: 0
|
|
1672
|
+
};
|
|
1673
|
+
}
|
|
1674
|
+
return Nt(e, t, { snapThreshold: i });
|
|
1675
|
+
}
|
|
1676
|
+
//#endregion
|
|
1677
|
+
//#region ../wayfinding/src/runtime/positionTrailView.ts
|
|
1678
|
+
var K = "trail";
|
|
1679
|
+
function un({ renderer: e, iconProvider: t, floorContext: n, trails: r, snapThreshold: i }) {
|
|
1680
|
+
let a = rn({
|
|
1681
|
+
renderer: e,
|
|
1682
|
+
iconProvider: t
|
|
1683
|
+
});
|
|
1684
|
+
return {
|
|
1685
|
+
placeIcon(e) {
|
|
1686
|
+
let t = !n.isLayerVisible(e.layer);
|
|
1687
|
+
a.place(e, t);
|
|
1688
|
+
},
|
|
1689
|
+
hideIcon() {
|
|
1690
|
+
a.hide();
|
|
1691
|
+
},
|
|
1692
|
+
applyToRoute(e, t, r) {
|
|
1693
|
+
let o = ln(e, r, t.from, t.to, i), s = !n.isLayerVisible(e.layer);
|
|
1694
|
+
return o.snapped ? a.place({
|
|
1695
|
+
...e,
|
|
1696
|
+
x: o.snappedPoint.x,
|
|
1697
|
+
y: o.snappedPoint.y
|
|
1698
|
+
}, s) : a.place(e, s), o;
|
|
1699
|
+
},
|
|
1700
|
+
setTrail(e, t) {
|
|
1701
|
+
e && t ? r.place(K, e, t) : r.clear(K);
|
|
1702
|
+
},
|
|
1703
|
+
clearTrail() {
|
|
1704
|
+
r.clear(K);
|
|
1705
|
+
}
|
|
1706
|
+
};
|
|
1707
|
+
}
|
|
1708
|
+
//#endregion
|
|
1709
|
+
//#region ../wayfinding/src/runtime/routeLinesView.ts
|
|
1710
|
+
function dn({ renderer: e }) {
|
|
1711
|
+
return {
|
|
1712
|
+
draw({ passed: t, remaining: n }, r = !1) {
|
|
1713
|
+
e.setRouteLines(t, n, { resetAnimation: !r });
|
|
1714
|
+
},
|
|
1715
|
+
clear() {
|
|
1716
|
+
e.setRouteLines([], [], { resetAnimation: !0 });
|
|
1717
|
+
}
|
|
1718
|
+
};
|
|
1719
|
+
}
|
|
1720
|
+
//#endregion
|
|
1721
|
+
//#region ../wayfinding/src/runtime/routeRenderData.ts
|
|
1722
|
+
function fn({ routeLines: e, currentRouteLayer: t, snap: n }) {
|
|
1723
|
+
let r = e.filter((e) => !e.virtual), i = (e) => t === null ? e : e.filter((e) => e.p0.layer === t);
|
|
1724
|
+
if (!(n != null && n.snapped)) return {
|
|
1725
|
+
passed: [],
|
|
1726
|
+
remaining: i(r),
|
|
1727
|
+
distance: V(r)
|
|
1728
|
+
};
|
|
1729
|
+
let { passed: a, remaining: o } = Pt(r, n.snappedPoint), s = o !== r && o.length > 0 && o[0].p0.layer === n.snappedPoint.layer ? [{
|
|
1730
|
+
...o[0],
|
|
1731
|
+
p0: n.snappedPoint
|
|
1732
|
+
}, ...o.slice(1)] : o;
|
|
1733
|
+
return {
|
|
1734
|
+
passed: i(a),
|
|
1735
|
+
remaining: i(s),
|
|
1736
|
+
distance: n.distance
|
|
1737
|
+
};
|
|
1738
|
+
}
|
|
1739
|
+
//#endregion
|
|
1740
|
+
//#region ../wayfinding/src/runtime/routeUpdate.ts
|
|
1741
|
+
function pn(e, t) {
|
|
1742
|
+
return {
|
|
1743
|
+
lines: e.filter((e) => !e.virtual),
|
|
1744
|
+
bounds: xt(t.flatMap((e) => [e.p0, e.p1]))
|
|
1745
|
+
};
|
|
1746
|
+
}
|
|
1747
|
+
//#endregion
|
|
1748
|
+
//#region ../wayfinding/src/runtime/trailView.ts
|
|
1749
|
+
function mn({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
1750
|
+
let r = /* @__PURE__ */ new Set();
|
|
1751
|
+
function i(e, t) {
|
|
1752
|
+
if (n.showAllFloors()) return !0;
|
|
1753
|
+
let r = n.getActiveFloor();
|
|
1754
|
+
return r ? e === r && t === r : !1;
|
|
1755
|
+
}
|
|
1756
|
+
function a(t) {
|
|
1757
|
+
e.setTrail(t, null, null), r.delete(t);
|
|
1758
|
+
}
|
|
1759
|
+
return {
|
|
1760
|
+
place(n, o, s) {
|
|
1761
|
+
if (!i(o.layer, s.layer)) {
|
|
1762
|
+
a(n);
|
|
1763
|
+
return;
|
|
1764
|
+
}
|
|
1765
|
+
e.setTrail(n, o, s, { canvas: t.getIcon("trail").canvas }), r.add(n);
|
|
1766
|
+
},
|
|
1767
|
+
clear(e) {
|
|
1768
|
+
a(e);
|
|
1769
|
+
},
|
|
1770
|
+
clearAll() {
|
|
1771
|
+
for (let t of r) e.setTrail(t, null, null);
|
|
1772
|
+
r.clear();
|
|
1773
|
+
}
|
|
1774
|
+
};
|
|
1775
|
+
}
|
|
1776
|
+
//#endregion
|
|
1777
|
+
//#region ../wayfinding/src/runtime/transitionView.ts
|
|
1778
|
+
var hn = "transition";
|
|
1779
|
+
function gn({ renderer: e, iconProvider: t, floorContext: n, onTransitionClick: r }) {
|
|
1780
|
+
return {
|
|
1781
|
+
place(i) {
|
|
1782
|
+
e.clearIcons(hn);
|
|
1783
|
+
let a;
|
|
1784
|
+
if (n.showAllFloors()) a = null;
|
|
1785
|
+
else {
|
|
1786
|
+
let e = n.getActiveFloor();
|
|
1787
|
+
if (!e) return;
|
|
1788
|
+
a = e;
|
|
1789
|
+
}
|
|
1790
|
+
let o = bt({
|
|
1791
|
+
routeLines: i,
|
|
1792
|
+
currentLayerName: a,
|
|
1793
|
+
floorOrder: n.getFloorOrder()
|
|
1794
|
+
});
|
|
1795
|
+
for (let [n, i] of o.entries()) e.setIcon(hn, {
|
|
1796
|
+
canvas: t.getIcon(_n(i.role, i.direction)).canvas,
|
|
1797
|
+
x: i.x,
|
|
1798
|
+
y: i.y,
|
|
1799
|
+
cardinalSnap: !0,
|
|
1800
|
+
onClick: i.role === "exit" ? () => r(i) : void 0
|
|
1801
|
+
}, n);
|
|
1802
|
+
},
|
|
1803
|
+
clear() {
|
|
1804
|
+
e.clearIcons(hn);
|
|
1805
|
+
}
|
|
1806
|
+
};
|
|
1807
|
+
}
|
|
1808
|
+
function _n(e, t) {
|
|
1809
|
+
return e === "entry" ? "transition_entry" : t === "up" ? "transition_up" : t === "down" ? "transition_down" : "transition";
|
|
1810
|
+
}
|
|
1811
|
+
//#endregion
|
|
1812
|
+
//#region ../wayfinding/src/runtime/createWayfindingRuntime.ts
|
|
1813
|
+
var vn = (e) => e.flatMap((e) => [e.p0, e.p1]);
|
|
1814
|
+
function yn({ engine: e, renderer: t, iconProvider: n, floorContext: r, snapThreshold: i, rerouteThreshold: a, onTransitionClick: s, onRouteUpdate: c, onRouteDistance: l }) {
|
|
1815
|
+
let u = Mt(a), d = on({
|
|
1816
|
+
renderer: t,
|
|
1817
|
+
iconProvider: n,
|
|
1818
|
+
floorContext: r
|
|
1819
|
+
}), f = gn({
|
|
1820
|
+
renderer: t,
|
|
1821
|
+
iconProvider: n,
|
|
1822
|
+
floorContext: r,
|
|
1823
|
+
onTransitionClick: s
|
|
1824
|
+
}), p = un({
|
|
1825
|
+
renderer: t,
|
|
1826
|
+
iconProvider: n,
|
|
1827
|
+
floorContext: r,
|
|
1828
|
+
trails: mn({
|
|
1829
|
+
renderer: t,
|
|
1830
|
+
iconProvider: n,
|
|
1831
|
+
floorContext: r
|
|
1832
|
+
}),
|
|
1833
|
+
snapThreshold: i
|
|
1834
|
+
}), m = dn({ renderer: t }), h = [], g = null, _ = null, v = null, y = 0, b = !1, x = !1;
|
|
1835
|
+
function S() {
|
|
1836
|
+
return r.showAllFloors() ? null : r.getActiveFloor();
|
|
1837
|
+
}
|
|
1838
|
+
function C() {
|
|
1839
|
+
let e = S();
|
|
1840
|
+
return e === null ? h.filter((e) => !e.virtual) : h.filter((t) => t.p0.layer === e && !t.virtual);
|
|
1841
|
+
}
|
|
1842
|
+
function ee(e) {
|
|
1843
|
+
return u.shouldReroute(e, h.filter((e) => !e.virtual));
|
|
1844
|
+
}
|
|
1845
|
+
function w() {
|
|
1846
|
+
if (!g || !_) return null;
|
|
1847
|
+
let e = C();
|
|
1848
|
+
return e.length ? {
|
|
1849
|
+
from: g,
|
|
1850
|
+
to: _,
|
|
1851
|
+
routePoints: vn(e),
|
|
1852
|
+
visibleLines: e
|
|
1853
|
+
} : null;
|
|
1854
|
+
}
|
|
1855
|
+
function T(e = null, t = !1) {
|
|
1856
|
+
if (!g || !_) return;
|
|
1857
|
+
let n = fn({
|
|
1858
|
+
routeLines: h,
|
|
1859
|
+
currentRouteLayer: S(),
|
|
1860
|
+
snap: e
|
|
1861
|
+
});
|
|
1862
|
+
m.draw(n, t), y = n.distance;
|
|
1863
|
+
}
|
|
1864
|
+
function E(e) {
|
|
1865
|
+
let t = w();
|
|
1866
|
+
if (!t) {
|
|
1867
|
+
p.setTrail(null, null);
|
|
1868
|
+
return;
|
|
1869
|
+
}
|
|
1870
|
+
let n = v && e && !e.snapped ? v : null, r = (e) => {
|
|
1871
|
+
var t;
|
|
1872
|
+
return (t = e.bounds) != null && t.length ? null : e.id === "current-position" ? n : e;
|
|
1873
|
+
}, i = b ? null : r(t.from);
|
|
1874
|
+
if (i) {
|
|
1875
|
+
p.setTrail(t.routePoints[0], i);
|
|
1876
|
+
return;
|
|
1877
|
+
}
|
|
1878
|
+
let a = r(t.to);
|
|
1879
|
+
p.setTrail(a ? t.routePoints[t.routePoints.length - 1] : null, a);
|
|
1880
|
+
}
|
|
1881
|
+
function D() {
|
|
1882
|
+
if (!g || !_) return;
|
|
1883
|
+
let e = w();
|
|
1884
|
+
if (!e) {
|
|
1885
|
+
d.hide(), f.clear(), p.clearTrail(), T();
|
|
1886
|
+
return;
|
|
1887
|
+
}
|
|
1888
|
+
d.place(g, _, e.routePoints, x), f.place(h), T(), E(null);
|
|
1889
|
+
}
|
|
1890
|
+
function O() {
|
|
1891
|
+
if (!g || !_) return;
|
|
1892
|
+
let e = w();
|
|
1893
|
+
e && d.place(g, _, e.routePoints, x);
|
|
1894
|
+
}
|
|
1895
|
+
function k() {
|
|
1896
|
+
if (x = !1, !v || !g || !_) return null;
|
|
1897
|
+
let e = h.filter((e) => !e.virtual);
|
|
1898
|
+
if (!e.length) return null;
|
|
1899
|
+
let t = w(), n = t ? p.applyToRoute(v, t, e) : ln(v, e, g, _, i);
|
|
1900
|
+
return n.snapped && (b = !0), x = n.snapped, n;
|
|
1901
|
+
}
|
|
1902
|
+
function A() {
|
|
1903
|
+
let e = pn(h, C());
|
|
1904
|
+
return c(e.lines, e.bounds), e;
|
|
1905
|
+
}
|
|
1906
|
+
function te({ from: n, to: r, waypoints: i, accessible: a }) {
|
|
1907
|
+
let o = sn({
|
|
1908
|
+
engine: e,
|
|
1909
|
+
from: n,
|
|
1910
|
+
to: r,
|
|
1911
|
+
waypoints: i,
|
|
1912
|
+
accessible: a
|
|
1913
|
+
});
|
|
1914
|
+
if (!o.length) return M(), !1;
|
|
1915
|
+
b = !1, g = n, _ = r, h = o, D();
|
|
1916
|
+
let { lines: s } = A(), c = k();
|
|
1917
|
+
return O(), E(c), c && T(c, !0), l(c ? y : V(s)), t.flush(), !0;
|
|
1918
|
+
}
|
|
1919
|
+
function j(e) {
|
|
1920
|
+
let n = v !== null;
|
|
1921
|
+
if (v = e, !e) {
|
|
1922
|
+
x = !1, p.hideIcon(), E(null), n && O(), T(), l(y), t.flush();
|
|
1923
|
+
return;
|
|
1924
|
+
}
|
|
1925
|
+
p.placeIcon(e);
|
|
1926
|
+
let r = k();
|
|
1927
|
+
O(), E(r), r && T(r, !0), l(y), t.flush();
|
|
1928
|
+
}
|
|
1929
|
+
function ne() {
|
|
1930
|
+
D();
|
|
1931
|
+
let e = k();
|
|
1932
|
+
O(), E(e), e && T(e, !0), h.length && A(), l(y), t.flush();
|
|
1933
|
+
}
|
|
1934
|
+
function M() {
|
|
1935
|
+
b = !1, h = [], g = null, _ = null, y = 0, d.hide(), f.clear(), p.clearTrail(), m.clear(), c([], new o()), l(0), t.flush();
|
|
1936
|
+
}
|
|
1937
|
+
function N() {
|
|
1938
|
+
M(), v = null, t.destroy();
|
|
1939
|
+
}
|
|
1940
|
+
return {
|
|
1941
|
+
setRoute: te,
|
|
1942
|
+
onPositionChanged: j,
|
|
1943
|
+
onFloorChanged: ne,
|
|
1944
|
+
shouldReroute: ee,
|
|
1945
|
+
clearRoute: M,
|
|
1946
|
+
destroy: N
|
|
1947
|
+
};
|
|
1948
|
+
}
|
|
1949
|
+
//#endregion
|
|
1950
|
+
//#region ../wayfinding/src/createWayfinding.ts
|
|
1951
|
+
function bn(e) {
|
|
1952
|
+
let { dataSource: t, renderer: n, iconProvider: r, floorContext: i, layers: a, gpsConfig: o } = e, s = dt(t), c = qt(n, a, { screenSpaceIcons: e.screenSpaceIcons }), l = yn({
|
|
1953
|
+
engine: s,
|
|
1954
|
+
renderer: c,
|
|
1955
|
+
iconProvider: r,
|
|
1956
|
+
floorContext: i,
|
|
1957
|
+
snapThreshold: Ot({
|
|
1958
|
+
thresholdInMeters: Dt(o == null ? void 0 : o.snapThreshold, St),
|
|
1959
|
+
gpsConfig: o
|
|
1960
|
+
}),
|
|
1961
|
+
rerouteThreshold: kt(o),
|
|
1962
|
+
onTransitionClick: (t) => {
|
|
1963
|
+
var n;
|
|
1964
|
+
return (n = e.onTransitionClick) == null ? void 0 : n.call(e, t);
|
|
1965
|
+
},
|
|
1966
|
+
onRouteUpdate: (t, n) => {
|
|
1967
|
+
var r;
|
|
1968
|
+
return (r = e.onRouteUpdate) == null ? void 0 : r.call(e, t, n);
|
|
1969
|
+
},
|
|
1970
|
+
onRouteDistance: (t) => {
|
|
1971
|
+
var n;
|
|
1972
|
+
return (n = e.onRouteDistance) == null ? void 0 : n.call(e, t);
|
|
1973
|
+
}
|
|
1974
|
+
});
|
|
1975
|
+
return {
|
|
1976
|
+
setRoute: (e) => l.setRoute(e),
|
|
1977
|
+
buildRoute: (e, t, n) => s.buildRoute(e, t, n),
|
|
1978
|
+
clearRoute: () => l.clearRoute(),
|
|
1979
|
+
setPosition: (e) => l.onPositionChanged(e),
|
|
1980
|
+
notifyFloorChanged: () => l.onFloorChanged(),
|
|
1981
|
+
shouldReroute: (e) => l.shouldReroute(e),
|
|
1982
|
+
handleClick: (e) => {
|
|
1983
|
+
for (let t of e) if (c.handleClick(t)) return !0;
|
|
1984
|
+
return !1;
|
|
1985
|
+
},
|
|
1986
|
+
handleHover: (e) => e.some((e) => c.handleHover(e)),
|
|
1987
|
+
setIcon: (e, t, n) => c.setIcon(e, t, n),
|
|
1988
|
+
flush: () => c.flush(),
|
|
1989
|
+
destroy: () => l.destroy()
|
|
1990
|
+
};
|
|
1991
|
+
}
|
|
1992
|
+
//#endregion
|
|
1993
|
+
//#region src/wayfinding/adapters/arbitraryPoint.ts
|
|
1994
|
+
var xn = "Your Location", Sn = "kiosk-anchor";
|
|
1995
|
+
function Cn(e, t, n) {
|
|
1996
|
+
return {
|
|
1997
|
+
id: n,
|
|
1998
|
+
x: e.x,
|
|
1999
|
+
y: e.y,
|
|
2000
|
+
layer: e.z == null ? "" : String(e.z),
|
|
2001
|
+
name: t
|
|
2002
|
+
};
|
|
2003
|
+
}
|
|
2004
|
+
//#endregion
|
|
2005
|
+
//#region src/wayfinding/adapters/boothToEndpoint.ts
|
|
2006
|
+
function wn(e) {
|
|
2007
|
+
var t, n;
|
|
2008
|
+
let r = e.rect, i = d.fromMinMax(r.min, r.max, e.rotate).corners();
|
|
2009
|
+
return {
|
|
2010
|
+
x: r.center.x,
|
|
2011
|
+
y: r.center.y,
|
|
2012
|
+
layer: (t = (n = e.layer) == null ? void 0 : n.name) == null ? "" : t,
|
|
2013
|
+
bounds: i
|
|
2014
|
+
};
|
|
2015
|
+
}
|
|
2016
|
+
//#endregion
|
|
2017
|
+
//#region src/wayfinding/adapters/canvasIconProvider.ts
|
|
2018
|
+
var Tn = "#00A2FF", En = "#FF9F06", q = 34, Dn = 56;
|
|
2019
|
+
function J(e, t, n, r, i, a) {
|
|
2020
|
+
let o = e.get(t);
|
|
2021
|
+
return o ? (o.id = t, h(o, n, r, i)) : a();
|
|
2022
|
+
}
|
|
2023
|
+
function Y(e) {
|
|
2024
|
+
return {
|
|
2025
|
+
canvas: e,
|
|
2026
|
+
width: e.width,
|
|
2027
|
+
height: e.height
|
|
2028
|
+
};
|
|
2029
|
+
}
|
|
2030
|
+
function On(e) {
|
|
2031
|
+
var t, n;
|
|
2032
|
+
let { iconMap: r, pixelRatio: i } = e, a = (t = e.sourceColor) == null ? Tn : t, o = (n = e.destinationColor) == null ? En : n, s = /* @__PURE__ */ new Map();
|
|
2033
|
+
s.set("destination", Y(J(r, "destination", q, q, i, () => ee(i, o)))), s.set("source", Y(J(r, "departure", q, q, i, () => v(i, a)))), s.set("source_inactive", Y(J(r, "departure_inactive", q, q, i, () => v(i, a))));
|
|
2034
|
+
let c = v(i, a);
|
|
2035
|
+
c.id = "current-location", s.set("current", Y(c));
|
|
2036
|
+
let l = J(r, "transition", q, q, i, () => v(i, a));
|
|
2037
|
+
return s.set("transition", Y(l)), s.set("transition_up", Y(J(r, "transition_up", Dn, q, i, () => l))), s.set("transition_down", Y(J(r, "transition_down", Dn, q, i, () => l))), s.set("transition_entry", Y(J(r, "departure", q, q, i, () => v(i, a)))), s.set("current_arrow", Y(J(r, "direction", q, q, i, () => y(i, a)))), s.set("trail", Y(x(4, "#b5b7bc"))), { getIcon(e) {
|
|
2038
|
+
let t = s.get(e);
|
|
2039
|
+
if (!t) throw Error(`Unknown icon: ${e}`);
|
|
2040
|
+
return t;
|
|
2041
|
+
} };
|
|
2042
|
+
}
|
|
2043
|
+
//#endregion
|
|
2044
|
+
//#region src/wayfinding/adapters/floorContext.ts
|
|
2045
|
+
var kn = 0;
|
|
2046
|
+
function An(e, t) {
|
|
2047
|
+
return {
|
|
2048
|
+
showAllFloors() {
|
|
2049
|
+
return e.mode === kn;
|
|
2050
|
+
},
|
|
2051
|
+
getActiveFloor() {
|
|
2052
|
+
var n;
|
|
2053
|
+
let r = (n = t.currentRouteLayer) == null ? void 0 : n.name;
|
|
2054
|
+
return r && e.layers.some((e) => e.name === r && e.visible) ? r : "";
|
|
2055
|
+
},
|
|
2056
|
+
isLayerVisible(t) {
|
|
2057
|
+
var n, r;
|
|
2058
|
+
return t ? e.findLayer ? (n = (r = e.findLayer(t)) == null ? void 0 : r.visible) == null || n : e.layers.some((e) => e.name === t && e.visible) : !0;
|
|
2059
|
+
},
|
|
2060
|
+
getFloorOrder() {
|
|
2061
|
+
return e.floors.map((e) => e.name).reverse();
|
|
2062
|
+
}
|
|
2063
|
+
};
|
|
2064
|
+
}
|
|
2065
|
+
//#endregion
|
|
2066
|
+
//#region src/wayfinding/adapters/graphDataSource.ts
|
|
2067
|
+
function jn() {
|
|
2068
|
+
return {
|
|
2069
|
+
getLines: () => {
|
|
2070
|
+
var e, t;
|
|
2071
|
+
return (e = (t = b()) == null ? void 0 : t.lines) == null ? [] : e;
|
|
2072
|
+
},
|
|
2073
|
+
getLineEnds: () => {
|
|
2074
|
+
var e, t;
|
|
2075
|
+
return (e = (t = b()) == null ? void 0 : t.lineEnds) == null ? [] : e;
|
|
2076
|
+
}
|
|
2077
|
+
};
|
|
2078
|
+
}
|
|
2079
|
+
//#endregion
|
|
2080
|
+
//#region src/utils/math.ts
|
|
2081
|
+
var Mn = /* @__PURE__ */ e(_(), 1);
|
|
2082
|
+
function X(e, t) {
|
|
2083
|
+
return e * (1 - t / 100);
|
|
2084
|
+
}
|
|
2085
|
+
//#endregion
|
|
2086
|
+
//#region src/wayfinding/adapters/kioskCanvas.ts
|
|
2087
|
+
var Nn = 199, Pn = 152, Fn = 55, In = "#ee4422";
|
|
2088
|
+
function Ln(e, t) {
|
|
2089
|
+
let n = devicePixelRatio, r = e == null ? void 0 : e.get("kiosk");
|
|
2090
|
+
if (r) {
|
|
2091
|
+
r.id = "kiosk";
|
|
2092
|
+
let e = t ? t / 100 : 1;
|
|
2093
|
+
return h(r, X(Nn * e, Fn), X(Pn * e, Fn), n);
|
|
2094
|
+
}
|
|
2095
|
+
return y(n, (0, Mn.default)(In).hex());
|
|
2096
|
+
}
|
|
2097
|
+
//#endregion
|
|
2098
|
+
//#region src/wayfinding/adapters/positionInput.ts
|
|
2099
|
+
function Rn(e) {
|
|
2100
|
+
return {
|
|
2101
|
+
x: e.x,
|
|
2102
|
+
y: e.y,
|
|
2103
|
+
layer: e.z == null ? "" : String(e.z),
|
|
2104
|
+
heading: Number.isFinite(e.angle) ? e.angle : void 0
|
|
2105
|
+
};
|
|
2106
|
+
}
|
|
2107
|
+
//#endregion
|
|
2108
|
+
//#region src/wayfinding/bindMobxReactions.ts
|
|
2109
|
+
var zn = (e) => "rect" in e ? wn(e) : e;
|
|
2110
|
+
function Bn({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStore: a, uiState: o, layerStore: s } }) {
|
|
2111
|
+
let c = [];
|
|
2112
|
+
function l() {
|
|
2113
|
+
var t;
|
|
2114
|
+
let n = o.selectedRoute, r = n != null && n.from ? zn(n.from) : null, i = n != null && n.to ? zn(n.to) : null;
|
|
2115
|
+
if (!r || !i) {
|
|
2116
|
+
e.clearRoute();
|
|
2117
|
+
return;
|
|
2118
|
+
}
|
|
2119
|
+
e.setRoute({
|
|
2120
|
+
from: r,
|
|
2121
|
+
to: i,
|
|
2122
|
+
waypoints: n == null || (t = n.waypoints) == null ? void 0 : t.map(wn),
|
|
2123
|
+
accessible: a.onlyAccessible
|
|
2124
|
+
}) === !1 && console.error(/* @__PURE__ */ Error(`Route not found: (${r.x},${r.y}) → (${i.x},${i.y})`));
|
|
2125
|
+
}
|
|
2126
|
+
function u() {
|
|
2127
|
+
let t = a.currentPosition, r = a.iconType !== 0, i = o.selectedRoute, s = !!(i != null && i.from && i != null && i.to), c = r && !s;
|
|
2128
|
+
if (!t) {
|
|
2129
|
+
e.setPosition(null), n(null);
|
|
2130
|
+
return;
|
|
2131
|
+
}
|
|
2132
|
+
let l = Rn(t);
|
|
2133
|
+
c ? (e.setPosition(null), n({
|
|
2134
|
+
x: l.x,
|
|
2135
|
+
y: l.y,
|
|
2136
|
+
layer: l.layer
|
|
2137
|
+
})) : (n(null), e.setPosition(l));
|
|
2138
|
+
}
|
|
2139
|
+
function d() {
|
|
2140
|
+
var t;
|
|
2141
|
+
let n = a.currentPosition, r = o.selectedRoute;
|
|
2142
|
+
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(Rn(n));
|
|
2144
|
+
!i && !s || a.rebuildRouteFromPosition(Cn(n, xn, G));
|
|
2145
|
+
}
|
|
2146
|
+
function f() {
|
|
2147
|
+
var e, n;
|
|
2148
|
+
let r = (e = s.floors.find((e) => e.active)) == null ? void 0 : e.name;
|
|
2149
|
+
t((n = o.kioskData) == null ? null : n, r, s.mode);
|
|
2150
|
+
}
|
|
2151
|
+
function p() {
|
|
2152
|
+
var e;
|
|
2153
|
+
let t = o.selectedRoute, n = a.currentPosition;
|
|
2154
|
+
if (!(t != null && t.to) || !n || ((e = t.from) == null ? void 0 : e.id) !== "current-position" || a.routeLines.length > 0) return;
|
|
2155
|
+
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(Cn(n, xn, G));
|
|
2157
|
+
}
|
|
2158
|
+
c.push(i(() => s.layersLoaded, () => {
|
|
2159
|
+
l(), u();
|
|
2160
|
+
}), i(() => [o.selectedRoute, a.onlyAccessible], () => {
|
|
2161
|
+
l(), u();
|
|
2162
|
+
}), i(() => a.currentPosition, () => {
|
|
2163
|
+
u();
|
|
2164
|
+
}), i(() => {
|
|
2165
|
+
let e = a.currentPosition;
|
|
2166
|
+
return e ? {
|
|
2167
|
+
x: e.x,
|
|
2168
|
+
y: e.y,
|
|
2169
|
+
z: e.z
|
|
2170
|
+
} : null;
|
|
2171
|
+
}, () => {
|
|
2172
|
+
d(), p();
|
|
2173
|
+
}, { equals: r.structural }), i(() => [o.kioskData, s.floors.find((e) => e.active)], () => f()));
|
|
2174
|
+
let m = null, h = i(() => [a.currentRouteLayer, o.getRouteNextFloor], () => {
|
|
2175
|
+
s.layersLoaded && (m !== null && clearTimeout(m), m = setTimeout(() => {
|
|
2176
|
+
e.notifyFloorChanged(), u(), m = null;
|
|
2177
|
+
}, 0));
|
|
2178
|
+
});
|
|
2179
|
+
return c.push(() => {
|
|
2180
|
+
m !== null && clearTimeout(m), h();
|
|
2181
|
+
}), l(), u(), f(), () => {
|
|
2182
|
+
for (let e of c) e();
|
|
2183
|
+
c.length = 0;
|
|
2184
|
+
};
|
|
2185
|
+
}
|
|
2186
|
+
//#endregion
|
|
2187
|
+
//#region src/wayfinding/handlers/kioskHandler.ts
|
|
2188
|
+
var Z = "kiosk", Vn = 0;
|
|
2189
|
+
function Hn({ wayfinding: e, kioskIconMap: t }) {
|
|
2190
|
+
let n = /* @__PURE__ */ new Map(), r = (e) => {
|
|
2191
|
+
let r = e == null ? 100 : e, i = n.get(r);
|
|
2192
|
+
if (i) return i;
|
|
2193
|
+
let a = Ln(t, e);
|
|
2194
|
+
return n.set(r, a), a;
|
|
2195
|
+
};
|
|
2196
|
+
return (t, n, i) => {
|
|
2197
|
+
var a;
|
|
2198
|
+
if (!t) {
|
|
2199
|
+
e.setIcon(Z, null), e.flush();
|
|
2200
|
+
return;
|
|
2201
|
+
}
|
|
2202
|
+
if (i !== Vn && t.z && n && t.z !== n) {
|
|
2203
|
+
e.setIcon(Z, null), e.flush();
|
|
2204
|
+
return;
|
|
2205
|
+
}
|
|
2206
|
+
e.setIcon(Z, {
|
|
2207
|
+
canvas: r(t.iconSizePercent),
|
|
2208
|
+
x: t.x,
|
|
2209
|
+
y: t.y,
|
|
2210
|
+
rotation: p((a = t.heading) == null ? 0 : a),
|
|
2211
|
+
screenSpace: !1
|
|
2212
|
+
}), e.flush();
|
|
2213
|
+
};
|
|
2214
|
+
}
|
|
2215
|
+
//#endregion
|
|
2216
|
+
//#region src/wayfinding/handlers/yahHandler.ts
|
|
2217
|
+
var Q = "yah", Un = "#ff4343", Wn = 64, Gn = 90, Kn = 32;
|
|
2218
|
+
function qn(e, t) {
|
|
2219
|
+
let n = e.get(Q);
|
|
2220
|
+
return n ? (n.id = Q, h(n, X(Wn, Kn), X(Gn, Kn), t)) : g(t, Un);
|
|
2221
|
+
}
|
|
2222
|
+
function Jn({ wayfinding: e, iconMap: t, pixelRatio: n, floorContext: r }) {
|
|
2223
|
+
let i = qn(t, n);
|
|
2224
|
+
return i.id = "current-location-2", (t) => {
|
|
2225
|
+
if (!t) {
|
|
2226
|
+
e.setIcon(Q, null), e.flush();
|
|
2227
|
+
return;
|
|
2228
|
+
}
|
|
2229
|
+
let n = r.isLayerVisible(t.layer);
|
|
2230
|
+
e.setIcon(Q, {
|
|
2231
|
+
canvas: i,
|
|
2232
|
+
x: t.x,
|
|
2233
|
+
y: t.y,
|
|
2234
|
+
hidden: !n,
|
|
2235
|
+
dimmed: !n,
|
|
2236
|
+
origin: [.5, 1]
|
|
2237
|
+
}), e.flush();
|
|
2238
|
+
};
|
|
2239
|
+
}
|
|
2240
|
+
//#endregion
|
|
2241
|
+
//#region src/wayfinding/createWayfinding.ts
|
|
2242
|
+
var $ = null;
|
|
2243
|
+
function Yn() {
|
|
2244
|
+
return $ !== null;
|
|
2245
|
+
}
|
|
2246
|
+
function Xn() {
|
|
2247
|
+
if (!$) throw Error("Wayfinding is not initialized — call createWayfinding() first.");
|
|
2248
|
+
return $;
|
|
2249
|
+
}
|
|
2250
|
+
function Zn(e, t, n) {
|
|
2251
|
+
return Xn().wayfinding.buildRoute(e, t, n);
|
|
2252
|
+
}
|
|
2253
|
+
function Qn(e) {
|
|
2254
|
+
let { scene: t, store: n, canvas: r } = e, i = tn(t.rootLayer), { wayfinding: a, dispose: o } = $n(n, i, {
|
|
2255
|
+
attachCardinalSnap: m,
|
|
2256
|
+
update: C
|
|
2257
|
+
}), s = i.icons;
|
|
2258
|
+
return s.onClick = (e) => tr(a, e), s.onPointerMove = (e) => nr(a, r, e), s.onPointerOut = () => nr(a, r), C(s), () => {
|
|
2259
|
+
s.onClick = void 0, s.onPointerMove = void 0, s.onPointerOut = void 0, r.current && (r.current.style.cursor = ""), C(s), o();
|
|
2260
|
+
};
|
|
2261
|
+
}
|
|
2262
|
+
function $n(e, t, n) {
|
|
2263
|
+
var r;
|
|
2264
|
+
let i = jn(), a = On({
|
|
2265
|
+
iconMap: e.fp.icons,
|
|
2266
|
+
pixelRatio: devicePixelRatio
|
|
2267
|
+
}), o = An(e.layerStore, e.routeStore), s = bn({
|
|
2268
|
+
dataSource: i,
|
|
2269
|
+
renderer: n,
|
|
2270
|
+
iconProvider: a,
|
|
2271
|
+
floorContext: o,
|
|
2272
|
+
layers: t,
|
|
2273
|
+
gpsConfig: (r = M()) == null || (r = r.properties) == null ? void 0 : r.config,
|
|
2274
|
+
screenSpaceIcons: e.uiState.is3DView,
|
|
2275
|
+
onTransitionClick: (t) => {
|
|
2276
|
+
t.role === "exit" && e.layerStore.updateVisibility(t.targetLayer, !0);
|
|
2277
|
+
},
|
|
2278
|
+
onRouteUpdate: (t, n) => {
|
|
2279
|
+
e.routeStore.updateRoute([...t]), n.isEmpty() || (e.uiState.moveToRect = n);
|
|
2280
|
+
},
|
|
2281
|
+
onRouteDistance: (t) => e.routeStore.updateRouteDistance(t)
|
|
2282
|
+
}), c = Bn({
|
|
2283
|
+
wayfinding: s,
|
|
2284
|
+
kioskHandler: Hn({
|
|
2285
|
+
wayfinding: s,
|
|
2286
|
+
kioskIconMap: e.fp.icons
|
|
2287
|
+
}),
|
|
2288
|
+
yahHandler: Jn({
|
|
2289
|
+
wayfinding: s,
|
|
2290
|
+
iconMap: e.fp.icons,
|
|
2291
|
+
pixelRatio: devicePixelRatio,
|
|
2292
|
+
floorContext: o
|
|
2293
|
+
}),
|
|
2294
|
+
stores: {
|
|
2295
|
+
routeStore: e.routeStore,
|
|
2296
|
+
uiState: e.uiState,
|
|
2297
|
+
layerStore: e.layerStore
|
|
2298
|
+
}
|
|
2299
|
+
});
|
|
2300
|
+
e.routeStore.showAccessible = i.getLines().some((e) => e.unaccessible);
|
|
2301
|
+
let l = { wayfinding: s };
|
|
2302
|
+
return $ = l, s.flush(), {
|
|
2303
|
+
wayfinding: s,
|
|
2304
|
+
dispose() {
|
|
2305
|
+
er(l) && ($ = null, e.routeStore.showAccessible = !1), c(), s.destroy();
|
|
2306
|
+
}
|
|
2307
|
+
};
|
|
2308
|
+
}
|
|
2309
|
+
function er(e) {
|
|
2310
|
+
return $ === e;
|
|
2311
|
+
}
|
|
2312
|
+
function tr(e, t) {
|
|
2313
|
+
e.handleClick([t.def]) && t.stopPropagation();
|
|
2314
|
+
}
|
|
2315
|
+
function nr(e, t, n) {
|
|
2316
|
+
let r = t.current;
|
|
2317
|
+
if (!r) return;
|
|
2318
|
+
let i = n ? e.handleHover([n.def]) : !1;
|
|
2319
|
+
r.style.cursor = i ? "pointer" : "";
|
|
2320
|
+
}
|
|
2321
|
+
//#endregion
|
|
2322
|
+
export { j as _, xn as a, G as c, oe as d, ie as f, M as g, P as h, wn as i, en as l, F as m, Qn as n, Sn as o, ae as p, Yn as r, Cn as s, Zn as t, Xe as u, T as v };
|