@expofp/floorplan 0.0.0-experimental.2632d13 → 0.0.0-experimental.6dabc65
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/{GpsLoader-DwNSQv4V.js → GpsLoader-D9ghVrHk.js} +3 -3
- package/dist/browser/{KioskStore-DgP9k2lT.js → KioskStore-BY2LVJPr.js} +3 -3
- package/dist/browser/{LayerStore-DCwl80sb.js → LayerStore-Cdwr6Hsw.js} +2 -2
- package/dist/browser/{MaplibreAdapter-B-c-uOJf.js → MaplibreAdapter-aWJl2IuA.js} +55 -56
- package/dist/browser/{RouteStore-CuslHjhJ.js → RouteStore-DTRRmaH_.js} +1548 -740
- package/dist/browser/{SetKioskMode-CVD7sZLr.js → SetKioskMode-KMjCaliE.js} +2 -2
- package/dist/browser/{ShowKiosk-DuOS8tTO.js → ShowKiosk-C_gEEGg7.js} +2 -2
- package/dist/browser/{ViewerMenuPanel-Xj-8aVzf.js → ViewerMenuPanel-CbkSUP3L.js} +2 -2
- package/dist/browser/bundle.json +22 -25
- package/dist/browser/{components-D8dv3ezN.js → components-DRXsdUhs.js} +714 -714
- package/dist/browser/{create-live-plan-Ff4MkKcG.js → create-live-plan-DnaL_dh7.js} +385 -724
- package/dist/browser/{floorplan.loader-fOvLfGGf.js → floorplan.loader-151P9pJo.js} +3 -3
- package/dist/browser/{floorplan.ready-Bvj8hVzH.js → floorplan.ready-CCnzh5dy.js} +48 -48
- package/dist/browser/index.js +5 -5
- package/dist/browser/{venue-public-CH7uq9Xn.js → init-ui-DsRfN2rh.js} +5 -15
- package/dist/browser/{integrateKiosk-DhdxcN-Y.js → integrateKiosk-w_EetoNQ.js} +1 -1
- package/dist/browser/{journey-plan-cw-9rqLk.js → journey-plan-CEf1fFZz.js} +14 -14
- package/dist/browser/{kiosk-mode-Bqv2L5PO.js → kiosk-mode-Ck1FQGr9.js} +1 -1
- package/dist/browser/{kioskUrlParam-dw9tDQ6e.js → kioskUrlParam-BinDd3Gf.js} +1 -1
- package/dist/browser/{logDeviceInfo-D2Anqc6y.js → logDeviceInfo-OsKRXOu4.js} +3 -3
- package/dist/browser/{debounce-B4PlcNh4.js → venue-selection-DLUrexiA.js} +6 -16
- package/dist/browser/{viewport-juWifKNy.js → viewport-CBi835qx.js} +1 -1
- package/dist/esm/store/RouteStore.d.ts +10 -0
- package/dist/esm/store/RouteStore.js +43 -16
- package/dist/esm/store/VenueStore.d.ts +7 -0
- package/dist/esm/store/VenueStore.js +9 -0
- package/dist/esm/tools/settings.js +1 -1
- package/package.json +10 -10
- package/dist/browser/venues-Yq0wU18A.js +0 -447
|
@@ -3,35 +3,35 @@
|
|
|
3
3
|
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
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] = "728f0692-ebde-4fd8-bc66-fee9986a1e8a", e._sentryDebugIdIdentifier = "sentry-dbid-728f0692-ebde-4fd8-bc66-fee9986a1e8a");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
9
|
import { r as e, t } from "./rolldown-runtime-DUb2xvRc.js";
|
|
10
10
|
import { At as n, Z as r, jt as i } from "./i18n-DRDvImjG.js";
|
|
11
|
-
import { a,
|
|
12
|
-
import { r as
|
|
13
|
-
import { a as
|
|
14
|
-
import { $ as
|
|
15
|
-
import { a as
|
|
11
|
+
import { a, c as o, f as s, m as c, p as l, s as u, t as d } from "./is-debug-6YYr83sg.js";
|
|
12
|
+
import { r as f } from "./loadImage-CenmkrfL.js";
|
|
13
|
+
import { a as p, c as m, h, i as g, l as _, n as v, u as y } from "./mobx.module-BOCLFB5I.js";
|
|
14
|
+
import { $ as b, Bt as x, Cn as S, Dt as C, Kt as w, Ot as T, Qt as E, Sn as D, St as O, Tn as k, Tt as A, Ut as j, Vt as ee, Wt as te, Xt as M, _n as ne, a as re, an as ie, bn as ae, bt as oe, dn as se, en as ce, gn as le, i as ue, kt as de, mn as fe, pn as pe, pt as me, qt as he, r as ge, rn as _e, rt as ve, un as N, vn as ye, vt as be, wn as xe, wt as Se, yn as P, yt as Ce, zt as we } from "./LayerStore-Cdwr6Hsw.js";
|
|
15
|
+
import { a as Te, l as F, u as I } from "./store-q_CTsixH.js";
|
|
16
16
|
//#region ../geometry/src/lib/geo.ts
|
|
17
|
-
var
|
|
18
|
-
function
|
|
19
|
-
let n =
|
|
20
|
-
return
|
|
17
|
+
var Ee = 6371e3;
|
|
18
|
+
function De(e, t) {
|
|
19
|
+
let n = D(e.lat), r = D(t.lat), i = D(t.lat - e.lat), a = D(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);
|
|
20
|
+
return Ee * (2 * Math.atan2(Math.sqrt(o), Math.sqrt(1 - o)));
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
let n =
|
|
24
|
-
return (
|
|
22
|
+
function Oe(e, t) {
|
|
23
|
+
let n = D(e.lat), r = D(t.lat), i = D(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);
|
|
24
|
+
return (k(Math.atan2(a, o)) + 360) % 360;
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
let r = t /
|
|
26
|
+
function ke(e, t, n) {
|
|
27
|
+
let r = t / Ee, i = D(n), a = D(e.lat), o = D(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));
|
|
28
28
|
return {
|
|
29
|
-
lat:
|
|
30
|
-
lng:
|
|
29
|
+
lat: k(s),
|
|
30
|
+
lng: k(xe(c))
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
let r = Math.max(1, Math.floor(n)), i =
|
|
33
|
+
function Ae(e, t, n) {
|
|
34
|
+
let r = Math.max(1, Math.floor(n)), i = D(e.lat), a = D(e.lng), o = D(t.lat), s = D(t.lng), c = De(e, t) / Ee, l = Math.sin(c), u = [e];
|
|
35
35
|
for (let t = 1; t < r; t++) {
|
|
36
36
|
let n = t / r;
|
|
37
37
|
if (l === 0) {
|
|
@@ -40,18 +40,18 @@ function be(e, t, n) {
|
|
|
40
40
|
}
|
|
41
41
|
let d = Math.sin((1 - n) * c) / l, f = Math.sin(n * c) / l, p = d * Math.cos(i) * Math.cos(a) + f * Math.cos(o) * Math.cos(s), m = d * Math.cos(i) * Math.sin(a) + f * Math.cos(o) * Math.sin(s), h = d * Math.sin(i) + f * Math.sin(o);
|
|
42
42
|
u.push({
|
|
43
|
-
lat:
|
|
44
|
-
lng:
|
|
43
|
+
lat: k(Math.atan2(h, Math.sqrt(p * p + m * m))),
|
|
44
|
+
lng: k(Math.atan2(m, p))
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
return u.push(t), u;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
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 =
|
|
51
|
-
return
|
|
49
|
+
function je(e, t, n) {
|
|
50
|
+
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 = k(Math.atan2(i, r)), u = k(Math.atan2(s, o)) - l, d = (a === 0 ? 0 : c / a) * De(t.geo, n.geo), f = Oe(t.geo, n.geo);
|
|
51
|
+
return ke(t.geo, d, f + u);
|
|
52
52
|
}
|
|
53
|
-
function
|
|
54
|
-
let r =
|
|
53
|
+
function Me(e, t, n) {
|
|
54
|
+
let r = De(t.geo, n.geo), i = Oe(t.geo, n.geo), a = De(t.geo, e), o = Oe(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 = S(u * s, d + D(o));
|
|
55
55
|
return {
|
|
56
56
|
x: t.local.x + f.x,
|
|
57
57
|
y: t.local.y + f.y
|
|
@@ -59,20 +59,20 @@ function Se(e, t, n) {
|
|
|
59
59
|
}
|
|
60
60
|
//#endregion
|
|
61
61
|
//#region ../geometry/src/lib/line.ts
|
|
62
|
-
function
|
|
62
|
+
function Ne(e) {
|
|
63
63
|
return P(e.p0, e.p1);
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
return
|
|
65
|
+
function Pe(e, t) {
|
|
66
|
+
return ae(e.p0, e.p1, .5, t);
|
|
67
67
|
}
|
|
68
|
-
function
|
|
68
|
+
function Fe(e, t) {
|
|
69
69
|
return Math.atan2(t.y - e.y, t.x - e.x);
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function Ie(e, t, n) {
|
|
72
72
|
var r;
|
|
73
73
|
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;
|
|
74
74
|
f === 0 ? p = 0 : (p = ((c - i) * u + (l - a) * d) / f, p = p < 0 ? 0 : p > 1 ? 1 : p);
|
|
75
|
-
let m = (n == null ? new
|
|
75
|
+
let m = (n == null ? new ye() : n).set(i + u * p, a + d * p, (r = e.elevation) == null ? 0 : r), h = P({
|
|
76
76
|
x: c,
|
|
77
77
|
y: l
|
|
78
78
|
}, m);
|
|
@@ -84,36 +84,36 @@ function Ee(e, t, n) {
|
|
|
84
84
|
}
|
|
85
85
|
//#endregion
|
|
86
86
|
//#region src/components/Kiosk/SetKiosk/getName.ts
|
|
87
|
-
var
|
|
87
|
+
var Le = () => _e;
|
|
88
88
|
//#endregion
|
|
89
89
|
//#region src/data/fpGeo.ts
|
|
90
|
-
function
|
|
91
|
-
return
|
|
90
|
+
function Re() {
|
|
91
|
+
return s().__fpGeo;
|
|
92
92
|
}
|
|
93
93
|
//#endregion
|
|
94
94
|
//#region ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js
|
|
95
|
-
function
|
|
96
|
-
return
|
|
95
|
+
function ze() {
|
|
96
|
+
return ze = Object.assign ? Object.assign.bind() : function(e) {
|
|
97
97
|
for (var t = 1; t < arguments.length; t++) {
|
|
98
98
|
var n = arguments[t];
|
|
99
99
|
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
100
100
|
}
|
|
101
101
|
return e;
|
|
102
|
-
},
|
|
102
|
+
}, ze.apply(null, arguments);
|
|
103
103
|
}
|
|
104
104
|
//#endregion
|
|
105
105
|
//#region ../../node_modules/.pnpm/resolve-pathname@3.0.0/node_modules/resolve-pathname/esm/resolve-pathname.js
|
|
106
|
-
function
|
|
106
|
+
function Be(e) {
|
|
107
107
|
return e.charAt(0) === "/";
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function Ve(e, t) {
|
|
110
110
|
for (var n = t, r = n + 1, i = e.length; r < i; n += 1, r += 1) e[n] = e[r];
|
|
111
111
|
e.pop();
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function He(e, t) {
|
|
114
114
|
t === void 0 && (t = "");
|
|
115
|
-
var n = e && e.split("/") || [], r = t && t.split("/") || [], i = e &&
|
|
116
|
-
if (e &&
|
|
115
|
+
var n = e && e.split("/") || [], r = t && t.split("/") || [], i = e && Be(e), a = t && Be(t), o = i || a;
|
|
116
|
+
if (e && Be(e) ? r = n : n.length && (r.pop(), r = r.concat(n)), !r.length) return "/";
|
|
117
117
|
var s;
|
|
118
118
|
if (r.length) {
|
|
119
119
|
var c = r[r.length - 1];
|
|
@@ -121,34 +121,34 @@ function Me(e, t) {
|
|
|
121
121
|
} else s = !1;
|
|
122
122
|
for (var l = 0, u = r.length; u >= 0; u--) {
|
|
123
123
|
var d = r[u];
|
|
124
|
-
d === "." ?
|
|
124
|
+
d === "." ? Ve(r, u) : d === ".." ? (Ve(r, u), l++) : l && (Ve(r, u), l--);
|
|
125
125
|
}
|
|
126
126
|
if (!o) for (; l--;) r.unshift("..");
|
|
127
|
-
o && r[0] !== "" && (!r[0] || !
|
|
127
|
+
o && r[0] !== "" && (!r[0] || !Be(r[0])) && r.unshift("");
|
|
128
128
|
var f = r.join("/");
|
|
129
129
|
return s && f.substr(-1) !== "/" && (f += "/"), f;
|
|
130
130
|
}
|
|
131
131
|
//#endregion
|
|
132
132
|
//#region ../../node_modules/.pnpm/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js
|
|
133
|
-
var
|
|
134
|
-
function
|
|
135
|
-
if (!e) throw Error(
|
|
133
|
+
var Ue = "Invariant failed";
|
|
134
|
+
function We(e, t) {
|
|
135
|
+
if (!e) throw Error(Ue);
|
|
136
136
|
}
|
|
137
137
|
//#endregion
|
|
138
138
|
//#region ../../node_modules/.pnpm/history@4.10.1/node_modules/history/esm/history.js
|
|
139
|
-
function
|
|
139
|
+
function Ge(e) {
|
|
140
140
|
return e.charAt(0) === "/" ? e : "/" + e;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function Ke(e, t) {
|
|
143
143
|
return e.toLowerCase().indexOf(t.toLowerCase()) === 0 && "/?#".indexOf(e.charAt(t.length)) !== -1;
|
|
144
144
|
}
|
|
145
|
-
function
|
|
146
|
-
return
|
|
145
|
+
function qe(e, t) {
|
|
146
|
+
return Ke(e, t) ? e.substr(t.length) : e;
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function Je(e) {
|
|
149
149
|
return e.charAt(e.length - 1) === "/" ? e.slice(0, -1) : e;
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function Ye(e) {
|
|
152
152
|
var t = e || "/", n = "", r = "", i = t.indexOf("#");
|
|
153
153
|
i !== -1 && (r = t.substr(i), t = t.substr(0, i));
|
|
154
154
|
var a = t.indexOf("?");
|
|
@@ -158,21 +158,21 @@ function ze(e) {
|
|
|
158
158
|
hash: r === "#" ? "" : r
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function Xe(e) {
|
|
162
162
|
var t = e.pathname, n = e.search, r = e.hash, i = t || "/";
|
|
163
163
|
return n && n !== "?" && (i += n.charAt(0) === "?" ? n : "?" + n), r && r !== "#" && (i += r.charAt(0) === "#" ? r : "#" + r), i;
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function Ze(e, t, n, r) {
|
|
166
166
|
var i;
|
|
167
|
-
typeof e == "string" ? (i =
|
|
167
|
+
typeof e == "string" ? (i = Ye(e), i.state = t) : (i = ze({}, e), i.pathname === void 0 && (i.pathname = ""), i.search ? i.search.charAt(0) !== "?" && (i.search = "?" + i.search) : i.search = "", i.hash ? i.hash.charAt(0) !== "#" && (i.hash = "#" + i.hash) : i.hash = "", t !== void 0 && i.state === void 0 && (i.state = t));
|
|
168
168
|
try {
|
|
169
169
|
i.pathname = decodeURI(i.pathname);
|
|
170
170
|
} catch (e) {
|
|
171
171
|
throw e instanceof URIError ? URIError("Pathname \"" + i.pathname + "\" could not be decoded. This is likely caused by an invalid percent-encoding.") : e;
|
|
172
172
|
}
|
|
173
|
-
return n && (i.key = n), r ? i.pathname ? i.pathname.charAt(0) !== "/" && (i.pathname =
|
|
173
|
+
return n && (i.key = n), r ? i.pathname ? i.pathname.charAt(0) !== "/" && (i.pathname = He(i.pathname, r.pathname)) : i.pathname = r.pathname : i.pathname || (i.pathname = "/"), i;
|
|
174
174
|
}
|
|
175
|
-
function
|
|
175
|
+
function Qe() {
|
|
176
176
|
var e = null;
|
|
177
177
|
function t(t) {
|
|
178
178
|
return e = t, function() {
|
|
@@ -210,47 +210,47 @@ function He() {
|
|
|
210
210
|
notifyListeners: a
|
|
211
211
|
};
|
|
212
212
|
}
|
|
213
|
-
var
|
|
214
|
-
function
|
|
213
|
+
var $e = !!(typeof window < "u" && window.document && window.document.createElement);
|
|
214
|
+
function et(e, t) {
|
|
215
215
|
t(window.confirm(e));
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function tt() {
|
|
218
218
|
var e = window.navigator.userAgent;
|
|
219
219
|
return (e.indexOf("Android 2.") !== -1 || e.indexOf("Android 4.0") !== -1) && e.indexOf("Mobile Safari") !== -1 && e.indexOf("Chrome") === -1 && e.indexOf("Windows Phone") === -1 ? !1 : window.history && "pushState" in window.history;
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function nt() {
|
|
222
222
|
return window.navigator.userAgent.indexOf("Trident") === -1;
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function rt(e) {
|
|
225
225
|
return e.state === void 0 && navigator.userAgent.indexOf("CriOS") === -1;
|
|
226
226
|
}
|
|
227
|
-
var
|
|
228
|
-
function
|
|
227
|
+
var it = "popstate", at = "hashchange";
|
|
228
|
+
function ot() {
|
|
229
229
|
try {
|
|
230
230
|
return window.history.state || {};
|
|
231
231
|
} catch {
|
|
232
232
|
return {};
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
e === void 0 && (e = {}),
|
|
237
|
-
var t = window.history, n =
|
|
235
|
+
function st(e) {
|
|
236
|
+
e === void 0 && (e = {}), !$e && We(!1);
|
|
237
|
+
var t = window.history, n = tt(), r = !nt(), i = e, a = i.forceRefresh, o = a !== void 0 && a, s = i.getUserConfirmation, c = s === void 0 ? et : s, l = i.keyLength, u = l === void 0 ? 6 : l, d = e.basename ? Je(Ge(e.basename)) : "";
|
|
238
238
|
function f(e) {
|
|
239
239
|
var t = e || {}, n = t.key, r = t.state, i = window.location, a = i.pathname, o = i.search, s = i.hash, c = a + o + s;
|
|
240
|
-
return d && (c =
|
|
240
|
+
return d && (c = qe(c, d)), Ze(c, r, n);
|
|
241
241
|
}
|
|
242
242
|
function p() {
|
|
243
243
|
return Math.random().toString(36).substr(2, u);
|
|
244
244
|
}
|
|
245
|
-
var m =
|
|
245
|
+
var m = Qe();
|
|
246
246
|
function h(e) {
|
|
247
|
-
|
|
247
|
+
ze(M, e), M.length = t.length, m.notifyListeners(M.location, M.action);
|
|
248
248
|
}
|
|
249
249
|
function g(e) {
|
|
250
|
-
|
|
250
|
+
rt(e) || y(f(e.state));
|
|
251
251
|
}
|
|
252
252
|
function _() {
|
|
253
|
-
y(f(
|
|
253
|
+
y(f(ot()));
|
|
254
254
|
}
|
|
255
255
|
var v = !1;
|
|
256
256
|
function y(e) {
|
|
@@ -273,12 +273,12 @@ function Ze(e) {
|
|
|
273
273
|
var i = n - r;
|
|
274
274
|
i && (v = !0, E(i));
|
|
275
275
|
}
|
|
276
|
-
var x = f(
|
|
276
|
+
var x = f(ot()), S = [x.key];
|
|
277
277
|
function C(e) {
|
|
278
|
-
return d +
|
|
278
|
+
return d + Xe(e);
|
|
279
279
|
}
|
|
280
280
|
function w(e, r) {
|
|
281
|
-
var i = "PUSH", a =
|
|
281
|
+
var i = "PUSH", a = Ze(e, r, p(), M.location);
|
|
282
282
|
m.confirmTransitionTo(a, i, c, function(e) {
|
|
283
283
|
if (e) {
|
|
284
284
|
var r = C(a), s = a.key, c = a.state;
|
|
@@ -298,7 +298,7 @@ function Ze(e) {
|
|
|
298
298
|
});
|
|
299
299
|
}
|
|
300
300
|
function T(e, r) {
|
|
301
|
-
var i = "REPLACE", a =
|
|
301
|
+
var i = "REPLACE", a = Ze(e, r, p(), M.location);
|
|
302
302
|
m.confirmTransitionTo(a, i, c, function(e) {
|
|
303
303
|
if (e) {
|
|
304
304
|
var r = C(a), s = a.key, c = a.state;
|
|
@@ -328,7 +328,7 @@ function Ze(e) {
|
|
|
328
328
|
}
|
|
329
329
|
var k = 0;
|
|
330
330
|
function A(e) {
|
|
331
|
-
k += e, k === 1 && e === 1 ? (window.addEventListener(
|
|
331
|
+
k += e, k === 1 && e === 1 ? (window.addEventListener(it, g), r && window.addEventListener(at, _)) : k === 0 && (window.removeEventListener(it, g), r && window.removeEventListener(at, _));
|
|
332
332
|
}
|
|
333
333
|
var j = !1;
|
|
334
334
|
function ee(e) {
|
|
@@ -361,54 +361,54 @@ function Ze(e) {
|
|
|
361
361
|
}
|
|
362
362
|
//#endregion
|
|
363
363
|
//#region src/services/url-sync.ts
|
|
364
|
-
var
|
|
365
|
-
function
|
|
364
|
+
var ct = st();
|
|
365
|
+
function lt() {
|
|
366
366
|
return window.location.pathname;
|
|
367
367
|
}
|
|
368
|
-
var
|
|
369
|
-
function
|
|
370
|
-
return
|
|
368
|
+
var ut = f(() => []), dt = "", L = !1, ft = !1, pt = 0, mt = () => void 0, ht;
|
|
369
|
+
function gt() {
|
|
370
|
+
return ut();
|
|
371
371
|
}
|
|
372
|
-
function
|
|
373
|
-
if (!
|
|
372
|
+
function _t(e) {
|
|
373
|
+
if (!dt) return lt() + e;
|
|
374
374
|
let t = r(e).search, n = t === "?" ? "" : t;
|
|
375
|
-
return
|
|
375
|
+
return lt() + (n ? `${n}&${dt}` : `?${dt}`);
|
|
376
376
|
}
|
|
377
|
-
function
|
|
378
|
-
return r(
|
|
377
|
+
function vt() {
|
|
378
|
+
return r(ct.location.search).search;
|
|
379
379
|
}
|
|
380
|
-
function
|
|
381
|
-
!
|
|
380
|
+
function yt(e) {
|
|
381
|
+
!L && !ft && ct.push(_t(e));
|
|
382
382
|
}
|
|
383
|
-
function
|
|
384
|
-
return
|
|
383
|
+
function bt(e) {
|
|
384
|
+
return L || ft ? !1 : (ct.replace(_t(e)), !0);
|
|
385
385
|
}
|
|
386
|
-
function
|
|
387
|
-
a(
|
|
386
|
+
function xt() {
|
|
387
|
+
a(Ct), L = !0;
|
|
388
388
|
}
|
|
389
|
-
function
|
|
390
|
-
a(
|
|
391
|
-
if (
|
|
392
|
-
let n =
|
|
393
|
-
n[n.length - 1] !== r && n.push(r),
|
|
389
|
+
function St(e) {
|
|
390
|
+
a(Ct), L || (L = e.offHistory), mt = e.onNavigate, dt = r(ct.location.search).platform, L || ut().push(lt() + ct.location.search), ht = ct.listen((e, t) => {
|
|
391
|
+
if (wt(), L) return;
|
|
392
|
+
let n = ut(), r = lt() + e.search;
|
|
393
|
+
n[n.length - 1] !== r && n.push(r), c.log("history", t, e), t === "POP" && mt();
|
|
394
394
|
});
|
|
395
395
|
}
|
|
396
|
-
function
|
|
397
|
-
|
|
396
|
+
function Ct() {
|
|
397
|
+
L = !1, dt = "", mt = () => void 0, ut().length = 0, wt(), ht == null || ht(), ht = void 0;
|
|
398
398
|
}
|
|
399
|
-
function
|
|
400
|
-
|
|
399
|
+
function wt() {
|
|
400
|
+
ft = !1, window.clearTimeout(pt);
|
|
401
401
|
}
|
|
402
|
-
function
|
|
403
|
-
|
|
402
|
+
function Tt() {
|
|
403
|
+
ft = !0, window.clearTimeout(pt), pt = window.setTimeout(wt, 1e3), ct.goBack();
|
|
404
404
|
}
|
|
405
405
|
//#endregion
|
|
406
406
|
//#region src/tools/telemetry.ts
|
|
407
|
-
var
|
|
408
|
-
function
|
|
409
|
-
return e ? `${
|
|
407
|
+
var Et = "efp-telemetry", Dt = 300 * 1e3, Ot = 1e3, kt = 63e3;
|
|
408
|
+
function At(e) {
|
|
409
|
+
return e ? `${Et}:${e}` : Et;
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function jt(e = Et) {
|
|
412
412
|
return {
|
|
413
413
|
get() {
|
|
414
414
|
try {
|
|
@@ -434,19 +434,19 @@ function bt(e = ht) {
|
|
|
434
434
|
}
|
|
435
435
|
};
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function Mt(e, t) {
|
|
438
438
|
if (!t) return e;
|
|
439
439
|
let n = e.indexOf("#"), r = n === -1 ? e : e.slice(0, n), i = n === -1 ? "" : e.slice(n), a = "?";
|
|
440
440
|
return r.includes("?") && (a = r.endsWith("?") || r.endsWith("&") ? "" : "&"), `${r}${a}expo=${encodeURIComponent(t)}${i}`;
|
|
441
441
|
}
|
|
442
|
-
function
|
|
442
|
+
function Nt(e) {
|
|
443
443
|
let t = new TextEncoder(), n = [], r = t.encode(JSON.stringify({
|
|
444
444
|
...e,
|
|
445
445
|
items: []
|
|
446
446
|
})).byteLength;
|
|
447
447
|
for (let i of e.items) {
|
|
448
448
|
let e = t.encode(JSON.stringify(i)).byteLength, a = n.length > 0 ? e + 1 : e;
|
|
449
|
-
if (n.length > 0 && r + a >
|
|
449
|
+
if (n.length > 0 && r + a > kt) break;
|
|
450
450
|
r += a, n.push(i);
|
|
451
451
|
}
|
|
452
452
|
let i = n.length === e.items.length ? e : {
|
|
@@ -459,13 +459,13 @@ function St(e) {
|
|
|
459
459
|
bytes: r
|
|
460
460
|
};
|
|
461
461
|
}
|
|
462
|
-
function
|
|
462
|
+
function Pt(e) {
|
|
463
463
|
return e >= 400 && e < 500 && e !== 408 && e !== 429;
|
|
464
464
|
}
|
|
465
|
-
function
|
|
466
|
-
return e.length <=
|
|
465
|
+
function Ft(e) {
|
|
466
|
+
return e.length <= Ot ? e : (console.warn(`Telemetry queue full: dropping ${e.length - Ot} oldest events`), e.slice(-1e3));
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function It(e) {
|
|
469
469
|
let t = e.headers.get("Retry-After");
|
|
470
470
|
if (!t) return 0;
|
|
471
471
|
let n = 0, r = Number(t);
|
|
@@ -474,11 +474,11 @@ function Tt(e) {
|
|
|
474
474
|
let e = Date.parse(t);
|
|
475
475
|
isNaN(e) || (n = Math.max(0, e - Date.now()));
|
|
476
476
|
}
|
|
477
|
-
return Math.min(n,
|
|
477
|
+
return Math.min(n, Dt);
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function Lt(e) {
|
|
480
480
|
var t;
|
|
481
|
-
let { url: n, expo: r, expoId: i, storage: a =
|
|
481
|
+
let { url: n, expo: r, expoId: i, storage: a = jt(At(r)) } = e, o = Mt(n, r), s = (t = e.kioskId) == null ? "" : t;
|
|
482
482
|
function c() {
|
|
483
483
|
let e = a.get();
|
|
484
484
|
return e ? (e.expo = r, e.expoId = i, e.kioskId = s, e) : {
|
|
@@ -507,22 +507,22 @@ function Et(e) {
|
|
|
507
507
|
for (; t > 0;) {
|
|
508
508
|
let n = c();
|
|
509
509
|
if (n.items.length === 0) break;
|
|
510
|
-
let { payload: r, body: i, bytes: a } =
|
|
510
|
+
let { payload: r, body: i, bytes: a } = Nt(n), s = r.items.length;
|
|
511
511
|
m(n, n.items.slice(s)), e = r.items, t -= s;
|
|
512
512
|
let l = await fetch(o, {
|
|
513
513
|
method: "POST",
|
|
514
514
|
body: i,
|
|
515
515
|
headers: { "Content-Type": "application/json" },
|
|
516
516
|
credentials: "omit",
|
|
517
|
-
keepalive: a <=
|
|
517
|
+
keepalive: a <= kt
|
|
518
518
|
});
|
|
519
519
|
if (await l.text().catch(() => void 0), e = null, !l.ok) {
|
|
520
|
-
if (
|
|
520
|
+
if (Pt(l.status)) {
|
|
521
521
|
console.error(`Telemetry batch refused by the endpoint: HTTP ${l.status} (dropped: ${s})`);
|
|
522
522
|
continue;
|
|
523
523
|
}
|
|
524
524
|
if (l.status === 429 || l.status === 503) {
|
|
525
|
-
let e =
|
|
525
|
+
let e = It(l);
|
|
526
526
|
e > 0 && (f = performance.now() + e);
|
|
527
527
|
}
|
|
528
528
|
h(r.items), console.error(`Failed to send telemetry: HTTP ${l.status} (requeued: ${s})`);
|
|
@@ -546,11 +546,11 @@ function Et(e) {
|
|
|
546
546
|
function h(e) {
|
|
547
547
|
if (e.length === 0) return;
|
|
548
548
|
let t = c();
|
|
549
|
-
m(t,
|
|
549
|
+
m(t, Ft([...e, ...t.items]));
|
|
550
550
|
}
|
|
551
551
|
function g(e) {
|
|
552
552
|
let t = c();
|
|
553
|
-
t.items.push(e), m(t,
|
|
553
|
+
t.items.push(e), m(t, Ft(t.items));
|
|
554
554
|
}
|
|
555
555
|
async function _(e) {
|
|
556
556
|
g(e), await p();
|
|
@@ -564,27 +564,27 @@ function Et(e) {
|
|
|
564
564
|
}
|
|
565
565
|
//#endregion
|
|
566
566
|
//#region src/tools/track-event.ts
|
|
567
|
-
var
|
|
568
|
-
function
|
|
567
|
+
var R, Rt;
|
|
568
|
+
function zt() {
|
|
569
569
|
let e = window.__efpEvent;
|
|
570
|
-
if (
|
|
571
|
-
|
|
570
|
+
if (R && Rt === e) return R;
|
|
571
|
+
R == null || R.flush();
|
|
572
572
|
let t;
|
|
573
573
|
try {
|
|
574
574
|
var n, r;
|
|
575
575
|
let e = new URL((n = (r = i()) == null ? void 0 : r.trackerUrl) == null ? "" : n).searchParams.get("expoId");
|
|
576
576
|
t = e ? Number(e) : void 0;
|
|
577
577
|
} catch (e) {
|
|
578
|
-
|
|
578
|
+
c.error(e);
|
|
579
579
|
}
|
|
580
|
-
return
|
|
580
|
+
return R = Lt({
|
|
581
581
|
url: "https://app.expofp.com/api/telemetry",
|
|
582
582
|
expo: e,
|
|
583
583
|
expoId: t
|
|
584
|
-
}),
|
|
584
|
+
}), Rt = e, a(Kt), R;
|
|
585
585
|
}
|
|
586
|
-
function
|
|
587
|
-
let r =
|
|
586
|
+
function Bt(e, t, n) {
|
|
587
|
+
let r = gt(), i = r[r.length - 2];
|
|
588
588
|
return {
|
|
589
589
|
type: e,
|
|
590
590
|
subtype: n,
|
|
@@ -594,45 +594,45 @@ function kt(e, t, n) {
|
|
|
594
594
|
referrer: i ? window.location.origin + i : ""
|
|
595
595
|
};
|
|
596
596
|
}
|
|
597
|
-
function
|
|
597
|
+
function Vt() {
|
|
598
598
|
var e;
|
|
599
599
|
return !!window.__efpEvent && !!((e = i()) != null && e.trackerUrl) && !I.heatmap;
|
|
600
600
|
}
|
|
601
|
-
async function
|
|
602
|
-
if (
|
|
601
|
+
async function Ht(e, t, n) {
|
|
602
|
+
if (c.log("trackEvent", e, t, n), Vt()) try {
|
|
603
603
|
var r;
|
|
604
|
-
let i =
|
|
605
|
-
if (a ? o = await
|
|
606
|
-
let s =
|
|
604
|
+
let i = Bt(e, t, n), a = ce(), o = null;
|
|
605
|
+
if (a ? o = await Wt(a) : localStorage.removeItem(ie), !Vt()) return;
|
|
606
|
+
let s = zt();
|
|
607
607
|
if (a && !o) {
|
|
608
608
|
s.enqueue(i);
|
|
609
609
|
return;
|
|
610
610
|
}
|
|
611
|
-
s.setKioskId((r = o) == null ? "" : r),
|
|
611
|
+
s.setKioskId((r = o) == null ? "" : r), qt(s), await s.send(i);
|
|
612
612
|
} catch (e) {
|
|
613
|
-
|
|
613
|
+
c.error("trackEvent", String(e));
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
|
-
var
|
|
617
|
-
async function
|
|
616
|
+
var Ut;
|
|
617
|
+
async function Wt(e) {
|
|
618
618
|
if (!e) return null;
|
|
619
|
-
let t = localStorage.getItem(
|
|
619
|
+
let t = localStorage.getItem(ie);
|
|
620
620
|
if (t) return t;
|
|
621
|
-
if (!
|
|
621
|
+
if (!Ut) {
|
|
622
622
|
let t = window.__efpEvent;
|
|
623
|
-
|
|
624
|
-
|
|
623
|
+
Ut = ee(e, "https://app.expofp.com/").then((e) => !e || window.__efpEvent !== t ? null : (localStorage.setItem(ie, e), e)).finally(() => {
|
|
624
|
+
Ut = void 0;
|
|
625
625
|
});
|
|
626
626
|
}
|
|
627
|
-
return
|
|
627
|
+
return Ut;
|
|
628
628
|
}
|
|
629
|
-
var
|
|
630
|
-
function
|
|
631
|
-
|
|
629
|
+
var Gt = !1;
|
|
630
|
+
function Kt() {
|
|
631
|
+
R == null || R.flush(), R = void 0, Rt = void 0, Gt = !1;
|
|
632
632
|
}
|
|
633
|
-
function
|
|
634
|
-
if (
|
|
635
|
-
|
|
633
|
+
function qt(e) {
|
|
634
|
+
if (Gt) return;
|
|
635
|
+
Gt = !0;
|
|
636
636
|
let t = "efp-track-events";
|
|
637
637
|
try {
|
|
638
638
|
let r = localStorage.getItem(t);
|
|
@@ -654,21 +654,21 @@ function Ft(e) {
|
|
|
654
654
|
}
|
|
655
655
|
localStorage.removeItem(t);
|
|
656
656
|
} catch (e) {
|
|
657
|
-
localStorage.removeItem(t),
|
|
657
|
+
localStorage.removeItem(t), c.error("Failed to migrate old events.", String(e));
|
|
658
658
|
}
|
|
659
659
|
}
|
|
660
660
|
//#endregion
|
|
661
661
|
//#region src/tools/gtag.ts
|
|
662
|
-
var
|
|
662
|
+
var Jt = "G-78CKLYWFJK";
|
|
663
663
|
window.dataLayer = window.dataLayer || [];
|
|
664
|
-
function
|
|
664
|
+
function z(...e) {
|
|
665
665
|
var t, n;
|
|
666
666
|
((n = (t = window).dataLayer) == null ? t.dataLayer = [] : n).push(arguments);
|
|
667
667
|
}
|
|
668
|
-
var
|
|
668
|
+
var B = /*#__PURE__*/ function(e) {
|
|
669
669
|
return e.Load = "Load floor plan", e.ViewBooth = "View booth", e.ViewExhibitor = "View exhibitor", e.ViewCategory = "View category", e.Search = "Search", e.ClickCustomButton = "Click custom button", e.ViewVideo = "View video", e.ViewGallery = "View gallery", e.ClickPhone = "Click phone", e.ClickEmail = "Click email", e.ClickWebsite = "Click website", e.ClickFacebook = "Click Facebook", e.ClickInstagaram = "Click Instagram", e.ClickLinkedin = "Click Linkedin", e.ClickTwitter = "Click Twitter", e.ClickGooglePlus = "Click Google Plus", e.ClickXing = "Click Xing", e.ClickYoutube = "Click Youtube", e.ClickBookmark = "Click bookmark", e.ClickDirections = "Click Directions", e.Rendered = "Floor plan rendered", e.WsExhibitorClick = "ws_exhibitor_click", e;
|
|
670
670
|
}({});
|
|
671
|
-
async function
|
|
671
|
+
async function Yt() {
|
|
672
672
|
try {
|
|
673
673
|
let e = fetch("https://consent.expofp.com/api/verify-ip/is-in-gdpr"), t = new Promise((e) => {
|
|
674
674
|
setTimeout(() => {
|
|
@@ -680,118 +680,118 @@ async function Lt() {
|
|
|
680
680
|
return console.error(e), null;
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
|
-
function
|
|
683
|
+
function Xt(e) {
|
|
684
684
|
if (e === "granted" || e === "denied") return e;
|
|
685
685
|
let t = document.cookie.split("; ").find((e) => e.startsWith("cookie_consent="));
|
|
686
686
|
if (t) return t === "cookie_consent=true" ? "granted" : "denied";
|
|
687
687
|
}
|
|
688
|
-
function
|
|
689
|
-
let t = 2592e3, n =
|
|
688
|
+
function Zt(e) {
|
|
689
|
+
let t = 2592e3, n = d ? "localhost" : ".expofp.com";
|
|
690
690
|
document.cookie = `cookie_consent=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${n}`, document.cookie = "cookie_consent=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/", document.cookie = e ? `cookie_consent=${e}; max-age=${t}; domain=${n}; path=/` : `cookie_consent=${e}; max-age=${t}; path=/`;
|
|
691
691
|
}
|
|
692
|
-
function
|
|
693
|
-
let e = document.cookie.split(";"), t =
|
|
692
|
+
function Qt() {
|
|
693
|
+
let e = document.cookie.split(";"), t = d ? "localhost" : ".expofp.com";
|
|
694
694
|
for (let n = 0; n < e.length; n++) {
|
|
695
695
|
let r = e[n], i = r.indexOf("="), a = i > -1 ? r.substr(0, i).trim() : r.trim();
|
|
696
696
|
a.startsWith("_ga") && (document.cookie = `${a}=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${t}`);
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
|
-
function
|
|
700
|
-
let t =
|
|
701
|
-
t && (t === "denied" ? (
|
|
699
|
+
function $t(e) {
|
|
700
|
+
let t = Xt(e);
|
|
701
|
+
t && (t === "denied" ? (Qt(), M.gtag && (window[`ga-disable-${M.gtag}`] = !0), window[`ga-disable-${Jt}`] = !0) : (M.gtag && (window[`ga-disable-${M.gtag}`] = !1), window[`ga-disable-${Jt}`] = !1), z("consent", "update", {
|
|
702
702
|
analytics_storage: t,
|
|
703
703
|
ad_personalization: t
|
|
704
704
|
}));
|
|
705
705
|
}
|
|
706
|
-
function
|
|
706
|
+
function en(e, t, n) {
|
|
707
707
|
switch (e) {
|
|
708
|
-
case
|
|
709
|
-
|
|
708
|
+
case B.ViewBooth:
|
|
709
|
+
z("event", "select_content", {
|
|
710
710
|
content_type: e,
|
|
711
711
|
content_id: t
|
|
712
|
-
}),
|
|
712
|
+
}), Ht("booview", t);
|
|
713
713
|
break;
|
|
714
|
-
case
|
|
715
|
-
|
|
714
|
+
case B.ViewCategory:
|
|
715
|
+
z("event", "select_content", {
|
|
716
716
|
content_type: e,
|
|
717
717
|
content_id: t
|
|
718
|
-
}),
|
|
718
|
+
}), Ht("catview", t);
|
|
719
719
|
break;
|
|
720
|
-
case
|
|
721
|
-
case
|
|
722
|
-
case
|
|
723
|
-
|
|
720
|
+
case B.ViewExhibitor:
|
|
721
|
+
case B.ViewGallery:
|
|
722
|
+
case B.ViewVideo:
|
|
723
|
+
z("event", "select_content", {
|
|
724
724
|
content_type: e,
|
|
725
725
|
content_id: t
|
|
726
726
|
});
|
|
727
727
|
break;
|
|
728
|
-
case
|
|
729
|
-
|
|
728
|
+
case B.Search:
|
|
729
|
+
z("event", "search", { search_term: t }), Ht("search", t);
|
|
730
730
|
break;
|
|
731
|
-
case
|
|
732
|
-
case
|
|
733
|
-
case
|
|
734
|
-
case
|
|
735
|
-
case
|
|
736
|
-
case
|
|
737
|
-
case
|
|
738
|
-
case
|
|
739
|
-
case
|
|
740
|
-
case
|
|
741
|
-
case
|
|
742
|
-
|
|
731
|
+
case B.ClickCustomButton:
|
|
732
|
+
case B.ClickPhone:
|
|
733
|
+
case B.ClickEmail:
|
|
734
|
+
case B.ClickWebsite:
|
|
735
|
+
case B.ClickFacebook:
|
|
736
|
+
case B.ClickInstagaram:
|
|
737
|
+
case B.ClickLinkedin:
|
|
738
|
+
case B.ClickTwitter:
|
|
739
|
+
case B.ClickGooglePlus:
|
|
740
|
+
case B.ClickXing:
|
|
741
|
+
case B.ClickYoutube:
|
|
742
|
+
z("event", "share", {
|
|
743
743
|
content_type: e,
|
|
744
744
|
content_id: t
|
|
745
|
-
}),
|
|
745
|
+
}), Ht("share", t);
|
|
746
746
|
break;
|
|
747
|
-
case
|
|
748
|
-
|
|
749
|
-
content_type:
|
|
747
|
+
case B.ClickBookmark:
|
|
748
|
+
z("event", "share", {
|
|
749
|
+
content_type: B.ClickCustomButton,
|
|
750
750
|
content_id: t
|
|
751
751
|
});
|
|
752
752
|
break;
|
|
753
|
-
case
|
|
754
|
-
|
|
753
|
+
case B.ClickDirections:
|
|
754
|
+
z("event", "route", {
|
|
755
755
|
content_type: e,
|
|
756
756
|
content_id: t
|
|
757
|
-
}),
|
|
757
|
+
}), Ht("route", t);
|
|
758
758
|
break;
|
|
759
|
-
default:
|
|
759
|
+
default: z("event", e, {
|
|
760
760
|
content_type: n,
|
|
761
761
|
content_id: t
|
|
762
762
|
});
|
|
763
763
|
}
|
|
764
764
|
}
|
|
765
|
-
function
|
|
766
|
-
|
|
765
|
+
function tn(e, t) {
|
|
766
|
+
z("event", e, {
|
|
767
767
|
...t,
|
|
768
|
-
fp_key:
|
|
768
|
+
fp_key: j.EXPO
|
|
769
769
|
});
|
|
770
770
|
}
|
|
771
|
-
function
|
|
772
|
-
|
|
771
|
+
function nn(e) {
|
|
772
|
+
tn(B.WsExhibitorClick, {
|
|
773
773
|
exhibitor_id: e.id,
|
|
774
774
|
exhibitor_name: e.name,
|
|
775
775
|
exhibitor_external_id: e.externalId,
|
|
776
776
|
creative_slot: "ws_slider"
|
|
777
|
-
}),
|
|
777
|
+
}), Ht("ws_exhibitor_click", e.id);
|
|
778
778
|
}
|
|
779
|
-
window.gtag =
|
|
780
|
-
function
|
|
779
|
+
window.gtag = z;
|
|
780
|
+
function rn(e) {
|
|
781
781
|
let t = document.createElement("script");
|
|
782
782
|
t.type = "text/javascript", t.async = !0, t.src = `https://www.googletagmanager.com/gtag/js?id=${e}`;
|
|
783
783
|
let n = document.getElementsByTagName("script")[0];
|
|
784
784
|
return n != null && n.parentNode ? n.parentNode.insertBefore(t, n) : document.head.appendChild(t), t;
|
|
785
785
|
}
|
|
786
|
-
var
|
|
787
|
-
function
|
|
788
|
-
if (
|
|
789
|
-
let e =
|
|
790
|
-
|
|
786
|
+
var an;
|
|
787
|
+
function on() {
|
|
788
|
+
if (an || (an = rn(Jt), z("js", /* @__PURE__ */ new Date())), M.gtag) {
|
|
789
|
+
let e = rn(M.gtag);
|
|
790
|
+
z("config", M.gtag, { fp_key: j.EXPO }), a(() => e.remove());
|
|
791
791
|
}
|
|
792
|
-
|
|
792
|
+
z("config", Jt, { fp_key: j.EXPO });
|
|
793
793
|
}
|
|
794
|
-
|
|
794
|
+
z("consent", "default", {
|
|
795
795
|
ad_storage: "denied",
|
|
796
796
|
analytics_storage: "denied",
|
|
797
797
|
region: /* @__PURE__ */ "BE.BG.CZ.DK.DE.EE.IE.EL.ES.FR.HR.IT.CY.LV.LT.LU.HU.MT.NL.AT.PL.PT.RO.SI.SK.FI.SE.UK.IS.NO.LI.CH.MK.AL.RS.TR".split("."),
|
|
@@ -802,19 +802,19 @@ H("consent", "default", {
|
|
|
802
802
|
});
|
|
803
803
|
//#endregion
|
|
804
804
|
//#region src/utils/calcSpeed.ts
|
|
805
|
-
var
|
|
806
|
-
function
|
|
805
|
+
var sn = 1.4, cn = 4.2;
|
|
806
|
+
function ln(e) {
|
|
807
807
|
var t;
|
|
808
|
-
return (e == null || (t = e.toLowerCase) == null ? void 0 : t.call(e).trim()) === "m" ?
|
|
808
|
+
return (e == null || (t = e.toLowerCase) == null ? void 0 : t.call(e).trim()) === "m" ? sn : cn;
|
|
809
809
|
}
|
|
810
810
|
//#endregion
|
|
811
811
|
//#region src/utils/calcTravelTime.ts
|
|
812
|
-
function
|
|
812
|
+
function un(e, t) {
|
|
813
813
|
return Math.round(e / t);
|
|
814
814
|
}
|
|
815
815
|
//#endregion
|
|
816
816
|
//#region src/utils/geo-anchors.ts
|
|
817
|
-
function
|
|
817
|
+
function dn(e) {
|
|
818
818
|
return [{
|
|
819
819
|
local: {
|
|
820
820
|
x: e.p0.x,
|
|
@@ -837,65 +837,65 @@ function Qt(e) {
|
|
|
837
837
|
}
|
|
838
838
|
//#endregion
|
|
839
839
|
//#region src/utils/planBearing.ts
|
|
840
|
-
function
|
|
840
|
+
function fn(e) {
|
|
841
841
|
return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + e * Math.PI / 360))) / 360;
|
|
842
842
|
}
|
|
843
|
-
function
|
|
844
|
-
let n = (Math.atan2(
|
|
843
|
+
function pn(e, t) {
|
|
844
|
+
let n = (Math.atan2(fn(t.lat) - fn(e.lat), (t.lng - e.lng) / 360) - Math.atan2(t.y - e.y, t.x - e.x)) * 180 / Math.PI % 360;
|
|
845
845
|
return Number.isFinite(n) ? (n + 360) % 360 : NaN;
|
|
846
846
|
}
|
|
847
847
|
//#endregion
|
|
848
848
|
//#region src/utils/gps.ts
|
|
849
|
-
function
|
|
849
|
+
function V(e) {
|
|
850
850
|
return typeof e == "number" && Number.isFinite(e);
|
|
851
851
|
}
|
|
852
|
-
function
|
|
853
|
-
if (!(
|
|
854
|
-
let [i, a] =
|
|
852
|
+
function mn({ lat: e, lng: t, angle: n }, r) {
|
|
853
|
+
if (!(V(e) && V(t))) return null;
|
|
854
|
+
let [i, a] = dn(r), o = Me({
|
|
855
855
|
lat: e,
|
|
856
856
|
lng: t
|
|
857
857
|
}, i, a);
|
|
858
|
-
return
|
|
858
|
+
return V(o.x) && V(o.y) ? {
|
|
859
859
|
...o,
|
|
860
860
|
angle: n
|
|
861
861
|
} : null;
|
|
862
862
|
}
|
|
863
|
-
function
|
|
864
|
-
if (!(
|
|
865
|
-
let { p0: i, p2: a } = r, o =
|
|
866
|
-
if (!
|
|
863
|
+
function hn({ lat: e, lng: t, angle: n }, r) {
|
|
864
|
+
if (!(V(e) && V(t))) return null;
|
|
865
|
+
let { p0: i, p2: a } = r, o = De(i, a);
|
|
866
|
+
if (!V(o) || o <= 0) return c.warn("Invalid GPS config: zero or negative distance", {
|
|
867
867
|
fullGpsDistance: o,
|
|
868
868
|
p0: i,
|
|
869
869
|
p2: a
|
|
870
870
|
}), null;
|
|
871
|
-
let
|
|
871
|
+
let s = mn({
|
|
872
872
|
lat: e,
|
|
873
873
|
lng: t,
|
|
874
874
|
angle: n
|
|
875
875
|
}, r);
|
|
876
|
-
return
|
|
877
|
-
p0:
|
|
878
|
-
p1:
|
|
876
|
+
return s ? Ne({
|
|
877
|
+
p0: s,
|
|
878
|
+
p1: Pe({
|
|
879
879
|
p0: i,
|
|
880
880
|
p1: a
|
|
881
881
|
})
|
|
882
|
-
}) > 5 * P(i, a) ? (
|
|
882
|
+
}) > 5 * P(i, a) ? (c.warn("Current position too far"), null) : s : null;
|
|
883
883
|
}
|
|
884
|
-
function
|
|
885
|
-
let [r, i] =
|
|
884
|
+
function gn(e, t, n) {
|
|
885
|
+
let [r, i] = dn(n), { lat: a, lng: o } = je({
|
|
886
886
|
x: e,
|
|
887
887
|
y: t
|
|
888
888
|
}, r, i);
|
|
889
889
|
return [o, a];
|
|
890
890
|
}
|
|
891
|
-
function
|
|
891
|
+
function _n(e) {
|
|
892
892
|
var t, n;
|
|
893
|
-
let r = (t =
|
|
893
|
+
let r = (t = Re()) == null || (t = t.properties) == null ? void 0 : t.config, i = r ? pn(r.p0, r.p2) : NaN, a = Number.isFinite(i) ? i : (n = r == null ? void 0 : r.bearing) == null ? 0 : n;
|
|
894
894
|
return (e == null ? void 0 : e.angle) === null ? 0 : (((e.angle - a) % 360 + 360) % 360 - 90 + 360) % 360;
|
|
895
895
|
}
|
|
896
896
|
//#endregion
|
|
897
897
|
//#region ../wayfinding/src/core/graph/buildGraph.ts
|
|
898
|
-
function
|
|
898
|
+
function vn(e, t, n) {
|
|
899
899
|
var r, i;
|
|
900
900
|
return t.build(e.getLines(), {
|
|
901
901
|
oriented: (r = n.oriented) == null || r,
|
|
@@ -908,7 +908,7 @@ function on(e, t, n) {
|
|
|
908
908
|
}
|
|
909
909
|
//#endregion
|
|
910
910
|
//#region ../../node_modules/.pnpm/ngraph.events@1.4.0/node_modules/ngraph.events/dist/ngraph.events.cjs
|
|
911
|
-
var
|
|
911
|
+
var yn = /* @__PURE__ */ t(((e, t) => {
|
|
912
912
|
function n(e) {
|
|
913
913
|
i(e);
|
|
914
914
|
let t = r(e);
|
|
@@ -957,12 +957,12 @@ var sn = /* @__PURE__ */ t(((e, t) => {
|
|
|
957
957
|
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] + "'");
|
|
958
958
|
}
|
|
959
959
|
t.exports = n;
|
|
960
|
-
})),
|
|
960
|
+
})), bn = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
961
961
|
t.exports = r;
|
|
962
|
-
var n =
|
|
962
|
+
var n = yn();
|
|
963
963
|
function r(e) {
|
|
964
964
|
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");
|
|
965
|
-
var t = /* @__PURE__ */ new Map(), r = [], l = {}, u = 0, d = e.multigraph ? E : T, f = [], p =
|
|
965
|
+
var t = /* @__PURE__ */ new Map(), r = [], l = {}, u = 0, d = e.multigraph ? E : T, f = [], p = ie, m = ie, h = ie, g = ie, _ = {
|
|
966
966
|
addNode: x,
|
|
967
967
|
addLink: w,
|
|
968
968
|
removeLink: A,
|
|
@@ -973,7 +973,7 @@ var sn = /* @__PURE__ */ t(((e, t) => {
|
|
|
973
973
|
getLinksCount: O,
|
|
974
974
|
getNodesCount: D,
|
|
975
975
|
getLinks: k,
|
|
976
|
-
forEachNode:
|
|
976
|
+
forEachNode: se,
|
|
977
977
|
forEachLinkedNode: M,
|
|
978
978
|
forEachLink: te,
|
|
979
979
|
beginUpdate: h,
|
|
@@ -988,7 +988,7 @@ var sn = /* @__PURE__ */ t(((e, t) => {
|
|
|
988
988
|
var e = _.on;
|
|
989
989
|
_.on = t;
|
|
990
990
|
function t() {
|
|
991
|
-
return _.beginUpdate = h =
|
|
991
|
+
return _.beginUpdate = h = ae, _.endUpdate = g = oe, p = y, m = b, _.on = e, e.apply(_, arguments);
|
|
992
992
|
}
|
|
993
993
|
}
|
|
994
994
|
function y(e, t) {
|
|
@@ -1068,7 +1068,7 @@ var sn = /* @__PURE__ */ t(((e, t) => {
|
|
|
1068
1068
|
return null;
|
|
1069
1069
|
}
|
|
1070
1070
|
function ee() {
|
|
1071
|
-
h(),
|
|
1071
|
+
h(), se(function(e) {
|
|
1072
1072
|
C(e.id);
|
|
1073
1073
|
}), g();
|
|
1074
1074
|
}
|
|
@@ -1092,14 +1092,14 @@ var sn = /* @__PURE__ */ t(((e, t) => {
|
|
|
1092
1092
|
if (o.fromId === n && (i = r(t.get(o.toId), o), i)) return !0;
|
|
1093
1093
|
}
|
|
1094
1094
|
}
|
|
1095
|
-
function
|
|
1096
|
-
function
|
|
1095
|
+
function ie() {}
|
|
1096
|
+
function ae() {
|
|
1097
1097
|
u += 1;
|
|
1098
1098
|
}
|
|
1099
|
-
function
|
|
1099
|
+
function oe() {
|
|
1100
1100
|
--u, u === 0 && f.length > 0 && (_.fire("changed", f), f.length = 0);
|
|
1101
1101
|
}
|
|
1102
|
-
function
|
|
1102
|
+
function se(e) {
|
|
1103
1103
|
if (typeof e != "function") throw Error("Function is expected to iterate over graph nodes. You passed " + e);
|
|
1104
1104
|
for (var n = t.values(), r = n.next(); !r.done;) {
|
|
1105
1105
|
if (e(r.value)) return !0;
|
|
@@ -1126,29 +1126,29 @@ var sn = /* @__PURE__ */ t(((e, t) => {
|
|
|
1126
1126
|
function c(e, t) {
|
|
1127
1127
|
return e.toString() + "👉 " + t.toString();
|
|
1128
1128
|
}
|
|
1129
|
-
})))(), 1),
|
|
1129
|
+
})))(), 1), xn = (e) => {
|
|
1130
1130
|
var t;
|
|
1131
1131
|
return `${(t = e.layer) == null ? "" : t}_${e.x}_${e.y}`;
|
|
1132
|
-
},
|
|
1132
|
+
}, Sn = 1, Cn = (e, t) => {
|
|
1133
1133
|
var n, r;
|
|
1134
|
-
return ((n = e.layer) == null ? "" : n) === ((r = t.layer) == null ? "" : r) && P(e, t) <=
|
|
1135
|
-
},
|
|
1136
|
-
function
|
|
1137
|
-
return e.find((e) =>
|
|
1134
|
+
return ((n = e.layer) == null ? "" : n) === ((r = t.layer) == null ? "" : r) && P(e, t) <= Sn;
|
|
1135
|
+
}, wn = (e, t, n) => Cn(e.p0, t) && Cn(e.p1, n) || Cn(e.p0, n) && Cn(e.p1, t);
|
|
1136
|
+
function Tn(e, t, n) {
|
|
1137
|
+
return e.find((e) => wn(e, t, n));
|
|
1138
1138
|
}
|
|
1139
|
-
var
|
|
1140
|
-
function
|
|
1139
|
+
var En = D(5);
|
|
1140
|
+
function Dn(e, t) {
|
|
1141
1141
|
var n, r, i, a, o, s;
|
|
1142
1142
|
if (e.virtual !== t.virtual || ((n = e.p0.layer) == null ? "" : n) !== ((r = e.p1.layer) == null ? "" : r) || ((i = t.p0.layer) == null ? "" : i) !== ((a = t.p1.layer) == null ? "" : a) || ((o = e.p1.layer) == null ? "" : o) !== ((s = t.p0.layer) == null ? "" : s)) return !1;
|
|
1143
|
-
let c =
|
|
1144
|
-
return u > Math.PI && (u = 2 * Math.PI - u), u <=
|
|
1143
|
+
let c = Fe(e.p0, e.p1), l = Fe(t.p0, t.p1), u = Math.abs(l - c);
|
|
1144
|
+
return u > Math.PI && (u = 2 * Math.PI - u), u <= En;
|
|
1145
1145
|
}
|
|
1146
|
-
function
|
|
1146
|
+
function On(e, t) {
|
|
1147
1147
|
let n = [];
|
|
1148
1148
|
for (let r = 1; r < e.length; r++) {
|
|
1149
|
-
let i = e[r - 1], a = e[r], o =
|
|
1149
|
+
let i = e[r - 1], a = e[r], o = Tn(t, i, a);
|
|
1150
1150
|
if (!o) {
|
|
1151
|
-
console.warn(`WF: buildRouteSegments — no line found between ${
|
|
1151
|
+
console.warn(`WF: buildRouteSegments — no line found between ${xn(i)} and ${xn(a)}`);
|
|
1152
1152
|
continue;
|
|
1153
1153
|
}
|
|
1154
1154
|
let s = {
|
|
@@ -1156,7 +1156,7 @@ function hn(e, t) {
|
|
|
1156
1156
|
p1: a,
|
|
1157
1157
|
virtual: o.virtual
|
|
1158
1158
|
}, c = n[n.length - 1];
|
|
1159
|
-
c &&
|
|
1159
|
+
c && Dn(c, s) ? n[n.length - 1] = {
|
|
1160
1160
|
...c,
|
|
1161
1161
|
p1: s.p1
|
|
1162
1162
|
} : n.push(s);
|
|
@@ -1165,79 +1165,79 @@ function hn(e, t) {
|
|
|
1165
1165
|
}
|
|
1166
1166
|
//#endregion
|
|
1167
1167
|
//#region ../wayfinding/src/core/graph/constants.ts
|
|
1168
|
-
var
|
|
1168
|
+
var kn = 1e4, An = 1.01;
|
|
1169
1169
|
//#endregion
|
|
1170
1170
|
//#region ../wayfinding/src/core/graph/linkCost.ts
|
|
1171
|
-
function
|
|
1171
|
+
function jn(e) {
|
|
1172
1172
|
return P(e.p0, e.p1) / (e.weight || 4);
|
|
1173
1173
|
}
|
|
1174
|
-
function
|
|
1174
|
+
function Mn(e) {
|
|
1175
1175
|
var t, n;
|
|
1176
1176
|
return ((t = e.p0.layer) == null ? "" : t) !== ((n = e.p1.layer) == null ? "" : n);
|
|
1177
1177
|
}
|
|
1178
|
-
function
|
|
1179
|
-
return e.virtual ? e.virtualLength == null ?
|
|
1178
|
+
function Nn(e) {
|
|
1179
|
+
return e.virtual ? e.virtualLength == null ? Mn(e) ? kn : 0 : e.virtualLength : jn(e);
|
|
1180
1180
|
}
|
|
1181
1181
|
//#endregion
|
|
1182
1182
|
//#region ../wayfinding/src/core/graph/buildNGraph.ts
|
|
1183
|
-
function
|
|
1184
|
-
let { oriented: n, onlyAccessible: r } = t, i = (0,
|
|
1183
|
+
function Pn(e, t) {
|
|
1184
|
+
let { oriented: n, onlyAccessible: r } = t, i = (0, bn.default)();
|
|
1185
1185
|
for (let t of e) {
|
|
1186
1186
|
if (r && t.unaccessible) continue;
|
|
1187
|
-
let e =
|
|
1187
|
+
let e = xn(t.p0), a = xn(t.p1), o = Nn(t);
|
|
1188
1188
|
i.addLink(e, a, { distance: o }), n && !t.unidirection && i.addLink(a, e, { distance: o });
|
|
1189
1189
|
}
|
|
1190
1190
|
return i;
|
|
1191
1191
|
}
|
|
1192
1192
|
//#endregion
|
|
1193
1193
|
//#region ../wayfinding/src/core/graph/utils/a-star/defaultSettings.js
|
|
1194
|
-
var
|
|
1195
|
-
typeof Object.freeze == "function" && Object.freeze(
|
|
1196
|
-
var
|
|
1197
|
-
heuristic:
|
|
1198
|
-
distance:
|
|
1199
|
-
blocked:
|
|
1200
|
-
compareFScore:
|
|
1201
|
-
NO_PATH:
|
|
1202
|
-
setHeapIndex:
|
|
1203
|
-
setH1:
|
|
1204
|
-
setH2:
|
|
1205
|
-
compareF1Score:
|
|
1206
|
-
compareF2Score:
|
|
1194
|
+
var Fn = [];
|
|
1195
|
+
typeof Object.freeze == "function" && Object.freeze(Fn);
|
|
1196
|
+
var In = {
|
|
1197
|
+
heuristic: Ln,
|
|
1198
|
+
distance: Rn,
|
|
1199
|
+
blocked: zn,
|
|
1200
|
+
compareFScore: Bn,
|
|
1201
|
+
NO_PATH: Fn,
|
|
1202
|
+
setHeapIndex: Vn,
|
|
1203
|
+
setH1: Wn,
|
|
1204
|
+
setH2: Gn,
|
|
1205
|
+
compareF1Score: Hn,
|
|
1206
|
+
compareF2Score: Un
|
|
1207
1207
|
};
|
|
1208
|
-
function
|
|
1208
|
+
function Ln() {
|
|
1209
1209
|
return 0;
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1211
|
+
function Rn() {
|
|
1212
1212
|
return 1;
|
|
1213
1213
|
}
|
|
1214
|
-
function
|
|
1214
|
+
function zn() {
|
|
1215
1215
|
return !1;
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1217
|
+
function Bn(e, t) {
|
|
1218
1218
|
return e.fScore - t.fScore;
|
|
1219
1219
|
}
|
|
1220
|
-
function
|
|
1220
|
+
function Vn(e, t) {
|
|
1221
1221
|
e.heapIndex = t;
|
|
1222
1222
|
}
|
|
1223
|
-
function
|
|
1223
|
+
function Hn(e, t) {
|
|
1224
1224
|
return e.f1 - t.f1;
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1226
|
+
function Un(e, t) {
|
|
1227
1227
|
return e.f2 - t.f2;
|
|
1228
1228
|
}
|
|
1229
|
-
function
|
|
1229
|
+
function Wn(e, t) {
|
|
1230
1230
|
e.h1 = t;
|
|
1231
1231
|
}
|
|
1232
|
-
function
|
|
1232
|
+
function Gn(e, t) {
|
|
1233
1233
|
e.h2 = t;
|
|
1234
1234
|
}
|
|
1235
1235
|
//#endregion
|
|
1236
1236
|
//#region ../wayfinding/src/core/graph/utils/a-star/makeSearchStatePool.js
|
|
1237
|
-
function
|
|
1237
|
+
function Kn(e) {
|
|
1238
1238
|
this.node = e, this.parent = null, this.closed = !1, this.open = 0, this.distanceToSource = Infinity, this.fScore = Infinity, this.heapIndex = -1;
|
|
1239
1239
|
}
|
|
1240
|
-
function
|
|
1240
|
+
function qn() {
|
|
1241
1241
|
let e = 0, t = [];
|
|
1242
1242
|
return {
|
|
1243
1243
|
createNewState: r,
|
|
@@ -1248,21 +1248,21 @@ function Pn() {
|
|
|
1248
1248
|
}
|
|
1249
1249
|
function r(n) {
|
|
1250
1250
|
let r = t[e];
|
|
1251
|
-
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
|
|
1251
|
+
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 Kn(n), t[e] = r), e++, r;
|
|
1252
1252
|
}
|
|
1253
1253
|
}
|
|
1254
1254
|
//#endregion
|
|
1255
1255
|
//#region ../wayfinding/src/core/graph/utils/a-star/NodeHeap.js
|
|
1256
|
-
function
|
|
1257
|
-
if (!(this instanceof
|
|
1258
|
-
if (Array.isArray(e) || (t = e, e = []), t = t || {}, this.data = e || [], this.length = this.data.length, this.compare = t.compare ||
|
|
1256
|
+
function Jn(e, t) {
|
|
1257
|
+
if (!(this instanceof Jn)) return new Jn(e, t);
|
|
1258
|
+
if (Array.isArray(e) || (t = e, e = []), t = t || {}, this.data = e || [], this.length = this.data.length, this.compare = t.compare || Xn, this.setNodeId = t.setNodeId || Yn, this.length > 0) for (let e = this.length >> 1; e >= 0; e--) this._down(e);
|
|
1259
1259
|
if (t.setNodeId) for (let e = 0; e < this.length; ++e) this.setNodeId(this.data[e], e);
|
|
1260
1260
|
}
|
|
1261
|
-
function
|
|
1262
|
-
function
|
|
1261
|
+
function Yn() {}
|
|
1262
|
+
function Xn(e, t) {
|
|
1263
1263
|
return e - t;
|
|
1264
1264
|
}
|
|
1265
|
-
|
|
1265
|
+
Jn.prototype = {
|
|
1266
1266
|
push: function(e) {
|
|
1267
1267
|
this.data.push(e), this.setNodeId(e, this.length), this.length++, this._up(this.length - 1);
|
|
1268
1268
|
},
|
|
@@ -1298,16 +1298,16 @@ Fn.prototype = {
|
|
|
1298
1298
|
};
|
|
1299
1299
|
//#endregion
|
|
1300
1300
|
//#region ../wayfinding/src/core/graph/utils/a-star/a-star.js
|
|
1301
|
-
var
|
|
1302
|
-
function
|
|
1301
|
+
var Zn = In.NO_PATH;
|
|
1302
|
+
function Qn(e, t) {
|
|
1303
1303
|
t = t || {};
|
|
1304
1304
|
let n = t.oriented, r = t.blocked;
|
|
1305
|
-
r || (r =
|
|
1305
|
+
r || (r = In.blocked);
|
|
1306
1306
|
let i = t.heuristic;
|
|
1307
|
-
i || (i =
|
|
1307
|
+
i || (i = In.heuristic);
|
|
1308
1308
|
let a = t.distance;
|
|
1309
|
-
a || (a =
|
|
1310
|
-
let o =
|
|
1309
|
+
a || (a = In.distance);
|
|
1310
|
+
let o = qn();
|
|
1311
1311
|
return { find: s };
|
|
1312
1312
|
function s(t, s) {
|
|
1313
1313
|
let c = e.getNode(t);
|
|
@@ -1315,17 +1315,17 @@ function zn(e, t) {
|
|
|
1315
1315
|
let l = e.getNode(s);
|
|
1316
1316
|
if (!l) throw Error("toId is not defined in this graph: " + s);
|
|
1317
1317
|
o.reset();
|
|
1318
|
-
let u = /* @__PURE__ */ new Map(), d = new
|
|
1319
|
-
compare:
|
|
1320
|
-
setNodeId:
|
|
1318
|
+
let u = /* @__PURE__ */ new Map(), d = new Jn({
|
|
1319
|
+
compare: In.compareFScore,
|
|
1320
|
+
setNodeId: In.setHeapIndex
|
|
1321
1321
|
}), f = o.createNewState(c);
|
|
1322
1322
|
u.set(t, f), f.fScore = i(c, l), f.distanceToSource = 0, d.push(f), f.open = 1;
|
|
1323
1323
|
let p;
|
|
1324
1324
|
for (; d.length > 0;) {
|
|
1325
|
-
if (p = d.pop(),
|
|
1325
|
+
if (p = d.pop(), $n(p, l)) return er(p);
|
|
1326
1326
|
p.closed = !0, e.forEachLinkedNode(p.node.id, m, n);
|
|
1327
1327
|
}
|
|
1328
|
-
return
|
|
1328
|
+
return Zn;
|
|
1329
1329
|
function m(e, t) {
|
|
1330
1330
|
let n = u.get(e.id);
|
|
1331
1331
|
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;
|
|
@@ -1334,17 +1334,17 @@ function zn(e, t) {
|
|
|
1334
1334
|
}
|
|
1335
1335
|
}
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function $n(e, t) {
|
|
1338
1338
|
return e.node === t;
|
|
1339
1339
|
}
|
|
1340
|
-
function
|
|
1340
|
+
function er(e) {
|
|
1341
1341
|
let t = [e.node], n = e.parent;
|
|
1342
1342
|
for (; n;) t.push(n.node), n = n.parent;
|
|
1343
1343
|
return t;
|
|
1344
1344
|
}
|
|
1345
1345
|
//#endregion
|
|
1346
1346
|
//#region ../wayfinding/src/core/graph/pathfinder/parseNodeId.ts
|
|
1347
|
-
function
|
|
1347
|
+
function tr(e) {
|
|
1348
1348
|
let t = e.lastIndexOf("_"), n = e.lastIndexOf("_", t - 1);
|
|
1349
1349
|
if (n === -1) throw Error(`WF: invalid node ID format "${e}", expected "{layer}_{x}_{y}"`);
|
|
1350
1350
|
return [
|
|
@@ -1355,35 +1355,35 @@ function Hn(e) {
|
|
|
1355
1355
|
}
|
|
1356
1356
|
//#endregion
|
|
1357
1357
|
//#region ../wayfinding/src/core/graph/pathfinder/aStarPathFinder.ts
|
|
1358
|
-
function
|
|
1358
|
+
function nr() {
|
|
1359
1359
|
return function(e, t, n) {
|
|
1360
1360
|
let r = 1;
|
|
1361
1361
|
if (t.parent) {
|
|
1362
|
-
let [, n, i] =
|
|
1363
|
-
|
|
1362
|
+
let [, n, i] = tr(t.parent.node.id), [, a, o] = tr(t.node.id), [, s, c] = tr(e.id);
|
|
1363
|
+
Fe({
|
|
1364
1364
|
x: n,
|
|
1365
1365
|
y: i
|
|
1366
1366
|
}, {
|
|
1367
1367
|
x: a,
|
|
1368
1368
|
y: o
|
|
1369
|
-
}) !==
|
|
1369
|
+
}) !== Fe({
|
|
1370
1370
|
x: a,
|
|
1371
1371
|
y: o
|
|
1372
1372
|
}, {
|
|
1373
1373
|
x: s,
|
|
1374
1374
|
y: c
|
|
1375
|
-
}) && (r =
|
|
1375
|
+
}) && (r = An);
|
|
1376
1376
|
}
|
|
1377
1377
|
return r * n.data.distance;
|
|
1378
1378
|
};
|
|
1379
1379
|
}
|
|
1380
|
-
function
|
|
1380
|
+
function rr() {
|
|
1381
1381
|
let e = null, t = null;
|
|
1382
1382
|
return {
|
|
1383
1383
|
build(n, r) {
|
|
1384
|
-
t =
|
|
1384
|
+
t = Pn(n, r), e = Qn(t, {
|
|
1385
1385
|
oriented: r.oriented,
|
|
1386
|
-
distance:
|
|
1386
|
+
distance: nr()
|
|
1387
1387
|
});
|
|
1388
1388
|
},
|
|
1389
1389
|
hasNode(e) {
|
|
@@ -1393,7 +1393,7 @@ function Wn() {
|
|
|
1393
1393
|
if (!e) return [];
|
|
1394
1394
|
let r = e.find(t, n);
|
|
1395
1395
|
return r.length ? r.map((e) => {
|
|
1396
|
-
let [t, n, r] =
|
|
1396
|
+
let [t, n, r] = tr(e.id);
|
|
1397
1397
|
return {
|
|
1398
1398
|
id: e.id,
|
|
1399
1399
|
layer: t,
|
|
@@ -1406,11 +1406,11 @@ function Wn() {
|
|
|
1406
1406
|
}
|
|
1407
1407
|
//#endregion
|
|
1408
1408
|
//#region ../wayfinding/src/core/graph/graphCache.ts
|
|
1409
|
-
function
|
|
1409
|
+
function ir() {
|
|
1410
1410
|
let e = null, t = !1, n = null;
|
|
1411
1411
|
return { getOrBuild(r, i) {
|
|
1412
1412
|
let a = r.getLines();
|
|
1413
|
-
return e && t === i && n === a ? e : (e =
|
|
1413
|
+
return e && t === i && n === a ? e : (e = vn(r, rr(), {
|
|
1414
1414
|
oriented: !0,
|
|
1415
1415
|
onlyAccessible: i
|
|
1416
1416
|
}), t = i, n = a, e);
|
|
@@ -1418,71 +1418,71 @@ function Gn() {
|
|
|
1418
1418
|
}
|
|
1419
1419
|
//#endregion
|
|
1420
1420
|
//#region ../wayfinding/src/core/routing/getRouteLength.ts
|
|
1421
|
-
function
|
|
1421
|
+
function ar(e) {
|
|
1422
1422
|
return e.reduce((e, t) => e + P(t.p0, t.p1), 0);
|
|
1423
1423
|
}
|
|
1424
1424
|
//#endregion
|
|
1425
1425
|
//#region ../wayfinding/src/core/graph/findShortestPath.ts
|
|
1426
|
-
function
|
|
1426
|
+
function or(e, t, n) {
|
|
1427
1427
|
return {
|
|
1428
1428
|
layer: e,
|
|
1429
1429
|
x: t,
|
|
1430
1430
|
y: n
|
|
1431
1431
|
};
|
|
1432
1432
|
}
|
|
1433
|
-
function
|
|
1433
|
+
function sr(e, t) {
|
|
1434
1434
|
let n = 0;
|
|
1435
1435
|
for (let r = 1; r < e.length; r++) {
|
|
1436
|
-
let i =
|
|
1437
|
-
i && (n +=
|
|
1436
|
+
let i = Tn(t, e[r - 1], e[r]);
|
|
1437
|
+
i && (n += Nn(i));
|
|
1438
1438
|
}
|
|
1439
1439
|
return n;
|
|
1440
1440
|
}
|
|
1441
|
-
function
|
|
1441
|
+
function cr(e, t, n) {
|
|
1442
1442
|
let r = e.dataSource.getLines(), i = null, a = Infinity;
|
|
1443
1443
|
for (let o of t) for (let t of n) {
|
|
1444
|
-
let n =
|
|
1444
|
+
let n = xn(o), s = xn(t);
|
|
1445
1445
|
if (!e.finder.hasNode(n) || !e.finder.hasNode(s)) {
|
|
1446
1446
|
console.debug(`WF. findShortestPath: node not in graph, skipping pair ${n} → ${s}`);
|
|
1447
1447
|
continue;
|
|
1448
1448
|
}
|
|
1449
1449
|
let c = e.finder.find(n, s);
|
|
1450
1450
|
if (!c.length) continue;
|
|
1451
|
-
let l = c.map((e) =>
|
|
1451
|
+
let l = c.map((e) => or(e.layer, e.x, e.y)), u = On(l, r);
|
|
1452
1452
|
if (!u.length) continue;
|
|
1453
|
-
let d =
|
|
1453
|
+
let d = sr(l, r);
|
|
1454
1454
|
d < a && (a = d, i = {
|
|
1455
1455
|
lines: u,
|
|
1456
|
-
distance:
|
|
1456
|
+
distance: ar(u)
|
|
1457
1457
|
});
|
|
1458
1458
|
}
|
|
1459
1459
|
return i;
|
|
1460
1460
|
}
|
|
1461
1461
|
//#endregion
|
|
1462
1462
|
//#region ../wayfinding/src/core/routing/routeResult.ts
|
|
1463
|
-
var
|
|
1463
|
+
var lr = () => ({
|
|
1464
1464
|
lines: [],
|
|
1465
1465
|
totalDistance: 0
|
|
1466
1466
|
});
|
|
1467
1467
|
//#endregion
|
|
1468
1468
|
//#region ../wayfinding/src/core/routing/buildRoute.ts
|
|
1469
|
-
function
|
|
1470
|
-
if (!t.length || !n.length) return
|
|
1471
|
-
let r =
|
|
1469
|
+
function ur(e, t, n) {
|
|
1470
|
+
if (!t.length || !n.length) return lr();
|
|
1471
|
+
let r = cr(e, t, n);
|
|
1472
1472
|
return r ? {
|
|
1473
1473
|
lines: r.lines,
|
|
1474
1474
|
totalDistance: r.distance
|
|
1475
|
-
} :
|
|
1475
|
+
} : lr();
|
|
1476
1476
|
}
|
|
1477
1477
|
//#endregion
|
|
1478
1478
|
//#region ../wayfinding/src/core/routing/buildMultiPointRoute.ts
|
|
1479
|
-
function
|
|
1480
|
-
if (t.length < 2) return
|
|
1479
|
+
function dr(e, t) {
|
|
1480
|
+
if (t.length < 2) return lr();
|
|
1481
1481
|
let n = t.filter((e, n) => n === 0 || n === t.length - 1 || e.length > 0);
|
|
1482
|
-
if (n.length < 2) return
|
|
1483
|
-
if (n.length === 2) return
|
|
1482
|
+
if (n.length < 2) return lr();
|
|
1483
|
+
if (n.length === 2) return ur(e, n[0], n[1]);
|
|
1484
1484
|
let r = [];
|
|
1485
|
-
for (let t = 0; t < n.length - 1; t++) r.push(
|
|
1485
|
+
for (let t = 0; t < n.length - 1; t++) r.push(ur(e, n[t], n[t + 1]));
|
|
1486
1486
|
return {
|
|
1487
1487
|
lines: r.flatMap((e) => e.lines),
|
|
1488
1488
|
totalDistance: r.reduce((e, t) => e + t.totalDistance, 0)
|
|
@@ -1490,26 +1490,26 @@ function Qn(e, t) {
|
|
|
1490
1490
|
}
|
|
1491
1491
|
//#endregion
|
|
1492
1492
|
//#region ../wayfinding/src/core/routing/optimizeWaypointOrder.ts
|
|
1493
|
-
var
|
|
1494
|
-
function
|
|
1493
|
+
var fr = 100, pr = -.01;
|
|
1494
|
+
function mr(e) {
|
|
1495
1495
|
let t = new Map(e), n = Array.from(t.keys());
|
|
1496
1496
|
if (n.length <= 2) return n;
|
|
1497
|
-
let r =
|
|
1498
|
-
return r.length < 4 ? r :
|
|
1497
|
+
let r = gr(n, t);
|
|
1498
|
+
return r.length < 4 ? r : _r(r, t);
|
|
1499
1499
|
}
|
|
1500
|
-
function
|
|
1500
|
+
function hr(e) {
|
|
1501
1501
|
if (e.length <= 3) return e;
|
|
1502
1502
|
let t = e[0], n = e[e.length - 1], r = e.slice(1, -1);
|
|
1503
1503
|
return [
|
|
1504
1504
|
t,
|
|
1505
|
-
...
|
|
1505
|
+
...mr(r.map((e, t) => [String(t), {
|
|
1506
1506
|
x: e.x,
|
|
1507
1507
|
y: e.y
|
|
1508
1508
|
}])).map((e) => r[Number(e)]),
|
|
1509
1509
|
n
|
|
1510
1510
|
];
|
|
1511
1511
|
}
|
|
1512
|
-
function
|
|
1512
|
+
function gr(e, t) {
|
|
1513
1513
|
let n = [e[0]], r = new Set(e), i = e[0];
|
|
1514
1514
|
for (r.delete(e[0]); r.size > 0;) {
|
|
1515
1515
|
let e = t.get(i), a = "", o = Infinity;
|
|
@@ -1522,13 +1522,13 @@ function rr(e, t) {
|
|
|
1522
1522
|
}
|
|
1523
1523
|
return n;
|
|
1524
1524
|
}
|
|
1525
|
-
function
|
|
1525
|
+
function _r(e, t) {
|
|
1526
1526
|
let n = [...e], r = !0;
|
|
1527
|
-
for (let e = 0; r && e <
|
|
1527
|
+
for (let e = 0; r && e < fr; e++) {
|
|
1528
1528
|
r = !1;
|
|
1529
1529
|
scan: for (let e = 1; e < n.length - 2; e++) for (let i = e + 1; i < n.length - 1; i++) {
|
|
1530
1530
|
let a = t.get(n[e - 1]), o = t.get(n[e]), s = t.get(n[i]), c = t.get(n[i + 1]);
|
|
1531
|
-
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)) <
|
|
1531
|
+
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)) < pr) {
|
|
1532
1532
|
for (let t = e, r = i; t < r; t++, r--) [n[t], n[r]] = [n[r], n[t]];
|
|
1533
1533
|
r = !0;
|
|
1534
1534
|
break scan;
|
|
@@ -1539,8 +1539,8 @@ function ir(e, t) {
|
|
|
1539
1539
|
}
|
|
1540
1540
|
//#endregion
|
|
1541
1541
|
//#region ../wayfinding/src/core/geometry/projectPointOnSegment.ts
|
|
1542
|
-
function
|
|
1543
|
-
let { projected: r, distance: i, t: a } =
|
|
1542
|
+
function vr(e, t, n) {
|
|
1543
|
+
let { projected: r, distance: i, t: a } = Ie({
|
|
1544
1544
|
p0: t,
|
|
1545
1545
|
p1: n
|
|
1546
1546
|
}, e);
|
|
@@ -1555,40 +1555,40 @@ function ar(e, t, n) {
|
|
|
1555
1555
|
}
|
|
1556
1556
|
//#endregion
|
|
1557
1557
|
//#region ../wayfinding/src/core/geometry/pointInPolygon.ts
|
|
1558
|
-
var
|
|
1559
|
-
function
|
|
1558
|
+
var yr = .01;
|
|
1559
|
+
function br(e, t, n) {
|
|
1560
1560
|
return Math.abs(.5 * (e.x * (t.y - n.y) + t.x * (n.y - e.y) + n.x * (e.y - t.y)));
|
|
1561
1561
|
}
|
|
1562
|
-
function
|
|
1562
|
+
function xr(e) {
|
|
1563
1563
|
if (e.length < 3) return 0;
|
|
1564
1564
|
let t = 0;
|
|
1565
|
-
for (let n = 1; n < e.length - 1; n++) t +=
|
|
1565
|
+
for (let n = 1; n < e.length - 1; n++) t += br(e[0], e[n], e[n + 1]);
|
|
1566
1566
|
return t;
|
|
1567
1567
|
}
|
|
1568
|
-
function
|
|
1568
|
+
function Sr(e, t, n = xr(t)) {
|
|
1569
1569
|
if (n === 0) return !1;
|
|
1570
1570
|
let r = 0;
|
|
1571
|
-
for (let n = 0, i = t.length - 1; n < t.length; i = n++) r +=
|
|
1572
|
-
return Math.abs(n - r) < n *
|
|
1571
|
+
for (let n = 0, i = t.length - 1; n < t.length; i = n++) r += br(e, t[i], t[n]);
|
|
1572
|
+
return Math.abs(n - r) < n * yr;
|
|
1573
1573
|
}
|
|
1574
1574
|
//#endregion
|
|
1575
1575
|
//#region ../wayfinding/src/core/routing/graphPointResolvers.ts
|
|
1576
|
-
function
|
|
1577
|
-
let r =
|
|
1578
|
-
return e.getLineEnds().filter((e) => (!n || e.layer === n) &&
|
|
1576
|
+
function Cr(e, t, n) {
|
|
1577
|
+
let r = xr(t);
|
|
1578
|
+
return e.getLineEnds().filter((e) => (!n || e.layer === n) && Sr(e, t, r));
|
|
1579
1579
|
}
|
|
1580
1580
|
//#endregion
|
|
1581
1581
|
//#region ../wayfinding/src/core/routing/resolveWaypointCandidates.ts
|
|
1582
|
-
function
|
|
1582
|
+
function wr(e, t) {
|
|
1583
1583
|
var n;
|
|
1584
1584
|
if ((n = t.bounds) != null && n.length) return {
|
|
1585
|
-
candidates:
|
|
1585
|
+
candidates: Cr(e.dataSource, t.bounds, t.layer),
|
|
1586
1586
|
offGraphEntry: null
|
|
1587
1587
|
};
|
|
1588
1588
|
let r = null, i = Infinity;
|
|
1589
1589
|
for (let n of e.dataSource.getLines()) {
|
|
1590
1590
|
if (n.virtual || t.layer && n.p0.layer !== t.layer || n.p0.x === n.p1.x && n.p0.y === n.p1.y) continue;
|
|
1591
|
-
let e =
|
|
1591
|
+
let e = vr(t, n.p0, n.p1);
|
|
1592
1592
|
e.distance < i && (i = e.distance, r = {
|
|
1593
1593
|
segment: n,
|
|
1594
1594
|
proj: e
|
|
@@ -1619,11 +1619,11 @@ function dr(e, t) {
|
|
|
1619
1619
|
}
|
|
1620
1620
|
//#endregion
|
|
1621
1621
|
//#region ../wayfinding/src/core/createWayfindingEngine.ts
|
|
1622
|
-
var
|
|
1623
|
-
function
|
|
1622
|
+
var Tr = 1e-6, Er = (e, t) => e.layer === t.layer && Math.abs(e.x - t.x) < Tr && Math.abs(e.y - t.y) < Tr;
|
|
1623
|
+
function Dr(e, t) {
|
|
1624
1624
|
if (!e.length) return e;
|
|
1625
|
-
let n = e[0], r = n.p0, i =
|
|
1626
|
-
return
|
|
1625
|
+
let n = e[0], r = n.p0, i = Er(t.segment.p0, r) ? t.segment.p1 : t.segment.p0;
|
|
1626
|
+
return Er(n.p1, i) ? [{
|
|
1627
1627
|
...n,
|
|
1628
1628
|
p0: t.projection
|
|
1629
1629
|
}, ...e.slice(1)] : [{
|
|
@@ -1632,10 +1632,10 @@ function mr(e, t) {
|
|
|
1632
1632
|
p1: r
|
|
1633
1633
|
}, ...e];
|
|
1634
1634
|
}
|
|
1635
|
-
function
|
|
1635
|
+
function Or(e, t) {
|
|
1636
1636
|
if (!e.length) return e;
|
|
1637
|
-
let n = e[e.length - 1], r = n.p1, i =
|
|
1638
|
-
return
|
|
1637
|
+
let n = e[e.length - 1], r = n.p1, i = Er(t.segment.p0, r) ? t.segment.p1 : t.segment.p0;
|
|
1638
|
+
return Er(n.p0, i) ? [...e.slice(0, -1), {
|
|
1639
1639
|
...n,
|
|
1640
1640
|
p1: t.projection
|
|
1641
1641
|
}] : [...e, {
|
|
@@ -1644,19 +1644,19 @@ function hr(e, t) {
|
|
|
1644
1644
|
p1: t.projection
|
|
1645
1645
|
}];
|
|
1646
1646
|
}
|
|
1647
|
-
function
|
|
1647
|
+
function kr(e, t, n) {
|
|
1648
1648
|
let r = e;
|
|
1649
|
-
return t && (r =
|
|
1649
|
+
return t && (r = Dr(r, t)), n && (r = Or(r, n)), r;
|
|
1650
1650
|
}
|
|
1651
|
-
function
|
|
1652
|
-
let t =
|
|
1651
|
+
function Ar(e) {
|
|
1652
|
+
let t = ir();
|
|
1653
1653
|
return {
|
|
1654
1654
|
buildRoute(n, r, i) {
|
|
1655
1655
|
var a;
|
|
1656
|
-
let o = t.getOrBuild(e, (a = i == null ? void 0 : i.accessible) != null && a), s =
|
|
1656
|
+
let o = t.getOrBuild(e, (a = i == null ? void 0 : i.accessible) != null && a), s = wr(o, n), c = wr(o, r), l = ur(o, s.candidates, c.candidates), u = !!s.offGraphEntry || !!c.offGraphEntry, d = kr(l.lines, s.offGraphEntry, c.offGraphEntry);
|
|
1657
1657
|
return {
|
|
1658
1658
|
lines: d,
|
|
1659
|
-
distance: u ?
|
|
1659
|
+
distance: u ? ar(d) : l.totalDistance
|
|
1660
1660
|
};
|
|
1661
1661
|
},
|
|
1662
1662
|
buildWaypointsRoute(n, r) {
|
|
@@ -1665,18 +1665,18 @@ function _r(e) {
|
|
|
1665
1665
|
lines: [],
|
|
1666
1666
|
distance: 0
|
|
1667
1667
|
};
|
|
1668
|
-
let a = t.getOrBuild(e, (i = r == null ? void 0 : r.accessible) != null && i), o = (r != null && r.fastest ?
|
|
1668
|
+
let a = t.getOrBuild(e, (i = r == null ? void 0 : r.accessible) != null && i), o = (r != null && r.fastest ? hr(n) : n).map((e) => wr(a, e)), s = dr(a, o.map((e) => e.candidates)), c = o[0].offGraphEntry, l = o[o.length - 1].offGraphEntry, u = !!c || !!l, d = kr(s.lines, c, l);
|
|
1669
1669
|
return {
|
|
1670
1670
|
lines: d,
|
|
1671
|
-
distance: u ?
|
|
1671
|
+
distance: u ? ar(d) : s.totalDistance
|
|
1672
1672
|
};
|
|
1673
1673
|
}
|
|
1674
1674
|
};
|
|
1675
1675
|
}
|
|
1676
1676
|
//#endregion
|
|
1677
1677
|
//#region ../wayfinding/src/core/rendering/computeTrailPoints.ts
|
|
1678
|
-
var
|
|
1679
|
-
function
|
|
1678
|
+
var jr = .4, Mr = 8;
|
|
1679
|
+
function Nr(e, t, n = Mr, r = jr) {
|
|
1680
1680
|
let i = P(t, e);
|
|
1681
1681
|
if (i === 0 || n <= 0) return [];
|
|
1682
1682
|
let a = Math.max(Math.ceil(i / n) + 1, 2), o = {
|
|
@@ -1685,11 +1685,11 @@ function br(e, t, n = yr, r = vr) {
|
|
|
1685
1685
|
}, s = [];
|
|
1686
1686
|
for (let n = 0; n < a; n++) {
|
|
1687
1687
|
let r = n / (a - 1);
|
|
1688
|
-
s.push(
|
|
1688
|
+
s.push(Pr(e, o, t, r));
|
|
1689
1689
|
}
|
|
1690
1690
|
return s;
|
|
1691
1691
|
}
|
|
1692
|
-
function
|
|
1692
|
+
function Pr(e, t, n, r) {
|
|
1693
1693
|
let i = 1 - r;
|
|
1694
1694
|
return {
|
|
1695
1695
|
x: i * i * e.x + 2 * i * r * t.x + r * r * n.x,
|
|
@@ -1698,36 +1698,36 @@ function xr(e, t, n, r) {
|
|
|
1698
1698
|
}
|
|
1699
1699
|
//#endregion
|
|
1700
1700
|
//#region ../wayfinding/src/core/rendering/computeTransitionPoints.ts
|
|
1701
|
-
function
|
|
1701
|
+
function Fr(e, t) {
|
|
1702
1702
|
return e.toLowerCase() === t.toLowerCase();
|
|
1703
1703
|
}
|
|
1704
|
-
function
|
|
1705
|
-
return e.findIndex((e) =>
|
|
1704
|
+
function Ir(e, t) {
|
|
1705
|
+
return e.findIndex((e) => Fr(e, t));
|
|
1706
1706
|
}
|
|
1707
|
-
function
|
|
1708
|
-
let r =
|
|
1707
|
+
function Lr(e, t, n) {
|
|
1708
|
+
let r = Ir(e, t), i = Ir(e, n);
|
|
1709
1709
|
return r === -1 || i === -1 ? "neutral" : i > r ? "up" : "down";
|
|
1710
1710
|
}
|
|
1711
|
-
function
|
|
1712
|
-
return e.find((e) =>
|
|
1711
|
+
function Rr(e, t, n) {
|
|
1712
|
+
return e.find((e) => Fr(e.p0.layer, t) ? !n.has(e.p1.layer.toLowerCase()) : Fr(e.p1.layer, t) ? !n.has(e.p0.layer.toLowerCase()) : !1);
|
|
1713
1713
|
}
|
|
1714
|
-
function
|
|
1714
|
+
function zr(e, t, n, r) {
|
|
1715
1715
|
if (t.has(r.toLowerCase())) return r;
|
|
1716
|
-
let i = r, a = /* @__PURE__ */ new Set([n.toLowerCase(), i.toLowerCase()]), o =
|
|
1717
|
-
for (; o && (i =
|
|
1716
|
+
let i = r, a = /* @__PURE__ */ new Set([n.toLowerCase(), i.toLowerCase()]), o = Rr(e, i, a);
|
|
1717
|
+
for (; o && (i = Fr(o.p0.layer, i) ? o.p1.layer : o.p0.layer, !t.has(i.toLowerCase()));) a.add(i.toLowerCase()), o = Rr(e, i, a);
|
|
1718
1718
|
return i;
|
|
1719
1719
|
}
|
|
1720
|
-
function
|
|
1721
|
-
let { routeLines: t, currentLayerNames: n, floorOrder: r } = e, i = (e) => n === null || n.some((t) =>
|
|
1720
|
+
function Br(e) {
|
|
1721
|
+
let { routeLines: t, currentLayerNames: n, floorOrder: r } = e, i = (e) => n === null || n.some((t) => Fr(e, t)), a = t.filter((e) => e.virtual && !Fr(e.p0.layer, e.p1.layer)), o = /* @__PURE__ */ new Set();
|
|
1722
1722
|
for (let e of t) e.virtual || (o.add(e.p0.layer.toLowerCase()), o.add(e.p1.layer.toLowerCase()));
|
|
1723
1723
|
let s = a.filter((e) => i(e.p0.layer) || i(e.p1.layer)).map((e) => {
|
|
1724
|
-
let t = i(e.p0.layer), n = t ? e.p0 : e.p1, s = t ? e.p1 : e.p0, c =
|
|
1724
|
+
let t = i(e.p0.layer), n = t ? e.p0 : e.p1, s = t ? e.p1 : e.p0, c = zr(a, o, n.layer, s.layer);
|
|
1725
1725
|
return {
|
|
1726
1726
|
x: n.x,
|
|
1727
1727
|
y: n.y,
|
|
1728
1728
|
layer: n.layer,
|
|
1729
1729
|
targetLayer: c,
|
|
1730
|
-
direction:
|
|
1730
|
+
direction: Lr(r, n.layer, c),
|
|
1731
1731
|
role: t ? "exit" : "entry"
|
|
1732
1732
|
};
|
|
1733
1733
|
}), c = new Set(s.filter((e) => e.role === "exit").map((e) => `${e.x}:${e.y}`)), l = /* @__PURE__ */ new Set();
|
|
@@ -1738,35 +1738,35 @@ function Dr(e) {
|
|
|
1738
1738
|
}
|
|
1739
1739
|
//#endregion
|
|
1740
1740
|
//#region ../wayfinding/src/core/rendering/routeGeometry.ts
|
|
1741
|
-
function
|
|
1742
|
-
return
|
|
1741
|
+
function Vr(e) {
|
|
1742
|
+
return N.fromPoints(e);
|
|
1743
1743
|
}
|
|
1744
1744
|
//#endregion
|
|
1745
1745
|
//#region ../wayfinding/src/core/position/gpsThreshold.ts
|
|
1746
|
-
var
|
|
1747
|
-
function
|
|
1748
|
-
let { p0: n, p2: r } = t, i =
|
|
1746
|
+
var Hr = 7.5, Ur = 15, Wr = 20;
|
|
1747
|
+
function Gr(e, t) {
|
|
1748
|
+
let { p0: n, p2: r } = t, i = De(n, r), a = P(n, r);
|
|
1749
1749
|
return !i || !a ? 0 : a / i * e;
|
|
1750
1750
|
}
|
|
1751
|
-
var
|
|
1751
|
+
var Kr = (e) => {
|
|
1752
1752
|
if (typeof e == "number" && Number.isFinite(e)) return e;
|
|
1753
|
-
},
|
|
1754
|
-
let n =
|
|
1753
|
+
}, qr = (e, t) => {
|
|
1754
|
+
let n = Kr(e);
|
|
1755
1755
|
return n === void 0 || n === 0 ? t : n;
|
|
1756
1756
|
};
|
|
1757
|
-
function
|
|
1757
|
+
function Jr({ thresholdInMeters: e, gpsConfig: t }) {
|
|
1758
1758
|
let n = 0;
|
|
1759
|
-
return e && t && (n =
|
|
1759
|
+
return e && t && (n = Gr(e, t)), n || (n = Wr), n;
|
|
1760
1760
|
}
|
|
1761
|
-
function
|
|
1762
|
-
return
|
|
1763
|
-
thresholdInMeters:
|
|
1761
|
+
function Yr(e) {
|
|
1762
|
+
return Jr({
|
|
1763
|
+
thresholdInMeters: qr(e == null ? void 0 : e.rerouteThreshold, Ur),
|
|
1764
1764
|
gpsConfig: e
|
|
1765
1765
|
});
|
|
1766
1766
|
}
|
|
1767
1767
|
//#endregion
|
|
1768
1768
|
//#region ../wayfinding/src/core/position/distanceToRoute.ts
|
|
1769
|
-
function
|
|
1769
|
+
function Xr(e, t, n, r, i, a) {
|
|
1770
1770
|
let o = i - n, s = a - r, c = e - n, l = t - r, u = o * o + s * s;
|
|
1771
1771
|
if (u === 0) return P({
|
|
1772
1772
|
x: e,
|
|
@@ -1786,27 +1786,27 @@ function Lr(e, t, n, r, i, a) {
|
|
|
1786
1786
|
y: p
|
|
1787
1787
|
});
|
|
1788
1788
|
}
|
|
1789
|
-
function
|
|
1789
|
+
function Zr(e, t) {
|
|
1790
1790
|
let n = Infinity;
|
|
1791
1791
|
for (let r of t) {
|
|
1792
1792
|
if (e.layer && (r.p0.layer !== e.layer || r.p1.layer !== e.layer)) continue;
|
|
1793
|
-
let t =
|
|
1793
|
+
let t = Xr(e.x, e.y, r.p0.x, r.p0.y, r.p1.x, r.p1.y);
|
|
1794
1794
|
t < n && (n = t);
|
|
1795
1795
|
}
|
|
1796
1796
|
return n;
|
|
1797
1797
|
}
|
|
1798
1798
|
//#endregion
|
|
1799
1799
|
//#region ../wayfinding/src/core/position/rerouteController.ts
|
|
1800
|
-
function
|
|
1800
|
+
function Qr(e) {
|
|
1801
1801
|
return { shouldReroute(t, n) {
|
|
1802
1802
|
if (!n.length) return !1;
|
|
1803
1803
|
let r = t.layer;
|
|
1804
|
-
return r && !n.some((e) => e.p0.layer === r && e.p1.layer === r) ? !0 :
|
|
1804
|
+
return r && !n.some((e) => e.p0.layer === r && e.p1.layer === r) ? !0 : Zr(t, n) > e;
|
|
1805
1805
|
} };
|
|
1806
1806
|
}
|
|
1807
1807
|
//#endregion
|
|
1808
1808
|
//#region ../wayfinding/src/core/position/snapToRoute.ts
|
|
1809
|
-
function
|
|
1809
|
+
function $r(e, t, { snapThreshold: n }) {
|
|
1810
1810
|
let r = t.length;
|
|
1811
1811
|
if (!r) return { snapped: !1 };
|
|
1812
1812
|
let i = e.layer || null, a = Infinity, o = null, s = 0, c = i == null;
|
|
@@ -1818,7 +1818,7 @@ function Br(e, t, { snapThreshold: n }) {
|
|
|
1818
1818
|
continue;
|
|
1819
1819
|
}
|
|
1820
1820
|
c = !0;
|
|
1821
|
-
let f =
|
|
1821
|
+
let f = vr({
|
|
1822
1822
|
x: e.x,
|
|
1823
1823
|
y: e.y
|
|
1824
1824
|
}, l, u);
|
|
@@ -1841,7 +1841,7 @@ function Br(e, t, { snapThreshold: n }) {
|
|
|
1841
1841
|
}
|
|
1842
1842
|
//#endregion
|
|
1843
1843
|
//#region ../wayfinding/src/core/position/splitRouteByPoint.ts
|
|
1844
|
-
function
|
|
1844
|
+
function ei(e, t) {
|
|
1845
1845
|
let n = 1e-6, r = -1, i = 0, a = Infinity;
|
|
1846
1846
|
for (let n = 0; n < e.length; n++) {
|
|
1847
1847
|
let o = e[n];
|
|
@@ -1883,7 +1883,7 @@ function Vr(e, t) {
|
|
|
1883
1883
|
}
|
|
1884
1884
|
//#endregion
|
|
1885
1885
|
//#region ../wayfinding/src/renderer/iconManager.ts
|
|
1886
|
-
function
|
|
1886
|
+
function ti(e, t, n) {
|
|
1887
1887
|
var r, i, a, o;
|
|
1888
1888
|
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;
|
|
1889
1889
|
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`);
|
|
@@ -1892,11 +1892,11 @@ function Hr(e, t, n) {
|
|
|
1892
1892
|
height: c
|
|
1893
1893
|
};
|
|
1894
1894
|
}
|
|
1895
|
-
function
|
|
1895
|
+
function ni(e, t, n) {
|
|
1896
1896
|
let r = e.bounds, i = t.width * n, a = t.height * n;
|
|
1897
1897
|
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];
|
|
1898
1898
|
}
|
|
1899
|
-
function
|
|
1899
|
+
function ri(e, t, n, r = !1) {
|
|
1900
1900
|
let i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
|
|
1901
1901
|
function c(e) {
|
|
1902
1902
|
return e.onTop ? n.currentPosition : n.icons;
|
|
@@ -1916,20 +1916,20 @@ function Wr(e, t, n, r = !1) {
|
|
|
1916
1916
|
}
|
|
1917
1917
|
function f(n, a, o, l = o.rotation) {
|
|
1918
1918
|
var d, f, p;
|
|
1919
|
-
let m = c(o), h =
|
|
1919
|
+
let m = c(o), h = ti(o.canvas, o.width, o.height), g = (d = o.screenSpace) == null ? r : d;
|
|
1920
1920
|
e.touchLayer(m);
|
|
1921
1921
|
let _ = {
|
|
1922
1922
|
source: o.canvas,
|
|
1923
|
-
bounds: new
|
|
1923
|
+
bounds: new pe({
|
|
1924
1924
|
x: o.x,
|
|
1925
1925
|
y: o.y
|
|
1926
|
-
},
|
|
1926
|
+
}, ii, l),
|
|
1927
1927
|
hidden: (f = o.hidden) != null && f,
|
|
1928
1928
|
dim: +!!o.dimmed,
|
|
1929
1929
|
origin: o.origin,
|
|
1930
1930
|
screenSpace: g
|
|
1931
1931
|
};
|
|
1932
|
-
o.cardinalSnap && !g && t.attachCardinalSnap(_), _.onScale = ({ pixelSize: e }) =>
|
|
1932
|
+
o.cardinalSnap && !g && t.attachCardinalSnap(_), _.onScale = ({ pixelSize: e }) => ni(_, h, e), m.children.push(_);
|
|
1933
1933
|
let v = {
|
|
1934
1934
|
imageDef: _,
|
|
1935
1935
|
layer: m,
|
|
@@ -1996,13 +1996,13 @@ function Wr(e, t, n, r = !1) {
|
|
|
1996
1996
|
}
|
|
1997
1997
|
};
|
|
1998
1998
|
}
|
|
1999
|
-
var
|
|
1999
|
+
var ii = {
|
|
2000
2000
|
x: 0,
|
|
2001
2001
|
y: 0
|
|
2002
2002
|
};
|
|
2003
2003
|
//#endregion
|
|
2004
2004
|
//#region ../wayfinding/src/renderer/layerManager.ts
|
|
2005
|
-
function
|
|
2005
|
+
function ai(e) {
|
|
2006
2006
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set();
|
|
2007
2007
|
return {
|
|
2008
2008
|
touchLayer(e) {
|
|
@@ -2024,8 +2024,8 @@ function Kr(e) {
|
|
|
2024
2024
|
}
|
|
2025
2025
|
//#endregion
|
|
2026
2026
|
//#region ../wayfinding/src/renderer/lineAnimation.ts
|
|
2027
|
-
var
|
|
2028
|
-
function
|
|
2027
|
+
var oi = 1, si = 0;
|
|
2028
|
+
function ci(e, t, n, r = 0) {
|
|
2029
2029
|
let i = 0, a = 0, o = null, s = null;
|
|
2030
2030
|
if (!e.length) return;
|
|
2031
2031
|
let c = e.map((e) => ({
|
|
@@ -2041,7 +2041,7 @@ function Yr(e, t, n, r = 0) {
|
|
|
2041
2041
|
})), l = c.map((e) => {
|
|
2042
2042
|
let t = e.p1.x - e.p0.x, n = e.p1.y - e.p0.y;
|
|
2043
2043
|
return Math.sqrt(t * t + n * n);
|
|
2044
|
-
}), u = e.map((e) => e.hidden ?
|
|
2044
|
+
}), u = e.map((e) => e.hidden ? si : -1), d = [], f = l.reduce((e, t) => e + t, 0);
|
|
2045
2045
|
if (!f) return;
|
|
2046
2046
|
let p = Math.max(20, Math.min(f / 2, 300));
|
|
2047
2047
|
function m(e) {
|
|
@@ -2059,9 +2059,9 @@ function Yr(e, t, n, r = 0) {
|
|
|
2059
2059
|
if (u[t] === n) return;
|
|
2060
2060
|
u[t] = n;
|
|
2061
2061
|
let r = e[t], i = c[t];
|
|
2062
|
-
if (r.hidden = n <=
|
|
2062
|
+
if (r.hidden = n <= si, !r.hidden) {
|
|
2063
2063
|
let { p0: e, p1: t } = i;
|
|
2064
|
-
r.points = n >=
|
|
2064
|
+
r.points = n >= oi ? i : {
|
|
2065
2065
|
p0: e,
|
|
2066
2066
|
p1: {
|
|
2067
2067
|
x: e.x + (t.x - e.x) * n,
|
|
@@ -2075,10 +2075,10 @@ function Yr(e, t, n, r = 0) {
|
|
|
2075
2075
|
function g() {
|
|
2076
2076
|
d.length = 0;
|
|
2077
2077
|
let n = i;
|
|
2078
|
-
for (let e = 0; e < n; e++) h(e,
|
|
2078
|
+
for (let e = 0; e < n; e++) h(e, oi);
|
|
2079
2079
|
let r = l[n];
|
|
2080
|
-
h(n, r ? Math.min(a / r,
|
|
2081
|
-
for (let t = n + 1; t < e.length; t++) h(t,
|
|
2080
|
+
h(n, r ? Math.min(a / r, oi) : oi);
|
|
2081
|
+
for (let t = n + 1; t < e.length; t++) h(t, si);
|
|
2082
2082
|
d.length && t(d);
|
|
2083
2083
|
}
|
|
2084
2084
|
function _(t) {
|
|
@@ -2118,7 +2118,7 @@ function Yr(e, t, n, r = 0) {
|
|
|
2118
2118
|
}
|
|
2119
2119
|
//#endregion
|
|
2120
2120
|
//#region ../wayfinding/src/renderer/routeLineManager.ts
|
|
2121
|
-
function
|
|
2121
|
+
function li({ p0: e, p1: t }, n) {
|
|
2122
2122
|
return {
|
|
2123
2123
|
points: {
|
|
2124
2124
|
p0: {
|
|
@@ -2134,10 +2134,10 @@ function Xr({ p0: e, p1: t }, n) {
|
|
|
2134
2134
|
width: 10
|
|
2135
2135
|
};
|
|
2136
2136
|
}
|
|
2137
|
-
function
|
|
2137
|
+
function ui(e, t) {
|
|
2138
2138
|
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;
|
|
2139
2139
|
}
|
|
2140
|
-
function
|
|
2140
|
+
function di(e, t, n, r) {
|
|
2141
2141
|
let i = r.lines, a = r.linesAnimated, o = null, s = 1;
|
|
2142
2142
|
function c(e) {
|
|
2143
2143
|
s = e;
|
|
@@ -2150,7 +2150,7 @@ function Qr(e, t, n, r) {
|
|
|
2150
2150
|
}
|
|
2151
2151
|
function d(e, t) {
|
|
2152
2152
|
let n = i.children;
|
|
2153
|
-
return n.length !== e.length + t.length || a.children.length !== t.length ? !1 : e.every((e, t) =>
|
|
2153
|
+
return n.length !== e.length + t.length || a.children.length !== t.length ? !1 : e.every((e, t) => ui(n[t], e)) && t.every((t, r) => ui(n[e.length + r], t));
|
|
2154
2154
|
}
|
|
2155
2155
|
return {
|
|
2156
2156
|
setRouteLines(r, l, f) {
|
|
@@ -2160,16 +2160,16 @@ function Qr(e, t, n, r) {
|
|
|
2160
2160
|
e.touchLayer(i), e.touchLayer(a), a.onScale = ({ pixelSize: e }) => c(e);
|
|
2161
2161
|
let g = 0;
|
|
2162
2162
|
o && (h || (g = o.getProgress()), o.stop(), o = null), u(i), u(a);
|
|
2163
|
-
let _ = r.map((e) =>
|
|
2163
|
+
let _ = r.map((e) => li(e, t.passed)), v = l.map((e) => li(e, t.remaining));
|
|
2164
2164
|
if (i.children = [..._, ...v], !v.length) {
|
|
2165
2165
|
a.children = [];
|
|
2166
2166
|
return;
|
|
2167
2167
|
}
|
|
2168
2168
|
let y = l.map((e) => ({
|
|
2169
|
-
...
|
|
2169
|
+
...li(e, t.active),
|
|
2170
2170
|
hidden: !0
|
|
2171
2171
|
}));
|
|
2172
|
-
a.children = y, o = (m =
|
|
2172
|
+
a.children = y, o = (m = ci(y, (e) => n.update(...e), () => s, g)) == null ? null : m;
|
|
2173
2173
|
},
|
|
2174
2174
|
clearLines() {
|
|
2175
2175
|
o && (o.stop(), o = null), l(i), l(a);
|
|
@@ -2181,8 +2181,8 @@ function Qr(e, t, n, r) {
|
|
|
2181
2181
|
}
|
|
2182
2182
|
//#endregion
|
|
2183
2183
|
//#region ../wayfinding/src/renderer/trailManager.ts
|
|
2184
|
-
var
|
|
2185
|
-
function
|
|
2184
|
+
var fi = 40;
|
|
2185
|
+
function pi(e, t) {
|
|
2186
2186
|
let n = /* @__PURE__ */ new Map(), r = 1, i = !1;
|
|
2187
2187
|
function a(e) {
|
|
2188
2188
|
r = e;
|
|
@@ -2204,7 +2204,7 @@ function ei(e, t) {
|
|
|
2204
2204
|
}
|
|
2205
2205
|
function c(n) {
|
|
2206
2206
|
s();
|
|
2207
|
-
let i =
|
|
2207
|
+
let i = fi * r, a = Nr(n.from, n.to, i), c = n.canvas, l = {
|
|
2208
2208
|
x: n.width * r,
|
|
2209
2209
|
y: n.height * r
|
|
2210
2210
|
}, u = n.dotDefs, d = Math.min(u.length, a.length), f = [];
|
|
@@ -2215,7 +2215,7 @@ function ei(e, t) {
|
|
|
2215
2215
|
if (a.length > d) {
|
|
2216
2216
|
let n = a.slice(d).map((e) => ({
|
|
2217
2217
|
source: c,
|
|
2218
|
-
bounds: new
|
|
2218
|
+
bounds: new pe({
|
|
2219
2219
|
x: e.x,
|
|
2220
2220
|
y: e.y
|
|
2221
2221
|
}, l)
|
|
@@ -2261,7 +2261,7 @@ function ei(e, t) {
|
|
|
2261
2261
|
a.from = t, a.to = r, u(c(a));
|
|
2262
2262
|
return;
|
|
2263
2263
|
}
|
|
2264
|
-
let { width: o, height: s } =
|
|
2264
|
+
let { width: o, height: s } = ti(i.canvas, i.width, i.height), d = {
|
|
2265
2265
|
from: t,
|
|
2266
2266
|
to: r,
|
|
2267
2267
|
canvas: i.canvas,
|
|
@@ -2279,16 +2279,16 @@ function ei(e, t) {
|
|
|
2279
2279
|
}
|
|
2280
2280
|
//#endregion
|
|
2281
2281
|
//#region ../wayfinding/src/renderer/createWayfindingRenderer.ts
|
|
2282
|
-
var
|
|
2282
|
+
var mi = {
|
|
2283
2283
|
passed: "#B5B7BC",
|
|
2284
2284
|
remaining: "#A4CCE2",
|
|
2285
2285
|
active: "#0794EA"
|
|
2286
2286
|
};
|
|
2287
|
-
function
|
|
2287
|
+
function hi(e, t, n = {}) {
|
|
2288
2288
|
let r = {
|
|
2289
|
-
...
|
|
2289
|
+
...mi,
|
|
2290
2290
|
...n.colors
|
|
2291
|
-
}, i =
|
|
2291
|
+
}, i = ai(e), a = ri(i, e, t, n.screenSpaceIcons), o = pi(i, t.trail), s = di(i, r, e, t), c = {
|
|
2292
2292
|
setIcon: (...e) => a.setIcon(...e),
|
|
2293
2293
|
clearIcons: (...e) => a.clearIcons(...e),
|
|
2294
2294
|
setTrail: (...e) => o.setTrail(...e),
|
|
@@ -2307,29 +2307,29 @@ function ni(e, t, n = {}) {
|
|
|
2307
2307
|
}
|
|
2308
2308
|
//#endregion
|
|
2309
2309
|
//#region ../wayfinding/src/renderer/layers.ts
|
|
2310
|
-
var
|
|
2311
|
-
function
|
|
2310
|
+
var gi = "wayfinding", _i = "wf-trail-points", vi = "wf-lines", yi = "wf-lines-animated", bi = "wf-points", xi = "wf-current-position";
|
|
2311
|
+
function Si(e = {}) {
|
|
2312
2312
|
return {
|
|
2313
|
-
name:
|
|
2313
|
+
name: gi,
|
|
2314
2314
|
children: [
|
|
2315
2315
|
{
|
|
2316
|
-
name:
|
|
2316
|
+
name: _i,
|
|
2317
2317
|
children: []
|
|
2318
2318
|
},
|
|
2319
2319
|
{
|
|
2320
|
-
name:
|
|
2320
|
+
name: vi,
|
|
2321
2321
|
children: []
|
|
2322
2322
|
},
|
|
2323
2323
|
{
|
|
2324
|
-
name:
|
|
2324
|
+
name: yi,
|
|
2325
2325
|
children: []
|
|
2326
2326
|
},
|
|
2327
2327
|
{
|
|
2328
|
-
name:
|
|
2328
|
+
name: bi,
|
|
2329
2329
|
children: []
|
|
2330
2330
|
},
|
|
2331
2331
|
{
|
|
2332
|
-
name:
|
|
2332
|
+
name: xi,
|
|
2333
2333
|
children: []
|
|
2334
2334
|
}
|
|
2335
2335
|
],
|
|
@@ -2337,8 +2337,8 @@ function li(e = {}) {
|
|
|
2337
2337
|
overlay: e.overlay
|
|
2338
2338
|
};
|
|
2339
2339
|
}
|
|
2340
|
-
function
|
|
2341
|
-
let t = e.children.find((e) => "name" in e && e.name ===
|
|
2340
|
+
function Ci(e) {
|
|
2341
|
+
let t = e.children.find((e) => "name" in e && e.name === gi && "children" in e);
|
|
2342
2342
|
if (!t) throw Error("The scene holds no wayfinding block — mount `root` first.");
|
|
2343
2343
|
let n = new Map(t.children.map((e) => [e.name, e]));
|
|
2344
2344
|
function r(e) {
|
|
@@ -2347,21 +2347,21 @@ function ui(e) {
|
|
|
2347
2347
|
return t;
|
|
2348
2348
|
}
|
|
2349
2349
|
return {
|
|
2350
|
-
trail: r(
|
|
2351
|
-
lines: r(
|
|
2352
|
-
linesAnimated: r(
|
|
2353
|
-
icons: r(
|
|
2354
|
-
currentPosition: r(
|
|
2350
|
+
trail: r(_i),
|
|
2351
|
+
lines: r(vi),
|
|
2352
|
+
linesAnimated: r(yi),
|
|
2353
|
+
icons: r(bi),
|
|
2354
|
+
currentPosition: r(xi)
|
|
2355
2355
|
};
|
|
2356
2356
|
}
|
|
2357
2357
|
//#endregion
|
|
2358
2358
|
//#region ../wayfinding/src/runtime/positionView.ts
|
|
2359
|
-
var
|
|
2360
|
-
function
|
|
2359
|
+
var wi = "current-position", Ti = "position";
|
|
2360
|
+
function Ei({ renderer: e, iconProvider: t }) {
|
|
2361
2361
|
return {
|
|
2362
2362
|
place(n, r) {
|
|
2363
|
-
let i = Number.isFinite(n.heading), a = i ? "current_arrow" : "current", o = i ?
|
|
2364
|
-
e.setIcon(
|
|
2363
|
+
let i = Number.isFinite(n.heading), a = i ? "current_arrow" : "current", o = i ? D(n.heading) : void 0, s = t.getIcon(a);
|
|
2364
|
+
e.setIcon(Ti, {
|
|
2365
2365
|
canvas: s.canvas,
|
|
2366
2366
|
width: s.width,
|
|
2367
2367
|
height: s.height,
|
|
@@ -2376,16 +2376,16 @@ function pi({ renderer: e, iconProvider: t }) {
|
|
|
2376
2376
|
});
|
|
2377
2377
|
},
|
|
2378
2378
|
hide() {
|
|
2379
|
-
e.setIcon(
|
|
2379
|
+
e.setIcon(Ti, null);
|
|
2380
2380
|
}
|
|
2381
2381
|
};
|
|
2382
2382
|
}
|
|
2383
2383
|
//#endregion
|
|
2384
2384
|
//#region ../wayfinding/src/runtime/endpointView.ts
|
|
2385
|
-
function
|
|
2385
|
+
function Di(e, t) {
|
|
2386
2386
|
return !t || !e.bounds && e.id !== "current-position";
|
|
2387
2387
|
}
|
|
2388
|
-
function
|
|
2388
|
+
function Oi({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
2389
2389
|
return {
|
|
2390
2390
|
place(r, i, a, o) {
|
|
2391
2391
|
if (!a.length) return;
|
|
@@ -2396,7 +2396,7 @@ function hi({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
|
2396
2396
|
height: f.height,
|
|
2397
2397
|
x: l.x,
|
|
2398
2398
|
y: l.y,
|
|
2399
|
-
hidden:
|
|
2399
|
+
hidden: Di(r, s),
|
|
2400
2400
|
dimmed: !s,
|
|
2401
2401
|
cardinalSnap: !0
|
|
2402
2402
|
}), e.setIcon("destination", {
|
|
@@ -2417,7 +2417,7 @@ function hi({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
|
2417
2417
|
}
|
|
2418
2418
|
//#endregion
|
|
2419
2419
|
//#region ../wayfinding/src/runtime/getRouteLines.ts
|
|
2420
|
-
function
|
|
2420
|
+
function ki({ engine: e, from: t, to: n, waypoints: r, accessible: i }) {
|
|
2421
2421
|
return r != null && r.length ? e.buildWaypointsRoute([
|
|
2422
2422
|
t,
|
|
2423
2423
|
...r,
|
|
@@ -2426,27 +2426,27 @@ function gi({ engine: e, from: t, to: n, waypoints: r, accessible: i }) {
|
|
|
2426
2426
|
}
|
|
2427
2427
|
//#endregion
|
|
2428
2428
|
//#region ../wayfinding/src/runtime/snapPositionToRoute.ts
|
|
2429
|
-
function
|
|
2429
|
+
function Ai(e, t, n) {
|
|
2430
2430
|
if (!(t != null && t.bounds)) return !1;
|
|
2431
|
-
let r = n == null || !t.layer || t.layer === n, i =
|
|
2431
|
+
let r = n == null || !t.layer || t.layer === n, i = Sr({
|
|
2432
2432
|
x: e.x,
|
|
2433
2433
|
y: e.y
|
|
2434
2434
|
}, t.bounds);
|
|
2435
2435
|
return r && i;
|
|
2436
2436
|
}
|
|
2437
|
-
function
|
|
2437
|
+
function ji(e, t, n, r, i) {
|
|
2438
2438
|
if (!t.length) return { snapped: !1 };
|
|
2439
2439
|
let a = e.layer || null;
|
|
2440
|
-
if (
|
|
2440
|
+
if (Ai(e, n, a)) {
|
|
2441
2441
|
let e = t[0];
|
|
2442
2442
|
return {
|
|
2443
2443
|
snapped: !0,
|
|
2444
2444
|
snappedPoint: e.p0,
|
|
2445
2445
|
snappedLine: e,
|
|
2446
|
-
distance:
|
|
2446
|
+
distance: ar(t)
|
|
2447
2447
|
};
|
|
2448
2448
|
}
|
|
2449
|
-
if (
|
|
2449
|
+
if (Ai(e, r, a)) {
|
|
2450
2450
|
let e = t[t.length - 1];
|
|
2451
2451
|
return {
|
|
2452
2452
|
snapped: !0,
|
|
@@ -2455,13 +2455,13 @@ function vi(e, t, n, r, i) {
|
|
|
2455
2455
|
distance: 0
|
|
2456
2456
|
};
|
|
2457
2457
|
}
|
|
2458
|
-
return
|
|
2458
|
+
return $r(e, t, { snapThreshold: i });
|
|
2459
2459
|
}
|
|
2460
2460
|
//#endregion
|
|
2461
2461
|
//#region ../wayfinding/src/runtime/positionTrailView.ts
|
|
2462
|
-
var
|
|
2463
|
-
function
|
|
2464
|
-
let a =
|
|
2462
|
+
var Mi = "trail";
|
|
2463
|
+
function Ni({ renderer: e, iconProvider: t, floorContext: n, trails: r, snapThreshold: i }) {
|
|
2464
|
+
let a = Ei({
|
|
2465
2465
|
renderer: e,
|
|
2466
2466
|
iconProvider: t
|
|
2467
2467
|
});
|
|
@@ -2474,7 +2474,7 @@ function bi({ renderer: e, iconProvider: t, floorContext: n, trails: r, snapThre
|
|
|
2474
2474
|
a.hide();
|
|
2475
2475
|
},
|
|
2476
2476
|
applyToRoute(e, t, r) {
|
|
2477
|
-
let o =
|
|
2477
|
+
let o = ji(e, r, t.from, t.to, i), s = !n.isLayerVisible(e.layer);
|
|
2478
2478
|
return o.snapped ? a.place({
|
|
2479
2479
|
...e,
|
|
2480
2480
|
x: o.snappedPoint.x,
|
|
@@ -2482,16 +2482,16 @@ function bi({ renderer: e, iconProvider: t, floorContext: n, trails: r, snapThre
|
|
|
2482
2482
|
}, s) : a.place(e, s), o;
|
|
2483
2483
|
},
|
|
2484
2484
|
setTrail(e, t) {
|
|
2485
|
-
e && t ? r.place(
|
|
2485
|
+
e && t ? r.place(Mi, e, t) : r.clear(Mi);
|
|
2486
2486
|
},
|
|
2487
2487
|
clearTrail() {
|
|
2488
|
-
r.clear(
|
|
2488
|
+
r.clear(Mi);
|
|
2489
2489
|
}
|
|
2490
2490
|
};
|
|
2491
2491
|
}
|
|
2492
2492
|
//#endregion
|
|
2493
2493
|
//#region ../wayfinding/src/runtime/routeLinesView.ts
|
|
2494
|
-
function
|
|
2494
|
+
function Pi({ renderer: e }) {
|
|
2495
2495
|
return {
|
|
2496
2496
|
draw({ passed: t, remaining: n }, r = !1) {
|
|
2497
2497
|
e.setRouteLines(t, n, { resetAnimation: !r });
|
|
@@ -2503,14 +2503,14 @@ function xi({ renderer: e }) {
|
|
|
2503
2503
|
}
|
|
2504
2504
|
//#endregion
|
|
2505
2505
|
//#region ../wayfinding/src/runtime/routeRenderData.ts
|
|
2506
|
-
function
|
|
2506
|
+
function Fi({ routeLines: e, activeFloors: t, snap: n }) {
|
|
2507
2507
|
let r = e.filter((e) => !e.virtual), i = (e) => t === null ? e : e.filter((e) => t.includes(e.p0.layer));
|
|
2508
2508
|
if (!(n != null && n.snapped)) return {
|
|
2509
2509
|
passed: [],
|
|
2510
2510
|
remaining: i(r),
|
|
2511
|
-
distance:
|
|
2511
|
+
distance: ar(r)
|
|
2512
2512
|
};
|
|
2513
|
-
let { passed: a, remaining: o } =
|
|
2513
|
+
let { passed: a, remaining: o } = ei(r, n.snappedPoint), s = o !== r && o.length > 0 && o[0].p0.layer === n.snappedPoint.layer ? [{
|
|
2514
2514
|
...o[0],
|
|
2515
2515
|
p0: n.snappedPoint
|
|
2516
2516
|
}, ...o.slice(1)] : o;
|
|
@@ -2522,15 +2522,15 @@ function Si({ routeLines: e, activeFloors: t, snap: n }) {
|
|
|
2522
2522
|
}
|
|
2523
2523
|
//#endregion
|
|
2524
2524
|
//#region ../wayfinding/src/runtime/routeUpdate.ts
|
|
2525
|
-
function
|
|
2525
|
+
function Ii(e, t) {
|
|
2526
2526
|
return {
|
|
2527
2527
|
lines: e.filter((e) => !e.virtual),
|
|
2528
|
-
bounds:
|
|
2528
|
+
bounds: Vr(t.flatMap((e) => [e.p0, e.p1]))
|
|
2529
2529
|
};
|
|
2530
2530
|
}
|
|
2531
2531
|
//#endregion
|
|
2532
2532
|
//#region ../wayfinding/src/runtime/trailView.ts
|
|
2533
|
-
function
|
|
2533
|
+
function Li({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
2534
2534
|
let r = /* @__PURE__ */ new Set();
|
|
2535
2535
|
function i(e, t) {
|
|
2536
2536
|
if (n.showAllFloors()) return !0;
|
|
@@ -2564,22 +2564,22 @@ function wi({ renderer: e, iconProvider: t, floorContext: n }) {
|
|
|
2564
2564
|
}
|
|
2565
2565
|
//#endregion
|
|
2566
2566
|
//#region ../wayfinding/src/runtime/transitionView.ts
|
|
2567
|
-
var
|
|
2568
|
-
function
|
|
2567
|
+
var Ri = "transition";
|
|
2568
|
+
function zi({ renderer: e, iconProvider: t, floorContext: n, onTransitionClick: r }) {
|
|
2569
2569
|
return {
|
|
2570
2570
|
place(i) {
|
|
2571
|
-
e.clearIcons(
|
|
2571
|
+
e.clearIcons(Ri);
|
|
2572
2572
|
let a;
|
|
2573
2573
|
if (n.showAllFloors()) a = null;
|
|
2574
2574
|
else if (a = n.getActiveFloors(), !a.length) return;
|
|
2575
|
-
let o =
|
|
2575
|
+
let o = Br({
|
|
2576
2576
|
routeLines: i,
|
|
2577
2577
|
currentLayerNames: a,
|
|
2578
2578
|
floorOrder: n.getFloorOrder()
|
|
2579
2579
|
});
|
|
2580
2580
|
for (let [n, i] of o.entries()) {
|
|
2581
|
-
let a = t.getIcon(
|
|
2582
|
-
e.setIcon(
|
|
2581
|
+
let a = t.getIcon(Bi(i.role, i.direction));
|
|
2582
|
+
e.setIcon(Ri, {
|
|
2583
2583
|
canvas: a.canvas,
|
|
2584
2584
|
width: a.width,
|
|
2585
2585
|
height: a.height,
|
|
@@ -2591,37 +2591,37 @@ function Ei({ renderer: e, iconProvider: t, floorContext: n, onTransitionClick:
|
|
|
2591
2591
|
}
|
|
2592
2592
|
},
|
|
2593
2593
|
clear() {
|
|
2594
|
-
e.clearIcons(
|
|
2594
|
+
e.clearIcons(Ri);
|
|
2595
2595
|
}
|
|
2596
2596
|
};
|
|
2597
2597
|
}
|
|
2598
|
-
function
|
|
2598
|
+
function Bi(e, t) {
|
|
2599
2599
|
return e === "entry" ? "transition_entry" : t === "up" ? "transition_up" : t === "down" ? "transition_down" : "transition";
|
|
2600
2600
|
}
|
|
2601
2601
|
//#endregion
|
|
2602
2602
|
//#region ../wayfinding/src/runtime/createWayfindingRuntime.ts
|
|
2603
|
-
var
|
|
2604
|
-
function
|
|
2605
|
-
let l =
|
|
2603
|
+
var Vi = (e) => e.flatMap((e) => [e.p0, e.p1]);
|
|
2604
|
+
function Hi({ engine: e, renderer: t, iconProvider: n, floorContext: r, snapThreshold: i, rerouteThreshold: a, onTransitionClick: o, onRouteUpdate: s, onRouteDistance: c }) {
|
|
2605
|
+
let l = Qr(a), u = Oi({
|
|
2606
2606
|
renderer: t,
|
|
2607
2607
|
iconProvider: n,
|
|
2608
2608
|
floorContext: r
|
|
2609
|
-
}), d =
|
|
2609
|
+
}), d = zi({
|
|
2610
2610
|
renderer: t,
|
|
2611
2611
|
iconProvider: n,
|
|
2612
2612
|
floorContext: r,
|
|
2613
2613
|
onTransitionClick: o
|
|
2614
|
-
}), f =
|
|
2614
|
+
}), f = Ni({
|
|
2615
2615
|
renderer: t,
|
|
2616
2616
|
iconProvider: n,
|
|
2617
2617
|
floorContext: r,
|
|
2618
|
-
trails:
|
|
2618
|
+
trails: Li({
|
|
2619
2619
|
renderer: t,
|
|
2620
2620
|
iconProvider: n,
|
|
2621
2621
|
floorContext: r
|
|
2622
2622
|
}),
|
|
2623
2623
|
snapThreshold: i
|
|
2624
|
-
}), p =
|
|
2624
|
+
}), p = Pi({ renderer: t }), m = [], h = null, g = null, _ = null, v = 0, y = !1, b = !1;
|
|
2625
2625
|
function x() {
|
|
2626
2626
|
return r.showAllFloors() ? null : r.getActiveFloors();
|
|
2627
2627
|
}
|
|
@@ -2638,13 +2638,13 @@ function ki({ engine: e, renderer: t, iconProvider: n, floorContext: r, snapThre
|
|
|
2638
2638
|
return e.length ? {
|
|
2639
2639
|
from: h,
|
|
2640
2640
|
to: g,
|
|
2641
|
-
routePoints:
|
|
2641
|
+
routePoints: Vi(e),
|
|
2642
2642
|
visibleLines: e
|
|
2643
2643
|
} : null;
|
|
2644
2644
|
}
|
|
2645
2645
|
function T(e = null, t = !1) {
|
|
2646
2646
|
if (!h || !g) return;
|
|
2647
|
-
let n =
|
|
2647
|
+
let n = Fi({
|
|
2648
2648
|
routeLines: m,
|
|
2649
2649
|
activeFloors: x(),
|
|
2650
2650
|
snap: e
|
|
@@ -2686,15 +2686,15 @@ function ki({ engine: e, renderer: t, iconProvider: n, floorContext: r, snapThre
|
|
|
2686
2686
|
if (b = !1, !_ || !h || !g) return null;
|
|
2687
2687
|
let e = m.filter((e) => !e.virtual);
|
|
2688
2688
|
if (!e.length) return null;
|
|
2689
|
-
let t = w(), n = t ? f.applyToRoute(_, t, e) :
|
|
2689
|
+
let t = w(), n = t ? f.applyToRoute(_, t, e) : ji(_, e, h, g, i);
|
|
2690
2690
|
return n.snapped && (y = !0), b = n.snapped, n;
|
|
2691
2691
|
}
|
|
2692
2692
|
function A() {
|
|
2693
|
-
let e =
|
|
2693
|
+
let e = Ii(m, S());
|
|
2694
2694
|
return s(e.lines, e.bounds), e;
|
|
2695
2695
|
}
|
|
2696
2696
|
function j({ from: n, to: r, waypoints: i, accessible: a }) {
|
|
2697
|
-
let o =
|
|
2697
|
+
let o = ki({
|
|
2698
2698
|
engine: e,
|
|
2699
2699
|
from: n,
|
|
2700
2700
|
to: r,
|
|
@@ -2704,7 +2704,7 @@ function ki({ engine: e, renderer: t, iconProvider: n, floorContext: r, snapThre
|
|
|
2704
2704
|
if (!o.length) return M(), !1;
|
|
2705
2705
|
y = !1, h = n, g = r, m = o, D();
|
|
2706
2706
|
let { lines: s } = A(), l = k();
|
|
2707
|
-
return O(), E(l), l && T(l, !0), c(l ? v :
|
|
2707
|
+
return O(), E(l), l && T(l, !0), c(l ? v : ar(s)), t.flush(), !0;
|
|
2708
2708
|
}
|
|
2709
2709
|
function ee(e) {
|
|
2710
2710
|
let n = _ !== null;
|
|
@@ -2722,7 +2722,7 @@ function ki({ engine: e, renderer: t, iconProvider: n, floorContext: r, snapThre
|
|
|
2722
2722
|
O(), E(e), e && T(e, !0), m.length && A(), c(v), t.flush();
|
|
2723
2723
|
}
|
|
2724
2724
|
function M() {
|
|
2725
|
-
y = !1, m = [], h = null, g = null, v = 0, u.hide(), d.clear(), f.clearTrail(), p.clear(), s([], new
|
|
2725
|
+
y = !1, m = [], h = null, g = null, v = 0, u.hide(), d.clear(), f.clearTrail(), p.clear(), s([], new N()), c(0), t.flush();
|
|
2726
2726
|
}
|
|
2727
2727
|
function ne() {
|
|
2728
2728
|
M(), _ = null, t.destroy();
|
|
@@ -2738,20 +2738,20 @@ function ki({ engine: e, renderer: t, iconProvider: n, floorContext: r, snapThre
|
|
|
2738
2738
|
}
|
|
2739
2739
|
//#endregion
|
|
2740
2740
|
//#region ../wayfinding/src/createWayfinding.ts
|
|
2741
|
-
function
|
|
2742
|
-
let { dataSource: t, renderer: n, iconProvider: r, floorContext: i, layers: a, gpsConfig: o } = e, s =
|
|
2741
|
+
function Ui(e) {
|
|
2742
|
+
let { dataSource: t, renderer: n, iconProvider: r, floorContext: i, layers: a, gpsConfig: o } = e, s = Ar(t), c = hi(n, a, {
|
|
2743
2743
|
...e.rendererConfig,
|
|
2744
2744
|
screenSpaceIcons: e.screenSpaceIcons
|
|
2745
|
-
}), l =
|
|
2745
|
+
}), l = Hi({
|
|
2746
2746
|
engine: s,
|
|
2747
2747
|
renderer: c,
|
|
2748
2748
|
iconProvider: r,
|
|
2749
2749
|
floorContext: i,
|
|
2750
|
-
snapThreshold:
|
|
2751
|
-
thresholdInMeters:
|
|
2750
|
+
snapThreshold: Jr({
|
|
2751
|
+
thresholdInMeters: qr(o == null ? void 0 : o.snapThreshold, Hr),
|
|
2752
2752
|
gpsConfig: o
|
|
2753
2753
|
}),
|
|
2754
|
-
rerouteThreshold:
|
|
2754
|
+
rerouteThreshold: Yr(o),
|
|
2755
2755
|
onTransitionClick: (t) => {
|
|
2756
2756
|
var n;
|
|
2757
2757
|
return (n = e.onTransitionClick) == null ? void 0 : n.call(e, t);
|
|
@@ -2784,8 +2784,8 @@ function Ai(e) {
|
|
|
2784
2784
|
}
|
|
2785
2785
|
//#endregion
|
|
2786
2786
|
//#region src/wayfinding/adapters/arbitraryPoint.ts
|
|
2787
|
-
var
|
|
2788
|
-
function
|
|
2787
|
+
var Wi = "Your Location", Gi = "kiosk-anchor", Ki = "journey-entrance";
|
|
2788
|
+
function qi(e, t, n) {
|
|
2789
2789
|
return {
|
|
2790
2790
|
id: n,
|
|
2791
2791
|
x: e.x,
|
|
@@ -2796,15 +2796,15 @@ function Pi(e, t, n) {
|
|
|
2796
2796
|
}
|
|
2797
2797
|
//#endregion
|
|
2798
2798
|
//#region src/wayfinding/adapters/boothToEndpoint.ts
|
|
2799
|
-
function
|
|
2799
|
+
function Ji(e) {
|
|
2800
2800
|
var t, n;
|
|
2801
2801
|
let r = e.rect;
|
|
2802
|
-
if (
|
|
2802
|
+
if (we(e)) return {
|
|
2803
2803
|
x: r.center.x,
|
|
2804
2804
|
y: r.center.y,
|
|
2805
2805
|
layer: ""
|
|
2806
2806
|
};
|
|
2807
|
-
let i =
|
|
2807
|
+
let i = pe.fromMinMax(r.min, r.max, e.rotate).corners();
|
|
2808
2808
|
return {
|
|
2809
2809
|
x: r.center.x,
|
|
2810
2810
|
y: r.center.y,
|
|
@@ -2814,7 +2814,7 @@ function Fi(e) {
|
|
|
2814
2814
|
}
|
|
2815
2815
|
//#endregion
|
|
2816
2816
|
//#region src/wayfinding/adapters/campusEndpoints.ts
|
|
2817
|
-
function
|
|
2817
|
+
function Yi(e, t) {
|
|
2818
2818
|
let n = (e) => {
|
|
2819
2819
|
let n = t.getEndpointLayer(e);
|
|
2820
2820
|
return n === e.layer ? e : {
|
|
@@ -2838,28 +2838,28 @@ function Ii(e, t) {
|
|
|
2838
2838
|
}
|
|
2839
2839
|
//#endregion
|
|
2840
2840
|
//#region src/wayfinding/adapters/canvasIconProvider.ts
|
|
2841
|
-
var
|
|
2842
|
-
function
|
|
2841
|
+
var Xi = "#00A2FF", Zi = "#FF9F06", H = 34, Qi = 4, $i = 56;
|
|
2842
|
+
function U(e, t, n, r, i, a) {
|
|
2843
2843
|
let o = e.get(t);
|
|
2844
|
-
return o ? (o.id = t,
|
|
2844
|
+
return o ? (o.id = t, A(o, n, r, i)) : a();
|
|
2845
2845
|
}
|
|
2846
|
-
function
|
|
2846
|
+
function W(e, t = de(e)) {
|
|
2847
2847
|
return {
|
|
2848
2848
|
canvas: e,
|
|
2849
2849
|
width: t.width,
|
|
2850
2850
|
height: t.height
|
|
2851
2851
|
};
|
|
2852
2852
|
}
|
|
2853
|
-
function
|
|
2853
|
+
function ea(e) {
|
|
2854
2854
|
var t, n;
|
|
2855
|
-
let { iconMap: r, pixelRatio: i } = e, a = (t = e.sourceColor) == null ?
|
|
2856
|
-
l.set("destination",
|
|
2857
|
-
let u =
|
|
2858
|
-
u.id = "current-location", l.set("current",
|
|
2859
|
-
let d =
|
|
2860
|
-
return l.set("transition",
|
|
2861
|
-
width:
|
|
2862
|
-
height:
|
|
2855
|
+
let { iconMap: r, pixelRatio: i } = e, a = (t = e.sourceColor) == null ? Xi : t, o = (n = e.destinationColor) == null ? Zi : n, s = e.sourceColor ? /* @__PURE__ */ new Map() : r, c = e.destinationColor ? /* @__PURE__ */ new Map() : r, l = /* @__PURE__ */ new Map();
|
|
2856
|
+
l.set("destination", W(U(c, "destination", H, H, i, () => C(i, o)))), l.set("source", W(U(s, "departure", H, H, i, () => Se(i, a)))), l.set("source_inactive", W(U(r, "departure_inactive", H, H, i, () => Se(i, a))));
|
|
2857
|
+
let u = Se(i, a);
|
|
2858
|
+
u.id = "current-location", l.set("current", W(u));
|
|
2859
|
+
let d = U(r, "transition", H, H, i, () => Se(i, a));
|
|
2860
|
+
return l.set("transition", W(d)), l.set("transition_up", W(U(r, "transition_up", $i, H, i, () => d))), l.set("transition_down", W(U(r, "transition_down", $i, H, i, () => d))), l.set("transition_entry", W(U(s, "departure", H, H, i, () => Se(i, a)))), l.set("current_arrow", W(U(r, "direction", H, H, i, () => oe(i, a)))), l.set("trail", W(O(Qi, "#b5b7bc"), {
|
|
2861
|
+
width: Ce(Qi),
|
|
2862
|
+
height: Ce(Qi)
|
|
2863
2863
|
})), { getIcon(e) {
|
|
2864
2864
|
let t = l.get(e);
|
|
2865
2865
|
if (!t) throw Error(`Unknown icon: ${e}`);
|
|
@@ -2868,11 +2868,11 @@ function Vi(e) {
|
|
|
2868
2868
|
}
|
|
2869
2869
|
//#endregion
|
|
2870
2870
|
//#region src/wayfinding/adapters/floorContext.ts
|
|
2871
|
-
var
|
|
2872
|
-
function
|
|
2871
|
+
var ta = 0;
|
|
2872
|
+
function na(e, t, n, r) {
|
|
2873
2873
|
return {
|
|
2874
2874
|
showAllFloors() {
|
|
2875
|
-
return e.mode ===
|
|
2875
|
+
return e.mode === ta;
|
|
2876
2876
|
},
|
|
2877
2877
|
getActiveFloors() {
|
|
2878
2878
|
var i;
|
|
@@ -2894,31 +2894,31 @@ function Ui(e, t, n, r) {
|
|
|
2894
2894
|
}
|
|
2895
2895
|
//#endregion
|
|
2896
2896
|
//#region src/wayfinding/adapters/graphDataSource.ts
|
|
2897
|
-
var
|
|
2897
|
+
var ra = (e) => !!(e != null && e.startsWith("WF")), ia = {
|
|
2898
2898
|
venues: [],
|
|
2899
2899
|
venueAt: () => null,
|
|
2900
2900
|
venueOfLayer: () => null
|
|
2901
2901
|
};
|
|
2902
|
-
function
|
|
2902
|
+
function aa(e = ia) {
|
|
2903
2903
|
let t = (t) => {
|
|
2904
2904
|
var n;
|
|
2905
2905
|
return (n = e.venueAt(t)) == null || (n = n.levels.find((e) => e.ordinal === 0)) == null ? void 0 : n.layer.name;
|
|
2906
2906
|
}, n = null, r = () => {
|
|
2907
2907
|
var r, i;
|
|
2908
|
-
let a =
|
|
2908
|
+
let a = l(), { venues: o } = e;
|
|
2909
2909
|
if ((n == null ? void 0 : n.wfData) === a && n.venues === o) return n;
|
|
2910
|
-
let s = (r = a == null ? void 0 : a.lines) == null ? [] : r,
|
|
2910
|
+
let s = (r = a == null ? void 0 : a.lines) == null ? [] : r, c = (i = a == null ? void 0 : a.lineEnds) == null ? [] : i;
|
|
2911
2911
|
if (!o.length) n = {
|
|
2912
2912
|
wfData: a,
|
|
2913
2913
|
venues: o,
|
|
2914
2914
|
lines: s,
|
|
2915
|
-
lineEnds:
|
|
2915
|
+
lineEnds: c,
|
|
2916
2916
|
outdoorLayers: [],
|
|
2917
2917
|
campusLayers: []
|
|
2918
2918
|
};
|
|
2919
2919
|
else {
|
|
2920
2920
|
let e = /* @__PURE__ */ new Set(), r = (n) => {
|
|
2921
|
-
if (!
|
|
2921
|
+
if (!ra(n.layer)) return n;
|
|
2922
2922
|
let r = t(n);
|
|
2923
2923
|
return r ? (e.add(r), {
|
|
2924
2924
|
...n,
|
|
@@ -2928,14 +2928,14 @@ function Ki(e = Gi) {
|
|
|
2928
2928
|
...e,
|
|
2929
2929
|
p0: r(e.p0),
|
|
2930
2930
|
p1: r(e.p1)
|
|
2931
|
-
})),
|
|
2931
|
+
})), l = new Set(i.flatMap(({ p0: e, p1: t }) => [e.layer, t.layer]).filter((e) => ra(e)));
|
|
2932
2932
|
n = {
|
|
2933
2933
|
wfData: a,
|
|
2934
2934
|
venues: o,
|
|
2935
2935
|
lines: i,
|
|
2936
|
-
lineEnds:
|
|
2937
|
-
outdoorLayers: [...
|
|
2938
|
-
campusLayers: [...e, ...
|
|
2936
|
+
lineEnds: c.map(r),
|
|
2937
|
+
outdoorLayers: [...l],
|
|
2938
|
+
campusLayers: [...e, ...l]
|
|
2939
2939
|
};
|
|
2940
2940
|
}
|
|
2941
2941
|
return n;
|
|
@@ -2954,25 +2954,25 @@ function Ki(e = Gi) {
|
|
|
2954
2954
|
}
|
|
2955
2955
|
//#endregion
|
|
2956
2956
|
//#region src/utils/math.ts
|
|
2957
|
-
var
|
|
2958
|
-
function
|
|
2957
|
+
var oa = /* @__PURE__ */ e(be(), 1);
|
|
2958
|
+
function sa(e, t) {
|
|
2959
2959
|
return e * (1 - t / 100);
|
|
2960
2960
|
}
|
|
2961
2961
|
//#endregion
|
|
2962
2962
|
//#region src/wayfinding/adapters/kioskCanvas.ts
|
|
2963
|
-
var
|
|
2964
|
-
function
|
|
2963
|
+
var ca = 199, la = 152, ua = 55, da = "#ee4422";
|
|
2964
|
+
function fa(e, t) {
|
|
2965
2965
|
let n = devicePixelRatio, r = e == null ? void 0 : e.get("kiosk");
|
|
2966
2966
|
if (r) {
|
|
2967
2967
|
r.id = "kiosk";
|
|
2968
2968
|
let e = t ? t / 100 : 1;
|
|
2969
|
-
return
|
|
2969
|
+
return A(r, sa(ca * e, ua), sa(la * e, ua), n);
|
|
2970
2970
|
}
|
|
2971
|
-
return
|
|
2971
|
+
return oe(n, (0, oa.default)(da).hex());
|
|
2972
2972
|
}
|
|
2973
2973
|
//#endregion
|
|
2974
2974
|
//#region src/wayfinding/adapters/positionInput.ts
|
|
2975
|
-
function
|
|
2975
|
+
function pa(e) {
|
|
2976
2976
|
return {
|
|
2977
2977
|
x: e.x,
|
|
2978
2978
|
y: e.y,
|
|
@@ -2982,12 +2982,12 @@ function ea(e) {
|
|
|
2982
2982
|
}
|
|
2983
2983
|
//#endregion
|
|
2984
2984
|
//#region src/wayfinding/bindMobxReactions.ts
|
|
2985
|
-
var
|
|
2986
|
-
function
|
|
2985
|
+
var ma = (e) => "rect" in e ? Ji(e) : e;
|
|
2986
|
+
function ha({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStore: r, uiState: i, layerStore: a } }) {
|
|
2987
2987
|
let o = [];
|
|
2988
2988
|
function s() {
|
|
2989
2989
|
var t;
|
|
2990
|
-
let n = i.selectedRoute, a = n != null && n.from ?
|
|
2990
|
+
let n = i.selectedRoute, a = n != null && n.from ? ma(n.from) : null, o = n != null && n.to ? ma(n.to) : null;
|
|
2991
2991
|
if (!a || !o) {
|
|
2992
2992
|
e.clearRoute(), r.markRouted(n);
|
|
2993
2993
|
return;
|
|
@@ -2995,7 +2995,7 @@ function na({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
2995
2995
|
let s = e.setRoute({
|
|
2996
2996
|
from: a,
|
|
2997
2997
|
to: o,
|
|
2998
|
-
waypoints: n == null || (t = n.waypoints) == null ? void 0 : t.map(
|
|
2998
|
+
waypoints: n == null || (t = n.waypoints) == null ? void 0 : t.map(Ji),
|
|
2999
2999
|
accessible: r.onlyAccessible
|
|
3000
3000
|
});
|
|
3001
3001
|
r.markRouted(n), s === !1 && console.error(/* @__PURE__ */ Error(`Route not found: (${a.x},${a.y}) → (${o.x},${o.y})`));
|
|
@@ -3006,7 +3006,7 @@ function na({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
3006
3006
|
e.setPosition(null), n(null);
|
|
3007
3007
|
return;
|
|
3008
3008
|
}
|
|
3009
|
-
let l =
|
|
3009
|
+
let l = pa(t);
|
|
3010
3010
|
c ? (e.setPosition(null), n({
|
|
3011
3011
|
x: l.x,
|
|
3012
3012
|
y: l.y,
|
|
@@ -3017,8 +3017,8 @@ function na({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
3017
3017
|
var t;
|
|
3018
3018
|
let n = r.currentPosition, a = i.selectedRoute;
|
|
3019
3019
|
if (!n || !(a != null && a.to)) return;
|
|
3020
|
-
let o = !a.from, s = ((t = a.from) == null ? void 0 : t.id) === "current-position" && e.shouldReroute(
|
|
3021
|
-
!o && !s || r.rebuildRouteFromPosition(
|
|
3020
|
+
let o = !a.from, s = ((t = a.from) == null ? void 0 : t.id) === "current-position" && e.shouldReroute(pa(n));
|
|
3021
|
+
!o && !s || r.rebuildRouteFromPosition(qi(n, Wi, wi));
|
|
3022
3022
|
}
|
|
3023
3023
|
function u() {
|
|
3024
3024
|
var e;
|
|
@@ -3032,13 +3032,13 @@ function na({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
3032
3032
|
let t = i.selectedRoute, n = r.currentPosition;
|
|
3033
3033
|
if (!(t != null && t.to) || !n || ((e = t.from) == null ? void 0 : e.id) !== "current-position" || r.routeLines.length > 0) return;
|
|
3034
3034
|
let a = n.z == null ? "" : String(n.z);
|
|
3035
|
-
t.from.x === n.x && t.from.y === n.y && t.from.layer === a || r.rebuildRouteFromPosition(
|
|
3035
|
+
t.from.x === n.x && t.from.y === n.y && t.from.layer === a || r.rebuildRouteFromPosition(qi(n, Wi, wi));
|
|
3036
3036
|
}
|
|
3037
|
-
o.push(
|
|
3037
|
+
o.push(_(() => a.layersLoaded, () => {
|
|
3038
3038
|
s(), c();
|
|
3039
|
-
}),
|
|
3039
|
+
}), _(() => [i.selectedRoute, r.onlyAccessible], () => {
|
|
3040
3040
|
s(), c();
|
|
3041
|
-
}),
|
|
3041
|
+
}), _(() => {
|
|
3042
3042
|
let e = r.currentPosition;
|
|
3043
3043
|
return e ? {
|
|
3044
3044
|
x: e.x,
|
|
@@ -3049,7 +3049,7 @@ function na({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
3049
3049
|
} : null;
|
|
3050
3050
|
}, () => {
|
|
3051
3051
|
c();
|
|
3052
|
-
}, { equals:
|
|
3052
|
+
}, { equals: g.structural }), _(() => {
|
|
3053
3053
|
let e = r.currentPosition;
|
|
3054
3054
|
return e ? {
|
|
3055
3055
|
x: e.x,
|
|
@@ -3058,12 +3058,12 @@ function na({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
3058
3058
|
} : null;
|
|
3059
3059
|
}, () => {
|
|
3060
3060
|
l(), f();
|
|
3061
|
-
}, { equals:
|
|
3061
|
+
}, { equals: g.structural }), _(() => [
|
|
3062
3062
|
i.kioskData,
|
|
3063
3063
|
a.mode,
|
|
3064
3064
|
d()
|
|
3065
|
-
], () => u(), { equals:
|
|
3066
|
-
let p = null,
|
|
3065
|
+
], () => u(), { equals: g.structural }));
|
|
3066
|
+
let p = null, m = _(() => [
|
|
3067
3067
|
r.currentRouteLayer,
|
|
3068
3068
|
i.getRouteNextFloor,
|
|
3069
3069
|
d().join("\n")
|
|
@@ -3073,7 +3073,7 @@ function na({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
3073
3073
|
}, 0));
|
|
3074
3074
|
});
|
|
3075
3075
|
return o.push(() => {
|
|
3076
|
-
p !== null && clearTimeout(p),
|
|
3076
|
+
p !== null && clearTimeout(p), m();
|
|
3077
3077
|
}), s(), c(), u(), () => {
|
|
3078
3078
|
for (let e of o) e();
|
|
3079
3079
|
o.length = 0;
|
|
@@ -3081,50 +3081,50 @@ function na({ wayfinding: e, kioskHandler: t, yahHandler: n, stores: { routeStor
|
|
|
3081
3081
|
}
|
|
3082
3082
|
//#endregion
|
|
3083
3083
|
//#region src/wayfinding/handlers/kioskHandler.ts
|
|
3084
|
-
var
|
|
3085
|
-
function
|
|
3084
|
+
var ga = "kiosk";
|
|
3085
|
+
function _a({ wayfinding: e, kioskIconMap: t, floorContext: n }) {
|
|
3086
3086
|
let r = /* @__PURE__ */ new Map(), i = (e) => {
|
|
3087
3087
|
let n = e == null ? 100 : e, i = r.get(n);
|
|
3088
3088
|
if (i) return i;
|
|
3089
|
-
let a =
|
|
3089
|
+
let a = fa(t, e);
|
|
3090
3090
|
return r.set(n, a), a;
|
|
3091
3091
|
};
|
|
3092
3092
|
return (t) => {
|
|
3093
3093
|
var r;
|
|
3094
3094
|
let a = n.showAllFloors() || !(t != null && t.z) || n.isLayerVisible(t.z);
|
|
3095
3095
|
if (!t || !a) {
|
|
3096
|
-
e.setIcon(
|
|
3096
|
+
e.setIcon(ga, null), e.flush();
|
|
3097
3097
|
return;
|
|
3098
3098
|
}
|
|
3099
3099
|
let o = i(t.iconSizePercent);
|
|
3100
|
-
e.setIcon(
|
|
3100
|
+
e.setIcon(ga, {
|
|
3101
3101
|
canvas: o,
|
|
3102
|
-
...
|
|
3102
|
+
...de(o),
|
|
3103
3103
|
x: t.x,
|
|
3104
3104
|
y: t.y,
|
|
3105
|
-
rotation:
|
|
3105
|
+
rotation: D((r = t.heading) == null ? 0 : r),
|
|
3106
3106
|
screenSpace: !1
|
|
3107
3107
|
}), e.flush();
|
|
3108
3108
|
};
|
|
3109
3109
|
}
|
|
3110
3110
|
//#endregion
|
|
3111
3111
|
//#region src/wayfinding/handlers/yahHandler.ts
|
|
3112
|
-
var
|
|
3113
|
-
function
|
|
3114
|
-
let n = e.get(
|
|
3115
|
-
return n ? (n.id =
|
|
3112
|
+
var va = "yah", ya = "#ff4343", ba = 64, xa = 90, Sa = 32;
|
|
3113
|
+
function Ca(e, t) {
|
|
3114
|
+
let n = e.get(va);
|
|
3115
|
+
return n ? (n.id = va, A(n, sa(ba, Sa), sa(xa, Sa), t)) : T(t, ya);
|
|
3116
3116
|
}
|
|
3117
|
-
function
|
|
3118
|
-
let i =
|
|
3117
|
+
function wa({ wayfinding: e, iconMap: t, pixelRatio: n, floorContext: r }) {
|
|
3118
|
+
let i = Ca(t, n);
|
|
3119
3119
|
return i.id = "current-location-2", (t) => {
|
|
3120
3120
|
if (!t) {
|
|
3121
|
-
e.setIcon(
|
|
3121
|
+
e.setIcon(va, null), e.flush();
|
|
3122
3122
|
return;
|
|
3123
3123
|
}
|
|
3124
3124
|
let n = r.isLayerVisible(t.layer);
|
|
3125
|
-
e.setIcon(
|
|
3125
|
+
e.setIcon(va, {
|
|
3126
3126
|
canvas: i,
|
|
3127
|
-
...
|
|
3127
|
+
...de(i),
|
|
3128
3128
|
x: t.x,
|
|
3129
3129
|
y: t.y,
|
|
3130
3130
|
hidden: !n,
|
|
@@ -3135,34 +3135,34 @@ function da({ wayfinding: e, iconMap: t, pixelRatio: n, floorContext: r }) {
|
|
|
3135
3135
|
}
|
|
3136
3136
|
//#endregion
|
|
3137
3137
|
//#region src/wayfinding/createWayfinding.ts
|
|
3138
|
-
var
|
|
3139
|
-
function
|
|
3140
|
-
return
|
|
3138
|
+
var Ta = null;
|
|
3139
|
+
function Ea() {
|
|
3140
|
+
return Ta !== null;
|
|
3141
3141
|
}
|
|
3142
|
-
function
|
|
3143
|
-
if (!
|
|
3144
|
-
return
|
|
3142
|
+
function Da() {
|
|
3143
|
+
if (!Ta) throw Error("Wayfinding is not initialized — call createWayfinding() first.");
|
|
3144
|
+
return Ta;
|
|
3145
3145
|
}
|
|
3146
|
-
function
|
|
3147
|
-
return
|
|
3146
|
+
function Oa(e, t, n) {
|
|
3147
|
+
return Da().wayfinding.buildRoute(e, t, n);
|
|
3148
3148
|
}
|
|
3149
|
-
function
|
|
3150
|
-
let { scene: t, store: n, canvas: r } = e, i =
|
|
3151
|
-
attachCardinalSnap:
|
|
3152
|
-
update:
|
|
3149
|
+
function ka(e) {
|
|
3150
|
+
let { scene: t, store: n, canvas: r } = e, i = Ci(t.rootLayer), { wayfinding: a, dispose: o } = Aa(n, i, {
|
|
3151
|
+
attachCardinalSnap: ve,
|
|
3152
|
+
update: me
|
|
3153
3153
|
}), s = i.icons;
|
|
3154
|
-
return s.onClick = (e) =>
|
|
3155
|
-
s.onClick = void 0, s.onPointerMove = void 0, s.onPointerOut = void 0, r.current && (r.current.style.cursor = ""),
|
|
3154
|
+
return s.onClick = (e) => Ma(a, e), s.onPointerMove = (e) => Na(a, r, e), s.onPointerOut = () => Na(a, r), me(s), () => {
|
|
3155
|
+
s.onClick = void 0, s.onPointerMove = void 0, s.onPointerOut = void 0, r.current && (r.current.style.cursor = ""), me(s), o();
|
|
3156
3156
|
};
|
|
3157
3157
|
}
|
|
3158
|
-
function
|
|
3158
|
+
function Aa(e, t, r) {
|
|
3159
3159
|
var i, a;
|
|
3160
|
-
let o =
|
|
3160
|
+
let o = aa(e.venueStore), s = (i = n().wayfindingColors) == null ? {} : i, c = ea({
|
|
3161
3161
|
iconMap: e.fp.icons,
|
|
3162
3162
|
pixelRatio: devicePixelRatio,
|
|
3163
3163
|
sourceColor: s.source,
|
|
3164
3164
|
destinationColor: s.destination
|
|
3165
|
-
}), l =
|
|
3165
|
+
}), l = na(e.layerStore, e.routeStore, e.venueStore, o), u = Yi(Ui({
|
|
3166
3166
|
dataSource: o,
|
|
3167
3167
|
renderer: r,
|
|
3168
3168
|
rendererConfig: { colors: {
|
|
@@ -3173,7 +3173,7 @@ function _a(e, t, r) {
|
|
|
3173
3173
|
iconProvider: c,
|
|
3174
3174
|
floorContext: l,
|
|
3175
3175
|
layers: t,
|
|
3176
|
-
gpsConfig: (a =
|
|
3176
|
+
gpsConfig: (a = Re()) == null || (a = a.properties) == null ? void 0 : a.config,
|
|
3177
3177
|
screenSpaceIcons: e.uiState.is3DView,
|
|
3178
3178
|
onTransitionClick: (t) => {
|
|
3179
3179
|
t.role === "exit" && e.layerStore.updateVisibility(t.targetLayer, !0);
|
|
@@ -3182,14 +3182,14 @@ function _a(e, t, r) {
|
|
|
3182
3182
|
e.routeStore.updateRoute([...t], o.getCampusLayers()), n.isEmpty() || (e.uiState.moveToRect = n);
|
|
3183
3183
|
},
|
|
3184
3184
|
onRouteDistance: (t) => e.routeStore.updateRouteDistance(t)
|
|
3185
|
-
}), o), d =
|
|
3185
|
+
}), o), d = ha({
|
|
3186
3186
|
wayfinding: u,
|
|
3187
|
-
kioskHandler:
|
|
3187
|
+
kioskHandler: _a({
|
|
3188
3188
|
wayfinding: u,
|
|
3189
3189
|
kioskIconMap: e.fp.icons,
|
|
3190
3190
|
floorContext: l
|
|
3191
3191
|
}),
|
|
3192
|
-
yahHandler:
|
|
3192
|
+
yahHandler: wa({
|
|
3193
3193
|
wayfinding: u,
|
|
3194
3194
|
iconMap: e.fp.icons,
|
|
3195
3195
|
pixelRatio: devicePixelRatio,
|
|
@@ -3203,20 +3203,20 @@ function _a(e, t, r) {
|
|
|
3203
3203
|
});
|
|
3204
3204
|
e.routeStore.showAccessible = o.getLines().some((e) => e.unaccessible);
|
|
3205
3205
|
let f = { wayfinding: u };
|
|
3206
|
-
return
|
|
3206
|
+
return Ta = f, u.flush(), {
|
|
3207
3207
|
wayfinding: u,
|
|
3208
3208
|
dispose() {
|
|
3209
|
-
|
|
3209
|
+
ja(f) && (Ta = null, e.routeStore.showAccessible = !1, e.routeStore.markRouted(null)), d(), u.destroy();
|
|
3210
3210
|
}
|
|
3211
3211
|
};
|
|
3212
3212
|
}
|
|
3213
|
-
function
|
|
3214
|
-
return
|
|
3213
|
+
function ja(e) {
|
|
3214
|
+
return Ta === e;
|
|
3215
3215
|
}
|
|
3216
|
-
function
|
|
3216
|
+
function Ma(e, t) {
|
|
3217
3217
|
e.handleClick([t.def]) && t.stopPropagation();
|
|
3218
3218
|
}
|
|
3219
|
-
function
|
|
3219
|
+
function Na(e, t, n) {
|
|
3220
3220
|
let r = t.current;
|
|
3221
3221
|
if (!r) return;
|
|
3222
3222
|
let i = n ? e.handleHover([n.def]) : !1;
|
|
@@ -3224,7 +3224,7 @@ function ba(e, t, n) {
|
|
|
3224
3224
|
}
|
|
3225
3225
|
//#endregion
|
|
3226
3226
|
//#region src/wayfinding/routeSteps.ts
|
|
3227
|
-
function
|
|
3227
|
+
function Pa(e, t, n) {
|
|
3228
3228
|
let r = [], i = null;
|
|
3229
3229
|
for (let a of e) {
|
|
3230
3230
|
if (!t.has(a)) {
|
|
@@ -3237,14 +3237,814 @@ function xa(e, t, n) {
|
|
|
3237
3237
|
}
|
|
3238
3238
|
//#endregion
|
|
3239
3239
|
//#region src/store/reveal-layer.ts
|
|
3240
|
-
var
|
|
3241
|
-
function
|
|
3242
|
-
return !e || e.visible ? (n(),
|
|
3240
|
+
var Fa = () => void 0;
|
|
3241
|
+
function Ia({ layer: e, show: t, then: n }) {
|
|
3242
|
+
return !e || e.visible ? (n(), Fa) : (t(e), h(() => e.visible, n));
|
|
3243
|
+
}
|
|
3244
|
+
//#endregion
|
|
3245
|
+
//#region src/data/venues.ts
|
|
3246
|
+
var La = /^[a-z0-9_-]+$/, Ra = ["scene", "marker"], za = 11, Ba = 10;
|
|
3247
|
+
function Va(e, t) {
|
|
3248
|
+
return e * Ba >= t * za;
|
|
3249
|
+
}
|
|
3250
|
+
function Ha(e) {
|
|
3251
|
+
return e === 60 ? 66 : Math.ceil(e * za / Ba);
|
|
3252
|
+
}
|
|
3253
|
+
var Ua = /* @__PURE__ */ new Set([
|
|
3254
|
+
"id",
|
|
3255
|
+
"name",
|
|
3256
|
+
"order",
|
|
3257
|
+
"levels",
|
|
3258
|
+
"contour",
|
|
3259
|
+
"markerPoint",
|
|
3260
|
+
"detailMinSizePx",
|
|
3261
|
+
"markerMaxSizePx",
|
|
3262
|
+
"layers",
|
|
3263
|
+
"entrances",
|
|
3264
|
+
"campusViewbox"
|
|
3265
|
+
]), Wa = /* @__PURE__ */ new Set([
|
|
3266
|
+
"layer",
|
|
3267
|
+
"ordinal",
|
|
3268
|
+
"name",
|
|
3269
|
+
"initial"
|
|
3270
|
+
]), Ga = /* @__PURE__ */ new Set([
|
|
3271
|
+
"layer",
|
|
3272
|
+
"point",
|
|
3273
|
+
"name"
|
|
3274
|
+
]), Ka = /* @__PURE__ */ new Set([
|
|
3275
|
+
"layer",
|
|
3276
|
+
"render",
|
|
3277
|
+
"replacesDefault",
|
|
3278
|
+
"suppressesLabel",
|
|
3279
|
+
"minSizePx",
|
|
3280
|
+
"maxSizePx"
|
|
3281
|
+
]), qa = (e, t) => e < t ? -1 : +(e > t), G = (e) => typeof e == "object" && !!e && !Array.isArray(e), K = (e) => typeof e == "number" && Number.isFinite(e), q = (e) => typeof e == "string" && e.length > 0, Ja = (e) => G(e) && K(e.x) && K(e.y), Ya = (e) => G(e) && K(e.x) && K(e.y) && K(e.width) && K(e.height) && e.width > 0 && e.height > 0;
|
|
3282
|
+
function Xa(e) {
|
|
3283
|
+
try {
|
|
3284
|
+
let t = JSON.stringify(e);
|
|
3285
|
+
return t === void 0 ? String(e) : t;
|
|
3286
|
+
} catch {
|
|
3287
|
+
return String(e);
|
|
3288
|
+
}
|
|
3289
|
+
}
|
|
3290
|
+
function Za(e) {
|
|
3291
|
+
for (let t of e) try {
|
|
3292
|
+
console.warn("parseVenues:", `${t.code} (${t.effect}) ${t.path || "(root)"}: ${t.message}; ${t.consequence}`);
|
|
3293
|
+
} catch {}
|
|
3294
|
+
}
|
|
3295
|
+
function J(e, t, n, r = null) {
|
|
3296
|
+
return Za(t), {
|
|
3297
|
+
venues: e,
|
|
3298
|
+
diagnostics: t,
|
|
3299
|
+
quarantinedLayerNames: n,
|
|
3300
|
+
campusViewbox: r
|
|
3301
|
+
};
|
|
3302
|
+
}
|
|
3303
|
+
function Qa(e, t, n, r) {
|
|
3304
|
+
let i = (e, t, n) => (t.x - e.x) * (n.y - e.y) - (t.y - e.y) * (n.x - e.x), a = i(n, r, e), o = i(n, r, t), s = i(e, t, n), c = i(e, t, r);
|
|
3305
|
+
if ((a > 0 && o < 0 || a < 0 && o > 0) && (s > 0 && c < 0 || s < 0 && c > 0)) return !0;
|
|
3306
|
+
let l = (e, t, n) => Math.min(e.x, t.x) <= n.x && n.x <= Math.max(e.x, t.x) && Math.min(e.y, t.y) <= n.y && n.y <= Math.max(e.y, t.y);
|
|
3307
|
+
return a === 0 && l(n, r, e) || o === 0 && l(n, r, t) || s === 0 && l(e, t, n) || c === 0 && l(e, t, r);
|
|
3308
|
+
}
|
|
3309
|
+
function $a(e) {
|
|
3310
|
+
if (!Array.isArray(e)) return { issue: "is not an array" };
|
|
3311
|
+
if (e.length < 3) return { issue: `has ${e.length} point(s); a ring needs at least 3` };
|
|
3312
|
+
if (!e.every(Ja)) return { issue: "contains a non-finite or malformed point" };
|
|
3313
|
+
let t = e.map((e) => ({
|
|
3314
|
+
x: e.x,
|
|
3315
|
+
y: e.y
|
|
3316
|
+
})), n = t[0], r = t[t.length - 1];
|
|
3317
|
+
if (n.x === r.x && n.y === r.y && t.pop(), t.length < 3) return { issue: `has ${t.length} point(s); a ring needs at least 3` };
|
|
3318
|
+
let { width: i, height: a } = N.fromPoints(t).size;
|
|
3319
|
+
if (i === 0 || a === 0) return { issue: "is degenerate (zero width or height)" };
|
|
3320
|
+
for (let e = 0; e < t.length; e++) {
|
|
3321
|
+
let n = t[e], r = t[(e + 1) % t.length];
|
|
3322
|
+
for (let i = e + 1; i < t.length; i++) if (!(i === e || (i + 1) % t.length === e || (e + 1) % t.length === i) && Qa(n, r, t[i], t[(i + 1) % t.length])) return { issue: "is self-intersecting; v1 accepts one simple ring only (no holes, no multi-part)" };
|
|
3323
|
+
}
|
|
3324
|
+
let o = 0;
|
|
3325
|
+
for (let e = 0; e < t.length; e++) {
|
|
3326
|
+
let n = t[e], r = t[(e + 1) % t.length];
|
|
3327
|
+
o += n.x * r.y - r.x * n.y;
|
|
3328
|
+
}
|
|
3329
|
+
return o === 0 ? { issue: "is degenerate (zero area)" } : { ring: t };
|
|
3330
|
+
}
|
|
3331
|
+
function eo(e, t) {
|
|
3332
|
+
let n = [];
|
|
3333
|
+
for (let i of e) {
|
|
3334
|
+
var r;
|
|
3335
|
+
if (!i.surviving) continue;
|
|
3336
|
+
let e = t.get(i.value.layer), a = (r = e == null ? void 0 : e.rect) == null ? e == null ? void 0 : e.viewbox : r;
|
|
3337
|
+
!a || a.area <= 0 || n.push(...fe(a).map((e) => ({
|
|
3338
|
+
x: e.x,
|
|
3339
|
+
y: e.y
|
|
3340
|
+
})));
|
|
3341
|
+
}
|
|
3342
|
+
return le(n);
|
|
3343
|
+
}
|
|
3344
|
+
function to(e, t, n = []) {
|
|
3345
|
+
try {
|
|
3346
|
+
return no(e, t, n);
|
|
3347
|
+
} catch {
|
|
3348
|
+
return J([], [{
|
|
3349
|
+
code: "venues-payload-invalid",
|
|
3350
|
+
path: "venues",
|
|
3351
|
+
message: "could not be parsed",
|
|
3352
|
+
consequence: "plan loads as single-venue",
|
|
3353
|
+
effect: "dropped"
|
|
3354
|
+
}], []);
|
|
3355
|
+
}
|
|
3356
|
+
}
|
|
3357
|
+
function no(e, t, n) {
|
|
3358
|
+
let r = [], i = (e) => (t, n, i, a) => r.push({
|
|
3359
|
+
code: t,
|
|
3360
|
+
path: n,
|
|
3361
|
+
message: i,
|
|
3362
|
+
consequence: a,
|
|
3363
|
+
effect: e
|
|
3364
|
+
}), a = i("dropped"), o = i("fallback"), s = i("clamped"), c = i("advisory"), l = (e, t, n) => {
|
|
3365
|
+
for (let r of Object.keys(t)) n.has(r) || c("unknown-key", `${e}.${r}`, "is not a contract field", "ignored by the SDK");
|
|
3366
|
+
}, u = (e) => {
|
|
3367
|
+
let t = r.length;
|
|
3368
|
+
try {
|
|
3369
|
+
return e();
|
|
3370
|
+
} finally {
|
|
3371
|
+
r.length = t;
|
|
3372
|
+
}
|
|
3373
|
+
}, d = /* @__PURE__ */ new Set();
|
|
3374
|
+
for (let e of n) for (let t of e) d.add(t.layer);
|
|
3375
|
+
if (e == null) return J([], r, []);
|
|
3376
|
+
if (!G(e)) return a("venues-payload-invalid", "", "payload is not an object", "nothing to parse"), J([], r, []);
|
|
3377
|
+
let f = e.venues;
|
|
3378
|
+
if (f === void 0) return J([], r, []);
|
|
3379
|
+
if (e.venuesVersion !== void 0 && e.venuesVersion !== 1) return a("venues-version-unsupported", "venuesVersion", `payload version ${Xa(e.venuesVersion)} is unsupported; SDK supports version 1`, "whole venues array ignored; plan loads as single-venue"), J([], r, []);
|
|
3380
|
+
if (!Array.isArray(f)) return a("venues-payload-invalid", "venues", "is not an array", "plan loads as single-venue"), J([], r, []);
|
|
3381
|
+
let p = /* @__PURE__ */ new Map(), m = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new Map();
|
|
3382
|
+
f.forEach((e, t) => {
|
|
3383
|
+
if (!G(e) || !q(e.name)) return;
|
|
3384
|
+
let n = `venues[${t}]`, r = e.name.toLowerCase(), i = m.get(r);
|
|
3385
|
+
i ? h.set(n, i) : m.set(r, n);
|
|
3386
|
+
});
|
|
3387
|
+
let g = f.map((e, n) => {
|
|
3388
|
+
var r, i;
|
|
3389
|
+
let u = `venues[${n}]`;
|
|
3390
|
+
if (!G(e)) return a("venue-identity-invalid", u, "is not an object", "venue dropped"), {
|
|
3391
|
+
at: u,
|
|
3392
|
+
label: u,
|
|
3393
|
+
claimable: !1,
|
|
3394
|
+
order: n,
|
|
3395
|
+
levels: [],
|
|
3396
|
+
aux: [],
|
|
3397
|
+
entrances: [],
|
|
3398
|
+
expectedSceneLayers: [],
|
|
3399
|
+
referencedLayers: []
|
|
3400
|
+
};
|
|
3401
|
+
l(u, e, Ua);
|
|
3402
|
+
let f = !0, m = e.id;
|
|
3403
|
+
q(m) ? (La.test(m) || (a("venue-identity-invalid", `${u}.id`, `"${m}" must match ${La} (lowercase alphanumerics, hyphen, underscore)`, "id is used as a MapLibre feature id, a style-image id and a ?camera[venue]= deep-link value"), f = !1), p.has(m) ? (a("venue-id-duplicate", `${u}.id`, `"${m}" duplicates ${p.get(m)}`, "this venue dropped"), f = !1) : p.set(m, u)) : (a("venue-identity-invalid", `${u}.id`, "is missing or not a non-empty string", "venue dropped"), f = !1);
|
|
3404
|
+
let g = q(m) ? `"${m}"` : u, _ = e.name;
|
|
3405
|
+
q(_) ? h.has(u) && c("venue-name-duplicate", `${u}.name`, `"${_}" duplicates the name of ${h.get(u)} (case-insensitive)`, "nothing dropped — two identical rows in the venue switch, ambiguous search results") : (a("venue-identity-invalid", `${u}.name`, "is missing or not a non-empty string", "venue dropped"), f = !1);
|
|
3406
|
+
let v = n;
|
|
3407
|
+
Number.isInteger(e.order) ? v = e.order : o("venue-order-invalid", `${u}.order`, e.order === void 0 ? "is missing" : "is not an integer", "falls back to array position; order is contractually required (§9)");
|
|
3408
|
+
let y = [], b = (e, t = !1) => {
|
|
3409
|
+
q(e) && !e.startsWith("WF") && t && !y.includes(e) && y.push(e);
|
|
3410
|
+
}, x = [];
|
|
3411
|
+
if (!Array.isArray(e.levels) || e.levels.length === 0) a("venue-levels-missing", `${u}.levels`, "is missing or empty", "venue dropped"), f = !1;
|
|
3412
|
+
else {
|
|
3413
|
+
e.levels.forEach((e, n) => {
|
|
3414
|
+
let r = `${u}.levels[${n}]`;
|
|
3415
|
+
if (!G(e)) {
|
|
3416
|
+
a("level-entry-invalid", r, "is not an object", "level dropped");
|
|
3417
|
+
return;
|
|
3418
|
+
}
|
|
3419
|
+
l(r, e, Wa), b(e.layer, t.has(e.layer));
|
|
3420
|
+
let i = !0;
|
|
3421
|
+
q(e.layer) ? (t.has(e.layer) || (a("level-layer-unknown", `${r}.layer`, `"${e.layer}" does not exist in the plan`, `level dropped; venue ${g} loses this floor (check for a rename or typo)`), i = !1), e.layer.startsWith("WF") && (a("level-layer-wayfinding", `${r}.layer`, `"${e.layer}" is a wayfinding layer`, "WF* layers are excluded before the venue model sees them — level dropped"), i = !1)) : (a("level-layer-invalid", `${r}.layer`, "is missing or not a non-empty string", "level dropped"), i = !1), Number.isInteger(e.ordinal) || (a("level-ordinal-invalid", `${r}.ordinal`, "is missing or not an integer", "level dropped; ordinal is required (0 = ground, -1 = basement)"), i = !1), e.name !== void 0 && !q(e.name) && o("level-field-invalid", `${r}.name`, "is not a non-empty string", "falls back to the layer's description"), e.initial !== void 0 && typeof e.initial != "boolean" && o("level-field-invalid", `${r}.initial`, "is not a boolean", "ignored"), x.push({
|
|
3422
|
+
value: {
|
|
3423
|
+
layer: q(e.layer) ? e.layer : "",
|
|
3424
|
+
ordinal: Number.isInteger(e.ordinal) ? e.ordinal : 0,
|
|
3425
|
+
name: q(e.name) ? e.name : void 0,
|
|
3426
|
+
initial: typeof e.initial == "boolean" ? e.initial : void 0
|
|
3427
|
+
},
|
|
3428
|
+
at: r,
|
|
3429
|
+
ok: i,
|
|
3430
|
+
surviving: !1
|
|
3431
|
+
});
|
|
3432
|
+
});
|
|
3433
|
+
let n = /* @__PURE__ */ new Map();
|
|
3434
|
+
for (let e of x) {
|
|
3435
|
+
if (!e.ok) continue;
|
|
3436
|
+
let t = e.value.ordinal, r = n.get(t);
|
|
3437
|
+
r ? (a("level-ordinal-duplicate", `${e.at}.ordinal`, `${t} duplicates ${r}`, "level dropped; ordinals are unique within a venue"), e.ok = !1) : n.set(t, e.at);
|
|
3438
|
+
}
|
|
3439
|
+
}
|
|
3440
|
+
let S;
|
|
3441
|
+
if (e.contour !== void 0) {
|
|
3442
|
+
let t = $a(e.contour);
|
|
3443
|
+
t.issue ? o("contour-invalid", `${u}.contour`, t.issue, "falls back to the scene layer's geometry, then to the hull of level rects") : S = t.ring;
|
|
3444
|
+
}
|
|
3445
|
+
let C;
|
|
3446
|
+
e.markerPoint !== void 0 && (Ja(e.markerPoint) ? C = {
|
|
3447
|
+
x: e.markerPoint.x,
|
|
3448
|
+
y: e.markerPoint.y
|
|
3449
|
+
} : o("venue-marker-point-invalid", `${u}.markerPoint`, "is not a finite {x, y} point", "falls back to the contour centroid"));
|
|
3450
|
+
let w;
|
|
3451
|
+
e.detailMinSizePx !== void 0 && (!K(e.detailMinSizePx) || e.detailMinSizePx <= 0 ? o("detail-min-size-invalid", `${u}.detailMinSizePx`, "is not a positive finite number", "default 240 used") : w = e.detailMinSizePx);
|
|
3452
|
+
let T;
|
|
3453
|
+
if (e.markerMaxSizePx !== void 0) {
|
|
3454
|
+
let t = w === void 0 ? 240 : Math.max(66, w);
|
|
3455
|
+
!K(e.markerMaxSizePx) || e.markerMaxSizePx <= 0 ? o("marker-max-size-invalid", `${u}.markerMaxSizePx`, "is not a positive finite number", "default 60 used") : e.markerMaxSizePx >= t ? o("marker-max-size-inverted", `${u}.markerMaxSizePx`, `${e.markerMaxSizePx} is at or above the venue's resolved detailMinSizePx of ${t}`, "default 60 used, then the detail-edge clamp applies") : T = e.markerMaxSizePx;
|
|
3456
|
+
}
|
|
3457
|
+
let E = (r = T) == null ? 60 : r;
|
|
3458
|
+
if (w !== void 0 && !Va(w, E)) {
|
|
3459
|
+
let e = Ha(E);
|
|
3460
|
+
s("detail-min-size-clamped", `${u}.detailMinSizePx`, `${w} is below the ${e}px marker/scene sticky enter edge`, `clamped to ${e}`), w = e;
|
|
3461
|
+
}
|
|
3462
|
+
let D = (i = w) == null ? 240 : i, O = [], k = [];
|
|
3463
|
+
e.layers !== void 0 && (Array.isArray(e.layers) ? e.layers.forEach((e, n) => {
|
|
3464
|
+
let r = `${u}.layers[${n}]`;
|
|
3465
|
+
if (!G(e)) {
|
|
3466
|
+
a("aux-entry-invalid", r, "is not an object", "entry dropped");
|
|
3467
|
+
return;
|
|
3468
|
+
}
|
|
3469
|
+
l(r, e, Ka), q(e.layer) && e.render === "scene" && (e.replacesDefault === void 0 || e.replacesDefault === !0) && k.push(e.layer);
|
|
3470
|
+
let i = q(e.layer) && (t.has(e.layer) || d.has(e.layer));
|
|
3471
|
+
b(e.layer, i);
|
|
3472
|
+
let o = !0;
|
|
3473
|
+
q(e.layer) ? (i || (a("aux-layer-unknown", `${r}.layer`, `"${e.layer}" does not exist in the plan`, "entry dropped; venue falls back to the procedural appearance"), o = !1), e.layer.startsWith("WF") && (a("aux-layer-wayfinding", `${r}.layer`, `"${e.layer}" is a wayfinding layer`, "WF* layers are excluded before the venue model sees them — entry dropped"), o = !1)) : (a("aux-layer-invalid", `${r}.layer`, "is missing or not a non-empty string", "entry dropped"), o = !1);
|
|
3474
|
+
let s = Ra.includes(e.render);
|
|
3475
|
+
s || (a("aux-entry-invalid", `${r}.render`, `is ${Xa(e.render)}, expected "scene" or "marker"`, "entry dropped"), o = !1), e.replacesDefault !== void 0 && typeof e.replacesDefault != "boolean" && (a("aux-entry-invalid", `${r}.replacesDefault`, "is not a boolean", "entry dropped"), o = !1), e.suppressesLabel !== void 0 && typeof e.suppressesLabel != "boolean" && (a("aux-entry-invalid", `${r}.suppressesLabel`, "is not a boolean", "entry dropped"), o = !1), e.minSizePx !== void 0 && (!K(e.minSizePx) || e.minSizePx < 0) && (a("aux-entry-invalid", `${r}.minSizePx`, "is not a non-negative finite number", "entry dropped"), o = !1), e.maxSizePx !== void 0 && e.maxSizePx !== "detail" && (!K(e.maxSizePx) || e.maxSizePx < 0) && (a("aux-entry-invalid", `${r}.maxSizePx`, "is not a non-negative finite number or the literal \"detail\"", "entry dropped"), o = !1), K(e.minSizePx) && K(e.maxSizePx) && e.minSizePx >= 0 && e.maxSizePx >= 0 && e.minSizePx > e.maxSizePx && (a("aux-range-inverted", r, `minSizePx ${e.minSizePx} exceeds maxSizePx ${e.maxSizePx}`, "entry dropped"), o = !1);
|
|
3476
|
+
let f = s ? e.render : "scene", p = K(e.minSizePx) && e.minSizePx >= 0 ? e.minSizePx : f === "marker" ? 0 : E, m = e.maxSizePx !== void 0 && (e.maxSizePx === "detail" || K(e.maxSizePx)) ? e.maxSizePx : f === "scene" ? "detail" : E;
|
|
3477
|
+
s && (m === "detail" ? p >= D : p > m) && (a("aux-range-never-visible", r, `resolved range ${p}..${m} can never render`, "entry dropped; the procedural fallback for this render mode is restored"), o = !1), s && f === "scene" && K(e.maxSizePx) && c("aux-max-size-numeric", `${r}.maxSizePx`, `is the hard edge ${e.maxSizePx} rather than "detail"`, "a static edge cannot follow the ±10% detail hysteresis — expect flicker and brief overlap with the floor plan"), O.push({
|
|
3478
|
+
value: {
|
|
3479
|
+
layer: q(e.layer) ? e.layer : "",
|
|
3480
|
+
render: f,
|
|
3481
|
+
replacesDefault: typeof e.replacesDefault == "boolean" ? e.replacesDefault : void 0,
|
|
3482
|
+
suppressesLabel: typeof e.suppressesLabel == "boolean" ? e.suppressesLabel : void 0,
|
|
3483
|
+
minSizePx: K(e.minSizePx) ? e.minSizePx : void 0,
|
|
3484
|
+
maxSizePx: e.maxSizePx === "detail" || K(e.maxSizePx) ? e.maxSizePx : void 0
|
|
3485
|
+
},
|
|
3486
|
+
at: r,
|
|
3487
|
+
ok: o,
|
|
3488
|
+
surviving: !1
|
|
3489
|
+
});
|
|
3490
|
+
}) : o("aux-layers-invalid", `${u}.layers`, "is not an array", "ignored; procedural appearance used"));
|
|
3491
|
+
let A = new Set((Array.isArray(e.levels) ? e.levels : []).filter(G).map((e) => e.layer).filter(q)), j = [];
|
|
3492
|
+
return e.entrances !== void 0 && (Array.isArray(e.entrances) ? e.entrances.forEach((e, t) => {
|
|
3493
|
+
let n = `${u}.entrances[${t}]`;
|
|
3494
|
+
if (!G(e)) {
|
|
3495
|
+
a("entrance-entry-invalid", n, "is not an object", "entrance dropped");
|
|
3496
|
+
return;
|
|
3497
|
+
}
|
|
3498
|
+
l(n, e, Ga);
|
|
3499
|
+
let r = !0;
|
|
3500
|
+
q(e.layer) ? A.has(e.layer) || (a("entrance-layer-foreign", `${n}.layer`, `"${e.layer}" is not a level of venue ${g}`, "entrance dropped; an entrance stands on one of its own venue’s levels"), r = !1) : (a("entrance-layer-invalid", `${n}.layer`, "is missing or not a non-empty string", "entrance dropped"), r = !1), Ja(e.point) || (a("entrance-entry-invalid", `${n}.point`, "is missing or not a finite {x, y} point", "entrance dropped; an entrance is a point before it is anything else"), r = !1), e.name !== void 0 && !q(e.name) && o("entrance-field-invalid", `${n}.name`, "is not a non-empty string", "falls back to the venue’s own name"), !(!r || !q(e.layer) || !Ja(e.point)) && j.push({
|
|
3501
|
+
value: {
|
|
3502
|
+
layer: e.layer,
|
|
3503
|
+
point: {
|
|
3504
|
+
x: e.point.x,
|
|
3505
|
+
y: e.point.y
|
|
3506
|
+
},
|
|
3507
|
+
name: q(e.name) ? e.name : void 0
|
|
3508
|
+
},
|
|
3509
|
+
at: n
|
|
3510
|
+
});
|
|
3511
|
+
}) : o("entrances-invalid", `${u}.entrances`, "is not an array", "ignored; the venue keeps marker-point targeting")), {
|
|
3512
|
+
at: u,
|
|
3513
|
+
id: q(m) ? m : void 0,
|
|
3514
|
+
name: q(_) ? _ : void 0,
|
|
3515
|
+
label: g,
|
|
3516
|
+
claimable: f,
|
|
3517
|
+
order: v,
|
|
3518
|
+
levels: x,
|
|
3519
|
+
aux: O,
|
|
3520
|
+
entrances: j,
|
|
3521
|
+
expectedSceneLayers: k,
|
|
3522
|
+
contour: S,
|
|
3523
|
+
markerPoint: C,
|
|
3524
|
+
detailMinSizePx: w,
|
|
3525
|
+
markerMaxSizePx: T,
|
|
3526
|
+
referencedLayers: y,
|
|
3527
|
+
campusViewbox: e.campusViewbox
|
|
3528
|
+
};
|
|
3529
|
+
}), _ = /* @__PURE__ */ new Set(), v = [...g].sort((e, t) => {
|
|
3530
|
+
var n, r;
|
|
3531
|
+
return e.order - t.order || qa((n = e.id) == null ? "" : n, (r = t.id) == null ? "" : r);
|
|
3532
|
+
}), y = null, b;
|
|
3533
|
+
for (let e of v) {
|
|
3534
|
+
if (e.campusViewbox === void 0) continue;
|
|
3535
|
+
let t = `${e.at}.campusViewbox`;
|
|
3536
|
+
if (b) {
|
|
3537
|
+
a("campus-viewbox-duplicate", t, `${b.at} already carries the campus viewbox`, "this venue's value is ignored; the first carrier by order wins");
|
|
3538
|
+
continue;
|
|
3539
|
+
}
|
|
3540
|
+
b = e;
|
|
3541
|
+
let n = e.campusViewbox;
|
|
3542
|
+
Ya(n) ? y = new N(n.x, n.y, n.width, n.height) : o("campus-viewbox-invalid", t, "is not an {x, y, width, height} of finite numbers with a positive width and height", "the campus is framed by the union of the venue footprints");
|
|
3543
|
+
}
|
|
3544
|
+
let x = () => {
|
|
3545
|
+
let e = /* @__PURE__ */ new Map();
|
|
3546
|
+
for (let e of g) {
|
|
3547
|
+
e.parsed = void 0;
|
|
3548
|
+
for (let t of e.levels) t.surviving = !1;
|
|
3549
|
+
for (let t of e.aux) t.surviving = !1;
|
|
3550
|
+
}
|
|
3551
|
+
for (let t of v) if (!(!t.claimable || !t.id || !t.name || _.has(t))) for (let n of t.levels) {
|
|
3552
|
+
if (!n.ok) continue;
|
|
3553
|
+
let r = n.value.layer, i = e.get(r);
|
|
3554
|
+
if (i) {
|
|
3555
|
+
a("level-layer-claimed", `${n.at}.layer`, `"${r}" is already used by ${i.label} (${i.role})`, "level dropped; a layer belongs to at most one venue and one role");
|
|
3556
|
+
continue;
|
|
3557
|
+
}
|
|
3558
|
+
e.set(r, {
|
|
3559
|
+
label: t.label,
|
|
3560
|
+
role: "level"
|
|
3561
|
+
}), n.surviving = !0;
|
|
3562
|
+
}
|
|
3563
|
+
for (let t of v) {
|
|
3564
|
+
if (!t.claimable || !t.id || !t.name || _.has(t) || !t.levels.some((e) => e.surviving)) continue;
|
|
3565
|
+
let n = 0;
|
|
3566
|
+
for (let r of t.aux) {
|
|
3567
|
+
if (!r.ok) continue;
|
|
3568
|
+
let i = r.value, o = e.get(i.layer);
|
|
3569
|
+
if (o) {
|
|
3570
|
+
a("aux-layer-claimed", `${r.at}.layer`, `"${i.layer}" is already used by ${o.label} (${o.role})`, "entry dropped; a layer is a level, an aux layer, or neither — never two");
|
|
3571
|
+
continue;
|
|
3572
|
+
}
|
|
3573
|
+
if (i.render === "marker" && n > 0) {
|
|
3574
|
+
a("aux-marker-duplicate", `${r.at}.render`, "is a second marker layer for this venue", "at most one per venue; extras dropped, the first wins");
|
|
3575
|
+
continue;
|
|
3576
|
+
}
|
|
3577
|
+
e.set(i.layer, {
|
|
3578
|
+
label: t.label,
|
|
3579
|
+
role: "aux"
|
|
3580
|
+
}), r.surviving = !0, i.render === "marker" && n++;
|
|
3581
|
+
}
|
|
3582
|
+
}
|
|
3583
|
+
return e;
|
|
3584
|
+
}, S = (e) => {
|
|
3585
|
+
var r;
|
|
3586
|
+
if (e.contour) return e.contour;
|
|
3587
|
+
let i = g.indexOf(e), a = e.aux.filter((e) => e.ok && e.value.render === "scene" && e.value.replacesDefault !== !1), s = new Map(a.filter((e) => e.surviving).map((e) => [e.value.layer, e])), l = [];
|
|
3588
|
+
for (let e of (r = n[i]) == null ? [] : r) {
|
|
3589
|
+
let t = s.get(e.layer);
|
|
3590
|
+
if (!(t != null && t.surviving)) continue;
|
|
3591
|
+
let n = (n) => o("footprint-source-unusable", `${t.at}.layer`, `scene layer "${e.layer}" ${n}`, "the next valid replacing scene is tried, then the level-rect hull"), { extraction: r } = e;
|
|
3592
|
+
if (!r.ring) {
|
|
3593
|
+
n(r.unusableElementKinds.length > 0 ? `draws no usable <path>; only paths are footprint sources, and it draws ${r.unusableElementKinds.map((e) => `<${e}>`).join(", ")}` : "could not supply a valid contour");
|
|
3594
|
+
continue;
|
|
3595
|
+
}
|
|
3596
|
+
let i = $a(r.ring);
|
|
3597
|
+
if (!i.ring) {
|
|
3598
|
+
var u;
|
|
3599
|
+
n((u = i.issue) == null ? "could not supply a valid contour" : u);
|
|
3600
|
+
continue;
|
|
3601
|
+
}
|
|
3602
|
+
l.push({
|
|
3603
|
+
candidate: t,
|
|
3604
|
+
layer: e.layer,
|
|
3605
|
+
ring: i.ring,
|
|
3606
|
+
boundsFallback: r.boundsFallback
|
|
3607
|
+
});
|
|
3608
|
+
}
|
|
3609
|
+
l.length > 1 && c("footprint-source-ambiguous", `${e.at}.layers`, `multiple replacing scene layers provide contours: ${l.map(({ layer: e }) => `"${e}"`).join(", ")}`, `the first in plan-layer order, "${l[0].layer}", wins`);
|
|
3610
|
+
let d = l[0];
|
|
3611
|
+
if (d) return d.boundsFallback && o("footprint-bounding-box", `${d.candidate.at}.layer`, `scene layer "${d.layer}" uses its bounding box for the venue contour`, "camera, tap target, and size bounds may extend beyond the artwork"), d.ring;
|
|
3612
|
+
let f = eo(e.levels, t);
|
|
3613
|
+
return f.length >= 3 && e.expectedSceneLayers.length > 0 && o("footprint-source-fallthrough", `${e.at}.contour`, "replacing scene contour unavailable; using the level-rect hull", "bounds, camera target, tap target, and the size axis changed source"), f;
|
|
3614
|
+
};
|
|
3615
|
+
for (;;) {
|
|
3616
|
+
let e = u(() => (x(), v.find((e) => e.claimable && !_.has(e) && e.levels.some((e) => e.surviving) && S(e).length < 3)));
|
|
3617
|
+
if (!e) break;
|
|
3618
|
+
S(e), a("footprint-underivable", `${e.at}.contour`, "no valid polygon can be derived", `venue ${e.label} dropped entirely`), _.add(e);
|
|
3619
|
+
}
|
|
3620
|
+
let C = x();
|
|
3621
|
+
for (let e of g) {
|
|
3622
|
+
var w, T;
|
|
3623
|
+
if (!e.claimable || !e.id || !e.name || _.has(e)) continue;
|
|
3624
|
+
let t = e.levels.filter((e) => e.surviving);
|
|
3625
|
+
if (t.length === 0) {
|
|
3626
|
+
a("venue-levels-all-dropped", `${e.at}.levels`, "no level survives validation", `venue ${e.label} dropped entirely`);
|
|
3627
|
+
continue;
|
|
3628
|
+
}
|
|
3629
|
+
let n = S(e), r = e.levels.filter((e) => e.value.initial === !0), i = t.filter((e) => e.value.initial === !0);
|
|
3630
|
+
r.some((e) => !e.surviving) && o("level-initial-dropped", `${r.find((e) => !e.surviving).at}.initial`, "initial level was dropped", "the lowest surviving ordinal is initial"), e.levels.filter((e) => e.value.ordinal === 0).length > 0 && !t.some((e) => e.value.ordinal === 0) && c("level-ground-dropped", `${e.at}.levels`, "the ordinal 0 (ground) level was dropped", "cross-venue routing into this venue is likely broken (§13); the venue also boots on an upper floor"), i.length > 1 && c("level-initial-duplicate", `${e.at}.levels`, `${i.length} levels are marked initial`, "at most one per venue; the SDK takes the first");
|
|
3631
|
+
let s = (w = i[0]) == null ? t.reduce((e, t) => t.value.ordinal < e.value.ordinal ? t : e) : w, l = new Set(t.map((e) => e.value.layer)), u = [];
|
|
3632
|
+
for (let t of e.entrances) {
|
|
3633
|
+
if (!l.has(t.value.layer)) {
|
|
3634
|
+
a("entrance-level-dropped", `${t.at}.layer`, `level "${t.value.layer}" did not survive validation`, "entrance dropped; the venue falls back to its remaining doors, then to marker-point targeting");
|
|
3635
|
+
continue;
|
|
3636
|
+
}
|
|
3637
|
+
u.push({ ...t.value });
|
|
3638
|
+
}
|
|
3639
|
+
let d = n.map((e) => ({
|
|
3640
|
+
x: e.x,
|
|
3641
|
+
y: e.y
|
|
3642
|
+
}));
|
|
3643
|
+
e.parsed = {
|
|
3644
|
+
id: e.id,
|
|
3645
|
+
name: e.name,
|
|
3646
|
+
order: e.order,
|
|
3647
|
+
levels: t.map((e) => ({
|
|
3648
|
+
layer: e.value.layer,
|
|
3649
|
+
ordinal: e.value.ordinal,
|
|
3650
|
+
name: e.value.name,
|
|
3651
|
+
initial: e === s
|
|
3652
|
+
})),
|
|
3653
|
+
contour: d,
|
|
3654
|
+
markerPoint: (T = e.markerPoint) == null ? ne(d) : T,
|
|
3655
|
+
bounds: N.fromPoints(d),
|
|
3656
|
+
detailMinSizePx: e.detailMinSizePx,
|
|
3657
|
+
markerMaxSizePx: e.markerMaxSizePx,
|
|
3658
|
+
entrances: u,
|
|
3659
|
+
auxLayers: e.aux.filter((e) => e.surviving).map(({ value: e }) => {
|
|
3660
|
+
var t, n;
|
|
3661
|
+
let r = (t = e.replacesDefault) == null || t;
|
|
3662
|
+
return {
|
|
3663
|
+
layer: e.layer,
|
|
3664
|
+
render: e.render,
|
|
3665
|
+
replacesDefault: r,
|
|
3666
|
+
suppressesLabel: (n = e.suppressesLabel) == null ? e.render === "scene" && r : n,
|
|
3667
|
+
minSizePx: e.minSizePx,
|
|
3668
|
+
maxSizePx: e.maxSizePx
|
|
3669
|
+
};
|
|
3670
|
+
})
|
|
3671
|
+
};
|
|
3672
|
+
}
|
|
3673
|
+
let E = [];
|
|
3674
|
+
for (let e of g) if (!e.parsed) for (let t of e.referencedLayers) E.includes(t) || E.push(t);
|
|
3675
|
+
let D = [];
|
|
3676
|
+
for (let e of g) e.parsed && D.push(e.parsed);
|
|
3677
|
+
if (f.length > 0 && D.length === 0) return a("venues-all-dropped", "venues", "no venue survived validation", "plan loads as single-venue"), J([], r, []);
|
|
3678
|
+
let O = E.filter((e) => !C.has(e));
|
|
3679
|
+
return O.length > 0 && a("plan-layers-quarantined", "venues", `quarantined unclaimed layer${O.length === 1 ? "" : "s"}: ${O.map((e) => `"${e}"`).join(", ")}`, "hidden from venue and ordinary layer rendering"), J(D, r, O, y);
|
|
3680
|
+
}
|
|
3681
|
+
//#endregion
|
|
3682
|
+
//#region src/tools/debounce.ts
|
|
3683
|
+
function ro(e, t) {
|
|
3684
|
+
let n;
|
|
3685
|
+
return (...r) => {
|
|
3686
|
+
clearTimeout(n), n = setTimeout(() => {
|
|
3687
|
+
e(...r);
|
|
3688
|
+
}, t);
|
|
3689
|
+
};
|
|
3690
|
+
}
|
|
3691
|
+
//#endregion
|
|
3692
|
+
//#region src/store/venue-public.ts
|
|
3693
|
+
function io(e, t) {
|
|
3694
|
+
return {
|
|
3695
|
+
id: e.id,
|
|
3696
|
+
name: e.name,
|
|
3697
|
+
order: e.order,
|
|
3698
|
+
active: t
|
|
3699
|
+
};
|
|
3700
|
+
}
|
|
3701
|
+
//#endregion
|
|
3702
|
+
//#region src/store/VenueStore.ts
|
|
3703
|
+
var ao, oo, so, co, lo, uo, fo, po, mo, ho, go, _o, Y, vo, yo, bo, xo, So, Co;
|
|
3704
|
+
function wo(e, t, n, r) {
|
|
3705
|
+
n && Object.defineProperty(e, t, {
|
|
3706
|
+
enumerable: n.enumerable,
|
|
3707
|
+
configurable: n.configurable,
|
|
3708
|
+
writable: n.writable,
|
|
3709
|
+
value: n.initializer ? n.initializer.call(r) : void 0
|
|
3710
|
+
});
|
|
3711
|
+
}
|
|
3712
|
+
function X(e, t, n, r, i) {
|
|
3713
|
+
var a = {};
|
|
3714
|
+
return Object.keys(r).forEach(function(e) {
|
|
3715
|
+
a[e] = r[e];
|
|
3716
|
+
}), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, ("value" in a || a.initializer) && (a.writable = !0), a = n.slice().reverse().reduce(function(n, r) {
|
|
3717
|
+
return r(e, t, n) || n;
|
|
3718
|
+
}, a), i && a.initializer !== void 0 && (a.value = a.initializer ? a.initializer.call(i) : void 0, a.initializer = void 0), a.initializer === void 0 ? (Object.defineProperty(e, t, a), null) : a;
|
|
3719
|
+
}
|
|
3720
|
+
function To(e) {
|
|
3721
|
+
let { viewbox: t, rect: n } = e;
|
|
3722
|
+
return !t || !n ? t == null ? n : t : t.intersects(n) ? N.fromUnion(t, n) : n;
|
|
3723
|
+
}
|
|
3724
|
+
var Eo = class {
|
|
3725
|
+
constructor(e, t, n) {
|
|
3726
|
+
this.id = void 0, this.name = void 0, this.order = void 0, this.contour = void 0, this.markerPoint = void 0, this.bounds = void 0, this.levels = void 0, this.initialLevel = void 0, this.detailMinSizePx = void 0, this.markerMaxSizePx = void 0, this.auxLayers = void 0, this.entrances = void 0, this._activeLevelName = void 0, this._lastUserActivatedLevelName = m.box(null), this._presentationState = m.box(null), this.id = e.id, this.name = e.name, this.order = e.order, this.contour = e.contour, this.markerPoint = e.markerPoint, this.bounds = e.bounds, this.detailMinSizePx = e.detailMinSizePx, this.markerMaxSizePx = e.markerMaxSizePx, this.auxLayers = e.auxLayers.map((e) => ({ ...e })), this.levels = t, this.initialLevel = n, this.entrances = e.entrances.flatMap((e) => {
|
|
3727
|
+
let n = t.find((t) => t.layer.name === e.layer);
|
|
3728
|
+
return n ? [{
|
|
3729
|
+
level: n,
|
|
3730
|
+
point: { ...e.point },
|
|
3731
|
+
name: e.name
|
|
3732
|
+
}] : [];
|
|
3733
|
+
}), this._activeLevelName = m.box(n.layer.name);
|
|
3734
|
+
}
|
|
3735
|
+
get frame() {
|
|
3736
|
+
let e = this.levels.map((e) => To(e.layer)).filter((e) => !!e);
|
|
3737
|
+
return e.length && N.fromUnion(...e) || this.bounds;
|
|
3738
|
+
}
|
|
3739
|
+
get activeLevel() {
|
|
3740
|
+
var e;
|
|
3741
|
+
return (e = this.levels.find((e) => e.layer.name === this._activeLevelName.get())) == null ? this.initialLevel : e;
|
|
3742
|
+
}
|
|
3743
|
+
get lastUserActivatedLevel() {
|
|
3744
|
+
var e;
|
|
3745
|
+
let t = this._lastUserActivatedLevelName.get();
|
|
3746
|
+
return t ? (e = this.levels.find((e) => e.layer.name === t)) == null ? null : e : null;
|
|
3747
|
+
}
|
|
3748
|
+
setActiveLevel(e, t) {
|
|
3749
|
+
this._activeLevelName.set(e.layer.name), t && this._lastUserActivatedLevelName.set(e.layer.name);
|
|
3750
|
+
}
|
|
3751
|
+
get presentationState() {
|
|
3752
|
+
return this._presentationState.get();
|
|
3753
|
+
}
|
|
3754
|
+
set presentationState(e) {
|
|
3755
|
+
this._presentationState.set(e);
|
|
3756
|
+
}
|
|
3757
|
+
get detailVisible() {
|
|
3758
|
+
var e, t;
|
|
3759
|
+
return (e = (t = this._presentationState.get()) == null ? void 0 : t.detailVisible) == null || e;
|
|
3760
|
+
}
|
|
3761
|
+
};
|
|
3762
|
+
function Do(e, t) {
|
|
3763
|
+
var n;
|
|
3764
|
+
return (n = e.levels.find((e) => e.layer.name === t)) == null ? e.activeLevel : n;
|
|
3765
|
+
}
|
|
3766
|
+
var Oo = (ao = p({ keepAlive: !0 }), oo = p({ keepAlive: !0 }), so = p({ keepAlive: !0 }), co = p({ keepAlive: !0 }), lo = p({ keepAlive: !0 }), uo = p({ keepAlive: !0 }), fo = p({ keepAlive: !0 }), po = p({ keepAlive: !0 }), mo = p({ keepAlive: !0 }), ho = p({ keepAlive: !0 }), go = p({ keepAlive: !0 }), _o = p({ keepAlive: !0 }), Y = class {
|
|
3767
|
+
constructor(e) {
|
|
3768
|
+
this.rootStore = void 0, wo(this, "venues", vo, this), wo(this, "diagnostics", yo, this), this.campusViewbox = m.box(null, { deep: !1 }), wo(this, "automaticContextVenueId", bo, this), wo(this, "destinationVenueId", xo, this), wo(this, "cameraRequest", So, this), wo(this, "focusedVenueId", Co, this), this.levelActivationRequests = /* @__PURE__ */ new Map(), this.cameraIntentId = 0, this.floorActivatedNotifier = ue(), this.venueActivatedNotifier = ro((e) => this.rootStore.fp.onVenueActivated(io(e, !0)), 0), this.rootStore = e;
|
|
3769
|
+
}
|
|
3770
|
+
get hasVenueModel() {
|
|
3771
|
+
return this.venues.length > 0;
|
|
3772
|
+
}
|
|
3773
|
+
get isCampusMode() {
|
|
3774
|
+
var e;
|
|
3775
|
+
return this.hasVenueModel && !!((e = this.rootStore) != null && e.maplibreStore.showMaplibre);
|
|
3776
|
+
}
|
|
3777
|
+
get orderedVenues() {
|
|
3778
|
+
return [...this.venues].sort((e, t) => e.order - t.order || qa(e.id, t.id));
|
|
3779
|
+
}
|
|
3780
|
+
get focusedVenue() {
|
|
3781
|
+
var e;
|
|
3782
|
+
return (e = this.venues.find((e) => e.id === this.focusedVenueId)) == null ? null : e;
|
|
3783
|
+
}
|
|
3784
|
+
get defaultVenue() {
|
|
3785
|
+
var e;
|
|
3786
|
+
return (e = this.orderedVenues[0]) == null ? null : e;
|
|
3787
|
+
}
|
|
3788
|
+
get campusBounds() {
|
|
3789
|
+
var e;
|
|
3790
|
+
return this.venues.length ? (e = this.campusViewbox.get()) == null ? N.fromUnion(...this.venues.map((e) => e.bounds)) || null : e : null;
|
|
3791
|
+
}
|
|
3792
|
+
get campusBoundsAuthored() {
|
|
3793
|
+
return this.hasVenueModel && this.campusViewbox.get() !== null;
|
|
3794
|
+
}
|
|
3795
|
+
get fallbackVenue() {
|
|
3796
|
+
var e;
|
|
3797
|
+
return (e = this.focusedVenue) == null ? this.defaultVenue : e;
|
|
3798
|
+
}
|
|
3799
|
+
get activeVenue() {
|
|
3800
|
+
return this.isCampusMode ? this.focusedVenue : this.fallbackVenue;
|
|
3801
|
+
}
|
|
3802
|
+
get auxVenuesByLayerName() {
|
|
3803
|
+
let e = /* @__PURE__ */ new Map();
|
|
3804
|
+
for (let t of this.venues) for (let n of t.auxLayers) {
|
|
3805
|
+
let r = e.get(n.layer);
|
|
3806
|
+
r ? r.includes(t) || r.push(t) : e.set(n.layer, [t]);
|
|
3807
|
+
}
|
|
3808
|
+
return e;
|
|
3809
|
+
}
|
|
3810
|
+
get selectorMode() {
|
|
3811
|
+
var e;
|
|
3812
|
+
return (e = this.focusedVenue) != null && e.detailVisible ? "levels" : "venues";
|
|
3813
|
+
}
|
|
3814
|
+
get venuesByLevelLayerName() {
|
|
3815
|
+
let e = /* @__PURE__ */ new Map();
|
|
3816
|
+
for (let t of this.venues) for (let n of t.levels) e.set(n.layer.name, t);
|
|
3817
|
+
return e;
|
|
3818
|
+
}
|
|
3819
|
+
venueOfLayer(e) {
|
|
3820
|
+
var t;
|
|
3821
|
+
let n = typeof e == "string" ? e : e == null ? void 0 : e.name;
|
|
3822
|
+
return n ? (t = this.venuesByLevelLayerName.get(n)) == null ? null : t : null;
|
|
3823
|
+
}
|
|
3824
|
+
findVenue(e) {
|
|
3825
|
+
var t;
|
|
3826
|
+
let n = e.toLowerCase();
|
|
3827
|
+
return (t = this.venues.find((e) => e.id === n)) == null ? null : t;
|
|
3828
|
+
}
|
|
3829
|
+
venueAt(e) {
|
|
3830
|
+
let t = null;
|
|
3831
|
+
for (let n of this.venues) !n.bounds.containsPoint(e) || !ko(n.contour, e) || (!t || n.bounds.area < t.bounds.area) && (t = n);
|
|
3832
|
+
return t;
|
|
3833
|
+
}
|
|
3834
|
+
init() {
|
|
3835
|
+
let e = this.rootStore.layerStore, t = new Map(e.layers.filter((e) => e && !e.rootParent).map((e) => [e.name, e])), n = new Map(Array.from(t, ([e, t]) => [e, {
|
|
3836
|
+
rect: t.rect,
|
|
3837
|
+
viewbox: t.viewbox
|
|
3838
|
+
}])), r = typeof M == "object" && M && (M.venuesVersion === void 0 || M.venuesVersion === 1) && Array.isArray(M.venues) ? M.venues : [], i = u(), a = to(M, n, r.map((e) => {
|
|
3839
|
+
let t = new Set(o(e));
|
|
3840
|
+
return i.filter((e) => t.has(e)).map((e) => {
|
|
3841
|
+
try {
|
|
3842
|
+
return {
|
|
3843
|
+
layer: e,
|
|
3844
|
+
extraction: te(e)
|
|
3845
|
+
};
|
|
3846
|
+
} catch {
|
|
3847
|
+
return {
|
|
3848
|
+
layer: e,
|
|
3849
|
+
extraction: {
|
|
3850
|
+
ring: null,
|
|
3851
|
+
unusableElementKinds: []
|
|
3852
|
+
}
|
|
3853
|
+
};
|
|
3854
|
+
}
|
|
3855
|
+
});
|
|
3856
|
+
})), s = a.venues;
|
|
3857
|
+
this.diagnostics = a.diagnostics, this.campusViewbox.set(a.campusViewbox), e.setQuarantinedLayerNames(a.quarantinedLayerNames), this.venues = s.map((e) => {
|
|
3858
|
+
var n;
|
|
3859
|
+
let r = e.levels.flatMap((e) => {
|
|
3860
|
+
var n;
|
|
3861
|
+
let r = t.get(e.layer);
|
|
3862
|
+
return r ? [{
|
|
3863
|
+
layer: r,
|
|
3864
|
+
ordinal: e.ordinal,
|
|
3865
|
+
displayName: (n = e.name) == null ? r.description : n,
|
|
3866
|
+
initial: e.initial
|
|
3867
|
+
}] : [];
|
|
3868
|
+
});
|
|
3869
|
+
return new Eo(e, r, (n = r.find((e) => e.initial)) == null ? r[0] : n);
|
|
3870
|
+
}), this.automaticContextVenueId = null, this.destinationVenueId = null, this.focusedVenueId = null, this.cameraRequest = null, this.levelActivationRequests.clear(), this.cameraIntentId++, this.isCampusMode ? this.applyInitialVisibility() : this.hasVenueModel && this.applyFallbackVisibility();
|
|
3871
|
+
}
|
|
3872
|
+
applyInitialVisibility() {
|
|
3873
|
+
if (this.isCampusMode) for (let e of this.venues) {
|
|
3874
|
+
e.presentationState = null;
|
|
3875
|
+
for (let t of e.levels) this.rootStore.layerStore.setLayerVisibility(t.layer, t === e.activeLevel);
|
|
3876
|
+
}
|
|
3877
|
+
}
|
|
3878
|
+
applyFallbackVisibility() {
|
|
3879
|
+
if (!this.hasVenueModel) return;
|
|
3880
|
+
let e = this.fallbackVenue;
|
|
3881
|
+
for (let t of this.venues) for (let n of t.levels) this.rootStore.layerStore.setLayerVisibility(n.layer, t === e && n === t.activeLevel);
|
|
3882
|
+
}
|
|
3883
|
+
setAutomaticContext(e) {
|
|
3884
|
+
var t, n;
|
|
3885
|
+
let r = e === null ? null : typeof e == "string" ? (t = this.venues.find((t) => t.id === e)) == null ? null : t : e;
|
|
3886
|
+
this.automaticContextVenueId = (n = r == null ? void 0 : r.id) == null ? null : n, this.destinationVenueId === null && this.setEffectiveContext(r);
|
|
3887
|
+
}
|
|
3888
|
+
enterVenue(e, { fly: t = !0, level: n } = {}) {
|
|
3889
|
+
var r, i;
|
|
3890
|
+
let a = typeof e == "string" ? this.venues.find((t) => t.id === e) : e;
|
|
3891
|
+
if (!a) return Promise.resolve();
|
|
3892
|
+
let o = this.activeVenue, s = ++this.cameraIntentId;
|
|
3893
|
+
this.cameraRequest = null, this.destinationVenueId = a.id, this.setEffectiveContext(a);
|
|
3894
|
+
let c = this.resolveVenueLevel(a, n), l = (r = (i = c == null ? a.levels.find((e) => e.ordinal === (o == null ? void 0 : o.activeLevel.ordinal)) : c) == null ? a.lastUserActivatedLevel : i) == null ? a.initialLevel : r, u = this.activateLayer(l.layer, {
|
|
3895
|
+
fly: !!c && t,
|
|
3896
|
+
establishDestination: !1,
|
|
3897
|
+
cameraIntentId: s,
|
|
3898
|
+
userActivated: !!c
|
|
3899
|
+
});
|
|
3900
|
+
return c || !t || this.requestVenueCamera(a, l, s), u;
|
|
3901
|
+
}
|
|
3902
|
+
focusVenue(e, t = {}) {
|
|
3903
|
+
return this.enterVenue(e, t);
|
|
3904
|
+
}
|
|
3905
|
+
releaseDestinationOverride() {
|
|
3906
|
+
var e;
|
|
3907
|
+
if (this.destinationVenueId === null) return;
|
|
3908
|
+
this.destinationVenueId = null;
|
|
3909
|
+
let t = (e = this.venues.find((e) => e.id === this.automaticContextVenueId)) == null ? null : e;
|
|
3910
|
+
this.setEffectiveContext(t);
|
|
3911
|
+
}
|
|
3912
|
+
clearCameraRequest(e) {
|
|
3913
|
+
this.cameraRequest === e && (this.cameraRequest = null);
|
|
3914
|
+
}
|
|
3915
|
+
viewAllVenues() {
|
|
3916
|
+
let e = this.campusBounds;
|
|
3917
|
+
if (!e) return;
|
|
3918
|
+
let t = ++this.cameraIntentId;
|
|
3919
|
+
this.rootStore.maplibreStore.showMaplibre ? this.cameraRequest = {
|
|
3920
|
+
kind: "campus",
|
|
3921
|
+
intentId: t,
|
|
3922
|
+
rect: e
|
|
3923
|
+
} : (this.rootStore.uiState.moveToRect = e, this.completeCampusView());
|
|
3924
|
+
}
|
|
3925
|
+
frameActiveVenue() {
|
|
3926
|
+
let e = this.activeVenue;
|
|
3927
|
+
return e ? (this.requestVenueCamera(e, e.activeLevel), !0) : !1;
|
|
3928
|
+
}
|
|
3929
|
+
completeCampusView(e) {
|
|
3930
|
+
e && (e.kind !== "campus" || e.intentId !== this.cameraIntentId) || this.releaseDestinationOverride();
|
|
3931
|
+
}
|
|
3932
|
+
clearFocus() {
|
|
3933
|
+
this.automaticContextVenueId = null, this.destinationVenueId = null, this.setEffectiveContext(null);
|
|
3934
|
+
}
|
|
3935
|
+
activateLayer(e, { fly: t = !0, establishDestination: n = !0, cameraIntentId: r, userActivated: i = !0 } = {}) {
|
|
3936
|
+
let a = this.venueOfLayer(e);
|
|
3937
|
+
if (!a) return Promise.resolve();
|
|
3938
|
+
if (n) return this.enterVenue(a, {
|
|
3939
|
+
fly: t,
|
|
3940
|
+
level: e
|
|
3941
|
+
});
|
|
3942
|
+
let o = a.levels.find((t) => t.layer === e);
|
|
3943
|
+
if (!o) return Promise.resolve();
|
|
3944
|
+
let s = this.nextLevelActivationRequest(a.id), c = r == null ? this.cameraIntentId : r;
|
|
3945
|
+
return this.rootStore.routeStore.currentRouteLayer !== e && (this.rootStore.routeStore.currentRouteLayer = e), a.activeLevel === o && e.visible ? (a.setActiveLevel(o, i), t && this.requestVenueCamera(a, o), Promise.resolve()) : re(e).then(() => {
|
|
3946
|
+
y(() => {
|
|
3947
|
+
if (s === this.levelActivationRequests.get(a.id)) {
|
|
3948
|
+
for (let e of a.levels) e !== o && e.layer.visible && this.rootStore.layerStore.setLayerVisibility(e.layer, !1);
|
|
3949
|
+
this.rootStore.layerStore.setLayerVisibility(e, !0), a.setActiveLevel(o, i), t && this.destinationVenueId === a.id && c === this.cameraIntentId && this.requestVenueCamera(a, o, c), this.destinationVenueId === a.id && this.notifyFloorActivated(e);
|
|
3950
|
+
}
|
|
3951
|
+
});
|
|
3952
|
+
});
|
|
3953
|
+
}
|
|
3954
|
+
notifyVenueActivated(e) {
|
|
3955
|
+
var t;
|
|
3956
|
+
typeof ((t = this.rootStore.fp) == null ? void 0 : t.onVenueActivated) == "function" && this.venueActivatedNotifier(e);
|
|
3957
|
+
}
|
|
3958
|
+
setEffectiveContext(e) {
|
|
3959
|
+
var t;
|
|
3960
|
+
let n = this.focusedVenueId !== (e == null ? void 0 : e.id);
|
|
3961
|
+
this.focusedVenueId = (t = e == null ? void 0 : e.id) == null ? null : t, n && (this.rootStore.maplibreStore.showMaplibre || this.applyFallbackVisibility(), e && this.notifyVenueActivated(e));
|
|
3962
|
+
}
|
|
3963
|
+
requestVenueCamera(e, t, n = this.cameraIntentId) {
|
|
3964
|
+
var r;
|
|
3965
|
+
let i = M.enableExperimentalVenueFraming === !0 || (r = To(t.layer)) == null ? e.bounds : r;
|
|
3966
|
+
if (!this.rootStore.maplibreStore.showMaplibre) {
|
|
3967
|
+
this.rootStore.uiState.moveToRect = i;
|
|
3968
|
+
return;
|
|
3969
|
+
}
|
|
3970
|
+
this.cameraRequest = {
|
|
3971
|
+
kind: "venue",
|
|
3972
|
+
intentId: n,
|
|
3973
|
+
venueId: e.id,
|
|
3974
|
+
layer: t.layer.name,
|
|
3975
|
+
rect: i
|
|
3976
|
+
};
|
|
3977
|
+
}
|
|
3978
|
+
nextLevelActivationRequest(e) {
|
|
3979
|
+
var t;
|
|
3980
|
+
let n = ((t = this.levelActivationRequests.get(e)) == null ? 0 : t) + 1;
|
|
3981
|
+
return this.levelActivationRequests.set(e, n), n;
|
|
3982
|
+
}
|
|
3983
|
+
resolveVenueLevel(e, t) {
|
|
3984
|
+
if (typeof t == "string") return e.levels.find((e) => e.layer.name === t);
|
|
3985
|
+
if (t) return e.levels.find((e) => e === t || e.layer === t);
|
|
3986
|
+
}
|
|
3987
|
+
notifyFloorActivated(e) {
|
|
3988
|
+
this.floorActivatedNotifier(this.rootStore.fp, e.name);
|
|
3989
|
+
}
|
|
3990
|
+
}, vo = X(Y.prototype, "venues", [m], {
|
|
3991
|
+
configurable: !0,
|
|
3992
|
+
enumerable: !0,
|
|
3993
|
+
writable: !0,
|
|
3994
|
+
initializer: function() {
|
|
3995
|
+
return [];
|
|
3996
|
+
}
|
|
3997
|
+
}), yo = X(Y.prototype, "diagnostics", [m], {
|
|
3998
|
+
configurable: !0,
|
|
3999
|
+
enumerable: !0,
|
|
4000
|
+
writable: !0,
|
|
4001
|
+
initializer: function() {
|
|
4002
|
+
return [];
|
|
4003
|
+
}
|
|
4004
|
+
}), bo = X(Y.prototype, "automaticContextVenueId", [m], {
|
|
4005
|
+
configurable: !0,
|
|
4006
|
+
enumerable: !0,
|
|
4007
|
+
writable: !0,
|
|
4008
|
+
initializer: function() {
|
|
4009
|
+
return null;
|
|
4010
|
+
}
|
|
4011
|
+
}), xo = X(Y.prototype, "destinationVenueId", [m], {
|
|
4012
|
+
configurable: !0,
|
|
4013
|
+
enumerable: !0,
|
|
4014
|
+
writable: !0,
|
|
4015
|
+
initializer: function() {
|
|
4016
|
+
return null;
|
|
4017
|
+
}
|
|
4018
|
+
}), So = X(Y.prototype, "cameraRequest", [m], {
|
|
4019
|
+
configurable: !0,
|
|
4020
|
+
enumerable: !0,
|
|
4021
|
+
writable: !0,
|
|
4022
|
+
initializer: function() {
|
|
4023
|
+
return null;
|
|
4024
|
+
}
|
|
4025
|
+
}), Co = X(Y.prototype, "focusedVenueId", [m], {
|
|
4026
|
+
configurable: !0,
|
|
4027
|
+
enumerable: !0,
|
|
4028
|
+
writable: !0,
|
|
4029
|
+
initializer: function() {
|
|
4030
|
+
return null;
|
|
4031
|
+
}
|
|
4032
|
+
}), X(Y.prototype, "hasVenueModel", [ao], Object.getOwnPropertyDescriptor(Y.prototype, "hasVenueModel"), Y.prototype), X(Y.prototype, "isCampusMode", [oo], Object.getOwnPropertyDescriptor(Y.prototype, "isCampusMode"), Y.prototype), X(Y.prototype, "orderedVenues", [so], Object.getOwnPropertyDescriptor(Y.prototype, "orderedVenues"), Y.prototype), X(Y.prototype, "focusedVenue", [co], Object.getOwnPropertyDescriptor(Y.prototype, "focusedVenue"), Y.prototype), X(Y.prototype, "defaultVenue", [lo], Object.getOwnPropertyDescriptor(Y.prototype, "defaultVenue"), Y.prototype), X(Y.prototype, "campusBounds", [uo], Object.getOwnPropertyDescriptor(Y.prototype, "campusBounds"), Y.prototype), X(Y.prototype, "campusBoundsAuthored", [fo], Object.getOwnPropertyDescriptor(Y.prototype, "campusBoundsAuthored"), Y.prototype), X(Y.prototype, "fallbackVenue", [po], Object.getOwnPropertyDescriptor(Y.prototype, "fallbackVenue"), Y.prototype), X(Y.prototype, "activeVenue", [mo], Object.getOwnPropertyDescriptor(Y.prototype, "activeVenue"), Y.prototype), X(Y.prototype, "auxVenuesByLayerName", [ho], Object.getOwnPropertyDescriptor(Y.prototype, "auxVenuesByLayerName"), Y.prototype), X(Y.prototype, "selectorMode", [go], Object.getOwnPropertyDescriptor(Y.prototype, "selectorMode"), Y.prototype), X(Y.prototype, "venuesByLevelLayerName", [_o], Object.getOwnPropertyDescriptor(Y.prototype, "venuesByLevelLayerName"), Y.prototype), X(Y.prototype, "init", [v], Object.getOwnPropertyDescriptor(Y.prototype, "init"), Y.prototype), X(Y.prototype, "applyInitialVisibility", [v], Object.getOwnPropertyDescriptor(Y.prototype, "applyInitialVisibility"), Y.prototype), X(Y.prototype, "applyFallbackVisibility", [v], Object.getOwnPropertyDescriptor(Y.prototype, "applyFallbackVisibility"), Y.prototype), X(Y.prototype, "setAutomaticContext", [v], Object.getOwnPropertyDescriptor(Y.prototype, "setAutomaticContext"), Y.prototype), X(Y.prototype, "enterVenue", [v], Object.getOwnPropertyDescriptor(Y.prototype, "enterVenue"), Y.prototype), X(Y.prototype, "focusVenue", [v], Object.getOwnPropertyDescriptor(Y.prototype, "focusVenue"), Y.prototype), X(Y.prototype, "releaseDestinationOverride", [v], Object.getOwnPropertyDescriptor(Y.prototype, "releaseDestinationOverride"), Y.prototype), X(Y.prototype, "clearCameraRequest", [v], Object.getOwnPropertyDescriptor(Y.prototype, "clearCameraRequest"), Y.prototype), X(Y.prototype, "viewAllVenues", [v], Object.getOwnPropertyDescriptor(Y.prototype, "viewAllVenues"), Y.prototype), X(Y.prototype, "frameActiveVenue", [v], Object.getOwnPropertyDescriptor(Y.prototype, "frameActiveVenue"), Y.prototype), X(Y.prototype, "completeCampusView", [v], Object.getOwnPropertyDescriptor(Y.prototype, "completeCampusView"), Y.prototype), X(Y.prototype, "clearFocus", [v], Object.getOwnPropertyDescriptor(Y.prototype, "clearFocus"), Y.prototype), X(Y.prototype, "activateLayer", [v], Object.getOwnPropertyDescriptor(Y.prototype, "activateLayer"), Y.prototype), Y);
|
|
4033
|
+
function ko(e, t) {
|
|
4034
|
+
let n = !1;
|
|
4035
|
+
for (let r = 0, i = e.length - 1; r < e.length; i = r++) {
|
|
4036
|
+
let a = e[r], o = e[i];
|
|
4037
|
+
if (a.y > t.y != o.y > t.y) {
|
|
4038
|
+
let e = a.x + (t.y - a.y) * (o.x - a.x) / (o.y - a.y);
|
|
4039
|
+
t.x < e && (n = !n);
|
|
4040
|
+
}
|
|
4041
|
+
}
|
|
4042
|
+
return n;
|
|
3243
4043
|
}
|
|
3244
4044
|
//#endregion
|
|
3245
4045
|
//#region src/store/RouteStore.ts
|
|
3246
|
-
var
|
|
3247
|
-
function
|
|
4046
|
+
var Ao, jo, Mo, No, Z, Po, Fo, Io, Lo, Ro, zo, Bo, Vo, Ho, Uo, Wo, Go, Ko, qo, Jo, Yo;
|
|
4047
|
+
function Q(e, t, n, r) {
|
|
3248
4048
|
n && Object.defineProperty(e, t, {
|
|
3249
4049
|
enumerable: n.enumerable,
|
|
3250
4050
|
configurable: n.configurable,
|
|
@@ -3252,7 +4052,7 @@ function X(e, t, n, r) {
|
|
|
3252
4052
|
value: n.initializer ? n.initializer.call(r) : void 0
|
|
3253
4053
|
});
|
|
3254
4054
|
}
|
|
3255
|
-
function
|
|
4055
|
+
function $(e, t, n, r, i) {
|
|
3256
4056
|
var a = {};
|
|
3257
4057
|
return Object.keys(r).forEach(function(e) {
|
|
3258
4058
|
a[e] = r[e];
|
|
@@ -3260,12 +4060,12 @@ function Z(e, t, n, r, i) {
|
|
|
3260
4060
|
return r(e, t, n) || n;
|
|
3261
4061
|
}, a), i && a.initializer !== void 0 && (a.value = a.initializer ? a.initializer.call(i) : void 0, a.initializer = void 0), a.initializer === void 0 ? (Object.defineProperty(e, t, a), null) : a;
|
|
3262
4062
|
}
|
|
3263
|
-
function
|
|
4063
|
+
function Xo(e) {
|
|
3264
4064
|
return typeof e == "string" ? Number(e.replace(",", ".")) : e;
|
|
3265
4065
|
}
|
|
3266
|
-
var
|
|
4066
|
+
var Zo = (Ao = p({ keepAlive: !0 }), jo = p({ keepAlive: !0 }), Mo = p({ keepAlive: !0 }), No = p({ keepAlive: !0 }), Z = class {
|
|
3267
4067
|
constructor(e) {
|
|
3268
|
-
this.rootStore = void 0, this.cpTimeout = void 0,
|
|
4068
|
+
this.rootStore = void 0, this.cpTimeout = void 0, Q(this, "routeLines", Po, this), this.routedRouteBox = m.box(null, { deep: !1 }), this.campusLayersBox = m.box(/* @__PURE__ */ new Set(), { deep: !1 }), Q(this, "routeDistance", Fo, this), Q(this, "currentPosition", Io, this), Q(this, "requestCompass", Lo, this), Q(this, "iconType", Ro, this), Q(this, "tempToBooth", zo, this), Q(this, "focusEnabled", Bo, this), Q(this, "prevZ", Vo, this), Q(this, "markersData", Ho, this), Q(this, "prevMarkers", Uo, this), this.pendingReveal = null, Q(this, "showAccessible", Wo, this), Q(this, "onlyAccessible", Go, this), Q(this, "currentRouteLayer", Ko, this), Q(this, "currentRouteExhibitor", qo, this), this.selectRouteRequest = 0, Q(this, "routeUnits", Jo, this), Q(this, "isGpsTrackingEnabled", Yo, this), this.rootStore = e, this.focusEnabled = !window.location.search;
|
|
3269
4069
|
}
|
|
3270
4070
|
get canFindLocation() {
|
|
3271
4071
|
return !!I.kioskData || !!this.currentPosition;
|
|
@@ -3278,87 +4078,95 @@ var Wa = (wa = d({ keepAlive: !0 }), Ta = d({ keepAlive: !0 }), Ea = d({ keepAli
|
|
|
3278
4078
|
focused: !1
|
|
3279
4079
|
}), e && !e.from && e.to) {
|
|
3280
4080
|
let t = this.resolveFallbackFrom();
|
|
3281
|
-
t && (e = new
|
|
4081
|
+
t && (e = new os(t, e.to, e.waypoints));
|
|
3282
4082
|
}
|
|
3283
4083
|
e != null && e.from && e != null && e.to && e.from === e.to && (e = null);
|
|
3284
|
-
let i =
|
|
4084
|
+
let i = $o(this.rootStore.layerStore, e == null ? void 0 : e.to), a = this.rootStore.venueStore.hasVenueModel && i ? this.rootStore.venueStore.venueOfLayer(i) : null, o = a ? this.rootStore.venueStore.enterVenue(a, {
|
|
3285
4085
|
level: i == null ? void 0 : i,
|
|
3286
4086
|
fly: !1
|
|
3287
4087
|
}) : null, s = [];
|
|
3288
4088
|
e != null && e.from && e != null && e.to && window.setTimeout(() => {
|
|
3289
4089
|
this.rootStore.showMap();
|
|
3290
|
-
}, navigator.userAgent.toLowerCase().indexOf("android") > -1 ? 400 : 50), (e == null ? void 0 : e.from) instanceof
|
|
3291
|
-
let c =
|
|
4090
|
+
}, navigator.userAgent.toLowerCase().indexOf("android") > -1 ? 400 : 50), (e == null ? void 0 : e.from) instanceof b && s.push(e.from), (e == null ? void 0 : e.to) instanceof b && (this.tempToBooth = null, s.push(e.to)), !e && F.fp.onDirection && F.fp.onDirection(null);
|
|
4091
|
+
let c = v(() => {
|
|
3292
4092
|
if (r === this.selectRouteRequest) {
|
|
3293
4093
|
if (o ? o.then(() => {
|
|
3294
|
-
r === this.selectRouteRequest && this.rootStore.moveToList(s, !0);
|
|
4094
|
+
r === this.selectRouteRequest && (this.routedRoute === e && this.routeLines.length || this.rootStore.moveToList(s, !0));
|
|
3295
4095
|
}) : this.rootStore.moveToList(s), I.details = e, e && (!e.from || !e.to) && I.overlayBottom && (I.desiredOverlaySize = "medium"), e != null && e.to && e != null && e.from && !a) {
|
|
3296
|
-
let t =
|
|
4096
|
+
let t = Qo(e.from);
|
|
3297
4097
|
t && this.rootStore.layerStore.updateVisibility(t, !0);
|
|
3298
4098
|
}
|
|
3299
4099
|
if (!this.currentRouteLayer) {
|
|
3300
|
-
let t =
|
|
4100
|
+
let t = $o(this.rootStore.layerStore, e == null ? void 0 : e.from);
|
|
3301
4101
|
t ? this.currentRouteLayer = t : i && (this.currentRouteLayer = i);
|
|
3302
4102
|
}
|
|
3303
|
-
t && e != null && e.from && e != null && e.to &&
|
|
4103
|
+
t && e != null && e.from && e != null && e.to && en(B.ClickDirections, `${e != null && e.from ? "From " + e.from.name : ""} ${e != null && e.to ? "To " + e.to.name : ""}`);
|
|
3304
4104
|
}
|
|
3305
4105
|
});
|
|
3306
4106
|
n ? c() : setTimeout(c, 200);
|
|
3307
4107
|
}
|
|
3308
4108
|
rebuildRouteFromPosition(e) {
|
|
3309
4109
|
let t = I.selectedRoute;
|
|
3310
|
-
t != null && t.to && this.selectRoute(new
|
|
4110
|
+
t != null && t.to && this.selectRoute(new os(e, t.to, t.waypoints), !1, !0);
|
|
3311
4111
|
}
|
|
3312
4112
|
resolveFallbackFrom() {
|
|
3313
4113
|
var e;
|
|
3314
|
-
if (this.currentPosition) return
|
|
4114
|
+
if (this.currentPosition) return qi(this.currentPosition, Wi, wi);
|
|
3315
4115
|
let t = I.kioskData;
|
|
3316
|
-
return t ?
|
|
4116
|
+
return t ? qi({
|
|
3317
4117
|
x: t.x,
|
|
3318
4118
|
y: t.y,
|
|
3319
4119
|
z: (e = t.z) == null ? void 0 : e
|
|
3320
|
-
},
|
|
4120
|
+
}, Le(), Gi) : null;
|
|
3321
4121
|
}
|
|
3322
4122
|
setStartPoint(e) {
|
|
3323
4123
|
let t = I.selectedRoute;
|
|
3324
4124
|
if (t != null && t.to && !(t != null && t.from) && e) {
|
|
3325
|
-
let n = new
|
|
4125
|
+
let n = new os(e, t.to, t.waypoints);
|
|
3326
4126
|
this.selectRoute(n);
|
|
3327
4127
|
}
|
|
3328
4128
|
}
|
|
3329
4129
|
get pathLayers() {
|
|
3330
4130
|
var e;
|
|
3331
4131
|
let t = (e = F.routeStore.routeLines) == null || (e = e.map((e) => e.p0.layer)) == null ? void 0 : e.filter((e, t, n) => n.indexOf(e) === t);
|
|
3332
|
-
return
|
|
4132
|
+
return Pa(t == null ? [] : t, this.campusLayersBox.get(), (e) => !!F.layerStore.findLayer(e)).map((e, t) => ({
|
|
3333
4133
|
id: t + 1,
|
|
3334
4134
|
layer: F.layerStore.findLayer(e)
|
|
3335
4135
|
}));
|
|
3336
4136
|
}
|
|
4137
|
+
pointLayer(e, t) {
|
|
4138
|
+
let n = this.rootStore.layerStore.findLayer(t), r = this.rootStore.venueStore;
|
|
4139
|
+
if (!(r != null && r.hasVenueModel)) return n;
|
|
4140
|
+
let i = r.venueAt(e);
|
|
4141
|
+
return i ? Do(i, n == null ? void 0 : n.name).layer : null;
|
|
4142
|
+
}
|
|
3337
4143
|
getNearestBooth(e) {
|
|
3338
|
-
var t;
|
|
4144
|
+
var t, n;
|
|
3339
4145
|
if (!e) return null;
|
|
3340
|
-
let
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
4146
|
+
let r = (t = Re()) == null ? void 0 : t.properties.config, i = !!(e.lat && e.lng), a = r && i ? hn(e, r) : e;
|
|
4147
|
+
if (!a || !V(a.x) || !V(a.y)) return null;
|
|
4148
|
+
let o = this.pointLayer(a, e.z), s = !((n = this.rootStore.venueStore) != null && n.hasVenueModel) && typeof e.z != "number" && !e.z;
|
|
4149
|
+
return this.rootStore.boothStore.booths.filter((e) => {
|
|
4150
|
+
if (this.rootStore.layerStore.mode === ge.Default || !o) return e.visible && e.rect;
|
|
4151
|
+
var t;
|
|
4152
|
+
return e.rect && (s && e.visible || o.name === ((t = e.layer) == null ? void 0 : t.name));
|
|
3345
4153
|
}).sort((e, t) => P(a, e.rect.center) - P(a, t.rect.center))[0] || null;
|
|
3346
4154
|
}
|
|
3347
4155
|
setMarkers(e) {
|
|
3348
4156
|
var t, n;
|
|
3349
|
-
this.markersData.markers = ((t = e == null ? void 0 : e.markers) == null ? [] : t).map(
|
|
4157
|
+
this.markersData.markers = ((t = e == null ? void 0 : e.markers) == null ? [] : t).map(es), this.markersData.icons = (n = e == null ? void 0 : e.icons) == null ? [] : n;
|
|
3350
4158
|
}
|
|
3351
4159
|
selectMarker(e, t) {
|
|
3352
4160
|
let n = this.markersData.markers.find((t) => t.id === e);
|
|
3353
4161
|
this.markersData.markers.forEach((e) => e.active = !1), n && (n.active = !0);
|
|
3354
4162
|
let r = F.layerStore.findLayer(n == null ? void 0 : n.z);
|
|
3355
4163
|
if (t && n) {
|
|
3356
|
-
r && !(r != null && r.visible) &&
|
|
3357
|
-
let e =
|
|
4164
|
+
r && !(r != null && r.visible) && Te.updateVisibility(r, !0);
|
|
4165
|
+
let e = E();
|
|
3358
4166
|
return e ? e.api.panTo({
|
|
3359
4167
|
x: n.x,
|
|
3360
4168
|
y: n.y
|
|
3361
|
-
}) : (
|
|
4169
|
+
}) : (c.warn("Map camera is not mounted. Cannot pan to marker."), Promise.resolve());
|
|
3362
4170
|
}
|
|
3363
4171
|
return Promise.resolve();
|
|
3364
4172
|
}
|
|
@@ -3377,26 +4185,26 @@ var Wa = (wa = d({ keepAlive: !0 }), Ta = d({ keepAlive: !0 }), Ea = d({ keepAli
|
|
|
3377
4185
|
type: "search",
|
|
3378
4186
|
text: "",
|
|
3379
4187
|
focused: !1
|
|
3380
|
-
}), this.selectRoute(new
|
|
4188
|
+
}), this.selectRoute(new os(e, t));
|
|
3381
4189
|
}
|
|
3382
4190
|
selectCurrentPosition(e, t = !0, n) {
|
|
3383
|
-
var r, i, a, o, s;
|
|
4191
|
+
var r, i, a, o, s, c;
|
|
3384
4192
|
if (clearTimeout(this.cpTimeout), e) {
|
|
3385
|
-
e.x =
|
|
4193
|
+
e.x = Xo(e.x), e.y = Xo(e.y), e.lat !== void 0 && (e.lat = Xo(e.lat)), e.lng !== void 0 && (e.lng = Xo(e.lng));
|
|
3386
4194
|
let t = this.rootStore.layerStore.layers.filter((e) => !e.rootParent && !e.frozen), n = typeof e.z == "number" && !t[e.z];
|
|
3387
|
-
(
|
|
4195
|
+
(j.EXPO === "eurotier2026" || M.ignoreUnknownFloorIndex === !0 && n || !x()) && (e.z = void 0);
|
|
3388
4196
|
}
|
|
3389
|
-
let
|
|
4197
|
+
let l = t && this.rootStore.uiState.details && !(this.rootStore.uiState.details instanceof os), u = t && !l && (this.focusEnabled || this.prevZ != (e == null ? void 0 : e.z));
|
|
3390
4198
|
this.focusEnabled && (this.focusEnabled = !1), this.prevZ = (r = e == null || (i = e.z) == null ? void 0 : i.toString()) == null ? null : r, this.iconType = +!!n;
|
|
3391
|
-
let
|
|
3392
|
-
if (!e || !
|
|
4199
|
+
let d = e ? ts(e) : null;
|
|
4200
|
+
if (!e || !d) {
|
|
3393
4201
|
this.currentPosition = null;
|
|
3394
4202
|
return;
|
|
3395
4203
|
}
|
|
3396
|
-
let
|
|
3397
|
-
|
|
3398
|
-
let g =
|
|
3399
|
-
this.currentPosition = m, g && this.focusOnPosition(m,
|
|
4204
|
+
let f = this.pointLayer(d, e.z), p = (a = this.rootStore.venueStore) != null && a.hasVenueModel || (o = this.currentRouteLayer) == null ? void 0 : o.name, m = new cs(d.x, d.y, (f == null ? void 0 : f.name) || p, _n(d), e.lat, e.lng), h = !((s = this.routeLines) != null && s.length);
|
|
4205
|
+
f && (c = this.routeLines) != null && c.length && (h = !!this.routeLines.find((e) => e.p0.layer === f.name || e.p1.layer === f.name));
|
|
4206
|
+
let g = u && h;
|
|
4207
|
+
this.currentPosition = m, g && this.focusOnPosition(m, f), this.gpsEnabled || (this.cpTimeout = setTimeout(() => {
|
|
3400
4208
|
this.currentPosition && this.selectCurrentPosition(null, !1);
|
|
3401
4209
|
}, 30 * 1e3));
|
|
3402
4210
|
}
|
|
@@ -3404,40 +4212,40 @@ var Wa = (wa = d({ keepAlive: !0 }), Ta = d({ keepAlive: !0 }), Ea = d({ keepAli
|
|
|
3404
4212
|
var e, t;
|
|
3405
4213
|
if (!this.canFindLocation) return;
|
|
3406
4214
|
let n = (e = this.currentPosition) == null ? I.kioskData : e;
|
|
3407
|
-
n && (this.currentPosition && localStorage.getItem("efp-compass-permission-granted") === "false" && (F.routeStore.requestCompass = !0), (t = this.pendingReveal) == null || t.call(this), this.pendingReveal =
|
|
4215
|
+
n && (this.currentPosition && localStorage.getItem("efp-compass-permission-granted") === "false" && (F.routeStore.requestCompass = !0), (t = this.pendingReveal) == null || t.call(this), this.pendingReveal = Ia({
|
|
3408
4216
|
layer: F.layerStore.findLayer(n.z),
|
|
3409
|
-
show: (e) =>
|
|
4217
|
+
show: (e) => Te.updateVisibility(e, !0),
|
|
3410
4218
|
then: () => {
|
|
3411
4219
|
I.moveToRect = this.findLocationRect(n);
|
|
3412
4220
|
}
|
|
3413
4221
|
}));
|
|
3414
4222
|
}
|
|
3415
4223
|
findLocationRect(e) {
|
|
3416
|
-
let t =
|
|
4224
|
+
let t = N.fromCenter(e, {
|
|
3417
4225
|
x: 100,
|
|
3418
4226
|
y: 100
|
|
3419
|
-
}), n =
|
|
4227
|
+
}), n = he();
|
|
3420
4228
|
if (t.intersects(n)) return t;
|
|
3421
|
-
let r = Math.max(n.min.x, Math.min(e.x, n.max.x)), i = Math.max(n.min.y, Math.min(e.y, n.max.y)), a = Math.min(n.size.width, n.size.height) * .3, o =
|
|
4229
|
+
let r = Math.max(n.min.x, Math.min(e.x, n.max.x)), i = Math.max(n.min.y, Math.min(e.y, n.max.y)), a = Math.min(n.size.width, n.size.height) * .3, o = N.fromCenter({
|
|
3422
4230
|
x: r,
|
|
3423
4231
|
y: i
|
|
3424
4232
|
}, {
|
|
3425
4233
|
x: a,
|
|
3426
4234
|
y: a
|
|
3427
4235
|
}).intersection(n);
|
|
3428
|
-
return o ?
|
|
4236
|
+
return o ? N.fromUnion(t, o) : t;
|
|
3429
4237
|
}
|
|
3430
4238
|
focusOnPosition(e, t) {
|
|
3431
4239
|
var n;
|
|
3432
|
-
(n = this.pendingReveal) == null || n.call(this), this.pendingReveal =
|
|
4240
|
+
(n = this.pendingReveal) == null || n.call(this), this.pendingReveal = Ia({
|
|
3433
4241
|
layer: t,
|
|
3434
|
-
show: (e) =>
|
|
4242
|
+
show: (e) => Te.updateVisibility(e, !0),
|
|
3435
4243
|
then: () => {
|
|
3436
4244
|
if (F.maplibreStore.showMaplibre) {
|
|
3437
4245
|
I.moveToLocation = !0;
|
|
3438
4246
|
return;
|
|
3439
4247
|
}
|
|
3440
|
-
let t =
|
|
4248
|
+
let t = E();
|
|
3441
4249
|
if (t) {
|
|
3442
4250
|
t.api.panTo({
|
|
3443
4251
|
x: e.x,
|
|
@@ -3445,7 +4253,7 @@ var Wa = (wa = d({ keepAlive: !0 }), Ta = d({ keepAlive: !0 }), Ea = d({ keepAli
|
|
|
3445
4253
|
});
|
|
3446
4254
|
return;
|
|
3447
4255
|
}
|
|
3448
|
-
|
|
4256
|
+
c.warn("Map camera is not mounted. Cannot pan to current position.");
|
|
3449
4257
|
}
|
|
3450
4258
|
});
|
|
3451
4259
|
}
|
|
@@ -3454,7 +4262,7 @@ var Wa = (wa = d({ keepAlive: !0 }), Ta = d({ keepAlive: !0 }), Ea = d({ keepAli
|
|
|
3454
4262
|
return e ? {
|
|
3455
4263
|
distance: `${e}${t}`,
|
|
3456
4264
|
units: t,
|
|
3457
|
-
time:
|
|
4265
|
+
time: un(e, ln(t))
|
|
3458
4266
|
} : null;
|
|
3459
4267
|
}
|
|
3460
4268
|
get routedRoute() {
|
|
@@ -3469,7 +4277,7 @@ var Wa = (wa = d({ keepAlive: !0 }), Ta = d({ keepAlive: !0 }), Ea = d({ keepAli
|
|
|
3469
4277
|
updateRouteDistance(e) {
|
|
3470
4278
|
var t, n, r, i;
|
|
3471
4279
|
if (e == null) return;
|
|
3472
|
-
let a =
|
|
4280
|
+
let a = w(), o = (t = (n = a.getAttribute("units") || "ft").toLowerCase) == null ? void 0 : t.call(n).trim(), s = (r = (i = a.getAttribute("fp-ver")) == null ? void 0 : i.startsWith("5")) != null && r;
|
|
3473
4281
|
this.routeDistance = Math.round(e / (s ? 1 : 10)), this.routeUnits = o, this.updateRoutePoints();
|
|
3474
4282
|
}
|
|
3475
4283
|
updateRoutePoints() {
|
|
@@ -3477,17 +4285,17 @@ var Wa = (wa = d({ keepAlive: !0 }), Ta = d({ keepAlive: !0 }), Ea = d({ keepAli
|
|
|
3477
4285
|
F.fp.onDirection && setTimeout(() => {
|
|
3478
4286
|
var r, i;
|
|
3479
4287
|
F.fp.onDirection({
|
|
3480
|
-
from:
|
|
3481
|
-
to:
|
|
4288
|
+
from: ss((r = e == null ? void 0 : e.from) == null ? null : r),
|
|
4289
|
+
to: ss((i = e == null ? void 0 : e.to) == null ? null : i),
|
|
3482
4290
|
lines: this.routeLines,
|
|
3483
4291
|
distance: t == null ? "" : `${t}${n}`,
|
|
3484
4292
|
units: n,
|
|
3485
|
-
time:
|
|
4293
|
+
time: un(t == null ? 0 : t, ln(n))
|
|
3486
4294
|
});
|
|
3487
4295
|
}, 200);
|
|
3488
4296
|
}
|
|
3489
4297
|
checkRoutes() {
|
|
3490
|
-
if (!
|
|
4298
|
+
if (!Ea()) {
|
|
3491
4299
|
console.warn("checkRoutes: wayfinding is not initialized — call createWayfinding() first. Skipping route check.");
|
|
3492
4300
|
return;
|
|
3493
4301
|
}
|
|
@@ -3497,7 +4305,7 @@ var Wa = (wa = d({ keepAlive: !0 }), Ta = d({ keepAlive: !0 }), Ea = d({ keepAli
|
|
|
3497
4305
|
let n = e[t];
|
|
3498
4306
|
for (let r = t + 1; r < e.length; r++) {
|
|
3499
4307
|
let t = e[r];
|
|
3500
|
-
|
|
4308
|
+
Oa(Ji(n), Ji(t)).lines.length || console.warn(`No route found from ${n.name} to ${t.name}`);
|
|
3501
4309
|
}
|
|
3502
4310
|
}
|
|
3503
4311
|
console.info("Route check done....");
|
|
@@ -3506,68 +4314,68 @@ var Wa = (wa = d({ keepAlive: !0 }), Ta = d({ keepAlive: !0 }), Ea = d({ keepAli
|
|
|
3506
4314
|
this.isGpsTrackingEnabled = e;
|
|
3507
4315
|
}
|
|
3508
4316
|
get gpsEnabled() {
|
|
3509
|
-
return
|
|
4317
|
+
return M.autoTrackingGps && this.isGpsTrackingEnabled && !M.enableIPS;
|
|
3510
4318
|
}
|
|
3511
4319
|
setOnlyAccessible(e) {
|
|
3512
4320
|
this.onlyAccessible = e;
|
|
3513
4321
|
}
|
|
3514
|
-
},
|
|
4322
|
+
}, Po = $(Z.prototype, "routeLines", [m], {
|
|
3515
4323
|
configurable: !0,
|
|
3516
4324
|
enumerable: !0,
|
|
3517
4325
|
writable: !0,
|
|
3518
4326
|
initializer: function() {
|
|
3519
4327
|
return [];
|
|
3520
4328
|
}
|
|
3521
|
-
}),
|
|
4329
|
+
}), Fo = $(Z.prototype, "routeDistance", [m], {
|
|
3522
4330
|
configurable: !0,
|
|
3523
4331
|
enumerable: !0,
|
|
3524
4332
|
writable: !0,
|
|
3525
4333
|
initializer: function() {
|
|
3526
4334
|
return null;
|
|
3527
4335
|
}
|
|
3528
|
-
}),
|
|
4336
|
+
}), Io = $(Z.prototype, "currentPosition", [m], {
|
|
3529
4337
|
configurable: !0,
|
|
3530
4338
|
enumerable: !0,
|
|
3531
4339
|
writable: !0,
|
|
3532
4340
|
initializer: function() {
|
|
3533
4341
|
return null;
|
|
3534
4342
|
}
|
|
3535
|
-
}),
|
|
4343
|
+
}), Lo = $(Z.prototype, "requestCompass", [m], {
|
|
3536
4344
|
configurable: !0,
|
|
3537
4345
|
enumerable: !0,
|
|
3538
4346
|
writable: !0,
|
|
3539
4347
|
initializer: function() {
|
|
3540
4348
|
return !1;
|
|
3541
4349
|
}
|
|
3542
|
-
}),
|
|
4350
|
+
}), Ro = $(Z.prototype, "iconType", [m], {
|
|
3543
4351
|
configurable: !0,
|
|
3544
4352
|
enumerable: !0,
|
|
3545
4353
|
writable: !0,
|
|
3546
4354
|
initializer: function() {
|
|
3547
4355
|
return 0;
|
|
3548
4356
|
}
|
|
3549
|
-
}),
|
|
4357
|
+
}), zo = $(Z.prototype, "tempToBooth", [m], {
|
|
3550
4358
|
configurable: !0,
|
|
3551
4359
|
enumerable: !0,
|
|
3552
4360
|
writable: !0,
|
|
3553
4361
|
initializer: function() {
|
|
3554
4362
|
return null;
|
|
3555
4363
|
}
|
|
3556
|
-
}),
|
|
4364
|
+
}), Bo = $(Z.prototype, "focusEnabled", [m], {
|
|
3557
4365
|
configurable: !0,
|
|
3558
4366
|
enumerable: !0,
|
|
3559
4367
|
writable: !0,
|
|
3560
4368
|
initializer: function() {
|
|
3561
4369
|
return !0;
|
|
3562
4370
|
}
|
|
3563
|
-
}),
|
|
4371
|
+
}), Vo = $(Z.prototype, "prevZ", [m], {
|
|
3564
4372
|
configurable: !0,
|
|
3565
4373
|
enumerable: !0,
|
|
3566
4374
|
writable: !0,
|
|
3567
4375
|
initializer: function() {
|
|
3568
4376
|
return null;
|
|
3569
4377
|
}
|
|
3570
|
-
}),
|
|
4378
|
+
}), Ho = $(Z.prototype, "markersData", [m], {
|
|
3571
4379
|
configurable: !0,
|
|
3572
4380
|
enumerable: !0,
|
|
3573
4381
|
writable: !0,
|
|
@@ -3577,86 +4385,86 @@ var Wa = (wa = d({ keepAlive: !0 }), Ta = d({ keepAlive: !0 }), Ea = d({ keepAli
|
|
|
3577
4385
|
markers: []
|
|
3578
4386
|
};
|
|
3579
4387
|
}
|
|
3580
|
-
}),
|
|
4388
|
+
}), Uo = $(Z.prototype, "prevMarkers", [m], {
|
|
3581
4389
|
configurable: !0,
|
|
3582
4390
|
enumerable: !0,
|
|
3583
4391
|
writable: !0,
|
|
3584
4392
|
initializer: function() {
|
|
3585
4393
|
return [];
|
|
3586
4394
|
}
|
|
3587
|
-
}),
|
|
4395
|
+
}), Wo = $(Z.prototype, "showAccessible", [m], {
|
|
3588
4396
|
configurable: !0,
|
|
3589
4397
|
enumerable: !0,
|
|
3590
4398
|
writable: !0,
|
|
3591
4399
|
initializer: function() {
|
|
3592
4400
|
return !1;
|
|
3593
4401
|
}
|
|
3594
|
-
}),
|
|
4402
|
+
}), Go = $(Z.prototype, "onlyAccessible", [m], {
|
|
3595
4403
|
configurable: !0,
|
|
3596
4404
|
enumerable: !0,
|
|
3597
4405
|
writable: !0,
|
|
3598
4406
|
initializer: function() {
|
|
3599
4407
|
return !1;
|
|
3600
4408
|
}
|
|
3601
|
-
}),
|
|
4409
|
+
}), Ko = $(Z.prototype, "currentRouteLayer", [m], {
|
|
3602
4410
|
configurable: !0,
|
|
3603
4411
|
enumerable: !0,
|
|
3604
4412
|
writable: !0,
|
|
3605
4413
|
initializer: function() {
|
|
3606
4414
|
return null;
|
|
3607
4415
|
}
|
|
3608
|
-
}),
|
|
4416
|
+
}), qo = $(Z.prototype, "currentRouteExhibitor", [m], {
|
|
3609
4417
|
configurable: !0,
|
|
3610
4418
|
enumerable: !0,
|
|
3611
4419
|
writable: !0,
|
|
3612
4420
|
initializer: function() {
|
|
3613
4421
|
return null;
|
|
3614
4422
|
}
|
|
3615
|
-
}), Z
|
|
4423
|
+
}), $(Z.prototype, "canFindLocation", [p], Object.getOwnPropertyDescriptor(Z.prototype, "canFindLocation"), Z.prototype), $(Z.prototype, "selectRoute", [v], Object.getOwnPropertyDescriptor(Z.prototype, "selectRoute"), Z.prototype), $(Z.prototype, "rebuildRouteFromPosition", [v], Object.getOwnPropertyDescriptor(Z.prototype, "rebuildRouteFromPosition"), Z.prototype), $(Z.prototype, "setStartPoint", [v], Object.getOwnPropertyDescriptor(Z.prototype, "setStartPoint"), Z.prototype), $(Z.prototype, "pathLayers", [Ao], Object.getOwnPropertyDescriptor(Z.prototype, "pathLayers"), Z.prototype), $(Z.prototype, "setMarkers", [v], Object.getOwnPropertyDescriptor(Z.prototype, "setMarkers"), Z.prototype), $(Z.prototype, "selectMarker", [v], Object.getOwnPropertyDescriptor(Z.prototype, "selectMarker"), Z.prototype), $(Z.prototype, "selectedMarkers", [jo], Object.getOwnPropertyDescriptor(Z.prototype, "selectedMarkers"), Z.prototype), $(Z.prototype, "layers", [Mo], Object.getOwnPropertyDescriptor(Z.prototype, "layers"), Z.prototype), $(Z.prototype, "clickRoute", [v], Object.getOwnPropertyDescriptor(Z.prototype, "clickRoute"), Z.prototype), $(Z.prototype, "selectCurrentPosition", [v], Object.getOwnPropertyDescriptor(Z.prototype, "selectCurrentPosition"), Z.prototype), $(Z.prototype, "findLocation", [v], Object.getOwnPropertyDescriptor(Z.prototype, "findLocation"), Z.prototype), Jo = $(Z.prototype, "routeUnits", [m], {
|
|
3616
4424
|
configurable: !0,
|
|
3617
4425
|
enumerable: !0,
|
|
3618
4426
|
writable: !0,
|
|
3619
4427
|
initializer: function() {
|
|
3620
4428
|
return "ft";
|
|
3621
4429
|
}
|
|
3622
|
-
}), Z
|
|
4430
|
+
}), $(Z.prototype, "routeInfo", [p], Object.getOwnPropertyDescriptor(Z.prototype, "routeInfo"), Z.prototype), $(Z.prototype, "markRouted", [v], Object.getOwnPropertyDescriptor(Z.prototype, "markRouted"), Z.prototype), $(Z.prototype, "updateRoute", [v], Object.getOwnPropertyDescriptor(Z.prototype, "updateRoute"), Z.prototype), $(Z.prototype, "updateRouteDistance", [v], Object.getOwnPropertyDescriptor(Z.prototype, "updateRouteDistance"), Z.prototype), $(Z.prototype, "updateRoutePoints", [v], Object.getOwnPropertyDescriptor(Z.prototype, "updateRoutePoints"), Z.prototype), $(Z.prototype, "checkRoutes", [v], Object.getOwnPropertyDescriptor(Z.prototype, "checkRoutes"), Z.prototype), Yo = $(Z.prototype, "isGpsTrackingEnabled", [m], {
|
|
3623
4431
|
configurable: !0,
|
|
3624
4432
|
enumerable: !0,
|
|
3625
4433
|
writable: !0,
|
|
3626
4434
|
initializer: function() {
|
|
3627
4435
|
return !0;
|
|
3628
4436
|
}
|
|
3629
|
-
}), Z
|
|
3630
|
-
function
|
|
4437
|
+
}), $(Z.prototype, "setGpsTrackingEnabled", [v], Object.getOwnPropertyDescriptor(Z.prototype, "setGpsTrackingEnabled"), Z.prototype), $(Z.prototype, "gpsEnabled", [No], Object.getOwnPropertyDescriptor(Z.prototype, "gpsEnabled"), Z.prototype), $(Z.prototype, "setOnlyAccessible", [v], Object.getOwnPropertyDescriptor(Z.prototype, "setOnlyAccessible"), Z.prototype), Z);
|
|
4438
|
+
function Qo(e) {
|
|
3631
4439
|
var t;
|
|
3632
|
-
if (e) return e instanceof
|
|
4440
|
+
if (e) return e instanceof b ? (t = e.layer) == null ? void 0 : t.name : e.layer;
|
|
3633
4441
|
}
|
|
3634
|
-
function
|
|
4442
|
+
function $o(e, t) {
|
|
3635
4443
|
var n;
|
|
3636
|
-
return t ? t instanceof
|
|
4444
|
+
return t ? t instanceof b ? (n = t.layer) == null ? null : n : e.findLayer(t.layer) : null;
|
|
3637
4445
|
}
|
|
3638
|
-
function
|
|
4446
|
+
function es(e) {
|
|
3639
4447
|
return {
|
|
3640
4448
|
...e,
|
|
3641
|
-
x:
|
|
3642
|
-
y:
|
|
3643
|
-
lat: e.lat === void 0 ? void 0 :
|
|
3644
|
-
lng: e.lng === void 0 ? void 0 :
|
|
4449
|
+
x: Xo(e.x),
|
|
4450
|
+
y: Xo(e.y),
|
|
4451
|
+
lat: e.lat === void 0 ? void 0 : Xo(e.lat),
|
|
4452
|
+
lng: e.lng === void 0 ? void 0 : Xo(e.lng)
|
|
3645
4453
|
};
|
|
3646
4454
|
}
|
|
3647
|
-
function
|
|
4455
|
+
function ts(e) {
|
|
3648
4456
|
var t, n;
|
|
3649
|
-
let r = (t = (n =
|
|
3650
|
-
return r &&
|
|
4457
|
+
let r = (t = (n = Re()) == null ? void 0 : n.properties.config) == null ? null : t, i = null;
|
|
4458
|
+
return r && se({
|
|
3651
4459
|
min: r.p0,
|
|
3652
4460
|
max: r.p2
|
|
3653
|
-
}, e) ? i = { ...e } : r &&
|
|
4461
|
+
}, e) ? i = { ...e } : r && V(e.lat) && V(e.lng) ? i = hn(e, r) : r || (i = e), i || null;
|
|
3654
4462
|
}
|
|
3655
|
-
function
|
|
4463
|
+
function ns(e) {
|
|
3656
4464
|
var t;
|
|
3657
4465
|
return F.boothStore.findBooth(e) || ((t = F.exhibitorStore.findExhibitor(e)) == null ? void 0 : t.booths[0]);
|
|
3658
4466
|
}
|
|
3659
|
-
function
|
|
4467
|
+
function rs(e) {
|
|
3660
4468
|
let t = F.boothStore.boothByExternalId.get(e);
|
|
3661
4469
|
if (t) return {
|
|
3662
4470
|
type: "booth",
|
|
@@ -3668,10 +4476,10 @@ function Xa(e) {
|
|
|
3668
4476
|
entity: n
|
|
3669
4477
|
};
|
|
3670
4478
|
}
|
|
3671
|
-
function
|
|
4479
|
+
function is(e) {
|
|
3672
4480
|
let t = [], n = [];
|
|
3673
4481
|
for (let r of e) {
|
|
3674
|
-
let e =
|
|
4482
|
+
let e = rs(r);
|
|
3675
4483
|
e && (e.type === "booth" ? t.push(r) : n.push(r));
|
|
3676
4484
|
}
|
|
3677
4485
|
return {
|
|
@@ -3679,20 +4487,20 @@ function Za(e) {
|
|
|
3679
4487
|
exhibitorExternalIds: n
|
|
3680
4488
|
};
|
|
3681
4489
|
}
|
|
3682
|
-
function
|
|
4490
|
+
function as(e, t, n) {
|
|
3683
4491
|
var r, i;
|
|
3684
|
-
return new
|
|
4492
|
+
return new os((r = ns(e)) == null ? null : r, (i = ns(t)) == null ? null : i, n == null ? void 0 : n.map((e) => ns(e)).filter((e) => !!e));
|
|
3685
4493
|
}
|
|
3686
|
-
var
|
|
4494
|
+
var os = class {
|
|
3687
4495
|
constructor(e, t, n) {
|
|
3688
4496
|
this.from = e, this.to = t, this.waypoints = n;
|
|
3689
|
-
let r = e instanceof
|
|
4497
|
+
let r = e instanceof b ? e.id : void 0, i = t instanceof b ? t.id : void 0;
|
|
3690
4498
|
this.waypoints = n == null ? void 0 : n.filter((e) => e && e.id !== r && e.id !== i);
|
|
3691
4499
|
}
|
|
3692
4500
|
};
|
|
3693
|
-
function
|
|
4501
|
+
function ss(e) {
|
|
3694
4502
|
var t, n;
|
|
3695
|
-
return e ? e instanceof
|
|
4503
|
+
return e ? e instanceof b ? {
|
|
3696
4504
|
id: e.id,
|
|
3697
4505
|
name: e.name,
|
|
3698
4506
|
externalId: e.externalId,
|
|
@@ -3710,10 +4518,10 @@ function $a(e) {
|
|
|
3710
4518
|
}
|
|
3711
4519
|
} : null;
|
|
3712
4520
|
}
|
|
3713
|
-
var
|
|
4521
|
+
var cs = class {
|
|
3714
4522
|
constructor(e, t, n, r, i, a) {
|
|
3715
4523
|
this.x = e, this.y = t, this.z = n, this.angle = r, this.lat = i, this.lng = a;
|
|
3716
4524
|
}
|
|
3717
4525
|
};
|
|
3718
4526
|
//#endregion
|
|
3719
|
-
export {
|
|
4527
|
+
export { Yt as A, Tt as B, V as C, un as D, dn as E, Zt as F, Re as G, yt as H, nn as I, De as J, Fe as K, Ht as L, on as M, en as N, ln as O, $t as P, vt as R, gn as S, pn as T, bt as U, St as V, ze as W, je as Y, qi as _, ns as a, mr as b, is as c, ro as d, qa as f, Gi as g, Ki as h, as as i, Xt as j, B as k, Oo as l, ka as m, os as n, rs as o, Ha as p, Ae as q, Zo as r, Qo as s, cs as t, io as u, wi as v, mn as w, hn as x, Si as y, xt as z };
|