@expofp/floorplan 3.44.4 → 3.44.5

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 (106) hide show
  1. package/dist/browser/{Button-F_XLD8Fy.js → Button-KOcUyCV4.js} +5 -5
  2. package/dist/browser/{CookieConsent-DZfbYufk.js → CookieConsent-Dxa0id06.js} +7 -7
  3. package/dist/browser/{Debug-Bfe4H5gN.js → Debug-QyhDw-Qr.js} +7 -7
  4. package/dist/browser/{DebugTools-D8ye4Kez.js → DebugTools-D2W2n6Jn.js} +6 -6
  5. package/dist/browser/{Demo-CuFsb-_M.js → Demo-B13KXifC.js} +9 -9
  6. package/dist/browser/{Free-C0Nk9qPr.js → Free-CX_vMtxZ.js} +10 -10
  7. package/dist/browser/{GalleryContainer-CyAGAg4x.js → GalleryContainer-CM3-49P7.js} +11 -11
  8. package/dist/browser/{GpsLoader-CoB3sRdS.js → GpsLoader-4PVGhL1U.js} +13 -13
  9. package/dist/browser/{KioskStore-CFuPEGt0.js → KioskStore-DTQoQI0q.js} +30 -30
  10. package/dist/browser/{LayerStore-CoevODUO.js → LayerStore-CazBur3e.js} +16 -16
  11. package/dist/browser/{MaplibreAdapter-Cu_LsCXF.js → MaplibreAdapter-Zingiqz4.js} +2614 -2474
  12. package/dist/browser/{ModalContainer-My0C_xoz.js → ModalContainer-CdFZHz2f.js} +10 -10
  13. package/dist/browser/{PermissionNotice-BOGBP1GX.js → PermissionNotice-t6cUGYwh.js} +6 -6
  14. package/dist/browser/{RouteStore-Dm2o_5F2.js → RouteStore-j54ZGAfi.js} +9 -9
  15. package/dist/browser/{SetKioskMode-DPCRqozK.js → SetKioskMode-B6wYtN7b.js} +11 -11
  16. package/dist/browser/{ShowKiosk-DrNye8Aa.js → ShowKiosk-B5wMyYJL.js} +29 -30
  17. package/dist/browser/{UIState-BQFpVx6u.js → UIState-DDYKhzgf.js} +249 -238
  18. package/dist/browser/{ViewerMenuPanel-CR4YhVRV.js → ViewerMenuPanel-BCVS4-Y6.js} +10 -10
  19. package/dist/browser/{add-debug-secret-listener-ujLceXxU.js → add-debug-secret-listener-Dhq4xAyx.js} +1 -1
  20. package/dist/browser/{adopt-global-settings-CN0GZTt5.js → adopt-global-settings-DIBm6FQS.js} +9 -9
  21. package/dist/browser/{boolean-editor-Ceq6Etwz.js → boolean-editor-Y-xsiI--.js} +9 -9
  22. package/dist/browser/{bootIntercom-B1uR7uMB.js → bootIntercom-Cioan8sb.js} +2 -2
  23. package/dist/browser/bundle.json +85 -85
  24. package/dist/browser/{camera-events-CvNcBo4O.js → camera-events-BOdD_NLx.js} +1 -1
  25. package/dist/browser/{classnames-CrsP-Ebw.js → classnames-CK71vh8q.js} +2 -2
  26. package/dist/browser/{client-BHrMhFVE.js → client-CJPzVCkl.js} +5 -5
  27. package/dist/browser/{components-BqCyp8zM.js → components-F21BHxXy.js} +48 -48
  28. package/dist/browser/{create-live-plan-CvZGo-XN.js → create-live-plan-nrSyFkZI.js} +13 -13
  29. package/dist/browser/{debug-context-i7l7Gx3K.js → debug-context-DwpqAozh.js} +5 -5
  30. package/dist/browser/{debug-overlay-CRW_rbNG.js → debug-overlay-B6KaSOEU.js} +10 -10
  31. package/dist/browser/{debug-ui-3YKCQhko.js → debug-ui-Bf8fXQOS.js} +6 -6
  32. package/dist/browser/{dimming-Dvu1pvil.js → dimming-BHvWqTG-.js} +12 -12
  33. package/dist/browser/{dist-DkwknQXP.js → dist-39qZTE_8.js} +5 -5
  34. package/dist/browser/{dist-uDlhOKs3.js → dist-C4gjCWf-.js} +6 -6
  35. package/dist/browser/{dist-Cle-ua_T.js → dist-e4oHl02a.js} +3 -3
  36. package/dist/browser/{efp-debug-init-BYeJPe2d.js → efp-debug-init-CgA5CA8v.js} +3 -3
  37. package/dist/browser/{enum-editor-B_FawgZE.js → enum-editor-Clbji3s0.js} +4 -4
  38. package/dist/browser/{es5-Dbukoinx.js → es5-DS8lovDx.js} +2 -2
  39. package/dist/browser/{event-head-D6VrYuEF.js → event-head-CvwSi2rY.js} +1 -1
  40. package/dist/browser/{event-not-found-BDz3WPij.js → event-not-found-CCc_S9hI.js} +3 -3
  41. package/dist/browser/{event-scoped-cache-e6nGR3aQ.js → event-scoped-cache-kTMeUrly.js} +2 -2
  42. package/dist/browser/{expofpUrl-B0MZmxoe.js → expofpUrl-CHp0e8cE.js} +1 -1
  43. package/dist/browser/{exports-DEZevwDn.js → exports-J1MI3kf7.js} +1 -1
  44. package/dist/browser/{favicon-u31TeYa4.js → favicon-CcNmTUw4.js} +1 -1
  45. package/dist/browser/{fetch-retry.umd-Cn-1aORd.js → fetch-retry.umd-BgUlFCap.js} +2 -2
  46. package/dist/browser/{flex-cYeXiUeX.js → flex-vWrExjXE.js} +5 -5
  47. package/dist/browser/{floorplan.loader-DQ33Y83e.js → floorplan.loader-CUEvFUdv.js} +12 -12
  48. package/dist/browser/{floorplan.ready-DzJBQvVZ.js → floorplan.ready-ko8a3n9B.js} +24 -24
  49. package/dist/browser/{freeBanner-DIcnNW6x.js → freeBanner-DpKvZQN1.js} +2 -2
  50. package/dist/browser/{fuse-ZGglAVb9.js → fuse-Bfm1APV7.js} +2 -2
  51. package/dist/browser/{i18n-DkibBSFF.js → i18n-DDJS5YMr.js} +6 -6
  52. package/dist/browser/index.js +17 -17
  53. package/dist/browser/{index.module-BP-TB38-.js → index.module-DsUsijj6.js} +4 -4
  54. package/dist/browser/{init-ui-DwX0YEOm.js → init-ui-Bm0UPhlY.js} +11 -11
  55. package/dist/browser/{integrateKiosk-Di2HTJ8S.js → integrateKiosk-B3aJf8F4.js} +11 -11
  56. package/dist/browser/{is-debug-DH7N8jQh.js → is-debug-De3PeMDZ.js} +4 -4
  57. package/dist/browser/{is-own-domain-CE5Nyu9G.js → is-own-domain-B9xN9-Lx.js} +1 -1
  58. package/dist/browser/{is-webview-BCZ5IIAQ.js → is-webview-yWWEgPgd.js} +1 -1
  59. package/dist/browser/{jsx-runtime-DRF-BLHf.js → jsx-runtime-DjD5sUU-.js} +2 -2
  60. package/dist/browser/kiosk-mode-CDwaDIbF.js +28 -0
  61. package/dist/browser/{kiosk-record-DjdRCsw4.js → kiosk-record-DMkGRlUE.js} +1 -1
  62. package/dist/browser/{kioskApi-CvKNO-wZ.js → kioskApi-CQSBvl3I.js} +7 -7
  63. package/dist/browser/{lib-D51yHChz.js → lib-CJ3OJE3_.js} +3 -3
  64. package/dist/browser/{loadImage-mqrRnYPB.js → loadImage-D8uFT5Sk.js} +1 -1
  65. package/dist/browser/{logDeviceInfo-BbgtT2xS.js → logDeviceInfo-CmWBec7t.js} +9 -9
  66. package/dist/browser/{mobx-DzcgHXfh.js → mobx-BdBndn_p.js} +4 -4
  67. package/dist/browser/{mobx.module-DXfPwJbY.js → mobx.module-C3w0PP29.js} +1 -1
  68. package/dist/browser/{optional-boolean-editor-i9cNIguy.js → optional-boolean-editor-Blvo9Yix.js} +3 -3
  69. package/dist/browser/{optional-enum-editor-OmCRikPm.js → optional-enum-editor-DU7T8uz0.js} +4 -4
  70. package/dist/browser/{optional-string-editor-C5sw9XjO.js → optional-string-editor-xZMbxEZE.js} +4 -4
  71. package/dist/browser/{particles.min-Cj5RSf6H.js → particles.min-D_8wZYXL.js} +2 -2
  72. package/dist/browser/{react-BU3jD5B2.js → react-CV8wM7_O.js} +2 -2
  73. package/dist/browser/{react-dom-DJDMclnf.js → react-dom-CecEt-x3.js} +3 -3
  74. package/dist/browser/{rolldown-runtime-CEvxUPK8.js → rolldown-runtime-BGNEtxPt.js} +1 -1
  75. package/dist/browser/{scene-B7RN58fT.js → scene-1Y2hzeYv.js} +2 -2
  76. package/dist/browser/{scheduler-BZKT_e0-.js → scheduler-Di2biGM1.js} +2 -2
  77. package/dist/browser/{select-COMyfaY9.js → select-CJlj5fYs.js} +10 -10
  78. package/dist/browser/{settings-Cg-yMbvI.js → settings-1yX1j826.js} +2 -2
  79. package/dist/browser/{settings-item-D1VQ8quC.js → settings-item-B8pw2_WH.js} +6 -6
  80. package/dist/browser/{store-XoxiSr-z.js → store-DknI2Sdy.js} +2 -2
  81. package/dist/browser/{string-editor-CWO5nIcD.js → string-editor-S6hL0jAM.js} +4 -4
  82. package/dist/browser/{text-field-BqEB9Lpy.js → text-field-CgCCjJwX.js} +5 -5
  83. package/dist/browser/{theme-Drd2jIAq.js → theme-2daWarWB.js} +8 -8
  84. package/dist/browser/{ui-Bg4NEUSa.js → ui-CPg_zcyB.js} +8 -8
  85. package/dist/browser/{useRenderTarget-Bqxwvxh1.js → useRenderTarget-CTvYMgqG.js} +4 -4
  86. package/dist/browser/{viewport-BkMq7yU7.js → viewport-B_GD-x9K.js} +3 -3
  87. package/dist/browser/{wayfinding-BvV-kzMQ.js → wayfinding-B4_JvPpk.js} +5 -5
  88. package/dist/esm/components/Kiosk/KioskStore.js +1 -1
  89. package/dist/esm/components/Kiosk/ShowKiosk.js +1 -1
  90. package/dist/esm/components/Kiosk/integrateKiosk.js +1 -1
  91. package/dist/esm/components/Kiosk/kiosk-mode.d.ts +4 -28
  92. package/dist/esm/components/Kiosk/kiosk-mode.js +1 -1
  93. package/dist/esm/components/Maplibre/MaplibreWrapper.d.ts +5 -0
  94. package/dist/esm/components/Maplibre/MaplibreWrapper.js +1 -1
  95. package/dist/esm/components/Maplibre/utils/basemap-palette.d.ts +19 -0
  96. package/dist/esm/components/Maplibre/utils/basemap-palette.js +1 -0
  97. package/dist/esm/components/Maplibre/utils/map-helpers.js +1 -1
  98. package/dist/esm/components/Maplibre/utils/resolve-map-style.d.ts +5 -1
  99. package/dist/esm/components/Maplibre/utils/resolve-map-style.js +1 -1
  100. package/dist/esm/store/UIState.d.ts +21 -10
  101. package/dist/esm/store/UIState.js +1 -1
  102. package/dist/esm/store/init/init-ui.js +1 -1
  103. package/dist/esm/utils/is-phone.d.ts +9 -0
  104. package/dist/esm/utils/is-phone.js +1 -0
  105. package/package.json +10 -10
  106. package/dist/browser/kiosk-mode-AIiDx_CP.js +0 -33
