@expofp/floorplan 3.2.8 → 3.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{CookieConsent-B1LE7YfT.js → CookieConsent-BtJXdP7g.js} +33 -36
- package/dist/browser/{Debug-DhDzWQYS.js → Debug-967-VpUy.js} +6 -6
- package/dist/browser/{Demo-D_175gLz.js → Demo-7QsDaZT4.js} +8 -8
- package/dist/browser/Free-DXK25Lwr.js +63 -0
- package/dist/browser/{Gallery-BA-pvWo8.js → Gallery-rpTD_EMy.js} +8 -8
- package/dist/browser/{GpsLoader-CfS8cpM_.js → GpsLoader-CdbJ6Wtv.js} +8 -8
- package/dist/browser/{KioskStore-D6ga9Qev.js → KioskStore-drksP-pK.js} +38 -19
- package/dist/browser/{Mapbox-B2UgukAw.js → Mapbox-CqJHsRDD.js} +8 -8
- package/dist/browser/{SetKioskMode-DN9dYtQq.js → SetKioskMode-kUSWKmn_.js} +7 -7
- package/dist/browser/{ShowKiosk-NOvinyaO.js → ShowKiosk-BljQrssJ.js} +9 -9
- package/dist/browser/{ThreeComponent-Dd6C-3ZE.js → ThreeComponent-BYyXNeiP.js} +9 -9
- package/dist/browser/{TouchHand-D4zCIp9f.js → TouchHand-B4WmBaw_.js} +4 -4
- package/dist/browser/{ViewerMenuPanel-3gfsNYAC.js → ViewerMenuPanel-Cu3ctunS.js} +7 -7
- package/dist/browser/{add-debug-secret-listener-PCn2L2xn.js → add-debug-secret-listener-C9qq9krt.js} +1 -1
- package/dist/browser/{boolean-editor-C62I7paI.js → boolean-editor-C-X2A7PC.js} +10 -10
- package/dist/browser/{bootIntercom-CJp5myUd.js → bootIntercom-CnRNCIYM.js} +2 -2
- package/dist/browser/{box-BllGyNzW.js → box-6xYctg-7.js} +5 -5
- package/dist/browser/{browser-hErw7TCJ.js → browser-ztEe8e12.js} +2 -2
- package/dist/browser/bundle.json +53 -53
- package/dist/browser/{classnames-DZ15rBvY.js → classnames-BxLiR1zN.js} +2 -2
- package/dist/browser/{client-vSscuHGN.js → client-Cgg5K8i7.js} +4 -4
- package/dist/browser/{data-Pg90oQgy.js → data-DAcHRYEQ.js} +3 -3
- package/dist/browser/{debug-overlay-Cz0LzO7B.js → debug-overlay-C8MMERKX.js} +11 -11
- package/dist/browser/{debug-ui-HOJ52C7W.js → debug-ui-DQkKWVux.js} +6 -6
- package/dist/browser/{dist-B-j5Mwk6.js → dist-CVgpYonr.js} +5 -5
- package/dist/browser/{dist-Di6V6Vgc.js → dist-DFeNakeq.js} +3 -3
- package/dist/browser/{dist-D1FyJZyA.js → dist-cNbRX4Ll.js} +6 -6
- package/dist/browser/{efp-debug-init-GJ1wnZRj.js → efp-debug-init-BkhFS-uf.js} +2 -2
- package/dist/browser/{enum-editor-DDYy1Hf6.js → enum-editor-Dp0vDvar.js} +11 -11
- package/dist/browser/{exports-D2FWPMfV.js → exports-BQCu1lRb.js} +1 -1
- package/dist/browser/{favicon-CLnUT7_M.js → favicon-BlZTadtt.js} +1 -1
- package/dist/browser/{fetch-retry.umd-CsTB0zFM.js → fetch-retry.umd-Ck1mU9F8.js} +2 -2
- package/dist/browser/{flex-fdrXlk1E.js → flex-BK0qbq1z.js} +6 -6
- package/dist/browser/{flex.props-CKl-laU4.js → flex.props-BOHhvtK7.js} +2 -2
- package/dist/browser/{floorplan.loader-B9u5roId.js → floorplan.loader-bF0m4B1-.js} +9 -9
- package/dist/browser/{floorplan.ready-DhqJ6xoZ.js → floorplan.ready-DO9giswS.js} +11 -11
- package/dist/browser/{fuse-BiPQjoVv.js → fuse-BtkF3kz5.js} +2 -2
- package/dist/browser/index.js +13 -13
- package/dist/browser/{is-debug-DatwRSE7.js → is-debug-opoXgip_.js} +3 -3
- package/dist/browser/{jsx-runtime-IE8skafD.js → jsx-runtime-CdGBYo41.js} +2 -2
- package/dist/browser/{lib-DeP5xNNM.js → lib-B8qB7TGp.js} +4 -4
- package/dist/browser/{main-DHo0y8hQ.js → main-D2sTc8dC.js} +1 -1
- package/dist/browser/{mobx-CrV9DCMJ.js → mobx-3HvxVp6t.js} +4 -4
- package/dist/browser/{particles.min-CvpZUl3e.js → particles.min-CrLYXoND.js} +2 -2
- package/dist/browser/{prop-types-BHwYgrUd.js → prop-types-8XbFXwqe.js} +2 -2
- package/dist/browser/{react-B3Fm-ZS0.js → react-bIVKZnR6.js} +2 -2
- package/dist/browser/{react-dom-CySklTOi.js → react-dom-8AX8CQeL.js} +3 -3
- package/dist/browser/{reset-all-settings-Cl74zGyE.js → reset-all-settings-Bqtagv1S.js} +7 -7
- package/dist/browser/{rolldown-runtime-BAuBEODA.js → rolldown-runtime-BTAldvAi.js} +1 -1
- package/dist/browser/{settings-BIgQOlLC.js → settings-i_-tNJvc.js} +2 -2
- package/dist/browser/{settings-item-CMHd9Vr7.js → settings-item-DZPmquvx.js} +6 -6
- package/dist/browser/{store-WG-XbhCX.js → store-Bb5KnC15.js} +121 -128
- package/dist/browser/{string-editor-Cdda3m3H.js → string-editor-B0Cpq_Js.js} +8 -8
- package/dist/browser/{theme-CEfCl0Wg.js → theme-BDV2utpr.js} +8 -8
- package/dist/browser/{ui-Cxw-zCCr.js → ui-DpEMbY0X.js} +8 -8
- package/dist/esm/components/Map/pointInConvexQuad.d.ts +3 -0
- package/dist/esm/components/Map/pointInConvexQuad.js +1 -0
- package/dist/esm/components/Map/visibleArea.d.ts +1 -0
- package/dist/esm/components/Map/visibleArea.js +1 -1
- package/dist/esm/load.js +1 -1
- package/dist/esm/store/RouteStore.js +1 -1
- package/dist/esm/wayfinding/adapters/boothToEndpoint.d.ts +2 -6
- package/dist/esm/wayfinding/adapters/boothToEndpoint.js +1 -1
- package/dist/esm/wayfinding/adapters/index.d.ts +0 -1
- package/dist/esm/wayfinding/adapters/index.js +1 -1
- package/dist/esm/wayfinding/bindMobxReactions.js +1 -1
- package/dist/esm/wayfinding/core/createWayfindingEngine.d.ts +3 -3
- package/dist/esm/wayfinding/core/geometry/pointInPolygon.d.ts +11 -0
- package/dist/esm/wayfinding/core/geometry/pointInPolygon.js +1 -0
- package/dist/esm/wayfinding/core/index.d.ts +1 -2
- package/dist/esm/wayfinding/core/index.js +1 -1
- package/dist/esm/wayfinding/core/position/snapToRoute.js +1 -1
- package/dist/esm/wayfinding/core/routing/findNearestGraphPoint.d.ts +5 -20
- package/dist/esm/wayfinding/core/routing/findNearestGraphPoint.js +1 -1
- package/dist/esm/wayfinding/core/routing/resolveWaypointCandidates.d.ts +3 -6
- package/dist/esm/wayfinding/core/routing/resolveWaypointCandidates.js +1 -1
- package/dist/esm/wayfinding/core/types.d.ts +9 -26
- package/dist/esm/wayfinding/runtime/createWayfindingRuntime.js +1 -1
- package/dist/esm/wayfinding/runtime/types.d.ts +1 -1
- package/package.json +3 -3
- package/dist/browser/Free-eF7PbjEi.js +0 -63
- package/dist/esm/wayfinding/adapters/boothToWaypoint.d.ts +0 -12
- package/dist/esm/wayfinding/adapters/boothToWaypoint.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{pickDefaultScenePoint as
|
|
1
|
+
import{pickDefaultScenePoint as x}from"../../renderer/engine-core/defs";import{isPointInConvexQuad as h}from"./pointInConvexQuad";export function getVisibleArea(t){const o=x(t.viewport.canvasToSvg({x:0,y:0})),i=x(t.viewport.canvasToSvg({x:t.canvas.clientWidth,y:0})),n=x(t.viewport.canvasToSvg({x:0,y:t.canvas.clientHeight})),a=x(t.viewport.canvasToSvg({x:t.canvas.clientWidth,y:t.canvas.clientHeight})),c=Math.min(o.x,i.x,n.x,a.x),v=Math.max(o.x,i.x,n.x,a.x),s=Math.min(o.y,i.y,n.y,a.y),m=Math.max(o.y,i.y,n.y,a.y);return{x:c,y:s,width:v-c,height:m-s,left:c,right:v,top:m,bottom:s,center:{x:(c+v)/2,y:(s+m)/2},corners:[o,i,a,n]}}export function isPointVisible(t,o){return h(o,getVisibleArea(t).corners)}
|
package/dist/esm/load.js
CHANGED
|
@@ -53,4 +53,4 @@ import"./utils/silence-mobx-react-lite-warning";import{resolve as c}from"@expofp
|
|
|
53
53
|
<svg viewBox="25 25 50 50">
|
|
54
54
|
<circle r="20" cy="50" cx="50"></circle>
|
|
55
55
|
</svg>
|
|
56
|
-
</div>`,requestAnimationFrame(()=>{
|
|
56
|
+
</div>`,requestAnimationFrame(()=>{a.querySelector(`.${t}`)?.style.setProperty("opacity","1")})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__esDecorate as i,__runInitializers as r}from"tslib";import{action as m,computed as x,observable as d}from"mobx";import{Point as Ke,lineLength as Ge}from"simple-geometry";import n,{boothStore as Xe,layersStore as T}from".";import{fpGeo as E}from"../data/fpGeo";import z from"../core/Rect";import{GaEventActions as He,sendEventToGa as Je}from"../tools/gtag";import{convertGpsToLocal as Oe,isValidPointCoords as Ue,calculateRelativeBearing as Qe}from"../utils/gps";import{getLayerSvg as et,svgArea as k}from"../data/svg";import{createWayfindingEngine as tt}from"../wayfinding/core";import{boothToWaypoint as Ne,graphDataSource as Ze}from"../wayfinding/adapters";import{LayersMode as st}from"./LayerStore";import{uiState as g}from"./index";import{calcSpeed as qe}from"../utils/calcSpeed";import{calcTravelTime as $e}from"../utils/calcTravelTime";import{DEFAULT_UNITS as Ve,ORIENTATION_GRANTED_KEY as at}from"../constants";import{areLayersEnabled as it}from"../utils/areLayersEnabled";import{shouldReroute as rt}from"../wayfinding/core";import{findBoothInRadius as nt}from"../wayfinding/utils/findBoothInRadius";import We from"../data";import je from"../tools/logger";const b=a=>typeof a=="string"?Number(a.replace(",",".")):a;let ot=(()=>{let a=[],o,l=[],f=[],h,S=[],L=[],P,D=[],I=[],w,A=[],M=[],C,B=[],F=[],G,O=[],U=[],N,Z=[],q=[],$,V=[],W=[],j,Y=[],K=[],X,H=[],J=[],Q,ee=[],te=[],se,ae=[],ie=[],re,ne=[],oe=[],le,ce=[],ue=[],de,fe,me,he,pe,_e,ye,ge,ke,be,ve,xe,Re,Se=[],Le=[],Te,Ee,ze,Pe,De,Ie,we=[],Ae=[],Me,Ce,Be;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;o=[d],h=[d],P=[d],w=[d],C=[d],G=[d],N=[d],$=[d],j=[d],X=[d],Q=[d],se=[d],re=[d],le=[d],de=[x],fe=[m],me=[m],he=[x({keepAlive:!0})],pe=[x({keepAlive:!0})],_e=[m],ye=[m],ge=[x({keepAlive:!0})],ke=[x({keepAlive:!0})],be=[m],ve=[m],xe=[m],Re=[d],Te=[x],Ee=[m],ze=[m],Pe=[m],De=[m],Ie=[d],Me=[m],Ce=[x({keepAlive:!0})],Be=[m],i(this,null,de,{kind:"getter",name:"canFindLocation",static:!1,private:!1,access:{has:e=>"canFindLocation"in e,get:e=>e.canFindLocation},metadata:t},null,a),i(this,null,fe,{kind:"method",name:"selectRoute",static:!1,private:!1,access:{has:e=>"selectRoute"in e,get:e=>e.selectRoute},metadata:t},null,a),i(this,null,me,{kind:"method",name:"setStartPoint",static:!1,private:!1,access:{has:e=>"setStartPoint"in e,get:e=>e.setStartPoint},metadata:t},null,a),i(this,null,he,{kind:"getter",name:"pathLayers",static:!1,private:!1,access:{has:e=>"pathLayers"in e,get:e=>e.pathLayers},metadata:t},null,a),i(this,null,pe,{kind:"getter",name:"nearestBooth",static:!1,private:!1,access:{has:e=>"nearestBooth"in e,get:e=>e.nearestBooth},metadata:t},null,a),i(this,null,_e,{kind:"method",name:"setMarkers",static:!1,private:!1,access:{has:e=>"setMarkers"in e,get:e=>e.setMarkers},metadata:t},null,a),i(this,null,ye,{kind:"method",name:"selectMarker",static:!1,private:!1,access:{has:e=>"selectMarker"in e,get:e=>e.selectMarker},metadata:t},null,a),i(this,null,ge,{kind:"getter",name:"selectedMarkers",static:!1,private:!1,access:{has:e=>"selectedMarkers"in e,get:e=>e.selectedMarkers},metadata:t},null,a),i(this,null,ke,{kind:"getter",name:"layers",static:!1,private:!1,access:{has:e=>"layers"in e,get:e=>e.layers},metadata:t},null,a),i(this,null,be,{kind:"method",name:"clickRoute",static:!1,private:!1,access:{has:e=>"clickRoute"in e,get:e=>e.clickRoute},metadata:t},null,a),i(this,null,ve,{kind:"method",name:"selectCurrentPosition",static:!1,private:!1,access:{has:e=>"selectCurrentPosition"in e,get:e=>e.selectCurrentPosition},metadata:t},null,a),i(this,null,xe,{kind:"method",name:"findLocation",static:!1,private:!1,access:{has:e=>"findLocation"in e,get:e=>e.findLocation},metadata:t},null,a),i(this,null,Te,{kind:"getter",name:"routeInfo",static:!1,private:!1,access:{has:e=>"routeInfo"in e,get:e=>e.routeInfo},metadata:t},null,a),i(this,null,Ee,{kind:"method",name:"updateRoute",static:!1,private:!1,access:{has:e=>"updateRoute"in e,get:e=>e.updateRoute},metadata:t},null,a),i(this,null,ze,{kind:"method",name:"updateRouteDistance",static:!1,private:!1,access:{has:e=>"updateRouteDistance"in e,get:e=>e.updateRouteDistance},metadata:t},null,a),i(this,null,Pe,{kind:"method",name:"updateRoutePoints",static:!1,private:!1,access:{has:e=>"updateRoutePoints"in e,get:e=>e.updateRoutePoints},metadata:t},null,a),i(this,null,De,{kind:"method",name:"checkRoutes",static:!1,private:!1,access:{has:e=>"checkRoutes"in e,get:e=>e.checkRoutes},metadata:t},null,a),i(this,null,Me,{kind:"method",name:"setGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"setGpsTrackingEnabled"in e,get:e=>e.setGpsTrackingEnabled},metadata:t},null,a),i(this,null,Ce,{kind:"getter",name:"gpsEnabled",static:!1,private:!1,access:{has:e=>"gpsEnabled"in e,get:e=>e.gpsEnabled},metadata:t},null,a),i(this,null,Be,{kind:"method",name:"setOnlyAccessible",static:!1,private:!1,access:{has:e=>"setOnlyAccessible"in e,get:e=>e.setOnlyAccessible},metadata:t},null,a),i(null,null,o,{kind:"field",name:"routeLines",static:!1,private:!1,access:{has:e=>"routeLines"in e,get:e=>e.routeLines,set:(e,s)=>{e.routeLines=s}},metadata:t},l,f),i(null,null,h,{kind:"field",name:"routeDistance",static:!1,private:!1,access:{has:e=>"routeDistance"in e,get:e=>e.routeDistance,set:(e,s)=>{e.routeDistance=s}},metadata:t},S,L),i(null,null,P,{kind:"field",name:"currentPosition",static:!1,private:!1,access:{has:e=>"currentPosition"in e,get:e=>e.currentPosition,set:(e,s)=>{e.currentPosition=s}},metadata:t},D,I),i(null,null,w,{kind:"field",name:"requestCompass",static:!1,private:!1,access:{has:e=>"requestCompass"in e,get:e=>e.requestCompass,set:(e,s)=>{e.requestCompass=s}},metadata:t},A,M),i(null,null,C,{kind:"field",name:"iconType",static:!1,private:!1,access:{has:e=>"iconType"in e,get:e=>e.iconType,set:(e,s)=>{e.iconType=s}},metadata:t},B,F),i(null,null,G,{kind:"field",name:"tempToBooth",static:!1,private:!1,access:{has:e=>"tempToBooth"in e,get:e=>e.tempToBooth,set:(e,s)=>{e.tempToBooth=s}},metadata:t},O,U),i(null,null,N,{kind:"field",name:"defaultFrom",static:!1,private:!1,access:{has:e=>"defaultFrom"in e,get:e=>e.defaultFrom,set:(e,s)=>{e.defaultFrom=s}},metadata:t},Z,q),i(null,null,$,{kind:"field",name:"focusEnabled",static:!1,private:!1,access:{has:e=>"focusEnabled"in e,get:e=>e.focusEnabled,set:(e,s)=>{e.focusEnabled=s}},metadata:t},V,W),i(null,null,j,{kind:"field",name:"prevZ",static:!1,private:!1,access:{has:e=>"prevZ"in e,get:e=>e.prevZ,set:(e,s)=>{e.prevZ=s}},metadata:t},Y,K),i(null,null,X,{kind:"field",name:"markersData",static:!1,private:!1,access:{has:e=>"markersData"in e,get:e=>e.markersData,set:(e,s)=>{e.markersData=s}},metadata:t},H,J),i(null,null,Q,{kind:"field",name:"prevMarkers",static:!1,private:!1,access:{has:e=>"prevMarkers"in e,get:e=>e.prevMarkers,set:(e,s)=>{e.prevMarkers=s}},metadata:t},ee,te),i(null,null,se,{kind:"field",name:"showAccessible",static:!1,private:!1,access:{has:e=>"showAccessible"in e,get:e=>e.showAccessible,set:(e,s)=>{e.showAccessible=s}},metadata:t},ae,ie),i(null,null,re,{kind:"field",name:"onlyAccessible",static:!1,private:!1,access:{has:e=>"onlyAccessible"in e,get:e=>e.onlyAccessible,set:(e,s)=>{e.onlyAccessible=s}},metadata:t},ne,oe),i(null,null,le,{kind:"field",name:"currentRouteLayer",static:!1,private:!1,access:{has:e=>"currentRouteLayer"in e,get:e=>e.currentRouteLayer,set:(e,s)=>{e.currentRouteLayer=s}},metadata:t},ce,ue),i(null,null,Re,{kind:"field",name:"routeUnits",static:!1,private:!1,access:{has:e=>"routeUnits"in e,get:e=>e.routeUnits,set:(e,s)=>{e.routeUnits=s}},metadata:t},Se,Le),i(null,null,Ie,{kind:"field",name:"isGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"isGpsTrackingEnabled"in e,get:e=>e.isGpsTrackingEnabled,set:(e,s)=>{e.isGpsTrackingEnabled=s}},metadata:t},we,Ae),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=r(this,a);cpTimeout;routeLines=r(this,l,[]);routeDistance=(r(this,f),r(this,S,null));currentPosition=(r(this,L),r(this,D,null));requestCompass=(r(this,I),r(this,A,!1));iconType=(r(this,M),r(this,B,0));tempToBooth=(r(this,F),r(this,O,null));defaultFrom=(r(this,U),r(this,Z,null));focusEnabled=(r(this,q),r(this,V,!0));prevZ=(r(this,W),r(this,Y,null));markersData=(r(this,K),r(this,H,{icons:[],markers:[]}));prevMarkers=(r(this,J),r(this,ee,[]));showAccessible=(r(this,te),r(this,ae,!!Ze.getLines().find(t=>t.unaccessible)));onlyAccessible=(r(this,ie),r(this,ne,!1));currentRouteLayer=(r(this,oe),r(this,ce,null));constructor(t){r(this,Ae),this.rootStore=t,this.focusEnabled=!window.location.search}get canFindLocation(){return!!this.defaultFrom||!!this.currentPosition}selectRoute(t,e=!0){e&&(g.list={type:"search",text:"",focused:!1}),!t?.from&&t?.to&&this.currentPosition&&(t.from=this.nearestBooth),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?.visible&&s.push(t.from),t?.to?.visible&&(this.tempToBooth=null,s.push(t.to)),!t&&n.fp.onDirection&&n.fp.onDirection(null),setTimeout(()=>{this.rootStore.moveToList(s),g.details=t,t&&(!t.from||!t.to)&&n.showOverlay(),t?.to&&t?.from?.layer&&this.rootStore.layerStore.updateVisibility(t.from.layer,!0),!this.currentRouteLayer&&t?.from?.layer&&(this.currentRouteLayer=t?.from?.layer),e&&t?.from&&t?.to&&Je(He.ClickDirections,`${t?.from?"From "+t.from.name:""} ${t?.to?"To "+t.to.name:""}`)},200)}setStartPoint(t){const e=g.selectedRoute;if(e?.to&&!e?.from&&t){const s=new Route(t,e.to,e.waypoints);this.selectRoute(s)}}get pathLayers(){return n.routeStore.routeLines?.map(t=>t.p0.layer)?.filter((t,e,s)=>s.indexOf(t)===e).reverse().map((t,e)=>({id:e+1,layer:n.layerStore.findLayer(t)}))}get nearestBooth(){return this.getNearestBooth(this.currentPosition)}getNearestBooth(t){if(!t)return null;let e=this.rootStore.layerStore.findLayer(t.z);const s=t.lat&&t.lng?Oe(t,E.properties.config):t;return this.rootStore.boothStore.booths.filter(c=>T.mode===st.Default||!e?c.visible&&c.rect:c.rect&&(typeof t.z!="number"&&!t.z&&c.visible||e.name===c.layer?.name)).sort((c,u)=>Ge(s,{x:c.rect.cx,y:c.rect.cy})-Ge(s,{x:u.rect.cx,y:u.rect.cy}))[0]||null}setMarkers(t){this.markersData.markers=(t?.markers??[]).map(lt),this.markersData.icons=t?.icons??[]}selectMarker(t,e){const s=this.markersData.markers.find(u=>u.id===t);this.markersData.markers.forEach(u=>u.active=!1),s&&(s.active=!0);let c=n.layerStore.findLayer(s?.z);if(e&&s){const u=n.rendererService.renderer;return c&&!c?.visible&&T.updateVisibility(c,!0),u?u.controls.panTo(s.x,s.y):(je.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 n.routeStore.routeLines?.map(e=>e.p0.layer).reverse().forEach(e=>{t.indexOf(e)===-1&&t.push(e)}),t.map(e=>n.layerStore.layers.find(s=>s.name===e))}clickRoute(t,e){window.__resett&&window.__resett(),this.rootStore.uiState.menu=null,g.list.type==="route-planner"&&(g.list={type:"search",text:"",focused:!1}),this.selectRoute(new Route(this.defaultFrom||t,e))}selectCurrentPosition(t,e=!0,s){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 c=e&&this.rootStore.uiState.details&&!(this.rootStore.uiState.details instanceof Route),u=e&&!c&&(this.focusEnabled||this.prevZ!=t?.z);this.focusEnabled&&(this.focusEnabled=!1),this.prevZ=t?.z?.toString(),this.iconType=s?1:0;const _=t?ct(t):null;if(!_){this.currentPosition=null;return}const p=n.layerStore.findLayer(t.z),y=new CurrentPosition(_.x,_.y,p?.name||this.currentRouteLayer?.name,Qe(_),t.lat,t.lng),R=g.selectedRoute;let Fe=!this.routeLines?.length;if(p&&this.routeLines?.length&&(Fe=!!this.routeLines.find(v=>v.p0.layer===p.name||v.p1.layer===p.name)),u&&Fe){const v=n.rendererService.renderer;if(p&&!p?.visible&&T.updateVisibility(p,!0),!v){je.warn("Renderer is not initialized. Cannot pan to current position.");return}v.controls.panTo(y.x,y.y)}const Ye=E?.properties?.config?.enableExperimentalRerouting&&rt(y,this.routeLines)&&!!nt(y,Xe.booths,[R?.to]);if(e&&R&&Ye){const v=n.routeStore.getNearestBooth(y);n.routeStore.selectRoute(new Route(v,R?.to),!1)}this.currentPosition=y,this.gpsEnabled||(this.cpTimeout=setTimeout(()=>{this.currentPosition&&this.selectCurrentPosition(null,!1)},30*1e3))}findLocation(){if(this.canFindLocation){if(n.mapboxStore.showMapbox){g.moveToLocation=!0;return}if(n.routeStore.currentPosition){const t=n.routeStore.currentPosition,e=z.fromCxcywh(t.x,t.y,100,100);let s;if(e.intersects(k))s=e;else{const _=Math.max(k.x1,Math.min(t.x,k.x2)),p=Math.max(k.y1,Math.min(t.y,k.y2)),y=Math.min(k.w,k.h)*.3,R=z.fromCxcywh(_,p,y,y).getIntersection(k);s=z.fromMultiple([e,R])}localStorage.getItem(at)==="false"&&(n.routeStore.requestCompass=!0),g.moveToRect=s;const u=n.layerStore.findLayer(n.routeStore.currentPosition?.z);u&&T.updateVisibility(u,!0)}else n.selectBooth(n.routeStore.defaultFrom)}}routeUnits=(r(this,ue),r(this,Se,Ve));get routeInfo(){const t=this.routeDistance,e=this.routeUnits;return t?{distance:`${t}${e}`,units:e,time:$e(t,qe(e))}:null}updateRoute(t,e){!t?.length&&!this.routeLines.length||(this.routeLines=t,this.updateRoutePoints())}updateRouteDistance(t){if(t==null)return;const e=et(),s=(e.getAttribute("units")||Ve).toLowerCase?.().trim(),c=e.getAttribute("fp-ver")?.startsWith("5")??!1;this.routeDistance=Math.round(t/(c?1:10)),this.routeUnits=s,this.updateRoutePoints()}updateRoutePoints(){const t=g.selectedRoute,e=this.routeDistance,s=this.routeUnits;n.fp.onDirection&&setTimeout(()=>{n.fp.onDirection({from:t?.from?{id:t.from.id,name:t.from.name,externalId:t.from.externalId,layer:{name:t.from?.layer?.name,description:t.from?.layer?.description}}:null,to:t?.to?{id:t.to.id,name:t.to.name,externalId:t.to.externalId,layer:{name:t.to.layer?.name,description:t.to.layer?.description}}:null,lines:this.routeLines,distance:`${e}${s}`,units:s,time:$e(e,qe(s))})},200)}checkRoutes(){const t=tt(Ze),e=n.boothStore.booths;console.info(`Route check started ${e.length}.... `);for(let s=0;s<e.length;s++){const c=e[s];for(let u=s+1;u<e.length;u++){const _=e[u];t.buildRoute(Ne(c),Ne(_)).lines.length||console.warn(`No route found from ${c.name} to ${_.name}`)}}console.info("Route check done....")}isGpsTrackingEnabled=(r(this,Le),r(this,we,!0));setGpsTrackingEnabled(t){this.isGpsTrackingEnabled=t}get gpsEnabled(){return We.autoTrackingGps&&this.isGpsTrackingEnabled&&!We.enableIPS}setOnlyAccessible(t){this.onlyAccessible=t}}})();export default ot;function lt(a){return{...a,x:b(a.x),y:b(a.y),lat:b(a.lat),lng:b(a.lng)}}function ct(a){let o=null,l=null;return E&&(o=E.properties.config),o&&a.x>=o.p0.x&&a.x<=o.p2.x&&a.y>=o.p0.y&&a.y<=o.p2.y?l={...a}:o&&Ue(a.lat)&&Ue(a.lng)?l=Oe(a,o):o||(l=a),l||null}export function findBooth(a){return n.boothStore.findBooth(a)||n.exhibitorStore.findExhibitor(a)?.booths[0]}export function findEntityByExternalId(a){const o=n.boothStore.boothByExternalId.get(a);if(o)return{type:"booth",entity:o};const l=n.exhibitorStore.exhibitorByExternalId.get(a);if(l)return{type:"exhibitor",entity:l}}export function separateExternalIds(a){const o=[],l=[];for(const f of a){const h=findEntityByExternalId(f);h&&(h.type==="booth"?o.push(f):l.push(f))}return{boothExternalIds:o,exhibitorExternalIds:l}}export function extractRoute(a,o,l){return new Route(findBooth(a)??n.routeStore.defaultFrom??null,findBooth(o),l?.map(f=>findBooth(f)))}export class Route{from;to;waypoints;constructor(o,l,f){this.from=o,this.to=l,this.waypoints=f,this.waypoints=f?.filter(h=>h&&h.id!==o?.id&&h.id!==l?.id)}}export class CurrentPosition extends Ke{x;y;z;angle;lat;lng;constructor(o,l,f,h,S,L){super(o,l),this.x=o,this.y=l,this.z=f,this.angle=h,this.lat=S,this.lng=L}}
|
|
1
|
+
import{__esDecorate as i,__runInitializers as r}from"tslib";import{action as m,computed as x,observable as d}from"mobx";import{Point as Ke,lineLength as Ge}from"simple-geometry";import n,{boothStore as Xe,layersStore as T}from".";import{fpGeo as E}from"../data/fpGeo";import z from"../core/Rect";import{GaEventActions as He,sendEventToGa as Je}from"../tools/gtag";import{convertGpsToLocal as Oe,isValidPointCoords as Ue,calculateRelativeBearing as Qe}from"../utils/gps";import{getLayerSvg as et,svgArea as k}from"../data/svg";import{createWayfindingEngine as tt}from"../wayfinding/core";import{boothToEndpoint as Ne,graphDataSource as Ze}from"../wayfinding/adapters";import{LayersMode as st}from"./LayerStore";import{uiState as g}from"./index";import{calcSpeed as qe}from"../utils/calcSpeed";import{calcTravelTime as $e}from"../utils/calcTravelTime";import{DEFAULT_UNITS as Ve,ORIENTATION_GRANTED_KEY as at}from"../constants";import{areLayersEnabled as it}from"../utils/areLayersEnabled";import{shouldReroute as rt}from"../wayfinding/core";import{findBoothInRadius as nt}from"../wayfinding/utils/findBoothInRadius";import je from"../data";import We from"../tools/logger";const b=a=>typeof a=="string"?Number(a.replace(",",".")):a;let ot=(()=>{let a=[],o,l=[],f=[],h,S=[],L=[],P,D=[],I=[],w,A=[],M=[],C,B=[],F=[],G,O=[],U=[],N,Z=[],q=[],$,V=[],j=[],W,Y=[],K=[],X,H=[],J=[],Q,ee=[],te=[],se,ae=[],ie=[],re,ne=[],oe=[],le,ce=[],ue=[],de,fe,me,he,pe,_e,ye,ge,ke,be,ve,xe,Re,Se=[],Le=[],Te,Ee,ze,Pe,De,Ie,we=[],Ae=[],Me,Ce,Be;return class{static{const t=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;o=[d],h=[d],P=[d],w=[d],C=[d],G=[d],N=[d],$=[d],W=[d],X=[d],Q=[d],se=[d],re=[d],le=[d],de=[x],fe=[m],me=[m],he=[x({keepAlive:!0})],pe=[x({keepAlive:!0})],_e=[m],ye=[m],ge=[x({keepAlive:!0})],ke=[x({keepAlive:!0})],be=[m],ve=[m],xe=[m],Re=[d],Te=[x],Ee=[m],ze=[m],Pe=[m],De=[m],Ie=[d],Me=[m],Ce=[x({keepAlive:!0})],Be=[m],i(this,null,de,{kind:"getter",name:"canFindLocation",static:!1,private:!1,access:{has:e=>"canFindLocation"in e,get:e=>e.canFindLocation},metadata:t},null,a),i(this,null,fe,{kind:"method",name:"selectRoute",static:!1,private:!1,access:{has:e=>"selectRoute"in e,get:e=>e.selectRoute},metadata:t},null,a),i(this,null,me,{kind:"method",name:"setStartPoint",static:!1,private:!1,access:{has:e=>"setStartPoint"in e,get:e=>e.setStartPoint},metadata:t},null,a),i(this,null,he,{kind:"getter",name:"pathLayers",static:!1,private:!1,access:{has:e=>"pathLayers"in e,get:e=>e.pathLayers},metadata:t},null,a),i(this,null,pe,{kind:"getter",name:"nearestBooth",static:!1,private:!1,access:{has:e=>"nearestBooth"in e,get:e=>e.nearestBooth},metadata:t},null,a),i(this,null,_e,{kind:"method",name:"setMarkers",static:!1,private:!1,access:{has:e=>"setMarkers"in e,get:e=>e.setMarkers},metadata:t},null,a),i(this,null,ye,{kind:"method",name:"selectMarker",static:!1,private:!1,access:{has:e=>"selectMarker"in e,get:e=>e.selectMarker},metadata:t},null,a),i(this,null,ge,{kind:"getter",name:"selectedMarkers",static:!1,private:!1,access:{has:e=>"selectedMarkers"in e,get:e=>e.selectedMarkers},metadata:t},null,a),i(this,null,ke,{kind:"getter",name:"layers",static:!1,private:!1,access:{has:e=>"layers"in e,get:e=>e.layers},metadata:t},null,a),i(this,null,be,{kind:"method",name:"clickRoute",static:!1,private:!1,access:{has:e=>"clickRoute"in e,get:e=>e.clickRoute},metadata:t},null,a),i(this,null,ve,{kind:"method",name:"selectCurrentPosition",static:!1,private:!1,access:{has:e=>"selectCurrentPosition"in e,get:e=>e.selectCurrentPosition},metadata:t},null,a),i(this,null,xe,{kind:"method",name:"findLocation",static:!1,private:!1,access:{has:e=>"findLocation"in e,get:e=>e.findLocation},metadata:t},null,a),i(this,null,Te,{kind:"getter",name:"routeInfo",static:!1,private:!1,access:{has:e=>"routeInfo"in e,get:e=>e.routeInfo},metadata:t},null,a),i(this,null,Ee,{kind:"method",name:"updateRoute",static:!1,private:!1,access:{has:e=>"updateRoute"in e,get:e=>e.updateRoute},metadata:t},null,a),i(this,null,ze,{kind:"method",name:"updateRouteDistance",static:!1,private:!1,access:{has:e=>"updateRouteDistance"in e,get:e=>e.updateRouteDistance},metadata:t},null,a),i(this,null,Pe,{kind:"method",name:"updateRoutePoints",static:!1,private:!1,access:{has:e=>"updateRoutePoints"in e,get:e=>e.updateRoutePoints},metadata:t},null,a),i(this,null,De,{kind:"method",name:"checkRoutes",static:!1,private:!1,access:{has:e=>"checkRoutes"in e,get:e=>e.checkRoutes},metadata:t},null,a),i(this,null,Me,{kind:"method",name:"setGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"setGpsTrackingEnabled"in e,get:e=>e.setGpsTrackingEnabled},metadata:t},null,a),i(this,null,Ce,{kind:"getter",name:"gpsEnabled",static:!1,private:!1,access:{has:e=>"gpsEnabled"in e,get:e=>e.gpsEnabled},metadata:t},null,a),i(this,null,Be,{kind:"method",name:"setOnlyAccessible",static:!1,private:!1,access:{has:e=>"setOnlyAccessible"in e,get:e=>e.setOnlyAccessible},metadata:t},null,a),i(null,null,o,{kind:"field",name:"routeLines",static:!1,private:!1,access:{has:e=>"routeLines"in e,get:e=>e.routeLines,set:(e,s)=>{e.routeLines=s}},metadata:t},l,f),i(null,null,h,{kind:"field",name:"routeDistance",static:!1,private:!1,access:{has:e=>"routeDistance"in e,get:e=>e.routeDistance,set:(e,s)=>{e.routeDistance=s}},metadata:t},S,L),i(null,null,P,{kind:"field",name:"currentPosition",static:!1,private:!1,access:{has:e=>"currentPosition"in e,get:e=>e.currentPosition,set:(e,s)=>{e.currentPosition=s}},metadata:t},D,I),i(null,null,w,{kind:"field",name:"requestCompass",static:!1,private:!1,access:{has:e=>"requestCompass"in e,get:e=>e.requestCompass,set:(e,s)=>{e.requestCompass=s}},metadata:t},A,M),i(null,null,C,{kind:"field",name:"iconType",static:!1,private:!1,access:{has:e=>"iconType"in e,get:e=>e.iconType,set:(e,s)=>{e.iconType=s}},metadata:t},B,F),i(null,null,G,{kind:"field",name:"tempToBooth",static:!1,private:!1,access:{has:e=>"tempToBooth"in e,get:e=>e.tempToBooth,set:(e,s)=>{e.tempToBooth=s}},metadata:t},O,U),i(null,null,N,{kind:"field",name:"defaultFrom",static:!1,private:!1,access:{has:e=>"defaultFrom"in e,get:e=>e.defaultFrom,set:(e,s)=>{e.defaultFrom=s}},metadata:t},Z,q),i(null,null,$,{kind:"field",name:"focusEnabled",static:!1,private:!1,access:{has:e=>"focusEnabled"in e,get:e=>e.focusEnabled,set:(e,s)=>{e.focusEnabled=s}},metadata:t},V,j),i(null,null,W,{kind:"field",name:"prevZ",static:!1,private:!1,access:{has:e=>"prevZ"in e,get:e=>e.prevZ,set:(e,s)=>{e.prevZ=s}},metadata:t},Y,K),i(null,null,X,{kind:"field",name:"markersData",static:!1,private:!1,access:{has:e=>"markersData"in e,get:e=>e.markersData,set:(e,s)=>{e.markersData=s}},metadata:t},H,J),i(null,null,Q,{kind:"field",name:"prevMarkers",static:!1,private:!1,access:{has:e=>"prevMarkers"in e,get:e=>e.prevMarkers,set:(e,s)=>{e.prevMarkers=s}},metadata:t},ee,te),i(null,null,se,{kind:"field",name:"showAccessible",static:!1,private:!1,access:{has:e=>"showAccessible"in e,get:e=>e.showAccessible,set:(e,s)=>{e.showAccessible=s}},metadata:t},ae,ie),i(null,null,re,{kind:"field",name:"onlyAccessible",static:!1,private:!1,access:{has:e=>"onlyAccessible"in e,get:e=>e.onlyAccessible,set:(e,s)=>{e.onlyAccessible=s}},metadata:t},ne,oe),i(null,null,le,{kind:"field",name:"currentRouteLayer",static:!1,private:!1,access:{has:e=>"currentRouteLayer"in e,get:e=>e.currentRouteLayer,set:(e,s)=>{e.currentRouteLayer=s}},metadata:t},ce,ue),i(null,null,Re,{kind:"field",name:"routeUnits",static:!1,private:!1,access:{has:e=>"routeUnits"in e,get:e=>e.routeUnits,set:(e,s)=>{e.routeUnits=s}},metadata:t},Se,Le),i(null,null,Ie,{kind:"field",name:"isGpsTrackingEnabled",static:!1,private:!1,access:{has:e=>"isGpsTrackingEnabled"in e,get:e=>e.isGpsTrackingEnabled,set:(e,s)=>{e.isGpsTrackingEnabled=s}},metadata:t},we,Ae),t&&Object.defineProperty(this,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})}rootStore=r(this,a);cpTimeout;routeLines=r(this,l,[]);routeDistance=(r(this,f),r(this,S,null));currentPosition=(r(this,L),r(this,D,null));requestCompass=(r(this,I),r(this,A,!1));iconType=(r(this,M),r(this,B,0));tempToBooth=(r(this,F),r(this,O,null));defaultFrom=(r(this,U),r(this,Z,null));focusEnabled=(r(this,q),r(this,V,!0));prevZ=(r(this,j),r(this,Y,null));markersData=(r(this,K),r(this,H,{icons:[],markers:[]}));prevMarkers=(r(this,J),r(this,ee,[]));showAccessible=(r(this,te),r(this,ae,!!Ze.getLines().find(t=>t.unaccessible)));onlyAccessible=(r(this,ie),r(this,ne,!1));currentRouteLayer=(r(this,oe),r(this,ce,null));constructor(t){r(this,Ae),this.rootStore=t,this.focusEnabled=!window.location.search}get canFindLocation(){return!!this.defaultFrom||!!this.currentPosition}selectRoute(t,e=!0){e&&(g.list={type:"search",text:"",focused:!1}),!t?.from&&t?.to&&this.currentPosition&&(t.from=this.nearestBooth),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?.visible&&s.push(t.from),t?.to?.visible&&(this.tempToBooth=null,s.push(t.to)),!t&&n.fp.onDirection&&n.fp.onDirection(null),setTimeout(()=>{this.rootStore.moveToList(s),g.details=t,t&&(!t.from||!t.to)&&n.showOverlay(),t?.to&&t?.from?.layer&&this.rootStore.layerStore.updateVisibility(t.from.layer,!0),!this.currentRouteLayer&&t?.from?.layer&&(this.currentRouteLayer=t?.from?.layer),e&&t?.from&&t?.to&&Je(He.ClickDirections,`${t?.from?"From "+t.from.name:""} ${t?.to?"To "+t.to.name:""}`)},200)}setStartPoint(t){const e=g.selectedRoute;if(e?.to&&!e?.from&&t){const s=new Route(t,e.to,e.waypoints);this.selectRoute(s)}}get pathLayers(){return n.routeStore.routeLines?.map(t=>t.p0.layer)?.filter((t,e,s)=>s.indexOf(t)===e).reverse().map((t,e)=>({id:e+1,layer:n.layerStore.findLayer(t)}))}get nearestBooth(){return this.getNearestBooth(this.currentPosition)}getNearestBooth(t){if(!t)return null;let e=this.rootStore.layerStore.findLayer(t.z);const s=t.lat&&t.lng?Oe(t,E.properties.config):t;return this.rootStore.boothStore.booths.filter(c=>T.mode===st.Default||!e?c.visible&&c.rect:c.rect&&(typeof t.z!="number"&&!t.z&&c.visible||e.name===c.layer?.name)).sort((c,u)=>Ge(s,{x:c.rect.cx,y:c.rect.cy})-Ge(s,{x:u.rect.cx,y:u.rect.cy}))[0]||null}setMarkers(t){this.markersData.markers=(t?.markers??[]).map(lt),this.markersData.icons=t?.icons??[]}selectMarker(t,e){const s=this.markersData.markers.find(u=>u.id===t);this.markersData.markers.forEach(u=>u.active=!1),s&&(s.active=!0);let c=n.layerStore.findLayer(s?.z);if(e&&s){const u=n.rendererService.renderer;return c&&!c?.visible&&T.updateVisibility(c,!0),u?u.controls.panTo(s.x,s.y):(We.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 n.routeStore.routeLines?.map(e=>e.p0.layer).reverse().forEach(e=>{t.indexOf(e)===-1&&t.push(e)}),t.map(e=>n.layerStore.layers.find(s=>s.name===e))}clickRoute(t,e){window.__resett&&window.__resett(),this.rootStore.uiState.menu=null,g.list.type==="route-planner"&&(g.list={type:"search",text:"",focused:!1}),this.selectRoute(new Route(this.defaultFrom||t,e))}selectCurrentPosition(t,e=!0,s){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 c=e&&this.rootStore.uiState.details&&!(this.rootStore.uiState.details instanceof Route),u=e&&!c&&(this.focusEnabled||this.prevZ!=t?.z);this.focusEnabled&&(this.focusEnabled=!1),this.prevZ=t?.z?.toString(),this.iconType=s?1:0;const _=t?ct(t):null;if(!_){this.currentPosition=null;return}const p=n.layerStore.findLayer(t.z),y=new CurrentPosition(_.x,_.y,p?.name||this.currentRouteLayer?.name,Qe(_),t.lat,t.lng),R=g.selectedRoute;let Fe=!this.routeLines?.length;if(p&&this.routeLines?.length&&(Fe=!!this.routeLines.find(v=>v.p0.layer===p.name||v.p1.layer===p.name)),u&&Fe){const v=n.rendererService.renderer;if(p&&!p?.visible&&T.updateVisibility(p,!0),!v){We.warn("Renderer is not initialized. Cannot pan to current position.");return}v.controls.panTo(y.x,y.y)}const Ye=E?.properties?.config?.enableExperimentalRerouting&&rt(y,this.routeLines)&&!!nt(y,Xe.booths,[R?.to]);if(e&&R&&Ye){const v=n.routeStore.getNearestBooth(y);n.routeStore.selectRoute(new Route(v,R?.to),!1)}this.currentPosition=y,this.gpsEnabled||(this.cpTimeout=setTimeout(()=>{this.currentPosition&&this.selectCurrentPosition(null,!1)},30*1e3))}findLocation(){if(this.canFindLocation){if(n.mapboxStore.showMapbox){g.moveToLocation=!0;return}if(n.routeStore.currentPosition){const t=n.routeStore.currentPosition,e=z.fromCxcywh(t.x,t.y,100,100);let s;if(e.intersects(k))s=e;else{const _=Math.max(k.x1,Math.min(t.x,k.x2)),p=Math.max(k.y1,Math.min(t.y,k.y2)),y=Math.min(k.w,k.h)*.3,R=z.fromCxcywh(_,p,y,y).getIntersection(k);s=z.fromMultiple([e,R])}localStorage.getItem(at)==="false"&&(n.routeStore.requestCompass=!0),g.moveToRect=s;const u=n.layerStore.findLayer(n.routeStore.currentPosition?.z);u&&T.updateVisibility(u,!0)}else n.selectBooth(n.routeStore.defaultFrom)}}routeUnits=(r(this,ue),r(this,Se,Ve));get routeInfo(){const t=this.routeDistance,e=this.routeUnits;return t?{distance:`${t}${e}`,units:e,time:$e(t,qe(e))}:null}updateRoute(t,e){!t?.length&&!this.routeLines.length||(this.routeLines=t,this.updateRoutePoints())}updateRouteDistance(t){if(t==null)return;const e=et(),s=(e.getAttribute("units")||Ve).toLowerCase?.().trim(),c=e.getAttribute("fp-ver")?.startsWith("5")??!1;this.routeDistance=Math.round(t/(c?1:10)),this.routeUnits=s,this.updateRoutePoints()}updateRoutePoints(){const t=g.selectedRoute,e=this.routeDistance,s=this.routeUnits;n.fp.onDirection&&setTimeout(()=>{n.fp.onDirection({from:t?.from?{id:t.from.id,name:t.from.name,externalId:t.from.externalId,layer:{name:t.from?.layer?.name,description:t.from?.layer?.description}}:null,to:t?.to?{id:t.to.id,name:t.to.name,externalId:t.to.externalId,layer:{name:t.to.layer?.name,description:t.to.layer?.description}}:null,lines:this.routeLines,distance:`${e}${s}`,units:s,time:$e(e,qe(s))})},200)}checkRoutes(){const t=tt(Ze),e=n.boothStore.booths;console.info(`Route check started ${e.length}.... `);for(let s=0;s<e.length;s++){const c=e[s];for(let u=s+1;u<e.length;u++){const _=e[u];t.buildRoute(Ne(c),Ne(_)).lines.length||console.warn(`No route found from ${c.name} to ${_.name}`)}}console.info("Route check done....")}isGpsTrackingEnabled=(r(this,Le),r(this,we,!0));setGpsTrackingEnabled(t){this.isGpsTrackingEnabled=t}get gpsEnabled(){return je.autoTrackingGps&&this.isGpsTrackingEnabled&&!je.enableIPS}setOnlyAccessible(t){this.onlyAccessible=t}}})();export default ot;function lt(a){return{...a,x:b(a.x),y:b(a.y),lat:b(a.lat),lng:b(a.lng)}}function ct(a){let o=null,l=null;return E&&(o=E.properties.config),o&&a.x>=o.p0.x&&a.x<=o.p2.x&&a.y>=o.p0.y&&a.y<=o.p2.y?l={...a}:o&&Ue(a.lat)&&Ue(a.lng)?l=Oe(a,o):o||(l=a),l||null}export function findBooth(a){return n.boothStore.findBooth(a)||n.exhibitorStore.findExhibitor(a)?.booths[0]}export function findEntityByExternalId(a){const o=n.boothStore.boothByExternalId.get(a);if(o)return{type:"booth",entity:o};const l=n.exhibitorStore.exhibitorByExternalId.get(a);if(l)return{type:"exhibitor",entity:l}}export function separateExternalIds(a){const o=[],l=[];for(const f of a){const h=findEntityByExternalId(f);h&&(h.type==="booth"?o.push(f):l.push(f))}return{boothExternalIds:o,exhibitorExternalIds:l}}export function extractRoute(a,o,l){return new Route(findBooth(a)??n.routeStore.defaultFrom??null,findBooth(o),l?.map(f=>findBooth(f)))}export class Route{from;to;waypoints;constructor(o,l,f){this.from=o,this.to=l,this.waypoints=f,this.waypoints=f?.filter(h=>h&&h.id!==o?.id&&h.id!==l?.id)}}export class CurrentPosition extends Ke{x;y;z;angle;lat;lng;constructor(o,l,f,h,S,L){super(o,l),this.x=o,this.y=l,this.z=f,this.angle=h,this.lat=S,this.lng=L}}
|
|
@@ -2,12 +2,8 @@ import type { Booth } from "../../store/BoothStore";
|
|
|
2
2
|
import type { RouteEndpoint } from "../core";
|
|
3
3
|
/**
|
|
4
4
|
* Converts an efp `Booth` to a neutral {@link RouteEndpoint}.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* polygon respecting the booth's rotation.
|
|
8
|
-
* - `RouteCutIn` (kiosk-like) → `{x, y}` at the kiosk's physical point
|
|
9
|
-
* with **no `bounds`**. Runtime detects the missing `bounds` and draws a
|
|
10
|
-
* dotted trail from the nearest graph anchor to this off-graph point.
|
|
5
|
+
* Regular booth → centroid + 4-vertex rotated polygon as `bounds`.
|
|
6
|
+
* RouteCutIn (kiosk) → kiosk's physical point, **no `bounds`** (runtime draws a dotted trail).
|
|
11
7
|
*/
|
|
12
8
|
export declare function boothToEndpoint(booth: Booth): RouteEndpoint;
|
|
13
9
|
//# sourceMappingURL=boothToEndpoint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import y from"../../core/Polygon";function c(t){return t.entity?.type==="route-cut-in"}export function boothToEndpoint(t){const n=t.layer?.name??"";if(c(t)){const r=t.destination;return{x:r.x,y:r.y,layer:n}}const e=y.fromRect(t.rect).rotate(t.rotate,t.rect.cx,t.rect.cy);return{x:t.rect.cx,y:t.rect.cy,layer:n,bounds:[{x:e.x1,y:e.y1},{x:e.x2,y:e.y2},{x:e.x3,y:e.y3},{x:e.x4,y:e.y4}]}}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { boothToEndpoint } from "./boothToEndpoint";
|
|
2
|
-
export { boothToWaypoint } from "./boothToWaypoint";
|
|
3
2
|
export { createCanvasIconProvider } from "./canvasIconProvider";
|
|
4
3
|
export { createFloorContext } from "./floorContext";
|
|
5
4
|
export { graphDataSource } from "./graphDataSource";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{boothToEndpoint}from"./boothToEndpoint";export{
|
|
1
|
+
export{boothToEndpoint}from"./boothToEndpoint";export{createCanvasIconProvider}from"./canvasIconProvider";export{createFloorContext}from"./floorContext";export{graphDataSource}from"./graphDataSource";export{createKioskCanvas}from"./kioskCanvas";export{positionInput}from"./positionInput";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reaction as
|
|
1
|
+
import{reaction as u}from"mobx";import{boothToEndpoint as d,positionInput as g}from"./adapters";export function bindMobxReactions({runtime:e,kioskHandler:h,yahHandler:p,stores:{routeStore:t,uiState:n,layerStore:l}}){const f=[];function a(){const o=n.selectedRoute?.from,s=n.selectedRoute?.to;if(!o?.rect||!s?.rect){e.clearRoute();return}e.setRoute({from:d(o),to:d(s),waypoints:n.selectedRoute?.waypoints?.map(d),accessible:t.onlyAccessible})===!1&&console.error(new Error(`Route not found: ${o.name} \u2192 ${s.name}`))}function c(){const o=t.currentPosition,s=t.iconType!==0,m=!!(n.selectedRoute?.from&&n.selectedRoute?.to),b=s&&!m;if(!o){e.onPositionChanged(null),p(null);return}const r=g(o);b?(e.onPositionChanged(null),p({x:r.x,y:r.y,layer:r.layer})):(p(null),e.onPositionChanged(r))}function R(){const o=l.floors.find(s=>s.active)?.name;h(n.kioskData??null,o,l.mode)}f.push(u(()=>l.layersLoaded,()=>{a(),c()}),u(()=>[n.selectedRoute,t.onlyAccessible],()=>{a(),c()}),u(()=>t.currentPosition,()=>c()),u(()=>[n.kioskData,l.floors.find(o=>o.active)],()=>R()));let i=null;const y=u(()=>[t.currentRouteLayer,n.getRouteNextFloor],()=>{l.layersLoaded&&(i!==null&&clearTimeout(i),i=setTimeout(()=>{e.onFloorChanged(),c(),i=null},0))});return f.push(()=>{i!==null&&clearTimeout(i),y()}),a(),c(),R(),()=>{for(const o of f)o();f.length=0}}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { GraphDataSource,
|
|
1
|
+
import type { GraphDataSource, RouteEndpoint, RouteLine } from "./types";
|
|
2
2
|
export interface Route {
|
|
3
3
|
readonly lines: RouteLine[];
|
|
4
4
|
readonly distance: number;
|
|
5
5
|
}
|
|
6
6
|
export interface WayfindingEngine {
|
|
7
|
-
buildRoute(from:
|
|
7
|
+
buildRoute(from: RouteEndpoint, to: RouteEndpoint, options?: {
|
|
8
8
|
accessible?: boolean;
|
|
9
9
|
}): Route;
|
|
10
|
-
buildWaypointsRoute(waypoints:
|
|
10
|
+
buildWaypointsRoute(waypoints: RouteEndpoint[], options?: {
|
|
11
11
|
accessible?: boolean;
|
|
12
12
|
fastest?: boolean;
|
|
13
13
|
}): Route;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PolygonVertex } from "../types";
|
|
2
|
+
/** Convex polygon area via fan triangulation from vertex[0]. */
|
|
3
|
+
export declare function computePolygonArea(polygon: ReadonlyArray<PolygonVertex>): number;
|
|
4
|
+
/**
|
|
5
|
+
* Area-based point-in-polygon test with 1% relative tolerance. Convex polygons only.
|
|
6
|
+
* Inside ⇒ sum of (point, vertex_i, vertex_{i+1}) triangle areas equals polygon area; outside ⇒ larger.
|
|
7
|
+
* Tolerance includes points sitting fractionally outside the polygon (editor/float imprecision).
|
|
8
|
+
* Pass `polygonArea` from {@link computePolygonArea} to skip recomputation in hot loops.
|
|
9
|
+
*/
|
|
10
|
+
export declare function pointInPolygon(point: PolygonVertex, polygon: ReadonlyArray<PolygonVertex>, polygonArea?: number): boolean;
|
|
11
|
+
//# sourceMappingURL=pointInPolygon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=.01;function f(r,t,n){return Math.abs(.5*(r.x*(t.y-n.y)+t.x*(n.y-r.y)+n.x*(r.y-t.y)))}export function computePolygonArea(r){if(r.length<3)return 0;let t=0;for(let n=1;n<r.length-1;n++)t+=f(r[0],r[n],r[n+1]);return t}export function pointInPolygon(r,t,n=computePolygonArea(t)){if(n===0)return!1;let u=0;for(let i=0,a=t.length-1;i<t.length;a=i++)u+=f(r,t[a],t[i]);return Math.abs(n-u)<n*.01}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
export { createWayfindingEngine } from "./createWayfindingEngine";
|
|
2
2
|
export type { WayfindingEngine, Route } from "./createWayfindingEngine";
|
|
3
|
-
export type { GraphDataSource,
|
|
3
|
+
export type { GraphDataSource, RouteEndpoint, RouteLine, RoutePoint, RouteSnapResult, } from "./types";
|
|
4
4
|
export { computeTransitionPoints } from "./rendering/computeTransitionPoints";
|
|
5
5
|
export type { TransitionPointDef } from "./rendering/computeTransitionPoints";
|
|
6
6
|
export { computeTrailPoints } from "./rendering/computeTrailPoints";
|
|
7
|
-
export { getVisibleRouteLines } from "./rendering/getVisibleRouteLines";
|
|
8
7
|
export { computeBoundingBox } from "./rendering/routeGeometry";
|
|
9
8
|
export type { BoundingBox } from "./rendering/routeGeometry";
|
|
10
9
|
export { normalizeRouteDirection } from "./rendering/normalizeRouteDirection";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{createWayfindingEngine}from"./createWayfindingEngine";export{computeTransitionPoints}from"./rendering/computeTransitionPoints";export{computeTrailPoints}from"./rendering/computeTrailPoints";export{
|
|
1
|
+
export{createWayfindingEngine}from"./createWayfindingEngine";export{computeTransitionPoints}from"./rendering/computeTransitionPoints";export{computeTrailPoints}from"./rendering/computeTrailPoints";export{computeBoundingBox}from"./rendering/routeGeometry";export{normalizeRouteDirection}from"./rendering/normalizeRouteDirection";export{getRouteLength}from"./routing/getRouteLength";export{SNAP_THRESHOLD_METERS,getThresholdSafe,getThresholdFromMetersToSvg}from"./position/gpsThreshold";export{shouldReroute}from"./position/shouldReroute";export{snapToRoute}from"./position/snapToRoute";export{splitRouteByPoint}from"./position/splitRouteByPoint";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import{pointInPolygon as v}from"../geometry/pointInPolygon";function R(n,o){let p=0;for(const t of n){const e=Math.hypot(t.p1.x-t.p0.x,t.p1.y-t.p0.y);if(e!==0){if(p+e>=o){const c=(o-p)/e,P=t.p0.x+(t.p1.x-t.p0.x)*c,l=t.p0.y+(t.p1.y-t.p0.y)*c;return{point:{layer:t.p0.layer,x:P,y:l},line:t}}p+=e}}const i=n[n.length-1];return{point:{layer:i.p0.layer,x:i.p1.x,y:i.p1.y},line:i}}export{SNAP_THRESHOLD_METERS}from"./gpsThreshold";export function snapToRoute(n,o,p){const i=o.length;if(!i)return{snapped:!1};const{snapThreshold:t,to:e,from:c,minRemainingUnits:P=.5}=p,l=n.z!=null?String(n.z):null;let M=1/0,x=null,f=0,b=l==null;for(let a=0;a<i;a++){const d=o[a],{p0:s,p1:u}=d,h=u.x-s.x,S=u.y-s.y,D=h*h+S*S;if(D===0)continue;const F=Math.sqrt(D);if(l!=null&&String(s.layer)!==l){f+=F;continue}b=!0;const O=((n.x-s.x)*h+(n.y-s.y)*S)/D,g=Math.max(0,Math.min(1,O)),_=s.x+h*g,w=s.y+S*g,q=Math.hypot(n.x-_,n.y-w);q<M&&(M=q,x={segmentIndex:a,t:g,distanceFromPolylineStart:f+F*g}),f+=F}if(l!=null&&!b)return{snapped:!1};const r=f,E=o[0].p0,A=o[i-1].p1,z=Math.hypot(e.x-E.x,e.y-E.y),H=Math.hypot(e.x-A.x,e.y-A.y),m=z<=H,T=Math.min(P,r);if(c?.bounds&&(l==null||!c.layer||c.layer===l)&&v({x:n.x,y:n.y},c.bounds)){const a=r,d=m?a:r-a,s=R(o,d);return{snapped:!0,snappedPoint:s.point,snappedLine:s.line,distance:a}}if(e.bounds&&(l==null||!e.layer||e.layer===l)&&v({x:n.x,y:n.y},e.bounds)){const a=T,d=r-a,u=R(o,m?a:d);return{snapped:!0,snappedPoint:u.point,snappedLine:u.line,distance:a}}if(!x||M>t)return{snapped:!1};let y=m?x.distanceFromPolylineStart:r-x.distanceFromPolylineStart;y<T&&(y=T);const L=r-y,I=R(o,m?y:L);return{snapped:!0,snappedPoint:I.point,snappedLine:I.line,distance:y}}
|
|
@@ -1,21 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* matching the legacy wayfinding behavior.
|
|
7
|
-
*
|
|
8
|
-
* The rect is a simple-geometry Rect (4-point polygon) — it may be rotated,
|
|
9
|
-
* not necessarily axis-aligned.
|
|
10
|
-
*/
|
|
11
|
-
export declare function findGraphPointsInRect(dataSource: GraphDataSource, containmentRect: SGRect, layer?: string): RoutePoint[];
|
|
12
|
-
/**
|
|
13
|
-
* Finds the nearest graph endpoint by Euclidean distance from an arbitrary point.
|
|
14
|
-
* Generalizes the old rect-based filtering for point-to-point routing.
|
|
15
|
-
*/
|
|
16
|
-
export declare function findNearestGraphPoint(graph: GraphInstance, point: {
|
|
17
|
-
x: number;
|
|
18
|
-
y: number;
|
|
19
|
-
layer?: string;
|
|
20
|
-
}): RoutePoint | null;
|
|
1
|
+
import type { GraphDataSource, PolygonVertex, RoutePoint } from "../types";
|
|
2
|
+
/** Graph endpoints inside a convex polygon (e.g. booth rect), filtered by layer. */
|
|
3
|
+
export declare function findGraphPointsInPolygon(dataSource: GraphDataSource, polygon: ReadonlyArray<PolygonVertex>, layer?: string): RoutePoint[];
|
|
4
|
+
/** Nearest graph endpoint by Euclidean distance, optionally filtered by layer. */
|
|
5
|
+
export declare function findNearestGraphPoint(dataSource: GraphDataSource, point: RoutePoint): RoutePoint | null;
|
|
21
6
|
//# sourceMappingURL=findNearestGraphPoint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{lineLength as
|
|
1
|
+
import{lineLength as f}from"simple-geometry";import{computePolygonArea as l,pointInPolygon as a}from"../geometry/pointInPolygon";export function findGraphPointsInPolygon(r,n,t){const o=l(n);return r.getLineEnds().filter(e=>(!t||e.layer===t)&&a(e,n,o))}export function findNearestGraphPoint(r,n){let t=null,o=1/0;for(const e of r.getLineEnds()){if(n.layer&&e.layer!==n.layer)continue;const i=f(e,n);i<o&&(o=i,t=e)}return t}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import type { GraphInstance,
|
|
2
|
-
/**
|
|
3
|
-
|
|
4
|
-
* Uses rect-based search if the waypoint has a rect, otherwise falls back to nearest-point lookup.
|
|
5
|
-
*/
|
|
6
|
-
export declare function resolveWaypointCandidates(graph: GraphInstance, waypoint: RouteWaypoint): RoutePoint[];
|
|
1
|
+
import type { GraphInstance, RouteEndpoint, RoutePoint } from "../types";
|
|
2
|
+
/** Resolves a route endpoint to candidate graph points. */
|
|
3
|
+
export declare function resolveWaypointCandidates(graph: GraphInstance, endpoint: RouteEndpoint): RoutePoint[];
|
|
7
4
|
//# sourceMappingURL=resolveWaypointCandidates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{findGraphPointsInPolygon as a,findNearestGraphPoint as e}from"./findNearestGraphPoint";export function resolveWaypointCandidates(o,r){if(r.bounds?.length)return a(o.dataSource,r.bounds,r.layer);const t=e(o.dataSource,r);return t?[t]:[]}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
export type PolygonVertex = {
|
|
2
|
+
readonly x: number;
|
|
3
|
+
readonly y: number;
|
|
4
|
+
};
|
|
2
5
|
export interface RoutePoint {
|
|
3
6
|
readonly x: number;
|
|
4
7
|
readonly y: number;
|
|
@@ -61,18 +64,6 @@ export interface RouteResult {
|
|
|
61
64
|
readonly lines: RouteLine[];
|
|
62
65
|
readonly totalDistance: number;
|
|
63
66
|
}
|
|
64
|
-
export interface RouteWaypoint {
|
|
65
|
-
readonly x: number;
|
|
66
|
-
readonly y: number;
|
|
67
|
-
readonly layer?: string;
|
|
68
|
-
/**
|
|
69
|
-
* Optional containment rect for booth-based graph point resolution.
|
|
70
|
-
* When set, resolveWaypointCandidates finds all graph endpoints inside this rect
|
|
71
|
-
* instead of falling back to nearest-point lookup.
|
|
72
|
-
* Populated by boothToWaypoint adapter. Not part of the public module contract.
|
|
73
|
-
*/
|
|
74
|
-
readonly rect?: SimpleGeometryRect;
|
|
75
|
-
}
|
|
76
67
|
/** Minimal position interface — replaces CurrentPosition class dependency in core. */
|
|
77
68
|
export interface PositionPoint {
|
|
78
69
|
readonly x: number;
|
|
@@ -89,20 +80,12 @@ export type RouteSnapResult = {
|
|
|
89
80
|
distance: number;
|
|
90
81
|
};
|
|
91
82
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
* a kiosk) and the runtime will draw a dotted trail to the nearest graph
|
|
96
|
-
* anchor.
|
|
83
|
+
* Route endpoint: anchor on a layer, with optional perimeter polygon (booth bounds).
|
|
84
|
+
* With `bounds` → engine picks the optimal graph node inside the polygon.
|
|
85
|
+
* Without `bounds` → off-graph point (e.g. kiosk); engine snaps to nearest graph anchor.
|
|
97
86
|
*/
|
|
98
|
-
export interface RouteEndpoint {
|
|
99
|
-
readonly
|
|
100
|
-
readonly y: number;
|
|
101
|
-
readonly layer: string;
|
|
102
|
-
readonly bounds?: ReadonlyArray<{
|
|
103
|
-
readonly x: number;
|
|
104
|
-
readonly y: number;
|
|
105
|
-
}>;
|
|
87
|
+
export interface RouteEndpoint extends RoutePoint {
|
|
88
|
+
readonly bounds?: ReadonlyArray<PolygonVertex>;
|
|
106
89
|
}
|
|
107
90
|
export type SnapToRouteConfig = {
|
|
108
91
|
snapThreshold: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getRouteLength as B,snapToRoute as G}from"../core";import{getRouteLines as H}from"./getRouteLines";import{createEndpointView as J}from"./endpointView";import{createPositionTrailView as K}from"./positionTrailView";import{createRouteLinesView as N}from"./routeLinesView";import{computeRouteRenderData as O}from"./routeRenderData";import{computeRouteUpdate as Q}from"./routeUpdate";import{createTrailView as X}from"./trailView";import{createTransitionView as Y}from"./transitionView";const Z=g=>g.flatMap(
|
|
1
|
+
import{getRouteLength as B,snapToRoute as G}from"../core";import{getRouteLines as H}from"./getRouteLines";import{createEndpointView as J}from"./endpointView";import{createPositionTrailView as K}from"./positionTrailView";import{createRouteLinesView as N}from"./routeLinesView";import{computeRouteRenderData as O}from"./routeRenderData";import{computeRouteUpdate as Q}from"./routeUpdate";import{createTrailView as X}from"./trailView";import{createTransitionView as Y}from"./transitionView";const Z=g=>g.flatMap(e=>[e.p0,e.p1]);export function createWayfindingRuntime({engine:g,renderer:e,iconProvider:h,floorContext:s,layers:a,snapThreshold:b,onTransitionClick:E,onRouteUpdate:d,onRouteDistance:m}){const L=J({renderer:e,iconProvider:h,floorContext:s,layer:a.points}),y=Y({renderer:e,iconProvider:h,floorContext:s,onTransitionClick:E,layer:a.points}),M=X({renderer:e,iconProvider:h,floorContext:s,layer:a.trail}),o=K({renderer:e,iconProvider:h,floorContext:s,trails:M,iconLayer:a.points,snapThreshold:b}),F=N({renderer:e,linesLayer:a.lines,animatedLinesLayer:a.linesAnimated});let u=[],i=null,r=null,l=null,c=0;function P(){return s.showAllFloors()?null:s.getActiveFloor()}function A(){const t=P();return t===null?u.filter(n=>!n.virtual):u.filter(n=>n.p0.layer===t&&!n.virtual)}function R(){if(!i||!r)return null;const t=A();return t.length?{from:i,to:r,routePoints:Z(t),visibleLines:t}:null}function f(t,n=!1){if(!i||!r)return;const p=O({routeLines:u,currentRouteLayer:P(),from:i,to:r,snap:t});F.draw(p,n),c=p.distance}function v(){if(!i||!r)return;const t=R();if(!t){L.hide(),y.clear(),o.refreshTrail(null),f();return}L.place(i,r,t.routePoints),y.place(u),f(),o.refreshTrail(t)}function T(){if(!l||!i||!r)return;const t=u.filter(p=>!p.virtual);if(!t.length)return;const n=R();return n?o.applyToRoute(l,n,t):(o.refreshTrail(null),G({x:l.x,y:l.y,z:l.layer||null},t,{snapThreshold:b,from:i,to:r}))}function I(){const t=Q(u,A());return d(t.lines,t.bounds),t}function S({from:t,to:n,waypoints:p,accessible:k}){const z=H({engine:g,from:t,to:n,waypoints:p,accessible:k});if(!z.length)return V(),!1;i=t,r=n,u=z,v();const{lines:q}=I(),w=T();return w&&f(w,!0),m(w?c:B(q)),e.flush(),!0}function U(t){if(l=t,!t){o.hideIcon(),o.refreshTrail(R()),f(),m(c),e.flush();return}o.placeIcon(t);const n=T();n&&f(n,!0),m(c),e.flush()}function W(){v();const t=T();t&&f(t,!0),u.length&&I(),m(c),e.flush()}function V(){u=[],i=null,r=null,c=0,L.hide(),y.clear(),o.clearTrail(),F.clear(),d([],null),m(0),e.flush()}function j(){V(),l=null,e.destroy()}return{setRoute:S,onPositionChanged:U,onFloorChanged:W,clearRoute:V,destroy:j}}
|
|
@@ -26,7 +26,7 @@ export interface WayfindingRuntime {
|
|
|
26
26
|
* Build (or update) the active route. Places endpoint/transition/trail icons
|
|
27
27
|
* and fires `onRouteUpdate` + `onRouteDistance` callbacks.
|
|
28
28
|
*/
|
|
29
|
-
setRoute(input: SetRouteInput):
|
|
29
|
+
setRoute(input: SetRouteInput): boolean;
|
|
30
30
|
/**
|
|
31
31
|
* Notify the runtime that the user position changed. `null` hides the position icon and clears
|
|
32
32
|
* the off-route trail. Dot vs arrow variant is derived from `position.angle` internally.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expofp/floorplan",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.10",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/expofp/efp-app.git",
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
"twgl.js": "^4.14.0",
|
|
77
77
|
"uuid": "^9.0.1",
|
|
78
78
|
"zod": "4.3.5",
|
|
79
|
-
"@expofp/debug": "3.2.
|
|
80
|
-
"@expofp/resolve": "3.2.
|
|
79
|
+
"@expofp/debug": "3.2.10",
|
|
80
|
+
"@expofp/resolve": "3.2.10"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@babel/plugin-proposal-decorators": "^7.29.0",
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
function __vite_inject_css__(css, id, forceLightDom){ if (typeof document==='undefined') return; var shadow=!forceLightDom&&typeof window!=='undefined'&&window.__efpShadowDOMStyleParent; var parent=shadow||document.head; var s=document.createElement('style'); s.setAttribute('data-chunk-style', id); s.appendChild(document.createTextNode(css)); parent.appendChild(s);}
|
|
2
|
-
(function() {
|
|
3
|
-
try {
|
|
4
|
-
var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
5
|
-
e.SENTRY_RELEASE = { id: "3.2.8" };
|
|
6
|
-
var t = new e.Error().stack;
|
|
7
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "4c43650a-ade5-4d42-8150-720576465b9e", e._sentryDebugIdIdentifier = "sentry-dbid-4c43650a-ade5-4d42-8150-720576465b9e");
|
|
8
|
-
} catch {}
|
|
9
|
-
})();
|
|
10
|
-
import { r as e } from "./rolldown-runtime-BAuBEODA.js";
|
|
11
|
-
import { t } from "./react-B3Fm-ZS0.js";
|
|
12
|
-
import { t as n } from "./jsx-runtime-IE8skafD.js";
|
|
13
|
-
import { u as r } from "./is-debug-DatwRSE7.js";
|
|
14
|
-
import { t as i } from "./classnames-DZ15rBvY.js";
|
|
15
|
-
import { $n as a, er as o, l as s, s as c, u as l } from "./store-WG-XbhCX.js";
|
|
16
|
-
import { n as u } from "./mobx-CrV9DCMJ.js";
|
|
17
|
-
t();
|
|
18
|
-
var d = /* @__PURE__ */ e(i(), 1), f = n();
|
|
19
|
-
function p() {
|
|
20
|
-
let e = a(() => ({
|
|
21
|
-
hidden: !0,
|
|
22
|
-
get classes() {
|
|
23
|
-
return (0, d.default)("free", { hidden: this.hidden });
|
|
24
|
-
}
|
|
25
|
-
}));
|
|
26
|
-
return u(() => {
|
|
27
|
-
c.freeBannerDismissed || window.setTimeout(() => {
|
|
28
|
-
e.hidden = !1;
|
|
29
|
-
}, 2e3);
|
|
30
|
-
}), o(() => /* @__PURE__ */ (0, f.jsx)("div", {
|
|
31
|
-
className: e.classes,
|
|
32
|
-
children: /* @__PURE__ */ (0, f.jsxs)("section", { children: [/* @__PURE__ */ (0, f.jsx)("div", {
|
|
33
|
-
className: "free__message",
|
|
34
|
-
children: /* @__PURE__ */ (0, f.jsxs)("span", { children: [
|
|
35
|
-
r("Create a free floor plan at"),
|
|
36
|
-
"\xA0",
|
|
37
|
-
/* @__PURE__ */ (0, f.jsx)("a", {
|
|
38
|
-
href: s(),
|
|
39
|
-
target: "_blank",
|
|
40
|
-
rel: "noopener noreferrer",
|
|
41
|
-
children: "ExpoFP.com"
|
|
42
|
-
})
|
|
43
|
-
] })
|
|
44
|
-
}), /* @__PURE__ */ (0, f.jsx)("button", {
|
|
45
|
-
type: "button",
|
|
46
|
-
className: "free__dismiss",
|
|
47
|
-
onClick: t,
|
|
48
|
-
"aria-label": r("Dismiss"),
|
|
49
|
-
children: /* @__PURE__ */ (0, f.jsx)("i", {
|
|
50
|
-
className: "icon-close",
|
|
51
|
-
"aria-hidden": "true"
|
|
52
|
-
})
|
|
53
|
-
})] })
|
|
54
|
-
}));
|
|
55
|
-
function t() {
|
|
56
|
-
e.hidden = !0, l(sessionStorage), c.freeBannerDismissed = !0;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
//#endregion
|
|
60
|
-
export { p as default };
|
|
61
|
-
|
|
62
|
-
;/* vite-per-chunk-css */
|
|
63
|
-
__vite_inject_css__(".free{opacity:1;background:linear-gradient(90deg,#e5175c,#5c17e5);justify-content:center;width:100%;min-height:2.5rem;transition:all .5s;display:flex;position:absolute;top:0}.free>section{-webkit-user-select:none;user-select:none;padding:.2rem .5rem;font-size:.8rem;display:flex}.free__message{color:#fff;align-items:center;display:flex}.free__message a{color:#fff;text-decoration:underline}.free__dismiss{opacity:.8;color:#fff;cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0;font-size:1rem;line-height:1;transition:opacity .2s;display:flex;position:absolute;top:50%;transform:translateY(-50%)}.free__dismiss:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){right:.5rem}.free__dismiss:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){right:.5rem}.free__dismiss:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:.5rem}.free__dismiss:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){left:.5rem}.free__dismiss:hover{opacity:1}@media print{.free__dismiss{display:none}}@media (min-width:768px){.free{min-height:3.25rem}.free>section{padding:.5rem}.free .free__message{color:#ffffffe6;font-size:1.5rem;font-weight:300}.free .free__dismiss{font-size:1.5rem}}.free.hidden{transform:translateY(-100%)}\n/*$vite$:1*/", "Free.css", false);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { Booth } from "../../store/BoothStore";
|
|
2
|
-
import type { RouteWaypoint } from "../core";
|
|
3
|
-
/**
|
|
4
|
-
* Converts a MobX Booth entity to a framework-free RouteWaypoint.
|
|
5
|
-
*
|
|
6
|
-
* This adapter is exported as a public API for current consumers (RouteStore,
|
|
7
|
-
* config-wf.ts). In Phase 7, it will become an internal detail of
|
|
8
|
-
* MobxStateAdapter — the Booth→RouteWaypoint conversion will happen inside
|
|
9
|
-
* the state port, and callers will work with RouteWaypoint directly.
|
|
10
|
-
*/
|
|
11
|
-
export declare function boothToWaypoint(booth: Booth): RouteWaypoint;
|
|
12
|
-
//# sourceMappingURL=boothToWaypoint.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Point as t,Rect as c}from"simple-geometry";import n from"../../core/Polygon";export function boothToWaypoint(r){const e=n.fromRect(r.rect).rotate(r.rotate,r.rect.cx,r.rect.cy);return{x:r.rect.cx,y:r.rect.cy,layer:r.layer?.name,rect:new c(new t(e.x1,e.y1),new t(e.x2,e.y2),new t(e.x3,e.y3),new t(e.x4,e.y4))}}
|