@expofp/floorplan 3.0.1 → 3.0.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.
Files changed (97) hide show
  1. package/dist/browser/CookieConsent-CqkxkIwX.js +7810 -0
  2. package/dist/browser/Debug-Dks0egsG.js +51 -0
  3. package/dist/browser/Demo-DBNmcPwz.js +65 -0
  4. package/dist/browser/Free-BnsFOhog.js +65 -0
  5. package/dist/browser/Gallery-D9sKC8mp.js +3257 -0
  6. package/dist/browser/GpsLoader-Dfum4xB9.js +152 -0
  7. package/dist/browser/KioskStore-DnhZo-Ov.js +212 -0
  8. package/dist/browser/Mapbox-BWK98Zf_.js +120 -0
  9. package/dist/browser/SetKioskMode-DPOCqSzq.js +49 -0
  10. package/dist/browser/ShowKiosk-CWHtQFiJ.js +25 -0
  11. package/dist/browser/ThreeComponent-COgPMNab.js +1493 -0
  12. package/dist/browser/TouchHand-Ky80pfba.js +66 -0
  13. package/dist/browser/ViewerMenuPanel-DJ6pZIMD.js +106 -0
  14. package/dist/browser/add-debug-secret-listener-CXd4jWZG.js +26 -0
  15. package/dist/browser/boolean-editor-SHR1RkFd.js +206 -0
  16. package/dist/browser/bundle.json +70 -40
  17. package/dist/browser/chunk-DFRW9JAK.js +28 -0
  18. package/dist/browser/classnames-D5RYoiaD.js +39 -0
  19. package/dist/browser/client-B-AFqibD.js +7601 -0
  20. package/dist/browser/data-BPNnd1Ub.js +27969 -0
  21. package/dist/browser/debug-overlay-Dm7tnN3s.js +3995 -0
  22. package/dist/browser/debug-ui-T7mEy9PT.js +86 -0
  23. package/dist/browser/dist-Bxi6YEB1.js +2581 -0
  24. package/dist/browser/favicon-CDOxAL2U.js +12 -0
  25. package/dist/browser/fetch-retry.umd-BBS0NAgY.js +78 -0
  26. package/dist/browser/flex-CjUXae7J.js +1045 -0
  27. package/dist/browser/floorplan.ready-Vi6d8S_t.js +1310 -0
  28. package/dist/browser/fuse-B9KABHXb.js +887 -0
  29. package/dist/browser/index.js +10628 -12440
  30. package/dist/browser/jsx-runtime-EyUcoQPo.js +30 -0
  31. package/dist/browser/lib-DCBNlykb.js +1859 -0
  32. package/dist/browser/main-DoISipn5.js +289 -0
  33. package/dist/browser/mobx-DezH6kY5.js +23 -0
  34. package/dist/browser/particles.min-CBF3r8H5.js +133 -0
  35. package/dist/browser/prop-types-bwVnWQ95.js +57 -0
  36. package/dist/browser/react-dom-DNErX4mG.js +139 -0
  37. package/dist/browser/reset-all-settings-BP45RcR6.js +17 -0
  38. package/dist/browser/settings-Dbk4UG1-.js +69 -0
  39. package/dist/browser/src-C46xGkrC.js +19 -0
  40. package/dist/browser/store-COH1sU9Z.js +36100 -0
  41. package/dist/browser/ui-CmIShfKe.js +33 -0
  42. package/dist/esm/components/Layout.js +1 -1
  43. package/dist/esm/components/Map/traffic/useBuildRoute.js +2 -2
  44. package/dist/esm/components/Map/traffic/useManageTraffic.js +1 -1
  45. package/dist/esm/components/Mapbox/utils/data.d.ts +6 -8
  46. package/dist/esm/components/Modal.d.ts +1 -1
  47. package/dist/esm/components/Overlay.d.ts +1 -2
  48. package/dist/esm/components/ScrollableRow.d.ts +1 -2
  49. package/dist/esm/components/Tours.d.ts +1 -3
  50. package/dist/esm/components/stories/CookieConsent.stories.d.ts +1 -1
  51. package/dist/esm/components/stories/MapControls.stories.d.ts +1 -1
  52. package/dist/esm/components/stories/RebookingRadioGroup.stories.d.ts +1 -1
  53. package/dist/esm/store/BoothStore.d.ts +7 -7
  54. package/dist/esm/store/CategoryStore.d.ts +2 -2
  55. package/dist/esm/store/EventStore.d.ts +2 -2
  56. package/dist/esm/store/ExhibitorStore.d.ts +5 -5
  57. package/dist/esm/store/PoiTypeStore.d.ts +2 -2
  58. package/dist/esm/store/RootStore.js +1 -1
  59. package/dist/esm/store/SearchButtonsStore.d.ts +1 -1
  60. package/dist/esm/store/SearchStore.d.ts +1 -1
  61. package/dist/esm/store/SpeakerStore.d.ts +2 -2
  62. package/dist/esm/store/ToursStore.d.ts +2 -2
  63. package/dist/esm/store/init/init-booths.d.ts +3 -3
  64. package/dist/esm/store/providers/SessionsShortcutProvider.d.ts +2 -3
  65. package/dist/esm/store/providers/SpeakerShortcutProvider.d.ts +2 -3
  66. package/dist/esm/utils/is-debug.js +1 -1
  67. package/dist/esm/utils/mobx.d.ts +2 -2
  68. package/package.json +4 -4
  69. package/dist/browser/Debug-b2YI2Uxo.js +0 -40
  70. package/dist/browser/Demo-aEKqZbJJ.js +0 -47
  71. package/dist/browser/Free-BGr4o53R.js +0 -51
  72. package/dist/browser/Gallery-C9n64fhu.js +0 -71
  73. package/dist/browser/GpsLoader-ChxBR2EI.js +0 -140
  74. package/dist/browser/KioskStore-DkCSeq5I.js +0 -225
  75. package/dist/browser/Mapbox-Cl0Wxz2h.js +0 -118
  76. package/dist/browser/SetKioskMode-D3EJeF9c.js +0 -249
  77. package/dist/browser/ShowKiosk-Bs5q-1RZ.js +0 -35
  78. package/dist/browser/ThreeComponent-CSsqNYDu.js +0 -1595
  79. package/dist/browser/ViewerMenuPanel-BMmB1p03.js +0 -77
  80. package/dist/browser/boolean-editor-DpnmndKH.js +0 -157
  81. package/dist/browser/client-CN_I7kK8.js +0 -10011
  82. package/dist/browser/data-CIAMSGsv.js +0 -22125
  83. package/dist/browser/debug-overlay-DjmA0D2r.js +0 -3675
  84. package/dist/browser/debug-ui-D1QGTN8V.js +0 -67
  85. package/dist/browser/favicon-BpTKNfwa.js +0 -13
  86. package/dist/browser/fetch-retry.umd-B8hV1FNr.js +0 -123
  87. package/dist/browser/flex-09atkOGP.js +0 -400
  88. package/dist/browser/floorplan.ready-BQetaqdP.js +0 -57653
  89. package/dist/browser/index-Bw6xZlSd.js +0 -161
  90. package/dist/browser/index-C71k7nSe.js +0 -3244
  91. package/dist/browser/index-CWLY6XdC.js +0 -92
  92. package/dist/browser/index-D9pdVw-U.js +0 -882
  93. package/dist/browser/index-DPSQIIUy.js +0 -57
  94. package/dist/browser/index-jp-Zhdyp.js +0 -54
  95. package/dist/browser/jsx-runtime-CoKhM3tL.js +0 -40
  96. package/dist/browser/main-DxaHLbma.js +0 -359
  97. package/dist/browser/particles.min-CsHbc6cO.js +0 -143
