@expofp/floorplan 3.42.1 → 3.43.1

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 (170) hide show
  1. package/dist/browser/{Button-CFOilpWS.js → Button-ChvBlyDe.js} +6 -6
  2. package/dist/browser/{CookieConsent-7xtFQUAC.js → CookieConsent-B79szHaS.js} +8 -8
  3. package/dist/browser/{Debug-Ccq8j5HJ.js → Debug-BmtrxpLX.js} +10 -10
  4. package/dist/browser/{DebugTools-dIItZaUb.js → DebugTools-D4NbQEtd.js} +7 -7
  5. package/dist/browser/{Demo-waaMiBvy.js → Demo-C1jGPlTZ.js} +13 -13
  6. package/dist/browser/{Free-DdCaOZ8Q.js → Free-CrPKA8NB.js} +16 -15
  7. package/dist/browser/{GalleryContainer-DlucEORI.js → GalleryContainer-Byk_AjCO.js} +470 -469
  8. package/dist/browser/{GpsLoader-cqPoX_Zr.js → GpsLoader-xcrMJQ3k.js} +40 -37
  9. package/dist/browser/{KioskStore-BJwAcVii.js → KioskStore-CCqEIeOE.js} +52 -48
  10. package/dist/browser/{store-DKVnQzpY.js → LayerStore-CfhO9JTt.js} +21374 -31265
  11. package/dist/browser/{MaplibreAdapter-BZD4cOe-.js → MaplibreAdapter-BkdCl4p0.js} +290 -285
  12. package/dist/browser/{ModalContainer-BSvSFPr9.js → ModalContainer-CdqhG7DC.js} +11 -11
  13. package/dist/browser/{PermissionNotice-DXt-j2f7.js → PermissionNotice-271evNUE.js} +7 -7
  14. package/dist/browser/RouteStore-DYDocOLg.js +1203 -0
  15. package/dist/browser/SetKioskMode-DWceqgEp.js +50 -0
  16. package/dist/browser/{ShowKiosk-BhS74u62.js → ShowKiosk-D5DyThTi.js} +18 -17
  17. package/dist/browser/UIState-Saj7Kjjr.js +2026 -0
  18. package/dist/browser/{ViewerMenuPanel-BYTeVxTR.js → ViewerMenuPanel--NAIzyGt.js} +25 -24
  19. package/dist/browser/{add-debug-secret-listener-B3Oo6_V2.js → add-debug-secret-listener-BqwoAVWZ.js} +1 -1
  20. package/dist/browser/{adopt-global-settings-Yr-a_0F-.js → adopt-global-settings-DvAJraFg.js} +10 -10
  21. package/dist/browser/{boolean-editor-BA7H18pG.js → boolean-editor-Co1Ily6N.js} +10 -10
  22. package/dist/browser/{bootIntercom-BEZV9AQ2.js → bootIntercom-BxKpklX4.js} +3 -3
  23. package/dist/browser/bundle.json +110 -71
  24. package/dist/browser/{camera-events-CJhSKz2q.js → camera-events-BnYGheBl.js} +1 -1
  25. package/dist/browser/{classnames-D4c_D7C1.js → classnames-NaSmbmqt.js} +2 -2
  26. package/dist/browser/{client-DGjMk9A1.js → client-CvZjZ5MY.js} +6 -6
  27. package/dist/browser/{components-MaSv6j2M.js → components-BC_4Rrtm.js} +1491 -1457
  28. package/dist/browser/create-live-plan-DdDxRVpo.js +3650 -0
  29. package/dist/browser/{debug-context-C2PWyEVT.js → debug-context-rb_t7BzM.js} +6 -6
  30. package/dist/browser/{debug-overlay-BXHh1LRW.js → debug-overlay-DX9d63U6.js} +11 -11
  31. package/dist/browser/{debug-ui-CO-3GLEU.js → debug-ui-1zRSn-Pt.js} +7 -7
  32. package/dist/browser/{dimming-kPNlXUew.js → dimming-D9erakE3.js} +277 -270
  33. package/dist/browser/{dist-DEm0E-fN.js → dist-BupLuz7e.js} +6 -6
  34. package/dist/browser/{dist-3gOjtf_f.js → dist-Dy3X0upa.js} +3 -3
  35. package/dist/browser/{dist-B3PLpTVy.js → dist-Dy4ATR13.js} +7 -7
  36. package/dist/browser/{efp-debug-init-DkOOpU1g.js → efp-debug-init-DTmBNC1u.js} +4 -4
  37. package/dist/browser/{enum-editor-DPAX_cAI.js → enum-editor-DS9Mi20y.js} +5 -5
  38. package/dist/browser/{es5-CpN6LQeU.js → es5-TGy8TG8S.js} +2 -2
  39. package/dist/browser/{event-head-oYEDbvk3.js → event-head-ccloCQPA.js} +1 -1
  40. package/dist/browser/{event-not-found-C7GLCJX7.js → event-not-found-B4UzwYx9.js} +4 -4
  41. package/dist/browser/event-scoped-cache-Bo8Pi1bU.js +22 -0
  42. package/dist/browser/{exports-3uPTDFG9.js → exports-DkrDN44T.js} +1 -1
  43. package/dist/browser/{favicon-CQpg641Z.js → favicon-BO6r3JQD.js} +1 -1
  44. package/dist/browser/{fetch-retry.umd-Chmlkexp.js → fetch-retry.umd-CBKWHeDp.js} +2 -2
  45. package/dist/browser/{flex--99NWgQk.js → flex-DK-UWQj-.js} +6 -6
  46. package/dist/browser/{floorplan.loader-Ci226yql.js → floorplan.loader-C3iy3aV0.js} +658 -707
  47. package/dist/browser/{floorplan.ready-y0hYLknK.js → floorplan.ready-Dfo1nWhu.js} +373 -359
  48. package/dist/browser/freeBanner-C7xKlqKw.js +31 -0
  49. package/dist/browser/{fuse-BuFi3LTO.js → fuse-BQcpTy7r.js} +2 -2
  50. package/dist/browser/{i18n-BAQekIFF.js → i18n-D6Lq_Buf.js} +1821 -3872
  51. package/dist/browser/index.js +131 -47
  52. package/dist/browser/{index.module-CXN9GK4C.js → index.module-BSoufRTU.js} +17 -17
  53. package/dist/browser/init-ui-1FfbXJGw.js +286 -0
  54. package/dist/browser/integrateKiosk-D9Q6DLBE.js +35 -0
  55. package/dist/browser/{loadImage-xbueiJmr.js → is-debug-COmQqgiL.js} +30 -14
  56. package/dist/browser/{is-own-domain-DPJZoBiw.js → is-own-domain-DJo0J_LD.js} +1 -1
  57. package/dist/browser/{is-webview-Bs8mxX94.js → is-webview-BBchBwKM.js} +1 -1
  58. package/dist/browser/{jsx-runtime-BXbSNrYY.js → jsx-runtime-DL-d6MrM.js} +2 -2
  59. package/dist/browser/kiosk-mode-_np8_B-l.js +33 -0
  60. package/dist/browser/{kiosk-record-CaWjqNGY.js → kiosk-record-BmaguqBS.js} +1 -1
  61. package/dist/browser/kioskApi-C07lc5Lj.js +440 -0
  62. package/dist/browser/{lib-jJ4yMeEA.js → lib-DrLsicOU.js} +3 -3
  63. package/dist/browser/loadImage-gvajvqmr.js +17 -0
  64. package/dist/browser/{logDeviceInfo-DSmmt_FU.js → logDeviceInfo-Dp6nkPPj.js} +9 -9
  65. package/dist/browser/{mobx-BQA2EJH7.js → mobx-Dfa_Tj0c.js} +11 -11
  66. package/dist/browser/mobx.module-ionKiiCb.js +2064 -0
  67. package/dist/browser/{optional-boolean-editor-Y_exy4JL.js → optional-boolean-editor-IDS6OcC1.js} +4 -4
  68. package/dist/browser/{optional-enum-editor-CKfj0OB9.js → optional-enum-editor-CmHeQhFh.js} +5 -5
  69. package/dist/browser/{optional-string-editor-DeavwcWv.js → optional-string-editor-5lm4OVVA.js} +5 -5
  70. package/dist/browser/{particles.min-BJkirBpN.js → particles.min-Djywwk9n.js} +2 -2
  71. package/dist/browser/{react-CV1gH7Zp.js → react-DATIS1Wg.js} +2 -2
  72. package/dist/browser/{react-dom-BEwgcqEB.js → react-dom-CZoP3ON8.js} +3 -3
  73. package/dist/browser/{rolldown-runtime-BiAnyumg.js → rolldown-runtime-C54u_qRI.js} +1 -1
  74. package/dist/browser/scene-CR4jNFce.js +108 -0
  75. package/dist/browser/{scheduler-CcNpP8xn.js → scheduler-B2SwSUg3.js} +2 -2
  76. package/dist/browser/{select-B13QBWfy.js → select-BXuAa5Mm.js} +11 -11
  77. package/dist/browser/{settings-DJUw3GyU.js → settings-DWSfrYuK.js} +2 -2
  78. package/dist/browser/{settings-item-VzMuDMX6.js → settings-item-Bg1kzAE-.js} +7 -7
  79. package/dist/browser/store-DKFByqxw.js +58 -0
  80. package/dist/browser/{string-editor-B6mio7nq.js → string-editor-CHJTsfW0.js} +5 -5
  81. package/dist/browser/{text-field-7dZmg829.js → text-field-Daedvncr.js} +6 -6
  82. package/dist/browser/{theme-BotlxmwW.js → theme-hSwmbdBg.js} +9 -9
  83. package/dist/browser/{ui-Dn5rbA7O.js → ui-BIFt_vYU.js} +9 -9
  84. package/dist/browser/{useRenderTarget-Rz0x5k4l.js → useRenderTarget-Cf0eV2dg.js} +5 -5
  85. package/dist/browser/{viewport-DOIlU3cR.js → viewport-Dvo8x5tc.js} +4 -3
  86. package/dist/browser/wayfinding-UIwKgl3o.js +2322 -0
  87. package/dist/esm/components/GalleryContainer.js +1 -1
  88. package/dist/esm/components/Kiosk/integrateKiosk.js +1 -1
  89. package/dist/esm/components/LogoOverlay.js +1 -1
  90. package/dist/esm/components/Map/Map.js +1 -1
  91. package/dist/esm/components/Map/MapCamera.js +1 -1
  92. package/dist/esm/components/Map/booth-by-xy.d.ts +8 -10
  93. package/dist/esm/components/Map/booth-by-xy.js +1 -1
  94. package/dist/esm/components/Map/drawing/config/BoothShape.d.ts +0 -1
  95. package/dist/esm/components/Map/drawing/config/BoothShape.js +1 -1
  96. package/dist/esm/components/Map/drawing/config/config-booth-bg.js +1 -1
  97. package/dist/esm/components/Map/drawing/config/config-booth-bookmark.js +1 -1
  98. package/dist/esm/components/Map/drawing/config/config-booth-border.js +1 -1
  99. package/dist/esm/components/Map/drawing/config/config-booth-labels-special.js +2 -2
  100. package/dist/esm/components/Map/drawing/config/config-booth-labels.js +1 -1
  101. package/dist/esm/components/Map/drawing/config/config-booths.js +1 -1
  102. package/dist/esm/components/Map/drawing/config/config-markers.js +1 -1
  103. package/dist/esm/components/Map/drawing/config/layer-images.d.ts +7 -2
  104. package/dist/esm/components/Map/drawing/config/layer-images.js +1 -1
  105. package/dist/esm/components/Map/traffic/useManageTraffic.js +1 -1
  106. package/dist/esm/components/Maplibre/MaplibreAdapter.js +1 -1
  107. package/dist/esm/components/Maplibre/useCameraReactions.js +1 -1
  108. package/dist/esm/components/Maplibre/utils/geo-config.js +1 -1
  109. package/dist/esm/components/Maplibre/utils/map-helpers.js +1 -1
  110. package/dist/esm/components/Menu.js +1 -1
  111. package/dist/esm/data/fpGeo.d.ts +6 -1
  112. package/dist/esm/data/fpGeo.js +1 -1
  113. package/dist/esm/data/index.d.ts +9 -4
  114. package/dist/esm/data/index.js +1 -1
  115. package/dist/esm/data/svg.d.ts +15 -13
  116. package/dist/esm/data/svg.js +1 -1
  117. package/dist/esm/floorplan.loader.d.ts +6 -1
  118. package/dist/esm/floorplan.loader.js +1 -1
  119. package/dist/esm/floorplan.ready.d.ts +8 -2
  120. package/dist/esm/floorplan.ready.js +1 -1
  121. package/dist/esm/load.js +11 -11
  122. package/dist/esm/plan-lifecycle.d.ts +65 -0
  123. package/dist/esm/plan-lifecycle.js +1 -0
  124. package/dist/esm/services/URLFilterManager.js +1 -1
  125. package/dist/esm/services/url-dispatch.js +1 -1
  126. package/dist/esm/services/url-sync.d.ts +5 -1
  127. package/dist/esm/services/url-sync.js +1 -1
  128. package/dist/esm/store/MaplibreStore.js +1 -1
  129. package/dist/esm/store/OverlayStore.d.ts +15 -2
  130. package/dist/esm/store/OverlayStore.js +1 -1
  131. package/dist/esm/store/RouteStore.js +1 -1
  132. package/dist/esm/store/UIState.js +1 -1
  133. package/dist/esm/store/create-live-plan.d.ts +13 -0
  134. package/dist/esm/store/create-live-plan.js +1 -0
  135. package/dist/esm/store/index.d.ts +2 -13
  136. package/dist/esm/store/index.js +1 -1
  137. package/dist/esm/store/init/init-booths.js +1 -1
  138. package/dist/esm/store/init/init-events.js +1 -1
  139. package/dist/esm/store/init/init-exhibitors.js +1 -1
  140. package/dist/esm/store/init/init-layers.js +1 -1
  141. package/dist/esm/store/init/init-speakers.js +1 -1
  142. package/dist/esm/store/init/init-ui.d.ts +4 -6
  143. package/dist/esm/store/init/init-ui.js +1 -1
  144. package/dist/esm/store/live-store.d.ts +19 -0
  145. package/dist/esm/store/live-store.js +1 -0
  146. package/dist/esm/store/search-buttons/SearchButtonsStore.js +1 -1
  147. package/dist/esm/tools/event-scoped-cache.d.ts +13 -0
  148. package/dist/esm/tools/event-scoped-cache.js +1 -0
  149. package/dist/esm/tools/gtag.d.ts +15 -1
  150. package/dist/esm/tools/gtag.js +1 -1
  151. package/dist/esm/tools/reset.js +1 -1
  152. package/dist/esm/tools/settings.d.ts +7 -2
  153. package/dist/esm/tools/settings.js +1 -1
  154. package/dist/esm/tools/slug.js +1 -1
  155. package/dist/esm/tools/style-registry.d.ts +28 -0
  156. package/dist/esm/tools/style-registry.js +1 -0
  157. package/dist/esm/tools/track-event.js +1 -1
  158. package/dist/esm/types.d.ts +7 -1
  159. package/dist/esm/utils/entity-storage.js +1 -1
  160. package/dist/esm/utils/gps.js +1 -1
  161. package/dist/esm/utils/plan-reactions.d.ts +20 -0
  162. package/dist/esm/utils/plan-reactions.js +1 -0
  163. package/dist/esm/utils/preview-exhibitor.d.ts +9 -2
  164. package/dist/esm/utils/preview-exhibitor.js +1 -1
  165. package/dist/esm/utils/swappable-proxy.d.ts +28 -0
  166. package/dist/esm/utils/swappable-proxy.js +1 -0
  167. package/dist/esm/wayfinding/createWayfinding.js +1 -1
  168. package/package.json +32 -10
  169. package/dist/browser/SetKioskMode-CCZNdKum.js +0 -48
  170. package/dist/browser/integrateKiosk-DjIKsfAy.js +0 -34
