@kosdev-code/kos-freestyle-sdk 2.0.40 → 2.1.0

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.
Files changed (29) hide show
  1. package/{extension-utils-BY9yhVLb.cjs → extension-utils-BkIqcOpm.cjs} +2 -2
  2. package/{extension-utils-BY9yhVLb.cjs.map → extension-utils-BkIqcOpm.cjs.map} +1 -1
  3. package/{extension-utils-B4aRuLqC.js → extension-utils-DVFjFeTF.js} +2 -2
  4. package/{extension-utils-B4aRuLqC.js.map → extension-utils-DVFjFeTF.js.map} +1 -1
  5. package/freestyle-registration-manager-B1nEQ5f5.cjs +2 -0
  6. package/freestyle-registration-manager-B1nEQ5f5.cjs.map +1 -0
  7. package/{freestyle-registration-manager-CI8el36E.js → freestyle-registration-manager-CClN6mVr.js} +319 -350
  8. package/freestyle-registration-manager-CClN6mVr.js.map +1 -0
  9. package/index.cjs +1 -1
  10. package/index.js +3 -3
  11. package/models/models/cartridge-agitator/cartridge-agitator-model.d.ts +5 -8
  12. package/models/models/cartridge-agitator/cartridge-agitator-model.d.ts.map +1 -1
  13. package/models/models/freestyle-nozzle/freestyle-nozzle-model.d.ts +5 -1
  14. package/models/models/freestyle-nozzle/freestyle-nozzle-model.d.ts.map +1 -1
  15. package/models/models/remote-tray/remote-tray-container-model.d.ts +5 -14
  16. package/models/models/remote-tray/remote-tray-container-model.d.ts.map +1 -1
  17. package/models/utils/freestyle-registration-manager.d.ts +3 -3
  18. package/models.cjs +1 -1
  19. package/models.js +2 -2
  20. package/package.json +4 -4
  21. package/ui.cjs +1 -1
  22. package/ui.js +2 -2
  23. package/{use-nutrition-info-BqyF2EOl.cjs → use-nutrition-info-CMWSDZ59.cjs} +2 -2
  24. package/{use-nutrition-info-BqyF2EOl.cjs.map → use-nutrition-info-CMWSDZ59.cjs.map} +1 -1
  25. package/{use-nutrition-info-uacoD9lS.js → use-nutrition-info-DTdUdYAE.js} +2 -2
  26. package/{use-nutrition-info-uacoD9lS.js.map → use-nutrition-info-DTdUdYAE.js.map} +1 -1
  27. package/freestyle-registration-manager-CI8el36E.js.map +0 -1
  28. package/freestyle-registration-manager-Dbdeo0JU.cjs +0 -2
  29. package/freestyle-registration-manager-Dbdeo0JU.cjs.map +0 -1