@@ -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.44.4" };
4
+ e.SENTRY_RELEASE = { id: "3.44.5" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "fc781f3f-1e6d-4919-967c-e8712cc18bf8", e._sentryDebugIdIdentifier = "sentry-dbid-fc781f3f-1e6d-4919-967c-e8712cc18bf8");
7
7
  } catch {}
8
8
  })();
9
- import { t as e } from "./jsx-runtime-DRF-BLHf.js";
10
- import { t } from "./settings-item-D1VQ8quC.js";
11
- import { t as n } from "./text-field-BqEB9Lpy.js";
9
+ import { t as e } from "./jsx-runtime-DjD5sUU-.js";
10
+ import { t } from "./settings-item-B8pw2_WH.js";
11
+ import { t as n } from "./text-field-CgCCjJwX.js";
12
12
  //#region ../debug/src/lib/ui/optional-string-editor.tsx
13
13
  var r = e(), i = (e) => {
14
14
  var i, a, o;
@@ -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.44.4" };
4
+ e.SENTRY_RELEASE = { id: "3.44.5" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "22529f3a-43f5-40e1-b007-51e8c4daf2a8", e._sentryDebugIdIdentifier = "sentry-dbid-22529f3a-43f5-40e1-b007-51e8c4daf2a8");
7
7
  } catch {}
8
8
  })();
9
- import { t as e } from "./rolldown-runtime-CEvxUPK8.js";
9
+ import { t as e } from "./rolldown-runtime-BGNEtxPt.js";
10
10
  //#region ../../node_modules/.pnpm/particlesjs@https+++codeload.github.com+evgenyt1+particles.js+tar.gz+bcda28ac7422659d702713184cf1171b1673c248/node_modules/particlesjs/dist/particles.min.js
