@expofp/floorplan 3.11.10 → 3.11.12

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 (188) hide show
  1. package/dist/browser/{Button-DGcqRm5p.js → Button-CdChKHNd.js} +5 -5
  2. package/dist/browser/{CookieConsent-Im35MT-u.js → CookieConsent-DmWcbyRQ.js} +7 -7
  3. package/dist/browser/{Debug-BF5W3DeJ.js → Debug-BQJRkSVw.js} +7 -7
  4. package/dist/browser/{Demo-BvazCQC7.js → Demo-Dh5hQ00u.js} +9 -9
  5. package/dist/browser/{Free-BALfmJEs.js → Free-Be0wdt8h.js} +9 -9
  6. package/dist/browser/{Gallery-DQwYEZGM.js → Gallery-DsC-3InH.js} +9 -9
  7. package/dist/browser/{GpsLoader-CtHWeVvy.js → GpsLoader-l-DhiN5_.js} +9 -9
  8. package/dist/browser/{KioskStore-DzMTAgEa.js → KioskStore-hBGigttj.js} +3 -3
  9. package/dist/browser/{MaplibreAdapter-omg_mz0j.js → MaplibreAdapter-B2PgQxAb.js} +9 -9
  10. package/dist/browser/{ModalContainer-Czaptxt1.js → ModalContainer-DngQzOVE.js} +10 -10
  11. package/dist/browser/{PermissionNotice-B6yqqyNH.js → PermissionNotice-Bstp1Ig2.js} +6 -6
  12. package/dist/browser/{SetKioskMode-DNLV0oER.js → SetKioskMode-BXTIENxU.js} +8 -8
  13. package/dist/browser/{ShowKiosk-5T2az2Vy.js → ShowKiosk-CpIQKRDF.js} +10 -10
  14. package/dist/browser/{TouchHand-DWlAh02i.js → TouchHand-CZ4-CE4e.js} +4 -4
  15. package/dist/browser/{ViewerMenuPanel-XyrX3RN0.js → ViewerMenuPanel-Dc7XYnXW.js} +9 -9
  16. package/dist/browser/{add-debug-secret-listener-mNAYRI2a.js → add-debug-secret-listener-DOVFjqJo.js} +1 -1
  17. package/dist/browser/{boolean-editor-B97NdUSv.js → boolean-editor-B-S4WhPP.js} +9 -9
  18. package/dist/browser/{bootIntercom-BliKEbMq.js → bootIntercom-D41iCVYM.js} +2 -2
  19. package/dist/browser/{booth-by-xy-B_sKZ9jt.js → booth-by-xy-S_lLb4ur.js} +6 -6
  20. package/dist/browser/{browser-B1FqFLx2.js → browser-pQxW93uF.js} +2 -2
  21. package/dist/browser/bundle.json +61 -61
  22. package/dist/browser/{classnames-DAXzFAda.js → classnames-BeH2kA4o.js} +2 -2
  23. package/dist/browser/{client-DKBTR12w.js → client-Be_UxAZT.js} +4 -4
  24. package/dist/browser/{components-CohebbHY.js → components-RZNETvKi.js} +39 -39
  25. package/dist/browser/{debug-overlay-BfkNLjCT.js → debug-overlay-DjwfpG69.js} +10 -10
  26. package/dist/browser/{debug-ui-COboE6BJ.js → debug-ui-D_afzMrh.js} +6 -6
  27. package/dist/browser/{dist-DVFkL6Qf.js → dist-B-m8ZFBo.js} +3 -3
  28. package/dist/browser/{dist-BcM06rSz.js → dist-CZz9piI4.js} +5 -5
  29. package/dist/browser/{dist-BVYHQXIh.js → dist-DKu24Nie.js} +6 -6
  30. package/dist/browser/{efp-debug-init-D2-Gm6cI.js → efp-debug-init-B-EZE_S2.js} +2 -2
  31. package/dist/browser/{enum-editor-COPiFriN.js → enum-editor-BtYkUhft.js} +11 -11
  32. package/dist/browser/{es5-16XZ7cl7.js → es5-DPnfG3EX.js} +2 -2
  33. package/dist/browser/{event-not-found-DJuUOnbZ.js → event-not-found-CE2zhFPJ.js} +1 -1
  34. package/dist/browser/{exports-D0GTDgp5.js → exports-BtXbxSeU.js} +1 -1
  35. package/dist/browser/{favicon-iZpXvCj5.js → favicon-B7xwIKyS.js} +1 -1
  36. package/dist/browser/{fetch-retry.umd-m6P5zTb5.js → fetch-retry.umd-BiAebF_i.js} +2 -2
  37. package/dist/browser/{flex-CJNo2chr.js → flex-DGirEfRz.js} +5 -5
  38. package/dist/browser/{floorplan.loader-BcHHrVLa.js → floorplan.loader-DSx2rwZS.js} +16 -12
  39. package/dist/browser/{floorplan.ready-C-FEMr9a.js → floorplan.ready-CX4L0Qyc.js} +22 -22
  40. package/dist/browser/{fuse-BO2gWyYJ.js → fuse-BuZwVNBr.js} +2 -2
  41. package/dist/browser/{i18n-D2OTRQmn.js → i18n-BqlnpLSm.js} +4 -4
  42. package/dist/browser/index.js +16 -15
  43. package/dist/browser/{index.module-u2FUktVs.js → index.module-BktNOlw2.js} +4 -4
  44. package/dist/browser/{is-webview-DaZOesBh.js → is-webview-DxtfBbGj.js} +1 -1
  45. package/dist/browser/{jsx-runtime-BFcovWN_.js → jsx-runtime-DftMjMlZ.js} +2 -2
  46. package/dist/browser/{lib-BMInKUj4.js → lib-_QD5dt19.js} +4 -4
  47. package/dist/browser/{loadImage-DenlCHMO.js → loadImage-CvnSDOL0.js} +4 -4
  48. package/dist/browser/locales/ru.json +1 -1
  49. package/dist/browser/{logDeviceInfo-DZgJ30sb.js → logDeviceInfo-CiCKGxKy.js} +9 -9
  50. package/dist/browser/{main-Qx9oNcPY.js → main-C6h73Uc5.js} +1 -1
  51. package/dist/browser/{mobx-CSNTR8TV.js → mobx-71cpvuRe.js} +4 -4
  52. package/dist/browser/{particles.min-BVTQGdqc.js → particles.min-CiLQfUCo.js} +2 -2
  53. package/dist/browser/{prop-types-BxxoL_jQ.js → prop-types-8E5fCOgQ.js} +2 -2
  54. package/dist/browser/{react-DmMDPbf6.js → react-B9lmaQYI.js} +2 -2
  55. package/dist/browser/{react-dom-x1kyF-NR.js → react-dom-CPWfZdj5.js} +3 -3
  56. package/dist/browser/{reset-all-settings-DwE3yXsg.js → reset-all-settings-CAVnp-HU.js} +7 -7
  57. package/dist/browser/{rolldown-runtime-DeGKOnmi.js → rolldown-runtime-CJax_ib9.js} +1 -1
  58. package/dist/browser/{settings-ZGkKsF0W.js → settings-BufKqYwI.js} +2 -2
  59. package/dist/browser/{settings-item-CYaN5leI.js → settings-item-D3AzjjoO.js} +6 -6
  60. package/dist/browser/{store-Di4pNbj5.js → store-DGdGzsa_.js} +1362 -1316
  61. package/dist/browser/{string-editor-CF5AkvC6.js → string-editor-BEBEF1X7.js} +7 -7
  62. package/dist/browser/{theme-BhCz6Hbs.js → theme-DvIMSzdB.js} +8 -8
  63. package/dist/browser/{ui-D7-WdSLR.js → ui-DIQ3vheI.js} +8 -8
  64. package/dist/browser/{useRenderTarget-txeI_lzp.js → useRenderTarget-hqd7cVeW.js} +4 -4
  65. package/dist/esm/floorplan.ready.js +1 -1
  66. package/dist/esm/utils/loadCustomCss.js +1 -1
  67. package/dist/esm/wayfinding/adapters/arbitraryPoint.d.ts +1 -1
  68. package/dist/esm/wayfinding/adapters/arbitraryPoint.js +1 -1
  69. package/dist/esm/wayfinding/adapters/boothToEndpoint.d.ts +4 -4
  70. package/dist/esm/wayfinding/adapters/canvasIconProvider.d.ts +1 -1
  71. package/dist/esm/wayfinding/adapters/floorContext.d.ts +1 -1
  72. package/dist/esm/wayfinding/adapters/graphDataSource.d.ts +1 -1
  73. package/dist/esm/wayfinding/adapters/positionInput.d.ts +8 -7
  74. package/dist/esm/wayfinding/adapters/positionInput.js +1 -1
  75. package/dist/esm/wayfinding/bindMobxReactions.d.ts +10 -23
  76. package/dist/esm/wayfinding/bindMobxReactions.js +1 -1
  77. package/dist/esm/wayfinding/createWayfinding.d.ts +1 -1
  78. package/dist/esm/wayfinding/createWayfinding.js +1 -1
  79. package/dist/esm/wayfinding/handlers/kioskHandler.d.ts +3 -3
  80. package/dist/esm/wayfinding/handlers/kioskHandler.js +1 -1
  81. package/dist/esm/wayfinding/handlers/yahHandler.d.ts +3 -4
  82. package/dist/esm/wayfinding/handlers/yahHandler.js +1 -1
  83. package/dist/esm/wayfinding/index.d.ts +4 -7
  84. package/dist/esm/wayfinding/index.js +1 -1
  85. package/dist/esm/wayfinding/storePorts.d.ts +60 -0
  86. package/package.json +6 -5
  87. package/dist/esm/wayfinding/core/__tests__/helpers.d.ts +0 -16
  88. package/dist/esm/wayfinding/core/__tests__/helpers.js +0 -1
  89. package/dist/esm/wayfinding/core/createWayfindingEngine.d.ts +0 -16
  90. package/dist/esm/wayfinding/core/createWayfindingEngine.js +0 -1
  91. package/dist/esm/wayfinding/core/geometry/pointInPolygon.d.ts +0 -11
  92. package/dist/esm/wayfinding/core/geometry/pointInPolygon.js +0 -1
  93. package/dist/esm/wayfinding/core/geometry/projectPointOnSegment.d.ts +0 -24
  94. package/dist/esm/wayfinding/core/geometry/projectPointOnSegment.js +0 -1
  95. package/dist/esm/wayfinding/core/graph/buildGraph.d.ts +0 -3
  96. package/dist/esm/wayfinding/core/graph/buildGraph.js +0 -1
  97. package/dist/esm/wayfinding/core/graph/buildNGraph.d.ts +0 -9
  98. package/dist/esm/wayfinding/core/graph/buildNGraph.js +0 -1
  99. package/dist/esm/wayfinding/core/graph/constants.d.ts +0 -17
  100. package/dist/esm/wayfinding/core/graph/constants.js +0 -1
  101. package/dist/esm/wayfinding/core/graph/findShortestPath.d.ts +0 -14
  102. package/dist/esm/wayfinding/core/graph/findShortestPath.js +0 -1
  103. package/dist/esm/wayfinding/core/graph/graphCache.d.ts +0 -7
  104. package/dist/esm/wayfinding/core/graph/graphCache.js +0 -1
  105. package/dist/esm/wayfinding/core/graph/graphHelpers.d.ts +0 -8
  106. package/dist/esm/wayfinding/core/graph/graphHelpers.js +0 -1
  107. package/dist/esm/wayfinding/core/graph/linkCost.d.ts +0 -4
  108. package/dist/esm/wayfinding/core/graph/linkCost.js +0 -1
  109. package/dist/esm/wayfinding/core/graph/pathfinder/aStarPathFinder.d.ts +0 -3
  110. package/dist/esm/wayfinding/core/graph/pathfinder/aStarPathFinder.js +0 -1
  111. package/dist/esm/wayfinding/core/graph/pathfinder/parseNodeId.d.ts +0 -9
  112. package/dist/esm/wayfinding/core/graph/pathfinder/parseNodeId.js +0 -1
  113. package/dist/esm/wayfinding/core/index.d.ts +0 -17
  114. package/dist/esm/wayfinding/core/index.js +0 -1
  115. package/dist/esm/wayfinding/core/position/distanceToRoute.d.ts +0 -3
  116. package/dist/esm/wayfinding/core/position/distanceToRoute.js +0 -1
  117. package/dist/esm/wayfinding/core/position/gpsThreshold.d.ts +0 -31
  118. package/dist/esm/wayfinding/core/position/gpsThreshold.js +0 -1
  119. package/dist/esm/wayfinding/core/position/rerouteController.d.ts +0 -10
  120. package/dist/esm/wayfinding/core/position/rerouteController.js +0 -1
  121. package/dist/esm/wayfinding/core/position/snapToRoute.d.ts +0 -4
  122. package/dist/esm/wayfinding/core/position/snapToRoute.js +0 -1
  123. package/dist/esm/wayfinding/core/position/splitRouteByPoint.d.ts +0 -6
  124. package/dist/esm/wayfinding/core/position/splitRouteByPoint.js +0 -1
  125. package/dist/esm/wayfinding/core/rendering/computeTrailPoints.d.ts +0 -19
  126. package/dist/esm/wayfinding/core/rendering/computeTrailPoints.js +0 -1
  127. package/dist/esm/wayfinding/core/rendering/computeTransitionPoints.d.ts +0 -31
  128. package/dist/esm/wayfinding/core/rendering/computeTransitionPoints.js +0 -1
  129. package/dist/esm/wayfinding/core/rendering/getVisibleRouteLines.d.ts +0 -11
  130. package/dist/esm/wayfinding/core/rendering/getVisibleRouteLines.js +0 -1
  131. package/dist/esm/wayfinding/core/rendering/normalizeRouteDirection.d.ts +0 -20
  132. package/dist/esm/wayfinding/core/rendering/normalizeRouteDirection.js +0 -1
  133. package/dist/esm/wayfinding/core/rendering/routeGeometry.d.ts +0 -11
  134. package/dist/esm/wayfinding/core/rendering/routeGeometry.js +0 -1
  135. package/dist/esm/wayfinding/core/routing/buildMultiPointRoute.d.ts +0 -11
  136. package/dist/esm/wayfinding/core/routing/buildMultiPointRoute.js +0 -1
  137. package/dist/esm/wayfinding/core/routing/buildRoute.d.ts +0 -9
  138. package/dist/esm/wayfinding/core/routing/buildRoute.js +0 -1
  139. package/dist/esm/wayfinding/core/routing/getRouteLength.d.ts +0 -3
  140. package/dist/esm/wayfinding/core/routing/getRouteLength.js +0 -1
  141. package/dist/esm/wayfinding/core/routing/graphPointResolvers.d.ts +0 -4
  142. package/dist/esm/wayfinding/core/routing/graphPointResolvers.js +0 -1
  143. package/dist/esm/wayfinding/core/routing/optimizeWaypointOrder.d.ts +0 -19
  144. package/dist/esm/wayfinding/core/routing/optimizeWaypointOrder.js +0 -1
  145. package/dist/esm/wayfinding/core/routing/resolveWaypointCandidates.d.ts +0 -18
  146. package/dist/esm/wayfinding/core/routing/resolveWaypointCandidates.js +0 -1
  147. package/dist/esm/wayfinding/core/routing/routeResult.d.ts +0 -4
  148. package/dist/esm/wayfinding/core/routing/routeResult.js +0 -1
  149. package/dist/esm/wayfinding/core/types.d.ts +0 -106
  150. package/dist/esm/wayfinding/renderer/createWayfindingRenderer.d.ts +0 -13
  151. package/dist/esm/wayfinding/renderer/createWayfindingRenderer.js +0 -1
  152. package/dist/esm/wayfinding/renderer/iconManager.d.ts +0 -37
  153. package/dist/esm/wayfinding/renderer/iconManager.js +0 -1
  154. package/dist/esm/wayfinding/renderer/index.d.ts +0 -3
  155. package/dist/esm/wayfinding/renderer/index.js +0 -1
  156. package/dist/esm/wayfinding/renderer/layerManager.d.ts +0 -26
  157. package/dist/esm/wayfinding/renderer/layerManager.js +0 -1
  158. package/dist/esm/wayfinding/renderer/lineAnimation.d.ts +0 -7
  159. package/dist/esm/wayfinding/renderer/lineAnimation.js +0 -1
  160. package/dist/esm/wayfinding/renderer/routeLineManager.d.ts +0 -41
  161. package/dist/esm/wayfinding/renderer/routeLineManager.js +0 -1
  162. package/dist/esm/wayfinding/renderer/trailManager.d.ts +0 -30
  163. package/dist/esm/wayfinding/renderer/trailManager.js +0 -1
  164. package/dist/esm/wayfinding/renderer/types.d.ts +0 -129
  165. package/dist/esm/wayfinding/renderer/types.js +0 -1
  166. package/dist/esm/wayfinding/runtime/createWayfindingRuntime.d.ts +0 -3
  167. package/dist/esm/wayfinding/runtime/createWayfindingRuntime.js +0 -1
  168. package/dist/esm/wayfinding/runtime/endpointView.d.ts +0 -18
  169. package/dist/esm/wayfinding/runtime/endpointView.js +0 -1
  170. package/dist/esm/wayfinding/runtime/getRouteLines.d.ts +0 -13
  171. package/dist/esm/wayfinding/runtime/getRouteLines.js +0 -1
  172. package/dist/esm/wayfinding/runtime/positionTrailView.d.ts +0 -50
  173. package/dist/esm/wayfinding/runtime/positionTrailView.js +0 -1
  174. package/dist/esm/wayfinding/runtime/positionView.d.ts +0 -23
  175. package/dist/esm/wayfinding/runtime/positionView.js +0 -1
  176. package/dist/esm/wayfinding/runtime/routeLinesView.d.ts +0 -18
  177. package/dist/esm/wayfinding/runtime/routeLinesView.js +0 -1
  178. package/dist/esm/wayfinding/runtime/routeRenderData.d.ts +0 -29
  179. package/dist/esm/wayfinding/runtime/routeRenderData.js +0 -1
  180. package/dist/esm/wayfinding/runtime/routeUpdate.d.ts +0 -15
  181. package/dist/esm/wayfinding/runtime/routeUpdate.js +0 -1
  182. package/dist/esm/wayfinding/runtime/trailView.d.ts +0 -20
  183. package/dist/esm/wayfinding/runtime/trailView.js +0 -1
  184. package/dist/esm/wayfinding/runtime/transitionView.d.ts +0 -17
  185. package/dist/esm/wayfinding/runtime/transitionView.js +0 -1
  186. package/dist/esm/wayfinding/runtime/types.d.ts +0 -82
  187. package/dist/esm/wayfinding/runtime/types.js +0 -1
  188. /package/dist/esm/wayfinding/{core/types.js → storePorts.js} +0 -0
