UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

122 lines (121 loc) 3.67 kB
(function() { try { var e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}; e.SENTRY_RELEASE = { id: "3.7.8" }; var t = new e.Error().stack; t && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[t] = "1d518176-3b48-4629-bd6e-c8ee62657b63", e._sentryDebugIdIdentifier = "sentry-dbid-1d518176-3b48-4629-bd6e-c8ee62657b63"); } catch {} })(); import "./efp-debug-init-CxL7LyPc.js"; import "./settings-2_RuGoL9.js"; import { I as e, c as t, ct as n } from "./i18n-BEer1tI4.js"; //#region src/tools/rebookingUrl.ts var r = "rt"; function i() { return new URLSearchParams(decodeURIComponent(window.location.search)).get(r); } function a() { let e = i(); return e || (e = sessionStorage.getItem(r)), e; } function o(e) { sessionStorage.setItem(r, e); } function s(e, t) { let n = new URL(e, "https://app.expofp.com/"); for (let [e, r] of Object.entries(t)) n.searchParams.set(e, r); return n.href; } //#endregion //#region src/utils/urlEncoding.ts function c(e) { if (!e || e.length === 0) return ""; let t = e.map((e) => encodeURIComponent(e.trim())).join(","); return n.log("URLEncoding: encoding string array:", { original: e, encoded: t }), t; } function l(e) { if (!e) return []; try { let t = e.split(",").map((e) => decodeURIComponent(e.trim())).filter(Boolean); return n.log("URLEncoding: decoding string array:", { encoded: e, decoded: t }), t; } catch (t) { return n.warn("URLEncoding: failed to decode string array:", e, t), []; } } function u(e) { if (!e) return null; let t = encodeURIComponent(e.trim()); return n.log("URLEncoding: encoding string:", { original: e, encoded: t }), t; } function d(e) { if (!e) return null; try { let t = decodeURIComponent(e.trim()); return n.log("URLEncoding: decoding string:", { encoded: e, decoded: t }), t; } catch (t) { return n.warn("URLEncoding: failed to decode string:", e, t), null; } } function f(e) { return e.map((e) => e.toLowerCase()); } function p(e) { return e ? e.toLowerCase() : null; } //#endregion //#region src/utils/index.ts function m(e) { return e * parseFloat(getComputedStyle(document.documentElement).fontSize); } function h(e, t) { let n = []; for (let r = 0; r < e.length; r += t) n.push(e.slice(r, r + t)); return n; } function g(e) { e.sort(function(e, t) { var n = e.name.toLowerCase(), r = t.name.toLowerCase(); return n < r ? -1 : +(n > r); }); } var _ = document.createElement("canvas"), v = !!(_.getContext("webgl") || _.getContext("experimental-webgl")); if (!v) { let e = document.createElement("div"); e.innerHTML = "<!--no webgl-->", document.body.appendChild(e); } function y(e) { for (var t = e.length, n, r; t !== 0;) r = Math.floor(Math.random() * t), --t, n = e[t], e[t] = e[r], e[r] = n; return e; } function b(e) { return new Promise((t) => setTimeout(t, e)); } //#endregion //#region src/utils/is-debug.ts if (typeof window < "u") { var x, S; ((S = (x = window).efpDebugUi) == null ? x.efpDebugUi = {} : S)[e] = { type: "boolean" }; } var C = t && localStorage.getItem("efp:debug") === "true", w = /webview|wv|ip((?!.*Safari)|(?=.*like Safari))|iosWebView|AndroidWebView/i.test(navigator.userAgent); //#endregion //#region src/utils/loadImage.ts function T(e) { return new Promise((t) => { var n = new Image(); n.onerror = () => t(null), n.onload = () => t(n), n.crossOrigin = "anonymous", n.src = e; }); } //#endregion export { a as _, v as a, b as c, l as d, u as f, s as g, p as h, h as i, g as l, f as m, w as n, m as o, c as p, C as r, y as s, T as t, d as u, i as v, o as y };