@expofp/floorplan 3.1.2 → 3.1.3
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-YALfakcg.js → CookieConsent-CgshNiUW.js} +1972 -1972
- package/dist/browser/{Debug-Dienfacq.js → Debug-CAQ2Y1Zh.js} +6 -6
- package/dist/browser/{Demo-BbY4PJhj.js → Demo-B1d7LKVa.js} +8 -8
- package/dist/browser/{Free-BlfLzpZ4.js → Free-CDTSlJEY.js} +8 -8
- package/dist/browser/{Gallery-BJ8RKc0W.js → Gallery-DvPKgsZC.js} +8 -8
- package/dist/browser/{GpsLoader-C-qC7AlJ.js → GpsLoader-0QPi71oF.js} +8 -8
- package/dist/browser/{KioskStore-umOa7R8-.js → KioskStore-IG8a9NKE.js} +3 -3
- package/dist/browser/{Mapbox-BQKwe6gC.js → Mapbox-BqYgZ149.js} +8 -8
- package/dist/browser/{SetKioskMode-B4WkaonJ.js → SetKioskMode-CuhPjOeV.js} +7 -7
- package/dist/browser/{ShowKiosk-CwQsYu6G.js → ShowKiosk-Vv7rWwfr.js} +9 -9
- package/dist/browser/{ThreeComponent-YJ6J3gEv.js → ThreeComponent-CUD9Ymxj.js} +9 -9
- package/dist/browser/{TouchHand-DtBzj-Bj.js → TouchHand-CAu_2Z0K.js} +4 -4
- package/dist/browser/{ViewerMenuPanel-Cv7KW_rT.js → ViewerMenuPanel-DduX02M1.js} +7 -7
- package/dist/browser/{add-debug-secret-listener-BRth-pLl.js → add-debug-secret-listener-Cvu8GQbJ.js} +1 -1
- package/dist/browser/{boolean-editor-D_18BAC7.js → boolean-editor-DqNwtjhT.js} +6 -6
- package/dist/browser/bootIntercom-QkbBgNhv.js +40 -0
- package/dist/browser/bundle.json +46 -43
- package/dist/browser/{chunk-BjP-W_8B.js → chunk-DQBx2y0u.js} +1 -1
- package/dist/browser/{classnames-nDCZdn8S.js → classnames-DDIn8LQy.js} +2 -2
- package/dist/browser/{client-CHtTpwEK.js → client-VF4zA-sh.js} +4 -4
- package/dist/browser/{data-DRzLxQO7.js → data-CFvjGzVc.js} +3 -3
- package/dist/browser/{debug-overlay-B8CWKuKY.js → debug-overlay-DDbMN2nu.js} +8 -8
- package/dist/browser/{debug-ui-DUF5K4cu.js → debug-ui-Cbdmlsqq.js} +6 -6
- package/dist/browser/{dist-C0wOn0VY.js → dist-B0ttNa_v.js} +5 -5
- package/dist/browser/{exports-DJDFfUko.js → exports-BQ_HyGqM.js} +1 -1
- package/dist/browser/{favicon-DtqguaGB.js → favicon-C65AD9b8.js} +1 -1
- package/dist/browser/{fetch-retry.umd-B8F2bkss.js → fetch-retry.umd-COwLXJwf.js} +2 -2
- package/dist/browser/{flex-DCHbgjnw.js → flex-vY_BeCRt.js} +6 -6
- package/dist/browser/{floorplan.loader-CTycsBPj.js → floorplan.loader-CvD9t0Bs.js} +656 -679
- package/dist/browser/{floorplan.ready-D8TO96JJ.js → floorplan.ready-CtadyRAs.js} +12 -11
- package/dist/browser/{fuse-BEUAG1Xp.js → fuse-DGPiyXlj.js} +2 -2
- package/dist/browser/index.js +11 -11
- package/dist/browser/{is-debug-C1gwybh0.js → is-debug-Cb7eGksV.js} +2 -2
- package/dist/browser/{jsx-runtime-CGa6rouk.js → jsx-runtime-BuRUOsV1.js} +2 -2
- package/dist/browser/{lib-B-kSneKQ.js → lib-Cvfv2IMm.js} +4 -4
- package/dist/browser/locales/ar.json +1 -1
- package/dist/browser/locales/de.json +1 -1
- package/dist/browser/locales/es.json +1 -1
- package/dist/browser/locales/fr.json +1 -1
- package/dist/browser/locales/he.json +1 -1
- package/dist/browser/locales/it.json +1 -1
- package/dist/browser/locales/kk.json +1 -1
- package/dist/browser/locales/ko.json +1 -1
- package/dist/browser/locales/mn.json +1 -1
- package/dist/browser/locales/nl.json +1 -1
- package/dist/browser/locales/pl.json +1 -1
- package/dist/browser/locales/pt.json +1 -1
- package/dist/browser/locales/ru.json +1 -1
- package/dist/browser/locales/sv.json +1 -1
- package/dist/browser/locales/th.json +1 -1
- package/dist/browser/locales/tr.json +1 -1
- package/dist/browser/locales/uk.json +1 -1
- package/dist/browser/locales/vi.json +1 -1
- package/dist/browser/locales/zh.json +1 -1
- package/dist/browser/{main-DscTVUQ0.js → main-DJGo4g--.js} +1 -1
- package/dist/browser/{mobx-DfjpWyaW.js → mobx-CWmFk5Q_.js} +4 -4
- package/dist/browser/{particles.min-Biy-VbhD.js → particles.min-BZysM5Tg.js} +2 -2
- package/dist/browser/{prop-types-BKhIyeNo.js → prop-types-DyiMgNwl.js} +2 -2
- package/dist/browser/{react-19U-5m1O.js → react-cBEAwEeA.js} +2 -2
- package/dist/browser/{react-dom-BeWJor3U.js → react-dom-D_5039DL.js} +3 -3
- package/dist/browser/{reset-all-settings-DbzRwd74.js → reset-all-settings-VjH78fi3.js} +1 -1
- package/dist/browser/{settings-CH8qvuVX.js → settings-D595OjcR.js} +6 -6
- package/dist/browser/{src-_zgzV95f.js → src-DWVoS2GS.js} +4 -4
- package/dist/browser/{store-CwvDErjP.js → store-Bj7lyE8j.js} +13 -13
- package/dist/browser/{ui-I67QXE1I.js → ui-Di53DAaR.js} +6 -6
- package/dist/esm/components/Map/drawing/config/canvases.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-markers.js +1 -1
- package/dist/esm/components/YahRow.js +1 -1
- package/dist/esm/floorplan.loader.js +1 -1
- package/dist/esm/floorplan.ready.js +1 -1
- package/dist/esm/intercom/bootIntercom.d.ts +3 -0
- package/dist/esm/intercom/bootIntercom.js +19 -0
- package/dist/esm/intercom/index.d.ts +3 -0
- package/dist/esm/intercom/index.js +1 -0
- package/dist/esm/intercom/shouldLoad.d.ts +4 -0
- package/dist/esm/intercom/shouldLoad.js +1 -0
- package/dist/esm/intercom/types.d.ts +6 -0
- package/dist/esm/intercom/types.js +1 -0
- package/dist/esm/store/SearchButtonsStore.d.ts +1 -1
- package/dist/esm/store/SearchStore.d.ts +1 -1
- package/dist/esm/store/SearchStore.js +1 -1
- package/dist/esm/store/UIState.d.ts +1 -1
- package/dist/esm/store/UIState.js +1 -1
- package/dist/esm/store/init/init-heatmap.js +1 -1
- package/package.json +3 -3
- package/dist/esm/tools/intercom.d.ts +0 -12
- package/dist/esm/tools/intercom.js +0 -19
|
@@ -2,16 +2,16 @@ function __vite_inject_css__(css, id){ if (typeof document==='undefined') retur
|
|
|
2
2
|
(function() {
|
|
3
3
|
try {
|
|
4
4
|
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
5
|
-
e.SENTRY_RELEASE = { id: "3.1.
|
|
5
|
+
e.SENTRY_RELEASE = { id: "3.1.3" };
|
|
6
6
|
var t = new e.Error().stack;
|
|
7
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "
|
|
7
|
+
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "4b9dc08b-da97-4e36-9d6c-5ec39c4894f0", e._sentryDebugIdIdentifier = "sentry-dbid-4b9dc08b-da97-4e36-9d6c-5ec39c4894f0");
|
|
8
8
|
} catch {}
|
|
9
9
|
})();
|
|
10
|
-
import { r as e, t } from "./chunk-
|
|
11
|
-
import { $ as n, C as r, D as i, E as a, Et as o, F as s, G as c, H as l, I as u, K as d, L as f, M as p, N as m, O as h, P as g, St as _, Tt as v, W as y, Y as b, _ as x, a as S, b as C, bt as w, c as T, d as E, dt as D, et as O, f as k, ft as ee, g as te, gt as ne, h as A, i as re, j as ie, l as ae, lt as oe, m as se, mt as ce, n as le, o as ue, ot as de, p as j, pt as fe, q as pe, r as me, st as he, t as ge, u as M, v as N, x as _e, xt as ve, y as P, yt as ye } from "./is-debug-
|
|
12
|
-
import { t as be } from "./react-
|
|
13
|
-
import { t as xe } from "./jsx-runtime-
|
|
14
|
-
import { t as Se } from "./classnames-
|
|
10
|
+
import { r as e, t } from "./chunk-DQBx2y0u.js";
|
|
11
|
+
import { $ as n, C as r, D as i, E as a, Et as o, F as s, G as c, H as l, I as u, K as d, L as f, M as p, N as m, O as h, P as g, St as _, Tt as v, W as y, Y as b, _ as x, a as S, b as C, bt as w, c as T, d as E, dt as D, et as O, f as k, ft as ee, g as te, gt as ne, h as A, i as re, j as ie, l as ae, lt as oe, m as se, mt as ce, n as le, o as ue, ot as de, p as j, pt as fe, q as pe, r as me, st as he, t as ge, u as M, v as N, x as _e, xt as ve, y as P, yt as ye } from "./is-debug-Cb7eGksV.js";
|
|
12
|
+
import { t as be } from "./react-cBEAwEeA.js";
|
|
13
|
+
import { t as xe } from "./jsx-runtime-BuRUOsV1.js";
|
|
14
|
+
import { t as Se } from "./classnames-DDIn8LQy.js";
|
|
15
15
|
//#region ../../node_modules/.pnpm/mobx-react-lite@1.5.2_mobx@5.15.7_react@19.2.5/node_modules/mobx-react-lite/dist/index.module.js
|
|
16
16
|
var Ce = /* @__PURE__ */ e(be());
|
|
17
17
|
if (!Ce.useState) throw Error("mobx-react-lite requires React with Hooks support");
|
|
@@ -4897,7 +4897,7 @@ function _a(e, t = "#c8248b", n = e * .4, r, i, a, o = "#000") {
|
|
|
4897
4897
|
let s = document.createElement("canvas"), c = s.getContext("2d");
|
|
4898
4898
|
s.width = r * n, s.height = i * n, c.scale(n, n);
|
|
4899
4899
|
let l = r / 2, u = i / 2;
|
|
4900
|
-
return c.translate(l - 35, u - 35), c.beginPath(), c.fillStyle = "#FFFFFF", c.moveTo(0, 35), c.bezierCurveTo(0, 54.329966, 15.670034, 70, 35, 70), c.bezierCurveTo(54.329966, 70, 70, 54.329966, 70, 35), c.bezierCurveTo(70, 15.670034, 54.329966, 0, 35, 0), c.bezierCurveTo(15.670034, 0, 0, 15.670034, 0, 35), c.fill(), c.beginPath(), c.fillStyle = t, c.moveTo(10, 35), c.bezierCurveTo(10, 48.807119, 21.192881, 60, 35, 60), c.bezierCurveTo(48.807119, 60, 60, 48.807119, 60, 35), c.bezierCurveTo(60, 21.192881, 48.807119, 10, 35, 10), c.bezierCurveTo(21.192881, 10, 10, 21.192881, 10, 35), c.fill(), a && (c.textAlign = "center", c.textBaseline = "alphabetic", c.font = xa(38), c.
|
|
4900
|
+
return c.translate(l - 35, a ? 0 : u - 35), c.beginPath(), c.fillStyle = "#FFFFFF", c.moveTo(0, 35), c.bezierCurveTo(0, 54.329966, 15.670034, 70, 35, 70), c.bezierCurveTo(54.329966, 70, 70, 54.329966, 70, 35), c.bezierCurveTo(70, 15.670034, 54.329966, 0, 35, 0), c.bezierCurveTo(15.670034, 0, 0, 15.670034, 0, 35), c.fill(), c.beginPath(), c.fillStyle = t, c.moveTo(10, 35), c.bezierCurveTo(10, 48.807119, 21.192881, 60, 35, 60), c.bezierCurveTo(48.807119, 60, 60, 48.807119, 60, 35), c.bezierCurveTo(60, 21.192881, 48.807119, 10, 35, 10), c.bezierCurveTo(21.192881, 10, 10, 21.192881, 10, 35), c.fill(), a && (c.textAlign = "center", c.textBaseline = "alphabetic", c.lineJoin = "round", c.strokeStyle = "#fff", c.fillStyle = o, c.font = xa(38), c.lineWidth = 6, c.strokeText(a, 35, 108, r), c.fillText(a, 35, 108, r)), s;
|
|
4901
4901
|
}
|
|
4902
4902
|
function va(e, t = "#c8248b", n = e * .5) {
|
|
4903
4903
|
let r = 70 * n, i = 100 * n, a = document.createElement("canvas"), o = a.getContext("2d");
|
|
@@ -4926,7 +4926,7 @@ function Sa(e) {
|
|
|
4926
4926
|
return t.id = e.id, t.name = e.name, t.viewCount = e.viewCount, t.x = e.x, t.y = e.y, t.z = e.z, t;
|
|
4927
4927
|
});
|
|
4928
4928
|
let t = e.heatmapStore.heatmapData.yah.map((t) => {
|
|
4929
|
-
let n = e.heatmapStore.getColorByClicks(t.viewCount), r = e.uiState.devicePixelRatio, i = _a(r, n,
|
|
4929
|
+
let n = e.heatmapStore.getColorByClicks(t.viewCount), r = e.uiState.devicePixelRatio, i = _a(r, n, void 0, 95, 120, t.viewCount.toString()), a = i.toDataURL();
|
|
4930
4930
|
return {
|
|
4931
4931
|
name: t.id.toString(),
|
|
4932
4932
|
scale: 1,
|
|
@@ -4946,7 +4946,7 @@ function Sa(e) {
|
|
|
4946
4946
|
e.routeStore.setMarkers({
|
|
4947
4947
|
markers: n,
|
|
4948
4948
|
icons: t
|
|
4949
|
-
});
|
|
4949
|
+
}), e.selectSearch(" ");
|
|
4950
4950
|
}
|
|
4951
4951
|
}
|
|
4952
4952
|
//#endregion
|
|
@@ -32964,7 +32964,7 @@ var QF = ["dimensions25"], $F = (pP = N.struct, mP = N.ref, hP = N.ref, gP = N.r
|
|
|
32964
32964
|
if (this.details instanceof qj && this.list.type !== "multi-point-tour") return [this.details.from, this.details.to].filter((e) => e);
|
|
32965
32965
|
switch (this.list.type) {
|
|
32966
32966
|
case "search":
|
|
32967
|
-
let t = this.rootStore.fuzzySearchEngineStore.engine ? this.fuzzySearchItems.map(({ item: e }) => e).concat(this.foundInDescription) : this.searchItems;
|
|
32967
|
+
let t = !(this.heatmap || this.heatmapYah) && this.rootStore.fuzzySearchEngineStore.engine ? this.fuzzySearchItems.map(({ item: e }) => e).concat(this.foundInDescription) : this.searchItems;
|
|
32968
32968
|
return t = t.filter((e) => e.entity.type === "booth" ? !e.exhibitors.length : !0), this.hasAppliedFilters ? t.filter((e) => {
|
|
32969
32969
|
if (this.selectedCategoryFilters.length > 0 && e instanceof yi && !this.selectedCategoryFilters.some((t) => e.categories.some((e) => e.id === t.id))) return !1;
|
|
32970
32970
|
if (this.selectedPoiTypeFilters.length > 0) {
|
|
@@ -33742,7 +33742,7 @@ var oI = (nI = class {
|
|
|
33742
33742
|
}
|
|
33743
33743
|
async buildEngine() {
|
|
33744
33744
|
try {
|
|
33745
|
-
let { default: e } = await import("./fuse-
|
|
33745
|
+
let { default: e } = await import("./fuse-DGPiyXlj.js").then((e) => e.n);
|
|
33746
33746
|
C(() => {
|
|
33747
33747
|
this.engine = new e([], {
|
|
33748
33748
|
keys: this.keys,
|
|
@@ -33999,7 +33999,7 @@ var yI = class {
|
|
|
33999
33999
|
if (e.type === "speakers") return M("Search speakers");
|
|
34000
34000
|
if (tr.EXPO.startsWith("lenzerheidemotorclassics")) return "SUCHE";
|
|
34001
34001
|
if (tr.EXPO.startsWith("jetlag")) return "Search location or artist";
|
|
34002
|
-
if (t) return M("Find
|
|
34002
|
+
if (t) return M("Find values greater than");
|
|
34003
34003
|
if (this.uiState.hasAppliedFilters) return M("Search");
|
|
34004
34004
|
let n = I.boothTerm.toLowerCase();
|
|
34005
34005
|
return !I.searchText && HL.exhibitors.length === 0 ? M("Search {{boothTerm}}", { boothTerm: n }) : I.searchText || M("Search");
|
|
@@ -1,22 +1,22 @@
|
|
|
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.1.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.1.3" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "366e3673-c350-4f8b-b0f3-9cc93894014c", e._sentryDebugIdIdentifier = "sentry-dbid-366e3673-c350-4f8b-b0f3-9cc93894014c");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./chunk-
|
|
10
|
-
import { t } from "./jsx-runtime-
|
|
11
|
-
import { t as n } from "./settings-
|
|
12
|
-
import { t as r } from "./add-debug-secret-listener-
|
|
9
|
+
import { r as e } from "./chunk-DQBx2y0u.js";
|
|
10
|
+
import { t } from "./jsx-runtime-BuRUOsV1.js";
|
|
11
|
+
import { t as n } from "./settings-D595OjcR.js";
|
|
12
|
+
import { t as r } from "./add-debug-secret-listener-Cvu8GQbJ.js";
|
|
13
13
|
//#region ../debug/src/lib/ui/render-debug-ui.tsx
|
|
14
14
|
var i = t(), a = !1;
|
|
15
15
|
function o() {
|
|
16
16
|
if (a) return;
|
|
17
17
|
a = !0;
|
|
18
18
|
let t = n("Show Debug Button Overlay"), o = async (n) => {
|
|
19
|
-
let { DebugUi: r } = await import("./debug-ui-
|
|
19
|
+
let { DebugUi: r } = await import("./debug-ui-Cbdmlsqq.js"), { createRoot: a } = await import("./client-VF4zA-sh.js").then((t) => /* @__PURE__ */ e(t.default, 1)), o = document.createElement("div");
|
|
20
20
|
document.body.appendChild(o), a(o).render(/* @__PURE__ */ (0, i.jsx)(r, {
|
|
21
21
|
useDebugButtonState: t.useState,
|
|
22
22
|
open: n
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{FONT_FACE as z,FONT_WEIGHT_PRIMARY_BOOTH as f}from"../../../../constants";export function createImageCanvas(n,
|
|
1
|
+
import{FONT_FACE as z,FONT_WEIGHT_PRIMARY_BOOTH as f}from"../../../../constants";export function createImageCanvas(n,l,r,i,c=1,o){const e=n?n.width/n.height:1;let a=l*i*c,t=r*i*c;l/r>e?a=t*e:t=a/e;const v=document.createElement("canvas"),u=v.getContext("2d");return v.width=a,v.height=t,v.id=n.id,o==="horizontal"?(u.scale(-1,1),u.translate(-a,0)):o==="vertical"&&(u.scale(1,-1),u.translate(0,-t)),u.drawImage(n,0,0,a,t),v}export function createCurrentCanvas(n,l="#c8248b",r=n*.4,i,c,o,e="#000"){i=i||95,c=c||95;const a=document.createElement("canvas"),t=a.getContext("2d");a.width=i*r,a.height=c*r,t.scale(r,r);const v=i/2,u=c/2;if(t.translate(v-35,o?0:u-35),t.beginPath(),t.fillStyle="#FFFFFF",t.moveTo(0,35),t.bezierCurveTo(0,54.329966,15.670034,70,35,70),t.bezierCurveTo(54.329966,70,70,54.329966,70,35),t.bezierCurveTo(70,15.670034,54.329966,0,35,0),t.bezierCurveTo(15.670034,0,0,15.670034,0,35),t.fill(),t.beginPath(),t.fillStyle=l,t.moveTo(10,35),t.bezierCurveTo(10,48.807119,21.192881,60,35,60),t.bezierCurveTo(48.807119,60,60,48.807119,60,35),t.bezierCurveTo(60,21.192881,48.807119,10,35,10),t.bezierCurveTo(21.192881,10,10,21.192881,10,35),t.fill(),o){t.textAlign="center",t.textBaseline="alphabetic",t.lineJoin="round",t.strokeStyle="#fff",t.fillStyle=e;const T=38;t.font=getFont(T),t.lineWidth=6;const b=70+T;t.strokeText(o,35,b,i),t.fillText(o,35,b,i)}return a}export function createTargetCanvas(n,l="#c8248b",r=n*.5){const i=70*r,c=100*r,o=document.createElement("canvas"),e=o.getContext("2d");return o.width=i,o.height=c,e.scale(r,r),e.beginPath(),e.fillStyle="rgb(255, 255, 255)",e.moveTo(32.6,97.8),e.bezierCurveTo(24.4,81.5,0,57,0,32.6),e.bezierCurveTo(0,14.6,14.6,0,32.6,0),e.bezierCurveTo(50.5,0,65.2,14.6,65.2,32.6),e.bezierCurveTo(65.2,57,40.7,81.5,32.6,97.8),e.fill(),e.beginPath(),e.fillStyle=l,e.moveTo(32.6,91.1),e.bezierCurveTo(25.2,76.3,3.1,54.2,3.1,32.1),e.bezierCurveTo(3.1,15.9,16.3,2.6,32.6,2.6),e.bezierCurveTo(48.8,2.6,62,15.9,62,32.1),e.bezierCurveTo(62,54.2,39.9,76.3,32.6,91.1),e.fill(),e.beginPath(),e.fillStyle="rgb(255, 255, 255)",e.moveTo(16.2,32.6),e.bezierCurveTo(16.2,41.6,23.5,48.9,32.5,48.9),e.bezierCurveTo(41.5,48.9,48.8,41.6,48.8,32.6),e.bezierCurveTo(48.8,23.6,41.5,16.3,32.5,16.3),e.bezierCurveTo(23.5,16.3,16.2,23.6,16.2,32.6),e.fill(),o}export function createArrowCurrentCanvas(n,l="#c8248b",r=n*.4){const i=95*r,c=95*r,o=document.createElement("canvas"),e=o.getContext("2d");return o.width=i,o.height=c,e.scale(r,r),e.beginPath(),e.arc(47,47,25,0,2*Math.PI),e.fillStyle=l,e.fill(),e.beginPath(),e.fillStyle=l,e.moveTo(75,27),e.lineTo(95,47),e.lineTo(75,67),e.lineTo(80,47),e.closePath(),e.fill(),o}export function createYahCanvas(n,l="#ff4343",r=n*.5){const i=77*r,c=116*r,o=document.createElement("canvas"),e=o.getContext("2d");return o.width=i,o.height=c,e.scale(r,r),e.scale(r,r),e.beginPath(),e.fillStyle="#FFFFFF",e.moveTo(68.303,57.335),e.bezierCurveTo(77.894,39.304,70.649,15.785,50.95,8.04),e.bezierCurveTo(30.727,0,8.375,11.837,3.207,32.831),e.bezierCurveTo(0,46.185,6.644,57.323,13.131,68.211),e.fill(),e.beginPath(),e.fillStyle=l,e.moveTo(51.565,35.459),e.bezierCurveTo(51.565,43.256,45.201,49.575,37.354,49.575),e.bezierCurveTo(29.516,49.575,23.159,43.256,23.159,35.459),e.bezierCurveTo(23.159,27.668,29.516,21.345,37.354,21.345),e.bezierCurveTo(45.201,21.345,51.565,27.668,51.565,35.459),e.closePath(),e.fill(),e.beginPath(),e.moveTo(68.303,57.335),e.bezierCurveTo(77.894,39.304,70.649,15.785,50.95,8.04),e.bezierCurveTo(30.727,0,8.375,11.837,3.207,32.831),e.bezierCurveTo(0,46.185,6.644,57.323,13.131,68.211),e.lineTo(13.131,68.211),e.lineTo(13.131,68.211),e.bezierCurveTo(13.921,69.533,14.698,70.829,15.454,72.137),e.bezierCurveTo(19.465,79.158,23.533,86.12,27.571,93.086),e.lineTo(27.571,93.086),e.bezierCurveTo(30.098,97.421,32.611,101.756,35.116,106.077),e.bezierCurveTo(36.128,107.868,38.934,107.868,39.945,106.077),e.bezierCurveTo(49.387,90.003,58.708,74.029,68.031,57.951),e.bezierCurveTo(68.15,57.743,68.24,57.543,68.303,57.335),e.closePath(),e.moveTo(60.103,60.395),e.lineTo(63.201,55.041),e.lineTo(63.201,55.041),e.bezierCurveTo(73.31,36.735,61.285,11.614,39.04,11.17),e.bezierCurveTo(19.388,10.714,2.759,29.479,9.386,49.013),e.bezierCurveTo(10.726,52.998,12.657,56.9,14.84,60.721),e.bezierCurveTo(15.041,58.454,15.938,56.258,17.589,54.586),e.bezierCurveTo(19.708,52.425,22.216,50.638,24.996,49.283),e.bezierCurveTo(28.252,52.249,32.595,54.051,37.354,54.051),e.bezierCurveTo(42.123,54.051,46.47,52.249,49.73,49.283),e.bezierCurveTo(52.505,50.638,55.017,52.425,57.135,54.586),e.bezierCurveTo(58.701,56.188,59.701,58.245,60.103,60.395),e.closePath(),e.fill("evenodd"),e.beginPath(),e.moveTo(29.024,104.982),e.bezierCurveTo(29.024,103.626,27.923,102.527,26.57,102.527),e.bezierCurveTo(25.214,102.527,24.114,103.626,24.114,104.982),e.bezierCurveTo(24.114,111.395,30.347,116.838,37.444,116.838),e.bezierCurveTo(44.54,116.838,50.771,111.395,50.771,104.982),e.bezierCurveTo(50.771,103.626,49.666,102.527,48.317,102.527),e.bezierCurveTo(46.961,102.527,45.855,103.626,45.855,104.982),e.bezierCurveTo(45.855,108.193,42.352,111.956,37.444,111.956),e.bezierCurveTo(32.528,111.956,29.024,108.193,29.024,104.982),e.closePath(),e.fill(),o}const h=document.createElement("canvas"),C=h.getContext("2d");let d;function g(n,l){return d!==n&&(C.font=n),C.measureText(l).width}export function createLabelCanvas(n,l,r,i="#fff",c,o,e){n=n.replace(/^_/,""),l*=r;const a=document.createElement("canvas"),t=a.getContext("2d"),v=Number(getComputedStyle(document.body).getPropertyValue(f)),u=getFont(l,v||c),T=g(u,n.replace(/[0-9]/g,"3").replace(/[A-Z]/g,"A"))+3+3,b=4,s=l+b;return a.width=T*r,a.height=s*r,t.font=u,t.textAlign="center",t.textBaseline="alphabetic",t.fillStyle=i,e&&o&&(t.lineWidth=e,t.strokeStyle=o,t.strokeText(n,T/2,s-b/2*r),t.lineJoin="round"),t.fillText(n,T/2,s-b/2*r),a}export function getFont(n,l=500,r="normal"){const i=getComputedStyle(document.body).getPropertyValue(z),c='Oswald, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',o=i?`${i}, ${c}`:c;return`${r} ${l} ${n}px ${o}`}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import u,{layersStore as
|
|
1
|
+
import u,{layersStore as S}from"../../../../store";import{reaction as v}from"mobx";import{createImageCanvas as x}from"./canvases";import{createImageDef as C,getBounds as E}from"../../../../renderer";import{toRadians as K}from"../../../../utils/math";const L="_selected";export const MARKER_LAYER_NAME="markers";export function configMarkers(s){const h=[],l=new Map,a=new Map;let n=[];const f=s.scene.rootLayer.children.find(t=>t.name===MARKER_LAYER_NAME);async function k(t){const o=[];t.forEach(r=>{const{name:e,content:i,width:c,height:g,scale:y}=r;if(l.has(e))return;const m=new Image,D=new Promise((w,M)=>{m.onload=()=>{l.set(e,{img:m,width:c,height:g,scale:y}),w()},m.onerror=b=>{M(b)}});o.push(D),m.src=i,m.crossOrigin="anonymous"}),await Promise.all(o)}const d=t=>`marker-ptScaleHandlers-${t.id}`,I=t=>`marker-rollHandlers-${t.id}`,P=(t,o)=>{s.onPtScale(o,r=>{const{center:e,rotation:i}=t.bounds,{width:c,height:g}=t.source;return t.bounds=E(e.x,e.y,c,g,r,i),t})},H=(t,o)=>{s.onRoll(o,r=>(t.bounds.rotation=r,t))};function $(){const t=u.routeStore.markersData.markers;if(!t.length)return;n=[];const o=s.scale,r=K(s.angle);t.forEach(e=>{const i=l.get(e.icon);if(!i)return;const c=i.scale||window.devicePixelRatio,g=e.icon;if(!a.has(g)){const R=x(i.img,i.width,i.height,c);a.set(g,R)}const y=a.get(g),m=l.get(e.selectedIcon),D=e.selectedIcon;if(!a.has(D)){const R=x(m.img,m.width,m.height,c);a.set(D,R)}const w=a.get(D),M=S.findLayer(e.z)?.visible??!0,b=E(e.x,e.y,y.width,y.height,o,r),_=E(e.x,e.y,w.width,w.height,o,r);let p;switch(e.position){case"lefttop":p=[0,0];break;case"centertop":p=[.5,0];break;case"centerbottom":p=[.5,1];break;default:p=[.5,.5]}const z={...C(y,b,{hidden:!M,origin:p}),id:e.id,scale:c},A={...C(w,_,{hidden:!(M&&e.active),origin:p}),id:`${e.id}${L}`,scale:c};n.push(z,A)}),f.children=n,n.forEach(e=>{P(e,d(e)),H(e,I(e))})}function B(){n.forEach(t=>{s.ptScaleRegistry.unregisterByName(d(t)),s.rollRegistry.unregisterByName(I(t))}),f.children=[],n=[]}function N(){const t=u.routeStore.markersData.markers;t.length&&t.forEach(o=>{const r=n.find(c=>c.id===o.id),e=n.find(c=>c.id===`${o.id}${L}`);if(!r)return;const i=S.findLayer(o.z)?.visible??!0;o.active?(r.hidden=!0,e.hidden=!(i&&o.active)):(r.hidden=!i,e.hidden=!0)})}return h.push(v(()=>[u.routeStore.selectedMarkers,u.layerStore.visible],()=>{if(!u.routeStore.markersData.markers.length){B(),s.update(f);return}N(),s.update(...n)})),h.push(v(()=>u.routeStore.markersData.markers,()=>{k(u.routeStore.markersData.icons).then(()=>{$(),s.update(f)})},{fireImmediately:!0})),function(){h.forEach(o=>o()),h.length=0}}export function getMarkerFromClick(s,h,l){for(const a of u.routeStore.markersData.markers){const n=u.routeStore.markersData.icons.find(d=>d.name===a.icon);if(!n)continue;const f=n.width*l*devicePixelRatio,k=n.height*l*devicePixelRatio;if(F(s,h,a.x,a.y,f,k)){const d=u.layerStore.findLayer(a.z);if(!d||d&&d.visible)return a}}return null}function F(s,h,l,a,n,f){const k=s>=l-n&&s<=l+n,d=h>=a-f&&h<=a+f;return k&&d}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as l}from"react/jsx-runtime";import{useObserver as s}from"mobx-react-lite";import m,{layersStore as r,uiState as u}from"../store";import c from"./SimpleRow";import p from"../utils/useHeatmapData";const d=({yah:e,className:i})=>{const{clicks:o,background:n}=p(e);return s(()=>l(c,{style:{background:u.heatmapYah?`linear-gradient(to right, transparent 98%, ${n} 93%) center / 100% 99% no-repeat`:null},className:i,slug:e.id.toString(),onClick:a,line1:e.name,line2:e.z?`Level ${e.z}`:"",lineEnd:o.toString(),highlight:!1}));function a(){const t=r.findLayer(e.z);t&&r.updateVisibility(t,!0),m.routeStore.selectMarker(e.id.toString(),!0)}};export default d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{PREVIEW_MODE_ATTRIBUTE as
|
|
1
|
+
import{PREVIEW_MODE_ATTRIBUTE as V}from"./constants";import l from"./tools/base-runtime-url";import{buildRebookingUrl as H,getRebookingToken as z,retainRebookingToken as G}from"./tools/rebookingUrl";import{loadCss as x,loadFont as g,loadJs as b}from"./tools/loaders";import L from"./tools/logger";import{sleep as N}from"./utils";import{initI18n as Q}from"./utils/i18n";import B from"./utils/is-webview";import{loadCustomCss as q}from"./utils/loadCustomCss";import{loadIcons as W}from"./utils/loadIcons";import $ from"./utils/mergeExhibitors";import E from"./utils/use-shadow";import J from"./utils/is-debug";import K from"./utils/is-localhost";import{initSentry as Y}from"./tools/sentry";import{shouldLoadIntercom as X}from"./intercom";function t(){throw new Error("FloorPlan not ready")}export default class Z{options;renderTarget;_ready;element;eventId;dataUrl;noOverlay;offHistory;ignoreQuery;allowConsent;onInit;disableRuntimeAlerts;viewerMode;efpStyleLoadHandler;resolveReady;icons=new Map;enableRotation=!0;alwaysShowSidebar=!1;get ready(){return this._ready}get previewMode(){return this.options.previewMode||this.element.hasAttribute(V)}onBoothClick;onBookmarkClick;onVisitedClick;onCategoryClick;onFpConfigured;onDirection;onDetails;onExhibitorCustomButtonClick;onGetCoordsClick;onMarkerClick;onLeaveEvent;selectBooth(e){t()}selectExhibitor(e){t()}selectRoute(e,a){t()}getOptimizedRoutes(e){t()}selectCurrentPosition(e,a,h){t()}setBookmarks(e){t()}setEntitiesBookmarks(e){t()}setEntitiesVisited(e){t()}setMarkers(e){t()}updateLayerVisibility(e,a){t()}getCenterCoordinates(){t()}applyParameters(e){t()}exhibitorsList(){t()}boothsList(){t()}categoriesList(){t()}selectCategory(e){t()}getVisibility(){t()}setVisibility(e){t()}findLocation(){t()}zoomIn(){t()}zoomOut(){t()}zoomTo(e,a){t()}switchView(){t()}fitBounds(){t()}getBounds(e){t()}getBoothRect(e){t()}convertToGeo(e,a){t()}unstable_destroy(){t()}highlightExhibitors(e){t()}highlightBooths(e){t()}onCurrentPositionChanged(e){t()}search(e){t()}getFloors(){t()}onFloorActivated(e){t()}activateFloor(e){t()}showPathway(e,a){t()}showPathwayOnly(e,a){t()}hidePathways(){t()}showSearch(){t()}changeLanguage(e){t()}isGpsTrackingEnabled(){t()}setGpsTrackingEnabled(e){t()}deselectCurrentPosition(){t()}deselectRoute(){t()}reset(){t()}constructor(e){this.options=e,this.noOverlay=!!e.noOverlay,this.offHistory=!!e.offHistory,this.ignoreQuery=e.ignoreQuery,this.allowConsent=K&&!J?!1:e.allowConsent,this.onBoothClick=e.onBoothClick,this.onBookmarkClick=e.onBookmarkClick,this.onVisitedClick=e.onVisitedClick,this.onCategoryClick=e.onCategoryClick,this.onDetails=e.onDetails,this.onExhibitorCustomButtonClick=e.onExhibitorCustomButtonClick,this.onGetCoordsClick=e.onGetCoordsClick,this.onMarkerClick=e.onMarkerClick,this.onFpConfigured=e.onFpConfigured,this.onDirection=e.onDirection,this.onInit=e.onInit,this.onCurrentPositionChanged=e.onCurrentPositionChanged,this.onFloorActivated=e.onFloorActivated,this.onLeaveEvent=e.onLeaveEvent,this.viewerMode=!!e.viewerMode,this.disableRuntimeAlerts=e.disableRuntimeAlerts??!0,this._ready=new Promise((d,i)=>{this.resolveReady=d});const a=e.element;if(this.element=a,a.__expofp)throw new Error("Element already in use");if(a.__expofp=this,a.getAttribute("data-event-id")||a.getAttribute("data-event"))throw new Error("data-xxx attributes are removed, use options instead");const h=e.expo||e.event;if(!h)throw new Error("`expo` option is required");Y({eventId:h||"",isWebview:B}),this.eventId=h,window.__efpEvent=h,window.__efpElement=a;const P=[...a.classList];a.classList.remove(...P),a.classList.add("expofp-floorplan-default",...P);const O=document.head||document.getElementsByTagName("head")[0],I=document.createElement("style");O.prepend(I),I.textContent=".expofp-floorplan-default { width: 100%; height: 100%;}";const m=document.createElement("div");m.style.height="100%",m.style.width="100%",a.appendChild(m);let n;if(B&&(this.allowConsent=!0),e.allowConsent===void 0){const i=new URL(window.location.href).searchParams.get("allowConsent");i&&(this.allowConsent=i==="true")}if(E){n=m.attachShadow({mode:"open"});const d=n,i=document;d.createElement=(...r)=>i.createElement(...r),d.createElementNS=(...r)=>i.createElementNS(...r),d.createTextNode=(...r)=>i.createTextNode(...r)}else n=m;const y=document.createElement("div");if(y.style.height="100%",y.style.width="100%",n.appendChild(y),E&&Object.defineProperty(y,"ownerDocument",{value:n}),window.__efpShadowDOMStyleParent=E?n:void 0,this.renderTarget=y,a.getAttribute("data-data-url"))throw new Error("data-xxx attributes are removed, use options instead");const u=e.legacyDataUrlBase;window.__dataUrlBase=u,this.dataUrl=u,L.log("Instantiating ExpoFP floorplan",e.element,h);const D=u+"data.js",j=u+"wf.data.js",R=u+"fp.svg.js",T=[b(j),b(D),b(R)];let v=0;this.efpStyleLoadHandler=function(d){const i=window.__efpStyleElements;for(;v<i.length;){const r=i[v];n.appendChild(r),v++}},window.addEventListener("__efpStyleLoad",this.efpStyleLoadHandler);const k=this;(async function(){await Promise.all(T);let i=0;for(;window.__fpPending&&!window.__fp;)await N(2e3),await b(R+`?v=${++i}`);const r=window.__data,_=X(r);_&&import("./intercom/bootIntercom").then(({bootIntercom:o})=>o(_)).catch(()=>{}),await Q();const f=new URLSearchParams(window.location.search);let w,C;if(r?.trackerUrl)try{w=new URL(r.trackerUrl),C=w.searchParams.get("expoId")}catch(o){console.error(o)}const U=async o=>{if(!w||!C)return Promise.reject(new Error("trackerUrl or expoId is missing"));const s=new URL(o.dataUrl,w.origin),c=await fetch(s.toString(),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expoId:C,token:decodeURIComponent(f.get("t"))})});let p=[];c.ok&&(p=(await c.json()).map(o.dataMapper)),window.__heatmapDataYah={yah:p}};if(f.get("heatmap")==="true")try{if(f.get("type")==="yah")f.get("subtype")==="kiosk"?await U({dataUrl:"/api/kiosks/list/viewer",dataMapper:o=>({...o,id:o.key,name:`Kiosk ${o.key}`})}):await U({dataUrl:"/api/v1/you-are-here/qr-code/list/viewer",dataMapper:(o,s)=>({...o,name:`QR Code #${s+1}`})});else{const o=new URL("/api/fp-stats/get",w.origin);o.searchParams.set("expoId",C),o.searchParams.set("type","booview"),o.searchParams.set("t",decodeURIComponent(f.get("t")));const s=new URL("api/fp-stats/get",w.origin);s.searchParams.set("expoId",C),s.searchParams.set("type","exview"),s.searchParams.set("t",decodeURIComponent(f.get("t")));const[c,p]=await Promise.all([fetch(o.toString()),fetch(s.toString())]),[S,A]=await Promise.all([c.json(),p.json()]);window.__heatmapData={booths:S,exhibitors:A}}}catch(o){console.error("Heatmap: Initialization error",o)}try{const o=z();if(o){G(o);const s=H("api/rebooking-data",{rt:o,expoKey:h}),c=await fetch(s);if(c.ok){const p=await c.json();$(r,p)}r.isRebooking=c.ok}else r.isRebooking=!1}catch(o){console.error(o)}const M=[x(l+"vendor/sanitize-css/sanitize.css",n),x(l+"vendor/perfect-scrollbar/css/perfect-scrollbar.css",n),x(l+"vendor/mapbox/mapbox-gl.css",n),g("Oswald",l+"fonts/oswald-v17-cyrillic_latin-300.woff",{weight:300}),g("Oswald",l+"fonts/oswald-v17-cyrillic_latin-500.woff",{weight:500}),g("Inter",l+"fonts/inter-400.woff2",{weight:400}),g("Inter",l+"fonts/inter-500.woff2",{weight:500}),g("Inter",l+"fonts/inter-600.woff2",{weight:600}),g("efp-symbols",l+"fonts/efp-symbols.woff",{weight:400}),q(r,n),W(k.icons)];await Promise.all(M),k.enableRotation=r?.enableRotation??!1,k.alwaysShowSidebar=r?.alwaysShowSidebar??!1,L.log("Data loaded");const{default:F}=await import("./floorplan.ready");for(document.querySelectorAll(".expofp-floorplan-loader").forEach(o=>o.remove());a.firstChild&&a.firstChild!==m;)a.removeChild(a.firstChild);Object.setPrototypeOf(k,F.prototype).init()})()}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as g,Fragment as L,jsxs as C}from"react/jsx-runtime";import{reaction as T}from"mobx";import{createRoot as R}from"react-dom/client";import{install as I}from"resize-observer";import V from"./components/Layout";import $ from"./floorplan.loader";import{applyParameters as M,destroyHistory as j,initRouting as z}from"./services/routing";import t from"./store";import{Route as S,findBooth as x,separateExternalIds as E}from"./store/RouteStore";import{destroyUiHandlers as G}from"./store/init/init-ui";import{GaEventActions as P,destroyGtag as _,sendEventToGa as w,setConsentSettings as q}from"./tools/gtag";import N from"./tools/report-error";import{resetGlobalVariables as Y}from"./tools/reset";import H from"./tools/track-event";import{fpGeo as v}from"./components/Mapbox/utils/fpGeo";import{convertLocalToGps as O,isValidPointCoords as d}from"./utils/gps";import m from"./core/Rect";import{mapEntity as y}from"./utils/mapEntity";import{LANG_KEY as X,MAX_ROUTE_WAYPOINTS as p,PATHWAY_KEY as U}from"./constants";import{getStorage as B}from"./utils/entity-storage";import{ErrorBoundary as D}from"@sentry/react";import{POISelectorsSchema as F,BoundsSchema as K,ZoomToOptionsSchema as A}from"./schemas/sdk.schemas";import W from"debug";import{buildOptimizedRoute as Q}from"./utils/buildOptimizedRoute";import{hasLocale as Z,getLocales as J}from"./utils/i18n";const b=W("efp:api");I();export default class ee extends ${root;init(){this.ignoreQuery||z(this.offHistory),H("load"),t.fp=this,q(this.allowConsent),w(P.Load,""),this.root=R(this.renderTarget),this.root.render(g(D,{children:g(V,{offHistory:this.offHistory,allowConsent:this.allowConsent})})),w(P.Rendered,""),T(()=>t.layerStore.layersLoaded,()=>{this.resolveReady(),t.initialized||this.onInit?.(this),t.initialized=!0})}selectBooth(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectBooth","Parameter must be a string or an array of strings.","EFP000000");return}const i=t.boothStore.booths.filter(o=>typeof e=="string"?o.name===e||o.externalId===e:e.includes(o.name)||e.includes(o.externalId));t.selectBooth(i)}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){t.uiState.menu=!1,t.searchStore.resetSearchBox(),t.uiState.details=null;return}const i=t.exhibitorStore.exhibitors.filter(s=>typeof e=="string"?s.name===e||s.externalId===e:e.includes(s.name)||e.includes(s.externalId));if(!i?.length)return;if(typeof e=="string"){t.selectExhibitor(i[0]),t.moveToList([i[0]]);return}const o=i.flatMap(s=>s.booths.map(r=>r.layer)),{description:n}=o.reduce((s,r)=>(s.freq[r.description]=(s.freq[r.description]||0)+1,s.freq[r.description]>s.maxCount&&(s.maxCount=s.freq[r.description],s.mostFrequent=r),s),{freq:{},mostFrequent:o[0],maxCount:0}).mostFrequent;t.layerStore.updateVisibility(n,!0),t.uiState.menu=!1,t.searchStore.resetSearchBox(),t.uiState.details=null,t.uiState.list={type:"filter",items:i,query:{key:"exhibitors",value:i.map(s=>s.externalId).join(",")}},t.moveToList()}highlightExhibitors(e){Array.isArray(e)||a("highlightExhibitors","Parameter must be an array of strings.","EFP000200"),t.boothStore.highlightedByExternalIds=[],t.exhibitorStore.highlightedByExternalIds=[...e]}highlightBooths(e){Array.isArray(e)||a("highlightBooths","Parameter must be an array of strings.","EFP000300"),t.exhibitorStore.highlightedByExternalIds=[],t.boothStore.highlightedByExternalIds=[...e]}highlightEntities(e){Array.isArray(e)||a("highlightEntities","Parameter must be an array of strings.","EFP000400");const{boothExternalIds:i,exhibitorExternalIds:o}=E(e);t.boothStore.highlightedByExternalIds=[...i],t.exhibitorStore.highlightedByExternalIds=[...o]}selectRoute(e,i){if(Array.isArray(e)){let o=[...e];const n=o.shift(),s=o.pop();if(o.length>p)throw new Error(`The maximum number of waypoints is ${p}.`);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}t.routeStore.selectRoute(new S(f(n),f(s),o.map(f)));return}e||a("selectRoute","At a minimum, the starting point must be passed.","EFP000402"),t.routeStore.selectRoute(new S(f(e),f(i)))}getOptimizedRoutes(e){if(!Array.isArray(e))return a("getOptimizedRoutes","Parameter must be an array.","EFP000500"),[];if(e.length>p)throw new Error(`The maximum number of waypoints is ${p}.`);const i=e.map(f).filter(n=>!!n);if(!i.length)throw new Error("No booths found for the provided waypoints.");const o=new Map;for(const n of i){const s=n.layer?.name??"",r=o.get(s);r?r.push(n):o.set(s,[n])}return Array.from(o.values()).map(n=>({waypoints:Q(n.map(s=>[s.name,{cx:s.rect.cx,cy:s.rect.cy}]))}))}selectCurrentPosition(e,i,o){const n=d(e.x)&&d(e.y),s=d(e.lng)&&d(e.lat);!n&&!s&&a("selectCurrentPosition","A point must be passed. Either (x,y) or (lat,lng) are required.","EFP000600"),t.routeStore.selectCurrentPosition(e,i,o),this.onCurrentPositionChanged?.(e)}setBookmarks(e){(!Array.isArray(e)||!e.length)&&a("setBookmarks","Parameter must be an array.","EFP000700"),e.forEach(i=>{const o=t.exhibitorStore.exhibitors.find(n=>n.name===i.name||n.externalId===i.externalId);o&&(o.bookmarked=i.bookmarked)})}setEntitiesBookmarks(e){if(!Array.isArray(e)||!e.length){a("setEntitiesBookmarks","Parameter must be an array.","EFP000701");return}const i=["exhibitor","event","speaker","booth"],o=e.find(r=>!r.type||!i.includes(r.type));if(o){a("setEntitiesBookmarks",`Invalid entity type: ${o.type}. Must be one of: ${i.join(", ")}.`,"EFP000702");return}const n=B("bookmarked"),s={exhibitor:{existingIds:new Set(n.exhibitors||[]),finder:r=>t.exhibitorStore.findExhibitor(r),replacer:r=>t.exhibitorStore.replaceBookmarked(r)},event:{existingIds:new Set(n.events||[]),finder:r=>t.eventStore.findByNameOrSlug(r),replacer:r=>t.eventStore.replaceBookmarked(r)},speaker:{existingIds:new Set(n.speakers||[]),finder:r=>t.speakerStore.speakers.find(l=>l.name===r||l.externalId===r||l.slug===r),replacer:r=>t.speakerStore.replaceBookmarked(r)},booth:{existingIds:new Set(n.booths||[]),finder:r=>{const l=t.boothStore.findBooth(r);return l?.exhibitors.length===0?l:void 0},replacer:r=>t.boothStore.replaceBookmarked(r)}};e.forEach(r=>{const l=s[r.type],h=r.name||r.externalId||"",c=l.finder(h);c?r.bookmarked?l.existingIds.add(c.id):l.existingIds.delete(c.id):console.warn(`Entity not found: ${r.type} with query "${h}"`)}),Object.values(s).forEach(r=>{r.replacer(Array.from(r.existingIds))})}setEntitiesVisited(e){if(!Array.isArray(e)||!e.length){a("setEntitiesVisited","Parameter must be an array.","EFP000703");return}const i=["exhibitor","event"],o=e.find(r=>!r.type||!i.includes(r.type));if(o){a("setEntitiesVisited",`Invalid entity type: ${o.type}. Must be one of: ${i.join(", ")}.`,"EFP000704");return}const n=B("visited"),s={exhibitor:{existingIds:new Set(n.exhibitors||[]),finder:r=>t.exhibitorStore.findExhibitor(r),replacer:r=>t.exhibitorStore.replaceVisited(r)},event:{existingIds:new Set(n.events||[]),finder:r=>t.eventStore.findByNameOrSlug(r),replacer:r=>t.eventStore.replaceVisited(r)}};e.forEach(r=>{const l=s[r.type],h=r.name||r.externalId||"",c=l.finder(h);c?r.visited?l.existingIds.add(c.id):l.existingIds.delete(c.id):console.warn(`Entity not found: ${r.type} with query "${h}"`)}),Object.values(s).forEach(r=>{r.replacer(Array.from(r.existingIds))})}setMarkers(e){if(!e||!Array.isArray(e.icons)||!Array.isArray(e.markers)){a("setMarkers","Invalid input.","EFP000800");return}t.routeStore.setMarkers(e)}selectMarker(e,i=!0){return typeof e!="string"&&a("selectMarker","The identifier must be passed.","EFP000900"),t.routeStore.selectMarker(e,i)}drawCircles(e){Array.isArray(e)||a("drawCircles","Invalid input.","EFP000A00"),t.uiState.debugCircles=e}checkRoutes(){t.routeStore.checkRoutes()}updateLayerVisibility(e,i){typeof e!="string"&&a("updateLayerVisibility","The layer name (string) must be passed.","EFP000B00"),i||a("updateLayerVisibility","Passing a false value to visible will have no effect.","EFP000B01"),t.layerStore.updateVisibility(e,i)}getCenterCoordinates(){return t.fp.getCenterCoordinates()}exhibitorsList(){return t.exhibitorStore.exhibitors.map(e=>y(e))}boothsList(){return t.boothStore.booths.map(e=>y(e))}categoriesList(){return t.categoryStore.categories.map(e=>y(e))}selectCategory(e){if(e==null||typeof e!="string"){t.searchStore.selectSearch();return}const i=e?.toLowerCase(),o=t.categoryStore.categories.find(({name:n,slug:s})=>n?.toLowerCase()===i||s?.toLowerCase()===i);if(!o){a("selectCategory",`Category ${e} not found.`,"EFP000C01");return}t.selectCategory(o)}applyParameters(e){typeof e!="string"&&a("applyParameters","A query string must be passed.","EFP000D00"),M(e)}getVisibility(){return t.uiState.visibility}setVisibility(e){(typeof e!="object"||!Object.keys(e).length)&&a("setVisibility","The parameter must be passed.","EFP000E00"),t.uiState.setVisibility(e)}findLocation(){t.routeStore.findLocation()}zoomIn(){t.uiState.zoomIn()}zoomOut(){t.uiState.zoomOut()}switchView(){t.mapboxStore.activateMapbox()}zoomTo(e,i){b("zoomTo called with selectors=%O options=%O",e,i);const o=F.safeParse(e);if(!o.success){a("zoomTo",o.error.message,"EFP001600");return}const n=A.safeParse(i);if(!n.success){a("zoomTo",n.error.message,"EFP001601");return}const s=this.getBounds(e);s&&this.fitBounds(s,i)}getBounds(e){b("getBounds called with selectors=%O",e);const i=F.safeParse(e);if(!i.success){a("getBounds",i.error.message,"EFP001400");return}const o=[];if(e.booths?.forEach(s=>{let r;s.externalId?r=t.boothStore.boothByExternalId.get(s.externalId):s.name&&(r=t.boothStore.boothByName.get(s.name.toLowerCase())),r?.rect&&o.push(r.rect)}),e.exhibitors?.forEach(s=>{let r;s.externalId?r=t.exhibitorStore.exhibitorByExternalId.get(s.externalId):s.name&&(r=t.exhibitorStore.exhibitorByName.get(s.name.toLowerCase())),r?.booths?.forEach(l=>{l.rect&&o.push(l.rect)})}),o.length===0)return;const n=m.fromMultiple(o);return{leftTop:{x:n.x1,y:n.y1},rightBottom:{x:n.x2,y:n.y2}}}fitBounds(e,i){if(b("fitBounds called with bounds=%O options=%O",e,i),!e){t.uiState.fitBounds();return}const o=K.safeParse(e);if(!o.success){a("fitBounds",o.error.message,"EFP001500");return}const n=A.safeParse(i);if(!n.success){a("fitBounds",n.error.message,"EFP001501");return}let s;if(i?.padding){const r=i.padding;s=m.fromX1y1x2y2(e.leftTop.x-r,e.leftTop.y-r,e.rightBottom.x+r,e.rightBottom.y+r)}else s=m.fromX1y1x2y2(e.leftTop.x,e.leftTop.y,e.rightBottom.x,e.rightBottom.y);t.uiState.moveToRect=s}getBoothRect(e){return typeof e!="string"&&a("getBoothRect","A booth name must be passed.","EFP000F00"),x(e)?.rect}convertToGeo(e,i){if(!v?.properties?.config){a("convertToGeo","The coordinates cannot be converted because the GPS configuration is not defined.","EFP001000");return}if(!e||!i){a("convertToGeo","Both coordinates must be passed.","EFP001001");return}return O(e,i,v.properties.config)}unstable_destroy(){let e=window.__efpElement.firstChild;Y(),window.removeEventListener("__efpStyleLoad",this.efpStyleLoadHandler),window.removeEventListener("error",N),j(),G(),_(),[...document.getElementsByTagName("script")].filter(o=>o.src.indexOf("/fp.svg")>-1||o.src.indexOf("/wf.data.js")>-1||o.src.indexOf("/data.js")>-1).forEach(o=>o.remove()),this.root.unmount(),e.remove()}search(e){return typeof e!="string"&&a("search","A search string must be passed.","EFP001100"),t.fuzzySearchEngineStore.loadEngine().then(()=>(t.searchStore.selectSearch(e),t.uiState.fuzzySearchItems.map(i=>({item:y(i.item),score:i.score}))))}getFloors(){return t.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 i=this.getFloors();if(e.name){const o=i.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=i.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,i){const o=new URLSearchParams;if(o.set(U,e),i?.length){const{boothExternalIds:n,exhibitorExternalIds:s}=E(i);n.length>0&&o.set("booths",n.join(",")),s.length>0&&o.set("exhibitors",s.join(","))}this.applyParameters(o.toString())}showPathwayOnly(e,i){this.activateFloor({name:i}),t.layerStore.showPathWay(e),t.uiState.setPathwayOnlyMode(!0);const o=t.layerStore.findLayer(e),n=t.layerStore.findLayer(i),s=o?.rect||o?.viewbox?o:n;if(s?.rect||s?.viewbox){const r=s.viewbox??s.rect;t.uiState.moveToRect=m.fromX1y1x2y2(r.x1,r.y1,r.x2,r.y2)}}hidePathways(){this.highlightBooths([]),t.layerStore.hidePathways(),t.uiState.setPathwayOnlyMode(!1)}showSearch(){t.selectSearch("")}changeLanguage(e){const i=e?.toLowerCase?.();if(!Z(i)){a("changeLanguage",`Language "${e}" was not found. Available languages: ${J().map(n=>n.id).join(",")}`,"EFP001300");return}const o=new URLSearchParams;o.set(X,i),this.applyParameters(o.toString())}isGpsTrackingEnabled(){return t.routeStore.gpsEnabled}setGpsTrackingEnabled(e){t.routeStore.setGpsTrackingEnabled(e)}deselectCurrentPosition(){t.routeStore.selectCurrentPosition(null,!1)}deselectRoute(){t.routeStore.selectRoute(null)}reset(){this.selectBooth(""),this.selectExhibitor(""),this.selectCategory(),this.deselectCurrentPosition(),this.deselectRoute(),this.highlightEntities([]),t.uiState.kioskData&&t.resetCameraFn?t.resetCameraFn?.():this.fitBounds()}}function f(u){return typeof u=="string"?x(u):t.routeStore.getNearestBooth(u)}let k=0;function a(u,e,i){const o=`Error calling "${u}" SDK method.`,n=`${e.endsWith(".")?e:e+"."} More information at`;let s="https://developer.expofp.com/guide/java-script-api-reference";if(i&&(s+=`#error-${i}`),console.error(`${o} ${n} ${s}`),t.fp.disableRuntimeAlerts)return;t.uiState.setGlobalErrorMessage({title:o,body:C(L,{children:[n," ",g("a",{href:s,target:"_blank",children:s})]})}),clearTimeout(k);const r=8e3;k=window.setTimeout(()=>{const l=async()=>{t.uiState.globalErrorMessages.length>0&&(t.uiState.popGlobalErrorMessage(),await new Promise(h=>setTimeout(h,r/2)),l())};l()},r)}
|
|
1
|
+
import{jsx as g,Fragment as L,jsxs as C}from"react/jsx-runtime";import{reaction as T}from"mobx";import{createRoot as R}from"react-dom/client";import{install as I}from"resize-observer";import V from"./components/Layout";import $ from"./floorplan.loader";import{applyParameters as M,destroyHistory as j,initRouting as z}from"./services/routing";import t from"./store";import{Route as S,findBooth as x,separateExternalIds as E}from"./store/RouteStore";import{destroyUiHandlers as G}from"./store/init/init-ui";import{GaEventActions as P,destroyGtag as _,sendEventToGa as w,setConsentSettings as q}from"./tools/gtag";import N from"./tools/report-error";import{resetGlobalVariables as Y}from"./tools/reset";import H from"./tools/track-event";import{fpGeo as v}from"./components/Mapbox/utils/fpGeo";import{convertLocalToGps as O,isValidPointCoords as d}from"./utils/gps";import m from"./core/Rect";import{mapEntity as y}from"./utils/mapEntity";import{LANG_KEY as X,MAX_ROUTE_WAYPOINTS as p,PATHWAY_KEY as U}from"./constants";import{getStorage as B}from"./utils/entity-storage";import{ErrorBoundary as D}from"@sentry/react";import{POISelectorsSchema as F,BoundsSchema as K,ZoomToOptionsSchema as A}from"./schemas/sdk.schemas";import W from"debug";import{buildOptimizedRoute as Q}from"./utils/buildOptimizedRoute";import{hasLocale as Z,getLocales as J}from"./utils/i18n";const b=W("efp:api");I();export default class ee extends ${root;init(){this.ignoreQuery||z(this.offHistory),H("load"),t.fp=this,q(this.allowConsent),w(P.Load,""),this.root=R(this.renderTarget),this.root.render(g(D,{children:g(V,{offHistory:this.offHistory,allowConsent:this.allowConsent})})),w(P.Rendered,""),T(()=>t.layerStore.layersLoaded,()=>{this.resolveReady(),t.initialized||this.onInit?.(this),t.initialized=!0})}selectBooth(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectBooth","Parameter must be a string or an array of strings.","EFP000000");return}const i=t.boothStore.booths.filter(o=>typeof e=="string"?o.name===e||o.externalId===e:e.includes(o.name)||e.includes(o.externalId));t.selectBooth(i)}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){t.uiState.menu=!1,t.searchStore.resetSearchBox(),t.uiState.details=null;return}const i=t.exhibitorStore.exhibitors.filter(s=>typeof e=="string"?s.name===e||s.externalId===e:e.includes(s.name)||e.includes(s.externalId));if(!i?.length)return;if(typeof e=="string"){t.selectExhibitor(i[0]),t.moveToList([i[0]]);return}const o=i.flatMap(s=>s.booths.map(r=>r.layer)),{description:n}=o.reduce((s,r)=>(s.freq[r.description]=(s.freq[r.description]||0)+1,s.freq[r.description]>s.maxCount&&(s.maxCount=s.freq[r.description],s.mostFrequent=r),s),{freq:{},mostFrequent:o[0],maxCount:0}).mostFrequent;t.layerStore.updateVisibility(n,!0),t.uiState.menu=!1,t.searchStore.resetSearchBox(),t.uiState.details=null,t.uiState.list={type:"filter",items:i,query:{key:"exhibitors",value:i.map(s=>s.externalId).join(",")}},t.moveToList()}highlightExhibitors(e){Array.isArray(e)||a("highlightExhibitors","Parameter must be an array of strings.","EFP000200"),t.boothStore.highlightedByExternalIds=[],t.exhibitorStore.highlightedByExternalIds=[...e]}highlightBooths(e){Array.isArray(e)||a("highlightBooths","Parameter must be an array of strings.","EFP000300"),t.exhibitorStore.highlightedByExternalIds=[],t.boothStore.highlightedByExternalIds=[...e]}highlightEntities(e){Array.isArray(e)||a("highlightEntities","Parameter must be an array of strings.","EFP000400");const{boothExternalIds:i,exhibitorExternalIds:o}=E(e);t.boothStore.highlightedByExternalIds=[...i],t.exhibitorStore.highlightedByExternalIds=[...o]}selectRoute(e,i){if(Array.isArray(e)){let o=[...e];const n=o.shift(),s=o.pop();if(o.length>p)throw new Error(`The maximum number of waypoints is ${p}.`);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}t.routeStore.selectRoute(new S(f(n),f(s),o.map(f)));return}e||a("selectRoute","At a minimum, the starting point must be passed.","EFP000402"),t.routeStore.selectRoute(new S(f(e),f(i)))}getOptimizedRoutes(e){if(!Array.isArray(e))return a("getOptimizedRoutes","Parameter must be an array.","EFP000500"),[];if(e.length>p)throw new Error(`The maximum number of waypoints is ${p}.`);const i=e.map(f).filter(n=>!!n);if(!i.length)throw new Error("No booths found for the provided waypoints.");const o=new Map;for(const n of i){const s=n.layer?.name??"",r=o.get(s);r?r.push(n):o.set(s,[n])}return Array.from(o.values()).map(n=>({waypoints:Q(n.map(s=>[s.name,{cx:s.rect.cx,cy:s.rect.cy}]))}))}selectCurrentPosition(e,i,o){const n=d(e.x)&&d(e.y),s=d(e.lng)&&d(e.lat);!n&&!s&&a("selectCurrentPosition","A point must be passed. Either (x,y) or (lat,lng) are required.","EFP000600"),t.routeStore.selectCurrentPosition(e,i,o),this.onCurrentPositionChanged?.(e)}setBookmarks(e){(!Array.isArray(e)||!e.length)&&a("setBookmarks","Parameter must be an array.","EFP000700"),e.forEach(i=>{const o=t.exhibitorStore.exhibitors.find(n=>n.name===i.name||n.externalId===i.externalId);o&&(o.bookmarked=i.bookmarked)})}setEntitiesBookmarks(e){if(!Array.isArray(e)||!e.length){a("setEntitiesBookmarks","Parameter must be an array.","EFP000701");return}const i=["exhibitor","event","speaker","booth"],o=e.find(r=>!r.type||!i.includes(r.type));if(o){a("setEntitiesBookmarks",`Invalid entity type: ${o.type}. Must be one of: ${i.join(", ")}.`,"EFP000702");return}const n=B("bookmarked"),s={exhibitor:{existingIds:new Set(n.exhibitors||[]),finder:r=>t.exhibitorStore.findExhibitor(r),replacer:r=>t.exhibitorStore.replaceBookmarked(r)},event:{existingIds:new Set(n.events||[]),finder:r=>t.eventStore.findByNameOrSlug(r),replacer:r=>t.eventStore.replaceBookmarked(r)},speaker:{existingIds:new Set(n.speakers||[]),finder:r=>t.speakerStore.speakers.find(l=>l.name===r||l.externalId===r||l.slug===r),replacer:r=>t.speakerStore.replaceBookmarked(r)},booth:{existingIds:new Set(n.booths||[]),finder:r=>{const l=t.boothStore.findBooth(r);return l?.exhibitors.length===0?l:void 0},replacer:r=>t.boothStore.replaceBookmarked(r)}};e.forEach(r=>{const l=s[r.type],h=r.name||r.externalId||"",c=l.finder(h);c?r.bookmarked?l.existingIds.add(c.id):l.existingIds.delete(c.id):console.warn(`Entity not found: ${r.type} with query "${h}"`)}),Object.values(s).forEach(r=>{r.replacer(Array.from(r.existingIds))})}setEntitiesVisited(e){if(!Array.isArray(e)||!e.length){a("setEntitiesVisited","Parameter must be an array.","EFP000703");return}const i=["exhibitor","event"],o=e.find(r=>!r.type||!i.includes(r.type));if(o){a("setEntitiesVisited",`Invalid entity type: ${o.type}. Must be one of: ${i.join(", ")}.`,"EFP000704");return}const n=B("visited"),s={exhibitor:{existingIds:new Set(n.exhibitors||[]),finder:r=>t.exhibitorStore.findExhibitor(r),replacer:r=>t.exhibitorStore.replaceVisited(r)},event:{existingIds:new Set(n.events||[]),finder:r=>t.eventStore.findByNameOrSlug(r),replacer:r=>t.eventStore.replaceVisited(r)}};e.forEach(r=>{const l=s[r.type],h=r.name||r.externalId||"",c=l.finder(h);c?r.visited?l.existingIds.add(c.id):l.existingIds.delete(c.id):console.warn(`Entity not found: ${r.type} with query "${h}"`)}),Object.values(s).forEach(r=>{r.replacer(Array.from(r.existingIds))})}setMarkers(e){if(!e||!Array.isArray(e.icons)||!Array.isArray(e.markers)){a("setMarkers","Invalid input.","EFP000800");return}t.routeStore.setMarkers(e)}selectMarker(e,i=!0){return typeof e!="string"&&a("selectMarker","The identifier must be passed.","EFP000900"),t.routeStore.selectMarker(e,i)}drawCircles(e){Array.isArray(e)||a("drawCircles","Invalid input.","EFP000A00"),t.uiState.debugCircles=e}checkRoutes(){t.routeStore.checkRoutes()}updateLayerVisibility(e,i){typeof e!="string"&&a("updateLayerVisibility","The layer name (string) must be passed.","EFP000B00"),i||a("updateLayerVisibility","Passing a false value to visible will have no effect.","EFP000B01"),t.layerStore.updateVisibility(e,i)}getCenterCoordinates(){return t.fp.getCenterCoordinates()}exhibitorsList(){return t.exhibitorStore.exhibitors.map(e=>y(e))}boothsList(){return t.boothStore.booths.map(e=>y(e))}categoriesList(){return t.categoryStore.categories.map(e=>y(e))}selectCategory(e){if(e==null||typeof e!="string"){t.searchStore.selectSearch();return}const i=e?.toLowerCase(),o=t.categoryStore.categories.find(({name:n,slug:s})=>n?.toLowerCase()===i||s?.toLowerCase()===i);if(!o){a("selectCategory",`Category ${e} not found.`,"EFP000C01");return}t.selectCategory(o)}applyParameters(e){typeof e!="string"&&a("applyParameters","A query string must be passed.","EFP000D00"),M(e)}getVisibility(){return t.uiState.visibility}setVisibility(e){(typeof e!="object"||!Object.keys(e).length)&&a("setVisibility","The parameter must be passed.","EFP000E00"),t.uiState.setVisibility(e)}findLocation(){t.routeStore.findLocation()}zoomIn(){t.uiState.zoomIn()}zoomOut(){t.uiState.zoomOut()}switchView(){t.mapboxStore.activateMapbox()}zoomTo(e,i){b("zoomTo called with selectors=%O options=%O",e,i);const o=F.safeParse(e);if(!o.success){a("zoomTo",o.error.message,"EFP001600");return}const n=A.safeParse(i);if(!n.success){a("zoomTo",n.error.message,"EFP001601");return}const s=this.getBounds(e);s&&this.fitBounds(s,i)}getBounds(e){b("getBounds called with selectors=%O",e);const i=F.safeParse(e);if(!i.success){a("getBounds",i.error.message,"EFP001400");return}const o=[];if(e.booths?.forEach(s=>{let r;s.externalId?r=t.boothStore.boothByExternalId.get(s.externalId):s.name&&(r=t.boothStore.boothByName.get(s.name.toLowerCase())),r?.rect&&o.push(r.rect)}),e.exhibitors?.forEach(s=>{let r;s.externalId?r=t.exhibitorStore.exhibitorByExternalId.get(s.externalId):s.name&&(r=t.exhibitorStore.exhibitorByName.get(s.name.toLowerCase())),r?.booths?.forEach(l=>{l.rect&&o.push(l.rect)})}),o.length===0)return;const n=m.fromMultiple(o);return{leftTop:{x:n.x1,y:n.y1},rightBottom:{x:n.x2,y:n.y2}}}fitBounds(e,i){if(b("fitBounds called with bounds=%O options=%O",e,i),!e){t.uiState.fitBounds();return}const o=K.safeParse(e);if(!o.success){a("fitBounds",o.error.message,"EFP001500");return}const n=A.safeParse(i);if(!n.success){a("fitBounds",n.error.message,"EFP001501");return}let s;if(i?.padding){const r=i.padding;s=m.fromX1y1x2y2(e.leftTop.x-r,e.leftTop.y-r,e.rightBottom.x+r,e.rightBottom.y+r)}else s=m.fromX1y1x2y2(e.leftTop.x,e.leftTop.y,e.rightBottom.x,e.rightBottom.y);t.uiState.moveToRect=s}getBoothRect(e){return typeof e!="string"&&a("getBoothRect","A booth name must be passed.","EFP000F00"),x(e)?.rect}convertToGeo(e,i){if(!v?.properties?.config){a("convertToGeo","The coordinates cannot be converted because the GPS configuration is not defined.","EFP001000");return}if(!e||!i){a("convertToGeo","Both coordinates must be passed.","EFP001001");return}return O(e,i,v.properties.config)}unstable_destroy(){let e=window.__efpElement.firstChild;Y(),window.removeEventListener("__efpStyleLoad",this.efpStyleLoadHandler),window.removeEventListener("error",N),j(),G(),_(),[...document.getElementsByTagName("script")].filter(o=>o.src.indexOf("/fp.svg")>-1||o.src.indexOf("/wf.data.js")>-1||o.src.indexOf("/data.js")>-1).forEach(o=>o.remove()),this.root.unmount(),e.remove()}search(e){return typeof e!="string"&&a("search","A search string must be passed.","EFP001100"),t.fuzzySearchEngineStore.loadEngine().then(()=>(t.searchStore.selectSearch(e),t.uiState.fuzzySearchItems.map(i=>({item:y(i.item),score:i.score}))))}getFloors(){return t.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 i=this.getFloors();if(e.name){const o=i.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=i.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,i){const o=new URLSearchParams;if(o.set(U,e),i?.length){const{boothExternalIds:n,exhibitorExternalIds:s}=E(i);n.length>0&&o.set("booths",n.join(",")),s.length>0&&o.set("exhibitors",s.join(","))}this.applyParameters(o.toString())}showPathwayOnly(e,i){this.activateFloor({name:i}),t.layerStore.showPathWay(e),t.uiState.setPathwayOnlyMode(!0);const o=t.layerStore.findLayer(e),n=t.layerStore.findLayer(i),s=o?.rect||o?.viewbox?o:n;if(s?.rect||s?.viewbox){const r=s.viewbox??s.rect;t.uiState.moveToRect=m.fromX1y1x2y2(r.x1,r.y1,r.x2,r.y2)}}hidePathways(){this.highlightBooths([]),t.layerStore.hidePathways(),t.uiState.setPathwayOnlyMode(!1)}showSearch(){t.selectSearch("")}changeLanguage(e){const i=e?.toLowerCase?.();if(!Z(i)){a("changeLanguage",`Language "${e}" was not found. Available languages: ${J().map(n=>n.id).join(",")}`,"EFP001300");return}const o=new URLSearchParams;o.set(X,i),this.applyParameters(o.toString())}isGpsTrackingEnabled(){return t.routeStore.gpsEnabled}setGpsTrackingEnabled(e){t.routeStore.setGpsTrackingEnabled(e)}deselectCurrentPosition(){t.routeStore.selectCurrentPosition(null,!1)}deselectRoute(){t.routeStore.selectRoute(null)}reset(){this.selectBooth(""),this.selectExhibitor(""),this.selectCategory(),this.deselectCurrentPosition(),this.deselectRoute(),this.highlightEntities([]),t.uiState.kioskData&&t.resetCameraFn?t.resetCameraFn?.():this.fitBounds()}}function f(u){return typeof u=="string"?x(u):t.routeStore.getNearestBooth(u)}let k=0;function a(u,e,i){const o=`Error calling "${u}" SDK method.`,n=`${e.endsWith(".")?e:e+"."} More information at`;let s="https://developer.expofp.com/guide/java-script-api-reference";if(i&&(s+=`#error-${i}`),console.error(`${o} ${n} ${s}`),t.fp.disableRuntimeAlerts)return;t.uiState.setGlobalErrorMessage({title:o,body:C(L,{children:[n," ",g("a",{href:s,target:"_blank",rel:"noreferrer",children:s})]})}),clearTimeout(k);const r=8e3;k=window.setTimeout(()=>{const l=async()=>{t.uiState.globalErrorMessages.length>0&&(t.uiState.popGlobalErrorMessage(),await new Promise(h=>setTimeout(h,r/2)),l())};l()},r)}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const c="k5f7wyx2";let a=!1;function s(){if(document.getElementById("efp-intercom-position"))return;const e=document.createElement("style");e.id="efp-intercom-position",e.textContent=`
|
|
2
|
+
.intercom-namespace,
|
|
3
|
+
.intercom-lightweight-app,
|
|
4
|
+
.intercom-app,
|
|
5
|
+
[class*="intercom-with-namespace-"]:not(.intercom-messenger-frame) {
|
|
6
|
+
z-index: 20 !important;
|
|
7
|
+
}
|
|
8
|
+
.intercom-lightweight-app-launcher,
|
|
9
|
+
.intercom-app > [class*="intercom-with-namespace-"]:not(.intercom-messenger-frame) {
|
|
10
|
+
right: 10px !important;
|
|
11
|
+
bottom: 50px !important;
|
|
12
|
+
}
|
|
13
|
+
@media (max-width: 767px) {
|
|
14
|
+
.intercom-lightweight-app-launcher,
|
|
15
|
+
.intercom-app > [class*="intercom-with-namespace-"]:not(.intercom-messenger-frame) {
|
|
16
|
+
bottom: 80px !important;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
`,document.head.appendChild(e)}export function bootIntercom(e){if(a)return;a=!0;const{subDomain:m,subscriptionStatus:r}=e,i=window;i.intercomSettings={api_base:"https://api-iam.intercom.io",app_id:c,alignment:"right",expofp_subdomain:m,expofp_subscription_status:r},s();const n=function(){n.c(arguments)};n.q=[],n.c=function(t){n.q.push(t)},i.Intercom=n;const o=()=>{const t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=`https://widget.intercom.io/widget/${c}`,document.head.appendChild(t)};document.readyState==="complete"?o():window.addEventListener("load",o,!1)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{shouldLoadIntercom}from"./shouldLoad";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function r(){const t=window.location.hostname.split(".");return t.length>=3&&t[t.length-2]==="expofp"&&t[t.length-1]==="com"}function o(){return r()?window.location.hostname.split(".")[0]:"main"}function u(t){if(t?.free===!0)return"Free";const n=t?.trialExpiresAt;if(n){const i=new Date(n).getTime();if(!Number.isNaN(i))return Date.now()<i?"Trial Active":"Trial Expired"}return"Active"}function a(){if(process.env.NODE_ENV==="production")return!1;const t=new URLSearchParams(window.location.search);return!t.has("__intercom_subdomain")&&!t.has("__intercom_status")}function c(t){if(process.env.NODE_ENV==="production")return t;const n=new URLSearchParams(window.location.search),i=n.get("__intercom_subdomain"),e=n.get("__intercom_status"),s=e&&["Active","Trial Active","Trial Expired","Free"].includes(e)?e:t.subscriptionStatus;return{subDomain:i??t.subDomain,subscriptionStatus:s}}export function shouldLoadIntercom(t){if(a()||process.env.NODE_ENV==="production"&&!r()||!window.navigator.onLine)return null;const n=c({subDomain:o(),subscriptionStatus:u(t)});return n.subDomain!=="demo"&&n.subscriptionStatus!=="Free"&&n.subscriptionStatus!=="Trial Expired"?null:n}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default
|
|
1
|
+
export { default } from "./search-buttons/SearchButtonsStore";
|
|
2
2
|
//# sourceMappingURL=SearchButtonsStore.d.ts.map
|
|
@@ -24,7 +24,7 @@ export default class SearchStore {
|
|
|
24
24
|
get searchBoxActions(): InterfaceAction[];
|
|
25
25
|
get shouldShowSearchInput(): boolean;
|
|
26
26
|
get shouldShowCloseButton(): boolean;
|
|
27
|
-
get closeButtonAction(): "
|
|
27
|
+
get closeButtonAction(): "clear" | "close";
|
|
28
28
|
get shouldShowShadow(): boolean;
|
|
29
29
|
get placeholder(): string;
|
|
30
30
|
get searchBoxClass(): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__esDecorate as s,__runInitializers as u}from"tslib";import{action as c,computed as l,observable as d}from"mobx";import{t as h}from"../utils/i18n";import f from"../data";import{exhibitorStore as le}from"./index";import re from"../tools/settings";import{sanitizeSearch as ce}from"../utils/sanitizeText";import{Route as S}from"./RouteStore";import{goBack as p}from"../services/routing";import{MOBILE_BREAKPOINT as he,LANGUAGE_TYPE as ne}from"../constants";class i{static closeDetails(r){return r.details?(r.details=null,!0):!1}static closeMultiPointTour(r){return r.rootStore.fp.hidePathways(),!0}static clearSearchAndFocus(r){return r.searchText?(r.setSearchText(""),r.setFocused(!0),!0):!1}static returnToSearch(r,n=!1){r.list={type:"search",text:"",focused:n}}static returnToSessions(r,n=!1){r.list={type:"sessions",text:"",focused:n}}static returnToTours(r,n=!1){r.list={type:"tours",text:"",focused:n}}static openMenu(r){r.menu=!0}static closeMenu(r){r.menu=!1}static clearListScroll(r,n){r.clearListScroll(n)}static resetActiveListIndex(r){r.activeListIndex=-1}}let ue=(()=>{let a=[],r,n=[],m=[],x,g=[],_=[],B,y=[],F=[],k,b=[],v=[],T,I,M,C,A,w,z,L,O,E,P,W,D,U,j,G,K,N,R,X,Y,H,V,$,q,J,Q,Z,ee,te,se,ae,ie;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;r=[d],x=[d],B=[d],k=[d],T=[l],I=[l],M=[l],C=[l],A=[l],w=[l],z=[l],L=[l],O=[l],E=[l],P=[l],W=[l],D=[l],U=[l],j=[c],G=[c],K=[c],N=[c],R=[c],X=[c],Y=[c],H=[c],V=[c],$=[c],q=[c],J=[c],Q=[c],Z=[l],ee=[c],te=[l],se=[l],ae=[l],ie=[l],s(this,null,T,{kind:"getter",name:"searchBoxConfig",static:!1,private:!1,access:{has:e=>"searchBoxConfig"in e,get:e=>e.searchBoxConfig},metadata:t},null,a),s(this,null,I,{kind:"getter",name:"searchBoxMode",static:!1,private:!1,access:{has:e=>"searchBoxMode"in e,get:e=>e.searchBoxMode},metadata:t},null,a),s(this,null,M,{kind:"getter",name:"searchBoxTitle",static:!1,private:!1,access:{has:e=>"searchBoxTitle"in e,get:e=>e.searchBoxTitle},metadata:t},null,a),s(this,null,C,{kind:"getter",name:"searchBoxSubtitle",static:!1,private:!1,access:{has:e=>"searchBoxSubtitle"in e,get:e=>e.searchBoxSubtitle},metadata:t},null,a),s(this,null,A,{kind:"getter",name:"searchBoxBadge",static:!1,private:!1,access:{has:e=>"searchBoxBadge"in e,get:e=>e.searchBoxBadge},metadata:t},null,a),s(this,null,w,{kind:"getter",name:"searchBoxIcon",static:!1,private:!1,access:{has:e=>"searchBoxIcon"in e,get:e=>e.searchBoxIcon},metadata:t},null,a),s(this,null,z,{kind:"getter",name:"searchBoxActions",static:!1,private:!1,access:{has:e=>"searchBoxActions"in e,get:e=>e.searchBoxActions},metadata:t},null,a),s(this,null,L,{kind:"getter",name:"shouldShowSearchInput",static:!1,private:!1,access:{has:e=>"shouldShowSearchInput"in e,get:e=>e.shouldShowSearchInput},metadata:t},null,a),s(this,null,O,{kind:"getter",name:"shouldShowCloseButton",static:!1,private:!1,access:{has:e=>"shouldShowCloseButton"in e,get:e=>e.shouldShowCloseButton},metadata:t},null,a),s(this,null,E,{kind:"getter",name:"closeButtonAction",static:!1,private:!1,access:{has:e=>"closeButtonAction"in e,get:e=>e.closeButtonAction},metadata:t},null,a),s(this,null,P,{kind:"getter",name:"shouldShowShadow",static:!1,private:!1,access:{has:e=>"shouldShowShadow"in e,get:e=>e.shouldShowShadow},metadata:t},null,a),s(this,null,W,{kind:"getter",name:"placeholder",static:!1,private:!1,access:{has:e=>"placeholder"in e,get:e=>e.placeholder},metadata:t},null,a),s(this,null,D,{kind:"getter",name:"searchBoxClass",static:!1,private:!1,access:{has:e=>"searchBoxClass"in e,get:e=>e.searchBoxClass},metadata:t},null,a),s(this,null,U,{kind:"getter",name:"ariaLabel",static:!1,private:!1,access:{has:e=>"ariaLabel"in e,get:e=>e.ariaLabel},metadata:t},null,a),s(this,null,j,{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,G,{kind:"method",name:"selectSearchAndFocus",static:!1,private:!1,access:{has:e=>"selectSearchAndFocus"in e,get:e=>e.selectSearchAndFocus},metadata:t},null,a),s(this,null,K,{kind:"method",name:"setSearchText",static:!1,private:!1,access:{has:e=>"setSearchText"in e,get:e=>e.setSearchText},metadata:t},null,a),s(this,null,N,{kind:"method",name:"setFocused",static:!1,private:!1,access:{has:e=>"setFocused"in e,get:e=>e.setFocused},metadata:t},null,a),s(this,null,R,{kind:"method",name:"handleBackAction",static:!1,private:!1,access:{has:e=>"handleBackAction"in e,get:e=>e.handleBackAction},metadata:t},null,a),s(this,null,X,{kind:"method",name:"closeSearch",static:!1,private:!1,access:{has:e=>"closeSearch"in e,get:e=>e.closeSearch},metadata:t},null,a),s(this,null,Y,{kind:"method",name:"clearActiveFilters",static:!1,private:!1,access:{has:e=>"clearActiveFilters"in e,get:e=>e.clearActiveFilters},metadata:t},null,a),s(this,null,H,{kind:"method",name:"handleSearchAction",static:!1,private:!1,access:{has:e=>"handleSearchAction"in e,get:e=>e.handleSearchAction},metadata:t},null,a),s(this,null,V,{kind:"method",name:"openOverlayWithoutInputFocus",static:!1,private:!1,access:{has:e=>"openOverlayWithoutInputFocus"in e,get:e=>e.openOverlayWithoutInputFocus},metadata:t},null,a),s(this,null,$,{kind:"method",name:"closeSessions",static:!1,private:!1,access:{has:e=>"closeSessions"in e,get:e=>e.closeSessions},metadata:t},null,a),s(this,null,q,{kind:"method",name:"closeExhibitors",static:!1,private:!1,access:{has:e=>"closeExhibitors"in e,get:e=>e.closeExhibitors},metadata:t},null,a),s(this,null,J,{kind:"method",name:"resetSearchBox",static:!1,private:!1,access:{has:e=>"resetSearchBox"in e,get:e=>e.resetSearchBox},metadata:t},null,a),s(this,null,Q,{kind:"method",name:"syncWithUIState",static:!1,private:!1,access:{has:e=>"syncWithUIState"in e,get:e=>e.syncWithUIState},metadata:t},null,a),s(this,null,Z,{kind:"getter",name:"actionButtonIcon",static:!1,private:!1,access:{has:e=>"actionButtonIcon"in e,get:e=>e.actionButtonIcon},metadata:t},null,a),s(this,null,ee,{kind:"method",name:"clearAndSelectSearch",static:!1,private:!1,access:{has:e=>"clearAndSelectSearch"in e,get:e=>e.clearAndSelectSearch},metadata:t},null,a),s(this,null,te,{kind:"getter",name:"backMode",static:!1,private:!1,access:{has:e=>"backMode"in e,get:e=>e.backMode},metadata:t},null,a),s(this,null,se,{kind:"getter",name:"isMobileDetailsMode",static:!1,private:!1,access:{has:e=>"isMobileDetailsMode"in e,get:e=>e.isMobileDetailsMode},metadata:t},null,a),s(this,null,ae,{kind:"getter",name:"shouldShowTitle",static:!1,private:!1,access:{has:e=>"shouldShowTitle"in e,get:e=>e.shouldShowTitle},metadata:t},null,a),s(this,null,ie,{kind:"getter",name:"searchState",static:!1,private:!1,access:{has:e=>"searchState"in e,get:e=>e.searchState},metadata:t},null,a),s(null,null,r,{kind:"field",name:"searchText",static:!1,private:!1,access:{has:e=>"searchText"in e,get:e=>e.searchText,set:(e,o)=>{e.searchText=o}},metadata:t},n,m),s(null,null,x,{kind:"field",name:"isFocused",static:!1,private:!1,access:{has:e=>"isFocused"in e,get:e=>e.isFocused,set:(e,o)=>{e.isFocused=o}},metadata:t},g,_),s(null,null,B,{kind:"field",name:"isClearMode",static:!1,private:!1,access:{has:e=>"isClearMode"in e,get:e=>e.isClearMode,set:(e,o)=>{e.isClearMode=o}},metadata:t},y,F),s(null,null,k,{kind:"field",name:"skipInputFocus",static:!1,private:!1,access:{has:e=>"skipInputFocus"in e,get:e=>e.skipInputFocus,set:(e,o)=>{e.skipInputFocus=o}},metadata:t},b,v),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=u(this,a);searchText=u(this,n,"");isFocused=(u(this,m),u(this,g,!1));isClearMode=(u(this,_),u(this,y,!1));skipInputFocus=(u(this,F),u(this,b,!1));constructor(t){u(this,v),this.rootStore=t}get uiState(){return this.rootStore.uiState}get searchBoxConfig(){return this.uiState.searchBoxConfig}get searchBoxMode(){return this.searchBoxConfig.mode}get searchBoxTitle(){return this.searchBoxConfig.title}get searchBoxSubtitle(){return this.searchBoxConfig.subtitle}get searchBoxBadge(){return this.searchBoxConfig.badge}get searchBoxIcon(){return this.searchBoxConfig.icon}get searchBoxActions(){return this.uiState.searchBoxActions}get shouldShowSearchInput(){return this.searchBoxMode==="search"}get shouldShowCloseButton(){const{menu:t,details:e,list:o}=this.uiState;return!this.shouldShowSearchInput||o.type==="sessions"||o.type==="tours"||o.type==="speakers"||o.type==="exhibitors"?!0:t||e!==null||!!this.searchText||this.isClearMode||this.isFocused}get closeButtonAction(){return!this.shouldShowSearchInput||this.searchBoxMode==="details"||this.uiState.list.type==="sessions"||this.uiState.list.type==="speakers"||this.uiState.list.type==="exhibitors"?"close":this.searchText?"clear":"close"}get shouldShowShadow(){const{menu:t,details:e,list:o}=this.uiState,oe=o.type==="search"&&!!o.text;return!(this.rootStore.fp.alwaysShowSidebar||t||e!==null||o.type!=="search"||oe||this.isFocused||this.uiState.heatmap)}get placeholder(){const{list:t,heatmapYah:e}=this.uiState;if(t.type==="sessions")return h("Search sessions");if(t.type==="tours")return h("Search Guided Tours");if(t.type==="exhibitors")return h("Search exhibitors");if(t.type==="speakers")return h("Search speakers");if(re.EXPO.startsWith("lenzerheidemotorclassics"))return"SUCHE";if(re.EXPO.startsWith("jetlag"))return"Search location or artist";if(e)return h("Find scans above");if(this.uiState.hasAppliedFilters)return h("Search");const o=f.boothTerm.toLowerCase();return!f.searchText&&le.exhibitors.length===0?h("Search {{boothTerm}}",{boothTerm:o}):f.searchText||h("Search")}get searchBoxClass(){return{"is-details":this.searchBoxMode==="details"&&!(this.uiState.details instanceof S),"is-interface":this.searchBoxMode==="interface","has-shadow":this.shouldShowShadow,"has-subtitle":!!this.searchBoxConfig.subtitle,"has-badge":!!this.searchBoxConfig.badge,"has-icon":!!this.searchBoxConfig.icon,"is-overlay-full":this.uiState.isOverlayOpen&&this.uiState.overlaySize==="full","is-featured-exhibitor":this.uiState.isFeaturedExhibitorActive,"is-route":this.uiState.details instanceof S,"is-guided-tours":this.uiState.isGuidedToursActive,"is-overlay-scrolled":this.uiState.isOverlayScrolled,"overlay-pulse":this.uiState.kiosk&&this.uiState.inIdle&&!this.uiState.setKioskModeEnabled}}get ariaLabel(){return!this.shouldShowSearchInput||this.searchBoxMode==="details"?h("Close"):this.searchText?h("Clear search"):h("Close")}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null;const e=ce(t||"",Object.keys(this.uiState.mapSettings).map(o=>`${o}=`));this.setSearchText(e),this.uiState.activeListIndex=-1}selectSearchAndFocus(t){this.selectSearch(t),this.setFocused(!0)}setSearchText(t){this.searchText=t,this.uiState.hasAppliedFilters?this.rootStore.moveToList():this.uiState.centerMap=!0,this.uiState.activeListIndex=t?0:-1,this.uiState.list.type!=="sessions"&&this.uiState.list.type!=="tours"&&this.uiState.list.type!=="speakers"&&this.uiState.list.type!=="exhibitors"?this.uiState.list={type:"search",text:t,focused:this.isFocused}:this.uiState.list.type==="exhibitors"&&(this.uiState.list={type:"exhibitors",text:t,focused:this.isFocused}),this.uiState.searchClearMode=this.isClearMode}setFocused(t){this.isFocused=t,this.isClearMode=!1,this.skipInputFocus=!1,this.uiState.searchFocused=t,this.uiState.searchClearMode=!1,this.uiState.desiredOverlaySize="full"}handleBackAction(){const{uiState:t}=this,{list:e}=t;if(t.desiredOverlaySize="full",e.type==="route-planner"){this.rootStore.routePlannerStore.close(),this.rootStore.selectBookmarks(),p();return}if(e.type==="multi-point-tour"&&!t.details){i.returnToTours(t,!1),this.rootStore.fp.hidePathways();return}if(t.details){t.details=null,p();return}if(t.menu){e.type==="sessions"?t.list={type:"sessions",text:"",focused:!0}:e.type==="exhibitors"?t.list={type:"exhibitors",text:"",focused:!0}:t.list={type:"search",text:"",focused:!0},this.setFocused(!0),this.isClearMode=!0,i.closeMenu(t);return}if(e.type==="tours"&&t.details instanceof S){t.details=null;return}if(e.type==="sessions"||e.type==="tours"||e.type==="exhibitors"||this.uiState.hasAppliedFilters){if(i.closeDetails(t))return;this.clearActiveFilters(),i.returnToSearch(t,!1),this.selectSearchAndFocus();return}switch(e.type){case"filter":t.details=null;return;case"multi-point-tour":this.rootStore.fp.hidePathways(),i.closeDetails(t)?i.returnToTours(t,!1):p();return;case"category":this.rootStore.selectCategory(e.category);return;case"speakers":if(i.closeDetails(t))return;i.returnToSessions(t,!1);return;case"bookmarks":case"visited":if(i.closeDetails(t))return;this.selectSearchAndFocus();return;case ne:i.returnToSearch(t,!1),i.openMenu(t);return}i.closeDetails(t)||i.clearSearchAndFocus(this)||i.openMenu(t)}closeSearch(){const{uiState:t}=this,{list:e}=t;if(e.type==="route-planner"){this.rootStore.routePlannerStore.close(),i.returnToSearch(t,!1),this.resetSearchBox();return}if(i.closeDetails(t),i.clearListScroll(t,e.type),i.closeMultiPointTour(t),e.type==="bookmarks"){i.returnToSearch(t,!1),this.resetSearchBox();return}if(t.selectedCategory){i.returnToSearch(t,!1),this.resetSearchBox();return}if(e.type==="sessions"){this.closeSessions();return}if(e.type==="exhibitors"){this.closeExhibitors();return}if(t.menu){i.closeMenu(t),this.resetSearchBox();return}if(this.searchBoxMode==="search"&&!t.details&&this.searchText){this.setSearchText(""),this.isClearMode=!0,this.clearActiveFilters();return}i.returnToSearch(t,!1),this.searchText="",this.resetSearchBox(),t.details=null,this.clearActiveFilters()}clearActiveFilters(){this.rootStore.searchButtonsStore.setPoiFilterId(null),this.rootStore.uiState.selectedPoiTypeFilters=[],this.rootStore.uiState.selectedCategoryFilters=[],this.rootStore.categoryFilterStore.state.selectedItems=[],this.rootStore.categoryFilterStore.state.pendingItems=[],this.rootStore.searchButtonsStore.searchShortcutState.activeParentId=null,this.rootStore.searchButtonsStore.searchShortcutState.activeChildren.clear(),this.rootStore.searchButtonsStore.searchShortcutState.isShortcutsVisible=!1,this.rootStore.urlFilterManager&&this.rootStore.urlFilterManager.isInitialized&&this.rootStore.urlFilterManager.clearAllFilters()}handleSearchAction(){this.isFocused||this.setFocused(!0)}openOverlayWithoutInputFocus(){this.skipInputFocus=!0,this.isFocused=!0,this.isClearMode=!1,this.uiState.searchFocused=!0,this.uiState.searchClearMode=!1,this.uiState.desiredOverlaySize="full"}closeSessions(){this.searchText="",i.returnToSearch(this.uiState,!1),this.uiState.details=null,i.resetActiveListIndex(this.uiState),this.uiState.selectedTrack=null,this.rootStore.searchButtonsStore.setSubButtonId(null),this.rootStore.searchButtonsStore.hideSubButtons()}closeExhibitors(){this.searchText="",i.returnToSearch(this.uiState,!1),this.uiState.details=null,i.resetActiveListIndex(this.uiState)}resetSearchBox(){this.setFocused(!1),this.isClearMode=!1,this.syncWithUIState()}syncWithUIState(){this.searchText=(this.uiState.list.type==="search"||this.uiState.list.type==="exhibitors")&&this.uiState.list.text||"",this.isFocused=this.uiState.searchFocused,this.isClearMode=this.uiState.searchClearMode}get actionButtonIcon(){return this.shouldShowSearchInput?this.shouldShowCloseButton?"icon-close":"icon-search":"icon-close"}clearAndSelectSearch(){this.selectSearch(""),this.setFocused(!1)}get backMode(){return this.uiState.list.type==="speakers"||this.uiState.list.type==="sessions"||this.uiState.list.type==="tours"||this.uiState.list.type==="exhibitors"||this.uiState.hasAppliedFilters?"back":this.shouldShowSearchInput&&!this.searchText?"menu":"back"}get isMobileDetailsMode(){return window.innerWidth<he&&this.uiState.details!==null&&this.uiState.overlaySize==="full"&&!(this.uiState.details instanceof S)}get shouldShowTitle(){return!this.shouldShowSearchInput}get searchState(){return{text:this.searchText,isFocused:this.isFocused,isClearMode:this.isClearMode,mode:this.searchBoxMode,title:this.searchBoxConfig.title,subtitle:this.searchBoxConfig.subtitle,badge:this.searchBoxConfig.badge,icon:this.searchBoxConfig.icon}}}})();export default ue;
|
|
1
|
+
import{__esDecorate as s,__runInitializers as u}from"tslib";import{action as c,computed as l,observable as d}from"mobx";import{t as h}from"../utils/i18n";import f from"../data";import{exhibitorStore as le}from"./index";import re from"../tools/settings";import{sanitizeSearch as ce}from"../utils/sanitizeText";import{Route as S}from"./RouteStore";import{goBack as p}from"../services/routing";import{MOBILE_BREAKPOINT as he,LANGUAGE_TYPE as ne}from"../constants";class i{static closeDetails(r){return r.details?(r.details=null,!0):!1}static closeMultiPointTour(r){return r.rootStore.fp.hidePathways(),!0}static clearSearchAndFocus(r){return r.searchText?(r.setSearchText(""),r.setFocused(!0),!0):!1}static returnToSearch(r,n=!1){r.list={type:"search",text:"",focused:n}}static returnToSessions(r,n=!1){r.list={type:"sessions",text:"",focused:n}}static returnToTours(r,n=!1){r.list={type:"tours",text:"",focused:n}}static openMenu(r){r.menu=!0}static closeMenu(r){r.menu=!1}static clearListScroll(r,n){r.clearListScroll(n)}static resetActiveListIndex(r){r.activeListIndex=-1}}let ue=(()=>{let a=[],r,n=[],m=[],x,g=[],_=[],B,y=[],F=[],k,b=[],v=[],T,I,M,C,A,w,z,L,O,E,P,W,D,U,j,G,K,N,R,X,Y,H,V,$,q,J,Q,Z,ee,te,se,ae,ie;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;r=[d],x=[d],B=[d],k=[d],T=[l],I=[l],M=[l],C=[l],A=[l],w=[l],z=[l],L=[l],O=[l],E=[l],P=[l],W=[l],D=[l],U=[l],j=[c],G=[c],K=[c],N=[c],R=[c],X=[c],Y=[c],H=[c],V=[c],$=[c],q=[c],J=[c],Q=[c],Z=[l],ee=[c],te=[l],se=[l],ae=[l],ie=[l],s(this,null,T,{kind:"getter",name:"searchBoxConfig",static:!1,private:!1,access:{has:e=>"searchBoxConfig"in e,get:e=>e.searchBoxConfig},metadata:t},null,a),s(this,null,I,{kind:"getter",name:"searchBoxMode",static:!1,private:!1,access:{has:e=>"searchBoxMode"in e,get:e=>e.searchBoxMode},metadata:t},null,a),s(this,null,M,{kind:"getter",name:"searchBoxTitle",static:!1,private:!1,access:{has:e=>"searchBoxTitle"in e,get:e=>e.searchBoxTitle},metadata:t},null,a),s(this,null,C,{kind:"getter",name:"searchBoxSubtitle",static:!1,private:!1,access:{has:e=>"searchBoxSubtitle"in e,get:e=>e.searchBoxSubtitle},metadata:t},null,a),s(this,null,A,{kind:"getter",name:"searchBoxBadge",static:!1,private:!1,access:{has:e=>"searchBoxBadge"in e,get:e=>e.searchBoxBadge},metadata:t},null,a),s(this,null,w,{kind:"getter",name:"searchBoxIcon",static:!1,private:!1,access:{has:e=>"searchBoxIcon"in e,get:e=>e.searchBoxIcon},metadata:t},null,a),s(this,null,z,{kind:"getter",name:"searchBoxActions",static:!1,private:!1,access:{has:e=>"searchBoxActions"in e,get:e=>e.searchBoxActions},metadata:t},null,a),s(this,null,L,{kind:"getter",name:"shouldShowSearchInput",static:!1,private:!1,access:{has:e=>"shouldShowSearchInput"in e,get:e=>e.shouldShowSearchInput},metadata:t},null,a),s(this,null,O,{kind:"getter",name:"shouldShowCloseButton",static:!1,private:!1,access:{has:e=>"shouldShowCloseButton"in e,get:e=>e.shouldShowCloseButton},metadata:t},null,a),s(this,null,E,{kind:"getter",name:"closeButtonAction",static:!1,private:!1,access:{has:e=>"closeButtonAction"in e,get:e=>e.closeButtonAction},metadata:t},null,a),s(this,null,P,{kind:"getter",name:"shouldShowShadow",static:!1,private:!1,access:{has:e=>"shouldShowShadow"in e,get:e=>e.shouldShowShadow},metadata:t},null,a),s(this,null,W,{kind:"getter",name:"placeholder",static:!1,private:!1,access:{has:e=>"placeholder"in e,get:e=>e.placeholder},metadata:t},null,a),s(this,null,D,{kind:"getter",name:"searchBoxClass",static:!1,private:!1,access:{has:e=>"searchBoxClass"in e,get:e=>e.searchBoxClass},metadata:t},null,a),s(this,null,U,{kind:"getter",name:"ariaLabel",static:!1,private:!1,access:{has:e=>"ariaLabel"in e,get:e=>e.ariaLabel},metadata:t},null,a),s(this,null,j,{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,G,{kind:"method",name:"selectSearchAndFocus",static:!1,private:!1,access:{has:e=>"selectSearchAndFocus"in e,get:e=>e.selectSearchAndFocus},metadata:t},null,a),s(this,null,K,{kind:"method",name:"setSearchText",static:!1,private:!1,access:{has:e=>"setSearchText"in e,get:e=>e.setSearchText},metadata:t},null,a),s(this,null,N,{kind:"method",name:"setFocused",static:!1,private:!1,access:{has:e=>"setFocused"in e,get:e=>e.setFocused},metadata:t},null,a),s(this,null,R,{kind:"method",name:"handleBackAction",static:!1,private:!1,access:{has:e=>"handleBackAction"in e,get:e=>e.handleBackAction},metadata:t},null,a),s(this,null,X,{kind:"method",name:"closeSearch",static:!1,private:!1,access:{has:e=>"closeSearch"in e,get:e=>e.closeSearch},metadata:t},null,a),s(this,null,Y,{kind:"method",name:"clearActiveFilters",static:!1,private:!1,access:{has:e=>"clearActiveFilters"in e,get:e=>e.clearActiveFilters},metadata:t},null,a),s(this,null,H,{kind:"method",name:"handleSearchAction",static:!1,private:!1,access:{has:e=>"handleSearchAction"in e,get:e=>e.handleSearchAction},metadata:t},null,a),s(this,null,V,{kind:"method",name:"openOverlayWithoutInputFocus",static:!1,private:!1,access:{has:e=>"openOverlayWithoutInputFocus"in e,get:e=>e.openOverlayWithoutInputFocus},metadata:t},null,a),s(this,null,$,{kind:"method",name:"closeSessions",static:!1,private:!1,access:{has:e=>"closeSessions"in e,get:e=>e.closeSessions},metadata:t},null,a),s(this,null,q,{kind:"method",name:"closeExhibitors",static:!1,private:!1,access:{has:e=>"closeExhibitors"in e,get:e=>e.closeExhibitors},metadata:t},null,a),s(this,null,J,{kind:"method",name:"resetSearchBox",static:!1,private:!1,access:{has:e=>"resetSearchBox"in e,get:e=>e.resetSearchBox},metadata:t},null,a),s(this,null,Q,{kind:"method",name:"syncWithUIState",static:!1,private:!1,access:{has:e=>"syncWithUIState"in e,get:e=>e.syncWithUIState},metadata:t},null,a),s(this,null,Z,{kind:"getter",name:"actionButtonIcon",static:!1,private:!1,access:{has:e=>"actionButtonIcon"in e,get:e=>e.actionButtonIcon},metadata:t},null,a),s(this,null,ee,{kind:"method",name:"clearAndSelectSearch",static:!1,private:!1,access:{has:e=>"clearAndSelectSearch"in e,get:e=>e.clearAndSelectSearch},metadata:t},null,a),s(this,null,te,{kind:"getter",name:"backMode",static:!1,private:!1,access:{has:e=>"backMode"in e,get:e=>e.backMode},metadata:t},null,a),s(this,null,se,{kind:"getter",name:"isMobileDetailsMode",static:!1,private:!1,access:{has:e=>"isMobileDetailsMode"in e,get:e=>e.isMobileDetailsMode},metadata:t},null,a),s(this,null,ae,{kind:"getter",name:"shouldShowTitle",static:!1,private:!1,access:{has:e=>"shouldShowTitle"in e,get:e=>e.shouldShowTitle},metadata:t},null,a),s(this,null,ie,{kind:"getter",name:"searchState",static:!1,private:!1,access:{has:e=>"searchState"in e,get:e=>e.searchState},metadata:t},null,a),s(null,null,r,{kind:"field",name:"searchText",static:!1,private:!1,access:{has:e=>"searchText"in e,get:e=>e.searchText,set:(e,o)=>{e.searchText=o}},metadata:t},n,m),s(null,null,x,{kind:"field",name:"isFocused",static:!1,private:!1,access:{has:e=>"isFocused"in e,get:e=>e.isFocused,set:(e,o)=>{e.isFocused=o}},metadata:t},g,_),s(null,null,B,{kind:"field",name:"isClearMode",static:!1,private:!1,access:{has:e=>"isClearMode"in e,get:e=>e.isClearMode,set:(e,o)=>{e.isClearMode=o}},metadata:t},y,F),s(null,null,k,{kind:"field",name:"skipInputFocus",static:!1,private:!1,access:{has:e=>"skipInputFocus"in e,get:e=>e.skipInputFocus,set:(e,o)=>{e.skipInputFocus=o}},metadata:t},b,v),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=u(this,a);searchText=u(this,n,"");isFocused=(u(this,m),u(this,g,!1));isClearMode=(u(this,_),u(this,y,!1));skipInputFocus=(u(this,F),u(this,b,!1));constructor(t){u(this,v),this.rootStore=t}get uiState(){return this.rootStore.uiState}get searchBoxConfig(){return this.uiState.searchBoxConfig}get searchBoxMode(){return this.searchBoxConfig.mode}get searchBoxTitle(){return this.searchBoxConfig.title}get searchBoxSubtitle(){return this.searchBoxConfig.subtitle}get searchBoxBadge(){return this.searchBoxConfig.badge}get searchBoxIcon(){return this.searchBoxConfig.icon}get searchBoxActions(){return this.uiState.searchBoxActions}get shouldShowSearchInput(){return this.searchBoxMode==="search"}get shouldShowCloseButton(){const{menu:t,details:e,list:o}=this.uiState;return!this.shouldShowSearchInput||o.type==="sessions"||o.type==="tours"||o.type==="speakers"||o.type==="exhibitors"?!0:t||e!==null||!!this.searchText||this.isClearMode||this.isFocused}get closeButtonAction(){return!this.shouldShowSearchInput||this.searchBoxMode==="details"||this.uiState.list.type==="sessions"||this.uiState.list.type==="speakers"||this.uiState.list.type==="exhibitors"?"close":this.searchText?"clear":"close"}get shouldShowShadow(){const{menu:t,details:e,list:o}=this.uiState,oe=o.type==="search"&&!!o.text;return!(this.rootStore.fp.alwaysShowSidebar||t||e!==null||o.type!=="search"||oe||this.isFocused||this.uiState.heatmap)}get placeholder(){const{list:t,heatmapYah:e}=this.uiState;if(t.type==="sessions")return h("Search sessions");if(t.type==="tours")return h("Search Guided Tours");if(t.type==="exhibitors")return h("Search exhibitors");if(t.type==="speakers")return h("Search speakers");if(re.EXPO.startsWith("lenzerheidemotorclassics"))return"SUCHE";if(re.EXPO.startsWith("jetlag"))return"Search location or artist";if(e)return h("Find values greater than");if(this.uiState.hasAppliedFilters)return h("Search");const o=f.boothTerm.toLowerCase();return!f.searchText&&le.exhibitors.length===0?h("Search {{boothTerm}}",{boothTerm:o}):f.searchText||h("Search")}get searchBoxClass(){return{"is-details":this.searchBoxMode==="details"&&!(this.uiState.details instanceof S),"is-interface":this.searchBoxMode==="interface","has-shadow":this.shouldShowShadow,"has-subtitle":!!this.searchBoxConfig.subtitle,"has-badge":!!this.searchBoxConfig.badge,"has-icon":!!this.searchBoxConfig.icon,"is-overlay-full":this.uiState.isOverlayOpen&&this.uiState.overlaySize==="full","is-featured-exhibitor":this.uiState.isFeaturedExhibitorActive,"is-route":this.uiState.details instanceof S,"is-guided-tours":this.uiState.isGuidedToursActive,"is-overlay-scrolled":this.uiState.isOverlayScrolled,"overlay-pulse":this.uiState.kiosk&&this.uiState.inIdle&&!this.uiState.setKioskModeEnabled}}get ariaLabel(){return!this.shouldShowSearchInput||this.searchBoxMode==="details"?h("Close"):this.searchText?h("Clear search"):h("Close")}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null;const e=ce(t||"",Object.keys(this.uiState.mapSettings).map(o=>`${o}=`));this.setSearchText(e),this.uiState.activeListIndex=-1}selectSearchAndFocus(t){this.selectSearch(t),this.setFocused(!0)}setSearchText(t){this.searchText=t,this.uiState.hasAppliedFilters?this.rootStore.moveToList():this.uiState.centerMap=!0,this.uiState.activeListIndex=t?0:-1,this.uiState.list.type!=="sessions"&&this.uiState.list.type!=="tours"&&this.uiState.list.type!=="speakers"&&this.uiState.list.type!=="exhibitors"?this.uiState.list={type:"search",text:t,focused:this.isFocused}:this.uiState.list.type==="exhibitors"&&(this.uiState.list={type:"exhibitors",text:t,focused:this.isFocused}),this.uiState.searchClearMode=this.isClearMode}setFocused(t){this.isFocused=t,this.isClearMode=!1,this.skipInputFocus=!1,this.uiState.searchFocused=t,this.uiState.searchClearMode=!1,this.uiState.desiredOverlaySize="full"}handleBackAction(){const{uiState:t}=this,{list:e}=t;if(t.desiredOverlaySize="full",e.type==="route-planner"){this.rootStore.routePlannerStore.close(),this.rootStore.selectBookmarks(),p();return}if(e.type==="multi-point-tour"&&!t.details){i.returnToTours(t,!1),this.rootStore.fp.hidePathways();return}if(t.details){t.details=null,p();return}if(t.menu){e.type==="sessions"?t.list={type:"sessions",text:"",focused:!0}:e.type==="exhibitors"?t.list={type:"exhibitors",text:"",focused:!0}:t.list={type:"search",text:"",focused:!0},this.setFocused(!0),this.isClearMode=!0,i.closeMenu(t);return}if(e.type==="tours"&&t.details instanceof S){t.details=null;return}if(e.type==="sessions"||e.type==="tours"||e.type==="exhibitors"||this.uiState.hasAppliedFilters){if(i.closeDetails(t))return;this.clearActiveFilters(),i.returnToSearch(t,!1),this.selectSearchAndFocus();return}switch(e.type){case"filter":t.details=null;return;case"multi-point-tour":this.rootStore.fp.hidePathways(),i.closeDetails(t)?i.returnToTours(t,!1):p();return;case"category":this.rootStore.selectCategory(e.category);return;case"speakers":if(i.closeDetails(t))return;i.returnToSessions(t,!1);return;case"bookmarks":case"visited":if(i.closeDetails(t))return;this.selectSearchAndFocus();return;case ne:i.returnToSearch(t,!1),i.openMenu(t);return}i.closeDetails(t)||i.clearSearchAndFocus(this)||i.openMenu(t)}closeSearch(){const{uiState:t}=this,{list:e}=t;if(e.type==="route-planner"){this.rootStore.routePlannerStore.close(),i.returnToSearch(t,!1),this.resetSearchBox();return}if(i.closeDetails(t),i.clearListScroll(t,e.type),i.closeMultiPointTour(t),e.type==="bookmarks"){i.returnToSearch(t,!1),this.resetSearchBox();return}if(t.selectedCategory){i.returnToSearch(t,!1),this.resetSearchBox();return}if(e.type==="sessions"){this.closeSessions();return}if(e.type==="exhibitors"){this.closeExhibitors();return}if(t.menu){i.closeMenu(t),this.resetSearchBox();return}if(this.searchBoxMode==="search"&&!t.details&&this.searchText){this.setSearchText(""),this.isClearMode=!0,this.clearActiveFilters();return}i.returnToSearch(t,!1),this.searchText="",this.resetSearchBox(),t.details=null,this.clearActiveFilters()}clearActiveFilters(){this.rootStore.searchButtonsStore.setPoiFilterId(null),this.rootStore.uiState.selectedPoiTypeFilters=[],this.rootStore.uiState.selectedCategoryFilters=[],this.rootStore.categoryFilterStore.state.selectedItems=[],this.rootStore.categoryFilterStore.state.pendingItems=[],this.rootStore.searchButtonsStore.searchShortcutState.activeParentId=null,this.rootStore.searchButtonsStore.searchShortcutState.activeChildren.clear(),this.rootStore.searchButtonsStore.searchShortcutState.isShortcutsVisible=!1,this.rootStore.urlFilterManager&&this.rootStore.urlFilterManager.isInitialized&&this.rootStore.urlFilterManager.clearAllFilters()}handleSearchAction(){this.isFocused||this.setFocused(!0)}openOverlayWithoutInputFocus(){this.skipInputFocus=!0,this.isFocused=!0,this.isClearMode=!1,this.uiState.searchFocused=!0,this.uiState.searchClearMode=!1,this.uiState.desiredOverlaySize="full"}closeSessions(){this.searchText="",i.returnToSearch(this.uiState,!1),this.uiState.details=null,i.resetActiveListIndex(this.uiState),this.uiState.selectedTrack=null,this.rootStore.searchButtonsStore.setSubButtonId(null),this.rootStore.searchButtonsStore.hideSubButtons()}closeExhibitors(){this.searchText="",i.returnToSearch(this.uiState,!1),this.uiState.details=null,i.resetActiveListIndex(this.uiState)}resetSearchBox(){this.setFocused(!1),this.isClearMode=!1,this.syncWithUIState()}syncWithUIState(){this.searchText=(this.uiState.list.type==="search"||this.uiState.list.type==="exhibitors")&&this.uiState.list.text||"",this.isFocused=this.uiState.searchFocused,this.isClearMode=this.uiState.searchClearMode}get actionButtonIcon(){return this.shouldShowSearchInput?this.shouldShowCloseButton?"icon-close":"icon-search":"icon-close"}clearAndSelectSearch(){this.selectSearch(""),this.setFocused(!1)}get backMode(){return this.uiState.list.type==="speakers"||this.uiState.list.type==="sessions"||this.uiState.list.type==="tours"||this.uiState.list.type==="exhibitors"||this.uiState.hasAppliedFilters?"back":this.shouldShowSearchInput&&!this.searchText?"menu":"back"}get isMobileDetailsMode(){return window.innerWidth<he&&this.uiState.details!==null&&this.uiState.overlaySize==="full"&&!(this.uiState.details instanceof S)}get shouldShowTitle(){return!this.shouldShowSearchInput}get searchState(){return{text:this.searchText,isFocused:this.isFocused,isClearMode:this.isClearMode,mode:this.searchBoxMode,title:this.searchBoxConfig.title,subtitle:this.searchBoxConfig.subtitle,badge:this.searchBoxConfig.badge,icon:this.searchBoxConfig.icon}}}})();export default ue;
|
|
@@ -166,7 +166,7 @@ export default class UIState {
|
|
|
166
166
|
get fullSizeOffset(): number;
|
|
167
167
|
get shouldShowSearchButtons(): false;
|
|
168
168
|
get canvasVisibleRectPx(): Rect;
|
|
169
|
-
get shouldShiftMapRect(): false | Booth | Exhibitor |
|
|
169
|
+
get shouldShiftMapRect(): false | Booth | Exhibitor | Route | Category | EventItem | SpeakerItem;
|
|
170
170
|
get hasAppliedFilters(): boolean;
|
|
171
171
|
get canvasVisibleRectPt(): Rect;
|
|
172
172
|
get canvasSizePt(): Size;
|