@@ -1,51 +0,0 @@
1
- function __vite_inject_css__(css, id){ if (typeof document==='undefined') return; var parent=(typeof window!=='undefined'&&window.__efpShadowDOMStyleParent)||document.head; var s=document.createElement('style'); s.setAttribute('data-chunk-style', id); s.appendChild(document.createTextNode(css)); parent.appendChild(s);}
2
- import { j as s } from "./jsx-runtime-CoKhM3tL.js";
3
- import { y as o } from "./index-jp-Zhdyp.js";
4
- import { u as d, a, b as f, c as l } from "./floorplan.ready-BQetaqdP.js";
5
- import { ah as c, z as i } from "./index.js";
6
- (function() {
7
- try {
8
- var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
9
- e.SENTRY_RELEASE = { id: "3.0.1" };
10
- var t = new e.Error().stack;
11
- t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "ce8f7f4e-2238-4650-8048-00d07181bd7a", e._sentryDebugIdIdentifier = "sentry-dbid-ce8f7f4e-2238-4650-8048-00d07181bd7a");
12
- } catch {
13
- }
14
- })();
15
- const n = "free-dismissed5";
16
- function b() {
17
- const e = d(() => ({
18
- hidden: !0,
19
- get top() {
20
- return a.screenSize.width < c;
21
- },
22
- get classes() {
23
- return o({
24
- free: !0,
25
- bottom: !this.top,
26
- hidden: this.hidden
27
- });
28
- }
29
- }));
30
- return f(() => {
31
- sessionStorage.getItem(n) || window.setTimeout(() => {
32
- e.hidden = !1;
33
- }, 2e3);
34
- }), l(() => /* @__PURE__ */ s.jsx("div", { className: e.classes, children: /* @__PURE__ */ s.jsxs("section", { children: [
35
- /* @__PURE__ */ s.jsx("div", { className: "free__message", children: /* @__PURE__ */ s.jsxs("span", { children: [
36
- i("Create a free floor plan at"),
37
- " ",
38
- /* @__PURE__ */ s.jsx("a", { href: "https://expofp.com/", target: "_blank", rel: "noopener noreferrer", children: "ExpoFP.com" })
39
- ] }) }),
40
- /* @__PURE__ */ s.jsx("a", { href: "/", onClick: t, className: "free__dismiss", children: i("Dismiss") })
41
- ] }) }));
42
- function t(r) {
43
- r.preventDefault(), e.hidden = !0, sessionStorage.setItem(n, "1");
44
- }
45
- }
46
- export {
47
- b as default
48
- };
49
-
50
- ;/* vite-per-chunk-css */
51
- __vite_inject_css__(".free{position:absolute;bottom:0;display:flex;justify-content:center;width:100%;min-height:2rem;background:#ab40a0;background:linear-gradient(90deg,#e5175c,#5c17e5);opacity:1;transition:all .5s}.free>section{display:flex;padding:.2rem .5rem;font-size:.8rem;-webkit-user-select:none;user-select:none}.free__message{display:flex;align-items:center;color:#fff}.free__message a{color:#fff;text-decoration:underline}.free__dismiss{display:flex;align-items:center;margin-inline-start:.5rem;padding:.1rem .8rem;background:#1378d5;border-radius:2px;font-size:.8rem;font-weight:500;color:#fff!important;text-decoration:none!important}.free__dismiss:hover{background:#69b7ff}@media print{.free__dismiss{display:none}}.free.top{top:0;bottom:unset;width:100%;min-height:2.5rem}.free.top>section{flex-grow:1}.free.top span{display:inline-block}.free.top .free__message{flex-grow:1}.free.bottom .free__message{font-size:1.5rem;font-weight:300;color:#ffffffe6}.free.bottom>section{padding:.5rem}.free.bottom .free__dismiss{padding:.5rem 1rem;font-size:1.2rem;font-weight:600}.free.hidden{transform:translateY(100%)}.free.top.hidden{transform:translateY(-100%)}\n/*$vite$:1*/", "Free.css");
@@ -1,71 +0,0 @@
1
- import { j as e } from "./jsx-runtime-CoKhM3tL.js";
2
- import { r as d, o as E } from "./index.js";
3
- import { y as N } from "./index-jp-Zhdyp.js";
4
- import { as as v, at as G, au as S } from "./floorplan.ready-BQetaqdP.js";
5
- (function() {
6
- try {
7
- var s = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
8
- s.SENTRY_RELEASE = { id: "3.0.1" };
9
- var a = new s.Error().stack;
10
- a && (s._sentryDebugIds = s._sentryDebugIds || {}, s._sentryDebugIds[a] = "7256ff82-0acf-4237-aaaa-6ac9e6f8d367", s._sentryDebugIdIdentifier = "sentry-dbid-7256ff82-0acf-4237-aaaa-6ac9e6f8d367");
11
- } catch {
12
- }
13
- })();
14
- const w = ({
15
- count: s,
16
- onFullscreen: a
17
- }) => /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
18
- /* @__PURE__ */ e.jsxs("div", { className: "gallery__badge gallery__badge-count", children: [
19
- /* @__PURE__ */ e.jsx("i", { className: "icon-image" }),
20
- /* @__PURE__ */ e.jsx("span", { children: s })
21
- ] }),
22
- /* @__PURE__ */ e.jsx("div", { className: "gallery__badge gallery__badge-fullscreen", onClick: a, children: /* @__PURE__ */ e.jsx("i", { className: "icon-maximize" }) })
23
- ] }), x = ({
24
- url: s,
25
- position: a = "center",
26
- leading: r = !1,
27
- setHeight: t = !1,
28
- fillMode: i,
29
- onClick: o,
30
- onImageLoadHeightUpdate: c
31
- }) => /* @__PURE__ */ e.jsx("div", { className: "gallery__item", onClick: o, children: /* @__PURE__ */ e.jsx(v, { position: a, fillMode: i, url: s, leading: r, setHeight: t, onImageLoadHeightUpdate: c }) }), D = (s) => {
32
- const {
33
- images: a,
34
- leading: r = !1,
35
- onImageLoadHeightUpdate: t,
36
- onOpenGallery: i,
37
- onCloseGallery: o,
38
- className: c
39
- } = s, [p, m] = d.useState(!1), [h, j] = d.useState(0), [_, u] = d.useState(!1), g = (l) => {
40
- j(l), m(!0), i && i();
41
- }, b = () => {
42
- m(!1), o && o();
43
- }, I = (l) => {
44
- let n = l.split("/");
45
- const f = n[n.length - 1];
46
- return f.indexOf("original-") === -1 && (n[n.length - 1] = "original-" + f), n.join("/");
47
- }, y = (l, n) => n ? I(l) : l;
48
- return d.useEffect(() => {
49
- (async () => {
50
- if (a.length > 0) {
51
- const n = y(a[0], !0);
52
- try {
53
- await S.load(n), u(!0);
54
- } catch {
55
- u(!1);
56
- }
57
- }
58
- })();
59
- }, [a]), /* @__PURE__ */ e.jsxs(E.Fragment, { children: [
60
- /* @__PURE__ */ e.jsxs("div", { className: N("gallery", {
61
- "gallery-leading": r
62
- }, c), children: [
63
- /* @__PURE__ */ e.jsx("div", { className: "gallery__wrapper", children: r ? /* @__PURE__ */ e.jsx(x, { url: a[0], leading: r, setHeight: !0, fillMode: "contain", onClick: () => g(0), onImageLoadHeightUpdate: t }) : a.map((l, n) => /* @__PURE__ */ e.jsx(x, { url: l, position: "top", fillMode: "cover", onClick: () => g(n), onImageLoadHeightUpdate: t }, l + n)) }),
64
- !r && /* @__PURE__ */ e.jsx(w, { onFullscreen: () => g(0), count: a.length })
65
- ] }),
66
- p && /* @__PURE__ */ e.jsx(G, { className: c, images: a.map((l) => y(l, _)), leading: r, initialSlideIndex: h, onClose: b })
67
- ] });
68
- };
69
- export {
70
- D as default
71
- };
@@ -1,140 +0,0 @@
1
- import { j as S } from "./jsx-runtime-CoKhM3tL.js";
2
- import { r as a, l as I, z as y, _ as T } from "./index.js";
3
- import { af as _, ag as A, ah as k, ai as x, s as b, aj as D, e as G } from "./floorplan.ready-BQetaqdP.js";
4
- import "./index-jp-Zhdyp.js";
5
- (function() {
6
- try {
7
- var t = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
8
- t.SENTRY_RELEASE = { id: "3.0.1" };
9
- var n = new t.Error().stack;
10
- n && (t._sentryDebugIds = t._sentryDebugIds || {}, t._sentryDebugIds[n] = "1bddcbce-15df-4a25-a120-eae5293abc43", t._sentryDebugIdIdentifier = "sentry-dbid-1bddcbce-15df-4a25-a120-eae5293abc43");
11
- } catch {
12
- }
13
- })();
14
- const v = 3;
15
- function L(t) {
16
- return Math.floor(t);
17
- }
18
- function M(t, n) {
19
- return _(t.lat, t.lng, n.lat, n.lng) >= v ? !0 : t.heading !== n.heading;
20
- }
21
- const P = 120, N = 3e3, q = 360;
22
- function H(t) {
23
- const n = a.useRef(null), r = a.useRef(null), i = a.useRef(0), s = a.useRef(null), l = a.useRef(!1), o = a.useRef(null), c = a.useRef(!1), u = a.useRef(null), d = (e) => t(e), m = (e) => {
24
- const f = Date.now();
25
- if (f - i.current < P) return;
26
- const h = s.current;
27
- if (!o.current) {
28
- o.current = e, i.current = f, s.current = e, d(e);
29
- return;
30
- }
31
- const E = _(o.current.lat, o.current.lng, e.lat, e.lng);
32
- let g;
33
- c.current ? E <= v ? (c.current = !1, o.current = e, g = {
34
- ...o.current,
35
- heading: e.heading
36
- }) : (o.current = e, g = e) : E >= v ? (c.current = !0, o.current = e, u.current = null, g = e) : (u.current == null && (u.current = f), f - u.current > N && (o.current = e), g = {
37
- ...o.current,
38
- heading: e.heading
39
- }), !(h && !M(h, g)) && (i.current = f, s.current = g, d(g));
40
- }, R = a.useCallback((e) => {
41
- var E;
42
- const f = (E = e.webkitCompassHeading) != null ? E : e.alpha != null ? q - e.alpha : null;
43
- if (f == null) return;
44
- const h = L(f);
45
- r.current !== h && (r.current = h, s.current && m({
46
- ...s.current,
47
- heading: h
48
- }));
49
- }, [t]);
50
- return {
51
- startGeolocation: () => {
52
- n.current == null && (n.current = navigator.geolocation.watchPosition((e) => {
53
- m({
54
- lat: e.coords.latitude,
55
- lng: e.coords.longitude,
56
- heading: r.current
57
- });
58
- }, (e) => I.warn("Geolocation watch error:", e), {
59
- enableHighAccuracy: !0,
60
- maximumAge: 0
61
- }));
62
- },
63
- startOrientation: () => {
64
- l.current || (l.current = !0, window.addEventListener("deviceorientation", R, !0));
65
- },
66
- stopGeolocation: () => {
67
- n.current != null && (navigator.geolocation.clearWatch(n.current), n.current = null), o.current = null, c.current = !1;
68
- },
69
- stopOrientation: () => {
70
- l.current = !1, window.removeEventListener("deviceorientation", R, !0);
71
- }
72
- };
73
- }
74
- const j = A(function({
75
- isOpen: n,
76
- onAllow: r,
77
- onCancel: i
78
- }) {
79
- return n ? /* @__PURE__ */ S.jsx(k, { title: y("Show your position on the map"), acceptText: y("Allow compass access"), rejectText: y("Not now"), onClickAccept: r, onClickReject: i, children: y("To display your current position and orient the map around you, we’ll ask for permission to access your device orientation") }) : null;
80
- });
81
- function Y({
82
- onPositionUpdate: t,
83
- onAllowCompass: n,
84
- onRejectCompass: r,
85
- orientationStorageKey: i = "compass-permission-granted",
86
- requestCompass: s = !0,
87
- requestCompassAllowed: l = !0
88
- }) {
89
- const {
90
- startOrientation: o,
91
- startGeolocation: c,
92
- stopOrientation: u,
93
- stopGeolocation: d
94
- } = H(t), [m, R] = a.useState(!1), [O, p] = a.useState(!1);
95
- a.useEffect(() => (navigator.geolocation.getCurrentPosition(() => {
96
- R(!0), c();
97
- }, (e) => {
98
- I.warn("Geolocation error:", e), R(!1);
99
- }), () => {
100
- u(), d();
101
- }), [c, d, u]);
102
- const w = async () => {
103
- typeof DeviceOrientationEvent < "u" && typeof DeviceOrientationEvent.requestPermission == "function" && await DeviceOrientationEvent.requestPermission() !== "granted" || (localStorage.setItem(i, "true"), o(), p(!1), n == null || n());
104
- }, C = a.useCallback(() => {
105
- localStorage.setItem(i, "false"), p(!1), r == null || r();
106
- }, [r]);
107
- return a.useEffect(() => {
108
- if (!m || !l || typeof navigator > "u" || !x) return;
109
- const e = localStorage.getItem(i);
110
- if (!e || s) {
111
- p(!0);
112
- return;
113
- }
114
- e === "true" && w();
115
- }, [m, s, l, w]), /* @__PURE__ */ S.jsx(j, { isOpen: O, onAllow: w, onCancel: C });
116
- }
117
- function K({
118
- requestCompassAllowed: t
119
- }) {
120
- const [n, r] = a.useState(!1), i = a.useCallback(({
121
- lat: o,
122
- lng: c,
123
- angle: u,
124
- heading: d
125
- }) => {
126
- b.routeStore.selectCurrentPosition(new D(0, 0, 0, u || d, o, c), !1);
127
- }, []), s = a.useCallback(() => {
128
- b.routeStore.requestCompass = void 0, r(!1);
129
- }, [r]), l = a.useCallback(() => {
130
- b.routeStore.requestCompass = void 0, r(!1);
131
- }, [r]);
132
- return G(() => b.uiState.hideCookieConsent, (o) => {
133
- r(o);
134
- }), G(() => b.routeStore.requestCompass, (o) => {
135
- r(o);
136
- }), /* @__PURE__ */ S.jsx(Y, { requestCompass: n, requestCompassAllowed: t, onRejectCompass: s, onAllowCompass: l, orientationStorageKey: T, onPositionUpdate: i });
137
- }
138
- export {
139
- K as default
140
- };
@@ -1,225 +0,0 @@
1
- import { aw as h, j as k, p as d, q as l, h as g } from "./index.js";
2
- import "./jsx-runtime-CoKhM3tL.js";
3
- import { s as o, ao as f, ap as v, aq as D, ar as O } from "./floorplan.ready-BQetaqdP.js";
4
- import "./index-jp-Zhdyp.js";
5
- (function() {
6
- try {
7
- var a = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
8
- a.SENTRY_RELEASE = { id: "3.0.1" };
9
- var e = new a.Error().stack;
10
- e && (a._sentryDebugIds = a._sentryDebugIds || {}, a._sentryDebugIds[e] = "d1196771-e02a-4eec-9256-cbbaec718aea", a._sentryDebugIdIdentifier = "sentry-dbid-d1196771-e02a-4eec-9256-cbbaec718aea");
11
- } catch {
12
- }
13
- })();
14
- function w(a) {
15
- const e = a.viewport.canvasToSvg({
16
- x: 0,
17
- y: 0
18
- }), r = a.viewport.canvasToSvg({
19
- x: a.canvas.clientWidth,
20
- y: 0
21
- }), i = a.viewport.canvasToSvg({
22
- x: 0,
23
- y: a.canvas.clientHeight
24
- }), p = a.viewport.canvasToSvg({
25
- x: a.canvas.clientWidth,
26
- y: a.canvas.clientHeight
27
- }), s = Math.min(e.x, r.x, i.x, p.x), c = Math.max(e.x, r.x, i.x, p.x), u = Math.min(e.y, r.y, i.y, p.y), y = Math.max(e.y, r.y, i.y, p.y);
28
- return {
29
- x: s,
30
- y: u,
31
- width: c - s,
32
- height: y - u,
33
- left: s,
34
- right: c,
35
- top: y,
36
- bottom: u,
37
- center: {
38
- x: (s + c) / 2,
39
- y: (u + y) / 2
40
- }
41
- };
42
- }
43
- function C(a, e) {
44
- const r = w(a);
45
- return e.x >= r.left && e.x <= r.right && e.y >= r.bottom && e.y <= r.top;
46
- }
47
- var t, S, m;
48
- function b(a, e, r, i) {
49
- r && Object.defineProperty(a, e, { enumerable: r.enumerable, configurable: r.configurable, writable: r.writable, value: r.initializer ? r.initializer.call(i) : void 0 });
50
- }
51
- function n(a, e, r, i, p) {
52
- var s = {};
53
- return Object.keys(i).forEach(function(c) {
54
- s[c] = i[c];
55
- }), s.enumerable = !!s.enumerable, s.configurable = !!s.configurable, ("value" in s || s.initializer) && (s.writable = !0), s = r.slice().reverse().reduce(function(c, u) {
56
- return u(a, e, c) || c;
57
- }, s), p && s.initializer !== void 0 && (s.value = s.initializer ? s.initializer.call(p) : void 0, s.initializer = void 0), s.initializer === void 0 ? (Object.defineProperty(a, e, s), null) : s;
58
- }
59
- let P = (t = class {
60
- constructor() {
61
- b(this, "savedKiosk", S, this), b(this, "statusMessages", m, this), this.statusMessageTimer = 0, this.initialPtScale = void 0;
62
- }
63
- get kiosk() {
64
- return o.uiState.kioskData;
65
- }
66
- setKiosk(e) {
67
- o.uiState.setKioskData(e);
68
- }
69
- get renderer() {
70
- return o.rendererService.renderer;
71
- }
72
- getCameraState() {
73
- const e = o.rendererService.getCameraState();
74
- return e ? {
75
- mapInitialPtScale: this.initialPtScale,
76
- mapPtScale: e.ptScale,
77
- mapCenterX: e.center.x,
78
- mapCenterY: e.center.y,
79
- mapRollDegrees: e.roll,
80
- mapPitch: e.pitch
81
- } : {};
82
- }
83
- get hasUnsavedChanges() {
84
- const e = this.savedKiosk, r = h(this.kiosk);
85
- if (!r || !e)
86
- return !!r != !!e;
87
- const i = Object.keys(e), p = Object.keys(r);
88
- if (i.length !== p.length)
89
- return !0;
90
- for (const s of i)
91
- if (!(s in r) || e[s] !== r[s])
92
- return !0;
93
- return !1;
94
- }
95
- addStatusMessage(e) {
96
- this.statusMessages = [{
97
- ...e,
98
- id: Date.now()
99
- }], this.startCleanupMessages();
100
- }
101
- clearStatusMessages() {
102
- this.statusMessages = [];
103
- }
104
- startCleanupMessages() {
105
- clearTimeout(this.statusMessageTimer), this.statusMessageTimer = window.setTimeout(() => this.clearStatusMessages(), 1e3);
106
- }
107
- async resetCamera() {
108
- const {
109
- z: e,
110
- mapRollDegrees: r,
111
- mapInitialPtScale: i,
112
- mapPtScale: p,
113
- mapCenterX: s,
114
- mapCenterY: c
115
- } = this.kiosk || {};
116
- await this.renderer.controls.resetCamera({
117
- pan: !0,
118
- zoom: !0,
119
- roll: !0,
120
- pitch: !0
121
- }, !0), k(() => {
122
- Number.isFinite(i) && Number.isFinite(p) && p > 0 && this.renderer.controls.zoomBy(i / p, !0), Number.isFinite(s) && Number.isFinite(c) && this.renderer.controls.panTo(s, c, !0), Number.isFinite(r) && this.renderer.controls.rollTo(r, !0), e && o.fp.activateFloor({
123
- name: e
124
- });
125
- });
126
- }
127
- restoreData() {
128
- const e = f();
129
- return e && (this.setKiosk(e), this.savedKiosk = e, o.uiState.kiosk = !0, this.resetCamera()), e;
130
- }
131
- handleSetupReady() {
132
- this.restoreData(), o.uiState.kiosk = !0, o.uiState.hideFreeOrDemo = !0, o.uiState.setForceDimm(!0), o.searchStore.setSearchText(""), o.searchStore.setFocused(!1);
133
- }
134
- handleClose() {
135
- this.setKiosk(null), o.uiState.setForceDimm(!1), o.uiState.enableSetKioskMode(!1), o.searchStore.closeSearch(), this.resetCamera();
136
- }
137
- handleDelete() {
138
- v(), this.setKiosk(null), o.uiState.resetMapSettings(), o.uiState.resetUIScale(), this.resetCamera(), this.addStatusMessage({
139
- variant: "success",
140
- title: "Deleted"
141
- });
142
- }
143
- handleSave() {
144
- const e = h(this.kiosk), r = this.getCameraState(), i = {
145
- ...e,
146
- ...r
147
- };
148
- if (!C(this.renderer, i)) {
149
- this.addStatusMessage({
150
- variant: "error",
151
- title: "Kiosk not visible"
152
- });
153
- return;
154
- }
155
- this.setKiosk(i), D(i), o.uiState.setUIScale(i.uiScale, !0), this.addStatusMessage({
156
- variant: "success",
157
- title: "Saved"
158
- }), this.savedKiosk = i;
159
- }
160
- delayChange(e) {
161
- requestAnimationFrame(() => e == null ? void 0 : e());
162
- }
163
- handleChange(e) {
164
- const r = h(this.kiosk);
165
- r && (Number.isFinite(e.angle) && this.setKiosk({
166
- ...r,
167
- heading: e.angle
168
- }), Number.isFinite(e.scale) && (this.setKiosk({
169
- ...r,
170
- uiScale: e.scale
171
- }), this.delayChange(() => o.uiState.setUIScale(e.scale, !1))), Number.isFinite(e.percent) && this.setKiosk({
172
- ...r,
173
- iconSizePercent: e.percent
174
- }));
175
- }
176
- setInitialPtScale(e) {
177
- if (this.initialPtScale)
178
- return;
179
- this.initialPtScale = e;
180
- const r = h(this.kiosk);
181
- r && this.setKiosk({
182
- ...r,
183
- mapInitialPtScale: e
184
- });
185
- }
186
- handleClick({
187
- point: e
188
- }) {
189
- var c;
190
- const r = h(this.kiosk), i = o.fp.getFloors(), p = O() ? (c = i.find((u) => u.active)) == null ? void 0 : c.name : null, s = o.uiState.uiScale;
191
- this.setKiosk({
192
- ...r,
193
- x: e.x,
194
- y: e.y,
195
- z: p,
196
- uiScale: (r == null ? void 0 : r.uiScale) || s,
197
- heading: (r == null ? void 0 : r.heading) || 0,
198
- iconSizePercent: (r == null ? void 0 : r.iconSizePercent) || 100,
199
- ...this.getCameraState()
200
- });
201
- }
202
- handleNavigationChange() {
203
- const e = h(this.kiosk);
204
- e && this.setKiosk({
205
- ...e,
206
- ...this.getCameraState()
207
- });
208
- }
209
- }, n(t.prototype, "kiosk", [d], Object.getOwnPropertyDescriptor(t.prototype, "kiosk"), t.prototype), n(t.prototype, "setKiosk", [l], Object.getOwnPropertyDescriptor(t.prototype, "setKiosk"), t.prototype), n(t.prototype, "renderer", [d], Object.getOwnPropertyDescriptor(t.prototype, "renderer"), t.prototype), S = n(t.prototype, "savedKiosk", [g], {
210
- configurable: !0,
211
- enumerable: !0,
212
- writable: !0,
213
- initializer: null
214
- }), n(t.prototype, "hasUnsavedChanges", [d], Object.getOwnPropertyDescriptor(t.prototype, "hasUnsavedChanges"), t.prototype), m = n(t.prototype, "statusMessages", [g], {
215
- configurable: !0,
216
- enumerable: !0,
217
- writable: !0,
218
- initializer: function() {
219
- return [];
220
- }
221
- }), n(t.prototype, "addStatusMessage", [l], Object.getOwnPropertyDescriptor(t.prototype, "addStatusMessage"), t.prototype), n(t.prototype, "clearStatusMessages", [l], Object.getOwnPropertyDescriptor(t.prototype, "clearStatusMessages"), t.prototype), n(t.prototype, "startCleanupMessages", [l], Object.getOwnPropertyDescriptor(t.prototype, "startCleanupMessages"), t.prototype), n(t.prototype, "resetCamera", [l], Object.getOwnPropertyDescriptor(t.prototype, "resetCamera"), t.prototype), n(t.prototype, "restoreData", [l], Object.getOwnPropertyDescriptor(t.prototype, "restoreData"), t.prototype), n(t.prototype, "handleSetupReady", [l], Object.getOwnPropertyDescriptor(t.prototype, "handleSetupReady"), t.prototype), n(t.prototype, "handleClose", [l], Object.getOwnPropertyDescriptor(t.prototype, "handleClose"), t.prototype), n(t.prototype, "handleDelete", [l], Object.getOwnPropertyDescriptor(t.prototype, "handleDelete"), t.prototype), n(t.prototype, "handleSave", [l], Object.getOwnPropertyDescriptor(t.prototype, "handleSave"), t.prototype), n(t.prototype, "handleChange", [l], Object.getOwnPropertyDescriptor(t.prototype, "handleChange"), t.prototype), n(t.prototype, "setInitialPtScale", [l], Object.getOwnPropertyDescriptor(t.prototype, "setInitialPtScale"), t.prototype), n(t.prototype, "handleClick", [l], Object.getOwnPropertyDescriptor(t.prototype, "handleClick"), t.prototype), n(t.prototype, "handleNavigationChange", [l], Object.getOwnPropertyDescriptor(t.prototype, "handleNavigationChange"), t.prototype), t);
222
- const F = new P();
223
- export {
224
- F as k
225
- };
@@ -1,118 +0,0 @@
1
- import { j as B } from "./jsx-runtime-CoKhM3tL.js";
2
- import { y as w } from "./index-jp-Zhdyp.js";
3
- import { p, m as z, s as P, a as f, l as E, b as k, c as b, d as C, u as T, e as D, f as M, g as F, h as I, i as _ } from "./data-CIAMSGsv.js";
4
- import { u as j, s as e, a as t, R as x, d as N, e as n, f as O, c as A } from "./floorplan.ready-BQetaqdP.js";
5
- import { r as S } from "./index.js";
6
- (function() {
7
- try {
8
- var i = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
9
- i.SENTRY_RELEASE = { id: "3.0.1" };
10
- var r = new i.Error().stack;
11
- r && (i._sentryDebugIds = i._sentryDebugIds || {}, i._sentryDebugIds[r] = "61dae79b-0685-4b92-a5a5-6d9d61757816", i._sentryDebugIdIdentifier = "sentry-dbid-61dae79b-0685-4b92-a5a5-6d9d61757816");
12
- } catch {
13
- }
14
- })();
15
- function $() {
16
- const i = S.useRef(null), r = S.useRef(null);
17
- let c = null, d = [];
18
- const u = j(() => ({
19
- get initselected() {
20
- return ![...t.selectedBooths].filter((o) => o.rect);
21
- },
22
- get actualCurrentPosition() {
23
- const o = e.routeStore.currentPosition;
24
- return !(o != null && o.z) || e.layerStore.visible.indexOf(e.layerStore.findLayer(o.z)) > -1 ? o : null;
25
- },
26
- get style() {
27
- return {
28
- left: 0
29
- };
30
- }
31
- }));
32
- return S.useEffect(() => {
33
- if (!r.current) {
34
- var {
35
- cx: o,
36
- cy: l
37
- } = p.viewbox;
38
- r.current = new z.Map({
39
- container: i.current,
40
- style: `mapbox://styles/mapbox/${p.style}`,
41
- center: [o, l],
42
- zoom: 15.5,
43
- bearing: p.initBearing - 30,
44
- pitch: p.initPitch + 30,
45
- maxPitch: 70,
46
- bearingSnap: 0,
47
- accessToken: p.token
48
- }), P(r.current), r.current.on("load", async () => {
49
- var y;
50
- setTimeout(() => f(u.initselected ? x.fromMultiple([...t.selectedBooths].filter((s) => s.rect).map((s) => s.rect)) : N, 15, 4e3), 1500), r.current.setLight({
51
- anchor: "viewport",
52
- color: "white",
53
- intensity: 0
54
- });
55
- const a = await E(e.boothStore.booths);
56
- k(e.boothStore.booths, a), b("yah", (y = e.routeStore.defaultFrom) != null && y.rect ? {
57
- x: e.routeStore.defaultFrom.rect.cx,
58
- y: e.routeStore.defaultFrom.rect.cy
59
- } : null), b("cp", u.actualCurrentPosition), d = C(e.layerStore.layers);
60
- const m = d.filter((s) => s.indexOf("--") === -1);
61
- T(e.routeStore), D(), r.current.on("mouseenter", m, () => r.current.getCanvas().style.cursor = "pointer"), r.current.on("mouseleave", m, () => r.current.getCanvas().style.cursor = ""), r.current.on("click", (s) => {
62
- const h = [[s.point.x - 5, s.point.y - 5], [s.point.x + 5, s.point.y + 5]], v = r.current.queryRenderedFeatures(h, {
63
- layers: d
64
- })[0], L = e.boothStore.booths.find((R) => {
65
- var g;
66
- return R.name === ((g = v == null ? void 0 : v.properties) == null ? void 0 : g.id);
67
- });
68
- e.clickBooth(L);
69
- });
70
- });
71
- }
72
- }), n(() => t.zoomBy, () => {
73
- if (!t.zoomBy || !e.mapboxStore.showMapbox) return;
74
- const o = t.zoomBy;
75
- t.zoomBy = null, r.current.flyTo({
76
- zoom: r.current.getZoom() + (o > 1 ? 0.5 : -0.5),
77
- animate: !0,
78
- duration: 500,
79
- essential: !0
80
- });
81
- }), n(() => [e.layerStore.loaded, e.layerStore.visible, t.selectedRoute], () => {
82
- var o, l, a;
83
- d.forEach((m) => {
84
- const y = m.split("--")[0], s = e.layerStore.layers.find((h) => h.name === y);
85
- (s.visible || r.current.getLayoutProperty(m, "visibility") !== "none") && r.current.setLayoutProperty(m, "visibility", s.visible ? "visible" : "none");
86
- }), M([...t.selectedBooths], e.boothStore.booths), b("yah", (o = e.routeStore.defaultFrom) != null && o.rect && ((a = (l = e.routeStore.defaultFrom) == null ? void 0 : l.layer) != null && a.visible) ? {
87
- x: e.routeStore.defaultFrom.rect.cx,
88
- y: e.routeStore.defaultFrom.rect.cy
89
- } : null), b("cp", u.actualCurrentPosition);
90
- }), n(() => t.hoveredBooths, () => {
91
- c && (clearTimeout(c), c = null), c = setTimeout(() => {
92
- c = null, F([...t.hoveredBooths].filter((o) => {
93
- var l, a;
94
- return (a = (l = o.layer) == null ? void 0 : l.visible) != null ? a : !0;
95
- }), e.boothStore.booths);
96
- }, 50);
97
- }), n(() => [t.selectedBooths, t.listBooths], () => {
98
- var o = [];
99
- t.selectedBooths.size ? o = [...t.selectedBooths] : t.listBooths.size && (t.activeListIndex === 0 || t.list.type === "bookmarks" || t.list.type === "category") && (o = [...t.listBooths]), M(o, e.boothStore.booths);
100
- }), n(() => e.mapboxStore.showMapbox, () => {
101
- I(e.mapboxStore.showMapbox);
102
- }), n(() => t.moveToBooths, () => {
103
- if (!t.moveToBooths || !e.mapboxStore.showMapbox) return;
104
- const o = t.moveToBooths.filter((a) => a.rect).map((a) => a.rect), l = x.fromMultiple(o);
105
- o.length && f(l), t.moveToBooths = null;
106
- }), n(() => t.moveToRect, () => {
107
- !t.moveToRect || !e.mapboxStore.showMapbox || (f(t.moveToRect, 15), t.moveToRect = null);
108
- }), n(() => t.moveToLocation, () => {
109
- !t.moveToLocation || !e.mapboxStore.showMapbox || _();
110
- }), n(() => t.centerMap, () => {
111
- !t.centerMap || !e.mapboxStore.showMapbox || (f(x.fromMultiple(O.booths.map((o) => o.rect)), 15), t.centerMap = !1);
112
- }), n(() => e.routeStore.routeLines, () => T(e.routeStore)), n(() => u.actualCurrentPosition, () => b("cp", u.actualCurrentPosition)), A(() => /* @__PURE__ */ B.jsx("div", { style: u.style, className: w("map-container", {
113
- hidden: !e.mapboxStore.showMapbox
114
- }), children: /* @__PURE__ */ B.jsx("div", { ref: i, className: w("map-wrapper", "mapboxgl-map") }) }));
115
- }
116
- export {
117
- $ as default
118
- };