@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
@@ -0,0 +1,33 @@
1
+ (function() {
2
+ try {
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.0.3" };
5
+ var t = new e.Error().stack;
6
+ t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "8cb645f3-81de-4ea6-8175-6fcb76e185a9", e._sentryDebugIdIdentifier = "sentry-dbid-8cb645f3-81de-4ea6-8175-6fcb76e185a9");
7
+ } catch {}
8
+ })();
9
+ import { r as e } from "./chunk-DFRW9JAK.js";
10
+ import { t } from "./jsx-runtime-EyUcoQPo.js";
11
+ import { t as n } from "./settings-Dbk4UG1-.js";
12
+ import { t as r } from "./add-debug-secret-listener-CXd4jWZG.js";
13
+ //#region ../debug/src/lib/ui/render-debug-ui.tsx
14
+ var i = t(), a = !1;
15
+ function o() {
16
+ if (a) return;
17
+ a = !0;
18
+ let t = n("Show Debug Button Overlay"), o = async (n) => {
19
+ let { DebugUi: r } = await import("./debug-ui-T7mEy9PT.js"), { createRoot: a } = await import("./client-B-AFqibD.js").then((t) => /* @__PURE__ */ e(t.default, 1)), o = document.createElement("div");
20
+ document.body.appendChild(o), a(o).render(/* @__PURE__ */ (0, i.jsx)(r, {
21
+ useDebugButtonState: t.useState,
22
+ open: n
23
+ }));
24
+ };
25
+ if (t.get()) o(!1);
26
+ else {
27
+ let e = r(() => {
28
+ e(), t.set(!0), o(!0);
29
+ });
30
+ }
31
+ }
32
+ //#endregion
33
+ export { o as renderDebugUi };
@@ -1 +1 @@
1
- import{jsx as e,jsxs as g}from"react/jsx-runtime";import{observer as z}from"mobx-react-lite";import r,{Suspense as a,useEffect as E,useState as M}from"react";import w from"classnames";import t,{layersStore as d,uiState as o}from"../store";import f from"../tools/settings";import{isWebGlSupported as L}from"../utils";import R from"../utils/is-debug";import O from"../utils/is-iframe";import G from"./Controls";import D from"./LevelSelector";import T from"./LargeMessage";import"../styles/main.scss";import"./Layout.scss";import A from"./LogoOverlay";import B from"./SearchBox";import j from"./SearchButtons/SearchButtons";import F from"./MobileToggleButton";import{CategoryFilterModal as P}from"./CategoryFilterModal";import I from"./SessionsFiltersModal";import V from"./SpeakersFiltersModal";import $ from"./Map/Map";import{MapLoader as H}from"./Mapbox/MapLoader";import K from"./OverlayContainer";import _ from"./Share";import N from"./Ws";import{LayersMode as y}from"../store/LayerStore";import U from"./LayersLoading";import{fpGeo as W}from"./Mapbox/utils/fpGeo";import{checkUserIsGDPR as X,GaEventActions as n,hasUserConsent as q,sendEventToGa as l,setConsentSettings as S,setCookieConsent as C}from"../tools/gtag";import Y from"./HeatmapLegend";import{useReaction as m}from"../utils/mobx";import J from"../tools/track-event";import Q from"./GlobalErrorMessage";const Z=r.lazy(()=>import("./Demo")),ee=r.lazy(()=>import("./Free")),oe=r.lazy(()=>import("./Debug")),te=r.lazy(()=>import("./Mapbox/Mapbox")),ie=r.lazy(()=>import("./Threejs/ThreeComponent")),re=r.lazy(()=>import("./Modal")),ae=r.lazy(()=>import("./CookieConsent")),le=r.lazy(()=>import("./GpsLoader")),se=r.lazy(()=>import("./Kiosk/SetKioskMode")),ne=r.lazy(()=>import("./Kiosk/ShowKiosk"));export default z(function({offHistory:b,allowConsent:p}){const[u,c]=M(!1);let s=null;o.bannerType==="demo"?s=e(Z,{}):o.bannerType==="free"&&(s=e(ee,{}));const v=()=>{C(!0),S(),t.uiState.hideCookieConsent=!0},x=()=>{C(!1),S(),t.uiState.hideCookieConsent=!0};E(()=>{async function i(){const k=await X();c(!!(k||k===null))}q(p)?c(!0):i()},[]),m(()=>o.selectedExhibitor,i=>{t.heatmapStore.forceTrack?(l(t.heatmapStore.forceTrack.action,t.heatmapStore.forceTrack.label),t.heatmapStore.forceTrack=null):i&&(J("exview",i.id),l(n.ViewExhibitor,i.name))}),m(()=>o.selectedBooth,i=>i?.name&&l(n.ViewBooth,i.name)),m(()=>o.selectedCategory,i=>i?.name&&l(n.ViewCategory,i?.name)),m(()=>o.selectedEventItem,i=>i?.name&&l(n.ViewExhibitor,i.name));const h=!o.hideCookieConsent&&!o.kiosk&&u&&p===void 0;return e("div",{id:"efp-layout",className:w("layout",{"efp-kiosk":o.kiosk,"efp-kiosk-route-active":o.kiosk&&o.selectedRoute?.from&&o.selectedRoute?.to,"efp-layers-mode":t.layerStore.mode,"efp-ws-mode":o.wsShown,"efp-no-overlay":o.noOverlay}),dir:o.rtl?"rtl":"ltr",style:{"--ui-scale":o.uiScale.toString()},children:g("div",{className:`layout__fixed expo-${f.EXPO} overlay-${t.uiState.overlayPosition}`,children:[(d.mode===y.Radio||d.mode===y.CheckBox)&&!o.floorsControlHidden&&t.initialized&&e(D,{}),!o.noOverlay&&t.initialized&&e(K,{isGDPR:u,allowConsent:p}),t.initialized&&e(A,{}),!o.noOverlay&&t.initialized&&e(B,{}),!o.noOverlay&&t.initialized&&e(j,{}),!o.noOverlay&&t.initialized&&e(F,{}),!o.mapControlsHidden&&t.initialized&&e(G,{}),!o.hideHeaderLogo&&t.initialized&&e(N,{}),t.routeStore.gpsEnabled&&e(le,{requestCompassAllowed:!h}),L&&e($,{}),t.mapboxStore.mapBoxActivated&&t.mapboxStore.mapBoxEnabled&&e(a,{fallback:e(H,{}),children:W?.properties?.mode==="threejs"?e(ie,{isMapbox:t.mapboxStore.isMapbox,expo:f.EXPO}):e(te,{})}),s&&!o.hideFreeOrDemo&&!o.heatmap?e(a,{fallback:null,children:s}):null,h&&e(a,{fallback:null,children:e(ae,{link:"https://expofp.com/pages/viewer-cookie-consent",onClickAccept:v,onClickReject:x})}),R?e(a,{fallback:null,children:e(oe,{})}):null,O&&e(T,{}),o.modalActive.share?e(a,{fallback:null,children:e(re,{type:"share",open:o.modalActive.share,onClickClose:()=>t.toggleModal("share"),children:e(_,{title:o.selectedExhibitor?.name||o.selectedEventItem?.name||"",url:b?`${window.location.origin}?${encodeURI(o.selectedExhibitor?.slug||o.selectedEventItem?.slug)}`:window.location.href})})}):null,o.heatmap||o.heatmapYah?e(Y,{style:{left:`calc(50% + ${t.uiState.mapVisibleStart/2}px)`},className:o.responsiveClass,max:t.heatmapStore.minAndMaxClicks.max,min:t.heatmapStore.minAndMaxClicks.min,colors:f.heatmapColors}):null,e(U,{active:!d.layersLoaded}),e("div",{id:"fps"}),t.initialized&&e(P,{}),t.initialized&&e(I,{store:t.sessionsFilterStore}),t.initialized&&e(V,{store:t.speakerFilterStore}),e(Q,{}),t.initialized&&o.setKioskModeEnabled&&e(a,{fallback:null,children:e(se,{})}),t.initialized&&!o.setKioskModeEnabled&&e(a,{fallback:null,children:e(ne,{})})]})})});
1
+ import{jsx as e,jsxs as g}from"react/jsx-runtime";import{observer as z}from"mobx-react-lite";import r,{Suspense as a,useEffect as E,useState as M}from"react";import w from"classnames";import t,{layersStore as d,uiState as o}from"../store";import f from"../tools/settings";import{isWebGlSupported as L}from"../utils";import R from"../utils/is-debug";import O from"../utils/is-iframe";import G from"./Controls";import B from"./LevelSelector";import D from"./LargeMessage";import"../styles/main.scss";import"./Layout.scss";import T from"./LogoOverlay";import A from"./SearchBox";import j from"./SearchButtons/SearchButtons";import F from"./MobileToggleButton";import{CategoryFilterModal as P}from"./CategoryFilterModal";import I from"./SessionsFiltersModal";import V from"./SpeakersFiltersModal";import $ from"./Map/Map";import{MapLoader as H}from"./Mapbox/MapLoader";import K from"./OverlayContainer";import _ from"./Share";import N from"./Ws";import{LayersMode as y}from"../store/LayerStore";import U from"./LayersLoading";import{fpGeo as W}from"./Mapbox/utils/fpGeo";import{checkUserIsGDPR as X,GaEventActions as n,hasUserConsent as q,sendEventToGa as l,setConsentSettings as S,setCookieConsent as C}from"../tools/gtag";import Y from"./HeatmapLegend";import{useReaction as m}from"../utils/mobx";import J from"../tools/track-event";import Q from"./GlobalErrorMessage";const Z=r.lazy(()=>import("./Demo")),ee=r.lazy(()=>import("./Free")),oe=r.lazy(()=>import("./Debug")),te=r.lazy(()=>import("./Mapbox/Mapbox")),ie=r.lazy(()=>import("./Threejs/ThreeComponent")),re=r.lazy(()=>import("./Modal")),ae=r.lazy(()=>import("./CookieConsent")),le=r.lazy(()=>import("./GpsLoader")),se=r.lazy(()=>import("./Kiosk/SetKioskMode")),ne=r.lazy(()=>import("./Kiosk/ShowKiosk"));export default z(function({offHistory:b,allowConsent:p}){const[u,c]=M(!1);let s=null;o.bannerType==="demo"?s=e(Z,{}):o.bannerType==="free"&&(s=e(ee,{}));const v=()=>{C(!0),S(),t.uiState.hideCookieConsent=!0},x=()=>{C(!1),S(),t.uiState.hideCookieConsent=!0};E(()=>{async function i(){const k=await X();c(!!(k||k===null))}q(p)?c(!0):i()},[]),m(()=>o.selectedExhibitor,i=>{t.heatmapStore.forceTrack?(l(t.heatmapStore.forceTrack.action,t.heatmapStore.forceTrack.label),t.heatmapStore.forceTrack=null):i&&(J("exview",i.id),l(n.ViewExhibitor,i.name))}),m(()=>o.selectedBooth,i=>i?.name&&l(n.ViewBooth,i.name)),m(()=>o.selectedCategory,i=>i?.name&&l(n.ViewCategory,i?.name)),m(()=>o.selectedEventItem,i=>i?.name&&l(n.ViewExhibitor,i.name));const h=!o.hideCookieConsent&&!o.kiosk&&u&&p===void 0;return e("div",{id:"efp-layout",className:w("layout",{"efp-kiosk":o.kiosk,"efp-kiosk-route-active":o.kiosk&&o.selectedRoute?.from&&o.selectedRoute?.to,"efp-layers-mode":t.layerStore.mode,"efp-ws-mode":o.wsShown,"efp-no-overlay":o.noOverlay}),dir:o.rtl?"rtl":"ltr",style:{"--ui-scale":o.uiScale.toString()},children:g("div",{className:`layout__fixed expo-${f.EXPO} overlay-${t.uiState.overlayPosition}`,children:[(d.mode===y.Radio||d.mode===y.CheckBox)&&!o.floorsControlHidden&&t.initialized&&e(B,{}),!o.noOverlay&&t.initialized&&e(K,{isGDPR:u,allowConsent:p}),t.initialized&&e(T,{}),!o.noOverlay&&t.initialized&&e(A,{}),!o.noOverlay&&t.initialized&&e(j,{}),!o.noOverlay&&t.initialized&&e(F,{}),!o.mapControlsHidden&&t.initialized&&e(G,{}),!o.hideHeaderLogo&&t.initialized&&e(N,{}),t.routeStore.gpsEnabled&&e(le,{requestCompassAllowed:!h}),L&&e($,{}),t.mapboxStore.mapBoxActivated&&t.mapboxStore.mapBoxEnabled&&e(a,{fallback:e(H,{}),children:W?.properties?.mode==="threejs"?e(ie,{isMapbox:t.mapboxStore.isMapbox,expo:f.EXPO}):e(te,{})}),s&&!o.hideFreeOrDemo&&!o.heatmap?e(a,{fallback:null,children:s}):null,h&&e(a,{fallback:null,children:e(ae,{link:"https://expofp.com/pages/viewer-cookie-consent",onClickAccept:v,onClickReject:x})}),R?e(a,{fallback:null,children:e(oe,{})}):null,O&&e(D,{}),o.modalActive.share?e(a,{fallback:null,children:e(re,{type:"share",open:o.modalActive.share,onClickClose:()=>t.toggleModal("share"),children:e(_,{title:o.selectedExhibitor?.name||o.selectedEventItem?.name||"",url:b?`${window.location.origin}?${encodeURI(o.selectedExhibitor?.slug||o.selectedEventItem?.slug)}`:window.location.href})})}):null,o.heatmap||o.heatmapYah?e(Y,{style:{left:`calc(50% + ${t.uiState.mapVisibleStart/2}px)`},className:o.responsiveClass,max:t.heatmapStore.minAndMaxClicks.max,min:t.heatmapStore.minAndMaxClicks.min,colors:f.heatmapColors}):null,e(U,{active:!d.layersLoaded}),e("div",{id:"fps"}),t.initialized&&e(P,{}),t.initialized&&e(I,{store:t.sessionsFilterStore}),t.initialized&&e(V,{store:t.speakerFilterStore}),e(Q,{}),t.initialized&&o.setKioskModeEnabled&&e(a,{fallback:null,children:e(se,{})}),t.initialized&&!o.setKioskModeEnabled&&e(a,{fallback:null,children:e(ne,{})})]})})});
@@ -1,7 +1,7 @@
1
- import{useCallback as x,useEffect as M,useMemo as _,useRef as v}from"react";import{BUILD_ROUTE_DOTS as U,BUILD_ROUTE_LINES as $}from"./trafficLayers";import{createCircleCanvas as S,getBounds as I}from"../../../renderer/engine-core/canvases";import{UpdateQueue as A}from"./UpdateQueue";const E=49,C=`hsl(257, 76%, ${E}%)`,K=`hsl(339.903, 82%, ${E}%)`,T=`hsl(257, 76%, ${Math.round(E*1.82)}%)`,O=4,H=O,R="U",D="R",b="S",N="P";class Y{_state=[[]];index=0;pointHashSet=new Set;locked=!1;storageKey="expofp_build_route_state";_selected=0;get points(){return this._state[this.index]}set points(t){this._state.push(t),this.setIndex(),this.save()}setIndex(){this.index=Math.max(this._state.length-1,0)}genPointHash(t){return`${t.x},${t.y}`}add(t){const a=this.genPointHash(t);this.pointHashSet.has(a)||(this.pointHashSet.add(a),this.points=[...this.points,t])}undo(){this.index&&(this._state.pop(),this.setIndex(),this.save(),this.select(this.points.length-1))}execute(t){try{if(this.locked)return;this.locked=!0,t()}finally{requestAnimationFrame(()=>{this.locked=!1})}}log(t,a=12){console.log(`%c${t}`,`color: black; font-size: ${a}px; background: LemonChiffon;`)}instruct(){this.log(`How to Build a Route:
1
+ import{useCallback as x,useEffect as M,useMemo as _,useRef as P}from"react";import{BUILD_ROUTE_DOTS as U,BUILD_ROUTE_LINES as $}from"./trafficLayers";import{createCircleCanvas as I,getBounds as S}from"../../../renderer/engine-core/canvases";import{UpdateQueue as A}from"./UpdateQueue";const v=49,C=`hsl(257, 76%, ${v}%)`,K=`hsl(339.903, 82%, ${v}%)`,T=`hsl(257, 76%, ${Math.round(v*1.82)}%)`,O=4,H=O,R="U",D="R",b="S",N="P";class Y{_state=[[]];index=0;pointHashSet=new Set;locked=!1;storageKey="expofp_build_route_state";_selected=0;get points(){return this._state[this.index]}set points(t){this._state.push(t),this.setIndex(),this.save()}setIndex(){this.index=Math.max(this._state.length-1,0)}genPointHash(t){return`${t.x},${t.y}`}add(t){const a=this.genPointHash(t);this.pointHashSet.has(a)||(this.pointHashSet.add(a),this.points=[...this.points,t])}undo(){this.index&&(this._state.pop(),this.setIndex(),this.save(),this.select(this.points.length-1))}execute(t){try{if(this.locked)return;this.locked=!0,t()}finally{requestAnimationFrame(()=>{this.locked=!1})}}log(t,a=12){console.log(`%c${t}`,`color: black; font-size: ${a}px; background: LemonChiffon;`)}instruct(){this.log(`How to Build a Route:
2
2
  Add Point: Click on the map.
3
3
  Apply Smoothing: Press ${D}.
4
4
  Apply Simplification: Press ${b}.
5
5
  Undo: Press ${R}.
6
6
  Enable/Disable Preview: Press ${N}.
7
- `,16)}applyChaikinSmoothing(t,a,d){let c=[];if(d>=1&&t.length>=2){c=[t[0]];for(let h=1;h<t.length;h++){const s=t[h-1],u=t[h];for(let o=1;o<=d;o++){const n=o/(d+1);c.push({x:s.x+(u.x-s.x)*n,y:s.y+(u.y-s.y)*n})}c.push(u)}}else c=t.slice();for(let h=0;h<a&&!(c.length<2);h++){const s=[{...c[0]}];for(let u=1;u<c.length;u++){const o=c[u-1],n=c[u];s.push({x:.75*o.x+.25*n.x,y:.75*o.y+.25*n.y}),s.push({x:.25*o.x+.75*n.x,y:.25*o.y+.75*n.y})}s.push({...c[c.length-1]}),c=s}return c}applySmoothing(){this.points.length<3||(this.points=this.applyChaikinSmoothing(this.points,1,0),this.select(this.points.length-1))}save(){try{this.points.length?sessionStorage.setItem(this.storageKey,JSON.stringify(this.points)):sessionStorage.removeItem(this.storageKey)}catch(t){console.warn(t)}}restore(){try{const t=sessionStorage.getItem(this.storageKey);if(!t)return;const a=JSON.parse(t);if(!Array.isArray(a))return;a.forEach(d=>this.add(d)),this.select(this.points.length-1)}catch(t){console.warn(t)}}topologyPreservingSimplify(t,a){if(t.length<=2)return t.map(o=>({...o}));const d=(o,n,y)=>{const g=o.x,f=o.y,e=n.x,i=n.y,r=y.x,l=y.y,m=Math.abs((l-i)*g-(r-e)*f+r*i-l*e),p=Math.sqrt((l-i)**2+(r-e)**2);return m/(p||1e-10)},c=(o,n,y,g)=>{const f=(e,i,r)=>(r.y-e.y)*(i.x-e.x)-(i.y-e.y)*(r.x-e.x);return f(o,y,g)*f(n,y,g)<0&&f(y,o,n)*f(g,o,n)<0},h=new Array(t.length).fill(!1);h[0]=h[h.length-1]=!0;const s=[],u=(o,n)=>{if(n<=o+1)return;const y=t[o],g=t[n];let f=0,e=0;for(let i=o+1;i<n;i++){const r=d(t[i],y,g);r>f&&(f=r,e=i)}if(f>a){const i=t[e];let r=!0;for(let l=0;l<s.length-1;l++)if(c(s[l],s[l+1],y,i)||c(s[l],s[l+1],i,g)){r=!1;break}r&&(h[e]=!0,u(o,e),u(e,n))}};return u(0,t.length-1),t.filter((o,n)=>h[n])}applySimplification(){this.points=this.topologyPreservingSimplify(this.points,.5),this.select(this.points.length-1)}get selected(){return this._selected}select(t){this._selected=Math.max(0,Math.min(t,this.points.length-1))}}export function useBuildRoute({enabled:w,rendererService:t}){const a=v(!1),d=v(),c=_(()=>S(O,C),[]),h=_(()=>S(O,K),[]),s=_(()=>new Y,[]),u=v(new A),o=_(()=>{if(!t.scene)return{};const e=t.scene.rootLayer.children,i=e.find(l=>l.name===$),r=e.find(l=>l.name===U);return{linesLayer:i,pointsLayer:r}},[t.scene]),n=x(()=>{if(!t?.renderer||!o||!c||!h)return;const{linesLayer:e,pointsLayer:i}=o;if(!e||!i)return;const r=s.points,l=a.current;l?i.children.length=0:i.children=r.map(({x:p,y:L},k)=>{const P=k==s.selected?h:c;return{source:P,bounds:I(p,L,P.width,P.height,d.current)}});const m=[];for(let p=1;p<r.length;p++){const L=r[p-1],k=r[p];m.push({points:[L,k],color:l?C:T,width:H})}m.length?e.children=m:e.children.length=0,u.current.add(()=>t.update(i,e)),s.instruct(),s.log(JSON.stringify(s.points))},[t,s,o,c,h]),y=x(e=>{const i=e.key.toUpperCase();s.execute(()=>{switch(i){case R:e.preventDefault(),s.undo(),a.current=!1,n();break;case D:e.preventDefault(),s.applySmoothing(),a.current=!1,n();break;case b:e.preventDefault(),s.applySimplification(),a.current=!1,n();break;case N:e.preventDefault(),a.current=!a.current,n();break}})},[s,n]),g=x(e=>{if(!t?.renderer||!o)return;const{pointsLayer:i}=o;i&&(d.current=e,s.execute(()=>{const r=i.children,l=[];for(let m=0;m<r.length;m++){const p=r[m];p.bounds=I(p.bounds.center.x,p.bounds.center.y,p.source.width,p.source.height,d.current),l.push(p)}u.current.add(()=>t.update(...l))}))},[t,o,s]),f=x(e=>{s.execute(()=>{s.add({x:e.point.x,y:e.point.y}),s.select(s.points.length-1),n()})},[s,n]);M(()=>{const e=t.renderer;if(!(!w||!e))return d.current=t.getCameraState().ptScale||window.devicePixelRatio,s.execute(()=>{s.restore(),n()}),e.events.addEventListener("pointer:click",f),e.events.addEventListener("viewport:ptscale",g),window.addEventListener("keyup",y),()=>{window.removeEventListener("keyup",y),e.events.removeEventListener("pointer:click",f),e.events.removeEventListener("viewport:ptscale",g),u.current.destroy()}},[w,t,s,n,f,g,y])}
7
+ `,16)}applyChaikinSmoothing(t,a,d){let c=[];if(d>=1&&t.length>=2){c=[t[0]];for(let h=1;h<t.length;h++){const s=t[h-1],u=t[h];for(let o=1;o<=d;o++){const n=o/(d+1);c.push({x:s.x+(u.x-s.x)*n,y:s.y+(u.y-s.y)*n})}c.push(u)}}else c=t.slice();for(let h=0;h<a&&!(c.length<2);h++){const s=[{...c[0]}];for(let u=1;u<c.length;u++){const o=c[u-1],n=c[u];s.push({x:.75*o.x+.25*n.x,y:.75*o.y+.25*n.y}),s.push({x:.25*o.x+.75*n.x,y:.25*o.y+.75*n.y})}s.push({...c[c.length-1]}),c=s}return c}applySmoothing(){this.points.length<3||(this.points=this.applyChaikinSmoothing(this.points,1,0),this.select(this.points.length-1))}save(){try{this.points.length?sessionStorage.setItem(this.storageKey,JSON.stringify(this.points)):sessionStorage.removeItem(this.storageKey)}catch(t){console.warn(t)}}restore(){try{const t=sessionStorage.getItem(this.storageKey);if(!t)return;const a=JSON.parse(t);if(!Array.isArray(a))return;a.forEach(d=>this.add(d)),this.select(this.points.length-1)}catch(t){console.warn(t)}}topologyPreservingSimplify(t,a){if(t.length<=2)return t.map(o=>({...o}));const d=(o,n,y)=>{const g=o.x,f=o.y,e=n.x,i=n.y,r=y.x,l=y.y,m=Math.abs((l-i)*g-(r-e)*f+r*i-l*e),p=Math.sqrt((l-i)**2+(r-e)**2);return m/(p||1e-10)},c=(o,n,y,g)=>{const f=(e,i,r)=>(r.y-e.y)*(i.x-e.x)-(i.y-e.y)*(r.x-e.x);return f(o,y,g)*f(n,y,g)<0&&f(y,o,n)*f(g,o,n)<0},h=new Array(t.length).fill(!1);h[0]=h[h.length-1]=!0;const s=[],u=(o,n)=>{if(n<=o+1)return;const y=t[o],g=t[n];let f=0,e=0;for(let i=o+1;i<n;i++){const r=d(t[i],y,g);r>f&&(f=r,e=i)}if(f>a){const i=t[e];let r=!0;for(let l=0;l<s.length-1;l++)if(c(s[l],s[l+1],y,i)||c(s[l],s[l+1],i,g)){r=!1;break}r&&(h[e]=!0,u(o,e),u(e,n))}};return u(0,t.length-1),t.filter((o,n)=>h[n])}applySimplification(){this.points=this.topologyPreservingSimplify(this.points,.5),this.select(this.points.length-1)}get selected(){return this._selected}select(t){this._selected=Math.max(0,Math.min(t,this.points.length-1))}}export function useBuildRoute({enabled:L,rendererService:t}){const a=P(!1),d=P(),c=_(()=>I(O,C),[]),h=_(()=>I(O,K),[]),s=_(()=>new Y,[]),u=P(new A),o=_(()=>{if(!t.scene)return{};const e=t.scene.rootLayer.children,i=e.find(l=>l.name===$),r=e.find(l=>l.name===U);return{linesLayer:i,pointsLayer:r}},[t.scene]),n=x(()=>{if(!t?.renderer||!o||!c||!h)return;const{linesLayer:e,pointsLayer:i}=o;if(!e||!i)return;const r=s.points,l=a.current;l?i.children.length=0:i.children=r.map(({x:p,y:w},k)=>{const E=k==s.selected?h:c;return{source:E,bounds:S(p,w,E.width,E.height,d.current)}});const m=[];for(let p=1;p<r.length;p++){const w=r[p-1],k=r[p];m.push({points:[w,k],color:l?C:T,width:H})}m.length?e.children=m:e.children.length=0,u.current.add(()=>t.update(i,e)),s.instruct(),s.log(JSON.stringify(s.points))},[t,s,o,c,h]),y=x(e=>{const i=e.key.toUpperCase();s.execute(()=>{switch(i){case R:e.preventDefault(),s.undo(),a.current=!1,n();break;case D:e.preventDefault(),s.applySmoothing(),a.current=!1,n();break;case b:e.preventDefault(),s.applySimplification(),a.current=!1,n();break;case N:e.preventDefault(),a.current=!a.current,n();break}})},[s,n]),g=x(e=>{if(!t?.renderer||!o)return;const{pointsLayer:i}=o;i&&(d.current=e,s.execute(()=>{const r=i.children,l=[];for(let m=0;m<r.length;m++){const p=r[m];p.bounds=S(p.bounds.center.x,p.bounds.center.y,p.source.width,p.source.height,d.current),l.push(p)}u.current.add(()=>t.update(...l))}))},[t,o,s]),f=x(e=>{s.execute(()=>{s.add({x:e.point.x,y:e.point.y}),s.select(s.points.length-1),n()})},[s,n]);M(()=>{const e=t.renderer;if(!(!L||!e))return d.current=t.scale,s.execute(()=>{s.restore(),n()}),e.events.addEventListener("pointer:click",f),e.events.addEventListener("viewport:ptscale",g),window.addEventListener("keyup",y),()=>{window.removeEventListener("keyup",y),e.events.removeEventListener("pointer:click",f),e.events.removeEventListener("viewport:ptscale",g),u.current.destroy()}},[L,t,s,n,f,g,y])}
@@ -1 +1 @@
1
- import{useEffect as yt,useRef as L}from"react";import{getBounds as k}from"../../../renderer";import{getRouteLayerRegex as pt,getRouteStopLayerRegex as wt,TRAFFIC_VEHICLES as xt}from"./trafficLayers";import{loadImage as Et}from"../../../utils/loadImage";import{createImageCanvas as It}from"../drawing/config/canvases";import{UpdateQueue as Mt}from"./UpdateQueue";import Lt from"../../../tools/base-runtime-url";import{toRadians as bt}from"../../../utils/math";const tt=2,Rt=tt*3.5,G=tt*12,at=G*.7,Ft=8,At="transport_locations",Tt=150,et="#a4aab6",it=1e3,Pt=2e4,ut=500;export function useManageTraffic({permission:e,rendererService:n,dataJsonUrl:c,websocketUrl:a}){const t=L(window.devicePixelRatio),s=L(new Map),o=L(new Map),r=L(),d=L(),f=L(performance.now()),M=L(1),x=L(new Mt),A=L(new Map),I=L(),g=L(it),y=L(new Map),i=L();yt(()=>{async function O(){if(!(!e||!n.scene))try{let h;try{h=await(await fetch(c,{method:"GET",headers:{"Content-Type":"application/json"}})).json()}catch(u){console.warn("useManageTraffic failed to get JSON",u)}if(!h||h?.disabled||h?.error)return;t.current=lt(n.getCameraState().ptScale);const V=new Map(h.routes.map(({id:u,color:m})=>[u,m])),_=n.scene.rootLayer.children,W=new Map;V.forEach(u=>{W.set(u,Ct({radius:Rt,color:u,scale:window.devicePixelRatio}))});const z=pt(),Y=_.filter(u=>z.test(u.name)),B=wt(),U=_.filter(u=>B.test(u.name));h.routes.slice(0,Y.length).forEach(({id:u,color:m,path:T,stops:R,hiddenPoints:p},w)=>{A.current.set(u,T);const E=Y[w];if(E){const S=new Map(p?.map(l=>[ot(l),l])??[]);for(let l=1;l<T.length;l++){const D=T[l-1],H=T[l];S.has(ot(D))||S.has(ot(H))||E.children.push({points:[D,H],color:m,width:tt})}E.children.length&&x.current.add(()=>n.update(E))}const N=U[w];if(N&&R?.length){const S=W.get(m);R.forEach(l=>{N.children.push({source:S,bounds:k(l.x,l.y,S.width,S.height,t.current)})}),N.children.length&&x.current.add(()=>n.update(N))}});const $=_.find(u=>u.name===xt),X=new Map;I.current=u=>{try{t.current=lt(u);const m=[];for(let R=0;R<U.length;R++){const p=U[R].children;for(let w=0;w<p.length;w++){const E=p[w];E.bounds=k(E.bounds.center.x,E.bounds.center.y,E.source.width,E.source.height,t.current,E.bounds.rotation),m.push(E)}}const T=[...s.current.values()];for(let R=0;R<T.length;R++){const p=T[R];p.bounds=k(p.bounds.center.x,p.bounds.center.y,p.source.width,p.source.height,t.current,p.bounds.rotation)}x.current.add(()=>n.update(...m,...T))}catch(m){console.error("ptscale",m)}},n.renderer.events.addEventListener("viewport:ptscale",I.current),V.forEach((u,m)=>{X.set(m,ht({id:m,width:G,height:G,color:u,scale:window.devicePixelRatio}))}),X.set(et,ht({id:"orphan",width:G,height:G,color:et,scale:window.devicePixelRatio}));let j=null;try{const u=await Et(`${Lt}icons/bus-white.svg`);j=It(u,at,at,window.devicePixelRatio)}catch(u){console.error(u)}d.current=u=>{try{const m=JSON.parse(u.data);if(m.type!==At)return;const T=u.timeStamp||performance.now();M.current=Math.round(T-f.current),f.current=T;const R=Math.max(M.current??ut,ut),p=o.current,w=s.current,E=$.children,N=x.current;let S=!1;m.data.forEach(({id:l,x:D,y:H,route_id:ct,hidden:gt})=>{if(p.has(l)&&(p.get(l)?.(),p.delete(l)),gt&&w.has(l)&&w.has(Q(l))){const P=w.get(l);P.hidden=!0;const F=w.get(Q(l));F.hidden=!0,N.add(()=>n.update(P,F));return}if(y.current.set(l,performance.now()),!w.has(l)){const P=X.get(ct)||X.get(et),F={id:l,source:P,bounds:k(D,H,P.width,P.height,t.current,0)};if(w.set(l,F),j){const q=Q(l),rt={id:q,source:j,bounds:k(D,H,j.width,j.height,t.current,0)};j.setAttribute("id",q),w.set(q,rt),E.push(F,rt)}else E.push(F);S=!0;return}const Z=w.get(l),st=w.get(Q(l)),mt=Z.bounds.center,K=Nt(mt,{x:D,y:H},A.current.get(ct));if(K.reduce((P,F,q)=>q===0?P:P+nt(K[q-1],F),0)>=Tt||document.hidden)dt({rendererService:n,updateQueue:N,vehicle:Z,vehicleFinery:st,x:D,y:H,scale:t.current,angle:vt(Z.bounds.center,{x:D,y:H})});else{const P=St(K,R,F=>{dt({rendererService:n,updateQueue:N,vehicle:Z,vehicleFinery:st,x:F.x,y:F.y,scale:t.current,angle:F.angle})});p.set(l,P)}}),S&&N.add(()=>n.update($))}catch(m){console.error("handleSocketMessage",m)}},v(),C(h.config?(Number(h.config.vehicle_inactive_interval)||20)*1e3:Pt)}catch(h){console.warn(h)}}O();function v(){r.current?.readyState===WebSocket.OPEN||r.current?.readyState===WebSocket.CONNECTING||(r.current=new WebSocket(a),r.current.onmessage=d.current,r.current.onopen=()=>{g.current=it},r.current.onclose=()=>{if(!navigator.onLine)return;setTimeout(v,g.current);const h=3e4;g.current=Math.min(g.current*2,h)})}function b(){v()}window.addEventListener("online",b);function C(h){clearInterval(i.current),i.current=window.setInterval(()=>{const V=performance.now(),_=[],W=[];y.current.forEach((z,Y)=>{if(V-z<h)return;const B=s.current.get(Y);B&&(B.hidden=!0,W.push(B),_.push(Y));const U=Q(Y),$=s.current.get(U);$&&($.hidden=!0,W.push($),_.push(U))}),W.length&&x.current.add(()=>n.update(...W)),_.forEach(z=>y.current.delete(z))},h)}return()=>{I.current&&n.renderer&&n.renderer.events.removeEventListener("viewport:ptscale",I.current),o.current.forEach(h=>h?.()),o.current.clear(),s.current.clear(),x.current.destroy(),window.removeEventListener("online",b),clearInterval(i.current)}},[e,n,c,a])}function lt(e){return Math.min(e||window.devicePixelRatio,Ft)}function vt(e,n){return Math.atan2(n.y-e.y,n.x-e.x)}function Ct({radius:e,scale:n,color:c}){const a=document.createElement("canvas"),t=a.getContext("2d");t.imageSmoothingEnabled=!1;const s=Math.ceil(e*2*n),o=s/2,r=e*.78,d=e*.33;return a.width=s,a.height=s,t.translate(o,o),t.scale(n,n),t.beginPath(),t.arc(0,0,e,0,2*Math.PI),t.fillStyle="#FFFFFF",t.fill(),t.beginPath(),t.arc(0,0,r,0,2*Math.PI),t.fillStyle=c,t.fill(),t.beginPath(),t.arc(0,0,d,0,2*Math.PI),t.fillStyle="#FFFFFF",t.fill(),a}function ht({id:e,width:n,height:c,color:a,scale:t}){const s=2*t,o=n/2*t,r=c*t,d=.6,f=.01,M=r*d,x=r,A=8*t,I=x+s+M/2+A*2,g=o*2+M+s+A*2,y=document.createElement("canvas");y.setAttribute("id",e),y.width=I,y.height=g;const i=y.getContext("2d"),O=I/2,v=g/2;i.save(),i.translate(O,v),i.rotate(-Math.PI/2),i.translate(-O,-v);const b=O,C=v-x/2+o,h=C+M;return i.shadowColor="rgba(16, 24, 40, 0.2)",i.shadowBlur=A/2,i.beginPath(),i.arc(b,C,o,Math.PI,0,!1),i.bezierCurveTo(b+o,C+r*.3,b+f*o,h,b,h),i.bezierCurveTo(b-f*o,h,b-o,C+r*.3,b-o,C),i.closePath(),i.fillStyle=a,i.fill(),i.strokeStyle="#FFFFFF",i.lineWidth=s,i.stroke(),i.restore(),y}function nt(e,n){return Math.hypot(e.x-n.x,e.y-n.y)}function Q(e){return`${e}_finery`}function dt({rendererService:e,updateQueue:n,vehicle:c,vehicleFinery:a,x:t,y:s,scale:o,angle:r}){if(c.bounds=k(t,s,c.source.width,c.source.height,o,r),c.hidden=!1,a){const d=e.getCameraState();a.bounds=k(t,s,a.source.width,a.source.height,o,bt(d.roll||0)),a.hidden=!1,n.add(()=>e.update(a,c))}else n.add(()=>e.update(c))}function J(e,n,c){return{x:e.x+(n.x-e.x)*c,y:e.y+(n.y-e.y)*c}}function ft(e,n){let c=1/0,a={index:0,t:0};for(let t=0;t<n.length-1;t++){const s=n[t],o=n[t+1],r=o.x-s.x,d=o.y-s.y,f=r*r+d*d,M=f?((e.x-s.x)*r+(e.y-s.y)*d)/f:0,x=Math.max(0,Math.min(1,M)),A=J(s,o,x),I=nt(e,A);I<c&&(c=I,a={index:t,t:x})}return a}function _t(e,n,c){const a=nt(e,n),t=Math.max(2,Math.ceil(a/c)+1),s=[];for(let o=0;o<t;o++){const r=o/(t-1),d=J(e,n,r);s.push({x:d.x,y:d.y})}return s}function Nt(e,n,c){if(!c||!c.length)return _t(e,n,10);const a=ft(e,c),t=ft(n,c),s=[],o=r=>s.push({x:r.x,y:r.y});a.index+1<c.length?o(J(c[a.index],c[a.index+1],a.t)):o(c[a.index]);for(let r=a.index+1;r<=t.index&&r<c.length;r++)o(c[r]);return t.index+1<c.length?o(J(c[t.index],c[t.index+1],t.t)):o(c[t.index]),s}function St(e,n,c,a){if(e.length<2)return()=>{};let t=null,s;const o=[];let r=0;for(let f=0;f<e.length-1;f++){const M=Math.hypot(e[f+1].x-e[f].x,e[f+1].y-e[f].y);o.push(M),r+=M}const d=f=>{t||(t=f);const M=f-t,x=Math.min(M/n,1),A=x*r;let I=0,g=0;for(;g<o.length&&I+o[g]<A;)I+=o[g],g++;g>=o.length&&(g=o.length-1);const y=e[g],i=e[Math.min(g+1,e.length-1)],O=o[g]||0,v=O===0?0:(A-I)/O,b=y.x+(i.x-y.x)*v,C=y.y+(i.y-y.y)*v,h=i.x-y.x,V=i.y-y.y,_=h===0&&V===0?0:Math.atan2(V,h);c({x:b,y:C,angle:_}),x<1?s=requestAnimationFrame(d):a&&a()};return s=requestAnimationFrame(d),()=>{s&&cancelAnimationFrame(s)}}function ot(e){return`${e.x},${e.y}`}
1
+ import{useEffect as yt,useRef as L}from"react";import{getBounds as k}from"../../../renderer";import{getRouteLayerRegex as pt,getRouteStopLayerRegex as wt,TRAFFIC_VEHICLES as xt}from"./trafficLayers";import{loadImage as Et}from"../../../utils/loadImage";import{createImageCanvas as It}from"../drawing/config/canvases";import{UpdateQueue as Mt}from"./UpdateQueue";import Lt from"../../../tools/base-runtime-url";import{toRadians as bt}from"../../../utils/math";const tt=2,Rt=tt*3.5,G=tt*12,it=G*.7,Ft=8,At="transport_locations",Tt=150,et="#a4aab6",at=1e3,Pt=2e4,ut=500;export function useManageTraffic({permission:e,rendererService:n,dataJsonUrl:c,websocketUrl:i}){const t=L(window.devicePixelRatio),s=L(new Map),o=L(new Map),r=L(),m=L(),d=L(performance.now()),M=L(1),x=L(new Mt),A=L(new Map),I=L(),f=L(at),y=L(new Map),a=L();yt(()=>{async function O(){if(!(!e||!n.scene))try{let h;try{h=await(await fetch(c,{method:"GET",headers:{"Content-Type":"application/json"}})).json()}catch(u){console.warn("useManageTraffic failed to get JSON",u)}if(!h||h?.disabled||h?.error)return;t.current=lt(n.scale);const V=new Map(h.routes.map(({id:u,color:g})=>[u,g])),C=n.scene.rootLayer.children,W=new Map;V.forEach(u=>{W.set(u,_t({radius:Rt,color:u,scale:window.devicePixelRatio}))});const z=pt(),Y=C.filter(u=>z.test(u.name)),B=wt(),U=C.filter(u=>B.test(u.name));h.routes.slice(0,Y.length).forEach(({id:u,color:g,path:T,stops:R,hiddenPoints:p},w)=>{A.current.set(u,T);const E=Y[w];if(E){const S=new Map(p?.map(l=>[ot(l),l])??[]);for(let l=1;l<T.length;l++){const D=T[l-1],H=T[l];S.has(ot(D))||S.has(ot(H))||E.children.push({points:[D,H],color:g,width:tt})}E.children.length&&x.current.add(()=>n.update(E))}const N=U[w];if(N&&R?.length){const S=W.get(g);R.forEach(l=>{N.children.push({source:S,bounds:k(l.x,l.y,S.width,S.height,t.current)})}),N.children.length&&x.current.add(()=>n.update(N))}});const $=C.find(u=>u.name===xt),X=new Map;I.current=u=>{try{t.current=lt(u);const g=[];for(let R=0;R<U.length;R++){const p=U[R].children;for(let w=0;w<p.length;w++){const E=p[w];E.bounds=k(E.bounds.center.x,E.bounds.center.y,E.source.width,E.source.height,t.current,E.bounds.rotation),g.push(E)}}const T=[...s.current.values()];for(let R=0;R<T.length;R++){const p=T[R];p.bounds=k(p.bounds.center.x,p.bounds.center.y,p.source.width,p.source.height,t.current,p.bounds.rotation)}x.current.add(()=>n.update(...g,...T))}catch(g){console.error("ptscale",g)}},n.renderer.events.addEventListener("viewport:ptscale",I.current),V.forEach((u,g)=>{X.set(g,ht({id:g,width:G,height:G,color:u,scale:window.devicePixelRatio}))}),X.set(et,ht({id:"orphan",width:G,height:G,color:et,scale:window.devicePixelRatio}));let j=null;try{const u=await Et(`${Lt}icons/bus-white.svg`);j=It(u,it,it,window.devicePixelRatio)}catch(u){console.error(u)}m.current=u=>{try{const g=JSON.parse(u.data);if(g.type!==At)return;const T=u.timeStamp||performance.now();M.current=Math.round(T-d.current),d.current=T;const R=Math.max(M.current??ut,ut),p=o.current,w=s.current,E=$.children,N=x.current;let S=!1;g.data.forEach(({id:l,x:D,y:H,route_id:ct,hidden:gt})=>{if(p.has(l)&&(p.get(l)?.(),p.delete(l)),gt&&w.has(l)&&w.has(Q(l))){const P=w.get(l);P.hidden=!0;const F=w.get(Q(l));F.hidden=!0,N.add(()=>n.update(P,F));return}if(y.current.set(l,performance.now()),!w.has(l)){const P=X.get(ct)||X.get(et),F={id:l,source:P,bounds:k(D,H,P.width,P.height,t.current,0)};if(w.set(l,F),j){const q=Q(l),rt={id:q,source:j,bounds:k(D,H,j.width,j.height,t.current,0)};j.setAttribute("id",q),w.set(q,rt),E.push(F,rt)}else E.push(F);S=!0;return}const Z=w.get(l),st=w.get(Q(l)),mt=Z.bounds.center,K=Nt(mt,{x:D,y:H},A.current.get(ct));if(K.reduce((P,F,q)=>q===0?P:P+nt(K[q-1],F),0)>=Tt||document.hidden)dt({rendererService:n,updateQueue:N,vehicle:Z,vehicleFinery:st,x:D,y:H,scale:t.current,angle:vt(Z.bounds.center,{x:D,y:H})});else{const P=St(K,R,F=>{dt({rendererService:n,updateQueue:N,vehicle:Z,vehicleFinery:st,x:F.x,y:F.y,scale:t.current,angle:F.angle})});p.set(l,P)}}),S&&N.add(()=>n.update($))}catch(g){console.error("handleSocketMessage",g)}},v(),_(h.config?(Number(h.config.vehicle_inactive_interval)||20)*1e3:Pt)}catch(h){console.warn(h)}}O();function v(){r.current?.readyState===WebSocket.OPEN||r.current?.readyState===WebSocket.CONNECTING||(r.current=new WebSocket(i),r.current.onmessage=m.current,r.current.onopen=()=>{f.current=at},r.current.onclose=()=>{if(!navigator.onLine)return;setTimeout(v,f.current);const h=3e4;f.current=Math.min(f.current*2,h)})}function b(){v()}window.addEventListener("online",b);function _(h){clearInterval(a.current),a.current=window.setInterval(()=>{const V=performance.now(),C=[],W=[];y.current.forEach((z,Y)=>{if(V-z<h)return;const B=s.current.get(Y);B&&(B.hidden=!0,W.push(B),C.push(Y));const U=Q(Y),$=s.current.get(U);$&&($.hidden=!0,W.push($),C.push(U))}),W.length&&x.current.add(()=>n.update(...W)),C.forEach(z=>y.current.delete(z))},h)}return()=>{I.current&&n.renderer&&n.renderer.events.removeEventListener("viewport:ptscale",I.current),o.current.forEach(h=>h?.()),o.current.clear(),s.current.clear(),x.current.destroy(),window.removeEventListener("online",b),clearInterval(a.current)}},[e,n,c,i])}function lt(e){return Math.min(e||window.devicePixelRatio,Ft)}function vt(e,n){return Math.atan2(n.y-e.y,n.x-e.x)}function _t({radius:e,scale:n,color:c}){const i=document.createElement("canvas"),t=i.getContext("2d");t.imageSmoothingEnabled=!1;const s=Math.ceil(e*2*n),o=s/2,r=e*.78,m=e*.33;return i.width=s,i.height=s,t.translate(o,o),t.scale(n,n),t.beginPath(),t.arc(0,0,e,0,2*Math.PI),t.fillStyle="#FFFFFF",t.fill(),t.beginPath(),t.arc(0,0,r,0,2*Math.PI),t.fillStyle=c,t.fill(),t.beginPath(),t.arc(0,0,m,0,2*Math.PI),t.fillStyle="#FFFFFF",t.fill(),i}function ht({id:e,width:n,height:c,color:i,scale:t}){const s=2*t,o=n/2*t,r=c*t,m=.6,d=.01,M=r*m,x=r,A=8*t,I=x+s+M/2+A*2,f=o*2+M+s+A*2,y=document.createElement("canvas");y.setAttribute("id",e),y.width=I,y.height=f;const a=y.getContext("2d"),O=I/2,v=f/2;a.save(),a.translate(O,v),a.rotate(-Math.PI/2),a.translate(-O,-v);const b=O,_=v-x/2+o,h=_+M;return a.shadowColor="rgba(16, 24, 40, 0.2)",a.shadowBlur=A/2,a.beginPath(),a.arc(b,_,o,Math.PI,0,!1),a.bezierCurveTo(b+o,_+r*.3,b+d*o,h,b,h),a.bezierCurveTo(b-d*o,h,b-o,_+r*.3,b-o,_),a.closePath(),a.fillStyle=i,a.fill(),a.strokeStyle="#FFFFFF",a.lineWidth=s,a.stroke(),a.restore(),y}function nt(e,n){return Math.hypot(e.x-n.x,e.y-n.y)}function Q(e){return`${e}_finery`}function dt({rendererService:e,updateQueue:n,vehicle:c,vehicleFinery:i,x:t,y:s,scale:o,angle:r}){c.bounds=k(t,s,c.source.width,c.source.height,o,r),c.hidden=!1,i?(i.bounds=k(t,s,i.source.width,i.source.height,o,bt(e.angle)),i.hidden=!1,n.add(()=>e.update(i,c))):n.add(()=>e.update(c))}function J(e,n,c){return{x:e.x+(n.x-e.x)*c,y:e.y+(n.y-e.y)*c}}function ft(e,n){let c=1/0,i={index:0,t:0};for(let t=0;t<n.length-1;t++){const s=n[t],o=n[t+1],r=o.x-s.x,m=o.y-s.y,d=r*r+m*m,M=d?((e.x-s.x)*r+(e.y-s.y)*m)/d:0,x=Math.max(0,Math.min(1,M)),A=J(s,o,x),I=nt(e,A);I<c&&(c=I,i={index:t,t:x})}return i}function Ct(e,n,c){const i=nt(e,n),t=Math.max(2,Math.ceil(i/c)+1),s=[];for(let o=0;o<t;o++){const r=o/(t-1),m=J(e,n,r);s.push({x:m.x,y:m.y})}return s}function Nt(e,n,c){if(!c||!c.length)return Ct(e,n,10);const i=ft(e,c),t=ft(n,c),s=[],o=r=>s.push({x:r.x,y:r.y});i.index+1<c.length?o(J(c[i.index],c[i.index+1],i.t)):o(c[i.index]);for(let r=i.index+1;r<=t.index&&r<c.length;r++)o(c[r]);return t.index+1<c.length?o(J(c[t.index],c[t.index+1],t.t)):o(c[t.index]),s}function St(e,n,c,i){if(e.length<2)return()=>{};let t=null,s;const o=[];let r=0;for(let d=0;d<e.length-1;d++){const M=Math.hypot(e[d+1].x-e[d].x,e[d+1].y-e[d].y);o.push(M),r+=M}const m=d=>{t||(t=d);const M=d-t,x=Math.min(M/n,1),A=x*r;let I=0,f=0;for(;f<o.length&&I+o[f]<A;)I+=o[f],f++;f>=o.length&&(f=o.length-1);const y=e[f],a=e[Math.min(f+1,e.length-1)],O=o[f]||0,v=O===0?0:(A-I)/O,b=y.x+(a.x-y.x)*v,_=y.y+(a.y-y.y)*v,h=a.x-y.x,V=a.y-y.y,C=h===0&&V===0?0:Math.atan2(V,h);c({x:b,y:_,angle:C}),x<1?s=requestAnimationFrame(m):i&&i()};return s=requestAnimationFrame(m),()=>{s&&cancelAnimationFrame(s)}}function ot(e){return`${e.x},${e.y}`}
@@ -1,11 +1,9 @@
1
- import type { Map } from "mapbox-gl";
1
+ import mapboxgl, { Map } from "mapbox-gl";
2
2
  import Rect from "../../../core/Rect";