11
11
  var t = /* @__PURE__ */ e(((e, t) => {
12
12
  var n = function(e, t) {
@@ -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.44.4" };
4
+ e.SENTRY_RELEASE = { id: "3.44.5" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "cca190a5-51dd-426b-84e0-277a75e2c304", e._sentryDebugIdIdentifier = "sentry-dbid-cca190a5-51dd-426b-84e0-277a75e2c304");
7
7
  } catch {}
8
8
  })();
9
- import { t as e } from "./rolldown-runtime-CEvxUPK8.js";
9
+ import { t as e } from "./rolldown-runtime-BGNEtxPt.js";
10
10
  //#region ../../node_modules/.pnpm/react@19.2.8/node_modules/react/cjs/react.production.js
11
11
  var t = /* @__PURE__ */ e(((e) => {
12
12
  var t = Symbol.for("react.transitional.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), o = Symbol.for("react.consumer"), s = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), u = Symbol.for("react.memo"), d = Symbol.for("react.lazy"), f = Symbol.for("react.activity"), p = Symbol.iterator;
@@ -1,13 +1,13 @@
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.44.4" };
4
+ e.SENTRY_RELEASE = { id: "3.44.5" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "a30dd810-d46b-41cd-8f48-f437f01c8a16", e._sentryDebugIdIdentifier = "sentry-dbid-a30dd810-d46b-41cd-8f48-f437f01c8a16");
7
7
  } catch {}
8
8
  })();
9
- import { t as e } from "./rolldown-runtime-CEvxUPK8.js";
10
- import { t } from "./react-BU3jD5B2.js";
9
+ import { t as e } from "./rolldown-runtime-BGNEtxPt.js";
10
+ import { t } from "./react-CV8wM7_O.js";
11
11
  //#region ../../node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom.production.js
12
12
  var n = /* @__PURE__ */ e(((e) => {
13
13
  var n = t();
@@ -2,7 +2,7 @@
2
2
  (function() {
3
3
  try {
4
4
  var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
5
- e.SENTRY_RELEASE = { id: "3.44.4" };
5
+ e.SENTRY_RELEASE = { id: "3.44.5" };
6
6
  var t = new e.Error().stack;
7
7
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "4a11513d-0070-4205-b636-a85d593cfa99", e._sentryDebugIdIdentifier = "sentry-dbid-4a11513d-0070-4205-b636-a85d593cfa99");
8
8
  } catch {}
@@ -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.44.4" };
4
+ e.SENTRY_RELEASE = { id: "3.44.5" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "7817f3ca-ca36-4939-9a34-4cdad0454bf2", e._sentryDebugIdIdentifier = "sentry-dbid-7817f3ca-ca36-4939-9a34-4cdad0454bf2");
7
7
  } catch {}
8
8
  })();
9
- import { Lt as e, Rt as t, ft as n, ht as r, mt as i } from "./LayerStore-CoevODUO.js";
9
+ import { Lt as e, Rt as t, ft as n, ht as r, mt as i } from "./LayerStore-CazBur3e.js";
10
10
  //#region src/utils/scene-bounds.ts
11
11
  var a = "areamap";
12
12
  function o(o) {
@@ -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.44.4" };
4
+ e.SENTRY_RELEASE = { id: "3.44.5" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "743837e7-93f1-4f1c-aefc-675d73ee4f63", e._sentryDebugIdIdentifier = "sentry-dbid-743837e7-93f1-4f1c-aefc-675d73ee4f63");
7
7
  } catch {}
8
8
  })();
9
- import { t as e } from "./rolldown-runtime-CEvxUPK8.js";
9
+ import { t as e } from "./rolldown-runtime-BGNEtxPt.js";
10
10
  //#region ../../node_modules/.pnpm/scheduler@0.27.0/node_modules/scheduler/cjs/scheduler.production.js
11
11
  var t = /* @__PURE__ */ e(((e) => {
12
12
  function t(e, t) {
@@ -1,20 +1,20 @@
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.44.4" };
4
+ e.SENTRY_RELEASE = { id: "3.44.5" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "e90304f6-bccd-4aaf-a0cc-062a075f78bf", e._sentryDebugIdIdentifier = "sentry-dbid-e90304f6-bccd-4aaf-a0cc-062a075f78bf");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-CEvxUPK8.js";
10
- import { t } from "./react-BU3jD5B2.js";
11
- import { t as n } from "./jsx-runtime-DRF-BLHf.js";
12
- import { t as r } from "./react-dom-DJDMclnf.js";
13
- import { O as i, T as a, g as o, l as s, s as c, u as l, y as u } from "./flex-cYeXiUeX.js";
14
- import { i as d, n as f, o as p, r as m, s as h } from "./dist-uDlhOKs3.js";
15
- import { _ as g, a as _, b as v, c as y, d as b, f as x, g as S, h as C, i as w, l as T, m as E, n as D, o as O, p as k, r as A, s as j, t as ee, u as te, v as ne } from "./theme-Drd2jIAq.js";
16
- import { t as M } from "./dist-Cle-ua_T.js";
17
- import { t as N } from "./classnames-CrsP-Ebw.js";
9
+ import { r as e } from "./rolldown-runtime-BGNEtxPt.js";
10
+ import { t } from "./react-CV8wM7_O.js";
11
+ import { t as n } from "./jsx-runtime-DjD5sUU-.js";
12
+ import { t as r } from "./react-dom-CecEt-x3.js";
13
+ import { O as i, T as a, g as o, l as s, s as c, u as l, y as u } from "./flex-vWrExjXE.js";
14
+ import { i as d, n as f, o as p, r as m, s as h } from "./dist-C4gjCWf-.js";
15
+ import { _ as g, a as _, b as v, c as y, d as b, f as x, g as S, h as C, i as w, l as T, m as E, n as D, o as O, p as k, r as A, s as j, t as ee, u as te, v as ne } from "./theme-2daWarWB.js";
16
+ import { t as M } from "./dist-e4oHl02a.js";
17
+ import { t as N } from "./classnames-CK71vh8q.js";
18
18
  //#region ../../node_modules/.pnpm/@radix-ui+number@1.1.1/node_modules/@radix-ui/number/dist/index.mjs
19
19
  var P = /* @__PURE__ */ e(t(), 1);
20
20
  function re(e, [t, n]) {
@@ -1,9 +1,9 @@
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.44.4" };
4
+ e.SENTRY_RELEASE = { id: "3.44.5" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "8b6ee49c-19c3-4811-99e0-0515eca1da1f", e._sentryDebugIdIdentifier = "sentry-dbid-8b6ee49c-19c3-4811-99e0-0515eca1da1f");
7
7
  } catch {}
8
8
  })();
9
- import "./adopt-global-settings-CN0GZTt5.js";
9
+ import "./adopt-global-settings-DIBm6FQS.js";
@@ -1,16 +1,16 @@
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.44.4" };
4
+ e.SENTRY_RELEASE = { id: "3.44.5" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "12edc63f-e6e7-4dfc-9a76-31666c53718c", e._sentryDebugIdIdentifier = "sentry-dbid-12edc63f-e6e7-4dfc-9a76-31666c53718c");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-CEvxUPK8.js";
10
- import { t } from "./react-BU3jD5B2.js";
11
- import { t as n } from "./jsx-runtime-DRF-BLHf.js";
12
- import { c as r, l as i, t as a, u as o, y as s } from "./flex-cYeXiUeX.js";
13
- import { t as c } from "./classnames-CrsP-Ebw.js";
9
+ import { r as e } from "./rolldown-runtime-BGNEtxPt.js";
10
+ import { t } from "./react-CV8wM7_O.js";
11
+ import { t as n } from "./jsx-runtime-DjD5sUU-.js";
12
+ import { c as r, l as i, t as a, u as o, y as s } from "./flex-vWrExjXE.js";
13
+ import { t as c } from "./classnames-CK71vh8q.js";
14
14
  //#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/separator.props.js
15
15
  var l = /* @__PURE__ */ e(t()), u = /* @__PURE__ */ e(c()), d = {
16
16
  orientation: {
@@ -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.44.4" };
4
+ e.SENTRY_RELEASE = { id: "3.44.5" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "6d823a43-fa42-42af-9c05-a4ee303c909d", e._sentryDebugIdIdentifier = "sentry-dbid-6d823a43-fa42-42af-9c05-a4ee303c909d");
7
7
  } catch {}
8
8
  })();
9
- import { o as e } from "./mobx.module-DXfPwJbY.js";
9
+ import { o as e } from "./mobx.module-C3w0PP29.js";
10
10
  //#region src/utils/swappable-proxy.ts
11
11
  function t(e, t) {
12
12
  let n = () => {
@@ -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.44.4" };
4
+ e.SENTRY_RELEASE = { id: "3.44.5" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "bae75e1e-5013-4517-a846-519e3920f180", e._sentryDebugIdIdentifier = "sentry-dbid-bae75e1e-5013-4517-a846-519e3920f180");
7
7
  } catch {}
8
8
  })();
9
- import { t as e } from "./jsx-runtime-DRF-BLHf.js";
10
- import { t } from "./settings-item-D1VQ8quC.js";
11
- import { t as n } from "./text-field-BqEB9Lpy.js";
9
+ import { t as e } from "./jsx-runtime-DjD5sUU-.js";
10
+ import { t } from "./settings-item-B8pw2_WH.js";
11
+ import { t as n } from "./text-field-CgCCjJwX.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.44.4" };
4
+ e.SENTRY_RELEASE = { id: "3.44.5" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "7cff17ce-12f6-438a-9ef4-00cf6a0b1475", e._sentryDebugIdIdentifier = "sentry-dbid-7cff17ce-12f6-438a-9ef4-00cf6a0b1475");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-CEvxUPK8.js";
10
- import { t } from "./react-BU3jD5B2.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-cYeXiUeX.js";
12
- import { t as l } from "./classnames-CrsP-Ebw.js";
9
+ import { r as e } from "./rolldown-runtime-BGNEtxPt.js";
10
+ import { t } from "./react-CV8wM7_O.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-vWrExjXE.js";
12
+ import { t as l } from "./classnames-CK71vh8q.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.44.4" };
4
+ e.SENTRY_RELEASE = { id: "3.44.5" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "507523b1-aa12-4507-b680-c254edab8300", e._sentryDebugIdIdentifier = "sentry-dbid-507523b1-aa12-4507-b680-c254edab8300");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-CEvxUPK8.js";
10
- import { t } from "./react-BU3jD5B2.js";
11
- import { t as n } from "./jsx-runtime-DRF-BLHf.js";
12
- import { t as r } from "./react-dom-DJDMclnf.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-cYeXiUeX.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-uDlhOKs3.js";
15
- import { t as y } from "./classnames-CrsP-Ebw.js";
9
+ import { r as e } from "./rolldown-runtime-BGNEtxPt.js";
10
+ import { t } from "./react-CV8wM7_O.js";
11
+ import { t as n } from "./jsx-runtime-DjD5sUU-.js";
12
+ import { t as r } from "./react-dom-CecEt-x3.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-vWrExjXE.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-C4gjCWf-.js";
15
+ import { t as y } from "./classnames-CK71vh8q.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.44.4" };
4
+ e.SENTRY_RELEASE = { id: "3.44.5" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "c331f3d0-af7b-4caa-8d8a-4bf8b2b6fc89", e._sentryDebugIdIdentifier = "sentry-dbid-c331f3d0-af7b-4caa-8d8a-4bf8b2b6fc89");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-CEvxUPK8.js";
10
- import { a as t, i as n, s as r } from "./efp-debug-init-BYeJPe2d.js";
11
- import { a as i, i as a } from "./adopt-global-settings-CN0GZTt5.js";
12
- import { t as o } from "./jsx-runtime-DRF-BLHf.js";
13
- import "./settings-Cg-yMbvI.js";
14
- import { t as s } from "./add-debug-secret-listener-ujLceXxU.js";
9
+ import { r as e } from "./rolldown-runtime-BGNEtxPt.js";
10
+ import { a as t, i as n, s as r } from "./efp-debug-init-CgA5CA8v.js";
11
+ import { a as i, i as a } from "./adopt-global-settings-DIBm6FQS.js";
12
+ import { t as o } from "./jsx-runtime-DjD5sUU-.js";
13
+ import "./settings-1yX1j826.js";
14
+ import { t as s } from "./add-debug-secret-listener-Dhq4xAyx.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-3YKCQhko.js"), { createRoot: i } = await import("./client-BHrMhFVE.js").then((t) => /* @__PURE__ */ e(t.t(), 1)), a = document.createElement("div");
29
+ let { DebugUi: n } = await import("./debug-ui-Bf8fXQOS.js"), { createRoot: i } = await import("./client-CJPzVCkl.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.44.4" };
4
+ e.SENTRY_RELEASE = { id: "3.44.5" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "1e89fc3a-fa3d-42bb-94d8-f0f786d433ec", e._sentryDebugIdIdentifier = "sentry-dbid-1e89fc3a-fa3d-42bb-94d8-f0f786d433ec");
7
7
  } catch {}
