@kosdev-code/kos-ui-sdk 2.0.37 → 2.0.39

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/index.js CHANGED
@@ -2,11 +2,11 @@ var Kc = Object.defineProperty;
2
2
  var zc = (t, e, s) => e in t ? Kc(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
3
3
  var l = (t, e, s) => (zc(t, typeof e != "symbol" ? e + "" : e, s), s);
4
4
  import S from "loglevel";
5
- import { runInAction as V, observable as ee, makeAutoObservable as _e, action as Fn, when as Yt, ObservableMap as co, reaction as qt, autorun as Wt, makeObservable as kn, computed as Nn, createAtom as Gc, observe as Un, isComputedProp as Vc, isObservable as Yc } from "mobx";
5
+ import { runInAction as V, observable as ee, makeAutoObservable as _e, action as kn, when as Yt, ObservableMap as co, reaction as qt, autorun as Wt, makeObservable as Fn, computed as Nn, createAtom as Gc, observe as Un, isComputedProp as Vc, isObservable as Yc } from "mobx";
6
6
  import { makeAutoObservable as qv, makeObservable as Wv } from "mobx";
7
7
  import { createMachine as At, state as z, transition as D, invoke as ve, action as N, interpret as Lt, immediate as nt } from "robot3";
8
8
  import { format as He, parseISO as qc } from "date-fns";
9
- import { jsx as v, jsxs as Ft, Fragment as Wc } from "@emotion/react/jsx-runtime";
9
+ import { jsx as v, jsxs as kt, Fragment as Wc } from "@emotion/react/jsx-runtime";
10
10
  import lo from "@emotion/styled";
11
11
  import { createPortal as jn } from "react-dom";
12
12
  import { keyframes as Zc, css as st } from "@emotion/react";
@@ -761,13 +761,13 @@ const pi = gi, Ol = () => pi.profiles || [], Vo = (t) => Ol().includes(t), bb =
761
761
  }, Dl = () => {
762
762
  const t = ye(), e = Sl(), r = t.kosLogLevel ?? e ?? window.kosLogLevel ?? process.env.KOS_LOG_LEVEL;
763
763
  return r || "WARN";
764
- }, Cl = () => window.kosMessageLogging || process.env.KOS_MESSAGE_LOGGING === "true", Pl = () => window.kosMessageStudioLogging || process.env.KOS_MESSAGE_STUDIO_LOGGING === "true", mi = "ws-log", xl = S.methodFactory, yi = Cl(), Rl = Pl();
764
+ }, Cl = () => window.kosMessageLogging || process.env.KOS_MESSAGE_LOGGING === "true", Pl = () => window.kosMessageStudioLogging || process.env.KOS_MESSAGE_STUDIO_LOGGING === "true", mi = "ws-log", Rl = S.methodFactory, yi = Cl(), xl = Pl();
765
765
  S.methodFactory = function(t, e, s) {
766
- const r = xl(t, e, s);
766
+ const r = Rl(t, e, s);
767
767
  return function(o, n) {
768
768
  var c;
769
769
  const i = s ? String(s) : "", a = i ? `[${String(i).substring(i.lastIndexOf(":") + 1)}] | ` : "[root] | ";
770
- r(`${a}${o}`, n || ""), (c = globalThis == null ? void 0 : globalThis.kosConfig) != null && c.logging && globalThis.kosLog && (s !== mi || yi && Rl) && globalThis.kosLog(`UI: ${a}${o}`);
770
+ r(`${a}${o}`, n || ""), (c = globalThis == null ? void 0 : globalThis.kosConfig) != null && c.logging && globalThis.kosLog && (s !== mi || yi && xl) && globalThis.kosLog(`UI: ${a}${o}`);
771
771
  };
772
772
  };
773
773
  let bi = Dl();
