@kosdev-code/kos-freestyle-sdk 2.0.39 → 2.0.41

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.
@@ -1,12 +1,12 @@
1
1
  var Ne = Object.defineProperty;
2
2
  var Fe = (e, t, r) => t in e ? Ne(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var o = (e, t, r) => (Fe(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { kosModel as f, KosModelRegistrationFactory as P, KosModelContainer as de, kosChild as X, resolveServiceUrl as L, ServiceFactory as G, createPropKey as j, kosStateProp as J, kosFuture as U, setupMinimalFutureSupport as Le, kosEffect as Ge, EventBus as w, SingletonKosModelRegistrationFactory as k, kosParentAware as ue, KosFeatureFlags as H, kosConfigProperty as p, getKosModelSync as v, KosContextManager as je, KosLog as A, FutureManager as Ue, kosAutoEffect as Be, kosAction as M, FetchError as He, KOS_MODEL_ID as m, kosModelEffect as xe, MultipleFutureHandler as Ke, kosTopicHandler as Ye, modelTypeEventTopicFactory as qe, DependencyLifecycle as Ve, RegistrationManager as h, registerCoreModels as We, Trouble as Ze, ExtensionManager as x, EXTENSION_TROUBLE_DATA_MAPPER as K } from "@kosdev-code/kos-ui-sdk";
4
+ import { kosModel as f, KosModelRegistrationFactory as b, KosModelContainer as de, kosChild as X, resolveServiceUrl as L, ServiceFactory as G, createPropKey as j, kosStateProp as J, kosFuture as U, setupMinimalFutureSupport as Le, kosEffect as Ge, EventBus as w, SingletonKosModelRegistrationFactory as k, kosParentAware as ue, KosFeatureFlags as H, kosConfigProperty as p, getKosModelSync as v, KosContextManager as je, KosLog as $, FutureManager as Ue, kosAutoEffect as Be, kosAction as M, FetchError as He, KOS_MODEL_ID as m, kosModelEffect as xe, MultipleFutureHandler as Ke, kosTopicHandler as Ye, DependencyLifecycle as qe, modelTypeEventTopicFactory as Ve, RegistrationManager as h, registerCoreModels as We, Trouble as Ze, ExtensionManager as x, EXTENSION_TROUBLE_DATA_MAPPER as K } from "@kosdev-code/kos-ui-sdk";
5
5
  import { PourState as u, Assembly as ge, KosModelRegistry as Qe, registerDispenseModels as Xe, Nozzle as Je, Pump as ke, Holder as et, PumpContainer as tt, PumpIndex as rt } from "@kosdev-code/kos-dispense-sdk";
6
- var at = Object.defineProperty, ot = Object.getOwnPropertyDescriptor, st = (e, t, r, s) => {
7
- for (var a = s > 1 ? void 0 : s ? ot(t, r) : t, i = e.length - 1, n; i >= 0; i--)
8
- (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
9
- return s && a && at(t, r, a), a;
6
+ var at = Object.getOwnPropertyDescriptor, ot = (e, t, r, s) => {
7
+ for (var a = s > 1 ? void 0 : s ? at(t, r) : t, i = e.length - 1, n; i >= 0; i--)
8
+ (n = e[i]) && (a = n(a) || a);
9
+ return a;
10
10
  };
11
11
  const ce = "carb-agitator-model";
12
12
  let q = class {
@@ -25,17 +25,17 @@ let q = class {
25
25
  this.logger.debug(`loading carb-agitator ${this.id}`);
26
26
  }
27
27
  };
28
- q = st([
28
+ q = ot([
29
29
  f(ce)
30
30
  ], q);
31
- const he = new P({
31
+ const he = new b({
32
32
  class: q,
33
33
  type: ce
34
34
  });
35
- var it = Object.defineProperty, nt = Object.getOwnPropertyDescriptor, pe = (e, t, r, s) => {
36
- for (var a = s > 1 ? void 0 : s ? nt(t, r) : t, i = e.length - 1, n; i >= 0; i--)
35
+ var st = Object.defineProperty, it = Object.getOwnPropertyDescriptor, pe = (e, t, r, s) => {
36
+ for (var a = s > 1 ? void 0 : s ? it(t, r) : t, i = e.length - 1, n; i >= 0; i--)
37
37
  (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
38
- return s && a && it(t, r, a), a;
38
+ return s && a && st(t, r, a), a;
39
39
  };
40
40
  const ye = "cartridge-agitator-container-model";
41
41
  let S = class {
@@ -80,10 +80,10 @@ pe([
80
80
  S = pe([
81
81
  f(ye)
82
82
  ], S);
83
- const { URL: fe } = L("CARTRIDGE_AGITATOR_SERVICE"), { postModel: lt } = G.build({
83
+ const { URL: fe } = L("CARTRIDGE_AGITATOR_SERVICE"), { postModel: nt } = G.build({
84
84
  basePath: `${fe}/api/ext/freestyle/freestyle/ice`
85
- }), dt = async (e, t) => {
86
- const r = await lt({
85
+ }), lt = async (e, t) => {
86
+ const r = await nt({
87
87
  model: {},
88
88
  tracker: t,
89
89
  urlOverride: `${fe}/api/handle/${e}/test`
@@ -92,16 +92,16 @@ const { URL: fe } = L("CARTRIDGE_AGITATOR_SERVICE"), { postModel: lt } = G.build
92
92
  throw new Error("No response from server");
93
93
  return r.data;
94
94
  };
95
- var ut = Object.defineProperty, gt = Object.getOwnPropertyDescriptor, ee = (e, t, r, s) => {
96
- for (var a = s > 1 ? void 0 : s ? gt(t, r) : t, i = e.length - 1, n; i >= 0; i--)
95
+ var dt = Object.defineProperty, ut = Object.getOwnPropertyDescriptor, ee = (e, t, r, s) => {
96
+ for (var a = s > 1 ? void 0 : s ? ut(t, r) : t, i = e.length - 1, n; i >= 0; i--)
97
97
  (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
98
- return s && a && ut(t, r, a), a;
98
+ return s && a && dt(t, r, a), a;
99
99
  };
100
100
  const me = "cartridge-agitator-model";
101
101
  class R {
102
102
  }
103
103
  o(R, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/agitation-started"), o(R, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/agitation-ended");
104
- const ct = j("statePath");
104
+ const gt = j("statePath");
105
105
  let O = class {
106
106
  constructor(e, t, r) {
107
107
  o(this, "id");
@@ -120,7 +120,7 @@ let O = class {
120
120
  async testAgitate(e) {
121
121
  if (!e)
122
122
  throw new Error("No tracker provided");
123
- return this.logger.info(`agitating cartridge-agitator ${this.id}`), dt(this.path, e);
123
+ return this.logger.info(`agitating cartridge-agitator ${this.id}`), lt(this.path, e);
124
124
  }
125
125
  // -------------------LIFECYCLE----------------------------
126
126
  async init() {
@@ -147,7 +147,7 @@ let O = class {
147
147
  }
148
148
  };
149
149
  ee([
150
- J({ path: ct, attribute: "agitating" })
150
+ J({ path: gt, attribute: "agitating" })
151
151
  ], O.prototype, "agitating", 2);
152
152
  ee([
153
153
  U()
@@ -155,7 +155,7 @@ ee([
155
155
  O = ee([
156
156
  f(me)
157
157
  ], O);
158
- const _e = new P({
158
+ const _e = new b({
159
159
  class: O,
160
160
  type: me
161
161
  }), te = new k({
@@ -163,12 +163,12 @@ const _e = new P({
163
163
  type: ye
164
164
  });
165
165
  te.addRelatedModel(_e);
166
- var ht = Object.defineProperty, pt = Object.getOwnPropertyDescriptor, Pe = (e, t, r, s) => {
167
- for (var a = s > 1 ? void 0 : s ? pt(t, r) : t, i = e.length - 1, n; i >= 0; i--)
166
+ var ct = Object.defineProperty, ht = Object.getOwnPropertyDescriptor, be = (e, t, r, s) => {
167
+ for (var a = s > 1 ? void 0 : s ? ht(t, r) : t, i = e.length - 1, n; i >= 0; i--)
168
168
  (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
169
- return s && a && ht(t, r, a), a;
169
+ return s && a && ct(t, r, a), a;
170
170
  };
171
- const be = "freestyle-assembly-model", yt = "iceAgitator", ft = "carbAgitator", mt = "remoteTrays";
171
+ const Pe = "freestyle-assembly-model", pt = "iceAgitator", yt = "carbAgitator", ft = "remoteTrays";
172
172
  let D = class {
173
173
  constructor(e, t, r) {
174
174
  o(this, "id");
@@ -230,33 +230,33 @@ let D = class {
230
230
  }
231
231
  // -------------------LIFECYCLE----------------------------
232
232
  get supportsRemoteTrays() {
233
- return H.isFeatureEnabled(mt);
233
+ return H.isFeatureEnabled(ft);
234
234
  }
235
235
  get supportsIce() {
236
- return H.isFeatureEnabled(yt);
236
+ return H.isFeatureEnabled(pt);
237
237
  }
238
238
  get supportsCarb() {
239
- return H.isFeatureEnabled(ft);
239
+ return H.isFeatureEnabled(yt);
240
240
  }
241
241
  async init() {
242
242
  this.logger.debug(`initializing freestyle-assembly ${this.id}`);
243
243
  }
244
244
  };
245
- Pe([
245
+ be([
246
246
  X
247
247
  ], D.prototype, "_remoteTrays", 2);
248
- D = Pe([
248
+ D = be([
249
249
  ue(),
250
- f(be)
250
+ f(Pe)
251
251
  ], D);
252
252
  const V = new k({
253
253
  class: D,
254
- type: be
254
+ type: Pe
255
255
  });
256
- var _t = Object.defineProperty, Pt = Object.getOwnPropertyDescriptor, ve = (e, t, r, s) => {
257
- for (var a = s > 1 ? void 0 : s ? Pt(t, r) : t, i = e.length - 1, n; i >= 0; i--)
256
+ var mt = Object.defineProperty, _t = Object.getOwnPropertyDescriptor, ve = (e, t, r, s) => {
257
+ for (var a = s > 1 ? void 0 : s ? _t(t, r) : t, i = e.length - 1, n; i >= 0; i--)
258
258
  (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
259
- return s && a && _t(t, r, a), a;
259
+ return s && a && mt(t, r, a), a;
260
260
  };
261
261
  const Ie = "remote-tray-model";
262
262
  j("holderPath");
@@ -360,14 +360,14 @@ ve([
360
360
  z = ve([
361
361
  f(Ie)
362
362
  ], z);
363
- const E = new P({
363
+ const E = new b({
364
364
  class: z,
365
365
  type: Ie
366
366
  });
367
- var vt = Object.defineProperty, It = Object.getOwnPropertyDescriptor, Te = (e, t, r, s) => {
368
- for (var a = s > 1 ? void 0 : s ? It(t, r) : t, i = e.length - 1, n; i >= 0; i--)
367
+ var Pt = Object.defineProperty, vt = Object.getOwnPropertyDescriptor, Te = (e, t, r, s) => {
368
+ for (var a = s > 1 ? void 0 : s ? vt(t, r) : t, i = e.length - 1, n; i >= 0; i--)
369
369
  (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
370
- return s && a && vt(t, r, a), a;
370
+ return s && a && Pt(t, r, a), a;
371
371
  };
372
372
  const Oe = "remote-tray-container-model";
373
373
  let N = class {
@@ -417,23 +417,23 @@ const re = new k({
417
417
  type: Oe
418
418
  });
419
419
  re.addRelatedModel(E);
420
- var Tt = Object.defineProperty, Ot = Object.getOwnPropertyDescriptor, Et = (e, t, r, s) => {
421
- for (var a = s > 1 ? void 0 : s ? Ot(t, r) : t, i = e.length - 1, n; i >= 0; i--)
422
- (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
423
- return s && a && Tt(t, r, a), a;
420
+ var It = Object.getOwnPropertyDescriptor, Tt = (e, t, r, s) => {
421
+ for (var a = s > 1 ? void 0 : s ? It(t, r) : t, i = e.length - 1, n; i >= 0; i--)
422
+ (n = e[i]) && (a = n(a) || a);
423
+ return a;
424
424
  };
425
425
  const Ee = "freestyle-holder-model";
426
- function $t(e) {
426
+ function Ot(e) {
427
427
  const t = je.getContext(e), r = t == null ? void 0 : t.get(
428
428
  V.type
429
429
  );
430
430
  if (!r) {
431
- A.error("Freestyle assembly not found");
431
+ $.error("Freestyle assembly not found");
432
432
  return;
433
433
  }
434
434
  return r;
435
435
  }
436
- async function At(e, t) {
436
+ async function Et(e, t) {
437
437
  if (!e || !t)
438
438
  return;
439
439
  const r = await e[t]();
@@ -456,14 +456,14 @@ let W = class {
456
456
  if (!this.holder.data.agitated)
457
457
  return;
458
458
  this.future = void 0;
459
- const e = $t(this.id);
459
+ const e = Ot(this.id);
460
460
  if (!e)
461
461
  return;
462
462
  if (!e.defaultCartridgeAgitator) {
463
463
  this.logger.error("Agitator not found");
464
464
  return;
465
465
  }
466
- return this.future = await At(
466
+ return this.future = await Et(
467
467
  e.defaultCartridgeAgitator,
468
468
  "testAgitate"
469
469
  ), this.future;
@@ -480,19 +480,19 @@ let W = class {
480
480
  this.logger.debug(`loading freestyle-holder ${this.id}`);
481
481
  }
482
482
  };
483
- W = Et([
483
+ W = Tt([
484
484
  f(Ee)
485
485
  ], W);
486
- const se = new P({
486
+ const se = new b({
487
487
  class: W,
488
488
  type: Ee
489
- }), { URL: Ct } = L("FREESTYLE-NOZZLE_SERVICE"), { getOne: Mt } = G.build({
490
- basePath: `${Ct}/api/freestyle-nozzle`
491
- }), C = A.createLogger({
489
+ }), { URL: At } = L("FREESTYLE-NOZZLE_SERVICE"), { getOne: $t } = G.build({
490
+ basePath: `${At}/api/freestyle-nozzle`
491
+ }), C = $.createLogger({
492
492
  name: "freestyle-nozzle-service",
493
493
  group: "Services"
494
494
  });
495
- class wt extends Error {
495
+ class Ct extends Error {
496
496
  constructor(t) {
497
497
  super(t), this.name = "NutritionInfoError";
498
498
  }
@@ -502,12 +502,12 @@ class ie extends Error {
502
502
  super(t), this.name = "InvalidRequestError";
503
503
  }
504
504
  }
505
- const St = async (e, t, r, s = "http://localhost:8081") => {
505
+ const Mt = async (e, t, r, s = "http://localhost:8081") => {
506
506
  if (C.debug("sending GET for freestyle-nozzle"), !t)
507
507
  throw C.error("Invalid freestyle-nozzle request: beverageId is required"), new ie("No beverageId provided");
508
508
  if (!r || r.length === 0)
509
509
  throw C.error("Invalid freestyle-nozzle request: volumes are required"), new ie("No volumes provided");
510
- const a = await Mt({
510
+ const a = await $t({
511
511
  urlOverride: `${s}${e}/pipeline/beverage/engine/nutrition/${t}?volumes=${r.join(
512
512
  ","
513
513
  )}`
@@ -515,15 +515,15 @@ const St = async (e, t, r, s = "http://localhost:8081") => {
515
515
  if (!(a != null && a.data))
516
516
  throw C.error("Failed to retrieve freestyle-nozzle data"), new Error("Failed to retrieve freestyle-nozzle data");
517
517
  if (a.data.error)
518
- throw new wt(a.data.error);
518
+ throw new Ct(a.data.error);
519
519
  return a.data;
520
520
  };
521
- var Rt = Object.defineProperty, Dt = Object.getOwnPropertyDescriptor, zt = (e, t, r, s) => {
522
- for (var a = s > 1 ? void 0 : s ? Dt(t, r) : t, i = e.length - 1, n; i >= 0; i--)
523
- (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
524
- return s && a && Rt(t, r, a), a;
521
+ var wt = Object.getOwnPropertyDescriptor, St = (e, t, r, s) => {
522
+ for (var a = s > 1 ? void 0 : s ? wt(t, r) : t, i = e.length - 1, n; i >= 0; i--)
523
+ (n = e[i]) && (a = n(a) || a);
524
+ return a;
525
525
  };
526
- const $e = "freestyle-nozzle-model";
526
+ const Ae = "freestyle-nozzle-model";
527
527
  let Z = class {
528
528
  constructor(e, t, r) {
529
529
  o(this, "id");
@@ -549,7 +549,7 @@ let Z = class {
549
549
  );
550
550
  const e = this.nozzleModel.selectedPourable.beverage.rawId, t = this.nozzleModel.urlPrefix;
551
551
  try {
552
- const r = await St(
552
+ const r = await Mt(
553
553
  t,
554
554
  e,
555
555
  this._cupSizes
@@ -570,27 +570,27 @@ let Z = class {
570
570
  this.logger.debug(`loading freestyle-nozzle ${this.id}`);
571
571
  }
572
572
  };
573
- Z = zt([
573
+ Z = St([
574
574
  ue(),
575
- f($e)
575
+ f(Ae)
576
576
  ], Z);
577
- const ne = new P({
577
+ const ne = new b({
578
578
  class: Z,
579
- type: $e
580
- }), { URL: Ae } = L("PUMP_SERVICE"), { postModel: Nt } = G.build({
581
- basePath: `${Ae}/api/ext/freestyle/microCalibration`
582
- }), Y = A.createLogger({
579
+ type: Ae
580
+ }), { URL: $e } = L("PUMP_SERVICE"), { postModel: Rt } = G.build({
581
+ basePath: `${$e}/api/ext/freestyle/microCalibration`
582
+ }), Y = $.createLogger({
583
583
  name: "freestyle-pump-service",
584
584
  group: "Services"
585
- }), Ft = async (e, t) => {
585
+ }), Dt = async (e, t) => {
586
586
  var r, s, a, i, n;
587
587
  Y.debug(
588
588
  `replacePump - sending POST request to /api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
589
589
  );
590
590
  try {
591
- const l = await Nt({
591
+ const l = await Rt({
592
592
  model: {},
593
- urlOverride: `${Ae}/api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
593
+ urlOverride: `${$e}/api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
594
594
  });
595
595
  return Y.debug("replacePump - response:", l), ((l == null ? void 0 : l.status) === 200 || (l == null ? void 0 : l.status) === 499) && ((r = l.data) != null && r.error) ? [l.data.error || "unknownError", l.data] : [void 0, l == null ? void 0 : l.data];
596
596
  } catch (l) {
@@ -604,10 +604,10 @@ const ne = new P({
604
604
  }
605
605
  return ["unknownError", { error: "unknownError" }];
606
606
  };
607
- var Lt = Object.defineProperty, Gt = Object.getOwnPropertyDescriptor, jt = (e, t, r, s) => {
608
- for (var a = s > 1 ? void 0 : s ? Gt(t, r) : t, i = e.length - 1, n; i >= 0; i--)
609
- (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
610
- return s && a && Lt(t, r, a), a;
607
+ var zt = Object.getOwnPropertyDescriptor, Nt = (e, t, r, s) => {
608
+ for (var a = s > 1 ? void 0 : s ? zt(t, r) : t, i = e.length - 1, n; i >= 0; i--)
609
+ (n = e[i]) && (a = n(a) || a);
610
+ return a;
611
611
  };
612
612
  const Ce = "freestyle-pump-model";
613
613
  let Q = class {
@@ -619,29 +619,29 @@ let Q = class {
619
619
  }
620
620
  // -------------------LIFECYCLE----------------------------
621
621
  async replacePump(e) {
622
- const [t, r] = await Ft(this.pump.path, e);
622
+ const [t, r] = await Dt(this.pump.path, e);
623
623
  return t && this.logger.error(`Failed to replace the pump, ${this.pump.id}`, t), [t, r];
624
624
  }
625
625
  };
626
- Q = jt([
626
+ Q = Nt([
627
627
  f(Ce)
628
628
  ], Q);
629
- const le = new P({
629
+ const le = new b({
630
630
  class: Q,
631
631
  type: Ce
632
632
  }), { URL: I } = L("ICE_AGITATOR_SERVICE"), { getAll: Me, postModel: B } = G.build({
633
633
  basePath: `${I}/api/ext/freestyle/ice`
634
- }), we = A.createLogger({
634
+ }), we = $.createLogger({
635
635
  name: "ice-agitator-service",
636
636
  group: "Services"
637
- }), Ut = async (e) => (we.debug("sending GET for ice types"), await Me({
637
+ }), Ft = async (e) => (we.debug("sending GET for ice types"), await Me({
638
638
  urlOverride: `${I}/api/handle/${e}/types`
639
- })), Bt = async (e, t) => (we.debug("sending POST for ice types"), await B({
639
+ })), Lt = async (e, t) => (we.debug("sending POST for ice types"), await B({
640
640
  urlOverride: `${I}/api/handle/${e}/type/${t}`,
641
641
  model: {}
642
- })), Ht = async (e) => await Me({
642
+ })), Gt = async (e) => await Me({
643
643
  urlOverride: `${I}/api/kos/config/details/${e}/4`
644
- }), xt = async (e, t) => {
644
+ }), jt = async (e, t) => {
645
645
  const r = await B({
646
646
  model: {},
647
647
  tracker: t,
@@ -650,7 +650,7 @@ const le = new P({
650
650
  if (!(r != null && r.data))
651
651
  throw new Error("No response from server");
652
652
  return r == null ? void 0 : r.data;
653
- }, Kt = async (e, t) => {
653
+ }, Ut = async (e, t) => {
654
654
  const r = await B({
655
655
  model: {},
656
656
  tracker: t,
@@ -659,7 +659,7 @@ const le = new P({
659
659
  if (!(r != null && r.data))
660
660
  throw new Error("No response from server");
661
661
  return r == null ? void 0 : r.data;
662
- }, Yt = async (e, t) => {
662
+ }, Bt = async (e, t) => {
663
663
  const r = await B({
664
664
  model: {},
665
665
  tracker: t,
@@ -669,10 +669,10 @@ const le = new P({
669
669
  throw new Error("No response from server");
670
670
  return r == null ? void 0 : r.data;
671
671
  };
672
- var qt = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, g = (e, t, r, s) => {
673
- for (var a = s > 1 ? void 0 : s ? Vt(t, r) : t, i = e.length - 1, n; i >= 0; i--)
672
+ var Ht = Object.defineProperty, xt = Object.getOwnPropertyDescriptor, g = (e, t, r, s) => {
673
+ for (var a = s > 1 ? void 0 : s ? xt(t, r) : t, i = e.length - 1, n; i >= 0; i--)
674
674
  (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
675
- return s && a && qt(t, r, a), a;
675
+ return s && a && Ht(t, r, a), a;
676
676
  };
677
677
  class F {
678
678
  }
@@ -700,7 +700,7 @@ let d = class {
700
700
  o(this, "_allIceTypes");
701
701
  o(this, "logger");
702
702
  o(this, "currentState", u.IDLE);
703
- o(this, "resetDefaultValues", async () => await Ht(this.path));
703
+ o(this, "resetDefaultValues", async () => await Gt(this.path));
704
704
  this.id = e, this.name = t.name, this.path = t.path, this.statePath = t.statePath, this._allIceTypes = [], this.logger = r.logger, this.futureHandler = new Ke(this);
705
705
  }
706
706
  get iceTypes() {
@@ -751,7 +751,7 @@ let d = class {
751
751
  if (this.currentState === u.IDLE) {
752
752
  if (this.updateIfCurrent(u.IDLE, u.POUR_STARTING), !e)
753
753
  throw new Error("No tracker provided");
754
- const t = await xt(this.path, e);
754
+ const t = await jt(this.path, e);
755
755
  return this.updateIfCurrent(u.POUR_STARTING, u.POURING), t != null && t.endState && this.updateIfCurrent(u.POURING, u.IDLE), t;
756
756
  } else
757
757
  throw new Error(`Cannot pour in state ${this.currentState}`);
@@ -773,12 +773,12 @@ let d = class {
773
773
  async testAgitate(e) {
774
774
  if (!e)
775
775
  throw new Error("No tracker provided");
776
- return this.logger.info(`agitating ice-agitator ${this.id}`), Kt(this.path, e);
776
+ return this.logger.info(`agitating ice-agitator ${this.id}`), Ut(this.path, e);
777
777
  }
778
778
  async testGate(e) {
779
779
  if (!e)
780
780
  throw new Error("No tracker provided");
781
- return this.logger.info(`testing ice gate: ${this.id}`), Yt(this.path, e);
781
+ return this.logger.info(`testing ice gate: ${this.id}`), Bt(this.path, e);
782
782
  }
783
783
  handleAgitationChange() {
784
784
  var e;
@@ -790,14 +790,14 @@ let d = class {
790
790
  });
791
791
  }
792
792
  async updateIceType(e) {
793
- await Bt(this.path, e);
793
+ await Lt(this.path, e);
794
794
  }
795
795
  async init() {
796
796
  this.logger.debug(`initializing ice-agitator ${this.id}`);
797
797
  }
798
798
  async load() {
799
799
  this.logger.debug(`loading ice-agitator ${this.id}`);
800
- const e = await Ut(this.path);
800
+ const e = await Ft(this.path);
801
801
  (e == null ? void 0 : e.status) === 200 && M(() => {
802
802
  this._allIceTypes = e.data || [];
803
803
  });
@@ -894,20 +894,20 @@ g([
894
894
  d = g([
895
895
  f(Se)
896
896
  ], d);
897
- const De = new P({
897
+ const De = new b({
898
898
  class: d,
899
899
  type: Se
900
900
  });
901
- var Wt = Object.defineProperty, Zt = Object.getOwnPropertyDescriptor, ae = (e, t, r, s) => {
902
- for (var a = s > 1 ? void 0 : s ? Zt(t, r) : t, i = e.length - 1, n; i >= 0; i--)
901
+ var Kt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, ae = (e, t, r, s) => {
902
+ for (var a = s > 1 ? void 0 : s ? Yt(t, r) : t, i = e.length - 1, n; i >= 0; i--)
903
903
  (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
904
- return s && a && Wt(t, r, a), a;
904
+ return s && a && Kt(t, r, a), a;
905
905
  };
906
- const oe = "agitation-required-trouble-model", Qt = (e) => {
906
+ const oe = "agitation-required-trouble-model", qt = (e) => {
907
907
  if (e.data.agitationRequired)
908
908
  return oe;
909
- }, Xt = "InsufficientAgitationTrouble";
910
- let $ = class {
909
+ }, Vt = "InsufficientAgitationTrouble";
910
+ let A = class {
911
911
  constructor(e, t, r) {
912
912
  o(this, "id");
913
913
  o(this, "logger");
@@ -935,7 +935,7 @@ let $ = class {
935
935
  var s, a;
936
936
  if (!this.holder)
937
937
  return !0;
938
- const t = (((s = this.holder) == null ? void 0 : s.troublesByType[Xt]) || []).length > 0;
938
+ const t = (((s = this.holder) == null ? void 0 : s.troublesByType[Vt]) || []).length > 0;
939
939
  return !!((a = this.agitateBeforePour) != null && a.value) && t;
940
940
  }
941
941
  get deferred() {
@@ -953,54 +953,54 @@ ae([
953
953
  path: "app:kosdev.ddk:app",
954
954
  attribute: "ncui.agitateBeforePour"
955
955
  })
956
- ], $.prototype, "agitateBeforePour", 2);
956
+ ], A.prototype, "agitateBeforePour", 2);
957
957
  ae([
958
958
  Ye({
959
- topic: qe(ge.type),
960
- lifecycle: Ve.INIT
959
+ topic: Ve(ge.type),
960
+ lifecycle: qe.INIT
961
961
  })
962
- ], $.prototype, "updateHolder", 1);
963
- $ = ae([
962
+ ], A.prototype, "updateHolder", 1);
963
+ A = ae([
964
964
  f(oe)
965
- ], $);
966
- const Jt = new P({
967
- class: $,
965
+ ], A);
966
+ const Wt = new b({
967
+ class: A,
968
968
  type: oe
969
- }), kt = ["iceAgitator", "carbAgitator"], er = {
969
+ }), Zt = ["iceAgitator", "carbAgitator"], Qt = {
970
970
  iceAgitator: De.factory,
971
971
  carbAgitator: he.factory
972
- }, tr = A.createLogger({ name: "freestyle-assembly-data-mapper" }), ir = async (e) => {
972
+ }, Xt = $.createLogger({ name: "freestyle-assembly-data-mapper" }), rr = async (e) => {
973
973
  const t = te.instance().options({}).build(), r = re.instance().options({}).build(), s = e.assemblies.reduce((n, l) => {
974
974
  var T;
975
- return kt.forEach((c) => {
976
- var b;
975
+ return Zt.forEach((c) => {
976
+ var P;
977
977
  const _ = l[c];
978
978
  if (_) {
979
- const ze = er[c](_.path);
979
+ const ze = Qt[c](_.path);
980
980
  n[c] = ze({
981
981
  name: _.name,
982
982
  path: _.path,
983
- statePath: ((b = _.state) == null ? void 0 : b.path) || ""
983
+ statePath: ((P = _.state) == null ? void 0 : P.path) || ""
984
984
  });
985
985
  }
986
986
  }), (T = l.cartridgeAgitators) == null || T.forEach((c) => {
987
- var b;
987
+ var P;
988
988
  const _ = _e.instance(
989
989
  c.path
990
990
  ).options({
991
991
  name: c.name,
992
992
  path: c.path,
993
- statePath: ((b = c.state) == null ? void 0 : b.path) || ""
993
+ statePath: ((P = c.state) == null ? void 0 : P.path) || ""
994
994
  }).build();
995
995
  t.addModel(_);
996
996
  }), l.remoteTrays && l.remoteTrays.forEach((c) => {
997
- tr.info(`Found remote tray ${c.name} with path ${c.path}`);
998
- const _ = `${E.type}-${c.holderPath}`, b = E.instance(_).options({
997
+ Xt.info(`Found remote tray ${c.name} with path ${c.path}`);
998
+ const _ = `${E.type}-${c.holderPath}`, P = E.instance(_).options({
999
999
  holderPath: c.holderPath,
1000
1000
  configPath: c.path,
1001
1001
  name: c.name
1002
1002
  }).build();
1003
- r.addModel(b);
1003
+ r.addModel(P);
1004
1004
  }), n;
1005
1005
  }, {}), a = !!s.iceAgitator, i = !!s.carbAgitator;
1006
1006
  return {
@@ -1010,15 +1010,15 @@ const Jt = new P({
1010
1010
  supportsCarb: i,
1011
1011
  supportsIce: a
1012
1012
  };
1013
- }, rr = (e) => () => (We(e)(), Xe(e)(), ne.register(), V.register(), De.register(), he.register(), te.register(), le.register(), se.register(), E.register(), re.register(), h.companion.register(e)(
1013
+ }, Jt = (e) => () => (We(e)(), Xe(e)(), ne.register(), V.register(), De.register(), he.register(), te.register(), le.register(), se.register(), E.register(), re.register(), h.companion.register(e)(
1014
1014
  Je.type,
1015
1015
  ne.type
1016
1016
  ), h.companion.register(e)(
1017
1017
  ge.type,
1018
1018
  V.type
1019
- ), Jt.register(), h.companion.register(e)(
1019
+ ), Wt.register(), h.companion.register(e)(
1020
1020
  Ze.type,
1021
- Qt
1021
+ qt
1022
1022
  ), h.companion.register(e)(ke.type, le.type), h.companion.register(e)(
1023
1023
  et.type,
1024
1024
  se.type
@@ -1077,20 +1077,20 @@ const Jt = new P({
1077
1077
  ...Qe
1078
1078
  };
1079
1079
  y.freestyle = {
1080
- models: rr(y)
1080
+ models: Jt(y)
1081
1081
  };
1082
1082
  y.preload = h.model.preloadModel(y);
1083
1083
  y.model = h.model.register(y);
1084
1084
  y.companion = h.companion.register(y);
1085
1085
  y.legacy = h.model.registerLegacyModel(y);
1086
- const nr = y;
1086
+ const ar = y;
1087
1087
  export {
1088
- Xt as A,
1088
+ Vt as A,
1089
1089
  he as C,
1090
1090
  V as F,
1091
1091
  F as I,
1092
- nr as K,
1093
- wt as N,
1092
+ ar as K,
1093
+ Ct as N,
1094
1094
  re as R,
1095
1095
  te as a,
1096
1096
  R as b,
@@ -1099,13 +1099,13 @@ export {
1099
1099
  ne as e,
1100
1100
  le as f,
1101
1101
  De as g,
1102
- Jt as h,
1102
+ Wt as h,
1103
1103
  E as i,
1104
1104
  ie as j,
1105
- St as k,
1106
- Ft as l,
1107
- ir as m,
1108
- yt as n,
1109
- rr as r
1105
+ Mt as k,
1106
+ Dt as l,
1107
+ rr as m,
1108
+ pt as n,
1109
+ Jt as r
1110
1110
  };
1111
- //# sourceMappingURL=freestyle-registration-manager-CI8el36E.js.map
1111
+ //# sourceMappingURL=freestyle-registration-manager-D57Lznu_.js.map