@kosdev-code/kos-ui-sdk 2.0.6 → 2.0.7

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
@@ -3,19 +3,19 @@ var wa = (e, t, s) => t in e ? ba(e, t, { enumerable: !0, configurable: !0, writ
3
3
  var a = (e, t, s) => (wa(e, typeof t != "symbol" ? t + "" : t, s), s);
4
4
  import I from "loglevel";
5
5
  import { runInAction as F, observable as Y, makeAutoObservable as ge, action as zr, ObservableMap as Vr, makeObservable as Yr, computed as Hr, reaction as Pt, when as Se, autorun as _t, createAtom as va, observe as qr, isComputedProp as _a, isObservable as Ma } from "mobx";
6
- import { makeAutoObservable as Ey, makeObservable as Ty } from "mobx";
6
+ import { makeAutoObservable as Ty, makeObservable as Oy } from "mobx";
7
7
  import { createMachine as Mt, state as x, transition as $, invoke as ue, action as C, interpret as It, immediate as He } from "robot3";
8
8
  import { format as Ae, parseISO as Ia } from "date-fns";
9
9
  import { jsx as w, jsxs as $t, Fragment as $a } from "@emotion/react/jsx-runtime";
10
10
  import Ea from "@emotion/styled";
11
11
  import { createPortal as Ta } from "react-dom";
12
12
  import { keyframes as Oa, css as ze } from "@emotion/react";
13
- import Pe, { createContext as Nt, useContext as Ce, useState as v, useCallback as X, useMemo as N, Suspense as Da, useEffect as T, useRef as Do, useReducer as Sa } from "react";
13
+ import Pe, { createContext as kt, useContext as Ce, useState as v, useCallback as X, useMemo as k, Suspense as Da, useEffect as E, useRef as Do, useReducer as Sa } from "react";
14
14
  import { observer as Aa } from "mobx-react-lite";
15
- import { observer as Dy } from "mobx-react-lite";
15
+ import { observer as Sy } from "mobx-react-lite";
16
16
  import { useGesture as Ca } from "@use-gesture/react";
17
- const So = "method", Ra = "topic", kt = "url", Ns = "request-id", Ao = "response-id", Zr = "status", Me = "dst-addr", La = "src-addr", ye = "type", Wr = "ordered", Jr = "tracker", Pa = "Content-Type", Na = "Cache-Control", ka = "requestId", xa = process.env.KOS_LOGIN_URL || "http://localhost", Fa = process.env.KOS_APP_PORT || "8080", of = `${xa}:${Fa}`, uo = "{MODEL_ID}";
18
- var ks = /* @__PURE__ */ ((e) => (e.SEND = "/ws/log/msg/send", e.RECEIVED = "/ws/log/msg/receive", e))(ks || {}), Ua = /* @__PURE__ */ ((e) => (e.MSG_RECEIVE = "/mock/msg/receive", e))(Ua || {});
17
+ const So = "method", Ra = "topic", Nt = "url", ks = "request-id", Ao = "response-id", Zr = "status", Me = "dst-addr", La = "src-addr", ye = "type", Wr = "ordered", Jr = "tracker", Pa = "Content-Type", ka = "Cache-Control", Na = "requestId", xa = process.env.KOS_LOGIN_URL || "http://localhost", Fa = process.env.KOS_APP_PORT || "8080", of = `${xa}:${Fa}`, uo = "{MODEL_ID}";
18
+ var Ns = /* @__PURE__ */ ((e) => (e.SEND = "/ws/log/msg/send", e.RECEIVED = "/ws/log/msg/receive", e))(Ns || {}), Ua = /* @__PURE__ */ ((e) => (e.MSG_RECEIVE = "/mock/msg/receive", e))(Ua || {});
19
19
  I.info("Initializing event bus");
20
20
  globalThis.kos = globalThis.kos || {};
21
21
  globalThis.kos.subscriptions = globalThis.kos.subscriptions || {};
@@ -522,8 +522,8 @@ const yf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
522
522
  let r = `${So}:${s}
523
523
  `;
524
524
  return r += `topic:${e}
525
- `, r += `${kt}:${e}
526
- `, r += `${Ns}:${t}
525
+ `, r += `${Nt}:${e}
526
+ `, r += `${ks}:${t}
527
527
  `, o && (r += `${Me}:${o}
528
528
  `), r += `${ye}:kos.studio.request
529
529
  `, r += `
@@ -539,8 +539,8 @@ const yf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
539
539
  let i = `${Ra}:/http${e}
540
540
  `;
541
541
  return i += `${So}:${s}
542
- `, i += `${kt}:${e}
543
- `, i += `${ka}:${t}
542
+ `, i += `${Nt}:${e}
543
+ `, i += `${Na}:${t}
544
544
  `, o && (i += `${Me}:${o}
545
545
  `), r && (i += `${Wr}:true
546
546
  `), n && (i += `${Jr}:${n}
@@ -558,15 +558,15 @@ const yf = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
558
558
  }) => {
559
559
  let c = `${So}:${s}
560
560
  `;
561
- return c += `${kt}:${e}
562
- `, c += `${Ns}:${t}
561
+ return c += `${Nt}:${e}
562
+ `, c += `${ks}:${t}
563
563
  `, o && (c += `${Me}:${o}
564
564
  `), r && (c += `${Wr}:true
565
565
  `), n && (c += `${Jr}:${n}
566
566
  `), c += `${ye}:${i ? "fos" : "kos"}.http.request
567
567
  `, c += `
568
568
  `, c;
569
- }, Ne = (e, t) => {
569
+ }, ke = (e, t) => {
570
570
  let s = e;
571
571
  return t && (s += t), s;
572
572
  };
@@ -630,8 +630,8 @@ const _c = ({
630
630
  }) => {
631
631
  let o = `topic:${e}
632
632
  `;
633
- return o += `${kt}:${e}
634
- `, o += `${Ns}:${t}
633
+ return o += `${Nt}:${e}
634
+ `, o += `${ks}:${t}
635
635
  `, o += `${Me}:${s}
636
636
  `, o += `${ye}:kos.studio.request
637
637
  `, o += `
@@ -642,7 +642,7 @@ const _c = ({
642
642
  requestType: s,
643
643
  headers: o
644
644
  }) => {
645
- let r = `${Ns}:${e}
645
+ let r = `${ks}:${e}
646
646
  `;
647
647
  return r += `${Me}:${t}
648
648
  `, r += `${ye}:${s}
@@ -652,7 +652,7 @@ const _c = ({
652
652
  }), r += `
653
653
  `, r;
654
654
  }, bf = (e, t) => {
655
- const s = e, o = Ne(
655
+ const s = e, o = ke(
656
656
  Mc(t),
657
657
  typeof s == "string" ? s : JSON.stringify(s)
658
658
  ), r = _.getInstance().transport.socket;
@@ -665,7 +665,7 @@ const _c = ({
665
665
  }) => {
666
666
  let r = `topic:${e}
667
667
  `;
668
- return r += `${kt}:${e}
668
+ return r += `${Nt}:${e}
669
669
  `, t && (r += `${Ao}:${t}
670
670
  `), r += `${Zr}:${s}
671
671
  `, r += `${Me}:${o}
@@ -673,13 +673,13 @@ const _c = ({
673
673
  `, r += `
674
674
  `, r;
675
675
  }, wf = (e, t) => {
676
- const s = e, o = Ne(
676
+ const s = e, o = ke(
677
677
  _c(t),
678
678
  JSON.stringify(s)
679
679
  ), r = _.getInstance().transport.socket;
680
680
  r ? r.socket.send(o) : g.error("socket transport is not initialized");
681
681
  }, vf = (e, t) => {
682
- const s = t.responseId ? { status: t.status, data: e } : e, o = Ne(
682
+ const s = t.responseId ? { status: t.status, data: e } : e, o = ke(
683
683
  Ic(t),
684
684
  JSON.stringify(s)
685
685
  ), r = _.getInstance().transport.socket;
@@ -706,7 +706,7 @@ const _c = ({
706
706
  `, n += `${ye}:${s ?? "kos.message.request"}
707
707
  `, n += `${Zr}:${r}
708
708
  `, n += `${Pa}:application/json
709
- `, n += `${Na}:no-cache
709
+ `, n += `${ka}:no-cache
710
710
  `, n += `
711
711
  `, n;
712
712
  }, Tc = ({
@@ -726,7 +726,7 @@ const _c = ({
726
726
  msg: e,
727
727
  options: t
728
728
  }) => {
729
- const s = e, o = Ne(
729
+ const s = e, o = ke(
730
730
  $c(t),
731
731
  JSON.stringify(s)
732
732
  ), r = _.getInstance().transport.socket;
@@ -735,7 +735,7 @@ const _c = ({
735
735
  msg: e,
736
736
  options: t
737
737
  }) => {
738
- const s = e, o = Ne(
738
+ const s = e, o = ke(
739
739
  Tc(t),
740
740
  JSON.stringify(s)
741
741
  ), r = _.getInstance().transport.socket;
@@ -744,7 +744,7 @@ const _c = ({
744
744
  msg: e,
745
745
  options: t
746
746
  }) => {
747
- const s = e, o = Ne(
747
+ const s = e, o = ke(
748
748
  Ec(t),
749
749
  JSON.stringify(s)
750
750
  ), r = _.getInstance().transport.socket;
@@ -794,13 +794,13 @@ const _c = ({
794
794
  }, cr = g.createLogger({ name: "kos-model" }), Ac = {
795
795
  construct(e, t) {
796
796
  var c, d;
797
- const s = k.createContext(t[0]);
797
+ const s = N.createContext(t[0]);
798
798
  let o = (c = e[os]) == null ? void 0 : c.parentId;
799
799
  o && (o = qe({
800
800
  value: o,
801
801
  modelData: t[1] || {},
802
802
  modelId: t[0]
803
- }), k.setParentContext(t[0], o));
803
+ }), N.setParentContext(t[0], o));
804
804
  const r = new e(...t, {
805
805
  logger: g.createLogger({
806
806
  name: e.prototype.modelTypeId,
@@ -858,7 +858,7 @@ const _c = ({
858
858
  function $f(e, t, s) {
859
859
  const o = s.value;
860
860
  s.value = function(...r) {
861
- const n = k.getContext(this.id);
861
+ const n = N.getContext(this.id);
862
862
  return r.push(n), o.apply(this, r);
863
863
  };
864
864
  }
@@ -966,13 +966,13 @@ const gn = (e, t, s) => {
966
966
  }), cancel: () => {
967
967
  o && clearTimeout(o);
968
968
  } };
969
- }, Lc = (e) => e.transition(D.GO_ACTIVE, m.ACTIVE), Pc = (e) => e.whenReady(), Nc = (e) => e.transition(D.LOAD, m.LOADED), Df = (e) => e.transition(D.UNLOAD, m.UNLOADED), kc = (e) => e.transition(D.INITIALIZE, m.INITIALIZED);
969
+ }, Lc = (e) => e.transition(D.GO_ACTIVE, m.ACTIVE), Pc = (e) => e.whenReady(), kc = (e) => e.transition(D.LOAD, m.LOADED), Df = (e) => e.transition(D.UNLOAD, m.UNLOADED), Nc = (e) => e.transition(D.INITIALIZE, m.INITIALIZED);
970
970
  var mn = /* @__PURE__ */ ((e) => (e.ACTIVE = "active", e.READY = "ready", e.LOAD = "load", e.UNLOAD = "unload", e.INIT = "init", e))(mn || {});
971
971
  const to = {
972
972
  active: Lc,
973
973
  ready: Pc,
974
- load: Nc,
975
- init: kc
974
+ load: kc,
975
+ init: Nc
976
976
  }, xc = (e, t) => {
977
977
  const s = t.id || t.modelType, o = qe({
978
978
  value: s,
@@ -1405,7 +1405,7 @@ alias:${this.alias}
1405
1405
  var s, o;
1406
1406
  if (g.wsSend(t), window.kosLogEvents) {
1407
1407
  const { headers: r, body: n } = lr(String(t));
1408
- H(ks.SEND, { headers: r, body: n });
1408
+ H(Ns.SEND, { headers: r, body: n });
1409
1409
  }
1410
1410
  if (window.kosTopicIntercept && window.kosEnableMocks) {
1411
1411
  const { handler: r, requestId: n } = window.kosTopicIntercept(t);
@@ -1816,7 +1816,7 @@ class nd {
1816
1816
  `deactivating model ${this.modelTypeName} with id ${this.modelId}`
1817
1817
  );
1818
1818
  try {
1819
- const o = k.getContext(this.modelId);
1819
+ const o = N.getContext(this.modelId);
1820
1820
  await ((s = (t = this.modelData) == null ? void 0 : t.deactivate) == null ? void 0 : s.call(t, o)), M.debug(
1821
1821
  `Model ${this.modelTypeName} with id ${this.modelId} deactivated`
1822
1822
  );
@@ -1844,7 +1844,7 @@ class nd {
1844
1844
  var t, s;
1845
1845
  M.debug(`activating model ${this.modelTypeName} with id ${this.modelId}`), await zt(this, G.ACTIVATE);
1846
1846
  try {
1847
- const o = k.getContext(this.modelId);
1847
+ const o = N.getContext(this.modelId);
1848
1848
  await ((s = (t = this.modelData) == null ? void 0 : t.activate) == null ? void 0 : s.call(t, o)), M.debug(
1849
1849
  `Model ${this.modelTypeName} with id ${this.modelId} activated`
1850
1850
  );
@@ -1908,7 +1908,7 @@ class nd {
1908
1908
  mn.READY,
1909
1909
  G.READY
1910
1910
  );
1911
- const o = k.getContext(this.modelId);
1911
+ const o = N.getContext(this.modelId);
1912
1912
  await ((s = (t = this.modelData) == null ? void 0 : t.ready) == null ? void 0 : s.call(t, o)), this._offlineQueue.length > 0 && (g.warn(
1913
1913
  `processing ${this._offlineQueue.length} messages offline queue for ${this.modelId}`
1914
1914
  ), this._offlineQueue.forEach((r) => r()), g.info(`offline queue processed for ${this.modelId}`)), this._offlineQueue = [], M.debug(`Model ${this.modelId} is ready`);
@@ -1926,7 +1926,7 @@ class nd {
1926
1926
  }
1927
1927
  M.debug(`loading model ${this.modelTypeName} with id ${this.modelId}`), await zt(this, G.LOAD), M.debug(`loading model ${this.modelTypeName} with id ${this.modelId}`);
1928
1928
  try {
1929
- const r = k.getContext(this.modelId), n = await R.loader.executeLoader(
1929
+ const r = N.getContext(this.modelId), n = await R.loader.executeLoader(
1930
1930
  gr,
1931
1931
  {}
1932
1932
  );
@@ -1966,7 +1966,7 @@ class nd {
1966
1966
  return (i = n.unload) == null ? void 0 : i.call(n);
1967
1967
  }).filter((n) => !!n);
1968
1968
  await Promise.allSettled(o);
1969
- const r = k.getContext(this.modelId);
1969
+ const r = N.getContext(this.modelId);
1970
1970
  await ((s = (t = this.modelData) == null ? void 0 : t.unload) == null ? void 0 : s.call(t, r)), this.loaded = !1, this._onlineSubscriptions.forEach((n) => n()), this._onlineSubscriptions = [], M.debug(`Model ${this.modelTypeName} with id ${this.modelId} unloaded`), this.disposers.forEach((n) => n()), this.disposers = [];
1971
1971
  } catch (o) {
1972
1972
  throw M.debug(`Model ${this.modelId} failed to unload`), o;
@@ -1980,7 +1980,7 @@ class nd {
1980
1980
  `initializing model ${this.modelTypeName} with id ${this.modelId}`
1981
1981
  );
1982
1982
  try {
1983
- const o = k.getContext(this.modelId);
1983
+ const o = N.getContext(this.modelId);
1984
1984
  await ((s = (t = this.modelData) == null ? void 0 : t.init) == null ? void 0 : s.call(t, o)), this.initialized = !0, M.debug(
1985
1985
  `Model ${this.modelTypeName} with id ${this.modelId} initialized`
1986
1986
  );
@@ -2043,7 +2043,7 @@ class nd {
2043
2043
  async online() {
2044
2044
  var s, o;
2045
2045
  M.debug(`online model ${this.modelTypeName} with id ${this.modelId}`), this.registerSubscribers();
2046
- const t = k.getContext(this.modelId);
2046
+ const t = N.getContext(this.modelId);
2047
2047
  await ((o = (s = this.modelData) == null ? void 0 : s.online) == null ? void 0 : o.call(s, t));
2048
2048
  }
2049
2049
  async offline() {
@@ -2051,7 +2051,7 @@ class nd {
2051
2051
  M.debug(`offline model ${this.modelTypeName} with id ${this.modelId}`), this._subscriptions.forEach((r) => {
2052
2052
  r();
2053
2053
  }), this._subscriptions = [];
2054
- const t = k.getContext(this.modelId);
2054
+ const t = N.getContext(this.modelId);
2055
2055
  await ((o = (s = this.modelData) == null ? void 0 : s.offline) == null ? void 0 : o.call(s, t));
2056
2056
  }
2057
2057
  accept(t) {
@@ -2091,7 +2091,7 @@ class nd {
2091
2091
  const s = t.map((o) => this.modelManager.getModelById(o.id || "")).filter((o) => !!o);
2092
2092
  return s.forEach((o) => {
2093
2093
  try {
2094
- k.setParentContext(o.modelId, this.modelId);
2094
+ N.setParentContext(o.modelId, this.modelId);
2095
2095
  } catch {
2096
2096
  M.error(
2097
2097
  `failed to set parent context for model ${o.modelId} with parent ${this.modelId}`
@@ -2661,7 +2661,7 @@ const md = (e) => {
2661
2661
  return _.getInstance().modelManager.getModelsByType(e).filter(
2662
2662
  (r) => Object.keys(t).every((n) => r[n] === t[n])
2663
2663
  );
2664
- }, Nf = (e, t) => yd(e, t)[0], kf = (e, t) => {
2664
+ }, kf = (e, t) => yd(e, t)[0], Nf = (e, t) => {
2665
2665
  if (!e.id)
2666
2666
  throw new Error("Model ID is required");
2667
2667
  const s = _.getInstance().modelManager.getModelById(e.id);
@@ -2706,14 +2706,14 @@ const md = (e) => {
2706
2706
  }
2707
2707
  }, q = {
2708
2708
  Factory: {
2709
- create: (e) => (t) => (s, o) => (o && k.setParentContext(t, o), cs.getModelInstance(
2709
+ create: (e) => (t) => (s, o) => (o && N.setParentContext(t, o), cs.getModelInstance(
2710
2710
  t,
2711
2711
  e,
2712
2712
  s
2713
2713
  ))
2714
2714
  },
2715
2715
  Singleton: {
2716
- create: (e) => (t, s) => (s && k.setParentContext(e, s), cs.getModelInstance(
2716
+ create: (e) => (t, s) => (s && N.setParentContext(e, s), cs.getModelInstance(
2717
2717
  e,
2718
2718
  e,
2719
2719
  t
@@ -2729,20 +2729,20 @@ window.KosRegistry = window.KosRegistry || {
2729
2729
  companionModels: /* @__PURE__ */ new Map(),
2730
2730
  models: /* @__PURE__ */ new Map()
2731
2731
  };
2732
- const yr = window.KosRegistry.coreModels, oo = window.KosRegistry.preloadModels, ro = window.KosRegistry.companionModels, Vt = window.KosRegistry.models, E = {
2732
+ const yr = window.KosRegistry.coreModels, oo = window.KosRegistry.preloadModels, ro = window.KosRegistry.companionModels, Vt = window.KosRegistry.models, T = {
2733
2733
  model: {
2734
2734
  registerLegacyModel: (e) => (t, s) => (yr.set(t, s), {
2735
- preload: E.model.preloadModel(e),
2736
- model: E.model.register(e),
2737
- companion: E.companion.register(e),
2738
- legacy: E.model.registerLegacyModel(e),
2735
+ preload: T.model.preloadModel(e),
2736
+ model: T.model.register(e),
2737
+ companion: T.companion.register(e),
2738
+ legacy: T.model.registerLegacyModel(e),
2739
2739
  root: e
2740
2740
  }),
2741
2741
  preloadModel: (e) => (t) => (oo.includes(t) || oo.push(t), {
2742
- preload: E.model.preloadModel(e),
2743
- model: E.model.register(e),
2744
- companion: E.companion.register(e),
2745
- legacy: E.model.registerLegacyModel(e),
2742
+ preload: T.model.preloadModel(e),
2743
+ model: T.model.register(e),
2744
+ companion: T.companion.register(e),
2745
+ legacy: T.model.registerLegacyModel(e),
2746
2746
  root: e
2747
2747
  }),
2748
2748
  register: (e) => (t, s) => {
@@ -2753,11 +2753,11 @@ const yr = window.KosRegistry.coreModels, oo = window.KosRegistry.preloadModels,
2753
2753
  `Model with type ${o.type} doesn't exist. Adding new registration`
2754
2754
  ), _.getInstance().modelManager.registry.models[o.type] = o.registration[o.type], no(t) && t.relatedModels.forEach(
2755
2755
  (r) => _.getInstance().modelManager.registry.models[r.type] = r.registration().registration
2756
- ))), s && E.model.preloadModel(e)(o.type), {
2757
- preload: E.model.preloadModel(e),
2758
- model: E.model.register(e),
2759
- companion: E.companion.register(e),
2760
- legacy: E.model.registerLegacyModel(e),
2756
+ ))), s && T.model.preloadModel(e)(o.type), {
2757
+ preload: T.model.preloadModel(e),
2758
+ model: T.model.register(e),
2759
+ companion: T.companion.register(e),
2760
+ legacy: T.model.registerLegacyModel(e),
2761
2761
  root: e
2762
2762
  };
