@expofp/floorplan 3.44.4 → 3.44.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{Button-F_XLD8Fy.js → Button-RBFYQ_Hi.js} +5 -5
- package/dist/browser/{CookieConsent-DZfbYufk.js → CookieConsent-DYvHugt5.js} +7 -7
- package/dist/browser/{Debug-Bfe4H5gN.js → Debug-Dwdforl1.js} +7 -7
- package/dist/browser/{DebugTools-D8ye4Kez.js → DebugTools-zmeDHNGo.js} +6 -6
- package/dist/browser/{Demo-CuFsb-_M.js → Demo-BS9Anmla.js} +9 -9
- package/dist/browser/{Free-C0Nk9qPr.js → Free-Js3r8S0A.js} +10 -10
- package/dist/browser/{GalleryContainer-CyAGAg4x.js → GalleryContainer-BAlmaG0f.js} +11 -11
- package/dist/browser/{GpsLoader-CoB3sRdS.js → GpsLoader-CPVQbvzp.js} +13 -13
- package/dist/browser/{KioskStore-CFuPEGt0.js → KioskStore-Bq5T3Ffz.js} +30 -30
- package/dist/browser/{LayerStore-CoevODUO.js → LayerStore-DCQ96IE-.js} +16 -16
- package/dist/browser/{MaplibreAdapter-Cu_LsCXF.js → MaplibreAdapter-DhVJu6nu.js} +2614 -2474
- package/dist/browser/{ModalContainer-My0C_xoz.js → ModalContainer-D6K2b0AJ.js} +10 -10
- package/dist/browser/{PermissionNotice-BOGBP1GX.js → PermissionNotice-DfjCPzFB.js} +6 -6
- package/dist/browser/{RouteStore-Dm2o_5F2.js → RouteStore-BZ4yT6y-.js} +9 -9
- package/dist/browser/{SetKioskMode-DPCRqozK.js → SetKioskMode-CrOh6y0s.js} +11 -11
- package/dist/browser/{ShowKiosk-DrNye8Aa.js → ShowKiosk-D1ClaHDA.js} +29 -30
- package/dist/browser/{UIState-BQFpVx6u.js → UIState-ByyaMrdX.js} +249 -238
- package/dist/browser/{ViewerMenuPanel-CR4YhVRV.js → ViewerMenuPanel-DakCumIN.js} +10 -10
- package/dist/browser/{add-debug-secret-listener-ujLceXxU.js → add-debug-secret-listener-CTKH_oRH.js} +1 -1
- package/dist/browser/{adopt-global-settings-CN0GZTt5.js → adopt-global-settings-D9sTS_JW.js} +9 -9
- package/dist/browser/{boolean-editor-Ceq6Etwz.js → boolean-editor-BwIw17rF.js} +9 -9
- package/dist/browser/{bootIntercom-B1uR7uMB.js → bootIntercom-CdKoKFoh.js} +2 -2
- package/dist/browser/bundle.json +85 -85
- package/dist/browser/{camera-events-CvNcBo4O.js → camera-events-sB__cd6I.js} +1 -1
- package/dist/browser/{classnames-CrsP-Ebw.js → classnames-CYKN3c87.js} +2 -2
- package/dist/browser/{client-BHrMhFVE.js → client-DrQUHXfL.js} +5 -5
- package/dist/browser/{components-BqCyp8zM.js → components-B5r0X7hw.js} +48 -48
- package/dist/browser/{create-live-plan-CvZGo-XN.js → create-live-plan-B5ooow2K.js} +13 -13
- package/dist/browser/{debug-context-i7l7Gx3K.js → debug-context-J8d6t8eB.js} +5 -5
- package/dist/browser/{debug-overlay-CRW_rbNG.js → debug-overlay-C2Jgoq6G.js} +10 -10
- package/dist/browser/{debug-ui-3YKCQhko.js → debug-ui-DPXawVu_.js} +6 -6
- package/dist/browser/{dimming-Dvu1pvil.js → dimming-BxZDtzpk.js} +282 -234
- package/dist/browser/{dist-DkwknQXP.js → dist-97S2bhkn.js} +5 -5
- package/dist/browser/{dist-uDlhOKs3.js → dist-Bbn7DzPA.js} +6 -6
- package/dist/browser/{dist-Cle-ua_T.js → dist-DMogs9qh.js} +3 -3
- package/dist/browser/{efp-debug-init-BYeJPe2d.js → efp-debug-init-D_04kt78.js} +3 -3
- package/dist/browser/{enum-editor-B_FawgZE.js → enum-editor-BAL-m2C_.js} +4 -4
- package/dist/browser/{es5-Dbukoinx.js → es5-CrpYYfSz.js} +2 -2
- package/dist/browser/{event-head-D6VrYuEF.js → event-head-qa_rZoTR.js} +1 -1
- package/dist/browser/{event-not-found-BDz3WPij.js → event-not-found-9sjy2LtU.js} +3 -3
- package/dist/browser/{event-scoped-cache-e6nGR3aQ.js → event-scoped-cache-BHo01Y40.js} +2 -2
- package/dist/browser/{expofpUrl-B0MZmxoe.js → expofpUrl-zbpM1nSq.js} +1 -1
- package/dist/browser/{exports-DEZevwDn.js → exports-DlkhL3Gn.js} +1 -1
- package/dist/browser/{favicon-u31TeYa4.js → favicon-MiQiTRAG.js} +1 -1
- package/dist/browser/{fetch-retry.umd-Cn-1aORd.js → fetch-retry.umd-BqYOzYBV.js} +2 -2
- package/dist/browser/{flex-cYeXiUeX.js → flex-u4ly_-5z.js} +5 -5
- package/dist/browser/{floorplan.loader-DQ33Y83e.js → floorplan.loader-CC9R8Z2W.js} +12 -12
- package/dist/browser/{floorplan.ready-DzJBQvVZ.js → floorplan.ready-WeInPpd9.js} +24 -24
- package/dist/browser/{freeBanner-DIcnNW6x.js → freeBanner-C4Bvu0Zb.js} +2 -2
- package/dist/browser/{fuse-ZGglAVb9.js → fuse-G-0speZ8.js} +2 -2
- package/dist/browser/{i18n-DkibBSFF.js → i18n-BnNMXZMY.js} +6 -6
- package/dist/browser/index.js +17 -17
- package/dist/browser/{index.module-BP-TB38-.js → index.module-BSaN-b6b.js} +4 -4
- package/dist/browser/{init-ui-DwX0YEOm.js → init-ui-DzAjXF5g.js} +11 -11
- package/dist/browser/{integrateKiosk-Di2HTJ8S.js → integrateKiosk-BVDvw6FM.js} +11 -11
- package/dist/browser/{is-debug-DH7N8jQh.js → is-debug-D9QhFSGQ.js} +4 -4
- package/dist/browser/{is-own-domain-CE5Nyu9G.js → is-own-domain-yTnvm9Le.js} +1 -1
- package/dist/browser/{is-webview-BCZ5IIAQ.js → is-webview-BqECy8-R.js} +1 -1
- package/dist/browser/{jsx-runtime-DRF-BLHf.js → jsx-runtime-BSXeXEHO.js} +2 -2
- package/dist/browser/kiosk-mode-DWfwx4t2.js +28 -0
- package/dist/browser/{kiosk-record-DjdRCsw4.js → kiosk-record-BOMPoHaT.js} +1 -1
- package/dist/browser/{kioskApi-CvKNO-wZ.js → kioskApi-BDv0w-PS.js} +7 -7
- package/dist/browser/{lib-D51yHChz.js → lib-B1qP6Z0C.js} +3 -3
- package/dist/browser/{loadImage-mqrRnYPB.js → loadImage-DPQiw0WY.js} +1 -1
- package/dist/browser/{logDeviceInfo-BbgtT2xS.js → logDeviceInfo-1M7WZnu3.js} +9 -9
- package/dist/browser/{mobx-DzcgHXfh.js → mobx-ClZZNnUh.js} +4 -4
- package/dist/browser/{mobx.module-DXfPwJbY.js → mobx.module-6oYVXmmv.js} +1 -1
- package/dist/browser/{optional-boolean-editor-i9cNIguy.js → optional-boolean-editor-Cc0C_hZa.js} +3 -3
- package/dist/browser/{optional-enum-editor-OmCRikPm.js → optional-enum-editor-V4cHa53F.js} +4 -4
- package/dist/browser/{optional-string-editor-C5sw9XjO.js → optional-string-editor-DRRoeLbD.js} +4 -4
- package/dist/browser/{particles.min-Cj5RSf6H.js → particles.min-COe9Gmit.js} +2 -2
- package/dist/browser/{react-BU3jD5B2.js → react-Ca00Xeqo.js} +2 -2
- package/dist/browser/{react-dom-DJDMclnf.js → react-dom-DDAmTd7-.js} +3 -3
- package/dist/browser/{rolldown-runtime-CEvxUPK8.js → rolldown-runtime-DgjedSI7.js} +1 -1
- package/dist/browser/{scene-B7RN58fT.js → scene-DaAXLmIU.js} +2 -2
- package/dist/browser/{scheduler-BZKT_e0-.js → scheduler-BGLqZKHW.js} +2 -2
- package/dist/browser/{select-COMyfaY9.js → select-DXkYXR4z.js} +10 -10
- package/dist/browser/{settings-Cg-yMbvI.js → settings-CwB0Bji2.js} +2 -2
- package/dist/browser/{settings-item-D1VQ8quC.js → settings-item-CT5g44Cs.js} +6 -6
- package/dist/browser/{store-XoxiSr-z.js → store-WuygYZ-g.js} +2 -2
- package/dist/browser/{string-editor-CWO5nIcD.js → string-editor-BATS-p4e.js} +4 -4
- package/dist/browser/{text-field-BqEB9Lpy.js → text-field-BDxhPAkK.js} +5 -5
- package/dist/browser/{theme-Drd2jIAq.js → theme-ln4LxgRi.js} +8 -8
- package/dist/browser/{ui-Bg4NEUSa.js → ui-BDzovVzL.js} +8 -8
- package/dist/browser/{useRenderTarget-Bqxwvxh1.js → useRenderTarget-BBar7DgD.js} +4 -4
- package/dist/browser/{viewport-BkMq7yU7.js → viewport-D2M15h-f.js} +3 -3
- package/dist/browser/{wayfinding-BvV-kzMQ.js → wayfinding-zYAP3tr2.js} +5 -5
- package/dist/esm/components/Kiosk/KioskStore.js +1 -1
- package/dist/esm/components/Kiosk/ShowKiosk.js +1 -1
- package/dist/esm/components/Kiosk/integrateKiosk.js +1 -1
- package/dist/esm/components/Kiosk/kiosk-mode.d.ts +4 -28
- package/dist/esm/components/Kiosk/kiosk-mode.js +1 -1
- package/dist/esm/components/Map/drawing/config/booth-badge-anchor.d.ts +121 -0
- package/dist/esm/components/Map/drawing/config/booth-badge-anchor.js +1 -0
- package/dist/esm/components/Map/drawing/config/config-booth-badge.js +1 -1
- package/dist/esm/components/Maplibre/MaplibreWrapper.d.ts +5 -0
- package/dist/esm/components/Maplibre/MaplibreWrapper.js +1 -1
- package/dist/esm/components/Maplibre/utils/basemap-palette.d.ts +19 -0
- package/dist/esm/components/Maplibre/utils/basemap-palette.js +1 -0
- package/dist/esm/components/Maplibre/utils/map-helpers.js +1 -1
- package/dist/esm/components/Maplibre/utils/resolve-map-style.d.ts +5 -1
- package/dist/esm/components/Maplibre/utils/resolve-map-style.js +1 -1
- package/dist/esm/store/UIState.d.ts +21 -10
- package/dist/esm/store/UIState.js +1 -1
- package/dist/esm/store/init/init-ui.js +1 -1
- package/dist/esm/utils/is-phone.d.ts +9 -0
- package/dist/esm/utils/is-phone.js +1 -0
- package/package.json +10 -10
- package/dist/browser/kiosk-mode-AIiDx_CP.js +0 -33
|
@@ -1,83 +1,180 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
try {
|
|
3
3
|
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
|
-
e.SENTRY_RELEASE = { id: "3.44.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.44.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] = "29c29777-ce0b-4875-b12b-f9b4bb1518a2", e._sentryDebugIdIdentifier = "sentry-dbid-29c29777-ce0b-4875-b12b-f9b4bb1518a2");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { g as t } from "./i18n-
|
|
11
|
-
import { t as n } from "./react-
|
|
12
|
-
import { l as r } from "./mobx.module-
|
|
13
|
-
import { t as i } from "./loadImage-
|
|
14
|
-
import { r as a } from "./debug-context-
|
|
15
|
-
import { a as o, l as s, t as c, u as l } from "./store-
|
|
16
|
-
import { $ as u, Bt as d, D as f, Et as p, Ft as m, G as h, Ht as g, J as _, Kt as v, Nt as y, Rt as b, Vt as x, W as S, Wt as C, X as w, Y as T, _t as E, b as D, d as
|
|
17
|
-
import { _ as
|
|
18
|
-
import { i as
|
|
19
|
-
import { r as
|
|
9
|
+
import { r as e } from "./rolldown-runtime-DgjedSI7.js";
|
|
10
|
+
import { g as t } from "./i18n-BnNMXZMY.js";
|
|
11
|
+
import { t as n } from "./react-Ca00Xeqo.js";
|
|
12
|
+
import { l as r } from "./mobx.module-6oYVXmmv.js";
|
|
13
|
+
import { t as i } from "./loadImage-DPQiw0WY.js";
|
|
14
|
+
import { r as a } from "./debug-context-J8d6t8eB.js";
|
|
15
|
+
import { a as o, l as s, t as c, u as l } from "./store-WuygYZ-g.js";
|
|
16
|
+
import { $ as u, Bt as d, D as f, Et as p, Ft as m, G as h, Ht as g, J as _, Kt as v, Nt as y, Rt as b, Vt as x, W as S, Wt as C, X as w, Y as T, _t as E, b as D, d as O, dt as k, f as A, gt as j, i as M, it as N, kt as P, nt as ee, q as te, qt as F, rt as ne, t as re, vt as I, wt as ie, x as ae, xt as oe } from "./LayerStore-DCQ96IE-.js";
|
|
17
|
+
import { _ as se, l as ce } from "./wayfinding-zYAP3tr2.js";
|
|
18
|
+
import { i as le, n as ue } from "./viewport-D2M15h-f.js";
|
|
19
|
+
import { r as de } from "./scene-DaAXLmIU.js";
|
|
20
20
|
//#region src/components/Map/traffic/trafficLayers.ts
|
|
21
|
-
var
|
|
22
|
-
function
|
|
21
|
+
var L = "traffic_route", fe = "traffic_route_stop", R = "traffic_vehicles", pe = "build_route_lines", me = "build_route_dots", he = 5;
|
|
22
|
+
function ge() {
|
|
23
23
|
let e = [];
|
|
24
|
-
for (let t = 0; t <
|
|
25
|
-
name:
|
|
24
|
+
for (let t = 0; t < he; t++) e.push({
|
|
25
|
+
name: _e(t),
|
|
26
26
|
children: []
|
|
27
27
|
}), e.push({
|
|
28
|
-
name:
|
|
28
|
+
name: ve(t),
|
|
29
29
|
children: []
|
|
30
30
|
});
|
|
31
31
|
return e.push({
|
|
32
|
-
name:
|
|
32
|
+
name: R,
|
|
33
33
|
children: []
|
|
34
34
|
}), e.push({
|
|
35
|
-
name:
|
|
35
|
+
name: pe,
|
|
36
36
|
children: []
|
|
37
37
|
}), e.push({
|
|
38
|
-
name:
|
|
38
|
+
name: me,
|
|
39
39
|
children: []
|
|
40
40
|
}), e;
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
return `${
|
|
42
|
+
function _e(e) {
|
|
43
|
+
return `${L}_${e + 1}`;
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
return `${
|
|
45
|
+
function ve(e) {
|
|
46
|
+
return `${fe}_${e + 1}`;
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return RegExp(`^${
|
|
48
|
+
function ye() {
|
|
49
|
+
return RegExp(`^${L}_\\d+$`);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
return RegExp(`^${
|
|
51
|
+
function be() {
|
|
52
|
+
return RegExp(`^${fe}_\\d+$`);
|
|
53
53
|
}
|
|
54
54
|
//#endregion
|
|
55
|
-
//#region src/components/Map/drawing/config/
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
55
|
+
//#region src/components/Map/drawing/config/booth-badge-anchor.ts
|
|
56
|
+
var xe = /* @__PURE__ */ e(j(), 1), Se = .5, Ce = .3, we = 10, Te = 8, Ee = 50, z = class e {
|
|
57
|
+
constructor(e, t, n, r) {
|
|
58
|
+
this.booth = e, this.triangles = t, this.border = n, this.source = r, this.fits = [], this.prefetchRotation = 0, this.polygon = void 0, this.bbox = void 0, this.vertices = null, this.polygon = Oe(t), this.bbox = De(t);
|
|
59
|
+
}
|
|
60
|
+
fit(e, t) {
|
|
61
|
+
let n = this.fits[e];
|
|
62
|
+
return n || (this.fits[e] = n = this.compute(e, t)), n;
|
|
63
|
+
}
|
|
64
|
+
prefetch(t) {
|
|
65
|
+
e.idle.has(this) || (this.prefetchRotation = t, e.idle.add(this), e.scheduleIdle());
|
|
66
|
+
}
|
|
67
|
+
cancelPrefetch() {
|
|
68
|
+
e.idle.delete(this);
|
|
69
|
+
}
|
|
70
|
+
static scheduleIdle() {
|
|
71
|
+
e.idleScheduled || !e.idle.size || (e.idleScheduled = !0, typeof requestIdleCallback == "function" ? requestIdleCallback(e.runIdle) : setTimeout(() => e.runIdle({ timeRemaining: () => Te }), Ee));
|
|
72
|
+
}
|
|
73
|
+
static runIdle(t) {
|
|
74
|
+
e.idleScheduled = !1;
|
|
75
|
+
let n = performance.now() + Te;
|
|
76
|
+
for (let r of e.idle) {
|
|
77
|
+
if (t.timeRemaining() <= 0 || performance.now() >= n) break;
|
|
78
|
+
r.prefetchNext() || e.idle.delete(r);
|
|
79
|
+
}
|
|
80
|
+
e.scheduleIdle();
|
|
81
|
+
}
|
|
82
|
+
prefetchNext() {
|
|
83
|
+
for (let e = 1; e < 4; e++) if (!this.fits[e]) return this.fit(e, this.prefetchRotation + e * Math.PI / 2), e < 3;
|
|
84
|
+
return !1;
|
|
85
|
+
}
|
|
86
|
+
compute(e, t) {
|
|
87
|
+
let n = e === 0 || e === 3 ? 1 : -1, r = e === 0 || e === 1 ? 1 : -1, i = this.findAnchor(n, r), a = this.clampScale(i.x, i.y, this.rectMaxScale(e % 2 == 1), t);
|
|
88
|
+
return {
|
|
89
|
+
x: i.x,
|
|
90
|
+
y: i.y,
|
|
91
|
+
maxScale: a
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
rectMaxScale(e) {
|
|
95
|
+
let t = this.booth.rect.size.width, n = this.booth.rect.size.height, r = e ? n : t, i = e ? t : n;
|
|
96
|
+
return Math.min(r > 0 ? r * Se / this.source.x : Infinity, i > 0 ? i * Ce / this.source.y : Infinity);
|
|
97
|
+
}
|
|
98
|
+
findAnchor(e, t) {
|
|
99
|
+
var n;
|
|
100
|
+
let { booth: r, border: i, bbox: a } = this;
|
|
101
|
+
if (a) {
|
|
102
|
+
let n = e > 0 ? a.min.x : a.max.x, r = t > 0 ? a.min.y : a.max.y, o = [];
|
|
103
|
+
for (let [a, s] of this.distinctVertices()) {
|
|
104
|
+
let c = a + i * e, l = s + i * t, u = Math.abs(c - n) + Math.abs(l - r);
|
|
105
|
+
u < Infinity && o.push({
|
|
106
|
+
x: c,
|
|
107
|
+
y: l,
|
|
108
|
+
score: u,
|
|
109
|
+
order: o.length
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
o.sort((e, t) => e.score - t.score || e.order - t.order);
|
|
113
|
+
for (let e of o) {
|
|
114
|
+
let t = {
|
|
115
|
+
x: e.x,
|
|
116
|
+
y: e.y
|
|
117
|
+
};
|
|
118
|
+
if (this.polygon.containsPoint(t)) return t;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
let o = e > 0 ? r.rect.min.x + i : r.rect.max.x - i, s = t > 0 ? r.rect.min.y + i : r.rect.max.y - i, c = (n = r.rotate) == null ? 0 : n;
|
|
122
|
+
return c ? v({
|
|
123
|
+
x: o,
|
|
124
|
+
y: s
|
|
125
|
+
}, c, r.rect.center) : {
|
|
126
|
+
x: o,
|
|
127
|
+
y: s
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
clampScale(e, t, n, r) {
|
|
131
|
+
let { polygon: i, source: a } = this;
|
|
132
|
+
if (!this.triangles.length) return n;
|
|
133
|
+
let o = {
|
|
134
|
+
x: e,
|
|
135
|
+
y: t
|
|
136
|
+
};
|
|
137
|
+
if (!i.containsPoint(o)) return n;
|
|
138
|
+
let s = 0, c = n;
|
|
139
|
+
for (let n = 0; n < we; n++) {
|
|
140
|
+
let n = (s + c) / 2, l = a.x * n, u = a.y * n;
|
|
141
|
+
i.containsPoint(v({
|
|
142
|
+
x: e + l,
|
|
143
|
+
y: t
|
|
144
|
+
}, r, o)) && i.containsPoint(v({
|
|
145
|
+
x: e,
|
|
146
|
+
y: t + u
|
|
147
|
+
}, r, o)) && i.containsPoint(v({
|
|
148
|
+
x: e + l,
|
|
149
|
+
y: t + u
|
|
150
|
+
}, r, o)) ? s = n : c = n;
|
|
151
|
+
}
|
|
152
|
+
return s;
|
|
153
|
+
}
|
|
154
|
+
distinctVertices() {
|
|
155
|
+
if (this.vertices) return this.vertices;
|
|
156
|
+
let e = /* @__PURE__ */ new Set(), t = [];
|
|
157
|
+
for (let n of this.triangles) for (let r of n) {
|
|
158
|
+
let n = `${r[0]},${r[1]}`;
|
|
159
|
+
e.has(n) || (e.add(n), t.push([r[0], r[1]]));
|
|
160
|
+
}
|
|
161
|
+
return this.vertices = t;
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
z.idle = /* @__PURE__ */ new Set(), z.idleScheduled = !1;
|
|
165
|
+
function De(e) {
|
|
166
|
+
if (!e.length) return null;
|
|
167
|
+
let t = Infinity, n = Infinity, r = -Infinity, i = -Infinity;
|
|
168
|
+
for (let a of e) for (let [e, o] of a) e < t && (t = e), o < n && (n = o), e > r && (r = e), o > i && (i = o);
|
|
169
|
+
return b.fromMinMax({
|
|
170
|
+
x: t,
|
|
171
|
+
y: n
|
|
172
|
+
}, {
|
|
173
|
+
x: r,
|
|
174
|
+
y: i
|
|
175
|
+
});
|
|
79
176
|
}
|
|
80
|
-
function
|
|
177
|
+
function Oe(e) {
|
|
81
178
|
let t = [], n = [];
|
|
82
179
|
for (let r of e) {
|
|
83
180
|
let e = t.length;
|
|
@@ -98,151 +195,102 @@ function Me(e) {
|
|
|
98
195
|
}
|
|
99
196
|
return new g(t, n);
|
|
100
197
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
function Ne(e, t, n, r, i, a, o, s) {
|
|
108
|
-
if (!e.length || !V(n, r, t)) return o;
|
|
109
|
-
let c = {
|
|
110
|
-
x: n,
|
|
111
|
-
y: r
|
|
112
|
-
}, l = 0, u = o;
|
|
113
|
-
for (let e = 0; e < 10; e++) {
|
|
114
|
-
let e = (l + u) / 2, o = i * e, d = a * e;
|
|
115
|
-
[
|
|
116
|
-
v({
|
|
117
|
-
x: n + o,
|
|
118
|
-
y: r
|
|
119
|
-
}, s, c),
|
|
120
|
-
v({
|
|
121
|
-
x: n,
|
|
122
|
-
y: r + d
|
|
123
|
-
}, s, c),
|
|
124
|
-
v({
|
|
125
|
-
x: n + o,
|
|
126
|
-
y: r + d
|
|
127
|
-
}, s, c)
|
|
128
|
-
].every((e) => V(e.x, e.y, t)) ? l = e : u = e;
|
|
129
|
-
}
|
|
130
|
-
return l;
|
|
198
|
+
//#endregion
|
|
199
|
+
//#region src/components/Map/drawing/config/config-booth-badge-eligibility.ts
|
|
200
|
+
function ke(e) {
|
|
201
|
+
return e.hideExhibitorBoothNumber || e.hideBoothBadges || !e.hasExhibitors ? !1 : e.noLabels || !e.hideLogoInBooth && e.hasLogoInBooth;
|
|
131
202
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
203
|
+
//#endregion
|
|
204
|
+
//#region src/components/Map/drawing/config/config-booth-badge.ts
|
|
205
|
+
var Ae = 15, je = 24, Me = 30, Ne = 12, Pe = .8, Fe = document.createElement("canvas").getContext("2d");
|
|
206
|
+
function Ie(e) {
|
|
207
|
+
return e.length <= Ae ? e : e.slice(0, Ae - 1) + "…";
|
|
135
208
|
}
|
|
136
|
-
function
|
|
137
|
-
var
|
|
138
|
-
if (t.length)
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}, c = /* @__PURE__ */ new Set(), l = null, u = Infinity;
|
|
143
|
-
for (let e of t) for (let t of e) {
|
|
144
|
-
let e = `${t[0]},${t[1]}`;
|
|
145
|
-
if (c.has(e)) continue;
|
|
146
|
-
c.add(e);
|
|
147
|
-
let o = t[0] + r * i, d = t[1] + r * a;
|
|
148
|
-
if (V(o, d, n)) {
|
|
149
|
-
let e = Math.abs(o - s.x) + Math.abs(d - s.y);
|
|
150
|
-
e < u && (u = e, l = {
|
|
151
|
-
x: o,
|
|
152
|
-
y: d
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
if (l) return l;
|
|
157
|
-
}
|
|
158
|
-
let s = i > 0 ? e.rect.min.x + r : e.rect.max.x - r, c = a > 0 ? e.rect.min.y + r : e.rect.max.y - r, l = (o = e.rotate) == null ? 0 : o;
|
|
159
|
-
return l ? v({
|
|
160
|
-
x: s,
|
|
161
|
-
y: c
|
|
162
|
-
}, l, e.rect.center) : {
|
|
163
|
-
x: s,
|
|
164
|
-
y: c
|
|
165
|
-
};
|
|
209
|
+
function Le(e) {
|
|
210
|
+
var t, n;
|
|
211
|
+
if (!((t = e.paths) != null && t.length)) return [];
|
|
212
|
+
let r = ((n = e.layer) == null ? void 0 : n.name) || "", i = [];
|
|
213
|
+
for (let t of e.paths) for (let e of P(t.index, r)) i.push(e);
|
|
214
|
+
return i;
|
|
166
215
|
}
|
|
167
|
-
function
|
|
216
|
+
function B(e) {
|
|
168
217
|
return e && e !== "none" ? e : void 0;
|
|
169
218
|
}
|
|
170
|
-
function
|
|
219
|
+
function Re(e) {
|
|
171
220
|
var t;
|
|
172
|
-
let n =
|
|
173
|
-
return ((t = e.paths) == null ? void 0 : t.length) > 1 &&
|
|
221
|
+
let n = B(e.borderColor) || B(p.boothBorderColor) || p.colors.booths.default;
|
|
222
|
+
return ((t = e.paths) == null ? void 0 : t.length) > 1 && B(e.paths[e.paths.length - 1].color) || n;
|
|
174
223
|
}
|
|
175
|
-
function
|
|
224
|
+
function ze(e) {
|
|
176
225
|
var t;
|
|
177
|
-
let n =
|
|
178
|
-
|
|
179
|
-
let s =
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
}
|
|
183
|
-
let
|
|
184
|
-
|
|
185
|
-
let n = g(C === 1 || C === 3);
|
|
186
|
-
A = Ne(y, b, E, D, f, p, n, S);
|
|
226
|
+
let n = Ie(e.title || e.name), i = Re(e), a = de((0, xe.default)(i).hex()), o = O();
|
|
227
|
+
Fe.font = ie(Me, o);
|
|
228
|
+
let s = Fe.measureText(n).width, u = Math.ceil(s + Ne * 2), d = (e.borderWidth || c.borderWidth) / 2, f = u * Pe, p = 54 * Pe, m = new z(e, Le(e), d, {
|
|
229
|
+
x: f,
|
|
230
|
+
y: p
|
|
231
|
+
}), h = (t = e.rotate) == null ? 0 : t, g = 0, y = 0, b = 0, S = 0, C = () => {
|
|
232
|
+
let e = m.fit(g, h);
|
|
233
|
+
y = e.x, b = e.y, S = e.maxScale;
|
|
187
234
|
};
|
|
188
|
-
|
|
189
|
-
let
|
|
235
|
+
C();
|
|
236
|
+
let E = (t, n) => {
|
|
190
237
|
let r = t / 2, i = n / 2;
|
|
191
238
|
return new x(v({
|
|
192
|
-
x:
|
|
193
|
-
y:
|
|
194
|
-
},
|
|
195
|
-
x:
|
|
196
|
-
y:
|
|
239
|
+
x: y + r,
|
|
240
|
+
y: b + i
|
|
241
|
+
}, h, {
|
|
242
|
+
x: y,
|
|
243
|
+
y: b
|
|
197
244
|
}), {
|
|
198
245
|
x: t,
|
|
199
246
|
y: n
|
|
200
|
-
},
|
|
201
|
-
},
|
|
202
|
-
|
|
203
|
-
let
|
|
247
|
+
}, h, e.elevation);
|
|
248
|
+
}, D = A(o, w()), j = te(E(1, 1), i);
|
|
249
|
+
j.hidden = !0, j.dim = e.skipDim ? 0 : void 0;
|
|
250
|
+
let M = _(T([[n], []], a, 0, [D, D]), E(1, 1), [0, 0], {
|
|
204
251
|
horizontal: "center",
|
|
205
252
|
vertical: "center"
|
|
206
253
|
});
|
|
207
|
-
|
|
208
|
-
let
|
|
254
|
+
M.hidden = !0, M.dim = e.skipDim ? 0 : void 0;
|
|
255
|
+
let N = {
|
|
209
256
|
booth: e,
|
|
210
257
|
anchor: {
|
|
211
|
-
x:
|
|
212
|
-
y:
|
|
258
|
+
x: y,
|
|
259
|
+
y: b
|
|
213
260
|
},
|
|
214
261
|
source: {
|
|
215
262
|
x: f,
|
|
216
263
|
y: p
|
|
217
264
|
},
|
|
218
|
-
rotation:
|
|
219
|
-
maxScale:
|
|
220
|
-
bg:
|
|
221
|
-
text:
|
|
222
|
-
},
|
|
223
|
-
|
|
224
|
-
let
|
|
225
|
-
return
|
|
226
|
-
|
|
227
|
-
})),
|
|
265
|
+
rotation: h,
|
|
266
|
+
maxScale: S,
|
|
267
|
+
bg: j,
|
|
268
|
+
text: M
|
|
269
|
+
}, P = new Be(N);
|
|
270
|
+
j.onScale = ({ pixelSize: e }) => P.layOutBg(e), M.onScale = ({ pixelSize: e }) => P.layOutText(e);
|
|
271
|
+
let F = [];
|
|
272
|
+
return F.push(r(() => e.skipDim, (e) => {
|
|
273
|
+
j.dim = e ? 0 : void 0, M.dim = e ? 0 : void 0, k(j, M);
|
|
274
|
+
})), F.push(r(() => {
|
|
228
275
|
var t, n;
|
|
229
276
|
return (t = (n = e.layer) == null ? void 0 : n.visible) == null || t;
|
|
230
277
|
}, (e) => {
|
|
231
|
-
|
|
232
|
-
})),
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
278
|
+
j.hidden = !e, M.hidden = !e, k(j, M);
|
|
279
|
+
})), F.push(r(() => l.mapSettings, ({ roll: t }) => {
|
|
280
|
+
var n;
|
|
281
|
+
ne(t == null ? 0 : t) && (m.prefetch((n = e.rotate) == null ? 0 : n), j.onRoll = ({ roll: e, pixelSize: t }) => {
|
|
282
|
+
let n = ee(e, h);
|
|
283
|
+
if (n !== 0) return h += n * Math.PI / 2, g = ((g + n) % 4 + 4) % 4, C(), N.anchor.x = y, N.anchor.y = b, N.rotation = h, N.maxScale = S, [...P.layOutBg(t), ...P.layOutText(t)];
|
|
236
284
|
});
|
|
237
|
-
}, { fireImmediately: !0 })), {
|
|
238
|
-
bg:
|
|
239
|
-
text:
|
|
285
|
+
}, { fireImmediately: !0 }), () => m.cancelPrefetch()), {
|
|
286
|
+
bg: j,
|
|
287
|
+
text: M,
|
|
240
288
|
dispose: () => {
|
|
241
|
-
|
|
289
|
+
F.forEach((e) => e()), F.length = 0;
|
|
242
290
|
}
|
|
243
291
|
};
|
|
244
292
|
}
|
|
245
|
-
var
|
|
293
|
+
var Be = class {
|
|
246
294
|
constructor(e) {
|
|
247
295
|
this.placement = e;
|
|
248
296
|
}
|
|
@@ -252,7 +300,7 @@ var Re = class {
|
|
|
252
300
|
}
|
|
253
301
|
layOutText(e) {
|
|
254
302
|
let { text: t, maxScale: n } = this.placement;
|
|
255
|
-
return t.lines[0].fontSize =
|
|
303
|
+
return t.lines[0].fontSize = je * Math.min(e, n), t.bounds = this.rectScaled(e), t.hidden = this.isHidden(), t.hidden ? [] : [t];
|
|
256
304
|
}
|
|
257
305
|
rectScaled(e) {
|
|
258
306
|
let { anchor: t, booth: n, source: r, rotation: i, maxScale: a } = this.placement, o = Math.min(e, a), s = r.x * o, c = r.y * o;
|
|
@@ -269,9 +317,9 @@ var Re = class {
|
|
|
269
317
|
return !!(e.layer && !e.layer.visible);
|
|
270
318
|
}
|
|
271
319
|
};
|
|
272
|
-
function
|
|
320
|
+
function Ve(e, t) {
|
|
273
321
|
let n = [], r = [], i = [];
|
|
274
|
-
for (let e of t) if (e instanceof u &&
|
|
322
|
+
for (let e of t) if (e instanceof u && ke({
|
|
275
323
|
hideExhibitorBoothNumber: y.hideExhibitorBoothNumber,
|
|
276
324
|
hideBoothBadges: y.hideBoothBadges,
|
|
277
325
|
hideLogoInBooth: l.hideLogoInBooth,
|
|
@@ -279,7 +327,7 @@ function ze(e, t) {
|
|
|
279
327
|
hasExhibitors: e.exhibitors.length > 0,
|
|
280
328
|
hasLogoInBooth: e.exhibitors.some((e) => e.logoInBooth && e.logo)
|
|
281
329
|
})) {
|
|
282
|
-
let { bg: t, text: a, dispose: o } =
|
|
330
|
+
let { bg: t, text: a, dispose: o } = ze(e);
|
|
283
331
|
n.push(t), r.push(a), i.push(o);
|
|
284
332
|
}
|
|
285
333
|
let a = () => {
|
|
@@ -304,7 +352,7 @@ function ze(e, t) {
|
|
|
304
352
|
}
|
|
305
353
|
//#endregion
|
|
306
354
|
//#region src/components/Map/drawing/config/config-markers.ts
|
|
307
|
-
var
|
|
355
|
+
var V = "_selected", H = "markers";
|
|
308
356
|
function He(e, t) {
|
|
309
357
|
let { center: n, rotation: r, elevation: i } = e.bounds, { width: a, height: o } = e.source;
|
|
310
358
|
return e.bounds = I(n.x, n.y, a, o, t, r, i), [e];
|
|
@@ -313,8 +361,8 @@ function Ue(e) {
|
|
|
313
361
|
U = e;
|
|
314
362
|
}
|
|
315
363
|
function We(e) {
|
|
316
|
-
let { scene: t } = e, n = [], i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), c = [], u = t.rootLayer.children.find((e) => e.name ===
|
|
317
|
-
u.onScale = ({ pixelSize: e }) => Ue(e), D(Ge),
|
|
364
|
+
let { scene: t } = e, n = [], i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), c = [], u = t.rootLayer.children.find((e) => e.name === H);
|
|
365
|
+
u.onScale = ({ pixelSize: e }) => Ue(e), D(Ge), k(u);
|
|
318
366
|
async function d(e) {
|
|
319
367
|
let t = [];
|
|
320
368
|
e.forEach((e) => {
|
|
@@ -345,7 +393,7 @@ function We(e) {
|
|
|
345
393
|
function m(e, t, n) {
|
|
346
394
|
let r = a.get(e);
|
|
347
395
|
if (r) return r;
|
|
348
|
-
let i =
|
|
396
|
+
let i = oe(t.img, t.width, t.height, n);
|
|
349
397
|
return a.set(e, i), i;
|
|
350
398
|
}
|
|
351
399
|
function h() {
|
|
@@ -385,7 +433,7 @@ function We(e) {
|
|
|
385
433
|
hidden: !(f && e.active),
|
|
386
434
|
origin: g
|
|
387
435
|
}),
|
|
388
|
-
id: `${e.id}${
|
|
436
|
+
id: `${e.id}${V}`,
|
|
389
437
|
scale: l,
|
|
390
438
|
screenSpace: t
|
|
391
439
|
};
|
|
@@ -401,7 +449,7 @@ function We(e) {
|
|
|
401
449
|
let e = s.routeStore.markersData.markers;
|
|
402
450
|
e.length && e.forEach((e) => {
|
|
403
451
|
var t, n;
|
|
404
|
-
let r = c.find((t) => t.id === e.id), i = c.find((t) => t.id === `${e.id}${
|
|
452
|
+
let r = c.find((t) => t.id === e.id), i = c.find((t) => t.id === `${e.id}${V}`);
|
|
405
453
|
if (!r || !i) return;
|
|
406
454
|
let a = (t = (n = o.findLayer(e.z)) == null ? void 0 : n.visible) == null || t;
|
|
407
455
|
e.active ? (r.hidden = !0, i.hidden = !(a && e.active)) : (r.hidden = !a, i.hidden = !0);
|
|
@@ -409,16 +457,16 @@ function We(e) {
|
|
|
409
457
|
}
|
|
410
458
|
return n.push(r(() => [s.routeStore.selectedMarkers, s.layerStore.visible], () => {
|
|
411
459
|
if (!s.routeStore.markersData.markers.length) {
|
|
412
|
-
g(),
|
|
460
|
+
g(), k(u);
|
|
413
461
|
return;
|
|
414
462
|
}
|
|
415
|
-
_(),
|
|
463
|
+
_(), k(...c);
|
|
416
464
|
})), n.push(r(() => s.routeStore.markersData.markers, () => {
|
|
417
465
|
d(s.routeStore.markersData.icons).then(() => {
|
|
418
|
-
h(),
|
|
466
|
+
h(), k(u);
|
|
419
467
|
});
|
|
420
468
|
}, { fireImmediately: !0 })), function() {
|
|
421
|
-
n.forEach((e) => e()), n.length = 0, u.onScale = void 0, D(), U = 1,
|
|
469
|
+
n.forEach((e) => e()), n.length = 0, u.onScale = void 0, D(), U = 1, k(u);
|
|
422
470
|
};
|
|
423
471
|
}
|
|
424
472
|
function Ge(e, t) {
|
|
@@ -457,19 +505,19 @@ function Je() {
|
|
|
457
505
|
let n = [...t], r = t.indexOf(e);
|
|
458
506
|
n.splice(r, 1), t = [e, ...n];
|
|
459
507
|
}
|
|
460
|
-
let n = t.filter((e) => !e.rootParent).map((e) =>
|
|
508
|
+
let n = t.filter((e) => !e.rootParent).map((e) => M(e));
|
|
461
509
|
return Promise.all(n).then((e) => {
|
|
462
|
-
let t = h(
|
|
510
|
+
let t = h(H, []);
|
|
463
511
|
t.overlay = l.is3DView;
|
|
464
|
-
let n =
|
|
512
|
+
let n = ce({ overlay: l.is3DView }), r = [], i = [];
|
|
465
513
|
for (let t of e.flat()) f(t.name) ? (t.dim = 0, i.push(t)) : r.push(t);
|
|
466
|
-
let { layer: a, cleanup: o } =
|
|
514
|
+
let { layer: a, cleanup: o } = Ve("root", c.booths);
|
|
467
515
|
return {
|
|
468
516
|
layers: [
|
|
469
517
|
...r,
|
|
470
518
|
...a ? [a] : [],
|
|
471
519
|
...i,
|
|
472
|
-
...
|
|
520
|
+
...ge(),
|
|
473
521
|
t,
|
|
474
522
|
n
|
|
475
523
|
],
|
|
@@ -479,15 +527,15 @@ function Je() {
|
|
|
479
527
|
}
|
|
480
528
|
//#endregion
|
|
481
529
|
//#region src/components/Map/MapCursorCoords.tsx
|
|
482
|
-
var W = /* @__PURE__ */ e(n(), 1),
|
|
483
|
-
function
|
|
484
|
-
let { canvas: t } = e, n =
|
|
530
|
+
var W = /* @__PURE__ */ e(n(), 1), G = 2;
|
|
531
|
+
function Ye(e) {
|
|
532
|
+
let { canvas: t } = e, n = N(), r = a(), i = (0, W.useCallback)(() => r("cursor", void 0), [r]), o = (0, W.useEffectEvent)((e) => {
|
|
485
533
|
if (!e.isPrimary) return;
|
|
486
534
|
let t = n.canvasToPlan({
|
|
487
535
|
x: e.offsetX,
|
|
488
536
|
y: e.offsetY
|
|
489
537
|
});
|
|
490
|
-
r("cursor", t ?
|
|
538
|
+
r("cursor", t ? Ze(t, Xe()) : void 0);
|
|
491
539
|
});
|
|
492
540
|
return (0, W.useEffect)(() => {
|
|
493
541
|
let e = t.current;
|
|
@@ -498,25 +546,25 @@ function Xe(e) {
|
|
|
498
546
|
};
|
|
499
547
|
}, [t, i]), null;
|
|
500
548
|
}
|
|
501
|
-
function
|
|
502
|
-
let e = s.layerStore.layers.find((e) => e.visible && (e.mode ===
|
|
549
|
+
function Xe() {
|
|
550
|
+
let e = s.layerStore.layers.find((e) => e.visible && (e.mode === re.TurnedOn || e.mode === re.TurnedOff));
|
|
503
551
|
return (e == null ? void 0 : e.name) || null;
|
|
504
552
|
}
|
|
505
|
-
function
|
|
506
|
-
let n = `[${e.x.toFixed(
|
|
553
|
+
function Ze(e, t) {
|
|
554
|
+
let n = `[${e.x.toFixed(G)}, ${e.y.toFixed(G)}]`;
|
|
507
555
|
return t ? `${n} · layer ${t}` : n;
|
|
508
556
|
}
|
|
509
557
|
//#endregion
|
|
510
558
|
//#region src/components/Map/MapViewport.tsx
|
|
511
|
-
function
|
|
512
|
-
let e =
|
|
559
|
+
function Qe() {
|
|
560
|
+
let e = N(), t = (0, W.useRef)({ api: e }), [n] = (0, W.useState)(() => ue(t));
|
|
513
561
|
return (0, W.useLayoutEffect)(() => {
|
|
514
562
|
t.current = { api: e };
|
|
515
|
-
}), (0, W.useEffect)(() => (
|
|
563
|
+
}), (0, W.useEffect)(() => (le(n), () => le(void 0)), [n]), null;
|
|
516
564
|
}
|
|
517
565
|
//#endregion
|
|
518
566
|
//#region src/components/Map/traffic/UpdateQueue.ts
|
|
519
|
-
var
|
|
567
|
+
var $e = class {
|
|
520
568
|
constructor() {
|
|
521
569
|
this.queue = [], this.isProcessing = !1, this.rafId = null, this.CHUNK_SIZE = 100, this.TIME_BUDGET = 4;
|
|
522
570
|
}
|
|
@@ -558,7 +606,7 @@ var et = class {
|
|
|
558
606
|
destroy() {
|
|
559
607
|
this.rafId !== null && (cancelAnimationFrame(this.rafId), this.rafId = null), this.queue = [], this.isProcessing = !1;
|
|
560
608
|
}
|
|
561
|
-
},
|
|
609
|
+
}, K = 49, et = `hsl(257, 76%, ${K}%)`, tt = `hsl(339.903, 82%, ${K}%)`, nt = `hsl(257, 76%, ${Math.round(K * 1.82)}%)`, q = 4, rt = q, it = "U", at = "R", ot = "S", st = "P", ct = class {
|
|
562
610
|
constructor() {
|
|
563
611
|
this._state = [[]], this.index = 0, this.pointHashSet = /* @__PURE__ */ new Set(), this.locked = !1, this.storageKey = "expofp_build_route_state", this._selected = 0;
|
|
564
612
|
}
|
|
@@ -701,12 +749,12 @@ Enable/Disable Preview: Press ${st}.
|
|
|
701
749
|
}
|
|
702
750
|
};
|
|
703
751
|
function lt({ enabled: e, scene: t }) {
|
|
704
|
-
let n = (0, W.useRef)(!1), r = (0, W.useRef)(), i = (0, W.useMemo)(() => E(q,
|
|
752
|
+
let n = (0, W.useRef)(!1), r = (0, W.useRef)(), i = (0, W.useMemo)(() => E(q, et), []), a = (0, W.useMemo)(() => E(q, tt), []), o = (0, W.useMemo)(() => new ct(), []), s = (0, W.useRef)(new $e()), c = (0, W.useMemo)(() => {
|
|
705
753
|
if (!t) return {};
|
|
706
754
|
let e = t.rootLayer.children;
|
|
707
755
|
return {
|
|
708
|
-
linesLayer: e.find((e) => e.name ===
|
|
709
|
-
pointsLayer: e.find((e) => e.name ===
|
|
756
|
+
linesLayer: e.find((e) => e.name === pe),
|
|
757
|
+
pointsLayer: e.find((e) => e.name === me)
|
|
710
758
|
};
|
|
711
759
|
}, [t]), l = (0, W.useCallback)(() => {
|
|
712
760
|
if (!c || !i || !a) return;
|
|
@@ -728,11 +776,11 @@ function lt({ enabled: e, scene: t }) {
|
|
|
728
776
|
p0: t,
|
|
729
777
|
p1: n
|
|
730
778
|
},
|
|
731
|
-
color: u ?
|
|
779
|
+
color: u ? et : nt,
|
|
732
780
|
width: rt
|
|
733
781
|
});
|
|
734
782
|
}
|
|
735
|
-
d.length ? e.children = d : e.children.length = 0, s.current.add(() =>
|
|
783
|
+
d.length ? e.children = d : e.children.length = 0, s.current.add(() => k(t, e)), o.instruct(), o.log(JSON.stringify(o.points));
|
|
736
784
|
}, [
|
|
737
785
|
o,
|
|
738
786
|
c,
|
|
@@ -779,8 +827,8 @@ function lt({ enabled: e, scene: t }) {
|
|
|
779
827
|
let { pointsLayer: i } = c;
|
|
780
828
|
return r.current = (t = (n = m()) == null ? void 0 : n.state().pixelSize) == null ? 1 : t, o.execute(() => {
|
|
781
829
|
o.restore(), l();
|
|
782
|
-
}), i.onScale = ({ pixelSize: e }) => d(e), s.current.add(() =>
|
|
783
|
-
window.removeEventListener("keyup", u),
|
|
830
|
+
}), i.onScale = ({ pixelSize: e }) => d(e), s.current.add(() => k(i)), ae(f), window.addEventListener("keyup", u), () => {
|
|
831
|
+
window.removeEventListener("keyup", u), ae(), i.onScale = void 0, s.current.destroy();
|
|
784
832
|
};
|
|
785
833
|
}, [
|
|
786
834
|
e,
|
|
@@ -796,7 +844,7 @@ function lt({ enabled: e, scene: t }) {
|
|
|
796
844
|
//#region src/components/Map/traffic/useManageTraffic.ts
|
|
797
845
|
var J = 2, ut = J * 3.5, Y = J * 12, dt = Y * .7, ft = 8, pt = "transport_locations", mt = 150, ht = "#a4aab6", gt = 1e3, _t = 2e4, vt = 500;
|
|
798
846
|
function yt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
799
|
-
let o = (0, W.useRef)(window.devicePixelRatio), s = (0, W.useRef)(/* @__PURE__ */ new Map()), c = (0, W.useRef)(/* @__PURE__ */ new Map()), l = (0, W.useRef)(null), u = (0, W.useRef)(null), d = (0, W.useRef)(0), f = (0, W.useRef)(1), p = (0, W.useRef)(new
|
|
847
|
+
let o = (0, W.useRef)(window.devicePixelRatio), s = (0, W.useRef)(/* @__PURE__ */ new Map()), c = (0, W.useRef)(/* @__PURE__ */ new Map()), l = (0, W.useRef)(null), u = (0, W.useRef)(null), d = (0, W.useRef)(0), f = (0, W.useRef)(1), p = (0, W.useRef)(new $e()), h = (0, W.useRef)(/* @__PURE__ */ new Map()), g = (0, W.useRef)(gt), _ = (0, W.useRef)(/* @__PURE__ */ new Map()), v = (0, W.useRef)(void 0);
|
|
800
848
|
(0, W.useEffect)(() => {
|
|
801
849
|
if (!e || !n) return;
|
|
802
850
|
let y = !1, b, x = n.rootLayer.children, S = c.current, C = s.current, w = p.current;
|
|
@@ -824,7 +872,7 @@ function yt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
824
872
|
scale: window.devicePixelRatio
|
|
825
873
|
}));
|
|
826
874
|
});
|
|
827
|
-
let p =
|
|
875
|
+
let p = ye(), g = x.filter((e) => p.test(e.name)), v = be(), b = x.filter((e) => v.test(e.name));
|
|
828
876
|
a.routes.slice(0, g.length).forEach(({ id: e, color: t, path: n, stops: r, hiddenPoints: i }, a) => {
|
|
829
877
|
h.current.set(e, n);
|
|
830
878
|
let s = g[a];
|
|
@@ -842,7 +890,7 @@ function yt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
842
890
|
width: J
|
|
843
891
|
});
|
|
844
892
|
}
|
|
845
|
-
s.children.length && w.add(() =>
|
|
893
|
+
s.children.length && w.add(() => k(s));
|
|
846
894
|
}
|
|
847
895
|
let u = b[a], d = l.get(t);
|
|
848
896
|
u && d && r != null && r.length && (r.forEach((e) => {
|
|
@@ -850,14 +898,14 @@ function yt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
850
898
|
source: d,
|
|
851
899
|
bounds: I(e.x, e.y, d.width, d.height, o.current)
|
|
852
900
|
});
|
|
853
|
-
}), u.children.length && w.add(() =>
|
|
901
|
+
}), u.children.length && w.add(() => k(u)));
|
|
854
902
|
});
|
|
855
|
-
let T = x.find((e) => e.name ===
|
|
903
|
+
let T = x.find((e) => e.name === R);
|
|
856
904
|
if (!T) {
|
|
857
|
-
console.warn(`useManageTraffic: the scene has no "${
|
|
905
|
+
console.warn(`useManageTraffic: the scene has no "${R}" layer`);
|
|
858
906
|
return;
|
|
859
907
|
}
|
|
860
|
-
let
|
|
908
|
+
let A = /* @__PURE__ */ new Map();
|
|
861
909
|
T.onScale = ({ pixelSize: e }) => {
|
|
862
910
|
o.current = bt(e);
|
|
863
911
|
let t = [];
|
|
@@ -873,8 +921,8 @@ function yt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
873
921
|
e.bounds = I(e.bounds.center.x, e.bounds.center.y, n.width, n.height, o.current, e.bounds.rotation), t.push(e);
|
|
874
922
|
}
|
|
875
923
|
return t;
|
|
876
|
-
}, w.add(() =>
|
|
877
|
-
|
|
924
|
+
}, w.add(() => k(T)), c.forEach((e, t) => {
|
|
925
|
+
A.set(t, Ct({
|
|
878
926
|
id: t,
|
|
879
927
|
width: Y,
|
|
880
928
|
height: Y,
|
|
@@ -882,17 +930,17 @@ function yt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
882
930
|
scale: window.devicePixelRatio
|
|
883
931
|
}));
|
|
884
932
|
});
|
|
885
|
-
let
|
|
933
|
+
let j = Ct({
|
|
886
934
|
id: "orphan",
|
|
887
935
|
width: Y,
|
|
888
936
|
height: Y,
|
|
889
937
|
color: ht,
|
|
890
938
|
scale: window.devicePixelRatio
|
|
891
|
-
}),
|
|
939
|
+
}), M = null;
|
|
892
940
|
try {
|
|
893
941
|
let e = await i(`${t}icons/bus-white.svg`);
|
|
894
942
|
if (y) return;
|
|
895
|
-
|
|
943
|
+
M = oe(e, dt, dt, window.devicePixelRatio);
|
|
896
944
|
} catch (e) {
|
|
897
945
|
console.error(e);
|
|
898
946
|
}
|
|
@@ -912,21 +960,21 @@ function yt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
912
960
|
}
|
|
913
961
|
let d = C.get(e), f = (l = C.get(Z(e))) == null ? null : l;
|
|
914
962
|
if (c && d && f) {
|
|
915
|
-
d.hidden = !0, f.hidden = !0, w.add(() =>
|
|
963
|
+
d.hidden = !0, f.hidden = !0, w.add(() => k(d, f));
|
|
916
964
|
return;
|
|
917
965
|
}
|
|
918
966
|
if (_.current.set(e, performance.now()), !d) {
|
|
919
967
|
var p;
|
|
920
|
-
let i = (p =
|
|
968
|
+
let i = (p = A.get(r)) == null ? j : p, c = {
|
|
921
969
|
source: i,
|
|
922
970
|
bounds: I(t, n, i.width, i.height, o.current, 0)
|
|
923
971
|
};
|
|
924
|
-
if (C.set(e, c),
|
|
972
|
+
if (C.set(e, c), M) {
|
|
925
973
|
let r = Z(e), i = {
|
|
926
|
-
source:
|
|
927
|
-
bounds: I(t, n,
|
|
974
|
+
source: M,
|
|
975
|
+
bounds: I(t, n, M.width, M.height, o.current, 0)
|
|
928
976
|
};
|
|
929
|
-
|
|
977
|
+
M.setAttribute("id", r), C.set(r, i), a.push(c, i);
|
|
930
978
|
} else a.push(c);
|
|
931
979
|
s = !0;
|
|
932
980
|
return;
|
|
@@ -961,11 +1009,11 @@ function yt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
961
1009
|
});
|
|
962
1010
|
S.set(e, t);
|
|
963
1011
|
}
|
|
964
|
-
}), s && w.add(() =>
|
|
1012
|
+
}), s && w.add(() => k(T));
|
|
965
1013
|
} catch (e) {
|
|
966
1014
|
console.error("handleSocketMessage", e);
|
|
967
1015
|
}
|
|
968
|
-
}, d.current = performance.now(), E(), window.addEventListener("online", D),
|
|
1016
|
+
}, d.current = performance.now(), E(), window.addEventListener("online", D), O(a.config ? (Number(a.config.vehicle_inactive_interval) || 20) * 1e3 : _t);
|
|
969
1017
|
} catch (e) {
|
|
970
1018
|
console.warn(e);
|
|
971
1019
|
}
|
|
@@ -982,7 +1030,7 @@ function yt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
982
1030
|
function D() {
|
|
983
1031
|
E();
|
|
984
1032
|
}
|
|
985
|
-
function
|
|
1033
|
+
function O(e) {
|
|
986
1034
|
clearInterval(v.current), !y && (v.current = window.setInterval(() => {
|
|
987
1035
|
let t = performance.now(), n = [], r = [];
|
|
988
1036
|
_.current.forEach((i, a) => {
|
|
@@ -991,14 +1039,14 @@ function yt({ permission: e, scene: n, dataJsonUrl: r, websocketUrl: a }) {
|
|
|
991
1039
|
o && (o.hidden = !0, r.push(o), n.push(a));
|
|
992
1040
|
let s = Z(a), c = C.get(s);
|
|
993
1041
|
c && (c.hidden = !0, r.push(c), n.push(s));
|
|
994
|
-
}), r.length && w.add(() =>
|
|
1042
|
+
}), r.length && w.add(() => k(...r)), n.forEach((e) => _.current.delete(e));
|
|
995
1043
|
}, e));
|
|
996
1044
|
}
|
|
997
1045
|
return () => {
|
|
998
1046
|
y = !0, clearTimeout(b);
|
|
999
1047
|
let e = l.current;
|
|
1000
1048
|
e && (e.onopen = null, e.onmessage = null, e.onclose = null, e.close(), l.current = null), u.current = null;
|
|
1001
|
-
let t = x.find((e) => e.name ===
|
|
1049
|
+
let t = x.find((e) => e.name === R);
|
|
1002
1050
|
t && (t.onScale = void 0), S.forEach((e) => e == null ? void 0 : e()), S.clear(), C.clear(), w.destroy(), window.removeEventListener("online", D), clearInterval(v.current);
|
|
1003
1051
|
};
|
|
1004
1052
|
}, [
|
|
@@ -1012,7 +1060,7 @@ function bt(e) {
|
|
|
1012
1060
|
return Math.min(e || window.devicePixelRatio, ft);
|
|
1013
1061
|
}
|
|
1014
1062
|
function xt(e, t) {
|
|
1015
|
-
return
|
|
1063
|
+
return se(e, t);
|
|
1016
1064
|
}
|
|
1017
1065
|
function St({ radius: e, scale: t, color: n }) {
|
|
1018
1066
|
let r = document.createElement("canvas"), i = r.getContext("2d");
|
|
@@ -1039,8 +1087,8 @@ function wt({ updateQueue: e, vehicle: t, vehicleFinery: n, x: r, y: i, scale: a
|
|
|
1039
1087
|
if (t.bounds = I(r, i, s.width, s.height, a, o), t.hidden = !1, n) {
|
|
1040
1088
|
var c, l;
|
|
1041
1089
|
let o = (c = (l = m()) == null ? void 0 : l.state().roll) == null ? 0 : c, s = n.source;
|
|
1042
|
-
n.bounds = I(r, i, s.width, s.height, a,
|
|
1043
|
-
} else e.add(() =>
|
|
1090
|
+
n.bounds = I(r, i, s.width, s.height, a, F(o)), n.hidden = !1, e.add(() => k(n, t));
|
|
1091
|
+
} else e.add(() => k(t));
|
|
1044
1092
|
}
|
|
1045
1093
|
function Q(e, t, n) {
|
|
1046
1094
|
return {
|
|
@@ -1093,7 +1141,7 @@ function Ot(e, t, n, r) {
|
|
|
1093
1141
|
n({
|
|
1094
1142
|
x: h.x + (g.x - h.x) * v,
|
|
1095
1143
|
y: h.y + (g.y - h.y) * v,
|
|
1096
|
-
angle:
|
|
1144
|
+
angle: se(h, g)
|
|
1097
1145
|
}), d < 1 ? a = requestAnimationFrame(c) : r && r();
|
|
1098
1146
|
};
|
|
1099
1147
|
return a = requestAnimationFrame(c), () => {
|
|
@@ -1151,4 +1199,4 @@ function Pt(e) {
|
|
|
1151
1199
|
return e < .5 ? 4 * e * e * e : 1 - (-2 * e + 2) ** 3 / 2;
|
|
1152
1200
|
}
|
|
1153
1201
|
//#endregion
|
|
1154
|
-
export { lt as a, Je as c, yt as i, We as l, jt as n,
|
|
1202
|
+
export { lt as a, Je as c, yt as i, We as l, jt as n, Qe as o, Mt as r, Ye as s, kt as t };
|