@kosdev-code/kos-ddk-models 0.1.0-dev.5077 → 0.1.0-dev.5096
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +0 -3
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/index.mjs +1210 -1626
- package/lib/application/services/application-services.d.ts +1 -0
- package/lib/application/services/application-services.d.ts.map +1 -1
- package/lib/carb-water/carb-water-model.d.ts +1 -2
- package/lib/carb-water/carb-water-model.d.ts.map +1 -1
- package/lib/nutritive-sweetener/nutritive-sweetener-model.d.ts +8 -5
- package/lib/nutritive-sweetener/nutritive-sweetener-model.d.ts.map +1 -1
- package/lib/plain-water/plain-water-model.d.ts +1 -2
- package/lib/plain-water/plain-water-model.d.ts.map +1 -1
- package/lib/settings/settings-model.d.ts +4 -2
- package/lib/settings/settings-model.d.ts.map +1 -1
- package/lib/settings/types/index.d.ts +1 -1
- package/package.json +5 -5
- package/lib/fcm-pump/fcm-pump-model.d.ts +0 -28
- package/lib/fcm-pump/fcm-pump-model.d.ts.map +0 -1
- package/lib/fcm-pump/fcm-pump-registration.d.ts +0 -87
- package/lib/fcm-pump/fcm-pump-registration.d.ts.map +0 -1
- package/lib/fcm-pump/index.d.ts +0 -5
- package/lib/fcm-pump/index.d.ts.map +0 -1
- package/lib/fcm-pump/services/fcm-pump-services.d.ts +0 -17
- package/lib/fcm-pump/services/fcm-pump-services.d.ts.map +0 -1
- package/lib/fcm-pump/services/index.d.ts +0 -2
- package/lib/fcm-pump/services/index.d.ts.map +0 -1
- package/lib/fcm-pump/types/index.d.ts +0 -5
- package/lib/lfcv-pump/index.d.ts +0 -5
- package/lib/lfcv-pump/index.d.ts.map +0 -1
- package/lib/lfcv-pump/lfcv-pump-model.d.ts +0 -20
- package/lib/lfcv-pump/lfcv-pump-model.d.ts.map +0 -1
- package/lib/lfcv-pump/lfcv-pump-registration.d.ts +0 -87
- package/lib/lfcv-pump/lfcv-pump-registration.d.ts.map +0 -1
- package/lib/lfcv-pump/services/index.d.ts +0 -2
- package/lib/lfcv-pump/services/index.d.ts.map +0 -1
- package/lib/lfcv-pump/services/lfcv-pump-services.d.ts +0 -10
- package/lib/lfcv-pump/services/lfcv-pump-services.d.ts.map +0 -1
- package/lib/lfcv-pump/types/index.d.ts +0 -5
- package/lib/spm-pump/index.d.ts +0 -5
- package/lib/spm-pump/index.d.ts.map +0 -1
- package/lib/spm-pump/services/index.d.ts +0 -2
- package/lib/spm-pump/services/index.d.ts.map +0 -1
- package/lib/spm-pump/services/spm-pump-services.d.ts +0 -7
- package/lib/spm-pump/services/spm-pump-services.d.ts.map +0 -1
- package/lib/spm-pump/spm-pump-model.d.ts +0 -26
- package/lib/spm-pump/spm-pump-model.d.ts.map +0 -1
- package/lib/spm-pump/spm-pump-registration.d.ts +0 -87
- package/lib/spm-pump/spm-pump-registration.d.ts.map +0 -1
- package/lib/spm-pump/types/index.d.ts +0 -5
package/index.mjs
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { resolveServiceUrl as h, ServiceFactory as
|
|
5
|
-
import { AGITATION_REQUIRED_TROUBLE as
|
|
6
|
-
import { Assembly as
|
|
7
|
-
const
|
|
8
|
-
basePath: `${
|
|
9
|
-
}),
|
|
10
|
-
urlOverride: `${
|
|
11
|
-
})),
|
|
12
|
-
urlOverride: `${
|
|
1
|
+
var yo = Object.defineProperty;
|
|
2
|
+
var fo = (e, t, o) => t in e ? yo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
3
|
+
var i = (e, t, o) => (fo(e, typeof t != "symbol" ? t + "" : t, o), o);
|
|
4
|
+
import { resolveServiceUrl as h, ServiceFactory as y, KosLog as g, kosTopicHandler as Te, kosModel as l, kosAction as v, Kos as c, isKosModel as u, createPropKey as ut, kosStateProp as vo, KosModelRegistrationFactory as mo, kosDependency as p, KosModelContainer as Ve, resolveContainerDeltas as ot, kosChild as $e, Device as bo, kosConfigProperty as d, kosFuture as P, kosModelEffect as He, MultipleFutureHandler as _o, FutureEndState as T, TroubleServices as Me, Troubles as rt, SingletonKosModelRegistrationFactory as Pe, getKosCompanionModel as Be, FetchError as pt, StorageDeviceContainer as To, kosFutureAware as $o, kosLoggerAware as gt, KosDataContainer as Mo, TroubleContainer as Ke, FutureHandler as Ye, troubleByTypeReducer as Po, registerExtensionPoint as Oo, ExtensionManager as Oe, kosConfigBean as So, kosStateBean as wo, ObservableData as Eo, kosAutoEffect as Lo } from "@kosdev-code/kos-ui-sdk";
|
|
5
|
+
import { AGITATION_REQUIRED_TROUBLE as ht, CartridgeAgitatorEvents as yt, FcmPump as ft, FreestyleHolder as Co } from "@kosdev-code/kos-freestyle-sdk";
|
|
6
|
+
import { Assembly as Se, HolderContainer as ko, IngredientContainer as Do } from "@kosdev-code/kos-dispense-sdk";
|
|
7
|
+
const st = "PurgeTrouble", Io = "PrimeTrouble", { URL: Ge } = h("AUTH_SERVICE"), { getOne: Ro, postModel: Ao } = y.build({
|
|
8
|
+
basePath: `${Ge}/api/auth`
|
|
9
|
+
}), vt = g.createLogger({ name: "auth-service", group: "Services" }), mt = async () => (vt.debug("sending GET for auth"), await Ro({
|
|
10
|
+
urlOverride: `${Ge}/api/app/kosdev.ddk/auth/role`
|
|
11
|
+
})), bt = async (e) => (vt.debug("sending POST for auth"), await Ao({
|
|
12
|
+
urlOverride: `${Ge}/api/app/kosdev.ddk/auth/pincode/${e}`,
|
|
13
13
|
model: {}
|
|
14
|
-
})),
|
|
14
|
+
})), Hs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
15
15
|
__proto__: null,
|
|
16
|
-
getCurrentRole:
|
|
17
|
-
sendPinCode:
|
|
16
|
+
getCurrentRole: mt,
|
|
17
|
+
sendPinCode: bt
|
|
18
18
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
19
|
-
var
|
|
20
|
-
for (var
|
|
21
|
-
(a = e[n]) && (
|
|
22
|
-
return
|
|
23
|
-
};
|
|
24
|
-
const
|
|
25
|
-
let
|
|
26
|
-
constructor(e, t,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
this.id = e, this.logger =
|
|
19
|
+
var Fo = Object.defineProperty, xo = Object.getOwnPropertyDescriptor, _t = (e, t, o, s) => {
|
|
20
|
+
for (var r = s > 1 ? void 0 : s ? xo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
21
|
+
(a = e[n]) && (r = (s ? a(t, o, r) : a(r)) || r);
|
|
22
|
+
return s && r && Fo(t, o, r), r;
|
|
23
|
+
};
|
|
24
|
+
const F = "auth-model", it = (e) => e.toLowerCase();
|
|
25
|
+
let pe = class {
|
|
26
|
+
constructor(e, t, o) {
|
|
27
|
+
i(this, "id");
|
|
28
|
+
i(this, "logger");
|
|
29
|
+
i(this, "currentRole");
|
|
30
|
+
this.id = e, this.logger = o.logger, this.currentRole = "crew";
|
|
31
31
|
}
|
|
32
32
|
async authorize(e) {
|
|
33
33
|
if (!e)
|
|
34
34
|
return !1;
|
|
35
|
-
const t = await
|
|
35
|
+
const t = await bt(e);
|
|
36
36
|
return (t == null ? void 0 : t.status) === 200 ? t.data : !1;
|
|
37
37
|
}
|
|
38
38
|
// -------------------LIFECYCLE----------------------------
|
|
@@ -41,51 +41,51 @@ let $e = class {
|
|
|
41
41
|
}
|
|
42
42
|
async load() {
|
|
43
43
|
this.logger.debug(`loading auth ${this.id}`);
|
|
44
|
-
const e = await
|
|
45
|
-
(e == null ? void 0 : e.status) === 200 && (this.logger.debug(`response ${e.data}`),
|
|
46
|
-
this.currentRole =
|
|
44
|
+
const e = await mt();
|
|
45
|
+
(e == null ? void 0 : e.status) === 200 && (this.logger.debug(`response ${e.data}`), v(() => {
|
|
46
|
+
this.currentRole = it(e.data);
|
|
47
47
|
}));
|
|
48
48
|
}
|
|
49
49
|
handleRoleChange(e) {
|
|
50
|
-
this.currentRole =
|
|
50
|
+
this.currentRole = it(e);
|
|
51
51
|
}
|
|
52
52
|
forceRole(e) {
|
|
53
53
|
this.currentRole = e;
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
_t([
|
|
57
|
+
Te({
|
|
58
58
|
topic: "/app/kosdev.ddk/auth/role",
|
|
59
59
|
websocket: !0
|
|
60
60
|
})
|
|
61
|
-
],
|
|
62
|
-
|
|
63
|
-
l(
|
|
64
|
-
],
|
|
65
|
-
const
|
|
61
|
+
], pe.prototype, "handleRoleChange", 1);
|
|
62
|
+
pe = _t([
|
|
63
|
+
l(F)
|
|
64
|
+
], pe);
|
|
65
|
+
const qe = {
|
|
66
66
|
registration: {
|
|
67
|
-
[
|
|
68
|
-
class:
|
|
67
|
+
[F]: {
|
|
68
|
+
class: pe,
|
|
69
69
|
singleton: !1
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
|
-
type:
|
|
73
|
-
predicate: u(
|
|
74
|
-
factory: c.Factory.create(
|
|
72
|
+
type: F,
|
|
73
|
+
predicate: u(F),
|
|
74
|
+
factory: c.Factory.create(F)
|
|
75
75
|
};
|
|
76
|
-
var
|
|
77
|
-
for (var
|
|
78
|
-
(a = e[n]) && (
|
|
79
|
-
return
|
|
76
|
+
var jo = Object.defineProperty, Uo = Object.getOwnPropertyDescriptor, Tt = (e, t, o, s) => {
|
|
77
|
+
for (var r = s > 1 ? void 0 : s ? Uo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
78
|
+
(a = e[n]) && (r = (s ? a(t, o, r) : a(r)) || r);
|
|
79
|
+
return s && r && jo(t, o, r), r;
|
|
80
80
|
};
|
|
81
|
-
const
|
|
82
|
-
let
|
|
83
|
-
constructor(e, t,
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
this.id = e, this.logger =
|
|
81
|
+
const $t = "door-model", Wo = ut("doorPath");
|
|
82
|
+
let ge = class {
|
|
83
|
+
constructor(e, t, o) {
|
|
84
|
+
i(this, "id");
|
|
85
|
+
i(this, "logger");
|
|
86
|
+
i(this, "doorPath");
|
|
87
|
+
i(this, "open");
|
|
88
|
+
this.id = e, this.logger = o.logger, this.doorPath = t.doorPath;
|
|
89
89
|
}
|
|
90
90
|
get currentState() {
|
|
91
91
|
return this.open.value === void 0 ? "UNKNOWN" : this.open.value ? "OPEN" : "CLOSED";
|
|
@@ -94,46 +94,46 @@ let Te = class {
|
|
|
94
94
|
return this.open.value === void 0 ? !0 : this.open.value;
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
],
|
|
100
|
-
|
|
101
|
-
l(
|
|
102
|
-
],
|
|
103
|
-
const
|
|
104
|
-
class:
|
|
105
|
-
type:
|
|
106
|
-
}), { URL:
|
|
107
|
-
basePath: `${
|
|
108
|
-
}),
|
|
97
|
+
Tt([
|
|
98
|
+
vo({ path: Wo, attribute: "state" })
|
|
99
|
+
], ge.prototype, "open", 2);
|
|
100
|
+
ge = Tt([
|
|
101
|
+
l($t)
|
|
102
|
+
], ge);
|
|
103
|
+
const No = new mo({
|
|
104
|
+
class: ge,
|
|
105
|
+
type: $t
|
|
106
|
+
}), { URL: Qe } = h("SETUP-STEP_SERVICE"), { getAll: zo, postModel: Vo } = y.build({
|
|
107
|
+
basePath: `${Qe}/api/setup-step`
|
|
108
|
+
}), Mt = g.createLogger({
|
|
109
109
|
name: "setup-step-service",
|
|
110
110
|
group: "Services"
|
|
111
|
-
}),
|
|
112
|
-
urlOverride: `${
|
|
113
|
-
})),
|
|
114
|
-
urlOverride: `${
|
|
111
|
+
}), Pt = async () => (Mt.debug("sending GET for setup-step"), await zo({
|
|
112
|
+
urlOverride: `${Qe}/api/app/kosdev.ddk/setup/steps`
|
|
113
|
+
})), Ot = async (e) => (Mt.debug("sending POST for setup-step"), await Vo({
|
|
114
|
+
urlOverride: `${Qe}/api/app/kosdev.ddk/setup/complete/${e}`,
|
|
115
115
|
model: {}
|
|
116
|
-
})),
|
|
116
|
+
})), Bs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
117
117
|
__proto__: null,
|
|
118
|
-
getSetupSteps:
|
|
119
|
-
markStepComplete:
|
|
118
|
+
getSetupSteps: Pt,
|
|
119
|
+
markStepComplete: Ot
|
|
120
120
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
121
|
-
var
|
|
122
|
-
for (var
|
|
123
|
-
(a = e[n]) && (
|
|
124
|
-
return
|
|
121
|
+
var Ho = Object.getOwnPropertyDescriptor, Bo = (e, t, o, s) => {
|
|
122
|
+
for (var r = s > 1 ? void 0 : s ? Ho(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
123
|
+
(a = e[n]) && (r = a(r) || r);
|
|
124
|
+
return r;
|
|
125
125
|
};
|
|
126
|
-
const
|
|
127
|
-
let
|
|
128
|
-
constructor(e, t,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
this.id = e, this.idx = t.idx, this.logger =
|
|
126
|
+
const x = "setup-step-model";
|
|
127
|
+
let Ae = class {
|
|
128
|
+
constructor(e, t, o) {
|
|
129
|
+
i(this, "id");
|
|
130
|
+
i(this, "idx");
|
|
131
|
+
i(this, "name");
|
|
132
|
+
i(this, "complete");
|
|
133
|
+
i(this, "preStep");
|
|
134
|
+
i(this, "exclusive");
|
|
135
|
+
i(this, "logger");
|
|
136
|
+
this.id = e, this.idx = t.idx, this.logger = o.logger, this.name = t.name, this.complete = t.complete, this.preStep = t.preStep, this.exclusive = t.exclusive;
|
|
137
137
|
}
|
|
138
138
|
updateModel(e) {
|
|
139
139
|
this.name = e.name, this.idx = e.idx, this.complete = e.complete, this.preStep = e.preStep, this.exclusive = e.exclusive;
|
|
@@ -145,8 +145,8 @@ let Qe = class {
|
|
|
145
145
|
return `setup.${this.name}.body`;
|
|
146
146
|
}
|
|
147
147
|
async completeStep() {
|
|
148
|
-
const e = await
|
|
149
|
-
(e == null ? void 0 : e.status) === 200 &&
|
|
148
|
+
const e = await Ot(this.name);
|
|
149
|
+
(e == null ? void 0 : e.status) === 200 && v(() => {
|
|
150
150
|
this.complete = !0;
|
|
151
151
|
});
|
|
152
152
|
}
|
|
@@ -158,45 +158,45 @@ let Qe = class {
|
|
|
158
158
|
this.logger.debug(`loading setup-step ${this.id}`);
|
|
159
159
|
}
|
|
160
160
|
};
|
|
161
|
-
|
|
162
|
-
l(
|
|
163
|
-
],
|
|
164
|
-
const
|
|
161
|
+
Ae = Bo([
|
|
162
|
+
l(x)
|
|
163
|
+
], Ae);
|
|
164
|
+
const St = {
|
|
165
165
|
registration: {
|
|
166
|
-
[
|
|
167
|
-
class:
|
|
166
|
+
[x]: {
|
|
167
|
+
class: Ae,
|
|
168
168
|
singleton: !1
|
|
169
169
|
}
|
|
170
170
|
},
|
|
171
|
-
type:
|
|
172
|
-
predicate: u(
|
|
173
|
-
factory: c.Factory.create(
|
|
171
|
+
type: x,
|
|
172
|
+
predicate: u(x),
|
|
173
|
+
factory: c.Factory.create(x)
|
|
174
174
|
};
|
|
175
|
-
var
|
|
176
|
-
for (var
|
|
177
|
-
(a = e[n]) && (
|
|
178
|
-
return
|
|
175
|
+
var Ko = Object.defineProperty, Yo = Object.getOwnPropertyDescriptor, we = (e, t, o, s) => {
|
|
176
|
+
for (var r = s > 1 ? void 0 : s ? Yo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
177
|
+
(a = e[n]) && (r = (s ? a(t, o, r) : a(r)) || r);
|
|
178
|
+
return s && r && Ko(t, o, r), r;
|
|
179
179
|
};
|
|
180
|
-
const
|
|
181
|
-
function
|
|
180
|
+
const j = "setup-step-container-model";
|
|
181
|
+
function nt(e) {
|
|
182
182
|
return (t) => {
|
|
183
|
-
const
|
|
184
|
-
|
|
183
|
+
const o = St.factory(t.id)(t);
|
|
184
|
+
o.updateModel(t), e.addModel(o);
|
|
185
185
|
};
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function at(e) {
|
|
188
188
|
return (t) => {
|
|
189
189
|
e.removeModel(t);
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
|
-
let
|
|
193
|
-
constructor(e, t,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
this.id = e, this.logger =
|
|
192
|
+
let E = class {
|
|
193
|
+
constructor(e, t, o) {
|
|
194
|
+
i(this, "id");
|
|
195
|
+
i(this, "_currentStep");
|
|
196
|
+
i(this, "logger");
|
|
197
|
+
i(this, "models");
|
|
198
|
+
i(this, "authModel");
|
|
199
|
+
this.id = e, this.logger = o.logger, this._currentStep = void 0, this.models = new Ve({
|
|
200
200
|
parentId: e,
|
|
201
201
|
sortKey: "idx"
|
|
202
202
|
});
|
|
@@ -212,7 +212,7 @@ let R = class {
|
|
|
212
212
|
if (!this._currentStep)
|
|
213
213
|
this._currentStep = this.firstIncompleteStep;
|
|
214
214
|
else {
|
|
215
|
-
const e = this._currentStep.idx, t = this.models.data.find((
|
|
215
|
+
const e = this._currentStep.idx, t = this.models.data.find((o) => o.idx > e);
|
|
216
216
|
t && (this._currentStep = t);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
@@ -247,124 +247,124 @@ let R = class {
|
|
|
247
247
|
}
|
|
248
248
|
async load() {
|
|
249
249
|
this.logger.debug(`loading setup-step-container container ${this.id}`);
|
|
250
|
-
const e = await
|
|
250
|
+
const e = await Pt();
|
|
251
251
|
if (e != null && e.data) {
|
|
252
252
|
const t = e.data.map(
|
|
253
|
-
(
|
|
254
|
-
...
|
|
255
|
-
idx:
|
|
256
|
-
id: `setup-${
|
|
253
|
+
(o, s) => ({
|
|
254
|
+
...o,
|
|
255
|
+
idx: s,
|
|
256
|
+
id: `setup-${o.name}`
|
|
257
257
|
})
|
|
258
258
|
);
|
|
259
|
-
|
|
259
|
+
ot({
|
|
260
260
|
container: this.models,
|
|
261
|
-
onAddItem:
|
|
262
|
-
onRemoveItem:
|
|
261
|
+
onAddItem: nt(this),
|
|
262
|
+
onRemoveItem: at(this)
|
|
263
263
|
})(t);
|
|
264
264
|
}
|
|
265
265
|
this.nextStep();
|
|
266
266
|
}
|
|
267
267
|
handleStepChanges(e) {
|
|
268
|
-
const t = e.map((
|
|
269
|
-
...
|
|
270
|
-
idx:
|
|
271
|
-
id: `setup-${
|
|
268
|
+
const t = e.map((o, s) => ({
|
|
269
|
+
...o,
|
|
270
|
+
idx: s,
|
|
271
|
+
id: `setup-${o.name}`
|
|
272
272
|
}));
|
|
273
|
-
|
|
273
|
+
ot({
|
|
274
274
|
container: this.models,
|
|
275
|
-
onAddItem:
|
|
276
|
-
onRemoveItem:
|
|
275
|
+
onAddItem: nt(this),
|
|
276
|
+
onRemoveItem: at(this)
|
|
277
277
|
})(t);
|
|
278
278
|
}
|
|
279
279
|
};
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
],
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
],
|
|
286
|
-
|
|
287
|
-
|
|
280
|
+
we([
|
|
281
|
+
$e
|
|
282
|
+
], E.prototype, "models", 2);
|
|
283
|
+
we([
|
|
284
|
+
p({ modelType: qe.type })
|
|
285
|
+
], E.prototype, "authModel", 2);
|
|
286
|
+
we([
|
|
287
|
+
Te({
|
|
288
288
|
topic: "/app/kosdev.ddk/setup/steps",
|
|
289
289
|
websocket: !0
|
|
290
290
|
})
|
|
291
|
-
],
|
|
292
|
-
|
|
293
|
-
l(
|
|
294
|
-
],
|
|
295
|
-
const
|
|
291
|
+
], E.prototype, "handleStepChanges", 1);
|
|
292
|
+
E = we([
|
|
293
|
+
l(j)
|
|
294
|
+
], E);
|
|
295
|
+
const wt = {
|
|
296
296
|
registration: {
|
|
297
|
-
[
|
|
298
|
-
class:
|
|
297
|
+
[j]: {
|
|
298
|
+
class: E,
|
|
299
299
|
singleton: !0
|
|
300
300
|
},
|
|
301
|
-
...
|
|
301
|
+
...St.registration
|
|
302
302
|
},
|
|
303
|
-
type:
|
|
304
|
-
predicate: u(
|
|
305
|
-
factory: c.Singleton.create(
|
|
306
|
-
}, { URL:
|
|
307
|
-
basePath: `${
|
|
308
|
-
}),
|
|
309
|
-
|
|
310
|
-
const e = await
|
|
311
|
-
urlOverride: `${
|
|
303
|
+
type: j,
|
|
304
|
+
predicate: u(j),
|
|
305
|
+
factory: c.Singleton.create(j)
|
|
306
|
+
}, { URL: S } = h("AUTH_SERVICE"), { getOne: Et, getAll: ce } = y.build({
|
|
307
|
+
basePath: `${S}/api/app/kosdev.ddk/ncui/`
|
|
308
|
+
}), oe = g.createLogger({ name: "auth-service", group: "Services" }), Go = async () => {
|
|
309
|
+
oe.debug("sending GET for cuis");
|
|
310
|
+
const e = await ce({
|
|
311
|
+
urlOverride: `${S}/api/app/kosdev.ddk/cui`
|
|
312
312
|
});
|
|
313
313
|
if ((e == null ? void 0 : e.status) !== 200)
|
|
314
314
|
throw new Error("Failed to retrieve cuis");
|
|
315
315
|
return e.data;
|
|
316
|
-
},
|
|
317
|
-
|
|
316
|
+
}, qo = async () => {
|
|
317
|
+
oe.debug("sending GET for navigation");
|
|
318
318
|
try {
|
|
319
|
-
const e = await
|
|
320
|
-
urlOverride: `${
|
|
319
|
+
const e = await ce({
|
|
320
|
+
urlOverride: `${S}/api/kos/descriptor/app:kosdev.ddk:ncuiDescriptor/kondra.ncui.navigations`
|
|
321
321
|
});
|
|
322
322
|
if ((e == null ? void 0 : e.status) !== 200) {
|
|
323
|
-
|
|
324
|
-
const t = await
|
|
325
|
-
urlOverride: `${
|
|
323
|
+
oe.info("no extensions found, using base data");
|
|
324
|
+
const t = await ce({
|
|
325
|
+
urlOverride: `${S}/api/kos/descriptor/system:app/kondra.ncui.navigations`
|
|
326
326
|
});
|
|
327
327
|
return (t == null ? void 0 : t.data) ?? [];
|
|
328
328
|
}
|
|
329
329
|
return (e == null ? void 0 : e.data) ?? [];
|
|
330
330
|
} catch {
|
|
331
|
-
const t = await
|
|
332
|
-
urlOverride: `${
|
|
331
|
+
const t = await ce({
|
|
332
|
+
urlOverride: `${S}/api/kos/descriptor/system:app/kondra.ncui.navigations`
|
|
333
333
|
});
|
|
334
334
|
return (t == null ? void 0 : t.data) ?? [];
|
|
335
335
|
}
|
|
336
|
-
},
|
|
337
|
-
urlOverride: `${
|
|
338
|
-
})),
|
|
339
|
-
urlOverride: `${
|
|
336
|
+
}, Qo = async () => (oe.debug("navigating to CUI"), await Et({
|
|
337
|
+
urlOverride: `${S}/api/app/kosdev.ddk/cui/open`
|
|
338
|
+
})), Xo = async () => (oe.debug("navigating to NCUI"), await Et({
|
|
339
|
+
urlOverride: `${S}/api/app/kosdev.ddk/ncui/open`
|
|
340
340
|
}));
|
|
341
|
-
var
|
|
342
|
-
for (var
|
|
343
|
-
(a = e[n]) && (
|
|
344
|
-
return
|
|
345
|
-
};
|
|
346
|
-
const
|
|
347
|
-
const
|
|
348
|
-
if (r
|
|
349
|
-
const n =
|
|
341
|
+
var Jo = Object.defineProperty, Zo = Object.getOwnPropertyDescriptor, O = (e, t, o, s) => {
|
|
342
|
+
for (var r = s > 1 ? void 0 : s ? Zo(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
343
|
+
(a = e[n]) && (r = (s ? a(t, o, r) : a(r)) || r);
|
|
344
|
+
return s && r && Jo(t, o, r), r;
|
|
345
|
+
};
|
|
346
|
+
const U = "application-model", Lt = (e, t = "") => e.reduce((o, s) => {
|
|
347
|
+
const r = t ? `${t}.${s.name}` : s.name;
|
|
348
|
+
if (o[r] = { ...s, root: !t }, s.children) {
|
|
349
|
+
const n = Lt(s.children, r);
|
|
350
350
|
Object.keys(n).forEach((a) => {
|
|
351
|
-
|
|
351
|
+
o[a] = n[a];
|
|
352
352
|
});
|
|
353
353
|
}
|
|
354
|
-
return
|
|
354
|
+
return o;
|
|
355
355
|
}, {});
|
|
356
|
-
let
|
|
357
|
-
constructor(e, t,
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
356
|
+
let b = class {
|
|
357
|
+
constructor(e, t, o) {
|
|
358
|
+
i(this, "id");
|
|
359
|
+
i(this, "device");
|
|
360
|
+
i(this, "authModel");
|
|
361
|
+
i(this, "setupStepContainer");
|
|
362
|
+
i(this, "door");
|
|
363
|
+
i(this, "ncuiLanguage");
|
|
364
|
+
i(this, "activeCui");
|
|
365
|
+
i(this, "fallbackCui");
|
|
366
|
+
i(this, "_cuis", []);
|
|
367
|
+
i(this, "_navigationItems", []);
|
|
368
368
|
// @kosConfigProperty({
|
|
369
369
|
// path: 'somewhere.enable.dial.animation',
|
|
370
370
|
// attribute: 'enableDialAnimation',
|
|
@@ -380,9 +380,9 @@ let M = class {
|
|
|
380
380
|
// attribute: 'enableSidebarAnimation',
|
|
381
381
|
// })
|
|
382
382
|
// enableSidebarAnimation!: KosConfigProperty<boolean>;
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
this.id = e, this.languages = [], this._cuis = [], this.logger =
|
|
383
|
+
i(this, "languages");
|
|
384
|
+
i(this, "logger");
|
|
385
|
+
this.id = e, this.languages = [], this._cuis = [], this.logger = o.logger, this.door = No.instance("app:kosdev.ddk:service:door:door").options({
|
|
386
386
|
doorPath: "app:kosdev.ddk:service:door:door"
|
|
387
387
|
}).build();
|
|
388
388
|
}
|
|
@@ -396,7 +396,7 @@ let M = class {
|
|
|
396
396
|
return this._cuis.reduce((e, t) => (e[t.appId] = t, e), {});
|
|
397
397
|
}
|
|
398
398
|
get navigationItems() {
|
|
399
|
-
return
|
|
399
|
+
return Lt(this._navigationItems);
|
|
400
400
|
}
|
|
401
401
|
get hasCuiDefined() {
|
|
402
402
|
return !!this.activeCui.value || !!this.fallbackCui.value;
|
|
@@ -405,19 +405,19 @@ let M = class {
|
|
|
405
405
|
return this.door.isOpen;
|
|
406
406
|
}
|
|
407
407
|
async enter() {
|
|
408
|
-
this.logger.info("navigating to NCUI"), await
|
|
408
|
+
this.logger.info("navigating to NCUI"), await Xo();
|
|
409
409
|
}
|
|
410
410
|
async exit() {
|
|
411
|
-
this.logger.info("navigating to CUI"), await
|
|
411
|
+
this.logger.info("navigating to CUI"), await Qo();
|
|
412
412
|
}
|
|
413
413
|
// -------------------LIFECYCLE----------------------------
|
|
414
414
|
async load() {
|
|
415
|
-
var
|
|
415
|
+
var o, s;
|
|
416
416
|
this.logger.debug(`loading application ${this.id}`);
|
|
417
|
-
const e = await
|
|
417
|
+
const e = await qo();
|
|
418
418
|
this._navigationItems = e;
|
|
419
|
-
const t = await
|
|
420
|
-
this._cuis = t, (
|
|
419
|
+
const t = await Go();
|
|
420
|
+
this._cuis = t, (o = this.setupStepContainer) != null && o.hasIncompletePreSteps && ((s = this.authModel) == null || s.forceRole("technician")), this.languages = [
|
|
421
421
|
{
|
|
422
422
|
name: "English",
|
|
423
423
|
locale: "en"
|
|
@@ -425,87 +425,87 @@ let M = class {
|
|
|
425
425
|
];
|
|
426
426
|
}
|
|
427
427
|
};
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
],
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
],
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
],
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
],
|
|
440
|
-
|
|
428
|
+
O([
|
|
429
|
+
p({ modelType: bo.type })
|
|
430
|
+
], b.prototype, "device", 2);
|
|
431
|
+
O([
|
|
432
|
+
p({ modelType: qe.type })
|
|
433
|
+
], b.prototype, "authModel", 2);
|
|
434
|
+
O([
|
|
435
|
+
p({ modelType: wt.type })
|
|
436
|
+
], b.prototype, "setupStepContainer", 2);
|
|
437
|
+
O([
|
|
438
|
+
$e
|
|
439
|
+
], b.prototype, "door", 2);
|
|
440
|
+
O([
|
|
441
441
|
d({
|
|
442
442
|
path: "app:kosdev.ddk:app",
|
|
443
443
|
attribute: "ncui.ncuiLanguage"
|
|
444
444
|
//updated attribute for language config property
|
|
445
445
|
})
|
|
446
|
-
],
|
|
447
|
-
|
|
446
|
+
], b.prototype, "ncuiLanguage", 2);
|
|
447
|
+
O([
|
|
448
448
|
d({
|
|
449
449
|
path: "app:kosdev.ddk:service:cui",
|
|
450
450
|
attribute: "activeCui"
|
|
451
451
|
})
|
|
452
|
-
],
|
|
453
|
-
|
|
452
|
+
], b.prototype, "activeCui", 2);
|
|
453
|
+
O([
|
|
454
454
|
d({
|
|
455
455
|
path: "app:kosdev.ddk:service:cui",
|
|
456
456
|
attribute: "fallbackCui"
|
|
457
457
|
})
|
|
458
|
-
],
|
|
459
|
-
|
|
460
|
-
l(
|
|
461
|
-
],
|
|
462
|
-
const
|
|
458
|
+
], b.prototype, "fallbackCui", 2);
|
|
459
|
+
b = O([
|
|
460
|
+
l(U)
|
|
461
|
+
], b);
|
|
462
|
+
const Xe = {
|
|
463
463
|
registration: {
|
|
464
|
-
[
|
|
465
|
-
class:
|
|
464
|
+
[U]: {
|
|
465
|
+
class: b,
|
|
466
466
|
singleton: !0
|
|
467
467
|
}
|
|
468
468
|
},
|
|
469
|
-
type:
|
|
470
|
-
predicate: u(
|
|
469
|
+
type: U,
|
|
470
|
+
predicate: u(U),
|
|
471
471
|
factory: c.Singleton.create(
|
|
472
|
-
|
|
472
|
+
U
|
|
473
473
|
)
|
|
474
|
-
},
|
|
474
|
+
}, de = {
|
|
475
475
|
none: 999,
|
|
476
476
|
crew: 0,
|
|
477
477
|
technician: 1,
|
|
478
478
|
manager: 2
|
|
479
|
-
},
|
|
480
|
-
if (t.type ===
|
|
479
|
+
}, Ct = (e) => (t) => {
|
|
480
|
+
if (t.type === ht)
|
|
481
481
|
return !1;
|
|
482
|
-
const
|
|
483
|
-
if (e &&
|
|
484
|
-
const
|
|
485
|
-
return
|
|
482
|
+
const o = (t == null ? void 0 : t.role) || "technician";
|
|
483
|
+
if (e && o) {
|
|
484
|
+
const s = de[e.toLowerCase()] ?? de.crew, r = de[o.toLowerCase()] ?? de.crew;
|
|
485
|
+
return s >= r;
|
|
486
486
|
}
|
|
487
487
|
return !1;
|
|
488
488
|
};
|
|
489
|
-
var
|
|
490
|
-
for (var
|
|
491
|
-
(a = e[n]) && (
|
|
492
|
-
return
|
|
493
|
-
};
|
|
494
|
-
const
|
|
495
|
-
let
|
|
496
|
-
constructor(e, t,
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
this.id = e, this.logger =
|
|
489
|
+
var er = Object.defineProperty, tr = Object.getOwnPropertyDescriptor, D = (e, t, o, s) => {
|
|
490
|
+
for (var r = s > 1 ? void 0 : s ? tr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
491
|
+
(a = e[n]) && (r = (s ? a(t, o, r) : a(r)) || r);
|
|
492
|
+
return s && r && er(t, o, r), r;
|
|
493
|
+
};
|
|
494
|
+
const kt = "agitation-control-model", Fe = "resolve", or = "agitate";
|
|
495
|
+
let $ = class {
|
|
496
|
+
constructor(e, t, o) {
|
|
497
|
+
i(this, "id");
|
|
498
|
+
i(this, "futureHandler");
|
|
499
|
+
i(this, "logger");
|
|
500
|
+
i(this, "troubleContainer");
|
|
501
|
+
i(this, "_agitationFutureId");
|
|
502
|
+
i(this, "_canExit", !0);
|
|
503
|
+
i(this, "_exiting", !1);
|
|
504
|
+
i(this, "_isFailed", !1);
|
|
505
|
+
i(this, "disposer");
|
|
506
|
+
i(this, "application");
|
|
507
|
+
i(this, "inProgress", []);
|
|
508
|
+
this.id = e, this.logger = o.logger, this.troubleContainer = t.companionParent, this.futureHandler = new _o(this, Fe);
|
|
509
509
|
}
|
|
510
510
|
set isFailed(e) {
|
|
511
511
|
this._isFailed = e;
|
|
@@ -534,23 +534,23 @@ let w = class {
|
|
|
534
534
|
});
|
|
535
535
|
}
|
|
536
536
|
get readyToResolve() {
|
|
537
|
-
const e = this.queuedTroubles.length, t = this.queuedTroubles.filter((
|
|
538
|
-
return this.isDoorClosed &&
|
|
537
|
+
const e = this.queuedTroubles.length, t = this.queuedTroubles.filter((s) => s.shouldDefer), o = e > 0 && t.length === 0;
|
|
538
|
+
return this.isDoorClosed && o && this.exiting;
|
|
539
539
|
}
|
|
540
540
|
onFutureUpdate(e) {
|
|
541
|
-
e.endState ===
|
|
541
|
+
e.endState === T.Success ? (this.logger.debug(
|
|
542
542
|
`Resolve deferred troubles future ${e.id} completed successfully`
|
|
543
543
|
), this.queuedTroubles.forEach((t) => {
|
|
544
544
|
t.clearDefer();
|
|
545
|
-
}),
|
|
545
|
+
}), v(() => {
|
|
546
546
|
this._canExit = !0, this._isFailed = !1;
|
|
547
|
-
})) : (e.endState ===
|
|
547
|
+
})) : (e.endState === T.Fail || e.endState === T.Canceled || e.endState === T.Aborted) && (this.logger.error(`Resolve deferred troubles future ${e.id} failed`), this.clearAll(), v(() => {
|
|
548
548
|
this._canExit = !1, this._isFailed = !0;
|
|
549
549
|
}));
|
|
550
550
|
}
|
|
551
551
|
async resolveDeferredTroubles(e) {
|
|
552
|
-
const t = this.queuedTroubles.filter((
|
|
553
|
-
return this.inProgress.push(...t), t.length === 0 ? void 0 : await
|
|
552
|
+
const t = this.queuedTroubles.filter((s) => !s.shouldDefer).map((s) => s.rawId).filter((s) => !this.inProgress.includes(s));
|
|
553
|
+
return this.inProgress.push(...t), t.length === 0 ? void 0 : await Me.bulkResolveTroubles(
|
|
554
554
|
t,
|
|
555
555
|
void 0,
|
|
556
556
|
e
|
|
@@ -561,23 +561,23 @@ let w = class {
|
|
|
561
561
|
}
|
|
562
562
|
get queuedTroubles() {
|
|
563
563
|
return this.troubleContainer.troubles.getIndexByKey(
|
|
564
|
-
|
|
565
|
-
|
|
564
|
+
rt.INDEX_TROUBLES_BY_DEFERRED,
|
|
565
|
+
rt.TROUBLES_DEFERRED
|
|
566
566
|
);
|
|
567
567
|
}
|
|
568
568
|
get visibleTroubles() {
|
|
569
569
|
const e = this.application.currentRole;
|
|
570
|
-
return this.troubleContainer.troubles.data.filter(
|
|
570
|
+
return this.troubleContainer.troubles.data.filter(Ct(e)).filter((t) => t.type !== ht);
|
|
571
571
|
}
|
|
572
572
|
// -------------------LIFECYCLE----------------------------
|
|
573
573
|
get future() {
|
|
574
574
|
return this.futureHandler.future;
|
|
575
575
|
}
|
|
576
576
|
get resolveFuture() {
|
|
577
|
-
return this.futureHandler.getFuture(
|
|
577
|
+
return this.futureHandler.getFuture(Fe);
|
|
578
578
|
}
|
|
579
579
|
get agitateFuture() {
|
|
580
|
-
return this.futureHandler.getFuture(
|
|
580
|
+
return this.futureHandler.getFuture(or);
|
|
581
581
|
}
|
|
582
582
|
handleAgitationStarted(e) {
|
|
583
583
|
this.logger.info(`Agitation started for ${e.path}`), this._agitationFutureId = String(e.futureId);
|
|
@@ -598,306 +598,109 @@ let w = class {
|
|
|
598
598
|
this.logger.debug(`loading agitation-control ${this.id}`);
|
|
599
599
|
}
|
|
600
600
|
};
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
],
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
],
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
],
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
],
|
|
613
|
-
|
|
614
|
-
|
|
601
|
+
D([
|
|
602
|
+
p({ modelType: Xe.type })
|
|
603
|
+
], $.prototype, "application", 2);
|
|
604
|
+
D([
|
|
605
|
+
P({ alias: Fe })
|
|
606
|
+
], $.prototype, "resolveDeferredTroubles", 1);
|
|
607
|
+
D([
|
|
608
|
+
Te({ topic: yt.TOPIC_AGITATION_STARTED })
|
|
609
|
+
], $.prototype, "handleAgitationStarted", 1);
|
|
610
|
+
D([
|
|
611
|
+
Te({ topic: yt.TOPIC_AGITATION_ENDED })
|
|
612
|
+
], $.prototype, "handleAgitationEnded", 1);
|
|
613
|
+
D([
|
|
614
|
+
He({
|
|
615
615
|
dependencies: (e) => [e.readyToResolve, e._agitationFutureId]
|
|
616
616
|
})
|
|
617
|
-
],
|
|
618
|
-
|
|
619
|
-
l(
|
|
620
|
-
],
|
|
621
|
-
const
|
|
622
|
-
class:
|
|
623
|
-
type:
|
|
617
|
+
], $.prototype, "handleReadyToResolve", 1);
|
|
618
|
+
$ = D([
|
|
619
|
+
l(kt)
|
|
620
|
+
], $);
|
|
621
|
+
const Ks = new Pe({
|
|
622
|
+
class: $,
|
|
623
|
+
type: kt
|
|
624
624
|
});
|
|
625
|
-
var
|
|
626
|
-
for (var
|
|
627
|
-
(a = e[n]) && (
|
|
628
|
-
return
|
|
625
|
+
var rr = Object.defineProperty, sr = Object.getOwnPropertyDescriptor, ne = (e, t, o, s) => {
|
|
626
|
+
for (var r = s > 1 ? void 0 : s ? sr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
627
|
+
(a = e[n]) && (r = (s ? a(t, o, r) : a(r)) || r);
|
|
628
|
+
return s && r && rr(t, o, r), r;
|
|
629
629
|
};
|
|
630
|
-
const
|
|
631
|
-
let
|
|
632
|
-
constructor(e, t,
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
this.id = e, this.logger =
|
|
630
|
+
const W = "animation-model";
|
|
631
|
+
let w = class {
|
|
632
|
+
constructor(e, t, o) {
|
|
633
|
+
i(this, "id");
|
|
634
|
+
i(this, "logger");
|
|
635
|
+
i(this, "disableAll");
|
|
636
|
+
i(this, "enableDial");
|
|
637
|
+
i(this, "enableModal");
|
|
638
|
+
i(this, "enableSideBar");
|
|
639
|
+
this.id = e, this.logger = o.logger;
|
|
640
640
|
}
|
|
641
641
|
};
|
|
642
|
-
|
|
642
|
+
ne([
|
|
643
643
|
d({
|
|
644
644
|
path: "app:kosdev.ddk:app",
|
|
645
645
|
attribute: "ncui.uiConfig.animations.disableAll"
|
|
646
646
|
})
|
|
647
|
-
],
|
|
648
|
-
|
|
647
|
+
], w.prototype, "disableAll", 2);
|
|
648
|
+
ne([
|
|
649
649
|
d({
|
|
650
650
|
path: "app:kosdev.ddk:app",
|
|
651
651
|
attribute: "ncui.uiConfig.animations.enableDial"
|
|
652
652
|
})
|
|
653
|
-
],
|
|
654
|
-
|
|
653
|
+
], w.prototype, "enableDial", 2);
|
|
654
|
+
ne([
|
|
655
655
|
d({
|
|
656
656
|
path: "app:kosdev.ddk:app",
|
|
657
657
|
attribute: "ncui.uiConfig.animations.enableModal"
|
|
658
658
|
})
|
|
659
|
-
],
|
|
660
|
-
|
|
659
|
+
], w.prototype, "enableModal", 2);
|
|
660
|
+
ne([
|
|
661
661
|
d({
|
|
662
662
|
path: "app:kosdev.ddk:app",
|
|
663
663
|
attribute: "ncui.uiConfig.animations.enableSideBar"
|
|
664
664
|
})
|
|
665
|
-
],
|
|
666
|
-
|
|
667
|
-
l(
|
|
668
|
-
],
|
|
669
|
-
const
|
|
665
|
+
], w.prototype, "enableSideBar", 2);
|
|
666
|
+
w = ne([
|
|
667
|
+
l(W)
|
|
668
|
+
], w);
|
|
669
|
+
const ir = {
|
|
670
670
|
registration: {
|
|
671
|
-
[
|
|
672
|
-
class:
|
|
671
|
+
[W]: {
|
|
672
|
+
class: w,
|
|
673
673
|
singleton: !0
|
|
674
674
|
}
|
|
675
675
|
},
|
|
676
|
-
type:
|
|
677
|
-
predicate: u(
|
|
678
|
-
factory: c.Singleton.create(
|
|
679
|
-
}, { URL:
|
|
680
|
-
basePath: `${
|
|
681
|
-
}),
|
|
676
|
+
type: W,
|
|
677
|
+
predicate: u(W),
|
|
678
|
+
factory: c.Singleton.create(W)
|
|
679
|
+
}, { URL: nr } = h("ANIMATION_SERVICE"), { getAll: ar } = y.build({
|
|
680
|
+
basePath: `${nr}/api/animation`
|
|
681
|
+
}), lr = g.createLogger({
|
|
682
682
|
name: "animation-service",
|
|
683
683
|
group: "Services"
|
|
684
|
-
}),
|
|
684
|
+
}), dr = async () => (lr.debug("sending GET for animation"), await ar({})), Ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
685
685
|
__proto__: null,
|
|
686
|
-
getAnimations:
|
|
687
|
-
}, Symbol.toStringTag, { value: "Module" })), { URL: H } = h("FCM-PUMP_SERVICE"), { postModel: me } = f.build({
|
|
688
|
-
basePath: `${H}/api/fcm-pump`
|
|
689
|
-
}), y = g.createLogger({
|
|
690
|
-
name: "fcm-pump-service",
|
|
691
|
-
group: "Services"
|
|
692
|
-
}), Nt = async (e) => {
|
|
693
|
-
var t, r, i, o, n;
|
|
694
|
-
y.debug(
|
|
695
|
-
`performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`
|
|
696
|
-
);
|
|
697
|
-
try {
|
|
698
|
-
const a = await me({
|
|
699
|
-
model: {},
|
|
700
|
-
urlOverride: `${H}/api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`
|
|
701
|
-
});
|
|
702
|
-
return y.debug("performElectricalTest - response:", a), ((a == null ? void 0 : a.status) === 200 || (a == null ? void 0 : a.status) === 499) && ((t = a.data) != null && t.error) ? [a.data.error || "unknownError", a.data] : [void 0, a == null ? void 0 : a.data];
|
|
703
|
-
} catch (a) {
|
|
704
|
-
if (y.error(
|
|
705
|
-
`performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`,
|
|
706
|
-
a
|
|
707
|
-
), a instanceof Ae) {
|
|
708
|
-
const O = ((i = (r = a.payload) == null ? void 0 : r.data) == null ? void 0 : i.error) || ((o = a.payload) == null ? void 0 : o.error) || "unknownError";
|
|
709
|
-
return [O, ((n = a.payload) == null ? void 0 : n.data) || { error: O }];
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
return ["unknownError", { error: "unknownError" }];
|
|
713
|
-
}, zt = async (e, t) => {
|
|
714
|
-
y.debug(
|
|
715
|
-
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/preCalibrate`
|
|
716
|
-
);
|
|
717
|
-
try {
|
|
718
|
-
const r = await me({
|
|
719
|
-
model: {},
|
|
720
|
-
urlOverride: `${H}/api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,
|
|
721
|
-
tracker: t
|
|
722
|
-
});
|
|
723
|
-
return y.debug("performPreCalibrate - response:", r), r != null && r.data && T.initiateFuture(r.data), r == null ? void 0 : r.data;
|
|
724
|
-
} catch (r) {
|
|
725
|
-
y.error(
|
|
726
|
-
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,
|
|
727
|
-
r
|
|
728
|
-
);
|
|
729
|
-
const i = {
|
|
730
|
-
id: t || "",
|
|
731
|
-
endState: b.Fail,
|
|
732
|
-
tracker: t,
|
|
733
|
-
reason: "Failed to resolve trouble"
|
|
734
|
-
};
|
|
735
|
-
return T.initiateFuture(i), i;
|
|
736
|
-
}
|
|
737
|
-
}, Bt = async (e, t) => {
|
|
738
|
-
y.debug(
|
|
739
|
-
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/calibrate`
|
|
740
|
-
);
|
|
741
|
-
try {
|
|
742
|
-
const r = await me({
|
|
743
|
-
model: {},
|
|
744
|
-
urlOverride: `${H}/api/ext/freestyle/fcm/calibration/${e}/calibrate`,
|
|
745
|
-
tracker: t
|
|
746
|
-
});
|
|
747
|
-
return y.debug("performPreCalibrate - response:", r), r != null && r.data && T.initiateFuture(r.data), r == null ? void 0 : r.data;
|
|
748
|
-
} catch (r) {
|
|
749
|
-
y.error(
|
|
750
|
-
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/calibrate`,
|
|
751
|
-
r
|
|
752
|
-
);
|
|
753
|
-
const i = {
|
|
754
|
-
id: t || "",
|
|
755
|
-
endState: b.Fail,
|
|
756
|
-
tracker: t,
|
|
757
|
-
reason: "Failed to resolve trouble"
|
|
758
|
-
};
|
|
759
|
-
return T.initiateFuture(i), i;
|
|
760
|
-
}
|
|
761
|
-
}, Kt = async (e, t, r) => {
|
|
762
|
-
y.debug(
|
|
763
|
-
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/verify/${t}`
|
|
764
|
-
);
|
|
765
|
-
try {
|
|
766
|
-
const i = await me({
|
|
767
|
-
model: {},
|
|
768
|
-
urlOverride: `${H}/api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,
|
|
769
|
-
tracker: r
|
|
770
|
-
});
|
|
771
|
-
return y.debug("performVerify - response:", i), i != null && i.data && T.initiateFuture(i.data), i == null ? void 0 : i.data;
|
|
772
|
-
} catch (i) {
|
|
773
|
-
y.error(
|
|
774
|
-
`performVerify - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,
|
|
775
|
-
i
|
|
776
|
-
);
|
|
777
|
-
const o = {
|
|
778
|
-
id: r || "",
|
|
779
|
-
endState: b.Fail,
|
|
780
|
-
tracker: r,
|
|
781
|
-
reason: "Failed to resolve trouble"
|
|
782
|
-
};
|
|
783
|
-
return T.initiateFuture(o), o;
|
|
784
|
-
}
|
|
785
|
-
}, Fo = (e) => e ? e.data === "success" || !e.data ? "success" : e.data : "error", Yt = async (e, t, r) => {
|
|
786
|
-
y.debug(
|
|
787
|
-
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
|
|
788
|
-
);
|
|
789
|
-
try {
|
|
790
|
-
const i = await me({
|
|
791
|
-
model: {},
|
|
792
|
-
urlOverride: `${H}/api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
|
|
793
|
-
});
|
|
794
|
-
return y.debug("performPreCalibrate - response:", i), Fo(i == null ? void 0 : i.data);
|
|
795
|
-
} catch (i) {
|
|
796
|
-
y.error(
|
|
797
|
-
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`,
|
|
798
|
-
i
|
|
799
|
-
);
|
|
800
|
-
return;
|
|
801
|
-
}
|
|
802
|
-
}, Ls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
803
|
-
__proto__: null,
|
|
804
|
-
performCalibrate: Bt,
|
|
805
|
-
performComplete: Yt,
|
|
806
|
-
performElectricalTest: Nt,
|
|
807
|
-
performPreCalibrate: zt,
|
|
808
|
-
performVerify: Kt
|
|
686
|
+
getAnimations: dr
|
|
809
687
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
810
|
-
var
|
|
811
|
-
for (var
|
|
812
|
-
(a = e[n]) && (
|
|
813
|
-
return
|
|
814
|
-
};
|
|
815
|
-
const
|
|
816
|
-
let
|
|
817
|
-
constructor(e, t,
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
this.id = e, this.logger = r.logger, this.pumpModel = t.companionParent, this.futureHandler = new he(this);
|
|
823
|
-
}
|
|
824
|
-
get future() {
|
|
825
|
-
return this.futureHandler.future;
|
|
826
|
-
}
|
|
827
|
-
get name() {
|
|
828
|
-
return this.pumpModel.name;
|
|
829
|
-
}
|
|
830
|
-
get canPour() {
|
|
831
|
-
return this.pumpModel.canPour;
|
|
832
|
-
}
|
|
833
|
-
get isPouring() {
|
|
834
|
-
return this.pumpModel.isPouring;
|
|
835
|
-
}
|
|
836
|
-
async cancelPour() {
|
|
837
|
-
return this.pumpModel.cancelPour();
|
|
838
|
-
}
|
|
839
|
-
performIntent(e) {
|
|
840
|
-
return this.pumpModel.performIntent(e);
|
|
841
|
-
}
|
|
842
|
-
async performElectricalTest() {
|
|
843
|
-
const [e, t] = await Nt(this.pumpModel.path);
|
|
844
|
-
return e && jo.error(`Failed to perform electrical test on pump ${this.id}`, e), t;
|
|
845
|
-
}
|
|
846
|
-
getChildren() {
|
|
847
|
-
return [...this.futureHandler.allFutures];
|
|
848
|
-
}
|
|
849
|
-
async performPreCalibrate(e) {
|
|
850
|
-
return zt(this.pumpModel.path, e);
|
|
851
|
-
}
|
|
852
|
-
async performCalibrate(e) {
|
|
853
|
-
return Bt(this.pumpModel.path, e);
|
|
854
|
-
}
|
|
855
|
-
async performVerify(e, t) {
|
|
856
|
-
return Kt(this.pumpModel.path, e, t);
|
|
857
|
-
}
|
|
858
|
-
async performComplete(e, t) {
|
|
859
|
-
return Yt(this.pumpModel.path, e, t);
|
|
860
|
-
}
|
|
861
|
-
// -------------------LIFECYCLE----------------------------
|
|
862
|
-
async init() {
|
|
863
|
-
this.logger.debug(`initializing fcm-pump ${this.id}`);
|
|
864
|
-
}
|
|
865
|
-
async load() {
|
|
866
|
-
this.logger.debug(`loading fcm-pump ${this.id}`);
|
|
867
|
-
}
|
|
868
|
-
};
|
|
869
|
-
Ve([
|
|
870
|
-
v()
|
|
871
|
-
], F.prototype, "performPreCalibrate", 1);
|
|
872
|
-
Ve([
|
|
873
|
-
v()
|
|
874
|
-
], F.prototype, "performCalibrate", 1);
|
|
875
|
-
Ve([
|
|
876
|
-
v()
|
|
877
|
-
], F.prototype, "performVerify", 1);
|
|
878
|
-
F = Ve([
|
|
879
|
-
l(qt)
|
|
880
|
-
], F);
|
|
881
|
-
const Gt = new ke({
|
|
882
|
-
class: F,
|
|
883
|
-
type: qt
|
|
884
|
-
});
|
|
885
|
-
var Uo = Object.defineProperty, Vo = Object.getOwnPropertyDescriptor, Qt = (e, t, r, i) => {
|
|
886
|
-
for (var o = i > 1 ? void 0 : i ? Vo(t, r) : t, n = e.length - 1, a; n >= 0; n--)
|
|
887
|
-
(a = e[n]) && (o = (i ? a(t, r, o) : a(o)) || o);
|
|
888
|
-
return i && o && Uo(t, r, o), o;
|
|
889
|
-
};
|
|
890
|
-
const Q = "carb-water-model";
|
|
891
|
-
let Pe = class {
|
|
892
|
-
constructor(e, t, r) {
|
|
893
|
-
s(this, "id");
|
|
894
|
-
s(this, "assemblyModel");
|
|
895
|
-
s(this, "logger");
|
|
896
|
-
this.id = e, this.logger = r.logger;
|
|
688
|
+
var cr = Object.defineProperty, ur = Object.getOwnPropertyDescriptor, Dt = (e, t, o, s) => {
|
|
689
|
+
for (var r = s > 1 ? void 0 : s ? ur(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
690
|
+
(a = e[n]) && (r = (s ? a(t, o, r) : a(r)) || r);
|
|
691
|
+
return s && r && cr(t, o, r), r;
|
|
692
|
+
};
|
|
693
|
+
const N = "carb-water-model";
|
|
694
|
+
let he = class {
|
|
695
|
+
constructor(e, t, o) {
|
|
696
|
+
i(this, "id");
|
|
697
|
+
i(this, "assemblyModel");
|
|
698
|
+
i(this, "logger");
|
|
699
|
+
this.id = e, this.logger = o.logger;
|
|
897
700
|
}
|
|
898
701
|
getPump() {
|
|
899
702
|
const t = this.assemblyModel.getHoldersByGroup("carb")[0].pumps.data[0];
|
|
900
|
-
return
|
|
703
|
+
return Be(t, ft.type);
|
|
901
704
|
}
|
|
902
705
|
// -------------------LIFECYCLE----------------------------
|
|
903
706
|
async init() {
|
|
@@ -907,102 +710,102 @@ let Pe = class {
|
|
|
907
710
|
this.logger.debug(`loading carb-water ${this.id}`);
|
|
908
711
|
}
|
|
909
712
|
};
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
],
|
|
913
|
-
|
|
914
|
-
l(
|
|
915
|
-
],
|
|
916
|
-
const
|
|
713
|
+
Dt([
|
|
714
|
+
p({ modelType: Se.type })
|
|
715
|
+
], he.prototype, "assemblyModel", 2);
|
|
716
|
+
he = Dt([
|
|
717
|
+
l(N)
|
|
718
|
+
], he);
|
|
719
|
+
const pr = {
|
|
917
720
|
registration: {
|
|
918
|
-
[
|
|
919
|
-
class:
|
|
721
|
+
[N]: {
|
|
722
|
+
class: he,
|
|
920
723
|
singleton: !1
|
|
921
724
|
}
|
|
922
725
|
},
|
|
923
|
-
type:
|
|
924
|
-
predicate: u(
|
|
925
|
-
factory: c.Factory.create(
|
|
926
|
-
}, { URL:
|
|
927
|
-
basePath: `${
|
|
928
|
-
}),
|
|
726
|
+
type: N,
|
|
727
|
+
predicate: u(N),
|
|
728
|
+
factory: c.Factory.create(N)
|
|
729
|
+
}, { URL: I } = h("COPY-LOGS_SERVICE"), { getAll: gr, getOne: hr, postModel: It, deleteModel: yr } = y.build({
|
|
730
|
+
basePath: `${I}/api/copy-logs`
|
|
731
|
+
}), ye = g.createLogger({
|
|
929
732
|
name: "copy-logs-service",
|
|
930
733
|
group: "Services"
|
|
931
|
-
}),
|
|
932
|
-
const
|
|
734
|
+
}), Rt = async (e, t) => {
|
|
735
|
+
const o = await yr({
|
|
933
736
|
tracker: t,
|
|
934
737
|
id: e,
|
|
935
|
-
urlOverride: `${
|
|
738
|
+
urlOverride: `${I}/api/app/kosdev.ddk/copyLogs/${e}`
|
|
936
739
|
});
|
|
937
|
-
if (!(
|
|
740
|
+
if (!(o != null && o.data))
|
|
938
741
|
throw new Error("No response from server");
|
|
939
|
-
return
|
|
940
|
-
},
|
|
941
|
-
const
|
|
742
|
+
return o.data;
|
|
743
|
+
}, At = async (e, t) => {
|
|
744
|
+
const o = await It({
|
|
942
745
|
model: {},
|
|
943
746
|
tracker: t,
|
|
944
|
-
urlOverride: `${
|
|
747
|
+
urlOverride: `${I}/api/app/kosdev.ddk/copyLogs/eraseAndCopy/${e}`
|
|
945
748
|
});
|
|
946
|
-
if (!(
|
|
749
|
+
if (!(o != null && o.data))
|
|
947
750
|
throw new Error("No response from server");
|
|
948
|
-
return
|
|
949
|
-
},
|
|
950
|
-
const
|
|
751
|
+
return o.data;
|
|
752
|
+
}, Ft = async (e, t) => {
|
|
753
|
+
const o = await It({
|
|
951
754
|
model: {},
|
|
952
755
|
tracker: t,
|
|
953
|
-
urlOverride: `${
|
|
756
|
+
urlOverride: `${I}/api/app/kosdev.ddk/copyLogs/${e}`
|
|
954
757
|
});
|
|
955
|
-
if (!(
|
|
758
|
+
if (!(o != null && o.data))
|
|
956
759
|
throw new Error("No response from server");
|
|
957
|
-
return
|
|
958
|
-
},
|
|
959
|
-
|
|
760
|
+
return o.data;
|
|
761
|
+
}, xt = async () => {
|
|
762
|
+
ye.debug("sending GET for copy-logs");
|
|
960
763
|
try {
|
|
961
|
-
const e = await
|
|
962
|
-
urlOverride: `${
|
|
764
|
+
const e = await gr({
|
|
765
|
+
urlOverride: `${I}/api/app/kosdev.ddk/copyLogs/volumes/size`
|
|
963
766
|
});
|
|
964
767
|
return [void 0, e == null ? void 0 : e.data];
|
|
965
768
|
} catch (e) {
|
|
966
|
-
if (e instanceof
|
|
967
|
-
return
|
|
769
|
+
if (e instanceof pt)
|
|
770
|
+
return ye.error(`Error fetching log file size: ${e.payload.error}`), [e.payload.error, void 0];
|
|
968
771
|
}
|
|
969
772
|
return ["unknownError", void 0];
|
|
970
|
-
},
|
|
971
|
-
|
|
773
|
+
}, jt = async () => {
|
|
774
|
+
ye.debug("sending GET for log file size");
|
|
972
775
|
try {
|
|
973
|
-
const e = await
|
|
974
|
-
urlOverride: `${
|
|
776
|
+
const e = await hr({
|
|
777
|
+
urlOverride: `${I}/api/app/kosdev.ddk/copyLogs/files/size`
|
|
975
778
|
});
|
|
976
779
|
return [void 0, e == null ? void 0 : e.data];
|
|
977
780
|
} catch (e) {
|
|
978
|
-
if (e instanceof
|
|
979
|
-
return
|
|
781
|
+
if (e instanceof pt)
|
|
782
|
+
return ye.error(`Error fetching log file size: ${e.payload.error}`), [e.payload.error, void 0];
|
|
980
783
|
}
|
|
981
784
|
return ["unknownError", void 0];
|
|
982
|
-
},
|
|
785
|
+
}, Gs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
983
786
|
__proto__: null,
|
|
984
|
-
copyLogFromVolume:
|
|
985
|
-
eraseAndCopyLogsToVolume:
|
|
986
|
-
eraseVolume:
|
|
987
|
-
getLogFileSize:
|
|
988
|
-
getVolumes:
|
|
787
|
+
copyLogFromVolume: Ft,
|
|
788
|
+
eraseAndCopyLogsToVolume: At,
|
|
789
|
+
eraseVolume: Rt,
|
|
790
|
+
getLogFileSize: jt,
|
|
791
|
+
getVolumes: xt
|
|
989
792
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
990
|
-
var
|
|
991
|
-
for (var
|
|
992
|
-
(a = e[n]) && (
|
|
993
|
-
return
|
|
994
|
-
},
|
|
995
|
-
const
|
|
996
|
-
let
|
|
793
|
+
var Ut = Object.defineProperty, fr = Object.getOwnPropertyDescriptor, vr = (e, t, o) => t in e ? Ut(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, R = (e, t, o, s) => {
|
|
794
|
+
for (var r = s > 1 ? void 0 : s ? fr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
795
|
+
(a = e[n]) && (r = (s ? a(t, o, r) : a(r)) || r);
|
|
796
|
+
return s && r && Ut(t, o, r), r;
|
|
797
|
+
}, mr = (e, t, o) => (vr(e, t + "", o), o);
|
|
798
|
+
const br = "copy-logs-model";
|
|
799
|
+
let _ = class {
|
|
997
800
|
constructor(e) {
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
this.id = e, this._volumes = new
|
|
801
|
+
i(this, "id");
|
|
802
|
+
i(this, "_volumes");
|
|
803
|
+
i(this, "storageDeviceContainer");
|
|
804
|
+
i(this, "_activeVolume");
|
|
805
|
+
i(this, "_logFileSize", 0);
|
|
806
|
+
i(this, "_actionState", "idle");
|
|
807
|
+
i(this, "copyProgress");
|
|
808
|
+
this.id = e, this._volumes = new Mo(), this._activeVolume = void 0, this.copyProgress = {
|
|
1006
809
|
bytesCopied: 0,
|
|
1007
810
|
bytesToCopy: 0,
|
|
1008
811
|
filesCopied: 0,
|
|
@@ -1042,19 +845,19 @@ let S = class {
|
|
|
1042
845
|
}
|
|
1043
846
|
get diskFull() {
|
|
1044
847
|
var e;
|
|
1045
|
-
return ((e = this.future) == null ? void 0 : e.status) ===
|
|
848
|
+
return ((e = this.future) == null ? void 0 : e.status) === T.Success && this.copyProgress.filesSkipped > 0;
|
|
1046
849
|
}
|
|
1047
850
|
onFutureUpdate(e) {
|
|
1048
|
-
this.logger.info(`Future update: ${e.status}`), e.status ===
|
|
1049
|
-
e.endState =
|
|
1050
|
-
})), e.status ===
|
|
851
|
+
this.logger.info(`Future update: ${e.status}`), e.status === T.Success && (this.logger.info(`Future success: ${e.status}`), this.diskFull && v(() => {
|
|
852
|
+
e.endState = T.Fail, e.reason = "errDiskFull";
|
|
853
|
+
})), e.status === T.Fail && this.logger.error(`Future failed: ${e.status}`), e.note === "copy" ? v(() => {
|
|
1051
854
|
this._actionState = "copying", this.copyProgress = e.clientData || {
|
|
1052
855
|
bytesCopied: 0,
|
|
1053
856
|
bytesToCopy: 0,
|
|
1054
857
|
filesCopied: 0,
|
|
1055
858
|
filesSkipped: 0
|
|
1056
859
|
};
|
|
1057
|
-
}) : (this._actionState = "erasing",
|
|
860
|
+
}) : (this._actionState = "erasing", v(() => {
|
|
1058
861
|
this.copyProgress = {
|
|
1059
862
|
bytesCopied: 0,
|
|
1060
863
|
bytesToCopy: 0,
|
|
@@ -1067,31 +870,31 @@ let S = class {
|
|
|
1067
870
|
var t;
|
|
1068
871
|
if (!e)
|
|
1069
872
|
throw new Error("No tracker provided");
|
|
1070
|
-
if (
|
|
873
|
+
if (v(() => {
|
|
1071
874
|
this._actionState = "erasing";
|
|
1072
875
|
}), !this._activeVolume)
|
|
1073
876
|
throw this.logger.error("No active volume selected"), new Error("No active volume selected");
|
|
1074
|
-
return this.logger.info(`Erasing volume ${(t = this._activeVolume) == null ? void 0 : t.name}`),
|
|
877
|
+
return this.logger.info(`Erasing volume ${(t = this._activeVolume) == null ? void 0 : t.name}`), At(this._activeVolume.id, e);
|
|
1075
878
|
}
|
|
1076
879
|
async eraseVolume(e) {
|
|
1077
880
|
var t;
|
|
1078
881
|
if (!e)
|
|
1079
882
|
throw new Error("No tracker provided");
|
|
1080
|
-
if (
|
|
883
|
+
if (v(() => {
|
|
1081
884
|
this._actionState = "erasing";
|
|
1082
885
|
}), !this._activeVolume)
|
|
1083
886
|
throw this.logger.error("No active volume selected"), new Error("No active volume selected");
|
|
1084
|
-
return this.logger.info(`Erasing volume ${(t = this._activeVolume) == null ? void 0 : t.name}`),
|
|
887
|
+
return this.logger.info(`Erasing volume ${(t = this._activeVolume) == null ? void 0 : t.name}`), Rt(this._activeVolume.id, e);
|
|
1085
888
|
}
|
|
1086
889
|
async copyLogs(e) {
|
|
1087
890
|
var t;
|
|
1088
891
|
if (!e)
|
|
1089
892
|
throw new Error("No tracker provided");
|
|
1090
|
-
if (
|
|
893
|
+
if (v(() => {
|
|
1091
894
|
this._actionState = "copying";
|
|
1092
895
|
}), !this._activeVolume)
|
|
1093
896
|
throw this.logger.error("No active volume selected"), new Error("No active volume selected");
|
|
1094
|
-
return this.logger.info(`Copying logs to ${(t = this._activeVolume) == null ? void 0 : t.name}`),
|
|
897
|
+
return this.logger.info(`Copying logs to ${(t = this._activeVolume) == null ? void 0 : t.name}`), Ft(this._activeVolume.id, e);
|
|
1095
898
|
}
|
|
1096
899
|
handleInsertion() {
|
|
1097
900
|
this.inserted ? this.syncVolumes() : (this._volumes.clear(), this.clearActiveVolume());
|
|
@@ -1100,27 +903,27 @@ let S = class {
|
|
|
1100
903
|
this.logger.debug(`initializing copy-logs ${this.id}`);
|
|
1101
904
|
}
|
|
1102
905
|
async syncVolumes() {
|
|
1103
|
-
const [e, t] = await
|
|
1104
|
-
if (
|
|
1105
|
-
this.logger.error(`Error fetching log file size: ${
|
|
906
|
+
const [e, t] = await xt(), [o, s] = await jt();
|
|
907
|
+
if (o) {
|
|
908
|
+
this.logger.error(`Error fetching log file size: ${o}`);
|
|
1106
909
|
return;
|
|
1107
910
|
}
|
|
1108
911
|
if (e) {
|
|
1109
912
|
this.logger.error(`Error fetching volumes: ${e}`);
|
|
1110
913
|
return;
|
|
1111
914
|
}
|
|
1112
|
-
t && (t.forEach((
|
|
1113
|
-
const n = this.storageDeviceContainer.getModel(
|
|
915
|
+
t && (t.forEach((r) => {
|
|
916
|
+
const n = this.storageDeviceContainer.getModel(r.id);
|
|
1114
917
|
if (n) {
|
|
1115
918
|
const a = {
|
|
1116
|
-
id:
|
|
919
|
+
id: r.id,
|
|
1117
920
|
name: n.label,
|
|
1118
|
-
freeBytes:
|
|
1119
|
-
totalBytes:
|
|
921
|
+
freeBytes: r.info.freeBytes,
|
|
922
|
+
totalBytes: r.info.totalBytes
|
|
1120
923
|
};
|
|
1121
924
|
this._volumes.addModel(a);
|
|
1122
925
|
}
|
|
1123
|
-
}), t.length === 1 ? this.updateActiveVolume(this._volumes.data[0]) : this.clearActiveVolume()),
|
|
926
|
+
}), t.length === 1 ? this.updateActiveVolume(this._volumes.data[0]) : this.clearActiveVolume()), s && (this.logger.info(`Log file size: ${s}`), this.updateLogFileSize(parseInt(s, 10)));
|
|
1124
927
|
}
|
|
1125
928
|
async activate() {
|
|
1126
929
|
this.logger.debug(`activating copy-logs ${this.id}`), await this.syncVolumes();
|
|
@@ -1129,82 +932,82 @@ let S = class {
|
|
|
1129
932
|
this.logger.debug(`loading copy-logs ${this.id}`);
|
|
1130
933
|
}
|
|
1131
934
|
};
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
],
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
],
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
],
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
],
|
|
1145
|
-
|
|
1146
|
-
|
|
935
|
+
mr(_, "Registration");
|
|
936
|
+
R([
|
|
937
|
+
p({ modelType: To.type })
|
|
938
|
+
], _.prototype, "storageDeviceContainer", 2);
|
|
939
|
+
R([
|
|
940
|
+
P()
|
|
941
|
+
], _.prototype, "eraseAndCopyVolume", 1);
|
|
942
|
+
R([
|
|
943
|
+
P()
|
|
944
|
+
], _.prototype, "eraseVolume", 1);
|
|
945
|
+
R([
|
|
946
|
+
P()
|
|
947
|
+
], _.prototype, "copyLogs", 1);
|
|
948
|
+
R([
|
|
949
|
+
He({
|
|
1147
950
|
dependencies: (e) => [e.inserted]
|
|
1148
951
|
})
|
|
1149
|
-
],
|
|
1150
|
-
|
|
1151
|
-
l({ modelTypeId:
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
],
|
|
1155
|
-
const
|
|
952
|
+
], _.prototype, "handleInsertion", 1);
|
|
953
|
+
_ = R([
|
|
954
|
+
l({ modelTypeId: br, singleton: !0 }),
|
|
955
|
+
$o(),
|
|
956
|
+
gt()
|
|
957
|
+
], _);
|
|
958
|
+
const qs = _.Registration, Wt = g.createLogger({
|
|
1156
959
|
name: "dashboard-operations-service",
|
|
1157
960
|
group: "Services"
|
|
1158
|
-
}),
|
|
961
|
+
}), Nt = async (e, t) => (Wt.debug("resolveAll"), await Me.bulkResolveTroubles(
|
|
1159
962
|
e,
|
|
1160
963
|
void 0,
|
|
1161
964
|
t
|
|
1162
|
-
)),
|
|
965
|
+
)), zt = async (e, t) => (Wt.debug("resolveTrouble"), await Me.resolveTrouble(
|
|
1163
966
|
e,
|
|
1164
967
|
void 0,
|
|
1165
968
|
t
|
|
1166
|
-
)),
|
|
969
|
+
)), Qs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1167
970
|
__proto__: null,
|
|
1168
|
-
resolveAll:
|
|
1169
|
-
resolveTrouble:
|
|
971
|
+
resolveAll: Nt,
|
|
972
|
+
resolveTrouble: zt
|
|
1170
973
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1171
|
-
var
|
|
1172
|
-
for (var
|
|
1173
|
-
(a = e[n]) && (
|
|
1174
|
-
return
|
|
974
|
+
var _r = Object.defineProperty, Tr = Object.getOwnPropertyDescriptor, Ee = (e, t, o, s) => {
|
|
975
|
+
for (var r = s > 1 ? void 0 : s ? Tr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
976
|
+
(a = e[n]) && (r = (s ? a(t, o, r) : a(r)) || r);
|
|
977
|
+
return s && r && _r(t, o, r), r;
|
|
1175
978
|
};
|
|
1176
|
-
const
|
|
1177
|
-
function
|
|
979
|
+
const z = "dashboard-operations-model";
|
|
980
|
+
function lt(e) {
|
|
1178
981
|
return !e.deferred;
|
|
1179
982
|
}
|
|
1180
|
-
function
|
|
983
|
+
function dt(e) {
|
|
1181
984
|
return e.deferred;
|
|
1182
985
|
}
|
|
1183
|
-
let
|
|
1184
|
-
constructor(e, t,
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
this.id = e, this.futureHandler = new
|
|
986
|
+
let L = class {
|
|
987
|
+
constructor(e, t, o) {
|
|
988
|
+
i(this, "id");
|
|
989
|
+
i(this, "troubles");
|
|
990
|
+
i(this, "futureHandler");
|
|
991
|
+
i(this, "logger");
|
|
992
|
+
this.id = e, this.futureHandler = new Ye(this), this.logger = o.logger;
|
|
1190
993
|
}
|
|
1191
994
|
get troublesByType() {
|
|
1192
995
|
return this.troubles.troubles.data.reduce(
|
|
1193
|
-
|
|
996
|
+
Po,
|
|
1194
997
|
{}
|
|
1195
998
|
);
|
|
1196
999
|
}
|
|
1197
1000
|
get queuedPurgeTroubles() {
|
|
1198
|
-
return this.purgeTroubles.filter(
|
|
1001
|
+
return this.purgeTroubles.filter(dt);
|
|
1199
1002
|
}
|
|
1200
1003
|
get queuedPrimeTroubles() {
|
|
1201
|
-
return this.primeTroubles.filter(
|
|
1004
|
+
return this.primeTroubles.filter(dt);
|
|
1202
1005
|
}
|
|
1203
1006
|
get resolvablePrimeTroubles() {
|
|
1204
|
-
return this.primeTroubles.filter(
|
|
1007
|
+
return this.primeTroubles.filter(lt);
|
|
1205
1008
|
}
|
|
1206
1009
|
get resolvablePurgeTroubles() {
|
|
1207
|
-
return this.purgeTroubles.filter(
|
|
1010
|
+
return this.purgeTroubles.filter(lt);
|
|
1208
1011
|
}
|
|
1209
1012
|
get hasResolvablePurgeTroubles() {
|
|
1210
1013
|
return this.resolvablePurgeTroubles.length > 0;
|
|
@@ -1219,10 +1022,10 @@ let A = class {
|
|
|
1219
1022
|
return this.primeTroubles.length > 0;
|
|
1220
1023
|
}
|
|
1221
1024
|
get purgeTroubles() {
|
|
1222
|
-
return this.troublesByType[
|
|
1025
|
+
return this.troublesByType[st] || [];
|
|
1223
1026
|
}
|
|
1224
1027
|
get primeTroubles() {
|
|
1225
|
-
return this.troublesByType[
|
|
1028
|
+
return this.troublesByType[Io] || [];
|
|
1226
1029
|
}
|
|
1227
1030
|
get future() {
|
|
1228
1031
|
return this.futureHandler.getFuture();
|
|
@@ -1230,17 +1033,17 @@ let A = class {
|
|
|
1230
1033
|
async resolveAllTroubles(e, t) {
|
|
1231
1034
|
if (!t)
|
|
1232
1035
|
throw new Error("No tracker provided");
|
|
1233
|
-
const
|
|
1234
|
-
|
|
1036
|
+
const o = e === st ? this.purgeTroubles : this.primeTroubles;
|
|
1037
|
+
o.filter((a) => a.shouldDefer).forEach((a) => {
|
|
1235
1038
|
this.logger.info(`Deferring trouble ${a.rawId}`), a.defer();
|
|
1236
1039
|
});
|
|
1237
|
-
const
|
|
1238
|
-
return
|
|
1040
|
+
const r = o.filter((a) => !a.shouldDefer).map((a) => a.rawId);
|
|
1041
|
+
return r.length === 0 ? void 0 : await Nt(r, t);
|
|
1239
1042
|
}
|
|
1240
1043
|
async resolveTrouble(e, t) {
|
|
1241
1044
|
if (!t)
|
|
1242
1045
|
throw new Error("No tracker provided");
|
|
1243
|
-
return await
|
|
1046
|
+
return await zt(e, t);
|
|
1244
1047
|
}
|
|
1245
1048
|
// -------------------LIFECYCLE----------------------------
|
|
1246
1049
|
async init() {
|
|
@@ -1250,40 +1053,40 @@ let A = class {
|
|
|
1250
1053
|
this.logger.debug(`loading dashboard-operations ${this.id}`);
|
|
1251
1054
|
}
|
|
1252
1055
|
};
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
],
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
],
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
],
|
|
1262
|
-
|
|
1263
|
-
l(
|
|
1264
|
-
],
|
|
1265
|
-
const
|
|
1056
|
+
Ee([
|
|
1057
|
+
p({ modelType: Ke.type })
|
|
1058
|
+
], L.prototype, "troubles", 2);
|
|
1059
|
+
Ee([
|
|
1060
|
+
P()
|
|
1061
|
+
], L.prototype, "resolveAllTroubles", 1);
|
|
1062
|
+
Ee([
|
|
1063
|
+
P()
|
|
1064
|
+
], L.prototype, "resolveTrouble", 1);
|
|
1065
|
+
L = Ee([
|
|
1066
|
+
l(z)
|
|
1067
|
+
], L);
|
|
1068
|
+
const Je = {
|
|
1266
1069
|
registration: {
|
|
1267
|
-
[
|
|
1268
|
-
class:
|
|
1070
|
+
[z]: {
|
|
1071
|
+
class: L,
|
|
1269
1072
|
singleton: !0
|
|
1270
1073
|
}
|
|
1271
1074
|
},
|
|
1272
|
-
type:
|
|
1273
|
-
predicate: u(
|
|
1274
|
-
factory: c.Singleton.create(
|
|
1075
|
+
type: z,
|
|
1076
|
+
predicate: u(z),
|
|
1077
|
+
factory: c.Singleton.create(z)
|
|
1275
1078
|
};
|
|
1276
|
-
var
|
|
1277
|
-
for (var
|
|
1278
|
-
(a = e[n]) && (
|
|
1279
|
-
return
|
|
1079
|
+
var $r = Object.getOwnPropertyDescriptor, Mr = (e, t, o, s) => {
|
|
1080
|
+
for (var r = s > 1 ? void 0 : s ? $r(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1081
|
+
(a = e[n]) && (r = a(r) || r);
|
|
1082
|
+
return r;
|
|
1280
1083
|
};
|
|
1281
|
-
const
|
|
1282
|
-
let
|
|
1283
|
-
constructor(e, t,
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
this.id = e, this.logger =
|
|
1084
|
+
const V = "dispenser-model";
|
|
1085
|
+
let xe = class {
|
|
1086
|
+
constructor(e, t, o) {
|
|
1087
|
+
i(this, "id");
|
|
1088
|
+
i(this, "logger");
|
|
1089
|
+
this.id = e, this.logger = o.logger;
|
|
1287
1090
|
}
|
|
1288
1091
|
updateModel() {
|
|
1289
1092
|
}
|
|
@@ -1295,40 +1098,40 @@ let Je = class {
|
|
|
1295
1098
|
this.logger.debug(`loading dispenser ${this.id}`);
|
|
1296
1099
|
}
|
|
1297
1100
|
};
|
|
1298
|
-
|
|
1299
|
-
l(
|
|
1300
|
-
],
|
|
1301
|
-
const
|
|
1101
|
+
xe = Mr([
|
|
1102
|
+
l(V)
|
|
1103
|
+
], xe);
|
|
1104
|
+
const Pr = {
|
|
1302
1105
|
registration: {
|
|
1303
|
-
[
|
|
1304
|
-
class:
|
|
1106
|
+
[V]: {
|
|
1107
|
+
class: xe,
|
|
1305
1108
|
singleton: !0
|
|
1306
1109
|
}
|
|
1307
1110
|
},
|
|
1308
|
-
type:
|
|
1309
|
-
predicate: u(
|
|
1310
|
-
factory: c.Singleton.create(
|
|
1311
|
-
}, { URL:
|
|
1312
|
-
basePath: `${
|
|
1313
|
-
}),
|
|
1111
|
+
type: V,
|
|
1112
|
+
predicate: u(V),
|
|
1113
|
+
factory: c.Singleton.create(V)
|
|
1114
|
+
}, { URL: Or } = h("DISPENSER_SERVICE"), { getAll: Sr } = y.build({
|
|
1115
|
+
basePath: `${Or}/api/dispenser`
|
|
1116
|
+
}), wr = g.createLogger({
|
|
1314
1117
|
name: "dispenser-service",
|
|
1315
1118
|
group: "Services"
|
|
1316
|
-
}),
|
|
1119
|
+
}), Er = async () => (wr.debug("sending GET for dispenser"), await Sr({})), Xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1317
1120
|
__proto__: null,
|
|
1318
|
-
getDispensers:
|
|
1121
|
+
getDispensers: Er
|
|
1319
1122
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1320
|
-
var
|
|
1321
|
-
for (var
|
|
1322
|
-
(a = e[n]) && (
|
|
1323
|
-
return
|
|
1324
|
-
};
|
|
1325
|
-
const
|
|
1326
|
-
let
|
|
1327
|
-
constructor(e, t,
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
this.id = e, this.logger =
|
|
1123
|
+
var Lr = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, Vt = (e, t, o, s) => {
|
|
1124
|
+
for (var r = s > 1 ? void 0 : s ? Cr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1125
|
+
(a = e[n]) && (r = (s ? a(t, o, r) : a(r)) || r);
|
|
1126
|
+
return s && r && Lr(t, o, r), r;
|
|
1127
|
+
};
|
|
1128
|
+
const H = "dispenser-info-model";
|
|
1129
|
+
let fe = class {
|
|
1130
|
+
constructor(e, t, o) {
|
|
1131
|
+
i(this, "logger");
|
|
1132
|
+
i(this, "id");
|
|
1133
|
+
i(this, "name");
|
|
1134
|
+
this.id = e, this.logger = o.logger;
|
|
1332
1135
|
}
|
|
1333
1136
|
// -------------------LIFECYCLE----------------------------
|
|
1334
1137
|
async init() {
|
|
@@ -1338,48 +1141,48 @@ let Me = class {
|
|
|
1338
1141
|
this.logger.debug(`loading dispenser-info ${this.id}`);
|
|
1339
1142
|
}
|
|
1340
1143
|
};
|
|
1341
|
-
|
|
1144
|
+
Vt([
|
|
1342
1145
|
d({
|
|
1343
1146
|
path: "kos:device",
|
|
1344
1147
|
attribute: "name"
|
|
1345
1148
|
})
|
|
1346
|
-
],
|
|
1347
|
-
|
|
1348
|
-
l(
|
|
1349
|
-
],
|
|
1350
|
-
const
|
|
1149
|
+
], fe.prototype, "name", 2);
|
|
1150
|
+
fe = Vt([
|
|
1151
|
+
l(H)
|
|
1152
|
+
], fe);
|
|
1153
|
+
const kr = {
|
|
1351
1154
|
registration: {
|
|
1352
|
-
[
|
|
1353
|
-
class:
|
|
1155
|
+
[H]: {
|
|
1156
|
+
class: fe,
|
|
1354
1157
|
singleton: !1
|
|
1355
1158
|
}
|
|
1356
1159
|
},
|
|
1357
|
-
type:
|
|
1358
|
-
predicate: u(
|
|
1160
|
+
type: H,
|
|
1161
|
+
predicate: u(H),
|
|
1359
1162
|
factory: c.Factory.create(
|
|
1360
|
-
|
|
1163
|
+
H
|
|
1361
1164
|
)
|
|
1362
|
-
}, { URL:
|
|
1363
|
-
basePath: `${
|
|
1364
|
-
}),
|
|
1165
|
+
}, { URL: Dr } = h("DISPENSER-INFO_SERVICE"), { getAll: Ir } = y.build({
|
|
1166
|
+
basePath: `${Dr}/api/dispenser-info`
|
|
1167
|
+
}), Rr = g.createLogger({
|
|
1365
1168
|
name: "dispenser-info-service",
|
|
1366
1169
|
group: "Services"
|
|
1367
|
-
}),
|
|
1170
|
+
}), Ar = async () => (Rr.debug("sending GET for dispenser-info"), await Ir({})), Js = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1368
1171
|
__proto__: null,
|
|
1369
|
-
getDispenserInfos:
|
|
1172
|
+
getDispenserInfos: Ar
|
|
1370
1173
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1371
|
-
var
|
|
1372
|
-
for (var
|
|
1373
|
-
(a = e[n]) && (
|
|
1374
|
-
return
|
|
1174
|
+
var Fr = Object.getOwnPropertyDescriptor, xr = (e, t, o, s) => {
|
|
1175
|
+
for (var r = s > 1 ? void 0 : s ? Fr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1176
|
+
(a = e[n]) && (r = a(r) || r);
|
|
1177
|
+
return r;
|
|
1375
1178
|
};
|
|
1376
|
-
const
|
|
1377
|
-
let
|
|
1378
|
-
constructor(e, t,
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
this.id = e, this.logger =
|
|
1179
|
+
const B = "enrollment-model";
|
|
1180
|
+
let je = class {
|
|
1181
|
+
constructor(e, t, o) {
|
|
1182
|
+
i(this, "id");
|
|
1183
|
+
i(this, "logger");
|
|
1184
|
+
i(this, "enrolled");
|
|
1185
|
+
this.id = e, this.logger = o.logger, this.enrolled = !1;
|
|
1383
1186
|
}
|
|
1384
1187
|
updateModel(e) {
|
|
1385
1188
|
console.log("updateModel:", e);
|
|
@@ -1392,77 +1195,77 @@ let Ze = class {
|
|
|
1392
1195
|
this.logger.debug(`loading enrollment ${this.id}`);
|
|
1393
1196
|
}
|
|
1394
1197
|
};
|
|
1395
|
-
|
|
1396
|
-
l(
|
|
1397
|
-
],
|
|
1398
|
-
const
|
|
1198
|
+
je = xr([
|
|
1199
|
+
l(B)
|
|
1200
|
+
], je);
|
|
1201
|
+
const jr = {
|
|
1399
1202
|
registration: {
|
|
1400
|
-
[
|
|
1401
|
-
class:
|
|
1203
|
+
[B]: {
|
|
1204
|
+
class: je,
|
|
1402
1205
|
singleton: !0
|
|
1403
1206
|
}
|
|
1404
1207
|
},
|
|
1405
|
-
type:
|
|
1406
|
-
predicate: u(
|
|
1407
|
-
factory: c.Singleton.create(
|
|
1408
|
-
}, { URL:
|
|
1409
|
-
basePath: `${
|
|
1410
|
-
}),
|
|
1208
|
+
type: B,
|
|
1209
|
+
predicate: u(B),
|
|
1210
|
+
factory: c.Singleton.create(B)
|
|
1211
|
+
}, { URL: Ur } = h("ENROLLMENT_SERVICE"), { getAll: Wr } = y.build({
|
|
1212
|
+
basePath: `${Ur}/api/enrollment`
|
|
1213
|
+
}), Nr = g.createLogger({
|
|
1411
1214
|
name: "enrollment-service",
|
|
1412
1215
|
group: "Services"
|
|
1413
|
-
}),
|
|
1216
|
+
}), zr = async () => (Nr.debug("sending GET for enrollment"), await Wr({})), Zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1414
1217
|
__proto__: null,
|
|
1415
|
-
getEnrollments:
|
|
1416
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1417
|
-
const
|
|
1418
|
-
return
|
|
1419
|
-
},
|
|
1420
|
-
|
|
1218
|
+
getEnrollments: zr
|
|
1219
|
+
}, Symbol.toStringTag, { value: "Module" })), ei = (e) => e.toLowerCase().includes("micros"), ti = (e) => !e.toLowerCase().includes("micros"), oi = (e) => (t) => {
|
|
1220
|
+
const o = e == null ? void 0 : e.getHoldersByGroup(t);
|
|
1221
|
+
return o ? o.map((s) => ({ id: s.id, name: s.ingredientName, path: s.path })) : null;
|
|
1222
|
+
}, ri = ["water", "carb", "ns", "nss"], re = "dashboardKeyFactory", De = [];
|
|
1223
|
+
Oo(re, {
|
|
1421
1224
|
register: (e, t) => {
|
|
1422
|
-
|
|
1225
|
+
De.includes(t) || De.push(t);
|
|
1423
1226
|
},
|
|
1424
1227
|
execute: (e, t) => {
|
|
1425
|
-
const
|
|
1426
|
-
for (const
|
|
1427
|
-
const
|
|
1428
|
-
if (
|
|
1429
|
-
return
|
|
1228
|
+
const o = De.sort((s, r) => s.rank - r.rank);
|
|
1229
|
+
for (const s of o) {
|
|
1230
|
+
const r = s.factory(t);
|
|
1231
|
+
if (r)
|
|
1232
|
+
return r;
|
|
1430
1233
|
}
|
|
1431
1234
|
}
|
|
1432
1235
|
});
|
|
1433
|
-
const
|
|
1434
|
-
|
|
1435
|
-
|
|
1236
|
+
const Vr = (e) => {
|
|
1237
|
+
Oe[re].register(
|
|
1238
|
+
re,
|
|
1436
1239
|
e
|
|
1437
1240
|
);
|
|
1438
|
-
},
|
|
1439
|
-
|
|
1241
|
+
}, Hr = (e) => Oe[re].execute(
|
|
1242
|
+
re,
|
|
1440
1243
|
e
|
|
1441
1244
|
);
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
const
|
|
1445
|
-
const t = Math.floor(e /
|
|
1446
|
-
return { hours: t, minutes:
|
|
1447
|
-
},
|
|
1448
|
-
const
|
|
1449
|
-
let
|
|
1450
|
-
return n > 0 && (
|
|
1451
|
-
};
|
|
1452
|
-
var
|
|
1453
|
-
for (var
|
|
1454
|
-
(a = e[n]) && (
|
|
1455
|
-
return
|
|
1456
|
-
};
|
|
1457
|
-
const
|
|
1458
|
-
let
|
|
1459
|
-
constructor(e, t,
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
this.id = e, this.logger =
|
|
1245
|
+
Oe.registerDashboardKeyFactory = Vr;
|
|
1246
|
+
Oe.executeDashboardKeyFactory = Hr;
|
|
1247
|
+
const Ue = 3600, Ht = 60, si = (e) => {
|
|
1248
|
+
const t = Math.floor(e / Ue), o = Math.floor(e % Ue / Ht);
|
|
1249
|
+
return { hours: t, minutes: o };
|
|
1250
|
+
}, ii = (e, t) => e * Ue + t * Ht, Br = (e) => {
|
|
1251
|
+
const o = (/* @__PURE__ */ new Date()).valueOf() - e.valueOf(), s = Math.floor(o / (1e3 * 60)), r = Math.floor(s / 60), n = Math.floor(r / 24), a = s % 60, ae = r % 24;
|
|
1252
|
+
let le = "";
|
|
1253
|
+
return n > 0 && (le += `${n} day${n > 1 ? "s" : ""} `), ae > 0 && (le += `${ae} hour${ae > 1 ? "s" : ""} `), (a > 0 || n === 0 && ae === 0) && (le += `${a} minute${a > 1 ? "s" : ""} `), le;
|
|
1254
|
+
};
|
|
1255
|
+
var Kr = Object.defineProperty, Yr = Object.getOwnPropertyDescriptor, Le = (e, t, o, s) => {
|
|
1256
|
+
for (var r = s > 1 ? void 0 : s ? Yr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1257
|
+
(a = e[n]) && (r = (s ? a(t, o, r) : a(r)) || r);
|
|
1258
|
+
return s && r && Kr(t, o, r), r;
|
|
1259
|
+
};
|
|
1260
|
+
const K = "ingredient-summary-model";
|
|
1261
|
+
let C = class {
|
|
1262
|
+
constructor(e, t, o) {
|
|
1263
|
+
i(this, "id");
|
|
1264
|
+
i(this, "assemblyModel");
|
|
1265
|
+
i(this, "dashboardOperationModel");
|
|
1266
|
+
i(this, "appModel");
|
|
1267
|
+
i(this, "logger");
|
|
1268
|
+
this.id = e, this.logger = o.logger, this.dashboardOperationModel = Je.factory({});
|
|
1466
1269
|
}
|
|
1467
1270
|
get highPriorityHolders() {
|
|
1468
1271
|
return this.assemblyModel.allHolders.filter(
|
|
@@ -1470,16 +1273,16 @@ let x = class {
|
|
|
1470
1273
|
);
|
|
1471
1274
|
}
|
|
1472
1275
|
get actionRequiredHolders() {
|
|
1473
|
-
const e = this.appModel.currentRole, t =
|
|
1474
|
-
return this.assemblyModel.allHolders.filter((
|
|
1475
|
-
const
|
|
1476
|
-
|
|
1477
|
-
|
|
1276
|
+
const e = this.appModel.currentRole, t = Ct(e);
|
|
1277
|
+
return this.assemblyModel.allHolders.filter((o) => {
|
|
1278
|
+
const s = Be(
|
|
1279
|
+
o,
|
|
1280
|
+
Co.type
|
|
1478
1281
|
);
|
|
1479
|
-
if (
|
|
1282
|
+
if (s != null && s.isRemote)
|
|
1480
1283
|
return !1;
|
|
1481
|
-
const
|
|
1482
|
-
return
|
|
1284
|
+
const r = o.troubles.filter(t);
|
|
1285
|
+
return r.length > 0 && r.find((n) => n.resolvable);
|
|
1483
1286
|
});
|
|
1484
1287
|
}
|
|
1485
1288
|
get lowLevelHolders() {
|
|
@@ -1496,104 +1299,53 @@ let x = class {
|
|
|
1496
1299
|
this.logger.debug(`loading ingredient-summary ${this.id}`);
|
|
1497
1300
|
}
|
|
1498
1301
|
};
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
],
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
],
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
],
|
|
1508
|
-
|
|
1509
|
-
l(
|
|
1510
|
-
],
|
|
1511
|
-
const
|
|
1302
|
+
Le([
|
|
1303
|
+
p({ modelType: Se.type })
|
|
1304
|
+
], C.prototype, "assemblyModel", 2);
|
|
1305
|
+
Le([
|
|
1306
|
+
p({ modelType: Je.type })
|
|
1307
|
+
], C.prototype, "dashboardOperationModel", 2);
|
|
1308
|
+
Le([
|
|
1309
|
+
p({ modelType: Xe.type })
|
|
1310
|
+
], C.prototype, "appModel", 2);
|
|
1311
|
+
C = Le([
|
|
1312
|
+
l(K)
|
|
1313
|
+
], C);
|
|
1314
|
+
const Gr = {
|
|
1512
1315
|
registration: {
|
|
1513
|
-
[
|
|
1514
|
-
class:
|
|
1316
|
+
[K]: {
|
|
1317
|
+
class: C,
|
|
1515
1318
|
singleton: !1
|
|
1516
1319
|
}
|
|
1517
1320
|
},
|
|
1518
|
-
type:
|
|
1519
|
-
predicate: u(
|
|
1321
|
+
type: K,
|
|
1322
|
+
predicate: u(K),
|
|
1520
1323
|
factory: c.Factory.create(
|
|
1521
|
-
|
|
1324
|
+
K
|
|
1522
1325
|
)
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
(a = e[n]) && (o = a(o) || o);
|
|
1527
|
-
return o;
|
|
1528
|
-
};
|
|
1529
|
-
const cr = "lfcv-pump-model";
|
|
1530
|
-
let tt = class {
|
|
1531
|
-
constructor(e, t, r) {
|
|
1532
|
-
s(this, "id");
|
|
1533
|
-
s(this, "logger");
|
|
1534
|
-
s(this, "pumpModel");
|
|
1535
|
-
this.id = e, this.logger = r.logger, this.pumpModel = t.companionParent;
|
|
1536
|
-
}
|
|
1537
|
-
get name() {
|
|
1538
|
-
return this.pumpModel.name;
|
|
1539
|
-
}
|
|
1540
|
-
get canPour() {
|
|
1541
|
-
return this.pumpModel.canPour;
|
|
1542
|
-
}
|
|
1543
|
-
get isPouring() {
|
|
1544
|
-
return this.pumpModel.isPouring;
|
|
1545
|
-
}
|
|
1546
|
-
async cancelPour() {
|
|
1547
|
-
return this.pumpModel.cancelPour();
|
|
1548
|
-
}
|
|
1549
|
-
performIntent(e) {
|
|
1550
|
-
return this.pumpModel.performIntent(e);
|
|
1551
|
-
}
|
|
1552
|
-
// -------------------LIFECYCLE----------------------------
|
|
1553
|
-
async init() {
|
|
1554
|
-
this.logger.debug(`initializing lfcv-pump ${this.id}`);
|
|
1555
|
-
}
|
|
1556
|
-
async load() {
|
|
1557
|
-
this.logger.debug(`loading lfcv-pump ${this.id}`);
|
|
1558
|
-
}
|
|
1559
|
-
};
|
|
1560
|
-
tt = Mi([
|
|
1561
|
-
l(cr)
|
|
1562
|
-
], tt);
|
|
1563
|
-
const Ns = new ke({
|
|
1564
|
-
class: tt,
|
|
1565
|
-
type: cr
|
|
1566
|
-
}), { URL: Si } = h("LFCV-PUMP_SERVICE"), { getAll: Ci } = f.build({
|
|
1567
|
-
basePath: `${Si}/api/lfcv-pump`
|
|
1568
|
-
}), wi = g.createLogger({
|
|
1569
|
-
name: "lfcv-pump-service",
|
|
1570
|
-
group: "Services"
|
|
1571
|
-
}), Ei = async () => (wi.debug("sending GET for lfcv-pump"), await Ci({})), zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1572
|
-
__proto__: null,
|
|
1573
|
-
getLfcvPumps: Ei
|
|
1574
|
-
}, Symbol.toStringTag, { value: "Module" })), { URL: gt } = h("LOCKOUT_SERVICE"), { postModel: ur } = f.build({
|
|
1575
|
-
basePath: `${gt}/api/app/kosdev.ddk/lockout`
|
|
1576
|
-
}), dr = g.createLogger({ name: "lockout-service", group: "Services" }), Li = async () => (dr.info("lock"), await ur({
|
|
1326
|
+
}, { URL: Ze } = h("LOCKOUT_SERVICE"), { postModel: Bt } = y.build({
|
|
1327
|
+
basePath: `${Ze}/api/app/kosdev.ddk/lockout`
|
|
1328
|
+
}), Kt = g.createLogger({ name: "lockout-service", group: "Services" }), qr = async () => (Kt.info("lock"), await Bt({
|
|
1577
1329
|
model: {},
|
|
1578
|
-
urlOverride: `${
|
|
1579
|
-
})),
|
|
1580
|
-
|
|
1581
|
-
const t = await
|
|
1330
|
+
urlOverride: `${Ze}/api/app/kosdev.ddk/lockout/lockNow`
|
|
1331
|
+
})), Yt = async (e) => {
|
|
1332
|
+
Kt.info("unlock");
|
|
1333
|
+
const t = await Bt({
|
|
1582
1334
|
model: {},
|
|
1583
|
-
urlOverride: `${
|
|
1335
|
+
urlOverride: `${Ze}/api/app/kosdev.ddk/lockout/unlock/${e}`
|
|
1584
1336
|
});
|
|
1585
1337
|
return t == null ? void 0 : t.data;
|
|
1586
|
-
},
|
|
1338
|
+
}, ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1587
1339
|
__proto__: null,
|
|
1588
|
-
lock:
|
|
1589
|
-
unlock:
|
|
1340
|
+
lock: qr,
|
|
1341
|
+
unlock: Yt
|
|
1590
1342
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1591
|
-
var
|
|
1592
|
-
for (var
|
|
1593
|
-
(a = e[n]) && (
|
|
1594
|
-
return
|
|
1343
|
+
var Qr = Object.defineProperty, Xr = Object.getOwnPropertyDescriptor, A = (e, t, o, s) => {
|
|
1344
|
+
for (var r = s > 1 ? void 0 : s ? Xr(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1345
|
+
(a = e[n]) && (r = (s ? a(t, o, r) : a(r)) || r);
|
|
1346
|
+
return s && r && Qr(t, o, r), r;
|
|
1595
1347
|
};
|
|
1596
|
-
const
|
|
1348
|
+
const Gt = "lockout-model", Jr = [
|
|
1597
1349
|
{ day: "monday", lock: "dayWiseLockConfigMap.Mon.enabled", open: "dayWiseLockConfigMap.Mon.unlockTime", close: "dayWiseLockConfigMap.Mon.lockTime" },
|
|
1598
1350
|
{ day: "tuesday", lock: "dayWiseLockConfigMap.Tue.enabled", open: "dayWiseLockConfigMap.Tue.unlockTime", close: "dayWiseLockConfigMap.Tue.lockTime" },
|
|
1599
1351
|
{ day: "wednesday", lock: "dayWiseLockConfigMap.Wed.enabled", open: "dayWiseLockConfigMap.Wed.unlockTime", close: "dayWiseLockConfigMap.Wed.lockTime" },
|
|
@@ -1602,11 +1354,11 @@ const gr = "lockout-model", Ii = [
|
|
|
1602
1354
|
{ day: "saturday", lock: "dayWiseLockConfigMap.Sat.enabled", open: "dayWiseLockConfigMap.Sat.unlockTime", close: "dayWiseLockConfigMap.Sat.lockTime" },
|
|
1603
1355
|
{ day: "sunday", lock: "dayWiseLockConfigMap.Sun.enabled", open: "dayWiseLockConfigMap.Sun.unlockTime", close: "dayWiseLockConfigMap.Sun.lockTime" }
|
|
1604
1356
|
];
|
|
1605
|
-
let
|
|
1606
|
-
constructor(e, t,
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1357
|
+
let M = class {
|
|
1358
|
+
constructor(e, t, o) {
|
|
1359
|
+
i(this, "id");
|
|
1360
|
+
i(this, "logger");
|
|
1361
|
+
i(this, "dayEnabledList", [
|
|
1610
1362
|
"dayWiseLockConfigMap.Sun.enabled",
|
|
1611
1363
|
"dayWiseLockConfigMap.Mon.enabled",
|
|
1612
1364
|
"dayWiseLockConfigMap.Tue.enabled",
|
|
@@ -1615,7 +1367,7 @@ let E = class {
|
|
|
1615
1367
|
"dayWiseLockConfigMap.Fri.enabled",
|
|
1616
1368
|
"dayWiseLockConfigMap.Sat.enabled"
|
|
1617
1369
|
]);
|
|
1618
|
-
|
|
1370
|
+
i(this, "dayOpenAtList", [
|
|
1619
1371
|
"dayWiseLockConfigMap.Sun.unlockTime",
|
|
1620
1372
|
"dayWiseLockConfigMap.Mon.unlockTime",
|
|
1621
1373
|
"dayWiseLockConfigMap.Tue.unlockTime",
|
|
@@ -1624,7 +1376,7 @@ let E = class {
|
|
|
1624
1376
|
"dayWiseLockConfigMap.Fri.unlockTime",
|
|
1625
1377
|
"dayWiseLockConfigMap.Sat.unlockTime"
|
|
1626
1378
|
]);
|
|
1627
|
-
|
|
1379
|
+
i(this, "dayCloseAtList", [
|
|
1628
1380
|
"dayWiseLockConfigMap.Sun.lockTime",
|
|
1629
1381
|
"dayWiseLockConfigMap.Mon.lockTime",
|
|
1630
1382
|
"dayWiseLockConfigMap.Tue.lockTime",
|
|
@@ -1633,22 +1385,22 @@ let E = class {
|
|
|
1633
1385
|
"dayWiseLockConfigMap.Fri.lockTime",
|
|
1634
1386
|
"dayWiseLockConfigMap.Sat.lockTime"
|
|
1635
1387
|
]);
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
this.id = e, this.logger =
|
|
1388
|
+
i(this, "saveMap");
|
|
1389
|
+
i(this, "pin");
|
|
1390
|
+
i(this, "nextLockSkipped");
|
|
1391
|
+
i(this, "nextLockTime");
|
|
1392
|
+
i(this, "nextUnLockTime");
|
|
1393
|
+
i(this, "cuiLockout");
|
|
1394
|
+
this.id = e, this.logger = o.logger, this.saveMap = /* @__PURE__ */ new Map();
|
|
1643
1395
|
}
|
|
1644
1396
|
get enabled() {
|
|
1645
1397
|
const e = this.getProp(
|
|
1646
1398
|
"oneTimeLockConfig.lockTime"
|
|
1647
|
-
), t = e !== void 0 && e !== "",
|
|
1648
|
-
return t ||
|
|
1399
|
+
), t = e !== void 0 && e !== "", o = this.getProp("lockScheduleEnabled");
|
|
1400
|
+
return t || o;
|
|
1649
1401
|
}
|
|
1650
1402
|
get schedule() {
|
|
1651
|
-
return
|
|
1403
|
+
return Jr;
|
|
1652
1404
|
}
|
|
1653
1405
|
getProp(e) {
|
|
1654
1406
|
return this.saveMap.get(e);
|
|
@@ -1665,7 +1417,7 @@ let E = class {
|
|
|
1665
1417
|
this.nextLockSkipped.updateProperty("0");
|
|
1666
1418
|
}
|
|
1667
1419
|
async unlock(e) {
|
|
1668
|
-
return await
|
|
1420
|
+
return await Yt(e);
|
|
1669
1421
|
}
|
|
1670
1422
|
async save() {
|
|
1671
1423
|
return this.saveMap.forEach((e, t) => {
|
|
@@ -1687,61 +1439,61 @@ let E = class {
|
|
|
1687
1439
|
this.logger.debug(`loading lockout ${this.id}`);
|
|
1688
1440
|
}
|
|
1689
1441
|
};
|
|
1690
|
-
|
|
1442
|
+
A([
|
|
1691
1443
|
d({
|
|
1692
1444
|
path: "app:kosdev.ddk:service:cuiLockout",
|
|
1693
1445
|
attribute: "pin"
|
|
1694
1446
|
})
|
|
1695
|
-
],
|
|
1696
|
-
|
|
1447
|
+
], M.prototype, "pin", 2);
|
|
1448
|
+
A([
|
|
1697
1449
|
d({
|
|
1698
1450
|
path: "app:kosdev.ddk:service:cuiLockout",
|
|
1699
1451
|
attribute: "nextLockSkipped"
|
|
1700
1452
|
})
|
|
1701
|
-
],
|
|
1702
|
-
|
|
1453
|
+
], M.prototype, "nextLockSkipped", 2);
|
|
1454
|
+
A([
|
|
1703
1455
|
d({
|
|
1704
1456
|
path: "app:kosdev.ddk:service:cuiLockout",
|
|
1705
1457
|
attribute: "nextLockTime"
|
|
1706
1458
|
})
|
|
1707
|
-
],
|
|
1708
|
-
|
|
1459
|
+
], M.prototype, "nextLockTime", 2);
|
|
1460
|
+
A([
|
|
1709
1461
|
d({
|
|
1710
1462
|
path: "app:kosdev.ddk:service:cuiLockout",
|
|
1711
1463
|
attribute: "nextUnLockTime"
|
|
1712
1464
|
})
|
|
1713
|
-
],
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
],
|
|
1717
|
-
|
|
1718
|
-
l(
|
|
1719
|
-
],
|
|
1720
|
-
const
|
|
1721
|
-
class:
|
|
1722
|
-
type:
|
|
1723
|
-
}),
|
|
1465
|
+
], M.prototype, "nextUnLockTime", 2);
|
|
1466
|
+
A([
|
|
1467
|
+
So({ path: "app:kosdev.ddk:service:cuiLockout" })
|
|
1468
|
+
], M.prototype, "cuiLockout", 2);
|
|
1469
|
+
M = A([
|
|
1470
|
+
l(Gt)
|
|
1471
|
+
], M);
|
|
1472
|
+
const ai = new Pe({
|
|
1473
|
+
class: M,
|
|
1474
|
+
type: Gt
|
|
1475
|
+
}), Zr = async (e, t) => await Me.bulkResolveTroubles(
|
|
1724
1476
|
e,
|
|
1725
1477
|
void 0,
|
|
1726
1478
|
t
|
|
1727
1479
|
);
|
|
1728
|
-
var
|
|
1729
|
-
for (var
|
|
1730
|
-
(a = e[n]) && (
|
|
1731
|
-
return
|
|
1732
|
-
};
|
|
1733
|
-
const
|
|
1734
|
-
let
|
|
1735
|
-
constructor(e, t,
|
|
1736
|
-
|
|
1737
|
-
|
|
1480
|
+
var es = Object.defineProperty, ts = Object.getOwnPropertyDescriptor, Ce = (e, t, o, s) => {
|
|
1481
|
+
for (var r = s > 1 ? void 0 : s ? ts(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1482
|
+
(a = e[n]) && (r = (s ? a(t, o, r) : a(r)) || r);
|
|
1483
|
+
return s && r && es(t, o, r), r;
|
|
1484
|
+
};
|
|
1485
|
+
const Y = "macro-assignment-model", ct = "PurgeTrouble", os = "PrimeTrouble";
|
|
1486
|
+
let k = class {
|
|
1487
|
+
constructor(e, t, o) {
|
|
1488
|
+
i(this, "id");
|
|
1489
|
+
i(this, "logger");
|
|
1738
1490
|
/**
|
|
1739
1491
|
* futureHandler is used to handle async operations
|
|
1740
1492
|
*/
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
this.id = e, this.futureHandler = new
|
|
1493
|
+
i(this, "futureHandler");
|
|
1494
|
+
i(this, "holders");
|
|
1495
|
+
i(this, "ingredients");
|
|
1496
|
+
this.id = e, this.futureHandler = new Ye(), this.logger = o.logger;
|
|
1745
1497
|
}
|
|
1746
1498
|
/**
|
|
1747
1499
|
* shortcut to the current running future
|
|
@@ -1770,15 +1522,15 @@ let j = class {
|
|
|
1770
1522
|
* Relying on the indexing of troubles by type to find the purge troubles.
|
|
1771
1523
|
*/
|
|
1772
1524
|
get holderPurgeTroubles() {
|
|
1773
|
-
return this.macroHolders.reduce((t,
|
|
1774
|
-
const
|
|
1775
|
-
return t = [...t, ...
|
|
1525
|
+
return this.macroHolders.reduce((t, o) => {
|
|
1526
|
+
const s = o.troublesByType[ct] || [];
|
|
1527
|
+
return t = [...t, ...s], t;
|
|
1776
1528
|
}, []);
|
|
1777
1529
|
}
|
|
1778
1530
|
get holderPrimeTroubles() {
|
|
1779
|
-
return this.macroHolders.reduce((t,
|
|
1780
|
-
const
|
|
1781
|
-
return t = [...t, ...
|
|
1531
|
+
return this.macroHolders.reduce((t, o) => {
|
|
1532
|
+
const s = o.troublesByType[os] || [];
|
|
1533
|
+
return t = [...t, ...s], t;
|
|
1782
1534
|
}, []);
|
|
1783
1535
|
}
|
|
1784
1536
|
/**
|
|
@@ -1813,53 +1565,53 @@ let j = class {
|
|
|
1813
1565
|
async resolveAll(e, t) {
|
|
1814
1566
|
if (!t)
|
|
1815
1567
|
throw new Error("No tracker provided");
|
|
1816
|
-
const
|
|
1817
|
-
return await
|
|
1818
|
-
}
|
|
1819
|
-
};
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
],
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
],
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
],
|
|
1829
|
-
|
|
1830
|
-
l(
|
|
1831
|
-
],
|
|
1832
|
-
const
|
|
1568
|
+
const s = (e === ct ? this.holderPurgeTroubles : this.holderPrimeTroubles).map((n) => n.rawId);
|
|
1569
|
+
return await Zr(s, t);
|
|
1570
|
+
}
|
|
1571
|
+
};
|
|
1572
|
+
Ce([
|
|
1573
|
+
p({ modelType: ko.type })
|
|
1574
|
+
], k.prototype, "holders", 2);
|
|
1575
|
+
Ce([
|
|
1576
|
+
p({ modelType: Do.type })
|
|
1577
|
+
], k.prototype, "ingredients", 2);
|
|
1578
|
+
Ce([
|
|
1579
|
+
P()
|
|
1580
|
+
], k.prototype, "resolveAll", 1);
|
|
1581
|
+
k = Ce([
|
|
1582
|
+
l(Y)
|
|
1583
|
+
], k);
|
|
1584
|
+
const rs = {
|
|
1833
1585
|
registration: {
|
|
1834
|
-
[
|
|
1835
|
-
class:
|
|
1586
|
+
[Y]: {
|
|
1587
|
+
class: k,
|
|
1836
1588
|
singleton: !0
|
|
1837
1589
|
}
|
|
1838
1590
|
},
|
|
1839
|
-
type:
|
|
1840
|
-
predicate: u(
|
|
1591
|
+
type: Y,
|
|
1592
|
+
predicate: u(Y),
|
|
1841
1593
|
factory: c.Singleton.create(
|
|
1842
|
-
|
|
1594
|
+
Y
|
|
1843
1595
|
)
|
|
1844
1596
|
};
|
|
1845
|
-
var
|
|
1846
|
-
for (var
|
|
1847
|
-
(a = e[n]) && (
|
|
1848
|
-
return
|
|
1597
|
+
var ss = Object.getOwnPropertyDescriptor, is = (e, t, o, s) => {
|
|
1598
|
+
for (var r = s > 1 ? void 0 : s ? ss(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1599
|
+
(a = e[n]) && (r = a(r) || r);
|
|
1600
|
+
return r;
|
|
1849
1601
|
};
|
|
1850
|
-
const
|
|
1851
|
-
let
|
|
1852
|
-
constructor(e, t,
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
this.id = e, this.logger =
|
|
1602
|
+
const G = "network-test-model";
|
|
1603
|
+
let We = class {
|
|
1604
|
+
constructor(e, t, o) {
|
|
1605
|
+
i(this, "id");
|
|
1606
|
+
i(this, "group");
|
|
1607
|
+
i(this, "passed");
|
|
1608
|
+
i(this, "inProgress");
|
|
1609
|
+
i(this, "failureTime");
|
|
1610
|
+
i(this, "timestamp");
|
|
1611
|
+
i(this, "name");
|
|
1612
|
+
i(this, "results");
|
|
1613
|
+
i(this, "logger");
|
|
1614
|
+
this.id = e, this.logger = o.logger, this.group = t.group, this.passed = !1, this.inProgress = !1, this.name = t.name, this.results = [];
|
|
1863
1615
|
}
|
|
1864
1616
|
updateModel(e) {
|
|
1865
1617
|
this.group = e.group, this.name = e.name, this.passed = e.passed, this.failureTime = e.failureTime, this.inProgress = e.inProgress, this.timestamp = e.timestamp, this.results = e.results;
|
|
@@ -1872,58 +1624,58 @@ let rt = class {
|
|
|
1872
1624
|
this.logger.debug(`loading network-test ${this.id}`);
|
|
1873
1625
|
}
|
|
1874
1626
|
};
|
|
1875
|
-
|
|
1876
|
-
l(
|
|
1877
|
-
],
|
|
1878
|
-
const
|
|
1627
|
+
We = is([
|
|
1628
|
+
l(G)
|
|
1629
|
+
], We);
|
|
1630
|
+
const qt = {
|
|
1879
1631
|
registration: {
|
|
1880
|
-
[
|
|
1881
|
-
class:
|
|
1632
|
+
[G]: {
|
|
1633
|
+
class: We,
|
|
1882
1634
|
singleton: !1
|
|
1883
1635
|
}
|
|
1884
1636
|
},
|
|
1885
|
-
type:
|
|
1886
|
-
predicate: u(
|
|
1887
|
-
factory: c.Factory.create(
|
|
1888
|
-
}, { URL:
|
|
1889
|
-
basePath: `${
|
|
1890
|
-
}),
|
|
1637
|
+
type: G,
|
|
1638
|
+
predicate: u(G),
|
|
1639
|
+
factory: c.Factory.create(G)
|
|
1640
|
+
}, { URL: ke } = h("NETWORK-TEST_SERVICE"), { getAll: ns, getOne: Qt } = y.build({
|
|
1641
|
+
basePath: `${ke}/api/app/ncui/network/tests`
|
|
1642
|
+
}), as = g.createLogger({
|
|
1891
1643
|
name: "network-test-service",
|
|
1892
1644
|
group: "Services"
|
|
1893
|
-
}),
|
|
1894
|
-
|
|
1895
|
-
const e = await
|
|
1896
|
-
urlOverride: `${
|
|
1645
|
+
}), Xt = async () => {
|
|
1646
|
+
as.debug("sending GET for network-test");
|
|
1647
|
+
const e = await ns({
|
|
1648
|
+
urlOverride: `${ke}/api/app/kosdev.ddk/network/tests`
|
|
1897
1649
|
});
|
|
1898
1650
|
return e == null ? void 0 : e.data;
|
|
1899
|
-
},
|
|
1900
|
-
const e = await
|
|
1901
|
-
urlOverride: `${
|
|
1651
|
+
}, Jt = async () => {
|
|
1652
|
+
const e = await Qt({
|
|
1653
|
+
urlOverride: `${ke}/api/app/kosdev.ddk/network/reports`
|
|
1902
1654
|
});
|
|
1903
1655
|
return e == null ? void 0 : e.data;
|
|
1904
|
-
},
|
|
1905
|
-
urlOverride: `${
|
|
1656
|
+
}, Zt = async (e, t) => await Qt({
|
|
1657
|
+
urlOverride: `${ke}/api/app/kosdev.ddk/network/tests/run/group/${e}`,
|
|
1906
1658
|
tracker: t
|
|
1907
|
-
}),
|
|
1659
|
+
}), li = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1908
1660
|
__proto__: null,
|
|
1909
|
-
getNetworkTests:
|
|
1910
|
-
getTestsReports:
|
|
1911
|
-
performGroupTest:
|
|
1661
|
+
getNetworkTests: Xt,
|
|
1662
|
+
getTestsReports: Jt,
|
|
1663
|
+
performGroupTest: Zt
|
|
1912
1664
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1913
|
-
var
|
|
1914
|
-
for (var
|
|
1915
|
-
(a = e[n]) && (
|
|
1916
|
-
return
|
|
1917
|
-
};
|
|
1918
|
-
const
|
|
1919
|
-
let
|
|
1920
|
-
constructor(e, t,
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
this.id = e, this.logger =
|
|
1665
|
+
var ls = Object.defineProperty, ds = Object.getOwnPropertyDescriptor, et = (e, t, o, s) => {
|
|
1666
|
+
for (var r = s > 1 ? void 0 : s ? ds(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1667
|
+
(a = e[n]) && (r = (s ? a(t, o, r) : a(r)) || r);
|
|
1668
|
+
return s && r && ls(t, o, r), r;
|
|
1669
|
+
};
|
|
1670
|
+
const q = "network-test-container-model";
|
|
1671
|
+
let se = class {
|
|
1672
|
+
constructor(e, t, o) {
|
|
1673
|
+
i(this, "id");
|
|
1674
|
+
i(this, "logger");
|
|
1675
|
+
i(this, "lastTested");
|
|
1676
|
+
i(this, "futureHandler");
|
|
1677
|
+
i(this, "models");
|
|
1678
|
+
this.id = e, this.logger = o.logger, this.futureHandler = new Ye(this), this.models = new Ve({
|
|
1927
1679
|
parentId: e,
|
|
1928
1680
|
indexMap: {
|
|
1929
1681
|
group: "group"
|
|
@@ -1949,28 +1701,28 @@ let ge = class {
|
|
|
1949
1701
|
);
|
|
1950
1702
|
}
|
|
1951
1703
|
getLastTested(e) {
|
|
1952
|
-
const t = this.models.getIndexByKey("group", e).map((
|
|
1953
|
-
...t.map((
|
|
1704
|
+
const t = this.models.getIndexByKey("group", e).map((s) => s.timestamp && new Date(s.timestamp)), o = Math.max(
|
|
1705
|
+
...t.map((s) => s ? s.getTime() : 0)
|
|
1954
1706
|
);
|
|
1955
|
-
return
|
|
1707
|
+
return o ? Br(new Date(o)) : "";
|
|
1956
1708
|
}
|
|
1957
1709
|
async load() {
|
|
1958
1710
|
this.logger.debug(`loading network-test-container container ${this.id}`);
|
|
1959
|
-
const e = await
|
|
1960
|
-
e && e.forEach((
|
|
1961
|
-
const
|
|
1962
|
-
this.addModel(
|
|
1963
|
-
}), e && t && e.forEach((
|
|
1964
|
-
const
|
|
1965
|
-
if (n &&
|
|
1711
|
+
const e = await Xt(), t = await Jt();
|
|
1712
|
+
e && e.forEach((o) => {
|
|
1713
|
+
const s = qt.factory(o.id)(o);
|
|
1714
|
+
this.addModel(s);
|
|
1715
|
+
}), e && t && e.forEach((o) => {
|
|
1716
|
+
const s = t == null ? void 0 : t[o.group], r = s == null ? void 0 : s[o.id], n = this.getModel(o.id);
|
|
1717
|
+
if (n && r) {
|
|
1966
1718
|
const a = {
|
|
1967
|
-
group:
|
|
1968
|
-
name:
|
|
1969
|
-
passed:
|
|
1970
|
-
failureTime:
|
|
1971
|
-
inProgress:
|
|
1972
|
-
timestamp: new Date(
|
|
1973
|
-
results:
|
|
1719
|
+
group: r.group,
|
|
1720
|
+
name: r.name,
|
|
1721
|
+
passed: r.passed,
|
|
1722
|
+
failureTime: r.failureTime ? new Date(r.failureTime) : void 0,
|
|
1723
|
+
inProgress: r.inProgress,
|
|
1724
|
+
timestamp: new Date(r.timestamp),
|
|
1725
|
+
results: r.results
|
|
1974
1726
|
};
|
|
1975
1727
|
n.updateModel(a);
|
|
1976
1728
|
}
|
|
@@ -1979,117 +1731,125 @@ let ge = class {
|
|
|
1979
1731
|
async performTest(e, t) {
|
|
1980
1732
|
if (!t)
|
|
1981
1733
|
throw new Error("No tracker provided");
|
|
1982
|
-
const
|
|
1983
|
-
return
|
|
1734
|
+
const o = await Zt(e, t);
|
|
1735
|
+
return o == null ? void 0 : o.data;
|
|
1984
1736
|
}
|
|
1985
1737
|
onFutureUpdate(e) {
|
|
1986
1738
|
const { clientData: t } = e;
|
|
1987
|
-
t && t.forEach((
|
|
1988
|
-
const
|
|
1989
|
-
if (
|
|
1990
|
-
this.lastTested = this.lastTested > new Date(
|
|
1991
|
-
}),
|
|
1992
|
-
const
|
|
1993
|
-
group:
|
|
1994
|
-
name:
|
|
1995
|
-
passed:
|
|
1996
|
-
failureTime:
|
|
1997
|
-
inProgress:
|
|
1998
|
-
timestamp: new Date(
|
|
1999
|
-
results:
|
|
1739
|
+
t && t.forEach((o) => {
|
|
1740
|
+
const s = this.getModel(o.id);
|
|
1741
|
+
if (v(() => {
|
|
1742
|
+
this.lastTested = this.lastTested > new Date(o.timestamp) ? this.lastTested : new Date(o.timestamp);
|
|
1743
|
+
}), s) {
|
|
1744
|
+
const r = {
|
|
1745
|
+
group: o.group,
|
|
1746
|
+
name: o.name,
|
|
1747
|
+
passed: o.passed,
|
|
1748
|
+
failureTime: o.failureTime ? new Date(o.failureTime) : void 0,
|
|
1749
|
+
inProgress: o.inProgress,
|
|
1750
|
+
timestamp: new Date(o.timestamp),
|
|
1751
|
+
results: o.results
|
|
2000
1752
|
};
|
|
2001
|
-
|
|
2002
|
-
|
|
1753
|
+
v(() => {
|
|
1754
|
+
s.updateModel(r);
|
|
2003
1755
|
});
|
|
2004
1756
|
}
|
|
2005
1757
|
});
|
|
2006
1758
|
}
|
|
2007
1759
|
};
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
],
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
],
|
|
2014
|
-
|
|
2015
|
-
l(
|
|
2016
|
-
],
|
|
2017
|
-
const
|
|
1760
|
+
et([
|
|
1761
|
+
$e
|
|
1762
|
+
], se.prototype, "models", 2);
|
|
1763
|
+
et([
|
|
1764
|
+
P()
|
|
1765
|
+
], se.prototype, "performTest", 1);
|
|
1766
|
+
se = et([
|
|
1767
|
+
l(q)
|
|
1768
|
+
], se);
|
|
1769
|
+
const cs = {
|
|
2018
1770
|
registration: {
|
|
2019
|
-
[
|
|
2020
|
-
class:
|
|
1771
|
+
[q]: {
|
|
1772
|
+
class: se,
|
|
2021
1773
|
singleton: !0
|
|
2022
1774
|
},
|
|
2023
|
-
...
|
|
1775
|
+
...qt.registration
|
|
2024
1776
|
},
|
|
2025
|
-
type:
|
|
2026
|
-
predicate: u(
|
|
2027
|
-
factory: c.Singleton.create(
|
|
2028
|
-
};
|
|
2029
|
-
var
|
|
2030
|
-
for (var
|
|
2031
|
-
(a = e[n]) && (
|
|
2032
|
-
return
|
|
2033
|
-
};
|
|
2034
|
-
const
|
|
2035
|
-
let
|
|
2036
|
-
constructor(e, t
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
this.id = e
|
|
1777
|
+
type: q,
|
|
1778
|
+
predicate: u(q),
|
|
1779
|
+
factory: c.Singleton.create(q)
|
|
1780
|
+
};
|
|
1781
|
+
var us = Object.defineProperty, ps = Object.getOwnPropertyDescriptor, tt = (e, t, o, s) => {
|
|
1782
|
+
for (var r = s > 1 ? void 0 : s ? ps(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1783
|
+
(a = e[n]) && (r = (s ? a(t, o, r) : a(r)) || r);
|
|
1784
|
+
return s && r && us(t, o, r), r;
|
|
1785
|
+
};
|
|
1786
|
+
const Q = "nutritive-sweetener-model", gs = ut("statePath");
|
|
1787
|
+
let ie = class {
|
|
1788
|
+
constructor(e, t) {
|
|
1789
|
+
i(this, "id");
|
|
1790
|
+
i(this, "assemblyModel");
|
|
1791
|
+
i(this, "pumpState");
|
|
1792
|
+
this.id = e;
|
|
1793
|
+
}
|
|
1794
|
+
get holder() {
|
|
1795
|
+
return this.assemblyModel.getHoldersByGroup("ns")[0];
|
|
2041
1796
|
}
|
|
2042
1797
|
getHolder() {
|
|
2043
|
-
return this.
|
|
1798
|
+
return this.holder;
|
|
2044
1799
|
}
|
|
2045
|
-
|
|
2046
|
-
return this.
|
|
1800
|
+
get statePath() {
|
|
1801
|
+
return `${this.pump.path}:airVent:state`;
|
|
2047
1802
|
}
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
this.logger.debug(`initializing nutritive-sweetener ${this.id}`);
|
|
1803
|
+
get pump() {
|
|
1804
|
+
return this.holder.pumps.data[0];
|
|
2051
1805
|
}
|
|
2052
|
-
|
|
2053
|
-
|
|
1806
|
+
getPump() {
|
|
1807
|
+
return this.pump;
|
|
2054
1808
|
}
|
|
2055
1809
|
};
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
],
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
1810
|
+
tt([
|
|
1811
|
+
p({ modelType: Se.type })
|
|
1812
|
+
], ie.prototype, "assemblyModel", 2);
|
|
1813
|
+
tt([
|
|
1814
|
+
wo({
|
|
1815
|
+
path: gs
|
|
1816
|
+
})
|
|
1817
|
+
], ie.prototype, "pumpState", 2);
|
|
1818
|
+
ie = tt([
|
|
1819
|
+
l(Q),
|
|
1820
|
+
gt()
|
|
1821
|
+
], ie);
|
|
1822
|
+
const hs = {
|
|
2063
1823
|
registration: {
|
|
2064
|
-
[
|
|
2065
|
-
class:
|
|
1824
|
+
[Q]: {
|
|
1825
|
+
class: ie,
|
|
2066
1826
|
singleton: !1
|
|
2067
1827
|
}
|
|
2068
1828
|
},
|
|
2069
|
-
type:
|
|
2070
|
-
predicate: u(
|
|
2071
|
-
factory: c.Factory.create(
|
|
1829
|
+
type: Q,
|
|
1830
|
+
predicate: u(Q),
|
|
1831
|
+
factory: c.Factory.create(Q)
|
|
2072
1832
|
};
|
|
2073
|
-
var
|
|
2074
|
-
for (var
|
|
2075
|
-
(a = e[n]) && (
|
|
2076
|
-
return
|
|
1833
|
+
var ys = Object.defineProperty, fs = Object.getOwnPropertyDescriptor, eo = (e, t, o, s) => {
|
|
1834
|
+
for (var r = s > 1 ? void 0 : s ? fs(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1835
|
+
(a = e[n]) && (r = (s ? a(t, o, r) : a(r)) || r);
|
|
1836
|
+
return s && r && ys(t, o, r), r;
|
|
2077
1837
|
};
|
|
2078
|
-
const
|
|
2079
|
-
let
|
|
2080
|
-
constructor(e, t,
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
this.id = e, this.logger =
|
|
1838
|
+
const X = "plain-water-model";
|
|
1839
|
+
let ve = class {
|
|
1840
|
+
constructor(e, t, o) {
|
|
1841
|
+
i(this, "id");
|
|
1842
|
+
i(this, "assemblyModel");
|
|
1843
|
+
i(this, "logger");
|
|
1844
|
+
this.id = e, this.logger = o.logger;
|
|
2085
1845
|
}
|
|
2086
1846
|
getHolder() {
|
|
2087
1847
|
return this.assemblyModel.getHoldersByGroup("water")[0];
|
|
2088
1848
|
}
|
|
2089
1849
|
getPump() {
|
|
2090
|
-
var
|
|
2091
|
-
const e = this.getHolder(), t = (
|
|
2092
|
-
return
|
|
1850
|
+
var s, r;
|
|
1851
|
+
const e = this.getHolder(), t = (r = (s = e == null ? void 0 : e.pumps) == null ? void 0 : s.data) == null ? void 0 : r[0];
|
|
1852
|
+
return Be(t, ft.type);
|
|
2093
1853
|
}
|
|
2094
1854
|
// -------------------LIFECYCLE----------------------------
|
|
2095
1855
|
async init() {
|
|
@@ -2099,45 +1859,45 @@ let Ce = class {
|
|
|
2099
1859
|
this.logger.debug(`loading plain-water ${this.id}`);
|
|
2100
1860
|
}
|
|
2101
1861
|
};
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
],
|
|
2105
|
-
|
|
2106
|
-
l(
|
|
2107
|
-
],
|
|
2108
|
-
const
|
|
1862
|
+
eo([
|
|
1863
|
+
p({ modelType: Se.type })
|
|
1864
|
+
], ve.prototype, "assemblyModel", 2);
|
|
1865
|
+
ve = eo([
|
|
1866
|
+
l(X)
|
|
1867
|
+
], ve);
|
|
1868
|
+
const vs = {
|
|
2109
1869
|
registration: {
|
|
2110
|
-
[
|
|
2111
|
-
class:
|
|
1870
|
+
[X]: {
|
|
1871
|
+
class: ve,
|
|
2112
1872
|
singleton: !1
|
|
2113
1873
|
}
|
|
2114
1874
|
},
|
|
2115
|
-
type:
|
|
2116
|
-
predicate: u(
|
|
2117
|
-
factory: c.Factory.create(
|
|
2118
|
-
}, { URL:
|
|
2119
|
-
basePath: `${
|
|
2120
|
-
}),
|
|
2121
|
-
urlOverride: `${
|
|
1875
|
+
type: X,
|
|
1876
|
+
predicate: u(X),
|
|
1877
|
+
factory: c.Factory.create(X)
|
|
1878
|
+
}, { URL: to } = h("REBOOT_SERVICE"), { postModel: ms } = y.build({
|
|
1879
|
+
basePath: `${to}/api/reboot`
|
|
1880
|
+
}), bs = g.createLogger({ name: "reboot-service", group: "Services" }), oo = async () => (bs.debug("sending POST call for Reboot Dispenser"), await ms({
|
|
1881
|
+
urlOverride: `${to}/api/app/kosdev.ddk/ncui/reboot`,
|
|
2122
1882
|
model: {}
|
|
2123
|
-
})),
|
|
1883
|
+
})), di = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2124
1884
|
__proto__: null,
|
|
2125
|
-
rebootDispenser:
|
|
1885
|
+
rebootDispenser: oo
|
|
2126
1886
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2127
|
-
var
|
|
2128
|
-
for (var
|
|
2129
|
-
(a = e[n]) && (
|
|
2130
|
-
return
|
|
1887
|
+
var _s = Object.getOwnPropertyDescriptor, Ts = (e, t, o, s) => {
|
|
1888
|
+
for (var r = s > 1 ? void 0 : s ? _s(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1889
|
+
(a = e[n]) && (r = a(r) || r);
|
|
1890
|
+
return r;
|
|
2131
1891
|
};
|
|
2132
|
-
const
|
|
2133
|
-
let
|
|
2134
|
-
constructor(e, t,
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
this.id = e, this.logger =
|
|
1892
|
+
const J = "reboot-model";
|
|
1893
|
+
let Ne = class {
|
|
1894
|
+
constructor(e, t, o) {
|
|
1895
|
+
i(this, "id");
|
|
1896
|
+
i(this, "logger");
|
|
1897
|
+
this.id = e, this.logger = o.logger;
|
|
2138
1898
|
}
|
|
2139
1899
|
async completeReboot() {
|
|
2140
|
-
await
|
|
1900
|
+
await oo();
|
|
2141
1901
|
}
|
|
2142
1902
|
updateModel() {
|
|
2143
1903
|
}
|
|
@@ -2149,46 +1909,45 @@ let ot = class {
|
|
|
2149
1909
|
this.logger.debug(`loading reboot ${this.id}`);
|
|
2150
1910
|
}
|
|
2151
1911
|
};
|
|
2152
|
-
|
|
2153
|
-
l(
|
|
2154
|
-
],
|
|
2155
|
-
const
|
|
1912
|
+
Ne = Ts([
|
|
1913
|
+
l(J)
|
|
1914
|
+
], Ne);
|
|
1915
|
+
const $s = {
|
|
2156
1916
|
registration: {
|
|
2157
|
-
[
|
|
2158
|
-
class:
|
|
1917
|
+
[J]: {
|
|
1918
|
+
class: Ne,
|
|
2159
1919
|
singleton: !1
|
|
2160
1920
|
}
|
|
2161
1921
|
},
|
|
2162
|
-
type:
|
|
2163
|
-
predicate: u(
|
|
2164
|
-
factory: c.Factory.create(
|
|
2165
|
-
};
|
|
2166
|
-
var
|
|
2167
|
-
for (var
|
|
2168
|
-
(a = e[n]) && (
|
|
2169
|
-
return
|
|
2170
|
-
};
|
|
2171
|
-
const
|
|
2172
|
-
let
|
|
2173
|
-
constructor(e, t,
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
this
|
|
2186
|
-
|
|
2187
|
-
updateModel(e) {
|
|
1922
|
+
type: J,
|
|
1923
|
+
predicate: u(J),
|
|
1924
|
+
factory: c.Factory.create(J)
|
|
1925
|
+
};
|
|
1926
|
+
var Ms = Object.defineProperty, Ps = Object.getOwnPropertyDescriptor, m = (e, t, o, s) => {
|
|
1927
|
+
for (var r = s > 1 ? void 0 : s ? Ps(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
1928
|
+
(a = e[n]) && (r = (s ? a(t, o, r) : a(r)) || r);
|
|
1929
|
+
return s && r && Ms(t, o, r), r;
|
|
1930
|
+
};
|
|
1931
|
+
const Z = "settings-model";
|
|
1932
|
+
let f = class {
|
|
1933
|
+
constructor(e, t, o) {
|
|
1934
|
+
i(this, "id");
|
|
1935
|
+
i(this, "logger");
|
|
1936
|
+
i(this, "ncuiLanguageData");
|
|
1937
|
+
i(this, "resolveDelaysMs");
|
|
1938
|
+
i(this, "dateFormat");
|
|
1939
|
+
i(this, "timeFormat");
|
|
1940
|
+
i(this, "hidePlainWaterBev");
|
|
1941
|
+
i(this, "hideCarbWaterBev");
|
|
1942
|
+
i(this, "ncuiLanguage");
|
|
1943
|
+
i(this, "name");
|
|
1944
|
+
i(this, "activateAndRebootTime");
|
|
1945
|
+
i(this, "horizontalMode");
|
|
1946
|
+
this.id = e, this.logger = o.logger;
|
|
2188
1947
|
}
|
|
2189
1948
|
// -------------------LIFECYCLE----------------------------
|
|
2190
|
-
async
|
|
2191
|
-
this.
|
|
1949
|
+
async ready() {
|
|
1950
|
+
this.updateDisplayMode();
|
|
2192
1951
|
}
|
|
2193
1952
|
async getNcuiLanguageList() {
|
|
2194
1953
|
this.ncuiLanguageData = {
|
|
@@ -2216,98 +1975,115 @@ let P = class {
|
|
|
2216
1975
|
}
|
|
2217
1976
|
};
|
|
2218
1977
|
}
|
|
1978
|
+
handleUpdateDisplayMode() {
|
|
1979
|
+
this.updateDisplayMode();
|
|
1980
|
+
}
|
|
1981
|
+
updateDisplayMode() {
|
|
1982
|
+
this.horizontalMode.value ? document.body.setAttribute("data-dashboard-layout", "horizontal") : document.body.setAttribute("data-dashboard-layout", "vertical");
|
|
1983
|
+
}
|
|
2219
1984
|
};
|
|
2220
|
-
|
|
1985
|
+
m([
|
|
2221
1986
|
d({
|
|
2222
1987
|
path: "system:app",
|
|
2223
1988
|
attribute: "resolveDelaysMs"
|
|
2224
1989
|
// optionsExpander: () => [],
|
|
2225
1990
|
})
|
|
2226
|
-
],
|
|
2227
|
-
|
|
1991
|
+
], f.prototype, "resolveDelaysMs", 2);
|
|
1992
|
+
m([
|
|
2228
1993
|
d({
|
|
2229
1994
|
path: "system:app",
|
|
2230
1995
|
attribute: "dateFormat"
|
|
2231
1996
|
// optionsExpander: () => [],
|
|
2232
1997
|
})
|
|
2233
|
-
],
|
|
2234
|
-
|
|
1998
|
+
], f.prototype, "dateFormat", 2);
|
|
1999
|
+
m([
|
|
2235
2000
|
d({
|
|
2236
2001
|
path: "system:app",
|
|
2237
2002
|
attribute: "timeFormat"
|
|
2238
2003
|
// optionsExpander: () => [],
|
|
2239
2004
|
})
|
|
2240
|
-
],
|
|
2241
|
-
|
|
2005
|
+
], f.prototype, "timeFormat", 2);
|
|
2006
|
+
m([
|
|
2242
2007
|
d({
|
|
2243
2008
|
path: "app:kosdev.ddk:app",
|
|
2244
2009
|
attribute: "ncui.hidePlainWaterBev"
|
|
2245
2010
|
})
|
|
2246
|
-
],
|
|
2247
|
-
|
|
2011
|
+
], f.prototype, "hidePlainWaterBev", 2);
|
|
2012
|
+
m([
|
|
2248
2013
|
d({
|
|
2249
2014
|
path: "app:kosdev.ddk:app",
|
|
2250
2015
|
attribute: "ncui.hideCarbWaterBev"
|
|
2251
2016
|
})
|
|
2252
|
-
],
|
|
2253
|
-
|
|
2017
|
+
], f.prototype, "hideCarbWaterBev", 2);
|
|
2018
|
+
m([
|
|
2254
2019
|
d({
|
|
2255
2020
|
path: "app:kosdev.ddk:app",
|
|
2256
2021
|
attribute: "ncui.ncuiLanguage"
|
|
2257
2022
|
})
|
|
2258
|
-
],
|
|
2259
|
-
|
|
2023
|
+
], f.prototype, "ncuiLanguage", 2);
|
|
2024
|
+
m([
|
|
2260
2025
|
d({
|
|
2261
2026
|
path: "kos:device",
|
|
2262
2027
|
attribute: "name"
|
|
2263
2028
|
})
|
|
2264
|
-
],
|
|
2265
|
-
|
|
2029
|
+
], f.prototype, "name", 2);
|
|
2030
|
+
m([
|
|
2266
2031
|
d({
|
|
2267
2032
|
path: "kos:service:OTA",
|
|
2268
2033
|
attribute: "activateAndRebootTime"
|
|
2269
2034
|
})
|
|
2270
|
-
],
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2035
|
+
], f.prototype, "activateAndRebootTime", 2);
|
|
2036
|
+
m([
|
|
2037
|
+
d({
|
|
2038
|
+
path: "app:kosdev.ddk:app",
|
|
2039
|
+
attribute: "ncui.uiConfig.display.horizontalMode"
|
|
2040
|
+
})
|
|
2041
|
+
], f.prototype, "horizontalMode", 2);
|
|
2042
|
+
m([
|
|
2043
|
+
He({
|
|
2044
|
+
dependencies: (e) => [e.horizontalMode.value]
|
|
2045
|
+
})
|
|
2046
|
+
], f.prototype, "handleUpdateDisplayMode", 1);
|
|
2047
|
+
f = m([
|
|
2048
|
+
l(Z)
|
|
2049
|
+
], f);
|
|
2050
|
+
const Os = {
|
|
2275
2051
|
registration: {
|
|
2276
|
-
[
|
|
2277
|
-
class:
|
|
2052
|
+
[Z]: {
|
|
2053
|
+
class: f,
|
|
2278
2054
|
singleton: !0
|
|
2279
2055
|
}
|
|
2280
2056
|
},
|
|
2281
|
-
type:
|
|
2282
|
-
predicate: u(
|
|
2283
|
-
factory: c.Singleton.create(
|
|
2284
|
-
}, { URL:
|
|
2285
|
-
basePath: `${
|
|
2286
|
-
}),
|
|
2057
|
+
type: Z,
|
|
2058
|
+
predicate: u(Z),
|
|
2059
|
+
factory: c.Singleton.create(Z)
|
|
2060
|
+
}, { URL: ro } = h("SETTINGS_SERVICE"), { getAll: so } = y.build({
|
|
2061
|
+
basePath: `${ro}/api/settings`
|
|
2062
|
+
}), Ss = g.createLogger({
|
|
2287
2063
|
name: "settings-service",
|
|
2288
2064
|
group: "Services"
|
|
2289
|
-
}),
|
|
2290
|
-
urlOverride: `${
|
|
2291
|
-
}),
|
|
2065
|
+
}), ws = async () => (Ss.debug("sending GET for settings"), await so({})), Es = async () => await so({
|
|
2066
|
+
urlOverride: `${ro}api/app/kosdev.ddk/ncui/languages`
|
|
2067
|
+
}), ci = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2292
2068
|
__proto__: null,
|
|
2293
|
-
getNcuiLanguage:
|
|
2294
|
-
getSettings:
|
|
2069
|
+
getNcuiLanguage: Es,
|
|
2070
|
+
getSettings: ws
|
|
2295
2071
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2296
|
-
var
|
|
2297
|
-
for (var
|
|
2298
|
-
(a = e[n]) && (
|
|
2299
|
-
return
|
|
2072
|
+
var Ls = Object.getOwnPropertyDescriptor, Cs = (e, t, o, s) => {
|
|
2073
|
+
for (var r = s > 1 ? void 0 : s ? Ls(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
2074
|
+
(a = e[n]) && (r = a(r) || r);
|
|
2075
|
+
return r;
|
|
2300
2076
|
};
|
|
2301
|
-
const
|
|
2302
|
-
let
|
|
2303
|
-
constructor(e, t,
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
this.id = e, this.logger =
|
|
2077
|
+
const ee = "utilities-model";
|
|
2078
|
+
let ze = class {
|
|
2079
|
+
constructor(e, t, o) {
|
|
2080
|
+
i(this, "id");
|
|
2081
|
+
i(this, "name");
|
|
2082
|
+
i(this, "options");
|
|
2083
|
+
i(this, "roles");
|
|
2084
|
+
i(this, "columnId");
|
|
2085
|
+
i(this, "logger");
|
|
2086
|
+
this.id = e, this.logger = o.logger, this.name = t.name, this.options = t.options, this.roles = t == null ? void 0 : t.roles, this.columnId = t.columnId;
|
|
2311
2087
|
}
|
|
2312
2088
|
updateModel(e) {
|
|
2313
2089
|
this.name = e.name, this.options = e.options, this.roles = e == null ? void 0 : e.roles;
|
|
@@ -2326,61 +2102,61 @@ let it = class {
|
|
|
2326
2102
|
this.logger.debug(`loading utilities ${this.id}`);
|
|
2327
2103
|
}
|
|
2328
2104
|
};
|
|
2329
|
-
|
|
2330
|
-
l(
|
|
2331
|
-
],
|
|
2332
|
-
const
|
|
2105
|
+
ze = Cs([
|
|
2106
|
+
l(ee)
|
|
2107
|
+
], ze);
|
|
2108
|
+
const io = {
|
|
2333
2109
|
registration: {
|
|
2334
|
-
[
|
|
2335
|
-
class:
|
|
2110
|
+
[ee]: {
|
|
2111
|
+
class: ze,
|
|
2336
2112
|
singleton: !1
|
|
2337
2113
|
}
|
|
2338
2114
|
},
|
|
2339
|
-
type:
|
|
2340
|
-
predicate: u(
|
|
2341
|
-
factory: c.Factory.create(
|
|
2342
|
-
}, { URL:
|
|
2343
|
-
basePath: `${
|
|
2344
|
-
}),
|
|
2115
|
+
type: ee,
|
|
2116
|
+
predicate: u(ee),
|
|
2117
|
+
factory: c.Factory.create(ee)
|
|
2118
|
+
}, { URL: ue } = h("UTILITIES_SERVICE"), { getAll: Ie } = y.build({
|
|
2119
|
+
basePath: `${ue}/api/utilities`
|
|
2120
|
+
}), Re = g.createLogger({
|
|
2345
2121
|
name: "utilities-service",
|
|
2346
2122
|
group: "Services"
|
|
2347
|
-
}),
|
|
2348
|
-
|
|
2123
|
+
}), no = async () => {
|
|
2124
|
+
Re.debug("sending GET for utilities");
|
|
2349
2125
|
try {
|
|
2350
|
-
const e = await
|
|
2351
|
-
urlOverride: `${
|
|
2126
|
+
const e = await Ie({
|
|
2127
|
+
urlOverride: `${ue}/api/kos/descriptor/app:kosdev.ddk:ncuiDescriptor/kondra.ncui.utilities`
|
|
2352
2128
|
});
|
|
2353
2129
|
if ((e == null ? void 0 : e.status) !== 200) {
|
|
2354
|
-
|
|
2355
|
-
const t = await
|
|
2356
|
-
urlOverride: `${
|
|
2130
|
+
Re.info("no extensions found, using base data");
|
|
2131
|
+
const t = await Ie({
|
|
2132
|
+
urlOverride: `${ue}/api/kos/descriptor/system:app/kondra.ncui.utilities`
|
|
2357
2133
|
});
|
|
2358
2134
|
return (t == null ? void 0 : t.data) ?? [];
|
|
2359
2135
|
}
|
|
2360
2136
|
return (e == null ? void 0 : e.data) ?? [];
|
|
2361
2137
|
} catch (e) {
|
|
2362
|
-
|
|
2363
|
-
const t = await
|
|
2364
|
-
urlOverride: `${
|
|
2138
|
+
Re.info(`error fetching utilities: ${e}. Using base data`);
|
|
2139
|
+
const t = await Ie({
|
|
2140
|
+
urlOverride: `${ue}/api/kos/descriptor/system:app/kondra.ncui.utilities`
|
|
2365
2141
|
});
|
|
2366
2142
|
return (t == null ? void 0 : t.data) ?? [];
|
|
2367
2143
|
}
|
|
2368
|
-
},
|
|
2144
|
+
}, ui = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2369
2145
|
__proto__: null,
|
|
2370
|
-
getUtilities:
|
|
2146
|
+
getUtilities: no
|
|
2371
2147
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2372
|
-
var
|
|
2373
|
-
for (var
|
|
2374
|
-
(a = e[n]) && (
|
|
2375
|
-
return
|
|
2376
|
-
};
|
|
2377
|
-
const
|
|
2378
|
-
let
|
|
2379
|
-
constructor(e, t,
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
this.id = e, this.logger =
|
|
2148
|
+
var ks = Object.defineProperty, Ds = Object.getOwnPropertyDescriptor, ao = (e, t, o, s) => {
|
|
2149
|
+
for (var r = s > 1 ? void 0 : s ? Ds(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
2150
|
+
(a = e[n]) && (r = (s ? a(t, o, r) : a(r)) || r);
|
|
2151
|
+
return s && r && ks(t, o, r), r;
|
|
2152
|
+
};
|
|
2153
|
+
const te = "utilities-container-model";
|
|
2154
|
+
let me = class {
|
|
2155
|
+
constructor(e, t, o) {
|
|
2156
|
+
i(this, "id");
|
|
2157
|
+
i(this, "logger");
|
|
2158
|
+
i(this, "_models");
|
|
2159
|
+
this.id = e, this.logger = o.logger, this._models = new Ve({
|
|
2384
2160
|
parentId: e,
|
|
2385
2161
|
sortKey: "id",
|
|
2386
2162
|
indexMap: {
|
|
@@ -2412,81 +2188,81 @@ let we = class {
|
|
|
2412
2188
|
// -------------------LIFECYCLE----------------------------
|
|
2413
2189
|
async load() {
|
|
2414
2190
|
this.logger.debug(`loading utilities-container container ${this.id}`);
|
|
2415
|
-
const e = await
|
|
2416
|
-
e == null || e.forEach((t,
|
|
2417
|
-
t.forEach((
|
|
2418
|
-
const
|
|
2419
|
-
...
|
|
2420
|
-
columnId: String(
|
|
2421
|
-
}, n =
|
|
2422
|
-
|
|
2191
|
+
const e = await no();
|
|
2192
|
+
e == null || e.forEach((t, o) => {
|
|
2193
|
+
t.forEach((s) => {
|
|
2194
|
+
const r = {
|
|
2195
|
+
...s,
|
|
2196
|
+
columnId: String(o)
|
|
2197
|
+
}, n = io.factory(s.name)(
|
|
2198
|
+
r
|
|
2423
2199
|
);
|
|
2424
2200
|
this.addModel(n);
|
|
2425
2201
|
});
|
|
2426
2202
|
});
|
|
2427
2203
|
}
|
|
2428
2204
|
};
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
],
|
|
2432
|
-
|
|
2433
|
-
l(
|
|
2434
|
-
],
|
|
2435
|
-
const
|
|
2205
|
+
ao([
|
|
2206
|
+
$e
|
|
2207
|
+
], me.prototype, "_models", 2);
|
|
2208
|
+
me = ao([
|
|
2209
|
+
l(te)
|
|
2210
|
+
], me);
|
|
2211
|
+
const Is = {
|
|
2436
2212
|
registration: {
|
|
2437
|
-
[
|
|
2438
|
-
class:
|
|
2213
|
+
[te]: {
|
|
2214
|
+
class: me,
|
|
2439
2215
|
singleton: !0
|
|
2440
2216
|
},
|
|
2441
|
-
...
|
|
2217
|
+
...io.registration
|
|
2442
2218
|
},
|
|
2443
|
-
type:
|
|
2444
|
-
predicate: u(
|
|
2445
|
-
factory: c.Singleton.create(
|
|
2446
|
-
},
|
|
2447
|
-
...
|
|
2448
|
-
...
|
|
2449
|
-
...
|
|
2450
|
-
...
|
|
2451
|
-
...
|
|
2452
|
-
...
|
|
2453
|
-
...
|
|
2454
|
-
...
|
|
2455
|
-
...
|
|
2456
|
-
...ji.registration,
|
|
2457
|
-
...Bi.registration,
|
|
2458
|
-
...qi.registration,
|
|
2459
|
-
...Xi.registration,
|
|
2219
|
+
type: te,
|
|
2220
|
+
predicate: u(te),
|
|
2221
|
+
factory: c.Singleton.create(te)
|
|
2222
|
+
}, pi = {
|
|
2223
|
+
...ir.registration,
|
|
2224
|
+
...Xe.registration,
|
|
2225
|
+
...qe.registration,
|
|
2226
|
+
...pr.registration,
|
|
2227
|
+
...Je.registration,
|
|
2228
|
+
...Pr.registration,
|
|
2229
|
+
...kr.registration,
|
|
2230
|
+
...jr.registration,
|
|
2231
|
+
...Gr.registration,
|
|
2460
2232
|
...rs.registration,
|
|
2461
|
-
...
|
|
2462
|
-
...
|
|
2463
|
-
...
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2233
|
+
...cs.registration,
|
|
2234
|
+
...hs.registration,
|
|
2235
|
+
...vs.registration,
|
|
2236
|
+
...$s.registration,
|
|
2237
|
+
...Os.registration,
|
|
2238
|
+
...wt.registration,
|
|
2239
|
+
...Is.registration
|
|
2240
|
+
};
|
|
2241
|
+
var Rs = Object.defineProperty, As = Object.getOwnPropertyDescriptor, lo = (e, t, o, s) => {
|
|
2242
|
+
for (var r = s > 1 ? void 0 : s ? As(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
2243
|
+
(a = e[n]) && (r = (s ? a(t, o, r) : a(r)) || r);
|
|
2244
|
+
return s && r && Rs(t, o, r), r;
|
|
2245
|
+
};
|
|
2246
|
+
const co = "trouble-action-model";
|
|
2247
|
+
let be = class {
|
|
2248
|
+
constructor(e, t, o) {
|
|
2249
|
+
i(this, "id");
|
|
2250
|
+
i(this, "logger");
|
|
2251
|
+
i(this, "troubleContainer");
|
|
2252
|
+
i(this, "disposer");
|
|
2253
|
+
i(this, "state");
|
|
2254
|
+
i(this, "troubleActionData");
|
|
2255
|
+
this.id = e, this.logger = o.logger, this.state = Eo(), this.troubleActionData = t.definitions.reduce((s, r) => (s[r.troubleType] = r, s), {});
|
|
2480
2256
|
}
|
|
2481
2257
|
// -------------------LIFECYCLE----------------------------
|
|
2482
2258
|
get activeTrouble() {
|
|
2483
2259
|
const e = Object.keys(this.troubleActionData);
|
|
2484
2260
|
if (e.length > 0) {
|
|
2485
|
-
const t = e[0],
|
|
2261
|
+
const t = e[0], o = this.troubleContainer.troubles.getIndexByKey(
|
|
2486
2262
|
"byType",
|
|
2487
2263
|
t
|
|
2488
2264
|
);
|
|
2489
|
-
return
|
|
2265
|
+
return o.length > 0 ? o[0] : void 0;
|
|
2490
2266
|
}
|
|
2491
2267
|
}
|
|
2492
2268
|
get activeTroubleType() {
|
|
@@ -2494,19 +2270,19 @@ let Ee = class {
|
|
|
2494
2270
|
return (e = this.activeTrouble) == null ? void 0 : e.type;
|
|
2495
2271
|
}
|
|
2496
2272
|
async init() {
|
|
2497
|
-
this.logger.debug(`initializing trouble-action ${this.id}`), this.disposer =
|
|
2498
|
-
const e = this.troubleContainer.troubles.data.reduce((t,
|
|
2499
|
-
const
|
|
2500
|
-
if (this.troubleActionData[
|
|
2501
|
-
const
|
|
2502
|
-
t[
|
|
2273
|
+
this.logger.debug(`initializing trouble-action ${this.id}`), this.disposer = Lo(() => {
|
|
2274
|
+
const e = this.troubleContainer.troubles.data.reduce((t, o) => {
|
|
2275
|
+
const s = o.type;
|
|
2276
|
+
if (this.troubleActionData[s]) {
|
|
2277
|
+
const r = this.troubleActionData[s].stateKey ?? s, n = this.troubleActionData[s].stateValue ?? s;
|
|
2278
|
+
t[r] = n;
|
|
2503
2279
|
}
|
|
2504
2280
|
return t;
|
|
2505
2281
|
}, {});
|
|
2506
2282
|
this.state.setValues(e), Object.keys(this.troubleActionData).forEach((t) => {
|
|
2507
2283
|
if (this.troubleContainer.troubles.getIndexByKey("byType", t).length === 0) {
|
|
2508
|
-
const
|
|
2509
|
-
this.state[
|
|
2284
|
+
const o = this.troubleActionData[t].stateKey ?? t;
|
|
2285
|
+
this.state[o] = void 0;
|
|
2510
2286
|
}
|
|
2511
2287
|
});
|
|
2512
2288
|
});
|
|
@@ -2519,35 +2295,35 @@ let Ee = class {
|
|
|
2519
2295
|
this.logger.debug(`loading trouble-action ${this.id}`);
|
|
2520
2296
|
}
|
|
2521
2297
|
};
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
],
|
|
2525
|
-
|
|
2526
|
-
l(
|
|
2527
|
-
],
|
|
2528
|
-
const
|
|
2529
|
-
class:
|
|
2530
|
-
type:
|
|
2531
|
-
}), { URL:
|
|
2532
|
-
basePath: `${
|
|
2533
|
-
}),
|
|
2534
|
-
urlOverride: `${
|
|
2535
|
-
})),
|
|
2298
|
+
lo([
|
|
2299
|
+
p({ modelType: Ke.type })
|
|
2300
|
+
], be.prototype, "troubleContainer", 2);
|
|
2301
|
+
be = lo([
|
|
2302
|
+
l(co)
|
|
2303
|
+
], be);
|
|
2304
|
+
const gi = new Pe({
|
|
2305
|
+
class: be,
|
|
2306
|
+
type: co
|
|
2307
|
+
}), { URL: uo } = h("START_SERVICE"), { getOne: Fs } = y.build({
|
|
2308
|
+
basePath: `${uo}/api/start`
|
|
2309
|
+
}), xs = g.createLogger({ name: "start-service", group: "Services" }), po = async () => (xs.debug("navigating to NCUI"), await Fs({
|
|
2310
|
+
urlOverride: `${uo}/api/app/kosdev.ddk/ncui/open`
|
|
2311
|
+
})), hi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2536
2312
|
__proto__: null,
|
|
2537
|
-
navigateToNCui:
|
|
2313
|
+
navigateToNCui: po
|
|
2538
2314
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2539
|
-
var
|
|
2540
|
-
for (var
|
|
2541
|
-
(a = e[n]) && (
|
|
2542
|
-
return
|
|
2543
|
-
};
|
|
2544
|
-
const
|
|
2545
|
-
let
|
|
2546
|
-
constructor(e, t,
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
this.id = e, this.logger =
|
|
2315
|
+
var js = Object.defineProperty, Us = Object.getOwnPropertyDescriptor, go = (e, t, o, s) => {
|
|
2316
|
+
for (var r = s > 1 ? void 0 : s ? Us(t, o) : t, n = e.length - 1, a; n >= 0; n--)
|
|
2317
|
+
(a = e[n]) && (r = (s ? a(t, o, r) : a(r)) || r);
|
|
2318
|
+
return s && r && js(t, o, r), r;
|
|
2319
|
+
};
|
|
2320
|
+
const ho = "start-model";
|
|
2321
|
+
let _e = class {
|
|
2322
|
+
constructor(e, t, o) {
|
|
2323
|
+
i(this, "id");
|
|
2324
|
+
i(this, "logger");
|
|
2325
|
+
i(this, "troubles");
|
|
2326
|
+
this.id = e, this.logger = o.logger;
|
|
2551
2327
|
}
|
|
2552
2328
|
get firmwareFailed() {
|
|
2553
2329
|
return this.troubles.troubles.getIndexByKey(
|
|
@@ -2562,7 +2338,7 @@ let Le = class {
|
|
|
2562
2338
|
).length > 0;
|
|
2563
2339
|
}
|
|
2564
2340
|
async navigate() {
|
|
2565
|
-
await
|
|
2341
|
+
await po();
|
|
2566
2342
|
}
|
|
2567
2343
|
// -------------------LIFECYCLE----------------------------
|
|
2568
2344
|
async init() {
|
|
@@ -2572,261 +2348,69 @@ let Le = class {
|
|
|
2572
2348
|
this.logger.debug(`loading start ${this.id}`);
|
|
2573
2349
|
}
|
|
2574
2350
|
};
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
],
|
|
2578
|
-
|
|
2579
|
-
l(
|
|
2580
|
-
],
|
|
2581
|
-
const
|
|
2582
|
-
class:
|
|
2583
|
-
type:
|
|
2584
|
-
}), { URL: ye } = h("SPM-PUMP_SERVICE"), { postModel: Be } = f.build({
|
|
2585
|
-
basePath: `${ye}/api/spm-pump`
|
|
2586
|
-
}), $ = g.createLogger({
|
|
2587
|
-
name: "spm-pump-service",
|
|
2588
|
-
group: "Services"
|
|
2589
|
-
}), Rr = async (e, t) => {
|
|
2590
|
-
$.debug(
|
|
2591
|
-
`performPreCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`
|
|
2592
|
-
);
|
|
2593
|
-
try {
|
|
2594
|
-
const r = await Be({
|
|
2595
|
-
model: {},
|
|
2596
|
-
urlOverride: `${ye}/api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`,
|
|
2597
|
-
tracker: t
|
|
2598
|
-
});
|
|
2599
|
-
return $.debug("performPreCalibrate - response:", r), r != null && r.data && T.initiateFuture(r.data), r == null ? void 0 : r.data;
|
|
2600
|
-
} catch (r) {
|
|
2601
|
-
$.error(
|
|
2602
|
-
`performPreCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`,
|
|
2603
|
-
r
|
|
2604
|
-
);
|
|
2605
|
-
const i = {
|
|
2606
|
-
id: t || "",
|
|
2607
|
-
endState: b.Fail,
|
|
2608
|
-
tracker: t,
|
|
2609
|
-
reason: "Failed to resolve trouble"
|
|
2610
|
-
};
|
|
2611
|
-
return T.initiateFuture(i), i;
|
|
2612
|
-
}
|
|
2613
|
-
}, Fr = async (e, t) => {
|
|
2614
|
-
$.debug(
|
|
2615
|
-
`performCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/calibrate`
|
|
2616
|
-
);
|
|
2617
|
-
try {
|
|
2618
|
-
const r = await Be({
|
|
2619
|
-
model: {},
|
|
2620
|
-
urlOverride: `${ye}/api/ext/freestyle/microCalibration/pour/${e}/calibrate`,
|
|
2621
|
-
tracker: t
|
|
2622
|
-
});
|
|
2623
|
-
return $.debug("performCalibrate - response:", r), r != null && r.data && T.initiateFuture(r.data), r == null ? void 0 : r.data;
|
|
2624
|
-
} catch (r) {
|
|
2625
|
-
$.error(
|
|
2626
|
-
`performCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/calibrate`,
|
|
2627
|
-
r
|
|
2628
|
-
);
|
|
2629
|
-
const i = {
|
|
2630
|
-
id: t || "",
|
|
2631
|
-
endState: b.Fail,
|
|
2632
|
-
tracker: t,
|
|
2633
|
-
reason: "Failed to resolve trouble"
|
|
2634
|
-
};
|
|
2635
|
-
return T.initiateFuture(i), i;
|
|
2636
|
-
}
|
|
2637
|
-
}, Ar = async (e, t, r, i) => {
|
|
2638
|
-
$.debug(
|
|
2639
|
-
`performVerify - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/verify`
|
|
2640
|
-
);
|
|
2641
|
-
try {
|
|
2642
|
-
const o = await Be({
|
|
2643
|
-
model: {
|
|
2644
|
-
...r,
|
|
2645
|
-
// commandedCalibrationVolume: 0,
|
|
2646
|
-
measuredCalibrationVolume: t
|
|
2647
|
-
// measuredVerificationVolume: 0,
|
|
2648
|
-
// newCalibrationValue: 0,
|
|
2649
|
-
// pouredCalibrationVolume: 0,
|
|
2650
|
-
},
|
|
2651
|
-
urlOverride: `${ye}/api/ext/freestyle/microCalibration/pour/${e}/verify`,
|
|
2652
|
-
tracker: i
|
|
2653
|
-
});
|
|
2654
|
-
return $.debug("performVerify - response:", o), o != null && o.data && T.initiateFuture(o.data), o == null ? void 0 : o.data;
|
|
2655
|
-
} catch (o) {
|
|
2656
|
-
$.error(
|
|
2657
|
-
`performVerify - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/verify`,
|
|
2658
|
-
o
|
|
2659
|
-
);
|
|
2660
|
-
const n = {
|
|
2661
|
-
id: i || "",
|
|
2662
|
-
endState: b.Fail,
|
|
2663
|
-
tracker: i,
|
|
2664
|
-
reason: "Failed to resolve trouble"
|
|
2665
|
-
};
|
|
2666
|
-
return T.initiateFuture(n), n;
|
|
2667
|
-
}
|
|
2668
|
-
}, xr = async (e, t, r, i) => {
|
|
2669
|
-
var o, n, a, O, D;
|
|
2670
|
-
$.debug(
|
|
2671
|
-
`performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`
|
|
2672
|
-
);
|
|
2673
|
-
try {
|
|
2674
|
-
const p = await Be({
|
|
2675
|
-
model: {
|
|
2676
|
-
...i,
|
|
2677
|
-
// commandedCalibrationVolume: 0,
|
|
2678
|
-
measuredCalibrationVolume: t,
|
|
2679
|
-
measuredVerificationVolume: r
|
|
2680
|
-
// newCalibrationValue: 0,
|
|
2681
|
-
// pouredCalibrationVolume: 0,
|
|
2682
|
-
},
|
|
2683
|
-
urlOverride: `${ye}/api/ext/freestyle/microCalibration/pour/${e}/complete`
|
|
2684
|
-
});
|
|
2685
|
-
return $.debug("performComplete - response:", p), ((p == null ? void 0 : p.status) === 200 || (p == null ? void 0 : p.status) === 499) && ((o = p.data) != null && o.error) ? [p.data.error || "unknownError", p.data] : [void 0, p == null ? void 0 : p.data];
|
|
2686
|
-
} catch (p) {
|
|
2687
|
-
if ($.error(
|
|
2688
|
-
`performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`,
|
|
2689
|
-
p
|
|
2690
|
-
), p instanceof Ae) {
|
|
2691
|
-
const ft = ((a = (n = p.payload) == null ? void 0 : n.data) == null ? void 0 : a.error) || ((O = p.payload) == null ? void 0 : O.error) || "unknownError";
|
|
2692
|
-
return [ft, ((D = p.payload) == null ? void 0 : D.data) || { error: ft }];
|
|
2693
|
-
}
|
|
2694
|
-
}
|
|
2695
|
-
return ["unknownError", { error: "unknownError" }];
|
|
2696
|
-
}, ta = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2697
|
-
__proto__: null,
|
|
2698
|
-
performCalibrate: Fr,
|
|
2699
|
-
performComplete: xr,
|
|
2700
|
-
performPreCalibrate: Rr,
|
|
2701
|
-
performVerify: Ar
|
|
2702
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
2703
|
-
var _s = Object.defineProperty, $s = Object.getOwnPropertyDescriptor, Ke = (e, t, r, i) => {
|
|
2704
|
-
for (var o = i > 1 ? void 0 : i ? $s(t, r) : t, n = e.length - 1, a; n >= 0; n--)
|
|
2705
|
-
(a = e[n]) && (o = (i ? a(t, r, o) : a(o)) || o);
|
|
2706
|
-
return i && o && _s(t, r, o), o;
|
|
2707
|
-
};
|
|
2708
|
-
const jr = "spm-pump-model";
|
|
2709
|
-
let U = class {
|
|
2710
|
-
constructor(e, t, r) {
|
|
2711
|
-
s(this, "id");
|
|
2712
|
-
s(this, "logger");
|
|
2713
|
-
s(this, "pump");
|
|
2714
|
-
s(this, "futureHandler");
|
|
2715
|
-
this.id = e, this.logger = r.logger, this.pump = t.companionParent, this.futureHandler = new he(this);
|
|
2716
|
-
}
|
|
2717
|
-
get name() {
|
|
2718
|
-
return this.pump.name;
|
|
2719
|
-
}
|
|
2720
|
-
get canPour() {
|
|
2721
|
-
return this.pump.canPour;
|
|
2722
|
-
}
|
|
2723
|
-
get isPouring() {
|
|
2724
|
-
return this.pump.isPouring;
|
|
2725
|
-
}
|
|
2726
|
-
async cancelPour() {
|
|
2727
|
-
return this.pump.cancelPour();
|
|
2728
|
-
}
|
|
2729
|
-
performIntent(e) {
|
|
2730
|
-
return this.pump.performIntent(e);
|
|
2731
|
-
}
|
|
2732
|
-
get future() {
|
|
2733
|
-
return this.futureHandler.future;
|
|
2734
|
-
}
|
|
2735
|
-
async performPreCalibrate(e) {
|
|
2736
|
-
return Rr(this.pump.path, e);
|
|
2737
|
-
}
|
|
2738
|
-
async performCalibrate(e) {
|
|
2739
|
-
return Fr(this.pump.path, e);
|
|
2740
|
-
}
|
|
2741
|
-
async performVerify(e, t, r) {
|
|
2742
|
-
return Ar(this.pump.path, e, t, r);
|
|
2743
|
-
}
|
|
2744
|
-
async performComplete(e, t, r) {
|
|
2745
|
-
return xr(this.pump.path, e, t, r);
|
|
2746
|
-
}
|
|
2747
|
-
// -------------------LIFECYCLE----------------------------
|
|
2748
|
-
async init() {
|
|
2749
|
-
this.logger.debug(`initializing spm-pump ${this.id}`);
|
|
2750
|
-
}
|
|
2751
|
-
async load() {
|
|
2752
|
-
this.logger.debug(`loading spm-pump ${this.id}`);
|
|
2753
|
-
}
|
|
2754
|
-
};
|
|
2755
|
-
Ke([
|
|
2756
|
-
v()
|
|
2757
|
-
], U.prototype, "performPreCalibrate", 1);
|
|
2758
|
-
Ke([
|
|
2759
|
-
v()
|
|
2760
|
-
], U.prototype, "performCalibrate", 1);
|
|
2761
|
-
Ke([
|
|
2762
|
-
v()
|
|
2763
|
-
], U.prototype, "performVerify", 1);
|
|
2764
|
-
U = Ke([
|
|
2765
|
-
l(jr)
|
|
2766
|
-
], U);
|
|
2767
|
-
const ra = new ke({
|
|
2768
|
-
class: U,
|
|
2769
|
-
type: jr
|
|
2351
|
+
go([
|
|
2352
|
+
p({ modelType: Ke.type })
|
|
2353
|
+
], _e.prototype, "troubles", 2);
|
|
2354
|
+
_e = go([
|
|
2355
|
+
l(ho)
|
|
2356
|
+
], _e);
|
|
2357
|
+
const yi = new Pe({
|
|
2358
|
+
class: _e,
|
|
2359
|
+
type: ho
|
|
2770
2360
|
});
|
|
2771
2361
|
export {
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
xs as isMicroGroup,
|
|
2827
|
-
Us as macroHolderMap,
|
|
2828
|
-
bi as registerDashboardKeyFactory,
|
|
2829
|
-
Ws as toSeconds,
|
|
2830
|
-
Hs as toTimeComponents,
|
|
2831
|
-
Ht as troubleVisibilityFilter
|
|
2362
|
+
Ks as AgitationControl,
|
|
2363
|
+
ir as Animation,
|
|
2364
|
+
Ys as AnimationServices,
|
|
2365
|
+
Xe as Application,
|
|
2366
|
+
qe as Auth,
|
|
2367
|
+
Hs as AuthServices,
|
|
2368
|
+
pr as CarbWater,
|
|
2369
|
+
qs as CopyLogs,
|
|
2370
|
+
Gs as CopyLogsServices,
|
|
2371
|
+
pi as DDKModels,
|
|
2372
|
+
Je as DashboardOperations,
|
|
2373
|
+
Qs as DashboardOperationsServices,
|
|
2374
|
+
Pr as Dispenser,
|
|
2375
|
+
kr as DispenserInfo,
|
|
2376
|
+
Js as DispenserInfoServices,
|
|
2377
|
+
Xs as DispenserServices,
|
|
2378
|
+
No as Door,
|
|
2379
|
+
re as EXTENSION_POINT_DASHBOARD_KEY_FACTORY,
|
|
2380
|
+
jr as Enrollment,
|
|
2381
|
+
Zs as EnrollmentServices,
|
|
2382
|
+
Gr as IngredientSummary,
|
|
2383
|
+
ai as Lockout,
|
|
2384
|
+
ni as LockoutServices,
|
|
2385
|
+
ri as MACRO_KEYS,
|
|
2386
|
+
rs as MacroAssignment,
|
|
2387
|
+
qt as NetworkTest,
|
|
2388
|
+
cs as NetworkTestContainer,
|
|
2389
|
+
li as NetworkTestServices,
|
|
2390
|
+
hs as NutritiveSweetener,
|
|
2391
|
+
vs as PlainWater,
|
|
2392
|
+
$s as Reboot,
|
|
2393
|
+
di as RebootServices,
|
|
2394
|
+
Os as Settings,
|
|
2395
|
+
ci as SettingsServices,
|
|
2396
|
+
St as SetupStep,
|
|
2397
|
+
wt as SetupStepContainer,
|
|
2398
|
+
Bs as SetupStepServices,
|
|
2399
|
+
yi as Start,
|
|
2400
|
+
hi as StartServices,
|
|
2401
|
+
Io as TROUBLE_TYPE_PRIME,
|
|
2402
|
+
st as TROUBLE_TYPE_PURGE,
|
|
2403
|
+
gi as TroubleActionManager,
|
|
2404
|
+
io as Utilities,
|
|
2405
|
+
Is as UtilitiesContainer,
|
|
2406
|
+
ui as UtilitiesServices,
|
|
2407
|
+
Br as calculateTimeDifference,
|
|
2408
|
+
Hr as executeDashboardKeyFactory,
|
|
2409
|
+
ti as isMacroGroup,
|
|
2410
|
+
ei as isMicroGroup,
|
|
2411
|
+
oi as macroHolderMap,
|
|
2412
|
+
Vr as registerDashboardKeyFactory,
|
|
2413
|
+
ii as toSeconds,
|
|
2414
|
+
si as toTimeComponents,
|
|
2415
|
+
Ct as troubleVisibilityFilter
|
|
2832
2416
|
};
|