2763
2763
  },
@@ -2770,16 +2770,16 @@ const yr = window.KosRegistry.coreModels, oo = window.KosRegistry.preloadModels,
2770
2770
  register: (e) => (t, s) => {
2771
2771
  const o = ro.get(t) || [];
2772
2772
  return o.push(s), ro.set(t, o), {
2773
- preload: E.model.preloadModel(e),
2774
- model: E.model.register(e),
2775
- companion: E.companion.register(e),
2776
- legacy: E.model.registerLegacyModel(e),
2773
+ preload: T.model.preloadModel(e),
2774
+ model: T.model.register(e),
2775
+ companion: T.companion.register(e),
2776
+ legacy: T.model.registerLegacyModel(e),
2777
2777
  root: e
2778
2778
  };
2779
2779
  },
2780
2780
  getAll: () => Array.from(ro.entries())
2781
2781
  }
2782
- }, wd = E.model.registerLegacyModel, vd = E.model.register, Ff = E.companion.register, Uf = E.model.preloadModel, fn = (e) => typeof e.updateModel == "function", no = (e) => e.registration !== void 0 && typeof e.registration == "function";
2782
+ }, wd = T.model.registerLegacyModel, vd = T.model.register, Ff = T.companion.register, Uf = T.model.preloadModel, fn = (e) => typeof e.updateModel == "function", no = (e) => e.registration !== void 0 && typeof e.registration == "function";
2783
2783
  class pn {
2784
2784
  constructor(t) {
2785
2785
  a(this, "singleton");
@@ -2797,7 +2797,7 @@ class pn {
2797
2797
  this.relatedModels.forEach((t) => t.register());
2798
2798
  }
2799
2799
  register() {
2800
- E.model.register({})(this.registration()), this.registerRelatedModels();
2800
+ T.model.register({})(this.registration()), this.registerRelatedModels();
2801
2801
  }
2802
2802
  }
2803
2803
  class ve extends pn {
@@ -2860,7 +2860,7 @@ class ve extends pn {
2860
2860
  };
2861
2861
  }
2862
2862
  }