@@ -1,15 +1,15 @@
1
- var Ne = Object.defineProperty;
2
- var Fe = (e, t, r) => t in e ? Ne(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
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";
1
+ var Fe = Object.defineProperty;
2
+ var Le = (e, t, r) => t in e ? Fe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var o = (e, t, r) => (Le(e, typeof t != "symbol" ? t + "" : t, r), r);
4
+ import { kosModel as f, KosModelRegistrationFactory as b, KosModelContainer as Ge, kosChild as de, resolveServiceUrl as L, ServiceFactory as G, createPropKey as j, kosStateProp as J, kosFuture as U, kosModelEffect as k, kosFutureAware as je, kosLoggerAware as ue, EventBus as M, SingletonKosModelRegistrationFactory as ee, kosParentAware as ce, KosFeatureFlags as x, kosConfigProperty as p, getKosModelSync as v, kosContainerAware as Ue, KosContextManager as Be, KosLog as $, FutureManager as He, kosAction as w, FetchError as xe, KOS_MODEL_ID as m, MultipleFutureHandler as Ke, kosTopicHandler as Ye, DependencyLifecycle as qe, modelTypeEventTopicFactory as Ve, RegistrationManager as h, registerCoreModels as We, Trouble as Ze, ExtensionManager as K, EXTENSION_TROUBLE_DATA_MAPPER as Y } 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
- const ce = "carb-agitator-model";
12
- let q = class {
11
+ const he = "carb-agitator-model";
12
+ let V = class {
13
13
  constructor(e, t, r) {
14
14
  o(this, "id");
15
15
  o(this, "name");
@@ -25,25 +25,25 @@ let q = class {
25
25
  this.logger.debug(`loading carb-agitator ${this.id}`);
26
26
  }
27
27
  };
28
- q = st([
29
- f(ce)
30
- ], q);
31
- const he = new P({
32
- class: q,
33
- type: ce
28
+ V = ot([
29
+ f(he)
30
+ ], V);
31
+ const pe = new b({
32
+ class: V,
33
+ type: he
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, ye = (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
- const ye = "cartridge-agitator-container-model";
40
+ const fe = "cartridge-agitator-container-model";
41
41
  let S = class {
42
42
  constructor(e, t, r) {
43
43
  o(this, "id");
44
44
  o(this, "logger");
45
45
  o(this, "_models");
46
- this.id = e, this.logger = r.logger, this._models = new de({
46
+ this.id = e, this.logger = r.logger, this._models = new Ge({
47
47
  parentId: e
48
48
  });
49
49
  }
@@ -74,45 +74,42 @@ let S = class {
74
74
  );
75
75
  }
76
76
  };
77
- pe([
78
- X
77
+ ye([
78
+ de
79
79
  ], S.prototype, "_models", 2);
80
- S = pe([
81
- f(ye)
80
+ S = ye([
81
+ f(fe)
82
82
  ], S);
83
- const { URL: fe } = L("CARTRIDGE_AGITATOR_SERVICE"), { postModel: lt } = G.build({
84
- basePath: `${fe}/api/ext/freestyle/freestyle/ice`
85
- }), dt = async (e, t) => {
86
- const r = await lt({
83
+ const { URL: me } = L("CARTRIDGE_AGITATOR_SERVICE"), { postModel: nt } = G.build({
84
+ basePath: `${me}/api/ext/freestyle/freestyle/ice`
85
+ }), lt = async (e, t) => {
86
+ const r = await nt({
87
87
  model: {},
88
88
  tracker: t,
89
- urlOverride: `${fe}/api/handle/${e}/test`
89
+ urlOverride: `${me}/api/handle/${e}/test`
90
90
  });
91
91
  if (!(r != null && r.data))
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, B = (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
- const me = "cartridge-agitator-model";
100
+ const Pe = "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
104
  const ct = j("statePath");
105
- let O = class {
106
- constructor(e, t, r) {
105
+ let T = class {
106
+ constructor(e, t) {
107
107
  o(this, "id");
108
- o(this, "futureHandler");
109
- o(this, "logger");
110
- o(this, "disposer");
111
108
  o(this, "agitating");
112
109
  o(this, "path");
113
110
  o(this, "statePath");
114
111
  o(this, "name");
115
- this.id = e, this.logger = r.logger, this.path = t.path, this.name = t.name, this.statePath = t.statePath, Le(this);
112
+ this.id = e, this.path = t.path, this.name = t.name, this.statePath = t.statePath;
116
113
  }
117
114
  get isAgitating() {
118
115
  return !!this.agitating.value;
@@ -120,55 +117,48 @@ let O = class {
120
117
  async testAgitate(e) {
121
118
  if (!e)
122
119
  throw new Error("No tracker provided");
123
- return this.logger.info(`agitating cartridge-agitator ${this.id}`), dt(this.path, e);
124
- }
125
- // -------------------LIFECYCLE----------------------------
126
- async init() {
127
- this.logger.debug(`initializing cartridge-agitator ${this.id}`);
120
+ return this.logger.info(`agitating cartridge-agitator ${this.id}`), lt(this.path, e);
128
121
  }
129
- unload() {
122
+ handleAgitation() {
130
123
  var e;
131
- (e = this.disposer) == null || e.call(this);
132
- }
133
- async load() {
134
- this.logger.debug(`loading cartridge-agitator ${this.id}`), this.disposer = Ge(
135
- () => this.isAgitating,
136
- () => {
137
- var e;
138
- this.isAgitating ? (this.logger.info(`agitating cartridge-agitator ${this.id}`), w.publish(R.TOPIC_AGITATION_STARTED, {
139
- path: this.path,
140
- futureId: (e = this.futureHandler.future) == null ? void 0 : e.futureId
141
- })) : w.publish(R.TOPIC_AGITATION_ENDED, {
142
- path: this.path
143
- });
144
- },
145
- {}
146
- );
124
+ this.isAgitating ? (this.logger.info(`agitating cartridge-agitator ${this.id}`), M.publish(R.TOPIC_AGITATION_STARTED, {
125
+ path: this.path,
126
+ futureId: (e = this.future) == null ? void 0 : e.futureId
127
+ })) : M.publish(R.TOPIC_AGITATION_ENDED, {
128
+ path: this.path
129
+ });
147
130
  }
148
131
  };
149
- ee([
132
+ B([
150
133
  J({ path: ct, attribute: "agitating" })
151
- ], O.prototype, "agitating", 2);
152
- ee([
134
+ ], T.prototype, "agitating", 2);
135
+ B([
153
136
  U()
154
- ], O.prototype, "testAgitate", 1);
155
- O = ee([
156
- f(me)
157
- ], O);
158
- const _e = new P({
159
- class: O,
160
- type: me
161
- }), te = new k({
137
+ ], T.prototype, "testAgitate", 1);
138
+ B([
139
+ k({
140
+ dependencies: (e) => [e.isAgitating]
141
+ })
142
+ ], T.prototype, "handleAgitation", 1);
143
+ T = B([
144
+ f(Pe),
145
+ je(),
146
+ ue()
147
+ ], T);
148
+ const be = new b({
149
+ class: T,
150
+ type: Pe
151
+ }), te = new ee({
162
152
  class: S,
163
- type: ye
153
+ type: fe
164
154
  });
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--)
155
+ te.addRelatedModel(be);
156
+ var gt = Object.defineProperty, ht = Object.getOwnPropertyDescriptor, _e = (e, t, r, s) => {
157
+ for (var a = s > 1 ? void 0 : s ? ht(t, r) : t, i = e.length - 1, n; i >= 0; i--)
168
158
  (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
169
- return s && a && ht(t, r, a), a;
159
+ return s && a && gt(t, r, a), a;
170
160
  };
171
- const be = "freestyle-assembly-model", yt = "iceAgitator", ft = "carbAgitator", mt = "remoteTrays";
161
+ const ve = "freestyle-assembly-model", pt = "iceAgitator", yt = "carbAgitator", ft = "remoteTrays";
172
162
  let D = class {
173
163
  constructor(e, t, r) {
174
164
  o(this, "id");
@@ -230,35 +220,35 @@ let D = class {
230
220
  }
231
221
  // -------------------LIFECYCLE----------------------------
232
222
  get supportsRemoteTrays() {
233
- return H.isFeatureEnabled(mt);
223
+ return x.isFeatureEnabled(ft);
234
224
  }
235
225
  get supportsIce() {
236
- return H.isFeatureEnabled(yt);
226
+ return x.isFeatureEnabled(pt);
237
227
  }
238
228
  get supportsCarb() {
239
- return H.isFeatureEnabled(ft);
229
+ return x.isFeatureEnabled(yt);
240
230
  }
241
231
  async init() {
242
232
  this.logger.debug(`initializing freestyle-assembly ${this.id}`);
243
233
  }
244
234
  };
245
- Pe([
246
- X
235
+ _e([
236
+ de
247
237
  ], D.prototype, "_remoteTrays", 2);
248
- D = Pe([
249
- ue(),
250
- f(be)
238
+ D = _e([
239
+ ce(),
240
+ f(ve)
251
241
  ], D);
252
- const V = new k({
242
+ const W = new ee({
253
243
  class: D,
254
- type: be
244
+ type: ve
255
245
  });
256
- var _t = Object.defineProperty, Pt = Object.getOwnPropertyDescriptor, ve = (e, t, r, s) => {
246
+ var mt = Object.defineProperty, Pt = Object.getOwnPropertyDescriptor, Ie = (e, t, r, s) => {
257
247
  for (var a = s > 1 ? void 0 : s ? Pt(t, r) : t, i = e.length - 1, n; i >= 0; i--)
258
248
  (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
259
- return s && a && _t(t, r, a), a;
249
+ return s && a && mt(t, r, a), a;
260
250
  };
261
- const Ie = "remote-tray-model";
251
+ const Te = "remote-tray-model";
262
252
  j("holderPath");
263
253
  const bt = j("configPath");
264
254
  let z = class {
@@ -278,7 +268,7 @@ let z = class {
278
268
  /**
279
269
  * Gets the troubles from the associated holder model.
280
270
  * Propagates trouble states from the holder to this remote tray.
281
- *
271
+ *
282
272
  * @returns Array of trouble models from the holder, or empty array if no holder
283
273
  */
284
274
  get troubles() {
@@ -288,7 +278,7 @@ let z = class {
288
278
  /**
289
279
  * Gets the highest priority trouble status.
290
280
  * Currently returns empty string as troubles are managed by the holder.
291
- *
281
+ *
292
282
  * @returns Empty string (trouble status handled by holder)
293
283
  */
294
284
  get troubleStatus() {
@@ -296,7 +286,7 @@ let z = class {
296
286
  }
297
287
  /**
298
288
  * Gets troubles grouped by type from the associated holder.
299
- *
289
+ *
300
290
  * @returns Record of troubles grouped by type from the holder, or empty object if no holder
301
291
  */
302
292
  get troublesByType() {
@@ -306,7 +296,7 @@ let z = class {
306
296
  /**
307
297
  * Updates the model with new configuration options.
308
298
  * Can be used to modify the holder path, config path, or name after initialization.
309
- *
299
+ *
310
300
  * @param _options - New configuration options for the remote tray
311
301
  */
312
302
  updateModel(e) {
@@ -314,7 +304,7 @@ let z = class {
314
304
  /**
315
305
  * Gets the associated holder model for this remote tray.
316
306
  * Uses synchronous model lookup to retrieve the holder by path.
317
- *
307
+ *
318
308
  * @returns The HolderModel instance referenced by holderPath, or undefined if not found
319
309
  */
320
310
  get holder() {
@@ -323,7 +313,7 @@ let z = class {
323
313
  /**
324
314
  * Determines if the remote tray is currently active.
325
315
  * Active state is based on the remoteTrayEnabled configuration property.
326
- *
316
+ *
327
317
  * @returns true if the tray is enabled, false otherwise
328
318
  */
329
319
  get active() {
@@ -334,7 +324,7 @@ let z = class {
334
324
  * Initializes the remote tray model.
335
325
  * Called during the model lifecycle initialization phase.
336
326
  * Sets up initial state and prepares the model for use.
337
- *
327
+ *
338
328
  * @returns Promise that resolves when initialization is complete
339
329
  */
340
330
  async init() {
@@ -344,91 +334,60 @@ let z = class {
344
334
  * Loads the remote tray configuration and associated data.
345
335
  * Called during the model lifecycle load phase.
346
336
  * Typically loads configuration settings and establishes holder references.
347
- *
337
+ *
348
338
  * @returns Promise that resolves when loading is complete
349
339
  */
350
340
  async load() {
351
341
  this.logger.debug(`loading remote-tray ${this.id}`);
352
342
  }
353
343
  };
354
- ve([
344
+ Ie([
355
345
  p({
356
346
  path: bt,
357
347
  attribute: "enabled"
358
348
  })
359
349
  ], z.prototype, "remoteTrayEnabled", 2);
360
- z = ve([
361
- f(Ie)
350
+ z = Ie([
351
+ f(Te)
362
352
  ], z);
363
- const E = new P({
353
+ const A = new b({
364
354
  class: z,
365
- type: Ie
355
+ type: Te
366
356
  });
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--)
369
- (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
370
- return s && a && vt(t, r, a), a;
357
+ var _t = Object.getOwnPropertyDescriptor, vt = (e, t, r, s) => {
358
+ for (var a = s > 1 ? void 0 : s ? _t(t, r) : t, i = e.length - 1, n; i >= 0; i--)
359
+ (n = e[i]) && (a = n(a) || a);
360
+ return a;
371
361
  };
372
362
  const Oe = "remote-tray-container-model";
373
- let N = class {
374
- constructor(e, t, r) {
363
+ let Z = class {
364
+ constructor(e) {
375
365
  o(this, "id");
376
- o(this, "logger");
377
- o(this, "_models");
378
- this.id = e, this.logger = r.logger, this._models = new de({
379
- parentId: e
380
- });
381
- }
382
- getModel(e) {
383
- return this._models.getModel(e);
384
- }
385
- get models() {
386
- return this._models;
387
- }
388
- get data() {
389
- return this._models.data;
390
- }
391
- updateModel(e) {
392
- }
393
- addModel(e) {
394
- this._models.addModel(e);
395
- }
396
- removeModel(e) {
397
- this._models.removeModel(e);
398
- }
399
- // -------------------LIFECYCLE----------------------------
400
- async init() {
401
- this.logger.debug(
402
- `initializing remote-tray-container container ${this.id}`
403
- );
404
- }
405
- async load() {
406
- this.logger.debug(`loading remote-tray-container container ${this.id}`);
366
+ this.id = e;
407
367
  }
408
368
  };
409
- Te([
410
- X
411
- ], N.prototype, "_models", 2);
412
- N = Te([
413
- f(Oe)
414
- ], N);
415
- const re = new k({
416
- class: N,
369
+ Z = vt([
370
+ f(Oe),
371
+ ue(),
372
+ Ue()
373
+ ], Z);
374
+ const re = new ee({
375
+ class: Z,
417
376
  type: Oe
418
377
  });
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;
378
+ re.addRelatedModel(A);
379
+ var It = Object.getOwnPropertyDescriptor, Tt = (e, t, r, s) => {
380
+ for (var a = s > 1 ? void 0 : s ? It(t, r) : t, i = e.length - 1, n; i >= 0; i--)
381
+ (n = e[i]) && (a = n(a) || a);
382
+ return a;
424
383
  };
425
- const Ee = "freestyle-holder-model";
426
- function $t(e) {
427
- const t = je.getContext(e), r = t == null ? void 0 : t.get(
428
- V.type
384
+ const Ae = "freestyle-holder-model";
385
+ function Ot(e) {
386
+ const t = Be.getContext(e), r = t == null ? void 0 : t.get(
387
+ W.type
429
388
  );
430
389
  if (!r) {
431
- A.error("Freestyle assembly not found");
390
+ $.error("Freestyle assembly not found");
432
391
  return;
433
392
  }
434
393
  return r;
@@ -438,9 +397,9 @@ async function At(e, t) {
438
397
  return;
439
398
  const r = await e[t]();
440
399
  if (r != null && r.tracker)
441
- return Ue.getFuture(r.tracker);
400
+ return He.getFuture(r.tracker);
442
401
  }
443
- let W = class {
402
+ let Q = class {
444
403
  constructor(e, t, r) {
445
404
  o(this, "id");
446
405
  o(this, "logger");
@@ -456,7 +415,7 @@ let W = class {
456
415
  if (!this.holder.data.agitated)
457
416
  return;
458
417
  this.future = void 0;
459
- const e = $t(this.id);
418
+ const e = Ot(this.id);
460
419
  if (!e)
461
420
  return;
462
421
  if (!e.defaultCartridgeAgitator) {
@@ -469,7 +428,7 @@ let W = class {
469
428
  ), this.future;
470
429
  }
471
430
  get isRemote() {
472
- const e = `${E.type}-${this.holder.path}`, t = v(e);
431
+ const e = `${A.type}-${this.holder.path}`, t = v(e);
473
432
  return t != null && t.model ? !!t.model.remoteTrayEnabled.value : !1;
474
433
  }
475
434
  // -------------------LIFECYCLE----------------------------
@@ -480,19 +439,19 @@ let W = class {
480
439
  this.logger.debug(`loading freestyle-holder ${this.id}`);
481
440
  }
482
441
  };
483
- W = Et([
484
- f(Ee)
485
- ], W);
486
- const se = new P({
487
- class: W,
488
- type: Ee
489
- }), { URL: Ct } = L("FREESTYLE-NOZZLE_SERVICE"), { getOne: Mt } = G.build({
490
- basePath: `${Ct}/api/freestyle-nozzle`
491
- }), C = A.createLogger({
442
+ Q = Tt([
443
+ f(Ae)
444
+ ], Q);
445
+ const se = new b({
446
+ class: Q,
447
+ type: Ae
448
+ }), { URL: Et } = L("FREESTYLE-NOZZLE_SERVICE"), { getOne: $t } = G.build({
449
+ basePath: `${Et}/api/freestyle-nozzle`
450
+ }), C = $.createLogger({
492
451
  name: "freestyle-nozzle-service",
493
452
  group: "Services"
494
453
  });
495
- class wt extends Error {
454
+ class Ct extends Error {
496
455
  constructor(t) {
497
456
  super(t), this.name = "NutritionInfoError";
498
457
  }
@@ -502,12 +461,12 @@ class ie extends Error {
502
461
  super(t), this.name = "InvalidRequestError";
503
462
  }
504
463
  }
505
- const St = async (e, t, r, s = "http://localhost:8081") => {
464
+ const wt = async (e, t, r, s = "http://localhost:8081") => {
506
465
  if (C.debug("sending GET for freestyle-nozzle"), !t)
507
466
  throw C.error("Invalid freestyle-nozzle request: beverageId is required"), new ie("No beverageId provided");
508
467
  if (!r || r.length === 0)
509
468
  throw C.error("Invalid freestyle-nozzle request: volumes are required"), new ie("No volumes provided");
510
- const a = await Mt({
469
+ const a = await $t({
511
470
  urlOverride: `${s}${e}/pipeline/beverage/engine/nutrition/${t}?volumes=${r.join(
512
471
  ","
513
472
  )}`
@@ -515,23 +474,22 @@ const St = async (e, t, r, s = "http://localhost:8081") => {
515
474
  if (!(a != null && a.data))
516
475
  throw C.error("Failed to retrieve freestyle-nozzle data"), new Error("Failed to retrieve freestyle-nozzle data");
517
476
  if (a.data.error)
518
- throw new wt(a.data.error);
477
+ throw new Ct(a.data.error);
519
478
  return a.data;
520
479
  };
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--)
480
+ var Mt = Object.defineProperty, St = Object.getOwnPropertyDescriptor, Ee = (e, t, r, s) => {
481
+ for (var a = s > 1 ? void 0 : s ? St(t, r) : t, i = e.length - 1, n; i >= 0; i--)
523
482
  (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
524
- return s && a && Rt(t, r, a), a;
483
+ return s && a && Mt(t, r, a), a;
525
484
  };
526
485
  const $e = "freestyle-nozzle-model";
527
- let Z = class {
486
+ let N = class {
528
487
  constructor(e, t, r) {
529
488
  o(this, "id");
530
489
  o(this, "logger");
531
490
  o(this, "nozzleModel");
532
491
  o(this, "_cupSizes");
533
492
  o(this, "_nutritionInfo");
534
- o(this, "_disposer", null);
535
493
  this.id = e, this.logger = r.logger, this.nozzleModel = t.companionParent, this._cupSizes = [100];
536
494
  }
537
495
  set cupSizes(e) {
@@ -540,77 +498,88 @@ let Z = class {
540
498
  get nutritionInfo() {
541
499
  return this._nutritionInfo;
542
500
  }
543
- // -------------------LIFECYCLE----------------------------
544
- async init() {
545
- this.logger.debug(`initializing freestyle-nozzle ${this.id}`), this._disposer = Be(async () => {
546
- if (this.nozzleModel.selectedPourable.beverage && this._cupSizes.length) {
547
- this.logger.debug(
548
- `selected beverage: ${this.nozzleModel.selectedPourable.beverage.rawId}. Volume: ${this._cupSizes.join(", ")}`
501
+ get selectedPourable() {
502
+ return this.nozzleModel.selectedPourable;
503
+ }
504
+ async handleBeverageSelection() {
505
+ if (this.nozzleModel.selectedPourable.beverage && this._cupSizes.length) {
506
+ this.logger.debug(
507
+ `selected beverage: ${this.nozzleModel.selectedPourable.beverage.rawId}. Volume: ${this._cupSizes.join(", ")}`
508
+ );
509
+ const e = this.nozzleModel.selectedPourable.beverage.rawId, t = this.nozzleModel.urlPrefix;
510
+ try {
511
+ const r = await wt(
512
+ t,
513
+ e,
514
+ this._cupSizes
549
515
  );
550
- const e = this.nozzleModel.selectedPourable.beverage.rawId, t = this.nozzleModel.urlPrefix;
551
- try {
552
- const r = await St(
553
- t,
554
- e,
555
- this._cupSizes
556
- );
557
- M(() => {
558
- this._nutritionInfo = r;
559
- });
560
- } catch (r) {
561
- this.logger.error(`Error fetching nutrition info: ${r}`);
562
- }
516
+ w(() => {
517
+ this._nutritionInfo = r;
518
+ });
519
+ } catch (r) {
520
+ this.logger.error(`Error fetching nutrition info: ${r}`);
563
521
  }
564
- });
522
+ }
523
+ }
524
+ // -------------------LIFECYCLE----------------------------
525
+ async init() {
526
+ this.logger.debug(`initializing freestyle-nozzle ${this.id}`);
565
527
  }
566
528
  unload() {
567
- this.logger.debug(`unloading freestyle-nozzle ${this.id}`), this._disposer && this._disposer();
529
+ this.logger.debug(`unloading freestyle-nozzle ${this.id}`);
568
530
  }
569
531
  async load() {
570
532
  this.logger.debug(`loading freestyle-nozzle ${this.id}`);
571
533
  }
572
534
  };
573
- Z = zt([
574
- ue(),
535
+ Ee([
536
+ k({
537
+ dependencies: (e) => [
538
+ e.selectedPourable.beverage
539
+ ]
540
+ })
541
+ ], N.prototype, "handleBeverageSelection", 1);
542
+ N = Ee([
543
+ ce(),
575
544
  f($e)
576
- ], Z);
577
- const ne = new P({
578
- class: Z,
545
+ ], N);
546
+ const ne = new b({
547
+ class: N,
579
548
  type: $e
580
- }), { URL: Ae } = L("PUMP_SERVICE"), { postModel: Nt } = G.build({
581
- basePath: `${Ae}/api/ext/freestyle/microCalibration`
582
- }), Y = A.createLogger({
549
+ }), { URL: Ce } = L("PUMP_SERVICE"), { postModel: Rt } = G.build({
550
+ basePath: `${Ce}/api/ext/freestyle/microCalibration`
551
+ }), q = $.createLogger({
583
552
  name: "freestyle-pump-service",
584
553
  group: "Services"
585
- }), Ft = async (e, t) => {
554
+ }), Dt = async (e, t) => {
586
555
  var r, s, a, i, n;
587
- Y.debug(
556
+ q.debug(
588
557
  `replacePump - sending POST request to /api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
589
558
  );
590
559
  try {
591
- const l = await Nt({
560
+ const l = await Rt({
592
561
  model: {},
593
- urlOverride: `${Ae}/api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
562
+ urlOverride: `${Ce}/api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
594
563
  });
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];
564
+ return q.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
565
  } catch (l) {
597
- if (Y.error(
566
+ if (q.error(
598
567
  `replacePump - sending POST request to /api/cal/${e}/code/${t}`,
599
568
  l
600
- ), l instanceof He) {
601
- const T = ((a = (s = l.payload) == null ? void 0 : s.data) == null ? void 0 : a.error) || ((i = l.payload) == null ? void 0 : i.error) || "unknownError";
602
- return [T, ((n = l.payload) == null ? void 0 : n.data) || { error: T }];
569
+ ), l instanceof xe) {
570
+ const O = ((a = (s = l.payload) == null ? void 0 : s.data) == null ? void 0 : a.error) || ((i = l.payload) == null ? void 0 : i.error) || "unknownError";
571
+ return [O, ((n = l.payload) == null ? void 0 : n.data) || { error: O }];
603
572
  }
604
573
  }
605
574
  return ["unknownError", { error: "unknownError" }];
606
575
  };
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;
576
+ var zt = Object.getOwnPropertyDescriptor, Nt = (e, t, r, s) => {
577
+ for (var a = s > 1 ? void 0 : s ? zt(t, r) : t, i = e.length - 1, n; i >= 0; i--)
578
+ (n = e[i]) && (a = n(a) || a);
579
+ return a;
611
580
  };
612
- const Ce = "freestyle-pump-model";
613
- let Q = class {
581
+ const we = "freestyle-pump-model";
582
+ let X = class {
614
583
  constructor(e, t, r) {
615
584
  o(this, "id");
616
585
  o(this, "logger");
@@ -619,30 +588,30 @@ let Q = class {
619
588
  }
620
589
  // -------------------LIFECYCLE----------------------------
621
590
  async replacePump(e) {
622
- const [t, r] = await Ft(this.pump.path, e);
591
+ const [t, r] = await Dt(this.pump.path, e);
623
592
  return t && this.logger.error(`Failed to replace the pump, ${this.pump.id}`, t), [t, r];
624
593
  }
625
594
  };
626
- Q = jt([
627
- f(Ce)
628
- ], Q);
629
- const le = new P({
630
- class: Q,
631
- type: Ce
632
- }), { URL: I } = L("ICE_AGITATOR_SERVICE"), { getAll: Me, postModel: B } = G.build({
595
+ X = Nt([
596
+ f(we)
597
+ ], X);
598
+ const le = new b({
599
+ class: X,
600
+ type: we
601
+ }), { URL: I } = L("ICE_AGITATOR_SERVICE"), { getAll: Me, postModel: H } = G.build({
633
602
  basePath: `${I}/api/ext/freestyle/ice`
634
- }), we = A.createLogger({
603
+ }), Se = $.createLogger({
635
604
  name: "ice-agitator-service",
636
605
  group: "Services"
637
- }), Ut = async (e) => (we.debug("sending GET for ice types"), await Me({
606
+ }), Ft = async (e) => (Se.debug("sending GET for ice types"), await Me({
638
607
  urlOverride: `${I}/api/handle/${e}/types`
639
- })), Bt = async (e, t) => (we.debug("sending POST for ice types"), await B({
608
+ })), Lt = async (e, t) => (Se.debug("sending POST for ice types"), await H({
640
609
  urlOverride: `${I}/api/handle/${e}/type/${t}`,
641
610
  model: {}
642
- })), Ht = async (e) => await Me({
611
+ })), Gt = async (e) => await Me({
643
612
  urlOverride: `${I}/api/kos/config/details/${e}/4`
644
- }), xt = async (e, t) => {
645
- const r = await B({
613
+ }), jt = async (e, t) => {
614
+ const r = await H({
646
615
  model: {},
647
616
  tracker: t,
648
617
  urlOverride: `${I}/api/handle/${e}/pour`
@@ -650,8 +619,8 @@ const le = new P({
650
619
  if (!(r != null && r.data))
651
620
  throw new Error("No response from server");
652
621
  return r == null ? void 0 : r.data;
653
- }, Kt = async (e, t) => {
654
- const r = await B({
622
+ }, Ut = async (e, t) => {
623
+ const r = await H({
655
624
  model: {},
656
625
  tracker: t,
657
626
  urlOverride: `${I}/api/handle/${e}/test/agitation`
@@ -659,8 +628,8 @@ const le = new P({
659
628
  if (!(r != null && r.data))
660
629
  throw new Error("No response from server");
661
630
  return r == null ? void 0 : r.data;
662
- }, Yt = async (e, t) => {
663
- const r = await B({
631
+ }, Bt = async (e, t) => {
632
+ const r = await H({
664
633
  model: {},
665
634
  tracker: t,
666
635
  urlOverride: `${I}/api/handle/${e}/test/gate`
@@ -669,15 +638,15 @@ const le = new P({
669
638
  throw new Error("No response from server");
670
639
  return r == null ? void 0 : r.data;
671
640
  };
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--)
641
+ var Ht = Object.defineProperty, xt = Object.getOwnPropertyDescriptor, c = (e, t, r, s) => {
642
+ for (var a = s > 1 ? void 0 : s ? xt(t, r) : t, i = e.length - 1, n; i >= 0; i--)
674
643
  (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
675
- return s && a && qt(t, r, a), a;
644
+ return s && a && Ht(t, r, a), a;
676
645
  };
677
646
  class F {
678
647
  }
679
648
  o(F, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/ice-agitation-started"), o(F, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/ice-agitation-ended");
680
- const Se = "ice-agitator-model", Re = j("statePath");
649
+ const Re = "ice-agitator-model", De = j("statePath");
681
650
  let d = class {
682
651
  constructor(e, t, r) {
683
652
  o(this, "id");
@@ -700,7 +669,7 @@ let d = class {
700
669
  o(this, "_allIceTypes");
701
670
  o(this, "logger");
702
671
  o(this, "currentState", u.IDLE);
703
- o(this, "resetDefaultValues", async () => await Ht(this.path));
672
+ o(this, "resetDefaultValues", async () => await Gt(this.path));
704
673
  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
674
  }
706
675
  get iceTypes() {
@@ -742,7 +711,7 @@ let d = class {
742
711
  return this.currentState === u.IDLE;
743
712
  }
744
713
  updateIfCurrent(e, t) {
745
- this.currentState === e && M(() => {
714
+ this.currentState === e && w(() => {
746
715
  this.currentState = t;
747
716
  });
748
717
  }
@@ -751,7 +720,7 @@ let d = class {
751
720
  if (this.currentState === u.IDLE) {
752
721
  if (this.updateIfCurrent(u.IDLE, u.POUR_STARTING), !e)
753
722
  throw new Error("No tracker provided");
754
- const t = await xt(this.path, e);
723
+ const t = await jt(this.path, e);
755
724
  return this.updateIfCurrent(u.POUR_STARTING, u.POURING), t != null && t.endState && this.updateIfCurrent(u.POURING, u.IDLE), t;
756
725
  } else
757
726
  throw new Error(`Cannot pour in state ${this.currentState}`);
@@ -764,7 +733,7 @@ let d = class {
764
733
  * */
765
734
  async cancelIceDispense() {
766
735
  var e;
767
- this.currentState === u.POURING || this.currentState === u.POUR_STARTING ? (this.currentState = u.POUR_CANCELING, await ((e = this.pourFuture) == null ? void 0 : e.cancelFuture()), M(() => {
736
+ this.currentState === u.POURING || this.currentState === u.POUR_STARTING ? (this.currentState = u.POUR_CANCELING, await ((e = this.pourFuture) == null ? void 0 : e.cancelFuture()), w(() => {
768
737
  this.currentState = u.IDLE;
769
738
  })) : this.logger.warn(
770
739
  `Cannot cancel ice dispense in state ${this.currentState}`
@@ -773,43 +742,43 @@ let d = class {
773
742
  async testAgitate(e) {
774
743
  if (!e)
775
744
  throw new Error("No tracker provided");
776
- return this.logger.info(`agitating ice-agitator ${this.id}`), Kt(this.path, e);
745
+ return this.logger.info(`agitating ice-agitator ${this.id}`), Ut(this.path, e);
777
746
  }
778
747
  async testGate(e) {
779
748
  if (!e)
780
749
  throw new Error("No tracker provided");
781
- return this.logger.info(`testing ice gate: ${this.id}`), Yt(this.path, e);
750
+ return this.logger.info(`testing ice gate: ${this.id}`), Bt(this.path, e);
782
751
  }
783
752
  handleAgitationChange() {
784
753
  var e;
785
- this.isAgitating ? (this.logger.info(`agitating ice-agitator ${this.id}`), w.publish(F.TOPIC_AGITATION_STARTED, {
754
+ this.isAgitating ? (this.logger.info(`agitating ice-agitator ${this.id}`), M.publish(F.TOPIC_AGITATION_STARTED, {
786
755
  path: this.path,
787
756
  futureId: (e = this.futureHandler.future) == null ? void 0 : e.futureId
788
- })) : w.publish(F.TOPIC_AGITATION_ENDED, {
757
+ })) : M.publish(F.TOPIC_AGITATION_ENDED, {
789
758
  path: this.path
790
759
  });
791
760
  }
792
761
  async updateIceType(e) {
793
- await Bt(this.path, e);
762
+ await Lt(this.path, e);
794
763
  }
795
764
  async init() {
796
765
  this.logger.debug(`initializing ice-agitator ${this.id}`);
797
766
  }
798
767
  async load() {
799
768
  this.logger.debug(`loading ice-agitator ${this.id}`);
800
- const e = await Ut(this.path);
801
- (e == null ? void 0 : e.status) === 200 && M(() => {
769
+ const e = await Ft(this.path);
770
+ (e == null ? void 0 : e.status) === 200 && w(() => {
802
771
  this._allIceTypes = e.data || [];
803
772
  });
804
773
  }
805
774
  };
806
- g([
775
+ c([
807
776
  p({
808
777
  path: m,
809
778
  attribute: "settings.volWithoutIceMl"
810
779
  })
811
780
  ], d.prototype, "volWithoutIceMl", 2);
812
- g([
781
+ c([
813
782
  p({
814
783
  path: m,
815
784
  attribute: "settings.durationSec",
@@ -818,49 +787,49 @@ g([
818
787
  }
819
788
  })
820
789
  ], d.prototype, "durationSec", 2);
821
- g([
790
+ c([
822
791
  p({
823
792
  path: m,
824
793
  attribute: "enableIceChuteClear"
825
794
  })
826
795
  ], d.prototype, "enableIceChuteClear", 2);
827
- g([
796
+ c([
828
797
  p({
829
798
  path: m,
830
799
  attribute: "iceChuteClearDurationMs"
831
800
  })
832
801
  ], d.prototype, "iceChuteClearDurationMs", 2);
833
- g([
802
+ c([
834
803
  p({
835
804
  path: m,
836
805
  attribute: "iceChuteClearIntervalSec"
837
806
  })
838
807
  ], d.prototype, "iceChuteClearIntervalSec", 2);
839
- g([
808
+ c([
840
809
  p({
841
810
  path: m,
842
811
  attribute: "iceChuteClearRetryIntervalSec"
843
812
  })
844
813
  ], d.prototype, "iceChuteClearRetryIntervalSec", 2);
845
- g([
814
+ c([
846
815
  p({
847
816
  path: m,
848
817
  attribute: "maxDispenseSec"
849
818
  })
850
819
  ], d.prototype, "maxDispenseSec", 2);
851
- g([
820
+ c([
852
821
  p({
853
822
  path: m,
854
823
  attribute: "type"
855
824
  })
856
825
  ], d.prototype, "type", 2);
857
- g([
826
+ c([
858
827
  p({
859
828
  path: m,
860
829
  attribute: "settings.dilutionOffset"
861
830
  })
862
831
  ], d.prototype, "dilutionOffset", 2);
863
- g([
832
+ c([
864
833
  p({
865
834
  path: m,
866
835
  attribute: "settings.inactivitySec",
@@ -869,45 +838,45 @@ g([
869
838
  }
870
839
  })
871
840
  ], d.prototype, "inactivitySec", 2);
872
- g([
873
- J({ path: Re, attribute: "agitating" })
841
+ c([
842
+ J({ path: De, attribute: "agitating" })
874
843
  ], d.prototype, "agitating", 2);
875
- g([
876
- J({ path: Re, attribute: "iceChuteOpen" })
844
+ c([
845
+ J({ path: De, attribute: "iceChuteOpen" })
877
846
  ], d.prototype, "iceChuteOpen", 2);
878
- g([
847
+ c([
879
848
  U({ alias: "pour" })
880
849
  ], d.prototype, "pourIce", 1);
881
- g([
850
+ c([
882
851
  U({ alias: "agitate" })
883
852
  ], d.prototype, "testAgitate", 1);
884
- g([
853
+ c([
885
854
  U({
886
855
  alias: "gate"
887
856
  })
888
857
  ], d.prototype, "testGate", 1);
889
- g([
890
- xe({
858
+ c([
859
+ k({
891
860
  dependencies: (e) => [e.isAgitating]
892
861
  })
893
862
  ], d.prototype, "handleAgitationChange", 1);
894
- d = g([
895
- f(Se)
863
+ d = c([
864
+ f(Re)
896
865
  ], d);
897
- const De = new P({
866
+ const ze = new b({
898
867
  class: d,
899
- type: Se
868
+ type: Re
900
869
  });
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--)
870
+ var Kt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, ae = (e, t, r, s) => {
871
+ for (var a = s > 1 ? void 0 : s ? Yt(t, r) : t, i = e.length - 1, n; i >= 0; i--)
903
872
  (n = e[i]) && (a = (s ? n(t, r, a) : n(a)) || a);
904
- return s && a && Wt(t, r, a), a;
873
+ return s && a && Kt(t, r, a), a;
905
874
  };
906
- const oe = "agitation-required-trouble-model", Qt = (e) => {
875
+ const oe = "agitation-required-trouble-model", qt = (e) => {
907
876
  if (e.data.agitationRequired)
908
877
  return oe;
909
- }, Xt = "InsufficientAgitationTrouble";
910
- let $ = class {
878
+ }, Vt = "InsufficientAgitationTrouble";
879
+ let E = class {
911
880
  constructor(e, t, r) {
912
881
  o(this, "id");
913
882
  o(this, "logger");
@@ -935,7 +904,7 @@ let $ = class {
935
904
  var s, a;
936
905
  if (!this.holder)
937
906
  return !0;
938
- const t = (((s = this.holder) == null ? void 0 : s.troublesByType[Xt]) || []).length > 0;
907
+ const t = (((s = this.holder) == null ? void 0 : s.troublesByType[Vt]) || []).length > 0;
939
908
  return !!((a = this.agitateBeforePour) != null && a.value) && t;
940
909
  }
941
910
  get deferred() {
@@ -953,54 +922,54 @@ ae([
953
922
  path: "app:kosdev.ddk:app",
954
923
  attribute: "ncui.agitateBeforePour"
955
924
  })
956
- ], $.prototype, "agitateBeforePour", 2);
925
+ ], E.prototype, "agitateBeforePour", 2);
957
926
  ae([
958
927
  Ye({
959
- topic: qe(ge.type),
960
- lifecycle: Ve.INIT
928
+ topic: Ve(ge.type),
929
+ lifecycle: qe.INIT
961
930
  })
962
- ], $.prototype, "updateHolder", 1);
963
- $ = ae([
931
+ ], E.prototype, "updateHolder", 1);
932
+ E = ae([
964
933
  f(oe)
965
- ], $);
966
- const Jt = new P({
967
- class: $,
934
+ ], E);
935
+ const Wt = new b({
936
+ class: E,
968
937
  type: oe
969
- }), kt = ["iceAgitator", "carbAgitator"], er = {
970
- iceAgitator: De.factory,
971
- carbAgitator: he.factory
972
- }, tr = A.createLogger({ name: "freestyle-assembly-data-mapper" }), ir = async (e) => {
938
+ }), Zt = ["iceAgitator", "carbAgitator"], Qt = {
939
+ iceAgitator: ze.factory,
940
+ carbAgitator: pe.factory
941
+ }, Xt = $.createLogger({ name: "freestyle-assembly-data-mapper" }), rr = async (e) => {
973
942
  const t = te.instance().options({}).build(), r = re.instance().options({}).build(), s = e.assemblies.reduce((n, l) => {
974
- var T;
975
- return kt.forEach((c) => {
976
- var b;
977
- const _ = l[c];
978
- if (_) {
979
- const ze = er[c](_.path);
980
- n[c] = ze({
981
- name: _.name,
982
- path: _.path,
983
- statePath: ((b = _.state) == null ? void 0 : b.path) || ""
943
+ var O;
944
+ return Zt.forEach((g) => {
945
+ var _;
946
+ const P = l[g];
947
+ if (P) {
948
+ const Ne = Qt[g](P.path);
949
+ n[g] = Ne({
950
+ name: P.name,
951
+ path: P.path,
952
+ statePath: ((_ = P.state) == null ? void 0 : _.path) || ""
984
953
  });
985
954
  }
986
- }), (T = l.cartridgeAgitators) == null || T.forEach((c) => {
987
- var b;
988
- const _ = _e.instance(
989
- c.path
955
+ }), (O = l.cartridgeAgitators) == null || O.forEach((g) => {
956
+ var _;
957
+ const P = be.instance(
958
+ g.path
990
959
  ).options({
991
- name: c.name,
992
- path: c.path,
993
- statePath: ((b = c.state) == null ? void 0 : b.path) || ""
960
+ name: g.name,
961
+ path: g.path,
962
+ statePath: ((_ = g.state) == null ? void 0 : _.path) || ""
994
963
  }).build();
995
- t.addModel(_);
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({
999
- holderPath: c.holderPath,
1000
- configPath: c.path,
1001
- name: c.name
964
+ t.addModel(P);
965
+ }), l.remoteTrays && l.remoteTrays.forEach((g) => {
966
+ Xt.info(`Found remote tray ${g.name} with path ${g.path}`);
967
+ const P = `${A.type}-${g.holderPath}`, _ = A.instance(P).options({
968
+ holderPath: g.holderPath,
969
+ configPath: g.path,
970
+ name: g.name
1002
971
  }).build();
1003
- r.addModel(b);
972
+ r.addModel(_);
1004
973
  }), n;
1005
974
  }, {}), a = !!s.iceAgitator, i = !!s.carbAgitator;
1006
975
  return {
@@ -1010,19 +979,19 @@ const Jt = new P({
1010
979
  supportsCarb: i,
1011
980
  supportsIce: a
1012
981
  };
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)(
982
+ }, Jt = (e) => () => (We(e)(), Xe(e)(), ne.register(), W.register(), ze.register(), pe.register(), te.register(), le.register(), se.register(), A.register(), re.register(), h.companion.register(e)(
1014
983
  Je.type,
1015
984
  ne.type
1016
985
  ), h.companion.register(e)(
1017
986
  ge.type,
1018
- V.type
1019
- ), Jt.register(), h.companion.register(e)(
987
+ W.type
988
+ ), Wt.register(), h.companion.register(e)(
1020
989
  Ze.type,
1021
- Qt
990
+ qt
1022
991
  ), h.companion.register(e)(ke.type, le.type), h.companion.register(e)(
1023
992
  et.type,
1024
993
  se.type
1025
- ), x[K].register(
994
+ ), K[Y].register(
1026
995
  "EnjoyByTrouble",
1027
996
  async (t) => {
1028
997
  if (t.data.enjoyByDate) {
@@ -1035,7 +1004,7 @@ const Jt = new P({
1035
1004
  }
1036
1005
  return {};
1037
1006
  }
1038
- ), x[K].register(
1007
+ ), K[Y].register(
1039
1008
  "SuperPumpRequiredTrouble",
1040
1009
  // This is the trouble type
1041
1010
  async (t) => {
@@ -1049,7 +1018,7 @@ const Jt = new P({
1049
1018
  ).map((i) => i.name).join(", ")
1050
1019
  } : {};
1051
1020
  }
1052
- ), x[K].register(
1021
+ ), K[Y].register(
1053
1022
  "MicroPumpAirDetectTrouble",
1054
1023
  async (t) => {
1055
1024
  if (t.ifaces.includes("container"))
@@ -1077,35 +1046,35 @@ const Jt = new P({
1077
1046
  ...Qe
1078
1047
  };
1079
1048
  y.freestyle = {
1080
- models: rr(y)
1049
+ models: Jt(y)
1081
1050
  };
1082
1051
  y.preload = h.model.preloadModel(y);
1083
1052
  y.model = h.model.register(y);
1084
1053
  y.companion = h.companion.register(y);
1085
1054
  y.legacy = h.model.registerLegacyModel(y);
1086
- const nr = y;
1055
+ const ar = y;
1087
1056
  export {
1088
- Xt as A,
1089
- he as C,
1090
- V as F,
1057
+ Vt as A,
1058
+ pe as C,
1059
+ W as F,
1091
1060
  F as I,
1092
- nr as K,
1093
- wt as N,
1061
+ ar as K,
1062
+ Ct as N,
1094
1063
  re as R,
1095
1064
  te as a,
1096
1065
  R as b,
1097
- _e as c,
1066
+ be as c,
1098
1067
  se as d,
1099
1068
  ne as e,
1100
1069
  le as f,
1101
- De as g,
1102
- Jt as h,
1103
- E as i,
1070
+ ze as g,
1071
+ Wt as h,
1072
+ A as i,
1104
1073
  ie as j,
1105
- St as k,
1106
- Ft as l,
1107
- ir as m,
1108
- yt as n,
1109
- rr as r
1074
+ wt as k,
1075
+ Dt as l,
1076
+ rr as m,
1077
+ pt as n,
1078
+ Jt as r
1110
1079
  };
1111
- //# sourceMappingURL=freestyle-registration-manager-CI8el36E.js.map
1080
+ //# sourceMappingURL=freestyle-registration-manager-CClN6mVr.js.map