8
8
  })();
9
- import { r as e } from "./rolldown-runtime-CEvxUPK8.js";
10
- import { t } from "./react-BU3jD5B2.js";
11
- import { u as n } from "./store-XoxiSr-z.js";
9
+ import { r as e } from "./rolldown-runtime-BGNEtxPt.js";
10
+ import { t } from "./react-CV8wM7_O.js";
11
+ import { u as n } from "./store-DknI2Sdy.js";
12
12
  //#region ../ui/src/shared/activeElement.ts
13
13
  var r = (e) => !!e && "activeElement" in e;
14
14
  function i(e) {
@@ -1,13 +1,13 @@
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.44.4" };
4
+ e.SENTRY_RELEASE = { id: "3.44.5" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "cd544147-31ec-4446-b8a2-8021e027057b", e._sentryDebugIdIdentifier = "sentry-dbid-cd544147-31ec-4446-b8a2-8021e027057b");
7
7
  } catch {}
8
8
  })();
9
- import { l as e } from "./store-XoxiSr-z.js";
10
- import { t } from "./LayerStore-CoevODUO.js";
9
+ import { l as e } from "./store-DknI2Sdy.js";
10
+ import { t } from "./LayerStore-CazBur3e.js";
11
11
  //#region src/components/Map/viewport.ts
12
12
  function n(e) {
13
13
  return {
@@ -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.44.4" };
4
+ e.SENTRY_RELEASE = { id: "3.44.5" };
5
5
  var t = new e.Error().stack;
6
6
  t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "26f7cfc6-3edc-4a9d-8ddb-25fdd365a6fd", e._sentryDebugIdIdentifier = "sentry-dbid-26f7cfc6-3edc-4a9d-8ddb-25fdd365a6fd");
7
7
  } catch {}
8
8
  })();
9
- import { r as e, t } from "./rolldown-runtime-CEvxUPK8.js";
10
- import { o as n } from "./is-debug-DH7N8jQh.js";
11
- import { i as r, l as i } from "./mobx.module-DXfPwJbY.js";
12
- import { Ct as a, Gt as o, Jt as s, Mt as c, Rt as l, St as u, Ut as d, Vt as f, Wt as p, Xt as m, Yt as h, _t as g, bt as _, dt as v, gt as y, jt as b, qt as x, tt as S, xt as C, yt as w } from "./LayerStore-CoevODUO.js";
9
+ import { r as e, t } from "./rolldown-runtime-BGNEtxPt.js";
10
+ import { o as n } from "./is-debug-De3PeMDZ.js";
11
+ import { i as r, l as i } from "./mobx.module-C3w0PP29.js";
12
+ import { Ct as a, Gt as o, Jt as s, Mt as c, Rt as l, St as u, Ut as d, Vt as f, Wt as p, Xt as m, Yt as h, _t as g, bt as _, dt as v, gt as y, jt as b, qt as x, tt as S, xt as C, yt as w } from "./LayerStore-CazBur3e.js";
13
13
  //#region ../geometry/src/lib/geo.ts
14
14
  var T = 6371e3;
