@kosdev-code/kos-freestyle-sdk 2.1.16 → 2.1.18
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/extension-utils-BUUtrM-T.cjs +2 -0
- package/{extension-utils-BVDLwtKr.cjs.map → extension-utils-BUUtrM-T.cjs.map} +1 -1
- package/extension-utils-sj0P_x9E.js +220 -0
- package/{extension-utils-BE0Y1Zlv.js.map → extension-utils-sj0P_x9E.js.map} +1 -1
- package/freestyle-registration-manager-DSugLmqT.js +1739 -0
- package/freestyle-registration-manager-DSugLmqT.js.map +1 -0
- package/freestyle-registration-manager-rmrOsUZq.cjs +2 -0
- package/freestyle-registration-manager-rmrOsUZq.cjs.map +1 -0
- package/index.cjs +1 -1
- package/index.js +34 -27
- package/models/models/carb-agitator/carb-agitator-model.d.ts +38 -6
- package/models/models/carb-agitator/carb-agitator-model.d.ts.map +1 -1
- package/models/models/carb-agitator/index.d.ts +1 -1
- package/models/models/carb-agitator/index.d.ts.map +1 -1
- package/models/models/carb-agitator/services/carb-tank-services.d.ts +4 -0
- package/models/models/carb-agitator/services/carb-tank-services.d.ts.map +1 -0
- package/models/models/carb-agitator/types/index.d.ts +1 -8
- package/models/models/cgp-pump/cgp-pump-model.d.ts +24 -0
- package/models/models/cgp-pump/cgp-pump-model.d.ts.map +1 -0
- package/models/models/cgp-pump/index.d.ts +4 -0
- package/models/models/cgp-pump/index.d.ts.map +1 -0
- package/models/models/cgp-pump/types/index.d.ts +5 -0
- package/models/models/fcm-pump/fcm-pump-model.d.ts +28 -0
- package/models/models/fcm-pump/fcm-pump-model.d.ts.map +1 -0
- package/models/models/{carb-agitator/carb-agitator-registration.d.ts → fcm-pump/fcm-pump-registration.d.ts} +23 -20
- package/models/models/fcm-pump/fcm-pump-registration.d.ts.map +1 -0
- package/models/models/fcm-pump/index.d.ts +5 -0
- package/models/models/fcm-pump/index.d.ts.map +1 -0
- package/models/models/fcm-pump/services/fcm-pump-services.d.ts +17 -0
- package/models/models/fcm-pump/services/fcm-pump-services.d.ts.map +1 -0
- package/models/models/fcm-pump/services/index.d.ts +2 -0
- package/models/models/fcm-pump/services/index.d.ts.map +1 -0
- package/models/models/fcm-pump/types/index.d.ts +5 -0
- package/models/models/freestyle-assembly/freestyle-assembly-model.d.ts +4 -2
- package/models/models/freestyle-assembly/freestyle-assembly-model.d.ts.map +1 -1
- package/models/models/index.d.ts +4 -0
- package/models/models/index.d.ts.map +1 -1
- package/models/models/lfcv-pump/index.d.ts +5 -0
- package/models/models/lfcv-pump/index.d.ts.map +1 -0
- package/models/models/lfcv-pump/lfcv-pump-model.d.ts +20 -0
- package/models/models/lfcv-pump/lfcv-pump-model.d.ts.map +1 -0
- package/models/models/lfcv-pump/lfcv-pump-registration.d.ts +87 -0
- package/models/models/lfcv-pump/lfcv-pump-registration.d.ts.map +1 -0
- package/models/models/lfcv-pump/services/index.d.ts +2 -0
- package/models/models/lfcv-pump/services/index.d.ts.map +1 -0
- package/models/models/lfcv-pump/services/lfcv-pump-services.d.ts +10 -0
- package/models/models/lfcv-pump/services/lfcv-pump-services.d.ts.map +1 -0
- package/models/models/lfcv-pump/types/index.d.ts +5 -0
- package/models/models/spm-pump/index.d.ts +5 -0
- package/models/models/spm-pump/index.d.ts.map +1 -0
- package/models/models/spm-pump/services/index.d.ts +2 -0
- package/models/models/spm-pump/services/index.d.ts.map +1 -0
- package/models/models/spm-pump/services/spm-pump-services.d.ts +7 -0
- package/models/models/spm-pump/services/spm-pump-services.d.ts.map +1 -0
- package/models/models/spm-pump/spm-pump-model.d.ts +26 -0
- package/models/models/spm-pump/spm-pump-model.d.ts.map +1 -0
- package/models/models/spm-pump/spm-pump-registration.d.ts +87 -0
- package/models/models/spm-pump/spm-pump-registration.d.ts.map +1 -0
- package/models/models/spm-pump/types/index.d.ts +5 -0
- package/models/models/types/assembly.d.ts +7 -3
- package/models/models/types/assembly.d.ts.map +1 -1
- package/models/utils/extensions/assembly/assembly-data-mapper.d.ts +1 -5
- package/models/utils/extensions/assembly/assembly-data-mapper.d.ts.map +1 -1
- package/models/utils/freestyle-registration-manager.d.ts.map +1 -1
- package/models.cjs +1 -1
- package/models.js +27 -20
- package/package.json +2 -2
- package/ui.cjs +1 -1
- package/ui.js +2 -2
- package/{use-nutrition-info-DjIGT-mE.cjs → use-nutrition-info-DSdA_SRp.cjs} +2 -2
- package/{use-nutrition-info-DjIGT-mE.cjs.map → use-nutrition-info-DSdA_SRp.cjs.map} +1 -1
- package/{use-nutrition-info-CjXNGbCN.js → use-nutrition-info-DtcZs7dL.js} +5 -5
- package/{use-nutrition-info-CjXNGbCN.js.map → use-nutrition-info-DtcZs7dL.js.map} +1 -1
- package/extension-utils-BE0Y1Zlv.js +0 -201
- package/extension-utils-BVDLwtKr.cjs +0 -2
- package/freestyle-registration-manager-CDbljuRk.cjs +0 -2
- package/freestyle-registration-manager-CDbljuRk.cjs.map +0 -1
- package/freestyle-registration-manager-z0aYdMcC.js +0 -1069
- package/freestyle-registration-manager-z0aYdMcC.js.map +0 -1
- package/models/models/carb-agitator/carb-agitator-registration.d.ts.map +0 -1
|
@@ -0,0 +1,1739 @@
|
|
|
1
|
+
var pt = Object.defineProperty;
|
|
2
|
+
var gt = (e, t, r) => t in e ? pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var i = (e, t, r) => (gt(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
+
import { resolveServiceUrl as w, ServiceFactory as S, KosLog as C, createPropKey as x, kosStateProp as O, kosConfigProperty as b, kosStateEntry as me, kosStateExit as ht, kosStateGuard as ye, kosFuture as _, kosModel as f, kosLoggerAware as ee, kosCompanion as Me, kosFutureAware as Re, kosStateMachine as ft, DependencyLifecycle as De, KosModelContainer as mt, kosChild as Le, kosModelEffect as be, EventBus as Y, KosModelRegistrationFactory as $, SingletonKosModelRegistrationFactory as Pe, FetchError as ve, FutureManager as y, FutureEndState as U, FutureHandler as Fe, kosParentAware as Ne, KosFeatureFlags as ne, getKosCompanionModel as yt, getKosModelSync as R, kosContainerAware as bt, KosContextManager as Pt, kosAction as K, KOS_MODEL_ID as E, kosMultipleFutureAware as vt, kosTopicHandler as Tt, modelTypeEventTopicFactory as It, RegistrationManager as m, registerCoreModels as _t, Trouble as Ct, ExtensionManager as le, EXTENSION_TROUBLE_DATA_MAPPER as ue } from "@kosdev-code/kos-ui-sdk";
|
|
5
|
+
import { PourState as d, Assembly as ze, KosModelRegistry as $t, registerDispenseModels as Et, Nozzle as Ot, Pump as At, Holder as wt, PumpContainer as St, PumpIndex as Mt } from "@kosdev-code/kos-dispense-sdk";
|
|
6
|
+
const { URL: xe } = w("ICE_AGITATOR_SERVICE"), { postModel: Rt } = S.build({
|
|
7
|
+
basePath: `${xe}/api/ext/freestyle/ice`
|
|
8
|
+
});
|
|
9
|
+
C.createLogger({
|
|
10
|
+
name: "carb-tank-service",
|
|
11
|
+
group: "Services"
|
|
12
|
+
});
|
|
13
|
+
const Dt = async (e, t) => {
|
|
14
|
+
const r = await Rt({
|
|
15
|
+
model: {},
|
|
16
|
+
tracker: t,
|
|
17
|
+
urlOverride: `${xe}/api/handle/${e}/test`
|
|
18
|
+
});
|
|
19
|
+
if (!(r != null && r.data))
|
|
20
|
+
throw new Error("No response from server");
|
|
21
|
+
return r == null ? void 0 : r.data;
|
|
22
|
+
};
|
|
23
|
+
var Ue = Object.defineProperty, Lt = Object.getOwnPropertyDescriptor, Ft = (e, t, r) => t in e ? Ue(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, P = (e, t, r, o) => {
|
|
24
|
+
for (var a = o > 1 ? void 0 : o ? Lt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
25
|
+
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
26
|
+
return o && a && Ue(t, r, a), a;
|
|
27
|
+
}, Nt = (e, t, r) => (Ft(e, t + "", r), r);
|
|
28
|
+
const zt = "carb-agitator-model", Te = x("statePath");
|
|
29
|
+
let g = class {
|
|
30
|
+
constructor(e, t, r) {
|
|
31
|
+
i(this, "id");
|
|
32
|
+
i(this, "name");
|
|
33
|
+
i(this, "path");
|
|
34
|
+
i(this, "statePath");
|
|
35
|
+
i(this, "highProbeWet");
|
|
36
|
+
i(this, "lowProbeWet");
|
|
37
|
+
i(this, "filling");
|
|
38
|
+
i(this, "enabled");
|
|
39
|
+
var a;
|
|
40
|
+
this.id = e, this.name = t.name, this.path = ((a = r.kosContext.get("assembly-feature-carbTank")) == null ? void 0 : a.path) || "";
|
|
41
|
+
const o = r.kosContext.get("assembly-state-path-carbTank");
|
|
42
|
+
this.statePath = o;
|
|
43
|
+
}
|
|
44
|
+
get holder() {
|
|
45
|
+
var t;
|
|
46
|
+
return (t = this.getCompanionParent()) == null ? void 0 : t.getHoldersByGroup("carb")[0];
|
|
47
|
+
}
|
|
48
|
+
get pump() {
|
|
49
|
+
var e;
|
|
50
|
+
return (e = this.holder) == null ? void 0 : e.pumps.data[0];
|
|
51
|
+
}
|
|
52
|
+
get isFilling() {
|
|
53
|
+
return !!this.filling.value;
|
|
54
|
+
}
|
|
55
|
+
get isCarbInitialized() {
|
|
56
|
+
return !!this.enabled.value;
|
|
57
|
+
}
|
|
58
|
+
get canActivate() {
|
|
59
|
+
return !this.enabled.value;
|
|
60
|
+
}
|
|
61
|
+
get canProceed() {
|
|
62
|
+
return this.isInState(
|
|
63
|
+
"INITIALIZED"
|
|
64
|
+
/* INITIALIZED */
|
|
65
|
+
) || this.isInState(
|
|
66
|
+
"SKIPPED"
|
|
67
|
+
/* SKIPPED */
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
handleActivationStart() {
|
|
71
|
+
this.logger.info("Carb tank activation started");
|
|
72
|
+
}
|
|
73
|
+
handleActivationComplete() {
|
|
74
|
+
this.logger.info("Carb tank initialized");
|
|
75
|
+
}
|
|
76
|
+
handleInitialized() {
|
|
77
|
+
this.logger.info("Carb tank ready to proceed");
|
|
78
|
+
}
|
|
79
|
+
handleSkipped() {
|
|
80
|
+
this.logger.info("Proceeding without carbinator");
|
|
81
|
+
}
|
|
82
|
+
async activateCarbTank() {
|
|
83
|
+
this.transition("ACTIVATE"), this.enabled.updateProperty(!0), this.transition("ACTIVATION_COMPLETE");
|
|
84
|
+
}
|
|
85
|
+
async deactivateCarbTank() {
|
|
86
|
+
this.enabled.updateProperty(!1), this.transition("RESET");
|
|
87
|
+
}
|
|
88
|
+
skip() {
|
|
89
|
+
this.transition("SKIP");
|
|
90
|
+
}
|
|
91
|
+
reset() {
|
|
92
|
+
this.enabled.updateProperty(!1), this.transition("RESET");
|
|
93
|
+
}
|
|
94
|
+
toggleCarbTank() {
|
|
95
|
+
this.enabled.value ? this.deactivateCarbTank() : this.activateCarbTank();
|
|
96
|
+
}
|
|
97
|
+
handleTestCarbTank(e) {
|
|
98
|
+
if (!e)
|
|
99
|
+
throw new Error("No tracker provided");
|
|
100
|
+
return this.logger.info(`testing carb tank: ${this.id}`), Dt(this.path, e);
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
Nt(g, "Registration");
|
|
104
|
+
P([
|
|
105
|
+
O({
|
|
106
|
+
path: Te,
|
|
107
|
+
attribute: "highProbeWet"
|
|
108
|
+
})
|
|
109
|
+
], g.prototype, "highProbeWet", 2);
|
|
110
|
+
P([
|
|
111
|
+
O({
|
|
112
|
+
path: Te,
|
|
113
|
+
attribute: "lowProbeWet"
|
|
114
|
+
})
|
|
115
|
+
], g.prototype, "lowProbeWet", 2);
|
|
116
|
+
P([
|
|
117
|
+
O({
|
|
118
|
+
path: Te,
|
|
119
|
+
attribute: "filling"
|
|
120
|
+
})
|
|
121
|
+
], g.prototype, "filling", 2);
|
|
122
|
+
P([
|
|
123
|
+
b({
|
|
124
|
+
path: "assembly:core:board:macksm:carbTank:carbTank",
|
|
125
|
+
attribute: "enabled"
|
|
126
|
+
})
|
|
127
|
+
], g.prototype, "enabled", 2);
|
|
128
|
+
P([
|
|
129
|
+
me(
|
|
130
|
+
"ACTIVATING"
|
|
131
|
+
/* ACTIVATING */
|
|
132
|
+
)
|
|
133
|
+
], g.prototype, "handleActivationStart", 1);
|
|
134
|
+
P([
|
|
135
|
+
ht(
|
|
136
|
+
"ACTIVATING"
|
|
137
|
+
/* ACTIVATING */
|
|
138
|
+
)
|
|
139
|
+
], g.prototype, "handleActivationComplete", 1);
|
|
140
|
+
P([
|
|
141
|
+
me(
|
|
142
|
+
"INITIALIZED"
|
|
143
|
+
/* INITIALIZED */
|
|
144
|
+
)
|
|
145
|
+
], g.prototype, "handleInitialized", 1);
|
|
146
|
+
P([
|
|
147
|
+
me(
|
|
148
|
+
"SKIPPED"
|
|
149
|
+
/* SKIPPED */
|
|
150
|
+
)
|
|
151
|
+
], g.prototype, "handleSkipped", 1);
|
|
152
|
+
P([
|
|
153
|
+
ye({ allowedStates: [
|
|
154
|
+
"UNINITIALIZED"
|
|
155
|
+
/* UNINITIALIZED */
|
|
156
|
+
] })
|
|
157
|
+
], g.prototype, "activateCarbTank", 1);
|
|
158
|
+
P([
|
|
159
|
+
ye({ allowedStates: [
|
|
160
|
+
"UNINITIALIZED"
|
|
161
|
+
/* UNINITIALIZED */
|
|
162
|
+
] })
|
|
163
|
+
], g.prototype, "skip", 1);
|
|
164
|
+
P([
|
|
165
|
+
ye({
|
|
166
|
+
allowedStates: [
|
|
167
|
+
"INITIALIZED",
|
|
168
|
+
"SKIPPED"
|
|
169
|
+
/* SKIPPED */
|
|
170
|
+
]
|
|
171
|
+
})
|
|
172
|
+
], g.prototype, "reset", 1);
|
|
173
|
+
P([
|
|
174
|
+
_()
|
|
175
|
+
], g.prototype, "handleTestCarbTank", 1);
|
|
176
|
+
g = P([
|
|
177
|
+
f({ modelTypeId: zt, singleton: !1 }),
|
|
178
|
+
ee(),
|
|
179
|
+
Me({ mode: "composition", lifecycle: De.LOAD }),
|
|
180
|
+
Re(),
|
|
181
|
+
ft(
|
|
182
|
+
{
|
|
183
|
+
initial: "UNINITIALIZED",
|
|
184
|
+
states: {
|
|
185
|
+
UNINITIALIZED: {
|
|
186
|
+
on: {
|
|
187
|
+
ACTIVATE: "ACTIVATING",
|
|
188
|
+
SKIP: "SKIPPED"
|
|
189
|
+
/* SKIPPED */
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
ACTIVATING: {
|
|
193
|
+
on: {
|
|
194
|
+
ACTIVATION_COMPLETE: "INITIALIZED"
|
|
195
|
+
/* INITIALIZED */
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
INITIALIZED: {
|
|
199
|
+
on: {
|
|
200
|
+
RESET: "UNINITIALIZED"
|
|
201
|
+
/* UNINITIALIZED */
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
SKIPPED: {
|
|
205
|
+
on: {
|
|
206
|
+
RESET: "UNINITIALIZED"
|
|
207
|
+
/* UNINITIALIZED */
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
throwOnInvalid: !1
|
|
214
|
+
// Graceful handling for button clicks
|
|
215
|
+
}
|
|
216
|
+
)
|
|
217
|
+
], g);
|
|
218
|
+
const Ge = g.Registration;
|
|
219
|
+
var xt = Object.defineProperty, Ut = Object.getOwnPropertyDescriptor, Ve = (e, t, r, o) => {
|
|
220
|
+
for (var a = o > 1 ? void 0 : o ? Ut(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
221
|
+
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
222
|
+
return o && a && xt(t, r, a), a;
|
|
223
|
+
};
|
|
224
|
+
const je = "cartridge-agitator-container-model";
|
|
225
|
+
let W = class {
|
|
226
|
+
constructor(e, t, r) {
|
|
227
|
+
i(this, "id");
|
|
228
|
+
i(this, "logger");
|
|
229
|
+
i(this, "_models");
|
|
230
|
+
this.id = e, this.logger = r.logger, this._models = new mt({
|
|
231
|
+
parentId: e
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
getModel(e) {
|
|
235
|
+
return this._models.getModel(e);
|
|
236
|
+
}
|
|
237
|
+
get models() {
|
|
238
|
+
return this._models;
|
|
239
|
+
}
|
|
240
|
+
get data() {
|
|
241
|
+
return this._models.data;
|
|
242
|
+
}
|
|
243
|
+
addModel(e) {
|
|
244
|
+
this._models.addModel(e);
|
|
245
|
+
}
|
|
246
|
+
removeModel(e) {
|
|
247
|
+
this._models.removeModel(e);
|
|
248
|
+
}
|
|
249
|
+
// -------------------LIFECYCLE----------------------------
|
|
250
|
+
async init() {
|
|
251
|
+
this.logger.debug(
|
|
252
|
+
`initializing cartridge-agitator-container container ${this.id}`
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
async load() {
|
|
256
|
+
this.logger.debug(
|
|
257
|
+
`loading cartridge-agitator-container container ${this.id}`
|
|
258
|
+
);
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
Ve([
|
|
262
|
+
Le
|
|
263
|
+
], W.prototype, "_models", 2);
|
|
264
|
+
W = Ve([
|
|
265
|
+
f(je)
|
|
266
|
+
], W);
|
|
267
|
+
const { URL: qe } = w("CARTRIDGE_AGITATOR_SERVICE"), { postModel: Gt } = S.build({
|
|
268
|
+
basePath: `${qe}/api/ext/freestyle/freestyle/ice`
|
|
269
|
+
}), Vt = async (e, t) => {
|
|
270
|
+
const r = await Gt({
|
|
271
|
+
model: {},
|
|
272
|
+
tracker: t,
|
|
273
|
+
urlOverride: `${qe}/api/handle/${e}/test`
|
|
274
|
+
});
|
|
275
|
+
if (!(r != null && r.data))
|
|
276
|
+
throw new Error("No response from server");
|
|
277
|
+
return r.data;
|
|
278
|
+
};
|
|
279
|
+
var jt = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, te = (e, t, r, o) => {
|
|
280
|
+
for (var a = o > 1 ? void 0 : o ? qt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
281
|
+
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
282
|
+
return o && a && jt(t, r, a), a;
|
|
283
|
+
};
|
|
284
|
+
const Be = "cartridge-agitator-model";
|
|
285
|
+
class Z {
|
|
286
|
+
}
|
|
287
|
+
i(Z, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/agitation-started"), i(Z, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/agitation-ended");
|
|
288
|
+
const Bt = x("statePath");
|
|
289
|
+
let F = class {
|
|
290
|
+
constructor(e, t) {
|
|
291
|
+
i(this, "id");
|
|
292
|
+
i(this, "agitating");
|
|
293
|
+
i(this, "path");
|
|
294
|
+
i(this, "statePath");
|
|
295
|
+
i(this, "name");
|
|
296
|
+
this.id = e, this.path = t.path, this.name = t.name, this.statePath = t.statePath;
|
|
297
|
+
}
|
|
298
|
+
get isAgitating() {
|
|
299
|
+
return !!this.agitating.value;
|
|
300
|
+
}
|
|
301
|
+
async testAgitate(e) {
|
|
302
|
+
if (!e)
|
|
303
|
+
throw new Error("No tracker provided");
|
|
304
|
+
return this.logger.info(`agitating cartridge-agitator ${this.id}`), Vt(this.path, e);
|
|
305
|
+
}
|
|
306
|
+
handleAgitation() {
|
|
307
|
+
var e;
|
|
308
|
+
this.isAgitating ? (this.logger.info(`agitating cartridge-agitator ${this.id}`), Y.publish(Z.TOPIC_AGITATION_STARTED, {
|
|
309
|
+
path: this.path,
|
|
310
|
+
futureId: (e = this.future) == null ? void 0 : e.futureId
|
|
311
|
+
})) : Y.publish(Z.TOPIC_AGITATION_ENDED, {
|
|
312
|
+
path: this.path
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
te([
|
|
317
|
+
O({ path: Bt, attribute: "agitating" })
|
|
318
|
+
], F.prototype, "agitating", 2);
|
|
319
|
+
te([
|
|
320
|
+
_()
|
|
321
|
+
], F.prototype, "testAgitate", 1);
|
|
322
|
+
te([
|
|
323
|
+
be({
|
|
324
|
+
dependencies: (e) => [e.isAgitating]
|
|
325
|
+
})
|
|
326
|
+
], F.prototype, "handleAgitation", 1);
|
|
327
|
+
F = te([
|
|
328
|
+
f(Be),
|
|
329
|
+
Re(),
|
|
330
|
+
ee()
|
|
331
|
+
], F);
|
|
332
|
+
const He = new $({
|
|
333
|
+
class: F,
|
|
334
|
+
type: Be
|
|
335
|
+
}), Ie = new Pe({
|
|
336
|
+
class: W,
|
|
337
|
+
type: je
|
|
338
|
+
});
|
|
339
|
+
Ie.addRelatedModel(He);
|
|
340
|
+
var Ke = Object.defineProperty, Ht = Object.getOwnPropertyDescriptor, Kt = (e, t, r) => t in e ? Ke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, re = (e, t, r, o) => {
|
|
341
|
+
for (var a = o > 1 ? void 0 : o ? Ht(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
342
|
+
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
343
|
+
return o && a && Ke(t, r, a), a;
|
|
344
|
+
}, Yt = (e, t, r) => (Kt(e, t + "", r), r);
|
|
345
|
+
const Wt = "cgp-pump-model", _e = x("statePath");
|
|
346
|
+
let D = class {
|
|
347
|
+
constructor(e, t) {
|
|
348
|
+
i(this, "highProbeWet");
|
|
349
|
+
i(this, "lowProbeWet");
|
|
350
|
+
i(this, "filling");
|
|
351
|
+
i(this, "id");
|
|
352
|
+
i(this, "state");
|
|
353
|
+
var r;
|
|
354
|
+
this.id = e, this.state = ((r = t.data) == null ? void 0 : r.state) ?? { name: "unknown", path: "" };
|
|
355
|
+
}
|
|
356
|
+
get statePath() {
|
|
357
|
+
return this.state.path;
|
|
358
|
+
}
|
|
359
|
+
};
|
|
360
|
+
Yt(D, "Registration");
|
|
361
|
+
re([
|
|
362
|
+
O({
|
|
363
|
+
path: _e,
|
|
364
|
+
attribute: "highProbeWet"
|
|
365
|
+
})
|
|
366
|
+
], D.prototype, "highProbeWet", 2);
|
|
367
|
+
re([
|
|
368
|
+
O({
|
|
369
|
+
path: _e,
|
|
370
|
+
attribute: "lowProbeWet"
|
|
371
|
+
})
|
|
372
|
+
], D.prototype, "lowProbeWet", 2);
|
|
373
|
+
re([
|
|
374
|
+
O({
|
|
375
|
+
path: _e,
|
|
376
|
+
attribute: "filling"
|
|
377
|
+
})
|
|
378
|
+
], D.prototype, "filling", 2);
|
|
379
|
+
D = re([
|
|
380
|
+
f({ modelTypeId: Wt, singleton: !1 }),
|
|
381
|
+
Me({
|
|
382
|
+
mode: "composition"
|
|
383
|
+
}),
|
|
384
|
+
ee()
|
|
385
|
+
], D);
|
|
386
|
+
const Zt = D.Registration, { URL: G } = w("FCM-PUMP_SERVICE"), { postModel: q } = S.build({
|
|
387
|
+
basePath: `${G}/api/fcm-pump`
|
|
388
|
+
}), h = C.createLogger({
|
|
389
|
+
name: "fcm-pump-service",
|
|
390
|
+
group: "Services"
|
|
391
|
+
}), kt = async (e) => {
|
|
392
|
+
var t, r, o, a, n;
|
|
393
|
+
h.debug(
|
|
394
|
+
`performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`
|
|
395
|
+
);
|
|
396
|
+
try {
|
|
397
|
+
const s = await q({
|
|
398
|
+
model: {},
|
|
399
|
+
urlOverride: `${G}/api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`
|
|
400
|
+
});
|
|
401
|
+
return h.debug("performElectricalTest - response:", s), ((s == null ? void 0 : s.status) === 200 || (s == null ? void 0 : s.status) === 499) && ((t = s.data) != null && t.error) ? [s.data.error || "unknownError", s.data] : [void 0, s == null ? void 0 : s.data];
|
|
402
|
+
} catch (s) {
|
|
403
|
+
if (h.error(
|
|
404
|
+
`performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`,
|
|
405
|
+
s
|
|
406
|
+
), s instanceof ve) {
|
|
407
|
+
const u = ((o = (r = s.payload) == null ? void 0 : r.data) == null ? void 0 : o.error) || ((a = s.payload) == null ? void 0 : a.error) || "unknownError";
|
|
408
|
+
return [u, ((n = s.payload) == null ? void 0 : n.data) || { error: u }];
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
return ["unknownError", { error: "unknownError" }];
|
|
412
|
+
}, Qt = async (e, t) => {
|
|
413
|
+
h.debug(
|
|
414
|
+
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/preCalibrate`
|
|
415
|
+
);
|
|
416
|
+
try {
|
|
417
|
+
const r = await q({
|
|
418
|
+
model: {},
|
|
419
|
+
urlOverride: `${G}/api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,
|
|
420
|
+
tracker: t
|
|
421
|
+
});
|
|
422
|
+
return h.debug("performPreCalibrate - response:", r), r != null && r.data && y.initiateFuture(r.data), r == null ? void 0 : r.data;
|
|
423
|
+
} catch (r) {
|
|
424
|
+
h.error(
|
|
425
|
+
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,
|
|
426
|
+
r
|
|
427
|
+
);
|
|
428
|
+
const o = {
|
|
429
|
+
id: t || "",
|
|
430
|
+
endState: U.Fail,
|
|
431
|
+
tracker: t,
|
|
432
|
+
reason: "Failed to resolve trouble"
|
|
433
|
+
};
|
|
434
|
+
return y.initiateFuture(o), o;
|
|
435
|
+
}
|
|
436
|
+
}, Xt = async (e, t) => {
|
|
437
|
+
h.debug(
|
|
438
|
+
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/calibrate`
|
|
439
|
+
);
|
|
440
|
+
try {
|
|
441
|
+
const r = await q({
|
|
442
|
+
model: {},
|
|
443
|
+
urlOverride: `${G}/api/ext/freestyle/fcm/calibration/${e}/calibrate`,
|
|
444
|
+
tracker: t
|
|
445
|
+
});
|
|
446
|
+
return h.debug("performPreCalibrate - response:", r), r != null && r.data && y.initiateFuture(r.data), r == null ? void 0 : r.data;
|
|
447
|
+
} catch (r) {
|
|
448
|
+
h.error(
|
|
449
|
+
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/calibrate`,
|
|
450
|
+
r
|
|
451
|
+
);
|
|
452
|
+
const o = {
|
|
453
|
+
id: t || "",
|
|
454
|
+
endState: U.Fail,
|
|
455
|
+
tracker: t,
|
|
456
|
+
reason: "Failed to resolve trouble"
|
|
457
|
+
};
|
|
458
|
+
return y.initiateFuture(o), o;
|
|
459
|
+
}
|
|
460
|
+
}, Jt = async (e, t, r) => {
|
|
461
|
+
h.debug(
|
|
462
|
+
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/verify/${t}`
|
|
463
|
+
);
|
|
464
|
+
try {
|
|
465
|
+
const o = await q({
|
|
466
|
+
model: {},
|
|
467
|
+
urlOverride: `${G}/api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,
|
|
468
|
+
tracker: r
|
|
469
|
+
});
|
|
470
|
+
return h.debug("performVerify - response:", o), o != null && o.data && y.initiateFuture(o.data), o == null ? void 0 : o.data;
|
|
471
|
+
} catch (o) {
|
|
472
|
+
h.error(
|
|
473
|
+
`performVerify - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,
|
|
474
|
+
o
|
|
475
|
+
);
|
|
476
|
+
const a = {
|
|
477
|
+
id: r || "",
|
|
478
|
+
endState: U.Fail,
|
|
479
|
+
tracker: r,
|
|
480
|
+
reason: "Failed to resolve trouble"
|
|
481
|
+
};
|
|
482
|
+
return y.initiateFuture(a), a;
|
|
483
|
+
}
|
|
484
|
+
}, er = (e) => e ? e.data === "success" || !e.data ? "success" : e.data : "error", tr = async (e, t, r) => {
|
|
485
|
+
h.debug(
|
|
486
|
+
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
|
|
487
|
+
);
|
|
488
|
+
try {
|
|
489
|
+
const o = await q({
|
|
490
|
+
model: {},
|
|
491
|
+
urlOverride: `${G}/api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
|
|
492
|
+
});
|
|
493
|
+
return h.debug("performPreCalibrate - response:", o), er(o == null ? void 0 : o.data);
|
|
494
|
+
} catch (o) {
|
|
495
|
+
h.error(
|
|
496
|
+
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`,
|
|
497
|
+
o
|
|
498
|
+
);
|
|
499
|
+
return;
|
|
500
|
+
}
|
|
501
|
+
};
|
|
502
|
+
var rr = Object.defineProperty, ar = Object.getOwnPropertyDescriptor, ae = (e, t, r, o) => {
|
|
503
|
+
for (var a = o > 1 ? void 0 : o ? ar(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
504
|
+
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
505
|
+
return o && a && rr(t, r, a), a;
|
|
506
|
+
};
|
|
507
|
+
const Ye = "fcm-pump-model", or = C.createLogger({ name: "fcm-pump-model" });
|
|
508
|
+
let N = class {
|
|
509
|
+
constructor(e, t, r) {
|
|
510
|
+
i(this, "id");
|
|
511
|
+
i(this, "logger");
|
|
512
|
+
i(this, "pumpModel");
|
|
513
|
+
i(this, "futureHandler");
|
|
514
|
+
this.id = e, this.logger = r.logger, this.pumpModel = t.companionParent, this.futureHandler = new Fe(this);
|
|
515
|
+
}
|
|
516
|
+
get future() {
|
|
517
|
+
return this.futureHandler.future;
|
|
518
|
+
}
|
|
519
|
+
get name() {
|
|
520
|
+
return this.pumpModel.name;
|
|
521
|
+
}
|
|
522
|
+
get canPour() {
|
|
523
|
+
return this.pumpModel.canPour;
|
|
524
|
+
}
|
|
525
|
+
get isPouring() {
|
|
526
|
+
return this.pumpModel.isPouring;
|
|
527
|
+
}
|
|
528
|
+
async cancelPour() {
|
|
529
|
+
return this.pumpModel.cancelPour();
|
|
530
|
+
}
|
|
531
|
+
performIntent(e) {
|
|
532
|
+
return this.pumpModel.performIntent(e);
|
|
533
|
+
}
|
|
534
|
+
async performElectricalTest() {
|
|
535
|
+
const [e, t] = await kt(this.pumpModel.path);
|
|
536
|
+
return e && or.error(`Failed to perform electrical test on pump ${this.id}`, e), t;
|
|
537
|
+
}
|
|
538
|
+
getChildren() {
|
|
539
|
+
return [...this.futureHandler.allFutures];
|
|
540
|
+
}
|
|
541
|
+
async performPreCalibrate(e) {
|
|
542
|
+
return Qt(this.pumpModel.path, e);
|
|
543
|
+
}
|
|
544
|
+
async performCalibrate(e) {
|
|
545
|
+
return Xt(this.pumpModel.path, e);
|
|
546
|
+
}
|
|
547
|
+
async performVerify(e, t) {
|
|
548
|
+
return Jt(this.pumpModel.path, e, t);
|
|
549
|
+
}
|
|
550
|
+
async performComplete(e, t) {
|
|
551
|
+
return tr(this.pumpModel.path, e, t);
|
|
552
|
+
}
|
|
553
|
+
// -------------------LIFECYCLE----------------------------
|
|
554
|
+
async init() {
|
|
555
|
+
this.logger.debug(`initializing fcm-pump ${this.id}`);
|
|
556
|
+
}
|
|
557
|
+
async load() {
|
|
558
|
+
this.logger.debug(`loading fcm-pump ${this.id}`);
|
|
559
|
+
}
|
|
560
|
+
};
|
|
561
|
+
ae([
|
|
562
|
+
_()
|
|
563
|
+
], N.prototype, "performPreCalibrate", 1);
|
|
564
|
+
ae([
|
|
565
|
+
_()
|
|
566
|
+
], N.prototype, "performCalibrate", 1);
|
|
567
|
+
ae([
|
|
568
|
+
_()
|
|
569
|
+
], N.prototype, "performVerify", 1);
|
|
570
|
+
N = ae([
|
|
571
|
+
f(Ye)
|
|
572
|
+
], N);
|
|
573
|
+
const ir = new $({
|
|
574
|
+
class: N,
|
|
575
|
+
type: Ye
|
|
576
|
+
});
|
|
577
|
+
var sr = Object.defineProperty, nr = Object.getOwnPropertyDescriptor, We = (e, t, r, o) => {
|
|
578
|
+
for (var a = o > 1 ? void 0 : o ? nr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
579
|
+
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
580
|
+
return o && a && sr(t, r, a), a;
|
|
581
|
+
};
|
|
582
|
+
const Ze = "freestyle-assembly-model", lr = "iceAgitator", ur = "carbTank", cr = "remoteTrays";
|
|
583
|
+
let k = class {
|
|
584
|
+
constructor(e, t, r) {
|
|
585
|
+
i(this, "id");
|
|
586
|
+
i(this, "_carbTankModel");
|
|
587
|
+
i(this, "logger");
|
|
588
|
+
i(this, "assembly");
|
|
589
|
+
i(this, "_remoteTrays");
|
|
590
|
+
this.id = e, this.logger = r.logger, this.assembly = t.companionParent;
|
|
591
|
+
}
|
|
592
|
+
get holderGroups() {
|
|
593
|
+
return this.assembly.holderGroups;
|
|
594
|
+
}
|
|
595
|
+
get nozzlePaths() {
|
|
596
|
+
return this.assembly.nozzlePaths;
|
|
597
|
+
}
|
|
598
|
+
get allHolders() {
|
|
599
|
+
return this.assembly.allHolders;
|
|
600
|
+
}
|
|
601
|
+
getHoldersByGroup(e) {
|
|
602
|
+
return this.assembly.getHoldersByGroup(e);
|
|
603
|
+
}
|
|
604
|
+
getHoldersByNozzle(e) {
|
|
605
|
+
return this.assembly.getHoldersByNozzle(e);
|
|
606
|
+
}
|
|
607
|
+
get pumpsByNozzle() {
|
|
608
|
+
return this.assembly.pumpsByNozzle;
|
|
609
|
+
}
|
|
610
|
+
get pumpPaths() {
|
|
611
|
+
return this.assembly.pumpPaths;
|
|
612
|
+
}
|
|
613
|
+
get boards() {
|
|
614
|
+
return this.assembly.boards;
|
|
615
|
+
}
|
|
616
|
+
updateModel(e) {
|
|
617
|
+
return this.assembly.updateModel(e);
|
|
618
|
+
}
|
|
619
|
+
get iceAgitator() {
|
|
620
|
+
return this.assembly.iceAgitator;
|
|
621
|
+
}
|
|
622
|
+
get carbTank() {
|
|
623
|
+
return this._carbTankModel;
|
|
624
|
+
}
|
|
625
|
+
get cartridgeAgitators() {
|
|
626
|
+
return this.assembly.cartridgeAgitators;
|
|
627
|
+
}
|
|
628
|
+
get defaultCartridgeAgitator() {
|
|
629
|
+
return this.assembly.cartridgeAgitators.data[0];
|
|
630
|
+
}
|
|
631
|
+
get cartridgeAgitatorModels() {
|
|
632
|
+
return this.assembly.cartridgeAgitators.data;
|
|
633
|
+
}
|
|
634
|
+
get hasCartridgeAgitators() {
|
|
635
|
+
return this.assembly.cartridgeAgitators.data.length > 0;
|
|
636
|
+
}
|
|
637
|
+
get remoteTrays() {
|
|
638
|
+
return this.assembly.remoteTrays;
|
|
639
|
+
}
|
|
640
|
+
get hasRemoteTrays() {
|
|
641
|
+
return this.assembly.remoteTrays ? this.assembly.remoteTrays.data.length > 0 : !1;
|
|
642
|
+
}
|
|
643
|
+
// -------------------LIFECYCLE----------------------------
|
|
644
|
+
get supportsRemoteTrays() {
|
|
645
|
+
return ne.isFeatureEnabled(cr);
|
|
646
|
+
}
|
|
647
|
+
get supportsIce() {
|
|
648
|
+
return ne.isFeatureEnabled(lr);
|
|
649
|
+
}
|
|
650
|
+
get supportsCarb() {
|
|
651
|
+
return ne.isFeatureEnabled(ur);
|
|
652
|
+
}
|
|
653
|
+
async init() {
|
|
654
|
+
this.logger.debug(`initializing freestyle-assembly ${this.id}`);
|
|
655
|
+
}
|
|
656
|
+
async ready() {
|
|
657
|
+
const e = yt(
|
|
658
|
+
this.assembly,
|
|
659
|
+
Ge.type
|
|
660
|
+
);
|
|
661
|
+
this._carbTankModel = e;
|
|
662
|
+
}
|
|
663
|
+
};
|
|
664
|
+
We([
|
|
665
|
+
Le
|
|
666
|
+
], k.prototype, "_remoteTrays", 2);
|
|
667
|
+
k = We([
|
|
668
|
+
Ne(),
|
|
669
|
+
f(Ze)
|
|
670
|
+
], k);
|
|
671
|
+
const de = new Pe({
|
|
672
|
+
class: k,
|
|
673
|
+
type: Ze
|
|
674
|
+
});
|
|
675
|
+
var dr = Object.defineProperty, pr = Object.getOwnPropertyDescriptor, ke = (e, t, r, o) => {
|
|
676
|
+
for (var a = o > 1 ? void 0 : o ? pr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
677
|
+
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
678
|
+
return o && a && dr(t, r, a), a;
|
|
679
|
+
};
|
|
680
|
+
const Qe = "remote-tray-model";
|
|
681
|
+
x("holderPath");
|
|
682
|
+
const gr = x("configPath");
|
|
683
|
+
let Q = class {
|
|
684
|
+
constructor(e, t, r) {
|
|
685
|
+
/** Unique identifier for the remote tray instance */
|
|
686
|
+
i(this, "id");
|
|
687
|
+
i(this, "logger");
|
|
688
|
+
/** Path reference to the associated holder model */
|
|
689
|
+
i(this, "holderPath");
|
|
690
|
+
/** Configuration path for tray-specific settings */
|
|
691
|
+
i(this, "configPath");
|
|
692
|
+
/** Display name of the remote tray */
|
|
693
|
+
i(this, "name");
|
|
694
|
+
i(this, "remoteTrayEnabled");
|
|
695
|
+
this.id = e, this.logger = r.logger, this.holderPath = t.holderPath, this.configPath = t.configPath, this.name = t.name;
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* Gets the troubles from the associated holder model.
|
|
699
|
+
* Propagates trouble states from the holder to this remote tray.
|
|
700
|
+
*
|
|
701
|
+
* @returns Array of trouble models from the holder, or empty array if no holder
|
|
702
|
+
*/
|
|
703
|
+
get troubles() {
|
|
704
|
+
var e;
|
|
705
|
+
return ((e = this.holder) == null ? void 0 : e.troubles) ?? [];
|
|
706
|
+
}
|
|
707
|
+
/**
|
|
708
|
+
* Gets the highest priority trouble status.
|
|
709
|
+
* Currently returns empty string as troubles are managed by the holder.
|
|
710
|
+
*
|
|
711
|
+
* @returns Empty string (trouble status handled by holder)
|
|
712
|
+
*/
|
|
713
|
+
get troubleStatus() {
|
|
714
|
+
return "";
|
|
715
|
+
}
|
|
716
|
+
/**
|
|
717
|
+
* Gets troubles grouped by type from the associated holder.
|
|
718
|
+
*
|
|
719
|
+
* @returns Record of troubles grouped by type from the holder, or empty object if no holder
|
|
720
|
+
*/
|
|
721
|
+
get troublesByType() {
|
|
722
|
+
var e;
|
|
723
|
+
return ((e = this.holder) == null ? void 0 : e.troublesByType) ?? {};
|
|
724
|
+
}
|
|
725
|
+
/**
|
|
726
|
+
* Updates the model with new configuration options.
|
|
727
|
+
* Can be used to modify the holder path, config path, or name after initialization.
|
|
728
|
+
*
|
|
729
|
+
* @param _options - New configuration options for the remote tray
|
|
730
|
+
*/
|
|
731
|
+
updateModel(e) {
|
|
732
|
+
}
|
|
733
|
+
/**
|
|
734
|
+
* Gets the associated holder model for this remote tray.
|
|
735
|
+
* Uses synchronous model lookup to retrieve the holder by path.
|
|
736
|
+
*
|
|
737
|
+
* @returns The HolderModel instance referenced by holderPath, or undefined if not found
|
|
738
|
+
*/
|
|
739
|
+
get holder() {
|
|
740
|
+
return R(this.holderPath).model;
|
|
741
|
+
}
|
|
742
|
+
/**
|
|
743
|
+
* Determines if the remote tray is currently active.
|
|
744
|
+
* Active state is based on the remoteTrayEnabled configuration property.
|
|
745
|
+
*
|
|
746
|
+
* @returns true if the tray is enabled, false otherwise
|
|
747
|
+
*/
|
|
748
|
+
get active() {
|
|
749
|
+
return !!this.remoteTrayEnabled.value;
|
|
750
|
+
}
|
|
751
|
+
// -------------------LIFECYCLE----------------------------
|
|
752
|
+
/**
|
|
753
|
+
* Initializes the remote tray model.
|
|
754
|
+
* Called during the model lifecycle initialization phase.
|
|
755
|
+
* Sets up initial state and prepares the model for use.
|
|
756
|
+
*
|
|
757
|
+
* @returns Promise that resolves when initialization is complete
|
|
758
|
+
*/
|
|
759
|
+
async init() {
|
|
760
|
+
this.logger.debug(`initializing remote-tray ${this.id}`);
|
|
761
|
+
}
|
|
762
|
+
/**
|
|
763
|
+
* Loads the remote tray configuration and associated data.
|
|
764
|
+
* Called during the model lifecycle load phase.
|
|
765
|
+
* Typically loads configuration settings and establishes holder references.
|
|
766
|
+
*
|
|
767
|
+
* @returns Promise that resolves when loading is complete
|
|
768
|
+
*/
|
|
769
|
+
async load() {
|
|
770
|
+
this.logger.debug(`loading remote-tray ${this.id}`);
|
|
771
|
+
}
|
|
772
|
+
};
|
|
773
|
+
ke([
|
|
774
|
+
b({
|
|
775
|
+
path: gr,
|
|
776
|
+
attribute: "enabled"
|
|
777
|
+
})
|
|
778
|
+
], Q.prototype, "remoteTrayEnabled", 2);
|
|
779
|
+
Q = ke([
|
|
780
|
+
f(Qe)
|
|
781
|
+
], Q);
|
|
782
|
+
const V = new $({
|
|
783
|
+
class: Q,
|
|
784
|
+
type: Qe
|
|
785
|
+
});
|
|
786
|
+
var hr = Object.getOwnPropertyDescriptor, fr = (e, t, r, o) => {
|
|
787
|
+
for (var a = o > 1 ? void 0 : o ? hr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
788
|
+
(s = e[n]) && (a = s(a) || a);
|
|
789
|
+
return a;
|
|
790
|
+
};
|
|
791
|
+
const Xe = "remote-tray-container-model";
|
|
792
|
+
let pe = class {
|
|
793
|
+
constructor(e) {
|
|
794
|
+
i(this, "id");
|
|
795
|
+
this.id = e;
|
|
796
|
+
}
|
|
797
|
+
};
|
|
798
|
+
pe = fr([
|
|
799
|
+
f(Xe),
|
|
800
|
+
ee(),
|
|
801
|
+
bt()
|
|
802
|
+
], pe);
|
|
803
|
+
const Ce = new Pe({
|
|
804
|
+
class: pe,
|
|
805
|
+
type: Xe
|
|
806
|
+
});
|
|
807
|
+
Ce.addRelatedModel(V);
|
|
808
|
+
var mr = Object.getOwnPropertyDescriptor, yr = (e, t, r, o) => {
|
|
809
|
+
for (var a = o > 1 ? void 0 : o ? mr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
810
|
+
(s = e[n]) && (a = s(a) || a);
|
|
811
|
+
return a;
|
|
812
|
+
};
|
|
813
|
+
const Je = "freestyle-holder-model";
|
|
814
|
+
function br(e) {
|
|
815
|
+
const t = Pt.getContext(e), r = t == null ? void 0 : t.get(
|
|
816
|
+
de.type
|
|
817
|
+
);
|
|
818
|
+
if (!r) {
|
|
819
|
+
C.error("Freestyle assembly not found");
|
|
820
|
+
return;
|
|
821
|
+
}
|
|
822
|
+
return r;
|
|
823
|
+
}
|
|
824
|
+
async function Pr(e, t) {
|
|
825
|
+
if (!e || !t)
|
|
826
|
+
return;
|
|
827
|
+
const r = await e[t]();
|
|
828
|
+
if (r != null && r.tracker)
|
|
829
|
+
return y.getFuture(r.tracker);
|
|
830
|
+
}
|
|
831
|
+
let ge = class {
|
|
832
|
+
constructor(e, t, r) {
|
|
833
|
+
i(this, "id");
|
|
834
|
+
i(this, "logger");
|
|
835
|
+
i(this, "holder");
|
|
836
|
+
i(this, "context");
|
|
837
|
+
i(this, "future");
|
|
838
|
+
this.id = e, this.logger = r.logger, this.context = r.kosContext, this.holder = t.companionParent;
|
|
839
|
+
}
|
|
840
|
+
get agitated() {
|
|
841
|
+
return this.holder.data.agitated;
|
|
842
|
+
}
|
|
843
|
+
async agitate() {
|
|
844
|
+
if (!this.holder.data.agitated)
|
|
845
|
+
return;
|
|
846
|
+
this.future = void 0;
|
|
847
|
+
const e = br(this.id);
|
|
848
|
+
if (!e)
|
|
849
|
+
return;
|
|
850
|
+
if (!e.defaultCartridgeAgitator) {
|
|
851
|
+
this.logger.error("Agitator not found");
|
|
852
|
+
return;
|
|
853
|
+
}
|
|
854
|
+
return this.future = await Pr(
|
|
855
|
+
e.defaultCartridgeAgitator,
|
|
856
|
+
"testAgitate"
|
|
857
|
+
), this.future;
|
|
858
|
+
}
|
|
859
|
+
get isRemote() {
|
|
860
|
+
const e = `${V.type}-${this.holder.path}`, t = R(e);
|
|
861
|
+
return t != null && t.model ? !!t.model.remoteTrayEnabled.value : !1;
|
|
862
|
+
}
|
|
863
|
+
// -------------------LIFECYCLE----------------------------
|
|
864
|
+
async init() {
|
|
865
|
+
this.logger.debug(`initializing freestyle-holder ${this.id}`);
|
|
866
|
+
}
|
|
867
|
+
async load() {
|
|
868
|
+
this.logger.debug(`loading freestyle-holder ${this.id}`);
|
|
869
|
+
}
|
|
870
|
+
};
|
|
871
|
+
ge = yr([
|
|
872
|
+
f(Je)
|
|
873
|
+
], ge);
|
|
874
|
+
const Oe = new $({
|
|
875
|
+
class: ge,
|
|
876
|
+
type: Je
|
|
877
|
+
}), { URL: vr } = w("FREESTYLE-NOZZLE_SERVICE"), { getOne: Tr } = S.build({
|
|
878
|
+
basePath: `${vr}/api/freestyle-nozzle`
|
|
879
|
+
}), H = C.createLogger({
|
|
880
|
+
name: "freestyle-nozzle-service",
|
|
881
|
+
group: "Services"
|
|
882
|
+
});
|
|
883
|
+
class Ir extends Error {
|
|
884
|
+
constructor(t) {
|
|
885
|
+
super(t), this.name = "NutritionInfoError";
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
class Ae extends Error {
|
|
889
|
+
constructor(t) {
|
|
890
|
+
super(t), this.name = "InvalidRequestError";
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
const _r = async (e, t, r, o = "http://localhost:8081") => {
|
|
894
|
+
if (H.debug("sending GET for freestyle-nozzle"), !t)
|
|
895
|
+
throw H.error("Invalid freestyle-nozzle request: beverageId is required"), new Ae("No beverageId provided");
|
|
896
|
+
if (!r || r.length === 0)
|
|
897
|
+
throw H.error("Invalid freestyle-nozzle request: volumes are required"), new Ae("No volumes provided");
|
|
898
|
+
const a = await Tr({
|
|
899
|
+
urlOverride: `${o}${e}/pipeline/beverage/engine/nutrition/${t}?volumes=${r.join(
|
|
900
|
+
","
|
|
901
|
+
)}`
|
|
902
|
+
});
|
|
903
|
+
if (!(a != null && a.data))
|
|
904
|
+
throw H.error("Failed to retrieve freestyle-nozzle data"), new Error("Failed to retrieve freestyle-nozzle data");
|
|
905
|
+
if (a.data.error)
|
|
906
|
+
throw new Ir(a.data.error);
|
|
907
|
+
return a.data;
|
|
908
|
+
};
|
|
909
|
+
var Cr = Object.defineProperty, $r = Object.getOwnPropertyDescriptor, et = (e, t, r, o) => {
|
|
910
|
+
for (var a = o > 1 ? void 0 : o ? $r(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
911
|
+
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
912
|
+
return o && a && Cr(t, r, a), a;
|
|
913
|
+
};
|
|
914
|
+
const tt = "freestyle-nozzle-model";
|
|
915
|
+
let X = class {
|
|
916
|
+
constructor(e, t, r) {
|
|
917
|
+
i(this, "id");
|
|
918
|
+
i(this, "logger");
|
|
919
|
+
i(this, "nozzleModel");
|
|
920
|
+
i(this, "_cupSizes");
|
|
921
|
+
i(this, "_nutritionInfo");
|
|
922
|
+
this.id = e, this.logger = r.logger, this.nozzleModel = t.companionParent, this._cupSizes = [100];
|
|
923
|
+
}
|
|
924
|
+
set cupSizes(e) {
|
|
925
|
+
this._cupSizes = e;
|
|
926
|
+
}
|
|
927
|
+
get nutritionInfo() {
|
|
928
|
+
return this._nutritionInfo;
|
|
929
|
+
}
|
|
930
|
+
get selectedPourable() {
|
|
931
|
+
return this.nozzleModel.selectedPourable;
|
|
932
|
+
}
|
|
933
|
+
async handleBeverageSelection() {
|
|
934
|
+
if (this.nozzleModel.selectedPourable.beverage && this._cupSizes.length) {
|
|
935
|
+
this.logger.debug(
|
|
936
|
+
`selected beverage: ${this.nozzleModel.selectedPourable.beverage.rawId}. Volume: ${this._cupSizes.join(", ")}`
|
|
937
|
+
);
|
|
938
|
+
const e = this.nozzleModel.selectedPourable.beverage.rawId, t = this.nozzleModel.urlPrefix;
|
|
939
|
+
try {
|
|
940
|
+
const r = await _r(
|
|
941
|
+
t,
|
|
942
|
+
e,
|
|
943
|
+
this._cupSizes
|
|
944
|
+
);
|
|
945
|
+
K(() => {
|
|
946
|
+
this._nutritionInfo = r;
|
|
947
|
+
});
|
|
948
|
+
} catch (r) {
|
|
949
|
+
this.logger.error(`Error fetching nutrition info: ${r}`);
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
// -------------------LIFECYCLE----------------------------
|
|
954
|
+
async init() {
|
|
955
|
+
this.logger.debug(`initializing freestyle-nozzle ${this.id}`);
|
|
956
|
+
}
|
|
957
|
+
unload() {
|
|
958
|
+
this.logger.debug(`unloading freestyle-nozzle ${this.id}`);
|
|
959
|
+
}
|
|
960
|
+
async load() {
|
|
961
|
+
this.logger.debug(`loading freestyle-nozzle ${this.id}`);
|
|
962
|
+
}
|
|
963
|
+
};
|
|
964
|
+
et([
|
|
965
|
+
be({
|
|
966
|
+
dependencies: (e) => [
|
|
967
|
+
e.selectedPourable.beverage
|
|
968
|
+
]
|
|
969
|
+
})
|
|
970
|
+
], X.prototype, "handleBeverageSelection", 1);
|
|
971
|
+
X = et([
|
|
972
|
+
Ne(),
|
|
973
|
+
f(tt)
|
|
974
|
+
], X);
|
|
975
|
+
const we = new $({
|
|
976
|
+
class: X,
|
|
977
|
+
type: tt
|
|
978
|
+
}), { URL: rt } = w("PUMP_SERVICE"), { postModel: Er } = S.build({
|
|
979
|
+
basePath: `${rt}/api/ext/freestyle/microCalibration`
|
|
980
|
+
}), ce = C.createLogger({
|
|
981
|
+
name: "freestyle-pump-service",
|
|
982
|
+
group: "Services"
|
|
983
|
+
}), Or = async (e, t) => {
|
|
984
|
+
var r, o, a, n, s;
|
|
985
|
+
ce.debug(
|
|
986
|
+
`replacePump - sending POST request to /api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
|
|
987
|
+
);
|
|
988
|
+
try {
|
|
989
|
+
const u = await Er({
|
|
990
|
+
model: {},
|
|
991
|
+
urlOverride: `${rt}/api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
|
|
992
|
+
});
|
|
993
|
+
return ce.debug("replacePump - response:", u), ((u == null ? void 0 : u.status) === 200 || (u == null ? void 0 : u.status) === 499) && ((r = u.data) != null && r.error) ? [u.data.error || "unknownError", u.data] : [void 0, u == null ? void 0 : u.data];
|
|
994
|
+
} catch (u) {
|
|
995
|
+
if (ce.error(
|
|
996
|
+
`replacePump - sending POST request to /api/cal/${e}/code/${t}`,
|
|
997
|
+
u
|
|
998
|
+
), u instanceof ve) {
|
|
999
|
+
const A = ((a = (o = u.payload) == null ? void 0 : o.data) == null ? void 0 : a.error) || ((n = u.payload) == null ? void 0 : n.error) || "unknownError";
|
|
1000
|
+
return [A, ((s = u.payload) == null ? void 0 : s.data) || { error: A }];
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
return ["unknownError", { error: "unknownError" }];
|
|
1004
|
+
};
|
|
1005
|
+
var Ar = Object.getOwnPropertyDescriptor, wr = (e, t, r, o) => {
|
|
1006
|
+
for (var a = o > 1 ? void 0 : o ? Ar(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1007
|
+
(s = e[n]) && (a = s(a) || a);
|
|
1008
|
+
return a;
|
|
1009
|
+
};
|
|
1010
|
+
const at = "freestyle-pump-model";
|
|
1011
|
+
let he = class {
|
|
1012
|
+
constructor(e, t, r) {
|
|
1013
|
+
i(this, "id");
|
|
1014
|
+
i(this, "logger");
|
|
1015
|
+
i(this, "pump");
|
|
1016
|
+
this.id = e, this.logger = r.logger, this.pump = t.companionParent;
|
|
1017
|
+
}
|
|
1018
|
+
// -------------------LIFECYCLE----------------------------
|
|
1019
|
+
async replacePump(e) {
|
|
1020
|
+
const [t, r] = await Or(this.pump.path, e);
|
|
1021
|
+
return t && this.logger.error(`Failed to replace the pump, ${this.pump.id}`, t), [t, r];
|
|
1022
|
+
}
|
|
1023
|
+
};
|
|
1024
|
+
he = wr([
|
|
1025
|
+
f(at)
|
|
1026
|
+
], he);
|
|
1027
|
+
const Se = new $({
|
|
1028
|
+
class: he,
|
|
1029
|
+
type: at
|
|
1030
|
+
}), { URL: L } = w("ICE_AGITATOR_SERVICE"), { getAll: ot, postModel: oe } = S.build({
|
|
1031
|
+
basePath: `${L}/api/ext/freestyle/ice`
|
|
1032
|
+
}), it = C.createLogger({
|
|
1033
|
+
name: "ice-agitator-service",
|
|
1034
|
+
group: "Services"
|
|
1035
|
+
}), Sr = async (e) => (it.debug("sending GET for ice types"), await ot({
|
|
1036
|
+
urlOverride: `${L}/api/handle/${e}/types`
|
|
1037
|
+
})), Mr = async (e, t) => (it.debug("sending POST for ice types"), await oe({
|
|
1038
|
+
urlOverride: `${L}/api/handle/${e}/type/${t}`,
|
|
1039
|
+
model: {}
|
|
1040
|
+
})), Rr = async (e) => await ot({
|
|
1041
|
+
urlOverride: `${L}/api/kos/config/details/${e}/4`
|
|
1042
|
+
}), Dr = async (e, t) => {
|
|
1043
|
+
const r = await oe({
|
|
1044
|
+
model: {},
|
|
1045
|
+
tracker: t,
|
|
1046
|
+
urlOverride: `${L}/api/handle/${e}/pour`
|
|
1047
|
+
});
|
|
1048
|
+
if (!(r != null && r.data))
|
|
1049
|
+
throw new Error("No response from server");
|
|
1050
|
+
return r == null ? void 0 : r.data;
|
|
1051
|
+
}, Lr = async (e, t) => {
|
|
1052
|
+
const r = await oe({
|
|
1053
|
+
model: {},
|
|
1054
|
+
tracker: t,
|
|
1055
|
+
urlOverride: `${L}/api/handle/${e}/test/agitation`
|
|
1056
|
+
});
|
|
1057
|
+
if (!(r != null && r.data))
|
|
1058
|
+
throw new Error("No response from server");
|
|
1059
|
+
return r == null ? void 0 : r.data;
|
|
1060
|
+
}, Fr = async (e, t) => {
|
|
1061
|
+
const r = await oe({
|
|
1062
|
+
model: {},
|
|
1063
|
+
tracker: t,
|
|
1064
|
+
urlOverride: `${L}/api/handle/${e}/test/gate`
|
|
1065
|
+
});
|
|
1066
|
+
if (!(r != null && r.data))
|
|
1067
|
+
throw new Error("No response from server");
|
|
1068
|
+
return r == null ? void 0 : r.data;
|
|
1069
|
+
};
|
|
1070
|
+
var Nr = Object.defineProperty, zr = Object.getOwnPropertyDescriptor, p = (e, t, r, o) => {
|
|
1071
|
+
for (var a = o > 1 ? void 0 : o ? zr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1072
|
+
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
1073
|
+
return o && a && Nr(t, r, a), a;
|
|
1074
|
+
};
|
|
1075
|
+
class J {
|
|
1076
|
+
}
|
|
1077
|
+
i(J, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/ice-agitation-started"), i(J, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/ice-agitation-ended");
|
|
1078
|
+
const st = "ice-agitator-model", nt = x("statePath");
|
|
1079
|
+
let c = class {
|
|
1080
|
+
constructor(e, t, r) {
|
|
1081
|
+
i(this, "id");
|
|
1082
|
+
i(this, "name");
|
|
1083
|
+
i(this, "path");
|
|
1084
|
+
i(this, "volWithoutIceMl");
|
|
1085
|
+
i(this, "durationSec");
|
|
1086
|
+
i(this, "enableIceChuteClear");
|
|
1087
|
+
i(this, "iceChuteClearDurationMs");
|
|
1088
|
+
i(this, "iceChuteClearIntervalSec");
|
|
1089
|
+
i(this, "iceChuteClearRetryIntervalSec");
|
|
1090
|
+
i(this, "maxDispenseSec");
|
|
1091
|
+
i(this, "type");
|
|
1092
|
+
i(this, "dilutionOffset");
|
|
1093
|
+
i(this, "inactivitySec");
|
|
1094
|
+
i(this, "agitating");
|
|
1095
|
+
i(this, "iceChuteOpen");
|
|
1096
|
+
i(this, "statePath");
|
|
1097
|
+
i(this, "_allIceTypes");
|
|
1098
|
+
i(this, "logger");
|
|
1099
|
+
i(this, "currentState", d.IDLE);
|
|
1100
|
+
i(this, "resetDefaultValues", async () => await Rr(this.path));
|
|
1101
|
+
this.id = e, this.name = t.name, this.path = t.path, this.statePath = t.statePath, this._allIceTypes = [], this.logger = r.logger;
|
|
1102
|
+
}
|
|
1103
|
+
get iceTypes() {
|
|
1104
|
+
return this._allIceTypes;
|
|
1105
|
+
}
|
|
1106
|
+
get isAgitating() {
|
|
1107
|
+
return !!this.agitating.value;
|
|
1108
|
+
}
|
|
1109
|
+
get isIceChuteOpen() {
|
|
1110
|
+
return !!this.iceChuteOpen.value;
|
|
1111
|
+
}
|
|
1112
|
+
// future, pourFuture, agitateFuture, gateFuture getters are now provided by @kosMultipleFutureAware decorator
|
|
1113
|
+
/**
|
|
1114
|
+
* A derived value that indicates if the nozzle is currently pouring a beverage.
|
|
1115
|
+
* @readonly
|
|
1116
|
+
*/
|
|
1117
|
+
get isPouring() {
|
|
1118
|
+
var e;
|
|
1119
|
+
return !!(this.pourFuture && !((e = this.pourFuture) != null && e.endState)) || this.currentState === d.POUR_STARTING || this.currentState === d.POURING || this.currentState === d.POUR_CANCELING;
|
|
1120
|
+
}
|
|
1121
|
+
/**
|
|
1122
|
+
* A derived value that indicates if it is possible to dispense ice.
|
|
1123
|
+
*
|
|
1124
|
+
* The value is observable and will change as the current dispense state changes
|
|
1125
|
+
* @readonly
|
|
1126
|
+
* */
|
|
1127
|
+
get canPour() {
|
|
1128
|
+
return this.currentState === d.IDLE;
|
|
1129
|
+
}
|
|
1130
|
+
updateIfCurrent(e, t) {
|
|
1131
|
+
this.currentState === e && K(() => {
|
|
1132
|
+
this.currentState = t;
|
|
1133
|
+
});
|
|
1134
|
+
}
|
|
1135
|
+
async pourIce(e) {
|
|
1136
|
+
try {
|
|
1137
|
+
if (this.currentState === d.IDLE) {
|
|
1138
|
+
if (this.updateIfCurrent(d.IDLE, d.POUR_STARTING), !e)
|
|
1139
|
+
throw new Error("No tracker provided");
|
|
1140
|
+
const t = await Dr(this.path, e);
|
|
1141
|
+
return this.updateIfCurrent(d.POUR_STARTING, d.POURING), t != null && t.endState && this.updateIfCurrent(d.POURING, d.IDLE), t;
|
|
1142
|
+
} else
|
|
1143
|
+
throw new Error(`Cannot pour in state ${this.currentState}`);
|
|
1144
|
+
} catch (t) {
|
|
1145
|
+
throw this.logger.error(t), this.currentState = d.IDLE, t;
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
/**
|
|
1149
|
+
* An action that will cancel the ice dispense if it is currently in progress.
|
|
1150
|
+
* */
|
|
1151
|
+
async cancelIceDispense() {
|
|
1152
|
+
var e;
|
|
1153
|
+
this.currentState === d.POURING || this.currentState === d.POUR_STARTING ? (this.currentState = d.POUR_CANCELING, await ((e = this.pourFuture) == null ? void 0 : e.cancelFuture()), K(() => {
|
|
1154
|
+
this.currentState = d.IDLE;
|
|
1155
|
+
})) : this.logger.warn(
|
|
1156
|
+
`Cannot cancel ice dispense in state ${this.currentState}`
|
|
1157
|
+
);
|
|
1158
|
+
}
|
|
1159
|
+
async testAgitate(e) {
|
|
1160
|
+
if (!e)
|
|
1161
|
+
throw new Error("No tracker provided");
|
|
1162
|
+
return this.logger.info(`agitating ice-agitator ${this.id}`), Lr(this.path, e);
|
|
1163
|
+
}
|
|
1164
|
+
async testGate(e) {
|
|
1165
|
+
if (!e)
|
|
1166
|
+
throw new Error("No tracker provided");
|
|
1167
|
+
return this.logger.info(`testing ice gate: ${this.id}`), Fr(this.path, e);
|
|
1168
|
+
}
|
|
1169
|
+
handleAgitationChange() {
|
|
1170
|
+
var e;
|
|
1171
|
+
this.isAgitating ? (this.logger.info(`agitating ice-agitator ${this.id}`), Y.publish(J.TOPIC_AGITATION_STARTED, {
|
|
1172
|
+
path: this.path,
|
|
1173
|
+
futureId: (e = this.futureHandler.future) == null ? void 0 : e.futureId
|
|
1174
|
+
})) : Y.publish(J.TOPIC_AGITATION_ENDED, {
|
|
1175
|
+
path: this.path
|
|
1176
|
+
});
|
|
1177
|
+
}
|
|
1178
|
+
async updateIceType(e) {
|
|
1179
|
+
await Mr(this.path, e);
|
|
1180
|
+
}
|
|
1181
|
+
async init() {
|
|
1182
|
+
this.logger.debug(`initializing ice-agitator ${this.id}`);
|
|
1183
|
+
}
|
|
1184
|
+
async load() {
|
|
1185
|
+
this.logger.debug(`loading ice-agitator ${this.id}`);
|
|
1186
|
+
const e = await Sr(this.path);
|
|
1187
|
+
(e == null ? void 0 : e.status) === 200 && K(() => {
|
|
1188
|
+
this._allIceTypes = e.data || [];
|
|
1189
|
+
});
|
|
1190
|
+
}
|
|
1191
|
+
};
|
|
1192
|
+
p([
|
|
1193
|
+
b({
|
|
1194
|
+
path: E,
|
|
1195
|
+
attribute: "settings.volWithoutIceMl"
|
|
1196
|
+
})
|
|
1197
|
+
], c.prototype, "volWithoutIceMl", 2);
|
|
1198
|
+
p([
|
|
1199
|
+
b({
|
|
1200
|
+
path: E,
|
|
1201
|
+
attribute: "settings.durationSec",
|
|
1202
|
+
converter: {
|
|
1203
|
+
to: "second"
|
|
1204
|
+
}
|
|
1205
|
+
})
|
|
1206
|
+
], c.prototype, "durationSec", 2);
|
|
1207
|
+
p([
|
|
1208
|
+
b({
|
|
1209
|
+
path: E,
|
|
1210
|
+
attribute: "enableIceChuteClear"
|
|
1211
|
+
})
|
|
1212
|
+
], c.prototype, "enableIceChuteClear", 2);
|
|
1213
|
+
p([
|
|
1214
|
+
b({
|
|
1215
|
+
path: E,
|
|
1216
|
+
attribute: "iceChuteClearDurationMs"
|
|
1217
|
+
})
|
|
1218
|
+
], c.prototype, "iceChuteClearDurationMs", 2);
|
|
1219
|
+
p([
|
|
1220
|
+
b({
|
|
1221
|
+
path: E,
|
|
1222
|
+
attribute: "iceChuteClearIntervalSec"
|
|
1223
|
+
})
|
|
1224
|
+
], c.prototype, "iceChuteClearIntervalSec", 2);
|
|
1225
|
+
p([
|
|
1226
|
+
b({
|
|
1227
|
+
path: E,
|
|
1228
|
+
attribute: "iceChuteClearRetryIntervalSec"
|
|
1229
|
+
})
|
|
1230
|
+
], c.prototype, "iceChuteClearRetryIntervalSec", 2);
|
|
1231
|
+
p([
|
|
1232
|
+
b({
|
|
1233
|
+
path: E,
|
|
1234
|
+
attribute: "maxDispenseSec"
|
|
1235
|
+
})
|
|
1236
|
+
], c.prototype, "maxDispenseSec", 2);
|
|
1237
|
+
p([
|
|
1238
|
+
b({
|
|
1239
|
+
path: E,
|
|
1240
|
+
attribute: "type"
|
|
1241
|
+
})
|
|
1242
|
+
], c.prototype, "type", 2);
|
|
1243
|
+
p([
|
|
1244
|
+
b({
|
|
1245
|
+
path: E,
|
|
1246
|
+
attribute: "settings.dilutionOffset"
|
|
1247
|
+
})
|
|
1248
|
+
], c.prototype, "dilutionOffset", 2);
|
|
1249
|
+
p([
|
|
1250
|
+
b({
|
|
1251
|
+
path: E,
|
|
1252
|
+
attribute: "settings.inactivitySec",
|
|
1253
|
+
converter: {
|
|
1254
|
+
to: "minute"
|
|
1255
|
+
}
|
|
1256
|
+
})
|
|
1257
|
+
], c.prototype, "inactivitySec", 2);
|
|
1258
|
+
p([
|
|
1259
|
+
O({ path: nt, attribute: "agitating" })
|
|
1260
|
+
], c.prototype, "agitating", 2);
|
|
1261
|
+
p([
|
|
1262
|
+
O({ path: nt, attribute: "iceChuteOpen" })
|
|
1263
|
+
], c.prototype, "iceChuteOpen", 2);
|
|
1264
|
+
p([
|
|
1265
|
+
_({ alias: "pour" })
|
|
1266
|
+
], c.prototype, "pourIce", 1);
|
|
1267
|
+
p([
|
|
1268
|
+
_({ alias: "agitate" })
|
|
1269
|
+
], c.prototype, "testAgitate", 1);
|
|
1270
|
+
p([
|
|
1271
|
+
_({
|
|
1272
|
+
alias: "gate"
|
|
1273
|
+
})
|
|
1274
|
+
], c.prototype, "testGate", 1);
|
|
1275
|
+
p([
|
|
1276
|
+
be({
|
|
1277
|
+
dependencies: (e) => [e.isAgitating]
|
|
1278
|
+
})
|
|
1279
|
+
], c.prototype, "handleAgitationChange", 1);
|
|
1280
|
+
c = p([
|
|
1281
|
+
f(st),
|
|
1282
|
+
vt()
|
|
1283
|
+
], c);
|
|
1284
|
+
const lt = new $({
|
|
1285
|
+
class: c,
|
|
1286
|
+
type: st
|
|
1287
|
+
});
|
|
1288
|
+
var xr = Object.getOwnPropertyDescriptor, Ur = (e, t, r, o) => {
|
|
1289
|
+
for (var a = o > 1 ? void 0 : o ? xr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1290
|
+
(s = e[n]) && (a = s(a) || a);
|
|
1291
|
+
return a;
|
|
1292
|
+
};
|
|
1293
|
+
const ut = "lfcv-pump-model";
|
|
1294
|
+
let fe = class {
|
|
1295
|
+
constructor(e, t, r) {
|
|
1296
|
+
i(this, "id");
|
|
1297
|
+
i(this, "logger");
|
|
1298
|
+
i(this, "pumpModel");
|
|
1299
|
+
this.id = e, this.logger = r.logger, this.pumpModel = t.companionParent;
|
|
1300
|
+
}
|
|
1301
|
+
get name() {
|
|
1302
|
+
return this.pumpModel.name;
|
|
1303
|
+
}
|
|
1304
|
+
get canPour() {
|
|
1305
|
+
return this.pumpModel.canPour;
|
|
1306
|
+
}
|
|
1307
|
+
get isPouring() {
|
|
1308
|
+
return this.pumpModel.isPouring;
|
|
1309
|
+
}
|
|
1310
|
+
async cancelPour() {
|
|
1311
|
+
return this.pumpModel.cancelPour();
|
|
1312
|
+
}
|
|
1313
|
+
performIntent(e) {
|
|
1314
|
+
return this.pumpModel.performIntent(e);
|
|
1315
|
+
}
|
|
1316
|
+
// -------------------LIFECYCLE----------------------------
|
|
1317
|
+
async init() {
|
|
1318
|
+
this.logger.debug(`initializing lfcv-pump ${this.id}`);
|
|
1319
|
+
}
|
|
1320
|
+
async load() {
|
|
1321
|
+
this.logger.debug(`loading lfcv-pump ${this.id}`);
|
|
1322
|
+
}
|
|
1323
|
+
};
|
|
1324
|
+
fe = Ur([
|
|
1325
|
+
f(ut)
|
|
1326
|
+
], fe);
|
|
1327
|
+
const Gr = new $({
|
|
1328
|
+
class: fe,
|
|
1329
|
+
type: ut
|
|
1330
|
+
}), { URL: Vr } = w("LFCV-PUMP_SERVICE"), { getAll: jr } = S.build({
|
|
1331
|
+
basePath: `${Vr}/api/lfcv-pump`
|
|
1332
|
+
}), qr = C.createLogger({
|
|
1333
|
+
name: "lfcv-pump-service",
|
|
1334
|
+
group: "Services"
|
|
1335
|
+
}), ua = async () => (qr.debug("sending GET for lfcv-pump"), await jr({})), { URL: B } = w("SPM-PUMP_SERVICE"), { postModel: ie } = S.build({
|
|
1336
|
+
basePath: `${B}/api/spm-pump`
|
|
1337
|
+
}), T = C.createLogger({
|
|
1338
|
+
name: "spm-pump-service",
|
|
1339
|
+
group: "Services"
|
|
1340
|
+
}), Br = async (e, t) => {
|
|
1341
|
+
T.debug(
|
|
1342
|
+
`performPreCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`
|
|
1343
|
+
);
|
|
1344
|
+
try {
|
|
1345
|
+
const r = await ie({
|
|
1346
|
+
model: {},
|
|
1347
|
+
urlOverride: `${B}/api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`,
|
|
1348
|
+
tracker: t
|
|
1349
|
+
});
|
|
1350
|
+
return T.debug("performPreCalibrate - response:", r), r != null && r.data && y.initiateFuture(r.data), r == null ? void 0 : r.data;
|
|
1351
|
+
} catch (r) {
|
|
1352
|
+
T.error(
|
|
1353
|
+
`performPreCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`,
|
|
1354
|
+
r
|
|
1355
|
+
);
|
|
1356
|
+
const o = {
|
|
1357
|
+
id: t || "",
|
|
1358
|
+
endState: U.Fail,
|
|
1359
|
+
tracker: t,
|
|
1360
|
+
reason: "Failed to resolve trouble"
|
|
1361
|
+
};
|
|
1362
|
+
return y.initiateFuture(o), o;
|
|
1363
|
+
}
|
|
1364
|
+
}, Hr = async (e, t) => {
|
|
1365
|
+
T.debug(
|
|
1366
|
+
`performCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/calibrate`
|
|
1367
|
+
);
|
|
1368
|
+
try {
|
|
1369
|
+
const r = await ie({
|
|
1370
|
+
model: {},
|
|
1371
|
+
urlOverride: `${B}/api/ext/freestyle/microCalibration/pour/${e}/calibrate`,
|
|
1372
|
+
tracker: t
|
|
1373
|
+
});
|
|
1374
|
+
return T.debug("performCalibrate - response:", r), r != null && r.data && y.initiateFuture(r.data), r == null ? void 0 : r.data;
|
|
1375
|
+
} catch (r) {
|
|
1376
|
+
T.error(
|
|
1377
|
+
`performCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/calibrate`,
|
|
1378
|
+
r
|
|
1379
|
+
);
|
|
1380
|
+
const o = {
|
|
1381
|
+
id: t || "",
|
|
1382
|
+
endState: U.Fail,
|
|
1383
|
+
tracker: t,
|
|
1384
|
+
reason: "Failed to resolve trouble"
|
|
1385
|
+
};
|
|
1386
|
+
return y.initiateFuture(o), o;
|
|
1387
|
+
}
|
|
1388
|
+
}, Kr = async (e, t, r, o) => {
|
|
1389
|
+
T.debug(
|
|
1390
|
+
`performVerify - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/verify`
|
|
1391
|
+
);
|
|
1392
|
+
try {
|
|
1393
|
+
const a = await ie({
|
|
1394
|
+
model: {
|
|
1395
|
+
...r,
|
|
1396
|
+
// commandedCalibrationVolume: 0,
|
|
1397
|
+
measuredCalibrationVolume: t
|
|
1398
|
+
// measuredVerificationVolume: 0,
|
|
1399
|
+
// newCalibrationValue: 0,
|
|
1400
|
+
// pouredCalibrationVolume: 0,
|
|
1401
|
+
},
|
|
1402
|
+
urlOverride: `${B}/api/ext/freestyle/microCalibration/pour/${e}/verify`,
|
|
1403
|
+
tracker: o
|
|
1404
|
+
});
|
|
1405
|
+
return T.debug("performVerify - response:", a), a != null && a.data && y.initiateFuture(a.data), a == null ? void 0 : a.data;
|
|
1406
|
+
} catch (a) {
|
|
1407
|
+
T.error(
|
|
1408
|
+
`performVerify - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/verify`,
|
|
1409
|
+
a
|
|
1410
|
+
);
|
|
1411
|
+
const n = {
|
|
1412
|
+
id: o || "",
|
|
1413
|
+
endState: U.Fail,
|
|
1414
|
+
tracker: o,
|
|
1415
|
+
reason: "Failed to resolve trouble"
|
|
1416
|
+
};
|
|
1417
|
+
return y.initiateFuture(n), n;
|
|
1418
|
+
}
|
|
1419
|
+
}, Yr = async (e, t, r, o) => {
|
|
1420
|
+
var a, n, s, u, A;
|
|
1421
|
+
T.debug(
|
|
1422
|
+
`performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`
|
|
1423
|
+
);
|
|
1424
|
+
try {
|
|
1425
|
+
const l = await ie({
|
|
1426
|
+
model: {
|
|
1427
|
+
...o,
|
|
1428
|
+
// commandedCalibrationVolume: 0,
|
|
1429
|
+
measuredCalibrationVolume: t,
|
|
1430
|
+
measuredVerificationVolume: r
|
|
1431
|
+
// newCalibrationValue: 0,
|
|
1432
|
+
// pouredCalibrationVolume: 0,
|
|
1433
|
+
},
|
|
1434
|
+
urlOverride: `${B}/api/ext/freestyle/microCalibration/pour/${e}/complete`
|
|
1435
|
+
});
|
|
1436
|
+
return T.debug("performComplete - response:", l), ((l == null ? void 0 : l.status) === 200 || (l == null ? void 0 : l.status) === 499) && ((a = l.data) != null && a.error) ? [l.data.error || "unknownError", l.data] : [void 0, l == null ? void 0 : l.data];
|
|
1437
|
+
} catch (l) {
|
|
1438
|
+
if (T.error(
|
|
1439
|
+
`performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`,
|
|
1440
|
+
l
|
|
1441
|
+
), l instanceof ve) {
|
|
1442
|
+
const v = ((s = (n = l.payload) == null ? void 0 : n.data) == null ? void 0 : s.error) || ((u = l.payload) == null ? void 0 : u.error) || "unknownError";
|
|
1443
|
+
return [v, ((A = l.payload) == null ? void 0 : A.data) || { error: v }];
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1446
|
+
return ["unknownError", { error: "unknownError" }];
|
|
1447
|
+
};
|
|
1448
|
+
var Wr = Object.defineProperty, Zr = Object.getOwnPropertyDescriptor, se = (e, t, r, o) => {
|
|
1449
|
+
for (var a = o > 1 ? void 0 : o ? Zr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1450
|
+
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
1451
|
+
return o && a && Wr(t, r, a), a;
|
|
1452
|
+
};
|
|
1453
|
+
const ct = "spm-pump-model";
|
|
1454
|
+
let z = class {
|
|
1455
|
+
constructor(e, t, r) {
|
|
1456
|
+
i(this, "id");
|
|
1457
|
+
i(this, "logger");
|
|
1458
|
+
i(this, "pump");
|
|
1459
|
+
i(this, "futureHandler");
|
|
1460
|
+
this.id = e, this.logger = r.logger, this.pump = t.companionParent, this.futureHandler = new Fe(this);
|
|
1461
|
+
}
|
|
1462
|
+
get name() {
|
|
1463
|
+
return this.pump.name;
|
|
1464
|
+
}
|
|
1465
|
+
get canPour() {
|
|
1466
|
+
return this.pump.canPour;
|
|
1467
|
+
}
|
|
1468
|
+
get isPouring() {
|
|
1469
|
+
return this.pump.isPouring;
|
|
1470
|
+
}
|
|
1471
|
+
async cancelPour() {
|
|
1472
|
+
return this.pump.cancelPour();
|
|
1473
|
+
}
|
|
1474
|
+
performIntent(e) {
|
|
1475
|
+
return this.pump.performIntent(e);
|
|
1476
|
+
}
|
|
1477
|
+
get future() {
|
|
1478
|
+
return this.futureHandler.future;
|
|
1479
|
+
}
|
|
1480
|
+
async performPreCalibrate(e) {
|
|
1481
|
+
return Br(this.pump.path, e);
|
|
1482
|
+
}
|
|
1483
|
+
async performCalibrate(e) {
|
|
1484
|
+
return Hr(this.pump.path, e);
|
|
1485
|
+
}
|
|
1486
|
+
async performVerify(e, t, r) {
|
|
1487
|
+
return Kr(this.pump.path, e, t, r);
|
|
1488
|
+
}
|
|
1489
|
+
async performComplete(e, t, r) {
|
|
1490
|
+
return Yr(this.pump.path, e, t, r);
|
|
1491
|
+
}
|
|
1492
|
+
// -------------------LIFECYCLE----------------------------
|
|
1493
|
+
async init() {
|
|
1494
|
+
this.logger.debug(`initializing spm-pump ${this.id}`);
|
|
1495
|
+
}
|
|
1496
|
+
async load() {
|
|
1497
|
+
this.logger.debug(`loading spm-pump ${this.id}`);
|
|
1498
|
+
}
|
|
1499
|
+
};
|
|
1500
|
+
se([
|
|
1501
|
+
_()
|
|
1502
|
+
], z.prototype, "performPreCalibrate", 1);
|
|
1503
|
+
se([
|
|
1504
|
+
_()
|
|
1505
|
+
], z.prototype, "performCalibrate", 1);
|
|
1506
|
+
se([
|
|
1507
|
+
_()
|
|
1508
|
+
], z.prototype, "performVerify", 1);
|
|
1509
|
+
z = se([
|
|
1510
|
+
f(ct)
|
|
1511
|
+
], z);
|
|
1512
|
+
const kr = new $({
|
|
1513
|
+
class: z,
|
|
1514
|
+
type: ct
|
|
1515
|
+
});
|
|
1516
|
+
var Qr = Object.defineProperty, Xr = Object.getOwnPropertyDescriptor, $e = (e, t, r, o) => {
|
|
1517
|
+
for (var a = o > 1 ? void 0 : o ? Xr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1518
|
+
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
1519
|
+
return o && a && Qr(t, r, a), a;
|
|
1520
|
+
};
|
|
1521
|
+
const Ee = "agitation-required-trouble-model", Jr = (e) => {
|
|
1522
|
+
if (e.data.agitationRequired)
|
|
1523
|
+
return Ee;
|
|
1524
|
+
}, ea = "InsufficientAgitationTrouble";
|
|
1525
|
+
let j = class {
|
|
1526
|
+
constructor(e, t, r) {
|
|
1527
|
+
i(this, "id");
|
|
1528
|
+
i(this, "logger");
|
|
1529
|
+
i(this, "trouble");
|
|
1530
|
+
i(this, "_deferred");
|
|
1531
|
+
i(this, "_holdersLoaded", !1);
|
|
1532
|
+
i(this, "agitateBeforePour");
|
|
1533
|
+
this.id = e, this.logger = r.logger, this._deferred = !1, this.trouble = t.companionParent;
|
|
1534
|
+
}
|
|
1535
|
+
async resolve() {
|
|
1536
|
+
return this.trouble.resolve();
|
|
1537
|
+
}
|
|
1538
|
+
get holder() {
|
|
1539
|
+
const e = this.trouble.data.holderPaths[0], t = R(e);
|
|
1540
|
+
if (!(!this._holdersLoaded && !t.model))
|
|
1541
|
+
return t == null ? void 0 : t.model;
|
|
1542
|
+
}
|
|
1543
|
+
updateHolder() {
|
|
1544
|
+
if (!this._holdersLoaded) {
|
|
1545
|
+
const e = this.trouble.data.holderPaths[0];
|
|
1546
|
+
R(e).model && (this._holdersLoaded = !0);
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
get shouldDefer() {
|
|
1550
|
+
var o, a;
|
|
1551
|
+
if (!this.holder)
|
|
1552
|
+
return !0;
|
|
1553
|
+
const t = (((o = this.holder) == null ? void 0 : o.troublesByType[ea]) || []).length > 0;
|
|
1554
|
+
return !!((a = this.agitateBeforePour) != null && a.value) && t;
|
|
1555
|
+
}
|
|
1556
|
+
get deferred() {
|
|
1557
|
+
return this._deferred;
|
|
1558
|
+
}
|
|
1559
|
+
defer() {
|
|
1560
|
+
this._deferred = !0;
|
|
1561
|
+
}
|
|
1562
|
+
clearDefer() {
|
|
1563
|
+
this._deferred = !1;
|
|
1564
|
+
}
|
|
1565
|
+
};
|
|
1566
|
+
$e([
|
|
1567
|
+
b({
|
|
1568
|
+
path: "app:kosdev.ddk:app",
|
|
1569
|
+
attribute: "ncui.agitateBeforePour"
|
|
1570
|
+
})
|
|
1571
|
+
], j.prototype, "agitateBeforePour", 2);
|
|
1572
|
+
$e([
|
|
1573
|
+
Tt({
|
|
1574
|
+
topic: It(ze.type),
|
|
1575
|
+
lifecycle: De.INIT
|
|
1576
|
+
})
|
|
1577
|
+
], j.prototype, "updateHolder", 1);
|
|
1578
|
+
j = $e([
|
|
1579
|
+
f(Ee)
|
|
1580
|
+
], j);
|
|
1581
|
+
const ta = new $({
|
|
1582
|
+
class: j,
|
|
1583
|
+
type: Ee
|
|
1584
|
+
}), ra = ["iceAgitator"], aa = {
|
|
1585
|
+
iceAgitator: lt.factory
|
|
1586
|
+
}, oa = C.createLogger({ name: "freestyle-assembly-data-mapper" }), ca = async (e) => {
|
|
1587
|
+
const t = Ie.instance().options({}).build(), r = Ce.instance().options({}).build(), o = e.assemblies.reduce((s, u) => {
|
|
1588
|
+
var A;
|
|
1589
|
+
return ra.forEach((l) => {
|
|
1590
|
+
var M;
|
|
1591
|
+
const v = u[l];
|
|
1592
|
+
if (v) {
|
|
1593
|
+
const dt = aa[l](v.path);
|
|
1594
|
+
s[l] = dt({
|
|
1595
|
+
name: v.name,
|
|
1596
|
+
path: v.path,
|
|
1597
|
+
statePath: ((M = v.state) == null ? void 0 : M.path) || ""
|
|
1598
|
+
});
|
|
1599
|
+
}
|
|
1600
|
+
}), (A = u.cartridgeAgitators) == null || A.forEach((l) => {
|
|
1601
|
+
var M;
|
|
1602
|
+
const v = He.instance(
|
|
1603
|
+
l.path
|
|
1604
|
+
).options({
|
|
1605
|
+
name: l.name,
|
|
1606
|
+
path: l.path,
|
|
1607
|
+
statePath: ((M = l.state) == null ? void 0 : M.path) || ""
|
|
1608
|
+
}).build();
|
|
1609
|
+
t.addModel(v);
|
|
1610
|
+
}), u.remoteTrays && u.remoteTrays.forEach((l) => {
|
|
1611
|
+
oa.info(`Found remote tray ${l.name} with path ${l.path}`);
|
|
1612
|
+
const v = `${V.type}-${l.holderPath}`, M = V.instance(v).options({
|
|
1613
|
+
holderPath: l.holderPath,
|
|
1614
|
+
configPath: l.path,
|
|
1615
|
+
name: l.name
|
|
1616
|
+
}).build();
|
|
1617
|
+
r.addModel(M);
|
|
1618
|
+
}), s;
|
|
1619
|
+
}, {}), a = !!o.iceAgitator, n = !!o.carbTank;
|
|
1620
|
+
return {
|
|
1621
|
+
...o,
|
|
1622
|
+
cartridgeAgitators: t,
|
|
1623
|
+
remoteTrays: r,
|
|
1624
|
+
supportsCarb: n,
|
|
1625
|
+
supportsIce: a
|
|
1626
|
+
};
|
|
1627
|
+
}, ia = (e) => () => (_t(e)(), Et(e)(), we.register(), de.register(), lt.register(), Ge.register(), Ie.register(), kr.register(), ir.register(), Gr.register(), Zt.register(), Se.register(), Oe.register(), V.register(), Ce.register(), m.companion.register(e)(
|
|
1628
|
+
Ot.type,
|
|
1629
|
+
we.type
|
|
1630
|
+
), m.companion.register(e)(
|
|
1631
|
+
ze.type,
|
|
1632
|
+
de.type
|
|
1633
|
+
), ta.register(), m.companion.register(e)(
|
|
1634
|
+
Ct.type,
|
|
1635
|
+
Jr
|
|
1636
|
+
), m.companion.register(e)(At.type, Se.type), m.companion.register(e)(
|
|
1637
|
+
wt.type,
|
|
1638
|
+
Oe.type
|
|
1639
|
+
), le[ue].register(
|
|
1640
|
+
"EnjoyByTrouble",
|
|
1641
|
+
async (t) => {
|
|
1642
|
+
if (t.data.enjoyByDate) {
|
|
1643
|
+
const r = new Date(t.data.enjoyByDate);
|
|
1644
|
+
return {
|
|
1645
|
+
enjoyByDays: Math.floor(
|
|
1646
|
+
((/* @__PURE__ */ new Date()).getTime() - r.getTime()) / (1e3 * 60 * 60 * 24)
|
|
1647
|
+
) || ""
|
|
1648
|
+
};
|
|
1649
|
+
}
|
|
1650
|
+
return {};
|
|
1651
|
+
}
|
|
1652
|
+
), le[ue].register(
|
|
1653
|
+
"SuperPumpRequiredTrouble",
|
|
1654
|
+
// This is the trouble type
|
|
1655
|
+
async (t) => {
|
|
1656
|
+
const { model: r } = R(
|
|
1657
|
+
St.type
|
|
1658
|
+
);
|
|
1659
|
+
return r ? {
|
|
1660
|
+
superPumps: r.models.getIndexByKey(
|
|
1661
|
+
Mt.byType,
|
|
1662
|
+
"microSuper"
|
|
1663
|
+
).map((n) => n.name).join(", ")
|
|
1664
|
+
} : {};
|
|
1665
|
+
}
|
|
1666
|
+
), le[ue].register(
|
|
1667
|
+
"MicroPumpAirDetectTrouble",
|
|
1668
|
+
async (t) => {
|
|
1669
|
+
if (t.ifaces.includes("container"))
|
|
1670
|
+
return {};
|
|
1671
|
+
if (t.data.pumpPath) {
|
|
1672
|
+
const { model: r } = R(
|
|
1673
|
+
t.data.pumpPath
|
|
1674
|
+
);
|
|
1675
|
+
if (r) {
|
|
1676
|
+
const o = r.ingredientId ? R(r.ingredientId).model : void 0;
|
|
1677
|
+
return {
|
|
1678
|
+
ingredientId: r.ingredientId,
|
|
1679
|
+
ingredientName: (o == null ? void 0 : o.name) || ""
|
|
1680
|
+
};
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
return {};
|
|
1684
|
+
}
|
|
1685
|
+
), {
|
|
1686
|
+
preload: m.model.preloadModel(e),
|
|
1687
|
+
model: m.model.register(e),
|
|
1688
|
+
companion: m.companion.register(e),
|
|
1689
|
+
legacy: m.model.registerLegacyModel(e)
|
|
1690
|
+
}), I = {
|
|
1691
|
+
...$t
|
|
1692
|
+
};
|
|
1693
|
+
I.freestyle = {
|
|
1694
|
+
models: ia(I)
|
|
1695
|
+
};
|
|
1696
|
+
I.preload = m.model.preloadModel(I);
|
|
1697
|
+
I.model = m.model.register(I);
|
|
1698
|
+
I.companion = m.companion.register(I);
|
|
1699
|
+
I.legacy = m.model.registerLegacyModel(I);
|
|
1700
|
+
const da = I;
|
|
1701
|
+
export {
|
|
1702
|
+
ea as A,
|
|
1703
|
+
lr as B,
|
|
1704
|
+
Ge as C,
|
|
1705
|
+
ir as F,
|
|
1706
|
+
J as I,
|
|
1707
|
+
da as K,
|
|
1708
|
+
Gr as L,
|
|
1709
|
+
Ir as N,
|
|
1710
|
+
Ce as R,
|
|
1711
|
+
kr as S,
|
|
1712
|
+
Ie as a,
|
|
1713
|
+
Z as b,
|
|
1714
|
+
He as c,
|
|
1715
|
+
Zt as d,
|
|
1716
|
+
de as e,
|
|
1717
|
+
Oe as f,
|
|
1718
|
+
we as g,
|
|
1719
|
+
Se as h,
|
|
1720
|
+
lt as i,
|
|
1721
|
+
ta as j,
|
|
1722
|
+
V as k,
|
|
1723
|
+
tr as l,
|
|
1724
|
+
kt as m,
|
|
1725
|
+
Qt as n,
|
|
1726
|
+
Jt as o,
|
|
1727
|
+
Xt as p,
|
|
1728
|
+
Ae as q,
|
|
1729
|
+
ia as r,
|
|
1730
|
+
_r as s,
|
|
1731
|
+
Or as t,
|
|
1732
|
+
ua as u,
|
|
1733
|
+
Hr as v,
|
|
1734
|
+
Yr as w,
|
|
1735
|
+
Br as x,
|
|
1736
|
+
Kr as y,
|
|
1737
|
+
ca as z
|
|
1738
|
+
};
|
|
1739
|
+
//# sourceMappingURL=freestyle-registration-manager-DSugLmqT.js.map
|