@@ -1 +1 @@
1
- import{__decorate as n}from"tslib";import{Box as x,boxContainsPoint as G,pointDistance as L}from"@expofp/geometry";import{action as f,computed as g,observable as u}from"mobx";import{getName as B}from"../components/Kiosk/SetKiosk";import{mapCamera as T}from"../components/Map/camera";import{DEFAULT_UNITS as E,ORIENTATION_GRANTED_KEY as U}from"../constants";import P from"../data";import{fpGeo as w}from"../data/fpGeo";import{getLayerSvg as $,svgArea as h}from"../data/svg";import{GaEventActions as V,sendEventToGa as K}from"../tools/gtag";import D from"../tools/logger";import{areLayersEnabled as W}from"../utils/areLayersEnabled";import{calcSpeed as A}from"../utils/calcSpeed";import{calcTravelTime as I}from"../utils/calcTravelTime";import{calculateRelativeBearing as Z,convertGpsToLocal as C,isValidPointCoords as b}from"../utils/gps";import{boothToEndpoint as M,buildRoute as q,CURRENT_LOCATION_NAME as j,CURRENT_POSITION_POINT_ID as X,isWayfindingReady as Y,KIOSK_ANCHOR_POINT_ID as H,toArbitraryPoint as N}from"../wayfinding";import c,{layersStore as R,uiState as p}from".";import{BoothBase as y}from"./BoothStore";import{LayersMode as J}from"./LayerStore";import{revealLayer as O}from"./reveal-layer.js";function d(o){return typeof o=="string"?Number(o.replace(",",".")):o}export default class i{constructor(t){this.routeLines=[],this.routeDistance=null,this.currentPosition=null,this.requestCompass=!1,this.iconType=0,this.tempToBooth=null,this.focusEnabled=!0,this.prevZ=null,this.markersData={icons:[],markers:[]},this.prevMarkers=[],this.pendingReveal=null,this.showAccessible=!1,this.onlyAccessible=!1,this.currentRouteLayer=null,this.currentRouteExhibitor=null,this.routeUnits=E,this.isGpsTrackingEnabled=!0,this.rootStore=t,this.focusEnabled=!window.location.search}get canFindLocation(){return!!p.kioskData||!!this.currentPosition}selectRoute(t,e=!0,r=!1){if(e&&(p.list={type:"search",text:"",focused:!1}),t&&!t.from&&t.to){const s=this.resolveFallbackFrom();s&&(t=new Route(s,t.to,t.waypoints))}t?.from&&t?.to&&t.from===t.to&&(t=null);const l=[];t?.from&&t?.to&&window.setTimeout(()=>{this.rootStore.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50),t?.from instanceof y&&t.from.visible&&l.push(t.from),t?.to instanceof y&&t.to.visible&&(this.tempToBooth=null,l.push(t.to)),!t&&c.fp.onDirection&&c.fp.onDirection(null);const a=f(()=>{if(this.rootStore.moveToList(l),p.details=t,t&&(!t.from||!t.to)&&p.overlayBottom&&(p.desiredOverlaySize="medium"),t?.to&&t?.from){const s=Q(t.from);s&&this.rootStore.layerStore.updateVisibility(s,!0)}if(!this.currentRouteLayer){const s=_(this.rootStore.layerStore,t?.from),m=_(this.rootStore.layerStore,t?.to);s?this.currentRouteLayer=s:m&&(this.currentRouteLayer=m)}e&&t?.from&&t?.to&&K(V.ClickDirections,`${t?.from?"From "+t.from.name:""} ${t?.to?"To "+t.to.name:""}`)});r?a():setTimeout(a,200)}rebuildRouteFromPosition(t){const e=p.selectedRoute;e?.to&&this.selectRoute(new Route(t,e.to,e.waypoints),!1,!0)}resolveFallbackFrom(){if(this.currentPosition)return N(this.currentPosition,j,X);const t=p.kioskData;return t?N({x:t.x,y:t.y,z:t.z??void 0},B(),H):null}setStartPoint(t){const e=p.selectedRoute;if(e?.to&&!e?.from&&t){const r=new Route(t,e.to,e.waypoints);this.selectRoute(r)}}get pathLayers(){return c.routeStore.routeLines?.map(t=>t.p0.layer)?.filter((t,e,r)=>r.indexOf(t)===e).map((t,e)=>({id:e+1,layer:c.layerStore.findLayer(t)}))}getNearestBooth(t){if(!t)return null;const e=this.rootStore.layerStore.findLayer(t.z),r=w?.properties.config,l=!!(t.lat&&t.lng),a=r&&l?C(t,r):t;return!a||!b(a.x)||!b(a.y)?null:this.rootStore.boothStore.booths.filter(s=>R.mode===J.Default||!e?s.visible&&s.rect:s.rect&&(typeof t.z!="number"&&!t.z&&s.visible||e.name===s.layer?.name)).sort((s,m)=>L(a,s.rect.center)-L(a,m.rect.center))[0]||null}setMarkers(t){this.markersData.markers=(t?.markers??[]).map(tt),this.markersData.icons=t?.icons??[]}selectMarker(t,e){const r=this.markersData.markers.find(a=>a.id===t);this.markersData.markers.forEach(a=>a.active=!1),r&&(r.active=!0);const l=c.layerStore.findLayer(r?.z);if(e&&r){l&&!l?.visible&&R.updateVisibility(l,!0);const a=T();return a?a.api.panTo({x:r.x,y:r.y}):(D.warn("Map camera is not mounted. Cannot pan to marker."),Promise.resolve())}return Promise.resolve()}get selectedMarkers(){return this.markersData.markers.filter(t=>t.active)}get layers(){const t=[];return c.routeStore.routeLines?.map(e=>e.p0.layer).forEach(e=>{t.indexOf(e)===-1&&t.push(e)}),t.map(e=>c.layerStore.layers.find(r=>r.name===e)).filter(e=>!!e)}clickRoute(t,e){window.__resett&&window.__resett(),this.rootStore.uiState.menu=!1,p.list.type==="route-planner"&&(p.list={type:"search",text:"",focused:!1}),this.selectRoute(new Route(t,e))}selectCurrentPosition(t,e=!0,r){clearTimeout(this.cpTimeout),t&&(t.x=d(t.x),t.y=d(t.y),t.lat!==void 0&&(t.lat=d(t.lat)),t.lng!==void 0&&(t.lng=d(t.lng)),W()||(t.z=void 0));const l=e&&this.rootStore.uiState.details&&!(this.rootStore.uiState.details instanceof Route),a=e&&!l&&(this.focusEnabled||this.prevZ!=t?.z);this.focusEnabled&&(this.focusEnabled=!1),this.prevZ=t?.z?.toString()??null,this.iconType=r?1:0;const s=t?et(t):null;if(!t||!s){this.currentPosition=null;return}const m=c.layerStore.findLayer(t.z),k=new CurrentPosition(s.x,s.y,m?.name||this.currentRouteLayer?.name,Z(s),t.lat,t.lng);let v=!this.routeLines?.length;m&&this.routeLines?.length&&(v=!!this.routeLines.find(S=>S.p0.layer===m.name||S.p1.layer===m.name));const F=a&&v;this.currentPosition=k,F&&this.focusOnPosition(k,m),this.gpsEnabled||(this.cpTimeout=setTimeout(()=>{this.currentPosition&&this.selectCurrentPosition(null,!1)},30*1e3))}findLocation(){if(!this.canFindLocation)return;const t=this.currentPosition??p.kioskData;t&&(this.currentPosition&&localStorage.getItem(U)==="false"&&(c.routeStore.requestCompass=!0),this.pendingReveal?.(),this.pendingReveal=O({layer:c.layerStore.findLayer(t.z),show:e=>R.updateVisibility(e,!0),then:()=>{p.moveToRect=this.findLocationRect(t)}}))}findLocationRect(t){const e=x.fromCenter(t,{x:100,y:100});if(e.intersects(h))return e;const r=Math.max(h.min.x,Math.min(t.x,h.max.x)),l=Math.max(h.min.y,Math.min(t.y,h.max.y)),a=Math.min(h.size.width,h.size.height)*.3,s=x.fromCenter({x:r,y:l},{x:a,y:a}).intersection(h);return s?x.fromUnion(e,s):e}focusOnPosition(t,e){this.pendingReveal?.(),this.pendingReveal=O({layer:e,show:r=>R.updateVisibility(r,!0),then:()=>{if(c.maplibreStore.showMaplibre){p.moveToLocation=!0;return}const r=T();if(r){r.api.panTo({x:t.x,y:t.y});return}D.warn("Map camera is not mounted. Cannot pan to current position.")}})}get routeInfo(){const t=this.routeDistance,e=this.routeUnits;return t?{distance:`${t}${e}`,units:e,time:I(t,A(e))}:null}updateRoute(t,e){!t?.length&&!this.routeLines.length||(this.routeLines=t,this.updateRoutePoints())}updateRouteDistance(t){if(t==null)return;const e=$(),r=(e.getAttribute("units")||E).toLowerCase?.().trim(),l=e.getAttribute("fp-ver")?.startsWith("5")??!1;this.routeDistance=Math.round(t/(l?1:10)),this.routeUnits=r,this.updateRoutePoints()}updateRoutePoints(){const t=p.selectedRoute,e=this.routeDistance,r=this.routeUnits;c.fp.onDirection&&setTimeout(()=>{c.fp.onDirection({from:z(t?.from??null),to:z(t?.to??null),lines:this.routeLines,distance:e==null?"":`${e}${r}`,units:r,time:I(e??0,A(r))})},200)}checkRoutes(){if(!Y()){console.warn("checkRoutes: wayfinding is not initialized \u2014 call createWayfinding() first. Skipping route check.");return}const t=c.boothStore.booths;console.info(`Route check started ${t.length}.... `);for(let e=0;e<t.length;e++){const r=t[e];for(let l=e+1;l<t.length;l++){const a=t[l];q(M(r),M(a)).lines.length||console.warn(`No route found from ${r.name} to ${a.name}`)}}console.info("Route check done....")}setGpsTrackingEnabled(t){this.isGpsTrackingEnabled=t}get gpsEnabled(){return P.autoTrackingGps&&this.isGpsTrackingEnabled&&!P.enableIPS}setOnlyAccessible(t){this.onlyAccessible=t}}n([u],i.prototype,"routeLines",void 0),n([u],i.prototype,"routeDistance",void 0),n([u],i.prototype,"currentPosition",void 0),n([u],i.prototype,"requestCompass",void 0),n([u],i.prototype,"iconType",void 0),n([u],i.prototype,"tempToBooth",void 0),n([u],i.prototype,"focusEnabled",void 0),n([u],i.prototype,"prevZ",void 0),n([u],i.prototype,"markersData",void 0),n([u],i.prototype,"prevMarkers",void 0),n([u],i.prototype,"showAccessible",void 0),n([u],i.prototype,"onlyAccessible",void 0),n([u],i.prototype,"currentRouteLayer",void 0),n([u],i.prototype,"currentRouteExhibitor",void 0),n([g],i.prototype,"canFindLocation",null),n([f],i.prototype,"selectRoute",null),n([f],i.prototype,"rebuildRouteFromPosition",null),n([f],i.prototype,"setStartPoint",null),n([g({keepAlive:!0})],i.prototype,"pathLayers",null),n([f],i.prototype,"setMarkers",null),n([f],i.prototype,"selectMarker",null),n([g({keepAlive:!0})],i.prototype,"selectedMarkers",null),n([g({keepAlive:!0})],i.prototype,"layers",null),n([f],i.prototype,"clickRoute",null),n([f],i.prototype,"selectCurrentPosition",null),n([f],i.prototype,"findLocation",null),n([u],i.prototype,"routeUnits",void 0),n([g],i.prototype,"routeInfo",null),n([f],i.prototype,"updateRoute",null),n([f],i.prototype,"updateRouteDistance",null),n([f],i.prototype,"updateRoutePoints",null),n([f],i.prototype,"checkRoutes",null),n([u],i.prototype,"isGpsTrackingEnabled",void 0),n([f],i.prototype,"setGpsTrackingEnabled",null),n([g({keepAlive:!0})],i.prototype,"gpsEnabled",null),n([f],i.prototype,"setOnlyAccessible",null);function Q(o){if(o)return o instanceof y?o.layer?.name:o.layer}function _(o,t){return t?t instanceof y?t.layer??null:o.findLayer(t.layer):null}function tt(o){return{...o,x:d(o.x),y:d(o.y),lat:o.lat===void 0?void 0:d(o.lat),lng:o.lng===void 0?void 0:d(o.lng)}}function et(o){const t=w?.properties.config??null;let e=null;return t&&G({min:t.p0,max:t.p2},o)?e={...o}:t&&b(o.lat)&&b(o.lng)?e=C(o,t):t||(e=o),e||null}export function findBooth(o){return c.boothStore.findBooth(o)||c.exhibitorStore.findExhibitor(o)?.booths[0]}export function findEntityByExternalId(o){const t=c.boothStore.boothByExternalId.get(o);if(t)return{type:"booth",entity:t};const e=c.exhibitorStore.exhibitorByExternalId.get(o);if(e)return{type:"exhibitor",entity:e}}export function separateExternalIds(o){const t=[],e=[];for(const r of o){const l=findEntityByExternalId(r);l&&(l.type==="booth"?t.push(r):e.push(r))}return{boothExternalIds:t,exhibitorExternalIds:e}}export function extractRoute(o,t,e){return new Route(findBooth(o)??null,findBooth(t)??null,e?.map(r=>findBooth(r)).filter(r=>!!r))}export class Route{constructor(t,e,r){this.from=t,this.to=e,this.waypoints=r;const l=t instanceof y?t.id:void 0,a=e instanceof y?e.id:void 0;this.waypoints=r?.filter(s=>s&&s.id!==l&&s.id!==a)}}function z(o){return o?o instanceof y?{id:o.id,name:o.name,externalId:o.externalId,layer:{name:o.layer?.name,description:o.layer?.description}}:{id:Number.MAX_SAFE_INTEGER,name:o.name,externalId:void 0,layer:{name:o.layer,description:void 0}}:null}export class CurrentPosition{constructor(t,e,r,l,a,s){this.x=t,this.y=e,this.z=r,this.angle=l,this.lat=a,this.lng=s}}
1
+ import{__decorate as n}from"tslib";import{Box as R,boxContainsPoint as F,pointDistance as S}from"@expofp/geometry";import{action as f,computed as y,observable as u}from"mobx";import{getName as G}from"../components/Kiosk/SetKiosk";import{mapCamera as L}from"../components/Map/camera";import{DEFAULT_UNITS as T,ORIENTATION_GRANTED_KEY as B}from"../constants";import E from"../data";import{getFpGeo as P}from"../data/fpGeo.js";import{getLayerSvg as U,getSvgArea as $}from"../data/svg.js";import{GaEventActions as V,sendEventToGa as K}from"../tools/gtag";import w from"../tools/logger";import{areLayersEnabled as W}from"../utils/areLayersEnabled";import{calcSpeed as D}from"../utils/calcSpeed";import{calcTravelTime as A}from"../utils/calcTravelTime";import{calculateRelativeBearing as Z,convertGpsToLocal as I,isValidPointCoords as g}from"../utils/gps";import{boothToEndpoint as C,buildRoute as q,CURRENT_LOCATION_NAME as j,CURRENT_POSITION_POINT_ID as X,isWayfindingReady as Y,KIOSK_ANCHOR_POINT_ID as H,toArbitraryPoint as M}from"../wayfinding";import c,{layersStore as b,uiState as p}from".";import{BoothBase as d}from"./BoothStore";import{LayersMode as J}from"./LayerStore";import{revealLayer as N}from"./reveal-layer.js";function h(r){return typeof r=="string"?Number(r.replace(",",".")):r}export default class i{constructor(t){this.routeLines=[],this.routeDistance=null,this.currentPosition=null,this.requestCompass=!1,this.iconType=0,this.tempToBooth=null,this.focusEnabled=!0,this.prevZ=null,this.markersData={icons:[],markers:[]},this.prevMarkers=[],this.pendingReveal=null,this.showAccessible=!1,this.onlyAccessible=!1,this.currentRouteLayer=null,this.currentRouteExhibitor=null,this.routeUnits=T,this.isGpsTrackingEnabled=!0,this.rootStore=t,this.focusEnabled=!window.location.search}get canFindLocation(){return!!p.kioskData||!!this.currentPosition}selectRoute(t,e=!0,o=!1){if(e&&(p.list={type:"search",text:"",focused:!1}),t&&!t.from&&t.to){const s=this.resolveFallbackFrom();s&&(t=new Route(s,t.to,t.waypoints))}t?.from&&t?.to&&t.from===t.to&&(t=null);const a=[];t?.from&&t?.to&&window.setTimeout(()=>{this.rootStore.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50),t?.from instanceof d&&t.from.visible&&a.push(t.from),t?.to instanceof d&&t.to.visible&&(this.tempToBooth=null,a.push(t.to)),!t&&c.fp.onDirection&&c.fp.onDirection(null);const l=f(()=>{if(this.rootStore.moveToList(a),p.details=t,t&&(!t.from||!t.to)&&p.overlayBottom&&(p.desiredOverlaySize="medium"),t?.to&&t?.from){const s=Q(t.from);s&&this.rootStore.layerStore.updateVisibility(s,!0)}if(!this.currentRouteLayer){const s=O(this.rootStore.layerStore,t?.from),m=O(this.rootStore.layerStore,t?.to);s?this.currentRouteLayer=s:m&&(this.currentRouteLayer=m)}e&&t?.from&&t?.to&&K(V.ClickDirections,`${t?.from?"From "+t.from.name:""} ${t?.to?"To "+t.to.name:""}`)});o?l():setTimeout(l,200)}rebuildRouteFromPosition(t){const e=p.selectedRoute;e?.to&&this.selectRoute(new Route(t,e.to,e.waypoints),!1,!0)}resolveFallbackFrom(){if(this.currentPosition)return M(this.currentPosition,j,X);const t=p.kioskData;return t?M({x:t.x,y:t.y,z:t.z??void 0},G(),H):null}setStartPoint(t){const e=p.selectedRoute;if(e?.to&&!e?.from&&t){const o=new Route(t,e.to,e.waypoints);this.selectRoute(o)}}get pathLayers(){return c.routeStore.routeLines?.map(t=>t.p0.layer)?.filter((t,e,o)=>o.indexOf(t)===e).map((t,e)=>({id:e+1,layer:c.layerStore.findLayer(t)}))}getNearestBooth(t){if(!t)return null;const e=this.rootStore.layerStore.findLayer(t.z),o=P()?.properties.config,a=!!(t.lat&&t.lng),l=o&&a?I(t,o):t;return!l||!g(l.x)||!g(l.y)?null:this.rootStore.boothStore.booths.filter(s=>b.mode===J.Default||!e?s.visible&&s.rect:s.rect&&(typeof t.z!="number"&&!t.z&&s.visible||e.name===s.layer?.name)).sort((s,m)=>S(l,s.rect.center)-S(l,m.rect.center))[0]||null}setMarkers(t){this.markersData.markers=(t?.markers??[]).map(tt),this.markersData.icons=t?.icons??[]}selectMarker(t,e){const o=this.markersData.markers.find(l=>l.id===t);this.markersData.markers.forEach(l=>l.active=!1),o&&(o.active=!0);const a=c.layerStore.findLayer(o?.z);if(e&&o){a&&!a?.visible&&b.updateVisibility(a,!0);const l=L();return l?l.api.panTo({x:o.x,y:o.y}):(w.warn("Map camera is not mounted. Cannot pan to marker."),Promise.resolve())}return Promise.resolve()}get selectedMarkers(){return this.markersData.markers.filter(t=>t.active)}get layers(){const t=[];return c.routeStore.routeLines?.map(e=>e.p0.layer).forEach(e=>{t.indexOf(e)===-1&&t.push(e)}),t.map(e=>c.layerStore.layers.find(o=>o.name===e)).filter(e=>!!e)}clickRoute(t,e){window.__resett&&window.__resett(),this.rootStore.uiState.menu=!1,p.list.type==="route-planner"&&(p.list={type:"search",text:"",focused:!1}),this.selectRoute(new Route(t,e))}selectCurrentPosition(t,e=!0,o){clearTimeout(this.cpTimeout),t&&(t.x=h(t.x),t.y=h(t.y),t.lat!==void 0&&(t.lat=h(t.lat)),t.lng!==void 0&&(t.lng=h(t.lng)),W()||(t.z=void 0));const a=e&&this.rootStore.uiState.details&&!(this.rootStore.uiState.details instanceof Route),l=e&&!a&&(this.focusEnabled||this.prevZ!=t?.z);this.focusEnabled&&(this.focusEnabled=!1),this.prevZ=t?.z?.toString()??null,this.iconType=o?1:0;const s=t?et(t):null;if(!t||!s){this.currentPosition=null;return}const m=c.layerStore.findLayer(t.z),x=new CurrentPosition(s.x,s.y,m?.name||this.currentRouteLayer?.name,Z(s),t.lat,t.lng);let k=!this.routeLines?.length;m&&this.routeLines?.length&&(k=!!this.routeLines.find(v=>v.p0.layer===m.name||v.p1.layer===m.name));const z=l&&k;this.currentPosition=x,z&&this.focusOnPosition(x,m),this.gpsEnabled||(this.cpTimeout=setTimeout(()=>{this.currentPosition&&this.selectCurrentPosition(null,!1)},30*1e3))}findLocation(){if(!this.canFindLocation)return;const t=this.currentPosition??p.kioskData;t&&(this.currentPosition&&localStorage.getItem(B)==="false"&&(c.routeStore.requestCompass=!0),this.pendingReveal?.(),this.pendingReveal=N({layer:c.layerStore.findLayer(t.z),show:e=>b.updateVisibility(e,!0),then:()=>{p.moveToRect=this.findLocationRect(t)}}))}findLocationRect(t){const e=R.fromCenter(t,{x:100,y:100}),o=$();if(e.intersects(o))return e;const a=Math.max(o.min.x,Math.min(t.x,o.max.x)),l=Math.max(o.min.y,Math.min(t.y,o.max.y)),s=Math.min(o.size.width,o.size.height)*.3,m=R.fromCenter({x:a,y:l},{x:s,y:s}).intersection(o);return m?R.fromUnion(e,m):e}focusOnPosition(t,e){this.pendingReveal?.(),this.pendingReveal=N({layer:e,show:o=>b.updateVisibility(o,!0),then:()=>{if(c.maplibreStore.showMaplibre){p.moveToLocation=!0;return}const o=L();if(o){o.api.panTo({x:t.x,y:t.y});return}w.warn("Map camera is not mounted. Cannot pan to current position.")}})}get routeInfo(){const t=this.routeDistance,e=this.routeUnits;return t?{distance:`${t}${e}`,units:e,time:A(t,D(e))}:null}updateRoute(t,e){!t?.length&&!this.routeLines.length||(this.routeLines=t,this.updateRoutePoints())}updateRouteDistance(t){if(t==null)return;const e=U(),o=(e.getAttribute("units")||T).toLowerCase?.().trim(),a=e.getAttribute("fp-ver")?.startsWith("5")??!1;this.routeDistance=Math.round(t/(a?1:10)),this.routeUnits=o,this.updateRoutePoints()}updateRoutePoints(){const t=p.selectedRoute,e=this.routeDistance,o=this.routeUnits;c.fp.onDirection&&setTimeout(()=>{c.fp.onDirection({from:_(t?.from??null),to:_(t?.to??null),lines:this.routeLines,distance:e==null?"":`${e}${o}`,units:o,time:A(e??0,D(o))})},200)}checkRoutes(){if(!Y()){console.warn("checkRoutes: wayfinding is not initialized \u2014 call createWayfinding() first. Skipping route check.");return}const t=c.boothStore.booths;console.info(`Route check started ${t.length}.... `);for(let e=0;e<t.length;e++){const o=t[e];for(let a=e+1;a<t.length;a++){const l=t[a];q(C(o),C(l)).lines.length||console.warn(`No route found from ${o.name} to ${l.name}`)}}console.info("Route check done....")}setGpsTrackingEnabled(t){this.isGpsTrackingEnabled=t}get gpsEnabled(){return E.autoTrackingGps&&this.isGpsTrackingEnabled&&!E.enableIPS}setOnlyAccessible(t){this.onlyAccessible=t}}n([u],i.prototype,"routeLines",void 0),n([u],i.prototype,"routeDistance",void 0),n([u],i.prototype,"currentPosition",void 0),n([u],i.prototype,"requestCompass",void 0),n([u],i.prototype,"iconType",void 0),n([u],i.prototype,"tempToBooth",void 0),n([u],i.prototype,"focusEnabled",void 0),n([u],i.prototype,"prevZ",void 0),n([u],i.prototype,"markersData",void 0),n([u],i.prototype,"prevMarkers",void 0),n([u],i.prototype,"showAccessible",void 0),n([u],i.prototype,"onlyAccessible",void 0),n([u],i.prototype,"currentRouteLayer",void 0),n([u],i.prototype,"currentRouteExhibitor",void 0),n([y],i.prototype,"canFindLocation",null),n([f],i.prototype,"selectRoute",null),n([f],i.prototype,"rebuildRouteFromPosition",null),n([f],i.prototype,"setStartPoint",null),n([y({keepAlive:!0})],i.prototype,"pathLayers",null),n([f],i.prototype,"setMarkers",null),n([f],i.prototype,"selectMarker",null),n([y({keepAlive:!0})],i.prototype,"selectedMarkers",null),n([y({keepAlive:!0})],i.prototype,"layers",null),n([f],i.prototype,"clickRoute",null),n([f],i.prototype,"selectCurrentPosition",null),n([f],i.prototype,"findLocation",null),n([u],i.prototype,"routeUnits",void 0),n([y],i.prototype,"routeInfo",null),n([f],i.prototype,"updateRoute",null),n([f],i.prototype,"updateRouteDistance",null),n([f],i.prototype,"updateRoutePoints",null),n([f],i.prototype,"checkRoutes",null),n([u],i.prototype,"isGpsTrackingEnabled",void 0),n([f],i.prototype,"setGpsTrackingEnabled",null),n([y({keepAlive:!0})],i.prototype,"gpsEnabled",null),n([f],i.prototype,"setOnlyAccessible",null);function Q(r){if(r)return r instanceof d?r.layer?.name:r.layer}function O(r,t){return t?t instanceof d?t.layer??null:r.findLayer(t.layer):null}function tt(r){return{...r,x:h(r.x),y:h(r.y),lat:r.lat===void 0?void 0:h(r.lat),lng:r.lng===void 0?void 0:h(r.lng)}}function et(r){const t=P()?.properties.config??null;let e=null;return t&&F({min:t.p0,max:t.p2},r)?e={...r}:t&&g(r.lat)&&g(r.lng)?e=I(r,t):t||(e=r),e||null}export function findBooth(r){return c.boothStore.findBooth(r)||c.exhibitorStore.findExhibitor(r)?.booths[0]}export function findEntityByExternalId(r){const t=c.boothStore.boothByExternalId.get(r);if(t)return{type:"booth",entity:t};const e=c.exhibitorStore.exhibitorByExternalId.get(r);if(e)return{type:"exhibitor",entity:e}}export function separateExternalIds(r){const t=[],e=[];for(const o of r){const a=findEntityByExternalId(o);a&&(a.type==="booth"?t.push(o):e.push(o))}return{boothExternalIds:t,exhibitorExternalIds:e}}export function extractRoute(r,t,e){return new Route(findBooth(r)??null,findBooth(t)??null,e?.map(o=>findBooth(o)).filter(o=>!!o))}export class Route{constructor(t,e,o){this.from=t,this.to=e,this.waypoints=o;const a=t instanceof d?t.id:void 0,l=e instanceof d?e.id:void 0;this.waypoints=o?.filter(s=>s&&s.id!==a&&s.id!==l)}}function _(r){return r?r instanceof d?{id:r.id,name:r.name,externalId:r.externalId,layer:{name:r.layer?.name,description:r.layer?.description}}:{id:Number.MAX_SAFE_INTEGER,name:r.name,externalId:void 0,layer:{name:r.layer,description:void 0}}:null}export class CurrentPosition{constructor(t,e,o,a,l,s){this.x=t,this.y=e,this.z=o,this.angle=a,this.lat=l,this.lng=s}}
@@ -1 +1 @@
1
- import{__decorate as e}from"tslib";import{Box as ot,Point as it}from"@expofp/geometry";import{action as d,computed as n,observable as a}from"mobx";import{setKioskUrlParams as st}from"../components/Kiosk/kioskUrlParam";import{mapScene as rt}from"../components/Map/scene";import{LANGUAGE_TYPE as E,LEGACY_PREVIEW_MODE_STORAGE_KEY as lt,LEGACY_UI_SCALE_STORAGE_KEY as N,LEGACY_VIEWER_MODE_STORAGE_KEY as at,MOBILE_BREAKPOINT as nt,PREVIEW_MODE_STORAGE_KEY as ht,UI_SCALE_STORAGE_KEY as H,VIEWER_MODE_STORAGE_KEY as ct,VISIBILITY_STORAGE_KEY as $}from"../constants";import C from"../data";import{svgArea as _,svgAreaExplicit as pt}from"../data/svg";import{readFreeBannerDismissed as dt}from"../tools/freeBanner";import{hasUserConsent as ut}from"../tools/gtag";import{hasHtmlTags as W}from"../tools/has-html-tags";import ft from"../tools/logger";import L from"../tools/settings";import{stripHtml as Z}from"../tools/strip-html";import{remsToPixels as D}from"../utils";import j from"../utils/browser";import{getLocale as yt,getLocales as mt,t as S}from"../utils/i18n";import{isLocalStorageAvailable as w}from"../utils/localStorage";import{getResponsiveClass as gt}from"../utils/responsiveClass";import{sanitizeStr as X}from"../utils/sanitizeText";import{fitRectIsFraming as St,getVenueFitMarginPercent as vt,resolveVenueFitRect as bt}from"../utils/scene-bounds";import{uiState as B}from".";import{BoothBase as I,RegularBooth as O,SpecialBooth as V}from"./BoothStore";import{EventItem as A}from"./EventStore";import{Exhibitor as x}from"./ExhibitorStore";import{findEntityByExternalId as It,Route as M}from"./RouteStore";import{SpeakerItem as K}from"./SpeakerStore";export const ZOOM_IN_FACTOR=1.5,ZOOM_OUT_FACTOR=.66;const xt=["dimensions25"];export default class t{setSelectedCategoryFilters(o){this.selectedCategoryFilters=o}resetCategoryFilter(){this.selectedCategoryFilters=[],this.categoryFilterOpen=!1}setSearchClearMode(o){this.searchClearMode=o}setRouteTitle(o){this.routeTitle=o}setRouteDescription(o){this.routeDescription=o}setIsMultiPointRoute(o){this.isMultiPointRoute=o}setTourTitle(o){this.tourTitle=o}setTourDescription(o){this.tourDescription=o}setIsMultiPointTour(o){this.isMultiPointTour=o}setPathwayOnlyMode(o){this.pathwayOnlyMode=o}setMultiPointTourList(o){this.list={type:"multi-point-tour",tourId:o}}get activePathwayLayers(){return this.list?.type==="multi-point-tour"?this.rootStore.toursStore.getTourById(this.list.tourId)?.layers?.map(s=>s.id)||[]:[]}get highlightedBooths(){const o=new Set(this.rootStore.exhibitorStore.highlightedByExternalIds),s=new Set(this.rootStore.boothStore.highlightedByExternalIds),i=new Set([...this.rootStore.exhibitorStore.exhibitors.filter(r=>o.has(r.externalId)).flatMap(r=>r.booths.filter(l=>l instanceof O)).map(r=>r.id.toString()),...this.rootStore.boothStore.booths.filter(r=>s.has(r.externalId)).map(r=>r.id.toString())]);if(this.list?.type==="search"&&this.list?.text?.trim().length){i.clear();const r=this.fuzzySearchItems.filter(l=>l.score===0).map(l=>l.item);r.length?F(r,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems).forEach(l=>i.add(l.id.toString())):this.listBooths.forEach(l=>i.add(l.id.toString()))}if(this.list?.type==="filter"&&(i.clear(),this.list.items.flatMap(r=>r.booths.filter(l=>l instanceof O)).forEach(r=>i.add(r.id.toString()))),this.categoryFilterOpen&&this.selectedCategoryFilters.length>0?(i.clear(),this.selectedCategoryFilters.forEach(r=>{r.exhibitors.flatMap(l=>l.booths).forEach(l=>i.add(l.id.toString()))})):this.list?.type==="category"&&(i.clear(),this.list.category.exhibitors.flatMap(r=>r.booths).forEach(r=>i.add(r.id.toString()))),this.list?.type==="bookmarks"&&(i.clear(),F(this.listItems,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems).forEach(r=>i.add(r.id.toString()))),this.list?.type==="visited"&&(i.clear(),F(this.listItems,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems).forEach(r=>i.add(r.id.toString()))),this.list?.type==="exhibitors"){i.clear();const r=this.list.text?.toLowerCase().trim();let l=this.rootStore.exhibitorStore.exhibitors;r&&(l=l.filter(u=>u.name.toLowerCase().includes(r))),l.flatMap(u=>u.booths.filter(g=>g instanceof O)).forEach(u=>i.add(u.id.toString()))}if(this.selectedPoiTypeFilters.length>0&&(i.clear(),this.selectedPoiTypeFilters.forEach(r=>{this.rootStore.boothStore.booths.filter(l=>l.poiTypeId===r.id).forEach(l=>i.add(l.id.toString()))})),this.details instanceof M&&(i.clear(),this.details.from instanceof I&&i.add(this.details.from.id.toString()),this.details.to instanceof I&&i.add(this.details.to.id.toString()),this.details.waypoints?.forEach(r=>i.add(r.id.toString()))),this.details instanceof I&&(i.clear(),i.add(this.details.id.toString())),this.details instanceof x&&(i.clear(),this.details.booths.filter(r=>r instanceof O).forEach(r=>i.add(r.id.toString()))),this.details instanceof A){const r=this.details;if(r.boothId){i.clear();const l=this.rootStore.boothStore.booths.find(u=>u.id===r.boothId);l&&i.add(l.id.toString())}}return i}constructor(o){this.interfaceMetadata=Object.freeze([{id:"menu",className:"efp-overlay-menu",priority:80,isActive:()=>this.menu,searchBoxConfig:()=>({mode:"interface",title:S("Menu")})},{id:"exhibitor",className:"efp-overlay-exhibitor",priority:70,isActive:()=>this.details instanceof x,searchBoxConfig:()=>({mode:"details",title:this.details.name})},{id:"booth",className:"efp-overlay-booth",priority:70,isActive:()=>this.details instanceof I,searchBoxConfig:()=>{const s=this.details;return{mode:"details",title:s.title||s.name}}},{id:"event",className:"efp-overlay-event",priority:70,isActive:()=>this.details instanceof A,searchBoxConfig:()=>({mode:"details",title:this.details.name})},{id:"route",className:"efp-overlay-route",priority:70,isActive:()=>this.details instanceof M,searchBoxConfig:()=>({mode:"details",title:S("Directions")})},{id:"search",className:"efp-overlay-search",priority:60,isActive:()=>!this.details&&!this.menu&&this.list.type==="search"&&(this.rootStore.fp.alwaysShowSidebar&&!this.overlayOnDemand||this.heatmap||this.searchFocused||this.list.text.length>0||this.searchClearMode),searchBoxConfig:()=>({mode:"search",title:S("Search")})},{id:"exhibitors",className:"efp-overlay-exhibitors",priority:50,isActive:()=>this.list.type==="exhibitors"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Exhibitors")})},{id:"filter",className:"efp-overlay-filter",priority:50,isActive:()=>this.list.type==="filter"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Filter")})},{id:"bookmarks",className:"efp-overlay-bookmarks",priority:50,isActive:()=>this.list.type==="bookmarks"&&!this.details,searchBoxConfig:()=>({mode:"interface",title:S("Bookmarks"),badge:this.rootStore.bookmarksStore.total})},{id:"visited",className:"efp-overlay-visited",priority:50,isActive:()=>this.list.type==="visited"&&!this.details,searchBoxConfig:()=>({mode:"interface",title:S("Visited"),badge:this.rootStore.exhibitorStore.visited.length})},{id:E,className:"efp-overlay-language",priority:50,isActive:()=>this.list.type===E,searchBoxConfig:()=>({mode:"interface",title:S("Language")})},{id:"category",className:"efp-overlay-category",priority:50,isActive:()=>!B.menu&&!!B.selectedCategory,searchBoxConfig:()=>({mode:"interface",title:this.list.type==="category"&&this.list.category?.name||S("Categories")})},{id:"sessions",className:"efp-overlay-sessions",priority:50,isActive:()=>this.list.type==="sessions"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Sessions"),subtitle:this.selectedTrack?this.selectedTrack.name:void 0})},{id:"speakers",className:"efp-overlay-speakers",priority:50,isActive:()=>this.list.type==="speakers"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Speakers")})},{id:"speaker",className:"efp-overlay-speaker",priority:50,isActive:()=>this.details instanceof K,searchBoxConfig:()=>({mode:"details",title:this.details.name})},{id:"tours",className:"efp-overlay-tours",priority:50,isActive:()=>this.list.type==="tours"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Guided Tours")})},{id:"multi-point-wayfinding",className:"efp-overlay-multi-point",priority:75,isActive:()=>!!(this.isMultiPointRoute&&this.selectedRoute&&this.list.type!=="route-planner"),searchBoxConfig:()=>({mode:"interface",title:this.routeTitle||S("Multi-point route")})},{id:"multi-point-tour",className:"efp-overlay-multi-point-tour",priority:75,isActive:()=>this.list.type==="multi-point-tour"&&!this.details,searchBoxConfig:()=>({mode:"interface",title:this.tourTitle||S("Multi-point route")})},{id:"route-planner",className:"efp-overlay-route-planner",priority:76,isActive:()=>this.list.type==="route-planner"&&(!this.details||this.details instanceof M),searchBoxConfig:()=>({mode:"interface",title:S("Route planner")})}].sort((s,i)=>i.priority-s.priority)),this.list={type:"search",text:"",focused:!1},this.details=null,this.hoveredExhibitor=null,this.hoveredBooth=null,this.zoomBy=null,this.rollReset=!1,this.moveToBooths=null,this.moveToRect=null,this.moveToRectPaddingPercent=null,this.moveToLocation=!1,this.menu=!1,this.searchFocused=!1,this.searchClearMode=!1,this.printingPdf=!1,this.screenSize=new it(window.innerWidth,window.innerHeight),this.overlayShowsAll=!1,this.centerMap=!1,this.zoomAfTransformK=1,this.activeListIndex=-1,this.devicePixelRatio=window.devicePixelRatio,this.previewExhibitor=null,this.wsStarted=!1,this.canvasStarted=!1,this.kiosk=!1,this.inIdle=!1,this.modalActive={share:!1},this.galleryActive=!1,this.hideOverlay=!1,this.searchButtonsOverride=null,this.hideCookieConsent=!!ut(),this.hideHeaderLogo=!1,this.hideLogoInBooth=!1,this.disableBookmarked=!1,this.hideLanguage=!1,this.monochrome=!1,this.heatmap=!1,this.heatmapYah=!1,this.rootElement=null,this.debugCircles=[],this.mapControlsHidden=!1,this.floorsControlHidden=!1,this.hideFreeOrDemo=!1,this.freeBannerDismissed=dt(sessionStorage),this.currentBanner=null,this.sceneDefReady=!1,this.categoryFilterOpen=!1,this.selectedCategoryFilters=[],this.selectedPoiTypeFilters=[],this.selectedTrack=null,this.subButtonsVisible=!1,this.searchBoxMode="search",this.searchBoxTitle="",this.isMultiPointRoute=!1,this.isMultiPointTour=!1,this.pathwayOnlyMode=!1,this.isOverlayScrolled=!1,this.listScrollTop=0,this.listScrollItemId=null,this.listScrollIndex=0,this.scrollPositions=new Map,this.scrollItemIds=new Map,this._customUIScale=null,this.searchFilterHeightPx=54,this.searchInputHeightPx=54,this.overlayUISizePx=390,this.overlayKioskSizePx=450,this.overlayMediumHeightRems=10,this.headerHeightRem=0,this.wsImageHeightPx=44,this.mapVisibleStart=0,this.forceDim=!1,this.mapSettings={},this.maxPitch=60,this.animatePitch=!0,this.forceShowDetails=!1,this.buildRoute=!1,this.globalErrorMessages=[],this.minUIScale=.8,this.maxUIScale=1.4,this.setKioskModeEnabled=!1,this.kioskData=null,this.rootStore=o,this.mapSettings={...this.defaultMapSettings},this.initializeUIScale()}get rtl(){const o=yt();return o==="ar"||o==="he"}get noOverlay(){return this.rootStore.fp.noOverlay||this.hideOverlay}get overlayOnDemand(){return this.noOverlay&&this.searchButtonsOverride===!0}get overlayHiddenNow(){return this.noOverlay&&!(this.overlayOnDemand&&this.isOverlayOpen)}get onBoothClick(){return this.rootStore.fp.onBoothClick}get onMarkerClick(){return this.rootStore.fp.onMarkerClick}get onBookmarkClick(){return this.rootStore.fp.onBookmarkClick}get onVisitedClick(){return this.rootStore.fp.onVisitedClick}get onCategoryClick(){return this.rootStore.fp.onCategoryClick}get onDirection(){return this.rootStore.fp.onDirection}get onDetails(){return this.rootStore.fp.onDetails}get onExhibitorCustomButtonClick(){return this.rootStore.fp.onExhibitorCustomButtonClick}get onGetCoordsClick(){return this.rootStore.fp.onGetCoordsClick}get selectedExhibitor(){return this.details instanceof x?this.details:null}get selectedBooth(){return this.details instanceof I?this.details:null}get selectedCategory(){return this.list.type==="category"?this.list.category:null}get selectedRoute(){return this.details instanceof M?this.details:null}get selectedSpeaker(){return this.details instanceof K?this.details:null}get uiScale(){return this._customUIScale!==null?this._customUIScale:this.kiosk?1.2:1}get isGuidedToursActive(){return this.rootStore.toursStore.isActive}get getRouteNextFloor(){const o=this.rootStore.routeStore.pathLayers,s=this.rootStore.routeStore.currentRouteLayer?.name;if(!s)return null;const i=o.findIndex(c=>c.layer?.name===s);return i===-1?null:o[i+1]?.layer?.name??null}get headerHeightPx(){return D(this.headerHeightRem)}get overlayPosition(){return this.screenSize.width>nt||this.kiosk?"left":"bottom"}get overlayCollapsed(){return this.kiosk&&this.overlayPosition==="left"&&!this.searchFocused&&!this.menu&&!this.details&&!this.selectedCategory&&!this.selectedExhibitor&&this.list.type!=="bookmarks"&&this.list.type!==E&&!("text"in this.list&&this.list.text.length)}get overlaySize(){return this.overlayLeft?"full":this.desiredOverlaySize}get overlayBottom(){return this.overlayPosition==="bottom"}get overlayLeft(){return this.overlayPosition==="left"}get overlayWidthPx(){return this.overlayHiddenNow?0:this.overlayLeft?this.kiosk?this.overlayKioskSizePx:this.overlayUISizePx:D(this.screenSize.width)}get wsPaddingPx(){return D(.25)}get wsOccupiedHeightPx(){return this.wsShown?this.wsImageHeightPx+this.wsPaddingPx*2:0}get wsShown(){return!this.hideHeaderLogo&&this.rootStore.exhibitorStore.advertised.length>0}get wsDesktopPosition(){return L.EXPO==="cbresupplypartner"?"bottom":"top"}get wsPosition(){return this.overlayBottom?"top":this.wsDesktopPosition}get responsiveClass(){return gt(this.screenSize.width)}get mapVisibleTop(){return(this.wsPosition==="top"?this.wsOccupiedHeightPx:0)+this.headerHeightPx}get mapVisibleBottom(){return this.overlayLeft||this.overlayHiddenNow?this.wsPosition==="bottom"?this.wsOccupiedHeightPx:0:D(this.overlayMediumHeightRems)}get searchActionsHeightPx(){return this.overlayPosition==="bottom"?this.searchInputHeightPx+this.searchFilterHeightPx:this.searchInputHeightPx}get shouldShowSearchButtons(){return this.rootStore.searchButtonsStore.hasAnySearchButtons&&!this.details&&!this.menu&&![E,"filter"].includes(this.list.type)}get shouldShowMobileToggle(){const o=this.list.type==="route-planner";return this.overlayPosition==="bottom"&&(o||!this.details&&!this.menu&&this.list.type!==E&&this.list.type!=="bookmarks"&&this.list.type!=="sessions")}get mobileToggleIsListMode(){return!this.isOverlayOpen||this.overlaySize!=="full"}get canvasVisibleRectPx(){const o=this.screenSize;return ot.fromMinMax({x:B.rtl?0:this.mapVisibleStart,y:this.mapVisibleTop+this.searchActionsHeightPx},{x:B.rtl?o.width-this.mapVisibleStart:o.width,y:o.height-this.mapVisibleBottom})}get shouldShiftMapRect(){return this.overlayPosition==="left"&&(this.details||this.hasAppliedFilters||this.selectedRoute)}get hasAppliedFilters(){return this.selectedCategoryFilters.length>0||this.selectedPoiTypeFilters.length>0}get canvasVisibleRectPt(){return this.canvasVisibleRectPx.scale(this.devicePixelRatio,{x:0,y:0})}get canvasSizePt(){return this.screenSize.multiply(this.devicePixelRatio)}get shouldUseBackdrop(){if(B.overlayCollapsed)return!1;if(w&&localStorage.getItem("forcebackdrop")==="1")return!0;if(this.overlayBottom||this.selectedExhibitor?.leadingImageUrl&&!this.selectedExhibitor?.leadingImageLinkUrl)return!1;const o=j.satisfies({safari:">=13"}),s=j.satisfies({chrome:">=77"});return/(android)/i.test(navigator.userAgent)?!1:o||s&&B.canvasSizePt.height*B.canvasSizePt.width<3e6}setForceDim(o){this.forceDim=o}get dimmed(){return this.forceDim||this.pathwayOnlyMode?!0:this.highlightedBooths.size>0||this.list?.type==="search"&&this.list?.text?.trim().length>0||this.list?.type==="exhibitors"}get defaultSearchItems(){const{exhibitorStore:o,categoryStore:s,boothStore:i,heatmapStore:c}=this.rootStore;let r=o.exhibitors;const l=s.categories.filter(f=>f.exhibitors.length),u=i.booths;this.selectedPoiTypeFilters.length>0&&(r=r.filter(f=>f.booths.some(y=>this.selectedPoiTypeFilters.some(v=>y.poiTypeId===v.id))));let g=[];const k=!this.selectedCategoryFilters.length&&C.showCategories?l.filter(f=>xt.includes(L.EXPO)?!f.name.includes("/"):!0):[],T=u.filter(f=>f instanceof V);return this.selectedCategoryFilters.length>0?g=[...r]:(C.showCompaniesAndBooths&&(g=g.concat(r)),C.showOtherSpaces&&(g=g.concat(T))),this.heatmap?[...r,...u].sort((y,v)=>c.getClicksByType(v)-c.getClicksByType(y)):this.heatmapYah?c.heatmapData?.yah?.sort((f,y)=>c.getClicksByType(y)-c.getClicksByType(f))||[]:r.length===0?u:[...k,...g.sort((f,y)=>{const v=f instanceof x&&f.featured!==void 0,z=y instanceof x&&y.featured!==void 0;if(v!==z)return v?-1:1;const R=f instanceof V&&f.title?f.title:f.name,U=y instanceof V&&y.title?y.title:y.name;return R.localeCompare(U,void 0,{sensitivity:"base",numeric:!0})})]}get searchItems(){if(this.list.type!=="search")return[];const o=this.list.text?.trim().toLowerCase()||"",{exhibitorStore:s,boothStore:i,eventStore:c,speakerStore:r,heatmapStore:l}=this.rootStore;let u=s.exhibitors;const g=i.booths,k=c.eventItems,T=r.speakers;if(this.selectedCategoryFilters.length>0&&(u=u.filter(h=>this.selectedCategoryFilters.some(p=>h.categories.some(m=>m.id===p.id)))),this.selectedPoiTypeFilters.length>0&&(u=u.filter(h=>h.booths.some(p=>this.selectedPoiTypeFilters.some(m=>p.poiTypeId===m.id)))),!o)return this.defaultSearchItems;const f=[o.replace(/&[^&=]+=[^&]+/g,"")];if(this.heatmapYah)return(l.heatmapData.yah??[]).filter(p=>Number.isNaN(Number(o))?p:p.viewCount>=Number(o)).sort((p,m)=>l.getClicksByType(m)-l.getClicksByType(p));const y=[],v=new Set,z=new Set,R=new Set,U=new Set;function G(h){return h?h.replace(/[!@#$%^*\-.,()^#$%:?_+'"/]/g," ").replace(/\s\s+/g," "):""}function b(h,p){return!h||!p?!1:G(h).toLowerCase().includes(G(p).toLowerCase())}function Y(h,p){return h?b(h,p)||b(C.levelTerm+" "+h,p):!1}u.forEach(h=>{f.some(p=>b(h.name,p)||h.booths.some(m=>!p&&b(m.name,p)||Y(m.layer?.name??null,p)))&&v.add(h)}),this.selectedCategoryFilters.length>0&&g.forEach(h=>{(this.heatmap||!(h instanceof O)||!Array.from(v).find(m=>m.booths.includes(h)))&&f.some(m=>b(h.title||"",m)||b(h.name,m)||b(h.fullName,m)||Y(h.layer?.name??null,m))&&z.add(h)});const q=k,tt=T;if(q.forEach(h=>{f.some(p=>b(h.name||"",p)||b(h.description||"",p))&&R.add(h)}),tt.forEach(h=>{f.some(p=>b(h.name,p)||b(h.company,p)||b(h.jobTitle,p))&&U.add(h)}),y.push(...R),y.push(...v),this.heatmap)return y.sort((h,p)=>l.getClicksByType(p)-l.getClicksByType(h));const et=new Map(y.map(h=>[h.id,h]));return y.map(h=>{if(!h.name)return null;const p=X(h instanceof I&&h.fullName.toLowerCase()||h.name.toLowerCase()),m=p.indexOf(X(o));if(m===-1)return null;const Q={id:h.id,position:m,lowerCaseName:p,featured:!1};return h instanceof x&&(Q.featured=h.featured),Q}).filter(h=>!!h).sort((h,p)=>(h.featured||p.featured)&&h.featured!==p.featured?h.featured?-1:1:h.position!==p.position?h.position-p.position:h.lowerCaseName.localeCompare(p.lowerCaseName)||String(h.id).localeCompare(String(p.id))).map(({id:h})=>et.get(h)).filter(h=>!!h)}get searchList(){return[...this.rootStore.eventStore.eventItems,...this.rootStore.speakerStore.speakers,...this.rootStore.categoryStore.categories.filter(o=>o.exhibitors.length),...this.rootStore.exhibitorStore.exhibitors,...this.rootStore.boothStore.booths]}get foundInDescription(){if(this.list?.type!=="search")return[];const o=this.list?.text?.trim().toLowerCase();if(!o)return[];const s=this.fuzzySearchItems.map(({item:l})=>l),i=new Set(s.map(l=>l.name)),c=this.categoryFilteredSearchList.filter(l=>!i.has(l.name)),r=[];for(const l of c){const u=J(l);if(!u)continue;const k=(W(u)?Z(u):u).toLowerCase().indexOf(o);k!==-1&&r.push({item:l,pos:k})}return r.sort((l,u)=>l.pos-u.pos),r.map(l=>l.item)}get foundInDescriptionStruct(){const o={};if(this.list?.type!=="search")return o;const s=this.list?.text?.trim().toLowerCase();return this.foundInDescription.forEach(i=>{let c=J(i);if(!c)return;W(c)&&(c=Z(c));const r=c.toLowerCase().indexOf(s);if(r===-1)return;const l=3,u=r>l?r-l:0,g=c.substring(u).trim();o[i.id]=r>0?`...${g}`:g}),o}get categoryFilteredSearchList(){return this.selectedCategoryFilters.length===0?this.searchList:this.searchList.filter(o=>o instanceof x&&this.selectedCategoryFilters.some(s=>o.categories.some(i=>i.id===s.id)))}get fuzzySearchItems(){if(this.list?.type!=="search")return[];const o=this.list?.text?.trim().toLowerCase();if(!o)return this.defaultSearchItems.map(r=>({item:r,score:0,matches:[]}));const s=this.rootStore.fuzzySearchEngineStore.search(this.categoryFilteredSearchList,o),i=[],c=[];for(const r of s){const l=r.item,u=l.entity.type,g=u==="booth"?l:null,k=u==="exhibitor"?l:null,T=[l.name?.toLowerCase()??"",g?.title?.toLowerCase()??"",g?.fullName?.toLowerCase()??"",...k?.booths?.map(y=>y.name?.toLowerCase()??"")??[]];let f=1/0;for(const y of T){const v=y.indexOf(o);v!==-1&&v<f&&(f=v)}f!==1/0?i.push({result:{item:l,score:0},pos:f}):c.push(r)}return i.sort((r,l)=>r.pos-l.pos),[...i.map(r=>r.result),...c]}get listItems(){if(this.details instanceof M&&this.list.type!=="multi-point-tour")return[this.details.from,this.details.to].filter(o=>o instanceof I);switch(this.list.type){case"search":{let o=!(this.heatmap||this.heatmapYah)&&this.rootStore.fuzzySearchEngineStore.engine?this.fuzzySearchItems.map(({item:s})=>s).concat(this.foundInDescription):this.searchItems;return o=o.filter(s=>s.entity.type==="booth"?!s.exhibitors.length:!0),this.hasAppliedFilters?o.filter(s=>{if(this.selectedCategoryFilters.length>0&&s instanceof x&&!this.selectedCategoryFilters.some(i=>s.categories.some(c=>c.id===i.id)))return!1;if(this.selectedPoiTypeFilters.length>0){if(s instanceof x&&!s.booths.some(i=>this.selectedPoiTypeFilters.some(c=>i.poiTypeId===c.id))||s instanceof I&&!this.selectedPoiTypeFilters.some(i=>s.poiTypeId===i.id))return!1;if(s instanceof A&&s.boothId){const i=this.rootStore.boothStore.booths.find(c=>c.id===s.boothId);if(!i||!this.selectedPoiTypeFilters.some(c=>i.poiTypeId===c.id))return!1}}return!0}):o}case"bookmarks":return[...this.rootStore.exhibitorStore.bookmarked,...this.rootStore.eventStore.bookmarked,...this.rootStore.speakerStore.bookmarked,...this.rootStore.boothStore.booths.filter(o=>o.exhibitors.length===0&&o.bookmarkedDirectly)];case"visited":return[...this.rootStore.exhibitorStore.visited,...this.rootStore.eventStore.visited];case"category":return this.list.category.exhibitors;case E:return mt();case"filter":return this.list.items;case"sessions":return this.rootStore.eventStore.eventItems;case"exhibitors":{const o=this.rootStore.exhibitorStore.exhibitors,s=this.list.text?.toLowerCase().trim();return s?o.filter(i=>i.name.toLowerCase().includes(s)):o}case"multi-point-tour":{const o=this.rootStore.toursStore.getTourById(this.list.tourId);return o?!o.points||o.points.length===0?[]:o.points.map(s=>{const i=parseInt(s);if(!isNaN(i)){const r=this.rootStore.boothStore.boothById.get(i);if(r)return r}return It(s)?.entity||null}).filter(s=>!!s):[]}case"route-planner":return this.rootStore.routePlannerStore.resolvedBooths}throw new Error("Unknown list.type")}get listBooths(){return F(this.listItems,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems)}get selectedBooths(){let o=[];this.selectedExhibitor?o=this.selectedExhibitor.booths:this.selectedBooth&&(o=[this.selectedBooth]);const s=this.selectedRoute,i=[s?.from,s?.to,...s?.waypoints??[]].filter(c=>c instanceof I);return o.push(...i),new Set(o)}get hoveredBooths(){let o=[];return this.hoveredBooth?o=[this.hoveredBooth]:this.hoveredExhibitor&&(o=this.hoveredExhibitor.booths),new Set(o)}get visibility(){return{controls:!this.mapControlsHidden,levels:!this.floorsControlHidden,header:this.wsShown,overlay:!this.hideOverlay,searchButtons:this.searchButtonsOverride??!this.hideOverlay}}setVisibility(o){const s=["controls","levels","header","overlay"],i={...s.reduce((r,l)=>({...r,[l]:!0}),{}),...s.filter(r=>r in o).reduce((r,l)=>({...r,[l]:o[l]}),{})},c=typeof o.searchButtons=="boolean"?o.searchButtons:null;w&&(Object.values(i).every(Boolean)&&c===null?localStorage.removeItem($):localStorage.setItem($,JSON.stringify(c===null?i:{...i,searchButtons:c}))),this.mapControlsHidden=!i.controls,this.floorsControlHidden=!i.levels,this.hideHeaderLogo=!i.header,this.hideFreeOrDemo=!i.header,this.hideOverlay=!i.overlay,this.searchButtonsOverride=c}toggleMapOverlay(){this.overlayPosition==="bottom"&&this.overlaySize==="full"?this.desiredOverlaySize="medium":this.overlayPosition==="bottom"&&this.overlaySize!=="full"&&(this.desiredOverlaySize="full")}changeZoom(o){this.zoomBy=o}zoomIn(){this.changeZoom(ZOOM_IN_FACTOR)}zoomOut(){this.changeZoom(ZOOM_OUT_FACTOR)}fitBounds(){const{rect:o,source:s}=bt({layerViewbox:this.rootStore.layerStore.viewboxRectangle,explicitArea:pt?_:null,layerRectangle:this.rootStore.layerStore.rectangle,sceneDef:rt()??null,svgArea:_});this.moveToRect=o,this.moveToRectPaddingPercent=St(s)?0:vt(o,_),this.rollReset=!0}get previewMode(){const o=w?localStorage.getItem(ht)??localStorage.getItem(lt):null;return o==="true"||o==="1"||this.rootStore.fp.previewMode}get viewerMode(){const o=w?localStorage.getItem(ct)??localStorage.getItem(at):null;return o==="true"||o==="1"||this.rootStore.fp.viewerMode}get selectedEventItem(){return this.details instanceof A?this.details:null}get defaultMapSettings(){return{zoomtime:500,pitchtime:500,center:void 0,centerxy:void 0,z:void 0,bearing:0,roll:1,pitch:1,pitchdegrees:this.pitchEnabled?30:0}}setMapSettings(o){const s={};for(const i of Object.keys(o)){const c=o[i];c!=null&&(i==="zoomtime"||i==="pitchtime"?s[i]=Math.min(Math.max(o[i]||this.mapSettings[i]||0,500),5e3):Object.assign(s,{[i]:c}))}this.mapSettings={...this.mapSettings,...s}}resetMapSettings(){this.mapSettings={...this.defaultMapSettings}}get is3DView(){return!!C.allow3dView}get pitchEnabled(){return this.is3DView?this.mapSettings.pitch===void 0||Number(this.mapSettings.pitch)===1:!1}get rollEnabled(){return this.rootStore.fp.enableRotation?this.mapSettings.roll===void 0||Number(this.mapSettings.roll)===1:!1}get baseQRCodeUrl(){return`https://${L.EXPO}.expofp.com`}get viewMapOnPhoneQRCodeUrl(){if(C?.customKioskQrCodeUrl)return C.customKioskQrCodeUrl;const o=new URL(this.baseQRCodeUrl);o.search=window.location.search;const s=o.toString();return console.log("View Map On Phone QR Code Url",s),s}get routeQRCodeUrl(){const o=new URL(this.baseQRCodeUrl),s=this.selectedRoute?.from,i=this.selectedRoute?.to,c=s instanceof I?s.slug:"",r=i instanceof I?i.slug:"";o.search=`?route%3A${encodeURIComponent(r)}%3A${encodeURIComponent(c)}%3Afalse`,st(o.searchParams,this.kioskData);const l=o.toString();return console.log("Route QR Code Url",l),l}get isFeaturedExhibitorActive(){return this.details instanceof x&&!!this.details.featured}get activeInterfaceData(){for(const o of this.interfaceMetadata)if(o.isActive())return o;return null}get activeInterfaceId(){return this.activeInterfaceData?.id}get searchBoxConfig(){const o=this.activeInterfaceData;return!o||!o.searchBoxConfig?{mode:"search",title:"",subtitle:void 0,badge:void 0,icon:void 0}:o.searchBoxConfig()||{mode:"search",title:"",subtitle:void 0,badge:void 0,icon:void 0}}get searchBoxActions(){return this.activeInterfaceData?.actions?.()??[]}get overlayInterfaceClasses(){const o=[],s=this.activeInterfaceData;return s&&(o.push(s.className),s.additionalClasses&&o.push(...s.additionalClasses())),this.details&&o.push("overlay-has-details"),this.list.type&&o.push(`overlay-list-${this.list.type}`),this.isFeaturedExhibitorActive&&o.push("overlay-exhibitor-featured"),o}get isOverlayOpen(){return this.noOverlay&&!this.overlayOnDemand?!1:this.activeInterfaceData!==null}setOverlayScrolled(o){this.isOverlayScrolled=o}setListScrollTop(o,s){this.listScrollTop=s,this.scrollPositions.set(o,s)}setListScrollItemId(o,s){this.listScrollItemId=s,this.scrollItemIds.set(o,s)}getListScrollTop(o){return this.scrollPositions.get(o)||0}getListScrollItemId(o){return this.scrollItemIds.get(o)||null}clearListScroll(o){this.scrollPositions.delete(o),this.scrollItemIds.delete(o),this.list.type===o&&(this.listScrollTop=0,this.listScrollItemId=null)}get bannerType(){return this.hideFreeOrDemo||this.heatmap?null:L.EXPO==="expo"?"demo":C.expoFpAd||C.isTrial?"free":null}setCurrentBanner(o){this.currentBanner=o}setForceShowDetails(o){this.forceShowDetails=o}get showRouteInstantly(){return!!(this.kiosk&&!this.forceShowDetails)}startBuildRoute(){this.rootStore.selectSearch(""),this.mapControlsHidden=!0,this.floorsControlHidden=!0,this.hideHeaderLogo=!0,this.hideFreeOrDemo=!0,this.hideOverlay=!0,this.hideCookieConsent=!0,this.buildRoute=!0}setGlobalErrorMessage(o){this.globalErrorMessages.push(o)}popGlobalErrorMessage(){this.globalErrorMessages.pop()}initializeUIScale(){if(new URLSearchParams(window.location.search).get("kiosk")!=="0"&&w){const s=localStorage.getItem(H)??localStorage.getItem(N);if(s){const i=parseFloat(s);!isNaN(i)&&i>=.8&&i<=1.4&&(this._customUIScale=i)}}}setUIScale(o,s=!0){if(o===void 0||isNaN(o)||o<this.minUIScale||o>this.maxUIScale){ft.warn(`Invalid ui-scale value: ${o}. Must be between ${this.minUIScale} and ${this.maxUIScale}.`);return}this._customUIScale=o,s&&w&&(localStorage.setItem(H,o.toString()),localStorage.removeItem(N))}resetUIScale(){this._customUIScale=null,w&&(localStorage.removeItem(H),localStorage.removeItem(N))}restoreUIScale(){this._customUIScale=null,this.initializeUIScale()}enableSetKioskMode(o){this.setKioskModeEnabled=o}setKioskData(o){this.kioskData=o}}e([a.struct],t.prototype,"list",void 0),e([a.ref],t.prototype,"details",void 0),e([a.ref],t.prototype,"hoveredExhibitor",void 0),e([a.ref],t.prototype,"hoveredBooth",void 0),e([a],t.prototype,"zoomBy",void 0),e([a],t.prototype,"rollReset",void 0),e([a],t.prototype,"moveToBooths",void 0),e([a],t.prototype,"moveToRect",void 0),e([a],t.prototype,"moveToRectPaddingPercent",void 0),e([a],t.prototype,"moveToLocation",void 0),e([a],t.prototype,"menu",void 0),e([a],t.prototype,"searchFocused",void 0),e([a],t.prototype,"searchClearMode",void 0),e([a],t.prototype,"printingPdf",void 0),e([a.struct],t.prototype,"screenSize",void 0),e([a],t.prototype,"desiredOverlaySize",void 0),e([a],t.prototype,"overlayShowsAll",void 0),e([a],t.prototype,"centerMap",void 0),e([a],t.prototype,"zoomAfTransformK",void 0),e([a],t.prototype,"activeListIndex",void 0),e([a],t.prototype,"devicePixelRatio",void 0),e([a],t.prototype,"wsStarted",void 0),e([a],t.prototype,"canvasStarted",void 0),e([a],t.prototype,"kiosk",void 0),e([a],t.prototype,"inIdle",void 0),e([a],t.prototype,"modalActive",void 0),e([a],t.prototype,"galleryActive",void 0),e([a],t.prototype,"hideOverlay",void 0),e([a],t.prototype,"searchButtonsOverride",void 0),e([a],t.prototype,"hideCookieConsent",void 0),e([a],t.prototype,"hideHeaderLogo",void 0),e([a],t.prototype,"hideLogoInBooth",void 0),e([a],t.prototype,"disableBookmarked",void 0),e([a],t.prototype,"hideLanguage",void 0),e([a],t.prototype,"monochrome",void 0),e([a],t.prototype,"heatmap",void 0),e([a],t.prototype,"heatmapYah",void 0),e([a],t.prototype,"debugCircles",void 0),e([a],t.prototype,"mapControlsHidden",void 0),e([a],t.prototype,"floorsControlHidden",void 0),e([a],t.prototype,"hideFreeOrDemo",void 0),e([a],t.prototype,"freeBannerDismissed",void 0),e([a],t.prototype,"currentBanner",void 0),e([a],t.prototype,"sceneDefReady",void 0),e([a],t.prototype,"categoryFilterOpen",void 0),e([a],t.prototype,"selectedCategoryFilters",void 0),e([a],t.prototype,"selectedPoiTypeFilters",void 0),e([a],t.prototype,"selectedTrack",void 0),e([a],t.prototype,"subButtonsVisible",void 0),e([a],t.prototype,"searchBoxMode",void 0),e([a],t.prototype,"searchBoxTitle",void 0),e([a],t.prototype,"searchBoxSubtitle",void 0),e([a],t.prototype,"routeTitle",void 0),e([a],t.prototype,"routeDescription",void 0),e([a],t.prototype,"isMultiPointRoute",void 0),e([a],t.prototype,"tourTitle",void 0),e([a],t.prototype,"tourDescription",void 0),e([a],t.prototype,"isMultiPointTour",void 0),e([a],t.prototype,"pathwayOnlyMode",void 0),e([a],t.prototype,"isOverlayScrolled",void 0),e([a],t.prototype,"listScrollTop",void 0),e([a],t.prototype,"listScrollItemId",void 0),e([a],t.prototype,"listScrollIndex",void 0),e([a],t.prototype,"_customUIScale",void 0),e([d],t.prototype,"setSelectedCategoryFilters",null),e([d],t.prototype,"resetCategoryFilter",null),e([d],t.prototype,"setSearchClearMode",null),e([d],t.prototype,"setRouteTitle",null),e([d],t.prototype,"setRouteDescription",null),e([d],t.prototype,"setIsMultiPointRoute",null),e([d],t.prototype,"setTourTitle",null),e([d],t.prototype,"setTourDescription",null),e([d],t.prototype,"setIsMultiPointTour",null),e([d],t.prototype,"setPathwayOnlyMode",null),e([d],t.prototype,"setMultiPointTourList",null),e([n],t.prototype,"activePathwayLayers",null),e([n],t.prototype,"highlightedBooths",null),e([n],t.prototype,"rtl",null),e([n({keepAlive:!0})],t.prototype,"noOverlay",null),e([n],t.prototype,"overlayOnDemand",null),e([n],t.prototype,"overlayHiddenNow",null),e([n({keepAlive:!0})],t.prototype,"selectedExhibitor",null),e([n({keepAlive:!0})],t.prototype,"selectedBooth",null),e([n({keepAlive:!0})],t.prototype,"selectedCategory",null),e([n({keepAlive:!0})],t.prototype,"selectedRoute",null),e([n({keepAlive:!0})],t.prototype,"selectedSpeaker",null),e([n({keepAlive:!0})],t.prototype,"uiScale",null),e([n({keepAlive:!0})],t.prototype,"isGuidedToursActive",null),e([n({keepAlive:!0})],t.prototype,"getRouteNextFloor",null),e([n],t.prototype,"headerHeightPx",null),e([n],t.prototype,"overlayPosition",null),e([n],t.prototype,"overlayCollapsed",null),e([n],t.prototype,"overlaySize",null),e([n],t.prototype,"overlayBottom",null),e([n],t.prototype,"overlayLeft",null),e([n],t.prototype,"overlayWidthPx",null),e([n],t.prototype,"wsPaddingPx",null),e([n],t.prototype,"wsOccupiedHeightPx",null),e([n({keepAlive:!0})],t.prototype,"wsShown",null),e([n],t.prototype,"wsDesktopPosition",null),e([n],t.prototype,"wsPosition",null),e([n],t.prototype,"responsiveClass",null),e([n],t.prototype,"mapVisibleTop",null),e([n],t.prototype,"mapVisibleBottom",null),e([n],t.prototype,"searchActionsHeightPx",null),e([n],t.prototype,"shouldShowSearchButtons",null),e([n],t.prototype,"shouldShowMobileToggle",null),e([n],t.prototype,"mobileToggleIsListMode",null),e([n],t.prototype,"canvasVisibleRectPx",null),e([n],t.prototype,"shouldShiftMapRect",null),e([n],t.prototype,"hasAppliedFilters",null),e([n],t.prototype,"canvasVisibleRectPt",null),e([n],t.prototype,"canvasSizePt",null),e([n({keepAlive:!0})],t.prototype,"shouldUseBackdrop",null),e([a],t.prototype,"forceDim",void 0),e([d],t.prototype,"setForceDim",null),e([n],t.prototype,"dimmed",null),e([n],t.prototype,"defaultSearchItems",null),e([n],t.prototype,"searchItems",null),e([n],t.prototype,"searchList",null),e([n],t.prototype,"foundInDescription",null),e([n],t.prototype,"foundInDescriptionStruct",null),e([n],t.prototype,"categoryFilteredSearchList",null),e([n],t.prototype,"fuzzySearchItems",null),e([n],t.prototype,"listItems",null),e([n({keepAlive:!0})],t.prototype,"listBooths",null),e([n({keepAlive:!0})],t.prototype,"selectedBooths",null),e([n({keepAlive:!0})],t.prototype,"hoveredBooths",null),e([n],t.prototype,"visibility",null),e([d],t.prototype,"setVisibility",null),e([d],t.prototype,"toggleMapOverlay",null),e([d],t.prototype,"changeZoom",null),e([d],t.prototype,"zoomIn",null),e([d],t.prototype,"zoomOut",null),e([d],t.prototype,"fitBounds",null),e([n({keepAlive:!0})],t.prototype,"selectedEventItem",null),e([a],t.prototype,"mapSettings",void 0),e([d],t.prototype,"setMapSettings",null),e([d],t.prototype,"resetMapSettings",null),e([a],t.prototype,"animatePitch",void 0),e([n({keepAlive:!0})],t.prototype,"pitchEnabled",null),e([n],t.prototype,"rollEnabled",null),e([n],t.prototype,"baseQRCodeUrl",null),e([n],t.prototype,"viewMapOnPhoneQRCodeUrl",null),e([n],t.prototype,"routeQRCodeUrl",null),e([n],t.prototype,"isFeaturedExhibitorActive",null),e([n],t.prototype,"activeInterfaceData",null),e([n],t.prototype,"activeInterfaceId",null),e([n],t.prototype,"searchBoxConfig",null),e([n],t.prototype,"searchBoxActions",null),e([n],t.prototype,"overlayInterfaceClasses",null),e([n],t.prototype,"isOverlayOpen",null),e([d],t.prototype,"setOverlayScrolled",null),e([d],t.prototype,"setListScrollTop",null),e([d],t.prototype,"setListScrollItemId",null),e([d],t.prototype,"getListScrollTop",null),e([d],t.prototype,"getListScrollItemId",null),e([d],t.prototype,"clearListScroll",null),e([n],t.prototype,"bannerType",null),e([d],t.prototype,"setCurrentBanner",null),e([a],t.prototype,"forceShowDetails",void 0),e([d],t.prototype,"setForceShowDetails",null),e([n],t.prototype,"showRouteInstantly",null),e([a],t.prototype,"buildRoute",void 0),e([d],t.prototype,"startBuildRoute",null),e([a],t.prototype,"globalErrorMessages",void 0),e([d],t.prototype,"setGlobalErrorMessage",null),e([d],t.prototype,"popGlobalErrorMessage",null),e([d],t.prototype,"initializeUIScale",null),e([d],t.prototype,"setUIScale",null),e([d],t.prototype,"resetUIScale",null),e([d],t.prototype,"restoreUIScale",null),e([a],t.prototype,"setKioskModeEnabled",void 0),e([d],t.prototype,"enableSetKioskMode",null),e([a],t.prototype,"kioskData",void 0),e([d],t.prototype,"setKioskData",null);function J(P){return"description"in P&&typeof P.description=="string"?P.description:void 0}function F(P,o,s=[]){const i=[];return P.forEach(c=>{if(c instanceof x)i.push(...c.booths);else if(c instanceof I)i.push(c);else if(c instanceof A){const r=o.find(l=>l.id===c.boothId);c.boothId&&r&&i.push(r)}else c instanceof K&&s.filter(r=>r.speakers.some(l=>l.id===c.id)&&r.boothId).forEach(r=>{const l=o.find(u=>u.id===r.boothId);l&&i.push(l)})}),new Set(i.filter(Boolean))}
1
+ import{__decorate as e}from"tslib";import{Box as ot,Point as it}from"@expofp/geometry";import{action as d,computed as n,observable as a}from"mobx";import{setKioskUrlParams as st}from"../components/Kiosk/kioskUrlParam";import{mapScene as rt}from"../components/Map/scene";import{LANGUAGE_TYPE as E,LEGACY_PREVIEW_MODE_STORAGE_KEY as lt,LEGACY_UI_SCALE_STORAGE_KEY as N,LEGACY_VIEWER_MODE_STORAGE_KEY as at,MOBILE_BREAKPOINT as nt,PREVIEW_MODE_STORAGE_KEY as ht,UI_SCALE_STORAGE_KEY as H,VIEWER_MODE_STORAGE_KEY as ct,VISIBILITY_STORAGE_KEY as $}from"../constants";import C from"../data";import{getSvgArea as _,isSvgAreaExplicit as pt}from"../data/svg.js";import{readFreeBannerDismissed as dt}from"../tools/freeBanner";import{hasUserConsent as ut}from"../tools/gtag";import{hasHtmlTags as W}from"../tools/has-html-tags";import ft from"../tools/logger";import L from"../tools/settings";import{stripHtml as Z}from"../tools/strip-html";import{remsToPixels as D}from"../utils";import j from"../utils/browser";import{getLocale as yt,getLocales as mt,t as S}from"../utils/i18n";import{isLocalStorageAvailable as w}from"../utils/localStorage";import{getResponsiveClass as gt}from"../utils/responsiveClass";import{sanitizeStr as X}from"../utils/sanitizeText";import{fitRectIsFraming as St,getVenueFitMarginPercent as vt,resolveVenueFitRect as bt}from"../utils/scene-bounds";import{uiState as B}from".";import{BoothBase as I,RegularBooth as A,SpecialBooth as V}from"./BoothStore";import{EventItem as O}from"./EventStore";import{Exhibitor as x}from"./ExhibitorStore";import{findEntityByExternalId as It,Route as M}from"./RouteStore";import{SpeakerItem as K}from"./SpeakerStore";export const ZOOM_IN_FACTOR=1.5,ZOOM_OUT_FACTOR=.66;const xt=["dimensions25"];export default class t{setSelectedCategoryFilters(o){this.selectedCategoryFilters=o}resetCategoryFilter(){this.selectedCategoryFilters=[],this.categoryFilterOpen=!1}setSearchClearMode(o){this.searchClearMode=o}setRouteTitle(o){this.routeTitle=o}setRouteDescription(o){this.routeDescription=o}setIsMultiPointRoute(o){this.isMultiPointRoute=o}setTourTitle(o){this.tourTitle=o}setTourDescription(o){this.tourDescription=o}setIsMultiPointTour(o){this.isMultiPointTour=o}setPathwayOnlyMode(o){this.pathwayOnlyMode=o}setMultiPointTourList(o){this.list={type:"multi-point-tour",tourId:o}}get activePathwayLayers(){return this.list?.type==="multi-point-tour"?this.rootStore.toursStore.getTourById(this.list.tourId)?.layers?.map(s=>s.id)||[]:[]}get highlightedBooths(){const o=new Set(this.rootStore.exhibitorStore.highlightedByExternalIds),s=new Set(this.rootStore.boothStore.highlightedByExternalIds),i=new Set([...this.rootStore.exhibitorStore.exhibitors.filter(r=>o.has(r.externalId)).flatMap(r=>r.booths.filter(l=>l instanceof A)).map(r=>r.id.toString()),...this.rootStore.boothStore.booths.filter(r=>s.has(r.externalId)).map(r=>r.id.toString())]);if(this.list?.type==="search"&&this.list?.text?.trim().length){i.clear();const r=this.fuzzySearchItems.filter(l=>l.score===0).map(l=>l.item);r.length?F(r,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems).forEach(l=>i.add(l.id.toString())):this.listBooths.forEach(l=>i.add(l.id.toString()))}if(this.list?.type==="filter"&&(i.clear(),this.list.items.flatMap(r=>r.booths.filter(l=>l instanceof A)).forEach(r=>i.add(r.id.toString()))),this.categoryFilterOpen&&this.selectedCategoryFilters.length>0?(i.clear(),this.selectedCategoryFilters.forEach(r=>{r.exhibitors.flatMap(l=>l.booths).forEach(l=>i.add(l.id.toString()))})):this.list?.type==="category"&&(i.clear(),this.list.category.exhibitors.flatMap(r=>r.booths).forEach(r=>i.add(r.id.toString()))),this.list?.type==="bookmarks"&&(i.clear(),F(this.listItems,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems).forEach(r=>i.add(r.id.toString()))),this.list?.type==="visited"&&(i.clear(),F(this.listItems,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems).forEach(r=>i.add(r.id.toString()))),this.list?.type==="exhibitors"){i.clear();const r=this.list.text?.toLowerCase().trim();let l=this.rootStore.exhibitorStore.exhibitors;r&&(l=l.filter(u=>u.name.toLowerCase().includes(r))),l.flatMap(u=>u.booths.filter(g=>g instanceof A)).forEach(u=>i.add(u.id.toString()))}if(this.selectedPoiTypeFilters.length>0&&(i.clear(),this.selectedPoiTypeFilters.forEach(r=>{this.rootStore.boothStore.booths.filter(l=>l.poiTypeId===r.id).forEach(l=>i.add(l.id.toString()))})),this.details instanceof M&&(i.clear(),this.details.from instanceof I&&i.add(this.details.from.id.toString()),this.details.to instanceof I&&i.add(this.details.to.id.toString()),this.details.waypoints?.forEach(r=>i.add(r.id.toString()))),this.details instanceof I&&(i.clear(),i.add(this.details.id.toString())),this.details instanceof x&&(i.clear(),this.details.booths.filter(r=>r instanceof A).forEach(r=>i.add(r.id.toString()))),this.details instanceof O){const r=this.details;if(r.boothId){i.clear();const l=this.rootStore.boothStore.booths.find(u=>u.id===r.boothId);l&&i.add(l.id.toString())}}return i}constructor(o){this.interfaceMetadata=Object.freeze([{id:"menu",className:"efp-overlay-menu",priority:80,isActive:()=>this.menu,searchBoxConfig:()=>({mode:"interface",title:S("Menu")})},{id:"exhibitor",className:"efp-overlay-exhibitor",priority:70,isActive:()=>this.details instanceof x,searchBoxConfig:()=>({mode:"details",title:this.details.name})},{id:"booth",className:"efp-overlay-booth",priority:70,isActive:()=>this.details instanceof I,searchBoxConfig:()=>{const s=this.details;return{mode:"details",title:s.title||s.name}}},{id:"event",className:"efp-overlay-event",priority:70,isActive:()=>this.details instanceof O,searchBoxConfig:()=>({mode:"details",title:this.details.name})},{id:"route",className:"efp-overlay-route",priority:70,isActive:()=>this.details instanceof M,searchBoxConfig:()=>({mode:"details",title:S("Directions")})},{id:"search",className:"efp-overlay-search",priority:60,isActive:()=>!this.details&&!this.menu&&this.list.type==="search"&&(this.rootStore.fp.alwaysShowSidebar&&!this.overlayOnDemand||this.heatmap||this.searchFocused||this.list.text.length>0||this.searchClearMode),searchBoxConfig:()=>({mode:"search",title:S("Search")})},{id:"exhibitors",className:"efp-overlay-exhibitors",priority:50,isActive:()=>this.list.type==="exhibitors"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Exhibitors")})},{id:"filter",className:"efp-overlay-filter",priority:50,isActive:()=>this.list.type==="filter"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Filter")})},{id:"bookmarks",className:"efp-overlay-bookmarks",priority:50,isActive:()=>this.list.type==="bookmarks"&&!this.details,searchBoxConfig:()=>({mode:"interface",title:S("Bookmarks"),badge:this.rootStore.bookmarksStore.total})},{id:"visited",className:"efp-overlay-visited",priority:50,isActive:()=>this.list.type==="visited"&&!this.details,searchBoxConfig:()=>({mode:"interface",title:S("Visited"),badge:this.rootStore.exhibitorStore.visited.length})},{id:E,className:"efp-overlay-language",priority:50,isActive:()=>this.list.type===E,searchBoxConfig:()=>({mode:"interface",title:S("Language")})},{id:"category",className:"efp-overlay-category",priority:50,isActive:()=>!B.menu&&!!B.selectedCategory,searchBoxConfig:()=>({mode:"interface",title:this.list.type==="category"&&this.list.category?.name||S("Categories")})},{id:"sessions",className:"efp-overlay-sessions",priority:50,isActive:()=>this.list.type==="sessions"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Sessions"),subtitle:this.selectedTrack?this.selectedTrack.name:void 0})},{id:"speakers",className:"efp-overlay-speakers",priority:50,isActive:()=>this.list.type==="speakers"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Speakers")})},{id:"speaker",className:"efp-overlay-speaker",priority:50,isActive:()=>this.details instanceof K,searchBoxConfig:()=>({mode:"details",title:this.details.name})},{id:"tours",className:"efp-overlay-tours",priority:50,isActive:()=>this.list.type==="tours"&&!this.details,searchBoxConfig:()=>({mode:"search",title:S("Guided Tours")})},{id:"multi-point-wayfinding",className:"efp-overlay-multi-point",priority:75,isActive:()=>!!(this.isMultiPointRoute&&this.selectedRoute&&this.list.type!=="route-planner"),searchBoxConfig:()=>({mode:"interface",title:this.routeTitle||S("Multi-point route")})},{id:"multi-point-tour",className:"efp-overlay-multi-point-tour",priority:75,isActive:()=>this.list.type==="multi-point-tour"&&!this.details,searchBoxConfig:()=>({mode:"interface",title:this.tourTitle||S("Multi-point route")})},{id:"route-planner",className:"efp-overlay-route-planner",priority:76,isActive:()=>this.list.type==="route-planner"&&(!this.details||this.details instanceof M),searchBoxConfig:()=>({mode:"interface",title:S("Route planner")})}].sort((s,i)=>i.priority-s.priority)),this.list={type:"search",text:"",focused:!1},this.details=null,this.hoveredExhibitor=null,this.hoveredBooth=null,this.zoomBy=null,this.rollReset=!1,this.moveToBooths=null,this.moveToRect=null,this.moveToRectPaddingPercent=null,this.moveToLocation=!1,this.menu=!1,this.searchFocused=!1,this.searchClearMode=!1,this.printingPdf=!1,this.screenSize=new it(window.innerWidth,window.innerHeight),this.overlayShowsAll=!1,this.centerMap=!1,this.zoomAfTransformK=1,this.activeListIndex=-1,this.devicePixelRatio=window.devicePixelRatio,this.previewExhibitor=null,this.wsStarted=!1,this.canvasStarted=!1,this.kiosk=!1,this.inIdle=!1,this.modalActive={share:!1},this.galleryActive=!1,this.hideOverlay=!1,this.searchButtonsOverride=null,this.hideCookieConsent=!!ut(),this.hideHeaderLogo=!1,this.hideLogoInBooth=!1,this.disableBookmarked=!1,this.hideLanguage=!1,this.monochrome=!1,this.heatmap=!1,this.heatmapYah=!1,this.rootElement=null,this.debugCircles=[],this.mapControlsHidden=!1,this.floorsControlHidden=!1,this.hideFreeOrDemo=!1,this.freeBannerDismissed=dt(sessionStorage),this.currentBanner=null,this.sceneDefReady=!1,this.categoryFilterOpen=!1,this.selectedCategoryFilters=[],this.selectedPoiTypeFilters=[],this.selectedTrack=null,this.subButtonsVisible=!1,this.searchBoxMode="search",this.searchBoxTitle="",this.isMultiPointRoute=!1,this.isMultiPointTour=!1,this.pathwayOnlyMode=!1,this.isOverlayScrolled=!1,this.listScrollTop=0,this.listScrollItemId=null,this.listScrollIndex=0,this.scrollPositions=new Map,this.scrollItemIds=new Map,this._customUIScale=null,this.searchFilterHeightPx=54,this.searchInputHeightPx=54,this.overlayUISizePx=390,this.overlayKioskSizePx=450,this.overlayMediumHeightRems=10,this.headerHeightRem=0,this.wsImageHeightPx=44,this.mapVisibleStart=0,this.forceDim=!1,this.mapSettings={},this.maxPitch=60,this.animatePitch=!0,this.forceShowDetails=!1,this.buildRoute=!1,this.globalErrorMessages=[],this.minUIScale=.8,this.maxUIScale=1.4,this.setKioskModeEnabled=!1,this.kioskData=null,this.rootStore=o,this.mapSettings={...this.defaultMapSettings},this.initializeUIScale()}get rtl(){const o=yt();return o==="ar"||o==="he"}get noOverlay(){return this.rootStore.fp.noOverlay||this.hideOverlay}get overlayOnDemand(){return this.noOverlay&&this.searchButtonsOverride===!0}get overlayHiddenNow(){return this.noOverlay&&!(this.overlayOnDemand&&this.isOverlayOpen)}get onBoothClick(){return this.rootStore.fp.onBoothClick}get onMarkerClick(){return this.rootStore.fp.onMarkerClick}get onBookmarkClick(){return this.rootStore.fp.onBookmarkClick}get onVisitedClick(){return this.rootStore.fp.onVisitedClick}get onCategoryClick(){return this.rootStore.fp.onCategoryClick}get onDirection(){return this.rootStore.fp.onDirection}get onDetails(){return this.rootStore.fp.onDetails}get onExhibitorCustomButtonClick(){return this.rootStore.fp.onExhibitorCustomButtonClick}get onGetCoordsClick(){return this.rootStore.fp.onGetCoordsClick}get selectedExhibitor(){return this.details instanceof x?this.details:null}get selectedBooth(){return this.details instanceof I?this.details:null}get selectedCategory(){return this.list.type==="category"?this.list.category:null}get selectedRoute(){return this.details instanceof M?this.details:null}get selectedSpeaker(){return this.details instanceof K?this.details:null}get uiScale(){return this._customUIScale!==null?this._customUIScale:this.kiosk?1.2:1}get isGuidedToursActive(){return this.rootStore.toursStore.isActive}get getRouteNextFloor(){const o=this.rootStore.routeStore.pathLayers,s=this.rootStore.routeStore.currentRouteLayer?.name;if(!s)return null;const i=o.findIndex(c=>c.layer?.name===s);return i===-1?null:o[i+1]?.layer?.name??null}get headerHeightPx(){return D(this.headerHeightRem)}get overlayPosition(){return this.screenSize.width>nt||this.kiosk?"left":"bottom"}get overlayCollapsed(){return this.kiosk&&this.overlayPosition==="left"&&!this.searchFocused&&!this.menu&&!this.details&&!this.selectedCategory&&!this.selectedExhibitor&&this.list.type!=="bookmarks"&&this.list.type!==E&&!("text"in this.list&&this.list.text.length)}get overlaySize(){return this.overlayLeft?"full":this.desiredOverlaySize}get overlayBottom(){return this.overlayPosition==="bottom"}get overlayLeft(){return this.overlayPosition==="left"}get overlayWidthPx(){return this.overlayHiddenNow?0:this.overlayLeft?this.kiosk?this.overlayKioskSizePx:this.overlayUISizePx:D(this.screenSize.width)}get wsPaddingPx(){return D(.25)}get wsOccupiedHeightPx(){return this.wsShown?this.wsImageHeightPx+this.wsPaddingPx*2:0}get wsShown(){return!this.hideHeaderLogo&&this.rootStore.exhibitorStore.advertised.length>0}get wsDesktopPosition(){return L.EXPO==="cbresupplypartner"?"bottom":"top"}get wsPosition(){return this.overlayBottom?"top":this.wsDesktopPosition}get responsiveClass(){return gt(this.screenSize.width)}get mapVisibleTop(){return(this.wsPosition==="top"?this.wsOccupiedHeightPx:0)+this.headerHeightPx}get mapVisibleBottom(){return this.overlayLeft||this.overlayHiddenNow?this.wsPosition==="bottom"?this.wsOccupiedHeightPx:0:D(this.overlayMediumHeightRems)}get searchActionsHeightPx(){return this.overlayPosition==="bottom"?this.searchInputHeightPx+this.searchFilterHeightPx:this.searchInputHeightPx}get shouldShowSearchButtons(){return this.rootStore.searchButtonsStore.hasAnySearchButtons&&!this.details&&!this.menu&&![E,"filter"].includes(this.list.type)}get shouldShowMobileToggle(){const o=this.list.type==="route-planner";return this.overlayPosition==="bottom"&&(o||!this.details&&!this.menu&&this.list.type!==E&&this.list.type!=="bookmarks"&&this.list.type!=="sessions")}get mobileToggleIsListMode(){return!this.isOverlayOpen||this.overlaySize!=="full"}get canvasVisibleRectPx(){const o=this.screenSize;return ot.fromMinMax({x:B.rtl?0:this.mapVisibleStart,y:this.mapVisibleTop+this.searchActionsHeightPx},{x:B.rtl?o.width-this.mapVisibleStart:o.width,y:o.height-this.mapVisibleBottom})}get shouldShiftMapRect(){return this.overlayPosition==="left"&&(this.details||this.hasAppliedFilters||this.selectedRoute)}get hasAppliedFilters(){return this.selectedCategoryFilters.length>0||this.selectedPoiTypeFilters.length>0}get canvasVisibleRectPt(){return this.canvasVisibleRectPx.scale(this.devicePixelRatio,{x:0,y:0})}get canvasSizePt(){return this.screenSize.multiply(this.devicePixelRatio)}get shouldUseBackdrop(){if(B.overlayCollapsed)return!1;if(w&&localStorage.getItem("forcebackdrop")==="1")return!0;if(this.overlayBottom||this.selectedExhibitor?.leadingImageUrl&&!this.selectedExhibitor?.leadingImageLinkUrl)return!1;const o=j.satisfies({safari:">=13"}),s=j.satisfies({chrome:">=77"});return/(android)/i.test(navigator.userAgent)?!1:o||s&&B.canvasSizePt.height*B.canvasSizePt.width<3e6}setForceDim(o){this.forceDim=o}get dimmed(){return this.forceDim||this.pathwayOnlyMode?!0:this.highlightedBooths.size>0||this.list?.type==="search"&&this.list?.text?.trim().length>0||this.list?.type==="exhibitors"}get defaultSearchItems(){const{exhibitorStore:o,categoryStore:s,boothStore:i,heatmapStore:c}=this.rootStore;let r=o.exhibitors;const l=s.categories.filter(f=>f.exhibitors.length),u=i.booths;this.selectedPoiTypeFilters.length>0&&(r=r.filter(f=>f.booths.some(y=>this.selectedPoiTypeFilters.some(v=>y.poiTypeId===v.id))));let g=[];const k=!this.selectedCategoryFilters.length&&C.showCategories?l.filter(f=>xt.includes(L.EXPO)?!f.name.includes("/"):!0):[],T=u.filter(f=>f instanceof V);return this.selectedCategoryFilters.length>0?g=[...r]:(C.showCompaniesAndBooths&&(g=g.concat(r)),C.showOtherSpaces&&(g=g.concat(T))),this.heatmap?[...r,...u].sort((y,v)=>c.getClicksByType(v)-c.getClicksByType(y)):this.heatmapYah?c.heatmapData?.yah?.sort((f,y)=>c.getClicksByType(y)-c.getClicksByType(f))||[]:r.length===0?u:[...k,...g.sort((f,y)=>{const v=f instanceof x&&f.featured!==void 0,z=y instanceof x&&y.featured!==void 0;if(v!==z)return v?-1:1;const R=f instanceof V&&f.title?f.title:f.name,U=y instanceof V&&y.title?y.title:y.name;return R.localeCompare(U,void 0,{sensitivity:"base",numeric:!0})})]}get searchItems(){if(this.list.type!=="search")return[];const o=this.list.text?.trim().toLowerCase()||"",{exhibitorStore:s,boothStore:i,eventStore:c,speakerStore:r,heatmapStore:l}=this.rootStore;let u=s.exhibitors;const g=i.booths,k=c.eventItems,T=r.speakers;if(this.selectedCategoryFilters.length>0&&(u=u.filter(h=>this.selectedCategoryFilters.some(p=>h.categories.some(m=>m.id===p.id)))),this.selectedPoiTypeFilters.length>0&&(u=u.filter(h=>h.booths.some(p=>this.selectedPoiTypeFilters.some(m=>p.poiTypeId===m.id)))),!o)return this.defaultSearchItems;const f=[o.replace(/&[^&=]+=[^&]+/g,"")];if(this.heatmapYah)return(l.heatmapData.yah??[]).filter(p=>Number.isNaN(Number(o))?p:p.viewCount>=Number(o)).sort((p,m)=>l.getClicksByType(m)-l.getClicksByType(p));const y=[],v=new Set,z=new Set,R=new Set,U=new Set;function G(h){return h?h.replace(/[!@#$%^*\-.,()^#$%:?_+'"/]/g," ").replace(/\s\s+/g," "):""}function b(h,p){return!h||!p?!1:G(h).toLowerCase().includes(G(p).toLowerCase())}function Y(h,p){return h?b(h,p)||b(C.levelTerm+" "+h,p):!1}u.forEach(h=>{f.some(p=>b(h.name,p)||h.booths.some(m=>!p&&b(m.name,p)||Y(m.layer?.name??null,p)))&&v.add(h)}),this.selectedCategoryFilters.length>0&&g.forEach(h=>{(this.heatmap||!(h instanceof A)||!Array.from(v).find(m=>m.booths.includes(h)))&&f.some(m=>b(h.title||"",m)||b(h.name,m)||b(h.fullName,m)||Y(h.layer?.name??null,m))&&z.add(h)});const q=k,tt=T;if(q.forEach(h=>{f.some(p=>b(h.name||"",p)||b(h.description||"",p))&&R.add(h)}),tt.forEach(h=>{f.some(p=>b(h.name,p)||b(h.company,p)||b(h.jobTitle,p))&&U.add(h)}),y.push(...R),y.push(...v),this.heatmap)return y.sort((h,p)=>l.getClicksByType(p)-l.getClicksByType(h));const et=new Map(y.map(h=>[h.id,h]));return y.map(h=>{if(!h.name)return null;const p=X(h instanceof I&&h.fullName.toLowerCase()||h.name.toLowerCase()),m=p.indexOf(X(o));if(m===-1)return null;const Q={id:h.id,position:m,lowerCaseName:p,featured:!1};return h instanceof x&&(Q.featured=h.featured),Q}).filter(h=>!!h).sort((h,p)=>(h.featured||p.featured)&&h.featured!==p.featured?h.featured?-1:1:h.position!==p.position?h.position-p.position:h.lowerCaseName.localeCompare(p.lowerCaseName)||String(h.id).localeCompare(String(p.id))).map(({id:h})=>et.get(h)).filter(h=>!!h)}get searchList(){return[...this.rootStore.eventStore.eventItems,...this.rootStore.speakerStore.speakers,...this.rootStore.categoryStore.categories.filter(o=>o.exhibitors.length),...this.rootStore.exhibitorStore.exhibitors,...this.rootStore.boothStore.booths]}get foundInDescription(){if(this.list?.type!=="search")return[];const o=this.list?.text?.trim().toLowerCase();if(!o)return[];const s=this.fuzzySearchItems.map(({item:l})=>l),i=new Set(s.map(l=>l.name)),c=this.categoryFilteredSearchList.filter(l=>!i.has(l.name)),r=[];for(const l of c){const u=J(l);if(!u)continue;const k=(W(u)?Z(u):u).toLowerCase().indexOf(o);k!==-1&&r.push({item:l,pos:k})}return r.sort((l,u)=>l.pos-u.pos),r.map(l=>l.item)}get foundInDescriptionStruct(){const o={};if(this.list?.type!=="search")return o;const s=this.list?.text?.trim().toLowerCase();return this.foundInDescription.forEach(i=>{let c=J(i);if(!c)return;W(c)&&(c=Z(c));const r=c.toLowerCase().indexOf(s);if(r===-1)return;const l=3,u=r>l?r-l:0,g=c.substring(u).trim();o[i.id]=r>0?`...${g}`:g}),o}get categoryFilteredSearchList(){return this.selectedCategoryFilters.length===0?this.searchList:this.searchList.filter(o=>o instanceof x&&this.selectedCategoryFilters.some(s=>o.categories.some(i=>i.id===s.id)))}get fuzzySearchItems(){if(this.list?.type!=="search")return[];const o=this.list?.text?.trim().toLowerCase();if(!o)return this.defaultSearchItems.map(r=>({item:r,score:0,matches:[]}));const s=this.rootStore.fuzzySearchEngineStore.search(this.categoryFilteredSearchList,o),i=[],c=[];for(const r of s){const l=r.item,u=l.entity.type,g=u==="booth"?l:null,k=u==="exhibitor"?l:null,T=[l.name?.toLowerCase()??"",g?.title?.toLowerCase()??"",g?.fullName?.toLowerCase()??"",...k?.booths?.map(y=>y.name?.toLowerCase()??"")??[]];let f=1/0;for(const y of T){const v=y.indexOf(o);v!==-1&&v<f&&(f=v)}f!==1/0?i.push({result:{item:l,score:0},pos:f}):c.push(r)}return i.sort((r,l)=>r.pos-l.pos),[...i.map(r=>r.result),...c]}get listItems(){if(this.details instanceof M&&this.list.type!=="multi-point-tour")return[this.details.from,this.details.to].filter(o=>o instanceof I);switch(this.list.type){case"search":{let o=!(this.heatmap||this.heatmapYah)&&this.rootStore.fuzzySearchEngineStore.engine?this.fuzzySearchItems.map(({item:s})=>s).concat(this.foundInDescription):this.searchItems;return o=o.filter(s=>s.entity.type==="booth"?!s.exhibitors.length:!0),this.hasAppliedFilters?o.filter(s=>{if(this.selectedCategoryFilters.length>0&&s instanceof x&&!this.selectedCategoryFilters.some(i=>s.categories.some(c=>c.id===i.id)))return!1;if(this.selectedPoiTypeFilters.length>0){if(s instanceof x&&!s.booths.some(i=>this.selectedPoiTypeFilters.some(c=>i.poiTypeId===c.id))||s instanceof I&&!this.selectedPoiTypeFilters.some(i=>s.poiTypeId===i.id))return!1;if(s instanceof O&&s.boothId){const i=this.rootStore.boothStore.booths.find(c=>c.id===s.boothId);if(!i||!this.selectedPoiTypeFilters.some(c=>i.poiTypeId===c.id))return!1}}return!0}):o}case"bookmarks":return[...this.rootStore.exhibitorStore.bookmarked,...this.rootStore.eventStore.bookmarked,...this.rootStore.speakerStore.bookmarked,...this.rootStore.boothStore.booths.filter(o=>o.exhibitors.length===0&&o.bookmarkedDirectly)];case"visited":return[...this.rootStore.exhibitorStore.visited,...this.rootStore.eventStore.visited];case"category":return this.list.category.exhibitors;case E:return mt();case"filter":return this.list.items;case"sessions":return this.rootStore.eventStore.eventItems;case"exhibitors":{const o=this.rootStore.exhibitorStore.exhibitors,s=this.list.text?.toLowerCase().trim();return s?o.filter(i=>i.name.toLowerCase().includes(s)):o}case"multi-point-tour":{const o=this.rootStore.toursStore.getTourById(this.list.tourId);return o?!o.points||o.points.length===0?[]:o.points.map(s=>{const i=parseInt(s);if(!isNaN(i)){const r=this.rootStore.boothStore.boothById.get(i);if(r)return r}return It(s)?.entity||null}).filter(s=>!!s):[]}case"route-planner":return this.rootStore.routePlannerStore.resolvedBooths}throw new Error("Unknown list.type")}get listBooths(){return F(this.listItems,this.rootStore.boothStore.booths,this.rootStore.eventStore.eventItems)}get selectedBooths(){let o=[];this.selectedExhibitor?o=this.selectedExhibitor.booths:this.selectedBooth&&(o=[this.selectedBooth]);const s=this.selectedRoute,i=[s?.from,s?.to,...s?.waypoints??[]].filter(c=>c instanceof I);return o.push(...i),new Set(o)}get hoveredBooths(){let o=[];return this.hoveredBooth?o=[this.hoveredBooth]:this.hoveredExhibitor&&(o=this.hoveredExhibitor.booths),new Set(o)}get visibility(){return{controls:!this.mapControlsHidden,levels:!this.floorsControlHidden,header:this.wsShown,overlay:!this.hideOverlay,searchButtons:this.searchButtonsOverride??!this.hideOverlay}}setVisibility(o){const s=["controls","levels","header","overlay"],i={...s.reduce((r,l)=>({...r,[l]:!0}),{}),...s.filter(r=>r in o).reduce((r,l)=>({...r,[l]:o[l]}),{})},c=typeof o.searchButtons=="boolean"?o.searchButtons:null;w&&(Object.values(i).every(Boolean)&&c===null?localStorage.removeItem($):localStorage.setItem($,JSON.stringify(c===null?i:{...i,searchButtons:c}))),this.mapControlsHidden=!i.controls,this.floorsControlHidden=!i.levels,this.hideHeaderLogo=!i.header,this.hideFreeOrDemo=!i.header,this.hideOverlay=!i.overlay,this.searchButtonsOverride=c}toggleMapOverlay(){this.overlayPosition==="bottom"&&this.overlaySize==="full"?this.desiredOverlaySize="medium":this.overlayPosition==="bottom"&&this.overlaySize!=="full"&&(this.desiredOverlaySize="full")}changeZoom(o){this.zoomBy=o}zoomIn(){this.changeZoom(ZOOM_IN_FACTOR)}zoomOut(){this.changeZoom(ZOOM_OUT_FACTOR)}fitBounds(){const{rect:o,source:s}=bt({layerViewbox:this.rootStore.layerStore.viewboxRectangle,explicitArea:pt()?_():null,layerRectangle:this.rootStore.layerStore.rectangle,sceneDef:rt()??null,svgArea:_()});this.moveToRect=o,this.moveToRectPaddingPercent=St(s)?0:vt(o,_()),this.rollReset=!0}get previewMode(){const o=w?localStorage.getItem(ht)??localStorage.getItem(lt):null;return o==="true"||o==="1"||this.rootStore.fp.previewMode}get viewerMode(){const o=w?localStorage.getItem(ct)??localStorage.getItem(at):null;return o==="true"||o==="1"||this.rootStore.fp.viewerMode}get selectedEventItem(){return this.details instanceof O?this.details:null}get defaultMapSettings(){return{zoomtime:500,pitchtime:500,center:void 0,centerxy:void 0,z:void 0,bearing:0,roll:1,pitch:1,pitchdegrees:this.pitchEnabled?30:0}}setMapSettings(o){const s={};for(const i of Object.keys(o)){const c=o[i];c!=null&&(i==="zoomtime"||i==="pitchtime"?s[i]=Math.min(Math.max(o[i]||this.mapSettings[i]||0,500),5e3):Object.assign(s,{[i]:c}))}this.mapSettings={...this.mapSettings,...s}}resetMapSettings(){this.mapSettings={...this.defaultMapSettings}}get is3DView(){return!!C.allow3dView}get pitchEnabled(){return this.is3DView?this.mapSettings.pitch===void 0||Number(this.mapSettings.pitch)===1:!1}get rollEnabled(){return this.rootStore.fp.enableRotation?this.mapSettings.roll===void 0||Number(this.mapSettings.roll)===1:!1}get baseQRCodeUrl(){return`https://${L.EXPO}.expofp.com`}get viewMapOnPhoneQRCodeUrl(){if(C?.customKioskQrCodeUrl)return C.customKioskQrCodeUrl;const o=new URL(this.baseQRCodeUrl);o.search=window.location.search;const s=o.toString();return console.log("View Map On Phone QR Code Url",s),s}get routeQRCodeUrl(){const o=new URL(this.baseQRCodeUrl),s=this.selectedRoute?.from,i=this.selectedRoute?.to,c=s instanceof I?s.slug:"",r=i instanceof I?i.slug:"";o.search=`?route%3A${encodeURIComponent(r)}%3A${encodeURIComponent(c)}%3Afalse`,st(o.searchParams,this.kioskData);const l=o.toString();return console.log("Route QR Code Url",l),l}get isFeaturedExhibitorActive(){return this.details instanceof x&&!!this.details.featured}get activeInterfaceData(){for(const o of this.interfaceMetadata)if(o.isActive())return o;return null}get activeInterfaceId(){return this.activeInterfaceData?.id}get searchBoxConfig(){const o=this.activeInterfaceData;return!o||!o.searchBoxConfig?{mode:"search",title:"",subtitle:void 0,badge:void 0,icon:void 0}:o.searchBoxConfig()||{mode:"search",title:"",subtitle:void 0,badge:void 0,icon:void 0}}get searchBoxActions(){return this.activeInterfaceData?.actions?.()??[]}get overlayInterfaceClasses(){const o=[],s=this.activeInterfaceData;return s&&(o.push(s.className),s.additionalClasses&&o.push(...s.additionalClasses())),this.details&&o.push("overlay-has-details"),this.list.type&&o.push(`overlay-list-${this.list.type}`),this.isFeaturedExhibitorActive&&o.push("overlay-exhibitor-featured"),o}get isOverlayOpen(){return this.noOverlay&&!this.overlayOnDemand?!1:this.activeInterfaceData!==null}setOverlayScrolled(o){this.isOverlayScrolled=o}setListScrollTop(o,s){this.listScrollTop=s,this.scrollPositions.set(o,s)}setListScrollItemId(o,s){this.listScrollItemId=s,this.scrollItemIds.set(o,s)}getListScrollTop(o){return this.scrollPositions.get(o)||0}getListScrollItemId(o){return this.scrollItemIds.get(o)||null}clearListScroll(o){this.scrollPositions.delete(o),this.scrollItemIds.delete(o),this.list.type===o&&(this.listScrollTop=0,this.listScrollItemId=null)}get bannerType(){return this.hideFreeOrDemo||this.heatmap?null:L.EXPO==="expo"?"demo":C.expoFpAd||C.isTrial?"free":null}setCurrentBanner(o){this.currentBanner=o}setForceShowDetails(o){this.forceShowDetails=o}get showRouteInstantly(){return!!(this.kiosk&&!this.forceShowDetails)}startBuildRoute(){this.rootStore.selectSearch(""),this.mapControlsHidden=!0,this.floorsControlHidden=!0,this.hideHeaderLogo=!0,this.hideFreeOrDemo=!0,this.hideOverlay=!0,this.hideCookieConsent=!0,this.buildRoute=!0}setGlobalErrorMessage(o){this.globalErrorMessages.push(o)}popGlobalErrorMessage(){this.globalErrorMessages.pop()}initializeUIScale(){if(new URLSearchParams(window.location.search).get("kiosk")!=="0"&&w){const s=localStorage.getItem(H)??localStorage.getItem(N);if(s){const i=parseFloat(s);!isNaN(i)&&i>=.8&&i<=1.4&&(this._customUIScale=i)}}}setUIScale(o,s=!0){if(o===void 0||isNaN(o)||o<this.minUIScale||o>this.maxUIScale){ft.warn(`Invalid ui-scale value: ${o}. Must be between ${this.minUIScale} and ${this.maxUIScale}.`);return}this._customUIScale=o,s&&w&&(localStorage.setItem(H,o.toString()),localStorage.removeItem(N))}resetUIScale(){this._customUIScale=null,w&&(localStorage.removeItem(H),localStorage.removeItem(N))}restoreUIScale(){this._customUIScale=null,this.initializeUIScale()}enableSetKioskMode(o){this.setKioskModeEnabled=o}setKioskData(o){this.kioskData=o}}e([a.struct],t.prototype,"list",void 0),e([a.ref],t.prototype,"details",void 0),e([a.ref],t.prototype,"hoveredExhibitor",void 0),e([a.ref],t.prototype,"hoveredBooth",void 0),e([a],t.prototype,"zoomBy",void 0),e([a],t.prototype,"rollReset",void 0),e([a],t.prototype,"moveToBooths",void 0),e([a],t.prototype,"moveToRect",void 0),e([a],t.prototype,"moveToRectPaddingPercent",void 0),e([a],t.prototype,"moveToLocation",void 0),e([a],t.prototype,"menu",void 0),e([a],t.prototype,"searchFocused",void 0),e([a],t.prototype,"searchClearMode",void 0),e([a],t.prototype,"printingPdf",void 0),e([a.struct],t.prototype,"screenSize",void 0),e([a],t.prototype,"desiredOverlaySize",void 0),e([a],t.prototype,"overlayShowsAll",void 0),e([a],t.prototype,"centerMap",void 0),e([a],t.prototype,"zoomAfTransformK",void 0),e([a],t.prototype,"activeListIndex",void 0),e([a],t.prototype,"devicePixelRatio",void 0),e([a],t.prototype,"wsStarted",void 0),e([a],t.prototype,"canvasStarted",void 0),e([a],t.prototype,"kiosk",void 0),e([a],t.prototype,"inIdle",void 0),e([a],t.prototype,"modalActive",void 0),e([a],t.prototype,"galleryActive",void 0),e([a],t.prototype,"hideOverlay",void 0),e([a],t.prototype,"searchButtonsOverride",void 0),e([a],t.prototype,"hideCookieConsent",void 0),e([a],t.prototype,"hideHeaderLogo",void 0),e([a],t.prototype,"hideLogoInBooth",void 0),e([a],t.prototype,"disableBookmarked",void 0),e([a],t.prototype,"hideLanguage",void 0),e([a],t.prototype,"monochrome",void 0),e([a],t.prototype,"heatmap",void 0),e([a],t.prototype,"heatmapYah",void 0),e([a],t.prototype,"debugCircles",void 0),e([a],t.prototype,"mapControlsHidden",void 0),e([a],t.prototype,"floorsControlHidden",void 0),e([a],t.prototype,"hideFreeOrDemo",void 0),e([a],t.prototype,"freeBannerDismissed",void 0),e([a],t.prototype,"currentBanner",void 0),e([a],t.prototype,"sceneDefReady",void 0),e([a],t.prototype,"categoryFilterOpen",void 0),e([a],t.prototype,"selectedCategoryFilters",void 0),e([a],t.prototype,"selectedPoiTypeFilters",void 0),e([a],t.prototype,"selectedTrack",void 0),e([a],t.prototype,"subButtonsVisible",void 0),e([a],t.prototype,"searchBoxMode",void 0),e([a],t.prototype,"searchBoxTitle",void 0),e([a],t.prototype,"searchBoxSubtitle",void 0),e([a],t.prototype,"routeTitle",void 0),e([a],t.prototype,"routeDescription",void 0),e([a],t.prototype,"isMultiPointRoute",void 0),e([a],t.prototype,"tourTitle",void 0),e([a],t.prototype,"tourDescription",void 0),e([a],t.prototype,"isMultiPointTour",void 0),e([a],t.prototype,"pathwayOnlyMode",void 0),e([a],t.prototype,"isOverlayScrolled",void 0),e([a],t.prototype,"listScrollTop",void 0),e([a],t.prototype,"listScrollItemId",void 0),e([a],t.prototype,"listScrollIndex",void 0),e([a],t.prototype,"_customUIScale",void 0),e([d],t.prototype,"setSelectedCategoryFilters",null),e([d],t.prototype,"resetCategoryFilter",null),e([d],t.prototype,"setSearchClearMode",null),e([d],t.prototype,"setRouteTitle",null),e([d],t.prototype,"setRouteDescription",null),e([d],t.prototype,"setIsMultiPointRoute",null),e([d],t.prototype,"setTourTitle",null),e([d],t.prototype,"setTourDescription",null),e([d],t.prototype,"setIsMultiPointTour",null),e([d],t.prototype,"setPathwayOnlyMode",null),e([d],t.prototype,"setMultiPointTourList",null),e([n],t.prototype,"activePathwayLayers",null),e([n],t.prototype,"highlightedBooths",null),e([n],t.prototype,"rtl",null),e([n({keepAlive:!0})],t.prototype,"noOverlay",null),e([n],t.prototype,"overlayOnDemand",null),e([n],t.prototype,"overlayHiddenNow",null),e([n({keepAlive:!0})],t.prototype,"selectedExhibitor",null),e([n({keepAlive:!0})],t.prototype,"selectedBooth",null),e([n({keepAlive:!0})],t.prototype,"selectedCategory",null),e([n({keepAlive:!0})],t.prototype,"selectedRoute",null),e([n({keepAlive:!0})],t.prototype,"selectedSpeaker",null),e([n({keepAlive:!0})],t.prototype,"uiScale",null),e([n({keepAlive:!0})],t.prototype,"isGuidedToursActive",null),e([n({keepAlive:!0})],t.prototype,"getRouteNextFloor",null),e([n],t.prototype,"headerHeightPx",null),e([n],t.prototype,"overlayPosition",null),e([n],t.prototype,"overlayCollapsed",null),e([n],t.prototype,"overlaySize",null),e([n],t.prototype,"overlayBottom",null),e([n],t.prototype,"overlayLeft",null),e([n],t.prototype,"overlayWidthPx",null),e([n],t.prototype,"wsPaddingPx",null),e([n],t.prototype,"wsOccupiedHeightPx",null),e([n({keepAlive:!0})],t.prototype,"wsShown",null),e([n],t.prototype,"wsDesktopPosition",null),e([n],t.prototype,"wsPosition",null),e([n],t.prototype,"responsiveClass",null),e([n],t.prototype,"mapVisibleTop",null),e([n],t.prototype,"mapVisibleBottom",null),e([n],t.prototype,"searchActionsHeightPx",null),e([n],t.prototype,"shouldShowSearchButtons",null),e([n],t.prototype,"shouldShowMobileToggle",null),e([n],t.prototype,"mobileToggleIsListMode",null),e([n],t.prototype,"canvasVisibleRectPx",null),e([n],t.prototype,"shouldShiftMapRect",null),e([n],t.prototype,"hasAppliedFilters",null),e([n],t.prototype,"canvasVisibleRectPt",null),e([n],t.prototype,"canvasSizePt",null),e([n({keepAlive:!0})],t.prototype,"shouldUseBackdrop",null),e([a],t.prototype,"forceDim",void 0),e([d],t.prototype,"setForceDim",null),e([n],t.prototype,"dimmed",null),e([n],t.prototype,"defaultSearchItems",null),e([n],t.prototype,"searchItems",null),e([n],t.prototype,"searchList",null),e([n],t.prototype,"foundInDescription",null),e([n],t.prototype,"foundInDescriptionStruct",null),e([n],t.prototype,"categoryFilteredSearchList",null),e([n],t.prototype,"fuzzySearchItems",null),e([n],t.prototype,"listItems",null),e([n({keepAlive:!0})],t.prototype,"listBooths",null),e([n({keepAlive:!0})],t.prototype,"selectedBooths",null),e([n({keepAlive:!0})],t.prototype,"hoveredBooths",null),e([n],t.prototype,"visibility",null),e([d],t.prototype,"setVisibility",null),e([d],t.prototype,"toggleMapOverlay",null),e([d],t.prototype,"changeZoom",null),e([d],t.prototype,"zoomIn",null),e([d],t.prototype,"zoomOut",null),e([d],t.prototype,"fitBounds",null),e([n({keepAlive:!0})],t.prototype,"selectedEventItem",null),e([a],t.prototype,"mapSettings",void 0),e([d],t.prototype,"setMapSettings",null),e([d],t.prototype,"resetMapSettings",null),e([a],t.prototype,"animatePitch",void 0),e([n({keepAlive:!0})],t.prototype,"pitchEnabled",null),e([n],t.prototype,"rollEnabled",null),e([n],t.prototype,"baseQRCodeUrl",null),e([n],t.prototype,"viewMapOnPhoneQRCodeUrl",null),e([n],t.prototype,"routeQRCodeUrl",null),e([n],t.prototype,"isFeaturedExhibitorActive",null),e([n],t.prototype,"activeInterfaceData",null),e([n],t.prototype,"activeInterfaceId",null),e([n],t.prototype,"searchBoxConfig",null),e([n],t.prototype,"searchBoxActions",null),e([n],t.prototype,"overlayInterfaceClasses",null),e([n],t.prototype,"isOverlayOpen",null),e([d],t.prototype,"setOverlayScrolled",null),e([d],t.prototype,"setListScrollTop",null),e([d],t.prototype,"setListScrollItemId",null),e([d],t.prototype,"getListScrollTop",null),e([d],t.prototype,"getListScrollItemId",null),e([d],t.prototype,"clearListScroll",null),e([n],t.prototype,"bannerType",null),e([d],t.prototype,"setCurrentBanner",null),e([a],t.prototype,"forceShowDetails",void 0),e([d],t.prototype,"setForceShowDetails",null),e([n],t.prototype,"showRouteInstantly",null),e([a],t.prototype,"buildRoute",void 0),e([d],t.prototype,"startBuildRoute",null),e([a],t.prototype,"globalErrorMessages",void 0),e([d],t.prototype,"setGlobalErrorMessage",null),e([d],t.prototype,"popGlobalErrorMessage",null),e([d],t.prototype,"initializeUIScale",null),e([d],t.prototype,"setUIScale",null),e([d],t.prototype,"resetUIScale",null),e([d],t.prototype,"restoreUIScale",null),e([a],t.prototype,"setKioskModeEnabled",void 0),e([d],t.prototype,"enableSetKioskMode",null),e([a],t.prototype,"kioskData",void 0),e([d],t.prototype,"setKioskData",null);function J(P){return"description"in P&&typeof P.description=="string"?P.description:void 0}function F(P,o,s=[]){const i=[];return P.forEach(c=>{if(c instanceof x)i.push(...c.booths);else if(c instanceof I)i.push(c);else if(c instanceof O){const r=o.find(l=>l.id===c.boothId);c.boothId&&r&&i.push(r)}else c instanceof K&&s.filter(r=>r.speakers.some(l=>l.id===c.id)&&r.boothId).forEach(r=>{const l=o.find(u=>u.id===r.boothId);l&&i.push(l)})}),new Set(i.filter(Boolean))}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Builds the store graph belonging to the plan being loaded and points the
3
+ * barrel at it.
4
+ *
5
+ * The one construction site: there is no module-scope `new RootStore()` any
6
+ * more, so a first load and every later swap run this exact path (ADR-0011).
7
+ * The load path must call it strictly *after* `setConfig()` — the stores and
8
+ * `init()` read the event data as they are built, and against the previous
9
+ * event's config they would rebuild the fresh/stale hybrid the plan swap
10
+ * exists to kill.
11
+ */
12
+ export declare function createLivePlan(): void;
13
+ //# sourceMappingURL=create-live-plan.d.ts.map
@@ -0,0 +1 @@
1
+ import{registerPlanDisposer as t}from"../plan-lifecycle.js";import e from"./init/index.js";import{setLiveStore as r,store as i}from"./live-store.js";import n from"./RootStore.js";export function createLivePlan(){const o=new n;r(o),t(()=>r(null)),e(o),window.__store=i}
@@ -1,14 +1,3 @@
1
- import RootStore from './RootStore';
2
- declare const store: RootStore;
3
- export default store;
4
- export declare const uiState: import("./UIState").default;
5
- export declare const overlayStore: import("./OverlayStore").default;
6
- export declare const exhibitorStore: import("./ExhibitorStore").default;
7
- export declare const boothStore: import("./BoothStore").default;
8
- export declare const categoryStore: import("./CategoryStore").default;
9
- export declare const layersStore: import("./LayerStore").default;
10
- export declare const heatmapStore: import("./HeatmapStore").default;
11
- export declare const searchStore: import("./SearchStore").default;
12
- export declare const toursStore: import("./ToursStore").default;
13
- export declare const intercomStore: import("./IntercomStore").default;
1
+ export { store as default } from './live-store.js';
2
+ export { boothStore, categoryStore, exhibitorStore, heatmapStore, intercomStore, layersStore, overlayStore, searchStore, toursStore, uiState, } from './live-store.js';
14
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- import{configure as t}from"mobx";import e from"./init";import r from"./RootStore";if(!window.__storeInitAllowed)throw new Error("Store initialization is not allowed before data is loaded");t({computedRequiresReaction:!0});const o=new r;e(o);export default o;export const uiState=o.uiState,overlayStore=o.overlayStore,exhibitorStore=o.exhibitorStore,boothStore=o.boothStore,categoryStore=o.categoryStore,layersStore=o.layerStore,heatmapStore=o.heatmapStore,searchStore=o.searchStore,toursStore=o.toursStore,intercomStore=o.intercomStore;window.__store=o;
1
+ import{configure as e}from"mobx";e({computedRequiresReaction:!0});export{store as default}from"./live-store.js";export{boothStore,categoryStore,exhibitorStore,heatmapStore,intercomStore,layersStore,overlayStore,searchStore,toursStore,uiState}from"./live-store.js";
@@ -1 +1 @@
1
- import{Box as A,degToRad as S,radToDeg as R}from"@expofp/geometry";import M from"color";import*as W from"d3-selection";import{autorun as O}from"mobx";import w from"../../data";import{getLayerSvg as T,getTrianglesFromFpPaths as V}from"../../data/svg";import{getNextId as G}from"../../tools/id";import y from"../../tools/logger";import P from"../../tools/settings";import{generateUniqueSlug as E}from"../../tools/slug";import{sortByName as $}from"../../utils";import{areLayersEnabled as U}from"../../utils/areLayersEnabled";import{getStorage as z,saveStorage as j}from"../../utils/entity-storage";import{extractMetaFromString as q}from"../../utils/extractMetaFromString";import{RegularBooth as C,SpecialBooth as L}from"../BoothStore";import{uiState as H}from"../index";const k=new Map,x=[];export function iniAllBooths(e){k.clear(),x.length=0;for(const l of w.booths||[]){const{text:d,meta:b}=q(l.name),a=l.special?new L:new C;Object.assign(a,l),a.meta=b,a.slug=E(a.name),k.set(a.name.toLowerCase(),a),K(a);const n=a;n.exhibitors=[];for(const m of l.exhibitors??[]){const p=e.exhibitorStore.exhibitorById.get(m);p&&(n.exhibitors.push(p),p.booths.push(n))}a.schedule=e.eventStore.eventItems.filter(m=>m.boothId===a.id),a.name=d,x.push(a)}x.sort((l,d)=>l.name.localeCompare(d.name,void 0,{sensitivity:"base",numeric:!0}));for(const l of e.exhibitorStore.exhibitors)$(l.booths);e.boothStore.booths=x,y.log("initBooths",e.boothStore.booths.length),X(e)}function X(e){const b=(z("bookmarked").booths||[]).filter(a=>{const n=e.boothStore.boothById.get(a);return n&&n.exhibitors.length===0});e.boothStore.replaceBookmarked(b),O(()=>{const a=z("bookmarked"),n=e.boothStore.booths.filter(m=>m.exhibitors.length===0&&m.bookmarkedDirectly).map(m=>m.id);j("bookmarked",{exhibitors:a.exhibitors,events:a.events,speakers:a.speakers,booths:n})})}export default function J(e,l){const d=l.name,{boothStore:b,layerStore:a}=e,n=[],m=U(),p=W.select(T(l)).selectAll(`[data-layer='${d}'] > [data-tagname='efp-booth'], [data-layer='${d}'] > g[id^=b], [data-layer='${d}'] > rect[id^=b]`).nodes();for(const o of p){const F=o.closest("svg > [data-layer]").getAttribute("data-layer");if(!F)continue;let r,I=!1;o.tagName==="rect"?r=o:(r=Array.from(o.children).find(h=>h.tagName==="rect"),I=r===o.firstElementChild);const N=o.id||o.getAttribute("data-name");if(!N){y.error("SVG booth element has neither id nor data-name:",o);continue}const u=N.substring(1).toLowerCase();let t=k.get(u),i=t instanceof C?t:null;const v=t instanceof L?t:null;if(t||(y.error("SVG booth rect not found in the event data:",u),t=i=new C,t.id=G(),t.name=u.toUpperCase(),t.slug=E(u),t.error=!0,t.exhibitors=[],k.set(u,t)),n.push(t),t.layer=m?a.layers.find(h=>h.name===F):null,t.borderColor=r?.getAttribute("stroke")||r?.style.stroke||P.boothBorderColor||"#FFFFFF",t.borderWidth=parseFloat(r?.getAttribute("stroke-width")||r?.style.strokeWidth),isNaN(t.borderWidth)&&(t.borderWidth=b.borderWidth),!H.heatmap)t.labelColor=r?.getAttribute("data-label-color");else{const h=e.heatmapStore.getTotalClicksByBooth(t),f=M(e.heatmapStore.getColorByClicks(h));t.labelColor=f.darken(.3).isLight()?"#555":"#fff"}t.rect=r?A.fromSvg(r):null,t.elevation=parseFloat(r?.dataset.elev)||0,t.noLabels=!!r?.dataset.nolabel||r?.id.startsWith("no"),i?(i.availColor=o.getAttribute("data-avail-color")||r?.getAttribute("data-avail-color")||i.availColor,i.soldColor=o.getAttribute("data-sold-color")||r?.getAttribute("data-sold-color")||i.soldColor,i.holdColor=o.getAttribute("data-hold-color")||r?.getAttribute("data-hold-color")||i.holdColor,i.size=w.dimensionless?null:i.size||o.getAttribute("data-size"),i.status==="reserved"?i.reserved=!0:i.status==="onhold"&&(i.onHold=!0)):v&&(v.color=(parseInt(r.getAttribute("data-poi-type")??"")>0?r.style?.fill:o.getAttribute("data-color")||r.getAttribute("data-color"))||v.color);const g=r?.getAttribute("transform");if(g){const h=g.match(/translate\(([-0-9.]+) ([-0-9.]+)\) rotate\(([-0-9.]+)\)/);if(h){const s=parseFloat(h[3]);t.rotate=S(s)}else{const s=g.match(/rotate\(([-0-9.]+).*\)/);if(s){const c=parseFloat(s[1]);t.rotate=S(c)}else{const c=g.match(/matrix\(\s*([-0-9.]+)\s*(?:,|\s)\s*([-0-9.]+)\s*(?:,|\s)\s*([-0-9.]+)\s*(?:,|\s)\s*([-0-9.]+)\s*(?:,|\s)\s*([-0-9.]+)\s*(?:,|\s)\s*([-0-9.]+)\s*\)/);c&&(t.rotate=Math.asin(parseFloat(c[2])))}}if(Math.abs(R(t.rotate))>180){t.rotate+=S(90);const s=t.rect;t.rect=new A(s.center.x-s.size.height/2,s.center.y-s.size.width/2,s.size.height,s.size.width)}}if(o.tagName==="g"){t.paths=[],t.pathsWithRect=I;const h=[];for(const f of W.select(o).selectAll("path, rect").nodes())if(f.tagName==="path"){const s=f;if(s.tagName!=="path")continue;const c=parseInt(s.getAttribute("data-index")??""),D=!!s.getAttribute("data-unblinking");t.paths.push({index:c,color:s.style.fill,unblinking:D}),r||h.push(...V(c,d))}if(h.length){const f=h.flatMap(s=>s.map(c=>({x:c[0],y:c[1]})));t.rect=A.fromPoints(f),t.noLabels=!0}}}const B=n.filter(o=>o.rect?!0:(y.error("event data booth not found in SVG:",o.name,o),!1));for(const o of B)o.store=b;return B}function K(e){P.EXPO==="cbresupplypartner"&&e instanceof C&&!e.availColor&&e.type&&(e.type.indexOf("Premium A - 2m height restriction Passport")!==-1?e.availColor="#939393":e.type.indexOf("No free-standing")!==-1?e.availColor="#BA3DC8":e.type.endsWith("Passport")?e.availColor="#939393":e.type.startsWith("Premium A - 2m")?e.availColor="#FF9E4E":e.type.startsWith("Premium A - 4m")?e.availColor="#EA4335":e.type.startsWith("Premium B - 2m")?e.availColor="#523BC0":e.type.startsWith("Premium C - 2.4m")&&(e.availColor="#3ECC78"))}
1
+ import{Box as A,degToRad as S,radToDeg as D}from"@expofp/geometry";import R from"color";import*as N from"d3-selection";import W from"../../data";import{getLayerSvg as M,getTrianglesFromFpPaths as O}from"../../data/svg";import{eventScopedCache as T}from"../../tools/event-scoped-cache.js";import{getNextId as V}from"../../tools/id";import C from"../../tools/logger";import w from"../../tools/settings";import{generateUniqueSlug as P}from"../../tools/slug";import{sortByName as G}from"../../utils";import{areLayersEnabled as $}from"../../utils/areLayersEnabled";import{getStorage as E,saveStorage as U}from"../../utils/entity-storage";import{extractMetaFromString as j}from"../../utils/extractMetaFromString";import{planAutorun as q}from"../../utils/plan-reactions.js";import{RegularBooth as k,SpecialBooth as z}from"../BoothStore";import{uiState as H}from"../index";const x=T();export function iniAllBooths(e){x().clear();const f=[];for(const i of W.booths||[]){const{text:d,meta:c}=j(i.name),o=i.special?new z:new k;Object.assign(o,i),o.meta=c,o.slug=P(o.name),x().set(o.name.toLowerCase(),o),K(o);const h=o;h.exhibitors=[];for(const u of i.exhibitors??[]){const p=e.exhibitorStore.exhibitorById.get(u);p&&(h.exhibitors.push(p),p.booths.push(h))}o.schedule=e.eventStore.eventItems.filter(u=>u.boothId===o.id),o.name=d,f.push(o)}f.sort((i,d)=>i.name.localeCompare(d.name,void 0,{sensitivity:"base",numeric:!0}));for(const i of e.exhibitorStore.exhibitors)G(i.booths);e.boothStore.booths=f,C.log("initBooths",e.boothStore.booths.length),X(e)}function X(e){const d=(E("bookmarked").booths||[]).filter(c=>{const o=e.boothStore.boothById.get(c);return o&&o.exhibitors.length===0});e.boothStore.replaceBookmarked(d),q(()=>{const c=E("bookmarked"),o=e.boothStore.booths.filter(h=>h.exhibitors.length===0&&h.bookmarkedDirectly).map(h=>h.id);U("bookmarked",{exhibitors:c.exhibitors,events:c.events,speakers:c.speakers,booths:o})})}export default function J(e,f){const i=f.name,{boothStore:d,layerStore:c}=e,o=[],h=$(),u=N.select(M(f)).selectAll(`[data-layer='${i}'] > [data-tagname='efp-booth'], [data-layer='${i}'] > g[id^=b], [data-layer='${i}'] > rect[id^=b]`).nodes();for(const r of u){const B=r.closest("svg > [data-layer]").getAttribute("data-layer");if(!B)continue;let a,F=!1;r.tagName==="rect"?a=r:(a=Array.from(r.children).find(n=>n.tagName==="rect"),F=a===r.firstElementChild);const I=r.id||r.getAttribute("data-name");if(!I){C.error("SVG booth element has neither id nor data-name:",r);continue}const g=I.substring(1).toLowerCase();let t=x().get(g),l=t instanceof k?t:null;const v=t instanceof z?t:null;if(t||(C.error("SVG booth rect not found in the event data:",g),t=l=new k,t.id=V(),t.name=g.toUpperCase(),t.slug=P(g),t.error=!0,t.exhibitors=[],x().set(g,t)),o.push(t),t.layer=h?c.layers.find(n=>n.name===B):null,t.borderColor=a?.getAttribute("stroke")||a?.style.stroke||w.boothBorderColor||"#FFFFFF",t.borderWidth=parseFloat(a?.getAttribute("stroke-width")||a?.style.strokeWidth),isNaN(t.borderWidth)&&(t.borderWidth=d.borderWidth),!H.heatmap)t.labelColor=a?.getAttribute("data-label-color");else{const n=e.heatmapStore.getTotalClicksByBooth(t),b=R(e.heatmapStore.getColorByClicks(n));t.labelColor=b.darken(.3).isLight()?"#555":"#fff"}t.rect=a?A.fromSvg(a):null,t.elevation=parseFloat(a?.dataset.elev??"")||0,t.noLabels=!!a?.dataset.nolabel||a?.id.startsWith("no"),l?(l.availColor=r.getAttribute("data-avail-color")||a?.getAttribute("data-avail-color")||l.availColor,l.soldColor=r.getAttribute("data-sold-color")||a?.getAttribute("data-sold-color")||l.soldColor,l.holdColor=r.getAttribute("data-hold-color")||a?.getAttribute("data-hold-color")||l.holdColor,l.size=W.dimensionless?null:l.size||r.getAttribute("data-size"),l.status==="reserved"?l.reserved=!0:l.status==="onhold"&&(l.onHold=!0)):v&&(v.color=(parseInt(a.getAttribute("data-poi-type")??"")>0?a.style?.fill:r.getAttribute("data-color")||a.getAttribute("data-color"))||v.color);const y=a?.getAttribute("transform");if(y){const n=y.match(/translate\(([-0-9.]+) ([-0-9.]+)\) rotate\(([-0-9.]+)\)/);if(n){const s=parseFloat(n[3]);t.rotate=S(s)}else{const s=y.match(/rotate\(([-0-9.]+).*\)/);if(s){const m=parseFloat(s[1]);t.rotate=S(m)}else{const m=y.match(/matrix\(\s*([-0-9.]+)\s*(?:,|\s)\s*([-0-9.]+)\s*(?:,|\s)\s*([-0-9.]+)\s*(?:,|\s)\s*([-0-9.]+)\s*(?:,|\s)\s*([-0-9.]+)\s*(?:,|\s)\s*([-0-9.]+)\s*\)/);m&&(t.rotate=Math.asin(parseFloat(m[2])))}}if(Math.abs(D(t.rotate))>180){t.rotate+=S(90);const s=t.rect;t.rect=new A(s.center.x-s.size.height/2,s.center.y-s.size.width/2,s.size.height,s.size.width)}}if(r.tagName==="g"){t.paths=[],t.pathsWithRect=F;const n=[];for(const b of N.select(r).selectAll("path, rect").nodes())if(b.tagName==="path"){const s=b;if(s.tagName!=="path")continue;const m=parseInt(s.getAttribute("data-index")??""),L=!!s.getAttribute("data-unblinking");t.paths.push({index:m,color:s.style.fill,unblinking:L}),a||n.push(...O(m,i))}if(n.length){const b=n.flatMap(s=>s.map(m=>({x:m[0],y:m[1]})));t.rect=A.fromPoints(b),t.noLabels=!0}}}const p=o.filter(r=>r.rect?!0:(C.error("event data booth not found in SVG:",r.name,r),!1));for(const r of p)r.store=d;return p}function K(e){w.EXPO==="cbresupplypartner"&&e instanceof k&&!e.availColor&&e.type&&(e.type.indexOf("Premium A - 2m height restriction Passport")!==-1?e.availColor="#939393":e.type.indexOf("No free-standing")!==-1?e.availColor="#BA3DC8":e.type.endsWith("Passport")?e.availColor="#939393":e.type.startsWith("Premium A - 2m")?e.availColor="#FF9E4E":e.type.startsWith("Premium A - 4m")?e.availColor="#EA4335":e.type.startsWith("Premium B - 2m")?e.availColor="#523BC0":e.type.startsWith("Premium C - 2.4m")&&(e.availColor="#3ECC78"))}
@@ -1 +1 @@
1
- import{autorun as s}from"mobx";import k from"../../data";import a from"../../tools/logger";import{getStorage as r,saveStorage as n}from"../../utils/entity-storage";import{EventItem as m}from"../EventStore";export default function p(t){k.events?.forEach(e=>{const o=(e.speakers||[]).map(d=>t.speakerStore.addSpeaker({...d})),i=new m(e.id,e.externalId||e.id.toString(),e.boothId,e.name||`Event ${e.id}`,e.description||"",e.startDate,e.endDate,e.logoFile,o,e.tracks||[]);t.eventStore.eventItems.push(i)}),a.log("initEvents",t.eventStore.eventItems.length),a.log("initSpeakers",t.speakerStore.speakersMap.size),c(t.eventStore),v(t.eventStore)}function v(t){const e=r("visited");t.replaceVisited(e.events),s(()=>{const o=r("visited");n("visited",{exhibitors:o.exhibitors,events:t.visited.map(i=>i.id)})})}function c(t){const e=r("bookmarked");t.replaceBookmarked(e.events),s(()=>{const o=r("bookmarked");n("bookmarked",{exhibitors:o.exhibitors,events:t.bookmarked?.map(i=>i.id),speakers:o.speakers,booths:o.booths})})}
1
+ import k from"../../data";import s from"../../tools/logger";import{getStorage as r,saveStorage as a}from"../../utils/entity-storage";import{planAutorun as n}from"../../utils/plan-reactions.js";import{EventItem as m}from"../EventStore";export default function p(t){k.events?.forEach(e=>{const o=(e.speakers||[]).map(d=>t.speakerStore.addSpeaker({...d})),i=new m(e.id,e.externalId||e.id.toString(),e.boothId,e.name||`Event ${e.id}`,e.description||"",e.startDate,e.endDate,e.logoFile,o,e.tracks||[]);t.eventStore.eventItems.push(i)}),s.log("initEvents",t.eventStore.eventItems.length),s.log("initSpeakers",t.speakerStore.speakersMap.size),c(t.eventStore),v(t.eventStore)}function v(t){const e=r("visited");t.replaceVisited(e.events),n(()=>{const o=r("visited");a("visited",{exhibitors:o.exhibitors,events:t.visited.map(i=>i.id)})})}function c(t){const e=r("bookmarked");t.replaceBookmarked(e.events),n(()=>{const o=r("bookmarked");a("bookmarked",{exhibitors:o.exhibitors,events:t.bookmarked?.map(i=>i.id),speakers:o.speakers,booths:o.booths})})}
@@ -1 +1 @@
1
- import{autorun as a}from"mobx";import b from"../../data";import d from"../../tools/logger";import{generateUniqueSlug as k}from"../../tools/slug";import{getStorage as s,saveStorage as m}from"../../utils/entity-storage";import n from"../../utils/preview-exhibitor";import{Exhibitor as c,RebookingState as u}from"../ExhibitorStore";export default function f(r){const{exhibitorStore:i}=r,o=[...b.exhibitors||[]];if(n){const t=o.findIndex(e=>e.id===n.id);t!==-1?o.splice(t,1,n):o.push(n)}o.sort((t,e)=>Number(e.featured)-Number(t.featured));for(const t of o){const e=new c;Object.assign(e,t),e.slug=k(e.name),e.rebookingState=e.rebookingState||u.Unasked,e.categories=[],e.booths=[],e.store=i,i.exhibitors.push(e),e.schedule=null}d.log("initExhibitors",i.exhibitors.length),h(i),p(i)}function h(r){const i=s("bookmarked");r.replaceBookmarked(i.exhibitors),a(()=>{const o=s("bookmarked");m("bookmarked",{exhibitors:r.bookmarked?.map(t=>t.id),events:o.events,speakers:o.speakers,booths:o.booths})})}function p(r){const i=s("visited");r.replaceVisited(i.exhibitors),a(()=>{const o=s("visited");m("visited",{exhibitors:r.visited.map(t=>t.id),events:o.events})})}
1
+ import b from"../../data";import d from"../../tools/logger";import{generateUniqueSlug as k}from"../../tools/slug";import{getStorage as n,saveStorage as a}from"../../utils/entity-storage";import{planAutorun as m}from"../../utils/plan-reactions.js";import c from"../../utils/preview-exhibitor.js";import{Exhibitor as h,RebookingState as p}from"../ExhibitorStore";export default function u(r){const{exhibitorStore:t}=r,o=[...b.exhibitors||[]],i=c();if(i){const s=o.findIndex(e=>e.id===i.id);s!==-1?o.splice(s,1,i):o.push(i)}o.sort((s,e)=>Number(e.featured)-Number(s.featured));for(const s of o){const e=new h;Object.assign(e,s),e.slug=k(e.name),e.rebookingState=e.rebookingState||p.Unasked,e.categories=[],e.booths=[],e.store=t,t.exhibitors.push(e),e.schedule=null}d.log("initExhibitors",t.exhibitors.length),f(t),g(t)}function f(r){const t=n("bookmarked");r.replaceBookmarked(t.exhibitors),m(()=>{const o=n("bookmarked");a("bookmarked",{exhibitors:r.bookmarked?.map(i=>i.id),events:o.events,speakers:o.speakers,booths:o.booths})})}function g(r){const t=n("visited");r.replaceVisited(t.exhibitors),m(()=>{const o=n("visited");a("visited",{exhibitors:r.visited.map(i=>i.id),events:o.events})})}
@@ -1 +1 @@
1
- import{Box as g,isBox as w}from"@expofp/geometry";import{select as b}from"d3";import{getFpSvgJs as u}from"../../data/fp-payloads";import{floors as x,getLayerSvg as p}from"../../data/svg";import{isPathwayLayer as L}from"../../utils/is-pathway-layer";import{Layer as c,LayerMode as n,LayersMode as m}from"../LayerStore";const h=1e3;function v(r){return r==null||w(r)?r:g.fromMinMax({x:r.x1,y:r.y1},{x:r.x2,y:r.y2})}export function getChildLayers(r,a,d){const f=[];let l=a;return b(p(r)).selectAll(`svg [data-layer="${r.name}"] > [data-layer]`).nodes().filter(o=>o.childNodes.length).forEach(o=>{const e=o.getAttribute("data-layer");let t=new c;t.name=o.getAttribute("data-layer"),t.visible=r.visible,t.description=o.getAttribute("data-layer-description")||e,t.frozen=o.getAttribute("data-layer-isfrozen")==="true",t.rect=r.rect,t.viewbox=r.viewbox,t.mode=n.Unset,t.rootParent=r.rootParent?r.rootParent:r;const i=getChildLayers(t,l,d);l=i.priority+d,t.basePriority=l,i.layers.length&&(t.childLayers=i.layers,f.push(...i.layers)),f.push(t)}),{layers:f,priority:l}}export default function z(r){const{layerStore:a}=r,d=u().__fpLayers;a.mode=u().__fpLayersMode||m.Default;const f=new URLSearchParams(window.location.search).get("layer"),l=(e,t)=>f?t.toLowerCase()===f.toLowerCase():a.mode!==m.Default?e.mode==n.TurnedOn:e.visible;let s=[],o=0;d?d.forEach(e=>{o+=h;let t=new c;t.name=e.name,t.description=e.description,t.frozen=e.frozen,t.visible=l(e,t.shortName),t.rect=v(e.rect),t.viewbox=v(e.viewbox),t.mode=e.mode||n.Unset,t.basePriority=o,t.floorIndex=e.floorIndex,s.push(t)}):b(p()).selectAll("svg > [data-layer]").nodes().filter(e=>e.childNodes.length).forEach(e=>{const t=e.getAttribute("data-layer");if(!t.startsWith("WF")){o+=h;let i=new c;i.name=t,i.visible=!0,i.description=e.getAttribute("data-layer-description")||t,i.frozen=e.getAttribute("data-layer-isfrozen")==="true",i.rect=x.filter(y=>y.name===i.name||y.name===i.description)[0]?.rect,i.mode=n.Unset,i.basePriority=o,s.push(i)}}),a.mode!==m.Default&&s.forEach(e=>{e.mode===n.AlwaysHidden?(e.frozen=!0,e.visible=!1):e.mode===n.AlwaysVisible?e.frozen=e.visible=!0:e.mode===n.TurnedOff?(e.frozen=!1,e.visible=!1):e.mode===n.TurnedOn&&(e.frozen=!1,e.visible=!0)});try{s.forEach(e=>{L(e.name)&&(e.frozen=!1,e.visible=!1,e.pathway=!0)})}catch(e){console.warn(e)}s=s.filter(e=>e.pathway||!e.frozen||e.frozen&&e.visible),a.defaultLayer=s.find(e=>e.name===u().__fpDefaultLayer),a.layers=[...a.layers,...s]}
1
+ import{Box as v,isBox as w}from"@expofp/geometry";import{select as b}from"d3";import{getFpSvgJs as u}from"../../data/fp-payloads";import{getFloors as x,getLayerSvg as p}from"../../data/svg.js";import{isPathwayLayer as L}from"../../utils/is-pathway-layer";import{Layer as c,LayerMode as n,LayersMode as m}from"../LayerStore";const h=1e3;function g(r){return r==null||w(r)?r:v.fromMinMax({x:r.x1,y:r.y1},{x:r.x2,y:r.y2})}export function getChildLayers(r,a,d){const f=[];let l=a;return b(p(r)).selectAll(`svg [data-layer="${r.name}"] > [data-layer]`).nodes().filter(o=>o.childNodes.length).forEach(o=>{const e=o.getAttribute("data-layer");let t=new c;t.name=o.getAttribute("data-layer"),t.visible=r.visible,t.description=o.getAttribute("data-layer-description")||e,t.frozen=o.getAttribute("data-layer-isfrozen")==="true",t.rect=r.rect,t.viewbox=r.viewbox,t.mode=n.Unset,t.rootParent=r.rootParent?r.rootParent:r;const i=getChildLayers(t,l,d);l=i.priority+d,t.basePriority=l,i.layers.length&&(t.childLayers=i.layers,f.push(...i.layers)),f.push(t)}),{layers:f,priority:l}}export default function z(r){const{layerStore:a}=r,d=u().__fpLayers;a.mode=u().__fpLayersMode||m.Default;const f=new URLSearchParams(window.location.search).get("layer"),l=(e,t)=>f?t.toLowerCase()===f.toLowerCase():a.mode!==m.Default?e.mode==n.TurnedOn:e.visible;let s=[],o=0;d?d.forEach(e=>{o+=h;let t=new c;t.name=e.name,t.description=e.description,t.frozen=e.frozen,t.visible=l(e,t.shortName),t.rect=g(e.rect),t.viewbox=g(e.viewbox),t.mode=e.mode||n.Unset,t.basePriority=o,t.floorIndex=e.floorIndex,s.push(t)}):b(p()).selectAll("svg > [data-layer]").nodes().filter(e=>e.childNodes.length).forEach(e=>{const t=e.getAttribute("data-layer");if(!t.startsWith("WF")){o+=h;let i=new c;i.name=t,i.visible=!0,i.description=e.getAttribute("data-layer-description")||t,i.frozen=e.getAttribute("data-layer-isfrozen")==="true",i.rect=x().filter(y=>y.name===i.name||y.name===i.description)[0]?.rect,i.mode=n.Unset,i.basePriority=o,s.push(i)}}),a.mode!==m.Default&&s.forEach(e=>{e.mode===n.AlwaysHidden?(e.frozen=!0,e.visible=!1):e.mode===n.AlwaysVisible?e.frozen=e.visible=!0:e.mode===n.TurnedOff?(e.frozen=!1,e.visible=!1):e.mode===n.TurnedOn&&(e.frozen=!1,e.visible=!0)});try{s.forEach(e=>{L(e.name)&&(e.frozen=!1,e.visible=!1,e.pathway=!0)})}catch(e){console.warn(e)}s=s.filter(e=>e.pathway||!e.frozen||e.frozen&&e.visible),a.defaultLayer=s.find(e=>e.name===u().__fpDefaultLayer),a.layers=[...a.layers,...s]}
@@ -1 +1 @@
1
- import{autorun as a}from"mobx";import{getStorage as r,saveStorage as s}from"../../utils/entity-storage";export default function i(o){m(o.speakerStore)}function m(o){const t=r("bookmarked");o.replaceBookmarked(t.speakers),a(()=>{const e=r("bookmarked");s("bookmarked",{exhibitors:e.exhibitors,events:e.events,speakers:o.bookmarked?.map(k=>k.id),booths:e.booths})})}
1
+ import{getStorage as r,saveStorage as a}from"../../utils/entity-storage";import{planAutorun as s}from"../../utils/plan-reactions.js";export default function i(o){m(o.speakerStore)}function m(o){const t=r("bookmarked");o.replaceBookmarked(t.speakers),s(()=>{const e=r("bookmarked");a("bookmarked",{exhibitors:e.exhibitors,events:e.events,speakers:o.bookmarked?.map(k=>k.id),booths:e.booths})})}
@@ -2,12 +2,10 @@ import type RootStore from '../RootStore';
2
2
  /**
3
3
  * Point the store at the container this FloorPlan was handed, and measure it.
4
4
  *
5
- * Kept apart from `initUi` because the two have different lifetimes: the store
6
- * module body — and so `initUi` — evaluates once per page, while one page may
7
- * build several FloorPlans in turn. A second `load()` gets a new container, so
8
- * anything still sized against or observing the first one is measuring a node
9
- * the host has already detached, and the plan renders blank. Idempotent: it
10
- * re-points the single ResizeObserver instead of stacking another one up.
5
+ * Exported apart from `initUi` because `floorplan.ready` re-runs it once the
6
+ * render target exists. Idempotent: it re-points the single ResizeObserver
7
+ * instead of stacking another one up, and `destroyUiHandlers()` disconnects
8
+ * that one with the plan.
11
9
  */
12
10
  export declare function bindRootElement(store: RootStore): void;
13
11
  export default function initUi(store: RootStore): void;
@@ -1,4 +1,4 @@
1
- import{Point as h}from"@expofp/geometry";import{autorun as c,comparer as S,reaction as v,runInAction as E}from"mobx";import{ResizeObserver as b}from"resize-observer";import{applyKioskMode as d}from"../../components/Kiosk/kiosk-mode";import{KIOSK_ENABLE_KEY as w,VISIBILITY_STORAGE_KEY as g}from"../../constants";import x from"../../data";import y from"../../tools/logger";import{isWebGlSupported as k}from"../../utils";import{detectLimitedModeViaImage as z}from"../../utils/detectLimitedModeViaImage";import{isLocalStorageAvailable as f}from"../../utils/localStorage";import u from"../../utils/preview-exhibitor";let n=null;export function bindRootElement(t){const e=window.__efpElement;if(!e)return;const{uiState:l}=t;l.rootElement=e;const o=(s,r)=>E("uiState.screenSize",()=>{l.screenSize=new h(s,r)});o(e.clientWidth,e.clientHeight),n?.disconnect(),n=new b(s=>{s.forEach(r=>{o(r.contentRect.width,r.contentRect.height)})}),n.observe(e)}export default function I(t){const{uiState:e,exhibitorStore:l}=t;if(bindRootElement(t),u){const i=l.exhibitorById.get(u.id);i&&(e.previewExhibitor=i)}const o=typeof matchMedia<"u"?matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`):null;o&&o.addEventListener&&o.addEventListener("change",()=>{e.devicePixelRatio=window.devicePixelRatio});const s=u||!k?"full":"medium";x.isRebooking&&e.list.type==="search"&&!e.list.text&&t.selectExhibitors(),e.desiredOverlaySize=s,c(()=>{(e.searchFocused||e.menu)&&e.overlayPosition!=="left"&&(e.desiredOverlaySize="full")}),c(()=>{e.overlaySize!=="full"&&e.menu&&(e.menu=!1)}),e.wsShown||(e.wsStarted=!0),f&&localStorage.getItem(w)==="1"&&d(e,!0),window.__resett=m;function r(){t.reset()}let a;function m(){!e.kiosk||e.setKioskModeEnabled||(y.log("zzz2","reset timer"),clearTimeout(a),a=setTimeout(r,3e4),e.inIdle=!1)}c(()=>{const i=e.list;i.type==="search"&&(i.text==="kiosk=1"?d(e,!0):i.text==="kiosk=0"&&d(e,!1))}),v(()=>[e.kiosk,e.setKioskModeEnabled],([i,p])=>{i&&!p?m():clearTimeout(a)},{equals:S.structural}),f&&e.setVisibility(JSON.parse(localStorage.getItem(g)??"null")||{}),T(t)}export function destroyUiHandlers(){n&&(n.disconnect(),n=null)}async function T(t){try{if(!await z())return;t.uiState.setGlobalErrorMessage({title:"Unsupported Environment Detected",body:`
1
+ import{Point as S}from"@expofp/geometry";import{comparer as v,runInAction as g}from"mobx";import{ResizeObserver as E}from"resize-observer";import{applyKioskMode as c}from"../../components/Kiosk/kiosk-mode";import{KIOSK_ENABLE_KEY as b,VISIBILITY_STORAGE_KEY as w}from"../../constants";import x from"../../data";import{registerPlanDisposer as m}from"../../plan-lifecycle.js";import y from"../../tools/logger";import{isWebGlSupported as k}from"../../utils";import{detectLimitedModeViaImage as z}from"../../utils/detectLimitedModeViaImage";import{isLocalStorageAvailable as f}from"../../utils/localStorage";import{planAutorun as d,planReaction as T}from"../../utils/plan-reactions.js";import I from"../../utils/preview-exhibitor.js";let s=null;export function bindRootElement(i){const e=window.__efpElement;if(!e)return;const{uiState:l}=i;l.rootElement=e;const r=(o,n)=>g("uiState.screenSize",()=>{l.screenSize=new S(o,n)});r(e.clientWidth,e.clientHeight),s?.disconnect(),s=new E(o=>{o.forEach(n=>{r(n.contentRect.width,n.contentRect.height)})}),s.observe(e)}export default function R(i){const{uiState:e,exhibitorStore:l}=i;bindRootElement(i),m(destroyUiHandlers);const r=I();if(r){const t=l.exhibitorById.get(r.id);t&&(e.previewExhibitor=t)}const o=typeof matchMedia<"u"?matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`):null;if(o&&o.addEventListener){const t=()=>{e.devicePixelRatio=window.devicePixelRatio};o.addEventListener("change",t),m(()=>o.removeEventListener("change",t))}const n=r||!k?"full":"medium";x.isRebooking&&e.list.type==="search"&&!e.list.text&&i.selectExhibitors(),e.desiredOverlaySize=n,d(()=>{(e.searchFocused||e.menu)&&e.overlayPosition!=="left"&&(e.desiredOverlaySize="full")}),d(()=>{e.overlaySize!=="full"&&e.menu&&(e.menu=!1)}),e.wsShown||(e.wsStarted=!0),f&&localStorage.getItem(b)==="1"&&c(e,!0),window.__resett=u;function p(){i.reset()}let a;m(()=>clearTimeout(a));function u(){!e.kiosk||e.setKioskModeEnabled||(y.log("zzz2","reset timer"),clearTimeout(a),a=setTimeout(p,3e4),e.inIdle=!1)}d(()=>{const t=e.list;t.type==="search"&&(t.text==="kiosk=1"?c(e,!0):t.text==="kiosk=0"&&c(e,!1))}),T(()=>[e.kiosk,e.setKioskModeEnabled],([t,h])=>{t&&!h?u():clearTimeout(a)},{equals:v.structural}),f&&e.setVisibility(JSON.parse(localStorage.getItem(w)??"null")||{}),M(i)}export function destroyUiHandlers(){s&&(s.disconnect(),s=null)}async function M(i){try{if(!await z())return;i.uiState.setGlobalErrorMessage({title:"Unsupported Environment Detected",body:`
2
2
  This application requires a proper server environment to function correctly.
3
3
  For full functionality, please ensure the application is served through an HTTP/HTTPS server.
4
4
  Some features may not work as expected in the current setup.
@@ -0,0 +1,19 @@
1
+ import type RootStore from './RootStore.js';
2
+ /**
3
+ * Points the store barrel's exports at the store graph of the plan being
4
+ * loaded, or at nothing once it has been destroyed. Called by the load path;
5
+ * nothing else should touch it.
6
+ */
7
+ export declare function setLiveStore(next: RootStore | null): void;
8
+ export declare const store: RootStore;
9
+ export declare const uiState: import("./UIState.js").default;
10
+ export declare const overlayStore: import("./OverlayStore.js").default;
11
+ export declare const exhibitorStore: import("./ExhibitorStore.js").default;
12
+ export declare const boothStore: import("./BoothStore.js").default;
13
+ export declare const categoryStore: import("./CategoryStore.js").default;
14
+ export declare const layersStore: import("./LayerStore.js").default;
15
+ export declare const heatmapStore: import("./HeatmapStore.js").default;
16
+ export declare const searchStore: import("./SearchStore.js").default;
17
+ export declare const toursStore: import("./ToursStore.js").default;
18
+ export declare const intercomStore: import("./IntercomStore.js").default;
19
+ //# sourceMappingURL=live-store.d.ts.map
@@ -0,0 +1 @@
1
+ import{createSwappableProxy as o}from"../utils/swappable-proxy.js";let t=null;export function setLiveStore(e){t=e}export const store=o("store",()=>t),uiState=o("uiState",()=>t?.uiState),overlayStore=o("overlayStore",()=>t?.overlayStore),exhibitorStore=o("exhibitorStore",()=>t?.exhibitorStore),boothStore=o("boothStore",()=>t?.boothStore),categoryStore=o("categoryStore",()=>t?.categoryStore),layersStore=o("layersStore",()=>t?.layerStore),heatmapStore=o("heatmapStore",()=>t?.heatmapStore),searchStore=o("searchStore",()=>t?.searchStore),toursStore=o("toursStore",()=>t?.toursStore),intercomStore=o("intercomStore",()=>t?.intercomStore);
@@ -1 +1 @@
1
- import{__decorate as i}from"tslib";import{action as s,computed as o,reaction as l}from"mobx";import{CACHE_DURATION as u,LANGUAGE_TYPE as a,MOBILE_BREAKPOINT as h}from"../../constants";import c from"../../data";import{SessionsSubButtonProvider as p}from"../providers/SessionsSubButtonProvider";import{SubButtonRegistry as d}from"../SubButtonRegistry";import{PREFIXES as S}from"./constants";import{SearchButtonsActions as y}from"./SearchButtonsActions";import{SearchButtonsFactory as B}from"./SearchButtonsFactory";import{SearchButtonsFilters as C}from"./SearchButtonsFilters";import{SearchButtonsState as g}from"./SearchButtonsState";import{countMapValues as b,extractPoiTypeId as P,isValidConfig as v}from"./utils";export default class e{constructor(t){this.poiTypeCountsCache=new Map,this.lastPoiTypeCountUpdate=0,this.rootStore=t,this.state=new g,this.filters=new C(t,this.state),this.actions=new y(t,this.state,this.filters),this.factory=new B(t,this.state,this.actions),this.setupReactions()}setupReactions(){l(()=>this.rootStore.boothStore.booths.length,()=>this.invalidatePoiTypeCounts())}get subButtonRegistry(){return this._subButtonRegistry||(this._subButtonRegistry=new d,this.registerSubButtonProviders()),this._subButtonRegistry}registerSubButtonProviders(){this.subButtonRegistry.register(new p(this.rootStore))}invalidatePoiTypeCounts(){this.poiTypeCountsCache.clear(),this.lastPoiTypeCountUpdate=0}get isVisible(){return this.state.isVisible}get shouldShow(){const{uiState:t}=this.rootStore;if(t.screenSize.width>=h)return this.state.isVisible;const r=!!(t.selectedExhibitor||t.selectedBooth||t.selectedEventItem||t.selectedRoute||t.menu||t.list.type===a);return this.state.isVisible&&!r}get activePoiFilterId(){return this.state.activePoiFilterId}get activeSubButtonsParentId(){return this.state.activeSubButtonsParentId}get activeSubButtonId(){return this.state.activeSubButtonId}get subButtonsEnabled(){return this.state.subButtonsEnabled}get searchShortcutState(){return this.state.searchShortcutState}get searchButtons(){const t=c.filterButtonsConfig;if(!v(t))return console.warn("[SearchButtonsStore] Invalid filterButtonsConfig detected"),[];const n=t.searchButtons;return this.factory.createButtons(n)}get hasAnySearchButtons(){return this.searchButtons.length>0}get hasActiveSearchButton(){return this.state.activePoiFilterId!==null||this.rootStore.uiState.selectedCategoryFilters.length>0}get activeSearchButtonLabel(){return this.state.activePoiFilterId?this.searchButtons.find(n=>n.id===this.state.activePoiFilterId)?.label||null:this.rootStore.uiState.selectedCategoryFilters.length>0?"Categories":null}get activeSubButtons(){return this.state.activeSubButtonsParentId?this.subButtonRegistry.getSubButtons(this.state.activeSubButtonsParentId):[]}get shouldShowSubButtons(){if(!this.state.subButtonsEnabled||!this.state.activeSubButtonsParentId)return!1;const t=this.searchButtons.find(n=>n.id===this.state.activeSubButtonsParentId);return!t||!t.active?!1:this.subButtonRegistry.shouldShowSubButtons(this.state.activeSubButtonsParentId)&&this.activeSubButtons.length>0}get hasActiveParentWithChildren(){return this.state.hasActiveParentWithChildren}get areAllSelected(){return this.filters.areAllSelected()}get activeChildrenCount(){return this.state.activeChildrenCount}get totalChildrenCount(){return this.filters.getChildrenCount()}get poiTypeCounts(){const t=Date.now();if(t-this.lastPoiTypeCountUpdate<u&&this.poiTypeCountsCache.size>0)return this.poiTypeCountsCache;const n=new Map;return this.rootStore.boothStore.booths.forEach(r=>{r.poiTypeId&&n.set(r.poiTypeId,(n.get(r.poiTypeId)||0)+1)}),this.poiTypeCountsCache=n,this.lastPoiTypeCountUpdate=t,n}get totalPoiTypeCount(){return b(this.poiTypeCounts)}get activePoiTypeId(){return this.state.activePoiFilterId?.startsWith(S.POI_TYPE)?P(this.state.activePoiFilterId):null}handleSearchButtonClick(t,n){this.actions.handleSearchButtonClick(t,n)}handleExtendedSearchButtonClick(t){this.actions.handleExtendedSearchButtonClick(t)}handleMainButtonClick(t){this.actions.handleMainButtonClick(t)}handleSessionsClick(t){this.actions.handleSessionsClick(t)}togglePoiType(t){this.actions.togglePoiType(t)}clearAllFilters(){this.actions.clearAllFilters()}showSubButtons(t){this.actions.showSubButtons(t)}hideSubButtons(){this.actions.hideSubButtons()}handleSubButtonClick(t){this.state.activeSubButtonId!==t&&(this.state.setSubButton(t),this.state.activeSubButtonsParentId&&this.subButtonRegistry.handleSubButtonClick(this.state.activeSubButtonsParentId,t))}toggleChildFilter(t){this.filters.toggleChildFilter(t)}clearPoiTypeFilters(){this.filters.clearPoiTypeFilters()}clearAllChildFilters(){this.filters.clearAllChildFilters()}setActiveParentId(t){this.state.setActiveParentId(t)}showShortcuts(t){this.state.showShortcuts(t)}clearChildren(){this.state.clearChildren()}setSubButtonId(t){this.state.setSubButton(t)}setPoiFilterId(t){this.state.setPoiFilter(t)}getPoiTypeTotalCount(t){return this.poiTypeCounts.get(t)||0}isChildActive(t){return this.state.isChildActive(t)}getActiveParent(){return this.filters.getActiveParent()}}i([s],e.prototype,"invalidatePoiTypeCounts",null),i([o],e.prototype,"isVisible",null),i([o],e.prototype,"shouldShow",null),i([o],e.prototype,"activePoiFilterId",null),i([o],e.prototype,"activeSubButtonsParentId",null),i([o],e.prototype,"activeSubButtonId",null),i([o],e.prototype,"subButtonsEnabled",null),i([o],e.prototype,"searchShortcutState",null),i([o],e.prototype,"searchButtons",null),i([o],e.prototype,"hasAnySearchButtons",null),i([o],e.prototype,"hasActiveSearchButton",null),i([o],e.prototype,"activeSearchButtonLabel",null),i([o],e.prototype,"activeSubButtons",null),i([o],e.prototype,"shouldShowSubButtons",null),i([o],e.prototype,"hasActiveParentWithChildren",null),i([o],e.prototype,"areAllSelected",null),i([o],e.prototype,"activeChildrenCount",null),i([o],e.prototype,"totalChildrenCount",null),i([o],e.prototype,"poiTypeCounts",null),i([o],e.prototype,"totalPoiTypeCount",null),i([o],e.prototype,"activePoiTypeId",null),i([s],e.prototype,"handleSearchButtonClick",null),i([s],e.prototype,"handleExtendedSearchButtonClick",null),i([s],e.prototype,"handleMainButtonClick",null),i([s],e.prototype,"handleSessionsClick",null),i([s],e.prototype,"togglePoiType",null),i([s],e.prototype,"clearAllFilters",null),i([s],e.prototype,"showSubButtons",null),i([s],e.prototype,"hideSubButtons",null),i([s],e.prototype,"handleSubButtonClick",null),i([s],e.prototype,"toggleChildFilter",null),i([s],e.prototype,"clearPoiTypeFilters",null),i([s],e.prototype,"clearAllChildFilters",null),i([s],e.prototype,"setActiveParentId",null),i([s],e.prototype,"showShortcuts",null),i([s],e.prototype,"clearChildren",null),i([s],e.prototype,"setSubButtonId",null),i([s],e.prototype,"setPoiFilterId",null);
1
+ import{__decorate as i}from"tslib";import{action as s,computed as o}from"mobx";import{CACHE_DURATION as l,LANGUAGE_TYPE as u,MOBILE_BREAKPOINT as a}from"../../constants";import h from"../../data";import{planReaction as c}from"../../utils/plan-reactions.js";import{SessionsSubButtonProvider as p}from"../providers/SessionsSubButtonProvider";import{SubButtonRegistry as d}from"../SubButtonRegistry";import{PREFIXES as S}from"./constants";import{SearchButtonsActions as y}from"./SearchButtonsActions";import{SearchButtonsFactory as B}from"./SearchButtonsFactory";import{SearchButtonsFilters as C}from"./SearchButtonsFilters";import{SearchButtonsState as g}from"./SearchButtonsState";import{countMapValues as b,extractPoiTypeId as P,isValidConfig as v}from"./utils";export default class e{constructor(t){this.poiTypeCountsCache=new Map,this.lastPoiTypeCountUpdate=0,this.rootStore=t,this.state=new g,this.filters=new C(t,this.state),this.actions=new y(t,this.state,this.filters),this.factory=new B(t,this.state,this.actions),this.setupReactions()}setupReactions(){c(()=>this.rootStore.boothStore.booths.length,()=>this.invalidatePoiTypeCounts())}get subButtonRegistry(){return this._subButtonRegistry||(this._subButtonRegistry=new d,this.registerSubButtonProviders()),this._subButtonRegistry}registerSubButtonProviders(){this.subButtonRegistry.register(new p(this.rootStore))}invalidatePoiTypeCounts(){this.poiTypeCountsCache.clear(),this.lastPoiTypeCountUpdate=0}get isVisible(){return this.state.isVisible}get shouldShow(){const{uiState:t}=this.rootStore;if(t.screenSize.width>=a)return this.state.isVisible;const r=!!(t.selectedExhibitor||t.selectedBooth||t.selectedEventItem||t.selectedRoute||t.menu||t.list.type===u);return this.state.isVisible&&!r}get activePoiFilterId(){return this.state.activePoiFilterId}get activeSubButtonsParentId(){return this.state.activeSubButtonsParentId}get activeSubButtonId(){return this.state.activeSubButtonId}get subButtonsEnabled(){return this.state.subButtonsEnabled}get searchShortcutState(){return this.state.searchShortcutState}get searchButtons(){const t=h.filterButtonsConfig;if(!v(t))return console.warn("[SearchButtonsStore] Invalid filterButtonsConfig detected"),[];const n=t.searchButtons;return this.factory.createButtons(n)}get hasAnySearchButtons(){return this.searchButtons.length>0}get hasActiveSearchButton(){return this.state.activePoiFilterId!==null||this.rootStore.uiState.selectedCategoryFilters.length>0}get activeSearchButtonLabel(){return this.state.activePoiFilterId?this.searchButtons.find(n=>n.id===this.state.activePoiFilterId)?.label||null:this.rootStore.uiState.selectedCategoryFilters.length>0?"Categories":null}get activeSubButtons(){return this.state.activeSubButtonsParentId?this.subButtonRegistry.getSubButtons(this.state.activeSubButtonsParentId):[]}get shouldShowSubButtons(){if(!this.state.subButtonsEnabled||!this.state.activeSubButtonsParentId)return!1;const t=this.searchButtons.find(n=>n.id===this.state.activeSubButtonsParentId);return!t||!t.active?!1:this.subButtonRegistry.shouldShowSubButtons(this.state.activeSubButtonsParentId)&&this.activeSubButtons.length>0}get hasActiveParentWithChildren(){return this.state.hasActiveParentWithChildren}get areAllSelected(){return this.filters.areAllSelected()}get activeChildrenCount(){return this.state.activeChildrenCount}get totalChildrenCount(){return this.filters.getChildrenCount()}get poiTypeCounts(){const t=Date.now();if(t-this.lastPoiTypeCountUpdate<l&&this.poiTypeCountsCache.size>0)return this.poiTypeCountsCache;const n=new Map;return this.rootStore.boothStore.booths.forEach(r=>{r.poiTypeId&&n.set(r.poiTypeId,(n.get(r.poiTypeId)||0)+1)}),this.poiTypeCountsCache=n,this.lastPoiTypeCountUpdate=t,n}get totalPoiTypeCount(){return b(this.poiTypeCounts)}get activePoiTypeId(){return this.state.activePoiFilterId?.startsWith(S.POI_TYPE)?P(this.state.activePoiFilterId):null}handleSearchButtonClick(t,n){this.actions.handleSearchButtonClick(t,n)}handleExtendedSearchButtonClick(t){this.actions.handleExtendedSearchButtonClick(t)}handleMainButtonClick(t){this.actions.handleMainButtonClick(t)}handleSessionsClick(t){this.actions.handleSessionsClick(t)}togglePoiType(t){this.actions.togglePoiType(t)}clearAllFilters(){this.actions.clearAllFilters()}showSubButtons(t){this.actions.showSubButtons(t)}hideSubButtons(){this.actions.hideSubButtons()}handleSubButtonClick(t){this.state.activeSubButtonId!==t&&(this.state.setSubButton(t),this.state.activeSubButtonsParentId&&this.subButtonRegistry.handleSubButtonClick(this.state.activeSubButtonsParentId,t))}toggleChildFilter(t){this.filters.toggleChildFilter(t)}clearPoiTypeFilters(){this.filters.clearPoiTypeFilters()}clearAllChildFilters(){this.filters.clearAllChildFilters()}setActiveParentId(t){this.state.setActiveParentId(t)}showShortcuts(t){this.state.showShortcuts(t)}clearChildren(){this.state.clearChildren()}setSubButtonId(t){this.state.setSubButton(t)}setPoiFilterId(t){this.state.setPoiFilter(t)}getPoiTypeTotalCount(t){return this.poiTypeCounts.get(t)||0}isChildActive(t){return this.state.isChildActive(t)}getActiveParent(){return this.filters.getActiveParent()}}i([s],e.prototype,"invalidatePoiTypeCounts",null),i([o],e.prototype,"isVisible",null),i([o],e.prototype,"shouldShow",null),i([o],e.prototype,"activePoiFilterId",null),i([o],e.prototype,"activeSubButtonsParentId",null),i([o],e.prototype,"activeSubButtonId",null),i([o],e.prototype,"subButtonsEnabled",null),i([o],e.prototype,"searchShortcutState",null),i([o],e.prototype,"searchButtons",null),i([o],e.prototype,"hasAnySearchButtons",null),i([o],e.prototype,"hasActiveSearchButton",null),i([o],e.prototype,"activeSearchButtonLabel",null),i([o],e.prototype,"activeSubButtons",null),i([o],e.prototype,"shouldShowSubButtons",null),i([o],e.prototype,"hasActiveParentWithChildren",null),i([o],e.prototype,"areAllSelected",null),i([o],e.prototype,"activeChildrenCount",null),i([o],e.prototype,"totalChildrenCount",null),i([o],e.prototype,"poiTypeCounts",null),i([o],e.prototype,"totalPoiTypeCount",null),i([o],e.prototype,"activePoiTypeId",null),i([s],e.prototype,"handleSearchButtonClick",null),i([s],e.prototype,"handleExtendedSearchButtonClick",null),i([s],e.prototype,"handleMainButtonClick",null),i([s],e.prototype,"handleSessionsClick",null),i([s],e.prototype,"togglePoiType",null),i([s],e.prototype,"clearAllFilters",null),i([s],e.prototype,"showSubButtons",null),i([s],e.prototype,"hideSubButtons",null),i([s],e.prototype,"handleSubButtonClick",null),i([s],e.prototype,"toggleChildFilter",null),i([s],e.prototype,"clearPoiTypeFilters",null),i([s],e.prototype,"clearAllChildFilters",null),i([s],e.prototype,"setActiveParentId",null),i([s],e.prototype,"showShortcuts",null),i([s],e.prototype,"clearChildren",null),i([s],e.prototype,"setSubButtonId",null),i([s],e.prototype,"setPoiFilterId",null);
@@ -0,0 +1,13 @@
1
+ /**
2
+ * A value derived from the live event, built on first read and again on the
3
+ * first read after a new config is installed. Use it for state that has to be
4
+ * a single mutable object for the lifetime of one plan (the kind a plain
5
+ * function returning a fresh object each call cannot serve).
6
+ *
7
+ * @param build Produces the value for the event that is live when it runs.
8
+ * @returns A getter for the live event's value.
9
+ */
10
+ export declare function eventScopedValue<T>(build: () => T): () => T;
11
+ /** A `Map` that starts empty for every plan. */
12
+ export declare function eventScopedCache<K, V>(): () => Map<K, V>;
13
+ //# sourceMappingURL=event-scoped-cache.d.ts.map
@@ -0,0 +1 @@
1
+ import{peekConfig as u}from"@expofp/config";export function eventScopedValue(r){let e,t=!1,n;return()=>{const o=u();return(!t||e!==o)&&(n=r(),e=o,t=!0),n}}export function eventScopedCache(){return eventScopedValue(()=>new Map)}
@@ -1,4 +1,11 @@
1
1
  import { type Consent } from '@expofp/config';
2
+ declare global {
3
+ interface Window {
4
+ dataLayer?: unknown[];
5
+ gtag?: typeof gtag;
6
+ [gaDisable: `ga-disable-${string}`]: boolean | undefined;
7
+ }
8
+ }
2
9
  export default function gtag(...args: any[]): void;
3
10
  export declare enum GaEventActions {
4
11
  Load = "Load floor plan",
@@ -48,5 +55,12 @@ export declare function trackWsExhibitorClick(payload: {
48
55
  name: string;
49
56
  externalId: string;
50
57
  }): void;
51
- export declare function destroyGtag(): void;
58
+ /**
59
+ * Wires GA up for the plan being loaded: the event's own GA property and the
60
+ * `fp_key` every event is tagged with are the live event's, so this runs once
61
+ * per plan rather than once per page — module scope would leave the second
62
+ * event reporting into the first one's property (ADR-0011). The event's tag
63
+ * comes off again with the plan.
64
+ */
65
+ export declare function initGtag(): void;
52
66
  //# sourceMappingURL=gtag.d.ts.map
@@ -1 +1 @@
1
- import r from"../data";import l from"../tools/settings";import s from"../tools/track-event";import u from"../utils/is-debug";const d="G-78CKLYWFJK";window.dataLayer=window.dataLayer||[];export default function o(...e){window.dataLayer.push(arguments)}export var GaEventActions;(function(e){e.Load="Load floor plan",e.ViewBooth="View booth",e.ViewExhibitor="View exhibitor",e.ViewCategory="View category",e.Search="Search",e.ClickCustomButton="Click custom button",e.ViewVideo="View video",e.ViewGallery="View gallery",e.ClickPhone="Click phone",e.ClickEmail="Click email",e.ClickWebsite="Click website",e.ClickFacebook="Click Facebook",e.ClickInstagaram="Click Instagram",e.ClickLinkedin="Click Linkedin",e.ClickTwitter="Click Twitter",e.ClickGooglePlus="Click Google Plus",e.ClickXing="Click Xing",e.ClickYoutube="Click Youtube",e.ClickBookmark="Click bookmark",e.ClickDirections="Click Directions",e.Rendered="Floor plan rendered",e.WsExhibitorClick="ws_exhibitor_click"})(GaEventActions||(GaEventActions={}));export async function checkUserIsGDPR(){try{const e=fetch("https://consent.expofp.com/api/verify-ip/is-in-gdpr"),t=new Promise(a=>{setTimeout(()=>{a(null)},5e3)}),i=await Promise.race([e,t]);return i instanceof Response&&i.ok?(await i.json()).result:null}catch(e){return console.error(e),null}}export function hasUserConsent(e){if(e==="granted"||e==="denied")return e;const t=document.cookie.split("; ").find(i=>i.startsWith("cookie_consent="));if(t)return t==="cookie_consent=true"?"granted":"denied"}export function setCookieConsent(e){const i=u?"localhost":".expofp.com";document.cookie=`cookie_consent=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${i}`,document.cookie="cookie_consent=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/",document.cookie=e?`cookie_consent=${e}; max-age=2592000; domain=${i}; path=/`:`cookie_consent=${e}; max-age=2592000; path=/`}function m(){const e=document.cookie.split(";"),t=u?"localhost":".expofp.com";for(let i=0;i<e.length;i++){const a=e[i],k=a.indexOf("="),g=k>-1?a.substr(0,k).trim():a.trim();g.startsWith("_ga")&&(document.cookie=`${g}=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${t}`)}}export function setConsentSettings(e){let t=hasUserConsent(e);t&&(t==="denied"?(m(),r.gtag&&(window[`ga-disable-${r.gtag}`]=!0),window[`ga-disable-${d}`]=!0):(r.gtag&&(window[`ga-disable-${r.gtag}`]=!1),window[`ga-disable-${d}`]=!1),o("consent","update",{analytics_storage:t,ad_personalization:t}))}export function sendEventToGa(e,t,i){switch(e){case GaEventActions.ViewBooth:{o("event","select_content",{content_type:e,content_id:t}),s("booview",t);break}case GaEventActions.ViewCategory:{o("event","select_content",{content_type:e,content_id:t}),s("catview",t);break}case GaEventActions.ViewExhibitor:case GaEventActions.ViewGallery:case GaEventActions.ViewVideo:o("event","select_content",{content_type:e,content_id:t});break;case GaEventActions.Search:o("event","search",{search_term:t}),s("search",t);break;case GaEventActions.ClickCustomButton:case GaEventActions.ClickPhone:case GaEventActions.ClickEmail:case GaEventActions.ClickWebsite:case GaEventActions.ClickFacebook:case GaEventActions.ClickInstagaram:case GaEventActions.ClickLinkedin:case GaEventActions.ClickTwitter:case GaEventActions.ClickGooglePlus:case GaEventActions.ClickXing:case GaEventActions.ClickYoutube:o("event","share",{content_type:e,content_id:t}),s("share",t);break;case GaEventActions.ClickBookmark:o("event","share",{content_type:GaEventActions.ClickCustomButton,content_id:t});break;case GaEventActions.ClickDirections:o("event","route",{content_type:e,content_id:t}),s("route",t);break;default:o("event",e,{content_type:i,content_id:t})}}export function sendPayloadToGa(e,t){o("event",e,{...t,fp_key:l.EXPO})}export function trackWsExhibitorClick(e){sendPayloadToGa(GaEventActions.WsExhibitorClick,{exhibitor_id:e.id,exhibitor_name:e.name,exhibitor_external_id:e.externalId,creative_slot:"ws_slider"}),s("ws_exhibitor_click",e.id)}let n,c;if(!n){n=document.createElement("script"),n.type="text/javascript",n.async=!0,n.src=`https://www.googletagmanager.com/gtag/js?id=${d}`;const e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(n,e),o("js",new Date)}if(r.gtag&&!c){c=document.createElement("script"),c.type="text/javascript",c.async=!0,c.src=`https://www.googletagmanager.com/gtag/js?id=${r.gtag}`;const e=document.getElementsByTagName("script")[0];e.parentNode.insertBefore(c,e),o("config",r.gtag,{fp_key:l.EXPO})}o("config",d,{fp_key:l.EXPO}),window.gtag=o,o("consent","default",{ad_storage:"denied",analytics_storage:"denied",region:["BE","BG","CZ","DK","DE","EE","IE","EL","ES","FR","HR","IT","CY","LV","LT","LU","HU","MT","NL","AT","PL","PT","RO","SI","SK","FI","SE","UK","IS","NO","LI","CH","MK","AL","RS","TR"],functionality_storage:"denied",personalization_storage:"denied",security_storage:"denied",ad_personalization:"denied"});export function destroyGtag(){n&&n.parentNode&&(n.parentNode.removeChild(n),n=null),c&&c.parentNode&&(c.parentNode.removeChild(c),c=null)}
1
+ import n from"../data";import{registerPlanDisposer as m}from"../plan-lifecycle.js";import a from"../tools/settings";import r from"../tools/track-event";import l from"../utils/is-debug";const s="G-78CKLYWFJK";window.dataLayer=window.dataLayer||[];export default function i(...e){(window.dataLayer??=[]).push(arguments)}export var GaEventActions;(function(e){e.Load="Load floor plan",e.ViewBooth="View booth",e.ViewExhibitor="View exhibitor",e.ViewCategory="View category",e.Search="Search",e.ClickCustomButton="Click custom button",e.ViewVideo="View video",e.ViewGallery="View gallery",e.ClickPhone="Click phone",e.ClickEmail="Click email",e.ClickWebsite="Click website",e.ClickFacebook="Click Facebook",e.ClickInstagaram="Click Instagram",e.ClickLinkedin="Click Linkedin",e.ClickTwitter="Click Twitter",e.ClickGooglePlus="Click Google Plus",e.ClickXing="Click Xing",e.ClickYoutube="Click Youtube",e.ClickBookmark="Click bookmark",e.ClickDirections="Click Directions",e.Rendered="Floor plan rendered",e.WsExhibitorClick="ws_exhibitor_click"})(GaEventActions||(GaEventActions={}));export async function checkUserIsGDPR(){try{const e=fetch("https://consent.expofp.com/api/verify-ip/is-in-gdpr"),t=new Promise(c=>{setTimeout(()=>{c(null)},5e3)}),o=await Promise.race([e,t]);return o instanceof Response&&o.ok?(await o.json()).result:null}catch(e){return console.error(e),null}}export function hasUserConsent(e){if(e==="granted"||e==="denied")return e;const t=document.cookie.split("; ").find(o=>o.startsWith("cookie_consent="));if(t)return t==="cookie_consent=true"?"granted":"denied"}export function setCookieConsent(e){const o=l?"localhost":".expofp.com";document.cookie=`cookie_consent=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${o}`,document.cookie="cookie_consent=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/",document.cookie=e?`cookie_consent=${e}; max-age=2592000; domain=${o}; path=/`:`cookie_consent=${e}; max-age=2592000; path=/`}function p(){const e=document.cookie.split(";"),t=l?"localhost":".expofp.com";for(let o=0;o<e.length;o++){const c=e[o],d=c.indexOf("="),k=d>-1?c.substr(0,d).trim():c.trim();k.startsWith("_ga")&&(document.cookie=`${k}=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${t}`)}}export function setConsentSettings(e){let t=hasUserConsent(e);t&&(t==="denied"?(p(),n.gtag&&(window[`ga-disable-${n.gtag}`]=!0),window[`ga-disable-${s}`]=!0):(n.gtag&&(window[`ga-disable-${n.gtag}`]=!1),window[`ga-disable-${s}`]=!1),i("consent","update",{analytics_storage:t,ad_personalization:t}))}export function sendEventToGa(e,t,o){switch(e){case GaEventActions.ViewBooth:{i("event","select_content",{content_type:e,content_id:t}),r("booview",t);break}case GaEventActions.ViewCategory:{i("event","select_content",{content_type:e,content_id:t}),r("catview",t);break}case GaEventActions.ViewExhibitor:case GaEventActions.ViewGallery:case GaEventActions.ViewVideo:i("event","select_content",{content_type:e,content_id:t});break;case GaEventActions.Search:i("event","search",{search_term:t}),r("search",t);break;case GaEventActions.ClickCustomButton:case GaEventActions.ClickPhone:case GaEventActions.ClickEmail:case GaEventActions.ClickWebsite:case GaEventActions.ClickFacebook:case GaEventActions.ClickInstagaram:case GaEventActions.ClickLinkedin:case GaEventActions.ClickTwitter:case GaEventActions.ClickGooglePlus:case GaEventActions.ClickXing:case GaEventActions.ClickYoutube:i("event","share",{content_type:e,content_id:t}),r("share",t);break;case GaEventActions.ClickBookmark:i("event","share",{content_type:GaEventActions.ClickCustomButton,content_id:t});break;case GaEventActions.ClickDirections:i("event","route",{content_type:e,content_id:t}),r("route",t);break;default:i("event",e,{content_type:o,content_id:t})}}export function sendPayloadToGa(e,t){i("event",e,{...t,fp_key:a.EXPO})}export function trackWsExhibitorClick(e){sendPayloadToGa(GaEventActions.WsExhibitorClick,{exhibitor_id:e.id,exhibitor_name:e.name,exhibitor_external_id:e.externalId,creative_slot:"ws_slider"}),r("ws_exhibitor_click",e.id)}window.gtag=i;function u(e){const t=document.createElement("script");t.type="text/javascript",t.async=!0,t.src=`https://www.googletagmanager.com/gtag/js?id=${e}`;const o=document.getElementsByTagName("script")[0];return o?.parentNode?o.parentNode.insertBefore(t,o):document.head.appendChild(t),t}let g;export function initGtag(){if(g||(g=u(s),i("js",new Date)),n.gtag){const e=u(n.gtag);i("config",n.gtag,{fp_key:a.EXPO}),m(()=>e.remove())}i("config",s,{fp_key:a.EXPO})}i("consent","default",{ad_storage:"denied",analytics_storage:"denied",region:["BE","BG","CZ","DK","DE","EE","IE","EL","ES","FR","HR","IT","CY","LV","LT","LU","HU","MT","NL","AT","PL","PT","RO","SI","SK","FI","SE","UK","IS","NO","LI","CH","MK","AL","RS","TR"],functionality_storage:"denied",personalization_storage:"denied",security_storage:"denied",ad_personalization:"denied"});
@@ -1 +1 @@
1
- export function resetGlobalVariables(){n("floorplan"),n("__searchi"),n("__mobxGlobals"),n("__store"),n("__mobxInstanceCount");for(let e in window)e!=="__efpStyleElements"&&(e.includes("__fp")||e.includes("__efp"))&&n(e)}function n(e){t(e)?delete window[e]:window[e]=void 0}function t(e){let o=Object.getOwnPropertyDescriptor(window,e);return o&&o.configurable}
1
+ export function resetGlobalVariables(){n("floorplan"),n("__searchi"),n("__mobxGlobals"),n("__store"),n("__mobxInstanceCount"),n("__resett"),n("__expofpReady");for(let e in window)e!=="__efpStyleElements"&&(e.includes("__fp")||e.includes("__efp"))&&n(e)}function n(e){o(e)?delete window[e]:window[e]=void 0}function o(e){let t=Object.getOwnPropertyDescriptor(window,e);return t&&t.configurable}