@expofp/floorplan 3.23.2 → 3.23.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{Button-DBTihmKU.js → Button-CMjW-Wfe.js} +6 -6
- package/dist/browser/{CookieConsent-DlDte0lk.js → CookieConsent-CW284IES.js} +7 -7
- package/dist/browser/{Debug-BtvsTOMr.js → Debug-CnCFIYN7.js} +8 -8
- package/dist/browser/{Demo-_YQZ9fif.js → Demo-CYyNMvhs.js} +10 -10
- package/dist/browser/{Free-D6J6-cXi.js → Free-facWfhIR.js} +10 -10
- package/dist/browser/{GalleryContainer-BnUt1PNs.js → GalleryContainer-CN_T22CR.js} +11 -11
- package/dist/browser/{GpsLoader-OUCQ7ZMm.js → GpsLoader-CbUgoSPS.js} +35 -35
- package/dist/browser/{KioskStore-dFbTmzRX.js → KioskStore-ISJXu8M3.js} +7 -7
- package/dist/browser/{MaplibreAdapter-Dm0ssNYr.js → MaplibreAdapter-HozQALVd.js} +160 -160
- package/dist/browser/{ModalContainer-dPz6CJEz.js → ModalContainer-TFMi7yPb.js} +11 -11
- package/dist/browser/{PermissionNotice-CkPfMzyD.js → PermissionNotice-D8AsL3Rf.js} +7 -7
- package/dist/browser/{SetKioskMode-B-vMQm34.js → SetKioskMode-CMYbngGo.js} +9 -9
- package/dist/browser/{ShowKiosk-jHz_HhEH.js → ShowKiosk-Dz5ClbzP.js} +11 -11
- package/dist/browser/{ViewerMenuPanel-6QP-3jhe.js → ViewerMenuPanel-DYWI-sVx.js} +15 -15
- package/dist/browser/{add-debug-secret-listener-CKkrKZtV.js → add-debug-secret-listener-BqoA69bT.js} +1 -1
- package/dist/browser/{adopt-global-settings-DDOfuPoA.js → adopt-global-settings-gawg1AYH.js} +9 -9
- package/dist/browser/{boolean-editor-DbE8wBID.js → boolean-editor-D1Nenbcb.js} +9 -9
- package/dist/browser/{bootIntercom-W2WvsUkQ.js → bootIntercom-D8Ovpvsf.js} +2 -2
- package/dist/browser/{booth-by-xy-Bl9WXuO-.js → booth-by-xy-CDILVq68.js} +266 -266
- package/dist/browser/bundle.json +65 -65
- package/dist/browser/{classnames-Bg5rLqNN.js → classnames-AfOVHR26.js} +2 -2
- package/dist/browser/{client-DeQq5mQU.js → client-ssZKxczh.js} +4 -4
- package/dist/browser/{components-on0LMU5X.js → components-Dm6-yZm9.js} +1853 -1853
- package/dist/browser/{debug-overlay-DxDWBv6z.js → debug-overlay-DAGK3p4l.js} +11 -11
- package/dist/browser/{debug-ui-EkvTnZPW.js → debug-ui-C8LFrZdI.js} +6 -6
- package/dist/browser/{dist-UfmPsoUY.js → dist-CiboCeGu.js} +3 -3
- package/dist/browser/{dist-iqnveclN.js → dist-DJvRIVfK.js} +6 -6
- package/dist/browser/{dist-BSIFCb0t.js → dist-YLJ6P_kD.js} +5 -5
- package/dist/browser/{efp-debug-init-C0OHRZNn.js → efp-debug-init-CMVs44Ef.js} +3 -3
- package/dist/browser/{enum-editor-Beyz9Cw7.js → enum-editor-DjmY5QZ2.js} +4 -4
- package/dist/browser/{es5-BLugQzbi.js → es5-C-OnPKvg.js} +2 -2
- package/dist/browser/{event-not-found-BVuVRHWg.js → event-not-found-AA1zgSI7.js} +1 -1
- package/dist/browser/{exports-DbyVbUOC.js → exports-DXos-KW5.js} +1 -1
- package/dist/browser/{favicon-DpMbk9tx.js → favicon-D6BF75VK.js} +1 -1
- package/dist/browser/{fetch-retry.umd-BkW3rJuZ.js → fetch-retry.umd-BXpR-AMS.js} +2 -2
- package/dist/browser/{flex-DPKB0RuC.js → flex-CHBAsz6k.js} +5 -5
- package/dist/browser/{floorplan.loader-Bt4oybgX.js → floorplan.loader-CtjpCpCn.js} +15 -14
- package/dist/browser/{floorplan.ready-CwF4F1tf.js → floorplan.ready-BKDEkDPs.js} +320 -320
- package/dist/browser/{fuse-DDDXbqE_.js → fuse-joM66oL4.js} +2 -2
- package/dist/browser/{i18n-D_PeYM0A.js → i18n-B2PKgaRM.js} +5 -5
- package/dist/browser/index.js +14 -14
- package/dist/browser/{index.module-DPKx9U0o.js → index.module-DyN0SG5D.js} +4 -4
- package/dist/browser/{integrateKiosk-BQaVMEWM.js → integrateKiosk-D-dpWpO-.js} +4 -4
- package/dist/browser/{is-webview-BvcAtwvK.js → is-webview-D2trLq6x.js} +1 -1
- package/dist/browser/{jsx-runtime-CiltolM1.js → jsx-runtime-DCjpnPcf.js} +2 -2
- package/dist/browser/{kiosk-record-CDOXD0YR.js → kiosk-record-CWYTS2rI.js} +1 -1
- package/dist/browser/{lib-CLR-Jqc_.js → lib-C13YwwrK.js} +3 -3
- package/dist/browser/{loadImage-Bv8NDM3i.js → loadImage-C7nbLFSF.js} +4 -4
- package/dist/browser/{logDeviceInfo-IqDo_h8W.js → logDeviceInfo-Caz-vsUM.js} +9 -9
- package/dist/browser/{main-BfGxlpV2.js → main-DDHimzO8.js} +1 -1
- package/dist/browser/{mobx-DqXBQLr3.js → mobx-CSyFeOkR.js} +4 -4
- package/dist/browser/{optional-boolean-editor-C2OpCDdc.js → optional-boolean-editor-BRyOWGK-.js} +3 -3
- package/dist/browser/{optional-enum-editor-Bn_IuNy7.js → optional-enum-editor-C3IeVDSt.js} +4 -4
- package/dist/browser/{optional-string-editor-BAnOpEsC.js → optional-string-editor-BvQqzBEY.js} +4 -4
- package/dist/browser/{particles.min-BizTykKa.js → particles.min-C_QMjnLe.js} +2 -2
- package/dist/browser/{react-1v6olhrH.js → react-Ax95PQb6.js} +2 -2
- package/dist/browser/{react-dom-CXdU7G-n.js → react-dom-CzzHhy_E.js} +3 -3
- package/dist/browser/{rolldown-runtime-MTWZj7PQ.js → rolldown-runtime-DLlrs9dD.js} +1 -1
- package/dist/browser/{select-BMOhi0jB.js → select-DWSfj7cW.js} +10 -10
- package/dist/browser/{settings-item-DCdMf74g.js → settings-item-D2stfzwD.js} +6 -6
- package/dist/browser/{settings-C2XBSodv.js → settings-prb_Xydk.js} +2 -2
- package/dist/browser/{store-W6DIPr1q.js → store-Cm_lCLUY.js} +1100 -1095
- package/dist/browser/{string-editor-BKRgpXC1.js → string-editor-D-vFKE-L.js} +4 -4
- package/dist/browser/{text-field-7VmhUoTM.js → text-field-hXSRrbCO.js} +5 -5
- package/dist/browser/{theme-B3dhDzGI.js → theme-1MLT_N2G.js} +8 -8
- package/dist/browser/{ui-Cj76n3w6.js → ui-_mJ4KCW6.js} +8 -8
- package/dist/browser/{useRenderTarget-DfvYoh2A.js → useRenderTarget-mdzSfUSx.js} +4 -4
- package/dist/esm/floorplan.loader.d.ts +2 -1
- package/dist/esm/floorplan.loader.js +1 -1
- package/dist/esm/floorplan.ready.js +1 -1
- package/dist/esm/store/init/init-ui.d.ts +11 -0
- package/dist/esm/store/init/init-ui.js +1 -1
- package/package.json +9 -9
|
@@ -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.23.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.23.4" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "0a67f4c1-0ef6-428f-92c6-94c57178bf21", e._sentryDebugIdIdentifier = "sentry-dbid-0a67f4c1-0ef6-428f-92c6-94c57178bf21");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { t as e } from "./jsx-runtime-
|
|
10
|
-
import { t } from "./settings-item-
|
|
11
|
-
import { t as n } from "./text-field-
|
|
9
|
+
import { t as e } from "./jsx-runtime-DCjpnPcf.js";
|
|
10
|
+
import { t } from "./settings-item-D2stfzwD.js";
|
|
11
|
+
import { t as n } from "./text-field-hXSRrbCO.js";
|
|
12
12
|
//#region ../debug/src/lib/ui/string-editor.tsx
|
|
13
13
|
var r = e(), i = (e) => {
|
|
14
14
|
var i;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
(function() {
|
|
2
2
|
try {
|
|
3
3
|
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
4
|
-
e.SENTRY_RELEASE = { id: "3.23.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.23.4" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "9c5a0877-c176-4e2d-b51c-123d50ab2b3c", e._sentryDebugIdIdentifier = "sentry-dbid-9c5a0877-c176-4e2d-b51c-123d50ab2b3c");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { D as n, i as r, l as i, n as a, s as o, u as s, y as c } from "./flex-
|
|
12
|
-
import { t as l } from "./classnames-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-DLlrs9dD.js";
|
|
10
|
+
import { t } from "./react-Ax95PQb6.js";
|
|
11
|
+
import { D as n, i as r, l as i, n as a, s as o, u as s, y as c } from "./flex-CHBAsz6k.js";
|
|
12
|
+
import { t as l } from "./classnames-AfOVHR26.js";
|
|
13
13
|
//#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._5ea800d4e947acedb1fa1275f1697b17/node_modules/@radix-ui/themes/dist/esm/components/text-field.props.js
|
|
14
14
|
var u = /* @__PURE__ */ e(t()), d = /* @__PURE__ */ e(l()), f = {
|
|
15
15
|
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.23.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.23.4" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "f658045a-5be7-4ea4-a4b2-ddea9ab9caf3", e._sentryDebugIdIdentifier = "sentry-dbid-f658045a-5be7-4ea4-a4b2-ddea9ab9caf3");
|
|
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-DLlrs9dD.js";
|
|
10
|
+
import { t } from "./react-Ax95PQb6.js";
|
|
11
|
+
import { t as n } from "./jsx-runtime-DCjpnPcf.js";
|
|
12
|
+
import { t as r } from "./react-dom-CzzHhy_E.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-CHBAsz6k.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-DJvRIVfK.js";
|
|
15
|
+
import { t as y } from "./classnames-AfOVHR26.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_cffccd7838985066e8e1d993b5cb6017/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.23.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.23.4" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "3c34ab8b-5d65-4c06-8595-6ed371acabc5", e._sentryDebugIdIdentifier = "sentry-dbid-3c34ab8b-5d65-4c06-8595-6ed371acabc5");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { a as t, i as n, s as r } from "./efp-debug-init-
|
|
11
|
-
import { a as i, i as a } from "./adopt-global-settings-
|
|
12
|
-
import { t as o } from "./jsx-runtime-
|
|
13
|
-
import "./settings-
|
|
14
|
-
import { t as s } from "./add-debug-secret-listener-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-DLlrs9dD.js";
|
|
10
|
+
import { a as t, i as n, s as r } from "./efp-debug-init-CMVs44Ef.js";
|
|
11
|
+
import { a as i, i as a } from "./adopt-global-settings-gawg1AYH.js";
|
|
12
|
+
import { t as o } from "./jsx-runtime-DCjpnPcf.js";
|
|
13
|
+
import "./settings-prb_Xydk.js";
|
|
14
|
+
import { t as s } from "./add-debug-secret-listener-BqoA69bT.js";
|
|
15
15
|
//#region ../debug/src/lib/ui/render-debug-ui.tsx
|
|
16
16
|
var c = /* @__PURE__ */ e(r(), 1), l = o(), u = !1;
|
|
17
17
|
function d() {
|
|
@@ -26,7 +26,7 @@ function d() {
|
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
let o = async (t) => {
|
|
29
|
-
let { DebugUi: n } = await import("./debug-ui-
|
|
29
|
+
let { DebugUi: n } = await import("./debug-ui-C8LFrZdI.js"), { createRoot: i } = await import("./client-ssZKxczh.js").then((t) => /* @__PURE__ */ e(t.default, 1)), a = document.createElement("div");
|
|
30
30
|
document.body.appendChild(a), i(a).render(/* @__PURE__ */ (0, l.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.23.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.23.4" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "7407e64e-4c4e-4bfb-b2ef-80063ad22998", e._sentryDebugIdIdentifier = "sentry-dbid-7407e64e-4c4e-4bfb-b2ef-80063ad22998");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { l as n } from "./store-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-DLlrs9dD.js";
|
|
10
|
+
import { t } from "./react-Ax95PQb6.js";
|
|
11
|
+
import { l as n } from "./store-Cm_lCLUY.js";
|
|
12
12
|
//#region ../ui/src/shared/activeElement.ts
|
|
13
13
|
var r = (e) => !!e && "activeElement" in e;
|
|
14
14
|
function i(e) {
|
|
@@ -16,7 +16,8 @@ export default class FloorPlanLoader implements FloorPlan {
|
|
|
16
16
|
readonly disableRuntimeAlerts: boolean;
|
|
17
17
|
readonly viewerMode: boolean;
|
|
18
18
|
readonly maplibre: MaplibreOptions | undefined;
|
|
19
|
-
|
|
19
|
+
/** Called with an event by the `__efpStyleLoad` listener, and bare to drain the registry on construction. */
|
|
20
|
+
protected efpStyleLoadHandler: (e?: Event) => void;
|
|
20
21
|
protected resolveReady: () => void;
|
|
21
22
|
readonly icons: Map<FloorPlanIcon, HTMLImageElement>;
|
|
22
23
|
enableRotation: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getConfig as b}from"@expofp/config";import{PREVIEW_MODE_ATTRIBUTE as j}from"./constants";import{toInternalSettings as D}from"./internal-settings.js";import
|
|
1
|
+
import{getConfig as b}from"@expofp/config";import{PREVIEW_MODE_ATTRIBUTE as j}from"./constants";import{toInternalSettings as D}from"./internal-settings.js";import d from"./tools/base-runtime-url";import{loadCss as x,loadFont as f}from"./tools/loaders";import R from"./tools/logger";import{initSentry as F}from"./tools/sentry";import{heatmapEnabled as A}from"./utils/heatmap-enabled";import{initI18n as V}from"./utils/i18n";import z from"./utils/is-debug";import H from"./utils/is-localhost";import _ from"./utils/is-webview";import{loadCustomCss as G}from"./utils/loadCustomCss";import{loadIcons as N}from"./utils/loadIcons";import I from"./utils/use-shadow";function e(){throw new Error("FloorPlan not ready")}export default class Q{get ready(){return this._ready}get previewMode(){return b().previewMode||this.element.hasAttribute(j)}get allowConsent(){return this.consent==="ask"?void 0:this.consent==="granted"}getInternalSettings(){return D(b())}selectBooth(t){e()}selectExhibitor(t){e()}selectRoute(t,i){e()}getOptimizedRoutes(t){e()}selectCurrentPosition(t,i,s){e()}setBookmarks(t){e()}setEntitiesBookmarks(t){e()}setEntitiesVisited(t){e()}setMarkers(t){e()}updateLayerVisibility(t,i){e()}getCenterCoordinates(){e()}applyParameters(t){e()}exhibitorsList(){e()}boothsList(){e()}categoriesList(){e()}selectCategory(t){e()}select(t){e()}showList(t){e()}selectTour(t){e()}openPlanner(t){e()}startBuildRoute(){e()}getVisibility(){e()}setVisibility(t){e()}findLocation(){e()}zoomIn(){e()}zoomOut(){e()}zoomTo(t,i){e()}switchView(){e()}setCamera(t){e()}getCamera(){e()}fitBounds(){e()}getBounds(t){e()}getBoothRect(t){e()}convertToGeo(t,i){e()}getGeoConfig(){e()}unstable_destroy(){e()}highlightExhibitors(t){e()}highlightBooths(t){e()}onCurrentPositionChanged(t){e()}search(t){e()}getFloors(){e()}onFloorActivated(t){e()}activateFloor(t){e()}showPathway(t,i){e()}showPathwayOnly(t,i){e()}hidePathways(){e()}showSearch(){e()}changeLanguage(t){e()}isGpsTrackingEnabled(){e()}setGpsTrackingEnabled(t){e()}deselectCurrentPosition(){e()}deselectRoute(){e()}reset(){e()}selectAccessibleRoute(t){e()}constructor(t,i){this.resolveReady=()=>{},this.icons=new Map,this.enableRotation=!0,this.alwaysShowSidebar=!1;const s=b();this.noOverlay=!!s.noOverlay,this.offHistory=!!s.offHistory,this.ignoreQuery=s.ignoreQuery,this.consent=s.consent,this.consent==="ask"&&(_?this.consent="granted":H&&!z&&(this.consent="denied")),this.onBoothClick=t.onBoothClick,this.onBookmarkClick=t.onBookmarkClick,this.onVisitedClick=t.onVisitedClick,this.onCategoryClick=t.onCategoryClick,this.onDetails=t.onDetails,this.onExhibitorCustomButtonClick=t.onExhibitorCustomButtonClick,this.onGetCoordsClick=t.onGetCoordsClick,this.onMarkerClick=t.onMarkerClick,this.onFpConfigured=t.onFpConfigured,this.onDirection=t.onDirection,this.onInit=t.onInit,this.onCurrentPositionChanged=t.onCurrentPositionChanged,this.onFloorActivated=t.onFloorActivated,this.onLeaveEvent=t.onLeaveEvent,this.viewerMode=!!s.viewerMode,this.disableRuntimeAlerts=s.disableRuntimeAlerts,this.maplibre=s.maplibre,window.__efpMaplibre=s.maplibre,this._ready=new Promise((c,r)=>{this.resolveReady=c}),this.element=i;const E=i;if(E.__expofp)throw new Error("Element already in use");E.__expofp=this;const g=s.expo;F({eventId:g||"",isWebview:_}),this.eventId=g,window.__efpEvent=g,window.__efpElement=i;const m=document.createElement("div");m.style.height="100%",m.style.width="100%",i.appendChild(m);let n;if(I){n=m.attachShadow({mode:"open"});const c=n,r=document;c.createElement=(...a)=>r.createElement(...a),c.createElementNS=(...a)=>r.createElementNS(...a),c.createTextNode=(...a)=>r.createTextNode(...a)}else n=m;const w=document.createElement("div");w.style.height="100%",w.style.width="100%",n.appendChild(w),I&&Object.defineProperty(w,"ownerDocument",{value:n}),window.__efpShadowDOMStyleParent=I?n:void 0,this.renderTarget=w,R.log("Instantiating ExpoFP floorplan",i,g);let k=0;this.efpStyleLoadHandler=function(c){const r=window.__efpStyleElements??[];for(;k<r.length;){const a=r[k];n.appendChild(a),k++}},window.addEventListener("__efpStyleLoad",this.efpStyleLoadHandler),this.efpStyleLoadHandler();const y=this;(async function(){const r=b();await V();const a=new URLSearchParams(window.location.search);let h,p;if(r?.trackerUrl)try{h=new URL(r.trackerUrl),p=h.searchParams.get("expoId")}catch(o){console.error(o)}const P=async o=>{if(!h||!p)return Promise.reject(new Error("trackerUrl or expoId is missing"));const l=new URL(o.dataUrl,h.origin),u=await fetch(l.toString(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expoId:p,token:decodeURIComponent(a.get("t")??"")})});let C=[];u.ok&&(C=(await u.json()).map(o.dataMapper)),window.__heatmapDataYah={yah:C}},v=r?.heatmap??{},O=A(v)||a.get("heatmap")==="true",L=v.variant==="yah"||a.get("type")==="yah",U=v.kiosk===!0||a.get("subtype")==="kiosk";if(O)try{if(L)U?await P({dataUrl:"/api/kiosks/list/viewer",dataMapper:o=>({...o,id:o.key,name:`Kiosk ${o.key}`})}):await P({dataUrl:"/api/v1/you-are-here/qr-code/list/viewer",dataMapper:(o,l)=>({...o,name:`QR Code #${l+1}`})});else{if(!h||!p)throw new Error("trackerUrl or expoId is missing");const o=new URL("/api/fp-stats/get",h.origin);o.searchParams.set("expoId",p),o.searchParams.set("type","booview"),o.searchParams.set("t",decodeURIComponent(a.get("t")??""));const l=new URL("api/fp-stats/get",h.origin);l.searchParams.set("expoId",p),l.searchParams.set("type","exview"),l.searchParams.set("t",decodeURIComponent(a.get("t")??""));const[u,C]=await Promise.all([fetch(o.toString()),fetch(l.toString())]),[S,T]=await Promise.all([u.json(),C.json()]);window.__heatmapData={booths:S,exhibitors:T}}}catch(o){console.error("Heatmap: Initialization error",o)}const B=[x(d+"vendor/sanitize-css/sanitize.css",n),x(d+"vendor/perfect-scrollbar/css/perfect-scrollbar.css",n),f("Oswald",d+"fonts/oswald-v17-cyrillic_latin-300.woff",{weight:300}),f("Oswald",d+"fonts/oswald-v17-cyrillic_latin-500.woff",{weight:500}),f("Inter",d+"fonts/inter-400.woff2",{weight:400}),f("Inter",d+"fonts/inter-500.woff2",{weight:500}),f("Inter",d+"fonts/inter-600.woff2",{weight:600}),f("efp-symbols",d+"fonts/efp-symbols.woff",{weight:400}),G(r,n),N(y.icons)];await Promise.all(B),y.enableRotation=r?.enableRotation??!1,y.alwaysShowSidebar=r?.alwaysShowSidebar??!1,R.log("Data loaded"),window.__storeInitAllowed=!0;const{default:M}=await import("./floorplan.ready");for(document.querySelectorAll(".expofp-floorplan-loader").forEach(o=>o.remove());i.firstChild&&i.firstChild!==m;)i.removeChild(i.firstChild);Object.setPrototypeOf(y,M.prototype).init()})()}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as A,jsx as x,jsxs as T}from"react/jsx-runtime";import{Box as E}from"@expofp/geometry";import{CameraSchema as I}from"@expofp/schema";import{optimizeWaypointOrder as M}from"@expofp/wayfinding";import{ErrorBoundary as R}from"@sentry/react";import $ from"debug";import{reaction as V}from"mobx";import{createRoot as z}from"react-dom/client";import{install as j}from"resize-observer";import G from"./components/Layout";import{MAX_ROUTE_WAYPOINTS as d}from"./constants";import N from"./data";import{fpGeo as b}from"./data/fpGeo";import q from"./floorplan.loader";import{shouldLoadIntercom as O}from"./intercom";import{BoundsSchema as U,POISelectorsSchema as w,ZoomToOptionsSchema as P}from"./schemas/sdk.schemas";import{applyDeclarativeConfig as H,applyParameters as Y,applyPathway as _,initUrlRouting as D}from"./services/url-dispatch";import{destroyUrlSync as W}from"./services/url-sync";import r from"./store";import{destroyUiHandlers as X}from"./store/init/init-ui";import{findBooth as S,Route as v,separateExternalIds as B}from"./store/RouteStore";import{destroyGtag as K,GaEventActions as k,sendEventToGa as F,setConsentSettings as Q}from"./tools/gtag";import Z from"./tools/report-error";import{resetGlobalVariables as J}from"./tools/reset";import ee from"./tools/track-event";import{cameraToMapSettings as te,mapSettingsToCamera as re}from"./utils/camera-map-settings";import{getStorage as L}from"./utils/entity-storage";import{getMostFrequent as oe}from"./utils/getMostFrequent";import{convertLocalToGps as ie,isValidPointCoords as y}from"./utils/gps";import{getLocales as se,hasLocale as ne,setLocale as ae}from"./utils/i18n";import{mapEntity as g}from"./utils/mapEntity";const p=$("efp:api");j();export default class he extends q{init(){H(),this.ignoreQuery||D(this.offHistory),ee("load"),r.fp=this,Q(this.consent),F(k.Load,""),this.root=z(this.renderTarget),this.root.render(x(R,{children:x(G,{offHistory:this.offHistory,consent:this.consent})})),F(k.Rendered,""),V(()=>r.layerStore.layersLoaded,()=>{this.resolveReady(),r.initialized||this.onInit?.(this),r.initialized=!0});const e=O(N);e&&import("./intercom/bootIntercom").then(({bootIntercom:t})=>t(e)).catch(()=>{})}selectBooth(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectBooth","Parameter must be a string or an array of strings.","EFP000000");return}const t=r.boothStore.booths.filter(o=>typeof e=="string"?o.name===e||o.externalId===e:e.includes(o.name)||e.includes(o.externalId));r.selectBooth(t)}selectExhibitor(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectExhibitor","Parameter must be a string or an array of strings.","EFP000100");return}if(!e?.length){r.uiState.menu=!1,r.searchStore.resetSearchBox(),r.uiState.details=null;return}const t=r.exhibitorStore.exhibitors.filter(s=>typeof e=="string"?s.name===e||s.externalId===e:e.includes(s.name)||e.includes(s.externalId));if(!t?.length)return;if(typeof e=="string"){r.selectExhibitor(t[0]),r.moveToList([t[0]]);return}const o=t.flatMap(s=>s.booths.map(i=>i.layer)),n=oe(o.map(s=>s.description));n&&r.layerStore.updateVisibility(n,!0),r.uiState.menu=!1,r.searchStore.resetSearchBox(),r.uiState.details=null,r.uiState.list={type:"filter",items:t,query:{key:"exhibitors",value:t.map(s=>s.name).join(",")}},r.moveToList()}highlightExhibitors(e){Array.isArray(e)||a("highlightExhibitors","Parameter must be an array of strings.","EFP000200"),r.boothStore.highlightedByExternalIds=[],r.exhibitorStore.highlightedByExternalIds=[...e]}highlightBooths(e){Array.isArray(e)||a("highlightBooths","Parameter must be an array of strings.","EFP000300"),r.exhibitorStore.highlightedByExternalIds=[],r.boothStore.highlightedByExternalIds=[...e]}highlightEntities(e){Array.isArray(e)||a("highlightEntities","Parameter must be an array of strings.","EFP000400");const{boothExternalIds:t,exhibitorExternalIds:o}=B(e);r.boothStore.highlightedByExternalIds=[...t],r.exhibitorStore.highlightedByExternalIds=[...o]}selectRoute(e,t){if(Array.isArray(e)){let o=[...e];const n=o.shift(),s=o.pop();if(o.length>d)throw new Error(`The maximum number of waypoints is ${d}.`);if(!n||!s){a("selectRoute","Invalid route format: When providing an array, it must include at least two points: a start and a destination.","EFP000401");return}r.routeStore.selectRoute(new v(m(n),m(s),o.map(m)));return}e||a("selectRoute","At a minimum, the starting point must be passed.","EFP000402"),r.routeStore.selectRoute(new v(m(e),m(t)))}getOptimizedRoutes(e){if(!Array.isArray(e))return a("getOptimizedRoutes","Parameter must be an array.","EFP000500"),[];if(e.length>d)throw new Error(`The maximum number of waypoints is ${d}.`);const t=e.map(m).filter(n=>!!n);if(!t.length)throw new Error("No booths found for the provided waypoints.");const o=new Map;for(const n of t){const s=n.layer?.name??"",i=o.get(s);i?i.push(n):o.set(s,[n])}return Array.from(o.values()).map(n=>({waypoints:M(n.map(s=>[s.name,{x:s.rect.center.x,y:s.rect.center.y}]))}))}selectCurrentPosition(e,t,o){const n=y(e.x)&&y(e.y),s=y(e.lng)&&y(e.lat);!n&&!s&&a("selectCurrentPosition","A point must be passed. Either (x,y) or (lat,lng) are required.","EFP000600"),r.routeStore.selectCurrentPosition(e,t,o),this.onCurrentPositionChanged?.(e)}setBookmarks(e){(!Array.isArray(e)||!e.length)&&a("setBookmarks","Parameter must be an array.","EFP000700"),e.forEach(t=>{const o=r.exhibitorStore.exhibitors.find(n=>n.name===t.name||n.externalId===t.externalId);o&&(o.bookmarked=t.bookmarked)})}setEntitiesBookmarks(e){if(!Array.isArray(e)||!e.length){a("setEntitiesBookmarks","Parameter must be an array.","EFP000701");return}const t=["exhibitor","event","speaker","booth"],o=e.find(i=>!i.type||!t.includes(i.type));if(o){a("setEntitiesBookmarks",`Invalid entity type: ${o.type}. Must be one of: ${t.join(", ")}.`,"EFP000702");return}const n=L("bookmarked"),s={exhibitor:{existingIds:new Set(n.exhibitors||[]),finder:i=>r.exhibitorStore.findExhibitor(i),replacer:i=>r.exhibitorStore.replaceBookmarked(i)},event:{existingIds:new Set(n.events||[]),finder:i=>r.eventStore.findByNameOrSlug(i),replacer:i=>r.eventStore.replaceBookmarked(i)},speaker:{existingIds:new Set(n.speakers||[]),finder:i=>r.speakerStore.speakers.find(h=>h.name===i||h.externalId===i||h.slug===i),replacer:i=>r.speakerStore.replaceBookmarked(i)},booth:{existingIds:new Set(n.booths||[]),finder:i=>{const h=r.boothStore.findBooth(i);return h?.exhibitors.length===0?h:void 0},replacer:i=>r.boothStore.replaceBookmarked(i)}};e.forEach(i=>{const h=s[i.type],u=i.name||i.externalId||"",c=h.finder(u);c?i.bookmarked?h.existingIds.add(c.id):h.existingIds.delete(c.id):console.warn(`Entity not found: ${i.type} with query "${u}"`)}),Object.values(s).forEach(i=>{i.replacer(Array.from(i.existingIds))})}setEntitiesVisited(e){if(!Array.isArray(e)||!e.length){a("setEntitiesVisited","Parameter must be an array.","EFP000703");return}const t=["exhibitor","event"],o=e.find(i=>!i.type||!t.includes(i.type));if(o){a("setEntitiesVisited",`Invalid entity type: ${o.type}. Must be one of: ${t.join(", ")}.`,"EFP000704");return}const n=L("visited"),s={exhibitor:{existingIds:new Set(n.exhibitors||[]),finder:i=>r.exhibitorStore.findExhibitor(i),replacer:i=>r.exhibitorStore.replaceVisited(i)},event:{existingIds:new Set(n.events||[]),finder:i=>r.eventStore.findByNameOrSlug(i),replacer:i=>r.eventStore.replaceVisited(i)}};e.forEach(i=>{const h=s[i.type],u=i.name||i.externalId||"",c=h.finder(u);c?i.visited?h.existingIds.add(c.id):h.existingIds.delete(c.id):console.warn(`Entity not found: ${i.type} with query "${u}"`)}),Object.values(s).forEach(i=>{i.replacer(Array.from(i.existingIds))})}setMarkers(e){if(!e||!Array.isArray(e.icons)||!Array.isArray(e.markers)){a("setMarkers","Invalid input.","EFP000800");return}r.routeStore.setMarkers(e)}selectMarker(e,t=!0){return typeof e!="string"&&a("selectMarker","The identifier must be passed.","EFP000900"),r.routeStore.selectMarker(e,t)}drawCircles(e){Array.isArray(e)||a("drawCircles","Invalid input.","EFP000A00"),r.uiState.debugCircles=e}checkRoutes(){r.routeStore.checkRoutes()}updateLayerVisibility(e,t){typeof e!="string"&&a("updateLayerVisibility","The layer name (string) must be passed.","EFP000B00"),t||a("updateLayerVisibility","Passing a false value to visible will have no effect.","EFP000B01"),r.layerStore.updateVisibility(e,t)}getCenterCoordinates(){return r.fp.getCenterCoordinates()}exhibitorsList(){return r.exhibitorStore.exhibitors.map(e=>g(e))}boothsList(){return r.boothStore.booths.map(e=>g(e))}categoriesList(){return r.categoryStore.categories.map(e=>g(e))}selectCategory(e){if(e==null||typeof e!="string"){r.searchStore.selectSearch();return}const t=e?.toLowerCase(),o=r.categoryStore.categories.find(({name:n,slug:s})=>n?.toLowerCase()===t||s?.toLowerCase()===t);if(!o){a("selectCategory",`Category ${e} not found.`,"EFP000C01");return}r.selectCategory(o)}select(e){if(typeof e!="string"){a("select","Parameter must be a string.","EFP001700");return}const t=e,o=t?.toLowerCase(),n=r.boothStore.booths.find(c=>c.slug?.toLowerCase()===o||c.externalId?.toLowerCase()===o||c.externalId?.toLowerCase()?.replace(/\s+/g,"")===o);if(n){setTimeout(()=>r.selectBooth(n),250);return}const s=r.eventStore.eventItems.find(c=>c.slug?.toLowerCase()===o||c.externalId?.toLowerCase()===o);if(s){r.selectEventItem(s,!0);return}const i=r.exhibitorStore.exhibitors.find(c=>c.slug?.toLowerCase()===o||c.externalId?.toLowerCase()===o);if(i){setTimeout(()=>r.clickExhibitor(i),250);return}const h=r.categoryStore.categories.find(c=>c.slug===t);if(h){r.selectCategory(h);return}const u=r.speakerStore.findBySlug(t);if(u){r.selectSpeaker(u,!0);return}t.includes("heatmap=true")||r.searchStore.selectSearch(t)}showList(e){const t={bookmarks:()=>r.selectBookmarks(),visited:()=>r.selectVisited(),sessions:()=>r.selectSessions(),exhibitors:()=>r.selectExhibitors(),speakers:()=>r.selectSpeakers(),tours:()=>r.selectTours(),language:()=>r.selectLanguage()},o=t[e];if(!o){a("showList",`Unknown list "${e}". Must be one of: ${Object.keys(t).join(", ")}.`,"EFP001800");return}o()}selectTour(e){if(typeof e!="string"||!e){a("selectTour","A tour id must be passed.","EFP001900");return}const t=r.toursStore.getTourById(e);t?r.toursStore.launchTour(t,t.name,t.description):(console.warn(`Route with id "${e}" not found`),r.selectTours())}openPlanner(e={}){if(typeof e!="object"||e===null){a("openPlanner","An options object must be passed.","EFP001A00");return}const t=e.from?S(e.from):null;e.fromBookmarks?r.routePlannerStore.launchFromBookmarks(t??void 0):r.routePlannerStore.launchFromSlugs(e.items??[],t??void 0)}startBuildRoute(){r.uiState.startBuildRoute()}applyParameters(e){typeof e!="string"&&a("applyParameters","A query string must be passed.","EFP000D00"),Y(e)}getVisibility(){return r.uiState.visibility}setVisibility(e){(typeof e!="object"||!Object.keys(e).length)&&a("setVisibility","The parameter must be passed.","EFP000E00"),r.uiState.setVisibility(e)}findLocation(){r.routeStore.findLocation()}zoomIn(){r.uiState.zoomIn()}zoomOut(){r.uiState.zoomOut()}switchView(){r.maplibreStore.activateMaplibre()}setCamera(e){p("setCamera called with camera=%O",e);const t=I.safeParse(e);if(!t.success){a("setCamera",t.error.message,"EFP001B00");return}r.uiState.setMapSettings(te(t.data))}getCamera(){return re(r.uiState.mapSettings)}zoomTo(e,t){p("zoomTo called with selectors=%O options=%O",e,t);const o=w.safeParse(e);if(!o.success){a("zoomTo",o.error.message,"EFP001600");return}const n=P.safeParse(t);if(!n.success){a("zoomTo",n.error.message,"EFP001601");return}const s=this.getBounds(e);s&&this.fitBounds(s,t)}getBounds(e){p("getBounds called with selectors=%O",e);const t=w.safeParse(e);if(!t.success){a("getBounds",t.error.message,"EFP001400");return}const o=[];if(e.booths?.forEach(s=>{let i;s.externalId?i=r.boothStore.boothByExternalId.get(s.externalId):s.name&&(i=r.boothStore.boothByName.get(s.name.toLowerCase())),i?.rect&&o.push(i.rect)}),e.exhibitors?.forEach(s=>{let i;s.externalId?i=r.exhibitorStore.exhibitorByExternalId.get(s.externalId):s.name&&(i=r.exhibitorStore.exhibitorByName.get(s.name.toLowerCase())),i?.booths?.forEach(h=>{h.rect&&o.push(h.rect)})}),o.length===0)return;const n=E.fromUnion(...o);return{leftTop:{x:n.min.x,y:n.min.y},rightBottom:{x:n.max.x,y:n.max.y}}}fitBounds(e,t){if(p("fitBounds called with bounds=%O options=%O",e,t),!e){r.uiState.fitBounds();return}const o=U.safeParse(e);if(!o.success){a("fitBounds",o.error.message,"EFP001500");return}const n=P.safeParse(t);if(!n.success){a("fitBounds",n.error.message,"EFP001501");return}const s=E.fromMinMax({x:e.leftTop.x,y:e.leftTop.y},{x:e.rightBottom.x,y:e.rightBottom.y});r.uiState.moveToRect=t?.padding?s.expand(t.padding):s}getBoothRect(e){typeof e!="string"&&a("getBoothRect","A booth name must be passed.","EFP000F00");const t=S(e)?.rect;return t?l.fromBox(t):void 0}convertToGeo(e,t){if(!b?.properties?.config){a("convertToGeo","The coordinates cannot be converted because the GPS configuration is not defined.","EFP001000");return}if(!e||!t){a("convertToGeo","Both coordinates must be passed.","EFP001001");return}return ie(e,t,b.properties.config)}getGeoConfig(){const e=b?.properties?.config;return e?{bearing:e.bearing??0,p0:e.p0,p1:e.p1,p2:e.p2}:null}unstable_destroy(){let e=window.__efpElement.firstChild;J(),window.removeEventListener("__efpStyleLoad",this.efpStyleLoadHandler),window.removeEventListener("error",Z),r.maplibreStore.dispose(),W(),X(),K(),this.root.unmount(),e.remove()}search(e){return typeof e!="string"&&a("search","A search string must be passed.","EFP001100"),r.fuzzySearchEngineStore.loadEngine().then(()=>(r.searchStore.selectSearch(e),r.uiState.fuzzySearchItems.map(t=>({item:g(t.item),score:t.score}))))}getFloors(){return r.layerStore.floors.map(e=>({name:e.name,shortName:e.shortName,description:e.description,active:e.active,disabled:e.disabled,index:e.index}))}activateFloor(e){if(!e?.name&&e?.index==null){a("activateFloor","Invalid floorId. It must contain either a name or an index.","EFP001200");return}const t=this.getFloors();if(e.name){const o=t.find(n=>n.name===e.name||n.shortName===e.name);if(!o){a("activateFloor",`Floor with name "${e.name}" not found.`,"EFP001201");return}if(o.active)return;this.updateLayerVisibility(o.name,!0);return}if(e.index!==null){const o=t.find(s=>s.index===e.index),n=o?.name;if(!n){a("activateFloor",`Floor at index ${e.index} does not exist.`,"EFP001203");return}if(o.active)return;this.updateLayerVisibility(n,!0);return}}showPathway(e,t){const{boothExternalIds:o,exhibitorExternalIds:n}=t?.length?B(t):{boothExternalIds:[],exhibitorExternalIds:[]};_({pathwayId:e,boothIds:o,exhibitorIds:n})}showPathwayOnly(e,t){this.activateFloor({name:t}),r.layerStore.showPathWay(e),r.uiState.setPathwayOnlyMode(!0);const o=r.layerStore.findLayer(e),n=r.layerStore.findLayer(t),s=o?.rect||o?.viewbox?o:n;if(s?.rect||s?.viewbox){const i=s.viewbox??s.rect;r.uiState.moveToRect=i.clone()}}hidePathways(){this.highlightBooths([]),r.layerStore.hidePathways(),r.uiState.setPathwayOnlyMode(!1)}showSearch(){r.selectSearch("")}changeLanguage(e){const t=e?.toLowerCase?.();if(!ne(t)){a("changeLanguage",`Language "${e}" was not found. Available languages: ${se().map(o=>o.id).join(",")}`,"EFP001300");return}ae(t)}isGpsTrackingEnabled(){return r.routeStore.gpsEnabled}setGpsTrackingEnabled(e){r.routeStore.setGpsTrackingEnabled(e)}deselectCurrentPosition(){r.routeStore.selectCurrentPosition(null,!1)}deselectRoute(){r.routeStore.selectRoute(null),r.routeStore.setOnlyAccessible(!1)}reset(){this.selectBooth(""),this.selectExhibitor(""),this.selectCategory(),this.deselectCurrentPosition(),this.deselectRoute(),this.highlightEntities([]),r.uiState.kioskData&&r.resetCameraFn?r.resetCameraFn?.():this.fitBounds()}selectAccessibleRoute(e){r.routeStore.setOnlyAccessible(!0),this.selectRoute(e)}}function m(f){return typeof f=="string"?S(f):r.routeStore.getNearestBooth(f)}let C=0;function a(f,e,t){const o=`Error calling "${f}" SDK method.`,n=`${e.endsWith(".")?e:e+"."} More information at`;let s="https://js-sdk.expofp.com/api/packages";if(t&&(s+=`#error-${t}`),console.error(`${o} ${n} ${s}`),r.fp.disableRuntimeAlerts)return;r.uiState.setGlobalErrorMessage({title:o,body:T(A,{children:[n," ",x("a",{href:s,target:"_blank",rel:"noreferrer",children:s})]})}),clearTimeout(C);const i=8e3;C=window.setTimeout(()=>{const h=async()=>{r.uiState.globalErrorMessages.length>0&&(r.uiState.popGlobalErrorMessage(),await new Promise(u=>setTimeout(u,i/2)),h())};h()},i)}class l{get h(){return Math.abs(this.y2-this.y1)}get w(){return Math.abs(this.x2-this.x1)}get cx(){return(this.x1+this.x2)/2}get cy(){return(this.y1+this.y2)/2}constructor(e,t,o,n){if(e>o){const s=e;e=o,o=s}if(t>n){const s=t;t=n,n=s}this.x1=e,this.y1=t,this.x2=o,this.y2=n}static fromBox(e){return new l(e.min.x,e.min.y,e.max.x,e.max.y)}static fromCxcywh(e,t,o,n){return new l(e-o/2,t-n/2,e+o/2,t+n/2)}contains(e){return e.x1>=this.x1&&e.x2<=this.x2&&e.y1>=this.y1&&e.y2<=this.y2}intersects(e){const t=Math.max(this.x1,e.x1),o=Math.min(this.x2,e.x2),n=Math.max(this.y1,e.y1),s=Math.min(this.y2,e.y2);return o>=t&&s>=n}getIntersection(e){const t=Math.max(this.x1,e.x1),o=Math.min(this.x2,e.x2),n=Math.max(this.y1,e.y1),s=Math.min(this.y2,e.y2);return o>=t&&s>=n?new l(t,n,o,s):new l(0,0,0,0)}getRotated90(){return l.fromCxcywh(this.cx,this.cy,this.h,this.w)}normalize(e,t){return new l(this.x1/e,this.y1/t,this.x2/e,this.y2/t)}withPadding(e,t=e){return this.w<e*2||this.h<t*2?this:l.fromCxcywh(this.cx,this.cy,this.w-e*2,this.h-t*2)}scale(e){return new l(this.x1*e,this.y1*e,this.x2*e,this.y2*e)}getArea(){return this.w*this.h}clone(){return new l(this.x1,this.y1,this.x2,this.y2)}translate(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this}equals(e){return e.x1===this.x1&&e.x2===this.x2&&e.y1===this.y1&&e.y2===this.y2}toString(){return this.x1+","+this.y1+","+this.w+","+this.h}containsPoint(e,t){return e>=this.x1&&e<=this.x2&&t>=this.y1&&t<=this.y2}}
|
|
1
|
+
import{Fragment as A,jsx as x,jsxs as T}from"react/jsx-runtime";import{Box as E}from"@expofp/geometry";import{CameraSchema as I}from"@expofp/schema";import{optimizeWaypointOrder as M}from"@expofp/wayfinding";import{ErrorBoundary as R}from"@sentry/react";import $ from"debug";import{reaction as V}from"mobx";import{createRoot as z}from"react-dom/client";import{install as j}from"resize-observer";import G from"./components/Layout";import{MAX_ROUTE_WAYPOINTS as d}from"./constants";import N from"./data";import{fpGeo as b}from"./data/fpGeo";import q from"./floorplan.loader";import{shouldLoadIntercom as O}from"./intercom";import{BoundsSchema as U,POISelectorsSchema as w,ZoomToOptionsSchema as P}from"./schemas/sdk.schemas";import{applyDeclarativeConfig as H,applyParameters as Y,applyPathway as _,initUrlRouting as D}from"./services/url-dispatch";import{destroyUrlSync as W}from"./services/url-sync";import r from"./store";import{bindRootElement as X,destroyUiHandlers as K}from"./store/init/init-ui";import{findBooth as S,Route as v,separateExternalIds as B}from"./store/RouteStore";import{destroyGtag as Q,GaEventActions as k,sendEventToGa as F,setConsentSettings as Z}from"./tools/gtag";import J from"./tools/report-error";import{resetGlobalVariables as ee}from"./tools/reset";import te from"./tools/track-event";import{cameraToMapSettings as re,mapSettingsToCamera as oe}from"./utils/camera-map-settings";import{getStorage as L}from"./utils/entity-storage";import{getMostFrequent as ie}from"./utils/getMostFrequent";import{convertLocalToGps as se,isValidPointCoords as y}from"./utils/gps";import{getLocales as ne,hasLocale as ae,setLocale as he}from"./utils/i18n";import{mapEntity as g}from"./utils/mapEntity";const p=$("efp:api");j();export default class ce extends q{init(){H(),this.ignoreQuery||D(this.offHistory),te("load"),X(r),r.fp=this,Z(this.consent),F(k.Load,""),this.root=z(this.renderTarget),this.root.render(x(R,{children:x(G,{offHistory:this.offHistory,consent:this.consent})})),F(k.Rendered,""),V(()=>r.layerStore.layersLoaded,()=>{this.resolveReady(),r.initialized||this.onInit?.(this),r.initialized=!0});const e=O(N);e&&import("./intercom/bootIntercom").then(({bootIntercom:t})=>t(e)).catch(()=>{})}selectBooth(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectBooth","Parameter must be a string or an array of strings.","EFP000000");return}const t=r.boothStore.booths.filter(o=>typeof e=="string"?o.name===e||o.externalId===e:e.includes(o.name)||e.includes(o.externalId));r.selectBooth(t)}selectExhibitor(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectExhibitor","Parameter must be a string or an array of strings.","EFP000100");return}if(!e?.length){r.uiState.menu=!1,r.searchStore.resetSearchBox(),r.uiState.details=null;return}const t=r.exhibitorStore.exhibitors.filter(s=>typeof e=="string"?s.name===e||s.externalId===e:e.includes(s.name)||e.includes(s.externalId));if(!t?.length)return;if(typeof e=="string"){r.selectExhibitor(t[0]),r.moveToList([t[0]]);return}const o=t.flatMap(s=>s.booths.map(i=>i.layer)),n=ie(o.map(s=>s.description));n&&r.layerStore.updateVisibility(n,!0),r.uiState.menu=!1,r.searchStore.resetSearchBox(),r.uiState.details=null,r.uiState.list={type:"filter",items:t,query:{key:"exhibitors",value:t.map(s=>s.name).join(",")}},r.moveToList()}highlightExhibitors(e){Array.isArray(e)||a("highlightExhibitors","Parameter must be an array of strings.","EFP000200"),r.boothStore.highlightedByExternalIds=[],r.exhibitorStore.highlightedByExternalIds=[...e]}highlightBooths(e){Array.isArray(e)||a("highlightBooths","Parameter must be an array of strings.","EFP000300"),r.exhibitorStore.highlightedByExternalIds=[],r.boothStore.highlightedByExternalIds=[...e]}highlightEntities(e){Array.isArray(e)||a("highlightEntities","Parameter must be an array of strings.","EFP000400");const{boothExternalIds:t,exhibitorExternalIds:o}=B(e);r.boothStore.highlightedByExternalIds=[...t],r.exhibitorStore.highlightedByExternalIds=[...o]}selectRoute(e,t){if(Array.isArray(e)){let o=[...e];const n=o.shift(),s=o.pop();if(o.length>d)throw new Error(`The maximum number of waypoints is ${d}.`);if(!n||!s){a("selectRoute","Invalid route format: When providing an array, it must include at least two points: a start and a destination.","EFP000401");return}r.routeStore.selectRoute(new v(m(n),m(s),o.map(m)));return}e||a("selectRoute","At a minimum, the starting point must be passed.","EFP000402"),r.routeStore.selectRoute(new v(m(e),m(t)))}getOptimizedRoutes(e){if(!Array.isArray(e))return a("getOptimizedRoutes","Parameter must be an array.","EFP000500"),[];if(e.length>d)throw new Error(`The maximum number of waypoints is ${d}.`);const t=e.map(m).filter(n=>!!n);if(!t.length)throw new Error("No booths found for the provided waypoints.");const o=new Map;for(const n of t){const s=n.layer?.name??"",i=o.get(s);i?i.push(n):o.set(s,[n])}return Array.from(o.values()).map(n=>({waypoints:M(n.map(s=>[s.name,{x:s.rect.center.x,y:s.rect.center.y}]))}))}selectCurrentPosition(e,t,o){const n=y(e.x)&&y(e.y),s=y(e.lng)&&y(e.lat);!n&&!s&&a("selectCurrentPosition","A point must be passed. Either (x,y) or (lat,lng) are required.","EFP000600"),r.routeStore.selectCurrentPosition(e,t,o),this.onCurrentPositionChanged?.(e)}setBookmarks(e){(!Array.isArray(e)||!e.length)&&a("setBookmarks","Parameter must be an array.","EFP000700"),e.forEach(t=>{const o=r.exhibitorStore.exhibitors.find(n=>n.name===t.name||n.externalId===t.externalId);o&&(o.bookmarked=t.bookmarked)})}setEntitiesBookmarks(e){if(!Array.isArray(e)||!e.length){a("setEntitiesBookmarks","Parameter must be an array.","EFP000701");return}const t=["exhibitor","event","speaker","booth"],o=e.find(i=>!i.type||!t.includes(i.type));if(o){a("setEntitiesBookmarks",`Invalid entity type: ${o.type}. Must be one of: ${t.join(", ")}.`,"EFP000702");return}const n=L("bookmarked"),s={exhibitor:{existingIds:new Set(n.exhibitors||[]),finder:i=>r.exhibitorStore.findExhibitor(i),replacer:i=>r.exhibitorStore.replaceBookmarked(i)},event:{existingIds:new Set(n.events||[]),finder:i=>r.eventStore.findByNameOrSlug(i),replacer:i=>r.eventStore.replaceBookmarked(i)},speaker:{existingIds:new Set(n.speakers||[]),finder:i=>r.speakerStore.speakers.find(h=>h.name===i||h.externalId===i||h.slug===i),replacer:i=>r.speakerStore.replaceBookmarked(i)},booth:{existingIds:new Set(n.booths||[]),finder:i=>{const h=r.boothStore.findBooth(i);return h?.exhibitors.length===0?h:void 0},replacer:i=>r.boothStore.replaceBookmarked(i)}};e.forEach(i=>{const h=s[i.type],u=i.name||i.externalId||"",c=h.finder(u);c?i.bookmarked?h.existingIds.add(c.id):h.existingIds.delete(c.id):console.warn(`Entity not found: ${i.type} with query "${u}"`)}),Object.values(s).forEach(i=>{i.replacer(Array.from(i.existingIds))})}setEntitiesVisited(e){if(!Array.isArray(e)||!e.length){a("setEntitiesVisited","Parameter must be an array.","EFP000703");return}const t=["exhibitor","event"],o=e.find(i=>!i.type||!t.includes(i.type));if(o){a("setEntitiesVisited",`Invalid entity type: ${o.type}. Must be one of: ${t.join(", ")}.`,"EFP000704");return}const n=L("visited"),s={exhibitor:{existingIds:new Set(n.exhibitors||[]),finder:i=>r.exhibitorStore.findExhibitor(i),replacer:i=>r.exhibitorStore.replaceVisited(i)},event:{existingIds:new Set(n.events||[]),finder:i=>r.eventStore.findByNameOrSlug(i),replacer:i=>r.eventStore.replaceVisited(i)}};e.forEach(i=>{const h=s[i.type],u=i.name||i.externalId||"",c=h.finder(u);c?i.visited?h.existingIds.add(c.id):h.existingIds.delete(c.id):console.warn(`Entity not found: ${i.type} with query "${u}"`)}),Object.values(s).forEach(i=>{i.replacer(Array.from(i.existingIds))})}setMarkers(e){if(!e||!Array.isArray(e.icons)||!Array.isArray(e.markers)){a("setMarkers","Invalid input.","EFP000800");return}r.routeStore.setMarkers(e)}selectMarker(e,t=!0){return typeof e!="string"&&a("selectMarker","The identifier must be passed.","EFP000900"),r.routeStore.selectMarker(e,t)}drawCircles(e){Array.isArray(e)||a("drawCircles","Invalid input.","EFP000A00"),r.uiState.debugCircles=e}checkRoutes(){r.routeStore.checkRoutes()}updateLayerVisibility(e,t){typeof e!="string"&&a("updateLayerVisibility","The layer name (string) must be passed.","EFP000B00"),t||a("updateLayerVisibility","Passing a false value to visible will have no effect.","EFP000B01"),r.layerStore.updateVisibility(e,t)}getCenterCoordinates(){return r.fp.getCenterCoordinates()}exhibitorsList(){return r.exhibitorStore.exhibitors.map(e=>g(e))}boothsList(){return r.boothStore.booths.map(e=>g(e))}categoriesList(){return r.categoryStore.categories.map(e=>g(e))}selectCategory(e){if(e==null||typeof e!="string"){r.searchStore.selectSearch();return}const t=e?.toLowerCase(),o=r.categoryStore.categories.find(({name:n,slug:s})=>n?.toLowerCase()===t||s?.toLowerCase()===t);if(!o){a("selectCategory",`Category ${e} not found.`,"EFP000C01");return}r.selectCategory(o)}select(e){if(typeof e!="string"){a("select","Parameter must be a string.","EFP001700");return}const t=e,o=t?.toLowerCase(),n=r.boothStore.booths.find(c=>c.slug?.toLowerCase()===o||c.externalId?.toLowerCase()===o||c.externalId?.toLowerCase()?.replace(/\s+/g,"")===o);if(n){setTimeout(()=>r.selectBooth(n),250);return}const s=r.eventStore.eventItems.find(c=>c.slug?.toLowerCase()===o||c.externalId?.toLowerCase()===o);if(s){r.selectEventItem(s,!0);return}const i=r.exhibitorStore.exhibitors.find(c=>c.slug?.toLowerCase()===o||c.externalId?.toLowerCase()===o);if(i){setTimeout(()=>r.clickExhibitor(i),250);return}const h=r.categoryStore.categories.find(c=>c.slug===t);if(h){r.selectCategory(h);return}const u=r.speakerStore.findBySlug(t);if(u){r.selectSpeaker(u,!0);return}t.includes("heatmap=true")||r.searchStore.selectSearch(t)}showList(e){const t={bookmarks:()=>r.selectBookmarks(),visited:()=>r.selectVisited(),sessions:()=>r.selectSessions(),exhibitors:()=>r.selectExhibitors(),speakers:()=>r.selectSpeakers(),tours:()=>r.selectTours(),language:()=>r.selectLanguage()},o=t[e];if(!o){a("showList",`Unknown list "${e}". Must be one of: ${Object.keys(t).join(", ")}.`,"EFP001800");return}o()}selectTour(e){if(typeof e!="string"||!e){a("selectTour","A tour id must be passed.","EFP001900");return}const t=r.toursStore.getTourById(e);t?r.toursStore.launchTour(t,t.name,t.description):(console.warn(`Route with id "${e}" not found`),r.selectTours())}openPlanner(e={}){if(typeof e!="object"||e===null){a("openPlanner","An options object must be passed.","EFP001A00");return}const t=e.from?S(e.from):null;e.fromBookmarks?r.routePlannerStore.launchFromBookmarks(t??void 0):r.routePlannerStore.launchFromSlugs(e.items??[],t??void 0)}startBuildRoute(){r.uiState.startBuildRoute()}applyParameters(e){typeof e!="string"&&a("applyParameters","A query string must be passed.","EFP000D00"),Y(e)}getVisibility(){return r.uiState.visibility}setVisibility(e){(typeof e!="object"||!Object.keys(e).length)&&a("setVisibility","The parameter must be passed.","EFP000E00"),r.uiState.setVisibility(e)}findLocation(){r.routeStore.findLocation()}zoomIn(){r.uiState.zoomIn()}zoomOut(){r.uiState.zoomOut()}switchView(){r.maplibreStore.activateMaplibre()}setCamera(e){p("setCamera called with camera=%O",e);const t=I.safeParse(e);if(!t.success){a("setCamera",t.error.message,"EFP001B00");return}r.uiState.setMapSettings(re(t.data))}getCamera(){return oe(r.uiState.mapSettings)}zoomTo(e,t){p("zoomTo called with selectors=%O options=%O",e,t);const o=w.safeParse(e);if(!o.success){a("zoomTo",o.error.message,"EFP001600");return}const n=P.safeParse(t);if(!n.success){a("zoomTo",n.error.message,"EFP001601");return}const s=this.getBounds(e);s&&this.fitBounds(s,t)}getBounds(e){p("getBounds called with selectors=%O",e);const t=w.safeParse(e);if(!t.success){a("getBounds",t.error.message,"EFP001400");return}const o=[];if(e.booths?.forEach(s=>{let i;s.externalId?i=r.boothStore.boothByExternalId.get(s.externalId):s.name&&(i=r.boothStore.boothByName.get(s.name.toLowerCase())),i?.rect&&o.push(i.rect)}),e.exhibitors?.forEach(s=>{let i;s.externalId?i=r.exhibitorStore.exhibitorByExternalId.get(s.externalId):s.name&&(i=r.exhibitorStore.exhibitorByName.get(s.name.toLowerCase())),i?.booths?.forEach(h=>{h.rect&&o.push(h.rect)})}),o.length===0)return;const n=E.fromUnion(...o);return{leftTop:{x:n.min.x,y:n.min.y},rightBottom:{x:n.max.x,y:n.max.y}}}fitBounds(e,t){if(p("fitBounds called with bounds=%O options=%O",e,t),!e){r.uiState.fitBounds();return}const o=U.safeParse(e);if(!o.success){a("fitBounds",o.error.message,"EFP001500");return}const n=P.safeParse(t);if(!n.success){a("fitBounds",n.error.message,"EFP001501");return}const s=E.fromMinMax({x:e.leftTop.x,y:e.leftTop.y},{x:e.rightBottom.x,y:e.rightBottom.y});r.uiState.moveToRect=t?.padding?s.expand(t.padding):s}getBoothRect(e){typeof e!="string"&&a("getBoothRect","A booth name must be passed.","EFP000F00");const t=S(e)?.rect;return t?l.fromBox(t):void 0}convertToGeo(e,t){if(!b?.properties?.config){a("convertToGeo","The coordinates cannot be converted because the GPS configuration is not defined.","EFP001000");return}if(!e||!t){a("convertToGeo","Both coordinates must be passed.","EFP001001");return}return se(e,t,b.properties.config)}getGeoConfig(){const e=b?.properties?.config;return e?{bearing:e.bearing??0,p0:e.p0,p1:e.p1,p2:e.p2}:null}unstable_destroy(){let e=window.__efpElement.firstChild;ee(),window.removeEventListener("__efpStyleLoad",this.efpStyleLoadHandler),window.removeEventListener("error",J),r.maplibreStore.dispose(),W(),K(),Q(),this.root.unmount(),e.remove()}search(e){return typeof e!="string"&&a("search","A search string must be passed.","EFP001100"),r.fuzzySearchEngineStore.loadEngine().then(()=>(r.searchStore.selectSearch(e),r.uiState.fuzzySearchItems.map(t=>({item:g(t.item),score:t.score}))))}getFloors(){return r.layerStore.floors.map(e=>({name:e.name,shortName:e.shortName,description:e.description,active:e.active,disabled:e.disabled,index:e.index}))}activateFloor(e){if(!e?.name&&e?.index==null){a("activateFloor","Invalid floorId. It must contain either a name or an index.","EFP001200");return}const t=this.getFloors();if(e.name){const o=t.find(n=>n.name===e.name||n.shortName===e.name);if(!o){a("activateFloor",`Floor with name "${e.name}" not found.`,"EFP001201");return}if(o.active)return;this.updateLayerVisibility(o.name,!0);return}if(e.index!==null){const o=t.find(s=>s.index===e.index),n=o?.name;if(!n){a("activateFloor",`Floor at index ${e.index} does not exist.`,"EFP001203");return}if(o.active)return;this.updateLayerVisibility(n,!0);return}}showPathway(e,t){const{boothExternalIds:o,exhibitorExternalIds:n}=t?.length?B(t):{boothExternalIds:[],exhibitorExternalIds:[]};_({pathwayId:e,boothIds:o,exhibitorIds:n})}showPathwayOnly(e,t){this.activateFloor({name:t}),r.layerStore.showPathWay(e),r.uiState.setPathwayOnlyMode(!0);const o=r.layerStore.findLayer(e),n=r.layerStore.findLayer(t),s=o?.rect||o?.viewbox?o:n;if(s?.rect||s?.viewbox){const i=s.viewbox??s.rect;r.uiState.moveToRect=i.clone()}}hidePathways(){this.highlightBooths([]),r.layerStore.hidePathways(),r.uiState.setPathwayOnlyMode(!1)}showSearch(){r.selectSearch("")}changeLanguage(e){const t=e?.toLowerCase?.();if(!ae(t)){a("changeLanguage",`Language "${e}" was not found. Available languages: ${ne().map(o=>o.id).join(",")}`,"EFP001300");return}he(t)}isGpsTrackingEnabled(){return r.routeStore.gpsEnabled}setGpsTrackingEnabled(e){r.routeStore.setGpsTrackingEnabled(e)}deselectCurrentPosition(){r.routeStore.selectCurrentPosition(null,!1)}deselectRoute(){r.routeStore.selectRoute(null),r.routeStore.setOnlyAccessible(!1)}reset(){this.selectBooth(""),this.selectExhibitor(""),this.selectCategory(),this.deselectCurrentPosition(),this.deselectRoute(),this.highlightEntities([]),r.uiState.kioskData&&r.resetCameraFn?r.resetCameraFn?.():this.fitBounds()}selectAccessibleRoute(e){r.routeStore.setOnlyAccessible(!0),this.selectRoute(e)}}function m(f){return typeof f=="string"?S(f):r.routeStore.getNearestBooth(f)}let C=0;function a(f,e,t){const o=`Error calling "${f}" SDK method.`,n=`${e.endsWith(".")?e:e+"."} More information at`;let s="https://js-sdk.expofp.com/api/packages";if(t&&(s+=`#error-${t}`),console.error(`${o} ${n} ${s}`),r.fp.disableRuntimeAlerts)return;r.uiState.setGlobalErrorMessage({title:o,body:T(A,{children:[n," ",x("a",{href:s,target:"_blank",rel:"noreferrer",children:s})]})}),clearTimeout(C);const i=8e3;C=window.setTimeout(()=>{const h=async()=>{r.uiState.globalErrorMessages.length>0&&(r.uiState.popGlobalErrorMessage(),await new Promise(u=>setTimeout(u,i/2)),h())};h()},i)}class l{get h(){return Math.abs(this.y2-this.y1)}get w(){return Math.abs(this.x2-this.x1)}get cx(){return(this.x1+this.x2)/2}get cy(){return(this.y1+this.y2)/2}constructor(e,t,o,n){if(e>o){const s=e;e=o,o=s}if(t>n){const s=t;t=n,n=s}this.x1=e,this.y1=t,this.x2=o,this.y2=n}static fromBox(e){return new l(e.min.x,e.min.y,e.max.x,e.max.y)}static fromCxcywh(e,t,o,n){return new l(e-o/2,t-n/2,e+o/2,t+n/2)}contains(e){return e.x1>=this.x1&&e.x2<=this.x2&&e.y1>=this.y1&&e.y2<=this.y2}intersects(e){const t=Math.max(this.x1,e.x1),o=Math.min(this.x2,e.x2),n=Math.max(this.y1,e.y1),s=Math.min(this.y2,e.y2);return o>=t&&s>=n}getIntersection(e){const t=Math.max(this.x1,e.x1),o=Math.min(this.x2,e.x2),n=Math.max(this.y1,e.y1),s=Math.min(this.y2,e.y2);return o>=t&&s>=n?new l(t,n,o,s):new l(0,0,0,0)}getRotated90(){return l.fromCxcywh(this.cx,this.cy,this.h,this.w)}normalize(e,t){return new l(this.x1/e,this.y1/t,this.x2/e,this.y2/t)}withPadding(e,t=e){return this.w<e*2||this.h<t*2?this:l.fromCxcywh(this.cx,this.cy,this.w-e*2,this.h-t*2)}scale(e){return new l(this.x1*e,this.y1*e,this.x2*e,this.y2*e)}getArea(){return this.w*this.h}clone(){return new l(this.x1,this.y1,this.x2,this.y2)}translate(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this}equals(e){return e.x1===this.x1&&e.x2===this.x2&&e.y1===this.y1&&e.y2===this.y2}toString(){return this.x1+","+this.y1+","+this.w+","+this.h}containsPoint(e,t){return e>=this.x1&&e<=this.x2&&t>=this.y1&&t<=this.y2}}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import type RootStore from '../RootStore';
|
|
2
|
+
/**
|
|
3
|
+
* Point the store at the container this FloorPlan was handed, and measure it.
|
|
4
|
+
*
|
|
5
|
+
* Kept apart from `initUi` because the two have different lifetimes: the store
|
|
6
|
+
* module body — and so `initUi` — evaluates once per page, while one page may
|
|
7
|
+
* build several FloorPlans in turn. A second `load()` gets a new container, so
|
|
8
|
+
* anything still sized against or observing the first one is measuring a node
|
|
9
|
+
* the host has already detached, and the plan renders blank. Idempotent: it
|
|
10
|
+
* re-points the single ResizeObserver instead of stacking another one up.
|
|
11
|
+
*/
|
|
12
|
+
export declare function bindRootElement(store: RootStore): void;
|
|
2
13
|
export default function initUi(store: RootStore): void;
|
|
3
14
|
export declare function destroyUiHandlers(): void;
|
|
4
15
|
//# sourceMappingURL=init-ui.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Point as
|
|
1
|
+
import{Point as S}from"@expofp/geometry";import{autorun as a,reaction as h,runInAction as v}from"mobx";import{ResizeObserver as g}from"resize-observer";import{applyKioskMode as p}from"../../components/Kiosk/kiosk-mode";import{KIOSK_ENABLE_KEY as c,VISIBILITY_STORAGE_KEY as w}from"../../constants";import x from"../../data";import y from"../../tools/logger";import{isWebGlSupported as E}from"../../utils";import{detectLimitedModeViaImage as b}from"../../utils/detectLimitedModeViaImage";import{isLocalStorageAvailable as d}from"../../utils/localStorage";import m from"../../utils/preview-exhibitor";let n=null;export function bindRootElement(t){const e=window.__efpElement;if(!e)return;const{uiState:l}=t;l.rootElement=e;const o=(s,r)=>v("uiState.screenSize",()=>{l.screenSize=new S(s,r)});o(e.clientWidth,e.clientHeight),n?.disconnect(),n=new g(s=>{s.forEach(r=>{o(r.contentRect.width,r.contentRect.height)})}),n.observe(e)}export default function k(t){const{uiState:e,exhibitorStore:l}=t;if(bindRootElement(t),m){const i=l.exhibitorById.get(m.id);i&&(e.previewExhibitor=i)}const o=typeof matchMedia<"u"?matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`):null;o&&o.addEventListener&&o.addEventListener("change",()=>{e.devicePixelRatio=window.devicePixelRatio});const s=m||!E?"full":"medium";x.isRebooking&&e.list.type==="search"&&!e.list.text&&t.selectExhibitors(),e.desiredOverlaySize=s,a(()=>{(e.searchFocused||e.menu)&&e.overlayPosition!=="left"&&(e.desiredOverlaySize="full")}),a(()=>{e.overlaySize!=="full"&&e.menu&&(e.menu=!1)}),e.wsShown||(e.wsStarted=!0),e.kiosk=d&&localStorage.getItem(c)==="1",window.__resett=u;function r(){t.reset()}let f;function u(){e.kiosk&&(y.log("zzz2","reset timer"),clearTimeout(f),f=setTimeout(r,3e4),e.inIdle=!1)}a(()=>{const i=e.list;i.type==="search"&&(i.text==="kiosk=1"?p(e,!0):i.text==="kiosk=0"&&p(e,!1))}),h(()=>e.kiosk,i=>{d&&(i?(localStorage.setItem(c,"1"),u()):localStorage.setItem(c,"0"))}),d&&e.setVisibility(JSON.parse(localStorage.getItem(w)??"null")||{}),I(t)}export function destroyUiHandlers(){n&&(n.disconnect(),n=null)}async function I(t){try{if(!await b())return;t.uiState.setGlobalErrorMessage({title:"Unsupported Environment Detected",body:`
|
|
2
2
|
This application requires a proper server environment to function correctly.
|
|
3
3
|
For full functionality, please ensure the application is served through an HTTP/HTTPS server.
|
|
4
4
|
Some features may not work as expected in the current setup.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expofp/floorplan",
|
|
3
|
-
"version": "3.23.
|
|
3
|
+
"version": "3.23.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/expofp/efp-app.git",
|
|
@@ -70,14 +70,14 @@
|
|
|
70
70
|
"tslib": "^2.3.0",
|
|
71
71
|
"uuid": "^9.0.1",
|
|
72
72
|
"zod": "4.4.3",
|
|
73
|
-
"@expofp/config": "3.23.
|
|
74
|
-
"@expofp/debug": "3.23.
|
|
75
|
-
"@expofp/geometry": "3.23.
|
|
76
|
-
"@expofp/resolve": "3.23.
|
|
77
|
-
"@expofp/schema": "3.23.
|
|
78
|
-
"@expofp/wayfinding": "3.23.
|
|
79
|
-
"@expofp/utils": "3.23.
|
|
80
|
-
"@expofp/ui": "3.23.
|
|
73
|
+
"@expofp/config": "3.23.4",
|
|
74
|
+
"@expofp/debug": "3.23.4",
|
|
75
|
+
"@expofp/geometry": "3.23.4",
|
|
76
|
+
"@expofp/resolve": "3.23.4",
|
|
77
|
+
"@expofp/schema": "3.23.4",
|
|
78
|
+
"@expofp/wayfinding": "3.23.4",
|
|
79
|
+
"@expofp/utils": "3.23.4",
|
|
80
|
+
"@expofp/ui": "3.23.4"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@babel/plugin-proposal-decorators": "^8.0.2",
|