@@ -1,17 +1,17 @@
1
1
  (function() {
2
2
  try {
3
3
  var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
4
- e.SENTRY_RELEASE = { id: "3.11.10" };
4
+ e.SENTRY_RELEASE = { id: "3.11.12" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "da8db9a3-7430-483e-912d-7db8503a8231", e._sentryDebugIdIdentifier = "sentry-dbid-da8db9a3-7430-483e-912d-7db8503a8231");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-DeGKOnmi.js";
10
- import { t } from "./react-DmMDPbf6.js";
11
- import { t as n } from "./jsx-runtime-BFcovWN_.js";
12
- import { t as r } from "./classnames-DAXzFAda.js";
13
- import { D as i, i as a, l as o, n as s, s as c, u as l, y as u } from "./flex-CJNo2chr.js";
14
- import { t as d } from "./settings-item-CYaN5leI.js";
9
+ import { r as e } from "./rolldown-runtime-CJax_ib9.js";
10
+ import { t } from "./react-B9lmaQYI.js";
11
+ import { t as n } from "./jsx-runtime-DftMjMlZ.js";
12
+ import { t as r } from "./classnames-BeH2kA4o.js";
13
+ import { D as i, i as a, l as o, n as s, s as c, u as l, y as u } from "./flex-DGirEfRz.js";
14
+ import { t as d } from "./settings-item-D3AzjjoO.js";
15
15
  //#region ../../node_modules/.pnpm/@radix-ui+themes@3.3.0_@types+react-dom@19.2.3_@types+react@19.2.17__@types+react@19.2._925f851475345a9e5e368d312bb98178/node_modules/@radix-ui/themes/dist/esm/components/text-field.props.js
16
16
  var f = {
17
17
  size: {
@@ -1,18 +1,18 @@
1
1
  (function() {
2
2
  try {
3
3
  var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
4
- e.SENTRY_RELEASE = { id: "3.11.10" };
4
+ e.SENTRY_RELEASE = { id: "3.11.12" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "79b39fdf-323b-4b9d-ac58-c9e7d1f5b025", e._sentryDebugIdIdentifier = "sentry-dbid-79b39fdf-323b-4b9d-ac58-c9e7d1f5b025");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-DeGKOnmi.js";
10
- import { t } from "./react-DmMDPbf6.js";
11
- import { t as n } from "./jsx-runtime-BFcovWN_.js";
12
- import { t as r } from "./react-dom-x1kyF-NR.js";
13
- import { t as i } from "./classnames-DAXzFAda.js";
14
- import { a, c as o, i as s, n as c, o as l, r as u, t as d } from "./dist-BVYHQXIh.js";
15
- import { C as f, E as p, O as m, T as h, _ as g, o as _, v, w as y } from "./flex-CJNo2chr.js";
9
+ import { r as e } from "./rolldown-runtime-CJax_ib9.js";
10
+ import { t } from "./react-B9lmaQYI.js";
11
+ import { t as n } from "./jsx-runtime-DftMjMlZ.js";
12
+ import { t as r } from "./react-dom-CPWfZdj5.js";
13
+ import { t as i } from "./classnames-BeH2kA4o.js";
14
+ import { a, c as o, i as s, n as c, o as l, r as u, t as d } from "./dist-DKu24Nie.js";
15
+ import { C as f, E as p, O as m, T as h, _ as g, o as _, v, w as y } from "./flex-DGirEfRz.js";
16
16
  //#region ../../node_modules/.pnpm/@radix-ui+react-id@1.1.1_@types+react@19.2.17_react@19.2.7/node_modules/@radix-ui/react-id/dist/index.mjs
17
17
  var b = n(), x = /* @__PURE__ */ e(t(), 1), S = x.useId || (() => void 0), C = 0;
18
18
  function w(e) {
@@ -1,17 +1,17 @@
1
1
  (function() {
2
2
  try {
3
3
  var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
4
- e.SENTRY_RELEASE = { id: "3.11.10" };
4
+ e.SENTRY_RELEASE = { id: "3.11.12" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "43912113-9328-4069-8890-5091c8745c34", e._sentryDebugIdIdentifier = "sentry-dbid-43912113-9328-4069-8890-5091c8745c34");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-DeGKOnmi.js";
10
- import { a as t, r as n } from "./reset-all-settings-DwE3yXsg.js";
11
- import { t as r } from "./jsx-runtime-BFcovWN_.js";
12
- import "./settings-ZGkKsF0W.js";
13
- import { t as i } from "./browser-B1FqFLx2.js";
14
- import { t as a } from "./add-debug-secret-listener-mNAYRI2a.js";
9
+ import { r as e } from "./rolldown-runtime-CJax_ib9.js";
10
+ import { a as t, r as n } from "./reset-all-settings-CAVnp-HU.js";
11
+ import { t as r } from "./jsx-runtime-DftMjMlZ.js";
12
+ import "./settings-BufKqYwI.js";
13
+ import { t as i } from "./browser-pQxW93uF.js";
14
+ import { t as a } from "./add-debug-secret-listener-DOVFjqJo.js";
15
15
  //#region ../debug/src/lib/ui/render-debug-ui.tsx
16
16
  var o = /* @__PURE__ */ e(i(), 1), s = r(), c = !1;
17
17
  function l() {
@@ -26,7 +26,7 @@ function l() {
26
26
  }
27
27
  });
28
28
  let i = async (t) => {
29
- let { DebugUi: n } = await import("./debug-ui-COboE6BJ.js"), { createRoot: i } = await import("./client-DKBTR12w.js").then((t) => /* @__PURE__ */ e(t.default, 1)), a = document.createElement("div");
29
+ let { DebugUi: n } = await import("./debug-ui-D_afzMrh.js"), { createRoot: i } = await import("./client-Be_UxAZT.js").then((t) => /* @__PURE__ */ e(t.default, 1)), a = document.createElement("div");
30
30
  document.body.appendChild(a), i(a).render(/* @__PURE__ */ (0, s.jsx)(n, {
31
31
  useDebugButtonState: r.useState,
32
32
  open: t
@@ -1,14 +1,14 @@
1
1
  (function() {
2
2
  try {
3
3
  var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
4
- e.SENTRY_RELEASE = { id: "3.11.10" };
4
+ e.SENTRY_RELEASE = { id: "3.11.12" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "021d6ae2-6f50-4c3b-b556-1da4944d3c7f", e._sentryDebugIdIdentifier = "sentry-dbid-021d6ae2-6f50-4c3b-b556-1da4944d3c7f");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-DeGKOnmi.js";
10
- import { t } from "./react-DmMDPbf6.js";
11
- import { c as n } from "./store-Di4pNbj5.js";
9
+ import { r as e } from "./rolldown-runtime-CJax_ib9.js";
10
+ import { t } from "./react-B9lmaQYI.js";
11
+ import { c as n } from "./store-DGdGzsa_.js";
12
12
  //#region src/utils/getRenderTargetFromRoot.ts
13
13
  var r = /* @__PURE__ */ e(t(), 1);
14
14
  function i(e) {
@@ -1 +1 @@
1
- import{jsx as g,Fragment as C,jsxs as T}from"react/jsx-runtime";import{Box as S}from"@expofp/geometry";import{ErrorBoundary as M}from"@sentry/react";import I from"debug";import{reaction as R}from"mobx";import{createRoot as V}from"react-dom/client";import{install as $}from"resize-observer";import z from"./components/Layout";import{LANG_KEY as j,MAX_ROUTE_WAYPOINTS as m,PATHWAY_KEY as G}from"./constants";import{fpGeo as x}from"./data/fpGeo";import q from"./floorplan.loader";import{shouldLoadIntercom as N}from"./intercom";import{BoundsSchema as O,POISelectorsSchema as E,ZoomToOptionsSchema as w}from"./schemas/sdk.schemas";import{applyParameters as _,destroyHistory as Y,initRouting as H}from"./services/routing";import r from"./store";import{destroyUiHandlers as U}from"./store/init/init-ui";import{findBooth as P,Route as v,separateExternalIds as B}from"./store/RouteStore";import{destroyGtag as D,GaEventActions as F,sendEventToGa as A,setConsentSettings as K}from"./tools/gtag";import W from"./tools/report-error";import{resetGlobalVariables as X}from"./tools/reset";import Q from"./tools/track-event";import{getStorage as k}from"./utils/entity-storage";import{convertLocalToGps as Z,isValidPointCoords as y}from"./utils/gps";import{getLocales as J,hasLocale as ee}from"./utils/i18n";import{mapEntity as p}from"./utils/mapEntity";import{optimizeWaypointOrder as te}from"./wayfinding/core/routing/optimizeWaypointOrder";const b=I("efp:api");$();export default class re extends q{root;init(){this.ignoreQuery||H(this.offHistory),Q("load"),r.fp=this,K(this.allowConsent),A(F.Load,""),this.root=V(this.renderTarget),this.root.render(g(M,{children:g(z,{offHistory:this.offHistory,allowConsent:this.allowConsent})})),A(F.Rendered,""),R(()=>r.layerStore.layersLoaded,()=>{this.resolveReady(),r.initialized||this.onInit?.(this),r.initialized=!0});const e=N(window.__data);e&&import("./intercom/bootIntercom").then(({bootIntercom:t})=>t(e)).catch(()=>{})}selectBooth(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectBooth","Parameter must be a string or an array of strings.","EFP000000");return}const t=r.boothStore.booths.filter(i=>typeof e=="string"?i.name===e||i.externalId===e:e.includes(i.name)||e.includes(i.externalId));r.selectBooth(t)}selectExhibitor(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectExhibitor","Parameter must be a string or an array of strings.","EFP000100");return}if(!e?.length){r.uiState.menu=!1,r.searchStore.resetSearchBox(),r.uiState.details=null;return}const t=r.exhibitorStore.exhibitors.filter(o=>typeof e=="string"?o.name===e||o.externalId===e:e.includes(o.name)||e.includes(o.externalId));if(!t?.length)return;if(typeof e=="string"){r.selectExhibitor(t[0]),r.moveToList([t[0]]);return}const i=t.flatMap(o=>o.booths.map(s=>s.layer)),{description:n}=i.reduce((o,s)=>(o.freq[s.description]=(o.freq[s.description]||0)+1,o.freq[s.description]>o.maxCount&&(o.maxCount=o.freq[s.description],o.mostFrequent=s),o),{freq:{},mostFrequent:i[0],maxCount:0}).mostFrequent;r.layerStore.updateVisibility(n,!0),r.uiState.menu=!1,r.searchStore.resetSearchBox(),r.uiState.details=null,r.uiState.list={type:"filter",items:t,query:{key:"exhibitors",value:t.map(o=>o.externalId).join(",")}},r.moveToList()}highlightExhibitors(e){Array.isArray(e)||a("highlightExhibitors","Parameter must be an array of strings.","EFP000200"),r.boothStore.highlightedByExternalIds=[],r.exhibitorStore.highlightedByExternalIds=[...e]}highlightBooths(e){Array.isArray(e)||a("highlightBooths","Parameter must be an array of strings.","EFP000300"),r.exhibitorStore.highlightedByExternalIds=[],r.boothStore.highlightedByExternalIds=[...e]}highlightEntities(e){Array.isArray(e)||a("highlightEntities","Parameter must be an array of strings.","EFP000400");const{boothExternalIds:t,exhibitorExternalIds:i}=B(e);r.boothStore.highlightedByExternalIds=[...t],r.exhibitorStore.highlightedByExternalIds=[...i]}selectRoute(e,t){if(Array.isArray(e)){let i=[...e];const n=i.shift(),o=i.pop();if(i.length>m)throw new Error(`The maximum number of waypoints is ${m}.`);if(!n||!o){a("selectRoute","Invalid route format: When providing an array, it must include at least two points: a start and a destination.","EFP000401");return}r.routeStore.selectRoute(new v(d(n),d(o),i.map(d)));return}e||a("selectRoute","At a minimum, the starting point must be passed.","EFP000402"),r.routeStore.selectRoute(new v(d(e),d(t)))}getOptimizedRoutes(e){if(!Array.isArray(e))return a("getOptimizedRoutes","Parameter must be an array.","EFP000500"),[];if(e.length>m)throw new Error(`The maximum number of waypoints is ${m}.`);const t=e.map(d).filter(n=>!!n);if(!t.length)throw new Error("No booths found for the provided waypoints.");const i=new Map;for(const n of t){const o=n.layer?.name??"",s=i.get(o);s?s.push(n):i.set(o,[n])}return Array.from(i.values()).map(n=>({waypoints:te(n.map(o=>[o.name,{cx:o.rect.center.x,cy:o.rect.center.y}]))}))}selectCurrentPosition(e,t,i){const n=y(e.x)&&y(e.y),o=y(e.lng)&&y(e.lat);!n&&!o&&a("selectCurrentPosition","A point must be passed. Either (x,y) or (lat,lng) are required.","EFP000600"),r.routeStore.selectCurrentPosition(e,t,i),this.onCurrentPositionChanged?.(e)}setBookmarks(e){(!Array.isArray(e)||!e.length)&&a("setBookmarks","Parameter must be an array.","EFP000700"),e.forEach(t=>{const i=r.exhibitorStore.exhibitors.find(n=>n.name===t.name||n.externalId===t.externalId);i&&(i.bookmarked=t.bookmarked)})}setEntitiesBookmarks(e){if(!Array.isArray(e)||!e.length){a("setEntitiesBookmarks","Parameter must be an array.","EFP000701");return}const t=["exhibitor","event","speaker","booth"],i=e.find(s=>!s.type||!t.includes(s.type));if(i){a("setEntitiesBookmarks",`Invalid entity type: ${i.type}. Must be one of: ${t.join(", ")}.`,"EFP000702");return}const n=k("bookmarked"),o={exhibitor:{existingIds:new Set(n.exhibitors||[]),finder:s=>r.exhibitorStore.findExhibitor(s),replacer:s=>r.exhibitorStore.replaceBookmarked(s)},event:{existingIds:new Set(n.events||[]),finder:s=>r.eventStore.findByNameOrSlug(s),replacer:s=>r.eventStore.replaceBookmarked(s)},speaker:{existingIds:new Set(n.speakers||[]),finder:s=>r.speakerStore.speakers.find(h=>h.name===s||h.externalId===s||h.slug===s),replacer:s=>r.speakerStore.replaceBookmarked(s)},booth:{existingIds:new Set(n.booths||[]),finder:s=>{const h=r.boothStore.findBooth(s);return h?.exhibitors.length===0?h:void 0},replacer:s=>r.boothStore.replaceBookmarked(s)}};e.forEach(s=>{const h=o[s.type],c=s.name||s.externalId||"",u=h.finder(c);u?s.bookmarked?h.existingIds.add(u.id):h.existingIds.delete(u.id):console.warn(`Entity not found: ${s.type} with query "${c}"`)}),Object.values(o).forEach(s=>{s.replacer(Array.from(s.existingIds))})}setEntitiesVisited(e){if(!Array.isArray(e)||!e.length){a("setEntitiesVisited","Parameter must be an array.","EFP000703");return}const t=["exhibitor","event"],i=e.find(s=>!s.type||!t.includes(s.type));if(i){a("setEntitiesVisited",`Invalid entity type: ${i.type}. Must be one of: ${t.join(", ")}.`,"EFP000704");return}const n=k("visited"),o={exhibitor:{existingIds:new Set(n.exhibitors||[]),finder:s=>r.exhibitorStore.findExhibitor(s),replacer:s=>r.exhibitorStore.replaceVisited(s)},event:{existingIds:new Set(n.events||[]),finder:s=>r.eventStore.findByNameOrSlug(s),replacer:s=>r.eventStore.replaceVisited(s)}};e.forEach(s=>{const h=o[s.type],c=s.name||s.externalId||"",u=h.finder(c);u?s.visited?h.existingIds.add(u.id):h.existingIds.delete(u.id):console.warn(`Entity not found: ${s.type} with query "${c}"`)}),Object.values(o).forEach(s=>{s.replacer(Array.from(s.existingIds))})}setMarkers(e){if(!e||!Array.isArray(e.icons)||!Array.isArray(e.markers)){a("setMarkers","Invalid input.","EFP000800");return}r.routeStore.setMarkers(e)}selectMarker(e,t=!0){return typeof e!="string"&&a("selectMarker","The identifier must be passed.","EFP000900"),r.routeStore.selectMarker(e,t)}drawCircles(e){Array.isArray(e)||a("drawCircles","Invalid input.","EFP000A00"),r.uiState.debugCircles=e}checkRoutes(){r.routeStore.checkRoutes()}updateLayerVisibility(e,t){typeof e!="string"&&a("updateLayerVisibility","The layer name (string) must be passed.","EFP000B00"),t||a("updateLayerVisibility","Passing a false value to visible will have no effect.","EFP000B01"),r.layerStore.updateVisibility(e,t)}getCenterCoordinates(){return r.fp.getCenterCoordinates()}exhibitorsList(){return r.exhibitorStore.exhibitors.map(e=>p(e))}boothsList(){return r.boothStore.booths.map(e=>p(e))}categoriesList(){return r.categoryStore.categories.map(e=>p(e))}selectCategory(e){if(e==null||typeof e!="string"){r.searchStore.selectSearch();return}const t=e?.toLowerCase(),i=r.categoryStore.categories.find(({name:n,slug:o})=>n?.toLowerCase()===t||o?.toLowerCase()===t);if(!i){a("selectCategory",`Category ${e} not found.`,"EFP000C01");return}r.selectCategory(i)}applyParameters(e){typeof e!="string"&&a("applyParameters","A query string must be passed.","EFP000D00"),_(e)}getVisibility(){return r.uiState.visibility}setVisibility(e){(typeof e!="object"||!Object.keys(e).length)&&a("setVisibility","The parameter must be passed.","EFP000E00"),r.uiState.setVisibility(e)}findLocation(){r.routeStore.findLocation()}zoomIn(){r.uiState.zoomIn()}zoomOut(){r.uiState.zoomOut()}switchView(){r.maplibreStore.activateMaplibre()}zoomTo(e,t){b("zoomTo called with selectors=%O options=%O",e,t);const i=E.safeParse(e);if(!i.success){a("zoomTo",i.error.message,"EFP001600");return}const n=w.safeParse(t);if(!n.success){a("zoomTo",n.error.message,"EFP001601");return}const o=this.getBounds(e);o&&this.fitBounds(o,t)}getBounds(e){b("getBounds called with selectors=%O",e);const t=E.safeParse(e);if(!t.success){a("getBounds",t.error.message,"EFP001400");return}const i=[];if(e.booths?.forEach(o=>{let s;o.externalId?s=r.boothStore.boothByExternalId.get(o.externalId):o.name&&(s=r.boothStore.boothByName.get(o.name.toLowerCase())),s?.rect&&i.push(s.rect)}),e.exhibitors?.forEach(o=>{let s;o.externalId?s=r.exhibitorStore.exhibitorByExternalId.get(o.externalId):o.name&&(s=r.exhibitorStore.exhibitorByName.get(o.name.toLowerCase())),s?.booths?.forEach(h=>{h.rect&&i.push(h.rect)})}),i.length===0)return;const n=S.fromUnion(...i);return{leftTop:{x:n.min.x,y:n.min.y},rightBottom:{x:n.max.x,y:n.max.y}}}fitBounds(e,t){if(b("fitBounds called with bounds=%O options=%O",e,t),!e){r.uiState.fitBounds();return}const i=O.safeParse(e);if(!i.success){a("fitBounds",i.error.message,"EFP001500");return}const n=w.safeParse(t);if(!n.success){a("fitBounds",n.error.message,"EFP001501");return}const o=S.fromMinMax({x:e.leftTop.x,y:e.leftTop.y},{x:e.rightBottom.x,y:e.rightBottom.y});r.uiState.moveToRect=t?.padding?o.expand(t.padding):o}getBoothRect(e){typeof e!="string"&&a("getBoothRect","A booth name must be passed.","EFP000F00");const t=P(e)?.rect;return t?l.fromBox(t):void 0}convertToGeo(e,t){if(!x?.properties?.config){a("convertToGeo","The coordinates cannot be converted because the GPS configuration is not defined.","EFP001000");return}if(!e||!t){a("convertToGeo","Both coordinates must be passed.","EFP001001");return}return Z(e,t,x.properties.config)}getGeoConfig(){const e=x?.properties?.config;return e?{bearing:e.bearing??0,p0:e.p0,p1:e.p1,p2:e.p2}:null}unstable_destroy(){let e=window.__efpElement.firstChild;X(),window.removeEventListener("__efpStyleLoad",this.efpStyleLoadHandler),window.removeEventListener("error",W),r.maplibreStore.dispose(),Y(),U(),D(),[...document.getElementsByTagName("script")].filter(i=>i.src.indexOf("/fp.svg")>-1||i.src.indexOf("/wf.data.js")>-1||i.src.indexOf("/data.js")>-1).forEach(i=>i.remove()),this.root.unmount(),e.remove()}search(e){return typeof e!="string"&&a("search","A search string must be passed.","EFP001100"),r.fuzzySearchEngineStore.loadEngine().then(()=>(r.searchStore.selectSearch(e),r.uiState.fuzzySearchItems.map(t=>({item:p(t.item),score:t.score}))))}getFloors(){return r.layerStore.floors.map(e=>({name:e.name,shortName:e.shortName,description:e.description,active:e.active,disabled:e.disabled,index:e.index}))}activateFloor(e){if(!e?.name&&e?.index==null){a("activateFloor","Invalid floorId. It must contain either a name or an index.","EFP001200");return}const t=this.getFloors();if(e.name){const i=t.find(n=>n.name===e.name||n.shortName===e.name);if(!i){a("activateFloor",`Floor with name "${e.name}" not found.`,"EFP001201");return}if(i.active)return;this.updateLayerVisibility(i.name,!0);return}if(e.index!==null){const i=t.find(o=>o.index===e.index),n=i?.name;if(!n){a("activateFloor",`Floor at index ${e.index} does not exist.`,"EFP001203");return}if(i.active)return;this.updateLayerVisibility(n,!0);return}}showPathway(e,t){const i=new URLSearchParams;if(i.set(G,e),t?.length){const{boothExternalIds:n,exhibitorExternalIds:o}=B(t);n.length>0&&i.set("booths",n.join(",")),o.length>0&&i.set("exhibitors",o.join(","))}this.applyParameters(i.toString())}showPathwayOnly(e,t){this.activateFloor({name:t}),r.layerStore.showPathWay(e),r.uiState.setPathwayOnlyMode(!0);const i=r.layerStore.findLayer(e),n=r.layerStore.findLayer(t),o=i?.rect||i?.viewbox?i:n;if(o?.rect||o?.viewbox){const s=o.viewbox??o.rect;r.uiState.moveToRect=s.clone()}}hidePathways(){this.highlightBooths([]),r.layerStore.hidePathways(),r.uiState.setPathwayOnlyMode(!1)}showSearch(){r.selectSearch("")}changeLanguage(e){const t=e?.toLowerCase?.();if(!ee(t)){a("changeLanguage",`Language "${e}" was not found. Available languages: ${J().map(n=>n.id).join(",")}`,"EFP001300");return}const i=new URLSearchParams;i.set(j,t),this.applyParameters(i.toString())}isGpsTrackingEnabled(){return r.routeStore.gpsEnabled}setGpsTrackingEnabled(e){r.routeStore.setGpsTrackingEnabled(e)}deselectCurrentPosition(){r.routeStore.selectCurrentPosition(null,!1)}deselectRoute(){r.routeStore.selectRoute(null),r.routeStore.setOnlyAccessible(!1)}reset(){this.selectBooth(""),this.selectExhibitor(""),this.selectCategory(),this.deselectCurrentPosition(),this.deselectRoute(),this.highlightEntities([]),r.uiState.kioskData&&r.resetCameraFn?r.resetCameraFn?.():this.fitBounds()}selectAccessibleRoute(e){r.routeStore.setOnlyAccessible(!0),this.selectRoute(e)}}function d(f){return typeof f=="string"?P(f):r.routeStore.getNearestBooth(f)}let L=0;function a(f,e,t){const i=`Error calling "${f}" SDK method.`,n=`${e.endsWith(".")?e:e+"."} More information at`;let o="https://js-sdk.expofp.com/api/packages";if(t&&(o+=`#error-${t}`),console.error(`${i} ${n} ${o}`),r.fp.disableRuntimeAlerts)return;r.uiState.setGlobalErrorMessage({title:i,body:T(C,{children:[n," ",g("a",{href:o,target:"_blank",rel:"noreferrer",children:o})]})}),clearTimeout(L);const s=8e3;L=window.setTimeout(()=>{const h=async()=>{r.uiState.globalErrorMessages.length>0&&(r.uiState.popGlobalErrorMessage(),await new Promise(c=>setTimeout(c,s/2)),h())};h()},s)}class l{x1;y1;x2;y2;get h(){return Math.abs(this.y2-this.y1)}get w(){return Math.abs(this.x2-this.x1)}get cx(){return(this.x1+this.x2)/2}get cy(){return(this.y1+this.y2)/2}constructor(e,t,i,n){if(e>i){const o=e;e=i,i=o}if(t>n){const o=t;t=n,n=o}this.x1=e,this.y1=t,this.x2=i,this.y2=n}static fromBox(e){return new l(e.min.x,e.min.y,e.max.x,e.max.y)}static fromCxcywh(e,t,i,n){return new l(e-i/2,t-n/2,e+i/2,t+n/2)}contains(e){return e.x1>=this.x1&&e.x2<=this.x2&&e.y1>=this.y1&&e.y2<=this.y2}intersects(e){const t=Math.max(this.x1,e.x1),i=Math.min(this.x2,e.x2),n=Math.max(this.y1,e.y1),o=Math.min(this.y2,e.y2);return i>=t&&o>=n}getIntersection(e){const t=Math.max(this.x1,e.x1),i=Math.min(this.x2,e.x2),n=Math.max(this.y1,e.y1),o=Math.min(this.y2,e.y2);return i>=t&&o>=n?new l(t,n,i,o):new l(0,0,0,0)}getRotated90(){return l.fromCxcywh(this.cx,this.cy,this.h,this.w)}normalize(e,t){return new l(this.x1/e,this.y1/t,this.x2/e,this.y2/t)}withPadding(e,t=e){return this.w<e*2||this.h<t*2?this:l.fromCxcywh(this.cx,this.cy,this.w-e*2,this.h-t*2)}scale(e){return new l(this.x1*e,this.y1*e,this.x2*e,this.y2*e)}getArea(){return this.w*this.h}clone(){return new l(this.x1,this.y1,this.x2,this.y2)}translate(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this}equals(e){return e.x1===this.x1&&e.x2===this.x2&&e.y1===this.y1&&e.y2===this.y2}toString(){return this.x1+","+this.y1+","+this.w+","+this.h}containsPoint(e,t){return e>=this.x1&&e<=this.x2&&t>=this.y1&&t<=this.y2}}
1
+ import{jsx as g,Fragment as C,jsxs as T}from"react/jsx-runtime";import{Box as S}from"@expofp/geometry";import{optimizeWaypointOrder as M}from"@expofp/wayfinding";import{ErrorBoundary as I}from"@sentry/react";import R from"debug";import{reaction as V}from"mobx";import{createRoot as $}from"react-dom/client";import{install as z}from"resize-observer";import j from"./components/Layout";import{LANG_KEY as G,MAX_ROUTE_WAYPOINTS as m,PATHWAY_KEY as q}from"./constants";import{fpGeo as x}from"./data/fpGeo";import N from"./floorplan.loader";import{shouldLoadIntercom as O}from"./intercom";import{BoundsSchema as _,POISelectorsSchema as E,ZoomToOptionsSchema as w}from"./schemas/sdk.schemas";import{applyParameters as Y,destroyHistory as H,initRouting as U}from"./services/routing";import r from"./store";import{destroyUiHandlers as D}from"./store/init/init-ui";import{findBooth as P,Route as v,separateExternalIds as B}from"./store/RouteStore";import{destroyGtag as K,GaEventActions as F,sendEventToGa as A,setConsentSettings as W}from"./tools/gtag";import X from"./tools/report-error";import{resetGlobalVariables as Q}from"./tools/reset";import Z from"./tools/track-event";import{getStorage as k}from"./utils/entity-storage";import{convertLocalToGps as J,isValidPointCoords as y}from"./utils/gps";import{getLocales as ee,hasLocale as te}from"./utils/i18n";import{mapEntity as p}from"./utils/mapEntity";const b=R("efp:api");z();export default class re extends N{root;init(){this.ignoreQuery||U(this.offHistory),Z("load"),r.fp=this,W(this.allowConsent),A(F.Load,""),this.root=$(this.renderTarget),this.root.render(g(I,{children:g(j,{offHistory:this.offHistory,allowConsent:this.allowConsent})})),A(F.Rendered,""),V(()=>r.layerStore.layersLoaded,()=>{this.resolveReady(),r.initialized||this.onInit?.(this),r.initialized=!0});const e=O(window.__data);e&&import("./intercom/bootIntercom").then(({bootIntercom:t})=>t(e)).catch(()=>{})}selectBooth(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectBooth","Parameter must be a string or an array of strings.","EFP000000");return}const t=r.boothStore.booths.filter(i=>typeof e=="string"?i.name===e||i.externalId===e:e.includes(i.name)||e.includes(i.externalId));r.selectBooth(t)}selectExhibitor(e){if(typeof e!="string"&&!Array.isArray(e)){a("selectExhibitor","Parameter must be a string or an array of strings.","EFP000100");return}if(!e?.length){r.uiState.menu=!1,r.searchStore.resetSearchBox(),r.uiState.details=null;return}const t=r.exhibitorStore.exhibitors.filter(o=>typeof e=="string"?o.name===e||o.externalId===e:e.includes(o.name)||e.includes(o.externalId));if(!t?.length)return;if(typeof e=="string"){r.selectExhibitor(t[0]),r.moveToList([t[0]]);return}const i=t.flatMap(o=>o.booths.map(s=>s.layer)),{description:n}=i.reduce((o,s)=>(o.freq[s.description]=(o.freq[s.description]||0)+1,o.freq[s.description]>o.maxCount&&(o.maxCount=o.freq[s.description],o.mostFrequent=s),o),{freq:{},mostFrequent:i[0],maxCount:0}).mostFrequent;r.layerStore.updateVisibility(n,!0),r.uiState.menu=!1,r.searchStore.resetSearchBox(),r.uiState.details=null,r.uiState.list={type:"filter",items:t,query:{key:"exhibitors",value:t.map(o=>o.externalId).join(",")}},r.moveToList()}highlightExhibitors(e){Array.isArray(e)||a("highlightExhibitors","Parameter must be an array of strings.","EFP000200"),r.boothStore.highlightedByExternalIds=[],r.exhibitorStore.highlightedByExternalIds=[...e]}highlightBooths(e){Array.isArray(e)||a("highlightBooths","Parameter must be an array of strings.","EFP000300"),r.exhibitorStore.highlightedByExternalIds=[],r.boothStore.highlightedByExternalIds=[...e]}highlightEntities(e){Array.isArray(e)||a("highlightEntities","Parameter must be an array of strings.","EFP000400");const{boothExternalIds:t,exhibitorExternalIds:i}=B(e);r.boothStore.highlightedByExternalIds=[...t],r.exhibitorStore.highlightedByExternalIds=[...i]}selectRoute(e,t){if(Array.isArray(e)){let i=[...e];const n=i.shift(),o=i.pop();if(i.length>m)throw new Error(`The maximum number of waypoints is ${m}.`);if(!n||!o){a("selectRoute","Invalid route format: When providing an array, it must include at least two points: a start and a destination.","EFP000401");return}r.routeStore.selectRoute(new v(d(n),d(o),i.map(d)));return}e||a("selectRoute","At a minimum, the starting point must be passed.","EFP000402"),r.routeStore.selectRoute(new v(d(e),d(t)))}getOptimizedRoutes(e){if(!Array.isArray(e))return a("getOptimizedRoutes","Parameter must be an array.","EFP000500"),[];if(e.length>m)throw new Error(`The maximum number of waypoints is ${m}.`);const t=e.map(d).filter(n=>!!n);if(!t.length)throw new Error("No booths found for the provided waypoints.");const i=new Map;for(const n of t){const o=n.layer?.name??"",s=i.get(o);s?s.push(n):i.set(o,[n])}return Array.from(i.values()).map(n=>({waypoints:M(n.map(o=>[o.name,{x:o.rect.center.x,y:o.rect.center.y}]))}))}selectCurrentPosition(e,t,i){const n=y(e.x)&&y(e.y),o=y(e.lng)&&y(e.lat);!n&&!o&&a("selectCurrentPosition","A point must be passed. Either (x,y) or (lat,lng) are required.","EFP000600"),r.routeStore.selectCurrentPosition(e,t,i),this.onCurrentPositionChanged?.(e)}setBookmarks(e){(!Array.isArray(e)||!e.length)&&a("setBookmarks","Parameter must be an array.","EFP000700"),e.forEach(t=>{const i=r.exhibitorStore.exhibitors.find(n=>n.name===t.name||n.externalId===t.externalId);i&&(i.bookmarked=t.bookmarked)})}setEntitiesBookmarks(e){if(!Array.isArray(e)||!e.length){a("setEntitiesBookmarks","Parameter must be an array.","EFP000701");return}const t=["exhibitor","event","speaker","booth"],i=e.find(s=>!s.type||!t.includes(s.type));if(i){a("setEntitiesBookmarks",`Invalid entity type: ${i.type}. Must be one of: ${t.join(", ")}.`,"EFP000702");return}const n=k("bookmarked"),o={exhibitor:{existingIds:new Set(n.exhibitors||[]),finder:s=>r.exhibitorStore.findExhibitor(s),replacer:s=>r.exhibitorStore.replaceBookmarked(s)},event:{existingIds:new Set(n.events||[]),finder:s=>r.eventStore.findByNameOrSlug(s),replacer:s=>r.eventStore.replaceBookmarked(s)},speaker:{existingIds:new Set(n.speakers||[]),finder:s=>r.speakerStore.speakers.find(h=>h.name===s||h.externalId===s||h.slug===s),replacer:s=>r.speakerStore.replaceBookmarked(s)},booth:{existingIds:new Set(n.booths||[]),finder:s=>{const h=r.boothStore.findBooth(s);return h?.exhibitors.length===0?h:void 0},replacer:s=>r.boothStore.replaceBookmarked(s)}};e.forEach(s=>{const h=o[s.type],c=s.name||s.externalId||"",u=h.finder(c);u?s.bookmarked?h.existingIds.add(u.id):h.existingIds.delete(u.id):console.warn(`Entity not found: ${s.type} with query "${c}"`)}),Object.values(o).forEach(s=>{s.replacer(Array.from(s.existingIds))})}setEntitiesVisited(e){if(!Array.isArray(e)||!e.length){a("setEntitiesVisited","Parameter must be an array.","EFP000703");return}const t=["exhibitor","event"],i=e.find(s=>!s.type||!t.includes(s.type));if(i){a("setEntitiesVisited",`Invalid entity type: ${i.type}. Must be one of: ${t.join(", ")}.`,"EFP000704");return}const n=k("visited"),o={exhibitor:{existingIds:new Set(n.exhibitors||[]),finder:s=>r.exhibitorStore.findExhibitor(s),replacer:s=>r.exhibitorStore.replaceVisited(s)},event:{existingIds:new Set(n.events||[]),finder:s=>r.eventStore.findByNameOrSlug(s),replacer:s=>r.eventStore.replaceVisited(s)}};e.forEach(s=>{const h=o[s.type],c=s.name||s.externalId||"",u=h.finder(c);u?s.visited?h.existingIds.add(u.id):h.existingIds.delete(u.id):console.warn(`Entity not found: ${s.type} with query "${c}"`)}),Object.values(o).forEach(s=>{s.replacer(Array.from(s.existingIds))})}setMarkers(e){if(!e||!Array.isArray(e.icons)||!Array.isArray(e.markers)){a("setMarkers","Invalid input.","EFP000800");return}r.routeStore.setMarkers(e)}selectMarker(e,t=!0){return typeof e!="string"&&a("selectMarker","The identifier must be passed.","EFP000900"),r.routeStore.selectMarker(e,t)}drawCircles(e){Array.isArray(e)||a("drawCircles","Invalid input.","EFP000A00"),r.uiState.debugCircles=e}checkRoutes(){r.routeStore.checkRoutes()}updateLayerVisibility(e,t){typeof e!="string"&&a("updateLayerVisibility","The layer name (string) must be passed.","EFP000B00"),t||a("updateLayerVisibility","Passing a false value to visible will have no effect.","EFP000B01"),r.layerStore.updateVisibility(e,t)}getCenterCoordinates(){return r.fp.getCenterCoordinates()}exhibitorsList(){return r.exhibitorStore.exhibitors.map(e=>p(e))}boothsList(){return r.boothStore.booths.map(e=>p(e))}categoriesList(){return r.categoryStore.categories.map(e=>p(e))}selectCategory(e){if(e==null||typeof e!="string"){r.searchStore.selectSearch();return}const t=e?.toLowerCase(),i=r.categoryStore.categories.find(({name:n,slug:o})=>n?.toLowerCase()===t||o?.toLowerCase()===t);if(!i){a("selectCategory",`Category ${e} not found.`,"EFP000C01");return}r.selectCategory(i)}applyParameters(e){typeof e!="string"&&a("applyParameters","A query string must be passed.","EFP000D00"),Y(e)}getVisibility(){return r.uiState.visibility}setVisibility(e){(typeof e!="object"||!Object.keys(e).length)&&a("setVisibility","The parameter must be passed.","EFP000E00"),r.uiState.setVisibility(e)}findLocation(){r.routeStore.findLocation()}zoomIn(){r.uiState.zoomIn()}zoomOut(){r.uiState.zoomOut()}switchView(){r.maplibreStore.activateMaplibre()}zoomTo(e,t){b("zoomTo called with selectors=%O options=%O",e,t);const i=E.safeParse(e);if(!i.success){a("zoomTo",i.error.message,"EFP001600");return}const n=w.safeParse(t);if(!n.success){a("zoomTo",n.error.message,"EFP001601");return}const o=this.getBounds(e);o&&this.fitBounds(o,t)}getBounds(e){b("getBounds called with selectors=%O",e);const t=E.safeParse(e);if(!t.success){a("getBounds",t.error.message,"EFP001400");return}const i=[];if(e.booths?.forEach(o=>{let s;o.externalId?s=r.boothStore.boothByExternalId.get(o.externalId):o.name&&(s=r.boothStore.boothByName.get(o.name.toLowerCase())),s?.rect&&i.push(s.rect)}),e.exhibitors?.forEach(o=>{let s;o.externalId?s=r.exhibitorStore.exhibitorByExternalId.get(o.externalId):o.name&&(s=r.exhibitorStore.exhibitorByName.get(o.name.toLowerCase())),s?.booths?.forEach(h=>{h.rect&&i.push(h.rect)})}),i.length===0)return;const n=S.fromUnion(...i);return{leftTop:{x:n.min.x,y:n.min.y},rightBottom:{x:n.max.x,y:n.max.y}}}fitBounds(e,t){if(b("fitBounds called with bounds=%O options=%O",e,t),!e){r.uiState.fitBounds();return}const i=_.safeParse(e);if(!i.success){a("fitBounds",i.error.message,"EFP001500");return}const n=w.safeParse(t);if(!n.success){a("fitBounds",n.error.message,"EFP001501");return}const o=S.fromMinMax({x:e.leftTop.x,y:e.leftTop.y},{x:e.rightBottom.x,y:e.rightBottom.y});r.uiState.moveToRect=t?.padding?o.expand(t.padding):o}getBoothRect(e){typeof e!="string"&&a("getBoothRect","A booth name must be passed.","EFP000F00");const t=P(e)?.rect;return t?l.fromBox(t):void 0}convertToGeo(e,t){if(!x?.properties?.config){a("convertToGeo","The coordinates cannot be converted because the GPS configuration is not defined.","EFP001000");return}if(!e||!t){a("convertToGeo","Both coordinates must be passed.","EFP001001");return}return J(e,t,x.properties.config)}getGeoConfig(){const e=x?.properties?.config;return e?{bearing:e.bearing??0,p0:e.p0,p1:e.p1,p2:e.p2}:null}unstable_destroy(){let e=window.__efpElement.firstChild;Q(),window.removeEventListener("__efpStyleLoad",this.efpStyleLoadHandler),window.removeEventListener("error",X),r.maplibreStore.dispose(),H(),D(),K(),[...document.getElementsByTagName("script")].filter(i=>i.src.indexOf("/fp.svg")>-1||i.src.indexOf("/wf.data.js")>-1||i.src.indexOf("/data.js")>-1).forEach(i=>i.remove()),this.root.unmount(),e.remove()}search(e){return typeof e!="string"&&a("search","A search string must be passed.","EFP001100"),r.fuzzySearchEngineStore.loadEngine().then(()=>(r.searchStore.selectSearch(e),r.uiState.fuzzySearchItems.map(t=>({item:p(t.item),score:t.score}))))}getFloors(){return r.layerStore.floors.map(e=>({name:e.name,shortName:e.shortName,description:e.description,active:e.active,disabled:e.disabled,index:e.index}))}activateFloor(e){if(!e?.name&&e?.index==null){a("activateFloor","Invalid floorId. It must contain either a name or an index.","EFP001200");return}const t=this.getFloors();if(e.name){const i=t.find(n=>n.name===e.name||n.shortName===e.name);if(!i){a("activateFloor",`Floor with name "${e.name}" not found.`,"EFP001201");return}if(i.active)return;this.updateLayerVisibility(i.name,!0);return}if(e.index!==null){const i=t.find(o=>o.index===e.index),n=i?.name;if(!n){a("activateFloor",`Floor at index ${e.index} does not exist.`,"EFP001203");return}if(i.active)return;this.updateLayerVisibility(n,!0);return}}showPathway(e,t){const i=new URLSearchParams;if(i.set(q,e),t?.length){const{boothExternalIds:n,exhibitorExternalIds:o}=B(t);n.length>0&&i.set("booths",n.join(",")),o.length>0&&i.set("exhibitors",o.join(","))}this.applyParameters(i.toString())}showPathwayOnly(e,t){this.activateFloor({name:t}),r.layerStore.showPathWay(e),r.uiState.setPathwayOnlyMode(!0);const i=r.layerStore.findLayer(e),n=r.layerStore.findLayer(t),o=i?.rect||i?.viewbox?i:n;if(o?.rect||o?.viewbox){const s=o.viewbox??o.rect;r.uiState.moveToRect=s.clone()}}hidePathways(){this.highlightBooths([]),r.layerStore.hidePathways(),r.uiState.setPathwayOnlyMode(!1)}showSearch(){r.selectSearch("")}changeLanguage(e){const t=e?.toLowerCase?.();if(!te(t)){a("changeLanguage",`Language "${e}" was not found. Available languages: ${ee().map(n=>n.id).join(",")}`,"EFP001300");return}const i=new URLSearchParams;i.set(G,t),this.applyParameters(i.toString())}isGpsTrackingEnabled(){return r.routeStore.gpsEnabled}setGpsTrackingEnabled(e){r.routeStore.setGpsTrackingEnabled(e)}deselectCurrentPosition(){r.routeStore.selectCurrentPosition(null,!1)}deselectRoute(){r.routeStore.selectRoute(null),r.routeStore.setOnlyAccessible(!1)}reset(){this.selectBooth(""),this.selectExhibitor(""),this.selectCategory(),this.deselectCurrentPosition(),this.deselectRoute(),this.highlightEntities([]),r.uiState.kioskData&&r.resetCameraFn?r.resetCameraFn?.():this.fitBounds()}selectAccessibleRoute(e){r.routeStore.setOnlyAccessible(!0),this.selectRoute(e)}}function d(f){return typeof f=="string"?P(f):r.routeStore.getNearestBooth(f)}let L=0;function a(f,e,t){const i=`Error calling "${f}" SDK method.`,n=`${e.endsWith(".")?e:e+"."} More information at`;let o="https://js-sdk.expofp.com/api/packages";if(t&&(o+=`#error-${t}`),console.error(`${i} ${n} ${o}`),r.fp.disableRuntimeAlerts)return;r.uiState.setGlobalErrorMessage({title:i,body:T(C,{children:[n," ",g("a",{href:o,target:"_blank",rel:"noreferrer",children:o})]})}),clearTimeout(L);const s=8e3;L=window.setTimeout(()=>{const h=async()=>{r.uiState.globalErrorMessages.length>0&&(r.uiState.popGlobalErrorMessage(),await new Promise(c=>setTimeout(c,s/2)),h())};h()},s)}class l{x1;y1;x2;y2;get h(){return Math.abs(this.y2-this.y1)}get w(){return Math.abs(this.x2-this.x1)}get cx(){return(this.x1+this.x2)/2}get cy(){return(this.y1+this.y2)/2}constructor(e,t,i,n){if(e>i){const o=e;e=i,i=o}if(t>n){const o=t;t=n,n=o}this.x1=e,this.y1=t,this.x2=i,this.y2=n}static fromBox(e){return new l(e.min.x,e.min.y,e.max.x,e.max.y)}static fromCxcywh(e,t,i,n){return new l(e-i/2,t-n/2,e+i/2,t+n/2)}contains(e){return e.x1>=this.x1&&e.x2<=this.x2&&e.y1>=this.y1&&e.y2<=this.y2}intersects(e){const t=Math.max(this.x1,e.x1),i=Math.min(this.x2,e.x2),n=Math.max(this.y1,e.y1),o=Math.min(this.y2,e.y2);return i>=t&&o>=n}getIntersection(e){const t=Math.max(this.x1,e.x1),i=Math.min(this.x2,e.x2),n=Math.max(this.y1,e.y1),o=Math.min(this.y2,e.y2);return i>=t&&o>=n?new l(t,n,i,o):new l(0,0,0,0)}getRotated90(){return l.fromCxcywh(this.cx,this.cy,this.h,this.w)}normalize(e,t){return new l(this.x1/e,this.y1/t,this.x2/e,this.y2/t)}withPadding(e,t=e){return this.w<e*2||this.h<t*2?this:l.fromCxcywh(this.cx,this.cy,this.w-e*2,this.h-t*2)}scale(e){return new l(this.x1*e,this.y1*e,this.x2*e,this.y2*e)}getArea(){return this.w*this.h}clone(){return new l(this.x1,this.y1,this.x2,this.y2)}translate(e,t){return this.x1+=e,this.x2+=e,this.y1+=t,this.y2+=t,this}equals(e){return e.x1===this.x1&&e.x2===this.x2&&e.y1===this.y1&&e.y2===this.y2}toString(){return this.x1+","+this.y1+","+this.w+","+this.h}containsPoint(e,t){return e>=this.x1&&e<=this.x2&&t>=this.y1&&t<=this.y2}}
@@ -1 +1 @@
1
- import{loadCustomFonts as e}from"../tools/loaders";export async function loadCustomCss(s,o){if(s?.customCss){const t=document.createElement("style");t.textContent=s.customCss,o.append(t),await e(s.customCss)}}
1
+ import{loadCustomFonts as n}from"../tools/loaders";export async function loadCustomCss(t,o){if(t?.customCss){const e=document.createElement("style");if(e.textContent=t.customCss,document.head.append(e),typeof ShadowRoot<"u"&&o instanceof ShadowRoot){const s=document.createElement("style");s.textContent=t.customCss,o.append(s)}await n(t.customCss)}}
@@ -1,4 +1,4 @@
1
- import { CURRENT_POSITION_POINT_ID } from '../runtime/positionView';
1
+ import { CURRENT_POSITION_POINT_ID } from '@expofp/wayfinding';
2
2
  /** Display name for an {@link ArbitraryPoint} derived from the current GPS position. */
3
3
  export declare const CURRENT_LOCATION_NAME = "Your Location";
4
4
  export { CURRENT_POSITION_POINT_ID };
@@ -1 +1 @@
1
- import{CURRENT_POSITION_POINT_ID as I}from"../runtime/positionView";export const CURRENT_LOCATION_NAME="Your Location";export{I as CURRENT_POSITION_POINT_ID};export const KIOSK_ANCHOR_POINT_ID="kiosk-anchor";export function toArbitraryPoint(r,o,t){return{id:t,x:r.x,y:r.y,layer:r.z!=null?String(r.z):"",name:o}}
1
+ import{CURRENT_POSITION_POINT_ID as I}from"@expofp/wayfinding";export const CURRENT_LOCATION_NAME="Your Location";export{I as CURRENT_POSITION_POINT_ID};export const KIOSK_ANCHOR_POINT_ID="kiosk-anchor";export function toArbitraryPoint(r,o,t){return{id:t,x:r.x,y:r.y,layer:r.z!=null?String(r.z):"",name:o}}
@@ -1,7 +1,7 @@
1
- import type { Booth } from '../../store/BoothStore';
2
- import type { RouteEndpoint } from '../core';
1
+ import type { RouteEndpoint } from '@expofp/wayfinding';
2
+ import type { BoothSource } from '../storePorts';
3
3
  /**
4
- * Converts an efp `Booth` to a neutral {@link RouteEndpoint}. The booth's
4
+ * Converts an efp booth to a neutral {@link RouteEndpoint}. The booth's
5
5
  * (possibly rotated) rectangle becomes a 4-vertex polygon used by the engine
6
6
  * as a containment region for graph-point lookup.
7
7
  *
@@ -9,5 +9,5 @@ import type { RouteEndpoint } from '../core';
9
9
  * the geometry package convention, so it feeds the geometry Rect directly.
10
10
  * Corner order is top-left, top-right, bottom-right, bottom-left.
11
11
  */
12
- export declare function boothToEndpoint(booth: Booth): RouteEndpoint;
12
+ export declare function boothToEndpoint(booth: BoothSource): RouteEndpoint;
13
13
  //# sourceMappingURL=boothToEndpoint.d.ts.map
@@ -5,7 +5,7 @@
5
5
  * All canvases are pre-created eagerly.
6
6
  * Fallback canvases are used when custom images are not available.
7
7
  */
8
- import type { IconProvider } from '../runtime/types';
8
+ import type { IconProvider } from '@expofp/wayfinding';
9
9
  interface CanvasIconProviderConfig {
10
10
  /** Icon image map — typically store.fp.icons */
11
11
  readonly iconMap: Map<string, HTMLImageElement>;
@@ -1,6 +1,6 @@
1
+ import type { FloorContext } from '@expofp/wayfinding';
1
2
  import type LayerStore from '../../store/LayerStore';
2
3
  import type RouteStore from '../../store/RouteStore';
3
- import { type FloorContext } from '../runtime/types';
4
4
  /**
5
5
  * Adapter: builds a neutral {@link FloorContext} from the efp `LayerStore` +
6
6
  * `RouteStore`. Single place in the code that knows about efp-specific magic
@@ -1,4 +1,4 @@
1
- import { type GraphDataSource } from '../core';
1
+ import type { GraphDataSource } from '@expofp/wayfinding';
2
2
  /** Reads the app's wayfinding graph data from `window.__wfData`. */
3
3
  export declare function createGraphDataSource(): GraphDataSource;
4
4
  //# sourceMappingURL=graphDataSource.d.ts.map
@@ -1,11 +1,12 @@
1
- import { type CurrentPosition } from '../../store/RouteStore';
2
- import { type PositionInput } from '../runtime/types';
1
+ import type { PositionInput } from '@expofp/wayfinding';
2
+ import type { PositionView } from '../storePorts';
3
3
  /**
4
- * Converts the efp `CurrentPosition` class instance to a neutral
5
- * `PositionInput` for the runtime.
4
+ * Converts an efp position read-model to a neutral `PositionInput` for the
5
+ * runtime.
6
6
  *
7
- * `z` in CurrentPosition can be `number | string | undefined`; the runtime
8
- * expects `layer: string`. Non-finite `angle` becomes `undefined`.
7
+ * `z` can be `number | string | undefined`; the runtime expects `layer:
8
+ * string`. The efp `angle` maps to the neutral `heading`; non-finite values
9
+ * become `undefined`.
9
10
  */
10
- export declare function positionInput(position: CurrentPosition): PositionInput;
11
+ export declare function positionInput(position: PositionView): PositionInput;
11
12
  //# sourceMappingURL=positionInput.d.ts.map
@@ -1 +1 @@
1
- export function positionInput(e){return{x:e.x,y:e.y,layer:e.z!=null?String(e.z):"",angle:Number.isFinite(e.angle)?e.angle:void 0}}
1
+ export function positionInput(e){return{x:e.x,y:e.y,layer:e.z!=null?String(e.z):"",heading:Number.isFinite(e.angle)?e.angle:void 0}}
@@ -1,41 +1,28 @@
1
- import type LayerStore from '../store/LayerStore';
2
- import type RouteStore from '../store/RouteStore';
3
- import type UIState from '../store/UIState';
1
+ import type { Wayfinding } from '@expofp/wayfinding';
4
2
  import type { KioskHandler } from './handlers/kioskHandler';
5
3
  import type { YahHandler } from './handlers/yahHandler';
6
- import type { WayfindingRuntime } from './runtime/types';
4
+ import type { LayerStorePort, RouteStorePort, UiStatePort } from './storePorts';
7
5
  interface BindMobxReactionsArgs {
8
- readonly runtime: WayfindingRuntime;
6
+ readonly wayfinding: Pick<Wayfinding, 'setRoute' | 'clearRoute' | 'setPosition' | 'notifyFloorChanged' | 'shouldReroute'>;
9
7
  readonly kioskHandler: KioskHandler;
10
8
  readonly yahHandler: YahHandler;
11
- /**
12
- * TODO (improvement): typing these as concrete `store/*` classes couples this
13
- * glue to the store and produces type-only madge cycles (harmless at runtime —
14
- * `import type` is erased). To make the wf glue fully store-type-free, invert
15
- * into local ports (as done for `FloorContext`/`IconProvider`).
16
- */
17
9
  readonly stores: {
18
- readonly routeStore: RouteStore;
19
- readonly uiState: UIState;
20
- readonly layerStore: LayerStore;
10
+ readonly routeStore: RouteStorePort;
11
+ readonly uiState: UiStatePort;
12
+ readonly layerStore: LayerStorePort;
21
13
  };
22
- /** Plan-scale-aware reroute threshold (SVG units). Computed by
23
- * `createWayfinding` from `fpGeo` and passed in — keeps this module
24
- * free of plan-config knowledge. */
25
- readonly rerouteThresholdSvg: number;
26
14
  }
27
15
  /**
28
- * Wires the observable efp stores to the imperative wayfinding runtime and
16
+ * Wires the observable efp stores to the imperative wayfinding instance and
29
17
  * the efp-side kiosk/yah handlers. Each reaction translates observable
30
18
  * changes into neutral-typed imperative calls.
31
19
  *
32
- * Also owns the reroute controller (closure-scoped, no module globals) and
33
- * triggers `routeStore.rebuildRouteFromPosition` when the live CP needs to
34
- * become (or refresh) the route's FROM.
20
+ * Triggers `routeStore.rebuildRouteFromPosition` (via `wayfinding.shouldReroute`) when
21
+ * the live CP needs to become (or refresh) the route's FROM.
35
22
  *
36
23
  * Returns a dispose function that tears down all reactions plus the deferred
37
24
  * floor-change timeout.
38
25
  */
39
- export declare function bindMobxReactions({ runtime, kioskHandler, yahHandler, stores: { routeStore, uiState, layerStore }, rerouteThresholdSvg, }: BindMobxReactionsArgs): () => void;
26
+ export declare function bindMobxReactions({ wayfinding, kioskHandler, yahHandler, stores: { routeStore, uiState, layerStore }, }: BindMobxReactionsArgs): () => void;
40
27
  export {};
41
28
  //# sourceMappingURL=bindMobxReactions.d.ts.map
@@ -1 +1 @@
1
- import{comparer as E,reaction as c}from"mobx";import{boothToEndpoint as P,CURRENT_LOCATION_NAME as C,CURRENT_POSITION_POINT_ID as a,positionInput as x,toArbitraryPoint as T}from"./adapters";import{createRerouteController as k}from"./core";const b=i=>"rect"in i?P(i):i;export function bindMobxReactions({runtime:i,kioskHandler:A,yahHandler:R,stores:{routeStore:t,uiState:e,layerStore:l},rerouteThresholdSvg:g}){const f=[],F=k(g);function m(){const o=e.selectedRoute,n=o?.from?b(o.from):null,s=o?.to?b(o.to):null;if(!n||!s){i.clearRoute();return}i.setRoute({from:n,to:s,waypoints:o?.waypoints?.map(P),accessible:t.onlyAccessible})===!1&&console.error(new Error(`Route not found: (${n.x},${n.y}) \u2192 (${s.x},${s.y})`))}function u(){const o=t.currentPosition,n=t.iconType!==0,s=e.selectedRoute,d=!!(s?.from&&s?.to),y=n&&!d;if(!o){i.onPositionChanged(null),R(null);return}const p=x(o);y?(i.onPositionChanged(null),R({x:p.x,y:p.y,layer:p.layer})):(R(null),i.onPositionChanged(p))}function I(){const o=t.currentPosition,n=e.selectedRoute;if(!o||!n?.to)return;const s=!n.from,y=n.from?.id===a&&F.shouldReroute(x(o),t.routeLines);!s&&!y||t.rebuildRouteFromPosition(T(o,C,a))}function h(){const o=l.floors.find(n=>n.active)?.name;A(e.kioskData??null,o,l.mode)}function L(){const o=e.selectedRoute,n=t.currentPosition;if(!o?.to||!n||o.from?.id!==a||t.routeLines.length>0)return;const s=n.z!=null?String(n.z):"";o.from.x===n.x&&o.from.y===n.y&&o.from.layer===s||t.rebuildRouteFromPosition(T(n,C,a))}f.push(c(()=>l.layersLoaded,()=>{m(),u()}),c(()=>[e.selectedRoute,t.onlyAccessible],()=>{m(),u()}),c(()=>t.currentPosition,()=>{u()}),c(()=>{const o=t.currentPosition;return o?{x:o.x,y:o.y,z:o.z}:null},()=>{I(),L()},{equals:E.structural}),c(()=>[e.kioskData,l.floors.find(o=>o.active)],()=>h()));let r=null;const N=c(()=>[t.currentRouteLayer,e.getRouteNextFloor],()=>{l.layersLoaded&&(r!==null&&clearTimeout(r),r=setTimeout(()=>{i.onFloorChanged(),u(),r=null},0))});return f.push(()=>{r!==null&&clearTimeout(r),N()}),m(),u(),h(),()=>{for(const o of f)o();f.length=0}}
1
+ import{comparer as E,reaction as c}from"mobx";import{boothToEndpoint as h,CURRENT_LOCATION_NAME as x,CURRENT_POSITION_POINT_ID as m,positionInput as T,toArbitraryPoint as b}from"./adapters";const A=s=>"rect"in s?h(s):s;export function bindMobxReactions({wayfinding:s,kioskHandler:C,yahHandler:R,stores:{routeStore:n,uiState:i,layerStore:l}}){const f=[];function a(){const o=i.selectedRoute,t=o?.from?A(o.from):null,e=o?.to?A(o.to):null;if(!t||!e){s.clearRoute();return}s.setRoute({from:t,to:e,waypoints:o?.waypoints?.map(h),accessible:n.onlyAccessible})===!1&&console.error(new Error(`Route not found: (${t.x},${t.y}) \u2192 (${e.x},${e.y})`))}function u(){const o=n.currentPosition,t=n.iconType!==0,e=i.selectedRoute,p=!!(e?.from&&e?.to),y=t&&!p;if(!o){s.setPosition(null),R(null);return}const d=T(o);y?(s.setPosition(null),R({x:d.x,y:d.y,layer:d.layer})):(R(null),s.setPosition(d))}function F(){const o=n.currentPosition,t=i.selectedRoute;if(!o||!t?.to)return;const e=!t.from,y=t.from?.id===m&&s.shouldReroute(T(o));!e&&!y||n.rebuildRouteFromPosition(b(o,x,m))}function P(){const o=l.floors.find(t=>t.active)?.name;C(i.kioskData??null,o,l.mode)}function I(){const o=i.selectedRoute,t=n.currentPosition;if(!o?.to||!t||o.from?.id!==m||n.routeLines.length>0)return;const e=t.z!=null?String(t.z):"";o.from.x===t.x&&o.from.y===t.y&&o.from.layer===e||n.rebuildRouteFromPosition(b(t,x,m))}f.push(c(()=>l.layersLoaded,()=>{a(),u()}),c(()=>[i.selectedRoute,n.onlyAccessible],()=>{a(),u()}),c(()=>n.currentPosition,()=>{u()}),c(()=>{const o=n.currentPosition;return o?{x:o.x,y:o.y,z:o.z}:null},()=>{F(),I()},{equals:E.structural}),c(()=>[i.kioskData,l.floors.find(o=>o.active)],()=>P()));let r=null;const N=c(()=>[n.currentRouteLayer,i.getRouteNextFloor],()=>{l.layersLoaded&&(r!==null&&clearTimeout(r),r=setTimeout(()=>{s.notifyFloorChanged(),u(),r=null},0))});return f.push(()=>{r!==null&&clearTimeout(r),N()}),a(),u(),P(),()=>{for(const o of f)o();f.length=0}}
@@ -1,6 +1,6 @@
1
+ import { type Route, type RouteEndpoint } from '@expofp/wayfinding';
1
2
  import { type RendererService } from '../renderer';
2
3
  import type RootStore from '../store/RootStore';
3
- import { type Route, type RouteEndpoint } from './core';
4
4
  /** Whether `createWayfinding` has run and not yet been disposed. */
5
5
  export declare function isWayfindingReady(): boolean;
6
6
  /**
@@ -1 +1 @@
1
- import{fpGeo as l}from"../data/fpGeo";import{createImageDef as M,createLineDef as W,getRotation as P,rectToRenderer as I}from"../renderer";import{pickDefaultScene as g}from"../renderer/engine-core/defs";import{createCanvasIconProvider as N,createFloorContext as k,createGraphDataSource as w}from"./adapters";import{bindMobxReactions as x}from"./bindMobxReactions";import{createWayfindingEngine as C,getThresholdFromMetersToSvg as D,getThresholdSafe as b,resolveRerouteThresholdSvg as F,SNAP_THRESHOLD_METERS as H}from"./core";import{createKioskHandler as Y}from"./handlers/kioskHandler";import{createYahHandler as O}from"./handlers/yahHandler";import{WF_CURRENT_POSITION_LAYER_NAME as G,WF_LINES_ANIMATED_LAYER_NAME as U,WF_LINES_LAYER_NAME as q,WF_POINTS_LAYER_NAME as z,WF_TRAIL_LAYER_NAME as K}from"./layers";import{createWayfindingRenderer as V}from"./renderer";import{createWayfindingRuntime as j}from"./runtime/createWayfindingRuntime";let a=null;export function isWayfindingReady(){return a!==null}function B(){if(!a)throw new Error("Wayfinding is not initialized \u2014 call createWayfinding() first.");return a}export function buildRoute(n,t,s){return B().engine.buildRoute(n,t,s)}export function createWayfinding(n,t){const s=w(),d=C(s),h=N({iconMap:t.fp.icons,pixelRatio:devicePixelRatio}),r=V({createImageDef:M,createLineDef:W,getRotation:P,rectToRenderer:I,getScale:()=>n.scale,getLayers:()=>{const e=n.scene;if(!e)throw new Error("renderer: rendererService.scene is null \u2014 start RendererService first");return e.rootLayer.children},update:(...e)=>n.update(...e)}),f=k(t.layerStore,t.routeStore),c={points:z,trail:K,lines:q,linesAnimated:U,currentPosition:G},y=b(l?.properties?.config?.snapThreshold)||H,S=D({thresholdInMeters:y,gpsConfig:l?.properties?.config}),p=j({engine:d,renderer:r,iconProvider:h,floorContext:f,layers:c,snapThreshold:S,onTransitionClick:e=>{e.role==="exit"&&t.layerStore.updateVisibility(e.targetLayer,!0)},onRouteUpdate:(e,o)=>{t.routeStore.updateRoute(e),o.isEmpty()||(t.uiState.moveToRect=o)},onRouteDistance:e=>t.routeStore.updateRouteDistance(e)}),E=Y({renderer:r,kioskIconMap:t.fp.icons,layer:c.points}),v=O({renderer:r,iconMap:t.fp.icons,pixelRatio:devicePixelRatio,floorContext:f,layer:c.points}),_=F(l?.properties?.config),L=x({runtime:p,kioskHandler:E,yahHandler:v,stores:{routeStore:t.routeStore,uiState:t.uiState,layerStore:t.layerStore},rerouteThresholdSvg:_}),i=n.renderer;if(!i)throw new Error("renderer: rendererService.renderer is null \u2014 start RendererService first");const A=n.onPtScale("wayfinding",e=>{const o=r.applyScale(e);o.length&&n.update(...o)}),T=n.onRoll("wayfinding",e=>{const o=r.applyRoll(e);o.length&&n.update(...o)}),u=e=>r.handleClick(g(e.data).defs),m=e=>{i.canvas.style.cursor=r.handleHover(g(e.data).defs)?"pointer":""};i.events.addEventListener("pointer:click",u),i.events.addEventListener("pointer:move",m),t.routeStore.showAccessible=s.getLines().some(e=>e.unaccessible);const R={engine:d};return a=R,r.flush(),()=>{i.events.removeEventListener("pointer:click",u),i.events.removeEventListener("pointer:move",m),a===R&&(a=null,A(),T(),t.routeStore.showAccessible=!1),L(),p.destroy()}}
1
+ import{createWayfinding as g}from"@expofp/wayfinding";import{fpGeo as L}from"../data/fpGeo";import{createImageDef as _,createLineDef as A,getRotation as h,rectToRenderer as W}from"../renderer";import{pickDefaultScene as p}from"../renderer/engine-core/defs";import{createCanvasIconProvider as w,createFloorContext as I,createGraphDataSource as P}from"./adapters";import{bindMobxReactions as k}from"./bindMobxReactions";import{createKioskHandler as x}from"./handlers/kioskHandler";import{createYahHandler as M}from"./handlers/yahHandler";import{WF_CURRENT_POSITION_LAYER_NAME as N,WF_LINES_ANIMATED_LAYER_NAME as C,WF_LINES_LAYER_NAME as T,WF_POINTS_LAYER_NAME as b,WF_TRAIL_LAYER_NAME as D}from"./layers";let o=null;export function isWayfindingReady(){return o!==null}function F(){if(!o)throw new Error("Wayfinding is not initialized \u2014 call createWayfinding() first.");return o}export function buildRoute(r,t,a){return F().wayfinding.buildRoute(r,t,a)}export function createWayfinding(r,t){const a=P(),y=w({iconMap:t.fp.icons,pixelRatio:devicePixelRatio}),s=I(t.layerStore,t.routeStore),c={points:b,trail:D,lines:T,linesAnimated:C,currentPosition:N},n=g({dataSource:a,renderer:{createImageDef:_,createLineDef:A,getRotation:h,rectToRenderer:W,getScale:()=>r.scale,getLayers:()=>{const e=r.scene;if(!e)throw new Error("renderer: rendererService.scene is null \u2014 start RendererService first");return e.rootLayer.children},update:(...e)=>r.update(...e)},iconProvider:y,floorContext:s,layers:c,gpsConfig:L?.properties?.config,onTransitionClick:e=>{e.role==="exit"&&t.layerStore.updateVisibility(e.targetLayer,!0)},onRouteUpdate:(e,u)=>{t.routeStore.updateRoute([...e]),u.isEmpty()||(t.uiState.moveToRect=u)},onRouteDistance:e=>t.routeStore.updateRouteDistance(e)}),R=x({wayfinding:n,kioskIconMap:t.fp.icons,layer:c.points}),m=M({wayfinding:n,iconMap:t.fp.icons,pixelRatio:devicePixelRatio,floorContext:s,layer:c.points}),S=k({wayfinding:n,kioskHandler:R,yahHandler:m,stores:{routeStore:t.routeStore,uiState:t.uiState,layerStore:t.layerStore}}),i=r.renderer;if(!i)throw new Error("renderer: rendererService.renderer is null \u2014 start RendererService first");const v=r.onPtScale("wayfinding",e=>{n.applyScale(e)}),E=r.onRoll("wayfinding",e=>{n.applyRoll(e)}),l=e=>n.handleClick(p(e.data).defs),d=e=>{i.canvas.style.cursor=n.handleHover(p(e.data).defs)?"pointer":""};i.events.addEventListener("pointer:click",l),i.events.addEventListener("pointer:move",d),t.routeStore.showAccessible=a.getLines().some(e=>e.unaccessible);const f={wayfinding:n};return o=f,n.flush(),()=>{i.events.removeEventListener("pointer:click",l),i.events.removeEventListener("pointer:move",d),o===f&&(o=null,v(),E(),t.routeStore.showAccessible=!1),S(),n.destroy()}}
@@ -1,5 +1,5 @@
1
+ import type { Wayfinding } from '@expofp/wayfinding';
1
2
  import type { Kiosk } from '../../components/Kiosk/SetKiosk';
2
- import type { WayfindingRenderer } from '../renderer';
3
3
  /**
4
4
  * Updates the kiosk icon in response to store changes.
5
5
  *
@@ -17,8 +17,8 @@ export type KioskHandler = (kiosk: Kiosk | null, activeFloor: string | undefined
17
17
  * runtime's portability: the runtime deals with source/destination/position/
18
18
  * transitions only, and never learns that kiosks exist.
19
19
  */
20
- export declare function createKioskHandler({ renderer, kioskIconMap, layer, }: {
21
- renderer: WayfindingRenderer;
20
+ export declare function createKioskHandler({ wayfinding, kioskIconMap, layer, }: {
21
+ wayfinding: Pick<Wayfinding, 'setIcon' | 'flush'>;
22
22
  kioskIconMap: Map<string, HTMLImageElement> | undefined;
23
23
  layer: string;
24
24
  }): KioskHandler;
@@ -1 +1 @@
1
- import{degToRad as u}from"@expofp/geometry";import{createKioskCanvas as s}from"../adapters";const n="kiosk",i=0;export function createKioskHandler({renderer:t,kioskIconMap:f,layer:a}){return(o,c,l)=>{if(!o){t.setIcon(n,null),t.flush();return}if(l!==i&&o.z&&c&&o.z!==c){t.setIcon(n,null),t.flush();return}t.setIcon(n,{canvas:s(f,o.iconSizePercent),layer:a,x:o.x,y:o.y,rotation:u(o.heading??0)}),t.flush()}}
1
+ import{degToRad as u}from"@expofp/geometry";import{createKioskCanvas as s}from"../adapters";const r="kiosk",f=0;export function createKioskHandler({wayfinding:o,kioskIconMap:c,layer:n}){return(e,t,l)=>{if(!e){o.setIcon(r,null),o.flush();return}if(l!==f&&e.z&&t&&e.z!==t){o.setIcon(r,null),o.flush();return}o.setIcon(r,{canvas:s(c,e.iconSizePercent),layer:n,x:e.x,y:e.y,rotation:u(e.heading??0)}),o.flush()}}
@@ -1,5 +1,4 @@
1
- import { type WayfindingRenderer } from '../renderer';
2
- import { type FloorContext } from '../runtime/types';
1
+ import type { FloorContext, Wayfinding } from '@expofp/wayfinding';
3
2
  /**
4
3
  * Places or hides the "You Are Here" marker. An efp-specific map annotation
5
4
  * (shown when `routeStore.iconType !== 0` and no active route) — separated
@@ -13,8 +12,8 @@ export type YahHandler = (position: {
13
12
  readonly y: number;
14
13
  readonly layer: string;
15
14
  } | null) => void;
16
- export declare function createYahHandler({ renderer, iconMap, pixelRatio, floorContext, layer, }: {
17
- renderer: WayfindingRenderer;
15
+ export declare function createYahHandler({ wayfinding, iconMap, pixelRatio, floorContext, layer, }: {
16
+ wayfinding: Pick<Wayfinding, 'setIcon' | 'flush'>;
18
17
  iconMap: Map<string, HTMLImageElement>;
19
18
  pixelRatio: number;
20
19
  floorContext: FloorContext;
@@ -1 +1 @@
1
- import{createImageCanvas as f,createYahCanvas as l}from"../../components/Map/drawing/config/canvases";import{decreaseByPercentage as o}from"../../utils/math";const c="yah",u="#ff4343",A=64,C=90,_=32;function E(a,e){const n=a.get(c);return n?(n.id=c,f(n,o(A,_),o(C,_),e)):l(e,u)}export function createYahHandler({renderer:a,iconMap:e,pixelRatio:n,floorContext:i,layer:I}){const s=E(e,n);return s.id="current-location-2",t=>{if(!t){a.setIcon(c,null),a.flush();return}const r=i.isLayerVisible(t.layer);a.setIcon(c,{canvas:s,layer:I,x:t.x,y:t.y,hidden:!r,dimmed:!r,origin:[.5,1]}),a.flush()}}
1
+ import{createImageCanvas as u,createYahCanvas as A}from"../../components/Map/drawing/config/canvases";import{decreaseByPercentage as o}from"../../utils/math";const n="yah",C="#ff4343",E=64,H=90,_=32;function Y(e,a){const r=e.get(n);return r?(r.id=n,u(r,o(E,_),o(H,_),a)):A(a,C)}export function createYahHandler({wayfinding:e,iconMap:a,pixelRatio:r,floorContext:I,layer:l}){const c=Y(a,r);return c.id="current-location-2",t=>{if(!t){e.setIcon(n,null),e.flush();return}const s=I.isLayerVisible(t.layer);e.setIcon(n,{canvas:c,layer:l,x:t.x,y:t.y,hidden:!s,dimmed:!s,origin:[.5,1]}),e.flush()}}
@@ -1,13 +1,10 @@
1
1
  /**
2
2
  * efp-side wayfinding facade — the single entry the floorplan app imports from
3
3
  * (stores, mount points). Re-exports the bootstrap (`createWayfinding`), the
4
- * runtime facade (`buildRoute`/`isWayfindingReady`), the glue endpoint helpers,
5
- * and the `RouteLine` type.
6
- *
7
- * When `core`/`runtime`/`renderer` move into `@expofp/wayfinding`, this file
8
- * stays on the efp side and re-points the type exports at the package.
4
+ * runtime facade (`isWayfindingReady`), and the glue endpoint helpers.
9
5
  */
10
6
  export { boothToEndpoint, CURRENT_LOCATION_NAME, CURRENT_POSITION_POINT_ID, KIOSK_ANCHOR_POINT_ID, toArbitraryPoint, } from './adapters';
11
- export type { RouteLine } from './core';
12
- export { buildRoute, createWayfinding, isWayfindingReady } from './createWayfinding';
7
+ export { buildRoute } from './createWayfinding';
8
+ export { createWayfinding, isWayfindingReady } from './createWayfinding';
9
+ export type { RouteLine } from '@expofp/wayfinding';
13
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- export{boothToEndpoint,CURRENT_LOCATION_NAME,CURRENT_POSITION_POINT_ID,KIOSK_ANCHOR_POINT_ID,toArbitraryPoint}from"./adapters";export{buildRoute,createWayfinding,isWayfindingReady}from"./createWayfinding";
1
+ export{boothToEndpoint,CURRENT_LOCATION_NAME,CURRENT_POSITION_POINT_ID,KIOSK_ANCHOR_POINT_ID,toArbitraryPoint}from"./adapters";export{buildRoute}from"./createWayfinding";export{createWayfinding,isWayfindingReady}from"./createWayfinding";
@@ -0,0 +1,60 @@
1
+ import type { Box } from '@expofp/geometry';
2
+ import type { Kiosk } from '../components/Kiosk/SetKiosk/types';
3
+ import type { ArbitraryPoint } from './adapters';
4
+ /**
5
+ * Structural read-model ports for {@link bindMobxReactions}.
6
+ *
7
+ * The glue only reads raw observables off the efp stores, so these are type-only
8
+ * shapes the concrete `RouteStore` / `UIState` / `LayerStore` satisfy structurally
9
+ * — the live instances pass straight through, MobX tracking is preserved, and the
10
+ * glue stays free of `store/*` types.
11
+ */
12
+ /** Booth-shaped endpoint, narrowed to what the glue + `boothToEndpoint` read. */
13
+ export interface BoothSource {
14
+ /** `number` (efp `Booth.id`) — discriminates against `ArbitraryPoint`'s string id. */
15
+ readonly id: number;
16
+ readonly rect: Box;
17
+ readonly rotate: number;
18
+ readonly layer?: {
19
+ readonly name?: string;
20
+ } | null;
21
+ }
22
+ export type RouteEndpointSource = BoothSource | ArbitraryPoint;
23
+ export interface RouteView {
24
+ readonly from: RouteEndpointSource | null;
25
+ readonly to: RouteEndpointSource | null;
26
+ readonly waypoints?: readonly BoothSource[];
27
+ }
28
+ /** User position the glue feeds to `positionInput` / `toArbitraryPoint`. */
29
+ export interface PositionView {
30
+ readonly x: number;
31
+ readonly y: number;
32
+ readonly z?: number | string;
33
+ readonly angle?: number;
34
+ }
35
+ export interface RouteStorePort {
36
+ readonly currentPosition: PositionView | null;
37
+ readonly iconType: number;
38
+ readonly onlyAccessible: boolean;
39
+ /** Only `.length` is read (route-built recovery check). */
40
+ readonly routeLines: readonly unknown[];
41
+ readonly currentRouteLayer: {
42
+ readonly name: string;
43
+ } | null;
44
+ rebuildRouteFromPosition(from: ArbitraryPoint): void;
45
+ }
46
+ export interface UiStatePort {
47
+ readonly selectedRoute: RouteView | null;
48
+ readonly kioskData: Kiosk | null | undefined;
49
+ /** Reaction dependency only. */
50
+ readonly getRouteNextFloor: string | null;
51
+ }
52
+ export interface LayerStorePort {
53
+ readonly floors: readonly {
54
+ readonly name: string;
55
+ readonly active: boolean;
56
+ }[];
57
+ readonly mode: number;
58
+ readonly layersLoaded: boolean;
59
+ }
60
+ //# sourceMappingURL=storePorts.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expofp/floorplan",
3
- "version": "3.11.10",
3
+ "version": "3.11.12",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/expofp/efp-app.git",
@@ -35,7 +35,7 @@
35
35
  "!dist/stats.json"
36
36
  ],
37
37
  "dependencies": {
38
- "@expofp/renderer": "3.2.5",
38
+ "@expofp/renderer": "^3.2.4",
39
39
  "@sentry/core": "^10.62.0",
40
40
  "@sentry/react": "^10.62.0",
41
41
  "bowser": "^2.14.1",
@@ -72,9 +72,10 @@
72
72
  "tslib": "^2.3.0",
73
73
  "uuid": "^9.0.1",
74
74
  "zod": "4.3.5",
75
- "@expofp/geometry": "3.11.10",
76
- "@expofp/resolve": "3.11.10",
77
- "@expofp/debug": "3.11.10"
75
+ "@expofp/debug": "3.11.12",
76
+ "@expofp/resolve": "3.11.12",
77
+ "@expofp/wayfinding": "3.11.12",
78
+ "@expofp/geometry": "3.11.12"
78
79
  },
79
80
  "devDependencies": {
80
81
  "@babel/plugin-proposal-decorators": "^8.0.2",
@@ -1,16 +0,0 @@
1
- import { type GraphBuildOptions, type GraphDataSource, type GraphInstance, type GraphLine, type PathNode, type RoutePoint } from '../types';
2
- export declare function makePoint(layer: string, x: number, y: number): RoutePoint;
3
- export declare function makeLine(p0: RoutePoint, p1: RoutePoint, overrides?: Partial<Omit<GraphLine, 'p0' | 'p1'>>): GraphLine;
4
- export declare function makeNode(layer: string, x: number, y: number): PathNode;
5
- export declare function createMockDataSource(options?: {
6
- lines?: GraphLine[];
7
- lineEnds?: RoutePoint[];
8
- }): GraphDataSource;
9
- export declare function createMockGraph(options?: {
10
- lines?: GraphLine[];
11
- lineEnds?: RoutePoint[];
12
- hasNodeResult?: boolean | ((id: string) => boolean);
13
- findResult?: PathNode[] | ((fromId: string, toId: string) => PathNode[]);
14
- graphOptions?: GraphBuildOptions;
15
- }): GraphInstance;
16
- //# sourceMappingURL=helpers.d.ts.map
@@ -1 +0,0 @@
1
- import{vi as i}from"vitest";export function makePoint(e,n,t){return{layer:e,x:n,y:t}}export function makeLine(e,n,t={}){return{p0:e,p1:n,unaccessible:!1,unidirection:!1,virtual:!1,weight:4,...t}}export function makeNode(e,n,t){return{id:`${e}_${n}_${t}`,layer:e,x:n,y:t}}export function createMockDataSource(e={}){return{getLines:()=>e.lines??[],getLineEnds:()=>e.lineEnds??[]}}export function createMockGraph(e={}){const{lines:n=[],lineEnds:t=[],hasNodeResult:o=!0,findResult:r=[],graphOptions:u}=e;return{finder:{build:i.fn(),hasNode:typeof o=="function"?i.fn(o):i.fn().mockReturnValue(o),find:typeof r=="function"?i.fn(r):i.fn().mockReturnValue(r)},dataSource:{getLines:()=>n,getLineEnds:()=>t},options:u??{oriented:!0}}}
@@ -1,16 +0,0 @@
1
- import type { GraphDataSource, RouteEndpoint, RouteLine } from './types';
2
- export interface Route {
3
- readonly lines: RouteLine[];
4
- readonly distance: number;
5
- }
6
- export interface WayfindingEngine {
7
- buildRoute(from: RouteEndpoint, to: RouteEndpoint, options?: {
8
- accessible?: boolean;
9
- }): Route;
10
- buildWaypointsRoute(waypoints: RouteEndpoint[], options?: {
11
- accessible?: boolean;
12
- fastest?: boolean;
13
- }): Route;
14
- }
15
- export declare function createWayfindingEngine(dataSource: GraphDataSource): WayfindingEngine;
16
- //# sourceMappingURL=createWayfindingEngine.d.ts.map
@@ -1 +0,0 @@
1
- import{createGraphCache as G}from"./graph/graphCache";import{buildMultiPointRoute as b}from"./routing/buildMultiPointRoute";import{buildRoute as R}from"./routing/buildRoute";import{getRouteLength as m}from"./routing/getRouteLength";import{reorderWaypoints as y}from"./routing/optimizeWaypointOrder";import{resolveWaypointCandidates as h}from"./routing/resolveWaypointCandidates";const g=1e-6,u=(e,t)=>e.layer===t.layer&&Math.abs(e.x-t.x)<g&&Math.abs(e.y-t.y)<g;function O(e,t){if(!e.length)return e;const n=e[e.length-1],o=n.p1,r=u(t.segment.p0,o)?t.segment.p1:t.segment.p0;return u(n.p0,r)?[...e.slice(0,-1),{...n,p1:t.projection}]:[...e,{...t.segment,p0:o,p1:t.projection}]}function j(e,t){if(!e.length)return e;const n=e[0],o=n.p0,r=u(t.segment.p0,o)?t.segment.p1:t.segment.p0;return u(n.p1,r)?[{...n,p0:t.projection},...e.slice(1)]:[{...t.segment,p0:t.projection,p1:o},...e]}function E(e,t,n){let o=e;return t&&(o=O(o,t)),n&&(o=j(o,n)),o}export function createWayfindingEngine(e){const t=G();return{buildRoute(n,o,r){const i=t.getOrBuild(e,r?.accessible??!1),s=h(i,n),a=h(i,o),c=R(i,s.candidates,a.candidates),p=!!s.offGraphEntry||!!a.offGraphEntry,f=E(c.lines,s.offGraphEntry,a.offGraphEntry);return{lines:f,distance:p?m(f):c.totalDistance}},buildWaypointsRoute(n,o){if(n.length<2)return{lines:[],distance:0};const r=t.getOrBuild(e,o?.accessible??!1),s=(o?.fastest?y(n):n).map(d=>h(r,d)),a=b(r,s.map(d=>d.candidates)),c=s[0].offGraphEntry,p=s[s.length-1].offGraphEntry,f=!!c||!!p,l=E(a.lines,c,p);return{lines:l,distance:f?m(l):a.totalDistance}}}}