@@ -803,7 +803,7 @@ const Al = [
803
803
  "font-weight: bold"
804
804
  ].join(";"), ns = (t) => (e) => {
805
805
  S.getLevel() <= t && e();
806
- }, p = {
806
+ }, g = {
807
807
  ...S,
808
808
  ifDebug: ns(S.levels.DEBUG),
809
809
  ifInfo: ns(S.levels.INFO),
@@ -829,8 +829,8 @@ const Al = [
829
829
  const e = String(t).replace(/\n/g, "\\n");
830
830
  Ls.info(`%c⬇ ${e}`, Ll);
831
831
  }
832
- }, Fl = "featureFlagResolver", is = /* @__PURE__ */ new Map();
833
- dr(Fl, {
832
+ }, kl = "featureFlagResolver", is = /* @__PURE__ */ new Map();
833
+ dr(kl, {
834
834
  register: (t, e) => {
835
835
  var s;
836
836
  is.has(t) || is.set(t, []), (s = is.get(t)) == null || s.push(e);
@@ -839,7 +839,7 @@ dr(Fl, {
839
839
  const s = is.get(t);
840
840
  if (!s)
841
841
  return [];
842
- const r = s.map((a) => a(e)), n = (await Promise.allSettled(r)).map((a) => a.status === "fulfilled" ? a.value : (p.info(`Feature flag resolver ${t} failed: ${a.reason}`), [])).flat(), i = Array.from(new Set(n)).reduce(
842
+ const r = s.map((a) => a(e)), n = (await Promise.allSettled(r)).map((a) => a.status === "fulfilled" ? a.value : (g.info(`Feature flag resolver ${t} failed: ${a.reason}`), [])).flat(), i = Array.from(new Set(n)).reduce(
843
843
  (a, c) => (a[c] = !0, a),
844
844
  {}
845
845
  );
@@ -847,7 +847,7 @@ dr(Fl, {
847
847
  }
848
848
  });
849
849
  const wb = "kos.loader.featureFlag";
850
- class kl {
850
+ class Fl {
851
851
  constructor(e = {}) {
852
852
  l(this, "flags", {});
853
853
  this.flags = e;
@@ -873,7 +873,7 @@ class kl {
873
873
  this.flags = { ...this.flags, ...e };
874
874
  }
875
875
  }
876
- window.KosFeatureFlags = window.KosFeatureFlags ?? new kl();
876
+ window.KosFeatureFlags = window.KosFeatureFlags ?? new Fl();
877
877
  const Nl = window.KosFeatureFlags, Ul = (t, e, s) => {
878
878
  s /= 100;
879
879
  const r = e * Math.min(s, 1 - s) / 100, o = (n) => {
@@ -905,7 +905,7 @@ const Nl = window.KosFeatureFlags, Ul = (t, e, s) => {
905
905
  clearTimeout(s);
906
906
  });
907
907
  }
908
- }, Kl = p.createLogger({ name: "kos-dependency-manager" });
908
+ }, Kl = g.createLogger({ name: "kos-dependency-manager" });
909
909
  class zl {
910
910
  constructor() {
911
911
  l(this, "_usedByCache", /* @__PURE__ */ new Map());
@@ -938,8 +938,8 @@ class zl {
938
938
  this._usedByCache.clear(), this._usesCache.clear();
939
939
  }
940
940
  }
941
- var m = /* @__PURE__ */ ((t) => (t.CREATING = "creating", t.CREATED = "created", t.INITIALIZING = "initializing", t.INITIALIZED = "initialized", t.LOADING = "loading", t.LOADED = "loaded", t.ONLINE = "online", t.READYING = "readying", t.READY = "ready", t.READY_FAILED = "ready_failed", t.RESETTING = "resetting", t.RESET = "reset", t.OFFLINE = "offline", t.UNLOADING = "unloading", t.UNLOADED = "unloaded", t.FAILED = "failed", t.INACTIVE = "inactive", t.ACTIVE = "active", t.ACTIVATING = "activating", t.DEACTIVATING = "deactivating", t))(m || {}), R = /* @__PURE__ */ ((t) => (t.CREATE = "create", t.INITIALIZE = "init", t.LOAD = "load", t.READY = "ready", t.GO_ONLINE = "go_online", t.GO_OFFLINE = "go_offline", t.RESET = "go_offline", t.UNLOAD = "unload", t.FAILED = "failed", t.GO_ACTIVE = "go_active", t.GO_INACTIVE = "go_inactive", t.TIMEOUT = "timeout", t))(R || {});
942
- const qo = p.createLogger({ name: "kos-model-cache" });
941
+ var m = /* @__PURE__ */ ((t) => (t.CREATING = "creating", t.CREATED = "created", t.INITIALIZING = "initializing", t.INITIALIZED = "initialized", t.LOADING = "loading", t.LOADED = "loaded", t.ONLINE = "online", t.READYING = "readying", t.READY = "ready", t.READY_FAILED = "ready_failed", t.RESETTING = "resetting", t.RESET = "reset", t.OFFLINE = "offline", t.UNLOADING = "unloading", t.UNLOADED = "unloaded", t.FAILED = "failed", t.INACTIVE = "inactive", t.ACTIVE = "active", t.ACTIVATING = "activating", t.DEACTIVATING = "deactivating", t))(m || {}), x = /* @__PURE__ */ ((t) => (t.CREATE = "create", t.INITIALIZE = "init", t.LOAD = "load", t.READY = "ready", t.GO_ONLINE = "go_online", t.GO_OFFLINE = "go_offline", t.RESET = "go_offline", t.UNLOAD = "unload", t.FAILED = "failed", t.GO_ACTIVE = "go_active", t.GO_INACTIVE = "go_inactive", t.TIMEOUT = "timeout", t))(x || {});
942
+ const qo = g.createLogger({ name: "kos-model-cache" });
943
943
  class Gl {
944
944
  constructor(e = []) {
945
945
  l(this, "_modelsById", ee.map(/* @__PURE__ */ new Map()));
@@ -1018,7 +1018,7 @@ const re = Symbol("SubscriptionHandlers"), L = Symbol("DependencyModels"), _s =
1018
1018
  } else
1019
1019
  return r;
1020
1020
  return r;
1021
- }, ql = p.createLogger({ group: "decorators", name: "kos-model" });
1021
+ }, ql = g.createLogger({ group: "decorators", name: "kos-model" });
1022
1022
  function Wl(t, e, s) {
1023
1023
  var n;
1024
1024
  const r = (n = t[Ts]) == null ? void 0 : n.parentId;
@@ -1077,7 +1077,7 @@ const Xl = {
1077
1077
  var a;
1078
1078
  const [s, r = {}] = e, o = G.createContext(s);
1079
1079
  Wl(t, s, r);
1080
- const n = p.createLogger({
1080
+ const n = g.createLogger({
1081
1081
  name: t.prototype.modelTypeId,
1082
1082
  group: ((a = t[Is]) == null ? void 0 : a.group) ?? "kos-model"
1083
1083
  }), i = new t(s, r, {
@@ -1091,8 +1091,8 @@ function P(t) {
1091
1091
  return (e) => {
1092
1092
  var r, o;
1093
1093
  const s = e;
1094
- return s.prototype.modelTypeId = t, s.prototype[Vl] = !0, (r = s.prototype)[re] ?? (r[re] = {}), (o = s.prototype)[L] ?? (o[L] = {}), p.ifDebug(() => {
1095
- p.debug(`Registering model with id ${t}`);
1094
+ return s.prototype.modelTypeId = t, s.prototype[Vl] = !0, (r = s.prototype)[re] ?? (r[re] = {}), (o = s.prototype)[L] ?? (o[L] = {}), g.ifDebug(() => {
1095
+ g.debug(`Registering model with id ${t}`);
1096
1096
  }), new Proxy(s, Xl);
1097
1097
  };
1098
1098
  }
@@ -1177,7 +1177,7 @@ const Sb = (t) => (e, s) => {
1177
1177
  };
1178
1178
  }) : o[re][t] = {
1179
1179
  websocket: s,
1180
- handler: bl(o, Fn(e), 200),
1180
+ handler: bl(o, kn(e), 200),
1181
1181
  condition: r
1182
1182
  };
1183
1183
  };
@@ -1195,9 +1195,9 @@ function od(t, e, s) {
1195
1195
  function nd(t) {
1196
1196
  return t.endsWith("/*");
1197
1197
  }
1198
- function F({
1198
+ function k({
1199
1199
  topic: t,
1200
- condition: e = (M, k) => !0,
1200
+ condition: e = (M, F) => !0,
1201
1201
  transform: s = (M) => M,
1202
1202
  websocket: r = !1,
1203
1203
  fos: o = !1,
@@ -1210,16 +1210,16 @@ function F({
1210
1210
  throttle: u,
1211
1211
  buffer: h,
1212
1212
  filter: f,
1213
- once: g,
1213
+ once: p,
1214
1214
  replay: y,
1215
1215
  wildcardName: b,
1216
1216
  flow: w
1217
1217
  }) {
1218
- return (M, k, te) => {
1218
+ return (M, F, te) => {
1219
1219
  M[re] = M[re] || {};
1220
1220
  let _ = te.value;
1221
1221
  const W = typeof d == "number" ? d : d == null ? void 0 : d.delay, U = typeof u == "number" ? u : u == null ? void 0 : u.interval;
1222
- W && W > 0 ? _ = id(_, d) : U && U > 0 ? _ = ad(_, u) : h ? _ = cd(_, h) : g && (_ = ld(_));
1222
+ W && W > 0 ? _ = id(_, d) : U && U > 0 ? _ = ad(_, u) : h ? _ = cd(_, h) : p && (_ = ld(_));
1223
1223
  let J = e;
1224
1224
  if (f) {
1225
1225
  const $e = e;
@@ -1334,7 +1334,7 @@ const Mi = (t, e, s) => {
1334
1334
  let r;
1335
1335
  return { promise: new Promise((i, a) => {
1336
1336
  r = setTimeout(() => {
1337
- p.error(
1337
+ g.error(
1338
1338
  `Model ${e.modelId} - ${e.modelTypeName} - ${s} timed out after ${t}ms`
1339
1339
  ), a(
1340
1340
  new fd(
@@ -1346,7 +1346,7 @@ const Mi = (t, e, s) => {
1346
1346
  }), cancel: () => {
1347
1347
  r && clearTimeout(r);
1348
1348
  } };
1349
- }, gd = (t) => t.fsm.transitionTo(R.GO_ACTIVE, m.ACTIVE), pd = (t) => t.whenReady(), md = (t) => t.fsm.transitionTo(R.LOAD, m.LOADED), Cb = (t) => t.fsm.transitionTo(R.UNLOAD, m.UNLOADED), yd = (t) => t.fsm.transitionTo(R.INITIALIZE, m.INITIALIZED);
1349
+ }, gd = (t) => t.fsm.transitionTo(x.GO_ACTIVE, m.ACTIVE), pd = (t) => t.whenReady(), md = (t) => t.fsm.transitionTo(x.LOAD, m.LOADED), Cb = (t) => t.fsm.transitionTo(x.UNLOAD, m.UNLOADED), yd = (t) => t.fsm.transitionTo(x.INITIALIZE, m.INITIALIZED);
1350
1350
  var _i = /* @__PURE__ */ ((t) => (t.ACTIVE = "active", t.READY = "ready", t.LOAD = "load", t.UNLOAD = "unload", t.INIT = "init", t))(_i || {});
1351
1351
  const Dr = {
1352
1352
  active: gd,
@@ -1359,7 +1359,7 @@ const Dr = {
1359
1359
  modelData: t.modelData,
1360
1360
  modelId: t.modelId
1361
1361
  });
1362
- p.debug(
1362
+ g.debug(
1363
1363
  `activating dependent model ${e.modelType} with id ${r}`
1364
1364
  );
1365
1365
  const o = Object.keys((e == null ? void 0 : e.options) || {}).reduce((i, a) => {
@@ -1378,17 +1378,17 @@ const Dr = {
1378
1378
  }, wd = (t, e = H.READY) => {
1379
1379
  var o;
1380
1380
  const s = ((o = t.modelData) == null ? void 0 : o[L]) || {};
1381
- return Object.keys(s).length === 0 ? (p.debug(`${t.modelId} has no dependencies. Returning`), []) : Object.keys(s).filter((n) => s[n].lifecycle === e).map((n) => {
1381
+ return Object.keys(s).length === 0 ? (g.debug(`${t.modelId} has no dependencies. Returning`), []) : Object.keys(s).filter((n) => s[n].lifecycle === e).map((n) => {
1382
1382
  const i = s[n], { dependentModel: a, dataModelId: c } = bd(
1383
1383
  t,
1384
1384
  i
1385
1385
  );
1386
- t.modelData[n] = a.data, p.debug(
1386
+ t.modelData[n] = a.data, g.debug(
1387
1387
  `waiting for dependent model ${i.modelType} with id ${c} - waiting for WHENREADY`
1388
1388
  );
1389
- const d = async (f, g, y) => {
1389
+ const d = async (f, p, y) => {
1390
1390
  var b;
1391
- await ((b = f.whenReady) == null ? void 0 : b.call(f)), p.debug(`dependent model ${g} with id ${y} - READY`);
1391
+ await ((b = f.whenReady) == null ? void 0 : b.call(f)), g.debug(`dependent model ${p} with id ${y} - READY`);
1392
1392
  }, { promise: u, cancel: h } = Mi(
1393
1393
  vi,
1394
1394
  t,
@@ -1407,19 +1407,19 @@ const Dr = {
1407
1407
  ]);
1408
1408
  }).filter((n) => !!n);
1409
1409
  }, vd = async (t, e, s, r) => {
1410
- if (p.debug(`Execute lifecycle with ${e.length} models`), e.length === 0) {
1411
- p.debug(`${t.modelId} has no children. Returning`);
1410
+ if (g.debug(`Execute lifecycle with ${e.length} models`), e.length === 0) {
1411
+ g.debug(`${t.modelId} has no children. Returning`);
1412
1412
  return;
1413
1413
  }
1414
1414
  if (!s) {
1415
- p.error(
1415
+ g.error(
1416
1416
  `${t.modelId} is not transitioning with a valid target ${s}`
1417
1417
  );
1418
1418
  return;
1419
1419
  }
1420
1420
  const o = e.map((a) => {
1421
1421
  let c;
1422
- return Dr[s] && a ? c = Dr[s](a) : (a || p.error("model is undefined. This shouldn't happen"), Dr[s] || p.error(
1422
+ return Dr[s] && a ? c = Dr[s](a) : (a || g.error("model is undefined. This shouldn't happen"), Dr[s] || g.error(
1423
1423
  `There is no promise in the Transition Map for ${s}`
1424
1424
  )), {
1425
1425
  promise: c,
@@ -1428,7 +1428,7 @@ const Dr = {
1428
1428
  type: a == null ? void 0 : a.modelTypeName,
1429
1429
  status: a == null ? void 0 : a.status
1430
1430
  };
1431
- }).filter((a) => a.promise ? a.model ? !0 : (p.error(`No model found ${a.modelId}`), !1) : (p.error(`No promise found ${a.modelId}`), !1)), i = (await Promise.allSettled(
1431
+ }).filter((a) => a.promise ? a.model ? !0 : (g.error(`No model found ${a.modelId}`), !1) : (g.error(`No promise found ${a.modelId}`), !1)), i = (await Promise.allSettled(
1432
1432
  o.map((a) => {
1433
1433
  var u;
1434
1434
  const { promise: c, cancel: d } = Mi(vi, a.model, a.status);
@@ -1436,7 +1436,7 @@ const Dr = {
1436
1436
  (u = a.promise) == null ? void 0 : u.then(() => {
1437
1437
  d();
1438
1438
  }).catch((h) => {
1439
- p.error(
1439
+ g.error(
1440
1440
  `Model ${a.modelId} - ${a.type} failed to transition to ${s}: ${h.message}`
1441
1441
  ), d();
1442
1442
  }),
@@ -1444,7 +1444,7 @@ const Dr = {
1444
1444
  ]);
1445
1445
  })
1446
1446
  )).filter((a) => a.status === "rejected");
1447
- i.length > 0 && p.error(
1447
+ i.length > 0 && g.error(
1448
1448
  `Model ${t.modelId} had ${i.length} failed child models on ${r}`
1449
1449
  );
1450
1450
  }, Md = async (t, e, s) => {
@@ -1458,9 +1458,9 @@ const Dr = {
1458
1458
  const r = (await Promise.allSettled(
1459
1459
  wd(t, e)
1460
1460
  )).filter((o) => o.status === "rejected");
1461
- r.length && (p.error(
1461
+ r.length && (g.error(
1462
1462
  `There were ${r.length} failed dependent models on ${e}`
1463
- ), p.error(r));
1463
+ ), g.error(r));
1464
1464
  }, Pb = (t) => typeof t.toJSON == "function", $s = (t) => t[L] !== void 0, Ei = (t) => t.revision !== void 0 && t.index !== void 0, _d = (t) => {
1465
1465
  if (t) {
1466
1466
  if ($s(t))
@@ -1673,13 +1673,13 @@ class Od {
1673
1673
  this.disposers = [];
1674
1674
  }
1675
1675
  }
1676
- const Sd = p.createLogger({ name: "model-active-machine" }), Dd = (t) => {
1676
+ const Sd = g.createLogger({ name: "model-active-machine" }), Dd = (t) => {
1677
1677
  const e = At(m.INACTIVE, {
1678
1678
  [m.FAILED]: z(
1679
- D(R.GO_ACTIVE, m.ACTIVATING)
1679
+ D(x.GO_ACTIVE, m.ACTIVATING)
1680
1680
  ),
1681
1681
  [m.INACTIVE]: z(
1682
- D(R.GO_ACTIVE, m.ACTIVATING)
1682
+ D(x.GO_ACTIVE, m.ACTIVATING)
1683
1683
  ),
1684
1684
  [m.ACTIVATING]: ve(
1685
1685
  () => (t.activeStatus = m.ACTIVATING, t.activate()),
@@ -1699,7 +1699,7 @@ const Sd = p.createLogger({ name: "model-active-machine" }), Dd = (t) => {
1699
1699
  )
1700
1700
  ),
1701
1701
  [m.ACTIVE]: z(
1702
- D(R.GO_INACTIVE, m.DEACTIVATING)
1702
+ D(x.GO_INACTIVE, m.DEACTIVATING)
1703
1703
  ),
1704
1704
  [m.DEACTIVATING]: ve(
1705
1705
  () => (t.activeStatus = m.DEACTIVATING, t.deactivate()),
@@ -1723,11 +1723,11 @@ const Sd = p.createLogger({ name: "model-active-machine" }), Dd = (t) => {
1723
1723
  e,
1724
1724
  (r) => Sd.debug(r.machine.current)
1725
1725
  ), machine: e };
1726
- }, Zo = p.createLogger({ name: "model-online-machine" }), Cd = (t) => {
1726
+ }, Zo = g.createLogger({ name: "model-online-machine" }), Cd = (t) => {
1727
1727
  const e = At(m.OFFLINE, {
1728
1728
  [m.ONLINE]: z(
1729
1729
  D(
1730
- R.GO_OFFLINE,
1730
+ x.GO_OFFLINE,
1731
1731
  m.OFFLINE,
1732
1732
  N(async () => {
1733
1733
  await t.offline(), t.onlineStatus = m.OFFLINE;
@@ -1736,11 +1736,11 @@ const Sd = p.createLogger({ name: "model-active-machine" }), Dd = (t) => {
1736
1736
  ),
1737
1737
  [m.OFFLINE]: z(
1738
1738
  D(
1739
- R.GO_ONLINE,
1739
+ x.GO_ONLINE,
1740
1740
  m.ONLINE,
1741
1741
  N(async () => {
1742
1742
  Zo.debug(`Going online with model ${t.modelId}`), await t.online(), t.onlineStatus = m.ONLINE, await t.fsm.transitionTo(
1743
- R.INITIALIZE,
1743
+ x.INITIALIZE,
1744
1744
  m.INITIALIZED
1745
1745
  );
1746
1746
  })
@@ -1756,7 +1756,7 @@ const Sd = p.createLogger({ name: "model-active-machine" }), Dd = (t) => {
1756
1756
  const e = Dd(t).service, s = Cd(t).service;
1757
1757
  return At(m.CREATING, {
1758
1758
  [m.CREATING]: z(
1759
- D(R.CREATE, m.CREATED)
1759
+ D(x.CREATE, m.CREATED)
1760
1760
  ),
1761
1761
  [m.CREATED]: z(nt(m.INITIALIZING)),
1762
1762
  [m.INITIALIZING]: ve(
@@ -1774,7 +1774,7 @@ const Sd = p.createLogger({ name: "model-active-machine" }), Dd = (t) => {
1774
1774
  "error",
1775
1775
  m.FAILED,
1776
1776
  N(() => {
1777
- p.error(
1777
+ g.error(
1778
1778
  `Model ${t.modelId} - ${t.modelTypeName} failed to initialize. Transitioning to FAILED state.`
1779
1779
  ), t.status = m.FAILED;
1780
1780
  })
@@ -1802,7 +1802,7 @@ const Sd = p.createLogger({ name: "model-active-machine" }), Dd = (t) => {
1802
1802
  ),
1803
1803
  [m.LOADED]: z(
1804
1804
  nt(m.READYING),
1805
- D(R.UNLOAD, m.UNLOADING)
1805
+ D(x.UNLOAD, m.UNLOADING)
1806
1806
  ),
1807
1807
  [m.RESETTING]: ve(
1808
1808
  () => {
@@ -1829,7 +1829,7 @@ const Sd = p.createLogger({ name: "model-active-machine" }), Dd = (t) => {
1829
1829
  N(() => {
1830
1830
  se(() => {
1831
1831
  t.status = m.READY;
1832
- }), s.send(R.GO_ONLINE);
1832
+ }), s.send(x.GO_ONLINE);
1833
1833
  })
1834
1834
  ),
1835
1835
  D(
@@ -1842,46 +1842,46 @@ const Sd = p.createLogger({ name: "model-active-machine" }), Dd = (t) => {
1842
1842
  ),
1843
1843
  [m.READY]: z(
1844
1844
  D(
1845
- R.UNLOAD,
1845
+ x.UNLOAD,
1846
1846
  m.UNLOADED,
1847
1847
  N((r = t.unload) == null ? void 0 : r.bind(t))
1848
1848
  ),
1849
- D(R.RESET, m.RESETTING),
1849
+ D(x.RESET, m.RESETTING),
1850
1850
  D(
1851
- R.GO_ONLINE,
1851
+ x.GO_ONLINE,
1852
1852
  m.READY,
1853
1853
  N(() => {
1854
- s.send(R.GO_ONLINE);
1854
+ s.send(x.GO_ONLINE);
1855
1855
  })
1856
1856
  ),
1857
1857
  D(
1858
- R.GO_OFFLINE,
1858
+ x.GO_OFFLINE,
1859
1859
  m.READY,
1860
1860
  N(() => {
1861
- s.send(R.GO_OFFLINE);
1861
+ s.send(x.GO_OFFLINE);
1862
1862
  })
1863
1863
  ),
1864
1864
  D(
1865
- R.GO_ACTIVE,
1865
+ x.GO_ACTIVE,
1866
1866
  m.READY,
1867
1867
  N(() => {
1868
- e.send(R.GO_ACTIVE);
1868
+ e.send(x.GO_ACTIVE);
1869
1869
  })
1870
1870
  ),
1871
1871
  D(
1872
- R.GO_INACTIVE,
1872
+ x.GO_INACTIVE,
1873
1873
  m.READY,
1874
1874
  N(() => {
1875
- e.send(R.GO_INACTIVE);
1875
+ e.send(x.GO_INACTIVE);
1876
1876
  })
1877
1877
  )
1878
1878
  ),
1879
1879
  [m.UNLOADED]: z(),
1880
1880
  [m.FAILED]: z()
1881
1881
  });
1882
- }, xd = p.createLogger({ name: "kos-model-lifecycle" }), Rd = (t) => ({ service: Lt(
1882
+ }, Rd = g.createLogger({ name: "kos-model-lifecycle" }), xd = (t) => ({ service: Lt(
1883
1883
  Pd(t),
1884
- (s) => xd.debug(
1884
+ (s) => Rd.debug(
1885
1885
  `state machine for model ${t.modelId}: ${s.machine.current});`
1886
1886
  )
1887
1887
  ) });
@@ -1890,8 +1890,8 @@ class Ad {
1890
1890
  l(this, "disposer");
1891
1891
  l(this, "service");
1892
1892
  this.model = e, this.log = s;
1893
- const r = Rd(e);
1894
- this.service = r.service, this.service.send(R.CREATE);
1893
+ const r = xd(e);
1894
+ this.service = r.service, this.service.send(x.CREATE);
1895
1895
  }
1896
1896
  /**
1897
1897
  * Returns the current raw state of the FSM
@@ -2099,7 +2099,7 @@ class Ii {
2099
2099
  return [...this.registeredRoutes];
2100
2100
  }
2101
2101
  }
2102
- function xb(t, e) {
2102
+ function Rb(t, e) {
2103
2103
  if (!Kr(t))
2104
2104
  return;
2105
2105
  const s = Se(Ti);
@@ -2114,10 +2114,10 @@ function xb(t, e) {
2114
2114
  class Ld {
2115
2115
  static create({ modelId: e, modelTypeName: s, component: r }) {
2116
2116
  const o = [r ?? "kos", s, e].filter(Boolean).join(".");
2117
- return p.createLogger({ name: o });
2117
+ return g.createLogger({ name: o });
2118
2118
  }
2119
2119
  }
2120
- class Fd {
2120
+ class kd {
2121
2121
  constructor(e) {
2122
2122
  l(this, "queue", []);
2123
2123
  this.log = e;
@@ -2147,7 +2147,7 @@ class Fd {
2147
2147
  return this.queue.length === 0;
2148
2148
  }
2149
2149
  }
2150
- class kd {
2150
+ class Fd {
2151
2151
  constructor(e, s) {
2152
2152
  l(this, "unsubscribers", []);
2153
2153
  this.model = e, this.log = s;
@@ -2157,14 +2157,14 @@ class kd {
2157
2157
  this.log.debug(
2158
2158
  `Online event received for ${e}, waiting for readiness...`
2159
2159
  ), await this.model.whenReady(), this.log.debug(`${e} is ready — sending GO_ONLINE`), await this.model.fsm.transitionTo(
2160
- R.GO_ONLINE,
2160
+ x.GO_ONLINE,
2161
2161
  m.ONLINE
2162
2162
  );
2163
2163
  }), r = $("/kosCore/offline", async () => {
2164
2164
  this.log.debug(
2165
2165
  `Offline event received for ${e} — sending GO_OFFLINE`
2166
2166
  ), await this.model.fsm.transitionTo(
2167
- R.GO_OFFLINE,
2167
+ x.GO_OFFLINE,
2168
2168
  m.OFFLINE
2169
2169
  );
2170
2170
  });
@@ -2360,12 +2360,12 @@ const Kd = ({
2360
2360
  `;
2361
2361
  }), o += `
2362
2362
  `, o;
2363
- }, Rb = (t, e) => {
2363
+ }, xb = (t, e) => {
2364
2364
  const s = t, r = qe(
2365
2365
  zd(e),
2366
2366
  typeof s == "string" ? s : JSON.stringify(s)
2367
2367
  ), o = T.getInstance().transport.socket;
2368
- o ? (p.debug("Sending message", r), o.socket.send(r)) : p.error("socket transport is not initialized");
2368
+ o ? (g.debug("Sending message", r), o.socket.send(r)) : g.error("socket transport is not initialized");
2369
2369
  }, Gd = ({
2370
2370
  path: t,
2371
2371
  responseId: e,
@@ -2386,13 +2386,13 @@ const Kd = ({
2386
2386
  Kd(e),
2387
2387
  JSON.stringify(s)
2388
2388
  ), o = T.getInstance().transport.socket;
2389
- o ? o.socket.send(r) : p.error("socket transport is not initialized");
2389
+ o ? o.socket.send(r) : g.error("socket transport is not initialized");
2390
2390
  }, Lb = (t, e) => {
2391
2391
  const s = e.responseId ? { status: e.status, data: t } : t, r = qe(
2392
2392
  Gd(e),
2393
2393
  JSON.stringify(s)
2394
2394
  ), o = T.getInstance().transport.socket;
2395
- o ? o.socket.send(r) : p.error("socket transport is not initialized");
2395
+ o ? o.socket.send(r) : g.error("socket transport is not initialized");
2396
2396
  }, Vd = ({
2397
2397
  topic: t
2398
2398
  }) => {
@@ -2431,7 +2431,7 @@ const Kd = ({
2431
2431
  `, o += `${Ce}:${r ?? "kos.message.request"}
2432
2432
  `, o += `
2433
2433
  `, o;
2434
- }, Fb = ({
2434
+ }, kb = ({
2435
2435
  msg: t,
2436
2436
  options: e
2437
2437
  }) => {
@@ -2439,7 +2439,7 @@ const Kd = ({
2439
2439
  Vd(e),
2440
2440
  JSON.stringify(s)
2441
2441
  ), o = T.getInstance().transport.socket;
2442
- o ? o.socket.send(r) : p.error("socket transport is not initialized");
2442
+ o ? o.socket.send(r) : g.error("socket transport is not initialized");
2443
2443
  }, Wd = ({
2444
2444
  msg: t,
2445
2445
  options: e
@@ -2448,7 +2448,7 @@ const Kd = ({
2448
2448
  qd(e),
2449
2449
  JSON.stringify(s)
2450
2450
  ), o = T.getInstance().transport.socket;
2451
- o ? o.socket.send(r) : p.error("socket transport is not initialized");
2451
+ o ? o.socket.send(r) : g.error("socket transport is not initialized");
2452
2452
  }, Zd = ({
2453
2453
  msg: t,
2454
2454
  options: e
@@ -2457,7 +2457,7 @@ const Kd = ({
2457
2457
  Yd(e),
2458
2458
  JSON.stringify(s)
2459
2459
  ), o = T.getInstance().transport.socket;
2460
- o ? o.socket.send(r) : p.error("socket transport is not initialized");
2460
+ o ? o.socket.send(r) : g.error("socket transport is not initialized");
2461
2461
  }, Jo = (t, e) => {
2462
2462
  try {
2463
2463
  return e ? t.body ?? t : JSON.parse(t.body);
@@ -2521,13 +2521,13 @@ class wo {
2521
2521
  ), this.socket.onmessage = this.onMessage.bind(this), this.socket.onopen = this.onOpen.bind(this), this.socket.onclose = this.onClose.bind(this), this.oldSend = this.socket.send, this.connectionEstablished = !1, $("/mock/msg/receive", (c) => {
2522
2522
  var d, u;
2523
2523
  if (c != null && c.body) {
2524
- p.wsReceive(c == null ? void 0 : c.body);
2524
+ g.wsReceive(c == null ? void 0 : c.body);
2525
2525
  const h = {
2526
2526
  data: c.body
2527
2527
  };
2528
2528
  (u = (d = this.socket) == null ? void 0 : d.onmessage) == null || u.call(d, h);
2529
2529
  }
2530
- }), kn(this, {
2530
+ }), Fn(this, {
2531
2531
  connectionEstablished: ee
2532
2532
  });
2533
2533
  }
@@ -2540,9 +2540,9 @@ class wo {
2540
2540
  }
2541
2541
  onMessage(e) {
2542
2542
  try {
2543
- p.debug("webSocketTransport: onMessage received");
2543
+ g.debug("webSocketTransport: onMessage received");
2544
2544
  const { headers: s, body: r } = this.processMessageEvent(e);
2545
- p.wsReceive(e.data);
2545
+ g.wsReceive(e.data);
2546
2546
  const o = s.subscription || s[this.RESPONSE_ID_HEADER] || s.topic || s.type;
2547
2547
  if (o) {
2548
2548
  let n = r, i = s;
@@ -2556,31 +2556,31 @@ class wo {
2556
2556
  B(o, n, i);
2557
2557
  }
2558
2558
  } catch (s) {
2559
- p.error("onMessage exception", s.message, s.stack);
2559
+ g.error("onMessage exception", s.message, s.stack);
2560
2560
  }
2561
2561
  }
2562
2562
  onOpen(e) {
2563
- p.info("websocket connection opened"), this.socket = e.currentTarget, V(() => {
2563
+ g.info("websocket connection opened"), this.socket = e.currentTarget, V(() => {
2564
2564
  var s;
2565
2565
  this.connectionEstablished = !0, this.alias && this.socket.send(`type:kos.addr.alias
2566
2566
  alias:${this.alias}
2567
2567
 
2568
- `), p.debug(
2568
+ `), g.debug(
2569
2569
  `sending ${this.offlineMessages.length} offline FOS messages`
2570
2570
  ), this.offlineMessages.forEach((r) => {
2571
2571
  var o;
2572
- p.debug(`sending offline message ${r.msg}`), (o = this.socket) == null || o.send(r.msg);
2572
+ g.debug(`sending offline message ${r.msg}`), (o = this.socket) == null || o.send(r.msg);
2573
2573
  }), this.offlineMessages = [], (s = this.onConnectionEstablished) == null || s.call(this);
2574
2574
  });
2575
2575
  }
2576
2576
  onClose() {
2577
2577
  this.socket && this.socket.close(), V(() => {
2578
2578
  this.connectionEstablished = !1;
2579
- }), p.debug("websocket disconnected. Attempting calling callback"), this.onConnectionLost && setTimeout(this.onConnectionLost, 2500);
2579
+ }), g.debug("websocket disconnected. Attempting calling callback"), this.onConnectionLost && setTimeout(this.onConnectionLost, 2500);
2580
2580
  }
2581
2581
  send(e) {
2582
2582
  var s, r;
2583
- if (p.wsSend(e), window.kosLogEvents) {
2583
+ if (g.wsSend(e), window.kosLogEvents) {
2584
2584
  const { headers: o, body: n } = Xo(String(e));
2585
2585
  B(ir.SEND, { headers: o, body: n });
2586
2586
  }
@@ -2714,9 +2714,9 @@ class en {
2714
2714
  onConnectionEstablished: i,
2715
2715
  onConnectionLost: a
2716
2716
  }) {
2717
- return p.debug("initializing websocket connection"), p.warn(
2717
+ return g.debug("initializing websocket connection"), g.warn(
2718
2718
  `kosWindowWebsocketOpen: ${globalThis.kosWindowWebsocketOpen ? "true" : "false"}`
2719
- ), p.warn(`fos: ${o ? "true" : "false"}`), window.kosMockWs || globalThis.kosWindowWebsocketOpen && !o ? (p.warn("Using bridged message transport"), new eu({
2719
+ ), g.warn(`fos: ${o ? "true" : "false"}`), window.kosMockWs || globalThis.kosWindowWebsocketOpen && !o ? (g.warn("Using bridged message transport"), new eu({
2720
2720
  host: e,
2721
2721
  port: s,
2722
2722
  protocol: r,
@@ -2747,7 +2747,7 @@ window.kosUseFos = !!(window.kosUseFos || process.env.KOS_USE_FOS === "true");
2747
2747
  window.kosFosPort = tn ? parseInt(tn) : 0;
2748
2748
  const je = S.getLogger("web-socket-transport");
2749
2749
  var ou = /* @__PURE__ */ ((t) => (t.NOT_INITIALIZED = "not_initialized", t.INITIALIZED = "initialized", t.OFFLINE = "OFFLINE", t.ONLINE = "ONLINE", t))(ou || {}), Os = /* @__PURE__ */ ((t) => (t.CONNECTED = "websocket.connected", t.DISCONNECTED = "websocket.disconnected", t.RELOAD = "websocket.reload", t))(Os || {});
2750
- class kt {
2750
+ class Ft {
2751
2751
  constructor({
2752
2752
  host: e = "localhost",
2753
2753
  port: s = 8080,
@@ -2770,11 +2770,11 @@ class kt {
2770
2770
  l(this, "useFosTransport");
2771
2771
  this.host = e, this.port = s, this.protocol = r, this._token = o, this.alias = i, this.authorized = process.env.KOS_ALLOW_ANONYMOUS === "true", this.useFosTransport = !!a, this.fosPort = a == null ? void 0 : a.port, this.socket = void 0, this.fosSocket = void 0;
2772
2772
  let c = !1;
2773
- kn(this, {
2773
+ Fn(this, {
2774
2774
  authorized: ee,
2775
2775
  socket: ee,
2776
2776
  fosSocket: ee,
2777
- init: Fn,
2777
+ init: kn,
2778
2778
  connectionEstablished: Nn
2779
2779
  }), qt(
2780
2780
  () => this.connectionEstablished,
@@ -2796,7 +2796,7 @@ class kt {
2796
2796
  }
2797
2797
  init() {
2798
2798
  var e, s;
2799
- if (p.warn(`Initializing WebSocketTransport on ${this.host}:${this.port}`), this.useFosTransport && (this.fosSocket = en.build({
2799
+ if (g.warn(`Initializing WebSocketTransport on ${this.host}:${this.port}`), this.useFosTransport && (this.fosSocket = en.build({
2800
2800
  host: this.host,
2801
2801
  port: this.fosPort || 9854,
2802
2802
  protocol: this.protocol,
@@ -2822,7 +2822,7 @@ class kt {
2822
2822
  return this;
2823
2823
  }
2824
2824
  _sendSubscriptionMessage(e, s, r = !1, o = !1, n) {
2825
- var f, g, y, b;
2825
+ var f, p, y, b;
2826
2826
  je.debug(`${s} to topic ${e}`);
2827
2827
  const i = ye(), a = i == null ? void 0 : i.connId, c = n ?? a ?? ((f = window == null ? void 0 : window.kosBridge) == null ? void 0 : f.call(window, "connId"));
2828
2828
  je.debug(`subscribing with connId ${c}`);
@@ -2833,7 +2833,7 @@ ${d}topics:${e}
2833
2833
  ` : `${d}type:kos.broker.${s}
2834
2834
 
2835
2835
  ["${e}"]`;
2836
- if (r ? (g = this.fosSocket) == null ? void 0 : g.connectionEstablished : (y = this.socket) == null ? void 0 : y.connectionEstablished) {
2836
+ if (r ? (p = this.fosSocket) == null ? void 0 : p.connectionEstablished : (y = this.socket) == null ? void 0 : y.connectionEstablished) {
2837
2837
  const w = r ? this.fosSocket : this.socket;
2838
2838
  (b = w == null ? void 0 : w.socket) == null || b.send(u);
2839
2839
  } else {
@@ -2903,7 +2903,7 @@ ${d}topics:${e}
2903
2903
  return this._instance;
2904
2904
  }
2905
2905
  }
2906
- l(kt, "_instance");
2906
+ l(Ft, "_instance");
2907
2907
  class nu {
2908
2908
  constructor(e) {
2909
2909
  l(this, "config");
@@ -2969,8 +2969,8 @@ class nu {
2969
2969
  u && n.push(u);
2970
2970
  const f = Date.now() - i;
2971
2971
  if (n.length >= r || f >= o) {
2972
- const g = await a();
2973
- g !== void 0 && (yield g);
2972
+ const p = await a();
2973
+ p !== void 0 && (yield p);
2974
2974
  break;
2975
2975
  }
2976
2976
  }
@@ -3120,7 +3120,7 @@ class iu {
3120
3120
  const n = e.destinationAddress ? this.resolvePropKey(e.destinationAddress) : null;
3121
3121
  if (e.websocket) {
3122
3122
  this.log.debug(`Subscribing to WebSocket topic: ${s}`);
3123
- const i = kt.getInstance().subscribeTopic({
3123
+ const i = Ft.getInstance().subscribeTopic({
3124
3124
  topic: s,
3125
3125
  callback: r,
3126
3126
  fos: e.fos,
@@ -3231,7 +3231,7 @@ class iu {
3231
3231
  let i;
3232
3232
  if (e.websocket) {
3233
3233
  const a = e.destinationAddress ? this.resolvePropKey(e.destinationAddress) : null;
3234
- kt.getInstance().subscribeTopic({
3234
+ Ft.getInstance().subscribeTopic({
3235
3235
  topic: s,
3236
3236
  callback: () => {
3237
3237
  },
@@ -3325,7 +3325,7 @@ class du {
3325
3325
  const { modelId: s, modelTypeName: r, modelData: o } = e, n = Ld.create({
3326
3326
  modelId: s,
3327
3327
  modelTypeName: r
3328
- }), i = new Ad(e, Qe(n, "fsm")), a = new Fd(
3328
+ }), i = new Ad(e, Qe(n, "fsm")), a = new kd(
3329
3329
  Qe(n, "offline-queue")
3330
3330
  ), c = new $d(e), d = new Id(e), u = {
3331
3331
  fsm: i,
@@ -3346,7 +3346,7 @@ class du {
3346
3346
  s,
3347
3347
  a,
3348
3348
  h
3349
- ), u.onlineLifecycleManager = new kd(
3349
+ ), u.onlineLifecycleManager = new Fd(
3350
3350
  e,
3351
3351
  Qe(n, "online")
3352
3352
  );
@@ -3617,7 +3617,7 @@ class hu {
3617
3617
  this.companionManager.clear();
3618
3618
  }
3619
3619
  }
3620
- const fu = (t) => typeof t == "function", sn = p.createLogger({ name: "kos-model-instantiator" });
3620
+ const fu = (t) => typeof t == "function", sn = g.createLogger({ name: "kos-model-instantiator" });
3621
3621
  class gu {
3622
3622
  constructor(e, s) {
3623
3623
  this.registry = e, this.cache = s;
@@ -3693,7 +3693,7 @@ let pu = class {
3693
3693
  return es(e);
3694
3694
  }
3695
3695
  };
3696
- const mu = 10, rn = p.createLogger({ name: "kos-model-manager" });
3696
+ const mu = 10, rn = g.createLogger({ name: "kos-model-manager" });
3697
3697
  class yu {
3698
3698
  constructor() {
3699
3699
  l(this, "cache");
@@ -3885,7 +3885,7 @@ class yu {
3885
3885
  if (e.id) {
3886
3886
  const s = this.getModelById(e.id);
3887
3887
  s && await s.fsm.transitionTo(
3888
- R.RESET,
3888
+ x.RESET,
3889
3889
  m.RESETTING
3890
3890
  );
3891
3891
  }
@@ -4116,11 +4116,11 @@ const bu = (t) => {
4116
4116
  if (await T.getInstance().whenReady(), !t.id)
4117
4117
  throw new Error("Model ID is required");
4118
4118
  const e = T.getInstance().modelManager.getModelById(t.id);
4119
- e && await e.fsm.transitionTo(R.UNLOAD, m.UNLOADED);
4119
+ e && await e.fsm.transitionTo(x.UNLOAD, m.UNLOADED);
4120
4120
  }, wu = async (t) => {
4121
- await T.getInstance().whenReady(), await T.getInstance().modelManager.reloadModel(t), p.debug(
4121
+ await T.getInstance().whenReady(), await T.getInstance().modelManager.reloadModel(t), g.debug(
4122
4122
  `reload model initiated for model ${t.id}, model ready: ${zr(t)} - ${Date.now()} `
4123
- ), await fe(t), p.debug(
4123
+ ), await fe(t), g.debug(
4124
4124
  `reload model complete for model ${t.id}, model ready: ${zr(t)} - ${Date.now()} `
4125
4125
  );
4126
4126
  }, Ub = async (t) => {
@@ -4171,7 +4171,7 @@ const bu = (t) => {
4171
4171
  }, on = (t, e) => {
4172
4172
  const s = T.getInstance().modelManager.getModelById(t);
4173
4173
  if (!s) {
4174
- p.info(`Model not found for id ${t}`);
4174
+ g.info(`Model not found for id ${t}`);
4175
4175
  return;
4176
4176
  }
4177
4177
  return Array.from(s.companionModels.all()).find(
@@ -4182,7 +4182,7 @@ const bu = (t) => {
4182
4182
  if (!e)
4183
4183
  throw new Error("Model not found");
4184
4184
  return e.isReady();
4185
- }, Eu = p.createLogger({ name: "kos-model-factory" }), Ds = {
4185
+ }, Eu = g.createLogger({ name: "kos-model-factory" }), Ds = {
4186
4186
  byModelType: (t) => T.getInstance().modelManager.getModelFactory(
4187
4187
  t
4188
4188
  ),
@@ -4236,12 +4236,12 @@ const nn = window.KosRegistry.coreModels, Cr = window.KosRegistry.preloadModels,
4236
4236
  root: t
4237
4237
  }),
4238
4238
  register: (t) => (e, s) => {
4239
- const r = xr(e) ? e.registration() : e;
4240
- return ds.set(r.type, r), xr(e) && e.relatedModels.forEach(
4239
+ const r = Rr(e) ? e.registration() : e;
4240
+ return ds.set(r.type, r), Rr(e) && e.relatedModels.forEach(
4241
4241
  (o) => ds.set(o.type, o.registration())
4242
4242
  ), T.getInstance().isReady && (T.getInstance().modelManager.registry.models[r.type] || (console.info(
4243
4243
  `Model with type ${r.type} doesn't exist. Adding new registration`
4244
- ), T.getInstance().modelManager.registry.models[r.type] = r.registration[r.type], xr(e) && e.relatedModels.forEach(
4244
+ ), T.getInstance().modelManager.registry.models[r.type] = r.registration[r.type], Rr(e) && e.relatedModels.forEach(
4245
4245
  (o) => T.getInstance().modelManager.registry.models[o.type] = o.registration().registration
4246
4246
  ))), s && C.model.preloadModel(t)(r.type), {
4247
4247
  preload: C.model.preloadModel(t),
@@ -4269,7 +4269,7 @@ const nn = window.KosRegistry.coreModels, Cr = window.KosRegistry.preloadModels,
4269
4269
  },
4270
4270
  getAll: () => Array.from(Pr.entries())
4271
4271
  }
4272
- }, Tu = C.model.registerLegacyModel, Iu = C.model.register, Kb = C.companion.register, zb = C.model.preloadModel, $i = (t) => typeof t.updateModel == "function", xr = (t) => t.registration !== void 0 && typeof t.registration == "function";
4272
+ }, Tu = C.model.registerLegacyModel, Iu = C.model.register, Kb = C.companion.register, zb = C.model.preloadModel, $i = (t) => typeof t.updateModel == "function", Rr = (t) => t.registration !== void 0 && typeof t.registration == "function";
4273
4273
  class Oi {
4274
4274
  constructor(e) {
4275
4275
  l(this, "singleton");
@@ -4417,7 +4417,7 @@ class Pe extends Oi {
4417
4417
  };
4418
4418
  }
4419
4419
  }
4420
- const q = p.createLogger({ name: "kos-core" }), $u = () => {
4420
+ const q = g.createLogger({ name: "kos-core" }), $u = () => {
4421
4421
  const t = ye(), e = t == null ? void 0 : t.alias, s = process.env.KOS_CONNECTION_ALIAS;
4422
4422
  return e || s || void 0;
4423
4423
  }, Ou = () => {
@@ -4448,9 +4448,9 @@ const q = p.createLogger({ name: "kos-core" }), $u = () => {
4448
4448
  let s;
4449
4449
  return { promise: new Promise((n, i) => {
4450
4450
  s = setTimeout(() => {
4451
- e ? p.error(
4451
+ e ? g.error(
4452
4452
  `Model ${e.modelId} - ${e.modelTypeName} preloading - timed out after ${t}ms`
4453
- ) : p.error(`KOS Core preloading timed out after ${t}ms`), i(
4453
+ ) : g.error(`KOS Core preloading timed out after ${t}ms`), i(
4454
4454
  new Error(
4455
4455
  `Model ${e == null ? void 0 : e.modelId} - ${e == null ? void 0 : e.modelTypeName} - timed out after ${t}ms`
4456
4456
  )
@@ -4460,7 +4460,7 @@ const q = p.createLogger({ name: "kos-core" }), $u = () => {
4460
4460
  s && clearTimeout(s);
4461
4461
  } };
4462
4462
  }, an = (t) => typeof t.reload == "function", Pu = (t) => typeof t.unload == "function";
4463
- var xu = /* @__PURE__ */ ((t) => (t.LOGGED_IN = "logged_in", t.LOGGED_OUT = "logged_out", t))(xu || {});
4463
+ var Ru = /* @__PURE__ */ ((t) => (t.LOGGED_IN = "logged_in", t.LOGGED_OUT = "logged_out", t))(Ru || {});
4464
4464
  class T {
4465
4465
  constructor(e) {
4466
4466
  l(this, "fsmService");
@@ -4489,7 +4489,7 @@ class T {
4489
4489
  }), $("/studio/project/reload", () => {
4490
4490
  this.fsmService.service.send(rt.RELOAD);
4491
4491
  });
4492
- const s = kt.getInstance(), r = Su(), o = Du(), n = Ou();
4492
+ const s = Ft.getInstance(), r = Su(), o = Du(), n = Ou();
4493
4493
  s.host = r, s.port = Number.parseInt(o), s.protocol = n, process.env.KOS_ALLOW_ANONYMOUS === "true" && (s.authorized = !0);
4494
4494
  const i = $u() ?? e;
4495
4495
  i && (s.alias = i.replace("{{TIMESTAMP}}", Date.now().toString())), this._transport = s.init(), this.fsmService = bu(this), this.fsmService.service.send(rt.CREATE);
@@ -4599,8 +4599,8 @@ class T {
4599
4599
  (i = e.extensions) != null && i.dataMapper && Object.keys(e.extensions.dataMapper).forEach((d) => {
4600
4600
  var h, f;
4601
4601
  const u = (f = (h = e.extensions) == null ? void 0 : h.dataMapper) == null ? void 0 : f[d];
4602
- u && (Array.isArray(u) ? u.forEach((g) => {
4603
- I.dataMapper.registerDataMapper(d, g);
4602
+ u && (Array.isArray(u) ? u.forEach((p) => {
4603
+ I.dataMapper.registerDataMapper(d, p);
4604
4604
  }) : I.dataMapper.registerDataMapper(d, u));
4605
4605
  }), (a = e.extensions) != null && a.propertyMapper && Object.keys(e.extensions.propertyMapper).forEach((d) => {
4606
4606
  var h, f;
@@ -4640,7 +4640,7 @@ function Gr(t) {
4640
4640
  s += String.fromCharCode(e[r]);
4641
4641
  return btoa(s);
4642
4642
  }
4643
- function Ru(t) {
4643
+ function xu(t) {
4644
4644
  const e = atob(t), s = new Uint8Array(e.length);
4645
4645
  for (let r = 0; r < e.length; r++)
4646
4646
  s[r] = e.charCodeAt(r);
@@ -4652,7 +4652,7 @@ async function Au(t) {
4652
4652
  function Lu(t, e) {
4653
4653
  return new Blob([t], { type: e || "application/octet-stream" });
4654
4654
  }
4655
- async function Fu(t) {
4655
+ async function ku(t) {
4656
4656
  const e = {}, s = [], r = [];
4657
4657
  t.forEach((o, n) => {
4658
4658
  r.push([n, o]);
@@ -4670,7 +4670,7 @@ async function Fu(t) {
4670
4670
  e[o] = n.toString();
4671
4671
  return { fields: e, files: s };
4672
4672
  }
4673
- function ku(t) {
4673
+ function Fu(t) {
4674
4674
  return new ReadableStream({
4675
4675
  async start() {
4676
4676
  },
@@ -4703,7 +4703,7 @@ async function Nu(t) {
4703
4703
  };
4704
4704
  }
4705
4705
  if (t instanceof FormData) {
4706
- const e = await Fu(t);
4706
+ const e = await ku(t);
4707
4707
  return {
4708
4708
  data: JSON.stringify(e),
4709
4709
  contentType: "multipart/form-data",
@@ -4712,7 +4712,7 @@ async function Nu(t) {
4712
4712
  }
4713
4713
  throw new Error("Unsupported body type");
4714
4714
  }
4715
- const us = p.createLogger({ name: "kos-fetch" }), Uu = process.env.KOS_WS_TIMEOUT ? parseInt(process.env.KOS_WS_TIMEOUT) : 3e4, ju = () => new Promise((t) => {
4715
+ const us = g.createLogger({ name: "kos-fetch" }), Uu = process.env.KOS_WS_TIMEOUT ? parseInt(process.env.KOS_WS_TIMEOUT) : 3e4, ju = () => new Promise((t) => {
4716
4716
  setTimeout(() => {
4717
4717
  t(!0);
4718
4718
  }, 0);
@@ -4737,7 +4737,7 @@ const us = p.createLogger({ name: "kos-fetch" }), Uu = process.env.KOS_WS_TIMEOU
4737
4737
  c.data
4738
4738
  );
4739
4739
  return new Promise((h) => {
4740
- let f = null, g = null;
4740
+ let f = null, p = null;
4741
4741
  if (e != null && e.signal) {
4742
4742
  if (e.signal.aborted) {
4743
4743
  h({
@@ -4770,7 +4770,7 @@ const us = p.createLogger({ name: "kos-fetch" }), Uu = process.env.KOS_WS_TIMEOU
4770
4770
  return;
4771
4771
  }
4772
4772
  e.signal.addEventListener("abort", () => {
4773
- g && clearTimeout(g), f && f(), h({
4773
+ p && clearTimeout(p), f && f(), h({
4774
4774
  headers: cs({}),
4775
4775
  status: 0,
4776
4776
  ok: !1,
@@ -4799,7 +4799,7 @@ const us = p.createLogger({ name: "kos-fetch" }), Uu = process.env.KOS_WS_TIMEOU
4799
4799
  });
4800
4800
  });
4801
4801
  }
4802
- g = setTimeout(() => {
4802
+ p = setTimeout(() => {
4803
4803
  us.error(`Timeout occurred - url: ${t}`), f && f(), h({
4804
4804
  headers: cs({}),
4805
4805
  status: 404,
@@ -4829,12 +4829,12 @@ const us = p.createLogger({ name: "kos-fetch" }), Uu = process.env.KOS_WS_TIMEOU
4829
4829
  });
4830
4830
  }, i);
4831
4831
  const y = $(r, (w) => {
4832
- g && clearTimeout(g);
4833
- const M = (w == null ? void 0 : w.headers) || {}, k = M["content-type"] || "text/plain", te = M["content-encoding"], x = (w == null ? void 0 : w.body) || "";
4834
- let _ = x;
4835
- if (te === "base64" && x)
4832
+ p && clearTimeout(p);
4833
+ const M = (w == null ? void 0 : w.headers) || {}, F = M["content-type"] || "text/plain", te = M["content-encoding"], R = (w == null ? void 0 : w.body) || "";
4834
+ let _ = R;
4835
+ if (te === "base64" && R)
4836
4836
  try {
4837
- _ = Ru(x);
4837
+ _ = xu(R);
4838
4838
  } catch (U) {
4839
4839
  us.error("Failed to decode base64 response", U);
4840
4840
  }
@@ -4856,10 +4856,10 @@ const us = p.createLogger({ name: "kos-fetch" }), Uu = process.env.KOS_WS_TIMEOU
4856
4856
  },
4857
4857
  text: async () => typeof _ == "string" ? _ : new TextDecoder().decode(_),
4858
4858
  arrayBuffer: async () => _ instanceof ArrayBuffer ? _ : new TextEncoder().encode(_).buffer,
4859
- blob: async () => _ instanceof ArrayBuffer ? Lu(_, k) : new Blob([_], { type: k }),
4859
+ blob: async () => _ instanceof ArrayBuffer ? Lu(_, F) : new Blob([_], { type: F }),
4860
4860
  formData: async () => {
4861
4861
  const U = new FormData();
4862
- if (k === "multipart/form-data" && typeof _ == "string")
4862
+ if (F === "multipart/form-data" && typeof _ == "string")
4863
4863
  try {
4864
4864
  const J = JSON.parse(_);
4865
4865
  J.fields && Object.entries(J.fields).forEach(([Ae, $e]) => {
@@ -4872,7 +4872,7 @@ const us = p.createLogger({ name: "kos-fetch" }), Uu = process.env.KOS_WS_TIMEOU
4872
4872
  }
4873
4873
  return U;
4874
4874
  },
4875
- body: e != null && e.stream ? ku(async (U) => {
4875
+ body: e != null && e.stream ? Fu(async (U) => {
4876
4876
  if (_ instanceof ArrayBuffer)
4877
4877
  U.enqueue(new Uint8Array(_));
4878
4878
  else {
@@ -4904,7 +4904,7 @@ if (process.env.KOS_MOCK_FETCH === "true") {
4904
4904
  const t = process.env.KOS_PORT || "9999";
4905
4905
  Ie = fetch, de = `http://localhost:${t}`;
4906
4906
  }
4907
- const Ku = p.createLogger({
4907
+ const Ku = g.createLogger({
4908
4908
  name: "kos-model-visitor",
4909
4909
  group: "kos-ui-core"
4910
4910
  });
@@ -4954,7 +4954,7 @@ class Gb {
4954
4954
  }));
4955
4955
  }
4956
4956
  }
4957
- const zu = () => ({ isMock: !1, URL: de }), Gu = p.createLogger({ name: "kos-service-request" }), Vu = "errUnknown";
4957
+ const zu = () => ({ isMock: !1, URL: de }), Gu = g.createLogger({ name: "kos-service-request" }), Vu = "errUnknown";
4958
4958
  async function hs(t, e, s, r, o) {
4959
4959
  const n = r != null && r.path ? Object.keys(r.path).reduce(
4960
4960
  (h, f) => String(h).replace(`{${f}}`, r == null ? void 0 : r.path[f]),
@@ -5110,12 +5110,12 @@ const ze = (t) => {
5110
5110
  destinationAddress: e
5111
5111
  }
5112
5112
  });
5113
- }, h), g = () => {
5113
+ }, h), p = () => {
5114
5114
  window.clearInterval(f), window.clearInterval(u), c();
5115
5115
  }, y = () => {
5116
- g(), s && s(), i.signal.removeEventListener("abort", y);
5116
+ p(), s && s(), i.signal.removeEventListener("abort", y);
5117
5117
  };
5118
- return i.signal.addEventListener("abort", y), { cleanUpHeartbeat: g };
5118
+ return i.signal.addEventListener("abort", y), { cleanUpHeartbeat: p };
5119
5119
  }, Zu = (...t) => (e) => t.reduce((s, r) => r(s), e), Qu = {
5120
5120
  maxAttempts: 5,
5121
5121
  baseDelayMs: 100,
@@ -5129,14 +5129,14 @@ async function Zb(t, e) {
5129
5129
  try {
5130
5130
  return await t();
5131
5131
  } catch (c) {
5132
- if (p.error(`Attempt ${s} failed: ${c}`), s < o)
5132
+ if (g.error(`Attempt ${s} failed: ${c}`), s < o)
5133
5133
  a = n * Math.pow(i, s), await new Promise((d) => setTimeout(d, a)), s++;
5134
5134
  else
5135
5135
  throw c;
5136
5136
  }
5137
5137
  throw new Error("All attempts failed");
5138
5138
  }
5139
- const Ju = p.createLogger({ name: "kos-service-request" }), ue = (t) => ({ isMock: !1, URL: de }), Xu = (t, e, s) => async ({
5139
+ const Ju = g.createLogger({ name: "kos-service-request" }), ue = (t) => ({ isMock: !1, URL: de }), Xu = (t, e, s) => async ({
5140
5140
  id: r,
5141
5141
  tracker: o,
5142
5142
  urlOverride: n,
@@ -5218,19 +5218,19 @@ const Ju = p.createLogger({ name: "kos-service-request" }), ue = (t) => ({ isMoc
5218
5218
  });
5219
5219
  const f = r || e;
5220
5220
  Ju.debug(`resolvedUrl: ${f}`);
5221
- const g = await s(f, h);
5222
- if (!g.ok) {
5221
+ const p = await s(f, h);
5222
+ if (!p.ok) {
5223
5223
  let b;
5224
5224
  try {
5225
- b = await g.json();
5225
+ b = await p.json();
5226
5226
  } catch {
5227
5227
  }
5228
5228
  throw new pe(
5229
- `There was a problem retrieving the model; returned status ${g.status}`,
5229
+ `There was a problem retrieving the model; returned status ${p.status}`,
5230
5230
  b
5231
5231
  );
5232
5232
  }
5233
- return await g.json();
5233
+ return await p.json();
5234
5234
  }, sh = (t, e, s) => async ({
5235
5235
  urlOverride: r,
5236
5236
  id: o,
@@ -5252,19 +5252,19 @@ const Ju = p.createLogger({ name: "kos-service-request" }), ue = (t) => ({ isMoc
5252
5252
  bridge: c,
5253
5253
  destinationAddress: u
5254
5254
  });
5255
- const f = r || `${e}/${o}`, g = await s(f, h);
5256
- if (!g.ok) {
5255
+ const f = r || `${e}/${o}`, p = await s(f, h);
5256
+ if (!p.ok) {
5257
5257
  let b;
5258
5258
  try {
5259
- b = await g.json();
5259
+ b = await p.json();
5260
5260
  } catch {
5261
5261
  }
5262
5262
  throw new pe(
5263
- `There was a problem retrieving the model; returned status ${g.status}`,
5263
+ `There was a problem retrieving the model; returned status ${p.status}`,
5264
5264
  b
5265
5265
  );
5266
5266
  }
5267
- return await g.json();
5267
+ return await p.json();
5268
5268
  };
5269
5269
  class pe extends Error {
5270
5270
  constructor(s, r) {
@@ -5296,19 +5296,19 @@ const ln = (t, e, s) => async ({
5296
5296
  bridge: d,
5297
5297
  destinationAddress: h
5298
5298
  });
5299
- const g = await s(o || e, f);
5300
- if (!g.ok) {
5299
+ const p = await s(o || e, f);
5300
+ if (!p.ok) {
5301
5301
  let b;
5302
5302
  try {
5303
- b = await g.json();
5303
+ b = await p.json();
5304
5304
  } catch {
5305
5305
  }
5306
5306
  throw new pe(
5307
- `There was a problem sending the POST data; returned status ${g.status}`,
5307
+ `There was a problem sending the POST data; returned status ${p.status}`,
5308
5308
  b
5309
5309
  );
5310
5310
  }
5311
- return await g.json();
5311
+ return await p.json();
5312
5312
  }, dn = (t = "POST", e, s, r) => async ({
5313
5313
  // Reqeust should be Request = unknown...
5314
5314
  model: o,
@@ -5321,10 +5321,10 @@ const ln = (t, e, s) => async ({
5321
5321
  timeout: h,
5322
5322
  destinationAddress: f
5323
5323
  }) => {
5324
- const g = {
5324
+ const p = {
5325
5325
  method: t
5326
5326
  };
5327
- o && (g.body = JSON.stringify(o)), e && (g.destinationAddress = e), bt(g, {
5327
+ o && (p.body = JSON.stringify(o)), e && (p.destinationAddress = e), bt(p, {
5328
5328
  timeout: h,
5329
5329
  ordered: a,
5330
5330
  studio: c,
@@ -5332,7 +5332,7 @@ const ln = (t, e, s) => async ({
5332
5332
  bridge: u,
5333
5333
  destinationAddress: f
5334
5334
  });
5335
- const y = await r(i || `${s}/${n}`, g);
5335
+ const y = await r(i || `${s}/${n}`, p);
5336
5336
  if (!y.ok) {
5337
5337
  let w;
5338
5338
  try {
@@ -5610,7 +5610,7 @@ class Pi {
5610
5610
  }), Object.keys(s).forEach((o) => {
5611
5611
  const n = s[o], i = this.data[o] || [];
5612
5612
  if (ih(n, i))
5613
- p.debug(`KosContainerIndex - Index ${o} is the same`);
5613
+ g.debug(`KosContainerIndex - Index ${o} is the same`);
5614
5614
  else {
5615
5615
  this.data[o] = n;
5616
5616
  const a = e.get(o) || /* @__PURE__ */ new Set();
@@ -5655,8 +5655,8 @@ function ah(t, e, s = []) {
5655
5655
  )
5656
5656
  );
5657
5657
  }
5658
- const _t = p.createLogger({ name: "kos-container-model" });
5659
- class xe {
5658
+ const _t = g.createLogger({ name: "kos-container-model" });
5659
+ class Re {
5660
5660
  constructor(e) {
5661
5661
  l(this, "_data");
5662
5662
  l(this, "_sortKey");
@@ -5728,13 +5728,13 @@ class xe {
5728
5728
  const r = this._disposerMap.get(e.id);
5729
5729
  r && (r(), this._disposerMap.delete(e.id));
5730
5730
  const o = Object.entries(this._optionsMap || {}), n = Object.values(this._optionsMap || {}), i = new Map(o.map(([u, h]) => [h, u])), a = (u) => {
5731
- var f, g;
5731
+ var f, p;
5732
5732
  n.includes(u.name) && ((f = this.index.get(i.get(u.name))) == null || f.refresh());
5733
5733
  const h = o.filter(
5734
5734
  ([, y]) => typeof y == "function"
5735
5735
  );
5736
5736
  for (const [y] of h)
5737
- (g = this.index.get(y)) == null || g.refresh();
5737
+ (p = this.index.get(y)) == null || p.refresh();
5738
5738
  }, c = ah(
5739
5739
  e,
5740
5740
  a,
@@ -5804,8 +5804,8 @@ class xe {
5804
5804
  };
5805
5805
  }
5806
5806
  }
5807
- const Rr = p.createLogger({ name: "kos-data-container" });
5808
- class xi {
5807
+ const xr = g.createLogger({ name: "kos-data-container" });
5808
+ class Ri {
5809
5809
  constructor(e) {
5810
5810
  l(this, "_data");
5811
5811
  l(this, "_sortKey");
@@ -5888,20 +5888,20 @@ class xi {
5888
5888
  return this._data.get(e);
5889
5889
  }
5890
5890
  getIndexKeys(e) {
5891
- return this.index.has(e) ? this.index.get(e).keys ?? [] : (Rr.info(
5891
+ return this.index.has(e) ? this.index.get(e).keys ?? [] : (xr.info(
5892
5892
  `index ${e} not found in ${Array.from(this.index.keys())}`
5893
5893
  ), []);
5894
5894
  }
5895
5895
  getIndexByKey(e, s) {
5896
5896
  if (this.index.has(e)) {
5897
5897
  const r = this.index.get(e);
5898
- return r.index.has(s) ? r.getByKey(s) : (Rr.info(
5898
+ return r.index.has(s) ? r.getByKey(s) : (xr.info(
5899
5899
  `key ${s} not found in ${e} index: ${Array.from(
5900
5900
  r.index.keys()
5901
5901
  )}`
5902
5902
  ), []);
5903
5903
  } else
5904
- return Rr.info(
5904
+ return xr.info(
5905
5905
  `index ${e} not found in ${Array.from(this.index.keys())}`
5906
5906
  ), [];
5907
5907
  }
@@ -6115,10 +6115,10 @@ class lh {
6115
6115
  }, {}) : {};
6116
6116
  }
6117
6117
  }
6118
- const Ri = p.createLogger({ name: "intent-service" }), rw = (t) => {
6118
+ const xi = g.createLogger({ name: "intent-service" }), rw = (t) => {
6119
6119
  fo(`/kos/intent/${t.type}`) ? B(`/kos/intent/${t.type}`, t.options, {
6120
6120
  "kos.intent.type": t.type
6121
- }) : Ri.info(`No subscribers for intent ${t.type}. Intent not sent.`);
6121
+ }) : xi.info(`No subscribers for intent ${t.type}. Intent not sent.`);
6122
6122
  }, ow = async (t) => new Promise((e) => {
6123
6123
  const { type: s, options: r } = t;
6124
6124
  if (fo(`/kos/intent/${t.type}`)) {
@@ -6135,8 +6135,8 @@ const Ri = p.createLogger({ name: "intent-service" }), rw = (t) => {
6135
6135
  sync: o
6136
6136
  });
6137
6137
  } else
6138
- Ri.info(`No subscribers for intent ${t.type}. Intent not sent.`), e([null, { body: void 0, payload: void 0 }]);
6139
- }), Oe = p.createLogger({ name: "app-startup-service" });
6138
+ xi.info(`No subscribers for intent ${t.type}. Intent not sent.`), e([null, { body: void 0, payload: void 0 }]);
6139
+ }), Oe = g.createLogger({ name: "app-startup-service" });
6140
6140
  async function dh(t, e = {}) {
6141
6141
  const {
6142
6142
  timeout: s = 3e4,
@@ -6212,18 +6212,18 @@ async function aw() {
6212
6212
  return Oe.error("Failed to fetch started apps:", t), [];
6213
6213
  }
6214
6214
  }
6215
- const un = Yt, Ai = Nn, se = V, Y = Wt, uh = qt, Li = ee, Fi = "Not Assigned", cw = "kos.trouble.added", lw = "kos.trouble.removed";
6215
+ const un = Yt, Ai = Nn, se = V, Y = Wt, uh = qt, Li = ee, ki = "Not Assigned", cw = "kos.trouble.added", lw = "kos.trouble.removed";
6216
6216
  var Me = /* @__PURE__ */ ((t) => (t.TroubleRank = "kos.trouble.rank.mapper", t.TroubleColor = "kos.trouble.color.mapper", t.TroubleRole = "kos.trouble.role.mapper", t))(Me || {}), Cs = /* @__PURE__ */ ((t) => (t.TIME_CHANGE = "/kos/internal/time/time", t.DAY_CHANGE = "/kos/internal/time/day", t.TIMEZONE_CHANGE = "/kos/internal/time/timezone", t))(Cs || {});
6217
- const ki = p.createLogger({
6217
+ const Fi = g.createLogger({
6218
6218
  name: "config-bean-service",
6219
6219
  group: "Services"
6220
6220
  }), vo = de, hh = (t) => (t == null ? void 0 : t.decimals) !== void 0, { postModel: fh, getOne: gh } = ae.build({
6221
6221
  destinationAddress: "",
6222
6222
  basePath: `${vo}/kos/config/`
6223
- }), ph = async (t, e, s = "/api/kos/config") => (ki.debug(`sending modify request for ConfigBean: ${t}`), fh({
6223
+ }), ph = async (t, e, s = "/api/kos/config") => (Fi.debug(`sending modify request for ConfigBean: ${t}`), fh({
6224
6224
  model: e,
6225
6225
  urlOverride: `${vo}${s}/${t}`
6226
- })), mh = async (t, e = "/api/kos/config") => (ki.debug(`sending get request for ConfigBean: ${t}`), await gh({
6226
+ })), mh = async (t, e = "/api/kos/config") => (Fi.debug(`sending get request for ConfigBean: ${t}`), await gh({
6227
6227
  urlOverride: `${vo}${e}/details/${t}/15`
6228
6228
  })), Ni = (t) => t.toLowerCase() === "true" || t.toLowerCase() === "false", Mo = (t) => {
6229
6229
  try {
@@ -6274,8 +6274,8 @@ function Eh(t, e) {
6274
6274
  if (new RegExp(`^${s}$`).test(e))
6275
6275
  return s;
6276
6276
  }
6277
- const _o = "config-bean-model", fs = p.getLogger(_o), Th = yt("path");
6278
- let Fs = class {
6277
+ const _o = "config-bean-model", fs = g.getLogger(_o), Th = yt("path");
6278
+ let ks = class {
6279
6279
  /**
6280
6280
  * @category Constructor
6281
6281
  *
@@ -6363,21 +6363,21 @@ let Fs = class {
6363
6363
  }
6364
6364
  };
6365
6365
  ji([
6366
- F({
6366
+ k({
6367
6367
  topic: `/kos/config/${Th}`,
6368
6368
  websocket: !0
6369
6369
  })
6370
- ], Fs.prototype, "handleConfigBeanUpdated", 1);
6371
- Fs = ji([
6370
+ ], ks.prototype, "handleConfigBeanUpdated", 1);
6371
+ ks = ji([
6372
6372
  P(_o)
6373
- ], Fs);
6374
- const ks = new Te({
6375
- class: Fs,
6373
+ ], ks);
6374
+ const Fs = new Te({
6375
+ class: ks,
6376
6376
  type: _o
6377
6377
  }), Eo = ({ path: t, lazy: e, serviceBasePath: s }) => (r, o) => {
6378
6378
  r[L] = r[L] || {}, r[L][o] = {
6379
- modelType: ks.type,
6380
- id: `${ks.type}-${t}`,
6379
+ modelType: Fs.type,
6380
+ id: `${Fs.type}-${t}`,
6381
6381
  options: {
6382
6382
  path: t,
6383
6383
  serviceBasePath: s
@@ -6491,7 +6491,7 @@ var Ch = Object.defineProperty, Ph = Object.getOwnPropertyDescriptor, To = (t, e
6491
6491
  (i = t[n]) && (o = (r ? i(e, s, o) : i(o)) || o);
6492
6492
  return r && o && Ch(e, s, o), o;
6493
6493
  };
6494
- const Ps = "region-info-model", Et = p.createLogger({ name: "region-info-model" });
6494
+ const Ps = "region-info-model", Et = g.createLogger({ name: "region-info-model" });
6495
6495
  let Nt = class {
6496
6496
  constructor(t) {
6497
6497
  l(this, "id");
@@ -6905,7 +6905,7 @@ function gn({
6905
6905
  o.push(n.toFixed(r)), n += s;
6906
6906
  return o[o.length - 1] !== e.toString() && o.push(e.toString()), o;
6907
6907
  }
6908
- const Je = (t, e) => (s) => !t || !e ? s : Mo(s) ? Gi(Number(s), t, e) : s, xh = (t, e, s, r) => {
6908
+ const Je = (t, e) => (s) => !t || !e ? s : Mo(s) ? Gi(Number(s), t, e) : s, Rh = (t, e, s, r) => {
6909
6909
  if ((t == null ? void 0 : t.type) === "enum" || !(t != null && t.options))
6910
6910
  return [];
6911
6911
  if (t.options.type === "rangeCount")
@@ -6932,7 +6932,7 @@ const Je = (t, e) => (s) => !t || !e ? s : Mo(s) ? Gi(Number(s), t, e) : s, xh =
6932
6932
  }
6933
6933
  }
6934
6934
  return [];
6935
- }, Rh = (t, e) => {
6935
+ }, xh = (t, e) => {
6936
6936
  if (!((t == null ? void 0 : t.type) === "enum" || !(t != null && t.options)))
6937
6937
  return t.options.type === "unitSystemRangeCount" && e ? {
6938
6938
  type: "rangeCount",
@@ -6953,10 +6953,10 @@ var Ah = Object.defineProperty, Lh = Object.getOwnPropertyDescriptor, Io = (t, e
6953
6953
  (i = t[n]) && (o = (r ? i(e, s, o) : i(o)) || o);
6954
6954
  return r && o && Ah(e, s, o), o;
6955
6955
  };
6956
- function Fh(t) {
6956
+ function kh(t) {
6957
6957
  return (t == null ? void 0 : t.type) === "enum";
6958
6958
  }
6959
- function kh(t) {
6959
+ function Fh(t) {
6960
6960
  switch (t) {
6961
6961
  case "s":
6962
6962
  return "second";
@@ -6986,7 +6986,7 @@ function Nh(t, e) {
6986
6986
  const r = new Date(s.getTime() + t * 1e3);
6987
6987
  return He(r, e);
6988
6988
  }
6989
- const xs = "config-bean-prop-model", Xe = p.createLogger({ name: "config-bean-prop-model" }), Uh = yt("path"), jh = yt("serviceBasePath");
6989
+ const Rs = "config-bean-prop-model", Xe = g.createLogger({ name: "config-bean-prop-model" }), Uh = yt("path"), jh = yt("serviceBasePath");
6990
6990
  let Ut = class {
6991
6991
  constructor(t, e) {
6992
6992
  l(this, "id");
@@ -7039,11 +7039,11 @@ let Ut = class {
7039
7039
  }
7040
7040
  get schemaFormat() {
7041
7041
  const t = this.bean.getSchemaForProperty(this.attribute);
7042
- return t != null && t.format ? kh(t.format) : "";
7042
+ return t != null && t.format ? Fh(t.format) : "";
7043
7043
  }
7044
7044
  get options() {
7045
7045
  var i;
7046
- const t = this.regionInfo.defaultUnitSystem, e = this.getConverter(), s = ((i = e == null ? void 0 : e.to) == null ? void 0 : i.system) ?? t, r = this.bean.getSchemaForProperty(this.attribute), o = Fh(r) ? r.values : xh(r, s, e == null ? void 0 : e.from, e == null ? void 0 : e.to), n = o.length > 0 ? o.map((a) => ({ label: a, value: a })) : [];
7046
+ const t = this.regionInfo.defaultUnitSystem, e = this.getConverter(), s = ((i = e == null ? void 0 : e.to) == null ? void 0 : i.system) ?? t, r = this.bean.getSchemaForProperty(this.attribute), o = kh(r) ? r.values : Rh(r, s, e == null ? void 0 : e.from, e == null ? void 0 : e.to), n = o.length > 0 ? o.map((a) => ({ label: a, value: a })) : [];
7047
7047
  return this.optionsExpander ? typeof this.optionsExpander == "function" ? this.optionsExpander(s, o) : this.optionsExpander : n;
7048
7048
  }
7049
7049
  convertUnit(t, e, s) {
@@ -7142,7 +7142,7 @@ let Ut = class {
7142
7142
  get displayOptions() {
7143
7143
  var o;
7144
7144
  const t = this.bean.getSchemaForProperty(this.attribute), e = this.regionInfo.defaultUnitSystem, s = this.getConverter(), r = ((o = s == null ? void 0 : s.to) == null ? void 0 : o.system) ?? e;
7145
- return Rh(t, r);
7145
+ return xh(t, r);
7146
7146
  }
7147
7147
  getMeasureFromFormat() {
7148
7148
  const t = this.schemaFormat;
@@ -7199,22 +7199,22 @@ let Ut = class {
7199
7199
  return o;
7200
7200
  }
7201
7201
  getConverter() {
7202
- var r, o, n, i, a, c, d, u, h, f, g;
7202
+ var r, o, n, i, a, c, d, u, h, f, p;
7203
7203
  const { unit: t, measure: e } = this.getConverterFromFormat(), s = t === "drt" ? "second" : t;
7204
7204
  if (this.converter) {
7205
- const y = (r = this.converter) == null ? void 0 : r.measure, b = (n = (o = this.converter) == null ? void 0 : o.to) == null ? void 0 : n.measure, w = (a = (i = this.converter) == null ? void 0 : i.from) == null ? void 0 : a.measure, M = y || b || w || e, k = ((d = (c = this.converter) == null ? void 0 : c.to) == null ? void 0 : d.unit) || this.regionInfo.getDefaultUnitForMeasure(
7205
+ const y = (r = this.converter) == null ? void 0 : r.measure, b = (n = (o = this.converter) == null ? void 0 : o.to) == null ? void 0 : n.measure, w = (a = (i = this.converter) == null ? void 0 : i.from) == null ? void 0 : a.measure, M = y || b || w || e, F = ((d = (c = this.converter) == null ? void 0 : c.to) == null ? void 0 : d.unit) || this.regionInfo.getDefaultUnitForMeasure(
7206
7206
  M,
7207
7207
  ((h = (u = this.converter) == null ? void 0 : u.to) == null ? void 0 : h.system) ?? this.regionInfo.defaultUnitSystem
7208
- ), te = ((g = (f = this.converter) == null ? void 0 : f.to) == null ? void 0 : g.system) ?? this.regionInfo.getUnitSystem(k), x = this.schemaFormat === "drt" ? "second" : this.schemaFormat || s;
7208
+ ), te = ((p = (f = this.converter) == null ? void 0 : f.to) == null ? void 0 : p.system) ?? this.regionInfo.getUnitSystem(F), R = this.schemaFormat === "drt" ? "second" : this.schemaFormat || s;
7209
7209
  return {
7210
7210
  ...this.converter,
7211
7211
  from: {
7212
- unit: x,
7212
+ unit: R,
7213
7213
  ...this.converter.from
7214
7214
  },
7215
7215
  to: {
7216
7216
  ...this.converter.to,
7217
- unit: k,
7217
+ unit: F,
7218
7218
  system: te
7219
7219
  },
7220
7220
  measure: M
@@ -7251,18 +7251,18 @@ Io([
7251
7251
  Eo({ path: Uh, serviceBasePath: jh })
7252
7252
  ], Ut.prototype, "bean", 2);
7253
7253
  Ut = Io([
7254
- P(xs)
7254
+ P(Rs)
7255
7255
  ], Ut);
7256
7256
  const wt = {
7257
7257
  registration: {
7258
- [xs]: {
7258
+ [Rs]: {
7259
7259
  class: Ut,
7260
7260
  singleton: !1
7261
7261
  }
7262
7262
  },
7263
- type: xs,
7263
+ type: Rs,
7264
7264
  factory: ie.Factory.create(
7265
- xs
7265
+ Rs
7266
7266
  )
7267
7267
  };
7268
7268
  function fw(t) {
@@ -7372,13 +7372,13 @@ class $o {
7372
7372
  try {
7373
7373
  await this._future.cancelFuture();
7374
7374
  } catch (e) {
7375
- throw p.error(e), e;
7375
+ throw g.error(e), e;
7376
7376
  }
7377
7377
  }
7378
7378
  }
7379
7379
  const Bh = "future-model", ts = es(
7380
7380
  Bh
7381
- ), fr = p.createLogger({ name: "future-service", group: "Services" }), { isMock: Hh, URL: ss } = ue();
7381
+ ), fr = g.createLogger({ name: "future-service", group: "Services" }), { isMock: Hh, URL: ss } = ue();
7382
7382
  var Ge = /* @__PURE__ */ ((t) => (t.Success = "SUCCESS", t.Fail = "FAIL", t.Aborted = "ABORT", t.Canceled = "CANCEL", t))(Ge || {});
7383
7383
  const { getAll: Kh, modifyModel: zh, addModel: Gh, deleteModel: Vh, postModel: Yh } = ae.build({
7384
7384
  destinationAddress: "",
@@ -7409,7 +7409,7 @@ const { getAll: Kh, modifyModel: zh, addModel: Gh, deleteModel: Vh, postModel: Y
7409
7409
  note: t.note,
7410
7410
  tracker: t.tracker
7411
7411
  }), Yi = (t, e) => {
7412
- p.debug(`future dto ${t.id} end state ${t.endState}`), p.debug(`future model ${e.id} end state ${e.endState}`), e.endState ? p.debug(`future model ${e.id} is already complete`) : (p.debug(`updating future model ${e.id}`), V(() => {
7412
+ g.debug(`future dto ${t.id} end state ${t.endState}`), g.debug(`future model ${e.id} end state ${e.endState}`), e.endState ? g.debug(`future model ${e.id} is already complete`) : (g.debug(`updating future model ${e.id}`), V(() => {
7413
7413
  const s = Vi(t);
7414
7414
  se(() => {
7415
7415
  Object.keys(s).forEach((r) => {
@@ -7426,7 +7426,7 @@ var Jh = Object.defineProperty, Xh = Object.getOwnPropertyDescriptor, Wi = (t, e
7426
7426
  (i = t[n]) && (o = (r ? i(e, s, o) : i(o)) || o);
7427
7427
  return r && o && Jh(e, s, o), o;
7428
7428
  };
7429
- const Ar = p.getLogger(ts.type);
7429
+ const Ar = g.getLogger(ts.type);
7430
7430
  let Us = class {
7431
7431
  /**
7432
7432
  * @category Constructor
@@ -7476,7 +7476,7 @@ let Us = class {
7476
7476
  */
7477
7477
  async cancelFuture() {
7478
7478
  const t = this.namespace === "studio" ? "/api/future" : `/api/${this.namespace}/future`;
7479
- await un(() => this.futureId !== Fi), await this._cancelFuture(this.futureId, t);
7479
+ await un(() => this.futureId !== ki), await this._cancelFuture(this.futureId, t);
7480
7480
  }
7481
7481
  get status() {
7482
7482
  return this.endState ? this.endState : this.progress > -1 ? "IN_PROGRESS" : "NOT_ACTIVE";
@@ -7510,7 +7510,7 @@ let Us = class {
7510
7510
  }
7511
7511
  };
7512
7512
  Wi([
7513
- F({
7513
+ k({
7514
7514
  topic: `kos.future/${Br}`
7515
7515
  })
7516
7516
  ], Us.prototype, "handleFutureUpdated", 1);
@@ -7600,7 +7600,7 @@ let js = class {
7600
7600
  }
7601
7601
  };
7602
7602
  Zi([
7603
- F({
7603
+ k({
7604
7604
  topic: of
7605
7605
  })
7606
7606
  ], js.prototype, "handleRequest", 1);
@@ -7629,7 +7629,7 @@ var df = Object.defineProperty, uf = Object.getOwnPropertyDescriptor, Oo = (t, e
7629
7629
  (i = t[n]) && (o = (r ? i(e, s, o) : i(o)) || o);
7630
7630
  return r && o && df(e, s, o), o;
7631
7631
  };
7632
- const gs = p.getLogger(Ve.type);
7632
+ const gs = g.getLogger(Ve.type);
7633
7633
  let jt = class {
7634
7634
  constructor(t, e, s) {
7635
7635
  l(this, "id");
@@ -7640,7 +7640,7 @@ let jt = class {
7640
7640
  l(this, "createModel");
7641
7641
  l(this, "deleteModel");
7642
7642
  const { deleteFuture: r = qh, addFuture: o = Wh } = e;
7643
- this.logger = s.logger, this._deleteFuture = r, this._addFuture = o, this.id = t, this._futures = new xe(), this.createModel = this.createFuture, this.deleteModel = this.removeFuture;
7643
+ this.logger = s.logger, this._deleteFuture = r, this._addFuture = o, this.id = t, this._futures = new Re(), this.createModel = this.createFuture, this.deleteModel = this.removeFuture;
7644
7644
  }
7645
7645
  /**
7646
7646
  * @category Computed
@@ -7777,7 +7777,7 @@ Oo([
7777
7777
  Ee
7778
7778
  ], jt.prototype, "_futures", 2);
7779
7779
  Oo([
7780
- F({
7780
+ k({
7781
7781
  topic: "kos.future"
7782
7782
  })
7783
7783
  ], jt.prototype, "handleFutureUpdated", 1);
@@ -7786,7 +7786,7 @@ jt = Oo([
7786
7786
  ], jt);
7787
7787
  const hf = jt, { URL: rs } = ue(), { getOne: ff, postModel: gf, deleteModel: ea } = ae.build({
7788
7788
  basePath: `${rs}/api/keyVal`
7789
- }), Vr = p.createLogger({
7789
+ }), Vr = g.createLogger({
7790
7790
  name: "key-value-service",
7791
7791
  group: "Services"
7792
7792
  }), ta = async (t, e) => {
@@ -7860,10 +7860,10 @@ let Bt = class {
7860
7860
  }
7861
7861
  };
7862
7862
  So([
7863
- F({ topic: "/keyVal/set" })
7863
+ k({ topic: "/keyVal/set" })
7864
7864
  ], Bt.prototype, "handleStateUpdate", 1);
7865
7865
  So([
7866
- F({ topic: "/keyVal/remove" })
7866
+ k({ topic: "/keyVal/remove" })
7867
7867
  ], Bt.prototype, "handleStateDelete", 1);
7868
7868
  Bt = So([
7869
7869
  P(oa)
@@ -7871,13 +7871,13 @@ Bt = So([
7871
7871
  const na = new Te({
7872
7872
  class: Bt,
7873
7873
  type: oa
7874
- }), Re = Si(), bf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7874
+ }), xe = Si(), bf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7875
7875
  __proto__: null,
7876
- default: Re
7877
- }, Symbol.toStringTag, { value: "Module" })), wf = p.createLogger({
7876
+ default: xe
7877
+ }, Symbol.toStringTag, { value: "Module" })), wf = g.createLogger({
7878
7878
  name: "kos-log-manager-service",
7879
7879
  group: "Services"
7880
- }), vf = "/api/kos/logs/overrides", ia = async () => (wf.debug("sending GET for kos-log-manager"), await Re.get(vf)), bw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7880
+ }), vf = "/api/kos/logs/overrides", ia = async () => (wf.debug("sending GET for kos-log-manager"), await xe.get(vf)), bw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7881
7881
  __proto__: null,
7882
7882
  getLogOverrides: ia
7883
7883
  }, Symbol.toStringTag, { value: "Module" }));
@@ -7911,7 +7911,7 @@ let ht = class {
7911
7911
  l(this, "id");
7912
7912
  l(this, "logger");
7913
7913
  l(this, "_overrides");
7914
- this.id = t, this.logger = s.logger, this._overrides = new xi();
7914
+ this.id = t, this.logger = s.logger, this._overrides = new Ri();
7915
7915
  }
7916
7916
  updateModel(t) {
7917
7917
  }
@@ -7922,7 +7922,7 @@ let ht = class {
7922
7922
  * @private
7923
7923
  */
7924
7924
  resolveLoggers() {
7925
- const t = p.getLoggers(), s = Object.entries(t).map(
7925
+ const t = g.getLoggers(), s = Object.entries(t).map(
7926
7926
  ([r, o]) => ({
7927
7927
  name: r,
7928
7928
  level: If(o.getLevel())
@@ -7948,14 +7948,14 @@ let ht = class {
7948
7948
  Object.values(this.resolveLoggers()).filter(
7949
7949
  (r) => r.name.startsWith(t.name)
7950
7950
  ).forEach((r) => {
7951
- const o = p.getLoggers()[r.name];
7951
+ const o = g.getLoggers()[r.name];
7952
7952
  if (!o) {
7953
7953
  this.logger.debug(`Logger ${r.name} not found`);
7954
7954
  return;
7955
7955
  }
7956
7956
  o.setLevel(t.level);
7957
7957
  });
7958
- const s = p.getLoggers()[t.name];
7958
+ const s = g.getLoggers()[t.name];
7959
7959
  if (!s) {
7960
7960
  this.logger.debug(`Logger ${t.name} not found`);
7961
7961
  return;
@@ -7973,10 +7973,10 @@ let ht = class {
7973
7973
  Object.values(this.resolveLoggers()).filter(
7974
7974
  (r) => r.name.startsWith(t.name)
7975
7975
  ).forEach((r) => {
7976
- const o = p.getLoggers()[r.name];
7976
+ const o = g.getLoggers()[r.name];
7977
7977
  o || this.logger.debug(`Logger ${r.name} not found`), o == null || o.resetLevel();
7978
7978
  });
7979
- const s = p.getLoggers()[t.name];
7979
+ const s = g.getLoggers()[t.name];
7980
7980
  s || this.logger.debug(`Logger ${t.name} not found`), s == null || s.resetLevel(), globalThis.kos.logOverrides = this._overrides.data;
7981
7981
  }
7982
7982
  handleOverrideAdded(t, e) {
@@ -8025,14 +8025,14 @@ gr([
8025
8025
  ed("/api/kos/ui/loggers")
8026
8026
  ], ht.prototype, "getAllLoggers", 1);
8027
8027
  gr([
8028
- F({
8028
+ k({
8029
8029
  topic: Ef,
8030
8030
  websocket: !0,
8031
8031
  wildcardName: "nodeType"
8032
8032
  })
8033
8033
  ], ht.prototype, "handleOverrideAdded", 1);
8034
8034
  gr([
8035
- F({
8035
+ k({
8036
8036
  topic: Tf,
8037
8037
  websocket: !0,
8038
8038
  wildcardName: "nodeType"
@@ -8047,7 +8047,7 @@ const $f = new Pe({
8047
8047
  }), { URL: os } = ue(), { postModel: Do, getOne: Of } = ae.build({
8048
8048
  basePath: `${os}/api/kos-time`
8049
8049
  });
8050
- p.createLogger({
8050
+ g.createLogger({
8051
8051
  name: "kos-time-service",
8052
8052
  group: "Services"
8053
8053
  });
@@ -8094,7 +8094,7 @@ var Sf = Object.defineProperty, Df = Object.getOwnPropertyDescriptor, pr = (t, e
8094
8094
  (i = t[n]) && (o = (r ? i(e, s, o) : i(o)) || o);
8095
8095
  return r && o && Sf(e, s, o), o;
8096
8096
  };
8097
- const Tt = "kos-time-model", Cf = "/kos/time/time", Pf = "/kos/time/day", xf = "/kos/time/timezone";
8097
+ const Tt = "kos-time-model", Cf = "/kos/time/time", Pf = "/kos/time/day", Rf = "/kos/time/timezone";
8098
8098
  let ft = class {
8099
8099
  constructor(t, e, s) {
8100
8100
  l(this, "id");
@@ -8150,13 +8150,13 @@ let ft = class {
8150
8150
  }
8151
8151
  };
8152
8152
  pr([
8153
- F({ topic: Cf, websocket: !0 })
8153
+ k({ topic: Cf, websocket: !0 })
8154
8154
  ], ft.prototype, "handleTimeChange", 1);
8155
8155
  pr([
8156
- F({ topic: Pf, websocket: !0 })
8156
+ k({ topic: Pf, websocket: !0 })
8157
8157
  ], ft.prototype, "handleDayChange", 1);
8158
8158
  pr([
8159
- F({ topic: xf, websocket: !0 })
8159
+ k({ topic: Rf, websocket: !0 })
8160
8160
  ], ft.prototype, "handleTimeZoneChange", 1);
8161
8161
  ft = pr([
8162
8162
  P(Tt)
@@ -8172,10 +8172,10 @@ const Yr = {
8172
8172
  predicate: be(Tt),
8173
8173
  factory: ie.Singleton.create(Tt)
8174
8174
  };
8175
- var Rf = Object.defineProperty, Af = Object.getOwnPropertyDescriptor, ha = (t, e, s, r) => {
8175
+ var xf = Object.defineProperty, Af = Object.getOwnPropertyDescriptor, ha = (t, e, s, r) => {
8176
8176
  for (var o = r > 1 ? void 0 : r ? Af(e, s) : e, n = t.length - 1, i; n >= 0; n--)
8177
8177
  (i = t[n]) && (o = (r ? i(e, s, o) : i(o)) || o);
8178
- return r && o && Rf(e, s, o), o;
8178
+ return r && o && xf(e, s, o), o;
8179
8179
  };
8180
8180
  const fa = "log-block-container-model";
8181
8181
  let Bs = class {
@@ -8183,7 +8183,7 @@ let Bs = class {
8183
8183
  l(this, "id");
8184
8184
  l(this, "logger");
8185
8185
  l(this, "_models");
8186
- this.id = t, this.logger = s.logger, this._models = new xe({
8186
+ this.id = t, this.logger = s.logger, this._models = new Re({
8187
8187
  parentId: t,
8188
8188
  sortKey: "blockNum"
8189
8189
  });
@@ -8217,15 +8217,15 @@ ha([
8217
8217
  Bs = ha([
8218
8218
  P(fa)
8219
8219
  ], Bs);
8220
- const Lf = p.createLogger({
8220
+ const Lf = g.createLogger({
8221
8221
  name: "log-stream-container-service",
8222
8222
  group: "Services"
8223
8223
  }), ga = () => {
8224
8224
  var r;
8225
8225
  const t = ye(), s = (t == null ? void 0 : t.connId) || ((r = window == null ? void 0 : window.kosBridge) == null ? void 0 : r.call(window, "connId"));
8226
- return p.error(`getKosConnectionId: ${s}`), s;
8227
- }, vt = ga(), Ff = "/api/kos/logs/node/{nodeId}/streams", pa = async () => (Lf.debug("sending GET for log-stream-container"), await Re.get(
8228
- Ff,
8226
+ return g.error(`getKosConnectionId: ${s}`), s;
8227
+ }, vt = ga(), kf = "/api/kos/logs/node/{nodeId}/streams", pa = async () => (Lf.debug("sending GET for log-stream-container"), await xe.get(
8228
+ kf,
8229
8229
  {
8230
8230
  path: {
8231
8231
  nodeId: "primary"
@@ -8235,7 +8235,7 @@ const Lf = p.createLogger({
8235
8235
  destinationAddress: vt
8236
8236
  }
8237
8237
  )), ma = async (t, e = "primary") => {
8238
- await Re.post(
8238
+ await xe.post(
8239
8239
  "/api/kos/logs/node/{nodeId}/{stream}/subscribe",
8240
8240
  {
8241
8241
  path: {
@@ -8249,7 +8249,7 @@ const Lf = p.createLogger({
8249
8249
  }
8250
8250
  );
8251
8251
  }, ya = async (t) => {
8252
- await Re.post(
8252
+ await xe.post(
8253
8253
  "/api/kos/logs/node/{nodeId}/{stream}/unsubscribe",
8254
8254
  { path: { nodeId: "primary", stream: t } },
8255
8255
  void 0,
@@ -8257,8 +8257,8 @@ const Lf = p.createLogger({
8257
8257
  destinationAddress: vt
8258
8258
  }
8259
8259
  );
8260
- }, kf = async () => {
8261
- await Re.post(
8260
+ }, Ff = async () => {
8261
+ await xe.post(
8262
8262
  "/api/kos/logs/overrides",
8263
8263
  {},
8264
8264
  {
@@ -8271,7 +8271,7 @@ const Lf = p.createLogger({
8271
8271
  destinationAddress: vt
8272
8272
  }
8273
8273
  );
8274
- }, ba = async (t) => await Re.get(
8274
+ }, ba = async (t) => await xe.get(
8275
8275
  "/api/kos/logs/node/{nodeId}/{stream}/blocks",
8276
8276
  {
8277
8277
  path: {
@@ -8282,7 +8282,7 @@ const Lf = p.createLogger({
8282
8282
  {
8283
8283
  destinationAddress: vt
8284
8284
  }
8285
- ), wa = async (t, e) => await Re.get(
8285
+ ), wa = async (t, e) => await xe.get(
8286
8286
  "/api/kos/logs/node/{nodeId}/{stream}/blocks/{blockId}",
8287
8287
  {
8288
8288
  path: {
@@ -8296,7 +8296,7 @@ const Lf = p.createLogger({
8296
8296
  }
8297
8297
  ), vw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8298
8298
  __proto__: null,
8299
- createOverride: kf,
8299
+ createOverride: Ff,
8300
8300
  getKosConnectionId: ga,
8301
8301
  getLogStreamBlock: wa,
8302
8302
  getLogStreamBlocks: ba,
@@ -8527,7 +8527,7 @@ Ma([
8527
8527
  Ks = Ma([
8528
8528
  P(_a)
8529
8529
  ], Ks);
8530
- const Rs = new Te({
8530
+ const xs = new Te({
8531
8531
  class: Ks,
8532
8532
  type: _a
8533
8533
  });
@@ -8543,7 +8543,7 @@ let De = class {
8543
8543
  l(this, "logger");
8544
8544
  l(this, "selectedStream");
8545
8545
  l(this, "_models");
8546
- this.id = t, this.logger = s.logger, this._models = new xe({ parentId: t }), this.selectedStream = void 0;
8546
+ this.id = t, this.logger = s.logger, this._models = new Re({ parentId: t }), this.selectedStream = void 0;
8547
8547
  }
8548
8548
  getModel(t) {
8549
8549
  return this._models.getModel(t);
@@ -8568,7 +8568,7 @@ let De = class {
8568
8568
  }
8569
8569
  handleStreamAdded(t) {
8570
8570
  this.logger.debug(`Received topic: ${Ta}`);
8571
- const e = t.stream, s = Rs.instance(e).options({
8571
+ const e = t.stream, s = xs.instance(e).options({
8572
8572
  name: e,
8573
8573
  nodeId: "primary"
8574
8574
  }).build();
@@ -8599,7 +8599,7 @@ let De = class {
8599
8599
  this.logger.debug(`initializing log-stream-container container ${this.id}`);
8600
8600
  }
8601
8601
  async subscribeToLogStream(t) {
8602
- const e = Rs.instance(t).options({
8602
+ const e = xs.instance(t).options({
8603
8603
  name: t,
8604
8604
  nodeId: "primary"
8605
8605
  }).build();
@@ -8613,7 +8613,7 @@ let De = class {
8613
8613
  return;
8614
8614
  }
8615
8615
  e && e.forEach((s) => {
8616
- const r = Rs.instance(s).options({
8616
+ const r = xs.instance(s).options({
8617
8617
  name: s,
8618
8618
  nodeId: "primary"
8619
8619
  }).build();
@@ -8625,31 +8625,31 @@ We([
8625
8625
  Ee
8626
8626
  ], De.prototype, "_models", 2);
8627
8627
  We([
8628
- F({
8628
+ k({
8629
8629
  topic: [Ta],
8630
8630
  websocket: !0
8631
8631
  })
8632
8632
  ], De.prototype, "handleStreamAdded", 1);
8633
8633
  We([
8634
- F({
8634
+ k({
8635
8635
  topic: [Gf],
8636
8636
  websocket: !0
8637
8637
  })
8638
8638
  ], De.prototype, "handleAddBlock", 1);
8639
8639
  We([
8640
- F({
8640
+ k({
8641
8641
  topic: [Yf],
8642
8642
  websocket: !0
8643
8643
  })
8644
8644
  ], De.prototype, "handleRemoveBlock", 1);
8645
8645
  We([
8646
- F({
8646
+ k({
8647
8647
  topic: [Vf],
8648
8648
  websocket: !0
8649
8649
  })
8650
8650
  ], De.prototype, "handleUpdateBlock", 1);
8651
8651
  We([
8652
- F({
8652
+ k({
8653
8653
  topic: [qf],
8654
8654
  websocket: !0
8655
8655
  })
@@ -8661,7 +8661,7 @@ const mr = new Pe({
8661
8661
  class: De,
8662
8662
  type: Ea
8663
8663
  });
8664
- mr.addRelatedModel(Rs);
8664
+ mr.addRelatedModel(xs);
8665
8665
  mr.addRelatedModel(Co);
8666
8666
  mr.addRelatedModel(Hs);
8667
8667
  const Wf = (t) => t.rank !== void 0, Zf = (t) => t.visibleRole !== void 0, Qf = (t) => t.color !== void 0, Jf = (t) => {
@@ -8728,7 +8728,7 @@ dr(Wr, {
8728
8728
  };
8729
8729
  const r = s.map((i) => i(e));
8730
8730
  return (await Promise.allSettled(r)).reduce(
8731
- (i, a) => (a.status === "fulfilled" ? i = { ...i, ...a.value } : p.info(`Trouble mapper ${t} failed: ${a.reason}`), i),
8731
+ (i, a) => (a.status === "fulfilled" ? i = { ...i, ...a.value } : g.info(`Trouble mapper ${t} failed: ${a.reason}`), i),
8732
8732
  { ...e.data }
8733
8733
  );
8734
8734
  }
@@ -8743,7 +8743,7 @@ dr(yr, {
8743
8743
  const s = ms.get(t);
8744
8744
  if (!s)
8745
8745
  return [];
8746
- const r = s.map((i) => i(e)), n = (await Promise.allSettled(r)).map((i) => i.status === "fulfilled" ? i.value : (p.info(`Trouble mapper ${t} failed: ${i.reason}`), [])).flat();
8746
+ const r = s.map((i) => i(e)), n = (await Promise.allSettled(r)).map((i) => i.status === "fulfilled" ? i.value : (g.info(`Trouble mapper ${t} failed: ${i.reason}`), [])).flat();
8747
8747
  return Array.from(new Set(n));
8748
8748
  }
8749
8749
  });
@@ -8825,7 +8825,7 @@ let zs = class {
8825
8825
  createTime: u,
8826
8826
  role: h,
8827
8827
  color: f,
8828
- ...g
8828
+ ...p
8829
8829
  }, y) {
8830
8830
  l(this, "id");
8831
8831
  l(this, "logger");
@@ -8844,7 +8844,7 @@ let zs = class {
8844
8844
  l(this, "group");
8845
8845
  l(this, "createTime");
8846
8846
  l(this, "_mapped", {});
8847
- this.id = t, this.logger = y.logger, this.type = c, this._troubleId = o, this._resolvable = !!e, this.ifaces = a, this.rank = i, this.role = h, this.color = f, this.tags = s, this.info = r, this.group = d, this.createTime = u, this.clientData = n, this.data = {}, Object.assign(this.data, g), this.futureHandler = new $o(this);
8847
+ this.id = t, this.logger = y.logger, this.type = c, this._troubleId = o, this._resolvable = !!e, this.ifaces = a, this.rank = i, this.role = h, this.color = f, this.tags = s, this.info = r, this.group = d, this.createTime = u, this.clientData = n, this.data = {}, Object.assign(this.data, p), this.futureHandler = new $o(this);
8848
8848
  }
8849
8849
  // -------------------LIFECYCLE----------------------------
8850
8850
  getTitleWithContext(t) {
@@ -8938,7 +8938,7 @@ var lg = Object.defineProperty, dg = Object.getOwnPropertyDescriptor, br = (t, e
8938
8938
  (i = t[n]) && (o = (r ? i(e, s, o) : i(o)) || o);
8939
8939
  return r && o && lg(e, s, o), o;
8940
8940
  };
8941
- const pn = p.createLogger({ name: "trouble-container-model" });
8941
+ const pn = g.createLogger({ name: "trouble-container-model" });
8942
8942
  function mn(t) {
8943
8943
  return I.propertyMapper.hasMapper(
8944
8944
  Me.TroubleRank
@@ -8971,7 +8971,7 @@ let gt = class {
8971
8971
  constructor(t) {
8972
8972
  l(this, "id");
8973
8973
  l(this, "troubles");
8974
- this.id = t, this.troubles = new xe({
8974
+ this.id = t, this.troubles = new Re({
8975
8975
  indexMap: {
8976
8976
  [ge.INDEX_TROUBLES_BY_IFACE]: rg,
8977
8977
  [ge.INDEX_TROUBLES_BY_TYPE]: "type",
@@ -9023,14 +9023,14 @@ br([
9023
9023
  Ee
9024
9024
  ], gt.prototype, "troubles", 2);
9025
9025
  br([
9026
- F({
9026
+ k({
9027
9027
  topic: "/kos/trouble/remove",
9028
9028
  websocket: !0,
9029
9029
  lifecycle: H.INIT
9030
9030
  })
9031
9031
  ], gt.prototype, "handleTroubleRemoved", 1);
9032
9032
  br([
9033
- F({ topic: "/kos/trouble/add", websocket: !0 })
9033
+ k({ topic: "/kos/trouble/add", websocket: !0 })
9034
9034
  ], gt.prototype, "handleTroubleAdded", 1);
9035
9035
  gt = br([
9036
9036
  P(ug)
@@ -9049,7 +9049,7 @@ const bs = "trouble-container-model", Ht = {
9049
9049
  )
9050
9050
  }, { URL: Da } = ue(), { getAll: hg } = ae.build({
9051
9051
  basePath: `${Da}/api/kos/ota`
9052
- }), wn = p.createLogger({
9052
+ }), wn = g.createLogger({
9053
9053
  name: "ota-service",
9054
9054
  group: "Services"
9055
9055
  }), fg = async () => {
@@ -9106,7 +9106,7 @@ let pt = class {
9106
9106
  constructor(t, e, s) {
9107
9107
  l(this, "id");
9108
9108
  l(this, "logger");
9109
- l(this, "data", new xi());
9109
+ l(this, "data", new Ri());
9110
9110
  l(this, "troubleContainer");
9111
9111
  this.id = t, this.logger = s.logger;
9112
9112
  }
@@ -9186,13 +9186,13 @@ wr([
9186
9186
  Xt({ modelType: Ht.type })
9187
9187
  ], pt.prototype, "troubleContainer", 2);
9188
9188
  wr([
9189
- F({
9189
+ k({
9190
9190
  topic: "/kos/ota/artifacts/all",
9191
9191
  websocket: !0
9192
9192
  })
9193
9193
  ], pt.prototype, "handleAllArtifacts", 1);
9194
9194
  wr([
9195
- F({
9195
+ k({
9196
9196
  topic: "/kos/ota/artifacts/changed",
9197
9197
  websocket: !0
9198
9198
  })
@@ -9219,20 +9219,20 @@ function yg(t) {
9219
9219
  e && (e.abort(), e = void 0);
9220
9220
  }, s.getController = () => e, s.isActive = () => !!e, s;
9221
9221
  }
9222
- const Fr = p.createLogger({
9222
+ const kr = g.createLogger({
9223
9223
  name: "software-info-service",
9224
9224
  group: "Services"
9225
- }), xo = async (t) => {
9226
- Fr.debug("sending GET for software-info");
9225
+ }), Ro = async (t) => {
9226
+ kr.debug("sending GET for software-info");
9227
9227
  const [e, s] = await tf.get("/api/kos/manifest/info", void 0, {
9228
9228
  signal: t
9229
9229
  });
9230
9230
  if (!s)
9231
- throw t != null && t.aborted ? (Fr.debug("Request was aborted"), new pe("Request was aborted")) : (Fr.error("Failed to fetch software-info", e), new pe("Failed to fetch software-info"));
9231
+ throw t != null && t.aborted ? (kr.debug("Request was aborted"), new pe("Request was aborted")) : (kr.error("Failed to fetch software-info", e), new pe("Failed to fetch software-info"));
9232
9232
  return s;
9233
- }, bg = yg(xo), _w = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9233
+ }, bg = yg(Ro), _w = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9234
9234
  __proto__: null,
9235
- getSoftwareInfos: xo,
9235
+ getSoftwareInfos: Ro,
9236
9236
  getSoftwareInfosWithCancel: bg
9237
9237
  }, Symbol.toStringTag, { value: "Module" }));
9238
9238
  var wg = Object.defineProperty, vg = Object.getOwnPropertyDescriptor, Mg = (t, e, s, r) => {
@@ -9261,7 +9261,7 @@ let Qr = class {
9261
9261
  async load() {
9262
9262
  this.logger.debug(`loading software-info ${this.id}`);
9263
9263
  try {
9264
- const t = await xo(), e = (t == null ? void 0 : t.nodes) || {};
9264
+ const t = await Ro(), e = (t == null ? void 0 : t.nodes) || {};
9265
9265
  se(() => {
9266
9266
  const r = Object.keys(e).map((o) => e[o][0]).map((o) => ({
9267
9267
  nodeName: o.nodeType,
@@ -9292,16 +9292,16 @@ const Jr = {
9292
9292
  )
9293
9293
  }, { URL: Pa } = ue(), { getOne: _g } = ae.build({
9294
9294
  basePath: `${Pa}/api/kos/state`
9295
- }), Eg = p.createLogger({
9295
+ }), Eg = g.createLogger({
9296
9296
  name: "state-bean-service",
9297
9297
  group: "Services"
9298
- }), xa = async ({ path: t }) => (Eg.debug("sending GET for state-bean"), await _g({
9298
+ }), Ra = async ({ path: t }) => (Eg.debug("sending GET for state-bean"), await _g({
9299
9299
  urlOverride: `${Pa}/api/kos/state/${t}`
9300
9300
  })), Ew = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9301
9301
  __proto__: null,
9302
- getStateBeanData: xa
9302
+ getStateBeanData: Ra
9303
9303
  }, Symbol.toStringTag, { value: "Module" }));
9304
- var Tg = Object.defineProperty, Ig = Object.getOwnPropertyDescriptor, Ra = (t, e, s, r) => {
9304
+ var Tg = Object.defineProperty, Ig = Object.getOwnPropertyDescriptor, xa = (t, e, s, r) => {
9305
9305
  for (var o = r > 1 ? void 0 : r ? Ig(e, s) : e, n = t.length - 1, i; n >= 0; n--)
9306
9306
  (i = t[n]) && (o = (r ? i(e, s, o) : i(o)) || o);
9307
9307
  return r && o && Tg(e, s, o), o;
@@ -9335,17 +9335,17 @@ let Vs = class {
9335
9335
  }
9336
9336
  async load() {
9337
9337
  this.logger.debug(`loading state-bean ${this.id}`);
9338
- const t = await xa({ path: this.path });
9338
+ const t = await Ra({ path: this.path });
9339
9339
  t != null && t.data && this.updateProps(t.data);
9340
9340
  }
9341
9341
  };
9342
- Ra([
9343
- F({
9342
+ xa([
9343
+ k({
9344
9344
  topic: `/kos/state/${$g}`,
9345
9345
  websocket: !0
9346
9346
  })
9347
9347
  ], Vs.prototype, "handleConfigBeanUpdated", 1);
9348
- Vs = Ra([
9348
+ Vs = xa([
9349
9349
  P(Ot)
9350
9350
  ], Vs);
9351
9351
  const Ys = {
@@ -9411,33 +9411,33 @@ const La = {
9411
9411
  factory: ie.Factory.create(St)
9412
9412
  }, { URL: Dg } = ue(), { getAll: Cg } = ae.build({
9413
9413
  basePath: `${Dg}/api/state-prop`
9414
- }), Pg = p.createLogger({
9414
+ }), Pg = g.createLogger({
9415
9415
  name: "state-prop-service",
9416
9416
  group: "Services"
9417
- }), xg = async () => (Pg.debug("sending GET for state-prop"), await Cg({})), Tw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9417
+ }), Rg = async () => (Pg.debug("sending GET for state-prop"), await Cg({})), Tw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9418
9418
  __proto__: null,
9419
- getStateProps: xg
9420
- }, Symbol.toStringTag, { value: "Module" })), { URL: Ro } = ue(), { getOne: Fa } = ae.build({
9421
- basePath: `${Ro}/api/translation`
9422
- }), Rt = p.createLogger({
9419
+ getStateProps: Rg
9420
+ }, Symbol.toStringTag, { value: "Module" })), { URL: xo } = ue(), { getOne: ka } = ae.build({
9421
+ basePath: `${xo}/api/translation`
9422
+ }), xt = g.createLogger({
9423
9423
  name: "translation-service",
9424
9424
  group: "Services"
9425
- }), Rg = () => {
9425
+ }), xg = () => {
9426
9426
  const t = window.location.origin, e = ye();
9427
9427
  return (e == null ? void 0 : e.host) || t;
9428
9428
  }, Ag = async (t, e) => {
9429
- Rt.debug("sending GET for translation");
9430
- const s = e ?? Rg();
9429
+ xt.debug("sending GET for translation");
9430
+ const s = e ?? xg();
9431
9431
  try {
9432
9432
  const r = await fetch(`${s}${t}`);
9433
- return r.status !== 200 ? (Rt.warn(`Failed to fetch translations at ${t}: ${r.status}`), {}) : await r.json();
9433
+ return r.status !== 200 ? (xt.warn(`Failed to fetch translations at ${t}: ${r.status}`), {}) : await r.json();
9434
9434
  } catch (r) {
9435
- throw Rt.error("Error fetching translations", r), r;
9435
+ throw xt.error("Error fetching translations", r), r;
9436
9436
  }
9437
9437
  }, Iw = async () => {
9438
- Rt.debug("getting localization descriptor");
9439
- const t = await Fa({
9440
- urlOverride: `${Ro}/api/system/kos/localization`
9438
+ xt.debug("getting localization descriptor");
9439
+ const t = await ka({
9440
+ urlOverride: `${xo}/api/system/kos/localization`
9441
9441
  });
9442
9442
  if ((t == null ? void 0 : t.status) !== 200)
9443
9443
  throw new Error(
@@ -9445,20 +9445,20 @@ const La = {
9445
9445
  );
9446
9446
  return t.data;
9447
9447
  }, Lg = (t) => async () => {
9448
- Rt.debug("getting kos localization descriptor");
9449
- const e = await Fa({
9450
- urlOverride: `${Ro}/api/kos/localization/contexts`
9448
+ xt.debug("getting kos localization descriptor");
9449
+ const e = await ka({
9450
+ urlOverride: `${xo}/api/kos/localization/contexts`
9451
9451
  });
9452
9452
  if ((e == null ? void 0 : e.status) !== 200)
9453
9453
  throw new Error(
9454
9454
  `Failed to get tool localization descriptor ${e == null ? void 0 : e.status}`
9455
9455
  );
9456
9456
  return e.data[t];
9457
- }, ka = "langResolver";
9458
- var Fg = Object.defineProperty, kg = Object.getOwnPropertyDescriptor, Ng = (t, e, s, r) => {
9459
- for (var o = r > 1 ? void 0 : r ? kg(e, s) : e, n = t.length - 1, i; n >= 0; n--)
9457
+ }, Fa = "langResolver";
9458
+ var kg = Object.defineProperty, Fg = Object.getOwnPropertyDescriptor, Ng = (t, e, s, r) => {
9459
+ for (var o = r > 1 ? void 0 : r ? Fg(e, s) : e, n = t.length - 1, i; n >= 0; n--)
9460
9460
  (i = t[n]) && (o = (r ? i(e, s, o) : i(o)) || o);
9461
- return r && o && Fg(e, s, o), o;
9461
+ return r && o && kg(e, s, o), o;
9462
9462
  };
9463
9463
  const Dt = "translation-model";
9464
9464
  function Ug(t) {
@@ -9522,7 +9522,7 @@ let eo = class {
9522
9522
  l(this, "disposer");
9523
9523
  l(this, "context");
9524
9524
  l(this, "rootUrl");
9525
- this.id = t, this.defaultLocale = e.defaultLocale || "en", this.currentLocale = e.currentLocale || "en", this.namespace = e.namespace, this.descriptor = e.descriptor, this.rootUrl = e.rootUrl, this.data = {}, this.resolver = e.resolver || s.kosContext.get(ka), this.bundleResolver = e.bundleResolver, this.logger = s.logger, this.context = s.kosContext.parentModel;
9525
+ this.id = t, this.defaultLocale = e.defaultLocale || "en", this.currentLocale = e.currentLocale || "en", this.namespace = e.namespace, this.descriptor = e.descriptor, this.rootUrl = e.rootUrl, this.data = {}, this.resolver = e.resolver || s.kosContext.get(Fa), this.bundleResolver = e.bundleResolver, this.logger = s.logger, this.context = s.kosContext.parentModel;
9526
9526
  }
9527
9527
  // -------------------LIFECYCLE----------------------------
9528
9528
  getTranslationLocales(t) {
@@ -9643,7 +9643,7 @@ let Ws = class {
9643
9643
  l(this, "descriptorUrl");
9644
9644
  l(this, "namespaces", []);
9645
9645
  l(this, "_models");
9646
- this.id = t, this.lang = e.lang || "en", this.descriptor = e.descriptor, this._defaultNamespace = e.defaultNamespace, this.descriptorUrl = e.descriptorUrl, this.rootUrl = e.rootUrl, this.resolver = e.resolver || Kg.bind(this), s.kosContext.set(ka, this.resolver), this.logger = s.logger, this._models = new xe({
9646
+ this.id = t, this.lang = e.lang || "en", this.descriptor = e.descriptor, this._defaultNamespace = e.defaultNamespace, this.descriptorUrl = e.descriptorUrl, this.rootUrl = e.rootUrl, this.resolver = e.resolver || Kg.bind(this), s.kosContext.set(Fa, this.resolver), this.logger = s.logger, this._models = new Re({
9647
9647
  parentId: t
9648
9648
  });
9649
9649
  }
@@ -9724,7 +9724,7 @@ ja([
9724
9724
  Ws = ja([
9725
9725
  P(Ct)
9726
9726
  ], Ws);
9727
- const Fe = {
9727
+ const ke = {
9728
9728
  registration: {
9729
9729
  [Ct]: {
9730
9730
  class: Ws,
@@ -9736,16 +9736,16 @@ const Fe = {
9736
9736
  factory: ie.Singleton.create(Ct)
9737
9737
  }, $w = {
9738
9738
  set(t, e) {
9739
- const s = G.getContext(Fe.type);
9739
+ const s = G.getContext(ke.type);
9740
9740
  s && s.set(t, e);
9741
9741
  },
9742
9742
  get(t) {
9743
- const e = G.getContext(Fe.type);
9743
+ const e = G.getContext(ke.type);
9744
9744
  return e == null ? void 0 : e.get(t);
9745
9745
  }
9746
9746
  }, zg = {
9747
9747
  async init(t) {
9748
- const e = Fe.factory(t);
9748
+ const e = ke.factory(t);
9749
9749
  return await fe(e), { translations: e };
9750
9750
  }
9751
9751
  };
@@ -9781,7 +9781,7 @@ let Kt = class {
9781
9781
  this.processEvent(e);
9782
9782
  }
9783
9783
  processEvent(t, e = !1) {
9784
- p.debug("kos event received");
9784
+ g.debug("kos event received");
9785
9785
  const { body: s, headers: r } = t.body, o = r["request-id"] || r["response-id"], n = r["request-id"] || r["response-id"] || r.topic || r.type;
9786
9786
  if (n) {
9787
9787
  let i = n;
@@ -9800,17 +9800,17 @@ let Kt = class {
9800
9800
  direction: e ? "send" : "receive",
9801
9801
  mocked: !!r.mocked
9802
9802
  };
9803
- this.events.set(i, a), p.debug(`logged ${this.events.size} events`);
9803
+ this.events.set(i, a), g.debug(`logged ${this.events.size} events`);
9804
9804
  }
9805
9805
  }
9806
9806
  };
9807
9807
  Ao([
9808
- F({
9808
+ k({
9809
9809
  topic: [ir.SEND]
9810
9810
  })
9811
9811
  ], Kt.prototype, "handleSendEvent", 1);
9812
9812
  Ao([
9813
- F({
9813
+ k({
9814
9814
  topic: [ir.RECEIVED]
9815
9815
  })
9816
9816
  ], Kt.prototype, "handleReceiveEvent", 1);
@@ -9847,7 +9847,7 @@ var Jg = Object.defineProperty, Xg = Object.getOwnPropertyDescriptor, Ka = (t, e
9847
9847
  return r && o && Jg(e, s, o), o;
9848
9848
  };
9849
9849
  const za = "canvas-renderer-model";
9850
- function kr(t) {
9850
+ function Fr(t) {
9851
9851
  return typeof t.onDone == "function";
9852
9852
  }
9853
9853
  let Zs = class {
@@ -9925,7 +9925,7 @@ let Zs = class {
9925
9925
  }
9926
9926
  isOneShotDone() {
9927
9927
  var t, e;
9928
- return kr(this._renderer) && ((e = (t = this._renderer).isOneShot) == null ? void 0 : e.call(t)) === !0 && this._renderer.isOneShotDone;
9928
+ return Fr(this._renderer) && ((e = (t = this._renderer).isOneShot) == null ? void 0 : e.call(t)) === !0 && this._renderer.isOneShotDone;
9929
9929
  }
9930
9930
  startStreaming() {
9931
9931
  var t, e, s, r;
@@ -9939,8 +9939,8 @@ let Zs = class {
9939
9939
  return;
9940
9940
  }
9941
9941
  this.isStreaming = !0, this._renderer.reset(), (e = (t = this._renderer).play) == null || e.call(t);
9942
- const o = kr(this._renderer);
9943
- kr(this._renderer) && this._renderer.onDone(() => {
9942
+ const o = Fr(this._renderer);
9943
+ Fr(this._renderer) && this._renderer.onDone(() => {
9944
9944
  var c, d, u;
9945
9945
  this.logger.debug(`Renderer completed for ${this.id}`), B("/canvas/renderer/completed", {
9946
9946
  endpoint: this.endpointName,
@@ -10479,9 +10479,9 @@ class ap extends Ze {
10479
10479
  if (i === c)
10480
10480
  d = this.baseColor.r, u = this.baseColor.g, h = this.baseColor.b;
10481
10481
  else if (i < c && i > c - this.trailColors.length) {
10482
- const g = c - i;
10483
- if (g < this.trailColors.length) {
10484
- const y = this.trailColors[g];
10482
+ const p = c - i;
10483
+ if (p < this.trailColors.length) {
10484
+ const y = this.trailColors[p];
10485
10485
  d = y.r, u = y.g, h = y.b;
10486
10486
  }
10487
10487
  }
@@ -10561,16 +10561,16 @@ class Wa extends Ze {
10561
10561
  this.drawScrollingImage(s, r, o, i), this.checkScrollCompletion(s, r, o, i);
10562
10562
  }
10563
10563
  drawScrollingImage(s, r, o, n) {
10564
- var h, f, g, y, b, w, M, k, te;
10564
+ var h, f, p, y, b, w, M, F, te;
10565
10565
  const i = this.img.width / this.img.height;
10566
10566
  let a, c;
10567
- ((h = this.scrollConfig) == null ? void 0 : h.maintainAspectRatio) !== !1 ? (f = this.scrollConfig) != null && f.height ? (c = this.scrollConfig.height, a = c * i) : (g = this.scrollConfig) != null && g.width ? (a = this.scrollConfig.width, c = a / i) : o === "left" || o === "right" ? (c = r, a = c * i) : (a = s, c = a / i) : (a = ((y = this.scrollConfig) == null ? void 0 : y.width) || s, c = ((b = this.scrollConfig) == null ? void 0 : b.height) || r);
10567
+ ((h = this.scrollConfig) == null ? void 0 : h.maintainAspectRatio) !== !1 ? (f = this.scrollConfig) != null && f.height ? (c = this.scrollConfig.height, a = c * i) : (p = this.scrollConfig) != null && p.width ? (a = this.scrollConfig.width, c = a / i) : o === "left" || o === "right" ? (c = r, a = c * i) : (a = s, c = a / i) : (a = ((y = this.scrollConfig) == null ? void 0 : y.width) || s, c = ((b = this.scrollConfig) == null ? void 0 : b.height) || r);
10568
10568
  let d, u;
10569
- switch (o === "left" || o === "right" ? (d = 0, ((w = this.scrollConfig) == null ? void 0 : w.offsetY) === "center" || ((M = this.scrollConfig) == null ? void 0 : M.offsetY) === void 0 ? u = (r - c) / 2 : u = this.scrollConfig.offsetY) : (((k = this.scrollConfig) == null ? void 0 : k.offsetX) === "center" || ((te = this.scrollConfig) == null ? void 0 : te.offsetX) === void 0 ? d = (s - a) / 2 : d = this.scrollConfig.offsetX, u = 0), o) {
10569
+ switch (o === "left" || o === "right" ? (d = 0, ((w = this.scrollConfig) == null ? void 0 : w.offsetY) === "center" || ((M = this.scrollConfig) == null ? void 0 : M.offsetY) === void 0 ? u = (r - c) / 2 : u = this.scrollConfig.offsetY) : (((F = this.scrollConfig) == null ? void 0 : F.offsetX) === "center" || ((te = this.scrollConfig) == null ? void 0 : te.offsetX) === void 0 ? d = (s - a) / 2 : d = this.scrollConfig.offsetX, u = 0), o) {
10570
10570
  case "left": {
10571
- const x = s - this.position;
10572
- if (x < s && x > -a && this.ctx.drawImage(this.img, x, u, a, c), this.loopConfig && this.pauseDuration === 0 && this.position > n) {
10573
- const _ = x + a + n;
10571
+ const R = s - this.position;
10572
+ if (R < s && R > -a && this.ctx.drawImage(this.img, R, u, a, c), this.loopConfig && this.pauseDuration === 0 && this.position > n) {
10573
+ const _ = R + a + n;
10574
10574
  _ < s && this.ctx.drawImage(
10575
10575
  this.img,
10576
10576
  _,
@@ -10582,9 +10582,9 @@ class Wa extends Ze {
10582
10582
  break;
10583
10583
  }
10584
10584
  case "right": {
10585
- const x = -a + this.position;
10586
- if (x > -a && x < s && this.ctx.drawImage(this.img, x, u, a, c), this.loopConfig && this.pauseDuration === 0 && x - n - a > -a) {
10587
- const _ = x - a - n;
10585
+ const R = -a + this.position;
10586
+ if (R > -a && R < s && this.ctx.drawImage(this.img, R, u, a, c), this.loopConfig && this.pauseDuration === 0 && R - n - a > -a) {
10587
+ const _ = R - a - n;
10588
10588
  _ < s && this.ctx.drawImage(
10589
10589
  this.img,
10590
10590
  _,
@@ -10596,9 +10596,9 @@ class Wa extends Ze {
10596
10596
  break;
10597
10597
  }
10598
10598
  case "up": {
10599
- const x = r - this.position;
10600
- if (x > -c && x < r && this.ctx.drawImage(this.img, d, x, a, c), this.loopConfig && this.pauseDuration === 0 && x + c + n < r) {
10601
- const _ = x + c + n;
10599
+ const R = r - this.position;
10600
+ if (R > -c && R < r && this.ctx.drawImage(this.img, d, R, a, c), this.loopConfig && this.pauseDuration === 0 && R + c + n < r) {
10601
+ const _ = R + c + n;
10602
10602
  _ > -c && this.ctx.drawImage(
10603
10603
  this.img,
10604
10604
  d,
@@ -10610,9 +10610,9 @@ class Wa extends Ze {
10610
10610
  break;
10611
10611
  }
10612
10612
  case "down": {
10613
- const x = -c + this.position;
10614
- if (x > -c && x < r && this.ctx.drawImage(this.img, d, x, a, c), this.loopConfig && this.pauseDuration === 0 && x - n - c > -c) {
10615
- const _ = x - c - n;
10613
+ const R = -c + this.position;
10614
+ if (R > -c && R < r && this.ctx.drawImage(this.img, d, R, a, c), this.loopConfig && this.pauseDuration === 0 && R - n - c > -c) {
10615
+ const _ = R - c - n;
10616
10616
  _ < r && this.ctx.drawImage(
10617
10617
  this.img,
10618
10618
  d,
@@ -10626,12 +10626,12 @@ class Wa extends Ze {
10626
10626
  }
10627
10627
  }
10628
10628
  checkScrollCompletion(s, r, o, n) {
10629
- var h, f, g, y, b;
10629
+ var h, f, p, y, b;
10630
10630
  if (!this.isPlaying)
10631
10631
  return;
10632
10632
  const i = this.img.width / this.img.height;
10633
10633
  let a, c;
10634
- switch (((h = this.scrollConfig) == null ? void 0 : h.maintainAspectRatio) !== !1 ? (f = this.scrollConfig) != null && f.height ? (c = this.scrollConfig.height, a = c * i) : (g = this.scrollConfig) != null && g.width ? (a = this.scrollConfig.width, c = a / i) : o === "left" || o === "right" ? (c = r, a = c * i) : (a = s, c = a / i) : (a = ((y = this.scrollConfig) == null ? void 0 : y.width) || s, c = ((b = this.scrollConfig) == null ? void 0 : b.height) || r), o) {
10634
+ switch (((h = this.scrollConfig) == null ? void 0 : h.maintainAspectRatio) !== !1 ? (f = this.scrollConfig) != null && f.height ? (c = this.scrollConfig.height, a = c * i) : (p = this.scrollConfig) != null && p.width ? (a = this.scrollConfig.width, c = a / i) : o === "left" || o === "right" ? (c = r, a = c * i) : (a = s, c = a / i) : (a = ((y = this.scrollConfig) == null ? void 0 : y.width) || s, c = ((b = this.scrollConfig) == null ? void 0 : b.height) || r), o) {
10635
10635
  case "left":
10636
10636
  case "right":
10637
10637
  this.loopConfig;
@@ -10696,8 +10696,10 @@ class cp extends Ze {
10696
10696
  constructor(s) {
10697
10697
  super();
10698
10698
  l(this, "text");
10699
+ l(this, "lines");
10699
10700
  l(this, "fontSize");
10700
10701
  l(this, "fontFamily");
10702
+ l(this, "lineHeight");
10701
10703
  l(this, "textColor");
10702
10704
  l(this, "scrollConfig");
10703
10705
  l(this, "loopConfig");
@@ -10715,18 +10717,24 @@ class cp extends Ze {
10715
10717
  // Text measurement cache
10716
10718
  l(this, "textWidth", 0);
10717
10719
  l(this, "textHeight", 0);
10720
+ l(this, "lineWidths", []);
10718
10721
  l(this, "textMeasured", !1);
10719
- this.text = s.text, this.fontSize = s.fontSize ?? 8, this.fontFamily = s.fontFamily ?? "monospace, 'Lucida Console', 'Courier New', Courier", this.scrollConfig = s.scroll, this.loopConfig = s.loop ?? !1, this.duration = s.duration, this.pauseDuration = s.pauseBetweenLoops ?? 0, s.color ? this.textColor = Qs(s.color) : this.textColor = "rgb(255,255,255)";
10722
+ this.text = s.text, this.lines = s.text.split(`
10723
+ `), this.fontSize = s.fontSize ?? 8, this.lineHeight = s.lineHeight ?? this.fontSize + 2, this.fontFamily = s.fontFamily ?? "monospace, 'Lucida Console', 'Courier New', Courier", this.scrollConfig = s.scroll, this.loopConfig = s.loop ?? !1, this.duration = s.duration, this.pauseDuration = s.pauseBetweenLoops ?? 0, s.color ? this.textColor = Qs(s.color) : this.textColor = "rgb(255,255,255)";
10720
10724
  }
10721
10725
  measureText() {
10722
10726
  if (this.textMeasured)
10723
10727
  return;
10724
- this.ctx.font = `${this.fontSize}px ${this.fontFamily}`;
10725
- const s = this.ctx.measureText(this.text);
10726
- this.textWidth = s.width, this.textHeight = this.fontSize, this.textMeasured = !0;
10728
+ this.ctx.font = `${this.fontSize}px ${this.fontFamily}`, this.lineWidths = [];
10729
+ let s = 0;
10730
+ for (const r of this.lines) {
10731
+ const n = this.ctx.measureText(r).width;
10732
+ this.lineWidths.push(n), s = Math.max(s, n);
10733
+ }
10734
+ this.textWidth = s, this.textHeight = this.lines.length * this.lineHeight, this.textMeasured = !0;
10727
10735
  }
10728
10736
  reset() {
10729
- this.position = 0, this.startTime = performance.now(), this.lastFrameTime = this.startTime, this.currentLoopCount = 0, this.completed = !1, this.isPlaying = !1, this.isPaused = !1, this.pauseStartTime = 0, this.textMeasured = !1;
10737
+ this.position = 0, this.startTime = performance.now(), this.lastFrameTime = this.startTime, this.currentLoopCount = 0, this.completed = !1, this.isPlaying = !1, this.isPaused = !1, this.pauseStartTime = 0, this.textMeasured = !1, this.lineWidths = [];
10730
10738
  }
10731
10739
  play() {
10732
10740
  this.isPlaying || (this.isPlaying = !0, this.startTime = performance.now(), this.lastFrameTime = this.startTime);
@@ -10763,49 +10771,72 @@ class cp extends Ze {
10763
10771
  this.drawScrollingText(s, r, o, i), this.checkScrollCompletion(s, r, o);
10764
10772
  }
10765
10773
  drawStaticText(s, r) {
10766
- this.ctx.font = `${this.fontSize}px ${this.fontFamily}`, this.ctx.fillStyle = this.textColor, this.ctx.textBaseline = "middle";
10767
- const o = (s - this.textWidth) / 2, n = r / 2;
10768
- this.ctx.fillText(this.text, o, n);
10774
+ this.ctx.font = `${this.fontSize}px ${this.fontFamily}`, this.ctx.fillStyle = this.textColor, this.ctx.textBaseline = "top";
10775
+ const o = this.textHeight;
10776
+ let n = (r - o) / 2;
10777
+ for (let i = 0; i < this.lines.length; i++) {
10778
+ const a = this.lines[i], c = this.lineWidths[i], d = (s - c) / 2, u = n + i * this.lineHeight;
10779
+ this.ctx.fillText(a, d, u);
10780
+ }
10769
10781
  }
10770
10782
  drawScrollingText(s, r, o, n) {
10771
10783
  var c, d, u, h;
10772
- this.ctx.font = `${this.fontSize}px ${this.fontFamily}`, this.ctx.fillStyle = this.textColor, this.ctx.textBaseline = "middle";
10784
+ this.ctx.font = `${this.fontSize}px ${this.fontFamily}`, this.ctx.fillStyle = this.textColor, this.ctx.textBaseline = "top";
10773
10785
  let i, a;
10774
- switch (o === "left" || o === "right" ? (i = 0, ((c = this.scrollConfig) == null ? void 0 : c.offsetY) === "center" || ((d = this.scrollConfig) == null ? void 0 : d.offsetY) === void 0 ? a = r / 2 : a = this.scrollConfig.offsetY) : (((u = this.scrollConfig) == null ? void 0 : u.offsetX) === "center" || ((h = this.scrollConfig) == null ? void 0 : h.offsetX) === void 0 ? (i = s / 2, this.ctx.textAlign = "center") : (i = this.scrollConfig.offsetX, this.ctx.textAlign = "left"), a = 0), o) {
10786
+ o === "left" || o === "right" ? (i = 0, ((c = this.scrollConfig) == null ? void 0 : c.offsetY) === "center" || ((d = this.scrollConfig) == null ? void 0 : d.offsetY) === void 0 ? a = (r - this.textHeight) / 2 : a = this.scrollConfig.offsetY) : (((u = this.scrollConfig) == null ? void 0 : u.offsetX) === "center" || ((h = this.scrollConfig) == null ? void 0 : h.offsetX) === void 0 ? (i = s / 2, this.ctx.textAlign = "center") : (i = this.scrollConfig.offsetX, this.ctx.textAlign = "left"), a = 0), this.drawMultiLineScrollText(
10787
+ o,
10788
+ s,
10789
+ r,
10790
+ n,
10791
+ i,
10792
+ a
10793
+ );
10794
+ }
10795
+ drawMultiLineScrollText(s, r, o, n, i, a) {
10796
+ switch (s) {
10775
10797
  case "left": {
10776
- const f = s - this.position;
10777
- if (f < s && f > -this.textWidth && this.ctx.fillText(this.text, f, a), this.loopConfig && this.pauseDuration === 0 && this.position > n) {
10778
- const g = f + this.textWidth + n;
10779
- g < s && this.ctx.fillText(this.text, g, a);
10798
+ const c = r - this.position;
10799
+ if (c < r && c > -this.textWidth && this.drawTextBlock(c, a, "left"), this.loopConfig && this.pauseDuration === 0 && this.position > n) {
10800
+ const d = c + this.textWidth + n;
10801
+ d < r && this.drawTextBlock(d, a, "left");
10780
10802
  }
10781
10803
  break;
10782
10804
  }
10783
10805
  case "right": {
10784
- const f = -this.textWidth + this.position;
10785
- if (f > -this.textWidth && f < s && this.ctx.fillText(this.text, f, a), this.loopConfig && this.pauseDuration === 0 && f - n - this.textWidth > -this.textWidth) {
10786
- const g = f - this.textWidth - n;
10787
- g < s && this.ctx.fillText(this.text, g, a);
10806
+ const c = -this.textWidth + this.position;
10807
+ if (c > -this.textWidth && c < r && this.drawTextBlock(c, a, "left"), this.loopConfig && this.pauseDuration === 0 && c - n - this.textWidth > -this.textWidth) {
10808
+ const d = c - this.textWidth - n;
10809
+ d < r && this.drawTextBlock(d, a, "left");
10788
10810
  }
10789
10811
  break;
10790
10812
  }
10791
10813
  case "up": {
10792
- const f = r - this.position;
10793
- if (f > -this.textHeight && f < r && this.ctx.fillText(this.text, i, f), this.loopConfig && this.pauseDuration === 0 && f + this.textHeight + n < r) {
10794
- const g = f + this.textHeight + n;
10795
- g > -this.textHeight && this.ctx.fillText(this.text, i, g);
10814
+ const c = o - this.position;
10815
+ if (c > -this.textHeight && c < o && this.drawTextBlock(i, c, "center"), this.loopConfig && this.pauseDuration === 0 && c + this.textHeight + n < o) {
10816
+ const d = c + this.textHeight + n;
10817
+ d > -this.textHeight && this.drawTextBlock(i, d, "center");
10796
10818
  }
10797
10819
  break;
10798
10820
  }
10799
10821
  case "down": {
10800
- const f = -this.textHeight + this.position;
10801
- if (f > -this.textHeight && f < r && this.ctx.fillText(this.text, i, f), this.loopConfig && this.pauseDuration === 0 && f - n - this.textHeight > -this.textHeight) {
10802
- const g = f - this.textHeight - n;
10803
- g < r && this.ctx.fillText(this.text, i, g);
10822
+ const c = -this.textHeight + this.position;
10823
+ if (c > -this.textHeight && c < o && this.drawTextBlock(i, c, "center"), this.loopConfig && this.pauseDuration === 0 && c - n - this.textHeight > -this.textHeight) {
10824
+ const d = c - this.textHeight - n;
10825
+ d < o && this.drawTextBlock(i, d, "center");
10804
10826
  }
10805
10827
  break;
10806
10828
  }
10807
10829
  }
10808
10830
  }
10831
+ drawTextBlock(s, r, o) {
10832
+ for (let n = 0; n < this.lines.length; n++) {
10833
+ const i = this.lines[n], a = this.lineWidths[n];
10834
+ let c;
10835
+ o === "center" ? c = s - a / 2 : c = s;
10836
+ const d = r + n * this.lineHeight;
10837
+ this.ctx.fillText(i, c, d);
10838
+ }
10839
+ }
10809
10840
  checkScrollCompletion(s, r, o) {
10810
10841
  if (!this.isPlaying)
10811
10842
  return;
@@ -10994,7 +11025,7 @@ class hp extends Ze {
10994
11025
  if (r === 0)
10995
11026
  n = i = a = o;
10996
11027
  else {
10997
- const c = (h, f, g) => (g < 0 && (g += 1), g > 1 && (g -= 1), g < 0.16666666666666666 ? h + (f - h) * 6 * g : g < 0.5 ? f : g < 0.6666666666666666 ? h + (f - h) * (0.6666666666666666 - g) * 6 : h), d = o < 0.5 ? o * (1 + r) : o + r - o * r, u = 2 * o - d;
11028
+ const c = (h, f, p) => (p < 0 && (p += 1), p > 1 && (p -= 1), p < 0.16666666666666666 ? h + (f - h) * 6 * p : p < 0.5 ? f : p < 0.6666666666666666 ? h + (f - h) * (0.6666666666666666 - p) * 6 : h), d = o < 0.5 ? o * (1 + r) : o + r - o * r, u = 2 * o - d;
10998
11029
  n = c(u, d, s + 1 / 3), i = c(u, d, s), a = c(u, d, s - 1 / 3);
10999
11030
  }
11000
11031
  return [Math.round(n * 255), Math.round(i * 255), Math.round(a * 255)];
@@ -11011,8 +11042,8 @@ class hp extends Ze {
11011
11042
  let i = 0;
11012
11043
  for (let a = 0; a < r; a++)
11013
11044
  for (let c = 0; c < s; c++) {
11014
- const d = (c + this.offset) % s / s, u = this.minHue / 360 + d * ((this.maxHue - this.minHue) / 360), [h, f, g] = this.hslToRgb(u, 1, 0.5);
11015
- n[i++] = h, n[i++] = f, n[i++] = g, n[i++] = 255;
11045
+ const d = (c + this.offset) % s / s, u = this.minHue / 360 + d * ((this.maxHue - this.minHue) / 360), [h, f, p] = this.hslToRgb(u, 1, 0.5);
11046
+ n[i++] = h, n[i++] = f, n[i++] = p, n[i++] = 255;
11016
11047
  }
11017
11048
  this.ctx.putImageData(o, 0, 0);
11018
11049
  }
@@ -11076,7 +11107,7 @@ function mp(t) {
11076
11107
  b: e & 255
11077
11108
  };
11078
11109
  }
11079
- let ke = class {
11110
+ let Fe = class {
11080
11111
  constructor(t, e, s) {
11081
11112
  l(this, "id");
11082
11113
  l(this, "logger");
@@ -11086,7 +11117,7 @@ let ke = class {
11086
11117
  // Note: BrowserRouter is automatically injected when using HTTP decorators!
11087
11118
  l(this, "pattern");
11088
11119
  l(this, "data");
11089
- this.id = t, this.logger = s.logger, this._endpointRenderers = new xe();
11120
+ this.id = t, this.logger = s.logger, this._endpointRenderers = new Re();
11090
11121
  }
11091
11122
  addNamedEndpoint(t, e) {
11092
11123
  this._endpointRenderers.getModel(t) && this.logger.warn(`Endpoint "${t}" already exists. Overwriting.`);
@@ -11184,32 +11215,32 @@ let ke = class {
11184
11215
  };
11185
11216
  Mt([
11186
11217
  Ee
11187
- ], ke.prototype, "_endpointRenderers", 2);
11218
+ ], Fe.prototype, "_endpointRenderers", 2);
11188
11219
  Mt([
11189
11220
  hr("/api/ui/canvas/patterns")
11190
- ], ke.prototype, "handlePatternsPost", 1);
11221
+ ], Fe.prototype, "handlePatternsPost", 1);
11191
11222
  Mt([
11192
11223
  hr("/api/ui/canvas/pattern/:endpoint/:pattern")
11193
- ], ke.prototype, "handlePatternApplication", 1);
11224
+ ], Fe.prototype, "handlePatternApplication", 1);
11194
11225
  Mt([
11195
11226
  hr("/api/ui/canvas/color/:endpoint/:color")
11196
- ], ke.prototype, "handleColorApplication", 1);
11227
+ ], Fe.prototype, "handleColorApplication", 1);
11197
11228
  Mt([
11198
11229
  hr("/api/ui/canvas/endpoint")
11199
- ], ke.prototype, "handleEndpointCreation", 1);
11200
- ke = Mt([
11230
+ ], Fe.prototype, "handleEndpointCreation", 1);
11231
+ Fe = Mt([
11201
11232
  P(Za)
11202
- ], ke);
11233
+ ], Fe);
11203
11234
  const zt = new Pe({
11204
- class: ke,
11235
+ class: Fe,
11205
11236
  type: Za
11206
- }), { URL: Fo } = ue(), { getOne: Qa } = ae.build({
11207
- basePath: `${Fo}/api/device`
11208
- }), Js = p.createLogger({ name: "device-service", group: "Services" }), Ja = async () => {
11237
+ }), { URL: ko } = ue(), { getOne: Qa } = ae.build({
11238
+ basePath: `${ko}/api/device`
11239
+ }), Js = g.createLogger({ name: "device-service", group: "Services" }), Ja = async () => {
11209
11240
  Js.debug("sending GET for device serial number");
11210
11241
  try {
11211
11242
  const t = await Qa({
11212
- urlOverride: `${Fo}/api/kos/device/serialNumber`
11243
+ urlOverride: `${ko}/api/kos/device/serialNumber`
11213
11244
  });
11214
11245
  return [void 0, t == null ? void 0 : t.data.serialNumber];
11215
11246
  } catch (t) {
@@ -11221,7 +11252,7 @@ const zt = new Pe({
11221
11252
  Js.debug("sending GET for device details");
11222
11253
  try {
11223
11254
  const t = await Qa({
11224
- urlOverride: `${Fo}/api/kos/device`
11255
+ urlOverride: `${ko}/api/kos/device`
11225
11256
  });
11226
11257
  return t ? [void 0, t.data] : ["unknownError", void 0];
11227
11258
  } catch (t) {
@@ -11310,7 +11341,7 @@ let Xs = class {
11310
11341
  }
11311
11342
  };
11312
11343
  ec([
11313
- F({
11344
+ k({
11314
11345
  topic: [wp, vp],
11315
11346
  websocket: !0
11316
11347
  })
@@ -11363,7 +11394,7 @@ const rc = new Te({
11363
11394
  type: sc
11364
11395
  }), { URL: Tp } = ue(), { getAll: Ip } = ae.build({
11365
11396
  basePath: `${Tp}/api/kos/network/interfaces`
11366
- }), In = p.createLogger({
11397
+ }), In = g.createLogger({
11367
11398
  name: "network-interface-service",
11368
11399
  group: "Services"
11369
11400
  }), oc = async () => {
@@ -11391,7 +11422,7 @@ let er = class {
11391
11422
  l(this, "id");
11392
11423
  l(this, "logger");
11393
11424
  l(this, "_models");
11394
- this.id = t, this.logger = s.logger, this._models = new xe({
11425
+ this.id = t, this.logger = s.logger, this._models = new Re({
11395
11426
  parentId: t,
11396
11427
  indexMap: {
11397
11428
  byCategory: "category"
@@ -11452,18 +11483,18 @@ const tr = new Pe({
11452
11483
  tr.addRelatedModel(rc);
11453
11484
  const { URL: Sp } = ue(), { getAll: Dp } = ae.build({
11454
11485
  basePath: `${Sp}/api/kos/storage/devices`
11455
- }), $n = p.createLogger({
11486
+ }), $n = g.createLogger({
11456
11487
  name: "storage-device-service",
11457
11488
  group: "Services"
11458
11489
  }), ac = async () => {
11459
11490
  $n.debug("sending GET for storage-device");
11460
11491
  const t = await Dp({});
11461
11492
  return !(t != null && t.data) || t.status !== 200 ? ($n.error("Failed to retrieve storage-device data", t), []) : t.data;
11462
- }, xw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11493
+ }, Rw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11463
11494
  __proto__: null,
11464
11495
  getStorageDevices: ac
11465
11496
  }, Symbol.toStringTag, { value: "Module" }));
11466
- var Cp = Object.defineProperty, Pp = Object.getOwnPropertyDescriptor, xp = (t, e, s, r) => {
11497
+ var Cp = Object.defineProperty, Pp = Object.getOwnPropertyDescriptor, Rp = (t, e, s, r) => {
11467
11498
  for (var o = r > 1 ? void 0 : r ? Pp(e, s) : e, n = t.length - 1, i; n >= 0; n--)
11468
11499
  (i = t[n]) && (o = (r ? i(e, s, o) : i(o)) || o);
11469
11500
  return r && o && Cp(e, s, o), o;
@@ -11495,7 +11526,7 @@ let no = class {
11495
11526
  this.logger.debug(`loading storage-device ${this.id}`);
11496
11527
  }
11497
11528
  };
11498
- no = xp([
11529
+ no = Rp([
11499
11530
  bo(),
11500
11531
  P(cc)
11501
11532
  ], no);
@@ -11503,10 +11534,10 @@ const io = new Te({
11503
11534
  class: no,
11504
11535
  type: cc
11505
11536
  });
11506
- var Rp = Object.defineProperty, Ap = Object.getOwnPropertyDescriptor, ko = (t, e, s, r) => {
11537
+ var xp = Object.defineProperty, Ap = Object.getOwnPropertyDescriptor, Fo = (t, e, s, r) => {
11507
11538
  for (var o = r > 1 ? void 0 : r ? Ap(e, s) : e, n = t.length - 1, i; n >= 0; n--)
11508
11539
  (i = t[n]) && (o = (r ? i(e, s, o) : i(o)) || o);
11509
- return r && o && Rp(e, s, o), o;
11540
+ return r && o && xp(e, s, o), o;
11510
11541
  };
11511
11542
  const lc = "storage-device-container-model", Lp = "/kos/storage";
11512
11543
  let Gt = class {
@@ -11514,7 +11545,7 @@ let Gt = class {
11514
11545
  l(this, "id");
11515
11546
  l(this, "logger");
11516
11547
  l(this, "_models");
11517
- this.id = t, this.logger = s.logger, this._models = new xe({
11548
+ this.id = t, this.logger = s.logger, this._models = new Re({
11518
11549
  parentId: t
11519
11550
  });
11520
11551
  }
@@ -11577,16 +11608,16 @@ let Gt = class {
11577
11608
  });
11578
11609
  }
11579
11610
  };
11580
- ko([
11611
+ Fo([
11581
11612
  Ee
11582
11613
  ], Gt.prototype, "_models", 2);
11583
- ko([
11584
- F({
11614
+ Fo([
11615
+ k({
11585
11616
  topic: Lp,
11586
11617
  websocket: !0
11587
11618
  })
11588
11619
  ], Gt.prototype, "handleStorageAvailability", 1);
11589
- Gt = ko([
11620
+ Gt = Fo([
11590
11621
  P(lc)
11591
11622
  ], Gt);
11592
11623
  const Vt = new Pe({
@@ -11594,19 +11625,19 @@ const Vt = new Pe({
11594
11625
  type: lc
11595
11626
  });
11596
11627
  Vt.addRelatedModel(io);
11597
- const { URL: No } = ue(), { getAll: Fp, postModel: kp } = ae.build({
11628
+ const { URL: No } = ue(), { getAll: kp, postModel: Fp } = ae.build({
11598
11629
  basePath: `${No}/api/kos/update/available`
11599
- }), On = p.createLogger({
11630
+ }), On = g.createLogger({
11600
11631
  name: "usb-update-service",
11601
11632
  group: "Services"
11602
11633
  }), dc = async () => {
11603
11634
  On.debug("sending GET for usb-update");
11604
- const t = await Fp({
11635
+ const t = await kp({
11605
11636
  urlOverride: `${No}/api/kos/update/available`
11606
11637
  });
11607
11638
  return !(t != null && t.data) || (t == null ? void 0 : t.status) !== 200 ? (On.error("Failed to retrieve usb-update data", t), []) : t.data;
11608
11639
  }, uc = async (t, e, s) => {
11609
- const r = await kp({
11640
+ const r = await Fp({
11610
11641
  model: {
11611
11642
  manifestId: t,
11612
11643
  deviceId: e
@@ -11617,7 +11648,7 @@ const { URL: No } = ue(), { getAll: Fp, postModel: kp } = ae.build({
11617
11648
  if (!(r != null && r.data))
11618
11649
  throw new Error("No response from server");
11619
11650
  return r.data;
11620
- }, Rw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11651
+ }, xw = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11621
11652
  __proto__: null,
11622
11653
  getAvailableUpdates: dc,
11623
11654
  installUpdate: uc
@@ -11689,7 +11720,7 @@ let mt = class {
11689
11720
  l(this, "_activeUpdate");
11690
11721
  l(this, "logger");
11691
11722
  l(this, "_models");
11692
- this.id = t, this.logger = s.logger, this._models = new xe({ parentId: t });
11723
+ this.id = t, this.logger = s.logger, this._models = new Re({ parentId: t });
11693
11724
  }
11694
11725
  getModel(t) {
11695
11726
  return this._models.getModel(t);
@@ -11786,7 +11817,7 @@ const Hp = () => ({ ...{
11786
11817
  ...wt.registration,
11787
11818
  ...Ht.registration,
11788
11819
  ...to.registration,
11789
- ...Fe.registration,
11820
+ ...ke.registration,
11790
11821
  [Ba.type]: {
11791
11822
  class: Kt,
11792
11823
  singleton: !0
@@ -11799,7 +11830,7 @@ const Hp = () => ({ ...{
11799
11830
  preloadModels: []
11800
11831
  }, Sn = !0, Kp = (t) => () => {
11801
11832
  const e = mc;
11802
- return Iu(Dn)(Gs).model(Ht).model(Vt).model(rr).model(ro).model(Zr).model(ks).model(Jr).model(na).model(tr).model(zt).model(Ga).model(Ji, Sn).model(mr).model($f, Sn), Object.keys(e).forEach((s) => {
11833
+ return Iu(Dn)(Gs).model(Ht).model(Vt).model(rr).model(ro).model(Zr).model(Fs).model(Jr).model(na).model(tr).model(zt).model(Ga).model(Ji, Sn).model(mr).model($f, Sn), Object.keys(e).forEach((s) => {
11803
11834
  const r = e[s];
11804
11835
  Tu(Dn)(s, r);
11805
11836
  }), {
@@ -11879,7 +11910,7 @@ class Mr {
11879
11910
  this.future && await this.future.cancelFuture();
11880
11911
  }
11881
11912
  }
11882
- function Fw(t) {
11913
+ function kw(t) {
11883
11914
  const e = new Mr(t);
11884
11915
  t.futureHandler = e.futureHandler, Object.defineProperty(t, "_futureMixin", {
11885
11916
  value: e,
@@ -11933,7 +11964,7 @@ function zp(t) {
11933
11964
  configurable: !0
11934
11965
  }), s.cancelFuture = async () => e.cancelFuture();
11935
11966
  }
11936
- function kw() {
11967
+ function Fw() {
11937
11968
  return function(t) {
11938
11969
  const e = t;
11939
11970
  function s(...r) {
@@ -12139,7 +12170,7 @@ const zw = async (t, e) => {
12139
12170
  attribute: bc
12140
12171
  });
12141
12172
  await fe(e), e.updateProperty(t);
12142
- }, wc = "/kos-timer-event", vc = "/kos-timer-event/tick", Mc = "defaultTimerEnd", Pt = p.createLogger({ name: "timer-manager" }), Zp = (t) => t.updateProperty !== void 0;
12173
+ }, wc = "/kos-timer-event", vc = "/kos-timer-event/tick", Mc = "defaultTimerEnd", Pt = g.createLogger({ name: "timer-manager" }), Zp = (t) => t.updateProperty !== void 0;
12143
12174
  class Qp {
12144
12175
  /**
12145
12176
  * Creates a new timer.
@@ -12158,7 +12189,7 @@ class Qp {
12158
12189
  this.name = e;
12159
12190
  const o = typeof s == "number" ? s : s.value || 60;
12160
12191
  this.timeout = o, this.state = "inactive", this.remainingTime = o, Zp(s) && Y(() => {
12161
- p.info(
12192
+ g.info(
12162
12193
  `Updating config value timer ${e} with new timeout value ${s.value}`
12163
12194
  );
12164
12195
  const n = s.value || 60;
@@ -12266,8 +12297,8 @@ class Qp {
12266
12297
  });
12267
12298
  }
12268
12299
  }
12269
- const xt = /* @__PURE__ */ new Map(), tt = (t, e) => {
12270
- const s = xt.get(t);
12300
+ const Rt = /* @__PURE__ */ new Map(), tt = (t, e) => {
12301
+ const s = Rt.get(t);
12271
12302
  if (!s) {
12272
12303
  Pt.error(`Timer ${t} not found`);
12273
12304
  return;
@@ -12293,10 +12324,10 @@ const xt = /* @__PURE__ */ new Map(), tt = (t, e) => {
12293
12324
  * @returns The timer instance.
12294
12325
  */
12295
12326
  createTimer(t, e = 60, s) {
12296
- if (xt.has(t))
12297
- return xt.get(t);
12327
+ if (Rt.has(t))
12328
+ return Rt.get(t);
12298
12329
  const r = new Qp(t, e, s);
12299
- return xt.set(t, r), r;
12330
+ return Rt.set(t, r), r;
12300
12331
  },
12301
12332
  /**
12302
12333
  * Gets an existing timer by name.
@@ -12304,7 +12335,7 @@ const xt = /* @__PURE__ */ new Map(), tt = (t, e) => {
12304
12335
  * @returns The timer instance or `undefined` if not found.
12305
12336
  */
12306
12337
  getTimer(t) {
12307
- return xt.get(t);
12338
+ return Rt.get(t);
12308
12339
  },
12309
12340
  /**
12310
12341
  * Clears (pauses) an existing timer by name.
@@ -12363,30 +12394,30 @@ function Tc(t = {}) {
12363
12394
  o[_s] = o[_s] || {};
12364
12395
  const a = i.value, c = async function(...d) {
12365
12396
  const u = Jt();
12366
- p.debug(
12397
+ g.debug(
12367
12398
  `Calling future service ${n} with tracker ${u}`
12368
12399
  );
12369
12400
  let h, f;
12370
12401
  r && (h = new AbortController());
12371
- const g = ut.initiateFuture({
12402
+ const p = ut.initiateFuture({
12372
12403
  tracker: u,
12373
- id: Fi
12404
+ id: ki
12374
12405
  });
12375
- s && (g.namespace = s), p.debug(`waiting for future ${g.id} to be ready`), await fe(g), p.debug(`future ${g.id} is ready`), se(() => {
12376
- p.debug(`Adding future ${g.id} to futureHandler`), this.futureHandler.addFuture(g, e);
12406
+ s && (p.namespace = s), g.debug(`waiting for future ${p.id} to be ready`), await fe(p), g.debug(`future ${p.id} is ready`), se(() => {
12407
+ g.debug(`Adding future ${p.id} to futureHandler`), this.futureHandler.addFuture(p, e);
12377
12408
  }), r && h && (f = Y(() => {
12378
- (g.status === "CANCELLED" || g.endState === Ge.Canceled) && (p.debug(`Future ${g.id} cancelled, aborting request`), h == null || h.abort());
12409
+ (p.status === "CANCELLED" || p.endState === Ge.Canceled) && (g.debug(`Future ${p.id} cancelled, aborting request`), h == null || h.abort());
12379
12410
  }), h.signal.addEventListener(
12380
12411
  "abort",
12381
12412
  async () => {
12382
- if (g.status !== "CANCELLED" && g.endState !== Ge.Canceled && !g.endState) {
12383
- p.debug(
12384
- `AbortController aborted, cancelling future ${g.id}`
12413
+ if (p.status !== "CANCELLED" && p.endState !== Ge.Canceled && !p.endState) {
12414
+ g.debug(
12415
+ `AbortController aborted, cancelling future ${p.id}`
12385
12416
  );
12386
12417
  try {
12387
- await g.cancelFuture();
12418
+ await p.cancelFuture();
12388
12419
  } catch (b) {
12389
- p.error(`Failed to cancel future ${g.id}:`, b);
12420
+ g.error(`Failed to cancel future ${p.id}:`, b);
12390
12421
  }
12391
12422
  }
12392
12423
  },
@@ -12398,25 +12429,25 @@ function Tc(t = {}) {
12398
12429
  try {
12399
12430
  const b = [...d];
12400
12431
  if (r && h) {
12401
- const k = b[b.length - 1];
12402
- k && typeof k == "object" && "aborted" in k ? b[b.length - 1] = h.signal : b.push(h.signal);
12432
+ const F = b[b.length - 1];
12433
+ F && typeof F == "object" && "aborted" in F ? b[b.length - 1] = h.signal : b.push(h.signal);
12403
12434
  }
12404
12435
  b.push(u);
12405
12436
  const w = (
12406
12437
  // eslint-disable-next-line no-invalid-this
12407
12438
  await a.apply(this, b)
12408
12439
  );
12409
- p.debug(`received future response for ${u}`, w);
12440
+ g.debug(`received future response for ${u}`, w);
12410
12441
  const M = em(w) ? w : w == null ? void 0 : w.data;
12411
- return M ? (M.progress = 1, p.debug("mapping future response to future model"), g.endState ? p.debug(
12412
- `future ${g.id} has already completed. Not updating the model`
12413
- ) : Yi(M, g)) : this.futureHandler.removeFuture(e), y(), M;
12442
+ return M ? (M.progress = 1, g.debug("mapping future response to future model"), p.endState ? g.debug(
12443
+ `future ${p.id} has already completed. Not updating the model`
12444
+ ) : Yi(M, p)) : this.futureHandler.removeFuture(e), y(), M;
12414
12445
  } catch (b) {
12415
12446
  if (y(), r && (h != null && h.signal.aborted)) {
12416
12447
  const w = new Error("Operation cancelled");
12417
- throw p.debug(`Operation ${n} was cancelled`), w;
12448
+ throw g.debug(`Operation ${n} was cancelled`), w;
12418
12449
  }
12419
- throw p.error(b), b;
12450
+ throw g.error(b), b;
12420
12451
  }
12421
12452
  };
12422
12453
  o[_s][n] = {
@@ -12448,7 +12479,7 @@ function Vw(t) {
12448
12479
  };
12449
12480
  };
12450
12481
  }
12451
- const at = p.createLogger({ name: "services", group: "Services" }), Yw = async (t, e) => tm(t, e, `${de}/api/server/login`), tm = async (t, e, s = `${de}/api/login`) => {
12482
+ const at = g.createLogger({ name: "services", group: "Services" }), Yw = async (t, e) => tm(t, e, `${de}/api/server/login`), tm = async (t, e, s = `${de}/api/login`) => {
12452
12483
  const r = await Ie(`${s}`, {
12453
12484
  method: "POST",
12454
12485
  destinationAddress: "",
@@ -12533,27 +12564,27 @@ function Qw(t, e, s, r) {
12533
12564
  future: c
12534
12565
  } = o, d = n;
12535
12566
  let u = 0, h = "PENDING", f = !0;
12536
- const g = /* @__PURE__ */ new Set();
12567
+ const p = /* @__PURE__ */ new Set();
12537
12568
  let y;
12538
12569
  return c && typeof c == "object" && (y = Wt(() => {
12539
12570
  const b = c.progress || 0, w = c.status || "PENDING", M = !c.endState;
12540
- (b !== u || w !== h || M !== f) && (u = b, h = w, f = M, g.forEach((k) => {
12571
+ (b !== u || w !== h || M !== f) && (u = b, h = w, f = M, p.forEach((F) => {
12541
12572
  try {
12542
- k(u, h);
12573
+ F(u, h);
12543
12574
  } catch (te) {
12544
12575
  console.warn("Progress callback error:", te);
12545
12576
  }
12546
12577
  }));
12547
12578
  })), n.finally(() => {
12548
- f = !1, i != null && i.signal.aborted || (h = "COMPLETED", g.forEach((b) => {
12579
+ f = !1, i != null && i.signal.aborted || (h = "COMPLETED", p.forEach((b) => {
12549
12580
  try {
12550
12581
  b(u, h);
12551
12582
  } catch (w) {
12552
12583
  console.warn("Progress callback error:", w);
12553
12584
  }
12554
- })), y && y(), g.clear();
12585
+ })), y && y(), p.clear();
12555
12586
  }), d.cancel = async () => {
12556
- i && !i.signal.aborted && i.abort(), a && await a(), f = !1, h = "CANCELLED", g.forEach((b) => {
12587
+ i && !i.signal.aborted && i.abort(), a && await a(), f = !1, h = "CANCELLED", p.forEach((b) => {
12557
12588
  try {
12558
12589
  b(u, h);
12559
12590
  } catch (w) {
@@ -12569,7 +12600,7 @@ function Qw(t, e, s, r) {
12569
12600
  }), Object.defineProperty(d, "isRunning", {
12570
12601
  get: () => f,
12571
12602
  enumerable: !0
12572
- }), d.onProgressUpdate = (b) => (g.add(b), b(u, h), () => g.delete(b)), d;
12603
+ }), d.onProgressUpdate = (b) => (p.add(b), b(u, h), () => p.delete(b)), d;
12573
12604
  }
12574
12605
  const nm = Zc`
12575
12606
  0% {
@@ -12594,7 +12625,7 @@ function cm({
12594
12625
  message: t = "Wait a moment while we load your app.",
12595
12626
  theme: e = "light"
12596
12627
  }) {
12597
- return /* @__PURE__ */ v(am, { children: /* @__PURE__ */ Ft(lm, { theme: e, children: [
12628
+ return /* @__PURE__ */ v(am, { children: /* @__PURE__ */ kt(lm, { theme: e, children: [
12598
12629
  t,
12599
12630
  /* @__PURE__ */ v("div", { css: im, children: "." })
12600
12631
  ] }) });
@@ -12625,9 +12656,9 @@ class dm extends Ye.Component {
12625
12656
  });
12626
12657
  }
12627
12658
  render() {
12628
- return this.state.errorInfo ? this.props.fallback || /* @__PURE__ */ Ft("div", { children: [
12659
+ return this.state.errorInfo ? this.props.fallback || /* @__PURE__ */ kt("div", { children: [
12629
12660
  /* @__PURE__ */ v("h2", { children: "Something went wrong." }),
12630
- /* @__PURE__ */ Ft("details", { style: { whiteSpace: "pre-wrap" }, children: [
12661
+ /* @__PURE__ */ kt("details", { style: { whiteSpace: "pre-wrap" }, children: [
12631
12662
  this.state.error && this.state.error.toString(),
12632
12663
  /* @__PURE__ */ v("br", {}),
12633
12664
  this.state.errorInfo.componentStack
@@ -12684,8 +12715,8 @@ const um = {
12684
12715
  }
12685
12716
  }
12686
12717
  `;
12687
- return /* @__PURE__ */ Ft("div", { css: o, children: [
12688
- /* @__PURE__ */ Ft("div", { css: n, children: [
12718
+ return /* @__PURE__ */ kt("div", { css: o, children: [
12719
+ /* @__PURE__ */ kt("div", { css: n, children: [
12689
12720
  /* @__PURE__ */ v("div", { css: i, children: e }),
12690
12721
  /* @__PURE__ */ v("div", { css: [a, t < 0 ? c : ""] })
12691
12722
  ] }),
@@ -12706,7 +12737,7 @@ const um = {
12706
12737
  [s]
12707
12738
  );
12708
12739
  return /* @__PURE__ */ v(Uo.Provider, { value: { model: e, setModel: r }, children: t });
12709
- }, Ic = p.createLogger({ name: "kos-model-hierarchy-context" }), gm = {
12740
+ }, Ic = g.createLogger({ name: "kos-model-hierarchy-context" }), gm = {
12710
12741
  models: [],
12711
12742
  addModel: () => {
12712
12743
  Ic.debug("Default implementation being used. Do Nothing.");
@@ -12735,7 +12766,7 @@ const um = {
12735
12766
  const r = Se(s.id);
12736
12767
  return (r == null ? void 0 : r.type) === t;
12737
12768
  }
12738
- })[0], ym = p.createLogger({ name: "kos-model-loader" }), bm = () => /* @__PURE__ */ v("div", {}), wm = ({ fallback: t, children: e, ...s }) => /* @__PURE__ */ v(fm, { children: /* @__PURE__ */ v(dm, { fallback: t, children: /* @__PURE__ */ v(Qc, { children: /* @__PURE__ */ v(vm, { ...s, children: e }) }) }) }), vm = (t) => {
12769
+ })[0], ym = g.createLogger({ name: "kos-model-loader" }), bm = () => /* @__PURE__ */ v("div", {}), wm = ({ fallback: t, children: e, ...s }) => /* @__PURE__ */ v(fm, { children: /* @__PURE__ */ v(dm, { fallback: t, children: /* @__PURE__ */ v(Qc, { children: /* @__PURE__ */ v(vm, { ...s, children: e }) }) }) }), vm = (t) => {
12739
12770
  const [e, s] = E(), [r, o] = E(!1), { setModel: n } = Ke(Uo), i = Ke(jo);
12740
12771
  if (O(() => {
12741
12772
  t.model && (s(t.model), n(t.model), o(!0), i && i.addModel(t.model));
@@ -12845,16 +12876,16 @@ const Q = (t) => {
12845
12876
  async function f() {
12846
12877
  try {
12847
12878
  return await n.kosCore.whenReady(), r && await (u == null ? void 0 : u.fsm.transitionTo(
12848
- R.GO_ACTIVE,
12879
+ x.GO_ACTIVE,
12849
12880
  m.ACTIVE
12850
12881
  )), a(!0), u;
12851
12882
  } catch (y) {
12852
12883
  d(y.message);
12853
12884
  }
12854
12885
  }
12855
- let g;
12886
+ let p;
12856
12887
  return n.kosCore && e && f().then((y) => {
12857
- g = Y(() => {
12888
+ p = Y(() => {
12858
12889
  const b = (y == null ? void 0 : y.status) === m.READY;
12859
12890
  a(b);
12860
12891
  });
@@ -12866,18 +12897,18 @@ const Q = (t) => {
12866
12897
  const y = n.kosCore.modelManager.getModelById(
12867
12898
  h.id
12868
12899
  );
12869
- y == null || y.fsm.transitionTo(R.GO_INACTIVE, m.INACTIVE).then(() => {
12900
+ y == null || y.fsm.transitionTo(x.GO_INACTIVE, m.INACTIVE).then(() => {
12870
12901
  if (o) {
12871
12902
  const b = h.id;
12872
12903
  dt(h).then(() => {
12873
- Be.delete(b), g == null || g();
12904
+ Be.delete(b), p == null || p();
12874
12905
  });
12875
12906
  }
12876
12907
  });
12877
12908
  }
12878
12909
  } else
12879
12910
  o && h && dt(h).then(() => {
12880
- Be.delete(e), g == null || g();
12911
+ Be.delete(e), p == null || p();
12881
12912
  });
12882
12913
  };
12883
12914
  }, [
@@ -12943,7 +12974,7 @@ const Cc = Zt(
12943
12974
  function lv({ children: t }) {
12944
12975
  return /* @__PURE__ */ v(Dm.Provider, { value: Pc, children: t });
12945
12976
  }
12946
- const xc = Zt(void 0), Cm = () => {
12977
+ const Rc = Zt(void 0), Cm = () => {
12947
12978
  const t = window.location.origin, e = ye();
12948
12979
  return (e == null ? void 0 : e.host) || t;
12949
12980
  }, dv = ({
@@ -12954,12 +12985,12 @@ const xc = Zt(void 0), Cm = () => {
12954
12985
  rootUrl: o,
12955
12986
  descriptorResolver: n
12956
12987
  }) => {
12957
- const [i, a] = E(!1), [c, d] = E(), [u, h] = E(), f = o || Cm(), g = K(() => e ?? "app/system", [e]);
12988
+ const [i, a] = E(!1), [c, d] = E(), [u, h] = E(), f = o || Cm(), p = K(() => e ?? "app/system", [e]);
12958
12989
  O(() => {
12959
12990
  async function w() {
12960
- const k = (Array.isArray(g) ? g : [g]).map((W) => (n || Lg(W))()), _ = (await Promise.allSettled(k)).map((W) => {
12991
+ const F = (Array.isArray(p) ? p : [p]).map((W) => (n || Lg(W))()), _ = (await Promise.allSettled(F)).map((W) => {
12961
12992
  if (W.status === "rejected") {
12962
- p.warn("Failed to load localization descriptor", W.reason);
12993
+ g.warn("Failed to load localization descriptor", W.reason);
12963
12994
  return;
12964
12995
  }
12965
12996
  return W.value;
@@ -12976,17 +13007,17 @@ const xc = Zt(void 0), Cm = () => {
12976
13007
  d(_);
12977
13008
  }
12978
13009
  w();
12979
- }, [g, n]), O(() => {
13010
+ }, [p, n]), O(() => {
12980
13011
  async function w() {
12981
13012
  if (c) {
12982
- const M = f, { translations: k } = await zg.init({
13013
+ const M = f, { translations: F } = await zg.init({
12983
13014
  lang: s,
12984
13015
  descriptor: c,
12985
13016
  defaultNamespace: "common",
12986
13017
  resolver: r,
12987
13018
  rootUrl: M
12988
13019
  });
12989
- h(k), a(!0);
13020
+ h(F), a(!0);
12990
13021
  }
12991
13022
  }
12992
13023
  w();
@@ -13000,9 +13031,9 @@ const xc = Zt(void 0), Cm = () => {
13000
13031
  throw new Error("Translations not ready");
13001
13032
  }
13002
13033
  }, [i, u]), b = i ? t : null;
13003
- return /* @__PURE__ */ v(xc.Provider, { value: y, children: b });
13034
+ return /* @__PURE__ */ v(Rc.Provider, { value: y, children: b });
13004
13035
  }, uv = () => {
13005
- const t = Ke(xc);
13036
+ const t = Ke(Rc);
13006
13037
  if (!t)
13007
13038
  throw new Error(
13008
13039
  "useTranslationContainerContext must be used within a TranslationContainerProvider"
@@ -13016,13 +13047,13 @@ const xc = Zt(void 0), Cm = () => {
13016
13047
  options: {}
13017
13048
  });
13018
13049
  };
13019
- function xm(t) {
13050
+ function Rm(t) {
13020
13051
  return (e) => {
13021
13052
  const { model: s, status: r, KosModelLoader: o } = Pm();
13022
13053
  return /* @__PURE__ */ v(o, { ...r, children: /* @__PURE__ */ v(t, { ...e, canvasDispatcher: s }) });
13023
13054
  };
13024
13055
  }
13025
- const Rm = (t, e, s) => {
13056
+ const xm = (t, e, s) => {
13026
13057
  const r = atob(t), o = new Uint8ClampedArray(e * s * 4);
13027
13058
  for (let n = 0, i = 0; n < r.length && i < o.length; n += 3, i += 4)
13028
13059
  o[i] = r.charCodeAt(n), o[i + 1] = r.charCodeAt(n + 1), o[i + 2] = r.charCodeAt(n + 2), o[i + 3] = 255;
@@ -13043,14 +13074,14 @@ function Lm({
13043
13074
  height: o,
13044
13075
  pixelSize: n
13045
13076
  }) {
13046
- const i = e === "base64" ? Rm(s, r, o) : Am(s, r, o), a = new ImageData(i, r, o), c = document.createElement("canvas");
13077
+ const i = e === "base64" ? xm(s, r, o) : Am(s, r, o), a = new ImageData(i, r, o), c = document.createElement("canvas");
13047
13078
  c.width = r, c.height = o;
13048
13079
  const d = c.getContext("2d");
13049
13080
  d == null || d.putImageData(a, 0, 0), t.imageSmoothingEnabled = !1, t.clearRect(0, 0, r * n, o * n), t.drawImage(c, 0, 0, r * n, o * n);
13050
13081
  }
13051
- const Fm = p.createLogger({ name: "canvas-streamer" });
13052
- Fm.debug("main-view component loaded");
13053
- const Nr = 10, km = Bn(
13082
+ const km = g.createLogger({ name: "canvas-streamer" });
13083
+ km.debug("main-view component loaded");
13084
+ const Nr = 10, Fm = Bn(
13054
13085
  ({
13055
13086
  canvasDispatcher: t,
13056
13087
  height: e = 30,
@@ -13102,7 +13133,7 @@ const Nr = 10, km = Bn(
13102
13133
  document.body
13103
13134
  );
13104
13135
  }
13105
- ), hv = xm(km), Nm = lo.div`
13136
+ ), hv = Rm(Fm), Nm = lo.div`
13106
13137
  display: flex;
13107
13138
  flex-direction: column;
13108
13139
  gap: 8px;
@@ -13236,7 +13267,7 @@ function vv(t) {
13236
13267
  return /* @__PURE__ */ v(o, { ...r, children: /* @__PURE__ */ v(t, { ...e, storageDeviceContainer: s }) });
13237
13268
  };
13238
13269
  }
13239
- const Ur = p.createLogger({ name: "use-timer" }), Mv = ({
13270
+ const Ur = g.createLogger({ name: "use-timer" }), Mv = ({
13240
13271
  timerName: t,
13241
13272
  onTimerExpired: e,
13242
13273
  onTimerTick: s,
@@ -13250,8 +13281,8 @@ const Ur = p.createLogger({ name: "use-timer" }), Mv = ({
13250
13281
  return;
13251
13282
  }
13252
13283
  const d = $(wc, (u) => {
13253
- const { name: h, action: f, remainingTime: g } = u == null ? void 0 : u.body;
13254
- h === t && (f === Mc ? e({ name: h, action: f, remainingTime: g, timer: n }) : r != null && r[f] && r[f]({ name: h, action: f, remainingTime: g, timer: n }));
13284
+ const { name: h, action: f, remainingTime: p } = u == null ? void 0 : u.body;
13285
+ h === t && (f === Mc ? e({ name: h, action: f, remainingTime: p, timer: n }) : r != null && r[f] && r[f]({ name: h, action: f, remainingTime: p, timer: n }));
13255
13286
  });
13256
13287
  return o && n.start(), () => {
13257
13288
  d.unsubscribe();
@@ -13260,8 +13291,8 @@ const Ur = p.createLogger({ name: "use-timer" }), Mv = ({
13260
13291
  if (!n || !s)
13261
13292
  return;
13262
13293
  const d = `${vc}/${t}`, u = $(d, (h) => {
13263
- const { name: f, remainingTime: g } = h == null ? void 0 : h.body;
13264
- f === t && s({ name: f, remainingTime: g, timer: n });
13294
+ const { name: f, remainingTime: p } = h == null ? void 0 : h.body;
13295
+ f === t && s({ name: f, remainingTime: p, timer: n });
13265
13296
  });
13266
13297
  return () => {
13267
13298
  u.unsubscribe();
@@ -13336,7 +13367,7 @@ function Pn(t, e) {
13336
13367
  return Qm(t, e);
13337
13368
  }
13338
13369
  const Jm = async () => {
13339
- const t = await vu(Fe.type);
13370
+ const t = await vu(ke.type);
13340
13371
  return await fe(t.model), t.model;
13341
13372
  }, Xm = async (t, e, s) => {
13342
13373
  const r = t.resolveNamespace(e);
@@ -13348,7 +13379,7 @@ const Jm = async () => {
13348
13379
  return r;
13349
13380
  }, Ev = (t, e) => {
13350
13381
  const s = [t].flat(), [r, ...o] = s, n = Pn(
13351
- Fe.type,
13382
+ ke.type,
13352
13383
  Jm
13353
13384
  ), i = s.join("__"), a = Pn(
13354
13385
  i,
@@ -13362,17 +13393,17 @@ const Jm = async () => {
13362
13393
  return { t: Z(
13363
13394
  (u, h) => {
13364
13395
  const f = e != null && e.keyPrefix ? `${e.keyPrefix}.${u}` : u;
13365
- return a ? a.resolveKey(f, h) : (p.debug(
13396
+ return a ? a.resolveKey(f, h) : (g.debug(
13366
13397
  `Translation model ${t} not ready for key: ${f}`
13367
13398
  ), f);
13368
13399
  },
13369
13400
  [e == null ? void 0 : e.keyPrefix, t, a]
13370
13401
  ), i18n: c };
13371
13402
  }, ey = () => {
13372
- const t = Fe.type;
13403
+ const t = ke.type;
13373
13404
  return Q({
13374
13405
  modelId: t,
13375
- modelType: Fe.type,
13406
+ modelType: ke.type,
13376
13407
  options: {}
13377
13408
  });
13378
13409
  };
@@ -13385,7 +13416,7 @@ function Tv(t) {
13385
13416
  const Iv = (t) => Q({
13386
13417
  modelId: t,
13387
13418
  modelType: Gs.type
13388
- }), Rc = () => Q({
13419
+ }), xc = () => Q({
13389
13420
  modelId: Ht.type,
13390
13421
  modelType: Ht.type,
13391
13422
  options: {}
@@ -13393,7 +13424,7 @@ const Iv = (t) => Q({
13393
13424
  troubleType: t,
13394
13425
  condition: e
13395
13426
  }) => {
13396
- const { model: s } = Rc(), [r, o] = E(!1), [n, i] = E([]), a = Z(() => {
13427
+ const { model: s } = xc(), [r, o] = E(!1), [n, i] = E([]), a = Z(() => {
13397
13428
  var c, d;
13398
13429
  return n.length > 0 && ((c = n[0]) != null && c.resolvable) ? (d = n[0]) == null ? void 0 : d.resolve() : Promise.resolve(void 0);
13399
13430
  }, [n]);
@@ -13409,7 +13440,7 @@ const Iv = (t) => Q({
13409
13440
  };
13410
13441
  function Ov(t) {
13411
13442
  return (e) => {
13412
- const { model: s, status: r, KosModelLoader: o } = Rc();
13443
+ const { model: s, status: r, KosModelLoader: o } = xc();
13413
13444
  return /* @__PURE__ */ v(o, { ...r, children: /* @__PURE__ */ v(t, { ...e, troubleContainer: s }) });
13414
13445
  };
13415
13446
  }
@@ -13439,7 +13470,7 @@ function Sv(t) {
13439
13470
  }
13440
13471
  const Dv = ({ path: t, propKey: e }) => {
13441
13472
  const { status: s } = Q({
13442
- modelType: ks.type,
13473
+ modelType: Fs.type,
13443
13474
  modelId: t,
13444
13475
  options: {
13445
13476
  path: t
@@ -13592,7 +13623,7 @@ function Pv({
13592
13623
  function we(t) {
13593
13624
  return t.toString().length === 2 ? new Date(Date.parse(`01 Jan 20${t}`)).getFullYear() : t;
13594
13625
  }
13595
- function xv(t) {
13626
+ function Rv(t) {
13596
13627
  return typeof t == "string" ? new Date(Date.parse(`01 ${t.substring(0, 3)} 2023`)).getMonth() + 1 : t;
13597
13628
  }
13598
13629
  function ly(t, e, s) {
@@ -13624,14 +13655,14 @@ function uy({
13624
13655
  dayFormat: a = "short"
13625
13656
  } = {}
13626
13657
  }) {
13627
- const c = Lc(n, r), d = hy(n, r, t), u = fy(i, t), h = gy(i, t), f = Fc(e, s), g = my(e, s, t, o), y = wy(s, e, g), b = yy(t, a);
13658
+ const c = Lc(n, r), d = hy(n, r, t), u = fy(i, t), h = gy(i, t), f = kc(e, s), p = my(e, s, t, o), y = wy(s, e, p), b = yy(t, a);
13628
13659
  return {
13629
13660
  daysArray: f,
13630
13661
  monthsArray: u,
13631
13662
  yearsArray: c,
13632
13663
  yearsOptionsArray: d,
13633
13664
  monthsOptionsArray: h,
13634
- daysOptionsArray: g,
13665
+ daysOptionsArray: p,
13635
13666
  calendarDayArray: y,
13636
13667
  dayNamesArray: b
13637
13668
  };
@@ -13671,7 +13702,7 @@ function gy(t, e = "en-US") {
13671
13702
  [r, s]
13672
13703
  );
13673
13704
  }
13674
- function Fc(t, e) {
13705
+ function kc(t, e) {
13675
13706
  const s = we(t);
13676
13707
  return K(
13677
13708
  () => ny(s, e),
@@ -13683,7 +13714,7 @@ const py = (t, e, s, r = []) => {
13683
13714
  return r.length > 0 && r.includes(o);
13684
13715
  };
13685
13716
  function my(t, e, s = "en-US", r = []) {
13686
- const o = Fc(t, e);
13717
+ const o = kc(t, e);
13687
13718
  return K(
13688
13719
  () => o.map((i) => ({
13689
13720
  label: i.toLocaleString(s),
@@ -13715,7 +13746,7 @@ function wy(t, e, s) {
13715
13746
  );
13716
13747
  }
13717
13748
  var vy = /* @__PURE__ */ ((t) => (t.MMDDYY = "MMDDYY", t.DDMMYY = "DDMMYY", t.YYMMDD = "YYMMDD", t.YYDDMM = "YYDDMM", t))(vy || {});
13718
- function Rv({
13749
+ function xv({
13719
13750
  locale: t = "en-US",
13720
13751
  date: {
13721
13752
  year: e = (/* @__PURE__ */ new Date()).getFullYear(),
@@ -13737,7 +13768,7 @@ function Rv({
13737
13768
  daysOfWeekFilter: d = []
13738
13769
  } = {}
13739
13770
  }) {
13740
- const [u, h] = E(e), [f, g] = E(c), [y, b] = E(s), [w, M] = E(r);
13771
+ const [u, h] = E(e), [f, p] = E(c), [y, b] = E(s), [w, M] = E(r);
13741
13772
  O(() => {
13742
13773
  h(e);
13743
13774
  }, [e]), O(() => {
@@ -13746,9 +13777,9 @@ function Rv({
13746
13777
  M(r);
13747
13778
  }, [r]);
13748
13779
  const {
13749
- yearsArray: k,
13780
+ yearsArray: F,
13750
13781
  yearsOptionsArray: te,
13751
- monthsArray: x,
13782
+ monthsArray: R,
13752
13783
  monthsOptionsArray: _,
13753
13784
  daysArray: W,
13754
13785
  daysOptionsArray: U,
@@ -13774,7 +13805,7 @@ function Rv({
13774
13805
  return {
13775
13806
  dateActions: {
13776
13807
  setYear: h,
13777
- setYearRange: g,
13808
+ setYearRange: p,
13778
13809
  setMonth: b,
13779
13810
  setDay: M,
13780
13811
  nextMonth: () => {
@@ -13817,9 +13848,9 @@ function Rv({
13817
13848
  yearRange: f,
13818
13849
  month: y,
13819
13850
  day: w,
13820
- yearsArray: k,
13851
+ yearsArray: F,
13821
13852
  yearsOptionsArray: te,
13822
- monthsArray: x,
13853
+ monthsArray: R,
13823
13854
  monthsOptionsArray: _,
13824
13855
  daysArray: W,
13825
13856
  daysOptionsArray: U,
@@ -13866,8 +13897,8 @@ const _y = ({
13866
13897
  }
13867
13898
  });
13868
13899
  return O(() => {
13869
- const u = Number(t), h = Math.floor(u / 3600), f = Math.floor(u % 3600 / 60), g = u % 60;
13870
- s(h), o(f), i(g);
13900
+ const u = Number(t), h = Math.floor(u / 3600), f = Math.floor(u % 3600 / 60), p = u % 60;
13901
+ s(h), o(f), i(p);
13871
13902
  const y = /* @__PURE__ */ new Date();
13872
13903
  y.setHours(0, 0, 0, 0);
13873
13904
  const b = new Date(y.getTime() + u * 1e3);
@@ -13920,7 +13951,7 @@ function Lv(t, e = {}) {
13920
13951
  };
13921
13952
  }, [t, s, r]);
13922
13953
  }
13923
- const Ey = (t) => /* @__PURE__ */ v("option", { title: t.id, value: t.format, children: t.format }, t.id), Fv = (t = Ey) => {
13954
+ const Ey = (t) => /* @__PURE__ */ v("option", { title: t.id, value: t.format, children: t.format }, t.id), kv = (t = Ey) => {
13924
13955
  const [e, s] = E([]), [r, o] = E(), { model: n, ready: i } = Q({
13925
13956
  modelType: ne.type,
13926
13957
  modelId: ne.type,
@@ -13964,7 +13995,7 @@ const Ey = (t) => /* @__PURE__ */ v("option", { title: t.id, value: t.format, ch
13964
13995
  options: e
13965
13996
  }
13966
13997
  };
13967
- }, Ty = (t) => /* @__PURE__ */ v("option", { title: t, value: t, children: t }, t), kc = "kos:service:region:settings", Nc = "timeZone", Iy = `${kc}-${Nc}`, kv = (t = Ty) => {
13998
+ }, Ty = (t) => /* @__PURE__ */ v("option", { title: t, value: t, children: t }, t), Fc = "kos:service:region:settings", Nc = "timeZone", Iy = `${Fc}-${Nc}`, Fv = (t = Ty) => {
13968
13999
  const [e, s] = E([]), [r, o] = E(""), { model: n, ready: i } = Q({
13969
14000
  modelType: ne.type,
13970
14001
  modelId: ne.type,
@@ -13972,7 +14003,7 @@ const Ey = (t) => /* @__PURE__ */ v("option", { title: t.id, value: t.format, ch
13972
14003
  }), a = wt.factory(
13973
14004
  Iy
13974
14005
  )({
13975
- path: kc,
14006
+ path: Fc,
13976
14007
  attribute: Nc
13977
14008
  });
13978
14009
  O(() => {
@@ -14115,7 +14146,7 @@ function jv(t, e, s = Cy) {
14115
14146
  try {
14116
14147
  r.observe(t, n);
14117
14148
  } catch (i) {
14118
- p.error(i);
14149
+ g.error(i);
14119
14150
  }
14120
14151
  return () => {
14121
14152
  r && r.disconnect();
@@ -14130,7 +14161,7 @@ const Py = {
14130
14161
  const e = t.event.currentTarget.getBoundingClientRect(), [s, r] = t.xy;
14131
14162
  return s < e.left || s > e.right || r < e.top || r > e.bottom;
14132
14163
  }
14133
- }, jr = p.createLogger({
14164
+ }, jr = g.createLogger({
14134
14165
  name: "usePressGesture",
14135
14166
  group: "kos-hooks"
14136
14167
  });
@@ -14165,7 +14196,7 @@ function Bv({
14165
14196
  })
14166
14197
  };
14167
14198
  }
14168
- const xy = () => {
14199
+ const Ry = () => {
14169
14200
  const [t, e] = E(!1), s = T.getInstance();
14170
14201
  return O(() => {
14171
14202
  const r = Y(() => {
@@ -14176,7 +14207,7 @@ const xy = () => {
14176
14207
  };
14177
14208
  }, [s, t]), [t];
14178
14209
  };
14179
- function Ry(t = !1, e = "2-digit") {
14210
+ function xy(t = !1, e = "2-digit") {
14180
14211
  return K(() => {
14181
14212
  const s = t ? 12 : 24;
14182
14213
  return Array.from({ length: s }, (r, o) => {
@@ -14188,7 +14219,7 @@ function Ry(t = !1, e = "2-digit") {
14188
14219
  });
14189
14220
  }, [e, t]);
14190
14221
  }
14191
- function xn(t, e = "2-digit", s = 0, r = 0) {
14222
+ function Rn(t, e = "2-digit", s = 0, r = 0) {
14192
14223
  return K(
14193
14224
  () => Array.from({ length: t }, (o, n) => {
14194
14225
  const i = String(n + s);
@@ -14221,7 +14252,7 @@ function Ly({
14221
14252
  } = { hour12: !0, hour: "2-digit", minute: "2-digit", second: "2-digit" },
14222
14253
  locale: o = "en-US"
14223
14254
  }) {
14224
- const n = Ry(t, e), i = xn(60, s), a = xn(60, r), c = Ay(o);
14255
+ const n = xy(t, e), i = Rn(60, s), a = Rn(60, r), c = Ay(o);
14225
14256
  return {
14226
14257
  hourOptions: n,
14227
14258
  minuteOptions: i,
@@ -14229,10 +14260,10 @@ function Ly({
14229
14260
  amPmOptions: c
14230
14261
  };
14231
14262
  }
14232
- function Fy(t, e) {
14263
+ function ky(t, e) {
14233
14264
  return He(t, e);
14234
14265
  }
14235
- function ky({
14266
+ function Fy({
14236
14267
  formatOptions: t,
14237
14268
  initialDate: e = /* @__PURE__ */ new Date(),
14238
14269
  locale: s = "en-US",
@@ -14256,7 +14287,7 @@ function ky({
14256
14287
  }, []), d = Z((b) => {
14257
14288
  const w = new Date(b);
14258
14289
  n(w);
14259
- }, []), u = Fy(o, r), { hourOptions: h, minuteOptions: f, secondOptions: g, amPmOptions: y } = Ly({
14290
+ }, []), u = ky(o, r), { hourOptions: h, minuteOptions: f, secondOptions: p, amPmOptions: y } = Ly({
14260
14291
  formatOptions: t,
14261
14292
  locale: s
14262
14293
  });
@@ -14265,7 +14296,7 @@ function ky({
14265
14296
  formattedTime: u,
14266
14297
  hourOptions: h,
14267
14298
  minuteOptions: f,
14268
- secondOptions: g,
14299
+ secondOptions: p,
14269
14300
  setHours: i,
14270
14301
  setMinutes: a,
14271
14302
  setSeconds: c,
@@ -14275,7 +14306,7 @@ function ky({
14275
14306
  }
14276
14307
  const Hv = (t) => {
14277
14308
  const { regionModel: e } = Sy(), s = K(() => ({ hour12: e == null ? void 0 : e.is12HourTimeFormat }), [e == null ? void 0 : e.is12HourTimeFormat]);
14278
- return ky({
14309
+ return Fy({
14279
14310
  ...t,
14280
14311
  locale: e == null ? void 0 : e.regionId,
14281
14312
  format: e == null ? void 0 : e.selectedTimeFormat,
@@ -14284,17 +14315,17 @@ const Hv = (t) => {
14284
14315
  };
14285
14316
  function Kv(t) {
14286
14317
  return (e) => {
14287
- const [s] = xy();
14318
+ const [s] = Ry();
14288
14319
  return s ? /* @__PURE__ */ v(cm, { message: "Wait a moment while your project reloads..." }) : /* @__PURE__ */ v(t, { ...e });
14289
14320
  };
14290
14321
  }
14291
- const Rn = p.createLogger({
14322
+ const xn = g.createLogger({
14292
14323
  name: "studio-properties-service",
14293
14324
  group: "Services"
14294
14325
  }), Ny = "/api/kos/studio/properties", Bc = async (t) => {
14295
- if (Rn.debug("sending GET for studio-properties"), !t)
14296
- throw Rn.error("connectionId is undefined"), new Error("connectionId is undefined");
14297
- return await Re.get(
14326
+ if (xn.debug("sending GET for studio-properties"), !t)
14327
+ throw xn.error("connectionId is undefined"), new Error("connectionId is undefined");
14328
+ return await xe.get(
14298
14329
  Ny,
14299
14330
  {},
14300
14331
  {
@@ -14335,7 +14366,7 @@ let ao = class {
14335
14366
  (t = this.unsubscribe) == null || t.call(this);
14336
14367
  }
14337
14368
  async initializePropertiesSession() {
14338
- this.unsubscribe = kt.getInstance().subscribeTopic({
14369
+ this.unsubscribe = Ft.getInstance().subscribeTopic({
14339
14370
  topic: Hy,
14340
14371
  destinationAddress: this.connectionId,
14341
14372
  callback: (s) => {
@@ -14351,7 +14382,7 @@ let ao = class {
14351
14382
  }
14352
14383
  if (e) {
14353
14384
  const s = Object.keys(e).reduce((r, o) => (r[o] = e[o] ?? o, r), {});
14354
- this.data.setValues(s ?? An), p.ifDebug(
14385
+ this.data.setValues(s ?? An), g.ifDebug(
14355
14386
  () => this.logger.debug(`studio-properties loaded: ${JSON.stringify(s)}`)
14356
14387
  );
14357
14388
  }
@@ -14371,7 +14402,7 @@ const Gv = new Te({
14371
14402
  type: Hc
14372
14403
  });
14373
14404
  export {
14374
- xu as AuthState,
14405
+ Ru as AuthState,
14375
14406
  de as BASE_URL,
14376
14407
  lh as BrowserKosRouter,
14377
14408
  Ji as BrowserRouter,
@@ -14379,11 +14410,11 @@ export {
14379
14410
  Dw as CanvasDispatcherServices,
14380
14411
  Ga as CanvasRenderer,
14381
14412
  hv as CanvasStreamer,
14382
- km as CanvasStreamerBase,
14413
+ Fm as CanvasStreamerBase,
14383
14414
  Es as ChildModels,
14384
14415
  Gp as CompanionDecoratorMixin,
14385
14416
  Hr as CompanionParentModel,
14386
- ks as ConfigBean,
14417
+ Fs as ConfigBean,
14387
14418
  Lw as CoreExtensionManager,
14388
14419
  mc as CoreModels,
14389
14420
  Mm as CreateModelTranslationsContext,
@@ -14399,7 +14430,7 @@ export {
14399
14430
  cw as EVENT_TROUBLE_ADDED,
14400
14431
  lw as EVENT_TROUBLE_REMOVED,
14401
14432
  oe as EXTENSION_CANVAS_RENDERER,
14402
- Fl as EXTENSION_FEATURE_FLAG_RESOLVER,
14433
+ kl as EXTENSION_FEATURE_FLAG_RESOLVER,
14403
14434
  Wr as EXTENSION_TROUBLE_DATA_MAPPER,
14404
14435
  yr as EXTENSION_TROUBLE_MAPPER,
14405
14436
  dm as ErrorBoundaryWithFallback,
@@ -14409,8 +14440,8 @@ export {
14409
14440
  I as ExtensionManager,
14410
14441
  af as FUTURE_CONTAINER_MODEL_TYPE,
14411
14442
  Bh as FUTURE_MODEL_TYPE,
14412
- Fi as FUTURE_NOT_ASSIGNED,
14413
- kl as FeatureFlagService,
14443
+ ki as FUTURE_NOT_ASSIGNED,
14444
+ Fl as FeatureFlagService,
14414
14445
  pe as FetchError,
14415
14446
  Ve as FutureContainerFactory,
14416
14447
  hf as FutureContainerModel,
@@ -14444,22 +14475,22 @@ export {
14444
14475
  G as KosContextManager,
14445
14476
  T as KosCore,
14446
14477
  Me as KosCoreModelPropertyMapper,
14447
- xi as KosDataContainer,
14478
+ Ri as KosDataContainer,
14448
14479
  Tb as KosDependencyTypes,
14449
14480
  gb as KosExtensionUtils,
14450
14481
  Nl as KosFeatureFlags,
14451
14482
  Ud as KosFetchMethods,
14452
14483
  pi as KosGlobalConfig,
14453
14484
  Ii as KosHttpRouteManager,
14454
- p as KosLog,
14485
+ g as KosLog,
14455
14486
  $f as KosLogManager,
14456
14487
  bw as KosLogManagerServices,
14457
14488
  al as KosMockEvents,
14458
14489
  hu as KosModel,
14459
14490
  ev as KosModelCollectionProvider,
14460
- xe as KosModelContainer,
14491
+ Re as KosModelContainer,
14461
14492
  Uo as KosModelContext,
14462
- R as KosModelEvents,
14493
+ x as KosModelEvents,
14463
14494
  Ds as KosModelFactory,
14464
14495
  Mr as KosModelFutureContainerMixin,
14465
14496
  wm as KosModelLoader,
@@ -14491,7 +14522,7 @@ export {
14491
14522
  Hs as LogBlock,
14492
14523
  Co as LogBlockContainer,
14493
14524
  Is as LogConfig,
14494
- Rs as LogStream,
14525
+ xs as LogStream,
14495
14526
  mr as LogStreamContainer,
14496
14527
  vw as LogStreamServices,
14497
14528
  mu as MODEL_DELETION_DELAY,
@@ -14532,7 +14563,7 @@ export {
14532
14563
  Tw as StatePropServices,
14533
14564
  io as StorageDevice,
14534
14565
  Vt as StorageDeviceContainer,
14535
- xw as StorageDeviceServices,
14566
+ Rw as StorageDeviceServices,
14536
14567
  Gv as StudioProperties,
14537
14568
  zv as StudioPropertiesServices,
14538
14569
  re as SubscriptionHandlers,
@@ -14547,8 +14578,8 @@ export {
14547
14578
  Dr as TransitionMap,
14548
14579
  _i as Transitions,
14549
14580
  to as Translation,
14550
- Fe as TranslationContainer,
14551
- xc as TranslationContainerContext,
14581
+ ke as TranslationContainer,
14582
+ Rc as TranslationContainerContext,
14552
14583
  $w as TranslationContext,
14553
14584
  en as TransportFactory,
14554
14585
  Gs as Trouble,
@@ -14557,10 +14588,10 @@ export {
14557
14588
  ge as Troubles,
14558
14589
  gc as UsbUpdate,
14559
14590
  rr as UsbUpdateContainer,
14560
- Rw as UsbUpdateServices,
14591
+ xw as UsbUpdateServices,
14561
14592
  Gg as WS_EVENT_TYPE,
14562
14593
  Os as WebSocketEvents,
14563
- kt as WebSocketTransport,
14594
+ Ft as WebSocketTransport,
14564
14595
  Ba as WsEventFactory,
14565
14596
  Kt as WsEventModel,
14566
14597
  om as acceptOrgInvitation,
@@ -14624,7 +14655,7 @@ export {
14624
14655
  di as getDaysInMonth,
14625
14656
  wd as getDependenciesByLifecycle,
14626
14657
  Pv as getFormattedDate,
14627
- xv as getFormattedMonth,
14658
+ Rv as getFormattedMonth,
14628
14659
  Ac as getFormattedMonthsArray,
14629
14660
  we as getFormattedYear,
14630
14661
  cy as getFormattedYearsArray,
@@ -14695,7 +14726,7 @@ export {
14695
14726
  Gw as kosStateBean,
14696
14727
  Vw as kosStateProp,
14697
14728
  Db as kosSubscribe,
14698
- F as kosTopicHandler,
14729
+ k as kosTopicHandler,
14699
14730
  un as kosWhen,
14700
14731
  tm as login,
14701
14732
  qv as makeAutoObservable,
@@ -14721,7 +14752,7 @@ export {
14721
14752
  Kb as registerCompanionModel,
14722
14753
  Kp as registerCoreModels,
14723
14754
  dr as registerExtensionPoint,
14724
- xb as registerHttpRoutes,
14755
+ Rb as registerHttpRoutes,
14725
14756
  Iu as registerKosModel,
14726
14757
  Tu as registerLegacyModel,
14727
14758
  wu as resetKosModel,
@@ -14738,17 +14769,17 @@ export {
14738
14769
  Bl as resolveVariable,
14739
14770
  Zb as retryWithExponentialBackoff,
14740
14771
  ow as sendAsyncIntent,
14741
- Fb as sendBroadcastMessage,
14772
+ kb as sendBroadcastMessage,
14742
14773
  rw as sendIntent,
14743
14774
  Zd as sendKosHttpMessageResponse,
14744
- Rb as sendKosMessage,
14775
+ xb as sendKosMessage,
14745
14776
  Wd as sendKosMessageResponse,
14746
14777
  Jb as sendRequest,
14747
14778
  Lb as sendStudioMessage,
14748
14779
  Ab as sendStudioMessageRequest,
14749
14780
  Hw as setupCompanionDecoratorMixin,
14750
14781
  zp as setupCompleteFutureSupport,
14751
- Fw as setupMinimalFutureSupport,
14782
+ kw as setupMinimalFutureSupport,
14752
14783
  sm as startPasswordReset,
14753
14784
  Wm as stringComponentInsert,
14754
14785
  Zw as studioAcceptOrgInvitation,
@@ -14776,25 +14807,25 @@ export {
14776
14807
  Xw as useContextModel,
14777
14808
  mm as useContextModelHierarchy,
14778
14809
  uy as useDateArrays,
14779
- Rv as useDateProps,
14810
+ xv as useDateProps,
14780
14811
  Av as useDateRelativeConfig,
14781
14812
  _y as useDateRelativeData,
14782
14813
  yy as useDayNames,
14783
14814
  my as useDayOptions,
14784
- Fc as useDays,
14815
+ kc as useDays,
14785
14816
  jm as useDevice,
14786
14817
  by as useFormattedDate,
14787
- Fy as useFormattedTime,
14818
+ ky as useFormattedTime,
14788
14819
  Lv as useFunctionWarmup,
14789
- Ry as useHourValues,
14820
+ xy as useHourValues,
14790
14821
  Em as useKosCore,
14791
- Fv as useKosDateFormats,
14822
+ kv as useKosDateFormats,
14792
14823
  Q as useKosModel,
14793
14824
  Sy as useKosRegions,
14794
14825
  Oc as useKosTime,
14795
14826
  nv as useKosTimeContext,
14796
14827
  Nv as useKosTimeFormats,
14797
- kv as useKosTimeZones,
14828
+ Fv as useKosTimeZones,
14798
14829
  Ev as useKosTranslation,
14799
14830
  uv as useKosTranslationContext,
14800
14831
  Uv as useLocalComputed,
@@ -14805,7 +14836,7 @@ export {
14805
14836
  Bm as useNetworkInterfaceContainer,
14806
14837
  Hm as useOta,
14807
14838
  Bv as usePressGesture,
14808
- xy as useProjectReload,
14839
+ Ry as useProjectReload,
14809
14840
  Hv as useRegionTimeProps,
14810
14841
  My as useRegionalTimeDate,
14811
14842
  Dc as useSoftwareInfo,
@@ -14814,11 +14845,11 @@ export {
14814
14845
  zm as useStorageDeviceContainer,
14815
14846
  Pn as useSuspenseData,
14816
14847
  Ly as useTimeOptions,
14817
- ky as useTimeProps,
14818
- xn as useTimeValues,
14848
+ Fy as useTimeProps,
14849
+ Rn as useTimeValues,
14819
14850
  Mv as useTimer,
14820
14851
  ey as useTranslationContainer,
14821
- Rc as useTroubleContainerModel,
14852
+ xc as useTroubleContainerModel,
14822
14853
  Iv as useTroubleModel,
14823
14854
  $v as useTroublePresence,
14824
14855
  ty as useUsbUpdateContainer,
@@ -14831,7 +14862,7 @@ export {
14831
14862
  Ci as waitForRequest,
14832
14863
  fe as whenReady,
14833
14864
  fv as withDevice,
14834
- kw as withKosModelFutures,
14865
+ Fw as withKosModelFutures,
14835
14866
  pv as withKosTime,
14836
14867
  mv as withNetworkInterfaceContainer,
14837
14868
  yv as withOta,