@expofp/floorplan 3.13.1 → 3.13.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/dist/browser/{Button-CKiBkbgb.js → Button-BDBNu2fN.js} +6 -6
  2. package/dist/browser/{CookieConsent-CSTxsO7b.js → CookieConsent-BU5tkx67.js} +8 -8
  3. package/dist/browser/{Debug-VJg8Kv3w.js → Debug-DOvyBeZ2.js} +8 -8
  4. package/dist/browser/{Demo-DK7aO8n7.js → Demo-13Pj5i8q.js} +10 -10
  5. package/dist/browser/{Free-Dc9anWmM.js → Free-DY2ixs1X.js} +10 -10
  6. package/dist/browser/{Gallery-Dnm4hSmm.js → Gallery-DSFy8OUt.js} +31 -25
  7. package/dist/browser/{GpsLoader-DQmIKYxp.js → GpsLoader-IUuZFKZB.js} +22 -22
  8. package/dist/browser/{KioskStore-Do9vKaRP.js → KioskStore-DCMfDTY0.js} +6 -6
  9. package/dist/browser/{MaplibreAdapter-bY-ABtGS.js → MaplibreAdapter-BuHDh2tN.js} +161 -133
  10. package/dist/browser/{ModalContainer-DnYcW0A9.js → ModalContainer-B66h-izv.js} +11 -11
  11. package/dist/browser/{PermissionNotice-BfOksslN.js → PermissionNotice-GLC80RiL.js} +7 -7
  12. package/dist/browser/{SetKioskMode-vTpieU9t.js → SetKioskMode-BbtKKH4m.js} +10 -10
  13. package/dist/browser/{ShowKiosk-CdNxtqFI.js → ShowKiosk-Bbc1ibvf.js} +12 -12
  14. package/dist/browser/{TouchHand-B9X_pexY.js → TouchHand-BnpCI_QP.js} +5 -5
  15. package/dist/browser/{ViewerMenuPanel-Cwhfqk7r.js → ViewerMenuPanel-u4eof_k3.js} +10 -10
  16. package/dist/browser/{add-debug-secret-listener-mWeM9pHG.js → add-debug-secret-listener-Dhk_JVpV.js} +1 -1
  17. package/dist/browser/{reset-all-settings-C4_ors4k.js → adopt-global-settings-D-DXuik1.js} +12 -17
  18. package/dist/browser/{boolean-editor-CGPZFexF.js → boolean-editor-Cr3udvWI.js} +46 -46
  19. package/dist/browser/{bootIntercom-CaST_jNX.js → bootIntercom-k9-F0coK.js} +3 -3
  20. package/dist/browser/{booth-by-xy-BO6naDgy.js → booth-by-xy-CfcPXRuo.js} +209 -209
  21. package/dist/browser/bundle.json +67 -70
  22. package/dist/browser/{classnames-ClEJC3j4.js → classnames-t9FqzaWX.js} +2 -2
  23. package/dist/browser/{client-DXdbQp9r.js → client-B_pxskYW.js} +9 -9
  24. package/dist/browser/{components-Bowa21U1.js → components-CUmWC2-D.js} +278 -271
  25. package/dist/browser/{debug-overlay-Y5npuuWR.js → debug-overlay-DDhRZgt_.js} +470 -464
  26. package/dist/browser/{debug-ui-D1g5i_jy.js → debug-ui-DxdcU6Kg.js} +7 -7
  27. package/dist/browser/{dist-BSvcUdys.js → dist-B8mNNnp7.js} +5 -5
  28. package/dist/browser/{dist-Cn9LPy1P.js → dist-CxhCCJRf.js} +7 -7
  29. package/dist/browser/{dist-aJ-8azal.js → dist-Pmi0eHka.js} +66 -67
  30. package/dist/browser/{efp-debug-init-Brk9OaSQ.js → efp-debug-init-Calw8mY0.js} +4 -4
  31. package/dist/browser/{enum-editor-BZ9LwkZ8.js → enum-editor-DCfrJJln.js} +5 -5
  32. package/dist/browser/{es5-XJHAF1nV.js → es5-DoQZDAdU.js} +2 -2
  33. package/dist/browser/{event-not-found-_rTvDWyj.js → event-not-found-ChDTsYTx.js} +1 -1
  34. package/dist/browser/{exports-DWUH8uau.js → exports-BX3S6XZB.js} +567 -566
  35. package/dist/browser/{favicon-5J-1eJZd.js → favicon-ClLPDK1r.js} +1 -1
  36. package/dist/browser/{fetch-retry.umd-Br7VuO9v.js → fetch-retry.umd-DzzXpi7b.js} +2 -2
  37. package/dist/browser/{flex-B3O1z4v3.js → flex-DP6WjhG4.js} +17 -17
  38. package/dist/browser/{floorplan.loader-sk15sA3u.js → floorplan.loader-D69t3BAF.js} +1381 -1307
  39. package/dist/browser/{floorplan.ready-B4ahF1S7.js → floorplan.ready-CHXz-cFn.js} +326 -335
  40. package/dist/browser/{fuse-Ci_KKUTa.js → fuse-BVXtZz6P.js} +2 -2
  41. package/dist/browser/{i18n-99DQd2vS.js → i18n-C8efqjSJ.js} +2921 -2559
  42. package/dist/browser/index.js +37 -37
  43. package/dist/browser/{index.module-DAnhLbye.js → index.module-C2y2P6lx.js} +6 -6
  44. package/dist/browser/{integrateKiosk-DZXpUrOj.js → integrateKiosk-B6woh9vx.js} +4 -4
  45. package/dist/browser/{is-webview-DpONzc0i.js → is-webview-BBrFDwGV.js} +1 -1
  46. package/dist/browser/{jsx-runtime-CaS3omHd.js → jsx-runtime-BJiMhWCh.js} +4 -4
  47. package/dist/browser/{lib-BiZuekek.js → lib-Bp05Ar7H.js} +155 -112
  48. package/dist/browser/{loadImage-CjXrDhKo.js → loadImage-BSxtVhbw.js} +5 -5
  49. package/dist/browser/{logDeviceInfo-BYL9Ek4m.js → logDeviceInfo-CKYIqDka.js} +9 -9
  50. package/dist/browser/{main-C5obpH9n.js → main-R4AfkxbT.js} +1 -1
  51. package/dist/browser/{mobx-DUuRiBpm.js → mobx-DGLsaukl.js} +5 -5
  52. package/dist/browser/{optional-boolean-editor-vmPQV7dq.js → optional-boolean-editor-BU6xH2-y.js} +4 -4
  53. package/dist/browser/{optional-enum-editor-CAafO0D2.js → optional-enum-editor-DguPalWk.js} +5 -5
  54. package/dist/browser/{optional-string-editor-CnDprvv4.js → optional-string-editor-C9Ca_jfw.js} +5 -5
  55. package/dist/browser/{particles.min-Bw-lHwaG.js → particles.min-Cnu30bUy.js} +2 -2
  56. package/dist/browser/{react-DIEnjHSI.js → react-B3i5PHk_.js} +5 -5
  57. package/dist/browser/{react-dom-CK-QaYaJ.js → react-dom-DU4GDIrZ.js} +6 -6
  58. package/dist/browser/{rolldown-runtime-Dfh5_zpq.js → rolldown-runtime-G74B3CmN.js} +1 -1
  59. package/dist/browser/select-D0rZ3mga.js +1367 -0
  60. package/dist/browser/{settings-CkTeZAPn.js → settings-D13emDUN.js} +3 -3
  61. package/dist/browser/{settings-item-Bdmu0-LD.js → settings-item-DwnQYGKx.js} +16 -16
  62. package/dist/browser/{store-C8eFtLML.js → store-Dfx4YNDt.js} +4458 -4458
  63. package/dist/browser/{string-editor-CM26hetz.js → string-editor-BM5ehAvW.js} +5 -5
  64. package/dist/browser/{text-field-CdM7a_e4.js → text-field-BxSBiSG0.js} +25 -25
  65. package/dist/browser/{theme-Byin1YOk.js → theme-Dg-nn5Fm.js} +949 -946
  66. package/dist/browser/{ui-Bso8uSzX.js → ui-D9Ao87UU.js} +11 -11
  67. package/dist/browser/{useRenderTarget-C16k6iot.js → useRenderTarget-bA5k2RxM.js} +5 -5
  68. package/dist/esm/components/AutocompleteContainer.d.ts +1 -1
  69. package/dist/esm/components/Bookmarks.d.ts +1 -1
  70. package/dist/esm/components/Bookmarks.js +1 -1
  71. package/dist/esm/components/Booth/Booth.js +1 -1
  72. package/dist/esm/components/Category.d.ts +1 -1
  73. package/dist/esm/components/Debug.d.ts +1 -1
  74. package/dist/esm/components/Debug.js +1 -1
  75. package/dist/esm/components/ErrorBoundary.d.ts +1 -1
  76. package/dist/esm/components/ErrorBoundary.js +1 -1
  77. package/dist/esm/components/Event.js +1 -1
  78. package/dist/esm/components/Exhibitor.d.ts +1 -1
  79. package/dist/esm/components/Exhibitor.js +1 -1
  80. package/dist/esm/components/Filter.d.ts +1 -1
  81. package/dist/esm/components/Filter.js +1 -1
  82. package/dist/esm/components/Gallery/GalleryBadges/GalleryBadges.js +1 -1
  83. package/dist/esm/components/Gallery/GalleryPreLoader.js +1 -1
  84. package/dist/esm/components/Kiosk/KioskStore.js +1 -1
  85. package/dist/esm/components/Kiosk/SetKiosk/SetKioskComponent.js +1 -1
  86. package/dist/esm/components/LogoOverlay.js +1 -1
  87. package/dist/esm/components/Map/Map.js +1 -1
  88. package/dist/esm/components/Map/drawing/config/BoothDrawerBase.js +1 -1
  89. package/dist/esm/components/Map/drawing/config/BoothShape.js +1 -1
  90. package/dist/esm/components/Map/drawing/config/TextFitter.js +1 -1
  91. package/dist/esm/components/Map/drawing/config/config-bg.d.ts +1 -1
  92. package/dist/esm/components/Map/drawing/config/config-booth-bg.js +1 -1
  93. package/dist/esm/components/Map/drawing/config/config-booth-bookmark.js +1 -1
  94. package/dist/esm/components/Map/drawing/config/config-booth-border.js +1 -1
  95. package/dist/esm/components/Map/drawing/config/config-booth-labels-special.js +2 -2
  96. package/dist/esm/components/Map/drawing/config/config-booth-labels.js +1 -1
  97. package/dist/esm/components/Map/drawing/config/config-load-layer.js +1 -1
  98. package/dist/esm/components/Map/drawing/config/loadBoothsImages.js +1 -1
  99. package/dist/esm/components/Map/traffic/UpdateQueue.js +1 -1
  100. package/dist/esm/components/Map/traffic/useBuildRoute.js +1 -1
  101. package/dist/esm/components/Menu.d.ts +1 -1
  102. package/dist/esm/components/Menu.js +1 -1
  103. package/dist/esm/components/ModalContainer.d.ts +4 -4
  104. package/dist/esm/components/RebookingNotesContainer.d.ts +1 -1
  105. package/dist/esm/components/RebookingRadioGroupContainer.d.ts +1 -1
  106. package/dist/esm/components/RoutePlanner/RoutePlannerStopItem.js +1 -1
  107. package/dist/esm/components/Schedule.js +1 -1
  108. package/dist/esm/components/Search.d.ts +1 -1
  109. package/dist/esm/components/Search.js +1 -1
  110. package/dist/esm/components/Toast/ToastContainer.d.ts +1 -1
  111. package/dist/esm/components/TourPoints.d.ts +1 -1
  112. package/dist/esm/components/Tours.js +1 -1
  113. package/dist/esm/components/Visited.d.ts +1 -1
  114. package/dist/esm/components/WayfindingTemplate.js +1 -1
  115. package/dist/esm/components/Ws.d.ts +1 -1
  116. package/dist/esm/constants.d.ts +0 -1
  117. package/dist/esm/constants.js +1 -1
  118. package/dist/esm/data/svg.js +1 -1
  119. package/dist/esm/floorplan.loader.js +1 -1
  120. package/dist/esm/floorplan.ready.js +1 -1
  121. package/dist/esm/load-dev.d.ts +1 -1
  122. package/dist/esm/renderer/HandlerRegistry.js +1 -1
  123. package/dist/esm/renderer/RendererService.js +1 -1
  124. package/dist/esm/services/URLFilterManager.js +1 -1
  125. package/dist/esm/services/url-dispatch.js +1 -1
  126. package/dist/esm/store/BaseFilterStore.js +1 -1
  127. package/dist/esm/store/BookmarksStore.js +2 -2
  128. package/dist/esm/store/BoothStore.d.ts +1 -1
  129. package/dist/esm/store/BoothStore.js +1 -1
  130. package/dist/esm/store/CategoryFilterStore.js +1 -1
  131. package/dist/esm/store/CategoryStore.d.ts +1 -1
  132. package/dist/esm/store/CategoryStore.js +1 -1
  133. package/dist/esm/store/EventStore.d.ts +2 -2
  134. package/dist/esm/store/EventStore.js +1 -1
  135. package/dist/esm/store/ExhibitorStore.d.ts +1 -1
  136. package/dist/esm/store/ExhibitorStore.js +1 -1
  137. package/dist/esm/store/FuzzySearchEngineStore.js +1 -1
  138. package/dist/esm/store/HeatmapStore.d.ts +1 -1
  139. package/dist/esm/store/HeatmapStore.js +1 -1
  140. package/dist/esm/store/IntercomStore.js +1 -1
  141. package/dist/esm/store/LayerStore.js +1 -1
  142. package/dist/esm/store/MaplibreStore.js +1 -1
  143. package/dist/esm/store/PoiTypeStore.js +1 -1
  144. package/dist/esm/store/RootStore.js +1 -1
  145. package/dist/esm/store/RoutePlannerStore.js +1 -1
  146. package/dist/esm/store/RouteStore.js +1 -1
  147. package/dist/esm/store/SearchStore.d.ts +1 -1
  148. package/dist/esm/store/SearchStore.js +1 -1
  149. package/dist/esm/store/SessionsFilterStore.js +1 -1
  150. package/dist/esm/store/ShortcutRegistry.js +1 -1
  151. package/dist/esm/store/SpeakerFilterStore.js +1 -1
  152. package/dist/esm/store/SpeakerStore.d.ts +2 -2
  153. package/dist/esm/store/SpeakerStore.js +1 -1
  154. package/dist/esm/store/SubButtonRegistry.js +1 -1
  155. package/dist/esm/store/ToursStore.js +1 -1
  156. package/dist/esm/store/UIState.d.ts +2 -3
  157. package/dist/esm/store/UIState.js +1 -1
  158. package/dist/esm/store/init/init-booths.js +1 -1
  159. package/dist/esm/store/init/init-layers.js +1 -1
  160. package/dist/esm/store/providers/SearchShortcutProvider.js +1 -1
  161. package/dist/esm/store/providers/SessionsShortcutProvider.js +1 -1
  162. package/dist/esm/store/providers/SessionsSubButtonProvider.js +1 -1
  163. package/dist/esm/store/providers/SpeakerShortcutProvider.js +1 -1
  164. package/dist/esm/store/search-buttons/SearchButtonsActions.js +1 -1
  165. package/dist/esm/store/search-buttons/SearchButtonsFactory.js +1 -1
  166. package/dist/esm/store/search-buttons/SearchButtonsFilters.js +1 -1
  167. package/dist/esm/store/search-buttons/SearchButtonsState.js +1 -1
  168. package/dist/esm/store/search-buttons/SearchButtonsStore.js +1 -1
  169. package/dist/esm/store/search-buttons/constants.d.ts +8 -8
  170. package/dist/esm/store/types.d.ts +6 -6
  171. package/dist/esm/tools/expofpUrl.d.ts +2 -2
  172. package/dist/esm/tools/logger.js +1 -1
  173. package/dist/esm/tools/settings.js +1 -1
  174. package/dist/esm/ui/Autocomplete/Autocomplete.js +1 -1
  175. package/dist/esm/ui/EntityItem/EntityItem.js +1 -1
  176. package/dist/esm/ui/EventBadge/EventBadge.js +1 -1
  177. package/dist/esm/ui/Share/Share.js +1 -1
  178. package/dist/esm/utils/camera-map-settings.d.ts +2 -2
  179. package/dist/esm/utils/dimming.d.ts +1 -1
  180. package/dist/esm/utils/is-from-designer.d.ts +1 -1
  181. package/dist/esm/utils/silence-mobx-react-lite-warning.d.ts +1 -0
  182. package/dist/esm/utils/silence-mobx-react-lite-warning.js +1 -1
  183. package/package.json +23 -23
  184. package/dist/browser/prop-types-Bw2U3Pyj.js +0 -57
  185. package/dist/browser/select-CGbkxHY8.js +0 -1360