3
- import type { Booth } from "../../../store/BoothStore";
4
- import { RegularBooth } from "../../../store/BoothStore";
5
- import type { Layer } from "../../../store/LayerStore";
6
- import type { CurrentPosition } from "../../../store/RouteStore";
7
- import type RouteStore from "../../../store/RouteStore";
8
- import type { Img } from "./../../../utils/imageloader";
3
+ import { Booth, RegularBooth } from "../../../store/BoothStore";
4
+ import { Layer } from "../../../store/LayerStore";
5
+ import RouteStore, { CurrentPosition } from "../../../store/RouteStore";
6
+ import { Img } from "./../../../utils/imageloader";
9
7
  export declare function actualBoothColor(b: Booth): string;
10
8
  export declare function getBoothlabel(booth: Booth): string | null;
11
9
  export declare const props: {
@@ -29,7 +27,7 @@ export declare function moveToRect(svgRect: Rect, paddingPercent?: number, durat
29
27
  export declare function moveToLocation(duration?: number, pitch?: number, bearing?: number): void;
30
28
  export declare function zoomMap(zoomIn: boolean): void;
31
29
  export declare function switchViewbox(showMapbox: boolean): void;
32
- export declare function setDataSource(booths: Booth[], logos: Img[]): Map;
30
+ export declare function setDataSource(booths: Booth[], logos: Img[]): mapboxgl.Map;
33
31
  export declare function updateHoverDataSource(hoveredBooths: Booth[], allBooths: Booth[]): void;
34
32
  export declare function updateSelectionDataSource(selectedBooths: Booth[], allBooths: Booth[]): void;
35
33
  export declare function setLayers(layers: Layer[]): string[];
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { ButtonVariant } from "./";
2
+ import { ButtonVariant } from "./";
3
3
  import "./Modal.scss";
4
4
  type ModalType = "default" | "share" | "fullscreen";
5
5
  export interface ModalButton {
@@ -1,5 +1,4 @@
1
- import type { ReactNode } from "react";
2
- import React from "react";
1
+ import React, { ReactNode } from "react";
3
2
  import "./Overlay.scss";
4
3
  export type Size = "small" | "medium" | "full";
5
4
  export interface OverlayPanelProps {
@@ -1,5 +1,4 @@
1
- import type { ReactNode } from "react";
2
- import React from "react";
1
+ import React, { ReactNode } from "react";
3
2
  import "./ScrollableRow.scss";
4
3
  export interface ScrollableRowProps {
5
4
  children: ReactNode;
@@ -2,8 +2,6 @@ import React from "react";
2
2
  import "./Tours.scss";
3
3
  export interface ToursProps {
4
4
  }
5
- declare const ToursWrapper: React.FC<{
6
- ToursProps: any;
7
- }>;
5
+ declare const ToursWrapper: React.FC<ToursProps>;
8
6
  export default ToursWrapper;
9
7
  //# sourceMappingURL=Tours.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { Meta } from "@storybook/react";
1
+ import { Meta } from "@storybook/react";
2
2
  declare const _default: Meta;
3
3
  export default _default;
4
4
  export declare const Base: any;
@@ -1,4 +1,4 @@
1
- import type { Meta } from "@storybook/react";
1
+ import { Meta } from "@storybook/react";
2
2
  declare const _default: Meta;
3
3
  export default _default;
4
4
  export declare const Base: any;
@@ -1,4 +1,4 @@
1
- import type { Meta } from "@storybook/react";
1
+ import { Meta } from "@storybook/react";
2
2
  declare const _default: Meta;
3
3
  export default _default;
4
4
  export declare const Base: any;
@@ -1,10 +1,10 @@
1
- import type { EventItem } from "./EventStore";
2
- import type Rect from "../core/Rect";
3
- import type { PathInfo, RawPoiType, RawRegularBooth, ShapeBgDef } from "../data/Data";
4
- import type { ImageDef } from "@expofp/renderer";
5
- import type { Exhibitor } from "./ExhibitorStore";
6
- import type { Layer } from "./LayerStore";
7
- import type RootStore from "./RootStore";
1
+ import { EventItem } from "./EventStore";
2
+ import Rect from "../core/Rect";
3
+ import { PathInfo, RawPoiType, RawRegularBooth, ShapeBgDef } from "../data/Data";
4
+ import { ImageDef } from "@expofp/renderer";
5
+ import { Exhibitor } from "./ExhibitorStore";
6
+ import { Layer } from "./LayerStore";
7
+ import RootStore from "./RootStore";
8
8
  export default class BoothStore {
9
9
  readonly rootStore: RootStore;
10
10
  booths: Booth[];
@@ -1,5 +1,5 @@
1
- import type RootStore from "./RootStore";
2
- import type { Exhibitor } from "./ExhibitorStore";
1
+ import RootStore from "./RootStore";
2
+ import { Exhibitor } from "./ExhibitorStore";
3
3
  export default class CategoryStore {
4
4
  private readonly rootStore;
5
5
  readonly categories: Category[];
@@ -1,5 +1,5 @@
1
- import type RootStore from "./RootStore";
2
- import type { Speaker } from "./SpeakerStore";
1
+ import RootStore from "./RootStore";
2
+ import { Speaker } from "./SpeakerStore";
3
3
  export interface Track {
4
4
  id: number;
5
5
  externalId: string;
@@ -1,8 +1,8 @@
1
- import type { EventItem } from "./EventStore";
2
- import type { MarketMaterial, RawExhibitor } from "../data/Data";
3
- import type { Booth } from "./BoothStore";
4
- import type { Category } from "./CategoryStore";
5
- import type RootStore from "./RootStore";
1
+ import { EventItem } from "./EventStore";
2
+ import { MarketMaterial, RawExhibitor } from "../data/Data";
3
+ import { Booth } from "./BoothStore";
4
+ import { Category } from "./CategoryStore";
5
+ import RootStore from "./RootStore";
6
6
  export default class ExhibitorStore {
7
7
  private readonly rootStore;
8
8
  readonly exhibitors: Exhibitor[];
@@ -1,5 +1,5 @@
1
- import type { RawPoiType } from "../data/Data";
2
- import type RootStore from "./RootStore";
1
+ import { RawPoiType } from "../data/Data";
2
+ import RootStore from "./RootStore";
3
3
  export default class PoiTypeStore {
4
4
  private readonly rootStore;
5
5
  readonly poiTypes: RawPoiType[];
@@ -1 +1 @@
1
- import{__esDecorate as i,__runInitializers as n}from"tslib";import{action as a,observable as se,computed as he,runInAction as ae}from"mobx";import ne from"../tools/logger";import{isWebGlSupported as ce}from"../utils";import ue,{BoothBase as oe,RegularBooth as de}from"./BoothStore";import me,{Category as Se}from"./CategoryStore";import fe,{Exhibitor as le}from"./ExhibitorStore";import pe from"./CategoryFilterStore";import ge from"./EventStore";import{GaEventActions as ke}from"../tools/gtag";import r from"../utils/is-mobile";import c from"../utils/is-webview";import ve from"./HeatmapStore";import{resetLocale as ye}from"../utils/i18n";import{LANGUAGE_TYPE as _e}from"../constants";import be,{LayersMode as re}from"./LayerStore";import we from"./MapboxStore";import xe from"./RouteStore";import Be from"./RoutePlannerStore";import Le from"./ToursStore";import Ce from"./UIState";import Ee from"./PoiTypeStore";import{sanitizeSearch as Fe}from"../utils/sanitizeText";import Te from"./FuzzySearchEngineStore";import Ie from"./SessionsFilterStore";import ze from"./SearchStore";import Me from"./SearchButtonsStore";import Oe from"./BookmarksStore";import{URLFilterManager as Ae}from"../services/URLFilterManager";import{ShortcutRegistry as Re}from"./ShortcutRegistry";import{SessionsShortcutProvider as Pe}from"./providers/SessionsShortcutProvider";import Ve from"./SpeakerStore";import Ge from"./SpeakerFilterStore";import{SpeakerShortcutProvider as Ne}from"./providers/SpeakerShortcutProvider";import{SearchShortcutProvider as qe}from"./providers/SearchShortcutProvider";import{RendererService as je}from"../renderer";let Ue=(()=>{let s=[],u,d=[],m=[],S,f=[],p=[],g,k,v,y,_,b,w,x,B,L,C,E,F,T,I,z,M,O,A,R,P,V,G,N,q,j,U,W,D,H,K,Y,$,J,Q,X,Z,ee,te,ie;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;u=[se],S=[se],g=[a],k=[a],v=[a],y=[a],_=[a],b=[a],w=[a],x=[a],B=[a],L=[a],C=[a],E=[a],F=[a],T=[a],I=[a],z=[a],M=[a],O=[a],A=[a],R=[a],P=[a],V=[a],G=[a],N=[a],q=[a],j=[a],U=[a],W=[a],D=[a],H=[a],K=[a],Y=[a],$=[a],J=[he],Q=[a],X=[a],Z=[a],ee=[a],te=[a],ie=[a],i(this,null,g,{kind:"method",name:"setResetCameraFn",static:!1,private:!1,access:{has:e=>"setResetCameraFn"in e,get:e=>e.setResetCameraFn},metadata:t},null,s),i(this,null,k,{kind:"method",name:"selectExhibitor",static:!1,private:!1,access:{has:e=>"selectExhibitor"in e,get:e=>e.selectExhibitor},metadata:t},null,s),i(this,null,v,{kind:"method",name:"selectBooth",static:!1,private:!1,access:{has:e=>"selectBooth"in e,get:e=>e.selectBooth},metadata:t},null,s),i(this,null,y,{kind:"method",name:"reset",static:!1,private:!1,access:{has:e=>"reset"in e,get:e=>e.reset},metadata:t},null,s),i(this,null,_,{kind:"method",name:"selectNone",static:!1,private:!1,access:{has:e=>"selectNone"in e,get:e=>e.selectNone},metadata:t},null,s),i(this,null,b,{kind:"method",name:"selectBookmarks",static:!1,private:!1,access:{has:e=>"selectBookmarks"in e,get:e=>e.selectBookmarks},metadata:t},null,s),i(this,null,w,{kind:"method",name:"selectVisited",static:!1,private:!1,access:{has:e=>"selectVisited"in e,get:e=>e.selectVisited},metadata:t},null,s),i(this,null,x,{kind:"method",name:"selectLanguage",static:!1,private:!1,access:{has:e=>"selectLanguage"in e,get:e=>e.selectLanguage},metadata:t},null,s),i(this,null,B,{kind:"method",name:"selectCategory",static:!1,private:!1,access:{has:e=>"selectCategory"in e,get:e=>e.selectCategory},metadata:t},null,s),i(this,null,L,{kind:"method",name:"selectEventItem",static:!1,private:!1,access:{has:e=>"selectEventItem"in e,get:e=>e.selectEventItem},metadata:t},null,s),i(this,null,C,{kind:"method",name:"selectSearch",static:!1,private:!1,access:{has:e=>"selectSearch"in e,get:e=>e.selectSearch},metadata:t},null,s),i(this,null,E,{kind:"method",name:"clickBookmarks",static:!1,private:!1,access:{has:e=>"clickBookmarks"in e,get:e=>e.clickBookmarks},metadata:t},null,s),i(this,null,F,{kind:"method",name:"clickVisited",static:!1,private:!1,access:{has:e=>"clickVisited"in e,get:e=>e.clickVisited},metadata:t},null,s),i(this,null,T,{kind:"method",name:"clickLanguage",static:!1,private:!1,access:{has:e=>"clickLanguage"in e,get:e=>e.clickLanguage},metadata:t},null,s),i(this,null,I,{kind:"method",name:"clickCategory",static:!1,private:!1,access:{has:e=>"clickCategory"in e,get:e=>e.clickCategory},metadata:t},null,s),i(this,null,z,{kind:"method",name:"clickSeminars",static:!1,private:!1,access:{has:e=>"clickSeminars"in e,get:e=>e.clickSeminars},metadata:t},null,s),i(this,null,M,{kind:"method",name:"clickBoothInList",static:!1,private:!1,access:{has:e=>"clickBoothInList"in e,get:e=>e.clickBoothInList},metadata:t},null,s),i(this,null,O,{kind:"method",name:"clickBoothInList2",static:!1,private:!1,access:{has:e=>"clickBoothInList2"in e,get:e=>e.clickBoothInList2},metadata:t},null,s),i(this,null,A,{kind:"method",name:"clickBooth",static:!1,private:!1,access:{has:e=>"clickBooth"in e,get:e=>e.clickBooth},metadata:t},null,s),i(this,null,R,{kind:"method",name:"clickExhibitor2",static:!1,private:!1,access:{has:e=>"clickExhibitor2"in e,get:e=>e.clickExhibitor2},metadata:t},null,s),i(this,null,P,{kind:"method",name:"clickExhibitor",static:!1,private:!1,access:{has:e=>"clickExhibitor"in e,get:e=>e.clickExhibitor},metadata:t},null,s),i(this,null,V,{kind:"method",name:"showMap",static:!1,private:!1,access:{has:e=>"showMap"in e,get:e=>e.showMap},metadata:t},null,s),i(this,null,G,{kind:"method",name:"showOverlay",static:!1,private:!1,access:{has:e=>"showOverlay"in e,get:e=>e.showOverlay},metadata:t},null,s),i(this,null,N,{kind:"method",name:"toggleMapOverlay",static:!1,private:!1,access:{has:e=>"toggleMapOverlay"in e,get:e=>e.toggleMapOverlay},metadata:t},null,s),i(this,null,q,{kind:"method",name:"moveToList",static:!1,private:!1,access:{has:e=>"moveToList"in e,get:e=>e.moveToList},metadata:t},null,s),i(this,null,j,{kind:"method",name:"moveToExhibitor",static:!1,private:!1,access:{has:e=>"moveToExhibitor"in e,get:e=>e.moveToExhibitor},metadata:t},null,s),i(this,null,U,{kind:"method",name:"changeActiveListIndex",static:!1,private:!1,access:{has:e=>"changeActiveListIndex"in e,get:e=>e.changeActiveListIndex},metadata:t},null,s),i(this,null,W,{kind:"method",name:"toggleModal",static:!1,private:!1,access:{has:e=>"toggleModal"in e,get:e=>e.toggleModal},metadata:t},null,s),i(this,null,D,{kind:"method",name:"openGallery",static:!1,private:!1,access:{has:e=>"openGallery"in e,get:e=>e.openGallery},metadata:t},null,s),i(this,null,H,{kind:"method",name:"closeGallery",static:!1,private:!1,access:{has:e=>"closeGallery"in e,get:e=>e.closeGallery},metadata:t},null,s),i(this,null,K,{kind:"method",name:"openActiveListItem",static:!1,private:!1,access:{has:e=>"openActiveListItem"in e,get:e=>e.openActiveListItem},metadata:t},null,s),i(this,null,Y,{kind:"method",name:"toggleCategoryFilter",static:!1,private:!1,access:{has:e=>"toggleCategoryFilter"in e,get:e=>e.toggleCategoryFilter},metadata:t},null,s),i(this,null,$,{kind:"method",name:"applyCategoryFilters",static:!1,private:!1,access:{has:e=>"applyCategoryFilters"in e,get:e=>e.applyCategoryFilters},metadata:t},null,s),i(this,null,J,{kind:"getter",name:"filteredExhibitors",static:!1,private:!1,access:{has:e=>"filteredExhibitors"in e,get:e=>e.filteredExhibitors},metadata:t},null,s),i(this,null,Q,{kind:"method",name:"selectSessions",static:!1,private:!1,access:{has:e=>"selectSessions"in e,get:e=>e.selectSessions},metadata:t},null,s),i(this,null,X,{kind:"method",name:"selectExhibitors",static:!1,private:!1,access:{has:e=>"selectExhibitors"in e,get:e=>e.selectExhibitors},metadata:t},null,s),i(this,null,Z,{kind:"method",name:"selectTours",static:!1,private:!1,access:{has:e=>"selectTours"in e,get:e=>e.selectTours},metadata:t},null,s),i(this,null,ee,{kind:"method",name:"selectSpeakers",static:!1,private:!1,access:{has:e=>"selectSpeakers"in e,get:e=>e.selectSpeakers},metadata:t},null,s),i(this,null,te,{kind:"method",name:"selectSpeaker",static:!1,private:!1,access:{has:e=>"selectSpeaker"in e,get:e=>e.selectSpeaker},metadata:t},null,s),i(this,null,ie,{kind:"method",name:"resetFilters",static:!1,private:!1,access:{has:e=>"resetFilters"in e,get:e=>e.resetFilters},metadata:t},null,s),i(null,null,u,{kind:"field",name:"initialized",static:!1,private:!1,access:{has:e=>"initialized"in e,get:e=>e.initialized,set:(e,o)=>{e.initialized=o}},metadata:t},d,m),i(null,null,S,{kind:"field",name:"resetCameraFn",static:!1,private:!1,access:{has:e=>"resetCameraFn"in e,get:e=>e.resetCameraFn,set:(e,o)=>{e.resetCameraFn=o}},metadata:t},f,p),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}categoryStore=n(this,s);exhibitorStore;boothStore;uiState;routeStore;routePlannerStore;toursStore;mapboxStore;layerStore;eventStore;poiTypeStore;heatmapStore;fuzzySearchEngineStore;categoryFilterStore;sessionsFilterStore;speakerStore;speakerFilterStore;searchStore;searchButtonsStore;bookmarksStore;urlFilterManager;shortcutRegistry;rendererService=new je;fp;initialized=n(this,d,!1);resetCameraFn=(n(this,m),n(this,f,void 0));setResetCameraFn(t){this.resetCameraFn=t}constructor(){n(this,p),this.categoryStore=new me(this),this.exhibitorStore=new fe(this),this.boothStore=new ue(this),this.routeStore=new xe(this),this.routePlannerStore=new Be(this),this.toursStore=new Le(this),this.uiState=new Ce(this),this.mapboxStore=new we(this),this.layerStore=new be,this.eventStore=new ge(this),this.heatmapStore=new ve(this),this.poiTypeStore=new Ee(this),this.fuzzySearchEngineStore=new Te(["name","title","fullName","booths.name"]),this.categoryFilterStore=new pe(this),this.sessionsFilterStore=new Ie(this),this.speakerStore=new Ve(this),this.speakerFilterStore=new Ge(this),this.searchStore=new ze(this),this.searchButtonsStore=new Me(this),this.bookmarksStore=new Oe(this),this.urlFilterManager=new Ae(this),this.shortcutRegistry=new Re,this.registerShortcutProviders()}selectExhibitor(t,e=!0){this.uiState.hoveredExhibitor=null,this.uiState.details=t;var o=t.booths.filter(h=>h.visible),l=t.booths.filter(h=>!h.visible);!o.length&&l.length&&this.layerStore.updateVisibility(l[0].layer,!0),e&&setTimeout(()=>this.moveToList(t.booths.filter(h=>h.visible)),c||r?500:50)}selectBooth(t,e=!0){let o=Array.isArray(t)?t:[t];this.uiState.details=o[0],o.length===1&&o[0].schedule?.length&&(this.uiState.desiredOverlaySize="medium"),o.length===1&&o[0].layer&&!o[0].visible&&this.layerStore.mode===re.Radio&&this.layerStore.updateVisibility(o[0].layer,!0),e&&setTimeout(()=>this.moveToList(o),c||r?500:50)}reset(){const t=window.__searchi;t&&t.querySelector&&t.querySelector("input[type=search]")&&t.querySelector("input[type=search]").blur&&t.querySelector("input[type=search]").blur(),window.setTimeout(()=>{this.uiState.setKioskModeEnabled||ye().then(()=>{ae(()=>{this.selectSearch(""),this.routeStore.defaultFrom&&!this.routeStore.defaultFrom?.visible?this.selectBooth(this.routeStore.defaultFrom):this.uiState.details=null,this.resetCameraFn?.(),this.uiState.menu=!1,this.searchStore.resetSearchBox(),this.searchButtonsStore.clearAllFilters()}),setTimeout(()=>{ae(()=>{this.uiState.inIdle=!0})},100)})},1e3)}selectNone(){window.__resett&&window.__resett(),this.uiState.details=this.uiState.selectedCategory}selectBookmarks(){this.uiState.details=null,this.uiState.list={type:"bookmarks"}}selectVisited(){this.uiState.details=null,this.uiState.list={type:"visited"}}selectLanguage(){this.uiState.details=null,this.uiState.list={type:_e}}selectCategory(t){window.__resett&&window.__resett(),this.uiState.details=t,this.uiState.list={type:"category",category:t},this.uiState.desiredOverlaySize="full",t.exhibitors.find(o=>o.booths.find(l=>l.visible))||this.layerStore.updateVisibility(t.exhibitors[0]?.booths[0]?.layer,!0),setTimeout(()=>{this.uiState.moveToBooths=t.exhibitors.filter(o=>o.booths.find(l=>l.visible)).flatMap(o=>o.booths)},200)}selectEventItem(t,e=!0){if(this.uiState.hoveredExhibitor=null,this.uiState.details=t,this.uiState.desiredOverlaySize="medium",t.boothId){const o=this.boothStore.booths.find(l=>l.id===t.boothId);o&&o.layer&&!o.visible&&this.layerStore.mode===re.Radio&&this.layerStore.updateVisibility(o.layer,!0)}e&&setTimeout(()=>{if(t.boothId){const o=this.boothStore.booths.find(l=>l.id===t.boothId);o&&this.moveToList([o])}},c||r?500:50)}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null,this.speakerStore.clearSelectedSpeaker(),this.uiState.list={type:"search",text:Fe(t,Object.keys(this.uiState.mapSettings).map(e=>`${e}=`)),focused:!1},this.uiState.activeListIndex=-1}clickBookmarks(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectBookmarks(),this.moveToList(),this.showMap()}clickVisited(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectVisited(),this.moveToList(),this.showMap()}clickLanguage(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectLanguage()}clickCategory(t){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectCategory(t),this.uiState.onCategoryClick&&this.uiState.onCategoryClick({id:t.id,name:t.name,exhibitors:t.exhibitors.map(e=>e.id)}),setTimeout(()=>{this.moveToList(),this.showMap()},100)}clickSeminars(){this.clickCategory(this.categoryStore.seminarsCategory)}clickBoothInList(t){window.__resett&&window.__resett(),this.uiState.hoveredBooth=null,this.selectBooth(t),this.moveToList([t]),this.showMap()}clickBoothInList2(t){window.__resett&&window.__resett(),this.uiState.hoveredBooth=null,this.selectBooth(t,!1),window.setTimeout(()=>{this.moveToList([t]),this.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50)}clickBooth(t){if(this.uiState.menu=!1,this.uiState.list.type==="sessions"&&this.searchStore.selectSearch(),this.uiState.list.type==="speakers"&&this.searchStore.selectSearch(),this.uiState.list.type==="tours"&&this.searchStore.selectSearch(),this.uiState.list.type==="multi-point-tour"&&this.searchStore.selectSearch(),!(this.uiState.selectedRoute?.from&&this.uiState.selectedRoute?.to)){if(this.uiState.selectedRoute?.to&&!this.uiState.selectedRoute?.from&&t){this.routeStore.setStartPoint(t);return}if(t)this.routeStore.tempToBooth=t;else{this.uiState.details=null,this.fp.hidePathways(),this.uiState.list={type:"search",text:"",focused:!1},this.uiState.onBoothClick&&this.uiState.onBoothClick({target:null});return}if(this.uiState.onBoothClick){const e={name:"",description:""},o={target:{...t,layer:t.layer||e}};this.uiState.onBoothClick(o)}t.exhibitors.length===1&&t instanceof de?(this.heatmapStore.forceTrack={action:ke.ViewBooth,label:t.name},this.selectExhibitor(t.exhibitors[0],!1)):this.selectBooth(t,!1),this.showMap()}}clickExhibitor2(t){this.selectExhibitor(t,!0),this.showMap()}clickExhibitor(t){window.setTimeout(()=>{this.clickExhibitor2(t)},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50)}showMap(){const t=this.uiState.details;t&&"schedule"in t&&t.schedule?.length>0?this.uiState.desiredOverlaySize="full":this.uiState.overlayPosition==="bottom"&&ce&&(this.uiState.desiredOverlaySize="medium")}showOverlay(){this.uiState.overlayPosition==="bottom"&&(this.uiState.desiredOverlaySize="full")}toggleMapOverlay(){this.uiState.overlayPosition==="bottom"&&this.uiState.overlaySize==="full"?this.uiState.desiredOverlaySize="medium":this.uiState.overlayPosition==="bottom"&&this.uiState.overlaySize!=="full"&&(this.uiState.desiredOverlaySize="full")}moveToList(t){t=t||this.uiState.listItems;const e=[];t.forEach(o=>{o instanceof le?e.push(...o.booths.filter(l=>l.visible)):o instanceof oe&&e.push(o)}),this.uiState.moveToBooths=e}moveToExhibitor(t){this.moveToList([t])}changeActiveListIndex(t){let e=this.uiState.activeListIndex+t;e=Math.max(0,Math.min(this.uiState.listItems.length-1,e)),this.uiState.activeListIndex=e}toggleModal(t){this.uiState.modalActive[t]=!this.uiState.modalActive[t]}openGallery(){this.uiState.galleryActive=!0}closeGallery(){this.uiState.galleryActive=!1}openActiveListItem(){const t=this.uiState.listItems[this.uiState.activeListIndex];t&&(ne.log("Opening",t),t instanceof le?this.clickExhibitor(t):t instanceof Se?this.clickCategory(t):t instanceof oe&&this.clickBoothInList2(t))}toggleCategoryFilter(){this.uiState.categoryFilterOpen=!this.uiState.categoryFilterOpen}applyCategoryFilters(t){this.uiState.selectedCategoryFilters=t,this.uiState.categoryFilterOpen=!1}get filteredExhibitors(){return this.uiState.selectedCategoryFilters.length===0?this.exhibitorStore.exhibitors:this.exhibitorStore.exhibitors.filter(t=>this.uiState.selectedCategoryFilters.some(e=>t.categories.some(o=>o.id===e.id)))}selectSessions(){this.uiState.list={type:"sessions",text:"",focused:!1},this.uiState.menu=!1,this.uiState.selectedTrack=null,this.searchButtonsStore.setSubButtonId(null),this.searchButtonsStore.subButtonsEnabled&&this.searchButtonsStore.showSubButtons("sessions"),r&&(this.uiState.desiredOverlaySize="full")}selectExhibitors(){this.uiState.list={type:"exhibitors",text:"",focused:!1},this.uiState.menu=!1,r&&(this.uiState.desiredOverlaySize="full")}selectTours(){this.uiState.list={type:"tours",text:"",focused:!1},this.uiState.menu=!1,r&&(this.uiState.desiredOverlaySize="full")}selectSpeakers(){this.uiState.list={type:"speakers",text:"",focused:!1},this.uiState.menu=!1,r&&(this.uiState.desiredOverlaySize="full")}selectSpeaker(t,e=!0){this.speakerStore.selectSpeaker(t,e)}resetFilters(){this.searchButtonsStore.clearAllFilters()}registerShortcutProviders(){this.shortcutRegistry.register(new Pe(this)),this.shortcutRegistry.register(new Ne(this)),this.shortcutRegistry.register(new qe(this))}}})();export default Ue;
1
+ import{__esDecorate as i,__runInitializers as n}from"tslib";import{action as a,observable as se,computed as he,runInAction as ae}from"mobx";import ne from"../tools/logger";import{isWebGlSupported as ce}from"../utils";import ue,{BoothBase as oe,RegularBooth as de}from"./BoothStore";import me,{Category as Se}from"./CategoryStore";import fe,{Exhibitor as le}from"./ExhibitorStore";import pe from"./CategoryFilterStore";import ge from"./EventStore";import{GaEventActions as ke}from"../tools/gtag";import r from"../utils/is-mobile";import c from"../utils/is-webview";import ve from"./HeatmapStore";import{resetLocale as ye}from"../utils/i18n";import{LANGUAGE_TYPE as _e}from"../constants";import be,{LayersMode as re}from"./LayerStore";import we from"./MapboxStore";import xe from"./RouteStore";import Be from"./RoutePlannerStore";import Le from"./ToursStore";import Ce from"./UIState";import Ee from"./PoiTypeStore";import{sanitizeSearch as Fe}from"../utils/sanitizeText";import Te from"./FuzzySearchEngineStore";import Ie from"./SessionsFilterStore";import ze from"./SearchStore";import Me from"./SearchButtonsStore";import Oe from"./BookmarksStore";import{URLFilterManager as Ae}from"../services/URLFilterManager";import{ShortcutRegistry as Re}from"./ShortcutRegistry";import{SessionsShortcutProvider as Pe}from"./providers/SessionsShortcutProvider";import Ve from"./SpeakerStore";import Ge from"./SpeakerFilterStore";import{SpeakerShortcutProvider as Ne}from"./providers/SpeakerShortcutProvider";import{SearchShortcutProvider as qe}from"./providers/SearchShortcutProvider";import{RendererService as je}from"../renderer";let Ue=(()=>{let s=[],u,d=[],m=[],S,f=[],p=[],g,k,v,y,_,b,w,x,B,L,C,E,F,T,I,z,M,O,A,R,P,V,G,N,q,j,U,W,D,H,K,Y,$,J,Q,X,Z,ee,te,ie;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;u=[se],S=[se],g=[a],k=[a],v=[a],y=[a],_=[a],b=[a],w=[a],x=[a],B=[a],L=[a],C=[a],E=[a],F=[a],T=[a],I=[a],z=[a],M=[a],O=[a],A=[a],R=[a],P=[a],V=[a],G=[a],N=[a],q=[a],j=[a],U=[a],W=[a],D=[a],H=[a],K=[a],Y=[a],$=[a],J=[he],Q=[a],X=[a],Z=[a],ee=[a],te=[a],ie=[a],i(this,null,g,{kind:"method",name:"setResetCameraFn",static:!1,private:!1,access:{has:e=>"setResetCameraFn"in e,get:e=>e.setResetCameraFn},metadata:t},null,s),i(this,null,k,{kind:"method",name:"selectExhibitor",static:!1,private:!1,access:{has:e=>"selectExhibitor"in e,get:e=>e.selectExhibitor},metadata:t},null,s),i(this,null,v,{kind:"method",name:"selectBooth",static:!1,private:!1,access:{has:e=>"selectBooth"in e,get:e=>e.selectBooth},metadata:t},null,s),i(this,null,y,{kind:"method",name:"reset",static:!1,private:!1,access:{has:e=>"reset"in e,get:e=>e.reset},metadata:t},null,s),i(this,null,_,{kind:"method",name:"selectNone",static:!1,private:!1,access:{has:e=>"selectNone"in e,get:e=>e.selectNone},metadata:t},null,s),i(this,null,b,{kind:"method",name:"selectBookmarks",static:!1,private:!1,access:{has:e=>"selectBookmarks"in e,get:e=>e.selectBookmarks},metadata:t},null,s),i(this,null,w,{kind:"method",name:"selectVisited",static:!1,private:!1,access:{has:e=>"selectVisited"in e,get:e=>e.selectVisited},metadata:t},null,s),i(this,null,x,{kind:"method",name:"selectLanguage",static:!1,private:!1,access:{has:e=>"selectLanguage"in e,get:e=>e.selectLanguage},metadata:t},null,s),i(this,null,B,{kind:"method",name:"selectCategory",static:!1,private:!1,access:{has:e=>"selectCategory"in e,get:e=>e.selectCategory},metadata:t},null,s),i(this,null,L,{kind:"method",name:"selectEventItem",static:!1,private:!1,access:{has:e=>"selectEventItem"in e,get:e=>e.selectEventItem},metadata:t},null,s),i(this,null,C,{kind:"method",name:"selectSearch",static:!1,private:!1,access:{has:e=>"selectSearch"in e,get:e=>e.selectSearch},metadata:t},null,s),i(this,null,E,{kind:"method",name:"clickBookmarks",static:!1,private:!1,access:{has:e=>"clickBookmarks"in e,get:e=>e.clickBookmarks},metadata:t},null,s),i(this,null,F,{kind:"method",name:"clickVisited",static:!1,private:!1,access:{has:e=>"clickVisited"in e,get:e=>e.clickVisited},metadata:t},null,s),i(this,null,T,{kind:"method",name:"clickLanguage",static:!1,private:!1,access:{has:e=>"clickLanguage"in e,get:e=>e.clickLanguage},metadata:t},null,s),i(this,null,I,{kind:"method",name:"clickCategory",static:!1,private:!1,access:{has:e=>"clickCategory"in e,get:e=>e.clickCategory},metadata:t},null,s),i(this,null,z,{kind:"method",name:"clickSeminars",static:!1,private:!1,access:{has:e=>"clickSeminars"in e,get:e=>e.clickSeminars},metadata:t},null,s),i(this,null,M,{kind:"method",name:"clickBoothInList",static:!1,private:!1,access:{has:e=>"clickBoothInList"in e,get:e=>e.clickBoothInList},metadata:t},null,s),i(this,null,O,{kind:"method",name:"clickBoothInList2",static:!1,private:!1,access:{has:e=>"clickBoothInList2"in e,get:e=>e.clickBoothInList2},metadata:t},null,s),i(this,null,A,{kind:"method",name:"clickBooth",static:!1,private:!1,access:{has:e=>"clickBooth"in e,get:e=>e.clickBooth},metadata:t},null,s),i(this,null,R,{kind:"method",name:"clickExhibitor2",static:!1,private:!1,access:{has:e=>"clickExhibitor2"in e,get:e=>e.clickExhibitor2},metadata:t},null,s),i(this,null,P,{kind:"method",name:"clickExhibitor",static:!1,private:!1,access:{has:e=>"clickExhibitor"in e,get:e=>e.clickExhibitor},metadata:t},null,s),i(this,null,V,{kind:"method",name:"showMap",static:!1,private:!1,access:{has:e=>"showMap"in e,get:e=>e.showMap},metadata:t},null,s),i(this,null,G,{kind:"method",name:"showOverlay",static:!1,private:!1,access:{has:e=>"showOverlay"in e,get:e=>e.showOverlay},metadata:t},null,s),i(this,null,N,{kind:"method",name:"toggleMapOverlay",static:!1,private:!1,access:{has:e=>"toggleMapOverlay"in e,get:e=>e.toggleMapOverlay},metadata:t},null,s),i(this,null,q,{kind:"method",name:"moveToList",static:!1,private:!1,access:{has:e=>"moveToList"in e,get:e=>e.moveToList},metadata:t},null,s),i(this,null,j,{kind:"method",name:"moveToExhibitor",static:!1,private:!1,access:{has:e=>"moveToExhibitor"in e,get:e=>e.moveToExhibitor},metadata:t},null,s),i(this,null,U,{kind:"method",name:"changeActiveListIndex",static:!1,private:!1,access:{has:e=>"changeActiveListIndex"in e,get:e=>e.changeActiveListIndex},metadata:t},null,s),i(this,null,W,{kind:"method",name:"toggleModal",static:!1,private:!1,access:{has:e=>"toggleModal"in e,get:e=>e.toggleModal},metadata:t},null,s),i(this,null,D,{kind:"method",name:"openGallery",static:!1,private:!1,access:{has:e=>"openGallery"in e,get:e=>e.openGallery},metadata:t},null,s),i(this,null,H,{kind:"method",name:"closeGallery",static:!1,private:!1,access:{has:e=>"closeGallery"in e,get:e=>e.closeGallery},metadata:t},null,s),i(this,null,K,{kind:"method",name:"openActiveListItem",static:!1,private:!1,access:{has:e=>"openActiveListItem"in e,get:e=>e.openActiveListItem},metadata:t},null,s),i(this,null,Y,{kind:"method",name:"toggleCategoryFilter",static:!1,private:!1,access:{has:e=>"toggleCategoryFilter"in e,get:e=>e.toggleCategoryFilter},metadata:t},null,s),i(this,null,$,{kind:"method",name:"applyCategoryFilters",static:!1,private:!1,access:{has:e=>"applyCategoryFilters"in e,get:e=>e.applyCategoryFilters},metadata:t},null,s),i(this,null,J,{kind:"getter",name:"filteredExhibitors",static:!1,private:!1,access:{has:e=>"filteredExhibitors"in e,get:e=>e.filteredExhibitors},metadata:t},null,s),i(this,null,Q,{kind:"method",name:"selectSessions",static:!1,private:!1,access:{has:e=>"selectSessions"in e,get:e=>e.selectSessions},metadata:t},null,s),i(this,null,X,{kind:"method",name:"selectExhibitors",static:!1,private:!1,access:{has:e=>"selectExhibitors"in e,get:e=>e.selectExhibitors},metadata:t},null,s),i(this,null,Z,{kind:"method",name:"selectTours",static:!1,private:!1,access:{has:e=>"selectTours"in e,get:e=>e.selectTours},metadata:t},null,s),i(this,null,ee,{kind:"method",name:"selectSpeakers",static:!1,private:!1,access:{has:e=>"selectSpeakers"in e,get:e=>e.selectSpeakers},metadata:t},null,s),i(this,null,te,{kind:"method",name:"selectSpeaker",static:!1,private:!1,access:{has:e=>"selectSpeaker"in e,get:e=>e.selectSpeaker},metadata:t},null,s),i(this,null,ie,{kind:"method",name:"resetFilters",static:!1,private:!1,access:{has:e=>"resetFilters"in e,get:e=>e.resetFilters},metadata:t},null,s),i(null,null,u,{kind:"field",name:"initialized",static:!1,private:!1,access:{has:e=>"initialized"in e,get:e=>e.initialized,set:(e,o)=>{e.initialized=o}},metadata:t},d,m),i(null,null,S,{kind:"field",name:"resetCameraFn",static:!1,private:!1,access:{has:e=>"resetCameraFn"in e,get:e=>e.resetCameraFn,set:(e,o)=>{e.resetCameraFn=o}},metadata:t},f,p),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}categoryStore=n(this,s);exhibitorStore;boothStore;uiState;routeStore;routePlannerStore;toursStore;mapboxStore;layerStore;eventStore;poiTypeStore;heatmapStore;fuzzySearchEngineStore;categoryFilterStore;sessionsFilterStore;speakerStore;speakerFilterStore;searchStore;searchButtonsStore;bookmarksStore;urlFilterManager;shortcutRegistry;rendererService=new je;fp;initialized=n(this,d,!1);resetCameraFn=(n(this,m),n(this,f,void 0));setResetCameraFn(t){this.resetCameraFn=t}constructor(){n(this,p),this.categoryStore=new me(this),this.exhibitorStore=new fe(this),this.boothStore=new ue(this),this.routeStore=new xe(this),this.routePlannerStore=new Be(this),this.toursStore=new Le(this),this.uiState=new Ce(this),this.mapboxStore=new we(this),this.layerStore=new be,this.eventStore=new ge(this),this.heatmapStore=new ve(this),this.poiTypeStore=new Ee(this),this.fuzzySearchEngineStore=new Te(["name","title","fullName","booths.name"]),this.categoryFilterStore=new pe(this),this.sessionsFilterStore=new Ie(this),this.speakerStore=new Ve(this),this.speakerFilterStore=new Ge(this),this.searchStore=new ze(this),this.searchButtonsStore=new Me(this),this.bookmarksStore=new Oe(this),this.urlFilterManager=new Ae(this),this.shortcutRegistry=new Re,this.registerShortcutProviders()}selectExhibitor(t,e=!0){this.uiState.hoveredExhibitor=null,this.uiState.details=t;var o=t.booths.filter(h=>h.visible),l=t.booths.filter(h=>!h.visible);!o.length&&l.length&&this.layerStore.updateVisibility(l[0].layer,!0),e&&setTimeout(()=>this.moveToList(t.booths.filter(h=>h.visible)),c||r?500:50)}selectBooth(t,e=!0){let o=Array.isArray(t)?t:[t];this.uiState.details=o[0],o.length===1&&o[0].schedule?.length&&(this.uiState.desiredOverlaySize="medium"),o.length===1&&o[0].layer&&!o[0].visible&&this.layerStore.mode===re.Radio&&this.layerStore.updateVisibility(o[0].layer,!0),e&&setTimeout(()=>this.moveToList(o),c||r?500:50)}reset(){const t=window.__searchi;t&&t.querySelector&&t.querySelector("input[type=search]")&&t.querySelector("input[type=search]").blur&&t.querySelector("input[type=search]").blur(),window.setTimeout(()=>{this.uiState.setKioskModeEnabled||ye().then(()=>{ae(()=>{this.selectSearch(""),this.routeStore.defaultFrom&&!this.routeStore.defaultFrom?.visible?this.selectBooth(this.routeStore.defaultFrom):this.uiState.details=null,this.resetCameraFn?.(),this.uiState.menu=!1,this.searchStore.resetSearchBox(),this.searchButtonsStore.clearAllFilters()}),setTimeout(()=>{ae(()=>{this.uiState.inIdle=!0})},100)})},1e3)}selectNone(){window.__resett&&window.__resett(),this.uiState.details=this.uiState.selectedCategory}selectBookmarks(){this.uiState.details=null,this.uiState.list={type:"bookmarks"}}selectVisited(){this.uiState.details=null,this.uiState.list={type:"visited"}}selectLanguage(){this.uiState.details=null,this.uiState.list={type:_e}}selectCategory(t){window.__resett&&window.__resett(),this.uiState.details=t,this.uiState.list={type:"category",category:t},this.uiState.desiredOverlaySize="full",t.exhibitors.find(o=>o.booths.find(l=>l.visible))||this.layerStore.updateVisibility(t.exhibitors[0]?.booths[0]?.layer,!0),setTimeout(()=>{this.uiState.moveToBooths=t.exhibitors.filter(o=>o.booths.find(l=>l.visible)).flatMap(o=>o.booths)},200)}selectEventItem(t,e=!0){if(this.uiState.hoveredExhibitor=null,this.uiState.details=t,this.uiState.desiredOverlaySize="medium",t.boothId){const o=this.boothStore.booths.find(l=>l.id===t.boothId);o&&o.layer&&!o.visible&&this.layerStore.mode===re.Radio&&this.layerStore.updateVisibility(o.layer,!0)}e&&setTimeout(()=>{if(t.boothId){const o=this.boothStore.booths.find(l=>l.id===t.boothId);o&&this.moveToList([o])}},c||r?500:50)}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null,this.speakerStore.clearSelectedSpeaker(),this.uiState.list={type:"search",text:Fe(t,Object.keys(this.uiState.mapSettings).map(e=>`${e}=`)),focused:!1},this.uiState.activeListIndex=-1}clickBookmarks(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectBookmarks(),this.moveToList(),this.showMap()}clickVisited(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectVisited(),this.moveToList(),this.showMap()}clickLanguage(){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectLanguage()}clickCategory(t){window.__resett&&window.__resett(),this.uiState.menu=!1,this.selectCategory(t),this.uiState.onCategoryClick&&this.uiState.onCategoryClick({id:t.id,name:t.name,exhibitors:t.exhibitors.map(e=>e.id)}),setTimeout(()=>{this.moveToList(),this.showMap()},100)}clickSeminars(){this.clickCategory(this.categoryStore.seminarsCategory)}clickBoothInList(t){window.__resett&&window.__resett(),this.uiState.hoveredBooth=null,this.selectBooth(t),this.moveToList([t]),this.showMap()}clickBoothInList2(t){window.__resett&&window.__resett(),this.uiState.hoveredBooth=null,this.selectBooth(t,!1),window.setTimeout(()=>{this.moveToList([t]),this.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50)}clickBooth(t){if(this.uiState.menu=!1,this.uiState.list.type==="sessions"&&this.searchStore.selectSearch(),this.uiState.list.type==="speakers"&&this.searchStore.selectSearch(),this.uiState.list.type==="tours"&&this.searchStore.selectSearch(),this.uiState.list.type==="multi-point-tour"&&this.searchStore.selectSearch(),!(this.uiState.selectedRoute?.from&&this.uiState.selectedRoute?.to)){if(this.uiState.selectedRoute?.to&&!this.uiState.selectedRoute?.from&&t){this.routeStore.setStartPoint(t);return}if(t)this.routeStore.tempToBooth=t;else{this.uiState.details=null,this.fp.hidePathways(),this.uiState.list={type:"search",text:"",focused:!1},this.uiState.onBoothClick&&this.uiState.onBoothClick({target:null});return}if(this.uiState.onBoothClick){const e={name:"",description:""},o={target:{...t,layer:t.layer||e}};this.uiState.onBoothClick(o)}t.exhibitors.length===1&&t instanceof de?(this.heatmapStore.forceTrack={action:ke.ViewBooth,label:t.name},this.selectExhibitor(t.exhibitors[0],!1)):this.selectBooth(t,!1),this.showMap()}}clickExhibitor2(t){this.selectExhibitor(t,!0),this.showMap()}clickExhibitor(t){window.setTimeout(()=>{this.clickExhibitor2(t)},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50)}showMap(){this.uiState.overlayPosition==="bottom"&&ce&&(this.uiState.desiredOverlaySize="medium")}showOverlay(){this.uiState.overlayPosition==="bottom"&&(this.uiState.desiredOverlaySize="full")}toggleMapOverlay(){this.uiState.overlayPosition==="bottom"&&this.uiState.overlaySize==="full"?this.uiState.desiredOverlaySize="medium":this.uiState.overlayPosition==="bottom"&&this.uiState.overlaySize!=="full"&&(this.uiState.desiredOverlaySize="full")}moveToList(t){t=t||this.uiState.listItems;const e=[];t.forEach(o=>{o instanceof le?e.push(...o.booths.filter(l=>l.visible)):o instanceof oe&&e.push(o)}),this.uiState.moveToBooths=e}moveToExhibitor(t){this.moveToList([t])}changeActiveListIndex(t){let e=this.uiState.activeListIndex+t;e=Math.max(0,Math.min(this.uiState.listItems.length-1,e)),this.uiState.activeListIndex=e}toggleModal(t){this.uiState.modalActive[t]=!this.uiState.modalActive[t]}openGallery(){this.uiState.galleryActive=!0}closeGallery(){this.uiState.galleryActive=!1}openActiveListItem(){const t=this.uiState.listItems[this.uiState.activeListIndex];t&&(ne.log("Opening",t),t instanceof le?this.clickExhibitor(t):t instanceof Se?this.clickCategory(t):t instanceof oe&&this.clickBoothInList2(t))}toggleCategoryFilter(){this.uiState.categoryFilterOpen=!this.uiState.categoryFilterOpen}applyCategoryFilters(t){this.uiState.selectedCategoryFilters=t,this.uiState.categoryFilterOpen=!1}get filteredExhibitors(){return this.uiState.selectedCategoryFilters.length===0?this.exhibitorStore.exhibitors:this.exhibitorStore.exhibitors.filter(t=>this.uiState.selectedCategoryFilters.some(e=>t.categories.some(o=>o.id===e.id)))}selectSessions(){this.uiState.list={type:"sessions",text:"",focused:!1},this.uiState.menu=!1,this.uiState.selectedTrack=null,this.searchButtonsStore.setSubButtonId(null),this.searchButtonsStore.subButtonsEnabled&&this.searchButtonsStore.showSubButtons("sessions"),r&&(this.uiState.desiredOverlaySize="full")}selectExhibitors(){this.uiState.list={type:"exhibitors",text:"",focused:!1},this.uiState.menu=!1,r&&(this.uiState.desiredOverlaySize="full")}selectTours(){this.uiState.list={type:"tours",text:"",focused:!1},this.uiState.menu=!1,r&&(this.uiState.desiredOverlaySize="full")}selectSpeakers(){this.uiState.list={type:"speakers",text:"",focused:!1},this.uiState.menu=!1,r&&(this.uiState.desiredOverlaySize="full")}selectSpeaker(t,e=!0){this.speakerStore.selectSpeaker(t,e)}resetFilters(){this.searchButtonsStore.clearAllFilters()}registerShortcutProviders(){this.shortcutRegistry.register(new Pe(this)),this.shortcutRegistry.register(new Ne(this)),this.shortcutRegistry.register(new qe(this))}}})();export default Ue;
@@ -1,2 +1,2 @@
1
- export { default } from "./search-buttons/SearchButtonsStore";
1
+ export { default as default } from "./search-buttons/SearchButtonsStore";
2
2
  //# sourceMappingURL=SearchButtonsStore.d.ts.map
@@ -1,4 +1,4 @@
1
- import type RootStore from "./RootStore";
1
+ import RootStore from "./RootStore";
2
2
  import type { InterfaceAction } from "./types";
3
3
  export type SearchBoxMode = "search" | "details" | "interface";
4
4
  export default class SearchStore {
@@ -1,5 +1,5 @@
1
- import type RootStore from "./RootStore";
2
- import type { EventItem } from "./EventStore";
1
+ import RootStore from "./RootStore";
2
+ import { EventItem } from "./EventStore";
3
3
  export declare class SpeakerItem {
4
4
  readonly id: number;
5
5
  readonly externalId: string;
@@ -1,5 +1,5 @@
1
- import type RootStore from "./RootStore";
2
- import type { TourItem } from "./types";
1
+ import RootStore from "./RootStore";
2
+ import { TourItem } from "./types";
3
3
  export default class ToursStore {
4
4
  rootStore: RootStore;
5
5
  tours: TourItem[];
@@ -1,6 +1,6 @@
1
- import type { Booth } from "../BoothStore";
2
- import type { Layer } from "../LayerStore";
3
- import type RootStore from "../RootStore";
1
+ import { Booth } from "../BoothStore";
2
+ import { Layer } from "../LayerStore";
3
+ import RootStore from "../RootStore";
4
4
  export declare function iniAllBooths(store: RootStore): void;
5
5
  export default function initBooths(store: RootStore, layer: Layer): Booth[];
6
6
  //# sourceMappingURL=init-booths.d.ts.map
@@ -1,6 +1,5 @@
1
- import type { ShortcutConfig } from "../ShortcutProvider";
2
- import { BaseShortcutProvider } from "../ShortcutProvider";
3
- import type RootStore from "../RootStore";
1
+ import { BaseShortcutProvider, ShortcutConfig } from "../ShortcutProvider";
2
+ import RootStore from "../RootStore";
4
3
  export declare class SessionsShortcutProvider extends BaseShortcutProvider {
5
4
  private rootStore;
6
5
  readonly id = "sessions";
@@ -1,6 +1,5 @@
1
- import type { ShortcutConfig } from "../ShortcutProvider";
2
- import { BaseShortcutProvider } from "../ShortcutProvider";
3
- import type RootStore from "../RootStore";
1
+ import { BaseShortcutProvider, ShortcutConfig } from "../ShortcutProvider";
2
+ import RootStore from "../RootStore";
4
3
  export declare class SpeakerShortcutProvider extends BaseShortcutProvider {
5
4
  private rootStore;
6
5
  readonly id = "speakers";
@@ -1 +1 @@
1
- import{isLocalStorageAvailable as e}from"./localStorage";const o=e&&!!localStorage.getItem("debug");export default o;
1
+ import{isLocalStorageAvailable as e}from"./localStorage";const o=e&&localStorage.getItem("debug")==="1";export default o;
@@ -1,5 +1,5 @@
1
- import type { EffectCallback } from "react";
2
- import type { IReactionPublic, IAutorunOptions, IReactionOptions } from "mobx";
1
+ import { EffectCallback } from "react";
2
+ import { IReactionPublic, IAutorunOptions, IReactionOptions } from "mobx";
3
3
  export declare function useAutorun(view: (r: IReactionPublic) => any, opts?: IAutorunOptions): void;
4
4
  export declare function useReaction<T>(expression: (r: IReactionPublic) => T, effect: (arg: T, r: IReactionPublic) => void, opts?: IReactionOptions): void;
5
5
  export declare function useInit(effect: EffectCallback): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expofp/floorplan",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/expofp/efp-app.git",
@@ -79,13 +79,13 @@
79
79
  "twgl.js": "^4.14.0",
80
80
  "uuid": "^9.0.1",
81
81
  "zod": "4.3.5",
82
- "@expofp/resolve": "3.0.1",
83
- "@expofp/debug": "3.0.1"
82
+ "@expofp/debug": "3.0.3",
83
+ "@expofp/resolve": "3.0.3"
84
84
  },
85
85
  "devDependencies": {
86
86
  "@babel/plugin-proposal-decorators": "^7.29.0",
87
87
  "@babel/plugin-transform-class-properties": "^7.28.6",
88
- "@sentry/vite-plugin": "5.1.1",
88
+ "@sentry/vite-plugin": "5.2.0",
89
89
  "@types/d3": "^7.1.0",
90
90
  "@types/lz-string": "1.3.32",
91
91
  "@types/mapbox-gl": "^2.6.3",
@@ -1,40 +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 e } from "./jsx-runtime-CoKhM3tL.js";
3
- import { c as o, a as r, s as i } from "./floorplan.ready-BQetaqdP.js";
4
- import { z as c } from "./index.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 a = new t.Error().stack;
10
- a && (t._sentryDebugIds = t._sentryDebugIds || {}, t._sentryDebugIds[a] = "150c8853-0257-4bd0-8794-846a7aff39e4", t._sentryDebugIdIdentifier = "sentry-dbid-150c8853-0257-4bd0-8794-846a7aff39e4");
11
- } catch {
12
- }
13
- })();
14
- const n = [];
15
- function l() {
16
- const t = n.map((s) => s.width * s.height).reduce((s, d) => s += d, 0), a = n.map((s) => /* @__PURE__ */ e.jsxs("div", { className: "debug__canvas", id: s.toDataURL(), children: [
17
- s.width,
18
- "x",
19
- s.height,
20
- "=",
21
- s.width * s.height,
22
- /* @__PURE__ */ e.jsx("br", {}),
23
- /* @__PURE__ */ e.jsx("img", { src: s.toDataURL(), alt: "", crossOrigin: "anonymous" })
24
- ] }, s.toDataURL()));
25
- return /* @__PURE__ */ e.jsxs("div", { className: "debug", children: [
26
- /* @__PURE__ */ e.jsx("button", { onClick: () => i.searchStore.selectSearch(""), children: c("Close") }),
27
- /* @__PURE__ */ e.jsxs("div", { children: [
28
- "Total square: ",
29
- t
30
- ] }),
31
- a
32
- ] });
33
- }
34
- const b = () => o(() => /* @__PURE__ */ e.jsx(e.Fragment, { children: r.list.type === "search" && r.list.text === "q1" ? /* @__PURE__ */ e.jsx(l, {}) : null }));
35
- export {
36
- b as default
37
- };
38
-
39
- ;/* vite-per-chunk-css */
40
- __vite_inject_css__(".debug{position:fixed;top:1rem;left:1vw;z-index:999;width:calc(100vw - 2rem);height:calc(100vh - 2rem);padding:1rem;overflow:scroll;background:var(--color-white);box-shadow:0 0 1rem #00000080}.debug label{display:block;font-weight:var(--font-weight-bold)}.debug__canvas{display:inline-block;padding:2px;vertical-align:top}.debug__canvas>img{background:var(--color-gray-300)}\n/*$vite$:1*/", "Debug.css");
@@ -1,47 +0,0 @@
1
- import { j as s } from "./jsx-runtime-CoKhM3tL.js";
2
- import { y as o } from "./index-jp-Zhdyp.js";
3
- import { u as d, a, b as f, c as l } from "./floorplan.ready-BQetaqdP.js";
4
- import { z as n } from "./index.js";
5
- (function() {
6
- try {
7
- var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
8
- e.SENTRY_RELEASE = { id: "3.0.1" };
9
- var t = new e.Error().stack;
10
- t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "bedd5b4f-e9b3-4464-9824-85b01f4fb92f", e._sentryDebugIdIdentifier = "sentry-dbid-bedd5b4f-e9b3-4464-9824-85b01f4fb92f");
11
- } catch {
12
- }
13
- })();
14
- const i = "note-dismissed5";
15
- function p() {
16
- const e = d(() => ({
17
- hidden: !0,
18
- get top() {
19
- return a.screenSize.width <= 820;
20
- },
21
- get classes() {
22
- return o({
23
- demo: !0,
24
- top: this.top,
25
- hidden: this.hidden
26
- });
27
- }
28
- }));
29
- return f(() => {
30
- sessionStorage.getItem(i) || window.setTimeout(() => {
31
- e.hidden = !1;
32
- }, 2e3);
33
- }), l(() => /* @__PURE__ */ s.jsx("div", { className: e.classes, children: /* @__PURE__ */ s.jsxs("section", { children: [
34
- /* @__PURE__ */ s.jsx("div", { className: "demo__message", children: /* @__PURE__ */ s.jsxs("span", { children: [
35
- n("Get your free floor plan at"),
36
- " ",
37
- /* @__PURE__ */ s.jsx("a", { href: "https://expofp.com/", target: "_blank", rel: "noopener noreferrer", children: "ExpoFP.com" })
38
- ] }) }),
39
- /* @__PURE__ */ s.jsx("a", { href: "/", onClick: t, className: "demo__dismiss", children: n("Dismiss") })
40
- ] }) }));
41
- function t(r) {
42
- r.preventDefault(), e.hidden = !0, sessionStorage.setItem(i, "1");
43
- }
44
- }
45
- export {
46
- p as default
47
- };