@expofp/floorplan 3.5.2 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{CookieConsent-SW2eXIC8.js → CookieConsent-D4hudhgN.js} +8 -8
- package/dist/browser/{Debug-t7OzIN-8.js → Debug-C6vAYMhX.js} +7 -7
- package/dist/browser/{Demo-DJ98mlUr.js → Demo-DtTuLI8Z.js} +11 -11
- package/dist/browser/{Free-B9JCPcnr.js → Free-CqdWCHcR.js} +11 -11
- package/dist/browser/{Gallery-CPBGS9q7.js → Gallery-8RDDPykf.js} +10 -10
- package/dist/browser/{GpsLoader-vcgurCKn.js → GpsLoader-B4FEU6gL.js} +42 -42
- package/dist/browser/{KioskStore-DzLhE0fK.js → KioskStore-phPgRGhj.js} +36 -36
- package/dist/browser/{MaplibreAdapter-CAGVMAol.js → MaplibreAdapter-CS16BDJC.js} +98 -98
- package/dist/browser/{Modal-DBVl72uz.js → Modal-D_X6o9Jg.js} +10 -10
- package/dist/browser/{PermissionNotice-BDny4W7h.js → PermissionNotice-B226CFBT.js} +7 -7
- package/dist/browser/{SetKioskMode-CjKFTXwj.js → SetKioskMode-BE0tkdDL.js} +11 -11
- package/dist/browser/{ShowKiosk-bwEsTLSP.js → ShowKiosk-SbRgpnQB.js} +10 -10
- package/dist/browser/{TouchHand-DFPQ2vE8.js → TouchHand-CzEqXotc.js} +4 -4
- package/dist/browser/{ViewerMenuPanel-DK-DJHgD.js → ViewerMenuPanel-CwOeHoJI.js} +12 -12
- package/dist/browser/{add-debug-secret-listener-ND2YIuwE.js → add-debug-secret-listener-DiNpUPIy.js} +1 -1
- package/dist/browser/{boolean-editor-BXVL077p.js → boolean-editor-B4fmO-H1.js} +9 -9
- package/dist/browser/{bootIntercom-DLTAHEbT.js → bootIntercom-78s2IZm1.js} +2 -2
- package/dist/browser/{browser-V3D46fyx.js → browser-D0xyTgL5.js} +2 -2
- package/dist/browser/bundle.json +59 -56
- package/dist/browser/{classnames-Dxv3Iqu-.js → classnames-BrYUjPEV.js} +2 -2
- package/dist/browser/{client-C1kJisHy.js → client-BFmngvOl.js} +4 -4
- package/dist/browser/{components-B8Qifx-N.js → components-C562ZBah.js} +1522 -1514
- package/dist/browser/{createWayfinding-C8Pmd2H5.js → createWayfinding-DK2PWhbe.js} +598 -614
- package/dist/browser/{debug-overlay-DWJkUc3u.js → debug-overlay-z6WXDPBn.js} +10 -10
- package/dist/browser/{debug-ui-jAj6--ux.js → debug-ui-sCW8RARU.js} +6 -6
- package/dist/browser/{dist-DUIasJnS.js → dist-B1wg_Vg-.js} +3 -3
- package/dist/browser/{dist-CPyShXna.js → dist-CRY34h6v.js} +5 -5
- package/dist/browser/{dist-BHV9ghY4.js → dist-DnAXhxh2.js} +6 -6
- package/dist/browser/{efp-debug-init-AR3Fvs_0.js → efp-debug-init-B_ntwOhP.js} +2 -2
- package/dist/browser/{enum-editor-FiZIrNXM.js → enum-editor-DbuXf8r8.js} +11 -11
- package/dist/browser/{event-not-found-BzPx68a_.js → event-not-found-CAmc16WN.js} +1 -1
- package/dist/browser/{exports-DlEzkzSC.js → exports-BD8GG1L5.js} +1 -1
- package/dist/browser/{favicon-Dobo0b59.js → favicon-sZdpacxH.js} +1 -1
- package/dist/browser/{fetch-retry.umd-CXT8SYkm.js → fetch-retry.umd-AjUp2dMf.js} +2 -2
- package/dist/browser/{flex-DGR_Loqd.js → flex-CCWA2Kd-.js} +5 -5
- package/dist/browser/{floorplan.loader-GMByEo0q.js → floorplan.loader-CCXe84-M.js} +48 -47
- package/dist/browser/{floorplan.ready-DTwVRPUA.js → floorplan.ready-VVqKSxrS.js} +232 -232
- package/dist/browser/{fuse-CoX8SCVF.js → fuse-B8HbR5wR.js} +2 -2
- package/dist/browser/{i18n-CONnsQk4.js → i18n-C4ccU4Uz.js} +570 -543
- package/dist/browser/icons/departure_inactive.svg +5 -0
- package/dist/browser/index.js +11 -11
- package/dist/browser/{jsx-runtime-iIXfJE8d.js → jsx-runtime-zxgo_t9B.js} +2 -2
- package/dist/browser/{lib-CAUtTowO.js → lib-B4liZrwq.js} +4 -4
- package/dist/browser/{main-5p-fstPx.js → main-Bzb6dYP_.js} +1 -1
- package/dist/browser/{mobx-CP3094rF.js → mobx-COHcSxbj.js} +8 -8
- package/dist/browser/{particles.min-BvP0Ecuj.js → particles.min-B07pddyr.js} +2 -2
- package/dist/browser/{prop-types-CtPkc8Dm.js → prop-types-S_wOlY3G.js} +2 -2
- package/dist/browser/{react-dom-Bi44rMnr.js → react-dom-uOgI3fJi.js} +3 -3
- package/dist/browser/{react-DgvgFS2Z.js → react-v-0l0dCU.js} +2 -2
- package/dist/browser/{reset-all-settings-CB8d29KN.js → reset-all-settings-DP_XEkZl.js} +7 -7
- package/dist/browser/{rolldown-runtime-D0nkOxqx.js → rolldown-runtime-fX7LzKTd.js} +1 -1
- package/dist/browser/{settings-CTPClT89.js → settings-CvUKxJUO.js} +2 -2
- package/dist/browser/{settings-item-DFxxEXOa.js → settings-item-9XX6a5Rl.js} +6 -6
- package/dist/browser/{storage-DvQIEAC7.js → storage-I3dC3nwm.js} +5 -5
- package/dist/browser/{store-BlZ4xT_G.js → store-DZbEm-97.js} +5746 -5681
- package/dist/browser/{string-editor-YIMEKgRw.js → string-editor-CC5dLlZp.js} +7 -7
- package/dist/browser/{theme-Gip68cNV.js → theme-CFDTZaHO.js} +8 -8
- package/dist/browser/{ui-CZUswZut.js → ui-R-PKHh7O.js} +8 -8
- package/dist/browser/{useRenderTarget-DTeVFvZz.js → useRenderTarget-Da6-PWjd.js} +4 -4
- package/dist/esm/components/Kiosk/integrateKiosk.js +1 -1
- package/dist/esm/components/Map/Map.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-all.js +1 -1
- package/dist/esm/components/Wayfinding.js +1 -1
- package/dist/esm/services/routing.js +1 -1
- package/dist/esm/store/RootStore.js +1 -1
- package/dist/esm/store/RoutePlannerStore.js +1 -1
- package/dist/esm/store/RouteStore.d.ts +15 -6
- package/dist/esm/store/RouteStore.js +1 -1
- package/dist/esm/store/UIState.d.ts +1 -1
- package/dist/esm/store/UIState.js +1 -1
- package/dist/esm/types.d.ts +1 -1
- package/dist/esm/utils/loadIcons.js +1 -1
- package/dist/esm/wayfinding/adapters/arbitraryPoint.d.ts +28 -0
- package/dist/esm/wayfinding/adapters/arbitraryPoint.js +1 -0
- package/dist/esm/wayfinding/adapters/boothToEndpoint.d.ts +3 -3
- package/dist/esm/wayfinding/adapters/boothToEndpoint.js +1 -1
- package/dist/esm/wayfinding/adapters/canvasIconProvider.js +1 -1
- package/dist/esm/wayfinding/adapters/iconProvider.d.ts +1 -1
- package/dist/esm/wayfinding/adapters/index.d.ts +2 -0
- package/dist/esm/wayfinding/adapters/index.js +1 -1
- package/dist/esm/wayfinding/bindMobxReactions.d.ts +9 -1
- package/dist/esm/wayfinding/bindMobxReactions.js +1 -1
- package/dist/esm/wayfinding/core/createWayfindingEngine.js +1 -1
- package/dist/esm/wayfinding/core/geometry/projectPointOnSegment.d.ts +23 -0
- package/dist/esm/wayfinding/core/geometry/projectPointOnSegment.js +1 -0
- package/dist/esm/wayfinding/core/index.d.ts +6 -3
- package/dist/esm/wayfinding/core/index.js +1 -1
- package/dist/esm/wayfinding/core/position/gpsThreshold.d.ts +9 -0
- package/dist/esm/wayfinding/core/position/gpsThreshold.js +1 -1
- package/dist/esm/wayfinding/core/position/rerouteController.d.ts +10 -0
- package/dist/esm/wayfinding/core/position/rerouteController.js +1 -0
- package/dist/esm/wayfinding/core/position/snapToRoute.d.ts +2 -2
- package/dist/esm/wayfinding/core/position/snapToRoute.js +1 -1
- package/dist/esm/wayfinding/core/routing/{findNearestGraphPoint.d.ts → graphPointResolvers.d.ts} +1 -3
- package/dist/esm/wayfinding/core/routing/graphPointResolvers.js +1 -0
- package/dist/esm/wayfinding/core/routing/resolveWaypointCandidates.d.ts +17 -3
- package/dist/esm/wayfinding/core/routing/resolveWaypointCandidates.js +1 -1
- package/dist/esm/wayfinding/core/types.d.ts +5 -6
- package/dist/esm/wayfinding/createWayfinding.js +1 -1
- package/dist/esm/wayfinding/layers.d.ts +1 -0
- package/dist/esm/wayfinding/layers.js +1 -1
- package/dist/esm/wayfinding/runtime/createWayfindingRuntime.js +1 -1
- package/dist/esm/wayfinding/runtime/endpointView.d.ts +4 -1
- package/dist/esm/wayfinding/runtime/endpointView.js +1 -1
- package/dist/esm/wayfinding/runtime/positionTrailView.d.ts +14 -20
- package/dist/esm/wayfinding/runtime/positionTrailView.js +1 -1
- package/dist/esm/wayfinding/runtime/positionView.d.ts +1 -0
- package/dist/esm/wayfinding/runtime/positionView.js +1 -1
- package/dist/esm/wayfinding/runtime/routeRenderData.d.ts +1 -1
- package/dist/esm/wayfinding/runtime/types.d.ts +1 -0
- package/package.json +3 -3
- package/dist/esm/RouteCutIn.d.ts +0 -23
- package/dist/esm/RouteCutIn.js +0 -1
- package/dist/esm/wayfinding/core/position/shouldReroute.d.ts +0 -3
- package/dist/esm/wayfinding/core/position/shouldReroute.js +0 -1
- package/dist/esm/wayfinding/core/routing/findNearestGraphPoint.js +0 -1
- package/dist/esm/wayfinding/utils/findBoothInRadius.d.ts +0 -4
- package/dist/esm/wayfinding/utils/findBoothInRadius.js +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
try {
|
|
3
3
|
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
|
-
e.SENTRY_RELEASE = { id: "3.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.6.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "c13b5d2b-c064-4095-8a35-7ce6c1158176", e._sentryDebugIdIdentifier = "sentry-dbid-c13b5d2b-c064-4095-8a35-7ce6c1158176");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { t as n } from "./jsx-runtime-
|
|
12
|
-
import { D as r, i, l as a, n as o, s, u as c, y as l } from "./flex-
|
|
13
|
-
import { t as u } from "./classnames-
|
|
14
|
-
import { t as d } from "./settings-item-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-fX7LzKTd.js";
|
|
10
|
+
import { t } from "./react-v-0l0dCU.js";
|
|
11
|
+
import { t as n } from "./jsx-runtime-zxgo_t9B.js";
|
|
12
|
+
import { D as r, i, l as a, n as o, s, u as c, y as l } from "./flex-CCWA2Kd-.js";
|
|
13
|
+
import { t as u } from "./classnames-BrYUjPEV.js";
|
|
14
|
+
import { t as d } from "./settings-item-9XX6a5Rl.js";
|
|
15
15
|
//#region ../../node_modules/.pnpm/@radix-ui+themes@3.3.0_@types+react-dom@19.2.3_@types+react@19.2.17__@types+react@19.2._925f851475345a9e5e368d312bb98178/node_modules/@radix-ui/themes/dist/esm/components/text-field.props.js
|
|
16
16
|
var f = {
|
|
17
17
|
size: {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
try {
|
|
3
3
|
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
|
-
e.SENTRY_RELEASE = { id: "3.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.6.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "14cfe74b-e711-4201-812b-ad94b4330a84", e._sentryDebugIdIdentifier = "sentry-dbid-14cfe74b-e711-4201-812b-ad94b4330a84");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { t as n } from "./jsx-runtime-
|
|
12
|
-
import { t as r } from "./react-dom-
|
|
13
|
-
import { C as i, E as a, O as o, T as s, _ as c, o as l, v as u, w as d } from "./flex-
|
|
14
|
-
import { c as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./dist-
|
|
15
|
-
import { t as y } from "./classnames-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-fX7LzKTd.js";
|
|
10
|
+
import { t } from "./react-v-0l0dCU.js";
|
|
11
|
+
import { t as n } from "./jsx-runtime-zxgo_t9B.js";
|
|
12
|
+
import { t as r } from "./react-dom-uOgI3fJi.js";
|
|
13
|
+
import { C as i, E as a, O as o, T as s, _ as c, o as l, v as u, w as d } from "./flex-CCWA2Kd-.js";
|
|
14
|
+
import { c as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./dist-DnAXhxh2.js";
|
|
15
|
+
import { t as y } from "./classnames-BrYUjPEV.js";
|
|
16
16
|
//#region ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.2.3_@types+react@19.2.17__@ty_070bcfa32421a5876e7dcb93369fcbee/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
17
17
|
var b = /* @__PURE__ */ e(r(), 1), x = /* @__PURE__ */ e(t(), 1), S = n(), C = Object.freeze({
|
|
18
18
|
position: "absolute",
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
try {
|
|
3
3
|
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
|
-
e.SENTRY_RELEASE = { id: "3.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.6.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "5091f250-052d-4365-8535-fbf8bf11a38b", e._sentryDebugIdIdentifier = "sentry-dbid-5091f250-052d-4365-8535-fbf8bf11a38b");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { a as t, r as n } from "./reset-all-settings-
|
|
11
|
-
import { t as r } from "./jsx-runtime-
|
|
12
|
-
import "./settings-
|
|
13
|
-
import { t as i } from "./browser-
|
|
14
|
-
import { t as a } from "./add-debug-secret-listener-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-fX7LzKTd.js";
|
|
10
|
+
import { a as t, r as n } from "./reset-all-settings-DP_XEkZl.js";
|
|
11
|
+
import { t as r } from "./jsx-runtime-zxgo_t9B.js";
|
|
12
|
+
import "./settings-CvUKxJUO.js";
|
|
13
|
+
import { t as i } from "./browser-D0xyTgL5.js";
|
|
14
|
+
import { t as a } from "./add-debug-secret-listener-DiNpUPIy.js";
|
|
15
15
|
//#region ../debug/src/lib/ui/render-debug-ui.tsx
|
|
16
16
|
var o = /* @__PURE__ */ e(i(), 1), s = r(), c = !1;
|
|
17
17
|
function l() {
|
|
@@ -26,7 +26,7 @@ function l() {
|
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
let i = async (t) => {
|
|
29
|
-
let { DebugUi: n } = await import("./debug-ui-
|
|
29
|
+
let { DebugUi: n } = await import("./debug-ui-sCW8RARU.js"), { createRoot: i } = await import("./client-BFmngvOl.js").then((t) => /* @__PURE__ */ e(t.default, 1)), a = document.createElement("div");
|
|
30
30
|
document.body.appendChild(a), i(a).render(/* @__PURE__ */ (0, s.jsx)(n, {
|
|
31
31
|
useDebugButtonState: r.useState,
|
|
32
32
|
open: t
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
try {
|
|
3
3
|
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
|
-
e.SENTRY_RELEASE = { id: "3.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.6.0" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "984e0491-e905-4403-8383-c156857f4f3c", e._sentryDebugIdIdentifier = "sentry-dbid-984e0491-e905-4403-8383-c156857f4f3c");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { s as n } from "./store-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-fX7LzKTd.js";
|
|
10
|
+
import { t } from "./react-v-0l0dCU.js";
|
|
11
|
+
import { s as n } from "./store-DZbEm-97.js";
|
|
12
12
|
//#region src/utils/getRenderTargetFromRoot.ts
|
|
13
13
|
var r = /* @__PURE__ */ e(t(), 1);
|
|
14
14
|
function i(e) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{runInAction as
|
|
1
|
+
import{runInAction as r,when as n}from"mobx";import e from"../../store";export function integrateKioskIntoMap(t,a){t&&r(()=>{e.uiState.setKioskData(t),e.uiState.kiosk=a,e.uiState.setMapSettings({centerxy:`${t.mapCenterX},${t.mapCenterY}`,z:t.z,bearing:t.mapRollDegrees}),t.mapPtScale&&e.uiState.changeZoom(t.mapInitialPtScale/t.mapPtScale)})}export function integrateKioskIntoWf(t){t&&(t.z!=null&&e.fp.activateFloor({name:t.z.toString()}),n(()=>!!e.uiState.selectedRoute,()=>{const a=e.uiState.selectedRoute;a.to&&!a.from&&e.routeStore.selectRoute(a,!1,!0)}))}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as k,jsxs as N,Fragment as
|
|
1
|
+
import{jsx as k,jsxs as N,Fragment as ee}from"react/jsx-runtime";import{useObserver as oe}from"mobx-react-lite";import te from"classnames";import{useEffect as re,useMemo as ne,useRef as S,useState as ie}from"react";import{observable as ae,reaction as se}from"mobx";import a,{boothStore as le,layersStore as h,uiState as o}from"../../store";import me from"./drawing/config/config-all";import{useReaction as d}from"../../utils/mobx";import{LayerMode as R}from"../../store/LayerStore";import p from"../../tools/settings";import{Rect as x}from"./drawing/config/Rect";import L from"../../core/Rect";import{Exhibitor as O}from"../../store/ExhibitorStore";import{BoothBase as X}from"../../store/BoothStore";import{CurrentPosition as ce,Route as fe}from"../../store/RouteStore";import{Category as de}from"../../store/CategoryStore";import B from"../../tools/logger";import{svgArea as A}from"../../data/svg";import{configMarkers as ue,getMarkerFromClick as pe}from"./drawing/config/config-markers";import he from"color";import{createWayfinding as ve}from"../../wayfinding/createWayfinding";import{createSceneDef as ye}from"../../renderer";import{convertGpsToLocal as be}from"../../utils/gps";import{fpGeo as ge}from"../../data/fpGeo";import y from"../../utils/is-debug";import we from"../../ui/Draggable";import{useBuildRoute as Se}from"./traffic/useBuildRoute";import{useManageTraffic as Re}from"./traffic/useManageTraffic";import{DEBUG_STORAGE_KEY as j}from"../../constants";import{isPathwayLayer as U}from"../../utils/is-pathway-layer";import Z from"./booth-by-xy";import{mapRollSetting as $}from"../../renderer";import{loadLayersImages as xe}from"./drawing/config/loadBoothsImages";import{areLayersEnabled as Ce}from"../../utils/areLayersEnabled";import{pickDefaultScene as K,pickDefaultScenePoint as Te}from"../../renderer/engine-core/defs";import{applyVenueDimValue as ke,createDimmingAnimator as Le}from"../../utils/dimming";const V=Number.isFinite(p.maxZoom);export default function Be(){let M={};const W="#ebebeb",v=S(),b=ne(()=>ae({moving:!1,prevLevel:a.layerStore.layers.find(e=>!e.frozen&&e.visible)}),[]),l=a.rendererService,C=S(Le(e=>ke(l,e)));let s;const g=S(null),E=S(null);let P=null,I=null,_=!1;function z(){h.layers.forEach(e=>{e.configured=!1,e.children=[],e.loaded=!1})}const[H,q]=ie(()=>typeof window<"u"&&window.localStorage?localStorage.getItem(j)!=="false":!0);d(()=>a.routeStore.currentRouteLayer,()=>{if(!l.scene||b.prevLevel===a.routeStore.currentRouteLayer)return;const e=l.scene.rootLayer.children.filter(t=>a.layerStore.floors.some(n=>t.name.includes(n.name)));let r=a.routeStore.currentRouteLayer.name;if(!e.find(t=>t.name===r))return;const i=e?.map(t=>(t.name===r&&(t.hidden=!1),t.name===b.prevLevel?.name&&(t.hidden=!0),t));b.prevLevel=a.routeStore.currentRouteLayer,l.update(...i)}),d(()=>o.centerMap,()=>{!o.centerMap||a.maplibreStore.showMaplibre||(s.controls.resetCamera({zoom:!!(o.list.type==="search"&&o.list.text)}),o.centerMap=!1)}),re(()=>{if(!v.current)return;async function e(){z(),h.layersLoaded=!1;let r={};try{if(y){const t=document.createElement("canvas").getContext("webgl2"),n=t&&t.getExtension("EXT_disjoint_timer_query_webgl2"),m=(await import("stats-gl")).default,f=new m({trackGPU:n,horizontal:!0}),u=E.current;if(!u)throw new Error("memoryInfoPanel not found.");f.dom.style.position="relative",u.style.width=`${90*(n?3:2)}px`,u.style.height="48px",u.appendChild(f.dom),r={stats:f,memoryInfoPanel:u}}}catch(i){console.error(i)}s=l.create({canvas:v.current,ui:r}),g.current=s,se(()=>o.canvasVisibleRectPx,(i,t)=>{i&&(s.visibleRect=x.fromCoreRect(i)),t.dispose()},{fireImmediately:!0}),me(l).then(i=>{if(_||g.current!==s)return;y&&console.log("Renderer settings",s);const t=he(p.backgroundColor==="none"?W:p.backgroundColor).string();M=ye(i,x.fromCoreRect(A),t),l.start(M),C.current.setTarget(o.dimmed,{immediate:!0}),$(s,a.fp.enableRotation?1:0),V&&s.viewport.setMaxZoom(p.maxZoom),h.layersLoaded=!0,a.fp.onFpConfigured&&a.fp?.onFpConfigured(),P=ve(l),I=ue(l),xe(l)}),s.events.addEventListener("pointer:move",({data:i})=>{if(o.setKioskModeEnabled)return;const{point:t,defs:n}=K(i),c=Z(t.x,t.y),m=D(n[0]);o.hoveredBooth=c||m}),s.events.addEventListener("pointer:out",()=>{o.setKioskModeEnabled||(o.hoveredBooth=null)}),s.events.addEventListener("pointer:click",({data:i})=>{if(!o?.rootElement)return;window.__resett&&window.__resett(),o.overlayPosition==="bottom"&&o.overlaySize==="full"&&a.showMap();const{point:t,defs:n}=K(i),{x:c,y:m}=t;if(o.onGetCoordsClick){const w=a.layerStore.layers.find(T=>T.visible&&(T.mode===R.TurnedOn||T.mode===R.TurnedOff));o.onGetCoordsClick({x:c,y:m,z:w?.name||null})}if(o.setKioskModeEnabled)return;if(o.onMarkerClick){const w=pe(c,m,l.scale);y&&console.log("marker",w),o.onMarkerClick(w)}const f=Z(t.x,t.y),u=D(n[0]);y&&console.log("boothIdFromClientXy",f,"boothByShape",u,"pointer:click point",t),a.clickBooth(f||u)}),s.events.addEventListener("navigation:change",()=>window.__resett&&window.__resett())}return e(),a.fp.getCenterCoordinates=Q,()=>J()},[]);function J(){_=!0,C.current.stop(),P?.(),I?.(),z(),h.layersLoaded=!1,l.disposeIfCurrent(g.current),g.current=null}function Q(){const e=v.current;if(!v.current)throw new Error("Canvas not ready");const r=Te(s.viewport.canvasToSvg({x:e.clientWidth/2,y:e.clientHeight/2})),t=a.layerStore.visible.find(n=>n.mode===R.TurnedOff||n.mode===R.TurnedOn)?.name||null;return{...r,z:t}}function D(e){return!e||!e.shape?null:le.booths.find(r=>r.shapes?.find(i=>i.shape==e.shape))}d(()=>o.zoomBy,()=>{if(!o.zoomBy||a.maplibreStore.showMaplibre)return;const e=o.zoomBy;s.controls.zoomBy(e),o.zoomBy=null}),d(()=>o.dimmed,e=>{C.current.setTarget(e)}),d(()=>o.details,()=>{if(!o.onDetails)return;if(!o.details){o.onDetails(null);return}var e=o.details;if(p.EXPO==="wineparis"&&(e instanceof O&&(e=e.booths[0]),!e))return;let r=null,i=[];e instanceof O?(r="exhibitor",i=e.booths.map(n=>n.name).sort((n,c)=>n==a.routeStore.tempToBooth?.name?-1:c==a.routeStore.tempToBooth?.name?1:0)):e instanceof X?(r="booth",i=[e.name]):e instanceof fe?(r="route",i=[e.from?.name,e.to?.name].filter(n=>!!n)):e instanceof de&&(r="category",i=e.exhibitors.map(n=>n.booths.map(c=>c.name)).flat());var t={type:r,name:e?.name,id:e?.id,externalId:e?.externalId,boothsNames:i};o.onDetails({...t,...r==="route"?{routeInfo:a.routeStore.routeInfo}:{}})}),d(()=>o.canvasVisibleRectPx,e=>{l.renderer&&(l.renderer.visibleRect=x.fromCoreRect(e))},{fireImmediately:!0}),d(()=>o.moveToRect,()=>{!o.moveToRect||a.maplibreStore.showMaplibre||(o.moveToRect&&o.moveToRect.h!==1/0&&o.moveToRect.w!==1/0&&o.moveToRect.h>0&&o.moveToRect.w>0&&G(o.moveToRect),o.moveToRect=null)}),d(()=>o.rollReset,e=>{e&&(s.controls.resetCamera({roll:!0}),o.rollReset=!1)}),d(()=>o.moveToBooths,()=>{if(B.log("this.moveToBooths",o.moveToBooths),!o.moveToBooths||a.maplibreStore.showMaplibre)return;B.log("watched moveToBooths",o.moveToBooths);const e=o.moveToBooths.filter(r=>r.rect).map(r=>r.rect);e.length!==0&&(G(L.fromMultiple(e)),o.moveToBooths=null)}),d(()=>o.mapSettings,({zoomtime:e,center:r,centerxy:i,bearing:t,roll:n,z:c})=>{if(!(a.maplibreStore.showMaplibre||!l.renderer))try{e&&e!==o.defaultMapSettings.zoomtime&&l.renderer.controls.configure({zoomTime:e/1e3}),a.fp.enableRotation&&$(s,n);let m;if(r){const f=r.split(",").map(Number),u=new ce(void 0,void 0,void 0,void 0,f[0],f[1]);m=be(u,ge.properties.config)}else if(i){const f=i.split(",").map(Number);m={x:f[0],y:f[1]}}c&&a.fp.activateFloor({name:c}),(m?.x||m?.y)&&l.renderer.controls.panTo(m.x,m.y),Number.isFinite(t)&&l.renderer.controls.rollTo(t)}catch(m){B.error("Error in mapSettings reaction",m)}}),Se({enabled:h.layersLoaded&&o.buildRoute,rendererService:l});const F="routes-api.expofp.com";Re({permission:h.layersLoaded,rendererService:l,dataJsonUrl:`https://${F}/v1/routes?expo=${p.EXPO}`,websocketUrl:`wss://${F}/locations?expo=${p.EXPO}`}),d(()=>a.layerStore.visible,e=>{if(!l.scene)return;const r=e.filter(n=>U(n.name)),t=l.scene.rootLayer.children.filter(n=>U(n.name));t.forEach(n=>{n.hidden=!r.find(c=>c.name===n.name)}),l.update(...t)});function G(e){let r=e;const i=Y(e,A),t=o.selectedRoute?.from,n=t instanceof X?t.layer?.name:t?.layer;o.kioskData&&(!Ce()||n===a.routeStore.currentRouteLayer?.name)&&(r=L.fromMultiple([e,L.fromXywh(o.kioskData.x,o.kioskData.y,1,1)]));const c=x.fromCoreRect(r),m={paddingPercent:i,maxZoom:V?void 0:10};if(o.shouldShiftMapRect){s.visibleRect.min={...s.visibleRect.min,x:s.visibleRect.min.x+o.overlayWidthPx},s.visibleRect=s.visibleRect;try{s.controls.zoomTo(c,m)}finally{s.visibleRect.min={...s.visibleRect.min,x:s.visibleRect.min.x-o.overlayWidthPx}}}else s.controls.zoomTo(c,m)}function Y(e,r){return!e||!r?0:(e.w*e.h/(r.h*r.w)>.1?15:25)/100}return oe(()=>N(ee,{children:[k("canvas",{style:{width:"100%",height:"100%"},ref:v,className:te({map:!0,moving:b.moving,hidden:a.maplibreStore.showMaplibre}),children:"ExpoFP.com"}),y&&H&&N(we,{className:"debug-fps",children:[k("div",{ref:E}),k("button",{onClick:()=>{typeof window<"u"&&window.localStorage&&localStorage.setItem(j,"false"),q(!1)},style:{padding:"4px 8px",fontSize:"11px",cursor:"pointer",backgroundColor:"#333",color:"#fff",border:"1px solid #555",width:"100%"},children:"Hide debug"})]})]}))}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import L from"../../../../store";import
|
|
1
|
+
import L from"../../../../store";import p from"./config-load-layer";import{createLayerDef as r}from"../../../../renderer";import{WF_CURRENT_POSITION_LAYER_NAME as d,WF_LINES_ANIMATED_LAYER_NAME as N,WF_LINES_LAYER_NAME as R,WF_POINTS_LAYER_NAME as u,WF_TRAIL_LAYER_NAME as h}from"../../../../wayfinding/layers";import{MARKER_LAYER_NAME as M}from"./config-markers";import{createTrafficLayers as w}from"../../traffic/trafficLayers";import{configBoothsBadges as I}from"./config-booth-badge";import{isPathwayLayer as P}from"../../../../utils/is-pathway-layer";export default function T(f){let{layers:t,defaultLayer:n}=L.layerStore;if(n){const o=[].concat(t),e=t.find(i=>i===n),s=t.indexOf(e);o.splice(s,1),t=[e].concat(o)}const _=t.filter(o=>!o.rootParent).map(o=>p(o,f));return Promise.all(_).then(o=>{const e=r(u,[],{dim:!1,interactive:!0}),s=r(R,[],{dim:!1}),i=r(M,[]),y=r(h,[],{dim:!1}),A=r(N,[],{dim:!1}),E=r(d,[],{dim:!1}),m=[],c=[];for(const a of o.flat())P(a.name)?(a.dim=!1,c.push(a)):m.push(a);const l=I(f,"root",L.boothStore.booths);return[...m,...l?[l]:[],...c,...w(),i,y,s,A,e,E]})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as p,jsxs as K}from"react/jsx-runtime";import N from"classnames";import{useObserver as L}from"mobx-react-lite";import{useEffect as y,useMemo as V,useState as z,useRef as $}from"react";import H from"../data";import{getLayerSvg as Q}from"../data/svg";import n,{boothStore as F,exhibitorStore as X,uiState as e}from"../store";import{BoothBase as R,RegularBooth as O}from"../store/BoothStore";import{Route as g}from"../store/RouteStore";import{CURRENT_POSITION_POINT_ID as k,KIOSK_ANCHOR_POINT_ID as q}from"../wayfinding/adapters";import D from"../tools/settings";import{t as w}from"../utils/i18n";import G from"./EntityList";import J from"./WayfindingTemplate";import{calcSpeed as Y}from"../utils/calcSpeed";import{calcTravelTime as Z}from"../utils/calcTravelTime";import{DEFAULT_UNITS as ee}from"../constants";import"./Wayfinding.scss";function te(){const P=$(null),d=V(()=>{const i=n.routeStore.pathLayers;return i.map((s,l)=>{const u=i[l+1],c=s.layer?.basePriority??0,h=u?.layer?.basePriority??0,S=u?h<c?"up":"down":void 0;return{id:s.id,name:s.layer?.shortName,description:s.layer?.description,directionToNext:S}})},[n.routeStore.pathLayers]),[I,v]=z();y(()=>{I||v(d[0])},[n.routeStore.pathLayers,d]),y(()=>{const i=d.find(s=>s.description?.toLowerCase()===n.routeStore.currentRouteLayer?.description?.toLowerCase());i&&v(i)},[n.routeStore.currentRouteLayer,d]),y(()=>{const i=e.selectedRoute;if(!i){e.setIsMultiPointRoute(!1);return}const l=(i.waypoints?.length||0)>0;e.setIsMultiPointRoute(l)},[e.selectedRoute]);const A=()=>{const{from:i,to:s}=e.selectedRoute;return!!(i&&s)},E=()=>e.overlaySize==="full",M=()=>!!(A()&&!E()),C=()=>{const i=e.selectedRoute;return i?(i.waypoints?.length||0)>0?"multi":"simple":"none"},_=()=>e.routeTitle;return y(()=>{C()==="multi"&&e.selectedRoute},[e.selectedRoute]),L(()=>{const i=C(),s=_();if(i==="multi")return K("div",{className:N("main-wayfinding",{hidden:e.kiosk&&e.selectedRoute?.from&&e.selectedRoute?.to}),children:[e.routeDescription&&p("div",{className:"efp-wayfinding-description",children:e.routeDescription}),p(G,{updatedScrollableRef:P})]});const l=[],u=e.selectedRoute?.from&&!(e.selectedRoute.from instanceof R)?e.selectedRoute.from:null,c=e.selectedRoute?.to&&!(e.selectedRoute.to instanceof R)?e.selectedRoute.to:null,h=()=>F.booths,S=h().filter(t=>t instanceof O),W=h().filter(t=>!(t instanceof O)),x=()=>{let t=[];return u&&t.push({value:u.id,label:u.name}),c&&c.id!==u?.id&&t.push({value:c.id,label:c.name}),X.exhibitors.forEach(o=>{l.push(...o.booths.map(r=>r.id)),t.push(...o.booths.map(r=>({value:r.id.toString(),label:o.name+" - "+r.fullName})))}),W.filter(o=>l.indexOf(o.id)===-1).forEach(o=>{t.push({value:o.id.toString(),label:o.fullName})}),t=t.sort((o,r)=>o.label.localeCompare(r.label,void 0,{sensitivity:"base"})),S.filter(o=>l.indexOf(o.id)===-1).forEach(o=>{t.push({value:o.id.toString(),label:o.fullName})}),t},T=(t,o=!0)=>{if(t===k||t===q)return;const r=F.booths.find(m=>m.id.toString()===t)??null,{from:f,to:a}=e.selectedRoute;o?n.routeStore.selectRoute(new g(r,a)):n.routeStore.selectRoute(new g(f,r))},B=t=>{const o=[],r=Q().getAttribute("units")||ee,f=Z(t,Y(r));let a=new Date;a.setMinutes(a.getMinutes()+f/60);const m=a.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return o.push({title:w("Travel time"),text:f<60?"< 1 min":`~ ${Math.round(f/60)} min`},{title:w("Distance"),text:Math.round(t)+` ${r}`},{title:w("Est arrival"),text:m}),o},U=()=>{const{from:t,to:o}=e.selectedRoute;!t||!o||t.id!==k&&n.routeStore.selectRoute(new g(o,t))},j=e.selectedRoute?.from&&e.selectedRoute?.to&&!n.routeStore.routeLines.length;return p("div",{className:N("main-wayfinding",{hidden:e.kiosk&&e.selectedRoute?.from&&e.selectedRoute?.to}),children:p(J,{showForm:!M(),showInfo:!!(!H.hideWayInformation&&D.EXPO!=="bloomberg"&&e.selectedRoute?.from&&e.selectedRoute?.to),floors:d,currentFloor:I,onClickFloor:t=>{const o=n.routeStore.pathLayers.find(r=>r.id===t.id);o?.layer&&n.layerStore.updateVisibility(o.layer,!0)},routeFound:!j,options:x(),fromValue:e.selectedRoute?.from?.id.toString()??"",toValue:e.selectedRoute?.to?.id?.toString()||"",onChangeFrom:t=>T(t,!0),onChangeTo:t=>T(t,!1),onSwitch:U,infoItems:B(n.routeStore.routeDistance),infoAccessible:n.routeStore.onlyAccessible,showAccessible:n.routeStore.showAccessible,onAccessibleCheck:t=>n.routeStore.setOnlyAccessible(t),onClickInfo:()=>n.showOverlay(),routeUrl:e.routeQRCodeUrl,isKiosk:e.kiosk,showDetailsIcon:e.showRouteInstantly,onDetailsIconClick:()=>{const{from:t,to:o}=e.selectedRoute||{},r=(o instanceof R?o:null)??(t instanceof R?t:null);if(r){const a=x().find(b=>b.value===r.id.toString()),m=r.exhibitors.find(b=>a.label.includes(b.name));e.details=m||r}}})})})}function oe(){return L(()=>D.wayfinding&&!e.menu&&e.selectedRoute&&e.list.type!=="route-planner"&&p(te,{}))}export default oe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createBrowserHistory as te}from"history";import{autorun as O,reaction as k}from"mobx";import{handleCustomCommand as oe}from"../utils/customCommands";import{BUILD_ROUTE_KEY as se,KIOSK_ENABLE_KEY as A,MAP_SETTINGS_KEY as re,PREVIEW_MODE_QUERY as E,PREVIEW_MODE_STORAGE_KEY as F,SEPARATOR as R,PATHWAY_KEY as N,PLANNER_KEY as P,PLANNER_SOURCE_KEY as $,PLANNER_FROM_KEY as W,LANG_KEY as K,UI_SCALE_PARAM_KEY as Y,UI_SCALE_RESET_PARAM_KEY as V,VIEWER_MODE_QUERY as I,VIEWER_MODE_STORAGE_KEY as H,LANGUAGE_TYPE as x}from"../constants";import v from"../data";import s,{uiState as i}from"../store";import{CurrentPosition as ae,extractRoute as ie,findBooth as ne}from"../store/RouteStore";import{setConsentSettings as G}from"../tools/gtag";import U from"../tools/logger";import{isLocalStorageAvailable as L}from"../utils/localStorage";import{areLayersEnabled as le}from"../utils/areLayersEnabled";import ce from"../core/Rect";import{getMostFrequent as ue}from"../utils/getMostFrequent";import{runInAction as D}from"mobx";import{recoverKioskFromUrlPrams as he}from"../components/Kiosk/recoverKioskFromUrlPrams";import{hasLocale as fe,setLocale as de}from"../utils/i18n";let m=!1,C=!1,z=null,j=null,q=null,Q;const h=te(),_=window.location.pathname,S=[];export function getLocationHistory(){return S}function b(t){return _+t}function me(t){m||h.push(b(t))}export function historyReplace(t){m||h.push(b(t))}function f(t){return t.replace(/=&/g,"&").replace(/=$/,"")}function J(){let t="";const n=i.selectedExhibitor,a=i.selectedBooth,e=i.selectedEventItem,o=i.selectedRoute,r=i.selectedSpeaker,l=i.setKioskModeEnabled;if(i.list.type==="route-planner"&&!n&&!a&&!e){const d=s.routePlannerStore;if(d.source==="bookmarks")t=`${P}&${$}=bookmarks`;else{const w=d.items.map(g=>g.entity.slug).filter(Boolean).join(R);t=`${P}=${w}`}const p=d.startPoint?.slug;p&&(t+=`&${W}=${p}`)}else if(o&&!i.isMultiPointRoute){const d=o.from?`:${o.from.slug}`:"",p=o.to?`:${o.to.slug}`:"",w=s.routeStore.onlyAccessible?":true":":false",g=o.waypoints?.map(u=>`:${u.slug}`).join("");t=`route${p}${d}${w}${g||""}`}else if(n)t=n.slug;else if(a)t=a.slug;else if(e)t=e.slug;else if(r)t=r.slug;else if(l)t="";else switch(i.list.type){case"bookmarks":t="bookmarks";break;case"visited":t="visited";break;case"category":t=i.selectedCategory.slug;break;case"search":t=i.list.text||"";break;case x:t=x;break;case"filter":t=`${i.list.query.key}=${i.list.query.value}`;break;case"sessions":t="sessions";break;case"exhibitors":t="exhibitors";break;case"speakers":t="speakers";break;case"tours":t="tours";break;case"multi-point-tour":t=`tour=${i.list.tourId}`;break;default:throw new Error("Unkown list.type")}if(C)return;const c=t?"?"+encodeURIComponent(t):"";h.location.search!==c&&(n!==z||a!==j||e!==q?me(c):historyReplace(c),z=n,j=a,q=e)}function X(){const t=i.selectedExhibitor,n=i.selectedEventItem,a=i.selectedSpeaker;let e="";t?e=t.name:n?e=n.name:a?e=a.name:i.list.type==="search"&&i.list.text?e="`"+(i.list.text||"")+"`":i.list.type==="multi-point-tour"&&i.tourTitle&&(e=i.tourTitle),e.length&&(e+=" \u2013 "),e+=v.title,v.subtitle&&(e+=" \u2013 "+v.subtitle),e+=" \u2013 Expo Floor Plan by ExpoFP",document.title=e}function B(){const t=h.location.search.length>1?decodeURIComponent(h.location.search.substring(1)):"";return oe(t)}function y(){const t=h.location.search.length>1?decodeURIComponent(h.location.search.substring(1)):"";C=!0;const n=s.boothStore.booths.find(e=>e.slug?.toLowerCase()===t?.toLowerCase()||e.externalId?.toLowerCase()===t?.toLowerCase()||e.externalId?.toLowerCase()?.replace(/\s+/g,"")===t?.toLowerCase()),a=new URLSearchParams(decodeURIComponent(window.location.search));if(he(a),pe(a),!B())if(a.has(A)){const e=a.get(A);e==="1"?i.kiosk=!0:e==="0"&&(i.kiosk=!1,i.resetUIScale())}else if(t==="tours")s.selectTours();else if(t.startsWith("tour=")){const e=t.split("=")[1],o=s.toursStore.getTourById(e);o?s.toursStore.launchTour(o,o.name,o.description):(console.warn(`Route with id "${e}" not found`),s.selectTours())}else if(a.has(P)){const e=a.get($),o=a.get(W),r=o?ne(o):null;if(e==="bookmarks")s.routePlannerStore.launchFromBookmarks(r??void 0);else{const l=(a.get(P)||"").split(R).filter(Boolean);s.routePlannerStore.launchFromSlugs(l,r??void 0)}}else if(t.startsWith("route")){const e=t.split(R);s.routeStore.setOnlyAccessible(e[3]==="true");const o=ie(e[2],e[1],e.slice(4));s.routeStore.selectRoute(o);const l=e.slice(4).length>0;s.uiState.setIsMultiPointRoute(l);const d=new URLSearchParams(window.location.search).get("title");d&&s.uiState.setRouteTitle(d)}else if(t==="bookmarks")s.selectBookmarks();else if(t==="visited")s.selectVisited();else if(t===x)s.selectLanguage();else if(a.has(K)){const e=a.get(K)?.toLowerCase();fe(e)&&de(e)}else if(t==="sessions")s.selectSessions();else if(t==="exhibitors")s.selectExhibitors();else if(t==="speakers")s.selectSpeakers();else if(t==="-pdf")s.uiState.printingPdf=!0;else if(t.startsWith("hide"))s.uiState.setVisibility(new URLSearchParams(t).get("hide").split(",").filter(Boolean).reduce((e,o)=>({...e,[o]:!1}),{}));else if(n)setTimeout(()=>s.selectBooth(n),250);else if(t===se)s.uiState.startBuildRoute();else if(a.get(N)){const e=a.get(N),o=a.get("booths")?.split(",")||[],r=a.get("exhibitors")?.split(",")||[],l=a.get("tour");if(l){const u=s.toursStore.getTourById(l);u&&D(()=>{s.uiState.setTourTitle(u.name),s.uiState.setTourDescription(u.description),s.uiState.setIsMultiPointTour(!0),s.uiState.setMultiPointTourList(u.id)})}const c=s.boothStore.booths,d=s.exhibitorStore.exhibitors,p=c.filter(u=>o.includes(u.externalId)),w=d.filter(u=>r.includes(u.externalId)).flatMap(u=>u.booths),g=[...p,...w];if(le()){const u=g.map(ee=>ee.layer.name),M=ue(u);M&&s.fp.activateFloor({name:M})}(o.length>0||r.length>0)&&s.fp.highlightEntities([...o,...r]),s.layerStore.showPathWay(e),g.length>0&&D(()=>{s.uiState.moveToRect=ce.fromMultiple(g.map(u=>u.rect).filter(Boolean)),s.uiState.rollReset=!0})}else{const e=s.eventStore.eventItems.find(o=>o.slug?.toLowerCase()===t?.toLowerCase()||o.externalId?.toLowerCase()===t?.toLowerCase());if(e)s.selectEventItem(e,!0);else{const o=s.exhibitorStore.exhibitors.find(r=>r.slug?.toLowerCase()===t?.toLowerCase()||r.externalId?.toLowerCase()===t?.toLowerCase());if(t.startsWith("exhibitors")){const r=t.split("=")[1].split(",");setTimeout(()=>s.fp.selectExhibitor(r),250)}else if(o)setTimeout(()=>s.clickExhibitor(o),250);else if(t.includes("=")&&(t.startsWith("categories=")||t.startsWith("poiType=")))U.log("Skipping filter parameter in dispatchFromUrl:",t);else{const l=s.categoryStore.categories.find(c=>c.slug===t);if(l)s.selectCategory(l);else{const c=s.speakerStore.findBySlug(t);c?s.selectSpeaker(c,!0):t.includes("heatmap=true")||s.searchStore.selectSearch(t)}}}}C=!1,J(),X()}function T(){const t=h.location.search;if(t.includes("heatmap")){const e=new URL(window.location.href);if(e.searchParams.get("heatmap")==="true")if(e.searchParams.get("type")==="yah"){let r=f(e.search);m=!0,historyReplace(r),s.uiState.heatmapYah=!0,s.uiState.monochrome=!0,s.uiState.hideLogoInBooth=!0,s.uiState.hideHeaderLogo=!0,s.uiState.disableBookmarked=!0}else{e.searchParams.delete("heatmap");let r=f(e.search);m=!0,historyReplace(r),s.uiState.heatmap=!0}}if(t.startsWith("?preview="))historyReplace("?");else if(t.startsWith("?b="))historyReplace("?bookmarks");else if(t.startsWith("?ba=")){const e=new URL(window.location.href),o=parseInt(e.searchParams.get("ba")),r=s.exhibitorStore.exhibitorById.get(o);historyReplace(r?"?"+r.slug:"?bookmarks")}if(t.includes("blue-dot")){const e=new URL(window.location.href),o=e.searchParams.get("blue-dot").split(",");if(e.searchParams.delete("blue-dot"),o.length>1){const l=s.layerStore.findLayer(o[2])?.name,c=new ae(Number(o[0])||void 0,Number(o[1])||void 0,l,void 0,Number(o[3])||void 0,Number(o[4])||void 0);s.layerStore.layersLoaded?s.routeStore.selectCurrentPosition(c,!0,1):k(()=>s.layerStore.layersLoaded,()=>{s.routeStore.selectCurrentPosition(c,!0,1)})}let r=f(e.search);historyReplace(r)}if(t.includes("copy_exh")){const e=new URL(window.location.href),o=e.searchParams.get("copy_exh");e.searchParams.delete("copy_exh"),historyReplace("?")}if(t.includes("noOverlay")){const e=new URL(window.location.href),o=e.searchParams.get("noOverlay");e.searchParams.delete("noOverlay");let r=f(e.search);o==="true"?s.uiState.hideOverlay=!0:o==="false"&&(s.uiState.hideOverlay=!1),historyReplace(r)}if(t.includes("allowConsent")){const e=new URL(window.location.href),o=e.searchParams.get("allowConsent");e.searchParams.delete("allowConsent");const r=f(e.search);o==="true"?G(!0):o==="false"&&G(!1),historyReplace(r)}if(t.includes("hideHeaderLogo")){const e=new URL(window.location.href),o=e.searchParams.get("hideHeaderLogo");e.searchParams.delete("hideHeaderLogo");const r=f(e.search);o==="true"&&(i.hideHeaderLogo=!0),historyReplace(r)}if(t.includes("hideLogoInBooth")){const e=new URL(window.location.href),o=e.searchParams.get("hideLogoInBooth");e.searchParams.delete("hideLogoInBooth");const r=f(e.search);o==="true"&&(i.hideLogoInBooth=!0),historyReplace(r)}if(t.includes("disableFeatured")){const e=new URL(window.location.href),o=e.searchParams.get("disableFeatured");e.searchParams.delete("disableFeatured");const r=f(e.search);o==="true"&&s.exhibitorStore.exhibitors.forEach(l=>l.featured=!1),historyReplace(r)}if(t.includes("disableBookmarked")){const e=new URL(window.location.href),o=e.searchParams.get("disableBookmarked");e.searchParams.delete("disableBookmarked");const r=f(e.search);o==="true"&&(i.disableBookmarked=!0),historyReplace(r)}if(t.includes("disableGps")){const e=new URL(window.location.href),o=e.searchParams.get("disableGps");e.searchParams.delete("disableGps");const r=f(e.search);o==="true"&&s.routeStore.setGpsTrackingEnabled(!1),historyReplace(r)}if(t.includes("monochrome")){const e=new URL(window.location.href),o=e.searchParams.get("monochrome");e.searchParams.delete("monochrome");const r=f(e.search);o==="true"&&(i.monochrome=!0),historyReplace(r)}if((t.startsWith("?fbclid")||t.startsWith("?_ga"))&&historyReplace("?"),t.includes(I)){const e=new URL(window.location.href),o=e.searchParams.get(I);o==="1"||o==="true"?L&&localStorage.setItem(H,"1"):(o==="0"||o==="false")&&L&&localStorage.removeItem(H),e.searchParams.delete(I),historyReplace(f(e.search))}if(t.includes(E)){const e=new URL(window.location.href),o=e.searchParams.get(E);o==="true"?L&&localStorage.setItem(F,"1"):o==="false"&&L&&localStorage.removeItem(F),e.searchParams.delete(E),historyReplace(f(e.search))}if(i.previewExhibitor&&historyReplace("?"+i.previewExhibitor.slug),h.location.search.includes("&")||h.location.search.includes("%26")){let e=h.location.search;e=e.startsWith("?")?e.slice(1):e;const o=e.includes("&")?"&":"%26",l=e.split(o).map(c=>{const d=s.exhibitorStore.exhibitors.find(p=>p.slug===c||p.externalId===c);return d?d.name:c}).join("&");historyReplace("?"+l)}const n=new URLSearchParams(window.location.search);if(n.has(V)){s.uiState.resetUIScale();const e=new URL(window.location.href);e.searchParams.delete(V);let o=f(e.search);m=!0,historyReplace(o),m=!1}const a=n.get(Y);if(a){const e=a.replace(",","."),o=parseFloat(e);!isNaN(o)&&o>=.8&&o<=1.4?s.uiState.setUIScale(o,!0):U.warn(`Invalid ui-scale parameter: ${a}. Must be a number between 0.8 and 1.4.`);const r=new URL(window.location.href);r.searchParams.delete(Y);let l=f(r.search);m=!0,historyReplace(l),m=!1}}export function initRouting(t=!1){m=t,!m&&b(h.location.search)===_&&S.push(b(h.location.search)),Q=h.listen((n,a)=>{m||(S.push(b(n.search)),U.log("history",a,n),a==="POP"&&y())}),T(),B(),k(()=>s.layerStore.layersLoaded,()=>{s.urlFilterManager&&!s.urlFilterManager.isInitialized&&s.urlFilterManager.initialize(),y(),O(X),O(J),i.viewerMode&&(i.menu=!0)})}export function applyParameters(t=""){historyReplace("?"+decodeURIComponent(t.toString())),s.layerStore.layersLoaded?(T(),y()):(B(),k(()=>s.layerStore.layersLoaded,()=>{T(),y()}))}export function destroyHistory(){Q()}export function goBack(){if(console.log("goBack"),S.length>1){S.pop();const n=S[S.length-1].replace(_,"");return m=!0,h.replace(n),m=!1,y(),!0}else return h.go(-1),!1}function pe(t){try{let n={};const a=i.defaultMapSettings;if(new Set(t.keys()).size)n=Z(Object.fromEntries(t.entries()),a);else{const e=sessionStorage.getItem(re);e&&(n=Z(JSON.parse(e),a))}if(i.setMapSettings(n),n.z){const e=s.layerStore.layers.find(o=>o.name===n.z);e&&s.layerStore.updateVisibility(e,!0)}}catch(n){console.error("Failed to process or save map settings.",n)}}function Z(t,n){const a={};for(const e in t){if(!Object.prototype.hasOwnProperty.call(n,e)||!Object.prototype.hasOwnProperty.call(t,e))continue;const o=t[e];typeof n[e]=="number"&&typeof o=="string"?a[e]=parseFloat(o):a[e]=o}return a}
|
|
1
|
+
import{createBrowserHistory as oe}from"history";import{autorun as O,reaction as k}from"mobx";import{handleCustomCommand as se}from"../utils/customCommands";import{BUILD_ROUTE_KEY as re,KIOSK_ENABLE_KEY as A,MAP_SETTINGS_KEY as ae,PREVIEW_MODE_QUERY as E,PREVIEW_MODE_STORAGE_KEY as F,SEPARATOR as R,PATHWAY_KEY as N,PLANNER_KEY as P,PLANNER_SOURCE_KEY as $,PLANNER_FROM_KEY as W,LANG_KEY as K,UI_SCALE_PARAM_KEY as Y,UI_SCALE_RESET_PARAM_KEY as V,VIEWER_MODE_QUERY as I,VIEWER_MODE_STORAGE_KEY as H,LANGUAGE_TYPE as x}from"../constants";import v from"../data";import s,{uiState as i}from"../store";import{BoothBase as G}from"../store/BoothStore";import{CurrentPosition as ie,extractRoute as ne,findBooth as le}from"../store/RouteStore";import{setConsentSettings as D}from"../tools/gtag";import U from"../tools/logger";import{isLocalStorageAvailable as L}from"../utils/localStorage";import{areLayersEnabled as ce}from"../utils/areLayersEnabled";import ue from"../core/Rect";import{getMostFrequent as he}from"../utils/getMostFrequent";import{runInAction as z}from"mobx";import{recoverKioskFromUrlPrams as fe}from"../components/Kiosk/recoverKioskFromUrlPrams";import{hasLocale as de,setLocale as me}from"../utils/i18n";let m=!1,C=!1,j=null,q=null,Q=null,J;const h=oe(),B=window.location.pathname,S=[];export function getLocationHistory(){return S}function b(t){return B+t}function pe(t){m||h.push(b(t))}export function historyReplace(t){m||h.push(b(t))}function f(t){return t.replace(/=&/g,"&").replace(/=$/,"")}function X(){let t="";const n=i.selectedExhibitor,a=i.selectedBooth,e=i.selectedEventItem,o=i.selectedRoute,r=i.selectedSpeaker,l=i.setKioskModeEnabled;if(i.list.type==="route-planner"&&!n&&!a&&!e){const d=s.routePlannerStore;if(d.source==="bookmarks")t=`${P}&${$}=bookmarks`;else{const w=d.items.map(g=>g.entity.slug).filter(Boolean).join(R);t=`${P}=${w}`}const p=d.startPoint?.slug;p&&(t+=`&${W}=${p}`)}else if(o&&!i.isMultiPointRoute){const d=o.from instanceof G?`:${o.from.slug}`:"",p=o.to instanceof G?`:${o.to.slug}`:"",w=s.routeStore.onlyAccessible?":true":":false",g=o.waypoints?.map(u=>`:${u.slug}`).join("");t=`route${p}${d}${w}${g||""}`}else if(n)t=n.slug;else if(a)t=a.slug;else if(e)t=e.slug;else if(r)t=r.slug;else if(l)t="";else switch(i.list.type){case"bookmarks":t="bookmarks";break;case"visited":t="visited";break;case"category":t=i.selectedCategory.slug;break;case"search":t=i.list.text||"";break;case x:t=x;break;case"filter":t=`${i.list.query.key}=${i.list.query.value}`;break;case"sessions":t="sessions";break;case"exhibitors":t="exhibitors";break;case"speakers":t="speakers";break;case"tours":t="tours";break;case"multi-point-tour":t=`tour=${i.list.tourId}`;break;default:throw new Error("Unkown list.type")}if(C)return;const c=t?"?"+encodeURIComponent(t):"";h.location.search!==c&&(n!==j||a!==q||e!==Q?pe(c):historyReplace(c),j=n,q=a,Q=e)}function Z(){const t=i.selectedExhibitor,n=i.selectedEventItem,a=i.selectedSpeaker;let e="";t?e=t.name:n?e=n.name:a?e=a.name:i.list.type==="search"&&i.list.text?e="`"+(i.list.text||"")+"`":i.list.type==="multi-point-tour"&&i.tourTitle&&(e=i.tourTitle),e.length&&(e+=" \u2013 "),e+=v.title,v.subtitle&&(e+=" \u2013 "+v.subtitle),e+=" \u2013 Expo Floor Plan by ExpoFP",document.title=e}function _(){const t=h.location.search.length>1?decodeURIComponent(h.location.search.substring(1)):"";return se(t)}function y(){const t=h.location.search.length>1?decodeURIComponent(h.location.search.substring(1)):"";C=!0;const n=s.boothStore.booths.find(e=>e.slug?.toLowerCase()===t?.toLowerCase()||e.externalId?.toLowerCase()===t?.toLowerCase()||e.externalId?.toLowerCase()?.replace(/\s+/g,"")===t?.toLowerCase()),a=new URLSearchParams(decodeURIComponent(window.location.search));if(fe(a),ge(a),!_())if(a.has(A)){const e=a.get(A);e==="1"?i.kiosk=!0:e==="0"&&(i.kiosk=!1,i.resetUIScale())}else if(t==="tours")s.selectTours();else if(t.startsWith("tour=")){const e=t.split("=")[1],o=s.toursStore.getTourById(e);o?s.toursStore.launchTour(o,o.name,o.description):(console.warn(`Route with id "${e}" not found`),s.selectTours())}else if(a.has(P)){const e=a.get($),o=a.get(W),r=o?le(o):null;if(e==="bookmarks")s.routePlannerStore.launchFromBookmarks(r??void 0);else{const l=(a.get(P)||"").split(R).filter(Boolean);s.routePlannerStore.launchFromSlugs(l,r??void 0)}}else if(t.startsWith("route")){const e=t.split(R);s.routeStore.setOnlyAccessible(e[3]==="true");const o=ne(e[2],e[1],e.slice(4));s.routeStore.selectRoute(o);const l=e.slice(4).length>0;s.uiState.setIsMultiPointRoute(l);const d=new URLSearchParams(window.location.search).get("title");d&&s.uiState.setRouteTitle(d)}else if(t==="bookmarks")s.selectBookmarks();else if(t==="visited")s.selectVisited();else if(t===x)s.selectLanguage();else if(a.has(K)){const e=a.get(K)?.toLowerCase();de(e)&&me(e)}else if(t==="sessions")s.selectSessions();else if(t==="exhibitors")s.selectExhibitors();else if(t==="speakers")s.selectSpeakers();else if(t==="-pdf")s.uiState.printingPdf=!0;else if(t.startsWith("hide"))s.uiState.setVisibility(new URLSearchParams(t).get("hide").split(",").filter(Boolean).reduce((e,o)=>({...e,[o]:!1}),{}));else if(n)setTimeout(()=>s.selectBooth(n),250);else if(t===re)s.uiState.startBuildRoute();else if(a.get(N)){const e=a.get(N),o=a.get("booths")?.split(",")||[],r=a.get("exhibitors")?.split(",")||[],l=a.get("tour");if(l){const u=s.toursStore.getTourById(l);u&&z(()=>{s.uiState.setTourTitle(u.name),s.uiState.setTourDescription(u.description),s.uiState.setIsMultiPointTour(!0),s.uiState.setMultiPointTourList(u.id)})}const c=s.boothStore.booths,d=s.exhibitorStore.exhibitors,p=c.filter(u=>o.includes(u.externalId)),w=d.filter(u=>r.includes(u.externalId)).flatMap(u=>u.booths),g=[...p,...w];if(ce()){const u=g.map(te=>te.layer.name),M=he(u);M&&s.fp.activateFloor({name:M})}(o.length>0||r.length>0)&&s.fp.highlightEntities([...o,...r]),s.layerStore.showPathWay(e),g.length>0&&z(()=>{s.uiState.moveToRect=ue.fromMultiple(g.map(u=>u.rect).filter(Boolean)),s.uiState.rollReset=!0})}else{const e=s.eventStore.eventItems.find(o=>o.slug?.toLowerCase()===t?.toLowerCase()||o.externalId?.toLowerCase()===t?.toLowerCase());if(e)s.selectEventItem(e,!0);else{const o=s.exhibitorStore.exhibitors.find(r=>r.slug?.toLowerCase()===t?.toLowerCase()||r.externalId?.toLowerCase()===t?.toLowerCase());if(t.startsWith("exhibitors")){const r=t.split("=")[1].split(",");setTimeout(()=>s.fp.selectExhibitor(r),250)}else if(o)setTimeout(()=>s.clickExhibitor(o),250);else if(t.includes("=")&&(t.startsWith("categories=")||t.startsWith("poiType=")))U.log("Skipping filter parameter in dispatchFromUrl:",t);else{const l=s.categoryStore.categories.find(c=>c.slug===t);if(l)s.selectCategory(l);else{const c=s.speakerStore.findBySlug(t);c?s.selectSpeaker(c,!0):t.includes("heatmap=true")||s.searchStore.selectSearch(t)}}}}C=!1,X(),Z()}function T(){const t=h.location.search;if(t.includes("heatmap")){const e=new URL(window.location.href);if(e.searchParams.get("heatmap")==="true")if(e.searchParams.get("type")==="yah"){let r=f(e.search);m=!0,historyReplace(r),s.uiState.heatmapYah=!0,s.uiState.monochrome=!0,s.uiState.hideLogoInBooth=!0,s.uiState.hideHeaderLogo=!0,s.uiState.disableBookmarked=!0}else{e.searchParams.delete("heatmap");let r=f(e.search);m=!0,historyReplace(r),s.uiState.heatmap=!0}}if(t.startsWith("?preview="))historyReplace("?");else if(t.startsWith("?b="))historyReplace("?bookmarks");else if(t.startsWith("?ba=")){const e=new URL(window.location.href),o=parseInt(e.searchParams.get("ba")),r=s.exhibitorStore.exhibitorById.get(o);historyReplace(r?"?"+r.slug:"?bookmarks")}if(t.includes("blue-dot")){const e=new URL(window.location.href),o=e.searchParams.get("blue-dot").split(",");if(e.searchParams.delete("blue-dot"),o.length>1){const l=s.layerStore.findLayer(o[2])?.name,c=new ie(Number(o[0])||void 0,Number(o[1])||void 0,l,void 0,Number(o[3])||void 0,Number(o[4])||void 0);s.layerStore.layersLoaded?s.routeStore.selectCurrentPosition(c,!0,1):k(()=>s.layerStore.layersLoaded,()=>{s.routeStore.selectCurrentPosition(c,!0,1)})}let r=f(e.search);historyReplace(r)}if(t.includes("copy_exh")){const e=new URL(window.location.href),o=e.searchParams.get("copy_exh");e.searchParams.delete("copy_exh"),historyReplace("?")}if(t.includes("noOverlay")){const e=new URL(window.location.href),o=e.searchParams.get("noOverlay");e.searchParams.delete("noOverlay");let r=f(e.search);o==="true"?s.uiState.hideOverlay=!0:o==="false"&&(s.uiState.hideOverlay=!1),historyReplace(r)}if(t.includes("allowConsent")){const e=new URL(window.location.href),o=e.searchParams.get("allowConsent");e.searchParams.delete("allowConsent");const r=f(e.search);o==="true"?D(!0):o==="false"&&D(!1),historyReplace(r)}if(t.includes("hideHeaderLogo")){const e=new URL(window.location.href),o=e.searchParams.get("hideHeaderLogo");e.searchParams.delete("hideHeaderLogo");const r=f(e.search);o==="true"&&(i.hideHeaderLogo=!0),historyReplace(r)}if(t.includes("hideLogoInBooth")){const e=new URL(window.location.href),o=e.searchParams.get("hideLogoInBooth");e.searchParams.delete("hideLogoInBooth");const r=f(e.search);o==="true"&&(i.hideLogoInBooth=!0),historyReplace(r)}if(t.includes("disableFeatured")){const e=new URL(window.location.href),o=e.searchParams.get("disableFeatured");e.searchParams.delete("disableFeatured");const r=f(e.search);o==="true"&&s.exhibitorStore.exhibitors.forEach(l=>l.featured=!1),historyReplace(r)}if(t.includes("disableBookmarked")){const e=new URL(window.location.href),o=e.searchParams.get("disableBookmarked");e.searchParams.delete("disableBookmarked");const r=f(e.search);o==="true"&&(i.disableBookmarked=!0),historyReplace(r)}if(t.includes("disableGps")){const e=new URL(window.location.href),o=e.searchParams.get("disableGps");e.searchParams.delete("disableGps");const r=f(e.search);o==="true"&&s.routeStore.setGpsTrackingEnabled(!1),historyReplace(r)}if(t.includes("monochrome")){const e=new URL(window.location.href),o=e.searchParams.get("monochrome");e.searchParams.delete("monochrome");const r=f(e.search);o==="true"&&(i.monochrome=!0),historyReplace(r)}if((t.startsWith("?fbclid")||t.startsWith("?_ga"))&&historyReplace("?"),t.includes(I)){const e=new URL(window.location.href),o=e.searchParams.get(I);o==="1"||o==="true"?L&&localStorage.setItem(H,"1"):(o==="0"||o==="false")&&L&&localStorage.removeItem(H),e.searchParams.delete(I),historyReplace(f(e.search))}if(t.includes(E)){const e=new URL(window.location.href),o=e.searchParams.get(E);o==="true"?L&&localStorage.setItem(F,"1"):o==="false"&&L&&localStorage.removeItem(F),e.searchParams.delete(E),historyReplace(f(e.search))}if(i.previewExhibitor&&historyReplace("?"+i.previewExhibitor.slug),h.location.search.includes("&")||h.location.search.includes("%26")){let e=h.location.search;e=e.startsWith("?")?e.slice(1):e;const o=e.includes("&")?"&":"%26",l=e.split(o).map(c=>{const d=s.exhibitorStore.exhibitors.find(p=>p.slug===c||p.externalId===c);return d?d.name:c}).join("&");historyReplace("?"+l)}const n=new URLSearchParams(window.location.search);if(n.has(V)){s.uiState.resetUIScale();const e=new URL(window.location.href);e.searchParams.delete(V);let o=f(e.search);m=!0,historyReplace(o),m=!1}const a=n.get(Y);if(a){const e=a.replace(",","."),o=parseFloat(e);!isNaN(o)&&o>=.8&&o<=1.4?s.uiState.setUIScale(o,!0):U.warn(`Invalid ui-scale parameter: ${a}. Must be a number between 0.8 and 1.4.`);const r=new URL(window.location.href);r.searchParams.delete(Y);let l=f(r.search);m=!0,historyReplace(l),m=!1}}export function initRouting(t=!1){m=t,!m&&b(h.location.search)===B&&S.push(b(h.location.search)),J=h.listen((n,a)=>{m||(S.push(b(n.search)),U.log("history",a,n),a==="POP"&&y())}),T(),_(),k(()=>s.layerStore.layersLoaded,()=>{s.urlFilterManager&&!s.urlFilterManager.isInitialized&&s.urlFilterManager.initialize(),y(),O(Z),O(X),i.viewerMode&&(i.menu=!0)})}export function applyParameters(t=""){historyReplace("?"+decodeURIComponent(t.toString())),s.layerStore.layersLoaded?(T(),y()):(_(),k(()=>s.layerStore.layersLoaded,()=>{T(),y()}))}export function destroyHistory(){J()}export function goBack(){if(console.log("goBack"),S.length>1){S.pop();const n=S[S.length-1].replace(B,"");return m=!0,h.replace(n),m=!1,y(),!0}else return h.go(-1),!1}function ge(t){try{let n={};const a=i.defaultMapSettings;if(new Set(t.keys()).size)n=ee(Object.fromEntries(t.entries()),a);else{const e=sessionStorage.getItem(ae);e&&(n=ee(JSON.parse(e),a))}if(i.setMapSettings(n),n.z){const e=s.layerStore.layers.find(o=>o.name===n.z);e&&s.layerStore.updateVisibility(e,!0)}}catch(n){console.error("Failed to process or save map settings.",n)}}function ee(t,n){const a={};for(const e in t){if(!Object.prototype.hasOwnProperty.call(n,e)||!Object.prototype.hasOwnProperty.call(t,e))continue;const o=t[e];typeof n[e]=="number"&&typeof o=="string"?a[e]=parseFloat(o):a[e]=o}return a}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__esDecorate as s,__runInitializers as n}from"tslib";import{action as o,observable as se,computed as he,runInAction as ae}from"mobx";import ne from"../tools/logger";import{isWebGlSupported as ce}from"../utils";import ue,{BoothBase as oe,RegularBooth as de}from"./BoothStore";import me,{Category as Se}from"./CategoryStore";import fe,{Exhibitor as re}from"./ExhibitorStore";import pe from"./CategoryFilterStore";import ge,{EventItem as ke}from"./EventStore";import{SpeakerItem as ve}from"./SpeakerStore";import{GaEventActions as ye}from"../tools/gtag";import h from"../utils/is-mobile";import c from"../utils/is-webview";import _e from"./HeatmapStore";import{resetLocale as be}from"../utils/i18n";import{LANGUAGE_TYPE as we}from"../constants";import xe from"./IntercomStore";import Be,{LayersMode as le}from"./LayerStore";import Ee from"./MaplibreStore";import Le from"./RouteStore";import Ce from"./RoutePlannerStore";import Fe from"./ToursStore";import Ie from"./UIState";import Te from"./PoiTypeStore";import{sanitizeSearch as ze}from"../utils/sanitizeText";import Me from"./FuzzySearchEngineStore";import Oe from"./SessionsFilterStore";import Ae from"./SearchStore";import Re from"./SearchButtonsStore";import Pe from"./BookmarksStore";import{URLFilterManager as Ve}from"../services/URLFilterManager";import{ShortcutRegistry as Ge}from"./ShortcutRegistry";import{SessionsShortcutProvider as Ne}from"./providers/SessionsShortcutProvider";import qe from"./SpeakerStore";import je from"./SpeakerFilterStore";import{SpeakerShortcutProvider as Ue}from"./providers/SpeakerShortcutProvider";import{SearchShortcutProvider as We}from"./providers/SearchShortcutProvider";import{RendererService as De}from"../renderer";let He=(()=>{let a=[],u,d=[],m=[],S,f=[],p=[],g,k,v,y,_,b,w,x,B,E,L,C,F,I,T,z,M,O,A,R,P,V,G,N,q,j,U,W,D,H,K,Y,$,J,Q,X,Z,ee,te,ie;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;u=[se],S=[se],g=[o],k=[o],v=[o],y=[o],_=[o],b=[o],w=[o],x=[o],B=[o],E=[o],L=[o],C=[o],F=[o],I=[o],T=[o],z=[o],M=[o],O=[o],A=[o],R=[o],P=[o],V=[o],G=[o],N=[o],q=[o],j=[o],U=[o],W=[o],D=[o],H=[o],K=[o],Y=[o],$=[o],J=[he],Q=[o],X=[o],Z=[o],ee=[o],te=[o],ie=[o],s(this,null,g,{kind:"method",name:"setResetCameraFn",static:!1,private:!1,access:{has:e=>"setResetCameraFn"in e,get:e=>e.setResetCameraFn},metadata:t},null,a),s(this,null,k,{kind:"method",name:"selectExhibitor",static:!1,private:!1,access:{has:e=>"selectExhibitor"in e,get:e=>e.selectExhibitor},metadata:t},null,a),s(this,null,v,{kind:"method",name:"selectBooth",static:!1,private:!1,access:{has:e=>"selectBooth"in e,get:e=>e.selectBooth},metadata:t},null,a),s(this,null,y,{kind:"method",name:"reset",static:!1,private:!1,access:{has:e=>"reset"in e,get:e=>e.reset},metadata:t},null,a),s(this,null,_,{kind:"method",name:"selectNone",static:!1,private:!1,access:{has:e=>"selectNone"in e,get:e=>e.selectNone},metadata:t},null,a),s(this,null,b,{kind:"method",name:"selectBookmarks",static:!1,private:!1,access:{has:e=>"selectBookmarks"in e,get:e=>e.selectBookmarks},metadata:t},null,a),s(this,null,w,{kind:"method",name:"selectVisited",static:!1,private:!1,access:{has:e=>"selectVisited"in e,get:e=>e.selectVisited},metadata:t},null,a),s(this,null,x,{kind:"method",name:"selectLanguage",static:!1,private:!1,access:{has:e=>"selectLanguage"in e,get:e=>e.selectLanguage},metadata:t},null,a),s(this,null,B,{kind:"method",name:"selectCategory",static:!1,private:!1,access:{has:e=>"selectCategory"in e,get:e=>e.selectCategory},metadata:t},null,a),s(this,null,E,{kind:"method",name:"selectEventItem",static:!1,private:!1,access:{has:e=>"selectEventItem"in e,get:e=>e.selectEventItem},metadata:t},null,a),s(this,null,L,{kind:"method",name:"selectSearch",static:!1,private:!1,access:{has:e=>"selectSearch"in e,get:e=>e.selectSearch},metadata:t},null,a),s(this,null,C,{kind:"method",name:"clickBookmarks",static:!1,private:!1,access:{has:e=>"clickBookmarks"in e,get:e=>e.clickBookmarks},metadata:t},null,a),s(this,null,F,{kind:"method",name:"clickVisited",static:!1,private:!1,access:{has:e=>"clickVisited"in e,get:e=>e.clickVisited},metadata:t},null,a),s(this,null,I,{kind:"method",name:"clickLanguage",static:!1,private:!1,access:{has:e=>"clickLanguage"in e,get:e=>e.clickLanguage},metadata:t},null,a),s(this,null,T,{kind:"method",name:"clickCategory",static:!1,private:!1,access:{has:e=>"clickCategory"in e,get:e=>e.clickCategory},metadata:t},null,a),s(this,null,z,{kind:"method",name:"clickSeminars",static:!1,private:!1,access:{has:e=>"clickSeminars"in e,get:e=>e.clickSeminars},metadata:t},null,a),s(this,null,M,{kind:"method",name:"clickBoothInList",static:!1,private:!1,access:{has:e=>"clickBoothInList"in e,get:e=>e.clickBoothInList},metadata:t},null,a),s(this,null,O,{kind:"method",name:"clickBoothInList2",static:!1,private:!1,access:{has:e=>"clickBoothInList2"in e,get:e=>e.clickBoothInList2},metadata:t},null,a),s(this,null,A,{kind:"method",name:"clickBooth",static:!1,private:!1,access:{has:e=>"clickBooth"in e,get:e=>e.clickBooth},metadata:t},null,a),s(this,null,R,{kind:"method",name:"clickExhibitor2",static:!1,private:!1,access:{has:e=>"clickExhibitor2"in e,get:e=>e.clickExhibitor2},metadata:t},null,a),s(this,null,P,{kind:"method",name:"clickExhibitor",static:!1,private:!1,access:{has:e=>"clickExhibitor"in e,get:e=>e.clickExhibitor},metadata:t},null,a),s(this,null,V,{kind:"method",name:"showMap",static:!1,private:!1,access:{has:e=>"showMap"in e,get:e=>e.showMap},metadata:t},null,a),s(this,null,G,{kind:"method",name:"showOverlay",static:!1,private:!1,access:{has:e=>"showOverlay"in e,get:e=>e.showOverlay},metadata:t},null,a),s(this,null,N,{kind:"method",name:"toggleMapOverlay",static:!1,private:!1,access:{has:e=>"toggleMapOverlay"in e,get:e=>e.toggleMapOverlay},metadata:t},null,a),s(this,null,q,{kind:"method",name:"moveToList",static:!1,private:!1,access:{has:e=>"moveToList"in e,get:e=>e.moveToList},metadata:t},null,a),s(this,null,j,{kind:"method",name:"moveToExhibitor",static:!1,private:!1,access:{has:e=>"moveToExhibitor"in e,get:e=>e.moveToExhibitor},metadata:t},null,a),s(this,null,U,{kind:"method",name:"changeActiveListIndex",static:!1,private:!1,access:{has:e=>"changeActiveListIndex"in e,get:e=>e.changeActiveListIndex},metadata:t},null,a),s(this,null,W,{kind:"method",name:"toggleModal",static:!1,private:!1,access:{has:e=>"toggleModal"in e,get:e=>e.toggleModal},metadata:t},null,a),s(this,null,D,{kind:"method",name:"openGallery",static:!1,private:!1,access:{has:e=>"openGallery"in e,get:e=>e.openGallery},metadata:t},null,a),s(this,null,H,{kind:"method",name:"closeGallery",static:!1,private:!1,access:{has:e=>"closeGallery"in e,get:e=>e.closeGallery},metadata:t},null,a),s(this,null,K,{kind:"method",name:"openActiveListItem",static:!1,private:!1,access:{has:e=>"openActiveListItem"in e,get:e=>e.openActiveListItem},metadata:t},null,a),s(this,null,Y,{kind:"method",name:"toggleCategoryFilter",static:!1,private:!1,access:{has:e=>"toggleCategoryFilter"in e,get:e=>e.toggleCategoryFilter},metadata:t},null,a),s(this,null,$,{kind:"method",name:"applyCategoryFilters",static:!1,private:!1,access:{has:e=>"applyCategoryFilters"in e,get:e=>e.applyCategoryFilters},metadata:t},null,a),s(this,null,J,{kind:"getter",name:"filteredExhibitors",static:!1,private:!1,access:{has:e=>"filteredExhibitors"in e,get:e=>e.filteredExhibitors},metadata:t},null,a),s(this,null,Q,{kind:"method",name:"selectSessions",static:!1,private:!1,access:{has:e=>"selectSessions"in e,get:e=>e.selectSessions},metadata:t},null,a),s(this,null,X,{kind:"method",name:"selectExhibitors",static:!1,private:!1,access:{has:e=>"selectExhibitors"in e,get:e=>e.selectExhibitors},metadata:t},null,a),s(this,null,Z,{kind:"method",name:"selectTours",static:!1,private:!1,access:{has:e=>"selectTours"in e,get:e=>e.selectTours},metadata:t},null,a),s(this,null,ee,{kind:"method",name:"selectSpeakers",static:!1,private:!1,access:{has:e=>"selectSpeakers"in e,get:e=>e.selectSpeakers},metadata:t},null,a),s(this,null,te,{kind:"method",name:"selectSpeaker",static:!1,private:!1,access:{has:e=>"selectSpeaker"in e,get:e=>e.selectSpeaker},metadata:t},null,a),s(this,null,ie,{kind:"method",name:"resetFilters",static:!1,private:!1,access:{has:e=>"resetFilters"in e,get:e=>e.resetFilters},metadata:t},null,a),s(null,null,u,{kind:"field",name:"initialized",static:!1,private:!1,access:{has:e=>"initialized"in e,get:e=>e.initialized,set:(e,i)=>{e.initialized=i}},metadata:t},d,m),s(null,null,S,{kind:"field",name:"resetCameraFn",static:!1,private:!1,access:{has:e=>"resetCameraFn"in e,get:e=>e.resetCameraFn,set:(e,i)=>{e.resetCameraFn=i}},metadata:t},f,p),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}categoryStore=n(this,a);exhibitorStore;boothStore;uiState;routeStore;routePlannerStore;toursStore;maplibreStore;layerStore;intercomStore;eventStore;poiTypeStore;heatmapStore;fuzzySearchEngineStore;categoryFilterStore;sessionsFilterStore;speakerStore;speakerFilterStore;searchStore;searchButtonsStore;bookmarksStore;urlFilterManager;shortcutRegistry;rendererService=new De;fp;initialized=n(this,d,!1);resetCameraFn=(n(this,m),n(this,f,void 0));setResetCameraFn(t){this.resetCameraFn=t}constructor(){n(this,p),this.categoryStore=new me(this),this.exhibitorStore=new fe(this),this.boothStore=new ue(this),this.routeStore=new Le(this),this.routePlannerStore=new Ce(this),this.toursStore=new Fe(this),this.uiState=new Ie(this),this.maplibreStore=new Ee(this),this.layerStore=new Be,this.intercomStore=new xe,this.eventStore=new ge(this),this.heatmapStore=new _e(this),this.poiTypeStore=new Te(this),this.fuzzySearchEngineStore=new Me(["name","title","fullName","booths.name"]),this.categoryFilterStore=new pe(this),this.sessionsFilterStore=new Oe(this),this.speakerStore=new qe(this),this.speakerFilterStore=new je(this),this.searchStore=new Ae(this),this.searchButtonsStore=new Re(this),this.bookmarksStore=new Pe(this),this.urlFilterManager=new Ve(this),this.shortcutRegistry=new Ge,this.registerShortcutProviders()}selectExhibitor(t,e=!0){this.uiState.hoveredExhibitor=null,this.uiState.details=t;var i=t.booths.filter(l=>l.visible),r=t.booths.filter(l=>!l.visible);!i.length&&r.length&&this.layerStore.updateVisibility(r[0].layer,!0),e&&setTimeout(()=>this.moveToList(t.booths.filter(l=>l.visible)),c||h?500:50)}selectBooth(t,e=!0){let i=Array.isArray(t)?t:[t];this.uiState.details=i[0],i.length===1&&i[0].schedule?.length&&(this.uiState.desiredOverlaySize="medium"),i.length===1&&i[0].layer&&!i[0].visible&&this.layerStore.mode===le.Radio&&this.layerStore.updateVisibility(i[0].layer,!0),e&&setTimeout(()=>this.moveToList(i),c||h?500:50)}reset(){const t=window.__searchi;t&&t.querySelector&&t.querySelector("input[type=search]")&&t.querySelector("input[type=search]").blur&&t.querySelector("input[type=search]").blur(),window.setTimeout(()=>{this.uiState.setKioskModeEnabled||be().then(()=>{ae(()=>{this.selectSearch(""),this.routeStore.defaultFrom&&!this.routeStore.defaultFrom?.visible?this.selectBooth(this.routeStore.defaultFrom):this.uiState.details=null,this.resetCameraFn?.(),this.uiState.menu=!1,this.searchStore.resetSearchBox(),this.searchButtonsStore.clearAllFilters()}),setTimeout(()=>{ae(()=>{this.uiState.inIdle=!0})},100)})},1e3)}selectNone(){window.__resett&&window.__resett(),this.uiState.details=this.uiState.selectedCategory}selectBookmarks(){this.uiState.details=null,this.uiState.list={type:"bookmarks"}}selectVisited(){this.uiState.details=null,this.uiState.list={type:"visited"}}selectLanguage(){this.uiState.details=null,this.uiState.list={type:we}}selectCategory(t){window.__resett&&window.__resett(),this.uiState.details=t,this.uiState.list={type:"category",category:t},this.uiState.desiredOverlaySize="full",t.exhibitors.find(i=>i.booths.find(r=>r.visible))||this.layerStore.updateVisibility(t.exhibitors[0]?.booths[0]?.layer,!0),setTimeout(()=>{this.uiState.moveToBooths=t.exhibitors.filter(i=>i.booths.find(r=>r.visible)).flatMap(i=>i.booths)},200)}selectEventItem(t,e=!0){if(this.uiState.hoveredExhibitor=null,this.uiState.details=t,this.uiState.desiredOverlaySize="medium",t.boothId){const i=this.boothStore.booths.find(r=>r.id===t.boothId);i&&i.layer&&!i.visible&&this.layerStore.mode===le.Radio&&this.layerStore.updateVisibility(i.layer,!0)}e&&setTimeout(()=>{if(t.boothId){const i=this.boothStore.booths.find(r=>r.id===t.boothId);i&&this.moveToList([i])}},c||h?500:50)}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null,this.speakerStore.clearSelectedSpeaker(),this.uiState.list={type:"search",text:ze(t,Object.keys(this.uiState.mapSettings).map(e=>`${e}=`)),focused:!1},this.uiState.activeListIndex=-1}clickBookmarks(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectBookmarks(),this.moveToList(),this.showMap()}clickVisited(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectVisited(),this.moveToList(),this.showMap()}clickLanguage(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectLanguage()}clickCategory(t){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectCategory(t),this.uiState.onCategoryClick&&this.uiState.onCategoryClick({id:t.id,name:t.name,exhibitors:t.exhibitors.map(e=>e.id)}),setTimeout(()=>{this.moveToList(),this.showMap()},100)}clickSeminars(){this.clickCategory(this.categoryStore.seminarsCategory)}clickBoothInList(t){window.__resett&&window.__resett(),this.uiState.hoveredBooth=null,this.selectBooth(t),this.moveToList([t]),this.showMap()}clickBoothInList2(t){window.__resett&&window.__resett(),this.uiState.hoveredBooth=null,this.selectBooth(t,!1),window.setTimeout(()=>{this.moveToList([t]),this.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50)}clickBooth(t){if(this.uiState.menu=!1,this.uiState.list.type==="sessions"&&this.searchStore.selectSearch(),this.uiState.list.type==="speakers"&&this.searchStore.selectSearch(),this.uiState.list.type==="tours"&&this.searchStore.selectSearch(),this.uiState.list.type==="multi-point-tour"&&this.searchStore.selectSearch(),!(this.uiState.selectedRoute?.from&&this.uiState.selectedRoute?.to)){if(this.uiState.selectedRoute?.to&&!this.uiState.selectedRoute?.from&&t){this.routeStore.setStartPoint(t);return}if(t)this.routeStore.tempToBooth=t;else{this.uiState.details=null,this.fp.hidePathways(),this.uiState.list={type:"search",text:"",focused:!1},this.uiState.onBoothClick&&this.uiState.onBoothClick({target:null});return}if(this.uiState.onBoothClick){const e={name:"",description:""},i={target:{...t,layer:t.layer||e}};this.uiState.onBoothClick(i)}t.exhibitors.length===1&&t instanceof de?(this.heatmapStore.forceTrack={action:ye.ViewBooth,label:t.name},this.selectExhibitor(t.exhibitors[0],!1)):this.selectBooth(t,!1),this.showMap()}}clickExhibitor2(t){this.selectExhibitor(t,!0),this.showMap()}clickExhibitor(t){window.setTimeout(()=>{this.clickExhibitor2(t)},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50)}showMap(){this.uiState.overlayPosition==="bottom"&&ce&&(this.uiState.desiredOverlaySize="medium")}showOverlay(){this.uiState.overlayPosition==="bottom"&&(this.uiState.desiredOverlaySize="full")}toggleMapOverlay(){this.uiState.overlayPosition==="bottom"&&this.uiState.overlaySize==="full"?this.uiState.desiredOverlaySize="medium":this.uiState.overlayPosition==="bottom"&&this.uiState.overlaySize!=="full"&&(this.uiState.desiredOverlaySize="full")}moveToList(t){t=t||this.uiState.listItems;const e=[];t.forEach(i=>{if(i instanceof re)e.push(...i.booths.filter(r=>r.visible));else if(i instanceof oe)i.visible&&e.push(i);else if(i instanceof ke&&i.boothId){const r=this.boothStore.boothById.get(i.boothId);r?.visible&&e.push(r)}else i instanceof ve&&this.speakerStore.getEventsBySpeaker(i.id).forEach(r=>{if(!r.boothId)return;const l=this.boothStore.boothById.get(r.boothId);l?.visible&&e.push(l)})}),this.uiState.moveToBooths=e}moveToExhibitor(t){this.moveToList([t])}changeActiveListIndex(t){let e=this.uiState.activeListIndex+t;e=Math.max(0,Math.min(this.uiState.listItems.length-1,e)),this.uiState.activeListIndex=e}toggleModal(t){this.uiState.modalActive[t]=!this.uiState.modalActive[t]}openGallery(){this.uiState.galleryActive=!0}closeGallery(){this.uiState.galleryActive=!1}openActiveListItem(){const t=this.uiState.listItems[this.uiState.activeListIndex];t&&(ne.log("Opening",t),t instanceof re?this.clickExhibitor(t):t instanceof Se?this.clickCategory(t):t instanceof oe&&this.clickBoothInList2(t))}toggleCategoryFilter(){this.uiState.categoryFilterOpen=!this.uiState.categoryFilterOpen}applyCategoryFilters(t){this.uiState.selectedCategoryFilters=t,this.uiState.categoryFilterOpen=!1}get filteredExhibitors(){return this.uiState.selectedCategoryFilters.length===0?this.exhibitorStore.exhibitors:this.exhibitorStore.exhibitors.filter(t=>this.uiState.selectedCategoryFilters.some(e=>t.categories.some(i=>i.id===e.id)))}selectSessions(){this.uiState.list={type:"sessions",text:"",focused:!1},this.uiState.menu=!1,this.uiState.selectedTrack=null,this.searchButtonsStore.setSubButtonId(null),this.searchButtonsStore.subButtonsEnabled&&this.searchButtonsStore.showSubButtons("sessions"),h&&(this.uiState.desiredOverlaySize="full")}selectExhibitors(){this.uiState.list={type:"exhibitors",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectTours(){this.uiState.list={type:"tours",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectSpeakers(){this.uiState.list={type:"speakers",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectSpeaker(t,e=!0){this.speakerStore.selectSpeaker(t,e)}resetFilters(){this.searchButtonsStore.clearAllFilters()}registerShortcutProviders(){this.shortcutRegistry.register(new Ne(this)),this.shortcutRegistry.register(new Ue(this)),this.shortcutRegistry.register(new We(this))}}})();export default He;
|
|
1
|
+
import{__esDecorate as s,__runInitializers as n}from"tslib";import{action as o,observable as se,computed as he,runInAction as ae}from"mobx";import ne from"../tools/logger";import{isWebGlSupported as ce}from"../utils";import ue,{BoothBase as oe,RegularBooth as de}from"./BoothStore";import me,{Category as Se}from"./CategoryStore";import fe,{Exhibitor as re}from"./ExhibitorStore";import pe from"./CategoryFilterStore";import ge,{EventItem as ke}from"./EventStore";import{SpeakerItem as ve}from"./SpeakerStore";import{GaEventActions as ye}from"../tools/gtag";import h from"../utils/is-mobile";import c from"../utils/is-webview";import _e from"./HeatmapStore";import{resetLocale as be}from"../utils/i18n";import{LANGUAGE_TYPE as we}from"../constants";import xe from"./IntercomStore";import Be,{LayersMode as le}from"./LayerStore";import Ee from"./MaplibreStore";import Le from"./RouteStore";import Ce from"./RoutePlannerStore";import Fe from"./ToursStore";import Ie from"./UIState";import Te from"./PoiTypeStore";import{sanitizeSearch as ze}from"../utils/sanitizeText";import Me from"./FuzzySearchEngineStore";import Oe from"./SessionsFilterStore";import Ae from"./SearchStore";import Re from"./SearchButtonsStore";import Pe from"./BookmarksStore";import{URLFilterManager as Ve}from"../services/URLFilterManager";import{ShortcutRegistry as Ge}from"./ShortcutRegistry";import{SessionsShortcutProvider as Ne}from"./providers/SessionsShortcutProvider";import qe from"./SpeakerStore";import je from"./SpeakerFilterStore";import{SpeakerShortcutProvider as Ue}from"./providers/SpeakerShortcutProvider";import{SearchShortcutProvider as We}from"./providers/SearchShortcutProvider";import{RendererService as De}from"../renderer";let He=(()=>{let a=[],u,d=[],m=[],S,f=[],p=[],g,k,v,y,_,b,w,x,B,E,L,C,F,I,T,z,M,O,A,R,P,V,G,N,q,j,U,W,D,H,K,Y,$,J,Q,X,Z,ee,te,ie;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;u=[se],S=[se],g=[o],k=[o],v=[o],y=[o],_=[o],b=[o],w=[o],x=[o],B=[o],E=[o],L=[o],C=[o],F=[o],I=[o],T=[o],z=[o],M=[o],O=[o],A=[o],R=[o],P=[o],V=[o],G=[o],N=[o],q=[o],j=[o],U=[o],W=[o],D=[o],H=[o],K=[o],Y=[o],$=[o],J=[he],Q=[o],X=[o],Z=[o],ee=[o],te=[o],ie=[o],s(this,null,g,{kind:"method",name:"setResetCameraFn",static:!1,private:!1,access:{has:e=>"setResetCameraFn"in e,get:e=>e.setResetCameraFn},metadata:t},null,a),s(this,null,k,{kind:"method",name:"selectExhibitor",static:!1,private:!1,access:{has:e=>"selectExhibitor"in e,get:e=>e.selectExhibitor},metadata:t},null,a),s(this,null,v,{kind:"method",name:"selectBooth",static:!1,private:!1,access:{has:e=>"selectBooth"in e,get:e=>e.selectBooth},metadata:t},null,a),s(this,null,y,{kind:"method",name:"reset",static:!1,private:!1,access:{has:e=>"reset"in e,get:e=>e.reset},metadata:t},null,a),s(this,null,_,{kind:"method",name:"selectNone",static:!1,private:!1,access:{has:e=>"selectNone"in e,get:e=>e.selectNone},metadata:t},null,a),s(this,null,b,{kind:"method",name:"selectBookmarks",static:!1,private:!1,access:{has:e=>"selectBookmarks"in e,get:e=>e.selectBookmarks},metadata:t},null,a),s(this,null,w,{kind:"method",name:"selectVisited",static:!1,private:!1,access:{has:e=>"selectVisited"in e,get:e=>e.selectVisited},metadata:t},null,a),s(this,null,x,{kind:"method",name:"selectLanguage",static:!1,private:!1,access:{has:e=>"selectLanguage"in e,get:e=>e.selectLanguage},metadata:t},null,a),s(this,null,B,{kind:"method",name:"selectCategory",static:!1,private:!1,access:{has:e=>"selectCategory"in e,get:e=>e.selectCategory},metadata:t},null,a),s(this,null,E,{kind:"method",name:"selectEventItem",static:!1,private:!1,access:{has:e=>"selectEventItem"in e,get:e=>e.selectEventItem},metadata:t},null,a),s(this,null,L,{kind:"method",name:"selectSearch",static:!1,private:!1,access:{has:e=>"selectSearch"in e,get:e=>e.selectSearch},metadata:t},null,a),s(this,null,C,{kind:"method",name:"clickBookmarks",static:!1,private:!1,access:{has:e=>"clickBookmarks"in e,get:e=>e.clickBookmarks},metadata:t},null,a),s(this,null,F,{kind:"method",name:"clickVisited",static:!1,private:!1,access:{has:e=>"clickVisited"in e,get:e=>e.clickVisited},metadata:t},null,a),s(this,null,I,{kind:"method",name:"clickLanguage",static:!1,private:!1,access:{has:e=>"clickLanguage"in e,get:e=>e.clickLanguage},metadata:t},null,a),s(this,null,T,{kind:"method",name:"clickCategory",static:!1,private:!1,access:{has:e=>"clickCategory"in e,get:e=>e.clickCategory},metadata:t},null,a),s(this,null,z,{kind:"method",name:"clickSeminars",static:!1,private:!1,access:{has:e=>"clickSeminars"in e,get:e=>e.clickSeminars},metadata:t},null,a),s(this,null,M,{kind:"method",name:"clickBoothInList",static:!1,private:!1,access:{has:e=>"clickBoothInList"in e,get:e=>e.clickBoothInList},metadata:t},null,a),s(this,null,O,{kind:"method",name:"clickBoothInList2",static:!1,private:!1,access:{has:e=>"clickBoothInList2"in e,get:e=>e.clickBoothInList2},metadata:t},null,a),s(this,null,A,{kind:"method",name:"clickBooth",static:!1,private:!1,access:{has:e=>"clickBooth"in e,get:e=>e.clickBooth},metadata:t},null,a),s(this,null,R,{kind:"method",name:"clickExhibitor2",static:!1,private:!1,access:{has:e=>"clickExhibitor2"in e,get:e=>e.clickExhibitor2},metadata:t},null,a),s(this,null,P,{kind:"method",name:"clickExhibitor",static:!1,private:!1,access:{has:e=>"clickExhibitor"in e,get:e=>e.clickExhibitor},metadata:t},null,a),s(this,null,V,{kind:"method",name:"showMap",static:!1,private:!1,access:{has:e=>"showMap"in e,get:e=>e.showMap},metadata:t},null,a),s(this,null,G,{kind:"method",name:"showOverlay",static:!1,private:!1,access:{has:e=>"showOverlay"in e,get:e=>e.showOverlay},metadata:t},null,a),s(this,null,N,{kind:"method",name:"toggleMapOverlay",static:!1,private:!1,access:{has:e=>"toggleMapOverlay"in e,get:e=>e.toggleMapOverlay},metadata:t},null,a),s(this,null,q,{kind:"method",name:"moveToList",static:!1,private:!1,access:{has:e=>"moveToList"in e,get:e=>e.moveToList},metadata:t},null,a),s(this,null,j,{kind:"method",name:"moveToExhibitor",static:!1,private:!1,access:{has:e=>"moveToExhibitor"in e,get:e=>e.moveToExhibitor},metadata:t},null,a),s(this,null,U,{kind:"method",name:"changeActiveListIndex",static:!1,private:!1,access:{has:e=>"changeActiveListIndex"in e,get:e=>e.changeActiveListIndex},metadata:t},null,a),s(this,null,W,{kind:"method",name:"toggleModal",static:!1,private:!1,access:{has:e=>"toggleModal"in e,get:e=>e.toggleModal},metadata:t},null,a),s(this,null,D,{kind:"method",name:"openGallery",static:!1,private:!1,access:{has:e=>"openGallery"in e,get:e=>e.openGallery},metadata:t},null,a),s(this,null,H,{kind:"method",name:"closeGallery",static:!1,private:!1,access:{has:e=>"closeGallery"in e,get:e=>e.closeGallery},metadata:t},null,a),s(this,null,K,{kind:"method",name:"openActiveListItem",static:!1,private:!1,access:{has:e=>"openActiveListItem"in e,get:e=>e.openActiveListItem},metadata:t},null,a),s(this,null,Y,{kind:"method",name:"toggleCategoryFilter",static:!1,private:!1,access:{has:e=>"toggleCategoryFilter"in e,get:e=>e.toggleCategoryFilter},metadata:t},null,a),s(this,null,$,{kind:"method",name:"applyCategoryFilters",static:!1,private:!1,access:{has:e=>"applyCategoryFilters"in e,get:e=>e.applyCategoryFilters},metadata:t},null,a),s(this,null,J,{kind:"getter",name:"filteredExhibitors",static:!1,private:!1,access:{has:e=>"filteredExhibitors"in e,get:e=>e.filteredExhibitors},metadata:t},null,a),s(this,null,Q,{kind:"method",name:"selectSessions",static:!1,private:!1,access:{has:e=>"selectSessions"in e,get:e=>e.selectSessions},metadata:t},null,a),s(this,null,X,{kind:"method",name:"selectExhibitors",static:!1,private:!1,access:{has:e=>"selectExhibitors"in e,get:e=>e.selectExhibitors},metadata:t},null,a),s(this,null,Z,{kind:"method",name:"selectTours",static:!1,private:!1,access:{has:e=>"selectTours"in e,get:e=>e.selectTours},metadata:t},null,a),s(this,null,ee,{kind:"method",name:"selectSpeakers",static:!1,private:!1,access:{has:e=>"selectSpeakers"in e,get:e=>e.selectSpeakers},metadata:t},null,a),s(this,null,te,{kind:"method",name:"selectSpeaker",static:!1,private:!1,access:{has:e=>"selectSpeaker"in e,get:e=>e.selectSpeaker},metadata:t},null,a),s(this,null,ie,{kind:"method",name:"resetFilters",static:!1,private:!1,access:{has:e=>"resetFilters"in e,get:e=>e.resetFilters},metadata:t},null,a),s(null,null,u,{kind:"field",name:"initialized",static:!1,private:!1,access:{has:e=>"initialized"in e,get:e=>e.initialized,set:(e,i)=>{e.initialized=i}},metadata:t},d,m),s(null,null,S,{kind:"field",name:"resetCameraFn",static:!1,private:!1,access:{has:e=>"resetCameraFn"in e,get:e=>e.resetCameraFn,set:(e,i)=>{e.resetCameraFn=i}},metadata:t},f,p),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}categoryStore=n(this,a);exhibitorStore;boothStore;uiState;routeStore;routePlannerStore;toursStore;maplibreStore;layerStore;intercomStore;eventStore;poiTypeStore;heatmapStore;fuzzySearchEngineStore;categoryFilterStore;sessionsFilterStore;speakerStore;speakerFilterStore;searchStore;searchButtonsStore;bookmarksStore;urlFilterManager;shortcutRegistry;rendererService=new De;fp;initialized=n(this,d,!1);resetCameraFn=(n(this,m),n(this,f,void 0));setResetCameraFn(t){this.resetCameraFn=t}constructor(){n(this,p),this.categoryStore=new me(this),this.exhibitorStore=new fe(this),this.boothStore=new ue(this),this.routeStore=new Le(this),this.routePlannerStore=new Ce(this),this.toursStore=new Fe(this),this.uiState=new Ie(this),this.maplibreStore=new Ee(this),this.layerStore=new Be,this.intercomStore=new xe,this.eventStore=new ge(this),this.heatmapStore=new _e(this),this.poiTypeStore=new Te(this),this.fuzzySearchEngineStore=new Me(["name","title","fullName","booths.name"]),this.categoryFilterStore=new pe(this),this.sessionsFilterStore=new Oe(this),this.speakerStore=new qe(this),this.speakerFilterStore=new je(this),this.searchStore=new Ae(this),this.searchButtonsStore=new Re(this),this.bookmarksStore=new Pe(this),this.urlFilterManager=new Ve(this),this.shortcutRegistry=new Ge,this.registerShortcutProviders()}selectExhibitor(t,e=!0){this.uiState.hoveredExhibitor=null,this.uiState.details=t;var i=t.booths.filter(l=>l.visible),r=t.booths.filter(l=>!l.visible);!i.length&&r.length&&this.layerStore.updateVisibility(r[0].layer,!0),e&&setTimeout(()=>this.moveToList(t.booths.filter(l=>l.visible)),c||h?500:50)}selectBooth(t,e=!0){let i=Array.isArray(t)?t:[t];this.uiState.details=i[0],i.length===1&&i[0].schedule?.length&&(this.uiState.desiredOverlaySize="medium"),i.length===1&&i[0].layer&&!i[0].visible&&this.layerStore.mode===le.Radio&&this.layerStore.updateVisibility(i[0].layer,!0),e&&setTimeout(()=>this.moveToList(i),c||h?500:50)}reset(){const t=window.__searchi;t&&t.querySelector&&t.querySelector("input[type=search]")&&t.querySelector("input[type=search]").blur&&t.querySelector("input[type=search]").blur(),window.setTimeout(()=>{this.uiState.setKioskModeEnabled||be().then(()=>{ae(()=>{this.selectSearch(""),this.uiState.details=null,this.resetCameraFn?.(),this.uiState.menu=!1,this.searchStore.resetSearchBox(),this.searchButtonsStore.clearAllFilters()}),setTimeout(()=>{ae(()=>{this.uiState.inIdle=!0})},100)})},1e3)}selectNone(){window.__resett&&window.__resett(),this.uiState.details=this.uiState.selectedCategory}selectBookmarks(){this.uiState.details=null,this.uiState.list={type:"bookmarks"}}selectVisited(){this.uiState.details=null,this.uiState.list={type:"visited"}}selectLanguage(){this.uiState.details=null,this.uiState.list={type:we}}selectCategory(t){window.__resett&&window.__resett(),this.uiState.details=t,this.uiState.list={type:"category",category:t},this.uiState.desiredOverlaySize="full",t.exhibitors.find(i=>i.booths.find(r=>r.visible))||this.layerStore.updateVisibility(t.exhibitors[0]?.booths[0]?.layer,!0),setTimeout(()=>{this.uiState.moveToBooths=t.exhibitors.filter(i=>i.booths.find(r=>r.visible)).flatMap(i=>i.booths)},200)}selectEventItem(t,e=!0){if(this.uiState.hoveredExhibitor=null,this.uiState.details=t,this.uiState.desiredOverlaySize="medium",t.boothId){const i=this.boothStore.booths.find(r=>r.id===t.boothId);i&&i.layer&&!i.visible&&this.layerStore.mode===le.Radio&&this.layerStore.updateVisibility(i.layer,!0)}e&&setTimeout(()=>{if(t.boothId){const i=this.boothStore.booths.find(r=>r.id===t.boothId);i&&this.moveToList([i])}},c||h?500:50)}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null,this.speakerStore.clearSelectedSpeaker(),this.uiState.list={type:"search",text:ze(t,Object.keys(this.uiState.mapSettings).map(e=>`${e}=`)),focused:!1},this.uiState.activeListIndex=-1}clickBookmarks(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectBookmarks(),this.moveToList(),this.showMap()}clickVisited(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectVisited(),this.moveToList(),this.showMap()}clickLanguage(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectLanguage()}clickCategory(t){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectCategory(t),this.uiState.onCategoryClick&&this.uiState.onCategoryClick({id:t.id,name:t.name,exhibitors:t.exhibitors.map(e=>e.id)}),setTimeout(()=>{this.moveToList(),this.showMap()},100)}clickSeminars(){this.clickCategory(this.categoryStore.seminarsCategory)}clickBoothInList(t){window.__resett&&window.__resett(),this.uiState.hoveredBooth=null,this.selectBooth(t),this.moveToList([t]),this.showMap()}clickBoothInList2(t){window.__resett&&window.__resett(),this.uiState.hoveredBooth=null,this.selectBooth(t,!1),window.setTimeout(()=>{this.moveToList([t]),this.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50)}clickBooth(t){if(this.uiState.menu=!1,this.uiState.list.type==="sessions"&&this.searchStore.selectSearch(),this.uiState.list.type==="speakers"&&this.searchStore.selectSearch(),this.uiState.list.type==="tours"&&this.searchStore.selectSearch(),this.uiState.list.type==="multi-point-tour"&&this.searchStore.selectSearch(),!(this.uiState.selectedRoute?.from&&this.uiState.selectedRoute?.to)){if(this.uiState.selectedRoute?.to&&!this.uiState.selectedRoute?.from&&t){this.routeStore.setStartPoint(t);return}if(t)this.routeStore.tempToBooth=t;else{this.uiState.details=null,this.fp.hidePathways(),this.uiState.list={type:"search",text:"",focused:!1},this.uiState.onBoothClick&&this.uiState.onBoothClick({target:null});return}if(this.uiState.onBoothClick){const e={name:"",description:""},i={target:{...t,layer:t.layer||e}};this.uiState.onBoothClick(i)}t.exhibitors.length===1&&t instanceof de?(this.heatmapStore.forceTrack={action:ye.ViewBooth,label:t.name},this.selectExhibitor(t.exhibitors[0],!1)):this.selectBooth(t,!1),this.showMap()}}clickExhibitor2(t){this.selectExhibitor(t,!0),this.showMap()}clickExhibitor(t){window.setTimeout(()=>{this.clickExhibitor2(t)},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50)}showMap(){this.uiState.overlayPosition==="bottom"&&ce&&(this.uiState.desiredOverlaySize="medium")}showOverlay(){this.uiState.overlayPosition==="bottom"&&(this.uiState.desiredOverlaySize="full")}toggleMapOverlay(){this.uiState.overlayPosition==="bottom"&&this.uiState.overlaySize==="full"?this.uiState.desiredOverlaySize="medium":this.uiState.overlayPosition==="bottom"&&this.uiState.overlaySize!=="full"&&(this.uiState.desiredOverlaySize="full")}moveToList(t){t=t||this.uiState.listItems;const e=[];t.forEach(i=>{if(i instanceof re)e.push(...i.booths.filter(r=>r.visible));else if(i instanceof oe)i.visible&&e.push(i);else if(i instanceof ke&&i.boothId){const r=this.boothStore.boothById.get(i.boothId);r?.visible&&e.push(r)}else i instanceof ve&&this.speakerStore.getEventsBySpeaker(i.id).forEach(r=>{if(!r.boothId)return;const l=this.boothStore.boothById.get(r.boothId);l?.visible&&e.push(l)})}),this.uiState.moveToBooths=e}moveToExhibitor(t){this.moveToList([t])}changeActiveListIndex(t){let e=this.uiState.activeListIndex+t;e=Math.max(0,Math.min(this.uiState.listItems.length-1,e)),this.uiState.activeListIndex=e}toggleModal(t){this.uiState.modalActive[t]=!this.uiState.modalActive[t]}openGallery(){this.uiState.galleryActive=!0}closeGallery(){this.uiState.galleryActive=!1}openActiveListItem(){const t=this.uiState.listItems[this.uiState.activeListIndex];t&&(ne.log("Opening",t),t instanceof re?this.clickExhibitor(t):t instanceof Se?this.clickCategory(t):t instanceof oe&&this.clickBoothInList2(t))}toggleCategoryFilter(){this.uiState.categoryFilterOpen=!this.uiState.categoryFilterOpen}applyCategoryFilters(t){this.uiState.selectedCategoryFilters=t,this.uiState.categoryFilterOpen=!1}get filteredExhibitors(){return this.uiState.selectedCategoryFilters.length===0?this.exhibitorStore.exhibitors:this.exhibitorStore.exhibitors.filter(t=>this.uiState.selectedCategoryFilters.some(e=>t.categories.some(i=>i.id===e.id)))}selectSessions(){this.uiState.list={type:"sessions",text:"",focused:!1},this.uiState.menu=!1,this.uiState.selectedTrack=null,this.searchButtonsStore.setSubButtonId(null),this.searchButtonsStore.subButtonsEnabled&&this.searchButtonsStore.showSubButtons("sessions"),h&&(this.uiState.desiredOverlaySize="full")}selectExhibitors(){this.uiState.list={type:"exhibitors",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectTours(){this.uiState.list={type:"tours",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectSpeakers(){this.uiState.list={type:"speakers",text:"",focused:!1},this.uiState.menu=!1,h&&(this.uiState.desiredOverlaySize="full")}selectSpeaker(t,e=!0){this.speakerStore.selectSpeaker(t,e)}resetFilters(){this.searchButtonsStore.clearAllFilters()}registerShortcutProviders(){this.shortcutRegistry.register(new Ne(this)),this.shortcutRegistry.register(new Ue(this)),this.shortcutRegistry.register(new We(this))}}})();export default He;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__esDecorate as a,__runInitializers as u}from"tslib";import{action as c,computed as d,observable as g}from"mobx";import{findBooth as Q,Route as U}from"./RouteStore";import{t as p}from"../utils/i18n";let W=(()=>{let n=[],_,S=[],b=[],y,P=[],v=[],k,x=[],R=[],F
|
|
1
|
+
import{__esDecorate as a,__runInitializers as u}from"tslib";import{action as c,computed as d,observable as g}from"mobx";import{findBooth as Q,Route as U}from"./RouteStore";import{t as p}from"../utils/i18n";let W=(()=>{let n=[],_,S=[],b=[],y,P=[],v=[],k,x=[],R=[],B,F=[],I=[],C,w,O,z,V,E,L,A,N,M,T,j,q,D,$,G,H;return class{static{const e=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;_=[g],y=[g],k=[g],B=[g],C=[d],w=[d],O=[d],z=[d],V=[d],E=[d],L=[d],A=[d],N=[c],M=[c],T=[c],j=[c],q=[c],D=[c],$=[c],G=[c],H=[c],a(this,null,C,{kind:"getter",name:"resolvedBooths",static:!1,private:!1,access:{has:t=>"resolvedBooths"in t,get:t=>t.resolvedBooths},metadata:e},null,n),a(this,null,w,{kind:"getter",name:"stopsCount",static:!1,private:!1,access:{has:t=>"stopsCount"in t,get:t=>t.stopsCount},metadata:e},null,n),a(this,null,O,{kind:"getter",name:"startPointBoothOptions",static:!1,private:!1,access:{has:t=>"startPointBoothOptions"in t,get:t=>t.startPointBoothOptions},metadata:e},null,n),a(this,null,z,{kind:"getter",name:"startPointAutocompleteOptions",static:!1,private:!1,access:{has:t=>"startPointAutocompleteOptions"in t,get:t=>t.startPointAutocompleteOptions},metadata:e},null,n),a(this,null,V,{kind:"getter",name:"title",static:!1,private:!1,access:{has:t=>"title"in t,get:t=>t.title},metadata:e},null,n),a(this,null,E,{kind:"getter",name:"subtitleParts",static:!1,private:!1,access:{has:t=>"subtitleParts"in t,get:t=>t.subtitleParts},metadata:e},null,n),a(this,null,L,{kind:"getter",name:"routeFloors",static:!1,private:!1,access:{has:t=>"routeFloors"in t,get:t=>t.routeFloors},metadata:e},null,n),a(this,null,A,{kind:"getter",name:"currentRouteFloor",static:!1,private:!1,access:{has:t=>"currentRouteFloor"in t,get:t=>t.currentRouteFloor},metadata:e},null,n),a(this,null,N,{kind:"method",name:"setRouteFloor",static:!1,private:!1,access:{has:t=>"setRouteFloor"in t,get:t=>t.setRouteFloor},metadata:e},null,n),a(this,null,M,{kind:"method",name:"launch",static:!1,private:!1,access:{has:t=>"launch"in t,get:t=>t.launch},metadata:e},null,n),a(this,null,T,{kind:"method",name:"launchFromBookmarks",static:!1,private:!1,access:{has:t=>"launchFromBookmarks"in t,get:t=>t.launchFromBookmarks},metadata:e},null,n),a(this,null,j,{kind:"method",name:"launchFromSlugs",static:!1,private:!1,access:{has:t=>"launchFromSlugs"in t,get:t=>t.launchFromSlugs},metadata:e},null,n),a(this,null,q,{kind:"method",name:"buildRoute",static:!1,private:!1,access:{has:t=>"buildRoute"in t,get:t=>t.buildRoute},metadata:e},null,n),a(this,null,D,{kind:"method",name:"setStartPoint",static:!1,private:!1,access:{has:t=>"setStartPoint"in t,get:t=>t.setStartPoint},metadata:e},null,n),a(this,null,$,{kind:"method",name:"removeItem",static:!1,private:!1,access:{has:t=>"removeItem"in t,get:t=>t.removeItem},metadata:e},null,n),a(this,null,G,{kind:"method",name:"reorderItems",static:!1,private:!1,access:{has:t=>"reorderItems"in t,get:t=>t.reorderItems},metadata:e},null,n),a(this,null,H,{kind:"method",name:"close",static:!1,private:!1,access:{has:t=>"close"in t,get:t=>t.close},metadata:e},null,n),a(null,null,_,{kind:"field",name:"items",static:!1,private:!1,access:{has:t=>"items"in t,get:t=>t.items,set:(t,o)=>{t.items=o}},metadata:e},S,b),a(null,null,y,{kind:"field",name:"startPoint",static:!1,private:!1,access:{has:t=>"startPoint"in t,get:t=>t.startPoint,set:(t,o)=>{t.startPoint=o}},metadata:e},P,v),a(null,null,k,{kind:"field",name:"source",static:!1,private:!1,access:{has:t=>"source"in t,get:t=>t.source,set:(t,o)=>{t.source=o}},metadata:e},x,R),a(null,null,B,{kind:"field",name:"excludedVisitedCount",static:!1,private:!1,access:{has:t=>"excludedVisitedCount"in t,get:t=>t.excludedVisitedCount,set:(t,o)=>{t.excludedVisitedCount=o}},metadata:e},F,I),e&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}rootStore=u(this,n);items=u(this,S,[]);startPoint=(u(this,b),u(this,P,null));source=(u(this,v),u(this,x,null));excludedVisitedCount=(u(this,R),u(this,F,0));constructor(e){u(this,I),this.rootStore=e}get resolvedBooths(){const e=new Map;return this.startPoint&&e.set(this.startPoint.id,this.startPoint),this.items.forEach(t=>{t.booth&&e.set(t.booth.id,t.booth)}),Array.from(e.values())}get stopsCount(){return this.items.length}get startPointBoothOptions(){return this.rootStore.boothStore.booths}get startPointAutocompleteOptions(){const{exhibitorStore:e}=this.rootStore,t=this.startPointBoothOptions,o=[],r=new Set;return e.exhibitors.forEach(s=>{s.booths.forEach(l=>{r.add(l.id),o.push({value:l.id.toString(),label:`${s.name} - ${l.name}`})})}),t.filter(s=>!r.has(s.id)).forEach(s=>{o.push({value:s.id.toString(),label:s.name})}),o.sort((s,l)=>s.label.localeCompare(l.label,void 0,{sensitivity:"base"}))}get title(){return this.source==="bookmarks"?p("Bookmarks route"):""}get subtitleParts(){const{routeInfo:e}=this.rootStore.routeStore;let t;if(e?.time){const o=e.time;t=o<60?p("< 1 min"):p("~ {{n}} min",{n:Math.round(o/60)})}return{stops:p("{{count}} stops",{count:this.stopsCount}),from:this.startPoint?p("From {{name}}",{name:this.startPoint.name}):void 0,distance:e?e.distance:void 0,travelTime:t}}get routeFloors(){const e=this.rootStore.routeStore.pathLayers;return e.map((t,o)=>{const r=e[o+1],i=t.layer?.basePriority??0,s=r?.layer?.basePriority??0,l=r?s<i?"up":"down":void 0;return{id:t.id,name:t.layer?.shortName,description:t.layer?.description,directionToNext:l}})}get currentRouteFloor(){const e=this.routeFloors,t=this.rootStore.routeStore.currentRouteLayer;if(!e.length)return;if(!t)return e[0]?{id:e[0].id,name:e[0].name}:void 0;const o=e.find(r=>r.description?.toLowerCase()===t.description?.toLowerCase());return o?{id:o.id,name:o.name}:{id:e[0].id,name:e[0].name}}setRouteFloor(e){const t=this.rootStore.routeStore.pathLayers.find(o=>o.id===e.id);t?.layer&&this.rootStore.layerStore.updateVisibility(t.layer,!0)}launch(e,t="custom",o){this.excludedVisitedCount=e.filter(i=>i.type==="exhibitor"&&i.entity.visited).length,this.items=e.filter(i=>i.type==="exhibitor"?!i.entity.visited:!0),this.source=t,this.startPoint=o!==void 0?o:this.detectStartPoint();const{uiState:r}=this.rootStore;r.list={type:"route-planner",source:t},r.details=null,r.menu=!1,this.buildRoute()}launchFromBookmarks(e){const{exhibitorStore:t,eventStore:o,boothStore:r}=this.rootStore,i=[];t.bookmarked.forEach(s=>{i.push({type:"exhibitor",entity:s,booth:s.booths[0]||null})}),r.booths.filter(s=>s.exhibitors.length===0&&s.bookmarkedDirectly).forEach(s=>{i.push({type:"booth",entity:s,booth:s})}),this.launch(i,"bookmarks",e)}launchFromSlugs(e,t){const o=this.resolveSlugs(e);this.launch(o,"custom",t)}resolveSlugs(e){const{exhibitorStore:t,eventStore:o,boothStore:r}=this.rootStore;return e.filter(Boolean).map(i=>{const s=i.toLowerCase(),l=t.exhibitors.find(f=>f.slug?.toLowerCase()===s||f.externalId?.toLowerCase()===s);if(l)return{type:"exhibitor",entity:l,booth:l.booths[0]||null};const m=Q(i);return m?{type:"booth",entity:m,booth:m}:null}).filter(i=>i!==null)}buildRoute(){const e=[];if(this.startPoint&&this.startPoint.name&&e.push(this.startPoint.name),this.items.forEach(h=>{h.booth&&h.booth.name&&e.push(h.booth.name)}),e.length<2){this.rootStore.routeStore.updateRoute([]);return}let t;try{const h=this.rootStore.fp?.getOptimizedRoutes?.(e);t=Array.isArray(h)?h.flatMap(K=>K?.waypoints??[]):[]}catch{t=[]}const o=new Set(e),r=new Set(t),i=e.length>0&&[...o].every(h=>r.has(h));(!t.length||!i)&&(t=e.slice()),this.reorderItemsByNames(t);const s=this.resolvedBooths;if(s.length<2){this.rootStore.routeStore.updateRoute([]);return}const l=s[0],m=s[s.length-1],f=s.slice(1,-1),J=new U(l,m,f);this.rootStore.routeStore.selectRoute(J,!1),this.rootStore.uiState.setIsMultiPointRoute(f.length>0)}reorderItemsByNames(e){const t=this.startPoint?this.startPoint.name:null,o=new Map;this.items.forEach(i=>{const s=i.booth?i.booth.name:null;s&&(o.has(s)||o.set(s,[]),o.get(s).push(i))});const r=[];e.forEach(i=>{if(i!==t){const s=o.get(i);s&&s.length>0&&r.push(...s.splice(0))}}),this.items=r}detectStartPoint(){const{boothStore:e,poiTypeStore:t}=this.rootStore,o=["entrance","entrances"],r=t.poiTypes.find(i=>o.includes(i.name.toLowerCase()));return r&&e.booths.find(i=>i.poiTypeId===r.id)||null}setStartPoint(e){this.startPoint=e,this.buildRoute()}removeItem(e){this.items.splice(e,1),this.buildRoute()}reorderItems(e,t){const[o]=this.items.splice(e,1);this.items.splice(t,0,o),this.buildRoute()}close(){this.items=[],this.startPoint=null,this.source=null,this.excludedVisitedCount=0,this.rootStore.uiState.details=null,this.rootStore.uiState.list={type:"search",text:"",focused:!1},this.rootStore.routeStore.selectRoute(null,!1)}}})();export default W;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Point } from "simple-geometry";
|
|
2
2
|
import type { RouteLine } from "../wayfinding/core";
|
|
3
|
+
import type { ArbitraryPoint } from "../wayfinding/adapters";
|
|
3
4
|
import { Booth } from "./BoothStore";
|
|
4
5
|
import { Exhibitor } from "./ExhibitorStore";
|
|
5
6
|
import { Layer } from "./LayerStore";
|
|
@@ -13,7 +14,6 @@ export default class RouteStore {
|
|
|
13
14
|
requestCompass: boolean;
|
|
14
15
|
iconType: number;
|
|
15
16
|
tempToBooth: Booth;
|
|
16
|
-
defaultFrom: Booth;
|
|
17
17
|
focusEnabled: boolean;
|
|
18
18
|
prevZ: string;
|
|
19
19
|
markersData: MarkersData;
|
|
@@ -23,13 +23,22 @@ export default class RouteStore {
|
|
|
23
23
|
currentRouteLayer: Layer;
|
|
24
24
|
constructor(rootStore: RootStore);
|
|
25
25
|
get canFindLocation(): boolean;
|
|
26
|
-
selectRoute(route: Route, resetList?: boolean): void;
|
|
26
|
+
selectRoute(route: Route | null, resetList?: boolean, immediate?: boolean): void;
|
|
27
|
+
/** Rebuilds the current route with the live position as FROM, applied immediately (no 200ms defer) */
|
|
28
|
+
rebuildRouteFromPosition(newFrom: ArbitraryPoint): void;
|
|
29
|
+
/** Default FROM for `selectRoute` when only TO is given. Priority: CP > kiosk anchor > none. */
|
|
30
|
+
private resolveFallbackFrom;
|
|
27
31
|
setStartPoint(booth: Booth): void;
|
|
28
32
|
get pathLayers(): {
|
|
29
33
|
id: number;
|
|
30
34
|
layer: Layer;
|
|
31
35
|
}[];
|
|
32
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Used only by the SDK `getBooth(RouteWaypoint)` path for coord-form
|
|
38
|
+
* waypoints (`floorplan.ready.tsx`). Internal callers prefer
|
|
39
|
+
* `toArbitraryPoint(currentPosition, ...)` — graph snap happens inside the
|
|
40
|
+
* engine, no booth proxy needed.
|
|
41
|
+
*/
|
|
33
42
|
getNearestBooth(position: CurrentPosition): Booth | null;
|
|
34
43
|
setMarkers(data: MarkersData): void;
|
|
35
44
|
selectMarker(id: string, focus: boolean): Promise<void>;
|
|
@@ -64,10 +73,10 @@ export declare function separateExternalIds(externalIds: string[]): {
|
|
|
64
73
|
};
|
|
65
74
|
export declare function extractRoute(from: string, to: string, waypoints: string[]): Route;
|
|
66
75
|
export declare class Route {
|
|
67
|
-
from: Booth;
|
|
68
|
-
to: Booth;
|
|
76
|
+
from: Booth | ArbitraryPoint | null;
|
|
77
|
+
to: Booth | ArbitraryPoint | null;
|
|
69
78
|
waypoints?: Booth[] | undefined;
|
|
70
|
-
constructor(from: Booth, to: Booth, waypoints?: Booth[] | undefined);
|
|
79
|
+
constructor(from: Booth | ArbitraryPoint | null, to: Booth | ArbitraryPoint | null, waypoints?: Booth[] | undefined);
|
|
71
80
|
}
|
|
72
81
|
export declare class CurrentPosition extends Point {
|
|
73
82
|
x: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__esDecorate as i,__runInitializers as r}from"tslib";import{action as m,computed as x,observable as d}from"mobx";import{Point as Ke,lineLength as Oe}from"simple-geometry";import n,{boothStore as Xe,layersStore as T}from".";import{fpGeo as E}from"../data/fpGeo";import z from"../core/Rect";import{GaEventActions as He,sendEventToGa as Je}from"../tools/gtag";import{convertGpsToLocal as Ue,isValidPointCoords as Ne,calculateRelativeBearing as Qe}from"../utils/gps";import{getLayerSvg as et,svgArea as k}from"../data/svg";import{createWayfindingEngine as tt}from"../wayfinding/core";import{boothToEndpoint as Ze,graphDataSource as qe}from"../wayfinding/adapters";import{LayersMode as st}from"./LayerStore";import{uiState as y}from"./index";import{calcSpeed as $e}from"../utils/calcSpeed";import{calcTravelTime as Ve}from"../utils/calcTravelTime";import{DEFAULT_UNITS as je,ORIENTATION_GRANTED_KEY as at}from"../constants";import{areLayersEnabled as it}from"../utils/areLayersEnabled";import{shouldReroute as rt}from"../wayfinding/core";import{findBoothInRadius as nt}from"../wayfinding/utils/findBoothInRadius";import P from"../data";import We from"../tools/logger";const b=a=>typeof a=="string"?Number(a.replace(",",".")):a;let ot=(()=>{let a=[],o,l=[],f=[],h,S=[],L=[],D,I=[],w=[],A,M=[],C=[],B,F=[],G=[],O,U=[],N=[],Z,q=[],$=[],V,j=[],W=[],Y,K=[],X=[],H,J=[],Q=[],ee,te=[],se=[],ae,ie=[],re=[],ne,oe=[],le=[],ce,ue=[],de=[],fe,me,he,pe,_e,ge,ye,ke,be,ve,xe,Re,Se,Le=[],Te=[],Ee,ze,Pe,De,Ie,we,Ae=[],Me=[],Ce,Be,Fe;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;o=[d],h=[d],D=[d],A=[d],B=[d],O=[d],Z=[d],V=[d],Y=[d],H=[d],ee=[d],ae=[d],ne=[d],ce=[d],fe=[x],me=[m],he=[m],pe=[x({keepAlive:!0})],_e=[x({keepAlive:!0})],ge=[m],ye=[m],ke=[x({keepAlive:!0})],be=[x({keepAlive:!0})],ve=[m],xe=[m],Re=[m],Se=[d],Ee=[x],ze=[m],Pe=[m],De=[m],Ie=[m],we=[d],Ce=[m],Be=[x({keepAlive:!0})],Fe=[m],i(this,null,fe,{kind:"getter",name:"canFindLocation",static:!1,private:!1,access:{has:e=>"canFindLocation"in e,get:e=>e.canFindLocation},metadata:t},null,a),i(this,null,me,{kind:"method",name:"selectRoute",static:!1,private:!1,access:{has:e=>"selectRoute"in e,get:e=>e.selectRoute},metadata:t},null,a),i(this,null,he,{kind:"method",name:"setStartPoint",static:!1,private:!1,access:{has:e=>"setStartPoint"in e,get:e=>e.setStartPoint},metadata:t},null,a),i(this,null,pe,{kind:"getter",name:"pathLayers",static:!1,private:!1,access:{has:e=>"pathLayers"in e,get:e=>e.pathLayers},metadata:t},null,a),i(this,null,_e,{kind:"getter",name:"nearestBooth",static:!1,private:!1,access:{has:e=>"nearestBooth"in e,get:e=>e.nearestBooth},metadata:t},null,a),i(this,null,ge,{kind:"method",name:"setMarkers",static:!1,private:!1,access:{has:e=>"setMarkers"in e,get:e=>e.setMarkers},metadata:t},null,a),i(this,null,ye,{kind:"method",name:"selectMarker",static:!1,private:!1,access:{has:e=>"selectMarker"in e,get:e=>e.selectMarker},metadata:t},null,a),i(this,null,ke,{kind:"getter",name:"selectedMarkers",static:!1,private:!1,access:{has:e=>"selectedMarkers"in e,get:e=>e.selectedMarkers},metadata:t},null,a),i(this,null,be,{kind:"getter",name:"layers",static:!1,private:!1,access:{has:e=>"layers"in e,get:e=>e.layers},metadata:t},null,a),i(this,null,ve,{kind:"method",name:"clickRoute",static:!1,private:!1,access:{has:e=>"clickRoute"in e,get:e=>e.clickRoute},metadata:t},null,a),i(this,null,xe,{kind:"method",name:"selectCurrentPosition",static:!1,private:!1,access:{has:e=>"selectCurrentPosition"in e,get:e=>e.selectCurrentPosition},metadata:t},null,a),i(this,null,Re,{kind:"method",name:"findLocation",static:!1,private:!1,access:{has:e=>"findLocation"in e,get:e=>e.findLocation},metadata:t},null,a),i(this,null,Ee,{kind:"getter",name:"routeInfo",static:!1,private:!1,access:{has:e=>"routeInfo"in e,get:e=>e.routeInfo},metadata:t},null,a),i(this,null,ze,{kind:"method",name:"updateRoute",static:!1,private:!1,access:{has:e=>"updateRoute"in e,get:e=>e.updateRoute},metadata:t},null,a),i(this,null,Pe,{kind:"method",name:"updateRouteDistance",static:!1,private:!1,access:{has:e=>"updateRouteDistance"in e,get:e=>e.updateRouteDistance},metadata:t},null,a),i(this,null,De,{kind:"method",name:"updateRoutePoints",static:!1,private:!1,access:{has:e=>"updateRoutePoints"in e,get:e=>e.updateRoutePoints},metadata:t},null,a),i(this,null,Ie,{kind:"method",name:"checkRoutes",static:!1,private:!1,access:{has:e=>"checkRoutes"in e,get:e=>e.checkRoutes},metadata:t},null,a),i(this,null,Ce,{kind:"method",name:"setGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"setGpsTrackingEnabled"in e,get:e=>e.setGpsTrackingEnabled},metadata:t},null,a),i(this,null,Be,{kind:"getter",name:"gpsEnabled",static:!1,private:!1,access:{has:e=>"gpsEnabled"in e,get:e=>e.gpsEnabled},metadata:t},null,a),i(this,null,Fe,{kind:"method",name:"setOnlyAccessible",static:!1,private:!1,access:{has:e=>"setOnlyAccessible"in e,get:e=>e.setOnlyAccessible},metadata:t},null,a),i(null,null,o,{kind:"field",name:"routeLines",static:!1,private:!1,access:{has:e=>"routeLines"in e,get:e=>e.routeLines,set:(e,s)=>{e.routeLines=s}},metadata:t},l,f),i(null,null,h,{kind:"field",name:"routeDistance",static:!1,private:!1,access:{has:e=>"routeDistance"in e,get:e=>e.routeDistance,set:(e,s)=>{e.routeDistance=s}},metadata:t},S,L),i(null,null,D,{kind:"field",name:"currentPosition",static:!1,private:!1,access:{has:e=>"currentPosition"in e,get:e=>e.currentPosition,set:(e,s)=>{e.currentPosition=s}},metadata:t},I,w),i(null,null,A,{kind:"field",name:"requestCompass",static:!1,private:!1,access:{has:e=>"requestCompass"in e,get:e=>e.requestCompass,set:(e,s)=>{e.requestCompass=s}},metadata:t},M,C),i(null,null,B,{kind:"field",name:"iconType",static:!1,private:!1,access:{has:e=>"iconType"in e,get:e=>e.iconType,set:(e,s)=>{e.iconType=s}},metadata:t},F,G),i(null,null,O,{kind:"field",name:"tempToBooth",static:!1,private:!1,access:{has:e=>"tempToBooth"in e,get:e=>e.tempToBooth,set:(e,s)=>{e.tempToBooth=s}},metadata:t},U,N),i(null,null,Z,{kind:"field",name:"defaultFrom",static:!1,private:!1,access:{has:e=>"defaultFrom"in e,get:e=>e.defaultFrom,set:(e,s)=>{e.defaultFrom=s}},metadata:t},q,$),i(null,null,V,{kind:"field",name:"focusEnabled",static:!1,private:!1,access:{has:e=>"focusEnabled"in e,get:e=>e.focusEnabled,set:(e,s)=>{e.focusEnabled=s}},metadata:t},j,W),i(null,null,Y,{kind:"field",name:"prevZ",static:!1,private:!1,access:{has:e=>"prevZ"in e,get:e=>e.prevZ,set:(e,s)=>{e.prevZ=s}},metadata:t},K,X),i(null,null,H,{kind:"field",name:"markersData",static:!1,private:!1,access:{has:e=>"markersData"in e,get:e=>e.markersData,set:(e,s)=>{e.markersData=s}},metadata:t},J,Q),i(null,null,ee,{kind:"field",name:"prevMarkers",static:!1,private:!1,access:{has:e=>"prevMarkers"in e,get:e=>e.prevMarkers,set:(e,s)=>{e.prevMarkers=s}},metadata:t},te,se),i(null,null,ae,{kind:"field",name:"showAccessible",static:!1,private:!1,access:{has:e=>"showAccessible"in e,get:e=>e.showAccessible,set:(e,s)=>{e.showAccessible=s}},metadata:t},ie,re),i(null,null,ne,{kind:"field",name:"onlyAccessible",static:!1,private:!1,access:{has:e=>"onlyAccessible"in e,get:e=>e.onlyAccessible,set:(e,s)=>{e.onlyAccessible=s}},metadata:t},oe,le),i(null,null,ce,{kind:"field",name:"currentRouteLayer",static:!1,private:!1,access:{has:e=>"currentRouteLayer"in e,get:e=>e.currentRouteLayer,set:(e,s)=>{e.currentRouteLayer=s}},metadata:t},ue,de),i(null,null,Se,{kind:"field",name:"routeUnits",static:!1,private:!1,access:{has:e=>"routeUnits"in e,get:e=>e.routeUnits,set:(e,s)=>{e.routeUnits=s}},metadata:t},Le,Te),i(null,null,we,{kind:"field",name:"isGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"isGpsTrackingEnabled"in e,get:e=>e.isGpsTrackingEnabled,set:(e,s)=>{e.isGpsTrackingEnabled=s}},metadata:t},Ae,Me),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=r(this,a);cpTimeout;routeLines=r(this,l,[]);routeDistance=(r(this,f),r(this,S,null));currentPosition=(r(this,L),r(this,I,null));requestCompass=(r(this,w),r(this,M,!1));iconType=(r(this,C),r(this,F,0));tempToBooth=(r(this,G),r(this,U,null));defaultFrom=(r(this,N),r(this,q,null));focusEnabled=(r(this,$),r(this,j,!0));prevZ=(r(this,W),r(this,K,null));markersData=(r(this,X),r(this,J,{icons:[],markers:[]}));prevMarkers=(r(this,Q),r(this,te,[]));showAccessible=(r(this,se),r(this,ie,!!qe.getLines().find(t=>t.unaccessible)));onlyAccessible=(r(this,re),r(this,oe,!1));currentRouteLayer=(r(this,le),r(this,ue,null));constructor(t){r(this,Me),this.rootStore=t,this.focusEnabled=!window.location.search}get canFindLocation(){return!!this.defaultFrom||!!this.currentPosition}selectRoute(t,e=!0){e&&(y.list={type:"search",text:"",focused:!1}),!t?.from&&t?.to&&this.currentPosition&&(t.from=this.nearestBooth),t?.from&&t?.to&&t.from===t.to&&(t=null);let s=[];t?.from&&t?.to&&window.setTimeout(()=>{this.rootStore.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50),t?.from?.visible&&s.push(t.from),t?.to?.visible&&(this.tempToBooth=null,s.push(t.to)),!t&&n.fp.onDirection&&n.fp.onDirection(null),setTimeout(()=>{this.rootStore.moveToList(s),y.details=t,t&&(!t.from||!t.to)&&n.showOverlay(),t?.to&&t?.from?.layer&&this.rootStore.layerStore.updateVisibility(t.from.layer,!0),!this.currentRouteLayer&&t?.from?.layer&&(this.currentRouteLayer=t?.from?.layer),e&&t?.from&&t?.to&&Je(He.ClickDirections,`${t?.from?"From "+t.from.name:""} ${t?.to?"To "+t.to.name:""}`)},200)}setStartPoint(t){const e=y.selectedRoute;if(e?.to&&!e?.from&&t){const s=new Route(t,e.to,e.waypoints);this.selectRoute(s)}}get pathLayers(){return n.routeStore.routeLines?.map(t=>t.p0.layer)?.filter((t,e,s)=>s.indexOf(t)===e).reverse().map((t,e)=>({id:e+1,layer:n.layerStore.findLayer(t)}))}get nearestBooth(){return this.getNearestBooth(this.currentPosition)}getNearestBooth(t){if(!t)return null;let e=this.rootStore.layerStore.findLayer(t.z);const s=t.lat&&t.lng?Ue(t,E.properties.config):t;return this.rootStore.boothStore.booths.filter(c=>T.mode===st.Default||!e?c.visible&&c.rect:c.rect&&(typeof t.z!="number"&&!t.z&&c.visible||e.name===c.layer?.name)).sort((c,u)=>Oe(s,{x:c.rect.cx,y:c.rect.cy})-Oe(s,{x:u.rect.cx,y:u.rect.cy}))[0]||null}setMarkers(t){this.markersData.markers=(t?.markers??[]).map(lt),this.markersData.icons=t?.icons??[]}selectMarker(t,e){const s=this.markersData.markers.find(u=>u.id===t);this.markersData.markers.forEach(u=>u.active=!1),s&&(s.active=!0);let c=n.layerStore.findLayer(s?.z);if(e&&s){const u=n.rendererService.renderer;return c&&!c?.visible&&T.updateVisibility(c,!0),u?u.controls.panTo(s.x,s.y):(We.warn("Renderer is not initialized. Cannot pan to marker."),Promise.resolve())}return Promise.resolve()}get selectedMarkers(){return this.markersData.markers.filter(t=>t.active)}get layers(){var t=[];return n.routeStore.routeLines?.map(e=>e.p0.layer).reverse().forEach(e=>{t.indexOf(e)===-1&&t.push(e)}),t.map(e=>n.layerStore.layers.find(s=>s.name===e))}clickRoute(t,e){window.__resett&&window.__resett(),this.rootStore.uiState.menu=null,y.list.type==="route-planner"&&(y.list={type:"search",text:"",focused:!1}),this.selectRoute(new Route(this.defaultFrom||t,e))}selectCurrentPosition(t,e=!0,s){clearTimeout(this.cpTimeout),t&&(t.x=b(t.x),t.y=b(t.y),t.lat=b(t.lat),t.lng=b(t.lng),it()||(t.z=null));const c=e&&this.rootStore.uiState.details&&!(this.rootStore.uiState.details instanceof Route),u=e&&!c&&(this.focusEnabled||this.prevZ!=t?.z);this.focusEnabled&&(this.focusEnabled=!1),this.prevZ=t?.z?.toString(),this.iconType=s?1:0;const _=t?ct(t):null;if(!_){this.currentPosition=null;return}const p=n.layerStore.findLayer(t.z),g=new CurrentPosition(_.x,_.y,p?.name||this.currentRouteLayer?.name,Qe(_),t.lat,t.lng),R=y.selectedRoute;let Ge=!this.routeLines?.length;if(p&&this.routeLines?.length&&(Ge=!!this.routeLines.find(v=>v.p0.layer===p.name||v.p1.layer===p.name)),u&&Ge){const v=n.rendererService.renderer;if(p&&!p?.visible&&T.updateVisibility(p,!0),!v){We.warn("Renderer is not initialized. Cannot pan to current position.");return}v.controls.panTo(g.x,g.y)}const Ye=(P.flags?.enableExperimentalRerouting||E?.properties?.config?.enableExperimentalRerouting)&&rt(g,this.routeLines)&&!!nt(g,Xe.booths,[R?.to]);if(e&&R&&Ye){const v=n.routeStore.getNearestBooth(g);n.routeStore.selectRoute(new Route(v,R?.to),!1)}this.currentPosition=g,this.gpsEnabled||(this.cpTimeout=setTimeout(()=>{this.currentPosition&&this.selectCurrentPosition(null,!1)},30*1e3))}findLocation(){if(this.canFindLocation){if(n.maplibreStore.showMaplibre){y.moveToLocation=!0;return}if(n.routeStore.currentPosition){const t=n.routeStore.currentPosition,e=z.fromCxcywh(t.x,t.y,100,100);let s;if(e.intersects(k))s=e;else{const _=Math.max(k.x1,Math.min(t.x,k.x2)),p=Math.max(k.y1,Math.min(t.y,k.y2)),g=Math.min(k.w,k.h)*.3,R=z.fromCxcywh(_,p,g,g).getIntersection(k);s=z.fromMultiple([e,R])}localStorage.getItem(at)==="false"&&(n.routeStore.requestCompass=!0),y.moveToRect=s;const u=n.layerStore.findLayer(n.routeStore.currentPosition?.z);u&&T.updateVisibility(u,!0)}else n.selectBooth(n.routeStore.defaultFrom)}}routeUnits=(r(this,de),r(this,Le,je));get routeInfo(){const t=this.routeDistance,e=this.routeUnits;return t?{distance:`${t}${e}`,units:e,time:Ve(t,$e(e))}:null}updateRoute(t,e){!t?.length&&!this.routeLines.length||(this.routeLines=t,this.updateRoutePoints())}updateRouteDistance(t){if(t==null)return;const e=et(),s=(e.getAttribute("units")||je).toLowerCase?.().trim(),c=e.getAttribute("fp-ver")?.startsWith("5")??!1;this.routeDistance=Math.round(t/(c?1:10)),this.routeUnits=s,this.updateRoutePoints()}updateRoutePoints(){const t=y.selectedRoute,e=this.routeDistance,s=this.routeUnits;n.fp.onDirection&&setTimeout(()=>{n.fp.onDirection({from:t?.from?{id:t.from.id,name:t.from.name,externalId:t.from.externalId,layer:{name:t.from?.layer?.name,description:t.from?.layer?.description}}:null,to:t?.to?{id:t.to.id,name:t.to.name,externalId:t.to.externalId,layer:{name:t.to.layer?.name,description:t.to.layer?.description}}:null,lines:this.routeLines,distance:`${e}${s}`,units:s,time:Ve(e,$e(s))})},200)}checkRoutes(){const t=tt(qe),e=n.boothStore.booths;console.info(`Route check started ${e.length}.... `);for(let s=0;s<e.length;s++){const c=e[s];for(let u=s+1;u<e.length;u++){const _=e[u];t.buildRoute(Ze(c),Ze(_)).lines.length||console.warn(`No route found from ${c.name} to ${_.name}`)}}console.info("Route check done....")}isGpsTrackingEnabled=(r(this,Te),r(this,Ae,!0));setGpsTrackingEnabled(t){this.isGpsTrackingEnabled=t}get gpsEnabled(){return P.autoTrackingGps&&this.isGpsTrackingEnabled&&!P.enableIPS}setOnlyAccessible(t){this.onlyAccessible=t}}})();export default ot;function lt(a){return{...a,x:b(a.x),y:b(a.y),lat:b(a.lat),lng:b(a.lng)}}function ct(a){let o=null,l=null;return E&&(o=E.properties.config),o&&a.x>=o.p0.x&&a.x<=o.p2.x&&a.y>=o.p0.y&&a.y<=o.p2.y?l={...a}:o&&Ne(a.lat)&&Ne(a.lng)?l=Ue(a,o):o||(l=a),l||null}export function findBooth(a){return n.boothStore.findBooth(a)||n.exhibitorStore.findExhibitor(a)?.booths[0]}export function findEntityByExternalId(a){const o=n.boothStore.boothByExternalId.get(a);if(o)return{type:"booth",entity:o};const l=n.exhibitorStore.exhibitorByExternalId.get(a);if(l)return{type:"exhibitor",entity:l}}export function separateExternalIds(a){const o=[],l=[];for(const f of a){const h=findEntityByExternalId(f);h&&(h.type==="booth"?o.push(f):l.push(f))}return{boothExternalIds:o,exhibitorExternalIds:l}}export function extractRoute(a,o,l){return new Route(findBooth(a)??n.routeStore.defaultFrom??null,findBooth(o),l?.map(f=>findBooth(f)))}export class Route{from;to;waypoints;constructor(o,l,f){this.from=o,this.to=l,this.waypoints=f,this.waypoints=f?.filter(h=>h&&h.id!==o?.id&&h.id!==l?.id)}}export class CurrentPosition extends Ke{x;y;z;angle;lat;lng;constructor(o,l,f,h,S,L){super(o,l),this.x=o,this.y=l,this.z=f,this.angle=h,this.lat=S,this.lng=L}}
|
|
1
|
+
import{__esDecorate as i,__runInitializers as n}from"tslib";import{action as h,computed as x,observable as f}from"mobx";import{Point as We,lineLength as Ce}from"simple-geometry";import u,{layersStore as S}from".";import{fpGeo as E}from"../data/fpGeo";import P from"../core/Rect";import{GaEventActions as Xe,sendEventToGa as Ye}from"../tools/gtag";import{convertGpsToLocal as Ge,isValidPointCoords as Oe,calculateRelativeBearing as He}from"../utils/gps";import{getLayerSvg as Je,svgArea as k}from"../data/svg";import{createWayfindingEngine as Qe}from"../wayfinding/core";import{CURRENT_LOCATION_NAME as et,CURRENT_POSITION_POINT_ID as tt,KIOSK_ANCHOR_POINT_ID as st,boothToEndpoint as Fe,graphDataSource as Ne,toArbitraryPoint as Be}from"../wayfinding/adapters";import{getName as at}from"../components/Kiosk/SetKiosk";import{BoothBase as v}from"./BoothStore";import{LayersMode as it}from"./LayerStore";import{uiState as _}from"./index";import{calcSpeed as Ue}from"../utils/calcSpeed";import{calcTravelTime as Ze}from"../utils/calcTravelTime";import{DEFAULT_UNITS as qe,ORIENTATION_GRANTED_KEY as rt}from"../constants";import{areLayersEnabled as nt}from"../utils/areLayersEnabled";import $e from"../data";import Ve from"../tools/logger";const b=s=>typeof s=="string"?Number(s.replace(",",".")):s;let ot=(()=>{let s=[],r,l=[],p=[],y,R=[],g=[],z,D=[],I=[],A,w=[],M=[],C,G=[],O=[],F,N=[],B=[],U,Z=[],q=[],$,V=[],K=[],j,W=[],X=[],Y,H=[],J=[],Q,ee=[],te=[],se,ae=[],ie=[],re,ne=[],oe=[],le,ce,ue,de,fe,me,he,pe,_e,ye,ge,ke,be,ve=[],Re=[],xe,Le,Te,Se,Ee,Pe,ze=[],De=[],Ie,Ae,we;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;r=[f],y=[f],z=[f],A=[f],C=[f],F=[f],U=[f],$=[f],j=[f],Y=[f],Q=[f],se=[f],re=[f],le=[x],ce=[h],ue=[h],de=[h],fe=[x({keepAlive:!0})],me=[h],he=[h],pe=[x({keepAlive:!0})],_e=[x({keepAlive:!0})],ye=[h],ge=[h],ke=[h],be=[f],xe=[x],Le=[h],Te=[h],Se=[h],Ee=[h],Pe=[f],Ie=[h],Ae=[x({keepAlive:!0})],we=[h],i(this,null,le,{kind:"getter",name:"canFindLocation",static:!1,private:!1,access:{has:e=>"canFindLocation"in e,get:e=>e.canFindLocation},metadata:t},null,s),i(this,null,ce,{kind:"method",name:"selectRoute",static:!1,private:!1,access:{has:e=>"selectRoute"in e,get:e=>e.selectRoute},metadata:t},null,s),i(this,null,ue,{kind:"method",name:"rebuildRouteFromPosition",static:!1,private:!1,access:{has:e=>"rebuildRouteFromPosition"in e,get:e=>e.rebuildRouteFromPosition},metadata:t},null,s),i(this,null,de,{kind:"method",name:"setStartPoint",static:!1,private:!1,access:{has:e=>"setStartPoint"in e,get:e=>e.setStartPoint},metadata:t},null,s),i(this,null,fe,{kind:"getter",name:"pathLayers",static:!1,private:!1,access:{has:e=>"pathLayers"in e,get:e=>e.pathLayers},metadata:t},null,s),i(this,null,me,{kind:"method",name:"setMarkers",static:!1,private:!1,access:{has:e=>"setMarkers"in e,get:e=>e.setMarkers},metadata:t},null,s),i(this,null,he,{kind:"method",name:"selectMarker",static:!1,private:!1,access:{has:e=>"selectMarker"in e,get:e=>e.selectMarker},metadata:t},null,s),i(this,null,pe,{kind:"getter",name:"selectedMarkers",static:!1,private:!1,access:{has:e=>"selectedMarkers"in e,get:e=>e.selectedMarkers},metadata:t},null,s),i(this,null,_e,{kind:"getter",name:"layers",static:!1,private:!1,access:{has:e=>"layers"in e,get:e=>e.layers},metadata:t},null,s),i(this,null,ye,{kind:"method",name:"clickRoute",static:!1,private:!1,access:{has:e=>"clickRoute"in e,get:e=>e.clickRoute},metadata:t},null,s),i(this,null,ge,{kind:"method",name:"selectCurrentPosition",static:!1,private:!1,access:{has:e=>"selectCurrentPosition"in e,get:e=>e.selectCurrentPosition},metadata:t},null,s),i(this,null,ke,{kind:"method",name:"findLocation",static:!1,private:!1,access:{has:e=>"findLocation"in e,get:e=>e.findLocation},metadata:t},null,s),i(this,null,xe,{kind:"getter",name:"routeInfo",static:!1,private:!1,access:{has:e=>"routeInfo"in e,get:e=>e.routeInfo},metadata:t},null,s),i(this,null,Le,{kind:"method",name:"updateRoute",static:!1,private:!1,access:{has:e=>"updateRoute"in e,get:e=>e.updateRoute},metadata:t},null,s),i(this,null,Te,{kind:"method",name:"updateRouteDistance",static:!1,private:!1,access:{has:e=>"updateRouteDistance"in e,get:e=>e.updateRouteDistance},metadata:t},null,s),i(this,null,Se,{kind:"method",name:"updateRoutePoints",static:!1,private:!1,access:{has:e=>"updateRoutePoints"in e,get:e=>e.updateRoutePoints},metadata:t},null,s),i(this,null,Ee,{kind:"method",name:"checkRoutes",static:!1,private:!1,access:{has:e=>"checkRoutes"in e,get:e=>e.checkRoutes},metadata:t},null,s),i(this,null,Ie,{kind:"method",name:"setGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"setGpsTrackingEnabled"in e,get:e=>e.setGpsTrackingEnabled},metadata:t},null,s),i(this,null,Ae,{kind:"getter",name:"gpsEnabled",static:!1,private:!1,access:{has:e=>"gpsEnabled"in e,get:e=>e.gpsEnabled},metadata:t},null,s),i(this,null,we,{kind:"method",name:"setOnlyAccessible",static:!1,private:!1,access:{has:e=>"setOnlyAccessible"in e,get:e=>e.setOnlyAccessible},metadata:t},null,s),i(null,null,r,{kind:"field",name:"routeLines",static:!1,private:!1,access:{has:e=>"routeLines"in e,get:e=>e.routeLines,set:(e,a)=>{e.routeLines=a}},metadata:t},l,p),i(null,null,y,{kind:"field",name:"routeDistance",static:!1,private:!1,access:{has:e=>"routeDistance"in e,get:e=>e.routeDistance,set:(e,a)=>{e.routeDistance=a}},metadata:t},R,g),i(null,null,z,{kind:"field",name:"currentPosition",static:!1,private:!1,access:{has:e=>"currentPosition"in e,get:e=>e.currentPosition,set:(e,a)=>{e.currentPosition=a}},metadata:t},D,I),i(null,null,A,{kind:"field",name:"requestCompass",static:!1,private:!1,access:{has:e=>"requestCompass"in e,get:e=>e.requestCompass,set:(e,a)=>{e.requestCompass=a}},metadata:t},w,M),i(null,null,C,{kind:"field",name:"iconType",static:!1,private:!1,access:{has:e=>"iconType"in e,get:e=>e.iconType,set:(e,a)=>{e.iconType=a}},metadata:t},G,O),i(null,null,F,{kind:"field",name:"tempToBooth",static:!1,private:!1,access:{has:e=>"tempToBooth"in e,get:e=>e.tempToBooth,set:(e,a)=>{e.tempToBooth=a}},metadata:t},N,B),i(null,null,U,{kind:"field",name:"focusEnabled",static:!1,private:!1,access:{has:e=>"focusEnabled"in e,get:e=>e.focusEnabled,set:(e,a)=>{e.focusEnabled=a}},metadata:t},Z,q),i(null,null,$,{kind:"field",name:"prevZ",static:!1,private:!1,access:{has:e=>"prevZ"in e,get:e=>e.prevZ,set:(e,a)=>{e.prevZ=a}},metadata:t},V,K),i(null,null,j,{kind:"field",name:"markersData",static:!1,private:!1,access:{has:e=>"markersData"in e,get:e=>e.markersData,set:(e,a)=>{e.markersData=a}},metadata:t},W,X),i(null,null,Y,{kind:"field",name:"prevMarkers",static:!1,private:!1,access:{has:e=>"prevMarkers"in e,get:e=>e.prevMarkers,set:(e,a)=>{e.prevMarkers=a}},metadata:t},H,J),i(null,null,Q,{kind:"field",name:"showAccessible",static:!1,private:!1,access:{has:e=>"showAccessible"in e,get:e=>e.showAccessible,set:(e,a)=>{e.showAccessible=a}},metadata:t},ee,te),i(null,null,se,{kind:"field",name:"onlyAccessible",static:!1,private:!1,access:{has:e=>"onlyAccessible"in e,get:e=>e.onlyAccessible,set:(e,a)=>{e.onlyAccessible=a}},metadata:t},ae,ie),i(null,null,re,{kind:"field",name:"currentRouteLayer",static:!1,private:!1,access:{has:e=>"currentRouteLayer"in e,get:e=>e.currentRouteLayer,set:(e,a)=>{e.currentRouteLayer=a}},metadata:t},ne,oe),i(null,null,be,{kind:"field",name:"routeUnits",static:!1,private:!1,access:{has:e=>"routeUnits"in e,get:e=>e.routeUnits,set:(e,a)=>{e.routeUnits=a}},metadata:t},ve,Re),i(null,null,Pe,{kind:"field",name:"isGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"isGpsTrackingEnabled"in e,get:e=>e.isGpsTrackingEnabled,set:(e,a)=>{e.isGpsTrackingEnabled=a}},metadata:t},ze,De),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=n(this,s);cpTimeout;routeLines=n(this,l,[]);routeDistance=(n(this,p),n(this,R,null));currentPosition=(n(this,g),n(this,D,null));requestCompass=(n(this,I),n(this,w,!1));iconType=(n(this,M),n(this,G,0));tempToBooth=(n(this,O),n(this,N,null));focusEnabled=(n(this,B),n(this,Z,!0));prevZ=(n(this,q),n(this,V,null));markersData=(n(this,K),n(this,W,{icons:[],markers:[]}));prevMarkers=(n(this,X),n(this,H,[]));showAccessible=(n(this,J),n(this,ee,!!Ne.getLines().find(t=>t.unaccessible)));onlyAccessible=(n(this,te),n(this,ae,!1));currentRouteLayer=(n(this,ie),n(this,ne,null));constructor(t){n(this,De),this.rootStore=t,this.focusEnabled=!window.location.search}get canFindLocation(){return!!_.kioskData||!!this.currentPosition}selectRoute(t,e=!0,a=!1){if(e&&(_.list={type:"search",text:"",focused:!1}),t&&!t.from&&t.to){const d=this.resolveFallbackFrom();d&&(t=new Route(d,t.to,t.waypoints))}t?.from&&t?.to&&t.from===t.to&&(t=null);let o=[];t?.from&&t?.to&&window.setTimeout(()=>{this.rootStore.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50),t?.from instanceof v&&t.from.visible&&o.push(t.from),t?.to instanceof v&&t.to.visible&&(this.tempToBooth=null,o.push(t.to)),!t&&u.fp.onDirection&&u.fp.onDirection(null);const c=()=>{if(this.rootStore.moveToList(o),_.details=t,t&&(!t.from||!t.to)&&u.showOverlay(),t?.to&&t?.from){const d=lt(t.from);d&&this.rootStore.layerStore.updateVisibility(d,!0)}if(!this.currentRouteLayer){const d=Ke(this.rootStore.layerStore,t?.from),m=Ke(this.rootStore.layerStore,t?.to);d?this.currentRouteLayer=d:m&&(this.currentRouteLayer=m)}e&&t?.from&&t?.to&&Ye(Xe.ClickDirections,`${t?.from?"From "+t.from.name:""} ${t?.to?"To "+t.to.name:""}`)};a?c():setTimeout(c,200)}rebuildRouteFromPosition(t){const e=_.selectedRoute;e?.to&&this.selectRoute(new Route(t,e.to,e.waypoints),!1,!0)}resolveFallbackFrom(){if(this.currentPosition)return Be(this.currentPosition,et,tt);const t=_.kioskData;return t?Be({x:t.x,y:t.y,z:t.z},at(),st):null}setStartPoint(t){const e=_.selectedRoute;if(e?.to&&!e?.from&&t){const a=new Route(t,e.to,e.waypoints);this.selectRoute(a)}}get pathLayers(){return u.routeStore.routeLines?.map(t=>t.p0.layer)?.filter((t,e,a)=>a.indexOf(t)===e).reverse().map((t,e)=>({id:e+1,layer:u.layerStore.findLayer(t)}))}getNearestBooth(t){if(!t)return null;let e=this.rootStore.layerStore.findLayer(t.z);const a=t.lat&&t.lng?Ge(t,E.properties.config):t;return this.rootStore.boothStore.booths.filter(o=>S.mode===it.Default||!e?o.visible&&o.rect:o.rect&&(typeof t.z!="number"&&!t.z&&o.visible||e.name===o.layer?.name)).sort((o,c)=>Ce(a,{x:o.rect.cx,y:o.rect.cy})-Ce(a,{x:c.rect.cx,y:c.rect.cy}))[0]||null}setMarkers(t){this.markersData.markers=(t?.markers??[]).map(ct),this.markersData.icons=t?.icons??[]}selectMarker(t,e){const a=this.markersData.markers.find(c=>c.id===t);this.markersData.markers.forEach(c=>c.active=!1),a&&(a.active=!0);let o=u.layerStore.findLayer(a?.z);if(e&&a){const c=u.rendererService.renderer;return o&&!o?.visible&&S.updateVisibility(o,!0),c?c.controls.panTo(a.x,a.y):(Ve.warn("Renderer is not initialized. Cannot pan to marker."),Promise.resolve())}return Promise.resolve()}get selectedMarkers(){return this.markersData.markers.filter(t=>t.active)}get layers(){var t=[];return u.routeStore.routeLines?.map(e=>e.p0.layer).reverse().forEach(e=>{t.indexOf(e)===-1&&t.push(e)}),t.map(e=>u.layerStore.layers.find(a=>a.name===e))}clickRoute(t,e){window.__resett&&window.__resett(),this.rootStore.uiState.menu=null,_.list.type==="route-planner"&&(_.list={type:"search",text:"",focused:!1}),this.selectRoute(new Route(t,e))}selectCurrentPosition(t,e=!0,a){clearTimeout(this.cpTimeout),t&&(t.x=b(t.x),t.y=b(t.y),t.lat=b(t.lat),t.lng=b(t.lng),nt()||(t.z=null));const o=e&&this.rootStore.uiState.details&&!(this.rootStore.uiState.details instanceof Route),c=e&&!o&&(this.focusEnabled||this.prevZ!=t?.z);this.focusEnabled&&(this.focusEnabled=!1),this.prevZ=t?.z?.toString(),this.iconType=a?1:0;const d=t?ut(t):null;if(!d){this.currentPosition=null;return}const m=u.layerStore.findLayer(t.z),L=new CurrentPosition(d.x,d.y,m?.name||this.currentRouteLayer?.name,He(d),t.lat,t.lng);let Me=!this.routeLines?.length;if(m&&this.routeLines?.length&&(Me=!!this.routeLines.find(T=>T.p0.layer===m.name||T.p1.layer===m.name)),c&&Me){const T=u.rendererService.renderer;if(m&&!m?.visible&&S.updateVisibility(m,!0),!T){Ve.warn("Renderer is not initialized. Cannot pan to current position.");return}T.controls.panTo(L.x,L.y)}this.currentPosition=L,this.gpsEnabled||(this.cpTimeout=setTimeout(()=>{this.currentPosition&&this.selectCurrentPosition(null,!1)},30*1e3))}findLocation(){if(!this.canFindLocation)return;if(u.maplibreStore.showMaplibre){_.moveToLocation=!0;return}const t=this.currentPosition??_.kioskData;if(!t)return;this.currentPosition&&localStorage.getItem(rt)==="false"&&(u.routeStore.requestCompass=!0);const e=P.fromCxcywh(t.x,t.y,100,100);let a;if(e.intersects(k))a=e;else{const c=Math.max(k.x1,Math.min(t.x,k.x2)),d=Math.max(k.y1,Math.min(t.y,k.y2)),m=Math.min(k.w,k.h)*.3,L=P.fromCxcywh(c,d,m,m).getIntersection(k);a=P.fromMultiple([e,L])}_.moveToRect=a;const o=u.layerStore.findLayer(t.z);o&&S.updateVisibility(o,!0)}routeUnits=(n(this,oe),n(this,ve,qe));get routeInfo(){const t=this.routeDistance,e=this.routeUnits;return t?{distance:`${t}${e}`,units:e,time:Ze(t,Ue(e))}:null}updateRoute(t,e){!t?.length&&!this.routeLines.length||(this.routeLines=t,this.updateRoutePoints())}updateRouteDistance(t){if(t==null)return;const e=Je(),a=(e.getAttribute("units")||qe).toLowerCase?.().trim(),o=e.getAttribute("fp-ver")?.startsWith("5")??!1;this.routeDistance=Math.round(t/(o?1:10)),this.routeUnits=a,this.updateRoutePoints()}updateRoutePoints(){const t=_.selectedRoute,e=this.routeDistance,a=this.routeUnits;u.fp.onDirection&&setTimeout(()=>{u.fp.onDirection({from:je(t?.from??null),to:je(t?.to??null),lines:this.routeLines,distance:`${e}${a}`,units:a,time:Ze(e,Ue(a))})},200)}checkRoutes(){const t=Qe(Ne),e=u.boothStore.booths;console.info(`Route check started ${e.length}.... `);for(let a=0;a<e.length;a++){const o=e[a];for(let c=a+1;c<e.length;c++){const d=e[c];t.buildRoute(Fe(o),Fe(d)).lines.length||console.warn(`No route found from ${o.name} to ${d.name}`)}}console.info("Route check done....")}isGpsTrackingEnabled=(n(this,Re),n(this,ze,!0));setGpsTrackingEnabled(t){this.isGpsTrackingEnabled=t}get gpsEnabled(){return $e.autoTrackingGps&&this.isGpsTrackingEnabled&&!$e.enableIPS}setOnlyAccessible(t){this.onlyAccessible=t}}})();export default ot;function lt(s){if(s)return s instanceof v?s.layer?.name:s.layer}function Ke(s,r){return r?r instanceof v?r.layer??null:s.findLayer(r.layer):null}function ct(s){return{...s,x:b(s.x),y:b(s.y),lat:b(s.lat),lng:b(s.lng)}}function ut(s){let r=null,l=null;return E&&(r=E.properties.config),r&&s.x>=r.p0.x&&s.x<=r.p2.x&&s.y>=r.p0.y&&s.y<=r.p2.y?l={...s}:r&&Oe(s.lat)&&Oe(s.lng)?l=Ge(s,r):r||(l=s),l||null}export function findBooth(s){return u.boothStore.findBooth(s)||u.exhibitorStore.findExhibitor(s)?.booths[0]}export function findEntityByExternalId(s){const r=u.boothStore.boothByExternalId.get(s);if(r)return{type:"booth",entity:r};const l=u.exhibitorStore.exhibitorByExternalId.get(s);if(l)return{type:"exhibitor",entity:l}}export function separateExternalIds(s){const r=[],l=[];for(const p of s){const y=findEntityByExternalId(p);y&&(y.type==="booth"?r.push(p):l.push(p))}return{boothExternalIds:r,exhibitorExternalIds:l}}export function extractRoute(s,r,l){return new Route(findBooth(s)??null,findBooth(r)??null,l?.map(p=>findBooth(p)))}export class Route{from;to;waypoints;constructor(r,l,p){this.from=r,this.to=l,this.waypoints=p;const y=r instanceof v?r.id:void 0,R=l instanceof v?l.id:void 0;this.waypoints=p?.filter(g=>g&&g.id!==y&&g.id!==R)}}function je(s){return s?s instanceof v?{id:s.id,name:s.name,externalId:s.externalId,layer:{name:s.layer?.name,description:s.layer?.description}}:{id:Number.MAX_SAFE_INTEGER,name:s.name,externalId:void 0,layer:{name:s.layer,description:void 0}}:null}export class CurrentPosition extends We{x;y;z;angle;lat;lng;constructor(r,l,p,y,R,g){super(r,l),this.x=r,this.y=l,this.z=p,this.angle=y,this.lat=R,this.lng=g}}
|