@@ -1 +1 @@
1
- import{__esDecorate as a,__runInitializers as r}from"tslib";import{action as m,computed as E,observable as f}from"mobx";import{Box as S,Point as Ye,boxContainsPoint as He,pointDistance as Fe}from"@expofp/geometry";import c,{layersStore as L}from".";import{fpGeo as P}from"../data/fpGeo";import{getName as Je}from"../components/Kiosk/SetKiosk";import{DEFAULT_UNITS as Ne,ORIENTATION_GRANTED_KEY as Qe}from"../constants";import Be from"../data";import{getLayerSvg as et,svgArea as g}from"../data/svg";import{GaEventActions as tt,sendEventToGa as st}from"../tools/gtag";import Ue from"../tools/logger";import{areLayersEnabled as it}from"../utils/areLayersEnabled";import{calcSpeed as Ze}from"../utils/calcSpeed";import{calcTravelTime as qe}from"../utils/calcTravelTime";import{calculateRelativeBearing as at,convertGpsToLocal as $e,isValidPointCoords as Ve}from"../utils/gps";import{boothToEndpoint as Ke,buildRoute as rt,CURRENT_LOCATION_NAME as nt,CURRENT_POSITION_POINT_ID as ot,isWayfindingReady as lt,KIOSK_ANCHOR_POINT_ID as ct,toArbitraryPoint as je}from"../wayfinding";import{BoothBase as R}from"./BoothStore";import{uiState as _}from"./index";import{LayersMode as ut}from"./LayerStore";const b=s=>typeof s=="string"?Number(s.replace(",",".")):s;let dt=(()=>{let s=[],n,l=[],h=[],y,v=[],k=[],z,D=[],I=[],A,w=[],M=[],C,G=[],O=[],F,N=[],B=[],U,Z=[],q=[],$,V=[],K=[],j,W=[],X=[],Y,H=[],J=[],Q,ee=[],te=[],se,ie=[],ae=[],re,ne=[],oe=[],le,ce=[],ue=[],de,fe,me,he,pe,_e,ye,ke,ge,be,Re,ve,xe,Ee=[],Te=[],Le,Se,Pe,ze,De,Ie,Ae=[],we=[],Me,Ce,Ge;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;n=[f],y=[f],z=[f],A=[f],C=[f],F=[f],U=[f],$=[f],j=[f],Y=[f],Q=[f],se=[f],re=[f],le=[f],de=[E],fe=[m],me=[m],he=[m],pe=[E({keepAlive:!0})],_e=[m],ye=[m],ke=[E({keepAlive:!0})],ge=[E({keepAlive:!0})],be=[m],Re=[m],ve=[m],xe=[f],Le=[E],Se=[m],Pe=[m],ze=[m],De=[m],Ie=[f],Me=[m],Ce=[E({keepAlive:!0})],Ge=[m],a(this,null,de,{kind:"getter",name:"canFindLocation",static:!1,private:!1,access:{has:e=>"canFindLocation"in e,get:e=>e.canFindLocation},metadata:t},null,s),a(this,null,fe,{kind:"method",name:"selectRoute",static:!1,private:!1,access:{has:e=>"selectRoute"in e,get:e=>e.selectRoute},metadata:t},null,s),a(this,null,me,{kind:"method",name:"rebuildRouteFromPosition",static:!1,private:!1,access:{has:e=>"rebuildRouteFromPosition"in e,get:e=>e.rebuildRouteFromPosition},metadata:t},null,s),a(this,null,he,{kind:"method",name:"setStartPoint",static:!1,private:!1,access:{has:e=>"setStartPoint"in e,get:e=>e.setStartPoint},metadata:t},null,s),a(this,null,pe,{kind:"getter",name:"pathLayers",static:!1,private:!1,access:{has:e=>"pathLayers"in e,get:e=>e.pathLayers},metadata:t},null,s),a(this,null,_e,{kind:"method",name:"setMarkers",static:!1,private:!1,access:{has:e=>"setMarkers"in e,get:e=>e.setMarkers},metadata:t},null,s),a(this,null,ye,{kind:"method",name:"selectMarker",static:!1,private:!1,access:{has:e=>"selectMarker"in e,get:e=>e.selectMarker},metadata:t},null,s),a(this,null,ke,{kind:"getter",name:"selectedMarkers",static:!1,private:!1,access:{has:e=>"selectedMarkers"in e,get:e=>e.selectedMarkers},metadata:t},null,s),a(this,null,ge,{kind:"getter",name:"layers",static:!1,private:!1,access:{has:e=>"layers"in e,get:e=>e.layers},metadata:t},null,s),a(this,null,be,{kind:"method",name:"clickRoute",static:!1,private:!1,access:{has:e=>"clickRoute"in e,get:e=>e.clickRoute},metadata:t},null,s),a(this,null,Re,{kind:"method",name:"selectCurrentPosition",static:!1,private:!1,access:{has:e=>"selectCurrentPosition"in e,get:e=>e.selectCurrentPosition},metadata:t},null,s),a(this,null,ve,{kind:"method",name:"findLocation",static:!1,private:!1,access:{has:e=>"findLocation"in e,get:e=>e.findLocation},metadata:t},null,s),a(this,null,Le,{kind:"getter",name:"routeInfo",static:!1,private:!1,access:{has:e=>"routeInfo"in e,get:e=>e.routeInfo},metadata:t},null,s),a(this,null,Se,{kind:"method",name:"updateRoute",static:!1,private:!1,access:{has:e=>"updateRoute"in e,get:e=>e.updateRoute},metadata:t},null,s),a(this,null,Pe,{kind:"method",name:"updateRouteDistance",static:!1,private:!1,access:{has:e=>"updateRouteDistance"in e,get:e=>e.updateRouteDistance},metadata:t},null,s),a(this,null,ze,{kind:"method",name:"updateRoutePoints",static:!1,private:!1,access:{has:e=>"updateRoutePoints"in e,get:e=>e.updateRoutePoints},metadata:t},null,s),a(this,null,De,{kind:"method",name:"checkRoutes",static:!1,private:!1,access:{has:e=>"checkRoutes"in e,get:e=>e.checkRoutes},metadata:t},null,s),a(this,null,Me,{kind:"method",name:"setGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"setGpsTrackingEnabled"in e,get:e=>e.setGpsTrackingEnabled},metadata:t},null,s),a(this,null,Ce,{kind:"getter",name:"gpsEnabled",static:!1,private:!1,access:{has:e=>"gpsEnabled"in e,get:e=>e.gpsEnabled},metadata:t},null,s),a(this,null,Ge,{kind:"method",name:"setOnlyAccessible",static:!1,private:!1,access:{has:e=>"setOnlyAccessible"in e,get:e=>e.setOnlyAccessible},metadata:t},null,s),a(null,null,n,{kind:"field",name:"routeLines",static:!1,private:!1,access:{has:e=>"routeLines"in e,get:e=>e.routeLines,set:(e,i)=>{e.routeLines=i}},metadata:t},l,h),a(null,null,y,{kind:"field",name:"routeDistance",static:!1,private:!1,access:{has:e=>"routeDistance"in e,get:e=>e.routeDistance,set:(e,i)=>{e.routeDistance=i}},metadata:t},v,k),a(null,null,z,{kind:"field",name:"currentPosition",static:!1,private:!1,access:{has:e=>"currentPosition"in e,get:e=>e.currentPosition,set:(e,i)=>{e.currentPosition=i}},metadata:t},D,I),a(null,null,A,{kind:"field",name:"requestCompass",static:!1,private:!1,access:{has:e=>"requestCompass"in e,get:e=>e.requestCompass,set:(e,i)=>{e.requestCompass=i}},metadata:t},w,M),a(null,null,C,{kind:"field",name:"iconType",static:!1,private:!1,access:{has:e=>"iconType"in e,get:e=>e.iconType,set:(e,i)=>{e.iconType=i}},metadata:t},G,O),a(null,null,F,{kind:"field",name:"tempToBooth",static:!1,private:!1,access:{has:e=>"tempToBooth"in e,get:e=>e.tempToBooth,set:(e,i)=>{e.tempToBooth=i}},metadata:t},N,B),a(null,null,U,{kind:"field",name:"focusEnabled",static:!1,private:!1,access:{has:e=>"focusEnabled"in e,get:e=>e.focusEnabled,set:(e,i)=>{e.focusEnabled=i}},metadata:t},Z,q),a(null,null,$,{kind:"field",name:"prevZ",static:!1,private:!1,access:{has:e=>"prevZ"in e,get:e=>e.prevZ,set:(e,i)=>{e.prevZ=i}},metadata:t},V,K),a(null,null,j,{kind:"field",name:"markersData",static:!1,private:!1,access:{has:e=>"markersData"in e,get:e=>e.markersData,set:(e,i)=>{e.markersData=i}},metadata:t},W,X),a(null,null,Y,{kind:"field",name:"prevMarkers",static:!1,private:!1,access:{has:e=>"prevMarkers"in e,get:e=>e.prevMarkers,set:(e,i)=>{e.prevMarkers=i}},metadata:t},H,J),a(null,null,Q,{kind:"field",name:"showAccessible",static:!1,private:!1,access:{has:e=>"showAccessible"in e,get:e=>e.showAccessible,set:(e,i)=>{e.showAccessible=i}},metadata:t},ee,te),a(null,null,se,{kind:"field",name:"onlyAccessible",static:!1,private:!1,access:{has:e=>"onlyAccessible"in e,get:e=>e.onlyAccessible,set:(e,i)=>{e.onlyAccessible=i}},metadata:t},ie,ae),a(null,null,re,{kind:"field",name:"currentRouteLayer",static:!1,private:!1,access:{has:e=>"currentRouteLayer"in e,get:e=>e.currentRouteLayer,set:(e,i)=>{e.currentRouteLayer=i}},metadata:t},ne,oe),a(null,null,le,{kind:"field",name:"currentRouteExhibitor",static:!1,private:!1,access:{has:e=>"currentRouteExhibitor"in e,get:e=>e.currentRouteExhibitor,set:(e,i)=>{e.currentRouteExhibitor=i}},metadata:t},ce,ue),a(null,null,xe,{kind:"field",name:"routeUnits",static:!1,private:!1,access:{has:e=>"routeUnits"in e,get:e=>e.routeUnits,set:(e,i)=>{e.routeUnits=i}},metadata:t},Ee,Te),a(null,null,Ie,{kind:"field",name:"isGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"isGpsTrackingEnabled"in e,get:e=>e.isGpsTrackingEnabled,set:(e,i)=>{e.isGpsTrackingEnabled=i}},metadata:t},Ae,we),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=r(this,s);cpTimeout;routeLines=r(this,l,[]);routeDistance=(r(this,h),r(this,v,null));currentPosition=(r(this,k),r(this,D,null));requestCompass=(r(this,I),r(this,w,!1));iconType=(r(this,M),r(this,G,0));tempToBooth=(r(this,O),r(this,N,null));focusEnabled=(r(this,B),r(this,Z,!0));prevZ=(r(this,q),r(this,V,null));markersData=(r(this,K),r(this,W,{icons:[],markers:[]}));prevMarkers=(r(this,X),r(this,H,[]));showAccessible=(r(this,J),r(this,ee,!1));onlyAccessible=(r(this,te),r(this,ie,!1));currentRouteLayer=(r(this,ae),r(this,ne,null));currentRouteExhibitor=(r(this,oe),r(this,ce,null));constructor(t){r(this,we),this.rootStore=t,this.focusEnabled=!window.location.search}get canFindLocation(){return!!_.kioskData||!!this.currentPosition}selectRoute(t,e=!0,i=!1){if(e&&(_.list={type:"search",text:"",focused:!1}),t&&!t.from&&t.to){const d=this.resolveFallbackFrom();d&&(t=new Route(d,t.to,t.waypoints))}t?.from&&t?.to&&t.from===t.to&&(t=null);let o=[];t?.from&&t?.to&&window.setTimeout(()=>{this.rootStore.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50),t?.from instanceof R&&t.from.visible&&o.push(t.from),t?.to instanceof R&&t.to.visible&&(this.tempToBooth=null,o.push(t.to)),!t&&c.fp.onDirection&&c.fp.onDirection(null);const u=()=>{if(this.rootStore.moveToList(o),_.details=t,t&&(!t.from||!t.to)&&c.showOverlay(),t?.to&&t?.from){const d=ft(t.from);d&&this.rootStore.layerStore.updateVisibility(d,!0)}if(!this.currentRouteLayer){const d=We(this.rootStore.layerStore,t?.from),p=We(this.rootStore.layerStore,t?.to);d?this.currentRouteLayer=d:p&&(this.currentRouteLayer=p)}e&&t?.from&&t?.to&&st(tt.ClickDirections,`${t?.from?"From "+t.from.name:""} ${t?.to?"To "+t.to.name:""}`)};i?u():setTimeout(u,200)}rebuildRouteFromPosition(t){const e=_.selectedRoute;e?.to&&this.selectRoute(new Route(t,e.to,e.waypoints),!1,!0)}resolveFallbackFrom(){if(this.currentPosition)return je(this.currentPosition,nt,ot);const t=_.kioskData;return t?je({x:t.x,y:t.y,z:t.z},Je(),ct):null}setStartPoint(t){const e=_.selectedRoute;if(e?.to&&!e?.from&&t){const i=new Route(t,e.to,e.waypoints);this.selectRoute(i)}}get pathLayers(){return c.routeStore.routeLines?.map(t=>t.p0.layer)?.filter((t,e,i)=>i.indexOf(t)===e).map((t,e)=>({id:e+1,layer:c.layerStore.findLayer(t)}))}getNearestBooth(t){if(!t)return null;let e=this.rootStore.layerStore.findLayer(t.z);const i=t.lat&&t.lng?$e(t,P.properties.config):t;return this.rootStore.boothStore.booths.filter(o=>L.mode===ut.Default||!e?o.visible&&o.rect:o.rect&&(typeof t.z!="number"&&!t.z&&o.visible||e.name===o.layer?.name)).sort((o,u)=>Fe(i,o.rect.center)-Fe(i,u.rect.center))[0]||null}setMarkers(t){this.markersData.markers=(t?.markers??[]).map(mt),this.markersData.icons=t?.icons??[]}selectMarker(t,e){const i=this.markersData.markers.find(u=>u.id===t);this.markersData.markers.forEach(u=>u.active=!1),i&&(i.active=!0);let o=c.layerStore.findLayer(i?.z);if(e&&i){const u=c.rendererService.renderer;return o&&!o?.visible&&L.updateVisibility(o,!0),u?u.controls.panTo(i.x,i.y):(Ue.warn("Renderer is not initialized. Cannot pan to marker."),Promise.resolve())}return Promise.resolve()}get selectedMarkers(){return this.markersData.markers.filter(t=>t.active)}get layers(){var 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(i=>i.name===e))}clickRoute(t,e){window.__resett&&window.__resett(),this.rootStore.uiState.menu=null,_.list.type==="route-planner"&&(_.list={type:"search",text:"",focused:!1}),this.selectRoute(new Route(t,e))}selectCurrentPosition(t,e=!0,i){clearTimeout(this.cpTimeout),t&&(t.x=b(t.x),t.y=b(t.y),t.lat=b(t.lat),t.lng=b(t.lng),it()||(t.z=null));const o=e&&this.rootStore.uiState.details&&!(this.rootStore.uiState.details instanceof Route),u=e&&!o&&(this.focusEnabled||this.prevZ!=t?.z);this.focusEnabled&&(this.focusEnabled=!1),this.prevZ=t?.z?.toString(),this.iconType=i?1:0;const d=t?ht(t):null;if(!d){this.currentPosition=null;return}const p=c.layerStore.findLayer(t.z),x=new CurrentPosition(d.x,d.y,p?.name||this.currentRouteLayer?.name,at(d),t.lat,t.lng);let Oe=!this.routeLines?.length;if(p&&this.routeLines?.length&&(Oe=!!this.routeLines.find(T=>T.p0.layer===p.name||T.p1.layer===p.name)),u&&Oe){const T=c.rendererService.renderer;if(p&&!p?.visible&&L.updateVisibility(p,!0),!T){Ue.warn("Renderer is not initialized. Cannot pan to current position.");return}T.controls.panTo(x.x,x.y)}this.currentPosition=x,this.gpsEnabled||(this.cpTimeout=setTimeout(()=>{this.currentPosition&&this.selectCurrentPosition(null,!1)},30*1e3))}findLocation(){if(!this.canFindLocation)return;if(c.maplibreStore.showMaplibre){_.moveToLocation=!0;return}const t=this.currentPosition??_.kioskData;if(!t)return;this.currentPosition&&localStorage.getItem(Qe)==="false"&&(c.routeStore.requestCompass=!0);const e=S.fromCenter(t,{x:100,y:100});let i;if(e.intersects(g))i=e;else{const u=Math.max(g.min.x,Math.min(t.x,g.max.x)),d=Math.max(g.min.y,Math.min(t.y,g.max.y)),p=Math.min(g.size.width,g.size.height)*.3,x=S.fromCenter({x:u,y:d},{x:p,y:p}).intersection(g);i=x?S.fromUnion(e,x):e}_.moveToRect=i;const o=c.layerStore.findLayer(t.z);o&&L.updateVisibility(o,!0)}routeUnits=(r(this,ue),r(this,Ee,Ne));get routeInfo(){const t=this.routeDistance,e=this.routeUnits;return t?{distance:`${t}${e}`,units:e,time:qe(t,Ze(e))}:null}updateRoute(t,e){!t?.length&&!this.routeLines.length||(this.routeLines=t,this.updateRoutePoints())}updateRouteDistance(t){if(t==null)return;const e=et(),i=(e.getAttribute("units")||Ne).toLowerCase?.().trim(),o=e.getAttribute("fp-ver")?.startsWith("5")??!1;this.routeDistance=Math.round(t/(o?1:10)),this.routeUnits=i,this.updateRoutePoints()}updateRoutePoints(){const t=_.selectedRoute,e=this.routeDistance,i=this.routeUnits;c.fp.onDirection&&setTimeout(()=>{c.fp.onDirection({from:Xe(t?.from??null),to:Xe(t?.to??null),lines:this.routeLines,distance:`${e}${i}`,units:i,time:qe(e,Ze(i))})},200)}checkRoutes(){if(!lt()){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 i=t[e];for(let o=e+1;o<t.length;o++){const u=t[o];rt(Ke(i),Ke(u)).lines.length||console.warn(`No route found from ${i.name} to ${u.name}`)}}console.info("Route check done....")}isGpsTrackingEnabled=(r(this,Te),r(this,Ae,!0));setGpsTrackingEnabled(t){this.isGpsTrackingEnabled=t}get gpsEnabled(){return Be.autoTrackingGps&&this.isGpsTrackingEnabled&&!Be.enableIPS}setOnlyAccessible(t){this.onlyAccessible=t}}})();export default dt;function ft(s){if(s)return s instanceof R?s.layer?.name:s.layer}function We(s,n){return n?n instanceof R?n.layer??null:s.findLayer(n.layer):null}function mt(s){return{...s,x:b(s.x),y:b(s.y),lat:b(s.lat),lng:b(s.lng)}}function ht(s){let n=null,l=null;return P&&(n=P.properties.config),n&&He({min:n.p0,max:n.p2},s)?l={...s}:n&&Ve(s.lat)&&Ve(s.lng)?l=$e(s,n):n||(l=s),l||null}export function findBooth(s){return c.boothStore.findBooth(s)||c.exhibitorStore.findExhibitor(s)?.booths[0]}export function findEntityByExternalId(s){const n=c.boothStore.boothByExternalId.get(s);if(n)return{type:"booth",entity:n};const l=c.exhibitorStore.exhibitorByExternalId.get(s);if(l)return{type:"exhibitor",entity:l}}export function separateExternalIds(s){const n=[],l=[];for(const h of s){const y=findEntityByExternalId(h);y&&(y.type==="booth"?n.push(h):l.push(h))}return{boothExternalIds:n,exhibitorExternalIds:l}}export function extractRoute(s,n,l){return new Route(findBooth(s)??null,findBooth(n)??null,l?.map(h=>findBooth(h)))}export class Route{from;to;waypoints;constructor(n,l,h){this.from=n,this.to=l,this.waypoints=h;const y=n instanceof R?n.id:void 0,v=l instanceof R?l.id:void 0;this.waypoints=h?.filter(k=>k&&k.id!==y&&k.id!==v)}}function Xe(s){return s?s instanceof R?{id:s.id,name:s.name,externalId:s.externalId,layer:{name:s.layer?.name,description:s.layer?.description}}:{id:Number.MAX_SAFE_INTEGER,name:s.name,externalId:void 0,layer:{name:s.layer,description:void 0}}:null}export class CurrentPosition extends Ye{x;y;z;angle;lat;lng;constructor(n,l,h,y,v,k){super(n,l),this.x=n,this.y=l,this.z=h,this.angle=y,this.lat=v,this.lng=k}}
1
+ import{__decorate as n}from"tslib";import{action as f,computed as g,observable as u}from"mobx";import{Box as R,Point as _,boxContainsPoint as O,pointDistance as T}from"@expofp/geometry";import c,{layersStore as x}from".";import{fpGeo as S}from"../data/fpGeo";import{getName as F}from"../components/Kiosk/SetKiosk";import{DEFAULT_UNITS as L,ORIENTATION_GRANTED_KEY as G}from"../constants";import E from"../data";import{getLayerSvg as B,svgArea as m}from"../data/svg";import{GaEventActions as U,sendEventToGa as $}from"../tools/gtag";import P from"../tools/logger";import{areLayersEnabled as V}from"../utils/areLayersEnabled";import{calcSpeed as D}from"../utils/calcSpeed";import{calcTravelTime as w}from"../utils/calcTravelTime";import{calculateRelativeBearing as K,convertGpsToLocal as A,isValidPointCoords as I}from"../utils/gps";import{boothToEndpoint as C,buildRoute as W,CURRENT_LOCATION_NAME as Z,CURRENT_POSITION_POINT_ID as q,isWayfindingReady as j,KIOSK_ANCHOR_POINT_ID as X,toArbitraryPoint as M}from"../wayfinding";import{BoothBase as y}from"./BoothStore";import{uiState as h}from"./index";import{LayersMode as Y}from"./LayerStore";const d=o=>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.showAccessible=!1,this.onlyAccessible=!1,this.currentRouteLayer=null,this.currentRouteExhibitor=null,this.routeUnits=L,this.isGpsTrackingEnabled=!0,this.rootStore=t,this.focusEnabled=!window.location.search}get canFindLocation(){return!!h.kioskData||!!this.currentPosition}selectRoute(t,e=!0,r=!1){if(e&&(h.list={type:"search",text:"",focused:!1}),t&&!t.from&&t.to){const l=this.resolveFallbackFrom();l&&(t=new Route(l,t.to,t.waypoints))}t?.from&&t?.to&&t.from===t.to&&(t=null);let s=[];t?.from&&t?.to&&window.setTimeout(()=>{this.rootStore.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50),t?.from instanceof y&&t.from.visible&&s.push(t.from),t?.to instanceof y&&t.to.visible&&(this.tempToBooth=null,s.push(t.to)),!t&&c.fp.onDirection&&c.fp.onDirection(null);const a=()=>{if(this.rootStore.moveToList(s),h.details=t,t&&(!t.from||!t.to)&&c.showOverlay(),t?.to&&t?.from){const l=H(t.from);l&&this.rootStore.layerStore.updateVisibility(l,!0)}if(!this.currentRouteLayer){const l=N(this.rootStore.layerStore,t?.from),p=N(this.rootStore.layerStore,t?.to);l?this.currentRouteLayer=l:p&&(this.currentRouteLayer=p)}e&&t?.from&&t?.to&&$(U.ClickDirections,`${t?.from?"From "+t.from.name:""} ${t?.to?"To "+t.to.name:""}`)};r?a():setTimeout(a,200)}rebuildRouteFromPosition(t){const e=h.selectedRoute;e?.to&&this.selectRoute(new Route(t,e.to,e.waypoints),!1,!0)}resolveFallbackFrom(){if(this.currentPosition)return M(this.currentPosition,Z,q);const t=h.kioskData;return t?M({x:t.x,y:t.y,z:t.z},F(),X):null}setStartPoint(t){const e=h.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;let e=this.rootStore.layerStore.findLayer(t.z);const r=t.lat&&t.lng?A(t,S.properties.config):t;return this.rootStore.boothStore.booths.filter(s=>x.mode===Y.Default||!e?s.visible&&s.rect:s.rect&&(typeof t.z!="number"&&!t.z&&s.visible||e.name===s.layer?.name)).sort((s,a)=>T(r,s.rect.center)-T(r,a.rect.center))[0]||null}setMarkers(t){this.markersData.markers=(t?.markers??[]).map(J),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);let s=c.layerStore.findLayer(r?.z);if(e&&r){const a=c.rendererService.renderer;return s&&!s?.visible&&x.updateVisibility(s,!0),a?a.controls.panTo(r.x,r.y):(P.warn("Renderer is not initialized. Cannot pan to marker."),Promise.resolve())}return Promise.resolve()}get selectedMarkers(){return this.markersData.markers.filter(t=>t.active)}get layers(){var 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))}clickRoute(t,e){window.__resett&&window.__resett(),this.rootStore.uiState.menu=null,h.list.type==="route-planner"&&(h.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=d(t.lat),t.lng=d(t.lng),V()||(t.z=null));const s=e&&this.rootStore.uiState.details&&!(this.rootStore.uiState.details instanceof Route),a=e&&!s&&(this.focusEnabled||this.prevZ!=t?.z);this.focusEnabled&&(this.focusEnabled=!1),this.prevZ=t?.z?.toString(),this.iconType=r?1:0;const l=t?Q(t):null;if(!l){this.currentPosition=null;return}const p=c.layerStore.findLayer(t.z),b=new CurrentPosition(l.x,l.y,p?.name||this.currentRouteLayer?.name,K(l),t.lat,t.lng);let v=!this.routeLines?.length;if(p&&this.routeLines?.length&&(v=!!this.routeLines.find(k=>k.p0.layer===p.name||k.p1.layer===p.name)),a&&v){const k=c.rendererService.renderer;if(p&&!p?.visible&&x.updateVisibility(p,!0),!k){P.warn("Renderer is not initialized. Cannot pan to current position.");return}k.controls.panTo(b.x,b.y)}this.currentPosition=b,this.gpsEnabled||(this.cpTimeout=setTimeout(()=>{this.currentPosition&&this.selectCurrentPosition(null,!1)},30*1e3))}findLocation(){if(!this.canFindLocation)return;if(c.maplibreStore.showMaplibre){h.moveToLocation=!0;return}const t=this.currentPosition??h.kioskData;if(!t)return;this.currentPosition&&localStorage.getItem(G)==="false"&&(c.routeStore.requestCompass=!0);const e=R.fromCenter(t,{x:100,y:100});let r;if(e.intersects(m))r=e;else{const a=Math.max(m.min.x,Math.min(t.x,m.max.x)),l=Math.max(m.min.y,Math.min(t.y,m.max.y)),p=Math.min(m.size.width,m.size.height)*.3,b=R.fromCenter({x:a,y:l},{x:p,y:p}).intersection(m);r=b?R.fromUnion(e,b):e}h.moveToRect=r;const s=c.layerStore.findLayer(t.z);s&&x.updateVisibility(s,!0)}get routeInfo(){const t=this.routeDistance,e=this.routeUnits;return t?{distance:`${t}${e}`,units:e,time:w(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=B(),r=(e.getAttribute("units")||L).toLowerCase?.().trim(),s=e.getAttribute("fp-ver")?.startsWith("5")??!1;this.routeDistance=Math.round(t/(s?1:10)),this.routeUnits=r,this.updateRoutePoints()}updateRoutePoints(){const t=h.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}${r}`,units:r,time:w(e,D(r))})},200)}checkRoutes(){if(!j()){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 s=e+1;s<t.length;s++){const a=t[s];W(C(r),C(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 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([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 H(o){if(o)return o instanceof y?o.layer?.name:o.layer}function N(o,t){return t?t instanceof y?t.layer??null:o.findLayer(t.layer):null}function J(o){return{...o,x:d(o.x),y:d(o.y),lat:d(o.lat),lng:d(o.lng)}}function Q(o){let t=null,e=null;return S&&(t=S.properties.config),t&&O({min:t.p0,max:t.p2},o)?e={...o}:t&&I(o.lat)&&I(o.lng)?e=A(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 s=findEntityByExternalId(r);s&&(s.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)))}export class Route{constructor(t,e,r){this.from=t,this.to=e,this.waypoints=r;const s=t instanceof y?t.id:void 0,a=e instanceof y?e.id:void 0;this.waypoints=r?.filter(l=>l&&l.id!==s&&l.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 extends _{constructor(t,e,r,s,a,l){super(t,e),this.x=t,this.y=e,this.z=r,this.angle=s,this.lat=a,this.lng=l}}
@@ -58,7 +58,7 @@ export default class SearchStore {
58
58
  syncWithUIState(): void;
59
59
  get actionButtonIcon(): "icon-close" | "icon-search";
60
60
  clearAndSelectSearch(): void;
61
- get backMode(): "menu" | "back";
61
+ get backMode(): "back" | "menu";
62
62
  get isMobileDetailsMode(): boolean;
63
63
  get shouldShowTitle(): boolean;
64
64
  get searchState(): {
@@ -1 +1 @@
1
- import{__esDecorate as s,__runInitializers as u}from"tslib";import{action as c,computed as l,observable as d}from"mobx";import{LANGUAGE_TYPE as ce,MOBILE_BREAKPOINT as he}from"../constants";import S from"../data";import{goBack as g}from"../services/url-sync";import le from"../tools/settings";import{t as n}from"../utils/i18n";import{sanitizeSearch as ne}from"../utils/sanitizeText";import{Route as f}from"./RouteStore";class i{static closeDetails(r){return r.details?(r.details=null,!0):!1}static closeMultiPointTour(r){return r.rootStore.fp.hidePathways(),!0}static clearSearchAndFocus(r){return r.searchText?(r.setSearchText(""),r.setFocused(!0),!0):!1}static returnToSearch(r,h=!1){r.list={type:"search",text:"",focused:h}}static returnToSessions(r,h=!1){r.list={type:"sessions",text:"",focused:h}}static returnToTours(r,h=!1){r.list={type:"tours",text:"",focused:h}}static openMenu(r){r.menu=!0}static closeMenu(r){r.menu=!1}static clearListScroll(r,h){r.clearListScroll(h)}static resetActiveListIndex(r){r.activeListIndex=-1}}let ue=(()=>{let a=[],r,h=[],x=[],m,_=[],B=[],k,y=[],b=[],v,F=[],T=[],M,I,C,A,w,z,L,O,E,P,W,D,U,R,j,G,K,N,X,Y,H,V,$,q,J,Q,Z,ee,te,se,ae,ie,re,oe;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;r=[d],m=[d],k=[d],v=[d],M=[l],I=[l],C=[l],A=[l],w=[l],z=[l],L=[l],O=[l],E=[l],P=[l],W=[l],D=[l],U=[l],R=[l],j=[c],G=[c],K=[c],N=[c],X=[c],Y=[c],H=[c],V=[c],$=[c],q=[c],J=[c],Q=[c],Z=[c],ee=[c],te=[l],se=[c],ae=[l],ie=[l],re=[l],oe=[l],s(this,null,M,{kind:"getter",name:"searchBoxConfig",static:!1,private:!1,access:{has:e=>"searchBoxConfig"in e,get:e=>e.searchBoxConfig},metadata:t},null,a),s(this,null,I,{kind:"getter",name:"searchBoxMode",static:!1,private:!1,access:{has:e=>"searchBoxMode"in e,get:e=>e.searchBoxMode},metadata:t},null,a),s(this,null,C,{kind:"getter",name:"searchBoxTitle",static:!1,private:!1,access:{has:e=>"searchBoxTitle"in e,get:e=>e.searchBoxTitle},metadata:t},null,a),s(this,null,A,{kind:"getter",name:"searchBoxSubtitle",static:!1,private:!1,access:{has:e=>"searchBoxSubtitle"in e,get:e=>e.searchBoxSubtitle},metadata:t},null,a),s(this,null,w,{kind:"getter",name:"searchBoxBadge",static:!1,private:!1,access:{has:e=>"searchBoxBadge"in e,get:e=>e.searchBoxBadge},metadata:t},null,a),s(this,null,z,{kind:"getter",name:"searchBoxIcon",static:!1,private:!1,access:{has:e=>"searchBoxIcon"in e,get:e=>e.searchBoxIcon},metadata:t},null,a),s(this,null,L,{kind:"getter",name:"searchBoxActions",static:!1,private:!1,access:{has:e=>"searchBoxActions"in e,get:e=>e.searchBoxActions},metadata:t},null,a),s(this,null,O,{kind:"getter",name:"shouldShowSearchInput",static:!1,private:!1,access:{has:e=>"shouldShowSearchInput"in e,get:e=>e.shouldShowSearchInput},metadata:t},null,a),s(this,null,E,{kind:"getter",name:"shouldShowCloseButton",static:!1,private:!1,access:{has:e=>"shouldShowCloseButton"in e,get:e=>e.shouldShowCloseButton},metadata:t},null,a),s(this,null,P,{kind:"getter",name:"closeButtonAction",static:!1,private:!1,access:{has:e=>"closeButtonAction"in e,get:e=>e.closeButtonAction},metadata:t},null,a),s(this,null,W,{kind:"getter",name:"shouldShowShadow",static:!1,private:!1,access:{has:e=>"shouldShowShadow"in e,get:e=>e.shouldShowShadow},metadata:t},null,a),s(this,null,D,{kind:"getter",name:"placeholder",static:!1,private:!1,access:{has:e=>"placeholder"in e,get:e=>e.placeholder},metadata:t},null,a),s(this,null,U,{kind:"getter",name:"searchBoxClass",static:!1,private:!1,access:{has:e=>"searchBoxClass"in e,get:e=>e.searchBoxClass},metadata:t},null,a),s(this,null,R,{kind:"getter",name:"ariaLabel",static:!1,private:!1,access:{has:e=>"ariaLabel"in e,get:e=>e.ariaLabel},metadata:t},null,a),s(this,null,j,{kind:"method",name:"selectSearch",static:!1,private:!1,access:{has:e=>"selectSearch"in e,get:e=>e.selectSearch},metadata:t},null,a),s(this,null,G,{kind:"method",name:"selectSearchAndFocus",static:!1,private:!1,access:{has:e=>"selectSearchAndFocus"in e,get:e=>e.selectSearchAndFocus},metadata:t},null,a),s(this,null,K,{kind:"method",name:"setSearchText",static:!1,private:!1,access:{has:e=>"setSearchText"in e,get:e=>e.setSearchText},metadata:t},null,a),s(this,null,N,{kind:"method",name:"setFocused",static:!1,private:!1,access:{has:e=>"setFocused"in e,get:e=>e.setFocused},metadata:t},null,a),s(this,null,X,{kind:"method",name:"handleBackAction",static:!1,private:!1,access:{has:e=>"handleBackAction"in e,get:e=>e.handleBackAction},metadata:t},null,a),s(this,null,Y,{kind:"method",name:"closeSearch",static:!1,private:!1,access:{has:e=>"closeSearch"in e,get:e=>e.closeSearch},metadata:t},null,a),s(this,null,H,{kind:"method",name:"clearActiveFilters",static:!1,private:!1,access:{has:e=>"clearActiveFilters"in e,get:e=>e.clearActiveFilters},metadata:t},null,a),s(this,null,V,{kind:"method",name:"resetSearchButtonState",static:!1,private:!1,access:{has:e=>"resetSearchButtonState"in e,get:e=>e.resetSearchButtonState},metadata:t},null,a),s(this,null,$,{kind:"method",name:"handleSearchAction",static:!1,private:!1,access:{has:e=>"handleSearchAction"in e,get:e=>e.handleSearchAction},metadata:t},null,a),s(this,null,q,{kind:"method",name:"openOverlayWithoutInputFocus",static:!1,private:!1,access:{has:e=>"openOverlayWithoutInputFocus"in e,get:e=>e.openOverlayWithoutInputFocus},metadata:t},null,a),s(this,null,J,{kind:"method",name:"closeSessions",static:!1,private:!1,access:{has:e=>"closeSessions"in e,get:e=>e.closeSessions},metadata:t},null,a),s(this,null,Q,{kind:"method",name:"closeExhibitors",static:!1,private:!1,access:{has:e=>"closeExhibitors"in e,get:e=>e.closeExhibitors},metadata:t},null,a),s(this,null,Z,{kind:"method",name:"resetSearchBox",static:!1,private:!1,access:{has:e=>"resetSearchBox"in e,get:e=>e.resetSearchBox},metadata:t},null,a),s(this,null,ee,{kind:"method",name:"syncWithUIState",static:!1,private:!1,access:{has:e=>"syncWithUIState"in e,get:e=>e.syncWithUIState},metadata:t},null,a),s(this,null,te,{kind:"getter",name:"actionButtonIcon",static:!1,private:!1,access:{has:e=>"actionButtonIcon"in e,get:e=>e.actionButtonIcon},metadata:t},null,a),s(this,null,se,{kind:"method",name:"clearAndSelectSearch",static:!1,private:!1,access:{has:e=>"clearAndSelectSearch"in e,get:e=>e.clearAndSelectSearch},metadata:t},null,a),s(this,null,ae,{kind:"getter",name:"backMode",static:!1,private:!1,access:{has:e=>"backMode"in e,get:e=>e.backMode},metadata:t},null,a),s(this,null,ie,{kind:"getter",name:"isMobileDetailsMode",static:!1,private:!1,access:{has:e=>"isMobileDetailsMode"in e,get:e=>e.isMobileDetailsMode},metadata:t},null,a),s(this,null,re,{kind:"getter",name:"shouldShowTitle",static:!1,private:!1,access:{has:e=>"shouldShowTitle"in e,get:e=>e.shouldShowTitle},metadata:t},null,a),s(this,null,oe,{kind:"getter",name:"searchState",static:!1,private:!1,access:{has:e=>"searchState"in e,get:e=>e.searchState},metadata:t},null,a),s(null,null,r,{kind:"field",name:"searchText",static:!1,private:!1,access:{has:e=>"searchText"in e,get:e=>e.searchText,set:(e,o)=>{e.searchText=o}},metadata:t},h,x),s(null,null,m,{kind:"field",name:"isFocused",static:!1,private:!1,access:{has:e=>"isFocused"in e,get:e=>e.isFocused,set:(e,o)=>{e.isFocused=o}},metadata:t},_,B),s(null,null,k,{kind:"field",name:"isClearMode",static:!1,private:!1,access:{has:e=>"isClearMode"in e,get:e=>e.isClearMode,set:(e,o)=>{e.isClearMode=o}},metadata:t},y,b),s(null,null,v,{kind:"field",name:"skipInputFocus",static:!1,private:!1,access:{has:e=>"skipInputFocus"in e,get:e=>e.skipInputFocus,set:(e,o)=>{e.skipInputFocus=o}},metadata:t},F,T),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=u(this,a);searchText=u(this,h,"");isFocused=(u(this,x),u(this,_,!1));isClearMode=(u(this,B),u(this,y,!1));skipInputFocus=(u(this,b),u(this,F,!1));constructor(t){u(this,T),this.rootStore=t}get uiState(){return this.rootStore.uiState}get searchBoxConfig(){return this.uiState.searchBoxConfig}get searchBoxMode(){return this.searchBoxConfig.mode}get searchBoxTitle(){return this.searchBoxConfig.title}get searchBoxSubtitle(){return this.searchBoxConfig.subtitle}get searchBoxBadge(){return this.searchBoxConfig.badge}get searchBoxIcon(){return this.searchBoxConfig.icon}get searchBoxActions(){return this.uiState.searchBoxActions}get shouldShowSearchInput(){return this.searchBoxMode==="search"}get shouldShowCloseButton(){const{menu:t,details:e,list:o}=this.uiState,p=S.isRebooking&&o.type==="exhibitors";return!this.shouldShowSearchInput||o.type==="sessions"||o.type==="tours"||o.type==="speakers"||o.type==="exhibitors"&&!p?!0:t||e!==null||!!this.searchText||this.isClearMode||this.isFocused}get closeButtonAction(){return!this.shouldShowSearchInput||this.searchBoxMode==="details"||this.uiState.list.type==="sessions"||this.uiState.list.type==="speakers"||this.uiState.list.type==="exhibitors"&&!S.isRebooking?"close":this.searchText?"clear":"close"}get shouldShowShadow(){const{menu:t,details:e,list:o}=this.uiState,p=o.type==="search"&&!!o.text;return!(this.rootStore.fp.alwaysShowSidebar||t||e!==null||o.type!=="search"||p||this.isFocused||this.uiState.heatmap)}get placeholder(){const{list:t,heatmapYah:e}=this.uiState;return t.type==="sessions"?n("Search sessions"):t.type==="tours"?n("Search Guided Tours"):t.type==="exhibitors"?n("Search exhibitors"):t.type==="speakers"?n("Search speakers"):le.EXPO.startsWith("lenzerheidemotorclassics")?"SUCHE":le.EXPO.startsWith("jetlag")?"Search location or artist":e?n("Find values greater than"):this.uiState.hasAppliedFilters?n("Search"):S.searchText||n("Search")}get searchBoxClass(){return{"is-details":this.searchBoxMode==="details"&&!(this.uiState.details instanceof f),"is-interface":this.searchBoxMode==="interface","has-shadow":this.shouldShowShadow,"has-subtitle":!!this.searchBoxConfig.subtitle,"has-badge":!!this.searchBoxConfig.badge,"has-icon":!!this.searchBoxConfig.icon,"is-overlay-full":this.uiState.isOverlayOpen&&this.uiState.overlaySize==="full","is-featured-exhibitor":this.uiState.isFeaturedExhibitorActive,"is-route":this.uiState.details instanceof f,"is-guided-tours":this.uiState.isGuidedToursActive,"is-overlay-scrolled":this.uiState.isOverlayScrolled,"overlay-pulse":this.uiState.kiosk&&this.uiState.inIdle&&!this.uiState.setKioskModeEnabled}}get ariaLabel(){return!this.shouldShowSearchInput||this.searchBoxMode==="details"?n("Close"):this.searchText?n("Clear search"):n("Close")}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null;const e=ne(t||"",Object.keys(this.uiState.mapSettings).map(o=>`${o}=`));this.setSearchText(e),this.uiState.activeListIndex=-1}selectSearchAndFocus(t){this.selectSearch(t),this.setFocused(!0)}setSearchText(t){this.searchText=t,this.uiState.hasAppliedFilters?this.rootStore.moveToList():this.uiState.centerMap=!0,this.uiState.activeListIndex=t?0:-1,this.uiState.list.type!=="sessions"&&this.uiState.list.type!=="tours"&&this.uiState.list.type!=="speakers"&&this.uiState.list.type!=="exhibitors"?this.uiState.list={type:"search",text:t,focused:this.isFocused}:this.uiState.list.type==="exhibitors"&&(this.uiState.list={type:"exhibitors",text:t,focused:this.isFocused}),this.uiState.searchClearMode=this.isClearMode}setFocused(t){this.isFocused=t,this.isClearMode=!1,this.skipInputFocus=!1,this.uiState.searchFocused=t,this.uiState.searchClearMode=!1,this.uiState.desiredOverlaySize="full"}handleBackAction(){const{uiState:t}=this,{list:e}=t;if(t.desiredOverlaySize="full",this.backMode==="menu"){this.resetSearchButtonState(),i.openMenu(t);return}if(e.type==="route-planner"){this.rootStore.routePlannerStore.close(),this.rootStore.selectBookmarks(),g();return}if(e.type==="multi-point-tour"&&!t.details){i.returnToTours(t,!1),this.rootStore.fp.hidePathways();return}if(t.details){t.details=null,g();return}if(t.menu){e.type==="sessions"?t.list={type:"sessions",text:"",focused:!0}:e.type==="exhibitors"?t.list={type:"exhibitors",text:"",focused:!0}:t.list={type:"search",text:"",focused:!0},this.setFocused(!0),this.isClearMode=!0,i.closeMenu(t);return}if(e.type==="tours"&&t.details instanceof f){t.details=null;return}if(e.type==="sessions"||e.type==="tours"||e.type==="exhibitors"){if(i.closeDetails(t))return;this.clearActiveFilters(),i.returnToSearch(t,!1),this.selectSearchAndFocus();return}switch(e.type){case"filter":t.details=null;return;case"multi-point-tour":this.rootStore.fp.hidePathways(),i.closeDetails(t)?i.returnToTours(t,!1):g();return;case"category":this.rootStore.selectCategory(e.category);return;case"speakers":if(i.closeDetails(t))return;i.returnToSessions(t,!1);return;case"bookmarks":case"visited":if(i.closeDetails(t))return;this.selectSearchAndFocus();return;case ce:i.returnToSearch(t,!1),i.openMenu(t);return}i.closeDetails(t)||i.clearSearchAndFocus(this)||i.openMenu(t)}closeSearch(){const{uiState:t}=this,{list:e}=t;if(e.type==="route-planner"){this.rootStore.routePlannerStore.close(),i.returnToSearch(t,!1),this.resetSearchBox();return}if(i.closeDetails(t),i.clearListScroll(t,e.type),i.closeMultiPointTour(t),e.type==="bookmarks"){i.returnToSearch(t,!1),this.resetSearchBox();return}if(t.selectedCategory){i.returnToSearch(t,!1),this.resetSearchBox();return}if(e.type==="sessions"){this.closeSessions();return}if(e.type==="exhibitors"){if(S.isRebooking){this.searchBoxMode==="search"&&this.searchText?(this.setSearchText(""),this.isClearMode=!0,this.clearActiveFilters()):this.resetSearchBox();return}this.closeExhibitors();return}if(t.menu){i.closeMenu(t),this.resetSearchBox();return}if(this.searchBoxMode==="search"&&!t.details&&this.searchText){this.setSearchText(""),this.isClearMode=!0,this.clearActiveFilters();return}i.returnToSearch(t,!1),this.searchText="",this.resetSearchBox(),t.details=null,this.clearActiveFilters()}clearActiveFilters(){this.rootStore.searchButtonsStore.setPoiFilterId(null),this.rootStore.uiState.selectedPoiTypeFilters=[],this.rootStore.uiState.selectedCategoryFilters=[],this.rootStore.categoryFilterStore.state.selectedItems=[],this.rootStore.categoryFilterStore.state.pendingItems=[],this.rootStore.searchButtonsStore.searchShortcutState.activeParentId=null,this.rootStore.searchButtonsStore.searchShortcutState.activeChildren.clear(),this.rootStore.searchButtonsStore.searchShortcutState.isShortcutsVisible=!1,this.rootStore.urlFilterManager&&this.rootStore.urlFilterManager.isInitialized&&this.rootStore.urlFilterManager.clearAllFilters()}resetSearchButtonState(){const{uiState:t}=this;this.rootStore.searchButtonsStore.clearAllFilters(),this.rootStore.searchButtonsStore.setSubButtonId(null),this.rootStore.searchButtonsStore.hideSubButtons(),t.selectedTrack=null,this.searchText="",this.isClearMode=!1}handleSearchAction(){this.isFocused||this.setFocused(!0)}openOverlayWithoutInputFocus(){this.skipInputFocus=!0,this.isFocused=!0,this.isClearMode=!1,this.uiState.searchFocused=!0,this.uiState.searchClearMode=!1,this.uiState.desiredOverlaySize="full"}closeSessions(){this.searchText="",i.returnToSearch(this.uiState,!1),this.uiState.details=null,i.resetActiveListIndex(this.uiState),this.uiState.selectedTrack=null,this.rootStore.searchButtonsStore.setSubButtonId(null),this.rootStore.searchButtonsStore.hideSubButtons()}closeExhibitors(){this.searchText="",i.returnToSearch(this.uiState,!1),this.uiState.details=null,i.resetActiveListIndex(this.uiState)}resetSearchBox(){this.setFocused(!1),this.isClearMode=!1,this.syncWithUIState()}syncWithUIState(){this.searchText=(this.uiState.list.type==="search"||this.uiState.list.type==="exhibitors")&&this.uiState.list.text||"",this.isFocused=this.uiState.searchFocused,this.isClearMode=this.uiState.searchClearMode}get actionButtonIcon(){return this.shouldShowSearchInput?this.shouldShowCloseButton?"icon-close":"icon-search":"icon-close"}clearAndSelectSearch(){this.selectSearch(""),this.setFocused(!1)}get backMode(){const t=this.uiState.list.type;return(t==="bookmarks"||t==="visited")&&!this.uiState.details&&!this.uiState.menu||this.shouldShowSearchInput&&!this.searchText?"menu":"back"}get isMobileDetailsMode(){return window.innerWidth<he&&this.uiState.details!==null&&this.uiState.overlaySize==="full"&&!(this.uiState.details instanceof f)}get shouldShowTitle(){return!this.shouldShowSearchInput}get searchState(){return{text:this.searchText,isFocused:this.isFocused,isClearMode:this.isClearMode,mode:this.searchBoxMode,title:this.searchBoxConfig.title,subtitle:this.searchBoxConfig.subtitle,badge:this.searchBoxConfig.badge,icon:this.searchBoxConfig.icon}}}})();export default ue;
1
+ import{__decorate as s}from"tslib";import{action as a,computed as o,observable as u}from"mobx";import{LANGUAGE_TYPE as y,MOBILE_BREAKPOINT as x}from"../constants";import c from"../data";import{goBack as d}from"../services/url-sync";import p from"../tools/settings";import{t as l}from"../utils/i18n";import{sanitizeSearch as B}from"../utils/sanitizeText";import{Route as n}from"./RouteStore";class r{static closeDetails(t){return t.details?(t.details=null,!0):!1}static closeMultiPointTour(t){return t.rootStore.fp.hidePathways(),!0}static clearSearchAndFocus(t){return t.searchText?(t.setSearchText(""),t.setFocused(!0),!0):!1}static returnToSearch(t,i=!1){t.list={type:"search",text:"",focused:i}}static returnToSessions(t,i=!1){t.list={type:"sessions",text:"",focused:i}}static returnToTours(t,i=!1){t.list={type:"tours",text:"",focused:i}}static openMenu(t){t.menu=!0}static closeMenu(t){t.menu=!1}static clearListScroll(t,i){t.clearListScroll(i)}static resetActiveListIndex(t){t.activeListIndex=-1}}export default class e{constructor(t){this.searchText="",this.isFocused=!1,this.isClearMode=!1,this.skipInputFocus=!1,this.rootStore=t}get uiState(){return this.rootStore.uiState}get searchBoxConfig(){return this.uiState.searchBoxConfig}get searchBoxMode(){return this.searchBoxConfig.mode}get searchBoxTitle(){return this.searchBoxConfig.title}get searchBoxSubtitle(){return this.searchBoxConfig.subtitle}get searchBoxBadge(){return this.searchBoxConfig.badge}get searchBoxIcon(){return this.searchBoxConfig.icon}get searchBoxActions(){return this.uiState.searchBoxActions}get shouldShowSearchInput(){return this.searchBoxMode==="search"}get shouldShowCloseButton(){const{menu:t,details:i,list:h}=this.uiState,S=c.isRebooking&&h.type==="exhibitors";return!this.shouldShowSearchInput||h.type==="sessions"||h.type==="tours"||h.type==="speakers"||h.type==="exhibitors"&&!S?!0:t||i!==null||!!this.searchText||this.isClearMode||this.isFocused}get closeButtonAction(){return!this.shouldShowSearchInput||this.searchBoxMode==="details"||this.uiState.list.type==="sessions"||this.uiState.list.type==="speakers"||this.uiState.list.type==="exhibitors"&&!c.isRebooking?"close":this.searchText?"clear":"close"}get shouldShowShadow(){const{menu:t,details:i,list:h}=this.uiState,S=h.type==="search"&&!!h.text;return!(this.rootStore.fp.alwaysShowSidebar||t||i!==null||h.type!=="search"||S||this.isFocused||this.uiState.heatmap)}get placeholder(){const{list:t,heatmapYah:i}=this.uiState;return t.type==="sessions"?l("Search sessions"):t.type==="tours"?l("Search Guided Tours"):t.type==="exhibitors"?l("Search exhibitors"):t.type==="speakers"?l("Search speakers"):p.EXPO.startsWith("lenzerheidemotorclassics")?"SUCHE":p.EXPO.startsWith("jetlag")?"Search location or artist":i?l("Find values greater than"):this.uiState.hasAppliedFilters?l("Search"):c.searchText||l("Search")}get searchBoxClass(){return{"is-details":this.searchBoxMode==="details"&&!(this.uiState.details instanceof n),"is-interface":this.searchBoxMode==="interface","has-shadow":this.shouldShowShadow,"has-subtitle":!!this.searchBoxConfig.subtitle,"has-badge":!!this.searchBoxConfig.badge,"has-icon":!!this.searchBoxConfig.icon,"is-overlay-full":this.uiState.isOverlayOpen&&this.uiState.overlaySize==="full","is-featured-exhibitor":this.uiState.isFeaturedExhibitorActive,"is-route":this.uiState.details instanceof n,"is-guided-tours":this.uiState.isGuidedToursActive,"is-overlay-scrolled":this.uiState.isOverlayScrolled,"overlay-pulse":this.uiState.kiosk&&this.uiState.inIdle&&!this.uiState.setKioskModeEnabled}}get ariaLabel(){return!this.shouldShowSearchInput||this.searchBoxMode==="details"?l("Close"):this.searchText?l("Clear search"):l("Close")}selectSearch(t){window.__resett&&window.__resett(),this.uiState.details=null;const i=B(t||"",Object.keys(this.uiState.mapSettings).map(h=>`${h}=`));this.setSearchText(i),this.uiState.activeListIndex=-1}selectSearchAndFocus(t){this.selectSearch(t),this.setFocused(!0)}setSearchText(t){this.searchText=t,this.uiState.hasAppliedFilters?this.rootStore.moveToList():this.uiState.centerMap=!0,this.uiState.activeListIndex=t?0:-1,this.uiState.list.type!=="sessions"&&this.uiState.list.type!=="tours"&&this.uiState.list.type!=="speakers"&&this.uiState.list.type!=="exhibitors"?this.uiState.list={type:"search",text:t,focused:this.isFocused}:this.uiState.list.type==="exhibitors"&&(this.uiState.list={type:"exhibitors",text:t,focused:this.isFocused}),this.uiState.searchClearMode=this.isClearMode}setFocused(t){this.isFocused=t,this.isClearMode=!1,this.skipInputFocus=!1,this.uiState.searchFocused=t,this.uiState.searchClearMode=!1,this.uiState.desiredOverlaySize="full"}handleBackAction(){const{uiState:t}=this,{list:i}=t;if(t.desiredOverlaySize="full",this.backMode==="menu"){this.resetSearchButtonState(),r.openMenu(t);return}if(i.type==="route-planner"){this.rootStore.routePlannerStore.close(),this.rootStore.selectBookmarks(),d();return}if(i.type==="multi-point-tour"&&!t.details){r.returnToTours(t,!1),this.rootStore.fp.hidePathways();return}if(t.details){t.details=null,d();return}if(t.menu){i.type==="sessions"?t.list={type:"sessions",text:"",focused:!0}:i.type==="exhibitors"?t.list={type:"exhibitors",text:"",focused:!0}:t.list={type:"search",text:"",focused:!0},this.setFocused(!0),this.isClearMode=!0,r.closeMenu(t);return}if(i.type==="tours"&&t.details instanceof n){t.details=null;return}if(i.type==="sessions"||i.type==="tours"||i.type==="exhibitors"){if(r.closeDetails(t))return;this.clearActiveFilters(),r.returnToSearch(t,!1),this.selectSearchAndFocus();return}switch(i.type){case"filter":t.details=null;return;case"multi-point-tour":this.rootStore.fp.hidePathways(),r.closeDetails(t)?r.returnToTours(t,!1):d();return;case"category":this.rootStore.selectCategory(i.category);return;case"speakers":if(r.closeDetails(t))return;r.returnToSessions(t,!1);return;case"bookmarks":case"visited":if(r.closeDetails(t))return;this.selectSearchAndFocus();return;case y:r.returnToSearch(t,!1),r.openMenu(t);return}r.closeDetails(t)||r.clearSearchAndFocus(this)||r.openMenu(t)}closeSearch(){const{uiState:t}=this,{list:i}=t;if(i.type==="route-planner"){this.rootStore.routePlannerStore.close(),r.returnToSearch(t,!1),this.resetSearchBox();return}if(r.closeDetails(t),r.clearListScroll(t,i.type),r.closeMultiPointTour(t),i.type==="bookmarks"){r.returnToSearch(t,!1),this.resetSearchBox();return}if(t.selectedCategory){r.returnToSearch(t,!1),this.resetSearchBox();return}if(i.type==="sessions"){this.closeSessions();return}if(i.type==="exhibitors"){if(c.isRebooking){this.searchBoxMode==="search"&&this.searchText?(this.setSearchText(""),this.isClearMode=!0,this.clearActiveFilters()):this.resetSearchBox();return}this.closeExhibitors();return}if(t.menu){r.closeMenu(t),this.resetSearchBox();return}if(this.searchBoxMode==="search"&&!t.details&&this.searchText){this.setSearchText(""),this.isClearMode=!0,this.clearActiveFilters();return}r.returnToSearch(t,!1),this.searchText="",this.resetSearchBox(),t.details=null,this.clearActiveFilters()}clearActiveFilters(){this.rootStore.searchButtonsStore.setPoiFilterId(null),this.rootStore.uiState.selectedPoiTypeFilters=[],this.rootStore.uiState.selectedCategoryFilters=[],this.rootStore.categoryFilterStore.state.selectedItems=[],this.rootStore.categoryFilterStore.state.pendingItems=[],this.rootStore.searchButtonsStore.searchShortcutState.activeParentId=null,this.rootStore.searchButtonsStore.searchShortcutState.activeChildren.clear(),this.rootStore.searchButtonsStore.searchShortcutState.isShortcutsVisible=!1,this.rootStore.urlFilterManager&&this.rootStore.urlFilterManager.isInitialized&&this.rootStore.urlFilterManager.clearAllFilters()}resetSearchButtonState(){const{uiState:t}=this;this.rootStore.searchButtonsStore.clearAllFilters(),this.rootStore.searchButtonsStore.setSubButtonId(null),this.rootStore.searchButtonsStore.hideSubButtons(),t.selectedTrack=null,this.searchText="",this.isClearMode=!1}handleSearchAction(){this.isFocused||this.setFocused(!0)}openOverlayWithoutInputFocus(){this.skipInputFocus=!0,this.isFocused=!0,this.isClearMode=!1,this.uiState.searchFocused=!0,this.uiState.searchClearMode=!1,this.uiState.desiredOverlaySize="full"}closeSessions(){this.searchText="",r.returnToSearch(this.uiState,!1),this.uiState.details=null,r.resetActiveListIndex(this.uiState),this.uiState.selectedTrack=null,this.rootStore.searchButtonsStore.setSubButtonId(null),this.rootStore.searchButtonsStore.hideSubButtons()}closeExhibitors(){this.searchText="",r.returnToSearch(this.uiState,!1),this.uiState.details=null,r.resetActiveListIndex(this.uiState)}resetSearchBox(){this.setFocused(!1),this.isClearMode=!1,this.syncWithUIState()}syncWithUIState(){this.searchText=(this.uiState.list.type==="search"||this.uiState.list.type==="exhibitors")&&this.uiState.list.text||"",this.isFocused=this.uiState.searchFocused,this.isClearMode=this.uiState.searchClearMode}get actionButtonIcon(){return this.shouldShowSearchInput?this.shouldShowCloseButton?"icon-close":"icon-search":"icon-close"}clearAndSelectSearch(){this.selectSearch(""),this.setFocused(!1)}get backMode(){const t=this.uiState.list.type;return(t==="bookmarks"||t==="visited")&&!this.uiState.details&&!this.uiState.menu||this.shouldShowSearchInput&&!this.searchText?"menu":"back"}get isMobileDetailsMode(){return window.innerWidth<x&&this.uiState.details!==null&&this.uiState.overlaySize==="full"&&!(this.uiState.details instanceof n)}get shouldShowTitle(){return!this.shouldShowSearchInput}get searchState(){return{text:this.searchText,isFocused:this.isFocused,isClearMode:this.isClearMode,mode:this.searchBoxMode,title:this.searchBoxConfig.title,subtitle:this.searchBoxConfig.subtitle,badge:this.searchBoxConfig.badge,icon:this.searchBoxConfig.icon}}}s([u],e.prototype,"searchText",void 0),s([u],e.prototype,"isFocused",void 0),s([u],e.prototype,"isClearMode",void 0),s([u],e.prototype,"skipInputFocus",void 0),s([o],e.prototype,"searchBoxConfig",null),s([o],e.prototype,"searchBoxMode",null),s([o],e.prototype,"searchBoxTitle",null),s([o],e.prototype,"searchBoxSubtitle",null),s([o],e.prototype,"searchBoxBadge",null),s([o],e.prototype,"searchBoxIcon",null),s([o],e.prototype,"searchBoxActions",null),s([o],e.prototype,"shouldShowSearchInput",null),s([o],e.prototype,"shouldShowCloseButton",null),s([o],e.prototype,"closeButtonAction",null),s([o],e.prototype,"shouldShowShadow",null),s([o],e.prototype,"placeholder",null),s([o],e.prototype,"searchBoxClass",null),s([o],e.prototype,"ariaLabel",null),s([a],e.prototype,"selectSearch",null),s([a],e.prototype,"selectSearchAndFocus",null),s([a],e.prototype,"setSearchText",null),s([a],e.prototype,"setFocused",null),s([a],e.prototype,"handleBackAction",null),s([a],e.prototype,"closeSearch",null),s([a],e.prototype,"clearActiveFilters",null),s([a],e.prototype,"resetSearchButtonState",null),s([a],e.prototype,"handleSearchAction",null),s([a],e.prototype,"openOverlayWithoutInputFocus",null),s([a],e.prototype,"closeSessions",null),s([a],e.prototype,"closeExhibitors",null),s([a],e.prototype,"resetSearchBox",null),s([a],e.prototype,"syncWithUIState",null),s([o],e.prototype,"actionButtonIcon",null),s([a],e.prototype,"clearAndSelectSearch",null),s([o],e.prototype,"backMode",null),s([o],e.prototype,"isMobileDetailsMode",null),s([o],e.prototype,"shouldShowTitle",null),s([o],e.prototype,"searchState",null);
@@ -1 +1 @@
1
- import{__esDecorate as i,__runInitializers as d}from"tslib";import{action as n,computed as O,observable as b}from"mobx";import I from"./BaseFilterStore";const c={selectedTracks:[],selectedVenues:[],selectedSpeakers:[],date:"all",timeOfDay:"all",sortOrder:"desc",use24hFormat:!1,showBookmarksOnly:!1,showLiveOnly:!1};let T=(()=>{let h=I,s=[],u,p=[],f=[],m,F,v,g,S,_,y,A,k;return class extends h{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(h[Symbol.metadata]??null):void 0;u=[b],m=[n],F=[n],v=[n],g=[n],S=[n],_=[n],y=[n],A=[n],k=[O],i(this,null,m,{kind:"method",name:"setSearchText",static:!1,private:!1,access:{has:e=>"setSearchText"in e,get:e=>e.setSearchText},metadata:t},null,s),i(this,null,F,{kind:"method",name:"setPending",static:!1,private:!1,access:{has:e=>"setPending"in e,get:e=>e.setPending},metadata:t},null,s),i(this,null,v,{kind:"method",name:"applyFilters",static:!1,private:!1,access:{has:e=>"applyFilters"in e,get:e=>e.applyFilters},metadata:t},null,s),i(this,null,g,{kind:"method",name:"resetFilters",static:!1,private:!1,access:{has:e=>"resetFilters"in e,get:e=>e.resetFilters},metadata:t},null,s),i(this,null,S,{kind:"method",name:"resetAndApplyFilters",static:!1,private:!1,access:{has:e=>"resetAndApplyFilters"in e,get:e=>e.resetAndApplyFilters},metadata:t},null,s),i(this,null,_,{kind:"method",name:"openFilter",static:!1,private:!1,access:{has:e=>"openFilter"in e,get:e=>e.openFilter},metadata:t},null,s),i(this,null,y,{kind:"method",name:"closeFilter",static:!1,private:!1,access:{has:e=>"closeFilter"in e,get:e=>e.closeFilter},metadata:t},null,s),i(this,null,A,{kind:"method",name:"openFilterWithSections",static:!1,private:!1,access:{has:e=>"openFilterWithSections"in e,get:e=>e.openFilterWithSections},metadata:t},null,s),i(this,null,k,{kind:"getter",name:"activeFiltersCount",static:!1,private:!1,access:{has:e=>"activeFiltersCount"in e,get:e=>e.activeFiltersCount},metadata:t},null,s),i(null,null,u,{kind:"field",name:"state",static:!1,private:!1,access:{has:e=>"state"in e,get:e=>e.state,set:(e,a)=>{e.state=a}},metadata:t},p,f),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}state=(d(this,s),d(this,p,{isOpen:!1,selectedItems:[],pendingItems:[],searchText:"",visibleSections:["tracks","venues","speakers","date","time","sort","settings"],filters:this.createInitialFilters()}));constructor(t){super(t),d(this,f)}createInitialFilters(){const t={};return Object.keys(c).forEach(e=>{t[e]={value:c[e],pending:c[e]}}),t}setSearchText(t){this.state.searchText=t}setPending(t,e){this.state.filters[t].pending=e}applyFilters(){const{filters:t}=this.state,e=t.selectedTracks.value.length>0,a=t.selectedVenues.value.length>0;Object.keys(t).forEach(o=>{t[o].value=t[o].pending});const l=t.selectedTracks.value.length>0,r=t.selectedVenues.value.length>0;e!==l&&this.rootStore.shortcutRegistry.updateActivationOrderFromState("sessions","tracks",e,l),a!==r&&this.rootStore.shortcutRegistry.updateActivationOrderFromState("sessions","venues",a,r),this.state.selectedItems=[...this.state.pendingItems],this.state.isOpen=!1,this.updateUIState()}resetFilters(){const{filters:t}=this.state;Object.keys(c).forEach(e=>{t[e].pending=c[e]}),this.state.pendingItems=[],this.state.searchText=""}resetAndApplyFilters(){const{filters:t}=this.state,e=t.selectedTracks.value.length>0,a=t.selectedVenues.value.length>0;this.resetFilters(),Object.keys(t).forEach(o=>{t[o].value=t[o].pending});const l=!1,r=!1;e!==l&&this.rootStore.shortcutRegistry.updateActivationOrderFromState("sessions","tracks",e,l),a!==r&&this.rootStore.shortcutRegistry.updateActivationOrderFromState("sessions","venues",a,r),this.state.selectedItems=[],this.state.isOpen=!1,this.rootStore.uiState.list={type:"sessions",text:"",focused:!1}}openFilter(){this.state.isOpen=!0,this.state.pendingItems=[...this.state.selectedItems];const{filters:t}=this.state;Object.keys(t).forEach(e=>{t[e].pending=t[e].value})}closeFilter(){this.state.isOpen=!1,this.state.pendingItems=[...this.state.selectedItems];const{filters:t}=this.state;Object.keys(t).forEach(e=>{t[e].pending=t[e].value})}openFilterWithSections(t){this.state.visibleSections=t,this.openFilter()}get activeFiltersCount(){const{filters:t}=this.state;let e=0;return Object.keys(c).forEach(a=>{const l=t[a].value,r=c[a];Array.isArray(r)&&Array.isArray(l)?l.length>0&&e++:l!==r&&e++}),e}updateUIState(){this.rootStore.uiState.list={type:"sessions",text:"",focused:!1},this.rootStore.searchStore.setFocused(!0)}getFilteredItems(){return[]}}})();export default T;
1
+ import{__decorate as i}from"tslib";import{action as l,computed as p,observable as u}from"mobx";import h from"./BaseFilterStore";const n={selectedTracks:[],selectedVenues:[],selectedSpeakers:[],date:"all",timeOfDay:"all",sortOrder:"desc",use24hFormat:!1,showBookmarksOnly:!1,showLiveOnly:!1};export default class s extends h{constructor(e){super(e),this.state={isOpen:!1,selectedItems:[],pendingItems:[],searchText:"",visibleSections:["tracks","venues","speakers","date","time","sort","settings"],filters:this.createInitialFilters()}}createInitialFilters(){const e={};return Object.keys(n).forEach(t=>{e[t]={value:n[t],pending:n[t]}}),e}setSearchText(e){this.state.searchText=e}setPending(e,t){this.state.filters[e].pending=t}applyFilters(){const{filters:e}=this.state,t=e.selectedTracks.value.length>0,o=e.selectedVenues.value.length>0;Object.keys(e).forEach(c=>{e[c].value=e[c].pending});const r=e.selectedTracks.value.length>0,a=e.selectedVenues.value.length>0;t!==r&&this.rootStore.shortcutRegistry.updateActivationOrderFromState("sessions","tracks",t,r),o!==a&&this.rootStore.shortcutRegistry.updateActivationOrderFromState("sessions","venues",o,a),this.state.selectedItems=[...this.state.pendingItems],this.state.isOpen=!1,this.updateUIState()}resetFilters(){const{filters:e}=this.state;Object.keys(n).forEach(t=>{e[t].pending=n[t]}),this.state.pendingItems=[],this.state.searchText=""}resetAndApplyFilters(){const{filters:e}=this.state,t=e.selectedTracks.value.length>0,o=e.selectedVenues.value.length>0;this.resetFilters(),Object.keys(e).forEach(c=>{e[c].value=e[c].pending});const r=!1,a=!1;t!==r&&this.rootStore.shortcutRegistry.updateActivationOrderFromState("sessions","tracks",t,r),o!==a&&this.rootStore.shortcutRegistry.updateActivationOrderFromState("sessions","venues",o,a),this.state.selectedItems=[],this.state.isOpen=!1,this.rootStore.uiState.list={type:"sessions",text:"",focused:!1}}openFilter(){this.state.isOpen=!0,this.state.pendingItems=[...this.state.selectedItems];const{filters:e}=this.state;Object.keys(e).forEach(t=>{e[t].pending=e[t].value})}closeFilter(){this.state.isOpen=!1,this.state.pendingItems=[...this.state.selectedItems];const{filters:e}=this.state;Object.keys(e).forEach(t=>{e[t].pending=e[t].value})}openFilterWithSections(e){this.state.visibleSections=e,this.openFilter()}get activeFiltersCount(){const{filters:e}=this.state;let t=0;return Object.keys(n).forEach(o=>{const r=e[o].value,a=n[o];Array.isArray(a)&&Array.isArray(r)?r.length>0&&t++:r!==a&&t++}),t}updateUIState(){this.rootStore.uiState.list={type:"sessions",text:"",focused:!1},this.rootStore.searchStore.setFocused(!0)}getFilteredItems(){return[]}}i([u],s.prototype,"state",void 0),i([l],s.prototype,"setSearchText",null),i([l],s.prototype,"setPending",null),i([l],s.prototype,"applyFilters",null),i([l],s.prototype,"resetFilters",null),i([l],s.prototype,"resetAndApplyFilters",null),i([l],s.prototype,"openFilter",null),i([l],s.prototype,"closeFilter",null),i([l],s.prototype,"openFilterWithSections",null),i([p],s.prototype,"activeFiltersCount",null);
@@ -1 +1 @@
1
- export class ShortcutRegistry{providers=new Map;activationOrder=new Map;register(t){if(!t?.id)throw new Error("Provider must have a valid id");this.providers.set(t.id,t)}unregister(t){this.providers.delete(t),this.activationOrder.delete(t)}getShortcuts(t){const e=this.providers.get(t);if(!e)return[];const i=e.createShortcuts(),r=this.activationOrder.get(t);return r?this.sortShortcuts(i,r):i}sortShortcuts(t,e){const i=new Map(e.map((r,s)=>[r,s]));return t.sort((r,s)=>{if(r.active!==s.active)return r.active?-1:1;if(r.active&&s.active){const o=i.get(r.id),n=i.get(s.id);return o!==void 0&&n!==void 0?o-n:(o!==void 0?-1:0)-(n!==void 0?-1:0)}return 0})}handleShortcutClick(t,e){const i=this.providers.get(t);if(!i)return;const r=this.isShortcutActive(i,e);i.handleShortcutClick(e);const s=this.isShortcutActive(i,e);r!==s&&this.updateActivationOrder(t,e,r,s)}isShortcutActive(t,e){return t.createShortcuts().find(r=>r.id===e)?.active??!1}handleShortcutReset(t,e){const i=this.providers.get(t);if(!i?.handleShortcutReset)return;i.handleShortcutReset(e),this.activationOrder.get(t)?.includes(e)&&this.updateActivationOrder(t,e,!0,!1)}updateActivationOrder(t,e,i,r){const s=this.activationOrder.get(t)||[];let o;if(!i&&r)o=s.includes(e)?s:[...s,e];else if(i&&!r)o=s.filter(n=>n!==e);else return;o.length>0?this.activationOrder.set(t,o):this.activationOrder.delete(t)}updateActivationOrderFromState(t,e,i,r){this.updateActivationOrder(t,e,i,r)}shouldShowShortcuts(t){return this.providers.get(t)?.shouldShowShortcuts?.()??!0}getRegisteredProviders(){return Array.from(this.providers.keys())}isProviderRegistered(t){return this.providers.has(t)}clear(){this.providers.clear(),this.activationOrder.clear()}}
1
+ export class ShortcutRegistry{constructor(){this.providers=new Map,this.activationOrder=new Map}register(t){if(!t?.id)throw new Error("Provider must have a valid id");this.providers.set(t.id,t)}unregister(t){this.providers.delete(t),this.activationOrder.delete(t)}getShortcuts(t){const e=this.providers.get(t);if(!e)return[];const i=e.createShortcuts(),r=this.activationOrder.get(t);return r?this.sortShortcuts(i,r):i}sortShortcuts(t,e){const i=new Map(e.map((r,s)=>[r,s]));return t.sort((r,s)=>{if(r.active!==s.active)return r.active?-1:1;if(r.active&&s.active){const o=i.get(r.id),n=i.get(s.id);return o!==void 0&&n!==void 0?o-n:(o!==void 0?-1:0)-(n!==void 0?-1:0)}return 0})}handleShortcutClick(t,e){const i=this.providers.get(t);if(!i)return;const r=this.isShortcutActive(i,e);i.handleShortcutClick(e);const s=this.isShortcutActive(i,e);r!==s&&this.updateActivationOrder(t,e,r,s)}isShortcutActive(t,e){return t.createShortcuts().find(r=>r.id===e)?.active??!1}handleShortcutReset(t,e){const i=this.providers.get(t);if(!i?.handleShortcutReset)return;i.handleShortcutReset(e),this.activationOrder.get(t)?.includes(e)&&this.updateActivationOrder(t,e,!0,!1)}updateActivationOrder(t,e,i,r){const s=this.activationOrder.get(t)||[];let o;if(!i&&r)o=s.includes(e)?s:[...s,e];else if(i&&!r)o=s.filter(n=>n!==e);else return;o.length>0?this.activationOrder.set(t,o):this.activationOrder.delete(t)}updateActivationOrderFromState(t,e,i,r){this.updateActivationOrder(t,e,i,r)}shouldShowShortcuts(t){return this.providers.get(t)?.shouldShowShortcuts?.()??!0}getRegisteredProviders(){return Array.from(this.providers.keys())}isProviderRegistered(t){return this.providers.has(t)}clear(){this.providers.clear(),this.activationOrder.clear()}}
@@ -1 +1 @@
1
- import{__esDecorate as a,__runInitializers as o}from"tslib";import{action as n,computed as S,observable as y}from"mobx";let C=(()=>{let s=[],d,p=[],u=[],h,m=[],f=[],g,F,_;return class{static{const i=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;d=[y],h=[y],g=[n],F=[n],_=[n],a(this,null,g,{kind:"method",name:"setValue",static:!1,private:!1,access:{has:l=>"setValue"in l,get:l=>l.setValue},metadata:i},null,s),a(this,null,F,{kind:"method",name:"apply",static:!1,private:!1,access:{has:l=>"apply"in l,get:l=>l.apply},metadata:i},null,s),a(this,null,_,{kind:"method",name:"reset",static:!1,private:!1,access:{has:l=>"reset"in l,get:l=>l.reset},metadata:i},null,s),a(null,null,d,{kind:"field",name:"value",static:!1,private:!1,access:{has:l=>"value"in l,get:l=>l.value,set:(l,c)=>{l.value=c}},metadata:i},p,u),a(null,null,h,{kind:"field",name:"pending",static:!1,private:!1,access:{has:l=>"pending"in l,get:l=>l.pending,set:(l,c)=>{l.pending=c}},metadata:i},m,f),i&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:i})}value=(o(this,s),o(this,p,void 0));pending=(o(this,u),o(this,m,void 0));constructor(i){o(this,f),this.value=i,this.pending=i}setValue(i){this.pending=i}apply(){this.value=this.pending}reset(){this.pending=this.value}}})(),A=(()=>{let s=[],d,p=[],u=[],h,m,f,g,F,_,v,i,l,c,k;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;d=[y],h=[S],m=[n],f=[n],g=[n],F=[n],_=[n],v=[n],i=[n],l=[n],c=[n],k=[n],a(this,null,h,{kind:"getter",name:"activeFiltersCount",static:!1,private:!1,access:{has:e=>"activeFiltersCount"in e,get:e=>e.activeFiltersCount},metadata:t},null,s),a(this,null,m,{kind:"method",name:"applyFilters",static:!1,private:!1,access:{has:e=>"applyFilters"in e,get:e=>e.applyFilters},metadata:t},null,s),a(this,null,f,{kind:"method",name:"resetFilters",static:!1,private:!1,access:{has:e=>"resetFilters"in e,get:e=>e.resetFilters},metadata:t},null,s),a(this,null,g,{kind:"method",name:"resetAndApplyFilters",static:!1,private:!1,access:{has:e=>"resetAndApplyFilters"in e,get:e=>e.resetAndApplyFilters},metadata:t},null,s),a(this,null,F,{kind:"method",name:"clearAllFilters",static:!1,private:!1,access:{has:e=>"clearAllFilters"in e,get:e=>e.clearAllFilters},metadata:t},null,s),a(this,null,_,{kind:"method",name:"openFilter",static:!1,private:!1,access:{has:e=>"openFilter"in e,get:e=>e.openFilter},metadata:t},null,s),a(this,null,v,{kind:"method",name:"closeFilter",static:!1,private:!1,access:{has:e=>"closeFilter"in e,get:e=>e.closeFilter},metadata:t},null,s),a(this,null,i,{kind:"method",name:"openFilterWithSections",static:!1,private:!1,access:{has:e=>"openFilterWithSections"in e,get:e=>e.openFilterWithSections},metadata:t},null,s),a(this,null,l,{kind:"method",name:"setPending",static:!1,private:!1,access:{has:e=>"setPending"in e,get:e=>e.setPending},metadata:t},null,s),a(this,null,c,{kind:"method",name:"toggleCompanyFilter",static:!1,private:!1,access:{has:e=>"toggleCompanyFilter"in e,get:e=>e.toggleCompanyFilter},metadata:t},null,s),a(this,null,k,{kind:"method",name:"toggleJobTitleFilter",static:!1,private:!1,access:{has:e=>"toggleJobTitleFilter"in e,get:e=>e.toggleJobTitleFilter},metadata:t},null,s),a(null,null,d,{kind:"field",name:"state",static:!1,private:!1,access:{has:e=>"state"in e,get:e=>e.state,set:(e,r)=>{e.state=r}},metadata:t},p,u),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=o(this,s);state=o(this,p,{isOpen:!1,filters:{selectedCompanies:new C([]),selectedJobTitles:new C([])},visibleSections:["companies","jobTitles"]});constructor(t){o(this,u),this.rootStore=t}get activeFiltersCount(){let t=0;const{filters:e}=this.state;return e.selectedCompanies.value.length>0&&t++,e.selectedJobTitles.value.length>0&&t++,t}applyFilters(){const{filters:t}=this.state;t.selectedCompanies.apply(),t.selectedJobTitles.apply(),this.closeFilter()}resetFilters(){const{filters:t}=this.state;t.selectedCompanies.pending=[],t.selectedJobTitles.pending=[]}resetAndApplyFilters(){this.resetFilters(),this.applyFilters()}clearAllFilters(){const{filters:t}=this.state;t.selectedCompanies.pending=[],t.selectedJobTitles.pending=[],t.selectedCompanies.value=[],t.selectedJobTitles.value=[]}openFilter(){this.state.isOpen=!0}closeFilter(){this.state.isOpen=!1}openFilterWithSections(t){this.state.visibleSections=t,this.openFilter()}setPending(t,e){this.state.filters[t].setValue(e)}toggleCompanyFilter(t){const{selectedCompanies:e}=this.state.filters,r=e.value;r.includes(t)?e.setValue(r.filter(b=>b!==t)):e.setValue([...r,t])}toggleJobTitleFilter(t){const{selectedJobTitles:e}=this.state.filters,r=e.value;r.includes(t)?e.setValue(r.filter(b=>b!==t)):e.setValue([...r,t])}getDefaultValues(){return{selectedCompanies:[],selectedJobTitles:[]}}}})();export default A;
1
+ import{__decorate as t}from"tslib";import{action as l,computed as c,observable as n}from"mobx";class r{constructor(e){this.value=e,this.pending=e}setValue(e){this.pending=e}apply(){this.value=this.pending}reset(){this.pending=this.value}}t([n],r.prototype,"value",void 0),t([n],r.prototype,"pending",void 0),t([l],r.prototype,"setValue",null),t([l],r.prototype,"apply",null),t([l],r.prototype,"reset",null);export default class s{constructor(e){this.state={isOpen:!1,filters:{selectedCompanies:new r([]),selectedJobTitles:new r([])},visibleSections:["companies","jobTitles"]},this.rootStore=e}get activeFiltersCount(){let e=0;const{filters:i}=this.state;return i.selectedCompanies.value.length>0&&e++,i.selectedJobTitles.value.length>0&&e++,e}applyFilters(){const{filters:e}=this.state;e.selectedCompanies.apply(),e.selectedJobTitles.apply(),this.closeFilter()}resetFilters(){const{filters:e}=this.state;e.selectedCompanies.pending=[],e.selectedJobTitles.pending=[]}resetAndApplyFilters(){this.resetFilters(),this.applyFilters()}clearAllFilters(){const{filters:e}=this.state;e.selectedCompanies.pending=[],e.selectedJobTitles.pending=[],e.selectedCompanies.value=[],e.selectedJobTitles.value=[]}openFilter(){this.state.isOpen=!0}closeFilter(){this.state.isOpen=!1}openFilterWithSections(e){this.state.visibleSections=e,this.openFilter()}setPending(e,i){this.state.filters[e].setValue(i)}toggleCompanyFilter(e){const{selectedCompanies:i}=this.state.filters,o=i.value;o.includes(e)?i.setValue(o.filter(p=>p!==e)):i.setValue([...o,e])}toggleJobTitleFilter(e){const{selectedJobTitles:i}=this.state.filters,o=i.value;o.includes(e)?i.setValue(o.filter(p=>p!==e)):i.setValue([...o,e])}getDefaultValues(){return{selectedCompanies:[],selectedJobTitles:[]}}}t([n],s.prototype,"state",void 0),t([c],s.prototype,"activeFiltersCount",null),t([l],s.prototype,"applyFilters",null),t([l],s.prototype,"resetFilters",null),t([l],s.prototype,"resetAndApplyFilters",null),t([l],s.prototype,"clearAllFilters",null),t([l],s.prototype,"openFilter",null),t([l],s.prototype,"closeFilter",null),t([l],s.prototype,"openFilterWithSections",null),t([l],s.prototype,"setPending",null),t([l],s.prototype,"toggleCompanyFilter",null),t([l],s.prototype,"toggleJobTitleFilter",null);
@@ -8,12 +8,12 @@ export declare class SpeakerItem {
8
8
  readonly jobTitle: string;
9
9
  readonly photoFile?: string | undefined;
10
10
  readonly entity: {
11
- readonly type: "speaker";
11
+ readonly type: 'speaker';
12
12
  };
13
13
  readonly slug: string;
14
14
  bookmarked: boolean;
15
15
  constructor(id: number, externalId: string, name: string, company: string, jobTitle: string, photoFile?: string | undefined, entity?: {
16
- readonly type: "speaker";
16
+ readonly type: 'speaker';
17
17
  });
18
18
  get displayName(): string;
19
19
  get fullTitle(): string;
@@ -1 +1 @@
1
- import{__esDecorate as i,__runInitializers as p}from"tslib";import{action as b,computed as S,observable as g}from"mobx";import{generateUniqueSlug as v}from"../tools/slug";let y=(()=>{let r,n=[],c=[];return class{static{const a=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;r=[g],i(null,null,r,{kind:"field",name:"bookmarked",static:!1,private:!1,access:{has:s=>"bookmarked"in s,get:s=>s.bookmarked,set:(s,l)=>{s.bookmarked=l}},metadata:a},n,c),a&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:a})}id;externalId;name;company;jobTitle;photoFile;entity;slug;bookmarked=p(this,n,!1);constructor(a,s,l,m,k,u,h={type:"speaker"}){p(this,c),this.id=a,this.externalId=s,this.name=l,this.company=m,this.jobTitle=k,this.photoFile=u,this.entity=h,this.slug=v(l||`speaker-${a}`)}get displayName(){return this.name}get fullTitle(){const a=[this.name];return this.jobTitle&&a.push(this.jobTitle),this.company&&a.push(this.company),a.join(" - ")}get hasPhoto(){return!!this.photoFile}get hasCompany(){return!!this.company}get hasJobTitle(){return!!this.jobTitle}}})();export{y as SpeakerItem};let j=(()=>{let r=[],n,c=[],f=[],a,s,l,m,k,u,h;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;n=[g],a=[S],s=[S],l=[S],m=[b],k=[S],u=[b],h=[b],i(this,null,a,{kind:"getter",name:"speakers",static:!1,private:!1,access:{has:e=>"speakers"in e,get:e=>e.speakers},metadata:t},null,r),i(this,null,s,{kind:"getter",name:"companies",static:!1,private:!1,access:{has:e=>"companies"in e,get:e=>e.companies},metadata:t},null,r),i(this,null,l,{kind:"getter",name:"jobTitles",static:!1,private:!1,access:{has:e=>"jobTitles"in e,get:e=>e.jobTitles},metadata:t},null,r),i(this,null,m,{kind:"method",name:"selectSpeaker",static:!1,private:!1,access:{has:e=>"selectSpeaker"in e,get:e=>e.selectSpeaker},metadata:t},null,r),i(this,null,k,{kind:"getter",name:"bookmarked",static:!1,private:!1,access:{has:e=>"bookmarked"in e,get:e=>e.bookmarked},metadata:t},null,r),i(this,null,u,{kind:"method",name:"replaceBookmarked",static:!1,private:!1,access:{has:e=>"replaceBookmarked"in e,get:e=>e.replaceBookmarked},metadata:t},null,r),i(this,null,h,{kind:"method",name:"clearSelectedSpeaker",static:!1,private:!1,access:{has:e=>"clearSelectedSpeaker"in e,get:e=>e.clearSelectedSpeaker},metadata:t},null,r),i(null,null,n,{kind:"field",name:"selectedSpeaker",static:!1,private:!1,access:{has:e=>"selectedSpeaker"in e,get:e=>e.selectedSpeaker,set:(e,d)=>{e.selectedSpeaker=d}},metadata:t},c,f),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=p(this,r);speakersMap=new Map;selectedSpeaker=p(this,c,null);constructor(t){p(this,f),this.rootStore=t}get speakers(){return Array.from(this.speakersMap.values()).sort((t,e)=>t.name.localeCompare(e.name))}getSpeakerById(t){return this.speakersMap.get(t)}getSpeakerBySlug(t){return Array.from(this.speakersMap.values()).find(e=>e.slug===t)}addSpeaker(t){if(this.speakersMap.has(t.id))return this.speakersMap.get(t.id);const e=new y(t.id,t.externalId,t.name,t.company,t.jobTitle,t.photoFile);return this.speakersMap.set(t.id,e),e}get companies(){const t=new Set;return this.speakers.forEach(e=>{e.company&&t.add(e.company)}),Array.from(t).sort()}get jobTitles(){const t=new Set;return this.speakers.forEach(e=>{e.jobTitle&&t.add(e.jobTitle)}),Array.from(t).sort()}getSpeakersByCompany(t){return this.speakers.filter(e=>e.company===t)}getSpeakersByJobTitle(t){return this.speakers.filter(e=>e.jobTitle===t)}getEventsBySpeaker(t){return this.rootStore.eventStore.eventItems.filter(e=>e.speakers.some(d=>d.id===t))}findBySlug(t){return this.getSpeakerBySlug(t)}selectSpeaker(t,e=!0){this.selectedSpeaker=t,this.rootStore.uiState.details=t,this.rootStore.uiState.desiredOverlaySize="medium"}get bookmarked(){return this.speakers.filter(t=>t.bookmarked)}replaceBookmarked(t){const e=(t||[]).map(o=>this.speakersMap.get(o)).filter(o=>o),d=new Set(e),_=this.bookmarked.filter(o=>!d.has(o));for(const o of _)o.bookmarked=!1;for(const o of e)o.bookmarked=!0}clearSelectedSpeaker(){this.selectedSpeaker=null,this.rootStore.uiState.details=null}}})();export default j;
1
+ import{__decorate as o}from"tslib";import{action as l,computed as a,observable as n}from"mobx";import{generateUniqueSlug as c}from"../tools/slug";export class SpeakerItem{constructor(e,t,i,p,r,u,m={type:"speaker"}){this.id=e,this.externalId=t,this.name=i,this.company=p,this.jobTitle=r,this.photoFile=u,this.entity=m,this.bookmarked=!1,this.slug=c(i||`speaker-${e}`)}get displayName(){return this.name}get fullTitle(){const e=[this.name];return this.jobTitle&&e.push(this.jobTitle),this.company&&e.push(this.company),e.join(" - ")}get hasPhoto(){return!!this.photoFile}get hasCompany(){return!!this.company}get hasJobTitle(){return!!this.jobTitle}}o([n],SpeakerItem.prototype,"bookmarked",void 0);export default class s{constructor(e){this.speakersMap=new Map,this.selectedSpeaker=null,this.rootStore=e}get speakers(){return Array.from(this.speakersMap.values()).sort((e,t)=>e.name.localeCompare(t.name))}getSpeakerById(e){return this.speakersMap.get(e)}getSpeakerBySlug(e){return Array.from(this.speakersMap.values()).find(t=>t.slug===e)}addSpeaker(e){if(this.speakersMap.has(e.id))return this.speakersMap.get(e.id);const t=new SpeakerItem(e.id,e.externalId,e.name,e.company,e.jobTitle,e.photoFile);return this.speakersMap.set(e.id,t),t}get companies(){const e=new Set;return this.speakers.forEach(t=>{t.company&&e.add(t.company)}),Array.from(e).sort()}get jobTitles(){const e=new Set;return this.speakers.forEach(t=>{t.jobTitle&&e.add(t.jobTitle)}),Array.from(e).sort()}getSpeakersByCompany(e){return this.speakers.filter(t=>t.company===e)}getSpeakersByJobTitle(e){return this.speakers.filter(t=>t.jobTitle===e)}getEventsBySpeaker(e){return this.rootStore.eventStore.eventItems.filter(t=>t.speakers.some(i=>i.id===e))}findBySlug(e){return this.getSpeakerBySlug(e)}selectSpeaker(e,t=!0){this.selectedSpeaker=e,this.rootStore.uiState.details=e,this.rootStore.uiState.desiredOverlaySize="medium"}get bookmarked(){return this.speakers.filter(e=>e.bookmarked)}replaceBookmarked(e){const t=(e||[]).map(r=>this.speakersMap.get(r)).filter(r=>r),i=new Set(t),p=this.bookmarked.filter(r=>!i.has(r));for(const r of p)r.bookmarked=!1;for(const r of t)r.bookmarked=!0}clearSelectedSpeaker(){this.selectedSpeaker=null,this.rootStore.uiState.details=null}}o([n],s.prototype,"selectedSpeaker",void 0),o([a],s.prototype,"speakers",null),o([a],s.prototype,"companies",null),o([a],s.prototype,"jobTitles",null),o([l],s.prototype,"selectSpeaker",null),o([a],s.prototype,"bookmarked",null),o([l],s.prototype,"replaceBookmarked",null),o([l],s.prototype,"clearSelectedSpeaker",null);
@@ -1 +1 @@
1
- export class SubButtonRegistry{providers=new Map;cache=new Map;register(e){this.providers.set(e.id,e),this.cache.delete(e.id)}unregister(e){this.providers.delete(e),this.cache.delete(e)}getSubButtons(e){const t=this.providers.get(e);return t?t.createSubButtons():[]}handleSubButtonClick(e,t){const i=this.providers.get(e);i&&i.handleSubButtonClick(t)}shouldShowSubButtons(e){const t=this.providers.get(e);return t?t.shouldShowSubButtons?t.shouldShowSubButtons():!0:!1}invalidateCache(e){this.cache.delete(e);const t=this.providers.get(e);t?.invalidateCache&&t.invalidateCache()}invalidateAllCache(){this.cache.clear(),this.providers.forEach(e=>{e.invalidateCache&&e.invalidateCache()})}getRegisteredProviders(){return Array.from(this.providers.keys())}isProviderRegistered(e){return this.providers.has(e)}}
1
+ export class SubButtonRegistry{constructor(){this.providers=new Map,this.cache=new Map}register(e){this.providers.set(e.id,e),this.cache.delete(e.id)}unregister(e){this.providers.delete(e),this.cache.delete(e)}getSubButtons(e){const t=this.providers.get(e);return t?t.createSubButtons():[]}handleSubButtonClick(e,t){const i=this.providers.get(e);i&&i.handleSubButtonClick(t)}shouldShowSubButtons(e){const t=this.providers.get(e);return t?t.shouldShowSubButtons?t.shouldShowSubButtons():!0:!1}invalidateCache(e){this.cache.delete(e);const t=this.providers.get(e);t?.invalidateCache&&t.invalidateCache()}invalidateAllCache(){this.cache.clear(),this.providers.forEach(e=>{e.invalidateCache&&e.invalidateCache()})}getRegisteredProviders(){return Array.from(this.providers.keys())}isProviderRegistered(e){return this.providers.has(e)}}
@@ -1 +1 @@
1
- import{__esDecorate as e,__runInitializers as a}from"tslib";import{action as u,computed as n,observable as l}from"mobx";import c from"../data/tours.json";import D from"../tools/settings";const d=1;let j=(()=>{let o=[],h,f=[],T=[],p,m=[],y=[],_,g=[],S=[],v,E=[],L=[],I,x,A,P,w,b,k,z;return class{static{const r=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;h=[l],p=[l],_=[l],v=[l],I=[u],x=[u],A=[n],P=[n],w=[n],b=[n],k=[u],z=[u],e(this,null,I,{kind:"method",name:"loadTours",static:!1,private:!1,access:{has:t=>"loadTours"in t,get:t=>t.loadTours},metadata:r},null,o),e(this,null,x,{kind:"method",name:"resetTours",static:!1,private:!1,access:{has:t=>"resetTours"in t,get:t=>t.resetTours},metadata:r},null,o),e(this,null,A,{kind:"getter",name:"tourItems",static:!1,private:!1,access:{has:t=>"tourItems"in t,get:t=>t.tourItems},metadata:r},null,o),e(this,null,P,{kind:"getter",name:"currentTour",static:!1,private:!1,access:{has:t=>"currentTour"in t,get:t=>t.currentTour},metadata:r},null,o),e(this,null,w,{kind:"getter",name:"isActive",static:!1,private:!1,access:{has:t=>"isActive"in t,get:t=>t.isActive},metadata:r},null,o),e(this,null,b,{kind:"getter",name:"tourLayers",static:!1,private:!1,access:{has:t=>"tourLayers"in t,get:t=>t.tourLayers},metadata:r},null,o),e(this,null,k,{kind:"method",name:"launchTour",static:!1,private:!1,access:{has:t=>"launchTour"in t,get:t=>t.launchTour},metadata:r},null,o),e(this,null,z,{kind:"method",name:"stopTour",static:!1,private:!1,access:{has:t=>"stopTour"in t,get:t=>t.stopTour},metadata:r},null,o),e(null,null,h,{kind:"field",name:"tours",static:!1,private:!1,access:{has:t=>"tours"in t,get:t=>t.tours,set:(t,s)=>{t.tours=s}},metadata:r},f,T),e(null,null,p,{kind:"field",name:"currentExpo",static:!1,private:!1,access:{has:t=>"currentExpo"in t,get:t=>t.currentExpo,set:(t,s)=>{t.currentExpo=s}},metadata:r},m,y),e(null,null,_,{kind:"field",name:"hasTours",static:!1,private:!1,access:{has:t=>"hasTours"in t,get:t=>t.hasTours,set:(t,s)=>{t.hasTours=s}},metadata:r},g,S),e(null,null,v,{kind:"field",name:"toursLoadError",static:!1,private:!1,access:{has:t=>"toursLoadError"in t,get:t=>t.toursLoadError,set:(t,s)=>{t.toursLoadError=s}},metadata:r},E,L),r&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r})}rootStore=a(this,o);tours=a(this,f,[]);currentExpo=(a(this,T),a(this,m,""));hasTours=(a(this,y),a(this,g,!1));toursLoadError=(a(this,S),a(this,E,null));constructor(r){a(this,L),this.rootStore=r,this.loadTours()}loadTours(){try{if(this.currentExpo=D.EXPO||"default",this.toursLoadError=null,!this.isValidToursData(c)){this.toursLoadError="Invalid tours data format",this.resetTours();return}const r=c[this.currentExpo]||[];if(!this.validateToursStructure(r)){this.toursLoadError="Invalid tour items structure",this.resetTours();return}this.tours=r,this.hasTours=r.length>0}catch(r){console.error("Error loading tours:",r),this.toursLoadError=r instanceof Error?r.message:"Failed to load tours",this.resetTours()}}resetTours(){this.tours=[],this.hasTours=!1}isValidToursData(r){return r!==null&&typeof r=="object"&&!Array.isArray(r)}validateToursStructure(r){return Array.isArray(r)?r.every(t=>t&&typeof t=="object"&&typeof t.id=="string"&&Array.isArray(t.layers)&&t.layers.length>=d&&(t.points===void 0||Array.isArray(t.points))):!1}get tourItems(){return this.tours}getTourById(r){return this.tours.find(t=>t.id===r)}getToursByPoint(r){return this.tours.filter(t=>t.points?.includes(r))}getToursForExpo(r){return this.isValidToursData(c)?c[r]||[]:[]}get currentTour(){const{list:r}=this.rootStore.uiState;return r.type!=="multi-point-tour"||!this.isMultiPointTourList(r)?null:this.getTourById(r.tourId)||null}isMultiPointTourList(r){return r.type==="multi-point-tour"&&typeof r.tourId=="string"}get isActive(){return this.rootStore.uiState.list.type==="multi-point-tour"}get tourLayers(){const r=this.currentTour;return r?r.layers.map(t=>this.rootStore.layerStore.findLayer(t.floor)).filter(t=>t!=null):[]}getTourLayerInfo(r){const t=this.currentTour;if(t)return t.layers.find(s=>{const i=this.rootStore.layerStore.findLayer(s.floor);return i&&(i.name===r||i.description===r)})}launchTour(r,t,s){const i=this.validateTourForLaunch(r);if(i)return console.warn(`Cannot launch tour: ${i}`),!1;const M=r.layers[0].id,O=r.layers[0].floor;return r.points&&r.points.length>0?this.rootStore.fp.showPathway(M,r.points):this.rootStore.fp.showPathwayOnly(M,O),this.rootStore.uiState.setTourTitle(t),this.rootStore.uiState.setTourDescription(s),this.rootStore.uiState.setIsMultiPointTour(!0),this.rootStore.uiState.setMultiPointTourList(r.id),window.setTimeout(()=>{this.rootStore.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50),!0}validateTourForLaunch(r){return r.layers.length<d?`Tour must have at least ${d} layer`:null}stopTour(){this.rootStore.uiState.setIsMultiPointTour(!1),this.rootStore.uiState.setPathwayOnlyMode(!1);const r=this.rootStore.uiState.list.type;(r==="tours"||r==="multi-point-tour")&&(this.rootStore.uiState.list={type:"search",text:"",focused:!1}),this.rootStore.fp.hidePathways()}}})();export default j;
1
+ import{__decorate as e}from"tslib";import{action as i,computed as u,observable as n}from"mobx";import a from"../data/tours.json";import y from"../tools/settings";const h=1;export default class o{constructor(t){this.tours=[],this.currentExpo="",this.hasTours=!1,this.toursLoadError=null,this.rootStore=t,this.loadTours()}loadTours(){try{if(this.currentExpo=y.EXPO||"default",this.toursLoadError=null,!this.isValidToursData(a)){this.toursLoadError="Invalid tours data format",this.resetTours();return}const t=a[this.currentExpo]||[];if(!this.validateToursStructure(t)){this.toursLoadError="Invalid tour items structure",this.resetTours();return}this.tours=t,this.hasTours=t.length>0}catch(t){console.error("Error loading tours:",t),this.toursLoadError=t instanceof Error?t.message:"Failed to load tours",this.resetTours()}}resetTours(){this.tours=[],this.hasTours=!1}isValidToursData(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}validateToursStructure(t){return Array.isArray(t)?t.every(r=>r&&typeof r=="object"&&typeof r.id=="string"&&Array.isArray(r.layers)&&r.layers.length>=h&&(r.points===void 0||Array.isArray(r.points))):!1}get tourItems(){return this.tours}getTourById(t){return this.tours.find(r=>r.id===t)}getToursByPoint(t){return this.tours.filter(r=>r.points?.includes(t))}getToursForExpo(t){return this.isValidToursData(a)?a[t]||[]:[]}get currentTour(){const{list:t}=this.rootStore.uiState;return t.type!=="multi-point-tour"||!this.isMultiPointTourList(t)?null:this.getTourById(t.tourId)||null}isMultiPointTourList(t){return t.type==="multi-point-tour"&&typeof t.tourId=="string"}get isActive(){return this.rootStore.uiState.list.type==="multi-point-tour"}get tourLayers(){const t=this.currentTour;return t?t.layers.map(r=>this.rootStore.layerStore.findLayer(r.floor)).filter(r=>r!=null):[]}getTourLayerInfo(t){const r=this.currentTour;if(r)return r.layers.find(l=>{const s=this.rootStore.layerStore.findLayer(l.floor);return s&&(s.name===t||s.description===t)})}launchTour(t,r,l){const s=this.validateTourForLaunch(t);if(s)return console.warn(`Cannot launch tour: ${s}`),!1;const p=t.layers[0].id,d=t.layers[0].floor;return t.points&&t.points.length>0?this.rootStore.fp.showPathway(p,t.points):this.rootStore.fp.showPathwayOnly(p,d),this.rootStore.uiState.setTourTitle(r),this.rootStore.uiState.setTourDescription(l),this.rootStore.uiState.setIsMultiPointTour(!0),this.rootStore.uiState.setMultiPointTourList(t.id),window.setTimeout(()=>{this.rootStore.showMap()},navigator.userAgent.toLowerCase().indexOf("android")>-1?400:50),!0}validateTourForLaunch(t){return t.layers.length<h?`Tour must have at least ${h} layer`:null}stopTour(){this.rootStore.uiState.setIsMultiPointTour(!1),this.rootStore.uiState.setPathwayOnlyMode(!1);const t=this.rootStore.uiState.list.type;(t==="tours"||t==="multi-point-tour")&&(this.rootStore.uiState.list={type:"search",text:"",focused:!1}),this.rootStore.fp.hidePathways()}}e([n],o.prototype,"tours",void 0),e([n],o.prototype,"currentExpo",void 0),e([n],o.prototype,"hasTours",void 0),e([n],o.prototype,"toursLoadError",void 0),e([i],o.prototype,"loadTours",null),e([i],o.prototype,"resetTours",null),e([u],o.prototype,"tourItems",null),e([u],o.prototype,"currentTour",null),e([u],o.prototype,"isActive",null),e([u],o.prototype,"tourLayers",null),e([i],o.prototype,"launchTour",null),e([i],o.prototype,"stopTour",null);
@@ -143,7 +143,7 @@ export default class UIState {
143
143
  get getRouteNextFloor(): string | null;
144
144
  get headerHeightRem(): number;
145
145
  get headerHeightPx(): number;
146
- get overlayPosition(): "left" | "bottom";
146
+ get overlayPosition(): "bottom" | "left";
147
147
  get overlayCollapsed(): false;
148
148
  get overlaySize(): OverlaySize;
149
149
  get overlayBottom(): boolean;
@@ -165,7 +165,7 @@ export default class UIState {
165
165
  get shouldShowMobileToggle(): boolean;
166
166
  get mobileToggleIsListMode(): boolean;
167
167
  get canvasVisibleRectPx(): Box;
168
- get shouldShiftMapRect(): false | Booth | Exhibitor | Route | Category | EventItem | SpeakerItem;
168
+ get shouldShiftMapRect(): false | Category | EventItem | Exhibitor | Route | SpeakerItem | Booth;
169
169
  get hasAppliedFilters(): boolean;
170
170
  get canvasVisibleRectPt(): Box;
171
171
  get canvasSizePt(): Point;
@@ -196,7 +196,6 @@ export default class UIState {
196
196
  get selectedEventItem(): EventItem | null;
197
197
  get defaultMapSettings(): MapSettings;
198
198
  mapSettings: MapSettings;
199
- saveMapSettings(settings: MapSettings): void;
200
199
  setMapSettings(settings: MapSettings): void;
201
200
  resetMapSettings(): void;
202
201
  get baseQRCodeUrl(): string;