@expofp/floorplan 3.36.0 → 3.37.0

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 (92) hide show
  1. package/dist/browser/{Button-2F0fcPWt.js → Button-CNs8VDGG.js} +5 -5
  2. package/dist/browser/{CookieConsent-Bs_a5mWS.js → CookieConsent-CcBA-IqC.js} +7 -7
  3. package/dist/browser/{Debug-CD7jIIc9.js → Debug-DzeeojOv.js} +7 -7
  4. package/dist/browser/{DebugTools-0QH5g7VI.js → DebugTools-Cg2kMVuz.js} +6 -6
  5. package/dist/browser/{Demo-CaQvpK66.js → Demo-DlX2eRc5.js} +9 -9
  6. package/dist/browser/{Free-DvMwspKE.js → Free-BPXxN14i.js} +9 -9
  7. package/dist/browser/{GalleryContainer-Dwlzieq8.js → GalleryContainer-D3PtNDq1.js} +10 -10
  8. package/dist/browser/{GpsLoader-BPoEXpR_.js → GpsLoader-MuKCP4hM.js} +26 -26
  9. package/dist/browser/KioskStore-DwJPzK8K.js +251 -0
  10. package/dist/browser/{MaplibreAdapter-CDSNSGMJ.js → MaplibreAdapter-DzycfkS9.js} +606 -605
  11. package/dist/browser/{ModalContainer-C0C_-D7Q.js → ModalContainer-U0c94Gcg.js} +10 -10
  12. package/dist/browser/{PermissionNotice-Ditp-Va7.js → PermissionNotice-DyTh0N80.js} +6 -6
  13. package/dist/browser/{SetKioskMode-Ch3P8jsl.js → SetKioskMode-DFNqggA2.js} +13 -13
  14. package/dist/browser/{ShowKiosk-D0NS-rMr.js → ShowKiosk-BuXxL7Re.js} +11 -11
  15. package/dist/browser/{ViewerMenuPanel-CH9tB2Sp.js → ViewerMenuPanel--flTFhEB.js} +10 -10
  16. package/dist/browser/{add-debug-secret-listener-Cw8yc4RW.js → add-debug-secret-listener-DvCB0ort.js} +1 -1
  17. package/dist/browser/{adopt-global-settings-Bc_AVw2I.js → adopt-global-settings-CVQmrlox.js} +9 -9
  18. package/dist/browser/{boolean-editor-DySssKe_.js → boolean-editor-Bk6Lfd_2.js} +9 -9
  19. package/dist/browser/{bootIntercom-veK3GB2r.js → bootIntercom-iv5wse99.js} +2 -2
  20. package/dist/browser/bundle.json +71 -71
  21. package/dist/browser/{camera-events-BX1-wPbL.js → camera-events-Uyswpptc.js} +1 -1
  22. package/dist/browser/{classnames-C1ATXib6.js → classnames-TUIUYS3L.js} +2 -2
  23. package/dist/browser/{client-Bdn_b8IB.js → client-Bm485HWD.js} +5 -5
  24. package/dist/browser/{components-ElNUYOon.js → components-DcbtuzgN.js} +1183 -1181
  25. package/dist/browser/{debug-context-iU8AaPvD.js → debug-context-CiRcA5z7.js} +5 -5
  26. package/dist/browser/{debug-overlay-Dqyz5mZZ.js → debug-overlay-BaIOFaoE.js} +10 -10
  27. package/dist/browser/{debug-ui-DPeQ3uf5.js → debug-ui-B3yO6QTa.js} +6 -6
  28. package/dist/browser/{dimming-CZLGDSAM.js → dimming-y3MYb4O3.js} +261 -261
  29. package/dist/browser/{dist-C2H8aaYx.js → dist-BaXVVYa9.js} +5 -5
  30. package/dist/browser/{dist-CLxwCMUL.js → dist-DAWn7KI8.js} +6 -6
  31. package/dist/browser/{dist-BE-vw9Dz.js → dist-fMLrkr8V.js} +3 -3
  32. package/dist/browser/{efp-debug-init-BD4LKeS1.js → efp-debug-init-CVDjWVXl.js} +3 -3
  33. package/dist/browser/{enum-editor-DntlOPuq.js → enum-editor-B-vJDdwf.js} +4 -4
  34. package/dist/browser/{es5-CjrUZ-uf.js → es5-CYKbplUA.js} +2 -2
  35. package/dist/browser/{event-head-CIqZD5NQ.js → event-head-BtayW8HA.js} +1 -1
  36. package/dist/browser/{event-not-found-DRIf3y4d.js → event-not-found-B4Tz7V1H.js} +3 -3
  37. package/dist/browser/{exports-m4XDiy76.js → exports-DTjBGI92.js} +1 -1
  38. package/dist/browser/{favicon-uIHQnsih.js → favicon-Bq3vaHM_.js} +1 -1
  39. package/dist/browser/{fetch-retry.umd-D-ufgiKo.js → fetch-retry.umd-Cw9OsA-s.js} +2 -2
  40. package/dist/browser/{flex-h9aGr8BA.js → flex-C0jlxRr9.js} +5 -5
  41. package/dist/browser/{floorplan.loader-DnpZi_x0.js → floorplan.loader-B0b2d8rT.js} +10 -10
  42. package/dist/browser/{floorplan.ready-BhJ0AYxK.js → floorplan.ready-Bi2mkI_V.js} +187 -192
  43. package/dist/browser/{fuse-kGJ6CyvN.js → fuse-CS-5RDcg.js} +2 -2
  44. package/dist/browser/{i18n-8GhKJLji.js → i18n-LVijVdMb.js} +5 -5
  45. package/dist/browser/index.js +16 -16
  46. package/dist/browser/{index.module-DXWLW2QZ.js → index.module-D7TtIVgi.js} +4 -4
  47. package/dist/browser/{integrateKiosk-Cwhicybg.js → integrateKiosk-BmVtSyFv.js} +4 -4
  48. package/dist/browser/{is-own-domain-BgHODyPb.js → is-own-domain-BL66TBhN.js} +1 -1
  49. package/dist/browser/{is-webview-8mSd5e7Z.js → is-webview-DwQBZFcX.js} +1 -1
  50. package/dist/browser/{jsx-runtime-Db0wke-m.js → jsx-runtime-DS8yJ69h.js} +2 -2
  51. package/dist/browser/{kiosk-record-BmUy79vX.js → kiosk-record-goZjGV8Y.js} +1 -1
  52. package/dist/browser/{lib-DYJdAHez.js → lib-dIwLYV0z.js} +3 -3
  53. package/dist/browser/{loadImage-DiOgFRgU.js → loadImage-BDk9loud.js} +4 -4
  54. package/dist/browser/{logDeviceInfo-Z3261diM.js → logDeviceInfo-227-j__X.js} +9 -9
  55. package/dist/browser/{mobx-BcDFojrl.js → mobx-D3NRVJz0.js} +4 -4
  56. package/dist/browser/{optional-boolean-editor-CW1Is1sb.js → optional-boolean-editor-BtWARd1i.js} +3 -3
  57. package/dist/browser/{optional-enum-editor-BkTQr_mP.js → optional-enum-editor-CJEQ7pDc.js} +4 -4
  58. package/dist/browser/{optional-string-editor-CQkcvxq9.js → optional-string-editor-Bd6a7i5L.js} +4 -4
  59. package/dist/browser/{particles.min-Ds4mtQz5.js → particles.min-CGC94f9R.js} +2 -2
  60. package/dist/browser/{react-Bws4GHzE.js → react-DUWO7pPs.js} +2 -2
  61. package/dist/browser/{react-dom-DKAc03u1.js → react-dom-C08Q2osf.js} +3 -3
  62. package/dist/browser/{rolldown-runtime-Bmk6v0JP.js → rolldown-runtime-CooLcCzw.js} +1 -1
  63. package/dist/browser/{scheduler-BXv92Cfb.js → scheduler-DuPfkMc5.js} +2 -2
  64. package/dist/browser/{select-BCscymDn.js → select-4KfoG4mp.js} +10 -10
  65. package/dist/browser/{settings-CrabU4sN.js → settings-Dbl2f0ow.js} +2 -2
  66. package/dist/browser/{settings-item-BZ_U0h8B.js → settings-item-CRyyzC8b.js} +6 -6
  67. package/dist/browser/{store-DJXUxGeN.js → store-BcEvlgIF.js} +3050 -3031
  68. package/dist/browser/{string-editor-CnG22Oly.js → string-editor-lytU5wX-.js} +4 -4
  69. package/dist/browser/{text-field-NVbcJEkm.js → text-field-BGvPdsaN.js} +5 -5
  70. package/dist/browser/{theme-eBX8BNJC.js → theme-CxFvVGHQ.js} +8 -8
  71. package/dist/browser/{ui-BPpyJIAd.js → ui-D3H7hMUC.js} +8 -8
  72. package/dist/browser/{useRenderTarget-yW52M18A.js → useRenderTarget-DGSXEfzc.js} +4 -4
  73. package/dist/browser/{viewport-nGSeFdsb.js → viewport-BczDYrg4.js} +3 -3
  74. package/dist/esm/components/Kiosk/KioskStore.d.ts +8 -0
  75. package/dist/esm/components/Kiosk/KioskStore.js +1 -1
  76. package/dist/esm/components/Kiosk/kiosk-mode.d.ts +18 -2
  77. package/dist/esm/components/Kiosk/kiosk-mode.js +1 -1
  78. package/dist/esm/components/Map/MapCamera.js +1 -1
  79. package/dist/esm/components/Map/camera-events.d.ts +9 -6
  80. package/dist/esm/components/Map/pointer.d.ts +7 -5
  81. package/dist/esm/components/MapControlsContainer.js +1 -1
  82. package/dist/esm/components/Maplibre/MaplibreAdapter.js +1 -1
  83. package/dist/esm/components/Maplibre/useKioskCameraEvents.d.ts +20 -0
  84. package/dist/esm/components/Maplibre/useKioskCameraEvents.js +1 -0
  85. package/dist/esm/intercom/shouldLoad.js +1 -1
  86. package/dist/esm/store/UIState.d.ts +2 -0
  87. package/dist/esm/store/UIState.js +1 -1
  88. package/dist/esm/store/init/init-ui.js +1 -1
  89. package/package.json +10 -10
  90. package/dist/browser/KioskStore-BSg4K_mL.js +0 -241
  91. package/dist/esm/components/Maplibre/useKioskIdleEvents.d.ts +0 -17
  92. package/dist/esm/components/Maplibre/useKioskIdleEvents.js +0 -1