15
15
  function E(e, t) {
@@ -1 +1 @@
1
- import{__decorate as i}from"tslib";import{getConfig as C}from"@expofp/config";import{action as n,computed as g,observable as S,toJS as m,when as y}from"mobx";import{KIOSK_ENABLE_KEY as p}from"../../constants";import a from"../../store";import{areLayersEnabled as K}from"../../utils/areLayersEnabled";import{t as h}from"../../utils/i18n";import{isLocalStorageAvailable as d}from"../../utils/localStorage";import{mapCamera as f}from"../Map/camera";import{mapViewport as M}from"../Map/viewport";import{screenFitsKiosk as v,storedKioskMode as P}from"./kiosk-mode";import{getPtScaleZoomRatio as b,toFiniteNumber as u}from"./kiosk-record";import{updateKiosk as w}from"./kioskApi";import{getSavedKiosk as F,removeKiosk as R,saveKiosk as D}from"./SetKiosk";import{KIOSK_STORAGE_KEY as I}from"./SetKiosk/constants";const z=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=f()?.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 y(()=>!!e.cameraPort||!e.showMaplibre,{timeout:z})}catch{return null}return e.cameraPort}async resetPlanCamera(){const e=f();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=b(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);c!==void 0&&await e.api.rollTo(c,{immediate:!0});const k=u(t?.mapPitch);return k!==void 0&&await e.api.pitchTo(k,{immediate:!0}),!0}restoreData(){const e=F();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(){v(a.uiState)&&P(C())||(a.uiState.kiosk=!1),a.uiState.restoreUIScale(),this.setKiosk(null),a.uiState.setForceDim(!1),a.uiState.enableSetKioskMode(!1),a.searchStore.closeSearch()}handleDelete(){d&&localStorage.getItem(I)!==null&&localStorage.getItem(p)==="1"&&localStorage.removeItem(p),R(),this.savedKiosk=null,this.setKiosk(null),a.uiState.resetMapSettings(),a.uiState.resetUIScale(),this.addStatusMessage({variant:"success",title:h("Deleted")})}handleSave(){const e=M();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),D(r),d&&localStorage.setItem(p,"1"),w(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=K()?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([g({keepAlive:!0})],s.prototype,"kiosk",null),i([n],s.prototype,"setKiosk",null),i([S],s.prototype,"savedKiosk",void 0),i([g({keepAlive:!0})],s.prototype,"hasUnsavedChanges",null),i([S],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
+ import{__decorate as i}from"tslib";import{getConfig as C}from"@expofp/config";import{action as n,computed as k,observable as d,toJS as m,when as y}from"mobx";import{KIOSK_ENABLE_KEY as p}from"../../constants";import a from"../../store";import{areLayersEnabled as K}from"../../utils/areLayersEnabled";import{t as h}from"../../utils/i18n";import{isLocalStorageAvailable as S}from"../../utils/localStorage";import{mapCamera as f}from"../Map/camera";import{mapViewport as M}from"../Map/viewport";import{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=f()?.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 y(()=>!!e.cameraPort||!e.showMaplibre,{timeout:I})}catch{return null}return e.cameraPort}async resetPlanCamera(){const e=f();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);c!==void 0&&await e.api.rollTo(c,{immediate:!0});const g=u(t?.mapPitch);return g!==void 0&&await e.api.pitchTo(g,{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(){v(C())||(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=M();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.setKioskUIScale(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.setKioskUIScale(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=K()?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([d],s.prototype,"savedKiosk",void 0),i([k({keepAlive:!0})],s.prototype,"hasUnsavedChanges",null),i([d],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 +1 @@
1
- import{jsx as o}from"react/jsx-runtime";import{getConfig as s}from"@expofp/config";import{TouchHand as a}from"@expofp/ui";import{observer as m}from"mobx-react-lite";import{KIOSK_ENABLE_KEY as n}from"../../constants";import t from"../../store";import{useInit as f}from"../../utils/mobx";import{integrateKioskIntoMap as u,integrateKioskIntoWf as k}from"./integrateKiosk";import{screenFitsKiosk as l}from"./kiosk-mode";import i from"./KioskStore";const S=m(()=>(f(()=>{if(localStorage.getItem(n)==="0"||!l(t.uiState))return;i.restoreData();let e=i.kiosk;if(!e){const r=s().kiosk;Object.keys(r).length&&(e=r,Number.isFinite(r.uiScale)&&t.uiState.setUIScale(r.uiScale,!1))}if(e)return u(e,!0),k(e),i.resetCamera(),t.setResetCameraFn(()=>i.resetCamera()),()=>{t.uiState.setKioskData(null),t.uiState.resetMapSettings()}}),t.uiState.kiosk&&t.uiState.inIdle?o(a,{}):null));export default S;
1
+ import{jsx as r}from"react/jsx-runtime";import{getConfig as s}from"@expofp/config";import{TouchHand as a}from"@expofp/ui";import{observer as m}from"mobx-react-lite";import{KIOSK_ENABLE_KEY as n}from"../../constants";import t from"../../store";import{useInit as f}from"../../utils/mobx";import{integrateKioskIntoMap as k,integrateKioskIntoWf as u}from"./integrateKiosk";import i from"./KioskStore";const l=m(()=>(f(()=>{if(localStorage.getItem(n)==="0")return;i.restoreData();let e=i.savedKiosk;if(!e){const o=s().kiosk;Object.keys(o).length&&(e=o,Number.isFinite(o.uiScale)&&t.uiState.setKioskUIScale(o.uiScale,!1))}if(e&&(k(e,!0),u(e),t.uiState.kiosk&&(i.resetCamera(),t.setResetCameraFn(()=>i.resetCamera()))),!!i.kiosk)return()=>{t.uiState.setKioskData(null),t.uiState.resetMapSettings()}}),t.uiState.kiosk&&t.uiState.inIdle?r(a,{}):null));export default l;
@@ -1 +1 @@
1
- import{runInAction as a}from"mobx";import e from"../../store";import{planWhen as i}from"../../utils/plan-reactions.js";import{getPtScaleZoomRatio as u}from"./kiosk-record";export function integrateKioskIntoMap(t,r){t&&a(()=>{if(e.uiState.setKioskData(t),e.uiState.kiosk=r,e.maplibreStore.showMaplibre)return;const o=t.mapCenterX!=null&&t.mapCenterY!=null;e.uiState.setMapSettings({centerxy:o?`${t.mapCenterX},${t.mapCenterY}`:"",z:t.z??void 0,bearing:t.mapRollDegrees});const n=u(t);n!==void 0&&e.uiState.changeZoom(n)})}export function integrateKioskIntoWf(t){t&&(t.z!=null&&e.fp.activateFloor({name:t.z.toString()}),i(()=>!!e.uiState.selectedRoute,()=>{const r=e.uiState.selectedRoute;r?.to&&!r.from&&e.routeStore.selectRoute(r,!1,!0)}))}
1
+ import{runInAction as a}from"mobx";import t from"../../store";import{planWhen as u}from"../../utils/plan-reactions.js";import{getPtScaleZoomRatio as m}from"./kiosk-record";export function integrateKioskIntoMap(e,n){e&&a(()=>{if(t.uiState.setKioskData(e),t.uiState.kiosk=n,t.maplibreStore.showMaplibre)return;const o=t.uiState.kiosk?e:{},i=o.mapCenterX!=null&&o.mapCenterY!=null;t.uiState.setMapSettings({centerxy:i?`${o.mapCenterX},${o.mapCenterY}`:"",z:e.z??void 0,bearing:o.mapRollDegrees});const r=m(o);r!==void 0&&t.uiState.changeZoom(r)})}export function integrateKioskIntoWf(e){e&&(e.z!=null&&t.fp.activateFloor({name:e.z.toString()}),u(()=>!!t.uiState.selectedRoute,()=>{const n=t.uiState.selectedRoute;n?.to&&!n.from&&t.routeStore.selectRoute(n,!1,!0)}))}
@@ -1,42 +1,16 @@
1
1
  import { type Config } from '@expofp/config';
2
2
  import type UIState from '../../store/UIState';
3
- /**
4
- * Whether this plan has room for the kiosk layout.
5
- *
6
- * Kiosk mode forces the left overlay, which is 450px wide — so it may only run
7
- * where that layout would have been chosen anyway. `UIState.overlayPosition`
8
- * asks this same question and calls this, which is what keeps the two answers
9
- * from drifting apart.
10
- *
11
- * The guard exists because kiosk mode reaches devices that never asked for it.
12
- * A route QR hands its `kiosk_x/y/z` anchor to every scanning phone, and
13
- * `uiState.kioskData` doubles as "this device IS a kiosk" (see `kioskUrlParam`),
14
- * so the phone adopts the whole kiosk boot: a left overlay wider than its screen,
15
- * which collapses the map's framing region to a sliver and leaves any route it
16
- * was opened for zoomed out to nothing.
17
- *
18
- * Measured off the width of the container the plan was handed, not the window —
19
- * that is what `screenSize` holds (`bindRootElement`), and the overlay lives in
20
- * the container. Width alone, as `overlayPosition` reads it: a phone held in
21
- * landscape passes, being as wide as a small desktop window and getting the same
22
- * layout, and every real kiosk panel passes in either orientation.
23
- */
24
- export declare function screenFitsKiosk(uiState: UIState): boolean;
25
3
  /**
26
4
  * Toggle kiosk mode — the single meaning of `kiosk=1` / `kiosk=0` from either
27
5
  * channel (the `?kiosk=` URL param, the typed search-box command) — and store
28
6
  * that choice. Exit also resets the per-device UI scale.
29
- *
30
- * Turning it ON is refused where the kiosk layout does not fit
31
- * ({@link screenFitsKiosk}); turning it OFF always works, so the `kiosk=0`
32
- * opt-out can never be locked out by the size of the screen it is typed on.
33
7
  */
34
8
  export declare function applyKioskMode(uiState: UIState, enabled: boolean): void;
35
9
  /**
36
10
  * Store-free kiosk check — the mode a load starts in: the `?kiosk=` param wins, then whatever the
37
11
  * 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).
12
+ * phone rule (`UIState.kiosk`) is not applied here. The direct `?kiosk` read is kiosk-semantic and
13
+ * migrates with the kiosk config node (retirement plan §4.7).
40
14
  */
41
15
  export declare function isKioskMode(data: Config): boolean;
42
16
  /**
@@ -47,4 +21,6 @@ export declare function isKioskMode(data: Config): boolean;
47
21
  * param.
48
22
  */
49
23
  export declare function storedKioskMode(data: Config): boolean;
24
+ /** Whether this device holds a kiosk saved by the setkiosk panel. */
25
+ export declare function hasSavedKiosk(): boolean;
50
26
  //# sourceMappingURL=kiosk-mode.d.ts.map
@@ -1 +1 @@
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
+ import{KIOSK_ENABLE_KEY as e}from"../../constants";import{isLocalStorageAvailable as r}from"../../utils/localStorage";import{getSavedKiosk as i}from"./SetKiosk/storage";export function applyKioskMode(t,o){t.kiosk=o,o||t.resetUIScale(),r&&window.localStorage.setItem(e,o?"1":"0")}export function isKioskMode(t){const o=new URLSearchParams(window.location.search).get(e);return o==="1"||o==="0"?o==="1":storedKioskMode(t)}export function storedKioskMode(t){const o=r?window.localStorage.getItem(e):null;return o==="1"||o==="0"?o==="1":hasSavedKiosk()||Object.keys(t.kiosk??{}).length>0}export function hasSavedKiosk(){return r&&i()!=null}
@@ -17,6 +17,11 @@ export interface TileSourceConfig {
17
17
  * tolerates a host without Range support.
18
18
  */
19
19
  offline?: boolean;
20
+ /**
21
+ * Edits the loaded style before MapLibre applies it — a palette over a
22
+ * hosted style, for instance.
23
+ */
24
+ restyle?: (style: StyleSpecification) => StyleSpecification;
20
25
  }
21
26
  export interface CameraPaddingOptions {
22
27
  top: number;
@@ -1 +1 @@
1
- import{jsx as F}from"react/jsx-runtime";import"maplibre-gl/dist/maplibre-gl.css";import{prepareDebug as q,Renderer as H}from"@expofp/renderer";import{addProtocol as J,Map as V}from"maplibre-gl";import{Protocol as X}from"pmtiles";import{useEffect as T,useRef as l,useState as K}from"react";import{uiState as B}from"../../store";import{CollapsedAttributionControl as Q}from"./CollapsedAttributionControl.js";import{ExpofpLogoControl as $}from"./ExpofpLogoControl.js";import{registerPmtilesArchive as v}from"./utils/pmtiles-range-fallback";import{createStyleTransform as ee}from"./utils/resolve-map-style";const te='<a href="https://maplibre.org/" target="_blank">MapLibre</a>';export const MAP_DIM_LAYER_ID="expofp-map-dim";const p="expofp-map-dim-source",oe="3d-expofp";let y=null;const re=["coalesce",["get","name:en"],["get","name_en"],["get","name:latin"],["get","name"]],ne={type:"Feature",geometry:{type:"Polygon",coordinates:[[[-180,-85],[180,-85],[180,85],[-180,85],[-180,-85]]]},properties:{}};function z(e){if(!e||typeof e!="object")return!1;const o=e.length;if(typeof o!="number"||o<16)return!1;const r=e[0];return typeof r=="number"&&Number.isFinite(r)}function ie(e){if(z(e))return Array.from(e);const r=e?.defaultProjectionData?.mainMatrix;return z(r)?Array.from(r):(console.warn("Maplibre custom layer received an unsupported projection matrix payload.",e),null)}function g(e){return typeof e=="string"?e.includes("name"):Array.isArray(e)?e.some(o=>g(o)):!e||typeof e!="object"?!1:Object.values(e).some(o=>g(o))}function ae(e){return e.type!=="symbol"||!e.id||!e.layout?!1:g(e.layout["text-field"])}function se(e){const o=e.getStyle();for(const r of o.layers??[])ae(r)&&e.setLayoutProperty(r.id,"text-field",re)}function le(){if(y)return y;const e=new X;y=e;try{J("pmtiles",e.tile)}catch(o){console.warn("Maplibre PMTiles protocol registration failed.",o)}return e}export default function ce({sceneDef:e,geoConfig:o,tileSource:r,mapOptions:N,debug:b,onMapReady:h,onMapDimLayerReady:x,onMapLoadError:M,onPointerMissed:Z,children:U}){const P=l(null),[A,L]=K(),_=l(h),S=l(x),E=l(M),G=l({geoConfig:o,tileSource:r,mapOptions:N,debug:b});return T(()=>{_.current=h,S.current=x,E.current=M}),T(()=>{const j=P.current;if(!j)return;const{geoConfig:n,tileSource:m,mapOptions:c,debug:I}=G.current;let u=!1,R;const C=()=>{const W=le(),Y=n.bounds?{bounds:n.bounds,fitBoundsOptions:{padding:n.fitPadding,bearing:n.bearing}}:{center:n.center,zoom:n.zoom},w=ee(m.style,m.offline?i=>v(W,i):void 0),t=new V({container:j,...Y,bearing:n.bearing,maxPitch:c?.maxPitch,minZoom:c?.minZoom,maxZoom:c?.maxZoom,maxBounds:c?.maxBounds,attributionControl:!1,bearingSnap:0,aroundCenter:!1,pitchWithRotate:B.pitchEnabled,touchPitch:B.pitchEnabled,canvasContextAttributes:{antialias:!0}});t.addControl(new $),t.addControl(new Q(te)),n.zoomAdjustment&&t.jumpTo({zoom:t.getZoom()+n.zoomAdjustment}),t.once("error",i=>{t.isStyleLoaded()||E.current?.(i?.error??i)});const O=i=>{const a=i?.id;!a||t.hasImage(a)||t.addImage(a,{width:1,height:1,data:new Uint8Array(4)})};t.on("styleimagemissing",O);let f;const d=()=>t.triggerRepaint(),k={id:oe,type:"custom",renderingMode:"3d",onAdd(i,a){u||(L({gl:a,requestFrame:d,onFrame:s=>(f=s,d(),()=>{f===s&&(f=void 0)})}),_.current?.(t,d))},render(i,a){const s=ie(a??i);s&&f?.(s),I&&d()}},D=()=>{se(t),t.getSource(p)||t.addSource(p,{type:"geojson",data:ne}),t.getLayer(MAP_DIM_LAYER_ID)||t.addLayer({id:MAP_DIM_LAYER_ID,type:"fill",source:p,paint:{"fill-color":"#000000","fill-opacity":0,"fill-opacity-transition":{duration:0,delay:0}}}),S.current?.(t),t.addLayer(k)};t.on("style.load",D),t.setStyle(m.style,w?{transformStyle:w}:void 0),R=()=>{t.off("style.load",D),t.off("styleimagemissing",O),t.remove()}};return I?q().then(()=>{u||C()}):C(),()=>{u=!0,R?.(),L(void 0)}},[]),F("div",{ref:P,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:A&&F(H,{...A,scene:e,debug:b,onPointerMissed:Z,children:U})})}
1
+ import{jsx as F}from"react/jsx-runtime";import"maplibre-gl/dist/maplibre-gl.css";import{prepareDebug as q,Renderer as H}from"@expofp/renderer";import{addProtocol as J,Map as V}from"maplibre-gl";import{Protocol as X}from"pmtiles";import{useEffect as T,useRef as l,useState as K}from"react";import{uiState as B}from"../../store";import{CollapsedAttributionControl as Q}from"./CollapsedAttributionControl.js";import{ExpofpLogoControl as $}from"./ExpofpLogoControl.js";import{registerPmtilesArchive as v}from"./utils/pmtiles-range-fallback";import{createStyleTransform as ee}from"./utils/resolve-map-style";const te='<a href="https://maplibre.org/" target="_blank">MapLibre</a>';export const MAP_DIM_LAYER_ID="expofp-map-dim";const p="expofp-map-dim-source",oe="3d-expofp";let y=null;const re=["coalesce",["get","name:en"],["get","name_en"],["get","name:latin"],["get","name"]],ne={type:"Feature",geometry:{type:"Polygon",coordinates:[[[-180,-85],[180,-85],[180,85],[-180,85],[-180,-85]]]},properties:{}};function z(e){if(!e||typeof e!="object")return!1;const o=e.length;if(typeof o!="number"||o<16)return!1;const r=e[0];return typeof r=="number"&&Number.isFinite(r)}function ie(e){if(z(e))return Array.from(e);const r=e?.defaultProjectionData?.mainMatrix;return z(r)?Array.from(r):(console.warn("Maplibre custom layer received an unsupported projection matrix payload.",e),null)}function g(e){return typeof e=="string"?e.includes("name"):Array.isArray(e)?e.some(o=>g(o)):!e||typeof e!="object"?!1:Object.values(e).some(o=>g(o))}function ae(e){return e.type!=="symbol"||!e.id||!e.layout?!1:g(e.layout["text-field"])}function se(e){const o=e.getStyle();for(const r of o.layers??[])ae(r)&&e.setLayoutProperty(r.id,"text-field",re)}function le(){if(y)return y;const e=new X;y=e;try{J("pmtiles",e.tile)}catch(o){console.warn("Maplibre PMTiles protocol registration failed.",o)}return e}export default function ce({sceneDef:e,geoConfig:o,tileSource:r,mapOptions:N,debug:b,onMapReady:h,onMapDimLayerReady:x,onMapLoadError:M,onPointerMissed:Z,children:U}){const P=l(null),[A,L]=K(),_=l(h),S=l(x),E=l(M),G=l({geoConfig:o,tileSource:r,mapOptions:N,debug:b});return T(()=>{_.current=h,S.current=x,E.current=M}),T(()=>{const j=P.current;if(!j)return;const{geoConfig:n,tileSource:c,mapOptions:f,debug:I}=G.current;let u=!1,R;const C=()=>{const W=le(),Y=n.bounds?{bounds:n.bounds,fitBoundsOptions:{padding:n.fitPadding,bearing:n.bearing}}:{center:n.center,zoom:n.zoom},w=ee(c.style,c.offline?i=>v(W,i):void 0,c.restyle),t=new V({container:j,...Y,bearing:n.bearing,maxPitch:f?.maxPitch,minZoom:f?.minZoom,maxZoom:f?.maxZoom,maxBounds:f?.maxBounds,attributionControl:!1,bearingSnap:0,aroundCenter:!1,pitchWithRotate:B.pitchEnabled,touchPitch:B.pitchEnabled,canvasContextAttributes:{antialias:!0}});t.addControl(new $),t.addControl(new Q(te)),n.zoomAdjustment&&t.jumpTo({zoom:t.getZoom()+n.zoomAdjustment}),t.once("error",i=>{t.isStyleLoaded()||E.current?.(i?.error??i)});const O=i=>{const a=i?.id;!a||t.hasImage(a)||t.addImage(a,{width:1,height:1,data:new Uint8Array(4)})};t.on("styleimagemissing",O);let d;const m=()=>t.triggerRepaint(),k={id:oe,type:"custom",renderingMode:"3d",onAdd(i,a){u||(L({gl:a,requestFrame:m,onFrame:s=>(d=s,m(),()=>{d===s&&(d=void 0)})}),_.current?.(t,m))},render(i,a){const s=ie(a??i);s&&d?.(s),I&&m()}},D=()=>{se(t),t.getSource(p)||t.addSource(p,{type:"geojson",data:ne}),t.getLayer(MAP_DIM_LAYER_ID)||t.addLayer({id:MAP_DIM_LAYER_ID,type:"fill",source:p,paint:{"fill-color":"#000000","fill-opacity":0,"fill-opacity-transition":{duration:0,delay:0}}}),S.current?.(t),t.addLayer(k)};t.on("style.load",D),t.setStyle(c.style,w?{transformStyle:w}:void 0),R=()=>{t.off("style.load",D),t.off("styleimagemissing",O),t.remove()}};return I?q().then(()=>{u||C()}):C(),()=>{u=!0,R?.(),L(void 0)}},[]),F("div",{ref:P,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:A&&F(H,{...A,scene:e,debug:b,onPointerMissed:Z,children:U})})}
@@ -0,0 +1,19 @@
1
+ import { type StyleSpecification } from 'maplibre-gl';
2
+ /**
3
+ * Paint properties to set, keyed by the id of the style layer they apply to.
4
+ * A property named here replaces the layer's own value; the rest of its paint
5
+ * stays as the style wrote it.
6
+ */
7
+ export type PaintOverrides = Readonly<Record<string, Readonly<Record<string, unknown>>>>;
8
+ /**
9
+ * Return a copy of `style` whose named layers carry the override paint.
10
+ *
11
+ * Overrides for layers the style does not have are skipped, so an upstream
12
+ * rename falls back to the upstream color rather than breaking the map.
13
+ */
14
+ export declare function recolorStyle(style: StyleSpecification, overrides: PaintOverrides): StyleSpecification;
15
+ /** CARTO Positron colors for the OpenFreeMap `positron` style. */
16
+ export declare const POSITRON_PAINT: PaintOverrides;
17
+ /** CARTO Dark Matter colors for the OpenFreeMap `dark` style. */
18
+ export declare const DARK_MATTER_PAINT: PaintOverrides;
19
+ //# sourceMappingURL=basemap-palette.d.ts.map
@@ -0,0 +1 @@
1
+ export function recolorStyle(_,s){return{..._,layers:_.layers.map(l=>{const n=s[l.id];return n?{...l,paint:{...l.paint,...n}}:l})}}const o={"text-color":"#697b89","text-halo-color":"rgba(255,255,255,0.5)"},e={"text-color":"#8a99a4","text-halo-color":"#fafaf8"},r={"text-color":"#838383","text-halo-color":"#fff"},t={"text-color":"#7a96a0","text-halo-color":"#f5f5f3"},i={"fill-color":"rgba(234, 241, 233, 0.5)"},a={"line-color":"#dddddd"};export const POSITRON_PAINT={background:{"background-color":"#fafaf8"},park:i,landcover_wood:i,landuse_residential:{"fill-color":"rgba(237, 237, 237, 0.5)"},water:{"fill-color":"#d4dadc"},waterway:{"line-color":"#d1dbdf"},building:{"fill-color":"#ededed","fill-outline-color":"#dfdfdf"},highway_minor:{"line-color":["match",["get","class"],"service","#efefef","#e6e6e6"]},tunnel_motorway_casing:a,highway_major_casing:a,highway_motorway_casing:a,highway_motorway_bridge_casing:a,highway_path:{"line-color":"#d5d5d5"},boundary_2:{"line-color":"#ebd6d8"},boundary_3:{"line-color":"#e1c5c7"},boundary_disputed:{"line-color":"#ebd6d8"},"highway-name-path":r,"highway-name-minor":r,"highway-name-major":r,waterway_line_label:t,water_name_point_label:t,water_name_line_label:t,label_other:o,label_village:o,label_town:o,label_city:o,label_city_capital:o,label_state:{"text-color":"#97a4ae","text-halo-color":"#fafaf8"},label_country_1:e,label_country_2:e,label_country_3:e};const h={"line-color":"#232323"},g={"line-color":"rgb(96, 96, 96)"},d={"text-color":"#666","text-halo-color":"#222"},b={"text-color":"rgb(211, 228, 236)","text-halo-color":"#222"},c={"text-color":"rgb(158, 182, 189)","text-halo-color":"#111"},y={"fill-opacity":0};export const DARK_MATTER_PAINT={background:{"background-color":"#0e0e0e"},landcover_wood:y,landuse_park:y,water:{"fill-color":"#2c353c"},waterway:{"line-color":"rgb(63, 90, 109)"},building:{"fill-color":"#393939","fill-outline-color":"#0e0e0e"},highway_path:{"line-color":"#262626"},highway_minor:{"line-color":["match",["get","class"],"minor","rgb(65, 71, 88)","service","#1c1c1c","#262626"]},highway_major_casing:h,highway_major_inner:{"line-color":"rgb(83, 86, 102)"},highway_motorway_casing:h,highway_motorway_inner:{"line-color":"rgb(73, 73, 73)"},highway_name_other:{"text-color":"rgb(181, 180, 180)","text-halo-color":"#111"},water_name:{"text-color":"rgb(155, 155, 155)","text-halo-color":"#181818"},boundary_state:{"line-color":"rgb(103, 103, 114)"},"boundary_country_z0-4":g,"boundary_country_z5-":g,place_other:d,place_suburb:d,place_village:{"text-color":"rgb(154, 153, 153)","text-halo-color":"#222"},place_town:{"text-color":"rgb(204, 208, 228)","text-halo-color":"#222"},place_city:b,place_city_large:b,place_state:{"text-color":"rgb(203, 230, 230)","text-halo-color":"#111"},place_country_other:c,place_country_minor:c,place_country_major:c};
@@ -1 +1 @@
1
- import{getFpGeo as a}from"../../../data/fpGeo.js";import f,{uiState as s}from"../../../store/index.js";import u from"../../../tools/settings.js";import{MAP_DIM_LAYER_ID as c}from"../MaplibreWrapper.js";import{resolveMapTheme as p}from"./map-theme.js";export const LIGHT_TILE_SOURCE={style:"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json"},DARK_TILE_SOURCE={style:"https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"},MAP_MIN_ZOOM=12;export function applyMapDimValue(t,e){t?.getLayer(c)&&(t.setPaintProperty(c,"fill-opacity",m(e)),t.triggerRepaint())}function m(t){return Math.min(Math.max(t,0),1)}export function applyMapOptions(t,e){if(!t)return;t.setMinZoom(e.minZoom??null),t.setMaxZoom(e.maxZoom??null),t.setMaxBounds(e.maxBounds??null);const{pitch:o,maxPitch:n}=e,r=s.animatePitch,i=t.getPitch(),l=!!(r&&o!=null&&n!=null&&n<i);l||t.setMaxPitch(n??null),!(o==null||i===o)&&(r?(t.easeTo({pitch:o,duration:s.mapSettings.pitchtime}),l&&t.once("moveend",()=>t.setMaxPitch(n))):t.jumpTo({pitch:o}))}export function getTileSource(){const t=f.fp?.maplibre??window.__efpMaplibre;return t?.style?{style:t.style,offline:t.offline}:t?.styleUrl?{style:t.styleUrl,offline:t.offline}:p(a()?.properties?.config?.style,u.backgroundColor)==="dark"?DARK_TILE_SOURCE:LIGHT_TILE_SOURCE}
1
+ import{getFpGeo as p}from"../../../data/fpGeo.js";import u,{uiState as s}from"../../../store/index.js";import a from"../../../tools/settings.js";import{MAP_DIM_LAYER_ID as f}from"../MaplibreWrapper.js";import{DARK_MATTER_PAINT as m,POSITRON_PAINT as y,recolorStyle as c}from"./basemap-palette.js";import{resolveMapTheme as h}from"./map-theme.js";export const LIGHT_TILE_SOURCE={style:"https://tiles.openfreemap.org/styles/positron",restyle:t=>c(t,y)},DARK_TILE_SOURCE={style:"https://tiles.openfreemap.org/styles/dark",restyle:t=>c(t,m)},MAP_MIN_ZOOM=12;export function applyMapDimValue(t,e){t?.getLayer(f)&&(t.setPaintProperty(f,"fill-opacity",M(e)),t.triggerRepaint())}function M(t){return Math.min(Math.max(t,0),1)}export function applyMapOptions(t,e){if(!t)return;t.setMinZoom(e.minZoom??null),t.setMaxZoom(e.maxZoom??null),t.setMaxBounds(e.maxBounds??null);const{pitch:o,maxPitch:r}=e,i=s.animatePitch,n=t.getPitch(),l=!!(i&&o!=null&&r!=null&&r<n);l||t.setMaxPitch(r??null),!(o==null||n===o)&&(i?(t.easeTo({pitch:o,duration:s.mapSettings.pitchtime}),l&&t.once("moveend",()=>t.setMaxPitch(r))):t.jumpTo({pitch:o}))}export function getTileSource(){const t=u.fp?.maplibre??window.__efpMaplibre;return t?.style?{style:t.style,offline:t.offline}:t?.styleUrl?{style:t.styleUrl,offline:t.offline}:h(p()?.properties?.config?.style,a.backgroundColor)==="dark"?DARK_TILE_SOURCE:LIGHT_TILE_SOURCE}
@@ -10,6 +10,10 @@ import { type StyleSpecification, type TransformStyleFunction } from 'maplibre-g
10
10
  *
11
11
  * Inline style objects have no style URL to resolve against; callers must pass
12
12
  * already-absolute internals for those.
13
+ *
14
+ * `restyle`, when given, edits the style last — after URL resolution — for
15
+ * changes the style document cannot carry itself, such as a palette applied to
16
+ * a hosted style.
13
17
  */
14
- export declare function createStyleTransform(style: string | StyleSpecification, onPmtilesArchive?: (url: string) => void): TransformStyleFunction | undefined;
18
+ export declare function createStyleTransform(style: string | StyleSpecification, onPmtilesArchive?: (url: string) => void, restyle?: (style: StyleSpecification) => StyleSpecification): TransformStyleFunction | undefined;
15
19
  //# sourceMappingURL=resolve-map-style.d.ts.map
@@ -1 +1 @@
1
- export function createStyleTransform(l,p){if(typeof l!="string")return;const y=new URL(l,window.location.href).href,o=i=>new URL(i,y).href.replace(/%7B/g,"{").replace(/%7D/g,"}"),u=i=>{if(!i.startsWith("pmtiles://"))return o(i);const n=o(i.slice(10));return p?.(n),`pmtiles://${n}`};return(i,n)=>{const e={...n};typeof e.sprite=="string"?e.sprite=o(e.sprite):Array.isArray(e.sprite)&&(e.sprite=e.sprite.map(r=>{if(!r||typeof r!="object")return r;const t=r;return typeof t.url!="string"?r:{...t,url:o(t.url)}})),typeof e.glyphs=="string"&&(e.glyphs=o(e.glyphs));const c=e.sources;if(c){e.sources={...c};for(const[r,t]of Object.entries(c)){if(!t||typeof t!="object")continue;const s={...t};typeof s.url=="string"&&(s.url=u(s.url)),Array.isArray(s.tiles)&&(s.tiles=s.tiles.map(f=>typeof f=="string"?u(f):f)),e.sources[r]=s}}return e}}
1
+ export function createStyleTransform(p,a,c){if(typeof p!="string")return c?(e,o)=>c(o):void 0;const y=new URL(p,window.location.href).href,n=e=>new URL(e,y).href.replace(/%7B/g,"{").replace(/%7D/g,"}"),l=e=>{if(!e.startsWith("pmtiles://"))return n(e);const o=n(e.slice(10));return a?.(o),`pmtiles://${o}`};return(e,o)=>{const r={...o};typeof r.sprite=="string"?r.sprite=n(r.sprite):Array.isArray(r.sprite)&&(r.sprite=r.sprite.map(t=>{if(!t||typeof t!="object")return t;const s=t;return typeof s.url!="string"?t:{...s,url:n(s.url)}})),typeof r.glyphs=="string"&&(r.glyphs=n(r.glyphs));const f=r.sources;if(f){r.sources={...f};for(const[t,s]of Object.entries(f)){if(!s||typeof s!="object")continue;const i={...s};typeof i.url=="string"&&(i.url=l(i.url)),Array.isArray(i.tiles)&&(i.tiles=i.tiles.map(u=>typeof u=="string"?l(u):u)),r.sources[t]=i}}return c?c(r):r}}