@kosdev-code/kos-dispense-sdk 0.1.0-dev.5072 → 0.1.0-dev.5077
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/dispense-registration-manager-D2xgLGGi.cjs +2 -0
- package/dispense-registration-manager-D2xgLGGi.cjs.map +1 -0
- package/{dispense-registration-manager-CB_nSTZw.js → dispense-registration-manager-kSiG2s8S.js} +825 -737
- package/dispense-registration-manager-kSiG2s8S.js.map +1 -0
- package/{extension-utils-DUel3wIz.cjs → extension-utils-CdPC7X-L.cjs} +2 -2
- package/{extension-utils-DUel3wIz.cjs.map → extension-utils-CdPC7X-L.cjs.map} +1 -1
- package/{extension-utils-CkYqorcG.js → extension-utils-CuSBRs_n.js} +2 -2
- package/{extension-utils-CkYqorcG.js.map → extension-utils-CuSBRs_n.js.map} +1 -1
- package/index.cjs +1 -1
- package/index.js +3 -3
- package/models/models/generic-pour/generic-pour-model.d.ts +10 -5
- package/models/models/generic-pour/generic-pour-model.d.ts.map +1 -1
- package/models/models/nozzle/nozzle-model.d.ts +10 -6
- package/models/models/nozzle/nozzle-model.d.ts.map +1 -1
- package/models/models/types/pouring.d.ts +1 -3
- package/models/models/types/pouring.d.ts.map +1 -1
- package/models.cjs +1 -1
- package/models.js +2 -2
- package/package.json +3 -3
- package/{pump-provider-86479YU2.cjs → pump-provider-BmaHEGSM.cjs} +2 -2
- package/{pump-provider-86479YU2.cjs.map → pump-provider-BmaHEGSM.cjs.map} +1 -1
- package/{pump-provider-DSyiDoPF.js → pump-provider-C1wagpbM.js} +2 -2
- package/{pump-provider-DSyiDoPF.js.map → pump-provider-C1wagpbM.js.map} +1 -1
- package/ui.cjs +1 -1
- package/ui.js +2 -2
- package/dispense-registration-manager-BZ5L3AWX.cjs +0 -2
- package/dispense-registration-manager-BZ5L3AWX.cjs.map +0 -1
- package/dispense-registration-manager-CB_nSTZw.js.map +0 -1
package/{dispense-registration-manager-CB_nSTZw.js → dispense-registration-manager-kSiG2s8S.js}
RENAMED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var o = (e, t, r) => (
|
|
4
|
-
import { kosModel as
|
|
1
|
+
var gt = Object.defineProperty;
|
|
2
|
+
var ut = (e, t, r) => t in e ? gt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var o = (e, t, r) => (ut(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
+
import { kosModel as P, Kos as v, isKosModel as b, resolveServiceUrl as N, ServiceFactory as $, KosLog as m, KosModelContainer as D, KosExtensionUtils as A, kosChild as _, FetchError as Pt, ExtensionManager as g, EXTENSION_TROUBLE_MAPPER as Me, EXTENSION_TROUBLE_DATA_MAPPER as ee, getKosModelSync as z, kosDependency as xe, kosTroubleAware as yt, kosAction as O, kosTopicHandler as te, DependencyLifecycle as pe, getKosModel as Be, FutureManager as he, kosFuture as ge, FutureHandler as Ge, EXTENSION_FEATURE_FLAG_RESOLVER as It, isKosDataModel as mt, ChildModels as ft, KosFeatureFlags as vt, kosParentAware as bt, createPropKey as Ot, kosStateEntry as ue, kosStateExit as Pe, kosStateGuard as re, kosLoggerAware as je, kosStateMachine as Fe, MultipleFutureHandler as _t, arraysEqual as Et, getAllKosCompanionModels as U, EventBus as R, KosContextManager as Mt, destroyKosModel as wt, SingletonKosModelRegistrationFactory as Rt, kosFutureAware as Ct, ObservableData as Te, KosModelRegistrationFactory as Nt, KosModelRegistry as $t, RegistrationManager as w, registerCoreModels as Dt, registerLegacyModel as St } from "@kosdev-code/kos-ui-sdk";
|
|
5
5
|
import "react";
|
|
6
|
-
var h = /* @__PURE__ */ ((e) => (e.IngredientLoader = "kos.ingredient.loader", e.IngredientMapper = "kos.ingredient.mapper", e.IngredientIndex = "kos.ingredient.index", e.IngredientTypeMapper = "kos.ingredient.type.mapper", e.HolderTypeMapper = "kos.holder.type.mapper", e.HolderMapper = "kos.holder.mapper", e.HolderIndex = "kos.holder.index", e.HolderIngredientMapper = "kos.holder.ingredient.mapper", e.AvailabilityMapper = "kos.availability.mapper", e.AvailabilityLoader = "kos.availability.loader", e.SelectedPourableMapper = "kos.selected.pourable.mapper", e.AssemblyMapper = "kos.assembly.mapper", e.BoardMapper = "kos.board.mapper", e.BoardIndex = "kos.board.index", e.PumpIndex = "kos.pump.index", e.AssemblyFeatureFlags = "kos.assembly.feature.flags", e))(h || {}),
|
|
7
|
-
for (var
|
|
8
|
-
(n = e[s]) && (
|
|
9
|
-
return
|
|
6
|
+
var h = /* @__PURE__ */ ((e) => (e.IngredientLoader = "kos.ingredient.loader", e.IngredientMapper = "kos.ingredient.mapper", e.IngredientIndex = "kos.ingredient.index", e.IngredientTypeMapper = "kos.ingredient.type.mapper", e.HolderTypeMapper = "kos.holder.type.mapper", e.HolderMapper = "kos.holder.mapper", e.HolderIndex = "kos.holder.index", e.HolderIngredientMapper = "kos.holder.ingredient.mapper", e.AvailabilityMapper = "kos.availability.mapper", e.AvailabilityLoader = "kos.availability.loader", e.SelectedPourableMapper = "kos.selected.pourable.mapper", e.AssemblyMapper = "kos.assembly.mapper", e.BoardMapper = "kos.board.mapper", e.BoardIndex = "kos.board.index", e.PumpIndex = "kos.pump.index", e.AssemblyFeatureFlags = "kos.assembly.feature.flags", e))(h || {}), S = /* @__PURE__ */ ((e) => (e.Nozzle = "nozzle-model", e.Availability = "availability-model", e.Holder = "holder-model", e.HolderContainer = "holder-container-model", e.IngredientContainer = "ingredient-container-model", e.Ingredient = "ingredient-model", e.Pump = "pump-model", e.PumpContainer = "pump-container-model", e))(S || {}), Tt = Object.getOwnPropertyDescriptor, Lt = (e, t, r, i) => {
|
|
7
|
+
for (var a = i > 1 ? void 0 : i ? Tt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
8
|
+
(n = e[s]) && (a = n(a) || a);
|
|
9
|
+
return a;
|
|
10
10
|
};
|
|
11
|
-
const
|
|
12
|
-
let
|
|
11
|
+
const F = "ingredient-model";
|
|
12
|
+
let be = class {
|
|
13
13
|
constructor(e, {
|
|
14
14
|
name: t,
|
|
15
15
|
type: r,
|
|
16
|
-
data:
|
|
17
|
-
ingredientId:
|
|
16
|
+
data: i,
|
|
17
|
+
ingredientId: a,
|
|
18
18
|
...s
|
|
19
19
|
}) {
|
|
20
20
|
o(this, "id");
|
|
@@ -22,49 +22,49 @@ let me = class {
|
|
|
22
22
|
o(this, "name");
|
|
23
23
|
o(this, "type");
|
|
24
24
|
o(this, "data");
|
|
25
|
-
this.id = e, this.ingredientId =
|
|
25
|
+
this.id = e, this.ingredientId = a, this.name = t, this.type = r, this.data = i, Object.assign(this, s);
|
|
26
26
|
}
|
|
27
27
|
updateModel({
|
|
28
28
|
name: e,
|
|
29
29
|
type: t,
|
|
30
30
|
data: r,
|
|
31
|
-
ingredientId:
|
|
32
|
-
...
|
|
31
|
+
ingredientId: i,
|
|
32
|
+
...a
|
|
33
33
|
}) {
|
|
34
|
-
this.name = e, this.type = t, this.ingredientId =
|
|
34
|
+
this.name = e, this.type = t, this.ingredientId = i, this.data = r, Object.assign(this, a);
|
|
35
35
|
}
|
|
36
36
|
// -------------------LIFECYCLE----------------------------
|
|
37
37
|
// -------------------ENTITY----------------------------
|
|
38
38
|
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
],
|
|
42
|
-
const
|
|
39
|
+
be = Lt([
|
|
40
|
+
P(F)
|
|
41
|
+
], be);
|
|
42
|
+
const He = {
|
|
43
43
|
registration: {
|
|
44
|
-
[
|
|
45
|
-
class:
|
|
44
|
+
[F]: {
|
|
45
|
+
class: be,
|
|
46
46
|
singleton: !1
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
type:
|
|
50
|
-
predicate: b(
|
|
51
|
-
factory: v.Factory.create(
|
|
52
|
-
}, { URL:
|
|
53
|
-
basePath: `${
|
|
54
|
-
}),
|
|
55
|
-
urlOverride: `${
|
|
49
|
+
type: F,
|
|
50
|
+
predicate: b(F),
|
|
51
|
+
factory: v.Factory.create(F)
|
|
52
|
+
}, { URL: Ve } = N("INGREDIENT_SERVICE"), { getOne: At } = $.build({
|
|
53
|
+
basePath: `${Ve}/api/ext/dispense/ingredients`
|
|
54
|
+
}), Ut = async () => await At({
|
|
55
|
+
urlOverride: `${Ve}/api/ext/dispense/ingredients`
|
|
56
56
|
});
|
|
57
|
-
var
|
|
58
|
-
for (var
|
|
59
|
-
(n = e[s]) && (
|
|
60
|
-
return
|
|
57
|
+
var zt = Object.defineProperty, xt = Object.getOwnPropertyDescriptor, Ke = (e, t, r, i) => {
|
|
58
|
+
for (var a = i > 1 ? void 0 : i ? xt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
59
|
+
(n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
|
|
60
|
+
return i && a && zt(t, r, a), a;
|
|
61
61
|
};
|
|
62
|
-
const
|
|
63
|
-
let
|
|
62
|
+
const H = "ingredient-container-model", Bt = m.createLogger({ name: "ingredient-container-model" });
|
|
63
|
+
let se = class {
|
|
64
64
|
constructor(e, t) {
|
|
65
65
|
o(this, "id");
|
|
66
66
|
o(this, "ingredients");
|
|
67
|
-
this.id = e, this.ingredients = new
|
|
67
|
+
this.id = e, this.ingredients = new D({
|
|
68
68
|
indexMap: {
|
|
69
69
|
ingredientType: "type"
|
|
70
70
|
},
|
|
@@ -79,22 +79,22 @@ let ie = class {
|
|
|
79
79
|
return this.ingredients.getIndexByKey("ingredientType", e);
|
|
80
80
|
}
|
|
81
81
|
async load(e) {
|
|
82
|
-
var
|
|
83
|
-
|
|
84
|
-
const t = await
|
|
82
|
+
var a;
|
|
83
|
+
Bt.debug(`loading ingredient container ${this.id}`);
|
|
84
|
+
const t = await Ut();
|
|
85
85
|
if ((t == null ? void 0 : t.status) !== 200)
|
|
86
86
|
throw new Error("Failed to load ingredients");
|
|
87
|
-
const r = await
|
|
87
|
+
const r = await A.executeLoaderExtension({
|
|
88
88
|
context: e,
|
|
89
89
|
extension: h.IngredientLoader
|
|
90
|
-
}),
|
|
91
|
-
for (const s of Object.keys(
|
|
92
|
-
for (const n of ((
|
|
93
|
-
const c = await
|
|
90
|
+
}), i = (t == null ? void 0 : t.data) ?? {};
|
|
91
|
+
for (const s of Object.keys(i))
|
|
92
|
+
for (const n of ((a = t == null ? void 0 : t.data) == null ? void 0 : a[s]) || []) {
|
|
93
|
+
const c = await A.executeDataMapperExtension({
|
|
94
94
|
extension: h.IngredientMapper,
|
|
95
95
|
data: n,
|
|
96
96
|
contextData: r
|
|
97
|
-
}), l = await
|
|
97
|
+
}), l = await A.executePropertyMapperExtension({
|
|
98
98
|
extension: h.IngredientTypeMapper,
|
|
99
99
|
data: n,
|
|
100
100
|
contextData: r
|
|
@@ -103,100 +103,100 @@ let ie = class {
|
|
|
103
103
|
type: l || n.type,
|
|
104
104
|
...c,
|
|
105
105
|
data: c
|
|
106
|
-
},
|
|
106
|
+
}, u = He.factory(n.id)(
|
|
107
107
|
p
|
|
108
108
|
);
|
|
109
|
-
this.ingredients.addModel(
|
|
109
|
+
this.ingredients.addModel(u);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
// -------------------ENTITY----------------------------
|
|
113
113
|
};
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
],
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
],
|
|
120
|
-
const
|
|
114
|
+
Ke([
|
|
115
|
+
_
|
|
116
|
+
], se.prototype, "ingredients", 2);
|
|
117
|
+
se = Ke([
|
|
118
|
+
P(H)
|
|
119
|
+
], se);
|
|
120
|
+
const ke = {
|
|
121
121
|
registration: {
|
|
122
|
-
[
|
|
123
|
-
class:
|
|
122
|
+
[H]: {
|
|
123
|
+
class: se,
|
|
124
124
|
singleton: !0
|
|
125
125
|
}
|
|
126
126
|
},
|
|
127
|
-
type:
|
|
128
|
-
predicate: b(
|
|
129
|
-
factory: v.Singleton.create(
|
|
130
|
-
}, { URL:
|
|
131
|
-
basePath: `${
|
|
132
|
-
}),
|
|
127
|
+
type: H,
|
|
128
|
+
predicate: b(H),
|
|
129
|
+
factory: v.Singleton.create(H)
|
|
130
|
+
}, { URL: ye } = N("HOLDER_SERVICE"), { getAll: Gt, postModel: Ye, deleteModel: jt } = $.build({
|
|
131
|
+
basePath: `${ye}/api/kos/holders`
|
|
132
|
+
}), Ft = m.createLogger({
|
|
133
133
|
name: "holder-service",
|
|
134
134
|
group: "Services"
|
|
135
|
-
}),
|
|
135
|
+
}), di = async () => await Gt({}), Ht = async (e, t) => {
|
|
136
136
|
if (!e || !t)
|
|
137
137
|
throw new Error("Missing holderPath or ingredientId");
|
|
138
|
-
return await
|
|
138
|
+
return await Ye({
|
|
139
139
|
model: { holderPath: e, ingredientId: t },
|
|
140
|
-
urlOverride: `${
|
|
140
|
+
urlOverride: `${ye}/api/ext/dispense/assignments`
|
|
141
141
|
});
|
|
142
|
-
},
|
|
142
|
+
}, Vt = async (e) => {
|
|
143
143
|
if (!e)
|
|
144
144
|
throw new Error("Missing holderPath");
|
|
145
|
-
return await
|
|
145
|
+
return await jt({
|
|
146
146
|
id: e,
|
|
147
|
-
urlOverride: `${
|
|
147
|
+
urlOverride: `${ye}/api/ext/dispense/assignments/${e}`
|
|
148
148
|
});
|
|
149
|
-
},
|
|
149
|
+
}, Kt = async (e) => {
|
|
150
150
|
if (!e)
|
|
151
151
|
throw new Error("Missing holderPath");
|
|
152
|
-
return
|
|
152
|
+
return Ft.debug(
|
|
153
153
|
`sending POST request to /api/ext/dispense/pumpEvents/replaceLine/${e}`
|
|
154
|
-
), await
|
|
154
|
+
), await Ye({
|
|
155
155
|
model: {},
|
|
156
|
-
urlOverride: `${
|
|
156
|
+
urlOverride: `${ye}/api/ext/dispense/pumpEvents/replaceLine/${e}`
|
|
157
157
|
});
|
|
158
|
-
}, { URL:
|
|
158
|
+
}, { URL: ne } = N("ASSIGNMENT_SERVICE"), { getAll: kt, postModel: Ze, deleteModel: Yt } = $.build({
|
|
159
159
|
destinationAddress: "",
|
|
160
|
-
basePath: `${
|
|
161
|
-
}),
|
|
162
|
-
var
|
|
163
|
-
const r = JSON.stringify(t),
|
|
160
|
+
basePath: `${ne}/api/ext/dispense/assignments`
|
|
161
|
+
}), oe = window.kosUseFos, li = async () => await kt({ fos: oe }), Zt = async (e, t) => {
|
|
162
|
+
var a, s, n, c;
|
|
163
|
+
const r = JSON.stringify(t), i = `${ne}/api/ext/dispense/assignments`;
|
|
164
164
|
try {
|
|
165
|
-
const l = await
|
|
165
|
+
const l = await Ze({
|
|
166
166
|
model: { holderPath: e, factoryJson: r },
|
|
167
|
-
urlOverride:
|
|
167
|
+
urlOverride: i
|
|
168
168
|
});
|
|
169
|
-
return (l == null ? void 0 : l.status) === 200 && ((
|
|
169
|
+
return (l == null ? void 0 : l.status) === 200 && ((a = l == null ? void 0 : l.data) != null && a.error) ? [l.data.error || "unknownError", l.data] : [void 0, l == null ? void 0 : l.data];
|
|
170
170
|
} catch (l) {
|
|
171
|
-
if (l instanceof
|
|
171
|
+
if (l instanceof Pt)
|
|
172
172
|
return [
|
|
173
173
|
((n = (s = l.payload) == null ? void 0 : s.data) == null ? void 0 : n.error) || "unknownError",
|
|
174
174
|
(c = l.payload) == null ? void 0 : c.data
|
|
175
175
|
];
|
|
176
176
|
}
|
|
177
177
|
return ["unknownError", void 0];
|
|
178
|
-
},
|
|
179
|
-
const t =
|
|
180
|
-
return await
|
|
178
|
+
}, ci = async (e) => {
|
|
179
|
+
const t = oe ? `${ne}/api/ingredients/assignments/${e.holderPath}` : `${ne}/api/ext/dispense/assignments`;
|
|
180
|
+
return await Ze({
|
|
181
181
|
model: { ...e, fuelGauge: 680 },
|
|
182
|
-
fos:
|
|
182
|
+
fos: oe,
|
|
183
183
|
urlOverride: t
|
|
184
184
|
});
|
|
185
|
-
},
|
|
186
|
-
var
|
|
187
|
-
for (var
|
|
188
|
-
(n = e[s]) && (
|
|
189
|
-
return
|
|
185
|
+
}, pi = async (e) => await Yt({ id: e, fos: oe });
|
|
186
|
+
var Xt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, we = (e, t, r, i) => {
|
|
187
|
+
for (var a = i > 1 ? void 0 : i ? Jt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
188
|
+
(n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
|
|
189
|
+
return i && a && Xt(t, r, a), a;
|
|
190
190
|
};
|
|
191
|
-
const
|
|
192
|
-
|
|
191
|
+
const V = S.Holder, Le = m.createLogger({ name: "holder-model" });
|
|
192
|
+
g[Me].register(
|
|
193
193
|
"holder",
|
|
194
194
|
async (e) => {
|
|
195
195
|
const t = [];
|
|
196
196
|
return t.push(...e.data.holderPaths), t;
|
|
197
197
|
}
|
|
198
198
|
);
|
|
199
|
-
|
|
199
|
+
g[ee].register(
|
|
200
200
|
"pump",
|
|
201
201
|
async (e) => {
|
|
202
202
|
if (e.data.pumpPath) {
|
|
@@ -215,13 +215,13 @@ u[q].register(
|
|
|
215
215
|
return {};
|
|
216
216
|
}
|
|
217
217
|
);
|
|
218
|
-
|
|
218
|
+
g[ee].register(
|
|
219
219
|
"holder",
|
|
220
220
|
async (e) => e.data.holderNames.length > 0 ? {
|
|
221
221
|
holderName: e.data.holderNames[0] || ""
|
|
222
222
|
} : {}
|
|
223
223
|
);
|
|
224
|
-
|
|
224
|
+
g[ee].register(
|
|
225
225
|
"container",
|
|
226
226
|
async (e) => {
|
|
227
227
|
if (e.data.ingredients.length > 0) {
|
|
@@ -235,25 +235,25 @@ u[q].register(
|
|
|
235
235
|
return {};
|
|
236
236
|
}
|
|
237
237
|
);
|
|
238
|
-
class
|
|
239
|
-
constructor(r,
|
|
240
|
-
super(
|
|
238
|
+
class qt extends Error {
|
|
239
|
+
constructor(r, i) {
|
|
240
|
+
super(i);
|
|
241
241
|
o(this, "type");
|
|
242
242
|
this.name = "AssignmentError", this.type = r;
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
-
let
|
|
245
|
+
let Q = class {
|
|
246
246
|
constructor(e, {
|
|
247
247
|
path: t,
|
|
248
248
|
name: r,
|
|
249
|
-
ingredientSource:
|
|
250
|
-
ingredientId:
|
|
249
|
+
ingredientSource: i,
|
|
250
|
+
ingredientId: a,
|
|
251
251
|
ingredientType: s,
|
|
252
252
|
slice: n,
|
|
253
253
|
group: c,
|
|
254
254
|
data: l,
|
|
255
255
|
enjoyByDate: p
|
|
256
|
-
},
|
|
256
|
+
}, u) {
|
|
257
257
|
o(this, "id");
|
|
258
258
|
o(this, "path");
|
|
259
259
|
o(this, "name");
|
|
@@ -267,23 +267,23 @@ let J = class {
|
|
|
267
267
|
o(this, "enjoyByDate");
|
|
268
268
|
o(this, "pumps");
|
|
269
269
|
o(this, "ingredientContainer");
|
|
270
|
-
this.id = e, this.path = t, this.name = r, this.ingredientType = s, this.ingredientSource =
|
|
270
|
+
this.id = e, this.path = t, this.name = r, this.ingredientType = s, this.ingredientSource = i, this.ingredientId = a, this.group = c, this.slice = n, this.enjoyByDate = p, this.data = l, this.pumps = new D({
|
|
271
271
|
parentId: e,
|
|
272
272
|
sortKey: "path"
|
|
273
|
-
}), this.logger =
|
|
273
|
+
}), this.logger = u.logger;
|
|
274
274
|
}
|
|
275
275
|
updateModel({
|
|
276
276
|
path: e,
|
|
277
277
|
name: t,
|
|
278
278
|
ingredientSource: r,
|
|
279
|
-
ingredientId:
|
|
280
|
-
ingredientType:
|
|
279
|
+
ingredientId: i,
|
|
280
|
+
ingredientType: a,
|
|
281
281
|
group: s,
|
|
282
282
|
slice: n,
|
|
283
283
|
enjoyByDate: c,
|
|
284
284
|
data: l
|
|
285
285
|
}) {
|
|
286
|
-
this.path = e, this.name = t, this.ingredientId =
|
|
286
|
+
this.path = e, this.name = t, this.ingredientId = i, this.ingredientType = a, this.ingredientSource = r, this.enjoyByDate = c, this.slice = n, this.group = s, this.data = l;
|
|
287
287
|
}
|
|
288
288
|
get hasEnjoyByDate() {
|
|
289
289
|
return !!this.enjoyByDate && !this.unassigned;
|
|
@@ -308,8 +308,8 @@ let J = class {
|
|
|
308
308
|
return this.logger.debug(`isPouring: ${!!e}`), e;
|
|
309
309
|
}
|
|
310
310
|
async performIntent(e) {
|
|
311
|
-
const t = typeof e == "string" ? e : e.intent, r = typeof e == "string" ? void 0 : e.pumpPath,
|
|
312
|
-
return
|
|
311
|
+
const t = typeof e == "string" ? e : e.intent, r = typeof e == "string" ? void 0 : e.pumpPath, i = r ? this.pumps.getModel(r) : this.pumps.data[0];
|
|
312
|
+
return i == null ? void 0 : i.performIntent({ intent: t });
|
|
313
313
|
}
|
|
314
314
|
get pourState() {
|
|
315
315
|
return this.pumps.data.reduce((t, r) => r.pouringState ? r.pouringState : t, "");
|
|
@@ -371,7 +371,7 @@ let J = class {
|
|
|
371
371
|
return this.hasMaxVolume && this.hasRemainingVolume;
|
|
372
372
|
}
|
|
373
373
|
updateIngredient(e) {
|
|
374
|
-
this.ingredientId !== e &&
|
|
374
|
+
this.ingredientId !== e && O(() => {
|
|
375
375
|
this.ingredientId = e;
|
|
376
376
|
});
|
|
377
377
|
}
|
|
@@ -383,33 +383,33 @@ let J = class {
|
|
|
383
383
|
if (!e)
|
|
384
384
|
throw new Error("Invalid override");
|
|
385
385
|
try {
|
|
386
|
-
const [t, r] = await
|
|
386
|
+
const [t, r] = await Zt(this.path, e);
|
|
387
387
|
if (t)
|
|
388
|
-
throw new
|
|
388
|
+
throw new qt(
|
|
389
389
|
t,
|
|
390
390
|
`Failed to perform rfid override on holder ${this.id}`
|
|
391
391
|
);
|
|
392
|
-
return
|
|
392
|
+
return O(() => {
|
|
393
393
|
this.ingredientId = r == null ? void 0 : r.ingredientId;
|
|
394
394
|
}), r;
|
|
395
395
|
} catch (t) {
|
|
396
|
-
throw
|
|
396
|
+
throw Le.error(`Failed to perform rfid override on holder ${this.id}`, t), t;
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
399
|
async assignIngredient(e) {
|
|
400
400
|
try {
|
|
401
|
-
e ? await
|
|
401
|
+
e ? await Ht(this.path, e) : await Vt(this.path), O(() => {
|
|
402
402
|
this.ingredientId = e;
|
|
403
403
|
});
|
|
404
404
|
} catch (t) {
|
|
405
|
-
throw
|
|
405
|
+
throw Le.error(`Failed to perform assign ingredient to holder ${this.id}`, t), t;
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
get shouldDefer() {
|
|
409
409
|
return this.troubles.some((e) => e.shouldDefer);
|
|
410
410
|
}
|
|
411
411
|
async replaceLine() {
|
|
412
|
-
await
|
|
412
|
+
await Kt(this.path);
|
|
413
413
|
}
|
|
414
414
|
// -------------------LIFECYCLE----------------------------
|
|
415
415
|
// ----------------------------------
|
|
@@ -431,68 +431,68 @@ let J = class {
|
|
|
431
431
|
// }
|
|
432
432
|
// -------------------ENTITY----------------------------
|
|
433
433
|
};
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
],
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
],
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
],
|
|
444
|
-
const
|
|
434
|
+
we([
|
|
435
|
+
_
|
|
436
|
+
], Q.prototype, "pumps", 2);
|
|
437
|
+
we([
|
|
438
|
+
xe({ modelType: ke.type })
|
|
439
|
+
], Q.prototype, "ingredientContainer", 2);
|
|
440
|
+
Q = we([
|
|
441
|
+
P(V),
|
|
442
|
+
yt()
|
|
443
|
+
], Q);
|
|
444
|
+
const Xe = {
|
|
445
445
|
registration: {
|
|
446
|
-
[
|
|
447
|
-
class:
|
|
446
|
+
[V]: {
|
|
447
|
+
class: Q,
|
|
448
448
|
singleton: !1
|
|
449
449
|
}
|
|
450
450
|
},
|
|
451
|
-
type:
|
|
452
|
-
predicate: b(
|
|
453
|
-
factory: v.Factory.create(
|
|
454
|
-
},
|
|
451
|
+
type: V,
|
|
452
|
+
predicate: b(V),
|
|
453
|
+
factory: v.Factory.create(V)
|
|
454
|
+
}, Wt = async (e, t) => {
|
|
455
455
|
var Se;
|
|
456
|
-
const r =
|
|
456
|
+
const r = g.propertyMapper.executeMapper(
|
|
457
457
|
h.HolderIngredientMapper,
|
|
458
458
|
t
|
|
459
|
-
),
|
|
459
|
+
), i = g.propertyMapper.executeMapper(
|
|
460
460
|
h.HolderTypeMapper,
|
|
461
461
|
t
|
|
462
|
-
) || t.ingType,
|
|
462
|
+
) || t.ingType, a = await A.executeDataMapperExtension({
|
|
463
463
|
extension: h.HolderMapper,
|
|
464
464
|
data: t,
|
|
465
465
|
contextData: {}
|
|
466
|
-
}), { name: s, path: n, ingredientId: c, ingType: l, ingSource: p, slice:
|
|
466
|
+
}), { name: s, path: n, ingredientId: c, ingType: l, ingSource: p, slice: u, ...j } = t, y = { ...j, ...a }, L = u || { pos: 0 }, ae = {
|
|
467
467
|
name: s,
|
|
468
468
|
path: n,
|
|
469
469
|
ingredientId: r || c,
|
|
470
|
-
ingredientType:
|
|
470
|
+
ingredientType: i || l,
|
|
471
471
|
ingredientSource: p,
|
|
472
472
|
enjoyByDate: (Se = t.container) != null && Se.enjoyByDate ? new Date(t.container.enjoyByDate) : void 0,
|
|
473
|
-
slice:
|
|
473
|
+
slice: L,
|
|
474
474
|
group: e,
|
|
475
|
-
data:
|
|
475
|
+
data: y
|
|
476
476
|
};
|
|
477
|
-
return
|
|
478
|
-
}, { URL:
|
|
479
|
-
basePath: `${
|
|
480
|
-
}),
|
|
477
|
+
return Xe.factory(t.path)(ae);
|
|
478
|
+
}, { URL: Qt } = N("ASSEMBLY_SERVICE"), { getOne: er } = $.build({
|
|
479
|
+
basePath: `${Qt}/api/kos/device/assemblies`
|
|
480
|
+
}), tr = m.createLogger({
|
|
481
481
|
name: "assembly-service",
|
|
482
482
|
group: "Services"
|
|
483
|
-
}),
|
|
484
|
-
var
|
|
485
|
-
for (var
|
|
486
|
-
(n = e[s]) && (
|
|
487
|
-
return
|
|
483
|
+
}), Je = async () => (tr.debug("sending GET for assembly"), await er({}));
|
|
484
|
+
var rr = Object.defineProperty, ir = Object.getOwnPropertyDescriptor, Ie = (e, t, r, i) => {
|
|
485
|
+
for (var a = i > 1 ? void 0 : i ? ir(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
486
|
+
(n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
|
|
487
|
+
return i && a && rr(t, r, a), a;
|
|
488
488
|
};
|
|
489
|
-
const
|
|
490
|
-
let
|
|
489
|
+
const K = "board-container-model", qe = "/kos/hardware/board/linked", We = "/kos/hardware/board/unlinked";
|
|
490
|
+
let x = class {
|
|
491
491
|
constructor(e, t, r) {
|
|
492
492
|
o(this, "id");
|
|
493
493
|
o(this, "logger");
|
|
494
494
|
o(this, "models");
|
|
495
|
-
this.id = e, this.logger = r.logger, this.models = new
|
|
495
|
+
this.id = e, this.logger = r.logger, this.models = new D({
|
|
496
496
|
parentId: e,
|
|
497
497
|
extensionId: h.BoardIndex
|
|
498
498
|
});
|
|
@@ -517,52 +517,52 @@ let L = class {
|
|
|
517
517
|
r.updateModel(e);
|
|
518
518
|
}
|
|
519
519
|
handleBoardLinkEvent(e) {
|
|
520
|
-
this.logger.debug(`handling ${
|
|
520
|
+
this.logger.debug(`handling ${qe} event ${e}`), e ? this.updateBoard(e) : this.logger.debug("- boardLinkEvent is undefined");
|
|
521
521
|
}
|
|
522
522
|
handleBoardUnlinkEvent(e) {
|
|
523
523
|
this.logger.debug(
|
|
524
|
-
`handling ${
|
|
524
|
+
`handling ${We} event ${e}`
|
|
525
525
|
), e ? this.updateBoard(e) : this.logger.debug("- boardLinkEvent is undefined");
|
|
526
526
|
}
|
|
527
527
|
};
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
],
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
lifecycle:
|
|
534
|
-
topic:
|
|
528
|
+
Ie([
|
|
529
|
+
_
|
|
530
|
+
], x.prototype, "models", 2);
|
|
531
|
+
Ie([
|
|
532
|
+
te({
|
|
533
|
+
lifecycle: pe.INIT,
|
|
534
|
+
topic: qe,
|
|
535
535
|
websocket: !0
|
|
536
536
|
})
|
|
537
|
-
],
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
lifecycle:
|
|
541
|
-
topic:
|
|
537
|
+
], x.prototype, "handleBoardLinkEvent", 1);
|
|
538
|
+
Ie([
|
|
539
|
+
te({
|
|
540
|
+
lifecycle: pe.INIT,
|
|
541
|
+
topic: We,
|
|
542
542
|
websocket: !0
|
|
543
543
|
})
|
|
544
|
-
],
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
],
|
|
548
|
-
const
|
|
544
|
+
], x.prototype, "handleBoardUnlinkEvent", 1);
|
|
545
|
+
x = Ie([
|
|
546
|
+
P(K)
|
|
547
|
+
], x);
|
|
548
|
+
const ar = async (e) => {
|
|
549
549
|
const t = e.data.boardPath, { model: r } = z(t);
|
|
550
550
|
return {
|
|
551
551
|
boardName: (r == null ? void 0 : r.name) || ""
|
|
552
552
|
};
|
|
553
553
|
};
|
|
554
|
-
var
|
|
555
|
-
for (var
|
|
556
|
-
(n = e[s]) && (
|
|
557
|
-
return
|
|
554
|
+
var sr = Object.defineProperty, nr = Object.getOwnPropertyDescriptor, Qe = (e, t, r, i) => {
|
|
555
|
+
for (var a = i > 1 ? void 0 : i ? nr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
556
|
+
(n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
|
|
557
|
+
return i && a && sr(t, r, a), a;
|
|
558
558
|
};
|
|
559
|
-
const
|
|
560
|
-
var
|
|
561
|
-
let
|
|
559
|
+
const k = S.PumpContainer;
|
|
560
|
+
var et = /* @__PURE__ */ ((e) => (e.byBoard = "byBoard", e.byType = "byType", e.byNozzle = "byNozzle", e))(et || {});
|
|
561
|
+
let de = class {
|
|
562
562
|
constructor(e, t) {
|
|
563
563
|
o(this, "id");
|
|
564
564
|
o(this, "pumps");
|
|
565
|
-
this.id = e, this.pumps = new
|
|
565
|
+
this.id = e, this.pumps = new D({
|
|
566
566
|
indexMap: {
|
|
567
567
|
byNozzle: (r) => r.nozzlePaths,
|
|
568
568
|
byBoard: (r) => r.boardPath,
|
|
@@ -606,44 +606,44 @@ let ne = class {
|
|
|
606
606
|
}
|
|
607
607
|
// -------------------ENTITY----------------------------
|
|
608
608
|
};
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
],
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
],
|
|
615
|
-
const
|
|
609
|
+
Qe([
|
|
610
|
+
_
|
|
611
|
+
], de.prototype, "pumps", 2);
|
|
612
|
+
de = Qe([
|
|
613
|
+
P(k)
|
|
614
|
+
], de);
|
|
615
|
+
const Re = {
|
|
616
616
|
registration: {
|
|
617
|
-
[
|
|
618
|
-
class:
|
|
617
|
+
[k]: {
|
|
618
|
+
class: de,
|
|
619
619
|
singleton: !0
|
|
620
620
|
}
|
|
621
621
|
},
|
|
622
|
-
type:
|
|
623
|
-
predicate: b(
|
|
622
|
+
type: k,
|
|
623
|
+
predicate: b(k),
|
|
624
624
|
factory: v.Singleton.create(
|
|
625
|
-
|
|
625
|
+
k
|
|
626
626
|
)
|
|
627
|
-
},
|
|
628
|
-
const t = [], { model: r } = await
|
|
627
|
+
}, tt = async (e) => {
|
|
628
|
+
const t = [], { model: r } = await Be(e);
|
|
629
629
|
return r && (t.push(r.boardPath), t.push(r.nozzlePath), t.push(r.holderPath)), t;
|
|
630
|
-
},
|
|
630
|
+
}, or = async (e) => {
|
|
631
631
|
const t = [], r = e.data.pumpPath;
|
|
632
632
|
t.push(r);
|
|
633
|
-
const
|
|
634
|
-
return [...t, ...
|
|
635
|
-
},
|
|
633
|
+
const i = await tt(r);
|
|
634
|
+
return [...t, ...i];
|
|
635
|
+
}, dr = async (e) => {
|
|
636
636
|
const t = [], r = e.data.boardPath;
|
|
637
637
|
t.push(e.data.boardPath);
|
|
638
|
-
const
|
|
639
|
-
|
|
638
|
+
const i = await Be(
|
|
639
|
+
Re.type
|
|
640
640
|
);
|
|
641
|
-
if (
|
|
642
|
-
const s =
|
|
643
|
-
|
|
641
|
+
if (i != null && i.model) {
|
|
642
|
+
const s = i.model.models.getIndexByKey(
|
|
643
|
+
et.byBoard,
|
|
644
644
|
r
|
|
645
645
|
).map(
|
|
646
|
-
(c) =>
|
|
646
|
+
(c) => tt(c.path)
|
|
647
647
|
);
|
|
648
648
|
(await Promise.allSettled(s)).forEach((c) => {
|
|
649
649
|
c.status === "fulfilled" && c.value.forEach((l) => t.push(l));
|
|
@@ -651,24 +651,24 @@ const Me = {
|
|
|
651
651
|
}
|
|
652
652
|
return Array.from(new Set(t));
|
|
653
653
|
};
|
|
654
|
-
var
|
|
655
|
-
for (var
|
|
656
|
-
(n = e[s]) && (
|
|
657
|
-
return
|
|
654
|
+
var lr = Object.getOwnPropertyDescriptor, cr = (e, t, r, i) => {
|
|
655
|
+
for (var a = i > 1 ? void 0 : i ? lr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
656
|
+
(n = e[s]) && (a = n(a) || a);
|
|
657
|
+
return a;
|
|
658
658
|
};
|
|
659
|
-
const
|
|
660
|
-
const { type: r, name:
|
|
661
|
-
t.type = r, t.name =
|
|
659
|
+
const Y = "board-model", Ae = (e, t) => {
|
|
660
|
+
const { type: r, name: i, path: a, linked: s, instanceId: n, link: c, ...l } = e;
|
|
661
|
+
t.type = r, t.name = i, t.path = a, t.linked = s, t.link = Object.freeze(c), t.instanceId = n, Object.assign(t, l);
|
|
662
662
|
};
|
|
663
|
-
|
|
663
|
+
g[Me].register(
|
|
664
664
|
"board",
|
|
665
|
-
|
|
665
|
+
dr
|
|
666
666
|
);
|
|
667
|
-
|
|
667
|
+
g[ee].register(
|
|
668
668
|
"board",
|
|
669
|
-
|
|
669
|
+
ar
|
|
670
670
|
);
|
|
671
|
-
let
|
|
671
|
+
let Oe = class {
|
|
672
672
|
constructor(e, t, r) {
|
|
673
673
|
o(this, "id");
|
|
674
674
|
o(this, "type");
|
|
@@ -677,10 +677,10 @@ let fe = class {
|
|
|
677
677
|
o(this, "linked");
|
|
678
678
|
o(this, "instanceId");
|
|
679
679
|
o(this, "logger");
|
|
680
|
-
this.id = e, this.logger = r.logger,
|
|
680
|
+
this.id = e, this.logger = r.logger, Ae(t, this);
|
|
681
681
|
}
|
|
682
682
|
updateModel(e) {
|
|
683
|
-
|
|
683
|
+
Ae(e, this);
|
|
684
684
|
}
|
|
685
685
|
// -------------------LIFECYCLE----------------------------
|
|
686
686
|
async init() {
|
|
@@ -690,47 +690,47 @@ let fe = class {
|
|
|
690
690
|
this.logger.debug(`loading board ${this.id}`);
|
|
691
691
|
}
|
|
692
692
|
};
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
],
|
|
696
|
-
const
|
|
693
|
+
Oe = cr([
|
|
694
|
+
P(Y)
|
|
695
|
+
], Oe);
|
|
696
|
+
const rt = {
|
|
697
697
|
registration: {
|
|
698
|
-
[
|
|
699
|
-
class:
|
|
698
|
+
[Y]: {
|
|
699
|
+
class: Oe,
|
|
700
700
|
singleton: !1
|
|
701
701
|
}
|
|
702
702
|
},
|
|
703
|
-
type:
|
|
704
|
-
predicate: b(
|
|
705
|
-
factory: v.Factory.create(
|
|
706
|
-
},
|
|
703
|
+
type: Y,
|
|
704
|
+
predicate: b(Y),
|
|
705
|
+
factory: v.Factory.create(Y)
|
|
706
|
+
}, it = {
|
|
707
707
|
registration: {
|
|
708
|
-
[
|
|
709
|
-
class:
|
|
708
|
+
[K]: {
|
|
709
|
+
class: x,
|
|
710
710
|
singleton: !0
|
|
711
711
|
},
|
|
712
|
-
...
|
|
712
|
+
...rt.registration
|
|
713
713
|
},
|
|
714
|
-
type:
|
|
715
|
-
predicate: b(
|
|
714
|
+
type: K,
|
|
715
|
+
predicate: b(K),
|
|
716
716
|
factory: v.Singleton.create(
|
|
717
|
-
|
|
717
|
+
K
|
|
718
718
|
)
|
|
719
719
|
};
|
|
720
|
-
var
|
|
721
|
-
for (var
|
|
722
|
-
(n = e[s]) && (
|
|
723
|
-
return
|
|
720
|
+
var pr = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, me = (e, t, r, i) => {
|
|
721
|
+
for (var a = i > 1 ? void 0 : i ? hr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
722
|
+
(n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
|
|
723
|
+
return i && a && pr(t, r, a), a;
|
|
724
724
|
};
|
|
725
|
-
const
|
|
726
|
-
let
|
|
725
|
+
const Z = S.HolderContainer, gr = "/kos/insertion/insert/start", ur = "/kos/insertion/insert/complete", Pr = "/kos/insertion/insert/update", yr = "/kos/insertion/remove", Ir = "/kos/pumpEvent/replaceLine", mr = "/kos/handle/*";
|
|
726
|
+
let B = class {
|
|
727
727
|
constructor(e, t, r) {
|
|
728
728
|
o(this, "id");
|
|
729
729
|
o(this, "holders");
|
|
730
730
|
o(this, "logger");
|
|
731
|
-
this.id = e, this.holders = new
|
|
731
|
+
this.id = e, this.holders = new D({
|
|
732
732
|
indexMap: {
|
|
733
|
-
nozzle: (
|
|
733
|
+
nozzle: (i) => i.nozzlePaths,
|
|
734
734
|
group: "group"
|
|
735
735
|
},
|
|
736
736
|
parentId: e,
|
|
@@ -740,27 +740,27 @@ let x = class {
|
|
|
740
740
|
updateModel() {
|
|
741
741
|
}
|
|
742
742
|
handleHolderEvents(e) {
|
|
743
|
-
var r,
|
|
744
|
-
|
|
743
|
+
var r, i, a;
|
|
744
|
+
m.ifDebug(
|
|
745
745
|
() => this.logger.debug("Received holder change event", JSON.stringify(e))
|
|
746
746
|
);
|
|
747
747
|
const t = this.holders.getModel(e.path);
|
|
748
748
|
t && (this.logger.info(
|
|
749
749
|
`Received change event for holder ${t.path}. Updating fuel gauge data.`
|
|
750
|
-
), t.slice.currentVolMl = (r = e.slice) == null ? void 0 : r.currentVolMl, t.slice.maxVolMl = (
|
|
750
|
+
), t.slice.currentVolMl = (r = e.slice) == null ? void 0 : r.currentVolMl, t.slice.maxVolMl = (i = e.slice) == null ? void 0 : i.maxVolMl, (a = e == null ? void 0 : e.container) != null && a.enjoyByDate ? t.enjoyByDate = new Date(e.container.enjoyByDate) : t.enjoyByDate = void 0);
|
|
751
751
|
}
|
|
752
752
|
handleInsertion(e) {
|
|
753
|
-
|
|
753
|
+
m.ifDebug(
|
|
754
754
|
() => this.logger.debug("Received insertion event", JSON.stringify(e))
|
|
755
755
|
), (Array.isArray(e) ? e : [e]).forEach((r) => {
|
|
756
|
-
|
|
756
|
+
O(() => {
|
|
757
757
|
var s, n, c;
|
|
758
|
-
const
|
|
759
|
-
|
|
760
|
-
`Received insertion event for holder ${
|
|
761
|
-
),
|
|
762
|
-
|
|
763
|
-
const p =
|
|
758
|
+
const i = r.ingredientId, a = this.holders.getModel(r.path);
|
|
759
|
+
a && (this.logger.info(
|
|
760
|
+
`Received insertion event for holder ${a.path}`
|
|
761
|
+
), a.updateIngredient(i), a.slice.currentVolMl = (s = r.slice) == null ? void 0 : s.currentVolMl, a.slice.maxVolMl = (n = r.slice) == null ? void 0 : n.maxVolMl, (c = r == null ? void 0 : r.container) != null && c.enjoyByDate ? a.enjoyByDate = new Date(r.container.enjoyByDate) : a.enjoyByDate = void 0, r.pumps.forEach((l) => {
|
|
762
|
+
O(() => {
|
|
763
|
+
const p = a.pumps.getModel(l.path);
|
|
764
764
|
p && (p.ingredientId = l.ingredientId, p.inserted = l.inserted, p.prevIngredientId = l.prevIngredientId);
|
|
765
765
|
});
|
|
766
766
|
}));
|
|
@@ -769,92 +769,92 @@ let x = class {
|
|
|
769
769
|
}
|
|
770
770
|
// -------------------ENTITY----------------------------
|
|
771
771
|
};
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
],
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
topic:
|
|
772
|
+
me([
|
|
773
|
+
_
|
|
774
|
+
], B.prototype, "holders", 2);
|
|
775
|
+
me([
|
|
776
|
+
te({
|
|
777
|
+
topic: mr,
|
|
778
778
|
websocket: !0,
|
|
779
779
|
condition: (e, t) => t.holders.getModel(e.path) !== void 0
|
|
780
780
|
})
|
|
781
|
-
],
|
|
782
|
-
|
|
783
|
-
|
|
781
|
+
], B.prototype, "handleHolderEvents", 1);
|
|
782
|
+
me([
|
|
783
|
+
te({
|
|
784
784
|
topic: [
|
|
785
|
-
pr,
|
|
786
|
-
hr,
|
|
787
|
-
ur,
|
|
788
785
|
gr,
|
|
789
|
-
|
|
786
|
+
ur,
|
|
787
|
+
Pr,
|
|
788
|
+
yr,
|
|
789
|
+
Ir
|
|
790
790
|
],
|
|
791
791
|
websocket: !0
|
|
792
792
|
})
|
|
793
|
-
],
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
],
|
|
797
|
-
const
|
|
793
|
+
], B.prototype, "handleInsertion", 1);
|
|
794
|
+
B = me([
|
|
795
|
+
P(Z)
|
|
796
|
+
], B);
|
|
797
|
+
const at = {
|
|
798
798
|
registration: {
|
|
799
|
-
[
|
|
800
|
-
class:
|
|
799
|
+
[Z]: {
|
|
800
|
+
class: B,
|
|
801
801
|
singleton: !0
|
|
802
802
|
}
|
|
803
803
|
},
|
|
804
|
-
type:
|
|
805
|
-
predicate: b(
|
|
804
|
+
type: Z,
|
|
805
|
+
predicate: b(Z),
|
|
806
806
|
factory: v.Singleton.create(
|
|
807
|
-
|
|
807
|
+
Z
|
|
808
808
|
)
|
|
809
|
-
},
|
|
810
|
-
const t = await
|
|
809
|
+
}, fr = m.createLogger({ name: "board-utils" }), vr = async (e) => {
|
|
810
|
+
const t = await A.executeDataMapperExtension({
|
|
811
811
|
extension: h.BoardMapper,
|
|
812
812
|
data: e,
|
|
813
813
|
contextData: {}
|
|
814
|
-
}), { type: r, name:
|
|
814
|
+
}), { type: r, name: i, path: a, linked: s, instanceId: n, ...c } = e, l = { ...c, ...t }, p = {
|
|
815
815
|
type: r,
|
|
816
|
-
name:
|
|
817
|
-
path:
|
|
816
|
+
name: i,
|
|
817
|
+
path: a,
|
|
818
818
|
linked: s,
|
|
819
819
|
instanceId: n,
|
|
820
820
|
...l
|
|
821
|
-
},
|
|
822
|
-
return
|
|
823
|
-
},
|
|
824
|
-
|
|
825
|
-
const r = await
|
|
821
|
+
}, u = rt.factory(e.path)(p);
|
|
822
|
+
return u.updateModel(p), u;
|
|
823
|
+
}, br = (e) => async (t) => {
|
|
824
|
+
fr.debug(`adding board ${t.name}`);
|
|
825
|
+
const r = await vr(t);
|
|
826
826
|
e.addModel(r);
|
|
827
827
|
};
|
|
828
|
-
var d = /* @__PURE__ */ ((e) => (e.IDLE = "IDLE", e.POURING = "POURING", e.POUR_STARTING = "POUR_STARTING", e.POUR_CANCELING = "POUR_CANCELING", e
|
|
829
|
-
const { URL:
|
|
830
|
-
basePath: `${
|
|
828
|
+
var d = /* @__PURE__ */ ((e) => (e.IDLE = "IDLE", e.POURING = "POURING", e.POUR_STARTING = "POUR_STARTING", e.POUR_CANCELING = "POUR_CANCELING", e))(d || {});
|
|
829
|
+
const { URL: Ce } = N("PUMP_SERVICE"), { postModel: Or, getOne: _r } = $.build({
|
|
830
|
+
basePath: `${Ce}/api/kos/holders`
|
|
831
831
|
});
|
|
832
|
-
|
|
832
|
+
m.createLogger({
|
|
833
833
|
name: "pump-service",
|
|
834
834
|
group: "Services"
|
|
835
835
|
});
|
|
836
|
-
const
|
|
836
|
+
const Er = async ({
|
|
837
837
|
intent: e,
|
|
838
838
|
pumpId: t,
|
|
839
839
|
tracker: r
|
|
840
840
|
}) => {
|
|
841
|
-
const
|
|
842
|
-
return
|
|
841
|
+
const i = `${Ce}/api/ext/dispense/nozzle/nozzle/pipeline/ingredient/pour/${t}/${e}`, a = await Or({ model: {}, urlOverride: i, tracker: r });
|
|
842
|
+
return a != null && a.data && he.initiateFuture(a.data), a;
|
|
843
843
|
}, Mr = async (e, t) => {
|
|
844
|
-
const r = `${
|
|
845
|
-
return
|
|
844
|
+
const r = `${Ce}/api/ext/dispense/nozzle/nozzle/pipeline/ingredient/intent/${e}/${t}/volume`, i = await _r({ urlOverride: r });
|
|
845
|
+
return i != null && i.data ? i.data : { volume: -1 };
|
|
846
846
|
};
|
|
847
|
-
var
|
|
848
|
-
for (var
|
|
849
|
-
(n = e[s]) && (
|
|
850
|
-
return
|
|
847
|
+
var wr = Object.defineProperty, Rr = Object.getOwnPropertyDescriptor, st = (e, t, r, i) => {
|
|
848
|
+
for (var a = i > 1 ? void 0 : i ? Rr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
849
|
+
(n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
|
|
850
|
+
return i && a && wr(t, r, a), a;
|
|
851
851
|
};
|
|
852
|
-
const
|
|
853
|
-
|
|
852
|
+
const X = S.Pump;
|
|
853
|
+
g[Me].register(
|
|
854
854
|
"pump",
|
|
855
|
-
|
|
855
|
+
or
|
|
856
856
|
);
|
|
857
|
-
let
|
|
857
|
+
let le = class {
|
|
858
858
|
constructor(e, t) {
|
|
859
859
|
o(this, "id");
|
|
860
860
|
o(this, "inserted");
|
|
@@ -873,30 +873,30 @@ let oe = class {
|
|
|
873
873
|
this.id = e;
|
|
874
874
|
const {
|
|
875
875
|
inserted: r,
|
|
876
|
-
holderPath:
|
|
877
|
-
boardPath:
|
|
876
|
+
holderPath: i,
|
|
877
|
+
boardPath: a,
|
|
878
878
|
nozzlePath: s,
|
|
879
879
|
name: n,
|
|
880
880
|
path: c,
|
|
881
881
|
childPump: l,
|
|
882
882
|
virtual: p,
|
|
883
|
-
prevIngredientId:
|
|
884
|
-
...
|
|
883
|
+
prevIngredientId: u,
|
|
884
|
+
...j
|
|
885
885
|
} = t;
|
|
886
|
-
this.inserted = r, this.type = t.type, this.ingredientId = t.ingredientId, this.holderPath =
|
|
886
|
+
this.inserted = r, this.type = t.type, this.ingredientId = t.ingredientId, this.holderPath = i, this.boardPath = a, this.nozzlePath = s, this.name = n, this.path = c, this.childPump = !!l, this.virtual = !!p, this.prevIngredientId = u, Object.assign(this, j), this.futureHandler = new Ge(this);
|
|
887
887
|
}
|
|
888
888
|
updateModel(e) {
|
|
889
889
|
const {
|
|
890
890
|
inserted: t,
|
|
891
891
|
holderPath: r,
|
|
892
|
-
boardPath:
|
|
893
|
-
nozzlePath:
|
|
892
|
+
boardPath: i,
|
|
893
|
+
nozzlePath: a,
|
|
894
894
|
childPump: s,
|
|
895
895
|
name: n,
|
|
896
896
|
path: c,
|
|
897
897
|
...l
|
|
898
898
|
} = e;
|
|
899
|
-
this.inserted = t, this.type = e.type, this.ingredientId = e.ingredientId, this.holderPath = r, this.boardPath =
|
|
899
|
+
this.inserted = t, this.type = e.type, this.ingredientId = e.ingredientId, this.holderPath = r, this.boardPath = i, this.nozzlePath = a, this.childPump = this.childPump ? this.childPump : !!s, this.name = n, this.path = c, this.prevIngredientId = e.prevIngredientId, Object.assign(this, l);
|
|
900
900
|
}
|
|
901
901
|
// -------------------LIFECYCLE----------------------------
|
|
902
902
|
get pouringState() {
|
|
@@ -911,15 +911,15 @@ let oe = class {
|
|
|
911
911
|
return !!this.ingredientId && !this.isPouring;
|
|
912
912
|
}
|
|
913
913
|
onFutureUpdate(e) {
|
|
914
|
-
e.endState &&
|
|
914
|
+
e.endState && O(() => {
|
|
915
915
|
this.currentState = d.IDLE;
|
|
916
916
|
});
|
|
917
917
|
}
|
|
918
918
|
async cancelPour() {
|
|
919
919
|
var e;
|
|
920
|
-
this.currentState === d.POURING || this.currentState === d.POUR_STARTING ? (this.currentState = d.POUR_CANCELING, await ((e = this.future) == null ? void 0 : e.cancelFuture()),
|
|
920
|
+
this.currentState === d.POURING || this.currentState === d.POUR_STARTING ? (this.currentState = d.POUR_CANCELING, await ((e = this.future) == null ? void 0 : e.cancelFuture()), O(() => {
|
|
921
921
|
this.currentState = d.IDLE;
|
|
922
|
-
})) :
|
|
922
|
+
})) : m.warn(`Cannot cancel pour in state ${this.currentState}`);
|
|
923
923
|
}
|
|
924
924
|
get future() {
|
|
925
925
|
return this.futureHandler.future;
|
|
@@ -935,40 +935,40 @@ let oe = class {
|
|
|
935
935
|
if (this.currentState === d.IDLE) {
|
|
936
936
|
if (this.currentState = d.POUR_STARTING, !t)
|
|
937
937
|
throw new Error("No tracker provided");
|
|
938
|
-
const
|
|
938
|
+
const i = await Er({
|
|
939
939
|
tracker: t,
|
|
940
940
|
intent: r,
|
|
941
941
|
pumpId: this.path
|
|
942
942
|
});
|
|
943
|
-
return this.currentState === d.POUR_STARTING &&
|
|
943
|
+
return this.currentState === d.POUR_STARTING && O(() => {
|
|
944
944
|
this.currentState = d.POURING;
|
|
945
|
-
}),
|
|
945
|
+
}), i == null ? void 0 : i.data;
|
|
946
946
|
} else
|
|
947
947
|
throw new Error(`Cannot pour in state ${this.currentState}`);
|
|
948
|
-
} catch (
|
|
949
|
-
throw
|
|
948
|
+
} catch (i) {
|
|
949
|
+
throw m.error(i), this.currentState = d.IDLE, i;
|
|
950
950
|
}
|
|
951
951
|
}
|
|
952
952
|
// -------------------ENTITY----------------------------
|
|
953
953
|
};
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
],
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
],
|
|
960
|
-
const
|
|
954
|
+
st([
|
|
955
|
+
ge()
|
|
956
|
+
], le.prototype, "performIntent", 1);
|
|
957
|
+
le = st([
|
|
958
|
+
P(X)
|
|
959
|
+
], le);
|
|
960
|
+
const nt = {
|
|
961
961
|
registration: {
|
|
962
|
-
[
|
|
963
|
-
class:
|
|
962
|
+
[X]: {
|
|
963
|
+
class: le,
|
|
964
964
|
singleton: !1
|
|
965
965
|
}
|
|
966
966
|
},
|
|
967
|
-
type:
|
|
968
|
-
predicate: b(
|
|
969
|
-
factory: v.Factory.create(
|
|
970
|
-
},
|
|
971
|
-
const r = (t.pumps ?? []).length > 1,
|
|
967
|
+
type: X,
|
|
968
|
+
predicate: b(X),
|
|
969
|
+
factory: v.Factory.create(X)
|
|
970
|
+
}, Cr = m.createLogger({ name: "pump-utils" }), Nr = (e, t) => {
|
|
971
|
+
const r = (t.pumps ?? []).length > 1, i = {
|
|
972
972
|
boardPath: t.boardPath,
|
|
973
973
|
holderPath: t.holderPath,
|
|
974
974
|
ingredientId: t.ingredientId,
|
|
@@ -980,31 +980,31 @@ const rt = {
|
|
|
980
980
|
type: t.type,
|
|
981
981
|
nozzlePath: e,
|
|
982
982
|
prevIngredientId: t.prevIngredientId
|
|
983
|
-
},
|
|
984
|
-
return
|
|
985
|
-
},
|
|
983
|
+
}, a = nt.factory(t.path)(i);
|
|
984
|
+
return a.updateModel(i), a;
|
|
985
|
+
}, ot = (e) => (t) => (r) => (i) => {
|
|
986
986
|
var c;
|
|
987
|
-
|
|
988
|
-
const
|
|
989
|
-
e.addModel(
|
|
990
|
-
const s =
|
|
991
|
-
n == null || n.pumps.addModel(
|
|
992
|
-
const p =
|
|
987
|
+
Cr.debug(`adding pump ${i.name}`);
|
|
988
|
+
const a = Nr(r.path, i);
|
|
989
|
+
e.addModel(a);
|
|
990
|
+
const s = a.holderPath, n = t.holders.getModel(s);
|
|
991
|
+
n == null || n.pumps.addModel(a), n != null && n.nozzlePaths.includes(r.path) || n == null || n.nozzlePaths.push(r.path), (c = i == null ? void 0 : i.pumps) == null || c.forEach((l) => {
|
|
992
|
+
const p = a.holderPath, u = {
|
|
993
993
|
...l,
|
|
994
994
|
childPump: !0,
|
|
995
995
|
holderPath: p,
|
|
996
|
-
ingredientId:
|
|
996
|
+
ingredientId: a.ingredientId
|
|
997
997
|
};
|
|
998
|
-
|
|
998
|
+
ot(e)(t)(r)(u);
|
|
999
999
|
});
|
|
1000
1000
|
};
|
|
1001
|
-
var
|
|
1002
|
-
for (var
|
|
1003
|
-
(n = e[s]) && (
|
|
1004
|
-
return
|
|
1001
|
+
var $r = Object.defineProperty, Dr = Object.getOwnPropertyDescriptor, ie = (e, t, r, i) => {
|
|
1002
|
+
for (var a = i > 1 ? void 0 : i ? Dr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
1003
|
+
(n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
|
|
1004
|
+
return i && a && $r(t, r, a), a;
|
|
1005
1005
|
};
|
|
1006
|
-
const
|
|
1007
|
-
let
|
|
1006
|
+
const J = "assembly-model", Sr = "assembly-data", Tr = "assembly-raw-data";
|
|
1007
|
+
let C = class {
|
|
1008
1008
|
constructor(e, t, r) {
|
|
1009
1009
|
o(this, "id");
|
|
1010
1010
|
o(this, "_nozzlePaths", /* @__PURE__ */ new Set());
|
|
@@ -1013,7 +1013,7 @@ let w = class {
|
|
|
1013
1013
|
o(this, "boardContainer");
|
|
1014
1014
|
o(this, "pumpContainer");
|
|
1015
1015
|
o(this, "logger");
|
|
1016
|
-
this.id = e, this.holderContainer =
|
|
1016
|
+
this.id = e, this.holderContainer = at.factory({}), this.boardContainer = it.factory({}), this.pumpContainer = Re.factory({}), this.logger = r.logger;
|
|
1017
1017
|
}
|
|
1018
1018
|
updateModel(e) {
|
|
1019
1019
|
}
|
|
@@ -1056,93 +1056,93 @@ let w = class {
|
|
|
1056
1056
|
}
|
|
1057
1057
|
async ready() {
|
|
1058
1058
|
var e;
|
|
1059
|
-
(e = this.troubleContainer) == null || e.troubles.increment(),
|
|
1059
|
+
(e = this.troubleContainer) == null || e.troubles.increment(), g[It].execute(
|
|
1060
1060
|
h.AssemblyFeatureFlags,
|
|
1061
1061
|
this
|
|
1062
1062
|
);
|
|
1063
1063
|
}
|
|
1064
1064
|
async load(e) {
|
|
1065
1065
|
this.logger.debug(`loading assembly ${this.id}`);
|
|
1066
|
-
const t = await
|
|
1066
|
+
const t = await Je();
|
|
1067
1067
|
if ((t == null ? void 0 : t.status) === 200) {
|
|
1068
|
-
const r = await
|
|
1068
|
+
const r = await A.executeDataMapperExtension({
|
|
1069
1069
|
extension: h.AssemblyMapper,
|
|
1070
1070
|
data: t.data,
|
|
1071
1071
|
contextData: {}
|
|
1072
1072
|
});
|
|
1073
|
-
e.set(
|
|
1074
|
-
|
|
1075
|
-
}), e.set(
|
|
1076
|
-
for await (const
|
|
1073
|
+
e.set(Sr, r), Object.assign(this, r), Object.entries(r).forEach(([i, a]) => {
|
|
1074
|
+
mt(a) && (this.logger.debug(`adding child model ${i} from extension data`), this[ft][i] = !0);
|
|
1075
|
+
}), e.set(Tr, t.data);
|
|
1076
|
+
for await (const i of t.data.assemblies) {
|
|
1077
1077
|
const {
|
|
1078
|
-
boards:
|
|
1078
|
+
boards: a = [],
|
|
1079
1079
|
holders: s = {},
|
|
1080
1080
|
nozzles: n = [],
|
|
1081
1081
|
core: c,
|
|
1082
1082
|
name: l,
|
|
1083
1083
|
path: p,
|
|
1084
|
-
...
|
|
1085
|
-
} =
|
|
1086
|
-
this.logger.debug(`adding assembly ${l}`), Object.keys(
|
|
1087
|
-
|
|
1084
|
+
...u
|
|
1085
|
+
} = i;
|
|
1086
|
+
this.logger.debug(`adding assembly ${l}`), Object.keys(u).forEach((y) => {
|
|
1087
|
+
vt.enableFeature(y);
|
|
1088
1088
|
});
|
|
1089
|
-
for await (const
|
|
1090
|
-
this.logger.debug(`adding board ${
|
|
1091
|
-
for await (const [
|
|
1089
|
+
for await (const y of a)
|
|
1090
|
+
this.logger.debug(`adding board ${y.name}`), await br(this.boardContainer)(y);
|
|
1091
|
+
for await (const [y, L] of Object.entries(
|
|
1092
1092
|
s ?? {}
|
|
1093
1093
|
))
|
|
1094
|
-
for await (const
|
|
1095
|
-
this.logger.debug(`adding holder ${
|
|
1096
|
-
const
|
|
1097
|
-
this.holderContainer.holders.addModel(
|
|
1094
|
+
for await (const ae of L) {
|
|
1095
|
+
this.logger.debug(`adding holder ${ae.name}`);
|
|
1096
|
+
const De = await Wt(y, ae);
|
|
1097
|
+
this.holderContainer.holders.addModel(De);
|
|
1098
1098
|
}
|
|
1099
|
-
const
|
|
1099
|
+
const j = ot(this.pumpContainer)(
|
|
1100
1100
|
this.holderContainer
|
|
1101
1101
|
);
|
|
1102
|
-
n.forEach((
|
|
1103
|
-
this._nozzlePaths.add(
|
|
1104
|
-
const
|
|
1105
|
-
|
|
1102
|
+
n.forEach((y) => {
|
|
1103
|
+
this._nozzlePaths.add(y.path);
|
|
1104
|
+
const L = j(y);
|
|
1105
|
+
y.pumps.forEach(L);
|
|
1106
1106
|
});
|
|
1107
1107
|
}
|
|
1108
1108
|
}
|
|
1109
1109
|
}
|
|
1110
1110
|
};
|
|
1111
|
-
|
|
1112
|
-
|
|
1111
|
+
ie([
|
|
1112
|
+
xe({
|
|
1113
1113
|
modelType: "trouble-container-model"
|
|
1114
1114
|
})
|
|
1115
|
-
],
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
],
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
],
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
],
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
],
|
|
1128
|
-
const
|
|
1115
|
+
], C.prototype, "troubleContainer", 2);
|
|
1116
|
+
ie([
|
|
1117
|
+
_
|
|
1118
|
+
], C.prototype, "holderContainer", 2);
|
|
1119
|
+
ie([
|
|
1120
|
+
_
|
|
1121
|
+
], C.prototype, "boardContainer", 2);
|
|
1122
|
+
ie([
|
|
1123
|
+
_
|
|
1124
|
+
], C.prototype, "pumpContainer", 2);
|
|
1125
|
+
C = ie([
|
|
1126
|
+
P(J)
|
|
1127
|
+
], C);
|
|
1128
|
+
const dt = {
|
|
1129
1129
|
registration: {
|
|
1130
|
-
[
|
|
1131
|
-
class:
|
|
1130
|
+
[J]: {
|
|
1131
|
+
class: C,
|
|
1132
1132
|
singleton: !0
|
|
1133
1133
|
}
|
|
1134
1134
|
},
|
|
1135
|
-
type:
|
|
1136
|
-
predicate: b(
|
|
1137
|
-
factory: v.Singleton.create(
|
|
1135
|
+
type: J,
|
|
1136
|
+
predicate: b(J),
|
|
1137
|
+
factory: v.Singleton.create(J)
|
|
1138
1138
|
};
|
|
1139
|
-
var
|
|
1140
|
-
for (var
|
|
1141
|
-
(n = e[s]) && (
|
|
1142
|
-
return
|
|
1139
|
+
var Lr = Object.getOwnPropertyDescriptor, Ar = (e, t, r, i) => {
|
|
1140
|
+
for (var a = i > 1 ? void 0 : i ? Lr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
1141
|
+
(n = e[s]) && (a = n(a) || a);
|
|
1142
|
+
return a;
|
|
1143
1143
|
};
|
|
1144
|
-
const
|
|
1145
|
-
let
|
|
1144
|
+
const q = S.Availability;
|
|
1145
|
+
let _e = class {
|
|
1146
1146
|
constructor(e, t, r) {
|
|
1147
1147
|
o(this, "id");
|
|
1148
1148
|
o(this, "data");
|
|
@@ -1168,80 +1168,78 @@ let Pe = class {
|
|
|
1168
1168
|
// -------------------LIFECYCLE----------------------------
|
|
1169
1169
|
// -------------------ENTITY----------------------------
|
|
1170
1170
|
};
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
],
|
|
1175
|
-
const
|
|
1171
|
+
_e = Ar([
|
|
1172
|
+
bt(),
|
|
1173
|
+
P(q)
|
|
1174
|
+
], _e);
|
|
1175
|
+
const Ee = {
|
|
1176
1176
|
registration: {
|
|
1177
|
-
[
|
|
1178
|
-
class:
|
|
1177
|
+
[q]: {
|
|
1178
|
+
class: _e,
|
|
1179
1179
|
singleton: !1
|
|
1180
1180
|
}
|
|
1181
1181
|
},
|
|
1182
|
-
type:
|
|
1183
|
-
predicate: b(
|
|
1182
|
+
type: q,
|
|
1183
|
+
predicate: b(q),
|
|
1184
1184
|
factory: v.Factory.create(
|
|
1185
|
-
|
|
1185
|
+
q
|
|
1186
1186
|
)
|
|
1187
|
-
}, { URL:
|
|
1188
|
-
basePath: `${
|
|
1187
|
+
}, { URL: G } = N("NOZZLE_SERVICE"), { postModel: Ne, deleteModel: Ur, getOne: zr } = $.build({
|
|
1188
|
+
basePath: `${G}/api/nozzle`
|
|
1189
1189
|
}), xr = async (e, t) => {
|
|
1190
|
-
const r = await
|
|
1190
|
+
const r = await Ne({
|
|
1191
1191
|
model: {},
|
|
1192
|
-
urlOverride: `${
|
|
1192
|
+
urlOverride: `${G}/api/ext/dispense/nozzle/${e}/pipeline/beverage/pour`,
|
|
1193
1193
|
ordered: !0,
|
|
1194
1194
|
tracker: t
|
|
1195
1195
|
});
|
|
1196
|
-
return r != null && r.data &&
|
|
1197
|
-
},
|
|
1198
|
-
const
|
|
1196
|
+
return r != null && r.data && he.initiateFuture(r.data), r;
|
|
1197
|
+
}, Br = async (e, t, r) => {
|
|
1198
|
+
const i = await Ne({
|
|
1199
1199
|
model: {},
|
|
1200
|
-
urlOverride: `${
|
|
1200
|
+
urlOverride: `${G}/api/ext/dispense/nozzle/${t}/pipeline/beverage/fixed/${e}`,
|
|
1201
1201
|
ordered: !0,
|
|
1202
1202
|
tracker: r
|
|
1203
1203
|
});
|
|
1204
|
-
return
|
|
1205
|
-
},
|
|
1206
|
-
urlOverride: `${
|
|
1207
|
-
}),
|
|
1204
|
+
return i != null && i.data && he.initiateFuture(i.data), i;
|
|
1205
|
+
}, Gr = async (e) => await zr({
|
|
1206
|
+
urlOverride: `${G}${e}/pipeline/beverage/availability`
|
|
1207
|
+
}), jr = async (e, t) => await Ne({
|
|
1208
1208
|
model: t,
|
|
1209
|
-
urlOverride: `${
|
|
1210
|
-
}),
|
|
1209
|
+
urlOverride: `${G}/api/ext/dispense/nozzle/${e}/pipeline/beverage/select`
|
|
1210
|
+
}), Fr = async (e) => await Ur({
|
|
1211
1211
|
id: e,
|
|
1212
|
-
urlOverride: `${
|
|
1212
|
+
urlOverride: `${G}/api/ext/dispense/nozzle/${e}/pipeline/beverage/select`
|
|
1213
1213
|
});
|
|
1214
|
-
var
|
|
1215
|
-
for (var
|
|
1216
|
-
(n = e[s]) && (
|
|
1217
|
-
return
|
|
1214
|
+
var Hr = Object.defineProperty, Vr = Object.getOwnPropertyDescriptor, E = (e, t, r, i) => {
|
|
1215
|
+
for (var a = i > 1 ? void 0 : i ? Vr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
1216
|
+
(n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
|
|
1217
|
+
return i && a && Hr(t, r, a), a;
|
|
1218
1218
|
};
|
|
1219
|
-
const
|
|
1219
|
+
const W = S.Nozzle, Kr = Ot(
|
|
1220
1220
|
"beverageTopicPrefix"
|
|
1221
|
-
),
|
|
1222
|
-
let
|
|
1223
|
-
constructor(e, t
|
|
1221
|
+
), fe = (e) => e.onPourStart !== void 0 && e.onPourCancel !== void 0 && e.onPourProgress !== void 0, Ue = "/kos/nozzle/pour/started", kr = "/kos/nozzle/pour/progress", Yr = "/kos/nozzle/pour/cancel";
|
|
1222
|
+
let I = class {
|
|
1223
|
+
constructor(e, t) {
|
|
1224
1224
|
/** the unique identifier for this nozzle.*/
|
|
1225
1225
|
o(this, "id");
|
|
1226
1226
|
o(this, "path");
|
|
1227
|
-
o(this, "logger");
|
|
1228
1227
|
o(this, "name");
|
|
1229
1228
|
o(this, "_selectedBeverage");
|
|
1230
1229
|
o(this, "_selectedBrand");
|
|
1231
1230
|
o(this, "_additionalItems");
|
|
1232
1231
|
o(this, "_availabilityItems");
|
|
1233
1232
|
o(this, "futureHandler");
|
|
1234
|
-
o(this, "currentState", d.IDLE);
|
|
1235
1233
|
o(this, "beverageTopicPrefix");
|
|
1236
1234
|
o(this, "topicPrefix");
|
|
1237
1235
|
o(this, "urlPrefix");
|
|
1238
|
-
this.id = e, this.path = t.path, this.name = t.name, this.beverageTopicPrefix = t.beverageTopicPrefix, this.topicPrefix = t.topicPrefix, this.urlPrefix = t.urlPrefix, this._selectedBeverage = void 0, this._selectedBrand = void 0, this._additionalItems = [], this.futureHandler = new
|
|
1236
|
+
this.id = e, this.path = t.path, this.name = t.name, this.beverageTopicPrefix = t.beverageTopicPrefix, this.topicPrefix = t.topicPrefix, this.urlPrefix = t.urlPrefix, this._selectedBeverage = void 0, this._selectedBrand = void 0, this._additionalItems = [], this.futureHandler = new _t(this), this._availabilityItems = new D({
|
|
1239
1237
|
indexMap: {
|
|
1240
1238
|
byGroup: "groupId",
|
|
1241
1239
|
byParent: "parentId"
|
|
1242
1240
|
},
|
|
1243
1241
|
parentId: e
|
|
1244
|
-
})
|
|
1242
|
+
});
|
|
1245
1243
|
}
|
|
1246
1244
|
/**
|
|
1247
1245
|
* The availability nodes that can be dispensed from this nozzle.
|
|
@@ -1327,18 +1325,18 @@ let $ = class {
|
|
|
1327
1325
|
context: r
|
|
1328
1326
|
}) {
|
|
1329
1327
|
if (!e) {
|
|
1330
|
-
const c = await
|
|
1328
|
+
const c = await Fr(this.name);
|
|
1331
1329
|
if ((c == null ? void 0 : c.status) !== 200)
|
|
1332
1330
|
throw new Error("Failed to clear pourable");
|
|
1333
1331
|
this._selectedBeverage = void 0;
|
|
1334
1332
|
return;
|
|
1335
1333
|
}
|
|
1336
|
-
if (e === this._selectedBeverage &&
|
|
1334
|
+
if (e === this._selectedBeverage && Et(this._additionalItems, t)) {
|
|
1337
1335
|
this.logger.info("No change in selected pourable");
|
|
1338
1336
|
return;
|
|
1339
1337
|
}
|
|
1340
1338
|
this._selectedBeverage = e, this._additionalItems = t;
|
|
1341
|
-
let
|
|
1339
|
+
let i = await g.dataMapper.executeMapper(
|
|
1342
1340
|
h.SelectedPourableMapper,
|
|
1343
1341
|
{
|
|
1344
1342
|
beverage: e,
|
|
@@ -1346,13 +1344,13 @@ let $ = class {
|
|
|
1346
1344
|
context: r
|
|
1347
1345
|
}
|
|
1348
1346
|
);
|
|
1349
|
-
const
|
|
1347
|
+
const a = {
|
|
1350
1348
|
bevId: e.rawId
|
|
1351
1349
|
};
|
|
1352
|
-
(!
|
|
1353
|
-
`No selected pourable mapper defined, using the default payload ${
|
|
1354
|
-
),
|
|
1355
|
-
const s =
|
|
1350
|
+
(!i || Object.keys(i).length === 0) && (this.logger.info(
|
|
1351
|
+
`No selected pourable mapper defined, using the default payload ${a}`
|
|
1352
|
+
), i = a);
|
|
1353
|
+
const s = i ?? a, n = await jr(this.name, s);
|
|
1356
1354
|
if ((n == null ? void 0 : n.status) !== 200)
|
|
1357
1355
|
throw new Error("Failed to select pourable");
|
|
1358
1356
|
}
|
|
@@ -1386,14 +1384,34 @@ let $ = class {
|
|
|
1386
1384
|
e
|
|
1387
1385
|
);
|
|
1388
1386
|
}
|
|
1389
|
-
|
|
1390
|
-
this.
|
|
1391
|
-
|
|
1387
|
+
handlePouringStart() {
|
|
1388
|
+
this.logger.info("Pour started"), U(this).forEach((e) => {
|
|
1389
|
+
var t;
|
|
1390
|
+
fe(e) && ((t = e.onPourStart) == null || t.call(e));
|
|
1392
1391
|
});
|
|
1393
1392
|
}
|
|
1393
|
+
handlePouringEnd() {
|
|
1394
|
+
this.logger.info("Pour ended");
|
|
1395
|
+
}
|
|
1396
|
+
handleCancelStart() {
|
|
1397
|
+
this.logger.info("Pour canceling");
|
|
1398
|
+
}
|
|
1399
|
+
handleCanceled() {
|
|
1400
|
+
this.logger.info("Pour canceled"), U(this).forEach((t) => {
|
|
1401
|
+
var r;
|
|
1402
|
+
fe(t) && ((r = t.onPourCancel) == null || r.call(t));
|
|
1403
|
+
});
|
|
1404
|
+
const e = {
|
|
1405
|
+
nozzleId: this.id
|
|
1406
|
+
};
|
|
1407
|
+
R.publish(Yr, e);
|
|
1408
|
+
}
|
|
1409
|
+
// ============================================================================
|
|
1410
|
+
// Future Lifecycle Handler
|
|
1411
|
+
// ============================================================================
|
|
1394
1412
|
onFutureUpdate(e) {
|
|
1395
|
-
|
|
1396
|
-
|
|
1413
|
+
U(this).forEach((i) => {
|
|
1414
|
+
fe(i) && i.onPourProgress(e);
|
|
1397
1415
|
});
|
|
1398
1416
|
const r = {
|
|
1399
1417
|
nozzleId: this.id,
|
|
@@ -1406,114 +1424,74 @@ let $ = class {
|
|
|
1406
1424
|
reason: e.reason,
|
|
1407
1425
|
timeRemaining: e.timeRemaining
|
|
1408
1426
|
};
|
|
1409
|
-
|
|
1410
|
-
this.currentState
|
|
1427
|
+
R.publish(kr, r), e.endState && O(() => {
|
|
1428
|
+
this.currentState === d.POURING && this.transition("POUR_COMPLETED");
|
|
1411
1429
|
});
|
|
1412
1430
|
}
|
|
1431
|
+
// Inherits throwOnInvalid: false from class
|
|
1413
1432
|
async pour(e) {
|
|
1414
1433
|
var t;
|
|
1415
1434
|
try {
|
|
1416
|
-
if (this.
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
nozzleId: this.id,
|
|
1426
|
-
type: "free"
|
|
1427
|
-
};
|
|
1428
|
-
if (_.publish(Ne, a), (t = r == null ? void 0 : r.data) != null && t.endState) {
|
|
1429
|
-
this.updateIfCurrent(d.POURING, d.IDLE);
|
|
1430
|
-
const i = {
|
|
1431
|
-
nozzleId: this.id
|
|
1432
|
-
};
|
|
1433
|
-
_.publish(ye, i);
|
|
1434
|
-
}
|
|
1435
|
-
return r;
|
|
1436
|
-
} else
|
|
1437
|
-
throw new Error(`Cannot pour in state ${this.currentState}`);
|
|
1435
|
+
if (this.transition("START_POUR"), !e)
|
|
1436
|
+
throw new Error("No tracker provided");
|
|
1437
|
+
const r = await xr(this.name, e);
|
|
1438
|
+
this.transition("POUR_ACTIVE");
|
|
1439
|
+
const i = {
|
|
1440
|
+
nozzleId: this.id,
|
|
1441
|
+
type: "free"
|
|
1442
|
+
};
|
|
1443
|
+
return R.publish(Ue, i), (t = r == null ? void 0 : r.data) != null && t.endState && this.transition("POUR_COMPLETED"), r;
|
|
1438
1444
|
} catch (r) {
|
|
1439
|
-
throw this.logger.error(r), this.currentState
|
|
1445
|
+
throw this.logger.error(r), this.currentState !== d.IDLE && this.transition("POUR_COMPLETED"), r;
|
|
1440
1446
|
}
|
|
1441
1447
|
}
|
|
1448
|
+
// Inherits throwOnInvalid: false from class
|
|
1442
1449
|
async fixedPour(e, t) {
|
|
1443
1450
|
var r;
|
|
1444
1451
|
try {
|
|
1445
|
-
if (this.
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
nozzleId: this.id,
|
|
1457
|
-
type: "fixed"
|
|
1458
|
-
};
|
|
1459
|
-
if (_.publish(Ne, i), (r = a == null ? void 0 : a.data) != null && r.endState) {
|
|
1460
|
-
this.updateIfCurrent(d.POURING, d.IDLE);
|
|
1461
|
-
const s = {
|
|
1462
|
-
nozzleId: this.id
|
|
1463
|
-
};
|
|
1464
|
-
_.publish(ye, s);
|
|
1465
|
-
}
|
|
1466
|
-
return a;
|
|
1467
|
-
} else
|
|
1468
|
-
throw new Error(`Cannot pour in state ${this.currentState}`);
|
|
1469
|
-
} catch (a) {
|
|
1470
|
-
throw this.logger.error(a), this.currentState = d.IDLE, a;
|
|
1452
|
+
if (this.transition("START_POUR"), !t)
|
|
1453
|
+
throw new Error("No tracker provided");
|
|
1454
|
+
const i = await Br(e, this.name, t);
|
|
1455
|
+
this.transition("POUR_ACTIVE");
|
|
1456
|
+
const a = {
|
|
1457
|
+
nozzleId: this.id,
|
|
1458
|
+
type: "fixed"
|
|
1459
|
+
};
|
|
1460
|
+
return R.publish(Ue, a), (r = i == null ? void 0 : i.data) != null && r.endState && this.transition("POUR_COMPLETED"), i;
|
|
1461
|
+
} catch (i) {
|
|
1462
|
+
throw this.logger.error(i), this.currentState !== d.IDLE && this.transition("POUR_COMPLETED"), i;
|
|
1471
1463
|
}
|
|
1472
1464
|
}
|
|
1473
|
-
|
|
1474
|
-
* An action that will cancel a pour for this nozzle.
|
|
1475
|
-
* */
|
|
1465
|
+
// Inherits throwOnInvalid: false - silently ignore if already idle
|
|
1476
1466
|
async cancelPour() {
|
|
1477
1467
|
var e;
|
|
1478
|
-
|
|
1479
|
-
this.currentState = d.POUR_CANCELING, await ((e = this.futureHandler.getFuture()) == null ? void 0 : e.cancelFuture()), g(() => {
|
|
1480
|
-
this.currentState = d.IDLE;
|
|
1481
|
-
}), E(this).forEach((r) => {
|
|
1482
|
-
var a;
|
|
1483
|
-
re(r) && ((a = r.onPourCancel) == null || a.call(r));
|
|
1484
|
-
});
|
|
1485
|
-
const t = {
|
|
1486
|
-
nozzleId: this.id
|
|
1487
|
-
};
|
|
1488
|
-
_.publish(ye, t);
|
|
1489
|
-
} else
|
|
1490
|
-
this.logger.warn(`Cannot cancel pour in state ${this.currentState}`);
|
|
1468
|
+
this.transition("CANCEL_POUR"), await ((e = this.futureHandler.getFuture()) == null ? void 0 : e.cancelFuture()), this.transition("POUR_CANCELED");
|
|
1491
1469
|
}
|
|
1492
1470
|
updateGroupMembers() {
|
|
1493
1471
|
this._availabilityItems.data.forEach((e) => {
|
|
1494
1472
|
(e.taggedIds || []).forEach((r) => {
|
|
1495
|
-
const
|
|
1496
|
-
(
|
|
1473
|
+
const i = this._availabilityItems.data.find(
|
|
1474
|
+
(a) => a.rawId === r
|
|
1497
1475
|
);
|
|
1498
|
-
|
|
1476
|
+
i && i.parentId !== e.id && (i.parentId = e.id, this._availabilityItems.updateModel(i));
|
|
1499
1477
|
});
|
|
1500
1478
|
});
|
|
1501
1479
|
}
|
|
1502
1480
|
/** @internal */
|
|
1503
1481
|
async load(e) {
|
|
1504
|
-
var
|
|
1482
|
+
var i, a;
|
|
1505
1483
|
this.logger.debug(`loading nozzle ${this.id}`);
|
|
1506
|
-
const t = await
|
|
1484
|
+
const t = await Gr(this.urlPrefix);
|
|
1507
1485
|
if ((t == null ? void 0 : t.status) !== 200)
|
|
1508
1486
|
throw new Error("Failed to load nozzle availability");
|
|
1509
|
-
const r = await
|
|
1487
|
+
const r = await g.loader.executeLoader(
|
|
1510
1488
|
h.AvailabilityLoader,
|
|
1511
1489
|
{}
|
|
1512
1490
|
);
|
|
1513
|
-
e == null || e.set(h.AvailabilityLoader, r), e == null || e.set(
|
|
1514
|
-
for (const s of Object.keys((
|
|
1515
|
-
for (const n of ((
|
|
1516
|
-
const c = await
|
|
1491
|
+
e == null || e.set(h.AvailabilityLoader, r), e == null || e.set($e.type, this);
|
|
1492
|
+
for (const s of Object.keys((i = t.data) == null ? void 0 : i.groups) || [])
|
|
1493
|
+
for (const n of ((a = t.data) == null ? void 0 : a.groups[s]) || []) {
|
|
1494
|
+
const c = await g.dataMapper.executeMapper(
|
|
1517
1495
|
h.AvailabilityMapper,
|
|
1518
1496
|
{ ...n, groupId: s },
|
|
1519
1497
|
r
|
|
@@ -1525,7 +1503,7 @@ let $ = class {
|
|
|
1525
1503
|
groupId: s,
|
|
1526
1504
|
data: c,
|
|
1527
1505
|
properties: n.properties || {}
|
|
1528
|
-
}, p =
|
|
1506
|
+
}, p = Ee.factory(
|
|
1529
1507
|
`${this.id}-${s}-${n.id}`
|
|
1530
1508
|
)(l);
|
|
1531
1509
|
this._availabilityItems.addModel(p);
|
|
@@ -1533,62 +1511,62 @@ let $ = class {
|
|
|
1533
1511
|
this.updateGroupMembers();
|
|
1534
1512
|
}
|
|
1535
1513
|
async updateAvailability(e) {
|
|
1536
|
-
const t =
|
|
1514
|
+
const t = Mt.getContext(this.id), r = (t == null ? void 0 : t.get(h.AvailabilityLoader)) || {};
|
|
1537
1515
|
if (e.rebuild)
|
|
1538
|
-
for (const
|
|
1539
|
-
this._availabilityItems.getIndexByKey("group",
|
|
1540
|
-
(s) => !e.groups[
|
|
1541
|
-
(n) => `${this.id}-${
|
|
1516
|
+
for (const i of Object.keys(e == null ? void 0 : e.groups) || []) {
|
|
1517
|
+
this._availabilityItems.getIndexByKey("group", i).filter(
|
|
1518
|
+
(s) => !e.groups[i].find(
|
|
1519
|
+
(n) => `${this.id}-${i}-${n.id}` === s.id
|
|
1542
1520
|
)
|
|
1543
1521
|
).forEach((s) => {
|
|
1544
|
-
this._availabilityItems.removeModel(s.id),
|
|
1522
|
+
this._availabilityItems.removeModel(s.id), wt(s);
|
|
1545
1523
|
});
|
|
1546
|
-
for (const s of (e == null ? void 0 : e.groups[
|
|
1547
|
-
const n = await
|
|
1524
|
+
for (const s of (e == null ? void 0 : e.groups[i]) || []) {
|
|
1525
|
+
const n = await g.dataMapper.executeMapper(
|
|
1548
1526
|
h.AvailabilityMapper,
|
|
1549
|
-
{ ...s, groupId:
|
|
1527
|
+
{ ...s, groupId: i },
|
|
1550
1528
|
r
|
|
1551
1529
|
), c = {
|
|
1552
1530
|
...s,
|
|
1553
1531
|
note: s.note ?? void 0,
|
|
1554
1532
|
kosParentId: this.id,
|
|
1555
|
-
groupId:
|
|
1533
|
+
groupId: i,
|
|
1556
1534
|
rawId: s.id,
|
|
1557
1535
|
data: n,
|
|
1558
1536
|
taggedIds: s.taggedIds,
|
|
1559
1537
|
properties: s.properties || {}
|
|
1560
1538
|
}, l = this._availabilityItems.getModel(
|
|
1561
|
-
`${this.id}-${
|
|
1539
|
+
`${this.id}-${i}-${s.id}`
|
|
1562
1540
|
);
|
|
1563
1541
|
if (l)
|
|
1564
1542
|
l.updateModel(c);
|
|
1565
1543
|
else {
|
|
1566
|
-
const p =
|
|
1567
|
-
`${this.id}-${
|
|
1544
|
+
const p = Ee.factory(
|
|
1545
|
+
`${this.id}-${i}-${s.id}`
|
|
1568
1546
|
)(c);
|
|
1569
1547
|
this._availabilityItems.addModel(p);
|
|
1570
1548
|
}
|
|
1571
1549
|
}
|
|
1572
1550
|
}
|
|
1573
1551
|
else
|
|
1574
|
-
for (const
|
|
1575
|
-
for (const
|
|
1576
|
-
const s = await
|
|
1552
|
+
for (const i of Object.keys(e == null ? void 0 : e.groups) || [])
|
|
1553
|
+
for (const a of (e == null ? void 0 : e.groups[i]) || []) {
|
|
1554
|
+
const s = await g.dataMapper.executeMapper(
|
|
1577
1555
|
h.AvailabilityMapper,
|
|
1578
|
-
{ ...
|
|
1556
|
+
{ ...a, groupId: i },
|
|
1579
1557
|
r
|
|
1580
1558
|
), n = {
|
|
1581
|
-
...
|
|
1582
|
-
note:
|
|
1559
|
+
...a,
|
|
1560
|
+
note: a.note ?? void 0,
|
|
1583
1561
|
kosParentId: this.id,
|
|
1584
|
-
groupId:
|
|
1585
|
-
rawId:
|
|
1562
|
+
groupId: i,
|
|
1563
|
+
rawId: a.id,
|
|
1586
1564
|
data: s,
|
|
1587
|
-
type:
|
|
1588
|
-
taggedIds:
|
|
1589
|
-
properties:
|
|
1565
|
+
type: a.type,
|
|
1566
|
+
taggedIds: a.taggedIds,
|
|
1567
|
+
properties: a.properties || {}
|
|
1590
1568
|
}, c = this._availabilityItems.getModel(
|
|
1591
|
-
`${this.id}-${
|
|
1569
|
+
`${this.id}-${i}-${a.id}`
|
|
1592
1570
|
);
|
|
1593
1571
|
c && c.updateModel(n);
|
|
1594
1572
|
}
|
|
@@ -1596,47 +1574,103 @@ let $ = class {
|
|
|
1596
1574
|
}
|
|
1597
1575
|
// -------------------ENTITY----------------------------
|
|
1598
1576
|
};
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
],
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
],
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
],
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1577
|
+
E([
|
|
1578
|
+
_
|
|
1579
|
+
], I.prototype, "_availabilityItems", 2);
|
|
1580
|
+
E([
|
|
1581
|
+
ue(d.POURING)
|
|
1582
|
+
], I.prototype, "handlePouringStart", 1);
|
|
1583
|
+
E([
|
|
1584
|
+
Pe(d.POURING)
|
|
1585
|
+
], I.prototype, "handlePouringEnd", 1);
|
|
1586
|
+
E([
|
|
1587
|
+
ue(d.POUR_CANCELING)
|
|
1588
|
+
], I.prototype, "handleCancelStart", 1);
|
|
1589
|
+
E([
|
|
1590
|
+
Pe(d.POUR_CANCELING)
|
|
1591
|
+
], I.prototype, "handleCanceled", 1);
|
|
1592
|
+
E([
|
|
1593
|
+
ge(),
|
|
1594
|
+
re({ allowedStates: [d.IDLE] })
|
|
1595
|
+
], I.prototype, "pour", 1);
|
|
1596
|
+
E([
|
|
1597
|
+
ge(),
|
|
1598
|
+
re({ allowedStates: [d.IDLE] })
|
|
1599
|
+
], I.prototype, "fixedPour", 1);
|
|
1600
|
+
E([
|
|
1601
|
+
re({
|
|
1602
|
+
allowedStates: [d.POUR_STARTING, d.POURING]
|
|
1603
|
+
})
|
|
1604
|
+
], I.prototype, "cancelPour", 1);
|
|
1605
|
+
E([
|
|
1606
|
+
te({
|
|
1607
|
+
topic: `${Kr}/availability`,
|
|
1611
1608
|
websocket: !0
|
|
1612
1609
|
})
|
|
1613
|
-
],
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1610
|
+
], I.prototype, "updateAvailability", 1);
|
|
1611
|
+
I = E([
|
|
1612
|
+
P(W),
|
|
1613
|
+
je(),
|
|
1614
|
+
Fe(
|
|
1615
|
+
{
|
|
1616
|
+
initial: d.IDLE,
|
|
1617
|
+
initializeAt: pe.READY,
|
|
1618
|
+
states: {
|
|
1619
|
+
[d.IDLE]: {
|
|
1620
|
+
on: {
|
|
1621
|
+
START_POUR: d.POUR_STARTING
|
|
1622
|
+
}
|
|
1623
|
+
},
|
|
1624
|
+
[d.POUR_STARTING]: {
|
|
1625
|
+
on: {
|
|
1626
|
+
POUR_ACTIVE: d.POURING,
|
|
1627
|
+
CANCEL_POUR: d.POUR_CANCELING,
|
|
1628
|
+
POUR_COMPLETED: d.IDLE
|
|
1629
|
+
}
|
|
1630
|
+
},
|
|
1631
|
+
[d.POURING]: {
|
|
1632
|
+
on: {
|
|
1633
|
+
CANCEL_POUR: d.POUR_CANCELING,
|
|
1634
|
+
POUR_COMPLETED: d.IDLE
|
|
1635
|
+
}
|
|
1636
|
+
},
|
|
1637
|
+
[d.POUR_CANCELING]: {
|
|
1638
|
+
on: {
|
|
1639
|
+
POUR_CANCELED: d.IDLE
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
}
|
|
1643
|
+
},
|
|
1644
|
+
{
|
|
1645
|
+
trackHistory: !1,
|
|
1646
|
+
throwOnInvalid: !1
|
|
1647
|
+
// Gracefully ignore invalid state calls (expected runtime scenarios)
|
|
1648
|
+
}
|
|
1649
|
+
)
|
|
1650
|
+
], I);
|
|
1651
|
+
const $e = {
|
|
1618
1652
|
registration: {
|
|
1619
|
-
[
|
|
1620
|
-
class:
|
|
1653
|
+
[W]: {
|
|
1654
|
+
class: I,
|
|
1621
1655
|
singleton: !1
|
|
1622
1656
|
}
|
|
1623
1657
|
},
|
|
1624
|
-
type:
|
|
1625
|
-
predicate: b(
|
|
1626
|
-
factory: v.Factory.create(
|
|
1658
|
+
type: W,
|
|
1659
|
+
predicate: b(W),
|
|
1660
|
+
factory: v.Factory.create(W)
|
|
1627
1661
|
};
|
|
1628
|
-
var
|
|
1629
|
-
for (var
|
|
1630
|
-
(n = e[s]) && (
|
|
1631
|
-
return
|
|
1662
|
+
var Zr = Object.defineProperty, Xr = Object.getOwnPropertyDescriptor, lt = (e, t, r, i) => {
|
|
1663
|
+
for (var a = i > 1 ? void 0 : i ? Xr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
1664
|
+
(n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
|
|
1665
|
+
return i && a && Zr(t, r, a), a;
|
|
1632
1666
|
};
|
|
1633
|
-
const
|
|
1634
|
-
let
|
|
1667
|
+
const ct = "device-assembly-model";
|
|
1668
|
+
let ce = class {
|
|
1635
1669
|
constructor(e, t, r) {
|
|
1636
1670
|
o(this, "id");
|
|
1637
1671
|
o(this, "deviceNozzles");
|
|
1638
1672
|
o(this, "logger");
|
|
1639
|
-
this.id = e, this.logger = r.logger, this.deviceNozzles = new
|
|
1673
|
+
this.id = e, this.logger = r.logger, this.deviceNozzles = new D();
|
|
1640
1674
|
}
|
|
1641
1675
|
// -------------------LIFECYCLE----------------------------
|
|
1642
1676
|
async init() {
|
|
@@ -1650,55 +1684,54 @@ let de = class {
|
|
|
1650
1684
|
}
|
|
1651
1685
|
async load() {
|
|
1652
1686
|
this.logger.debug(`loading device-assembly ${this.id}`);
|
|
1653
|
-
const e = await
|
|
1687
|
+
const e = await Je();
|
|
1654
1688
|
(e == null ? void 0 : e.status) === 200 && e.data.assemblies.map((r) => r.nozzles ?? []).flat().forEach((r) => {
|
|
1655
1689
|
var n;
|
|
1656
|
-
const
|
|
1690
|
+
const i = r.path, a = ((n = r.pipelines.find((c) => c.name === "beverage")) == null ? void 0 : n.topicPrefix) || "", s = $e.factory(i)({
|
|
1657
1691
|
path: r.path,
|
|
1658
1692
|
name: r.name,
|
|
1659
1693
|
urlPrefix: r.urlPrefix,
|
|
1660
1694
|
topicPrefix: r.topicPrefix,
|
|
1661
|
-
beverageTopicPrefix:
|
|
1695
|
+
beverageTopicPrefix: a
|
|
1662
1696
|
});
|
|
1663
1697
|
this.deviceNozzles.addModel(s);
|
|
1664
1698
|
});
|
|
1665
1699
|
}
|
|
1666
1700
|
};
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
],
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
],
|
|
1673
|
-
const
|
|
1674
|
-
class:
|
|
1675
|
-
type:
|
|
1676
|
-
}), { URL:
|
|
1677
|
-
basePath: `${
|
|
1678
|
-
}),
|
|
1679
|
-
const r = await
|
|
1701
|
+
lt([
|
|
1702
|
+
_
|
|
1703
|
+
], ce.prototype, "deviceNozzles", 2);
|
|
1704
|
+
ce = lt([
|
|
1705
|
+
P(ct)
|
|
1706
|
+
], ce);
|
|
1707
|
+
const Jr = new Rt({
|
|
1708
|
+
class: ce,
|
|
1709
|
+
type: ct
|
|
1710
|
+
}), { URL: pt } = N("GENERIC_POUR_SERVICE"), { postModel: qr } = $.build({
|
|
1711
|
+
basePath: `${pt}/api/nozzle`
|
|
1712
|
+
}), Wr = async (e, t) => {
|
|
1713
|
+
const r = await qr({
|
|
1680
1714
|
model: {},
|
|
1681
|
-
urlOverride: `${
|
|
1715
|
+
urlOverride: `${pt}${e}`,
|
|
1682
1716
|
ordered: !0,
|
|
1683
1717
|
tracker: t
|
|
1684
1718
|
});
|
|
1685
|
-
return r != null && r.data &&
|
|
1719
|
+
return r != null && r.data && he.initiateFuture(r.data), r;
|
|
1686
1720
|
};
|
|
1687
|
-
var
|
|
1688
|
-
for (var
|
|
1689
|
-
(n = e[s]) && (
|
|
1690
|
-
return
|
|
1721
|
+
var Qr = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, T = (e, t, r, i) => {
|
|
1722
|
+
for (var a = i > 1 ? void 0 : i ? ei(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
1723
|
+
(n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
|
|
1724
|
+
return i && a && Qr(t, r, a), a;
|
|
1691
1725
|
};
|
|
1692
|
-
const
|
|
1693
|
-
let
|
|
1726
|
+
const ht = "generic-pour-model", ti = "/kos/generic/pour/started", ri = "/kos/generic/pour/progress", ii = "/kos/generic/pour/cancel", ve = (e) => e.onPourStart !== void 0 && e.onPourCancel !== void 0 && e.onPourProgress !== void 0;
|
|
1727
|
+
let M = class {
|
|
1694
1728
|
constructor(e, t) {
|
|
1695
1729
|
o(this, "id");
|
|
1696
|
-
o(this, "currentState", d.IDLE);
|
|
1697
1730
|
o(this, "servicePathFactory");
|
|
1698
1731
|
o(this, "pourType");
|
|
1699
1732
|
o(this, "selectedId");
|
|
1700
1733
|
o(this, "state");
|
|
1701
|
-
this.id = e, this.futureHandler = new
|
|
1734
|
+
this.id = e, this.futureHandler = new Ge(this), this.servicePathFactory = t.servicePathFactory, this.pourType = t.pourType || "free", this.selectedId = t.selectedId, this.state = Te();
|
|
1702
1735
|
}
|
|
1703
1736
|
get servicePath() {
|
|
1704
1737
|
return this.selectedId ? this.servicePathFactory(this.selectedId, this.state) : "";
|
|
@@ -1710,58 +1743,55 @@ let le = class {
|
|
|
1710
1743
|
delete this.state[e];
|
|
1711
1744
|
}
|
|
1712
1745
|
clearContextData() {
|
|
1713
|
-
this.state =
|
|
1746
|
+
this.state = Te();
|
|
1714
1747
|
}
|
|
1748
|
+
handlePouringStart() {
|
|
1749
|
+
this.logger.info("Pour started"), U(this).forEach((t) => {
|
|
1750
|
+
var r;
|
|
1751
|
+
ve(t) && ((r = t.onPourStart) == null || r.call(t));
|
|
1752
|
+
});
|
|
1753
|
+
const e = {
|
|
1754
|
+
pourTarget: this.id,
|
|
1755
|
+
type: this.pourType
|
|
1756
|
+
};
|
|
1757
|
+
R.publish(ti, e);
|
|
1758
|
+
}
|
|
1759
|
+
handlePouringEnd() {
|
|
1760
|
+
this.logger.info("Pour ended");
|
|
1761
|
+
}
|
|
1762
|
+
handleCancelStart() {
|
|
1763
|
+
this.logger.info("Pour canceling");
|
|
1764
|
+
}
|
|
1765
|
+
handleCanceled() {
|
|
1766
|
+
this.logger.info("Pour canceled"), U(this).forEach((t) => {
|
|
1767
|
+
var r;
|
|
1768
|
+
ve(t) && ((r = t.onPourCancel) == null || r.call(t));
|
|
1769
|
+
});
|
|
1770
|
+
const e = {
|
|
1771
|
+
pourTarget: this.id
|
|
1772
|
+
};
|
|
1773
|
+
R.publish(ii, e);
|
|
1774
|
+
}
|
|
1775
|
+
// Inherits throwOnInvalid: false from class
|
|
1715
1776
|
async pour(e) {
|
|
1716
1777
|
var t;
|
|
1717
1778
|
try {
|
|
1718
|
-
if (this.
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
this.updateIfCurrent(d.POUR_STARTING, d.POURING), E(this).forEach((i) => {
|
|
1723
|
-
var s;
|
|
1724
|
-
Ie(i) && ((s = i.onPourStart) == null || s.call(i));
|
|
1725
|
-
});
|
|
1726
|
-
const a = {
|
|
1727
|
-
pourTarget: this.id,
|
|
1728
|
-
type: this.pourType
|
|
1729
|
-
};
|
|
1730
|
-
if (_.publish(Wr, a), (t = r == null ? void 0 : r.data) != null && t.endState) {
|
|
1731
|
-
this.updateIfCurrent(d.POURING, d.IDLE);
|
|
1732
|
-
const i = {
|
|
1733
|
-
pourTarget: this.id
|
|
1734
|
-
};
|
|
1735
|
-
_.publish(Te, i);
|
|
1736
|
-
}
|
|
1737
|
-
return r;
|
|
1738
|
-
} else
|
|
1739
|
-
throw new Error(`Cannot pour in state ${this.currentState}`);
|
|
1779
|
+
if (this.transition("START_POUR"), !e)
|
|
1780
|
+
throw new Error("No tracker provided");
|
|
1781
|
+
const r = await Wr(this.servicePath, e);
|
|
1782
|
+
return this.transition("POUR_ACTIVE"), (t = r == null ? void 0 : r.data) != null && t.endState && this.transition("POUR_COMPLETED"), r;
|
|
1740
1783
|
} catch (r) {
|
|
1741
|
-
throw this.logger.error(r), this.currentState
|
|
1784
|
+
throw this.logger.error(r), this.currentState !== d.IDLE && this.transition("POUR_COMPLETED"), r;
|
|
1742
1785
|
}
|
|
1743
1786
|
}
|
|
1787
|
+
// Inherits throwOnInvalid: false - silently ignore if already idle
|
|
1744
1788
|
async cancelPour() {
|
|
1745
1789
|
var e;
|
|
1746
|
-
|
|
1747
|
-
this.currentState = d.POUR_CANCELING, await ((e = this.futureHandler.getFuture()) == null ? void 0 : e.cancelFuture()), g(() => {
|
|
1748
|
-
this.currentState = d.IDLE;
|
|
1749
|
-
}), E(this).forEach((r) => {
|
|
1750
|
-
var a;
|
|
1751
|
-
Ie(r) && ((a = r.onPourCancel) == null || a.call(r));
|
|
1752
|
-
});
|
|
1753
|
-
const t = {
|
|
1754
|
-
pourTarget: this.id
|
|
1755
|
-
};
|
|
1756
|
-
_.publish(Te, t);
|
|
1757
|
-
}
|
|
1758
|
-
this.currentState === d.IDLE ? this.logger.info("Pour already idle, nothing to cancel.") : this.logger.warn(`Cannot cancel pour in state ${this.currentState}`);
|
|
1759
|
-
}
|
|
1760
|
-
updateIfCurrent(e, t) {
|
|
1761
|
-
this.currentState === e && g(() => {
|
|
1762
|
-
this.currentState = t;
|
|
1763
|
-
});
|
|
1790
|
+
this.transition("CANCEL_POUR"), await ((e = this.futureHandler.getFuture()) == null ? void 0 : e.cancelFuture()), this.transition("POUR_CANCELED");
|
|
1764
1791
|
}
|
|
1792
|
+
// ============================================================================
|
|
1793
|
+
// Computed Properties
|
|
1794
|
+
// ============================================================================
|
|
1765
1795
|
/**
|
|
1766
1796
|
* A derived value that indicates if the nozzle is currently pouring a beverage.
|
|
1767
1797
|
* @readonly
|
|
@@ -1773,7 +1803,8 @@ let le = class {
|
|
|
1773
1803
|
/**
|
|
1774
1804
|
* A derived value that indicates if the pour target is currently available to pour a beverage.
|
|
1775
1805
|
*
|
|
1776
|
-
* Generally this means that the pour target is currently idle and not in the process of pouring,
|
|
1806
|
+
* Generally this means that the pour target is currently idle and not in the process of pouring,
|
|
1807
|
+
* initiating a pour, or canceling a pour.
|
|
1777
1808
|
* The value is observable and will change when the selected pourable changes or the pour target
|
|
1778
1809
|
* starts or stops pouring.
|
|
1779
1810
|
* @readonly
|
|
@@ -1784,9 +1815,12 @@ let le = class {
|
|
|
1784
1815
|
get pourProgress() {
|
|
1785
1816
|
return this.progress ?? 0;
|
|
1786
1817
|
}
|
|
1818
|
+
// ============================================================================
|
|
1819
|
+
// Future Lifecycle Handler
|
|
1820
|
+
// ============================================================================
|
|
1787
1821
|
onFutureUpdate(e) {
|
|
1788
|
-
|
|
1789
|
-
|
|
1822
|
+
U(this).forEach((r) => {
|
|
1823
|
+
ve(r) && r.onPourProgress(e);
|
|
1790
1824
|
});
|
|
1791
1825
|
const t = {
|
|
1792
1826
|
pourTarget: this.id,
|
|
@@ -1799,114 +1833,168 @@ let le = class {
|
|
|
1799
1833
|
reason: e.reason,
|
|
1800
1834
|
timeRemaining: e.timeRemaining
|
|
1801
1835
|
};
|
|
1802
|
-
|
|
1803
|
-
this.currentState
|
|
1836
|
+
R.publish(ri, t), e.endState && O(() => {
|
|
1837
|
+
this.currentState === d.POURING && this.transition("POUR_COMPLETED");
|
|
1804
1838
|
});
|
|
1805
1839
|
}
|
|
1806
1840
|
};
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
],
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1841
|
+
T([
|
|
1842
|
+
ue(d.POURING)
|
|
1843
|
+
], M.prototype, "handlePouringStart", 1);
|
|
1844
|
+
T([
|
|
1845
|
+
Pe(d.POURING)
|
|
1846
|
+
], M.prototype, "handlePouringEnd", 1);
|
|
1847
|
+
T([
|
|
1848
|
+
ue(d.POUR_CANCELING)
|
|
1849
|
+
], M.prototype, "handleCancelStart", 1);
|
|
1850
|
+
T([
|
|
1851
|
+
Pe(d.POUR_CANCELING)
|
|
1852
|
+
], M.prototype, "handleCanceled", 1);
|
|
1853
|
+
T([
|
|
1854
|
+
ge(),
|
|
1855
|
+
re({ allowedStates: [d.IDLE] })
|
|
1856
|
+
], M.prototype, "pour", 1);
|
|
1857
|
+
T([
|
|
1858
|
+
re({
|
|
1859
|
+
allowedStates: [d.POUR_STARTING, d.POURING]
|
|
1860
|
+
})
|
|
1861
|
+
], M.prototype, "cancelPour", 1);
|
|
1862
|
+
M = T([
|
|
1863
|
+
P(ht),
|
|
1864
|
+
je(),
|
|
1865
|
+
Ct(),
|
|
1866
|
+
Fe(
|
|
1867
|
+
{
|
|
1868
|
+
initial: d.IDLE,
|
|
1869
|
+
initializeAt: pe.READY,
|
|
1870
|
+
states: {
|
|
1871
|
+
[d.IDLE]: {
|
|
1872
|
+
on: {
|
|
1873
|
+
START_POUR: d.POUR_STARTING
|
|
1874
|
+
}
|
|
1875
|
+
},
|
|
1876
|
+
[d.POUR_STARTING]: {
|
|
1877
|
+
on: {
|
|
1878
|
+
POUR_ACTIVE: d.POURING,
|
|
1879
|
+
CANCEL_POUR: d.POUR_CANCELING,
|
|
1880
|
+
POUR_COMPLETED: d.IDLE
|
|
1881
|
+
}
|
|
1882
|
+
},
|
|
1883
|
+
[d.POURING]: {
|
|
1884
|
+
on: {
|
|
1885
|
+
CANCEL_POUR: d.POUR_CANCELING,
|
|
1886
|
+
POUR_COMPLETED: d.IDLE
|
|
1887
|
+
}
|
|
1888
|
+
},
|
|
1889
|
+
[d.POUR_CANCELING]: {
|
|
1890
|
+
on: {
|
|
1891
|
+
POUR_CANCELED: d.IDLE
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
},
|
|
1896
|
+
{
|
|
1897
|
+
trackHistory: !1,
|
|
1898
|
+
throwOnInvalid: !1
|
|
1899
|
+
// Gracefully ignore invalid state calls (expected runtime scenarios)
|
|
1900
|
+
}
|
|
1901
|
+
)
|
|
1902
|
+
], M);
|
|
1903
|
+
const hi = new Nt({
|
|
1904
|
+
class: M,
|
|
1905
|
+
type: ht
|
|
1818
1906
|
}), ze = {
|
|
1819
|
-
...
|
|
1820
|
-
...
|
|
1821
|
-
...et.registration,
|
|
1822
|
-
...Ke.registration,
|
|
1823
|
-
...we.registration,
|
|
1824
|
-
...rt.registration,
|
|
1825
|
-
...Me.registration,
|
|
1826
|
-
...ve.registration,
|
|
1907
|
+
...ke.registration,
|
|
1908
|
+
...He.registration,
|
|
1827
1909
|
...at.registration,
|
|
1828
|
-
...
|
|
1829
|
-
|
|
1910
|
+
...Xe.registration,
|
|
1911
|
+
...$e.registration,
|
|
1912
|
+
...nt.registration,
|
|
1913
|
+
...Re.registration,
|
|
1914
|
+
...Ee.registration,
|
|
1915
|
+
...dt.registration,
|
|
1916
|
+
...it.registration
|
|
1917
|
+
}, ai = (e) => () => (Dt(e)(), Jr.register(), Object.keys(ze).forEach((t) => {
|
|
1830
1918
|
const r = ze[t];
|
|
1831
|
-
|
|
1832
|
-
}),
|
|
1919
|
+
St(e)(t, r);
|
|
1920
|
+
}), g[ee].register(
|
|
1833
1921
|
"FirmwareUpdateInProgressTrouble",
|
|
1834
1922
|
async (t) => {
|
|
1835
1923
|
var r;
|
|
1836
1924
|
if ((r = t.data) != null && r.deviceId) {
|
|
1837
|
-
const { model:
|
|
1838
|
-
|
|
1925
|
+
const { model: i } = z(
|
|
1926
|
+
dt.type
|
|
1839
1927
|
);
|
|
1840
|
-
if (
|
|
1841
|
-
const
|
|
1928
|
+
if (i) {
|
|
1929
|
+
const a = i.boards.find(
|
|
1842
1930
|
(s) => s.id === t.data.deviceId
|
|
1843
1931
|
) ? z(t.data.deviceId).model : void 0;
|
|
1844
1932
|
return {
|
|
1845
|
-
devices:
|
|
1933
|
+
devices: a ? a.name : ""
|
|
1846
1934
|
};
|
|
1847
1935
|
}
|
|
1848
1936
|
}
|
|
1849
1937
|
return {};
|
|
1850
1938
|
}
|
|
1851
1939
|
), {
|
|
1852
|
-
preload:
|
|
1853
|
-
model:
|
|
1854
|
-
companion:
|
|
1855
|
-
legacy:
|
|
1856
|
-
}),
|
|
1857
|
-
|
|
1940
|
+
preload: w.model.preloadModel(e),
|
|
1941
|
+
model: w.model.register(e),
|
|
1942
|
+
companion: w.companion.register(e),
|
|
1943
|
+
legacy: w.model.registerLegacyModel(e)
|
|
1944
|
+
}), f = {
|
|
1945
|
+
...$t
|
|
1858
1946
|
};
|
|
1859
|
-
|
|
1860
|
-
models:
|
|
1947
|
+
f.dispense = {
|
|
1948
|
+
models: ai(f)
|
|
1861
1949
|
};
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
const
|
|
1950
|
+
f.preload = w.model.preloadModel(f);
|
|
1951
|
+
f.model = w.model.register(f);
|
|
1952
|
+
f.companion = w.companion.register(f);
|
|
1953
|
+
f.legacy = w.model.registerLegacyModel(f);
|
|
1954
|
+
const gi = f;
|
|
1867
1955
|
export {
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
D,
|
|
1956
|
+
dt as A,
|
|
1957
|
+
x as B,
|
|
1958
|
+
Sr as C,
|
|
1959
|
+
S as D,
|
|
1872
1960
|
h as E,
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1961
|
+
Gr as F,
|
|
1962
|
+
hi as G,
|
|
1963
|
+
Xe as H,
|
|
1964
|
+
He as I,
|
|
1965
|
+
Br as J,
|
|
1966
|
+
gi as K,
|
|
1879
1967
|
xr as L,
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1968
|
+
jr as M,
|
|
1969
|
+
$e as N,
|
|
1970
|
+
Wr as O,
|
|
1971
|
+
nt as P,
|
|
1972
|
+
qe as T,
|
|
1973
|
+
Tr as a,
|
|
1974
|
+
Ee as b,
|
|
1975
|
+
We as c,
|
|
1976
|
+
it as d,
|
|
1977
|
+
rt as e,
|
|
1978
|
+
Jr as f,
|
|
1979
|
+
at as g,
|
|
1980
|
+
ke as h,
|
|
1981
|
+
Re as i,
|
|
1982
|
+
et as j,
|
|
1895
1983
|
d as k,
|
|
1896
1984
|
ze as l,
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1985
|
+
Ut as m,
|
|
1986
|
+
ci as n,
|
|
1987
|
+
Ht as o,
|
|
1988
|
+
pi as p,
|
|
1989
|
+
li as q,
|
|
1990
|
+
ai as r,
|
|
1991
|
+
di as s,
|
|
1992
|
+
Kt as t,
|
|
1993
|
+
Zt as u,
|
|
1994
|
+
Vt as v,
|
|
1995
|
+
Je as w,
|
|
1908
1996
|
Mr as x,
|
|
1909
|
-
|
|
1910
|
-
|
|
1997
|
+
Er as y,
|
|
1998
|
+
Fr as z
|
|
1911
1999
|
};
|
|
1912
|
-
//# sourceMappingURL=dispense-registration-manager-
|
|
2000
|
+
//# sourceMappingURL=dispense-registration-manager-kSiG2s8S.js.map
|