2863
- class ke extends pn {
2863
+ class Ne extends pn {
2864
2864
  constructor(t) {
2865
2865
  super({
2866
2866
  ...t,
@@ -3113,16 +3113,16 @@ class _ {
3113
3113
  var h, f;
3114
3114
  const u = (f = (h = t.extensions) == null ? void 0 : h.contextLoader) == null ? void 0 : f[l];
3115
3115
  u && R.loader.registerLoader(l, u);
3116
- }), E.model.getAll().forEach(([, l]) => {
3116
+ }), T.model.getAll().forEach(([, l]) => {
3117
3117
  t.models = { ...t.models, ...l.registration };
3118
3118
  }), t.models = {
3119
3119
  ...t.models,
3120
- ...E.model.getLegacyModels()
3121
- }, E.companion.getAll().forEach(([l, u]) => {
3120
+ ...T.model.getLegacyModels()
3121
+ }, T.companion.getAll().forEach(([l, u]) => {
3122
3122
  t.companionModels = { ...t.companionModels }, t.companionModels[l] = t.companionModels[l] || [];
3123
3123
  for (const h of u)
3124
3124
  t.companionModels[l].push({ type: h });
3125
- }), E.model.getPreloadModels().forEach((l) => {
3125
+ }), T.model.getPreloadModels().forEach((l) => {
3126
3126
  t.preloadModels.includes(l) || t.preloadModels.push(l);
3127
3127
  });
3128
3128
  const n = ld.create(t, s);
@@ -3140,7 +3140,7 @@ const Od = g.createLogger({ name: "kos-fetch" }), Dd = process.env.KOS_WS_TIMEOU
3140
3140
  }), Ad = (e) => e != null && e.studio ? bc : e != null && e.fos ? wc : vc, Cd = async (e, t) => {
3141
3141
  const s = _.getInstance().transport;
3142
3142
  await s.whenReady();
3143
- const o = xs(), r = new URL(e), n = `${r.pathname}${r.search}`, i = (t == null ? void 0 : t.timeout) || Dd, c = Ad(t), d = Ne(
3143
+ const o = xs(), r = new URL(e), n = `${r.pathname}${r.search}`, i = (t == null ? void 0 : t.timeout) || Dd, c = Ad(t), d = ke(
3144
3144
  c({
3145
3145
  path: n,
3146
3146
  requestId: o,
@@ -3300,7 +3300,7 @@ function yn() {
3300
3300
  delete: (e, t, s) => Yt(e, "delete", s, t)
3301
3301
  };
3302
3302
  }
3303
- class Nd {
3303
+ class kd {
3304
3304
  constructor() {
3305
3305
  a(this, "middlewares", []);
3306
3306
  }
@@ -3316,7 +3316,7 @@ class Nd {
3316
3316
  }
3317
3317
  }
3318
3318
  const Bf = async (e, t) => {
3319
- const s = new Nd();
3319
+ const s = new kd();
3320
3320
  t.forEach((r) => s.use(r));
3321
3321
  const o = { data: e, result: {} };
3322
3322
  return await s.execute(o), o.result;
@@ -3338,7 +3338,7 @@ const Bf = async (e, t) => {
3338
3338
  e,
3339
3339
  t
3340
3340
  );
3341
- }, kd = Symbol("KosObservableData");
3341
+ }, Nd = Symbol("KosObservableData");
3342
3342
  class bn {
3343
3343
  constructor() {
3344
3344
  a(this, "map");
@@ -3389,7 +3389,7 @@ class bn {
3389
3389
  return new Proxy(this, this.proxyHandler);
3390
3390
  }
3391
3391
  }
3392
- bn.prototype[kd] = !0;
3392
+ bn.prototype[Nd] = !0;
3393
3393
  function xd(e, t) {
3394
3394
  return new Proxy(e, {
3395
3395
  construct: (s, o) => {
@@ -3859,7 +3859,7 @@ class Yd {
3859
3859
  this._context.clear();
3860
3860
  }
3861
3861
  }
3862
- const k = {
3862
+ const N = {
3863
3863
  createContext: (e, t) => {
3864
3864
  const s = fe.get(e) ?? new Yd(e);
3865
3865
  if (t) {
@@ -3882,8 +3882,8 @@ const k = {
3882
3882
  },
3883
3883
  rootContext: () => fe.get("root")
3884
3884
  };
3885
- k.createContext("root");
3886
- const Zf = (e) => k.getContext(e.id);
3885
+ N.createContext("root");
3886
+ const Zf = (e) => N.getContext(e.id);
3887
3887
  function Hd(e, t) {
3888
3888
  return e.length !== t.length ? !1 : e.every((s) => t.includes(s));
3889
3889
  }
@@ -4026,7 +4026,7 @@ class Ie {
4026
4026
  });
4027
4027
  }
4028
4028
  addModel(t, s) {
4029
- this._data.set(t.id || "", t), t.id && this._parentId && k.setParentContext(t.id, this._parentId), s || this.increment();
4029
+ this._data.set(t.id || "", t), t.id && this._parentId && N.setParentContext(t.id, this._parentId), s || this.increment();
4030
4030
  const o = this._disposerMap.get(t.id);
4031
4031
  o && (o(), this._disposerMap.delete(t.id));
4032
4032
  const r = Object.entries(this._optionsMap || {}), n = Object.values(this._optionsMap || {}), i = new Map(r.map(([u, h]) => [h, u])), c = (u) => {
@@ -4388,15 +4388,15 @@ var he = /* @__PURE__ */ ((e) => (e.TroubleRank = "kos.trouble.rank.mapper", e.T
4388
4388
  const $n = g.createLogger({
4389
4389
  name: "config-bean-service",
4390
4390
  group: "Services"
4391
- }), No = re, tl = (e) => (e == null ? void 0 : e.decimals) !== void 0, { postModel: sl, getOne: ol } = Z.build({
4391
+ }), ko = re, tl = (e) => (e == null ? void 0 : e.decimals) !== void 0, { postModel: sl, getOne: ol } = Z.build({
4392
4392
  destinationAddress: "",
4393
- basePath: `${No}/kos/config/`
4393
+ basePath: `${ko}/kos/config/`
4394
4394
  }), rl = async (e, t, s = "/api/kos/config") => ($n.debug(`sending modify request for ConfigBean: ${e}`), sl({
4395
4395
  model: t,
4396
- urlOverride: `${No}${s}/${e}`
4396
+ urlOverride: `${ko}${s}/${e}`
4397
4397
  })), nl = async (e, t = "/api/kos/config") => ($n.debug(`sending get request for ConfigBean: ${e}`), await ol({
4398
- urlOverride: `${No}${t}/details/${e}/15`
4399
- })), En = (e) => e.toLowerCase() === "true" || e.toLowerCase() === "false", ko = (e) => {
4398
+ urlOverride: `${ko}${t}/details/${e}/15`
4399
+ })), En = (e) => e.toLowerCase() === "true" || e.toLowerCase() === "false", No = (e) => {
4400
4400
  try {
4401
4401
  const t = Number(e);
4402
4402
  return !isNaN(t);
@@ -4431,7 +4431,7 @@ const al = (e, t) => {
4431
4431
  e.changes.forEach((s) => {
4432
4432
  const o = s.attr;
4433
4433
  let r = s.currentValue, n = s.previousValue;
4434
- typeof r == "string" && En(r) && (r = r.toLowerCase() == "true", n = (n == null ? void 0 : n.toLowerCase()) == "true"), typeof r == "string" && ko(r) && (r = Number(r), n = Number(n)), t.props[o] = r, t.prevProps[o] = n;
4434
+ typeof r == "string" && En(r) && (r = r.toLowerCase() == "true", n = (n == null ? void 0 : n.toLowerCase()) == "true"), typeof r == "string" && No(r) && (r = Number(r), n = Number(n)), t.props[o] = r, t.prevProps[o] = n;
4435
4435
  });
4436
4436
  });
4437
4437
  }, dl = (e) => Object.fromEntries(e.props.entries), sp = (e) => (t) => (s) => e.build(t, s);
@@ -5030,7 +5030,7 @@ function Er({
5030
5030
  r.push(n.toFixed(o)), n += s;
5031
5031
  return r[r.length - 1] !== t.toString() && r.push(t.toString()), r;
5032
5032
  }
5033
- const je = (e, t) => (s) => !e || !t ? s : ko(s) ? _l(Number(s), e, t) : s, Ml = (e, t, s, o) => {
5033
+ const je = (e, t) => (s) => !e || !t ? s : No(s) ? _l(Number(s), e, t) : s, Ml = (e, t, s, o) => {
5034
5034
  if ((e == null ? void 0 : e.type) === "enum" || !(e != null && e.options))
5035
5035
  return [];
5036
5036
  if (e.options.type === "rangeCount")
@@ -5502,14 +5502,14 @@ const Cl = "future-model", Ut = Ft(
5502
5502
  Cl
5503
5503
  ), Us = g.createLogger({ name: "future-service", group: "Services" }), { isMock: Rl, URL: jt } = te();
5504
5504
  var Ot = /* @__PURE__ */ ((e) => (e.Success = "SUCCESS", e.Fail = "FAIL", e.Aborted = "ABORT", e.Canceled = "CANCEL", e))(Ot || {});
5505
- const { getAll: Ll, modifyModel: Pl, addModel: Nl, deleteModel: kl, postModel: xl } = Z.build({
5505
+ const { getAll: Ll, modifyModel: Pl, addModel: kl, deleteModel: Nl, postModel: xl } = Z.build({
5506
5506
  destinationAddress: "",
5507
5507
  basePath: `${jt}/api/future`,
5508
5508
  mock: Rl
5509
- }), ip = async () => await Ll({}), Fl = async (e, t = "/api/kos/future") => (Us.info(`sending delete request for Future: ${e}`), await kl({
5509
+ }), ip = async () => await Ll({}), Fl = async (e, t = "/api/kos/future") => (Us.info(`sending delete request for Future: ${e}`), await Nl({
5510
5510
  id: e,
5511
5511
  urlOverride: `${jt}${t}/${e}`
5512
- })), Ul = async (e, t = "/api/kos/future") => (Us.info("sending add request for Future"), await Nl({
5512
+ })), Ul = async (e, t = "/api/kos/future") => (Us.info("sending add request for Future"), await kl({
5513
5513
  model: e,
5514
5514
  urlOverride: `${jt}${t}`
5515
5515
  })), ap = async (e, t, s = "/api/kos/future") => (Us.info(`sending modify request for Future: ${e}`), Pl({
@@ -5539,11 +5539,11 @@ const { getAll: Ll, modifyModel: Pl, addModel: Nl, deleteModel: kl, postModel: x
5539
5539
  });
5540
5540
  });
5541
5541
  }));
5542
- }, Bl = (e) => (t) => (s) => e.build(String(t), s), Nn = (e) => (t) => Fd(
5542
+ }, Bl = (e) => (t) => (s) => e.build(String(t), s), kn = (e) => (t) => Fd(
5543
5543
  Ln,
5544
5544
  Bl(e)(t.tracker || t.id)
5545
5545
  )(t);
5546
- var Kl = Object.defineProperty, Gl = Object.getOwnPropertyDescriptor, kn = (e, t, s, o) => {
5546
+ var Kl = Object.defineProperty, Gl = Object.getOwnPropertyDescriptor, Nn = (e, t, s, o) => {
5547
5547
  for (var r = o > 1 ? void 0 : o ? Gl(t, s) : t, n = e.length - 1, i; n >= 0; n--)
5548
5548
  (i = e[n]) && (r = (o ? i(t, s, r) : i(r)) || r);
5549
5549
  return o && r && Kl(t, s, r), r;
@@ -5631,12 +5631,12 @@ let bs = class {
5631
5631
  ), Pn(e, this);
5632
5632
  }
5633
5633
  };
5634
- kn([
5634
+ Nn([
5635
5635
  L({
5636
5636
  topic: `kos.future/${uo}`
5637
5637
  })
5638
5638
  ], bs.prototype, "handleFutureUpdated", 1);
5639
- bs = kn([
5639
+ bs = Nn([
5640
5640
  S(Ut.type)
5641
5641
  ], bs);
5642
5642
  const zl = bs, Vl = yn();
@@ -5705,10 +5705,10 @@ xn([
5705
5705
  ws = xn([
5706
5706
  S(Fn)
5707
5707
  ], ws);
5708
- const Wl = new ke({
5708
+ const Wl = new Ne({
5709
5709
  class: ws,
5710
5710
  type: Fn
5711
- }), Jl = "future-container-model", Le = Ft(Jl), Un = (e) => Nn(Ut)(e), Ql = (e) => {
5711
+ }), Jl = "future-container-model", Le = Ft(Jl), Un = (e) => kn(Ut)(e), Ql = (e) => {
5712
5712
  const t = Un(e);
5713
5713
  return Le.build(
5714
5714
  Le.type,
@@ -5857,7 +5857,7 @@ let Dt = class {
5857
5857
  try {
5858
5858
  const t = await this._addFuture(e), s = t == null ? void 0 : t.data;
5859
5859
  if (s) {
5860
- const o = Nn(Ut)(s);
5860
+ const o = kn(Ut)(s);
5861
5861
  return this.addFutureModel(o), o;
5862
5862
  }
5863
5863
  } catch (t) {
@@ -6582,7 +6582,7 @@ Ue([
6582
6582
  pe = Ue([
6583
6583
  S(ai)
6584
6584
  ], pe);
6585
- const Bs = new ke({
6585
+ const Bs = new Ne({
6586
6586
  class: pe,
6587
6587
  type: ai
6588
6588
  });
@@ -6595,12 +6595,12 @@ const Au = (e) => e.rank !== void 0, Cu = (e) => e.visibleRole !== void 0, Ru =
6595
6595
  }, Pu = (e) => {
6596
6596
  const t = e.info;
6597
6597
  return Ru(t) ? t.color : "orange";
6598
- }, Nu = (e) => {
6598
+ }, ku = (e) => {
6599
6599
  const t = e.info;
6600
6600
  return Cu(t) ? t.visibleRole : "TECHNICIAN";
6601
- }, { URL: Vo } = te(), { getAll: ku, postModel: di } = Z.build({
6601
+ }, { URL: Vo } = te(), { getAll: Nu, postModel: di } = Z.build({
6602
6602
  basePath: `${Vo}/api/kos/troubles`
6603
- }), li = async () => await ku({}), ui = async (e, t) => {
6603
+ }), li = async () => await Nu({}), ui = async (e, t) => {
6604
6604
  try {
6605
6605
  const s = await di({
6606
6606
  model: {},
@@ -6886,7 +6886,7 @@ function Sr(e) {
6886
6886
  ) ? R.propertyMapper.executeMapper(
6887
6887
  he.TroubleRole,
6888
6888
  e
6889
- ) : Nu(e)).toLowerCase();
6889
+ ) : ku(e)).toLowerCase();
6890
6890
  }
6891
6891
  const Yu = "trouble-container-model";
6892
6892
  class ie {
@@ -7125,7 +7125,7 @@ zs([
7125
7125
  tt = zs([
7126
7126
  S(mi)
7127
7127
  ], tt);
7128
- const yo = new ke({
7128
+ const yo = new Ne({
7129
7129
  class: tt,
7130
7130
  type: mi
7131
7131
  }), Cr = g.createLogger({
@@ -7226,7 +7226,7 @@ let Es = class {
7226
7226
  handleConfigBeanUpdated(e) {
7227
7227
  Object.entries(e).forEach(([t, s]) => {
7228
7228
  let o = s;
7229
- typeof o == "string" && En(o) && (o = o.toLowerCase() == "true"), typeof o == "string" && ko(o) && (o = Number(o)), this.props.set(t, o);
7229
+ typeof o == "string" && En(o) && (o = o.toLowerCase() == "true"), typeof o == "string" && No(o) && (o = Number(o)), this.props.set(t, o);
7230
7230
  });
7231
7231
  }
7232
7232
  // -------------------LIFECYCLE----------------------------
@@ -7442,7 +7442,7 @@ let _o = class {
7442
7442
  async loadTranslations() {
7443
7443
  const e = this.getTranslationLocales(this.currentLocale).reverse(), t = e.map((o) => {
7444
7444
  if (this.bundleResolver) {
7445
- const r = k.getContext(this.id);
7445
+ const r = N.getContext(this.id);
7446
7446
  return this.bundleResolver(this.namespace, o, r);
7447
7447
  }
7448
7448
  try {
@@ -7641,11 +7641,11 @@ const _e = {
7641
7641
  factory: q.Singleton.create(pt)
7642
7642
  }, pp = {
7643
7643
  set(e, t) {
7644
- const s = k.getContext(_e.type);
7644
+ const s = N.getContext(_e.type);
7645
7645
  s && s.set(e, t);
7646
7646
  },
7647
7647
  get(e) {
7648
- const t = k.getContext(_e.type);
7648
+ const t = N.getContext(_e.type);
7649
7649
  return t == null ? void 0 : t.get(e);
7650
7650
  }
7651
7651
  }, Ih = {
@@ -7707,12 +7707,12 @@ let Ct = class {
7707
7707
  };
7708
7708
  Ho([
7709
7709
  L({
7710
- topic: [ks.SEND]
7710
+ topic: [Ns.SEND]
7711
7711
  })
7712
7712
  ], Ct.prototype, "handleSendEvent", 1);
7713
7713
  Ho([
7714
7714
  L({
7715
- topic: [ks.RECEIVED]
7715
+ topic: [Ns.RECEIVED]
7716
7716
  })
7717
7717
  ], Ct.prototype, "handleReceiveEvent", 1);
7718
7718
  Ct = Ho([
@@ -7833,7 +7833,7 @@ Ai([
7833
7833
  As = Ai([
7834
7834
  S(Ci)
7835
7835
  ], As);
7836
- const Io = new ke({
7836
+ const Io = new Ne({
7837
7837
  class: As,
7838
7838
  type: Ci
7839
7839
  });
@@ -7876,15 +7876,15 @@ $o = Ph([
7876
7876
  const Li = new ve({
7877
7877
  class: $o,
7878
7878
  type: Ri
7879
- }), { URL: Nh } = te(), { getAll: kh } = Z.build({
7880
- basePath: `${Nh}/api/kos/network/interfaces`
7879
+ }), { URL: kh } = te(), { getAll: Nh } = Z.build({
7880
+ basePath: `${kh}/api/kos/network/interfaces`
7881
7881
  }), Pr = g.createLogger({
7882
7882
  name: "network-interface-service",
7883
7883
  group: "Services"
7884
7884
  }), Pi = async () => {
7885
7885
  Pr.debug("sending GET for copy-logs");
7886
7886
  try {
7887
- const e = await kh({});
7887
+ const e = await Nh({});
7888
7888
  return [void 0, e == null ? void 0 : e.data];
7889
7889
  } catch (e) {
7890
7890
  if (e instanceof me)
@@ -7895,12 +7895,12 @@ const Li = new ve({
7895
7895
  __proto__: null,
7896
7896
  getNetworkInterfaces: Pi
7897
7897
  }, Symbol.toStringTag, { value: "Module" }));
7898
- var xh = Object.defineProperty, Fh = Object.getOwnPropertyDescriptor, Ni = (e, t, s, o) => {
7898
+ var xh = Object.defineProperty, Fh = Object.getOwnPropertyDescriptor, ki = (e, t, s, o) => {
7899
7899
  for (var r = o > 1 ? void 0 : o ? Fh(t, s) : t, n = e.length - 1, i; n >= 0; n--)
7900
7900
  (i = e[n]) && (r = (o ? i(t, s, r) : i(r)) || r);
7901
7901
  return o && r && xh(t, s, r), r;
7902
7902
  };
7903
- const ki = "network-interface-container-model";
7903
+ const Ni = "network-interface-container-model";
7904
7904
  let Cs = class {
7905
7905
  constructor(e, t, s) {
7906
7906
  a(this, "id");
@@ -7954,26 +7954,26 @@ let Cs = class {
7954
7954
  ), this.refreshInterfaces();
7955
7955
  }
7956
7956
  };
7957
- Ni([
7957
+ ki([
7958
7958
  we
7959
7959
  ], Cs.prototype, "_models", 2);
7960
- Cs = Ni([
7961
- S(ki)
7960
+ Cs = ki([
7961
+ S(Ni)
7962
7962
  ], Cs);
7963
- const Rs = new ke({
7963
+ const Rs = new Ne({
7964
7964
  class: Cs,
7965
- type: ki
7965
+ type: Ni
7966
7966
  });
7967
7967
  Rs.addRelatedModel(Li);
7968
7968
  const { URL: Uh } = te(), { getAll: jh } = Z.build({
7969
7969
  basePath: `${Uh}/api/kos/storage/devices`
7970
- }), Nr = g.createLogger({
7970
+ }), kr = g.createLogger({
7971
7971
  name: "storage-device-service",
7972
7972
  group: "Services"
7973
7973
  }), xi = async () => {
7974
- Nr.debug("sending GET for storage-device");
7974
+ kr.debug("sending GET for storage-device");
7975
7975
  const e = await jh({});
7976
- return !(e != null && e.data) || e.status !== 200 ? (Nr.error("Failed to retrieve storage-device data", e), []) : e.data;
7976
+ return !(e != null && e.data) || e.status !== 200 ? (kr.error("Failed to retrieve storage-device data", e), []) : e.data;
7977
7977
  }, vp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
7978
7978
  __proto__: null,
7979
7979
  getStorageDevices: xi
@@ -8104,22 +8104,22 @@ Zo([
8104
8104
  Rt = Zo([
8105
8105
  S(Ui)
8106
8106
  ], Rt);
8107
- const Lt = new ke({
8107
+ const Lt = new Ne({
8108
8108
  class: Rt,
8109
8109
  type: Ui
8110
8110
  });
8111
8111
  Lt.addRelatedModel(To);
8112
8112
  const { URL: Wo } = te(), { getAll: Hh, postModel: qh } = Z.build({
8113
8113
  basePath: `${Wo}/api/kos/update/available`
8114
- }), kr = g.createLogger({
8114
+ }), Nr = g.createLogger({
8115
8115
  name: "usb-update-service",
8116
8116
  group: "Services"
8117
8117
  }), ji = async () => {
8118
- kr.debug("sending GET for usb-update");
8118
+ Nr.debug("sending GET for usb-update");
8119
8119
  const e = await Hh({
8120
8120
  urlOverride: `${Wo}/api/kos/update/available`
8121
8121
  });
8122
- return !(e != null && e.data) || (e == null ? void 0 : e.status) !== 200 ? (kr.error("Failed to retrieve usb-update data", e), []) : e.data;
8122
+ return !(e != null && e.data) || (e == null ? void 0 : e.status) !== 200 ? (Nr.error("Failed to retrieve usb-update data", e), []) : e.data;
8123
8123
  }, Bi = async (e, t, s) => {
8124
8124
  const o = await qh({
8125
8125
  model: {
@@ -8284,7 +8284,7 @@ Vs([
8284
8284
  st = Vs([
8285
8285
  S(Vi)
8286
8286
  ], st);
8287
- const Ps = new ke({
8287
+ const Ps = new Ne({
8288
8288
  class: st,
8289
8289
  type: Vi
8290
8290
  });
@@ -8318,19 +8318,19 @@ const Xh = () => ({ ...{
8318
8318
  const o = t[s];
8319
8319
  wd(xr)(s, o);
8320
8320
  }), {
8321
- preload: E.model.preloadModel(e),
8322
- model: E.model.register(e),
8323
- companion: E.companion.register(e),
8324
- legacy: E.model.registerLegacyModel(e)
8321
+ preload: T.model.preloadModel(e),
8322
+ model: T.model.register(e),
8323
+ companion: T.companion.register(e),
8324
+ legacy: T.model.registerLegacyModel(e)
8325
8325
  };
8326
8326
  }, ce = {};
8327
8327
  ce.core = {
8328
8328
  models: tg(ce)
8329
8329
  };
8330
- ce.preload = E.model.preloadModel(ce);
8331
- ce.model = E.model.register(ce);
8332
- ce.companion = E.companion.register(ce);
8333
- ce.legacy = E.model.registerLegacyModel(ce);
8330
+ ce.preload = T.model.preloadModel(ce);
8331
+ ce.model = T.model.register(ce);
8332
+ ce.companion = T.companion.register(ce);
8333
+ ce.legacy = T.model.registerLegacyModel(ce);
8334
8334
  const xr = ce;
8335
8335
  class Ip {
8336
8336
  /**
@@ -8848,7 +8848,7 @@ const wg = {
8848
8848
  ] });
8849
8849
  }, vg = {
8850
8850
  setModel: () => !1
8851
- }, Jo = Nt(vg), Rp = () => {
8851
+ }, Jo = kt(vg), Rp = () => {
8852
8852
  const e = Ce(Jo);
8853
8853
  if (e == null)
8854
8854
  throw new Error("useModels must be used within a KosModelProvider");
@@ -8866,7 +8866,7 @@ const wg = {
8866
8866
  addModel: () => {
8867
8867
  ea.debug("Default implementation being used. Do Nothing.");
8868
8868
  }
8869
- }, Qo = Nt(Mg), Lp = ({ children: e }) => {
8869
+ }, Qo = kt(Mg), Lp = ({ children: e }) => {
8870
8870
  const [t, s] = v([]), o = X(
8871
8871
  (r) => {
8872
8872
  t.includes(r) || (ea.debug("adding to hierarchy context", r.id), s((n) => [...n, r]));
@@ -8881,7 +8881,7 @@ const wg = {
8881
8881
  "useContextModelHierarchy must be used within a KosModelCollectionProvider"
8882
8882
  );
8883
8883
  const s = (e == null ? void 0 : e.filter) || Ig;
8884
- return N(
8884
+ return k(
8885
8885
  () => t.models.filter(s),
8886
8886
  [t.models, s]
8887
8887
  );
@@ -8892,7 +8892,7 @@ const wg = {
8892
8892
  }
8893
8893
  })[0], Eg = g.createLogger({ name: "kos-model-loader" }), Tg = () => /* @__PURE__ */ w("div", {}), Og = ({ fallback: e, children: t, ...s }) => /* @__PURE__ */ w(_g, { children: /* @__PURE__ */ w(bg, { fallback: e, children: /* @__PURE__ */ w(Da, { children: /* @__PURE__ */ w(Dg, { ...s, children: t }) }) }) }), Dg = (e) => {
8894
8894
  const [t, s] = v(), [o, r] = v(!1), { setModel: n } = Ce(Jo), i = Ce(Qo);
8895
- if (T(() => {
8895
+ if (E(() => {
8896
8896
  e.model && (s(e.model), n(e.model), r(!0), i && i.addModel(e.model));
8897
8897
  }, [i, e.model, n]), e.error)
8898
8898
  throw Eg.error(e.error), new Error(e.error);
@@ -8909,7 +8909,7 @@ const wg = {
8909
8909
  cancelText: "Cancel",
8910
8910
  title: "Create New Model"
8911
8911
  }
8912
- }, Sg = Pe.createContext(gs), Np = ({
8912
+ }, Sg = Pe.createContext(gs), kp = ({
8913
8913
  translations: e = gs,
8914
8914
  children: t
8915
8915
  }) => {
@@ -8926,11 +8926,11 @@ function Ag(e, t) {
8926
8926
  const s = _.create(e, !1, t), o = s.whenReady().then(() => s);
8927
8927
  return Qr(o);
8928
8928
  }
8929
- const ta = Pe.createContext(void 0), kp = (e = { models: {}, preloadModels: [] }, t) => {
8929
+ const ta = Pe.createContext(void 0), Np = (e = { models: {}, preloadModels: [] }, t) => {
8930
8930
  const s = Ag(e, t);
8931
8931
  return { KosCoreContextProvider: Aa(({ children: r }) => {
8932
8932
  const n = s.read(), [i, c] = Pe.useState(n.isOnline);
8933
- return T(() => {
8933
+ return E(() => {
8934
8934
  const d = j(() => {
8935
8935
  c(n.isOnline);
8936
8936
  });
@@ -8969,10 +8969,10 @@ function Pg(e, t) {
8969
8969
  throw De.set(e, o), s;
8970
8970
  }
8971
8971
  }
8972
- function Ng(e, t) {
8972
+ function kg(e, t) {
8973
8973
  return Pg(e, t);
8974
8974
  }
8975
- async function kg(e, t) {
8975
+ async function Ng(e, t) {
8976
8976
  const { modelId: s, factory: o, modelType: r, options: n, activate: i } = t;
8977
8977
  let c = 0;
8978
8978
  await e.whenReady();
@@ -8992,11 +8992,11 @@ async function kg(e, t) {
8992
8992
  return await (l == null ? void 0 : l.whenReady()), l ? (d = l.modelData, { kosModel: l, model: d }) : { kosModel: void 0, model: void 0 };
8993
8993
  }
8994
8994
  const z = (e) => {
8995
- const { modelId: t, modelType: s, activate: o, destroyOnUnmount: r } = e, n = Cg(), [i, c] = v(!1), [d, l] = v(), { kosModel: u, model: h } = Ng(
8995
+ const { modelId: t, modelType: s, activate: o, destroyOnUnmount: r } = e, n = Cg(), [i, c] = v(!1), [d, l] = v(), { kosModel: u, model: h } = kg(
8996
8996
  t || s || "",
8997
- () => kg(n.kosCore, e)
8997
+ () => Ng(n.kosCore, e)
8998
8998
  );
8999
- return T(() => {
8999
+ return E(() => {
9000
9000
  async function f() {
9001
9001
  try {
9002
9002
  return await n.kosCore.whenReady(), o && await (u == null ? void 0 : u.transition(
@@ -9060,8 +9060,8 @@ const z = (e) => {
9060
9060
  modelType: mo.type,
9061
9061
  options: {}
9062
9062
  });
9063
- }, oa = Nt(void 0), xp = ({ children: e }) => {
9064
- const { model: t, ready: s } = sa(), o = N(() => s && t ? { model: t } : {}, [s, t]);
9063
+ }, oa = kt(void 0), xp = ({ children: e }) => {
9064
+ const { model: t, ready: s } = sa(), o = k(() => s && t ? { model: t } : {}, [s, t]);
9065
9065
  return /* @__PURE__ */ w(oa.Provider, { value: o, children: e });
9066
9066
  }, Fp = () => {
9067
9067
  const e = Ce(oa);
@@ -9082,10 +9082,10 @@ function Up(e) {
9082
9082
  return /* @__PURE__ */ w(r, { ...o, children: /* @__PURE__ */ w(e, { ...t, softwareInfo: s }) });
9083
9083
  };
9084
9084
  }
9085
- const na = Nt(
9085
+ const na = kt(
9086
9086
  void 0
9087
9087
  ), jp = ({ children: e }) => {
9088
- const { model: t, ready: s } = ra(), o = N(() => s && t ? { model: t } : {}, [s, t]);
9088
+ const { model: t, ready: s } = ra(), o = k(() => s && t ? { model: t } : {}, [s, t]);
9089
9089
  return /* @__PURE__ */ w(na.Provider, { value: o, children: e });
9090
9090
  }, Bp = () => {
9091
9091
  const e = Ce(na);
@@ -9098,7 +9098,7 @@ const na = Nt(
9098
9098
  function Kp({ children: e }) {
9099
9099
  return /* @__PURE__ */ w(xg.Provider, { value: ia, children: e });
9100
9100
  }
9101
- const aa = Nt(void 0), Fg = () => {
9101
+ const aa = kt(void 0), Fg = () => {
9102
9102
  const e = window.location.origin, t = be();
9103
9103
  return (t == null ? void 0 : t.host) || e;
9104
9104
  }, Gp = ({
@@ -9109,8 +9109,8 @@ const aa = Nt(void 0), Fg = () => {
9109
9109
  rootUrl: r,
9110
9110
  descriptorResolver: n
9111
9111
  }) => {
9112
- const [i, c] = v(!1), [d, l] = v(), [u, h] = v(), f = r || Fg(), y = N(() => t ?? "app/system", [t]);
9113
- T(() => {
9112
+ const [i, c] = v(!1), [d, l] = v(), [u, h] = v(), f = r || Fg(), y = k(() => t ?? "app/system", [t]);
9113
+ E(() => {
9114
9114
  async function O() {
9115
9115
  const ne = (Array.isArray(y) ? y : [y]).map((se) => (n || mh(se))()), Ys = (await Promise.allSettled(ne)).map((se) => {
9116
9116
  if (se.status === "rejected") {
@@ -9131,7 +9131,7 @@ const aa = Nt(void 0), Fg = () => {
9131
9131
  l(Ys);
9132
9132
  }
9133
9133
  O();
9134
- }, [y, n]), T(() => {
9134
+ }, [y, n]), E(() => {
9135
9135
  async function O() {
9136
9136
  if (d) {
9137
9137
  const A = f, { translations: ne } = await Ih.init({
@@ -9146,7 +9146,7 @@ const aa = Nt(void 0), Fg = () => {
9146
9146
  }
9147
9147
  O();
9148
9148
  }, [s, d, o, f]);
9149
- const p = N(() => i ? {
9149
+ const p = k(() => i ? {
9150
9150
  setLocale: (O) => {
9151
9151
  u && (u.currentLocale = O);
9152
9152
  }
@@ -9227,7 +9227,7 @@ function Zp(e) {
9227
9227
  };
9228
9228
  }
9229
9229
  function Kg(e, t) {
9230
- T(() => {
9230
+ E(() => {
9231
9231
  function s(r) {
9232
9232
  e.current && !e.current.contains(r.target) && t();
9233
9233
  }
@@ -9246,7 +9246,7 @@ function Wp(e) {
9246
9246
  const Jp = (e) => {
9247
9247
  var l;
9248
9248
  const { stateProp: t } = e, [s, o] = v((l = e.stateProp) == null ? void 0 : l.value), [r, n] = v(!1), [i, c] = v(void 0);
9249
- return T(() => {
9249
+ return E(() => {
9250
9250
  async function u(h) {
9251
9251
  try {
9252
9252
  h && (await oe(h), n(!0));
@@ -9255,7 +9255,7 @@ const Jp = (e) => {
9255
9255
  }
9256
9256
  }
9257
9257
  u(t);
9258
- }, [t]), T(() => {
9258
+ }, [t]), E(() => {
9259
9259
  const u = j(() => {
9260
9260
  t && r && o(t.value);
9261
9261
  });
@@ -9269,7 +9269,7 @@ const Jp = (e) => {
9269
9269
  modelType: Lt.type,
9270
9270
  options: {}
9271
9271
  });
9272
- return T(() => {
9272
+ return E(() => {
9273
9273
  const i = j(() => {
9274
9274
  var c, d;
9275
9275
  t(((c = n.model) == null ? void 0 : c.isStorageInserted) ?? !1), o(((d = n.model) == null ? void 0 : d.data) ?? []);
@@ -9292,7 +9292,7 @@ const Xp = ({
9292
9292
  autoStart: o
9293
9293
  }) => {
9294
9294
  const r = ig.getTimer(e);
9295
- return T(() => {
9295
+ return E(() => {
9296
9296
  const n = K(Zi, (i) => {
9297
9297
  const { name: c, action: d, remainingTime: l } = i == null ? void 0 : i.body;
9298
9298
  c === e && r && (d === Wi ? t({ name: c, action: d, remainingTime: l, timer: r }) : s != null && s[d] && s[d]({
@@ -9384,7 +9384,7 @@ const Jg = async () => {
9384
9384
  ), i = s.join("__"), c = Ur(
9385
9385
  i,
9386
9386
  () => Qg(n, o, r)
9387
- ), d = N(() => ({
9387
+ ), d = k(() => ({
9388
9388
  exists: (u) => {
9389
9389
  const h = t != null && t.keyPrefix ? `${t.keyPrefix}.${u}` : u;
9390
9390
  return c ? c.exists(h) : !1;
@@ -9428,7 +9428,7 @@ const oy = (e) => z({
9428
9428
  var d, l;
9429
9429
  return n.length > 0 && ((d = n[0]) != null && d.resolvable) ? (l = n[0]) == null ? void 0 : l.resolve() : Promise.resolve(void 0);
9430
9430
  }, [n]);
9431
- return T(() => j(() => {
9431
+ return E(() => j(() => {
9432
9432
  const l = (e ? s == null ? void 0 : s.troubles.getIndexByKey("byType", e) : s == null ? void 0 : s.troubles.data) || [], u = t ? l.filter(t) : l;
9433
9433
  r(u.length > 0), i(u);
9434
9434
  }), [t, s, e]), [
@@ -9452,7 +9452,7 @@ const em = () => {
9452
9452
  activate: !0,
9453
9453
  destroyOnUnmount: !0
9454
9454
  }), [s, o] = v(!1), [r, n] = v(!1), [i, c] = v([]);
9455
- return T(() => {
9455
+ return E(() => {
9456
9456
  const d = j(() => {
9457
9457
  var l, u, h;
9458
9458
  o(((l = t.model) == null ? void 0 : l.isUsbInserted) ?? !1), n(((u = t.model) == null ? void 0 : u.hasAvailableUpdates) ?? !1), c(((h = t.model) == null ? void 0 : h.data) ?? []);
@@ -9478,10 +9478,10 @@ const ay = ({ path: e, propKey: t }) => {
9478
9478
  }), [o, r] = v(!1), [n, i] = v(), [c, d] = v(""), [l, u] = v(), h = (f) => {
9479
9479
  n && t && n.updateProperty(t, f);
9480
9480
  };
9481
- return T(() => {
9481
+ return E(() => {
9482
9482
  var f;
9483
9483
  s.model && i(s.model), s.model && t && ((f = s.model) != null && f.props.has(t) ? d(s.model.props[t]) : u(`property ${t} not found`)), s.ready && r(s.ready);
9484
- }, [s.ready, s.model, t]), T(() => {
9484
+ }, [s.ready, s.model, t]), E(() => {
9485
9485
  t && _t(() => {
9486
9486
  const f = n == null ? void 0 : n.props[t];
9487
9487
  d(f || "");
@@ -9521,7 +9521,7 @@ const ay = ({ path: e, propKey: t }) => {
9521
9521
  },
9522
9522
  [e]
9523
9523
  );
9524
- return T(() => {
9524
+ return E(() => {
9525
9525
  async function l(u) {
9526
9526
  try {
9527
9527
  u && (await oe(u), o(!0));
@@ -9530,7 +9530,7 @@ const ay = ({ path: e, propKey: t }) => {
9530
9530
  }
9531
9531
  }
9532
9532
  l(e);
9533
- }, [e]), T(() => {
9533
+ }, [e]), E(() => {
9534
9534
  const l = j(() => {
9535
9535
  if (e && s) {
9536
9536
  let u = [];
@@ -9668,14 +9668,14 @@ function lm({
9668
9668
  };
9669
9669
  }
9670
9670
  function la(e = "long", t = [2018, 2028]) {
9671
- return N(
9671
+ return k(
9672
9672
  () => am(e, t),
9673
9673
  [e, t]
9674
9674
  );
9675
9675
  }
9676
9676
  function um(e = "long", t = [2018, 2028], s = "en-US") {
9677
9677
  const o = la(e, t);
9678
- return N(
9678
+ return k(
9679
9679
  () => o.map((n) => ({
9680
9680
  label: n.toLocaleString(s).replace(",", ""),
9681
9681
  value: n
@@ -9684,17 +9684,17 @@ function um(e = "long", t = [2018, 2028], s = "en-US") {
9684
9684
  );
9685
9685
  }
9686
9686
  function hm(e, t = "en-US") {
9687
- return N(
9687
+ return k(
9688
9688
  () => da(e, t),
9689
9689
  [e, t]
9690
9690
  );
9691
9691
  }
9692
9692
  function gm(e, t = "en-US") {
9693
- const s = N(() => nm(), []), o = N(
9693
+ const s = k(() => nm(), []), o = k(
9694
9694
  () => da(e, t),
9695
9695
  [e, t]
9696
9696
  );
9697
- return N(
9697
+ return k(
9698
9698
  () => [...Array(12).keys()].map((n) => ({
9699
9699
  label: o[n],
9700
9700
  value: Number(s[n])
@@ -9704,7 +9704,7 @@ function gm(e, t = "en-US") {
9704
9704
  }
9705
9705
  function ua(e, t) {
9706
9706
  const s = le(e);
9707
- return N(
9707
+ return k(
9708
9708
  () => rm(s, t),
9709
9709
  [t, s]
9710
9710
  );
@@ -9715,7 +9715,7 @@ const mm = (e, t, s, o = []) => {
9715
9715
  };
9716
9716
  function fm(e, t, s = "en-US", o = []) {
9717
9717
  const r = ua(e, t);
9718
- return N(
9718
+ return k(
9719
9719
  () => r.map((i) => ({
9720
9720
  label: i.toLocaleString(s),
9721
9721
  value: i,
@@ -9725,7 +9725,7 @@ function fm(e, t, s = "en-US", o = []) {
9725
9725
  );
9726
9726
  }
9727
9727
  function pm(e = "en-US", t = "short") {
9728
- return N(
9728
+ return k(
9729
9729
  () => dm(e, t),
9730
9730
  [e, t]
9731
9731
  );
@@ -9740,7 +9740,7 @@ function ym({
9740
9740
  return { formattedDate: Ae(n, o) };
9741
9741
  }
9742
9742
  function bm(e, t, s) {
9743
- return N(
9743
+ return k(
9744
9744
  () => cm(e, t, s),
9745
9745
  [e, t, s]
9746
9746
  );
@@ -9769,11 +9769,11 @@ function uy({
9769
9769
  } = {}
9770
9770
  }) {
9771
9771
  const [u, h] = v(t), [f, y] = v(d), [p, b] = v(s), [O, A] = v(o);
9772
- T(() => {
9772
+ E(() => {
9773
9773
  h(t);
9774
- }, [t]), T(() => {
9774
+ }, [t]), E(() => {
9775
9775
  b(s);
9776
- }, [s]), T(() => {
9776
+ }, [s]), E(() => {
9777
9777
  A(o);
9778
9778
  }, [o]);
9779
9779
  const {
@@ -9871,14 +9871,14 @@ function vm({
9871
9871
  modelType: ee.type,
9872
9872
  options: {}
9873
9873
  }), h = typeof e == "string" ? Ia(e) : e;
9874
- return T(() => {
9874
+ return E(() => {
9875
9875
  d ? c("") : t ? c(Ae(h, t)) : u && c(
9876
9876
  Ae(
9877
9877
  h,
9878
9878
  l != null && l.selectedDateFormat ? l == null ? void 0 : l.selectedDateFormat : ""
9879
9879
  )
9880
9880
  );
9881
- }, [d, e, t, h, l, u]), T(() => {
9881
+ }, [d, e, t, h, l, u]), E(() => {
9882
9882
  s ? n(Ae(h, s)) : u && n(
9883
9883
  Ae(
9884
9884
  h,
@@ -9896,7 +9896,7 @@ const _m = ({
9896
9896
  ignoreDateFormat: !0
9897
9897
  }
9898
9898
  });
9899
- return T(() => {
9899
+ return E(() => {
9900
9900
  const u = Number(e), h = Math.floor(u / 3600), f = Math.floor(u % 3600 / 60), y = u % 60;
9901
9901
  s(h), r(f), i(y);
9902
9902
  const p = /* @__PURE__ */ new Date();
@@ -9920,7 +9920,7 @@ const _m = ({
9920
9920
  const { value: t } = sm({ configProperty: e }), s = parseInt(t || "0", 10), { hours: o, minutes: r, seconds: n, formattedTime: i, timeActions: c } = _m({
9921
9921
  secondsFromMidnight: s
9922
9922
  }), d = Do();
9923
- return T(() => {
9923
+ return E(() => {
9924
9924
  const l = o * 3600 + r * 60 + n;
9925
9925
  return d.current && clearTimeout(d.current), d.current = setTimeout(() => {
9926
9926
  e && e.updateProperty(l.toString());
@@ -9934,20 +9934,32 @@ const _m = ({
9934
9934
  formattedTime: i,
9935
9935
  timeActions: c
9936
9936
  };
9937
- }, Mm = (e) => /* @__PURE__ */ w("option", { title: e.id, value: e.format, children: e.format }, e.id), gy = (e = Mm) => {
9937
+ };
9938
+ function gy(e) {
9939
+ E(() => {
9940
+ const t = () => {
9941
+ try {
9942
+ e({ __warmup: !0 });
9943
+ } catch {
9944
+ }
9945
+ };
9946
+ "requestIdleCallback" in window ? requestIdleCallback(t) : setTimeout(t, 1);
9947
+ }, [e]);
9948
+ }
9949
+ const Mm = (e) => /* @__PURE__ */ w("option", { title: e.id, value: e.format, children: e.format }, e.id), my = (e = Mm) => {
9938
9950
  const [t, s] = v([]), [o, r] = v(), { model: n, ready: i } = z({
9939
9951
  modelType: ee.type,
9940
9952
  modelId: ee.type,
9941
9953
  options: {}
9942
9954
  });
9943
- T(() => {
9955
+ E(() => {
9944
9956
  const d = j(() => {
9945
9957
  s((n == null ? void 0 : n.dateFormatOptions.map(e)) || []);
9946
9958
  });
9947
9959
  return () => {
9948
9960
  d();
9949
9961
  };
9950
- }, [n, i, e]), T(() => {
9962
+ }, [n, i, e]), E(() => {
9951
9963
  const d = j(() => {
9952
9964
  n != null && n.dateFormatId && (n != null && n.selectedDateFormat) && r({
9953
9965
  id: n == null ? void 0 : n.dateFormatId,
@@ -9978,7 +9990,7 @@ const _m = ({
9978
9990
  options: t
9979
9991
  }
9980
9992
  };
9981
- }, Im = (e) => /* @__PURE__ */ w("option", { title: e, value: e, children: e }, e), ha = "kos:service:region:settings", ga = "timeZone", $m = `${ha}-${ga}`, my = (e = Im) => {
9993
+ }, Im = (e) => /* @__PURE__ */ w("option", { title: e, value: e, children: e }, e), ha = "kos:service:region:settings", ga = "timeZone", $m = `${ha}-${ga}`, fy = (e = Im) => {
9982
9994
  const [t, s] = v([]), [o, r] = v(""), { model: n, ready: i } = z({
9983
9995
  modelType: ee.type,
9984
9996
  modelId: ee.type,
@@ -9989,14 +10001,14 @@ const _m = ({
9989
10001
  path: ha,
9990
10002
  attribute: ga
9991
10003
  });
9992
- T(() => {
10004
+ E(() => {
9993
10005
  const l = j(() => {
9994
10006
  s((n == null ? void 0 : n.timeZones.map(e)) || []), n != null && n.timeZones.length && Fr(n == null ? void 0 : n.timeZones[0]);
9995
10007
  });
9996
10008
  return () => {
9997
10009
  l();
9998
10010
  };
9999
- }, [n, i, e]), T(() => {
10011
+ }, [n, i, e]), E(() => {
10000
10012
  const l = j(() => {
10001
10013
  r(c.value || "");
10002
10014
  });
@@ -10033,14 +10045,14 @@ const _m = ({
10033
10045
  path: ma,
10034
10046
  attribute: fa
10035
10047
  });
10036
- T(() => {
10048
+ E(() => {
10037
10049
  const l = j(() => {
10038
10050
  s((n == null ? void 0 : n.availableRegions.map(e)) || []);
10039
10051
  });
10040
10052
  return () => {
10041
10053
  l();
10042
10054
  };
10043
- }, [n, i, e]), T(() => {
10055
+ }, [n, i, e]), E(() => {
10044
10056
  const l = j(() => {
10045
10057
  r(c.value || "factory");
10046
10058
  });
@@ -10065,20 +10077,20 @@ const _m = ({
10065
10077
  options: t
10066
10078
  }
10067
10079
  };
10068
- }, Dm = (e) => /* @__PURE__ */ w("option", { title: e.id, value: e.format, children: e.format }, e.id), fy = (e = Dm) => {
10080
+ }, Dm = (e) => /* @__PURE__ */ w("option", { title: e.id, value: e.format, children: e.format }, e.id), py = (e = Dm) => {
10069
10081
  const [t, s] = v([]), [o, r] = v(), { model: n, ready: i } = z({
10070
10082
  modelType: ee.type,
10071
10083
  modelId: ee.type,
10072
10084
  options: {}
10073
10085
  });
10074
- T(() => {
10086
+ E(() => {
10075
10087
  const d = j(() => {
10076
10088
  s((n == null ? void 0 : n.timeFormatOptions.map(e)) || []);
10077
10089
  });
10078
10090
  return () => {
10079
10091
  d();
10080
10092
  };
10081
- }, [n, i, e]), T(() => {
10093
+ }, [n, i, e]), E(() => {
10082
10094
  const d = j(() => {
10083
10095
  n != null && n.timeFormatId && (n != null && n.selectedTimeFormat) && r({
10084
10096
  id: n == null ? void 0 : n.timeFormatId,
@@ -10109,17 +10121,17 @@ const _m = ({
10109
10121
  options: t
10110
10122
  }
10111
10123
  };
10112
- }, py = (e, t) => N(() => _n(e), t), Sm = {
10124
+ }, yy = (e, t) => k(() => _n(e), t), Sm = {
10113
10125
  config: { attributes: !0, childList: !0, subtree: !0 }
10114
10126
  };
10115
- function yy(e, t, s = Sm) {
10127
+ function by(e, t, s = Sm) {
10116
10128
  const [o, r] = v(null);
10117
- T(() => {
10129
+ E(() => {
10118
10130
  if (!t || typeof t != "function")
10119
10131
  throw new Error("A valid callback function is required");
10120
10132
  const n = new MutationObserver(t);
10121
10133
  r(n);
10122
- }, [t, s, r]), T(() => {
10134
+ }, [t, s, r]), E(() => {
10123
10135
  if (!o)
10124
10136
  return () => {
10125
10137
  };
@@ -10148,7 +10160,7 @@ const Am = {
10148
10160
  name: "usePressGesture",
10149
10161
  group: "kos-hooks"
10150
10162
  });
10151
- function by({
10163
+ function wy({
10152
10164
  onPressed: e,
10153
10165
  onRelease: t,
10154
10166
  intersectionStrategy: s = Am
@@ -10181,7 +10193,7 @@ function by({
10181
10193
  }
10182
10194
  const Cm = () => {
10183
10195
  const [e, t] = v(!1), s = _.getInstance();
10184
- return T(() => {
10196
+ return E(() => {
10185
10197
  const o = j(() => {
10186
10198
  s && s.reloading !== e && t(s.reloading);
10187
10199
  });
@@ -10191,7 +10203,7 @@ const Cm = () => {
10191
10203
  }, [s, e]), [e];
10192
10204
  };
10193
10205
  function Rm(e = !1, t = "2-digit") {
10194
- return N(() => {
10206
+ return k(() => {
10195
10207
  const s = e ? 12 : 24;
10196
10208
  return Array.from({ length: s }, (o, r) => {
10197
10209
  const n = e && r === 0 ? 12 : r % s;
@@ -10203,7 +10215,7 @@ function Rm(e = !1, t = "2-digit") {
10203
10215
  }, [t, e]);
10204
10216
  }
10205
10217
  function jr(e, t = "2-digit", s = 0, o = 0) {
10206
- return N(
10218
+ return k(
10207
10219
  () => Array.from({ length: e }, (r, n) => {
10208
10220
  const i = String(n + s);
10209
10221
  return {
@@ -10215,7 +10227,7 @@ function jr(e, t = "2-digit", s = 0, o = 0) {
10215
10227
  );
10216
10228
  }
10217
10229
  function Lm(e = "en-US") {
10218
- return N(
10230
+ return k(
10219
10231
  () => ["AM", "PM"].map((t) => {
10220
10232
  const s = new Intl.DateTimeFormat(e, {
10221
10233
  hour: "2-digit",
@@ -10243,10 +10255,10 @@ function Pm({
10243
10255
  amPmOptions: d
10244
10256
  };
10245
10257
  }
10246
- function Nm(e, t) {
10258
+ function km(e, t) {
10247
10259
  return Ae(e, t);
10248
10260
  }
10249
- function km({
10261
+ function Nm({
10250
10262
  formatOptions: e,
10251
10263
  initialDate: t = /* @__PURE__ */ new Date(),
10252
10264
  locale: s = "en-US",
@@ -10270,7 +10282,7 @@ function km({
10270
10282
  }, []), l = X((b) => {
10271
10283
  const O = new Date(b);
10272
10284
  n(O);
10273
- }, []), u = Nm(r, o), { hourOptions: h, minuteOptions: f, secondOptions: y, amPmOptions: p } = Pm({
10285
+ }, []), u = km(r, o), { hourOptions: h, minuteOptions: f, secondOptions: y, amPmOptions: p } = Pm({
10274
10286
  formatOptions: e,
10275
10287
  locale: s
10276
10288
  });
@@ -10287,16 +10299,16 @@ function km({
10287
10299
  time: new Date(r)
10288
10300
  };
10289
10301
  }
10290
- const wy = (e) => {
10291
- const { regionModel: t } = Om(), s = N(() => ({ hour12: t == null ? void 0 : t.is12HourTimeFormat }), [t == null ? void 0 : t.is12HourTimeFormat]);
10292
- return km({
10302
+ const vy = (e) => {
10303
+ const { regionModel: t } = Om(), s = k(() => ({ hour12: t == null ? void 0 : t.is12HourTimeFormat }), [t == null ? void 0 : t.is12HourTimeFormat]);
10304
+ return Nm({
10293
10305
  ...e,
10294
10306
  locale: t == null ? void 0 : t.regionId,
10295
10307
  format: t == null ? void 0 : t.selectedTimeFormat,
10296
10308
  formatOptions: s
10297
10309
  });
10298
10310
  };
10299
- function vy(e) {
10311
+ function _y(e) {
10300
10312
  return (t) => {
10301
10313
  const [s] = Cm();
10302
10314
  return s ? /* @__PURE__ */ w(pg, { message: "Wait a moment while your project reloads..." }) : /* @__PURE__ */ w(e, { ...t });
@@ -10316,7 +10328,7 @@ const Br = g.createLogger({
10316
10328
  timeout: 500
10317
10329
  }
10318
10330
  );
10319
- }, _y = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10331
+ }, My = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10320
10332
  __proto__: null,
10321
10333
  getStudioProperties: pa
10322
10334
  }, Symbol.toStringTag, { value: "Module" }));
@@ -10367,7 +10379,7 @@ let Oo = class {
10367
10379
  Oo = jm([
10368
10380
  S(ya)
10369
10381
  ], Oo);
10370
- const My = new ve({
10382
+ const Iy = new ve({
10371
10383
  class: Oo,
10372
10384
  type: ya
10373
10385
  });
@@ -10381,7 +10393,7 @@ export {
10381
10393
  Ip as CoreExtensionManager,
10382
10394
  Yi as CoreModels,
10383
10395
  Sg as CreateModelTranslationsContext,
10384
- Np as CreateModelTranslationsProvider,
10396
+ kp as CreateModelTranslationsProvider,
10385
10397
  wm as DateDisplayFormat,
10386
10398
  hf as DateHelpers,
10387
10399
  G as DependencyLifecycle,
@@ -10409,18 +10421,18 @@ export {
10409
10421
  Qe as FutureManager,
10410
10422
  zl as FutureModel,
10411
10423
  wt as FutureService,
10412
- Na as HEADER_CACHE_CONTROL,
10424
+ ka as HEADER_CACHE_CONTROL,
10413
10425
  Pa as HEADER_CONTENT_TYPE,
10414
10426
  Me as HEADER_DESTINATION_ADDR,
10415
- ka as HEADER_FOS_REQUEST_ID,
10427
+ Na as HEADER_FOS_REQUEST_ID,
10416
10428
  So as HEADER_METHOD,
10417
10429
  Wr as HEADER_ORDERED,
10418
- Ns as HEADER_REQUEST_ID,
10430
+ ks as HEADER_REQUEST_ID,
10419
10431
  ye as HEADER_REQUEST_TYPE,
10420
10432
  Ao as HEADER_RESPONSE_ID,
10421
10433
  La as HEADER_SOURCE_ADDR,
10422
10434
  Ra as HEADER_TOPIC,
10423
- kt as HEADER_URL,
10435
+ Nt as HEADER_URL,
10424
10436
  Jr as HEADER_WORK_TRACKER,
10425
10437
  uo as KOS_MODEL_ID,
10426
10438
  Vn as KeyValue,
@@ -10429,7 +10441,7 @@ export {
10429
10441
  nt as KosConfigPropertySpec,
10430
10442
  vn as KosContainerIndex,
10431
10443
  Yd as KosContextBean,
10432
- k as KosContextManager,
10444
+ N as KosContextManager,
10433
10445
  _ as KosCore,
10434
10446
  he as KosCoreModelPropertyMapper,
10435
10447
  Zd as KosDataContainer,
@@ -10455,7 +10467,7 @@ export {
10455
10467
  m as KosModelState,
10456
10468
  yc as KosModelSymbol,
10457
10469
  jf as KosModelVisitor,
10458
- kd as KosObservableData,
10470
+ Nd as KosObservableData,
10459
10471
  Wf as KosRegistration,
10460
10472
  Jf as KosSingletonRegistration,
10461
10473
  mo as KosTime,
@@ -10467,7 +10479,7 @@ export {
10467
10479
  Gp as KosTranslationProvider,
10468
10480
  Ih as KosTranslations,
10469
10481
  sd as KosWSTransportStatus,
10470
- ks as KosWsEvents,
10482
+ Ns as KosWsEvents,
10471
10483
  xa as LOGIN_HOST,
10472
10484
  of as LOGIN_URL,
10473
10485
  pg as LoadingMessage,
@@ -10478,7 +10490,7 @@ export {
10478
10490
  Bs as LogStreamContainer,
10479
10491
  lp as LogStreamServices,
10480
10492
  dd as MODEL_DELETION_DELAY,
10481
- Nd as MiddlewareChain,
10493
+ kd as MiddlewareChain,
10482
10494
  ns as ModelEffects,
10483
10495
  np as MultipleFutureHandler,
10484
10496
  Qo as NestedModelContext,
@@ -10500,11 +10512,11 @@ export {
10500
10512
  Js as ReferenceConfig,
10501
10513
  ee as RegionInfo,
10502
10514
  op as RegionServices,
10503
- E as RegistrationManager,
10515
+ T as RegistrationManager,
10504
10516
  Mp as Registry,
10505
10517
  Zr as STATUS,
10506
10518
  Z as ServiceFactory,
10507
- ke as SingletonKosModelRegistrationFactory,
10519
+ Ne as SingletonKosModelRegistrationFactory,
10508
10520
  wo as SoftwareInfo,
10509
10521
  na as SoftwareInfoContext,
10510
10522
  jp as SoftwareInfoProvider,
@@ -10516,8 +10528,8 @@ export {
10516
10528
  To as StorageDevice,
10517
10529
  Lt as StorageDeviceContainer,
10518
10530
  vp as StorageDeviceServices,
10519
- My as StudioProperties,
10520
- _y as StudioPropertiesServices,
10531
+ Iy as StudioProperties,
10532
+ My as StudioPropertiesServices,
10521
10533
  ae as SubscriptionHandlers,
10522
10534
  Wi as TIMER_END,
10523
10535
  Zi as TIMER_EVENT,
@@ -10552,7 +10564,7 @@ export {
10552
10564
  Vl as api,
10553
10565
  af as applyMixins,
10554
10566
  sp as buildConfigBeanModel,
10555
- Nn as buildFuture,
10567
+ kn as buildFuture,
10556
10568
  Bl as buildFutureModel,
10557
10569
  jl as cancelFuture,
10558
10570
  _l as convert,
@@ -10565,7 +10577,7 @@ export {
10565
10577
  Ec as createKosHtpMessageResponse,
10566
10578
  Mc as createKosMessage,
10567
10579
  Tc as createKosMessageResponse,
10568
- Ne as createMessageBody,
10580
+ ke as createMessageBody,
10569
10581
  xc as createModelDependency,
10570
10582
  Mf as createOptionKey,
10571
10583
  ot as createPropKey,
@@ -10581,7 +10593,7 @@ export {
10581
10593
  zt as executeDependentModelLifecycle,
10582
10594
  Uc as executeListLifecycle,
10583
10595
  Yp as fetchModel,
10584
- Nf as findModel,
10596
+ kf as findModel,
10585
10597
  yd as findModels,
10586
10598
  Qd as fireIntent,
10587
10599
  Va as formatDate,
@@ -10602,7 +10614,7 @@ export {
10602
10614
  le as getFormattedYear,
10603
10615
  am as getFormattedYearsArray,
10604
10616
  ip as getFutures,
10605
- kf as getKosCompanionModel,
10617
+ Nf as getKosCompanionModel,
10606
10618
  mh as getKosLocalizationDescriptor,
10607
10619
  cc as getKosMessageLogging,
10608
10620
  pd as getKosModel,
@@ -10622,7 +10634,7 @@ export {
10622
10634
  tr as hasKosProfile,
10623
10635
  Ja as hslStringToHex,
10624
10636
  Wa as hslToHex,
10625
- kp as initKosProvider,
10637
+ Np as initKosProvider,
10626
10638
  En as isBoolean,
10627
10639
  id as isKosCompanionTypeFactory,
10628
10640
  so as isKosDataModel,
@@ -10632,13 +10644,13 @@ export {
10632
10644
  ho as isKosModelReady,
10633
10645
  Xr as isLeapYear,
10634
10646
  Yf as isLocalRefId,
10635
- ko as isNumber,
10647
+ No as isNumber,
10636
10648
  es as isValidDate,
10637
10649
  Q as kosAction,
10638
10650
  j as kosAutoEffect,
10639
10651
  we as kosChild,
10640
10652
  If as kosCompanion,
10641
- Dy as kosComponent,
10653
+ Sy as kosComponent,
10642
10654
  _n as kosComputed,
10643
10655
  Fo as kosConfigBean,
10644
10656
  rp as kosConfigProperty,
@@ -10659,8 +10671,8 @@ export {
10659
10671
  L as kosTopicHandler,
10660
10672
  Mr as kosWhen,
10661
10673
  dg as login,
10662
- Ey as makeAutoObservable,
10663
- Ty as makeObservable,
10674
+ Ty as makeAutoObservable,
10675
+ Oy as makeObservable,
10664
10676
  dl as mapConfigBeanModelToDto,
10665
10677
  sr as mapDataToModel,
10666
10678
  al as mapDtoToConfigBeanModel,
@@ -10710,8 +10722,8 @@ export {
10710
10722
  $p as subscribeStore,
10711
10723
  qf as syncPublish,
10712
10724
  Lc as transitionToActive,
10713
- kc as transitionToInit,
10714
- Nc as transitionToLoad,
10725
+ Nc as transitionToInit,
10726
+ kc as transitionToLoad,
10715
10727
  Pc as transitionToReady,
10716
10728
  Df as transitionToUnload,
10717
10729
  yp as troubleByTypeReducer,
@@ -10737,28 +10749,29 @@ export {
10737
10749
  ua as useDays,
10738
10750
  Ug as useDevice,
10739
10751
  ym as useFormattedDate,
10740
- Nm as useFormattedTime,
10752
+ km as useFormattedTime,
10753
+ gy as useFunctionWarmup,
10741
10754
  Rm as useHourValues,
10742
10755
  Cg as useKosCore,
10743
- gy as useKosDateFormats,
10756
+ my as useKosDateFormats,
10744
10757
  z as useKosModel,
10745
10758
  Om as useKosRegions,
10746
10759
  sa as useKosTime,
10747
10760
  Fp as useKosTimeContext,
10748
- fy as useKosTimeFormats,
10749
- my as useKosTimeZones,
10761
+ py as useKosTimeFormats,
10762
+ fy as useKosTimeZones,
10750
10763
  ty as useKosTranslation,
10751
10764
  zp as useKosTranslationContext,
10752
- py as useLocalComputed,
10765
+ yy as useLocalComputed,
10753
10766
  Pp as useModelFromHierarchy,
10754
10767
  hm as useMonths,
10755
10768
  gm as useMonthsOptions,
10756
- yy as useMutationObserver,
10769
+ by as useMutationObserver,
10757
10770
  jg as useNetworkInterfaceContainer,
10758
10771
  Bg as useOta,
10759
- by as usePressGesture,
10772
+ wy as usePressGesture,
10760
10773
  Cm as useProjectReload,
10761
- wy as useRegionTimeProps,
10774
+ vy as useRegionTimeProps,
10762
10775
  vm as useRegionalTimeDate,
10763
10776
  ra as useSoftwareInfo,
10764
10777
  Bp as useSoftwareInfoContext,
@@ -10766,7 +10779,7 @@ export {
10766
10779
  Gg as useStorageDeviceContainer,
10767
10780
  Ur as useSuspenseData,
10768
10781
  Pm as useTimeOptions,
10769
- km as useTimeProps,
10782
+ Nm as useTimeProps,
10770
10783
  jr as useTimeValues,
10771
10784
  Xp as useTimer,
10772
10785
  Xg as useTranslationContainer,
@@ -10784,7 +10797,7 @@ export {
10784
10797
  Hp as withKosTime,
10785
10798
  qp as withNetworkInterfaceContainer,
10786
10799
  Zp as withOta,
10787
- vy as withProjectReloading,
10800
+ _y as withProjectReloading,
10788
10801
  Up as withSoftwareInfo,
10789
10802
  Qp as withStorageDeviceContainer,
10790
10803
  sy as withTranslationContainer,