@expofp/floorplan 3.17.0 → 3.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{Button-BvHs209k.js → Button-D24xOa4I.js} +5 -5
- package/dist/browser/{CookieConsent-uGe-orOE.js → CookieConsent-BTzsoyoV.js} +7 -7
- package/dist/browser/{Debug-DM3Cnzjy.js → Debug-CqKhUi06.js} +7 -7
- package/dist/browser/{Demo-DIExdSw5.js → Demo-B3EOY0Xq.js} +9 -9
- package/dist/browser/{Free-C90eDy1u.js → Free-pY7M8m4h.js} +9 -9
- package/dist/browser/{Gallery-DseC1DGK.js → Gallery-A8cqqrTJ.js} +9 -9
- package/dist/browser/{GpsLoader-uaVrSMAP.js → GpsLoader-DpJhUdzw.js} +22 -22
- package/dist/browser/KioskStore-DICU_c9W.js +288 -0
- package/dist/browser/{MaplibreAdapter-CCIJmi3w.js → MaplibreAdapter-DDSPODNR.js} +2127 -2070
- package/dist/browser/{ModalContainer-DJALRumx.js → ModalContainer-DnwGQgDt.js} +10 -10
- package/dist/browser/{PermissionNotice-Ck0m5tkz.js → PermissionNotice-Gw1lUPnc.js} +6 -6
- package/dist/browser/{SetKioskMode-BAlK8FJQ.js → SetKioskMode-mh3piul9.js} +11 -11
- package/dist/browser/{ShowKiosk-D1qMukNo.js → ShowKiosk-zkF-CXr8.js} +12 -12
- package/dist/browser/{TouchHand-DJKOFZCg.js → TouchHand-DWec6Hd2.js} +4 -4
- package/dist/browser/{ViewerMenuPanel-DfKgKmA-.js → ViewerMenuPanel-C_wp1AsD.js} +10 -10
- package/dist/browser/{add-debug-secret-listener-G4LjvH4q.js → add-debug-secret-listener-DVLr6HP8.js} +1 -1
- package/dist/browser/{adopt-global-settings-BmgJScKv.js → adopt-global-settings-Btj0VnLn.js} +9 -9
- package/dist/browser/{boolean-editor-P87LiphM.js → boolean-editor-BpIQdba3.js} +9 -9
- package/dist/browser/{bootIntercom-DtSpojcT.js → bootIntercom-DSg-Cxkq.js} +2 -2
- package/dist/browser/{booth-by-xy-DgltL0jn.js → booth-by-xy-BvNNTs6Q.js} +429 -376
- package/dist/browser/bundle.json +68 -65
- package/dist/browser/{classnames-D-Qg-3tl.js → classnames-CFZOol_A.js} +2 -2
- package/dist/browser/{client-Bzcq41f0.js → client-BSrj7kzz.js} +4 -4
- package/dist/browser/{components-Bv7sEfN0.js → components-6Db-nRo5.js} +1544 -1540
- package/dist/browser/{debug-overlay-B6eWMym4.js → debug-overlay-Bt6DNp-8.js} +10 -10
- package/dist/browser/{debug-ui-CmcCYtr0.js → debug-ui-X9kyhrgx.js} +6 -6
- package/dist/browser/{dist-BbIPnlzY.js → dist-CSjEqv2k.js} +3 -3
- package/dist/browser/{dist-BsMb6HPT.js → dist-H1U2_uEE.js} +5 -5
- package/dist/browser/{dist-BX0nA41K.js → dist-HS_i2V3o.js} +6 -6
- package/dist/browser/{efp-debug-init-BRktPQXJ.js → efp-debug-init-D0_xHeMm.js} +3 -3
- package/dist/browser/{enum-editor-BHa21MHI.js → enum-editor-Y3eY0GZN.js} +4 -4
- package/dist/browser/{es5-C4TOotvl.js → es5-Bnh-FuEf.js} +2 -2
- package/dist/browser/{event-not-found-5FiUS2L1.js → event-not-found-DaBAYGFy.js} +1 -1
- package/dist/browser/{exports-DE-f0obs.js → exports-pRH9fRPj.js} +1 -1
- package/dist/browser/{favicon-B1qr1OYc.js → favicon-eVAPrhqR.js} +1 -1
- package/dist/browser/{fetch-retry.umd-CdOGnxGU.js → fetch-retry.umd-CU86oApr.js} +2 -2
- package/dist/browser/{flex-OjTlgVl3.js → flex-CBHNyrZ4.js} +5 -5
- package/dist/browser/{floorplan.loader-DZfgXzTQ.js → floorplan.loader-C2Uhu9rp.js} +10 -10
- package/dist/browser/{floorplan.ready-D4YwQEXj.js → floorplan.ready-D1uAmP_v.js} +161 -161
- package/dist/browser/{fuse-C28vZbTE.js → fuse-N8kU4K-S.js} +2 -2
- package/dist/browser/{i18n-BsYXLDK5.js → i18n-BtP9mFz3.js} +13 -8
- package/dist/browser/index.js +14 -14
- package/dist/browser/{index.module-DqUrH37c.js → index.module-BsJ6W9of.js} +4 -4
- package/dist/browser/integrateKiosk-3pSiw3dQ.js +33 -0
- package/dist/browser/{is-webview-CZP7j8cz.js → is-webview-Cta8T4n3.js} +1 -1
- package/dist/browser/{jsx-runtime--6my_WCj.js → jsx-runtime-BEbKJk0I.js} +2 -2
- package/dist/browser/kiosk-record-CqwMLWxV.js +18 -0
- package/dist/browser/{lib-YBUjKSJT.js → lib-I9l3N_qn.js} +3 -3
- package/dist/browser/{loadImage-jxJkKG3w.js → loadImage-Dss1EbV-.js} +4 -4
- package/dist/browser/{logDeviceInfo-COuAthf5.js → logDeviceInfo-C71JR2gm.js} +9 -9
- package/dist/browser/{main-ffAOHstq.js → main-CfBwT8A1.js} +1 -1
- package/dist/browser/{mobx-BaMKXcrS.js → mobx-BczBqzzL.js} +4 -4
- package/dist/browser/{optional-boolean-editor-B60pTwsX.js → optional-boolean-editor-DzQfvreW.js} +3 -3
- package/dist/browser/{optional-enum-editor-iqX384jX.js → optional-enum-editor-CLMliNto.js} +4 -4
- package/dist/browser/{optional-string-editor-CyROCUHO.js → optional-string-editor-_KGdUVEY.js} +4 -4
- package/dist/browser/{particles.min-DVNuNdIF.js → particles.min-B1MXziWd.js} +2 -2
- package/dist/browser/{react-BCe3bV8J.js → react-DGnrgmGu.js} +2 -2
- package/dist/browser/{react-dom-CN00JDn_.js → react-dom-Cw00D2pA.js} +3 -3
- package/dist/browser/{rolldown-runtime-k6cAZhal.js → rolldown-runtime-BwZ60izJ.js} +1 -1
- package/dist/browser/{select-BGQoI7LX.js → select-D1YJPbva.js} +10 -10
- package/dist/browser/{settings-BJy-4Ynk.js → settings-Bi32JyQ7.js} +2 -2
- package/dist/browser/{settings-item-OZTob0if.js → settings-item-SFeXQJg_.js} +6 -6
- package/dist/browser/{store--s4Hqnvn.js → store-D3AM4bNd.js} +24 -15
- package/dist/browser/{string-editor-PZ1g-Xj9.js → string-editor-CDi_Yy04.js} +4 -4
- package/dist/browser/{text-field-BnEH_wLE.js → text-field-BtEculxh.js} +5 -5
- package/dist/browser/{theme-HBJ7wWWR.js → theme-DDvtl3pp.js} +8 -8
- package/dist/browser/{ui-3KmVe3Bv.js → ui-xJEwvFPJ.js} +8 -8
- package/dist/browser/{useRenderTarget-DJqfltMZ.js → useRenderTarget-Cswo9eRB.js} +4 -4
- package/dist/esm/components/Kiosk/KioskStore.d.ts +9 -0
- package/dist/esm/components/Kiosk/KioskStore.js +1 -1
- package/dist/esm/components/Kiosk/SetKiosk/types.d.ts +18 -14
- package/dist/esm/components/Kiosk/integrateKiosk.d.ts +1 -1
- package/dist/esm/components/Kiosk/integrateKiosk.js +1 -1
- package/dist/esm/components/Kiosk/kiosk-record.d.ts +19 -0
- package/dist/esm/components/Kiosk/kiosk-record.js +1 -0
- package/dist/esm/components/Map/Map.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-all.d.ts +6 -3
- package/dist/esm/components/Map/drawing/config/config-all.js +1 -1
- package/dist/esm/components/Map/drawing/config/config-booth-badge.d.ts +8 -4
- package/dist/esm/components/Map/drawing/config/config-booth-badge.js +1 -1
- package/dist/esm/components/Maplibre/MaplibreAdapter.js +1 -1
- package/dist/esm/components/Maplibre/useKioskIdleEvents.d.ts +18 -0
- package/dist/esm/components/Maplibre/useKioskIdleEvents.js +1 -0
- package/dist/esm/store/MaplibreStore.d.ts +47 -0
- package/dist/esm/store/MaplibreStore.js +1 -1
- package/package.json +8 -8
- package/dist/browser/KioskStore-BG94IdLy.js +0 -241
- package/dist/browser/integrateKiosk-BEXKHkvI.js +0 -28
|
@@ -2,20 +2,20 @@ function __vite_inject_css__(css, id, forceLightDom){ if (typeof document==='un
|
|
|
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.
|
|
5
|
+
e.SENTRY_RELEASE = { id: "3.18.1" };
|
|
6
6
|
var t = new e.Error().stack;
|
|
7
|
-
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "
|
|
7
|
+
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "2b9b9b06-14a9-4157-b26b-335dd9ea0019", e._sentryDebugIdIdentifier = "sentry-dbid-2b9b9b06-14a9-4157-b26b-335dd9ea0019");
|
|
8
8
|
} catch {}
|
|
9
9
|
})();
|
|
10
|
-
import { r as e, t } from "./rolldown-runtime-
|
|
11
|
-
import { $ as n, A as r, B as i, F as a, G as o, H as s, I as c, L as l, Nt as u, U as d, V as f, W as p, Z as m, _ as h, a as g, at as _, c as v, ct as y, d as b, f as x, h as S, it as C, k as w, l as T, m as E, n as D, p as O, q as k, rt as A, s as j, t as ee, v as M, y as te, z as ne } from "./i18n-
|
|
12
|
-
import { s as re } from "./efp-debug-init-
|
|
13
|
-
import { t as ie } from "./react-
|
|
14
|
-
import { t as ae } from "./jsx-runtime
|
|
15
|
-
import { n as oe, r as N, t as se } from "./loadImage-
|
|
16
|
-
import { t as ce } from "./is-webview-
|
|
17
|
-
import { t as le } from "./classnames-
|
|
18
|
-
import { t as ue } from "./Button-
|
|
10
|
+
import { r as e, t } from "./rolldown-runtime-BwZ60izJ.js";
|
|
11
|
+
import { $ as n, A as r, B as i, F as a, G as o, H as s, I as c, L as l, Nt as u, U as d, V as f, W as p, Z as m, _ as h, a as g, at as _, c as v, ct as y, d as b, f as x, h as S, it as C, k as w, l as T, m as E, n as D, p as O, q as k, rt as A, s as j, t as ee, v as M, y as te, z as ne } from "./i18n-BtP9mFz3.js";
|
|
12
|
+
import { s as re } from "./efp-debug-init-D0_xHeMm.js";
|
|
13
|
+
import { t as ie } from "./react-DGnrgmGu.js";
|
|
14
|
+
import { t as ae } from "./jsx-runtime-BEbKJk0I.js";
|
|
15
|
+
import { n as oe, r as N, t as se } from "./loadImage-Dss1EbV-.js";
|
|
16
|
+
import { t as ce } from "./is-webview-Cta8T4n3.js";
|
|
17
|
+
import { t as le } from "./classnames-CFZOol_A.js";
|
|
18
|
+
import { t as ue } from "./Button-D24xOa4I.js";
|
|
19
19
|
//#region ../../node_modules/.pnpm/deepmerge@4.3.1/node_modules/deepmerge/dist/cjs.js
|
|
20
20
|
var de = /* @__PURE__ */ t(((e, t) => {
|
|
21
21
|
var n = function(e) {
|
|
@@ -33969,7 +33969,7 @@ var iI = (eI = class {
|
|
|
33969
33969
|
}
|
|
33970
33970
|
async buildEngine() {
|
|
33971
33971
|
try {
|
|
33972
|
-
let { default: e } = await import("./fuse-
|
|
33972
|
+
let { default: e } = await import("./fuse-N8kU4K-S.js").then((e) => e.n);
|
|
33973
33973
|
te(() => {
|
|
33974
33974
|
this.engine = new e([], {
|
|
33975
33975
|
keys: this.keys,
|
|
@@ -34055,7 +34055,7 @@ function wI() {
|
|
|
34055
34055
|
}
|
|
34056
34056
|
var TI = (fI = E({ keepAlive: !0 }), pI = E({ keepAlive: !0 }), mI = E({ keepAlive: !0 }), hI = E({ keepAlive: !0 }), gI = E({ keepAlive: !0 }), _I = class {
|
|
34057
34057
|
constructor(e) {
|
|
34058
|
-
this.rootStore = void 0, xI(this, "mapViewMode", vI, this), xI(this, "maplibreSelected", yI, this), xI(this, "isOnline", bI, this), this.handleOnline = () => this.setOnline(!0), this.handleOffline = () => this.setOnline(!1), this.rootStore = e, this.mapViewMode = this.getInitialViewMode(), this.maplibreSelected = this.mapViewMode !== "floorplan", typeof window < "u" && (window.addEventListener("online", this.handleOnline), window.addEventListener("offline", this.handleOffline));
|
|
34058
|
+
this.rootStore = void 0, xI(this, "mapViewMode", vI, this), xI(this, "maplibreSelected", yI, this), xI(this, "isOnline", bI, this), this.cameraPortBox = h.box(null, { deep: !1 }), this.handleOnline = () => this.setOnline(!0), this.handleOffline = () => this.setOnline(!1), this.rootStore = e, this.mapViewMode = this.getInitialViewMode(), this.maplibreSelected = this.mapViewMode !== "floorplan", typeof window < "u" && (window.addEventListener("online", this.handleOnline), window.addEventListener("offline", this.handleOffline));
|
|
34059
34059
|
}
|
|
34060
34060
|
dispose() {
|
|
34061
34061
|
typeof window > "u" || (window.removeEventListener("online", this.handleOnline), window.removeEventListener("offline", this.handleOffline));
|
|
@@ -34063,6 +34063,15 @@ var TI = (fI = E({ keepAlive: !0 }), pI = E({ keepAlive: !0 }), mI = E({ keepAli
|
|
|
34063
34063
|
setOnline(e) {
|
|
34064
34064
|
this.isOnline = e;
|
|
34065
34065
|
}
|
|
34066
|
+
get cameraPort() {
|
|
34067
|
+
return this.cameraPortBox.get();
|
|
34068
|
+
}
|
|
34069
|
+
setCameraPort(e) {
|
|
34070
|
+
this.cameraPortBox.set(e);
|
|
34071
|
+
}
|
|
34072
|
+
clearCameraPortIfCurrent(e) {
|
|
34073
|
+
this.cameraPortBox.get() === e && this.cameraPortBox.set(null);
|
|
34074
|
+
}
|
|
34066
34075
|
activateMaplibre() {
|
|
34067
34076
|
this.maplibreEnabled && (this.mapViewMode = Ur.allow3dView && this.mapViewMode !== "map3d" ? "map3d" : "map2d", this.maplibreSelected = !0);
|
|
34068
34077
|
}
|
|
@@ -34111,7 +34120,7 @@ var TI = (fI = E({ keepAlive: !0 }), pI = E({ keepAlive: !0 }), mI = E({ keepAli
|
|
|
34111
34120
|
initializer: function() {
|
|
34112
34121
|
return wI();
|
|
34113
34122
|
}
|
|
34114
|
-
}), SI(_I.prototype, "setOnline", [b], Object.getOwnPropertyDescriptor(_I.prototype, "setOnline"), _I.prototype), SI(_I.prototype, "activateMaplibre", [b], Object.getOwnPropertyDescriptor(_I.prototype, "activateMaplibre"), _I.prototype), SI(_I.prototype, "deactivateMaplibre", [b], Object.getOwnPropertyDescriptor(_I.prototype, "deactivateMaplibre"), _I.prototype), SI(_I.prototype, "hideModeSwitchButton", [fI], Object.getOwnPropertyDescriptor(_I.prototype, "hideModeSwitchButton"), _I.prototype), SI(_I.prototype, "maplibreEnabled", [pI], Object.getOwnPropertyDescriptor(_I.prototype, "maplibreEnabled"), _I.prototype), SI(_I.prototype, "useMaplibreMap", [mI], Object.getOwnPropertyDescriptor(_I.prototype, "useMaplibreMap"), _I.prototype), SI(_I.prototype, "showMaplibre", [hI], Object.getOwnPropertyDescriptor(_I.prototype, "showMaplibre"), _I.prototype), SI(_I.prototype, "isMap3d", [gI], Object.getOwnPropertyDescriptor(_I.prototype, "isMap3d"), _I.prototype), _I), EI = class {
|
|
34123
|
+
}), SI(_I.prototype, "setOnline", [b], Object.getOwnPropertyDescriptor(_I.prototype, "setOnline"), _I.prototype), SI(_I.prototype, "setCameraPort", [b], Object.getOwnPropertyDescriptor(_I.prototype, "setCameraPort"), _I.prototype), SI(_I.prototype, "clearCameraPortIfCurrent", [b], Object.getOwnPropertyDescriptor(_I.prototype, "clearCameraPortIfCurrent"), _I.prototype), SI(_I.prototype, "activateMaplibre", [b], Object.getOwnPropertyDescriptor(_I.prototype, "activateMaplibre"), _I.prototype), SI(_I.prototype, "deactivateMaplibre", [b], Object.getOwnPropertyDescriptor(_I.prototype, "deactivateMaplibre"), _I.prototype), SI(_I.prototype, "hideModeSwitchButton", [fI], Object.getOwnPropertyDescriptor(_I.prototype, "hideModeSwitchButton"), _I.prototype), SI(_I.prototype, "maplibreEnabled", [pI], Object.getOwnPropertyDescriptor(_I.prototype, "maplibreEnabled"), _I.prototype), SI(_I.prototype, "useMaplibreMap", [mI], Object.getOwnPropertyDescriptor(_I.prototype, "useMaplibreMap"), _I.prototype), SI(_I.prototype, "showMaplibre", [hI], Object.getOwnPropertyDescriptor(_I.prototype, "showMaplibre"), _I.prototype), SI(_I.prototype, "isMap3d", [gI], Object.getOwnPropertyDescriptor(_I.prototype, "isMap3d"), _I.prototype), _I), EI = class {
|
|
34115
34124
|
constructor(e) {
|
|
34116
34125
|
this.rootStore = void 0, this.poiTypes = [], this.rootStore = e;
|
|
34117
34126
|
}
|
|
@@ -41222,7 +41231,7 @@ $.toursStore;
|
|
|
41222
41231
|
var CW = $.intercomStore;
|
|
41223
41232
|
window.__store = $;
|
|
41224
41233
|
//#endregion
|
|
41225
|
-
export { iF as $,
|
|
41234
|
+
export { iF as $, bi as $t, oz as A, oj as At, VF as B, fo as Bt, wB as C, Oj as Ct, Bz as D, lj as Dt, Vz as E, aj as Et, WI as F, ej as Ft, TF as G, Aa as Gt, CF as H, eo as Ht, HI as I, KA as It, EF as J, Ji as Jt, kF as K, ga as Kt, BI as L, YA as Lt, WL as M, fj as Mt, GI as N, pj as Nt, Rz as O, uj as Ot, KI as P, mj as Pt, aF as Q, Si as Qt, zI as R, WA as Rt, SB as S, Dj as St, Hz as T, $A as Tt, wF as U, ao as Ut, LF as V, oo as Vt, PF as W, za as Wt, _F as X, Gi as Xt, jF as Y, Wi as Yt, oF as Z, Ki as Zt, JV as _, Ee as _n, EM as _t, bW as a, $r as an, wP as at, EB as b, Bj as bt, _W as c, kt as cn, bP as ct, wH as d, ot as dn, PN as dt, gi as en, eF as et, mH as f, Ze as fn, ON as ft, oH as g, ke as gn, UM as gt, uH as h, Re as hn, ZM as ht, CW as i, Qr as in, yP as it, zR as j, sj as jt, zz as k, ij as kt, SH as l, St as ln, xP as lt, lH as m, Pe as mn, mN as mt, vW as n, ri as nn, WP as nt, SW as o, Ur as on, SP as ot, pH as p, L as pn, hN as pt, OF as q, ma as qt, xW as r, ti as rn, HP as rt, $ as s, Ht as sn, CP as st, yW as t, xi as tn, qP as tt, xH as u, ut as un, BN as ut, tV as v, F as vn, SM as vt, qz as w, vj as wt, TB as x, Fj as xt, OB as y, fe as yn, Gj as yt, dI as z, bl as zt };
|
|
41226
41235
|
|
|
41227
41236
|
;/* vite-per-chunk-css */
|
|
41228
41237
|
__vite_inject_css__(".efp-set-kiosk-mode-anchor{bottom:calc(1.25rem * var(--ui-scale));z-index:9999;pointer-events:none;position:fixed;left:50%;transform:translate(-50%)}.efp-set-kiosk-mode{width:calc(23.75rem * var(--ui-scale));background:var(--color-primary);border-radius:var(--border-radius-xl);box-shadow:var(--shadow-md);pointer-events:auto;line-height:1;display:grid}.efp-set-kiosk-mode__header{padding:calc(.625rem * var(--ui-scale)) calc(1rem * var(--ui-scale));font-size:var(--font-size-xl);font-weight:var(--font-weight-bold);color:var(--color-white);text-align:center;grid-template-columns:auto 1fr auto;place-items:center;display:grid}.efp-set-kiosk-mode__header i{font-size:var(--icon-size-xl)}.efp-set-kiosk-mode__header img{width:var(--icon-size-xl);height:var(--icon-size-xl)}.efp-set-kiosk-mode__close{box-shadow:none;cursor:pointer;background:0 0;border:0;margin:0;padding:0}.efp-confirm-dialog{background:var(--color-white);box-shadow:var(--shadow-md);border-radius:var(--border-radius-xl);padding:calc(1rem * var(--ui-scale)) calc(1.125rem * var(--ui-scale));gap:calc(1rem * var(--ui-scale));display:grid;position:relative}.efp-confirm-dialog__content{font-size:var(--font-size-xl);font-weight:var(--font-weight-normal)}.efp-confirm-dialog__content strong{font-weight:var(--font-weight-medium)}.efp-confirm-dialog__controls{gap:calc(.625rem * var(--ui-scale));grid-template-columns:1fr 1fr;display:grid}.efp-info-message{border-radius:var(--border-radius-xl);padding:calc(1rem * var(--ui-scale)) calc(1.125rem * var(--ui-scale));background:var(--color-white);gap:calc(.5rem * var(--ui-scale));display:grid;position:relative}.efp-info-message__item{gap:calc(.625rem * var(--ui-scale));font-size:var(--font-size-xl);font-weight:var(--font-weight-normal);grid-auto-flow:column;place-content:flex-start;place-items:center;line-height:1;display:grid}.efp-info-message__item strong{font-weight:var(--font-weight-bold)}.efp-info-message__img{width:calc(1.875rem * var(--ui-scale));height:calc(1.875rem * var(--ui-scale))}.efp-set-kiosk-form{border-radius:var(--border-radius-xl);background:var(--color-white);padding:calc(1rem * var(--ui-scale)) calc(1.125rem * var(--ui-scale));display:grid;position:relative}.efp-set-kiosk-form__content{gap:calc(1rem * var(--ui-scale));display:grid}.efp-set-kiosk-form__inputs{gap:calc(.625rem * var(--ui-scale));display:grid}.efp-set-kiosk-form__controls{gap:calc(.625rem * var(--ui-scale));grid-template-columns:1fr 2fr;display:grid}.efp-range-input{gap:calc(.3125rem * var(--ui-scale));width:100%;font-size:var(--font-size-lg);display:grid}.efp-range-input__header{text-align:center;color:var(--color-black);font-size:var(--font-size-lg);font-weight:var(--font-weight-normal);grid-template-columns:auto 1fr auto;place-items:center;display:grid}.efp-range-input__header strong{font-weight:var(--font-weight-medium)}.efp-range-input__control{width:calc(1.25rem * var(--ui-scale));height:calc(1.25rem * var(--ui-scale));box-shadow:none;cursor:pointer;border:0;outline:none;place-content:center;place-items:center;margin:0;padding:0;display:grid}.efp-range-input__control i{font-size:var(--icon-size-xxs)}.efp-range-input__input-block{width:100%;height:calc(1.375rem * var(--ui-scale));place-items:center;display:grid;position:relative}.efp-range-input__input{opacity:0;z-index:2;width:100%;height:100%;position:absolute;top:0;bottom:0;left:0;right:0}.efp-range-input__custom-input{height:calc(.375rem * var(--ui-scale));background:var(--color-gray-400);border-radius:calc(.1875rem * var(--ui-scale));pointer-events:none;position:absolute;top:50%;left:0;right:0;transform:translateY(-50%)}.efp-range-input__progress{background:var(--color-primary);border-radius:inherit;height:100%;position:absolute;top:0}.efp-range-input__progress:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.efp-range-input__progress:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.efp-range-input__progress:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.efp-range-input__progress:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.efp-range-input__thumb{width:calc(1.375rem * var(--ui-scale));height:calc(1.375rem * var(--ui-scale));background:var(--color-white);border:calc(.1875rem * var(--ui-scale)) solid var(--color-primary-dark);pointer-events:none;box-shadow:var(--shadow-sm);border-radius:50%;position:absolute;top:50%}.efp-range-input__thumb:not(:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.efp-range-input__thumb:not(:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi))){left:0}.efp-range-input__thumb:-webkit-any(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.efp-range-input__thumb:is(:lang(ae),:lang(ar),:lang(arc),:lang(bcc),:lang(bqi),:lang(ckb),:lang(dv),:lang(fa),:lang(glk),:lang(he),:lang(ku),:lang(mzn),:lang(nqo),:lang(pnb),:lang(ps),:lang(sd),:lang(ug),:lang(ur),:lang(yi)){right:0}.efp-status-messages{height:calc(calc(2.75rem * var(--ui-scale)) + var(--border-radius-2xl));border-radius:var(--border-radius-xl);grid-template-rows:1fr;display:grid;position:absolute;top:0;left:0;right:0;overflow:hidden}.efp-status-messages__message{gap:calc(.375rem * var(--ui-scale));color:var(--color-white);font-size:var(--font-size-xl);font-weight:var(--font-weight-bold);padding-bottom:var(--border-radius-2xl);grid-auto-flow:column;place-content:center;place-items:center;display:grid}.efp-status-messages__message i{font-size:var(--icon-size-md)}.efp-status-messages__message--success{background:var(--color-green)}.efp-status-messages__message--error{background:var(--color-red)}\n/*$vite$:1*/", "store.css", false);
|
|
@@ -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.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.18.1" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "0a67f4c1-0ef6-428f-92c6-94c57178bf21", e._sentryDebugIdIdentifier = "sentry-dbid-0a67f4c1-0ef6-428f-92c6-94c57178bf21");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { t as e } from "./jsx-runtime
|
|
10
|
-
import { t } from "./settings-item-
|
|
11
|
-
import { t as n } from "./text-field-
|
|
9
|
+
import { t as e } from "./jsx-runtime-BEbKJk0I.js";
|
|
10
|
+
import { t } from "./settings-item-SFeXQJg_.js";
|
|
11
|
+
import { t as n } from "./text-field-BtEculxh.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.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.18.1" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "9c5a0877-c176-4e2d-b51c-123d50ab2b3c", e._sentryDebugIdIdentifier = "sentry-dbid-9c5a0877-c176-4e2d-b51c-123d50ab2b3c");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
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-
|
|
12
|
-
import { t as l } from "./classnames-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-BwZ60izJ.js";
|
|
10
|
+
import { t } from "./react-DGnrgmGu.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-CBHNyrZ4.js";
|
|
12
|
+
import { t as l } from "./classnames-CFZOol_A.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.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.18.1" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "f658045a-5be7-4ea4-a4b2-ddea9ab9caf3", e._sentryDebugIdIdentifier = "sentry-dbid-f658045a-5be7-4ea4-a4b2-ddea9ab9caf3");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { t as n } from "./jsx-runtime
|
|
12
|
-
import { t as r } from "./react-dom-
|
|
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-
|
|
14
|
-
import { c as f, i as p, n as m, o as h, r as g, s as _, t as v } from "./dist-
|
|
15
|
-
import { t as y } from "./classnames-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-BwZ60izJ.js";
|
|
10
|
+
import { t } from "./react-DGnrgmGu.js";
|
|
11
|
+
import { t as n } from "./jsx-runtime-BEbKJk0I.js";
|
|
12
|
+
import { t as r } from "./react-dom-Cw00D2pA.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-CBHNyrZ4.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-HS_i2V3o.js";
|
|
15
|
+
import { t as y } from "./classnames-CFZOol_A.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.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.18.1" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "3c34ab8b-5d65-4c06-8595-6ed371acabc5", e._sentryDebugIdIdentifier = "sentry-dbid-3c34ab8b-5d65-4c06-8595-6ed371acabc5");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { a as t, i as n, s as r } from "./efp-debug-init-
|
|
11
|
-
import { a as i, i as a } from "./adopt-global-settings-
|
|
12
|
-
import { t as o } from "./jsx-runtime
|
|
13
|
-
import "./settings-
|
|
14
|
-
import { t as s } from "./add-debug-secret-listener-
|
|
9
|
+
import { r as e } from "./rolldown-runtime-BwZ60izJ.js";
|
|
10
|
+
import { a as t, i as n, s as r } from "./efp-debug-init-D0_xHeMm.js";
|
|
11
|
+
import { a as i, i as a } from "./adopt-global-settings-Btj0VnLn.js";
|
|
12
|
+
import { t as o } from "./jsx-runtime-BEbKJk0I.js";
|
|
13
|
+
import "./settings-Bi32JyQ7.js";
|
|
14
|
+
import { t as s } from "./add-debug-secret-listener-DVLr6HP8.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-
|
|
29
|
+
let { DebugUi: n } = await import("./debug-ui-X9kyhrgx.js"), { createRoot: i } = await import("./client-BSrj7kzz.js").then((t) => /* @__PURE__ */ e(t.default, 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.
|
|
4
|
+
e.SENTRY_RELEASE = { id: "3.18.1" };
|
|
5
5
|
var t = new e.Error().stack;
|
|
6
6
|
t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "a7e05aea-745e-4a4b-ba82-432527d9c312", e._sentryDebugIdIdentifier = "sentry-dbid-a7e05aea-745e-4a4b-ba82-432527d9c312");
|
|
7
7
|
} catch {}
|
|
8
8
|
})();
|
|
9
|
-
import { r as e } from "./rolldown-runtime-
|
|
10
|
-
import { t } from "./react-
|
|
11
|
-
import { c as n } from "./store
|
|
9
|
+
import { r as e } from "./rolldown-runtime-BwZ60izJ.js";
|
|
10
|
+
import { t } from "./react-DGnrgmGu.js";
|
|
11
|
+
import { c as n } from "./store-D3AM4bNd.js";
|
|
12
12
|
//#region src/utils/getRenderTargetFromRoot.ts
|
|
13
13
|
var r = /* @__PURE__ */ e(t(), 1);
|
|
14
14
|
function i(e) {
|
|
@@ -15,6 +15,15 @@ declare class KioskStore {
|
|
|
15
15
|
startCleanupMessages(): void;
|
|
16
16
|
private isResettingCamera;
|
|
17
17
|
resetCamera(): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Restores the home framing in map mode. The kiosk is integrated at page load,
|
|
20
|
+
* well before the map has finished loading, so wait for the camera port rather
|
|
21
|
+
* than giving up on the first miss. Returns false when there was no map camera
|
|
22
|
+
* to restore through.
|
|
23
|
+
*/
|
|
24
|
+
private resetMaplibreCamera;
|
|
25
|
+
private waitForMaplibreCameraPort;
|
|
26
|
+
private resetRendererCamera;
|
|
18
27
|
restoreData(): void;
|
|
19
28
|
handleSetupReady(): void;
|
|
20
29
|
handleClose(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__decorate as
|
|
1
|
+
import{__decorate as r}from"tslib";import{action as o,computed as m,observable as d,toJS as c,when as k}from"mobx";import a from"../../store";import{areLayersEnabled as S}from"../../utils/areLayersEnabled";import{t as h}from"../../utils/i18n";import{isPointVisible as g}from"../Map/visibleArea";import{getPtScaleZoomRatio as f,toFiniteNumber as u}from"./kiosk-record";import{updateKiosk as C}from"./kioskApi";import{getSavedKiosk as y,removeKiosk as M,saveKiosk as K}from"./SetKiosk";const v=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)}get renderer(){return a.rendererService.renderer}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=a.rendererService.getCameraState();return e?{mapInitialPtScale:this.initialPtScale,mapPtScale:e.ptScale,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),i=Object.keys(t);if(n.length!==i.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.resetRendererCamera()}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),i=u(t?.mapCenterLat),l=u(t?.mapZoom);return n===void 0||i===void 0||l===void 0?(e.resetPitch(),a.uiState.fitBounds(),!0):(e.applyCameraState({lng:n,lat:i,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 k(()=>!!e.cameraPort||!e.showMaplibre,{timeout:v})}catch{return null}return e.cameraPort}async resetRendererCamera(){const e=this.renderer;if(!e)return;const t=this.kiosk;await e.controls.resetCamera({pan:!0,zoom:!0,roll:!0,pitch:!0},!0),t?.z!=null&&a.fp.activateFloor({name:String(t.z)});const n=f(t);n!==void 0&&await e.controls.zoomBy(n,!0);const i=u(t?.mapCenterX),l=u(t?.mapCenterY);i!==void 0&&l!==void 0&&await e.controls.panTo(i,l,!0);const p=u(t?.mapRollDegrees);p!==void 0&&await e.controls.rollTo(p,!0)}restoreData(){const e=y();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(){M(),this.setKiosk(null),a.uiState.resetMapSettings(),a.uiState.resetUIScale(),this.addStatusMessage({variant:"success",title:h("Deleted")})}handleSave(){const e=this.renderer;if(!e)return;const t=c(this.kiosk),n=this.getCameraState(),i={...t,...n};if(!g(e,i)){this.addStatusMessage({variant:"error",title:h("Kiosk not visible")});return}this.setKiosk(i),K(i),C(i,"https://app.expofp.com/"),a.uiState.setUIScale(i.uiScale,!0),this.addStatusMessage({variant:"success",title:h("Saved")}),this.savedKiosk=i}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(),i=S()?n.find(p=>p.active)?.name??null:null,l=a.uiState.uiScale;this.setKiosk({...t,x:e.x,y:e.y,z:i,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()})}}r([m({keepAlive:!0})],s.prototype,"kiosk",null),r([o],s.prototype,"setKiosk",null),r([m({keepAlive:!0})],s.prototype,"renderer",null),r([d],s.prototype,"savedKiosk",void 0),r([m({keepAlive:!0})],s.prototype,"hasUnsavedChanges",null),r([d],s.prototype,"statusMessages",void 0),r([o],s.prototype,"addStatusMessage",null),r([o],s.prototype,"clearStatusMessages",null),r([o],s.prototype,"startCleanupMessages",null),r([o],s.prototype,"resetCamera",null),r([o],s.prototype,"restoreData",null),r([o],s.prototype,"handleSetupReady",null),r([o],s.prototype,"handleClose",null),r([o],s.prototype,"handleDelete",null),r([o],s.prototype,"handleSave",null),r([o],s.prototype,"handleChange",null),r([o],s.prototype,"setInitialPtScale",null),r([o],s.prototype,"handleClick",null),r([o],s.prototype,"handleNavigationChange",null);export default new s;
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { type Kiosk as KioskData } from '@expofp/schema';
|
|
2
|
+
import { type ReactNode } from 'react';
|
|
3
|
+
import { type AlertProps } from '../../../ui/Alert';
|
|
4
|
+
import { type ButtonVariant } from '../../../ui/Button';
|
|
5
|
+
/**
|
|
6
|
+
* The saved camera framing — the camera subset of the kiosk record. The field
|
|
7
|
+
* shapes are not declared here: `KioskSchema` (@expofp/schema) is the single
|
|
8
|
+
* definition of kiosk input data, and a kiosk reaches us from localStorage,
|
|
9
|
+
* from `config.kiosk` or from the legacy `kiosk_*` params through that same
|
|
10
|
+
* shape. Every field is optional there because every one of those sources can
|
|
11
|
+
* omit it — guard with `Number.isFinite` rather than assuming.
|
|
12
|
+
*/
|
|
13
|
+
export type KioskMapState = Pick<KioskData, 'mapRollDegrees' | 'mapInitialPtScale' | 'mapPtScale' | 'mapCenterX' | 'mapCenterY' | 'mapPitch' | 'mapCenterLng' | 'mapCenterLat' | 'mapZoom' | 'mapBearingDegrees' | 'mapPitchDegrees'>;
|
|
14
|
+
/**
|
|
15
|
+
* A kiosk as the on-device SetKiosk flow writes it: same shape as `KioskData`,
|
|
16
|
+
* narrowed to the anchor fields that flow always fills in.
|
|
17
|
+
*/
|
|
18
|
+
export interface Kiosk extends KioskData {
|
|
13
19
|
x: number;
|
|
14
20
|
y: number;
|
|
15
21
|
z: string | null;
|
|
16
22
|
heading: number;
|
|
17
|
-
lat?: number;
|
|
18
|
-
lng?: number;
|
|
19
23
|
iconSizePercent: number;
|
|
20
24
|
uiScale: number;
|
|
21
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Kiosk } from './SetKiosk';
|
|
1
|
+
import { type Kiosk } from './SetKiosk';
|
|
2
2
|
export declare function integrateKioskIntoMap(kiosk: Kiosk, enableKioskMode: boolean): void;
|
|
3
3
|
export declare function integrateKioskIntoWf(kiosk: Kiosk): void;
|
|
4
4
|
//# sourceMappingURL=integrateKiosk.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{runInAction as
|
|
1
|
+
import{runInAction as n,when as a}from"mobx";import e from"../../store";import{getPtScaleZoomRatio as i}from"./kiosk-record";export function integrateKioskIntoMap(t,o){t&&n(()=>{if(e.uiState.setKioskData(t),e.uiState.kiosk=o,e.maplibreStore.showMaplibre)return;e.uiState.setMapSettings({centerxy:`${t.mapCenterX},${t.mapCenterY}`,z:t.z??void 0,bearing:t.mapRollDegrees});const r=i(t);r!==void 0&&e.uiState.changeZoom(r)})}export function integrateKioskIntoWf(t){t&&(t.z!=null&&e.fp.activateFloor({name:t.z.toString()}),a(()=>!!e.uiState.selectedRoute,()=>{const o=e.uiState.selectedRoute;o?.to&&!o.from&&e.routeStore.selectRoute(o,!1,!0)}))}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type Kiosk } from './SetKiosk';
|
|
2
|
+
/**
|
|
3
|
+
* Narrows a saved kiosk field to a usable number.
|
|
4
|
+
*
|
|
5
|
+
* Every field of a kiosk record is optional (`KioskSchema`) and the record can
|
|
6
|
+
* arrive from localStorage, from `config.kiosk` or from the legacy `kiosk_*`
|
|
7
|
+
* params — so a field can be absent, or present and `NaN` from a bad parse.
|
|
8
|
+
* Both must read as "not set": feeding `NaN` into a camera move silently parks
|
|
9
|
+
* the kiosk nowhere.
|
|
10
|
+
*/
|
|
11
|
+
export declare function toFiniteNumber(value: number | null | undefined): number | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* The zoom factor that takes the plan renderer from the pt-scale it booted at
|
|
14
|
+
* to the one the kiosk was saved at, or undefined when the record does not
|
|
15
|
+
* carry both. Restoring the home framing and integrating the kiosk at load both
|
|
16
|
+
* need it, and both need the same guard.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getPtScaleZoomRatio(kiosk: Kiosk | null | undefined): number | undefined;
|
|
19
|
+
//# sourceMappingURL=kiosk-record.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function toFiniteNumber(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}export function getPtScaleZoomRatio(e){const t=toFiniteNumber(e?.mapInitialPtScale),n=toFiniteNumber(e?.mapPtScale);if(!(t===void 0||n===void 0||n<=0))return t/n}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Fragment as
|
|
1
|
+
import{Fragment as te,jsx as C,jsxs as O}from"react/jsx-runtime";import{Box as k}from"@expofp/geometry";import re from"classnames";import ne from"color";import{observable as ie,reaction as ae}from"mobx";import{useObserver as se}from"mobx-react-lite";import{useEffect as le,useMemo as me,useRef as S,useState as ce}from"react";import{DEBUG_STORAGE_KEY as X}from"../../constants";import fe from"../../data";import{fpGeo as de}from"../../data/fpGeo";import{svgArea as U}from"../../data/svg";import{boxToRenderer as L,createSceneDef as ue,mapRollSetting as j}from"../../renderer";import{pickDefaultScene as A,pickDefaultScenePoint as pe}from"../../renderer/engine-core/defs";import a,{boothStore as he,layersStore as h,uiState as o}from"../../store";import{BoothBase as Z}from"../../store/BoothStore";import{Category as ve}from"../../store/CategoryStore";import{Exhibitor as $}from"../../store/ExhibitorStore";import{LayerMode as R}from"../../store/LayerStore";import{CurrentPosition as ye,Route as be}from"../../store/RouteStore";import B from"../../tools/logger";import p from"../../tools/settings";import ge from"../../ui/Draggable";import{areLayersEnabled as we}from"../../utils/areLayersEnabled";import{applyVenueDimValue as Se,createDimmingAnimator as Re}from"../../utils/dimming";import{convertGpsToLocal as xe}from"../../utils/gps";import y from"../../utils/is-debug";import{isPathwayLayer as K}from"../../utils/is-pathway-layer";import{useReaction as d}from"../../utils/mobx";import{createWayfinding as Te}from"../../wayfinding";import V from"./booth-by-xy";import Ce from"./drawing/config/config-all";import{configMarkers as ke,getMarkerFromClick as Le}from"./drawing/config/config-markers";import{loadLayersImages as Be}from"./drawing/config/loadBoothsImages";import{useBuildRoute as Ee}from"./traffic/useBuildRoute";import{useManageTraffic as Me}from"./traffic/useManageTraffic";const W=Number.isFinite(p.maxZoom);export default function Pe(){let E={};const H="#ebebeb",v=S(),b=me(()=>ie({moving:!1,prevLevel:a.layerStore.layers.find(e=>!e.frozen&&e.visible)}),[]),l=a.rendererService,x=S(Re(e=>Se(l,e)));let s;const g=S(null),M=S(null);let P=null,z=null,I=null,_=!1;function D(){h.layers.forEach(e=>{e.configured=!1,e.children=[],e.loaded=!1})}const[q,J]=ce(()=>typeof window<"u"&&window.localStorage?localStorage.getItem(X)!=="false":!0);d(()=>a.routeStore.currentRouteLayer,()=>{if(!l.scene||b.prevLevel===a.routeStore.currentRouteLayer)return;const e=l.scene.rootLayer.children.filter(t=>a.layerStore.floors.some(r=>t.name.includes(r.name)));let n=a.routeStore.currentRouteLayer.name;if(!e.find(t=>t.name===n))return;const i=e?.map(t=>(t.name===n&&(t.hidden=!1),t.name===b.prevLevel?.name&&(t.hidden=!0),t));b.prevLevel=a.routeStore.currentRouteLayer,l.update(...i)}),d(()=>o.centerMap,()=>{!o.centerMap||a.maplibreStore.showMaplibre||(s.controls.resetCamera({zoom:!!(o.list.type==="search"&&o.list.text)}),o.centerMap=!1)}),le(()=>{if(!v.current)return;async function e(){D(),h.layersLoaded=!1;let n={};try{if(y){const t=document.createElement("canvas").getContext("webgl2"),r=t&&t.getExtension("EXT_disjoint_timer_query_webgl2"),m=(await import("stats-gl")).default,f=new m({trackGPU:r,horizontal:!0}),u=M.current;if(!u)throw new Error("memoryInfoPanel not found.");f.dom.style.position="relative",u.style.width=`${90*(r?3:2)}px`,u.style.height="48px",u.appendChild(f.dom),n={stats:f,memoryInfoPanel:u}}}catch(i){console.error(i)}s=l.create({canvas:v.current,ui:n}),g.current=s,ae(()=>o.canvasVisibleRectPx,(i,t)=>{i&&(s.visibleRect=L(i)),t.dispose()},{fireImmediately:!0}),Ce(l).then(({layers:i,cleanup:t})=>{if(_||g.current!==s){t();return}I=t,y&&console.log("Renderer settings",s);const r=ne(p.backgroundColor==="none"?H:p.backgroundColor).string();E=ue(i,U,r),l.start(E),x.current.setTarget(o.dimmed,{immediate:!0}),j(s,a.fp.enableRotation?1:0),W&&s.viewport.setMaxZoom(p.maxZoom),h.layersLoaded=!0,a.fp.onFpConfigured&&a.fp?.onFpConfigured(),P=Te(l,a),z=ke(l),Be(l)}),s.events.addEventListener("pointer:move",({data:i})=>{if(o.setKioskModeEnabled)return;const{point:t,defs:r}=A(i),c=V(t.x,t.y),m=F(r[0]);o.hoveredBooth=c||m}),s.events.addEventListener("pointer:out",()=>{o.setKioskModeEnabled||(o.hoveredBooth=null)}),s.events.addEventListener("pointer:click",({data:i})=>{if(!o?.rootElement)return;window.__resett&&window.__resett(),o.overlayPosition==="bottom"&&o.overlaySize==="full"&&a.showMap();const{point:t,defs:r}=A(i),{x:c,y:m}=t;if(o.onGetCoordsClick){const w=a.layerStore.layers.find(T=>T.visible&&(T.mode===R.TurnedOn||T.mode===R.TurnedOff));o.onGetCoordsClick({x:c,y:m,z:w?.name||null})}if(o.setKioskModeEnabled)return;if(o.onMarkerClick){const w=Le(c,m,l.scale);y&&console.log("marker",w),o.onMarkerClick(w)}const f=V(t.x,t.y),u=F(r[0]);y&&console.log("boothIdFromClientXy",f,"boothByShape",u,"pointer:click point",t),a.clickBooth(f||u)}),s.events.addEventListener("navigation:change",()=>window.__resett&&window.__resett())}return e(),a.fp.getCenterCoordinates=Y,()=>Q()},[]);function Q(){_=!0,x.current.stop(),P?.(),z?.(),I?.(),D(),h.layersLoaded=!1,l.disposeIfCurrent(g.current),g.current=null}function Y(){const e=v.current;if(!v.current)throw new Error("Canvas not ready");const n=pe(s.viewport.canvasToSvg({x:e.clientWidth/2,y:e.clientHeight/2})),t=a.layerStore.visible.find(r=>r.mode===R.TurnedOff||r.mode===R.TurnedOn)?.name||null;return{...n,z:t}}function F(e){return!e||!e.shape?null:he.booths.find(n=>n.shapes?.find(i=>i.shape==e.shape))}d(()=>o.zoomBy,()=>{if(!o.zoomBy||a.maplibreStore.showMaplibre)return;const e=o.zoomBy;s.controls.zoomBy(e),o.zoomBy=null}),d(()=>o.dimmed,e=>{x.current.setTarget(e)}),d(()=>o.details,()=>{if(!o.onDetails)return;if(!o.details){o.onDetails(null);return}var e=o.details;if(p.EXPO==="wineparis"&&(e instanceof $&&(e=e.booths[0]),!e))return;let n=null,i=[];e instanceof $?(n="exhibitor",i=e.booths.map(r=>r.name).sort((r,c)=>r==a.routeStore.tempToBooth?.name?-1:c==a.routeStore.tempToBooth?.name?1:0)):e instanceof Z?(n="booth",i=[e.name]):e instanceof be?(n="route",i=[e.from?.name,e.to?.name].filter(r=>!!r)):e instanceof ve&&(n="category",i=e.exhibitors.map(r=>r.booths.map(c=>c.name)).flat());var t={type:n,name:e?.name,id:e?.id,externalId:e?.externalId,boothsNames:i};o.onDetails({...t,...n==="route"?{routeInfo:a.routeStore.routeInfo}:{}})}),d(()=>o.canvasVisibleRectPx,e=>{l.renderer&&(l.renderer.visibleRect=L(e))},{fireImmediately:!0}),d(()=>o.moveToRect,()=>{!o.moveToRect||a.maplibreStore.showMaplibre||(o.moveToRect&&o.moveToRect.size.height!==1/0&&o.moveToRect.size.width!==1/0&&o.moveToRect.size.height>0&&o.moveToRect.size.width>0&&N(o.moveToRect),o.moveToRect=null)}),d(()=>o.rollReset,e=>{e&&(s.controls.resetCamera({roll:!0}),o.rollReset=!1)}),d(()=>o.moveToBooths,()=>{if(B.log("this.moveToBooths",o.moveToBooths),!o.moveToBooths||a.maplibreStore.showMaplibre)return;B.log("watched moveToBooths",o.moveToBooths);const e=o.moveToBooths.filter(n=>n.rect).map(n=>n.rect);e.length!==0&&(N(k.fromUnion(...e)),o.moveToBooths=null)}),d(()=>o.mapSettings,({zoomtime:e,center:n,centerxy:i,bearing:t,roll:r,z:c})=>{if(!(a.maplibreStore.showMaplibre||!l.renderer))try{e&&e!==o.defaultMapSettings.zoomtime&&l.renderer.controls.configure({zoomTime:e/1e3}),a.fp.enableRotation&&j(s,r);let m;if(n){const f=n.split(",").map(Number),u=new ye(void 0,void 0,void 0,void 0,f[0],f[1]);m=xe(u,de.properties.config)}else if(i){const f=i.split(",").map(Number);m={x:f[0],y:f[1]}}c&&a.fp.activateFloor({name:c}),(m?.x||m?.y)&&l.renderer.controls.panTo(m.x,m.y),Number.isFinite(t)&&l.renderer.controls.rollTo(t)}catch(m){B.error("Error in mapSettings reaction",m)}}),Ee({enabled:h.layersLoaded&&o.buildRoute,rendererService:l});const G="routes-api.expofp.com",ee=fe.busRoutes??!1;Me({permission:h.layersLoaded&&ee,rendererService:l,dataJsonUrl:`https://${G}/v1/routes?expo=${p.EXPO}`,websocketUrl:`wss://${G}/locations?expo=${p.EXPO}`}),d(()=>a.layerStore.visible,e=>{if(!l.scene)return;const n=e.filter(r=>K(r.name)),t=l.scene.rootLayer.children.filter(r=>K(r.name));t.forEach(r=>{r.hidden=!n.find(c=>c.name===r.name)}),l.update(...t)});function N(e){let n=e;const i=oe(e,U),t=o.selectedRoute?.from,r=t instanceof Z?t.layer?.name:t?.layer;o.kioskData&&(!we()||r===a.routeStore.currentRouteLayer?.name)&&(n=k.fromUnion(e,new k(o.kioskData.x,o.kioskData.y,1,1)));const c=L(n),m={paddingPercent:i,maxZoom:W?void 0:10};if(o.shouldShiftMapRect){s.visibleRect.min={...s.visibleRect.min,x:s.visibleRect.min.x+o.overlayWidthPx},s.visibleRect=s.visibleRect;try{s.controls.zoomTo(c,m)}finally{s.visibleRect.min={...s.visibleRect.min,x:s.visibleRect.min.x-o.overlayWidthPx}}}else s.controls.zoomTo(c,m)}function oe(e,n){return!e||!n?0:(e.area/n.area>.1?15:25)/100}return se(()=>O(te,{children:[C("canvas",{style:{width:"100%",height:"100%"},ref:v,className:re({map:!0,moving:b.moving,hidden:a.maplibreStore.showMaplibre}),children:"ExpoFP.com"}),y&&q&&O(ge,{className:"debug-fps",children:[C("div",{ref:M}),C("button",{onClick:()=>{typeof window<"u"&&window.localStorage&&localStorage.setItem(X,"false"),J(!1)},style:{padding:"4px 8px",fontSize:"11px",cursor:"pointer",backgroundColor:"#333",color:"#fff",border:"1px solid #555",width:"100%"},children:"Hide debug"})]})]}))}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { LayerDef } from '@expofp/renderer';
|
|
2
|
-
import { RendererService } from '../../../../renderer';
|
|
3
|
-
export default function configAll(rendererService: RendererService): Promise<
|
|
1
|
+
import { type LayerDef } from '@expofp/renderer';
|
|
2
|
+
import { type RendererService } from '../../../../renderer';
|
|
3
|
+
export default function configAll(rendererService: RendererService): Promise<{
|
|
4
|
+
layers: LayerDef[];
|
|
5
|
+
cleanup: () => void;
|
|
6
|
+
}>;
|
|
4
7
|
//# sourceMappingURL=config-all.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createLayerDef as r}from"../../../../renderer";import
|
|
1
|
+
import{createLayerDef as r}from"../../../../renderer";import i from"../../../../store";import{isPathwayLayer as d}from"../../../../utils/is-pathway-layer";import{WF_CURRENT_POSITION_LAYER_NAME as u,WF_LINES_ANIMATED_LAYER_NAME as N,WF_LINES_LAYER_NAME as R,WF_POINTS_LAYER_NAME as h,WF_TRAIL_LAYER_NAME as M}from"../../../../wayfinding/layers";import{createTrafficLayers as w}from"../../traffic/trafficLayers";import{configBoothsBadges as I}from"./config-booth-badge";import P from"./config-load-layer";import{MARKER_LAYER_NAME as T}from"./config-markers";export default function S(n){const{defaultLayer:a}=i.layerStore;let{layers:o}=i.layerStore;if(a){const e=[...o],s=o.indexOf(a);e.splice(s,1),o=[a,...e]}const L=o.filter(e=>!e.rootParent).map(e=>P(e,n));return Promise.all(L).then(e=>{const s=r(h,[],{dim:!1,interactive:!0}),c=r(R,[],{dim:!1}),y=r(T,[]),p=r(M,[],{dim:!1}),_=r(N,[],{dim:!1}),A=r(u,[],{dim:!1}),f=[],l=[];for(const t of e.flat())d(t.name)?(t.dim=!1,l.push(t)):f.push(t);const{layer:m,cleanup:E}=I(n,"root",i.boothStore.booths);return{layers:[...f,...m?[m]:[],...l,...w(),y,p,c,_,s,A],cleanup:E}})}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
import { LayerDef, ShapeDef, TextDef } from '@expofp/renderer';
|
|
2
|
-
import { RendererService } from '../../../../renderer';
|
|
3
|
-
import { Booth, RegularBooth } from '../../../../store/BoothStore';
|
|
1
|
+
import { type LayerDef, type ShapeDef, type TextDef } from '@expofp/renderer';
|
|
2
|
+
import { type RendererService } from '../../../../renderer';
|
|
3
|
+
import { type Booth, RegularBooth } from '../../../../store/BoothStore';
|
|
4
4
|
export declare function createBoothBadge(rendererService: RendererService, booth: RegularBooth): {
|
|
5
5
|
bg: ShapeDef;
|
|
6
6
|
text: TextDef;
|
|
7
|
+
dispose: () => void;
|
|
8
|
+
};
|
|
9
|
+
export declare function configBoothsBadges(rendererService: RendererService, layerName: string, booths: Booth[]): {
|
|
10
|
+
layer: LayerDef | null;
|
|
11
|
+
cleanup: () => void;
|
|
7
12
|
};
|
|
8
|
-
export declare function configBoothsBadges(rendererService: RendererService, layerName: string, booths: Booth[]): LayerDef | null;
|
|
9
13
|
//# sourceMappingURL=config-booth-badge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Box as
|
|
1
|
+
import{Box as v,pointRotate as S,Polygon as tt,Rect as nt}from"@expofp/geometry";import et from"color";import{reaction as W}from"mobx";import{SEPARATOR as $}from"../../../../constants";import N from"../../../../data";import{getTrianglesFromFpPaths as ot}from"../../../../data/svg";import{createShapeDef as st,createTextDef as it,createTextDefLines as rt,getRollValue as ct,getRotation as at,rectToRenderer as X}from"../../../../renderer";import{boothStore as lt,uiState as Z}from"../../../../store";import{RegularBooth as dt}from"../../../../store/BoothStore";import V from"../../../../tools/settings";import{getContrastTextColor as ft}from"../../../../utils/getContrastTextColor";import{getFont as ut}from"./canvases";import{isBoothBadgeEligible as gt}from"./config-booth-badge-eligibility";import{getBadgeFontWeight as ht,getFontUrlByWeight as mt}from"./config-booth-labels";const pt=.5,xt=.3,j=15,Bt=24,q=30,yt=12,At=12,J=.8,K=document.createElement("canvas").getContext("2d");function Et(t){return t.length<=j?t:t.slice(0,j-1)+"\u2026"}function Q(t){if(!t.paths?.length)return[];const n=t.layer?.name||"",s=[];for(const e of t.paths)for(const i of ot(e.index,n))s.push(i);return s}function Tt(t){const n=Q(t);return n.length?v.fromPoints(n.flat().map(([s,e])=>({x:s,y:e}))):null}function It(t){const n=[],s=[];for(const e of t){const i=n.length;n.push({x:e[0][0],y:e[0][1]}),n.push({x:e[1][0],y:e[1][1]}),n.push({x:e[2][0],y:e[2][1]}),s.push([i,i+1,i+2])}return new tt(n,s)}function H(t,n,s){return s.containsPoint({x:t,y:n})}function Rt(t,n,s,e,i,u,l,r){if(!t.length||!H(s,e,n))return l;const c={x:s,y:e};let d=0,B=l;const R=10;for(let p=0;p<R;p++){const g=(d+B)/2,I=i*g,x=u*g;[S({x:s+I,y:e},r,c),S({x:s,y:e+x},r,c),S({x:s+I,y:e+x},r,c)].every(y=>H(y.x,y.y,n))?d=g:B=g}return d}function _t(t){return Tt(t)??t.rect}function Dt(t,n,s,e,i,u){if(n.length){const d=_t(t),B={x:i>0?d.min.x:d.max.x,y:u>0?d.min.y:d.max.y},R=new Set;let p=null,g=1/0;for(const I of n)for(const x of I){const _=`${x[0]},${x[1]}`;if(R.has(_))continue;R.add(_);const A=x[0]+e*i,y=x[1]+e*u;if(H(A,y,s)){const E=Math.abs(A-B.x)+Math.abs(y-B.y);E<g&&(g=E,p={x:A,y})}}if(p)return p}const l=i>0?t.rect.min.x+e:t.rect.max.x-e,r=u>0?t.rect.min.y+e:t.rect.max.y-e,c=t.rotate??0;return c?S({x:l,y:r},c,t.rect.center):{x:l,y:r}}function F(t){return t&&t!=="none"?t:void 0}function St(t){const n=F(t.borderColor)||F(V.boothBorderColor)||V.colors.booths.default;return t.paths?.length>1&&F(t.paths[t.paths.length-1].color)||n}export function createBoothBadge(t,n){const s=Et(n.title||n.name),e=St(n),i=ft(et(e).hex()),u=window.devicePixelRatio||1,l=ht(),r=ut(q,l);K.font=r;const c=K.measureText(s).width,d=Math.ceil(c+yt*2),B=q+At*2,R=(n.borderWidth||lt.borderWidth)/2,p=d*J,g=B*J,I=n.rect.size.width,x=n.rect.size.height,_=o=>{const a=o?x:I,m=o?I:x;return Math.min(a>0?a*pt/p:1/0,m>0?m*xt/g:1/0)},A=Q(n),y=It(A);let E=n.rotate??0,T=0,P,C,M;const L=()=>{const m=Dt(n,A,y,R,T===0||T===3?1:-1,T===0||T===1?1:-1);P=m.x,C=m.y;const G=_(T===1||T===3);M=Rt(A,y,P,C,p,g,G,E)};L();const b=(o,a)=>{const m=o/2,G=a/2,Y=S({x:P+m,y:C+G},E,{x:P,y:C});return new nt(Y,{x:o,y:a},E)},O=o=>{const a=Math.min(o,M);return b(p*a,g*a)},w=mt(l,t.fontUrls),h=st(b(1,1),e);h.hidden=!0,h.dim=n.skipDim?!1:void 0;const f=it(rt([[s],[]],i,0,[w,w]),b(1,1),[0,0],{horizontal:"center",vertical:"center"});f.hidden=!0,f.dim=n.skipDim?!1:void 0;const U=()=>!!(n.layer&&!n.layer.visible),D=[];D.push(W(()=>n.skipDim,o=>{h.dim=o?!1:void 0,f.dim=o?!1:void 0,t.update(h,f)})),D.push(W(()=>n.layer?.visible??!0,o=>{h.hidden=!o,f.hidden=!o,t.update(h,f)}));const k=o=>{h.shape=X(O(o)),h.hidden=U()},z=o=>{const a=Math.min(o,M);f.lines[0].fontSize=Bt/u*a,f.bounds=X(O(o)),f.hidden=U()};return t.onPtScale(`badge-bg-${n.id}`,o=>(k(o),h)),t.onPtScale(`badge-text-${n.id}`,o=>(z(o),f)),D.push(W(()=>Z.mapSettings,({roll:o})=>{ct(o??0)&&t.onRoll(`badge-roll-${n.id}`,a=>{const m=at(a,E);m!==void 0&&(E+=m,T=(T+(m>0?1:3))%4,L(),k(t.scale),z(t.scale),t.update(h,f))})},{fireImmediately:!0})),{bg:h,text:f,dispose:()=>{D.forEach(o=>o()),D.length=0}}}export function configBoothsBadges(t,n,s){const e=[],i=[],u=[];for(const r of s)if(r instanceof dt&>({hideExhibitorBoothNumber:N.hideExhibitorBoothNumber,hideBoothBadges:N.hideBoothBadges,hideLogoInBooth:Z.hideLogoInBooth,noLabels:r.noLabels,hasExhibitors:r.exhibitors.length>0,hasLogoInBooth:r.exhibitors.some(c=>c.logoInBooth&&c.logo)})){const{bg:c,text:d,dispose:B}=createBoothBadge(t,r);e.push(c),i.push(d),u.push(B)}const l=()=>{u.forEach(r=>r()),u.length=0};return e.length?{layer:{name:`${n}${$}badges`,children:[{name:`${n}${$}badgeBgs`,children:e},{name:`${n}${$}badgeTexts`,children:i}]},cleanup:l}:{layer:null,cleanup:l}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as Z}from"react/jsx-runtime";import{degToRad as z}from"@expofp/geometry";import H from"color";import{runInAction as Q}from"mobx";import{observer as Y}from"mobx-react-lite";import{useCallback as F,useEffect as $,useMemo as p,useRef as m,useState as B}from"react";import q from"../../data";import{getLayerSvg as ee,svgArea as x,svgAreaExplicit as re}from"../../data/svg";import{createSceneDef as te}from"../../renderer";import a,{uiState as y}from"../../store";import D from"../../tools/settings";import{resolveVenueFitRect as oe}from"../../utils/scene-bounds";import ne from"../Map/drawing/config/config-all";import{loadLayersImages as ae}from"../Map/drawing/config/loadBoothsImages";import{useBuildRoute as ie}from"../Map/traffic/useBuildRoute";import{useManageTraffic as ce}from"../Map/traffic/useManageTraffic";import se from"./MaplibreWrapper";import{useCameraReactions as le}from"./useCameraReactions";import{useDimming as ue}from"./useDimming";import{useKioskIdleEvents as fe}from"./useKioskIdleEvents";import{useLayerVisibilitySync as me}from"./useLayerVisibilitySync";import{useRendererEvents as pe}from"./useRendererEvents";import{useWayfindingAndMarkers as de}from"./useWayfindingAndMarkers";import{deriveGeoConfig as ge,getLocalRectGeoBounds as Re,getVisibleRectFitPadding as be,INITIAL_FIT_ZOOM_ADJUSTMENT as ye}from"./utils/geo-config";import{applyMapOptions as j,DEFAULT_MAP_OPTIONS as Se,getTileSource as he,MAP_2D_OPTIONS as Ae}from"./utils/map-helpers";import{calculateTransformMatrix as Ce}from"./utils/solver";const w="routes-api.expofp.com",Me=800;function De(e,s,n){return{getCameraState:()=>{const t=e.getCenter();return{lng:t.lng,lat:t.lat,zoom:e.getZoom(),bearing:e.getBearing(),pitch:e.getPitch()}},applyCameraState:t=>{e.easeTo({center:[t.lng,t.lat],zoom:t.zoom,bearing:t.bearing??s,pitch:t.pitch??n(),duration:Me,essential:!0})},resetPitch:()=>{const t=n();e.getPitch()!==t&&e.jumpTo({pitch:t})}}}function N(){Q(()=>{a.layerStore.layers.forEach(e=>{e.configured=!1,e.children=[],e.loaded=!1}),a.layerStore.layersLoaded=!1})}function U(e,s){const n=[];for(const t of e.rollRegistry.invoke(s))Array.isArray(t)?n.push(...t):n.push(t);n.length&&e.update(...n)}function ve(e){const s=Math.abs(e[0]??0),n=Math.hypot(e[0]??0,e[1]??0);return s<=0||n<=0?1:s/n}const Te=Y(function({viewMode:s}){const[n,t]=B(null),[v,_]=B(null),o=a.rendererService,T=m(null),u=m(null),S=m(null),P=m(null),I=m(null),h=m(null),r=p(()=>ge(),[]),k=p(()=>{const{rect:c}=oe({layerViewbox:a.layerStore.viewboxRectangle,explicitArea:re?x:null,layerRectangle:a.layerStore.rectangle,sceneDef:n,svgArea:x});return c},[n]),d=p(()=>r?{center:r.center,bearing:r.bearing,zoom:r.zoom,bounds:Re(k,r.gpsConfig),fitPadding:be(0),zoomAdjustment:ye}:null,[r,k]),g=p(()=>r?Ce(r.gpsConfig,ee()?.getAttribute("units")):null,[r]),R=p(()=>({...s==="map2d"?Ae:Se}),[s]),E=m(R),V=p(()=>he(),[]),{mapDimAnimatorRef:A,venueDimAnimatorRef:C,handleMapDimLayerReady:G}=ue(u,o);$(()=>{if(!r)return;let c=!1;N();const i=ne(o).then(({layers:l,cleanup:f})=>{if(c){f();return}P.current=f;const M=H(D.backgroundColor==="none"?"#ebebeb":D.backgroundColor).string(),O=te(l,x,M);t(O)}).catch(l=>{c||console.warn("Maplibre scene configuration failed.",l)}),L=A.current,b=C.current;return()=>{c=!0,N();const l=T.current;i.finally(()=>o.disposeIfCurrent(l)),S.current?.(),S.current=null,P.current?.(),P.current=null,h.current&&(a.maplibreStore.clearCameraPortIfCurrent(h.current),h.current=null),T.current=null,u.current=null,I.current=null,_(null),L?.stop(),b?.stop(),y.sceneDefReady=!1}},[r,A,o,C]);const X=F((c,i,L,b)=>{T.current=c,u.current=i,I.current=b,_(c),o.attach(c,L,b,g?ve(g):1),j(i,E.current);const l=De(i,r?.bearing??i.getBearing(),()=>E.current.pitch??0);h.current=l,a.maplibreStore.setCameraPort(l),A.current?.setTarget(y.dimmed,{immediate:!0}),C.current?.setTarget(y.dimmed,{immediate:!0}),S.current?.();const f=()=>{const O=i.getBearing()-(r?.bearing??0);U(o,z(O))};i.on("rotate",f),i.on("rotateend",f),S.current=()=>{i.off("rotate",f),i.off("rotateend",f)},ae(o);const M=o.ptScaleRegistry.invoke(o.scale||1);M.length&&o.update(...M),U(o,z(i.getBearing()-(r?.bearing??0))),a.layerStore.layersLoaded=!0,a.fp.onFpConfigured&&a.fp.onFpConfigured(),y.sceneDefReady=!0,b()},[o,A,g,C,r]);$(()=>{E.current=R,j(u.current,R,!0)},[R]),pe(v,o),fe(v,u),de(v,o),me(o,u,r),le(u,r,n),ie({enabled:a.layerStore.layersLoaded&&y.buildRoute,rendererService:o});const J=q.busRoutes??!1;ce({permission:a.layerStore.layersLoaded&&J,rendererService:o,dataJsonUrl:`https://${w}/v1/routes?expo=${D.EXPO}`,websocketUrl:`wss://${w}/locations?expo=${D.EXPO}`});const K=F(c=>{console.warn("Maplibre map failed to load; falling back to floorplan mode.",c),a.maplibreStore.deactivateMaplibre()},[]);if(!r||!d||!g||!n)return null;const W=`${d.center.join(",")}:${d.bearing}:${d.zoom}`;return Z(se,{sceneDef:n,geoConfig:d,staticTransform:g,tileSource:V,mapOptions:R,onRendererReady:X,onMapDimLayerReady:G,onMapLoadError:K},W)});export default Te;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Renderer } from '@expofp/renderer';
|
|
2
|
+
import { type Map as MaplibreMap } from 'maplibre-gl';
|
|
3
|
+
import { type RefObject } from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* Keeps the kiosk idle timer alive while a visitor pans or zooms the map.
|
|
6
|
+
*
|
|
7
|
+
* The timer's usual source is the renderer's `navigation:change`, which only
|
|
8
|
+
* fires for the renderer's own camera — and map mode doesn't drive it. Without
|
|
9
|
+
* these listeners the timer runs out mid-gesture for a visitor who only moves
|
|
10
|
+
* the map.
|
|
11
|
+
*
|
|
12
|
+
* `renderer` is not read; it is the mount signal. `mapRef.current` is assigned
|
|
13
|
+
* in the same `handleRendererReady` call that sets `renderer`, so keying the
|
|
14
|
+
* effect on `renderer` is what guarantees there is a map to subscribe to — the
|
|
15
|
+
* early return below is the assertion of that contract, not a tolerated miss.
|
|
16
|
+
*/
|
|
17
|
+
export declare function useKioskIdleEvents(renderer: Renderer | null, mapRef: RefObject<MaplibreMap | null>): void;
|
|
18
|
+
//# sourceMappingURL=useKioskIdleEvents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{useEffect as i}from"react";export function useKioskIdleEvents(n,o){i(()=>{const e=o.current;if(!n||!e)return;let t=!1;const r=f=>{f.originalEvent&&(t=!0,window.__resett?.())},s=()=>{t&&(t=!1,window.__resett?.())};return e.on("movestart",r),e.on("moveend",s),()=>{e.off("movestart",r),e.off("moveend",s)}},[n,o])}
|