@@ -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.36.0" };
4
+ e.SENTRY_RELEASE = { id: "3.37.0" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "8f241b7f-d106-4e96-a6a2-b96a0f9abf69", e._sentryDebugIdIdentifier = "sentry-dbid-8f241b7f-d106-4e96-a6a2-b96a0f9abf69");
7
7
  } catch {}
8
8
  })();
9
- import { t as e } from "./jsx-runtime-Db0wke-m.js";
10
- import { t } from "./settings-item-BZ_U0h8B.js";
11
- import { t as n } from "./text-field-NVbcJEkm.js";
9
+ import { t as e } from "./jsx-runtime-DS8yJ69h.js";
10
+ import { t } from "./settings-item-CRyyzC8b.js";
11
+ import { t as n } from "./text-field-BGvPdsaN.js";
12
12
  //#region ../debug/src/lib/ui/string-editor.tsx
13
13
  var r = e(), i = (e) => {
14
14
  var i;
@@ -1,15 +1,15 @@
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.36.0" };
4
+ e.SENTRY_RELEASE = { id: "3.37.0" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "e13f8c4e-8995-47cd-802d-392fd9bdf13a", e._sentryDebugIdIdentifier = "sentry-dbid-e13f8c4e-8995-47cd-802d-392fd9bdf13a");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-Bmk6v0JP.js";
10
- import { t } from "./react-Bws4GHzE.js";
11
- import { D as n, i as r, l as i, n as a, s as o, u as s, y as c } from "./flex-h9aGr8BA.js";
12
- import { t as l } from "./classnames-C1ATXib6.js";
9
+ import { r as e } from "./rolldown-runtime-CooLcCzw.js";
10
+ import { t } from "./react-DUWO7pPs.js";
11
+ import { D as n, i as r, l as i, n as a, s as o, u as s, y as c } from "./flex-C0jlxRr9.js";
12
+ import { t as l } from "./classnames-TUIUYS3L.js";
13
13
  //#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._5ea800d4e947acedb1fa1275f1697b17/node_modules/@radix-ui/themes/dist/esm/components/text-field.props.js
14
14
  var u = /* @__PURE__ */ e(t()), d = /* @__PURE__ */ e(l()), f = {
15
15
  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.36.0" };
4
+ e.SENTRY_RELEASE = { id: "3.37.0" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "5b26ff7f-61de-4d09-8508-a74b71b94f98", e._sentryDebugIdIdentifier = "sentry-dbid-5b26ff7f-61de-4d09-8508-a74b71b94f98");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-Bmk6v0JP.js";
10
- import { t } from "./react-Bws4GHzE.js";
11
- import { t as n } from "./jsx-runtime-Db0wke-m.js";
12
- import { t as r } from "./react-dom-DKAc03u1.js";
13
- import { C as i, E as a, O as o, T as s, _ as c, o as l, v as u, w as d } from "./flex-h9aGr8BA.js";
14
- import { c as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./dist-CLxwCMUL.js";
15
- import { t as y } from "./classnames-C1ATXib6.js";
9
+ import { r as e } from "./rolldown-runtime-CooLcCzw.js";
10
+ import { t } from "./react-DUWO7pPs.js";
11
+ import { t as n } from "./jsx-runtime-DS8yJ69h.js";
12
+ import { t as r } from "./react-dom-C08Q2osf.js";
13
+ import { C as i, E as a, O as o, T as s, _ as c, o as l, v as u, w as d } from "./flex-C0jlxRr9.js";
14
+ import { c as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./dist-DAWn7KI8.js";
15
+ import { t as y } from "./classnames-TUIUYS3L.js";
16
16
  //#region ../../node_modules/.pnpm/@radix-ui+react-visually-hidden@1.2.3_@types+react-dom@19.2.3_@types+react@19.2.17__@ty_cffccd7838985066e8e1d993b5cb6017/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
17
17
  var b = /* @__PURE__ */ e(r(), 1), x = /* @__PURE__ */ e(t(), 1), S = n(), C = Object.freeze({
18
18
  position: "absolute",
@@ -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.36.0" };
4
+ e.SENTRY_RELEASE = { id: "3.37.0" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "80a4f49f-d869-4a38-b1c0-c3cfd645ceec", e._sentryDebugIdIdentifier = "sentry-dbid-80a4f49f-d869-4a38-b1c0-c3cfd645ceec");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-Bmk6v0JP.js";
10
- import { a as t, i as n, s as r } from "./efp-debug-init-BD4LKeS1.js";
11
- import { a as i, i as a } from "./adopt-global-settings-Bc_AVw2I.js";
12
- import { t as o } from "./jsx-runtime-Db0wke-m.js";
13
- import "./settings-CrabU4sN.js";
14
- import { t as s } from "./add-debug-secret-listener-Cw8yc4RW.js";
9
+ import { r as e } from "./rolldown-runtime-CooLcCzw.js";
10
+ import { a as t, i as n, s as r } from "./efp-debug-init-CVDjWVXl.js";
11
+ import { a as i, i as a } from "./adopt-global-settings-CVQmrlox.js";
12
+ import { t as o } from "./jsx-runtime-DS8yJ69h.js";
13
+ import "./settings-Dbl2f0ow.js";
14
+ import { t as s } from "./add-debug-secret-listener-DvCB0ort.js";
15
15
  //#region ../debug/src/lib/ui/render-debug-ui.tsx
16
16
  var c = /* @__PURE__ */ e(r(), 1), l = o(), u = !1;
17
17
  function d() {
@@ -26,7 +26,7 @@ function d() {
26
26
  }
27
27
  });
28
28
  let o = async (t) => {
29
- let { DebugUi: n } = await import("./debug-ui-DPeQ3uf5.js"), { createRoot: i } = await import("./client-Bdn_b8IB.js").then((t) => /* @__PURE__ */ e(t.t(), 1)), a = document.createElement("div");
29
+ let { DebugUi: n } = await import("./debug-ui-B3yO6QTa.js"), { createRoot: i } = await import("./client-Bm485HWD.js").then((t) => /* @__PURE__ */ e(t.t(), 1)), a = document.createElement("div");
30
30
  document.body.appendChild(a), i(a).render(/* @__PURE__ */ (0, l.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.36.0" };
4
+ e.SENTRY_RELEASE = { id: "3.37.0" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "44feeb02-c84e-4fb1-b2f8-984c7d50f58d", e._sentryDebugIdIdentifier = "sentry-dbid-44feeb02-c84e-4fb1-b2f8-984c7d50f58d");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-Bmk6v0JP.js";
10
- import { t } from "./react-Bws4GHzE.js";
11
- import { l as n } from "./store-DJXUxGeN.js";
9
+ import { r as e } from "./rolldown-runtime-CooLcCzw.js";
10
+ import { t } from "./react-DUWO7pPs.js";
11
+ import { l as n } from "./store-BcEvlgIF.js";
12
12
  //#region ../ui/src/shared/activeElement.ts
13
13
  var r = (e) => !!e && "activeElement" in e;
14
14
  function i(e) {
@@ -1,12 +1,12 @@
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.36.0" };
4
+ e.SENTRY_RELEASE = { id: "3.37.0" };
5
5
  var t = new e.Error().stack;
6
- t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "c4f57458-fee1-48bc-a518-81372913a556", e._sentryDebugIdIdentifier = "sentry-dbid-c4f57458-fee1-48bc-a518-81372913a556");
6
+ t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "233b3b22-a917-48c8-8f7e-f558b0dbd9d8", e._sentryDebugIdIdentifier = "sentry-dbid-233b3b22-a917-48c8-8f7e-f558b0dbd9d8");
7
7
  } catch {}
8
8
  })();
9
- import { c as e, ht as t } from "./store-DJXUxGeN.js";
9
+ import { c as e, vt as t } from "./store-BcEvlgIF.js";
10
10
  //#region src/components/Map/viewport.ts
11
11
  function n(e) {
12
12
  return {
@@ -13,6 +13,13 @@ declare class KioskStore {
13
13
  statusMessageTimer: number;
14
14
  startCleanupMessages(): void;
15
15
  private isResettingCamera;
16
+ /**
17
+ * Set while a restore's own camera movement is still to be heard about, and consumed by the settle
18
+ * it ends with — see {@link handleNavigationChange}. Assigned from what the restore reports it
19
+ * moved, so a panel opened with no camera at all does not read the operator's first move as the
20
+ * restore's.
21
+ */
22
+ private isRestoringFraming;
16
23
  resetCamera(): Promise<void>;
17
24
  /**
18
25
  * Restores the home framing in map mode. The kiosk is integrated at page load,
@@ -25,6 +32,7 @@ declare class KioskStore {
25
32
  /**
26
33
  * Restores the home framing on the floor plan. The plan's own camera takes it whenever it is up;
27
34
  * without one mounted there is nothing to move.
35
+ * @returns Whether there was a camera to move.
28
36
  */
29
37
  private resetPlanCamera;
30
38
  restoreData(): void;
@@ -1 +1 @@
1
- import{__decorate as i}from"tslib";import{action as o,computed as h,observable as k,toJS as c,when as S}from"mobx";import a from"../../store";import{areLayersEnabled as g}from"../../utils/areLayersEnabled";import{t as m}from"../../utils/i18n";import{mapCamera as d}from"../Map/camera";import{mapViewport as f}from"../Map/viewport";import{getPtScaleZoomRatio as C,toFiniteNumber as u}from"./kiosk-record";import{updateKiosk as y}from"./kioskApi";import{getSavedKiosk as M,removeKiosk as K,saveKiosk as P}from"./SetKiosk";const b=2e4;class s{constructor(){this.savedKiosk=null,this.statusMessages=[],this.statusMessageTimer=0,this.isResettingCamera=!1}get kiosk(){return a.uiState.kioskData}setKiosk(e){a.uiState.setKioskData(e)}getCameraState(){if(a.maplibreStore.showMaplibre){const t=a.maplibreStore.cameraPort?.getCameraState();return t?{mapCenterLng:t.lng,mapCenterLat:t.lat,mapZoom:t.zoom,mapBearingDegrees:t.bearing,mapPitchDegrees:t.pitch}:{}}const e=d()?.state();return e?{mapInitialPtScale:this.initialPtScale,mapPtScale:e.pixelSize,mapCenterX:e.center.x,mapCenterY:e.center.y,mapRollDegrees:e.roll,mapPitch:e.pitch}:{}}get hasUnsavedChanges(){const e=this.savedKiosk,t=c(this.kiosk);if(!t||!e)return!!t!=!!e;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!0;for(const l of n)if(!(l in t)||e[l]!==t[l])return!0;return!1}addStatusMessage(e){this.statusMessages=[{...e,id:Date.now()}],this.startCleanupMessages()}clearStatusMessages(){this.statusMessages=[]}startCleanupMessages(){clearTimeout(this.statusMessageTimer),this.statusMessageTimer=window.setTimeout(()=>this.clearStatusMessages(),1e3)}async resetCamera(){if(!this.isResettingCamera){this.isResettingCamera=!0;try{if(a.maplibreStore.showMaplibre&&await this.resetMaplibreCamera())return;await this.resetPlanCamera()}finally{this.isResettingCamera=!1}}}async resetMaplibreCamera(){const e=await this.waitForMaplibreCameraPort();if(!e)return!1;const t=this.kiosk;t?.z!=null&&a.fp.activateFloor({name:String(t.z)});const n=u(t?.mapCenterLng),r=u(t?.mapCenterLat),l=u(t?.mapZoom);return n===void 0||r===void 0||l===void 0?(e.resetPitch(),a.uiState.fitBounds(),!0):(e.applyCameraState({lng:n,lat:r,zoom:l,bearing:u(t?.mapBearingDegrees),pitch:u(t?.mapPitchDegrees)}),!0)}async waitForMaplibreCameraPort(){const{maplibreStore:e}=a;if(e.cameraPort)return e.cameraPort;try{await S(()=>!!e.cameraPort||!e.showMaplibre,{timeout:b})}catch{return null}return e.cameraPort}async resetPlanCamera(){const e=d();if(!e)return;const t=this.kiosk;await e.api.reset({pan:!0,zoom:!0,roll:!0,pitch:!0},{immediate:!0}),t?.z!=null&&a.fp.activateFloor({name:String(t.z)});const n=C(t);n!==void 0&&await e.api.zoomBy(n,{immediate:!0});const r=u(t?.mapCenterX),l=u(t?.mapCenterY);r!==void 0&&l!==void 0&&await e.api.panTo({x:r,y:l},{immediate:!0});const p=u(t?.mapRollDegrees);p!==void 0&&await e.api.rollTo(p,{immediate:!0})}restoreData(){const e=M();e&&(this.setKiosk(e),this.savedKiosk=e,a.uiState.kiosk=!0)}handleSetupReady(){this.restoreData(),a.uiState.kiosk=!0,a.uiState.hideFreeOrDemo=!0,a.uiState.setForceDim(!0),a.searchStore.setSearchText(""),a.searchStore.setFocused(!1),this.resetCamera()}handleClose(){this.setKiosk(null),a.uiState.setForceDim(!1),a.uiState.enableSetKioskMode(!1),a.searchStore.closeSearch()}handleDelete(){K(),this.setKiosk(null),a.uiState.resetMapSettings(),a.uiState.resetUIScale(),this.addStatusMessage({variant:"success",title:m("Deleted")})}handleSave(){const e=f();if(!e)return;const t=c(this.kiosk);if(!t)return;const n=this.getCameraState(),r={...t,...n};if(!e.isVisible({x:r.x,y:r.y})){this.addStatusMessage({variant:"error",title:m("Kiosk not visible")});return}this.setKiosk(r),P(r),y(r,"https://app.expofp.com/"),a.uiState.setUIScale(r.uiScale,!0),this.addStatusMessage({variant:"success",title:m("Saved")}),this.savedKiosk=r}delayChange(e){requestAnimationFrame(()=>e?.())}handleChange(e){const t=c(this.kiosk);t&&(Number.isFinite(e.angle)&&this.setKiosk({...t,heading:e.angle}),Number.isFinite(e.scale)&&(this.setKiosk({...t,uiScale:e.scale}),this.delayChange(()=>a.uiState.setUIScale(e.scale,!1))),Number.isFinite(e.percent)&&this.setKiosk({...t,iconSizePercent:e.percent}))}setInitialPtScale(e){if(this.initialPtScale)return;this.initialPtScale=e;const t=c(this.kiosk);t&&this.setKiosk({...t,mapInitialPtScale:e})}handleClick(e){const t=c(this.kiosk),n=a.fp.getFloors(),r=g()?n.find(p=>p.active)?.name??null:null,l=a.uiState.uiScale;this.setKiosk({...t,x:e.x,y:e.y,z:r,uiScale:t?.uiScale||l,heading:t?.heading||0,iconSizePercent:t?.iconSizePercent||100,...this.getCameraState()})}handleNavigationChange(){const e=c(this.kiosk);e&&this.setKiosk({...e,...this.getCameraState()})}}i([h({keepAlive:!0})],s.prototype,"kiosk",null),i([o],s.prototype,"setKiosk",null),i([k],s.prototype,"savedKiosk",void 0),i([h({keepAlive:!0})],s.prototype,"hasUnsavedChanges",null),i([k],s.prototype,"statusMessages",void 0),i([o],s.prototype,"addStatusMessage",null),i([o],s.prototype,"clearStatusMessages",null),i([o],s.prototype,"startCleanupMessages",null),i([o],s.prototype,"resetCamera",null),i([o],s.prototype,"restoreData",null),i([o],s.prototype,"handleSetupReady",null),i([o],s.prototype,"handleClose",null),i([o],s.prototype,"handleDelete",null),i([o],s.prototype,"handleSave",null),i([o],s.prototype,"handleChange",null),i([o],s.prototype,"setInitialPtScale",null),i([o],s.prototype,"handleClick",null),i([o],s.prototype,"handleNavigationChange",null);export default new s;
1
+ import{__decorate as i}from"tslib";import{getConfig as f}from"@expofp/config";import{action as n,computed as k,observable as g,toJS as m,when as C}from"mobx";import{KIOSK_ENABLE_KEY as p}from"../../constants";import a from"../../store";import{areLayersEnabled as y}from"../../utils/areLayersEnabled";import{t as h}from"../../utils/i18n";import{isLocalStorageAvailable as S}from"../../utils/localStorage";import{mapCamera as d}from"../Map/camera";import{mapViewport as K}from"../Map/viewport";import{screenFitsKiosk as M,storedKioskMode as v}from"./kiosk-mode";import{getPtScaleZoomRatio as P,toFiniteNumber as u}from"./kiosk-record";import{updateKiosk as b}from"./kioskApi";import{getSavedKiosk as w,removeKiosk as F,saveKiosk as R}from"./SetKiosk";import{KIOSK_STORAGE_KEY as D}from"./SetKiosk/constants";const I=2e4;class s{constructor(){this.savedKiosk=null,this.statusMessages=[],this.statusMessageTimer=0,this.isResettingCamera=!1,this.isRestoringFraming=!1}get kiosk(){return a.uiState.kioskData}setKiosk(e){a.uiState.setKioskData(e)}getCameraState(){if(a.maplibreStore.showMaplibre){const t=a.maplibreStore.cameraPort?.getCameraState();return t?{mapCenterLng:t.lng,mapCenterLat:t.lat,mapZoom:t.zoom,mapBearingDegrees:t.bearing,mapPitchDegrees:t.pitch}:{}}const e=d()?.state();return e?{mapInitialPtScale:this.initialPtScale,mapPtScale:e.pixelSize,mapCenterX:e.center.x,mapCenterY:e.center.y,mapRollDegrees:e.roll,mapPitch:e.pitch}:{}}get hasUnsavedChanges(){const e=this.savedKiosk,t=m(this.kiosk);if(!t||!e)return!!t!=!!e;const o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!0;for(const l of o)if(!(l in t)||e[l]!==t[l])return!0;return!1}addStatusMessage(e){this.statusMessages=[{...e,id:Date.now()}],this.startCleanupMessages()}clearStatusMessages(){this.statusMessages=[]}startCleanupMessages(){clearTimeout(this.statusMessageTimer),this.statusMessageTimer=window.setTimeout(()=>this.clearStatusMessages(),1e3)}async resetCamera(){if(!this.isResettingCamera){this.isResettingCamera=!0;try{if(a.maplibreStore.showMaplibre&&await this.resetMaplibreCamera()){this.isRestoringFraming=!0;return}this.isRestoringFraming=await this.resetPlanCamera()}finally{this.isResettingCamera=!1}}}async resetMaplibreCamera(){const e=await this.waitForMaplibreCameraPort();if(!e)return!1;const t=this.kiosk;t?.z!=null&&a.fp.activateFloor({name:String(t.z)});const o=u(t?.mapCenterLng),r=u(t?.mapCenterLat),l=u(t?.mapZoom);return o===void 0||r===void 0||l===void 0?(e.resetPitch(),a.uiState.fitBounds(),!0):(e.applyCameraState({lng:o,lat:r,zoom:l,bearing:u(t?.mapBearingDegrees),pitch:u(t?.mapPitchDegrees)}),!0)}async waitForMaplibreCameraPort(){const{maplibreStore:e}=a;if(e.cameraPort)return e.cameraPort;try{await C(()=>!!e.cameraPort||!e.showMaplibre,{timeout:I})}catch{return null}return e.cameraPort}async resetPlanCamera(){const e=d();if(!e)return!1;const t=this.kiosk;await e.api.reset({pan:!0,zoom:!0,roll:!0,pitch:!0},{immediate:!0}),t?.z!=null&&a.fp.activateFloor({name:String(t.z)});const o=P(t);o!==void 0&&await e.api.zoomBy(o,{immediate:!0});const r=u(t?.mapCenterX),l=u(t?.mapCenterY);r!==void 0&&l!==void 0&&await e.api.panTo({x:r,y:l},{immediate:!0});const c=u(t?.mapRollDegrees);return c!==void 0&&await e.api.rollTo(c,{immediate:!0}),!0}restoreData(){const e=w();this.savedKiosk=e??null,e&&(this.setKiosk(e),a.uiState.kiosk=!0)}handleSetupReady(){this.restoreData(),a.uiState.kiosk=!0,a.uiState.hideFreeOrDemo=!0,a.uiState.setForceDim(!0),a.searchStore.setSearchText(""),a.searchStore.setFocused(!1),this.resetCamera()}handleClose(){M(a.uiState)&&v(f())||(a.uiState.kiosk=!1),a.uiState.restoreUIScale(),this.setKiosk(null),a.uiState.setForceDim(!1),a.uiState.enableSetKioskMode(!1),a.searchStore.closeSearch()}handleDelete(){S&&localStorage.getItem(D)!==null&&localStorage.getItem(p)==="1"&&localStorage.removeItem(p),F(),this.savedKiosk=null,this.setKiosk(null),a.uiState.resetMapSettings(),a.uiState.resetUIScale(),this.addStatusMessage({variant:"success",title:h("Deleted")})}handleSave(){const e=K();if(!e)return;const t=m(this.kiosk);if(!t)return;const o=this.getCameraState(),r={...t,...o};if(!e.isVisible({x:r.x,y:r.y})){this.addStatusMessage({variant:"error",title:h("Kiosk not visible")});return}this.setKiosk(r),R(r),S&&localStorage.setItem(p,"1"),b(r,"https://app.expofp.com/"),a.uiState.setUIScale(r.uiScale,!0),this.addStatusMessage({variant:"success",title:h("Saved")}),this.savedKiosk=r}delayChange(e){requestAnimationFrame(()=>e?.())}handleChange(e){const t=m(this.kiosk);t&&(Number.isFinite(e.angle)&&this.setKiosk({...t,heading:e.angle}),Number.isFinite(e.scale)&&(this.setKiosk({...t,uiScale:e.scale}),this.delayChange(()=>a.uiState.setUIScale(e.scale,!1))),Number.isFinite(e.percent)&&this.setKiosk({...t,iconSizePercent:e.percent}))}setInitialPtScale(e){if(this.initialPtScale)return;this.initialPtScale=e;const t=m(this.kiosk);t&&this.setKiosk({...t,mapInitialPtScale:e})}handleClick(e){const t=m(this.kiosk),o=a.fp.getFloors(),r=y()?o.find(c=>c.active)?.name??null:null,l=a.uiState.uiScale;this.setKiosk({...t,x:e.x,y:e.y,z:r,uiScale:t?.uiScale||l,heading:t?.heading||0,iconSizePercent:t?.iconSizePercent||100,...this.getCameraState()})}handleNavigationChange(){const e=this.isRestoringFraming;this.isRestoringFraming=!1;const t=m(this.kiosk);if(!t)return;const o=this.getCameraState();this.setKiosk({...t,...o}),e&&this.savedKiosk&&(this.savedKiosk={...this.savedKiosk,...o})}}i([k({keepAlive:!0})],s.prototype,"kiosk",null),i([n],s.prototype,"setKiosk",null),i([g],s.prototype,"savedKiosk",void 0),i([k({keepAlive:!0})],s.prototype,"hasUnsavedChanges",null),i([g],s.prototype,"statusMessages",void 0),i([n],s.prototype,"addStatusMessage",null),i([n],s.prototype,"clearStatusMessages",null),i([n],s.prototype,"startCleanupMessages",null),i([n],s.prototype,"resetCamera",null),i([n],s.prototype,"restoreData",null),i([n],s.prototype,"handleSetupReady",null),i([n],s.prototype,"handleClose",null),i([n],s.prototype,"handleDelete",null),i([n],s.prototype,"handleSave",null),i([n],s.prototype,"handleChange",null),i([n],s.prototype,"setInitialPtScale",null),i([n],s.prototype,"handleClick",null),i([n],s.prototype,"handleNavigationChange",null);export default new s;
@@ -1,3 +1,4 @@
1
+ import { type Config } from '@expofp/config';
1
2
  import type UIState from '../../store/UIState';
2
3
  /**
3
4
  * Whether this plan has room for the kiosk layout.
@@ -23,12 +24,27 @@ import type UIState from '../../store/UIState';
23
24
  export declare function screenFitsKiosk(uiState: UIState): boolean;
24
25
  /**
25
26
  * Toggle kiosk mode — the single meaning of `kiosk=1` / `kiosk=0` from either
26
- * channel (the `?kiosk=` URL param, the typed search-box command). Exit also
27
- * resets the per-device UI scale; init-ui's reaction persists the choice.
27
+ * channel (the `?kiosk=` URL param, the typed search-box command) — and store
28
+ * that choice. Exit also resets the per-device UI scale.
28
29
  *
29
30
  * Turning it ON is refused where the kiosk layout does not fit
30
31
  * ({@link screenFitsKiosk}); turning it OFF always works, so the `kiosk=0`
31
32
  * opt-out can never be locked out by the size of the screen it is typed on.
32
33
  */
33
34
  export declare function applyKioskMode(uiState: UIState, enabled: boolean): void;
35
+ /**
36
+ * Store-free kiosk check — the mode a load starts in: the `?kiosk=` param wins, then whatever the
37
+ * device itself says. Used by the Intercom boot, which runs before the MobX stores exist, so the
38
+ * screen rule above is the caller's to add. The direct `?kiosk` read is kiosk-semantic and migrates
39
+ * with the kiosk config node (retirement plan §4.7).
40
+ */
41
+ export declare function isKioskMode(data: Config): boolean;
42
+ /**
43
+ * The same check without the `?kiosk=` param: the mode init-ui and ShowKiosk settle on between
44
+ * them, from the stored flag and the kiosks left — the enable flag, then a saved-kiosk object (a
45
+ * provisioned device is a kiosk on first load, before the flag is set), then the config anchor.
46
+ * What the setkiosk panel asks on close, since ShowKiosk remounts right after it and reads no
47
+ * param.
48
+ */
49
+ export declare function storedKioskMode(data: Config): boolean;
34
50
  //# sourceMappingURL=kiosk-mode.d.ts.map
@@ -1 +1 @@
1
- import{untracked as i}from"mobx";import{MOBILE_BREAKPOINT as o}from"../../constants";import n from"../../tools/logger";export function screenFitsKiosk(r){return r.screenSize.width>o}export function applyKioskMode(r,e){e&&i(()=>t(r))||(r.kiosk=e,e||r.resetUIScale())}function t(r){return screenFitsKiosk(r)?!1:(n.warn(`Kiosk mode refused: the plan is ${r.screenSize.width}px wide, and the kiosk layout needs more than ${o}px.`),!0)}
1
+ import{untracked as n}from"mobx";import{KIOSK_ENABLE_KEY as r,MOBILE_BREAKPOINT as i}from"../../constants";import s from"../../tools/logger";import{isLocalStorageAvailable as t}from"../../utils/localStorage";import{getSavedKiosk as a}from"./SetKiosk/storage";export function screenFitsKiosk(o){return o.screenSize.width>i}export function applyKioskMode(o,e){e&&n(()=>f(o))||(o.kiosk=e,e||o.resetUIScale(),t&&window.localStorage.setItem(r,e?"1":"0"))}export function isKioskMode(o){const e=new URLSearchParams(window.location.search).get(r);return e==="1"||e==="0"?e==="1":storedKioskMode(o)}export function storedKioskMode(o){const e=t?window.localStorage.getItem(r):null;return e==="1"||e==="0"?e==="1":t&&a()!=null||Object.keys(o.kiosk??{}).length>0}function f(o){return screenFitsKiosk(o)?!1:(s.warn(`Kiosk mode refused: the plan is ${o.screenSize.width}px wide, and the kiosk layout needs more than ${i}px.`),!0)}
@@ -1 +1 @@
1
- import{Box as s}from"@expofp/geometry";import{useCameraAPI as g,useCameraMoveStart as x,useCameraState as R}from"@expofp/renderer";import{useEffect as T,useLayoutEffect as B,useRef as M,useState as P}from"react";import{fpGeo as S}from"../../data/fpGeo";import{svgArea as F}from"../../data/svg";import l,{uiState as e}from"../../store";import{BoothBase as C}from"../../store/BoothStore";import d from"../../tools/logger";import w from"../../tools/settings";import{areLayersEnabled as N}from"../../utils/areLayersEnabled";import{parseNumberPair as v}from"../../utils/camera-map-settings";import{convertGpsToLocal as z}from"../../utils/gps";import{useOneShotReaction as f}from"../../utils/mobx";import{createMapCamera as E,setMapCamera as h}from"./camera";import{notifyCameraMoved as b}from"./camera-events";import{resetExternalOverlay as k}from"./pointer";export function MapCamera(){const t=g(),n=R(),r=M({api:t,state:n}),[a]=P(()=>E(r));return B(()=>{r.current={api:t,state:n}}),T(()=>(h(a),()=>h(void 0)),[a]),x(()=>{k(),b()}),f(()=>e.zoomBy,o=>{o&&(r.current.api.zoomBy(o),e.zoomBy=null)},[]),f(()=>e.rollReset,o=>{o&&(r.current.api.reset({roll:!0}),e.rollReset=!1)},[]),f(()=>e.centerMap,o=>{o&&(r.current.api.reset({zoom:!!(e.list.type==="search"&&e.list.text)}),e.centerMap=!1)},[]),f(()=>e.moveToRect,o=>{if(!o)return;const{width:m,height:i}=o.size;m>0&&i>0&&Number.isFinite(m)&&Number.isFinite(i)&&y(r.current.api,o,e.moveToRectPaddingPercent??void 0),e.moveToRect=null,e.moveToRectPaddingPercent=null},[]),f(()=>e.moveToBooths,o=>{if(!o)return;d.log("watched moveToBooths",o);const m=o.filter(i=>i.rect).map(i=>i.rect);m.length&&y(r.current.api,s.fromUnion(...m)),e.moveToBooths=null},[]),f(()=>e.mapSettings,({center:o,centerxy:m,bearing:i,pitchdegrees:c,z:p})=>{try{p&&l.fp.activateFloor({name:p});const u=O(o,m);u&&r.current.api.panTo(u),i!==void 0&&Number.isFinite(i)&&r.current.api.rollTo(i),c!=null&&Number.isFinite(c)&&r.current.api.pitchTo(c,{immediate:!e.animatePitch})}catch(u){d.error("Error in mapSettings reaction",u)}},[]),null}function y(t,n,r){t.zoomTo(G(n),{padding:r??A(n,F),maxZoom:Number.isFinite(w.maxZoom)?void 0:10,within:L()})}function L(){const t=e.canvasVisibleRectPx;return e.shouldShiftMapRect?s.fromMinMax({x:t.min.x+e.overlayWidthPx,y:t.min.y},t.max):t}function G(t){const n=e.kioskData;if(!n)return t;const r=e.selectedRoute?.from,a=r instanceof C?r.layer?.name:r?.layer;return(N()?a===l.routeStore.currentRouteLayer?.name:!0)?s.fromUnion(t,new s(n.x,n.y,1,1)):t}function A(t,n){return!t||!n?0:(t.area/n.area>.1?15:25)/100}function O(t,n){if(t){const a=v(t);if(!a)return;const o=S?.properties?.config;if(!o)throw new Error("Map center given in GPS, but the plan has no GPS config");return z({lat:a[0],lng:a[1]},o)??void 0}const r=v(n);if(r)return{x:r[0],y:r[1]}}
1
+ import{Box as s}from"@expofp/geometry";import{useCameraAPI as g,useCameraGesture as x,useCameraMoveEnd as R,useCameraState as T}from"@expofp/renderer";import{useEffect as B,useLayoutEffect as M,useRef as P,useState as S}from"react";import{fpGeo as C}from"../../data/fpGeo";import{svgArea as F}from"../../data/svg";import l,{uiState as e}from"../../store";import{BoothBase as w}from"../../store/BoothStore";import d from"../../tools/logger";import E from"../../tools/settings";import{areLayersEnabled as N}from"../../utils/areLayersEnabled";import{parseNumberPair as v}from"../../utils/camera-map-settings";import{convertGpsToLocal as z}from"../../utils/gps";import{useOneShotReaction as f}from"../../utils/mobx";import{createMapCamera as b,setMapCamera as h}from"./camera";import{notifyCameraMoved as k}from"./camera-events";import{resetExternalOverlay as G}from"./pointer";export function MapCamera(){const t=g(),n=T(),r=P({api:t,state:n}),[a]=S(()=>b(r));return M(()=>{r.current={api:t,state:n}}),B(()=>(h(a),()=>h(void 0)),[a]),x(()=>G()),R(()=>k()),f(()=>e.zoomBy,o=>{o&&(r.current.api.zoomBy(o),e.zoomBy=null)},[]),f(()=>e.rollReset,o=>{o&&(r.current.api.reset({roll:!0}),e.rollReset=!1)},[]),f(()=>e.centerMap,o=>{o&&(r.current.api.reset({zoom:!!(e.list.type==="search"&&e.list.text)}),e.centerMap=!1)},[]),f(()=>e.moveToRect,o=>{if(!o)return;const{width:m,height:i}=o.size;m>0&&i>0&&Number.isFinite(m)&&Number.isFinite(i)&&y(r.current.api,o,e.moveToRectPaddingPercent??void 0),e.moveToRect=null,e.moveToRectPaddingPercent=null},[]),f(()=>e.moveToBooths,o=>{if(!o)return;d.log("watched moveToBooths",o);const m=o.filter(i=>i.rect).map(i=>i.rect);m.length&&y(r.current.api,s.fromUnion(...m)),e.moveToBooths=null},[]),f(()=>e.mapSettings,({center:o,centerxy:m,bearing:i,pitchdegrees:c,z:p})=>{try{p&&l.fp.activateFloor({name:p});const u=U(o,m);u&&r.current.api.panTo(u),i!==void 0&&Number.isFinite(i)&&r.current.api.rollTo(i),c!=null&&Number.isFinite(c)&&r.current.api.pitchTo(c,{immediate:!e.animatePitch})}catch(u){d.error("Error in mapSettings reaction",u)}},[]),null}function y(t,n,r){t.zoomTo(A(n),{padding:r??O(n,F),maxZoom:Number.isFinite(E.maxZoom)?void 0:10,within:L()})}function L(){const t=e.canvasVisibleRectPx;return e.shouldShiftMapRect?s.fromMinMax({x:t.min.x+e.overlayWidthPx,y:t.min.y},t.max):t}function A(t){const n=e.kioskData;if(!n)return t;const r=e.selectedRoute?.from,a=r instanceof w?r.layer?.name:r?.layer;return(N()?a===l.routeStore.currentRouteLayer?.name:!0)?s.fromUnion(t,new s(n.x,n.y,1,1)):t}function O(t,n){return!t||!n?0:(t.area/n.area>.1?15:25)/100}function U(t,n){if(t){const a=v(t);if(!a)return;const o=C?.properties?.config;if(!o)throw new Error("Map center given in GPS, but the plan has no GPS config");return z({lat:a[0],lng:a[1]},o)??void 0}const r=v(n);if(r)return{x:r[0],y:r[1]}}
@@ -1,16 +1,19 @@
1
1
  /**
2
2
  * A camera-movement signal for the parts of the SDK that are not components.
3
3
  *
4
- * `MapCamera` notifies from the controls' own update event — the same signal the imperative
5
- * renderer published as `navigation:change` — and the kiosk setup screen listens to know the
6
- * operator has framed a new home view. Deliberately minimal: no payload, because every consumer
7
- * reads what it needs (`mapCamera().state()`) at the moment it cares.
8
- * @param listener - Called after every camera movement while subscribed.
4
+ * Reported once a movement has come to rest — the same signal the imperative renderer published as
5
+ * `navigation:change` — and the kiosk setup screen listens to know the operator has framed a new home
6
+ * view, whether they dragged the plan or pressed the zoom buttons. Both views produce it: `MapCamera`
7
+ * on the plan, `useKioskCameraEvents` on the MapLibre map. Deliberately minimal: no payload, because
8
+ * every consumer reads what it needs (`mapCamera().state()`) at the moment it cares — which is why
9
+ * the movement has to be over by the time this fires.
10
+ * @param listener - Called after each camera movement settles, while subscribed.
9
11
  * @returns An unsubscribe function.
10
12
  */
11
13
  export declare function onCameraMoved(listener: () => void): () => void;
12
14
  /**
13
- * Reports that the camera moved. Called by the mounted map; nothing else should.
15
+ * Reports that the camera has finished moving. Called by whichever view is mounted — the plan's
16
+ * camera or the map's; nothing else should.
14
17
  */
15
18
  export declare function notifyCameraMoved(): void;
16
19
  //# sourceMappingURL=camera-events.d.ts.map
@@ -62,12 +62,14 @@ export declare function selectBooth(event: PointerEventData<ShapeDef>): void;
62
62
  */
63
63
  export declare function clearSelection(event: PointerMissedEventData): void;
64
64
  /**
65
- * Calls the host page's reset hook, if it left one. A global the embedding page installs; the SDK
66
- * only ever calls it.
65
+ * Calls the kiosk's idle-reset hook, if one is installed. A global (`window.__resett`), which is how
66
+ * the parts of the SDK that are not components reach the timer `init-ui` owns — and which an
67
+ * embedding page may install instead.
67
68
  *
68
- * Exported because a camera move clears it too, not only a click: `MapCamera` calls it from the
69
- * controls' own update event, which is what the imperative renderer's `navigation:change` listener
70
- * did.
69
+ * Exported because the user moving the camera counts as activity too, not only a click: `MapCamera`
70
+ * calls it while the visitor has hold of the plan, as the imperative renderer's `navigation:change`
71
+ * listener did. A command is left out on purpose — the idle reset moves the camera itself, and would
72
+ * re-arm the timer it had just fired.
71
73
  */
72
74
  export declare function resetExternalOverlay(): void;
73
75
  //# sourceMappingURL=pointer.d.ts.map
@@ -1 +1 @@
1
- import{jsx as d}from"react/jsx-runtime";import{MapControls as c}from"@expofp/ui";import p from"classnames";import{observer as u,useLocalStore as b}from"mobx-react-lite";import r,{layersStore as i,uiState as o}from"../store";import{LayerMode as l,LayersMode as y}from"../store/LayerStore";import{remsToPixels as s}from"../utils";import{t}from"../utils/i18n";const f=u(()=>{const a=b(()=>({get className(){return p({controls:!0,container:!0,"-ready":!0,[o.responsiveClass]:!0})},get style(){return{[o.rtl?"left":"right"]:o.overlayPosition==="left"?o.overlayCollapsed?s(.9):(o.kiosk?10:0)+s(.7)+"px":"10px",bottom:o.kiosk?s(4):s(9.6)}},get layers(){return i.layers.filter(e=>e.mode!==l.AlwaysHidden&&e.mode!==l.AlwaysVisible).map(e=>({id:e.name,name:e.description})).concat([]).reverse()},get visible(){return i.layers.filter(e=>e.visible).map(e=>e.name)}}));return d(c,{className:a.className,style:a.style,title:t("Map controls"),findLocationLabel:t("Find your location"),zoomInLabel:t("Zoom In"),zoomOutLabel:t("Zoom Out"),viewModeLabel:t("View switch"),fitToScreenLabel:t("Fit to screen"),layersLabel:t("Layers"),onFindLocation:()=>r.routeStore.findLocation(),onZoomIn:()=>o.zoomIn(),onZoomOut:()=>o.zoomOut(),onFitToScreen:()=>o.fitBounds(),onViewModeSwitch:()=>r.maplibreStore.activateMaplibre(),showModeSwitch:r.maplibreStore.maplibreEnabled&&!r.maplibreStore.hideModeSwitchButton,isMap3d:r.maplibreStore.isMap3d,showFindLocation:r.routeStore.canFindLocation&&!o.setKioskModeEnabled,layersActiveItems:a.visible,layersList:i.mode===y.CheckBox?a.layers:void 0,onChangeLayers:e=>{const n=i.layers.find(m=>m.name===e);n&&i.updateVisibility(e,!n.visible)}})});export default f;
1
+ import{jsx as c}from"react/jsx-runtime";import{MapControls as p}from"@expofp/ui";import u from"classnames";import{observer as b,useLocalStore as y}from"mobx-react-lite";import i,{layersStore as a,uiState as o}from"../store";import{LayerMode as m,LayersMode as f}from"../store/LayerStore";import{remsToPixels as s}from"../utils";import{t}from"../utils/i18n";function n(r){window.__resett?.(),r()}const L=b(()=>{const r=y(()=>({get className(){return u({controls:!0,container:!0,"-ready":!0,[o.responsiveClass]:!0})},get style(){return{[o.rtl?"left":"right"]:o.overlayPosition==="left"?o.overlayCollapsed?s(.9):(o.kiosk?10:0)+s(.7)+"px":"10px",bottom:o.kiosk?s(4):s(9.6)}},get layers(){return a.layers.filter(e=>e.mode!==m.AlwaysHidden&&e.mode!==m.AlwaysVisible).map(e=>({id:e.name,name:e.description})).concat([]).reverse()},get visible(){return a.layers.filter(e=>e.visible).map(e=>e.name)}}));return c(p,{className:r.className,style:r.style,title:t("Map controls"),findLocationLabel:t("Find your location"),zoomInLabel:t("Zoom In"),zoomOutLabel:t("Zoom Out"),viewModeLabel:t("View switch"),fitToScreenLabel:t("Fit to screen"),layersLabel:t("Layers"),onFindLocation:()=>i.routeStore.findLocation(),onZoomIn:()=>n(()=>o.zoomIn()),onZoomOut:()=>n(()=>o.zoomOut()),onFitToScreen:()=>n(()=>o.fitBounds()),onViewModeSwitch:()=>i.maplibreStore.activateMaplibre(),showModeSwitch:i.maplibreStore.maplibreEnabled&&!i.maplibreStore.hideModeSwitchButton,isMap3d:i.maplibreStore.isMap3d,showFindLocation:i.routeStore.canFindLocation&&!o.setKioskModeEnabled,layersActiveItems:r.visible,layersList:a.mode===f.CheckBox?r.layers:void 0,onChangeLayers:e=>{const l=a.layers.find(d=>d.name===e);l&&a.updateVisibility(e,!l.visible)}})});export default L;
@@ -1 +1 @@
1
- import{jsx as F,jsxs as Y}from"react/jsx-runtime";import{isLayerDefs as q}from"@expofp/renderer";import ee from"color";import{runInAction as re}from"mobx";import{observer as te}from"mobx-react-lite";import{useCallback as j,useEffect as R,useMemo as m,useRef as f,useState as $}from"react";import oe from"../../data";import{getLayerSvg as ne,svgArea as C,svgAreaExplicit as ie}from"../../data/svg";import{createSceneDef as ae}from"../../engine/defs";import t,{uiState as i}from"../../store";import M from"../../tools/settings";import V from"../../utils/is-debug";import{fitRectIsFraming as ce,getVenueFitMarginPercent as se,resolveVenueFitRect as le}from"../../utils/scene-bounds";import ue from"../Map/drawing/config/config-all";import{loadLayersImages as me}from"../Map/drawing/config/loadBoothsImages";import{MapCursorCoords as fe}from"../Map/MapCursorCoords";import{MapViewport as pe}from"../Map/MapViewport";import{clearSelection as de}from"../Map/pointer";import{setMapScene as B}from"../Map/scene";import{useBuildRoute as ge}from"../Map/traffic/useBuildRoute";import{useManageTraffic as be}from"../Map/traffic/useManageTraffic";import{centerCoordinates as Se}from"../Map/viewport";import he from"./MaplibreWrapper";import{useCameraReactions as ye}from"./useCameraReactions";import{useDimming as Re}from"./useDimming";import{useKioskIdleEvents as Ce}from"./useKioskIdleEvents";import{useLayerVisibilitySync as Me}from"./useLayerVisibilitySync";import{usePoiMarkers as Ae}from"./usePoiMarkers";import{useWayfindingAndMarkers as Le}from"./useWayfindingAndMarkers";import{cameraForLocalRect as Pe,deriveGeoConfig as ve,getLocalRectGeoBounds as ze,getVisibleRectFitPadding as De,INITIAL_FIT_ZOOM_ADJUSTMENT as xe}from"./utils/geo-config";import{applyMapOptions as N,getTileSource as Te,MAP_MIN_ZOOM as Ee}from"./utils/map-helpers";import{calculateTransformMatrix as Oe}from"./utils/solver";const U="routes-api.expofp.com",Ie=800;function we(a,b,s){return{getCameraState:()=>{const o=a.getCenter();return{lng:o.lng,lat:o.lat,zoom:a.getZoom(),bearing:a.getBearing(),pitch:a.getPitch()}},applyCameraState:o=>{a.easeTo({center:[o.lng,o.lat],zoom:o.zoom,bearing:o.bearing??b,pitch:o.pitch??s(),duration:Ie,essential:!0})},resetPitch:()=>{const o=s();a.getPitch()!==o&&a.jumpTo({pitch:o})}}}function Z(){t.poiMarkerStore.clear(),re(()=>{t.layerStore.layers.forEach(a=>{a.configured=!1,a.children=[],a.loaded=!1}),t.layerStore.layersLoaded=!1})}const _e=te(function({viewMode:b}){const[s,o]=$(null),[z,D]=$(!1),u=f(null),p=f(null),A=f(null),x=f(null),S=f(null),r=m(()=>ve(),[]),L=m(()=>le({layerViewbox:t.layerStore.viewboxRectangle,explicitArea:ie?C:null,layerRectangle:t.layerStore.rectangle,sceneDef:s,svgArea:C}),[s]),h=L.rect,d=m(()=>{if(!r)return null;const e=ce(L.source)?0:se(h,C),n=De(0);e&&i.screenSize&&(n.left+=i.screenSize.width*e,n.right+=i.screenSize.width*e,n.top+=i.screenSize.height*e,n.bottom+=i.screenSize.height*e);const l=i.screenSize?Pe(h,r.gpsConfig,r.bearing,{width:i.screenSize.width,height:i.screenSize.height},n):null;return l?{center:l.center,bearing:r.bearing,zoom:l.zoom}:{center:r.center,bearing:r.bearing,zoom:r.zoom,bounds:ze(h,r.gpsConfig),fitPadding:n,zoomAdjustment:xe}},[r,L,h]),y=m(()=>r?Oe(r.gpsConfig,ne()?.getAttribute("units")):null,[r]),T=i.mapSettings.pitchdegrees,E=i.maxPitch,g=m(()=>{const e=b==="map2d";return{pitch:e?0:T,maxPitch:e?0:E,minZoom:Ee}},[b,T,E]),P=f(g),G=m(()=>Te(),[]),c=m(()=>{if(!s||!y)return null;const e=s.rootLayer.children,n=q(e)?e.filter(l=>l.name.toLowerCase()!=="areamap"):e;return{...s,rootLayer:{...s.rootLayer,children:n},background:void 0,staticTransform:y}},[s,y]),O=f(null);R(()=>{O.current=c},[c]),R(()=>{if(c)return B(c),()=>B(void 0)},[c]);const{mapDimAnimatorRef:I,venueDimAnimatorRef:w,applyDimmingTarget:_,handleMapDimLayerReady:J}=Re(u,O);R(()=>{if(!r)return;let e=!1;Z(),ue().then(({layers:v,cleanup:k})=>{if(e){k();return}A.current=k;const Q=ee(M.backgroundColor==="none"?"#ebebeb":M.backgroundColor).string();o(ae(v,C,Q))}).catch(v=>{e||console.warn("Maplibre scene configuration failed.",v)});const n=I.current,l=w.current;return()=>{e=!0,Z(),A.current?.(),A.current=null,S.current&&(t.maplibreStore.clearCameraPortIfCurrent(S.current),S.current=null),u.current=null,p.current=null,x.current=null,D(!1),n?.stop(),l?.stop(),i.sceneDefReady=!1}},[r,I,w]);const K=j((e,n)=>{u.current=e,p.current=e.getCanvas(),x.current=n,D(!0),e.once("idle",()=>N(e,P.current));const l=we(e,r?.bearing??e.getBearing(),()=>P.current.pitch??0);S.current=l,t.maplibreStore.setCameraPort(l),t.fp.getCenterCoordinates=()=>Se(p.current),_({immediate:!0}),me(),t.layerStore.layersLoaded=!0,t.fp.onFpConfigured&&t.fp.onFpConfigured(),i.sceneDefReady=!0,n()},[_,r]);R(()=>{P.current=g,N(u.current,g)},[g]),Ce(z,u),Le(c,p),Ae(z,u,r),Me(c,u,r),ye(u,r,c),ge({enabled:t.layerStore.layersLoaded&&i.buildRoute,scene:c??void 0});const W=oe.busRoutes??!1;be({permission:t.layerStore.layersLoaded&&W,scene:c??void 0,dataJsonUrl:`https://${U}/v1/routes?expo=${M.EXPO}`,websocketUrl:`wss://${U}/locations?expo=${M.EXPO}`});const X=j(e=>{console.warn("Maplibre map failed to load; falling back to floorplan mode.",e),t.maplibreStore.deactivateMaplibre()},[]);if(!r||!d||!y||!c)return null;const H=`${d.center.join(",")}:${d.bearing}:${d.zoom}`;return Y(he,{sceneDef:c,geoConfig:d,tileSource:G,mapOptions:g,debug:V,onMapReady:K,onMapDimLayerReady:J,onMapLoadError:X,onPointerMissed:de,children:[F(pe,{}),V&&F(fe,{canvas:p})]},H)});export default _e;
1
+ import{jsx as F,jsxs as Y}from"react/jsx-runtime";import{isLayerDefs as q}from"@expofp/renderer";import ee from"color";import{runInAction as re}from"mobx";import{observer as te}from"mobx-react-lite";import{useCallback as j,useEffect as R,useMemo as u,useRef as f,useState as $}from"react";import oe from"../../data";import{getLayerSvg as ne,svgArea as C,svgAreaExplicit as ie}from"../../data/svg";import{createSceneDef as ae}from"../../engine/defs";import t,{uiState as i}from"../../store";import M from"../../tools/settings";import V from"../../utils/is-debug";import{fitRectIsFraming as ce,getVenueFitMarginPercent as se,resolveVenueFitRect as le}from"../../utils/scene-bounds";import me from"../Map/drawing/config/config-all";import{loadLayersImages as ue}from"../Map/drawing/config/loadBoothsImages";import{MapCursorCoords as fe}from"../Map/MapCursorCoords";import{MapViewport as pe}from"../Map/MapViewport";import{clearSelection as de}from"../Map/pointer";import{setMapScene as B}from"../Map/scene";import{useBuildRoute as ge}from"../Map/traffic/useBuildRoute";import{useManageTraffic as be}from"../Map/traffic/useManageTraffic";import{centerCoordinates as Se}from"../Map/viewport";import he from"./MaplibreWrapper";import{useCameraReactions as ye}from"./useCameraReactions";import{useDimming as Re}from"./useDimming";import{useKioskCameraEvents as Ce}from"./useKioskCameraEvents";import{useLayerVisibilitySync as Me}from"./useLayerVisibilitySync";import{usePoiMarkers as Ae}from"./usePoiMarkers";import{useWayfindingAndMarkers as Le}from"./useWayfindingAndMarkers";import{cameraForLocalRect as Pe,deriveGeoConfig as ve,getLocalRectGeoBounds as ze,getVisibleRectFitPadding as De,INITIAL_FIT_ZOOM_ADJUSTMENT as xe}from"./utils/geo-config";import{applyMapOptions as N,getTileSource as Te,MAP_MIN_ZOOM as Ee}from"./utils/map-helpers";import{calculateTransformMatrix as Oe}from"./utils/solver";const U="routes-api.expofp.com",we=800;function Ie(a,b,s){return{getCameraState:()=>{const o=a.getCenter();return{lng:o.lng,lat:o.lat,zoom:a.getZoom(),bearing:a.getBearing(),pitch:a.getPitch()}},applyCameraState:o=>{a.easeTo({center:[o.lng,o.lat],zoom:o.zoom,bearing:o.bearing??b,pitch:o.pitch??s(),duration:we,essential:!0})},resetPitch:()=>{const o=s();a.getPitch()!==o&&a.jumpTo({pitch:o})}}}function Z(){t.poiMarkerStore.clear(),re(()=>{t.layerStore.layers.forEach(a=>{a.configured=!1,a.children=[],a.loaded=!1}),t.layerStore.layersLoaded=!1})}const _e=te(function({viewMode:b}){const[s,o]=$(null),[z,D]=$(!1),m=f(null),p=f(null),A=f(null),x=f(null),S=f(null),r=u(()=>ve(),[]),L=u(()=>le({layerViewbox:t.layerStore.viewboxRectangle,explicitArea:ie?C:null,layerRectangle:t.layerStore.rectangle,sceneDef:s,svgArea:C}),[s]),h=L.rect,d=u(()=>{if(!r)return null;const e=ce(L.source)?0:se(h,C),n=De(0);e&&i.screenSize&&(n.left+=i.screenSize.width*e,n.right+=i.screenSize.width*e,n.top+=i.screenSize.height*e,n.bottom+=i.screenSize.height*e);const l=i.screenSize?Pe(h,r.gpsConfig,r.bearing,{width:i.screenSize.width,height:i.screenSize.height},n):null;return l?{center:l.center,bearing:r.bearing,zoom:l.zoom}:{center:r.center,bearing:r.bearing,zoom:r.zoom,bounds:ze(h,r.gpsConfig),fitPadding:n,zoomAdjustment:xe}},[r,L,h]),y=u(()=>r?Oe(r.gpsConfig,ne()?.getAttribute("units")):null,[r]),T=i.mapSettings.pitchdegrees,E=i.maxPitch,g=u(()=>{const e=b==="map2d";return{pitch:e?0:T,maxPitch:e?0:E,minZoom:Ee}},[b,T,E]),P=f(g),G=u(()=>Te(),[]),c=u(()=>{if(!s||!y)return null;const e=s.rootLayer.children,n=q(e)?e.filter(l=>l.name.toLowerCase()!=="areamap"):e;return{...s,rootLayer:{...s.rootLayer,children:n},background:void 0,staticTransform:y}},[s,y]),O=f(null);R(()=>{O.current=c},[c]),R(()=>{if(c)return B(c),()=>B(void 0)},[c]);const{mapDimAnimatorRef:w,venueDimAnimatorRef:I,applyDimmingTarget:_,handleMapDimLayerReady:J}=Re(m,O);R(()=>{if(!r)return;let e=!1;Z(),me().then(({layers:v,cleanup:k})=>{if(e){k();return}A.current=k;const Q=ee(M.backgroundColor==="none"?"#ebebeb":M.backgroundColor).string();o(ae(v,C,Q))}).catch(v=>{e||console.warn("Maplibre scene configuration failed.",v)});const n=w.current,l=I.current;return()=>{e=!0,Z(),A.current?.(),A.current=null,S.current&&(t.maplibreStore.clearCameraPortIfCurrent(S.current),S.current=null),m.current=null,p.current=null,x.current=null,D(!1),n?.stop(),l?.stop(),i.sceneDefReady=!1}},[r,w,I]);const K=j((e,n)=>{m.current=e,p.current=e.getCanvas(),x.current=n,D(!0),e.once("idle",()=>N(e,P.current));const l=Ie(e,r?.bearing??e.getBearing(),()=>P.current.pitch??0);S.current=l,t.maplibreStore.setCameraPort(l),t.fp.getCenterCoordinates=()=>Se(p.current),_({immediate:!0}),ue(),t.layerStore.layersLoaded=!0,t.fp.onFpConfigured&&t.fp.onFpConfigured(),i.sceneDefReady=!0,n()},[_,r]);R(()=>{P.current=g,N(m.current,g)},[g]),Ce(z,m),Le(c,p),Ae(z,m,r),Me(c,m,r),ye(m,r,c),ge({enabled:t.layerStore.layersLoaded&&i.buildRoute,scene:c??void 0});const W=oe.busRoutes??!1;be({permission:t.layerStore.layersLoaded&&W,scene:c??void 0,dataJsonUrl:`https://${U}/v1/routes?expo=${M.EXPO}`,websocketUrl:`wss://${U}/locations?expo=${M.EXPO}`});const X=j(e=>{console.warn("Maplibre map failed to load; falling back to floorplan mode.",e),t.maplibreStore.deactivateMaplibre()},[]);if(!r||!d||!y||!c)return null;const H=`${d.center.join(",")}:${d.bearing}:${d.zoom}`;return Y(he,{sceneDef:c,geoConfig:d,tileSource:G,mapOptions:g,debug:V,onMapReady:K,onMapDimLayerReady:J,onMapLoadError:X,onPointerMissed:de,children:[F(pe,{}),V&&F(fe,{canvas:p})]},H)});export default _e;
@@ -0,0 +1,20 @@
1
+ import { type Map as MaplibreMap } from 'maplibre-gl';
2
+ import { type RefObject } from 'react';
3
+ /**
4
+ * Turns the map's own camera movements into the two signals a kiosk depends on: the idle timer's
5
+ * keep-alive, and the camera-moved event the setkiosk panel records a new home framing from.
6
+ *
7
+ * Both come off the plan's camera in floorplan mode (`MapCamera`), which map mode does not drive —
8
+ * the plan is unmounted there and the map owns the camera. Without these listeners the idle timer
9
+ * runs out mid-gesture for a visitor who only moves the map, and the panel never learns that the
10
+ * operator reframed the view, leaving its Save button disabled over changes it cannot see.
11
+ *
12
+ * The two are not the same signal: activity is the visitor's own hand, where a reframing counts
13
+ * however it was made.
14
+ *
15
+ * `ready` is the mount signal: `mapRef.current` is assigned in the same `handleMapReady` call that
16
+ * sets it, so keying the effect on `ready` is what guarantees there is a map to subscribe to — the
17
+ * early return below is the assertion of that contract, not a tolerated miss.
18
+ */
19
+ export declare function useKioskCameraEvents(ready: boolean, mapRef: RefObject<MaplibreMap | null>): void;
20
+ //# sourceMappingURL=useKioskCameraEvents.d.ts.map
@@ -0,0 +1 @@
1
+ import{useEffect as i}from"react";import{notifyCameraMoved as a}from"../Map/camera-events";export function useKioskCameraEvents(o,n){i(()=>{const e=n.current;if(!o||!e)return;let t=!1;const r=f=>{f.originalEvent&&(t=!0,window.__resett?.())},s=()=>{a(),t&&(t=!1,window.__resett?.())};return e.on("movestart",r),e.on("moveend",s),()=>{e.off("movestart",r),e.off("moveend",s)}},[o,n])}
@@ -1 +1 @@
1
- import{getSavedKiosk as u}from"../components/Kiosk/SetKiosk/storage";import{KIOSK_ENABLE_KEY as r}from"../constants";import{isLocalStorageAvailable as o}from"../utils/localStorage";function c(t){const n=new URLSearchParams(window.location.search).get(r),e=o?window.localStorage.getItem(r):null,i=n??e;return i!=null?i==="1":o&&u()!=null||Object.keys(t.kiosk??{}).length>0}function s(){const t=window.location.hostname.split(".");return t.length>=3&&t[t.length-2]==="expofp"&&t[t.length-1]==="com"}function l(){return s()?window.location.hostname.split(".")[0]:"main"}function p(t){if(t?.free===!0)return"Free";const n=t?.trialExpiresAt;if(n){const e=new Date(n).getTime();if(!Number.isNaN(e))return Date.now()<e?"Trial Active":"Trial Expired"}return"Active"}function m(){if(process.env.NODE_ENV==="production")return!1;const t=new URLSearchParams(window.location.search);return!t.has("__intercom_subdomain")&&!t.has("__intercom_status")}function f(t){if(process.env.NODE_ENV==="production")return t;const n=new URLSearchParams(window.location.search),e=n.get("__intercom_subdomain"),i=n.get("__intercom_status"),a=i&&["Active","Trial Active","Trial Expired","Free"].includes(i)?i:t.subscriptionStatus;return{subDomain:e??t.subDomain,subscriptionStatus:a}}export function shouldLoadIntercom(t){if(m()||process.env.NODE_ENV==="production"&&!s()||c(t)||!window.navigator.onLine)return null;const n=f({subDomain:l(),subscriptionStatus:p(t)});return n.subDomain!=="demo"&&n.subscriptionStatus!=="Free"&&n.subscriptionStatus!=="Trial Expired"?null:n}
1
+ import{isKioskMode as o}from"../components/Kiosk/kiosk-mode";function e(){const t=window.location.hostname.split(".");return t.length>=3&&t[t.length-2]==="expofp"&&t[t.length-1]==="com"}function u(){return e()?window.location.hostname.split(".")[0]:"main"}function a(t){if(t?.free===!0)return"Free";const n=t?.trialExpiresAt;if(n){const i=new Date(n).getTime();if(!Number.isNaN(i))return Date.now()<i?"Trial Active":"Trial Expired"}return"Active"}function c(){if(process.env.NODE_ENV==="production")return!1;const t=new URLSearchParams(window.location.search);return!t.has("__intercom_subdomain")&&!t.has("__intercom_status")}function l(t){if(process.env.NODE_ENV==="production")return t;const n=new URLSearchParams(window.location.search),i=n.get("__intercom_subdomain"),r=n.get("__intercom_status"),s=r&&["Active","Trial Active","Trial Expired","Free"].includes(r)?r:t.subscriptionStatus;return{subDomain:i??t.subDomain,subscriptionStatus:s}}export function shouldLoadIntercom(t){if(c()||process.env.NODE_ENV==="production"&&!e()||o(t)||!window.navigator.onLine)return null;const n=l({subDomain:u(),subscriptionStatus:a(t)});return n.subDomain!=="demo"&&n.subscriptionStatus!=="Free"&&n.subscriptionStatus!=="Trial Expired"?null:n}
@@ -298,6 +298,8 @@ export default class UIState {
298
298
  maxUIScale: number;
299
299
  setUIScale(scale: number | undefined, saveToStorage?: boolean): void;
300
300
  resetUIScale(): void;
301
+ /** Drops a scale applied without saving, back to the stored one (or the default). */
302
+ restoreUIScale(): void;
301
303
  setKioskModeEnabled: boolean;
302
304
  enableSetKioskMode(enable: boolean): void;
303
305
  kioskData: Kiosk | null;