@sassoftware/va-report-components
Version:
The SAS Visual Analytics SDK is a set of JavaScript APIs and web components that enable SAS Visual Analytics report content to be easily embedded in a third-party application or web page.
1,684 lines (1,572 loc) • 10.9 MB
JavaScript
import e, { createElement as t, Fragment as o, useMemo as a, useSyncExternalStore as r, useCallback as s, useState as l, useEffect as n, createContext as c, useContext as i, useRef as d, forwardRef as h, useReducer as p, lazy as m, memo as u, useImperativeHandle as g, Suspense as v, cloneElement as f, Children as C, isValidElement as M, useLayoutEffect as y, createRef as b, PureComponent as w, startTransition as x, Component as S } from "react";
import { createRoot as z } from "react-dom/client";
import { __extends as V, __assign as N, __awaiter as T, __generator as L, __rest as H } from "tslib";
import { BehaviorSubject as A, ReplaySubject as I, Subject as k, combineLatest as D, asyncScheduler as F, using as E, throwError as R, fromEventPattern as B, of as O, merge as _, animationFrameScheduler as P, EMPTY as j, from as U, concat as G, AsyncSubject as Z, firstValueFrom as W } from "rxjs";
import { takeUntil as K, filter as Y, take as Q, distinctUntilChanged as J, skip as X, debounceTime as q, map as $, mergeMap as ee, withLatestFrom as te, tap as oe, ignoreElements as ae, publish as re, delay as se, switchMap as le, concatMap as ne, first as ce, shareReplay as ie, share as de, mergeMapTo as he, finalize as pe, startWith as me, endWith as ue, skipWhile as ge, last as ve, find as fe } from "rxjs/operators";
import Ce from "i18next";
import { useTranslation as Me, initReactI18next as ye } from "react-i18next";
import be, { createPortal as we, flushSync as xe } from "react-dom";
import Se, { FreeFocusInside as ze, AutoFocusInside as Ve, MoveFocusInside as Ne } from "react-focus-lock";
import Te from "classnames";
import { MotionConfig as Le, AnimatePresence as He, motion as Ae, useMotionValue as Ie, useDragControls as ke, useAnimate as De } from "framer-motion";
import "handlebars";
import { z as Fe } from "zod";
import { hsl as Ee, parseToHsl as Re, opacify as Be, transparentize as Oe, rgba as _e, toColorString as Pe, hslToColorString as je, grayscale as Ue, mix as Ge, parseToRgb as Ze, rgb as We, getContrast as Ke, lighten as Ye, darken as Qe } from "polished";
import { jsx as Je, jsxs as Xe, Fragment as qe } from "react/jsx-runtime";
import $e from "axios";
import { createSelector as et, defaultMemoize as tt } from "reselect";
import "@popperjs/core";
import { usePopper as ot } from "react-popper";
import { b as at, a as rt, c as st, d as lt, e as nt, f as ct, g as it, h as dt, i as ht, j as pt, k as mt, l as ut, m as gt, n as vt, o as ft, p as Ct, q as Mt, r as yt, s as bt, t as wt, u as xt, v as St, w as zt, x as Vt, y as Nt, z as Tt, A as Lt, B as Ht, C as At, D as It, E as kt, F as Dt, G as Ft, H as Et, I as Rt, J as Bt, K as Ot, L as _t, M as Pt, N as jt, O as Ut, P as Gt, Q as Zt, R as Wt, S as Kt, T as Yt, U as Qt, V as Jt, W as Xt, X as qt, Y as $t, Z as eo, _ as to, $ as oo, a0 as ao, a1 as ro } from "./i18n/nova_i18n.mjs";
import so from "memoize-one";
import lo from "cldr-core/supplemental/weekData.json";
import { useCallback as no } from "use-memo-one";
import { useQuery as co, QueryClient as io } from "@tanstack/react-query";
import ho from "react-cropper";
import { ofType as po, createEpicMiddleware as mo, combineEpics as uo } from "redux-observable";
import { combineReducers as go, createStore as vo, applyMiddleware as fo, bindActionCreators as Co } from "redux";
import { composeWithDevTools as Mo } from "@redux-devtools/extension";
import { connect as yo, shallowEqual as bo } from "react-redux";
let wo;
let xo = new Map;
function So() {
return wo;
}
async function zo(e) {
const t = await (e?.importType === "mobile" ? import("./chunk2.mjs").then((e => ({
type: "mobile",
...e
}))) : import("./chunk7.mjs").then((e => ({
type: "dynamic",
...e
}))));
if (e?.initialize) {
await (e?.initialize(t));
}
wo = t;
if (xo) {
for (const e of xo.values()) {
e();
}
}
xo = undefined;
}
function Vo(e, t) {
xo?.set(e, t);
}
function No(e) {
xo?.delete(e);
}
let To = 0;
function Lo() {
return `vaReportComponentContainer${To++}`;
}
class Ho extends HTMLElement {
constructor(...e) {
super(...e);
this._validationTimerId = 0;
this._root = void 0;
this._needsUnmount = false;
this._connected = false;
this._render = () => {
if (this._needsUnmount) {
this._root?.unmount();
this._root = undefined;
this._needsUnmount = false;
}
if (this._connected && !this._root) {
this._root = z(this);
}
const e = this._getRenderer();
if (!e) {
if (this._root) {
this._root.render(t(o));
}
return;
}
const a = this._root && this.getRenderProps();
clearTimeout(this._validationTimerId);
this._validationTimerId = 0;
if (a) {
this._root.render(t(e, a));
} else if (this._root) {
this._root.render(t(o));
}
};
}
_getConnected() {
return this._connected;
}
_invalidateProps() {
if (this._getConnected()) {
this._queueRender();
}
}
_queueRender() {
if (this._validationTimerId === 0) {
this._validationTimerId = window.setTimeout((() => {
this._validationTimerId = 0;
this._render();
}), 0);
}
}
connectedCallback() {
this._connected = true;
this._queueRender();
}
disconnectedCallback() {
this._connected = false;
this._needsUnmount = true;
this._queueRender();
}
attributeChangedCallback(e, t, o) {
this._invalidateProps();
}
static get observedAttributes() {
return [];
}
}
function Ao(e) {
if (!e) {
return;
}
switch (e.toLowerCase()) {
case "guest":
return "guest";
case "credentials":
return "credentials";
}
}
class Io extends Ho {
constructor(...e) {
super(...e);
this._elementKey = Lo();
this._stateRetained = false;
this._initialized = false;
this._menuItemProvider = void 0;
this._contextKey = void 0;
this._refHandle = void 0;
this._isHandleValid = false;
this._handle = void 0;
this._handlePromise = void 0;
this._handlePromiseCallbacks = void 0;
this._setRef = e => {
this._handle = e;
if (e) {
this._acceptHandlePromise();
}
};
}
_acceptHandlePromise() {
this._isHandleValid = true;
if (this._handle) {
this._handlePromiseCallbacks?.accept(this._handle);
this._handlePromiseCallbacks = undefined;
} else {
console.warn("_acceptHandlePromise called when no report handle was available");
}
}
_invalidateHandleRequests(e) {
this._isHandleValid = false;
this._handlePromiseCallbacks?.reject(e);
this._handlePromiseCallbacks = undefined;
this._handlePromise = undefined;
}
getReportHandle() {
if (!this._handlePromise) {
this._handlePromise = this._handle && this._isHandleValid ? Promise.resolve(this._handle) : new Promise(((e, t) => {
this._handlePromiseCallbacks = {
accept: e,
reject: t
};
}));
}
return this._handlePromise;
}
_getContextKey(e) {
return "packageUri" in e ? `${e.packageUri}:${this._elementKey}` : `${e.url}:${e.reportUri}:${this._elementKey}`;
}
_invalidateProps() {
let e = undefined;
const t = this.getRenderProps();
if (t) {
e = this._getContextKey(t);
}
if (this._contextKey !== e) {
this._refHandle = undefined;
this._invalidateHandleRequests("An element attribute was changed and the handle request has been cancelled");
}
this._contextKey = e;
super._invalidateProps();
}
static get observedAttributes() {
return [ ...super.observedAttributes, "url", "reporturi", "authenticationtype", "packageuri", "popoverrootid", "restrictviewportgestures" ];
}
attributeChangedCallback(e, t, o) {
super.attributeChangedCallback(e, t, o);
if (e === "authenticationType" && this.hasAttribute("authenticationType") && !Ao(o)) {
console.warn(`Invalid AuthenticationType: ${o}`);
}
}
connectedCallback() {
Vo(this, (() => {
if (this._initialized) {
return;
}
this._initialized = true;
this._initializeWithImports();
}));
super.connectedCallback();
}
disconnectedCallback() {
if (!this.preserveStateOnUnmount) {
this._invalidateHandleRequests("The element was removed from the DOM and the handle request has been cancelled");
}
if (this._stateRetained) {
No(this);
}
super.disconnectedCallback();
}
_initializeWithImports() {
super._invalidateProps();
const e = this._stateRetained;
this._stateRetained = false;
this.preserveStateOnUnmount = e;
}
get preserveStateOnUnmount() {
return this._stateRetained;
}
set preserveStateOnUnmount(e) {
if (this._stateRetained === !!e) {
return;
}
if (!this._stateRetained && !this._getConnected()) {
No(this);
}
const {extendStoreLifetime: t, releaseStoreLifetime: o} = this._getDynamicImports() ?? {};
this._stateRetained = !!e;
if (this._stateRetained) {
t?.(this._elementKey);
} else {
o?.(this._elementKey);
if (!this._getConnected()) {
this._invalidateHandleRequests("preserveStateOnUnmount was set to false while the element was removed from the DOM");
}
}
}
_getDynamicImports() {
const e = So();
if (e?.type === "dynamic") {
return e;
}
return;
}
getCommonProps() {
if (!this._refHandle) {
this._refHandle = e => this._setRef(e);
}
const e = {
elementKey: this._elementKey,
ref: this._refHandle,
menuItemProvider: this._menuItemProvider,
popoverRootId: this.popoverRootId ?? undefined,
restrictViewportGestures: this.restrictViewportGestures
};
if (this.packageUri) {
return {
...e,
packageUri: this.packageUri
};
} else if (this.reportUri && this.url) {
return {
...e,
authenticationType: this.authenticationType,
reportUri: this.reportUri,
url: this.url
};
}
return null;
}
get url() {
return this.getAttribute("url");
}
set url(e) {
if (e && typeof e === "string") {
this.setAttribute("url", e);
} else {
this.removeAttribute("url");
}
}
get packageUri() {
return this.getAttribute("packageUri");
}
set packageUri(e) {
if (e && typeof e === "string") {
this.setAttribute("packageUri", e);
} else {
this.removeAttribute("packageUri");
}
}
get reportUri() {
return this.getAttribute("reportUri");
}
set reportUri(e) {
if (e && typeof e === "string") {
this.setAttribute("reportUri", e);
} else {
this.removeAttribute("reportUri");
}
}
get authenticationType() {
return Ao(this.getAttribute("authenticationType")) || "credentials";
}
set authenticationType(e) {
if (e) {
if (typeof e !== "string" || !Ao(e)) {
console.warn(`Invalid AuthenticationType: ${e}`);
this.removeAttribute("authenticationType");
} else {
this.setAttribute("authenticationType", e.toLowerCase());
}
} else {
this.removeAttribute("authenticationType");
}
}
get popoverRootId() {
return this.getAttribute("popoverRootId");
}
set popoverRootId(e) {
if (e && typeof e === "string") {
this.setAttribute("popoverRootId", e);
} else {
this.removeAttribute("popoverRootId");
}
}
get restrictViewportGestures() {
const e = this.getAttribute("restrictViewportGestures");
if (!e) {
return undefined;
}
const t = e.toLowerCase();
if (t === "true") {
return true;
} else if (t === "false") {
return false;
}
return undefined;
}
set restrictViewportGestures(e) {
if (typeof e === "boolean") {
this.setAttribute("restrictViewportGestures", e.toString());
return;
} else if (!e) {
this.removeAttribute("restrictViewportGestures");
} else {
console.warn(`Invalid value for restrictViewportGestures: ${e}`);
this.removeAttribute("restrictViewportGestures");
}
}
_resetElementKey() {
this._invalidateProps();
const e = this._elementKey;
this._elementKey = Lo();
if (this._stateRetained) {
const t = this._getDynamicImports();
t?.extendStoreLifetime?.(this._elementKey);
setTimeout((() => t?.releaseStoreLifetime?.(e)), 0);
}
}
set menuItemProvider(e) {
e = e ?? undefined;
if (e === this._menuItemProvider) {
return;
}
this._invalidateProps();
this._menuItemProvider = e;
}
get menuItemProvider() {
return this._menuItemProvider;
}
}
function ko(e) {
if (e && typeof e === "string") {
const t = e.toLocaleLowerCase();
return [ "true", "false", "auto" ].indexOf(t) > -1;
}
return true;
}
class Do extends Io {
constructor(...e) {
super(...e);
this._graphCSS = void 0;
this._themeOverrides = null;
this._unprocessedOverrides = void 0;
}
_getRenderer() {
return So()?.SASReport;
}
static get observedAttributes() {
return [ ...super.observedAttributes, "hidenavigation" ];
}
attributeChangedCallback(e, t, o) {
super.attributeChangedCallback(e, t, o);
if (e === "hideNavigation" && this.hasAttribute("hideNavigation") && !ko(o)) {
console.warn(`Invalid value for hideNavigation: ${o}`);
}
}
_initializeWithImports() {
super._initializeWithImports();
if (this._unprocessedOverrides) {
this.unsafe_setCustomReportTheme(this._unprocessedOverrides);
this._unprocessedOverrides = undefined;
}
}
getRenderProps() {
const e = this.getCommonProps();
return e && {
...e,
hideNavigation: this.hideNavigation,
themeOverrides: this._themeOverrides || undefined,
graphCSS: this._graphCSS
};
}
get hideNavigation() {
if (!this.hasAttribute("hideNavigation")) return "auto";
const e = this.getAttribute("hideNavigation");
if (typeof e === "string") {
switch (e.toLocaleLowerCase()) {
case "true":
case "":
return true;
case "false":
return false;
case "auto":
default:
return "auto";
}
}
return true;
}
set hideNavigation(e) {
if (typeof e === "string") {
if (!ko(e)) {
console.warn(`Invalid value for hideNavigation: ${e}`);
this.removeAttribute("hideNavigation");
} else {
this.setAttribute("hideNavigation", e);
}
} else if (typeof e === "boolean") {
this.setAttribute("hideNavigation", e.toString());
return;
} else if (!e) {
this.removeAttribute("hideNavigation");
} else {
console.warn(`Invalid value for hideNavigation: ${e}`);
this.removeAttribute("hideNavigation");
}
}
unsafe_setCustomReportTheme(e) {
const t = So();
if (!t) {
this._unprocessedOverrides = e;
return;
}
if (t.type === "mobile") {
console.error("customReportThemes not supported in this render mode.");
return;
}
let o;
if (typeof e === "object" && e !== null) {
const a = e;
const r = {
baseThemeId: "light",
styleData: {}
};
if (typeof a.baseThemeId === "string") {
r.baseThemeId = a.baseThemeId;
} else {
console.error("Objects passed to unsafe_setCustomReportTheme must have a string for the baseThemeId property");
}
if (typeof a.styleData === "object" && a.styleData !== null) {
r.styleData = a.styleData;
} else {
console.error("Objects passed to unsafe_setCustomReportTheme must have an object for the styleData property");
}
o = t.convertThemeServiceResponseToThemeParameterOverrides(r);
} else if (e === null || e === undefined) {
o = null;
} else {
o = null;
console.error("Invalid value passed to unsafe_setCustomReportTheme: " + e);
}
if (this._themeOverrides === o) {
return;
}
this._themeOverrides = o;
this._invalidateProps();
}
unsafe_setGraphCSS(e) {
let t;
if (typeof e === "string") {
t = e;
} else if (e === null || e === undefined) {
t = undefined;
} else {
t = undefined;
console.error("Invalid value passed to unsafe_setGraphCSS: " + e);
}
if (this._graphCSS === t) {
return;
}
this._graphCSS = t;
this._resetElementKey();
this._invalidateProps();
}
}
function Fo(e) {
if (e && typeof e === "string") {
const t = e.toLocaleLowerCase();
return [ "true", "false" ].indexOf(t) > -1;
}
return true;
}
class Eo extends Io {
constructor(...e) {
super(...e);
this._objectHandlePromise = void 0;
this._rejectObjectHandleCallback = void 0;
}
_getRenderer() {
return So()?.SASReportObject;
}
static get observedAttributes() {
return [ ...super.observedAttributes, "objectname", "reportcontextkey", "hideloadimage" ];
}
_getContextKey(e) {
return "packageUri" in e ? `${e.packageUri}:${e.reportContextKey}:${e.objectName}` : `${e.url}:${e.reportUri}:${e.reportContextKey}:${e.objectName}`;
}
getRenderProps() {
const e = this.getCommonProps();
if (e && this.objectName) {
return {
...e,
objectName: this.objectName,
reportContextKey: this.reportContextKey,
hideLoadImage: this.hideLoadImage
};
} else {
return null;
}
}
get objectName() {
return this.getAttribute("objectName");
}
set objectName(e) {
if (e && typeof e === "string") {
this.setAttribute("objectName", e);
} else {
this.removeAttribute("objectName");
}
}
get reportContextKey() {
return this.getAttribute("reportContextKey") || undefined;
}
set reportContextKey(e) {
if (e && typeof e === "string") {
this.setAttribute("reportContextKey", e);
} else {
this.removeAttribute("reportContextKey");
}
}
get hideLoadImage() {
if (!this.hasAttribute("hideLoadImage")) return false;
const e = this.getAttribute("hideLoadImage");
if (typeof e === "string") {
switch (e.toLocaleLowerCase()) {
case "true":
case "":
return true;
case "false":
return false;
default:
return false;
}
}
return true;
}
set hideLoadImage(e) {
if (typeof e === "string") {
if (!Fo(e)) {
console.warn(`Invalid value for hideLoadImage: ${e}`);
this.removeAttribute("hideLoadImage");
} else {
this.setAttribute("hideLoadImage", e);
}
} else if (typeof e === "boolean") {
this.setAttribute("hideLoadImage", e.toString());
return;
} else if (!e) {
this.removeAttribute("hideLoadImage");
} else {
console.warn(`Invalid value for hideLoadImage: ${e}`);
this.removeAttribute("hideLoadImage");
}
}
_invalidateHandleRequests(e) {
super._invalidateHandleRequests(e);
this._rejectObjectHandleCallback?.(e);
this._rejectObjectHandleCallback = undefined;
this._objectHandlePromise = undefined;
}
getObjectHandle() {
const e = this.objectName;
if (!e) {
return Promise.reject("Cannot get an ObjectHandle before setting objectName");
}
if (!this._objectHandlePromise) {
this._objectHandlePromise = Promise.race([ this.getReportHandle().then((t => t.getObjectHandle(e))), new Promise(((e, t) => {
this._rejectObjectHandleCallback = t;
})) ]);
}
return this._objectHandlePromise;
}
}
class Ro extends Io {
_getRenderer() {
return So()?.SASReportPage;
}
static get observedAttributes() {
return [ ...super.observedAttributes, "pagename", "pageindex", "reportcontextkey" ];
}
_getContextKey(e) {
if (!e.reportContextKey) {
return super._getContextKey(e);
}
return "packageUri" in e ? `${e.packageUri}:${e.reportContextKey}` : `${e.url}:${e.reportUri}:${e.reportContextKey}`;
}
getRenderProps() {
const e = this.getCommonProps();
if (!e) {
return null;
}
const t = this.pageIndex;
if (this.pageName) {
return {
...e,
pageName: this.pageName,
reportContextKey: this.reportContextKey
};
} else if (t !== null) {
return {
...e,
pageIndex: t,
reportContextKey: this.reportContextKey
};
}
return null;
}
get pageName() {
return this.getAttribute("pageName");
}
set pageName(e) {
if (e && typeof e === "string") {
this.setAttribute("pageName", e);
} else {
this.removeAttribute("pageName");
}
}
get pageIndex() {
const e = this.getAttribute("pageIndex");
return Bo(e);
}
set pageIndex(e) {
const t = Bo(e);
if (t !== null) {
this.setAttribute("pageIndex", t.toString());
} else {
this.removeAttribute("pageIndex");
}
}
get reportContextKey() {
return this.getAttribute("reportContextKey") || undefined;
}
set reportContextKey(e) {
if (e && typeof e === "string") {
this.setAttribute("reportContextKey", e);
} else {
this.removeAttribute("reportContextKey");
}
}
}
function Bo(e) {
if (typeof e === "string" && /^\d+$/.test(e)) {
return Number(e);
} else if (typeof e === "number" && e >= 0 && Number.isSafeInteger(e)) {
return Math.abs(e);
} else {
return null;
}
}
function Oo(e) {
zo(e);
if (!customElements.get("sas-report")) {
customElements.define("sas-report", Do);
}
if (!customElements.get("sas-report-object")) {
customElements.define("sas-report-object", Eo);
}
if (!customElements.get("sas-report-page")) {
customElements.define("sas-report-page", Ro);
}
}
function _o(e, t, o, a) {
if (!o) return;
Object.defineProperty(e, t, {
enumerable: o.enumerable,
configurable: o.configurable,
writable: o.writable,
value: o.initializer ? o.initializer.call(a) : void 0
});
}
function Po(e, t, o, a, r) {
var s = {};
Object.keys(a).forEach((function(e) {
s[e] = a[e];
}));
s.enumerable = !!s.enumerable;
s.configurable = !!s.configurable;
if ("value" in s || s.initializer) {
s.writable = true;
}
s = o.slice().reverse().reduce((function(o, a) {
return a(e, t, o) || o;
}), s);
if (r && s.initializer !== void 0) {
s.value = s.initializer ? s.initializer.call(r) : void 0;
s.initializer = undefined;
}
if (s.initializer === void 0) {
Object.defineProperty(e, t, s);
s = null;
}
return s;
}
var jo = globalThis;
jo.sas = jo.sas || {};
sas.ltjs = sas.ltjs || {};
sas.ltjslib = sas.ltjslib || {};
sas.ltjslib.ltjs = sas.ltjslib.ltjs || {};
var Uo = sas.ltjs;
var Go = sas.ltjslib.ltjs;
var Zo = /sas\/ltjs\/([^\/]+).*\/([^\/]+)/;
function Wo(e) {
var t = e.match(Zo);
if (t && t.length === 3) {
var o = t[1];
var a = t[2];
return "".concat(o, "::").concat(a);
}
throw new Error("Unexpected LTJS module path structure: ".concat(e));
}
var Ko = function() {
function e() {
this._typeMap = new Map;
this._moduleMap = new Map;
}
e.prototype.initFromModuleTypeMap = function(e) {
var t = e.length;
for (var o = 0; o < t; o++) {
var a = e[o];
if (a) {
var r = a[0], s = a[1];
var l = Wo(r);
this._typeMap.set(o, {
typeId: o,
moduleName: l,
modulePath: r,
parentTypeId: s
});
}
}
};
e.prototype.getTypeEntry = function(e) {
return this._typeMap.get(e);
};
e.prototype.addClassToModuleMap = function(e, t) {
this._moduleMap.set(e, t);
};
e.prototype.getModuleByName = function(e) {
return this._moduleMap.get(e);
};
return e;
}();
var Yo = [ 1, 2, 4, 8, 16, 32, 64, 128 ];
function Qo(e) {
if (e) {
for (var t = 0, o = e.length; t < o; t++) {
e[t] = e[t] >>> 0;
}
}
return e;
}
function Jo(e) {
if (e) {
for (var t = 0, o = e.length; t < o; t++) {
e[t] = !!e[t];
}
}
return e;
}
var Xo = function() {
function e(e) {
var t = this;
this.wasmCrashed = false;
this.abortCallbacks = [];
this._module = e;
this.runtime.onAborts.push(this.onAbort.bind(this));
if (!this._module.onAbort) {
this._module.onAbort = function() {
for (var e = 0, o = t.runtime.onAborts; e < o.length; e++) {
var a = o[e];
a();
}
};
}
}
Object.defineProperty(e.prototype, "runtime", {
get: function() {
if (!this.module._ltjsRuntime) {
var e = {
ltjsInitialized: false,
wrappersInitialized: false,
wrapperInitFunctions: [],
platformInitialized: false,
onPlatformInitialized: [],
onReadyFunctions: [],
initializeWrappers: function() {
e.wrappersInitialized = true;
for (var t = 0, o = e.wrapperInitFunctions; t < o.length; t++) {
var a = o[t];
a();
}
e.wrapperInitFunctions.length = 0;
},
executeRunWhenInitializedCallbacks: function() {
e.ltjsInitialized = true;
for (var t = 0, o = e.onReadyFunctions; t < o.length; t++) {
var a = o[t];
a();
}
e.onReadyFunctions.length = 0;
},
onAborts: [],
typeMapAvailable: false,
typeMapInitializers: [],
initializedTypemap: function() {
e.typeMapAvailable = true;
for (var t = 0, o = e.typeMapInitializers; t < o.length; t++) {
var a = o[t];
a();
}
e.typeMapInitializers = [];
},
activeVisualizationManagers: new Set,
themeOverrideCallbacks: new Set,
dispatchBridgeMap: new Map
};
this.module._ltjsRuntime = e;
}
return this.module._ltjsRuntime;
},
enumerable: false,
configurable: true
});
Object.defineProperty(e.prototype, "module", {
get: function() {
return this._module;
},
enumerable: false,
configurable: true
});
e.prototype.onAbort = function() {
this.wasmCrashed = true;
for (var e = 0, t = this.abortCallbacks; e < t.length; e++) {
var o = t[e];
o();
}
this.abortCallbacks = [];
};
e.prototype.addAbortCallback = function(e) {
if (this.wasmCrashed) {
e();
} else {
this.abortCallbacks.push(e);
}
};
e.prototype.removeAbortCallback = function(e) {
this.abortCallbacks = this.abortCallbacks.filter((function(t) {
return t !== e;
}));
};
Object.defineProperty(e.prototype, "exports", {
get: function() {
return this._module.exports;
},
enumerable: false,
configurable: true
});
e.prototype.getStringContentsOfFile = function(e) {
return this._module.getStringContentsOfFile(e);
};
e.prototype.writeNLSBundleToFS = function(e, t) {
return this._module.writeNLSBundleToFS(e, t);
};
e.prototype.setInstantiateWasmCallback = function(e) {
this._module.instantiateWasm = e;
};
e.prototype.setMemoryInitializerRequest = function(e) {
this._module.memoryInitializerRequest = e;
};
e.prototype.setUseAsm = function() {
this._module.wasmJSMethod = "asmjs";
};
e.prototype.removeBlockingDependency = function(e) {
if (this._module.removeBlockingDependency) {
this._module.removeBlockingDependency(e);
}
};
Object.defineProperty(e.prototype, "deps", {
set: function(e) {
this._module.deps = e;
},
enumerable: false,
configurable: true
});
Object.defineProperty(e.prototype, "libraryLoadingCompleted", {
set: function(e) {
this._module.libraryLoadingCompleted = e;
},
enumerable: false,
configurable: true
});
Object.defineProperty(e.prototype, "onRuntimeInitialized", {
set: function(e) {
this._module.onRuntimeInitialized = e;
},
enumerable: false,
configurable: true
});
Object.defineProperty(e.prototype, "ltjsRuntimeInitialized", {
set: function(e) {
this._module.ltjsRuntimeInitialized = e;
},
enumerable: false,
configurable: true
});
e.prototype.setIsShuttingDown = function(e) {
if (this._module.setIsShuttingDown) {
this._module.setIsShuttingDown(e);
}
};
e.prototype.getTypeId = function(e) {
return this._module._ltjs_commons_Closet_getTypeID(e);
};
e.prototype.commitStagedObject = function(e) {
return this._module._ltjs_commons_Closet_commitStagedObject(e);
};
e.prototype.discardStagedObject = function(e) {
this._module._ltjs_commons_Closet_discardStagedObject(e);
};
e.prototype.getStagedVectorSize = function(e) {
return this._module._ltjs_commons_Closet_getStagedVectorSize(e);
};
e.prototype.stageObjectAt = function(e) {
return this._module._ltjs_commons_Closet_stageObjectAt(e);
};
e.prototype.discardStagedVector = function(e) {
this._module._ltjs_commons_Closet_discardStagedVector(e);
};
e.prototype._copyValuesIntoCloset = function(e, t, o, a, r) {
if (r === void 0) {
r = false;
}
if (!e || !o || !a) {
return 0;
}
var s = e.length;
var l = this._module._malloc(s * t);
if (r) {
for (var n = 0; n < s; ++n) {
var c = NaN;
var i = e[n];
if (typeof i === "number") {
c = i;
} else if (!isNaN(i)) {
var d = parseFloat(i);
if (!isNaN(d)) {
c = d;
}
}
this._module.setValue(l + n * t, c, o);
}
} else {
for (var n = 0; n < s; ++n) {
this._module.setValue(l + n * t, e[n], o);
}
}
var h = a(s, l);
this._module._free(l);
return h;
};
e.prototype._copyValuesFromCloset = function(e, t, o, a) {
if (a === 0) {
return [];
}
if (!t || e <= 0 || o === 0 || a < 0) {
return null;
}
var r = [];
for (var s = 0; s < a; ++s) {
r[s] = this._module.getValue(o + s * e, t);
}
return r;
};
e.prototype.convertStringToC = function(e) {
if (typeof e !== "string") {
return 0;
}
var t = this._module.stringToNewUTF8(e);
var o = this._module._ltjs_commons_Closet_createString(t);
this._module._free(t);
return o;
};
e.prototype.convertStringFromC = function(e) {
if (!e) {
return null;
}
var t = this._module._ltjs_commons_Closet_getCString(e);
return this._module.UTF8ToString(t);
};
e.prototype.convertStringArrayToC = function(e) {
if (!e) {
return 0;
}
var t = [];
for (var o = 0, a = e.length; o < a; ++o) {
var r = this.convertStringToC(e[o]);
if (r < 0) {
console.error("Conversion error for: " + e[o]);
}
t[o] = r;
}
return this.convertIntArrayToC(t);
};
e.prototype.convertStringArrayFromC = function(e) {
var t = this.convertIntArrayFromC(e);
if (!t) {
return null;
}
var o = [];
var a = t ? t.length : 0;
for (var r = 0; r < a; ++r) {
o[r] = this.convertStringFromC(t[r]);
}
this._module._ltjs_commons_Closet_releaseAllPrimitives(e);
return o;
};
e.prototype.convertIntArrayToC = function(e) {
if (!e) {
return 0;
}
return this._copyValuesIntoCloset(e, 4, "i32", this._module._ltjs_commons_Closet_createIntVector, true);
};
e.prototype.convertIntArrayFromC = function(e) {
if (!e) {
return null;
}
return this._copyValuesFromCloset(4, "i32", this._module._ltjs_commons_Closet_getAddressOfIntVector(e), this._module._ltjs_commons_Closet_getSizeOfIntVector(e));
};
e.prototype.convertIntMVectorFromC = function(e) {
if (!e) {
return null;
}
return this._copyValuesFromCloset(4, "i32", this._module._ltjs_commons_Closet_getAddressOfIntMVector(e), this._module._ltjs_commons_Closet_getSizeOfIntMVector(e));
};
e.prototype.convertUnsignedArrayToC = function(e) {
if (!e) {
return 0;
}
return this._copyValuesIntoCloset(e, 4, "i32", this._module._ltjs_commons_Closet_createUnsignedVector, true);
};
e.prototype.convertUnsignedArrayFromC = function(e) {
if (!e) {
return null;
}
return Qo(this._copyValuesFromCloset(4, "i32", this._module._ltjs_commons_Closet_getAddressOfUnsignedVector(e), this._module._ltjs_commons_Closet_getSizeOfUnsignedVector(e)));
};
e.prototype.convertUnsignedMVectorFromC = function(e) {
if (!e) {
return null;
}
return Qo(this._copyValuesFromCloset(4, "i32", this._module._ltjs_commons_Closet_getAddressOfUnsignedMVector(e), this._module._ltjs_commons_Closet_getSizeOfUnsignedMVector(e)));
};
e.prototype.convertDoubleArrayToC = function(e) {
if (!e) {
return 0;
}
return this._copyValuesIntoCloset(e, 8, "double", this._module._ltjs_commons_Closet_createDoubleVector, true);
};
e.prototype.convertDoubleArrayFromC = function(e) {
if (!e) {
return null;
}
return this._copyValuesFromCloset(8, "double", this._module._ltjs_commons_Closet_getAddressOfDoubleVector(e), this._module._ltjs_commons_Closet_getSizeOfDoubleVector(e));
};
e.prototype.convertDoubleMVectorFromC = function(e) {
if (!e) {
return null;
}
return this._copyValuesFromCloset(8, "double", this._module._ltjs_commons_Closet_getAddressOfDoubleMVector(e), this._module._ltjs_commons_Closet_getSizeOfDoubleMVector(e));
};
e.prototype.convertFloatArrayToC = function(e) {
if (!e) {
return 0;
}
return this._copyValuesIntoCloset(e, 4, "float", this._module._ltjs_commons_Closet_createFloatVector, true);
};
e.prototype.convertFloatArrayFromC = function(e) {
if (!e) {
return null;
}
return this._copyValuesFromCloset(4, "float", this._module._ltjs_commons_Closet_getAddressOfFloatVector(e), this._module._ltjs_commons_Closet_getSizeOfFloatVector(e));
};
e.prototype.convertFloatMVectorFromC = function(e) {
if (!e) {
return null;
}
return this._copyValuesFromCloset(4, "float", this._module._ltjs_commons_Closet_getAddressOfFloatMVector(e), this._module._ltjs_commons_Closet_getSizeOfFloatMVector(e));
};
e.prototype.convertBoolArrayToC = function(e) {
e = Jo(e);
if (!e) {
return 0;
}
return this._copyValuesIntoCloset(e, 1, "i8", this._module._ltjs_commons_Closet_createBoolVector);
};
e.prototype.convertBoolArrayFromC = function(e) {
if (!e) {
return null;
}
var t = this._module._ltjs_commons_Closet_getBoolVectorAsBitset(e);
var o = this._module._ltjs_commons_Closet_getAddressOfBitset(t);
var a = this._module._ltjs_commons_PrimitiveCloset_getSizeOfBoolVector(e);
var r = this.convertBitsetToBoolArray(o, a);
this._module._ltjs_commons_Closet_releasePrimitive(t);
return r;
};
e.prototype.convertBoolMVectorFromC = function(e) {
if (!e) {
return null;
}
var t = this._module._ltjs_commons_Closet_getBoolMVectorAsBitset(e);
var o = this._module._ltjs_commons_Closet_getAddressOfBitset(t);
var a = this._module._ltjs_commons_PrimitiveCloset_getSizeOfBoolMVector(e);
var r = this.convertBitsetToBoolArray(o, a);
this._module._ltjs_commons_Closet_releasePrimitive(t);
return r;
};
e.prototype.convertBitsetToBoolArray = function(e, t) {
if (t === 0) {
return [];
}
var o = this._module.HEAP8;
if (!o || e === 0 || t < 0) {
return null;
}
var a = [];
for (var r = 0; r < t; ++r) {
var s = o[e + Math.floor(r / 8)];
a[r] = !!(s & Yo[r % 8]);
}
return a;
};
e.prototype.convertObjectToC = function(e) {
return e ? e.getClosetAddress() : 0;
};
e.prototype.convertObjectArrayToC = function(e) {
if (!e) {
return 0;
}
var t = [];
for (var o = 0, a = e.length; o < a; ++o) {
t[o] = this.convertObjectToC(e[o]);
}
return this.convertIntArrayToC(t);
};
e.prototype.convertGeometryArrayFromC = function(e) {
var t = this.convertIntArrayFromC(e);
if (!t) {
return null;
}
var o = [];
for (var a = 0, r = t.length; a < r; ++a) {
o[a] = this.convertFloatArrayFromC(t[a]);
}
this.releaseAllPrimitives(e);
return o;
};
e.prototype.convertGeometryArrayToC = function(e) {
if (!e) {
return 0;
}
var t = [];
for (var o = 0, a = e.length; o < a; ++o) {
t[o] = this.convertFloatArrayToC(e[o]);
}
return this.convertIntArrayToC(t);
};
e.prototype.getWrappableClosetSize = function() {
return this._module._ltjs_commons_Closet_getWrappableClosetSize();
};
e.prototype.getPrimitiveClosetSize = function() {
return this._module._ltjs_commons_Closet_getPrimitiveClosetSize();
};
e.prototype.releaseWrappable = function(e) {
this._module._ltjs_commons_Closet_releaseWrappable(e);
};
e.prototype.releasePrimitive = function(e) {
this._module._ltjs_commons_Closet_releasePrimitive(e);
};
e.prototype.releaseAllPrimitives = function(e) {
this._module._ltjs_commons_Closet_releaseAllPrimitives(e);
};
e.prototype.releaseAllWrappables = function(e) {
var t = this.convertIntArrayToC(e);
this._module._ltjs_commons_Closet_releaseAllWrappables(t);
};
e.prototype.getClosetKey = function(e) {
return this._module._ltjs_commons_Closet_getAddress(e);
};
e.prototype.closetObjectsEqual = function(e, t) {
return this._module._ltjs_commons_Closet_equals(e, t);
};
return e;
}();
var qo = new Xo(Go);
var $o = qo;
var ea = [];
var ta;
var oa = 0;
var aa = [];
var ra = new Map;
var sa = new Ko;
if ($o.runtime.typeMapAvailable) {
sa.initFromModuleTypeMap(Go.typeMap);
} else {
$o.runtime.typeMapInitializers.push((function() {
sa.initFromModuleTypeMap(Go.typeMap);
}));
}
function la() {
oa--;
if (oa <= 0) {
qo.runtime.executeRunWhenInitializedCallbacks();
}
}
function na() {
qo.runtime.initializeWrappers();
var e = aa.concat(qo.runtime.onPlatformInitialized);
qo.runtime.platformInitialized = true;
qo.runtime.onPlatformInitialized = [];
aa.length = 0;
oa = e.length;
for (var t = 0, o = e; t < o.length; t++) {
var a = o[t];
a(la);
}
if (oa <= 0) {
qo.runtime.executeRunWhenInitializedCallbacks();
}
}
function ca() {
if (!ia()) {
return;
}
if (qo.removeBlockingDependency) {
qo.removeBlockingDependency("librariesLoaded");
}
qo.libraryLoadingCompleted = true;
}
function ia() {
var e = sas.ltjs.loaderRuntime;
var t = sas.ltjs.runtime;
return !e || t === e;
}
function da(e, t) {
if (e && ea.indexOf(e) < 0) {
ea.push(e);
}
if (sas.ltjs.registerDependency) {
sas.ltjs.registerDependency(e);
}
ra.set(e, t);
}
function ha() {
return ea;
}
function pa() {
var e = [];
for (var t = 0, o = ea; t < o.length; t++) {
var a = o[t];
var r = ra.get(a);
if (r) {
e = e.concat(r);
}
}
return e;
}
function ma(e) {
if (ga()) {
e();
} else {
qo.runtime.onReadyFunctions.push(e);
}
}
function ua() {
if (ga()) {
return Promise.resolve();
} else {
if (!ta) {
ta = new Promise((function(e) {
qo.runtime.onReadyFunctions.push(e);
}));
}
return ta;
}
}
function ga() {
return qo.runtime.ltjsInitialized || va();
}
function va() {
return !!sas.ltjs.jest && sas.ltjs.jest.isInitialized;
}
function fa(e, t) {
if (t === void 0) {
t = false;
}
if (qo.runtime.platformInitialized || va()) {
e();
} else if (t) {
aa.push(e);
} else {
qo.runtime.onPlatformInitialized.push(e);
}
}
function Ca(e) {
if (qo.runtime.wrappersInitialized || va()) {
e();
} else {
qo.runtime.wrapperInitFunctions.push(e);
}
}
function Ma(e) {
var t = sa.getModuleByName(e);
if (t === undefined) {
throw new Error("Module is not defined for name: ".concat(e));
}
return t;
}
function ya(e, t) {
if (t && t.default) {
return t.default;
}
return Ma(e);
}
function ba(e) {
return function(e) {
V(t, e);
function t() {
return e !== null && e.apply(this, arguments) || this;
}
return t;
}(e);
}
function wa(e, t) {
var o = sa.getModuleByName(e);
if (!o) {
o = ba(t);
sa.addClassToModuleMap(e, o);
}
return o;
}
function xa(e, t, o) {
var a = o;
for (var r = 0, s = t; r < s.length; r++) {
var l = s[r];
a = wa(l, a);
}
return wa(e, a);
}
function Sa() {
sa.initFromModuleTypeMap(Go.typeMap);
}
var za = Object.freeze({
__proto__: null,
_ltjsModule: $o,
createModule: xa,
currentRuntimeIsLoaderRuntime: ia,
getRegisteredModules: ha,
getRegisteredPortablePackages: pa,
initialize: na,
initializeWrapper: Ca,
isInitialized: ga,
ltjsModule: qo,
moduleLookup: Ma,
moduleLookupAsDefault: ya,
registerModule: da,
reinitializeTypemap: Sa,
runWhenInitialized: ma,
runWhenPlatformInitialized: fa,
setupLtjsEnvironment: ca,
typeMap: sa,
whenInitialized: ua
});
function Va(e) {
if (!e) {
return 0;
}
if (!Array.isArray(e)) {
return e.getClosetAddress();
}
return e.map(Va);
}
function Na(e) {
if (!e) {
return 0;
}
if (!Array.isArray(e)) {
return qo.getClosetKey(e.getClosetAddress());
}
return e.map(Na);
}
var Ta;
(function(e) {
e[e["IE"] = 1] = "IE";
e[e["EDGE"] = 2] = "EDGE";
e[e["FIREFOX"] = 3] = "FIREFOX";
e[e["CHROME"] = 4] = "CHROME";
e[e["SAFARI"] = 5] = "SAFARI";
e[e["UNKNOWN"] = 6] = "UNKNOWN";
})(Ta || (Ta = {}));
function La(e) {
if (/Edge\/[\w\.]*/.test(e)) {
return Ta.EDGE;
} else if (/Chrome\/[\w\.]*/.test(e)) {
return Ta.CHROME;
} else if (/Firefox\/[\w\.]*/.test(e)) {
return Ta.FIREFOX;
} else if (/Safari\/[\w\.]*/.test(e)) {
return Ta.SAFARI;
} else if (/MSIE /.test(e) || /Trident\//.test(e)) {
return Ta.IE;
}
return Ta.UNKNOWN;
}
var Ha = null;
function Aa() {
if (Ha === null) {
Ha = La(window.navigator.userAgent);
}
return Ha;
}
var Ia = sas.ltjs.isOpenUI;
var ka;
var Da;
function Fa(e) {
if (Ea(e)) {
if (Ia) {
return sas.hc.ui.core.util.getProxyUrl(e, false);
}
if (Ra(e)) {
return e;
}
}
if (e.startsWith("http://") || e.startsWith("https://")) {
return e;
}
if (e.startsWith("./resources/")) {
e = e.substring(12);
} else if (e.startsWith("/resources/")) {
e = e.substring(11);
}
if (e.startsWith("/")) {
e = e.substring(1);
}
if (sas.ltjs.getResourceUrl) {
var t = sas.ltjs.getResourceUrl(e);
if (t) {
return t;
}
}
var o;
if (Ia) {
o = jQuery.sap.getResourcePath(e, "");
if (e.endsWith("/") && !o.endsWith("/")) {
o += "/";
}
return o;
}
if (!sas.ltjs.resourceUrl) {
console.warn('sas.ltjs.resourceUrl not configured, defaulting to "/"');
sas.ltjs.resourceUrl = "/";
}
return "".concat(sas.ltjs.resourceUrl).concat(sas.ltjs.resourceUrl.endsWith("/") ? "" : "/").concat(e);
}
function Ea(e) {
if (sas.ltjs.node) {
return false;
}
if (Ia) {
return sas.hc.ui.core.util.isUrlCrossDomain(e);
}
if (!ka) {
ka = document.createElement("a");
}
try {
ka.href = e;
} catch (t) {
console.warn("Failed to parse url: ", e);
return true;
}
if (!ka.protocol) {
return false;
}
if (ka.protocol !== location.protocol || ka.hostname !== location.hostname) {
return true;
}
var t = ka.port === "80" || ka.port === "443" ? "" : ka.port;
if (t !== null && t !== location.port || t === null && location.port !== "") {
return true;
}
return false;
}
function Ra(e) {
try {
new URL(e);
return true;
} catch (e) {
return false;
}
}
function Ba(e) {
return !!void 0;
}
function Oa(e, t) {
if (!globalThis.location) {
return t;
}
if (!Da) {
Da = {};
var o = globalThis.location.search.substring(1);
var a = o.split("&");
for (var r = 0; r < a.length; r++) {