@expofp/floorplan 3.45.4 → 3.45.6
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-CftScIdx.js → Button-DT-Jfwrb.js} +5 -5
- package/dist/browser/{CookieConsent-ByS7cPh9.js → CookieConsent-D6nxm_ph.js} +7 -7
- package/dist/browser/{Debug-CDb2j0OF.js → Debug-DC9ghW5V.js} +7 -7
- package/dist/browser/{DebugTools-jdOEpl8C.js → DebugTools-Y0aycjKM.js} +6 -6
- package/dist/browser/{Demo-CTLfudbP.js → Demo-CgC4OvVd.js} +9 -9
- package/dist/browser/{Free-C5QMNYRI.js → Free-BdhGlQwB.js} +10 -10
- package/dist/browser/{GalleryContainer-BUhs_oBk.js → GalleryContainer-Do8X13Mq.js} +11 -11
- package/dist/browser/{GpsLoader-BSWIXvfs.js → GpsLoader-CBEyj1G4.js} +13 -13
- package/dist/browser/{KioskStore-BC-gl1wE.js → KioskStore-DhtR-5Hr.js} +9 -9
- package/dist/browser/{LayerStore-CONC-3Gj.js → LayerStore-CWxa5hfz.js} +761 -744
- package/dist/browser/{MaplibreAdapter-BXKE5rxG.js → MaplibreAdapter-C5lXCMGf.js} +17 -17
- package/dist/browser/{ModalContainer-BpM9aPfz.js → ModalContainer-DiM4OG67.js} +10 -10
- package/dist/browser/{PermissionNotice-BM5kQYe7.js → PermissionNotice-DaqnuHln.js} +6 -6
- package/dist/browser/{RouteStore-C7okfu9_.js → RouteStore-DHDpmHzr.js} +9 -9
- package/dist/browser/{SetKioskMode-DabqQvMH.js → SetKioskMode-D_5Us9Gn.js} +11 -11
- package/dist/browser/{ShowKiosk-DvOBEV0v.js → ShowKiosk-Ca6BaYA4.js} +10 -10
- package/dist/browser/{UIState-Ce9F8YFe.js → UIState-ClHYIJ2L.js} +12 -12
- package/dist/browser/{ViewerMenuPanel-FsMuHE9m.js → ViewerMenuPanel-BWrEOvZt.js} +10 -10
- package/dist/browser/{add-debug-secret-listener-DEPSZS-A.js → add-debug-secret-listener-BECnIMzo.js} +1 -1
- package/dist/browser/{adopt-global-settings-ptJCSHgd.js → adopt-global-settings-U-KbyxMd.js} +9 -9
- package/dist/browser/{boolean-editor-C_RdXFiI.js → boolean-editor-CYMx87em.js} +9 -9
- package/dist/browser/{bootIntercom-CnpSeS09.js → bootIntercom-O5O0bdiC.js} +2 -2
- package/dist/browser/bundle.json +85 -85
- package/dist/browser/{camera-events-BYUTGOGy.js → camera-events-DSCuSH25.js} +1 -1
- package/dist/browser/{classnames-I5odALD0.js → classnames-YcGXWNfg.js} +2 -2
- package/dist/browser/{client-TnBerOtS.js → client-BcPpS_Gj.js} +5 -5
- package/dist/browser/{components-CEGOfvRn.js → components-DyXkVj-h.js} +48 -48
- package/dist/browser/{create-live-plan-msjLUPAb.js → create-live-plan-DEVM8pOp.js} +13 -13
- package/dist/browser/{debug-context-8s7JYsHP.js → debug-context-CNBgUWR8.js} +5 -5
- package/dist/browser/{debug-overlay-BEEAevvE.js → debug-overlay-B__pFwQg.js} +10 -10
- package/dist/browser/{debug-ui-BWDU1_DK.js → debug-ui-BaE8MZQX.js} +6 -6
- package/dist/browser/{dist-B7taugxI.js → dist-C1NaWqk4.js} +5 -5
- package/dist/browser/{dist-BL9v1eQu.js → dist-Cx8u0gjK.js} +3 -3
- package/dist/browser/{dist-Dg8H-fF9.js → dist-wOC6gYFh.js} +6 -6
- package/dist/browser/{efp-debug-init-3uYSkVQl.js → efp-debug-init-CozbueIl.js} +3 -3
- package/dist/browser/{enum-editor-DiE-Q-gC.js → enum-editor-CkiQPgZv.js} +4 -4
- package/dist/browser/{es5-D2KUWXXM.js → es5-B__Ovz45.js} +2 -2
- package/dist/browser/{event-head-DXLhGPVQ.js → event-head-C_inMpbD.js} +1 -1
- package/dist/browser/{event-not-found-ClTL2wLx.js → event-not-found-Z2mJBZE3.js} +3 -3
- package/dist/browser/{event-scoped-cache-CcA_qeS6.js → event-scoped-cache-aJgjSj-3.js} +2 -2
- package/dist/browser/{expofpUrl-BTeumhPB.js → expofpUrl-jBUlvkwz.js} +1 -1
- package/dist/browser/{exports-BezdpCeZ.js → exports-CvUYw1h6.js} +1 -1
- package/dist/browser/{favicon-eEoLTD6j.js → favicon-BkDrYTmU.js} +1 -1
- package/dist/browser/{fetch-retry.umd-o-6hecKO.js → fetch-retry.umd-2B2pCUIS.js} +2 -2
- package/dist/browser/{flex-DC-YFhOp.js → flex-3lSivw8z.js} +5 -5
- package/dist/browser/{floorplan.loader-BMR6104c.js → floorplan.loader-CDl2dZZx.js} +12 -12
- package/dist/browser/{floorplan.ready-DxP00yOP.js → floorplan.ready-C_1nb6xR.js} +23 -23
- package/dist/browser/{framing-rect-B28m3lJd.js → framing-rect-3gPjaM3T.js} +235 -227
- package/dist/browser/{freeBanner-CxeeG1v1.js → freeBanner-CnrBc9Tl.js} +2 -2
- package/dist/browser/{fuse-CM3BvYBC.js → fuse-B7V1lkoA.js} +2 -2
- package/dist/browser/{i18n-CyzfIlqQ.js → i18n-2_QFqpgv.js} +6 -6
- package/dist/browser/index.js +17 -17
- package/dist/browser/{index.module-D9cgjYhA.js → index.module-L0xt0u3p.js} +4 -4
- package/dist/browser/{init-ui-7k8cHFZw.js → init-ui-DbSF-9yC.js} +9 -9
- package/dist/browser/{integrateKiosk-DUFIUi05.js → integrateKiosk-D0FDyLHF.js} +5 -5
- package/dist/browser/{is-debug-BAIQHfxq.js → is-debug-DDKN4CIF.js} +4 -4
- package/dist/browser/{is-own-domain-C_JX2ZHR.js → is-own-domain-DNvxb9Ph.js} +1 -1
- package/dist/browser/{is-webview-BU0Pek8w.js → is-webview-cTH4yz8f.js} +1 -1
- package/dist/browser/{jsx-runtime-CtimPtPq.js → jsx-runtime-DQgnuS-I.js} +2 -2
- package/dist/browser/{kiosk-mode-CV-M1Zz8.js → kiosk-mode-Bdb_6yEJ.js} +3 -3
- package/dist/browser/{kiosk-record-Du4IFKBR.js → kiosk-record-JAEq8SV6.js} +1 -1
- package/dist/browser/{kioskApi-BVRzmuDX.js → kioskApi-1dS8REP7.js} +7 -7
- package/dist/browser/{lib-n3_ONTp3.js → lib--J2yQXt6.js} +3 -3
- package/dist/browser/{loadImage-DqAC23xl.js → loadImage-BJzAyAlv.js} +1 -1
- package/dist/browser/{logDeviceInfo-B47wOFn-.js → logDeviceInfo-BaJPElii.js} +9 -9
- package/dist/browser/{mobx-BxS2198S.js → mobx-vWymcZuV.js} +4 -4
- package/dist/browser/{mobx.module-DBXspHzN.js → mobx.module-BOCLFB5I.js} +1 -1
- package/dist/browser/{optional-boolean-editor-DusM7rb0.js → optional-boolean-editor-ZncW2HBw.js} +3 -3
- package/dist/browser/{optional-enum-editor-BKyAfZ8e.js → optional-enum-editor-Dkzs9jDN.js} +4 -4
- package/dist/browser/{optional-string-editor-sA0aHiGB.js → optional-string-editor-DC9PMUWB.js} +4 -4
- package/dist/browser/{particles.min-B7kv19nN.js → particles.min-eC5xdOrB.js} +2 -2
- package/dist/browser/{react-Cohf8rUU.js → react-DqPP-mkq.js} +2 -2
- package/dist/browser/{react-dom-tyj4-_-C.js → react-dom-BkVzoZWO.js} +3 -3
- package/dist/browser/{rolldown-runtime-Bcr_gA0_.js → rolldown-runtime-DUb2xvRc.js} +1 -1
- package/dist/browser/{scene-BBPTWEUE.js → scene-BaiC3jfV.js} +3 -3
- package/dist/browser/{scheduler-CrY9mG_c.js → scheduler-NBuuaWIe.js} +2 -2
- package/dist/browser/{select-D19r5W1a.js → select-Cxf-YiNA.js} +10 -10
- package/dist/browser/{settings-D4-jxTxB.js → settings-D74eG9h8.js} +2 -2
- package/dist/browser/{settings-item-CIt7SQG4.js → settings-item-DUUbKec_.js} +6 -6
- package/dist/browser/{store-CjCKsoXy.js → store-nyclu8mO.js} +2 -2
- package/dist/browser/{string-editor-D8F1eTpQ.js → string-editor-CINOmY_C.js} +4 -4
- package/dist/browser/{text-field-BYYweuSY.js → text-field-DORaOVht.js} +5 -5
- package/dist/browser/{theme-q6cCoTLz.js → theme-DyFm9MGz.js} +8 -8
- package/dist/browser/{ui-CYUl2cf1.js → ui-DsCU3FV6.js} +8 -8
- package/dist/browser/{useRenderTarget-Bqdt8QZX.js → useRenderTarget-D8DmceME.js} +4 -4
- package/dist/browser/{viewport-D4MnXYrN.js → viewport-DbRvshkB.js} +3 -3
- package/dist/browser/{wayfinding-CulSEPiv.js → wayfinding-DBvGTAdW.js} +414 -395
- package/dist/esm/components/Map/drawing/config/config-load-layer.js +1 -1
- package/dist/esm/components/Map/traffic/useManageTraffic.js +1 -1
- package/dist/esm/utils/loadLayerImages.d.ts +6 -11
- package/dist/esm/utils/loadLayerImages.js +1 -1
- package/dist/esm/wayfinding/bindMobxReactions.js +1 -1
- package/package.json +10 -10
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
try {
|
|
3
3
|
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
|
-
e.SENTRY_RELEASE = { id: "3.45.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.45.6" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "
|
|
6
|
+
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "ee464435-718a-4ca3-8b33-3debeef492af", e._sentryDebugIdIdentifier = "sentry-dbid-ee464435-718a-4ca3-8b33-3debeef492af");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e, t } from "./rolldown-runtime-
|
|
10
|
-
import { o as n } from "./is-debug-
|
|
11
|
-
import { i as r, l as i } from "./mobx.module-
|
|
12
|
-
import { $t as a, Ct as o, Dt as s, Et as c, Ot as l, Ut as u, Wt as d, Xt as f, _t as p, an as m, cn as h, ft as g, nn as _, nt as v, on as y, rn as b, sn as x, tn as S, vt as C, wt as w, xt as T, yt as E } from "./LayerStore-
|
|
9
|
+
import { r as e, t } from "./rolldown-runtime-DUb2xvRc.js";
|
|
10
|
+
import { o as n } from "./is-debug-DDKN4CIF.js";
|
|
11
|
+
import { i as r, l as i } from "./mobx.module-BOCLFB5I.js";
|
|
12
|
+
import { $t as a, Ct as o, Dt as s, Et as c, Ot as l, Ut as u, Wt as d, Xt as f, _t as p, an as m, cn as h, ft as g, nn as _, nt as v, on as y, rn as b, sn as x, tn as S, vt as C, wt as w, xt as T, yt as E } from "./LayerStore-CWxa5hfz.js";
|
|
13
13
|
//#region ../geometry/src/lib/geo.ts
|
|
14
14
|
var D = 6371e3;
|
|
15
15
|
function O(e, t) {
|
|
@@ -31,7 +31,7 @@ function j(e, t, n) {
|
|
|
31
31
|
let r = n.local.x - t.local.x, i = n.local.y - t.local.y, a = Math.sqrt(r * r + i * i), o = e.x - t.local.x, s = e.y - t.local.y, c = Math.sqrt(o * o + s * s), l = h(Math.atan2(i, r)), u = h(Math.atan2(s, o)) - l, d = (a === 0 ? 0 : c / a) * O(t.geo, n.geo), f = k(t.geo, n.geo);
|
|
32
32
|
return A(t.geo, d, f + u);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function ee(e, t, n) {
|
|
35
35
|
let r = O(t.geo, n.geo), i = k(t.geo, n.geo), a = O(t.geo, e), o = k(t.geo, e) - i, s = r === 0 ? 0 : a / r, c = n.local.x - t.local.x, l = n.local.y - t.local.y, u = Math.sqrt(c * c + l * l), d = Math.atan2(l, c), f = y(u * s, d + m(o));
|
|
36
36
|
return {
|
|
37
37
|
x: t.local.x + f.x,
|
|
@@ -40,16 +40,16 @@ function M(e, t, n) {
|
|
|
40
40
|
}
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region ../geometry/src/lib/line.ts
|
|
43
|
-
function
|
|
43
|
+
function M(e) {
|
|
44
44
|
return _(e.p0, e.p1);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function te(e, t) {
|
|
47
47
|
return b(e.p0, e.p1, .5, t);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function N(e, t) {
|
|
50
50
|
return Math.atan2(t.y - e.y, t.x - e.x);
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function P(e, t, n) {
|
|
53
53
|
var r;
|
|
54
54
|
let i = e.p0.x, a = e.p0.y, o = e.p1.x, s = e.p1.y, c = t.x, l = t.y, u = o - i, d = s - a, f = u * u + d * d, p;
|
|
55
55
|
f === 0 ? p = 0 : (p = ((c - i) * u + (l - a) * d) / f, p = p < 0 ? 0 : p > 1 ? 1 : p);
|
|
@@ -65,21 +65,21 @@ function F(e, t, n) {
|
|
|
65
65
|
}
|
|
66
66
|
//#endregion
|
|
67
67
|
//#region src/data/fpGeo.ts
|
|
68
|
-
function
|
|
68
|
+
function F() {
|
|
69
69
|
return u().__fpGeo;
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
72
|
//#region src/utils/planBearing.ts
|
|
73
|
-
function
|
|
73
|
+
function ne(e) {
|
|
74
74
|
return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + e * Math.PI / 360))) / 360;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
77
|
-
let n = (Math.atan2(
|
|
76
|
+
function re(e, t) {
|
|
77
|
+
let n = (Math.atan2(ne(t.lat) - ne(e.lat), (t.lng - e.lng) / 360) - Math.atan2(t.y - e.y, t.x - e.x)) * 180 / Math.PI % 360;
|
|
78
78
|
return Number.isFinite(n) ? (n + 360) % 360 : NaN;
|
|
79
79
|
}
|
|
80
80
|
//#endregion
|
|
81
81
|
//#region src/utils/gps.ts
|
|
82
|
-
function
|
|
82
|
+
function I(e) {
|
|
83
83
|
return [{
|
|
84
84
|
local: {
|
|
85
85
|
x: e.p0.x,
|
|
@@ -100,24 +100,24 @@ function L(e) {
|
|
|
100
100
|
}
|
|
101
101
|
}];
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function L(e) {
|
|
104
104
|
return typeof e == "number" && Number.isFinite(e);
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
if (!(
|
|
106
|
+
function ie({ lat: e, lng: t, angle: r }, i) {
|
|
107
|
+
if (!(L(e) && L(t))) return null;
|
|
108
108
|
let { p0: a, p2: o } = i, s = O(a, o);
|
|
109
|
-
if (!
|
|
109
|
+
if (!L(s) || s <= 0) return n.warn("Invalid GPS config: zero or negative distance", {
|
|
110
110
|
fullGpsDistance: s,
|
|
111
111
|
p0: a,
|
|
112
112
|
p2: o
|
|
113
113
|
}), null;
|
|
114
|
-
let [c, l] =
|
|
114
|
+
let [c, l] = I(i), u = ee({
|
|
115
115
|
lat: e,
|
|
116
116
|
lng: t
|
|
117
117
|
}, c, l);
|
|
118
|
-
return
|
|
118
|
+
return M({
|
|
119
119
|
p0: u,
|
|
120
|
-
p1:
|
|
120
|
+
p1: te({
|
|
121
121
|
p0: a,
|
|
122
122
|
p1: o
|
|
123
123
|
})
|
|
@@ -126,21 +126,21 @@ function re({ lat: e, lng: t, angle: r }, i) {
|
|
|
126
126
|
angle: r
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
let [r, i] =
|
|
129
|
+
function ae(e, t, n) {
|
|
130
|
+
let [r, i] = I(n), { lat: a, lng: o } = j({
|
|
131
131
|
x: e,
|
|
132
132
|
y: t
|
|
133
133
|
}, r, i);
|
|
134
134
|
return [o, a];
|
|
135
135
|
}
|
|
136
|
-
function
|
|
136
|
+
function oe(e) {
|
|
137
137
|
var t, n;
|
|
138
|
-
let r = (t =
|
|
138
|
+
let r = (t = F()) == null || (t = t.properties) == null ? void 0 : t.config, i = r ? re(r.p0, r.p2) : NaN, a = Number.isFinite(i) ? i : (n = r == null ? void 0 : r.bearing) == null ? 0 : n;
|
|
139
139
|
return (e == null ? void 0 : e.angle) === null ? 0 : (((e.angle - a) % 360 + 360) % 360 - 90 + 360) % 360;
|
|
140
140
|
}
|
|
141
141
|
//#endregion
|
|
142
142
|
//#region ../wayfinding/src/core/graph/buildGraph.ts
|
|
143
|
-
function
|
|
143
|
+
function se(e, t, n) {
|
|
144
144
|
var r, i;
|
|
145
145
|
return t.build(e.getLines(), {
|
|
146
146
|
oriented: (r = n.oriented) == null || r,
|
|
@@ -153,7 +153,7 @@ function oe(e, t, n) {
|
|
|
153
153
|
}
|
|
154
154
|
//#endregion
|
|
155
155
|
//#region ../../node_modules/.pnpm/ngraph.events@1.4.0/node_modules/ngraph.events/dist/ngraph.events.cjs
|
|
156
|
-
var
|
|
156
|
+
var ce = /* @__PURE__ */ t(((e, t) => {
|
|
157
157
|
function n(e) {
|
|
158
158
|
i(e);
|
|
159
159
|
let t = r(e);
|
|
@@ -202,12 +202,12 @@ var se = /* @__PURE__ */ t(((e, t) => {
|
|
|
202
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
203
|
}
|
|
204
204
|
t.exports = n;
|
|
205
|
-
})),
|
|
205
|
+
})), le = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
206
206
|
t.exports = r;
|
|
207
|
-
var n =
|
|
207
|
+
var n = ce();
|
|
208
208
|
function r(e) {
|
|
209
209
|
if (e = e || {}, "uniqueLinkId" in e && (console.warn("ngraph.graph: Starting from version 0.14 `uniqueLinkId` is deprecated.\nUse `multigraph` option instead\n", "\n", "Note: there is also change in default behavior: From now on each graph\nis considered to be not a multigraph by default (each edge is unique)."), e.multigraph = e.uniqueLinkId), e.multigraph === void 0 && (e.multigraph = !1), typeof Map != "function") throw Error("ngraph.graph requires `Map` to be defined. Please polyfill it before using ngraph");
|
|
210
|
-
var t = /* @__PURE__ */ new Map(), r = [], l = {}, u = 0, d = e.multigraph ? E : T, f = [], p =
|
|
210
|
+
var t = /* @__PURE__ */ new Map(), r = [], l = {}, u = 0, d = e.multigraph ? E : T, f = [], p = F, m = F, h = F, g = F, _ = {
|
|
211
211
|
addNode: x,
|
|
212
212
|
addLink: w,
|
|
213
213
|
removeLink: A,
|
|
@@ -218,12 +218,12 @@ var se = /* @__PURE__ */ t(((e, t) => {
|
|
|
218
218
|
getLinksCount: O,
|
|
219
219
|
getNodesCount: D,
|
|
220
220
|
getLinks: k,
|
|
221
|
-
forEachNode:
|
|
222
|
-
forEachLinkedNode:
|
|
223
|
-
forEachLink:
|
|
221
|
+
forEachNode: I,
|
|
222
|
+
forEachLinkedNode: te,
|
|
223
|
+
forEachLink: M,
|
|
224
224
|
beginUpdate: h,
|
|
225
225
|
endUpdate: g,
|
|
226
|
-
clear:
|
|
226
|
+
clear: ee,
|
|
227
227
|
hasLink: j,
|
|
228
228
|
hasNode: S,
|
|
229
229
|
getLink: j
|
|
@@ -233,7 +233,7 @@ var se = /* @__PURE__ */ t(((e, t) => {
|
|
|
233
233
|
var e = _.on;
|
|
234
234
|
_.on = t;
|
|
235
235
|
function t() {
|
|
236
|
-
return _.beginUpdate = h =
|
|
236
|
+
return _.beginUpdate = h = ne, _.endUpdate = g = re, p = y, m = b, _.on = e, e.apply(_, arguments);
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
function y(e, t) {
|
|
@@ -312,39 +312,39 @@ var se = /* @__PURE__ */ t(((e, t) => {
|
|
|
312
312
|
}
|
|
313
313
|
return null;
|
|
314
314
|
}
|
|
315
|
-
function
|
|
316
|
-
h(),
|
|
315
|
+
function ee() {
|
|
316
|
+
h(), I(function(e) {
|
|
317
317
|
C(e.id);
|
|
318
318
|
}), g();
|
|
319
319
|
}
|
|
320
|
-
function
|
|
320
|
+
function M(e) {
|
|
321
321
|
var t, n;
|
|
322
322
|
if (typeof e == "function") for (t = 0, n = r.length; t < n; ++t) e(r[t]);
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function te(e, t, n) {
|
|
325
325
|
var r = S(e);
|
|
326
|
-
if (r && r.links && typeof t == "function") return n ?
|
|
326
|
+
if (r && r.links && typeof t == "function") return n ? P(r.links, e, t) : N(r.links, e, t);
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function N(e, n, r) {
|
|
329
329
|
for (var i, a = 0; a < e.length; ++a) {
|
|
330
330
|
var o = e[a], s = o.fromId === n ? o.toId : o.fromId;
|
|
331
331
|
if (i = r(t.get(s), o), i) return !0;
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function P(e, n, r) {
|
|
335
335
|
for (var i, a = 0; a < e.length; ++a) {
|
|
336
336
|
var o = e[a];
|
|
337
337
|
if (o.fromId === n && (i = r(t.get(o.toId), o), i)) return !0;
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
function
|
|
341
|
-
function
|
|
340
|
+
function F() {}
|
|
341
|
+
function ne() {
|
|
342
342
|
u += 1;
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function re() {
|
|
345
345
|
--u, u === 0 && f.length > 0 && (_.fire("changed", f), f.length = 0);
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function I(e) {
|
|
348
348
|
if (typeof e != "function") throw Error("Function is expected to iterate over graph nodes. You passed " + e);
|
|
349
349
|
for (var n = t.values(), r = n.next(); !r.done;) {
|
|
350
350
|
if (e(r.value)) return !0;
|
|
@@ -371,28 +371,28 @@ var se = /* @__PURE__ */ t(((e, t) => {
|
|
|
371
371
|
function c(e, t) {
|
|
372
372
|
return e.toString() + "👉 " + t.toString();
|
|
373
373
|
}
|
|
374
|
-
})))(), 1),
|
|
374
|
+
})))(), 1), R = (e) => {
|
|
375
375
|
var t;
|
|
376
376
|
return `${(t = e.layer) == null ? "" : t}_${e.x}_${e.y}`;
|
|
377
|
-
},
|
|
377
|
+
}, ue = 1, z = (e, t) => {
|
|
378
378
|
var n, r;
|
|
379
|
-
return ((n = e.layer) == null ? "" : n) === ((r = t.layer) == null ? "" : r) && _(e, t) <=
|
|
380
|
-
},
|
|
381
|
-
function
|
|
382
|
-
return e.find((e) =>
|
|
379
|
+
return ((n = e.layer) == null ? "" : n) === ((r = t.layer) == null ? "" : r) && _(e, t) <= ue;
|
|
380
|
+
}, de = (e, t, n) => z(e.p0, t) && z(e.p1, n) || z(e.p0, n) && z(e.p1, t);
|
|
381
|
+
function fe(e, t, n) {
|
|
382
|
+
return e.find((e) => de(e, t, n));
|
|
383
383
|
}
|
|
384
|
-
var
|
|
385
|
-
function
|
|
384
|
+
var pe = m(5);
|
|
385
|
+
function me(e, t) {
|
|
386
386
|
if (e.virtual !== t.virtual) return !1;
|
|
387
|
-
let n =
|
|
388
|
-
return i > Math.PI && (i = 2 * Math.PI - i), i <=
|
|
387
|
+
let n = N(e.p0, e.p1), r = N(t.p0, t.p1), i = Math.abs(r - n);
|
|
388
|
+
return i > Math.PI && (i = 2 * Math.PI - i), i <= pe;
|
|
389
389
|
}
|
|
390
|
-
function
|
|
390
|
+
function he(e, t) {
|
|
391
391
|
let n = [];
|
|
392
392
|
for (let r = 1; r < e.length; r++) {
|
|
393
|
-
let i = e[r - 1], a = e[r], o =
|
|
393
|
+
let i = e[r - 1], a = e[r], o = fe(t, i, a);
|
|
394
394
|
if (!o) {
|
|
395
|
-
console.warn(`WF: buildRouteSegments — no line found between ${
|
|
395
|
+
console.warn(`WF: buildRouteSegments — no line found between ${R(i)} and ${R(a)}`);
|
|
396
396
|
continue;
|
|
397
397
|
}
|
|
398
398
|
let s = {
|
|
@@ -400,7 +400,7 @@ function me(e, t) {
|
|
|
400
400
|
p1: a,
|
|
401
401
|
virtual: o.virtual
|
|
402
402
|
}, c = n[n.length - 1];
|
|
403
|
-
c &&
|
|
403
|
+
c && me(c, s) ? n[n.length - 1] = {
|
|
404
404
|
...c,
|
|
405
405
|
p1: s.p1
|
|
406
406
|
} : n.push(s);
|
|
@@ -409,79 +409,79 @@ function me(e, t) {
|
|
|
409
409
|
}
|
|
410
410
|
//#endregion
|
|
411
411
|
//#region ../wayfinding/src/core/graph/constants.ts
|
|
412
|
-
var
|
|
412
|
+
var ge = 1e4, _e = 1.01;
|
|
413
413
|
//#endregion
|
|
414
414
|
//#region ../wayfinding/src/core/graph/linkCost.ts
|
|
415
|
-
function
|
|
415
|
+
function ve(e) {
|
|
416
416
|
return _(e.p0, e.p1) / (e.weight || 4);
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function ye(e) {
|
|
419
419
|
var t, n;
|
|
420
420
|
return ((t = e.p0.layer) == null ? "" : t) !== ((n = e.p1.layer) == null ? "" : n);
|
|
421
421
|
}
|
|
422
|
-
function
|
|
423
|
-
return e.virtual ? e.virtualLength == null ?
|
|
422
|
+
function be(e) {
|
|
423
|
+
return e.virtual ? e.virtualLength == null ? ye(e) ? ge : 0 : e.virtualLength : ve(e);
|
|
424
424
|
}
|
|
425
425
|
//#endregion
|
|
426
426
|
//#region ../wayfinding/src/core/graph/buildNGraph.ts
|
|
427
|
-
function
|
|
428
|
-
let { oriented: n, onlyAccessible: r } = t, i = (0,
|
|
427
|
+
function xe(e, t) {
|
|
428
|
+
let { oriented: n, onlyAccessible: r } = t, i = (0, le.default)();
|
|
429
429
|
for (let t of e) {
|
|
430
430
|
if (r && t.unaccessible) continue;
|
|
431
|
-
let e =
|
|
431
|
+
let e = R(t.p0), a = R(t.p1), o = be(t);
|
|
432
432
|
i.addLink(e, a, { distance: o }), n && !t.unidirection && i.addLink(a, e, { distance: o });
|
|
433
433
|
}
|
|
434
434
|
return i;
|
|
435
435
|
}
|
|
436
436
|
//#endregion
|
|
437
437
|
//#region ../wayfinding/src/core/graph/utils/a-star/defaultSettings.js
|
|
438
|
-
var
|
|
439
|
-
typeof Object.freeze == "function" && Object.freeze(
|
|
440
|
-
var
|
|
441
|
-
heuristic:
|
|
442
|
-
distance:
|
|
443
|
-
blocked:
|
|
444
|
-
compareFScore:
|
|
445
|
-
NO_PATH:
|
|
446
|
-
setHeapIndex:
|
|
447
|
-
setH1:
|
|
448
|
-
setH2:
|
|
449
|
-
compareF1Score:
|
|
450
|
-
compareF2Score:
|
|
438
|
+
var Se = [];
|
|
439
|
+
typeof Object.freeze == "function" && Object.freeze(Se);
|
|
440
|
+
var B = {
|
|
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
451
|
};
|
|
452
|
-
function
|
|
452
|
+
function Ce() {
|
|
453
453
|
return 0;
|
|
454
454
|
}
|
|
455
|
-
function
|
|
455
|
+
function we() {
|
|
456
456
|
return 1;
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function Te() {
|
|
459
459
|
return !1;
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function Ee(e, t) {
|
|
462
462
|
return e.fScore - t.fScore;
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function De(e, t) {
|
|
465
465
|
e.heapIndex = t;
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function Oe(e, t) {
|
|
468
468
|
return e.f1 - t.f1;
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function ke(e, t) {
|
|
471
471
|
return e.f2 - t.f2;
|
|
472
472
|
}
|
|
473
|
-
function
|
|
473
|
+
function Ae(e, t) {
|
|
474
474
|
e.h1 = t;
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function je(e, t) {
|
|
477
477
|
e.h2 = t;
|
|
478
478
|
}
|
|
479
479
|
//#endregion
|
|
480
480
|
//#region ../wayfinding/src/core/graph/utils/a-star/makeSearchStatePool.js
|
|
481
|
-
function
|
|
481
|
+
function Me(e) {
|
|
482
482
|
this.node = e, this.parent = null, this.closed = !1, this.open = 0, this.distanceToSource = Infinity, this.fScore = Infinity, this.heapIndex = -1;
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function Ne() {
|
|
485
485
|
let e = 0, t = [];
|
|
486
486
|
return {
|
|
487
487
|
createNewState: r,
|
|
@@ -492,21 +492,21 @@ function Me() {
|
|
|
492
492
|
}
|
|
493
493
|
function r(n) {
|
|
494
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
|
|
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
496
|
}
|
|
497
497
|
}
|
|
498
498
|
//#endregion
|
|
499
499
|
//#region ../wayfinding/src/core/graph/utils/a-star/NodeHeap.js
|
|
500
|
-
function
|
|
501
|
-
if (!(this instanceof
|
|
502
|
-
if (Array.isArray(e) || (t = e, e = []), t = t || {}, this.data = e || [], this.length = this.data.length, this.compare = t.compare ||
|
|
500
|
+
function V(e, t) {
|
|
501
|
+
if (!(this instanceof V)) return new V(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
503
|
if (t.setNodeId) for (let e = 0; e < this.length; ++e) this.setNodeId(this.data[e], e);
|
|
504
504
|
}
|
|
505
|
-
function
|
|
506
|
-
function
|
|
505
|
+
function Pe() {}
|
|
506
|
+
function Fe(e, t) {
|
|
507
507
|
return e - t;
|
|
508
508
|
}
|
|
509
|
-
|
|
509
|
+
V.prototype = {
|
|
510
510
|
push: function(e) {
|
|
511
511
|
this.data.push(e), this.setNodeId(e, this.length), this.length++, this._up(this.length - 1);
|
|
512
512
|
},
|
|
@@ -542,16 +542,16 @@ H.prototype = {
|
|
|
542
542
|
};
|
|
543
543
|
//#endregion
|
|
544
544
|
//#region ../wayfinding/src/core/graph/utils/a-star/a-star.js
|
|
545
|
-
var
|
|
546
|
-
function
|
|
545
|
+
var Ie = B.NO_PATH;
|
|
546
|
+
function Le(e, t) {
|
|
547
547
|
t = t || {};
|
|
548
548
|
let n = t.oriented, r = t.blocked;
|
|
549
|
-
r || (r =
|
|
549
|
+
r || (r = B.blocked);
|
|
550
550
|
let i = t.heuristic;
|
|
551
|
-
i || (i =
|
|
551
|
+
i || (i = B.heuristic);
|
|
552
552
|
let a = t.distance;
|
|
553
|
-
a || (a =
|
|
554
|
-
let o =
|
|
553
|
+
a || (a = B.distance);
|
|
554
|
+
let o = Ne();
|
|
555
555
|
return { find: s };
|
|
556
556
|
function s(t, s) {
|
|
557
557
|
let c = e.getNode(t);
|
|
@@ -559,17 +559,17 @@ function Ie(e, t) {
|
|
|
559
559
|
let l = e.getNode(s);
|
|
560
560
|
if (!l) throw Error("toId is not defined in this graph: " + s);
|
|
561
561
|
o.reset();
|
|
562
|
-
let u = /* @__PURE__ */ new Map(), d = new
|
|
563
|
-
compare:
|
|
564
|
-
setNodeId:
|
|
562
|
+
let u = /* @__PURE__ */ new Map(), d = new V({
|
|
563
|
+
compare: B.compareFScore,
|
|
564
|
+
setNodeId: B.setHeapIndex
|
|
565
565
|
}), f = o.createNewState(c);
|
|
566
566
|
u.set(t, f), f.fScore = i(c, l), f.distanceToSource = 0, d.push(f), f.open = 1;
|
|
567
567
|
let p;
|
|
568
568
|
for (; d.length > 0;) {
|
|
569
|
-
if (p = d.pop(),
|
|
569
|
+
if (p = d.pop(), Re(p, l)) return ze(p);
|
|
570
570
|
p.closed = !0, e.forEachLinkedNode(p.node.id, m, n);
|
|
571
571
|
}
|
|
572
|
-
return
|
|
572
|
+
return Ie;
|
|
573
573
|
function m(e, t) {
|
|
574
574
|
let n = u.get(e.id);
|
|
575
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;
|
|
@@ -578,17 +578,17 @@ function Ie(e, t) {
|
|
|
578
578
|
}
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
-
function
|
|
581
|
+
function Re(e, t) {
|
|
582
582
|
return e.node === t;
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function ze(e) {
|
|
585
585
|
let t = [e.node], n = e.parent;
|
|
586
586
|
for (; n;) t.push(n.node), n = n.parent;
|
|
587
587
|
return t;
|
|
588
588
|
}
|
|
589
589
|
//#endregion
|
|
590
590
|
//#region ../wayfinding/src/core/graph/pathfinder/parseNodeId.ts
|
|
591
|
-
function
|
|
591
|
+
function H(e) {
|
|
592
592
|
let t = e.lastIndexOf("_"), n = e.lastIndexOf("_", t - 1);
|
|
593
593
|
if (n === -1) throw Error(`WF: invalid node ID format "${e}", expected "{layer}_{x}_{y}"`);
|
|
594
594
|
return [
|
|
@@ -599,35 +599,35 @@ function U(e) {
|
|
|
599
599
|
}
|
|
600
600
|
//#endregion
|
|
601
601
|
//#region ../wayfinding/src/core/graph/pathfinder/aStarPathFinder.ts
|
|
602
|
-
function
|
|
602
|
+
function Be() {
|
|
603
603
|
return function(e, t, n) {
|
|
604
604
|
let r = 1;
|
|
605
605
|
if (t.parent) {
|
|
606
|
-
let [, n, i] =
|
|
607
|
-
|
|
606
|
+
let [, n, i] = H(t.parent.node.id), [, a, o] = H(t.node.id), [, s, c] = H(e.id);
|
|
607
|
+
N({
|
|
608
608
|
x: n,
|
|
609
609
|
y: i
|
|
610
610
|
}, {
|
|
611
611
|
x: a,
|
|
612
612
|
y: o
|
|
613
|
-
}) !==
|
|
613
|
+
}) !== N({
|
|
614
614
|
x: a,
|
|
615
615
|
y: o
|
|
616
616
|
}, {
|
|
617
617
|
x: s,
|
|
618
618
|
y: c
|
|
619
|
-
}) && (r =
|
|
619
|
+
}) && (r = _e);
|
|
620
620
|
}
|
|
621
621
|
return r * n.data.distance;
|
|
622
622
|
};
|
|
623
623
|
}
|
|
624
|
-
function
|
|
624
|
+
function Ve() {
|
|
625
625
|
let e = null, t = null;
|
|
626
626
|
return {
|
|
627
627
|
build(n, r) {
|
|
628
|
-
t =
|
|
628
|
+
t = xe(n, r), e = Le(t, {
|
|
629
629
|
oriented: r.oriented,
|
|
630
|
-
distance:
|
|
630
|
+
distance: Be()
|
|
631
631
|
});
|
|
632
632
|
},
|
|
633
633
|
hasNode(e) {
|
|
@@ -637,7 +637,7 @@ function Be() {
|
|
|
637
637
|
if (!e) return [];
|
|
638
638
|
let r = e.find(t, n);
|
|
639
639
|
return r.length ? r.map((e) => {
|
|
640
|
-
let [t, n, r] =
|
|
640
|
+
let [t, n, r] = H(e.id);
|
|
641
641
|
return {
|
|
642
642
|
id: e.id,
|
|
643
643
|
layer: t,
|
|
@@ -650,10 +650,10 @@ function Be() {
|
|
|
650
650
|
}
|
|
651
651
|
//#endregion
|
|
652
652
|
//#region ../wayfinding/src/core/graph/graphCache.ts
|
|
653
|
-
function
|
|
653
|
+
function He() {
|
|
654
654
|
let e = null, t = !1;
|
|
655
655
|
return { getOrBuild(n, r) {
|
|
656
|
-
return e && t === r ? e : (e =
|
|
656
|
+
return e && t === r ? e : (e = se(n, Ve(), {
|
|
657
657
|
oriented: !0,
|
|
658
658
|
onlyAccessible: r
|
|
659
659
|
}), t = r, e);
|
|
@@ -661,71 +661,71 @@ function Ve() {
|
|
|
661
661
|
}
|
|
662
662
|
//#endregion
|
|
663
663
|
//#region ../wayfinding/src/core/routing/getRouteLength.ts
|
|
664
|
-
function
|
|
664
|
+
function U(e) {
|
|
665
665
|
return e.reduce((e, t) => e + _(t.p0, t.p1), 0);
|
|
666
666
|
}
|
|
667
667
|
//#endregion
|
|
668
668
|
//#region ../wayfinding/src/core/graph/findShortestPath.ts
|
|
669
|
-
function
|
|
669
|
+
function Ue(e, t, n) {
|
|
670
670
|
return {
|
|
671
671
|
layer: e,
|
|
672
672
|
x: t,
|
|
673
673
|
y: n
|
|
674
674
|
};
|
|
675
675
|
}
|
|
676
|
-
function
|
|
676
|
+
function We(e, t) {
|
|
677
677
|
let n = 0;
|
|
678
678
|
for (let r = 1; r < e.length; r++) {
|
|
679
|
-
let i =
|
|
680
|
-
i && (n +=
|
|
679
|
+
let i = fe(t, e[r - 1], e[r]);
|
|
680
|
+
i && (n += be(i));
|
|
681
681
|
}
|
|
682
682
|
return n;
|
|
683
683
|
}
|
|
684
|
-
function
|
|
684
|
+
function Ge(e, t, n) {
|
|
685
685
|
let r = e.dataSource.getLines(), i = null, a = Infinity;
|
|
686
686
|
for (let o of t) for (let t of n) {
|
|
687
|
-
let n =
|
|
687
|
+
let n = R(o), s = R(t);
|
|
688
688
|
if (!e.finder.hasNode(n) || !e.finder.hasNode(s)) {
|
|
689
689
|
console.debug(`WF. findShortestPath: node not in graph, skipping pair ${n} → ${s}`);
|
|
690
690
|
continue;
|
|
691
691
|
}
|
|
692
692
|
let c = e.finder.find(n, s);
|
|
693
693
|
if (!c.length) continue;
|
|
694
|
-
let l = c.map((e) =>
|
|
694
|
+
let l = c.map((e) => Ue(e.layer, e.x, e.y)), u = he(l, r);
|
|
695
695
|
if (!u.length) continue;
|
|
696
|
-
let d =
|
|
696
|
+
let d = We(l, r);
|
|
697
697
|
d < a && (a = d, i = {
|
|
698
698
|
lines: u,
|
|
699
|
-
distance:
|
|
699
|
+
distance: U(u)
|
|
700
700
|
});
|
|
701
701
|
}
|
|
702
702
|
return i;
|
|
703
703
|
}
|
|
704
704
|
//#endregion
|
|
705
705
|
//#region ../wayfinding/src/core/routing/routeResult.ts
|
|
706
|
-
var
|
|
706
|
+
var W = () => ({
|
|
707
707
|
lines: [],
|
|
708
708
|
totalDistance: 0
|
|
709
709
|
});
|
|
710
710
|
//#endregion
|
|
711
711
|
//#region ../wayfinding/src/core/routing/buildRoute.ts
|
|
712
|
-
function
|
|
713
|
-
if (!t.length || !n.length) return
|
|
714
|
-
let r =
|
|
712
|
+
function Ke(e, t, n) {
|
|
713
|
+
if (!t.length || !n.length) return W();
|
|
714
|
+
let r = Ge(e, t, n);
|
|
715
715
|
return r ? {
|
|
716
716
|
lines: r.lines,
|
|
717
717
|
totalDistance: r.distance
|
|
718
|
-
} :
|
|
718
|
+
} : W();
|
|
719
719
|
}
|
|
720
720
|
//#endregion
|
|
721
721
|
//#region ../wayfinding/src/core/routing/buildMultiPointRoute.ts
|
|
722
|
-
function
|
|
723
|
-
if (t.length < 2) return
|
|
722
|
+
function qe(e, t) {
|
|
723
|
+
if (t.length < 2) return W();
|
|
724
724
|
let n = t.filter((e, n) => n === 0 || n === t.length - 1 || e.length > 0);
|
|
725
|
-
if (n.length < 2) return
|
|
726
|
-
if (n.length === 2) return
|
|
725
|
+
if (n.length < 2) return W();
|
|
726
|
+
if (n.length === 2) return Ke(e, n[0], n[1]);
|
|
727
727
|
let r = [];
|
|
728
|
-
for (let t = 0; t < n.length - 1; t++) r.push(
|
|
728
|
+
for (let t = 0; t < n.length - 1; t++) r.push(Ke(e, n[t], n[t + 1]));
|
|
729
729
|
return {
|
|
730
730
|
lines: r.flatMap((e) => e.lines),
|
|
731
731
|
totalDistance: r.reduce((e, t) => e + t.totalDistance, 0)
|
|
@@ -733,26 +733,26 @@ function Ke(e, t) {
|
|
|
733
733
|
}
|
|
734
734
|
//#endregion
|
|
735
735
|
//#region ../wayfinding/src/core/routing/optimizeWaypointOrder.ts
|
|
736
|
-
var
|
|
737
|
-
function
|
|
736
|
+
var Je = 100, Ye = -.01;
|
|
737
|
+
function Xe(e) {
|
|
738
738
|
let t = new Map(e), n = Array.from(t.keys());
|
|
739
739
|
if (n.length <= 2) return n;
|
|
740
|
-
let r =
|
|
741
|
-
return r.length < 4 ? r :
|
|
740
|
+
let r = Qe(n, t);
|
|
741
|
+
return r.length < 4 ? r : $e(r, t);
|
|
742
742
|
}
|
|
743
|
-
function
|
|
743
|
+
function Ze(e) {
|
|
744
744
|
if (e.length <= 3) return e;
|
|
745
745
|
let t = e[0], n = e[e.length - 1], r = e.slice(1, -1);
|
|
746
746
|
return [
|
|
747
747
|
t,
|
|
748
|
-
...
|
|
748
|
+
...Xe(r.map((e, t) => [String(t), {
|
|
749
749
|
x: e.x,
|
|
750
750
|
y: e.y
|
|
751
751
|
}])).map((e) => r[Number(e)]),
|
|
752
752
|
n
|
|
753
753
|
];
|
|
754
754
|
}
|
|
755
|
-
function
|
|
755
|
+
function Qe(e, t) {
|
|
756
756
|
let n = [e[0]], r = new Set(e), i = e[0];
|
|
757
757
|
for (r.delete(e[0]); r.size > 0;) {
|
|
758
758
|
let e = t.get(i), a = "", o = Infinity;
|
|
@@ -765,13 +765,13 @@ function Ze(e, t) {
|
|
|
765
765
|
}
|
|
766
766
|
return n;
|
|
767
767
|
}
|
|
768
|
-
function
|
|
768
|
+
function $e(e, t) {
|
|
769
769
|
let n = [...e], r = !0;
|
|
770
|
-
for (let e = 0; r && e <
|
|
770
|
+
for (let e = 0; r && e < Je; e++) {
|
|
771
771
|
r = !1;
|
|
772
772
|
scan: for (let e = 1; e < n.length - 2; e++) for (let i = e + 1; i < n.length - 1; i++) {
|
|
773
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)) <
|
|
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
775
|
for (let t = e, r = i; t < r; t++, r--) [n[t], n[r]] = [n[r], n[t]];
|
|
776
776
|
r = !0;
|
|
777
777
|
break scan;
|
|
@@ -782,8 +782,8 @@ function Qe(e, t) {
|
|
|
782
782
|
}
|
|
783
783
|
//#endregion
|
|
784
784
|
//#region ../wayfinding/src/core/geometry/projectPointOnSegment.ts
|
|
785
|
-
function
|
|
786
|
-
let { projected: r, distance: i, t: a } =
|
|
785
|
+
function et(e, t, n) {
|
|
786
|
+
let { projected: r, distance: i, t: a } = P({
|
|
787
787
|
p0: t,
|
|
788
788
|
p1: n
|
|
789
789
|
}, e);
|
|
@@ -798,40 +798,40 @@ function $e(e, t, n) {
|
|
|
798
798
|
}
|
|
799
799
|
//#endregion
|
|
800
800
|
//#region ../wayfinding/src/core/geometry/pointInPolygon.ts
|
|
801
|
-
var
|
|
802
|
-
function
|
|
801
|
+
var tt = .01;
|
|
802
|
+
function nt(e, t, n) {
|
|
803
803
|
return Math.abs(.5 * (e.x * (t.y - n.y) + t.x * (n.y - e.y) + n.x * (e.y - t.y)));
|
|
804
804
|
}
|
|
805
|
-
function
|
|
805
|
+
function rt(e) {
|
|
806
806
|
if (e.length < 3) return 0;
|
|
807
807
|
let t = 0;
|
|
808
|
-
for (let n = 1; n < e.length - 1; n++) t +=
|
|
808
|
+
for (let n = 1; n < e.length - 1; n++) t += nt(e[0], e[n], e[n + 1]);
|
|
809
809
|
return t;
|
|
810
810
|
}
|
|
811
|
-
function
|
|
811
|
+
function it(e, t, n = rt(t)) {
|
|
812
812
|
if (n === 0) return !1;
|
|
813
813
|
let r = 0;
|
|
814
|
-
for (let n = 0, i = t.length - 1; n < t.length; i = n++) r +=
|
|
815
|
-
return Math.abs(n - r) < n *
|
|
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
816
|
}
|
|
817
817
|
//#endregion
|
|
818
818
|
//#region ../wayfinding/src/core/routing/graphPointResolvers.ts
|
|
819
|
-
function
|
|
820
|
-
let r =
|
|
821
|
-
return e.getLineEnds().filter((e) => (!n || e.layer === n) &&
|
|
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
822
|
}
|
|
823
823
|
//#endregion
|
|
824
824
|
//#region ../wayfinding/src/core/routing/resolveWaypointCandidates.ts
|
|
825
|
-
function
|
|
825
|
+
function ot(e, t) {
|
|
826
826
|
var n;
|
|
827
827
|
if ((n = t.bounds) != null && n.length) return {
|
|
828
|
-
candidates:
|
|
828
|
+
candidates: at(e.dataSource, t.bounds, t.layer),
|
|
829
829
|
offGraphEntry: null
|
|
830
830
|
};
|
|
831
831
|
let r = null, i = Infinity;
|
|
832
832
|
for (let n of e.dataSource.getLines()) {
|
|
833
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 =
|
|
834
|
+
let e = et(t, n.p0, n.p1);
|
|
835
835
|
e.distance < i && (i = e.distance, r = {
|
|
836
836
|
segment: n,
|
|
837
837
|
proj: e
|
|
@@ -862,11 +862,11 @@ function at(e, t) {
|
|
|
862
862
|
}
|
|
863
863
|
//#endregion
|
|
864
864
|
//#region ../wayfinding/src/core/createWayfindingEngine.ts
|
|
865
|
-
var
|
|
866
|
-
function
|
|
865
|
+
var st = 1e-6, G = (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
867
|
if (!e.length) return e;
|
|
868
|
-
let n = e[0], r = n.p0, i =
|
|
869
|
-
return
|
|
868
|
+
let n = e[0], r = n.p0, i = G(t.segment.p0, r) ? t.segment.p1 : t.segment.p0;
|
|
869
|
+
return G(n.p1, i) ? [{
|
|
870
870
|
...n,
|
|
871
871
|
p0: t.projection
|
|
872
872
|
}, ...e.slice(1)] : [{
|
|
@@ -875,10 +875,10 @@ function st(e, t) {
|
|
|
875
875
|
p1: r
|
|
876
876
|
}, ...e];
|
|
877
877
|
}
|
|
878
|
-
function
|
|
878
|
+
function lt(e, t) {
|
|
879
879
|
if (!e.length) return e;
|
|
880
|
-
let n = e[e.length - 1], r = n.p1, i =
|
|
881
|
-
return
|
|
880
|
+
let n = e[e.length - 1], r = n.p1, i = G(t.segment.p0, r) ? t.segment.p1 : t.segment.p0;
|
|
881
|
+
return G(n.p0, i) ? [...e.slice(0, -1), {
|
|
882
882
|
...n,
|
|
883
883
|
p1: t.projection
|
|
884
884
|
}] : [...e, {
|
|
@@ -887,19 +887,19 @@ function ct(e, t) {
|
|
|
887
887
|
p1: t.projection
|
|
888
888
|
}];
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function ut(e, t, n) {
|
|
891
891
|
let r = e;
|
|
892
|
-
return t && (r =
|
|
892
|
+
return t && (r = ct(r, t)), n && (r = lt(r, n)), r;
|
|
893
893
|
}
|
|
894
|
-
function
|
|
895
|
-
let t =
|
|
894
|
+
function dt(e) {
|
|
895
|
+
let t = He();
|
|
896
896
|
return {
|
|
897
897
|
buildRoute(n, r, i) {
|
|
898
898
|
var a;
|
|
899
|
-
let o = t.getOrBuild(e, (a = i == null ? void 0 : i.accessible) != null && a), s =
|
|
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
900
|
return {
|
|
901
901
|
lines: d,
|
|
902
|
-
distance: u ?
|
|
902
|
+
distance: u ? U(d) : l.totalDistance
|
|
903
903
|
};
|
|
904
904
|
},
|
|
905
905
|
buildWaypointsRoute(n, r) {
|
|
@@ -908,18 +908,18 @@ function ut(e) {
|
|
|
908
908
|
lines: [],
|
|
909
909
|
distance: 0
|
|
910
910
|
};
|
|
911
|
-
let a = t.getOrBuild(e, (i = r == null ? void 0 : r.accessible) != null && i), o = (r != null && r.fastest ?
|
|
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
912
|
return {
|
|
913
913
|
lines: d,
|
|
914
|
-
distance: u ?
|
|
914
|
+
distance: u ? U(d) : s.totalDistance
|
|
915
915
|
};
|
|
916
916
|
}
|
|
917
917
|
};
|
|
918
918
|
}
|
|
919
919
|
//#endregion
|
|
920
920
|
//#region ../wayfinding/src/core/rendering/computeTrailPoints.ts
|
|
921
|
-
var
|
|
922
|
-
function
|
|
921
|
+
var ft = .4, pt = 8;
|
|
922
|
+
function mt(e, t, n = pt, r = ft) {
|
|
923
923
|
let i = _(t, e);
|
|
924
924
|
if (i === 0 || n <= 0) return [];
|
|
925
925
|
let a = Math.max(Math.ceil(i / n) + 1, 2), o = {
|
|
@@ -928,11 +928,11 @@ function pt(e, t, n = ft, r = dt) {
|
|
|
928
928
|
}, s = [];
|
|
929
929
|
for (let n = 0; n < a; n++) {
|
|
930
930
|
let r = n / (a - 1);
|
|
931
|
-
s.push(
|
|
931
|
+
s.push(ht(e, o, t, r));
|
|
932
932
|
}
|
|
933
933
|
return s;
|
|
934
934
|
}
|
|
935
|
-
function
|
|
935
|
+
function ht(e, t, n, r) {
|
|
936
936
|
let i = 1 - r;
|
|
937
937
|
return {
|
|
938
938
|
x: i * i * e.x + 2 * i * r * t.x + r * r * n.x,
|
|
@@ -941,36 +941,36 @@ function mt(e, t, n, r) {
|
|
|
941
941
|
}
|
|
942
942
|
//#endregion
|
|
943
943
|
//#region ../wayfinding/src/core/rendering/computeTransitionPoints.ts
|
|
944
|
-
function
|
|
944
|
+
function K(e, t) {
|
|
945
945
|
return e.toLowerCase() === t.toLowerCase();
|
|
946
946
|
}
|
|
947
|
-
function
|
|
948
|
-
return e.findIndex((e) =>
|
|
947
|
+
function gt(e, t) {
|
|
948
|
+
return e.findIndex((e) => K(e, t));
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
let r =
|
|
950
|
+
function _t(e, t, n) {
|
|
951
|
+
let r = gt(e, t), i = gt(e, n);
|
|
952
952
|
return r === -1 || i === -1 ? "neutral" : i > r ? "up" : "down";
|
|
953
953
|
}
|
|
954
|
-
function
|
|
955
|
-
return e.find((e) =>
|
|
954
|
+
function vt(e, t, n) {
|
|
955
|
+
return e.find((e) => K(e.p0.layer, t) ? !n.has(e.p1.layer.toLowerCase()) : K(e.p1.layer, t) ? !n.has(e.p0.layer.toLowerCase()) : !1);
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function yt(e, t, n, r) {
|
|
958
958
|
if (t.has(r.toLowerCase())) return r;
|
|
959
|
-
let i = r, a = /* @__PURE__ */ new Set([n.toLowerCase(), i.toLowerCase()]), o =
|
|
960
|
-
for (; o && (i =
|
|
959
|
+
let i = r, a = /* @__PURE__ */ new Set([n.toLowerCase(), i.toLowerCase()]), o = vt(e, i, a);
|
|
960
|
+
for (; o && (i = K(o.p0.layer, i) ? o.p1.layer : o.p0.layer, !t.has(i.toLowerCase()));) a.add(i.toLowerCase()), o = vt(e, i, a);
|
|
961
961
|
return i;
|
|
962
962
|
}
|
|
963
|
-
function
|
|
964
|
-
let { routeLines: t, currentLayerName: n, floorOrder: r } = e, i = t.filter((e) => e.virtual && !
|
|
963
|
+
function bt(e) {
|
|
964
|
+
let { routeLines: t, currentLayerName: n, floorOrder: r } = e, i = t.filter((e) => e.virtual && !K(e.p0.layer, e.p1.layer)), a = /* @__PURE__ */ new Set();
|
|
965
965
|
for (let e of t) e.virtual || (a.add(e.p0.layer.toLowerCase()), a.add(e.p1.layer.toLowerCase()));
|
|
966
|
-
let o = (n ? i.filter((e) =>
|
|
967
|
-
let t = !n ||
|
|
966
|
+
let o = (n ? i.filter((e) => K(e.p0.layer, n) || K(e.p1.layer, n)) : i).map((e) => {
|
|
967
|
+
let t = !n || K(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
968
|
return {
|
|
969
969
|
x: o.x,
|
|
970
970
|
y: o.y,
|
|
971
971
|
layer: o.layer,
|
|
972
972
|
targetLayer: c,
|
|
973
|
-
direction:
|
|
973
|
+
direction: _t(r, o.layer, c),
|
|
974
974
|
role: n ? t ? "exit" : "entry" : "exit"
|
|
975
975
|
};
|
|
976
976
|
}), s = new Set(o.filter((e) => e.role === "exit").map((e) => `${e.x}:${e.y}`)), c = /* @__PURE__ */ new Set();
|
|
@@ -981,35 +981,35 @@ function yt(e) {
|
|
|
981
981
|
}
|
|
982
982
|
//#endregion
|
|
983
983
|
//#region ../wayfinding/src/core/rendering/routeGeometry.ts
|
|
984
|
-
function
|
|
984
|
+
function xt(e) {
|
|
985
985
|
return f.fromPoints(e);
|
|
986
986
|
}
|
|
987
987
|
//#endregion
|
|
988
988
|
//#region ../wayfinding/src/core/position/gpsThreshold.ts
|
|
989
|
-
var
|
|
990
|
-
function
|
|
989
|
+
var St = 7.5, Ct = 15, wt = 20;
|
|
990
|
+
function Tt(e, t) {
|
|
991
991
|
let { p0: n, p2: r } = t, i = O(n, r), a = _(n, r);
|
|
992
992
|
return !i || !a ? 0 : a / i * e;
|
|
993
993
|
}
|
|
994
|
-
var
|
|
994
|
+
var Et = (e) => {
|
|
995
995
|
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
996
|
-
},
|
|
997
|
-
let n =
|
|
996
|
+
}, Dt = (e, t) => {
|
|
997
|
+
let n = Et(e);
|
|
998
998
|
return n === void 0 || n === 0 ? t : n;
|
|
999
999
|
};
|
|
1000
|
-
function
|
|
1000
|
+
function Ot({ thresholdInMeters: e, gpsConfig: t }) {
|
|
1001
1001
|
let n = 0;
|
|
1002
|
-
return e && t && (n =
|
|
1002
|
+
return e && t && (n = Tt(e, t)), n || (n = wt), n;
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1005
|
-
return
|
|
1006
|
-
thresholdInMeters:
|
|
1004
|
+
function kt(e) {
|
|
1005
|
+
return Ot({
|
|
1006
|
+
thresholdInMeters: Dt(e == null ? void 0 : e.rerouteThreshold, Ct),
|
|
1007
1007
|
gpsConfig: e
|
|
1008
1008
|
});
|
|
1009
1009
|
}
|
|
1010
1010
|
//#endregion
|
|
1011
1011
|
//#region ../wayfinding/src/core/position/distanceToRoute.ts
|
|
1012
|
-
function
|
|
1012
|
+
function At(e, t, n, r, i, a) {
|
|
1013
1013
|
let o = i - n, s = a - r, c = e - n, l = t - r, u = o * o + s * s;
|
|
1014
1014
|
if (u === 0) return _({
|
|
1015
1015
|
x: e,
|
|
@@ -1029,27 +1029,27 @@ function kt(e, t, n, r, i, a) {
|
|
|
1029
1029
|
y: p
|
|
1030
1030
|
});
|
|
1031
1031
|
}
|
|
1032
|
-
function
|
|
1032
|
+
function jt(e, t) {
|
|
1033
1033
|
let n = Infinity;
|
|
1034
1034
|
for (let r of t) {
|
|
1035
1035
|
if (e.layer && (r.p0.layer !== e.layer || r.p1.layer !== e.layer)) continue;
|
|
1036
|
-
let t =
|
|
1036
|
+
let t = At(e.x, e.y, r.p0.x, r.p0.y, r.p1.x, r.p1.y);
|
|
1037
1037
|
t < n && (n = t);
|
|
1038
1038
|
}
|
|
1039
1039
|
return n;
|
|
1040
1040
|
}
|
|
1041
1041
|
//#endregion
|
|
1042
1042
|
//#region ../wayfinding/src/core/position/rerouteController.ts
|
|
1043
|
-
function
|
|
1043
|
+
function Mt(e) {
|
|
1044
1044
|
return { shouldReroute(t, n) {
|
|
1045
1045
|
if (!n.length) return !1;
|
|
1046
1046
|
let r = t.layer;
|
|
1047
|
-
return r && !n.some((e) => e.p0.layer === r && e.p1.layer === r) ? !0 :
|
|
1047
|
+
return r && !n.some((e) => e.p0.layer === r && e.p1.layer === r) ? !0 : jt(t, n) > e;
|
|
1048
1048
|
} };
|
|
1049
1049
|
}
|
|
1050
1050
|
//#endregion
|
|
1051
1051
|
//#region ../wayfinding/src/core/position/snapToRoute.ts
|
|
1052
|
-
function
|
|
1052
|
+
function Nt(e, t, { snapThreshold: n }) {
|
|
1053
1053
|
let r = t.length;
|
|
1054
1054
|
if (!r) return { snapped: !1 };
|
|
1055
1055
|
let i = e.layer || null, a = Infinity, o = null, s = 0, c = i == null;
|
|
@@ -1061,7 +1061,7 @@ function Mt(e, t, { snapThreshold: n }) {
|
|
|
1061
1061
|
continue;
|
|
1062
1062
|
}
|
|
1063
1063
|
c = !0;
|
|
1064
|
-
let f =
|
|
1064
|
+
let f = et({
|
|
1065
1065
|
x: e.x,
|
|
1066
1066
|
y: e.y
|
|
1067
1067
|
}, l, u);
|
|
@@ -1084,7 +1084,7 @@ function Mt(e, t, { snapThreshold: n }) {
|
|
|
1084
1084
|
}
|
|
1085
1085
|
//#endregion
|
|
1086
1086
|
//#region ../wayfinding/src/core/position/splitRouteByPoint.ts
|
|
1087
|
-
function
|
|
1087
|
+
function Pt(e, t) {
|
|
1088
1088
|
let n = 1e-6, r = -1, i = 0, a = Infinity;
|
|
1089
1089
|
for (let n = 0; n < e.length; n++) {
|
|
1090
1090
|
let o = e[n];
|
|
@@ -1126,7 +1126,7 @@ function Nt(e, t) {
|
|
|
1126
1126
|
}
|
|
1127
1127
|
//#endregion
|
|
1128
1128
|
//#region ../wayfinding/src/renderer/iconManager.ts
|
|
1129
|
-
function
|
|
1129
|
+
function Ft(e, t, n) {
|
|
1130
1130
|
var r, i, a, o;
|
|
1131
1131
|
let s = t == null ? parseFloat((r = (i = e.style) == null ? void 0 : i.width) == null ? "" : r) : t, c = n == null ? parseFloat((a = (o = e.style) == null ? void 0 : o.height) == null ? "" : a) : n;
|
|
1132
1132
|
if (!(s > 0) || !(c > 0)) throw Error(`renderer: canvas "${e.id}" has no CSS size: pass width and height, or draw it on a canvas whose style records one`);
|
|
@@ -1135,11 +1135,11 @@ function Pt(e, t, n) {
|
|
|
1135
1135
|
height: c
|
|
1136
1136
|
};
|
|
1137
1137
|
}
|
|
1138
|
-
function
|
|
1138
|
+
function It(e, t, n) {
|
|
1139
1139
|
let r = e.bounds, i = t.width * n, a = t.height * n;
|
|
1140
1140
|
if (!(r.size.x === i && r.size.y === a)) return r.set(r.center.x, r.center.y, i, a, r.rotation, r.elevation), [e];
|
|
1141
1141
|
}
|
|
1142
|
-
function
|
|
1142
|
+
function Lt(e, t, n, r = !1) {
|
|
1143
1143
|
let i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
|
|
1144
1144
|
function l(e) {
|
|
1145
1145
|
return e.onTop ? n.currentPosition : n.icons;
|
|
@@ -1159,20 +1159,20 @@ function It(e, t, n, r = !1) {
|
|
|
1159
1159
|
}
|
|
1160
1160
|
function p(n, o, s, u = s.rotation) {
|
|
1161
1161
|
var f, p, m;
|
|
1162
|
-
let h = l(s), g =
|
|
1162
|
+
let h = l(s), g = Ft(s.canvas, s.width, s.height), _ = (f = s.screenSpace) == null ? r : f;
|
|
1163
1163
|
e.touchLayer(h);
|
|
1164
1164
|
let v = {
|
|
1165
1165
|
source: s.canvas,
|
|
1166
1166
|
bounds: new a({
|
|
1167
1167
|
x: s.x,
|
|
1168
1168
|
y: s.y
|
|
1169
|
-
},
|
|
1169
|
+
}, Rt, u),
|
|
1170
1170
|
hidden: (p = s.hidden) != null && p,
|
|
1171
1171
|
dim: +!!s.dimmed,
|
|
1172
1172
|
origin: s.origin,
|
|
1173
1173
|
screenSpace: _
|
|
1174
1174
|
};
|
|
1175
|
-
s.cardinalSnap && !_ && t.attachCardinalSnap(v), v.onScale = ({ pixelSize: e }) =>
|
|
1175
|
+
s.cardinalSnap && !_ && t.attachCardinalSnap(v), v.onScale = ({ pixelSize: e }) => It(v, g, e), h.children.push(v);
|
|
1176
1176
|
let y = {
|
|
1177
1177
|
imageDef: v,
|
|
1178
1178
|
layer: h,
|
|
@@ -1239,13 +1239,13 @@ function It(e, t, n, r = !1) {
|
|
|
1239
1239
|
}
|
|
1240
1240
|
};
|
|
1241
1241
|
}
|
|
1242
|
-
var
|
|
1242
|
+
var Rt = {
|
|
1243
1243
|
x: 0,
|
|
1244
1244
|
y: 0
|
|
1245
1245
|
};
|
|
1246
1246
|
//#endregion
|
|
1247
1247
|
//#region ../wayfinding/src/renderer/layerManager.ts
|
|
1248
|
-
function
|
|
1248
|
+
function zt(e) {
|
|
1249
1249
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
1250
1250
|
return {
|
|
1251
1251
|
touchLayer(e) {
|
|
@@ -1267,7 +1267,7 @@ function Rt(e) {
|
|
|
1267
1267
|
}
|
|
1268
1268
|
//#endregion
|
|
1269
1269
|
//#region ../wayfinding/src/renderer/lineAnimation.ts
|
|
1270
|
-
var
|
|
1270
|
+
var q = 1, Bt = 0;
|
|
1271
1271
|
function Vt(e, t, n, r = 0) {
|
|
1272
1272
|
let i = 0, a = 0, o = null, s = null;
|
|
1273
1273
|
if (!e.length) return;
|
|
@@ -1284,7 +1284,7 @@ function Vt(e, t, n, r = 0) {
|
|
|
1284
1284
|
})), l = c.map((e) => {
|
|
1285
1285
|
let t = e.p1.x - e.p0.x, n = e.p1.y - e.p0.y;
|
|
1286
1286
|
return Math.sqrt(t * t + n * n);
|
|
1287
|
-
}), u = e.map(() => -1), d = [], f = l.reduce((e, t) => e + t, 0);
|
|
1287
|
+
}), u = e.map((e) => e.hidden ? Bt : -1), d = [], f = l.reduce((e, t) => e + t, 0);
|
|
1288
1288
|
if (!f) return;
|
|
1289
1289
|
let p = Math.max(20, Math.min(f / 2, 300));
|
|
1290
1290
|
function m(e) {
|
|
@@ -1304,7 +1304,7 @@ function Vt(e, t, n, r = 0) {
|
|
|
1304
1304
|
let r = e[t], i = c[t];
|
|
1305
1305
|
if (r.hidden = n <= Bt, !r.hidden) {
|
|
1306
1306
|
let { p0: e, p1: t } = i;
|
|
1307
|
-
r.points = n >=
|
|
1307
|
+
r.points = n >= q ? i : {
|
|
1308
1308
|
p0: e,
|
|
1309
1309
|
p1: {
|
|
1310
1310
|
x: e.x + (t.x - e.x) * n,
|
|
@@ -1318,8 +1318,9 @@ function Vt(e, t, n, r = 0) {
|
|
|
1318
1318
|
function g() {
|
|
1319
1319
|
d.length = 0;
|
|
1320
1320
|
let n = i;
|
|
1321
|
-
for (let e = 0; e < n; e++) h(e,
|
|
1322
|
-
|
|
1321
|
+
for (let e = 0; e < n; e++) h(e, q);
|
|
1322
|
+
let r = l[n];
|
|
1323
|
+
h(n, r ? Math.min(a / r, q) : q);
|
|
1323
1324
|
for (let t = n + 1; t < e.length; t++) h(t, Bt);
|
|
1324
1325
|
d.length && t(d);
|
|
1325
1326
|
}
|
|
@@ -1337,7 +1338,7 @@ function Vt(e, t, n, r = 0) {
|
|
|
1337
1338
|
g(), s = requestAnimationFrame(_);
|
|
1338
1339
|
}
|
|
1339
1340
|
function v() {
|
|
1340
|
-
y(), r <= 0 && (i = 0, a = 0), o = null, s = requestAnimationFrame(_);
|
|
1341
|
+
y(), r <= 0 && (i = 0, a = 0), o = null, g(), s = requestAnimationFrame(_);
|
|
1341
1342
|
}
|
|
1342
1343
|
function y() {
|
|
1343
1344
|
s && (cancelAnimationFrame(s), s = null, o = null);
|
|
@@ -1376,7 +1377,10 @@ function Ht({ p0: e, p1: t }, n) {
|
|
|
1376
1377
|
width: 10
|
|
1377
1378
|
};
|
|
1378
1379
|
}
|
|
1379
|
-
function Ut(e, t
|
|
1380
|
+
function Ut(e, t) {
|
|
1381
|
+
return e.points.p0.x === t.p0.x && e.points.p0.y === t.p0.y && e.points.p1.x === t.p1.x && e.points.p1.y === t.p1.y;
|
|
1382
|
+
}
|
|
1383
|
+
function Wt(e, t, n, r) {
|
|
1380
1384
|
let i = r.lines, a = r.linesAnimated, o = null, s = 1;
|
|
1381
1385
|
function c(e) {
|
|
1382
1386
|
s = e;
|
|
@@ -1387,22 +1391,28 @@ function Ut(e, t, n, r) {
|
|
|
1387
1391
|
function u(t) {
|
|
1388
1392
|
for (let n of t.children) n.hidden = !0, e.touchDef(n);
|
|
1389
1393
|
}
|
|
1394
|
+
function d(e, t) {
|
|
1395
|
+
let n = i.children;
|
|
1396
|
+
return n.length !== e.length + t.length || a.children.length !== t.length ? !1 : e.every((e, t) => Ut(n[t], e)) && t.every((t, r) => Ut(n[e.length + r], t));
|
|
1397
|
+
}
|
|
1390
1398
|
return {
|
|
1391
|
-
setRouteLines(r, l,
|
|
1392
|
-
var
|
|
1399
|
+
setRouteLines(r, l, f) {
|
|
1400
|
+
var p, m;
|
|
1401
|
+
let h = (p = f == null ? void 0 : f.resetAnimation) == null || p;
|
|
1402
|
+
if (!h && d(r, l)) return;
|
|
1393
1403
|
e.touchLayer(i), e.touchLayer(a), a.onScale = ({ pixelSize: e }) => c(e);
|
|
1394
|
-
let
|
|
1395
|
-
o && (
|
|
1396
|
-
let
|
|
1397
|
-
if (i.children = [...
|
|
1404
|
+
let g = 0;
|
|
1405
|
+
o && (h || (g = o.getProgress()), o.stop(), o = null), u(i), u(a);
|
|
1406
|
+
let _ = r.map((e) => Ht(e, t.passed)), v = l.map((e) => Ht(e, t.remaining));
|
|
1407
|
+
if (i.children = [..._, ...v], !v.length) {
|
|
1398
1408
|
a.children = [];
|
|
1399
1409
|
return;
|
|
1400
1410
|
}
|
|
1401
|
-
let
|
|
1411
|
+
let y = l.map((e) => ({
|
|
1402
1412
|
...Ht(e, t.active),
|
|
1403
1413
|
hidden: !0
|
|
1404
1414
|
}));
|
|
1405
|
-
a.children =
|
|
1415
|
+
a.children = y, o = (m = Vt(y, (e) => n.update(...e), () => s, g)) == null ? null : m;
|
|
1406
1416
|
},
|
|
1407
1417
|
clearLines() {
|
|
1408
1418
|
o && (o.stop(), o = null), l(i), l(a);
|
|
@@ -1414,8 +1424,8 @@ function Ut(e, t, n, r) {
|
|
|
1414
1424
|
}
|
|
1415
1425
|
//#endregion
|
|
1416
1426
|
//#region ../wayfinding/src/renderer/trailManager.ts
|
|
1417
|
-
var
|
|
1418
|
-
function
|
|
1427
|
+
var Gt = 40;
|
|
1428
|
+
function Kt(e, t) {
|
|
1419
1429
|
let n = /* @__PURE__ */ new Map(), r = 1, i = !1;
|
|
1420
1430
|
function o(e) {
|
|
1421
1431
|
r = e;
|
|
@@ -1437,7 +1447,7 @@ function Gt(e, t) {
|
|
|
1437
1447
|
}
|
|
1438
1448
|
function l(n) {
|
|
1439
1449
|
c();
|
|
1440
|
-
let i =
|
|
1450
|
+
let i = Gt * r, o = mt(n.from, n.to, i), l = n.canvas, u = {
|
|
1441
1451
|
x: n.width * r,
|
|
1442
1452
|
y: n.height * r
|
|
1443
1453
|
}, d = n.dotDefs, f = Math.min(d.length, o.length), p = [];
|
|
@@ -1494,7 +1504,7 @@ function Gt(e, t) {
|
|
|
1494
1504
|
a.from = t, a.to = r, d(l(a));
|
|
1495
1505
|
return;
|
|
1496
1506
|
}
|
|
1497
|
-
let { width: o, height: s } =
|
|
1507
|
+
let { width: o, height: s } = Ft(i.canvas, i.width, i.height), c = {
|
|
1498
1508
|
from: t,
|
|
1499
1509
|
to: r,
|
|
1500
1510
|
canvas: i.canvas,
|
|
@@ -1512,16 +1522,16 @@ function Gt(e, t) {
|
|
|
1512
1522
|
}
|
|
1513
1523
|
//#endregion
|
|
1514
1524
|
//#region ../wayfinding/src/renderer/createWayfindingRenderer.ts
|
|
1515
|
-
var
|
|
1525
|
+
var qt = {
|
|
1516
1526
|
passed: "#B5B7BC",
|
|
1517
1527
|
remaining: "#A4CCE2",
|
|
1518
1528
|
active: "#0794EA"
|
|
1519
1529
|
};
|
|
1520
|
-
function
|
|
1530
|
+
function Jt(e, t, n = {}) {
|
|
1521
1531
|
let r = {
|
|
1522
|
-
...
|
|
1532
|
+
...qt,
|
|
1523
1533
|
...n.colors
|
|
1524
|
-
}, i =
|
|
1534
|
+
}, i = zt(e), a = Lt(i, e, t, n.screenSpaceIcons), o = Kt(i, t.trail), s = Wt(i, r, e, t), c = {
|
|
1525
1535
|
setIcon: (...e) => a.setIcon(...e),
|
|
1526
1536
|
clearIcons: (...e) => a.clearIcons(...e),
|
|
1527
1537
|
setTrail: (...e) => o.setTrail(...e),
|
|
@@ -1540,15 +1550,11 @@ function qt(e, t, n = {}) {
|
|
|
1540
1550
|
}
|
|
1541
1551
|
//#endregion
|
|
1542
1552
|
//#region ../wayfinding/src/renderer/layers.ts
|
|
1543
|
-
var
|
|
1544
|
-
function
|
|
1553
|
+
var Yt = "wayfinding", Xt = "wf-trail-points", Zt = "wf-lines", Qt = "wf-lines-animated", $t = "wf-points", en = "wf-current-position";
|
|
1554
|
+
function tn(e = {}) {
|
|
1545
1555
|
return {
|
|
1546
|
-
name:
|
|
1556
|
+
name: Yt,
|
|
1547
1557
|
children: [
|
|
1548
|
-
{
|
|
1549
|
-
name: Yt,
|
|
1550
|
-
children: []
|
|
1551
|
-
},
|
|
1552
1558
|
{
|
|
1553
1559
|
name: Xt,
|
|
1554
1560
|
children: []
|
|
@@ -1564,14 +1570,18 @@ function en(e = {}) {
|
|
|
1564
1570
|
{
|
|
1565
1571
|
name: $t,
|
|
1566
1572
|
children: []
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
name: en,
|
|
1576
|
+
children: []
|
|
1567
1577
|
}
|
|
1568
1578
|
],
|
|
1569
1579
|
dim: 0,
|
|
1570
1580
|
overlay: e.overlay
|
|
1571
1581
|
};
|
|
1572
1582
|
}
|
|
1573
|
-
function
|
|
1574
|
-
let t = e.children.find((e) => "name" in e && e.name ===
|
|
1583
|
+
function nn(e) {
|
|
1584
|
+
let t = e.children.find((e) => "name" in e && e.name === Yt && "children" in e);
|
|
1575
1585
|
if (!t) throw Error("The scene holds no wayfinding block — mount `root` first.");
|
|
1576
1586
|
let n = new Map(t.children.map((e) => [e.name, e]));
|
|
1577
1587
|
function r(e) {
|
|
@@ -1580,21 +1590,21 @@ function tn(e) {
|
|
|
1580
1590
|
return t;
|
|
1581
1591
|
}
|
|
1582
1592
|
return {
|
|
1583
|
-
trail: r(
|
|
1584
|
-
lines: r(
|
|
1585
|
-
linesAnimated: r(
|
|
1586
|
-
icons: r(
|
|
1587
|
-
currentPosition: r(
|
|
1593
|
+
trail: r(Xt),
|
|
1594
|
+
lines: r(Zt),
|
|
1595
|
+
linesAnimated: r(Qt),
|
|
1596
|
+
icons: r($t),
|
|
1597
|
+
currentPosition: r(en)
|
|
1588
1598
|
};
|
|
1589
1599
|
}
|
|
1590
1600
|
//#endregion
|
|
1591
1601
|
//#region ../wayfinding/src/runtime/positionView.ts
|
|
1592
|
-
var
|
|
1593
|
-
function
|
|
1602
|
+
var rn = "current-position", an = "position";
|
|
1603
|
+
function on({ renderer: e, iconProvider: t }) {
|
|
1594
1604
|
return {
|
|
1595
1605
|
place(n, r) {
|
|
1596
1606
|
let i = Number.isFinite(n.heading), a = i ? "current_arrow" : "current", o = i ? m(n.heading) : void 0, s = t.getIcon(a);
|
|
1597
|
-
e.setIcon(
|
|
1607
|
+
e.setIcon(an, {
|
|
1598
1608
|
canvas: s.canvas,
|
|
1599
1609
|
width: s.width,
|
|
1600
1610
|
height: s.height,
|
|
@@ -1609,16 +1619,16 @@ function an({ renderer: e, iconProvider: t }) {
|
|
|
1609
1619
|
});
|
|
1610
1620
|
},
|
|
1611
1621
|
hide() {
|
|
1612
|
-
e.setIcon(
|
|
1622
|
+
e.setIcon(an, null);
|
|
1613
1623
|
}
|
|
1614
1624
|
};
|
|
1615
1625
|
}
|
|
1616
1626
|
//#endregion
|
|
1617
1627
|
//#region ../wayfinding/src/runtime/endpointView.ts
|
|
1618
|
-
function
|
|
1628
|
+
function sn(e, t) {
|
|
1619
1629
|
return !t || !e.bounds && e.id !== "current-position";
|
|
1620
1630
|
}
|
|
1621
|
-
function
|
|
1631
|
+
function cn({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
1622
1632
|
return {
|
|
1623
1633
|
place(r, i, a, o) {
|
|
1624
1634
|
if (!a.length) return;
|
|
@@ -1629,7 +1639,7 @@ function sn({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
|
1629
1639
|
height: f.height,
|
|
1630
1640
|
x: l.x,
|
|
1631
1641
|
y: l.y,
|
|
1632
|
-
hidden:
|
|
1642
|
+
hidden: sn(r, s),
|
|
1633
1643
|
dimmed: !s,
|
|
1634
1644
|
cardinalSnap: !0
|
|
1635
1645
|
}), e.setIcon("destination", {
|
|
@@ -1650,7 +1660,7 @@ function sn({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
|
1650
1660
|
}
|
|
1651
1661
|
//#endregion
|
|
1652
1662
|
//#region ../wayfinding/src/runtime/getRouteLines.ts
|
|
1653
|
-
function
|
|
1663
|
+
function ln({ engine: e, from: t, to: n, waypoints: r, accessible: i }) {
|
|
1654
1664
|
return r != null && r.length ? e.buildWaypointsRoute([
|
|
1655
1665
|
t,
|
|
1656
1666
|
...r,
|
|
@@ -1659,27 +1669,27 @@ function cn({ engine: e, from: t, to: n, waypoints: r, accessible: i }) {
|
|
|
1659
1669
|
}
|
|
1660
1670
|
//#endregion
|
|
1661
1671
|
//#region ../wayfinding/src/runtime/snapPositionToRoute.ts
|
|
1662
|
-
function
|
|
1672
|
+
function un(e, t, n) {
|
|
1663
1673
|
if (!(t != null && t.bounds)) return !1;
|
|
1664
|
-
let r = n == null || !t.layer || t.layer === n, i =
|
|
1674
|
+
let r = n == null || !t.layer || t.layer === n, i = it({
|
|
1665
1675
|
x: e.x,
|
|
1666
1676
|
y: e.y
|
|
1667
1677
|
}, t.bounds);
|
|
1668
1678
|
return r && i;
|
|
1669
1679
|
}
|
|
1670
|
-
function
|
|
1680
|
+
function dn(e, t, n, r, i) {
|
|
1671
1681
|
if (!t.length) return { snapped: !1 };
|
|
1672
1682
|
let a = e.layer || null;
|
|
1673
|
-
if (
|
|
1683
|
+
if (un(e, n, a)) {
|
|
1674
1684
|
let e = t[0];
|
|
1675
1685
|
return {
|
|
1676
1686
|
snapped: !0,
|
|
1677
1687
|
snappedPoint: e.p0,
|
|
1678
1688
|
snappedLine: e,
|
|
1679
|
-
distance:
|
|
1689
|
+
distance: U(t)
|
|
1680
1690
|
};
|
|
1681
1691
|
}
|
|
1682
|
-
if (
|
|
1692
|
+
if (un(e, r, a)) {
|
|
1683
1693
|
let e = t[t.length - 1];
|
|
1684
1694
|
return {
|
|
1685
1695
|
snapped: !0,
|
|
@@ -1688,13 +1698,13 @@ function un(e, t, n, r, i) {
|
|
|
1688
1698
|
distance: 0
|
|
1689
1699
|
};
|
|
1690
1700
|
}
|
|
1691
|
-
return
|
|
1701
|
+
return Nt(e, t, { snapThreshold: i });
|
|
1692
1702
|
}
|
|
1693
1703
|
//#endregion
|
|
1694
1704
|
//#region ../wayfinding/src/runtime/positionTrailView.ts
|
|
1695
|
-
var
|
|
1696
|
-
function
|
|
1697
|
-
let a =
|
|
1705
|
+
var fn = "trail";
|
|
1706
|
+
function pn({ renderer: e, iconProvider: t, floorContext: n, trails: r, snapThreshold: i }) {
|
|
1707
|
+
let a = on({
|
|
1698
1708
|
renderer: e,
|
|
1699
1709
|
iconProvider: t
|
|
1700
1710
|
});
|
|
@@ -1707,7 +1717,7 @@ function fn({ renderer: e, iconProvider: t, floorContext: n, trails: r, snapThre
|
|
|
1707
1717
|
a.hide();
|
|
1708
1718
|
},
|
|
1709
1719
|
applyToRoute(e, t, r) {
|
|
1710
|
-
let o =
|
|
1720
|
+
let o = dn(e, r, t.from, t.to, i), s = !n.isLayerVisible(e.layer);
|
|
1711
1721
|
return o.snapped ? a.place({
|
|
1712
1722
|
...e,
|
|
1713
1723
|
x: o.snappedPoint.x,
|
|
@@ -1715,16 +1725,16 @@ function fn({ renderer: e, iconProvider: t, floorContext: n, trails: r, snapThre
|
|
|
1715
1725
|
}, s) : a.place(e, s), o;
|
|
1716
1726
|
},
|
|
1717
1727
|
setTrail(e, t) {
|
|
1718
|
-
e && t ? r.place(
|
|
1728
|
+
e && t ? r.place(fn, e, t) : r.clear(fn);
|
|
1719
1729
|
},
|
|
1720
1730
|
clearTrail() {
|
|
1721
|
-
r.clear(
|
|
1731
|
+
r.clear(fn);
|
|
1722
1732
|
}
|
|
1723
1733
|
};
|
|
1724
1734
|
}
|
|
1725
1735
|
//#endregion
|
|
1726
1736
|
//#region ../wayfinding/src/runtime/routeLinesView.ts
|
|
1727
|
-
function
|
|
1737
|
+
function mn({ renderer: e }) {
|
|
1728
1738
|
return {
|
|
1729
1739
|
draw({ passed: t, remaining: n }, r = !1) {
|
|
1730
1740
|
e.setRouteLines(t, n, { resetAnimation: !r });
|
|
@@ -1736,14 +1746,14 @@ function pn({ renderer: e }) {
|
|
|
1736
1746
|
}
|
|
1737
1747
|
//#endregion
|
|
1738
1748
|
//#region ../wayfinding/src/runtime/routeRenderData.ts
|
|
1739
|
-
function
|
|
1749
|
+
function hn({ routeLines: e, currentRouteLayer: t, snap: n }) {
|
|
1740
1750
|
let r = e.filter((e) => !e.virtual), i = (e) => t === null ? e : e.filter((e) => e.p0.layer === t);
|
|
1741
1751
|
if (!(n != null && n.snapped)) return {
|
|
1742
1752
|
passed: [],
|
|
1743
1753
|
remaining: i(r),
|
|
1744
|
-
distance:
|
|
1754
|
+
distance: U(r)
|
|
1745
1755
|
};
|
|
1746
|
-
let { passed: a, remaining: o } =
|
|
1756
|
+
let { passed: a, remaining: o } = Pt(r, n.snappedPoint), s = o !== r && o.length > 0 && o[0].p0.layer === n.snappedPoint.layer ? [{
|
|
1747
1757
|
...o[0],
|
|
1748
1758
|
p0: n.snappedPoint
|
|
1749
1759
|
}, ...o.slice(1)] : o;
|
|
@@ -1755,15 +1765,15 @@ function mn({ routeLines: e, currentRouteLayer: t, snap: n }) {
|
|
|
1755
1765
|
}
|
|
1756
1766
|
//#endregion
|
|
1757
1767
|
//#region ../wayfinding/src/runtime/routeUpdate.ts
|
|
1758
|
-
function
|
|
1768
|
+
function gn(e, t) {
|
|
1759
1769
|
return {
|
|
1760
1770
|
lines: e.filter((e) => !e.virtual),
|
|
1761
|
-
bounds:
|
|
1771
|
+
bounds: xt(t.flatMap((e) => [e.p0, e.p1]))
|
|
1762
1772
|
};
|
|
1763
1773
|
}
|
|
1764
1774
|
//#endregion
|
|
1765
1775
|
//#region ../wayfinding/src/runtime/trailView.ts
|
|
1766
|
-
function
|
|
1776
|
+
function _n({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
1767
1777
|
let r = /* @__PURE__ */ new Set();
|
|
1768
1778
|
function i(e, t) {
|
|
1769
1779
|
if (n.showAllFloors()) return !0;
|
|
@@ -1797,11 +1807,11 @@ function gn({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
|
1797
1807
|
}
|
|
1798
1808
|
//#endregion
|
|
1799
1809
|
//#region ../wayfinding/src/runtime/transitionView.ts
|
|
1800
|
-
var
|
|
1801
|
-
function
|
|
1810
|
+
var vn = "transition";
|
|
1811
|
+
function yn({ renderer: e, iconProvider: t, floorContext: n, onTransitionClick: r }) {
|
|
1802
1812
|
return {
|
|
1803
1813
|
place(i) {
|
|
1804
|
-
e.clearIcons(
|
|
1814
|
+
e.clearIcons(vn);
|
|
1805
1815
|
let a;
|
|
1806
1816
|
if (n.showAllFloors()) a = null;
|
|
1807
1817
|
else {
|
|
@@ -1809,14 +1819,14 @@ function vn({ renderer: e, iconProvider: t, floorContext: n, onTransitionClick:
|
|
|
1809
1819
|
if (!e) return;
|
|
1810
1820
|
a = e;
|
|
1811
1821
|
}
|
|
1812
|
-
let o =
|
|
1822
|
+
let o = bt({
|
|
1813
1823
|
routeLines: i,
|
|
1814
1824
|
currentLayerName: a,
|
|
1815
1825
|
floorOrder: n.getFloorOrder()
|
|
1816
1826
|
});
|
|
1817
1827
|
for (let [n, i] of o.entries()) {
|
|
1818
|
-
let a = t.getIcon(
|
|
1819
|
-
e.setIcon(
|
|
1828
|
+
let a = t.getIcon(bn(i.role, i.direction));
|
|
1829
|
+
e.setIcon(vn, {
|
|
1820
1830
|
canvas: a.canvas,
|
|
1821
1831
|
width: a.width,
|
|
1822
1832
|
height: a.height,
|
|
@@ -1828,37 +1838,37 @@ function vn({ renderer: e, iconProvider: t, floorContext: n, onTransitionClick:
|
|
|
1828
1838
|
}
|
|
1829
1839
|
},
|
|
1830
1840
|
clear() {
|
|
1831
|
-
e.clearIcons(
|
|
1841
|
+
e.clearIcons(vn);
|
|
1832
1842
|
}
|
|
1833
1843
|
};
|
|
1834
1844
|
}
|
|
1835
|
-
function
|
|
1845
|
+
function bn(e, t) {
|
|
1836
1846
|
return e === "entry" ? "transition_entry" : t === "up" ? "transition_up" : t === "down" ? "transition_down" : "transition";
|
|
1837
1847
|
}
|
|
1838
1848
|
//#endregion
|
|
1839
1849
|
//#region ../wayfinding/src/runtime/createWayfindingRuntime.ts
|
|
1840
|
-
var
|
|
1841
|
-
function
|
|
1842
|
-
let l =
|
|
1850
|
+
var xn = (e) => e.flatMap((e) => [e.p0, e.p1]);
|
|
1851
|
+
function Sn({ engine: e, renderer: t, iconProvider: n, floorContext: r, snapThreshold: i, rerouteThreshold: a, onTransitionClick: o, onRouteUpdate: s, onRouteDistance: c }) {
|
|
1852
|
+
let l = Mt(a), u = cn({
|
|
1843
1853
|
renderer: t,
|
|
1844
1854
|
iconProvider: n,
|
|
1845
1855
|
floorContext: r
|
|
1846
|
-
}), d =
|
|
1856
|
+
}), d = yn({
|
|
1847
1857
|
renderer: t,
|
|
1848
1858
|
iconProvider: n,
|
|
1849
1859
|
floorContext: r,
|
|
1850
1860
|
onTransitionClick: o
|
|
1851
|
-
}), p =
|
|
1861
|
+
}), p = pn({
|
|
1852
1862
|
renderer: t,
|
|
1853
1863
|
iconProvider: n,
|
|
1854
1864
|
floorContext: r,
|
|
1855
|
-
trails:
|
|
1865
|
+
trails: _n({
|
|
1856
1866
|
renderer: t,
|
|
1857
1867
|
iconProvider: n,
|
|
1858
1868
|
floorContext: r
|
|
1859
1869
|
}),
|
|
1860
1870
|
snapThreshold: i
|
|
1861
|
-
}), m =
|
|
1871
|
+
}), m = mn({ renderer: t }), h = [], g = null, _ = null, v = null, y = 0, b = !1, x = !1;
|
|
1862
1872
|
function S() {
|
|
1863
1873
|
return r.showAllFloors() ? null : r.getActiveFloor();
|
|
1864
1874
|
}
|
|
@@ -1875,13 +1885,13 @@ function xn({ engine: e, renderer: t, iconProvider: n, floorContext: r, snapThre
|
|
|
1875
1885
|
return e.length ? {
|
|
1876
1886
|
from: g,
|
|
1877
1887
|
to: _,
|
|
1878
|
-
routePoints:
|
|
1888
|
+
routePoints: xn(e),
|
|
1879
1889
|
visibleLines: e
|
|
1880
1890
|
} : null;
|
|
1881
1891
|
}
|
|
1882
1892
|
function E(e = null, t = !1) {
|
|
1883
1893
|
if (!g || !_) return;
|
|
1884
|
-
let n =
|
|
1894
|
+
let n = hn({
|
|
1885
1895
|
routeLines: h,
|
|
1886
1896
|
currentRouteLayer: S(),
|
|
1887
1897
|
snap: e
|
|
@@ -1923,27 +1933,27 @@ function xn({ engine: e, renderer: t, iconProvider: n, floorContext: r, snapThre
|
|
|
1923
1933
|
if (x = !1, !v || !g || !_) return null;
|
|
1924
1934
|
let e = h.filter((e) => !e.virtual);
|
|
1925
1935
|
if (!e.length) return null;
|
|
1926
|
-
let t = T(), n = t ? p.applyToRoute(v, t, e) :
|
|
1936
|
+
let t = T(), n = t ? p.applyToRoute(v, t, e) : dn(v, e, g, _, i);
|
|
1927
1937
|
return n.snapped && (b = !0), x = n.snapped, n;
|
|
1928
1938
|
}
|
|
1929
1939
|
function j() {
|
|
1930
|
-
let e =
|
|
1940
|
+
let e = gn(h, C());
|
|
1931
1941
|
return s(e.lines, e.bounds), e;
|
|
1932
1942
|
}
|
|
1933
|
-
function
|
|
1934
|
-
let o =
|
|
1943
|
+
function ee({ from: n, to: r, waypoints: i, accessible: a }) {
|
|
1944
|
+
let o = ln({
|
|
1935
1945
|
engine: e,
|
|
1936
1946
|
from: n,
|
|
1937
1947
|
to: r,
|
|
1938
1948
|
waypoints: i,
|
|
1939
1949
|
accessible: a
|
|
1940
1950
|
});
|
|
1941
|
-
if (!o.length) return
|
|
1951
|
+
if (!o.length) return N(), !1;
|
|
1942
1952
|
b = !1, g = n, _ = r, h = o, O();
|
|
1943
1953
|
let { lines: s } = j(), l = A();
|
|
1944
|
-
return k(), D(l), l && E(l, !0), c(l ? y :
|
|
1954
|
+
return k(), D(l), l && E(l, !0), c(l ? y : U(s)), t.flush(), !0;
|
|
1945
1955
|
}
|
|
1946
|
-
function
|
|
1956
|
+
function M(e) {
|
|
1947
1957
|
let n = v !== null;
|
|
1948
1958
|
if (v = e, !e) {
|
|
1949
1959
|
x = !1, p.hideIcon(), D(null), n && k(), E(), c(y), t.flush();
|
|
@@ -1953,39 +1963,39 @@ function xn({ engine: e, renderer: t, iconProvider: n, floorContext: r, snapThre
|
|
|
1953
1963
|
let r = A();
|
|
1954
1964
|
k(), D(r), r && E(r, !0), c(y), t.flush();
|
|
1955
1965
|
}
|
|
1956
|
-
function
|
|
1966
|
+
function te() {
|
|
1957
1967
|
O();
|
|
1958
1968
|
let e = A();
|
|
1959
1969
|
k(), D(e), e && E(e, !0), h.length && j(), c(y), t.flush();
|
|
1960
1970
|
}
|
|
1961
|
-
function
|
|
1971
|
+
function N() {
|
|
1962
1972
|
b = !1, h = [], g = null, _ = null, y = 0, u.hide(), d.clear(), p.clearTrail(), m.clear(), s([], new f()), c(0), t.flush();
|
|
1963
1973
|
}
|
|
1964
|
-
function
|
|
1965
|
-
|
|
1974
|
+
function P() {
|
|
1975
|
+
N(), v = null, t.destroy();
|
|
1966
1976
|
}
|
|
1967
1977
|
return {
|
|
1968
|
-
setRoute:
|
|
1969
|
-
onPositionChanged:
|
|
1970
|
-
onFloorChanged:
|
|
1978
|
+
setRoute: ee,
|
|
1979
|
+
onPositionChanged: M,
|
|
1980
|
+
onFloorChanged: te,
|
|
1971
1981
|
shouldReroute: w,
|
|
1972
|
-
clearRoute:
|
|
1973
|
-
destroy:
|
|
1982
|
+
clearRoute: N,
|
|
1983
|
+
destroy: P
|
|
1974
1984
|
};
|
|
1975
1985
|
}
|
|
1976
1986
|
//#endregion
|
|
1977
1987
|
//#region ../wayfinding/src/createWayfinding.ts
|
|
1978
|
-
function
|
|
1979
|
-
let { dataSource: t, renderer: n, iconProvider: r, floorContext: i, layers: a, gpsConfig: o } = e, s =
|
|
1988
|
+
function Cn(e) {
|
|
1989
|
+
let { dataSource: t, renderer: n, iconProvider: r, floorContext: i, layers: a, gpsConfig: o } = e, s = dt(t), c = Jt(n, a, { screenSpaceIcons: e.screenSpaceIcons }), l = Sn({
|
|
1980
1990
|
engine: s,
|
|
1981
1991
|
renderer: c,
|
|
1982
1992
|
iconProvider: r,
|
|
1983
1993
|
floorContext: i,
|
|
1984
|
-
snapThreshold:
|
|
1985
|
-
thresholdInMeters:
|
|
1994
|
+
snapThreshold: Ot({
|
|
1995
|
+
thresholdInMeters: Dt(o == null ? void 0 : o.snapThreshold, St),
|
|
1986
1996
|
gpsConfig: o
|
|
1987
1997
|
}),
|
|
1988
|
-
rerouteThreshold:
|
|
1998
|
+
rerouteThreshold: kt(o),
|
|
1989
1999
|
onTransitionClick: (t) => {
|
|
1990
2000
|
var n;
|
|
1991
2001
|
return (n = e.onTransitionClick) == null ? void 0 : n.call(e, t);
|
|
@@ -2018,8 +2028,8 @@ function Sn(e) {
|
|
|
2018
2028
|
}
|
|
2019
2029
|
//#endregion
|
|
2020
2030
|
//#region src/wayfinding/adapters/arbitraryPoint.ts
|
|
2021
|
-
var
|
|
2022
|
-
function
|
|
2031
|
+
var wn = "Your Location", Tn = "kiosk-anchor";
|
|
2032
|
+
function En(e, t, n) {
|
|
2023
2033
|
return {
|
|
2024
2034
|
id: n,
|
|
2025
2035
|
x: e.x,
|
|
@@ -2030,7 +2040,7 @@ function Tn(e, t, n) {
|
|
|
2030
2040
|
}
|
|
2031
2041
|
//#endregion
|
|
2032
2042
|
//#region src/wayfinding/adapters/boothToEndpoint.ts
|
|
2033
|
-
function
|
|
2043
|
+
function Dn(e) {
|
|
2034
2044
|
var t, n;
|
|
2035
2045
|
let r = e.rect, i = a.fromMinMax(r.min, r.max, e.rotate).corners();
|
|
2036
2046
|
return {
|
|
@@ -2042,7 +2052,7 @@ function En(e) {
|
|
|
2042
2052
|
}
|
|
2043
2053
|
//#endregion
|
|
2044
2054
|
//#region src/wayfinding/adapters/canvasIconProvider.ts
|
|
2045
|
-
var
|
|
2055
|
+
var On = "#00A2FF", kn = "#FF9F06", J = 34, An = 4, jn = 56;
|
|
2046
2056
|
function Y(e, t, n, r, i, a) {
|
|
2047
2057
|
let o = e.get(t);
|
|
2048
2058
|
return o ? (o.id = t, w(o, n, r, i)) : a();
|
|
@@ -2054,16 +2064,16 @@ function X(e, t = l(e)) {
|
|
|
2054
2064
|
height: t.height
|
|
2055
2065
|
};
|
|
2056
2066
|
}
|
|
2057
|
-
function
|
|
2067
|
+
function Mn(e) {
|
|
2058
2068
|
var t, n;
|
|
2059
|
-
let { iconMap: r, pixelRatio: i } = e, a = (t = e.sourceColor) == null ?
|
|
2069
|
+
let { iconMap: r, pixelRatio: i } = e, a = (t = e.sourceColor) == null ? On : t, s = (n = e.destinationColor) == null ? kn : n, l = /* @__PURE__ */ new Map();
|
|
2060
2070
|
l.set("destination", X(Y(r, "destination", J, J, i, () => c(i, s)))), l.set("source", X(Y(r, "departure", J, J, i, () => o(i, a)))), l.set("source_inactive", X(Y(r, "departure_inactive", J, J, i, () => o(i, a))));
|
|
2061
2071
|
let u = o(i, a);
|
|
2062
2072
|
u.id = "current-location", l.set("current", X(u));
|
|
2063
2073
|
let d = Y(r, "transition", J, J, i, () => o(i, a));
|
|
2064
|
-
return l.set("transition", X(d)), l.set("transition_up", X(Y(r, "transition_up",
|
|
2065
|
-
width: C(
|
|
2066
|
-
height: C(
|
|
2074
|
+
return l.set("transition", X(d)), l.set("transition_up", X(Y(r, "transition_up", jn, J, i, () => d))), l.set("transition_down", X(Y(r, "transition_down", jn, J, i, () => d))), l.set("transition_entry", X(Y(r, "departure", J, J, i, () => o(i, a)))), l.set("current_arrow", X(Y(r, "direction", J, J, i, () => E(i, a)))), l.set("trail", X(T(An, "#b5b7bc"), {
|
|
2075
|
+
width: C(An),
|
|
2076
|
+
height: C(An)
|
|
2067
2077
|
})), { getIcon(e) {
|
|
2068
2078
|
let t = l.get(e);
|
|
2069
2079
|
if (!t) throw Error(`Unknown icon: ${e}`);
|
|
@@ -2072,11 +2082,11 @@ function jn(e) {
|
|
|
2072
2082
|
}
|
|
2073
2083
|
//#endregion
|
|
2074
2084
|
//#region src/wayfinding/adapters/floorContext.ts
|
|
2075
|
-
var
|
|
2076
|
-
function
|
|
2085
|
+
var Nn = 0;
|
|
2086
|
+
function Pn(e, t) {
|
|
2077
2087
|
return {
|
|
2078
2088
|
showAllFloors() {
|
|
2079
|
-
return e.mode ===
|
|
2089
|
+
return e.mode === Nn;
|
|
2080
2090
|
},
|
|
2081
2091
|
getActiveFloor() {
|
|
2082
2092
|
var n;
|
|
@@ -2094,7 +2104,7 @@ function Nn(e, t) {
|
|
|
2094
2104
|
}
|
|
2095
2105
|
//#endregion
|
|
2096
2106
|
//#region src/wayfinding/adapters/graphDataSource.ts
|
|
2097
|
-
function
|
|
2107
|
+
function Fn() {
|
|
2098
2108
|
return {
|
|
2099
2109
|
getLines: () => {
|
|
2100
2110
|
var e, t;
|
|
@@ -2108,25 +2118,25 @@ function Pn() {
|
|
|
2108
2118
|
}
|
|
2109
2119
|
//#endregion
|
|
2110
2120
|
//#region src/utils/math.ts
|
|
2111
|
-
var
|
|
2121
|
+
var In = /* @__PURE__ */ e(p(), 1);
|
|
2112
2122
|
function Z(e, t) {
|
|
2113
2123
|
return e * (1 - t / 100);
|
|
2114
2124
|
}
|
|
2115
2125
|
//#endregion
|
|
2116
2126
|
//#region src/wayfinding/adapters/kioskCanvas.ts
|
|
2117
|
-
var
|
|
2118
|
-
function
|
|
2127
|
+
var Ln = 199, Rn = 152, zn = 55, Bn = "#ee4422";
|
|
2128
|
+
function Vn(e, t) {
|
|
2119
2129
|
let n = devicePixelRatio, r = e == null ? void 0 : e.get("kiosk");
|
|
2120
2130
|
if (r) {
|
|
2121
2131
|
r.id = "kiosk";
|
|
2122
2132
|
let e = t ? t / 100 : 1;
|
|
2123
|
-
return w(r, Z(
|
|
2133
|
+
return w(r, Z(Ln * e, zn), Z(Rn * e, zn), n);
|
|
2124
2134
|
}
|
|
2125
|
-
return E(n, (0,
|
|
2135
|
+
return E(n, (0, In.default)(Bn).hex());
|
|
2126
2136
|
}
|
|
2127
2137
|
//#endregion
|
|
2128
2138
|
//#region src/wayfinding/adapters/positionInput.ts
|
|
2129
|
-
function
|
|
2139
|
+
function Hn(e) {
|
|
2130
2140
|
return {
|
|
2131
2141
|
x: e.x,
|
|
2132
2142
|
y: e.y,
|
|
@@ -2136,12 +2146,12 @@ function Vn(e) {
|
|
|
2136
2146
|
}
|
|
2137
2147
|
//#endregion
|
|
2138
2148
|
//#region src/wayfinding/bindMobxReactions.ts
|
|
2139
|
-
var
|
|
2140
|
-
function
|
|
2149
|
+
var Un = (e) => "rect" in e ? Dn(e) : e;
|
|
2150
|
+
function Wn({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStore: a, uiState: o, layerStore: s } }) {
|
|
2141
2151
|
let c = [];
|
|
2142
2152
|
function l() {
|
|
2143
2153
|
var t;
|
|
2144
|
-
let n = o.selectedRoute, r = n != null && n.from ?
|
|
2154
|
+
let n = o.selectedRoute, r = n != null && n.from ? Un(n.from) : null, i = n != null && n.to ? Un(n.to) : null;
|
|
2145
2155
|
if (!r || !i) {
|
|
2146
2156
|
e.clearRoute();
|
|
2147
2157
|
return;
|
|
@@ -2149,7 +2159,7 @@ function Un({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
2149
2159
|
e.setRoute({
|
|
2150
2160
|
from: r,
|
|
2151
2161
|
to: i,
|
|
2152
|
-
waypoints: n == null || (t = n.waypoints) == null ? void 0 : t.map(
|
|
2162
|
+
waypoints: n == null || (t = n.waypoints) == null ? void 0 : t.map(Dn),
|
|
2153
2163
|
accessible: a.onlyAccessible
|
|
2154
2164
|
}) === !1 && console.error(/* @__PURE__ */ Error(`Route not found: (${r.x},${r.y}) → (${i.x},${i.y})`));
|
|
2155
2165
|
}
|
|
@@ -2159,7 +2169,7 @@ function Un({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
2159
2169
|
e.setPosition(null), n(null);
|
|
2160
2170
|
return;
|
|
2161
2171
|
}
|
|
2162
|
-
let l =
|
|
2172
|
+
let l = Hn(t);
|
|
2163
2173
|
c ? (e.setPosition(null), n({
|
|
2164
2174
|
x: l.x,
|
|
2165
2175
|
y: l.y,
|
|
@@ -2170,8 +2180,8 @@ function Un({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
2170
2180
|
var t;
|
|
2171
2181
|
let n = a.currentPosition, r = o.selectedRoute;
|
|
2172
2182
|
if (!n || !(r != null && r.to)) return;
|
|
2173
|
-
let i = !r.from, s = ((t = r.from) == null ? void 0 : t.id) === "current-position" && e.shouldReroute(
|
|
2174
|
-
!i && !s || a.rebuildRouteFromPosition(
|
|
2183
|
+
let i = !r.from, s = ((t = r.from) == null ? void 0 : t.id) === "current-position" && e.shouldReroute(Hn(n));
|
|
2184
|
+
!i && !s || a.rebuildRouteFromPosition(En(n, wn, rn));
|
|
2175
2185
|
}
|
|
2176
2186
|
function f() {
|
|
2177
2187
|
var e, n;
|
|
@@ -2183,15 +2193,24 @@ function Un({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
2183
2193
|
let t = o.selectedRoute, n = a.currentPosition;
|
|
2184
2194
|
if (!(t != null && t.to) || !n || ((e = t.from) == null ? void 0 : e.id) !== "current-position" || a.routeLines.length > 0) return;
|
|
2185
2195
|
let r = n.z == null ? "" : String(n.z);
|
|
2186
|
-
t.from.x === n.x && t.from.y === n.y && t.from.layer === r || a.rebuildRouteFromPosition(
|
|
2196
|
+
t.from.x === n.x && t.from.y === n.y && t.from.layer === r || a.rebuildRouteFromPosition(En(n, wn, rn));
|
|
2187
2197
|
}
|
|
2188
2198
|
c.push(i(() => s.layersLoaded, () => {
|
|
2189
2199
|
l(), u();
|
|
2190
2200
|
}), i(() => [o.selectedRoute, a.onlyAccessible], () => {
|
|
2191
2201
|
l(), u();
|
|
2192
|
-
}), i(() => a.currentPosition, () => {
|
|
2193
|
-
u();
|
|
2194
2202
|
}), i(() => {
|
|
2203
|
+
let e = a.currentPosition;
|
|
2204
|
+
return e ? {
|
|
2205
|
+
x: e.x,
|
|
2206
|
+
y: e.y,
|
|
2207
|
+
z: e.z,
|
|
2208
|
+
angle: e.angle,
|
|
2209
|
+
iconType: a.iconType
|
|
2210
|
+
} : null;
|
|
2211
|
+
}, () => {
|
|
2212
|
+
u();
|
|
2213
|
+
}, { equals: r.structural }), i(() => {
|
|
2195
2214
|
let e = a.currentPosition;
|
|
2196
2215
|
return e ? {
|
|
2197
2216
|
x: e.x,
|
|
@@ -2215,26 +2234,26 @@ function Un({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
2215
2234
|
}
|
|
2216
2235
|
//#endregion
|
|
2217
2236
|
//#region src/wayfinding/handlers/kioskHandler.ts
|
|
2218
|
-
var
|
|
2219
|
-
function
|
|
2237
|
+
var Gn = "kiosk", Kn = 0;
|
|
2238
|
+
function qn({ wayfinding: e, kioskIconMap: t }) {
|
|
2220
2239
|
let n = /* @__PURE__ */ new Map(), r = (e) => {
|
|
2221
2240
|
let r = e == null ? 100 : e, i = n.get(r);
|
|
2222
2241
|
if (i) return i;
|
|
2223
|
-
let a =
|
|
2242
|
+
let a = Vn(t, e);
|
|
2224
2243
|
return n.set(r, a), a;
|
|
2225
2244
|
};
|
|
2226
2245
|
return (t, n, i) => {
|
|
2227
2246
|
var a;
|
|
2228
2247
|
if (!t) {
|
|
2229
|
-
e.setIcon(
|
|
2248
|
+
e.setIcon(Gn, null), e.flush();
|
|
2230
2249
|
return;
|
|
2231
2250
|
}
|
|
2232
|
-
if (i !==
|
|
2233
|
-
e.setIcon(
|
|
2251
|
+
if (i !== Kn && t.z && n && t.z !== n) {
|
|
2252
|
+
e.setIcon(Gn, null), e.flush();
|
|
2234
2253
|
return;
|
|
2235
2254
|
}
|
|
2236
2255
|
let o = r(t.iconSizePercent);
|
|
2237
|
-
e.setIcon(
|
|
2256
|
+
e.setIcon(Gn, {
|
|
2238
2257
|
canvas: o,
|
|
2239
2258
|
...l(o),
|
|
2240
2259
|
x: t.x,
|
|
@@ -2246,13 +2265,13 @@ function Kn({ wayfinding: e, kioskIconMap: t }) {
|
|
|
2246
2265
|
}
|
|
2247
2266
|
//#endregion
|
|
2248
2267
|
//#region src/wayfinding/handlers/yahHandler.ts
|
|
2249
|
-
var Q = "yah",
|
|
2250
|
-
function
|
|
2268
|
+
var Q = "yah", Jn = "#ff4343", Yn = 64, Xn = 90, Zn = 32;
|
|
2269
|
+
function Qn(e, t) {
|
|
2251
2270
|
let n = e.get(Q);
|
|
2252
|
-
return n ? (n.id = Q, w(n, Z(
|
|
2271
|
+
return n ? (n.id = Q, w(n, Z(Yn, Zn), Z(Xn, Zn), t)) : s(t, Jn);
|
|
2253
2272
|
}
|
|
2254
|
-
function
|
|
2255
|
-
let i =
|
|
2273
|
+
function $n({ wayfinding: e, iconMap: t, pixelRatio: n, floorContext: r }) {
|
|
2274
|
+
let i = Qn(t, n);
|
|
2256
2275
|
return i.id = "current-location-2", (t) => {
|
|
2257
2276
|
if (!t) {
|
|
2258
2277
|
e.setIcon(Q, null), e.flush();
|
|
@@ -2273,37 +2292,37 @@ function Qn({ wayfinding: e, iconMap: t, pixelRatio: n, floorContext: r }) {
|
|
|
2273
2292
|
//#endregion
|
|
2274
2293
|
//#region src/wayfinding/createWayfinding.ts
|
|
2275
2294
|
var $ = null;
|
|
2276
|
-
function
|
|
2295
|
+
function er() {
|
|
2277
2296
|
return $ !== null;
|
|
2278
2297
|
}
|
|
2279
|
-
function
|
|
2298
|
+
function tr() {
|
|
2280
2299
|
if (!$) throw Error("Wayfinding is not initialized — call createWayfinding() first.");
|
|
2281
2300
|
return $;
|
|
2282
2301
|
}
|
|
2283
|
-
function
|
|
2284
|
-
return
|
|
2302
|
+
function nr(e, t, n) {
|
|
2303
|
+
return tr().wayfinding.buildRoute(e, t, n);
|
|
2285
2304
|
}
|
|
2286
|
-
function
|
|
2287
|
-
let { scene: t, store: n, canvas: r } = e, i =
|
|
2305
|
+
function rr(e) {
|
|
2306
|
+
let { scene: t, store: n, canvas: r } = e, i = nn(t.rootLayer), { wayfinding: a, dispose: o } = ir(n, i, {
|
|
2288
2307
|
attachCardinalSnap: v,
|
|
2289
2308
|
update: g
|
|
2290
2309
|
}), s = i.icons;
|
|
2291
|
-
return s.onClick = (e) =>
|
|
2310
|
+
return s.onClick = (e) => or(a, e), s.onPointerMove = (e) => sr(a, r, e), s.onPointerOut = () => sr(a, r), g(s), () => {
|
|
2292
2311
|
s.onClick = void 0, s.onPointerMove = void 0, s.onPointerOut = void 0, r.current && (r.current.style.cursor = ""), g(s), o();
|
|
2293
2312
|
};
|
|
2294
2313
|
}
|
|
2295
|
-
function
|
|
2314
|
+
function ir(e, t, n) {
|
|
2296
2315
|
var r;
|
|
2297
|
-
let i =
|
|
2316
|
+
let i = Fn(), a = Mn({
|
|
2298
2317
|
iconMap: e.fp.icons,
|
|
2299
2318
|
pixelRatio: devicePixelRatio
|
|
2300
|
-
}), o =
|
|
2319
|
+
}), o = Pn(e.layerStore, e.routeStore), s = Cn({
|
|
2301
2320
|
dataSource: i,
|
|
2302
2321
|
renderer: n,
|
|
2303
2322
|
iconProvider: a,
|
|
2304
2323
|
floorContext: o,
|
|
2305
2324
|
layers: t,
|
|
2306
|
-
gpsConfig: (r =
|
|
2325
|
+
gpsConfig: (r = F()) == null || (r = r.properties) == null ? void 0 : r.config,
|
|
2307
2326
|
screenSpaceIcons: e.uiState.is3DView,
|
|
2308
2327
|
onTransitionClick: (t) => {
|
|
2309
2328
|
t.role === "exit" && e.layerStore.updateVisibility(t.targetLayer, !0);
|
|
@@ -2312,13 +2331,13 @@ function rr(e, t, n) {
|
|
|
2312
2331
|
e.routeStore.updateRoute([...t]), n.isEmpty() || (e.uiState.moveToRect = n);
|
|
2313
2332
|
},
|
|
2314
2333
|
onRouteDistance: (t) => e.routeStore.updateRouteDistance(t)
|
|
2315
|
-
}), c =
|
|
2334
|
+
}), c = Wn({
|
|
2316
2335
|
wayfinding: s,
|
|
2317
|
-
kioskHandler:
|
|
2336
|
+
kioskHandler: qn({
|
|
2318
2337
|
wayfinding: s,
|
|
2319
2338
|
kioskIconMap: e.fp.icons
|
|
2320
2339
|
}),
|
|
2321
|
-
yahHandler:
|
|
2340
|
+
yahHandler: $n({
|
|
2322
2341
|
wayfinding: s,
|
|
2323
2342
|
iconMap: e.fp.icons,
|
|
2324
2343
|
pixelRatio: devicePixelRatio,
|
|
@@ -2335,21 +2354,21 @@ function rr(e, t, n) {
|
|
|
2335
2354
|
return $ = l, s.flush(), {
|
|
2336
2355
|
wayfinding: s,
|
|
2337
2356
|
dispose() {
|
|
2338
|
-
|
|
2357
|
+
ar(l) && ($ = null, e.routeStore.showAccessible = !1), c(), s.destroy();
|
|
2339
2358
|
}
|
|
2340
2359
|
};
|
|
2341
2360
|
}
|
|
2342
|
-
function
|
|
2361
|
+
function ar(e) {
|
|
2343
2362
|
return $ === e;
|
|
2344
2363
|
}
|
|
2345
|
-
function
|
|
2364
|
+
function or(e, t) {
|
|
2346
2365
|
e.handleClick([t.def]) && t.stopPropagation();
|
|
2347
2366
|
}
|
|
2348
|
-
function
|
|
2367
|
+
function sr(e, t, n) {
|
|
2349
2368
|
let r = t.current;
|
|
2350
2369
|
if (!r) return;
|
|
2351
2370
|
let i = n ? e.handleHover([n.def]) : !1;
|
|
2352
2371
|
r.style.cursor = i ? "pointer" : "";
|
|
2353
2372
|
}
|
|
2354
2373
|
//#endregion
|
|
2355
|
-
export {
|
|
2374
|
+
export { N as _, wn as a, rn as c, oe as d, ie as f, F as g, re as h, Dn as i, tn as l, L as m, rr as n, Tn as o, ae as p, er as r, En as s, nr as t, Xe as u, O as v };
|